@inertiaui/modal-react 0.6.1 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/inertiaui-modal.js +1141 -1129
- package/dist/inertiaui-modal.umd.cjs +12 -12
- package/package.json +1 -1
- package/src/ModalRoot.jsx +29 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(L,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react"),require("axios"),require("@inertiajs/react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","axios","@inertiajs/react","react-dom"],f):(L=typeof globalThis<"u"?globalThis:L||self,f(L.InertiaUIModal={},L.React,L.Axios,L.react,L.ReactDOM))})(this,function(L,f,ve,
|
|
1
|
+
(function(L,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react"),require("axios"),require("@inertiajs/react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","axios","@inertiajs/react","react-dom"],f):(L=typeof globalThis<"u"?globalThis:L||self,f(L.InertiaUIModal={},L.React,L.Axios,L.react,L.ReactDOM))})(this,function(L,f,ve,Ue,Jo){"use strict";var nc=Object.defineProperty;var oc=(L,f,ve)=>f in L?nc(L,f,{enumerable:!0,configurable:!0,writable:!0,value:ve}):L[f]=ve;var le=(L,f,ve)=>oc(L,typeof f!="symbol"?f+"":f,ve);function Qo(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const tr=Qo(f),nr={type:"modal",navigate:!1,modal:{closeButton:!0,closeExplicitly:!1,maxWidth:"2xl",paddingClasses:"p-4 sm:p-6",panelClasses:"bg-white rounded",position:"center"},slideover:{closeButton:!0,closeExplicitly:!1,maxWidth:"md",paddingClasses:"p-4 sm:p-6",panelClasses:"bg-white min-h-screen",position:"right"}};class Zo{constructor(){this.config={},this.reset()}reset(){this.config=JSON.parse(JSON.stringify(nr))}put(e,t){if(typeof e=="object"){this.config={type:e.type??nr.type,navigate:e.navigate??nr.navigate,modal:{...nr.modal,...e.modal??{}},slideover:{...nr.slideover,...e.slideover??{}}};return}const n=e.split(".");let o=this.config;for(let a=0;a<n.length-1;a++)o=o[n[a]]=o[n[a]]||{};o[n[n.length-1]]=t}get(e){if(typeof e>"u")return this.config;const t=e.split(".");let n=this.config;for(const o of t){if(n[o]===void 0)return null;n=n[o]}return n}}const Or=new Zo,ea=()=>Or.reset(),ra=(r,e)=>Or.put(r,e),Pr=r=>Or.get(r),Be=(r,e)=>Or.get(r?`slideover.${e}`:`modal.${e}`);var Qr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ta(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function na(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var o=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return r[n]}})}),t}var Zr={exports:{}},or={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Qt;function oa(){if(Qt)return or;Qt=1;var r=f,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(u,i,d){var s,g={},v=null,E=null;d!==void 0&&(v=""+d),i.key!==void 0&&(v=""+i.key),i.ref!==void 0&&(E=i.ref);for(s in i)n.call(i,s)&&!a.hasOwnProperty(s)&&(g[s]=i[s]);if(u&&u.defaultProps)for(s in i=u.defaultProps,i)g[s]===void 0&&(g[s]=i[s]);return{$$typeof:e,type:u,key:v,ref:E,props:g,_owner:o.current}}return or.Fragment=t,or.jsx=l,or.jsxs=l,or}var ar={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,25 +14,25 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
18
|
-
`+Le+c}}var we=!1,
|
|
17
|
+
*/var Zt;function aa(){return Zt||(Zt=1,process.env.NODE_ENV!=="production"&&function(){var r=f,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),s=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),E=Symbol.for("react.offscreen"),p=Symbol.iterator,m="@@iterator";function y(c){if(c===null||typeof c!="object")return null;var S=p&&c[p]||c[m];return typeof S=="function"?S:null}var h=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(c){{for(var S=arguments.length,O=new Array(S>1?S-1:0),A=1;A<S;A++)O[A-1]=arguments[A];w("error",c,O)}}function w(c,S,O){{var A=h.ReactDebugCurrentFrame,N=A.getStackAddendum();N!==""&&(S+="%s",O=O.concat([N]));var W=O.map(function(I){return String(I)});W.unshift("Warning: "+S),Function.prototype.apply.call(console[c],console,W)}}var x=!1,P=!1,D=!1,_=!1,U=!1,H;H=Symbol.for("react.module.reference");function j(c){return!!(typeof c=="string"||typeof c=="function"||c===n||c===a||U||c===o||c===d||c===s||_||c===E||x||P||D||typeof c=="object"&&c!==null&&(c.$$typeof===v||c.$$typeof===g||c.$$typeof===l||c.$$typeof===u||c.$$typeof===i||c.$$typeof===H||c.getModuleId!==void 0))}function z(c,S,O){var A=c.displayName;if(A)return A;var N=S.displayName||S.name||"";return N!==""?O+"("+N+")":O}function V(c){return c.displayName||"Context"}function C(c){if(c==null)return null;if(typeof c.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case n:return"Fragment";case t:return"Portal";case a:return"Profiler";case o:return"StrictMode";case d:return"Suspense";case s:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case u:var S=c;return V(S)+".Consumer";case l:var O=c;return V(O._context)+".Provider";case i:return z(c,c.render,"ForwardRef");case g:var A=c.displayName||null;return A!==null?A:C(c.type)||"Memo";case v:{var N=c,W=N._payload,I=N._init;try{return C(I(W))}catch{return null}}}return null}var T=Object.assign,k=0,oe,se,me,Z,ce,q,Ne;function J(){}J.__reactDisabledLog=!0;function qt(){{if(k===0){oe=console.log,se=console.info,me=console.warn,Z=console.error,ce=console.group,q=console.groupCollapsed,Ne=console.groupEnd;var c={configurable:!0,enumerable:!0,value:J,writable:!0};Object.defineProperties(console,{info:c,log:c,warn:c,error:c,group:c,groupCollapsed:c,groupEnd:c})}k++}}function je(){{if(k--,k===0){var c={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:T({},c,{value:oe}),info:T({},c,{value:se}),warn:T({},c,{value:me}),error:T({},c,{value:Z}),group:T({},c,{value:ce}),groupCollapsed:T({},c,{value:q}),groupEnd:T({},c,{value:Ne})})}k<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Er=h.ReactCurrentDispatcher,Le;function be(c,S,O){{if(Le===void 0)try{throw Error()}catch(N){var A=N.stack.trim().match(/\n( *(at )?)/);Le=A&&A[1]||""}return`
|
|
18
|
+
`+Le+c}}var we=!1,Kr;{var Is=typeof WeakMap=="function"?WeakMap:Map;Kr=new Is}function jo(c,S){if(!c||we)return"";{var O=Kr.get(c);if(O!==void 0)return O}var A;we=!0;var N=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var W;W=Er.current,Er.current=null,qt();try{if(S){var I=function(){throw Error()};if(Object.defineProperty(I.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(I,[])}catch(ne){A=ne}Reflect.construct(c,[],I)}else{try{I.call()}catch(ne){A=ne}c.call(I.prototype)}}else{try{throw Error()}catch(ne){A=ne}c()}}catch(ne){if(ne&&A&&typeof ne.stack=="string"){for(var M=ne.stack.split(`
|
|
19
19
|
`),re=A.stack.split(`
|
|
20
20
|
`),G=M.length-1,Y=re.length-1;G>=1&&Y>=0&&M[G]!==re[Y];)Y--;for(;G>=1&&Y>=0;G--,Y--)if(M[G]!==re[Y]){if(G!==1||Y!==1)do if(G--,Y--,Y<0||M[G]!==re[Y]){var ie=`
|
|
21
|
-
`+M[G].replace(" at new "," at ");return c.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",c.displayName)),typeof c=="function"&&
|
|
21
|
+
`+M[G].replace(" at new "," at ");return c.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",c.displayName)),typeof c=="function"&&Kr.set(c,ie),ie}while(G>=1&&Y>=0);break}}}finally{we=!1,Er.current=W,je(),Error.prepareStackTrace=N}var rr=c?c.displayName||c.name:"",We=rr?be(rr):"";return typeof c=="function"&&Kr.set(c,We),We}function _s(c,S,O){return jo(c,!1)}function Ds(c){var S=c.prototype;return!!(S&&S.isReactComponent)}function Xr(c,S,O){if(c==null)return"";if(typeof c=="function")return jo(c,Ds(c));if(typeof c=="string")return be(c);switch(c){case d:return be("Suspense");case s:return be("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case i:return _s(c.render);case g:return Xr(c.type,S,O);case v:{var A=c,N=A._payload,W=A._init;try{return Xr(W(N),S,O)}catch{}}}return""}var Sr=Object.prototype.hasOwnProperty,Lo={},Wo=h.ReactDebugCurrentFrame;function Jr(c){if(c){var S=c._owner,O=Xr(c.type,c._source,S?S.type:null);Wo.setExtraStackFrame(O)}else Wo.setExtraStackFrame(null)}function ks(c,S,O,A,N){{var W=Function.call.bind(Sr);for(var I in c)if(W(c,I)){var M=void 0;try{if(typeof c[I]!="function"){var re=Error((A||"React class")+": "+O+" type `"+I+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[I]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw re.name="Invariant Violation",re}M=c[I](S,I,A,O,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(G){M=G}M&&!(M instanceof Error)&&(Jr(N),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. 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||"React class",O,I,typeof M),Jr(null)),M instanceof Error&&!(M.message in Lo)&&(Lo[M.message]=!0,Jr(N),b("Failed %s type: %s",O,M.message),Jr(null))}}}var Ns=Array.isArray;function Gt(c){return Ns(c)}function js(c){{var S=typeof Symbol=="function"&&Symbol.toStringTag,O=S&&c[Symbol.toStringTag]||c.constructor.name||"Object";return O}}function Ls(c){try{return Uo(c),!1}catch{return!0}}function Uo(c){return""+c}function Bo(c){if(Ls(c))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",js(c)),Uo(c)}var xr=h.ReactCurrentOwner,Ws={key:!0,ref:!0,__self:!0,__source:!0},Ro,Ho,zt;zt={};function Us(c){if(Sr.call(c,"ref")){var S=Object.getOwnPropertyDescriptor(c,"ref").get;if(S&&S.isReactWarning)return!1}return c.ref!==void 0}function Bs(c){if(Sr.call(c,"key")){var S=Object.getOwnPropertyDescriptor(c,"key").get;if(S&&S.isReactWarning)return!1}return c.key!==void 0}function Rs(c,S){if(typeof c.ref=="string"&&xr.current&&S&&xr.current.stateNode!==S){var O=C(xr.current.type);zt[O]||(b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',C(xr.current.type),c.ref),zt[O]=!0)}}function Hs(c,S){{var O=function(){Ro||(Ro=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",S))};O.isReactWarning=!0,Object.defineProperty(c,"key",{get:O,configurable:!0})}}function Vs(c,S){{var O=function(){Ho||(Ho=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",S))};O.isReactWarning=!0,Object.defineProperty(c,"ref",{get:O,configurable:!0})}}var qs=function(c,S,O,A,N,W,I){var M={$$typeof:e,type:c,key:S,ref:O,props:I,_owner:W};return M._store={},Object.defineProperty(M._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(M,"_self",{configurable:!1,enumerable:!1,writable:!1,value:A}),Object.defineProperty(M,"_source",{configurable:!1,enumerable:!1,writable:!1,value:N}),Object.freeze&&(Object.freeze(M.props),Object.freeze(M)),M};function Gs(c,S,O,A,N){{var W,I={},M=null,re=null;O!==void 0&&(Bo(O),M=""+O),Bs(S)&&(Bo(S.key),M=""+S.key),Us(S)&&(re=S.ref,Rs(S,N));for(W in S)Sr.call(S,W)&&!Ws.hasOwnProperty(W)&&(I[W]=S[W]);if(c&&c.defaultProps){var G=c.defaultProps;for(W in G)I[W]===void 0&&(I[W]=G[W])}if(M||re){var Y=typeof c=="function"?c.displayName||c.name||"Unknown":c;M&&Hs(I,Y),re&&Vs(I,Y)}return qs(c,M,re,N,A,xr.current,I)}}var Yt=h.ReactCurrentOwner,Vo=h.ReactDebugCurrentFrame;function er(c){if(c){var S=c._owner,O=Xr(c.type,c._source,S?S.type:null);Vo.setExtraStackFrame(O)}else Vo.setExtraStackFrame(null)}var Kt;Kt=!1;function Xt(c){return typeof c=="object"&&c!==null&&c.$$typeof===e}function qo(){{if(Yt.current){var c=C(Yt.current.type);if(c)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+c+"`."}return""}}function zs(c){return""}var Go={};function Ys(c){{var S=qo();if(!S){var O=typeof c=="string"?c:c.displayName||c.name;O&&(S=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+O+">.")}return S}}function zo(c,S){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var O=Ys(S);if(Go[O])return;Go[O]=!0;var A="";c&&c._owner&&c._owner!==
|
|
25
|
+
Check the top-level render call using <`+O+">.")}return S}}function zo(c,S){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var O=Ys(S);if(Go[O])return;Go[O]=!0;var A="";c&&c._owner&&c._owner!==Yt.current&&(A=" It was passed a child from "+C(c._owner.type)+"."),er(c),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',O,A),er(null)}}function Yo(c,S){{if(typeof c!="object")return;if(Gt(c))for(var O=0;O<c.length;O++){var A=c[O];Xt(A)&&zo(A,S)}else if(Xt(c))c._store&&(c._store.validated=!0);else if(c){var N=y(c);if(typeof N=="function"&&N!==c.entries)for(var W=N.call(c),I;!(I=W.next()).done;)Xt(I.value)&&zo(I.value,S)}}}function Ks(c){{var S=c.type;if(S==null||typeof S=="string")return;var O;if(typeof S=="function")O=S.propTypes;else if(typeof S=="object"&&(S.$$typeof===i||S.$$typeof===g))O=S.propTypes;else return;if(O){var A=C(S);ks(O,c.props,"prop",A,c)}else if(S.PropTypes!==void 0&&!Kt){Kt=!0;var N=C(S);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",N||"Unknown")}typeof S.getDefaultProps=="function"&&!S.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xs(c){{for(var S=Object.keys(c.props),O=0;O<S.length;O++){var A=S[O];if(A!=="children"&&A!=="key"){er(c),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",A),er(null);break}}c.ref!==null&&(er(c),b("Invalid attribute `ref` supplied to `React.Fragment`."),er(null))}}var Ko={};function Xo(c,S,O,A,N,W){{var I=j(c);if(!I){var M="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(M+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var re=zs();re?M+=re:M+=qo();var G;c===null?G="null":Gt(c)?G="array":c!==void 0&&c.$$typeof===e?(G="<"+(C(c.type)||"Unknown")+" />",M=" Did you accidentally export a JSX literal instead of a component?"):G=typeof c,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",G,M)}var Y=Gs(c,S,O,N,W);if(Y==null)return Y;if(I){var ie=S.children;if(ie!==void 0)if(A)if(Gt(ie)){for(var rr=0;rr<ie.length;rr++)Yo(ie[rr],c);Object.freeze&&Object.freeze(ie)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Yo(ie,c)}if(Sr.call(S,"key")){var We=C(c),ne=Object.keys(S).filter(function(tc){return tc!=="key"}),Jt=ne.length>0?"{key: someKey, "+ne.join(": ..., ")+": ...}":"{key: someKey}";if(!Ko[We+Jt]){var rc=ne.length>0?"{"+ne.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
27
27
|
<%s {...props} />
|
|
28
28
|
React keys must be passed directly to JSX without using spread:
|
|
29
29
|
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,Xt,We,rc,We),Ko[We+Xt]=!0}}return c===n?Xs(Y):Ks(Y),Y}}function Js(c,S,O){return Xo(c,S,O,!0)}function Qs(c,S,O){return Xo(c,S,O,!1)}var Zs=Qs,ec=Js;ar.Fragment=n,ar.jsx=Zs,ar.jsxs=ec}()),ar}process.env.NODE_ENV==="production"?Qr.exports=oa():Qr.exports=aa();var $=Qr.exports;function ia(r,e){return Array.isArray(r)?r.filter(t=>!e.includes(t)):Object.keys(r).reduce((t,n)=>(e.includes(n)||(t[n]=r[n]),t),{})}function Zt(r,e){return Array.isArray(r)?r.filter(t=>e.includes(t)):e.reduce((t,n)=>(n in r&&(t[n]=r[n]),t),{})}function la(r){return Array.isArray(r)?r.filter(e=>e!==null):Object.keys(r).reduce((e,t)=>(t in r&&r[t]!==null&&(e[t]=r[t]),e),{})}function ua(r,e=3,t=10){return new Promise((n,o)=>{const a=r();if(a){n(a);return}let l=e*1e3/t;const u=setInterval(()=>{const i=r();i&&(clearInterval(u),n(i)),--l<=0&&(clearInterval(u),o(new Error("Condition not met in time")))},t)})}var sa=function(e){return ca(e)&&!fa(e)};function ca(r){return!!r&&typeof r=="object"}function fa(r){var e=Object.prototype.toString.call(r);return e==="[object RegExp]"||e==="[object Date]"||ya(r)}var da=typeof Symbol=="function"&&Symbol.for,pa=da?Symbol.for("react.element"):60103;function ya(r){return r.$$typeof===pa}function ma(r){return Array.isArray(r)?[]:{}}function ir(r,e){return e.clone!==!1&&e.isMergeableObject(r)?Be(ma(r),r,e):r}function va(r,e,t){return r.concat(e).map(function(n){return ir(n,t)})}function ha(r,e){if(!e.customMerge)return Be;var t=e.customMerge(r);return typeof t=="function"?t:Be}function ga(r){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r).filter(function(e){return Object.propertyIsEnumerable.call(r,e)}):[]}function en(r){return Object.keys(r).concat(ga(r))}function rn(r,e){try{return e in r}catch{return!1}}function ba(r,e){return rn(r,e)&&!(Object.hasOwnProperty.call(r,e)&&Object.propertyIsEnumerable.call(r,e))}function wa(r,e,t){var n={};return t.isMergeableObject(r)&&en(r).forEach(function(o){n[o]=ir(r[o],t)}),en(e).forEach(function(o){ba(r,o)||(rn(r,o)&&t.isMergeableObject(e[o])?n[o]=ha(o,t)(r[o],e[o],t):n[o]=ir(e[o],t))}),n}function Be(r,e,t){t=t||{},t.arrayMerge=t.arrayMerge||va,t.isMergeableObject=t.isMergeableObject||sa,t.cloneUnlessOtherwiseSpecified=ir;var n=Array.isArray(e),o=Array.isArray(r),a=n===o;return a?n?t.arrayMerge(r,e,t):wa(r,e,t):ir(e,t)}Be.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,o){return Be(n,o,t)},{})};var Ea=Be,Sa=Ea;const xa=ta(Sa);var Oa=Error,Pa=EvalError,Aa=RangeError,Ta=ReferenceError,tn=SyntaxError,lr=TypeError,$a=URIError,Ca=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[t]=o;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,t);if(l.value!==o||l.enumerable!==!0)return!1}return!0},nn=typeof Symbol<"u"&&Symbol,Fa=Ca,Ma=function(){return typeof nn!="function"||typeof Symbol!="function"||typeof nn("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Fa()},Zr={__proto__:null,foo:{}},Ia=Object,_a=function(){return{__proto__:Zr}.foo===Zr.foo&&!(Zr instanceof Ia)},Da="Function.prototype.bind called on incompatible ",ka=Object.prototype.toString,Na=Math.max,ja="[object Function]",on=function(e,t){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var a=0;a<t.length;a+=1)n[a+e.length]=t[a];return n},La=function(e,t){for(var n=[],o=t,a=0;o<e.length;o+=1,a+=1)n[a]=e[o];return n},Wa=function(r,e){for(var t="",n=0;n<r.length;n+=1)t+=r[n],n+1<r.length&&(t+=e);return t},Ua=function(e){var t=this;if(typeof t!="function"||ka.apply(t)!==ja)throw new TypeError(Da+t);for(var n=La(arguments,1),o,a=function(){if(this instanceof o){var s=t.apply(this,on(n,arguments));return Object(s)===s?s:this}return t.apply(e,on(n,arguments))},l=Na(0,t.length-n.length),u=[],i=0;i<l;i++)u[i]="$"+i;if(o=Function("binder","return function ("+Wa(u,",")+"){ return binder.apply(this,arguments); }")(a),t.prototype){var p=function(){};p.prototype=t.prototype,o.prototype=new p,p.prototype=null}return o},Ba=Ua,et=Function.prototype.bind||Ba,Ra=Function.prototype.call,Ha=Object.prototype.hasOwnProperty,Va=et,qa=Va.call(Ra,Ha),F,Ga=Oa,za=Pa,Ya=Aa,Ka=Ta,Re=tn,He=lr,Xa=$a,an=Function,rt=function(r){try{return an('"use strict"; return ('+r+").constructor;")()}catch{}},$e=Object.getOwnPropertyDescriptor;if($e)try{$e({},"")}catch{$e=null}var tt=function(){throw new He},Ja=$e?function(){try{return arguments.callee,tt}catch{try{return $e(arguments,"callee").get}catch{return tt}}}():tt,Ve=Ma(),Qa=_a(),X=Object.getPrototypeOf||(Qa?function(r){return r.__proto__}:null),qe={},Za=typeof Uint8Array>"u"||!X?F:X(Uint8Array),Ce={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?F:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?F:ArrayBuffer,"%ArrayIteratorPrototype%":Ve&&X?X([][Symbol.iterator]()):F,"%AsyncFromSyncIteratorPrototype%":F,"%AsyncFunction%":qe,"%AsyncGenerator%":qe,"%AsyncGeneratorFunction%":qe,"%AsyncIteratorPrototype%":qe,"%Atomics%":typeof Atomics>"u"?F:Atomics,"%BigInt%":typeof BigInt>"u"?F:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?F:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?F:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?F:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ga,"%eval%":eval,"%EvalError%":za,"%Float32Array%":typeof Float32Array>"u"?F:Float32Array,"%Float64Array%":typeof Float64Array>"u"?F:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?F:FinalizationRegistry,"%Function%":an,"%GeneratorFunction%":qe,"%Int8Array%":typeof Int8Array>"u"?F:Int8Array,"%Int16Array%":typeof Int16Array>"u"?F:Int16Array,"%Int32Array%":typeof Int32Array>"u"?F:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ve&&X?X(X([][Symbol.iterator]())):F,"%JSON%":typeof JSON=="object"?JSON:F,"%Map%":typeof Map>"u"?F:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ve||!X?F:X(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?F:Promise,"%Proxy%":typeof Proxy>"u"?F:Proxy,"%RangeError%":Ya,"%ReferenceError%":Ka,"%Reflect%":typeof Reflect>"u"?F:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?F:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ve||!X?F:X(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?F:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ve&&X?X(""[Symbol.iterator]()):F,"%Symbol%":Ve?Symbol:F,"%SyntaxError%":Re,"%ThrowTypeError%":Ja,"%TypedArray%":Za,"%TypeError%":He,"%Uint8Array%":typeof Uint8Array>"u"?F:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?F:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?F:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?F:Uint32Array,"%URIError%":Xa,"%WeakMap%":typeof WeakMap>"u"?F:WeakMap,"%WeakRef%":typeof WeakRef>"u"?F:WeakRef,"%WeakSet%":typeof WeakSet>"u"?F:WeakSet};if(X)try{null.error}catch(r){var ei=X(X(r));Ce["%Error.prototype%"]=ei}var ri=function r(e){var t;if(e==="%AsyncFunction%")t=rt("async function () {}");else if(e==="%GeneratorFunction%")t=rt("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=rt("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=r("%AsyncGenerator%");o&&X&&(t=X(o.prototype))}return Ce[e]=t,t},ln={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ur=et,Pr=qa,ti=ur.call(Function.call,Array.prototype.concat),ni=ur.call(Function.apply,Array.prototype.splice),un=ur.call(Function.call,String.prototype.replace),Ar=ur.call(Function.call,String.prototype.slice),oi=ur.call(Function.call,RegExp.prototype.exec),ai=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ii=/\\(\\)?/g,li=function(e){var t=Ar(e,0,1),n=Ar(e,-1);if(t==="%"&&n!=="%")throw new Re("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new Re("invalid intrinsic syntax, expected opening `%`");var o=[];return un(e,ai,function(a,l,u,i){o[o.length]=u?un(i,ii,"$1"):l||a}),o},ui=function(e,t){var n=e,o;if(Pr(ln,n)&&(o=ln[n],n="%"+o[0]+"%"),Pr(Ce,n)){var a=Ce[n];if(a===qe&&(a=ri(n)),typeof a>"u"&&!t)throw new He("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:a}}throw new Re("intrinsic "+e+" does not exist!")},Ge=function(e,t){if(typeof e!="string"||e.length===0)throw new He("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new He('"allowMissing" argument must be a boolean');if(oi(/^%?[^%]*%?$/,e)===null)throw new Re("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=li(e),o=n.length>0?n[0]:"",a=ui("%"+o+"%",t),l=a.name,u=a.value,i=!1,p=a.alias;p&&(o=p[0],ni(n,ti([0,1],p)));for(var s=1,b=!0;s<n.length;s+=1){var v=n[s],E=Ar(v,0,1),d=Ar(v,-1);if((E==='"'||E==="'"||E==="`"||d==='"'||d==="'"||d==="`")&&E!==d)throw new Re("property names with quotes must have matching quotes");if((v==="constructor"||!b)&&(i=!0),o+="."+v,l="%"+o+"%",Pr(Ce,l))u=Ce[l];else if(u!=null){if(!(v in u)){if(!t)throw new He("base intrinsic for "+e+" exists, but the property is not available.");return}if($e&&s+1>=n.length){var m=$e(u,v);b=!!m,b&&"get"in m&&!("originalValue"in m.get)?u=m.get:u=u[v]}else b=Pr(u,v),u=u[v];b&&!i&&(Ce[l]=u)}}return u},sn={exports:{}},nt,cn;function ot(){if(cn)return nt;cn=1;var r=Ge,e=r("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return nt=e,nt}var si=Ge,Tr=si("%Object.getOwnPropertyDescriptor%",!0);if(Tr)try{Tr([],"length")}catch{Tr=null}var fn=Tr,dn=ot(),ci=tn,ze=lr,pn=fn,fi=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new ze("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new ze("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new ze("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new ze("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new ze("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new ze("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6?arguments[6]:!1,i=!!pn&&pn(e,t);if(dn)dn(e,t,{configurable:l===null&&i?i.configurable:!l,enumerable:o===null&&i?i.enumerable:!o,value:n,writable:a===null&&i?i.writable:!a});else if(u||!o&&!a&&!l)e[t]=n;else throw new ci("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},at=ot(),yn=function(){return!!at};yn.hasArrayLengthDefineBug=function(){if(!at)return null;try{return at([],"length",{value:1}).length!==1}catch{return!0}};var di=yn,pi=Ge,mn=fi,yi=di(),vn=fn,hn=lr,mi=pi("%Math.floor%"),vi=function(e,t){if(typeof e!="function")throw new hn("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||mi(t)!==t)throw new hn("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,a=!0;if("length"in e&&vn){var l=vn(e,"length");l&&!l.configurable&&(o=!1),l&&!l.writable&&(a=!1)}return(o||a||!n)&&(yi?mn(e,"length",t,!0,!0):mn(e,"length",t)),e};(function(r){var e=et,t=Ge,n=vi,o=lr,a=t("%Function.prototype.apply%"),l=t("%Function.prototype.call%"),u=t("%Reflect.apply%",!0)||e.call(l,a),i=ot(),p=t("%Math.max%");r.exports=function(v){if(typeof v!="function")throw new o("a function is required");var E=u(e,l,arguments);return n(E,1+p(0,v.length-(arguments.length-1)),!0)};var s=function(){return u(e,a,arguments)};i?i(r.exports,"apply",{value:s}):r.exports.apply=s})(sn);var hi=sn.exports,gn=Ge,bn=hi,gi=bn(gn("String.prototype.indexOf")),bi=function(e,t){var n=gn(e,!!t);return typeof n=="function"&&gi(e,".prototype.")>-1?bn(n):n};const wi=na(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var it=typeof Map=="function"&&Map.prototype,lt=Object.getOwnPropertyDescriptor&&it?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,$r=it&<&&typeof lt.get=="function"?lt.get:null,wn=it&&Map.prototype.forEach,ut=typeof Set=="function"&&Set.prototype,st=Object.getOwnPropertyDescriptor&&ut?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Cr=ut&&st&&typeof st.get=="function"?st.get:null,En=ut&&Set.prototype.forEach,Ei=typeof WeakMap=="function"&&WeakMap.prototype,sr=Ei?WeakMap.prototype.has:null,Si=typeof WeakSet=="function"&&WeakSet.prototype,cr=Si?WeakSet.prototype.has:null,xi=typeof WeakRef=="function"&&WeakRef.prototype,Sn=xi?WeakRef.prototype.deref:null,Oi=Boolean.prototype.valueOf,Pi=Object.prototype.toString,Ai=Function.prototype.toString,Ti=String.prototype.match,ct=String.prototype.slice,Ee=String.prototype.replace,$i=String.prototype.toUpperCase,xn=String.prototype.toLowerCase,On=RegExp.prototype.test,Pn=Array.prototype.concat,fe=Array.prototype.join,Ci=Array.prototype.slice,An=Math.floor,ft=typeof BigInt=="function"?BigInt.prototype.valueOf:null,dt=Object.getOwnPropertySymbols,pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ye=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Q=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ye||!0)?Symbol.toStringTag:null,Tn=Object.prototype.propertyIsEnumerable,$n=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function Cn(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||On.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-An(-r):An(r);if(n!==r){var o=String(n),a=ct.call(e,o.length+1);return Ee.call(o,t,"$&_")+"."+Ee.call(Ee.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ee.call(e,t,"$&_")}var yt=wi,Fn=yt.custom,Mn=Dn(Fn)?Fn:null,Fi=function r(e,t,n,o){var a=t||{};if(Se(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Se(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=Se(a,"customInspect")?a.customInspect:!0;if(typeof l!="boolean"&&l!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Se(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Se(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=a.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Nn(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var i=String(e);return u?Cn(e,i):i}if(typeof e=="bigint"){var p=String(e)+"n";return u?Cn(e,p):p}var s=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=s&&s>0&&typeof e=="object")return mt(e)?"[Array]":"[Object]";var b=Yi(a,n);if(typeof o>"u")o=[];else if(kn(o,e)>=0)return"[Circular]";function v(C,T,k){if(T&&(o=Ci.call(o),o.push(T)),k){var oe={depth:a.depth};return Se(a,"quoteStyle")&&(oe.quoteStyle=a.quoteStyle),r(C,oe,n+1,o)}return r(C,a,n+1,o)}if(typeof e=="function"&&!_n(e)){var E=Wi(e),d=Fr(e,v);return"[Function"+(E?": "+E:" (anonymous)")+"]"+(d.length>0?" { "+fe.call(d,", ")+" }":"")}if(Dn(e)){var m=Ye?Ee.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):pt.call(e);return typeof e=="object"&&!Ye?fr(m):m}if(qi(e)){for(var y="<"+xn.call(String(e.nodeName)),h=e.attributes||[],g=0;g<h.length;g++)y+=" "+h[g].name+"="+In(Mi(h[g].value),"double",a);return y+=">",e.childNodes&&e.childNodes.length&&(y+="..."),y+="</"+xn.call(String(e.nodeName))+">",y}if(mt(e)){if(e.length===0)return"[]";var w=Fr(e,v);return b&&!zi(w)?"["+ht(w,b)+"]":"[ "+fe.call(w,", ")+" ]"}if(_i(e)){var x=Fr(e,v);return!("cause"in Error.prototype)&&"cause"in e&&!Tn.call(e,"cause")?"{ ["+String(e)+"] "+fe.call(Pn.call("[cause]: "+v(e.cause),x),", ")+" }":x.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+fe.call(x,", ")+" }"}if(typeof e=="object"&&l){if(Mn&&typeof e[Mn]=="function"&&yt)return yt(e,{depth:s-n});if(l!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Ui(e)){var P=[];return wn&&wn.call(e,function(C,T){P.push(v(T,e,!0)+" => "+v(C,e))}),jn("Map",$r.call(e),P,b)}if(Hi(e)){var D=[];return En&&En.call(e,function(C){D.push(v(C,e))}),jn("Set",Cr.call(e),D,b)}if(Bi(e))return vt("WeakMap");if(Vi(e))return vt("WeakSet");if(Ri(e))return vt("WeakRef");if(ki(e))return fr(v(Number(e)));if(ji(e))return fr(v(ft.call(e)));if(Ni(e))return fr(Oi.call(e));if(Di(e))return fr(v(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof Jr<"u"&&e===Jr)return"{ [object globalThis] }";if(!Ii(e)&&!_n(e)){var _=Fr(e,v),U=$n?$n(e)===Object.prototype:e instanceof Object||e.constructor===Object,H=e instanceof Object?"":"null prototype",j=!U&&Q&&Object(e)===e&&Q in e?ct.call(xe(e),8,-1):H?"Object":"",z=U||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",V=z+(j||H?"["+fe.call(Pn.call([],j||[],H||[]),": ")+"] ":"");return _.length===0?V+"{}":b?V+"{"+ht(_,b)+"}":V+"{ "+fe.call(_,", ")+" }"}return String(e)};function In(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function Mi(r){return Ee.call(String(r),/"/g,""")}function mt(r){return xe(r)==="[object Array]"&&(!Q||!(typeof r=="object"&&Q in r))}function Ii(r){return xe(r)==="[object Date]"&&(!Q||!(typeof r=="object"&&Q in r))}function _n(r){return xe(r)==="[object RegExp]"&&(!Q||!(typeof r=="object"&&Q in r))}function _i(r){return xe(r)==="[object Error]"&&(!Q||!(typeof r=="object"&&Q in r))}function Di(r){return xe(r)==="[object String]"&&(!Q||!(typeof r=="object"&&Q in r))}function ki(r){return xe(r)==="[object Number]"&&(!Q||!(typeof r=="object"&&Q in r))}function Ni(r){return xe(r)==="[object Boolean]"&&(!Q||!(typeof r=="object"&&Q in r))}function Dn(r){if(Ye)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!pt)return!1;try{return pt.call(r),!0}catch{}return!1}function ji(r){if(!r||typeof r!="object"||!ft)return!1;try{return ft.call(r),!0}catch{}return!1}var Li=Object.prototype.hasOwnProperty||function(r){return r in this};function Se(r,e){return Li.call(r,e)}function xe(r){return Pi.call(r)}function Wi(r){if(r.name)return r.name;var e=Ti.call(Ai.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function kn(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t;return-1}function Ui(r){if(!$r||!r||typeof r!="object")return!1;try{$r.call(r);try{Cr.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function Bi(r){if(!sr||!r||typeof r!="object")return!1;try{sr.call(r,sr);try{cr.call(r,cr)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function Ri(r){if(!Sn||!r||typeof r!="object")return!1;try{return Sn.call(r),!0}catch{}return!1}function Hi(r){if(!Cr||!r||typeof r!="object")return!1;try{Cr.call(r);try{$r.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function Vi(r){if(!cr||!r||typeof r!="object")return!1;try{cr.call(r,cr);try{sr.call(r,sr)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function qi(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function Nn(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return Nn(ct.call(r,0,e.maxStringLength),e)+n}var o=Ee.call(Ee.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Gi);return In(o,"single",e)}function Gi(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+$i.call(e.toString(16))}function fr(r){return"Object("+r+")"}function vt(r){return r+" { ? }"}function jn(r,e,t,n){var o=n?ht(t,n):fe.call(t,", ");return r+" ("+e+") {"+o+"}"}function zi(r){for(var e=0;e<r.length;e++)if(kn(r[e],`
|
|
31
|
-
`)>=0)return!1;return!0}function Yi(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=fe.call(Array(r.indent+1)," ");else return null;return{base:t,prev:fe.call(Array(e+1),t)}}function
|
|
30
|
+
<%s key={someKey} {...props} />`,Jt,We,rc,We),Ko[We+Jt]=!0}}return c===n?Xs(Y):Ks(Y),Y}}function Js(c,S,O){return Xo(c,S,O,!0)}function Qs(c,S,O){return Xo(c,S,O,!1)}var Zs=Qs,ec=Js;ar.Fragment=n,ar.jsx=Zs,ar.jsxs=ec}()),ar}process.env.NODE_ENV==="production"?Zr.exports=oa():Zr.exports=aa();var $=Zr.exports;function ia(r,e){return Array.isArray(r)?r.filter(t=>!e.includes(t)):Object.keys(r).reduce((t,n)=>(e.includes(n)||(t[n]=r[n]),t),{})}function en(r,e){return Array.isArray(r)?r.filter(t=>e.includes(t)):e.reduce((t,n)=>(n in r&&(t[n]=r[n]),t),{})}function la(r){return Array.isArray(r)?r.filter(e=>e!==null):Object.keys(r).reduce((e,t)=>(t in r&&r[t]!==null&&(e[t]=r[t]),e),{})}function ua(r,e=3,t=10){return new Promise((n,o)=>{const a=r();if(a){n(a);return}let l=e*1e3/t;const u=setInterval(()=>{const i=r();i&&(clearInterval(u),n(i)),--l<=0&&(clearInterval(u),o(new Error("Condition not met in time")))},t)})}var sa=function(e){return ca(e)&&!fa(e)};function ca(r){return!!r&&typeof r=="object"}function fa(r){var e=Object.prototype.toString.call(r);return e==="[object RegExp]"||e==="[object Date]"||ya(r)}var da=typeof Symbol=="function"&&Symbol.for,pa=da?Symbol.for("react.element"):60103;function ya(r){return r.$$typeof===pa}function ma(r){return Array.isArray(r)?[]:{}}function ir(r,e){return e.clone!==!1&&e.isMergeableObject(r)?Re(ma(r),r,e):r}function va(r,e,t){return r.concat(e).map(function(n){return ir(n,t)})}function ha(r,e){if(!e.customMerge)return Re;var t=e.customMerge(r);return typeof t=="function"?t:Re}function ga(r){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r).filter(function(e){return Object.propertyIsEnumerable.call(r,e)}):[]}function rn(r){return Object.keys(r).concat(ga(r))}function tn(r,e){try{return e in r}catch{return!1}}function ba(r,e){return tn(r,e)&&!(Object.hasOwnProperty.call(r,e)&&Object.propertyIsEnumerable.call(r,e))}function wa(r,e,t){var n={};return t.isMergeableObject(r)&&rn(r).forEach(function(o){n[o]=ir(r[o],t)}),rn(e).forEach(function(o){ba(r,o)||(tn(r,o)&&t.isMergeableObject(e[o])?n[o]=ha(o,t)(r[o],e[o],t):n[o]=ir(e[o],t))}),n}function Re(r,e,t){t=t||{},t.arrayMerge=t.arrayMerge||va,t.isMergeableObject=t.isMergeableObject||sa,t.cloneUnlessOtherwiseSpecified=ir;var n=Array.isArray(e),o=Array.isArray(r),a=n===o;return a?n?t.arrayMerge(r,e,t):wa(r,e,t):ir(e,t)}Re.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,o){return Re(n,o,t)},{})};var Ea=Re,Sa=Ea;const xa=ta(Sa);var Oa=Error,Pa=EvalError,Aa=RangeError,Ta=ReferenceError,nn=SyntaxError,lr=TypeError,$a=URIError,Ca=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[t]=o;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(e,t);if(l.value!==o||l.enumerable!==!0)return!1}return!0},on=typeof Symbol<"u"&&Symbol,Fa=Ca,Ma=function(){return typeof on!="function"||typeof Symbol!="function"||typeof on("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Fa()},et={__proto__:null,foo:{}},Ia=Object,_a=function(){return{__proto__:et}.foo===et.foo&&!(et instanceof Ia)},Da="Function.prototype.bind called on incompatible ",ka=Object.prototype.toString,Na=Math.max,ja="[object Function]",an=function(e,t){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var a=0;a<t.length;a+=1)n[a+e.length]=t[a];return n},La=function(e,t){for(var n=[],o=t,a=0;o<e.length;o+=1,a+=1)n[a]=e[o];return n},Wa=function(r,e){for(var t="",n=0;n<r.length;n+=1)t+=r[n],n+1<r.length&&(t+=e);return t},Ua=function(e){var t=this;if(typeof t!="function"||ka.apply(t)!==ja)throw new TypeError(Da+t);for(var n=La(arguments,1),o,a=function(){if(this instanceof o){var s=t.apply(this,an(n,arguments));return Object(s)===s?s:this}return t.apply(e,an(n,arguments))},l=Na(0,t.length-n.length),u=[],i=0;i<l;i++)u[i]="$"+i;if(o=Function("binder","return function ("+Wa(u,",")+"){ return binder.apply(this,arguments); }")(a),t.prototype){var d=function(){};d.prototype=t.prototype,o.prototype=new d,d.prototype=null}return o},Ba=Ua,rt=Function.prototype.bind||Ba,Ra=Function.prototype.call,Ha=Object.prototype.hasOwnProperty,Va=rt,qa=Va.call(Ra,Ha),F,Ga=Oa,za=Pa,Ya=Aa,Ka=Ta,He=nn,Ve=lr,Xa=$a,ln=Function,tt=function(r){try{return ln('"use strict"; return ('+r+").constructor;")()}catch{}},$e=Object.getOwnPropertyDescriptor;if($e)try{$e({},"")}catch{$e=null}var nt=function(){throw new Ve},Ja=$e?function(){try{return arguments.callee,nt}catch{try{return $e(arguments,"callee").get}catch{return nt}}}():nt,qe=Ma(),Qa=_a(),X=Object.getPrototypeOf||(Qa?function(r){return r.__proto__}:null),Ge={},Za=typeof Uint8Array>"u"||!X?F:X(Uint8Array),Ce={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?F:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?F:ArrayBuffer,"%ArrayIteratorPrototype%":qe&&X?X([][Symbol.iterator]()):F,"%AsyncFromSyncIteratorPrototype%":F,"%AsyncFunction%":Ge,"%AsyncGenerator%":Ge,"%AsyncGeneratorFunction%":Ge,"%AsyncIteratorPrototype%":Ge,"%Atomics%":typeof Atomics>"u"?F:Atomics,"%BigInt%":typeof BigInt>"u"?F:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?F:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?F:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?F:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Ga,"%eval%":eval,"%EvalError%":za,"%Float32Array%":typeof Float32Array>"u"?F:Float32Array,"%Float64Array%":typeof Float64Array>"u"?F:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?F:FinalizationRegistry,"%Function%":ln,"%GeneratorFunction%":Ge,"%Int8Array%":typeof Int8Array>"u"?F:Int8Array,"%Int16Array%":typeof Int16Array>"u"?F:Int16Array,"%Int32Array%":typeof Int32Array>"u"?F:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":qe&&X?X(X([][Symbol.iterator]())):F,"%JSON%":typeof JSON=="object"?JSON:F,"%Map%":typeof Map>"u"?F:Map,"%MapIteratorPrototype%":typeof Map>"u"||!qe||!X?F:X(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?F:Promise,"%Proxy%":typeof Proxy>"u"?F:Proxy,"%RangeError%":Ya,"%ReferenceError%":Ka,"%Reflect%":typeof Reflect>"u"?F:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?F:Set,"%SetIteratorPrototype%":typeof Set>"u"||!qe||!X?F:X(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?F:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":qe&&X?X(""[Symbol.iterator]()):F,"%Symbol%":qe?Symbol:F,"%SyntaxError%":He,"%ThrowTypeError%":Ja,"%TypedArray%":Za,"%TypeError%":Ve,"%Uint8Array%":typeof Uint8Array>"u"?F:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?F:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?F:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?F:Uint32Array,"%URIError%":Xa,"%WeakMap%":typeof WeakMap>"u"?F:WeakMap,"%WeakRef%":typeof WeakRef>"u"?F:WeakRef,"%WeakSet%":typeof WeakSet>"u"?F:WeakSet};if(X)try{null.error}catch(r){var ei=X(X(r));Ce["%Error.prototype%"]=ei}var ri=function r(e){var t;if(e==="%AsyncFunction%")t=tt("async function () {}");else if(e==="%GeneratorFunction%")t=tt("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=tt("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=r("%AsyncGenerator%");o&&X&&(t=X(o.prototype))}return Ce[e]=t,t},un={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ur=rt,Ar=qa,ti=ur.call(Function.call,Array.prototype.concat),ni=ur.call(Function.apply,Array.prototype.splice),sn=ur.call(Function.call,String.prototype.replace),Tr=ur.call(Function.call,String.prototype.slice),oi=ur.call(Function.call,RegExp.prototype.exec),ai=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ii=/\\(\\)?/g,li=function(e){var t=Tr(e,0,1),n=Tr(e,-1);if(t==="%"&&n!=="%")throw new He("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new He("invalid intrinsic syntax, expected opening `%`");var o=[];return sn(e,ai,function(a,l,u,i){o[o.length]=u?sn(i,ii,"$1"):l||a}),o},ui=function(e,t){var n=e,o;if(Ar(un,n)&&(o=un[n],n="%"+o[0]+"%"),Ar(Ce,n)){var a=Ce[n];if(a===Ge&&(a=ri(n)),typeof a>"u"&&!t)throw new Ve("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:a}}throw new He("intrinsic "+e+" does not exist!")},ze=function(e,t){if(typeof e!="string"||e.length===0)throw new Ve("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new Ve('"allowMissing" argument must be a boolean');if(oi(/^%?[^%]*%?$/,e)===null)throw new He("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=li(e),o=n.length>0?n[0]:"",a=ui("%"+o+"%",t),l=a.name,u=a.value,i=!1,d=a.alias;d&&(o=d[0],ni(n,ti([0,1],d)));for(var s=1,g=!0;s<n.length;s+=1){var v=n[s],E=Tr(v,0,1),p=Tr(v,-1);if((E==='"'||E==="'"||E==="`"||p==='"'||p==="'"||p==="`")&&E!==p)throw new He("property names with quotes must have matching quotes");if((v==="constructor"||!g)&&(i=!0),o+="."+v,l="%"+o+"%",Ar(Ce,l))u=Ce[l];else if(u!=null){if(!(v in u)){if(!t)throw new Ve("base intrinsic for "+e+" exists, but the property is not available.");return}if($e&&s+1>=n.length){var m=$e(u,v);g=!!m,g&&"get"in m&&!("originalValue"in m.get)?u=m.get:u=u[v]}else g=Ar(u,v),u=u[v];g&&!i&&(Ce[l]=u)}}return u},cn={exports:{}},ot,fn;function at(){if(fn)return ot;fn=1;var r=ze,e=r("%Object.defineProperty%",!0)||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return ot=e,ot}var si=ze,$r=si("%Object.getOwnPropertyDescriptor%",!0);if($r)try{$r([],"length")}catch{$r=null}var dn=$r,pn=at(),ci=nn,Ye=lr,yn=dn,fi=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new Ye("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new Ye("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Ye("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Ye("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Ye("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Ye("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6?arguments[6]:!1,i=!!yn&&yn(e,t);if(pn)pn(e,t,{configurable:l===null&&i?i.configurable:!l,enumerable:o===null&&i?i.enumerable:!o,value:n,writable:a===null&&i?i.writable:!a});else if(u||!o&&!a&&!l)e[t]=n;else throw new ci("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},it=at(),mn=function(){return!!it};mn.hasArrayLengthDefineBug=function(){if(!it)return null;try{return it([],"length",{value:1}).length!==1}catch{return!0}};var di=mn,pi=ze,vn=fi,yi=di(),hn=dn,gn=lr,mi=pi("%Math.floor%"),vi=function(e,t){if(typeof e!="function")throw new gn("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||mi(t)!==t)throw new gn("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,a=!0;if("length"in e&&hn){var l=hn(e,"length");l&&!l.configurable&&(o=!1),l&&!l.writable&&(a=!1)}return(o||a||!n)&&(yi?vn(e,"length",t,!0,!0):vn(e,"length",t)),e};(function(r){var e=rt,t=ze,n=vi,o=lr,a=t("%Function.prototype.apply%"),l=t("%Function.prototype.call%"),u=t("%Reflect.apply%",!0)||e.call(l,a),i=at(),d=t("%Math.max%");r.exports=function(v){if(typeof v!="function")throw new o("a function is required");var E=u(e,l,arguments);return n(E,1+d(0,v.length-(arguments.length-1)),!0)};var s=function(){return u(e,a,arguments)};i?i(r.exports,"apply",{value:s}):r.exports.apply=s})(cn);var hi=cn.exports,bn=ze,wn=hi,gi=wn(bn("String.prototype.indexOf")),bi=function(e,t){var n=bn(e,!!t);return typeof n=="function"&&gi(e,".prototype.")>-1?wn(n):n};const wi=na(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var lt=typeof Map=="function"&&Map.prototype,ut=Object.getOwnPropertyDescriptor&<?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Cr=lt&&ut&&typeof ut.get=="function"?ut.get:null,En=lt&&Map.prototype.forEach,st=typeof Set=="function"&&Set.prototype,ct=Object.getOwnPropertyDescriptor&&st?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Fr=st&&ct&&typeof ct.get=="function"?ct.get:null,Sn=st&&Set.prototype.forEach,Ei=typeof WeakMap=="function"&&WeakMap.prototype,sr=Ei?WeakMap.prototype.has:null,Si=typeof WeakSet=="function"&&WeakSet.prototype,cr=Si?WeakSet.prototype.has:null,xi=typeof WeakRef=="function"&&WeakRef.prototype,xn=xi?WeakRef.prototype.deref:null,Oi=Boolean.prototype.valueOf,Pi=Object.prototype.toString,Ai=Function.prototype.toString,Ti=String.prototype.match,ft=String.prototype.slice,Ee=String.prototype.replace,$i=String.prototype.toUpperCase,On=String.prototype.toLowerCase,Pn=RegExp.prototype.test,An=Array.prototype.concat,fe=Array.prototype.join,Ci=Array.prototype.slice,Tn=Math.floor,dt=typeof BigInt=="function"?BigInt.prototype.valueOf:null,pt=Object.getOwnPropertySymbols,yt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Ke=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Q=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Ke||!0)?Symbol.toStringTag:null,$n=Object.prototype.propertyIsEnumerable,Cn=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function Fn(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||Pn.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-Tn(-r):Tn(r);if(n!==r){var o=String(n),a=ft.call(e,o.length+1);return Ee.call(o,t,"$&_")+"."+Ee.call(Ee.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Ee.call(e,t,"$&_")}var mt=wi,Mn=mt.custom,In=kn(Mn)?Mn:null,Fi=function r(e,t,n,o){var a=t||{};if(Se(a,"quoteStyle")&&a.quoteStyle!=="single"&&a.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Se(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=Se(a,"customInspect")?a.customInspect:!0;if(typeof l!="boolean"&&l!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Se(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Se(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var u=a.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return jn(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var i=String(e);return u?Fn(e,i):i}if(typeof e=="bigint"){var d=String(e)+"n";return u?Fn(e,d):d}var s=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=s&&s>0&&typeof e=="object")return vt(e)?"[Array]":"[Object]";var g=Yi(a,n);if(typeof o>"u")o=[];else if(Nn(o,e)>=0)return"[Circular]";function v(C,T,k){if(T&&(o=Ci.call(o),o.push(T)),k){var oe={depth:a.depth};return Se(a,"quoteStyle")&&(oe.quoteStyle=a.quoteStyle),r(C,oe,n+1,o)}return r(C,a,n+1,o)}if(typeof e=="function"&&!Dn(e)){var E=Wi(e),p=Mr(e,v);return"[Function"+(E?": "+E:" (anonymous)")+"]"+(p.length>0?" { "+fe.call(p,", ")+" }":"")}if(kn(e)){var m=Ke?Ee.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):yt.call(e);return typeof e=="object"&&!Ke?fr(m):m}if(qi(e)){for(var y="<"+On.call(String(e.nodeName)),h=e.attributes||[],b=0;b<h.length;b++)y+=" "+h[b].name+"="+_n(Mi(h[b].value),"double",a);return y+=">",e.childNodes&&e.childNodes.length&&(y+="..."),y+="</"+On.call(String(e.nodeName))+">",y}if(vt(e)){if(e.length===0)return"[]";var w=Mr(e,v);return g&&!zi(w)?"["+gt(w,g)+"]":"[ "+fe.call(w,", ")+" ]"}if(_i(e)){var x=Mr(e,v);return!("cause"in Error.prototype)&&"cause"in e&&!$n.call(e,"cause")?"{ ["+String(e)+"] "+fe.call(An.call("[cause]: "+v(e.cause),x),", ")+" }":x.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+fe.call(x,", ")+" }"}if(typeof e=="object"&&l){if(In&&typeof e[In]=="function"&&mt)return mt(e,{depth:s-n});if(l!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Ui(e)){var P=[];return En&&En.call(e,function(C,T){P.push(v(T,e,!0)+" => "+v(C,e))}),Ln("Map",Cr.call(e),P,g)}if(Hi(e)){var D=[];return Sn&&Sn.call(e,function(C){D.push(v(C,e))}),Ln("Set",Fr.call(e),D,g)}if(Bi(e))return ht("WeakMap");if(Vi(e))return ht("WeakSet");if(Ri(e))return ht("WeakRef");if(ki(e))return fr(v(Number(e)));if(ji(e))return fr(v(dt.call(e)));if(Ni(e))return fr(Oi.call(e));if(Di(e))return fr(v(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof Qr<"u"&&e===Qr)return"{ [object globalThis] }";if(!Ii(e)&&!Dn(e)){var _=Mr(e,v),U=Cn?Cn(e)===Object.prototype:e instanceof Object||e.constructor===Object,H=e instanceof Object?"":"null prototype",j=!U&&Q&&Object(e)===e&&Q in e?ft.call(xe(e),8,-1):H?"Object":"",z=U||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",V=z+(j||H?"["+fe.call(An.call([],j||[],H||[]),": ")+"] ":"");return _.length===0?V+"{}":g?V+"{"+gt(_,g)+"}":V+"{ "+fe.call(_,", ")+" }"}return String(e)};function _n(r,e,t){var n=(t.quoteStyle||e)==="double"?'"':"'";return n+r+n}function Mi(r){return Ee.call(String(r),/"/g,""")}function vt(r){return xe(r)==="[object Array]"&&(!Q||!(typeof r=="object"&&Q in r))}function Ii(r){return xe(r)==="[object Date]"&&(!Q||!(typeof r=="object"&&Q in r))}function Dn(r){return xe(r)==="[object RegExp]"&&(!Q||!(typeof r=="object"&&Q in r))}function _i(r){return xe(r)==="[object Error]"&&(!Q||!(typeof r=="object"&&Q in r))}function Di(r){return xe(r)==="[object String]"&&(!Q||!(typeof r=="object"&&Q in r))}function ki(r){return xe(r)==="[object Number]"&&(!Q||!(typeof r=="object"&&Q in r))}function Ni(r){return xe(r)==="[object Boolean]"&&(!Q||!(typeof r=="object"&&Q in r))}function kn(r){if(Ke)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!yt)return!1;try{return yt.call(r),!0}catch{}return!1}function ji(r){if(!r||typeof r!="object"||!dt)return!1;try{return dt.call(r),!0}catch{}return!1}var Li=Object.prototype.hasOwnProperty||function(r){return r in this};function Se(r,e){return Li.call(r,e)}function xe(r){return Pi.call(r)}function Wi(r){if(r.name)return r.name;var e=Ti.call(Ai.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function Nn(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t;return-1}function Ui(r){if(!Cr||!r||typeof r!="object")return!1;try{Cr.call(r);try{Fr.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function Bi(r){if(!sr||!r||typeof r!="object")return!1;try{sr.call(r,sr);try{cr.call(r,cr)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function Ri(r){if(!xn||!r||typeof r!="object")return!1;try{return xn.call(r),!0}catch{}return!1}function Hi(r){if(!Fr||!r||typeof r!="object")return!1;try{Fr.call(r);try{Cr.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function Vi(r){if(!cr||!r||typeof r!="object")return!1;try{cr.call(r,cr);try{sr.call(r,sr)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function qi(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function jn(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return jn(ft.call(r,0,e.maxStringLength),e)+n}var o=Ee.call(Ee.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Gi);return _n(o,"single",e)}function Gi(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+$i.call(e.toString(16))}function fr(r){return"Object("+r+")"}function ht(r){return r+" { ? }"}function Ln(r,e,t,n){var o=n?gt(t,n):fe.call(t,", ");return r+" ("+e+") {"+o+"}"}function zi(r){for(var e=0;e<r.length;e++)if(Nn(r[e],`
|
|
31
|
+
`)>=0)return!1;return!0}function Yi(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=fe.call(Array(r.indent+1)," ");else return null;return{base:t,prev:fe.call(Array(e+1),t)}}function gt(r,e){if(r.length===0)return"";var t=`
|
|
32
32
|
`+e.prev+e.base;return t+fe.call(r,","+t)+`
|
|
33
|
-
`+e.prev}function Fr(r,e){var t=mt(r),n=[];if(t){n.length=r.length;for(var o=0;o<r.length;o++)n[o]=Se(r,o)?e(r[o],r):""}var a=typeof dt=="function"?dt(r):[],l;if(Ye){l={};for(var u=0;u<a.length;u++)l["$"+a[u]]=a[u]}for(var i in r)Se(r,i)&&(t&&String(Number(i))===i&&i<r.length||Ye&&l["$"+i]instanceof Symbol||(On.call(/[^\w$]/,i)?n.push(e(i,r)+": "+e(r[i],r)):n.push(i+": "+e(r[i],r))));if(typeof dt=="function")for(var p=0;p<a.length;p++)Tn.call(r,a[p])&&n.push("["+e(a[p])+"]: "+e(r[a[p]],r));return n}var Ln=Ge,Ke=bi,Ki=Fi,Xi=lr,Mr=Ln("%WeakMap%",!0),Ir=Ln("%Map%",!0),Ji=Ke("WeakMap.prototype.get",!0),Qi=Ke("WeakMap.prototype.set",!0),Zi=Ke("WeakMap.prototype.has",!0),el=Ke("Map.prototype.get",!0),rl=Ke("Map.prototype.set",!0),tl=Ke("Map.prototype.has",!0),gt=function(r,e){for(var t=r,n;(n=t.next)!==null;t=n)if(n.key===e)return t.next=n.next,n.next=r.next,r.next=n,n},nl=function(r,e){var t=gt(r,e);return t&&t.value},ol=function(r,e,t){var n=gt(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},al=function(r,e){return!!gt(r,e)},il=function(){var e,t,n,o={assert:function(a){if(!o.has(a))throw new Xi("Side channel does not contain "+Ki(a))},get:function(a){if(Mr&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Ji(e,a)}else if(Ir){if(t)return el(t,a)}else if(n)return nl(n,a)},has:function(a){if(Mr&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Zi(e,a)}else if(Ir){if(t)return tl(t,a)}else if(n)return al(n,a);return!1},set:function(a,l){Mr&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new Mr),Qi(e,a,l)):Ir?(t||(t=new Ir),rl(t,a,l)):(n||(n={key:{},next:null}),ol(n,a,l))}};return o},ll=String.prototype.replace,ul=/%20/g,bt={RFC1738:"RFC1738",RFC3986:"RFC3986"},wt={default:bt.RFC3986,formatters:{RFC1738:function(r){return ll.call(r,ul,"+")},RFC3986:function(r){return String(r)}},RFC1738:bt.RFC1738,RFC3986:bt.RFC3986},sl=wt,Et=Object.prototype.hasOwnProperty,Fe=Array.isArray,de=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),cl=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(Fe(n)){for(var o=[],a=0;a<n.length;++a)typeof n[a]<"u"&&o.push(n[a]);t.obj[t.prop]=o}}},Wn=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},o=0;o<e.length;++o)typeof e[o]<"u"&&(n[o]=e[o]);return n},fl=function r(e,t,n){if(!t)return e;if(typeof t!="object"){if(Fe(e))e.push(t);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Et.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var o=e;return Fe(e)&&!Fe(t)&&(o=Wn(e,n)),Fe(e)&&Fe(t)?(t.forEach(function(a,l){if(Et.call(e,l)){var u=e[l];u&&typeof u=="object"&&a&&typeof a=="object"?e[l]=r(u,a,n):e.push(a)}else e[l]=a}),e):Object.keys(t).reduce(function(a,l){var u=t[l];return Et.call(a,l)?a[l]=r(a[l],u,n):a[l]=u,a},o)},dl=function(e,t){return Object.keys(t).reduce(function(n,o){return n[o]=t[o],n},e)},pl=function(r,e,t){var n=r.replace(/\+/g," ");if(t==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},St=1024,yl=function(e,t,n,o,a){if(e.length===0)return e;var l=e;if(typeof e=="symbol"?l=Symbol.prototype.toString.call(e):typeof e!="string"&&(l=String(e)),n==="iso-8859-1")return escape(l).replace(/%u[0-9a-f]{4}/gi,function(E){return"%26%23"+parseInt(E.slice(2),16)+"%3B"});for(var u="",i=0;i<l.length;i+=St){for(var p=l.length>=St?l.slice(i,i+St):l,s=[],b=0;b<p.length;++b){var v=p.charCodeAt(b);if(v===45||v===46||v===95||v===126||v>=48&&v<=57||v>=65&&v<=90||v>=97&&v<=122||a===sl.RFC1738&&(v===40||v===41)){s[s.length]=p.charAt(b);continue}if(v<128){s[s.length]=de[v];continue}if(v<2048){s[s.length]=de[192|v>>6]+de[128|v&63];continue}if(v<55296||v>=57344){s[s.length]=de[224|v>>12]+de[128|v>>6&63]+de[128|v&63];continue}b+=1,v=65536+((v&1023)<<10|p.charCodeAt(b)&1023),s[s.length]=de[240|v>>18]+de[128|v>>12&63]+de[128|v>>6&63]+de[128|v&63]}u+=s.join("")}return u},ml=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],o=0;o<t.length;++o)for(var a=t[o],l=a.obj[a.prop],u=Object.keys(l),i=0;i<u.length;++i){var p=u[i],s=l[p];typeof s=="object"&&s!==null&&n.indexOf(s)===-1&&(t.push({obj:l,prop:p}),n.push(s))}return cl(t),e},vl=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},hl=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},gl=function(e,t){return[].concat(e,t)},bl=function(e,t){if(Fe(e)){for(var n=[],o=0;o<e.length;o+=1)n.push(t(e[o]));return n}return t(e)},Un={arrayToObject:Wn,assign:dl,combine:gl,compact:ml,decode:pl,encode:yl,isBuffer:hl,isRegExp:vl,maybeMap:bl,merge:fl},Bn=il,_r=Un,dr=wt,wl=Object.prototype.hasOwnProperty,Rn={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},pe=Array.isArray,El=Array.prototype.push,Hn=function(r,e){El.apply(r,pe(e)?e:[e])},Sl=Date.prototype.toISOString,Vn=dr.default,K={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:_r.encode,encodeValuesOnly:!1,format:Vn,formatter:dr.formatters[Vn],indices:!1,serializeDate:function(e){return Sl.call(e)},skipNulls:!1,strictNullHandling:!1},xl=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},xt={},Ol=function r(e,t,n,o,a,l,u,i,p,s,b,v,E,d,m,y,h,g){for(var w=e,x=g,P=0,D=!1;(x=x.get(xt))!==void 0&&!D;){var _=x.get(e);if(P+=1,typeof _<"u"){if(_===P)throw new RangeError("Cyclic object value");D=!0}typeof x.get(xt)>"u"&&(P=0)}if(typeof s=="function"?w=s(t,w):w instanceof Date?w=E(w):n==="comma"&&pe(w)&&(w=_r.maybeMap(w,function(se){return se instanceof Date?E(se):se})),w===null){if(l)return p&&!y?p(t,K.encoder,h,"key",d):t;w=""}if(xl(w)||_r.isBuffer(w)){if(p){var U=y?t:p(t,K.encoder,h,"key",d);return[m(U)+"="+m(p(w,K.encoder,h,"value",d))]}return[m(t)+"="+m(String(w))]}var H=[];if(typeof w>"u")return H;var j;if(n==="comma"&&pe(w))y&&p&&(w=_r.maybeMap(w,p)),j=[{value:w.length>0?w.join(",")||null:void 0}];else if(pe(s))j=s;else{var z=Object.keys(w);j=b?z.sort(b):z}var V=i?t.replace(/\./g,"%2E"):t,C=o&&pe(w)&&w.length===1?V+"[]":V;if(a&&pe(w)&&w.length===0)return C+"[]";for(var T=0;T<j.length;++T){var k=j[T],oe=typeof k=="object"&&typeof k.value<"u"?k.value:w[k];if(!(u&&oe===null)){var ue=v&&i?k.replace(/\./g,"%2E"):k,me=pe(w)?typeof n=="function"?n(C,ue):C:C+(v?"."+ue:"["+ue+"]");g.set(e,P);var Z=Bn();Z.set(xt,g),Hn(H,r(oe,me,n,o,a,l,u,i,n==="comma"&&y&&pe(w)?null:p,s,b,v,E,d,m,y,h,Z))}}return H},Pl=function(e){if(!e)return K;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||K.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=dr.default;if(typeof e.format<"u"){if(!wl.call(dr.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var o=dr.formatters[n],a=K.filter;(typeof e.filter=="function"||pe(e.filter))&&(a=e.filter);var l;if(e.arrayFormat in Rn?l=e.arrayFormat:"indices"in e?l=e.indices?"indices":"repeat":l=K.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:K.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:K.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:K.allowEmptyArrays,arrayFormat:l,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:K.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?K.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:K.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:K.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:K.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:K.encodeValuesOnly,filter:a,format:n,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:K.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:K.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:K.strictNullHandling}},Al=function(r,e){var t=r,n=Pl(e),o,a;typeof n.filter=="function"?(a=n.filter,t=a("",t)):pe(n.filter)&&(a=n.filter,o=a);var l=[];if(typeof t!="object"||t===null)return"";var u=Rn[n.arrayFormat],i=u==="comma"&&n.commaRoundTrip;o||(o=Object.keys(t)),n.sort&&o.sort(n.sort);for(var p=Bn(),s=0;s<o.length;++s){var b=o[s];n.skipNulls&&t[b]===null||Hn(l,Ol(t[b],b,u,i,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,p))}var v=l.join(n.delimiter),E=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?E+="utf8=%26%2310003%3B&":E+="utf8=%E2%9C%93&"),v.length>0?E+v:""},Xe=Un,Ot=Object.prototype.hasOwnProperty,Tl=Array.isArray,R={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Xe.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},$l=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},qn=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},Cl="utf8=%26%2310003%3B",Fl="utf8=%E2%9C%93",Ml=function(e,t){var n={__proto__:null},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=t.parameterLimit===1/0?void 0:t.parameterLimit,l=o.split(t.delimiter,a),u=-1,i,p=t.charset;if(t.charsetSentinel)for(i=0;i<l.length;++i)l[i].indexOf("utf8=")===0&&(l[i]===Fl?p="utf-8":l[i]===Cl&&(p="iso-8859-1"),u=i,i=l.length);for(i=0;i<l.length;++i)if(i!==u){var s=l[i],b=s.indexOf("]="),v=b===-1?s.indexOf("="):b+1,E,d;v===-1?(E=t.decoder(s,R.decoder,p,"key"),d=t.strictNullHandling?null:""):(E=t.decoder(s.slice(0,v),R.decoder,p,"key"),d=Xe.maybeMap(qn(s.slice(v+1),t),function(y){return t.decoder(y,R.decoder,p,"value")})),d&&t.interpretNumericEntities&&p==="iso-8859-1"&&(d=$l(d)),s.indexOf("[]=")>-1&&(d=Tl(d)?[d]:d);var m=Ot.call(n,E);m&&t.duplicates==="combine"?n[E]=Xe.combine(n[E],d):(!m||t.duplicates==="last")&&(n[E]=d)}return n},Il=function(r,e,t,n){for(var o=n?e:qn(e,t),a=r.length-1;a>=0;--a){var l,u=r[a];if(u==="[]"&&t.parseArrays)l=t.allowEmptyArrays&&(o===""||t.strictNullHandling&&o===null)?[]:[].concat(o);else{l=t.plainObjects?Object.create(null):{};var i=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,p=t.decodeDotInKeys?i.replace(/%2E/g,"."):i,s=parseInt(p,10);!t.parseArrays&&p===""?l={0:o}:!isNaN(s)&&u!==p&&String(s)===p&&s>=0&&t.parseArrays&&s<=t.arrayLimit?(l=[],l[s]=o):p!=="__proto__"&&(l[p]=o)}o=l}return o},_l=function(e,t,n,o){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,l=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,i=n.depth>0&&l.exec(a),p=i?a.slice(0,i.index):a,s=[];if(p){if(!n.plainObjects&&Ot.call(Object.prototype,p)&&!n.allowPrototypes)return;s.push(p)}for(var b=0;n.depth>0&&(i=u.exec(a))!==null&&b<n.depth;){if(b+=1,!n.plainObjects&&Ot.call(Object.prototype,i[1].slice(1,-1))&&!n.allowPrototypes)return;s.push(i[1])}if(i){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");s.push("["+a.slice(i.index)+"]")}return Il(s,t,n,o)}},Dl=function(e){if(!e)return R;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?R.charset:e.charset,n=typeof e.duplicates>"u"?R.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:R.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:R.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:R.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:R.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:R.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:R.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:R.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:R.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:R.decoder,delimiter:typeof e.delimiter=="string"||Xe.isRegExp(e.delimiter)?e.delimiter:R.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:R.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:R.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:R.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:R.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:R.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:R.strictNullHandling}},kl=function(r,e){var t=Dl(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var n=typeof r=="string"?Ml(r,t):r,o=t.plainObjects?Object.create(null):{},a=Object.keys(n),l=0;l<a.length;++l){var u=a[l],i=_l(u,n[u],t,typeof r=="string");o=Xe.merge(o,i,t)}return t.allowSparse===!0?o:Xe.compact(o)},Nl=Al,jl=kl,Ll=wt,Gn={formats:Ll,parse:jl,stringify:Nl},Wl={exports:{}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
|
34
|
-
* @license MIT */(function(r,e){(function(t,n){r.exports=n()})(Jr,function(){var t={};t.version="0.2.0";var n=t.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};t.configure=function(d){var m,y;for(m in d)y=d[m],y!==void 0&&d.hasOwnProperty(m)&&(n[m]=y);return this},t.status=null,t.set=function(d){var m=t.isStarted();d=o(d,n.minimum,1),t.status=d===1?null:d;var y=t.render(!m),h=y.querySelector(n.barSelector),g=n.speed,w=n.easing;return y.offsetWidth,u(function(x){n.positionUsing===""&&(n.positionUsing=t.getPositioningCSS()),i(h,l(d,g,w)),d===1?(i(y,{transition:"none",opacity:1}),y.offsetWidth,setTimeout(function(){i(y,{transition:"all "+g+"ms linear",opacity:0}),setTimeout(function(){t.remove(),x()},g)},g)):setTimeout(x,g)}),this},t.isStarted=function(){return typeof t.status=="number"},t.start=function(){t.status||t.set(0);var d=function(){setTimeout(function(){t.status&&(t.trickle(),d())},n.trickleSpeed)};return n.trickle&&d(),this},t.done=function(d){return!d&&!t.status?this:t.inc(.3+.5*Math.random()).set(1)},t.inc=function(d){var m=t.status;return m?(typeof d!="number"&&(d=(1-m)*o(Math.random()*m,.1,.95)),m=o(m+d,0,.994),t.set(m)):t.start()},t.trickle=function(){return t.inc(Math.random()*n.trickleRate)},function(){var d=0,m=0;t.promise=function(y){return!y||y.state()==="resolved"?this:(m===0&&t.start(),d++,m++,y.always(function(){m--,m===0?(d=0,t.done()):t.set((d-m)/d)}),this)}}(),t.render=function(d){if(t.isRendered())return document.getElementById("nprogress");s(document.documentElement,"nprogress-busy");var m=document.createElement("div");m.id="nprogress",m.innerHTML=n.template;var y=m.querySelector(n.barSelector),h=d?"-100":a(t.status||0),g=document.querySelector(n.parent),w;return i(y,{transition:"all 0 linear",transform:"translate3d("+h+"%,0,0)"}),n.showSpinner||(w=m.querySelector(n.spinnerSelector),w&&E(w)),g!=document.body&&s(g,"nprogress-custom-parent"),g.appendChild(m),m},t.remove=function(){b(document.documentElement,"nprogress-busy"),b(document.querySelector(n.parent),"nprogress-custom-parent");var d=document.getElementById("nprogress");d&&E(d)},t.isRendered=function(){return!!document.getElementById("nprogress")},t.getPositioningCSS=function(){var d=document.body.style,m="WebkitTransform"in d?"Webkit":"MozTransform"in d?"Moz":"msTransform"in d?"ms":"OTransform"in d?"O":"";return m+"Perspective"in d?"translate3d":m+"Transform"in d?"translate":"margin"};function o(d,m,y){return d<m?m:d>y?y:d}function a(d){return(-1+d)*100}function l(d,m,y){var h;return n.positionUsing==="translate3d"?h={transform:"translate3d("+a(d)+"%,0,0)"}:n.positionUsing==="translate"?h={transform:"translate("+a(d)+"%,0)"}:h={"margin-left":a(d)+"%"},h.transition="all "+m+"ms "+y,h}var u=function(){var d=[];function m(){var y=d.shift();y&&y(m)}return function(y){d.push(y),d.length==1&&m()}}(),i=function(){var d=["Webkit","O","Moz","ms"],m={};function y(x){return x.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(P,D){return D.toUpperCase()})}function h(x){var P=document.body.style;if(x in P)return x;for(var D=d.length,_=x.charAt(0).toUpperCase()+x.slice(1),U;D--;)if(U=d[D]+_,U in P)return U;return x}function g(x){return x=y(x),m[x]||(m[x]=h(x))}function w(x,P,D){P=g(P),x.style[P]=D}return function(x,P){var D=arguments,_,U;if(D.length==2)for(_ in P)U=P[_],U!==void 0&&P.hasOwnProperty(_)&&w(x,_,U);else w(x,D[1],D[2])}}();function p(d,m){var y=typeof d=="string"?d:v(d);return y.indexOf(" "+m+" ")>=0}function s(d,m){var y=v(d),h=y+m;p(y,m)||(d.className=h.substring(1))}function b(d,m){var y=v(d),h;p(d,m)&&(h=y.replace(" "+m+" "," "),d.className=h.substring(1,h.length-1))}function v(d){return(" "+(d.className||"")+" ").replace(/\s+/gi," ")}function E(d){d&&d.parentNode&&d.parentNode.removeChild(d)}return t})})(Wl);function Ul(r,e,t,n="brackets"){let o=/^https?:\/\//.test(e.toString()),a=o||e.toString().startsWith("/"),l=!a&&!e.toString().startsWith("#")&&!e.toString().startsWith("?"),u=e.toString().includes("?")||r==="get"&&Object.keys(t).length,i=e.toString().includes("#"),p=new URL(e.toString(),"http://localhost");return r==="get"&&Object.keys(t).length&&(p.search=Gn.stringify(xa(Gn.parse(p.search,{ignoreQueryPrefix:!0}),t),{encodeValuesOnly:!0,arrayFormat:n}),t={}),[[o?`${p.protocol}//${p.host}`:"",a?p.pathname:"",l?p.pathname.substring(1):"",u?p.search:"",i?p.hash:""].join(""),t]}const Dr=f.createContext(null);Dr.displayName="ModalStackContext";let zn=null,Yn=null,Pt=null,At=null,Kn=[];const Xn=({children:r})=>{const[e,t]=f.useState([]),[n,o]=f.useState({}),a=m=>{t(y=>{const h=m([...y]),g=w=>{var x;return h.length<2?!0:((x=h.map(P=>({id:P.id,shouldRender:P.shouldRender})).reverse().find(P=>P.shouldRender))==null?void 0:x.id)===w};return h.forEach((w,x)=>{h[x].onTopOfStack=g(w.id),h[x].getParentModal=()=>x<1?null:h.slice(0,x).reverse().find(P=>P.isOpen),h[x].getChildModal=()=>x===h.length-1?null:h.slice(x+1).find(P=>P.isOpen)}),h})};f.useEffect(()=>{Kn=e},[e]);class l{constructor(y,h,g,w,x){ce(this,"update",(y,h,g)=>{a(w=>w.map(x=>(x.id===this.id&&(x.config=y,x.onCloseCallback=h,x.afterLeaveCallback=g),x)))});ce(this,"show",()=>{a(y=>y.map(h=>(h.id===this.id&&!h.isOpen&&(h.isOpen=!0,h.shouldRender=!0),h)))});ce(this,"setOpen",y=>{y?this.show():this.close()});ce(this,"close",()=>{a(y=>y.map(h=>{var g;return h.id===this.id&&h.isOpen&&(Object.keys(h.listeners).forEach(w=>{h.off(w)}),h.isOpen=!1,(g=h.onCloseCallback)==null||g.call(h)),h}))});ce(this,"afterLeave",()=>{this.isOpen||a(y=>{const h=y.map(g=>{var w;return g.id===this.id&&!g.isOpen&&(g.shouldRender=!1,(w=g.afterLeaveCallback)==null||w.call(g),g.afterLeaveCallback=null),g});return this.index===0?[]:h})});ce(this,"on",(y,h)=>{this.listeners[y]=this.listeners[y]??[],this.listeners[y].push(h)});ce(this,"off",(y,h)=>{var g;h?this.listeners[y]=((g=this.listeners[y])==null?void 0:g.filter(w=>w!==h))??[]:delete this.listeners[y]});ce(this,"emit",(y,...h)=>{var g;(g=this.listeners[y])==null||g.forEach(w=>w(...h))});ce(this,"registerEventListenersFromProps",y=>{const h=[];return Object.keys(y).filter(g=>g.startsWith("on")).forEach(g=>{const w=g.replace(/^on/,"").replace(/^./,x=>x.toLowerCase()).replace(/([A-Z])/g,"-$1").toLowerCase();this.on(w,y[g]),h.push(()=>this.off(w,y[g]))}),()=>h.forEach(g=>g())});ce(this,"reload",(y={})=>{var g;let h=Object.keys(this.response.props);y.only&&(h=Zt(h,y.only)),y.except&&(h=ia(h,y.except)),(g=this.response)!=null&&g.url&&ve.get(this.response.url,{headers:{Accept:"text/html, application/xhtml+xml","X-Inertia":!0,"X-Inertia-Partial-Component":this.response.component,"X-Inertia-Version":this.response.version,"X-Inertia-Partial-Data":h.join(","),"X-InertiaUI-Modal":!0,"X-InertiaUI-Modal-Use-Router":0}}).then(w=>{Object.assign(this.props,w.data.props),a(x=>x)})});this.id=l.generateId(),this.isOpen=!1,this.shouldRender=!1,this.listeners={},this.component=y,this.props=h.props,this.response=h,this.config=g,this.onCloseCallback=w,this.afterLeaveCallback=x,this.index=-1,this.getParentModal=()=>null,this.getChildModal=()=>null,this.onTopOfStack=!0}static generateId(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`inertiaui_modal_${crypto.randomUUID()}`:`inertiaui_modal_${Date.now().toString(36)}_${Math.random().toString(36).substr(2,9)}`}}const u=(m,y={},h=null,g=null)=>Yn(m.component).then(w=>i(w,m,y,h,g)),i=(m,y,h,g,w)=>{const x=new l(m,y,h,g,w);return x.index=e.length,a(P=>[...P,x]),x.show(),x};function p(m,y,h,g){if(!n[m])throw new Error(`The local modal "${m}" has not been registered.`);const w=i(null,{},y,h,g);return w.name=m,n[m].callback(w),w}const s=(m,y={})=>b(m,y.method??"get",y.data??{},y.headers??{},y.config??{},y.onClose,y.onAfterLeave,y.queryStringArrayFormat??"brackets",y.navigate??Or("navigate")),b=(m,y,h={},g={},w={},x=null,P=null,D="brackets",_=!1)=>new Promise((U,H)=>{if(m.startsWith("#")){U(p(m.substring(1),w,x,P));return}const[j,z]=Ul(y,m||"",h,D);let V=_&&e.length===0;if(e.length===0&&(Pt=typeof window<"u"?window.location.href:""),g={...g,Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0,"X-Inertia-Version":zn,"X-InertiaUI-Modal":!0,"X-InertiaUI-Modal-Use-Router":V?1:0},V)return rr.router.visit(j,{method:y,data:z,headers:g,preserveScroll:!0,preserveState:!0,onError:H,onFinish:()=>{ua(()=>At).then(C=>{const T=C.onCloseCallback,k=C.afterLeaveCallback;C.update(w,()=>{x==null||x(),T==null||T()},()=>{P==null||P(),k==null||k()}),U(C),At=null})}});ve({url:j,method:y,data:z,headers:g}).then(C=>U(u(C.data,w,x,P))).catch(C=>{H(C)})}),d={stack:e,localModals:n,push:i,pushFromResponseData:u,closeAll:()=>{Kn.reverse().forEach(m=>m.close())},reset:()=>a(()=>[]),visit:b,visitModal:s,registerLocalModal:(m,y)=>{o(h=>({...h,[m]:{name:m,callback:y}}))},removeLocalModal:m=>{o(y=>{const h={...y};return delete h[m],h})}};return $.jsx(Dr.Provider,{value:d,children:r})},pr=()=>{const r=f.useContext(Dr);if(r===null)throw new Error("useModalStack must be used within a ModalStackProvider");return r},Jn=["closeButton","closeExplicitly","maxWidth","paddingClasses","panelClasses","position","slideover"],Bl=(r,e)=>{e.initialPage&&(zn=e.initialPage.version),e.resolveComponent&&(Yn=e.resolveComponent);const t=({Component:n,props:o,key:a})=>{const l=()=>{const u=f.createElement(n,{key:a,...o});return typeof n.layout=="function"?n.layout(u):Array.isArray(n.layout)?n.layout.concat(u).reverse().reduce((p,s)=>f.createElement(s,o,p)):u};return $.jsxs($.Fragment,{children:[l(),$.jsx(Qn,{})]})};return $.jsx(Xn,{children:$.jsx(r,{...e,children:t})})},Qn=({children:r})=>{const e=f.useContext(Dr);let t=!1,n=!1;f.useEffect(()=>rr.router.on("start",()=>t=!0),[]),f.useEffect(()=>rr.router.on("finish",()=>t=!1),[]),f.useEffect(()=>rr.router.on("navigate",function(a){const l=a.detail.page.props._inertiaui_modal;if(!l){n&&e.closeAll();return}n=l,Pt=l.baseUrl,e.pushFromResponseData(l,{},()=>{if(!l.baseUrl){console.error("No base url in modal response data so cannot navigate back");return}!t&&window.location.href!==l.baseUrl&&rr.router.visit(l.baseUrl,{preserveScroll:!0,preserveState:!0})}).then(u=>{At=u})}),[]);const o=a=>(a.headers["X-InertiaUI-Modal-Base-Url"]=Pt,a);return f.useEffect(()=>(ve.interceptors.request.use(o),()=>ve.interceptors.request.eject(o)),[]),$.jsxs($.Fragment,{children:[r,e.stack.length>0&&$.jsx(Zn,{index:0})]})},Tt=f.createContext(null);Tt.displayName="ModalIndexContext";const $t=()=>{const r=f.useContext(Tt);if(r===void 0)throw new Error("useModalIndex must be used within a ModalIndexProvider");return r},Zn=({index:r})=>{const{stack:e}=pr(),t=f.useMemo(()=>e[r],[e,r]);return(t==null?void 0:t.component)&&$.jsx(Tt.Provider,{value:r,children:$.jsx(t.component,{...t.props,onModalEvent:(...n)=>t.emit(...n)})})},Ct=f.forwardRef(({name:r,children:e,...t},n)=>{const o=$t(),{stack:a,registerLocalModal:l,removeLocalModal:u}=pr(),[i,p]=f.useState(null),s=f.useMemo(()=>r?i:a[o],[r,i,o,a]),b=f.useMemo(()=>{var d;return(d=a.find(m=>m.shouldRender&&m.index>(s==null?void 0:s.index)))==null?void 0:d.index},[o,a]),v=f.useMemo(()=>(s==null?void 0:s.config.slideover)??t.slideover??Or("type")==="slideover",[t.slideover]),E=f.useMemo(()=>({slideover:v,closeButton:t.closeButton??Ue(v,"closeButton"),closeExplicitly:t.closeExplicitly??Ue(v,"closeExplicitly"),maxWidth:t.maxWidth??Ue(v,"maxWidth"),paddingClasses:t.paddingClasses??Ue(v,"paddingClasses"),panelClasses:t.panelClasses??Ue(v,"panelClasses"),position:t.position??Ue(v,"position"),...s==null?void 0:s.config}),[t,s==null?void 0:s.config]);return f.useEffect(()=>{if(r){let d=null;return l(r,m=>{d=m.registerEventListenersFromProps(t),p(m)}),()=>{d==null||d(),d=null,u(r)}}return s.registerEventListenersFromProps(t)},[r]),f.useImperativeHandle(n,()=>({afterLeave:()=>s.afterLeave(),close:()=>s.close(),config:E,emit:(...d)=>s.emit(...d),getChildModal:()=>s.getChildModal(),getParentModal:()=>s.getParentModal(),id:s==null?void 0:s.id,index:s==null?void 0:s.index,isOpen:s==null?void 0:s.isOpen,modalContext:s,onTopOfStack:s==null?void 0:s.onTopOfStack,reload:()=>s.reload(),setOpen:()=>s.setOpen(),shouldRender:s==null?void 0:s.shouldRender}),[s]),(s==null?void 0:s.shouldRender)&&$.jsxs($.Fragment,{children:[typeof e=="function"?e({afterLeave:s.afterLeave,close:s.close,config:E,emit:s.emit,getChildModal:s.getChildModal,getParentModal:s.getParentModal,id:s.id,index:s.index,isOpen:s.isOpen,modalContext:s,onTopOfStack:s.onTopOfStack,reload:s.reload,setOpen:s.setOpen,shouldRender:s.shouldRender}):e,b&&$.jsx(Zn,{index:b})]})});Ct.displayName="HeadlessModal";function eo(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var o=r.length;for(e=0;e<o;e++)r[e]&&(t=eo(r[e]))&&(n&&(n+=" "),n+=t)}else for(t in r)r[t]&&(n&&(n+=" "),n+=t);return n}function kr(){for(var r,e,t=0,n="",o=arguments.length;t<o;t++)(r=arguments[t])&&(e=eo(r))&&(n&&(n+=" "),n+=e);return n}var Rl=Object.defineProperty,Hl=(r,e,t)=>e in r?Rl(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Ft=(r,e,t)=>(Hl(r,typeof e!="symbol"?e+"":e,t),t);let Vl=class{constructor(){Ft(this,"current",this.detect()),Ft(this,"handoffState","pending"),Ft(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Me=new Vl;function Nr(r){return Me.isServer?null:r instanceof Node?r.ownerDocument:r!=null&&r.hasOwnProperty("current")&&r.current instanceof Node?r.current.ownerDocument:document}function jr(r){typeof queueMicrotask=="function"?queueMicrotask(r):Promise.resolve().then(r).catch(e=>setTimeout(()=>{throw e}))}function Oe(){let r=[],e={addEventListener(t,n,o,a){return t.addEventListener(n,o,a),e.add(()=>t.removeEventListener(n,o,a))},requestAnimationFrame(...t){let n=requestAnimationFrame(...t);return e.add(()=>cancelAnimationFrame(n))},nextFrame(...t){return e.requestAnimationFrame(()=>e.requestAnimationFrame(...t))},setTimeout(...t){let n=setTimeout(...t);return e.add(()=>clearTimeout(n))},microTask(...t){let n={current:!0};return jr(()=>{n.current&&t[0]()}),e.add(()=>{n.current=!1})},style(t,n,o){let a=t.style.getPropertyValue(n);return Object.assign(t.style,{[n]:o}),this.add(()=>{Object.assign(t.style,{[n]:a})})},group(t){let n=Oe();return t(n),this.add(()=>n.dispose())},add(t){return r.includes(t)||r.push(t),()=>{let n=r.indexOf(t);if(n>=0)for(let o of r.splice(n,1))o()}},dispose(){for(let t of r.splice(0))t()}};return e}function Mt(){let[r]=f.useState(Oe);return f.useEffect(()=>()=>r.dispose(),[r]),r}let ee=(r,e)=>{Me.isServer?f.useEffect(r,e):f.useLayoutEffect(r,e)};function Ie(r){let e=f.useRef(r);return ee(()=>{e.current=r},[r]),e}let B=function(r){let e=Ie(r);return f.useCallback((...t)=>e.current(...t),[e])},ql=f.createContext(void 0);function Gl(){return f.useContext(ql)}function It(...r){return Array.from(new Set(r.flatMap(e=>typeof e=="string"?e.split(" "):[]))).filter(Boolean).join(" ")}function Pe(r,e,...t){if(r in e){let o=e[r];return typeof o=="function"?o(...t):o}let n=new Error(`Tried to handle "${r}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Pe),n}var Lr=(r=>(r[r.None=0]="None",r[r.RenderStrategy=1]="RenderStrategy",r[r.Static=2]="Static",r))(Lr||{}),Ae=(r=>(r[r.Unmount=0]="Unmount",r[r.Hidden=1]="Hidden",r))(Ae||{});function ae(){let r=Yl();return f.useCallback(e=>zl({mergeRefs:r,...e}),[r])}function zl({ourProps:r,theirProps:e,slot:t,defaultTag:n,features:o,visible:a=!0,name:l,mergeRefs:u}){u=u??Kl;let i=ro(e,r);if(a)return Wr(i,t,n,l,u);let p=o??0;if(p&2){let{static:s=!1,...b}=i;if(s)return Wr(b,t,n,l,u)}if(p&1){let{unmount:s=!0,...b}=i;return Pe(s?0:1,{0(){return null},1(){return Wr({...b,hidden:!0,style:{display:"none"}},t,n,l,u)}})}return Wr(i,t,n,l,u)}function Wr(r,e={},t,n,o){let{as:a=t,children:l,refName:u="ref",...i}=_t(r,["unmount","static"]),p=r.ref!==void 0?{[u]:r.ref}:{},s=typeof l=="function"?l(e):l;"className"in i&&i.className&&typeof i.className=="function"&&(i.className=i.className(e)),i["aria-labelledby"]&&i["aria-labelledby"]===i.id&&(i["aria-labelledby"]=void 0);let b={};if(e){let v=!1,E=[];for(let[d,m]of Object.entries(e))typeof m=="boolean"&&(v=!0),m===!0&&E.push(d.replace(/([A-Z])/g,y=>`-${y.toLowerCase()}`));if(v){b["data-headlessui-state"]=E.join(" ");for(let d of E)b[`data-${d}`]=""}}if(a===f.Fragment&&(Object.keys(_e(i)).length>0||Object.keys(_e(b)).length>0))if(!f.isValidElement(s)||Array.isArray(s)&&s.length>1){if(Object.keys(_e(i)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(_e(i)).concat(Object.keys(_e(b))).map(v=>` - ${v}`).join(`
|
|
33
|
+
`+e.prev}function Mr(r,e){var t=vt(r),n=[];if(t){n.length=r.length;for(var o=0;o<r.length;o++)n[o]=Se(r,o)?e(r[o],r):""}var a=typeof pt=="function"?pt(r):[],l;if(Ke){l={};for(var u=0;u<a.length;u++)l["$"+a[u]]=a[u]}for(var i in r)Se(r,i)&&(t&&String(Number(i))===i&&i<r.length||Ke&&l["$"+i]instanceof Symbol||(Pn.call(/[^\w$]/,i)?n.push(e(i,r)+": "+e(r[i],r)):n.push(i+": "+e(r[i],r))));if(typeof pt=="function")for(var d=0;d<a.length;d++)$n.call(r,a[d])&&n.push("["+e(a[d])+"]: "+e(r[a[d]],r));return n}var Wn=ze,Xe=bi,Ki=Fi,Xi=lr,Ir=Wn("%WeakMap%",!0),_r=Wn("%Map%",!0),Ji=Xe("WeakMap.prototype.get",!0),Qi=Xe("WeakMap.prototype.set",!0),Zi=Xe("WeakMap.prototype.has",!0),el=Xe("Map.prototype.get",!0),rl=Xe("Map.prototype.set",!0),tl=Xe("Map.prototype.has",!0),bt=function(r,e){for(var t=r,n;(n=t.next)!==null;t=n)if(n.key===e)return t.next=n.next,n.next=r.next,r.next=n,n},nl=function(r,e){var t=bt(r,e);return t&&t.value},ol=function(r,e,t){var n=bt(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},al=function(r,e){return!!bt(r,e)},il=function(){var e,t,n,o={assert:function(a){if(!o.has(a))throw new Xi("Side channel does not contain "+Ki(a))},get:function(a){if(Ir&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Ji(e,a)}else if(_r){if(t)return el(t,a)}else if(n)return nl(n,a)},has:function(a){if(Ir&&a&&(typeof a=="object"||typeof a=="function")){if(e)return Zi(e,a)}else if(_r){if(t)return tl(t,a)}else if(n)return al(n,a);return!1},set:function(a,l){Ir&&a&&(typeof a=="object"||typeof a=="function")?(e||(e=new Ir),Qi(e,a,l)):_r?(t||(t=new _r),rl(t,a,l)):(n||(n={key:{},next:null}),ol(n,a,l))}};return o},ll=String.prototype.replace,ul=/%20/g,wt={RFC1738:"RFC1738",RFC3986:"RFC3986"},Et={default:wt.RFC3986,formatters:{RFC1738:function(r){return ll.call(r,ul,"+")},RFC3986:function(r){return String(r)}},RFC1738:wt.RFC1738,RFC3986:wt.RFC3986},sl=Et,St=Object.prototype.hasOwnProperty,Fe=Array.isArray,de=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),cl=function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(Fe(n)){for(var o=[],a=0;a<n.length;++a)typeof n[a]<"u"&&o.push(n[a]);t.obj[t.prop]=o}}},Un=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},o=0;o<e.length;++o)typeof e[o]<"u"&&(n[o]=e[o]);return n},fl=function r(e,t,n){if(!t)return e;if(typeof t!="object"){if(Fe(e))e.push(t);else if(e&&typeof e=="object")(n&&(n.plainObjects||n.allowPrototypes)||!St.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var o=e;return Fe(e)&&!Fe(t)&&(o=Un(e,n)),Fe(e)&&Fe(t)?(t.forEach(function(a,l){if(St.call(e,l)){var u=e[l];u&&typeof u=="object"&&a&&typeof a=="object"?e[l]=r(u,a,n):e.push(a)}else e[l]=a}),e):Object.keys(t).reduce(function(a,l){var u=t[l];return St.call(a,l)?a[l]=r(a[l],u,n):a[l]=u,a},o)},dl=function(e,t){return Object.keys(t).reduce(function(n,o){return n[o]=t[o],n},e)},pl=function(r,e,t){var n=r.replace(/\+/g," ");if(t==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},xt=1024,yl=function(e,t,n,o,a){if(e.length===0)return e;var l=e;if(typeof e=="symbol"?l=Symbol.prototype.toString.call(e):typeof e!="string"&&(l=String(e)),n==="iso-8859-1")return escape(l).replace(/%u[0-9a-f]{4}/gi,function(E){return"%26%23"+parseInt(E.slice(2),16)+"%3B"});for(var u="",i=0;i<l.length;i+=xt){for(var d=l.length>=xt?l.slice(i,i+xt):l,s=[],g=0;g<d.length;++g){var v=d.charCodeAt(g);if(v===45||v===46||v===95||v===126||v>=48&&v<=57||v>=65&&v<=90||v>=97&&v<=122||a===sl.RFC1738&&(v===40||v===41)){s[s.length]=d.charAt(g);continue}if(v<128){s[s.length]=de[v];continue}if(v<2048){s[s.length]=de[192|v>>6]+de[128|v&63];continue}if(v<55296||v>=57344){s[s.length]=de[224|v>>12]+de[128|v>>6&63]+de[128|v&63];continue}g+=1,v=65536+((v&1023)<<10|d.charCodeAt(g)&1023),s[s.length]=de[240|v>>18]+de[128|v>>12&63]+de[128|v>>6&63]+de[128|v&63]}u+=s.join("")}return u},ml=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],o=0;o<t.length;++o)for(var a=t[o],l=a.obj[a.prop],u=Object.keys(l),i=0;i<u.length;++i){var d=u[i],s=l[d];typeof s=="object"&&s!==null&&n.indexOf(s)===-1&&(t.push({obj:l,prop:d}),n.push(s))}return cl(t),e},vl=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},hl=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},gl=function(e,t){return[].concat(e,t)},bl=function(e,t){if(Fe(e)){for(var n=[],o=0;o<e.length;o+=1)n.push(t(e[o]));return n}return t(e)},Bn={arrayToObject:Un,assign:dl,combine:gl,compact:ml,decode:pl,encode:yl,isBuffer:hl,isRegExp:vl,maybeMap:bl,merge:fl},Rn=il,Dr=Bn,dr=Et,wl=Object.prototype.hasOwnProperty,Hn={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},pe=Array.isArray,El=Array.prototype.push,Vn=function(r,e){El.apply(r,pe(e)?e:[e])},Sl=Date.prototype.toISOString,qn=dr.default,K={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Dr.encode,encodeValuesOnly:!1,format:qn,formatter:dr.formatters[qn],indices:!1,serializeDate:function(e){return Sl.call(e)},skipNulls:!1,strictNullHandling:!1},xl=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Ot={},Ol=function r(e,t,n,o,a,l,u,i,d,s,g,v,E,p,m,y,h,b){for(var w=e,x=b,P=0,D=!1;(x=x.get(Ot))!==void 0&&!D;){var _=x.get(e);if(P+=1,typeof _<"u"){if(_===P)throw new RangeError("Cyclic object value");D=!0}typeof x.get(Ot)>"u"&&(P=0)}if(typeof s=="function"?w=s(t,w):w instanceof Date?w=E(w):n==="comma"&&pe(w)&&(w=Dr.maybeMap(w,function(ce){return ce instanceof Date?E(ce):ce})),w===null){if(l)return d&&!y?d(t,K.encoder,h,"key",p):t;w=""}if(xl(w)||Dr.isBuffer(w)){if(d){var U=y?t:d(t,K.encoder,h,"key",p);return[m(U)+"="+m(d(w,K.encoder,h,"value",p))]}return[m(t)+"="+m(String(w))]}var H=[];if(typeof w>"u")return H;var j;if(n==="comma"&&pe(w))y&&d&&(w=Dr.maybeMap(w,d)),j=[{value:w.length>0?w.join(",")||null:void 0}];else if(pe(s))j=s;else{var z=Object.keys(w);j=g?z.sort(g):z}var V=i?t.replace(/\./g,"%2E"):t,C=o&&pe(w)&&w.length===1?V+"[]":V;if(a&&pe(w)&&w.length===0)return C+"[]";for(var T=0;T<j.length;++T){var k=j[T],oe=typeof k=="object"&&typeof k.value<"u"?k.value:w[k];if(!(u&&oe===null)){var se=v&&i?k.replace(/\./g,"%2E"):k,me=pe(w)?typeof n=="function"?n(C,se):C:C+(v?"."+se:"["+se+"]");b.set(e,P);var Z=Rn();Z.set(Ot,b),Vn(H,r(oe,me,n,o,a,l,u,i,n==="comma"&&y&&pe(w)?null:d,s,g,v,E,p,m,y,h,Z))}}return H},Pl=function(e){if(!e)return K;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys<"u"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder<"u"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||K.charset;if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=dr.default;if(typeof e.format<"u"){if(!wl.call(dr.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var o=dr.formatters[n],a=K.filter;(typeof e.filter=="function"||pe(e.filter))&&(a=e.filter);var l;if(e.arrayFormat in Hn?l=e.arrayFormat:"indices"in e?l=e.indices?"indices":"repeat":l=K.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u=typeof e.allowDots>"u"?e.encodeDotInKeys===!0?!0:K.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:K.addQueryPrefix,allowDots:u,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:K.allowEmptyArrays,arrayFormat:l,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:K.charsetSentinel,commaRoundTrip:e.commaRoundTrip,delimiter:typeof e.delimiter>"u"?K.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:K.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:K.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:K.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:K.encodeValuesOnly,filter:a,format:n,formatter:o,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:K.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:K.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:K.strictNullHandling}},Al=function(r,e){var t=r,n=Pl(e),o,a;typeof n.filter=="function"?(a=n.filter,t=a("",t)):pe(n.filter)&&(a=n.filter,o=a);var l=[];if(typeof t!="object"||t===null)return"";var u=Hn[n.arrayFormat],i=u==="comma"&&n.commaRoundTrip;o||(o=Object.keys(t)),n.sort&&o.sort(n.sort);for(var d=Rn(),s=0;s<o.length;++s){var g=o[s];n.skipNulls&&t[g]===null||Vn(l,Ol(t[g],g,u,i,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,d))}var v=l.join(n.delimiter),E=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?E+="utf8=%26%2310003%3B&":E+="utf8=%E2%9C%93&"),v.length>0?E+v:""},Je=Bn,Pt=Object.prototype.hasOwnProperty,Tl=Array.isArray,R={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Je.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1},$l=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},Gn=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},Cl="utf8=%26%2310003%3B",Fl="utf8=%E2%9C%93",Ml=function(e,t){var n={__proto__:null},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=t.parameterLimit===1/0?void 0:t.parameterLimit,l=o.split(t.delimiter,a),u=-1,i,d=t.charset;if(t.charsetSentinel)for(i=0;i<l.length;++i)l[i].indexOf("utf8=")===0&&(l[i]===Fl?d="utf-8":l[i]===Cl&&(d="iso-8859-1"),u=i,i=l.length);for(i=0;i<l.length;++i)if(i!==u){var s=l[i],g=s.indexOf("]="),v=g===-1?s.indexOf("="):g+1,E,p;v===-1?(E=t.decoder(s,R.decoder,d,"key"),p=t.strictNullHandling?null:""):(E=t.decoder(s.slice(0,v),R.decoder,d,"key"),p=Je.maybeMap(Gn(s.slice(v+1),t),function(y){return t.decoder(y,R.decoder,d,"value")})),p&&t.interpretNumericEntities&&d==="iso-8859-1"&&(p=$l(p)),s.indexOf("[]=")>-1&&(p=Tl(p)?[p]:p);var m=Pt.call(n,E);m&&t.duplicates==="combine"?n[E]=Je.combine(n[E],p):(!m||t.duplicates==="last")&&(n[E]=p)}return n},Il=function(r,e,t,n){for(var o=n?e:Gn(e,t),a=r.length-1;a>=0;--a){var l,u=r[a];if(u==="[]"&&t.parseArrays)l=t.allowEmptyArrays&&(o===""||t.strictNullHandling&&o===null)?[]:[].concat(o);else{l=t.plainObjects?Object.create(null):{};var i=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,d=t.decodeDotInKeys?i.replace(/%2E/g,"."):i,s=parseInt(d,10);!t.parseArrays&&d===""?l={0:o}:!isNaN(s)&&u!==d&&String(s)===d&&s>=0&&t.parseArrays&&s<=t.arrayLimit?(l=[],l[s]=o):d!=="__proto__"&&(l[d]=o)}o=l}return o},_l=function(e,t,n,o){if(e){var a=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,l=/(\[[^[\]]*])/,u=/(\[[^[\]]*])/g,i=n.depth>0&&l.exec(a),d=i?a.slice(0,i.index):a,s=[];if(d){if(!n.plainObjects&&Pt.call(Object.prototype,d)&&!n.allowPrototypes)return;s.push(d)}for(var g=0;n.depth>0&&(i=u.exec(a))!==null&&g<n.depth;){if(g+=1,!n.plainObjects&&Pt.call(Object.prototype,i[1].slice(1,-1))&&!n.allowPrototypes)return;s.push(i[1])}if(i){if(n.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+n.depth+" and strictDepth is true");s.push("["+a.slice(i.index)+"]")}return Il(s,t,n,o)}},Dl=function(e){if(!e)return R;if(typeof e.allowEmptyArrays<"u"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys<"u"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder<"u"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset<"u"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset>"u"?R.charset:e.charset,n=typeof e.duplicates>"u"?R.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof e.allowDots>"u"?e.decodeDotInKeys===!0?!0:R.allowDots:!!e.allowDots;return{allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:R.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:R.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:R.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:R.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:R.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:R.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:R.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:R.decoder,delimiter:typeof e.delimiter=="string"||Je.isRegExp(e.delimiter)?e.delimiter:R.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:R.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:R.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:R.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:R.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:R.strictDepth,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:R.strictNullHandling}},kl=function(r,e){var t=Dl(e);if(r===""||r===null||typeof r>"u")return t.plainObjects?Object.create(null):{};for(var n=typeof r=="string"?Ml(r,t):r,o=t.plainObjects?Object.create(null):{},a=Object.keys(n),l=0;l<a.length;++l){var u=a[l],i=_l(u,n[u],t,typeof r=="string");o=Je.merge(o,i,t)}return t.allowSparse===!0?o:Je.compact(o)},Nl=Al,jl=kl,Ll=Et,zn={formats:Ll,parse:jl,stringify:Nl},Wl={exports:{}};/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
|
|
34
|
+
* @license MIT */(function(r,e){(function(t,n){r.exports=n()})(Qr,function(){var t={};t.version="0.2.0";var n=t.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};t.configure=function(p){var m,y;for(m in p)y=p[m],y!==void 0&&p.hasOwnProperty(m)&&(n[m]=y);return this},t.status=null,t.set=function(p){var m=t.isStarted();p=o(p,n.minimum,1),t.status=p===1?null:p;var y=t.render(!m),h=y.querySelector(n.barSelector),b=n.speed,w=n.easing;return y.offsetWidth,u(function(x){n.positionUsing===""&&(n.positionUsing=t.getPositioningCSS()),i(h,l(p,b,w)),p===1?(i(y,{transition:"none",opacity:1}),y.offsetWidth,setTimeout(function(){i(y,{transition:"all "+b+"ms linear",opacity:0}),setTimeout(function(){t.remove(),x()},b)},b)):setTimeout(x,b)}),this},t.isStarted=function(){return typeof t.status=="number"},t.start=function(){t.status||t.set(0);var p=function(){setTimeout(function(){t.status&&(t.trickle(),p())},n.trickleSpeed)};return n.trickle&&p(),this},t.done=function(p){return!p&&!t.status?this:t.inc(.3+.5*Math.random()).set(1)},t.inc=function(p){var m=t.status;return m?(typeof p!="number"&&(p=(1-m)*o(Math.random()*m,.1,.95)),m=o(m+p,0,.994),t.set(m)):t.start()},t.trickle=function(){return t.inc(Math.random()*n.trickleRate)},function(){var p=0,m=0;t.promise=function(y){return!y||y.state()==="resolved"?this:(m===0&&t.start(),p++,m++,y.always(function(){m--,m===0?(p=0,t.done()):t.set((p-m)/p)}),this)}}(),t.render=function(p){if(t.isRendered())return document.getElementById("nprogress");s(document.documentElement,"nprogress-busy");var m=document.createElement("div");m.id="nprogress",m.innerHTML=n.template;var y=m.querySelector(n.barSelector),h=p?"-100":a(t.status||0),b=document.querySelector(n.parent),w;return i(y,{transition:"all 0 linear",transform:"translate3d("+h+"%,0,0)"}),n.showSpinner||(w=m.querySelector(n.spinnerSelector),w&&E(w)),b!=document.body&&s(b,"nprogress-custom-parent"),b.appendChild(m),m},t.remove=function(){g(document.documentElement,"nprogress-busy"),g(document.querySelector(n.parent),"nprogress-custom-parent");var p=document.getElementById("nprogress");p&&E(p)},t.isRendered=function(){return!!document.getElementById("nprogress")},t.getPositioningCSS=function(){var p=document.body.style,m="WebkitTransform"in p?"Webkit":"MozTransform"in p?"Moz":"msTransform"in p?"ms":"OTransform"in p?"O":"";return m+"Perspective"in p?"translate3d":m+"Transform"in p?"translate":"margin"};function o(p,m,y){return p<m?m:p>y?y:p}function a(p){return(-1+p)*100}function l(p,m,y){var h;return n.positionUsing==="translate3d"?h={transform:"translate3d("+a(p)+"%,0,0)"}:n.positionUsing==="translate"?h={transform:"translate("+a(p)+"%,0)"}:h={"margin-left":a(p)+"%"},h.transition="all "+m+"ms "+y,h}var u=function(){var p=[];function m(){var y=p.shift();y&&y(m)}return function(y){p.push(y),p.length==1&&m()}}(),i=function(){var p=["Webkit","O","Moz","ms"],m={};function y(x){return x.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(P,D){return D.toUpperCase()})}function h(x){var P=document.body.style;if(x in P)return x;for(var D=p.length,_=x.charAt(0).toUpperCase()+x.slice(1),U;D--;)if(U=p[D]+_,U in P)return U;return x}function b(x){return x=y(x),m[x]||(m[x]=h(x))}function w(x,P,D){P=b(P),x.style[P]=D}return function(x,P){var D=arguments,_,U;if(D.length==2)for(_ in P)U=P[_],U!==void 0&&P.hasOwnProperty(_)&&w(x,_,U);else w(x,D[1],D[2])}}();function d(p,m){var y=typeof p=="string"?p:v(p);return y.indexOf(" "+m+" ")>=0}function s(p,m){var y=v(p),h=y+m;d(y,m)||(p.className=h.substring(1))}function g(p,m){var y=v(p),h;d(p,m)&&(h=y.replace(" "+m+" "," "),p.className=h.substring(1,h.length-1))}function v(p){return(" "+(p.className||"")+" ").replace(/\s+/gi," ")}function E(p){p&&p.parentNode&&p.parentNode.removeChild(p)}return t})})(Wl);function Ul(r,e,t,n="brackets"){let o=/^https?:\/\//.test(e.toString()),a=o||e.toString().startsWith("/"),l=!a&&!e.toString().startsWith("#")&&!e.toString().startsWith("?"),u=e.toString().includes("?")||r==="get"&&Object.keys(t).length,i=e.toString().includes("#"),d=new URL(e.toString(),"http://localhost");return r==="get"&&Object.keys(t).length&&(d.search=zn.stringify(xa(zn.parse(d.search,{ignoreQueryPrefix:!0}),t),{encodeValuesOnly:!0,arrayFormat:n}),t={}),[[o?`${d.protocol}//${d.host}`:"",a?d.pathname:"",l?d.pathname.substring(1):"",u?d.search:"",i?d.hash:""].join(""),t]}const kr=f.createContext(null);kr.displayName="ModalStackContext";let Yn=null,Kn=null,pr=null,At=null,Tt=[];const Xn=({children:r})=>{const[e,t]=f.useState([]),[n,o]=f.useState({}),a=m=>{t(y=>{const h=m([...y]),b=w=>{var x;return h.length<2?!0:((x=h.map(P=>({id:P.id,shouldRender:P.shouldRender})).reverse().find(P=>P.shouldRender))==null?void 0:x.id)===w};return h.forEach((w,x)=>{h[x].onTopOfStack=b(w.id),h[x].getParentModal=()=>x<1?null:h.slice(0,x).reverse().find(P=>P.isOpen),h[x].getChildModal=()=>x===h.length-1?null:h.slice(x+1).find(P=>P.isOpen)}),h})};f.useEffect(()=>{Tt=e},[e]);class l{constructor(y,h,b,w,x){le(this,"update",(y,h,b)=>{a(w=>w.map(x=>(x.id===this.id&&(x.config=y,x.onCloseCallback=h,x.afterLeaveCallback=b),x)))});le(this,"show",()=>{a(y=>y.map(h=>(h.id===this.id&&!h.isOpen&&(h.isOpen=!0,h.shouldRender=!0),h)))});le(this,"setOpen",y=>{y?this.show():this.close()});le(this,"close",()=>{a(y=>y.map(h=>{var b;return h.id===this.id&&h.isOpen&&(Object.keys(h.listeners).forEach(w=>{h.off(w)}),h.isOpen=!1,(b=h.onCloseCallback)==null||b.call(h)),h}))});le(this,"afterLeave",()=>{this.isOpen||a(y=>{const h=y.map(b=>{var w;return b.id===this.id&&!b.isOpen&&(b.shouldRender=!1,(w=b.afterLeaveCallback)==null||w.call(b),b.afterLeaveCallback=null),b});return this.index===0?[]:h})});le(this,"on",(y,h)=>{this.listeners[y]=this.listeners[y]??[],this.listeners[y].push(h)});le(this,"off",(y,h)=>{var b;h?this.listeners[y]=((b=this.listeners[y])==null?void 0:b.filter(w=>w!==h))??[]:delete this.listeners[y]});le(this,"emit",(y,...h)=>{var b;(b=this.listeners[y])==null||b.forEach(w=>w(...h))});le(this,"registerEventListenersFromProps",y=>{const h=[];return Object.keys(y).filter(b=>b.startsWith("on")).forEach(b=>{const w=b.replace(/^on/,"").replace(/^./,x=>x.toLowerCase()).replace(/([A-Z])/g,"-$1").toLowerCase();this.on(w,y[b]),h.push(()=>this.off(w,y[b]))}),()=>h.forEach(b=>b())});le(this,"reload",(y={})=>{var b;let h=Object.keys(this.response.props);y.only&&(h=en(h,y.only)),y.except&&(h=ia(h,y.except)),(b=this.response)!=null&&b.url&&ve.get(this.response.url,{headers:{Accept:"text/html, application/xhtml+xml","X-Inertia":!0,"X-Inertia-Partial-Component":this.response.component,"X-Inertia-Version":this.response.version,"X-Inertia-Partial-Data":h.join(","),"X-InertiaUI-Modal":!0,"X-InertiaUI-Modal-Use-Router":0,"X-InertiaUI-Modal-Base-Url":pr}}).then(w=>{this.updateProps(w.data.props)})});le(this,"updateProps",y=>{Object.assign(this.props,y),a(h=>h)});this.id=l.generateId(),this.isOpen=!1,this.shouldRender=!1,this.listeners={},this.component=y,this.props=h.props,this.response=h,this.config=b,this.onCloseCallback=w,this.afterLeaveCallback=x,this.index=-1,this.getParentModal=()=>null,this.getChildModal=()=>null,this.onTopOfStack=!0}static generateId(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`inertiaui_modal_${crypto.randomUUID()}`:`inertiaui_modal_${Date.now().toString(36)}_${Math.random().toString(36).substr(2,9)}`}}const u=(m,y={},h=null,b=null)=>Kn(m.component).then(w=>i(w,m,y,h,b)),i=(m,y,h,b,w)=>{const x=new l(m,y,h,b,w);return x.index=e.length,a(P=>[...P,x]),x.show(),x};function d(m,y,h,b){if(!n[m])throw new Error(`The local modal "${m}" has not been registered.`);const w=i(null,{},y,h,b);return w.name=m,n[m].callback(w),w}const s=(m,y={})=>g(m,y.method??"get",y.data??{},y.headers??{},y.config??{},y.onClose,y.onAfterLeave,y.queryStringArrayFormat??"brackets",y.navigate??Pr("navigate")),g=(m,y,h={},b={},w={},x=null,P=null,D="brackets",_=!1)=>new Promise((U,H)=>{if(m.startsWith("#")){U(d(m.substring(1),w,x,P));return}const[j,z]=Ul(y,m||"",h,D);let V=_&&e.length===0;if(e.length===0&&(pr=typeof window<"u"?window.location.href:""),b={...b,Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0,"X-Inertia-Version":Yn,"X-InertiaUI-Modal":!0,"X-InertiaUI-Modal-Use-Router":V?1:0,"X-InertiaUI-Modal-Base-Url":pr},V)return At=null,Ue.router.visit(j,{method:y,data:z,headers:b,preserveScroll:!0,preserveState:!0,onError:H,onFinish:()=>{ua(()=>At).then(C=>{const T=C.onCloseCallback,k=C.afterLeaveCallback;C.update(w,()=>{x==null||x(),T==null||T()},()=>{P==null||P(),k==null||k()}),U(C)})}});ve({url:j,method:y,data:z,headers:b}).then(C=>U(u(C.data,w,x,P))).catch(C=>{H(C)})}),p={stack:e,localModals:n,push:i,pushFromResponseData:u,closeAll:()=>{Tt.reverse().forEach(m=>m.close())},reset:()=>a(()=>[]),visit:g,visitModal:s,registerLocalModal:(m,y)=>{o(h=>({...h,[m]:{name:m,callback:y}}))},removeLocalModal:m=>{o(y=>{const h={...y};return delete h[m],h})}};return $.jsx(kr.Provider,{value:p,children:r})},yr=()=>{const r=f.useContext(kr);if(r===null)throw new Error("useModalStack must be used within a ModalStackProvider");return r},Jn=["closeButton","closeExplicitly","maxWidth","paddingClasses","panelClasses","position","slideover"],Bl=(r,e)=>{e.initialPage&&(Yn=e.initialPage.version),e.resolveComponent&&(Kn=e.resolveComponent);const t=({Component:n,props:o,key:a})=>{const l=()=>{const u=f.createElement(n,{key:a,...o});return typeof n.layout=="function"?n.layout(u):Array.isArray(n.layout)?n.layout.concat(u).reverse().reduce((d,s)=>f.createElement(s,o,d)):u};return $.jsxs($.Fragment,{children:[l(),$.jsx(Qn,{})]})};return $.jsx(Xn,{children:$.jsx(r,{...e,children:t})})},Qn=({children:r})=>{var u;const e=f.useContext(kr);let t=!1,n=!1;f.useEffect(()=>Ue.router.on("start",()=>t=!0),[]),f.useEffect(()=>Ue.router.on("finish",()=>t=!1),[]),f.useEffect(()=>Ue.router.on("navigate",function(i){const d=i.detail.page.props._inertiaui_modal;if(!d){n&&e.closeAll();return}n=d,pr=d.baseUrl,e.pushFromResponseData(d,{},()=>{if(!d.baseUrl){console.error("No base url in modal response data so cannot navigate back");return}!t&&window.location.href!==d.baseUrl&&Ue.router.visit(d.baseUrl,{preserveScroll:!0,preserveState:!0})}).then(s=>{At=s})}),[]);const o=i=>(Tt.length&&(i.headers["X-InertiaUI-Modal-Base-Url"]=pr),i);f.useEffect(()=>(ve.interceptors.request.use(o),()=>ve.interceptors.request.eject(o)),[]);const a=Ue.usePage(),l=f.useRef();return f.useEffect(()=>{var s,g;const i=(s=a.props)==null?void 0:s._inertiaui_modal,d=l.current;l.current=i,i&&d&&i.component===d.component&&i.url===d.url&&((g=e.stack[0])==null||g.updateProps(i.props??{}))},[(u=a.props)==null?void 0:u._inertiaui_modal]),$.jsxs($.Fragment,{children:[r,e.stack.length>0&&$.jsx(Zn,{index:0})]})},$t=f.createContext(null);$t.displayName="ModalIndexContext";const Ct=()=>{const r=f.useContext($t);if(r===void 0)throw new Error("useModalIndex must be used within a ModalIndexProvider");return r},Zn=({index:r})=>{const{stack:e}=yr(),t=f.useMemo(()=>e[r],[e,r]);return(t==null?void 0:t.component)&&$.jsx($t.Provider,{value:r,children:$.jsx(t.component,{...t.props,onModalEvent:(...n)=>t.emit(...n)})})},Ft=f.forwardRef(({name:r,children:e,...t},n)=>{const o=Ct(),{stack:a,registerLocalModal:l,removeLocalModal:u}=yr(),[i,d]=f.useState(null),s=f.useMemo(()=>r?i:a[o],[r,i,o,a]),g=f.useMemo(()=>{var p;return(p=a.find(m=>m.shouldRender&&m.index>(s==null?void 0:s.index)))==null?void 0:p.index},[o,a]),v=f.useMemo(()=>(s==null?void 0:s.config.slideover)??t.slideover??Pr("type")==="slideover",[t.slideover]),E=f.useMemo(()=>({slideover:v,closeButton:t.closeButton??Be(v,"closeButton"),closeExplicitly:t.closeExplicitly??Be(v,"closeExplicitly"),maxWidth:t.maxWidth??Be(v,"maxWidth"),paddingClasses:t.paddingClasses??Be(v,"paddingClasses"),panelClasses:t.panelClasses??Be(v,"panelClasses"),position:t.position??Be(v,"position"),...s==null?void 0:s.config}),[t,s==null?void 0:s.config]);return f.useEffect(()=>{if(r){let p=null;return l(r,m=>{p=m.registerEventListenersFromProps(t),d(m)}),()=>{p==null||p(),p=null,u(r)}}return s.registerEventListenersFromProps(t)},[r]),f.useImperativeHandle(n,()=>({afterLeave:()=>s.afterLeave(),close:()=>s.close(),config:E,emit:(...p)=>s.emit(...p),getChildModal:()=>s.getChildModal(),getParentModal:()=>s.getParentModal(),id:s==null?void 0:s.id,index:s==null?void 0:s.index,isOpen:s==null?void 0:s.isOpen,modalContext:s,onTopOfStack:s==null?void 0:s.onTopOfStack,reload:()=>s.reload(),setOpen:()=>s.setOpen(),shouldRender:s==null?void 0:s.shouldRender}),[s]),(s==null?void 0:s.shouldRender)&&$.jsxs($.Fragment,{children:[typeof e=="function"?e({afterLeave:s.afterLeave,close:s.close,config:E,emit:s.emit,getChildModal:s.getChildModal,getParentModal:s.getParentModal,id:s.id,index:s.index,isOpen:s.isOpen,modalContext:s,onTopOfStack:s.onTopOfStack,reload:s.reload,setOpen:s.setOpen,shouldRender:s.shouldRender}):e,g&&$.jsx(Zn,{index:g})]})});Ft.displayName="HeadlessModal";function eo(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var o=r.length;for(e=0;e<o;e++)r[e]&&(t=eo(r[e]))&&(n&&(n+=" "),n+=t)}else for(t in r)r[t]&&(n&&(n+=" "),n+=t);return n}function Nr(){for(var r,e,t=0,n="",o=arguments.length;t<o;t++)(r=arguments[t])&&(e=eo(r))&&(n&&(n+=" "),n+=e);return n}var Rl=Object.defineProperty,Hl=(r,e,t)=>e in r?Rl(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Mt=(r,e,t)=>(Hl(r,typeof e!="symbol"?e+"":e,t),t);let Vl=class{constructor(){Mt(this,"current",this.detect()),Mt(this,"handoffState","pending"),Mt(this,"currentId",0)}set(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},Me=new Vl;function jr(r){return Me.isServer?null:r instanceof Node?r.ownerDocument:r!=null&&r.hasOwnProperty("current")&&r.current instanceof Node?r.current.ownerDocument:document}function Lr(r){typeof queueMicrotask=="function"?queueMicrotask(r):Promise.resolve().then(r).catch(e=>setTimeout(()=>{throw e}))}function Oe(){let r=[],e={addEventListener(t,n,o,a){return t.addEventListener(n,o,a),e.add(()=>t.removeEventListener(n,o,a))},requestAnimationFrame(...t){let n=requestAnimationFrame(...t);return e.add(()=>cancelAnimationFrame(n))},nextFrame(...t){return e.requestAnimationFrame(()=>e.requestAnimationFrame(...t))},setTimeout(...t){let n=setTimeout(...t);return e.add(()=>clearTimeout(n))},microTask(...t){let n={current:!0};return Lr(()=>{n.current&&t[0]()}),e.add(()=>{n.current=!1})},style(t,n,o){let a=t.style.getPropertyValue(n);return Object.assign(t.style,{[n]:o}),this.add(()=>{Object.assign(t.style,{[n]:a})})},group(t){let n=Oe();return t(n),this.add(()=>n.dispose())},add(t){return r.includes(t)||r.push(t),()=>{let n=r.indexOf(t);if(n>=0)for(let o of r.splice(n,1))o()}},dispose(){for(let t of r.splice(0))t()}};return e}function It(){let[r]=f.useState(Oe);return f.useEffect(()=>()=>r.dispose(),[r]),r}let ee=(r,e)=>{Me.isServer?f.useEffect(r,e):f.useLayoutEffect(r,e)};function Ie(r){let e=f.useRef(r);return ee(()=>{e.current=r},[r]),e}let B=function(r){let e=Ie(r);return f.useCallback((...t)=>e.current(...t),[e])},ql=f.createContext(void 0);function Gl(){return f.useContext(ql)}function _t(...r){return Array.from(new Set(r.flatMap(e=>typeof e=="string"?e.split(" "):[]))).filter(Boolean).join(" ")}function Pe(r,e,...t){if(r in e){let o=e[r];return typeof o=="function"?o(...t):o}let n=new Error(`Tried to handle "${r}" but there is no handler defined. Only defined handlers are: ${Object.keys(e).map(o=>`"${o}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Pe),n}var Wr=(r=>(r[r.None=0]="None",r[r.RenderStrategy=1]="RenderStrategy",r[r.Static=2]="Static",r))(Wr||{}),Ae=(r=>(r[r.Unmount=0]="Unmount",r[r.Hidden=1]="Hidden",r))(Ae||{});function ae(){let r=Yl();return f.useCallback(e=>zl({mergeRefs:r,...e}),[r])}function zl({ourProps:r,theirProps:e,slot:t,defaultTag:n,features:o,visible:a=!0,name:l,mergeRefs:u}){u=u??Kl;let i=ro(e,r);if(a)return Ur(i,t,n,l,u);let d=o??0;if(d&2){let{static:s=!1,...g}=i;if(s)return Ur(g,t,n,l,u)}if(d&1){let{unmount:s=!0,...g}=i;return Pe(s?0:1,{0(){return null},1(){return Ur({...g,hidden:!0,style:{display:"none"}},t,n,l,u)}})}return Ur(i,t,n,l,u)}function Ur(r,e={},t,n,o){let{as:a=t,children:l,refName:u="ref",...i}=Dt(r,["unmount","static"]),d=r.ref!==void 0?{[u]:r.ref}:{},s=typeof l=="function"?l(e):l;"className"in i&&i.className&&typeof i.className=="function"&&(i.className=i.className(e)),i["aria-labelledby"]&&i["aria-labelledby"]===i.id&&(i["aria-labelledby"]=void 0);let g={};if(e){let v=!1,E=[];for(let[p,m]of Object.entries(e))typeof m=="boolean"&&(v=!0),m===!0&&E.push(p.replace(/([A-Z])/g,y=>`-${y.toLowerCase()}`));if(v){g["data-headlessui-state"]=E.join(" ");for(let p of E)g[`data-${p}`]=""}}if(a===f.Fragment&&(Object.keys(_e(i)).length>0||Object.keys(_e(g)).length>0))if(!f.isValidElement(s)||Array.isArray(s)&&s.length>1){if(Object.keys(_e(i)).length>0)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(_e(i)).concat(Object.keys(_e(g))).map(v=>` - ${v}`).join(`
|
|
35
35
|
`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(v=>` - ${v}`).join(`
|
|
36
36
|
`)].join(`
|
|
37
|
-
`))}else{let v=s.props,E=v==null?void 0:v.className,d=typeof E=="function"?(...h)=>It(E(...h),i.className):It(E,i.className),m=d?{className:d}:{},y=ro(s.props,_e(_t(i,["ref"])));for(let h in b)h in y&&delete b[h];return f.cloneElement(s,Object.assign({},y,b,p,{ref:o(s.ref,p.ref)},m))}return f.createElement(a,Object.assign({},_t(i,["ref"]),a!==f.Fragment&&p,a!==f.Fragment&&b),s)}function Yl(){let r=f.useRef([]),e=f.useCallback(t=>{for(let n of r.current)n!=null&&(typeof n=="function"?n(t):n.current=t)},[]);return(...t)=>{if(!t.every(n=>n==null))return r.current=t,e}}function Kl(...r){return r.every(e=>e==null)?void 0:e=>{for(let t of r)t!=null&&(typeof t=="function"?t(e):t.current=e)}}function ro(...r){if(r.length===0)return{};if(r.length===1)return r[0];let e={},t={};for(let n of r)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(n[o])):e[o]=n[o];if(e.disabled||e["aria-disabled"])for(let n in t)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(t[n]=[o=>{var a;return(a=o==null?void 0:o.preventDefault)==null?void 0:a.call(o)}]);for(let n in t)Object.assign(e,{[n](o,...a){let l=t[n];for(let u of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;u(o,...a)}}});return e}function te(r){var e;return Object.assign(f.forwardRef(r),{displayName:(e=r.displayName)!=null?e:r.name})}function _e(r){let e=Object.assign({},r);for(let t in e)e[t]===void 0&&delete e[t];return e}function _t(r,e=[]){let t=Object.assign({},r);for(let n of e)n in t&&delete t[n];return t}let Xl="span";var Ur=(r=>(r[r.None=1]="None",r[r.Focusable=2]="Focusable",r[r.Hidden=4]="Hidden",r))(Ur||{});function Jl(r,e){var t;let{features:n=1,...o}=r,a={ref:e,"aria-hidden":(n&2)===2?!0:(t=o["aria-hidden"])!=null?t:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return ae()({ourProps:a,theirProps:o,slot:{},defaultTag:Xl,name:"Hidden"})}let Dt=te(Jl),to=Symbol();function Ql(r,e=!0){return Object.assign(r,{[to]:e})}function ye(...r){let e=f.useRef(r);f.useEffect(()=>{e.current=r},[r]);let t=B(n=>{for(let o of e.current)o!=null&&(typeof o=="function"?o(n):o.current=n)});return r.every(n=>n==null||(n==null?void 0:n[to]))?void 0:t}let kt=f.createContext(null);kt.displayName="DescriptionContext";function no(){let r=f.useContext(kt);if(r===null){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,no),e}return r}function Zl(){let[r,e]=f.useState([]);return[r.length>0?r.join(" "):void 0,f.useMemo(()=>function(t){let n=B(a=>(e(l=>[...l,a]),()=>e(l=>{let u=l.slice(),i=u.indexOf(a);return i!==-1&&u.splice(i,1),u}))),o=f.useMemo(()=>({register:n,slot:t.slot,name:t.name,props:t.props,value:t.value}),[n,t.slot,t.name,t.props,t.value]);return f.createElement(kt.Provider,{value:o},t.children)},[e])]}let eu="p";function ru(r,e){let t=f.useId(),n=Gl(),{id:o=`headlessui-description-${t}`,...a}=r,l=no(),u=ye(e);ee(()=>l.register(o),[o,l.register]);let i=n||!1,p=f.useMemo(()=>({...l.slot,disabled:i}),[l.slot,i]),s={ref:u,...l.props,id:o};return ae()({ourProps:s,theirProps:a,slot:p,defaultTag:eu,name:l.name||"Description"})}let tu=te(ru),nu=Object.assign(tu,{});var oo=(r=>(r.Space=" ",r.Enter="Enter",r.Escape="Escape",r.Backspace="Backspace",r.Delete="Delete",r.ArrowLeft="ArrowLeft",r.ArrowUp="ArrowUp",r.ArrowRight="ArrowRight",r.ArrowDown="ArrowDown",r.Home="Home",r.End="End",r.PageUp="PageUp",r.PageDown="PageDown",r.Tab="Tab",r))(oo||{});let ou=f.createContext(()=>{});function au({value:r,children:e}){return f.createElement(ou.Provider,{value:r},e)}let iu=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return t===void 0&&(t=this.factory(e),this.set(e,t)),t}};function ao(r,e){let t=r(),n=new Set;return{getSnapshot(){return t},subscribe(o){return n.add(o),()=>n.delete(o)},dispatch(o,...a){let l=e[o].call(t,...a);l&&(t=l,n.forEach(u=>u()))}}}function io(r){return f.useSyncExternalStore(r.subscribe,r.getSnapshot,r.getSnapshot)}let lu=new iu(()=>ao(()=>[],{ADD(r){return this.includes(r)?this:[...this,r]},REMOVE(r){let e=this.indexOf(r);if(e===-1)return this;let t=this.slice();return t.splice(e,1),t}}));function Je(r,e){let t=lu.get(e),n=f.useId(),o=io(t);if(ee(()=>{if(r)return t.dispatch("ADD",n),()=>t.dispatch("REMOVE",n)},[t,r]),!r)return!1;let a=o.indexOf(n),l=o.length;return a===-1&&(a=l,l+=1),a===l-1}let Nt=new Map,yr=new Map;function lo(r){var e;let t=(e=yr.get(r))!=null?e:0;return yr.set(r,t+1),t!==0?()=>uo(r):(Nt.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0,()=>uo(r))}function uo(r){var e;let t=(e=yr.get(r))!=null?e:1;if(t===1?yr.delete(r):yr.set(r,t-1),t!==1)return;let n=Nt.get(r);n&&(n["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",n["aria-hidden"]),r.inert=n.inert,Nt.delete(r))}function uu(r,{allowed:e,disallowed:t}={}){let n=Je(r,"inert-others");ee(()=>{var o,a;if(!n)return;let l=Oe();for(let i of(o=t==null?void 0:t())!=null?o:[])i&&l.add(lo(i));let u=(a=e==null?void 0:e())!=null?a:[];for(let i of u){if(!i)continue;let p=Nr(i);if(!p)continue;let s=i.parentElement;for(;s&&s!==p.body;){for(let b of s.children)u.some(v=>b.contains(v))||l.add(lo(b));s=s.parentElement}}return l.dispose},[n,e,t])}function su(r,e,t){let n=Ie(o=>{let a=o.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&t()});f.useEffect(()=>{if(!r)return;let o=e===null?null:e instanceof HTMLElement?e:e.current;if(!o)return;let a=Oe();if(typeof ResizeObserver<"u"){let l=new ResizeObserver(()=>n.current(o));l.observe(o),a.add(()=>l.disconnect())}if(typeof IntersectionObserver<"u"){let l=new IntersectionObserver(()=>n.current(o));l.observe(o),a.add(()=>l.disconnect())}return()=>a.dispose()},[e,n,r])}let Br=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(r=>`${r}:not([tabindex='-1'])`).join(","),cu=["[data-autofocus]"].map(r=>`${r}:not([tabindex='-1'])`).join(",");var he=(r=>(r[r.First=1]="First",r[r.Previous=2]="Previous",r[r.Next=4]="Next",r[r.Last=8]="Last",r[r.WrapAround=16]="WrapAround",r[r.NoScroll=32]="NoScroll",r[r.AutoFocus=64]="AutoFocus",r))(he||{}),jt=(r=>(r[r.Error=0]="Error",r[r.Overflow=1]="Overflow",r[r.Success=2]="Success",r[r.Underflow=3]="Underflow",r))(jt||{}),fu=(r=>(r[r.Previous=-1]="Previous",r[r.Next=1]="Next",r))(fu||{});function du(r=document.body){return r==null?[]:Array.from(r.querySelectorAll(Br)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}function pu(r=document.body){return r==null?[]:Array.from(r.querySelectorAll(cu)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var so=(r=>(r[r.Strict=0]="Strict",r[r.Loose=1]="Loose",r))(so||{});function yu(r,e=0){var t;return r===((t=Nr(r))==null?void 0:t.body)?!1:Pe(e,{0(){return r.matches(Br)},1(){let n=r;for(;n!==null;){if(n.matches(Br))return!0;n=n.parentElement}return!1}})}var mu=(r=>(r[r.Keyboard=0]="Keyboard",r[r.Mouse=1]="Mouse",r))(mu||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",r=>{r.metaKey||r.altKey||r.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",r=>{r.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:r.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function ge(r){r==null||r.focus({preventScroll:!0})}let vu=["textarea","input"].join(",");function hu(r){var e,t;return(t=(e=r==null?void 0:r.matches)==null?void 0:e.call(r,vu))!=null?t:!1}function gu(r,e=t=>t){return r.slice().sort((t,n)=>{let o=e(t),a=e(n);if(o===null||a===null)return 0;let l=o.compareDocumentPosition(a);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function mr(r,e,{sorted:t=!0,relativeTo:n=null,skipElements:o=[]}={}){let a=Array.isArray(r)?r.length>0?r[0].ownerDocument:document:r.ownerDocument,l=Array.isArray(r)?t?gu(r):r:e&64?pu(r):du(r);o.length>0&&l.length>1&&(l=l.filter(E=>!o.some(d=>d!=null&&"current"in d?(d==null?void 0:d.current)===E:d===E))),n=n??a.activeElement;let u=(()=>{if(e&5)return 1;if(e&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),i=(()=>{if(e&1)return 0;if(e&2)return Math.max(0,l.indexOf(n))-1;if(e&4)return Math.max(0,l.indexOf(n))+1;if(e&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),p=e&32?{preventScroll:!0}:{},s=0,b=l.length,v;do{if(s>=b||s+b<=0)return 0;let E=i+s;if(e&16)E=(E+b)%b;else{if(E<0)return 3;if(E>=b)return 1}v=l[E],v==null||v.focus(p),s+=u}while(v!==a.activeElement);return e&6&&hu(v)&&v.select(),2}function co(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function bu(){return/Android/gi.test(window.navigator.userAgent)}function wu(){return co()||bu()}function vr(r,e,t,n){let o=Ie(t);f.useEffect(()=>{if(!r)return;function a(l){o.current(l)}return document.addEventListener(e,a,n),()=>document.removeEventListener(e,a,n)},[r,e,n])}function fo(r,e,t,n){let o=Ie(t);f.useEffect(()=>{if(!r)return;function a(l){o.current(l)}return window.addEventListener(e,a,n),()=>window.removeEventListener(e,a,n)},[r,e,n])}const po=30;function Eu(r,e,t){let n=Je(r,"outside-click"),o=Ie(t),a=f.useCallback(function(i,p){if(i.defaultPrevented)return;let s=p(i);if(s===null||!s.getRootNode().contains(s)||!s.isConnected)return;let b=function v(E){return typeof E=="function"?v(E()):Array.isArray(E)||E instanceof Set?E:[E]}(e);for(let v of b)if(v!==null&&(v.contains(s)||i.composed&&i.composedPath().includes(v)))return;return!yu(s,so.Loose)&&s.tabIndex!==-1&&i.preventDefault(),o.current(i,s)},[o,e]),l=f.useRef(null);vr(n,"pointerdown",i=>{var p,s;l.current=((s=(p=i.composedPath)==null?void 0:p.call(i))==null?void 0:s[0])||i.target},!0),vr(n,"mousedown",i=>{var p,s;l.current=((s=(p=i.composedPath)==null?void 0:p.call(i))==null?void 0:s[0])||i.target},!0),vr(n,"click",i=>{wu()||l.current&&(a(i,()=>l.current),l.current=null)},!0);let u=f.useRef({x:0,y:0});vr(n,"touchstart",i=>{u.current.x=i.touches[0].clientX,u.current.y=i.touches[0].clientY},!0),vr(n,"touchend",i=>{let p={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(p.x-u.current.x)>=po||Math.abs(p.y-u.current.y)>=po))return a(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),fo(n,"blur",i=>a(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function hr(...r){return f.useMemo(()=>Nr(...r),[...r])}function yo(r,e,t,n){let o=Ie(t);f.useEffect(()=>{r=r??window;function a(l){o.current(l)}return r.addEventListener(e,a,n),()=>r.removeEventListener(e,a,n)},[r,e,n])}function Su(){let r;return{before({doc:e}){var t;let n=e.documentElement,o=(t=e.defaultView)!=null?t:window;r=Math.max(0,o.innerWidth-n.clientWidth)},after({doc:e,d:t}){let n=e.documentElement,o=Math.max(0,n.clientWidth-n.offsetWidth),a=Math.max(0,r-o);t.style(n,"paddingRight",`${a}px`)}}}function xu(){return co()?{before({doc:r,d:e,meta:t}){function n(o){return t.containers.flatMap(a=>a()).some(a=>a.contains(o))}e.microTask(()=>{var o;if(window.getComputedStyle(r.documentElement).scrollBehavior!=="auto"){let u=Oe();u.style(r.documentElement,"scrollBehavior","auto"),e.add(()=>e.microTask(()=>u.dispose()))}let a=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;e.addEventListener(r,"click",u=>{if(u.target instanceof HTMLElement)try{let i=u.target.closest("a");if(!i)return;let{hash:p}=new URL(i.href),s=r.querySelector(p);s&&!n(s)&&(l=s)}catch{}},!0),e.addEventListener(r,"touchstart",u=>{if(u.target instanceof HTMLElement)if(n(u.target)){let i=u.target;for(;i.parentElement&&n(i.parentElement);)i=i.parentElement;e.style(i,"overscrollBehavior","contain")}else e.style(u.target,"touchAction","none")}),e.addEventListener(r,"touchmove",u=>{if(u.target instanceof HTMLElement){if(u.target.tagName==="INPUT")return;if(n(u.target)){let i=u.target;for(;i.parentElement&&i.dataset.headlessuiPortal!==""&&!(i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth);)i=i.parentElement;i.dataset.headlessuiPortal===""&&u.preventDefault()}else u.preventDefault()}},{passive:!1}),e.add(()=>{var u;let i=(u=window.scrollY)!=null?u:window.pageYOffset;a!==i&&window.scrollTo(0,a),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function Ou(){return{before({doc:r,d:e}){e.style(r.documentElement,"overflow","hidden")}}}function Pu(r){let e={};for(let t of r)Object.assign(e,t(e));return e}let De=ao(()=>new Map,{PUSH(r,e){var t;let n=(t=this.get(r))!=null?t:{doc:r,count:0,d:Oe(),meta:new Set};return n.count++,n.meta.add(e),this.set(r,n),this},POP(r,e){let t=this.get(r);return t&&(t.count--,t.meta.delete(e)),this},SCROLL_PREVENT({doc:r,d:e,meta:t}){let n={doc:r,d:e,meta:Pu(t)},o=[xu(),Su(),Ou()];o.forEach(({before:a})=>a==null?void 0:a(n)),o.forEach(({after:a})=>a==null?void 0:a(n))},SCROLL_ALLOW({d:r}){r.dispose()},TEARDOWN({doc:r}){this.delete(r)}});De.subscribe(()=>{let r=De.getSnapshot(),e=new Map;for(let[t]of r)e.set(t,t.documentElement.style.overflow);for(let t of r.values()){let n=e.get(t.doc)==="hidden",o=t.count!==0;(o&&!n||!o&&n)&&De.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&De.dispatch("TEARDOWN",t)}});function Au(r,e,t=()=>({containers:[]})){let n=io(De),o=e?n.get(e):void 0,a=o?o.count>0:!1;return ee(()=>{if(!(!e||!r))return De.dispatch("PUSH",e,t),()=>De.dispatch("POP",e,t)},[r,e]),a}function Tu(r,e,t=()=>[document.body]){let n=Je(r,"scroll-lock");Au(n,e,o=>{var a;return{containers:[...(a=o.containers)!=null?a:[],t]}})}function $u(r=0){let[e,t]=f.useState(r),n=f.useCallback(i=>t(i),[e]),o=f.useCallback(i=>t(p=>p|i),[e]),a=f.useCallback(i=>(e&i)===i,[e]),l=f.useCallback(i=>t(p=>p&~i),[t]),u=f.useCallback(i=>t(p=>p^i),[t]);return{flags:e,setFlag:n,addFlag:o,hasFlag:a,removeFlag:l,toggleFlag:u}}var mo,vo;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((mo=process==null?void 0:process.env)==null?void 0:mo.NODE_ENV)==="test"&&typeof((vo=Element==null?void 0:Element.prototype)==null?void 0:vo.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
38
|
-
`)),[]});var Cu=(r=>(r[r.None=0]="None",r[r.Closed=1]="Closed",r[r.Enter=2]="Enter",r[r.Leave=4]="Leave",r))(Cu||{});function Fu(r){let e={};for(let t in r)r[t]===!0&&(e[`data-${t}`]="");return e}function Mu(r,e,t,n){let[o,a]=f.useState(t),{hasFlag:l,addFlag:u,removeFlag:i}=$u(r&&o?3:0),p=f.useRef(!1),s=f.useRef(!1),b=Mt();return ee(()=>{var v;if(r){if(t&&a(!0),!e){t&&u(3);return}return(v=n==null?void 0:n.start)==null||v.call(n,t),Iu(e,{inFlight:p,prepare(){s.current?s.current=!1:s.current=p.current,p.current=!0,!s.current&&(t?(u(3),i(4)):(u(4),i(2)))},run(){s.current?t?(i(3),u(4)):(i(4),u(3)):t?i(1):u(1)},done(){var E;s.current&&typeof e.getAnimations=="function"&&e.getAnimations().length>0||(p.current=!1,i(7),t||a(!1),(E=n==null?void 0:n.end)==null||E.call(n,t))}})}},[r,t,e,b]),r?[o,{closed:l(1),enter:l(2),leave:l(4),transition:l(2)||l(4)}]:[t,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Iu(r,{prepare:e,run:t,done:n,inFlight:o}){let a=Oe();return Du(r,{prepare:e,inFlight:o}),a.nextFrame(()=>{t(),a.requestAnimationFrame(()=>{a.add(_u(r,n))})}),a.dispose}function _u(r,e){var t,n;let o=Oe();if(!r)return o.dispose;let a=!1;o.add(()=>{a=!0});let l=(n=(t=r.getAnimations)==null?void 0:t.call(r).filter(u=>u instanceof CSSTransition))!=null?n:[];return l.length===0?(e(),o.dispose):(Promise.allSettled(l.map(u=>u.finished)).then(()=>{a||e()}),o.dispose)}function Du(r,{inFlight:e,prepare:t}){if(e!=null&&e.current){t();return}let n=r.style.transition;r.style.transition="none",t(),r.offsetHeight,r.style.transition=n}function Lt(r,e){let t=f.useRef([]),n=B(r);f.useEffect(()=>{let o=[...t.current];for(let[a,l]of e.entries())if(t.current[a]!==l){let u=n(e,o);return t.current=e,u}},[n,...e])}let Rr=f.createContext(null);Rr.displayName="OpenClosedContext";var le=(r=>(r[r.Open=1]="Open",r[r.Closed=2]="Closed",r[r.Closing=4]="Closing",r[r.Opening=8]="Opening",r))(le||{});function Hr(){return f.useContext(Rr)}function ku({value:r,children:e}){return f.createElement(Rr.Provider,{value:r},e)}function Nu({children:r}){return f.createElement(Rr.Provider,{value:null},r)}function ju(r){function e(){document.readyState!=="loading"&&(r(),document.removeEventListener("DOMContentLoaded",e))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}let Te=[];ju(()=>{function r(e){if(!(e.target instanceof HTMLElement)||e.target===document.body||Te[0]===e.target)return;let t=e.target;t=t.closest(Br),Te.unshift(t??e.target),Te=Te.filter(n=>n!=null&&n.isConnected),Te.splice(10)}window.addEventListener("click",r,{capture:!0}),window.addEventListener("mousedown",r,{capture:!0}),window.addEventListener("focus",r,{capture:!0}),document.body.addEventListener("click",r,{capture:!0}),document.body.addEventListener("mousedown",r,{capture:!0}),document.body.addEventListener("focus",r,{capture:!0})});function ho(r){let e=B(r),t=f.useRef(!1);f.useEffect(()=>(t.current=!1,()=>{t.current=!0,jr(()=>{t.current&&e()})}),[e])}function Lu(){let r=typeof document>"u";return"useSyncExternalStore"in tr?(e=>e.useSyncExternalStore)(tr)(()=>()=>{},()=>!1,()=>!r):!1}function gr(){let r=Lu(),[e,t]=tr.useState(Me.isHandoffComplete);return e&&Me.isHandoffComplete===!1&&t(!1),tr.useEffect(()=>{e!==!0&&t(!0)},[e]),tr.useEffect(()=>Me.handoff(),[]),r?!1:e}let go=f.createContext(!1);function Wu(){return f.useContext(go)}function bo(r){return f.createElement(go.Provider,{value:r.force},r.children)}function Uu(r){let e=Wu(),t=f.useContext(Eo),n=hr(r),[o,a]=f.useState(()=>{var l;if(!e&&t!==null)return(l=t.current)!=null?l:null;if(Me.isServer)return null;let u=n==null?void 0:n.getElementById("headlessui-portal-root");if(u)return u;if(n===null)return null;let i=n.createElement("div");return i.setAttribute("id","headlessui-portal-root"),n.body.appendChild(i)});return f.useEffect(()=>{o!==null&&(n!=null&&n.body.contains(o)||n==null||n.body.appendChild(o))},[o,n]),f.useEffect(()=>{e||t!==null&&a(t.current)},[t,a,e]),o}let wo=f.Fragment,Bu=te(function(r,e){let t=r,n=f.useRef(null),o=ye(Ql(b=>{n.current=b}),e),a=hr(n),l=Uu(n),[u]=f.useState(()=>{var b;return Me.isServer?null:(b=a==null?void 0:a.createElement("div"))!=null?b:null}),i=f.useContext(Wt),p=gr();ee(()=>{!l||!u||l.contains(u)||(u.setAttribute("data-headlessui-portal",""),l.appendChild(u))},[l,u]),ee(()=>{if(u&&i)return i.register(u)},[i,u]),ho(()=>{var b;!l||!u||(u instanceof Node&&l.contains(u)&&l.removeChild(u),l.childNodes.length<=0&&((b=l.parentElement)==null||b.removeChild(l)))});let s=ae();return p?!l||!u?null:Jo.createPortal(s({ourProps:{ref:o},theirProps:t,slot:{},defaultTag:wo,name:"Portal"}),u):null});function Ru(r,e){let t=ye(e),{enabled:n=!0,...o}=r,a=ae();return n?f.createElement(Bu,{...o,ref:t}):a({ourProps:{ref:t},theirProps:o,slot:{},defaultTag:wo,name:"Portal"})}let Hu=f.Fragment,Eo=f.createContext(null);function Vu(r,e){let{target:t,...n}=r,o={ref:ye(e)},a=ae();return f.createElement(Eo.Provider,{value:t},a({ourProps:o,theirProps:n,defaultTag:Hu,name:"Popover.Group"}))}let Wt=f.createContext(null);function qu(){let r=f.useContext(Wt),e=f.useRef([]),t=B(a=>(e.current.push(a),r&&r.register(a),()=>n(a))),n=B(a=>{let l=e.current.indexOf(a);l!==-1&&e.current.splice(l,1),r&&r.unregister(a)}),o=f.useMemo(()=>({register:t,unregister:n,portals:e}),[t,n,e]);return[e,f.useMemo(()=>function({children:a}){return f.createElement(Wt.Provider,{value:o},a)},[o])]}let Gu=te(Ru),So=te(Vu),zu=Object.assign(Gu,{Group:So});function Yu(r,e=typeof document<"u"?document.defaultView:null,t){let n=Je(r,"escape");yo(e,"keydown",o=>{n&&(o.defaultPrevented||o.key===oo.Escape&&t(o))})}function Ku(){var r;let[e]=f.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[t,n]=f.useState((r=e==null?void 0:e.matches)!=null?r:!1);return ee(()=>{if(!e)return;function o(a){n(a.matches)}return e.addEventListener("change",o),()=>e.removeEventListener("change",o)},[e]),t}function Xu({defaultContainers:r=[],portals:e,mainTreeNode:t}={}){let n=hr(t),o=B(()=>{var a,l;let u=[];for(let i of r)i!==null&&(i instanceof HTMLElement?u.push(i):"current"in i&&i.current instanceof HTMLElement&&u.push(i.current));if(e!=null&&e.current)for(let i of e.current)u.push(i);for(let i of(a=n==null?void 0:n.querySelectorAll("html > *, body > *"))!=null?a:[])i!==document.body&&i!==document.head&&i instanceof HTMLElement&&i.id!=="headlessui-portal-root"&&(t&&(i.contains(t)||i.contains((l=t==null?void 0:t.getRootNode())==null?void 0:l.host))||u.some(p=>i.contains(p))||u.push(i));return u});return{resolveContainers:o,contains:B(a=>o().some(l=>l.contains(a)))}}let xo=f.createContext(null);function Oo({children:r,node:e}){let[t,n]=f.useState(null),o=Po(e??t);return f.createElement(xo.Provider,{value:o},r,o===null&&f.createElement(Dt,{features:Ur.Hidden,ref:a=>{var l,u;if(a){for(let i of(u=(l=Nr(a))==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?u:[])if(i!==document.body&&i!==document.head&&i instanceof HTMLElement&&i!=null&&i.contains(a)){n(i);break}}}}))}function Po(r=null){var e;return(e=f.useContext(xo))!=null?e:r}function Ut(){let r=f.useRef(!1);return ee(()=>(r.current=!0,()=>{r.current=!1}),[]),r}var br=(r=>(r[r.Forwards=0]="Forwards",r[r.Backwards=1]="Backwards",r))(br||{});function Ju(){let r=f.useRef(0);return fo(!0,"keydown",e=>{e.key==="Tab"&&(r.current=e.shiftKey?1:0)},!0),r}function Ao(r){if(!r)return new Set;if(typeof r=="function")return new Set(r());let e=new Set;for(let t of r.current)t.current instanceof HTMLElement&&e.add(t.current);return e}let Qu="div";var ke=(r=>(r[r.None=0]="None",r[r.InitialFocus=1]="InitialFocus",r[r.TabLock=2]="TabLock",r[r.FocusLock=4]="FocusLock",r[r.RestoreFocus=8]="RestoreFocus",r[r.AutoFocus=16]="AutoFocus",r))(ke||{});function Zu(r,e){let t=f.useRef(null),n=ye(t,e),{initialFocus:o,initialFocusFallback:a,containers:l,features:u=15,...i}=r;gr()||(u=0);let p=hr(t);ns(u,{ownerDocument:p});let s=os(u,{ownerDocument:p,container:t,initialFocus:o,initialFocusFallback:a});as(u,{ownerDocument:p,container:t,containers:l,previousActiveElement:s});let b=Ju(),v=B(g=>{let w=t.current;w&&(x=>x())(()=>{Pe(b.current,{[br.Forwards]:()=>{mr(w,he.First,{skipElements:[g.relatedTarget,a]})},[br.Backwards]:()=>{mr(w,he.Last,{skipElements:[g.relatedTarget,a]})}})})}),E=Je(!!(u&2),"focus-trap#tab-lock"),d=Mt(),m=f.useRef(!1),y={ref:n,onKeyDown(g){g.key=="Tab"&&(m.current=!0,d.requestAnimationFrame(()=>{m.current=!1}))},onBlur(g){if(!(u&4))return;let w=Ao(l);t.current instanceof HTMLElement&&w.add(t.current);let x=g.relatedTarget;x instanceof HTMLElement&&x.dataset.headlessuiFocusGuard!=="true"&&(To(w,x)||(m.current?mr(t.current,Pe(b.current,{[br.Forwards]:()=>he.Next,[br.Backwards]:()=>he.Previous})|he.WrapAround,{relativeTo:g.target}):g.target instanceof HTMLElement&&ge(g.target)))}},h=ae();return f.createElement(f.Fragment,null,E&&f.createElement(Dt,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:Ur.Focusable}),h({ourProps:y,theirProps:i,defaultTag:Qu,name:"FocusTrap"}),E&&f.createElement(Dt,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:Ur.Focusable}))}let es=te(Zu),rs=Object.assign(es,{features:ke});function ts(r=!0){let e=f.useRef(Te.slice());return Lt(([t],[n])=>{n===!0&&t===!1&&jr(()=>{e.current.splice(0)}),n===!1&&t===!0&&(e.current=Te.slice())},[r,Te,e]),B(()=>{var t;return(t=e.current.find(n=>n!=null&&n.isConnected))!=null?t:null})}function ns(r,{ownerDocument:e}){let t=!!(r&8),n=ts(t);Lt(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&ge(n())},[t]),ho(()=>{t&&ge(n())})}function os(r,{ownerDocument:e,container:t,initialFocus:n,initialFocusFallback:o}){let a=f.useRef(null),l=Je(!!(r&1),"focus-trap#initial-focus"),u=Ut();return Lt(()=>{if(r===0)return;if(!l){o!=null&&o.current&&ge(o.current);return}let i=t.current;i&&jr(()=>{if(!u.current)return;let p=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===p){a.current=p;return}}else if(i.contains(p)){a.current=p;return}if(n!=null&&n.current)ge(n.current);else{if(r&16){if(mr(i,he.First|he.AutoFocus)!==jt.Error)return}else if(mr(i,he.First)!==jt.Error)return;if(o!=null&&o.current&&(ge(o.current),(e==null?void 0:e.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}a.current=e==null?void 0:e.activeElement})},[o,l,r]),a}function as(r,{ownerDocument:e,container:t,containers:n,previousActiveElement:o}){let a=Ut(),l=!!(r&4);yo(e==null?void 0:e.defaultView,"focus",u=>{if(!l||!a.current)return;let i=Ao(n);t.current instanceof HTMLElement&&i.add(t.current);let p=o.current;if(!p)return;let s=u.target;s&&s instanceof HTMLElement?To(i,s)?(o.current=s,ge(s)):(u.preventDefault(),u.stopPropagation(),ge(p)):ge(o.current)},!0)}function To(r,e){for(let t of r)if(t.contains(e))return!0;return!1}function $o(r){var e;return!!(r.enter||r.enterFrom||r.enterTo||r.leave||r.leaveFrom||r.leaveTo)||((e=r.as)!=null?e:Fo)!==f.Fragment||f.Children.count(r.children)===1}let Vr=f.createContext(null);Vr.displayName="TransitionContext";var is=(r=>(r.Visible="visible",r.Hidden="hidden",r))(is||{});function ls(){let r=f.useContext(Vr);if(r===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return r}function us(){let r=f.useContext(qr);if(r===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return r}let qr=f.createContext(null);qr.displayName="NestingContext";function Gr(r){return"children"in r?Gr(r.children):r.current.filter(({el:e})=>e.current!==null).filter(({state:e})=>e==="visible").length>0}function Co(r,e){let t=Ie(r),n=f.useRef([]),o=Ut(),a=Mt(),l=B((E,d=Ae.Hidden)=>{let m=n.current.findIndex(({el:y})=>y===E);m!==-1&&(Pe(d,{[Ae.Unmount](){n.current.splice(m,1)},[Ae.Hidden](){n.current[m].state="hidden"}}),a.microTask(()=>{var y;!Gr(n)&&o.current&&((y=t.current)==null||y.call(t))}))}),u=B(E=>{let d=n.current.find(({el:m})=>m===E);return d?d.state!=="visible"&&(d.state="visible"):n.current.push({el:E,state:"visible"}),()=>l(E,Ae.Unmount)}),i=f.useRef([]),p=f.useRef(Promise.resolve()),s=f.useRef({enter:[],leave:[]}),b=B((E,d,m)=>{i.current.splice(0),e&&(e.chains.current[d]=e.chains.current[d].filter(([y])=>y!==E)),e==null||e.chains.current[d].push([E,new Promise(y=>{i.current.push(y)})]),e==null||e.chains.current[d].push([E,new Promise(y=>{Promise.all(s.current[d].map(([h,g])=>g)).then(()=>y())})]),d==="enter"?p.current=p.current.then(()=>e==null?void 0:e.wait.current).then(()=>m(d)):m(d)}),v=B((E,d,m)=>{Promise.all(s.current[d].splice(0).map(([y,h])=>h)).then(()=>{var y;(y=i.current.shift())==null||y()}).then(()=>m(d))});return f.useMemo(()=>({children:n,register:u,unregister:l,onStart:b,onStop:v,wait:p,chains:s}),[u,l,n,b,v,s,p])}let Fo=f.Fragment,Mo=Lr.RenderStrategy;function ss(r,e){var t,n;let{transition:o=!0,beforeEnter:a,afterEnter:l,beforeLeave:u,afterLeave:i,enter:p,enterFrom:s,enterTo:b,entered:v,leave:E,leaveFrom:d,leaveTo:m,...y}=r,[h,g]=f.useState(null),w=f.useRef(null),x=$o(r),P=ye(...x?[w,e,g]:e===null?[]:[e]),D=(t=y.unmount)==null||t?Ae.Unmount:Ae.Hidden,{show:_,appear:U,initial:H}=ls(),[j,z]=f.useState(_?"visible":"hidden"),V=us(),{register:C,unregister:T}=V;ee(()=>C(w),[C,w]),ee(()=>{if(D===Ae.Hidden&&w.current){if(_&&j!=="visible"){z("visible");return}return Pe(j,{hidden:()=>T(w),visible:()=>C(w)})}},[j,w,C,T,_,D]);let k=gr();ee(()=>{if(x&&k&&j==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,j,k,x]);let oe=H&&!U,ue=U&&_&&H,me=f.useRef(!1),Z=Co(()=>{me.current||(z("hidden"),T(w))},V),se=B(Le=>{me.current=!0;let be=Le?"enter":"leave";Z.onStart(w,be,we=>{we==="enter"?a==null||a():we==="leave"&&(u==null||u())})}),q=B(Le=>{let be=Le?"enter":"leave";me.current=!1,Z.onStop(w,be,we=>{we==="enter"?l==null||l():we==="leave"&&(i==null||i())}),be==="leave"&&!Gr(Z)&&(z("hidden"),T(w))});f.useEffect(()=>{x&&o||(se(_),q(_))},[_,x,o]);let Ne=!(!o||!x||!k||oe),[,J]=Mu(Ne,h,_,{start:se,end:q}),Vt=_e({ref:P,className:((n=It(y.className,ue&&p,ue&&s,J.enter&&p,J.enter&&J.closed&&s,J.enter&&!J.closed&&b,J.leave&&E,J.leave&&!J.closed&&d,J.leave&&J.closed&&m,!J.transition&&_&&v))==null?void 0:n.trim())||void 0,...Fu(J)}),je=0;j==="visible"&&(je|=le.Open),j==="hidden"&&(je|=le.Closed),J.enter&&(je|=le.Opening),J.leave&&(je|=le.Closing);let wr=ae();return f.createElement(qr.Provider,{value:Z},f.createElement(ku,{value:je},wr({ourProps:Vt,theirProps:y,defaultTag:Fo,features:Mo,visible:j==="visible",name:"Transition.Child"})))}function cs(r,e){let{show:t,appear:n=!1,unmount:o=!0,...a}=r,l=f.useRef(null),u=$o(r),i=ye(...u?[l,e]:e===null?[]:[e]);gr();let p=Hr();if(t===void 0&&p!==null&&(t=(p&le.Open)===le.Open),t===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[s,b]=f.useState(t?"visible":"hidden"),v=Co(()=>{t||b("hidden")}),[E,d]=f.useState(!0),m=f.useRef([t]);ee(()=>{E!==!1&&m.current[m.current.length-1]!==t&&(m.current.push(t),d(!1))},[m,t]);let y=f.useMemo(()=>({show:t,appear:n,initial:E}),[t,n,E]);ee(()=>{t?b("visible"):!Gr(v)&&l.current!==null&&b("hidden")},[t,v]);let h={unmount:o},g=B(()=>{var P;E&&d(!1),(P=r.beforeEnter)==null||P.call(r)}),w=B(()=>{var P;E&&d(!1),(P=r.beforeLeave)==null||P.call(r)}),x=ae();return f.createElement(qr.Provider,{value:v},f.createElement(Vr.Provider,{value:y},x({ourProps:{...h,as:f.Fragment,children:f.createElement(Io,{ref:i,...h,...a,beforeEnter:g,beforeLeave:w})},theirProps:{},defaultTag:f.Fragment,features:Mo,visible:s==="visible",name:"Transition"})))}function fs(r,e){let t=f.useContext(Vr)!==null,n=Hr()!==null;return f.createElement(f.Fragment,null,!t&&n?f.createElement(Bt,{ref:e,...r}):f.createElement(Io,{ref:e,...r}))}let Bt=te(cs),Io=te(ss),Qe=te(fs),_o=Object.assign(Bt,{Child:Qe,Root:Bt});var ds=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(ds||{}),ps=(r=>(r[r.SetTitleId=0]="SetTitleId",r))(ps||{});let ys={0(r,e){return r.titleId===e.id?r:{...r,titleId:e.id}}},Rt=f.createContext(null);Rt.displayName="DialogContext";function zr(r){let e=f.useContext(Rt);if(e===null){let t=new Error(`<${r} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,zr),t}return e}function ms(r,e){return Pe(e.type,ys,r,e)}let Do=te(function(r,e){let t=f.useId(),{id:n=`headlessui-dialog-${t}`,open:o,onClose:a,initialFocus:l,role:u="dialog",autoFocus:i=!0,__demoMode:p=!1,unmount:s=!1,...b}=r,v=f.useRef(!1);u=function(){return u==="dialog"||u==="alertdialog"?u:(v.current||(v.current=!0,console.warn(`Invalid role [${u}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let E=Hr();o===void 0&&E!==null&&(o=(E&le.Open)===le.Open);let d=f.useRef(null),m=ye(d,e),y=hr(d),h=o?0:1,[g,w]=f.useReducer(ms,{titleId:null,descriptionId:null,panelRef:f.createRef()}),x=B(()=>a(!1)),P=B(q=>w({type:0,id:q})),D=gr()?h===0:!1,[_,U]=qu(),H={get current(){var q;return(q=g.panelRef.current)!=null?q:d.current}},j=Po(),{resolveContainers:z}=Xu({mainTreeNode:j,portals:_,defaultContainers:[H]}),V=E!==null?(E&le.Closing)===le.Closing:!1;uu(p||V?!1:D,{allowed:B(()=>{var q,Ne;return[(Ne=(q=d.current)==null?void 0:q.closest("[data-headlessui-portal]"))!=null?Ne:null]}),disallowed:B(()=>{var q;return[(q=j==null?void 0:j.closest("body > *:not(#headlessui-portal-root)"))!=null?q:null]})}),Eu(D,z,q=>{q.preventDefault(),x()}),Yu(D,y==null?void 0:y.defaultView,q=>{q.preventDefault(),q.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),x()}),Tu(p||V?!1:D,y,z),su(D,d,x);let[C,T]=Zl(),k=f.useMemo(()=>[{dialogState:h,close:x,setTitleId:P,unmount:s},g],[h,g,x,P,s]),oe=f.useMemo(()=>({open:h===0}),[h]),ue={ref:m,id:n,role:u,tabIndex:-1,"aria-modal":p?void 0:h===0?!0:void 0,"aria-labelledby":g.titleId,"aria-describedby":C,unmount:s},me=!Ku(),Z=ke.None;D&&!p&&(Z|=ke.RestoreFocus,Z|=ke.TabLock,i&&(Z|=ke.AutoFocus),me&&(Z|=ke.InitialFocus));let se=ae();return f.createElement(Nu,null,f.createElement(bo,{force:!0},f.createElement(zu,null,f.createElement(Rt.Provider,{value:k},f.createElement(So,{target:d},f.createElement(bo,{force:!1},f.createElement(T,{slot:oe},f.createElement(U,null,f.createElement(rs,{initialFocus:l,initialFocusFallback:d,containers:z,features:Z},f.createElement(au,{value:x},se({ourProps:ue,theirProps:b,slot:oe,defaultTag:vs,features:hs,visible:h===0,name:"Dialog"})))))))))))}),vs="div",hs=Lr.RenderStrategy|Lr.Static;function gs(r,e){let{transition:t=!1,open:n,...o}=r,a=Hr(),l=r.hasOwnProperty("open")||a!==null,u=r.hasOwnProperty("onClose");if(!l&&!u)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!l)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!u)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof r.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${r.open}`);if(typeof r.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${r.onClose}`);return(n!==void 0||t)&&!o.static?f.createElement(Oo,null,f.createElement(_o,{show:n,transition:t,unmount:o.unmount},f.createElement(Do,{ref:e,...o}))):f.createElement(Oo,null,f.createElement(Do,{ref:e,open:n,...o}))}let bs="div";function ws(r,e){let t=f.useId(),{id:n=`headlessui-dialog-panel-${t}`,transition:o=!1,...a}=r,[{dialogState:l,unmount:u},i]=zr("Dialog.Panel"),p=ye(e,i.panelRef),s=f.useMemo(()=>({open:l===0}),[l]),b=B(y=>{y.stopPropagation()}),v={ref:p,id:n,onClick:b},E=o?Qe:f.Fragment,d=o?{unmount:u}:{},m=ae();return f.createElement(E,{...d},m({ourProps:v,theirProps:a,slot:s,defaultTag:bs,name:"Dialog.Panel"}))}let Es="div";function Ss(r,e){let{transition:t=!1,...n}=r,[{dialogState:o,unmount:a}]=zr("Dialog.Backdrop"),l=f.useMemo(()=>({open:o===0}),[o]),u={ref:e,"aria-hidden":!0},i=t?Qe:f.Fragment,p=t?{unmount:a}:{},s=ae();return f.createElement(i,{...p},s({ourProps:u,theirProps:n,slot:l,defaultTag:Es,name:"Dialog.Backdrop"}))}let xs="h2";function Os(r,e){let t=f.useId(),{id:n=`headlessui-dialog-title-${t}`,...o}=r,[{dialogState:a,setTitleId:l}]=zr("Dialog.Title"),u=ye(e);f.useEffect(()=>(l(n),()=>l(null)),[n,l]);let i=f.useMemo(()=>({open:a===0}),[a]),p={ref:u,id:n};return ae()({ourProps:p,theirProps:o,slot:i,defaultTag:xs,name:"Dialog.Title"})}let Ps=te(gs),Ht=te(ws);te(Ss);let As=te(Os),Ts=Object.assign(Ps,{Panel:Ht,Title:As,Description:nu});function ko({onClick:r}){return $.jsxs("button",{type:"button",className:"im-close-button text-gray-400 hover:text-gray-500",onClick:r,children:[$.jsx("span",{className:"sr-only",children:"Close"}),$.jsx("svg",{className:"size-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true",children:$.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]})}const $s=({modalContext:r,config:e,children:t})=>$.jsx("div",{className:"im-modal-container fixed inset-0 z-40 overflow-y-auto p-4",children:$.jsx("div",{className:kr("im-modal-positioner flex min-h-full justify-center",{"items-start":e.position==="top","items-center":e.position==="center","items-end":e.position==="bottom"}),children:$.jsx(Qe,{enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",afterLeave:r.afterLeave,className:kr("im-modal-wrapper w-full transition duration-300 ease-in-out",r.onTopOfStack?"":"blur-sm",{"sm:max-w-sm":e.maxWidth==="sm","sm:max-w-md":e.maxWidth==="md","sm:max-w-md md:max-w-lg":e.maxWidth==="lg","sm:max-w-md md:max-w-xl":e.maxWidth==="xl","sm:max-w-md md:max-w-xl lg:max-w-2xl":e.maxWidth==="2xl","sm:max-w-md md:max-w-xl lg:max-w-3xl":e.maxWidth==="3xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl":e.maxWidth==="4xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl":e.maxWidth==="5xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl":e.maxWidth==="6xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl":e.maxWidth==="7xl"}),children:$.jsxs(Ht,{className:`im-modal-content relative ${e.paddingClasses} ${e.panelClasses}`,children:[e.closeButton&&$.jsx("div",{className:"absolute right-0 top-0 pr-3 pt-3",children:$.jsx(ko,{onClick:r.close})}),typeof t=="function"?t({modalContext:r,config:e}):t]})})})}),Cs=({modalContext:r,config:e,children:t})=>$.jsx("div",{className:"im-slideover-container fixed inset-0 z-40 overflow-y-auto overflow-x-hidden",children:$.jsx("div",{className:kr("im-slideover-positioner flex min-h-full items-center",{"justify-start":e.position==="left","justify-end":e.position==="right"}),children:$.jsx(Qe,{enterFrom:`opacity-0 ${e.position==="left"?"-translate-x-full":"translate-x-full"}`,enterTo:"opacity-100 translate-x-0",leaveFrom:"opacity-100 translate-x-0",leaveTo:`opacity-0 ${e.position==="left"?"-translate-x-full":"translate-x-full"}`,afterLeave:r.afterLeave,className:kr("im-slideover-wrapper w-full transition duration-300 ease-in-out",r.onTopOfStack?"":"blur-sm",{"sm:max-w-sm":e.maxWidth==="sm","sm:max-w-md":e.maxWidth==="md","sm:max-w-md md:max-w-lg":e.maxWidth==="lg","sm:max-w-md md:max-w-xl":e.maxWidth==="xl","sm:max-w-md md:max-w-xl lg:max-w-2xl":e.maxWidth==="2xl","sm:max-w-md md:max-w-xl lg:max-w-3xl":e.maxWidth==="3xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl":e.maxWidth==="4xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl":e.maxWidth==="5xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl":e.maxWidth==="6xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl":e.maxWidth==="7xl"}),children:$.jsxs(Ht,{className:`im-slideover-content relative ${e.paddingClasses} ${e.panelClasses}`,children:[e.closeButton&&$.jsx("div",{className:"absolute right-0 top-0 pr-3 pt-3",children:$.jsx(ko,{onClick:r.close})}),typeof t=="function"?t({modalContext:r,config:e}):t]})})})}),No=f.forwardRef(({name:r,children:e,...t},n)=>{const o=l=>typeof e=="function"?e(l):e,a=f.useRef(null);return f.useImperativeHandle(n,()=>a.current,[a]),$.jsx(Ct,{ref:a,name:r,...t,children:({afterLeave:l,close:u,config:i,emit:p,getChildModal:s,getParentModal:b,id:v,index:E,isOpen:d,modalContext:m,onTopOfStack:y,reload:h,setOpen:g,shouldRender:w})=>$.jsx(_o,{appear:!0,show:d??!1,children:$.jsxs(Ts,{as:"div",className:"im-dialog relative z-20",onClose:()=>i.closeExplicitly?null:u(),"data-inertiaui-modal-id":v,"data-inertiaui-modal-index":E,children:[E===0?$.jsx(Qe,{enter:"transition transform ease-in-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition transform ease-in-out duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:y?$.jsx("div",{className:"im-backdrop fixed inset-0 z-30 bg-black/75","aria-hidden":"true"}):$.jsx("div",{})}):null,E>0&&y?$.jsx("div",{className:"im-backdrop fixed inset-0 z-30 bg-black/75"}):null,i.slideover?$.jsx(Cs,{modalContext:m,config:i,children:o({afterLeave:l,close:u,config:i,emit:p,getChildModal:s,getParentModal:b,id:v,index:E,isOpen:d,modalContext:m,onTopOfStack:y,reload:h,setOpen:g,shouldRender:w})}):$.jsx($s,{modalContext:m,config:i,children:o({afterLeave:l,close:u,config:i,emit:p,getChildModal:s,getParentModal:b,id:v,index:E,isOpen:d,modalContext:m,onTopOfStack:y,reload:h,setOpen:g,shouldRender:w})})]})})})});No.displayName="Modal";const Fs=({href:r,method:e="get",data:t={},as:n="a",headers:o={},queryStringArrayFormat:a="brackets",onAfterLeave:l=null,onBlur:u=null,onClose:i=null,onError:p=null,onFocus:s=null,onStart:b=null,onSuccess:v=null,navigate:E=null,children:d,...m})=>{const[y,h]=f.useState(!1),[g,w]=f.useState(null),{stack:x,visit:P}=pr(),D=f.useMemo(()=>E??Or("navigate"),[E]),_={},U={};Object.keys(m).forEach(T=>{Jn.includes(T)||(T.startsWith("on")&&typeof m[T]=="function"?T.toLowerCase()in window?_[T]=m[T]:U[T]=m[T]:_[T]=m[T])});const[H,j]=f.useState(!1);f.useEffect(()=>{g&&(g.onTopOfStack&&H?s==null||s():!g.onTopOfStack&&!H&&(u==null||u()),j(!g.onTopOfStack))},[x]);const z=f.useCallback(()=>{i==null||i()},[i]),V=f.useCallback(()=>{w(null),l==null||l()},[l]),C=f.useCallback(T=>{T==null||T.preventDefault(),!y&&(r.startsWith("#")||(h(!0),b==null||b()),P(r,e,t,o,la(Zt(m,Jn)),()=>z(x.length),V,a,D).then(k=>{w(k),k.registerEventListenersFromProps(U),v==null||v()}).catch(k=>{console.error(k),p==null||p(k)}).finally(()=>h(!1)))},[r,e,t,o,a,m,z,V]);return $.jsx(n,{..._,href:r,onClick:C,children:typeof d=="function"?d({loading:y}):d})};function Ms(){return pr().stack[$t()]??null}L.HeadlessModal=Ct,L.Modal=No,L.ModalLink=Fs,L.ModalRoot=Qn,L.ModalStackProvider=Xn,L.getConfig=Or,L.putConfig=ra,L.renderApp=Bl,L.resetConfig=ea,L.useModal=Ms,L.useModalIndex=$t,L.useModalStack=pr,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|
|
37
|
+
`))}else{let v=s.props,E=v==null?void 0:v.className,p=typeof E=="function"?(...h)=>_t(E(...h),i.className):_t(E,i.className),m=p?{className:p}:{},y=ro(s.props,_e(Dt(i,["ref"])));for(let h in g)h in y&&delete g[h];return f.cloneElement(s,Object.assign({},y,g,d,{ref:o(s.ref,d.ref)},m))}return f.createElement(a,Object.assign({},Dt(i,["ref"]),a!==f.Fragment&&d,a!==f.Fragment&&g),s)}function Yl(){let r=f.useRef([]),e=f.useCallback(t=>{for(let n of r.current)n!=null&&(typeof n=="function"?n(t):n.current=t)},[]);return(...t)=>{if(!t.every(n=>n==null))return r.current=t,e}}function Kl(...r){return r.every(e=>e==null)?void 0:e=>{for(let t of r)t!=null&&(typeof t=="function"?t(e):t.current=e)}}function ro(...r){if(r.length===0)return{};if(r.length===1)return r[0];let e={},t={};for(let n of r)for(let o in n)o.startsWith("on")&&typeof n[o]=="function"?(t[o]!=null||(t[o]=[]),t[o].push(n[o])):e[o]=n[o];if(e.disabled||e["aria-disabled"])for(let n in t)/^(on(?:Click|Pointer|Mouse|Key)(?:Down|Up|Press)?)$/.test(n)&&(t[n]=[o=>{var a;return(a=o==null?void 0:o.preventDefault)==null?void 0:a.call(o)}]);for(let n in t)Object.assign(e,{[n](o,...a){let l=t[n];for(let u of l){if((o instanceof Event||(o==null?void 0:o.nativeEvent)instanceof Event)&&o.defaultPrevented)return;u(o,...a)}}});return e}function te(r){var e;return Object.assign(f.forwardRef(r),{displayName:(e=r.displayName)!=null?e:r.name})}function _e(r){let e=Object.assign({},r);for(let t in e)e[t]===void 0&&delete e[t];return e}function Dt(r,e=[]){let t=Object.assign({},r);for(let n of e)n in t&&delete t[n];return t}let Xl="span";var Br=(r=>(r[r.None=1]="None",r[r.Focusable=2]="Focusable",r[r.Hidden=4]="Hidden",r))(Br||{});function Jl(r,e){var t;let{features:n=1,...o}=r,a={ref:e,"aria-hidden":(n&2)===2?!0:(t=o["aria-hidden"])!=null?t:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return ae()({ourProps:a,theirProps:o,slot:{},defaultTag:Xl,name:"Hidden"})}let kt=te(Jl),to=Symbol();function Ql(r,e=!0){return Object.assign(r,{[to]:e})}function ye(...r){let e=f.useRef(r);f.useEffect(()=>{e.current=r},[r]);let t=B(n=>{for(let o of e.current)o!=null&&(typeof o=="function"?o(n):o.current=n)});return r.every(n=>n==null||(n==null?void 0:n[to]))?void 0:t}let Nt=f.createContext(null);Nt.displayName="DescriptionContext";function no(){let r=f.useContext(Nt);if(r===null){let e=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(e,no),e}return r}function Zl(){let[r,e]=f.useState([]);return[r.length>0?r.join(" "):void 0,f.useMemo(()=>function(t){let n=B(a=>(e(l=>[...l,a]),()=>e(l=>{let u=l.slice(),i=u.indexOf(a);return i!==-1&&u.splice(i,1),u}))),o=f.useMemo(()=>({register:n,slot:t.slot,name:t.name,props:t.props,value:t.value}),[n,t.slot,t.name,t.props,t.value]);return f.createElement(Nt.Provider,{value:o},t.children)},[e])]}let eu="p";function ru(r,e){let t=f.useId(),n=Gl(),{id:o=`headlessui-description-${t}`,...a}=r,l=no(),u=ye(e);ee(()=>l.register(o),[o,l.register]);let i=n||!1,d=f.useMemo(()=>({...l.slot,disabled:i}),[l.slot,i]),s={ref:u,...l.props,id:o};return ae()({ourProps:s,theirProps:a,slot:d,defaultTag:eu,name:l.name||"Description"})}let tu=te(ru),nu=Object.assign(tu,{});var oo=(r=>(r.Space=" ",r.Enter="Enter",r.Escape="Escape",r.Backspace="Backspace",r.Delete="Delete",r.ArrowLeft="ArrowLeft",r.ArrowUp="ArrowUp",r.ArrowRight="ArrowRight",r.ArrowDown="ArrowDown",r.Home="Home",r.End="End",r.PageUp="PageUp",r.PageDown="PageDown",r.Tab="Tab",r))(oo||{});let ou=f.createContext(()=>{});function au({value:r,children:e}){return f.createElement(ou.Provider,{value:r},e)}let iu=class extends Map{constructor(e){super(),this.factory=e}get(e){let t=super.get(e);return t===void 0&&(t=this.factory(e),this.set(e,t)),t}};function ao(r,e){let t=r(),n=new Set;return{getSnapshot(){return t},subscribe(o){return n.add(o),()=>n.delete(o)},dispatch(o,...a){let l=e[o].call(t,...a);l&&(t=l,n.forEach(u=>u()))}}}function io(r){return f.useSyncExternalStore(r.subscribe,r.getSnapshot,r.getSnapshot)}let lu=new iu(()=>ao(()=>[],{ADD(r){return this.includes(r)?this:[...this,r]},REMOVE(r){let e=this.indexOf(r);if(e===-1)return this;let t=this.slice();return t.splice(e,1),t}}));function Qe(r,e){let t=lu.get(e),n=f.useId(),o=io(t);if(ee(()=>{if(r)return t.dispatch("ADD",n),()=>t.dispatch("REMOVE",n)},[t,r]),!r)return!1;let a=o.indexOf(n),l=o.length;return a===-1&&(a=l,l+=1),a===l-1}let jt=new Map,mr=new Map;function lo(r){var e;let t=(e=mr.get(r))!=null?e:0;return mr.set(r,t+1),t!==0?()=>uo(r):(jt.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0,()=>uo(r))}function uo(r){var e;let t=(e=mr.get(r))!=null?e:1;if(t===1?mr.delete(r):mr.set(r,t-1),t!==1)return;let n=jt.get(r);n&&(n["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",n["aria-hidden"]),r.inert=n.inert,jt.delete(r))}function uu(r,{allowed:e,disallowed:t}={}){let n=Qe(r,"inert-others");ee(()=>{var o,a;if(!n)return;let l=Oe();for(let i of(o=t==null?void 0:t())!=null?o:[])i&&l.add(lo(i));let u=(a=e==null?void 0:e())!=null?a:[];for(let i of u){if(!i)continue;let d=jr(i);if(!d)continue;let s=i.parentElement;for(;s&&s!==d.body;){for(let g of s.children)u.some(v=>g.contains(v))||l.add(lo(g));s=s.parentElement}}return l.dispose},[n,e,t])}function su(r,e,t){let n=Ie(o=>{let a=o.getBoundingClientRect();a.x===0&&a.y===0&&a.width===0&&a.height===0&&t()});f.useEffect(()=>{if(!r)return;let o=e===null?null:e instanceof HTMLElement?e:e.current;if(!o)return;let a=Oe();if(typeof ResizeObserver<"u"){let l=new ResizeObserver(()=>n.current(o));l.observe(o),a.add(()=>l.disconnect())}if(typeof IntersectionObserver<"u"){let l=new IntersectionObserver(()=>n.current(o));l.observe(o),a.add(()=>l.disconnect())}return()=>a.dispose()},[e,n,r])}let Rr=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(r=>`${r}:not([tabindex='-1'])`).join(","),cu=["[data-autofocus]"].map(r=>`${r}:not([tabindex='-1'])`).join(",");var he=(r=>(r[r.First=1]="First",r[r.Previous=2]="Previous",r[r.Next=4]="Next",r[r.Last=8]="Last",r[r.WrapAround=16]="WrapAround",r[r.NoScroll=32]="NoScroll",r[r.AutoFocus=64]="AutoFocus",r))(he||{}),Lt=(r=>(r[r.Error=0]="Error",r[r.Overflow=1]="Overflow",r[r.Success=2]="Success",r[r.Underflow=3]="Underflow",r))(Lt||{}),fu=(r=>(r[r.Previous=-1]="Previous",r[r.Next=1]="Next",r))(fu||{});function du(r=document.body){return r==null?[]:Array.from(r.querySelectorAll(Rr)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}function pu(r=document.body){return r==null?[]:Array.from(r.querySelectorAll(cu)).sort((e,t)=>Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var so=(r=>(r[r.Strict=0]="Strict",r[r.Loose=1]="Loose",r))(so||{});function yu(r,e=0){var t;return r===((t=jr(r))==null?void 0:t.body)?!1:Pe(e,{0(){return r.matches(Rr)},1(){let n=r;for(;n!==null;){if(n.matches(Rr))return!0;n=n.parentElement}return!1}})}var mu=(r=>(r[r.Keyboard=0]="Keyboard",r[r.Mouse=1]="Mouse",r))(mu||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",r=>{r.metaKey||r.altKey||r.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",r=>{r.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:r.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function ge(r){r==null||r.focus({preventScroll:!0})}let vu=["textarea","input"].join(",");function hu(r){var e,t;return(t=(e=r==null?void 0:r.matches)==null?void 0:e.call(r,vu))!=null?t:!1}function gu(r,e=t=>t){return r.slice().sort((t,n)=>{let o=e(t),a=e(n);if(o===null||a===null)return 0;let l=o.compareDocumentPosition(a);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function vr(r,e,{sorted:t=!0,relativeTo:n=null,skipElements:o=[]}={}){let a=Array.isArray(r)?r.length>0?r[0].ownerDocument:document:r.ownerDocument,l=Array.isArray(r)?t?gu(r):r:e&64?pu(r):du(r);o.length>0&&l.length>1&&(l=l.filter(E=>!o.some(p=>p!=null&&"current"in p?(p==null?void 0:p.current)===E:p===E))),n=n??a.activeElement;let u=(()=>{if(e&5)return 1;if(e&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),i=(()=>{if(e&1)return 0;if(e&2)return Math.max(0,l.indexOf(n))-1;if(e&4)return Math.max(0,l.indexOf(n))+1;if(e&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=e&32?{preventScroll:!0}:{},s=0,g=l.length,v;do{if(s>=g||s+g<=0)return 0;let E=i+s;if(e&16)E=(E+g)%g;else{if(E<0)return 3;if(E>=g)return 1}v=l[E],v==null||v.focus(d),s+=u}while(v!==a.activeElement);return e&6&&hu(v)&&v.select(),2}function co(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function bu(){return/Android/gi.test(window.navigator.userAgent)}function wu(){return co()||bu()}function hr(r,e,t,n){let o=Ie(t);f.useEffect(()=>{if(!r)return;function a(l){o.current(l)}return document.addEventListener(e,a,n),()=>document.removeEventListener(e,a,n)},[r,e,n])}function fo(r,e,t,n){let o=Ie(t);f.useEffect(()=>{if(!r)return;function a(l){o.current(l)}return window.addEventListener(e,a,n),()=>window.removeEventListener(e,a,n)},[r,e,n])}const po=30;function Eu(r,e,t){let n=Qe(r,"outside-click"),o=Ie(t),a=f.useCallback(function(i,d){if(i.defaultPrevented)return;let s=d(i);if(s===null||!s.getRootNode().contains(s)||!s.isConnected)return;let g=function v(E){return typeof E=="function"?v(E()):Array.isArray(E)||E instanceof Set?E:[E]}(e);for(let v of g)if(v!==null&&(v.contains(s)||i.composed&&i.composedPath().includes(v)))return;return!yu(s,so.Loose)&&s.tabIndex!==-1&&i.preventDefault(),o.current(i,s)},[o,e]),l=f.useRef(null);hr(n,"pointerdown",i=>{var d,s;l.current=((s=(d=i.composedPath)==null?void 0:d.call(i))==null?void 0:s[0])||i.target},!0),hr(n,"mousedown",i=>{var d,s;l.current=((s=(d=i.composedPath)==null?void 0:d.call(i))==null?void 0:s[0])||i.target},!0),hr(n,"click",i=>{wu()||l.current&&(a(i,()=>l.current),l.current=null)},!0);let u=f.useRef({x:0,y:0});hr(n,"touchstart",i=>{u.current.x=i.touches[0].clientX,u.current.y=i.touches[0].clientY},!0),hr(n,"touchend",i=>{let d={x:i.changedTouches[0].clientX,y:i.changedTouches[0].clientY};if(!(Math.abs(d.x-u.current.x)>=po||Math.abs(d.y-u.current.y)>=po))return a(i,()=>i.target instanceof HTMLElement?i.target:null)},!0),fo(n,"blur",i=>a(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function gr(...r){return f.useMemo(()=>jr(...r),[...r])}function yo(r,e,t,n){let o=Ie(t);f.useEffect(()=>{r=r??window;function a(l){o.current(l)}return r.addEventListener(e,a,n),()=>r.removeEventListener(e,a,n)},[r,e,n])}function Su(){let r;return{before({doc:e}){var t;let n=e.documentElement,o=(t=e.defaultView)!=null?t:window;r=Math.max(0,o.innerWidth-n.clientWidth)},after({doc:e,d:t}){let n=e.documentElement,o=Math.max(0,n.clientWidth-n.offsetWidth),a=Math.max(0,r-o);t.style(n,"paddingRight",`${a}px`)}}}function xu(){return co()?{before({doc:r,d:e,meta:t}){function n(o){return t.containers.flatMap(a=>a()).some(a=>a.contains(o))}e.microTask(()=>{var o;if(window.getComputedStyle(r.documentElement).scrollBehavior!=="auto"){let u=Oe();u.style(r.documentElement,"scrollBehavior","auto"),e.add(()=>e.microTask(()=>u.dispose()))}let a=(o=window.scrollY)!=null?o:window.pageYOffset,l=null;e.addEventListener(r,"click",u=>{if(u.target instanceof HTMLElement)try{let i=u.target.closest("a");if(!i)return;let{hash:d}=new URL(i.href),s=r.querySelector(d);s&&!n(s)&&(l=s)}catch{}},!0),e.addEventListener(r,"touchstart",u=>{if(u.target instanceof HTMLElement)if(n(u.target)){let i=u.target;for(;i.parentElement&&n(i.parentElement);)i=i.parentElement;e.style(i,"overscrollBehavior","contain")}else e.style(u.target,"touchAction","none")}),e.addEventListener(r,"touchmove",u=>{if(u.target instanceof HTMLElement){if(u.target.tagName==="INPUT")return;if(n(u.target)){let i=u.target;for(;i.parentElement&&i.dataset.headlessuiPortal!==""&&!(i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth);)i=i.parentElement;i.dataset.headlessuiPortal===""&&u.preventDefault()}else u.preventDefault()}},{passive:!1}),e.add(()=>{var u;let i=(u=window.scrollY)!=null?u:window.pageYOffset;a!==i&&window.scrollTo(0,a),l&&l.isConnected&&(l.scrollIntoView({block:"nearest"}),l=null)})})}}:{}}function Ou(){return{before({doc:r,d:e}){e.style(r.documentElement,"overflow","hidden")}}}function Pu(r){let e={};for(let t of r)Object.assign(e,t(e));return e}let De=ao(()=>new Map,{PUSH(r,e){var t;let n=(t=this.get(r))!=null?t:{doc:r,count:0,d:Oe(),meta:new Set};return n.count++,n.meta.add(e),this.set(r,n),this},POP(r,e){let t=this.get(r);return t&&(t.count--,t.meta.delete(e)),this},SCROLL_PREVENT({doc:r,d:e,meta:t}){let n={doc:r,d:e,meta:Pu(t)},o=[xu(),Su(),Ou()];o.forEach(({before:a})=>a==null?void 0:a(n)),o.forEach(({after:a})=>a==null?void 0:a(n))},SCROLL_ALLOW({d:r}){r.dispose()},TEARDOWN({doc:r}){this.delete(r)}});De.subscribe(()=>{let r=De.getSnapshot(),e=new Map;for(let[t]of r)e.set(t,t.documentElement.style.overflow);for(let t of r.values()){let n=e.get(t.doc)==="hidden",o=t.count!==0;(o&&!n||!o&&n)&&De.dispatch(t.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",t),t.count===0&&De.dispatch("TEARDOWN",t)}});function Au(r,e,t=()=>({containers:[]})){let n=io(De),o=e?n.get(e):void 0,a=o?o.count>0:!1;return ee(()=>{if(!(!e||!r))return De.dispatch("PUSH",e,t),()=>De.dispatch("POP",e,t)},[r,e]),a}function Tu(r,e,t=()=>[document.body]){let n=Qe(r,"scroll-lock");Au(n,e,o=>{var a;return{containers:[...(a=o.containers)!=null?a:[],t]}})}function $u(r=0){let[e,t]=f.useState(r),n=f.useCallback(i=>t(i),[e]),o=f.useCallback(i=>t(d=>d|i),[e]),a=f.useCallback(i=>(e&i)===i,[e]),l=f.useCallback(i=>t(d=>d&~i),[t]),u=f.useCallback(i=>t(d=>d^i),[t]);return{flags:e,setFlag:n,addFlag:o,hasFlag:a,removeFlag:l,toggleFlag:u}}var mo,vo;typeof process<"u"&&typeof globalThis<"u"&&typeof Element<"u"&&((mo=process==null?void 0:process.env)==null?void 0:mo.NODE_ENV)==="test"&&typeof((vo=Element==null?void 0:Element.prototype)==null?void 0:vo.getAnimations)>"u"&&(Element.prototype.getAnimations=function(){return console.warn(["Headless UI has polyfilled `Element.prototype.getAnimations` for your tests.","Please install a proper polyfill e.g. `jsdom-testing-mocks`, to silence these warnings.","","Example usage:","```js","import { mockAnimationsApi } from 'jsdom-testing-mocks'","mockAnimationsApi()","```"].join(`
|
|
38
|
+
`)),[]});var Cu=(r=>(r[r.None=0]="None",r[r.Closed=1]="Closed",r[r.Enter=2]="Enter",r[r.Leave=4]="Leave",r))(Cu||{});function Fu(r){let e={};for(let t in r)r[t]===!0&&(e[`data-${t}`]="");return e}function Mu(r,e,t,n){let[o,a]=f.useState(t),{hasFlag:l,addFlag:u,removeFlag:i}=$u(r&&o?3:0),d=f.useRef(!1),s=f.useRef(!1),g=It();return ee(()=>{var v;if(r){if(t&&a(!0),!e){t&&u(3);return}return(v=n==null?void 0:n.start)==null||v.call(n,t),Iu(e,{inFlight:d,prepare(){s.current?s.current=!1:s.current=d.current,d.current=!0,!s.current&&(t?(u(3),i(4)):(u(4),i(2)))},run(){s.current?t?(i(3),u(4)):(i(4),u(3)):t?i(1):u(1)},done(){var E;s.current&&typeof e.getAnimations=="function"&&e.getAnimations().length>0||(d.current=!1,i(7),t||a(!1),(E=n==null?void 0:n.end)==null||E.call(n,t))}})}},[r,t,e,g]),r?[o,{closed:l(1),enter:l(2),leave:l(4),transition:l(2)||l(4)}]:[t,{closed:void 0,enter:void 0,leave:void 0,transition:void 0}]}function Iu(r,{prepare:e,run:t,done:n,inFlight:o}){let a=Oe();return Du(r,{prepare:e,inFlight:o}),a.nextFrame(()=>{t(),a.requestAnimationFrame(()=>{a.add(_u(r,n))})}),a.dispose}function _u(r,e){var t,n;let o=Oe();if(!r)return o.dispose;let a=!1;o.add(()=>{a=!0});let l=(n=(t=r.getAnimations)==null?void 0:t.call(r).filter(u=>u instanceof CSSTransition))!=null?n:[];return l.length===0?(e(),o.dispose):(Promise.allSettled(l.map(u=>u.finished)).then(()=>{a||e()}),o.dispose)}function Du(r,{inFlight:e,prepare:t}){if(e!=null&&e.current){t();return}let n=r.style.transition;r.style.transition="none",t(),r.offsetHeight,r.style.transition=n}function Wt(r,e){let t=f.useRef([]),n=B(r);f.useEffect(()=>{let o=[...t.current];for(let[a,l]of e.entries())if(t.current[a]!==l){let u=n(e,o);return t.current=e,u}},[n,...e])}let Hr=f.createContext(null);Hr.displayName="OpenClosedContext";var ue=(r=>(r[r.Open=1]="Open",r[r.Closed=2]="Closed",r[r.Closing=4]="Closing",r[r.Opening=8]="Opening",r))(ue||{});function Vr(){return f.useContext(Hr)}function ku({value:r,children:e}){return f.createElement(Hr.Provider,{value:r},e)}function Nu({children:r}){return f.createElement(Hr.Provider,{value:null},r)}function ju(r){function e(){document.readyState!=="loading"&&(r(),document.removeEventListener("DOMContentLoaded",e))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",e),e())}let Te=[];ju(()=>{function r(e){if(!(e.target instanceof HTMLElement)||e.target===document.body||Te[0]===e.target)return;let t=e.target;t=t.closest(Rr),Te.unshift(t??e.target),Te=Te.filter(n=>n!=null&&n.isConnected),Te.splice(10)}window.addEventListener("click",r,{capture:!0}),window.addEventListener("mousedown",r,{capture:!0}),window.addEventListener("focus",r,{capture:!0}),document.body.addEventListener("click",r,{capture:!0}),document.body.addEventListener("mousedown",r,{capture:!0}),document.body.addEventListener("focus",r,{capture:!0})});function ho(r){let e=B(r),t=f.useRef(!1);f.useEffect(()=>(t.current=!1,()=>{t.current=!0,Lr(()=>{t.current&&e()})}),[e])}function Lu(){let r=typeof document>"u";return"useSyncExternalStore"in tr?(e=>e.useSyncExternalStore)(tr)(()=>()=>{},()=>!1,()=>!r):!1}function br(){let r=Lu(),[e,t]=tr.useState(Me.isHandoffComplete);return e&&Me.isHandoffComplete===!1&&t(!1),tr.useEffect(()=>{e!==!0&&t(!0)},[e]),tr.useEffect(()=>Me.handoff(),[]),r?!1:e}let go=f.createContext(!1);function Wu(){return f.useContext(go)}function bo(r){return f.createElement(go.Provider,{value:r.force},r.children)}function Uu(r){let e=Wu(),t=f.useContext(Eo),n=gr(r),[o,a]=f.useState(()=>{var l;if(!e&&t!==null)return(l=t.current)!=null?l:null;if(Me.isServer)return null;let u=n==null?void 0:n.getElementById("headlessui-portal-root");if(u)return u;if(n===null)return null;let i=n.createElement("div");return i.setAttribute("id","headlessui-portal-root"),n.body.appendChild(i)});return f.useEffect(()=>{o!==null&&(n!=null&&n.body.contains(o)||n==null||n.body.appendChild(o))},[o,n]),f.useEffect(()=>{e||t!==null&&a(t.current)},[t,a,e]),o}let wo=f.Fragment,Bu=te(function(r,e){let t=r,n=f.useRef(null),o=ye(Ql(g=>{n.current=g}),e),a=gr(n),l=Uu(n),[u]=f.useState(()=>{var g;return Me.isServer?null:(g=a==null?void 0:a.createElement("div"))!=null?g:null}),i=f.useContext(Ut),d=br();ee(()=>{!l||!u||l.contains(u)||(u.setAttribute("data-headlessui-portal",""),l.appendChild(u))},[l,u]),ee(()=>{if(u&&i)return i.register(u)},[i,u]),ho(()=>{var g;!l||!u||(u instanceof Node&&l.contains(u)&&l.removeChild(u),l.childNodes.length<=0&&((g=l.parentElement)==null||g.removeChild(l)))});let s=ae();return d?!l||!u?null:Jo.createPortal(s({ourProps:{ref:o},theirProps:t,slot:{},defaultTag:wo,name:"Portal"}),u):null});function Ru(r,e){let t=ye(e),{enabled:n=!0,...o}=r,a=ae();return n?f.createElement(Bu,{...o,ref:t}):a({ourProps:{ref:t},theirProps:o,slot:{},defaultTag:wo,name:"Portal"})}let Hu=f.Fragment,Eo=f.createContext(null);function Vu(r,e){let{target:t,...n}=r,o={ref:ye(e)},a=ae();return f.createElement(Eo.Provider,{value:t},a({ourProps:o,theirProps:n,defaultTag:Hu,name:"Popover.Group"}))}let Ut=f.createContext(null);function qu(){let r=f.useContext(Ut),e=f.useRef([]),t=B(a=>(e.current.push(a),r&&r.register(a),()=>n(a))),n=B(a=>{let l=e.current.indexOf(a);l!==-1&&e.current.splice(l,1),r&&r.unregister(a)}),o=f.useMemo(()=>({register:t,unregister:n,portals:e}),[t,n,e]);return[e,f.useMemo(()=>function({children:a}){return f.createElement(Ut.Provider,{value:o},a)},[o])]}let Gu=te(Ru),So=te(Vu),zu=Object.assign(Gu,{Group:So});function Yu(r,e=typeof document<"u"?document.defaultView:null,t){let n=Qe(r,"escape");yo(e,"keydown",o=>{n&&(o.defaultPrevented||o.key===oo.Escape&&t(o))})}function Ku(){var r;let[e]=f.useState(()=>typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(pointer: coarse)"):null),[t,n]=f.useState((r=e==null?void 0:e.matches)!=null?r:!1);return ee(()=>{if(!e)return;function o(a){n(a.matches)}return e.addEventListener("change",o),()=>e.removeEventListener("change",o)},[e]),t}function Xu({defaultContainers:r=[],portals:e,mainTreeNode:t}={}){let n=gr(t),o=B(()=>{var a,l;let u=[];for(let i of r)i!==null&&(i instanceof HTMLElement?u.push(i):"current"in i&&i.current instanceof HTMLElement&&u.push(i.current));if(e!=null&&e.current)for(let i of e.current)u.push(i);for(let i of(a=n==null?void 0:n.querySelectorAll("html > *, body > *"))!=null?a:[])i!==document.body&&i!==document.head&&i instanceof HTMLElement&&i.id!=="headlessui-portal-root"&&(t&&(i.contains(t)||i.contains((l=t==null?void 0:t.getRootNode())==null?void 0:l.host))||u.some(d=>i.contains(d))||u.push(i));return u});return{resolveContainers:o,contains:B(a=>o().some(l=>l.contains(a)))}}let xo=f.createContext(null);function Oo({children:r,node:e}){let[t,n]=f.useState(null),o=Po(e??t);return f.createElement(xo.Provider,{value:o},r,o===null&&f.createElement(kt,{features:Br.Hidden,ref:a=>{var l,u;if(a){for(let i of(u=(l=jr(a))==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?u:[])if(i!==document.body&&i!==document.head&&i instanceof HTMLElement&&i!=null&&i.contains(a)){n(i);break}}}}))}function Po(r=null){var e;return(e=f.useContext(xo))!=null?e:r}function Bt(){let r=f.useRef(!1);return ee(()=>(r.current=!0,()=>{r.current=!1}),[]),r}var wr=(r=>(r[r.Forwards=0]="Forwards",r[r.Backwards=1]="Backwards",r))(wr||{});function Ju(){let r=f.useRef(0);return fo(!0,"keydown",e=>{e.key==="Tab"&&(r.current=e.shiftKey?1:0)},!0),r}function Ao(r){if(!r)return new Set;if(typeof r=="function")return new Set(r());let e=new Set;for(let t of r.current)t.current instanceof HTMLElement&&e.add(t.current);return e}let Qu="div";var ke=(r=>(r[r.None=0]="None",r[r.InitialFocus=1]="InitialFocus",r[r.TabLock=2]="TabLock",r[r.FocusLock=4]="FocusLock",r[r.RestoreFocus=8]="RestoreFocus",r[r.AutoFocus=16]="AutoFocus",r))(ke||{});function Zu(r,e){let t=f.useRef(null),n=ye(t,e),{initialFocus:o,initialFocusFallback:a,containers:l,features:u=15,...i}=r;br()||(u=0);let d=gr(t);ns(u,{ownerDocument:d});let s=os(u,{ownerDocument:d,container:t,initialFocus:o,initialFocusFallback:a});as(u,{ownerDocument:d,container:t,containers:l,previousActiveElement:s});let g=Ju(),v=B(b=>{let w=t.current;w&&(x=>x())(()=>{Pe(g.current,{[wr.Forwards]:()=>{vr(w,he.First,{skipElements:[b.relatedTarget,a]})},[wr.Backwards]:()=>{vr(w,he.Last,{skipElements:[b.relatedTarget,a]})}})})}),E=Qe(!!(u&2),"focus-trap#tab-lock"),p=It(),m=f.useRef(!1),y={ref:n,onKeyDown(b){b.key=="Tab"&&(m.current=!0,p.requestAnimationFrame(()=>{m.current=!1}))},onBlur(b){if(!(u&4))return;let w=Ao(l);t.current instanceof HTMLElement&&w.add(t.current);let x=b.relatedTarget;x instanceof HTMLElement&&x.dataset.headlessuiFocusGuard!=="true"&&(To(w,x)||(m.current?vr(t.current,Pe(g.current,{[wr.Forwards]:()=>he.Next,[wr.Backwards]:()=>he.Previous})|he.WrapAround,{relativeTo:b.target}):b.target instanceof HTMLElement&&ge(b.target)))}},h=ae();return f.createElement(f.Fragment,null,E&&f.createElement(kt,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:Br.Focusable}),h({ourProps:y,theirProps:i,defaultTag:Qu,name:"FocusTrap"}),E&&f.createElement(kt,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:Br.Focusable}))}let es=te(Zu),rs=Object.assign(es,{features:ke});function ts(r=!0){let e=f.useRef(Te.slice());return Wt(([t],[n])=>{n===!0&&t===!1&&Lr(()=>{e.current.splice(0)}),n===!1&&t===!0&&(e.current=Te.slice())},[r,Te,e]),B(()=>{var t;return(t=e.current.find(n=>n!=null&&n.isConnected))!=null?t:null})}function ns(r,{ownerDocument:e}){let t=!!(r&8),n=ts(t);Wt(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&ge(n())},[t]),ho(()=>{t&&ge(n())})}function os(r,{ownerDocument:e,container:t,initialFocus:n,initialFocusFallback:o}){let a=f.useRef(null),l=Qe(!!(r&1),"focus-trap#initial-focus"),u=Bt();return Wt(()=>{if(r===0)return;if(!l){o!=null&&o.current&&ge(o.current);return}let i=t.current;i&&Lr(()=>{if(!u.current)return;let d=e==null?void 0:e.activeElement;if(n!=null&&n.current){if((n==null?void 0:n.current)===d){a.current=d;return}}else if(i.contains(d)){a.current=d;return}if(n!=null&&n.current)ge(n.current);else{if(r&16){if(vr(i,he.First|he.AutoFocus)!==Lt.Error)return}else if(vr(i,he.First)!==Lt.Error)return;if(o!=null&&o.current&&(ge(o.current),(e==null?void 0:e.activeElement)===o.current))return;console.warn("There are no focusable elements inside the <FocusTrap />")}a.current=e==null?void 0:e.activeElement})},[o,l,r]),a}function as(r,{ownerDocument:e,container:t,containers:n,previousActiveElement:o}){let a=Bt(),l=!!(r&4);yo(e==null?void 0:e.defaultView,"focus",u=>{if(!l||!a.current)return;let i=Ao(n);t.current instanceof HTMLElement&&i.add(t.current);let d=o.current;if(!d)return;let s=u.target;s&&s instanceof HTMLElement?To(i,s)?(o.current=s,ge(s)):(u.preventDefault(),u.stopPropagation(),ge(d)):ge(o.current)},!0)}function To(r,e){for(let t of r)if(t.contains(e))return!0;return!1}function $o(r){var e;return!!(r.enter||r.enterFrom||r.enterTo||r.leave||r.leaveFrom||r.leaveTo)||((e=r.as)!=null?e:Fo)!==f.Fragment||f.Children.count(r.children)===1}let qr=f.createContext(null);qr.displayName="TransitionContext";var is=(r=>(r.Visible="visible",r.Hidden="hidden",r))(is||{});function ls(){let r=f.useContext(qr);if(r===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return r}function us(){let r=f.useContext(Gr);if(r===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return r}let Gr=f.createContext(null);Gr.displayName="NestingContext";function zr(r){return"children"in r?zr(r.children):r.current.filter(({el:e})=>e.current!==null).filter(({state:e})=>e==="visible").length>0}function Co(r,e){let t=Ie(r),n=f.useRef([]),o=Bt(),a=It(),l=B((E,p=Ae.Hidden)=>{let m=n.current.findIndex(({el:y})=>y===E);m!==-1&&(Pe(p,{[Ae.Unmount](){n.current.splice(m,1)},[Ae.Hidden](){n.current[m].state="hidden"}}),a.microTask(()=>{var y;!zr(n)&&o.current&&((y=t.current)==null||y.call(t))}))}),u=B(E=>{let p=n.current.find(({el:m})=>m===E);return p?p.state!=="visible"&&(p.state="visible"):n.current.push({el:E,state:"visible"}),()=>l(E,Ae.Unmount)}),i=f.useRef([]),d=f.useRef(Promise.resolve()),s=f.useRef({enter:[],leave:[]}),g=B((E,p,m)=>{i.current.splice(0),e&&(e.chains.current[p]=e.chains.current[p].filter(([y])=>y!==E)),e==null||e.chains.current[p].push([E,new Promise(y=>{i.current.push(y)})]),e==null||e.chains.current[p].push([E,new Promise(y=>{Promise.all(s.current[p].map(([h,b])=>b)).then(()=>y())})]),p==="enter"?d.current=d.current.then(()=>e==null?void 0:e.wait.current).then(()=>m(p)):m(p)}),v=B((E,p,m)=>{Promise.all(s.current[p].splice(0).map(([y,h])=>h)).then(()=>{var y;(y=i.current.shift())==null||y()}).then(()=>m(p))});return f.useMemo(()=>({children:n,register:u,unregister:l,onStart:g,onStop:v,wait:d,chains:s}),[u,l,n,g,v,s,d])}let Fo=f.Fragment,Mo=Wr.RenderStrategy;function ss(r,e){var t,n;let{transition:o=!0,beforeEnter:a,afterEnter:l,beforeLeave:u,afterLeave:i,enter:d,enterFrom:s,enterTo:g,entered:v,leave:E,leaveFrom:p,leaveTo:m,...y}=r,[h,b]=f.useState(null),w=f.useRef(null),x=$o(r),P=ye(...x?[w,e,b]:e===null?[]:[e]),D=(t=y.unmount)==null||t?Ae.Unmount:Ae.Hidden,{show:_,appear:U,initial:H}=ls(),[j,z]=f.useState(_?"visible":"hidden"),V=us(),{register:C,unregister:T}=V;ee(()=>C(w),[C,w]),ee(()=>{if(D===Ae.Hidden&&w.current){if(_&&j!=="visible"){z("visible");return}return Pe(j,{hidden:()=>T(w),visible:()=>C(w)})}},[j,w,C,T,_,D]);let k=br();ee(()=>{if(x&&k&&j==="visible"&&w.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[w,j,k,x]);let oe=H&&!U,se=U&&_&&H,me=f.useRef(!1),Z=Co(()=>{me.current||(z("hidden"),T(w))},V),ce=B(Le=>{me.current=!0;let be=Le?"enter":"leave";Z.onStart(w,be,we=>{we==="enter"?a==null||a():we==="leave"&&(u==null||u())})}),q=B(Le=>{let be=Le?"enter":"leave";me.current=!1,Z.onStop(w,be,we=>{we==="enter"?l==null||l():we==="leave"&&(i==null||i())}),be==="leave"&&!zr(Z)&&(z("hidden"),T(w))});f.useEffect(()=>{x&&o||(ce(_),q(_))},[_,x,o]);let Ne=!(!o||!x||!k||oe),[,J]=Mu(Ne,h,_,{start:ce,end:q}),qt=_e({ref:P,className:((n=_t(y.className,se&&d,se&&s,J.enter&&d,J.enter&&J.closed&&s,J.enter&&!J.closed&&g,J.leave&&E,J.leave&&!J.closed&&p,J.leave&&J.closed&&m,!J.transition&&_&&v))==null?void 0:n.trim())||void 0,...Fu(J)}),je=0;j==="visible"&&(je|=ue.Open),j==="hidden"&&(je|=ue.Closed),J.enter&&(je|=ue.Opening),J.leave&&(je|=ue.Closing);let Er=ae();return f.createElement(Gr.Provider,{value:Z},f.createElement(ku,{value:je},Er({ourProps:qt,theirProps:y,defaultTag:Fo,features:Mo,visible:j==="visible",name:"Transition.Child"})))}function cs(r,e){let{show:t,appear:n=!1,unmount:o=!0,...a}=r,l=f.useRef(null),u=$o(r),i=ye(...u?[l,e]:e===null?[]:[e]);br();let d=Vr();if(t===void 0&&d!==null&&(t=(d&ue.Open)===ue.Open),t===void 0)throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[s,g]=f.useState(t?"visible":"hidden"),v=Co(()=>{t||g("hidden")}),[E,p]=f.useState(!0),m=f.useRef([t]);ee(()=>{E!==!1&&m.current[m.current.length-1]!==t&&(m.current.push(t),p(!1))},[m,t]);let y=f.useMemo(()=>({show:t,appear:n,initial:E}),[t,n,E]);ee(()=>{t?g("visible"):!zr(v)&&l.current!==null&&g("hidden")},[t,v]);let h={unmount:o},b=B(()=>{var P;E&&p(!1),(P=r.beforeEnter)==null||P.call(r)}),w=B(()=>{var P;E&&p(!1),(P=r.beforeLeave)==null||P.call(r)}),x=ae();return f.createElement(Gr.Provider,{value:v},f.createElement(qr.Provider,{value:y},x({ourProps:{...h,as:f.Fragment,children:f.createElement(Io,{ref:i,...h,...a,beforeEnter:b,beforeLeave:w})},theirProps:{},defaultTag:f.Fragment,features:Mo,visible:s==="visible",name:"Transition"})))}function fs(r,e){let t=f.useContext(qr)!==null,n=Vr()!==null;return f.createElement(f.Fragment,null,!t&&n?f.createElement(Rt,{ref:e,...r}):f.createElement(Io,{ref:e,...r}))}let Rt=te(cs),Io=te(ss),Ze=te(fs),_o=Object.assign(Rt,{Child:Ze,Root:Rt});var ds=(r=>(r[r.Open=0]="Open",r[r.Closed=1]="Closed",r))(ds||{}),ps=(r=>(r[r.SetTitleId=0]="SetTitleId",r))(ps||{});let ys={0(r,e){return r.titleId===e.id?r:{...r,titleId:e.id}}},Ht=f.createContext(null);Ht.displayName="DialogContext";function Yr(r){let e=f.useContext(Ht);if(e===null){let t=new Error(`<${r} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,Yr),t}return e}function ms(r,e){return Pe(e.type,ys,r,e)}let Do=te(function(r,e){let t=f.useId(),{id:n=`headlessui-dialog-${t}`,open:o,onClose:a,initialFocus:l,role:u="dialog",autoFocus:i=!0,__demoMode:d=!1,unmount:s=!1,...g}=r,v=f.useRef(!1);u=function(){return u==="dialog"||u==="alertdialog"?u:(v.current||(v.current=!0,console.warn(`Invalid role [${u}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let E=Vr();o===void 0&&E!==null&&(o=(E&ue.Open)===ue.Open);let p=f.useRef(null),m=ye(p,e),y=gr(p),h=o?0:1,[b,w]=f.useReducer(ms,{titleId:null,descriptionId:null,panelRef:f.createRef()}),x=B(()=>a(!1)),P=B(q=>w({type:0,id:q})),D=br()?h===0:!1,[_,U]=qu(),H={get current(){var q;return(q=b.panelRef.current)!=null?q:p.current}},j=Po(),{resolveContainers:z}=Xu({mainTreeNode:j,portals:_,defaultContainers:[H]}),V=E!==null?(E&ue.Closing)===ue.Closing:!1;uu(d||V?!1:D,{allowed:B(()=>{var q,Ne;return[(Ne=(q=p.current)==null?void 0:q.closest("[data-headlessui-portal]"))!=null?Ne:null]}),disallowed:B(()=>{var q;return[(q=j==null?void 0:j.closest("body > *:not(#headlessui-portal-root)"))!=null?q:null]})}),Eu(D,z,q=>{q.preventDefault(),x()}),Yu(D,y==null?void 0:y.defaultView,q=>{q.preventDefault(),q.stopPropagation(),document.activeElement&&"blur"in document.activeElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur(),x()}),Tu(d||V?!1:D,y,z),su(D,p,x);let[C,T]=Zl(),k=f.useMemo(()=>[{dialogState:h,close:x,setTitleId:P,unmount:s},b],[h,b,x,P,s]),oe=f.useMemo(()=>({open:h===0}),[h]),se={ref:m,id:n,role:u,tabIndex:-1,"aria-modal":d?void 0:h===0?!0:void 0,"aria-labelledby":b.titleId,"aria-describedby":C,unmount:s},me=!Ku(),Z=ke.None;D&&!d&&(Z|=ke.RestoreFocus,Z|=ke.TabLock,i&&(Z|=ke.AutoFocus),me&&(Z|=ke.InitialFocus));let ce=ae();return f.createElement(Nu,null,f.createElement(bo,{force:!0},f.createElement(zu,null,f.createElement(Ht.Provider,{value:k},f.createElement(So,{target:p},f.createElement(bo,{force:!1},f.createElement(T,{slot:oe},f.createElement(U,null,f.createElement(rs,{initialFocus:l,initialFocusFallback:p,containers:z,features:Z},f.createElement(au,{value:x},ce({ourProps:se,theirProps:g,slot:oe,defaultTag:vs,features:hs,visible:h===0,name:"Dialog"})))))))))))}),vs="div",hs=Wr.RenderStrategy|Wr.Static;function gs(r,e){let{transition:t=!1,open:n,...o}=r,a=Vr(),l=r.hasOwnProperty("open")||a!==null,u=r.hasOwnProperty("onClose");if(!l&&!u)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!l)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!u)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(!a&&typeof r.open!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${r.open}`);if(typeof r.onClose!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${r.onClose}`);return(n!==void 0||t)&&!o.static?f.createElement(Oo,null,f.createElement(_o,{show:n,transition:t,unmount:o.unmount},f.createElement(Do,{ref:e,...o}))):f.createElement(Oo,null,f.createElement(Do,{ref:e,open:n,...o}))}let bs="div";function ws(r,e){let t=f.useId(),{id:n=`headlessui-dialog-panel-${t}`,transition:o=!1,...a}=r,[{dialogState:l,unmount:u},i]=Yr("Dialog.Panel"),d=ye(e,i.panelRef),s=f.useMemo(()=>({open:l===0}),[l]),g=B(y=>{y.stopPropagation()}),v={ref:d,id:n,onClick:g},E=o?Ze:f.Fragment,p=o?{unmount:u}:{},m=ae();return f.createElement(E,{...p},m({ourProps:v,theirProps:a,slot:s,defaultTag:bs,name:"Dialog.Panel"}))}let Es="div";function Ss(r,e){let{transition:t=!1,...n}=r,[{dialogState:o,unmount:a}]=Yr("Dialog.Backdrop"),l=f.useMemo(()=>({open:o===0}),[o]),u={ref:e,"aria-hidden":!0},i=t?Ze:f.Fragment,d=t?{unmount:a}:{},s=ae();return f.createElement(i,{...d},s({ourProps:u,theirProps:n,slot:l,defaultTag:Es,name:"Dialog.Backdrop"}))}let xs="h2";function Os(r,e){let t=f.useId(),{id:n=`headlessui-dialog-title-${t}`,...o}=r,[{dialogState:a,setTitleId:l}]=Yr("Dialog.Title"),u=ye(e);f.useEffect(()=>(l(n),()=>l(null)),[n,l]);let i=f.useMemo(()=>({open:a===0}),[a]),d={ref:u,id:n};return ae()({ourProps:d,theirProps:o,slot:i,defaultTag:xs,name:"Dialog.Title"})}let Ps=te(gs),Vt=te(ws);te(Ss);let As=te(Os),Ts=Object.assign(Ps,{Panel:Vt,Title:As,Description:nu});function ko({onClick:r}){return $.jsxs("button",{type:"button",className:"im-close-button text-gray-400 hover:text-gray-500",onClick:r,children:[$.jsx("span",{className:"sr-only",children:"Close"}),$.jsx("svg",{className:"size-6",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true",children:$.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})]})}const $s=({modalContext:r,config:e,children:t})=>$.jsx("div",{className:"im-modal-container fixed inset-0 z-40 overflow-y-auto p-4",children:$.jsx("div",{className:Nr("im-modal-positioner flex min-h-full justify-center",{"items-start":e.position==="top","items-center":e.position==="center","items-end":e.position==="bottom"}),children:$.jsx(Ze,{enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",afterLeave:r.afterLeave,className:Nr("im-modal-wrapper w-full transition duration-300 ease-in-out",r.onTopOfStack?"":"blur-sm",{"sm:max-w-sm":e.maxWidth==="sm","sm:max-w-md":e.maxWidth==="md","sm:max-w-md md:max-w-lg":e.maxWidth==="lg","sm:max-w-md md:max-w-xl":e.maxWidth==="xl","sm:max-w-md md:max-w-xl lg:max-w-2xl":e.maxWidth==="2xl","sm:max-w-md md:max-w-xl lg:max-w-3xl":e.maxWidth==="3xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl":e.maxWidth==="4xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl":e.maxWidth==="5xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl":e.maxWidth==="6xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl":e.maxWidth==="7xl"}),children:$.jsxs(Vt,{className:`im-modal-content relative ${e.paddingClasses} ${e.panelClasses}`,children:[e.closeButton&&$.jsx("div",{className:"absolute right-0 top-0 pr-3 pt-3",children:$.jsx(ko,{onClick:r.close})}),typeof t=="function"?t({modalContext:r,config:e}):t]})})})}),Cs=({modalContext:r,config:e,children:t})=>$.jsx("div",{className:"im-slideover-container fixed inset-0 z-40 overflow-y-auto overflow-x-hidden",children:$.jsx("div",{className:Nr("im-slideover-positioner flex min-h-full items-center",{"justify-start":e.position==="left","justify-end":e.position==="right"}),children:$.jsx(Ze,{enterFrom:`opacity-0 ${e.position==="left"?"-translate-x-full":"translate-x-full"}`,enterTo:"opacity-100 translate-x-0",leaveFrom:"opacity-100 translate-x-0",leaveTo:`opacity-0 ${e.position==="left"?"-translate-x-full":"translate-x-full"}`,afterLeave:r.afterLeave,className:Nr("im-slideover-wrapper w-full transition duration-300 ease-in-out",r.onTopOfStack?"":"blur-sm",{"sm:max-w-sm":e.maxWidth==="sm","sm:max-w-md":e.maxWidth==="md","sm:max-w-md md:max-w-lg":e.maxWidth==="lg","sm:max-w-md md:max-w-xl":e.maxWidth==="xl","sm:max-w-md md:max-w-xl lg:max-w-2xl":e.maxWidth==="2xl","sm:max-w-md md:max-w-xl lg:max-w-3xl":e.maxWidth==="3xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-4xl":e.maxWidth==="4xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl":e.maxWidth==="5xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-6xl":e.maxWidth==="6xl","sm:max-w-md md:max-w-xl lg:max-w-3xl xl:max-w-5xl 2xl:max-w-7xl":e.maxWidth==="7xl"}),children:$.jsxs(Vt,{className:`im-slideover-content relative ${e.paddingClasses} ${e.panelClasses}`,children:[e.closeButton&&$.jsx("div",{className:"absolute right-0 top-0 pr-3 pt-3",children:$.jsx(ko,{onClick:r.close})}),typeof t=="function"?t({modalContext:r,config:e}):t]})})})}),No=f.forwardRef(({name:r,children:e,...t},n)=>{const o=l=>typeof e=="function"?e(l):e,a=f.useRef(null);return f.useImperativeHandle(n,()=>a.current,[a]),$.jsx(Ft,{ref:a,name:r,...t,children:({afterLeave:l,close:u,config:i,emit:d,getChildModal:s,getParentModal:g,id:v,index:E,isOpen:p,modalContext:m,onTopOfStack:y,reload:h,setOpen:b,shouldRender:w})=>$.jsx(_o,{appear:!0,show:p??!1,children:$.jsxs(Ts,{as:"div",className:"im-dialog relative z-20",onClose:()=>i.closeExplicitly?null:u(),"data-inertiaui-modal-id":v,"data-inertiaui-modal-index":E,children:[E===0?$.jsx(Ze,{enter:"transition transform ease-in-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition transform ease-in-out duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:y?$.jsx("div",{className:"im-backdrop fixed inset-0 z-30 bg-black/75","aria-hidden":"true"}):$.jsx("div",{})}):null,E>0&&y?$.jsx("div",{className:"im-backdrop fixed inset-0 z-30 bg-black/75"}):null,i.slideover?$.jsx(Cs,{modalContext:m,config:i,children:o({afterLeave:l,close:u,config:i,emit:d,getChildModal:s,getParentModal:g,id:v,index:E,isOpen:p,modalContext:m,onTopOfStack:y,reload:h,setOpen:b,shouldRender:w})}):$.jsx($s,{modalContext:m,config:i,children:o({afterLeave:l,close:u,config:i,emit:d,getChildModal:s,getParentModal:g,id:v,index:E,isOpen:p,modalContext:m,onTopOfStack:y,reload:h,setOpen:b,shouldRender:w})})]})})})});No.displayName="Modal";const Fs=({href:r,method:e="get",data:t={},as:n="a",headers:o={},queryStringArrayFormat:a="brackets",onAfterLeave:l=null,onBlur:u=null,onClose:i=null,onError:d=null,onFocus:s=null,onStart:g=null,onSuccess:v=null,navigate:E=null,children:p,...m})=>{const[y,h]=f.useState(!1),[b,w]=f.useState(null),{stack:x,visit:P}=yr(),D=f.useMemo(()=>E??Pr("navigate"),[E]),_={},U={};Object.keys(m).forEach(T=>{Jn.includes(T)||(T.startsWith("on")&&typeof m[T]=="function"?T.toLowerCase()in window?_[T]=m[T]:U[T]=m[T]:_[T]=m[T])});const[H,j]=f.useState(!1);f.useEffect(()=>{b&&(b.onTopOfStack&&H?s==null||s():!b.onTopOfStack&&!H&&(u==null||u()),j(!b.onTopOfStack))},[x]);const z=f.useCallback(()=>{i==null||i()},[i]),V=f.useCallback(()=>{w(null),l==null||l()},[l]),C=f.useCallback(T=>{T==null||T.preventDefault(),!y&&(r.startsWith("#")||(h(!0),g==null||g()),P(r,e,t,o,la(en(m,Jn)),()=>z(x.length),V,a,D).then(k=>{w(k),k.registerEventListenersFromProps(U),v==null||v()}).catch(k=>{console.error(k),d==null||d(k)}).finally(()=>h(!1)))},[r,e,t,o,a,m,z,V]);return $.jsx(n,{..._,href:r,onClick:C,children:typeof p=="function"?p({loading:y}):p})};function Ms(){return yr().stack[Ct()]??null}L.HeadlessModal=Ft,L.Modal=No,L.ModalLink=Fs,L.ModalRoot=Qn,L.ModalStackProvider=Xn,L.getConfig=Pr,L.putConfig=ra,L.renderApp=Bl,L.resetConfig=ea,L.useModal=Ms,L.useModalIndex=Ct,L.useModalStack=yr,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|