@twilio-paste/modal-dialog-primitive
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.1.6](https://github.com/twilio-labs/paste/compare/@twilio-paste/modal-dialog-primitive@0.1.5...@twilio-paste/modal-dialog-primitive@0.1.6) (2020-09-03) | ||
**Note:** Version bump only for package @twilio-paste/modal-dialog-primitive | ||
## [0.1.5](https://github.com/twilio-labs/paste/compare/@twilio-paste/modal-dialog-primitive@0.1.4...@twilio-paste/modal-dialog-primitive@0.1.5) (2020-07-01) | ||
@@ -8,0 +16,0 @@ |
@@ -1,2 +0,2 @@ | ||
import e,{useMemo as n,useRef as t,useState as r,createElement as o,Fragment as i,forwardRef as a,useCallback as u,useEffect as c,PureComponent as l,cloneElement as s,Children as f}from"react";import{createPortal as d}from"react-dom";process.env.NODE_ENV;var p=b()?e.useLayoutEffect:e.useEffect,v={},y=function(e){};if("production"!==process.env.NODE_ENV){var m=("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;y=function(e){v[e]||(v[e]=!0,"test"!==m.NODE_ENV&&1!==parseInt(window.getComputedStyle(document.body).getPropertyValue("--reach-"+e),10)&&console.warn("@reach/"+e+' styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:\n\n import "@reach/'+e+'/styles.css";\n\n Otherwise you\'ll need to include them some other way:\n\n <link rel="stylesheet" type="text/css" href="node_modules/@reach/'+e+'/styles.css" />\n\n For more information visit https://ui.reach.tech/styling.\n '))}}function h(e,n){if(null!=e)if(function(e){return!(!e||"[object Function]"!={}.toString.call(e))}(e))e(n);else try{e.current=n}catch(t){throw new Error('Cannot assign value "'+n+'" to ref "'+e+'"')}}function b(){return"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement}function g(){}function w(e,n){return function(t){if(e&&e(t),!t.defaultPrevented)return n(t)}}var E=function(n){var o=n.children,i=n.type,a=void 0===i?"reach-portal":i,u=t(null),c=t(null),l=r()[1];return p((function(){var e=u.current.ownerDocument;return c.current=null==e?void 0:e.createElement(a),e.body.appendChild(c.current),l({}),function(){c.current&&c.current.ownerDocument&&c.current.ownerDocument.body.removeChild(c.current)}}),[a]),c.current?d(o,c.current):e.createElement("span",{ref:u})};function O(){return(O=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function S(e,n){return e(n={exports:{}},n.exports),n.exports | ||
import e,{useMemo as n,useCallback as t,useState as r,useRef as o,createElement as i,Fragment as a,forwardRef as u,useEffect as c,PureComponent as l,cloneElement as s,Children as f}from"react";import{createPortal as d}from"react-dom";process.env.NODE_ENV;var p=b()?e.useLayoutEffect:e.useEffect,v={},y=g;if("production"!==process.env.NODE_ENV){var m=("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;y=function(e){v[e]||(v[e]=!0,"test"!==m.NODE_ENV&&1!==parseInt(window.getComputedStyle(document.body).getPropertyValue("--reach-"+e),10)&&console.warn("@reach/"+e+' styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:\n\n import "@reach/'+e+'/styles.css";\n\n Otherwise you\'ll need to include them some other way:\n\n <link rel="stylesheet" type="text/css" href="node_modules/@reach/'+e+'/styles.css" />\n\n For more information visit https://ui.reach.tech/styling.\n '))}}function h(e,n){if(null!=e)if(function(e){return!(!e||"[object Function]"!={}.toString.call(e))}(e))e(n);else try{e.current=n}catch(t){throw new Error('Cannot assign value "'+n+'" to ref "'+e+'"')}}function b(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}function g(){}function w(e,n){return function(t){if(e&&e(t),!t.defaultPrevented)return n(t)}}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var E=function(n){var i,a=n.children,u=n.type,c=void 0===u?"reach-portal":u,l=o(null),s=o(null),f=(i=r(Object.create(null))[1],t((function(){i(Object.create(null))}),[]));return p((function(){if(l.current){var e=l.current.ownerDocument;return s.current=null==e?void 0:e.createElement(c),e.body.appendChild(s.current),f(),function(){s.current&&s.current.ownerDocument&&s.current.ownerDocument.body.removeChild(s.current)}}}),[c,f]),s.current?d(a,s.current):e.createElement("span",{ref:l})};function O(){return(O=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function S(e,n){return e(n={exports:{}},n.exports),n.exports | ||
/** @license React v16.13.1 | ||
@@ -9,3 +9,3 @@ * react-is.production.min.js | ||
* LICENSE file in the root directory of this source tree. | ||
*/}"production"!==process.env.NODE_ENV&&(E.displayName="Portal");var x="function"==typeof Symbol&&Symbol.for,N=x?Symbol.for("react.element"):60103,P=x?Symbol.for("react.portal"):60106,C=x?Symbol.for("react.fragment"):60107,T=x?Symbol.for("react.strict_mode"):60108,k=x?Symbol.for("react.profiler"):60114,j=x?Symbol.for("react.provider"):60109,D=x?Symbol.for("react.context"):60110,_=x?Symbol.for("react.async_mode"):60111,I=x?Symbol.for("react.concurrent_mode"):60111,M=x?Symbol.for("react.forward_ref"):60112,F=x?Symbol.for("react.suspense"):60113,A=x?Symbol.for("react.suspense_list"):60120,$=x?Symbol.for("react.memo"):60115,R=x?Symbol.for("react.lazy"):60116,L=x?Symbol.for("react.block"):60121,V=x?Symbol.for("react.fundamental"):60117,B=x?Symbol.for("react.responder"):60118,W=x?Symbol.for("react.scope"):60119;function q(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case N:switch(e=e.type){case _:case I:case C:case k:case T:case F:return e;default:switch(e=e&&e.$$typeof){case D:case M:case R:case $:case j:return e;default:return n}}case P:return n}}}function Y(e){return q(e)===I}var z={AsyncMode:_,ConcurrentMode:I,ContextConsumer:D,ContextProvider:j,Element:N,ForwardRef:M,Fragment:C,Lazy:R,Memo:$,Portal:P,Profiler:k,StrictMode:T,Suspense:F,isAsyncMode:function(e){return Y(e)||q(e)===_},isConcurrentMode:Y,isContextConsumer:function(e){return q(e)===D},isContextProvider:function(e){return q(e)===j},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===N},isForwardRef:function(e){return q(e)===M},isFragment:function(e){return q(e)===C},isLazy:function(e){return q(e)===R},isMemo:function(e){return q(e)===$},isPortal:function(e){return q(e)===P},isProfiler:function(e){return q(e)===k},isStrictMode:function(e){return q(e)===T},isSuspense:function(e){return q(e)===F},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===C||e===I||e===k||e===T||e===F||e===A||"object"==typeof e&&null!==e&&(e.$$typeof===R||e.$$typeof===$||e.$$typeof===j||e.$$typeof===D||e.$$typeof===M||e.$$typeof===V||e.$$typeof===B||e.$$typeof===W||e.$$typeof===L)},typeOf:q},U=S((function(e,n){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case t:var p=e.type;switch(p){case l:case s:case o:case a:case i:case d:return p;default:var m=p&&p.$$typeof;switch(m){case c:case f:case y:case v:case u:return m;default:return n}}case r:return n}}}var E=l,O=s,S=c,x=u,N=t,P=f,C=o,T=y,k=v,j=r,D=a,_=i,I=d,M=!1;function F(e){return w(e)===s}n.AsyncMode=E,n.ConcurrentMode=O,n.ContextConsumer=S,n.ContextProvider=x,n.Element=N,n.ForwardRef=P,n.Fragment=C,n.Lazy=T,n.Memo=k,n.Portal=j,n.Profiler=D,n.StrictMode=_,n.Suspense=I,n.isAsyncMode=function(e){return M||(M=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),F(e)||w(e)===l},n.isConcurrentMode=F,n.isContextConsumer=function(e){return w(e)===c},n.isContextProvider=function(e){return w(e)===u},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},n.isForwardRef=function(e){return w(e)===f},n.isFragment=function(e){return w(e)===o},n.isLazy=function(e){return w(e)===y},n.isMemo=function(e){return w(e)===v},n.isPortal=function(e){return w(e)===r},n.isProfiler=function(e){return w(e)===a},n.isStrictMode=function(e){return w(e)===i},n.isSuspense=function(e){return w(e)===d},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===a||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===v||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===h||e.$$typeof===b||e.$$typeof===g||e.$$typeof===m)},n.typeOf=w}()})),G=(U.AsyncMode,U.ConcurrentMode,U.ContextConsumer,U.ContextProvider,U.Element,U.ForwardRef,U.Fragment,U.Lazy,U.Memo,U.Portal,U.Profiler,U.StrictMode,U.Suspense,U.isAsyncMode,U.isConcurrentMode,U.isContextConsumer,U.isContextProvider,U.isElement,U.isForwardRef,U.isFragment,U.isLazy,U.isMemo,U.isPortal,U.isProfiler,U.isStrictMode,U.isSuspense,U.isValidElementType,U.typeOf,S((function(e){"production"===process.env.NODE_ENV?e.exports=z:e.exports=U}))),X=Object.getOwnPropertySymbols,Z=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;function K(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var J=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(e){return n[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var t,r,o=K(e),i=1;i<arguments.length;i++){for(var a in t=Object(arguments[i]))Z.call(t,a)&&(o[a]=t[a]);if(X){r=X(t);for(var u=0;u<r.length;u++)H.call(t,r[u])&&(o[r[u]]=t[r[u]])}}return o},Q="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ee=function(){};if("production"!==process.env.NODE_ENV){var ne=Q,te={},re=Function.call.bind(Object.prototype.hasOwnProperty);ee=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}}}function oe(e,n,t,r,o){if("production"!==process.env.NODE_ENV)for(var i in e)if(re(e,i)){var a;try{if("function"!=typeof e[i]){var u=Error((r||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.");throw u.name="Invariant Violation",u}a=e[i](n,i,r,t,null,ne)}catch(e){a=e}if(!a||a instanceof Error||ee((r||"React class")+": type specification of "+t+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof a+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),a instanceof Error&&!(a.message in te)){te[a.message]=!0;var c=o?o():"";ee("Failed "+t+" type: "+a.message+(null!=c?c:""))}}}oe.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(te={})};var ie=oe,ae=Function.call.bind(Object.prototype.hasOwnProperty),ue=function(){};function ce(){return null}"production"!==process.env.NODE_ENV&&(ue=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}});var le=function(e,n){var t="function"==typeof Symbol&&Symbol.iterator;var r={array:u("array"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:a(ce),arrayOf:function(e){return a((function(n,t,r,o,a){if("function"!=typeof e)return new i("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=n[t];if(!Array.isArray(u))return new i("Invalid "+o+" `"+a+"` of type `"+l(u)+"` supplied to `"+r+"`, expected an array.");for(var c=0;c<u.length;c++){var s=e(u,c,r,o,a+"["+c+"]",Q);if(s instanceof Error)return s}return null}))},element:a((function(n,t,r,o,a){var u=n[t];return e(u)?null:new i("Invalid "+o+" `"+a+"` of type `"+l(u)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:a((function(e,n,t,r,o){var a=e[n];return G.isValidElementType(a)?null:new i("Invalid "+r+" `"+o+"` of type `"+l(a)+"` supplied to `"+t+"`, expected a single ReactElement type.")})),instanceOf:function(e){return a((function(n,t,r,o,a){if(!(n[t]instanceof e)){var u=e.name||"<<anonymous>>";return new i("Invalid "+o+" `"+a+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return"<<anonymous>>";return e.constructor.name}(n[t])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null}))},node:a((function(e,n,t,r,o){return c(e[n])?null:new i("Invalid "+r+" `"+o+"` supplied to `"+t+"`, expected a ReactNode.")})),objectOf:function(e){return a((function(n,t,r,o,a){if("function"!=typeof e)return new i("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=n[t],c=l(u);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var s in u)if(ae(u,s)){var f=e(u,s,r,o,a+"."+s,Q);if(f instanceof Error)return f}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&(arguments.length>1?ue("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):ue("Invalid argument supplied to oneOf, expected an array.")),ce;function n(n,t,r,a,u){for(var c=n[t],l=0;l<e.length;l++)if(o(c,e[l]))return null;var f=JSON.stringify(e,(function(e,n){return"symbol"===s(n)?String(n):n}));return new i("Invalid "+a+" `"+u+"` of value `"+String(c)+"` supplied to `"+r+"`, expected one of "+f+".")}return a(n)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&ue("Invalid argument supplied to oneOfType, expected an instance of array."),ce;for(var n=0;n<e.length;n++){var t=e[n];if("function"!=typeof t)return ue("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(t)+" at index "+n+"."),ce}return a((function(n,t,r,o,a){for(var u=0;u<e.length;u++){if(null==(0,e[u])(n,t,r,o,a,Q))return null}return new i("Invalid "+o+" `"+a+"` supplied to `"+r+"`.")}))},shape:function(e){return a((function(n,t,r,o,a){var u=n[t],c=l(u);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var s in e){var f=e[s];if(f){var d=f(u,s,r,o,a+"."+s,Q);if(d)return d}}return null}))},exact:function(e){return a((function(n,t,r,o,a){var u=n[t],c=l(u);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var s=J({},n[t],e);for(var f in s){var d=e[f];if(!d)return new i("Invalid "+o+" `"+a+"` key `"+f+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(n[t],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=d(u,f,r,o,a+"."+f,Q);if(p)return p}return null}))}};function o(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n}function i(e){this.message=e,this.stack=""}function a(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,a,u,c,l,s,f){if(c=c||"<<anonymous>>",s=s||u,f!==Q){if(n){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var p=c+":"+u;!t[p]&&r<3&&(ue("You are manually calling a React.PropTypes validation function for the `"+s+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[p]=!0,r++)}}return null==a[u]?o?null===a[u]?new i("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `null`."):new i("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,u,c,l,s)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function u(e){return a((function(n,t,r,o,a,u){var c=n[t];return l(c)!==e?new i("Invalid "+o+" `"+a+"` of type `"+s(c)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function c(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(c);if(null===n||e(n))return!0;var r=function(e){var n=e&&(t&&e[t]||e["@@iterator"]);if("function"==typeof n)return n}(n);if(!r)return!1;var o,i=r.call(n);if(r!==n.entries){for(;!(o=i.next()).done;)if(!c(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!c(a[1]))return!1}return!0;default:return!1}}function l(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,n){return"symbol"===e||!!n&&("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}(n,e)?"symbol":n}function s(e){if(null==e)return""+e;var n=l(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function f(e){var n=s(e);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}return i.prototype=Error.prototype,r.checkPropTypes=ie,r.resetWarningCache=ie.resetWarningCache,r.PropTypes=r,r};function se(){}function fe(){}fe.resetWarningCache=se;var de=S((function(e){if("production"!==process.env.NODE_ENV){var n=G;e.exports=le(n.isElement,!0)}else e.exports=function(){function e(e,n,t,r,o,i){if(i!==Q){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:fe,resetWarningCache:se};return t.PropTypes=t,t}()})),pe=(de.array,de.bool),ve=de.func,ye=(de.number,de.object),me=de.string,he=(de.symbol,de.any),be=de.node,ge=(de.element,de.elementType,de.instanceOf,de.oneOf,de.oneOfType),we=de.arrayOf;de.objectOf,de.shape,de.exact;function Ee(e,n){return t=n,o=function(n){return e.forEach((function(e){return function(e,n){return"function"==typeof e?e(n):e&&(e.current=n),e}(e,n)}))},(i=r((function(){return{value:t,callback:o,facade:{get current(){return i.value},set current(e){var n=i.value;n!==e&&(i.value=e,i.callback(e,n))}}}}))[0]).callback=o,i.facade;var t,o,i}var Oe={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Se=function(e){var n=e.children;return o(i,null,o("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:Oe}),n,n&&o("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:Oe}))};Se.propTypes="production"!==process.env.NODE_ENV?{children:de.node}:{},Se.defaultProps={children:null}; | ||
*/}"production"!==process.env.NODE_ENV&&(E.displayName="Portal");var N="function"==typeof Symbol&&Symbol.for,x=N?Symbol.for("react.element"):60103,P=N?Symbol.for("react.portal"):60106,C=N?Symbol.for("react.fragment"):60107,T=N?Symbol.for("react.strict_mode"):60108,k=N?Symbol.for("react.profiler"):60114,_=N?Symbol.for("react.provider"):60109,D=N?Symbol.for("react.context"):60110,j=N?Symbol.for("react.async_mode"):60111,F=N?Symbol.for("react.concurrent_mode"):60111,I=N?Symbol.for("react.forward_ref"):60112,M=N?Symbol.for("react.suspense"):60113,A=N?Symbol.for("react.suspense_list"):60120,L=N?Symbol.for("react.memo"):60115,$=N?Symbol.for("react.lazy"):60116,R=N?Symbol.for("react.block"):60121,V=N?Symbol.for("react.fundamental"):60117,B=N?Symbol.for("react.responder"):60118,W=N?Symbol.for("react.scope"):60119;function q(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case x:switch(e=e.type){case j:case F:case C:case k:case T:case M:return e;default:switch(e=e&&e.$$typeof){case D:case I:case $:case L:case _:return e;default:return n}}case P:return n}}}function Y(e){return q(e)===F}var U={AsyncMode:j,ConcurrentMode:F,ContextConsumer:D,ContextProvider:_,Element:x,ForwardRef:I,Fragment:C,Lazy:$,Memo:L,Portal:P,Profiler:k,StrictMode:T,Suspense:M,isAsyncMode:function(e){return Y(e)||q(e)===j},isConcurrentMode:Y,isContextConsumer:function(e){return q(e)===D},isContextProvider:function(e){return q(e)===_},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===x},isForwardRef:function(e){return q(e)===I},isFragment:function(e){return q(e)===C},isLazy:function(e){return q(e)===$},isMemo:function(e){return q(e)===L},isPortal:function(e){return q(e)===P},isProfiler:function(e){return q(e)===k},isStrictMode:function(e){return q(e)===T},isSuspense:function(e){return q(e)===M},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===C||e===F||e===k||e===T||e===M||e===A||"object"==typeof e&&null!==e&&(e.$$typeof===$||e.$$typeof===L||e.$$typeof===_||e.$$typeof===D||e.$$typeof===I||e.$$typeof===V||e.$$typeof===B||e.$$typeof===W||e.$$typeof===R)},typeOf:q},z=S((function(e,n){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case t:var p=e.type;switch(p){case l:case s:case o:case a:case i:case d:return p;default:var m=p&&p.$$typeof;switch(m){case c:case f:case y:case v:case u:return m;default:return n}}case r:return n}}}var E=l,O=s,S=c,N=u,x=t,P=f,C=o,T=y,k=v,_=r,D=a,j=i,F=d,I=!1;function M(e){return w(e)===s}n.AsyncMode=E,n.ConcurrentMode=O,n.ContextConsumer=S,n.ContextProvider=N,n.Element=x,n.ForwardRef=P,n.Fragment=C,n.Lazy=T,n.Memo=k,n.Portal=_,n.Profiler=D,n.StrictMode=j,n.Suspense=F,n.isAsyncMode=function(e){return I||(I=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(e)||w(e)===l},n.isConcurrentMode=M,n.isContextConsumer=function(e){return w(e)===c},n.isContextProvider=function(e){return w(e)===u},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},n.isForwardRef=function(e){return w(e)===f},n.isFragment=function(e){return w(e)===o},n.isLazy=function(e){return w(e)===y},n.isMemo=function(e){return w(e)===v},n.isPortal=function(e){return w(e)===r},n.isProfiler=function(e){return w(e)===a},n.isStrictMode=function(e){return w(e)===i},n.isSuspense=function(e){return w(e)===d},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===a||e===i||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===v||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===h||e.$$typeof===b||e.$$typeof===g||e.$$typeof===m)},n.typeOf=w}()})),Z=(z.AsyncMode,z.ConcurrentMode,z.ContextConsumer,z.ContextProvider,z.Element,z.ForwardRef,z.Fragment,z.Lazy,z.Memo,z.Portal,z.Profiler,z.StrictMode,z.Suspense,z.isAsyncMode,z.isConcurrentMode,z.isContextConsumer,z.isContextProvider,z.isElement,z.isForwardRef,z.isFragment,z.isLazy,z.isMemo,z.isPortal,z.isProfiler,z.isStrictMode,z.isSuspense,z.isValidElementType,z.typeOf,S((function(e){"production"===process.env.NODE_ENV?e.exports=U:e.exports=z}))),G=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;function K(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var J=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(e){return n[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var t,r,o=K(e),i=1;i<arguments.length;i++){for(var a in t=Object(arguments[i]))X.call(t,a)&&(o[a]=t[a]);if(G){r=G(t);for(var u=0;u<r.length;u++)H.call(t,r[u])&&(o[r[u]]=t[r[u]])}}return o},Q="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",ee=function(){};if("production"!==process.env.NODE_ENV){var ne=Q,te={},re=Function.call.bind(Object.prototype.hasOwnProperty);ee=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}}}function oe(e,n,t,r,o){if("production"!==process.env.NODE_ENV)for(var i in e)if(re(e,i)){var a;try{if("function"!=typeof e[i]){var u=Error((r||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.");throw u.name="Invariant Violation",u}a=e[i](n,i,r,t,null,ne)}catch(e){a=e}if(!a||a instanceof Error||ee((r||"React class")+": type specification of "+t+" `"+i+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof a+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),a instanceof Error&&!(a.message in te)){te[a.message]=!0;var c=o?o():"";ee("Failed "+t+" type: "+a.message+(null!=c?c:""))}}}oe.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(te={})};var ie=oe,ae=Function.call.bind(Object.prototype.hasOwnProperty),ue=function(){};function ce(){return null}"production"!==process.env.NODE_ENV&&(ue=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}});var le=function(e,n){var t="function"==typeof Symbol&&Symbol.iterator;var r={array:u("array"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:a(ce),arrayOf:function(e){return a((function(n,t,r,o,a){if("function"!=typeof e)return new i("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=n[t];if(!Array.isArray(u))return new i("Invalid "+o+" `"+a+"` of type `"+l(u)+"` supplied to `"+r+"`, expected an array.");for(var c=0;c<u.length;c++){var s=e(u,c,r,o,a+"["+c+"]",Q);if(s instanceof Error)return s}return null}))},element:a((function(n,t,r,o,a){var u=n[t];return e(u)?null:new i("Invalid "+o+" `"+a+"` of type `"+l(u)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:a((function(e,n,t,r,o){var a=e[n];return Z.isValidElementType(a)?null:new i("Invalid "+r+" `"+o+"` of type `"+l(a)+"` supplied to `"+t+"`, expected a single ReactElement type.")})),instanceOf:function(e){return a((function(n,t,r,o,a){if(!(n[t]instanceof e)){var u=e.name||"<<anonymous>>";return new i("Invalid "+o+" `"+a+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return"<<anonymous>>";return e.constructor.name}(n[t])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null}))},node:a((function(e,n,t,r,o){return c(e[n])?null:new i("Invalid "+r+" `"+o+"` supplied to `"+t+"`, expected a ReactNode.")})),objectOf:function(e){return a((function(n,t,r,o,a){if("function"!=typeof e)return new i("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=n[t],c=l(u);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var s in u)if(ae(u,s)){var f=e(u,s,r,o,a+"."+s,Q);if(f instanceof Error)return f}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&(arguments.length>1?ue("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):ue("Invalid argument supplied to oneOf, expected an array.")),ce;function n(n,t,r,a,u){for(var c=n[t],l=0;l<e.length;l++)if(o(c,e[l]))return null;var f=JSON.stringify(e,(function(e,n){return"symbol"===s(n)?String(n):n}));return new i("Invalid "+a+" `"+u+"` of value `"+String(c)+"` supplied to `"+r+"`, expected one of "+f+".")}return a(n)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&ue("Invalid argument supplied to oneOfType, expected an instance of array."),ce;for(var n=0;n<e.length;n++){var t=e[n];if("function"!=typeof t)return ue("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(t)+" at index "+n+"."),ce}return a((function(n,t,r,o,a){for(var u=0;u<e.length;u++){if(null==(0,e[u])(n,t,r,o,a,Q))return null}return new i("Invalid "+o+" `"+a+"` supplied to `"+r+"`.")}))},shape:function(e){return a((function(n,t,r,o,a){var u=n[t],c=l(u);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var s in e){var f=e[s];if(f){var d=f(u,s,r,o,a+"."+s,Q);if(d)return d}}return null}))},exact:function(e){return a((function(n,t,r,o,a){var u=n[t],c=l(u);if("object"!==c)return new i("Invalid "+o+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var s=J({},n[t],e);for(var f in s){var d=e[f];if(!d)return new i("Invalid "+o+" `"+a+"` key `"+f+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(n[t],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=d(u,f,r,o,a+"."+f,Q);if(p)return p}return null}))}};function o(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n}function i(e){this.message=e,this.stack=""}function a(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,a,u,c,l,s,f){if(c=c||"<<anonymous>>",s=s||u,f!==Q){if(n){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var p=c+":"+u;!t[p]&&r<3&&(ue("You are manually calling a React.PropTypes validation function for the `"+s+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[p]=!0,r++)}}return null==a[u]?o?null===a[u]?new i("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `null`."):new i("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(a,u,c,l,s)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function u(e){return a((function(n,t,r,o,a,u){var c=n[t];return l(c)!==e?new i("Invalid "+o+" `"+a+"` of type `"+s(c)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function c(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(c);if(null===n||e(n))return!0;var r=function(e){var n=e&&(t&&e[t]||e["@@iterator"]);if("function"==typeof n)return n}(n);if(!r)return!1;var o,i=r.call(n);if(r!==n.entries){for(;!(o=i.next()).done;)if(!c(o.value))return!1}else for(;!(o=i.next()).done;){var a=o.value;if(a&&!c(a[1]))return!1}return!0;default:return!1}}function l(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,n){return"symbol"===e||!!n&&("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}(n,e)?"symbol":n}function s(e){if(null==e)return""+e;var n=l(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function f(e){var n=s(e);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}return i.prototype=Error.prototype,r.checkPropTypes=ie,r.resetWarningCache=ie.resetWarningCache,r.PropTypes=r,r};function se(){}function fe(){}fe.resetWarningCache=se;var de=S((function(e){if("production"!==process.env.NODE_ENV){var n=Z;e.exports=le(n.isElement,!0)}else e.exports=function(){function e(e,n,t,r,o,i){if(i!==Q){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:fe,resetWarningCache:se};return t.PropTypes=t,t}()})),pe=(de.array,de.bool),ve=de.func,ye=(de.number,de.object),me=de.string,he=(de.symbol,de.any),be=de.node,ge=(de.element,de.elementType,de.instanceOf,de.oneOf,de.oneOfType),we=de.arrayOf;de.objectOf,de.shape,de.exact;function Ee(e,n){return t=n,o=function(n){return e.forEach((function(e){return function(e,n){return"function"==typeof e?e(n):e&&(e.current=n),e}(e,n)}))},(i=r((function(){return{value:t,callback:o,facade:{get current(){return i.value},set current(e){var n=i.value;n!==e&&(i.value=e,i.callback(e,n))}}}}))[0]).callback=o,i.facade;var t,o,i}var Oe={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},Se=function(e){var n=e.children;return i(a,null,i("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:Oe}),n,n&&i("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:Oe}))};Se.propTypes="production"!==process.env.NODE_ENV?{children:de.node}:{},Se.defaultProps={children:null}; | ||
/*! ***************************************************************************** | ||
@@ -25,2 +25,2 @@ Copyright (c) Microsoft Corporation. All rights reserved. | ||
***************************************************************************** */ | ||
var xe=function(){return(xe=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function Ne(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}function Pe(e){return e}function Ce(e,n){void 0===n&&(n=Pe);var t=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(e){var o=n(e,r);return t.push(o),function(){t=t.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;t.length;){var n=t;t=[],n.forEach(e)}t={push:function(n){return e(n)},filter:function(){return t}}},assignMedium:function(e){r=!0;var n=[];if(t.length){var o=t;t=[],o.forEach(e),n=t}var i=function(){var t=n;n=[],t.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),t={push:function(e){n.push(e),a()},filter:function(e){return n=n.filter(e),t}}}}}function Te(e,n){return void 0===n&&(n=Pe),Ce(e,n)}function ke(e){void 0===e&&(e={});var n=Ce(null);return n.options=xe({async:!0,ssr:!1},e),n}var je=function(e){var n=e.sideCar,t=Ne(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=n.read();if(!r)throw new Error("Sidecar medium not found");return o(r,xe({},t))};je.isSideCarExport=!0;var De=Te({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),_e=Te(),Ie=Te(),Me=ke({async:!0}),Fe=[],Ae=a((function(e,n){var a,l=r(),s=l[0],f=l[1],d=t(),p=t(!1),v=t(null),y=e.children,m=e.disabled,h=e.noFocusGuards,b=e.persistentFocus,g=e.crossFrame,w=e.autoFocus,E=e.allowTextSelection,S=e.group,x=e.className,N=e.whiteList,P=e.shards,C=void 0===P?Fe:P,T=e.as,k=void 0===T?"div":T,j=e.lockProps,D=void 0===j?{}:j,_=e.sideCar,I=e.returnFocus,M=e.onActivation,F=e.onDeactivation,A=r({})[0],$=u((function(){v.current=v.current||document&&document.activeElement,d.current&&M&&M(d.current),p.current=!0}),[M]),R=u((function(){p.current=!1,F&&F(d.current)}),[F]),L=u((function(e){var n=v.current;if(Boolean(I)&&n&&n.focus){var t="object"==typeof I?I:void 0;v.current=null,e?Promise.resolve().then((function(){return n.focus(t)})):n.focus(t)}}),[I]),V=u((function(e){p.current&&De.useMedium(e)}),[]),B=_e.useMedium,W=u((function(e){d.current!==e&&(d.current=e,f(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==E&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),c((function(){d.current||console.error("FocusLock: could not obtain ref to internal node")}),[]));var q=O(((a={})["data-focus-lock-disabled"]=m&&"disabled",a["data-focus-lock"]=S,a),D),Y=!0!==h,z=Y&&"tail"!==h,U=Ee([n,W]);return o(i,null,Y&&[o("div",{key:"guard-first","data-focus-guard":!0,tabIndex:m?-1:0,style:Oe}),o("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:m?-1:1,style:Oe})],!m&&o(_,{id:A,sideCar:Me,observed:s,disabled:m,persistentFocus:b,crossFrame:g,autoFocus:w,whiteList:N,shards:C,onActivation:$,onDeactivation:R,returnFocus:L}),o(k,O({ref:U},q,{className:x,onBlur:B,onFocus:V}),y),z&&o("div",{"data-focus-guard":!0,tabIndex:m?-1:0,style:Oe}))}));Ae.propTypes="production"!==process.env.NODE_ENV?{children:be,disabled:pe,returnFocus:ge([pe,ye]),noFocusGuards:pe,allowTextSelection:pe,autoFocus:pe,persistentFocus:pe,crossFrame:pe,group:me,className:me,whiteList:ve,shards:we(he),as:ge([me,ve,ye]),lockProps:ye,onActivation:ve,onDeactivation:ve,sideCar:he.isRequired}:{},Ae.defaultProps={children:void 0,disabled:!1,returnFocus:!1,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var $e=function(e){for(var n=Array(e.length),t=0;t<e.length;++t)n[t]=e[t];return n},Re=function(e){return Array.isArray(e)?e:[e]},Le=function(e,n){var t=e.tabIndex-n.tabIndex,r=e.index-n.index;if(t){if(!e.tabIndex)return 1;if(!n.tabIndex)return-1}return t||r},Ve=function(e,n,t){return $e(e).map((function(e,n){return{node:e,index:n,tabIndex:t&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!n||e.tabIndex>=0})).sort(Le)},Be=["button:enabled:not([readonly])","select:enabled:not([readonly])","textarea:enabled:not([readonly])","input:enabled:not([readonly])","a[href]","area[href]","iframe","object","embed","[tabindex]","[contenteditable]","[autofocus]"],We=Be.join(","),qe=We+", [data-focus-guard]",Ye=function(e,n){return e.reduce((function(e,t){return e.concat($e(t.querySelectorAll(n?qe:We)),t.parentNode?$e(t.parentNode.querySelectorAll(Be.join(","))).filter((function(e){return e===t})):[])}),[])},ze=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.push(n),n.parentNode&&e(n.parentNode,t),t},Ue=function(e,n){for(var t=ze(e),r=ze(n),o=0;o<t.length;o+=1){var i=t[o];if(r.indexOf(i)>=0)return i}return!1},Ge=function(e){return $e(e).filter((function(e){return function e(n){return!n||n===document||n.nodeType===Node.DOCUMENT_NODE||!((t=window.getComputedStyle(n,null))&&t.getPropertyValue&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility")))&&e(n.parentNode);var t}(e)})).filter((function(e){return function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))}(e)}))},Xe=function(e,n){return Ve(Ge(Ye(e,n)),!0,n)},Ze=function(e){return Ge((n=e.querySelectorAll("[data-autofocus-inside]"),$e(n).map((function(e){return Ye([e])})).reduce((function(e,n){return e.concat(n)}),[])));var n},He=function(e){return"INPUT"===e.tagName&&"radio"===e.type},Ke=function(e,n){return n.filter(He).filter((function(n){return n.name===e.name})).filter((function(e){return e.checked}))[0]||e},Je=function(e){return e[0]&&e.length>1&&He(e[0])&&e[0].name?Ke(e[0],e):e[0]},Qe=function(e,n){return e.length>1&&He(e[n])&&e[n].name?e.indexOf(Ke(e[n],e)):n},en="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nn=function(e){return Re(e).filter(Boolean).reduce((function(e,n){var t=n.getAttribute("data-focus-lock");return e.push.apply(e,t?function e(n){for(var t=n.length,r=0;r<t;r+=1)for(var o=function(t){if(r!==t&&n[r].contains(n[t]))return{v:e(n.filter((function(e){return e!==n[t]})))}},i=0;i<t;i+=1){var a=o(i);if("object"===(void 0===a?"undefined":en(a)))return a.v}return n}($e(function e(n){return n.parentNode?e(n.parentNode):n}(n).querySelectorAll('[data-focus-lock="'+t+'"]:not([data-focus-lock-disabled="disabled"])'))):[n]),e}),[])},tn=function(e){return e&&e.dataset&&e.dataset.focusGuard},rn=function(e){return!tn(e)},on=function(e,n,t){var r=Re(e),o=Re(n),i=r[0],a=null;return o.filter(Boolean).forEach((function(e){a=Ue(a||e,e)||a,t.filter(Boolean).forEach((function(e){var n=Ue(i,e);n&&(a=!a||n.contains(a)?n:Ue(n,a))}))})),a},an=function(e,n){var t=document&&document.activeElement,r=nn(e).filter(rn),o=on(t||e,e,r),i=Xe(r).filter((function(e){var n=e.node;return rn(n)}));if(i[0]||(i=(a=r,Ve(Ge(Ye(a)),!1)).filter((function(e){var n=e.node;return rn(n)})))[0]){var a,u,c,l,s,f=Xe([o]).map((function(e){return e.node})),d=(u=f,c=i,l=new Map,c.forEach((function(e){return l.set(e.node,e)})),u.map((function(e){return l.get(e)})).filter(Boolean)),p=d.map((function(e){return e.node})),v=function(e,n,t,r,o){var i=e.length,a=e[0],u=e[i-1],c=tn(t);if(!(e.indexOf(t)>=0)){var l=n.indexOf(t),s=n.indexOf(r||l),f=e.indexOf(r),d=l-s,p=n.indexOf(a),v=n.indexOf(u),y=Qe(e,0),m=Qe(e,i-1);return-1===l||-1===f?e.indexOf(o&&o.length?Je(o):Je(e)):!d&&f>=0?f:l<=p&&c&&Math.abs(d)>1?m:l>=p&&c&&Math.abs(d)>1?y:d&&Math.abs(d)>1?f:l<=p?m:l>v?y:d?Math.abs(d)>1?f:(i+f+d)%i:void 0}}(p,f,t,n,p.filter((s=function(e){return e.reduce((function(e,n){return e.concat(Ze(n))}),[])}(r),function(e){return!!e.autofocus||e.dataset&&!!e.dataset.autofocus||s.indexOf(e)>=0})));return void 0===v?v:d[v]}},un=function(e){return e===document.activeElement},cn=function(e){var n=document&&document.activeElement;return!(!n||n.dataset&&n.dataset.focusGuard)&&nn(e).reduce((function(e,t){return e||t.contains(n)||function(e){return n=$e(e.querySelectorAll("iframe")),t=un,!!n.filter((function(e){return e===t}))[0];var n,t}(t)}),!1)},ln=0,sn=!1,fn=function(e,n){var t,r=an(e,n);if(!sn&&r){if(ln>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),sn=!0,void setTimeout((function(){sn=!1}),1);ln++,(t=r.node).focus(),t.contentWindow&&t.contentWindow.focus(),ln--}};function dn(e){var n=window.setImmediate;void 0!==n?n(e):setTimeout(e,1)}var pn=function(){return document&&document.activeElement===document.body||document&&$e(document.querySelectorAll("[data-no-focus-lock]")).some((function(e){return e.contains(document.activeElement)}))},vn=null,yn=null,mn=null,hn=!1,bn=function(){return!0};function gn(e,n,t,r){var o=null,i=e;do{var a=r[i];if(a.guard)a.node.dataset.focusAutoGuard&&(o=a);else{if(!a.lockItem)break;if(i!==e)return;o=null}}while((i+=t)!==n);o&&(o.node.tabIndex=0)}var wn=function(e){return e&&"current"in e?e.current:e},En=function(){var e,n,t,r,o,i,a=!1;if(vn){var u=vn,c=u.observed,l=u.persistentFocus,s=u.autoFocus,f=u.shards,d=u.crossFrame,p=c||mn&&mn.portaledElement,v=document&&document.activeElement;if(p){var y=[p].concat(f.map(wn).filter(Boolean));if(v&&!function(e){return(vn.whiteList||bn)(e)}(v)||(l||(d?Boolean(hn):"meanwhile"===hn)||!pn()||!yn&&s)&&(!p||cn(y)||(i=v,mn&&mn.portaledElement===i)||(document&&!yn&&v&&!s?(v.blur(),document.body.focus()):(a=fn(y,yn),mn={})),hn=!1,yn=document&&document.activeElement),document){var m=document&&document.activeElement,h=(n=nn(e=y).filter(rn),t=on(e,e,n),r=Xe([t],!0),o=Xe(n).filter((function(e){var n=e.node;return rn(n)})).map((function(e){return e.node})),r.map((function(e){var n=e.node;return{node:n,index:e.index,lockItem:o.indexOf(n)>=0,guard:tn(n)}}))),b=h.find((function(e){return e.node===m}));if(b){h.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")}));var g=h.indexOf(b);gn(g,h.length,1,h),gn(g,-1,-1,h)}}}}return a},On=function(e){En()&&e&&(e.stopPropagation(),e.preventDefault())},Sn=function(){return dn(En)},xn=function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(mn={observerNode:t,portaledElement:n})};"production"!==process.env.NODE_ENV&&de.node.isRequired;var Nn=function(){hn="just",setTimeout((function(){hn="meanwhile"}),0)};De.assignSyncMedium(xn),_e.assignMedium(Sn),Ie.assignMedium((function(e){return e({moveFocusInside:fn,focusInside:cn})}));var Pn=function(n,t){if("production"!==process.env.NODE_ENV){if("function"!=typeof n)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.")}return function(r){if("production"!==process.env.NODE_ENV&&"function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var o,i=[];function a(){o=n(i.map((function(e){return e.props}))),t(o)}var u,c,s,f=function(n){var t,u;function c(){return n.apply(this,arguments)||this}u=n,(t=c).prototype=Object.create(u.prototype),t.prototype.constructor=t,t.__proto__=u,c.peek=function(){return o};var l=c.prototype;return l.componentDidMount=function(){i.push(this),a()},l.componentDidUpdate=function(){a()},l.componentWillUnmount=function(){var e=i.indexOf(this);i.splice(e,1),a()},l.render=function(){return e.createElement(r,this.props)},c}(l);return u=f,c="displayName",s="SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")",c in u?Object.defineProperty(u,c,{value:s,enumerable:!0,configurable:!0,writable:!0}):u[c]=s,f}}((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var n=e.slice(-1)[0];n&&!vn&&(document.addEventListener("focusin",On,!0),document.addEventListener("focusout",Sn),window.addEventListener("blur",Nn));var t=vn,r=t&&n&&n.id===t.id;vn=n,t&&!r&&(t.onDeactivation(),e.filter((function(e){return e.id===t.id})).length||t.returnFocus(!n)),n?(yn=null,r&&t.observed===n.observed||n.onActivation(),En(),dn(En)):(document.removeEventListener("focusin",On,!0),document.removeEventListener("focusout",Sn),window.removeEventListener("blur",Nn),yn=null)}))((function(){return null})),Cn=a((function(e,n){return o(Ae,O({sideCar:Pn,ref:n},e))})),Tn=Ae.propTypes||{},kn=(Tn.sideCar,function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(Tn,["sideCar"]));Cn.propTypes=kn;var jn=ke(),Dn=function(){},_n=a((function(e,n){var a=t(null),u=r({onScrollCapture:Dn,onWheelCapture:Dn,onTouchMoveCapture:Dn}),c=u[0],l=u[1],d=e.forwardProps,p=e.children,v=e.className,y=e.removeScrollBar,m=e.enabled,h=e.shards,b=e.sideCar,g=e.noIsolation,w=e.inert,E=e.allowPinchZoom,O=Ne(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom"]),S=b,x=xe({ref:Ee([a,n])},O,c);return o(i,null,m&&o(S,{sideCar:jn,removeScrollBar:y,shards:h,noIsolation:g,inert:w,setCallbacks:l,allowPinchZoom:!!E,lockRef:a}),d?s(f.only(p),x):o("div",xe({},x,{className:v}),p))}));_n.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},_n.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};function In(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return n&&e.setAttribute("nonce",n),e}var Mn=function(){var e=0,n=null;return{add:function(t){var r,o;0==e&&(n=In())&&(o=t,(r=n).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(n)),e++},remove:function(){!--e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},Fn=function(){var e,n=(e=Mn(),function(n){c((function(){return e.add(n),function(){e.remove()}}),[])});return function(e){var t=e.styles;return n(t),null}},An={left:0,top:0,right:0,gap:0},$n=function(e){return parseInt(e||"",10)||0},Rn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return An;var n=function(e){var n=window.getComputedStyle(document.body),t=n["padding"===e?"paddingLeft":"marginLeft"],r=n["padding"===e?"paddingTop":"marginTop"],o=n["padding"===e?"paddingRight":"marginRight"];return[$n(t),$n(r),$n(o)]}(e),t=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-t+n[2]-n[0])}},Ln=Fn(),Vn=function(e,n,t,r){var o=e.left,i=e.top,a=e.right,u=e.gap;return void 0===t&&(t="margin"),"\n .with-scroll-bars-hidden {\n overflow: hidden "+r+";\n padding-right: "+u+"px "+r+";\n }\n body {\n overflow: hidden "+r+";\n "+[n&&"position: relative "+r+";","margin"===t&&"\n padding-left: "+o+"px;\n padding-top: "+i+"px;\n padding-right: "+a+"px;\n margin-left:0;\n margin-top:0;\n margin-right: "+u+"px "+r+";\n ","padding"===t&&"padding-right: "+u+"px "+r+";"].filter(Boolean).join("")+"\n }\n \n .right-scroll-bar-position {\n right: "+u+"px "+r+";\n }\n \n .width-before-scroll-bar {\n margin-right: "+u+"px "+r+";\n }\n \n .right-scroll-bar-position .right-scroll-bar-position {\n right: 0 "+r+";\n }\n \n .width-before-scroll-bar .width-before-scroll-bar {\n margin-right: 0 "+r+";\n }\n"},Bn=function(e){var n=r(Rn(e.gapMode)),t=n[0],i=n[1];c((function(){i(Rn(e.gapMode))}),[e.gapMode]);var a=e.noRelative,u=e.noImportant,l=e.gapMode;return o(Ln,{styles:Vn(t,!a,void 0===l?"margin":l,u?"":"!important")})},Wn=function(e,n){var t=n;do{if(qn(e,t)){var r=Yn(e,t);if(r[1]>r[2])return!0}t=t.parentNode}while(t&&t!==document.body);return!1},qn=function(e,n){return"v"===e?function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowY&&!(n.overflowY===n.overflowX&&"visible"===n.overflowY)}(n):function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowX&&!(n.overflowY===n.overflowX&&"visible"===n.overflowX)}(n)},Yn=function(e,n){return"v"===e?[(t=n).scrollTop,t.scrollHeight,t.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(n);var t},zn=!1;if("undefined"!=typeof window)try{var Un=Object.defineProperty({},"passive",{get:function(){return zn=!0,!0}});window.addEventListener("test",Un,Un),window.removeEventListener("test",Un,Un)}catch(e){zn=!1}var Gn=!!zn&&{passive:!1},Xn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Zn=function(e){return[e.deltaX,e.deltaY]},Hn=function(e){return e&&"current"in e?e.current:e},Kn=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},Jn=0,Qn=[];var et,nt=(et=function(e){var n=t([]),a=t([0,0]),l=t(),s=r(Jn++)[0],f=r((function(){return Fn()}))[0],d=t(e);c((function(){d.current=e}),[e]),c((function(){if(e.inert){document.body.classList.add("block-interactivity-"+s);var n=[e.lockRef.current].concat((e.shards||[]).map(Hn)).filter(Boolean);return n.forEach((function(e){return e.classList.add("allow-interactivity-"+s)})),function(){document.body.classList.remove("block-interactivity-"+s),n.forEach((function(e){return e.classList.remove("allow-interactivity-"+s)}))}}}),[e.inert,e.lockRef.current,e.shards]);var p=u((function(e,n){if("touches"in e&&2===e.touches.length)return!d.current.allowPinchZoom;var t,r=Xn(e),o=a.current,i="deltaX"in e?e.deltaX:o[0]-r[0],u="deltaY"in e?e.deltaY:o[1]-r[1],c=e.target,s=Math.abs(i)>Math.abs(u)?"h":"v",f=Wn(s,c);if(!f)return!0;if(f?t=s:(t="v"===s?"h":"v",f=Wn(s,c)),!f)return!1;if(!l.current&&"changedTouches"in e&&(i||u)&&(l.current=t),!t)return!0;var p=l.current||t;return function(e,n,t,r,o){var i=r,a=t.target,u=n.contains(a),c=!1,l=i>0,s=0,f=0;do{var d=Yn(e,a),p=d[0],v=d[1]-d[2]-p;(p||v)&&qn(e,a)&&(s+=v,f+=p),a=a.parentNode}while(!u&&a!==document.body||u&&(n.contains(a)||n===a));return(l&&(o&&0===s||!o&&i>s)||!l&&(o&&0===f||!o&&-i>f))&&(c=!0),c}(p,n,e,"h"==p?i:u,!0)}),[]),v=u((function(e){var t=e;if(Qn.length&&Qn[Qn.length-1]===f){var r="deltaY"in t?Zn(t):Xn(t),o=n.current.filter((function(e){return e.name===t.type&&e.target===t.target&&function(e,n){return e[0]===n[0]&&e[1]===n[1]}(e.delta,r)}))[0];if(o&&o.should)t.preventDefault();else if(!o){var i=(d.current.shards||[]).map(Hn).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?p(t,i[0]):!d.current.noIsolation)&&t.preventDefault()}}}),[]),y=u((function(e,t,r,o){var i={name:e,delta:t,target:r,should:o};n.current.push(i),setTimeout((function(){n.current=n.current.filter((function(e){return e!==i}))}),1)}),[]),m=u((function(e){a.current=Xn(e),l.current=void 0}),[]),h=u((function(n){y(n.type,Zn(n),n.target,p(n,e.lockRef.current))}),[]),b=u((function(n){y(n.type,Xn(n),n.target,p(n,e.lockRef.current))}),[]);c((function(){return Qn.push(f),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:b}),document.addEventListener("wheel",v,Gn),document.addEventListener("touchmove",v,Gn),document.addEventListener("touchstart",m,Gn),function(){Qn=Qn.filter((function(e){return e!==f})),document.removeEventListener("wheel",v,Gn),document.removeEventListener("touchmove",v,Gn),document.removeEventListener("touchstart",m,Gn)}}),[]);var g=e.removeScrollBar,w=e.inert;return o(i,null,w?o(f,{styles:Kn(s)}):null,g?o(Bn,{gapMode:"margin"}):null)},jn.useMedium(et),je),tt=a((function(e,n){return o(_n,xe({},e,{ref:n,sideCar:nt}))}));function rt(){return(rt=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function ot(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}tt.classNames=_n.classNames;var it={initialFocusRef:function(){return null},allowPinchZoom:de.bool,onDismiss:de.func},at=a((function(n,t){var r=n.isOpen,o=void 0===r||r,i=ot(n,["isOpen"]);return c((function(){return y("dialog")}),[]),o?e.createElement(E,{"data-reach-dialog-wrapper":""},e.createElement(ut,Object.assign({ref:t},i))):null}));"production"!==process.env.NODE_ENV&&(at.displayName="DialogOverlay",at.propTypes=rt({},it,{isOpen:de.bool}));var ut=a((function(r,o){var i=r.allowPinchZoom,a=r.initialFocusRef,l=r.onClick,s=r.onDismiss,f=void 0===s?g:s,d=r.onMouseDown,p=r.onKeyDown,v=ot(r,["allowPinchZoom","initialFocusRef","onClick","onDismiss","onMouseDown","onKeyDown"]),y=t(null),m=t(null),E=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n((function(){return t.every((function(e){return null==e}))?null:function(e){t.forEach((function(n){h(n,e)}))}}),t)}(m,o),O=u((function(){a&&a.current&&a.current.focus()}),[a]);return c((function(){return m.current?function(e){var n=[],t=[],r=(o=e,(o&&o.ownerDocument?o.ownerDocument:b()?document:null)||document);var o;if(!e)return"production"!==process.env.NODE_ENV&&console.warn("A ref has not yet been attached to a dialog node when attempting to call `createAriaHider`."),g;return Array.prototype.forEach.call(r.querySelectorAll("body > *"),(function(r){var o,i;if(r!==(null===(o=e.parentNode)||void 0===o||null===(i=o.parentNode)||void 0===i?void 0:i.parentNode)){var a=r.getAttribute("aria-hidden");null!==a&&"false"!==a||(n.push(a),t.push(r),r.setAttribute("aria-hidden","true"))}})),function(){t.forEach((function(e,t){var r=n[t];null===r?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r)}))}}(m.current):void 0}),[]),e.createElement(Cn,{autoFocus:!0,returnFocus:!0,onActivation:O},e.createElement(tt,{allowPinchZoom:i},e.createElement("div",Object.assign({},v,{ref:E,"data-reach-dialog-overlay":"",onClick:w(l,(function(e){y.current===e.target&&(e.stopPropagation(),f(e))})),onKeyDown:w(p,(function(e){"Escape"===e.key&&(e.stopPropagation(),f(e))})),onMouseDown:w(d,(function(e){y.current=e.target}))}))))}));"production"!==process.env.NODE_ENV&&(at.displayName="DialogOverlay",at.propTypes=rt({},it));var ct=a((function(n,t){var r=n.onClick,o=ot(n,["onClick","onKeyDown"]);return e.createElement("div",Object.assign({"aria-modal":"true",role:"dialog",tabIndex:-1},o,{ref:t,"data-reach-dialog-content":"",onClick:w(r,(function(e){e.stopPropagation()}))}))}));"production"!==process.env.NODE_ENV&&(ct.displayName="DialogContent",ct.propTypes={"aria-label":st,"aria-labelledby":st});var lt=a((function(n,t){var r=n.isOpen,o=n.onDismiss,i=void 0===o?g:o,a=n.initialFocusRef,u=ot(n,["isOpen","onDismiss","initialFocusRef"]);return e.createElement(at,{initialFocusRef:a,isOpen:r,onDismiss:i},e.createElement(ct,Object.assign({ref:t},u)))}));function st(e,n,t,r,o){var i="\nSee https://www.w3.org/TR/wai-aria/#aria-label for details.";return e["aria-label"]||e["aria-labelledby"]?e["aria-label"]&&e["aria-labelledby"]?new Error("You provided both `aria-label` and `aria-labelledby` props to a <"+t+">. If the a label for this component is visible on the screen, that label's component should be given a unique ID prop, and that ID should be passed as the `aria-labelledby` prop into <"+t+">. If the label cannot be determined programmatically from the content of the element, an alternative label should be provided as the `aria-label` prop, which will be used as an `aria-label` on the HTML tag."+i):null!=e[n]&&"string"!=typeof e[n]?new Error("Invalid prop `"+n+"` supplied to `"+t+"`. Expected `string`, received `"+(Array.isArray(o)?"array":typeof o)+"`."):null:new Error("A <"+t+"> must have either an `aria-label` or `aria-labelledby` prop.\n "+i)}"production"!==process.env.NODE_ENV&&(lt.displayName="Dialog",lt.propTypes={isOpen:de.bool,onDismiss:de.func,"aria-label":st,"aria-labelledby":st});export{ct as ModalDialogPrimitiveContent,at as ModalDialogPrimitiveOverlay}; | ||
var Ne=function(){return(Ne=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function xe(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}function Pe(e){return e}function Ce(e,n){void 0===n&&(n=Pe);var t=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(e){var o=n(e,r);return t.push(o),function(){t=t.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;t.length;){var n=t;t=[],n.forEach(e)}t={push:function(n){return e(n)},filter:function(){return t}}},assignMedium:function(e){r=!0;var n=[];if(t.length){var o=t;t=[],o.forEach(e),n=t}var i=function(){var t=n;n=[],t.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),t={push:function(e){n.push(e),a()},filter:function(e){return n=n.filter(e),t}}}}}function Te(e,n){return void 0===n&&(n=Pe),Ce(e,n)}function ke(e){void 0===e&&(e={});var n=Ce(null);return n.options=Ne({async:!0,ssr:!1},e),n}var _e=function(e){var n=e.sideCar,t=xe(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=n.read();if(!r)throw new Error("Sidecar medium not found");return i(r,Ne({},t))};_e.isSideCarExport=!0;var De=Te({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),je=Te(),Fe=Te(),Ie=ke({async:!0}),Me=[],Ae=u((function(e,n){var u,l=r(),s=l[0],f=l[1],d=o(),p=o(!1),v=o(null),y=e.children,m=e.disabled,h=e.noFocusGuards,b=e.persistentFocus,g=e.crossFrame,w=e.autoFocus,E=e.allowTextSelection,S=e.group,N=e.className,x=e.whiteList,P=e.shards,C=void 0===P?Me:P,T=e.as,k=void 0===T?"div":T,_=e.lockProps,D=void 0===_?{}:_,j=e.sideCar,F=e.returnFocus,I=e.onActivation,M=e.onDeactivation,A=r({})[0],L=t((function(){v.current=v.current||document&&document.activeElement,d.current&&I&&I(d.current),p.current=!0}),[I]),$=t((function(){p.current=!1,M&&M(d.current)}),[M]),R=t((function(e){var n=v.current;if(Boolean(F)&&n&&n.focus){var t="object"==typeof F?F:void 0;v.current=null,e?Promise.resolve().then((function(){return n.focus(t)})):n.focus(t)}}),[F]),V=t((function(e){p.current&&De.useMedium(e)}),[]),B=je.useMedium,W=t((function(e){d.current!==e&&(d.current=e,f(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==E&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),c((function(){d.current||console.error("FocusLock: could not obtain ref to internal node")}),[]));var q=O(((u={})["data-focus-lock-disabled"]=m&&"disabled",u["data-focus-lock"]=S,u),D),Y=!0!==h,U=Y&&"tail"!==h,z=Ee([n,W]);return i(a,null,Y&&[i("div",{key:"guard-first","data-focus-guard":!0,tabIndex:m?-1:0,style:Oe}),i("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:m?-1:1,style:Oe})],!m&&i(j,{id:A,sideCar:Ie,observed:s,disabled:m,persistentFocus:b,crossFrame:g,autoFocus:w,whiteList:x,shards:C,onActivation:L,onDeactivation:$,returnFocus:R}),i(k,O({ref:z},q,{className:N,onBlur:B,onFocus:V}),y),U&&i("div",{"data-focus-guard":!0,tabIndex:m?-1:0,style:Oe}))}));Ae.propTypes="production"!==process.env.NODE_ENV?{children:be,disabled:pe,returnFocus:ge([pe,ye]),noFocusGuards:pe,allowTextSelection:pe,autoFocus:pe,persistentFocus:pe,crossFrame:pe,group:me,className:me,whiteList:ve,shards:we(he),as:ge([me,ve,ye]),lockProps:ye,onActivation:ve,onDeactivation:ve,sideCar:he.isRequired}:{},Ae.defaultProps={children:void 0,disabled:!1,returnFocus:!1,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var Le=function(e){for(var n=Array(e.length),t=0;t<e.length;++t)n[t]=e[t];return n},$e=function(e){return Array.isArray(e)?e:[e]},Re=function(e,n){var t=e.tabIndex-n.tabIndex,r=e.index-n.index;if(t){if(!e.tabIndex)return 1;if(!n.tabIndex)return-1}return t||r},Ve=function(e,n,t){return Le(e).map((function(e,n){return{node:e,index:n,tabIndex:t&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!n||e.tabIndex>=0})).sort(Re)},Be=["button:enabled:not([readonly])","select:enabled:not([readonly])","textarea:enabled:not([readonly])","input:enabled:not([readonly])","a[href]","area[href]","iframe","object","embed","[tabindex]","[contenteditable]","[autofocus]"],We=Be.join(","),qe=We+", [data-focus-guard]",Ye=function(e,n){return e.reduce((function(e,t){return e.concat(Le(t.querySelectorAll(n?qe:We)),t.parentNode?Le(t.parentNode.querySelectorAll(Be.join(","))).filter((function(e){return e===t})):[])}),[])},Ue=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.push(n),n.parentNode&&e(n.parentNode,t),t},ze=function(e,n){for(var t=Ue(e),r=Ue(n),o=0;o<t.length;o+=1){var i=t[o];if(r.indexOf(i)>=0)return i}return!1},Ze=function(e){return Le(e).filter((function(e){return function e(n){return!n||n===document||n.nodeType===Node.DOCUMENT_NODE||!((t=window.getComputedStyle(n,null))&&t.getPropertyValue&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility")))&&e(n.parentNode&&n.parentNode.nodeType===n.DOCUMENT_FRAGMENT_NODE?n.parentNode.host:n.parentNode);var t}(e)})).filter((function(e){return function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))}(e)}))},Ge=function(e,n){return Ve(Ze(Ye(e,n)),!0,n)},Xe=function(e){return Ve(Ze(Ye(e)),!1)},He=function(e){return Ze((n=e.querySelectorAll("[data-autofocus-inside]"),Le(n).map((function(e){return Ye([e])})).reduce((function(e,n){return e.concat(n)}),[])));var n},Ke=function(e){return"INPUT"===e.tagName&&"radio"===e.type},Je=function(e,n){return Ke(e)&&e.name?function(e,n){return n.filter(Ke).filter((function(n){return n.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,n):e},Qe=function(e){return e[0]&&e.length>1?Je(e[0],e):e[0]},en=function(e,n){return e.length>1?e.indexOf(Je(e[n],e)):n},nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tn=function(e){return $e(e).filter(Boolean).reduce((function(e,n){var t=n.getAttribute("data-focus-lock");return e.push.apply(e,t?function e(n){for(var t=n.length,r=0;r<t;r+=1)for(var o=function(t){if(r!==t&&n[r].contains(n[t]))return{v:e(n.filter((function(e){return e!==n[t]})))}},i=0;i<t;i+=1){var a=o(i);if("object"===(void 0===a?"undefined":nn(a)))return a.v}return n}(Le(function e(n){return n.parentNode?e(n.parentNode):n}(n).querySelectorAll('[data-focus-lock="'+t+'"]:not([data-focus-lock-disabled="disabled"])'))):[n]),e}),[])},rn=function(e){return e&&e.dataset&&e.dataset.focusGuard},on=function(e){return!rn(e)},an=function(e,n,t,r){var o=e.length,i=e[0],a=e[o-1],u=rn(t);if(!(e.indexOf(t)>=0)){var c,l,s=n.indexOf(t),f=n.indexOf(r||s),d=e.indexOf(r),p=s-f,v=n.indexOf(i),y=n.indexOf(a),m=(c=n,l=new Set,c.forEach((function(e){return l.add(Je(e,c))})),c.filter((function(e){return l.has(e)}))),h=m.indexOf(t)-m.indexOf(r||s),b=en(e,0),g=en(e,o-1);return-1===s||-1===d?"NEW_FOCUS":!p&&d>=0?d:s<=v&&u&&Math.abs(p)>1?g:s>=y&&u&&Math.abs(p)>1?b:p&&Math.abs(h)>1?d:s<=v?g:s>y?b:p?Math.abs(p)>1?d:(o+d+p)%o:void 0}},un=function(e,n,t){var r=$e(e),o=$e(n),i=r[0],a=null;return o.filter(Boolean).forEach((function(e){a=ze(a||e,e)||a,t.filter(Boolean).forEach((function(e){var n=ze(i,e);n&&(a=!a||n.contains(a)?n:ze(n,a))}))})),a},cn=function(e,n){var t=document&&document.activeElement,r=tn(e).filter(on),o=un(t||e,e,r),i=Xe(r),a=Ge(r).filter((function(e){var n=e.node;return on(n)}));if(a[0]||(a=i)[0]){var u,c,l,s,f=Xe([o]).map((function(e){return e.node})),d=(u=f,c=a,l=new Map,c.forEach((function(e){return l.set(e.node,e)})),u.map((function(e){return l.get(e)})).filter(Boolean)),p=d.map((function(e){return e.node})),v=an(p,f,t,n);if("NEW_FOCUS"===v){var y=i.map((function(e){return e.node})).filter((s=function(e){return e.reduce((function(e,n){return e.concat(He(n))}),[])}(r),function(e){return!!e.autofocus||e.dataset&&!!e.dataset.autofocus||s.indexOf(e)>=0}));return{node:y&&y.length?Qe(y):Qe(p)}}return void 0===v?v:d[v]}},ln=function(e){return e===document.activeElement},sn=function(e){var n=document&&document.activeElement;return!(!n||n.dataset&&n.dataset.focusGuard)&&tn(e).reduce((function(e,t){return e||t.contains(n)||function(e){return n=Le(e.querySelectorAll("iframe")),t=ln,!!n.filter((function(e){return e===t}))[0];var n,t}(t)}),!1)},fn=0,dn=!1,pn=function(e,n){var t,r=cn(e,n);if(!dn&&r){if(fn>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),dn=!0,void setTimeout((function(){dn=!1}),1);fn++,(t=r.node).focus(),t.contentWindow&&t.contentWindow.focus(),fn--}};function vn(e){var n=window.setImmediate;void 0!==n?n(e):setTimeout(e,1)}var yn=function(){return document&&document.activeElement===document.body||document&&Le(document.querySelectorAll("[data-no-focus-lock]")).some((function(e){return e.contains(document.activeElement)}))},mn=null,hn=null,bn=null,gn=!1,wn=function(){return!0};function En(e,n,t,r){var o=null,i=e;do{var a=r[i];if(a.guard)a.node.dataset.focusAutoGuard&&(o=a);else{if(!a.lockItem)break;if(i!==e)return;o=null}}while((i+=t)!==n);o&&(o.node.tabIndex=0)}var On=function(e){return e&&"current"in e?e.current:e},Sn=function(){var e,n,t,r,o,i,a=!1;if(mn){var u=mn,c=u.observed,l=u.persistentFocus,s=u.autoFocus,f=u.shards,d=u.crossFrame,p=c||bn&&bn.portaledElement,v=document&&document.activeElement;if(p){var y=[p].concat(f.map(On).filter(Boolean));if(v&&!function(e){return(mn.whiteList||wn)(e)}(v)||(l||(d?Boolean(gn):"meanwhile"===gn)||!yn()||!hn&&s)&&(!p||sn(y)||(i=v,bn&&bn.portaledElement===i)||(document&&!hn&&v&&!s?(v.blur&&v.blur(),document.body.focus()):(a=pn(y,hn),bn={})),gn=!1,hn=document&&document.activeElement),document){var m=document&&document.activeElement,h=(n=tn(e=y).filter(on),t=un(e,e,n),r=Ge([t],!0),o=Ge(n).filter((function(e){var n=e.node;return on(n)})).map((function(e){return e.node})),r.map((function(e){var n=e.node;return{node:n,index:e.index,lockItem:o.indexOf(n)>=0,guard:rn(n)}}))),b=h.map((function(e){return e.node})).indexOf(m);b>-1&&(h.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),En(b,h.length,1,h),En(b,-1,-1,h))}}}return a},Nn=function(e){Sn()&&e&&(e.stopPropagation(),e.preventDefault())},xn=function(){return vn(Sn)},Pn=function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(bn={observerNode:t,portaledElement:n})};"production"!==process.env.NODE_ENV&&de.node.isRequired;var Cn=function(){gn="just",setTimeout((function(){gn="meanwhile"}),0)};De.assignSyncMedium(Pn),je.assignMedium(xn),Fe.assignMedium((function(e){return e({moveFocusInside:pn,focusInside:sn})}));var Tn=function(n,t){if("production"!==process.env.NODE_ENV){if("function"!=typeof n)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw new Error("Expected handleStateChangeOnClient to be a function.")}return function(r){if("production"!==process.env.NODE_ENV&&"function"!=typeof r)throw new Error("Expected WrappedComponent to be a React component.");var o,i=[];function a(){o=n(i.map((function(e){return e.props}))),t(o)}var u,c,s,f=function(n){var t,u;function c(){return n.apply(this,arguments)||this}u=n,(t=c).prototype=Object.create(u.prototype),t.prototype.constructor=t,t.__proto__=u,c.peek=function(){return o};var l=c.prototype;return l.componentDidMount=function(){i.push(this),a()},l.componentDidUpdate=function(){a()},l.componentWillUnmount=function(){var e=i.indexOf(this);i.splice(e,1),a()},l.render=function(){return e.createElement(r,this.props)},c}(l);return u=f,c="displayName",s="SideEffect("+function(e){return e.displayName||e.name||"Component"}(r)+")",c in u?Object.defineProperty(u,c,{value:s,enumerable:!0,configurable:!0,writable:!0}):u[c]=s,f}}((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var n=e.slice(-1)[0];n&&!mn&&(document.addEventListener("focusin",Nn,!0),document.addEventListener("focusout",xn),window.addEventListener("blur",Cn));var t=mn,r=t&&n&&n.id===t.id;mn=n,t&&!r&&(t.onDeactivation(),e.filter((function(e){return e.id===t.id})).length||t.returnFocus(!n)),n?(hn=null,r&&t.observed===n.observed||n.onActivation(),Sn(),vn(Sn)):(document.removeEventListener("focusin",Nn,!0),document.removeEventListener("focusout",xn),window.removeEventListener("blur",Cn),hn=null)}))((function(){return null})),kn=u((function(e,n){return i(Ae,O({sideCar:Tn,ref:n},e))})),_n=Ae.propTypes||{},Dn=(_n.sideCar,function(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(_n,["sideCar"]));kn.propTypes=Dn;var jn=ke(),Fn=function(){},In=u((function(e,n){var t=o(null),u=r({onScrollCapture:Fn,onWheelCapture:Fn,onTouchMoveCapture:Fn}),c=u[0],l=u[1],d=e.forwardProps,p=e.children,v=e.className,y=e.removeScrollBar,m=e.enabled,h=e.shards,b=e.sideCar,g=e.noIsolation,w=e.inert,E=e.allowPinchZoom,O=e.as,S=void 0===O?"div":O,N=xe(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=b,P=Ee([t,n]),C=Ne({},N,c);return i(a,null,m&&i(x,{sideCar:jn,removeScrollBar:y,shards:h,noIsolation:g,inert:w,setCallbacks:l,allowPinchZoom:!!E,lockRef:t}),d?s(f.only(p),Ne({},C,{ref:P})):i(S,Ne({},C,{className:v,ref:P}),p))}));In.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},In.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};function Mn(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return n&&e.setAttribute("nonce",n),e}var An=function(){var e=0,n=null;return{add:function(t){var r,o;0==e&&(n=Mn())&&(o=t,(r=n).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(n)),e++},remove:function(){!--e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},Ln=function(){var e,n=(e=An(),function(n){c((function(){return e.add(n),function(){e.remove()}}),[])});return function(e){var t=e.styles;return n(t),null}},$n={left:0,top:0,right:0,gap:0},Rn=function(e){return parseInt(e||"",10)||0},Vn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return $n;var n=function(e){var n=window.getComputedStyle(document.body),t=n["padding"===e?"paddingLeft":"marginLeft"],r=n["padding"===e?"paddingTop":"marginTop"],o=n["padding"===e?"paddingRight":"marginRight"];return[Rn(t),Rn(r),Rn(o)]}(e),t=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-t+n[2]-n[0])}},Bn=Ln(),Wn=function(e,n,t,r){var o=e.left,i=e.top,a=e.right,u=e.gap;return void 0===t&&(t="margin"),"\n .with-scroll-bars-hidden {\n overflow: hidden "+r+";\n padding-right: "+u+"px "+r+";\n }\n body {\n overflow: hidden "+r+";\n "+[n&&"position: relative "+r+";","margin"===t&&"\n padding-left: "+o+"px;\n padding-top: "+i+"px;\n padding-right: "+a+"px;\n margin-left:0;\n margin-top:0;\n margin-right: "+u+"px "+r+";\n ","padding"===t&&"padding-right: "+u+"px "+r+";"].filter(Boolean).join("")+"\n }\n \n .right-scroll-bar-position {\n right: "+u+"px "+r+";\n }\n \n .width-before-scroll-bar {\n margin-right: "+u+"px "+r+";\n }\n \n .right-scroll-bar-position .right-scroll-bar-position {\n right: 0 "+r+";\n }\n \n .width-before-scroll-bar .width-before-scroll-bar {\n margin-right: 0 "+r+";\n }\n"},qn=function(e){var n=r(Vn(e.gapMode)),t=n[0],o=n[1];c((function(){o(Vn(e.gapMode))}),[e.gapMode]);var a=e.noRelative,u=e.noImportant,l=e.gapMode;return i(Bn,{styles:Wn(t,!a,void 0===l?"margin":l,u?"":"!important")})},Yn=function(e,n){var t=n;do{if(Un(e,t)){var r=zn(e,t);if(r[1]>r[2])return!0}t=t.parentNode}while(t&&t!==document.body);return!1},Un=function(e,n){return"v"===e?function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowY&&!(n.overflowY===n.overflowX&&"visible"===n.overflowY)}(n):function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowX&&!(n.overflowY===n.overflowX&&"visible"===n.overflowX)}(n)},zn=function(e,n){return"v"===e?[(t=n).scrollTop,t.scrollHeight,t.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(n);var t},Zn=!1;if("undefined"!=typeof window)try{var Gn=Object.defineProperty({},"passive",{get:function(){return Zn=!0,!0}});window.addEventListener("test",Gn,Gn),window.removeEventListener("test",Gn,Gn)}catch(e){Zn=!1}var Xn=!!Zn&&{passive:!1},Hn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Kn=function(e){return[e.deltaX,e.deltaY]},Jn=function(e){return e&&"current"in e?e.current:e},Qn=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},et=0,nt=[];var tt,rt=(tt=function(e){var n=o([]),u=o([0,0]),l=o(),s=r(et++)[0],f=r((function(){return Ln()}))[0],d=o(e);c((function(){d.current=e}),[e]),c((function(){if(e.inert){document.body.classList.add("block-interactivity-"+s);var n=[e.lockRef.current].concat((e.shards||[]).map(Jn)).filter(Boolean);return n.forEach((function(e){return e.classList.add("allow-interactivity-"+s)})),function(){document.body.classList.remove("block-interactivity-"+s),n.forEach((function(e){return e.classList.remove("allow-interactivity-"+s)}))}}}),[e.inert,e.lockRef.current,e.shards]);var p=t((function(e,n){if("touches"in e&&2===e.touches.length)return!d.current.allowPinchZoom;var t,r=Hn(e),o=u.current,i="deltaX"in e?e.deltaX:o[0]-r[0],a="deltaY"in e?e.deltaY:o[1]-r[1],c=e.target,s=Math.abs(i)>Math.abs(a)?"h":"v",f=Yn(s,c);if(!f)return!0;if(f?t=s:(t="v"===s?"h":"v",f=Yn(s,c)),!f)return!1;if(!l.current&&"changedTouches"in e&&(i||a)&&(l.current=t),!t)return!0;var p=l.current||t;return function(e,n,t,r,o){var i=r,a=t.target,u=n.contains(a),c=!1,l=i>0,s=0,f=0;do{var d=zn(e,a),p=d[0],v=d[1]-d[2]-p;(p||v)&&Un(e,a)&&(s+=v,f+=p),a=a.parentNode}while(!u&&a!==document.body||u&&(n.contains(a)||n===a));return(l&&(o&&0===s||!o&&i>s)||!l&&(o&&0===f||!o&&-i>f))&&(c=!0),c}(p,n,e,"h"===p?i:a,!0)}),[]),v=t((function(e){var t=e;if(nt.length&&nt[nt.length-1]===f){var r="deltaY"in t?Kn(t):Hn(t),o=n.current.filter((function(e){return e.name===t.type&&e.target===t.target&&function(e,n){return e[0]===n[0]&&e[1]===n[1]}(e.delta,r)}))[0];if(o&&o.should)t.preventDefault();else if(!o){var i=(d.current.shards||[]).map(Jn).filter(Boolean).filter((function(e){return e.contains(t.target)}));(i.length>0?p(t,i[0]):!d.current.noIsolation)&&t.preventDefault()}}}),[]),y=t((function(e,t,r,o){var i={name:e,delta:t,target:r,should:o};n.current.push(i),setTimeout((function(){n.current=n.current.filter((function(e){return e!==i}))}),1)}),[]),m=t((function(e){u.current=Hn(e),l.current=void 0}),[]),h=t((function(n){y(n.type,Kn(n),n.target,p(n,e.lockRef.current))}),[]),b=t((function(n){y(n.type,Hn(n),n.target,p(n,e.lockRef.current))}),[]);c((function(){return nt.push(f),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:b}),document.addEventListener("wheel",v,Xn),document.addEventListener("touchmove",v,Xn),document.addEventListener("touchstart",m,Xn),function(){nt=nt.filter((function(e){return e!==f})),document.removeEventListener("wheel",v,Xn),document.removeEventListener("touchmove",v,Xn),document.removeEventListener("touchstart",m,Xn)}}),[]);var g=e.removeScrollBar,w=e.inert;return i(a,null,w?i(f,{styles:Qn(s)}):null,g?i(qn,{gapMode:"margin"}):null)},jn.useMedium(tt),_e),ot=u((function(e,n){return i(In,Ne({},e,{ref:n,sideCar:rt}))}));function it(){return(it=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function at(e,n){if(null==e)return{};var t,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)t=i[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}ot.classNames=In.classNames;var ut={allowPinchZoom:de.bool,dangerouslyBypassFocusLock:de.bool,dangerouslyBypassScrollLock:de.bool,initialFocusRef:function(){return null},onDismiss:de.func},ct=u((function(n,t){var r=n.isOpen,o=void 0===r||r,i=at(n,["isOpen"]);return c((function(){return y("dialog")}),[]),c((function(){o?window.__REACH_DISABLE_TOOLTIPS=!0:window.requestAnimationFrame((function(){window.__REACH_DISABLE_TOOLTIPS=!1}))}),[o]),o?e.createElement(E,{"data-reach-dialog-wrapper":""},e.createElement(lt,Object.assign({ref:t},i))):null}));"production"!==process.env.NODE_ENV&&(ct.displayName="DialogOverlay",ct.propTypes=it({},ut,{isOpen:de.bool}));var lt=u((function(r,i){var a=r.allowPinchZoom,u=r.dangerouslyBypassFocusLock,l=void 0!==u&&u,s=r.dangerouslyBypassScrollLock,f=void 0!==s&&s,d=r.initialFocusRef,p=r.onClick,v=r.onDismiss,y=void 0===v?g:v,m=r.onKeyDown,E=r.onMouseDown,O=r.unstable_lockFocusAcrossFrames,S=void 0===O||O,N=at(r,["allowPinchZoom","dangerouslyBypassFocusLock","dangerouslyBypassScrollLock","initialFocusRef","onClick","onDismiss","onKeyDown","onMouseDown","unstable_lockFocusAcrossFrames"]),x=o(null),P=o(null),C=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n((function(){return t.every((function(e){return null==e}))?null:function(e){t.forEach((function(n){h(n,e)}))}}),[].concat(t))}(P,i),T=t((function(){d&&d.current&&d.current.focus()}),[d]);return c((function(){return P.current?function(e){var n=[],t=[],r=(o=e,(o&&o.ownerDocument?o.ownerDocument:b()?document:null)||document);var o;if(!e)return"production"!==process.env.NODE_ENV&&console.warn("A ref has not yet been attached to a dialog node when attempting to call `createAriaHider`."),g;return Array.prototype.forEach.call(r.querySelectorAll("body > *"),(function(r){var o,i;if(r!==(null===(o=e.parentNode)||void 0===o||null===(i=o.parentNode)||void 0===i?void 0:i.parentNode)){var a=r.getAttribute("aria-hidden");null!==a&&"false"!==a||(n.push(a),t.push(r),r.setAttribute("aria-hidden","true"))}})),function(){t.forEach((function(e,t){var r=n[t];null===r?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r)}))}}(P.current):void 0}),[]),e.createElement(kn,{autoFocus:!0,returnFocus:!0,onActivation:T,disabled:l,crossFrame:S},e.createElement(ot,{allowPinchZoom:a,enabled:!f},e.createElement("div",Object.assign({},N,{ref:C,"data-reach-dialog-overlay":"",onClick:w(p,(function(e){x.current===e.target&&(e.stopPropagation(),y(e))})),onKeyDown:w(m,(function(e){"Escape"===e.key&&(e.stopPropagation(),y(e))})),onMouseDown:w(E,(function(e){x.current=e.target}))}))))}));"production"!==process.env.NODE_ENV&&(ct.displayName="DialogOverlay",ct.propTypes=it({},ut));var st=u((function(n,t){var r=n.onClick,o=(n.onKeyDown,at(n,["onClick","onKeyDown"]));return e.createElement("div",Object.assign({"aria-modal":"true",role:"dialog",tabIndex:-1},o,{ref:t,"data-reach-dialog-content":"",onClick:w(r,(function(e){e.stopPropagation()}))}))}));"production"!==process.env.NODE_ENV&&(st.displayName="DialogContent",st.propTypes={"aria-label":dt,"aria-labelledby":dt});var ft=u((function(n,t){var r=n.allowPinchZoom,o=void 0!==r&&r,i=n.initialFocusRef,a=n.isOpen,u=n.onDismiss,c=void 0===u?g:u,l=at(n,["allowPinchZoom","initialFocusRef","isOpen","onDismiss"]);return e.createElement(ct,{allowPinchZoom:o,initialFocusRef:i,isOpen:a,onDismiss:c},e.createElement(st,Object.assign({ref:t},l)))}));function dt(e,n,t,r,o){var i="\nSee https://www.w3.org/TR/wai-aria/#aria-label for details.";return e["aria-label"]||e["aria-labelledby"]?e["aria-label"]&&e["aria-labelledby"]?new Error("You provided both `aria-label` and `aria-labelledby` props to a <"+t+">. If the a label for this component is visible on the screen, that label's component should be given a unique ID prop, and that ID should be passed as the `aria-labelledby` prop into <"+t+">. If the label cannot be determined programmatically from the content of the element, an alternative label should be provided as the `aria-label` prop, which will be used as an `aria-label` on the HTML tag."+i):null!=e[n]&&"string"!=typeof e[n]?new Error("Invalid prop `"+n+"` supplied to `"+t+"`. Expected `string`, received `"+(Array.isArray(o)?"array":typeof o)+"`."):null:new Error("A <"+t+"> must have either an `aria-label` or `aria-labelledby` prop.\n "+i)}"production"!==process.env.NODE_ENV&&(ft.displayName="Dialog",ft.propTypes={isOpen:de.bool,onDismiss:de.func,"aria-label":dt,"aria-labelledby":dt});export{st as ModalDialogPrimitiveContent,ct as ModalDialogPrimitiveOverlay}; |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,n=require("react"),t=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,r=require("react-dom"),o=(process.env.NODE_ENV,l()?t.useLayoutEffect:t.useEffect),a={},i=function(e){};if("production"!==process.env.NODE_ENV){var u=("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;i=function(e){a[e]||(a[e]=!0,"test"!==u.NODE_ENV&&1!==parseInt(window.getComputedStyle(document.body).getPropertyValue("--reach-"+e),10)&&console.warn("@reach/"+e+' styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:\n\n import "@reach/'+e+'/styles.css";\n\n Otherwise you\'ll need to include them some other way:\n\n <link rel="stylesheet" type="text/css" href="node_modules/@reach/'+e+'/styles.css" />\n\n For more information visit https://ui.reach.tech/styling.\n '))}}function c(e,n){if(null!=e)if(function(e){return!(!e||"[object Function]"!={}.toString.call(e))}(e))e(n);else try{e.current=n}catch(t){throw new Error('Cannot assign value "'+n+'" to ref "'+e+'"')}}function l(){return"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement}function s(){}function f(e,n){return function(t){if(e&&e(t),!t.defaultPrevented)return n(t)}}var d=function(e){var a=e.children,i=e.type,u=void 0===i?"reach-portal":i,c=n.useRef(null),l=n.useRef(null),s=n.useState()[1];return o((function(){var e=c.current.ownerDocument;return l.current=null==e?void 0:e.createElement(u),e.body.appendChild(l.current),s({}),function(){l.current&&l.current.ownerDocument&&l.current.ownerDocument.body.removeChild(l.current)}}),[u]),l.current?r.createPortal(a,l.current):t.createElement("span",{ref:c})};function p(){return(p=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function v(e,n){return e(n={exports:{}},n.exports),n.exports | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,n=require("react"),t=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,r=require("react-dom"),o=(process.env.NODE_ENV,l()?t.useLayoutEffect:t.useEffect),a={},i=s;if("production"!==process.env.NODE_ENV){var u=("undefined"!=typeof process?process:{env:{NODE_ENV:"development"}}).env;i=function(e){a[e]||(a[e]=!0,"test"!==u.NODE_ENV&&1!==parseInt(window.getComputedStyle(document.body).getPropertyValue("--reach-"+e),10)&&console.warn("@reach/"+e+' styles not found. If you are using a bundler like webpack or parcel include this in the entry file of your app before any of your own styles:\n\n import "@reach/'+e+'/styles.css";\n\n Otherwise you\'ll need to include them some other way:\n\n <link rel="stylesheet" type="text/css" href="node_modules/@reach/'+e+'/styles.css" />\n\n For more information visit https://ui.reach.tech/styling.\n '))}}function c(e,n){if(null!=e)if(function(e){return!(!e||"[object Function]"!={}.toString.call(e))}(e))e(n);else try{e.current=n}catch(t){throw new Error('Cannot assign value "'+n+'" to ref "'+e+'"')}}function l(){return!("undefined"==typeof window||!window.document||!window.document.createElement)}function s(){}function f(e,n){return function(t){if(e&&e(t),!t.defaultPrevented)return n(t)}}process.env.NODE_ENV,process.env.NODE_ENV,process.env.NODE_ENV;var d=function(e){var a,i=e.children,u=e.type,c=void 0===u?"reach-portal":u,l=n.useRef(null),s=n.useRef(null),f=(a=n.useState(Object.create(null))[1],n.useCallback((function(){a(Object.create(null))}),[]));return o((function(){if(l.current){var e=l.current.ownerDocument;return s.current=null==e?void 0:e.createElement(c),e.body.appendChild(s.current),f(),function(){s.current&&s.current.ownerDocument&&s.current.ownerDocument.body.removeChild(s.current)}}}),[c,f]),s.current?r.createPortal(i,s.current):t.createElement("span",{ref:l})};function p(){return(p=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function m(e,n){return e(n={exports:{}},n.exports),n.exports | ||
/** @license React v16.13.1 | ||
@@ -9,3 +9,3 @@ * react-is.production.min.js | ||
* LICENSE file in the root directory of this source tree. | ||
*/}"production"!==process.env.NODE_ENV&&(d.displayName="Portal");var m="function"==typeof Symbol&&Symbol.for,y=m?Symbol.for("react.element"):60103,h=m?Symbol.for("react.portal"):60106,b=m?Symbol.for("react.fragment"):60107,g=m?Symbol.for("react.strict_mode"):60108,w=m?Symbol.for("react.profiler"):60114,E=m?Symbol.for("react.provider"):60109,O=m?Symbol.for("react.context"):60110,S=m?Symbol.for("react.async_mode"):60111,x=m?Symbol.for("react.concurrent_mode"):60111,N=m?Symbol.for("react.forward_ref"):60112,C=m?Symbol.for("react.suspense"):60113,k=m?Symbol.for("react.suspense_list"):60120,P=m?Symbol.for("react.memo"):60115,T=m?Symbol.for("react.lazy"):60116,j=m?Symbol.for("react.block"):60121,D=m?Symbol.for("react.fundamental"):60117,_=m?Symbol.for("react.responder"):60118,R=m?Symbol.for("react.scope"):60119;function I(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case y:switch(e=e.type){case S:case x:case b:case w:case g:case C:return e;default:switch(e=e&&e.$$typeof){case O:case N:case T:case P:case E:return e;default:return n}}case h:return n}}}function M(e){return I(e)===x}var F={AsyncMode:S,ConcurrentMode:x,ContextConsumer:O,ContextProvider:E,Element:y,ForwardRef:N,Fragment:b,Lazy:T,Memo:P,Portal:h,Profiler:w,StrictMode:g,Suspense:C,isAsyncMode:function(e){return M(e)||I(e)===S},isConcurrentMode:M,isContextConsumer:function(e){return I(e)===O},isContextProvider:function(e){return I(e)===E},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===y},isForwardRef:function(e){return I(e)===N},isFragment:function(e){return I(e)===b},isLazy:function(e){return I(e)===T},isMemo:function(e){return I(e)===P},isPortal:function(e){return I(e)===h},isProfiler:function(e){return I(e)===w},isStrictMode:function(e){return I(e)===g},isSuspense:function(e){return I(e)===C},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===b||e===x||e===w||e===g||e===C||e===k||"object"==typeof e&&null!==e&&(e.$$typeof===T||e.$$typeof===P||e.$$typeof===E||e.$$typeof===O||e.$$typeof===N||e.$$typeof===D||e.$$typeof===_||e.$$typeof===R||e.$$typeof===j)},typeOf:I},A=v((function(e,n){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,v=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case t:var p=e.type;switch(p){case l:case s:case o:case i:case a:case d:return p;default:var y=p&&p.$$typeof;switch(y){case c:case f:case m:case v:case u:return y;default:return n}}case r:return n}}}var E=l,O=s,S=c,x=u,N=t,C=f,k=o,P=m,T=v,j=r,D=i,_=a,R=d,I=!1;function M(e){return w(e)===s}n.AsyncMode=E,n.ConcurrentMode=O,n.ContextConsumer=S,n.ContextProvider=x,n.Element=N,n.ForwardRef=C,n.Fragment=k,n.Lazy=P,n.Memo=T,n.Portal=j,n.Profiler=D,n.StrictMode=_,n.Suspense=R,n.isAsyncMode=function(e){return I||(I=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),M(e)||w(e)===l},n.isConcurrentMode=M,n.isContextConsumer=function(e){return w(e)===c},n.isContextProvider=function(e){return w(e)===u},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},n.isForwardRef=function(e){return w(e)===f},n.isFragment=function(e){return w(e)===o},n.isLazy=function(e){return w(e)===m},n.isMemo=function(e){return w(e)===v},n.isPortal=function(e){return w(e)===r},n.isProfiler=function(e){return w(e)===i},n.isStrictMode=function(e){return w(e)===a},n.isSuspense=function(e){return w(e)===d},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===i||e===a||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===h||e.$$typeof===b||e.$$typeof===g||e.$$typeof===y)},n.typeOf=w}()})),$=(A.AsyncMode,A.ConcurrentMode,A.ContextConsumer,A.ContextProvider,A.Element,A.ForwardRef,A.Fragment,A.Lazy,A.Memo,A.Portal,A.Profiler,A.StrictMode,A.Suspense,A.isAsyncMode,A.isConcurrentMode,A.isContextConsumer,A.isContextProvider,A.isElement,A.isForwardRef,A.isFragment,A.isLazy,A.isMemo,A.isPortal,A.isProfiler,A.isStrictMode,A.isSuspense,A.isValidElementType,A.typeOf,v((function(e){"production"===process.env.NODE_ENV?e.exports=F:e.exports=A}))),L=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;function q(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var W=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(e){return n[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var t,r,o=q(e),a=1;a<arguments.length;a++){for(var i in t=Object(arguments[a]))V.call(t,i)&&(o[i]=t[i]);if(L){r=L(t);for(var u=0;u<r.length;u++)B.call(t,r[u])&&(o[r[u]]=t[r[u]])}}return o},Y="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",z=function(){};if("production"!==process.env.NODE_ENV){var U=Y,G={},X=Function.call.bind(Object.prototype.hasOwnProperty);z=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}}}function Z(e,n,t,r,o){if("production"!==process.env.NODE_ENV)for(var a in e)if(X(e,a)){var i;try{if("function"!=typeof e[a]){var u=Error((r||"React class")+": "+t+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.");throw u.name="Invariant Violation",u}i=e[a](n,a,r,t,null,U)}catch(e){i=e}if(!i||i instanceof Error||z((r||"React class")+": type specification of "+t+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in G)){G[i.message]=!0;var c=o?o():"";z("Failed "+t+" type: "+i.message+(null!=c?c:""))}}}Z.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(G={})};var H=Z,K=Function.call.bind(Object.prototype.hasOwnProperty),J=function(){};function Q(){return null}"production"!==process.env.NODE_ENV&&(J=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}});var ee=function(e,n){var t="function"==typeof Symbol&&Symbol.iterator;var r={array:u("array"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:i(Q),arrayOf:function(e){return i((function(n,t,r,o,i){if("function"!=typeof e)return new a("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=n[t];if(!Array.isArray(u))return new a("Invalid "+o+" `"+i+"` of type `"+l(u)+"` supplied to `"+r+"`, expected an array.");for(var c=0;c<u.length;c++){var s=e(u,c,r,o,i+"["+c+"]",Y);if(s instanceof Error)return s}return null}))},element:i((function(n,t,r,o,i){var u=n[t];return e(u)?null:new a("Invalid "+o+" `"+i+"` of type `"+l(u)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:i((function(e,n,t,r,o){var i=e[n];return $.isValidElementType(i)?null:new a("Invalid "+r+" `"+o+"` of type `"+l(i)+"` supplied to `"+t+"`, expected a single ReactElement type.")})),instanceOf:function(e){return i((function(n,t,r,o,i){if(!(n[t]instanceof e)){var u=e.name||"<<anonymous>>";return new a("Invalid "+o+" `"+i+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return"<<anonymous>>";return e.constructor.name}(n[t])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null}))},node:i((function(e,n,t,r,o){return c(e[n])?null:new a("Invalid "+r+" `"+o+"` supplied to `"+t+"`, expected a ReactNode.")})),objectOf:function(e){return i((function(n,t,r,o,i){if("function"!=typeof e)return new a("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=n[t],c=l(u);if("object"!==c)return new a("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var s in u)if(K(u,s)){var f=e(u,s,r,o,i+"."+s,Y);if(f instanceof Error)return f}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&(arguments.length>1?J("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):J("Invalid argument supplied to oneOf, expected an array.")),Q;function n(n,t,r,i,u){for(var c=n[t],l=0;l<e.length;l++)if(o(c,e[l]))return null;var f=JSON.stringify(e,(function(e,n){return"symbol"===s(n)?String(n):n}));return new a("Invalid "+i+" `"+u+"` of value `"+String(c)+"` supplied to `"+r+"`, expected one of "+f+".")}return i(n)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&J("Invalid argument supplied to oneOfType, expected an instance of array."),Q;for(var n=0;n<e.length;n++){var t=e[n];if("function"!=typeof t)return J("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(t)+" at index "+n+"."),Q}return i((function(n,t,r,o,i){for(var u=0;u<e.length;u++){if(null==(0,e[u])(n,t,r,o,i,Y))return null}return new a("Invalid "+o+" `"+i+"` supplied to `"+r+"`.")}))},shape:function(e){return i((function(n,t,r,o,i){var u=n[t],c=l(u);if("object"!==c)return new a("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var s in e){var f=e[s];if(f){var d=f(u,s,r,o,i+"."+s,Y);if(d)return d}}return null}))},exact:function(e){return i((function(n,t,r,o,i){var u=n[t],c=l(u);if("object"!==c)return new a("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var s=W({},n[t],e);for(var f in s){var d=e[f];if(!d)return new a("Invalid "+o+" `"+i+"` key `"+f+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(n[t],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=d(u,f,r,o,i+"."+f,Y);if(p)return p}return null}))}};function o(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n}function a(e){this.message=e,this.stack=""}function i(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,i,u,c,l,s,f){if(c=c||"<<anonymous>>",s=s||u,f!==Y){if(n){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var p=c+":"+u;!t[p]&&r<3&&(J("You are manually calling a React.PropTypes validation function for the `"+s+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[p]=!0,r++)}}return null==i[u]?o?null===i[u]?new a("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `null`."):new a("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(i,u,c,l,s)}var i=o.bind(null,!1);return i.isRequired=o.bind(null,!0),i}function u(e){return i((function(n,t,r,o,i,u){var c=n[t];return l(c)!==e?new a("Invalid "+o+" `"+i+"` of type `"+s(c)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function c(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(c);if(null===n||e(n))return!0;var r=function(e){var n=e&&(t&&e[t]||e["@@iterator"]);if("function"==typeof n)return n}(n);if(!r)return!1;var o,a=r.call(n);if(r!==n.entries){for(;!(o=a.next()).done;)if(!c(o.value))return!1}else for(;!(o=a.next()).done;){var i=o.value;if(i&&!c(i[1]))return!1}return!0;default:return!1}}function l(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,n){return"symbol"===e||!!n&&("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}(n,e)?"symbol":n}function s(e){if(null==e)return""+e;var n=l(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function f(e){var n=s(e);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}return a.prototype=Error.prototype,r.checkPropTypes=H,r.resetWarningCache=H.resetWarningCache,r.PropTypes=r,r};function ne(){}function te(){}te.resetWarningCache=ne;var re=v((function(e){if("production"!==process.env.NODE_ENV){var n=$;e.exports=ee(n.isElement,!0)}else e.exports=function(){function e(e,n,t,r,o,a){if(a!==Y){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:te,resetWarningCache:ne};return t.PropTypes=t,t}()})),oe=(re.array,re.bool),ae=re.func,ie=(re.number,re.object),ue=re.string,ce=(re.symbol,re.any),le=re.node,se=(re.element,re.elementType,re.instanceOf,re.oneOf,re.oneOfType),fe=re.arrayOf;re.objectOf,re.shape,re.exact;function de(e,t){return r=t,o=function(n){return e.forEach((function(e){return function(e,n){return"function"==typeof e?e(n):e&&(e.current=n),e}(e,n)}))},(a=n.useState((function(){return{value:r,callback:o,facade:{get current(){return a.value},set current(e){var n=a.value;n!==e&&(a.value=e,a.callback(e,n))}}}}))[0]).callback=o,a.facade;var r,o,a}var pe={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},ve=function(e){var t=e.children;return n.createElement(n.Fragment,null,n.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:pe}),t,t&&n.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:pe}))};ve.propTypes="production"!==process.env.NODE_ENV?{children:re.node}:{},ve.defaultProps={children:null}; | ||
*/}"production"!==process.env.NODE_ENV&&(d.displayName="Portal");var v="function"==typeof Symbol&&Symbol.for,y=v?Symbol.for("react.element"):60103,h=v?Symbol.for("react.portal"):60106,b=v?Symbol.for("react.fragment"):60107,g=v?Symbol.for("react.strict_mode"):60108,w=v?Symbol.for("react.profiler"):60114,E=v?Symbol.for("react.provider"):60109,O=v?Symbol.for("react.context"):60110,S=v?Symbol.for("react.async_mode"):60111,N=v?Symbol.for("react.concurrent_mode"):60111,x=v?Symbol.for("react.forward_ref"):60112,C=v?Symbol.for("react.suspense"):60113,k=v?Symbol.for("react.suspense_list"):60120,P=v?Symbol.for("react.memo"):60115,T=v?Symbol.for("react.lazy"):60116,_=v?Symbol.for("react.block"):60121,D=v?Symbol.for("react.fundamental"):60117,j=v?Symbol.for("react.responder"):60118,F=v?Symbol.for("react.scope"):60119;function R(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case y:switch(e=e.type){case S:case N:case b:case w:case g:case C:return e;default:switch(e=e&&e.$$typeof){case O:case x:case T:case P:case E:return e;default:return n}}case h:return n}}}function I(e){return R(e)===N}var M={AsyncMode:S,ConcurrentMode:N,ContextConsumer:O,ContextProvider:E,Element:y,ForwardRef:x,Fragment:b,Lazy:T,Memo:P,Portal:h,Profiler:w,StrictMode:g,Suspense:C,isAsyncMode:function(e){return I(e)||R(e)===S},isConcurrentMode:I,isContextConsumer:function(e){return R(e)===O},isContextProvider:function(e){return R(e)===E},isElement:function(e){return"object"==typeof e&&null!==e&&e.$$typeof===y},isForwardRef:function(e){return R(e)===x},isFragment:function(e){return R(e)===b},isLazy:function(e){return R(e)===T},isMemo:function(e){return R(e)===P},isPortal:function(e){return R(e)===h},isProfiler:function(e){return R(e)===w},isStrictMode:function(e){return R(e)===g},isSuspense:function(e){return R(e)===C},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===b||e===N||e===w||e===g||e===C||e===k||"object"==typeof e&&null!==e&&(e.$$typeof===T||e.$$typeof===P||e.$$typeof===E||e.$$typeof===O||e.$$typeof===x||e.$$typeof===D||e.$$typeof===j||e.$$typeof===F||e.$$typeof===_)},typeOf:R},A=m((function(e,n){"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,o=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,u=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var n=e.$$typeof;switch(n){case t:var p=e.type;switch(p){case l:case s:case o:case i:case a:case d:return p;default:var y=p&&p.$$typeof;switch(y){case c:case f:case v:case m:case u:return y;default:return n}}case r:return n}}}var E=l,O=s,S=c,N=u,x=t,C=f,k=o,P=v,T=m,_=r,D=i,j=a,F=d,R=!1;function I(e){return w(e)===s}n.AsyncMode=E,n.ConcurrentMode=O,n.ContextConsumer=S,n.ContextProvider=N,n.Element=x,n.ForwardRef=C,n.Fragment=k,n.Lazy=P,n.Memo=T,n.Portal=_,n.Profiler=D,n.StrictMode=j,n.Suspense=F,n.isAsyncMode=function(e){return R||(R=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),I(e)||w(e)===l},n.isConcurrentMode=I,n.isContextConsumer=function(e){return w(e)===c},n.isContextProvider=function(e){return w(e)===u},n.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},n.isForwardRef=function(e){return w(e)===f},n.isFragment=function(e){return w(e)===o},n.isLazy=function(e){return w(e)===v},n.isMemo=function(e){return w(e)===m},n.isPortal=function(e){return w(e)===r},n.isProfiler=function(e){return w(e)===i},n.isStrictMode=function(e){return w(e)===a},n.isSuspense=function(e){return w(e)===d},n.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===s||e===i||e===a||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===u||e.$$typeof===c||e.$$typeof===f||e.$$typeof===h||e.$$typeof===b||e.$$typeof===g||e.$$typeof===y)},n.typeOf=w}()})),L=(A.AsyncMode,A.ConcurrentMode,A.ContextConsumer,A.ContextProvider,A.Element,A.ForwardRef,A.Fragment,A.Lazy,A.Memo,A.Portal,A.Profiler,A.StrictMode,A.Suspense,A.isAsyncMode,A.isConcurrentMode,A.isContextConsumer,A.isContextProvider,A.isElement,A.isForwardRef,A.isFragment,A.isLazy,A.isMemo,A.isPortal,A.isProfiler,A.isStrictMode,A.isSuspense,A.isValidElementType,A.typeOf,m((function(e){"production"===process.env.NODE_ENV?e.exports=M:e.exports=A}))),$=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;function W(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var q=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var n={},t=0;t<10;t++)n["_"+String.fromCharCode(t)]=t;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(e){return n[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var t,r,o=W(e),a=1;a<arguments.length;a++){for(var i in t=Object(arguments[a]))V.call(t,i)&&(o[i]=t[i]);if($){r=$(t);for(var u=0;u<r.length;u++)B.call(t,r[u])&&(o[r[u]]=t[r[u]])}}return o},Y="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",U=function(){};if("production"!==process.env.NODE_ENV){var z=Y,Z={},G=Function.call.bind(Object.prototype.hasOwnProperty);U=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}}}function X(e,n,t,r,o){if("production"!==process.env.NODE_ENV)for(var a in e)if(G(e,a)){var i;try{if("function"!=typeof e[a]){var u=Error((r||"React class")+": "+t+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.");throw u.name="Invariant Violation",u}i=e[a](n,a,r,t,null,z)}catch(e){i=e}if(!i||i instanceof Error||U((r||"React class")+": type specification of "+t+" `"+a+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof i+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),i instanceof Error&&!(i.message in Z)){Z[i.message]=!0;var c=o?o():"";U("Failed "+t+" type: "+i.message+(null!=c?c:""))}}}X.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(Z={})};var H=X,K=Function.call.bind(Object.prototype.hasOwnProperty),J=function(){};function Q(){return null}"production"!==process.env.NODE_ENV&&(J=function(e){var n="Warning: "+e;"undefined"!=typeof console&&console.error(n);try{throw new Error(n)}catch(e){}});var ee=function(e,n){var t="function"==typeof Symbol&&Symbol.iterator;var r={array:u("array"),bool:u("boolean"),func:u("function"),number:u("number"),object:u("object"),string:u("string"),symbol:u("symbol"),any:i(Q),arrayOf:function(e){return i((function(n,t,r,o,i){if("function"!=typeof e)return new a("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var u=n[t];if(!Array.isArray(u))return new a("Invalid "+o+" `"+i+"` of type `"+l(u)+"` supplied to `"+r+"`, expected an array.");for(var c=0;c<u.length;c++){var s=e(u,c,r,o,i+"["+c+"]",Y);if(s instanceof Error)return s}return null}))},element:i((function(n,t,r,o,i){var u=n[t];return e(u)?null:new a("Invalid "+o+" `"+i+"` of type `"+l(u)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:i((function(e,n,t,r,o){var i=e[n];return L.isValidElementType(i)?null:new a("Invalid "+r+" `"+o+"` of type `"+l(i)+"` supplied to `"+t+"`, expected a single ReactElement type.")})),instanceOf:function(e){return i((function(n,t,r,o,i){if(!(n[t]instanceof e)){var u=e.name||"<<anonymous>>";return new a("Invalid "+o+" `"+i+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return"<<anonymous>>";return e.constructor.name}(n[t])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null}))},node:i((function(e,n,t,r,o){return c(e[n])?null:new a("Invalid "+r+" `"+o+"` supplied to `"+t+"`, expected a ReactNode.")})),objectOf:function(e){return i((function(n,t,r,o,i){if("function"!=typeof e)return new a("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=n[t],c=l(u);if("object"!==c)return new a("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var s in u)if(K(u,s)){var f=e(u,s,r,o,i+"."+s,Y);if(f instanceof Error)return f}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&(arguments.length>1?J("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):J("Invalid argument supplied to oneOf, expected an array.")),Q;function n(n,t,r,i,u){for(var c=n[t],l=0;l<e.length;l++)if(o(c,e[l]))return null;var f=JSON.stringify(e,(function(e,n){return"symbol"===s(n)?String(n):n}));return new a("Invalid "+i+" `"+u+"` of value `"+String(c)+"` supplied to `"+r+"`, expected one of "+f+".")}return i(n)},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&J("Invalid argument supplied to oneOfType, expected an instance of array."),Q;for(var n=0;n<e.length;n++){var t=e[n];if("function"!=typeof t)return J("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+f(t)+" at index "+n+"."),Q}return i((function(n,t,r,o,i){for(var u=0;u<e.length;u++){if(null==(0,e[u])(n,t,r,o,i,Y))return null}return new a("Invalid "+o+" `"+i+"` supplied to `"+r+"`.")}))},shape:function(e){return i((function(n,t,r,o,i){var u=n[t],c=l(u);if("object"!==c)return new a("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var s in e){var f=e[s];if(f){var d=f(u,s,r,o,i+"."+s,Y);if(d)return d}}return null}))},exact:function(e){return i((function(n,t,r,o,i){var u=n[t],c=l(u);if("object"!==c)return new a("Invalid "+o+" `"+i+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var s=q({},n[t],e);for(var f in s){var d=e[f];if(!d)return new a("Invalid "+o+" `"+i+"` key `"+f+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(n[t],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var p=d(u,f,r,o,i+"."+f,Y);if(p)return p}return null}))}};function o(e,n){return e===n?0!==e||1/e==1/n:e!=e&&n!=n}function a(e){this.message=e,this.stack=""}function i(e){if("production"!==process.env.NODE_ENV)var t={},r=0;function o(o,i,u,c,l,s,f){if(c=c||"<<anonymous>>",s=s||u,f!==Y){if(n){var d=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw d.name="Invariant Violation",d}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var p=c+":"+u;!t[p]&&r<3&&(J("You are manually calling a React.PropTypes validation function for the `"+s+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[p]=!0,r++)}}return null==i[u]?o?null===i[u]?new a("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `null`."):new a("The "+l+" `"+s+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(i,u,c,l,s)}var i=o.bind(null,!1);return i.isRequired=o.bind(null,!0),i}function u(e){return i((function(n,t,r,o,i,u){var c=n[t];return l(c)!==e?new a("Invalid "+o+" `"+i+"` of type `"+s(c)+"` supplied to `"+r+"`, expected `"+e+"`."):null}))}function c(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(c);if(null===n||e(n))return!0;var r=function(e){var n=e&&(t&&e[t]||e["@@iterator"]);if("function"==typeof n)return n}(n);if(!r)return!1;var o,a=r.call(n);if(r!==n.entries){for(;!(o=a.next()).done;)if(!c(o.value))return!1}else for(;!(o=a.next()).done;){var i=o.value;if(i&&!c(i[1]))return!1}return!0;default:return!1}}function l(e){var n=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,n){return"symbol"===e||!!n&&("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}(n,e)?"symbol":n}function s(e){if(null==e)return""+e;var n=l(e);if("object"===n){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return n}function f(e){var n=s(e);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}return a.prototype=Error.prototype,r.checkPropTypes=H,r.resetWarningCache=H.resetWarningCache,r.PropTypes=r,r};function ne(){}function te(){}te.resetWarningCache=ne;var re=m((function(e){if("production"!==process.env.NODE_ENV){var n=L;e.exports=ee(n.isElement,!0)}else e.exports=function(){function e(e,n,t,r,o,a){if(a!==Y){var i=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw i.name="Invariant Violation",i}}function n(){return e}e.isRequired=e;var t={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:n,element:e,elementType:e,instanceOf:n,node:e,objectOf:n,oneOf:n,oneOfType:n,shape:n,exact:n,checkPropTypes:te,resetWarningCache:ne};return t.PropTypes=t,t}()})),oe=(re.array,re.bool),ae=re.func,ie=(re.number,re.object),ue=re.string,ce=(re.symbol,re.any),le=re.node,se=(re.element,re.elementType,re.instanceOf,re.oneOf,re.oneOfType),fe=re.arrayOf;re.objectOf,re.shape,re.exact;function de(e,t){return r=t,o=function(n){return e.forEach((function(e){return function(e,n){return"function"==typeof e?e(n):e&&(e.current=n),e}(e,n)}))},(a=n.useState((function(){return{value:r,callback:o,facade:{get current(){return a.value},set current(e){var n=a.value;n!==e&&(a.value=e,a.callback(e,n))}}}}))[0]).callback=o,a.facade;var r,o,a}var pe={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},me=function(e){var t=e.children;return n.createElement(n.Fragment,null,n.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:pe}),t,t&&n.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:pe}))};me.propTypes="production"!==process.env.NODE_ENV?{children:re.node}:{},me.defaultProps={children:null}; | ||
/*! ***************************************************************************** | ||
@@ -25,2 +25,2 @@ Copyright (c) Microsoft Corporation. All rights reserved. | ||
***************************************************************************** */ | ||
var me=function(){return(me=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function ye(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}function he(e){return e}function be(e,n){void 0===n&&(n=he);var t=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(e){var o=n(e,r);return t.push(o),function(){t=t.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;t.length;){var n=t;t=[],n.forEach(e)}t={push:function(n){return e(n)},filter:function(){return t}}},assignMedium:function(e){r=!0;var n=[];if(t.length){var o=t;t=[],o.forEach(e),n=t}var a=function(){var t=n;n=[],t.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),t={push:function(e){n.push(e),i()},filter:function(e){return n=n.filter(e),t}}}}}function ge(e,n){return void 0===n&&(n=he),be(e,n)}function we(e){void 0===e&&(e={});var n=be(null);return n.options=me({async:!0,ssr:!1},e),n}var Ee=function(e){var t=e.sideCar,r=ye(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return n.createElement(o,me({},r))};Ee.isSideCarExport=!0;var Oe=ge({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),Se=ge(),xe=ge(),Ne=we({async:!0}),Ce=[],ke=n.forwardRef((function(e,t){var r,o=n.useState(),a=o[0],i=o[1],u=n.useRef(),c=n.useRef(!1),l=n.useRef(null),s=e.children,f=e.disabled,d=e.noFocusGuards,v=e.persistentFocus,m=e.crossFrame,y=e.autoFocus,h=e.allowTextSelection,b=e.group,g=e.className,w=e.whiteList,E=e.shards,O=void 0===E?Ce:E,S=e.as,x=void 0===S?"div":S,N=e.lockProps,C=void 0===N?{}:N,k=e.sideCar,P=e.returnFocus,T=e.onActivation,j=e.onDeactivation,D=n.useState({})[0],_=n.useCallback((function(){l.current=l.current||document&&document.activeElement,u.current&&T&&T(u.current),c.current=!0}),[T]),R=n.useCallback((function(){c.current=!1,j&&j(u.current)}),[j]),I=n.useCallback((function(e){var n=l.current;if(Boolean(P)&&n&&n.focus){var t="object"==typeof P?P:void 0;l.current=null,e?Promise.resolve().then((function(){return n.focus(t)})):n.focus(t)}}),[P]),M=n.useCallback((function(e){c.current&&Oe.useMedium(e)}),[]),F=Se.useMedium,A=n.useCallback((function(e){u.current!==e&&(u.current=e,i(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==h&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),n.useEffect((function(){u.current||console.error("FocusLock: could not obtain ref to internal node")}),[]));var $=p(((r={})["data-focus-lock-disabled"]=f&&"disabled",r["data-focus-lock"]=b,r),C),L=!0!==d,V=L&&"tail"!==d,B=de([t,A]);return n.createElement(n.Fragment,null,L&&[n.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:f?-1:0,style:pe}),n.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:f?-1:1,style:pe})],!f&&n.createElement(k,{id:D,sideCar:Ne,observed:a,disabled:f,persistentFocus:v,crossFrame:m,autoFocus:y,whiteList:w,shards:O,onActivation:_,onDeactivation:R,returnFocus:I}),n.createElement(x,p({ref:B},$,{className:g,onBlur:F,onFocus:M}),s),V&&n.createElement("div",{"data-focus-guard":!0,tabIndex:f?-1:0,style:pe}))}));ke.propTypes="production"!==process.env.NODE_ENV?{children:le,disabled:oe,returnFocus:se([oe,ie]),noFocusGuards:oe,allowTextSelection:oe,autoFocus:oe,persistentFocus:oe,crossFrame:oe,group:ue,className:ue,whiteList:ae,shards:fe(ce),as:se([ue,ae,ie]),lockProps:ie,onActivation:ae,onDeactivation:ae,sideCar:ce.isRequired}:{},ke.defaultProps={children:void 0,disabled:!1,returnFocus:!1,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var Pe=function(e){for(var n=Array(e.length),t=0;t<e.length;++t)n[t]=e[t];return n},Te=function(e){return Array.isArray(e)?e:[e]},je=function(e,n){var t=e.tabIndex-n.tabIndex,r=e.index-n.index;if(t){if(!e.tabIndex)return 1;if(!n.tabIndex)return-1}return t||r},De=function(e,n,t){return Pe(e).map((function(e,n){return{node:e,index:n,tabIndex:t&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!n||e.tabIndex>=0})).sort(je)},_e=["button:enabled:not([readonly])","select:enabled:not([readonly])","textarea:enabled:not([readonly])","input:enabled:not([readonly])","a[href]","area[href]","iframe","object","embed","[tabindex]","[contenteditable]","[autofocus]"],Re=_e.join(","),Ie=Re+", [data-focus-guard]",Me=function(e,n){return e.reduce((function(e,t){return e.concat(Pe(t.querySelectorAll(n?Ie:Re)),t.parentNode?Pe(t.parentNode.querySelectorAll(_e.join(","))).filter((function(e){return e===t})):[])}),[])},Fe=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.push(n),n.parentNode&&e(n.parentNode,t),t},Ae=function(e,n){for(var t=Fe(e),r=Fe(n),o=0;o<t.length;o+=1){var a=t[o];if(r.indexOf(a)>=0)return a}return!1},$e=function(e){return Pe(e).filter((function(e){return function e(n){return!n||n===document||n.nodeType===Node.DOCUMENT_NODE||!((t=window.getComputedStyle(n,null))&&t.getPropertyValue&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility")))&&e(n.parentNode);var t}(e)})).filter((function(e){return function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))}(e)}))},Le=function(e,n){return De($e(Me(e,n)),!0,n)},Ve=function(e){return $e((n=e.querySelectorAll("[data-autofocus-inside]"),Pe(n).map((function(e){return Me([e])})).reduce((function(e,n){return e.concat(n)}),[])));var n},Be=function(e){return"INPUT"===e.tagName&&"radio"===e.type},qe=function(e,n){return n.filter(Be).filter((function(n){return n.name===e.name})).filter((function(e){return e.checked}))[0]||e},We=function(e){return e[0]&&e.length>1&&Be(e[0])&&e[0].name?qe(e[0],e):e[0]},Ye=function(e,n){return e.length>1&&Be(e[n])&&e[n].name?e.indexOf(qe(e[n],e)):n},ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ue=function(e){return Te(e).filter(Boolean).reduce((function(e,n){var t=n.getAttribute("data-focus-lock");return e.push.apply(e,t?function e(n){for(var t=n.length,r=0;r<t;r+=1)for(var o=function(t){if(r!==t&&n[r].contains(n[t]))return{v:e(n.filter((function(e){return e!==n[t]})))}},a=0;a<t;a+=1){var i=o(a);if("object"===(void 0===i?"undefined":ze(i)))return i.v}return n}(Pe(function e(n){return n.parentNode?e(n.parentNode):n}(n).querySelectorAll('[data-focus-lock="'+t+'"]:not([data-focus-lock-disabled="disabled"])'))):[n]),e}),[])},Ge=function(e){return e&&e.dataset&&e.dataset.focusGuard},Xe=function(e){return!Ge(e)},Ze=function(e,n,t){var r=Te(e),o=Te(n),a=r[0],i=null;return o.filter(Boolean).forEach((function(e){i=Ae(i||e,e)||i,t.filter(Boolean).forEach((function(e){var n=Ae(a,e);n&&(i=!i||n.contains(i)?n:Ae(n,i))}))})),i},He=function(e,n){var t=document&&document.activeElement,r=Ue(e).filter(Xe),o=Ze(t||e,e,r),a=Le(r).filter((function(e){var n=e.node;return Xe(n)}));if(a[0]||(a=(i=r,De($e(Me(i)),!1)).filter((function(e){var n=e.node;return Xe(n)})))[0]){var i,u,c,l,s,f=Le([o]).map((function(e){return e.node})),d=(u=f,c=a,l=new Map,c.forEach((function(e){return l.set(e.node,e)})),u.map((function(e){return l.get(e)})).filter(Boolean)),p=d.map((function(e){return e.node})),v=function(e,n,t,r,o){var a=e.length,i=e[0],u=e[a-1],c=Ge(t);if(!(e.indexOf(t)>=0)){var l=n.indexOf(t),s=n.indexOf(r||l),f=e.indexOf(r),d=l-s,p=n.indexOf(i),v=n.indexOf(u),m=Ye(e,0),y=Ye(e,a-1);return-1===l||-1===f?e.indexOf(o&&o.length?We(o):We(e)):!d&&f>=0?f:l<=p&&c&&Math.abs(d)>1?y:l>=p&&c&&Math.abs(d)>1?m:d&&Math.abs(d)>1?f:l<=p?y:l>v?m:d?Math.abs(d)>1?f:(a+f+d)%a:void 0}}(p,f,t,n,p.filter((s=function(e){return e.reduce((function(e,n){return e.concat(Ve(n))}),[])}(r),function(e){return!!e.autofocus||e.dataset&&!!e.dataset.autofocus||s.indexOf(e)>=0})));return void 0===v?v:d[v]}},Ke=function(e){return e===document.activeElement},Je=function(e){var n=document&&document.activeElement;return!(!n||n.dataset&&n.dataset.focusGuard)&&Ue(e).reduce((function(e,t){return e||t.contains(n)||function(e){return n=Pe(e.querySelectorAll("iframe")),t=Ke,!!n.filter((function(e){return e===t}))[0];var n,t}(t)}),!1)},Qe=0,en=!1,nn=function(e,n){var t,r=He(e,n);if(!en&&r){if(Qe>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),en=!0,void setTimeout((function(){en=!1}),1);Qe++,(t=r.node).focus(),t.contentWindow&&t.contentWindow.focus(),Qe--}};function tn(e){var n=window.setImmediate;void 0!==n?n(e):setTimeout(e,1)}var rn=function(){return document&&document.activeElement===document.body||document&&Pe(document.querySelectorAll("[data-no-focus-lock]")).some((function(e){return e.contains(document.activeElement)}))},on=null,an=null,un=null,cn=!1,ln=function(){return!0};function sn(e,n,t,r){var o=null,a=e;do{var i=r[a];if(i.guard)i.node.dataset.focusAutoGuard&&(o=i);else{if(!i.lockItem)break;if(a!==e)return;o=null}}while((a+=t)!==n);o&&(o.node.tabIndex=0)}var fn=function(e){return e&&"current"in e?e.current:e},dn=function(){var e,n,t,r,o,a,i=!1;if(on){var u=on,c=u.observed,l=u.persistentFocus,s=u.autoFocus,f=u.shards,d=u.crossFrame,p=c||un&&un.portaledElement,v=document&&document.activeElement;if(p){var m=[p].concat(f.map(fn).filter(Boolean));if(v&&!function(e){return(on.whiteList||ln)(e)}(v)||(l||(d?Boolean(cn):"meanwhile"===cn)||!rn()||!an&&s)&&(!p||Je(m)||(a=v,un&&un.portaledElement===a)||(document&&!an&&v&&!s?(v.blur(),document.body.focus()):(i=nn(m,an),un={})),cn=!1,an=document&&document.activeElement),document){var y=document&&document.activeElement,h=(n=Ue(e=m).filter(Xe),t=Ze(e,e,n),r=Le([t],!0),o=Le(n).filter((function(e){var n=e.node;return Xe(n)})).map((function(e){return e.node})),r.map((function(e){var n=e.node;return{node:n,index:e.index,lockItem:o.indexOf(n)>=0,guard:Ge(n)}}))),b=h.find((function(e){return e.node===y}));if(b){h.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")}));var g=h.indexOf(b);sn(g,h.length,1,h),sn(g,-1,-1,h)}}}}return i},pn=function(e){dn()&&e&&(e.stopPropagation(),e.preventDefault())},vn=function(){return tn(dn)},mn=function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(un={observerNode:t,portaledElement:n})};"production"!==process.env.NODE_ENV&&re.node.isRequired;var yn=function(){cn="just",setTimeout((function(){cn="meanwhile"}),0)};Oe.assignSyncMedium(mn),Se.assignMedium(vn),xe.assignMedium((function(e){return e({moveFocusInside:nn,focusInside:Je})}));var hn=function(e,r){if("production"!==process.env.NODE_ENV){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof r)throw new Error("Expected handleStateChangeOnClient to be a function.")}return function(o){if("production"!==process.env.NODE_ENV&&"function"!=typeof o)throw new Error("Expected WrappedComponent to be a React component.");var a,i=[];function u(){a=e(i.map((function(e){return e.props}))),r(a)}var c,l,s,f=function(e){var n,r;function c(){return e.apply(this,arguments)||this}r=e,(n=c).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,c.peek=function(){return a};var l=c.prototype;return l.componentDidMount=function(){i.push(this),u()},l.componentDidUpdate=function(){u()},l.componentWillUnmount=function(){var e=i.indexOf(this);i.splice(e,1),u()},l.render=function(){return t.createElement(o,this.props)},c}(n.PureComponent);return c=f,l="displayName",s="SideEffect("+function(e){return e.displayName||e.name||"Component"}(o)+")",l in c?Object.defineProperty(c,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):c[l]=s,f}}((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var n=e.slice(-1)[0];n&&!on&&(document.addEventListener("focusin",pn,!0),document.addEventListener("focusout",vn),window.addEventListener("blur",yn));var t=on,r=t&&n&&n.id===t.id;on=n,t&&!r&&(t.onDeactivation(),e.filter((function(e){return e.id===t.id})).length||t.returnFocus(!n)),n?(an=null,r&&t.observed===n.observed||n.onActivation(),dn(),tn(dn)):(document.removeEventListener("focusin",pn,!0),document.removeEventListener("focusout",vn),window.removeEventListener("blur",yn),an=null)}))((function(){return null})),bn=n.forwardRef((function(e,t){return n.createElement(ke,p({sideCar:hn,ref:t},e))})),gn=ke.propTypes||{},wn=(gn.sideCar,function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(gn,["sideCar"]));bn.propTypes=wn;var En=we(),On=function(){},Sn=n.forwardRef((function(e,t){var r=n.useRef(null),o=n.useState({onScrollCapture:On,onWheelCapture:On,onTouchMoveCapture:On}),a=o[0],i=o[1],u=e.forwardProps,c=e.children,l=e.className,s=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,v=e.noIsolation,m=e.inert,y=e.allowPinchZoom,h=ye(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom"]),b=p,g=me({ref:de([r,t])},h,a);return n.createElement(n.Fragment,null,f&&n.createElement(b,{sideCar:En,removeScrollBar:s,shards:d,noIsolation:v,inert:m,setCallbacks:i,allowPinchZoom:!!y,lockRef:r}),u?n.cloneElement(n.Children.only(c),g):n.createElement("div",me({},g,{className:l}),c))}));Sn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Sn.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};function xn(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return n&&e.setAttribute("nonce",n),e}var Nn=function(){var e=0,n=null;return{add:function(t){var r,o;0==e&&(n=xn())&&(o=t,(r=n).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(n)),e++},remove:function(){!--e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},Cn=function(){var e,t=(e=Nn(),function(t){n.useEffect((function(){return e.add(t),function(){e.remove()}}),[])});return function(e){var n=e.styles;return t(n),null}},kn={left:0,top:0,right:0,gap:0},Pn=function(e){return parseInt(e||"",10)||0},Tn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return kn;var n=function(e){var n=window.getComputedStyle(document.body),t=n["padding"===e?"paddingLeft":"marginLeft"],r=n["padding"===e?"paddingTop":"marginTop"],o=n["padding"===e?"paddingRight":"marginRight"];return[Pn(t),Pn(r),Pn(o)]}(e),t=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-t+n[2]-n[0])}},jn=Cn(),Dn=function(e,n,t,r){var o=e.left,a=e.top,i=e.right,u=e.gap;return void 0===t&&(t="margin"),"\n .with-scroll-bars-hidden {\n overflow: hidden "+r+";\n padding-right: "+u+"px "+r+";\n }\n body {\n overflow: hidden "+r+";\n "+[n&&"position: relative "+r+";","margin"===t&&"\n padding-left: "+o+"px;\n padding-top: "+a+"px;\n padding-right: "+i+"px;\n margin-left:0;\n margin-top:0;\n margin-right: "+u+"px "+r+";\n ","padding"===t&&"padding-right: "+u+"px "+r+";"].filter(Boolean).join("")+"\n }\n \n .right-scroll-bar-position {\n right: "+u+"px "+r+";\n }\n \n .width-before-scroll-bar {\n margin-right: "+u+"px "+r+";\n }\n \n .right-scroll-bar-position .right-scroll-bar-position {\n right: 0 "+r+";\n }\n \n .width-before-scroll-bar .width-before-scroll-bar {\n margin-right: 0 "+r+";\n }\n"},_n=function(e){var t=n.useState(Tn(e.gapMode)),r=t[0],o=t[1];n.useEffect((function(){o(Tn(e.gapMode))}),[e.gapMode]);var a=e.noRelative,i=e.noImportant,u=e.gapMode,c=void 0===u?"margin":u;return n.createElement(jn,{styles:Dn(r,!a,c,i?"":"!important")})},Rn=function(e,n){var t=n;do{if(In(e,t)){var r=Mn(e,t);if(r[1]>r[2])return!0}t=t.parentNode}while(t&&t!==document.body);return!1},In=function(e,n){return"v"===e?function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowY&&!(n.overflowY===n.overflowX&&"visible"===n.overflowY)}(n):function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowX&&!(n.overflowY===n.overflowX&&"visible"===n.overflowX)}(n)},Mn=function(e,n){return"v"===e?[(t=n).scrollTop,t.scrollHeight,t.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(n);var t},Fn=!1;if("undefined"!=typeof window)try{var An=Object.defineProperty({},"passive",{get:function(){return Fn=!0,!0}});window.addEventListener("test",An,An),window.removeEventListener("test",An,An)}catch(e){Fn=!1}var $n=!!Fn&&{passive:!1},Ln=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Vn=function(e){return[e.deltaX,e.deltaY]},Bn=function(e){return e&&"current"in e?e.current:e},qn=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},Wn=0,Yn=[];var zn,Un=(zn=function(e){var t=n.useRef([]),r=n.useRef([0,0]),o=n.useRef(),a=n.useState(Wn++)[0],i=n.useState((function(){return Cn()}))[0],u=n.useRef(e);n.useEffect((function(){u.current=e}),[e]),n.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-"+a);var n=[e.lockRef.current].concat((e.shards||[]).map(Bn)).filter(Boolean);return n.forEach((function(e){return e.classList.add("allow-interactivity-"+a)})),function(){document.body.classList.remove("block-interactivity-"+a),n.forEach((function(e){return e.classList.remove("allow-interactivity-"+a)}))}}}),[e.inert,e.lockRef.current,e.shards]);var c=n.useCallback((function(e,n){if("touches"in e&&2===e.touches.length)return!u.current.allowPinchZoom;var t,a=Ln(e),i=r.current,c="deltaX"in e?e.deltaX:i[0]-a[0],l="deltaY"in e?e.deltaY:i[1]-a[1],s=e.target,f=Math.abs(c)>Math.abs(l)?"h":"v",d=Rn(f,s);if(!d)return!0;if(d?t=f:(t="v"===f?"h":"v",d=Rn(f,s)),!d)return!1;if(!o.current&&"changedTouches"in e&&(c||l)&&(o.current=t),!t)return!0;var p=o.current||t;return function(e,n,t,r,o){var a=r,i=t.target,u=n.contains(i),c=!1,l=a>0,s=0,f=0;do{var d=Mn(e,i),p=d[0],v=d[1]-d[2]-p;(p||v)&&In(e,i)&&(s+=v,f+=p),i=i.parentNode}while(!u&&i!==document.body||u&&(n.contains(i)||n===i));return(l&&(o&&0===s||!o&&a>s)||!l&&(o&&0===f||!o&&-a>f))&&(c=!0),c}(p,n,e,"h"==p?c:l,!0)}),[]),l=n.useCallback((function(e){var n=e;if(Yn.length&&Yn[Yn.length-1]===i){var r="deltaY"in n?Vn(n):Ln(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&function(e,n){return e[0]===n[0]&&e[1]===n[1]}(e.delta,r)}))[0];if(o&&o.should)n.preventDefault();else if(!o){var a=(u.current.shards||[]).map(Bn).filter(Boolean).filter((function(e){return e.contains(n.target)}));(a.length>0?c(n,a[0]):!u.current.noIsolation)&&n.preventDefault()}}}),[]),s=n.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),f=n.useCallback((function(e){r.current=Ln(e),o.current=void 0}),[]),d=n.useCallback((function(n){s(n.type,Vn(n),n.target,c(n,e.lockRef.current))}),[]),p=n.useCallback((function(n){s(n.type,Ln(n),n.target,c(n,e.lockRef.current))}),[]);n.useEffect((function(){return Yn.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,$n),document.addEventListener("touchmove",l,$n),document.addEventListener("touchstart",f,$n),function(){Yn=Yn.filter((function(e){return e!==i})),document.removeEventListener("wheel",l,$n),document.removeEventListener("touchmove",l,$n),document.removeEventListener("touchstart",f,$n)}}),[]);var v=e.removeScrollBar,m=e.inert;return n.createElement(n.Fragment,null,m?n.createElement(i,{styles:qn(a)}):null,v?n.createElement(_n,{gapMode:"margin"}):null)},En.useMedium(zn),Ee),Gn=n.forwardRef((function(e,t){return n.createElement(Sn,me({},e,{ref:t,sideCar:Un}))}));function Xn(){return(Xn=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Zn(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}Gn.classNames=Sn.classNames;var Hn={initialFocusRef:function(){return null},allowPinchZoom:re.bool,onDismiss:re.func},Kn=n.forwardRef((function(e,r){var o=e.isOpen,a=void 0===o||o,u=Zn(e,["isOpen"]);return n.useEffect((function(){return i("dialog")}),[]),a?t.createElement(d,{"data-reach-dialog-wrapper":""},t.createElement(Jn,Object.assign({ref:r},u))):null}));"production"!==process.env.NODE_ENV&&(Kn.displayName="DialogOverlay",Kn.propTypes=Xn({},Hn,{isOpen:re.bool}));var Jn=n.forwardRef((function(e,r){var o=e.allowPinchZoom,a=e.initialFocusRef,i=e.onClick,u=e.onDismiss,d=void 0===u?s:u,p=e.onMouseDown,v=e.onKeyDown,m=Zn(e,["allowPinchZoom","initialFocusRef","onClick","onDismiss","onMouseDown","onKeyDown"]),y=n.useRef(null),h=n.useRef(null),b=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.useMemo((function(){return t.every((function(e){return null==e}))?null:function(e){t.forEach((function(n){c(n,e)}))}}),t)}(h,r),g=n.useCallback((function(){a&&a.current&&a.current.focus()}),[a]);return n.useEffect((function(){return h.current?function(e){var n=[],t=[],r=(o=e,(o&&o.ownerDocument?o.ownerDocument:l()?document:null)||document);var o;if(!e)return"production"!==process.env.NODE_ENV&&console.warn("A ref has not yet been attached to a dialog node when attempting to call `createAriaHider`."),s;return Array.prototype.forEach.call(r.querySelectorAll("body > *"),(function(r){var o,a;if(r!==(null===(o=e.parentNode)||void 0===o||null===(a=o.parentNode)||void 0===a?void 0:a.parentNode)){var i=r.getAttribute("aria-hidden");null!==i&&"false"!==i||(n.push(i),t.push(r),r.setAttribute("aria-hidden","true"))}})),function(){t.forEach((function(e,t){var r=n[t];null===r?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r)}))}}(h.current):void 0}),[]),t.createElement(bn,{autoFocus:!0,returnFocus:!0,onActivation:g},t.createElement(Gn,{allowPinchZoom:o},t.createElement("div",Object.assign({},m,{ref:b,"data-reach-dialog-overlay":"",onClick:f(i,(function(e){y.current===e.target&&(e.stopPropagation(),d(e))})),onKeyDown:f(v,(function(e){"Escape"===e.key&&(e.stopPropagation(),d(e))})),onMouseDown:f(p,(function(e){y.current=e.target}))}))))}));"production"!==process.env.NODE_ENV&&(Kn.displayName="DialogOverlay",Kn.propTypes=Xn({},Hn));var Qn=n.forwardRef((function(e,n){var r=e.onClick,o=Zn(e,["onClick","onKeyDown"]);return t.createElement("div",Object.assign({"aria-modal":"true",role:"dialog",tabIndex:-1},o,{ref:n,"data-reach-dialog-content":"",onClick:f(r,(function(e){e.stopPropagation()}))}))}));"production"!==process.env.NODE_ENV&&(Qn.displayName="DialogContent",Qn.propTypes={"aria-label":nt,"aria-labelledby":nt});var et=n.forwardRef((function(e,n){var r=e.isOpen,o=e.onDismiss,a=void 0===o?s:o,i=e.initialFocusRef,u=Zn(e,["isOpen","onDismiss","initialFocusRef"]);return t.createElement(Kn,{initialFocusRef:i,isOpen:r,onDismiss:a},t.createElement(Qn,Object.assign({ref:n},u)))}));function nt(e,n,t,r,o){var a="\nSee https://www.w3.org/TR/wai-aria/#aria-label for details.";return e["aria-label"]||e["aria-labelledby"]?e["aria-label"]&&e["aria-labelledby"]?new Error("You provided both `aria-label` and `aria-labelledby` props to a <"+t+">. If the a label for this component is visible on the screen, that label's component should be given a unique ID prop, and that ID should be passed as the `aria-labelledby` prop into <"+t+">. If the label cannot be determined programmatically from the content of the element, an alternative label should be provided as the `aria-label` prop, which will be used as an `aria-label` on the HTML tag."+a):null!=e[n]&&"string"!=typeof e[n]?new Error("Invalid prop `"+n+"` supplied to `"+t+"`. Expected `string`, received `"+(Array.isArray(o)?"array":typeof o)+"`."):null:new Error("A <"+t+"> must have either an `aria-label` or `aria-labelledby` prop.\n "+a)}"production"!==process.env.NODE_ENV&&(et.displayName="Dialog",et.propTypes={isOpen:re.bool,onDismiss:re.func,"aria-label":nt,"aria-labelledby":nt}),exports.ModalDialogPrimitiveContent=Qn,exports.ModalDialogPrimitiveOverlay=Kn; | ||
var ve=function(){return(ve=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function ye(e,n){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&n.indexOf(r)<0&&(t[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)n.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(t[r[o]]=e[r[o]])}return t}function he(e){return e}function be(e,n){void 0===n&&(n=he);var t=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:e},useMedium:function(e){var o=n(e,r);return t.push(o),function(){t=t.filter((function(e){return e!==o}))}},assignSyncMedium:function(e){for(r=!0;t.length;){var n=t;t=[],n.forEach(e)}t={push:function(n){return e(n)},filter:function(){return t}}},assignMedium:function(e){r=!0;var n=[];if(t.length){var o=t;t=[],o.forEach(e),n=t}var a=function(){var t=n;n=[],t.forEach(e)},i=function(){return Promise.resolve().then(a)};i(),t={push:function(e){n.push(e),i()},filter:function(e){return n=n.filter(e),t}}}}}function ge(e,n){return void 0===n&&(n=he),be(e,n)}function we(e){void 0===e&&(e={});var n=be(null);return n.options=ve({async:!0,ssr:!1},e),n}var Ee=function(e){var t=e.sideCar,r=ye(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return n.createElement(o,ve({},r))};Ee.isSideCarExport=!0;var Oe=ge({},(function(e){return{target:e.target,currentTarget:e.currentTarget}})),Se=ge(),Ne=ge(),xe=we({async:!0}),Ce=[],ke=n.forwardRef((function(e,t){var r,o=n.useState(),a=o[0],i=o[1],u=n.useRef(),c=n.useRef(!1),l=n.useRef(null),s=e.children,f=e.disabled,d=e.noFocusGuards,m=e.persistentFocus,v=e.crossFrame,y=e.autoFocus,h=e.allowTextSelection,b=e.group,g=e.className,w=e.whiteList,E=e.shards,O=void 0===E?Ce:E,S=e.as,N=void 0===S?"div":S,x=e.lockProps,C=void 0===x?{}:x,k=e.sideCar,P=e.returnFocus,T=e.onActivation,_=e.onDeactivation,D=n.useState({})[0],j=n.useCallback((function(){l.current=l.current||document&&document.activeElement,u.current&&T&&T(u.current),c.current=!0}),[T]),F=n.useCallback((function(){c.current=!1,_&&_(u.current)}),[_]),R=n.useCallback((function(e){var n=l.current;if(Boolean(P)&&n&&n.focus){var t="object"==typeof P?P:void 0;l.current=null,e?Promise.resolve().then((function(){return n.focus(t)})):n.focus(t)}}),[P]),I=n.useCallback((function(e){c.current&&Oe.useMedium(e)}),[]),M=Se.useMedium,A=n.useCallback((function(e){u.current!==e&&(u.current=e,i(e))}),[]);"production"!==process.env.NODE_ENV&&(void 0!==h&&console.warn("React-Focus-Lock: allowTextSelection is deprecated and enabled by default"),n.useEffect((function(){u.current||console.error("FocusLock: could not obtain ref to internal node")}),[]));var L=p(((r={})["data-focus-lock-disabled"]=f&&"disabled",r["data-focus-lock"]=b,r),C),$=!0!==d,V=$&&"tail"!==d,B=de([t,A]);return n.createElement(n.Fragment,null,$&&[n.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:f?-1:0,style:pe}),n.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:f?-1:1,style:pe})],!f&&n.createElement(k,{id:D,sideCar:xe,observed:a,disabled:f,persistentFocus:m,crossFrame:v,autoFocus:y,whiteList:w,shards:O,onActivation:j,onDeactivation:F,returnFocus:R}),n.createElement(N,p({ref:B},L,{className:g,onBlur:M,onFocus:I}),s),V&&n.createElement("div",{"data-focus-guard":!0,tabIndex:f?-1:0,style:pe}))}));ke.propTypes="production"!==process.env.NODE_ENV?{children:le,disabled:oe,returnFocus:se([oe,ie]),noFocusGuards:oe,allowTextSelection:oe,autoFocus:oe,persistentFocus:oe,crossFrame:oe,group:ue,className:ue,whiteList:ae,shards:fe(ce),as:se([ue,ae,ie]),lockProps:ie,onActivation:ae,onDeactivation:ae,sideCar:ce.isRequired}:{},ke.defaultProps={children:void 0,disabled:!1,returnFocus:!1,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var Pe=function(e){for(var n=Array(e.length),t=0;t<e.length;++t)n[t]=e[t];return n},Te=function(e){return Array.isArray(e)?e:[e]},_e=function(e,n){var t=e.tabIndex-n.tabIndex,r=e.index-n.index;if(t){if(!e.tabIndex)return 1;if(!n.tabIndex)return-1}return t||r},De=function(e,n,t){return Pe(e).map((function(e,n){return{node:e,index:n,tabIndex:t&&-1===e.tabIndex?(e.dataset||{}).focusGuard?0:-1:e.tabIndex}})).filter((function(e){return!n||e.tabIndex>=0})).sort(_e)},je=["button:enabled:not([readonly])","select:enabled:not([readonly])","textarea:enabled:not([readonly])","input:enabled:not([readonly])","a[href]","area[href]","iframe","object","embed","[tabindex]","[contenteditable]","[autofocus]"],Fe=je.join(","),Re=Fe+", [data-focus-guard]",Ie=function(e,n){return e.reduce((function(e,t){return e.concat(Pe(t.querySelectorAll(n?Re:Fe)),t.parentNode?Pe(t.parentNode.querySelectorAll(je.join(","))).filter((function(e){return e===t})):[])}),[])},Me=function e(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return t.push(n),n.parentNode&&e(n.parentNode,t),t},Ae=function(e,n){for(var t=Me(e),r=Me(n),o=0;o<t.length;o+=1){var a=t[o];if(r.indexOf(a)>=0)return a}return!1},Le=function(e){return Pe(e).filter((function(e){return function e(n){return!n||n===document||n.nodeType===Node.DOCUMENT_NODE||!((t=window.getComputedStyle(n,null))&&t.getPropertyValue&&("none"===t.getPropertyValue("display")||"hidden"===t.getPropertyValue("visibility")))&&e(n.parentNode&&n.parentNode.nodeType===n.DOCUMENT_FRAGMENT_NODE?n.parentNode.host:n.parentNode);var t}(e)})).filter((function(e){return function(e){return!(("INPUT"===e.tagName||"BUTTON"===e.tagName)&&("hidden"===e.type||e.disabled))}(e)}))},$e=function(e,n){return De(Le(Ie(e,n)),!0,n)},Ve=function(e){return De(Le(Ie(e)),!1)},Be=function(e){return Le((n=e.querySelectorAll("[data-autofocus-inside]"),Pe(n).map((function(e){return Ie([e])})).reduce((function(e,n){return e.concat(n)}),[])));var n},We=function(e){return"INPUT"===e.tagName&&"radio"===e.type},qe=function(e,n){return We(e)&&e.name?function(e,n){return n.filter(We).filter((function(n){return n.name===e.name})).filter((function(e){return e.checked}))[0]||e}(e,n):e},Ye=function(e){return e[0]&&e.length>1?qe(e[0],e):e[0]},Ue=function(e,n){return e.length>1?e.indexOf(qe(e[n],e)):n},ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ze=function(e){return Te(e).filter(Boolean).reduce((function(e,n){var t=n.getAttribute("data-focus-lock");return e.push.apply(e,t?function e(n){for(var t=n.length,r=0;r<t;r+=1)for(var o=function(t){if(r!==t&&n[r].contains(n[t]))return{v:e(n.filter((function(e){return e!==n[t]})))}},a=0;a<t;a+=1){var i=o(a);if("object"===(void 0===i?"undefined":ze(i)))return i.v}return n}(Pe(function e(n){return n.parentNode?e(n.parentNode):n}(n).querySelectorAll('[data-focus-lock="'+t+'"]:not([data-focus-lock-disabled="disabled"])'))):[n]),e}),[])},Ge=function(e){return e&&e.dataset&&e.dataset.focusGuard},Xe=function(e){return!Ge(e)},He=function(e,n,t,r){var o=e.length,a=e[0],i=e[o-1],u=Ge(t);if(!(e.indexOf(t)>=0)){var c,l,s=n.indexOf(t),f=n.indexOf(r||s),d=e.indexOf(r),p=s-f,m=n.indexOf(a),v=n.indexOf(i),y=(c=n,l=new Set,c.forEach((function(e){return l.add(qe(e,c))})),c.filter((function(e){return l.has(e)}))),h=y.indexOf(t)-y.indexOf(r||s),b=Ue(e,0),g=Ue(e,o-1);return-1===s||-1===d?"NEW_FOCUS":!p&&d>=0?d:s<=m&&u&&Math.abs(p)>1?g:s>=v&&u&&Math.abs(p)>1?b:p&&Math.abs(h)>1?d:s<=m?g:s>v?b:p?Math.abs(p)>1?d:(o+d+p)%o:void 0}},Ke=function(e,n,t){var r=Te(e),o=Te(n),a=r[0],i=null;return o.filter(Boolean).forEach((function(e){i=Ae(i||e,e)||i,t.filter(Boolean).forEach((function(e){var n=Ae(a,e);n&&(i=!i||n.contains(i)?n:Ae(n,i))}))})),i},Je=function(e,n){var t=document&&document.activeElement,r=Ze(e).filter(Xe),o=Ke(t||e,e,r),a=Ve(r),i=$e(r).filter((function(e){var n=e.node;return Xe(n)}));if(i[0]||(i=a)[0]){var u,c,l,s,f=Ve([o]).map((function(e){return e.node})),d=(u=f,c=i,l=new Map,c.forEach((function(e){return l.set(e.node,e)})),u.map((function(e){return l.get(e)})).filter(Boolean)),p=d.map((function(e){return e.node})),m=He(p,f,t,n);if("NEW_FOCUS"===m){var v=a.map((function(e){return e.node})).filter((s=function(e){return e.reduce((function(e,n){return e.concat(Be(n))}),[])}(r),function(e){return!!e.autofocus||e.dataset&&!!e.dataset.autofocus||s.indexOf(e)>=0}));return{node:v&&v.length?Ye(v):Ye(p)}}return void 0===m?m:d[m]}},Qe=function(e){return e===document.activeElement},en=function(e){var n=document&&document.activeElement;return!(!n||n.dataset&&n.dataset.focusGuard)&&Ze(e).reduce((function(e,t){return e||t.contains(n)||function(e){return n=Pe(e.querySelectorAll("iframe")),t=Qe,!!n.filter((function(e){return e===t}))[0];var n,t}(t)}),!1)},nn=0,tn=!1,rn=function(e,n){var t,r=Je(e,n);if(!tn&&r){if(nn>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),tn=!0,void setTimeout((function(){tn=!1}),1);nn++,(t=r.node).focus(),t.contentWindow&&t.contentWindow.focus(),nn--}};function on(e){var n=window.setImmediate;void 0!==n?n(e):setTimeout(e,1)}var an=function(){return document&&document.activeElement===document.body||document&&Pe(document.querySelectorAll("[data-no-focus-lock]")).some((function(e){return e.contains(document.activeElement)}))},un=null,cn=null,ln=null,sn=!1,fn=function(){return!0};function dn(e,n,t,r){var o=null,a=e;do{var i=r[a];if(i.guard)i.node.dataset.focusAutoGuard&&(o=i);else{if(!i.lockItem)break;if(a!==e)return;o=null}}while((a+=t)!==n);o&&(o.node.tabIndex=0)}var pn=function(e){return e&&"current"in e?e.current:e},mn=function(){var e,n,t,r,o,a,i=!1;if(un){var u=un,c=u.observed,l=u.persistentFocus,s=u.autoFocus,f=u.shards,d=u.crossFrame,p=c||ln&&ln.portaledElement,m=document&&document.activeElement;if(p){var v=[p].concat(f.map(pn).filter(Boolean));if(m&&!function(e){return(un.whiteList||fn)(e)}(m)||(l||(d?Boolean(sn):"meanwhile"===sn)||!an()||!cn&&s)&&(!p||en(v)||(a=m,ln&&ln.portaledElement===a)||(document&&!cn&&m&&!s?(m.blur&&m.blur(),document.body.focus()):(i=rn(v,cn),ln={})),sn=!1,cn=document&&document.activeElement),document){var y=document&&document.activeElement,h=(n=Ze(e=v).filter(Xe),t=Ke(e,e,n),r=$e([t],!0),o=$e(n).filter((function(e){var n=e.node;return Xe(n)})).map((function(e){return e.node})),r.map((function(e){var n=e.node;return{node:n,index:e.index,lockItem:o.indexOf(n)>=0,guard:Ge(n)}}))),b=h.map((function(e){return e.node})).indexOf(y);b>-1&&(h.filter((function(e){var n=e.guard,t=e.node;return n&&t.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),dn(b,h.length,1,h),dn(b,-1,-1,h))}}}return i},vn=function(e){mn()&&e&&(e.stopPropagation(),e.preventDefault())},yn=function(){return on(mn)},hn=function(e){var n=e.target,t=e.currentTarget;t.contains(n)||(ln={observerNode:t,portaledElement:n})};"production"!==process.env.NODE_ENV&&re.node.isRequired;var bn=function(){sn="just",setTimeout((function(){sn="meanwhile"}),0)};Oe.assignSyncMedium(hn),Se.assignMedium(yn),Ne.assignMedium((function(e){return e({moveFocusInside:rn,focusInside:en})}));var gn=function(e,r){if("production"!==process.env.NODE_ENV){if("function"!=typeof e)throw new Error("Expected reducePropsToState to be a function.");if("function"!=typeof r)throw new Error("Expected handleStateChangeOnClient to be a function.")}return function(o){if("production"!==process.env.NODE_ENV&&"function"!=typeof o)throw new Error("Expected WrappedComponent to be a React component.");var a,i=[];function u(){a=e(i.map((function(e){return e.props}))),r(a)}var c,l,s,f=function(e){var n,r;function c(){return e.apply(this,arguments)||this}r=e,(n=c).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,c.peek=function(){return a};var l=c.prototype;return l.componentDidMount=function(){i.push(this),u()},l.componentDidUpdate=function(){u()},l.componentWillUnmount=function(){var e=i.indexOf(this);i.splice(e,1),u()},l.render=function(){return t.createElement(o,this.props)},c}(n.PureComponent);return c=f,l="displayName",s="SideEffect("+function(e){return e.displayName||e.name||"Component"}(o)+")",l in c?Object.defineProperty(c,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):c[l]=s,f}}((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var n=e.slice(-1)[0];n&&!un&&(document.addEventListener("focusin",vn,!0),document.addEventListener("focusout",yn),window.addEventListener("blur",bn));var t=un,r=t&&n&&n.id===t.id;un=n,t&&!r&&(t.onDeactivation(),e.filter((function(e){return e.id===t.id})).length||t.returnFocus(!n)),n?(cn=null,r&&t.observed===n.observed||n.onActivation(),mn(),on(mn)):(document.removeEventListener("focusin",vn,!0),document.removeEventListener("focusout",yn),window.removeEventListener("blur",bn),cn=null)}))((function(){return null})),wn=n.forwardRef((function(e,t){return n.createElement(ke,p({sideCar:gn,ref:t},e))})),En=ke.propTypes||{},On=(En.sideCar,function(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}(En,["sideCar"]));wn.propTypes=On;var Sn=we(),Nn=function(){},xn=n.forwardRef((function(e,t){var r=n.useRef(null),o=n.useState({onScrollCapture:Nn,onWheelCapture:Nn,onTouchMoveCapture:Nn}),a=o[0],i=o[1],u=e.forwardProps,c=e.children,l=e.className,s=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,m=e.noIsolation,v=e.inert,y=e.allowPinchZoom,h=e.as,b=void 0===h?"div":h,g=ye(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),w=p,E=de([r,t]),O=ve({},g,a);return n.createElement(n.Fragment,null,f&&n.createElement(w,{sideCar:Sn,removeScrollBar:s,shards:d,noIsolation:m,inert:v,setCallbacks:i,allowPinchZoom:!!y,lockRef:r}),u?n.cloneElement(n.Children.only(c),ve({},O,{ref:E})):n.createElement(b,ve({},O,{className:l,ref:E}),c))}));xn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},xn.classNames={fullWidth:"width-before-scroll-bar",zeroRight:"right-scroll-bar-position"};function Cn(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return n&&e.setAttribute("nonce",n),e}var kn=function(){var e=0,n=null;return{add:function(t){var r,o;0==e&&(n=Cn())&&(o=t,(r=n).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(n)),e++},remove:function(){!--e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},Pn=function(){var e,t=(e=kn(),function(t){n.useEffect((function(){return e.add(t),function(){e.remove()}}),[])});return function(e){var n=e.styles;return t(n),null}},Tn={left:0,top:0,right:0,gap:0},_n=function(e){return parseInt(e||"",10)||0},Dn=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Tn;var n=function(e){var n=window.getComputedStyle(document.body),t=n["padding"===e?"paddingLeft":"marginLeft"],r=n["padding"===e?"paddingTop":"marginTop"],o=n["padding"===e?"paddingRight":"marginRight"];return[_n(t),_n(r),_n(o)]}(e),t=document.documentElement.clientWidth,r=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,r-t+n[2]-n[0])}},jn=Pn(),Fn=function(e,n,t,r){var o=e.left,a=e.top,i=e.right,u=e.gap;return void 0===t&&(t="margin"),"\n .with-scroll-bars-hidden {\n overflow: hidden "+r+";\n padding-right: "+u+"px "+r+";\n }\n body {\n overflow: hidden "+r+";\n "+[n&&"position: relative "+r+";","margin"===t&&"\n padding-left: "+o+"px;\n padding-top: "+a+"px;\n padding-right: "+i+"px;\n margin-left:0;\n margin-top:0;\n margin-right: "+u+"px "+r+";\n ","padding"===t&&"padding-right: "+u+"px "+r+";"].filter(Boolean).join("")+"\n }\n \n .right-scroll-bar-position {\n right: "+u+"px "+r+";\n }\n \n .width-before-scroll-bar {\n margin-right: "+u+"px "+r+";\n }\n \n .right-scroll-bar-position .right-scroll-bar-position {\n right: 0 "+r+";\n }\n \n .width-before-scroll-bar .width-before-scroll-bar {\n margin-right: 0 "+r+";\n }\n"},Rn=function(e){var t=n.useState(Dn(e.gapMode)),r=t[0],o=t[1];n.useEffect((function(){o(Dn(e.gapMode))}),[e.gapMode]);var a=e.noRelative,i=e.noImportant,u=e.gapMode,c=void 0===u?"margin":u;return n.createElement(jn,{styles:Fn(r,!a,c,i?"":"!important")})},In=function(e,n){var t=n;do{if(Mn(e,t)){var r=An(e,t);if(r[1]>r[2])return!0}t=t.parentNode}while(t&&t!==document.body);return!1},Mn=function(e,n){return"v"===e?function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowY&&!(n.overflowY===n.overflowX&&"visible"===n.overflowY)}(n):function(e){var n=window.getComputedStyle(e);return"hidden"!==n.overflowX&&!(n.overflowY===n.overflowX&&"visible"===n.overflowX)}(n)},An=function(e,n){return"v"===e?[(t=n).scrollTop,t.scrollHeight,t.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(n);var t},Ln=!1;if("undefined"!=typeof window)try{var $n=Object.defineProperty({},"passive",{get:function(){return Ln=!0,!0}});window.addEventListener("test",$n,$n),window.removeEventListener("test",$n,$n)}catch(e){Ln=!1}var Vn=!!Ln&&{passive:!1},Bn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Wn=function(e){return[e.deltaX,e.deltaY]},qn=function(e){return e&&"current"in e?e.current:e},Yn=function(e){return"\n .block-interactivity-"+e+" {pointer-events: none;}\n .allow-interactivity-"+e+" {pointer-events: all;}\n"},Un=0,zn=[];var Zn,Gn=(Zn=function(e){var t=n.useRef([]),r=n.useRef([0,0]),o=n.useRef(),a=n.useState(Un++)[0],i=n.useState((function(){return Pn()}))[0],u=n.useRef(e);n.useEffect((function(){u.current=e}),[e]),n.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-"+a);var n=[e.lockRef.current].concat((e.shards||[]).map(qn)).filter(Boolean);return n.forEach((function(e){return e.classList.add("allow-interactivity-"+a)})),function(){document.body.classList.remove("block-interactivity-"+a),n.forEach((function(e){return e.classList.remove("allow-interactivity-"+a)}))}}}),[e.inert,e.lockRef.current,e.shards]);var c=n.useCallback((function(e,n){if("touches"in e&&2===e.touches.length)return!u.current.allowPinchZoom;var t,a=Bn(e),i=r.current,c="deltaX"in e?e.deltaX:i[0]-a[0],l="deltaY"in e?e.deltaY:i[1]-a[1],s=e.target,f=Math.abs(c)>Math.abs(l)?"h":"v",d=In(f,s);if(!d)return!0;if(d?t=f:(t="v"===f?"h":"v",d=In(f,s)),!d)return!1;if(!o.current&&"changedTouches"in e&&(c||l)&&(o.current=t),!t)return!0;var p=o.current||t;return function(e,n,t,r,o){var a=r,i=t.target,u=n.contains(i),c=!1,l=a>0,s=0,f=0;do{var d=An(e,i),p=d[0],m=d[1]-d[2]-p;(p||m)&&Mn(e,i)&&(s+=m,f+=p),i=i.parentNode}while(!u&&i!==document.body||u&&(n.contains(i)||n===i));return(l&&(o&&0===s||!o&&a>s)||!l&&(o&&0===f||!o&&-a>f))&&(c=!0),c}(p,n,e,"h"===p?c:l,!0)}),[]),l=n.useCallback((function(e){var n=e;if(zn.length&&zn[zn.length-1]===i){var r="deltaY"in n?Wn(n):Bn(n),o=t.current.filter((function(e){return e.name===n.type&&e.target===n.target&&function(e,n){return e[0]===n[0]&&e[1]===n[1]}(e.delta,r)}))[0];if(o&&o.should)n.preventDefault();else if(!o){var a=(u.current.shards||[]).map(qn).filter(Boolean).filter((function(e){return e.contains(n.target)}));(a.length>0?c(n,a[0]):!u.current.noIsolation)&&n.preventDefault()}}}),[]),s=n.useCallback((function(e,n,r,o){var a={name:e,delta:n,target:r,should:o};t.current.push(a),setTimeout((function(){t.current=t.current.filter((function(e){return e!==a}))}),1)}),[]),f=n.useCallback((function(e){r.current=Bn(e),o.current=void 0}),[]),d=n.useCallback((function(n){s(n.type,Wn(n),n.target,c(n,e.lockRef.current))}),[]),p=n.useCallback((function(n){s(n.type,Bn(n),n.target,c(n,e.lockRef.current))}),[]);n.useEffect((function(){return zn.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Vn),document.addEventListener("touchmove",l,Vn),document.addEventListener("touchstart",f,Vn),function(){zn=zn.filter((function(e){return e!==i})),document.removeEventListener("wheel",l,Vn),document.removeEventListener("touchmove",l,Vn),document.removeEventListener("touchstart",f,Vn)}}),[]);var m=e.removeScrollBar,v=e.inert;return n.createElement(n.Fragment,null,v?n.createElement(i,{styles:Yn(a)}):null,m?n.createElement(Rn,{gapMode:"margin"}):null)},Sn.useMedium(Zn),Ee),Xn=n.forwardRef((function(e,t){return n.createElement(xn,ve({},e,{ref:t,sideCar:Gn}))}));function Hn(){return(Hn=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}function Kn(e,n){if(null==e)return{};var t,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)t=a[r],n.indexOf(t)>=0||(o[t]=e[t]);return o}Xn.classNames=xn.classNames;var Jn={allowPinchZoom:re.bool,dangerouslyBypassFocusLock:re.bool,dangerouslyBypassScrollLock:re.bool,initialFocusRef:function(){return null},onDismiss:re.func},Qn=n.forwardRef((function(e,r){var o=e.isOpen,a=void 0===o||o,u=Kn(e,["isOpen"]);return n.useEffect((function(){return i("dialog")}),[]),n.useEffect((function(){a?window.__REACH_DISABLE_TOOLTIPS=!0:window.requestAnimationFrame((function(){window.__REACH_DISABLE_TOOLTIPS=!1}))}),[a]),a?t.createElement(d,{"data-reach-dialog-wrapper":""},t.createElement(et,Object.assign({ref:r},u))):null}));"production"!==process.env.NODE_ENV&&(Qn.displayName="DialogOverlay",Qn.propTypes=Hn({},Jn,{isOpen:re.bool}));var et=n.forwardRef((function(e,r){var o=e.allowPinchZoom,a=e.dangerouslyBypassFocusLock,i=void 0!==a&&a,u=e.dangerouslyBypassScrollLock,d=void 0!==u&&u,p=e.initialFocusRef,m=e.onClick,v=e.onDismiss,y=void 0===v?s:v,h=e.onKeyDown,b=e.onMouseDown,g=e.unstable_lockFocusAcrossFrames,w=void 0===g||g,E=Kn(e,["allowPinchZoom","dangerouslyBypassFocusLock","dangerouslyBypassScrollLock","initialFocusRef","onClick","onDismiss","onKeyDown","onMouseDown","unstable_lockFocusAcrossFrames"]),O=n.useRef(null),S=n.useRef(null),N=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.useMemo((function(){return t.every((function(e){return null==e}))?null:function(e){t.forEach((function(n){c(n,e)}))}}),[].concat(t))}(S,r),x=n.useCallback((function(){p&&p.current&&p.current.focus()}),[p]);return n.useEffect((function(){return S.current?function(e){var n=[],t=[],r=(o=e,(o&&o.ownerDocument?o.ownerDocument:l()?document:null)||document);var o;if(!e)return"production"!==process.env.NODE_ENV&&console.warn("A ref has not yet been attached to a dialog node when attempting to call `createAriaHider`."),s;return Array.prototype.forEach.call(r.querySelectorAll("body > *"),(function(r){var o,a;if(r!==(null===(o=e.parentNode)||void 0===o||null===(a=o.parentNode)||void 0===a?void 0:a.parentNode)){var i=r.getAttribute("aria-hidden");null!==i&&"false"!==i||(n.push(i),t.push(r),r.setAttribute("aria-hidden","true"))}})),function(){t.forEach((function(e,t){var r=n[t];null===r?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",r)}))}}(S.current):void 0}),[]),t.createElement(wn,{autoFocus:!0,returnFocus:!0,onActivation:x,disabled:i,crossFrame:w},t.createElement(Xn,{allowPinchZoom:o,enabled:!d},t.createElement("div",Object.assign({},E,{ref:N,"data-reach-dialog-overlay":"",onClick:f(m,(function(e){O.current===e.target&&(e.stopPropagation(),y(e))})),onKeyDown:f(h,(function(e){"Escape"===e.key&&(e.stopPropagation(),y(e))})),onMouseDown:f(b,(function(e){O.current=e.target}))}))))}));"production"!==process.env.NODE_ENV&&(Qn.displayName="DialogOverlay",Qn.propTypes=Hn({},Jn));var nt=n.forwardRef((function(e,n){var r=e.onClick,o=(e.onKeyDown,Kn(e,["onClick","onKeyDown"]));return t.createElement("div",Object.assign({"aria-modal":"true",role:"dialog",tabIndex:-1},o,{ref:n,"data-reach-dialog-content":"",onClick:f(r,(function(e){e.stopPropagation()}))}))}));"production"!==process.env.NODE_ENV&&(nt.displayName="DialogContent",nt.propTypes={"aria-label":rt,"aria-labelledby":rt});var tt=n.forwardRef((function(e,n){var r=e.allowPinchZoom,o=void 0!==r&&r,a=e.initialFocusRef,i=e.isOpen,u=e.onDismiss,c=void 0===u?s:u,l=Kn(e,["allowPinchZoom","initialFocusRef","isOpen","onDismiss"]);return t.createElement(Qn,{allowPinchZoom:o,initialFocusRef:a,isOpen:i,onDismiss:c},t.createElement(nt,Object.assign({ref:n},l)))}));function rt(e,n,t,r,o){var a="\nSee https://www.w3.org/TR/wai-aria/#aria-label for details.";return e["aria-label"]||e["aria-labelledby"]?e["aria-label"]&&e["aria-labelledby"]?new Error("You provided both `aria-label` and `aria-labelledby` props to a <"+t+">. If the a label for this component is visible on the screen, that label's component should be given a unique ID prop, and that ID should be passed as the `aria-labelledby` prop into <"+t+">. If the label cannot be determined programmatically from the content of the element, an alternative label should be provided as the `aria-label` prop, which will be used as an `aria-label` on the HTML tag."+a):null!=e[n]&&"string"!=typeof e[n]?new Error("Invalid prop `"+n+"` supplied to `"+t+"`. Expected `string`, received `"+(Array.isArray(o)?"array":typeof o)+"`."):null:new Error("A <"+t+"> must have either an `aria-label` or `aria-labelledby` prop.\n "+a)}"production"!==process.env.NODE_ENV&&(tt.displayName="Dialog",tt.propTypes={isOpen:re.bool,onDismiss:re.func,"aria-label":rt,"aria-labelledby":rt}),exports.ModalDialogPrimitiveContent=nt,exports.ModalDialogPrimitiveOverlay=Qn; |
{ | ||
"name": "@twilio-paste/modal-dialog-primitive", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"category": "overlay", | ||
@@ -31,3 +31,3 @@ "status": "beta", | ||
"dependencies": { | ||
"@reach/dialog": "0.8.2" | ||
"@reach/dialog": "0.11.2" | ||
}, | ||
@@ -38,3 +38,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "a88611afc794b612cd55770fd8607ee75557757c" | ||
"gitHead": "66d2632f639d18e715d3c225e057fbeda04dbd2f" | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
93611
369
57
1
+ Added@reach/dialog@0.11.2(transitive)
+ Added@reach/portal@0.11.2(transitive)
+ Added@reach/utils@0.11.2(transitive)
+ Added@types/warning@3.0.3(transitive)
- Removed@reach/dialog@0.8.2(transitive)
- Removed@reach/portal@0.8.6(transitive)
- Removed@reach/utils@0.8.6(transitive)
- Removedtslib@1.14.1(transitive)
Updated@reach/dialog@0.11.2