@dxos/shell 0.3.11-main.8a2cfe6 → 0.3.11-main.8be6c8a
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/bundle/shell.mjs +36416 -0
- package/dist/bundle/shell.mjs.map +1 -0
- package/dist/bundle/shell.umd.js +210 -0
- package/dist/bundle/shell.umd.js.map +1 -0
- package/dist/bundle/style.css +1 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/react.mjs +317 -266
- package/dist/lib/browser/react.mjs.map +4 -4
- package/dist/types/src/components/IdentityList/DeviceList.d.ts.map +1 -1
- package/dist/types/src/components/IdentityList/DeviceList.js +5 -3
- package/dist/types/src/components/IdentityList/DeviceList.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js +10 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts +6 -0
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js +26 -3
- package/dist/types/src/panels/IdentityPanel/IdentityPanel.stories.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts +7 -6
- package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/identityMachine.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/identityMachine.js +2 -1
- package/dist/types/src/panels/IdentityPanel/identityMachine.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/DeviceManager.d.ts +10 -0
- package/dist/types/src/panels/IdentityPanel/steps/DeviceManager.d.ts.map +1 -0
- package/dist/types/src/panels/IdentityPanel/steps/DeviceManager.js +23 -0
- package/dist/types/src/panels/IdentityPanel/steps/DeviceManager.js.map +1 -0
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js +4 -0
- package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts +0 -1
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js +2 -3
- package/dist/types/src/panels/IdentityPanel/steps/ProfileForm.js.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/index.d.ts +1 -0
- package/dist/types/src/panels/IdentityPanel/steps/index.d.ts.map +1 -1
- package/dist/types/src/panels/IdentityPanel/steps/index.js +1 -0
- package/dist/types/src/panels/IdentityPanel/steps/index.js.map +1 -1
- package/dist/types/src/translations/locales/en-US.d.ts +1 -0
- package/dist/types/src/translations/locales/en-US.d.ts.map +1 -1
- package/dist/types/src/translations/locales/en-US.js +2 -1
- package/dist/types/src/translations/locales/en-US.js.map +1 -1
- package/package.json +17 -17
- package/src/components/IdentityList/DeviceList.tsx +7 -5
- package/src/panels/IdentityPanel/IdentityPanel.stories.tsx +44 -2
- package/src/panels/IdentityPanel/IdentityPanel.tsx +14 -3
- package/src/panels/IdentityPanel/IdentityPanelProps.ts +7 -6
- package/src/panels/IdentityPanel/identityMachine.ts +2 -1
- package/src/panels/IdentityPanel/steps/DeviceManager.tsx +41 -0
- package/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx +6 -1
- package/src/panels/IdentityPanel/steps/ProfileForm.tsx +1 -1
- package/src/panels/IdentityPanel/steps/index.ts +1 -0
- package/src/translations/locales/en-US.ts +2 -1
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
(function(Yt,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("react"),require("react-dom"),require("@phosphor-icons/react"),require("@dxos/react-client/echo"),require("@dxos/react-client"),require("@dxos/client-protocol"),require("@dxos/react-client/halo"),require("@dxos/client-services")):typeof define=="function"&&define.amd?define(["exports","react","react-dom","@phosphor-icons/react","@dxos/react-client/echo","@dxos/react-client","@dxos/client-protocol","@dxos/react-client/halo","@dxos/client-services"],c):(Yt=typeof globalThis<"u"?globalThis:Yt||self,c(Yt.Shell={},Yt.React,Yt.$7SXl2$reactdom,Yt.react,Yt.echo,Yt.reactClient,Yt.clientProtocol,Yt.halo,Yt.clientServices))})(this,function(Yt,c,on,Xe,fa,Ze,Tn,da,D1){"use strict";function $d(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ge=$d(c),Cd=$d(on),C9="";function ai(e){return ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ai(e)}function L1(e,t){if(ai(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ai(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Od(e){var t=L1(e,"string");return ai(t)==="symbol"?t:String(t)}function Ad(e,t,r){return t=Od(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Ge=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function In(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function M1(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){if(this instanceof n){var o=[null];o.push.apply(o,arguments);var i=Function.bind.apply(t,o);return new i}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}function F1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Td(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Od(n.key),n)}}function j1(e,t,r){return t&&Td(e.prototype,t),r&&Td(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}var B1=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,R1={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},U1=function(t){return R1[t]},W1=function(t){return t.replace(B1,U1)};function Id(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Pd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Id(Object(r),!0).forEach(function(n){Ad(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Id(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Sl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:W1},kd,V1=c.createContext();function H1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Sl=Pd(Pd({},Sl),e)}function z1(){return Sl}var G1=function(){function e(){F1(this,e),this.usedNamespaces={}}return j1(e,[{key:"addUsedNamespaces",value:function(r){var n=this;r.forEach(function(o){n.usedNamespaces[o]||(n.usedNamespaces[o]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function K1(e){kd=e}function q1(){return kd}var Y1={type:"3rdParty",init:function(t){H1(t.options.react),K1(t)}};function J1(){if(console&&console.warn){for(var e,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];typeof r[0]=="string"&&(r[0]="react-i18next:: ".concat(r[0])),(e=console).warn.apply(e,r)}}var Nd={};function $l(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];typeof t[0]=="string"&&Nd[t[0]]||(typeof t[0]=="string"&&(Nd[t[0]]=new Date),J1.apply(void 0,t))}function Dd(e,t,r){e.loadNamespaces(t,function(){if(e.isInitialized)r();else{var n=function o(){setTimeout(function(){e.off("initialized",o)},0),r()};e.on("initialized",n)}})}function X1(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=t.languages[0],o=t.options?t.options.fallbackLng:!1,i=t.languages[t.languages.length-1];if(n.toLowerCase()==="cimode")return!0;var a=function(l,u){var f=t.services.backendConnector.state["".concat(l,"|").concat(u)];return f===-1||f===2};return r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(n,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(n,e)&&(!o||a(i,e)))}function Z1(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return $l("i18n.languages were undefined or empty",t.languages),!0;var n=t.options.ignoreJSONStructure!==void 0;return n?t.hasLoadedNamespace(e,{precheck:function(i,a){if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!a(i.isLanguageChangingTo,e))return!1}}):X1(e,t,r)}function Q1(e){if(Array.isArray(e))return e}function ew(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(f){u=!0,o=f}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}function Ld(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function tw(e,t){if(e){if(typeof e=="string")return Ld(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ld(e,t)}}function rw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nw(e,t){return Q1(e)||ew(e,t)||tw(e,t)||rw()}function Md(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Cl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Md(Object(r),!0).forEach(function(n){Ad(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Md(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var ow=function(t,r){var n=c.useRef();return c.useEffect(function(){n.current=r?n.current:t},[t,r]),n.current};function it(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.i18n,n=c.useContext(V1)||{},o=n.i18n,i=n.defaultNS,a=r||o||q1();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new G1),!a){$l("You will need to pass in an i18next instance by using initReactI18next");var s=function(k){return Array.isArray(k)?k[k.length-1]:k},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}a.options.react&&a.options.react.wait!==void 0&&$l("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=Cl(Cl(Cl({},z1()),a.options.react),t),f=u.useSuspense,d=u.keyPrefix,p=e||i||a.options&&a.options.defaultNS;p=typeof p=="string"?[p]:p||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(p);var h=(a.isInitialized||a.initializedStoreOnce)&&p.every(function(A){return Z1(A,a,u)});function v(){return a.getFixedT(null,u.nsMode==="fallback"?p:p[0],d)}var g=c.useState(v),y=nw(g,2),m=y[0],w=y[1],E=p.join(),x=ow(E),P=c.useRef(!0);c.useEffect(function(){var A=u.bindI18n,k=u.bindI18nStore;P.current=!0,!h&&!f&&Dd(a,p,function(){P.current&&w(v)}),h&&x&&x!==E&&P.current&&w(v);function j(){P.current&&w(v)}return A&&a&&a.on(A,j),k&&a&&a.store.on(k,j),function(){P.current=!1,A&&a&&A.split(" ").forEach(function(D){return a.off(D,j)}),k&&a&&k.split(" ").forEach(function(D){return a.store.off(D,j)})}},[a,E]);var I=c.useRef(!0);c.useEffect(function(){P.current&&!I.current&&w(v),I.current=!1},[a,d]);var S=[m,a,h];if(S.t=m,S.i18n=a,S.ready=h,h||!h&&!f)return S;throw new Promise(function(A){Dd(a,p,function(){A()})})}var Fd={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(Ge,function(){return r.importState=function(o){var i=new r;return i.importState(o),i},r;function r(){return function(o){var i=0,a=0,s=0,l=1;o.length==0&&(o=[+new Date]);var u=n();i=u(" "),a=u(" "),s=u(" ");for(var f=0;f<o.length;f++)i-=u(o[f]),i<0&&(i+=1),a-=u(o[f]),a<0&&(a+=1),s-=u(o[f]),s<0&&(s+=1);u=null;var d=function(){var p=2091639*i+l*23283064365386963e-26;return i=a,a=s,s=p-(l=p|0)};return d.next=d,d.uint32=function(){return d()*4294967296},d.fract53=function(){return d()+(d()*2097152|0)*11102230246251565e-32},d.version="Alea 0.9",d.args=o,d.exportState=function(){return[i,a,s,l]},d.importState=function(p){i=+p[0]||0,a=+p[1]||0,s=+p[2]||0,l=+p[3]||0},d}(Array.prototype.slice.call(arguments))}function n(){var o=4022871197,i=function(a){a=a.toString();for(var s=0;s<a.length;s++){o+=a.charCodeAt(s);var l=.02519603282416938*o;o=l>>>0,l-=o,l*=o,o=l>>>0,l-=o,o+=l*4294967296}return(o>>>0)*23283064365386963e-26};return i.version="Mash 0.9",i}})})(Fd);var iw=Fd.exports;const aw=In(iw);var Ol=e=>{const t=c.useRef(null);return c.useEffect(()=>{e&&(typeof e=="function"?e(t.current):e.current=t.current)}),t},sw=aw,lw=new sw("@dxos/react-hooks"),cw=(e=4)=>lw().toString(16).slice(2,e+2),_t=(e,t,r)=>c.useMemo(()=>t??`${e}-${cw(r?.n??4)}`,[t]),uw=e=>{const[t,r]=c.useState(void 0),n=c.useRef(t);return n.current=t,c.useEffect(()=>{const o=e.current;if(!o)return;const i=()=>r(!0),a=()=>r(!1);return o.addEventListener("focus",i),o.addEventListener("blur",a),n.current===void 0&&r(document.activeElement===o),()=>{o.removeEventListener("focus",i),o.removeEventListener("blur",a)}},[e,r]),t},jd={sm:"(min-width: 640px)",md:"(min-width: 768px)",lg:"(min-width: 1024px)",xl:"(min-width: 1280px)","2xl":"(min-width: 1536px)"},Bd=(e,t={})=>{const{ssr:r=!0,fallback:n}=t,o=(Array.isArray(e)?e:[e]).map(l=>l in jd?jd[l]:l);let i=Array.isArray(n)?n:[n];i=i.filter(l=>l!=null);const[a,s]=c.useState(()=>o.map((l,u)=>({media:l,matches:r?!!i[u]:document.defaultView?.matchMedia(l).matches})));return c.useEffect(()=>{s(o.map(f=>({media:f,matches:document.defaultView?.matchMedia(f).matches})));const l=o.map(f=>document.defaultView?.matchMedia(f)),u=f=>{s(d=>d.slice().map(p=>p.media===f.media?{...p,matches:f.matches}:p))};return l.forEach(f=>{typeof f?.addListener=="function"?f?.addListener(u):f?.addEventListener("change",u)}),()=>{l.forEach(f=>{typeof f?.removeListener=="function"?f?.removeListener(u):f?.removeEventListener("change",u)})}},[document.defaultView]),a.map(l=>!!l.matches)};function rt(){return rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},rt.apply(this,arguments)}function fw(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Al(...e){return t=>e.forEach(r=>fw(r,t))}function Qt(...e){return c.useCallback(Al(...e),e)}const xt=c.forwardRef((e,t)=>{const{children:r,...n}=e,o=c.Children.toArray(r),i=o.find(pw);if(i){const a=i.props.children,s=o.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(Tl,rt({},n,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(Tl,rt({},n,{ref:t}),r)});xt.displayName="Slot";const Tl=c.forwardRef((e,t)=>{const{children:r,...n}=e;return c.isValidElement(r)?c.cloneElement(r,{...hw(n,r.props),ref:t?Al(t,r.ref):r.ref}):c.Children.count(r)>1?c.Children.only(null):null});Tl.displayName="SlotClone";const dw=({children:e})=>c.createElement(c.Fragment,null,e);function pw(e){return c.isValidElement(e)&&e.type===dw}function hw(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const Ve=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=c.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?xt:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,rt({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Rd(e,t){e&&on.flushSync(()=>e.dispatchEvent(t))}function dr(e){return dr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dr(e)}function xr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function vw(e,t){if(dr(e)!=="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(dr(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ud(e){var t=vw(e,"string");return dr(t)==="symbol"?t:String(t)}function Wd(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Ud(n.key),n)}}function Sr(e,t,r){return t&&Wd(e.prototype,t),r&&Wd(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function an(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Il(e,t){return Il=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,o){return n.__proto__=o,n},Il(e,t)}function pa(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Il(e,t)}function si(e,t){if(t&&(dr(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return an(e)}function $r(e){return $r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$r(e)}function sn(e,t,r){return t=Ud(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gw(e){if(Array.isArray(e))return e}function mw(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Vd(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function bw(e,t){if(e){if(typeof e=="string")return Vd(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Vd(e,t)}}function yw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ww(e){return gw(e)||mw(e)||bw(e)||yw()}function Hd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function zd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Hd(Object(r),!0).forEach(function(n){sn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var _w={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,r){console&&console[t]&&console[t].apply(console,r)}},Ew=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};xr(this,e),this.init(t,r)}return Sr(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=r||_w,this.options=n,this.debug=n.debug}},{key:"setDebug",value:function(r){this.debug=r}},{key:"log",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"log","",!0)}},{key:"warn",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"warn","",!0)}},{key:"error",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"error","")}},{key:"deprecate",value:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(r,n,o,i){return i&&!this.debug?null:(typeof r[0]=="string"&&(r[0]="".concat(o).concat(this.prefix," ").concat(r[0])),this.logger[n](r))}},{key:"create",value:function(r){return new e(this.logger,zd(zd({},{prefix:"".concat(this.prefix,":").concat(r,":")}),this.options))}},{key:"clone",value:function(r){return r=r||this.options,r.prefix=r.prefix||this.prefix,new e(this.logger,r)}}]),e}(),Cr=new Ew,ln=function(){function e(){xr(this,e),this.observers={}}return Sr(e,[{key:"on",value:function(r,n){var o=this;return r.split(" ").forEach(function(i){o.observers[i]=o.observers[i]||[],o.observers[i].push(n)}),this}},{key:"off",value:function(r,n){if(this.observers[r]){if(!n){delete this.observers[r];return}this.observers[r]=this.observers[r].filter(function(o){return o!==n})}}},{key:"emit",value:function(r){for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];if(this.observers[r]){var a=[].concat(this.observers[r]);a.forEach(function(l){l.apply(void 0,o)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(l){l.apply(l,[r].concat(o))})}}}]),e}();function li(){var e,t,r=new Promise(function(n,o){e=n,t=o});return r.resolve=e,r.reject=t,r}function Gd(e){return e==null?"":""+e}function xw(e,t,r){e.forEach(function(n){t[n]&&(r[n]=t[n])})}function Pl(e,t,r){function n(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function o(){return!e||typeof e=="string"}for(var i=typeof t!="string"?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=n(i.shift());!e[a]&&r&&(e[a]=new r),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={}}return o()?{}:{obj:e,k:n(i.shift())}}function Kd(e,t,r){var n=Pl(e,t,Object),o=n.obj,i=n.k;o[i]=r}function Sw(e,t,r,n){var o=Pl(e,t,Object),i=o.obj,a=o.k;i[a]=i[a]||[],n&&(i[a]=i[a].concat(r)),n||i[a].push(r)}function ha(e,t){var r=Pl(e,t),n=r.obj,o=r.k;if(n)return n[o]}function qd(e,t,r){var n=ha(e,r);return n!==void 0?n:ha(t,r)}function Yd(e,t,r){for(var n in t)n!=="__proto__"&&n!=="constructor"&&(n in e?typeof e[n]=="string"||e[n]instanceof String||typeof t[n]=="string"||t[n]instanceof String?r&&(e[n]=t[n]):Yd(e[n],t[n],r):e[n]=t[n]);return e}function lo(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var $w={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function Cw(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return $w[t]}):e}var va=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,Ow=[" ",",","?","!",";"];function Aw(e,t,r){t=t||"",r=r||"";var n=Ow.filter(function(s){return t.indexOf(s)<0&&r.indexOf(s)<0});if(n.length===0)return!0;var o=new RegExp("(".concat(n.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(r);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}function Jd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ga(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jd(Object(r),!0).forEach(function(n){sn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Tw(e){var t=Iw();return function(){var n=$r(e),o;if(t){var i=$r(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return si(this,o)}}function Iw(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Xd(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var n=t.split(r),o=e,i=0;i<n.length;++i){if(!o||typeof o[n[i]]=="string"&&i+1<n.length)return;if(o[n[i]]===void 0){for(var a=2,s=n.slice(i,i+a).join(r),l=o[s];l===void 0&&n.length>i+a;)a++,s=n.slice(i,i+a).join(r),l=o[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}var u=n.slice(i+a).join(r);return u?Xd(l,u,r):void 0}o=o[n[i]]}return o}}var Pw=function(e){pa(r,e);var t=Tw(r);function r(n){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return xr(this,r),o=t.call(this),va&&ln.call(an(o)),o.data=n||{},o.options=i,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.options.ignoreJSONStructure===void 0&&(o.options.ignoreJSONStructure=!0),o}return Sr(r,[{key:"addNamespaces",value:function(o){this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}},{key:"removeNamespaces",value:function(o){var i=this.options.ns.indexOf(o);i>-1&&this.options.ns.splice(i,1)}},{key:"getResource",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,f=[o,i];a&&typeof a!="string"&&(f=f.concat(a)),a&&typeof a=="string"&&(f=f.concat(l?a.split(l):a)),o.indexOf(".")>-1&&(f=o.split("."));var d=ha(this.data,f);return d||!u||typeof a!="string"?d:Xd(this.data&&this.data[o]&&this.data[o][i],a,l)}},{key:"addResource",value:function(o,i,a,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var f=[o,i];a&&(f=f.concat(u?a.split(u):a)),o.indexOf(".")>-1&&(f=o.split("."),s=i,i=f[1]),this.addNamespaces(i),Kd(this.data,f,s),l.silent||this.emit("added",o,i,a,s)}},{key:"addResources",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in a)(typeof a[l]=="string"||Object.prototype.toString.apply(a[l])==="[object Array]")&&this.addResource(o,i,l,a[l],{silent:!0});s.silent||this.emit("added",o,i,a)}},{key:"addResourceBundle",value:function(o,i,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},f=[o,i];o.indexOf(".")>-1&&(f=o.split("."),s=a,a=i,i=f[1]),this.addNamespaces(i);var d=ha(this.data,f)||{};s?Yd(d,a,l):d=ga(ga({},d),a),Kd(this.data,f,d),u.silent||this.emit("added",o,i,a)}},{key:"removeResourceBundle",value:function(o,i){this.hasResourceBundle(o,i)&&delete this.data[o][i],this.removeNamespaces(i),this.emit("removed",o,i)}},{key:"hasResourceBundle",value:function(o,i){return this.getResource(o,i)!==void 0}},{key:"getResourceBundle",value:function(o,i){return i||(i=this.options.defaultNS),this.options.compatibilityAPI==="v1"?ga(ga({},{}),this.getResource(o,i)):this.getResource(o,i)}},{key:"getDataByLanguage",value:function(o){return this.data[o]}},{key:"hasLanguageSomeTranslations",value:function(o){var i=this.getDataByLanguage(o),a=i&&Object.keys(i)||[];return!!a.find(function(s){return i[s]&&Object.keys(i[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),r}(ln),Zd={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,r,n,o,i){var a=this;return t.forEach(function(s){a.processors[s]&&(r=a.processors[s].process(r,n,o,i))}),r}};function Qd(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Wt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Qd(Object(r),!0).forEach(function(n){sn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qd(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function kw(e){var t=Nw();return function(){var n=$r(e),o;if(t){var i=$r(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return si(this,o)}}function Nw(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var ep={},tp=function(e){pa(r,e);var t=kw(r);function r(n){var o,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return xr(this,r),o=t.call(this),va&&ln.call(an(o)),xw(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],n,an(o)),o.options=i,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.logger=Cr.create("translator"),o}return Sr(r,[{key:"changeLanguage",value:function(o){o&&(this.language=o)}},{key:"exists",value:function(o){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(o==null)return!1;var a=this.resolve(o,i);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(o,i){var a=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,l=i.ns||this.options.defaultNS||[],u=a&&o.indexOf(a)>-1,f=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!Aw(o,a,s);if(u&&!f){var d=o.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:o,namespaces:l};var p=o.split(a);(a!==s||a===s&&this.options.ns.indexOf(p[0])>-1)&&(l=p.shift()),o=p.join(s)}return typeof l=="string"&&(l=[l]),{key:o,namespaces:l}}},{key:"translate",value:function(o,i,a){var s=this;if(dr(i)!=="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),i||(i={}),o==null)return"";Array.isArray(o)||(o=[String(o)]);var l=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,u=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,f=this.extractFromKey(o[o.length-1],i),d=f.key,p=f.namespaces,h=p[p.length-1],v=i.lng||this.language,g=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(v&&v.toLowerCase()==="cimode"){if(g){var y=i.nsSeparator||this.options.nsSeparator;return l?(m.res="".concat(h).concat(y).concat(d),m):"".concat(h).concat(y).concat(d)}return l?(m.res=d,m):d}var m=this.resolve(o,i),w=m&&m.res,E=m&&m.usedKey||d,x=m&&m.exactUsedKey||d,P=Object.prototype.toString.apply(w),I=["[object Number]","[object Function]","[object RegExp]"],S=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,A=!this.i18nFormat||this.i18nFormat.handleAsObject,k=typeof w!="string"&&typeof w!="boolean"&&typeof w!="number";if(A&&w&&k&&I.indexOf(P)<0&&!(typeof S=="string"&&P==="[object Array]")){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var j=this.options.returnedObjectHandler?this.options.returnedObjectHandler(E,w,Wt(Wt({},i),{},{ns:p})):"key '".concat(d," (").concat(this.language,")' returned an object instead of string.");return l?(m.res=j,m):j}if(u){var D=P==="[object Array]",N=D?[]:{},J=D?x:E;for(var K in w)if(Object.prototype.hasOwnProperty.call(w,K)){var Y="".concat(J).concat(u).concat(K);N[K]=this.translate(Y,Wt(Wt({},i),{joinArrays:!1,ns:p})),N[K]===Y&&(N[K]=w[K])}w=N}}else if(A&&typeof S=="string"&&P==="[object Array]")w=w.join(S),w&&(w=this.extendTranslation(w,o,i,a));else{var te=!1,oe=!1,le=i.count!==void 0&&typeof i.count!="string",ae=r.hasDefaultValue(i),ve=le?this.pluralResolver.getSuffix(v,i.count,i):"",ce=i["defaultValue".concat(ve)]||i.defaultValue;!this.isValidLookup(w)&&ae&&(te=!0,w=ce),this.isValidLookup(w)||(oe=!0,w=d);var q=i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,V=q&&oe?void 0:w,re=ae&&ce!==w&&this.options.updateMissing;if(oe||te||re){if(this.logger.log(re?"updateKey":"missingKey",v,h,d,re?ce:w),u){var de=this.resolve(d,Wt(Wt({},i),{},{keySeparator:!1}));de&&de.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var U=[],z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&z&&z[0])for(var M=0;M<z.length;M++)U.push(z[M]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(i.lng||this.language):U.push(i.lng||this.language);var R=function(O,T,Z){var ne=ae&&Z!==w?Z:V;s.options.missingKeyHandler?s.options.missingKeyHandler(O,h,T,ne,re,i):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(O,h,T,ne,re,i),s.emit("missingKey",O,h,T,w)};this.options.saveMissing&&(this.options.saveMissingPlurals&&le?U.forEach(function(G){s.pluralResolver.getSuffixes(G,i).forEach(function(O){R([G],d+O,i["defaultValue".concat(O)]||ce)})}):R(U,d,ce))}w=this.extendTranslation(w,o,i,m,a),oe&&w===d&&this.options.appendNamespaceToMissingKey&&(w="".concat(h,":").concat(d)),(oe||te)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?w=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(h,":").concat(d):d,te?w:void 0):w=this.options.parseMissingKeyHandler(w))}return l?(m.res=w,m):w}},{key:"extendTranslation",value:function(o,i,a,s,l){var u=this;if(this.i18nFormat&&this.i18nFormat.parse)o=this.i18nFormat.parse(o,Wt(Wt({},this.options.interpolation.defaultVariables),a),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init(Wt(Wt({},a),{interpolation:Wt(Wt({},this.options.interpolation),a.interpolation)}));var f=typeof o=="string"&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),d;if(f){var p=o.match(this.interpolator.nestingRegexp);d=p&&p.length}var h=a.replace&&typeof a.replace!="string"?a.replace:a;if(this.options.interpolation.defaultVariables&&(h=Wt(Wt({},this.options.interpolation.defaultVariables),h)),o=this.interpolator.interpolate(o,h,a.lng||this.language,a),f){var v=o.match(this.interpolator.nestingRegexp),g=v&&v.length;d<g&&(a.nest=!1)}a.nest!==!1&&(o=this.interpolator.nest(o,function(){for(var w=arguments.length,E=new Array(w),x=0;x<w;x++)E[x]=arguments[x];return l&&l[0]===E[0]&&!a.context?(u.logger.warn("It seems you are nesting recursively key: ".concat(E[0]," in key: ").concat(i[0])),null):u.translate.apply(u,E.concat([i]))},a)),a.interpolation&&this.interpolator.reset()}var y=a.postProcess||this.options.postProcess,m=typeof y=="string"?[y]:y;return o!=null&&m&&m.length&&a.applyPostProcessor!==!1&&(o=Zd.handle(m,o,i,this.options&&this.options.postProcessPassResolved?Wt({i18nResolved:s},a):a,this)),o}},{key:"resolve",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,u,f,d;return typeof o=="string"&&(o=[o]),o.forEach(function(p){if(!i.isValidLookup(s)){var h=i.extractFromKey(p,a),v=h.key;l=v;var g=h.namespaces;i.options.fallbackNS&&(g=g.concat(i.options.fallbackNS));var y=a.count!==void 0&&typeof a.count!="string",m=y&&!a.ordinal&&a.count===0&&i.pluralResolver.shouldUseIntlApi(),w=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",E=a.lngs?a.lngs:i.languageUtils.toResolveHierarchy(a.lng||i.language,a.fallbackLng);g.forEach(function(x){i.isValidLookup(s)||(d=x,!ep["".concat(E[0],"-").concat(x)]&&i.utils&&i.utils.hasLoadedNamespace&&!i.utils.hasLoadedNamespace(d)&&(ep["".concat(E[0],"-").concat(x)]=!0,i.logger.warn('key "'.concat(l,'" for languages "').concat(E.join(", "),`" won't get resolved as namespace "`).concat(d,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(function(P){if(!i.isValidLookup(s)){f=P;var I=[v];if(i.i18nFormat&&i.i18nFormat.addLookupKeys)i.i18nFormat.addLookupKeys(I,v,P,x,a);else{var S;y&&(S=i.pluralResolver.getSuffix(P,a.count,a));var A="".concat(i.options.pluralSeparator,"zero");if(y&&(I.push(v+S),m&&I.push(v+A)),w){var k="".concat(v).concat(i.options.contextSeparator).concat(a.context);I.push(k),y&&(I.push(k+S),m&&I.push(k+A))}}for(var j;j=I.pop();)i.isValidLookup(s)||(u=j,s=i.getResource(P,x,j,a))}}))})}}),{res:s,usedKey:l,exactUsedKey:u,usedLng:f,usedNS:d}}},{key:"isValidLookup",value:function(o){return o!==void 0&&!(!this.options.returnNull&&o===null)&&!(!this.options.returnEmptyString&&o==="")}},{key:"getResource",value:function(o,i,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(o,i,a,s):this.resourceStore.getResource(o,i,a,s)}}],[{key:"hasDefaultValue",value:function(o){var i="defaultValue";for(var a in o)if(Object.prototype.hasOwnProperty.call(o,a)&&i===a.substring(0,i.length)&&o[a]!==void 0)return!0;return!1}}]),r}(ln);function kl(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Dw=function(){function e(t){xr(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Cr.create("languageUtils")}return Sr(e,[{key:"getScriptPartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return null;var n=r.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}},{key:"getLanguagePartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return r;var n=r.split("-");return this.formatLanguageCode(n[0])}},{key:"formatLanguageCode",value:function(r){if(typeof r=="string"&&r.indexOf("-")>-1){var n=["hans","hant","latn","cyrl","cans","mong","arab"],o=r.split("-");return this.options.lowerCaseLng?o=o.map(function(i){return i.toLowerCase()}):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),n.indexOf(o[1].toLowerCase())>-1&&(o[1]=kl(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),n.indexOf(o[1].toLowerCase())>-1&&(o[1]=kl(o[1].toLowerCase())),n.indexOf(o[2].toLowerCase())>-1&&(o[2]=kl(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?r.toLowerCase():r}},{key:"isSupportedCode",value:function(r){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(r=this.getLanguagePartFromCode(r)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(r)>-1}},{key:"getBestMatchFromCodes",value:function(r){var n=this;if(!r)return null;var o;return r.forEach(function(i){if(!o){var a=n.formatLanguageCode(i);(!n.options.supportedLngs||n.isSupportedCode(a))&&(o=a)}}),!o&&this.options.supportedLngs&&r.forEach(function(i){if(!o){var a=n.getLanguagePartFromCode(i);if(n.isSupportedCode(a))return o=a;o=n.options.supportedLngs.find(function(s){if(s.indexOf(a)===0)return s})}}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}},{key:"getFallbackCodes",value:function(r,n){if(!r)return[];if(typeof r=="function"&&(r=r(n)),typeof r=="string"&&(r=[r]),Object.prototype.toString.apply(r)==="[object Array]")return r;if(!n)return r.default||[];var o=r[n];return o||(o=r[this.getScriptPartFromCode(n)]),o||(o=r[this.formatLanguageCode(n)]),o||(o=r[this.getLanguagePartFromCode(n)]),o||(o=r.default),o||[]}},{key:"toResolveHierarchy",value:function(r,n){var o=this,i=this.getFallbackCodes(n||this.options.fallbackLng||[],r),a=[],s=function(u){u&&(o.isSupportedCode(u)?a.push(u):o.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof r=="string"&&r.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(r)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(r)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(r))):typeof r=="string"&&s(this.formatLanguageCode(r)),i.forEach(function(l){a.indexOf(l)<0&&s(o.formatLanguageCode(l))}),a}}]),e}(),Lw=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Mw={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}},Fw=["v1","v2","v3"],rp={zero:0,one:1,two:2,few:3,many:4,other:5};function jw(){var e={};return Lw.forEach(function(t){t.lngs.forEach(function(r){e[r]={numbers:t.nr,plurals:Mw[t.fc]}})}),e}var Bw=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};xr(this,e),this.languageUtils=t,this.options=r,this.logger=Cr.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=jw()}return Sr(e,[{key:"addRule",value:function(r,n){this.rules[r]=n}},{key:"getRule",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(r,{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[r]||this.rules[this.languageUtils.getLanguagePartFromCode(r)]}},{key:"needsPlural",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(r,n);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(r,o).map(function(i){return"".concat(n).concat(i)})}},{key:"getSuffixes",value:function(r){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(r,o);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort(function(a,s){return rp[a]-rp[s]}).map(function(a){return"".concat(n.options.prepend).concat(a)}):i.numbers.map(function(a){return n.getSuffix(r,a,o)}):[]}},{key:"getSuffix",value:function(r,n){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=this.getRule(r,o);return i?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(i.select(n)):this.getSuffixRetroCompatible(i,n):(this.logger.warn("no plural rule found for: ".concat(r)),"")}},{key:"getSuffixRetroCompatible",value:function(r,n){var o=this,i=r.noAbs?r.plurals(n):r.plurals(Math.abs(n)),a=r.numbers[i];this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return o.options.prepend&&a.toString()?o.options.prepend+a.toString():a.toString()};return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?"_plural_".concat(a.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&r.numbers.length===2&&r.numbers[0]===1?s():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}},{key:"shouldUseIntlApi",value:function(){return!Fw.includes(this.options.compatibilityJSON)}}]),e}();function np(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function pr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?np(Object(r),!0).forEach(function(n){sn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):np(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Rw=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};xr(this,e),this.logger=Cr.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(r){return r},this.init(t)}return Sr(e,[{key:"init",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};r.interpolation||(r.interpolation={escapeValue:!0});var n=r.interpolation;this.escape=n.escape!==void 0?n.escape:Cw,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?lo(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?lo(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?lo(n.nestingPrefix):n.nestingPrefixEscaped||lo("$t("),this.nestingSuffix=n.nestingSuffix?lo(n.nestingSuffix):n.nestingSuffixEscaped||lo(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var r="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(r,"g");var n="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(n,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(r,n,o,i){var a=this,s,l,u,f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(y){return y.replace(/\$/g,"$$$$")}var p=function(m){if(m.indexOf(a.formatSeparator)<0){var w=qd(n,f,m);return a.alwaysFormat?a.format(w,void 0,o,pr(pr(pr({},i),n),{},{interpolationkey:m})):w}var E=m.split(a.formatSeparator),x=E.shift().trim(),P=E.join(a.formatSeparator).trim();return a.format(qd(n,f,x),P,o,pr(pr(pr({},i),n),{},{interpolationkey:x}))};this.resetRegExp();var h=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,v=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,g=[{regex:this.regexpUnescape,safeValue:function(m){return d(m)}},{regex:this.regexp,safeValue:function(m){return a.escapeValue?d(a.escape(m)):d(m)}}];return g.forEach(function(y){for(u=0;s=y.regex.exec(r);){var m=s[1].trim();if(l=p(m),l===void 0)if(typeof h=="function"){var w=h(r,s,i);l=typeof w=="string"?w:""}else if(i&&i.hasOwnProperty(m))l="";else if(v){l=s[0];continue}else a.logger.warn("missed to pass in variable ".concat(m," for interpolating ").concat(r)),l="";else typeof l!="string"&&!a.useRawValueToEscape&&(l=Gd(l));var E=y.safeValue(l);if(r=r.replace(s[0],E),v?(y.regex.lastIndex+=l.length,y.regex.lastIndex-=s[0].length):y.regex.lastIndex=0,u++,u>=a.maxReplaces)break}}),r}},{key:"nest",value:function(r,n){var o=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,l=pr({},i);l.applyPostProcessor=!1,delete l.defaultValue;function u(h,v){var g=this.nestingOptionsSeparator;if(h.indexOf(g)<0)return h;var y=h.split(new RegExp("".concat(g,"[ ]*{"))),m="{".concat(y[1]);h=y[0],m=this.interpolate(m,l);var w=m.match(/'/g),E=m.match(/"/g);(w&&w.length%2===0&&!E||E.length%2!==0)&&(m=m.replace(/'/g,'"'));try{l=JSON.parse(m),v&&(l=pr(pr({},v),l))}catch(x){return this.logger.warn("failed parsing options string in nesting for key ".concat(h),x),"".concat(h).concat(g).concat(m)}return delete l.defaultValue,h}for(;a=this.nestingRegexp.exec(r);){var f=[],d=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var p=a[1].split(this.formatSeparator).map(function(h){return h.trim()});a[1]=p.shift(),f=p,d=!0}if(s=n(u.call(this,a[1].trim(),l),l),s&&a[0]===r&&typeof s!="string")return s;typeof s!="string"&&(s=Gd(s)),s||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(r)),s=""),d&&(s=f.reduce(function(h,v){return o.format(h,v,i.lng,pr(pr({},i),{},{interpolationkey:a[1].trim()}))},s.trim())),r=r.replace(a[0],s),this.regexp.lastIndex=0}return r}}]),e}();function op(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function cn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?op(Object(r),!0).forEach(function(n){sn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):op(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Uw(e){var t=e.toLowerCase().trim(),r={};if(e.indexOf("(")>-1){var n=e.split("(");t=n[0].toLowerCase().trim();var o=n[1].substring(0,n[1].length-1);if(t==="currency"&&o.indexOf(":")<0)r.currency||(r.currency=o.trim());else if(t==="relativetime"&&o.indexOf(":")<0)r.range||(r.range=o.trim());else{var i=o.split(";");i.forEach(function(a){if(a){var s=a.split(":"),l=ww(s),u=l[0],f=l.slice(1),d=f.join(":").trim().replace(/^'+|'+$/g,"");r[u.trim()]||(r[u.trim()]=d),d==="false"&&(r[u.trim()]=!1),d==="true"&&(r[u.trim()]=!0),isNaN(d)||(r[u.trim()]=parseInt(d,10))}})}}return{formatName:t,formatOptions:r}}function co(e){var t={};return function(n,o,i){var a=o+JSON.stringify(i),s=t[a];return s||(s=e(o,i),t[a]=s),s(n)}}var Ww=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};xr(this,e),this.logger=Cr.create("formatter"),this.options=t,this.formats={number:co(function(r,n){var o=new Intl.NumberFormat(r,n);return function(i){return o.format(i)}}),currency:co(function(r,n){var o=new Intl.NumberFormat(r,cn(cn({},n),{},{style:"currency"}));return function(i){return o.format(i)}}),datetime:co(function(r,n){var o=new Intl.DateTimeFormat(r,cn({},n));return function(i){return o.format(i)}}),relativetime:co(function(r,n){var o=new Intl.RelativeTimeFormat(r,cn({},n));return function(i){return o.format(i,n.range||"day")}}),list:co(function(r,n){var o=new Intl.ListFormat(r,cn({},n));return function(i){return o.format(i)}})},this.init(t)}return Sr(e,[{key:"init",value:function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},o=n.interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}},{key:"add",value:function(r,n){this.formats[r.toLowerCase().trim()]=n}},{key:"addCached",value:function(r,n){this.formats[r.toLowerCase().trim()]=co(n)}},{key:"format",value:function(r,n,o,i){var a=this,s=n.split(this.formatSeparator),l=s.reduce(function(u,f){var d=Uw(f),p=d.formatName,h=d.formatOptions;if(a.formats[p]){var v=u;try{var g=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},y=g.locale||g.lng||i.locale||i.lng||o;v=a.formats[p](u,y,cn(cn(cn({},h),i),g))}catch(m){a.logger.warn(m)}return v}else a.logger.warn("there was no format function for ".concat(p));return u},r);return l}}]),e}();function ip(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function ap(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ip(Object(r),!0).forEach(function(n){sn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ip(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Vw(e){var t=Hw();return function(){var n=$r(e),o;if(t){var i=$r(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return si(this,o)}}function Hw(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function zw(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var Gw=function(e){pa(r,e);var t=Vw(r);function r(n,o,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return xr(this,r),a=t.call(this),va&&ln.call(an(a)),a.backend=n,a.store=o,a.services=i,a.languageUtils=i.languageUtils,a.options=s,a.logger=Cr.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=s.maxParallelReads||10,a.readingCalls=0,a.maxRetries=s.maxRetries>=0?s.maxRetries:5,a.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(i,s.backend,s),a}return Sr(r,[{key:"queueLoad",value:function(o,i,a,s){var l=this,u={},f={},d={},p={};return o.forEach(function(h){var v=!0;i.forEach(function(g){var y="".concat(h,"|").concat(g);!a.reload&&l.store.hasResourceBundle(h,g)?l.state[y]=2:l.state[y]<0||(l.state[y]===1?f[y]===void 0&&(f[y]=!0):(l.state[y]=1,v=!1,f[y]===void 0&&(f[y]=!0),u[y]===void 0&&(u[y]=!0),p[g]===void 0&&(p[g]=!0)))}),v||(d[h]=!0)}),(Object.keys(u).length||Object.keys(f).length)&&this.queue.push({pending:f,pendingCount:Object.keys(f).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(f),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(p)}}},{key:"loaded",value:function(o,i,a){var s=o.split("|"),l=s[0],u=s[1];i&&this.emit("failedLoading",l,u,i),a&&this.store.addResourceBundle(l,u,a),this.state[o]=i?-1:2;var f={};this.queue.forEach(function(d){Sw(d.loaded,[l],u),zw(d,o),i&&d.errors.push(i),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(function(p){f[p]||(f[p]={});var h=d.loaded[p];h.length&&h.forEach(function(v){f[p][v]===void 0&&(f[p][v]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",f),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(o,i,a){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,f=arguments.length>5?arguments[5]:void 0;if(!o.length)return f(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:o,ns:i,fcName:a,tried:l,wait:u,callback:f});return}return this.readingCalls++,this.backend[a](o,i,function(d,p){if(s.readingCalls--,s.waitingReads.length>0){var h=s.waitingReads.shift();s.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(d&&p&&l<s.maxRetries){setTimeout(function(){s.read.call(s,o,i,a,l+1,u*2,f)},u);return}f(d,p)})}},{key:"prepareLoading",value:function(o,i){var a=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof o=="string"&&(o=this.languageUtils.toResolveHierarchy(o)),typeof i=="string"&&(i=[i]);var u=this.queueLoad(o,i,s,l);if(!u.toLoad.length)return u.pending.length||l(),null;u.toLoad.forEach(function(f){a.loadOne(f)})}},{key:"load",value:function(o,i,a){this.prepareLoading(o,i,{},a)}},{key:"reload",value:function(o,i,a){this.prepareLoading(o,i,{reload:!0},a)}},{key:"loadOne",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=o.split("|"),l=s[0],u=s[1];this.read(l,u,"read",void 0,void 0,function(f,d){f&&i.logger.warn("".concat(a,"loading namespace ").concat(u," for language ").concat(l," failed"),f),!f&&d&&i.logger.log("".concat(a,"loaded namespace ").concat(u," for language ").concat(l),d),i.loaded(o,f,d)})}},{key:"saveMissing",value:function(o,i,a,s,l){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(i)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}a==null||a===""||(this.backend&&this.backend.create&&this.backend.create(o,i,a,s,null,ap(ap({},u),{},{isUpdate:l})),!(!o||!o[0])&&this.store.addResource(o[0],i,a,s))}}]),r}(ln);function Kw(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var r={};if(dr(t[1])==="object"&&(r=t[1]),typeof t[1]=="string"&&(r.defaultValue=t[1]),typeof t[2]=="string"&&(r.tDescription=t[2]),dr(t[2])==="object"||dr(t[3])==="object"){var n=t[3]||t[2];Object.keys(n).forEach(function(o){r[o]=n[o]})}return r},interpolation:{escapeValue:!0,format:function(t,r,n,o){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function sp(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function lp(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Or(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lp(Object(r),!0).forEach(function(n){sn(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lp(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qw(e){var t=Yw();return function(){var n=$r(e),o;if(t){var i=$r(this).constructor;o=Reflect.construct(n,arguments,i)}else o=n.apply(this,arguments);return si(this,o)}}function Yw(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ma(){}function Jw(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(r){typeof e[r]=="function"&&(e[r]=e[r].bind(e))})}var ba=function(e){pa(r,e);var t=qw(r);function r(){var n,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(xr(this,r),n=t.call(this),va&&ln.call(an(n)),n.options=sp(o),n.services={},n.logger=Cr,n.modules={external:[]},Jw(an(n)),i&&!n.isInitialized&&!o.isClone){if(!n.options.initImmediate)return n.init(o,i),si(n,an(n));setTimeout(function(){n.init(o,i)},0)}return n}return Sr(r,[{key:"init",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof i=="function"&&(a=i,i={}),!i.defaultNS&&i.defaultNS!==!1&&i.ns&&(typeof i.ns=="string"?i.defaultNS=i.ns:i.ns.indexOf("translation")<0&&(i.defaultNS=i.ns[0]));var s=Kw();this.options=Or(Or(Or({},s),this.options),sp(i)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Or(Or({},s.interpolation),this.options.interpolation)),i.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=i.keySeparator),i.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=i.nsSeparator);function l(m){return m?typeof m=="function"?new m:m:null}if(!this.options.isClone){this.modules.logger?Cr.init(l(this.modules.logger),this.options):Cr.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=Ww);var f=new Dw(this.options);this.store=new Pw(this.options.resources,this.options);var d=this.services;d.logger=Cr,d.resourceStore=this.store,d.languageUtils=f,d.pluralResolver=new Bw(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(d.formatter=l(u),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new Rw(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new Gw(l(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(m){for(var w=arguments.length,E=new Array(w>1?w-1:0),x=1;x<w;x++)E[x-1]=arguments[x];o.emit.apply(o,[m].concat(E))}),this.modules.languageDetector&&(d.languageDetector=l(this.modules.languageDetector),d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=l(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new tp(this.services,this.options),this.translator.on("*",function(m){for(var w=arguments.length,E=new Array(w>1?w-1:0),x=1;x<w;x++)E[x-1]=arguments[x];o.emit.apply(o,[m].concat(E))}),this.modules.external.forEach(function(m){m.init&&m.init(o)})}if(this.format=this.options.interpolation.format,a||(a=ma),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var h=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];h.forEach(function(m){o[m]=function(){var w;return(w=o.store)[m].apply(w,arguments)}});var v=["addResource","addResources","addResourceBundle","removeResourceBundle"];v.forEach(function(m){o[m]=function(){var w;return(w=o.store)[m].apply(w,arguments),o}});var g=li(),y=function(){var w=function(x,P){o.isInitialized&&!o.initializedStoreOnce&&o.logger.warn("init: i18next is already initialized. You should call init just once!"),o.isInitialized=!0,o.options.isClone||o.logger.log("initialized",o.options),o.emit("initialized",o.options),g.resolve(P),a(x,P)};if(o.languages&&o.options.compatibilityAPI!=="v1"&&!o.isInitialized)return w(null,o.t.bind(o));o.changeLanguage(o.options.lng,w)};return this.options.resources||!this.options.initImmediate?y():setTimeout(y,0),g}},{key:"loadResources",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ma,s=a,l=typeof o=="string"?o:this.language;if(typeof o=="function"&&(s=o),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var u=[],f=function(h){if(h){var v=i.services.languageUtils.toResolveHierarchy(h);v.forEach(function(g){u.indexOf(g)<0&&u.push(g)})}};if(l)f(l);else{var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.forEach(function(p){return f(p)})}this.options.preload&&this.options.preload.forEach(function(p){return f(p)}),this.services.backendConnector.load(u,this.options.ns,function(p){!p&&!i.resolvedLanguage&&i.language&&i.setResolvedLanguage(i.language),s(p)})}else s(null)}},{key:"reloadResources",value:function(o,i,a){var s=li();return o||(o=this.languages),i||(i=this.options.ns),a||(a=ma),this.services.backendConnector.reload(o,i,function(l){s.resolve(),a(l)}),s}},{key:"use",value:function(o){if(!o)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!o.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return o.type==="backend"&&(this.modules.backend=o),(o.type==="logger"||o.log&&o.warn&&o.error)&&(this.modules.logger=o),o.type==="languageDetector"&&(this.modules.languageDetector=o),o.type==="i18nFormat"&&(this.modules.i18nFormat=o),o.type==="postProcessor"&&Zd.addPostProcessor(o),o.type==="formatter"&&(this.modules.formatter=o),o.type==="3rdParty"&&this.modules.external.push(o),this}},{key:"setResolvedLanguage",value:function(o){if(!(!o||!this.languages)&&!(["cimode","dev"].indexOf(o)>-1))for(var i=0;i<this.languages.length;i++){var a=this.languages[i];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(o,i){var a=this;this.isLanguageChangingTo=o;var s=li();this.emit("languageChanging",o);var l=function(p){a.language=p,a.languages=a.services.languageUtils.toResolveHierarchy(p),a.resolvedLanguage=void 0,a.setResolvedLanguage(p)},u=function(p,h){h?(l(h),a.translator.changeLanguage(h),a.isLanguageChangingTo=void 0,a.emit("languageChanged",h),a.logger.log("languageChanged",h)):a.isLanguageChangingTo=void 0,s.resolve(function(){return a.t.apply(a,arguments)}),i&&i(p,function(){return a.t.apply(a,arguments)})},f=function(p){!o&&!p&&a.services.languageDetector&&(p=[]);var h=typeof p=="string"?p:a.services.languageUtils.getBestMatchFromCodes(p);h&&(a.language||l(h),a.translator.language||a.translator.changeLanguage(h),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage(h)),a.loadResources(h,function(v){u(v,h)})};return!o&&this.services.languageDetector&&!this.services.languageDetector.async?f(this.services.languageDetector.detect()):!o&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(f):f(o),s}},{key:"getFixedT",value:function(o,i,a){var s=this,l=function u(f,d){var p;if(dr(d)!=="object"){for(var h=arguments.length,v=new Array(h>2?h-2:0),g=2;g<h;g++)v[g-2]=arguments[g];p=s.options.overloadTranslationOptionHandler([f,d].concat(v))}else p=Or({},d);p.lng=p.lng||u.lng,p.lngs=p.lngs||u.lngs,p.ns=p.ns||u.ns,p.keyPrefix=p.keyPrefix||a||u.keyPrefix;var y=s.options.keySeparator||".",m=p.keyPrefix?"".concat(p.keyPrefix).concat(y).concat(f):f;return s.t(m,p)};return typeof o=="string"?l.lng=o:l.lngs=o,l.ns=i,l.keyPrefix=a,l}},{key:"t",value:function(){var o;return this.translator&&(o=this.translator).translate.apply(o,arguments)}},{key:"exists",value:function(){var o;return this.translator&&(o=this.translator).exists.apply(o,arguments)}},{key:"setDefaultNamespace",value:function(o){this.options.defaultNS=o}},{key:"hasLoadedNamespace",value:function(o){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var f=function(h,v){var g=i.services.backendConnector.state["".concat(h,"|").concat(v)];return g===-1||g===2};if(a.precheck){var d=a.precheck(this,f);if(d!==void 0)return d}return!!(this.hasResourceBundle(s,o)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||f(s,o)&&(!l||f(u,o)))}},{key:"loadNamespaces",value:function(o,i){var a=this,s=li();return this.options.ns?(typeof o=="string"&&(o=[o]),o.forEach(function(l){a.options.ns.indexOf(l)<0&&a.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),i&&i(l)}),s):(i&&i(),Promise.resolve())}},{key:"loadLanguages",value:function(o,i){var a=li();typeof o=="string"&&(o=[o]);var s=this.options.preload||[],l=o.filter(function(u){return s.indexOf(u)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(u){a.resolve(),i&&i(u)}),a):(i&&i(),Promise.resolve())}},{key:"dir",value:function(o){if(o||(o=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!o)return"rtl";var i=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"];return i.indexOf(this.services.languageUtils.getLanguagePartFromCode(o))>-1||o.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var o=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ma,s=Or(Or(Or({},this.options),i),{isClone:!0}),l=new r(s);(i.debug!==void 0||i.prefix!==void 0)&&(l.logger=l.logger.clone(i));var u=["store","services","language"];return u.forEach(function(f){l[f]=o[f]}),l.services=Or({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new tp(l.services,l.options),l.translator.on("*",function(f){for(var d=arguments.length,p=new Array(d>1?d-1:0),h=1;h<d;h++)p[h-1]=arguments[h];l.emit.apply(l,[f].concat(p))}),l.init(s,a),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),r}(ln);sn(ba,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new ba(e,t)});var Ft=ba.createInstance();Ft.createInstance=ba.createInstance,Ft.createInstance,Ft.init,Ft.loadResources,Ft.reloadResources,Ft.use,Ft.changeLanguage,Ft.getFixedT,Ft.t,Ft.exists,Ft.setDefaultNamespace,Ft.hasLoadedNamespace,Ft.loadNamespaces,Ft.loadLanguages;function be(){return be=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},be.apply(this,arguments)}function Xw(e,t){const r=c.createContext(t);function n(i){const{children:a,...s}=i,l=c.useMemo(()=>s,Object.values(s));return c.createElement(r.Provider,{value:l},a)}function o(i){const a=c.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,o]}function un(e,t=[]){let r=[];function n(i,a){const s=c.createContext(a),l=r.length;r=[...r,a];function u(d){const{scope:p,children:h,...v}=d,g=p?.[e][l]||s,y=c.useMemo(()=>v,Object.values(v));return c.createElement(g.Provider,{value:y},h)}function f(d,p){const h=p?.[e][l]||s,v=c.useContext(h);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=r.map(a=>c.createContext(a));return function(s){const l=s?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,Zw(o,...t)]}function Zw(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function Vt(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}const Ar=globalThis?.document?c.useLayoutEffect:()=>{};function Qw(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function cp(...e){return t=>e.forEach(r=>Qw(r,t))}function Ct(...e){return c.useCallback(cp(...e),e)}const Nl=c.forwardRef((e,t)=>{const{children:r,...n}=e,o=c.Children.toArray(r),i=o.find(e_);if(i){const a=i.props.children,s=o.map(l=>l===i?c.Children.count(a)>1?c.Children.only(null):c.isValidElement(a)?a.props.children:null:l);return c.createElement(Dl,be({},n,{ref:t}),c.isValidElement(a)?c.cloneElement(a,void 0,s):null)}return c.createElement(Dl,be({},n,{ref:t}),r)});Nl.displayName="Slot";const Dl=c.forwardRef((e,t)=>{const{children:r,...n}=e;return c.isValidElement(r)?c.cloneElement(r,{...t_(n,r.props),ref:cp(t,r.ref)}):c.Children.count(r)>1?c.Children.only(null):null});Dl.displayName="SlotClone";const Ll=({children:e})=>c.createElement(c.Fragment,null,e);function e_(e){return c.isValidElement(e)&&e.type===Ll}function t_(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const ut=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=c.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?Nl:t;return c.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),c.createElement(s,be({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function r_(e,t){e&&on.flushSync(()=>e.dispatchEvent(t))}const up="Avatar",[n_,T9]=un(up),[o_,i_]=n_(up),a_=c.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[o,i]=c.useState("idle");return c.createElement(o_,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:i},c.createElement(ut.span,be({},n,{ref:t})))}),s_="AvatarFallback",l_=c.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...o}=e,i=i_(s_,r),[a,s]=c.useState(n===void 0);return c.useEffect(()=>{if(n!==void 0){const l=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(l)}},[n]),a&&i.imageLoadingStatus!=="loaded"?c.createElement(ut.span,be({},o,{ref:t})):null}),c_=a_,fp=l_;function uo(e,t){const r=c.createContext(t);function n(i){const{children:a,...s}=i,l=c.useMemo(()=>s,Object.values(s));return c.createElement(r.Provider,{value:l},a)}function o(i){const a=c.useContext(r);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return n.displayName=e+"Provider",[n,o]}function Tr(e,t=[]){let r=[];function n(i,a){const s=c.createContext(a),l=r.length;r=[...r,a];function u(d){const{scope:p,children:h,...v}=d,g=p?.[e][l]||s,y=c.useMemo(()=>v,Object.values(v));return c.createElement(g.Provider,{value:y},h)}function f(d,p){const h=p?.[e][l]||s,v=c.useContext(h);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return u.displayName=i+"Provider",[u,f]}const o=()=>{const i=r.map(a=>c.createContext(a));return function(s){const l=s?.[e]||i;return c.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[n,u_(o,...t)]}function u_(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:l,scopeName:u})=>{const d=l(i)[`__scope${u}`];return{...s,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function ci(e,t,r){return parseInt(e.substr(t,r),16)}function dp(e){return e|=0,e<0?"00":e<16?"0"+e.toString(16):e<256?e.toString(16):"ff"}function Ml(e,t,r){return r=r<0?r+6:r>6?r-6:r,dp(255*(r<1?e+(t-e)*r:r<3?t:r<4?e+(t-e)*(4-r):e))}function f_(e){if(/^#[0-9a-f]{3,8}$/i.test(e)){let t;const r=e.length;if(r<6){const n=e[1],o=e[2],i=e[3],a=e[4]||"";t="#"+n+n+o+o+i+i+a+a}return(r==7||r>8)&&(t=e),t}}function d_(e,t,r){let n;if(t==0){const o=dp(r*255);n=o+o+o}else{const o=r<=.5?r*(t+1):r+t-r*t,i=r*2-o;n=Ml(i,o,e*6+2)+Ml(i,o,e*6)+Ml(i,o,e*6-2)}return"#"+n}function ui(e,t,r){const n=[.55,.5,.5,.46,.6,.55,.55],o=n[e*6+.5|0];return r=r<.5?r*o*2:o+(r-.5)*(1-o)*2,d_(e,t,r)}const p_=typeof window<"u"?window:typeof self<"u"?self:typeof global<"u"?global:{},pp={V:"jdenticon_config",n:"config"};var h_={};function v_(e,t){const r=typeof e=="object"&&e||h_[pp.n]||p_[pp.V]||{},n=r.lightness||{},o=r.saturation||{},i="color"in o?o.color:o,a=o.grayscale,s=r.backColor,l=r.padding;function u(d,p){let h=n[d];return h&&h.length>1||(h=p),function(v){return v=h[0]+v*(h[1]-h[0]),v<0?0:v>1?1:v}}function f(d){const p=r.hues;let h;return p&&p.length>0&&(h=p[0|.999*d*p.length]),typeof h=="number"?(h/360%1+1)%1:d}return{W:f,o:typeof i=="number"?i:.5,D:typeof a=="number"?a:0,p:u("color",[.4,.8]),F:u("grayscale",[.3,.9]),G:f_(s),X:typeof e=="number"?e:typeof l=="number"?l:t}}class ya{constructor(t,r){this.x=t,this.y=r}}let hp=class{constructor(t,r,n,o){this.q=t,this.t=r,this.H=n,this.Y=o}I(t,r,n,o){const i=this.q+this.H,a=this.t+this.H,s=this.Y;return s===1?new ya(i-r-(o||0),this.t+t):s===2?new ya(i-t-(n||0),a-r-(o||0)):s===3?new ya(this.q+r,a-t-(n||0)):new ya(this.q+t,this.t+r)}};const g_=new hp(0,0,0,0);class m_{constructor(t){this.J=t,this.u=g_}g(t,r){const n=r?-2:2,o=[];for(let i=r?t.length-2:0;i<t.length&&i>=0;i+=n)o.push(this.u.I(t[i],t[i+1]));this.J.g(o)}h(t,r,n,o){const i=this.u.I(t,r,n,n);this.J.h(i,n,o)}i(t,r,n,o,i){this.g([t,r,t+n,r,t+n,r+o,t,r+o],i)}j(t,r,n,o,i,a){const s=[t+n,r,t+n,r+o,t,r+o,t,r];s.splice((i||0)%4*2,2),this.g(s,a)}K(t,r,n,o,i){this.g([t+n/2,r,t+n,r+o/2,t+n/2,r+o,t,r+o/2],i)}}function b_(e,t,r,n){e=e%14;let o,i,a,s,l,u;e?e==1?(a=0|r*.5,s=0|r*.8,t.j(r-a,0,a,s,2)):e==2?(a=0|r/3,t.i(a,a,r-a,r-a)):e==3?(l=r*.1,u=r<6?1:r<8?2:0|r*.25,l=l>1?0|l:l>.5?1:l,t.i(u,u,r-l-u,r-l-u)):e==4?(i=0|r*.15,a=0|r*.5,t.h(r-a-i,r-a-i,a)):e==5?(l=r*.1,u=l*4,u>3&&(u=0|u),t.i(0,0,r,r),t.g([u,u,r-l,u,u+(r-u-l)/2,r-l],!0)):e==6?t.g([0,0,r,0,r,r*.7,r*.4,r*.4,r*.7,r,0,r]):e==7?t.j(r/2,r/2,r/2,r/2,3):e==8?(t.i(0,0,r,r/2),t.i(0,r/2,r/2,r/2),t.j(r/2,r/2,r/2,r/2,1)):e==9?(l=r*.14,u=r<4?1:r<6?2:0|r*.35,l=r<8?l:0|l,t.i(0,0,r,r),t.i(u,u,r-u-l,r-u-l,!0)):e==10?(l=r*.12,u=l*3,t.i(0,0,r,r),t.h(u,u,r-l-u,!0)):e==11?t.j(r/2,r/2,r/2,r/2,3):e==12?(i=r*.25,t.i(0,0,r,r),t.K(i,i,r-i,r-i,!0)):!n&&(i=r*.4,a=r*1.2,t.h(i,i,a)):(o=r*.42,t.g([0,0,r,0,r,r-o*2,r-o,r,0,r]))}function vp(e,t,r){e=e%4;let n;e?e==1?t.j(0,r/2,r,r/2,0):e==2?t.K(0,0,r,r):(n=r/6,t.h(n,n,r-2*n)):t.j(0,0,r,r,0)}function y_(e,t){return e=t.W(e),[ui(e,t.D,t.F(0)),ui(e,t.o,t.p(.5)),ui(e,t.D,t.F(1)),ui(e,t.o,t.p(1)),ui(e,t.o,t.p(0))]}function w_(e,t,r){const n=v_(r,.08);n.G&&e.m(n.G);let o=e.k;const i=.5+o*n.X|0;o-=i*2;const a=new m_(e),s=0|o/4,l=0|i+o/2-s*2,u=0|i+o/2-s*2;function f(y,m,w,E,x){const P=ci(t,w,1);let I=E?ci(t,E,1):0;e.L(p[h[y]]);for(let S=0;S<x.length;S++)a.u=new hp(l+x[S][0]*s,u+x[S][1]*s,s,I++%4),m(P,a,s,S);e.M()}const d=ci(t,-7)/268435455,p=y_(d,n),h=[];let v;function g(y){if(y.indexOf(v)>=0){for(let m=0;m<y.length;m++)if(h.indexOf(y[m])>=0)return!0}}for(let y=0;y<3;y++)v=ci(t,8+y,1)%p.length,(g([0,4])||g([2,3]))&&(v=1),h.push(v);f(0,vp,2,3,[[1,0],[2,0],[2,3],[1,3],[0,1],[3,1],[3,2],[0,2]]),f(1,vp,4,5,[[0,0],[3,0],[3,3],[0,3]]),f(2,b_,1,null,[[1,1],[2,1],[2,2],[1,2]]),e.finish()}function __(e){var n=0,o=0,i=encodeURI(e)+"%80",a=[],s,l=[],u=1732584193,f=4023233417,d=~u,p=~f,h=3285377520,v=[u,f,d,p,h],g=0,y="";function m(w,E){return w<<E|w>>>32-E}for(;n<i.length;o++)a[o>>2]=a[o>>2]|(i[n]=="%"?parseInt(i.substring(n+1,n+=3),16):i.charCodeAt(n++))<<(3-(o&3))*8;for(s=((o+7>>6)+1)*16,a[s-1]=o*8-8;g<s;g+=16){for(n=0;n<80;n++)o=m(u,5)+h+(n<20?(f&d^~f&p)+1518500249:n<40?(f^d^p)+1859775393:n<60?(f&d^f&p^d&p)+2400959708:(f^d^p)+3395469782)+(l[n]=n<16?a[g+n]|0:m(l[n-3]^l[n-8]^l[n-14]^l[n-16],1)),h=p,p=d,d=m(f,30),f=u,u=o;v[0]=u=v[0]+u|0,v[1]=f=v[1]+f|0,v[2]=d=v[2]+d|0,v[3]=p=v[3]+p|0,v[4]=h=v[4]+h|0}for(n=0;n<40;n++)y+=(v[n>>3]>>>(7-(n&7))*4&15).toString(16);return y}function E_(e){return/^[0-9a-f]{11,}$/i.test(e)&&e}function x_(e){return __(e==null?"":""+e)}function fo(e){return(e*10+.5|0)/10}class S_{constructor(){this.v=""}g(t){let r="";for(let n=0;n<t.length;n++)r+=(n?"L":"M")+fo(t[n].x)+" "+fo(t[n].y);this.v+=r+"Z"}h(t,r,n){const o=n?0:1,i=fo(r/2),a=fo(r),s="a"+i+","+i+" 0 1,"+o+" ";this.v+="M"+fo(t.x)+" "+fo(t.y+r/2)+s+a+",0"+s+-a+",0"}}class $_{constructor(t){this.A,this.B={},this.N=t,this.k=t.k}m(t){const r=/^(#......)(..)?/.exec(t),n=r[2]?ci(r[2],0)/255:1;this.N.m(r[1],n)}L(t){this.A=this.B[t]||(this.B[t]=new S_)}M(){}g(t){this.A.g(t)}h(t,r,n){this.A.h(t,r,n)}finish(){const t=this.B;for(let r in t)t.hasOwnProperty(r)&&this.N.O(r,t[r].v)}}const C_={P:"http://www.w3.org/2000/svg",R:"width",S:"height"};class O_{constructor(t){this.k=t,this.C='<svg xmlns="'+C_.P+'" width="'+t+'" height="'+t+'" viewBox="0 0 '+t+" "+t+'">'}m(t,r){r&&(this.C+='<rect width="100%" height="100%" fill="'+t+'" opacity="'+r.toFixed(2)+'"/>')}O(t,r){this.C+='<path fill="'+t+'" d="'+r+'"/>'}toString(){return this.C+"</svg>"}}function A_(e,t,r){const n=new O_(t);return w_(new $_(n),E_(e)||x_(e),r),n.toString()}typeof document<"u"&&document.querySelectorAll.bind(document);function dt(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}function wa({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=T_({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=Vt(r),l=c.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else o(u)},[i,e,o,s]);return[a,l]}function T_({defaultProp:e,onChange:t}){const r=c.useState(e),[n]=r,o=c.useRef(n),i=Vt(t);return c.useEffect(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const I_=ge["useId".toString()]||(()=>{});let P_=0;function fi(e){const[t,r]=ge.useState(I_());return Ar(()=>{e||r(n=>n??String(P_++))},[e]),e||(t?`radix-${t}`:"")}const k_=c.createContext(void 0);function N_(e){const t=c.useContext(k_);return e||t||"ltr"}function D_(e,t=globalThis?.document){const r=Vt(e);c.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const Fl="dismissableLayer.update",L_="dismissableLayer.pointerDownOutside",M_="dismissableLayer.focusOutside";let gp;const F_=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mp=c.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,f=c.useContext(F_),[d,p]=c.useState(null),h=(r=d?.ownerDocument)!==null&&r!==void 0?r:globalThis?.document,[,v]=c.useState({}),g=Ct(t,A=>p(A)),y=Array.from(f.layers),[m]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=y.indexOf(m),E=d?y.indexOf(d):-1,x=f.layersWithOutsidePointerEventsDisabled.size>0,P=E>=w,I=j_(A=>{const k=A.target,j=[...f.branches].some(D=>D.contains(k));!P||j||(i?.(A),s?.(A),A.defaultPrevented||l?.())},h),S=B_(A=>{const k=A.target;[...f.branches].some(D=>D.contains(k))||(a?.(A),s?.(A),A.defaultPrevented||l?.())},h);return D_(A=>{E===f.layers.size-1&&(o?.(A),!A.defaultPrevented&&l&&(A.preventDefault(),l()))},h),c.useEffect(()=>{if(d)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(gp=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),bp(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=gp)}},[d,h,n,f]),c.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),bp())},[d,f]),c.useEffect(()=>{const A=()=>v({});return document.addEventListener(Fl,A),()=>document.removeEventListener(Fl,A)},[]),c.createElement(ut.div,be({},u,{ref:g,style:{pointerEvents:x?P?"auto":"none":void 0,...e.style},onFocusCapture:dt(e.onFocusCapture,S.onFocusCapture),onBlurCapture:dt(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:dt(e.onPointerDownCapture,I.onPointerDownCapture)}))});function j_(e,t=globalThis?.document){const r=Vt(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let u=function(){yp(L_,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function B_(e,t=globalThis?.document){const r=Vt(e),n=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!n.current&&yp(M_,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function bp(){const e=new CustomEvent(Fl);document.dispatchEvent(e)}function yp(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?r_(o,i):o.dispatchEvent(i)}const jl="focusScope.autoFocusOnMount",Bl="focusScope.autoFocusOnUnmount",wp={bubbles:!1,cancelable:!0},R_=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=c.useState(null),u=Vt(o),f=Vt(i),d=c.useRef(null),p=Ct(t,g=>l(g)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let g=function(m){if(h.paused||!s)return;const w=m.target;s.contains(w)?d.current=w:Pn(d.current,{select:!0})},y=function(m){h.paused||!s||s.contains(m.relatedTarget)||Pn(d.current,{select:!0})};return document.addEventListener("focusin",g),document.addEventListener("focusout",y),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y)}}},[n,s,h.paused]),c.useEffect(()=>{if(s){xp.add(h);const g=document.activeElement;if(!s.contains(g)){const m=new CustomEvent(jl,wp);s.addEventListener(jl,u),s.dispatchEvent(m),m.defaultPrevented||(U_(G_(_p(s)),{select:!0}),document.activeElement===g&&Pn(s))}return()=>{s.removeEventListener(jl,u),setTimeout(()=>{const m=new CustomEvent(Bl,wp);s.addEventListener(Bl,f),s.dispatchEvent(m),m.defaultPrevented||Pn(g??document.body,{select:!0}),s.removeEventListener(Bl,f),xp.remove(h)},0)}}},[s,u,f,h]);const v=c.useCallback(g=>{if(!r&&!n||h.paused)return;const y=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,m=document.activeElement;if(y&&m){const w=g.currentTarget,[E,x]=W_(w);E&&x?!g.shiftKey&&m===x?(g.preventDefault(),r&&Pn(E,{select:!0})):g.shiftKey&&m===E&&(g.preventDefault(),r&&Pn(x,{select:!0})):m===w&&g.preventDefault()}},[r,n,h.paused]);return c.createElement(ut.div,be({tabIndex:-1},a,{ref:p,onKeyDown:v}))});function U_(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Pn(n,{select:t}),document.activeElement!==r)return}function W_(e){const t=_p(e),r=Ep(t,e),n=Ep(t.reverse(),e);return[r,n]}function _p(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ep(e,t){for(const r of e)if(!V_(r,{upTo:t}))return r}function V_(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function H_(e){return e instanceof HTMLInputElement&&"select"in e}function Pn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&H_(e)&&t&&e.select()}}const xp=z_();function z_(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Sp(e,t),e.unshift(t)},remove(t){var r;e=Sp(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function Sp(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function G_(e){return e.filter(t=>t.tagName!=="A")}const $p=c.forwardRef((e,t)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...o}=e;return n?on.createPortal(c.createElement(ut.div,be({},o,{ref:t})),n):null});function K_(e,t){return c.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const or=e=>{const{present:t,children:r}=e,n=q_(t),o=typeof r=="function"?r({present:n.isPresent}):c.Children.only(r),i=Ct(n.ref,o.ref);return typeof r=="function"||n.isPresent?c.cloneElement(o,{ref:i}):null};or.displayName="Presence";function q_(e){const[t,r]=c.useState(),n=c.useRef({}),o=c.useRef(e),i=c.useRef("none"),a=e?"mounted":"unmounted",[s,l]=K_(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=_a(n.current);i.current=s==="mounted"?u:"none"},[s]),Ar(()=>{const u=n.current,f=o.current;if(f!==e){const p=i.current,h=_a(u);e?l("MOUNT"):h==="none"||u?.display==="none"?l("UNMOUNT"):l(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ar(()=>{if(t){const u=d=>{const h=_a(n.current).includes(d.animationName);d.target===t&&h&&on.flushSync(()=>l("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=_a(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:c.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function _a(e){return e?.animationName||"none"}let Rl=0;function Y_(){c.useEffect(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:Cp()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:Cp()),Rl++,()=>{Rl===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Rl--}},[])}function Cp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var Ir=function(){return Ir=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},Ir.apply(this,arguments)};function Op(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function J_(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var Ea="right-scroll-bar-position",xa="width-before-scroll-bar",X_="with-scroll-bars-hidden",Z_="--removed-body-scroll-bar-size";function Q_(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function eE(e,t){var r=c.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function tE(e,t){return eE(t||null,function(r){return e.forEach(function(n){return Q_(n,r)})})}function rE(e){return e}function nE(e,t){t===void 0&&(t=rE);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var l=function(){var f=a;a=[],f.forEach(i)},u=function(){return Promise.resolve().then(l)};u(),r={push:function(f){a.push(f),u()},filter:function(f){return a=a.filter(f),r}}}};return o}function oE(e){e===void 0&&(e={});var t=nE(null);return t.options=Ir({async:!0,ssr:!1},e),t}var Ap=function(e){var t=e.sideCar,r=Op(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return ge.createElement(n,Ir({},r))};Ap.isSideCarExport=!0;function iE(e,t){return e.useMedium(t),Ap}var Tp=oE(),Ul=function(){},Sa=ge.forwardRef(function(e,t){var r=ge.useRef(null),n=ge.useState({onScrollCapture:Ul,onWheelCapture:Ul,onTouchMoveCapture:Ul}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,l=e.className,u=e.removeScrollBar,f=e.enabled,d=e.shards,p=e.sideCar,h=e.noIsolation,v=e.inert,g=e.allowPinchZoom,y=e.as,m=y===void 0?"div":y,w=Op(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),E=p,x=tE([r,t]),P=Ir(Ir({},w),o);return ge.createElement(ge.Fragment,null,f&&ge.createElement(E,{sideCar:Tp,removeScrollBar:u,shards:d,noIsolation:h,inert:v,setCallbacks:i,allowPinchZoom:!!g,lockRef:r}),a?ge.cloneElement(ge.Children.only(s),Ir(Ir({},P),{ref:x})):ge.createElement(m,Ir({},P,{className:l,ref:x}),s))});Sa.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Sa.classNames={fullWidth:xa,zeroRight:Ea};var Ip,aE=function(){if(Ip)return Ip;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function sE(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=aE();return t&&e.setAttribute("nonce",t),e}function lE(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function cE(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var uE=function(){var e=0,t=null;return{add:function(r){e==0&&(t=sE())&&(lE(t,r),cE(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fE=function(){var e=uE();return function(t,r){ge.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Pp=function(){var e=fE(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},dE={left:0,top:0,right:0,gap:0},Wl=function(e){return parseInt(e||"",10)||0},pE=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Wl(r),Wl(n),Wl(o)]},hE=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return dE;var t=pE(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},vE=Pp(),gE=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
4
|
+
.`.concat(X_,` {
|
|
5
|
+
overflow: hidden `).concat(n,`;
|
|
6
|
+
padding-right: `).concat(s,"px ").concat(n,`;
|
|
7
|
+
}
|
|
8
|
+
body {
|
|
9
|
+
overflow: hidden `).concat(n,`;
|
|
10
|
+
overscroll-behavior: contain;
|
|
11
|
+
`).concat([t&&"position: relative ".concat(n,";"),r==="margin"&&`
|
|
12
|
+
padding-left: `.concat(o,`px;
|
|
13
|
+
padding-top: `).concat(i,`px;
|
|
14
|
+
padding-right: `).concat(a,`px;
|
|
15
|
+
margin-left:0;
|
|
16
|
+
margin-top:0;
|
|
17
|
+
margin-right: `).concat(s,"px ").concat(n,`;
|
|
18
|
+
`),r==="padding"&&"padding-right: ".concat(s,"px ").concat(n,";")].filter(Boolean).join(""),`
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.`).concat(Ea,` {
|
|
22
|
+
right: `).concat(s,"px ").concat(n,`;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.`).concat(xa,` {
|
|
26
|
+
margin-right: `).concat(s,"px ").concat(n,`;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.`).concat(Ea," .").concat(Ea,` {
|
|
30
|
+
right: 0 `).concat(n,`;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.`).concat(xa," .").concat(xa,` {
|
|
34
|
+
margin-right: 0 `).concat(n,`;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
body {
|
|
38
|
+
`).concat(Z_,": ").concat(s,`px;
|
|
39
|
+
}
|
|
40
|
+
`)},mE=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,i=ge.useMemo(function(){return hE(o)},[o]);return ge.createElement(vE,{styles:gE(i,!t,o,r?"":"!important")})},Vl=!1;if(typeof window<"u")try{var $a=Object.defineProperty({},"passive",{get:function(){return Vl=!0,!0}});window.addEventListener("test",$a,$a),window.removeEventListener("test",$a,$a)}catch{Vl=!1}var po=Vl?{passive:!1}:!1,bE=function(e){return e.tagName==="TEXTAREA"},kp=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!bE(e)&&r[t]==="visible")},yE=function(e){return kp(e,"overflowY")},wE=function(e){return kp(e,"overflowX")},Np=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=Dp(e,r);if(n){var o=Lp(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},_E=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},EE=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},Dp=function(e,t){return e==="v"?yE(t):wE(t)},Lp=function(e,t){return e==="v"?_E(t):EE(t)},xE=function(e,t){return e==="h"&&t==="rtl"?-1:1},SE=function(e,t,r,n,o){var i=xE(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,l=t.contains(s),u=!1,f=a>0,d=0,p=0;do{var h=Lp(e,s),v=h[0],g=h[1],y=h[2],m=g-y-i*v;(v||m)&&Dp(e,s)&&(d+=m,p+=v),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&(o&&d===0||!o&&a>d)||!f&&(o&&p===0||!o&&-a>p))&&(u=!0),u},Ca=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Mp=function(e){return[e.deltaX,e.deltaY]},Fp=function(e){return e&&"current"in e?e.current:e},$E=function(e,t){return e[0]===t[0]&&e[1]===t[1]},CE=function(e){return`
|
|
41
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
42
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
43
|
+
`)},OE=0,ho=[];function AE(e){var t=ge.useRef([]),r=ge.useRef([0,0]),n=ge.useRef(),o=ge.useState(OE++)[0],i=ge.useState(function(){return Pp()})[0],a=ge.useRef(e);ge.useEffect(function(){a.current=e},[e]),ge.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=J_([e.lockRef.current],(e.shards||[]).map(Fp),!0).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=ge.useCallback(function(g,y){if("touches"in g&&g.touches.length===2)return!a.current.allowPinchZoom;var m=Ca(g),w=r.current,E="deltaX"in g?g.deltaX:w[0]-m[0],x="deltaY"in g?g.deltaY:w[1]-m[1],P,I=g.target,S=Math.abs(E)>Math.abs(x)?"h":"v";if("touches"in g&&S==="h"&&I.type==="range")return!1;var A=Np(S,I);if(!A)return!0;if(A?P=S:(P=S==="v"?"h":"v",A=Np(S,I)),!A)return!1;if(!n.current&&"changedTouches"in g&&(E||x)&&(n.current=P),!P)return!0;var k=n.current||P;return SE(k,y,g,k==="h"?E:x,!0)},[]),l=ge.useCallback(function(g){var y=g;if(!(!ho.length||ho[ho.length-1]!==i)){var m="deltaY"in y?Mp(y):Ca(y),w=t.current.filter(function(P){return P.name===y.type&&P.target===y.target&&$E(P.delta,m)})[0];if(w&&w.should){y.cancelable&&y.preventDefault();return}if(!w){var E=(a.current.shards||[]).map(Fp).filter(Boolean).filter(function(P){return P.contains(y.target)}),x=E.length>0?s(y,E[0]):!a.current.noIsolation;x&&y.cancelable&&y.preventDefault()}}},[]),u=ge.useCallback(function(g,y,m,w){var E={name:g,delta:y,target:m,should:w};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(x){return x!==E})},1)},[]),f=ge.useCallback(function(g){r.current=Ca(g),n.current=void 0},[]),d=ge.useCallback(function(g){u(g.type,Mp(g),g.target,s(g,e.lockRef.current))},[]),p=ge.useCallback(function(g){u(g.type,Ca(g),g.target,s(g,e.lockRef.current))},[]);ge.useEffect(function(){return ho.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",l,po),document.addEventListener("touchmove",l,po),document.addEventListener("touchstart",f,po),function(){ho=ho.filter(function(g){return g!==i}),document.removeEventListener("wheel",l,po),document.removeEventListener("touchmove",l,po),document.removeEventListener("touchstart",f,po)}},[]);var h=e.removeScrollBar,v=e.inert;return ge.createElement(ge.Fragment,null,v?ge.createElement(i,{styles:CE(o)}):null,h?ge.createElement(mE,{gapMode:"margin"}):null)}const TE=iE(Tp,AE);var jp=ge.forwardRef(function(e,t){return ge.createElement(Sa,Ir({},e,{ref:t,sideCar:TE}))});jp.classNames=Sa.classNames;const Bp=jp;var IE=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},vo=new WeakMap,Oa=new WeakMap,Aa={},Hl=0,Rp=function(e){return e&&(e.host||Rp(e.parentNode))},PE=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Rp(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},kE=function(e,t,r,n){var o=PE(t,Array.isArray(e)?e:[e]);Aa[r]||(Aa[r]=new WeakMap);var i=Aa[r],a=[],s=new Set,l=new Set(o),u=function(d){!d||s.has(d)||(s.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(s.has(p))f(p);else{var h=p.getAttribute(n),v=h!==null&&h!=="false",g=(vo.get(p)||0)+1,y=(i.get(p)||0)+1;vo.set(p,g),i.set(p,y),a.push(p),g===1&&v&&Oa.set(p,!0),y===1&&p.setAttribute(r,"true"),v||p.setAttribute(n,"true")}})};return f(t),s.clear(),Hl++,function(){a.forEach(function(d){var p=vo.get(d)-1,h=i.get(d)-1;vo.set(d,p),i.set(d,h),p||(Oa.has(d)||d.removeAttribute(n),Oa.delete(d)),h||d.removeAttribute(r)}),Hl--,Hl||(vo=new WeakMap,vo=new WeakMap,Oa=new WeakMap,Aa={})}},Up=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||IE(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),kE(n,o,r,"aria-hidden")):function(){return null}};const Wp="Dialog",[Vp,Hp]=un(Wp),[NE,hr]=Vp(Wp),DE=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=c.useRef(null),l=c.useRef(null),[u=!1,f]=wa({prop:n,defaultProp:o,onChange:i});return c.createElement(NE,{scope:t,triggerRef:s,contentRef:l,contentId:fi(),titleId:fi(),descriptionId:fi(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(d=>!d),[f]),modal:a},r)},LE="DialogTrigger",zp=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=hr(LE,r),i=Ct(t,o.triggerRef);return c.createElement(ut.button,be({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Kl(o.open)},n,{ref:i,onClick:dt(e.onClick,o.onOpenToggle)}))}),Gp="DialogPortal",[ME,Kp]=Vp(Gp,{forceMount:void 0}),qp=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:o}=e,i=hr(Gp,t);return c.createElement(ME,{scope:t,forceMount:r},c.Children.map(n,a=>c.createElement(or,{present:r||i.open},c.createElement($p,{asChild:!0,container:o},a))))},zl="DialogOverlay",Yp=c.forwardRef((e,t)=>{const r=Kp(zl,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=hr(zl,e.__scopeDialog);return i.modal?c.createElement(or,{present:n||i.open},c.createElement(FE,be({},o,{ref:t}))):null}),FE=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=hr(zl,r);return c.createElement(Bp,{as:Nl,allowPinchZoom:!0,shards:[o.contentRef]},c.createElement(ut.div,be({"data-state":Kl(o.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),go="DialogContent",Gl=c.forwardRef((e,t)=>{const r=Kp(go,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=hr(go,e.__scopeDialog);return c.createElement(or,{present:n||i.open},i.modal?c.createElement(jE,be({},o,{ref:t})):c.createElement(BE,be({},o,{ref:t})))}),jE=c.forwardRef((e,t)=>{const r=hr(go,e.__scopeDialog),n=c.useRef(null),o=Ct(t,r.contentRef,n);return c.useEffect(()=>{const i=n.current;if(i)return Up(i)},[]),c.createElement(Jp,be({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:dt(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:dt(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:dt(e.onFocusOutside,i=>i.preventDefault())}))}),BE=c.forwardRef((e,t)=>{const r=hr(go,e.__scopeDialog),n=c.useRef(!1);return c.createElement(Jp,be({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var i;if((i=e.onCloseAutoFocus)===null||i===void 0||i.call(e,o),!o.defaultPrevented){var a;n.current||(a=r.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}n.current=!1},onInteractOutside:o=>{var i,a;(i=e.onInteractOutside)===null||i===void 0||i.call(e,o),o.defaultPrevented||(n.current=!0);const s=o.target;((a=r.triggerRef.current)===null||a===void 0?void 0:a.contains(s))&&o.preventDefault()}}))}),Jp=c.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=hr(go,r),l=c.useRef(null),u=Ct(t,l);return Y_(),c.createElement(c.Fragment,null,c.createElement(R_,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},c.createElement(mp,be({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Kl(s.open)},a,{ref:u,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),Xp="DialogTitle",Zp=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=hr(Xp,r);return c.createElement(ut.h2,be({id:o.titleId},n,{ref:t}))}),RE="DialogDescription",Qp=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=hr(RE,r);return c.createElement(ut.p,be({id:o.descriptionId},n,{ref:t}))}),UE="DialogClose",eh=c.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=hr(UE,r);return c.createElement(ut.button,be({type:"button"},n,{ref:t,onClick:dt(e.onClick,()=>o.onOpenChange(!1))}))});function Kl(e){return e?"open":"closed"}const WE="DialogTitleWarning",[VE,I9]=Xw(WE,{contentName:go,titleName:Xp,docsSlug:"dialog"}),ql=DE,HE=zp,zE=qp,GE=Yp,KE=Gl,qE=Zp,YE=Qp,th=eh,JE="AlertDialog",[XE,P9]=un(JE,[Hp]),Hr=Hp(),ZE=e=>{const{__scopeAlertDialog:t,...r}=e,n=Hr(t);return c.createElement(ql,be({},n,r,{modal:!0}))},QE=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Hr(r);return c.createElement(HE,be({},o,n,{ref:t}))}),ex=e=>{const{__scopeAlertDialog:t,...r}=e,n=Hr(t);return c.createElement(zE,be({},n,r))},tx=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Hr(r);return c.createElement(GE,be({},o,n,{ref:t}))}),rh="AlertDialogContent",[rx,nx]=XE(rh),ox=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,children:n,...o}=e,i=Hr(r),a=c.useRef(null),s=Ct(t,a),l=c.useRef(null);return c.createElement(VE,{contentName:rh,titleName:ix,docsSlug:"alert-dialog"},c.createElement(rx,{scope:r,cancelRef:l},c.createElement(KE,be({role:"alertdialog"},i,o,{ref:s,onOpenAutoFocus:dt(o.onOpenAutoFocus,u=>{var f;u.preventDefault(),(f=l.current)===null||f===void 0||f.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault()}),c.createElement(Ll,null,n),!1)))}),ix="AlertDialogTitle",ax=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Hr(r);return c.createElement(qE,be({},o,n,{ref:t}))}),sx=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Hr(r);return c.createElement(YE,be({},o,n,{ref:t}))}),lx=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,o=Hr(r);return c.createElement(th,be({},o,n,{ref:t}))}),cx="AlertDialogCancel",ux=c.forwardRef((e,t)=>{const{__scopeAlertDialog:r,...n}=e,{cancelRef:o}=nx(cx,r),i=Hr(r),a=Ct(t,o);return c.createElement(th,be({},i,n,{ref:a}))}),fx=ZE;function at(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e?.(o),r===!1||!o.defaultPrevented)return t?.(o)}}function nh(e){const t=e+"CollectionProvider",[r,n]=Tr(t),[o,i]=r(t,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:v,children:g}=h,y=c.useRef(null),m=c.useRef(new Map).current;return c.createElement(o,{scope:v,itemMap:m,collectionRef:y},g)},s=e+"CollectionSlot",l=c.forwardRef((h,v)=>{const{scope:g,children:y}=h,m=i(s,g),w=Qt(v,m.collectionRef);return c.createElement(xt,{ref:w},y)}),u=e+"CollectionItemSlot",f="data-radix-collection-item",d=c.forwardRef((h,v)=>{const{scope:g,children:y,...m}=h,w=c.useRef(null),E=Qt(v,w),x=i(u,g);return c.useEffect(()=>(x.itemMap.set(w,{ref:w,...m}),()=>void x.itemMap.delete(w))),c.createElement(xt,{[f]:"",ref:E},y)});function p(h){const v=i(e+"CollectionConsumer",h);return c.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const m=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((x,P)=>m.indexOf(x.ref.current)-m.indexOf(P.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},p,n]}const dx=c.createContext(void 0);function oh(e){const t=c.useContext(dx);return e||t||"ltr"}function Pr(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}function px(e,t=globalThis?.document){const r=Pr(e);c.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}let Yl=0;function hx(){c.useEffect(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:ih()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:ih()),Yl++,()=>{Yl===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Yl--}},[])}function ih(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const mo=globalThis?.document?c.useLayoutEffect:()=>{},vx=ge["useId".toString()]||(()=>{});let gx=0;function Jl(e){const[t,r]=ge.useState(vx());return mo(()=>{e||r(n=>n??String(gx++))},[e]),e||(t?`radix-${t}`:"")}function bo(e){return e.split("-")[1]}function Xl(e){return e==="y"?"height":"width"}function zr(e){return e.split("-")[0]}function kn(e){return["top","bottom"].includes(zr(e))?"x":"y"}function ah(e,t,r){let{reference:n,floating:o}=e;const i=n.x+n.width/2-o.width/2,a=n.y+n.height/2-o.height/2,s=kn(t),l=Xl(s),u=n[l]/2-o[l]/2,f=s==="x";let d;switch(zr(t)){case"top":d={x:i,y:n.y-o.height};break;case"bottom":d={x:i,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:a};break;case"left":d={x:n.x-o.width,y:a};break;default:d={x:n.x,y:n.y}}switch(bo(t)){case"start":d[s]-=u*(r&&f?-1:1);break;case"end":d[s]+=u*(r&&f?-1:1)}return d}const mx=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:d}=ah(u,n,l),p=n,h={},v=0;for(let g=0;g<s.length;g++){const{name:y,fn:m}=s[g],{x:w,y:E,data:x,reset:P}=await m({x:f,y:d,initialPlacement:n,placement:p,strategy:o,middlewareData:h,rects:u,platform:a,elements:{reference:e,floating:t}});f=w??f,d=E??d,h={...h,[y]:{...h[y],...x}},P&&v<=50&&(v++,typeof P=="object"&&(P.placement&&(p=P.placement),P.rects&&(u=P.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):P.rects),{x:f,y:d}=ah(u,p,l)),g=-1)}return{x:f,y:d,placement:p,strategy:o,middlewareData:h}};function sh(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function Ta(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function di(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=t,v=sh(h),g=s[p?d==="floating"?"reference":"floating":d],y=Ta(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(g)))==null||r?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),m=d==="floating"?{...a.floating,x:n,y:o}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),E=await(i.isElement==null?void 0:i.isElement(w))&&await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1},x=Ta(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:m,offsetParent:w,strategy:l}):m);return{top:(y.top-x.top+v.top)/E.y,bottom:(x.bottom-y.bottom+v.bottom)/E.y,left:(y.left-x.left+v.left)/E.x,right:(x.right-y.right+v.right)/E.x}}const Zl=Math.min,Nn=Math.max;function Ql(e,t,r){return Nn(e,Zl(t,r))}const lh=e=>({name:"arrow",options:e,async fn(t){const{element:r,padding:n=0}=e||{},{x:o,y:i,placement:a,rects:s,platform:l,elements:u}=t;if(r==null)return{};const f=sh(n),d={x:o,y:i},p=kn(a),h=Xl(p),v=await l.getDimensions(r),g=p==="y",y=g?"top":"left",m=g?"bottom":"right",w=g?"clientHeight":"clientWidth",E=s.reference[h]+s.reference[p]-d[p]-s.floating[h],x=d[p]-s.reference[p],P=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let I=P?P[w]:0;I&&await(l.isElement==null?void 0:l.isElement(P))||(I=u.floating[w]||s.floating[h]);const S=E/2-x/2,A=f[y],k=I-v[h]-f[m],j=I/2-v[h]/2+S,D=Ql(A,j,k),N=bo(a)!=null&&j!=D&&s.reference[h]/2-(j<A?f[y]:f[m])-v[h]/2<0;return{[p]:d[p]-(N?j<A?A-j:k-j:0),data:{[p]:D,centerOffset:j-D}}}}),ch=["top","right","bottom","left"];ch.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const bx={left:"right",right:"left",bottom:"top",top:"bottom"};function Ia(e){return e.replace(/left|right|bottom|top/g,t=>bx[t])}function yx(e,t,r){r===void 0&&(r=!1);const n=bo(e),o=kn(e),i=Xl(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ia(a)),{main:a,cross:Ia(a)}}const wx={start:"end",end:"start"};function ec(e){return e.replace(/start|end/g,t=>wx[t])}const _x=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...g}=e,y=zr(n),m=zr(a)===a,w=await(s.isRTL==null?void 0:s.isRTL(l.floating)),E=d||(m||!v?[Ia(a)]:function(D){const N=Ia(D);return[ec(D),N,ec(N)]}(a));d||h==="none"||E.push(...function(D,N,J,K){const Y=bo(D);let te=function(oe,le,ae){const ve=["left","right"],ce=["right","left"],q=["top","bottom"],V=["bottom","top"];switch(oe){case"top":case"bottom":return ae?le?ce:ve:le?ve:ce;case"left":case"right":return le?q:V;default:return[]}}(zr(D),J==="start",K);return Y&&(te=te.map(oe=>oe+"-"+Y),N&&(te=te.concat(te.map(ec)))),te}(a,v,h,w));const x=[a,...E],P=await di(t,g),I=[];let S=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&I.push(P[y]),f){const{main:D,cross:N}=yx(n,i,w);I.push(P[D],P[N])}if(S=[...S,{placement:n,overflows:I}],!I.every(D=>D<=0)){var A,k;const D=(((A=o.flip)==null?void 0:A.index)||0)+1,N=x[D];if(N)return{data:{index:D,overflows:S},reset:{placement:N}};let J=(k=S.filter(K=>K.overflows[0]<=0).sort((K,Y)=>K.overflows[1]-Y.overflows[1])[0])==null?void 0:k.placement;if(!J)switch(p){case"bestFit":{var j;const K=(j=S.map(Y=>[Y.placement,Y.overflows.filter(te=>te>0).reduce((te,oe)=>te+oe,0)]).sort((Y,te)=>Y[1]-te[1])[0])==null?void 0:j[0];K&&(J=K);break}case"initialPlacement":J=a}if(n!==J)return{reset:{placement:J}}}return{}}}};function uh(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fh(e){return ch.some(t=>e[t]>=0)}const Ex=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{strategy:r="referenceHidden",...n}=e,{rects:o}=t;switch(r){case"referenceHidden":{const i=uh(await di(t,{...n,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:fh(i)}}}case"escaped":{const i=uh(await di(t,{...n,altBoundary:!0}),o.floating);return{data:{escapedOffsets:i,escaped:fh(i)}}}default:return{}}}}},xx=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await async function(i,a){const{placement:s,platform:l,elements:u}=i,f=await(l.isRTL==null?void 0:l.isRTL(u.floating)),d=zr(s),p=bo(s),h=kn(s)==="x",v=["left","top"].includes(d)?-1:1,g=f&&h?-1:1,y=typeof a=="function"?a(i):a;let{mainAxis:m,crossAxis:w,alignmentAxis:E}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return p&&typeof E=="number"&&(w=p==="end"?-1*E:E),h?{x:w*g,y:m*v}:{x:m*v,y:w*g}}(t,e);return{x:r+o.x,y:n+o.y,data:o}}}};function dh(e){return e==="x"?"y":"x"}const Sx=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:m,y:w}=y;return{x:m,y:w}}},...l}=e,u={x:r,y:n},f=await di(t,l),d=kn(zr(o)),p=dh(d);let h=u[d],v=u[p];if(i){const y=d==="y"?"bottom":"right";h=Ql(h+f[d==="y"?"top":"left"],h,h-f[y])}if(a){const y=p==="y"?"bottom":"right";v=Ql(v+f[p==="y"?"top":"left"],v,v-f[y])}const g=s.fn({...t,[d]:h,[p]:v});return{...g,data:{x:g.x-r,y:g.y-n}}}}},$x=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,f={x:r,y:n},d=kn(o),p=dh(d);let h=f[d],v=f[p];const g=typeof s=="function"?s(t):s,y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const E=d==="y"?"height":"width",x=i.reference[d]-i.floating[E]+y.mainAxis,P=i.reference[d]+i.reference[E]-y.mainAxis;h<x?h=x:h>P&&(h=P)}if(u){var m,w;const E=d==="y"?"width":"height",x=["top","left"].includes(zr(o)),P=i.reference[p]-i.floating[E]+(x&&((m=a.offset)==null?void 0:m[p])||0)+(x?0:y.crossAxis),I=i.reference[p]+i.reference[E]+(x?0:((w=a.offset)==null?void 0:w[p])||0)-(x?y.crossAxis:0);v<P?v=P:v>I&&(v=I)}return{[d]:h,[p]:v}}}},Cx=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:i}=t,{apply:a=()=>{},...s}=e,l=await di(t,s),u=zr(r),f=bo(r),d=kn(r)==="x",{width:p,height:h}=n.floating;let v,g;u==="top"||u==="bottom"?(v=u,g=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(g=u,v=f==="end"?"top":"bottom");const y=h-l[v],m=p-l[g],w=!t.middlewareData.shift;let E=y,x=m;if(d){const I=p-l.left-l.right;x=f||w?Zl(m,I):I}else{const I=h-l.top-l.bottom;E=f||w?Zl(y,I):I}if(w&&!f){const I=Nn(l.left,0),S=Nn(l.right,0),A=Nn(l.top,0),k=Nn(l.bottom,0);d?x=p-2*(I!==0||S!==0?I+S:Nn(l.left,l.right)):E=h-2*(A!==0||k!==0?A+k:Nn(l.top,l.bottom))}await a({...t,availableWidth:x,availableHeight:E});const P=await o.getDimensions(i.floating);return p!==P.width||h!==P.height?{reset:{rects:!0}}:{}}}};function ir(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vr(e){return ir(e).getComputedStyle(e)}function ph(e){return e instanceof ir(e).Node}function fn(e){return ph(e)?(e.nodeName||"").toLowerCase():""}function gr(e){return e instanceof ir(e).HTMLElement}function er(e){return e instanceof ir(e).Element}function hh(e){return typeof ShadowRoot>"u"?!1:e instanceof ir(e).ShadowRoot||e instanceof ShadowRoot}function pi(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=vr(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function Ox(e){return["table","td","th"].includes(fn(e))}function tc(e){const t=rc(),r=vr(e);return r.transform!=="none"||r.perspective!=="none"||!t&&!!r.backdropFilter&&r.backdropFilter!=="none"||!t&&!!r.filter&&r.filter!=="none"||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function rc(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Pa(e){return["html","body","#document"].includes(fn(e))}const vh=Math.min,hi=Math.max,ka=Math.round;function gh(e){const t=vr(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=gr(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=ka(r)!==i||ka(n)!==a;return s&&(r=i,n=a),{width:r,height:n,fallback:s}}function mh(e){return er(e)?e:e.contextElement}const bh={x:1,y:1};function yo(e){const t=mh(e);if(!gr(t))return bh;const r=t.getBoundingClientRect(),{width:n,height:o,fallback:i}=gh(t);let a=(i?ka(r.width):r.width)/n,s=(i?ka(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const yh={x:0,y:0};function wh(e,t,r){var n,o;if(t===void 0&&(t=!0),!rc())return yh;const i=e?ir(e):window;return!r||t&&r!==i?yh:{x:((n=i.visualViewport)==null?void 0:n.offsetLeft)||0,y:((o=i.visualViewport)==null?void 0:o.offsetTop)||0}}function Dn(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=mh(e);let a=bh;t&&(n?er(n)&&(a=yo(n)):a=yo(e));const s=wh(i,r,n);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,f=o.width/a.x,d=o.height/a.y;if(i){const p=ir(i),h=n&&er(n)?ir(n):n;let v=p.frameElement;for(;v&&n&&h!==p;){const g=yo(v),y=v.getBoundingClientRect(),m=getComputedStyle(v);y.x+=(v.clientLeft+parseFloat(m.paddingLeft))*g.x,y.y+=(v.clientTop+parseFloat(m.paddingTop))*g.y,l*=g.x,u*=g.y,f*=g.x,d*=g.y,l+=y.x,u+=y.y,v=ir(v).frameElement}}return Ta({width:f,height:d,x:l,y:u})}function dn(e){return((ph(e)?e.ownerDocument:e.document)||window.document).documentElement}function Na(e){return er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function _h(e){return Dn(dn(e)).left+Na(e).scrollLeft}function wo(e){if(fn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hh(e)&&e.host||dn(e);return hh(t)?t.host:t}function Eh(e){const t=wo(e);return Pa(t)?t.ownerDocument.body:gr(t)&&pi(t)?t:Eh(t)}function vi(e,t){var r;t===void 0&&(t=[]);const n=Eh(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=ir(n);return o?t.concat(i,i.visualViewport||[],pi(n)?n:[]):t.concat(n,vi(n))}function xh(e,t,r){let n;if(t==="viewport")n=function(o,i){const a=ir(o),s=dn(o),l=a.visualViewport;let u=s.clientWidth,f=s.clientHeight,d=0,p=0;if(l){u=l.width,f=l.height;const h=rc();(!h||h&&i==="fixed")&&(d=l.offsetLeft,p=l.offsetTop)}return{width:u,height:f,x:d,y:p}}(e,r);else if(t==="document")n=function(o){const i=dn(o),a=Na(o),s=o.ownerDocument.body,l=hi(i.scrollWidth,i.clientWidth,s.scrollWidth,s.clientWidth),u=hi(i.scrollHeight,i.clientHeight,s.scrollHeight,s.clientHeight);let f=-a.scrollLeft+_h(o);const d=-a.scrollTop;return vr(s).direction==="rtl"&&(f+=hi(i.clientWidth,s.clientWidth)-l),{width:l,height:u,x:f,y:d}}(dn(e));else if(er(t))n=function(o,i){const a=Dn(o,!0,i==="fixed"),s=a.top+o.clientTop,l=a.left+o.clientLeft,u=gr(o)?yo(o):{x:1,y:1};return{width:o.clientWidth*u.x,height:o.clientHeight*u.y,x:l*u.x,y:s*u.y}}(t,r);else{const o=wh(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return Ta(n)}function Sh(e,t){const r=wo(e);return!(r===t||!er(r)||Pa(r))&&(vr(r).position==="fixed"||Sh(r,t))}function $h(e,t){return gr(e)&&vr(e).position!=="fixed"?t?t(e):e.offsetParent:null}function Ch(e,t){const r=ir(e);if(!gr(e))return r;let n=$h(e,t);for(;n&&Ox(n)&&vr(n).position==="static";)n=$h(n,t);return n&&(fn(n)==="html"||fn(n)==="body"&&vr(n).position==="static"&&!tc(n))?r:n||function(o){let i=wo(o);for(;gr(i)&&!Pa(i);){if(tc(i))return i;i=wo(i)}return null}(e)||r}function Ax(e,t,r){const n=gr(t),o=dn(t),i=r==="fixed",a=Dn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l={x:0,y:0};if(n||!n&&!i)if((fn(t)!=="body"||pi(o))&&(s=Na(t)),gr(t)){const u=Dn(t,!0,i,t);l.x=u.x+t.clientLeft,l.y=u.y+t.clientTop}else o&&(l.x=_h(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}const Tx={getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=r==="clippingAncestors"?function(u,f){const d=f.get(u);if(d)return d;let p=vi(u).filter(y=>er(y)&&fn(y)!=="body"),h=null;const v=vr(u).position==="fixed";let g=v?wo(u):u;for(;er(g)&&!Pa(g);){const y=vr(g),m=tc(g);m||y.position!=="fixed"||(h=null),(v?!m&&!h:!m&&y.position==="static"&&h&&["absolute","fixed"].includes(h.position)||pi(g)&&!m&&Sh(u,g))?p=p.filter(w=>w!==g):h=y,g=wo(g)}return f.set(u,p),p}(t,this._c):[].concat(r),a=[...i,n],s=a[0],l=a.reduce((u,f)=>{const d=xh(t,f,o);return u.top=hi(d.top,u.top),u.right=vh(d.right,u.right),u.bottom=vh(d.bottom,u.bottom),u.left=hi(d.left,u.left),u},xh(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=gr(r),i=dn(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0},s={x:1,y:1};const l={x:0,y:0};if((o||!o&&n!=="fixed")&&((fn(r)!=="body"||pi(i))&&(a=Na(r)),gr(r))){const u=Dn(r);s=yo(r),l.x=u.x+r.clientLeft,l.y=u.y+r.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+l.x,y:t.y*s.y-a.scrollTop*s.y+l.y}},isElement:er,getDimensions:function(e){return gh(e)},getOffsetParent:Ch,getDocumentElement:dn,getScale:yo,async getElementRects(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||Ch,i=this.getDimensions;return{reference:Ax(t,await o(r),n),floating:{x:0,y:0,...await i(r)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>vr(e).direction==="rtl"};function Ix(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=n,l=o||i?[...er(e)?vi(e):e.contextElement?vi(e.contextElement):[],...vi(t)]:[];l.forEach(p=>{const h=!er(p)&&p.toString().includes("V");!o||s&&!h||p.addEventListener("scroll",r,{passive:!0}),i&&p.addEventListener("resize",r)});let u,f=null;a&&(f=new ResizeObserver(()=>{r()}),er(e)&&!s&&f.observe(e),er(e)||!e.contextElement||s||f.observe(e.contextElement),f.observe(t));let d=s?Dn(e):null;return s&&function p(){const h=Dn(e);!d||h.x===d.x&&h.y===d.y&&h.width===d.width&&h.height===d.height||r(),d=h,u=requestAnimationFrame(p)}(),r(),()=>{var p;l.forEach(h=>{o&&h.removeEventListener("scroll",r),i&&h.removeEventListener("resize",r)}),(p=f)==null||p.disconnect(),f=null,s&&cancelAnimationFrame(u)}}const Px=(e,t,r)=>{const n=new Map,o={platform:Tx,...r},i={...o.platform,_c:n};return mx(e,t,{...o,platform:i})},kx=e=>{const{element:t,padding:r}=e;function n(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return t&&n(t)?t.current!=null?lh({element:t.current,padding:r}).fn(o):{}:t?lh({element:t,padding:r}).fn(o):{}}}};var Da=typeof document<"u"?c.useLayoutEffect:c.useEffect;function La(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!La(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!La(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Oh(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ah(e,t){const r=Oh(e);return Math.round(t*r)/r}function Th(e){const t=ge.useRef(e);return Da(()=>{t.current=e}),t}function Nx(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:u}=e,[f,d]=ge.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=ge.useState(n);La(p,n)||h(n);const[v,g]=ge.useState(null),[y,m]=ge.useState(null),w=ge.useCallback(te=>{te!=I.current&&(I.current=te,g(te))},[g]),E=ge.useCallback(te=>{te!==S.current&&(S.current=te,m(te))},[m]),x=i||v,P=a||y,I=ge.useRef(null),S=ge.useRef(null),A=ge.useRef(f),k=Th(l),j=Th(o),D=ge.useCallback(()=>{if(!I.current||!S.current)return;const te={placement:t,strategy:r,middleware:p};j.current&&(te.platform=j.current),Px(I.current,S.current,te).then(oe=>{const le={...oe,isPositioned:!0};N.current&&!La(A.current,le)&&(A.current=le,Cd.flushSync(()=>{d(le)}))})},[p,t,r,j]);Da(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(te=>({...te,isPositioned:!1})))},[u]);const N=ge.useRef(!1);Da(()=>(N.current=!0,()=>{N.current=!1}),[]),Da(()=>{if(x&&(I.current=x),P&&(S.current=P),x&&P){if(k.current)return k.current(x,P,D);D()}},[x,P,D,k]);const J=ge.useMemo(()=>({reference:I,floating:S,setReference:w,setFloating:E}),[w,E]),K=ge.useMemo(()=>({reference:x,floating:P}),[x,P]),Y=ge.useMemo(()=>{const te={position:r,left:0,top:0};if(!K.floating)return te;const oe=Ah(K.floating,f.x),le=Ah(K.floating,f.y);return s?{...te,transform:"translate("+oe+"px, "+le+"px)",...Oh(K.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:oe,top:le}},[r,s,K.floating,f.x,f.y]);return ge.useMemo(()=>({...f,update:D,refs:J,elements:K,floatingStyles:Y}),[f,D,J,K,Y])}const Dx=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return c.createElement(Ve.svg,be({},i,{ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?r:c.createElement("polygon",{points:"0,0 30,0 15,10"}))});function Ih(e){const[t,r]=c.useState(void 0);return mo(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;r({width:a,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}function Lx(e,t){return c.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const Ma=e=>{const{present:t,children:r}=e,n=Mx(t),o=typeof r=="function"?r({present:n.isPresent}):c.Children.only(r),i=Qt(n.ref,o.ref);return typeof r=="function"||n.isPresent?c.cloneElement(o,{ref:i}):null};Ma.displayName="Presence";function Mx(e){const[t,r]=c.useState(),n=c.useRef({}),o=c.useRef(e),i=c.useRef("none"),a=e?"mounted":"unmounted",[s,l]=Lx(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=Fa(n.current);i.current=s==="mounted"?u:"none"},[s]),mo(()=>{const u=n.current,f=o.current;if(f!==e){const p=i.current,h=Fa(u);e?l("MOUNT"):h==="none"||u?.display==="none"?l("UNMOUNT"):l(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),mo(()=>{if(t){const u=d=>{const h=Fa(n.current).includes(d.animationName);d.target===t&&h&&on.flushSync(()=>l("ANIMATION_END"))},f=d=>{d.target===t&&(i.current=Fa(n.current))};return t.addEventListener("animationstart",f),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",f),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:c.useCallback(u=>{u&&(n.current=getComputedStyle(u)),r(u)},[])}}function Fa(e){return e?.animationName||"none"}function Gr({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=Fx({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=Pr(r),l=c.useCallback(u=>{if(i){const d=typeof u=="function"?u(e):u;d!==e&&s(d)}else o(u)},[i,e,o,s]);return[a,l]}function Fx({defaultProp:e,onChange:t}){const r=c.useState(e),[n]=r,o=c.useRef(n),i=Pr(t);return c.useEffect(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}const nc="rovingFocusGroup.onEntryFocus",jx={bubbles:!1,cancelable:!0},oc="RovingFocusGroup",[ic,Ph,Bx]=nh(oc),[Rx,kh]=Tr(oc,[Bx]),[Ux,Wx]=Rx(oc),Vx=c.forwardRef((e,t)=>c.createElement(ic.Provider,{scope:e.__scopeRovingFocusGroup},c.createElement(ic.Slot,{scope:e.__scopeRovingFocusGroup},c.createElement(Hx,be({},e,{ref:t}))))),Hx=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,...f}=e,d=c.useRef(null),p=Qt(t,d),h=oh(i),[v=null,g]=Gr({prop:a,defaultProp:s,onChange:l}),[y,m]=c.useState(!1),w=Pr(u),E=Ph(r),x=c.useRef(!1),[P,I]=c.useState(0);return c.useEffect(()=>{const S=d.current;if(S)return S.addEventListener(nc,w),()=>S.removeEventListener(nc,w)},[w]),c.createElement(Ux,{scope:r,orientation:n,dir:h,loop:o,currentTabStopId:v,onItemFocus:c.useCallback(S=>g(S),[g]),onItemShiftTab:c.useCallback(()=>m(!0),[]),onFocusableItemAdd:c.useCallback(()=>I(S=>S+1),[]),onFocusableItemRemove:c.useCallback(()=>I(S=>S-1),[])},c.createElement(Ve.div,be({tabIndex:y||P===0?-1:0,"data-orientation":n},f,{ref:p,style:{outline:"none",...e.style},onMouseDown:at(e.onMouseDown,()=>{x.current=!0}),onFocus:at(e.onFocus,S=>{const A=!x.current;if(S.target===S.currentTarget&&A&&!y){const k=new CustomEvent(nc,jx);if(S.currentTarget.dispatchEvent(k),!k.defaultPrevented){const j=E().filter(Y=>Y.focusable),D=j.find(Y=>Y.active),N=j.find(Y=>Y.id===v),K=[D,N,...j].filter(Boolean).map(Y=>Y.ref.current);Nh(K)}}x.current=!1}),onBlur:at(e.onBlur,()=>m(!1))})))}),zx="RovingFocusGroupItem",Gx=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:i,...a}=e,s=Jl(),l=i||s,u=Wx(zx,r),f=u.currentTabStopId===l,d=Ph(r),{onFocusableItemAdd:p,onFocusableItemRemove:h}=u;return c.useEffect(()=>{if(n)return p(),()=>h()},[n,p,h]),c.createElement(ic.ItemSlot,{scope:r,id:l,focusable:n,active:o},c.createElement(Ve.span,be({tabIndex:f?0:-1,"data-orientation":u.orientation},a,{ref:t,onMouseDown:at(e.onMouseDown,v=>{n?u.onItemFocus(l):v.preventDefault()}),onFocus:at(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:at(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const g=Yx(v,u.orientation,u.dir);if(g!==void 0){v.preventDefault();let m=d().filter(w=>w.focusable).map(w=>w.ref.current);if(g==="last")m.reverse();else if(g==="prev"||g==="next"){g==="prev"&&m.reverse();const w=m.indexOf(v.currentTarget);m=u.loop?Jx(m,w+1):m.slice(w+1)}setTimeout(()=>Nh(m))}})})))}),Kx={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qx(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Yx(e,t,r){const n=qx(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Kx[n]}function Nh(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function Jx(e,t){return e.map((r,n)=>e[(t+n)%e.length])}const Xx=Vx,Zx=Gx,ac="dismissableLayer.update",Qx="dismissableLayer.pointerDownOutside",e2="dismissableLayer.focusOutside";let Dh;const t2=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),r2=c.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:l,...u}=e,f=c.useContext(t2),[d,p]=c.useState(null),h=(r=d?.ownerDocument)!==null&&r!==void 0?r:globalThis?.document,[,v]=c.useState({}),g=Qt(t,A=>p(A)),y=Array.from(f.layers),[m]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),w=y.indexOf(m),E=d?y.indexOf(d):-1,x=f.layersWithOutsidePointerEventsDisabled.size>0,P=E>=w,I=n2(A=>{const k=A.target,j=[...f.branches].some(D=>D.contains(k));!P||j||(i?.(A),s?.(A),A.defaultPrevented||l?.())},h),S=o2(A=>{const k=A.target;[...f.branches].some(D=>D.contains(k))||(a?.(A),s?.(A),A.defaultPrevented||l?.())},h);return px(A=>{E===f.layers.size-1&&(o?.(A),!A.defaultPrevented&&l&&(A.preventDefault(),l()))},h),c.useEffect(()=>{if(d)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(Dh=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(d)),f.layers.add(d),Lh(),()=>{n&&f.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Dh)}},[d,h,n,f]),c.useEffect(()=>()=>{d&&(f.layers.delete(d),f.layersWithOutsidePointerEventsDisabled.delete(d),Lh())},[d,f]),c.useEffect(()=>{const A=()=>v({});return document.addEventListener(ac,A),()=>document.removeEventListener(ac,A)},[]),c.createElement(Ve.div,be({},u,{ref:g,style:{pointerEvents:x?P?"auto":"none":void 0,...e.style},onFocusCapture:at(e.onFocusCapture,S.onFocusCapture),onBlurCapture:at(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:at(e.onPointerDownCapture,I.onPointerDownCapture)}))});function n2(e,t=globalThis?.document){const r=Pr(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let u=function(){Mh(Qx,r,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=u,t.addEventListener("click",o.current,{once:!0})):u()}n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function o2(e,t=globalThis?.document){const r=Pr(e),n=c.useRef(!1);return c.useEffect(()=>{const o=i=>{i.target&&!n.current&&Mh(e2,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Lh(){const e=new CustomEvent(ac);document.dispatchEvent(e)}function Mh(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?Rd(o,i):o.dispatchEvent(i)}const sc="focusScope.autoFocusOnMount",lc="focusScope.autoFocusOnUnmount",Fh={bubbles:!1,cancelable:!0},i2=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=c.useState(null),u=Pr(o),f=Pr(i),d=c.useRef(null),p=Qt(t,g=>l(g)),h=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let g=function(E){if(h.paused||!s)return;const x=E.target;s.contains(x)?d.current=x:pn(d.current,{select:!0})},y=function(E){if(h.paused||!s)return;const x=E.relatedTarget;x!==null&&(s.contains(x)||pn(d.current,{select:!0}))},m=function(E){const x=document.activeElement;for(const P of E)P.removedNodes.length>0&&(s!=null&&s.contains(x)||pn(s))};document.addEventListener("focusin",g),document.addEventListener("focusout",y);const w=new MutationObserver(m);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),w.disconnect()}}},[n,s,h.paused]),c.useEffect(()=>{if(s){Rh.add(h);const g=document.activeElement;if(!s.contains(g)){const m=new CustomEvent(sc,Fh);s.addEventListener(sc,u),s.dispatchEvent(m),m.defaultPrevented||(a2(f2(jh(s)),{select:!0}),document.activeElement===g&&pn(s))}return()=>{s.removeEventListener(sc,u),setTimeout(()=>{const m=new CustomEvent(lc,Fh);s.addEventListener(lc,f),s.dispatchEvent(m),m.defaultPrevented||pn(g??document.body,{select:!0}),s.removeEventListener(lc,f),Rh.remove(h)},0)}}},[s,u,f,h]);const v=c.useCallback(g=>{if(!r&&!n||h.paused)return;const y=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,m=document.activeElement;if(y&&m){const w=g.currentTarget,[E,x]=s2(w);E&&x?!g.shiftKey&&m===x?(g.preventDefault(),r&&pn(E,{select:!0})):g.shiftKey&&m===E&&(g.preventDefault(),r&&pn(x,{select:!0})):m===w&&g.preventDefault()}},[r,n,h.paused]);return c.createElement(Ve.div,be({tabIndex:-1},a,{ref:p,onKeyDown:v}))});function a2(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(pn(n,{select:t}),document.activeElement!==r)return}function s2(e){const t=jh(e),r=Bh(t,e),n=Bh(t.reverse(),e);return[r,n]}function jh(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Bh(e,t){for(const r of e)if(!l2(r,{upTo:t}))return r}function l2(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function c2(e){return e instanceof HTMLInputElement&&"select"in e}function pn(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&c2(e)&&t&&e.select()}}const Rh=u2();function u2(){let e=[];return{add(t){const r=e[0];t!==r&&r?.pause(),e=Uh(e,t),e.unshift(t)},remove(t){var r;e=Uh(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function Uh(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function f2(e){return e.filter(t=>t.tagName!=="A")}const Wh="Popper",[Vh,Hh]=Tr(Wh),[d2,zh]=Vh(Wh),p2=e=>{const{__scopePopper:t,children:r}=e,[n,o]=c.useState(null);return c.createElement(d2,{scope:t,anchor:n,onAnchorChange:o},r)},h2="PopperAnchor",v2=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=zh(h2,r),a=c.useRef(null),s=Qt(t,a);return c.useEffect(()=>{i.onAnchorChange(n?.current||a.current)}),n?null:c.createElement(Ve.div,be({},o,{ref:s}))}),Gh="PopperContent",[g2,m2]=Vh(Gh),b2=c.forwardRef((e,t)=>{var r,n,o,i,a,s,l,u;const{__scopePopper:f,side:d="bottom",sideOffset:p=0,align:h="center",alignOffset:v=0,arrowPadding:g=0,collisionBoundary:y=[],collisionPadding:m=0,sticky:w="partial",hideWhenDetached:E=!1,avoidCollisions:x=!0,onPlaced:P,...I}=e,S=zh(Gh,f),[A,k]=c.useState(null),j=Qt(t,ne=>k(ne)),[D,N]=c.useState(null),J=Ih(D),K=(r=J?.width)!==null&&r!==void 0?r:0,Y=(n=J?.height)!==null&&n!==void 0?n:0,te=d+(h!=="center"?"-"+h:""),oe=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},le=Array.isArray(y)?y:[y],ae=le.length>0,ve={padding:oe,boundary:le.filter(E2),altBoundary:ae},{refs:ce,floatingStyles:q,placement:V,isPositioned:re,middlewareData:de}=Nx({strategy:"fixed",placement:te,whileElementsMounted:Ix,elements:{reference:S.anchor},middleware:[xx({mainAxis:p+Y,alignmentAxis:v}),x&&Sx({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?$x():void 0,...ve}),x&&_x({...ve}),Cx({...ve,apply:({elements:ne,rects:pe,availableWidth:me,availableHeight:xe})=>{const{width:Ee,height:ie}=pe.reference,Ne=ne.floating.style;Ne.setProperty("--radix-popper-available-width",`${me}px`),Ne.setProperty("--radix-popper-available-height",`${xe}px`),Ne.setProperty("--radix-popper-anchor-width",`${Ee}px`),Ne.setProperty("--radix-popper-anchor-height",`${ie}px`)}}),D&&kx({element:D,padding:g}),x2({arrowWidth:K,arrowHeight:Y}),E&&Ex({strategy:"referenceHidden"})]}),[U,z]=Kh(V),M=Pr(P);mo(()=>{re&&M?.()},[re,M]);const R=(o=de.arrow)===null||o===void 0?void 0:o.x,G=(i=de.arrow)===null||i===void 0?void 0:i.y,O=((a=de.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[T,Z]=c.useState();return mo(()=>{A&&Z(window.getComputedStyle(A).zIndex)},[A]),c.createElement("div",{ref:ce.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:re?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:T,["--radix-popper-transform-origin"]:[(s=de.transformOrigin)===null||s===void 0?void 0:s.x,(l=de.transformOrigin)===null||l===void 0?void 0:l.y].join(" ")},dir:e.dir},c.createElement(g2,{scope:f,placedSide:U,onArrowChange:N,arrowX:R,arrowY:G,shouldHideArrow:O},c.createElement(Ve.div,be({"data-side":U,"data-align":z},I,{ref:j,style:{...I.style,animation:re?void 0:"none",opacity:(u=de.hide)!==null&&u!==void 0&&u.referenceHidden?0:void 0}}))))}),y2="PopperArrow",w2={top:"bottom",right:"left",bottom:"top",left:"right"},_2=c.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=m2(y2,n),a=w2[i.placedSide];return c.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},c.createElement(Dx,be({},o,{ref:r,style:{...o.style,display:"block"}})))});function E2(e){return e!==null}const x2=e=>({name:"transformOrigin",options:e,fn(t){var r,n,o,i,a;const{placement:s,rects:l,middlewareData:u}=t,d=((r=u.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,p=d?0:e.arrowWidth,h=d?0:e.arrowHeight,[v,g]=Kh(s),y={start:"0%",center:"50%",end:"100%"}[g],m=((n=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&n!==void 0?n:0)+p/2,w=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+h/2;let E="",x="";return v==="bottom"?(E=d?y:`${m}px`,x=`${-h}px`):v==="top"?(E=d?y:`${m}px`,x=`${l.floating.height+h}px`):v==="right"?(E=`${-h}px`,x=d?y:`${w}px`):v==="left"&&(E=`${l.floating.width+h}px`,x=d?y:`${w}px`),{data:{x:E,y:x}}}});function Kh(e){const[t,r="center"]=e.split("-");return[t,r]}const S2=p2,$2=v2,C2=b2,O2=_2,A2=c.forwardRef((e,t)=>{var r;const{container:n=globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,...o}=e;return n?on.createPortal(c.createElement(Ve.div,rt({},o,{ref:t})),n):null}),T2=["Enter"," "],I2=["ArrowDown","PageUp","Home"],qh=["ArrowUp","PageDown","End"],P2=[...I2,...qh],ja="Menu",[cc,k2,N2]=nh(ja),[Ln,Yh]=Tr(ja,[N2,Hh,kh]),Ba=Hh(),Jh=kh(),[D2,gi]=Ln(ja),[L2,uc]=Ln(ja),M2=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:o,onOpenChange:i,modal:a=!0}=e,s=Ba(t),[l,u]=c.useState(null),f=c.useRef(!1),d=Pr(i),p=oh(o);return c.useEffect(()=>{const h=()=>{f.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},v=()=>f.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),c.createElement(S2,s,c.createElement(D2,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u},c.createElement(L2,{scope:t,onClose:c.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:p,modal:a},n)))},F2=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Ba(r);return c.createElement($2,be({},o,n,{ref:t}))}),Xh="MenuPortal",[j2,B2]=Ln(Xh,{forceMount:void 0}),R2=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:o}=e,i=gi(Xh,t);return c.createElement(j2,{scope:t,forceMount:r},c.createElement(Ma,{present:r||i.open},c.createElement(A2,{asChild:!0,container:o},n)))},hn="MenuContent",[U2,Zh]=Ln(hn),W2=c.forwardRef((e,t)=>{const r=B2(hn,e.__scopeMenu),{forceMount:n=r.forceMount,...o}=e,i=gi(hn,e.__scopeMenu),a=uc(hn,e.__scopeMenu);return c.createElement(cc.Provider,{scope:e.__scopeMenu},c.createElement(Ma,{present:n||i.open},c.createElement(cc.Slot,{scope:e.__scopeMenu},a.modal?c.createElement(V2,be({},o,{ref:t})):c.createElement(H2,be({},o,{ref:t})))))}),V2=c.forwardRef((e,t)=>{const r=gi(hn,e.__scopeMenu),n=c.useRef(null),o=Qt(t,n);return c.useEffect(()=>{const i=n.current;if(i)return Up(i)},[]),c.createElement(Qh,be({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:at(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)}))}),H2=c.forwardRef((e,t)=>{const r=gi(hn,e.__scopeMenu);return c.createElement(Qh,be({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)}))}),Qh=c.forwardRef((e,t)=>{const{__scopeMenu:r,loop:n=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:h,disableOutsideScroll:v,...g}=e,y=gi(hn,r),m=uc(hn,r),w=Ba(r),E=Jh(r),x=k2(r),[P,I]=c.useState(null),S=c.useRef(null),A=Qt(t,S,y.onContentChange),k=c.useRef(0),j=c.useRef(""),D=c.useRef(0),N=c.useRef(null),J=c.useRef("right"),K=c.useRef(0),Y=v?Bp:c.Fragment,te=v?{as:xt,allowPinchZoom:!0}:void 0,oe=ae=>{var ve,ce;const q=j.current+ae,V=x().filter(R=>!R.disabled),re=document.activeElement,de=(ve=V.find(R=>R.ref.current===re))===null||ve===void 0?void 0:ve.textValue,U=V.map(R=>R.textValue),z=nS(U,q,de),M=(ce=V.find(R=>R.textValue===z))===null||ce===void 0?void 0:ce.ref.current;(function R(G){j.current=G,window.clearTimeout(k.current),G!==""&&(k.current=window.setTimeout(()=>R(""),1e3))})(q),M&&setTimeout(()=>M.focus())};c.useEffect(()=>()=>window.clearTimeout(k.current),[]),hx();const le=c.useCallback(ae=>{var ve,ce;return J.current===((ve=N.current)===null||ve===void 0?void 0:ve.side)&&iS(ae,(ce=N.current)===null||ce===void 0?void 0:ce.area)},[]);return c.createElement(U2,{scope:r,searchRef:j,onItemEnter:c.useCallback(ae=>{le(ae)&&ae.preventDefault()},[le]),onItemLeave:c.useCallback(ae=>{var ve;le(ae)||((ve=S.current)===null||ve===void 0||ve.focus(),I(null))},[le]),onTriggerLeave:c.useCallback(ae=>{le(ae)&&ae.preventDefault()},[le]),pointerGraceTimerRef:D,onPointerGraceIntentChange:c.useCallback(ae=>{N.current=ae},[])},c.createElement(Y,te,c.createElement(i2,{asChild:!0,trapped:o,onMountAutoFocus:at(i,ae=>{var ve;ae.preventDefault(),(ve=S.current)===null||ve===void 0||ve.focus()}),onUnmountAutoFocus:a},c.createElement(r2,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:h},c.createElement(Xx,be({asChild:!0},E,{dir:m.dir,orientation:"vertical",loop:n,currentTabStopId:P,onCurrentTabStopIdChange:I,onEntryFocus:at(l,ae=>{m.isUsingKeyboardRef.current||ae.preventDefault()})}),c.createElement(C2,be({role:"menu","aria-orientation":"vertical","data-state":eS(y.open),"data-radix-menu-content":"",dir:m.dir},w,g,{ref:A,style:{outline:"none",...g.style},onKeyDown:at(g.onKeyDown,ae=>{const ce=ae.target.closest("[data-radix-menu-content]")===ae.currentTarget,q=ae.ctrlKey||ae.altKey||ae.metaKey,V=ae.key.length===1;ce&&(ae.key==="Tab"&&ae.preventDefault(),!q&&V&&oe(ae.key));const re=S.current;if(ae.target!==re||!P2.includes(ae.key))return;ae.preventDefault();const U=x().filter(z=>!z.disabled).map(z=>z.ref.current);qh.includes(ae.key)&&U.reverse(),tS(U)}),onBlur:at(e.onBlur,ae=>{ae.currentTarget.contains(ae.target)||(window.clearTimeout(k.current),j.current="")}),onPointerMove:at(e.onPointerMove,dc(ae=>{const ve=ae.target,ce=K.current!==ae.clientX;if(ae.currentTarget.contains(ve)&&ce){const q=ae.clientX>K.current?"right":"left";J.current=q,K.current=ae.clientX}}))})))))))}),z2=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.createElement(Ve.div,be({role:"group"},n,{ref:t}))}),G2=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.createElement(Ve.div,be({},n,{ref:t}))}),fc="MenuItem",ev="menu.itemSelect",tv=c.forwardRef((e,t)=>{const{disabled:r=!1,onSelect:n,...o}=e,i=c.useRef(null),a=uc(fc,e.__scopeMenu),s=Zh(fc,e.__scopeMenu),l=Qt(t,i),u=c.useRef(!1),f=()=>{const d=i.current;if(!r&&d){const p=new CustomEvent(ev,{bubbles:!0,cancelable:!0});d.addEventListener(ev,h=>n?.(h),{once:!0}),Rd(d,p),p.defaultPrevented?u.current=!1:a.onClose()}};return c.createElement(K2,be({},o,{ref:l,disabled:r,onClick:at(e.onClick,f),onPointerDown:d=>{var p;(p=e.onPointerDown)===null||p===void 0||p.call(e,d),u.current=!0},onPointerUp:at(e.onPointerUp,d=>{var p;u.current||(p=d.currentTarget)===null||p===void 0||p.click()}),onKeyDown:at(e.onKeyDown,d=>{const p=s.searchRef.current!=="";r||p&&d.key===" "||T2.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})}))}),K2=c.forwardRef((e,t)=>{const{__scopeMenu:r,disabled:n=!1,textValue:o,...i}=e,a=Zh(fc,r),s=Jh(r),l=c.useRef(null),u=Qt(t,l),[f,d]=c.useState(!1),[p,h]=c.useState("");return c.useEffect(()=>{const v=l.current;if(v){var g;h(((g=v.textContent)!==null&&g!==void 0?g:"").trim())}},[i.children]),c.createElement(cc.ItemSlot,{scope:r,disabled:n,textValue:o??p},c.createElement(Zx,be({asChild:!0},s,{focusable:!n}),c.createElement(Ve.div,be({role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":n||void 0,"data-disabled":n?"":void 0},i,{ref:u,onPointerMove:at(e.onPointerMove,dc(v=>{n?a.onItemLeave(v):(a.onItemEnter(v),v.defaultPrevented||v.currentTarget.focus())})),onPointerLeave:at(e.onPointerLeave,dc(v=>a.onItemLeave(v))),onFocus:at(e.onFocus,()=>d(!0)),onBlur:at(e.onBlur,()=>d(!1))}))))}),q2=c.forwardRef((e,t)=>{const{checked:r=!1,onCheckedChange:n,...o}=e;return c.createElement(Y2,{scope:e.__scopeMenu,checked:r},c.createElement(tv,be({role:"menuitemcheckbox","aria-checked":Ra(r)?"mixed":r},o,{ref:t,"data-state":nv(r),onSelect:at(o.onSelect,()=>n?.(Ra(r)?!0:!r),{checkForDefaultPrevented:!1})})))});Ln("MenuRadioGroup",{value:void 0,onValueChange:()=>{}});const rv="MenuItemIndicator",[Y2,J2]=Ln(rv,{checked:!1}),X2=c.forwardRef((e,t)=>{const{__scopeMenu:r,forceMount:n,...o}=e,i=J2(rv,r);return c.createElement(Ma,{present:n||Ra(i.checked)||i.checked===!0},c.createElement(Ve.span,be({},o,{ref:t,"data-state":nv(i.checked)})))}),Z2=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e;return c.createElement(Ve.div,be({role:"separator","aria-orientation":"horizontal"},n,{ref:t}))}),Q2=c.forwardRef((e,t)=>{const{__scopeMenu:r,...n}=e,o=Ba(r);return c.createElement(O2,be({},o,n,{ref:t}))});Ln("MenuSub");function eS(e){return e?"open":"closed"}function Ra(e){return e==="indeterminate"}function nv(e){return Ra(e)?"indeterminate":e?"checked":"unchecked"}function tS(e){const t=document.activeElement;for(const r of e)if(r===t||(r.focus(),document.activeElement!==t))return}function rS(e,t){return e.map((r,n)=>e[(t+n)%e.length])}function nS(e,t,r){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=r?e.indexOf(r):-1;let a=rS(e,Math.max(i,0));o.length===1&&(a=a.filter(u=>u!==r));const l=a.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==r?l:void 0}function oS(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,l=t[i].y,u=t[a].x,f=t[a].y;l>n!=f>n&&r<(u-s)*(n-l)/(f-l)+s&&(o=!o)}return o}function iS(e,t){if(!t)return!1;const r={x:e.clientX,y:e.clientY};return oS(r,t)}function dc(e){return t=>t.pointerType==="mouse"?e(t):void 0}const aS=M2,sS=F2,lS=R2,cS=W2,uS=z2,fS=G2,dS=tv,pS=q2,hS=X2,vS=Z2,gS=Q2,ov="DropdownMenu",[mS,L9]=Tr(ov,[Yh]),mr=Yh(),[bS,iv]=mS(ov),yS=e=>{const{__scopeDropdownMenu:t,children:r,dir:n,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,l=mr(t),u=c.useRef(null),[f=!1,d]=Gr({prop:o,defaultProp:i,onChange:a});return c.createElement(bS,{scope:t,triggerId:Jl(),triggerRef:u,contentId:Jl(),open:f,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(p=>!p),[d]),modal:s},c.createElement(aS,be({},l,{open:f,onOpenChange:d,dir:n,modal:s}),r))},wS="DropdownMenuTrigger",_S=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,disabled:n=!1,...o}=e,i=iv(wS,r),a=mr(r);return c.createElement(sS,be({asChild:!0},a),c.createElement(Ve.button,be({type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":n?"":void 0,disabled:n},o,{ref:Al(t,i.triggerRef),onPointerDown:at(e.onPointerDown,s=>{!n&&s.button===0&&s.ctrlKey===!1&&(i.onOpenToggle(),i.open||s.preventDefault())}),onKeyDown:at(e.onKeyDown,s=>{n||(["Enter"," "].includes(s.key)&&i.onOpenToggle(),s.key==="ArrowDown"&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})))}),ES=e=>{const{__scopeDropdownMenu:t,...r}=e,n=mr(t);return c.createElement(lS,be({},n,r))},xS="DropdownMenuContent",SS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=iv(xS,r),i=mr(r),a=c.useRef(!1);return c.createElement(cS,be({id:o.contentId,"aria-labelledby":o.triggerId},i,n,{ref:t,onCloseAutoFocus:at(e.onCloseAutoFocus,s=>{var l;a.current||(l=o.triggerRef.current)===null||l===void 0||l.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:at(e.onInteractOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,f=l.button===2||u;(!o.modal||f)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}),$S=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=mr(r);return c.createElement(uS,be({},o,n,{ref:t}))}),CS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=mr(r);return c.createElement(fS,be({},o,n,{ref:t}))}),OS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=mr(r);return c.createElement(dS,be({},o,n,{ref:t}))}),AS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=mr(r);return c.createElement(pS,be({},o,n,{ref:t}))}),TS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=mr(r);return c.createElement(hS,be({},o,n,{ref:t}))}),IS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=mr(r);return c.createElement(vS,be({},o,n,{ref:t}))}),PS=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:r,...n}=e,o=mr(r);return c.createElement(gS,be({},o,n,{ref:t}))}),kS=_S,NS=ES,DS=SS,LS=$S,MS=CS,FS=OS,jS=AS,BS=TS,RS=IS,US=PS;function WS(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function av(e){const[t,r]=c.useState(void 0);return Ar(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const i=o[0];let a,s;if("borderBoxSize"in i){const l=i.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;r({width:a,height:s})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}const sv="Checkbox",[VS,M9]=un(sv),[HS,zS]=VS(sv),GS=c.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:u,...f}=e,[d,p]=c.useState(null),h=Ct(t,E=>p(E)),v=c.useRef(!1),g=d?!!d.closest("form"):!0,[y=!1,m]=wa({prop:o,defaultProp:i,onChange:u}),w=c.useRef(y);return c.useEffect(()=>{const E=d?.form;if(E){const x=()=>m(w.current);return E.addEventListener("reset",x),()=>E.removeEventListener("reset",x)}},[d,m]),c.createElement(HS,{scope:r,state:y,disabled:s},c.createElement(ut.button,rt({type:"button",role:"checkbox","aria-checked":Mn(y)?"mixed":y,"aria-required":a,"data-state":lv(y),"data-disabled":s?"":void 0,disabled:s,value:l},f,{ref:h,onKeyDown:dt(e.onKeyDown,E=>{E.key==="Enter"&&E.preventDefault()}),onClick:dt(e.onClick,E=>{m(x=>Mn(x)?!0:!x),g&&(v.current=E.isPropagationStopped(),v.current||E.stopPropagation())})})),g&&c.createElement(YS,{control:d,bubbles:!v.current,name:n,value:l,checked:y,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),KS="CheckboxIndicator",qS=c.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,i=zS(KS,r);return c.createElement(or,{present:n||Mn(i.state)||i.state===!0},c.createElement(ut.span,rt({"data-state":lv(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))}),YS=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,i=c.useRef(null),a=WS(r),s=av(t);return c.useEffect(()=>{const l=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==r&&d){const p=new Event("click",{bubbles:n});l.indeterminate=Mn(r),d.call(l,Mn(r)?!1:r),l.dispatchEvent(p)}},[a,r,n]),c.createElement("input",rt({type:"checkbox","aria-hidden":!0,defaultChecked:Mn(r)?!1:r},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Mn(e){return e==="indeterminate"}function lv(e){return Mn(e)?"indeterminate":e?"checked":"unchecked"}const JS=GS,XS=qS;function ZS(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const cv="Switch",[QS,F9]=Tr(cv),[e$,t$]=QS(cv),r$=c.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:i,required:a,disabled:s,value:l="on",onCheckedChange:u,...f}=e,[d,p]=c.useState(null),h=Qt(t,w=>p(w)),v=c.useRef(!1),g=d?!!d.closest("form"):!0,[y=!1,m]=Gr({prop:o,defaultProp:i,onChange:u});return c.createElement(e$,{scope:r,checked:y,disabled:s},c.createElement(Ve.button,be({type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":uv(y),"data-disabled":s?"":void 0,disabled:s,value:l},f,{ref:h,onClick:at(e.onClick,w=>{m(E=>!E),g&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})})),g&&c.createElement(i$,{control:d,bubbles:!v.current,name:n,value:l,checked:y,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),n$="SwitchThumb",o$=c.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=t$(n$,r);return c.createElement(Ve.span,be({"data-state":uv(o.checked),"data-disabled":o.disabled?"":void 0},n,{ref:t}))}),i$=e=>{const{control:t,checked:r,bubbles:n=!0,...o}=e,i=c.useRef(null),a=ZS(r),s=Ih(t);return c.useEffect(()=>{const l=i.current,u=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(u,"checked").set;if(a!==r&&d){const p=new Event("click",{bubbles:n});d.call(l,r),l.dispatchEvent(p)}},[a,r,n]),c.createElement("input",be({type:"checkbox","aria-hidden":!0,defaultChecked:r},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function uv(e){return e?"checked":"unchecked"}const a$=r$,s$=o$;/*! *****************************************************************************
|
|
44
|
+
Copyright (c) Microsoft Corporation.
|
|
45
|
+
|
|
46
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
47
|
+
purpose with or without fee is hereby granted.
|
|
48
|
+
|
|
49
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
50
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
51
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
52
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
53
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
54
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
55
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
56
|
+
***************************************************************************** */function fv(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var l$=function(e){var t,r=e.current,n=e.previous,o=e.value;if(r[0]!==r[1]||typeof r[0]!="number"||typeof r[1]!="number")return null;var i=r[0],a=r[1];return i>0&&n[0]===i&&n[1]===i+1?[i-1,a]:!((t=o[i])===null||t===void 0)&&t.length?[i,a+1]:null},pc=function(e){return[+e.selectionStart,+e.selectionEnd]},dv=[0,0],Ua=function(e,t){return e[0]===t[0]&&e[1]===t[1]},c$=function(e){var t=e.inputRef,r=e.previousRef,n=e.setSelection;return c.useCallback(function(o){var i=o.type,a=t.current,s=r.current;if(!(!s||!a)){var l=a.selectionDirection,u=a.value,f=pc(a),d=function(p){Ua(p,s)&&(Ua(p,dv)||Ua(p,pc(a)))||(r.current=p,n(function(h){return Ua(h,p)?h:p}),a.setSelectionRange.apply(a,fv(fv([],p,!1),[l||void 0],!1)))};if(i==="selectionchange"&&document.activeElement!==a)return d([u.length,u.length]);d(l$({previous:s,current:f,direction:l,value:u})||f)}},[t,r,n])},u$=function(e){var t=e.inputRef,r=e.previousRef,n=e.handler;c.useLayoutEffect(function(){var o=t.current;r.current===void 0&&o&&(r.current=pc(o));var i=n;return o?.addEventListener("input",i),document.addEventListener("selectionchange",i),function(){o?.removeEventListener("input",i),document.removeEventListener("selectionchange",i)}},[t,n,r])},f$=function(e){var t=c.useState(dv),r=t[0],n=t[1],o=c.useRef(),i=c$({inputRef:e,previousRef:o,setSelection:n});return u$({inputRef:e,previousRef:o,handler:i}),r},hc={exports:{}},mi={};/**
|
|
57
|
+
* @license React
|
|
58
|
+
* react-jsx-runtime.production.min.js
|
|
59
|
+
*
|
|
60
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
61
|
+
*
|
|
62
|
+
* This source code is licensed under the MIT license found in the
|
|
63
|
+
* LICENSE file in the root directory of this source tree.
|
|
64
|
+
*/var pv;function d$(){if(pv)return mi;pv=1;var e=c,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function a(s,l,u){var f,d={},p=null,h=null;u!==void 0&&(p=""+u),l.key!==void 0&&(p=""+l.key),l.ref!==void 0&&(h=l.ref);for(f in l)n.call(l,f)&&!i.hasOwnProperty(f)&&(d[f]=l[f]);if(s&&s.defaultProps)for(f in l=s.defaultProps,l)d[f]===void 0&&(d[f]=l[f]);return{$$typeof:t,type:s,key:p,ref:h,props:d,_owner:o.current}}return mi.Fragment=r,mi.jsx=a,mi.jsxs=a,mi}var bi={};/**
|
|
65
|
+
* @license React
|
|
66
|
+
* react-jsx-runtime.development.js
|
|
67
|
+
*
|
|
68
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
69
|
+
*
|
|
70
|
+
* This source code is licensed under the MIT license found in the
|
|
71
|
+
* LICENSE file in the root directory of this source tree.
|
|
72
|
+
*/var hv;function p$(){return hv||(hv=1,process.env.NODE_ENV!=="production"&&function(){var e=c,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen"),v=Symbol.iterator,g="@@iterator";function y(H){if(H===null||typeof H!="object")return null;var fe=v&&H[v]||H[g];return typeof fe=="function"?fe:null}var m=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(H){{for(var fe=arguments.length,we=new Array(fe>1?fe-1:0),Ae=1;Ae<fe;Ae++)we[Ae-1]=arguments[Ae];E("error",H,we)}}function E(H,fe,we){{var Ae=m.ReactDebugCurrentFrame,ze=Ae.getStackAddendum();ze!==""&&(fe+="%s",we=we.concat([ze]));var Fe=we.map(function(Be){return String(Be)});Fe.unshift("Warning: "+fe),Function.prototype.apply.call(console[H],console,Fe)}}var x=!1,P=!1,I=!1,S=!1,A=!1,k;k=Symbol.for("react.module.reference");function j(H){return!!(typeof H=="string"||typeof H=="function"||H===n||H===i||A||H===o||H===u||H===f||S||H===h||x||P||I||typeof H=="object"&&H!==null&&(H.$$typeof===p||H.$$typeof===d||H.$$typeof===a||H.$$typeof===s||H.$$typeof===l||H.$$typeof===k||H.getModuleId!==void 0))}function D(H,fe,we){var Ae=H.displayName;if(Ae)return Ae;var ze=fe.displayName||fe.name||"";return ze!==""?we+"("+ze+")":we}function N(H){return H.displayName||"Context"}function J(H){if(H==null)return null;if(typeof H.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof H=="function")return H.displayName||H.name||null;if(typeof H=="string")return H;switch(H){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if(typeof H=="object")switch(H.$$typeof){case s:var fe=H;return N(fe)+".Consumer";case a:var we=H;return N(we._context)+".Provider";case l:return D(H,H.render,"ForwardRef");case d:var Ae=H.displayName||null;return Ae!==null?Ae:J(H.type)||"Memo";case p:{var ze=H,Fe=ze._payload,Be=ze._init;try{return J(Be(Fe))}catch{return null}}}return null}var K=Object.assign,Y=0,te,oe,le,ae,ve,ce,q;function V(){}V.__reactDisabledLog=!0;function re(){{if(Y===0){te=console.log,oe=console.info,le=console.warn,ae=console.error,ve=console.group,ce=console.groupCollapsed,q=console.groupEnd;var H={configurable:!0,enumerable:!0,value:V,writable:!0};Object.defineProperties(console,{info:H,log:H,warn:H,error:H,group:H,groupCollapsed:H,groupEnd:H})}Y++}}function de(){{if(Y--,Y===0){var H={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:K({},H,{value:te}),info:K({},H,{value:oe}),warn:K({},H,{value:le}),error:K({},H,{value:ae}),group:K({},H,{value:ve}),groupCollapsed:K({},H,{value:ce}),groupEnd:K({},H,{value:q})})}Y<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var U=m.ReactCurrentDispatcher,z;function M(H,fe,we){{if(z===void 0)try{throw Error()}catch(ze){var Ae=ze.stack.trim().match(/\n( *(at )?)/);z=Ae&&Ae[1]||""}return`
|
|
73
|
+
`+z+H}}var R=!1,G;{var O=typeof WeakMap=="function"?WeakMap:Map;G=new O}function T(H,fe){if(!H||R)return"";{var we=G.get(H);if(we!==void 0)return we}var Ae;R=!0;var ze=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Fe;Fe=U.current,U.current=null,re();try{if(fe){var Be=function(){throw Error()};if(Object.defineProperty(Be.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Be,[])}catch(It){Ae=It}Reflect.construct(H,[],Be)}else{try{Be.call()}catch(It){Ae=It}H.call(Be.prototype)}}else{try{throw Error()}catch(It){Ae=It}H()}}catch(It){if(It&&Ae&&typeof It.stack=="string"){for(var je=It.stack.split(`
|
|
74
|
+
`),Tt=Ae.stack.split(`
|
|
75
|
+
`),gt=je.length-1,bt=Tt.length-1;gt>=1&&bt>=0&&je[gt]!==Tt[bt];)bt--;for(;gt>=1&&bt>=0;gt--,bt--)if(je[gt]!==Tt[bt]){if(gt!==1||bt!==1)do if(gt--,bt--,bt<0||je[gt]!==Tt[bt]){var Rt=`
|
|
76
|
+
`+je[gt].replace(" at new "," at ");return H.displayName&&Rt.includes("<anonymous>")&&(Rt=Rt.replace("<anonymous>",H.displayName)),typeof H=="function"&&G.set(H,Rt),Rt}while(gt>=1&&bt>=0);break}}}finally{R=!1,U.current=Fe,de(),Error.prepareStackTrace=ze}var Zt=H?H.displayName||H.name:"",ei=Zt?M(Zt):"";return typeof H=="function"&&G.set(H,ei),ei}function Z(H,fe,we){return T(H,!1)}function ne(H){var fe=H.prototype;return!!(fe&&fe.isReactComponent)}function pe(H,fe,we){if(H==null)return"";if(typeof H=="function")return T(H,ne(H));if(typeof H=="string")return M(H);switch(H){case u:return M("Suspense");case f:return M("SuspenseList")}if(typeof H=="object")switch(H.$$typeof){case l:return Z(H.render);case d:return pe(H.type,fe,we);case p:{var Ae=H,ze=Ae._payload,Fe=Ae._init;try{return pe(Fe(ze),fe,we)}catch{}}}return""}var me=Object.prototype.hasOwnProperty,xe={},Ee=m.ReactDebugCurrentFrame;function ie(H){if(H){var fe=H._owner,we=pe(H.type,H._source,fe?fe.type:null);Ee.setExtraStackFrame(we)}else Ee.setExtraStackFrame(null)}function Ne(H,fe,we,Ae,ze){{var Fe=Function.call.bind(me);for(var Be in H)if(Fe(H,Be)){var je=void 0;try{if(typeof H[Be]!="function"){var Tt=Error((Ae||"React class")+": "+we+" type `"+Be+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof H[Be]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Tt.name="Invariant Violation",Tt}je=H[Be](fe,Be,Ae,we,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(gt){je=gt}je&&!(je instanceof Error)&&(ie(ze),w("%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).",Ae||"React class",we,Be,typeof je),ie(null)),je instanceof Error&&!(je.message in xe)&&(xe[je.message]=!0,ie(ze),w("Failed %s type: %s",we,je.message),ie(null))}}}var ft=Array.isArray;function Te(H){return ft(H)}function Me(H){{var fe=typeof Symbol=="function"&&Symbol.toStringTag,we=fe&&H[Symbol.toStringTag]||H.constructor.name||"Object";return we}}function mt(H){try{return $e(H),!1}catch{return!0}}function $e(H){return""+H}function De(H){if(mt(H))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Me(H)),$e(H)}var C=m.ReactCurrentOwner,b={key:!0,ref:!0,__self:!0,__source:!0},_,L,W;W={};function X(H){if(me.call(H,"ref")){var fe=Object.getOwnPropertyDescriptor(H,"ref").get;if(fe&&fe.isReactWarning)return!1}return H.ref!==void 0}function se(H){if(me.call(H,"key")){var fe=Object.getOwnPropertyDescriptor(H,"key").get;if(fe&&fe.isReactWarning)return!1}return H.key!==void 0}function Pe(H,fe){if(typeof H.ref=="string"&&C.current&&fe&&C.current.stateNode!==fe){var we=J(C.current.type);W[we]||(w('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',J(C.current.type),H.ref),W[we]=!0)}}function ot(H,fe){{var we=function(){_||(_=!0,w("%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)",fe))};we.isReactWarning=!0,Object.defineProperty(H,"key",{get:we,configurable:!0})}}function Le(H,fe){{var we=function(){L||(L=!0,w("%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)",fe))};we.isReactWarning=!0,Object.defineProperty(H,"ref",{get:we,configurable:!0})}}var qe=function(H,fe,we,Ae,ze,Fe,Be){var je={$$typeof:t,type:H,key:fe,ref:we,props:Be,_owner:Fe};return je._store={},Object.defineProperty(je._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(je,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ae}),Object.defineProperty(je,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ze}),Object.freeze&&(Object.freeze(je.props),Object.freeze(je)),je};function Je(H,fe,we,Ae,ze){{var Fe,Be={},je=null,Tt=null;we!==void 0&&(De(we),je=""+we),se(fe)&&(De(fe.key),je=""+fe.key),X(fe)&&(Tt=fe.ref,Pe(fe,ze));for(Fe in fe)me.call(fe,Fe)&&!b.hasOwnProperty(Fe)&&(Be[Fe]=fe[Fe]);if(H&&H.defaultProps){var gt=H.defaultProps;for(Fe in gt)Be[Fe]===void 0&&(Be[Fe]=gt[Fe])}if(je||Tt){var bt=typeof H=="function"?H.displayName||H.name||"Unknown":H;je&&ot(Be,bt),Tt&&Le(Be,bt)}return qe(H,je,Tt,ze,Ae,C.current,Be)}}var tn=m.ReactCurrentOwner,Yo=m.ReactDebugCurrentFrame;function fr(H){if(H){var fe=H._owner,we=pe(H.type,H._source,fe?fe.type:null);Yo.setExtraStackFrame(we)}else Yo.setExtraStackFrame(null)}var Gt;Gt=!1;function ro(H){return typeof H=="object"&&H!==null&&H.$$typeof===t}function kt(){{if(tn.current){var H=J(tn.current.type);if(H)return`
|
|
77
|
+
|
|
78
|
+
Check the render method of \``+H+"`."}return""}}function ea(H){{if(H!==void 0){var fe=H.fileName.replace(/^.*[\\\/]/,""),we=H.lineNumber;return`
|
|
79
|
+
|
|
80
|
+
Check your code at `+fe+":"+we+"."}return""}}var Jo={};function ta(H){{var fe=kt();if(!fe){var we=typeof H=="string"?H:H.displayName||H.name;we&&(fe=`
|
|
81
|
+
|
|
82
|
+
Check the top-level render call using <`+we+">.")}return fe}}function Xo(H,fe){{if(!H._store||H._store.validated||H.key!=null)return;H._store.validated=!0;var we=ta(fe);if(Jo[we])return;Jo[we]=!0;var Ae="";H&&H._owner&&H._owner!==tn.current&&(Ae=" It was passed a child from "+J(H._owner.type)+"."),fr(H),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',we,Ae),fr(null)}}function Zo(H,fe){{if(typeof H!="object")return;if(Te(H))for(var we=0;we<H.length;we++){var Ae=H[we];ro(Ae)&&Xo(Ae,fe)}else if(ro(H))H._store&&(H._store.validated=!0);else if(H){var ze=y(H);if(typeof ze=="function"&&ze!==H.entries)for(var Fe=ze.call(H),Be;!(Be=Fe.next()).done;)ro(Be.value)&&Xo(Be.value,fe)}}}function $t(H){{var fe=H.type;if(fe==null||typeof fe=="string")return;var we;if(typeof fe=="function")we=fe.propTypes;else if(typeof fe=="object"&&(fe.$$typeof===l||fe.$$typeof===d))we=fe.propTypes;else return;if(we){var Ae=J(fe);Ne(we,H.props,"prop",Ae,H)}else if(fe.PropTypes!==void 0&&!Gt){Gt=!0;var ze=J(fe);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ze||"Unknown")}typeof fe.getDefaultProps=="function"&&!fe.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ra(H){{for(var fe=Object.keys(H.props),we=0;we<fe.length;we++){var Ae=fe[we];if(Ae!=="children"&&Ae!=="key"){fr(H),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ae),fr(null);break}}H.ref!==null&&(fr(H),w("Invalid attribute `ref` supplied to `React.Fragment`."),fr(null))}}function Qo(H,fe,we,Ae,ze,Fe){{var Be=j(H);if(!Be){var je="";(H===void 0||typeof H=="object"&&H!==null&&Object.keys(H).length===0)&&(je+=" 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 Tt=ea(ze);Tt?je+=Tt:je+=kt();var gt;H===null?gt="null":Te(H)?gt="array":H!==void 0&&H.$$typeof===t?(gt="<"+(J(H.type)||"Unknown")+" />",je=" Did you accidentally export a JSX literal instead of a component?"):gt=typeof H,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",gt,je)}var bt=Je(H,fe,we,ze,Fe);if(bt==null)return bt;if(Be){var Rt=fe.children;if(Rt!==void 0)if(Ae)if(Te(Rt)){for(var Zt=0;Zt<Rt.length;Zt++)Zo(Rt[Zt],H);Object.freeze&&Object.freeze(Rt)}else w("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 Zo(Rt,H)}return H===n?ra(bt):$t(bt),bt}}function na(H,fe,we){return Qo(H,fe,we,!0)}function oa(H,fe,we){return Qo(H,fe,we,!1)}var ia=oa,Kt=na;bi.Fragment=n,bi.jsx=ia,bi.jsxs=Kt}()),bi}process.env.NODE_ENV==="production"?hc.exports=d$():hc.exports=p$();var tr=hc.exports;const vv=c.createContext(6),gv=()=>c.useContext(vv),mv=c.createContext(null),h$=()=>c.useContext(mv),v$=e=>tr.jsx(vv.Provider,{value:e.length,children:tr.jsx(mv.Provider,{value:e.selection,children:e.children})}),g$=(e,[t,r])=>typeof t!="number"||typeof r!="number"?null:t===r&&t===e?"cursor":e>=t&&e<r?"selected":null,m$=(e,[t,r])=>e<t?-1:e>=r?1:0,b$=(e,t)=>Array(e).fill(null).map((n,o)=>({state:g$(o,t),position:m$(o,t)})),y$=e=>tr.jsx("div",{...e,"aria-hidden":!0,style:{position:"absolute",left:0,right:0,top:0,bottom:0,display:"flex",justifyContent:"space-between",zIndex:-1,...e.style}}),w$=e=>{e.preventDefault(),e.stopPropagation(),e.currentTarget.scrollTop=0,e.currentTarget.scrollLeft=0},_$=e=>tr.jsx("div",{...e,onScroll:w$,style:{...e.style,height:"100%",overflow:"hidden"}}),E$=c.forwardRef((e,t)=>{const r=gv();return tr.jsx("input",{...e,width:void 0,minLength:r,maxLength:r,ref:t,style:{...e.style,font:"inherit",letterSpacing:"inherit",textIndent:"inherit",background:"transparent",appearance:"none",display:"block",width:e.width||"200%",padding:"0",margin:"0",border:"0 solid transparent",outline:"none"}})}),x$=e=>{const t=h$(),r=gv(),n=t,i=b$(r,n).map(({state:a,position:s},l)=>e.children({index:l,state:a,position:s,selection:n}));return tr.jsx(tr.Fragment,{children:i})},S$=({renderSegment:e,length:t=6,fontFamily:r="'SF Mono', SFMono-Regular, ui-monospace, Menlo, Monaco, 'Cascadia Mono', 'Segoe UI Mono', 'Roboto Mono', monospace",fontSize:n="2rem",padding:o="0.25rem",paddingY:i=o,paddingX:a=o,spacing:s="0.5rem",characterWidth:l="1ch",style:u,className:f,inputClassName:d,inputStyle:p,segmentWidth:h=`calc(${l} + ${a} * 2)`,inputWidth:v=`calc(100% + ${h} + ${s})`,inputRef:g,scrollWrapperClassName:y,segmentWrapperClassName:m,rootProps:w,...E})=>{const x=f$(g),P={...u,position:"relative",width:`calc(${h} * ${t} + ${s} * ${t-1})`,fontFamily:r,fontSize:n,textIndent:a,letterSpacing:`calc(${a} * 2 + ${s})`,lineHeight:`calc(${n} + ${i} * 2)`,zIndex:0},I={className:d,style:p,ref:g};return tr.jsx(v$,{length:t,selection:x,children:tr.jsxs("div",{...w,className:f,style:P,children:[tr.jsx(y$,{className:m,children:tr.jsx(x$,{children:e})}),tr.jsx(_$,{className:y,onMouseDownCapture:S=>{if(S.button!==0||S.ctrlKey||S.shiftKey||S.metaKey||!(S.currentTarget instanceof HTMLElement)||!(g.current instanceof HTMLInputElement))return;S.stopPropagation(),S.preventDefault();const{left:A,width:k}=S.currentTarget.getBoundingClientRect(),j=S.clientX-A,D=Math.floor(j/k*t);document.activeElement!==g.current&&g.current?.focus(),g.current?.setSelectionRange(D,D+1)},onDoubleClickCapture:()=>{g.current?.setSelectionRange(0,t)},children:tr.jsx(E$,{width:v,...E,...I})})]})})},$$=e=>`calc(1ch + ${e} * 2)`;var jt="Input",[C$,j9]=Tr(jt,[]),[O$,rr]=C$(jt),bv=({__inputScope:e,id:t,descriptionId:r,errorMessageId:n,validationValence:o="neutral",children:i})=>{const a=_t("input",t),s=_t("input__description",r),l=_t("input__error-message",n);return c.createElement(O$,{id:a,descriptionId:s,errorMessageId:l,validationValence:o,scope:e},i)};bv.displayName=jt;var A$=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{id:i}=rr(jt,e),a=t?xt:Ve.label;return c.createElement(a,{...n,htmlFor:i,ref:o},r)}),T$=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{descriptionId:i,validationValence:a}=rr(jt,e),s=t?xt:Ve.span;return c.createElement(s,{...n,...a==="error"&&{id:i},ref:o},r)}),I$=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{errorMessageId:i}=rr(jt,e),a=t?xt:Ve.span;return c.createElement(a,{...n,id:i,ref:o},r)}),P$=c.forwardRef((e,t)=>{const{__inputScope:r,asChild:n,children:o,...i}=e,{validationValence:a}=rr(jt,r);if(a==="error")return c.createElement(I$,{...e,ref:t});{const s=n?xt:Ve.span;return c.createElement(s,{...i,ref:t},o)}}),k$=c.forwardRef(({__inputScope:e,asChild:t,children:r,...n},o)=>{const{descriptionId:i,validationValence:a}=rr(jt,e),s=t?xt:Ve.p;return c.createElement(s,{...n,...a!=="error"&&{id:i},ref:o},r)}),N$=c.forwardRef(({__inputScope:e,segmentClassName:t,inputClassName:r,segmentPadding:n="13px",segmentHeight:o="100%",...i},a)=>{const{id:s,validationValence:l,descriptionId:u,errorMessageId:f}=rr(jt,e),d=$$(n),p=Ol(a),h=uw(p),v=c.useCallback(({state:g,index:y})=>c.createElement("div",{key:y,className:t?.({focused:!!(h&&g),validationValence:l}),"data-state":g,style:{width:d,height:o}}),[t,h,l]);return c.createElement(S$,{padding:"8px",spacing:"8px",fontFamily:"",spellCheck:!1,length:6,...i,id:s,"aria-describedby":u,...l==="error"&&{"aria-invalid":"true","aria-errormessage":f},inputRef:p,renderSegment:v,className:r})}),D$=c.forwardRef(({__inputScope:e,...t},r)=>{const{id:n,validationValence:o,descriptionId:i,errorMessageId:a}=rr(jt,e);return c.createElement(Ve.input,{...t,id:n,"aria-describedby":i,...o==="error"&&{"aria-invalid":"true","aria-errormessage":a},ref:r})}),L$=c.forwardRef(({__inputScope:e,...t},r)=>{const{id:n,validationValence:o,descriptionId:i,errorMessageId:a}=rr(jt,e);return c.createElement("textarea",{...t,id:n,"aria-describedby":i,...o==="error"&&{"aria-invalid":"true","aria-errormessage":a},ref:r})});const yv="Collapsible",[M$,B9]=un(yv),[F$,vc]=M$(yv),j$=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[l=!1,u]=wa({prop:n,defaultProp:o,onChange:a});return c.createElement(F$,{scope:r,disabled:i,contentId:fi(),open:l,onOpenToggle:c.useCallback(()=>u(f=>!f),[u])},c.createElement(ut.div,rt({"data-state":gc(l),"data-disabled":i?"":void 0},s,{ref:t})))}),B$="CollapsibleTrigger",R$=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=vc(B$,r);return c.createElement(ut.button,rt({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":gc(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},n,{ref:t,onClick:dt(e.onClick,o.onOpenToggle)}))}),wv="CollapsibleContent",U$=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=vc(wv,e.__scopeCollapsible);return c.createElement(or,{present:r||o.open},({present:i})=>c.createElement(W$,rt({},n,{ref:t,present:i})))}),W$=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...i}=e,a=vc(wv,r),[s,l]=c.useState(n),u=c.useRef(null),f=Ct(t,u),d=c.useRef(0),p=d.current,h=c.useRef(0),v=h.current,g=a.open||s,y=c.useRef(g),m=c.useRef();return c.useEffect(()=>{const w=requestAnimationFrame(()=>y.current=!1);return()=>cancelAnimationFrame(w)},[]),Ar(()=>{const w=u.current;if(w){m.current=m.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const E=w.getBoundingClientRect();d.current=E.height,h.current=E.width,y.current||(w.style.transitionDuration=m.current.transitionDuration,w.style.animationName=m.current.animationName),l(n)}},[a.open,n]),c.createElement(ut.div,rt({"data-state":gc(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!g},i,{ref:f,style:{["--radix-collapsible-content-height"]:p?`${p}px`:void 0,["--radix-collapsible-content-width"]:v?`${v}px`:void 0,...e.style}}),g&&o)});function gc(e){return e?"open":"closed"}const V$=j$,H$=R$,z$=U$;var Wa="List",[G$,R9]=Tr(Wa,[]),[K$,q$]=G$(Wa),_v=c.forwardRef((e,t)=>{const{__listScope:r,variant:n="ordered",selectable:o=!1,itemSizes:i,children:a,...s}=e,l=n==="ordered"?Ve.ol:Ve.ul;return c.createElement(l,{...o&&{role:"listbox","aria-multiselectable":!0},...s,ref:t},c.createElement(K$,{scope:r,variant:n,selectable:o,itemSizes:i},a))});_v.displayName=Wa;var yi="ListItem",[Y$,U9]=Tr(yi,[]),[J$,Ev]=Y$(yi),X$=c.forwardRef(({children:e,asChild:t,__listItemScope:r,...n},o)=>{const{headingId:i}=Ev(yi,r),a=t?xt:Ve.div;return c.createElement(a,{...n,id:i,ref:o},e)}),Z$=H$,Q$=z$,xv=c.forwardRef((e,t)=>{const r=_t("listItem",e.id),{__listScope:n,__listItemScope:o,children:i,selected:a,defaultSelected:s,onSelectedChange:l,open:u,defaultOpen:f,onOpenChange:d,collapsible:p,labelId:h,...v}=e,{selectable:g}=q$(Wa,n),[y=!1,m]=Gr({prop:a,defaultProp:s,onChange:l}),[w=!1,E]=Gr({prop:u,defaultProp:f,onChange:d}),x=_t("listItem__heading",h),P=c.createElement(Ve.li,{...v,id:r,ref:t,"aria-labelledby":x,...g&&{role:"option","aria-selected":!!y},...w&&{"aria-expanded":!0}},i);return c.createElement(J$,{scope:o,headingId:x,open:w,selected:y,setSelected:m},p?c.createElement(V$,{asChild:!0,open:w,onOpenChange:E},P):P)});xv.displayName=yi;function eC(e,[t,r]){return Math.min(r,Math.max(t,e))}function tC(e,t){return c.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const Sv="ScrollArea",[$v,W9]=un(Sv),[rC,ar]=$v(Sv),nC=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,type:n="hover",dir:o,scrollHideDelay:i=600,...a}=e,[s,l]=c.useState(null),[u,f]=c.useState(null),[d,p]=c.useState(null),[h,v]=c.useState(null),[g,y]=c.useState(null),[m,w]=c.useState(0),[E,x]=c.useState(0),[P,I]=c.useState(!1),[S,A]=c.useState(!1),k=Ct(t,D=>l(D)),j=N_(o);return c.createElement(rC,{scope:r,type:n,dir:j,scrollHideDelay:i,scrollArea:s,viewport:u,onViewportChange:f,content:d,onContentChange:p,scrollbarX:h,onScrollbarXChange:v,scrollbarXEnabled:P,onScrollbarXEnabledChange:I,scrollbarY:g,onScrollbarYChange:y,scrollbarYEnabled:S,onScrollbarYEnabledChange:A,onCornerWidthChange:w,onCornerHeightChange:x},c.createElement(ut.div,rt({dir:j},a,{ref:k,style:{position:"relative",["--radix-scroll-area-corner-width"]:m+"px",["--radix-scroll-area-corner-height"]:E+"px",...e.style}})))}),oC="ScrollAreaViewport",iC=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,children:n,...o}=e,i=ar(oC,r),a=c.useRef(null),s=Ct(t,a,i.onViewportChange);return c.createElement(c.Fragment,null,c.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),c.createElement(ut.div,rt({"data-radix-scroll-area-viewport":""},o,{ref:s,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style}}),c.createElement("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"}},n)))}),Kr="ScrollAreaScrollbar",aC=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=ar(Kr,e.__scopeScrollArea),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=o,s=e.orientation==="horizontal";return c.useEffect(()=>(s?i(!0):a(!0),()=>{s?i(!1):a(!1)}),[s,i,a]),o.type==="hover"?c.createElement(sC,rt({},n,{ref:t,forceMount:r})):o.type==="scroll"?c.createElement(lC,rt({},n,{ref:t,forceMount:r})):o.type==="auto"?c.createElement(Cv,rt({},n,{ref:t,forceMount:r})):o.type==="always"?c.createElement(mc,rt({},n,{ref:t})):null}),sC=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=ar(Kr,e.__scopeScrollArea),[i,a]=c.useState(!1);return c.useEffect(()=>{const s=o.scrollArea;let l=0;if(s){const u=()=>{window.clearTimeout(l),a(!0)},f=()=>{l=window.setTimeout(()=>a(!1),o.scrollHideDelay)};return s.addEventListener("pointerenter",u),s.addEventListener("pointerleave",f),()=>{window.clearTimeout(l),s.removeEventListener("pointerenter",u),s.removeEventListener("pointerleave",f)}}},[o.scrollArea,o.scrollHideDelay]),c.createElement(or,{present:r||i},c.createElement(Cv,rt({"data-state":i?"visible":"hidden"},n,{ref:t})))}),lC=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=ar(Kr,e.__scopeScrollArea),i=e.orientation==="horizontal",a=za(()=>l("SCROLL_END"),100),[s,l]=tC("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return c.useEffect(()=>{if(s==="idle"){const u=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(u)}},[s,o.scrollHideDelay,l]),c.useEffect(()=>{const u=o.viewport,f=i?"scrollLeft":"scrollTop";if(u){let d=u[f];const p=()=>{const h=u[f];d!==h&&(l("SCROLL"),a()),d=h};return u.addEventListener("scroll",p),()=>u.removeEventListener("scroll",p)}},[o.viewport,i,l,a]),c.createElement(or,{present:r||s!=="hidden"},c.createElement(mc,rt({"data-state":s==="hidden"?"hidden":"visible"},n,{ref:t,onPointerEnter:dt(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:dt(e.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),Cv=c.forwardRef((e,t)=>{const r=ar(Kr,e.__scopeScrollArea),{forceMount:n,...o}=e,[i,a]=c.useState(!1),s=e.orientation==="horizontal",l=za(()=>{if(r.viewport){const u=r.viewport.offsetWidth<r.viewport.scrollWidth,f=r.viewport.offsetHeight<r.viewport.scrollHeight;a(s?u:f)}},10);return _o(r.viewport,l),_o(r.content,l),c.createElement(or,{present:n||i},c.createElement(mc,rt({"data-state":i?"visible":"hidden"},o,{ref:t})))}),mc=c.forwardRef((e,t)=>{const{orientation:r="vertical",...n}=e,o=ar(Kr,e.__scopeScrollArea),i=c.useRef(null),a=c.useRef(0),[s,l]=c.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=Iv(s.viewport,s.content),f={...n,sizes:s,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:p=>i.current=p,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:p=>a.current=p};function d(p,h){return gC(p,a.current,s,h)}return r==="horizontal"?c.createElement(cC,rt({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollLeft,h=Pv(p,s,o.dir);i.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollLeft=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollLeft=d(p,o.dir))}})):r==="vertical"?c.createElement(uC,rt({},f,{ref:t,onThumbPositionChange:()=>{if(o.viewport&&i.current){const p=o.viewport.scrollTop,h=Pv(p,s);i.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:p=>{o.viewport&&(o.viewport.scrollTop=p)},onDragScroll:p=>{o.viewport&&(o.viewport.scrollTop=d(p))}})):null}),cC=c.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=ar(Kr,e.__scopeScrollArea),[a,s]=c.useState(),l=c.useRef(null),u=Ct(t,l,i.onScrollbarXChange);return c.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),c.createElement(Av,rt({"data-orientation":"horizontal"},o,{ref:u,sizes:r,style:{bottom:0,left:i.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:i.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,["--radix-scroll-area-thumb-width"]:Ha(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.x),onDragScroll:f=>e.onDragScroll(f.x),onWheelScroll:(f,d)=>{if(i.viewport){const p=i.viewport.scrollLeft+f.deltaX;e.onWheelScroll(p),Nv(p,d)&&f.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&n({content:i.viewport.scrollWidth,viewport:i.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Va(a.paddingLeft),paddingEnd:Va(a.paddingRight)}})}}))}),uC=c.forwardRef((e,t)=>{const{sizes:r,onSizesChange:n,...o}=e,i=ar(Kr,e.__scopeScrollArea),[a,s]=c.useState(),l=c.useRef(null),u=Ct(t,l,i.onScrollbarYChange);return c.useEffect(()=>{l.current&&s(getComputedStyle(l.current))},[l]),c.createElement(Av,rt({"data-orientation":"vertical"},o,{ref:u,sizes:r,style:{top:0,right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)",["--radix-scroll-area-thumb-height"]:Ha(r)+"px",...e.style},onThumbPointerDown:f=>e.onThumbPointerDown(f.y),onDragScroll:f=>e.onDragScroll(f.y),onWheelScroll:(f,d)=>{if(i.viewport){const p=i.viewport.scrollTop+f.deltaY;e.onWheelScroll(p),Nv(p,d)&&f.preventDefault()}},onResize:()=>{l.current&&i.viewport&&a&&n({content:i.viewport.scrollHeight,viewport:i.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Va(a.paddingTop),paddingEnd:Va(a.paddingBottom)}})}}))}),[fC,Ov]=$v(Kr),Av=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,sizes:n,hasThumb:o,onThumbChange:i,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:f,onResize:d,...p}=e,h=ar(Kr,r),[v,g]=c.useState(null),y=Ct(t,k=>g(k)),m=c.useRef(null),w=c.useRef(""),E=h.viewport,x=n.content-n.viewport,P=Vt(f),I=Vt(l),S=za(d,10);function A(k){if(m.current){const j=k.clientX-m.current.left,D=k.clientY-m.current.top;u({x:j,y:D})}}return c.useEffect(()=>{const k=j=>{const D=j.target;v?.contains(D)&&P(j,x)};return document.addEventListener("wheel",k,{passive:!1}),()=>document.removeEventListener("wheel",k,{passive:!1})},[E,v,x,P]),c.useEffect(I,[n,I]),_o(v,S),_o(h.content,S),c.createElement(fC,{scope:r,scrollbar:v,hasThumb:o,onThumbChange:Vt(i),onThumbPointerUp:Vt(a),onThumbPositionChange:I,onThumbPointerDown:Vt(s)},c.createElement(ut.div,rt({},p,{ref:y,style:{position:"absolute",...p.style},onPointerDown:dt(e.onPointerDown,k=>{k.button===0&&(k.target.setPointerCapture(k.pointerId),m.current=v.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",A(k))}),onPointerMove:dt(e.onPointerMove,A),onPointerUp:dt(e.onPointerUp,k=>{const j=k.target;j.hasPointerCapture(k.pointerId)&&j.releasePointerCapture(k.pointerId),document.body.style.webkitUserSelect=w.current,m.current=null})})))}),bc="ScrollAreaThumb",dC=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Ov(bc,e.__scopeScrollArea);return c.createElement(or,{present:r||o.hasThumb},c.createElement(pC,rt({ref:t},n)))}),pC=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,style:n,...o}=e,i=ar(bc,r),a=Ov(bc,r),{onThumbPositionChange:s}=a,l=Ct(t,d=>a.onThumbChange(d)),u=c.useRef(),f=za(()=>{u.current&&(u.current(),u.current=void 0)},100);return c.useEffect(()=>{const d=i.viewport;if(d){const p=()=>{if(f(),!u.current){const h=mC(d,s);u.current=h,s()}};return s(),d.addEventListener("scroll",p),()=>d.removeEventListener("scroll",p)}},[i.viewport,f,s]),c.createElement(ut.div,rt({"data-state":a.hasThumb?"visible":"hidden"},o,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...n},onPointerDownCapture:dt(e.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),v=d.clientX-h.left,g=d.clientY-h.top;a.onThumbPointerDown({x:v,y:g})}),onPointerUp:dt(e.onPointerUp,a.onThumbPointerUp)}))}),Tv="ScrollAreaCorner",hC=c.forwardRef((e,t)=>{const r=ar(Tv,e.__scopeScrollArea),n=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&n?c.createElement(vC,rt({},e,{ref:t})):null}),vC=c.forwardRef((e,t)=>{const{__scopeScrollArea:r,...n}=e,o=ar(Tv,r),[i,a]=c.useState(0),[s,l]=c.useState(0),u=!!(i&&s);return _o(o.scrollbarX,()=>{var f;const d=((f=o.scrollbarX)===null||f===void 0?void 0:f.offsetHeight)||0;o.onCornerHeightChange(d),l(d)}),_o(o.scrollbarY,()=>{var f;const d=((f=o.scrollbarY)===null||f===void 0?void 0:f.offsetWidth)||0;o.onCornerWidthChange(d),a(d)}),u?c.createElement(ut.div,rt({},n,{ref:t,style:{width:i,height:s,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function Va(e){return e?parseInt(e,10):0}function Iv(e,t){const r=e/t;return isNaN(r)?0:r}function Ha(e){const t=Iv(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function gC(e,t,r,n="ltr"){const o=Ha(r),i=o/2,a=t||i,s=o-a,l=r.scrollbar.paddingStart+a,u=r.scrollbar.size-r.scrollbar.paddingEnd-s,f=r.content-r.viewport,d=n==="ltr"?[0,f]:[f*-1,0];return kv([l,u],d)(e)}function Pv(e,t,r="ltr"){const n=Ha(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-n,l=r==="ltr"?[0,a]:[a*-1,0],u=eC(e,l);return kv([0,a],[0,s])(u)}function kv(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function Nv(e,t){return e>0&&e<t}const mC=(e,t=()=>{})=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,s=r.top!==i.top;(a||s)&&t(),r=i,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function za(e,t){const r=Vt(e),n=c.useRef(0);return c.useEffect(()=>()=>window.clearTimeout(n.current),[]),c.useCallback(()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)},[r,t])}function _o(e,t){const r=Vt(t);Ar(()=>{let n=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(n),n=window.requestAnimationFrame(r)});return o.observe(e),()=>{window.cancelAnimationFrame(n),o.unobserve(e)}}},[e,r])}const bC=nC,yC=iC,wC=aC,_C=dC,EC=hC;function Fn(e){return e.split("-")[0]}function wi(e){return e.split("-")[1]}function Eo(e){return["top","bottom"].includes(Fn(e))?"x":"y"}function yc(e){return e==="y"?"height":"width"}function Dv(e,t,r){let{reference:n,floating:o}=e;const i=n.x+n.width/2-o.width/2,a=n.y+n.height/2-o.height/2,s=Eo(t),l=yc(s),u=n[l]/2-o[l]/2,f=s==="x";let d;switch(Fn(t)){case"top":d={x:i,y:n.y-o.height};break;case"bottom":d={x:i,y:n.y+n.height};break;case"right":d={x:n.x+n.width,y:a};break;case"left":d={x:n.x-o.width,y:a};break;default:d={x:n.x,y:n.y}}switch(wi(t)){case"start":d[s]-=u*(r&&f?-1:1);break;case"end":d[s]+=u*(r&&f?-1:1)}return d}const xC=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=Dv(l,n,s),d=n,p={},h=0;for(let v=0;v<i.length;v++){const{name:g,fn:y}=i[v],{x:m,y:w,data:E,reset:x}=await y({x:u,y:f,initialPlacement:n,placement:d,strategy:o,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});u=m??u,f=w??f,p={...p,[g]:{...p[g],...E}},x&&h<=50&&(h++,typeof x=="object"&&(x.placement&&(d=x.placement),x.rects&&(l=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:u,y:f}=Dv(l,d,s)),v=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}};function Lv(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function Ga(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function _i(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=t,v=Lv(h),g=s[p?d==="floating"?"reference":"floating":d],y=Ga(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(g)))==null||r?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:u,rootBoundary:f,strategy:l})),m=Ga(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:d==="floating"?{...a.floating,x:n,y:o}:a.reference,offsetParent:await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),strategy:l}):a[d]);return{top:y.top-m.top+v.top,bottom:m.bottom-y.bottom+v.bottom,left:y.left-m.left+v.left,right:m.right-y.right+v.right}}const SC=Math.min,jn=Math.max;function wc(e,t,r){return jn(e,SC(t,r))}const Mv=e=>({name:"arrow",options:e,async fn(t){const{element:r,padding:n=0}=e??{},{x:o,y:i,placement:a,rects:s,platform:l}=t;if(r==null)return{};const u=Lv(n),f={x:o,y:i},d=Eo(a),p=wi(a),h=yc(d),v=await l.getDimensions(r),g=d==="y"?"top":"left",y=d==="y"?"bottom":"right",m=s.reference[h]+s.reference[d]-f[d]-s.floating[h],w=f[d]-s.reference[d],E=await(l.getOffsetParent==null?void 0:l.getOffsetParent(r));let x=E?d==="y"?E.clientHeight||0:E.clientWidth||0:0;x===0&&(x=s.floating[h]);const P=m/2-w/2,I=u[g],S=x-v[h]-u[y],A=x/2-v[h]/2+P,k=wc(I,A,S),j=(p==="start"?u[g]:u[y])>0&&A!==k&&s.reference[h]<=s.floating[h];return{[d]:f[d]-(j?A<I?I-A:S-A:0),data:{[d]:k,centerOffset:A-k}}}}),$C={left:"right",right:"left",bottom:"top",top:"bottom"};function Ka(e){return e.replace(/left|right|bottom|top/g,t=>$C[t])}function CC(e,t,r){r===void 0&&(r=!1);const n=wi(e),o=Eo(e),i=yc(o);let a=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ka(a)),{main:a,cross:Ka(a)}}const OC={start:"end",end:"start"};function Fv(e){return e.replace(/start|end/g,t=>OC[t])}const jv=["top","right","bottom","left"];jv.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const AC=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r;const{placement:n,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",flipAlignment:h=!0,...v}=e,g=Fn(n),y=d||(g===a||!h?[Ka(a)]:function(A){const k=Ka(A);return[Fv(A),k,Fv(k)]}(a)),m=[a,...y],w=await _i(t,v),E=[];let x=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&E.push(w[g]),f){const{main:A,cross:k}=CC(n,i,await(s.isRTL==null?void 0:s.isRTL(l.floating)));E.push(w[A],w[k])}if(x=[...x,{placement:n,overflows:E}],!E.every(A=>A<=0)){var P,I;const A=((P=(I=o.flip)==null?void 0:I.index)!=null?P:0)+1,k=m[A];if(k)return{data:{index:A,overflows:x},reset:{placement:k}};let j="bottom";switch(p){case"bestFit":{var S;const D=(S=x.map(N=>[N,N.overflows.filter(J=>J>0).reduce((J,K)=>J+K,0)]).sort((N,J)=>N[1]-J[1])[0])==null?void 0:S[0].placement;D&&(j=D);break}case"initialPlacement":j=a}if(n!==j)return{reset:{placement:j}}}return{}}}};function Bv(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Rv(e){return jv.some(t=>e[t]>=0)}const TC=function(e){let{strategy:t="referenceHidden",...r}=e===void 0?{}:e;return{name:"hide",async fn(n){const{rects:o}=n;switch(t){case"referenceHidden":{const i=Bv(await _i(n,{...r,elementContext:"reference"}),o.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Rv(i)}}}case"escaped":{const i=Bv(await _i(n,{...r,altBoundary:!0}),o.floating);return{data:{escapedOffsets:i,escaped:Rv(i)}}}default:return{}}}}},IC=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await async function(i,a){const{placement:s,platform:l,elements:u}=i,f=await(l.isRTL==null?void 0:l.isRTL(u.floating)),d=Fn(s),p=wi(s),h=Eo(s)==="x",v=["left","top"].includes(d)?-1:1,g=f&&h?-1:1,y=typeof a=="function"?a(i):a;let{mainAxis:m,crossAxis:w,alignmentAxis:E}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return p&&typeof E=="number"&&(w=p==="end"?-1*E:E),h?{x:w*g,y:m*v}:{x:m*v,y:w*g}}(t,e);return{x:r+o.x,y:n+o.y,data:o}}}};function Uv(e){return e==="x"?"y":"x"}const PC=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:m,y:w}=y;return{x:m,y:w}}},...l}=e,u={x:r,y:n},f=await _i(t,l),d=Eo(Fn(o)),p=Uv(d);let h=u[d],v=u[p];if(i){const y=d==="y"?"bottom":"right";h=wc(h+f[d==="y"?"top":"left"],h,h-f[y])}if(a){const y=p==="y"?"bottom":"right";v=wc(v+f[p==="y"?"top":"left"],v,v-f[y])}const g=s.fn({...t,[d]:h,[p]:v});return{...g,data:{x:g.x-r,y:g.y-n}}}}},kC=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:u=!0}=e,f={x:r,y:n},d=Eo(o),p=Uv(d);let h=f[d],v=f[p];const g=typeof s=="function"?s({...i,placement:o}):s,y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const P=d==="y"?"height":"width",I=i.reference[d]-i.floating[P]+y.mainAxis,S=i.reference[d]+i.reference[P]-y.mainAxis;h<I?h=I:h>S&&(h=S)}if(u){var m,w,E,x;const P=d==="y"?"width":"height",I=["top","left"].includes(Fn(o)),S=i.reference[p]-i.floating[P]+(I&&(m=(w=a.offset)==null?void 0:w[p])!=null?m:0)+(I?0:y.crossAxis),A=i.reference[p]+i.reference[P]+(I?0:(E=(x=a.offset)==null?void 0:x[p])!=null?E:0)-(I?y.crossAxis:0);v<S?v=S:v>A&&(v=A)}return{[d]:h,[p]:v}}}},NC=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:i}=t,{apply:a,...s}=e,l=await _i(t,s),u=Fn(r),f=wi(r);let d,p;u==="top"||u==="bottom"?(d=u,p=f===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(p=u,d=f==="end"?"top":"bottom");const h=jn(l.left,0),v=jn(l.right,0),g=jn(l.top,0),y=jn(l.bottom,0),m={availableHeight:n.floating.height-(["left","right"].includes(r)?2*(g!==0||y!==0?g+y:jn(l.top,l.bottom)):l[d]),availableWidth:n.floating.width-(["top","bottom"].includes(r)?2*(h!==0||v!==0?h+v:jn(l.left,l.right)):l[p])},w=await o.getDimensions(i.floating);a?.({...t,...m});const E=await o.getDimensions(i.floating);return w.width!==E.width||w.height!==E.height?{reset:{rects:!0}}:{}}}};function Wv(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function qr(e){if(e==null)return window;if(!Wv(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ei(e){return qr(e).getComputedStyle(e)}function Yr(e){return Wv(e)?"":e?(e.nodeName||"").toLowerCase():""}function Vv(){const e=navigator.userAgentData;return e!=null&&e.brands?e.brands.map(t=>t.brand+"/"+t.version).join(" "):navigator.userAgent}function kr(e){return e instanceof qr(e).HTMLElement}function vn(e){return e instanceof qr(e).Element}function _c(e){return typeof ShadowRoot>"u"?!1:e instanceof qr(e).ShadowRoot||e instanceof ShadowRoot}function qa(e){const{overflow:t,overflowX:r,overflowY:n}=Ei(e);return/auto|scroll|overlay|hidden/.test(t+n+r)}function DC(e){return["table","td","th"].includes(Yr(e))}function Hv(e){const t=/firefox/i.test(Vv()),r=Ei(e);return r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].includes(r.willChange)||t&&r.willChange==="filter"||t&&!!r.filter&&r.filter!=="none"}function zv(){return!/^((?!chrome|android).)*safari/i.test(Vv())}const Gv=Math.min,xi=Math.max,Ya=Math.round;function Jr(e,t,r){var n,o,i,a;t===void 0&&(t=!1),r===void 0&&(r=!1);const s=e.getBoundingClientRect();let l=1,u=1;t&&kr(e)&&(l=e.offsetWidth>0&&Ya(s.width)/e.offsetWidth||1,u=e.offsetHeight>0&&Ya(s.height)/e.offsetHeight||1);const f=vn(e)?qr(e):window,d=!zv()&&r,p=(s.left+(d&&(n=(o=f.visualViewport)==null?void 0:o.offsetLeft)!=null?n:0))/l,h=(s.top+(d&&(i=(a=f.visualViewport)==null?void 0:a.offsetTop)!=null?i:0))/u,v=s.width/l,g=s.height/u;return{width:v,height:g,top:h,right:p+v,bottom:h+g,left:p,x:p,y:h}}function gn(e){return(t=e,(t instanceof qr(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Ja(e){return vn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Kv(e){return Jr(gn(e)).left+Ja(e).scrollLeft}function LC(e,t,r){const n=kr(t),o=gn(t),i=Jr(e,n&&function(l){const u=Jr(l);return Ya(u.width)!==l.offsetWidth||Ya(u.height)!==l.offsetHeight}(t),r==="fixed");let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(n||!n&&r!=="fixed")if((Yr(t)!=="body"||qa(o))&&(a=Ja(t)),kr(t)){const l=Jr(t,!0);s.x=l.x+t.clientLeft,s.y=l.y+t.clientTop}else o&&(s.x=Kv(o));return{x:i.left+a.scrollLeft-s.x,y:i.top+a.scrollTop-s.y,width:i.width,height:i.height}}function qv(e){return Yr(e)==="html"?e:e.assignedSlot||e.parentNode||(_c(e)?e.host:null)||gn(e)}function Yv(e){return kr(e)&&getComputedStyle(e).position!=="fixed"?e.offsetParent:null}function Ec(e){const t=qr(e);let r=Yv(e);for(;r&&DC(r)&&getComputedStyle(r).position==="static";)r=Yv(r);return r&&(Yr(r)==="html"||Yr(r)==="body"&&getComputedStyle(r).position==="static"&&!Hv(r))?t:r||function(n){let o=qv(n);for(_c(o)&&(o=o.host);kr(o)&&!["html","body"].includes(Yr(o));){if(Hv(o))return o;o=o.parentNode}return null}(e)||t}function Jv(e){if(kr(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=Jr(e);return{width:t.width,height:t.height}}function Xv(e){const t=qv(e);return["html","body","#document"].includes(Yr(t))?e.ownerDocument.body:kr(t)&&qa(t)?t:Xv(t)}function Xa(e,t){var r;t===void 0&&(t=[]);const n=Xv(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),i=qr(n),a=o?[i].concat(i.visualViewport||[],qa(n)?n:[]):n,s=t.concat(a);return o?s:s.concat(Xa(a))}function Zv(e,t,r){return t==="viewport"?Ga(function(n,o){const i=qr(n),a=gn(n),s=i.visualViewport;let l=a.clientWidth,u=a.clientHeight,f=0,d=0;if(s){l=s.width,u=s.height;const p=zv();(p||!p&&o==="fixed")&&(f=s.offsetLeft,d=s.offsetTop)}return{width:l,height:u,x:f,y:d}}(e,r)):vn(t)?function(n,o){const i=Jr(n,!1,o==="fixed"),a=i.top+n.clientTop,s=i.left+n.clientLeft;return{top:a,left:s,x:s,y:a,right:s+n.clientWidth,bottom:a+n.clientHeight,width:n.clientWidth,height:n.clientHeight}}(t,r):Ga(function(n){var o;const i=gn(n),a=Ja(n),s=(o=n.ownerDocument)==null?void 0:o.body,l=xi(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),u=xi(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0);let f=-a.scrollLeft+Kv(n);const d=-a.scrollTop;return Ei(s||i).direction==="rtl"&&(f+=xi(i.clientWidth,s?s.clientWidth:0)-l),{width:l,height:u,x:f,y:d}}(gn(e)))}function MC(e){const t=Xa(e),r=["absolute","fixed"].includes(Ei(e).position)&&kr(e)?Ec(e):e;return vn(r)?t.filter(n=>vn(n)&&function(o,i){const a=i.getRootNode==null?void 0:i.getRootNode();if(o.contains(i))return!0;if(a&&_c(a)){let s=i;do{if(s&&o===s)return!0;s=s.parentNode||s.host}while(s)}return!1}(n,r)&&Yr(n)!=="body"):[]}const FC={getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?MC(t):[].concat(r),n],a=i[0],s=i.reduce((l,u)=>{const f=Zv(t,u,o);return l.top=xi(f.top,l.top),l.right=Gv(f.right,l.right),l.bottom=Gv(f.bottom,l.bottom),l.left=xi(f.left,l.left),l},Zv(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=kr(r),i=gn(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((o||!o&&n!=="fixed")&&((Yr(r)!=="body"||qa(i))&&(a=Ja(r)),kr(r))){const l=Jr(r,!0);s.x=l.x+r.clientLeft,s.y=l.y+r.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:vn,getDimensions:Jv,getOffsetParent:Ec,getDocumentElement:gn,getElementRects:e=>{let{reference:t,floating:r,strategy:n}=e;return{reference:LC(t,Ec(r),n),floating:{...Jv(r),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>Ei(e).direction==="rtl"};function jC(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=n,l=o&&!s,u=i&&!s,f=l||u?[...vn(e)?Xa(e):[],...Xa(t)]:[];f.forEach(v=>{l&&v.addEventListener("scroll",r,{passive:!0}),u&&v.addEventListener("resize",r)});let d,p=null;if(a){let v=!0;p=new ResizeObserver(()=>{v||r(),v=!1}),vn(e)&&!s&&p.observe(e),p.observe(t)}let h=s?Jr(e):null;return s&&function v(){const g=Jr(e);!h||g.x===h.x&&g.y===h.y&&g.width===h.width&&g.height===h.height||r(),h=g,d=requestAnimationFrame(v)}(),r(),()=>{var v;f.forEach(g=>{l&&g.removeEventListener("scroll",r),u&&g.removeEventListener("resize",r)}),(v=p)==null||v.disconnect(),p=null,s&&cancelAnimationFrame(d)}}const BC=(e,t,r)=>xC(e,t,{platform:FC,...r});var xc=typeof document<"u"?c.useLayoutEffect:c.useEffect;function Sc(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!Sc(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!Sc(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function RC(e){const t=ge.useRef(e);return xc(()=>{t.current=e}),t}function UC(e){let{middleware:t,placement:r="bottom",strategy:n="absolute",whileElementsMounted:o}=e===void 0?{}:e;const i=ge.useRef(null),a=ge.useRef(null),s=RC(o),l=ge.useRef(null),[u,f]=ge.useState({x:null,y:null,strategy:n,placement:r,middlewareData:{}}),[d,p]=ge.useState(t);Sc(d?.map(E=>{let{options:x}=E;return x}),t?.map(E=>{let{options:x}=E;return x}))||p(t);const h=ge.useCallback(()=>{!i.current||!a.current||BC(i.current,a.current,{middleware:d,placement:r,strategy:n}).then(E=>{v.current&&Cd.flushSync(()=>{f(E)})})},[d,r,n]);xc(()=>{v.current&&h()},[h]);const v=ge.useRef(!1);xc(()=>(v.current=!0,()=>{v.current=!1}),[]);const g=ge.useCallback(()=>{if(typeof l.current=="function"&&(l.current(),l.current=null),i.current&&a.current)if(s.current){const E=s.current(i.current,a.current,h);l.current=E}else h()},[h,s]),y=ge.useCallback(E=>{i.current=E,g()},[g]),m=ge.useCallback(E=>{a.current=E,g()},[g]),w=ge.useMemo(()=>({reference:i,floating:a}),[]);return ge.useMemo(()=>({...u,update:h,refs:w,reference:y,floating:m}),[u,h,w,y,m])}const WC=e=>{const{element:t,padding:r}=e;function n(o){return Object.prototype.hasOwnProperty.call(o,"current")}return{name:"arrow",options:e,fn(o){return n(t)?t.current!=null?Mv({element:t.current,padding:r}).fn(o):{}:t?Mv({element:t,padding:r}).fn(o):{}}}},VC=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...i}=e;return c.createElement(ut.svg,be({},i,{ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?r:c.createElement("polygon",{points:"0,0 30,0 15,10"}))}),Qv="Popper",[$c,eg]=un(Qv),[HC,tg]=$c(Qv),zC=e=>{const{__scopePopper:t,children:r}=e,[n,o]=c.useState(null);return c.createElement(HC,{scope:t,anchor:n,onAnchorChange:o},r)},GC="PopperAnchor",KC=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,i=tg(GC,r),a=c.useRef(null),s=Ct(t,a);return c.useEffect(()=>{i.onAnchorChange(n?.current||a.current)}),n?null:c.createElement(ut.div,be({},o,{ref:s}))}),Za="PopperContent",[qC,YC]=$c(Za),[JC,XC]=$c(Za,{hasParent:!1,positionUpdateFns:new Set}),ZC=c.forwardRef((e,t)=>{var r,n,o,i,a,s,l,u;const{__scopePopper:f,side:d="bottom",sideOffset:p=0,align:h="center",alignOffset:v=0,arrowPadding:g=0,collisionBoundary:y=[],collisionPadding:m=0,sticky:w="partial",hideWhenDetached:E=!1,avoidCollisions:x=!0,onPlaced:P,...I}=e,S=tg(Za,f),[A,k]=c.useState(null),j=Ct(t,Te=>k(Te)),[D,N]=c.useState(null),J=av(D),K=(r=J?.width)!==null&&r!==void 0?r:0,Y=(n=J?.height)!==null&&n!==void 0?n:0,te=d+(h!=="center"?"-"+h:""),oe=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},le=Array.isArray(y)?y:[y],ae=le.length>0,ve={padding:oe,boundary:le.filter(nO),altBoundary:ae},{reference:ce,floating:q,strategy:V,x:re,y:de,placement:U,middlewareData:z,update:M}=UC({strategy:"fixed",placement:te,whileElementsMounted:jC,middleware:[oO(),IC({mainAxis:p+Y,alignmentAxis:v}),x?PC({mainAxis:!0,crossAxis:!1,limiter:w==="partial"?kC():void 0,...ve}):void 0,D?WC({element:D,padding:g}):void 0,x?AC({...ve}):void 0,NC({...ve,apply:({elements:Te,availableWidth:Me,availableHeight:mt})=>{Te.floating.style.setProperty("--radix-popper-available-width",`${Me}px`),Te.floating.style.setProperty("--radix-popper-available-height",`${mt}px`)}}),iO({arrowWidth:K,arrowHeight:Y}),E?TC({strategy:"referenceHidden"}):void 0].filter(rO)});Ar(()=>{ce(S.anchor)},[ce,S.anchor]);const R=re!==null&&de!==null,[G,O]=rg(U),T=Vt(P);Ar(()=>{R&&T?.()},[R,T]);const Z=(o=z.arrow)===null||o===void 0?void 0:o.x,ne=(i=z.arrow)===null||i===void 0?void 0:i.y,pe=((a=z.arrow)===null||a===void 0?void 0:a.centerOffset)!==0,[me,xe]=c.useState();Ar(()=>{A&&xe(window.getComputedStyle(A).zIndex)},[A]);const{hasParent:Ee,positionUpdateFns:ie}=XC(Za,f),Ne=!Ee;c.useLayoutEffect(()=>{if(!Ne)return ie.add(M),()=>{ie.delete(M)}},[Ne,ie,M]),Ar(()=>{Ne&&R&&Array.from(ie).reverse().forEach(Te=>requestAnimationFrame(Te))},[Ne,R,ie]);const ft={"data-side":G,"data-align":O,...I,ref:j,style:{...I.style,animation:R?void 0:"none",opacity:(s=z.hide)!==null&&s!==void 0&&s.referenceHidden?0:void 0}};return c.createElement("div",{ref:q,"data-radix-popper-content-wrapper":"",style:{position:V,left:0,top:0,transform:R?`translate3d(${Math.round(re)}px, ${Math.round(de)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:me,["--radix-popper-transform-origin"]:[(l=z.transformOrigin)===null||l===void 0?void 0:l.x,(u=z.transformOrigin)===null||u===void 0?void 0:u.y].join(" ")},dir:e.dir},c.createElement(qC,{scope:f,placedSide:G,onArrowChange:N,arrowX:Z,arrowY:ne,shouldHideArrow:pe},Ne?c.createElement(JC,{scope:f,hasParent:!0,positionUpdateFns:ie},c.createElement(ut.div,ft)):c.createElement(ut.div,ft)))}),QC="PopperArrow",eO={top:"bottom",right:"left",bottom:"top",left:"right"},tO=c.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,i=YC(QC,n),a=eO[i.placedSide];return c.createElement("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0}},c.createElement(VC,be({},o,{ref:r,style:{...o.style,display:"block"}})))});function rO(e){return e!==void 0}function nO(e){return e!==null}const oO=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:r}=e,{width:n,height:o}=t.reference;return r.floating.style.setProperty("--radix-popper-anchor-width",`${n}px`),r.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),iO=e=>({name:"transformOrigin",options:e,fn(t){var r,n,o,i,a;const{placement:s,rects:l,middlewareData:u}=t,d=((r=u.arrow)===null||r===void 0?void 0:r.centerOffset)!==0,p=d?0:e.arrowWidth,h=d?0:e.arrowHeight,[v,g]=rg(s),y={start:"0%",center:"50%",end:"100%"}[g],m=((n=(o=u.arrow)===null||o===void 0?void 0:o.x)!==null&&n!==void 0?n:0)+p/2,w=((i=(a=u.arrow)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0)+h/2;let E="",x="";return v==="bottom"?(E=d?y:`${m}px`,x=`${-h}px`):v==="top"?(E=d?y:`${m}px`,x=`${l.floating.height+h}px`):v==="right"?(E=`${-h}px`,x=d?y:`${w}px`):v==="left"&&(E=`${l.floating.width+h}px`,x=d?y:`${w}px`),{data:{x:E,y:x}}}});function rg(e){const[t,r="center"]=e.split("-");return[t,r]}const aO=zC,sO=KC,lO=ZC,cO=tO,uO=c.forwardRef((e,t)=>c.createElement(ut.span,be({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}))),[Qa,z9]=un("Tooltip",[eg]),es=eg(),fO="TooltipProvider",dO=700,Cc="tooltip.open",[pO,Oc]=Qa(fO),hO=e=>{const{__scopeTooltip:t,delayDuration:r=dO,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=c.useState(!0),l=c.useRef(!1),u=c.useRef(0);return c.useEffect(()=>{const f=u.current;return()=>window.clearTimeout(f)},[]),c.createElement(pO,{scope:t,isOpenDelayed:a,delayDuration:r,onOpen:c.useCallback(()=>{window.clearTimeout(u.current),s(!1)},[]),onClose:c.useCallback(()=>{window.clearTimeout(u.current),u.current=window.setTimeout(()=>s(!0),n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:c.useCallback(f=>{l.current=f},[]),disableHoverableContent:o},i)},Ac="Tooltip",[vO,Si]=Qa(Ac),gO=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,l=Oc(Ac,e.__scopeTooltip),u=es(t),[f,d]=c.useState(null),p=fi(),h=c.useRef(0),v=a??l.disableHoverableContent,g=s??l.delayDuration,y=c.useRef(!1),[m=!1,w]=wa({prop:n,defaultProp:o,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(Cc))):l.onClose(),i?.(S)}}),E=c.useMemo(()=>m?y.current?"delayed-open":"instant-open":"closed",[m]),x=c.useCallback(()=>{window.clearTimeout(h.current),y.current=!1,w(!0)},[w]),P=c.useCallback(()=>{window.clearTimeout(h.current),w(!1)},[w]),I=c.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{y.current=!0,w(!0)},g)},[g,w]);return c.useEffect(()=>()=>window.clearTimeout(h.current),[]),c.createElement(aO,u,c.createElement(vO,{scope:t,contentId:p,open:m,stateAttribute:E,trigger:f,onTriggerChange:d,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayed?I():x()},[l.isOpenDelayed,I,x]),onTriggerLeave:c.useCallback(()=>{v?P():window.clearTimeout(h.current)},[P,v]),onOpen:x,onClose:P,disableHoverableContent:v},r))},ng="TooltipTrigger",mO=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Si(ng,r),i=Oc(ng,r),a=es(r),s=c.useRef(null),l=Ct(t,s,o.onTriggerChange),u=c.useRef(!1),f=c.useRef(!1),d=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),c.createElement(sO,be({asChild:!0},a),c.createElement(ut.button,be({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},n,{ref:l,onPointerMove:dt(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:dt(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:dt(e.onPointerDown,()=>{u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:dt(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:dt(e.onBlur,o.onClose),onClick:dt(e.onClick,o.onClose)})))}),og="TooltipPortal",[bO,yO]=Qa(og,{forceMount:void 0}),wO=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,i=Si(og,t);return c.createElement(bO,{scope:t,forceMount:r},c.createElement(or,{present:r||i.open},c.createElement($p,{asChild:!0,container:o},n)))},$i="TooltipContent",_O=c.forwardRef((e,t)=>{const r=yO($i,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...i}=e,a=Si($i,e.__scopeTooltip);return c.createElement(or,{present:n||a.open},a.disableHoverableContent?c.createElement(ig,be({side:o},i,{ref:t})):c.createElement(EO,be({side:o},i,{ref:t})))}),EO=c.forwardRef((e,t)=>{const r=Si($i,e.__scopeTooltip),n=Oc($i,e.__scopeTooltip),o=c.useRef(null),i=Ct(t,o),[a,s]=c.useState(null),{trigger:l,onClose:u}=r,f=o.current,{onPointerInTransitChange:d}=n,p=c.useCallback(()=>{s(null),d(!1)},[d]),h=c.useCallback((v,g)=>{const y=v.currentTarget,m={x:v.clientX,y:v.clientY},w=OO(m,y.getBoundingClientRect()),E=w==="right"||w==="bottom"?-5:5,P=w==="right"||w==="left"?{x:v.clientX+E,y:v.clientY}:{x:v.clientX,y:v.clientY+E},I=AO(g.getBoundingClientRect()),S=IO([P,...I]);s(S),d(!0)},[d]);return c.useEffect(()=>()=>p(),[p]),c.useEffect(()=>{if(l&&f){const v=y=>h(y,f),g=y=>h(y,l);return l.addEventListener("pointerleave",v),f.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",v),f.removeEventListener("pointerleave",g)}}},[l,f,h,p]),c.useEffect(()=>{if(a){const v=g=>{const y=g.target,m={x:g.clientX,y:g.clientY},w=l?.contains(y)||f?.contains(y),E=!TO(m,a);w?p():E&&(p(),u())};return document.addEventListener("pointermove",v),()=>document.removeEventListener("pointermove",v)}},[l,f,a,u,p]),c.createElement(ig,be({},e,{ref:i}))}),[xO,SO]=Qa(Ac,{isInside:!1}),ig=c.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,l=Si($i,r),u=es(r),{onClose:f}=l;return c.useEffect(()=>(document.addEventListener(Cc,f),()=>document.removeEventListener(Cc,f)),[f]),c.useEffect(()=>{if(l.trigger){const d=p=>{const h=p.target;h!=null&&h.contains(l.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,f]),c.createElement(mp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:f},c.createElement(lO,be({"data-state":l.stateAttribute},u,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),c.createElement(Ll,null,n),c.createElement(xO,{scope:r,isInside:!0},c.createElement(uO,{id:l.contentId,role:"tooltip"},o||n))))}),$O="TooltipArrow",CO=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=es(r);return SO($O,r).isInside?null:c.createElement(cO,be({},o,n,{ref:t}))});function OO(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:return null}}function AO(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function TO(e,t){const{x:r,y:n}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const s=t[i].x,l=t[i].y,u=t[a].x,f=t[a].y;l>n!=f>n&&r<(u-s)*(n-l)/(f-l)+s&&(o=!o)}return o}function IO(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),PO(t)}function PO(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const i=r[r.length-1],a=r[r.length-2];if((i.x-a.x)*(o.y-a.y)>=(i.y-a.y)*(o.x-a.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}const kO=hO,NO=gO;/*!
|
|
83
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
84
|
+
* Licensed under the MIT License.
|
|
85
|
+
*/const DO=typeof WeakRef<"u";let ag=class{constructor(t){DO&&typeof t=="object"?this._weakRef=new WeakRef(t):this._instance=t}deref(){var t,r,n;let o;return this._weakRef?(o=(t=this._weakRef)===null||t===void 0?void 0:t.deref(),o||delete this._weakRef):(o=this._instance,!((n=(r=o)===null||r===void 0?void 0:r.isDisposed)===null||n===void 0)&&n.call(r)&&delete this._instance),o}};/*!
|
|
86
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
87
|
+
* Licensed under the MIT License.
|
|
88
|
+
*/const Tc="keyborg:focusin";function LO(e){const t=e.HTMLElement,r=t.prototype.focus;let n=!1;return t.prototype.focus=function(){n=!0},e.document.createElement("button").focus(),t.prototype.focus=r,n}let Ic=!1;function MO(e){const t=e;Ic||(Ic=LO(t));const r=t.HTMLElement.prototype.focus;if(r.__keyborgNativeFocus)return;t.HTMLElement.prototype.focus=o;const n=t.__keyborgData={focusInHandler:i=>{var a;const s=i.target;if(!s)return;const l=document.createEvent("HTMLEvents");l.initEvent(Tc,!0,!0);const u={relatedTarget:i.relatedTarget||void 0};(Ic||n.lastFocusedProgrammatically)&&(u.isFocusedProgrammatically=s===((a=n.lastFocusedProgrammatically)===null||a===void 0?void 0:a.deref()),n.lastFocusedProgrammatically=void 0),l.details=u,s.dispatchEvent(l)}};t.document.addEventListener("focusin",t.__keyborgData.focusInHandler,!0);function o(){const i=t.__keyborgData;return i&&(i.lastFocusedProgrammatically=new ag(this)),r.apply(this,arguments)}o.__keyborgNativeFocus=r}function FO(e){const t=e,r=t.HTMLElement.prototype,n=r.focus.__keyborgNativeFocus,o=t.__keyborgData;o&&(t.document.removeEventListener("focusin",o.focusInHandler,!0),delete t.__keyborgData),n&&(r.focus=n)}/*!
|
|
89
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
90
|
+
* Licensed under the MIT License.
|
|
91
|
+
*/const jO=500;let sg=0,BO=class{constructor(){this.__keyborgCoreRefs={},this._isNavigatingWithKeyboard=!1}add(t){const r=t.id;r in this.__keyborgCoreRefs||(this.__keyborgCoreRefs[r]=new ag(t))}remove(t){delete this.__keyborgCoreRefs[t],Object.keys(this.__keyborgCoreRefs).length===0&&(this._isNavigatingWithKeyboard=!1)}setVal(t){if(this._isNavigatingWithKeyboard!==t){this._isNavigatingWithKeyboard=t;for(const r of Object.keys(this.__keyborgCoreRefs)){const o=this.__keyborgCoreRefs[r].deref();o?o.update(t):this.remove(r)}}}getVal(){return this._isNavigatingWithKeyboard}};const Nr=new BO;let RO=class{constructor(t,r){this._isMouseUsed=!1,this._onFocusIn=o=>{if(this._isMouseUsed){this._isMouseUsed=!1;return}if(Nr.getVal())return;const i=o.details;i.relatedTarget&&(i.isFocusedProgrammatically||i.isFocusedProgrammatically===void 0||Nr.setVal(!0))},this._onMouseDown=o=>{o.buttons===0||o.clientX===0&&o.clientY===0&&o.screenX===0&&o.screenY===0||(this._isMouseUsed=!0,Nr.setVal(!1))},this._onKeyDown=o=>{var i;const a=Nr.getVal(),s=o.keyCode,l=this._triggerKeys;!a&&(!l||l.has(s))?Nr.setVal(!0):a&&(!((i=this._dismissKeys)===null||i===void 0)&&i.has(s))&&this._scheduleDismiss()},this.id="c"+ ++sg,this._win=t;const n=t.document;if(r){const o=r.triggerKeys,i=r.dismissKeys;o?.length&&(this._triggerKeys=new Set(o)),i?.length&&(this._dismissKeys=new Set(i))}n.addEventListener(Tc,this._onFocusIn,!0),n.addEventListener("mousedown",this._onMouseDown,!0),t.addEventListener("keydown",this._onKeyDown,!0),MO(t),Nr.add(this)}dispose(){const t=this._win;if(t){this._dismissTimer&&(t.clearTimeout(this._dismissTimer),this._dismissTimer=void 0),FO(t);const r=t.document;r.removeEventListener(Tc,this._onFocusIn,!0),r.removeEventListener("mousedown",this._onMouseDown,!0),t.removeEventListener("keydown",this._onKeyDown,!0),delete this._win,Nr.remove(this.id)}}isDisposed(){return!!this._win}update(t){var r,n;const o=(n=(r=this._win)===null||r===void 0?void 0:r.__keyborg)===null||n===void 0?void 0:n.refs;if(o)for(const i of Object.keys(o))lg.update(o[i],t)}_scheduleDismiss(){const t=this._win;if(t){this._dismissTimer&&(t.clearTimeout(this._dismissTimer),this._dismissTimer=void 0);const r=t.document.activeElement;this._dismissTimer=t.setTimeout(()=>{this._dismissTimer=void 0;const n=t.document.activeElement;r&&n&&r===n&&Nr.setVal(!1)},jO)}}},lg=class k1{constructor(t,r){this._cb=[],this._id="k"+ ++sg,this._win=t;const n=t.__keyborg;n?(this._core=n.core,n.refs[this._id]=this):(this._core=new RO(t,r),t.__keyborg={core:this._core,refs:{[this._id]:this}})}static create(t,r){return new k1(t,r)}static dispose(t){t.dispose()}static update(t,r){t._cb.forEach(n=>n(r))}dispose(){var t;const r=(t=this._win)===null||t===void 0?void 0:t.__keyborg;r?.refs[this._id]?(delete r.refs[this._id],Object.keys(r.refs).length===0&&(r.core.dispose(),delete this._win.__keyborg)):process.env.NODE_ENV==="development"&&console.error("Keyborg instance "+this._id+" is being disposed incorrectly."),this._cb=[],delete this._core,delete this._win}isNavigatingWithKeyboard(){return Nr.getVal()}subscribe(t){this._cb.push(t)}unsubscribe(t){const r=this._cb.indexOf(t);r>=0&&this._cb.splice(r,1)}setVal(t){Nr.setVal(t)}};function UO(e,t){return lg.create(e,t)}var Dr=e=>{const{density:t}=c.useContext(xg);return e??t},Bn=e=>{const{elevation:t}=c.useContext(hg);return e??t},cg="en-US",ts="dxos-common",WO={[cg]:{[ts]:{"loading translations":"Loading translations…"}}};Ft.use(Y1).init({resources:WO,lng:cg,defaultNS:ts,interpolation:{escapeValue:!1}});var VO=c.createContext({appNs:ts}),HO=({fallback:e,resourceExtensions:t,children:r,appNs:n})=>{const[o,i]=c.useState(!1);return c.useEffect(()=>{i(!1),t&&t.length&&t.forEach(a=>{Object.keys(a).forEach(s=>{Object.keys(a[s]).forEach(l=>{Ft.addResourceBundle(s,l,a[s][l])})})}),i(!0)},[t]),c.createElement(VO.Provider,{value:{appNs:n??ts}},c.createElement(c.Suspense,{fallback:e},o?r:e))},Oe=()=>c.useContext(Ig),zO=e=>{const[t,r]=c.useState(null),[n,o]=c.useState(null);return c.useEffect(()=>{const i=()=>{window.visualViewport&&(r(window.visualViewport.width),o(window.visualViewport.height))};return window.visualViewport?.addEventListener("resize",i),i(),()=>window.visualViewport?.removeEventListener("resize",i)},e??[]),{width:t,height:n}},GO="Avatar",[KO,Rn]=uo(GO),qO=({size:e=10,variant:t="circle",status:r,animation:n,children:o,labelId:i,descriptionId:a,maskId:s,inGroup:l,color:u})=>{const f=_t("avatar__label",i),d=_t("avatar__description",a),p=_t("avatar__mask",s);return c.createElement(KO,{labelId:f,descriptionId:d,maskId:p,size:e,variant:t,status:r,animation:n,inGroup:l,color:u},o)},ug="0.25rem",YO=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{size:o,variant:i,labelId:a,descriptionId:s,maskId:l,inGroup:u,status:f,animation:d,color:p}=Rn("AvatarFrame"),{tx:h}=Oe(),v=o==="px"?1:Number(o),g=v*4,y=v>4?2:(v>3,1),m=v>12?3:v>4?2:v>3?1:0,w=g/2-m-y;return c.createElement(c_,{role:"img",...r,className:h("avatar.root","avatar",{size:o,variant:i,inGroup:u},e),ref:n,...!u&&{"aria-labelledby":a,"aria-describedby":s}},c.createElement("svg",{viewBox:`0 0 ${g} ${g}`,width:g,height:g,className:h("avatar.frame","avatar__frame",{variant:i})},c.createElement("defs",null,c.createElement("mask",{id:l},i==="circle"?c.createElement("circle",{fill:"white",cx:"50%",cy:"50%",r:w}):c.createElement("rect",{fill:"white",width:2*w,height:2*w,x:m+y,y:m+y,rx:ug}))),i==="circle"?c.createElement("circle",{className:`avatarFrameFill${p?"":" fill-[var(--surface-bg)]"}`,cx:"50%",cy:"50%",r:w,...p?{fill:p}:{}}):c.createElement("rect",{className:"avatarFrameFill fill-[var(--surface-bg)]",x:m+y,y:m+y,width:2*w,height:2*w,rx:ug}),t),c.createElement("span",{role:"none",className:h("avatar.ring","avatar__ring",{size:o,variant:i,status:f,animation:d}),style:{borderWidth:y+"px"}}))}),JO=c.forwardRef(({asChild:e,srOnly:t,classNames:r,...n},o)=>{const i=e?xt:Ve.span,{tx:a}=Oe(),{labelId:s}=Rn("AvatarLabel");return c.createElement(i,{...n,id:s,ref:o,className:a("avatar.label","avatar__label",{srOnly:t},r)})}),XO=c.forwardRef(({asChild:e,srOnly:t,classNames:r,...n},o)=>{const i=e?xt:Ve.span,{tx:a}=Oe(),{descriptionId:s}=Rn("AvatarDescription");return c.createElement(i,{...n,id:s,ref:o,className:a("avatar.description","avatar__description",{srOnly:t},r)})}),fg=c.forwardRef((e,t)=>{const{maskId:r}=Rn("AvatarFallback");return c.createElement("image",{width:"100%",height:"100%",...e,mask:`url(#${r})`,ref:t,preserveAspectRatio:"xMidYMid slice"})}),ZO=e=>{const{maskId:t,size:r}=Rn("AvatarFallback"),{large:n}=e,o=(n?4:3)*(1/1.612),{tx:i}=Oe();return c.createElement("text",{x:"50%",y:"50%",className:i("avatar.fallbackText","avatar__fallback-text"),textAnchor:"middle",alignmentBaseline:"central",fontSize:r==="px"?"200%":r*o,mask:`url(#${t})`},e.children)},QO=c.forwardRef(({onLoadingStatusChange:e,...t},r)=>{const{size:n}=Rn("AvatarImage");return(n==="px"?1:n*4)<=20?null:c.createElement(fp,{asChild:!0},c.createElement(fg,{...t,ref:r}))}),eA=c.forwardRef(({delayMs:e,text:t,...r},n)=>{const o=!!(t&&/[0-9a-zA-Z]+/.test(t)),{size:i}=Rn("AvatarFallback"),a=i==="px"?1:Number(i);return c.createElement(fp,{delayMs:e,asChild:!0},c.createElement(c.Fragment,null,a>=6&&c.createElement(fg,{...r,ref:n}),t&&c.createElement(ZO,{large:!o},t.toLocaleUpperCase())))}),tA=(e,t)=>`data:image/svg+xml;utf8,${encodeURIComponent(A_(e,t==="px"?1:t*4,{padding:0}))}`,rs=(e,t)=>c.useMemo(()=>tA(e,t),[e]),At={Root:qO,Frame:YO,Image:QO,Fallback:eA,Label:JO,Description:XO},dg="ButtonGroup",pg="Button",[rA,nA]=uo(dg,{inGroup:!1}),br=c.forwardRef(({classNames:e,children:t,density:r,elevation:n,variant:o="default",asChild:i,...a},s)=>{const{inGroup:l}=nA(pg),{tx:u}=Oe(),f=Bn(n),d=Dr(r),p=i?xt:Ve.button;return c.createElement(p,{ref:s,...a,className:u("button.root","button",{variant:o,inGroup:l,disabled:a.disabled,density:d,elevation:f},e),...a.disabled&&{disabled:!0}},t)});br.displayName=pg;var oA=c.forwardRef(({children:e,elevation:t,classNames:r,asChild:n,...o},i)=>{const{tx:a}=Oe(),s=Bn(t),l=n?xt:Ve.div;return c.createElement(l,{role:"none",...o,className:a("button.group","button-group",{elevation:s},r),ref:i},c.createElement(rA,{inGroup:!0},e))});oA.displayName=dg;var hg=c.createContext({elevation:"base"}),Ci=({elevation:e,children:t})=>c.createElement(hg.Provider,{value:{elevation:e}},t),iA=ql,aA=zp,sA=qp,lA=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Oe();return c.createElement(Zp,{...r,className:o("dialog.title","dialog__title",{srOnly:t},e),ref:n})}),cA=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Oe();return c.createElement(Qp,{...r,className:o("dialog.description","dialog__description",{srOnly:t},e),ref:n})}),uA=eh,vg="DialogOverlay",gg="DialogContent",[fA,dA]=uo(vg,{inOverlayLayout:!1}),mg=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Oe();return c.createElement(Yp,{...r,className:o("dialog.overlay","dialog__overlay",{},e),ref:n},c.createElement(fA,{inOverlayLayout:!0},t))});mg.displayName=vg;var bg=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Oe(),{inOverlayLayout:i}=dA(gg);return c.createElement(Gl,{...r,className:o("dialog.content","dialog",{inOverlayLayout:i},e),ref:n},c.createElement(Ci,{elevation:"chrome"},t))});bg.displayName=gg;var Lr={Root:iA,Trigger:aA,Portal:sA,Overlay:mg,Content:bg,Title:lA,Description:cA,Close:uA},pA=fx,hA=QE,vA=ex,gA=ux,mA=lx,bA=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Oe();return c.createElement(ax,{...r,className:o("dialog.title","dialog--alert__title",{srOnly:t},e),ref:n})}),yA=c.forwardRef(({classNames:e,srOnly:t,...r},n)=>{const{tx:o}=Oe();return c.createElement(sx,{...r,className:o("dialog.description","dialog--alert__description",{srOnly:t},e),ref:n})}),yg="AlertDialogOverlay",wg="AlertDialogContent",[wA,_A]=uo(yg,{inOverlayLayout:!1}),_g=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Oe();return c.createElement(tx,{...r,className:o("dialog.overlay","dialog--alert__overlay",{},e),ref:n},c.createElement(wA,{inOverlayLayout:!0},t))});_g.displayName=yg;var Eg=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Oe(),{inOverlayLayout:i}=_A(wg);return c.createElement(ox,{...r,className:o("dialog.content","dialog--alert",{inOverlayLayout:i},e),ref:n},c.createElement(Ci,{elevation:"chrome"},t))});Eg.displayName=wg;var xo={Root:pA,Trigger:hA,Portal:vA,Overlay:_g,Content:Eg,Title:bA,Description:yA,Cancel:gA,Action:mA},EA=yS,xA=kS,SA=NS,$A=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Oe();return c.createElement(DS,{sideOffset:4,collisionPadding:8,...r,className:o("menu.content","menu",{},e),ref:n},c.createElement(Ci,{elevation:"chrome"},t))}),CA=c.forwardRef(({classNames:e,asChild:t,children:r,...n},o)=>{const{tx:i}=Oe(),a=t?xt:Ve.div;return c.createElement(a,{...n,className:i("menu.viewport","menu__viewport",{},e),ref:o},r)}),OA=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Oe();return c.createElement(US,{...t,className:n("menu.arrow","menu__arrow",{},e),ref:r})}),AA=LS,TA=BS,IA=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Oe();return c.createElement(FS,{...t,className:n("menu.item","menu__item",{},e),ref:r})}),PA=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Oe();return c.createElement(jS,{...t,className:n("menu.item","menu__item--checkbox",{},e),ref:r})}),kA=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Oe();return c.createElement(RS,{...t,className:n("menu.separator","menu__item",{},e),ref:r})}),NA=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Oe();return c.createElement(MS,{...t,className:n("menu.groupLabel","menu__group__label",{},e),ref:r})}),Un={Root:EA,Trigger:xA,Portal:SA,Content:$A,Viewport:CA,Arrow:OA,Group:AA,Item:IA,CheckboxItem:PA,ItemIndicator:TA,Separator:kA,GroupLabel:NA},DA=c.forwardRef(({srOnly:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Oe();return c.createElement(A$,{...n,className:i("input.label","input__label",{srOnly:e},t),ref:o},r)}),LA=c.forwardRef(({srOnly:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Oe();return c.createElement(T$,{...n,className:i("input.description","input__description",{srOnly:e},t),ref:o},r)}),MA=c.forwardRef(({__inputScope:e,srOnly:t,classNames:r,children:n,...o},i)=>{const{tx:a}=Oe(),{validationValence:s}=rr(jt,e);return c.createElement(P$,{...o,className:a("input.validation",`input__validation-message input__validation-message--${s}`,{srOnly:t,validationValence:s},r),ref:i},n)}),FA=c.forwardRef(({srOnly:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Oe();return c.createElement(k$,{...n,className:i("input.descriptionAndValidation","input__description-and-validation",{srOnly:e},t),ref:o},r)}),jA=c.forwardRef(({density:e,elevation:t,segmentClassName:r,inputClassName:n,variant:o,...i},a)=>{const{hasIosKeyboard:s}=Oe(),{tx:l}=Oe(),u=Dr(e),f=Bn(t),d=c.useCallback(({focused:p,validationValence:h})=>l("input.input","input--pin-segment",{variant:"static",focused:p,disabled:i.disabled,density:u,elevation:f,validationValence:h},r),[l,i.disabled,f,t,u]);return c.createElement(N$,{...i,segmentClassName:d,...i.autoFocus&&!s&&{autoFocus:!0},inputClassName:l("input.inputWithSegments","input input--pin",{disabled:i.disabled},n),ref:a})}),BA=c.forwardRef(({__inputScope:e,classNames:t,density:r,elevation:n,variant:o,...i},a)=>{const{hasIosKeyboard:s}=Oe(),l=Oe(),u=Dr(r),f=Bn(n),{validationValence:d}=rr(jt,e),{tx:p}=l;return c.createElement(D$,{...i,className:p("input.input","input",{variant:o,disabled:i.disabled,density:u,elevation:f,validationValence:d},t),...i.autoFocus&&!s&&{autoFocus:!0},ref:a})}),RA=c.forwardRef(({__inputScope:e,classNames:t,density:r,elevation:n,variant:o,...i},a)=>{const{hasIosKeyboard:s}=Oe(),{tx:l}=Oe(),u=Dr(r),f=Bn(n),{validationValence:d}=rr(jt,e);return c.createElement(L$,{...i,className:l("input.input","input--text-area",{variant:o,disabled:i.disabled,density:u,elevation:f,validationValence:d},t),...i.autoFocus&&!s&&{autoFocus:!0},ref:a})}),UA=c.forwardRef(({__inputScope:e,checked:t,defaultChecked:r,onCheckedChange:n,size:o,weight:i="bold",classNames:a,...s},l)=>{const[u,f]=Gr({prop:t,defaultProp:r,onChange:n}),{id:d,validationValence:p,descriptionId:h,errorMessageId:v}=rr(jt,e),{tx:g}=Oe(),y=u==="indeterminate"?Xe.Minus:u?Xe.Check:c.Fragment;return c.createElement(JS,{...s,checked:u,onCheckedChange:f,id:d,"aria-describedby":h,...p==="error"&&{"aria-invalid":"true","aria-errormessage":v},className:g("input.checkbox","input--checkbox",{size:o},"shrink-0",a),ref:l},c.createElement(XS,{asChild:!0},c.createElement(y,u&&{weight:i,className:g("input.checkboxIndicator","input--checkbox__indicator",{size:o})})))}),WA=c.forwardRef(({__inputScope:e,checked:t,defaultChecked:r,onCheckedChange:n,size:o=5,classNames:i,...a},s)=>{const{tx:l}=Oe(),[u,f]=Gr({prop:t,defaultProp:r,onChange:n}),{id:d,validationValence:p,descriptionId:h,errorMessageId:v}=rr(jt,e);return c.createElement(a$,{...a,checked:u,onCheckedChange:f,id:d,"aria-describedby":h,...p==="error"&&{"aria-invalid":"true","aria-errormessage":v},className:l("input.switch","input--switch",{size:o},i),ref:s},c.createElement(s$,{className:l("input.switchThumb","input--switch__thumb",{size:o})}))}),Mr={Root:bv,PinInput:jA,TextInput:BA,TextArea:RA,Checkbox:UA,Switch:WA,Label:DA,Description:LA,Validation:MA,DescriptionAndValidation:FA},xg=c.createContext({density:"coarse"}),So=({density:e,children:t})=>c.createElement(xg.Provider,{value:{density:e}},t),Pc=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Oe(),i=Dr(r.density);return c.createElement(So,{density:i},c.createElement(_v,{...r,className:o("list.root","list",{},e),ref:n},t))}),VA=c.forwardRef(({children:e,classNames:t,asChild:r,...n},o)=>{const i=r?xt:"div",a=Dr(),{tx:s}=Oe();return c.createElement(i,{...!r&&{role:"none"},...n,className:s("list.item.endcap","list__listItem__endcap",{density:a},t),ref:o},e)}),HA=({classNames:e,...t})=>{const r=Dr(),{tx:n}=Oe();return c.createElement("div",{role:"none",...t,className:n("list.item.openTrigger","list__listItem__openTrigger--mock",{density:r},e)})},zA=c.forwardRef(({children:e,classNames:t,...r},n)=>{const{tx:o}=Oe(),i=Dr();return c.createElement(X$,{...r,className:o("list.item.heading","list__listItem__heading",{density:i},t),ref:n},e)}),GA=c.forwardRef(({__listItemScope:e,classNames:t,children:r,...n},o)=>{const{tx:i}=Oe(),a=Dr(),{open:s}=Ev(yi,e),l=s?Xe.CaretDown:Xe.CaretRight;return c.createElement(Z$,{...n,className:i("list.item.openTrigger","list__listItem__openTrigger",{density:a},t),ref:o},r||c.createElement(l,{weight:"bold",className:i("list.item.openTriggerIcon","list__listItem__openTrigger__icon",{})}))}),KA=c.forwardRef(({classNames:e,children:t,...r},n)=>{const{tx:o}=Oe(),i=Dr();return c.createElement(xv,{...r,className:o("list.item.root","list__listItem",{density:i,collapsible:r.collapsible},e),ref:n},t)}),kc={Root:KA,Endcap:VA,Heading:zA,OpenTrigger:GA,CollapsibleContent:Q$,MockOpenTrigger:HA},Xr;(function(e){e[e.IDLE=0]="IDLE",e[e.DEBOUNCING=1]="DEBOUNCING",e[e.FOLLOWING=2]="FOLLOWING"})(Xr||(Xr={}));var qA=(e,{onDismiss:t,dismissThreshold:r=64,debounceThreshold:n=8,offset:o=0})=>{const i=e.current,[a,s]=c.useState(Xr.IDLE),[l,u]=c.useState(0),f=c.useCallback(()=>{s(Xr.IDLE),i?.style.removeProperty("inset-inline-start"),i?.style.setProperty("transition-duration","200ms")},[i]),d=c.useCallback(()=>{s(Xr.FOLLOWING),i?.style.setProperty("transition-duration","0ms")},[i]),p=c.useCallback(({screenX:g})=>{a===Xr.IDLE&&(s(Xr.DEBOUNCING),u(g))},[a]),h=c.useCallback(({screenX:g})=>{if(i){const y=Math.min(g-l,0);switch(a){case Xr.FOLLOWING:Math.abs(y)>r?(f(),t?.()):i.style.setProperty("inset-inline-start",`${o+y}px`);break;case Xr.DEBOUNCING:Math.abs(y)>n&&d();break}}},[i,a,l]),v=c.useCallback(()=>{f()},[f]);c.useEffect(()=>(i?.addEventListener("pointerdown",p),()=>{i?.removeEventListener("pointerdown",p)}),[i,p]),c.useEffect(()=>(i&&document.documentElement.addEventListener("pointermove",h),()=>{document.documentElement.removeEventListener("pointermove",h)}),[i,h]),c.useEffect(()=>(i&&document.documentElement.addEventListener("pointerup",v),()=>{document.documentElement.removeEventListener("pointerup",v)}),[i,v])},Nc="NavigationSidebar",Dc="Main",[G9,Sg]=uo(Dc,{navigationSidebarOpen:!1,setNavigationSidebarOpen:e=>{console.warn("Attempt to set sidebar state without initializing `MainRoot`")},complementarySidebarOpen:!1,setComplementarySidebarOpen:e=>{console.warn("Attempt to set sidebar state without initializing `MainRoot`")}}),YA=e=>{!document.body.hasAttribute("data-is-keyboard")&&e.preventDefault()},JA=c.forwardRef(({classNames:e,children:t,swipeToDismiss:r,onOpenAutoFocus:n,open:o,setOpen:i,side:a,...s},l)=>{const[u]=Bd("lg",{ssr:!1}),{tx:f}=Oe(),d=Ol(l),p=c.useRef(null);qA(r?d:p,{onDismiss:()=>i(!1)});const h=u?Ve.div:Gl;return c.createElement(ql,{open:o,modal:!1},c.createElement(h,{...!u&&{forceMount:!0,tabIndex:-1,onOpenAutoFocus:n??YA},...s,className:f("main.sidebar","main__sidebar",{isLg:u,[a==="inline-end"?"inlineEndSidebarOpen":"inlineStartSidebarOpen"]:o,side:a},e),...!o&&{inert:"true"},ref:d},c.createElement(Ci,{elevation:"group"},t)))}),$g=c.forwardRef((e,t)=>{const{navigationSidebarOpen:r,setNavigationSidebarOpen:n}=Sg(Nc);return c.createElement(JA,{...e,open:r,setOpen:n,side:"inline-start",ref:t})});$g.displayName=Nc,$g.displayName=Nc;var XA=c.forwardRef(({asChild:e,classNames:t,bounce:r,children:n,...o},i)=>{const[a]=Bd("lg",{ssr:!1}),{navigationSidebarOpen:s,complementarySidebarOpen:l}=Sg(Dc),{tx:u}=Oe(),f=e?xt:"main";return c.createElement(f,{...o,className:u("main.content","main",{isLg:a,inlineStartSidebarOpen:s,inlineEndSidebarOpen:l,bounce:r},t),ref:i},n)});XA.displayName=Dc;var Cg="Message",[ZA,Og]=uo(Cg),QA=c.forwardRef(({asChild:e,valence:t,elevation:r,className:n,titleId:o,descriptionId:i,children:a,...s},l)=>{const{tx:u}=Oe(),f=_t("message__title",o),d=_t("message__description",i),p=Bn(r),h=e?xt:Ve.div;return c.createElement(ZA,{titleId:f,descriptionId:d},c.createElement(h,{...s,className:u("message.root","message",{valence:t,elevation:p},n),"aria-labelledby":f,"aria-describedby":d,ref:l},a))});QA.displayName=Cg;var Ag="MessageTitle",eT=c.forwardRef(({asChild:e,className:t,children:r,...n},o)=>{const{tx:i}=Oe(),{titleId:a}=Og(Ag),s=e?xt:Ve.h2;return c.createElement(s,{...n,className:i("message.title","message__title",{},t),id:a,ref:o},r)});eT.displayName=Ag;var Tg="MessageBody",tT=c.forwardRef(({asChild:e,className:t,children:r,...n},o)=>{const{tx:i}=Oe(),{descriptionId:a}=Og(Tg),s=e?xt:Ve.p;return c.createElement(s,{...n,className:i("message.body","message__body",{},t),id:a,ref:o},r)});tT.displayName=Tg;var rT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Oe();return c.createElement(bC,{...t,className:n("scrollArea.root","scroll-area",{},e),ref:r})}),nT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Oe();return c.createElement(yC,{...t,className:n("scrollArea.viewport","scroll-area",{},e),ref:r})}),oT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Oe();return c.createElement(wC,{...t,className:n("scrollArea.scrollbar","scroll-area__scrollbar",{},e),ref:r})}),iT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Oe();return c.createElement(_C,{...t,className:n("scrollArea.thumb","scroll-area__thumb",{},e),ref:r})}),aT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Oe();return c.createElement(EC,{...t,className:n("scrollArea.corner","scroll-area__corner",{},e),ref:r})}),ns={Root:rT,Viewport:nT,Scrollbar:oT,Thumb:iT,Corner:aT},sT=kO,lT=NO,cT=wO,uT=mO,fT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Oe();return c.createElement(CO,{...t,className:n("tooltip.arrow","tooltip__arrow",{},e),ref:r})}),dT=c.forwardRef(({classNames:e,...t},r)=>{const{tx:n}=Oe();return c.createElement(_O,{sideOffset:4,collisionPadding:8,...t,className:n("tooltip.content","tooltip",{},e),ref:r})}),yr={Provider:sT,Root:lT,Portal:cT,Trigger:uT,Arrow:fT,Content:dT},pT=()=>!!navigator.userAgent.match(/iP(ad|od|hone).+Safari/),Ig=c.createContext({tx:(e,t,r,...n)=>t,themeMode:"dark",hasIosKeyboard:!1}),Pg=e=>{e?document.body.setAttribute("data-is-keyboard","true"):document.body.removeAttribute("data-is-keyboard")},hT=({children:e,fallback:t=null,resourceExtensions:r,appNs:n,tx:o=(l,u,f,...d)=>u,themeMode:i="dark",rootElevation:a="base",rootDensity:s="coarse"})=>(c.useEffect(()=>{if(document.defaultView){const l=UO(document.defaultView);return l.subscribe(Pg),()=>l.unsubscribe(Pg)}},[]),c.createElement(Ig.Provider,{value:{tx:o,themeMode:i,hasIosKeyboard:pT()}},c.createElement(HO,{fallback:t,resourceExtensions:r,appNs:n},c.createElement(Ci,{elevation:a},c.createElement(So,{density:s},e)))));function kg(e){return!Array.isArray(e[0])}function os(e,t){const r=e.length,n=kg(e)?[e]:e,o=kg(t)?t.map(l=>[l]):t,i=o[0].length,a=o[0].map((l,u)=>o.map(f=>f[u]));let s=n.map(l=>a.map(u=>Array.isArray(l)?l.reduce((f,d,p)=>f+d*(u[p]||0),0):u.reduce((f,d)=>f+d*l,0)));return r===1&&(s=s[0]),i===1?s.map(l=>l[0]):s}function vT(e){return e.map(t=>{const r=t<0?-1:1,n=Math.abs(t);return n<.04045?t/12.92:r*Math.pow((n+.055)/1.055,2.4)})}function Ng(e){return e.map(t=>{const r=t<0?-1:1,n=Math.abs(t);return n>.0031308?r*(1.055*Math.pow(n,1/2.4)-.055):12.92*t})}function gT(e){return os([[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],e)}function Dg(e){return os([[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],e)}function mT(e){return os([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],e)}function Lg(e){return os([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],e)}function bT(e){const t=.008856451679035631,r=24389/27,n=[.96422,1,.82521],i=e.map((a,s)=>a/n[s]).map(a=>a>t?Math.cbrt(a):(r*a+16)/116);return[116*i[1]-16,500*(i[0]-i[1]),200*(i[1]-i[2])]}function Mg(e){const t=903.2962962962963,r=216/24389,n=[.96422,1,.82521],o=[];return o[1]=(e[0]+16)/116,o[0]=e[1]/500+o[1],o[2]=o[1]-e[2]/200,[Math.pow(o[0],3)>r?Math.pow(o[0],3):(116*o[0]-16)/t,e[0]>t*r?Math.pow((e[0]+16)/116,3):e[0]/t,Math.pow(o[2],3)>r?Math.pow(o[2],3):(116*o[2]-16)/t].map((a,s)=>a*n[s])}function Lc(e){const t=Math.atan2(e[2],e[1])*180/Math.PI;return[e[0],Math.sqrt(Math.pow(e[1],2)+Math.pow(e[2],2)),t>=0?t:t+360]}function is(e){return[e[0],e[1]*Math.cos(e[2]*Math.PI/180),e[1]*Math.sin(e[2]*Math.PI/180)]}function yT(e){return Lc(bT(mT(gT(vT(e)))))}function wT(e){return Ng(Dg(Lg(Mg(is(e)))))}function _T(e){return Ng(Dg(Lg(Mg(e))))}function Fg(e,t,r){return wT([+e,+t,+r]).reduce((i,a)=>i&&a>=0-5e-6&&a<=1+5e-6,!0)}function ET(e){const r=Lc(e),n=r[0];let o=r[1];const i=r[2];if(Fg(n,o,i))return e;let a=o,s=0;for(o/=2;a-s>1e-4;)Fg(n,o,i)?s=o:a=o,o=(a+s)/2;return is([n,o,i])}const xT=128;function ST(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function $T(e,t){const r=1-e;return r*r*t}function CT(e,t){return 2*(1-e)*e*t}function OT(e,t){return e*e*t}function Mc(e,t,r,n){return $T(e,t)+CT(e,r)+OT(e,n)}function AT(e,t){const[r,n,o]=e.points;return[Mc(t,r[0],n[0],o[0]),Mc(t,r[1],n[1],o[1]),Mc(t,r[2],n[2],o[2])]}function TT(e,t){const r=[];for(let n=0;n<=t;n++)r.push(AT(e,n/t));return r}function IT(e,t=xT){const r=[];let n;for(let o=0,i=e.curves;o<i.length;o++){const a=i[o],s=TT(a,t);for(const l of s)n&&ST(n,l)||(r.push(l),n=l)}return r}const jg=.75;function PT(e,t,r){const n=[],o=(t-e)/r;for(let i=0;i<r;i++)n[i]=e+o*i;return n}const kT=(e,t,r)=>{const n=e<=0?0:Math.log(e),o=Math.log(t),i=(o-n)/r,a=[Math.pow(Math.E,n)];for(let s=1;s<r;s+=1)a.push(Math.pow(Math.E,n+i*s));return a.push(Math.pow(Math.E,o)),a};function NT(e,t,r=[0,100],n=jg){if(e.length<=2)return[];const o=[],i=kT(Math.log10(r[0]),Math.log10(r[1]),t),a=PT(r[0],r[1],t);let s=0;for(let l=0;l<t;l++){const u=Math.min(r[1],Math.max(r[0],i[l]*(1-n)+a[l]*n));for(;u>e[s+1][0];)s++;const[f,d,p]=e[s],[h,v,g]=e[s+1],y=(u-f)/(h-f);o[l]=[f+(h-f)*y,d+(v-d)*y,p+(g-p)*y]}return o.map(ET)}function DT(e,t=16,r=[0,100],n=jg,o=24){return NT(IT(e,Math.ceil(o*(1+Math.abs(e.torsion||1))/2)).map(i=>jT(i,e.torsion,e.torsionT0)),t,r,n)}function LT(e){return`#${e.map(t=>(t<0?0:Math.floor(t>=1?255:t*256)).toString(16).padStart(2,"0")).join("")}`}function Bg(e){return LT(_T(e))}function MT(e){const t=e.match(/#?(..)(..)(..)/);return t?[parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255]:[0,0,0]}function FT(e){return yT(MT(e))}function jT(e,t=0,r=50){const n=e[0],[o,i,a]=Lc(e),s=t*(n-r);return is([o,i,a+s])}function BT({keyColor:e,darkCp:t,lightCp:r,hueTorsion:n}){const o=[0,0,0],i=[100,0,0],a=is(e),[s,l,u]=a,f=[s*(1-t),l,u],d=[s+(100-s)*r,l,u];return{curves:[{points:[o,f,a]},{points:[a,d,i]}],torsion:n,torsionT0:s}}var RT={aqua:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,azure:/#f0ffff(ff)?(?!\w)/gi,beige:/#f5f5dc(ff)?(?!\w)/gi,bisque:/#ffe4c4(ff)?(?!\w)/gi,black:/#000000(ff)?(?!\w)|#000(f)?(?!\w)/gi,blue:/#0000ff(ff)?(?!\w)|#00f(f)?(?!\w)/gi,brown:/#a52a2a(ff)?(?!\w)/gi,coral:/#ff7f50(ff)?(?!\w)/gi,cornsilk:/#fff8dc(ff)?(?!\w)/gi,crimson:/#dc143c(ff)?(?!\w)/gi,cyan:/#00ffff(ff)?(?!\w)|#0ff(f)?(?!\w)/gi,darkblue:/#00008b(ff)?(?!\w)/gi,darkcyan:/#008b8b(ff)?(?!\w)/gi,darkgrey:/#a9a9a9(ff)?(?!\w)/gi,darkred:/#8b0000(ff)?(?!\w)/gi,deeppink:/#ff1493(ff)?(?!\w)/gi,dimgrey:/#696969(ff)?(?!\w)/gi,gold:/#ffd700(ff)?(?!\w)/gi,green:/#008000(ff)?(?!\w)/gi,grey:/#808080(ff)?(?!\w)/gi,honeydew:/#f0fff0(ff)?(?!\w)/gi,hotpink:/#ff69b4(ff)?(?!\w)/gi,indigo:/#4b0082(ff)?(?!\w)/gi,ivory:/#fffff0(ff)?(?!\w)/gi,khaki:/#f0e68c(ff)?(?!\w)/gi,lavender:/#e6e6fa(ff)?(?!\w)/gi,lime:/#00ff00(ff)?(?!\w)|#0f0(f)?(?!\w)/gi,linen:/#faf0e6(ff)?(?!\w)/gi,maroon:/#800000(ff)?(?!\w)/gi,moccasin:/#ffe4b5(ff)?(?!\w)/gi,navy:/#000080(ff)?(?!\w)/gi,oldlace:/#fdf5e6(ff)?(?!\w)/gi,olive:/#808000(ff)?(?!\w)/gi,orange:/#ffa500(ff)?(?!\w)/gi,orchid:/#da70d6(ff)?(?!\w)/gi,peru:/#cd853f(ff)?(?!\w)/gi,pink:/#ffc0cb(ff)?(?!\w)/gi,plum:/#dda0dd(ff)?(?!\w)/gi,purple:/#800080(ff)?(?!\w)/gi,red:/#ff0000(ff)?(?!\w)|#f00(f)?(?!\w)/gi,salmon:/#fa8072(ff)?(?!\w)/gi,seagreen:/#2e8b57(ff)?(?!\w)/gi,seashell:/#fff5ee(ff)?(?!\w)/gi,sienna:/#a0522d(ff)?(?!\w)/gi,silver:/#c0c0c0(ff)?(?!\w)/gi,skyblue:/#87ceeb(ff)?(?!\w)/gi,snow:/#fffafa(ff)?(?!\w)/gi,tan:/#d2b48c(ff)?(?!\w)/gi,teal:/#008080(ff)?(?!\w)/gi,thistle:/#d8bfd8(ff)?(?!\w)/gi,tomato:/#ff6347(ff)?(?!\w)/gi,violet:/#ee82ee(ff)?(?!\w)/gi,wheat:/#f5deb3(ff)?(?!\w)/gi,white:/#ffffff(ff)?(?!\w)|#fff(f)?(?!\w)/gi},Fc=RT,jc={whitespace:/\s+/g,urlHexPairs:/%[\dA-F]{2}/g,quotes:/"/g};function UT(e){return e.trim().replace(jc.whitespace," ")}function WT(e){return encodeURIComponent(e).replace(jc.urlHexPairs,HT)}function VT(e){return Object.keys(Fc).forEach(function(t){Fc[t].test(e)&&(e=e.replace(Fc[t],t))}),e}function HT(e){switch(e){case"%20":return" ";case"%3D":return"=";case"%3A":return":";case"%2F":return"/";default:return e.toLowerCase()}}function Bc(e){if(typeof e!="string")throw new TypeError("Expected a string, but received "+typeof e);e.charCodeAt(0)===65279&&(e=e.slice(1));var t=VT(UT(e)).replace(jc.quotes,"'");return"data:image/svg+xml,"+WT(t)}Bc.toSrcset=function(t){return Bc(t).replace(/ /g,"%20")};var zT=Bc,Rg={},Ug={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return r}});function t(n,o){return{handler:n,config:o}}t.withOptions=function(n,o=()=>({})){const i=function(a){return{__options:a,handler:n(a),config:o(a)}};return i.__isOptionsFunction=!0,i.__pluginFunction=n,i.__configFunction=o,i};const r=t})(Ug),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return n}});const t=r(Ug);function r(o){return o&&o.__esModule?o:{default:o}}const n=t.default}(Rg);let Rc=Rg;var Wg=(Rc.__esModule?Rc:{default:Rc}).default,Vg={},Hg={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"cloneDeep",{enumerable:!0,get:function(){return t}});function t(r){return Array.isArray(r)?r.map(n=>t(n)):typeof r=="object"&&r!==null?Object.fromEntries(Object.entries(r).map(([n,o])=>[n,t(o)])):r}})(Hg);var GT={content:[],presets:[],darkMode:"media",theme:{accentColor:({theme:e})=>({...e("colors"),auto:"auto"}),animation:{none:"none",spin:"spin 1s linear infinite",ping:"ping 1s cubic-bezier(0, 0, 0.2, 1) infinite",pulse:"pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite",bounce:"bounce 1s infinite"},aria:{checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',hidden:'hidden="true"',pressed:'pressed="true"',readonly:'readonly="true"',required:'required="true"',selected:'selected="true"'},aspectRatio:{auto:"auto",square:"1 / 1",video:"16 / 9"},backdropBlur:({theme:e})=>e("blur"),backdropBrightness:({theme:e})=>e("brightness"),backdropContrast:({theme:e})=>e("contrast"),backdropGrayscale:({theme:e})=>e("grayscale"),backdropHueRotate:({theme:e})=>e("hueRotate"),backdropInvert:({theme:e})=>e("invert"),backdropOpacity:({theme:e})=>e("opacity"),backdropSaturate:({theme:e})=>e("saturate"),backdropSepia:({theme:e})=>e("sepia"),backgroundColor:({theme:e})=>e("colors"),backgroundImage:{none:"none","gradient-to-t":"linear-gradient(to top, var(--tw-gradient-stops))","gradient-to-tr":"linear-gradient(to top right, var(--tw-gradient-stops))","gradient-to-r":"linear-gradient(to right, var(--tw-gradient-stops))","gradient-to-br":"linear-gradient(to bottom right, var(--tw-gradient-stops))","gradient-to-b":"linear-gradient(to bottom, var(--tw-gradient-stops))","gradient-to-bl":"linear-gradient(to bottom left, var(--tw-gradient-stops))","gradient-to-l":"linear-gradient(to left, var(--tw-gradient-stops))","gradient-to-tl":"linear-gradient(to top left, var(--tw-gradient-stops))"},backgroundOpacity:({theme:e})=>e("opacity"),backgroundPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},backgroundSize:{auto:"auto",cover:"cover",contain:"contain"},blur:{0:"0",none:"0",sm:"4px",DEFAULT:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},borderColor:({theme:e})=>({...e("colors"),DEFAULT:e("colors.gray.200","currentColor")}),borderOpacity:({theme:e})=>e("opacity"),borderRadius:{none:"0px",sm:"0.125rem",DEFAULT:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},borderSpacing:({theme:e})=>({...e("spacing")}),borderWidth:{DEFAULT:"1px",0:"0px",2:"2px",4:"4px",8:"8px"},boxShadow:{sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",DEFAULT:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)",none:"none"},boxShadowColor:({theme:e})=>e("colors"),brightness:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5",200:"2"},caretColor:({theme:e})=>e("colors"),colors:({colors:e})=>({inherit:e.inherit,current:e.current,transparent:e.transparent,black:e.black,white:e.white,slate:e.slate,gray:e.gray,zinc:e.zinc,neutral:e.neutral,stone:e.stone,red:e.red,orange:e.orange,amber:e.amber,yellow:e.yellow,lime:e.lime,green:e.green,emerald:e.emerald,teal:e.teal,cyan:e.cyan,sky:e.sky,blue:e.blue,indigo:e.indigo,violet:e.violet,purple:e.purple,fuchsia:e.fuchsia,pink:e.pink,rose:e.rose}),columns:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12","3xs":"16rem","2xs":"18rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem"},container:{},content:{none:"none"},contrast:{0:"0",50:".5",75:".75",100:"1",125:"1.25",150:"1.5",200:"2"},cursor:{auto:"auto",default:"default",pointer:"pointer",wait:"wait",text:"text",move:"move",help:"help","not-allowed":"not-allowed",none:"none","context-menu":"context-menu",progress:"progress",cell:"cell",crosshair:"crosshair","vertical-text":"vertical-text",alias:"alias",copy:"copy","no-drop":"no-drop",grab:"grab",grabbing:"grabbing","all-scroll":"all-scroll","col-resize":"col-resize","row-resize":"row-resize","n-resize":"n-resize","e-resize":"e-resize","s-resize":"s-resize","w-resize":"w-resize","ne-resize":"ne-resize","nw-resize":"nw-resize","se-resize":"se-resize","sw-resize":"sw-resize","ew-resize":"ew-resize","ns-resize":"ns-resize","nesw-resize":"nesw-resize","nwse-resize":"nwse-resize","zoom-in":"zoom-in","zoom-out":"zoom-out"},divideColor:({theme:e})=>e("borderColor"),divideOpacity:({theme:e})=>e("borderOpacity"),divideWidth:({theme:e})=>e("borderWidth"),dropShadow:{sm:"0 1px 1px rgb(0 0 0 / 0.05)",DEFAULT:["0 1px 2px rgb(0 0 0 / 0.1)","0 1px 1px rgb(0 0 0 / 0.06)"],md:["0 4px 3px rgb(0 0 0 / 0.07)","0 2px 2px rgb(0 0 0 / 0.06)"],lg:["0 10px 8px rgb(0 0 0 / 0.04)","0 4px 3px rgb(0 0 0 / 0.1)"],xl:["0 20px 13px rgb(0 0 0 / 0.03)","0 8px 5px rgb(0 0 0 / 0.08)"],"2xl":"0 25px 25px rgb(0 0 0 / 0.15)",none:"0 0 #0000"},fill:({theme:e})=>({none:"none",...e("colors")}),flex:{1:"1 1 0%",auto:"1 1 auto",initial:"0 1 auto",none:"none"},flexBasis:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%"}),flexGrow:{0:"0",DEFAULT:"1"},flexShrink:{0:"0",DEFAULT:"1"},fontFamily:{sans:["ui-sans-serif","system-ui","-apple-system","BlinkMacSystemFont",'"Segoe UI"',"Roboto",'"Helvetica Neue"',"Arial",'"Noto Sans"',"sans-serif",'"Apple Color Emoji"','"Segoe UI Emoji"','"Segoe UI Symbol"','"Noto Color Emoji"'],serif:["ui-serif","Georgia","Cambria",'"Times New Roman"',"Times","serif"],mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas",'"Liberation Mono"','"Courier New"',"monospace"]},fontSize:{xs:["0.75rem",{lineHeight:"1rem"}],sm:["0.875rem",{lineHeight:"1.25rem"}],base:["1rem",{lineHeight:"1.5rem"}],lg:["1.125rem",{lineHeight:"1.75rem"}],xl:["1.25rem",{lineHeight:"1.75rem"}],"2xl":["1.5rem",{lineHeight:"2rem"}],"3xl":["1.875rem",{lineHeight:"2.25rem"}],"4xl":["2.25rem",{lineHeight:"2.5rem"}],"5xl":["3rem",{lineHeight:"1"}],"6xl":["3.75rem",{lineHeight:"1"}],"7xl":["4.5rem",{lineHeight:"1"}],"8xl":["6rem",{lineHeight:"1"}],"9xl":["8rem",{lineHeight:"1"}]},fontWeight:{thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},gap:({theme:e})=>e("spacing"),gradientColorStops:({theme:e})=>e("colors"),gradientColorStopPositions:{"0%":"0%","5%":"5%","10%":"10%","15%":"15%","20%":"20%","25%":"25%","30%":"30%","35%":"35%","40%":"40%","45%":"45%","50%":"50%","55%":"55%","60%":"60%","65%":"65%","70%":"70%","75%":"75%","80%":"80%","85%":"85%","90%":"90%","95%":"95%","100%":"100%"},grayscale:{0:"0",DEFAULT:"100%"},gridAutoColumns:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridAutoRows:{auto:"auto",min:"min-content",max:"max-content",fr:"minmax(0, 1fr)"},gridColumn:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-7":"span 7 / span 7","span-8":"span 8 / span 8","span-9":"span 9 / span 9","span-10":"span 10 / span 10","span-11":"span 11 / span 11","span-12":"span 12 / span 12","span-full":"1 / -1"},gridColumnEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridColumnStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12",13:"13"},gridRow:{auto:"auto","span-1":"span 1 / span 1","span-2":"span 2 / span 2","span-3":"span 3 / span 3","span-4":"span 4 / span 4","span-5":"span 5 / span 5","span-6":"span 6 / span 6","span-full":"1 / -1"},gridRowEnd:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7"},gridRowStart:{auto:"auto",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7"},gridTemplateColumns:{none:"none",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))",7:"repeat(7, minmax(0, 1fr))",8:"repeat(8, minmax(0, 1fr))",9:"repeat(9, minmax(0, 1fr))",10:"repeat(10, minmax(0, 1fr))",11:"repeat(11, minmax(0, 1fr))",12:"repeat(12, minmax(0, 1fr))"},gridTemplateRows:{none:"none",1:"repeat(1, minmax(0, 1fr))",2:"repeat(2, minmax(0, 1fr))",3:"repeat(3, minmax(0, 1fr))",4:"repeat(4, minmax(0, 1fr))",5:"repeat(5, minmax(0, 1fr))",6:"repeat(6, minmax(0, 1fr))"},height:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"}),hueRotate:{0:"0deg",15:"15deg",30:"30deg",60:"60deg",90:"90deg",180:"180deg"},inset:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),invert:{0:"0",DEFAULT:"100%"},keyframes:{spin:{to:{transform:"rotate(360deg)"}},ping:{"75%, 100%":{transform:"scale(2)",opacity:"0"}},pulse:{"50%":{opacity:".5"}},bounce:{"0%, 100%":{transform:"translateY(-25%)",animationTimingFunction:"cubic-bezier(0.8,0,1,1)"},"50%":{transform:"none",animationTimingFunction:"cubic-bezier(0,0,0.2,1)"}}},letterSpacing:{tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeight:{none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},listStyleType:{none:"none",disc:"disc",decimal:"decimal"},listStyleImage:{none:"none"},margin:({theme:e})=>({auto:"auto",...e("spacing")}),lineClamp:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6"},maxHeight:({theme:e})=>({...e("spacing"),none:"none",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"}),maxWidth:({theme:e,breakpoints:t})=>({none:"none",0:"0rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem",full:"100%",min:"min-content",max:"max-content",fit:"fit-content",prose:"65ch",...t(e("screens"))}),minHeight:{0:"0px",full:"100%",screen:"100vh",min:"min-content",max:"max-content",fit:"fit-content"},minWidth:{0:"0px",full:"100%",min:"min-content",max:"max-content",fit:"fit-content"},objectPosition:{bottom:"bottom",center:"center",left:"left","left-bottom":"left bottom","left-top":"left top",right:"right","right-bottom":"right bottom","right-top":"right top",top:"top"},opacity:{0:"0",5:"0.05",10:"0.1",20:"0.2",25:"0.25",30:"0.3",40:"0.4",50:"0.5",60:"0.6",70:"0.7",75:"0.75",80:"0.8",90:"0.9",95:"0.95",100:"1"},order:{first:"-9999",last:"9999",none:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},outlineColor:({theme:e})=>e("colors"),outlineOffset:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},outlineWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},padding:({theme:e})=>e("spacing"),placeholderColor:({theme:e})=>e("colors"),placeholderOpacity:({theme:e})=>e("opacity"),ringColor:({theme:e})=>({DEFAULT:e("colors.blue.500","#3b82f6"),...e("colors")}),ringOffsetColor:({theme:e})=>e("colors"),ringOffsetWidth:{0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},ringOpacity:({theme:e})=>({DEFAULT:"0.5",...e("opacity")}),ringWidth:{DEFAULT:"3px",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},rotate:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg",45:"45deg",90:"90deg",180:"180deg"},saturate:{0:"0",50:".5",100:"1",150:"1.5",200:"2"},scale:{0:"0",50:".5",75:".75",90:".9",95:".95",100:"1",105:"1.05",110:"1.1",125:"1.25",150:"1.5"},screens:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},scrollMargin:({theme:e})=>({...e("spacing")}),scrollPadding:({theme:e})=>e("spacing"),sepia:{0:"0",DEFAULT:"100%"},skew:{0:"0deg",1:"1deg",2:"2deg",3:"3deg",6:"6deg",12:"12deg"},space:({theme:e})=>({...e("spacing")}),spacing:{px:"1px",0:"0px",.5:"0.125rem",1:"0.25rem",1.5:"0.375rem",2:"0.5rem",2.5:"0.625rem",3:"0.75rem",3.5:"0.875rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem",11:"2.75rem",12:"3rem",14:"3.5rem",16:"4rem",20:"5rem",24:"6rem",28:"7rem",32:"8rem",36:"9rem",40:"10rem",44:"11rem",48:"12rem",52:"13rem",56:"14rem",60:"15rem",64:"16rem",72:"18rem",80:"20rem",96:"24rem"},stroke:({theme:e})=>({none:"none",...e("colors")}),strokeWidth:{0:"0",1:"1",2:"2"},supports:{},data:{},textColor:({theme:e})=>e("colors"),textDecorationColor:({theme:e})=>e("colors"),textDecorationThickness:{auto:"auto","from-font":"from-font",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},textIndent:({theme:e})=>({...e("spacing")}),textOpacity:({theme:e})=>e("opacity"),textUnderlineOffset:{auto:"auto",0:"0px",1:"1px",2:"2px",4:"4px",8:"8px"},transformOrigin:{center:"center",top:"top","top-right":"top right",right:"right","bottom-right":"bottom right",bottom:"bottom","bottom-left":"bottom left",left:"left","top-left":"top left"},transitionDelay:{0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionDuration:{DEFAULT:"150ms",0:"0s",75:"75ms",100:"100ms",150:"150ms",200:"200ms",300:"300ms",500:"500ms",700:"700ms",1e3:"1000ms"},transitionProperty:{none:"none",all:"all",DEFAULT:"color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter",colors:"color, background-color, border-color, text-decoration-color, fill, stroke",opacity:"opacity",shadow:"box-shadow",transform:"transform"},transitionTimingFunction:{DEFAULT:"cubic-bezier(0.4, 0, 0.2, 1)",linear:"linear",in:"cubic-bezier(0.4, 0, 1, 1)",out:"cubic-bezier(0, 0, 0.2, 1)","in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},translate:({theme:e})=>({...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%",full:"100%"}),width:({theme:e})=>({auto:"auto",...e("spacing"),"1/2":"50%","1/3":"33.333333%","2/3":"66.666667%","1/4":"25%","2/4":"50%","3/4":"75%","1/5":"20%","2/5":"40%","3/5":"60%","4/5":"80%","1/6":"16.666667%","2/6":"33.333333%","3/6":"50%","4/6":"66.666667%","5/6":"83.333333%","1/12":"8.333333%","2/12":"16.666667%","3/12":"25%","4/12":"33.333333%","5/12":"41.666667%","6/12":"50%","7/12":"58.333333%","8/12":"66.666667%","9/12":"75%","10/12":"83.333333%","11/12":"91.666667%",full:"100%",screen:"100vw",min:"min-content",max:"max-content",fit:"fit-content"}),willChange:{auto:"auto",scroll:"scroll-position",contents:"contents",transform:"transform"},zIndex:{auto:"auto",0:"0",10:"10",20:"20",30:"30",40:"40",50:"50"}},plugins:[]};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});const t=Hg,r=n(GT);function n(i){return i&&i.__esModule?i:{default:i}}const o=(0,t.cloneDeep)(r.default.theme)})(Vg);let Uc=Vg;var KT=(Uc.__esModule?Uc:{default:Uc}).default,zg={},Gg={},Wc={exports:{}},pt=String,Kg=function(){return{isColorSupported:!1,reset:pt,bold:pt,dim:pt,italic:pt,underline:pt,inverse:pt,hidden:pt,strikethrough:pt,black:pt,red:pt,green:pt,yellow:pt,blue:pt,magenta:pt,cyan:pt,white:pt,gray:pt,bgBlack:pt,bgRed:pt,bgGreen:pt,bgYellow:pt,bgBlue:pt,bgMagenta:pt,bgCyan:pt,bgWhite:pt}};Wc.exports=Kg(),Wc.exports.createColors=Kg;var qT=Wc.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0});function t(l,u){for(var f in u)Object.defineProperty(l,f,{enumerable:!0,get:u[f]})}t(e,{dim:function(){return a},default:function(){return s}});const r=n(qT);function n(l){return l&&l.__esModule?l:{default:l}}let o=new Set;function i(l,u,f){typeof process<"u"&&process.env.JEST_WORKER_ID||f&&o.has(f)||(f&&o.add(f),console.warn(""),u.forEach(d=>console.warn(l,"-",d)))}function a(l){return r.default.dim(l)}const s={info(l,u){i(r.default.bold(r.default.cyan("info")),...Array.isArray(l)?[l]:[u,l])},warn(l,u){i(r.default.bold(r.default.yellow("warn")),...Array.isArray(l)?[l]:[u,l])},risk(l,u){i(r.default.bold(r.default.magenta("risk")),...Array.isArray(l)?[l]:[u,l])}}})(Gg),function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return o}});const t=r(Gg);function r(i){return i&&i.__esModule?i:{default:i}}function n({version:i,from:a,to:s}){t.default.warn(`${a}-color-renamed`,[`As of Tailwind CSS ${i}, \`${a}\` has been renamed to \`${s}\`.`,"Update your configuration file to silence this warning."])}const o={inherit:"inherit",current:"currentColor",transparent:"transparent",black:"#000",white:"#fff",slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},get lightBlue(){return n({version:"v2.2",from:"lightBlue",to:"sky"}),this.sky},get warmGray(){return n({version:"v3.0",from:"warmGray",to:"stone"}),this.stone},get trueGray(){return n({version:"v3.0",from:"trueGray",to:"neutral"}),this.neutral},get coolGray(){return n({version:"v3.0",from:"coolGray",to:"gray"}),this.gray},get blueGray(){return n({version:"v3.0",from:"blueGray",to:"slate"}),this.slate}}}(zg);let Vc=zg;var YT=(Vc.__esModule?Vc:{default:Vc}).default;const as=zT,JT=Wg,qg=KT,mn=YT,[XT,{lineHeight:ZT}]=qg.fontSize.base,{spacing:Zr,borderWidth:Yg,borderRadius:Jg}=qg;JT.withOptions(function(e={strategy:void 0}){return function({addBase:t,addComponents:r,theme:n}){const o=e.strategy===void 0?["base","class"]:[e.strategy],i=[{base:["[type='text']","[type='email']","[type='url']","[type='password']","[type='number']","[type='date']","[type='datetime-local']","[type='month']","[type='search']","[type='tel']","[type='time']","[type='week']","[multiple]","textarea","select"],class:[".form-input",".form-textarea",".form-select",".form-multiselect"],styles:{appearance:"none","background-color":"#fff","border-color":n("colors.gray.500",mn.gray[500]),"border-width":Yg.DEFAULT,"border-radius":Jg.none,"padding-top":Zr[2],"padding-right":Zr[3],"padding-bottom":Zr[2],"padding-left":Zr[3],"font-size":XT,"line-height":ZT,"--tw-shadow":"0 0 #0000","&:focus":{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"0px","--tw-ring-offset-color":"#fff","--tw-ring-color":n("colors.blue.600",mn.blue[600]),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)","border-color":n("colors.blue.600",mn.blue[600])}}},{base:["input::placeholder","textarea::placeholder"],class:[".form-input::placeholder",".form-textarea::placeholder"],styles:{color:n("colors.gray.500",mn.gray[500]),opacity:"1"}},{base:["::-webkit-datetime-edit-fields-wrapper"],class:[".form-input::-webkit-datetime-edit-fields-wrapper"],styles:{padding:"0"}},{base:["::-webkit-date-and-time-value"],class:[".form-input::-webkit-date-and-time-value"],styles:{"min-height":"1.5em"}},{base:["::-webkit-datetime-edit","::-webkit-datetime-edit-year-field","::-webkit-datetime-edit-month-field","::-webkit-datetime-edit-day-field","::-webkit-datetime-edit-hour-field","::-webkit-datetime-edit-minute-field","::-webkit-datetime-edit-second-field","::-webkit-datetime-edit-millisecond-field","::-webkit-datetime-edit-meridiem-field"],class:[".form-input::-webkit-datetime-edit",".form-input::-webkit-datetime-edit-year-field",".form-input::-webkit-datetime-edit-month-field",".form-input::-webkit-datetime-edit-day-field",".form-input::-webkit-datetime-edit-hour-field",".form-input::-webkit-datetime-edit-minute-field",".form-input::-webkit-datetime-edit-second-field",".form-input::-webkit-datetime-edit-millisecond-field",".form-input::-webkit-datetime-edit-meridiem-field"],styles:{"padding-top":0,"padding-bottom":0}},{base:["select"],class:[".form-select"],styles:{"background-image":`url("${as(`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="${n("colors.gray.500",mn.gray[500])}" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6 8l4 4 4-4"/></svg>`)}")`,"background-position":`right ${Zr[2]} center`,"background-repeat":"no-repeat","background-size":"1.5em 1.5em","padding-right":Zr[10],"print-color-adjust":"exact"}},{base:["[multiple]"],class:null,styles:{"background-image":"initial","background-position":"initial","background-repeat":"unset","background-size":"initial","padding-right":Zr[3],"print-color-adjust":"unset"}},{base:["[type='checkbox']","[type='radio']"],class:[".form-checkbox",".form-radio"],styles:{appearance:"none",padding:"0","print-color-adjust":"exact",display:"inline-block","vertical-align":"middle","background-origin":"border-box","user-select":"none","flex-shrink":"0",height:Zr[4],width:Zr[4],color:n("colors.blue.600",mn.blue[600]),"background-color":"#fff","border-color":n("colors.gray.500",mn.gray[500]),"border-width":Yg.DEFAULT,"--tw-shadow":"0 0 #0000"}},{base:["[type='checkbox']"],class:[".form-checkbox"],styles:{"border-radius":Jg.none}},{base:["[type='radio']"],class:[".form-radio"],styles:{"border-radius":"100%"}},{base:["[type='checkbox']:focus","[type='radio']:focus"],class:[".form-checkbox:focus",".form-radio:focus"],styles:{outline:"2px solid transparent","outline-offset":"2px","--tw-ring-inset":"var(--tw-empty,/*!*/ /*!*/)","--tw-ring-offset-width":"2px","--tw-ring-offset-color":"#fff","--tw-ring-color":n("colors.blue.600",mn.blue[600]),"--tw-ring-offset-shadow":"var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)","--tw-ring-shadow":"var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)","box-shadow":"var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)"}},{base:["[type='checkbox']:checked","[type='radio']:checked"],class:[".form-checkbox:checked",".form-radio:checked"],styles:{"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat"}},{base:["[type='checkbox']:checked"],class:[".form-checkbox:checked"],styles:{"background-image":`url("${as('<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><path d="M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z"/></svg>')}")`}},{base:["[type='radio']:checked"],class:[".form-radio:checked"],styles:{"background-image":`url("${as('<svg viewBox="0 0 16 16" fill="white" xmlns="http://www.w3.org/2000/svg"><circle cx="8" cy="8" r="3"/></svg>')}")`}},{base:["[type='checkbox']:checked:hover","[type='checkbox']:checked:focus","[type='radio']:checked:hover","[type='radio']:checked:focus"],class:[".form-checkbox:checked:hover",".form-checkbox:checked:focus",".form-radio:checked:hover",".form-radio:checked:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["[type='checkbox']:indeterminate"],class:[".form-checkbox:indeterminate"],styles:{"background-image":`url("${as('<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 8h8"/></svg>')}")`,"border-color":"transparent","background-color":"currentColor","background-size":"100% 100%","background-position":"center","background-repeat":"no-repeat"}},{base:["[type='checkbox']:indeterminate:hover","[type='checkbox']:indeterminate:focus"],class:[".form-checkbox:indeterminate:hover",".form-checkbox:indeterminate:focus"],styles:{"border-color":"transparent","background-color":"currentColor"}},{base:["[type='file']"],class:null,styles:{background:"unset","border-color":"inherit","border-width":"0","border-radius":"0",padding:"0","font-size":"unset","line-height":"inherit"}},{base:["[type='file']:focus"],class:null,styles:{outline:["1px solid ButtonText","1px auto -webkit-focus-ring-color"]}}],a=s=>i.map(l=>l[s]===null?null:{[l[s]]:l.styles}).filter(Boolean);o.includes("base")&&t(a("base")),o.includes("class")&&r(a("class"))}});var ss={exports:{}};ss.exports,function(e,t){var r=200,n="__lodash_hash_undefined__",o=800,i=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",f="[object Boolean]",d="[object Date]",p="[object Error]",h="[object Function]",v="[object GeneratorFunction]",g="[object Map]",y="[object Number]",m="[object Null]",w="[object Object]",E="[object Proxy]",x="[object RegExp]",P="[object Set]",I="[object String]",S="[object Undefined]",A="[object WeakMap]",k="[object ArrayBuffer]",j="[object DataView]",D="[object Float32Array]",N="[object Float64Array]",J="[object Int8Array]",K="[object Int16Array]",Y="[object Int32Array]",te="[object Uint8Array]",oe="[object Uint8ClampedArray]",le="[object Uint16Array]",ae="[object Uint32Array]",ve=/[\\^$.*+?()[\]{}|]/g,ce=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,V={};V[D]=V[N]=V[J]=V[K]=V[Y]=V[te]=V[oe]=V[le]=V[ae]=!0,V[s]=V[l]=V[k]=V[f]=V[j]=V[d]=V[p]=V[h]=V[g]=V[y]=V[w]=V[x]=V[P]=V[I]=V[A]=!1;var re=typeof Ge=="object"&&Ge&&Ge.Object===Object&&Ge,de=typeof self=="object"&&self&&self.Object===Object&&self,U=re||de||Function("return this")(),z=t&&!t.nodeType&&t,M=z&&!0&&e&&!e.nodeType&&e,R=M&&M.exports===z,G=R&&re.process,O=function(){try{var F=M&&M.require&&M.require("util").types;return F||G&&G.binding&&G.binding("util")}catch{}}(),T=O&&O.isTypedArray;function Z(F,Q,$){switch($.length){case 0:return F.call(Q);case 1:return F.call(Q,$[0]);case 2:return F.call(Q,$[0],$[1]);case 3:return F.call(Q,$[0],$[1],$[2])}return F.apply(Q,$)}function ne(F,Q){for(var $=-1,B=Array(F);++$<F;)B[$]=Q($);return B}function pe(F){return function(Q){return F(Q)}}function me(F,Q){return F?.[Q]}function xe(F,Q){return function($){return F(Q($))}}var Ee=Array.prototype,ie=Function.prototype,Ne=Object.prototype,ft=U["__core-js_shared__"],Te=ie.toString,Me=Ne.hasOwnProperty,mt=function(){var F=/[^.]+$/.exec(ft&&ft.keys&&ft.keys.IE_PROTO||"");return F?"Symbol(src)_1."+F:""}(),$e=Ne.toString,De=Te.call(Object),C=RegExp("^"+Te.call(Me).replace(ve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=R?U.Buffer:void 0,_=U.Symbol,L=U.Uint8Array,W=b?b.allocUnsafe:void 0,X=xe(Object.getPrototypeOf,Object),se=Object.create,Pe=Ne.propertyIsEnumerable,ot=Ee.splice,Le=_?_.toStringTag:void 0,qe=function(){try{var F=On(Object,"defineProperty");return F({},"",{}),F}catch{}}(),Je=b?b.isBuffer:void 0,tn=Math.max,Yo=Date.now,fr=On(U,"Map"),Gt=On(Object,"create"),ro=function(){function F(){}return function(Q){if(!Vr(Q))return{};if(se)return se(Q);F.prototype=Q;var $=new F;return F.prototype=void 0,$}}();function kt(F){var Q=-1,$=F==null?0:F.length;for(this.clear();++Q<$;){var B=F[Q];this.set(B[0],B[1])}}function ea(){this.__data__=Gt?Gt(null):{},this.size=0}function Jo(F){var Q=this.has(F)&&delete this.__data__[F];return this.size-=Q?1:0,Q}function ta(F){var Q=this.__data__;if(Gt){var $=Q[F];return $===n?void 0:$}return Me.call(Q,F)?Q[F]:void 0}function Xo(F){var Q=this.__data__;return Gt?Q[F]!==void 0:Me.call(Q,F)}function Zo(F,Q){var $=this.__data__;return this.size+=this.has(F)?0:1,$[F]=Gt&&Q===void 0?n:Q,this}kt.prototype.clear=ea,kt.prototype.delete=Jo,kt.prototype.get=ta,kt.prototype.has=Xo,kt.prototype.set=Zo;function $t(F){var Q=-1,$=F==null?0:F.length;for(this.clear();++Q<$;){var B=F[Q];this.set(B[0],B[1])}}function ra(){this.__data__=[],this.size=0}function Qo(F){var Q=this.__data__,$=It(Q,F);if($<0)return!1;var B=Q.length-1;return $==B?Q.pop():ot.call(Q,$,1),--this.size,!0}function na(F){var Q=this.__data__,$=It(Q,F);return $<0?void 0:Q[$][1]}function oa(F){return It(this.__data__,F)>-1}function ia(F,Q){var $=this.__data__,B=It($,F);return B<0?(++this.size,$.push([F,Q])):$[B][1]=Q,this}$t.prototype.clear=ra,$t.prototype.delete=Qo,$t.prototype.get=na,$t.prototype.has=oa,$t.prototype.set=ia;function Kt(F){var Q=-1,$=F==null?0:F.length;for(this.clear();++Q<$;){var B=F[Q];this.set(B[0],B[1])}}function H(){this.size=0,this.__data__={hash:new kt,map:new(fr||$t),string:new kt}}function fe(F){var Q=oo(this,F).delete(F);return this.size-=Q?1:0,Q}function we(F){return oo(this,F).get(F)}function Ae(F){return oo(this,F).has(F)}function ze(F,Q){var $=oo(this,F),B=$.size;return $.set(F,Q),this.size+=$.size==B?0:1,this}Kt.prototype.clear=H,Kt.prototype.delete=fe,Kt.prototype.get=we,Kt.prototype.has=Ae,Kt.prototype.set=ze;function Fe(F){var Q=this.__data__=new $t(F);this.size=Q.size}function Be(){this.__data__=new $t,this.size=0}function je(F){var Q=this.__data__,$=Q.delete(F);return this.size=Q.size,$}function Tt(F){return this.__data__.get(F)}function gt(F){return this.__data__.has(F)}function bt(F,Q){var $=this.__data__;if($ instanceof $t){var B=$.__data__;if(!fr||B.length<r-1)return B.push([F,Q]),this.size=++$.size,this;$=this.__data__=new Kt(B)}return $.set(F,Q),this.size=$.size,this}Fe.prototype.clear=Be,Fe.prototype.delete=je,Fe.prototype.get=Tt,Fe.prototype.has=gt,Fe.prototype.set=bt;function Rt(F,Q){var $=io(F),B=!$&&An(F),ee=!$&&!B&&ml(F),he=!$&&!B&&!ee&&bl(F),Ce=$||B||ee||he,Se=Ce?ne(F.length,String):[],Ie=Se.length;for(var ke in F)(Q||Me.call(F,ke))&&!(Ce&&(ke=="length"||ee&&(ke=="offset"||ke=="parent")||he&&(ke=="buffer"||ke=="byteLength"||ke=="byteOffset")||pl(ke,Ie)))&&Se.push(ke);return Se}function Zt(F,Q,$){($!==void 0&&!ri(F[Q],$)||$===void 0&&!(Q in F))&&no(F,Q,$)}function ei(F,Q,$){var B=F[Q];(!(Me.call(F,Q)&&ri(B,$))||$===void 0&&!(Q in F))&&no(F,Q,$)}function It(F,Q){for(var $=F.length;$--;)if(ri(F[$][0],Q))return $;return-1}function no(F,Q,$){Q=="__proto__"&&qe?qe(F,Q,{configurable:!0,enumerable:!0,value:$,writable:!0}):F[Q]=$}var rd=hd();function rn(F){return F==null?F===void 0?S:m:Le&&Le in Object(F)?sa(F):bd(F)}function aa(F){return qt(F)&&rn(F)==s}function nd(F){if(!Vr(F)||md(F))return!1;var Q=ni(F)?C:ce;return Q.test(_d(F))}function od(F){return qt(F)&&oi(F.length)&&!!V[rn(F)]}function id(F){if(!Vr(F))return gl(F);var Q=vl(F),$=[];for(var B in F)B=="constructor"&&(Q||!Me.call(F,B))||$.push(B);return $}function ti(F,Q,$,B,ee){F!==Q&&rd(Q,function(he,Ce){if(ee||(ee=new Fe),Vr(he))ad(F,Q,Ce,$,ti,B,ee);else{var Se=B?B(la(F,Ce),he,Ce+"",F,Q,ee):void 0;Se===void 0&&(Se=he),Zt(F,Ce,Se)}},wl)}function ad(F,Q,$,B,ee,he,Ce){var Se=la(F,$),Ie=la(Q,$),ke=Ce.get(Ie);if(ke){Zt(F,$,ke);return}var Re=he?he(Se,Ie,$+"",F,Q,Ce):void 0,Nt=Re===void 0;if(Nt){var Mt=io(Ie),nn=!Mt&&ml(Ie),ii=!Mt&&!nn&&bl(Ie);Re=Ie,Mt||nn||ii?io(Se)?Re=Se:ua(Se)?Re=fd(Se):nn?(Nt=!1,Re=ld(Ie,!0)):ii?(Nt=!1,Re=ud(Ie,!0)):Re=[]:so(Ie)||An(Ie)?(Re=Se,An(Se)?Re=yl(Se):(!Vr(Se)||ni(Se))&&(Re=vd(Ie))):Nt=!1}Nt&&(Ce.set(Ie,Re),ee(Re,Ie,B,he,Ce),Ce.delete(Ie)),Zt(F,$,Re)}function dl(F,Q){return ca(yd(F,Q,El),F+"")}var sd=qe?function(F,Q){return qe(F,"toString",{configurable:!0,enumerable:!1,value:_l(Q),writable:!0})}:El;function ld(F,Q){if(Q)return F.slice();var $=F.length,B=W?W($):new F.constructor($);return F.copy(B),B}function cd(F){var Q=new F.constructor(F.byteLength);return new L(Q).set(new L(F)),Q}function ud(F,Q){var $=Q?cd(F.buffer):F.buffer;return new F.constructor($,F.byteOffset,F.length)}function fd(F,Q){var $=-1,B=F.length;for(Q||(Q=Array(B));++$<B;)Q[$]=F[$];return Q}function dd(F,Q,$,B){var ee=!$;$||($={});for(var he=-1,Ce=Q.length;++he<Ce;){var Se=Q[he],Ie=B?B($[Se],F[Se],Se,$,F):void 0;Ie===void 0&&(Ie=F[Se]),ee?no($,Se,Ie):ei($,Se,Ie)}return $}function pd(F){return dl(function(Q,$){var B=-1,ee=$.length,he=ee>1?$[ee-1]:void 0,Ce=ee>2?$[2]:void 0;for(he=F.length>3&&typeof he=="function"?(ee--,he):void 0,Ce&&hl($[0],$[1],Ce)&&(he=ee<3?void 0:he,ee=1),Q=Object(Q);++B<ee;){var Se=$[B];Se&&F(Q,Se,B,he)}return Q})}function hd(F){return function(Q,$,B){for(var ee=-1,he=Object(Q),Ce=B(Q),Se=Ce.length;Se--;){var Ie=Ce[F?Se:++ee];if($(he[Ie],Ie,he)===!1)break}return Q}}function oo(F,Q){var $=F.__data__;return gd(Q)?$[typeof Q=="string"?"string":"hash"]:$.map}function On(F,Q){var $=me(F,Q);return nd($)?$:void 0}function sa(F){var Q=Me.call(F,Le),$=F[Le];try{F[Le]=void 0;var B=!0}catch{}var ee=$e.call(F);return B&&(Q?F[Le]=$:delete F[Le]),ee}function vd(F){return typeof F.constructor=="function"&&!vl(F)?ro(X(F)):{}}function pl(F,Q){var $=typeof F;return Q=Q??a,!!Q&&($=="number"||$!="symbol"&&q.test(F))&&F>-1&&F%1==0&&F<Q}function hl(F,Q,$){if(!Vr($))return!1;var B=typeof Q;return(B=="number"?ao($)&&pl(Q,$.length):B=="string"&&Q in $)?ri($[Q],F):!1}function gd(F){var Q=typeof F;return Q=="string"||Q=="number"||Q=="symbol"||Q=="boolean"?F!=="__proto__":F===null}function md(F){return!!mt&&mt in F}function vl(F){var Q=F&&F.constructor,$=typeof Q=="function"&&Q.prototype||Ne;return F===$}function gl(F){var Q=[];if(F!=null)for(var $ in Object(F))Q.push($);return Q}function bd(F){return $e.call(F)}function yd(F,Q,$){return Q=tn(Q===void 0?F.length-1:Q,0),function(){for(var B=arguments,ee=-1,he=tn(B.length-Q,0),Ce=Array(he);++ee<he;)Ce[ee]=B[Q+ee];ee=-1;for(var Se=Array(Q+1);++ee<Q;)Se[ee]=B[ee];return Se[Q]=$(Ce),Z(F,this,Se)}}function la(F,Q){if(!(Q==="constructor"&&typeof F[Q]=="function")&&Q!="__proto__")return F[Q]}var ca=wd(sd);function wd(F){var Q=0,$=0;return function(){var B=Yo(),ee=i-(B-$);if($=B,ee>0){if(++Q>=o)return arguments[0]}else Q=0;return F.apply(void 0,arguments)}}function _d(F){if(F!=null){try{return Te.call(F)}catch{}try{return F+""}catch{}}return""}function ri(F,Q){return F===Q||F!==F&&Q!==Q}var An=aa(function(){return arguments}())?aa:function(F){return qt(F)&&Me.call(F,"callee")&&!Pe.call(F,"callee")},io=Array.isArray;function ao(F){return F!=null&&oi(F.length)&&!ni(F)}function ua(F){return qt(F)&&ao(F)}var ml=Je||xd;function ni(F){if(!Vr(F))return!1;var Q=rn(F);return Q==h||Q==v||Q==u||Q==E}function oi(F){return typeof F=="number"&&F>-1&&F%1==0&&F<=a}function Vr(F){var Q=typeof F;return F!=null&&(Q=="object"||Q=="function")}function qt(F){return F!=null&&typeof F=="object"}function so(F){if(!qt(F)||rn(F)!=w)return!1;var Q=X(F);if(Q===null)return!0;var $=Me.call(Q,"constructor")&&Q.constructor;return typeof $=="function"&&$ instanceof $&&Te.call($)==De}var bl=T?pe(T):od;function yl(F){return dd(F,wl(F))}function wl(F){return ao(F)?Rt(F,!0):id(F)}var Ed=pd(function(F,Q,$){ti(F,Q,$)});function _l(F){return function(){return F}}function El(F){return F}function xd(){return!1}e.exports=Ed}(ss,ss.exports),ss.exports;var ls={},cs={};Object.defineProperty(cs,"__esModule",{value:!0}),cs.default=void 0;function Xg(e,t){return{handler:e,config:t}}Xg.withOptions=function(e,t=()=>({})){const r=function(n){return{__options:n,handler:e(n),config:t(n)}};return r.__isOptionsFunction=!0,r.__pluginFunction=e,r.__configFunction=t,r};var QT=Xg;cs.default=QT,Object.defineProperty(ls,"__esModule",{value:!0}),ls.default=void 0;var e5=t5(cs);function t5(e){return e&&e.__esModule?e:{default:e}}var r5=e5.default;ls.default=r5;let Hc=ls;var n5=(Hc.__esModule?Hc:{default:Hc}).default,o5=function({matchUtilities:e,theme:t}){e({bs:r=>({blockSize:r})},{values:t("height")})},us={};Object.defineProperty(us,"__esModule",{value:!0}),us.default=void 0;const Zg=e=>Object.assign({},...Object.entries(e??{}).flatMap(([t,r])=>typeof r=="object"?Object.entries(Zg(r)).map(([n,o])=>({[t+(n==="DEFAULT"?"":`-${n}`)]:o})):[{[`${t}`]:r}]));var i5=Zg;us.default=i5;var zc={};Object.defineProperty(zc,"__esModule",{value:!0}),zc.default=a5;function a5(e){return typeof e=="function"?e({}):e}var fs={},ds={},s5={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};Object.defineProperty(ds,"__esModule",{value:!0}),ds.parseColor=p5,ds.formatColor=h5;var Qg=l5(s5);function l5(e){return e&&e.__esModule?e:{default:e}}let c5=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,u5=/^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,ps="(?:\\d+|\\d*\\.\\d+)%?",em="(?:\\s*,\\s*|\\s+)",f5="\\s*[,/]\\s*",d5=new RegExp(`^(rgb|hsl)a?\\(\\s*(${ps})${em}(${ps})${em}(${ps})(?:${f5}(${ps}))?\\s*\\)$`);function p5(e){if(typeof e!="string")return null;if(e=e.trim(),e==="transparent")return{mode:"rgb",color:["0","0","0"],alpha:"0"};if(e in Qg.default)return{mode:"rgb",color:Qg.default[e].map(i=>i.toString())};let t=e.replace(u5,(i,a,s,l,u)=>["#",a,a,s,s,l,l,u?u+u:""].join("")).match(c5);if(t!==null)return{mode:"rgb",color:[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)].map(i=>i.toString()),alpha:t[4]?(parseInt(t[4],16)/255).toString():void 0};let r=e.match(d5);if(r!==null){var n,o;return{mode:r[1],color:[r[2],r[3],r[4]].map(i=>i.toString()),alpha:(n=r[5])===null||n===void 0||(o=n.toString)===null||o===void 0?void 0:o.call(n)}}return null}function h5({mode:e,color:t,alpha:r}){let n=r!==void 0;return`${e}(${t.join(" ")}${n?` / ${r}`:""})`}Object.defineProperty(fs,"__esModule",{value:!0}),fs.withAlphaValue=v5,fs.default=g5;var hs=ds;function v5(e,t,r){if(typeof e=="function")return e({opacityValue:t});let n=hs.parseColor(e);return n===null?r:hs.formatColor({...n,alpha:t})}function g5({color:e,property:t,variable:r}){let n=[].concat(t);if(typeof e=="function")return{[r]:"1",...Object.fromEntries(n.map(i=>[i,e({opacityVariable:r,opacityValue:`var(${r})`})]))};const o=hs.parseColor(e);return o===null?Object.fromEntries(n.map(i=>[i,e])):o.alpha!==void 0?Object.fromEntries(n.map(i=>[i,e])):{[r]:"1",...Object.fromEntries(n.map(i=>[i,hs.formatColor({...o,alpha:`var(${r})`})]))}}const tm=us.default,bn=zc.default,$o=fs.default;var m5=function({corePlugins:e,matchUtilities:t,theme:r}){t({"border-lb":n=>e("borderOpacity")?$o({color:n,property:["border-block-start-color","border-block-end-color"],variable:"--tw-border-opacity"}):{"border-block-start-color":bn(n),"border-block-end-color":bn(n)},"border-li":n=>e("borderOpacity")?$o({color:n,property:["border-inline-start-color","border-inline-end-color"],variable:"--tw-border-opacity"}):{"border-inline-start-color":bn(n),"border-inline-end-color":bn(n)}},{values:(({DEFAULT:n,...o})=>o)(tm(r("borderColor"))),type:"color"}),t({"border-bs":n=>e("borderOpacity")?$o({color:n,property:"border-block-start-color",variable:"--tw-border-opacity"}):{"border-block-start-color":bn(n)},"border-be":n=>e("borderOpacity")?$o({color:n,property:"border-block-end-color",variable:"--tw-border-opacity"}):{"border-block-end-color":bn(n)},"border-is":n=>e("borderOpacity")?$o({color:n,property:"border-inline-start-color",variable:"--tw-border-opacity"}):{"border-inline-start-color":bn(n)},"border-ie":n=>e("borderOpacity")?$o({color:n,property:"border-inline-end-color",variable:"--tw-border-opacity"}):{"border-inline-end-color":bn(n)}},{values:(({DEFAULT:n,...o})=>o)(tm(r("borderColor"))),type:"color"})},b5=function({matchUtilities:e,theme:t}){e({"rounded-bs":r=>({borderStartStartRadius:r,borderStartEndRadius:r}),"rounded-be":r=>({borderEndStartRadius:r,borderEndEndRadius:r}),"rounded-is":r=>({borderStartStartRadius:r,borderEndStartRadius:r}),"rounded-ie":r=>({borderStartEndRadius:r,borderEndEndRadius:r})},{values:t("borderRadius")}),e({"rounded-ss":r=>({borderStartStartRadius:r}),"rounded-se":r=>({borderStartEndRadius:r}),"rounded-es":r=>({borderEndStartRadius:r}),"rounded-ee":r=>({borderEndEndRadius:r})},{values:t("borderRadius")})},y5=function({matchUtilities:e,theme:t}){e({"border-lb":r=>({borderBlockStartWidth:r,borderBlockEndWidth:r}),"border-li":r=>({borderInlineStartWidth:r,borderInlineEndWidth:r})},{values:t("borderWidth")}),e({"border-bs":r=>({borderBlockStartWidth:r}),"border-be":r=>({borderBlockEndWidth:r}),"border-is":r=>({borderInlineStartWidth:r}),"border-ie":r=>({borderInlineEndWidth:r})},{values:t("borderWidth")})},w5=function({addUtilities:e}){e({".clear-start":{clear:"inline-start"},".clear-end":{clear:"inline-end"}})},_5=function({addUtilities:e,matchUtilities:t,theme:r}){t({"divide-b":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-divide-b-reverse":"0","border-block-start-width":`calc(${n} * calc(1 - var(--tw-divide-b-reverse)))`,"border-block-end-width":`calc(${n} * var(--tw-divide-b-reverse))`}}),"divide-i":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-divide-i-reverse":"0","border-inline-start-width":`calc(${n} * calc(1 - var(--tw-divide-i-reverse)))`,"border-inline-end-width":`calc(${n} * var(--tw-divide-i-reverse))`}})},{values:r("divideWidth")}),e({".divide-b-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-divide-b-reverse":"1"},".divide-i-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-divide-i-reverse":"1"}})},E5=function({addUtilities:e}){e({".float-start":{float:"inline-start"},".float-end":{float:"inline-end"}})},x5=function({matchUtilities:e,theme:t}){e({is:r=>({inlineSize:r})},{values:t("width")})},S5=function({matchUtilities:e,theme:t}){e({"inset-block":r=>({insetBlock:r}),"inset-inline":r=>({insetInline:r})},{supportsNegativeValues:!0,values:t("inset")}),e({"block-start":r=>({insetBlockStart:r}),"block-end":r=>({insetBlockEnd:r}),"inline-start":r=>({insetInlineStart:r}),"inline-end":r=>({insetInlineEnd:r})},{supportsNegativeValues:!0,values:t("inset")})},$5=function({matchUtilities:e,theme:t}){e({mlb:r=>({marginBlock:r}),mli:r=>({marginInline:r})},{supportsNegativeValues:!0,values:t("margin")}),e({mbs:r=>({marginBlockStart:r}),mbe:r=>({marginBlockEnd:r}),mis:r=>({marginInlineStart:r}),mie:r=>({marginInlineEnd:r})},{supportsNegativeValues:!0,values:t("margin")})},C5=function({matchUtilities:e,theme:t}){e({"max-bs":r=>({maxBlockSize:r})},{values:t("maxHeight")})},O5=function({matchUtilities:e,theme:t}){e({"max-is":r=>({maxInlineSize:r})},{values:t("maxWidth")})},A5=function({matchUtilities:e,theme:t}){e({"min-bs":r=>({minBlockSize:r})},{values:t("minHeight")})},T5=function({matchUtilities:e,theme:t}){e({"min-is":r=>({minInlineSize:r})},{values:t("minWidth")})},I5=function({addUtilities:e}){e({".overscroll-b-auto":{overscrollBehaviorBlock:"auto"},".overscroll-b-contain":{overscrollBehaviorBlock:"contain"},".overscroll-b-none":{overscrollBehaviorBlock:"none"},".overscroll-i-auto":{overscrollBehaviorInline:"auto"},".overscroll-i-contain":{overscrollBehaviorInline:"contain"},".overscroll-i-none":{overscrollBehaviorInline:"none"}})},P5=function({matchUtilities:e,theme:t}){e({plb:r=>({paddingBlock:r}),pli:r=>({paddingInline:r})},{values:t("padding")}),e({pbs:r=>({paddingBlockStart:r}),pbe:r=>({paddingBlockEnd:r}),pis:r=>({paddingInlineStart:r}),pie:r=>({paddingInlineEnd:r})},{values:t("padding")})},k5=function({addUtilities:e}){e({".resize-block":{resize:"block"},".resize-inline":{resize:"inline"}})},N5=function({addUtilities:e,matchUtilities:t,theme:r}){t({"space-b":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-space-b-reverse":"0","margin-block-start":`calc(${n} * calc(1 - var(--tw-space-b-reverse)))`,"margin-block-end":`calc(${n} * var(--tw-space-b-reverse))`}}),"space-i":n=>({"& > :not([hidden]) ~ :not([hidden])":{"--tw-space-i-reverse":"0","margin-inline-start":`calc(${n} * calc(1 - var(--tw-space-i-reverse)))`,"margin-inline-end":`calc(${n} * var(--tw-space-i-reverse))`}})},{supportsNegativeValues:!0,values:r("space")}),e({".space-b-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-space-b-reverse":"1"},".space-i-reverse > :not([hidden]) ~ :not([hidden])":{"--tw-space-i-reverse":"1"}})},D5=function({addUtilities:e}){e({".text-start":{textAlign:"start"},".text-end":{textAlign:"end"}})};const L5=n5,M5=o5,F5=m5,j5=b5,B5=y5,R5=w5,U5=_5,W5=E5,V5=x5,H5=S5,z5=$5,G5=C5,K5=O5,q5=A5,Y5=T5,J5=I5,X5=P5,Z5=k5,Q5=N5,eI=D5;L5(function(e){W5(e),R5(e),eI(e),Z5(e),J5(e),M5(e),q5(e),G5(e),V5(e),Y5(e),K5(e),z5(e),X5(e),Q5(e),H5(e),U5(e),B5(e),F5(e),j5(e)});var tI=Ge&&Ge.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const rI=tI(Wg),nI=["disabled","highlighted","placeholder"],rm={align:["center","end","start"],state:["active","checked","closed","delayed-open","hidden","inactive","indeterminate","instant-open","off","on","open","unchecked","visible"],side:["bottom","left","right","top"],orientation:["horizontal","vertical"],motion:["from-end","from-start","to-end","to-start"],swipe:["cancel","end","move","start"],"swipe-direction":["down","left","right","up"]};rI.default.withOptions(e=>({addUtilities:t,addVariant:r,e:n})=>{e=e||{variantPrefix:"radix"};const o=e.variantPrefix===""||typeof e.variantPrefix=="boolean"&&e.variantPrefix===!1?"":`${e.variantPrefix}-`;["context-menu","dropdown-menu","hover-card","menubar","popover","select","tooltip"].forEach(u=>{t({[`.origin-${o}${u}`]:{"transform-origin":`var(--radix-${u}-content-transform-origin)`}})}),nI.forEach(u=>{let f=`${o}${u}`,d=`data-${u}`;r(`${f}`,({modifySelectors:p,separator:h})=>{p(({className:v})=>`.${n(`${f}${h}${v}`)}[${d}]`)}),r(`group-${f}`,({modifySelectors:p,separator:h})=>{p(({className:v})=>`.group[${d}] .${n(`group-${f}${h}${v}`)}`)}),r(`peer-${f}`,({modifySelectors:p,separator:h})=>{p(({className:v})=>`.peer[${d}] ~ .${n(`peer-${f}${h}${v}`)}`)})}),Object.keys(rm).forEach(u=>{rm[u].forEach(f=>{let d=`${o}${u}-${f}`,p=`data-${u}="${f}"`;r(`${d}`,({modifySelectors:h,separator:v})=>{h(({className:g})=>`.${n(`${d}${v}${g}`)}[${p}]`)}),r(`group-${d}`,({modifySelectors:h,separator:v})=>{h(({className:g})=>`.group[${p}] .${n(`group-${d}${v}${g}`)}`)}),r(`peer-${d}`,({modifySelectors:h,separator:v})=>{h(({className:g})=>`.peer[${p}] ~ .${n(`peer-${d}${v}${g}`)}`)})})}),["accordion-content","collapsible-content","navigation-menu-viewport"].forEach(u=>{t({[`.w-${o}${u}`]:{width:`var(--radix-${u}-width)`}}),t({[`.h-${o}${u}`]:{height:`var(--radix-${u}-height)`}})}),["context-menu","dropdown-menu","hover-card","menubar","popover","select","tooltip"].forEach(u=>{t({[`.w-${o}${u}-content-available-width`]:{width:`var(--radix-${u}-content-available-width)`}}),t({[`.max-w-${o}${u}-content-available-width`]:{maxWidth:`var(--radix-${u}-content-available-width)`}}),t({[`.h-${o}${u}-content-available-height`]:{height:`var(--radix-${u}-content-available-height)`}}),t({[`.max-h-${o}${u}-content-available-height`]:{maxHeight:`var(--radix-${u}-content-available-height)`}}),t({[`.w-${o}${u}-trigger-width`]:{width:`var(--radix-${u}-trigger-width)`}}),t({[`.h-${o}${u}-trigger-height`]:{height:`var(--radix-${u}-trigger-height)`}})}),["toast-swipe-end","toast-swipe-move"].forEach(u=>{t({[`.translate-x-${o}${u}-x`]:{transform:`translateX(var(--radix-${u}-x))`}}),t({[`.translate-y-${o}${u}-y`]:{transform:`translateY(var(--radix-${u}-y))`}})})});function oI(){for(var e=0,t,r,n="";e<arguments.length;)(t=arguments[e++])&&(r=nm(t))&&(n&&(n+=" "),n+=r);return n}function nm(e){if(typeof e=="string")return e;for(var t,r="",n=0;n<e.length;n++)e[n]&&(t=nm(e[n]))&&(r&&(r+=" "),r+=t);return r}var Gc="-";function iI(e){var t=sI(e),r=e.conflictingClassGroups,n=e.conflictingClassGroupModifiers,o=n===void 0?{}:n;function i(s){var l=s.split(Gc);return l[0]===""&&l.length!==1&&l.shift(),om(l,t)||aI(s)}function a(s,l){var u=r[s]||[];return l&&o[s]?[].concat(u,o[s]):u}return{getClassGroupId:i,getConflictingClassGroupIds:a}}function om(e,t){if(e.length===0)return t.classGroupId;var r=e[0],n=t.nextPart.get(r),o=n?om(e.slice(1),n):void 0;if(o)return o;if(t.validators.length!==0){var i=e.join(Gc);return t.validators.find(function(a){var s=a.validator;return s(i)})?.classGroupId}}var im=/^\[(.+)\]$/;function aI(e){if(im.test(e)){var t=im.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}}function sI(e){var t=e.theme,r=e.prefix,n={nextPart:new Map,validators:[]},o=cI(Object.entries(e.classGroups),r);return o.forEach(function(i){var a=i[0],s=i[1];Kc(s,n,a,t)}),n}function Kc(e,t,r,n){e.forEach(function(o){if(typeof o=="string"){var i=o===""?t:am(t,o);i.classGroupId=r;return}if(typeof o=="function"){if(lI(o)){Kc(o(n),t,r,n);return}t.validators.push({validator:o,classGroupId:r});return}Object.entries(o).forEach(function(a){var s=a[0],l=a[1];Kc(l,am(t,s),r,n)})})}function am(e,t){var r=e;return t.split(Gc).forEach(function(n){r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r}function lI(e){return e.isThemeGetter}function cI(e,t){return t?e.map(function(r){var n=r[0],o=r[1],i=o.map(function(a){return typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(function(s){var l=s[0],u=s[1];return[t+l,u]})):a});return[n,i]}):e}function uI(e){if(e<1)return{get:function(){},set:function(){}};var t=0,r=new Map,n=new Map;function o(i,a){r.set(i,a),t++,t>e&&(t=0,n=r,r=new Map)}return{get:function(a){var s=r.get(a);if(s!==void 0)return s;if((s=n.get(a))!==void 0)return o(a,s),s},set:function(a,s){r.has(a)?r.set(a,s):o(a,s)}}}var sm="!";function fI(e){var t=e.separator||":",r=t.length===1,n=t[0],o=t.length;return function(a){for(var s=[],l=0,u=0,f,d=0;d<a.length;d++){var p=a[d];if(l===0){if(p===n&&(r||a.slice(d,d+o)===t)){s.push(a.slice(u,d)),u=d+o;continue}if(p==="/"){f=d;continue}}p==="["?l++:p==="]"&&l--}var h=s.length===0?a:a.substring(u),v=h.startsWith(sm),g=v?h.substring(1):h,y=f&&f>u?f-u:void 0;return{modifiers:s,hasImportantModifier:v,baseClassName:g,maybePostfixModifierPosition:y}}}function dI(e){if(e.length<=1)return e;var t=[],r=[];return e.forEach(function(n){var o=n[0]==="[";o?(t.push.apply(t,r.sort().concat([n])),r=[]):r.push(n)}),t.push.apply(t,r.sort()),t}function pI(e){return{cache:uI(e.cacheSize),splitModifiers:fI(e),...iI(e)}}var hI=/\s+/;function vI(e,t){var r=t.splitModifiers,n=t.getClassGroupId,o=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(hI).map(function(a){var s=r(a),l=s.modifiers,u=s.hasImportantModifier,f=s.baseClassName,d=s.maybePostfixModifierPosition,p=n(d?f.substring(0,d):f),h=!!d;if(!p){if(!d)return{isTailwindClass:!1,originalClassName:a};if(p=n(f),!p)return{isTailwindClass:!1,originalClassName:a};h=!1}var v=dI(l).join(":"),g=u?v+sm:v;return{isTailwindClass:!0,modifierId:g,classGroupId:p,originalClassName:a,hasPostfixModifier:h}}).reverse().filter(function(a){if(!a.isTailwindClass)return!0;var s=a.modifierId,l=a.classGroupId,u=a.hasPostfixModifier,f=s+l;return i.has(f)?!1:(i.add(f),o(l,u).forEach(function(d){return i.add(s+d)}),!0)}).reverse().map(function(a){return a.originalClassName}).join(" ")}function lm(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,o,i,a=s;function s(u){var f=t[0],d=t.slice(1),p=d.reduce(function(h,v){return v(h)},f());return n=pI(p),o=n.cache.get,i=n.cache.set,a=l,l(u)}function l(u){var f=o(u);if(f)return f;var d=vI(u,n);return i(u,d),d}return function(){return a(oI.apply(null,arguments))}}function ht(e){var t=function(n){return n[e]||[]};return t.isThemeGetter=!0,t}var cm=/^\[(?:([a-z-]+):)?(.+)\]$/i,gI=/^\d+\/\d+$/,mI=new Set(["px","full","screen"]),bI=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,yI=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wI=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function Jt(e){return Wn(e)||mI.has(e)||gI.test(e)||vs(e)}function vs(e){return Vn(e,"length",CI)}function _I(e){return Vn(e,"size",um)}function EI(e){return Vn(e,"position",um)}function xI(e){return Vn(e,"url",OI)}function Oi(e){return Vn(e,"number",Wn)}function Wn(e){return!Number.isNaN(Number(e))}function SI(e){return e.endsWith("%")&&Wn(e.slice(0,-1))}function Ai(e){return fm(e)||Vn(e,"number",fm)}function Ue(e){return cm.test(e)}function Co(){return!0}function yn(e){return bI.test(e)}function $I(e){return Vn(e,"",AI)}function Vn(e,t,r){var n=cm.exec(e);return n?n[1]?n[1]===t:r(n[2]):!1}function CI(e){return yI.test(e)}function um(){return!1}function OI(e){return e.startsWith("url(")}function fm(e){return Number.isInteger(Number(e))}function AI(e){return wI.test(e)}function dm(){var e=ht("colors"),t=ht("spacing"),r=ht("blur"),n=ht("brightness"),o=ht("borderColor"),i=ht("borderRadius"),a=ht("borderSpacing"),s=ht("borderWidth"),l=ht("contrast"),u=ht("grayscale"),f=ht("hueRotate"),d=ht("invert"),p=ht("gap"),h=ht("gradientColorStops"),v=ht("gradientColorStopPositions"),g=ht("inset"),y=ht("margin"),m=ht("opacity"),w=ht("padding"),E=ht("saturate"),x=ht("scale"),P=ht("sepia"),I=ht("skew"),S=ht("space"),A=ht("translate"),k=function(){return["auto","contain","none"]},j=function(){return["auto","hidden","clip","visible","scroll"]},D=function(){return["auto",Ue,t]},N=function(){return[Ue,t]},J=function(){return["",Jt]},K=function(){return["auto",Wn,Ue]},Y=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},te=function(){return["solid","dashed","dotted","double","none"]},oe=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},le=function(){return["start","end","center","between","around","evenly","stretch"]},ae=function(){return["","0",Ue]},ve=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},ce=function(){return[Wn,Oi]},q=function(){return[Wn,Ue]};return{cacheSize:500,theme:{colors:[Co],spacing:[Jt],blur:["none","",yn,Ue],brightness:ce(),borderColor:[e],borderRadius:["none","","full",yn,Ue],borderSpacing:N(),borderWidth:J(),contrast:ce(),grayscale:ae(),hueRotate:q(),invert:ae(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[SI,vs],inset:D(),margin:D(),opacity:ce(),padding:N(),saturate:ce(),scale:ce(),sepia:ae(),skew:q(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",Ue]}],container:["container"],columns:[{columns:[yn]}],"break-after":[{"break-after":ve()}],"break-before":[{"break-before":ve()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(Y(),[Ue])}],overflow:[{overflow:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ai]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ue]}],grow:[{grow:ae()}],shrink:[{shrink:ae()}],order:[{order:["first","last","none",Ai]}],"grid-cols":[{"grid-cols":[Co]}],"col-start-end":[{col:["auto",{span:["full",Ai]},Ue]}],"col-start":[{"col-start":K()}],"col-end":[{"col-end":K()}],"grid-rows":[{"grid-rows":[Co]}],"row-start-end":[{row:["auto",{span:[Ai]},Ue]}],"row-start":[{"row-start":K()}],"row-end":[{"row-end":K()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ue]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ue]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal"].concat(le())}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(le(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(le(),["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",Ue,t]}],"min-w":[{"min-w":["min","max","fit",Ue,Jt]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[yn]},yn,Ue]}],h:[{h:[Ue,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Ue,Jt]}],"max-h":[{"max-h":[Ue,t,"min","max","fit"]}],"font-size":[{text:["base",yn,vs]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Oi]}],"font-family":[{font:[Co]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ue]}],"line-clamp":[{"line-clamp":["none",Wn,Oi]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ue,Jt]}],"list-image":[{"list-image":["none",Ue]}],"list-style-type":[{list:["none","disc","decimal",Ue]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(te(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",Jt]}],"underline-offset":[{"underline-offset":["auto",Ue,Jt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(Y(),[EI])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",_I]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},xI]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[].concat(te(),["hidden"])}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:te()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:[""].concat(te())}],"outline-offset":[{"outline-offset":[Ue,Jt]}],"outline-w":[{outline:[Jt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[Jt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",yn,$I]}],"shadow-color":[{shadow:[Co]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":oe()}],"bg-blend":[{"bg-blend":oe()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[n]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",yn,Ue]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[d]}],saturate:[{saturate:[E]}],sepia:[{sepia:[P]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[n]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ue]}],duration:[{duration:q()}],ease:[{ease:["linear","in","out","in-out",Ue]}],delay:[{delay:q()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ue]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[Ai,Ue]}],"translate-x":[{"translate-x":[A]}],"translate-y":[{"translate-y":[A]}],"skew-x":[{"skew-x":[I]}],"skew-y":[{"skew-y":[I]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ue]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ue]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ue]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Jt,Oi]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}function pm(e,t){for(var r in t)hm(e,r,t[r]);return e}var TI=Object.prototype.hasOwnProperty,II=new Set(["string","number","boolean"]);function hm(e,t,r){if(!TI.call(e,t)||II.has(typeof r)||r===null){e[t]=r;return}if(Array.isArray(r)&&Array.isArray(e[t])){e[t]=e[t].concat(r);return}if(typeof r=="object"&&typeof e[t]=="object"){if(e[t]===null){e[t]=r;return}for(var n in r)hm(e[t],n,r[n])}}function PI(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return typeof e=="function"?lm.apply(void 0,[dm,e].concat(r)):lm.apply(void 0,[function(){return pm(dm(),e)}].concat(r))}var kI="Expected a function",vm="__lodash_hash_undefined__",gm=1/0,NI="[object Function]",DI="[object GeneratorFunction]",LI="[object Symbol]",MI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,FI=/^\w*$/,jI=/^\./,BI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,RI=/[\\^$.*+?()[\]{}|]/g,UI=/\\(\\)?/g,WI=/^\[object .+?Constructor\]$/,VI=typeof Ge=="object"&&Ge&&Ge.Object===Object&&Ge,HI=typeof self=="object"&&self&&self.Object===Object&&self,qc=VI||HI||Function("return this")();function zI(e,t){return e?.[t]}function GI(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}var KI=Array.prototype,qI=Function.prototype,mm=Object.prototype,Yc=qc["__core-js_shared__"],bm=function(){var e=/[^.]+$/.exec(Yc&&Yc.keys&&Yc.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ym=qI.toString,Jc=mm.hasOwnProperty,wm=mm.toString,YI=RegExp("^"+ym.call(Jc).replace(RI,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),_m=qc.Symbol,JI=KI.splice,XI=Sm(qc,"Map"),Ti=Sm(Object,"create"),Em=_m?_m.prototype:void 0,xm=Em?Em.toString:void 0;function Hn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ZI(){this.__data__=Ti?Ti(null):{}}function QI(e){return this.has(e)&&delete this.__data__[e]}function e6(e){var t=this.__data__;if(Ti){var r=t[e];return r===vm?void 0:r}return Jc.call(t,e)?t[e]:void 0}function t6(e){var t=this.__data__;return Ti?t[e]!==void 0:Jc.call(t,e)}function r6(e,t){var r=this.__data__;return r[e]=Ti&&t===void 0?vm:t,this}Hn.prototype.clear=ZI,Hn.prototype.delete=QI,Hn.prototype.get=e6,Hn.prototype.has=t6,Hn.prototype.set=r6;function Oo(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function n6(){this.__data__=[]}function o6(e){var t=this.__data__,r=gs(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():JI.call(t,r,1),!0}function i6(e){var t=this.__data__,r=gs(t,e);return r<0?void 0:t[r][1]}function a6(e){return gs(this.__data__,e)>-1}function s6(e,t){var r=this.__data__,n=gs(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}Oo.prototype.clear=n6,Oo.prototype.delete=o6,Oo.prototype.get=i6,Oo.prototype.has=a6,Oo.prototype.set=s6;function zn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function l6(){this.__data__={hash:new Hn,map:new(XI||Oo),string:new Hn}}function c6(e){return ms(this,e).delete(e)}function u6(e){return ms(this,e).get(e)}function f6(e){return ms(this,e).has(e)}function d6(e,t){return ms(this,e).set(e,t),this}zn.prototype.clear=l6,zn.prototype.delete=c6,zn.prototype.get=u6,zn.prototype.has=f6,zn.prototype.set=d6;function gs(e,t){for(var r=e.length;r--;)if(x6(e[r][0],t))return r;return-1}function p6(e,t){t=m6(t,e)?[t]:g6(t);for(var r=0,n=t.length;e!=null&&r<n;)e=e[_6(t[r++])];return r&&r==n?e:void 0}function h6(e){if(!Cm(e)||y6(e))return!1;var t=S6(e)||GI(e)?YI:WI;return t.test(E6(e))}function v6(e){if(typeof e=="string")return e;if(Zc(e))return xm?xm.call(e):"";var t=e+"";return t=="0"&&1/e==-gm?"-0":t}function g6(e){return $m(e)?e:w6(e)}function ms(e,t){var r=e.__data__;return b6(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Sm(e,t){var r=zI(e,t);return h6(r)?r:void 0}function m6(e,t){if($m(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Zc(e)?!0:FI.test(e)||!MI.test(e)||t!=null&&e in Object(t)}function b6(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function y6(e){return!!bm&&bm in e}var w6=Xc(function(e){e=C6(e);var t=[];return jI.test(e)&&t.push(""),e.replace(BI,function(r,n,o,i){t.push(o?i.replace(UI,"$1"):n||r)}),t});function _6(e){if(typeof e=="string"||Zc(e))return e;var t=e+"";return t=="0"&&1/e==-gm?"-0":t}function E6(e){if(e!=null){try{return ym.call(e)}catch{}try{return e+""}catch{}}return""}function Xc(e,t){if(typeof e!="function"||t&&typeof t!="function")throw new TypeError(kI);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a),a};return r.cache=new(Xc.Cache||zn),r}Xc.Cache=zn;function x6(e,t){return e===t||e!==e&&t!==t}var $m=Array.isArray;function S6(e){var t=Cm(e)?wm.call(e):"";return t==NI||t==DI}function Cm(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function $6(e){return!!e&&typeof e=="object"}function Zc(e){return typeof e=="symbol"||$6(e)&&wm.call(e)==LI}function C6(e){return e==null?"":v6(e)}function O6(e,t,r){var n=e==null?void 0:p6(e,t);return n===void 0?r:n}var A6=O6;const T6=In(A6);var I6=[50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950],P6=[12,25,37,50,75,100,125,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,925,950,975],sr=Math.PI/180,Om={red:{keyColor:"#ee003b",darkCp:1,lightCp:.13,hueTorsion:5.5*sr},orange:{keyColor:"#fa6b32",darkCp:.725,lightCp:1,hueTorsion:13*sr},amber:{keyColor:"#f08c00",darkCp:1,lightCp:1,hueTorsion:24*sr},yellow:{keyColor:"#ffd900",darkCp:1,lightCp:1,hueTorsion:32*sr},lime:{keyColor:"#99c400",darkCp:1,lightCp:1,hueTorsion:-3.5*sr},green:{keyColor:"#30a908",darkCp:.35,lightCp:.665,hueTorsion:-10.5*sr},emerald:{keyColor:"#15e066",darkCp:1,lightCp:.735,hueTorsion:-7*sr},teal:{keyColor:"#00a270",darkCp:1,lightCp:.755,hueTorsion:-12*sr},cyan:{keyColor:"#048992",darkCp:1,lightCp:.855,hueTorsion:-15*sr},sky:{keyColor:"#007bc2",darkCp:1,lightCp:.64,hueTorsion:0},blue:{keyColor:"#0058cb",darkCp:1,lightCp:.495,hueTorsion:-7*sr},indigo:{keyColor:"#1b45c5",darkCp:.495,lightCp:.55,hueTorsion:0},violet:{keyColor:"#080886",darkCp:.195,lightCp:.635,hueTorsion:-5*sr},purple:{keyColor:"#2c0073",darkCp:0,lightCp:.63,hueTorsion:0},fuchsia:{keyColor:"#6d0085",darkCp:1,lightCp:.695,hueTorsion:0},pink:{keyColor:"#a5006d",darkCp:1,lightCp:.775,hueTorsion:0},rose:{keyColor:"#d00054",darkCp:1,lightCp:1,hueTorsion:0},neutral:{keyColor:"#707076",darkCp:.8,lightCp:.88,hueTorsion:0},primary:{keyColor:"#1662d9",darkCp:.86,lightCp:1,hueTorsion:-30*sr}};Object.keys(Om).reduce((e,t)=>{const r=t==="neutral"||t==="primary",n=Om[t],o=BT({...n,keyColor:FT(n.keyColor)}),i=DT(o,21,[0,100*(22/21)],1,24).reverse(),a=s=>{if(s>999)return"#000000";if(s<1)return"#ffffff";if(s%50===0)return Bg(i[s/50]);{const l=s%50/50,u=1-l,[f,d,p]=i[Math.floor(s/50)],[h,v,g]=i[Math.ceil(s/50)];return Bg([f*u+h*l,d*u+v*l,p*u+g*l])}};return e[t]=(r?P6:I6).reduce((s,l)=>(s[l]=a(l),s),{}),e},{});var Qc="fill-[--surface-bg] dark:fill-[--surface-bg]",k6="fill-[--surface-bg] dark:fill-[--surface-bg]",bs="min-bs-[2.5rem]",N6="pli-3",D6="pli-4",L6=`${bs} ${N6}`,M6=`${bs} ${D6}`,ys="min-bs-[2.5rem] pointer-fine:min-bs-[2rem]",F6="pli-2",j6="pli-2.5",B6=`${ys} ${F6}`,R6=`${ys} ${j6}`,Am=(e="coarse")=>e==="fine"?ys:bs,ws="opacity-40 cursor-not-allowed shadow-none",U6="data-[disabled]:opacity-40 data-[disabled]:cursor-not-allowed",eu=({elevation:e})=>[e==="group"?"shadow-sm":e==="chrome"?"shadow-none":"shadow"],Ao=({elevation:e})=>[e==="group"?"shadow":e==="chrome"?"shadow-lg":"shadow-none"],Fr="focus:outline-none focus-visible:z-[1] focus-visible:hover:outline-none dark:focus-visible:hover:outline-none focus-visible:ring-2 focus-visible:ring-offset-0 focus-visible:ring-primary-350 focus-visible:ring-offset-white dark:focus-visible:ring-primary-450 dark:focus-visible:ring-offset-black",Tm="focus:outline-none focus-visible:outline-none focus:ring-0 ring-0 focus:border-0 border-0",W6="ring-2 ring-offset-0 ring-primary-350 ring-offset-white dark:ring-primary-450 dark:ring-offset-black",V6="transition-colors duration-100 linear hover:text-black dark:hover:text-white hover:bg-neutral-25 dark:hover:bg-neutral-750",Im="hover:bg-neutral-100/50 dark:hover:bg-neutral-800/50",H6="fixed inset-0 z-0 overflow-auto overscroll-auto scroll-smooth",Pm="will-change-[opacity,transform] data-[side=top]:animate-slideDownAndFade data-[side=right]:animate-slideLeftAndFade data-[side=bottom]:animate-slideUpAndFade data-[side=left]:animate-slideRightAndFade",z6="will-change-[opacity,transform] animate-slideUpAndFade",G6="border-neutral-200 dark:border-neutral-800",K6="self-stretch border-ie",km="self-stretch border-be",q6="data-[highlighted]:bg-primary-100 dark:data-[highlighted]:bg-primary-850 hover:data-[highlighted]:bg-primary-150 hover:dark:data-[highlighted]:bg-primary-800",Y6="fixed-surface backdrop-blur-md dark:backdrop-blur-lg",J6="border-neutral-50 dark:border-neutral-800 divide-neutral-50 dark:divide-neutral-800",X6="border-neutral-50 dark:border-neutral-800 divide-neutral-50 dark:divide-neutral-800",Gn="chrome-surface",Z6=e=>{const t=()=>[Jt],r=()=>["auto",Jt],n=()=>["",Jt],o=()=>[Co],i=()=>["none","","sm","md","lg","xl","2xl","3xl","full",vs];return pm(e,{classGroups:{float:[{float:["start","end"]}],clear:[{clear:["start","end"]}],resize:[{resize:["block ","inline"]}],"text-alignment":[{text:["start","end"]}],"logical.overscroll-b":[{"overscroll-b":["auto ","contain","auto"]}],"logical.overscroll-i":[{"overscroll-b":["auto ","contain","auto"]}],"logical.bs":[{bs:t()}],"logical.min-bs":[{"min-bs":t()}],"logical.max-bs":[{"max-bs":t()}],"logical.is":[{is:t()}],"logical.min-is":[{"min-is":t()}],"logical.max-is":[{"max-is":t()}],"logical.mlb":[{mlb:t()}],"logical.mli":[{mli:t()}],"logical.mbs":[{mbs:t()}],"logical.mbe":[{mbe:t()}],"logical.mis":[{mis:t()}],"logical.mie":[{mie:t()}],"logical.plb":[{plb:t()}],"logical.pli":[{pli:t()}],"logical.pbs":[{pbs:t()}],"logical.pbe":[{pbe:t()}],"logical.pis":[{pis:t()}],"logical.pie":[{pie:t()}],"logical.space-b":[{"space-b":t()}],"logical.space-i":[{"space-i":t()}],"logical.inset-block":[{"inset-block":r()}],"logical.inset-inline":[{"inset-inline":r()}],"logical.block-start":[{"block-start":r()}],"logical.block-end":[{"block-end":r()}],"logical.inline-start":[{"inline-start":r()}],"logical.inline-end":[{"inline-end":r()}],"logical.border-bs":[{"border-bs":n()}],"logical.border-be":[{"border-be":n()}],"logical.border-is":[{"border-is":n()}],"logical.border-ie":[{"border-ie":n()}],"logical.border-color-bs":[{"border-bs":o()}],"logical.border-color-be":[{"border-be":o()}],"logical.border-color-is":[{"border-is":o()}],"logical.border-color-ie":[{"border-ie":o()}],"logical.rounded-bs":[{"rounded-bs":i()}],"logical.rounded-be":[{"rounded-be":i()}],"logical.rounded-is":[{"rounded-is":i()}],"logical.rounded-ie":[{"rounded-ie":i()}],"logical.rounded-ss":[{"rounded-ss":i()}],"logical.rounded-se":[{"rounded-se":i()}],"logical.rounded-es":[{"rounded-es":i()}],"logical.rounded-ee":[{"rounded-ee":i()}],"logical.divide-b":[{"divide-b":n()}],"logical.divide-i":[{"divide-i":n()}]},conflictingClassGroups:{"inset-block":["logical.block-start","logical.block-end"],"inset-inline":["logical.inline-start","logical.inline-end"],p:["logical.plb","logical.pli","logical.pbs","logical.pbe","logical.pis","logical.pie"],pli:["logical.pis","logical.pie"],plb:["logical.pbs","logical.pbe"],m:["logical.mlb","logical.mli","logical.mbs","logical.mbe","logical.mis","logical.mie"],mli:["logical.mis","logical.mie"],mlb:["logical.mbs","logical.mbe"],overscroll:["overscroll-i","overscroll-b"],rounded:["logical.rounded-bs","logical.rounded-be","logical.rounded-is","logical.rounded-ie","logical.rounded-ss","logical.rounded-se","logical.rounded-es","logical.rounded-ee"],"logical.rounded-bs":["logical.rounded-ss","logical.rounded-se"],"logical.rounded-be":["logical.rounded-es","logical.rounded-ee"],"logical.rounded-is":["logical.rounded-ss","logical.rounded-es"],"logical.rounded-ie":["logical.rounded-ee","logical.rounded-se"],"border-color":["logical.border-color-bs","logical.border-color-be","logical.border-color-is","logical.border-color-ie"],border:["logical.border-bs","logical.border-be","logical.border-is","logical.border-ie"]}})},ue=PI({classGroups:{fontFamily:["font-body","font-mono"],fontWeight:["font-thin","font-extralight","font-light","font-normal","font-medium","font-semibold","font-bold","font-extrabold","font-black",Oi]}},Z6),tu=new Map([[0,"is-0"],["px","is-px"],[.5,"is-0.5"],[1,"is-1"],[1.5,"is-1.5"],[2,"is-2"],[2.5,"is-2.5"],[3,"is-3"],[3.5,"is-3.5"],[4,"is-4"],[5,"is-5"],[6,"is-6"],[7,"is-7"],[8,"is-8"],[9,"is-9"],[10,"is-10"],[11,"is-11"],[12,"is-12"],[14,"is-14"],[16,"is-16"],[20,"is-20"],[24,"is-24"],[28,"is-28"],[32,"is-32"],[36,"is-36"],[40,"is-40"],[44,"is-44"],[48,"is-48"],[52,"is-52"],[56,"is-56"],[60,"is-60"],[64,"is-64"],[72,"is-72"],[80,"is-80"],[96,"is-96"]]),Nm=new Map([[0,"bs-0"],["px","bs-px"],[.5,"bs-0.5"],[1,"bs-1"],[1.5,"bs-1.5"],[2,"bs-2"],[2.5,"bs-2.5"],[3,"bs-3"],[3.5,"bs-3.5"],[4,"bs-4"],[5,"bs-5"],[6,"bs-6"],[7,"bs-7"],[8,"bs-8"],[9,"bs-9"],[10,"bs-10"],[11,"bs-11"],[12,"bs-12"],[14,"bs-14"],[16,"bs-16"],[20,"bs-20"],[24,"bs-24"],[28,"bs-28"],[32,"bs-32"],[36,"bs-36"],[40,"bs-40"],[44,"bs-44"],[48,"bs-48"],[52,"bs-52"],[56,"bs-56"],[60,"bs-60"],[64,"bs-64"],[72,"bs-72"],[80,"bs-80"],[96,"bs-96"]]),Ii=new Set(tu.keys()),ru=Nm.get.bind(Nm),Dm=tu.get.bind(tu),Ke=e=>ue(ru(e),Dm(e)),Lm=(e,t)=>{if(Ii.has(e))return e;if(e<=0)return 0;if(e===1)return"px";{const r=Math.floor(e),n=Math.floor(e*2)/2,o=Math.floor(e/2)*2,i=Math.floor(e/4)*4;return Ii.has(n)?n:Ii.has(r)?r:Ii.has(o)?o:Ii.has(i)?i:t}},Mm=e=>e==="px"?1:e,nu="placeholder-neutral-500 dark:placeholder-neutral-400",Ot="text-xs font-normal text-neutral-650 dark:text-neutral-300",Q6="text-xs font-normal text-white/90",e3="text-xs font-normal text-neutral-900 dark:text-neutral-50",t3="text-xs font-medium text-success-550 dark:text-success-300",r3="text-xs font-medium text-info-550 dark:text-info-300",n3="text-xs font-medium text-warning-550 dark:text-warning-300",o3="text-xs font-medium text-error-550 dark:text-error-300",i3=e=>{switch(e){case"success":return t3;case"info":return r3;case"warning":return n3;case"error":return o3;default:return}},a3="bg-neutral-25 dark:bg-neutral-850",s3="shadow-success-500/50 dark:shadow-success-500/50 text-success-600 dark:text-success-100 bg-success-50 dark:bg-success-900",l3="shadow-info-500/50 dark:shadow-info-500/50 text-info-600 dark:text-info-100 bg-info-50 dark:bg-info-900",c3="shadow-warning-500/50 dark:shadow-warning-500/50 text-warning-600 dark:text-warning-100 bg-warning-50 dark:bg-warning-900",u3="shadow-error-500/50 dark:shadow-error-500/50 text-error-600 dark:text-error-100 bg-error-50 dark:bg-error-900",f3=e=>{switch(e){case"success":return s3;case"info":return l3;case"warning":return c3;case"error":return u3;default:return a3}},d3=(e,...t)=>ue("overflow-anchored overflow-auto",...t),p3=(e,...t)=>ue("overflow-anchor is-px bs-px",...t),h3={root:d3,anchor:p3},v3=({size:e=10,inGroup:t},...r)=>ue("relative inline-flex shrink-0",Ke(e),t&&(e==="px"||e<=3?"-mie-1":"-mie-2"),...r),g3=({srOnly:e},...t)=>ue(e&&"sr-only",...t),m3=({srOnly:e},...t)=>ue(Ot,e&&"sr-only",...t),b3=({variant:e},...t)=>ue("is-full bs-full bg-[--surface-bg]",e==="circle"?"rounded-full":"rounded",...t),y3=({status:e,size:t=3},...r)=>ue("absolute block-end-0 inline-end-0",Ke(t),e==="inactive"?"text-warning-350 dark:text-warning-250":e==="active"?"text-success-350 dark:text-success-250":"text-neutral-350 dark:text-neutral-250",...r),w3=({status:e,variant:t,animation:r},...n)=>ue("absolute inset-0 border-2",t==="circle"?"rounded-full":"rounded",e==="current"?"border-primary-400 dark:border-primary-500":e==="active"?"border-success-400 dark:border-success-400":e==="error"?"border-error-400 dark:border-error-500":e==="warning"?"border-warning-400 dark:border-warning-500":e==="inactive"?"border-neutral-400 dark:border-neutral-500":"border-[color:var(--surface-bg)]",r==="pulse"?"animate-halo-pulse":"",...n),_3=(e,...t)=>ue("fill-white",...t),E3=(e,...t)=>ue("inline-flex items-center",...t),x3=({size:e,srOnly:t},...r)=>ue(t?"sr-only":"rounded-full truncate text-sm leading-none plb-1 pli-2 relative z-[1] flex items-center justify-center",e&&ru(e),...r),S3=({srOnly:e},...t)=>ue(e?"sr-only":Ot,...t),$3={root:v3,label:g3,description:m3,statusIcon:y3,frame:b3,ring:w3,fallbackText:_3,group:E3,groupLabel:x3,groupDescription:S3},C3=(e,...t)=>ue("shrink-0 flex items-center",...t),O3=(e,...t)=>ue("contents",...t),A3=(e,...t)=>ue("contents",...t),T3=(e,...t)=>ue(...t),I3=(e,...t)=>ue("opacity-50",...t),P3={root:C3,list:O3,listItem:A3,current:T3,separator:I3},k3="bg-primary-550 dark:bg-primary-550 text-white aria-pressed:bg-primary-500 dark:aria-pressed:bg-primary-500 aria-pressed:text-primary-100 data-[state=open]:bg-primary-500 dark:data-[state=open]:bg-primary-500 data-[state=open]:text-primary-100 aria-checked:bg-primary-500 dark:aria-checked:bg-primary-500 aria-checked:text-primary-100 hover:bg-primary-600 dark:hover:bg-primary-600 hover:text-white dark:hover:text-white",N3="text-neutral-800 dark:text-neutral-50 bg-white dark:bg-neutral-800",D3=N3+" text-neutral-800 dark:text-neutral-50 bg-white dark:bg-neutral-800 aria-pressed:text-primary-800 aria-pressed:bg-primary-100 dark:aria-pressed:text-primary-50 dark:aria-pressed:bg-primary-700 data-[state=open]:text-primary-800 data-[state=open]:bg-primary-100 dark:data-[state=open]:text-primary-50 dark:data-[state=open]:bg-primary-700 aria-checked:text-primary-800 aria-checked:bg-primary-100 dark:aria-checked:text-primary-50 dark:aria-checked:bg-primary-700",L3=Im+" hover:text-inherit dark:hover:text-inherit aria-pressed:bg-neutral-450/5 dark:aria-pressed:bg-neutral-25/5 data-[state=open]:bg-neutral-450/5 dark:data-[state=open]:bg-neutral-25/5 aria-checked:bg-neutral-450/5 dark:aria-checked:bg-neutral-25/5",M3=(e,...t)=>{const r=e.variant??"default";return ue("font-medium text-sm shrink-0 inline-flex select-none items-center justify-center overflow-hidden","transition-color duration-100",e.density==="fine"?R6:M6,e.disabled&&ws,!e.inGroup&&"rounded-md",!e.textWrap&&"text-ellipsis whitespace-nowrap",!e.disabled&&!e.inGroup&&(r==="default"||r==="primary")&&eu({elevation:e.elevation}),!e.disabled&&V6,r!=="outline"&&" hover:border-transparent dark:hover:border-transparent",r==="default"&&D3,!e.disabled&&r==="ghost"&&L3,r==="primary"&&k3,r==="outline"&&"text-neutral-700 border border-neutral-600 dark:border-neutral-300 dark:text-neutral-150",!e.disabled&&Fr,"group",...t)},F3=(e,...t)=>ue("inline-flex rounded-md [&>:first-child]:rounded-is-md [&>:last-child]:rounded-ie-md [&>button]:relative",eu({elevation:e.elevation}),...t),j3={root:M3,group:F3},B3="overflow-auto grid place-items-center p-2 md:p-4 lg:p-8",R3=(e,...t)=>ue("fixed z-20 inset-inline-0 block-start-0 bs-[100dvb]",B3,...t),U3=({inOverlayLayout:e,elevation:t="chrome"},...r)=>ue("flex flex-col",!e&&"fixed z-20 top-[50%] left-[50%] -translate-x-[50%] -translate-y-[50%]","is-[95vw] md:is-full max-is-[20rem] border rounded-lg p-4",z6,Ao({elevation:t}),Gn,X6,Fr,...r),W3=({srOnly:e},...t)=>ue("rounded shrink-0 text-xl font-medium text-neutral-900 dark:text-neutral-100",e&&"sr-only",...t),V3=({srOnly:e},...t)=>ue("mlb-2",Ot,e&&"sr-only",...t),H3={overlay:R3,content:U3,title:W3,description:V3},z3=(e,...t)=>ue("rounded-md p-1 max-bs-[--radix-dropdown-menu-content-available-height] overflow-y-auto",...t),G3=(e,...t)=>ue("is-48 rounded-md md:is-56 z-[30]",Pm,Gn,Ao({elevation:"group"}),...t),K3=(e,...t)=>ue("flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-2 text-sm","text-neutral-900 data-[highlighted]:bg-neutral-50 dark:text-neutral-100 dark:data-[highlighted]:bg-neutral-900",Tm,U6,...t),q3=(e,...t)=>ue("mlb-1 mli-2 bs-px bg-neutral-200 dark:bg-neutral-700",...t),Y3=(e,...t)=>ue(Ot,"select-none pli-2 plb-2",...t),J3=(e,...t)=>ue(Qc,...t),X3={content:G3,viewport:z3,item:K3,separator:q3,groupLabel:Y3,arrow:J3},Z3="",Q3="shadow-success-500/50 dark:shadow-success-600/50",eP="shadow-info-500/50 dark:shadow-info-600/50",tP="shadow-warning-500/50 dark:shadow-warning-600/50",rP="shadow-error-500/50 dark:shadow-error-600/50",Fm="transition-colors bg-[--input-bg] focus:bg-white dark:focus:bg-neutral-925 border-transparent focus:border-transparent",jm="hover:bg-[--input-bg-hover] dark:hover:bg-[--input-bg-hover] focus:hover:bg-white dark:focus:hover:bg-neutral-925",Bm="shadow-inner transition-colors bg-neutral-150 dark:bg-neutral-700 aria-checked:bg-primary-550 dark:aria-checked:bg-primary-550 aria-[checked=mixed]:bg-primary-550 dark:aria-[checked=mixed]:bg-primary-550",Rm="hover:bg-neutral-200 dark:hover:bg-neutral-650 hover:aria-checked:bg-primary-600 dark:hover:aria-checked:bg-primary-600 hover:aria-[checked=mixed]:bg-primary-600 dark:hover:aria-[checked=mixed]:bg-primary-600",Um=e=>{switch(e){case"success":return Q3;case"info":return eP;case"warning":return tP;case"error":return rP;default:return null}},nP=e=>["is-full bg-transparent text-current",e.density==="fine"?ys:bs,nu,Tm,e.disabled&&ws],oP=e=>["is-full text-base rounded text-[color:var(--surface-text)]",Fm,nu,e.density==="fine"?B6:L6,e.disabled?ws:jm],iP=e=>["is-full text-base rounded text-[color:var(--surface-text)]",Fm,jm,e.focused&&"bg-white dark:bg-neutral-925",nu,Um(e.validationValence),e.disabled&&ws,e.focused&&W6],aP=(e,...t)=>e.variant==="subdued"?ue(...nP(e),...t):e.variant==="static"?ue(...iP(e),...t):ue(...oP(e),!e.disabled&&Fr,Um(e.validationValence)||Z3,...t),sP=({size:e=5,disabled:t},...r)=>ue(Ke(e),Bm,!t&&Rm,"shrink-0 flex items-center justify-center rounded text-white",Fr,...r),lP=({size:e=5},...t)=>ue(Ke(Lm(Mm(e)*.7,4)),...t),cP=({size:e=5,disabled:t},...r)=>ue(ru(e),Dm(Lm(Mm(e)*1.75,9)),Bm,!t&&Rm,"cursor-pointer shrink-0 rounded-full pli-1 relative",Fr,...r),uP=({size:e=5},...t)=>ue(Ke(e==="px"?"px":e-2),"block bg-white rounded-full border-neutral-100 transition-transform duration-100 will-change-transform data-[state=checked]:translate-x-[100%]",...t),fP=(e,...t)=>ue("font-mono selection:bg-transparent mli-auto",e.disabled&&"cursor-not-allowed",...t),dP=(e,...t)=>ue("block text-sm font-medium text-neutral-900 dark:text-neutral-100",e.srOnly&&"sr-only",...t),pP=(e,...t)=>ue(Ot,e.srOnly&&"sr-only",...t),hP=(e,...t)=>ue("leading-none mlb-1",e.srOnly&&"sr-only",...t),vP=(e,...t)=>ue(Ot,e.srOnly?"sr-only":i3(e.validationValence),...t),gP={input:aP,inputWithSegments:fP,checkbox:sP,checkboxIndicator:lP,label:dP,description:pP,validation:vP,switch:cP,switchThumb:uP,descriptionAndValidation:hP},mP=(e,...t)=>ue("underline decoration-1 underline-offset-2 transition-color rounded-sm","text-primary-600 hover:text-primary-500 dark:text-primary-300 hover:dark:text-primary-200","visited:text-teal-600 visited:hover:text-teal-500 visited:dark:text-teal-300 visited:hover:dark:text-teal-200",Fr,...t),bP={root:mP},yP=(e,...t)=>ue(...t),wP=({collapsible:e},...t)=>ue(!e&&"flex",...t),_P=({density:e},...t)=>ue(Ke(e==="fine"?8:10),"shrink-0 flex items-start justify-center",...t),EP=({density:e},...t)=>ue(Am(e),...t),xP=(e,...t)=>ue(Ke(5),"mbs-2.5",...t),SP=({density:e},...t)=>ue("is-5 rounded flex justify-center items-center",Am(e),Im,Fr,...t),$P=(e,...t)=>ue(Ke(5),...t),CP={root:yP,item:{root:wP,endcap:_P,heading:EP,dragHandleIcon:xP,openTrigger:SP,openTriggerIcon:$P}},To={start:{width:"sm:is-[270px]",sidebar:"sm:-inline-start-[270px]",content:"pis-[270px]"},end:{width:"sm:is-[360px]",sidebar:"sm:-inline-end-[360px]",content:"pie-[360px]"}},OP=({inlineStartSidebarOpen:e,inlineEndSidebarOpen:t,side:r},...n)=>ue("fixed block-start-0 block-end-0 is-[100vw] z-10 overscroll-contain overflow-x-hidden overflow-y-auto","transition-[inset-inline-start,inset-inline-end] duration-200 ease-in-out",J6,r==="inline-start"?To.start.width:To.end.width,r==="inline-start"?e?"inline-start-0":ue("-inline-start-[100vw]",To.start.sidebar):t?"inline-end-0":ue("-inline-end-[100vw]",To.end.sidebar),r==="inline-start"?"border-ie":"border-is",Y6,...n),AP=({isLg:e,inlineStartSidebarOpen:t,inlineEndSidebarOpen:r,bounce:n},...o)=>ue("transition-[padding-inline-start,padding-inline-end] duration-200 ease-in-out",e&&t?To.start.content:"pis-0",e&&r?To.end.content:"pie-0",n&&H6,...o),TP=({isLg:e,inlineStartSidebarOpen:t,inlineEndSidebarOpen:r,side:n},...o)=>ue("fixed inset-0 z-[9] bg-transparent","transition-opacity duration-200 ease-in-out",!e&&(t||r)?"opacity-100":"opacity-0",!e&&(t||r)?"block":"hidden",...o),IP={content:AP,sidebar:OP,overlay:TP},PP=({valence:e,elevation:t},...r)=>ue("p-3 rounded-md max-is-full overflow-auto",eu({elevation:t}),f3(e),...r),kP=(e,...t)=>ue("text-base font-medium mb-2",...t),NP=(e,...t)=>ue(...t),DP={root:PP,title:kP,body:NP},LP=({constrainInline:e,constrainBlock:t},...r)=>ue("p-1 rounded-lg",e&&"max-is-[--radix-popover-content-available-width] overflow-x-auto",t&&"max-bs-[--radix-popover-content-available-height] overflow-y-auto",...r),MP=(e,...t)=>ue("z-[30] rounded-lg",Gn,Ao({elevation:"group"}),Fr,...t),FP=(e,...t)=>ue(k6,...t),jP={content:MP,viewport:LP,arrow:FP},BP=(e,...t)=>ue("overflow-hidden",...t),RP=(e,...t)=>ue("is-full bs-full scroll-smooth","[&>div]:table-fixed [&>div]:w-full",...t),UP=(e,...t)=>ue("flex select-none touch-none p-0.5 ease-out","data-[orientation=vertical]:is-1.5 data-[orientation=horizontal]:flex-col data-[orientation=horizontal]:bs-1.5",...t),WP=(e,...t)=>ue("bg-neutral-500/50 flex-1 rounded-lg relative","before:content-[''] before:absolute before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2 before:w-full before:h-full before:min-w-[44px] before:min-h-[44px]",...t),VP=(e,...t)=>ue(...t),HP={root:BP,viewport:RP,scrollbar:UP,thumb:WP,corner:VP},zP=({elevation:e="chrome"},...t)=>ue("p-1 z-[50] rounded",Gn,Ao({elevation:e}),...t),GP=(e,...t)=>ue("relative flex items-center pis-6 pie-3 plb-1","text-base leading-none rounded-sm select-none outline-none",q6,...t),KP=(e,...t)=>ue("absolute inline-start-0 is-6 inline-flex items-center justify-center",...t),qP=(e,...t)=>ue(Qc,...t),YP=(e,...t)=>ue(km,...t),JP=(e,...t)=>ue(Gn,"flex items-center justify-center cursor-default bs-6 is-full",...t),XP={content:zP,item:GP,itemIndicator:KP,arrow:qP,separator:YP,scrollButton:JP},ZP=({orientation:e},...t)=>ue(e==="vertical"?K6:km,G6,...t),QP={root:ZP},ek=(e,...t)=>ue("is-20 bs-1 inline-block relative bg-neutral-400/25 rounded-full",...t),tk=({indeterminate:e},...t)=>ue("absolute inline-start-0 inset-block-0 inline-block bg-neutral-400 rounded-full",e&&"animate-progress-indeterminate",...t),rk={root:ek,bar:tk},nk={neutral:"bg-neutral-200 text-neutral-800 dark:bg-neutral-700 dark:text-neutral-150",red:"bg-red-200 text-red-800 dark:bg-red-700 dark:text-red-150",orange:"bg-orange-200 text-orange-800 dark:bg-orange-700 dark:text-orange-150",amber:"bg-amber-200 text-amber-800 dark:bg-amber-700 dark:text-amber-150",yellow:"bg-yellow-200 text-yellow-800 dark:bg-yellow-700 dark:text-yellow-150",lime:"bg-lime-200 text-lime-800 dark:bg-lime-700 dark:text-lime-150",green:"bg-green-200 text-green-800 dark:bg-green-700 dark:text-green-150",emerald:"bg-emerald-200 text-emerald-800 dark:bg-emerald-700 dark:text-emerald-150",teal:"bg-teal-200 text-teal-800 dark:bg-teal-700 dark:text-teal-150",cyan:"bg-cyan-200 text-cyan-800 dark:bg-cyan-700 dark:text-cyan-150",sky:"bg-sky-200 text-sky-800 dark:bg-sky-700 dark:text-sky-150",blue:"bg-blue-200 text-blue-800 dark:bg-blue-700 dark:text-blue-150",indigo:"bg-indigo-200 text-indigo-800 dark:bg-indigo-700 dark:text-indigo-150",violet:"bg-violet-200 text-violet-800 dark:bg-violet-700 dark:text-violet-150",purple:"bg-purple-200 text-purple-800 dark:bg-purple-700 dark:text-purple-150",fuchsia:"bg-fuchsia-200 text-fuchsia-800 dark:bg-fuchsia-700 dark:text-fuchsia-150",pink:"bg-pink-200 text-pink-800 dark:bg-pink-700 dark:text-pink-150",rose:"bg-rose-200 text-rose-800 dark:bg-rose-700 dark:text-rose-150",info:"bg-info-200 text-info-800 dark:bg-info-700 dark:text-info-150",success:"bg-success-200 text-success-800 dark:bg-success-700 dark:text-success-150",warning:"bg-warning-200 text-warning-800 dark:bg-warning-700 dark:text-warning-150",error:"bg-error-200 text-error-800 dark:bg-error-700 dark:text-error-150"},ok=({palette:e="neutral"},...t)=>ue("text-xs font-semibold pli-2 plb-0.5 rounded cursor-default",nk[e],...t),ik={root:ok},ak=(e,...t)=>ue("z-[70] fixed bottom-4 inset-x-4 w-auto md:top-4 md:right-4 md:left-auto md:bottom-auto md:w-full md:max-w-sm rounded-lg flex flex-col gap-2",...t),sk=(e,...t)=>ue("rounded-lg flex p-2 gap-2",Gn,Ao({elevation:"chrome"}),"radix-state-open:animate-toast-slide-in-bottom md:radix-state-open:animate-toast-slide-in-right","radix-state-closed:animate-toast-hide","radix-swipe-end:animate-toast-swipe-out","translate-x-radix-toast-swipe-move-x","radix-swipe-cancel:translate-x-0 radix-swipe-cancel:duration-200 radix-swipe-cancel:ease-[ease]",Fr,...t),lk=(e,...t)=>ue("grow flex flex-col gap-1 justify-center pis-2",...t),ck=(e,...t)=>ue("shrink-0 flex flex-col gap-1 justify-center",...t),uk=({srOnly:e},...t)=>ue("shrink-0 text-md font-medium",e&&"sr-only",...t),fk=({srOnly:e},...t)=>ue(Ot,"shrink-0",e&&"sr-only",...t),dk={viewport:ak,root:sk,body:lk,title:uk,description:fk,actions:ck},pk=(e,...t)=>ue("flex items-center gap-2 is-full",...t),hk={root:pk},vk=(e,...t)=>ue("inline-flex items-center rounded-md plb-2 pli-3",Gn,Pm,Ao({elevation:"group"}),e3,...t),gk=(e,...t)=>ue(Qc,...t),mk={content:vk,arrow:gk},bk={themeName:()=>"default",anchoredOverflow:h3,avatar:$3,breadcrumb:P3,button:j3,dialog:H3,menu:X3,input:gP,link:bP,list:CP,main:IP,message:DP,popover:jP,select:XP,scrollArea:HP,separator:QP,status:rk,tag:ik,toast:dk,toolbar:hk,tooltip:mk},yk=e=>(t,r,n,...o)=>{const i=T6(e,t);return typeof i=="function"?i(n,...o):r},wk=yk(bk);const Wm=c.createContext({textValue:"",setTextValue:async e=>{}}),Vm=()=>c.useContext(Wm),ou=({children:e})=>{const[t,r]=c.useState(""),n=c.useCallback(async o=>(await navigator.clipboard.writeText(o),r(o)),[]);return c.createElement(Wm.Provider,{value:{textValue:t,setTextValue:n}},e)},Hm="invisible bs-px -mbe-px overflow-hidden",_k=({value:e,classNames:t,iconProps:r,...n})=>{const{t:o}=it("os"),{textValue:i,setTextValue:a}=Vm(),s=i===e;return c.createElement(br,{...n,classNames:["inline-flex flex-col justify-center",t],onClick:()=>a(e),"data-testid":"copy-invitation"},c.createElement("div",{role:"none",className:ue("flex gap-1 items-center",s&&Hm)},c.createElement("span",{className:"pli-1"},o("copy invitation code label")),c.createElement(Xe.Copy,{className:Ke(4),weight:"bold",...r})),c.createElement("div",{role:"none",className:ue("flex gap-1 items-center",!s&&Hm)},c.createElement("span",{className:"pli-1"},o("copy invitation code success label")),c.createElement(Xe.Check,{className:Ke(4),weight:"bold",...r})))},Ek=({value:e,classNames:t,iconProps:r,variant:n,...o})=>{const{t:i}=it("os"),{textValue:a,setTextValue:s}=Vm(),u=i(a===e?"copy invitation code success label":"copy invitation code label"),[f,d]=c.useState(!1);return c.createElement(yr.Root,{delayDuration:1500,open:f,onOpenChange:d},c.createElement(yr.Portal,null,c.createElement(yr.Content,{side:"bottom",sideOffset:12,classNames:"z-30"},c.createElement("span",null,u),c.createElement(yr.Arrow,null))),c.createElement(yr.Trigger,{"aria-label":u,...o,onClick:()=>s(e).then(()=>d(!0)),"data-testid":"copy-invitation",asChild:!0},c.createElement(br,{variant:n,classNames:["inline-flex flex-col justify-center",t]},c.createElement(Xe.Copy,{className:Ke(5),weight:"bold",...r}))))},iu=({children:e,description:t,before:r,after:n,variant:o="default",elevation:i,slots:a={},...s})=>{const l=_t("compoundButton-label"),u=_t("compoundButton-description"),{tx:f}=Oe(),d=Bn(i),p={...s,variant:o,elevation:d,textWrap:!0},h=f("button.root","button button--compound",p,"flex items-center gap-4 plb-2.5",a.root?.className);return c.createElement("button",{...s,...a.root,className:h,"aria-labelledby":l,...t&&{"aria-describedby":u}},r&&c.createElement("div",{role:"none",className:"grow-0"},r),c.createElement("div",{role:"none",...a.middle,className:ue("grow whitespace-normal flex flex-col gap-1 text-left",a.middle?.className)},c.createElement("p",{...a.label,id:l,className:ue(a.label?.className)},e),t&&c.createElement("p",{id:u,...a.description,className:ue("text-xs mbe-1 font-normal",o==="primary"?Q6:Ot,a.description?.className)},t)),n&&c.createElement("div",{role:"none",className:"grow-0"},n))};var _s={adjectives:["abundant","accessible","accomplished","accurate","achievable","adaptable","adaptive","adequate","adjustable","admirable","admiring","adorable","adored","adoring","adroit","adulatory","advanced","advantageous","adventurous","affable","affectionate","affirmative","affluent","affordable","agile","agreeable","alluring","altruistic","amazed","amazing","ambitious","amenable","amiable","amicable","ample","amusing","angelic","appealing","appreciable","appreciated","appreciative","appropriate","ardent","articulate","artistic","assuring","astonished","astonishing","astounded","astounding","athletic","attentive","attractive","audible","auspicious","authentic","autonomous","available","avid","awed","awesome","awestruck","beauteous","beautiful","believable","beloved","beneficent","beneficial","benevolent","blameless","blissful","blithe","bonny","booming","boundless","bountiful","brainiest","brainy","brave","breathtaking","bright","brighter","brightest","brilliant","brisk","brotherly","bullish","buoyant","calm","calming","capable","captivating","carefree","catchy","celebrated","celebratory","champion","charismatic","charitable","charming","chaste","cheaper","cheapest","cheerful","cheery","cherished","chivalrous","classic","classy","clean","cleaner","cleanest","cleanly","clear","cleared","clearer","clever","coherent","cohesive","colorful","comely","comfortable","comforting","comfy","commendable","commodious","compact","compatible","competitive","compliant","conciliatory","concise","confident","congenial","considerate","consistent","constructive","consummate","contrasty","convenient","convincing","cool","coolest","cooperative","correct","courageous","courteous","courtly","cozy","creative","credible","crisp","crisper","cushy","cute","daring","darling","dashing","dauntless","dazzled","dazzling","decent","decisive","dedicated","defeated","deft","delectable","delicate","delicious","delighted","delightful","dependable","deserving","desirable","desirous","detachable","devout","dexterous","dextrous","dignified","diligent","diplomatic","distinctive","diversified","divine","dominated","dumbfounded","durable","dynamic","eager","earnest","eased","easy","easygoing","ebullient","economical","ecstatic","educated","effective","efficacious","efficient","effortless","effusive","elated","elegant","elite","eloquent","eminent","enchanted","enchanting","encouraging","endearing","endorsed","energetic","engaging","engrossing","enhanced","enjoyable","enraptured","enterprising","entertaining","enthralled","enthusiastic","enticing","entranced","entrancing","enviable","envious","equitable","erudite","ethical","euphoric","evaluative","eventful","everlasting","evocative","exalted","exalting","exceeding","excellent","exceptional","excited","exciting","exemplary","exhilarating","expansive","exquisite","exuberant","exultant","fabulous","fair","faithful","famed","famous","fancier","fancy","fantastic","fascinating","fashionable","fast","faster","fastest","faultless","favorable","favored","favorite","fearless","feasible","feisty","felicitous","fertile","fervent","fervid","festive","fiery","fine","finer","finest","firmer","flashy","flatter","flattering","flawless","flexible","flourishing","fluent","fond","foolproof","foremost","formidable","fortuitous","fortunate","fragrant","free","freed","fresh","fresher","freshest","friendly","frugal","fruitful","fun","funny","futuristic","gainful","gallant","galore","generous","genial","gentle","gentlest","genuine","gifted","glad","glamorous","gleeful","glimmering","glistening","glorious","glowing","godlike","gold","golden","good","goodly","gorgeous","graceful","gracious","grand","grateful","gratified","gratifying","great","greatest","guiltless","gutsy","halcyon","hale","hallowed","handier","handsome","handy","happier","happy","hardier","hardy","harmless","harmonious","healthful","healthy","heartening","heartfelt","heartwarming","heavenly","helpful","heroic","hilarious","holy","honest","honorable","honored","hopeful","hospitable","hot","hottest","humane","humble","humorous","humourous","ideal","idolized","idyllic","illuminating","illustrious","imaginative","immaculate","immense","impartial","impassioned","impeccable","important","impressed","impressive","improved","improving","incredible","indebted","indulgent","industrious","inestimable","inexpensive","infallible","influential","ingenious","ingenuous","innocuous","innovative","insightful","inspiring","instructive","instrumental","intelligent","intelligible","interesting","intimate","intricate","intriguing","intuitive","invaluable","inventive","invigorating","invincible","inviolable","inviolate","invulnerable","irresistible","jolly","jovial","joyful","joyous","jubilant","judicious","keen","kindly","laudable","lavish","lawful","leading","lean","legendary","lighter","likable","like","liked","lionhearted","lively","logical","lovable","loved","lovely","loving","loyal","lucid","luckier","luckiest","lucky","lucrative","luminous","lush","lustrous","luxuriant","luxurious","luxury","lyrical","magic","magical","magnanimous","magnificent","majestic","manageable","marvellous","marvelous","masterful","matchless","mature","meaningful","memorable","merciful","meritorious","merry","mesmerized","mesmerizing","meticulous","mighty","miraculous","modern","modest","momentous","monumental","motivated","navigable","neat","neatest","nice","nifty","nimble","noble","noiseless","noteworthy","nourishing","observant","obtainable","optimal","optimistic","opulent","orderly","organized","outstanding","overjoyed","painless","palatial","pampered","panoramic","paramount","passionate","patient","patri","peaceable","peaceful","peerless","peppy","perfect","permissible","personalized","phenomenal","picturesque","playful","pleasant","pleased","pleasing","pleasurable","plentiful","plush","poetic","poignant","poised","polished","polite","popular","portable","posh","positive","powerful","praiseworthy","praising","precious","precise","preeminent","preferable","premier","prestigious","pretty","priceless","principled","privileged","prize","proactive","prodigious","productive","proficient","profound","progressive","prolific","prominent","promised","promising","prompt","proper","propitious","prosperous","protective","proud","proven","prudent","punctual","pure","purposeful","quaint","qualified","quicker","quiet","quieter","radiant","rapid","rapt","rapturous","rational","reachable","readable","ready","realistic","realizable","reasonable","reasoned","receptive","recommended","redeeming","refined","reformed","refreshed","refreshing","regal","rejoicing","relaxed","reliable","remarkable","renewed","renowned","replaceable","reputable","resilient","resolute","resounding","resourceful","respectable","respectful","resplendent","responsive","restful","restored","retractable","reverent","rewarding","rich","righteous","rightful","robust","romantic","roomier","rosy","safe","saintly","salutary","sane","satisfactory","satisfied","satisfying","scenic","seamless","seasoned","secure","selective","sensational","sensible","sensitive","serene","sexy","sharp","sharper","sharpest","shiny","significant","silent","simpler","simplest","simplified","sincere","skilled","skillful","sleek","slick","smart","smarter","smartest","smelly","smiling","smitten","smooth","smoother","smoothest","snappy","snazzy","sociable","soft","softer","solid","soulful","spacious","sparkling","spectacular","speedy","spellbinding","spellbound","spirited","spiritual","splendid","spontaneous","sporty","spotless","sprightly","stable","stainless","stately","statuesque","staunch","steadfast","steadiest","steady","stellar","stimulating","stimulative","streamlined","striking","strong","stronger","strongest","stunned","stunning","stupendous","sturdier","sturdy","stylish","stylized","suave","sublime","subsidized","substantive","succeeding","successful","sufficient","suitable","sumptuous","super","superb","superior","supple","supportive","supreme","surreal","sustainable","swankier","swankiest","swanky","sweeping","sweet","sweetheart","swift","talented","tantalizing","tempting","tenacious","tender","terrific","thankful","thinner","thoughtful","thrifty","thrilled","thrilling","thriving","tidy","timely","titillating","tolerable","top","topnotch","tough","tougher","toughest","tranquil","transparent","trendy","triumphal","triumphant","trusted","trusting","trustworthy","trusty","truthful","twinkly","unabashed","unaffected","unassailable","unbeatable","unbiased","unbound","undamaged","undaunted","undisputable","undisputed","unencumbered","unequivocal","unfettered","unlimited","unmatched","unparalleled","unreal","unrestricted","unrivaled","unselfish","unwavering","upbeat","upscale","usable","useful","valiant","valuable","verifiable","veritable","versatile","vibrant","victorious","viewable","vigilant","virtuous","visionary","vivacious","vivid","warm","warmer","warmhearted","wealthy","welcome","wholesome","wieldy","winning","wise","witty","wonderful","wondrous","workable","worth","worthwhile","worthy","young","youthful","zippy"],animals:["aardvark","albatross","alligator","angelfish","angora","ant","anteater","antelope","armadillo","avocet","baboon","badger","bandicoot","barnacle","barracuda","bat","beagle","bear","beaver","bee","beetle","bird","bison","bloodhound","boar","bobcat","bonobo","buffalo","bulldog","bullfrog","butterfly","buzzard","camel","cat","caterpillar","catfish","cattle","centipede","chameleon","cheetah","chicken","chihuahua","chimpanzee","chin","chinchilla","chipmunk","civet","clam","cockroach","coon","coral","corgi","cougar","cow","coyote","crab","crane","cuttlefish","dachshund","dalmatian","dane","deer","devil","dingo","dodo","dog","dogfish","dollar","dolphin","donkey","dormouse","dragon","dragonfly","duck","dugong","eagle","earwig","eel","elephant","emperor","emu","falcon","ferret","fish","flamingo","flounder","fly","forest","fowl","fox","foxhound","frog","gar","gecko","gerbil","gharial","gibbon","giraffe","goat","goose","gopher","gorilla","grasshopper","greyhound","grouse","guppy","hamster","hare","hedgehog","heron","hippopotamus","hornet","horse","hound","hummingbird","husky","hyena","hyrax","ibis","iguana","impala","insect","jackal","jaguar","jellyfish","kangaroo","kingfisher","kiwi","koala","kudu","labradoodle","ladybird","lemming","lemur","leopard","liger","lion","lionfish","lizard","llama","lobster","lynx","macaque","macaw","magpie","malamute","maltese","mammoth","manatee","mandrill","markhor","marmoset","mastiff","mayfly","meerkat","millipede","mole","mongoose","monkey","monster","moorhen","moose","moth","mouse","mule","newt","nightingale","ocelot","octopus","okapi","orangutan","ostrich","otter","owl","oyster","panda","panther","parrot","peacock","pelican","penguin","pheasant","pig","pike","piranha","platypus","pointer","poodle","porcupine","possum","prawn","puffin","pug","puma","quail","rabbit","raccoon","rat","rattlesnake","ray","reindeer","retriever","rhinoceros","robin","rottweiler","russel","salamander","scorpion","seahorse","seal","shark","sheep","sheepdog","shrew","shrimp","skater","skunk","sloth","slug","snail","snake","snowshoe","spaniel","sparrow","spider","sponge","squid","squirrel","squirt","starfish","stingray","stoat","swan","tapir","tarantula","termite","terrier","tiger","toad","tortoise","toucan","tuatara","turkey","turtle","uakari","urchin","vole","vulture","wallaby","walrus","warthog","wasp","weasel","whale","whippet","wildebeest","wolf","wolfhound","wolverine","wombat","woodlouse","woodpecker","worm","yak","zebra","zebu","zonkey","zorse"]},zm=e=>e.charAt(0).toUpperCase()+e.slice(1),au=e=>{const t=e.length*2/3,r=e.substring(0,t),n=e.substring(t),o=zm(_s.adjectives[parseInt(r,16)%_s.adjectives.length]),i=zm(_s.animals[parseInt(n,16)%_s.animals.length]);return`${o} ${i}`};const Gm=c.forwardRef(({identity:e,presence:t,onClick:r},n)=>{const o=e.identityKey.toHex(),i=_t("identityListItem__label"),a=rs(o??"",12),s=e.profile?.displayName??au(e.identityKey.toHex());return c.createElement(kc.Root,{classNames:ue("flex gap-2 pis-3 pie-1 items-center",r&&"cursor-pointer"),onClick:()=>r?.(),"data-testid":"identity-list-item",labelId:i,ref:n},c.createElement(At.Root,{status:t===fa.SpaceMember.PresenceState.ONLINE?"active":"inactive",labelId:i},c.createElement(At.Frame,null,c.createElement(At.Fallback,{href:a})),c.createElement(At.Label,{classNames:"text-sm truncate pli-2"},s)))}),xk=({devices:e,onSelect:t})=>{const{t:r}=it("os");return e.length>0?c.createElement(Pc,{classNames:"flex flex-col gap-2"},e.map(n=>{const o={identityKey:n.deviceKey,profile:n.profile?{displayName:`${n.profile?.platform} (${n.profile?.platformVersion}) on ${n.profile?.os} (${n.profile?.osVersion}) ${n.profile?.architecture??"Unknown"}-bit`}:void 0};return c.createElement(Gm,{key:n.deviceKey.toHex(),identity:o,onClick:t&&(()=>t(n))})})):c.createElement("div",{role:"none",className:"grow flex items-center p-2"},c.createElement("p",{className:ue(Ot,"text-center is-full")},r("empty device list message")))},Sk=({spaceKey:e,includeSelf:t,onSelect:r})=>{const n=Ze.useClient(),o=fa.useMembers(e),i=c.useMemo(()=>t?o.sort(a=>a.identity.identityKey.equals(n.halo.identity.get().identityKey)?-1:1):o.filter(a=>!a.identity.identityKey.equals(n.halo.identity.get().identityKey)),[o]);return c.createElement($k,{members:i,onSelect:r})},$k=({members:e,onSelect:t})=>{const{t:r}=it("os"),n=e.filter(o=>o.identity);return n.length>0?c.createElement(Pc,{classNames:"flex flex-col gap-2"},n.map(o=>c.createElement(Gm,{key:o.identity.identityKey.toHex(),identity:o.identity,presence:o.presence,onClick:t&&(()=>t(o))}))):c.createElement("div",{role:"none",className:"grow flex items-center p-2"},c.createElement("p",{className:ue(Ot,"text-center is-full mlb-2")},r("empty space members message")))};var Km;(function(e){e[e.TRACE=5]="TRACE",e[e.DEBUG=10]="DEBUG",e[e.INFO=11]="INFO",e[e.WARN=12]="WARN",e[e.ERROR=13]="ERROR"})(Km||(Km={}));var qm;(function(e){(function(t){t[t.INCLUSIVE=1]="INCLUSIVE",t[t.EXPLICIT=2]="EXPLICIT"})(e.MatchingOptions||(e.MatchingOptions={}))})(qm||(qm={}));var Ym;(function(e){e[e.ACTIVE=0]="ACTIVE",e[e.INACTIVE=1]="INACTIVE"})(Ym||(Ym={}));var Jm;(function(e){(function(t){t[t.NONE=0]="NONE",t[t.TRUNCATE=1]="TRUNCATE",t[t.HUMANIZE=2]="HUMANIZE"})(e.KEY_OPTION||(e.KEY_OPTION={}))})(Jm||(Jm={}));var Xm;(function(e){e[e.CURRENT=0]="CURRENT",e[e.TRUSTED=1]="TRUSTED"})(Xm||(Xm={}));var Zm;(function(e){(function(t){t[t.OFFLINE=0]="OFFLINE",t[t.ONLINE=1]="ONLINE",t[t.REMOVED=2]="REMOVED"})(e.PresenceState||(e.PresenceState={}))})(Zm||(Zm={}));var Qm;(function(e){e[e.INACTIVE=2]="INACTIVE",e[e.ACTIVE=6]="ACTIVE",e[e.CLOSED=1]="CLOSED",e[e.CONTROL_ONLY=7]="CONTROL_ONLY",e[e.INITIALIZING=4]="INITIALIZING",e[e.READY=3]="READY",e[e.ERROR=5]="ERROR"})(Qm||(Qm={}));var eb;(function(e){(function(t){t[t.NONE=0]="NONE",t[t.INIT_AUTOMERGE=1]="INIT_AUTOMERGE"})(e.Migration||(e.Migration={}))})(eb||(eb={}));var _e;(function(e){(function(t){t[t.INTERACTIVE=0]="INTERACTIVE",t[t.OFFLINE=1]="OFFLINE",t[t.MULTIUSE=2]="MULTIUSE"})(e.Type||(e.Type={})),function(t){t[t.DEVICE=0]="DEVICE",t[t.SPACE=1]="SPACE"}(e.Kind||(e.Kind={})),function(t){t[t.NONE=0]="NONE",t[t.SHARED_SECRET=1]="SHARED_SECRET"}(e.AuthMethod||(e.AuthMethod={})),function(t){t[t.INIT=0]="INIT",t[t.CONNECTING=1]="CONNECTING",t[t.CONNECTED=2]="CONNECTED",t[t.READY_FOR_AUTHENTICATION=3]="READY_FOR_AUTHENTICATION",t[t.AUTHENTICATING=4]="AUTHENTICATING",t[t.SUCCESS=5]="SUCCESS",t[t.CANCELLED=6]="CANCELLED",t[t.TIMEOUT=7]="TIMEOUT",t[t.ERROR=8]="ERROR"}(e.State||(e.State={}))})(_e||(_e={}));var tb;(function(e){(function(t){t[t.ADDED=0]="ADDED",t[t.REMOVED=1]="REMOVED"})(e.Action||(e.Action={})),function(t){t[t.CREATED=0]="CREATED",t[t.ACCEPTED=1]="ACCEPTED"}(e.Type||(e.Type={}))})(tb||(tb={}));var rb;(function(e){e[e.OFFLINE=0]="OFFLINE",e[e.ONLINE=1]="ONLINE"})(rb||(rb={}));var Ck=200,su="__lodash_hash_undefined__",Ok=1/0,nb=9007199254740991,Ak="[object Arguments]",Tk="[object Function]",Ik="[object GeneratorFunction]",Pk="[object Symbol]",kk=/[\\^$.*+?()[\]{}|]/g,Nk=/^\[object .+?Constructor\]$/,Dk=/^(?:0|[1-9]\d*)$/,Lk=typeof Ge=="object"&&Ge&&Ge.Object===Object&&Ge,Mk=typeof self=="object"&&self&&self.Object===Object&&self,lu=Lk||Mk||Function("return this")();function Fk(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function jk(e,t){var r=e?e.length:0;return!!r&&Uk(e,t,0)>-1}function Bk(e,t,r){for(var n=-1,o=e?e.length:0;++n<o;)if(r(t,e[n]))return!0;return!1}function ob(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function cu(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}function Rk(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function Uk(e,t,r){if(t!==t)return Rk(e,Wk,r);for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}function Wk(e){return e!==e}function Vk(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Hk(e){return function(t){return e(t)}}function zk(e,t){return e.has(t)}function Gk(e,t){return e?.[t]}function Kk(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function ib(e,t){return function(r){return e(t(r))}}var qk=Array.prototype,Yk=Function.prototype,Es=Object.prototype,uu=lu["__core-js_shared__"],ab=function(){var e=/[^.]+$/.exec(uu&&uu.keys&&uu.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),sb=Yk.toString,Io=Es.hasOwnProperty,fu=Es.toString,Jk=RegExp("^"+sb.call(Io).replace(kk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),lb=lu.Symbol,Xk=ib(Object.getPrototypeOf,Object),Zk=Es.propertyIsEnumerable,Qk=qk.splice,cb=lb?lb.isConcatSpreadable:void 0,du=Object.getOwnPropertySymbols,ub=Math.max,e4=db(lu,"Map"),Pi=db(Object,"create");function Kn(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function t4(){this.__data__=Pi?Pi(null):{}}function r4(e){return this.has(e)&&delete this.__data__[e]}function n4(e){var t=this.__data__;if(Pi){var r=t[e];return r===su?void 0:r}return Io.call(t,e)?t[e]:void 0}function o4(e){var t=this.__data__;return Pi?t[e]!==void 0:Io.call(t,e)}function i4(e,t){var r=this.__data__;return r[e]=Pi&&t===void 0?su:t,this}Kn.prototype.clear=t4,Kn.prototype.delete=r4,Kn.prototype.get=n4,Kn.prototype.has=o4,Kn.prototype.set=i4;function Po(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function a4(){this.__data__=[]}function s4(e){var t=this.__data__,r=Ss(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Qk.call(t,r,1),!0}function l4(e){var t=this.__data__,r=Ss(t,e);return r<0?void 0:t[r][1]}function c4(e){return Ss(this.__data__,e)>-1}function u4(e,t){var r=this.__data__,n=Ss(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}Po.prototype.clear=a4,Po.prototype.delete=s4,Po.prototype.get=l4,Po.prototype.has=c4,Po.prototype.set=u4;function ko(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function f4(){this.__data__={hash:new Kn,map:new(e4||Po),string:new Kn}}function d4(e){return $s(this,e).delete(e)}function p4(e){return $s(this,e).get(e)}function h4(e){return $s(this,e).has(e)}function v4(e,t){return $s(this,e).set(e,t),this}ko.prototype.clear=f4,ko.prototype.delete=d4,ko.prototype.get=p4,ko.prototype.has=h4,ko.prototype.set=v4;function xs(e){var t=-1,r=e?e.length:0;for(this.__data__=new ko;++t<r;)this.add(e[t])}function g4(e){return this.__data__.set(e,su),this}function m4(e){return this.__data__.has(e)}xs.prototype.add=xs.prototype.push=g4,xs.prototype.has=m4;function b4(e,t){var r=pu(e)||pb(e)?Vk(e.length,String):[],n=r.length,o=!!n;for(var i in e)(t||Io.call(e,i))&&!(o&&(i=="length"||I4(i,n)))&&r.push(i);return r}function Ss(e,t){for(var r=e.length;r--;)if(F4(e[r][0],t))return r;return-1}function y4(e,t,r,n){var o=-1,i=jk,a=!0,s=e.length,l=[],u=t.length;if(!s)return l;r&&(t=ob(t,Hk(r))),n?(i=Bk,a=!1):t.length>=Ck&&(i=zk,a=!1,t=new xs(t));e:for(;++o<s;){var f=e[o],d=r?r(f):f;if(f=n||f!==0?f:0,a&&d===d){for(var p=u;p--;)if(t[p]===d)continue e;l.push(f)}else i(t,d,n)||l.push(f)}return l}function fb(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=T4),o||(o=[]);++i<a;){var s=e[i];t>0&&r(s)?t>1?fb(s,t-1,r,n,o):cu(o,s):n||(o[o.length]=s)}return o}function w4(e,t,r){var n=t(e);return pu(e)?n:cu(n,r(e))}function _4(e){if(!hu(e)||k4(e))return!1;var t=vb(e)||Kk(e)?Jk:Nk;return t.test(M4(e))}function E4(e){if(!hu(e))return D4(e);var t=N4(e),r=[];for(var n in e)n=="constructor"&&(t||!Io.call(e,n))||r.push(n);return r}function x4(e,t){return e=Object(e),S4(e,t,function(r,n){return n in e})}function S4(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=e[a];r(s,a)&&(i[a]=s)}return i}function $4(e,t){return t=ub(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,o=ub(r.length-t,0),i=Array(o);++n<o;)i[n]=r[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=r[n];return a[t]=i,Fk(e,this,a)}}function C4(e){return w4(e,U4,A4)}function $s(e,t){var r=e.__data__;return P4(t)?r[typeof t=="string"?"string":"hash"]:r.map}function db(e,t){var r=Gk(e,t);return _4(r)?r:void 0}var O4=du?ib(du,Object):mb,A4=du?function(e){for(var t=[];e;)cu(t,O4(e)),e=Xk(e);return t}:mb;function T4(e){return pu(e)||pb(e)||!!(cb&&e&&e[cb])}function I4(e,t){return t=t??nb,!!t&&(typeof e=="number"||Dk.test(e))&&e>-1&&e%1==0&&e<t}function P4(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function k4(e){return!!ab&&ab in e}function N4(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Es;return e===r}function D4(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}function L4(e){if(typeof e=="string"||R4(e))return e;var t=e+"";return t=="0"&&1/e==-Ok?"-0":t}function M4(e){if(e!=null){try{return sb.call(e)}catch{}try{return e+""}catch{}}return""}function F4(e,t){return e===t||e!==e&&t!==t}function pb(e){return j4(e)&&Io.call(e,"callee")&&(!Zk.call(e,"callee")||fu.call(e)==Ak)}var pu=Array.isArray;function hb(e){return e!=null&&B4(e.length)&&!vb(e)}function j4(e){return gb(e)&&hb(e)}function vb(e){var t=hu(e)?fu.call(e):"";return t==Tk||t==Ik}function B4(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=nb}function hu(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function gb(e){return!!e&&typeof e=="object"}function R4(e){return typeof e=="symbol"||gb(e)&&fu.call(e)==Pk}function U4(e){return hb(e)?b4(e,!0):E4(e)}$4(function(e,t){return e==null?{}:(t=ob(fb(t,1),L4),x4(e,y4(C4(e),t)))});function mb(){return[]}var W4=1/0,V4=9007199254740991,H4="[object Arguments]",z4="[object Function]",G4="[object GeneratorFunction]",K4="[object Symbol]",q4=typeof Ge=="object"&&Ge&&Ge.Object===Object&&Ge,Y4=typeof self=="object"&&self&&self.Object===Object&&self,J4=q4||Y4||Function("return this")();function X4(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Z4(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function Q4(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var vu=Object.prototype,eN=vu.hasOwnProperty,gu=vu.toString,bb=J4.Symbol,tN=vu.propertyIsEnumerable,yb=bb?bb.isConcatSpreadable:void 0,wb=Math.max;function _b(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=iN),o||(o=[]);++i<a;){var s=e[i];t>0&&r(s)?t>1?_b(s,t-1,r,n,o):Q4(o,s):n||(o[o.length]=s)}return o}function rN(e,t){return e=Object(e),nN(e,t,function(r,n){return n in e})}function nN(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=e[a];r(s,a)&&(i[a]=s)}return i}function oN(e,t){return t=wb(t===void 0?e.length-1:t,0),function(){for(var r=arguments,n=-1,o=wb(r.length-t,0),i=Array(o);++n<o;)i[n]=r[t+n];n=-1;for(var a=Array(t+1);++n<t;)a[n]=r[n];return a[t]=i,X4(e,this,a)}}function iN(e){return lN(e)||sN(e)||!!(yb&&e&&e[yb])}function aN(e){if(typeof e=="string"||hN(e))return e;var t=e+"";return t=="0"&&1/e==-W4?"-0":t}function sN(e){return uN(e)&&eN.call(e,"callee")&&(!tN.call(e,"callee")||gu.call(e)==H4)}var lN=Array.isArray;function cN(e){return e!=null&&dN(e.length)&&!fN(e)}function uN(e){return Eb(e)&&cN(e)}function fN(e){var t=pN(e)?gu.call(e):"";return t==z4||t==G4}function dN(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=V4}function pN(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function Eb(e){return!!e&&typeof e=="object"}function hN(e){return typeof e=="symbol"||Eb(e)&&gu.call(e)==K4}oN(function(e,t){return e==null?{}:rN(e,Z4(_b(t,1),aN))});var vN=Object.create,xb=Object.defineProperty,gN=Object.getOwnPropertyDescriptor,Sb=Object.getOwnPropertyNames,mN=Object.getPrototypeOf,bN=Object.prototype.hasOwnProperty,We=(e,t)=>function(){return t||(0,e[Sb(e)[0]])((t={exports:{}}).exports,t),t.exports},yN=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Sb(t))!bN.call(e,o)&&o!==r&&xb(e,o,{get:()=>t[o],enumerable:!(n=gN(t,o))||n.enumerable});return e},ki=(e,t,r)=>(r=e!=null?vN(mN(e)):{},yN(t||!e||!e.__esModule?xb(r,"default",{value:e,enumerable:!0}):r,e)),$b=We({"node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js"(e,t){t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var n={},o=Symbol("test"),i=Object(o);if(typeof o=="string"||Object.prototype.toString.call(o)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var a=42;n[o]=a;for(o in n)return!1;if(typeof Object.keys=="function"&&Object.keys(n).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(n).length!==0)return!1;var s=Object.getOwnPropertySymbols(n);if(s.length!==1||s[0]!==o||!Object.prototype.propertyIsEnumerable.call(n,o))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(n,o);if(l.value!==a||l.enumerable!==!0)return!1}return!0}}}),Ni=We({"node_modules/.pnpm/has-tostringtag@1.0.0/node_modules/has-tostringtag/shams.js"(e,t){var r=$b();t.exports=function(){return r()&&!!Symbol.toStringTag}}}),Cb=We({"node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js"(e,t){var r=typeof Symbol<"u"&&Symbol,n=$b();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}}),Ob=We({"node_modules/.pnpm/has-proto@1.0.1/node_modules/has-proto/index.js"(e,t){var r={foo:{}},n=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof n)}}}),wN=We({"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(e,t){var r="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,o=Math.max,i="[object Function]",a=function(f,d){for(var p=[],h=0;h<f.length;h+=1)p[h]=f[h];for(var v=0;v<d.length;v+=1)p[v+f.length]=d[v];return p},s=function(f,d){for(var p=[],h=d||0,v=0;h<f.length;h+=1,v+=1)p[v]=f[h];return p},l=function(u,f){for(var d="",p=0;p<u.length;p+=1)d+=u[p],p+1<u.length&&(d+=f);return d};t.exports=function(f){var d=this;if(typeof d!="function"||n.apply(d)!==i)throw new TypeError(r+d);for(var p=s(arguments,1),h,v=function(){if(this instanceof h){var E=d.apply(this,a(p,arguments));return Object(E)===E?E:this}return d.apply(f,a(p,arguments))},g=o(0,d.length-p.length),y=[],m=0;m<g;m++)y[m]="$"+m;if(h=Function("binder","return function ("+l(y,",")+"){ return binder.apply(this,arguments); }")(v),d.prototype){var w=function(){};w.prototype=d.prototype,h.prototype=new w,w.prototype=null}return h}}}),mu=We({"node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(e,t){var r=wN();t.exports=Function.prototype.bind||r}}),_N=We({"node_modules/.pnpm/hasown@2.0.0/node_modules/hasown/index.js"(e,t){var r=Function.prototype.call,n=Object.prototype.hasOwnProperty,o=mu();t.exports=o.call(r,n)}}),No=We({"node_modules/.pnpm/get-intrinsic@1.2.2/node_modules/get-intrinsic/index.js"(e,t){var r,n=SyntaxError,o=Function,i=TypeError,a=function(K){try{return o('"use strict"; return ('+K+").constructor;")()}catch{}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch{s=null}var l=function(){throw new i},u=s?function(){try{return arguments.callee,l}catch{try{return s(arguments,"callee").get}catch{return l}}}():l,f=Cb()(),d=Ob()(),p=Object.getPrototypeOf||(d?function(K){return K.__proto__}:null),h={},v=typeof Uint8Array>"u"||!p?r:p(Uint8Array),g={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":f&&p?p([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&p?p(p([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!f||!p?r:p(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!f||!p?r:p(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&p?p(""[Symbol.iterator]()):r,"%Symbol%":f?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":u,"%TypedArray%":v,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(p)try{null.error}catch(K){y=p(p(K)),g["%Error.prototype%"]=y}var y,m=function K(Y){var te;if(Y==="%AsyncFunction%")te=a("async function () {}");else if(Y==="%GeneratorFunction%")te=a("function* () {}");else if(Y==="%AsyncGeneratorFunction%")te=a("async function* () {}");else if(Y==="%AsyncGenerator%"){var oe=K("%AsyncGeneratorFunction%");oe&&(te=oe.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var le=K("%AsyncGenerator%");le&&p&&(te=p(le.prototype))}return g[Y]=te,te},w={"%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"]},E=mu(),x=_N(),P=E.call(Function.call,Array.prototype.concat),I=E.call(Function.apply,Array.prototype.splice),S=E.call(Function.call,String.prototype.replace),A=E.call(Function.call,String.prototype.slice),k=E.call(Function.call,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,N=function(Y){var te=A(Y,0,1),oe=A(Y,-1);if(te==="%"&&oe!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(oe==="%"&&te!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var le=[];return S(Y,j,function(ae,ve,ce,q){le[le.length]=ce?S(q,D,"$1"):ve||ae}),le},J=function(Y,te){var oe=Y,le;if(x(w,oe)&&(le=w[oe],oe="%"+le[0]+"%"),x(g,oe)){var ae=g[oe];if(ae===h&&(ae=m(oe)),typeof ae>"u"&&!te)throw new i("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:le,name:oe,value:ae}}throw new n("intrinsic "+Y+" does not exist!")};t.exports=function(Y,te){if(typeof Y!="string"||Y.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof te!="boolean")throw new i('"allowMissing" argument must be a boolean');if(k(/^%?[^%]*%?$/,Y)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var oe=N(Y),le=oe.length>0?oe[0]:"",ae=J("%"+le+"%",te),ve=ae.name,ce=ae.value,q=!1,V=ae.alias;V&&(le=V[0],I(oe,P([0,1],V)));for(var re=1,de=!0;re<oe.length;re+=1){var U=oe[re],z=A(U,0,1),M=A(U,-1);if((z==='"'||z==="'"||z==="`"||M==='"'||M==="'"||M==="`")&&z!==M)throw new n("property names with quotes must have matching quotes");if((U==="constructor"||!de)&&(q=!0),le+="."+U,ve="%"+le+"%",x(g,ve))ce=g[ve];else if(ce!=null){if(!(U in ce)){if(!te)throw new i("base intrinsic for "+Y+" exists, but the property is not available.");return}if(s&&re+1>=oe.length){var R=s(ce,U);de=!!R,de&&"get"in R&&!("originalValue"in R.get)?ce=R.get:ce=ce[U]}else de=x(ce,U),ce=ce[U];de&&!q&&(g[ve]=ce)}}return ce}}}),Ab=We({"node_modules/.pnpm/has-property-descriptors@1.0.0/node_modules/has-property-descriptors/index.js"(e,t){var r=No(),n=r("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch{return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return n([],"length",{value:1}).length!==1}catch{return!0}},t.exports=o}}),bu=We({"node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js"(e,t){var r=No(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch{n=null}t.exports=n}}),EN=We({"node_modules/.pnpm/define-data-property@1.1.1/node_modules/define-data-property/index.js"(e,t){var r=Ab()(),n=No(),o=r&&n("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch{o=!1}var i=n("%SyntaxError%"),a=n("%TypeError%"),s=bu();t.exports=function(u,f,d){if(!u||typeof u!="object"&&typeof u!="function")throw new a("`obj` must be an object or a function`");if(typeof f!="string"&&typeof f!="symbol")throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new a("`loose`, if provided, must be a boolean");var p=arguments.length>3?arguments[3]:null,h=arguments.length>4?arguments[4]:null,v=arguments.length>5?arguments[5]:null,g=arguments.length>6?arguments[6]:!1,y=!!s&&s(u,f);if(o)o(u,f,{configurable:v===null&&y?y.configurable:!v,enumerable:p===null&&y?y.enumerable:!p,value:d,writable:h===null&&y?y.writable:!h});else if(g||!p&&!h&&!v)u[f]=d;else throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),xN=We({"node_modules/.pnpm/set-function-length@1.1.1/node_modules/set-function-length/index.js"(e,t){var r=No(),n=EN(),o=Ab()(),i=bu(),a=r("%TypeError%"),s=r("%Math.floor%");t.exports=function(u,f){if(typeof u!="function")throw new a("`fn` is not a function");if(typeof f!="number"||f<0||f>4294967295||s(f)!==f)throw new a("`length` must be a positive 32-bit integer");var d=arguments.length>2&&!!arguments[2],p=!0,h=!0;if("length"in u&&i){var v=i(u,"length");v&&!v.configurable&&(p=!1),v&&!v.writable&&(h=!1)}return(p||h||!d)&&(o?n(u,"length",f,!0,!0):n(u,"length",f)),u}}}),Tb=We({"node_modules/.pnpm/call-bind@1.0.5/node_modules/call-bind/index.js"(e,t){var r=mu(),n=No(),o=xN(),i=n("%TypeError%"),a=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),l=n("%Reflect.apply%",!0)||r.call(s,a),u=n("%Object.defineProperty%",!0),f=n("%Math.max%");if(u)try{u({},"a",{value:1})}catch{u=null}t.exports=function(h){if(typeof h!="function")throw new i("a function is required");var v=l(r,s,arguments);return o(v,1+f(0,h.length-(arguments.length-1)),!0)};var d=function(){return l(r,a,arguments)};u?u(t.exports,"apply",{value:d}):t.exports.apply=d}}),Ib=We({"node_modules/.pnpm/call-bind@1.0.5/node_modules/call-bind/callBound.js"(e,t){var r=No(),n=Tb(),o=n(r("String.prototype.indexOf"));t.exports=function(a,s){var l=r(a,!!s);return typeof l=="function"&&o(a,".prototype.")>-1?n(l):l}}}),SN=We({"node_modules/.pnpm/is-arguments@1.1.1/node_modules/is-arguments/index.js"(e,t){var r=Ni()(),n=Ib(),o=n("Object.prototype.toString"),i=function(u){return r&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:o(u)==="[object Arguments]"},a=function(u){return i(u)?!0:u!==null&&typeof u=="object"&&typeof u.length=="number"&&u.length>=0&&o(u)!=="[object Array]"&&o(u.callee)==="[object Function]"},s=function(){return i(arguments)}();i.isLegacyArguments=a,t.exports=s?i:a}}),$N=We({"node_modules/.pnpm/is-generator-function@1.0.10/node_modules/is-generator-function/index.js"(e,t){var r=Object.prototype.toString,n=Function.prototype.toString,o=/^\s*(?:function)?\*/,i=Ni()(),a=Object.getPrototypeOf,s=function(){if(!i)return!1;try{return Function("return function*() {}")()}catch{}},l;t.exports=function(f){if(typeof f!="function")return!1;if(o.test(n.call(f)))return!0;if(!i){var d=r.call(f);return d==="[object GeneratorFunction]"}if(!a)return!1;if(typeof l>"u"){var p=s();l=p?a(p):!1}return a(f)===l}}}),CN=We({"node_modules/.pnpm/is-callable@1.2.7/node_modules/is-callable/index.js"(e,t){var r=Function.prototype.toString,n=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,o,i;if(typeof n=="function"&&typeof Object.defineProperty=="function")try{o=Object.defineProperty({},"length",{get:function(){throw i}}),i={},n(function(){throw 42},null,o)}catch(x){x!==i&&(n=null)}else n=null;var a=/^\s*class\b/,s=function(P){try{var I=r.call(P);return a.test(I)}catch{return!1}},l=function(P){try{return s(P)?!1:(r.call(P),!0)}catch{return!1}},u=Object.prototype.toString,f="[object Object]",d="[object Function]",p="[object GeneratorFunction]",h="[object HTMLAllCollection]",v="[object HTML document.all class]",g="[object HTMLCollection]",y=typeof Symbol=="function"&&!!Symbol.toStringTag,m=!(0 in[,]),w=function(){return!1};typeof document=="object"&&(E=document.all,u.call(E)===u.call(document.all)&&(w=function(P){if((m||!P)&&(typeof P>"u"||typeof P=="object"))try{var I=u.call(P);return(I===h||I===v||I===g||I===f)&&P("")==null}catch{}return!1}));var E;t.exports=n?function(P){if(w(P))return!0;if(!P||typeof P!="function"&&typeof P!="object")return!1;try{n(P,null,o)}catch(I){if(I!==i)return!1}return!s(P)&&l(P)}:function(P){if(w(P))return!0;if(!P||typeof P!="function"&&typeof P!="object")return!1;if(y)return l(P);if(s(P))return!1;var I=u.call(P);return I!==d&&I!==p&&!/^\[object HTML/.test(I)?!1:l(P)}}}),yu=We({"node_modules/.pnpm/for-each@0.3.3/node_modules/for-each/index.js"(e,t){var r=CN(),n=Object.prototype.toString,o=Object.prototype.hasOwnProperty,i=function(f,d,p){for(var h=0,v=f.length;h<v;h++)o.call(f,h)&&(p==null?d(f[h],h,f):d.call(p,f[h],h,f))},a=function(f,d,p){for(var h=0,v=f.length;h<v;h++)p==null?d(f.charAt(h),h,f):d.call(p,f.charAt(h),h,f)},s=function(f,d,p){for(var h in f)o.call(f,h)&&(p==null?d(f[h],h,f):d.call(p,f[h],h,f))},l=function(f,d,p){if(!r(d))throw new TypeError("iterator must be a function");var h;arguments.length>=3&&(h=p),n.call(f)==="[object Array]"?i(f,d,h):typeof f=="string"?a(f,d,h):s(f,d,h)};t.exports=l}}),wu=We({"node_modules/.pnpm/available-typed-arrays@1.0.5/node_modules/available-typed-arrays/index.js"(e,t){var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],n=typeof globalThis>"u"?global:globalThis;t.exports=function(){for(var i=[],a=0;a<r.length;a++)typeof n[r[a]]=="function"&&(i[i.length]=r[a]);return i}}}),ON=We({"node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/implementation.js"(e,t){var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,o=Object.prototype.toString,i="[object Function]";t.exports=function(s){var l=this;if(typeof l!="function"||o.call(l)!==i)throw new TypeError(r+l);for(var u=n.call(arguments,1),f,d=function(){if(this instanceof f){var y=l.apply(this,u.concat(n.call(arguments)));return Object(y)===y?y:this}else return l.apply(s,u.concat(n.call(arguments)))},p=Math.max(0,l.length-u.length),h=[],v=0;v<p;v++)h.push("$"+v);if(f=Function("binder","return function ("+h.join(",")+"){ return binder.apply(this,arguments); }")(d),l.prototype){var g=function(){};g.prototype=l.prototype,f.prototype=new g,g.prototype=null}return f}}}),_u=We({"node_modules/.pnpm/function-bind@1.1.1/node_modules/function-bind/index.js"(e,t){var r=ON();t.exports=Function.prototype.bind||r}}),AN=We({"node_modules/.pnpm/has@1.0.3/node_modules/has/src/index.js"(e,t){var r=_u();t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)}}),Eu=We({"node_modules/.pnpm/get-intrinsic@1.2.1/node_modules/get-intrinsic/index.js"(e,t){var r,n=SyntaxError,o=Function,i=TypeError,a=function(K){try{return o('"use strict"; return ('+K+").constructor;")()}catch{}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch{s=null}var l=function(){throw new i},u=s?function(){try{return arguments.callee,l}catch{try{return s(arguments,"callee").get}catch{return l}}}():l,f=Cb()(),d=Ob()(),p=Object.getPrototypeOf||(d?function(K){return K.__proto__}:null),h={},v=typeof Uint8Array>"u"||!p?r:p(Uint8Array),g={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":f&&p?p([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f&&p?p(p([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!f||!p?r:p(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!f||!p?r:p(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f&&p?p(""[Symbol.iterator]()):r,"%Symbol%":f?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":u,"%TypedArray%":v,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(p)try{null.error}catch(K){y=p(p(K)),g["%Error.prototype%"]=y}var y,m=function K(Y){var te;if(Y==="%AsyncFunction%")te=a("async function () {}");else if(Y==="%GeneratorFunction%")te=a("function* () {}");else if(Y==="%AsyncGeneratorFunction%")te=a("async function* () {}");else if(Y==="%AsyncGenerator%"){var oe=K("%AsyncGeneratorFunction%");oe&&(te=oe.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var le=K("%AsyncGenerator%");le&&p&&(te=p(le.prototype))}return g[Y]=te,te},w={"%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"]},E=_u(),x=AN(),P=E.call(Function.call,Array.prototype.concat),I=E.call(Function.apply,Array.prototype.splice),S=E.call(Function.call,String.prototype.replace),A=E.call(Function.call,String.prototype.slice),k=E.call(Function.call,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D=/\\(\\)?/g,N=function(Y){var te=A(Y,0,1),oe=A(Y,-1);if(te==="%"&&oe!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(oe==="%"&&te!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var le=[];return S(Y,j,function(ae,ve,ce,q){le[le.length]=ce?S(q,D,"$1"):ve||ae}),le},J=function(Y,te){var oe=Y,le;if(x(w,oe)&&(le=w[oe],oe="%"+le[0]+"%"),x(g,oe)){var ae=g[oe];if(ae===h&&(ae=m(oe)),typeof ae>"u"&&!te)throw new i("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:le,name:oe,value:ae}}throw new n("intrinsic "+Y+" does not exist!")};t.exports=function(Y,te){if(typeof Y!="string"||Y.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof te!="boolean")throw new i('"allowMissing" argument must be a boolean');if(k(/^%?[^%]*%?$/,Y)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var oe=N(Y),le=oe.length>0?oe[0]:"",ae=J("%"+le+"%",te),ve=ae.name,ce=ae.value,q=!1,V=ae.alias;V&&(le=V[0],I(oe,P([0,1],V)));for(var re=1,de=!0;re<oe.length;re+=1){var U=oe[re],z=A(U,0,1),M=A(U,-1);if((z==='"'||z==="'"||z==="`"||M==='"'||M==="'"||M==="`")&&z!==M)throw new n("property names with quotes must have matching quotes");if((U==="constructor"||!de)&&(q=!0),le+="."+U,ve="%"+le+"%",x(g,ve))ce=g[ve];else if(ce!=null){if(!(U in ce)){if(!te)throw new i("base intrinsic for "+Y+" exists, but the property is not available.");return}if(s&&re+1>=oe.length){var R=s(ce,U);de=!!R,de&&"get"in R&&!("originalValue"in R.get)?ce=R.get:ce=ce[U]}else de=x(ce,U),ce=ce[U];de&&!q&&(g[ve]=ce)}}return ce}}}),TN=We({"node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/index.js"(e,t){var r=_u(),n=Eu(),o=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||r.call(i,o),s=n("%Object.getOwnPropertyDescriptor%",!0),l=n("%Object.defineProperty%",!0),u=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch{l=null}t.exports=function(p){var h=a(r,i,arguments);if(s&&l){var v=s(h,"length");v.configurable&&l(h,"length",{value:1+u(0,p.length-(arguments.length-1))})}return h};var f=function(){return a(r,o,arguments)};l?l(t.exports,"apply",{value:f}):t.exports.apply=f}}),Pb=We({"node_modules/.pnpm/call-bind@1.0.2/node_modules/call-bind/callBound.js"(e,t){var r=Eu(),n=TN(),o=n(r("String.prototype.indexOf"));t.exports=function(a,s){var l=r(a,!!s);return typeof l=="function"&&o(a,".prototype.")>-1?n(l):l}}}),kb=We({"node_modules/.pnpm/es-abstract@1.20.4/node_modules/es-abstract/helpers/getOwnPropertyDescriptor.js"(e,t){var r=Eu(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch{n=null}t.exports=n}}),IN=We({"node_modules/.pnpm/which-typed-array@1.1.13/node_modules/which-typed-array/index.js"(e,t){var r=yu(),n=wu(),o=Tb(),i=Ib(),a=bu(),s=i("Object.prototype.toString"),l=Ni()(),u=typeof globalThis>"u"?global:globalThis,f=n(),d=i("String.prototype.slice"),p=Object.getPrototypeOf,h=i("Array.prototype.indexOf",!0)||function(w,E){for(var x=0;x<w.length;x+=1)if(w[x]===E)return x;return-1},v={__proto__:null};l&&a&&p?r(f,function(m){var w=new u[m];if(Symbol.toStringTag in w){var E=p(w),x=a(E,Symbol.toStringTag);if(!x){var P=p(E);x=a(P,Symbol.toStringTag)}v["$"+m]=o(x.get)}}):r(f,function(m){var w=new u[m],E=w.slice||w.set;E&&(v["$"+m]=o(E))});var g=function(w){var E=!1;return r(v,function(x,P){if(!E)try{"$"+x(w)===P&&(E=d(P,1))}catch{}}),E},y=function(w){var E=!1;return r(v,function(x,P){if(!E)try{x(w),E=d(P,1)}catch{}}),E};t.exports=function(w){if(!w||typeof w!="object")return!1;if(!l){var E=d(s(w),8,-1);return h(f,E)>-1?E:E!=="Object"?!1:y(w)}return a?g(w):null}}}),PN=We({"node_modules/.pnpm/is-typed-array@1.1.12/node_modules/is-typed-array/index.js"(e,t){var r=IN();t.exports=function(o){return!!r(o)}}}),kN=We({"node_modules/.pnpm/which-typed-array@1.1.8/node_modules/which-typed-array/index.js"(e,t){var r=yu(),n=wu(),o=Pb(),i=o("Object.prototype.toString"),a=Ni()(),s=typeof globalThis>"u"?global:globalThis,l=n(),u=o("String.prototype.slice"),f={},d=kb(),p=Object.getPrototypeOf;a&&d&&p&&r(l,function(g){if(typeof s[g]=="function"){var y=new s[g];if(Symbol.toStringTag in y){var m=p(y),w=d(m,Symbol.toStringTag);if(!w){var E=p(m);w=d(E,Symbol.toStringTag)}f[g]=w.get}}});var h=function(y){var m=!1;return r(f,function(w,E){if(!m)try{var x=w.call(y);x===E&&(m=x)}catch{}}),m},v=PN();t.exports=function(y){return v(y)?!a||!(Symbol.toStringTag in y)?u(i(y),8,-1):h(y):!1}}}),NN=We({"node_modules/.pnpm/is-typed-array@1.1.9/node_modules/is-typed-array/index.js"(e,t){var r=yu(),n=wu(),o=Pb(),i=o("Object.prototype.toString"),a=Ni()(),s=typeof globalThis>"u"?global:globalThis,l=n(),u=o("Array.prototype.indexOf",!0)||function(y,m){for(var w=0;w<y.length;w+=1)if(y[w]===m)return w;return-1},f=o("String.prototype.slice"),d={},p=kb(),h=Object.getPrototypeOf;a&&p&&h&&r(l,function(g){var y=new s[g];if(Symbol.toStringTag in y){var m=h(y),w=p(m,Symbol.toStringTag);if(!w){var E=h(m);w=p(E,Symbol.toStringTag)}d[g]=w.get}});var v=function(y){var m=!1;return r(d,function(w,E){if(!m)try{m=w.call(y)===E}catch{}}),m};t.exports=function(y){if(!y||typeof y!="object")return!1;if(!a||!(Symbol.toStringTag in y)){var m=f(i(y),8,-1);return u(l,m)>-1}return p?v(y):!1}}}),DN=We({"node_modules/.pnpm/util@0.12.5/node_modules/util/support/types.js"(e){var t=SN(),r=$N(),n=kN(),o=NN();function i(ie){return ie.call.bind(ie)}var a=typeof BigInt<"u",s=typeof Symbol<"u",l=i(Object.prototype.toString),u=i(Number.prototype.valueOf),f=i(String.prototype.valueOf),d=i(Boolean.prototype.valueOf);a&&(p=i(BigInt.prototype.valueOf));var p;s&&(h=i(Symbol.prototype.valueOf));var h;function v(ie,Ne){if(typeof ie!="object")return!1;try{return Ne(ie),!0}catch{return!1}}e.isArgumentsObject=t,e.isGeneratorFunction=r,e.isTypedArray=o;function g(ie){return typeof Promise<"u"&&ie instanceof Promise||ie!==null&&typeof ie=="object"&&typeof ie.then=="function"&&typeof ie.catch=="function"}e.isPromise=g;function y(ie){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(ie):o(ie)||V(ie)}e.isArrayBufferView=y;function m(ie){return n(ie)==="Uint8Array"}e.isUint8Array=m;function w(ie){return n(ie)==="Uint8ClampedArray"}e.isUint8ClampedArray=w;function E(ie){return n(ie)==="Uint16Array"}e.isUint16Array=E;function x(ie){return n(ie)==="Uint32Array"}e.isUint32Array=x;function P(ie){return n(ie)==="Int8Array"}e.isInt8Array=P;function I(ie){return n(ie)==="Int16Array"}e.isInt16Array=I;function S(ie){return n(ie)==="Int32Array"}e.isInt32Array=S;function A(ie){return n(ie)==="Float32Array"}e.isFloat32Array=A;function k(ie){return n(ie)==="Float64Array"}e.isFloat64Array=k;function j(ie){return n(ie)==="BigInt64Array"}e.isBigInt64Array=j;function D(ie){return n(ie)==="BigUint64Array"}e.isBigUint64Array=D;function N(ie){return l(ie)==="[object Map]"}N.working=typeof Map<"u"&&N(new Map);function J(ie){return typeof Map>"u"?!1:N.working?N(ie):ie instanceof Map}e.isMap=J;function K(ie){return l(ie)==="[object Set]"}K.working=typeof Set<"u"&&K(new Set);function Y(ie){return typeof Set>"u"?!1:K.working?K(ie):ie instanceof Set}e.isSet=Y;function te(ie){return l(ie)==="[object WeakMap]"}te.working=typeof WeakMap<"u"&&te(new WeakMap);function oe(ie){return typeof WeakMap>"u"?!1:te.working?te(ie):ie instanceof WeakMap}e.isWeakMap=oe;function le(ie){return l(ie)==="[object WeakSet]"}le.working=typeof WeakSet<"u"&&le(new WeakSet);function ae(ie){return le(ie)}e.isWeakSet=ae;function ve(ie){return l(ie)==="[object ArrayBuffer]"}ve.working=typeof ArrayBuffer<"u"&&ve(new ArrayBuffer);function ce(ie){return typeof ArrayBuffer>"u"?!1:ve.working?ve(ie):ie instanceof ArrayBuffer}e.isArrayBuffer=ce;function q(ie){return l(ie)==="[object DataView]"}q.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&q(new DataView(new ArrayBuffer(1),0,1));function V(ie){return typeof DataView>"u"?!1:q.working?q(ie):ie instanceof DataView}e.isDataView=V;var re=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function de(ie){return l(ie)==="[object SharedArrayBuffer]"}function U(ie){return typeof re>"u"?!1:(typeof de.working>"u"&&(de.working=de(new re)),de.working?de(ie):ie instanceof re)}e.isSharedArrayBuffer=U;function z(ie){return l(ie)==="[object AsyncFunction]"}e.isAsyncFunction=z;function M(ie){return l(ie)==="[object Map Iterator]"}e.isMapIterator=M;function R(ie){return l(ie)==="[object Set Iterator]"}e.isSetIterator=R;function G(ie){return l(ie)==="[object Generator]"}e.isGeneratorObject=G;function O(ie){return l(ie)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=O;function T(ie){return v(ie,u)}e.isNumberObject=T;function Z(ie){return v(ie,f)}e.isStringObject=Z;function ne(ie){return v(ie,d)}e.isBooleanObject=ne;function pe(ie){return a&&v(ie,p)}e.isBigIntObject=pe;function me(ie){return s&&v(ie,h)}e.isSymbolObject=me;function xe(ie){return T(ie)||Z(ie)||ne(ie)||pe(ie)||me(ie)}e.isBoxedPrimitive=xe;function Ee(ie){return typeof Uint8Array<"u"&&(ce(ie)||U(ie))}e.isAnyArrayBuffer=Ee,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ie){Object.defineProperty(e,ie,{enumerable:!1,value:function(){throw new Error(ie+" is not supported in userland")}})})}}),LN=We({"node_modules/.pnpm/util@0.12.5/node_modules/util/support/isBufferBrowser.js"(e,t){t.exports=function(n){return n&&typeof n=="object"&&typeof n.copy=="function"&&typeof n.fill=="function"&&typeof n.readUInt8=="function"}}}),MN=We({"node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js"(e,t){typeof Object.create=="function"?t.exports=function(n,o){o&&(n.super_=o,n.prototype=Object.create(o.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(n,o){if(o){n.super_=o;var i=function(){};i.prototype=o.prototype,n.prototype=new i,n.prototype.constructor=n}}}}),Nb=We({"node_modules/.pnpm/util@0.12.5/node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(V){for(var re=Object.keys(V),de={},U=0;U<re.length;U++)de[re[U]]=Object.getOwnPropertyDescriptor(V,re[U]);return de},r=/%[sdj%]/g;e.format=function(q){if(!P(q)){for(var V=[],re=0;re<arguments.length;re++)V.push(a(arguments[re]));return V.join(" ")}for(var re=1,de=arguments,U=de.length,z=String(q).replace(r,function(R){if(R==="%%")return"%";if(re>=U)return R;switch(R){case"%s":return String(de[re++]);case"%d":return Number(de[re++]);case"%j":try{return JSON.stringify(de[re++])}catch{return"[Circular]"}default:return R}}),M=de[re];re<U;M=de[++re])w(M)||!k(M)?z+=" "+M:z+=" "+a(M);return z},e.deprecate=function(q,V){if(typeof process<"u"&&process.noDeprecation===!0)return q;if(typeof process>"u")return function(){return e.deprecate(q,V).apply(this,arguments)};var re=!1;function de(){if(!re){if(process.throwDeprecation)throw new Error(V);process.traceDeprecation?console.trace(V):console.error(V),re=!0}return q.apply(this,arguments)}return de};var n={},o=/^$/;process.env.NODE_DEBUG&&(i=process.env.NODE_DEBUG,i=i.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),o=new RegExp("^"+i+"$","i"));var i;e.debuglog=function(q){if(q=q.toUpperCase(),!n[q])if(o.test(q)){var V=process.pid;n[q]=function(){var re=e.format.apply(e,arguments);console.error("%s %d: %s",q,V,re)}}else n[q]=function(){};return n[q]};function a(q,V){var re={seen:[],stylize:l};return arguments.length>=3&&(re.depth=arguments[2]),arguments.length>=4&&(re.colors=arguments[3]),m(V)?re.showHidden=V:V&&e._extend(re,V),S(re.showHidden)&&(re.showHidden=!1),S(re.depth)&&(re.depth=2),S(re.colors)&&(re.colors=!1),S(re.customInspect)&&(re.customInspect=!0),re.colors&&(re.stylize=s),f(re,q,re.depth)}e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function s(q,V){var re=a.styles[V];return re?"\x1B["+a.colors[re][0]+"m"+q+"\x1B["+a.colors[re][1]+"m":q}function l(q,V){return q}function u(q){var V={};return q.forEach(function(re,de){V[re]=!0}),V}function f(q,V,re){if(q.customInspect&&V&&N(V.inspect)&&V.inspect!==e.inspect&&!(V.constructor&&V.constructor.prototype===V)){var de=V.inspect(re,q);return P(de)||(de=f(q,de,re)),de}var U=d(q,V);if(U)return U;var z=Object.keys(V),M=u(z);if(q.showHidden&&(z=Object.getOwnPropertyNames(V)),D(V)&&(z.indexOf("message")>=0||z.indexOf("description")>=0))return p(V);if(z.length===0){if(N(V)){var R=V.name?": "+V.name:"";return q.stylize("[Function"+R+"]","special")}if(A(V))return q.stylize(RegExp.prototype.toString.call(V),"regexp");if(j(V))return q.stylize(Date.prototype.toString.call(V),"date");if(D(V))return p(V)}var G="",O=!1,T=["{","}"];if(y(V)&&(O=!0,T=["[","]"]),N(V)){var Z=V.name?": "+V.name:"";G=" [Function"+Z+"]"}if(A(V)&&(G=" "+RegExp.prototype.toString.call(V)),j(V)&&(G=" "+Date.prototype.toUTCString.call(V)),D(V)&&(G=" "+p(V)),z.length===0&&(!O||V.length==0))return T[0]+G+T[1];if(re<0)return A(V)?q.stylize(RegExp.prototype.toString.call(V),"regexp"):q.stylize("[Object]","special");q.seen.push(V);var ne;return O?ne=h(q,V,re,M,z):ne=z.map(function(pe){return v(q,V,re,M,pe,O)}),q.seen.pop(),g(ne,G,T)}function d(q,V){if(S(V))return q.stylize("undefined","undefined");if(P(V)){var re="'"+JSON.stringify(V).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return q.stylize(re,"string")}if(x(V))return q.stylize(""+V,"number");if(m(V))return q.stylize(""+V,"boolean");if(w(V))return q.stylize("null","null")}function p(q){return"["+Error.prototype.toString.call(q)+"]"}function h(q,V,re,de,U){for(var z=[],M=0,R=V.length;M<R;++M)le(V,String(M))?z.push(v(q,V,re,de,String(M),!0)):z.push("");return U.forEach(function(G){G.match(/^\d+$/)||z.push(v(q,V,re,de,G,!0))}),z}function v(q,V,re,de,U,z){var M,R,G;if(G=Object.getOwnPropertyDescriptor(V,U)||{value:V[U]},G.get?G.set?R=q.stylize("[Getter/Setter]","special"):R=q.stylize("[Getter]","special"):G.set&&(R=q.stylize("[Setter]","special")),le(de,U)||(M="["+U+"]"),R||(q.seen.indexOf(G.value)<0?(w(re)?R=f(q,G.value,null):R=f(q,G.value,re-1),R.indexOf(`
|
|
92
|
+
`)>-1&&(z?R=R.split(`
|
|
93
|
+
`).map(function(O){return" "+O}).join(`
|
|
94
|
+
`).slice(2):R=`
|
|
95
|
+
`+R.split(`
|
|
96
|
+
`).map(function(O){return" "+O}).join(`
|
|
97
|
+
`))):R=q.stylize("[Circular]","special")),S(M)){if(z&&U.match(/^\d+$/))return R;M=JSON.stringify(""+U),M.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(M=M.slice(1,-1),M=q.stylize(M,"name")):(M=M.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),M=q.stylize(M,"string"))}return M+": "+R}function g(q,V,re){var de=q.reduce(function(U,z){return z.indexOf(`
|
|
98
|
+
`)>=0,U+z.replace(/\u001b\[\d\d?m/g,"").length+1},0);return de>60?re[0]+(V===""?"":V+`
|
|
99
|
+
`)+" "+q.join(`,
|
|
100
|
+
`)+" "+re[1]:re[0]+V+" "+q.join(", ")+" "+re[1]}e.types=DN();function y(q){return Array.isArray(q)}e.isArray=y;function m(q){return typeof q=="boolean"}e.isBoolean=m;function w(q){return q===null}e.isNull=w;function E(q){return q==null}e.isNullOrUndefined=E;function x(q){return typeof q=="number"}e.isNumber=x;function P(q){return typeof q=="string"}e.isString=P;function I(q){return typeof q=="symbol"}e.isSymbol=I;function S(q){return q===void 0}e.isUndefined=S;function A(q){return k(q)&&K(q)==="[object RegExp]"}e.isRegExp=A,e.types.isRegExp=A;function k(q){return typeof q=="object"&&q!==null}e.isObject=k;function j(q){return k(q)&&K(q)==="[object Date]"}e.isDate=j,e.types.isDate=j;function D(q){return k(q)&&(K(q)==="[object Error]"||q instanceof Error)}e.isError=D,e.types.isNativeError=D;function N(q){return typeof q=="function"}e.isFunction=N;function J(q){return q===null||typeof q=="boolean"||typeof q=="number"||typeof q=="string"||typeof q=="symbol"||typeof q>"u"}e.isPrimitive=J,e.isBuffer=LN();function K(q){return Object.prototype.toString.call(q)}function Y(q){return q<10?"0"+q.toString(10):q.toString(10)}var te=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function oe(){var q=new Date,V=[Y(q.getHours()),Y(q.getMinutes()),Y(q.getSeconds())].join(":");return[q.getDate(),te[q.getMonth()],V].join(" ")}e.log=function(){console.log("%s - %s",oe(),e.format.apply(e,arguments))},e.inherits=MN(),e._extend=function(q,V){if(!V||!k(V))return q;for(var re=Object.keys(V),de=re.length;de--;)q[re[de]]=V[re[de]];return q};function le(q,V){return Object.prototype.hasOwnProperty.call(q,V)}var ae=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;e.promisify=function(V){if(typeof V!="function")throw new TypeError('The "original" argument must be of type Function');if(ae&&V[ae]){var re=V[ae];if(typeof re!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(re,ae,{value:re,enumerable:!1,writable:!1,configurable:!0}),re}function re(){for(var de,U,z=new Promise(function(G,O){de=G,U=O}),M=[],R=0;R<arguments.length;R++)M.push(arguments[R]);M.push(function(G,O){G?U(G):de(O)});try{V.apply(this,M)}catch(G){U(G)}return z}return Object.setPrototypeOf(re,Object.getPrototypeOf(V)),ae&&Object.defineProperty(re,ae,{value:re,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(re,t(V))},e.promisify.custom=ae;function ve(q,V){if(!q){var re=new Error("Promise was rejected with a falsy value");re.reason=q,q=re}return V(q)}function ce(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');function V(){for(var re=[],de=0;de<arguments.length;de++)re.push(arguments[de]);var U=re.pop();if(typeof U!="function")throw new TypeError("The last argument must be of type Function");var z=this,M=function(){return U.apply(z,arguments)};q.apply(this,re).then(function(R){process.nextTick(M.bind(null,null,R))},function(R){process.nextTick(ve.bind(null,R,M))})}return Object.setPrototypeOf(V,Object.getPrototypeOf(q)),Object.defineProperties(V,t(q)),V}e.callbackify=ce}});function FN(e,...t){t.length>0?queueMicrotask(()=>e(...t)):queueMicrotask(e)}var jN="browser",BN="browser",RN=!0,UN={},WN=[],VN="",HN={},zN={},GN={};function qn(){}var KN=qn,qN=qn,YN=qn,JN=qn,XN=qn,ZN=qn,QN=qn;function e8(e){throw new Error("process.binding is not supported")}function t8(){return"/"}function r8(e){throw new Error("process.chdir is not supported")}function n8(){return 0}var Do=globalThis.performance||{},o8=Do.now||Do.mozNow||Do.msNow||Do.oNow||Do.webkitNow||function(){return new Date().getTime()};function i8(e){var t=o8.call(Do)*.001,r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r=r-e[0],n=n-e[1],n<0&&(r--,n+=1e9)),[r,n]}var a8=new Date;function s8(){var e=new Date,t=e-a8;return t/1e3}var Cs={nextTick:FN,title:jN,browser:RN,env:UN,argv:WN,version:VN,versions:HN,on:KN,addListener:qN,once:YN,off:JN,removeListener:XN,removeAllListeners:ZN,emit:QN,binding:e8,cwd:t8,chdir:r8,umask:n8,hrtime:i8,platform:BN,release:zN,config:GN,uptime:s8},Db={};Object.keys(Db).forEach(e=>{const t=e.split(".");let r=Cs;for(let n=0;n<t.length;n++){const o=t[n];n===t.length-1?r[o]=Db[e]:r=r[o]||(r[o]={})}});var Xt={},Os={};Os.byteLength=u8,Os.toByteArray=d8,Os.fromByteArray=v8;for(var jr=[],lr=[],l8=typeof Uint8Array<"u"?Uint8Array:Array,xu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lo=0,c8=xu.length;Lo<c8;++Lo)jr[Lo]=xu[Lo],lr[xu.charCodeAt(Lo)]=Lo;lr["-".charCodeAt(0)]=62,lr["_".charCodeAt(0)]=63;function Lb(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function u8(e){var t=Lb(e),r=t[0],n=t[1];return(r+n)*3/4-n}function f8(e,t,r){return(t+r)*3/4-r}function d8(e){var t,r=Lb(e),n=r[0],o=r[1],i=new l8(f8(e,n,o)),a=0,s=o>0?n-4:n,l;for(l=0;l<s;l+=4)t=lr[e.charCodeAt(l)]<<18|lr[e.charCodeAt(l+1)]<<12|lr[e.charCodeAt(l+2)]<<6|lr[e.charCodeAt(l+3)],i[a++]=t>>16&255,i[a++]=t>>8&255,i[a++]=t&255;return o===2&&(t=lr[e.charCodeAt(l)]<<2|lr[e.charCodeAt(l+1)]>>4,i[a++]=t&255),o===1&&(t=lr[e.charCodeAt(l)]<<10|lr[e.charCodeAt(l+1)]<<4|lr[e.charCodeAt(l+2)]>>2,i[a++]=t>>8&255,i[a++]=t&255),i}function p8(e){return jr[e>>18&63]+jr[e>>12&63]+jr[e>>6&63]+jr[e&63]}function h8(e,t,r){for(var n,o=[],i=t;i<r;i+=3)n=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255),o.push(p8(n));return o.join("")}function v8(e){for(var t,r=e.length,n=r%3,o=[],i=16383,a=0,s=r-n;a<s;a+=i)o.push(h8(e,a,a+i>s?s:a+i));return n===1?(t=e[r-1],o.push(jr[t>>2]+jr[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],o.push(jr[t>>10]+jr[t>>4&63]+jr[t<<2&63]+"=")),o.join("")}var Su={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Su.read=function(e,t,r,n,o){var i,a,s=o*8-n-1,l=(1<<s)-1,u=l>>1,f=-7,d=r?o-1:0,p=r?-1:1,h=e[t+d];for(d+=p,i=h&(1<<-f)-1,h>>=-f,f+=s;f>0;i=i*256+e[t+d],d+=p,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=n;f>0;a=a*256+e[t+d],d+=p,f-=8);if(i===0)i=1-u;else{if(i===l)return a?NaN:(h?-1:1)*(1/0);a=a+Math.pow(2,n),i=i-u}return(h?-1:1)*a*Math.pow(2,i-n)},Su.write=function(e,t,r,n,o,i){var a,s,l,u=i*8-o-1,f=(1<<u)-1,d=f>>1,p=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,v=n?1:-1,g=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+d>=1?t+=p/l:t+=p*Math.pow(2,1-d),t*l>=2&&(a++,l/=2),a+d>=f?(s=0,a=f):a+d>=1?(s=(t*l-1)*Math.pow(2,o),a=a+d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[r+h]=s&255,h+=v,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[r+h]=a&255,h+=v,a/=256,u-=8);e[r+h-v]|=g*128};/*!
|
|
101
|
+
* The buffer module from node.js, for the browser.
|
|
102
|
+
*
|
|
103
|
+
* @author Feross Aboukhadijeh <https://feross.org>
|
|
104
|
+
* @license MIT
|
|
105
|
+
*/(function(e){const t=Os,r=Su,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=s,e.SlowBuffer=w,e.INSPECT_MAX_BYTES=50;const o=2147483647;e.kMaxLength=o,s.TYPED_ARRAY_SUPPORT=i(),!s.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function i(){try{const C=new Uint8Array(1),b={foo:function(){return 42}};return Object.setPrototypeOf(b,Uint8Array.prototype),Object.setPrototypeOf(C,b),C.foo()===42}catch{return!1}}Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}});function a(C){if(C>o)throw new RangeError('The value "'+C+'" is invalid for option "size"');const b=new Uint8Array(C);return Object.setPrototypeOf(b,s.prototype),b}function s(C,b,_){if(typeof C=="number"){if(typeof b=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(C)}return l(C,b,_)}s.poolSize=8192;function l(C,b,_){if(typeof C=="string")return p(C,b);if(ArrayBuffer.isView(C))return v(C);if(C==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C);if(Te(C,ArrayBuffer)||C&&Te(C.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Te(C,SharedArrayBuffer)||C&&Te(C.buffer,SharedArrayBuffer)))return g(C,b,_);if(typeof C=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const L=C.valueOf&&C.valueOf();if(L!=null&&L!==C)return s.from(L,b,_);const W=y(C);if(W)return W;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof C[Symbol.toPrimitive]=="function")return s.from(C[Symbol.toPrimitive]("string"),b,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof C)}s.from=function(C,b,_){return l(C,b,_)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array);function u(C){if(typeof C!="number")throw new TypeError('"size" argument must be of type number');if(C<0)throw new RangeError('The value "'+C+'" is invalid for option "size"')}function f(C,b,_){return u(C),C<=0?a(C):b!==void 0?typeof _=="string"?a(C).fill(b,_):a(C).fill(b):a(C)}s.alloc=function(C,b,_){return f(C,b,_)};function d(C){return u(C),a(C<0?0:m(C)|0)}s.allocUnsafe=function(C){return d(C)},s.allocUnsafeSlow=function(C){return d(C)};function p(C,b){if((typeof b!="string"||b==="")&&(b="utf8"),!s.isEncoding(b))throw new TypeError("Unknown encoding: "+b);const _=E(C,b)|0;let L=a(_);const W=L.write(C,b);return W!==_&&(L=L.slice(0,W)),L}function h(C){const b=C.length<0?0:m(C.length)|0,_=a(b);for(let L=0;L<b;L+=1)_[L]=C[L]&255;return _}function v(C){if(Te(C,Uint8Array)){const b=new Uint8Array(C);return g(b.buffer,b.byteOffset,b.byteLength)}return h(C)}function g(C,b,_){if(b<0||C.byteLength<b)throw new RangeError('"offset" is outside of buffer bounds');if(C.byteLength<b+(_||0))throw new RangeError('"length" is outside of buffer bounds');let L;return b===void 0&&_===void 0?L=new Uint8Array(C):_===void 0?L=new Uint8Array(C,b):L=new Uint8Array(C,b,_),Object.setPrototypeOf(L,s.prototype),L}function y(C){if(s.isBuffer(C)){const b=m(C.length)|0,_=a(b);return _.length===0||C.copy(_,0,0,b),_}if(C.length!==void 0)return typeof C.length!="number"||Me(C.length)?a(0):h(C);if(C.type==="Buffer"&&Array.isArray(C.data))return h(C.data)}function m(C){if(C>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return C|0}function w(C){return+C!=C&&(C=0),s.alloc(+C)}s.isBuffer=function(b){return b!=null&&b._isBuffer===!0&&b!==s.prototype},s.compare=function(b,_){if(Te(b,Uint8Array)&&(b=s.from(b,b.offset,b.byteLength)),Te(_,Uint8Array)&&(_=s.from(_,_.offset,_.byteLength)),!s.isBuffer(b)||!s.isBuffer(_))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(b===_)return 0;let L=b.length,W=_.length;for(let X=0,se=Math.min(L,W);X<se;++X)if(b[X]!==_[X]){L=b[X],W=_[X];break}return L<W?-1:W<L?1:0},s.isEncoding=function(b){switch(String(b).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(b,_){if(!Array.isArray(b))throw new TypeError('"list" argument must be an Array of Buffers');if(b.length===0)return s.alloc(0);let L;if(_===void 0)for(_=0,L=0;L<b.length;++L)_+=b[L].length;const W=s.allocUnsafe(_);let X=0;for(L=0;L<b.length;++L){let se=b[L];if(Te(se,Uint8Array))X+se.length>W.length?(s.isBuffer(se)||(se=s.from(se)),se.copy(W,X)):Uint8Array.prototype.set.call(W,se,X);else if(s.isBuffer(se))se.copy(W,X);else throw new TypeError('"list" argument must be an Array of Buffers');X+=se.length}return W};function E(C,b){if(s.isBuffer(C))return C.length;if(ArrayBuffer.isView(C)||Te(C,ArrayBuffer))return C.byteLength;if(typeof C!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof C);const _=C.length,L=arguments.length>2&&arguments[2]===!0;if(!L&&_===0)return 0;let W=!1;for(;;)switch(b){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return xe(C).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return Ne(C).length;default:if(W)return L?-1:xe(C).length;b=(""+b).toLowerCase(),W=!0}}s.byteLength=E;function x(C,b,_){let L=!1;if((b===void 0||b<0)&&(b=0),b>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,b>>>=0,_<=b))return"";for(C||(C="utf8");;)switch(C){case"hex":return ae(this,b,_);case"utf8":case"utf-8":return K(this,b,_);case"ascii":return oe(this,b,_);case"latin1":case"binary":return le(this,b,_);case"base64":return J(this,b,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ve(this,b,_);default:if(L)throw new TypeError("Unknown encoding: "+C);C=(C+"").toLowerCase(),L=!0}}s.prototype._isBuffer=!0;function P(C,b,_){const L=C[b];C[b]=C[_],C[_]=L}s.prototype.swap16=function(){const b=this.length;if(b%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let _=0;_<b;_+=2)P(this,_,_+1);return this},s.prototype.swap32=function(){const b=this.length;if(b%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let _=0;_<b;_+=4)P(this,_,_+3),P(this,_+1,_+2);return this},s.prototype.swap64=function(){const b=this.length;if(b%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let _=0;_<b;_+=8)P(this,_,_+7),P(this,_+1,_+6),P(this,_+2,_+5),P(this,_+3,_+4);return this},s.prototype.toString=function(){const b=this.length;return b===0?"":arguments.length===0?K(this,0,b):x.apply(this,arguments)},s.prototype.toLocaleString=s.prototype.toString,s.prototype.equals=function(b){if(!s.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b?!0:s.compare(this,b)===0},s.prototype.inspect=function(){let b="";const _=e.INSPECT_MAX_BYTES;return b=this.toString("hex",0,_).replace(/(.{2})/g,"$1 ").trim(),this.length>_&&(b+=" ... "),"<Buffer "+b+">"},n&&(s.prototype[n]=s.prototype.inspect),s.prototype.compare=function(b,_,L,W,X){if(Te(b,Uint8Array)&&(b=s.from(b,b.offset,b.byteLength)),!s.isBuffer(b))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof b);if(_===void 0&&(_=0),L===void 0&&(L=b?b.length:0),W===void 0&&(W=0),X===void 0&&(X=this.length),_<0||L>b.length||W<0||X>this.length)throw new RangeError("out of range index");if(W>=X&&_>=L)return 0;if(W>=X)return-1;if(_>=L)return 1;if(_>>>=0,L>>>=0,W>>>=0,X>>>=0,this===b)return 0;let se=X-W,Pe=L-_;const ot=Math.min(se,Pe),Le=this.slice(W,X),qe=b.slice(_,L);for(let Je=0;Je<ot;++Je)if(Le[Je]!==qe[Je]){se=Le[Je],Pe=qe[Je];break}return se<Pe?-1:Pe<se?1:0};function I(C,b,_,L,W){if(C.length===0)return-1;if(typeof _=="string"?(L=_,_=0):_>2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,Me(_)&&(_=W?0:C.length-1),_<0&&(_=C.length+_),_>=C.length){if(W)return-1;_=C.length-1}else if(_<0)if(W)_=0;else return-1;if(typeof b=="string"&&(b=s.from(b,L)),s.isBuffer(b))return b.length===0?-1:S(C,b,_,L,W);if(typeof b=="number")return b=b&255,typeof Uint8Array.prototype.indexOf=="function"?W?Uint8Array.prototype.indexOf.call(C,b,_):Uint8Array.prototype.lastIndexOf.call(C,b,_):S(C,[b],_,L,W);throw new TypeError("val must be string, number or Buffer")}function S(C,b,_,L,W){let X=1,se=C.length,Pe=b.length;if(L!==void 0&&(L=String(L).toLowerCase(),L==="ucs2"||L==="ucs-2"||L==="utf16le"||L==="utf-16le")){if(C.length<2||b.length<2)return-1;X=2,se/=2,Pe/=2,_/=2}function ot(qe,Je){return X===1?qe[Je]:qe.readUInt16BE(Je*X)}let Le;if(W){let qe=-1;for(Le=_;Le<se;Le++)if(ot(C,Le)===ot(b,qe===-1?0:Le-qe)){if(qe===-1&&(qe=Le),Le-qe+1===Pe)return qe*X}else qe!==-1&&(Le-=Le-qe),qe=-1}else for(_+Pe>se&&(_=se-Pe),Le=_;Le>=0;Le--){let qe=!0;for(let Je=0;Je<Pe;Je++)if(ot(C,Le+Je)!==ot(b,Je)){qe=!1;break}if(qe)return Le}return-1}s.prototype.includes=function(b,_,L){return this.indexOf(b,_,L)!==-1},s.prototype.indexOf=function(b,_,L){return I(this,b,_,L,!0)},s.prototype.lastIndexOf=function(b,_,L){return I(this,b,_,L,!1)};function A(C,b,_,L){_=Number(_)||0;const W=C.length-_;L?(L=Number(L),L>W&&(L=W)):L=W;const X=b.length;L>X/2&&(L=X/2);let se;for(se=0;se<L;++se){const Pe=parseInt(b.substr(se*2,2),16);if(Me(Pe))return se;C[_+se]=Pe}return se}function k(C,b,_,L){return ft(xe(b,C.length-_),C,_,L)}function j(C,b,_,L){return ft(Ee(b),C,_,L)}function D(C,b,_,L){return ft(Ne(b),C,_,L)}function N(C,b,_,L){return ft(ie(b,C.length-_),C,_,L)}s.prototype.write=function(b,_,L,W){if(_===void 0)W="utf8",L=this.length,_=0;else if(L===void 0&&typeof _=="string")W=_,L=this.length,_=0;else if(isFinite(_))_=_>>>0,isFinite(L)?(L=L>>>0,W===void 0&&(W="utf8")):(W=L,L=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const X=this.length-_;if((L===void 0||L>X)&&(L=X),b.length>0&&(L<0||_<0)||_>this.length)throw new RangeError("Attempt to write outside buffer bounds");W||(W="utf8");let se=!1;for(;;)switch(W){case"hex":return A(this,b,_,L);case"utf8":case"utf-8":return k(this,b,_,L);case"ascii":case"latin1":case"binary":return j(this,b,_,L);case"base64":return D(this,b,_,L);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,b,_,L);default:if(se)throw new TypeError("Unknown encoding: "+W);W=(""+W).toLowerCase(),se=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J(C,b,_){return b===0&&_===C.length?t.fromByteArray(C):t.fromByteArray(C.slice(b,_))}function K(C,b,_){_=Math.min(C.length,_);const L=[];let W=b;for(;W<_;){const X=C[W];let se=null,Pe=X>239?4:X>223?3:X>191?2:1;if(W+Pe<=_){let ot,Le,qe,Je;switch(Pe){case 1:X<128&&(se=X);break;case 2:ot=C[W+1],(ot&192)===128&&(Je=(X&31)<<6|ot&63,Je>127&&(se=Je));break;case 3:ot=C[W+1],Le=C[W+2],(ot&192)===128&&(Le&192)===128&&(Je=(X&15)<<12|(ot&63)<<6|Le&63,Je>2047&&(Je<55296||Je>57343)&&(se=Je));break;case 4:ot=C[W+1],Le=C[W+2],qe=C[W+3],(ot&192)===128&&(Le&192)===128&&(qe&192)===128&&(Je=(X&15)<<18|(ot&63)<<12|(Le&63)<<6|qe&63,Je>65535&&Je<1114112&&(se=Je))}}se===null?(se=65533,Pe=1):se>65535&&(se-=65536,L.push(se>>>10&1023|55296),se=56320|se&1023),L.push(se),W+=Pe}return te(L)}const Y=4096;function te(C){const b=C.length;if(b<=Y)return String.fromCharCode.apply(String,C);let _="",L=0;for(;L<b;)_+=String.fromCharCode.apply(String,C.slice(L,L+=Y));return _}function oe(C,b,_){let L="";_=Math.min(C.length,_);for(let W=b;W<_;++W)L+=String.fromCharCode(C[W]&127);return L}function le(C,b,_){let L="";_=Math.min(C.length,_);for(let W=b;W<_;++W)L+=String.fromCharCode(C[W]);return L}function ae(C,b,_){const L=C.length;(!b||b<0)&&(b=0),(!_||_<0||_>L)&&(_=L);let W="";for(let X=b;X<_;++X)W+=mt[C[X]];return W}function ve(C,b,_){const L=C.slice(b,_);let W="";for(let X=0;X<L.length-1;X+=2)W+=String.fromCharCode(L[X]+L[X+1]*256);return W}s.prototype.slice=function(b,_){const L=this.length;b=~~b,_=_===void 0?L:~~_,b<0?(b+=L,b<0&&(b=0)):b>L&&(b=L),_<0?(_+=L,_<0&&(_=0)):_>L&&(_=L),_<b&&(_=b);const W=this.subarray(b,_);return Object.setPrototypeOf(W,s.prototype),W};function ce(C,b,_){if(C%1!==0||C<0)throw new RangeError("offset is not uint");if(C+b>_)throw new RangeError("Trying to access beyond buffer length")}s.prototype.readUintLE=s.prototype.readUIntLE=function(b,_,L){b=b>>>0,_=_>>>0,L||ce(b,_,this.length);let W=this[b],X=1,se=0;for(;++se<_&&(X*=256);)W+=this[b+se]*X;return W},s.prototype.readUintBE=s.prototype.readUIntBE=function(b,_,L){b=b>>>0,_=_>>>0,L||ce(b,_,this.length);let W=this[b+--_],X=1;for(;_>0&&(X*=256);)W+=this[b+--_]*X;return W},s.prototype.readUint8=s.prototype.readUInt8=function(b,_){return b=b>>>0,_||ce(b,1,this.length),this[b]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(b,_){return b=b>>>0,_||ce(b,2,this.length),this[b]|this[b+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(b,_){return b=b>>>0,_||ce(b,2,this.length),this[b]<<8|this[b+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),(this[b]|this[b+1]<<8|this[b+2]<<16)+this[b+3]*16777216},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),this[b]*16777216+(this[b+1]<<16|this[b+2]<<8|this[b+3])},s.prototype.readBigUInt64LE=$e(function(b){b=b>>>0,Z(b,"offset");const _=this[b],L=this[b+7];(_===void 0||L===void 0)&&ne(b,this.length-8);const W=_+this[++b]*2**8+this[++b]*2**16+this[++b]*2**24,X=this[++b]+this[++b]*2**8+this[++b]*2**16+L*2**24;return BigInt(W)+(BigInt(X)<<BigInt(32))}),s.prototype.readBigUInt64BE=$e(function(b){b=b>>>0,Z(b,"offset");const _=this[b],L=this[b+7];(_===void 0||L===void 0)&&ne(b,this.length-8);const W=_*2**24+this[++b]*2**16+this[++b]*2**8+this[++b],X=this[++b]*2**24+this[++b]*2**16+this[++b]*2**8+L;return(BigInt(W)<<BigInt(32))+BigInt(X)}),s.prototype.readIntLE=function(b,_,L){b=b>>>0,_=_>>>0,L||ce(b,_,this.length);let W=this[b],X=1,se=0;for(;++se<_&&(X*=256);)W+=this[b+se]*X;return X*=128,W>=X&&(W-=Math.pow(2,8*_)),W},s.prototype.readIntBE=function(b,_,L){b=b>>>0,_=_>>>0,L||ce(b,_,this.length);let W=_,X=1,se=this[b+--W];for(;W>0&&(X*=256);)se+=this[b+--W]*X;return X*=128,se>=X&&(se-=Math.pow(2,8*_)),se},s.prototype.readInt8=function(b,_){return b=b>>>0,_||ce(b,1,this.length),this[b]&128?(255-this[b]+1)*-1:this[b]},s.prototype.readInt16LE=function(b,_){b=b>>>0,_||ce(b,2,this.length);const L=this[b]|this[b+1]<<8;return L&32768?L|4294901760:L},s.prototype.readInt16BE=function(b,_){b=b>>>0,_||ce(b,2,this.length);const L=this[b+1]|this[b]<<8;return L&32768?L|4294901760:L},s.prototype.readInt32LE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),this[b]|this[b+1]<<8|this[b+2]<<16|this[b+3]<<24},s.prototype.readInt32BE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),this[b]<<24|this[b+1]<<16|this[b+2]<<8|this[b+3]},s.prototype.readBigInt64LE=$e(function(b){b=b>>>0,Z(b,"offset");const _=this[b],L=this[b+7];(_===void 0||L===void 0)&&ne(b,this.length-8);const W=this[b+4]+this[b+5]*2**8+this[b+6]*2**16+(L<<24);return(BigInt(W)<<BigInt(32))+BigInt(_+this[++b]*2**8+this[++b]*2**16+this[++b]*2**24)}),s.prototype.readBigInt64BE=$e(function(b){b=b>>>0,Z(b,"offset");const _=this[b],L=this[b+7];(_===void 0||L===void 0)&&ne(b,this.length-8);const W=(_<<24)+this[++b]*2**16+this[++b]*2**8+this[++b];return(BigInt(W)<<BigInt(32))+BigInt(this[++b]*2**24+this[++b]*2**16+this[++b]*2**8+L)}),s.prototype.readFloatLE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),r.read(this,b,!0,23,4)},s.prototype.readFloatBE=function(b,_){return b=b>>>0,_||ce(b,4,this.length),r.read(this,b,!1,23,4)},s.prototype.readDoubleLE=function(b,_){return b=b>>>0,_||ce(b,8,this.length),r.read(this,b,!0,52,8)},s.prototype.readDoubleBE=function(b,_){return b=b>>>0,_||ce(b,8,this.length),r.read(this,b,!1,52,8)};function q(C,b,_,L,W,X){if(!s.isBuffer(C))throw new TypeError('"buffer" argument must be a Buffer instance');if(b>W||b<X)throw new RangeError('"value" argument is out of bounds');if(_+L>C.length)throw new RangeError("Index out of range")}s.prototype.writeUintLE=s.prototype.writeUIntLE=function(b,_,L,W){if(b=+b,_=_>>>0,L=L>>>0,!W){const Pe=Math.pow(2,8*L)-1;q(this,b,_,L,Pe,0)}let X=1,se=0;for(this[_]=b&255;++se<L&&(X*=256);)this[_+se]=b/X&255;return _+L},s.prototype.writeUintBE=s.prototype.writeUIntBE=function(b,_,L,W){if(b=+b,_=_>>>0,L=L>>>0,!W){const Pe=Math.pow(2,8*L)-1;q(this,b,_,L,Pe,0)}let X=L-1,se=1;for(this[_+X]=b&255;--X>=0&&(se*=256);)this[_+X]=b/se&255;return _+L},s.prototype.writeUint8=s.prototype.writeUInt8=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,1,255,0),this[_]=b&255,_+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,2,65535,0),this[_]=b&255,this[_+1]=b>>>8,_+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,2,65535,0),this[_]=b>>>8,this[_+1]=b&255,_+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,4,4294967295,0),this[_+3]=b>>>24,this[_+2]=b>>>16,this[_+1]=b>>>8,this[_]=b&255,_+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,4,4294967295,0),this[_]=b>>>24,this[_+1]=b>>>16,this[_+2]=b>>>8,this[_+3]=b&255,_+4};function V(C,b,_,L,W){T(b,L,W,C,_,7);let X=Number(b&BigInt(4294967295));C[_++]=X,X=X>>8,C[_++]=X,X=X>>8,C[_++]=X,X=X>>8,C[_++]=X;let se=Number(b>>BigInt(32)&BigInt(4294967295));return C[_++]=se,se=se>>8,C[_++]=se,se=se>>8,C[_++]=se,se=se>>8,C[_++]=se,_}function re(C,b,_,L,W){T(b,L,W,C,_,7);let X=Number(b&BigInt(4294967295));C[_+7]=X,X=X>>8,C[_+6]=X,X=X>>8,C[_+5]=X,X=X>>8,C[_+4]=X;let se=Number(b>>BigInt(32)&BigInt(4294967295));return C[_+3]=se,se=se>>8,C[_+2]=se,se=se>>8,C[_+1]=se,se=se>>8,C[_]=se,_+8}s.prototype.writeBigUInt64LE=$e(function(b,_=0){return V(this,b,_,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=$e(function(b,_=0){return re(this,b,_,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(b,_,L,W){if(b=+b,_=_>>>0,!W){const ot=Math.pow(2,8*L-1);q(this,b,_,L,ot-1,-ot)}let X=0,se=1,Pe=0;for(this[_]=b&255;++X<L&&(se*=256);)b<0&&Pe===0&&this[_+X-1]!==0&&(Pe=1),this[_+X]=(b/se>>0)-Pe&255;return _+L},s.prototype.writeIntBE=function(b,_,L,W){if(b=+b,_=_>>>0,!W){const ot=Math.pow(2,8*L-1);q(this,b,_,L,ot-1,-ot)}let X=L-1,se=1,Pe=0;for(this[_+X]=b&255;--X>=0&&(se*=256);)b<0&&Pe===0&&this[_+X+1]!==0&&(Pe=1),this[_+X]=(b/se>>0)-Pe&255;return _+L},s.prototype.writeInt8=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,1,127,-128),b<0&&(b=255+b+1),this[_]=b&255,_+1},s.prototype.writeInt16LE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,2,32767,-32768),this[_]=b&255,this[_+1]=b>>>8,_+2},s.prototype.writeInt16BE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,2,32767,-32768),this[_]=b>>>8,this[_+1]=b&255,_+2},s.prototype.writeInt32LE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,4,2147483647,-2147483648),this[_]=b&255,this[_+1]=b>>>8,this[_+2]=b>>>16,this[_+3]=b>>>24,_+4},s.prototype.writeInt32BE=function(b,_,L){return b=+b,_=_>>>0,L||q(this,b,_,4,2147483647,-2147483648),b<0&&(b=4294967295+b+1),this[_]=b>>>24,this[_+1]=b>>>16,this[_+2]=b>>>8,this[_+3]=b&255,_+4},s.prototype.writeBigInt64LE=$e(function(b,_=0){return V(this,b,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=$e(function(b,_=0){return re(this,b,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function de(C,b,_,L,W,X){if(_+L>C.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function U(C,b,_,L,W){return b=+b,_=_>>>0,W||de(C,b,_,4),r.write(C,b,_,L,23,4),_+4}s.prototype.writeFloatLE=function(b,_,L){return U(this,b,_,!0,L)},s.prototype.writeFloatBE=function(b,_,L){return U(this,b,_,!1,L)};function z(C,b,_,L,W){return b=+b,_=_>>>0,W||de(C,b,_,8),r.write(C,b,_,L,52,8),_+8}s.prototype.writeDoubleLE=function(b,_,L){return z(this,b,_,!0,L)},s.prototype.writeDoubleBE=function(b,_,L){return z(this,b,_,!1,L)},s.prototype.copy=function(b,_,L,W){if(!s.isBuffer(b))throw new TypeError("argument should be a Buffer");if(L||(L=0),!W&&W!==0&&(W=this.length),_>=b.length&&(_=b.length),_||(_=0),W>0&&W<L&&(W=L),W===L||b.length===0||this.length===0)return 0;if(_<0)throw new RangeError("targetStart out of bounds");if(L<0||L>=this.length)throw new RangeError("Index out of range");if(W<0)throw new RangeError("sourceEnd out of bounds");W>this.length&&(W=this.length),b.length-_<W-L&&(W=b.length-_+L);const X=W-L;return this===b&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(_,L,W):Uint8Array.prototype.set.call(b,this.subarray(L,W),_),X},s.prototype.fill=function(b,_,L,W){if(typeof b=="string"){if(typeof _=="string"?(W=_,_=0,L=this.length):typeof L=="string"&&(W=L,L=this.length),W!==void 0&&typeof W!="string")throw new TypeError("encoding must be a string");if(typeof W=="string"&&!s.isEncoding(W))throw new TypeError("Unknown encoding: "+W);if(b.length===1){const se=b.charCodeAt(0);(W==="utf8"&&se<128||W==="latin1")&&(b=se)}}else typeof b=="number"?b=b&255:typeof b=="boolean"&&(b=Number(b));if(_<0||this.length<_||this.length<L)throw new RangeError("Out of range index");if(L<=_)return this;_=_>>>0,L=L===void 0?this.length:L>>>0,b||(b=0);let X;if(typeof b=="number")for(X=_;X<L;++X)this[X]=b;else{const se=s.isBuffer(b)?b:s.from(b,W),Pe=se.length;if(Pe===0)throw new TypeError('The value "'+b+'" is invalid for argument "value"');for(X=0;X<L-_;++X)this[X+_]=se[X%Pe]}return this};const M={};function R(C,b,_){M[C]=class extends _{constructor(){super(),Object.defineProperty(this,"message",{value:b.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${C}]`,this.stack,delete this.name}get code(){return C}set code(W){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:W,writable:!0})}toString(){return`${this.name} [${C}]: ${this.message}`}}}R("ERR_BUFFER_OUT_OF_BOUNDS",function(C){return C?`${C} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),R("ERR_INVALID_ARG_TYPE",function(C,b){return`The "${C}" argument must be of type number. Received type ${typeof b}`},TypeError),R("ERR_OUT_OF_RANGE",function(C,b,_){let L=`The value of "${C}" is out of range.`,W=_;return Number.isInteger(_)&&Math.abs(_)>2**32?W=G(String(_)):typeof _=="bigint"&&(W=String(_),(_>BigInt(2)**BigInt(32)||_<-(BigInt(2)**BigInt(32)))&&(W=G(W)),W+="n"),L+=` It must be ${b}. Received ${W}`,L},RangeError);function G(C){let b="",_=C.length;const L=C[0]==="-"?1:0;for(;_>=L+4;_-=3)b=`_${C.slice(_-3,_)}${b}`;return`${C.slice(0,_)}${b}`}function O(C,b,_){Z(b,"offset"),(C[b]===void 0||C[b+_]===void 0)&&ne(b,C.length-(_+1))}function T(C,b,_,L,W,X){if(C>_||C<b){const se=typeof b=="bigint"?"n":"";let Pe;throw X>3?b===0||b===BigInt(0)?Pe=`>= 0${se} and < 2${se} ** ${(X+1)*8}${se}`:Pe=`>= -(2${se} ** ${(X+1)*8-1}${se}) and < 2 ** ${(X+1)*8-1}${se}`:Pe=`>= ${b}${se} and <= ${_}${se}`,new M.ERR_OUT_OF_RANGE("value",Pe,C)}O(L,W,X)}function Z(C,b){if(typeof C!="number")throw new M.ERR_INVALID_ARG_TYPE(b,"number",C)}function ne(C,b,_){throw Math.floor(C)!==C?(Z(C,_),new M.ERR_OUT_OF_RANGE(_||"offset","an integer",C)):b<0?new M.ERR_BUFFER_OUT_OF_BOUNDS:new M.ERR_OUT_OF_RANGE(_||"offset",`>= ${_?1:0} and <= ${b}`,C)}const pe=/[^+/0-9A-Za-z-_]/g;function me(C){if(C=C.split("=")[0],C=C.trim().replace(pe,""),C.length<2)return"";for(;C.length%4!==0;)C=C+"=";return C}function xe(C,b){b=b||1/0;let _;const L=C.length;let W=null;const X=[];for(let se=0;se<L;++se){if(_=C.charCodeAt(se),_>55295&&_<57344){if(!W){if(_>56319){(b-=3)>-1&&X.push(239,191,189);continue}else if(se+1===L){(b-=3)>-1&&X.push(239,191,189);continue}W=_;continue}if(_<56320){(b-=3)>-1&&X.push(239,191,189),W=_;continue}_=(W-55296<<10|_-56320)+65536}else W&&(b-=3)>-1&&X.push(239,191,189);if(W=null,_<128){if((b-=1)<0)break;X.push(_)}else if(_<2048){if((b-=2)<0)break;X.push(_>>6|192,_&63|128)}else if(_<65536){if((b-=3)<0)break;X.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((b-=4)<0)break;X.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return X}function Ee(C){const b=[];for(let _=0;_<C.length;++_)b.push(C.charCodeAt(_)&255);return b}function ie(C,b){let _,L,W;const X=[];for(let se=0;se<C.length&&!((b-=2)<0);++se)_=C.charCodeAt(se),L=_>>8,W=_%256,X.push(W),X.push(L);return X}function Ne(C){return t.toByteArray(me(C))}function ft(C,b,_,L){let W;for(W=0;W<L&&!(W+_>=b.length||W>=C.length);++W)b[W+_]=C[W];return W}function Te(C,b){return C instanceof b||C!=null&&C.constructor!=null&&C.constructor.name!=null&&C.constructor.name===b.name}function Me(C){return C!==C}const mt=function(){const C="0123456789abcdef",b=new Array(256);for(let _=0;_<16;++_){const L=_*16;for(let W=0;W<16;++W)b[L+W]=C[_]+C[W]}return b}();function $e(C){return typeof BigInt>"u"?De:C}function De(){throw new Error("BigInt not supported")}})(Xt),globalThis.global=globalThis,globalThis.Buffer=Xt.Buffer,globalThis.process=Cs;var g8=ki(Nb()),$u=ki(Nb());g8.default,$u.callbackify;var wr=$u.inspect;$u.promisify;var As={exports:{}};As.exports,function(e,t){var r=200,n="__lodash_hash_undefined__",o=800,i=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",u="[object AsyncFunction]",f="[object Boolean]",d="[object Date]",p="[object Error]",h="[object Function]",v="[object GeneratorFunction]",g="[object Map]",y="[object Number]",m="[object Null]",w="[object Object]",E="[object Proxy]",x="[object RegExp]",P="[object Set]",I="[object String]",S="[object Undefined]",A="[object WeakMap]",k="[object ArrayBuffer]",j="[object DataView]",D="[object Float32Array]",N="[object Float64Array]",J="[object Int8Array]",K="[object Int16Array]",Y="[object Int32Array]",te="[object Uint8Array]",oe="[object Uint8ClampedArray]",le="[object Uint16Array]",ae="[object Uint32Array]",ve=/[\\^$.*+?()[\]{}|]/g,ce=/^\[object .+?Constructor\]$/,q=/^(?:0|[1-9]\d*)$/,V={};V[D]=V[N]=V[J]=V[K]=V[Y]=V[te]=V[oe]=V[le]=V[ae]=!0,V[s]=V[l]=V[k]=V[f]=V[j]=V[d]=V[p]=V[h]=V[g]=V[y]=V[w]=V[x]=V[P]=V[I]=V[A]=!1;var re=typeof Ge=="object"&&Ge&&Ge.Object===Object&&Ge,de=typeof self=="object"&&self&&self.Object===Object&&self,U=re||de||Function("return this")(),z=t&&!t.nodeType&&t,M=z&&!0&&e&&!e.nodeType&&e,R=M&&M.exports===z,G=R&&re.process,O=function(){try{var $=M&&M.require&&M.require("util").types;return $||G&&G.binding&&G.binding("util")}catch{}}(),T=O&&O.isTypedArray;function Z($,B,ee){switch(ee.length){case 0:return $.call(B);case 1:return $.call(B,ee[0]);case 2:return $.call(B,ee[0],ee[1]);case 3:return $.call(B,ee[0],ee[1],ee[2])}return $.apply(B,ee)}function ne($,B){for(var ee=-1,he=Array($);++ee<$;)he[ee]=B(ee);return he}function pe($){return function(B){return $(B)}}function me($,B){return $?.[B]}function xe($,B){return function(ee){return $(B(ee))}}var Ee=Array.prototype,ie=Function.prototype,Ne=Object.prototype,ft=U["__core-js_shared__"],Te=ie.toString,Me=Ne.hasOwnProperty,mt=function(){var $=/[^.]+$/.exec(ft&&ft.keys&&ft.keys.IE_PROTO||"");return $?"Symbol(src)_1."+$:""}(),$e=Ne.toString,De=Te.call(Object),C=RegExp("^"+Te.call(Me).replace(ve,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),b=R?U.Buffer:void 0,_=U.Symbol,L=U.Uint8Array,W=b?b.allocUnsafe:void 0,X=xe(Object.getPrototypeOf,Object),se=Object.create,Pe=Ne.propertyIsEnumerable,ot=Ee.splice,Le=_?_.toStringTag:void 0,qe=function(){try{var $=sa(Object,"defineProperty");return $({},"",{}),$}catch{}}(),Je=b?b.isBuffer:void 0,tn=Math.max,Yo=Date.now,fr=sa(U,"Map"),Gt=sa(Object,"create"),ro=function(){function $(){}return function(B){if(!qt(B))return{};if(se)return se(B);$.prototype=B;var ee=new $;return $.prototype=void 0,ee}}();function kt($){var B=-1,ee=$==null?0:$.length;for(this.clear();++B<ee;){var he=$[B];this.set(he[0],he[1])}}function ea(){this.__data__=Gt?Gt(null):{},this.size=0}function Jo($){var B=this.has($)&&delete this.__data__[$];return this.size-=B?1:0,B}function ta($){var B=this.__data__;if(Gt){var ee=B[$];return ee===n?void 0:ee}return Me.call(B,$)?B[$]:void 0}function Xo($){var B=this.__data__;return Gt?B[$]!==void 0:Me.call(B,$)}function Zo($,B){var ee=this.__data__;return this.size+=this.has($)?0:1,ee[$]=Gt&&B===void 0?n:B,this}kt.prototype.clear=ea,kt.prototype.delete=Jo,kt.prototype.get=ta,kt.prototype.has=Xo,kt.prototype.set=Zo;function $t($){var B=-1,ee=$==null?0:$.length;for(this.clear();++B<ee;){var he=$[B];this.set(he[0],he[1])}}function ra(){this.__data__=[],this.size=0}function Qo($){var B=this.__data__,ee=It(B,$);if(ee<0)return!1;var he=B.length-1;return ee==he?B.pop():ot.call(B,ee,1),--this.size,!0}function na($){var B=this.__data__,ee=It(B,$);return ee<0?void 0:B[ee][1]}function oa($){return It(this.__data__,$)>-1}function ia($,B){var ee=this.__data__,he=It(ee,$);return he<0?(++this.size,ee.push([$,B])):ee[he][1]=B,this}$t.prototype.clear=ra,$t.prototype.delete=Qo,$t.prototype.get=na,$t.prototype.has=oa,$t.prototype.set=ia;function Kt($){var B=-1,ee=$==null?0:$.length;for(this.clear();++B<ee;){var he=$[B];this.set(he[0],he[1])}}function H(){this.size=0,this.__data__={hash:new kt,map:new(fr||$t),string:new kt}}function fe($){var B=On(this,$).delete($);return this.size-=B?1:0,B}function we($){return On(this,$).get($)}function Ae($){return On(this,$).has($)}function ze($,B){var ee=On(this,$),he=ee.size;return ee.set($,B),this.size+=ee.size==he?0:1,this}Kt.prototype.clear=H,Kt.prototype.delete=fe,Kt.prototype.get=we,Kt.prototype.has=Ae,Kt.prototype.set=ze;function Fe($){var B=this.__data__=new $t($);this.size=B.size}function Be(){this.__data__=new $t,this.size=0}function je($){var B=this.__data__,ee=B.delete($);return this.size=B.size,ee}function Tt($){return this.__data__.get($)}function gt($){return this.__data__.has($)}function bt($,B){var ee=this.__data__;if(ee instanceof $t){var he=ee.__data__;if(!fr||he.length<r-1)return he.push([$,B]),this.size=++ee.size,this;ee=this.__data__=new Kt(he)}return ee.set($,B),this.size=ee.size,this}Fe.prototype.clear=Be,Fe.prototype.delete=je,Fe.prototype.get=Tt,Fe.prototype.has=gt,Fe.prototype.set=bt;function Rt($,B){var ee=ao($),he=!ee&&io($),Ce=!ee&&!he&&ni($),Se=!ee&&!he&&!Ce&&yl($),Ie=ee||he||Ce||Se,ke=Ie?ne($.length,String):[],Re=ke.length;for(var Nt in $)(B||Me.call($,Nt))&&!(Ie&&(Nt=="length"||Ce&&(Nt=="offset"||Nt=="parent")||Se&&(Nt=="buffer"||Nt=="byteLength"||Nt=="byteOffset")||hl(Nt,Re)))&&ke.push(Nt);return ke}function Zt($,B,ee){(ee!==void 0&&!An($[B],ee)||ee===void 0&&!(B in $))&&no($,B,ee)}function ei($,B,ee){var he=$[B];(!(Me.call($,B)&&An(he,ee))||ee===void 0&&!(B in $))&&no($,B,ee)}function It($,B){for(var ee=$.length;ee--;)if(An($[ee][0],B))return ee;return-1}function no($,B,ee){B=="__proto__"&&qe?qe($,B,{configurable:!0,enumerable:!0,value:ee,writable:!0}):$[B]=ee}var rd=hd();function rn($){return $==null?$===void 0?S:m:Le&&Le in Object($)?vd($):yd($)}function aa($){return so($)&&rn($)==s}function nd($){if(!qt($)||vl($))return!1;var B=oi($)?C:ce;return B.test(ri($))}function od($){return so($)&&Vr($.length)&&!!V[rn($)]}function id($){if(!qt($))return bd($);var B=gl($),ee=[];for(var he in $)he=="constructor"&&(B||!Me.call($,he))||ee.push(he);return ee}function ti($,B,ee,he,Ce){$!==B&&rd(B,function(Se,Ie){if(Ce||(Ce=new Fe),qt(Se))ad($,B,Ie,ee,ti,he,Ce);else{var ke=he?he(ca($,Ie),Se,Ie+"",$,B,Ce):void 0;ke===void 0&&(ke=Se),Zt($,Ie,ke)}},_l)}function ad($,B,ee,he,Ce,Se,Ie){var ke=ca($,ee),Re=ca(B,ee),Nt=Ie.get(Re);if(Nt){Zt($,ee,Nt);return}var Mt=Se?Se(ke,Re,ee+"",$,B,Ie):void 0,nn=Mt===void 0;if(nn){var ii=ao(Re),Sd=!ii&&ni(Re),P1=!ii&&!Sd&&yl(Re);Mt=Re,ii||Sd||P1?ao(ke)?Mt=ke:ml(ke)?Mt=fd(ke):Sd?(nn=!1,Mt=ld(Re,!0)):P1?(nn=!1,Mt=ud(Re,!0)):Mt=[]:bl(Re)||io(Re)?(Mt=ke,io(ke)?Mt=wl(ke):(!qt(ke)||oi(ke))&&(Mt=pl(Re))):nn=!1}nn&&(Ie.set(Re,Mt),Ce(Mt,Re,he,Se,Ie),Ie.delete(Re)),Zt($,ee,Mt)}function dl($,B){return wd(la($,B,F),$+"")}var sd=qe?function($,B){return qe($,"toString",{configurable:!0,enumerable:!1,value:xd(B),writable:!0})}:F;function ld($,B){if(B)return $.slice();var ee=$.length,he=W?W(ee):new $.constructor(ee);return $.copy(he),he}function cd($){var B=new $.constructor($.byteLength);return new L(B).set(new L($)),B}function ud($,B){var ee=B?cd($.buffer):$.buffer;return new $.constructor(ee,$.byteOffset,$.length)}function fd($,B){var ee=-1,he=$.length;for(B||(B=Array(he));++ee<he;)B[ee]=$[ee];return B}function dd($,B,ee,he){var Ce=!ee;ee||(ee={});for(var Se=-1,Ie=B.length;++Se<Ie;){var ke=B[Se],Re=he?he(ee[ke],$[ke],ke,ee,$):void 0;Re===void 0&&(Re=$[ke]),Ce?no(ee,ke,Re):ei(ee,ke,Re)}return ee}function pd($){return dl(function(B,ee){var he=-1,Ce=ee.length,Se=Ce>1?ee[Ce-1]:void 0,Ie=Ce>2?ee[2]:void 0;for(Se=$.length>3&&typeof Se=="function"?(Ce--,Se):void 0,Ie&&gd(ee[0],ee[1],Ie)&&(Se=Ce<3?void 0:Se,Ce=1),B=Object(B);++he<Ce;){var ke=ee[he];ke&&$(B,ke,he,Se)}return B})}function hd($){return function(B,ee,he){for(var Ce=-1,Se=Object(B),Ie=he(B),ke=Ie.length;ke--;){var Re=Ie[$?ke:++Ce];if(ee(Se[Re],Re,Se)===!1)break}return B}}function oo($,B,ee,he,Ce,Se){return qt($)&&qt(B)&&(Se.set(B,$),ti($,B,void 0,oo,Se),Se.delete(B)),$}function On($,B){var ee=$.__data__;return md(B)?ee[typeof B=="string"?"string":"hash"]:ee.map}function sa($,B){var ee=me($,B);return nd(ee)?ee:void 0}function vd($){var B=Me.call($,Le),ee=$[Le];try{$[Le]=void 0;var he=!0}catch{}var Ce=$e.call($);return he&&(B?$[Le]=ee:delete $[Le]),Ce}function pl($){return typeof $.constructor=="function"&&!gl($)?ro(X($)):{}}function hl($,B){var ee=typeof $;return B=B??a,!!B&&(ee=="number"||ee!="symbol"&&q.test($))&&$>-1&&$%1==0&&$<B}function gd($,B,ee){if(!qt(ee))return!1;var he=typeof B;return(he=="number"?ua(ee)&&hl(B,ee.length):he=="string"&&B in ee)?An(ee[B],$):!1}function md($){var B=typeof $;return B=="string"||B=="number"||B=="symbol"||B=="boolean"?$!=="__proto__":$===null}function vl($){return!!mt&&mt in $}function gl($){var B=$&&$.constructor,ee=typeof B=="function"&&B.prototype||Ne;return $===ee}function bd($){var B=[];if($!=null)for(var ee in Object($))B.push(ee);return B}function yd($){return $e.call($)}function la($,B,ee){return B=tn(B===void 0?$.length-1:B,0),function(){for(var he=arguments,Ce=-1,Se=tn(he.length-B,0),Ie=Array(Se);++Ce<Se;)Ie[Ce]=he[B+Ce];Ce=-1;for(var ke=Array(B+1);++Ce<B;)ke[Ce]=he[Ce];return ke[B]=ee(Ie),Z($,this,ke)}}function ca($,B){if(!(B==="constructor"&&typeof $[B]=="function")&&B!="__proto__")return $[B]}var wd=_d(sd);function _d($){var B=0,ee=0;return function(){var he=Yo(),Ce=i-(he-ee);if(ee=he,Ce>0){if(++B>=o)return arguments[0]}else B=0;return $.apply(void 0,arguments)}}function ri($){if($!=null){try{return Te.call($)}catch{}try{return $+""}catch{}}return""}function An($,B){return $===B||$!==$&&B!==B}var io=aa(function(){return arguments}())?aa:function($){return so($)&&Me.call($,"callee")&&!Pe.call($,"callee")},ao=Array.isArray;function ua($){return $!=null&&Vr($.length)&&!oi($)}function ml($){return so($)&&ua($)}var ni=Je||Q;function oi($){if(!qt($))return!1;var B=rn($);return B==h||B==v||B==u||B==E}function Vr($){return typeof $=="number"&&$>-1&&$%1==0&&$<=a}function qt($){var B=typeof $;return $!=null&&(B=="object"||B=="function")}function so($){return $!=null&&typeof $=="object"}function bl($){if(!so($)||rn($)!=w)return!1;var B=X($);if(B===null)return!0;var ee=Me.call(B,"constructor")&&B.constructor;return typeof ee=="function"&&ee instanceof ee&&Te.call(ee)==De}var yl=T?pe(T):od;function wl($){return dd($,_l($))}var Ed=dl(function($){return $.push(void 0,oo),Z(El,void 0,$)});function _l($){return ua($)?Rt($,!0):id($)}var El=pd(function($,B,ee,he){ti($,B,ee,he)});function xd($){return function(){return $}}function F($){return $}function Q(){return!1}e.exports=Ed}(As,As.exports);var m8=As.exports;const b8=In(m8);var Cu=(e,t,r)=>{if(e)return;let n="invariant violation";throw t&&(n+=`: ${t}`),r?.A&&(n+=` [${r.A[0]}]`),r?.F&&(n+=` at ${w8(r.F)}:${r.L}`),new y8(n)},y8=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}},w8=e=>{const t=e.match(/.+\/(packages\/.+\/.+)/);if(t){const[,r]=t;return r}return e},_8=We({"node_modules/.pnpm/events@3.3.0/node_modules/events/events.js"(e,t){var r=typeof Reflect=="object"?Reflect:null,n=r&&typeof r.apply=="function"?r.apply:function(S,A,k){return Function.prototype.apply.call(S,A,k)},o;r&&typeof r.ownKeys=="function"?o=r.ownKeys:Object.getOwnPropertySymbols?o=function(S){return Object.getOwnPropertyNames(S).concat(Object.getOwnPropertySymbols(S))}:o=function(S){return Object.getOwnPropertyNames(S)};function i(I){console&&console.warn&&console.warn(I)}var a=Number.isNaN||function(S){return S!==S};function s(){s.init.call(this)}t.exports=s,t.exports.once=E,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var l=10;function u(I){if(typeof I!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof I)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(I){if(typeof I!="number"||I<0||a(I))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+I+".");l=I}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(S){if(typeof S!="number"||S<0||a(S))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+S+".");return this._maxListeners=S,this};function f(I){return I._maxListeners===void 0?s.defaultMaxListeners:I._maxListeners}s.prototype.getMaxListeners=function(){return f(this)},s.prototype.emit=function(S){for(var A=[],k=1;k<arguments.length;k++)A.push(arguments[k]);var j=S==="error",D=this._events;if(D!==void 0)j=j&&D.error===void 0;else if(!j)return!1;if(j){var N;if(A.length>0&&(N=A[0]),N instanceof Error)throw N;var J=new Error("Unhandled error."+(N?" ("+N.message+")":""));throw J.context=N,J}var K=D[S];if(K===void 0)return!1;if(typeof K=="function")n(K,this,A);else for(var Y=K.length,te=y(K,Y),k=0;k<Y;++k)n(te[k],this,A);return!0};function d(I,S,A,k){var j,D,N;if(u(A),D=I._events,D===void 0?(D=I._events=Object.create(null),I._eventsCount=0):(D.newListener!==void 0&&(I.emit("newListener",S,A.listener?A.listener:A),D=I._events),N=D[S]),N===void 0)N=D[S]=A,++I._eventsCount;else if(typeof N=="function"?N=D[S]=k?[A,N]:[N,A]:k?N.unshift(A):N.push(A),j=f(I),j>0&&N.length>j&&!N.warned){N.warned=!0;var J=new Error("Possible EventEmitter memory leak detected. "+N.length+" "+String(S)+" listeners added. Use emitter.setMaxListeners() to increase limit");J.name="MaxListenersExceededWarning",J.emitter=I,J.type=S,J.count=N.length,i(J)}return I}s.prototype.addListener=function(S,A){return d(this,S,A,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(S,A){return d(this,S,A,!0)};function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(I,S,A){var k={fired:!1,wrapFn:void 0,target:I,type:S,listener:A},j=p.bind(k);return j.listener=A,k.wrapFn=j,j}s.prototype.once=function(S,A){return u(A),this.on(S,h(this,S,A)),this},s.prototype.prependOnceListener=function(S,A){return u(A),this.prependListener(S,h(this,S,A)),this},s.prototype.removeListener=function(S,A){var k,j,D,N,J;if(u(A),j=this._events,j===void 0)return this;if(k=j[S],k===void 0)return this;if(k===A||k.listener===A)--this._eventsCount===0?this._events=Object.create(null):(delete j[S],j.removeListener&&this.emit("removeListener",S,k.listener||A));else if(typeof k!="function"){for(D=-1,N=k.length-1;N>=0;N--)if(k[N]===A||k[N].listener===A){J=k[N].listener,D=N;break}if(D<0)return this;D===0?k.shift():m(k,D),k.length===1&&(j[S]=k[0]),j.removeListener!==void 0&&this.emit("removeListener",S,J||A)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(S){var A,k,j;if(k=this._events,k===void 0)return this;if(k.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):k[S]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete k[S]),this;if(arguments.length===0){var D=Object.keys(k),N;for(j=0;j<D.length;++j)N=D[j],N!=="removeListener"&&this.removeAllListeners(N);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(A=k[S],typeof A=="function")this.removeListener(S,A);else if(A!==void 0)for(j=A.length-1;j>=0;j--)this.removeListener(S,A[j]);return this};function v(I,S,A){var k=I._events;if(k===void 0)return[];var j=k[S];return j===void 0?[]:typeof j=="function"?A?[j.listener||j]:[j]:A?w(j):y(j,j.length)}s.prototype.listeners=function(S){return v(this,S,!0)},s.prototype.rawListeners=function(S){return v(this,S,!1)},s.listenerCount=function(I,S){return typeof I.listenerCount=="function"?I.listenerCount(S):g.call(I,S)},s.prototype.listenerCount=g;function g(I){var S=this._events;if(S!==void 0){var A=S[I];if(typeof A=="function")return 1;if(A!==void 0)return A.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?o(this._events):[]};function y(I,S){for(var A=new Array(S),k=0;k<S;++k)A[k]=I[k];return A}function m(I,S){for(;S+1<I.length;S++)I[S]=I[S+1];I.pop()}function w(I){for(var S=new Array(I.length),A=0;A<S.length;++A)S[A]=I[A].listener||I[A];return S}function E(I,S){return new Promise(function(A,k){function j(N){I.removeListener(S,D),k(N)}function D(){typeof I.removeListener=="function"&&I.removeListener("error",j),A([].slice.call(arguments))}P(I,S,D,{once:!0}),S!=="error"&&x(I,j,{once:!0})})}function x(I,S,A){typeof I.on=="function"&&P(I,"error",S,A)}function P(I,S,A,k){if(typeof I.on=="function")k.once?I.once(S,A):I.on(S,A);else if(typeof I.addEventListener=="function")I.addEventListener(S,function j(D){k.once&&I.removeEventListener(S,j),A(D)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof I)}}}),Mb=ki(_8());Mb.EventEmitter,Mb.EventEmitter;var Ts=e=>{const t=Object.getPrototypeOf(e).constructor.name;return e.toJSON?`${t}(${wr(e.toJSON())})`:String(e)},Fb=e=>{throw e},jb;(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.VERBOSE=1]="VERBOSE",e[e.BOLD=2]="BOLD"})(jb||(jb={}));var E8=(e,t=8)=>{const r=String(e);return r.length<=t?r:r.slice(0,t)},Is=Symbol.for("devtoolsFormatter"),x8=()=>{typeof window<"u"&&(window.devtoolsFormatters??=[]).push({header:(e,t)=>{const r=e[Is];if(r===void 0)return null;if(typeof r!="object"||r===null||typeof r.header!="function")throw new Error(`Invalid devtools formatter for ${e.constructor.name}`);return r.header(t)},hasBody:(e,t)=>{const r=e[Is];return!r||!r.hasBody?!1:r.hasBody(t)},body:(e,t)=>{const r=e[Is];return!r||!r.body?null:r.body(t)}})};x8();var S8=Symbol.for("dxos.common.equals"),Ou={exports:{}},Au={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */(function(e,t){var r=Xt,n=r.Buffer;function o(a,s){for(var l in a)s[l]=a[l]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(o(r,t),t.Buffer=i);function i(a,s,l){return n(a,s,l)}i.prototype=Object.create(n.prototype),o(n,i),i.from=function(a,s,l){if(typeof a=="number")throw new TypeError("Argument must not be a number");return n(a,s,l)},i.alloc=function(a,s,l){if(typeof a!="number")throw new TypeError("Argument must be a number");var u=n(a);return s!==void 0?typeof l=="string"?u.fill(s,l):u.fill(s):u.fill(0),u},i.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return n(a)},i.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(a)}})(Au,Au.exports);var Bb=Au.exports,Tu=65536,$8=4294967295;function C8(){throw new Error(`Secure random number generation is not supported by this browser.
|
|
106
|
+
Use Chrome, Firefox or Internet Explorer 11`)}var O8=Bb.Buffer,Ps=Ge.crypto||Ge.msCrypto;Ps&&Ps.getRandomValues?Ou.exports=A8:Ou.exports=C8;function A8(e,t){if(e>$8)throw new RangeError("requested too many random bytes");var r=O8.allocUnsafe(e);if(e>0)if(e>Tu)for(var n=0;n<e;n+=Tu)Ps.getRandomValues(r.slice(n,n+Tu));else Ps.getRandomValues(r);return typeof t=="function"?process.nextTick(function(){t(null,r)}):r}var T8=Ou.exports;const I8=In(T8);var Iu="/home/runner/work/dxos/dxos/packages/common/keys/src/public-key.ts",P8=32,Rb=class Ut{static from(t){if(Cu(t,void 0,{F:Iu,L:31,S:this,A:["source",""]}),t instanceof Ut)return t;if(t instanceof Xt.Buffer)return new Ut(new Uint8Array(t.buffer,t.byteOffset,t.byteLength));if(t instanceof Uint8Array)return new Ut(t);if(t instanceof ArrayBuffer)return new Ut(new Uint8Array(t));if(typeof t=="string")return Ut.fromHex(t);if(t.asUint8Array)return new Ut(t.asUint8Array());throw new TypeError(`Unable to create PublicKey from ${t}`)}static safeFrom(t){if(t)try{return Ut.from(t)}catch{return}}static fromHex(t){t.startsWith("0x")&&(t=t.slice(2));const r=Xt.Buffer.from(t,"hex");return new Ut(new Uint8Array(r.buffer,r.byteOffset,r.byteLength))}static random(){return Ut.from(I8(P8))}static*randomSequence(){for(let t=0;t<1e4;t++)yield Ut.random();throw new Error("Too many keys requested")}static isPublicKey(t){return t instanceof Ut}static assertValidPublicKey(t){if(!this.isPublicKey(t))throw new TypeError("Invalid PublicKey")}static equals(t,r){return Ut.from(t).equals(r)}static bufferize(t){return Cu(typeof t=="string","Invalid type",{F:Iu,L:130,S:this,A:["typeof str === 'string'","'Invalid type'"]}),Xt.Buffer.from(t,"hex")}static stringify(t){return t instanceof Ut?t=t.asBuffer():t instanceof Uint8Array&&(t=Xt.Buffer.from(t.buffer,t.byteOffset,t.byteLength)),Cu(t instanceof Xt.Buffer,"Invalid type",{F:Iu,L:149,S:this,A:["key instanceof Buffer","'Invalid type'"]}),t.toString("hex")}static hash(t){return t.toHex()}constructor(t){if(this._value=t,!(t instanceof Uint8Array))throw new TypeError(`Expected Uint8Array, got: ${t}`)}toString(){return this.toHex()}toJSON(){return this.toHex()}get length(){return this._value.length}toHex(){return this.asBuffer().toString("hex")}truncate(t=void 0){return E8(this,t)}asBuffer(){return Xt.Buffer.from(this._value.buffer,this._value.byteOffset,this._value.byteLength)}asUint8Array(){return this._value}getInsecureHash(t){return Math.abs(this._value.reduce((r,n)=>r^n|0,0))%t}[wr.custom](t,r){if(!r.colors||typeof Cs.stdout.hasColors!="function"||!Cs.stdout.hasColors())return`<PublicKey ${this.truncate()}>`;const n=a=>`\x1B[${a}m`,o=["red","green","yellow","blue","magenta","cyan","redBright","greenBright","yellowBright","blueBright","magentaBright","cyanBright","whiteBright"],i=o[this.getInsecureHash(o.length)];return`PublicKey(${n(wr.colors[i][0])}${this.truncate()}${n(wr.colors.reset[0])})`}get[Is](){return{header:()=>{const t=["darkred","green","orange","blue","darkmagenta","darkcyan","red","green","orange","blue","magenta","darkcyan","black"],r=t[this.getInsecureHash(t.length)];return["span",{},["span",{},"PublicKey("],["span",{style:`color: ${r};`},this.truncate()],["span",{},")"]]}}}equals(t){const r=Ut.from(t);if(this._value.length!==r._value.length)return!1;let n=!0;for(let o=0;o<this._value.length;o++)n&&=this._value[o]===r._value[o];return n}[S8](t){return Ut.isPublicKey(t)?this.equals(t):!1}},Ub=10;(class{constructor(e,t){if(this._projection=e,this._values=new Map,t)for(const r of t)this.add(r)}toString(){return Ts(this)}toJSON(){return this._values.size>Ub?{size:this._values.size}:Array.from(this._values.values())}[wr.custom](){return Ts(this)}add(e){return this._values.set(this._projection(e),e),this}clear(){this._values.clear()}delete(e){return this._values.delete(this._projection(e))}forEach(e,t){t&&(e=e.bind(t)),this._values.forEach(r=>e(r,r,this))}has(e){return this._values.has(this._projection(e))}get size(){return this._values.size}[Symbol.iterator](){return this._values.values()}*entries(){for(const e of this._values.values())yield[e,e]}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}get[Symbol.toStringTag](){return"ComplexSet"}}),class{constructor(e,t){if(this._keyProjection=e,this._keys=new Map,this._values=new Map,t)for(const[r,n]of t)this.set(r,n)}toString(){return Ts(this)}toJSON(){return this._values.size>Ub?{size:this._values.size}:Array.from(this._values.values())}[wr.custom](){return Ts(this)}clear(){this._keys.clear(),this._values.clear()}delete(e){const t=this._keys.delete(this._keyProjection(e)),r=this._values.delete(this._keyProjection(e));return t||r}forEach(e,t){t&&(e=e.bind(t)),this._keys.forEach((r,n)=>e(this._values.get(n)??Fb(new Error("Map corrupted.")),r,this))}get(e){return this._values.get(this._keyProjection(e))}has(e){return this._keys.has(this._keyProjection(e))}set(e,t){const r=this._keyProjection(e);return this._keys.set(r,e),this._values.set(r,t),this}get size(){return this._keys.size}*[Symbol.iterator](){for(const[e,t]of this._keys){const r=this._values.get(e)??Fb(new Error("Map corrupted."));yield[t,r]}}entries(){return this[Symbol.iterator]()}keys(){return this._keys.values()}values(){return this._values.values()}get[Symbol.toStringTag](){return"ComplexMap"}};var k8=["ack","alabama","alanine","alaska","alpha","angel","apart","april","arizona","arkansas","artist","asparagus","aspen","august","autumn","avocado","bacon","bakerloo","batman","beer","berlin","beryllium","black","blossom","blue","bluebird","bravo","bulldog","burger","butter","california","carbon","cardinal","carolina","carpet","cat","ceiling","charlie","chicken","coffee","cola","cold","colorado","comet","connecticut","crazy","cup","dakota","december","delaware","delta","diet","don","double","early","earth","east","echo","edward","eight","eighteen","eleven","emma","enemy","equal","failed","fanta","fifteen","fillet","finch","fish","five","fix","floor","florida","football","four","fourteen","foxtrot","freddie","friend","fruit","gee","georgia","glucose","golf","green","grey","hamper","happy","harry","hawaii","helium","high","hot","hotel","hydrogen","idaho","illinois","india","indigo","ink","iowa","island","item","jersey","jig","johnny","juliet","july","jupiter","kansas","kentucky","kilo","king","kitten","lactose","lake","lamp","lemon","leopard","lima","lion","lithium","london","louisiana","low","magazine","magnesium","maine","mango","march","mars","maryland","massachusetts","may","mexico","michigan","mike","minnesota","mirror","mississippi","missouri","mobile","mockingbird","monkey","montana","moon","mountain","muppet","music","nebraska","neptune","network","nevada","nine","nineteen","nitrogen","north","november","nuts","october","ohio","oklahoma","one","orange","oranges","oregon","oscar","oven","oxygen","papa","paris","pasta","pennsylvania","pip","pizza","pluto","potato","princess","purple","quebec","queen","quiet","red","river","robert","robin","romeo","rugby","sad","salami","saturn","september","seven","seventeen","shade","sierra","single","sink","six","sixteen","skylark","snake","social","sodium","solar","south","spaghetti","speaker","spring","stairway","steak","stream","summer","sweet","table","tango","ten","tennessee","tennis","texas","thirteen","three","timing","triple","twelve","twenty","two","uncle","undress","uniform","uranus","utah","vegan","venus","vermont","victor","video","violet","virginia","washington","west","whiskey","white","william","winner","winter","wisconsin","wolfram","wyoming","xray","yankee","yellow","zebra","zulu"],N8=class{constructor(e=k8){if(this.wordlist=e,e.length!==256)throw new Error("Wordlist must have exactly 256 items");this.wordlist=e}humanize(e,t=4,r="-"){const n=e.match(/(..?)/g);if(!n)throw new Error("");const o=n.map(a=>parseInt(a,16));return this._compress(o,t).map(a=>this.wordlist[a]).join(r)}_compress(e,t){const r=e.length;if(t>r)throw new Error("Fewer input bytes than requested output");const n=r/t>>0,o=[];for(let a=0;a<n*t;a+=n)o.push(e.slice(a,a+n));return o[o.length-1]=o[o.length-1].concat(e.slice(t*n)),o.map(a=>a.reduce((s,l)=>s^l))}},D8=new N8,L8=e=>(e instanceof Xt.Buffer||e instanceof Uint8Array||e instanceof ArrayBuffer?e=Rb.stringify(e):e instanceof Rb&&(e=e.toHex()),D8.humanize(e)),M8=e=>Xt.Buffer.from(e.buffer,e.byteOffset,e.byteLength),F8=5,Pu=(e,t=0,r=new WeakSet)=>{if(t>F8)return null;if(typeof e=="function")return null;if(typeof e=="object"&&e!==null){if(r.has(e))return null;r.add(e);try{if(e instanceof Uint8Array)return M8(e).toString("hex");if(Array.isArray(e))return e.map(n=>Pu(n,t+1,r));if(typeof e.toJSON=="function")return e.toJSON();{const n={};for(const o of Object.keys(e))n[o]=Pu(e[o],t+1,r);return n}}finally{r.delete(e)}}else return e},j8=(e,t,r)=>{let n=e.get(t);return n===void 0&&(n=typeof r=="function"?r():r,e.set(t,n)),n},B8=()=>typeof navigator<"u"&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent),ku=Symbol("instanceTag"),R8=e=>t=>{t.prototype[ku]=e,Object.defineProperty(t.prototype,Symbol.hasInstance,{value:r=>r?.[ku]===e}),Object.defineProperty(t,Symbol.hasInstance,{value:r=>r?.[ku]===e})},U8=Symbol.for("dxos.instance-contexts"),W8=globalThis[U8]??=new WeakMap,V8=e=>{const t=Object.getPrototypeOf(e),r=j8(W8,t,()=>({nextId:0,instanceIds:new WeakMap}));let n=r.instanceIds.get(e);return n===void 0&&(n=r.nextId++,r.instanceIds.set(e,n)),n},Nu=()=>{throw new Error("Not available on this platform")},H8=()=>Nu(),z8=()=>Nu(),G8=()=>Nu(),Wb=We({"node_modules/.pnpm/path-browserify@1.0.1/node_modules/path-browserify/index.js"(e,t){function r(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function n(a,s){for(var l="",u=0,f=-1,d=0,p,h=0;h<=a.length;++h){if(h<a.length)p=a.charCodeAt(h);else{if(p===47)break;p=47}if(p===47){if(!(f===h-1||d===1))if(f!==h-1&&d===2){if(l.length<2||u!==2||l.charCodeAt(l.length-1)!==46||l.charCodeAt(l.length-2)!==46){if(l.length>2){var v=l.lastIndexOf("/");if(v!==l.length-1){v===-1?(l="",u=0):(l=l.slice(0,v),u=l.length-1-l.lastIndexOf("/")),f=h,d=0;continue}}else if(l.length===2||l.length===1){l="",u=0,f=h,d=0;continue}}s&&(l.length>0?l+="/..":l="..",u=2)}else l.length>0?l+="/"+a.slice(f+1,h):l=a.slice(f+1,h),u=h-f-1;f=h,d=0}else p===46&&d!==-1?++d:d=-1}return l}function o(a,s){var l=s.dir||s.root,u=s.base||(s.name||"")+(s.ext||"");return l?l===s.root?l+u:l+a+u:u}var i={resolve:function(){for(var s="",l=!1,u,f=arguments.length-1;f>=-1&&!l;f--){var d;f>=0?d=arguments[f]:(u===void 0&&(u=process.cwd()),d=u),r(d),d.length!==0&&(s=d+"/"+s,l=d.charCodeAt(0)===47)}return s=n(s,!l),l?s.length>0?"/"+s:"/":s.length>0?s:"."},normalize:function(s){if(r(s),s.length===0)return".";var l=s.charCodeAt(0)===47,u=s.charCodeAt(s.length-1)===47;return s=n(s,!l),s.length===0&&!l&&(s="."),s.length>0&&u&&(s+="/"),l?"/"+s:s},isAbsolute:function(s){return r(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var s,l=0;l<arguments.length;++l){var u=arguments[l];r(u),u.length>0&&(s===void 0?s=u:s+="/"+u)}return s===void 0?".":i.normalize(s)},relative:function(s,l){if(r(s),r(l),s===l||(s=i.resolve(s),l=i.resolve(l),s===l))return"";for(var u=1;u<s.length&&s.charCodeAt(u)===47;++u);for(var f=s.length,d=f-u,p=1;p<l.length&&l.charCodeAt(p)===47;++p);for(var h=l.length,v=h-p,g=d<v?d:v,y=-1,m=0;m<=g;++m){if(m===g){if(v>g){if(l.charCodeAt(p+m)===47)return l.slice(p+m+1);if(m===0)return l.slice(p+m)}else d>g&&(s.charCodeAt(u+m)===47?y=m:m===0&&(y=0));break}var w=s.charCodeAt(u+m),E=l.charCodeAt(p+m);if(w!==E)break;w===47&&(y=m)}var x="";for(m=u+y+1;m<=f;++m)(m===f||s.charCodeAt(m)===47)&&(x.length===0?x+="..":x+="/..");return x.length>0?x+l.slice(p+y):(p+=y,l.charCodeAt(p)===47&&++p,l.slice(p))},_makeLong:function(s){return s},dirname:function(s){if(r(s),s.length===0)return".";for(var l=s.charCodeAt(0),u=l===47,f=-1,d=!0,p=s.length-1;p>=1;--p)if(l=s.charCodeAt(p),l===47){if(!d){f=p;break}}else d=!1;return f===-1?u?"/":".":u&&f===1?"//":s.slice(0,f)},basename:function(s,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');r(s);var u=0,f=-1,d=!0,p;if(l!==void 0&&l.length>0&&l.length<=s.length){if(l.length===s.length&&l===s)return"";var h=l.length-1,v=-1;for(p=s.length-1;p>=0;--p){var g=s.charCodeAt(p);if(g===47){if(!d){u=p+1;break}}else v===-1&&(d=!1,v=p+1),h>=0&&(g===l.charCodeAt(h)?--h===-1&&(f=p):(h=-1,f=v))}return u===f?f=v:f===-1&&(f=s.length),s.slice(u,f)}else{for(p=s.length-1;p>=0;--p)if(s.charCodeAt(p)===47){if(!d){u=p+1;break}}else f===-1&&(d=!1,f=p+1);return f===-1?"":s.slice(u,f)}},extname:function(s){r(s);for(var l=-1,u=0,f=-1,d=!0,p=0,h=s.length-1;h>=0;--h){var v=s.charCodeAt(h);if(v===47){if(!d){u=h+1;break}continue}f===-1&&(d=!1,f=h+1),v===46?l===-1?l=h:p!==1&&(p=1):l!==-1&&(p=-1)}return l===-1||f===-1||p===0||p===1&&l===f-1&&l===u+1?"":s.slice(l,f)},format:function(s){if(s===null||typeof s!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof s);return o("/",s)},parse:function(s){r(s);var l={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return l;var u=s.charCodeAt(0),f=u===47,d;f?(l.root="/",d=1):d=0;for(var p=-1,h=0,v=-1,g=!0,y=s.length-1,m=0;y>=d;--y){if(u=s.charCodeAt(y),u===47){if(!g){h=y+1;break}continue}v===-1&&(g=!1,v=y+1),u===46?p===-1?p=y:m!==1&&(m=1):p!==-1&&(m=-1)}return p===-1||v===-1||m===0||m===1&&p===v-1&&p===h+1?v!==-1&&(h===0&&f?l.base=l.name=s.slice(1,v):l.base=l.name=s.slice(h,v)):(h===0&&f?(l.name=s.slice(1,p),l.base=s.slice(1,v)):(l.name=s.slice(h,p),l.base=s.slice(h,v)),l.ext=s.slice(p,v)),h>0?l.dir=s.slice(0,h-1):f&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};i.posix=i,t.exports=i}});ki(Wb());var Br=ki(Wb());Br.basename;var K8=Br.dirname;Br.extname,Br.format,Br.isAbsolute,Br.join,Br.normalize,Br.parse,Br.relative,Br.resolve;var Ye;(function(e){e[e.TRACE=5]="TRACE",e[e.DEBUG=10]="DEBUG",e[e.INFO=11]="INFO",e[e.WARN=12]="WARN",e[e.ERROR=13]="ERROR"})(Ye||(Ye={}));var q8={trace:Ye.TRACE,debug:Ye.DEBUG,info:Ye.INFO,warn:Ye.WARN,error:Ye.ERROR};Ye.TRACE+"",Ye.DEBUG+"",Ye.INFO+"",Ye.WARN+"",Ye.ERROR+"";var Di;(function(e){e.CONSOLE="console",e.BROWSER="browser",e.DEBUG="debug"})(Di||(Di={}));var Y8=Symbol("logInfoProperties"),J8=e=>{if(!e)return{};const t={},n=Object.getPrototypeOf(e)[Y8]??[];for(const o of n)try{t[o]=typeof e[o]=="function"?e[o]():e[o]}catch(i){t[o]=i.message}return t},X8=(e,t,r)=>t>=e.level&&(!e.pattern||r.includes(e.pattern)),Vb=(e,t)=>t===void 0?!0:t.some(r=>X8(r,e.level,e.meta?.F??"")),Du=e=>{let t;if(e.meta){const r=J8(e.meta.S);Object.keys(r).length>0&&(t=Object.assign(t??{},r))}if(e.context)if(e.context instanceof Error){const r=e.context.context;t=Object.assign(t??{},{error:e.context.stack,...r})}else typeof e.context=="object"&&(t=Object.assign(t??{},e.context));return t&&Object.keys(t).length>0?t:void 0},Z8=0,Q8=e=>(t,r,n)=>(o,i,a)=>{const s=a.value;a.value=function(...l){const u={...n??{},S:this},f=l.map(d=>wr(d,!1,1,!0)).join(", ");try{const d=performance.now(),p=s.apply(this,l);if(eD(p)){const h=Z8++;e.info(`${i}(${f}) => Promise { #${h} }`,{},u),p.then(v=>{v!==void 0?e.info(`✅ resolve #${h} ${(performance.now()-d).toFixed(0)}ms => ${wr(v,!1,1,!0)}`,{},u):e.info(`✅ resolve #${h} ${(performance.now()-d).toFixed(0)}ms`,{},u)},v=>{e.info(`🔥 reject #${h} #${(performance.now()-d).toFixed(0)}ms => ${v}`,{},u)})}else e.info(`${i}(${f}) => ${wr(p,!1,1,!0)}`,{},u);return p}catch(d){throw e.error(`${i}(${f}) 🔥 ${d}`,{},u),d}},Object.defineProperty(a.value,"name",{value:i+"$log"})},eD=e=>e&&typeof e.then=="function",tD=e=>{try{return JSON.parse(localStorage.getItem("dxlog"))}catch{return}},Hb=()=>{},rD=(e,t)=>{console.log(wr(t,!1,null,!0))},zb=e=>{const t=e.match(/.+\/(packages\/.+\/.+)/);if(t){const[,r]=t;return r}return e},Lu=typeof mochaExecutor<"u"?{useTestProcessor:!0,printFileLinks:!0}:{useTestProcessor:!1,printFileLinks:!1},nD=(e,t)=>{if(!Vb(t,e.filters))return;const r=e.prefix??"https://vscode.dev/github.com/dxos/dxos/blob/main/",n=[];let o="";if(t.meta){const u=zb(t.meta.F);o=`${`${r.replace(/\/$/,"")}/${u}`}#L${t.meta.L}`}let i=[];if(t.meta?.S){const u=t.meta?.S,f=Object.getPrototypeOf(u),d=V8(u);i.push(`%c${f.constructor.name}#${d}`,"color:#C026D3;font-weight:bold")}i.push(t.message);const a=Du(t);a&&i.push(a);const s={[Ye.ERROR]:console.error,[Ye.WARN]:console.warn,[Ye.DEBUG]:console.log};(Lu.printFileLinks||B8())&&(n?.length?i=[`%c${o}
|
|
107
|
+
%c${i.join(" ")}`,...n]:i=[o+`
|
|
108
|
+
`,...i]);const l=s[t.level]??console.log;typeof t.meta?.C=="function"?t.meta.C(l,i):l(...i)},oD=(e,t)=>{if(!Vb(t,e.filters))return;let r="";t.meta&&(r=`${zb(t.meta.F)}:${t.meta.L}`);let n=[];n.push(t.message);const o=Du(t);o&&n.push(o);const i={[Ye.ERROR]:console.error,[Ye.WARN]:console.warn,[Ye.DEBUG]:console.log};Lu.printFileLinks&&(n=[r,...n]);const a=i[t.level]??console.log;typeof t.meta?.C=="function"?t.meta.C(a,n):a(...n)},Gb=Lu.useTestProcessor?oD:nD,iD=({path:e,levels:t})=>{let r;return(n,o)=>{if(!t.includes(o.level))return;if(!r){try{z8(K8(e))}catch{}r=G8()}const i={...o,timestamp:Date.now(),meta:{file:o.meta?.F,line:o.meta?.L},context:Pu(Du(o))};H8(r,JSON.stringify(i)+`
|
|
109
|
+
`)}},Kb,aD=()=>(Kb??=process.env.LOG_FILE??(process.env.HOME?`${process.env.HOME}/.dxlog/${new Date().toISOString()}.log`:void 0),Kb);iD({path:aD(),levels:[Ye.ERROR,Ye.WARN,Ye.INFO,Ye.TRACE]});var sD={[Di.CONSOLE]:Hb,[Di.BROWSER]:Gb,[Di.DEBUG]:rD},lD=typeof window<"u"||typeof navigator<"u",Mu=[lD?Gb:Hb],qb=e=>{if(typeof e=="number")return[{level:e}];const t=(n,o=Ye.WARN)=>q8[n.toLowerCase()]??o;return(typeof e=="string"?e.split(/,\s*/):e).map(n=>{const[o,i]=n.split(":");return i?{level:t(i),pattern:o}:{level:t(o)}})},Yb=e=>{const t="process"in globalThis?{file:process.env.LOG_CONFIG,filter:process.env.LOG_FILTER,processor:process.env.LOG_PROCESSOR}:void 0,r=b8({},e,t&&tD(t.file),t);return{options:r,filters:qb(r.filter??Ye.INFO),captureFilters:qb(r.captureFilter??Ye.WARN),processors:r.processor?[sD[r.processor]]:Mu,prefix:r.prefix}},cD=()=>{const e=(...r)=>t(Ye.DEBUG,...r);e._config=Yb(),Object.defineProperty(e,"runtimeConfig",{get:()=>e._config}),e.addProcessor=r=>{Mu.filter(n=>n===r).length===0&&Mu.push(r),e._config.processors.filter(n=>n===r).length===0&&e._config.processors.push(r)},e.config=r=>{e._config=Yb(r)},e.trace=(...r)=>t(Ye.TRACE,...r),e.debug=(...r)=>t(Ye.DEBUG,...r),e.info=(...r)=>t(Ye.INFO,...r),e.warn=(...r)=>t(Ye.WARN,...r),e.error=(...r)=>t(Ye.ERROR,...r),e.catch=(r,n,o)=>t(Ye.ERROR,r.stack,n,o),e.break=()=>e.info("——————————————————————————————————————————————————"),e.stack=(r,n,o)=>t(Ye.INFO,`${r??"Stack Dump"}
|
|
110
|
+
${uD()}`,n,o),e.method=Q8(e);const t=(r,n,o={},i,a)=>{e._config.processors.forEach(s=>s(e._config,{level:r,message:n,context:o,meta:i,error:a}))};return e},Qe=globalThis.dx_log??=cD(),uD=()=>new Error().stack.split(`
|
|
111
|
+
`).slice(3).join(`
|
|
112
|
+
`),fD=Symbol("kDebugInfoProperties");(class{constructor(e,t){this.constr=e,this.parent=t}getInfo(){if(!this.instance)return{};const e=this.constr.prototype[fD]??[],t={};for(const r of e)t[r]=this.instance[r];return t}[wr.custom](){return{className:this.constr.name,info:this.getInfo(),parent:this.parent}}});var dD=class extends Error{constructor(){super("Context disposed.")}};function pD(e,t,r,n){var o=arguments.length,i=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}var Fu="/home/runner/work/dxos/dxos/packages/common/context/src/context.ts",hD=300,ju=class{constructor({onError:t=o=>{if(!(o instanceof dD))throw this.dispose(),o},attributes:r={},parent:n}={}){this._disposeCallbacks=[],this._isDisposed=!1,this._disposePromise=void 0,this._parent=null,this.maxSafeDisposeCallbacks=hD,this._onError=t,this._attributes=r,n!==void 0&&(this._parent=n)}get disposed(){return this._isDisposed}get disposeCallbacksLength(){return this._disposeCallbacks.length}onDispose(t){return this._isDisposed&&(async()=>{try{await t()}catch(r){Qe.catch(r,void 0,{F:Fu,L:82,S:this,C:(n,o)=>n(...o)})}})(),this._disposeCallbacks.push(t),this._disposeCallbacks.length>this.maxSafeDisposeCallbacks&&Qe.warn("Context has a large number of dispose callbacks. This might be a memory leak.",{count:this._disposeCallbacks.length,safeThreshold:this.maxSafeDisposeCallbacks},{F:Fu,L:89,S:this,C:(r,n)=>r(...n)}),()=>{const r=this._disposeCallbacks.indexOf(t);r!==-1&&this._disposeCallbacks.splice(r,1)}}dispose(){if(this._disposePromise)return this._disposePromise;this._isDisposed=!0;const t=[];for(const r of this._disposeCallbacks.reverse())t.push((async()=>{try{await r()}catch(n){Qe.catch(n,void 0,{F:Fu,L:124,S:this,C:(o,i)=>o(...i)})}})());return this._disposeCallbacks.length=0,this._disposePromise=Promise.all(t).then(()=>{})}raise(t){if(!this._isDisposed)try{this._onError(t)}catch(r){Promise.reject(r)}}derive({onError:t,attributes:r}={}){const n=new ju({onError:async i=>{if(!t)this.raise(i);else try{await t(i)}catch{this.raise(i)}},attributes:r}),o=this.onDispose(()=>n.dispose());return n.onDispose(o),n}getAttribute(t){if(t in this._attributes)return this._attributes[t];if(this._parent!==null)return this._parent.getAttribute(t)}};ju=pD([R8("Context")],ju);var ks={};Object.defineProperty(ks,"__esModule",{value:!0}),ks.Observable=void 0;const Jb=e=>!!Symbol[e],Bu=e=>Jb(e)?Symbol[e]:"@@"+e,vD=Bu("iterator"),Ru=Bu("observable"),Xb=Bu("species");function Ns(e,t){let r=e[t];if(r!=null){if(typeof r!="function")throw new TypeError(r+" is not a function");return r}}function Li(e){let t=e.constructor;return t!==void 0&&(t=t[Xb],t===null&&(t=void 0)),t!==void 0?t:Ls}function gD(e){return e instanceof Ls}function Mo(e){Mo.log?Mo.log(e):setTimeout(()=>{throw e})}function Ds(e){Promise.resolve().then(()=>{try{e()}catch(t){Mo(t)}})}function Zb(e){let t=e._cleanup;if(t!==void 0&&(e._cleanup=void 0,!!t))try{if(typeof t=="function")t();else{let r=Ns(t,"unsubscribe");r&&r.call(t)}}catch(r){Mo(r)}}function Uu(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function mD(e){let t=e._queue;if(t){e._queue=void 0,e._state="ready";for(let r=0;r<t.length&&(Qb(e,t[r].type,t[r].value),e._state!=="closed");++r);}}function Qb(e,t,r){e._state="running";let n=e._observer;try{let o=Ns(n,t);switch(t){case"next":o&&o.call(n,r);break;case"error":if(Uu(e),o)o.call(n,r);else throw r;break;case"complete":Uu(e),o&&o.call(n);break}}catch(o){Mo(o)}e._state==="closed"?Zb(e):e._state==="running"&&(e._state="ready")}function Wu(e,t,r){if(e._state!=="closed"){if(e._state==="buffering"){e._queue.push({type:t,value:r});return}if(e._state!=="ready"){e._state="buffering",e._queue=[{type:t,value:r}],Ds(()=>mD(e));return}Qb(e,t,r)}}class bD{constructor(t,r){this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";let n=this,o={get closed(){return n._state==="closed"},next(i){Wu(n,"next",i)},error(i){Wu(n,"error",i)},complete(){Wu(n,"complete")}};try{this._cleanup=r.call(void 0,o)}catch(i){o.error(i)}this._state==="initializing"&&(this._state="ready")}get closed(){return this._state==="closed"}unsubscribe(){this._state!=="closed"&&(Uu(this),Zb(this))}}let Ls=class xl{constructor(t){if(!(this instanceof xl))throw new TypeError("Observable cannot be called as a function");if(typeof t!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=t}subscribe(t){return(typeof t!="object"||t===null)&&(t={next:t,error:arguments[1],complete:arguments[2]}),new bD(t,this._subscriber)}forEach(t){return new Promise((r,n)=>{if(typeof t!="function"){n(new TypeError(t+" is not a function"));return}function o(){i.unsubscribe(),r()}let i=this.subscribe({next(a){try{t(a,o)}catch(s){n(s),i.unsubscribe()}},error:n,complete:r})})}map(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Li(this);return new r(n=>this.subscribe({next(o){try{o=t(o)}catch(i){return n.error(i)}n.next(o)},error(o){n.error(o)},complete(){n.complete()}}))}filter(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Li(this);return new r(n=>this.subscribe({next(o){try{if(!t(o))return}catch(i){return n.error(i)}n.next(o)},error(o){n.error(o)},complete(){n.complete()}}))}reduce(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Li(this),n=arguments.length>1,o=!1,a=arguments[1];return new r(s=>this.subscribe({next(l){let u=!o;if(o=!0,!u||n)try{a=t(a,l)}catch(f){return s.error(f)}else a=l},error(l){s.error(l)},complete(){if(!o&&!n)return s.error(new TypeError("Cannot reduce an empty sequence"));s.next(a),s.complete()}}))}async all(){let t=[];return await this.forEach(r=>t.push(r)),t}concat(...t){let r=Li(this);return new r(n=>{let o,i=0;function a(s){o=s.subscribe({next(l){n.next(l)},error(l){n.error(l)},complete(){i===t.length?(o=void 0,n.complete()):a(r.from(t[i++]))}})}return a(this),()=>{o&&(o.unsubscribe(),o=void 0)}})}flatMap(t){if(typeof t!="function")throw new TypeError(t+" is not a function");let r=Li(this);return new r(n=>{let o=[],i=this.subscribe({next(s){if(t)try{s=t(s)}catch(u){return n.error(u)}let l=r.from(s).subscribe({next(u){n.next(u)},error(u){n.error(u)},complete(){let u=o.indexOf(l);u>=0&&o.splice(u,1),a()}});o.push(l)},error(s){n.error(s)},complete(){a()}});function a(){i.closed&&o.length===0&&n.complete()}return()=>{o.forEach(s=>s.unsubscribe()),i.unsubscribe()}})}[Ru](){return this}static from(t){let r=typeof this=="function"?this:xl;if(t==null)throw new TypeError(t+" is not an object");let n=Ns(t,Ru);if(n){let o=n.call(t);if(Object(o)!==o)throw new TypeError(o+" is not an object");return gD(o)&&o.constructor===r?o:new r(i=>o.subscribe(i))}if(Jb("iterator")&&(n=Ns(t,vD),n))return new r(o=>{Ds(()=>{if(!o.closed){for(let i of n.call(t))if(o.next(i),o.closed)return;o.complete()}})});if(Array.isArray(t))return new r(o=>{Ds(()=>{if(!o.closed){for(let i=0;i<t.length;++i)if(o.next(t[i]),o.closed)return;o.complete()}})});throw new TypeError(t+" is not observable")}static of(...t){let r=typeof this=="function"?this:xl;return new r(n=>{Ds(()=>{if(!n.closed){for(let o=0;o<t.length;++o)if(n.next(t[o]),n.closed)return;n.complete()}})})}static get[Xb](){return this}};ks.Observable=Ls,Object.defineProperty(Ls,Symbol("extensions"),{value:{symbol:Ru,hostReportError:Mo},configurable:!0});var yD=ks.Observable;const Ms=In(yD);var e0={exports:{}},Vu={exports:{}},Fo=typeof Reflect=="object"?Reflect:null,t0=Fo&&typeof Fo.apply=="function"?Fo.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},Fs;Fo&&typeof Fo.ownKeys=="function"?Fs=Fo.ownKeys:Object.getOwnPropertySymbols?Fs=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Fs=function(t){return Object.getOwnPropertyNames(t)};function wD(e){console&&console.warn&&console.warn(e)}var r0=Number.isNaN||function(t){return t!==t};function st(){st.init.call(this)}Vu.exports=st,Vu.exports.once=SD,st.EventEmitter=st,st.prototype._events=void 0,st.prototype._eventsCount=0,st.prototype._maxListeners=void 0;var n0=10;function js(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(st,"defaultMaxListeners",{enumerable:!0,get:function(){return n0},set:function(e){if(typeof e!="number"||e<0||r0(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");n0=e}}),st.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},st.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||r0(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function o0(e){return e._maxListeners===void 0?st.defaultMaxListeners:e._maxListeners}st.prototype.getMaxListeners=function(){return o0(this)},st.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r.push(arguments[n]);var o=t==="error",i=this._events;if(i!==void 0)o=o&&i.error===void 0;else if(!o)return!1;if(o){var a;if(r.length>0&&(a=r[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[t];if(l===void 0)return!1;if(typeof l=="function")t0(l,this,r);else for(var u=l.length,f=c0(l,u),n=0;n<u;++n)t0(f[n],this,r);return!0};function i0(e,t,r,n){var o,i,a;if(js(r),i=e._events,i===void 0?(i=e._events=Object.create(null),e._eventsCount=0):(i.newListener!==void 0&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),a=i[t]),a===void 0)a=i[t]=r,++e._eventsCount;else if(typeof a=="function"?a=i[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),o=o0(e),o>0&&a.length>o&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,wD(s)}return e}st.prototype.addListener=function(t,r){return i0(this,t,r,!1)},st.prototype.on=st.prototype.addListener,st.prototype.prependListener=function(t,r){return i0(this,t,r,!0)};function _D(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function a0(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=_D.bind(n);return o.listener=r,n.wrapFn=o,o}st.prototype.once=function(t,r){return js(r),this.on(t,a0(this,t,r)),this},st.prototype.prependOnceListener=function(t,r){return js(r),this.prependListener(t,a0(this,t,r)),this},st.prototype.removeListener=function(t,r){var n,o,i,a,s;if(js(r),o=this._events,o===void 0)return this;if(n=o[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete o[t],o.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(i=-1,a=n.length-1;a>=0;a--)if(n[a]===r||n[a].listener===r){s=n[a].listener,i=a;break}if(i<0)return this;i===0?n.shift():ED(n,i),n.length===1&&(o[t]=n[0]),o.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this},st.prototype.off=st.prototype.removeListener,st.prototype.removeAllListeners=function(t){var r,n,o;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),a;for(o=0;o<i.length;++o)a=i[o],a!=="removeListener"&&this.removeAllListeners(a);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=n[t],typeof r=="function")this.removeListener(t,r);else if(r!==void 0)for(o=r.length-1;o>=0;o--)this.removeListener(t,r[o]);return this};function s0(e,t,r){var n=e._events;if(n===void 0)return[];var o=n[t];return o===void 0?[]:typeof o=="function"?r?[o.listener||o]:[o]:r?xD(o):c0(o,o.length)}st.prototype.listeners=function(t){return s0(this,t,!0)},st.prototype.rawListeners=function(t){return s0(this,t,!1)},st.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):l0.call(e,t)},st.prototype.listenerCount=l0;function l0(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}st.prototype.eventNames=function(){return this._eventsCount>0?Fs(this._events):[]};function c0(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function ED(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function xD(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}function SD(e,t){return new Promise(function(r,n){function o(a){e.removeListener(t,i),n(a)}function i(){typeof e.removeListener=="function"&&e.removeListener("error",o),r([].slice.call(arguments))}u0(e,t,i,{once:!0}),t!=="error"&&$D(e,o,{once:!0})})}function $D(e,t,r){typeof e.on=="function"&&u0(e,"error",t,r)}function u0(e,t,r,n){if(typeof e.on=="function")n.once?e.once(t,r):e.on(t,r);else if(typeof e.addEventListener=="function")e.addEventListener(t,function o(i){n.once&&e.removeEventListener(t,o),r(i)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}var f0=Vu.exports,d0=f0.EventEmitter;const p0=M1(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Hu,h0;function CD(){if(h0)return Hu;h0=1;function e(p,h){var v=Object.keys(p);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(p);h&&(g=g.filter(function(y){return Object.getOwnPropertyDescriptor(p,y).enumerable})),v.push.apply(v,g)}return v}function t(p){for(var h=1;h<arguments.length;h++){var v=arguments[h]!=null?arguments[h]:{};h%2?e(Object(v),!0).forEach(function(g){r(p,g,v[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(p,Object.getOwnPropertyDescriptors(v)):e(Object(v)).forEach(function(g){Object.defineProperty(p,g,Object.getOwnPropertyDescriptor(v,g))})}return p}function r(p,h,v){return h in p?Object.defineProperty(p,h,{value:v,enumerable:!0,configurable:!0,writable:!0}):p[h]=v,p}function n(p,h){if(!(p instanceof h))throw new TypeError("Cannot call a class as a function")}function o(p,h){for(var v=0;v<h.length;v++){var g=h[v];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(p,g.key,g)}}function i(p,h,v){return h&&o(p.prototype,h),v&&o(p,v),p}var a=Xt,s=a.Buffer,l=p0,u=l.inspect,f=u&&u.custom||"inspect";function d(p,h,v){s.prototype.copy.call(p,h,v)}return Hu=function(){function p(){n(this,p),this.head=null,this.tail=null,this.length=0}return i(p,[{key:"push",value:function(v){var g={data:v,next:null};this.length>0?this.tail.next=g:this.head=g,this.tail=g,++this.length}},{key:"unshift",value:function(v){var g={data:v,next:this.head};this.length===0&&(this.tail=g),this.head=g,++this.length}},{key:"shift",value:function(){if(this.length!==0){var v=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,v}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(v){if(this.length===0)return"";for(var g=this.head,y=""+g.data;g=g.next;)y+=v+g.data;return y}},{key:"concat",value:function(v){if(this.length===0)return s.alloc(0);for(var g=s.allocUnsafe(v>>>0),y=this.head,m=0;y;)d(y.data,g,m),m+=y.data.length,y=y.next;return g}},{key:"consume",value:function(v,g){var y;return v<this.head.data.length?(y=this.head.data.slice(0,v),this.head.data=this.head.data.slice(v)):v===this.head.data.length?y=this.shift():y=g?this._getString(v):this._getBuffer(v),y}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(v){var g=this.head,y=1,m=g.data;for(v-=m.length;g=g.next;){var w=g.data,E=v>w.length?w.length:v;if(E===w.length?m+=w:m+=w.slice(0,v),v-=E,v===0){E===w.length?(++y,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=w.slice(E));break}++y}return this.length-=y,m}},{key:"_getBuffer",value:function(v){var g=s.allocUnsafe(v),y=this.head,m=1;for(y.data.copy(g),v-=y.data.length;y=y.next;){var w=y.data,E=v>w.length?w.length:v;if(w.copy(g,g.length-v,0,E),v-=E,v===0){E===w.length?(++m,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=w.slice(E));break}++m}return this.length-=m,g}},{key:f,value:function(v,g){return u(this,t({},g,{depth:0,customInspect:!1}))}}]),p}(),Hu}function OD(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return n||o?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(zu,this,e)):process.nextTick(zu,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(i){!t&&i?r._writableState?r._writableState.errorEmitted?process.nextTick(Bs,r):(r._writableState.errorEmitted=!0,process.nextTick(v0,r,i)):process.nextTick(v0,r,i):t?(process.nextTick(Bs,r),t(i)):process.nextTick(Bs,r)}),this)}function v0(e,t){zu(e,t),Bs(e)}function Bs(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function AD(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function zu(e,t){e.emit("error",t)}function TD(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}var g0={destroy:OD,undestroy:AD,errorOrDestroy:TD},Yn={};function ID(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var m0={};function cr(e,t,r){r||(r=Error);function n(i,a,s){return typeof t=="string"?t:t(i,a,s)}var o=function(i){ID(a,i);function a(s,l,u){return i.call(this,n(s,l,u))||this}return a}(r);o.prototype.name=r.name,o.prototype.code=e,m0[e]=o}function b0(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function PD(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function kD(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function ND(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}cr("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),cr("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&PD(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var o;if(kD(e," argument"))o="The ".concat(e," ").concat(n," ").concat(b0(t,"type"));else{var i=ND(e,".")?"property":"argument";o='The "'.concat(e,'" ').concat(i," ").concat(n," ").concat(b0(t,"type"))}return o+=". Received type ".concat(typeof r),o},TypeError),cr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),cr("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),cr("ERR_STREAM_PREMATURE_CLOSE","Premature close"),cr("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),cr("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),cr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),cr("ERR_STREAM_WRITE_AFTER_END","write after end"),cr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),cr("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),cr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Yn.codes=m0;var DD=Yn.codes.ERR_INVALID_OPT_VALUE;function LD(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function MD(e,t,r,n){var o=LD(t,n,r);if(o!=null){if(!(isFinite(o)&&Math.floor(o)===o)||o<0){var i=n?r:"highWaterMark";throw new DD(i,o)}return Math.floor(o)}return e.objectMode?16:16*1024}var y0={getHighWaterMark:MD},Gu={exports:{}};typeof Object.create=="function"?Gu.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Gu.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}};var Mi=Gu.exports,FD=jD;function jD(e,t){if(Ku("noDeprecation"))return e;var r=!1;function n(){if(!r){if(Ku("throwDeprecation"))throw new Error(t);Ku("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function Ku(e){try{if(!Ge.localStorage)return!1}catch{return!1}var t=Ge.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}var qu,w0;function _0(){if(w0)return qu;w0=1,qu=A;function e(U){var z=this;this.next=null,this.entry=null,this.finish=function(){de(z,U)}}var t;A.WritableState=I;var r={deprecate:FD},n=d0,o=Xt.Buffer,i=Ge.Uint8Array||function(){};function a(U){return o.from(U)}function s(U){return o.isBuffer(U)||U instanceof i}var l=g0,u=y0,f=u.getHighWaterMark,d=Yn.codes,p=d.ERR_INVALID_ARG_TYPE,h=d.ERR_METHOD_NOT_IMPLEMENTED,v=d.ERR_MULTIPLE_CALLBACK,g=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,m=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,E=d.ERR_UNKNOWN_ENCODING,x=l.errorOrDestroy;Mi(A,n);function P(){}function I(U,z,M){t=t||jo(),U=U||{},typeof M!="boolean"&&(M=z instanceof t),this.objectMode=!!U.objectMode,M&&(this.objectMode=this.objectMode||!!U.writableObjectMode),this.highWaterMark=f(this,U,"writableHighWaterMark",M),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var R=U.decodeStrings===!1;this.decodeStrings=!R,this.defaultEncoding=U.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(G){te(z,G)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=U.emitClose!==!1,this.autoDestroy=!!U.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}I.prototype.getBuffer=function(){for(var z=this.bufferedRequest,M=[];z;)M.push(z),z=z.next;return M},function(){try{Object.defineProperty(I.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var S;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(S=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(z){return S.call(this,z)?!0:this!==A?!1:z&&z._writableState instanceof I}})):S=function(z){return z instanceof this};function A(U){t=t||jo();var z=this instanceof t;if(!z&&!S.call(A,this))return new A(U);this._writableState=new I(U,this,z),this.writable=!0,U&&(typeof U.write=="function"&&(this._write=U.write),typeof U.writev=="function"&&(this._writev=U.writev),typeof U.destroy=="function"&&(this._destroy=U.destroy),typeof U.final=="function"&&(this._final=U.final)),n.call(this)}A.prototype.pipe=function(){x(this,new g)};function k(U,z){var M=new w;x(U,M),process.nextTick(z,M)}function j(U,z,M,R){var G;return M===null?G=new m:typeof M!="string"&&!z.objectMode&&(G=new p("chunk",["string","Buffer"],M)),G?(x(U,G),process.nextTick(R,G),!1):!0}A.prototype.write=function(U,z,M){var R=this._writableState,G=!1,O=!R.objectMode&&s(U);return O&&!o.isBuffer(U)&&(U=a(U)),typeof z=="function"&&(M=z,z=null),O?z="buffer":z||(z=R.defaultEncoding),typeof M!="function"&&(M=P),R.ending?k(this,M):(O||j(this,R,U,M))&&(R.pendingcb++,G=N(this,R,O,U,z,M)),G},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var U=this._writableState;U.corked&&(U.corked--,!U.writing&&!U.corked&&!U.bufferProcessing&&U.bufferedRequest&&ae(this,U))},A.prototype.setDefaultEncoding=function(z){if(typeof z=="string"&&(z=z.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((z+"").toLowerCase())>-1))throw new E(z);return this._writableState.defaultEncoding=z,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function D(U,z,M){return!U.objectMode&&U.decodeStrings!==!1&&typeof z=="string"&&(z=o.from(z,M)),z}Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function N(U,z,M,R,G,O){if(!M){var T=D(z,R,G);R!==T&&(M=!0,G="buffer",R=T)}var Z=z.objectMode?1:R.length;z.length+=Z;var ne=z.length<z.highWaterMark;if(ne||(z.needDrain=!0),z.writing||z.corked){var pe=z.lastBufferedRequest;z.lastBufferedRequest={chunk:R,encoding:G,isBuf:M,callback:O,next:null},pe?pe.next=z.lastBufferedRequest:z.bufferedRequest=z.lastBufferedRequest,z.bufferedRequestCount+=1}else J(U,z,!1,Z,R,G,O);return ne}function J(U,z,M,R,G,O,T){z.writelen=R,z.writecb=T,z.writing=!0,z.sync=!0,z.destroyed?z.onwrite(new y("write")):M?U._writev(G,z.onwrite):U._write(G,O,z.onwrite),z.sync=!1}function K(U,z,M,R,G){--z.pendingcb,M?(process.nextTick(G,R),process.nextTick(V,U,z),U._writableState.errorEmitted=!0,x(U,R)):(G(R),U._writableState.errorEmitted=!0,x(U,R),V(U,z))}function Y(U){U.writing=!1,U.writecb=null,U.length-=U.writelen,U.writelen=0}function te(U,z){var M=U._writableState,R=M.sync,G=M.writecb;if(typeof G!="function")throw new v;if(Y(M),z)K(U,M,R,z,G);else{var O=ve(M)||U.destroyed;!O&&!M.corked&&!M.bufferProcessing&&M.bufferedRequest&&ae(U,M),R?process.nextTick(oe,U,M,O,G):oe(U,M,O,G)}}function oe(U,z,M,R){M||le(U,z),z.pendingcb--,R(),V(U,z)}function le(U,z){z.length===0&&z.needDrain&&(z.needDrain=!1,U.emit("drain"))}function ae(U,z){z.bufferProcessing=!0;var M=z.bufferedRequest;if(U._writev&&M&&M.next){var R=z.bufferedRequestCount,G=new Array(R),O=z.corkedRequestsFree;O.entry=M;for(var T=0,Z=!0;M;)G[T]=M,M.isBuf||(Z=!1),M=M.next,T+=1;G.allBuffers=Z,J(U,z,!0,z.length,G,"",O.finish),z.pendingcb++,z.lastBufferedRequest=null,O.next?(z.corkedRequestsFree=O.next,O.next=null):z.corkedRequestsFree=new e(z),z.bufferedRequestCount=0}else{for(;M;){var ne=M.chunk,pe=M.encoding,me=M.callback,xe=z.objectMode?1:ne.length;if(J(U,z,!1,xe,ne,pe,me),M=M.next,z.bufferedRequestCount--,z.writing)break}M===null&&(z.lastBufferedRequest=null)}z.bufferedRequest=M,z.bufferProcessing=!1}A.prototype._write=function(U,z,M){M(new h("_write()"))},A.prototype._writev=null,A.prototype.end=function(U,z,M){var R=this._writableState;return typeof U=="function"?(M=U,U=null,z=null):typeof z=="function"&&(M=z,z=null),U!=null&&this.write(U,z),R.corked&&(R.corked=1,this.uncork()),R.ending||re(this,R,M),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function ve(U){return U.ending&&U.length===0&&U.bufferedRequest===null&&!U.finished&&!U.writing}function ce(U,z){U._final(function(M){z.pendingcb--,M&&x(U,M),z.prefinished=!0,U.emit("prefinish"),V(U,z)})}function q(U,z){!z.prefinished&&!z.finalCalled&&(typeof U._final=="function"&&!z.destroyed?(z.pendingcb++,z.finalCalled=!0,process.nextTick(ce,U,z)):(z.prefinished=!0,U.emit("prefinish")))}function V(U,z){var M=ve(z);if(M&&(q(U,z),z.pendingcb===0&&(z.finished=!0,U.emit("finish"),z.autoDestroy))){var R=U._readableState;(!R||R.autoDestroy&&R.endEmitted)&&U.destroy()}return M}function re(U,z,M){z.ending=!0,V(U,z),M&&(z.finished?process.nextTick(M):U.once("finish",M)),z.ended=!0,U.writable=!1}function de(U,z,M){var R=U.entry;for(U.entry=null;R;){var G=R.callback;z.pendingcb--,G(M),R=R.next}z.corkedRequestsFree.next=U}return Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(z){this._writableState&&(this._writableState.destroyed=z)}}),A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(U,z){z(U)},qu}var Yu,E0;function jo(){if(E0)return Yu;E0=1;var e=Object.keys||function(u){var f=[];for(var d in u)f.push(d);return f};Yu=a;var t=I0(),r=_0();Mi(a,t);for(var n=e(r.prototype),o=0;o<n.length;o++){var i=n[o];a.prototype[i]||(a.prototype[i]=r.prototype[i])}function a(u){if(!(this instanceof a))return new a(u);t.call(this,u),r.call(this,u),this.allowHalfOpen=!0,u&&(u.readable===!1&&(this.readable=!1),u.writable===!1&&(this.writable=!1),u.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",s)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function s(){this._writableState.ended||process.nextTick(l,this)}function l(u){u.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),Yu}var Ju={},x0;function S0(){if(x0)return Ju;x0=1;var e=Bb.Buffer,t=e.isEncoding||function(m){switch(m=""+m,m&&m.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function r(m){if(!m)return"utf8";for(var w;;)switch(m){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return m;default:if(w)return;m=(""+m).toLowerCase(),w=!0}}function n(m){var w=r(m);if(typeof w!="string"&&(e.isEncoding===t||!t(m)))throw new Error("Unknown encoding: "+m);return w||m}Ju.StringDecoder=o;function o(m){this.encoding=n(m);var w;switch(this.encoding){case"utf16le":this.text=d,this.end=p,w=4;break;case"utf8":this.fillLast=l,w=4;break;case"base64":this.text=h,this.end=v,w=3;break;default:this.write=g,this.end=y;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(w)}o.prototype.write=function(m){if(m.length===0)return"";var w,E;if(this.lastNeed){if(w=this.fillLast(m),w===void 0)return"";E=this.lastNeed,this.lastNeed=0}else E=0;return E<m.length?w?w+this.text(m,E):this.text(m,E):w||""},o.prototype.end=f,o.prototype.text=u,o.prototype.fillLast=function(m){if(this.lastNeed<=m.length)return m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,m.length),this.lastNeed-=m.length};function i(m){return m<=127?0:m>>5===6?2:m>>4===14?3:m>>3===30?4:m>>6===2?-1:-2}function a(m,w,E){var x=w.length-1;if(x<E)return 0;var P=i(w[x]);return P>=0?(P>0&&(m.lastNeed=P-1),P):--x<E||P===-2?0:(P=i(w[x]),P>=0?(P>0&&(m.lastNeed=P-2),P):--x<E||P===-2?0:(P=i(w[x]),P>=0?(P>0&&(P===2?P=0:m.lastNeed=P-3),P):0))}function s(m,w,E){if((w[0]&192)!==128)return m.lastNeed=0,"�";if(m.lastNeed>1&&w.length>1){if((w[1]&192)!==128)return m.lastNeed=1,"�";if(m.lastNeed>2&&w.length>2&&(w[2]&192)!==128)return m.lastNeed=2,"�"}}function l(m){var w=this.lastTotal-this.lastNeed,E=s(this,m);if(E!==void 0)return E;if(this.lastNeed<=m.length)return m.copy(this.lastChar,w,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,w,0,m.length),this.lastNeed-=m.length}function u(m,w){var E=a(this,m,w);if(!this.lastNeed)return m.toString("utf8",w);this.lastTotal=E;var x=m.length-(E-this.lastNeed);return m.copy(this.lastChar,0,x),m.toString("utf8",w,x)}function f(m){var w=m&&m.length?this.write(m):"";return this.lastNeed?w+"�":w}function d(m,w){if((m.length-w)%2===0){var E=m.toString("utf16le",w);if(E){var x=E.charCodeAt(E.length-1);if(x>=55296&&x<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1],E.slice(0,-1)}return E}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=m[m.length-1],m.toString("utf16le",w,m.length-1)}function p(m){var w=m&&m.length?this.write(m):"";if(this.lastNeed){var E=this.lastTotal-this.lastNeed;return w+this.lastChar.toString("utf16le",0,E)}return w}function h(m,w){var E=(m.length-w)%3;return E===0?m.toString("base64",w):(this.lastNeed=3-E,this.lastTotal=3,E===1?this.lastChar[0]=m[m.length-1]:(this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1]),m.toString("base64",w,m.length-E))}function v(m){var w=m&&m.length?this.write(m):"";return this.lastNeed?w+this.lastChar.toString("base64",0,3-this.lastNeed):w}function g(m){return m.toString(this.encoding)}function y(m){return m&&m.length?this.write(m):""}return Ju}var $0=Yn.codes.ERR_STREAM_PREMATURE_CLOSE;function BD(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];e.apply(this,n)}}}function RD(){}function UD(e){return e.setHeader&&typeof e.abort=="function"}function C0(e,t,r){if(typeof t=="function")return C0(e,null,t);t||(t={}),r=BD(r||RD);var n=t.readable||t.readable!==!1&&e.readable,o=t.writable||t.writable!==!1&&e.writable,i=function(){e.writable||s()},a=e._writableState&&e._writableState.finished,s=function(){o=!1,a=!0,n||r.call(e)},l=e._readableState&&e._readableState.endEmitted,u=function(){n=!1,l=!0,o||r.call(e)},f=function(v){r.call(e,v)},d=function(){var v;if(n&&!l)return(!e._readableState||!e._readableState.ended)&&(v=new $0),r.call(e,v);if(o&&!a)return(!e._writableState||!e._writableState.ended)&&(v=new $0),r.call(e,v)},p=function(){e.req.on("finish",s)};return UD(e)?(e.on("complete",s),e.on("abort",d),e.req?p():e.on("request",p)):o&&!e._writableState&&(e.on("end",i),e.on("close",i)),e.on("end",u),e.on("finish",s),t.error!==!1&&e.on("error",f),e.on("close",d),function(){e.removeListener("complete",s),e.removeListener("abort",d),e.removeListener("request",p),e.req&&e.req.removeListener("finish",s),e.removeListener("end",i),e.removeListener("close",i),e.removeListener("finish",s),e.removeListener("end",u),e.removeListener("error",f),e.removeListener("close",d)}}var Xu=C0,Zu,O0;function WD(){if(O0)return Zu;O0=1;var e;function t(m,w,E){return w in m?Object.defineProperty(m,w,{value:E,enumerable:!0,configurable:!0,writable:!0}):m[w]=E,m}var r=Xu,n=Symbol("lastResolve"),o=Symbol("lastReject"),i=Symbol("error"),a=Symbol("ended"),s=Symbol("lastPromise"),l=Symbol("handlePromise"),u=Symbol("stream");function f(m,w){return{value:m,done:w}}function d(m){var w=m[n];if(w!==null){var E=m[u].read();E!==null&&(m[s]=null,m[n]=null,m[o]=null,w(f(E,!1)))}}function p(m){process.nextTick(d,m)}function h(m,w){return function(E,x){m.then(function(){if(w[a]){E(f(void 0,!0));return}w[l](E,x)},x)}}var v=Object.getPrototypeOf(function(){}),g=Object.setPrototypeOf((e={get stream(){return this[u]},next:function(){var w=this,E=this[i];if(E!==null)return Promise.reject(E);if(this[a])return Promise.resolve(f(void 0,!0));if(this[u].destroyed)return new Promise(function(S,A){process.nextTick(function(){w[i]?A(w[i]):S(f(void 0,!0))})});var x=this[s],P;if(x)P=new Promise(h(x,this));else{var I=this[u].read();if(I!==null)return Promise.resolve(f(I,!1));P=new Promise(this[l])}return this[s]=P,P}},t(e,Symbol.asyncIterator,function(){return this}),t(e,"return",function(){var w=this;return new Promise(function(E,x){w[u].destroy(null,function(P){if(P){x(P);return}E(f(void 0,!0))})})}),e),v),y=function(w){var E,x=Object.create(g,(E={},t(E,u,{value:w,writable:!0}),t(E,n,{value:null,writable:!0}),t(E,o,{value:null,writable:!0}),t(E,i,{value:null,writable:!0}),t(E,a,{value:w._readableState.endEmitted,writable:!0}),t(E,l,{value:function(I,S){var A=x[u].read();A?(x[s]=null,x[n]=null,x[o]=null,I(f(A,!1))):(x[n]=I,x[o]=S)},writable:!0}),E));return x[s]=null,r(w,function(P){if(P&&P.code!=="ERR_STREAM_PREMATURE_CLOSE"){var I=x[o];I!==null&&(x[s]=null,x[n]=null,x[o]=null,I(P)),x[i]=P;return}var S=x[n];S!==null&&(x[s]=null,x[n]=null,x[o]=null,S(f(void 0,!0))),x[a]=!0}),w.on("readable",p.bind(null,x)),x};return Zu=y,Zu}var Qu,A0;function VD(){return A0||(A0=1,Qu=function(){throw new Error("Readable.from is not available in the browser")}),Qu}var ef,T0;function I0(){if(T0)return ef;T0=1,ef=k;var e;k.ReadableState=A,f0.EventEmitter;var t=function(T,Z){return T.listeners(Z).length},r=d0,n=Xt.Buffer,o=Ge.Uint8Array||function(){};function i(O){return n.from(O)}function a(O){return n.isBuffer(O)||O instanceof o}var s=p0,l;s&&s.debuglog?l=s.debuglog("stream"):l=function(){};var u=CD(),f=g0,d=y0,p=d.getHighWaterMark,h=Yn.codes,v=h.ERR_INVALID_ARG_TYPE,g=h.ERR_STREAM_PUSH_AFTER_EOF,y=h.ERR_METHOD_NOT_IMPLEMENTED,m=h.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,w,E,x;Mi(k,r);var P=f.errorOrDestroy,I=["error","close","destroy","pause","resume"];function S(O,T,Z){if(typeof O.prependListener=="function")return O.prependListener(T,Z);!O._events||!O._events[T]?O.on(T,Z):Array.isArray(O._events[T])?O._events[T].unshift(Z):O._events[T]=[Z,O._events[T]]}function A(O,T,Z){e=e||jo(),O=O||{},typeof Z!="boolean"&&(Z=T instanceof e),this.objectMode=!!O.objectMode,Z&&(this.objectMode=this.objectMode||!!O.readableObjectMode),this.highWaterMark=p(this,O,"readableHighWaterMark",Z),this.buffer=new u,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=O.emitClose!==!1,this.autoDestroy=!!O.autoDestroy,this.destroyed=!1,this.defaultEncoding=O.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,O.encoding&&(w||(w=S0().StringDecoder),this.decoder=new w(O.encoding),this.encoding=O.encoding)}function k(O){if(e=e||jo(),!(this instanceof k))return new k(O);var T=this instanceof e;this._readableState=new A(O,this,T),this.readable=!0,O&&(typeof O.read=="function"&&(this._read=O.read),typeof O.destroy=="function"&&(this._destroy=O.destroy)),r.call(this)}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(T){this._readableState&&(this._readableState.destroyed=T)}}),k.prototype.destroy=f.destroy,k.prototype._undestroy=f.undestroy,k.prototype._destroy=function(O,T){T(O)},k.prototype.push=function(O,T){var Z=this._readableState,ne;return Z.objectMode?ne=!0:typeof O=="string"&&(T=T||Z.defaultEncoding,T!==Z.encoding&&(O=n.from(O,T),T=""),ne=!0),j(this,O,T,!1,ne)},k.prototype.unshift=function(O){return j(this,O,null,!0,!1)};function j(O,T,Z,ne,pe){l("readableAddChunk",T);var me=O._readableState;if(T===null)me.reading=!1,te(O,me);else{var xe;if(pe||(xe=N(me,T)),xe)P(O,xe);else if(me.objectMode||T&&T.length>0)if(typeof T!="string"&&!me.objectMode&&Object.getPrototypeOf(T)!==n.prototype&&(T=i(T)),ne)me.endEmitted?P(O,new m):D(O,me,T,!0);else if(me.ended)P(O,new g);else{if(me.destroyed)return!1;me.reading=!1,me.decoder&&!Z?(T=me.decoder.write(T),me.objectMode||T.length!==0?D(O,me,T,!1):ae(O,me)):D(O,me,T,!1)}else ne||(me.reading=!1,ae(O,me))}return!me.ended&&(me.length<me.highWaterMark||me.length===0)}function D(O,T,Z,ne){T.flowing&&T.length===0&&!T.sync?(T.awaitDrain=0,O.emit("data",Z)):(T.length+=T.objectMode?1:Z.length,ne?T.buffer.unshift(Z):T.buffer.push(Z),T.needReadable&&oe(O)),ae(O,T)}function N(O,T){var Z;return!a(T)&&typeof T!="string"&&T!==void 0&&!O.objectMode&&(Z=new v("chunk",["string","Buffer","Uint8Array"],T)),Z}k.prototype.isPaused=function(){return this._readableState.flowing===!1},k.prototype.setEncoding=function(O){w||(w=S0().StringDecoder);var T=new w(O);this._readableState.decoder=T,this._readableState.encoding=this._readableState.decoder.encoding;for(var Z=this._readableState.buffer.head,ne="";Z!==null;)ne+=T.write(Z.data),Z=Z.next;return this._readableState.buffer.clear(),ne!==""&&this._readableState.buffer.push(ne),this._readableState.length=ne.length,this};var J=1073741824;function K(O){return O>=J?O=J:(O--,O|=O>>>1,O|=O>>>2,O|=O>>>4,O|=O>>>8,O|=O>>>16,O++),O}function Y(O,T){return O<=0||T.length===0&&T.ended?0:T.objectMode?1:O!==O?T.flowing&&T.length?T.buffer.head.data.length:T.length:(O>T.highWaterMark&&(T.highWaterMark=K(O)),O<=T.length?O:T.ended?T.length:(T.needReadable=!0,0))}k.prototype.read=function(O){l("read",O),O=parseInt(O,10);var T=this._readableState,Z=O;if(O!==0&&(T.emittedReadable=!1),O===0&&T.needReadable&&((T.highWaterMark!==0?T.length>=T.highWaterMark:T.length>0)||T.ended))return l("read: emitReadable",T.length,T.ended),T.length===0&&T.ended?M(this):oe(this),null;if(O=Y(O,T),O===0&&T.ended)return T.length===0&&M(this),null;var ne=T.needReadable;l("need readable",ne),(T.length===0||T.length-O<T.highWaterMark)&&(ne=!0,l("length less than watermark",ne)),T.ended||T.reading?(ne=!1,l("reading or ended",ne)):ne&&(l("do read"),T.reading=!0,T.sync=!0,T.length===0&&(T.needReadable=!0),this._read(T.highWaterMark),T.sync=!1,T.reading||(O=Y(Z,T)));var pe;return O>0?pe=z(O,T):pe=null,pe===null?(T.needReadable=T.length<=T.highWaterMark,O=0):(T.length-=O,T.awaitDrain=0),T.length===0&&(T.ended||(T.needReadable=!0),Z!==O&&T.ended&&M(this)),pe!==null&&this.emit("data",pe),pe};function te(O,T){if(l("onEofChunk"),!T.ended){if(T.decoder){var Z=T.decoder.end();Z&&Z.length&&(T.buffer.push(Z),T.length+=T.objectMode?1:Z.length)}T.ended=!0,T.sync?oe(O):(T.needReadable=!1,T.emittedReadable||(T.emittedReadable=!0,le(O)))}}function oe(O){var T=O._readableState;l("emitReadable",T.needReadable,T.emittedReadable),T.needReadable=!1,T.emittedReadable||(l("emitReadable",T.flowing),T.emittedReadable=!0,process.nextTick(le,O))}function le(O){var T=O._readableState;l("emitReadable_",T.destroyed,T.length,T.ended),!T.destroyed&&(T.length||T.ended)&&(O.emit("readable"),T.emittedReadable=!1),T.needReadable=!T.flowing&&!T.ended&&T.length<=T.highWaterMark,U(O)}function ae(O,T){T.readingMore||(T.readingMore=!0,process.nextTick(ve,O,T))}function ve(O,T){for(;!T.reading&&!T.ended&&(T.length<T.highWaterMark||T.flowing&&T.length===0);){var Z=T.length;if(l("maybeReadMore read 0"),O.read(0),Z===T.length)break}T.readingMore=!1}k.prototype._read=function(O){P(this,new y("_read()"))},k.prototype.pipe=function(O,T){var Z=this,ne=this._readableState;switch(ne.pipesCount){case 0:ne.pipes=O;break;case 1:ne.pipes=[ne.pipes,O];break;default:ne.pipes.push(O);break}ne.pipesCount+=1,l("pipe count=%d opts=%j",ne.pipesCount,T);var pe=(!T||T.end!==!1)&&O!==process.stdout&&O!==process.stderr,me=pe?Ee:De;ne.endEmitted?process.nextTick(me):Z.once("end",me),O.on("unpipe",xe);function xe(C,b){l("onunpipe"),C===Z&&b&&b.hasUnpiped===!1&&(b.hasUnpiped=!0,ft())}function Ee(){l("onend"),O.end()}var ie=ce(Z);O.on("drain",ie);var Ne=!1;function ft(){l("cleanup"),O.removeListener("close",mt),O.removeListener("finish",$e),O.removeListener("drain",ie),O.removeListener("error",Me),O.removeListener("unpipe",xe),Z.removeListener("end",Ee),Z.removeListener("end",De),Z.removeListener("data",Te),Ne=!0,ne.awaitDrain&&(!O._writableState||O._writableState.needDrain)&&ie()}Z.on("data",Te);function Te(C){l("ondata");var b=O.write(C);l("dest.write",b),b===!1&&((ne.pipesCount===1&&ne.pipes===O||ne.pipesCount>1&&G(ne.pipes,O)!==-1)&&!Ne&&(l("false write response, pause",ne.awaitDrain),ne.awaitDrain++),Z.pause())}function Me(C){l("onerror",C),De(),O.removeListener("error",Me),t(O,"error")===0&&P(O,C)}S(O,"error",Me);function mt(){O.removeListener("finish",$e),De()}O.once("close",mt);function $e(){l("onfinish"),O.removeListener("close",mt),De()}O.once("finish",$e);function De(){l("unpipe"),Z.unpipe(O)}return O.emit("pipe",Z),ne.flowing||(l("pipe resume"),Z.resume()),O};function ce(O){return function(){var Z=O._readableState;l("pipeOnDrain",Z.awaitDrain),Z.awaitDrain&&Z.awaitDrain--,Z.awaitDrain===0&&t(O,"data")&&(Z.flowing=!0,U(O))}}k.prototype.unpipe=function(O){var T=this._readableState,Z={hasUnpiped:!1};if(T.pipesCount===0)return this;if(T.pipesCount===1)return O&&O!==T.pipes?this:(O||(O=T.pipes),T.pipes=null,T.pipesCount=0,T.flowing=!1,O&&O.emit("unpipe",this,Z),this);if(!O){var ne=T.pipes,pe=T.pipesCount;T.pipes=null,T.pipesCount=0,T.flowing=!1;for(var me=0;me<pe;me++)ne[me].emit("unpipe",this,{hasUnpiped:!1});return this}var xe=G(T.pipes,O);return xe===-1?this:(T.pipes.splice(xe,1),T.pipesCount-=1,T.pipesCount===1&&(T.pipes=T.pipes[0]),O.emit("unpipe",this,Z),this)},k.prototype.on=function(O,T){var Z=r.prototype.on.call(this,O,T),ne=this._readableState;return O==="data"?(ne.readableListening=this.listenerCount("readable")>0,ne.flowing!==!1&&this.resume()):O==="readable"&&!ne.endEmitted&&!ne.readableListening&&(ne.readableListening=ne.needReadable=!0,ne.flowing=!1,ne.emittedReadable=!1,l("on readable",ne.length,ne.reading),ne.length?oe(this):ne.reading||process.nextTick(V,this)),Z},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(O,T){var Z=r.prototype.removeListener.call(this,O,T);return O==="readable"&&process.nextTick(q,this),Z},k.prototype.removeAllListeners=function(O){var T=r.prototype.removeAllListeners.apply(this,arguments);return(O==="readable"||O===void 0)&&process.nextTick(q,this),T};function q(O){var T=O._readableState;T.readableListening=O.listenerCount("readable")>0,T.resumeScheduled&&!T.paused?T.flowing=!0:O.listenerCount("data")>0&&O.resume()}function V(O){l("readable nexttick read 0"),O.read(0)}k.prototype.resume=function(){var O=this._readableState;return O.flowing||(l("resume"),O.flowing=!O.readableListening,re(this,O)),O.paused=!1,this};function re(O,T){T.resumeScheduled||(T.resumeScheduled=!0,process.nextTick(de,O,T))}function de(O,T){l("resume",T.reading),T.reading||O.read(0),T.resumeScheduled=!1,O.emit("resume"),U(O),T.flowing&&!T.reading&&O.read(0)}k.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function U(O){var T=O._readableState;for(l("flow",T.flowing);T.flowing&&O.read()!==null;);}k.prototype.wrap=function(O){var T=this,Z=this._readableState,ne=!1;O.on("end",function(){if(l("wrapped end"),Z.decoder&&!Z.ended){var xe=Z.decoder.end();xe&&xe.length&&T.push(xe)}T.push(null)}),O.on("data",function(xe){if(l("wrapped data"),Z.decoder&&(xe=Z.decoder.write(xe)),!(Z.objectMode&&xe==null)&&!(!Z.objectMode&&(!xe||!xe.length))){var Ee=T.push(xe);Ee||(ne=!0,O.pause())}});for(var pe in O)this[pe]===void 0&&typeof O[pe]=="function"&&(this[pe]=function(Ee){return function(){return O[Ee].apply(O,arguments)}}(pe));for(var me=0;me<I.length;me++)O.on(I[me],this.emit.bind(this,I[me]));return this._read=function(xe){l("wrapped _read",xe),ne&&(ne=!1,O.resume())},this},typeof Symbol=="function"&&(k.prototype[Symbol.asyncIterator]=function(){return E===void 0&&(E=WD()),E(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(T){this._readableState&&(this._readableState.flowing=T)}}),k._fromList=z,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function z(O,T){if(T.length===0)return null;var Z;return T.objectMode?Z=T.buffer.shift():!O||O>=T.length?(T.decoder?Z=T.buffer.join(""):T.buffer.length===1?Z=T.buffer.first():Z=T.buffer.concat(T.length),T.buffer.clear()):Z=T.buffer.consume(O,T.decoder),Z}function M(O){var T=O._readableState;l("endReadable",T.endEmitted),T.endEmitted||(T.ended=!0,process.nextTick(R,T,O))}function R(O,T){if(l("endReadableNT",O.endEmitted,O.length),!O.endEmitted&&O.length===0&&(O.endEmitted=!0,T.readable=!1,T.emit("end"),O.autoDestroy)){var Z=T._writableState;(!Z||Z.autoDestroy&&Z.finished)&&T.destroy()}}typeof Symbol=="function"&&(k.from=function(O,T){return x===void 0&&(x=VD()),x(k,O,T)});function G(O,T){for(var Z=0,ne=O.length;Z<ne;Z++)if(O[Z]===T)return Z;return-1}return ef}var P0=Qr,Rs=Yn.codes,HD=Rs.ERR_METHOD_NOT_IMPLEMENTED,zD=Rs.ERR_MULTIPLE_CALLBACK,GD=Rs.ERR_TRANSFORM_ALREADY_TRANSFORMING,KD=Rs.ERR_TRANSFORM_WITH_LENGTH_0,Us=jo();Mi(Qr,Us);function qD(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new zD);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}function Qr(e){if(!(this instanceof Qr))return new Qr(e);Us.call(this,e),this._transformState={afterTransform:qD.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(typeof e.transform=="function"&&(this._transform=e.transform),typeof e.flush=="function"&&(this._flush=e.flush)),this.on("prefinish",YD)}function YD(){var e=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(t,r){k0(e,t,r)}):k0(this,null,null)}Qr.prototype.push=function(e,t){return this._transformState.needTransform=!1,Us.prototype.push.call(this,e,t)},Qr.prototype._transform=function(e,t,r){r(new HD("_transform()"))},Qr.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var o=this._readableState;(n.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},Qr.prototype._read=function(e){var t=this._transformState;t.writechunk!==null&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},Qr.prototype._destroy=function(e,t){Us.prototype._destroy.call(this,e,function(r){t(r)})};function k0(e,t,r){if(t)return e.emit("error",t);if(r!=null&&e.push(r),e._writableState.length)throw new KD;if(e._transformState.transforming)throw new GD;return e.push(null)}var JD=Fi,N0=P0;Mi(Fi,N0);function Fi(e){if(!(this instanceof Fi))return new Fi(e);N0.call(this,e)}Fi.prototype._transform=function(e,t,r){r(null,e)};var tf;function XD(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var D0=Yn.codes,ZD=D0.ERR_MISSING_ARGS,QD=D0.ERR_STREAM_DESTROYED;function L0(e){if(e)throw e}function eL(e){return e.setHeader&&typeof e.abort=="function"}function tL(e,t,r,n){n=XD(n);var o=!1;e.on("close",function(){o=!0}),tf===void 0&&(tf=Xu),tf(e,{readable:t,writable:r},function(a){if(a)return n(a);o=!0,n()});var i=!1;return function(a){if(!o&&!i){if(i=!0,eL(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(a||new QD("pipe"))}}}function M0(e){e()}function rL(e,t){return e.pipe(t)}function nL(e){return!e.length||typeof e[e.length-1]!="function"?L0:e.pop()}function oL(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=nL(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new ZD("streams");var o,i=t.map(function(a,s){var l=s<t.length-1,u=s>0;return tL(a,l,u,function(f){o||(o=f),f&&i.forEach(M0),!l&&(i.forEach(M0),n(o))})});return t.reduce(rL)}var iL=oL;(function(e,t){t=e.exports=I0(),t.Stream=t,t.Readable=t,t.Writable=_0(),t.Duplex=jo(),t.Transform=P0,t.PassThrough=JD,t.finished=Xu,t.pipeline=iL})(e0,e0.exports);var aL=e=>new Promise((t,r)=>{e((n,o)=>{n?r(n):t(o)})}),F0=class extends Error{constructor(e,t){super(e?`Timeout [${e.toLocaleString()}ms]${t===void 0?"":`: ${t}`}`:"Timeout")}},sL=async(e,t,r)=>{let n;const o=r===void 0||typeof r=="string"?new F0(t,r):r,i=new Promise((s,l)=>{n=setTimeout(()=>{l(o)},t),lL(n)}),a=typeof e=="function"?aL(e):e;return await Promise.race([a,i]).finally(()=>{clearTimeout(n)})},lL=e=>{typeof e=="object"&&"unref"in e&&e.unref()},cL=class{constructor(e={autoReset:!1}){this._options=e,this.reset()}async wait({timeout:e}={}){return e?sL(this._promise,e,new F0(e)):this._promise}wake(e){return this._wake(e),this._options.autoReset?this.reset():this}reset(){return this._promise=new Promise(e=>{this._wake=e}),this}throw(e){return this._wake(Promise.reject(e)),this._options.autoReset?this.reset():this}},uL=class Er extends Ms{constructor(t,r){super(n=>this._subscribe(n)),this._value=r,this._observers=new Set,this._completed=new cL,this._handlers={next:n=>{this._value=n,this._observers.forEach(o=>o.next?.(n))},error:n=>{this._observers.forEach(o=>o.error?.(n))},complete:()=>{this._completed.wake(),this._observers.forEach(n=>n.complete?.())}},this._observable=typeof t=="function"?new Ms(t):t,this._observable.subscribe(this._handlers)}static from(t,r){if("emit"in t)return new Er(o=>{t.on(i=>{o.next(i)})},r);const n=Ms.from(t);return new Er(n,r)}static of(...t){return new Er(Ms.of(...t.slice(1)),t[0])}static empty(){return fL}get(){if(this._value===void 0)throw new Error("MulticastObservable is not initialized.");return this._value}async wait({timeout:t}={}){return await this._completed.wait({timeout:t}),this.get()}forEach(t){return this._observable.forEach(t)}map(t){return new Er(this._observable.map(t),this._value&&t(this._value))}filter(t){return new Er(this._observable.filter(t),this._value&&t(this._value)?this._value:void 0)}reduce(t,r){return new Er(r?this._observable.reduce(t,r):this._observable.reduce(t),r??this._value)}flatMap(t){return new Er(this._observable.flatMap(t),this._value&&t(this._value).get())}concat(...t){return new Er(this._observable.concat(...t),this._value)}losslessConcat(t,...r){const n=r.filter(i=>i instanceof Er),o=t(this._value,n.map(i=>i.get()));return new Er(this._observable.concat(...r),o)}_subscribe(t){return this._observers.has(t)||this._observers.add(t),this._value!==void 0&&t.next?.(this._value),()=>{this._observers.delete(t)}}},fL=uL.of(null),j0=typeof process<"u"&&!!process.env.DX_TRACK_LEAKS,B0=new Set,dL=()=>{if(j0){console.log(`Leaked resources ${B0.size}:`);for(const e of B0)console.log(`- ${e.name} at`),console.log(e.openStack.getStack(1)),console.log()}};j0&&(global.dxDumpLeaks=dL);var R0="/home/runner/work/dxos/dxos/packages/sdk/react-client/src/invitations/useInvitationStatus.ts",rf=e=>{const[t,r]=c.useReducer((a,s)=>(Qe("useInvitationStatus",{action:s},{F:R0,L:78,S:void 0,C:(l,u)=>l(...u)}),{...a,status:s.status,result:s.status===_e.State.SUCCESS?s.result:a.result,...s.status===_e.State.ERROR&&{error:s.error},...(s.status===_e.State.ERROR||s.status===_e.State.CANCELLED||s.status===_e.State.TIMEOUT)&&{haltedAt:typeof a.haltedAt>"u"?s.haltedAt:a.haltedAt},observable:s.status===_e.State.CONNECTING?s.observable??a.observable:a.observable}),null,a=>({status:_e.State.INIT,result:{spaceKey:null,identityKey:null,swarmKey:null},observable:e}));c.useEffect(()=>{const a=u=>{switch(u.state){case _e.State.CONNECTED:case _e.State.READY_FOR_AUTHENTICATION:case _e.State.AUTHENTICATING:{r({status:u.state});break}case _e.State.SUCCESS:{r({status:u.state,result:{spaceKey:u.spaceKey||null,identityKey:u.identityKey||null,swarmKey:u.swarmKey||null}});break}case _e.State.CANCELLED:case _e.State.TIMEOUT:{r({status:u.state,haltedAt:t.status});break}}},s=t.observable?.subscribe(a,u=>{r({status:_e.State.ERROR,error:u,haltedAt:t.status})}),l=t.observable?.get();return l&&a(l),()=>s?.unsubscribe()},[t.observable,t.status]);const n=c.useCallback(a=>{r({status:_e.State.CONNECTING,observable:a})},[]),o=c.useCallback(a=>(Qe("authenticating...",{authCode:a},{F:R0,L:161,S:void 0,C:(s,l)=>s(...l)}),t.observable.authenticate(a)),[t.observable]),i=c.useCallback(async()=>t.observable?.cancel(),[t.observable]);return c.useMemo(()=>{const a=t.observable?.get();return{status:t.status,haltedAt:t.haltedAt,result:t.result,error:t.error,cancel:i,connect:n,authenticate:o,id:a?.invitationId,invitationCode:a?Tn.InvitationEncoder.encode(a):void 0,authCode:a?.authCode,authMethod:a?.authMethod,type:a?.type}},[t,i,n,o])};const pL=new Map([[_e.State.ERROR,-3],[_e.State.TIMEOUT,-2],[_e.State.CANCELLED,-1],[_e.State.INIT,0],[_e.State.CONNECTING,1],[_e.State.CONNECTED,2],[_e.State.READY_FOR_AUTHENTICATION,3],[_e.State.AUTHENTICATING,4],[_e.State.SUCCESS,5]]);var U0=9007199254740991,hL="[object Arguments]",vL="[object Function]",gL="[object GeneratorFunction]",nf="[object Map]",mL="[object Object]",W0="[object Promise]",of="[object Set]",bL="[object String]",V0="[object WeakMap]",H0="[object DataView]",yL=/[\\^$.*+?()[\]{}|]/g,wL=/^\[object .+?Constructor\]$/,_L=/^(?:0|[1-9]\d*)$/,af="\\ud800-\\udfff",z0="\\u0300-\\u036f\\ufe20-\\ufe23",G0="\\u20d0-\\u20f0",K0="\\ufe0e\\ufe0f",EL="["+af+"]",sf="["+z0+G0+"]",lf="\\ud83c[\\udffb-\\udfff]",xL="(?:"+sf+"|"+lf+")",q0="[^"+af+"]",Y0="(?:\\ud83c[\\udde6-\\uddff]){2}",J0="[\\ud800-\\udbff][\\udc00-\\udfff]",X0="\\u200d",Z0=xL+"?",Q0="["+K0+"]?",SL="(?:"+X0+"(?:"+[q0,Y0,J0].join("|")+")"+Q0+Z0+")*",$L=Q0+Z0+SL,CL="(?:"+[q0+sf+"?",sf,Y0,J0,EL].join("|")+")",OL=RegExp(lf+"(?="+lf+")|"+CL+$L,"g"),AL=RegExp("["+X0+af+z0+G0+K0+"]"),TL=typeof Ge=="object"&&Ge&&Ge.Object===Object&&Ge,IL=typeof self=="object"&&self&&self.Object===Object&&self,Jn=TL||IL||Function("return this")();function PL(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}function kL(e){return e.split("")}function NL(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function DL(e,t){return PL(t,function(r){return e[r]})}function LL(e,t){return e?.[t]}function ML(e){return AL.test(e)}function FL(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function jL(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}function BL(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function RL(e,t){return function(r){return e(t(r))}}function UL(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}function WL(e){return ML(e)?VL(e):kL(e)}function VL(e){return e.match(OL)||[]}var HL=Function.prototype,Ws=Object.prototype,cf=Jn["__core-js_shared__"],ey=function(){var e=/[^.]+$/.exec(cf&&cf.keys&&cf.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),ty=HL.toString,Vs=Ws.hasOwnProperty,ji=Ws.toString,zL=RegExp("^"+ty.call(Vs).replace(yL,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ry=Jn.Symbol,uf=ry?ry.iterator:void 0,GL=Ws.propertyIsEnumerable,KL=RL(Object.keys,Object),ff=Bi(Jn,"DataView"),df=Bi(Jn,"Map"),pf=Bi(Jn,"Promise"),hf=Bi(Jn,"Set"),vf=Bi(Jn,"WeakMap"),qL=Zn(ff),YL=Zn(df),JL=Zn(pf),XL=Zn(hf),ZL=Zn(vf);function QL(e,t){var r=ny(e)||s7(e)?NL(e.length,String):[],n=r.length,o=!!n;for(var i in e)(t||Vs.call(e,i))&&!(o&&(i=="length"||o7(i,n)))&&r.push(i);return r}function e7(e){return ji.call(e)}function t7(e){if(!iy(e)||i7(e))return!1;var t=oy(e)||FL(e)?zL:wL;return t.test(Zn(e))}function r7(e){if(!a7(e))return KL(e);var t=[];for(var r in Object(e))Vs.call(e,r)&&r!="constructor"&&t.push(r);return t}function n7(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}function Bi(e,t){var r=LL(e,t);return t7(r)?r:void 0}var Xn=e7;(ff&&Xn(new ff(new ArrayBuffer(1)))!=H0||df&&Xn(new df)!=nf||pf&&Xn(pf.resolve())!=W0||hf&&Xn(new hf)!=of||vf&&Xn(new vf)!=V0)&&(Xn=function(e){var t=ji.call(e),r=t==mL?e.constructor:void 0,n=r?Zn(r):void 0;if(n)switch(n){case qL:return H0;case YL:return nf;case JL:return W0;case XL:return of;case ZL:return V0}return t});function o7(e,t){return t=t??U0,!!t&&(typeof e=="number"||_L.test(e))&&e>-1&&e%1==0&&e<t}function i7(e){return!!ey&&ey in e}function a7(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Ws;return e===r}function Zn(e){if(e!=null){try{return ty.call(e)}catch{}try{return e+""}catch{}}return""}function s7(e){return l7(e)&&Vs.call(e,"callee")&&(!GL.call(e,"callee")||ji.call(e)==hL)}var ny=Array.isArray;function gf(e){return e!=null&&c7(e.length)&&!oy(e)}function l7(e){return ay(e)&&gf(e)}function oy(e){var t=iy(e)?ji.call(e):"";return t==vL||t==gL}function c7(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=U0}function iy(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function ay(e){return!!e&&typeof e=="object"}function u7(e){return typeof e=="string"||!ny(e)&&ay(e)&&ji.call(e)==bL}function f7(e){if(!e)return[];if(gf(e))return u7(e)?WL(e):n7(e);if(uf&&e[uf])return jL(e[uf]());var t=Xn(e),r=t==nf?BL:t==of?UL:p7;return r(e)}function d7(e){return gf(e)?QL(e):r7(e)}function p7(e){return e?DL(e,d7(e)):[]}var h7=f7;const sy=In(h7)("👹👻👽🤖🎃🦾🦿🦷👣👁️🧶👑🐒🦆🦉🐴🦄🐝🦋🐞🪲🐢🦎🦕🦑🦀🐠🐬🐋🦭🐅🐆🦓🦍🦧🐘🐫🦒🦘🦬🐖🐏🦌🐕🐈🐓🦚🦜🦢🦩🦦🐁🐿️🌵🌲🌳🪵🌱🍁🪺🍄🐚🪸🪨🌾🌷🌻☀️🌙🪐⭐️⚡️☄️🔥🌈☁️💧⛱️🌊🍎🍋🍉🍇🫐🍈🍒🍑🥭🍍🥥🥝🥑🌶️🌽🥕🍬🥜🫖☕️🍵🧊🧂🏔️⚓️🛟🏝️🛶🚀🛰️⛲️🏰🚲⛺️🎙️🧲⚙️🔩🔮🔭🔬🧬🌡️🧺🛎️🔑🪑🧸🎈🎀🎊♻️🎵"),mf=e=>sy[parseInt(e,16)%sy.length],ly=e=>{const{code:t,large:r,classNames:n}=e,o=t?.length??0,i=t?.slice(0,o/2),a=t?.slice(o/2),s=()=>{navigator.clipboard.writeText(t??"")};return c.createElement("span",{className:ue(r?"text-6xl":"text-2xl","font-mono pli-2.5 flex gap-1.5 rounded cursor-pointer",n),onClick:s},c.createElement("span",null,i),c.createElement("span",null,a))},v7=e=>{const{invitation:t}=e,r=rf(t);return c.createElement(m7,{...e,invitationStatus:r})},Ri={size:10,variant:"circle"},g7=({animation:e,status:t})=>{const{tx:r}=Oe();return c.createElement(c.Fragment,null,c.createElement("span",{role:"none",className:ue("absolute inline-start-1 inline-end-auto opacity-20",Ke(Ri.size))},c.createElement("span",{role:"none",className:r("avatar.ring","avatar__ring",{...Ri,status:t,animation:e}),style:{animationDelay:"400ms"}})),c.createElement("span",{role:"none",className:ue("absolute inline-start-2 inline-end-auto opacity-50",Ke(Ri.size))},c.createElement("span",{role:"none",className:r("avatar.ring","avatar__ring",{...Ri,status:t,animation:e}),style:{animationDelay:"200ms"}})))},m7=({invitation:e,invitationStatus:t,send:r,onClickRemove:n,createInvitationUrl:o})=>{const{t:i}=it("os"),{cancel:a,status:s,invitationCode:l,authCode:u,type:f}=t,d=!([_e.State.ERROR,_e.State.TIMEOUT,_e.State.CANCELLED].indexOf(s)>=0),p=f===_e.Type.MULTIUSE||[_e.State.INIT,_e.State.CONNECTING,_e.State.CONNECTED].indexOf(s)>=0,h=s===_e.State.READY_FOR_AUTHENTICATION,v=c.useCallback(()=>n?.(e),[e,n]),g=l&&o(l),y=e?.get().invitationId,m=[_e.State.INIT,_e.State.CONNECTING,_e.State.CONNECTED,_e.State.READY_FOR_AUTHENTICATION,_e.State.AUTHENTICATING].includes(s)?"pulse":"none",w=[_e.State.ERROR,_e.State.TIMEOUT,_e.State.CANCELLED].includes(s),E=[_e.State.CONNECTED,_e.State.READY_FOR_AUTHENTICATION,_e.State.AUTHENTICATING,_e.State.SUCCESS].includes(s),x=w?"error":E?"active":"inactive";return c.createElement(kc.Root,{id:l,classNames:"flex gap-2 pis-3 pie-1 items-center relative"},c.createElement(kc.Heading,{classNames:"sr-only"},i(f===_e.Type.MULTIUSE?"invite many list item label":"invite one list item label")),f===_e.Type.MULTIUSE&&c.createElement(g7,{status:x,animation:m}),c.createElement(yr.Root,null,c.createElement(At.Root,{...Ri,animation:m,status:x},c.createElement(yr.Trigger,{asChild:!0},c.createElement(At.Frame,{tabIndex:0,classNames:[Fr,"relative rounded-full"]},c.createElement(At.Fallback,{text:mf(y)})))),c.createElement(yr.Portal,null,c.createElement(yr.Content,{side:"left",classNames:"z-[70]"},i(f===_e.Type.MULTIUSE?"invite many qr label":"invite one qr label"),c.createElement(yr.Arrow,null)))),p&&g?c.createElement(c.Fragment,null,c.createElement(br,{variant:"ghost",classNames:"grow justify-start font-medium",onClick:()=>r({type:"selectInvitation",invitation:e}),"data-testid":"show-qrcode"},c.createElement("span",null,i("open share panel label"))),c.createElement(Ek,{variant:"ghost",value:g})):h?c.createElement(ly,{code:u,classNames:"grow"}):s===_e.State.CONNECTING?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Connecting..."):s===_e.State.AUTHENTICATING?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Authenticating..."):s===_e.State.ERROR||s===_e.State.TIMEOUT?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Failed"):s===_e.State.CANCELLED?c.createElement("span",{className:"pli-2 grow text-neutral-500"},"Cancelled"):s===_e.State.SUCCESS?c.createElement("span",{className:"pli-2 grow truncate"},"User joined"):c.createElement("span",{className:"grow"}," "),d?c.createElement(br,{variant:"ghost",classNames:"flex gap-1",onClick:a,"data-testid":"cancel-invitation"},c.createElement("span",{className:"sr-only"},i("cancel invitation label")),c.createElement(Xe.X,{className:Ke(5),weight:"bold"})):c.createElement(br,{variant:"ghost",classNames:"flex gap-1",onClick:v,"data-testid":"remove-invitation"},c.createElement("span",{className:"sr-only"},i("remove invitation label")),c.createElement(Xe.X,{className:Ke(5),weight:"bold"})))},b7=({invitations:e,send:t,...r})=>{const{className:n,InvitationListItem:o=v7}=r;return c.createElement(Pc,{classNames:ue("flex flex-col gap-2",n)},e.map(i=>{const a=i.get().invitationId;return c.createElement(o,{key:a,send:t,invitation:i,...r})}))},bf=e=>{const t=e.variant??"default";return[e.disabled?"":t==="default"?"bg-neutral-25 hover:bg-white hover:text-primary-500 active:bg-neutral-25 dark:active:bg-neutral-800":t==="ghost"?"active:bg-neutral-125 dark:active:bg-neutral-800":t==="primary"?"active:bg-primary-700 dark:active:bg-primary-500":""]},y7={noopAction:{label:"No-op",description:"",icon:Xe.Placeholder,onClick:()=>{}}},w7=c.forwardRef((e,t)=>{const{classNames:r,variant:n,isFull:o=!0,actions:i=y7,activeAction:a,onChangeActiveAction:s,defaultActiveAction:l,...u}=e,[f=Object.keys(i)[0],d]=Gr({prop:a,onChange:s,defaultProp:l}),p=i[f]??{},{t:h}=it("os");return c.createElement("div",{role:"none",className:ue("mbs-2 flex gap-px items-center",o&&"is-full")},c.createElement(br,{...u,classNames:["bs-11 flex-1 min-is-0 flex gap-2 rounded-ie-none",r,...bf(e)],ref:t,variant:n,onClick:p.onClick},p.icon&&c.createElement(p.icon,null),c.createElement("span",null,p.label)),c.createElement(Un.Root,null,c.createElement(Un.Trigger,{asChild:!0},c.createElement(br,{classNames:["bs-11 flex-none rounded-is-none",r,...bf(e)]},c.createElement("span",{className:"sr-only"},h("invite options label")),c.createElement(Xe.CaretDown,null))),c.createElement(Un.Content,null,c.createElement(Un.Viewport,null,Object.entries(i).map(([v,g])=>c.createElement(Un.CheckboxItem,{key:v,"aria-labelledby":`${v}__label`,"aria-describedby":`${v}__description`,checked:f===v,onCheckedChange:y=>y&&d(v),classNames:"gap-2"},g.icon&&c.createElement(g.icon,{className:Ke(5)}),c.createElement("div",{role:"none",className:"flex-1 min-is-0 space-b-1"},c.createElement("p",{id:`${v}__label`},g.label),g.description&&c.createElement("p",{id:`${v}__description`,className:Ot},g.description)),c.createElement(Un.ItemIndicator,{asChild:!0},c.createElement(Xe.Check,null))))),c.createElement(Un.Arrow,null))))}),yt=c.forwardRef((e,t)=>{const{children:r,classNames:n,variant:o,isFull:i=!0,...a}=e;return c.createElement(br,{...a,classNames:[i&&"is-full","bs-11 flex gap-2 mbs-2",n,...bf(e)],ref:t,variant:o},r)}),nr=c.forwardRef(({classNames:e,children:t,...r},n)=>c.createElement("div",{...r,className:ue("flex flex-col gap-2 mbs-2",Array.isArray(t)&&t.length>1?"justify-between":"justify-center",e),ref:n},t)),cy=({onDone:e,...t})=>{const{t:r}=it("os");return c.createElement(br,{variant:"ghost",classNames:ue("plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),onClick:()=>e?.(),...t},c.createElement(Xe.X,{weight:"bold",className:Ke(4)}),c.createElement("span",{className:"sr-only"},r("exit label")))},yf=({text:e,className:t})=>c.createElement("div",{role:"none",className:ue(Ke(14),"rounded relative pointer-events-none",t)},c.createElement("svg",{viewBox:`0 0 ${14*4} ${14*4}`,width:14*4,height:14*4},c.createElement("text",{x:"50%",y:"50%",textAnchor:"middle",dominantBaseline:"middle",baselineShift:"-0.25rem",fontSize:"2.25rem"},e))),_7=e=>{const{children:t}=e;return c.createElement("div",{role:"none",className:"absolute inset-0 flex items-center justify-center"},t)},wf=c.forwardRef(({titleId:e,title:t,titleSrOnly:r,children:n,corner:o},i)=>c.createElement("div",{role:"none",className:"pbe-2 relative",ref:i},o,c.createElement("h1",{...!r&&{id:e},className:ue(Ot,"text-center mlb-2",r&&"invisible")},t),r&&c.createElement("span",{id:e},t),n)),uy=e=>{const{children:t}=e;return c.createElement("span",{className:ue(Ot,"text-center mli-6 whitespace-normal")},t)},Hs=({validationMessage:e,label:t,...r})=>c.createElement(Mr.Root,null,c.createElement(Mr.Label,null,t),c.createElement(Mr.TextInput,{...r,classNames:"plb-3 mbs-2 text-center"}),c.createElement(Mr.DescriptionAndValidation,null,e&&c.createElement(Mr.Validation,null,e))),Rr=c.forwardRef(({children:e,className:t,...r},n)=>c.createElement("h2",{...r,className:ue("font-normal text-sm mbe-4 mli-1 text-center",t),ref:n},e));var E7=typeof WeakRef<"u",fy=class{constructor(e){E7&&typeof e=="object"?this._weakRef=new WeakRef(e):this._instance=e}deref(){var e,t;let r;return this._weakRef?(r=(e=this._weakRef)==null?void 0:e.deref(),r||delete this._weakRef):(r=this._instance,(t=r?.isDisposed)!=null&&t.call(r)&&delete this._instance),r}},Ui="keyborg:focusin";function x7(e){const t=e.HTMLElement,r=t.prototype.focus;let n=!1;return t.prototype.focus=function(){n=!0},e.document.createElement("button").focus(),t.prototype.focus=r,n}var _f=!1;function Bo(e){const t=e.focus;t.__keyborgNativeFocus?t.__keyborgNativeFocus.call(e):e.focus()}function S7(e){const t=e;_f||(_f=x7(t));const r=t.HTMLElement.prototype.focus;if(r.__keyborgNativeFocus)return;t.HTMLElement.prototype.focus=a;const n=s=>{const l=s.relatedTarget,u=s.currentTarget;u.contains(l)||(u.removeEventListener("focusin",o,!0),u.removeEventListener("focusout",n,!0))},o=s=>{var l;const u=s.target;if(!u)return;if(u.shadowRoot){u.shadowRoot.addEventListener("focusin",o,!0),u.shadowRoot.addEventListener("focusout",n,!0);return}const f={relatedTarget:s.relatedTarget||void 0},d=new CustomEvent(Ui,{cancelable:!0,bubbles:!0,composed:!0,detail:f});d.details=f,(_f||i.lastFocusedProgrammatically)&&(f.isFocusedProgrammatically=u===((l=i.lastFocusedProgrammatically)==null?void 0:l.deref()),i.lastFocusedProgrammatically=void 0),u.dispatchEvent(d)},i=t.__keyborgData={focusInHandler:o};t.document.addEventListener("focusin",t.__keyborgData.focusInHandler,!0);function a(){const s=t.__keyborgData;return s&&(s.lastFocusedProgrammatically=new fy(this)),r.apply(this,arguments)}a.__keyborgNativeFocus=r}function $7(e){const t=e,r=t.HTMLElement.prototype,n=r.focus.__keyborgNativeFocus,o=t.__keyborgData;o&&(t.document.removeEventListener("focusin",o.focusInHandler,!0),delete t.__keyborgData),n&&(r.focus=n)}var C7=500,dy=0,O7=class{constructor(){this.__keyborgCoreRefs={},this._isNavigatingWithKeyboard=!1}add(e){const t=e.id;t in this.__keyborgCoreRefs||(this.__keyborgCoreRefs[t]=new fy(e))}remove(e){delete this.__keyborgCoreRefs[e],Object.keys(this.__keyborgCoreRefs).length===0&&(this._isNavigatingWithKeyboard=!1)}setVal(e){if(this._isNavigatingWithKeyboard!==e){this._isNavigatingWithKeyboard=e;for(const t of Object.keys(this.__keyborgCoreRefs)){const n=this.__keyborgCoreRefs[t].deref();n?n.update(e):this.remove(t)}}}getVal(){return this._isNavigatingWithKeyboard}},Ur=new O7,A7=class{constructor(e,t){this._onFocusIn=n=>{if(this._isMouseUsedTimer||Ur.getVal())return;const o=n.detail;o.relatedTarget&&(o.isFocusedProgrammatically||o.isFocusedProgrammatically===void 0||Ur.setVal(!0))},this._onMouseDown=n=>{if(n.buttons===0||n.clientX===0&&n.clientY===0&&n.screenX===0&&n.screenY===0)return;const o=this._win;o&&(this._isMouseUsedTimer&&o.clearTimeout(this._isMouseUsedTimer),this._isMouseUsedTimer=o.setTimeout(()=>{delete this._isMouseUsedTimer},1e3)),Ur.setVal(!1)},this._onKeyDown=n=>{var o,i;const a=Ur.getVal(),s=n.keyCode,l=this._triggerKeys;if(!a&&(!l||l.has(s))){const u=(o=this._win)==null?void 0:o.document.activeElement;if(u&&(u.tagName==="INPUT"||u.tagName==="TEXTAREA"||u.contentEditable==="true"))return;Ur.setVal(!0)}else a&&((i=this._dismissKeys)!=null&&i.has(s))&&this._scheduleDismiss()},this.id="c"+ ++dy,this._win=e;const r=e.document;if(t){const n=t.triggerKeys,o=t.dismissKeys;n?.length&&(this._triggerKeys=new Set(n)),o?.length&&(this._dismissKeys=new Set(o))}r.addEventListener(Ui,this._onFocusIn,!0),r.addEventListener("mousedown",this._onMouseDown,!0),e.addEventListener("keydown",this._onKeyDown,!0),S7(e),Ur.add(this)}dispose(){const e=this._win;if(e){this._isMouseUsedTimer&&(e.clearTimeout(this._isMouseUsedTimer),this._isMouseUsedTimer=void 0),this._dismissTimer&&(e.clearTimeout(this._dismissTimer),this._dismissTimer=void 0),$7(e);const t=e.document;t.removeEventListener(Ui,this._onFocusIn,!0),t.removeEventListener("mousedown",this._onMouseDown,!0),e.removeEventListener("keydown",this._onKeyDown,!0),delete this._win,Ur.remove(this.id)}}isDisposed(){return!!this._win}update(e){var t,r;const n=(r=(t=this._win)==null?void 0:t.__keyborg)==null?void 0:r.refs;if(n)for(const o of Object.keys(n))Ef.update(n[o],e)}_scheduleDismiss(){const e=this._win;if(e){this._dismissTimer&&(e.clearTimeout(this._dismissTimer),this._dismissTimer=void 0);const t=e.document.activeElement;this._dismissTimer=e.setTimeout(()=>{this._dismissTimer=void 0;const r=e.document.activeElement;t&&r&&t===r&&Ur.setVal(!1)},C7)}}},Ef=class N1{constructor(t,r){this._cb=[],this._id="k"+ ++dy,this._win=t;const n=t.__keyborg;n?(this._core=n.core,n.refs[this._id]=this):(this._core=new A7(t,r),t.__keyborg={core:this._core,refs:{[this._id]:this}})}static create(t,r){return new N1(t,r)}static dispose(t){t.dispose()}static update(t,r){t._cb.forEach(n=>n(r))}dispose(){var t;const r=(t=this._win)==null?void 0:t.__keyborg;r?.refs[this._id]?(delete r.refs[this._id],Object.keys(r.refs).length===0&&(r.core.dispose(),delete this._win.__keyborg)):process.env.NODE_ENV!=="production"&&console.error(`Keyborg instance ${this._id} is being disposed incorrectly.`),this._cb=[],delete this._core,delete this._win}isNavigatingWithKeyboard(){return Ur.getVal()}subscribe(t){this._cb.push(t)}unsubscribe(t){const r=this._cb.indexOf(t);r>=0&&this._cb.splice(r,1)}setVal(t){Ur.setVal(t)}};function T7(e,t){return Ef.create(e,t)}function I7(e){Ef.dispose(e)}/*!
|
|
113
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
114
|
+
* Licensed under the MIT License.
|
|
115
|
+
*//*!
|
|
116
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
117
|
+
* Licensed under the MIT License.
|
|
118
|
+
*/const wn="data-tabster",py="data-tabster-dummy",P7="tabster:focusin",k7="tabster:focusout",N7="tabster:movefocus",hy=["a[href]","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","*[tabindex]","*[contenteditable]"].join(", "),D7={Auto:0,Inside:1,Outside:2};/*!
|
|
119
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
120
|
+
* Licensed under the MIT License.
|
|
121
|
+
*/function Qn(e,t){var r;return(r=e.storageEntry(t))===null||r===void 0?void 0:r.tabster}function vy(e,t,r){var n,o;const i=r||e._noop?void 0:t.getAttribute(wn);let a=e.storageEntry(t),s;if(i)if(i!==((n=a?.attr)===null||n===void 0?void 0:n.string))try{const d=JSON.parse(i);if(typeof d!="object")throw new Error(`Value is not a JSON object, got '${i}'.`);s={string:i,object:d}}catch(d){process.env.NODE_ENV==="development"&&console.error(`data-tabster attribute error: ${d}`,t)}else return;else if(!a)return;a||(a=e.storageEntry(t,!0)),a.tabster||(a.tabster={});const l=a.tabster||{},u=((o=a.attr)===null||o===void 0?void 0:o.object)||{},f=s?.object||{};for(const d of Object.keys(u))if(!f[d]){if(d==="root"){const p=l[d];p&&e.root.onRoot(p,!0)}switch(d){case"deloser":case"root":case"groupper":case"modalizer":case"restorer":case"mover":const p=l[d];p&&(p.dispose(),delete l[d]);break;case"observed":delete l[d],e.observedElement&&e.observedElement.onObservedElementUpdate(t);break;case"focusable":case"outline":case"uncontrolled":case"sys":delete l[d];break}}for(const d of Object.keys(f)){const p=f.sys;switch(d){case"deloser":l.deloser?l.deloser.setProps(f.deloser):e.deloser?l.deloser=e.deloser.createDeloser(t,f.deloser):process.env.NODE_ENV==="development"&&console.error("Deloser API used before initialization, please call `getDeloser()`");break;case"root":l.root?l.root.setProps(f.root):l.root=e.root.createRoot(t,f.root,p),e.root.onRoot(l.root);break;case"modalizer":l.modalizer?l.modalizer.setProps(f.modalizer):e.modalizer?l.modalizer=e.modalizer.createModalizer(t,f.modalizer,p):process.env.NODE_ENV==="development"&&console.error("Modalizer API used before initialization, please call `getModalizer()`");break;case"restorer":l.restorer?l.restorer.setProps(f.restorer):e.restorer?f.restorer&&(l.restorer=e.restorer.createRestorer(t,f.restorer)):process.env.NODE_ENV==="development"&&console.error("Restorer API used before initialization, please call `getRestorer()`");break;case"focusable":l.focusable=f.focusable;break;case"groupper":l.groupper?l.groupper.setProps(f.groupper):e.groupper?l.groupper=e.groupper.createGroupper(t,f.groupper,p):process.env.NODE_ENV==="development"&&console.error("Groupper API used before initialization, please call `getGroupper()`");break;case"mover":l.mover?l.mover.setProps(f.mover):e.mover?l.mover=e.mover.createMover(t,f.mover,p):process.env.NODE_ENV==="development"&&console.error("Mover API used before initialization, please call `getMover()`");break;case"observed":e.observedElement?(l.observed=f.observed,e.observedElement.onObservedElementUpdate(t)):process.env.NODE_ENV==="development"&&console.error("ObservedElement API used before initialization, please call `getObservedElement()`");break;case"uncontrolled":l.uncontrolled=f.uncontrolled;break;case"outline":e.outline?l.outline=f.outline:process.env.NODE_ENV==="development"&&console.error("Outline API used before initialization, please call `getOutline()`");break;case"sys":l.sys=f.sys;break;default:console.error(`Unknown key '${d}' in data-tabster attribute value.`)}}s?a.attr=s:(Object.keys(l).length===0&&(delete a.tabster,delete a.attr),e.storageEntry(t,!1))}/*!
|
|
122
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
123
|
+
* Licensed under the MIT License.
|
|
124
|
+
*/function L7(e){const t=e();try{if(t.EventTarget)return new t.EventTarget}catch(r){if(!(r instanceof TypeError))throw r}return t.document.createElement("div")}/*!
|
|
125
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
126
|
+
* Licensed under the MIT License.
|
|
127
|
+
*/let xf,M7=0;try{document.createTreeWalker(document,NodeFilter.SHOW_ELEMENT),xf=!1}catch{xf=!0}const Sf=100;function eo(e){const t=e();let r=t.__tabsterInstanceContext;return r||(r={elementByUId:{},basics:{Promise:t.Promise||void 0,WeakRef:t.WeakRef||void 0},containerBoundingRectCache:{},lastContainerBoundingRectCacheId:0,fakeWeakRefs:[],fakeWeakRefsStarted:!1},t.__tabsterInstanceContext=r),r}function F7(e){const t=e.__tabsterInstanceContext;t&&(t.elementByUId={},delete t.WeakRef,t.containerBoundingRectCache={},t.containerBoundingRectCacheTimer&&e.clearTimeout(t.containerBoundingRectCacheTimer),t.fakeWeakRefsTimer&&e.clearTimeout(t.fakeWeakRefsTimer),t.fakeWeakRefs=[],delete e.__tabsterInstanceContext)}function j7(e){const t=e.__tabsterInstanceContext;return new(t?.basics.WeakMap||WeakMap)}function B7(e){return!!e.querySelector(hy)}class gy{constructor(t){this._target=t}deref(){return this._target}static cleanup(t,r){return t._target?r||!$f(t._target.ownerDocument,t._target)?(delete t._target,!0):!1:!0}}class _n{constructor(t,r,n){const o=eo(t);let i;o.WeakRef?i=new o.WeakRef(r):(i=new gy(r),o.fakeWeakRefs.push(i)),this._ref=i,this._data=n}get(){const t=this._ref;let r;return t&&(r=t.deref(),r||delete this._ref),r}getData(){return this._data}}function my(e,t){const r=eo(e);r.fakeWeakRefs=r.fakeWeakRefs.filter(n=>!gy.cleanup(n,t))}function by(e){const t=eo(e);t.fakeWeakRefsStarted||(t.fakeWeakRefsStarted=!0,t.WeakRef=z7(t)),t.fakeWeakRefsTimer||(t.fakeWeakRefsTimer=e().setTimeout(()=>{t.fakeWeakRefsTimer=void 0,my(e),by(e)},2*60*1e3))}function R7(e){const t=eo(e);t.fakeWeakRefsStarted=!1,t.fakeWeakRefsTimer&&(e().clearTimeout(t.fakeWeakRefsTimer),t.fakeWeakRefsTimer=void 0,t.fakeWeakRefs=[])}function yy(e,t,r){if(t.nodeType!==Node.ELEMENT_NODE)return;const n=xf?r:{acceptNode:r};return e.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,n,!1)}function U7(e){e.__shouldIgnoreFocus=!0}function wy(e){return!!e.__shouldIgnoreFocus}function W7(e){const t=new Uint32Array(4);if(e.crypto&&e.crypto.getRandomValues)e.crypto.getRandomValues(t);else if(e.msCrypto&&e.msCrypto.getRandomValues)e.msCrypto.getRandomValues(t);else for(let n=0;n<t.length;n++)t[n]=4294967295*Math.random();const r=[];for(let n=0;n<t.length;n++)r.push(t[n].toString(36));return r.push("|"),r.push((++M7).toString(36)),r.push("|"),r.push(Date.now().toString(36)),r.join("")}function V7(e,t){const r=eo(e);let n=t.__tabsterElementUID;return n||(n=t.__tabsterElementUID=W7(e())),!r.elementByUId[n]&&$f(t.ownerDocument,t)&&(r.elementByUId[n]=new _n(e,t)),n}function _y(e,t){const r=eo(e);for(const n of Object.keys(r.elementByUId)){const o=r.elementByUId[n],i=o&&o.get();i&&t&&!t.contains(i)||delete r.elementByUId[n]}}function $f(e,t){var r;return!!(!((r=e?.body)===null||r===void 0)&&r.contains(t))}function H7(e,t){const r=e.matches||e.matchesSelector||e.msMatchesSelector||e.webkitMatchesSelector;return r&&r.call(e,t)}function z7(e){return e.basics.WeakRef}let G7=0;class K7{constructor(t,r,n){const o=t.getWindow;this._tabster=t,this._element=new _n(o,r),this._props={...n},this.id="i"+ ++G7}getElement(){return this._element.get()}getProps(){return this._props}setProps(t){this._props={...t}}}class zs{constructor(t,r,n,o,i){var a;this._focusIn=f=>{if(this._fixedTarget){const p=this._fixedTarget.get();p&&Bo(p);return}const d=this.input;if(this.onFocusIn&&d){const p=f.relatedTarget;this.onFocusIn(this,this._isBackward(!0,d,p),p)}},this._focusOut=f=>{if(this._fixedTarget)return;this.useDefaultAction=!1;const d=this.input;if(this.onFocusOut&&d){const p=f.relatedTarget;this.onFocusOut(this,this._isBackward(!1,d,p),p)}};const s=t(),l=s.document.createElement("i");l.tabIndex=0,l.setAttribute("role","none"),l.setAttribute(py,""),l.setAttribute("aria-hidden","true");const u=l.style;u.position="fixed",u.width=u.height="1px",u.opacity="0.001",u.zIndex="-1",u.setProperty("content-visibility","hidden"),U7(l),this.input=l,this.isFirst=n.isFirst,this.isOutside=r,this._isPhantom=(a=n.isPhantom)!==null&&a!==void 0?a:!1,this._fixedTarget=i,l.addEventListener("focusin",this._focusIn),l.addEventListener("focusout",this._focusOut),l.__tabsterDummyContainer=o,this._isPhantom&&(this._disposeTimer=s.setTimeout(()=>{delete this._disposeTimer,this.dispose()},0),this._clearDisposeTimeout=()=>{this._disposeTimer&&(s.clearTimeout(this._disposeTimer),delete this._disposeTimer),delete this._clearDisposeTimeout})}dispose(){var t;this._clearDisposeTimeout&&this._clearDisposeTimeout();const r=this.input;r&&(delete this._fixedTarget,delete this.onFocusIn,delete this.onFocusOut,delete this.input,r.removeEventListener("focusin",this._focusIn),r.removeEventListener("focusout",this._focusOut),delete r.__tabsterDummyContainer,(t=r.parentElement)===null||t===void 0||t.removeChild(r))}setTopLeft(t,r){var n;const o=(n=this.input)===null||n===void 0?void 0:n.style;o&&(o.top=`${t}px`,o.left=`${r}px`)}_isBackward(t,r,n){return t&&!n?!this.isFirst:!!(n&&r.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)}}const q7={Root:1,Modalizer:2,Mover:3,Groupper:4};class Cf{constructor(t,r,n,o,i,a){this._element=r,this._instance=new J7(t,r,this,n,o,i,a)}_setHandlers(t,r){this._onFocusIn=t,this._onFocusOut=r}moveOut(t){var r;(r=this._instance)===null||r===void 0||r.moveOut(t)}moveOutWithDefaultAction(t,r){var n;(n=this._instance)===null||n===void 0||n.moveOutWithDefaultAction(t,r)}getHandler(t){return t?this._onFocusIn:this._onFocusOut}setTabbable(t){var r;(r=this._instance)===null||r===void 0||r.setTabbable(this,t)}dispose(){this._instance&&(this._instance.dispose(this),delete this._instance),delete this._onFocusIn,delete this._onFocusOut}static moveWithPhantomDummy(t,r,n,o,i){var a;const l=new zs(t.getWindow,!0,{isPhantom:!0,isFirst:!0}).input;if(l){let u,f;if(r.tagName==="BODY")u=r,f=n&&o||!n&&!o?r.firstElementChild:null;else{n&&(!o||o&&!t.focusable.isFocusable(r,!1,!0,!0))?(u=r,f=o?r.firstElementChild:null):(u=r.parentElement,f=n&&o||!n&&!o?r:r.nextElementSibling);let d,p;do d=n&&o||!n&&!o?f?.previousElementSibling:f,p=(a=d?.__tabsterDummyContainer)===null||a===void 0?void 0:a.get(),p===r?f=n&&o||!n&&!o?d:d?.nextElementSibling:p=void 0;while(p)}u&&Vi({by:"root",owner:u,next:null,relatedEvent:i})&&(u.insertBefore(l,f),Bo(l))}}static addPhantomDummyWithTarget(t,r,n,o){const a=new zs(t.getWindow,!0,{isPhantom:!0,isFirst:!0},void 0,new _n(t.getWindow,o)).input;if(a){let s,l;B7(r)&&!n?(s=r,l=r.firstElementChild):(s=r.parentElement,l=n?r:r.nextElementSibling),s?.insertBefore(a,l)}}}function En(e,t){var r;const n={1:"Root",2:"Modalizer",3:"Mover",4:"Groupper"};(r=e.input)===null||r===void 0||r.setAttribute(py,[`isFirst=${e.isFirst}`,`isOutside=${e.isOutside}`,...t.map(o=>`(${n[o.priority]}, tabbable=${o.tabbable})`)].join(", "))}class Y7{constructor(t){this._updateQueue=new Set,this._lastUpdateQueueTime=0,this._changedParents=new WeakSet,this._dummyElements=[],this._dummyCallbacks=new WeakMap,this._domChanged=r=>{var n;this._changedParents.has(r)||(this._changedParents.add(r),!this._updateDummyInputsTimer&&(this._updateDummyInputsTimer=(n=this._win)===null||n===void 0?void 0:n.call(this).setTimeout(()=>{delete this._updateDummyInputsTimer;for(const o of this._dummyElements){const i=o.get();if(i){const a=this._dummyCallbacks.get(i);if(a){const s=i.parentElement;(!s||this._changedParents.has(s))&&a()}}}this._changedParents=new WeakSet},Sf)))},this._win=t}add(t,r){!this._dummyCallbacks.has(t)&&this._win&&(this._dummyElements.push(new _n(this._win,t)),this._dummyCallbacks.set(t,r),this.domChanged=this._domChanged)}remove(t){this._dummyElements=this._dummyElements.filter(r=>{const n=r.get();return n&&n!==t}),this._dummyCallbacks.delete(t),this._dummyElements.length===0&&delete this.domChanged}dispose(){var t;const r=(t=this._win)===null||t===void 0?void 0:t.call(this);this._updateTimer&&(r?.clearTimeout(this._updateTimer),delete this._updateTimer),this._updateDummyInputsTimer&&(r?.clearTimeout(this._updateDummyInputsTimer),delete this._updateDummyInputsTimer),this._changedParents=new WeakSet,this._dummyCallbacks=new WeakMap,this._dummyElements=[],this._updateQueue.clear(),delete this.domChanged,delete this._win}updatePositions(t){this._win&&(this._updateQueue.add(t),this._lastUpdateQueueTime=Date.now(),this._scheduledUpdatePositions())}_scheduledUpdatePositions(){var t;this._updateTimer||(this._updateTimer=(t=this._win)===null||t===void 0?void 0:t.call(this).setTimeout(()=>{if(delete this._updateTimer,this._lastUpdateQueueTime+Sf<=Date.now()){const r=new Map,n=[];for(const o of this._updateQueue)n.push(o(r));this._updateQueue.clear();for(const o of n)o();r.clear()}else this._scheduledUpdatePositions()},Sf))}}class J7{constructor(t,r,n,o,i,a,s){this._wrappers=[],this._isOutside=!1,this._transformElements=new Set,this._onFocusIn=(h,v,g)=>{this._onFocus(!0,h,v,g)},this._onFocusOut=(h,v,g)=>{this._onFocus(!1,h,v,g)},this.moveOut=h=>{var v;const g=this._firstDummy,y=this._lastDummy;if(g&&y){this._ensurePosition();const m=g.input,w=y.input,E=(v=this._element)===null||v===void 0?void 0:v.get();if(m&&w&&E){let x;h?(m.tabIndex=0,x=m):(w.tabIndex=0,x=w),x&&Bo(x)}}},this.moveOutWithDefaultAction=(h,v)=>{var g;const y=this._firstDummy,m=this._lastDummy;if(y&&m){this._ensurePosition();const w=y.input,E=m.input,x=(g=this._element)===null||g===void 0?void 0:g.get();if(w&&E&&x){let P;h?!y.isOutside&&this._tabster.focusable.isFocusable(x,!0,!0,!0)?P=x:(y.useDefaultAction=!0,w.tabIndex=0,P=w):(m.useDefaultAction=!0,E.tabIndex=0,P=E),P&&Vi({by:"root",owner:x,next:null,relatedEvent:v})&&Bo(P)}}},this.setTabbable=(h,v)=>{var g,y;for(const w of this._wrappers)if(w.manager===h){w.tabbable=v;break}const m=this._getCurrent();if(m){const w=m.tabbable?0:-1;let E=(g=this._firstDummy)===null||g===void 0?void 0:g.input;E&&(E.tabIndex=w),E=(y=this._lastDummy)===null||y===void 0?void 0:y.input,E&&(E.tabIndex=w)}process.env.NODE_ENV==="development"&&(this._firstDummy&&En(this._firstDummy,this._wrappers),this._lastDummy&&En(this._lastDummy,this._wrappers))},this._addDummyInputs=()=>{this._addTimer||(this._addTimer=this._getWindow().setTimeout(()=>{delete this._addTimer,this._ensurePosition(),process.env.NODE_ENV==="development"&&(this._firstDummy&&En(this._firstDummy,this._wrappers),this._lastDummy&&En(this._lastDummy,this._wrappers)),this._addTransformOffsets()},0))},this._addTransformOffsets=()=>{this._tabster._dummyObserver.updatePositions(this._computeTransformOffsets)},this._computeTransformOffsets=h=>{var v,g;const y=((v=this._firstDummy)===null||v===void 0?void 0:v.input)||((g=this._lastDummy)===null||g===void 0?void 0:g.input),m=this._transformElements,w=new Set;let E=0,x=0;const P=this._getWindow();for(let I=y;I&&I.nodeType===Node.ELEMENT_NODE;I=I.parentElement){let S=h.get(I);if(S===void 0){const A=P.getComputedStyle(I).transform;A&&A!=="none"&&(S={scrollTop:I.scrollTop,scrollLeft:I.scrollLeft}),h.set(I,S||null)}S&&(w.add(I),m.has(I)||I.addEventListener("scroll",this._addTransformOffsets),E+=S.scrollTop,x+=S.scrollLeft)}for(const I of m)w.has(I)||I.removeEventListener("scroll",this._addTransformOffsets);return this._transformElements=w,()=>{var I,S;(I=this._firstDummy)===null||I===void 0||I.setTopLeft(E,x),(S=this._lastDummy)===null||S===void 0||S.setTopLeft(E,x)}};const l=r.get();if(!l)throw new Error("No element");this._tabster=t,this._getWindow=t.getWindow,this._callForDefaultAction=s;const u=l.__tabsterDummy;if((u||this)._wrappers.push({manager:n,priority:o,tabbable:!0}),u)return process.env.NODE_ENV==="development"&&(this._firstDummy&&En(this._firstDummy,u._wrappers),this._lastDummy&&En(this._lastDummy,u._wrappers)),u;l.__tabsterDummy=this;const f=i?.dummyInputsPosition,d=l.tagName;this._isOutside=f?f===D7.Outside:(a||d==="UL"||d==="OL"||d==="TABLE")&&!(d==="LI"||d==="TD"||d==="TH"),this._firstDummy=new zs(this._getWindow,this._isOutside,{isFirst:!0},r),this._lastDummy=new zs(this._getWindow,this._isOutside,{isFirst:!1},r);const p=this._firstDummy.input;p&&t._dummyObserver.add(p,this._addDummyInputs),this._firstDummy.onFocusIn=this._onFocusIn,this._firstDummy.onFocusOut=this._onFocusOut,this._lastDummy.onFocusIn=this._onFocusIn,this._lastDummy.onFocusOut=this._onFocusOut,this._element=r,this._addDummyInputs()}dispose(t,r){var n,o,i,a;const s=this._wrappers=this._wrappers.filter(l=>l.manager!==t&&!r);if(process.env.NODE_ENV==="development"&&(this._firstDummy&&En(this._firstDummy,s),this._lastDummy&&En(this._lastDummy,s)),s.length===0){delete((n=this._element)===null||n===void 0?void 0:n.get()).__tabsterDummy;for(const f of this._transformElements)f.removeEventListener("scroll",this._addTransformOffsets);this._transformElements.clear();const l=this._getWindow();this._addTimer&&(l.clearTimeout(this._addTimer),delete this._addTimer);const u=(o=this._firstDummy)===null||o===void 0?void 0:o.input;u&&this._tabster._dummyObserver.remove(u),(i=this._firstDummy)===null||i===void 0||i.dispose(),(a=this._lastDummy)===null||a===void 0||a.dispose()}}_onFocus(t,r,n,o){var i;const a=this._getCurrent();a&&(!r.useDefaultAction||this._callForDefaultAction)&&((i=a.manager.getHandler(t))===null||i===void 0||i(r,n,o))}_getCurrent(){return this._wrappers.sort((t,r)=>t.tabbable!==r.tabbable?t.tabbable?-1:1:t.priority-r.priority),this._wrappers[0]}_ensurePosition(){var t,r,n;const o=(t=this._element)===null||t===void 0?void 0:t.get(),i=(r=this._firstDummy)===null||r===void 0?void 0:r.input,a=(n=this._lastDummy)===null||n===void 0?void 0:n.input;if(!(!o||!i||!a))if(this._isOutside){const s=o.parentElement;if(s){const l=o.nextElementSibling;l!==a&&s.insertBefore(a,l),o.previousElementSibling!==i&&s.insertBefore(i,o)}}else{o.lastElementChild!==a&&o.appendChild(a);const s=o.firstElementChild;s&&s!==i&&o.insertBefore(i,s)}}}function Ey(e){let t=null;for(let r=e.lastElementChild;r;r=r.lastElementChild)t=r;return t||void 0}function Wi(e,t,r){const n=document.createEvent("HTMLEvents");return n.initEvent(t,!0,!0),n.details=r,e.dispatchEvent(n),!n.defaultPrevented}function Vi(e){return Wi(e.owner,N7,e)}/*!
|
|
128
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
129
|
+
* Licensed under the MIT License.
|
|
130
|
+
*/function X7(e,t){const r=JSON.stringify(e);return t===!0?r:{[wn]:r}}function Z7(e,t){for(const r of Object.keys(t)){const n=t[r];n?e[r]=n:delete e[r]}}function Q7(e,t,r){let n;if(r){const o=e.getAttribute(wn);if(o)try{n=JSON.parse(o)}catch(i){process.env.NODE_ENV==="development"&&console.error(`data-tabster attribute error: ${i}`,e)}}n||(n={}),Z7(n,t),Object.keys(n).length>0?e.setAttribute(wn,X7(n,!0)):e.removeAttribute(wn)}/*!
|
|
131
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
132
|
+
* Licensed under the MIT License.
|
|
133
|
+
*/function xy(e,t,r){if(process.env.NODE_ENV==="development"){const n=e.get();n&&(t?n.style.removeProperty("--tabster-root"):n.style.setProperty("--tabster-root",r+","))}}class Sy extends Cf{constructor(t,r,n,o){super(t,r,q7.Root,o,void 0,!0),this._onDummyInputFocus=i=>{var a;if(i.useDefaultAction)this._setFocused(!1);else{this._tabster.keyboardNavigation.setNavigatingWithKeyboard(!0);const s=this._element.get();if(s){this._setFocused(!0);const l=this._tabster.focusedElement.getFirstOrLastTabbable(i.isFirst,{container:s,ignoreAccessibility:!0});if(l){Bo(l);return}}(a=i.input)===null||a===void 0||a.blur()}},this._setHandlers(this._onDummyInputFocus),this._tabster=t,this._setFocused=n}}class eM extends K7{constructor(t,r,n,o,i){super(t,r,o),this._isFocused=!1,this._setFocused=l=>{var u;if(this._setFocusedTimer&&(this._tabster.getWindow().clearTimeout(this._setFocusedTimer),delete this._setFocusedTimer),this._isFocused===l)return;const f=this._element.get();f&&(l?(this._isFocused=!0,(u=this._dummyManager)===null||u===void 0||u.setTabbable(!1),Wi(this._tabster.root.eventTarget,"focus",{element:f})):this._setFocusedTimer=this._tabster.getWindow().setTimeout(()=>{var d;delete this._setFocusedTimer,this._isFocused=!1,(d=this._dummyManager)===null||d===void 0||d.setTabbable(!0),Wi(this._tabster.root.eventTarget,"blur",{element:f})},0))},this._onFocusIn=l=>{const u=this._tabster.getParent,f=this._element.get();let d=l.target;do{if(d===f){this._setFocused(!0);return}d=d&&u(d)}while(d)},this._onFocusOut=()=>{this._setFocused(!1)},this._onDispose=n;const a=t.getWindow;this.uid=V7(a,r),this._sys=i,(t.controlTab||t.rootDummyInputs)&&this.addDummyInputs();const s=a();s.document.addEventListener("focusin",this._onFocusIn),s.document.addEventListener("focusout",this._onFocusOut),this._add()}addDummyInputs(){this._dummyManager||(this._dummyManager=new Sy(this._tabster,this._element,this._setFocused,this._sys))}dispose(){var t;this._onDispose(this);const r=this._tabster.getWindow();r.document.removeEventListener("focusin",this._onFocusIn),r.document.removeEventListener("focusout",this._onFocusOut),this._setFocusedTimer&&(r.clearTimeout(this._setFocusedTimer),delete this._setFocusedTimer),(t=this._dummyManager)===null||t===void 0||t.dispose(),this._remove()}moveOutWithDefaultAction(t,r){const n=this._dummyManager;if(n)n.moveOutWithDefaultAction(t,r);else{const o=this.getElement();o&&Sy.moveWithPhantomDummy(this._tabster,o,!0,t,r)}}_add(){process.env.NODE_ENV==="development"&&xy(this._element,!1,this.uid)}_remove(){process.env.NODE_ENV==="development"&&xy(this._element,!0)}}class Wr{constructor(t,r){this._autoRootWaiting=!1,this._roots={},this._forceDummy=!1,this.rootById={},this._autoRootCreate=()=>{var n;const o=this._win().document,i=o.body;if(i){this._autoRootUnwait(o);const a=this._autoRoot;if(a)return Q7(i,{root:a},!0),vy(this._tabster,i),(n=Qn(this._tabster,i))===null||n===void 0?void 0:n.root}else this._autoRootWaiting||(this._autoRootWaiting=!0,o.addEventListener("readystatechange",this._autoRootCreate))},this._onRootDispose=n=>{delete this._roots[n.id]},this._tabster=t,this._win=t.getWindow,this._autoRoot=r,this.eventTarget=L7(this._win),t.queueInit(()=>{this._autoRoot&&this._autoRootCreate()})}_autoRootUnwait(t){t.removeEventListener("readystatechange",this._autoRootCreate),this._autoRootWaiting=!1}dispose(){const t=this._win();this._autoRootUnwait(t.document),delete this._autoRoot,Object.keys(this._roots).forEach(r=>{this._roots[r]&&(this._roots[r].dispose(),delete this._roots[r])}),this.rootById={}}createRoot(t,r,n){process.env.NODE_ENV;const o=new eM(this._tabster,t,this._onRootDispose,r,n);return this._roots[o.id]=o,this._forceDummy&&o.addDummyInputs(),o}addDummyInputs(){this._forceDummy=!0;const t=this._roots;for(const r of Object.keys(t))t[r].addDummyInputs()}static getRootByUId(t,r){const n=t().__tabsterInstance;return n&&n.root.rootById[r]}static getTabsterContext(t,r,n){n===void 0&&(n={});var o,i,a,s;if(!r.ownerDocument)return;const{checkRtl:l,referenceElement:u}=n,f=t.getParent;t.drainInitQueue();let d,p,h,v,g=!1,y,m,w,E,x=u||r;const P={};for(;x&&(!d||l);){const S=Qn(t,x);if(l&&w===void 0){const N=x.dir;N&&(w=N.toLowerCase()==="rtl")}if(!S){x=f(x);continue}const A=x.tagName;(S.uncontrolled||A==="IFRAME"||A==="WEBVIEW")&&(E=x),!v&&(!((o=S.focusable)===null||o===void 0)&&o.excludeFromMover)&&!h&&(g=!0);const k=S.modalizer,j=S.groupper,D=S.mover;!p&&k&&(p=k),!h&&j&&(!p||k)&&(p?(!j.isActive()&&j.getProps().tabbability&&p.userId!==((i=t.modalizer)===null||i===void 0?void 0:i.activeId)&&(p=void 0,h=j),m=j):h=j),!v&&D&&(!p||k)&&(!j||x!==r)&&(v=D,y=!!h&&h!==j),S.root&&(d=S.root),!((a=S.focusable)===null||a===void 0)&&a.ignoreKeydown&&Object.assign(P,S.focusable.ignoreKeydown),x=f(x)}if(!d){const S=t.root;S._autoRoot&&!((s=r.ownerDocument)===null||s===void 0)&&s.body&&(d=S._autoRootCreate())}return h&&!v&&(y=!0),process.env.NODE_ENV==="development"&&!d&&(p||h||v)&&console.error("Tabster Root is required for Mover, Groupper and Modalizer to work."),d?{root:d,modalizer:p,groupper:h,mover:v,groupperBeforeMover:y,modalizerInGroupper:m,rtl:l?!!w:void 0,uncontrolled:E,excludedFromMover:g,ignoreKeydown:S=>!!P[S.key]}:void 0}static getRoot(t,r){var n;const o=t.getParent;for(let i=r;i;i=o(i)){const a=(n=Qn(t,i))===null||n===void 0?void 0:n.root;if(a)return a}}onRoot(t,r){r?delete this.rootById[t.uid]:this.rootById[t.uid]=t}}/*!
|
|
134
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
135
|
+
* Licensed under the MIT License.
|
|
136
|
+
*/class $y{constructor(){this._callbacks=[]}dispose(){this._callbacks=[],delete this._val}subscribe(t){const r=this._callbacks;r.indexOf(t)<0&&r.push(t)}subscribeFirst(t){const r=this._callbacks,n=r.indexOf(t);n>=0&&r.splice(n,1),r.unshift(t)}unsubscribe(t){const r=this._callbacks.indexOf(t);r>=0&&this._callbacks.splice(r,1)}setVal(t,r){this._val!==t&&(this._val=t,this._callCallbacks(t,r))}getVal(){return this._val}trigger(t,r){this._callCallbacks(t,r)}_callCallbacks(t,r){this._callbacks.forEach(n=>n(t,r))}}/*!
|
|
137
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
138
|
+
* Licensed under the MIT License.
|
|
139
|
+
*/class tM{constructor(t){this._tabster=t}dispose(){}getProps(t){const r=Qn(this._tabster,t);return r&&r.focusable||{}}isFocusable(t,r,n,o){return H7(t,hy)&&(r||t.tabIndex!==-1)?(n||this.isVisible(t))&&(o||this.isAccessible(t)):!1}isVisible(t){if(!t.ownerDocument||t.nodeType!==Node.ELEMENT_NODE||t.offsetParent===null&&t.ownerDocument.body!==t)return!1;const r=t.ownerDocument.defaultView;if(!r)return!1;const n=t.ownerDocument.body.getBoundingClientRect();return!(n.width===0&&n.height===0||r.getComputedStyle(t).visibility==="hidden")}isAccessible(t){var r;for(let n=t;n;n=n.parentElement){const o=Qn(this._tabster,n);if(this._isHidden(n)||!((r=o?.focusable)===null||r===void 0?void 0:r.ignoreAriaDisabled)&&this._isDisabled(n))return!1}return!0}_isDisabled(t){return t.hasAttribute("disabled")}_isHidden(t){var r;const n=t.getAttribute("aria-hidden");return!!(n&&n.toLowerCase()==="true"&&!(!((r=this._tabster.modalizer)===null||r===void 0)&&r.isAugmented(t)))}findFirst(t,r){return this.findElement({...t},r)}findLast(t,r){return this.findElement({isBackward:!0,...t},r)}findNext(t,r){return this.findElement({...t},r)}findPrev(t,r){return this.findElement({...t,isBackward:!0},r)}findDefault(t,r){return this.findElement({...t,acceptCondition:n=>this.isFocusable(n,t.includeProgrammaticallyFocusable)&&!!this.getProps(n).isDefault},r)||null}findAll(t){return this._findElements(!0,t)||[]}findElement(t,r){const n=this._findElements(!1,t,r);return n&&n[0]}_findElements(t,r,n){var o,i,a;const{container:s,currentElement:l=null,includeProgrammaticallyFocusable:u,useActiveModalizer:f,ignoreAccessibility:d,modalizerId:p,isBackward:h,onElement:v}=r;n||(n={});const g=[];let{acceptCondition:y}=r;const m=!!y;if(!s)return null;y||(y=P=>this.isFocusable(P,u,!1,d));const w={container:s,modalizerUserId:p===void 0&&f?(o=this._tabster.modalizer)===null||o===void 0?void 0:o.activeId:p||((a=(i=Wr.getTabsterContext(this._tabster,s))===null||i===void 0?void 0:i.modalizer)===null||a===void 0?void 0:a.userId),from:l||s,isBackward:h,acceptCondition:y,hasCustomCondition:m,includeProgrammaticallyFocusable:u,ignoreAccessibility:d,cachedGrouppers:{}},E=yy(s.ownerDocument,s,P=>this._acceptElement(P,w));if(!E)return null;const x=P=>{var I,S;const A=(I=w.foundElement)!==null&&I!==void 0?I:w.foundBackward;return A&&g.push(A),t?A&&(w.found=!1,delete w.foundElement,delete w.foundBackward,delete w.fromCtx,w.from=A,v&&!v(A))?!1:!!(A||P):(A&&n&&(n.uncontrolled=(S=Wr.getTabsterContext(this._tabster,A))===null||S===void 0?void 0:S.uncontrolled),!!(P&&!A))};if(l||(n.outOfDOMOrder=!0),l)E.currentNode=l;else if(h){const P=Ey(s);if(!P)return null;if(this._acceptElement(P,w)===NodeFilter.FILTER_ACCEPT&&!x(!0))return w.skippedFocusable&&(n.outOfDOMOrder=!0),g;E.currentNode=P}do h?E.previousNode():E.nextNode();while(x());return w.skippedFocusable&&(n.outOfDOMOrder=!0),g.length?g:null}_acceptElement(t,r){var n,o,i,a;if(r.found)return NodeFilter.FILTER_ACCEPT;const s=r.foundBackward;if(s&&(t===s||!s.contains(t)))return r.found=!0,r.foundElement=s,NodeFilter.FILTER_ACCEPT;const l=r.container;if(t===l)return NodeFilter.FILTER_SKIP;if(!l.contains(t)||t.__tabsterDummyContainer||!((n=r.rejectElementsFrom)===null||n===void 0)&&n.contains(t))return NodeFilter.FILTER_REJECT;const u=r.currentCtx=Wr.getTabsterContext(this._tabster,t);if(!u)return NodeFilter.FILTER_SKIP;if(wy(t))return this.isFocusable(t,void 0,!0,!0)&&(r.skippedFocusable=!0),NodeFilter.FILTER_SKIP;if(!r.hasCustomCondition&&(t.tagName==="IFRAME"||t.tagName==="WEBVIEW"))return((o=u.modalizer)===null||o===void 0?void 0:o.userId)===((i=this._tabster.modalizer)===null||i===void 0?void 0:i.activeId)?(r.found=!0,r.rejectElementsFrom=r.foundElement=t,NodeFilter.FILTER_ACCEPT):NodeFilter.FILTER_REJECT;if(!r.ignoreAccessibility&&!this.isAccessible(t))return this.isFocusable(t,!1,!0,!0)&&(r.skippedFocusable=!0),NodeFilter.FILTER_REJECT;let f,d=r.fromCtx;d||(d=r.fromCtx=Wr.getTabsterContext(this._tabster,r.from));const p=d?.mover;let h=u.groupper,v=u.mover;if(f=(a=this._tabster.modalizer)===null||a===void 0?void 0:a.acceptElement(t,r),f!==void 0&&(r.skippedFocusable=!0),f===void 0&&(h||v||p)){const g=h?.getElement(),y=p?.getElement();let m=v?.getElement();m&&y?.contains(m)&&l.contains(y)&&(!g||!v||y.contains(g))&&(v=p,m=y),g&&(g===l||!l.contains(g))&&(h=void 0),m&&!l.contains(m)&&(v=void 0),h&&v&&(m&&g&&!g.contains(m)?v=void 0:h=void 0),h&&(f=h.acceptElement(t,r)),v&&(f=v.acceptElement(t,r))}return f===void 0&&(f=r.acceptCondition(t)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP,f===NodeFilter.FILTER_SKIP&&this.isFocusable(t,!1,!0,!0)&&(r.skippedFocusable=!0)),f===NodeFilter.FILTER_ACCEPT&&!r.found&&(r.isBackward?(r.foundBackward=t,f=NodeFilter.FILTER_SKIP):(r.found=!0,r.foundElement=t)),f}}/*!
|
|
140
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
141
|
+
* Licensed under the MIT License.
|
|
142
|
+
*/const rM={Tab:9,Enter:13,Esc:27,Space:32,PageUp:33,PageDown:34,End:35,Home:36,Left:37,Up:38,Right:39,Down:40};/*!
|
|
143
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
144
|
+
* Licensed under the MIT License.
|
|
145
|
+
*/function nM(e,t){var r;const n=e.getParent;let o=t;do{const i=(r=Qn(e,o))===null||r===void 0?void 0:r.uncontrolled;if(i&&e.uncontrolled.isUncontrolledCompletely(o,!!i.completely))return o;o=n(o)}while(o)}class Pt extends $y{constructor(t,r){super(),this._init=()=>{const n=this._win(),o=n.document;o.addEventListener(Ui,this._onFocusIn,!0),o.addEventListener("focusout",this._onFocusOut,!0),n.addEventListener("keydown",this._onKeyDown,!0);const i=o.activeElement;i&&i!==o.body&&this._setFocusedElement(i),this.subscribe(this._onChanged)},this._onFocusIn=n=>{this._setFocusedElement(n.target,n.details.relatedTarget,n.details.isFocusedProgrammatically)},this._onFocusOut=n=>{this._setFocusedElement(void 0,n.relatedTarget)},this._validateFocusedElement=n=>{},this._onKeyDown=n=>{if(n.keyCode!==rM.Tab||n.ctrlKey)return;const o=this.getVal();if(!o||!o.ownerDocument||o.contentEditable==="true")return;const i=this._tabster,a=i.controlTab,s=Wr.getTabsterContext(i,o);if(!s||s.ignoreKeydown(n))return;const l=n.shiftKey,u=Pt.findNextTabbable(i,s,void 0,o,void 0,l,!0),f=s.root.getElement();if(!f)return;const d=u?.element,p=nM(i,o);if(d){const h=u.uncontrolled;if(s.uncontrolled||h?.contains(o)){if(!u.outOfDOMOrder&&h===s.uncontrolled||p&&!p.contains(d))return;Cf.addPhantomDummyWithTarget(i,o,l,d);return}if(h||d.tagName==="IFRAME"){Vi({by:"root",owner:f,next:d,relatedEvent:n})&&Cf.moveWithPhantomDummy(this._tabster,h??d,!1,l,n);return}(a||u?.outOfDOMOrder)&&Vi({by:"root",owner:f,next:d,relatedEvent:n})&&(n.preventDefault(),n.stopImmediatePropagation(),Bo(d))}else!p&&Vi({by:"root",owner:f,next:null,relatedEvent:n})&&s.root.moveOutWithDefaultAction(l,n)},this._onChanged=(n,o)=>{var i,a;if(n)Wi(n,P7,o);else{const s=(i=this._lastVal)===null||i===void 0?void 0:i.get();if(s){const l={...o},u=Wr.getTabsterContext(this._tabster,s),f=(a=u?.modalizer)===null||a===void 0?void 0:a.userId;f&&(l.modalizerId=f),Wi(s,k7,l)}}},this._tabster=t,this._win=r,t.queueInit(this._init)}dispose(){super.dispose();const t=this._win();t.document.removeEventListener(Ui,this._onFocusIn,!0),t.document.removeEventListener("focusout",this._onFocusOut,!0),t.removeEventListener("keydown",this._onKeyDown,!0),this.unsubscribe(this._onChanged),delete Pt._lastResetElement,delete this._nextVal,delete this._lastVal}static forgetMemorized(t,r){var n,o;let i=Pt._lastResetElement,a=i&&i.get();a&&r.contains(a)&&delete Pt._lastResetElement,a=(o=(n=t._nextVal)===null||n===void 0?void 0:n.element)===null||o===void 0?void 0:o.get(),a&&r.contains(a)&&delete t._nextVal,i=t._lastVal,a=i&&i.get(),a&&r.contains(a)&&delete t._lastVal}getFocusedElement(){return this.getVal()}getLastFocusedElement(){var t;let r=(t=this._lastVal)===null||t===void 0?void 0:t.get();return(!r||r&&!$f(r.ownerDocument,r))&&(this._lastVal=r=void 0),r}focus(t,r,n){return this._tabster.focusable.isFocusable(t,r,!1,n)?(t.focus(),!0):!1}focusDefault(t){const r=this._tabster.focusable.findDefault({container:t});return r?(this._tabster.focusedElement.focus(r),!0):!1}getFirstOrLastTabbable(t,r){var n;const{container:o,ignoreAccessibility:i}=r;let a;if(o){const s=Wr.getTabsterContext(this._tabster,o);s&&(a=(n=Pt.findNextTabbable(this._tabster,s,o,void 0,void 0,!t,i))===null||n===void 0?void 0:n.element)}return a&&!o?.contains(a)&&(a=void 0),a||void 0}_focusFirstOrLast(t,r){const n=this.getFirstOrLastTabbable(t,r);return n?(this.focus(n,!1,!0),!0):!1}focusFirst(t){return this._focusFirstOrLast(!0,t)}focusLast(t){return this._focusFirstOrLast(!1,t)}resetFocus(t){if(!this._tabster.focusable.isVisible(t))return!1;if(this._tabster.focusable.isFocusable(t,!0,!0,!0))this.focus(t);else{const r=t.getAttribute("tabindex"),n=t.getAttribute("aria-hidden");t.tabIndex=-1,t.setAttribute("aria-hidden","true"),Pt._lastResetElement=new _n(this._win,t),this.focus(t,!0,!0),this._setOrRemoveAttribute(t,"tabindex",r),this._setOrRemoveAttribute(t,"aria-hidden",n)}return!0}_setOrRemoveAttribute(t,r,n){n===null?t.removeAttribute(r):t.setAttribute(r,n)}_setFocusedElement(t,r,n){var o,i;if(this._tabster._noop)return;const a={relatedTarget:r};if(t){const l=(o=Pt._lastResetElement)===null||o===void 0?void 0:o.get();if(Pt._lastResetElement=void 0,l===t||wy(t))return;a.isFocusedProgrammatically=n;const u=Wr.getTabsterContext(this._tabster,t),f=(i=u?.modalizer)===null||i===void 0?void 0:i.userId;f&&(a.modalizerId=f)}const s=this._nextVal={element:t?new _n(this._win,t):void 0,details:a};t&&t!==this._val&&this._validateFocusedElement(t),this._nextVal===s&&this.setVal(t,a),this._nextVal=void 0}setVal(t,r){super.setVal(t,r),t&&(this._lastVal=new _n(this._win,t))}static findNextTabbable(t,r,n,o,i,a,s){const l=n||r.root.getElement();if(!l)return null;let u=null;const f=Pt._isTabbingTimer,d=t.getWindow();f&&d.clearTimeout(f),Pt.isTabbing=!0,Pt._isTabbingTimer=d.setTimeout(()=>{delete Pt._isTabbingTimer,Pt.isTabbing=!1},0);const p=r.modalizer,h=r.groupper,v=r.mover,g=y=>{var m;if(u=y.findNextTabbable(o,i,a,s),o&&!u?.element){const w=y!==p&&((m=y.getElement())===null||m===void 0?void 0:m.parentElement);if(w){const E=Wr.getTabsterContext(t,o,{referenceElement:w});if(E){const x=y.getElement(),P=a?x:x&&Ey(x)||x;P&&(u=Pt.findNextTabbable(t,E,n,P,w,a,s),u&&(u.outOfDOMOrder=!0))}}}};if(h&&v)g(r.groupperBeforeMover?h:v);else if(h)g(h);else if(v)g(v);else if(p)g(p);else{const y={container:l,currentElement:o,referenceElement:i,ignoreAccessibility:s,useActiveModalizer:!0},m={};u={element:t.focusable[a?"findPrev":"findNext"](y,m),outOfDOMOrder:m.outOfDOMOrder,uncontrolled:m.uncontrolled}}return u}}Pt.isTabbing=!1;/*!
|
|
146
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
147
|
+
* Licensed under the MIT License.
|
|
148
|
+
*/class oM extends $y{constructor(t){super(),this._onChange=r=>{this.setVal(r,void 0)},this._keyborg=T7(t()),this._keyborg.subscribe(this._onChange)}dispose(){super.dispose(),this._keyborg&&(this._keyborg.unsubscribe(this._onChange),I7(this._keyborg),delete this._keyborg)}setNavigatingWithKeyboard(t){var r;(r=this._keyborg)===null||r===void 0||r.setVal(t)}isNavigatingWithKeyboard(){var t;return!!(!((t=this._keyborg)===null||t===void 0)&&t.isNavigatingWithKeyboard())}}/*!
|
|
149
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
150
|
+
* Licensed under the MIT License.
|
|
151
|
+
*/function iM(e,t,r,n){if(typeof MutationObserver>"u")return()=>{};const o=t.getWindow;let i;const a=f=>{var d,p,h,v,g;for(const y of f){const m=y.target,w=y.removedNodes,E=y.addedNodes;if(y.type==="attributes")y.attributeName===wn&&r(t,m);else{for(let x=0;x<w.length;x++)s(w[x],!0),(p=(d=t._dummyObserver).domChanged)===null||p===void 0||p.call(d,m);for(let x=0;x<E.length;x++)s(E[x]),(v=(h=t._dummyObserver).domChanged)===null||v===void 0||v.call(h,m)}}(g=t.modalizer)===null||g===void 0||g.hiddenUpdate()};function s(f,d){i||(i=eo(o).elementByUId),l(f,d);const p=yy(e,f,h=>l(h,d));if(p)for(;p.nextNode(););}function l(f,d){var p;if(!f.getAttribute)return NodeFilter.FILTER_SKIP;const h=f.__tabsterElementUID;return h&&i&&(d?delete i[h]:(p=i[h])!==null&&p!==void 0||(i[h]=new _n(o,f))),(Qn(t,f)||f.hasAttribute(wn))&&r(t,f,d),NodeFilter.FILTER_SKIP}const u=new MutationObserver(a);return n&&s(o().document.body),u.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[wn]}),()=>{u.disconnect()}}/*!
|
|
152
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
153
|
+
* Licensed under the MIT License.
|
|
154
|
+
*/class aM{constructor(t){this._isUncontrolledCompletely=t}isUncontrolledCompletely(t,r){var n;const o=(n=this._isUncontrolledCompletely)===null||n===void 0?void 0:n.call(this,t,r);return o===void 0?r:o}}/*!
|
|
155
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
156
|
+
* Licensed under the MIT License.
|
|
157
|
+
*/class sM{constructor(t){this.keyboardNavigation=t.keyboardNavigation,this.focusedElement=t.focusedElement,this.focusable=t.focusable,this.root=t.root,this.uncontrolled=t.uncontrolled,this.core=t}}class lM{constructor(t,r){var n,o;this._forgetMemorizedElements=[],this._wrappers=new Set,this._initQueue=[],this._version="5.2.0",this._noop=!1,this.getWindow=()=>{if(!this._win)throw new Error("Using disposed Tabster.");return this._win},this._storage=j7(t),this._win=t;const i=this.getWindow;this.keyboardNavigation=new oM(i),this.focusedElement=new Pt(this,i),this.focusable=new tM(this),this.root=new Wr(this,r?.autoRoot),this.uncontrolled=new aM(r?.checkUncontrolledCompletely||r?.checkUncontrolledTrappingFocus),this.controlTab=(n=r?.controlTab)!==null&&n!==void 0?n:!0,this.rootDummyInputs=!!r?.rootDummyInputs,this._dummyObserver=new Y7(i),this.getParent=(o=r?.getParent)!==null&&o!==void 0?o:a=>a.parentElement,this.internal={stopObserver:()=>{this._unobserve&&(this._unobserve(),delete this._unobserve)},resumeObserver:a=>{if(!this._unobserve){const s=i().document;this._unobserve=iM(s,this,vy,a)}}},by(i),this.queueInit(()=>{this.internal.resumeObserver(!0)})}_mergeProps(t){var r;t&&(this.getParent=(r=t.getParent)!==null&&r!==void 0?r:this.getParent)}createTabster(t,r){const n=new sM(this);return t||this._wrappers.add(n),this._mergeProps(r),n}disposeTabster(t,r){r?this._wrappers.clear():this._wrappers.delete(t),this._wrappers.size===0&&this.dispose()}dispose(){var t,r,n,o,i,a,s,l;this.internal.stopObserver();const u=this._win;u?.clearTimeout(this._initTimer),delete this._initTimer,this._initQueue=[],this._forgetMemorizedElements=[],u&&this._forgetMemorizedTimer&&(u.clearTimeout(this._forgetMemorizedTimer),delete this._forgetMemorizedTimer),(t=this.outline)===null||t===void 0||t.dispose(),(r=this.crossOrigin)===null||r===void 0||r.dispose(),(n=this.deloser)===null||n===void 0||n.dispose(),(o=this.groupper)===null||o===void 0||o.dispose(),(i=this.mover)===null||i===void 0||i.dispose(),(a=this.modalizer)===null||a===void 0||a.dispose(),(s=this.observedElement)===null||s===void 0||s.dispose(),(l=this.restorer)===null||l===void 0||l.dispose(),this.keyboardNavigation.dispose(),this.focusable.dispose(),this.focusedElement.dispose(),this.root.dispose(),this._dummyObserver.dispose(),R7(this.getWindow),_y(this.getWindow),this._storage=new WeakMap,this._wrappers.clear(),u&&(F7(u),delete u.__tabsterInstance,delete this._win)}storageEntry(t,r){const n=this._storage;let o=n.get(t);return o?r===!1&&Object.keys(o).length===0&&n.delete(t):r===!0&&(o={},n.set(t,o)),o}forceCleanup(){this._win&&(this._forgetMemorizedElements.push(this._win.document.body),!this._forgetMemorizedTimer&&(this._forgetMemorizedTimer=this._win.setTimeout(()=>{delete this._forgetMemorizedTimer;for(let t=this._forgetMemorizedElements.shift();t;t=this._forgetMemorizedElements.shift())_y(this.getWindow,t),Pt.forgetMemorized(this.focusedElement,t)},0),my(this.getWindow,!0)))}queueInit(t){var r;this._win&&(this._initQueue.push(t),this._initTimer||(this._initTimer=(r=this._win)===null||r===void 0?void 0:r.setTimeout(()=>{delete this._initTimer,this.drainInitQueue()},0)))}drainInitQueue(){if(!this._win)return;const t=this._initQueue;this._initQueue=[],t.forEach(r=>r())}}function cM(e,t){let r=fM(e);return r?r.createTabster(!1,t):(r=new lM(e,t),e.__tabsterInstance=r,r.createTabster())}function uM(e,t){e.core.disposeTabster(e,t)}function fM(e){return e.__tabsterInstance}const Cy=ge.createContext(void 0),dM={targetDocument:typeof document=="object"?document:void 0,dir:"ltr"};Cy.Provider;function Oy(){var e;return(e=ge.useContext(Cy))!==null&&e!==void 0?e:dM}function pM(){return typeof window<"u"&&!!(window.document&&window.document.createElement)}const hM=pM()?ge.useLayoutEffect:ge.useEffect;function vM(e){return e&&!!e._virtual}function gM(e){return vM(e)&&e._virtual.parent||null}function mM(e,t={}){if(!e)return null;if(!t.skipVirtual){const r=gM(e);if(r)return r}return e?.parentNode||null}const bM=()=>{const{targetDocument:e}=Oy(),t=e?.defaultView||void 0,r=ge.useMemo(()=>t?cM(t,{autoRoot:{},controlTab:!1,getParent:mM,checkUncontrolledTrappingFocus:n=>{var o;return!!(!((o=n.firstElementChild)===null||o===void 0)&&o.hasAttribute("data-is-focus-trap-zone-bumper"))}}):null,[t]);return hM(()=>()=>{r&&uM(r)},[r]),r},yM=()=>{const e=bM(),{targetDocument:t}=Oy(),r=ge.useCallback((s,l)=>e?.focusable.findAll({container:s,acceptCondition:l})||[],[e]),n=ge.useCallback(s=>e?.focusable.findFirst({container:s}),[e]),o=ge.useCallback(s=>e?.focusable.findLast({container:s}),[e]),i=ge.useCallback((s,l={})=>{if(!e||!t)return null;const{container:u=t.body}=l;return e.focusable.findNext({currentElement:s,container:u})},[e,t]),a=ge.useCallback((s,l={})=>{if(!e||!t)return null;const{container:u=t.body}=l;return e.focusable.findPrev({currentElement:s,container:u})},[e,t]);return{findAllFocusable:r,findFirstFocusable:n,findLastFocusable:o,findNextFocusable:i,findPrevFocusable:a}},Of="Viewport",wM="ViewportViews",Ay="ViewportView",[_M,J9]=Tr(Of,[]),[EM,xM]=_M(Of),Ty=({__viewportScope:e,classNames:t,children:r,defaultActiveView:n,activeView:o,focusManaged:i=!1,onActiveViewChange:a,...s})=>{const[l="never",u]=Gr({prop:o,defaultProp:n,onChange:a});return c.createElement(EM,{focusManaged:i,activeView:l,setActiveView:u,scope:e},c.createElement("div",{role:"region","aria-live":"polite",...s,className:ue("is-full overflow-hidden",t)},r))};Ty.displayName=Of;const Iy=({classNames:e,children:t,...r})=>{const n={inlineSize:`${Math.ceil(t.length)*100}%`};return c.createElement("div",{role:"none",style:n,...r,className:ue("flex",e)},t)};Iy.displayName=wM;const Py=c.forwardRef(({__viewportScope:e,classNames:t,children:r,id:n,...o},i)=>{const{activeView:a,focusManaged:s}=xM(Ay,e),l=n===a,u=Ol(i),{findFirstFocusable:f}=yM();return c.useEffect(()=>{!s&&l&&document.body.hasAttribute("data-is-keyboard")&&u.current&&f(u.current)?.focus()},[s,u.current,l]),c.createElement("section",{...o,...!l&&{"aria-hidden":!0},className:ue("min-is-0 flex-1 flex flex-col",l?"order-2":"order-4 invisible",t),ref:u},r)});Py.displayName=Ay;const lt={Root:Ty,Views:Iy,View:Py};c.forwardRef(({space:e,onClick:t},r)=>{const n=e.key.toHex(),o=_t("identityListItem__label"),i=rs(n??"",12),a=e.properties.name??L8(e.key.toHex());return c.createElement("li",{className:ue("flex gap-2 items-center mbe-2",t&&"cursor-pointer"),onClick:()=>t?.(),ref:r,"data-testid":"space-list-item"},c.createElement(At.Root,{labelId:o},c.createElement(At.Frame,null,c.createElement(At.Fallback,{href:i})),c.createElement(At.Label,{classNames:"text-sm truncate"},a)))});var Af={exports:{}},Tf={},Gs={exports:{}},If={};/**
|
|
158
|
+
* @license React
|
|
159
|
+
* use-sync-external-store-shim.production.min.js
|
|
160
|
+
*
|
|
161
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the MIT license found in the
|
|
164
|
+
* LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/var ky;function SM(){if(ky)return If;ky=1;var e=c;function t(d,p){return d===p&&(d!==0||1/d===1/p)||d!==d&&p!==p}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(d,p){var h=p(),v=n({inst:{value:h,getSnapshot:p}}),g=v[0].inst,y=v[1];return i(function(){g.value=h,g.getSnapshot=p,l(g)&&y({inst:g})},[d,h,p]),o(function(){return l(g)&&y({inst:g}),d(function(){l(g)&&y({inst:g})})},[d]),a(h),h}function l(d){var p=d.getSnapshot;d=d.value;try{var h=p();return!r(d,h)}catch{return!0}}function u(d,p){return p()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return If.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,If}var Pf={};/**
|
|
166
|
+
* @license React
|
|
167
|
+
* use-sync-external-store-shim.development.js
|
|
168
|
+
*
|
|
169
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
170
|
+
*
|
|
171
|
+
* This source code is licensed under the MIT license found in the
|
|
172
|
+
* LICENSE file in the root directory of this source tree.
|
|
173
|
+
*/var Ny;function $M(){return Ny||(Ny=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=c,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function r(E){{for(var x=arguments.length,P=new Array(x>1?x-1:0),I=1;I<x;I++)P[I-1]=arguments[I];n("error",E,P)}}function n(E,x,P){{var I=t.ReactDebugCurrentFrame,S=I.getStackAddendum();S!==""&&(x+="%s",P=P.concat([S]));var A=P.map(function(k){return String(k)});A.unshift("Warning: "+x),Function.prototype.apply.call(console[E],console,A)}}function o(E,x){return E===x&&(E!==0||1/E===1/x)||E!==E&&x!==x}var i=typeof Object.is=="function"?Object.is:o,a=e.useState,s=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue,f=!1,d=!1;function p(E,x,P){f||e.startTransition!==void 0&&(f=!0,r("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var I=x();if(!d){var S=x();i(I,S)||(r("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var A=a({inst:{value:I,getSnapshot:x}}),k=A[0].inst,j=A[1];return l(function(){k.value=I,k.getSnapshot=x,h(k)&&j({inst:k})},[E,I,x]),s(function(){h(k)&&j({inst:k});var D=function(){h(k)&&j({inst:k})};return E(D)},[E]),u(I),I}function h(E){var x=E.getSnapshot,P=E.value;try{var I=x();return!i(P,I)}catch{return!0}}function v(E,x,P){return x()}var g=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",y=!g,m=y?v:p,w=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m;Pf.useSyncExternalStore=w,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Pf}var Dy;function Ly(){return Dy||(Dy=1,process.env.NODE_ENV==="production"?Gs.exports=SM():Gs.exports=$M()),Gs.exports}/**
|
|
174
|
+
* @license React
|
|
175
|
+
* use-sync-external-store-shim/with-selector.production.min.js
|
|
176
|
+
*
|
|
177
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
178
|
+
*
|
|
179
|
+
* This source code is licensed under the MIT license found in the
|
|
180
|
+
* LICENSE file in the root directory of this source tree.
|
|
181
|
+
*/var My;function CM(){if(My)return Tf;My=1;var e=c,t=Ly();function r(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Tf.useSyncExternalStoreWithSelector=function(u,f,d,p,h){var v=i(null);if(v.current===null){var g={hasValue:!1,value:null};v.current=g}else g=v.current;v=s(function(){function m(I){if(!w){if(w=!0,E=I,I=p(I),h!==void 0&&g.hasValue){var S=g.value;if(h(S,I))return x=S}return x=I}if(S=x,n(E,I))return S;var A=p(I);return h!==void 0&&h(S,A)?S:(E=I,x=A)}var w=!1,E,x,P=d===void 0?null:d;return[function(){return m(f())},P===null?void 0:function(){return m(P())}]},[f,d,p,h]);var y=o(u,v[0],v[1]);return a(function(){g.hasValue=!0,g.value=y},[y]),l(y),y},Tf}var kf={};/**
|
|
182
|
+
* @license React
|
|
183
|
+
* use-sync-external-store-shim/with-selector.development.js
|
|
184
|
+
*
|
|
185
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
186
|
+
*
|
|
187
|
+
* This source code is licensed under the MIT license found in the
|
|
188
|
+
* LICENSE file in the root directory of this source tree.
|
|
189
|
+
*/var Fy;function OM(){return Fy||(Fy=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=c,t=Ly();function r(f,d){return f===d&&(f!==0||1/f===1/d)||f!==f&&d!==d}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function u(f,d,p,h,v){var g=i(null),y;g.current===null?(y={hasValue:!1,value:null},g.current=y):y=g.current;var m=s(function(){var P=!1,I,S,A=function(N){if(!P){P=!0,I=N;var J=h(N);if(v!==void 0&&y.hasValue){var K=y.value;if(v(K,J))return S=K,K}return S=J,J}var Y=I,te=S;if(n(Y,N))return te;var oe=h(N);return v!==void 0&&v(te,oe)?te:(I=N,S=oe,oe)},k=p===void 0?null:p,j=function(){return A(d())},D=k===null?void 0:function(){return A(k())};return[j,D]},[d,p,h,v]),w=m[0],E=m[1],x=o(f,w,E);return a(function(){y.hasValue=!0,y.value=x},[x]),l(x),x}kf.useSyncExternalStoreWithSelector=u,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),kf}process.env.NODE_ENV==="production"?Af.exports=CM():Af.exports=OM();var AM=Af.exports;/*! *****************************************************************************
|
|
190
|
+
Copyright (c) Microsoft Corporation.
|
|
191
|
+
|
|
192
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
193
|
+
purpose with or without fee is hereby granted.
|
|
194
|
+
|
|
195
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
196
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
197
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
198
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
199
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
200
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
201
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
202
|
+
***************************************************************************** */var ye=function(){return ye=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},ye.apply(this,arguments)};function Nf(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function He(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function et(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i}function vt(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}var ct;(function(e){e.Start="xstate.start",e.Stop="xstate.stop",e.Raise="xstate.raise",e.Send="xstate.send",e.Cancel="xstate.cancel",e.NullEvent="",e.Assign="xstate.assign",e.After="xstate.after",e.DoneState="done.state",e.DoneInvoke="done.invoke",e.Log="xstate.log",e.Init="xstate.init",e.Invoke="xstate.invoke",e.ErrorExecution="error.execution",e.ErrorCommunication="error.communication",e.ErrorPlatform="error.platform",e.ErrorCustom="xstate.error",e.Update="xstate.update",e.Pure="xstate.pure",e.Choose="xstate.choose"})(ct||(ct={}));var Ro;(function(e){e.Parent="#_parent",e.Internal="#_internal"})(Ro||(Ro={}));var Df=ct.Start,Lf=ct.Stop,Hi=ct.Raise,Ks=ct.Send,jy=ct.Cancel,TM=ct.NullEvent,Mf=ct.Assign;ct.After,ct.DoneState;var By=ct.Log,IM=ct.Init,Ff=ct.Invoke;ct.ErrorExecution;var Ry=ct.ErrorPlatform,PM=ct.ErrorCustom,Uy=ct.Update,kM=ct.Choose,NM=ct.Pure,Wy=".",Vy={},jf="xstate.guard",DM="",St=process.env.NODE_ENV==="production",qs;function Bf(e,t,r){r===void 0&&(r=Wy);var n=zi(e,r),o=zi(t,r);return tt(o)?tt(n)?o===n:!1:tt(n)?n in o:Object.keys(n).every(function(i){return i in o?Bf(n[i],o[i]):!1})}function Hy(e){try{return tt(e)||typeof e=="number"?"".concat(e):e.type}catch{throw new Error("Events must be strings or objects with a string event.type property.")}}function Rf(e,t){try{return Uo(e)?e:e.toString().split(t)}catch{throw new Error("'".concat(e,"' is not a valid state path."))}}function LM(e){return typeof e=="object"&&"value"in e&&"context"in e&&"event"in e&&"_event"in e}function zi(e,t){if(LM(e))return e.value;if(Uo(e))return Ys(e);if(typeof e!="string")return e;var r=Rf(e,t);return Ys(r)}function Ys(e){if(e.length===1)return e[0];for(var t={},r=t,n=0;n<e.length-1;n++)n===e.length-2?r[e[n]]=e[n+1]:(r[e[n]]={},r=r[e[n]]);return t}function Gi(e,t){for(var r={},n=Object.keys(e),o=0;o<n.length;o++){var i=n[o];r[i]=t(e[i],i,e,o)}return r}function zy(e,t,r){var n,o,i={};try{for(var a=He(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,u=e[l];r(u)&&(i[l]=t(u,l,e))}}catch(f){n={error:f}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i}var MM=function(e){return function(t){var r,n,o=t;try{for(var i=He(e),a=i.next();!a.done;a=i.next()){var s=a.value;o=o[s]}}catch(l){r={error:l}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return o}};function FM(e,t){return function(r){var n,o,i=r;try{for(var a=He(e),s=a.next();!s.done;s=a.next()){var l=s.value;i=i[t][l]}}catch(u){n={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i}}function Js(e){if(!e)return[[]];if(tt(e))return[[e]];var t=wt(Object.keys(e).map(function(r){var n=e[r];return typeof n!="string"&&(!n||!Object.keys(n).length)?[[r]]:Js(e[r]).map(function(o){return[r].concat(o)})}));return t}function wt(e){var t;return(t=[]).concat.apply(t,vt([],et(e),!1))}function Gy(e){return Uo(e)?e:[e]}function _r(e){return e===void 0?[]:Gy(e)}function Xs(e,t,r){var n,o;if(nt(e))return e(t,r.data);var i={};try{for(var a=He(Object.keys(e)),s=a.next();!s.done;s=a.next()){var l=s.value,u=e[l];nt(u)?i[l]=u(t,r.data):i[l]=u}}catch(f){n={error:f}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}return i}function jM(e){return/^(done|error)\./.test(e)}function Ky(e){return!!(e instanceof Promise||e!==null&&(nt(e)||typeof e=="object")&&nt(e.then))}function BM(e){return e!==null&&typeof e=="object"&&"transition"in e&&typeof e.transition=="function"}function RM(e,t){var r,n,o=et([[],[]],2),i=o[0],a=o[1];try{for(var s=He(e),l=s.next();!l.done;l=s.next()){var u=l.value;t(u)?i.push(u):a.push(u)}}catch(f){r={error:f}}finally{try{l&&!l.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return[i,a]}function qy(e,t){return Gi(e.states,function(r,n){if(r){var o=(tt(t)?void 0:t[n])||(r?r.current:void 0);if(o)return{current:o,states:qy(r,o)}}})}function UM(e,t){return{current:t,states:qy(e,t)}}function Yy(e,t,r,n){St||Dt(!!e,"Attempting to update undefined context");var o=e&&r.reduce(function(i,a){var s,l,u=a.assignment,f={state:n,action:a,_event:t},d={};if(nt(u))d=u(i,t.data,f);else try{for(var p=He(Object.keys(u)),h=p.next();!h.done;h=p.next()){var v=h.value,g=u[v];d[v]=nt(g)?g(i,t.data,f):g}}catch(y){s={error:y}}finally{try{h&&!h.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}return Object.assign({},i,d)},e);return o}var Dt=function(){};St||(Dt=function(e,t){var r=e instanceof Error?e:void 0;if(!(!r&&e)&&console!==void 0){var n=["Warning: ".concat(t)];r&&n.push(r),console.warn.apply(console,n)}});function Uo(e){return Array.isArray(e)}function nt(e){return typeof e=="function"}function tt(e){return typeof e=="string"}function Jy(e,t){if(e)return tt(e)?{type:jf,name:e,predicate:t?t[e]:void 0}:nt(e)?{type:jf,name:e.name,predicate:e}:e}function WM(e){try{return"subscribe"in e&&nt(e.subscribe)}catch{return!1}}var xn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();qs={},qs[xn]=function(){return this},qs[Symbol.observable]=function(){return this};function to(e){return!!e&&"__xstatenode"in e}function VM(e){return!!e&&typeof e.send=="function"}function Zs(e,t){return tt(e)||typeof e=="number"?ye({type:e},t):e}function Lt(e,t){if(!tt(e)&&"$$type"in e&&e.$$type==="scxml")return e;var r=Zs(e);return ye({name:r.type,data:r,$$type:"scxml",type:"external"},t)}function Wo(e,t){var r=Gy(t).map(function(n){return typeof n>"u"||typeof n=="string"||to(n)?{target:n,event:e}:ye(ye({},n),{event:e})});return r}function HM(e){if(!(e===void 0||e===DM))return _r(e)}function zM(e,t,r){if(!St){var n=e.stack?" Stacktrace was '".concat(e.stack,"'"):"";if(e===t)console.error("Missing onError handler for invocation '".concat(r,"', error was '").concat(e,"'.").concat(n));else{var o=t.stack?" Stacktrace was '".concat(t.stack,"'"):"";console.error("Missing onError handler and/or unhandled exception/promise rejection for invocation '".concat(r,"'. ")+"Original error: '".concat(e,"'. ").concat(n," Current error is '").concat(t,"'.").concat(o))}}}function Xy(e,t,r,n,o){var i=e.options.guards,a={state:o,cond:t,_event:n};if(t.type===jf)return(i?.[t.name]||t.predicate)(r,n.data,a);var s=i?.[t.type];if(!s)throw new Error("Guard '".concat(t.type,"' is not implemented on machine '").concat(e.id,"'."));return s(r,n.data,a)}function Zy(e){return typeof e=="string"?{type:e}:e}function Qs(e,t,r){var n=function(){},o=typeof e=="object",i=o?e:null;return{next:((o?e.next:e)||n).bind(i),error:((o?e.error:t)||n).bind(i),complete:((o?e.complete:r)||n).bind(i)}}function el(e,t){return"".concat(e,":invocation[").concat(t,"]")}function Uf(e){return(e.type===Hi||e.type===Ks&&e.to===Ro.Internal)&&typeof e.delay!="number"}var Vo=Lt({type:IM});function Wf(e,t){return t&&t[e]||void 0}function Ki(e,t){var r;if(tt(e)||typeof e=="number"){var n=Wf(e,t);nt(n)?r={type:e,exec:n}:n?r=n:r={type:e,exec:void 0}}else if(nt(e))r={type:e.name||e.toString(),exec:e};else{var n=Wf(e.type,t);if(nt(n))r=ye(ye({},e),{exec:n});else if(n){var o=n.type||e.type;r=ye(ye(ye({},n),e),{type:o})}else r=e}return r}var Sn=function(e,t){if(!e)return[];var r=Uo(e)?e:[e];return r.map(function(n){return Ki(n,t)})};function Vf(e){var t=Ki(e);return ye(ye({id:tt(e)?e:t.id},t),{type:t.type})}function GM(e,t){return{type:Hi,event:typeof e=="function"?e:Zs(e),delay:t?t.delay:void 0,id:t?.id}}function KM(e,t,r,n){var o={_event:r},i=Lt(nt(e.event)?e.event(t,r.data,o):e.event),a;if(tt(e.delay)){var s=n&&n[e.delay];a=nt(s)?s(t,r.data,o):s}else a=nt(e.delay)?e.delay(t,r.data,o):e.delay;return ye(ye({},e),{type:Hi,_event:i,delay:a})}function qM(e,t){return{to:t?t.to:void 0,type:Ks,event:nt(e)?e:Zs(e),delay:t?t.delay:void 0,id:t&&t.id!==void 0?t.id:nt(e)?e.name:Hy(e)}}function YM(e,t,r,n){var o={_event:r},i=Lt(nt(e.event)?e.event(t,r.data,o):e.event),a;if(tt(e.delay)){var s=n&&n[e.delay];a=nt(s)?s(t,r.data,o):s}else a=nt(e.delay)?e.delay(t,r.data,o):e.delay;var l=nt(e.to)?e.to(t,r.data,o):e.to;return ye(ye({},e),{to:l,_event:i,event:i.data,delay:a})}var JM=function(e,t,r){return ye(ye({},e),{value:tt(e.expr)?e.expr:e.expr(t,r.data,{_event:r})})},XM=function(e){return{type:jy,sendId:e}};function ZM(e){var t=Vf(e);return{type:ct.Start,activity:t,exec:void 0}}function QM(e){var t=nt(e)?e:Vf(e);return{type:ct.Stop,activity:t,exec:void 0}}function eF(e,t,r){var n=nt(e.activity)?e.activity(t,r.data):e.activity,o=typeof n=="string"?{id:n}:n,i={type:ct.Stop,activity:o};return i}var tF=function(e){return{type:Mf,assignment:e}};function rF(e,t){var r=t?"#".concat(t):"";return"".concat(ct.After,"(").concat(e,")").concat(r)}function tl(e,t){var r="".concat(ct.DoneState,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function rl(e,t){var r="".concat(ct.DoneInvoke,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}function qi(e,t){var r="".concat(ct.ErrorPlatform,".").concat(e),n={type:r,data:t};return n.toString=function(){return r},n}var nF=function(e){var t,r,n=[];try{for(var o=He(e),i=o.next();!i.done;i=o.next())for(var a=i.value,s=0;s<a.actions.length;){if(a.actions[s].type===Mf){n.push(a.actions[s]),a.actions.splice(s,1);continue}s++}}catch(l){t={error:l}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n};function nl(e,t,r,n,o,i,a){a===void 0&&(a=!1);var s=a?[]:nF(o),l=s.length?Yy(r,n,s,t):r,u=a?[r]:void 0,f=[];function d(v,g){var y;switch(g.type){case Hi:{var m=KM(g,l,n,e.options.delays);return i&&typeof m.delay=="number"&&i(m,l,n),m}case Ks:var w=YM(g,l,n,e.options.delays);if(!St){var E=g.delay;Dt(!tt(E)||typeof w.delay=="number","No delay reference for delay expression '".concat(E,"' was found on machine '").concat(e.id,"'"))}return i&&w.to!==Ro.Internal&&(v==="entry"?f.push(w):i(w,l,n)),w;case By:{var x=JM(g,l,n);return i?.(x,l,n),x}case kM:{var P=g,I=(y=P.conds.find(function(oe){var le=Jy(oe.cond,e.options.guards);return!le||Xy(e,le,l,n,i?void 0:t)}))===null||y===void 0?void 0:y.actions;if(!I)return[];var S=et(nl(e,t,l,n,[{type:v,actions:Sn(_r(I),e.options.actions)}],i,a),2),A=S[0],k=S[1];return l=k,u?.push(l),A}case NM:{var I=g.get(l,n.data);if(!I)return[];var j=et(nl(e,t,l,n,[{type:v,actions:Sn(_r(I),e.options.actions)}],i,a),2),D=j[0],N=j[1];return l=N,u?.push(l),D}case Lf:{var x=eF(g,l,n);return i?.(x,r,n),x}case Mf:{l=Yy(l,n,[g],i?void 0:t),u?.push(l);break}default:var J=Ki(g,e.options.actions),K=J.exec;if(i)i(J,l,n);else if(K&&u){var Y=u.length-1,te=ye(ye({},J),{exec:function(oe){for(var le=[],ae=1;ae<arguments.length;ae++)le[ae-1]=arguments[ae];K.apply(void 0,vt([u[Y]],et(le),!1))}});J=te}return J}}function p(v){var g,y,m=[];try{for(var w=He(v.actions),E=w.next();!E.done;E=w.next()){var x=E.value,P=d(v.type,x);P&&(m=m.concat(P))}}catch(I){g={error:I}}finally{try{E&&!E.done&&(y=w.return)&&y.call(w)}finally{if(g)throw g.error}}return f.forEach(function(I){i(I,l,n)}),f.length=0,m}var h=wt(o.map(p));return[h,l]}var Qy=[],Ho=function(e,t){Qy.push(e);var r=t(e);return Qy.pop(),r};function e1(e){var t;return t={id:e,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},getSnapshot:function(){},toJSON:function(){return{id:e}}},t[xn]=function(){return this},t}function oF(e,t,r,n){var o,i=Zy(e.src),a=(o=t?.options.services)===null||o===void 0?void 0:o[i.type],s=e.data?Xs(e.data,r,n):void 0,l=a?t1(a,e.id,s):e1(e.id);return l.meta=e,l}function t1(e,t,r){var n=e1(t);if(n.deferred=!0,to(e)){var o=n.state=Ho(void 0,function(){return(r?e.withContext(r):e).initialState});n.getSnapshot=function(){return o}}return n}function iF(e){try{return typeof e.send=="function"}catch{return!1}}function aF(e){return iF(e)&&"id"in e}function sF(e){var t;return ye((t={subscribe:function(){return{unsubscribe:function(){}}},id:"anonymous",getSnapshot:function(){}},t[xn]=function(){return this},t),e)}var ol=function(e){return e.type==="atomic"||e.type==="final"};function r1(e){return Object.keys(e.states).map(function(t){return e.states[t]})}function Yi(e){return r1(e).filter(function(t){return t.type!=="history"})}function n1(e){var t=[e];return ol(e)?t:t.concat(wt(Yi(e).map(n1)))}function Ji(e,t){var r,n,o,i,a,s,l,u,f=new Set(e),d=Hf(f),p=new Set(t);try{for(var h=He(p),v=h.next();!v.done;v=h.next())for(var g=v.value,y=g.parent;y&&!p.has(y);)p.add(y),y=y.parent}catch(k){r={error:k}}finally{try{v&&!v.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}var m=Hf(p);try{for(var w=He(p),E=w.next();!E.done;E=w.next()){var g=E.value;if(g.type==="compound"&&(!m.get(g)||!m.get(g).length))d.get(g)?d.get(g).forEach(function(j){return p.add(j)}):g.initialStateNodes.forEach(function(j){return p.add(j)});else if(g.type==="parallel")try{for(var x=(a=void 0,He(Yi(g))),P=x.next();!P.done;P=x.next()){var I=P.value;p.has(I)||(p.add(I),d.get(I)?d.get(I).forEach(function(j){return p.add(j)}):I.initialStateNodes.forEach(function(j){return p.add(j)}))}}catch(j){a={error:j}}finally{try{P&&!P.done&&(s=x.return)&&s.call(x)}finally{if(a)throw a.error}}}}catch(k){o={error:k}}finally{try{E&&!E.done&&(i=w.return)&&i.call(w)}finally{if(o)throw o.error}}try{for(var S=He(p),A=S.next();!A.done;A=S.next())for(var g=A.value,y=g.parent;y&&!p.has(y);)p.add(y),y=y.parent}catch(k){l={error:k}}finally{try{A&&!A.done&&(u=S.return)&&u.call(S)}finally{if(l)throw l.error}}return p}function o1(e,t){var r=t.get(e);if(!r)return{};if(e.type==="compound"){var n=r[0];if(n){if(ol(n))return n.key}else return{}}var o={};return r.forEach(function(i){o[i.key]=o1(i,t)}),o}function Hf(e){var t,r,n=new Map;try{for(var o=He(e),i=o.next();!i.done;i=o.next()){var a=i.value;n.has(a)||n.set(a,[]),a.parent&&(n.has(a.parent)||n.set(a.parent,[]),n.get(a.parent).push(a))}}catch(s){t={error:s}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n}function lF(e,t){var r=Ji([e],t);return o1(e,Hf(r))}function Xi(e,t){return Array.isArray(e)?e.some(function(r){return r===t}):e instanceof Set?e.has(t):!1}function cF(e){return vt([],et(new Set(wt(vt([],et(e.map(function(t){return t.ownEvents})),!1)))),!1)}function il(e,t){return t.type==="compound"?Yi(t).some(function(r){return r.type==="final"&&Xi(e,r)}):t.type==="parallel"?Yi(t).every(function(r){return il(e,r)}):!1}function uF(e){return e===void 0&&(e=[]),e.reduce(function(t,r){return r.meta!==void 0&&(t[r.id]=r.meta),t},{})}function i1(e){return new Set(wt(e.map(function(t){return t.tags})))}function a1(e,t){if(e===t)return!0;if(e===void 0||t===void 0)return!1;if(tt(e)||tt(t))return e===t;var r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(function(o){return a1(e[o],t[o])})}function fF(e){return typeof e!="object"||e===null?!1:"value"in e&&"_event"in e}function dF(e,t){var r=e.exec,n=ye(ye({},e),{exec:r!==void 0?function(){return r(t.context,t.event,{action:e,state:t,_event:t._event})}:void 0});return n}var ur=function(){function e(t){var r=this,n;this.actions=[],this.activities=Vy,this.meta={},this.events=[],this.value=t.value,this.context=t.context,this._event=t._event,this._sessionid=t._sessionid,this.event=this._event.data,this.historyValue=t.historyValue,this.history=t.history,this.actions=t.actions||[],this.activities=t.activities||Vy,this.meta=uF(t.configuration),this.events=t.events||[],this.matches=this.matches.bind(this),this.toStrings=this.toStrings.bind(this),this.configuration=t.configuration,this.transitions=t.transitions,this.children=t.children,this.done=!!t.done,this.tags=(n=Array.isArray(t.tags)?new Set(t.tags):t.tags)!==null&&n!==void 0?n:new Set,this.machine=t.machine,Object.defineProperty(this,"nextEvents",{get:function(){return cF(r.configuration)}})}return e.from=function(t,r){if(t instanceof e)return t.context!==r?new e({value:t.value,context:r,_event:t._event,_sessionid:null,historyValue:t.historyValue,history:t.history,actions:[],activities:t.activities,meta:{},events:[],configuration:[],transitions:[],children:{}}):t;var n=Vo;return new e({value:t,context:r,_event:n,_sessionid:null,historyValue:void 0,history:void 0,actions:[],activities:void 0,meta:void 0,events:[],configuration:[],transitions:[],children:{}})},e.create=function(t){return new e(t)},e.inert=function(t,r){if(t instanceof e){if(!t.actions.length)return t;var n=Vo;return new e({value:t.value,context:r,_event:n,_sessionid:null,historyValue:t.historyValue,history:t.history,activities:t.activities,configuration:t.configuration,transitions:[],children:{}})}return e.from(t,r)},e.prototype.toStrings=function(t,r){var n=this;if(t===void 0&&(t=this.value),r===void 0&&(r="."),tt(t))return[t];var o=Object.keys(t);return o.concat.apply(o,vt([],et(o.map(function(i){return n.toStrings(t[i],r).map(function(a){return i+r+a})})),!1))},e.prototype.toJSON=function(){var t=this;t.configuration,t.transitions;var r=t.tags;t.machine;var n=Nf(t,["configuration","transitions","tags","machine"]);return ye(ye({},n),{tags:Array.from(r)})},e.prototype.matches=function(t){return Bf(t,this.value)},e.prototype.hasTag=function(t){return this.tags.has(t)},e.prototype.can=function(t){var r;St&&Dt(!!this.machine,"state.can(...) used outside of a machine-created State object; this will always return false.");var n=(r=this.machine)===null||r===void 0?void 0:r.getTransitionData(this,t);return!!n?.transitions.length&&n.transitions.some(function(o){return o.target!==void 0||o.actions.length})},e}(),pF={deferEvents:!1},s1=function(){function e(t){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=ye(ye({},pF),t)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents){this.schedule(t);return}this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(!this.initialized||this.processingEvent){this.queue.push(t);return}if(this.queue.length!==0)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(r){throw this.clear(),r}finally{this.processingEvent=!1}},e}(),zf=new Map,hF=0,Zi={bookId:function(){return"x:".concat(hF++)},register:function(e,t){return zf.set(e,t),e},get:function(e){return zf.get(e)},free:function(e){zf.delete(e)}};function Gf(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;St||console.warn("XState could not find a global object in this environment. Please let the maintainers know and raise an issue here: https://github.com/statelyai/xstate/issues")}function vF(){var e=Gf();if(e&&"__xstate__"in e)return e.__xstate__}function gF(e){if(Gf()){var t=vF();t&&t.register(e)}}function mF(e,t){t===void 0&&(t={});var r=e.initialState,n=new Set,o=[],i=!1,a=function(){if(!i){for(i=!0;o.length>0;){var u=o.shift();r=e.transition(r,u,l),n.forEach(function(f){return f.next(r)})}i=!1}},s=sF({id:t.id,send:function(u){o.push(u),a()},getSnapshot:function(){return r},subscribe:function(u,f,d){var p=Qs(u,f,d);return n.add(p),p.next(r),{unsubscribe:function(){n.delete(p)}}}}),l={parent:t.parent,self:s,id:t.id||"anonymous",observers:n};return r=e.start?e.start(l):r,s}var bF={sync:!1,autoForward:!1},Et;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Et||(Et={}));var yF=function(){function e(t,r){r===void 0&&(r=e.defaultOptions);var n=this;this.machine=t,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=Et.NotStarted,this.children=new Map,this.forwardTo=new Set,this._outgoingQueue=[],this.init=this.start,this.send=function(f,d){if(Uo(f))return n.batch(f),n.state;var p=Lt(Zs(f,d));if(n.status===Et.Stopped)return St||Dt(!1,'Event "'.concat(p.name,'" was sent to stopped service "').concat(n.machine.id,`". This service has already reached its final state, and will not transition.
|
|
203
|
+
Event: `).concat(JSON.stringify(p.data))),n.state;if(n.status!==Et.Running&&!n.options.deferEvents)throw new Error('Event "'.concat(p.name,'" was sent to uninitialized service "').concat(n.machine.id,`". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.
|
|
204
|
+
Event: `).concat(JSON.stringify(p.data)));return n.scheduler.schedule(function(){n.forward(p);var h=n._nextState(p);n.update(h,p)}),n._state},this.sendTo=function(f,d,p){var h=n.parent&&(d===Ro.Parent||n.parent.id===d),v=h?n.parent:tt(d)?d===Ro.Internal?n:n.children.get(d)||Zi.get(d):VM(d)?d:void 0;if(!v){if(!h)throw new Error("Unable to send event to child '".concat(d,"' from service '").concat(n.id,"'."));St||Dt(!1,"Service '".concat(n.id,"' has no parent: unable to send event ").concat(f.type));return}if("machine"in v){if(n.status!==Et.Stopped||n.parent!==v||n.state.done){var g=ye(ye({},f),{name:f.name===PM?"".concat(qi(n.id)):f.name,origin:n.sessionId});!p&&n.machine.config.predictableActionArguments?n._outgoingQueue.push([v,g]):v.send(g)}}else!p&&n.machine.config.predictableActionArguments?n._outgoingQueue.push([v,f.data]):v.send(f.data)},this._exec=function(f,d,p,h){h===void 0&&(h=n.machine.options.actions);var v=f.exec||Wf(f.type,h),g=nt(v)?v:v?v.exec:f.exec;if(g)try{return g(d,p.data,n.machine.config.predictableActionArguments?{action:f,_event:p}:{action:f,state:n.state,_event:p})}catch(K){throw n.parent&&n.parent.send({type:"xstate.error",data:K}),K}switch(f.type){case Hi:{var y=f;n.defer(y);break}case Ks:var m=f;if(typeof m.delay=="number"){n.defer(m);return}else m.to?n.sendTo(m._event,m.to,p===Vo):n.send(m._event);break;case jy:n.cancel(f.sendId);break;case Df:{if(n.status!==Et.Running)return;var w=f.activity;if(!n.machine.config.predictableActionArguments&&!n.state.activities[w.id||w.type])break;if(w.type===ct.Invoke){var E=Zy(w.src),x=n.machine.options.services?n.machine.options.services[E.type]:void 0,P=w.id,I=w.data;St||Dt(!("forward"in w),"`forward` property is deprecated (found in invocation of '".concat(w.src,"' in in machine '").concat(n.machine.id,"'). ")+"Please use `autoForward` instead.");var S="autoForward"in w?w.autoForward:!!w.forward;if(!x){St||Dt(!1,"No service found for invocation '".concat(w.src,"' in machine '").concat(n.machine.id,"'."));return}var A=I?Xs(I,d,p):void 0;if(typeof x=="string")return;var k=nt(x)?x(d,p.data,{data:A,src:E,meta:w.meta}):x;if(!k)return;var j=void 0;to(k)&&(k=A?k.withContext(A):k,j={autoForward:S}),n.spawn(k,P,j)}else n.spawnActivity(w);break}case Lf:{n.stopChild(f.activity.id);break}case By:var D=f,N=D.label,J=D.value;N?n.logger(N,J):n.logger(J);break;default:St||Dt(!1,"No implementation found for action type '".concat(f.type,"'"));break}};var o=ye(ye({},e.defaultOptions),r),i=o.clock,a=o.logger,s=o.parent,l=o.id,u=l!==void 0?l:t.id;this.id=u,this.logger=a,this.clock=i,this.parent=s,this.options=o,this.scheduler=new s1({deferEvents:this.options.deferEvents}),this.sessionId=Zi.bookId()}return Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:Ho(this,function(){return t._initialState=t.machine.initialState,t._initialState})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return St||Dt(this.status!==Et.NotStarted,"Attempted to read state from uninitialized service '".concat(this.id,"'. Make sure the service is started first.")),this._state},enumerable:!1,configurable:!0}),e.prototype.execute=function(t,r){var n,o;try{for(var i=He(t.actions),a=i.next();!a.done;a=i.next()){var s=a.value;this.exec(s,t,r)}}catch(l){n={error:l}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},e.prototype.update=function(t,r){var n,o,i,a,s,l,u,f,d=this;if(t._sessionid=this.sessionId,this._state=t,(!this.machine.config.predictableActionArguments||r===Vo)&&this.options.execute)this.execute(this.state);else for(var p=void 0;p=this._outgoingQueue.shift();)p[0].send(p[1]);if(this.children.forEach(function(k){d.state.children[k.id]=k}),this.devTools&&this.devTools.send(r.data,t),t.event)try{for(var h=He(this.eventListeners),v=h.next();!v.done;v=h.next()){var g=v.value;g(t.event)}}catch(k){n={error:k}}finally{try{v&&!v.done&&(o=h.return)&&o.call(h)}finally{if(n)throw n.error}}try{for(var y=He(this.listeners),m=y.next();!m.done;m=y.next()){var g=m.value;g(t,t.event)}}catch(k){i={error:k}}finally{try{m&&!m.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}try{for(var w=He(this.contextListeners),E=w.next();!E.done;E=w.next()){var x=E.value;x(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(k){s={error:k}}finally{try{E&&!E.done&&(l=w.return)&&l.call(w)}finally{if(s)throw s.error}}if(this.state.done){var P=t.configuration.find(function(k){return k.type==="final"&&k.parent===d.machine}),I=P&&P.doneData?Xs(P.doneData,t.context,r):void 0;this._doneEvent=rl(this.id,I);try{for(var S=He(this.doneListeners),A=S.next();!A.done;A=S.next()){var g=A.value;g(this._doneEvent)}}catch(k){u={error:k}}finally{try{A&&!A.done&&(f=S.return)&&f.call(S)}finally{if(u)throw u.error}}this._stop(),this._stopChildren(),Zi.free(this.sessionId)}},e.prototype.onTransition=function(t){return this.listeners.add(t),this.status===Et.Running&&t(this.state,this.state.event),this},e.prototype.subscribe=function(t,r,n){var o=this,i=Qs(t,r,n);this.listeners.add(i.next),this.status!==Et.NotStarted&&i.next(this.state);var a=function(){o.doneListeners.delete(a),o.stopListeners.delete(a),i.complete()};return this.status===Et.Stopped?i.complete():(this.onDone(a),this.onStop(a)),{unsubscribe:function(){o.listeners.delete(i.next),o.doneListeners.delete(a),o.stopListeners.delete(a)}}},e.prototype.onEvent=function(t){return this.eventListeners.add(t),this},e.prototype.onSend=function(t){return this.sendListeners.add(t),this},e.prototype.onChange=function(t){return this.contextListeners.add(t),this},e.prototype.onStop=function(t){return this.stopListeners.add(t),this},e.prototype.onDone=function(t){return this.status===Et.Stopped&&this._doneEvent?t(this._doneEvent):this.doneListeners.add(t),this},e.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},e.prototype.start=function(t){var r=this;if(this.status===Et.Running)return this;this.machine._init(),Zi.register(this.sessionId,this),this.initialized=!0,this.status=Et.Running;var n=t===void 0?this.initialState:Ho(this,function(){return fF(t)?r.machine.resolveState(t):r.machine.resolveState(ur.from(t,r.machine.context))});return this.options.devTools&&this.attachDev(),this.scheduler.initialize(function(){r.update(n,Vo)}),this},e.prototype._stopChildren=function(){this.children.forEach(function(t){nt(t.stop)&&t.stop()}),this.children.clear()},e.prototype._stop=function(){var t,r,n,o,i,a,s,l,u,f;try{for(var d=He(this.listeners),p=d.next();!p.done;p=d.next()){var h=p.value;this.listeners.delete(h)}}catch(S){t={error:S}}finally{try{p&&!p.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}try{for(var v=He(this.stopListeners),g=v.next();!g.done;g=v.next()){var h=g.value;h(),this.stopListeners.delete(h)}}catch(S){n={error:S}}finally{try{g&&!g.done&&(o=v.return)&&o.call(v)}finally{if(n)throw n.error}}try{for(var y=He(this.contextListeners),m=y.next();!m.done;m=y.next()){var h=m.value;this.contextListeners.delete(h)}}catch(S){i={error:S}}finally{try{m&&!m.done&&(a=y.return)&&a.call(y)}finally{if(i)throw i.error}}try{for(var w=He(this.doneListeners),E=w.next();!E.done;E=w.next()){var h=E.value;this.doneListeners.delete(h)}}catch(S){s={error:S}}finally{try{E&&!E.done&&(l=w.return)&&l.call(w)}finally{if(s)throw s.error}}if(!this.initialized)return this;this.initialized=!1,this.status=Et.Stopped,this._initialState=void 0;try{for(var x=He(Object.keys(this.delayedEventsMap)),P=x.next();!P.done;P=x.next()){var I=P.value;this.clock.clearTimeout(this.delayedEventsMap[I])}}catch(S){u={error:S}}finally{try{P&&!P.done&&(f=x.return)&&f.call(x)}finally{if(u)throw u.error}}this.scheduler.clear(),this.scheduler=new s1({deferEvents:this.options.deferEvents})},e.prototype.stop=function(){var t=this,r=this.scheduler;return this._stop(),r.schedule(function(){var n=Lt({type:"xstate.stop"}),o=Ho(t,function(){var i=wt(vt([],et(t.state.configuration),!1).sort(function(f,d){return d.order-f.order}).map(function(f){return Sn(f.onExit,t.machine.options.actions)})),a=et(nl(t.machine,t.state,t.state.context,n,[{type:"exit",actions:i}],t.machine.config.predictableActionArguments?t._exec:void 0,t.machine.config.predictableActionArguments||t.machine.config.preserveActionOrder),2),s=a[0],l=a[1],u=new ur({value:t.state.value,context:l,_event:n,_sessionid:t.sessionId,historyValue:void 0,history:t.state,actions:s.filter(function(f){return!Uf(f)}),activities:{},events:[],configuration:[],transitions:[],children:{},done:t.state.done,tags:t.state.tags,machine:t.machine});return u.changed=!0,u});t.update(o,n),t._stopChildren(),Zi.free(t.sessionId)}),this},e.prototype.batch=function(t){var r=this;if(this.status===Et.NotStarted&&this.options.deferEvents)St||Dt(!1,"".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,`" and are deferred. Make sure .start() is called for this service.
|
|
205
|
+
Event: `).concat(JSON.stringify(event)));else if(this.status!==Et.Running)throw new Error("".concat(t.length,' event(s) were sent to uninitialized service "').concat(this.machine.id,'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.'));if(t.length){var n=!!this.machine.config.predictableActionArguments&&this._exec;this.scheduler.schedule(function(){var o,i,a=r.state,s=!1,l=[],u=function(h){var v=Lt(h);r.forward(v),a=Ho(r,function(){return r.machine.transition(a,v,void 0,n||void 0)}),l.push.apply(l,vt([],et(r.machine.config.predictableActionArguments?a.actions:a.actions.map(function(g){return dF(g,a)})),!1)),s=s||!!a.changed};try{for(var f=He(t),d=f.next();!d.done;d=f.next()){var p=d.value;u(p)}}catch(h){o={error:h}}finally{try{d&&!d.done&&(i=f.return)&&i.call(f)}finally{if(o)throw o.error}}a.changed=s,a.actions=l,r.update(a,Lt(t[t.length-1]))})}},e.prototype.sender=function(t){return this.send.bind(this,t)},e.prototype._nextState=function(t,r){var n=this;r===void 0&&(r=!!this.machine.config.predictableActionArguments&&this._exec);var o=Lt(t);if(o.name.indexOf(Ry)===0&&!this.state.nextEvents.some(function(a){return a.indexOf(Ry)===0}))throw o.data.data;var i=Ho(this,function(){return n.machine.transition(n.state,o,void 0,r||void 0)});return i},e.prototype.nextState=function(t){return this._nextState(t,!1)},e.prototype.forward=function(t){var r,n;try{for(var o=He(this.forwardTo),i=o.next();!i.done;i=o.next()){var a=i.value,s=this.children.get(a);if(!s)throw new Error("Unable to forward event '".concat(t,"' from interpreter '").concat(this.id,"' to nonexistant child '").concat(a,"'."));s.send(t)}}catch(l){r={error:l}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},e.prototype.defer=function(t){var r=this,n=this.clock.setTimeout(function(){"to"in t&&t.to?r.sendTo(t._event,t.to,!0):r.send(t._event)},t.delay);t.id&&(this.delayedEventsMap[t.id]=n)},e.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},e.prototype.exec=function(t,r,n){n===void 0&&(n=this.machine.options.actions),this._exec(t,r.context,r._event,n)},e.prototype.removeChild=function(t){var r;this.children.delete(t),this.forwardTo.delete(t),(r=this.state)===null||r===void 0||delete r.children[t]},e.prototype.stopChild=function(t){var r=this.children.get(t);r&&(this.removeChild(t),nt(r.stop)&&r.stop())},e.prototype.spawn=function(t,r,n){if(this.status!==Et.Running)return t1(t,r);if(Ky(t))return this.spawnPromise(Promise.resolve(t),r);if(nt(t))return this.spawnCallback(t,r);if(aF(t))return this.spawnActor(t,r);if(WM(t))return this.spawnObservable(t,r);if(to(t))return this.spawnMachine(t,ye(ye({},n),{id:r}));if(BM(t))return this.spawnBehavior(t,r);throw new Error('Unable to spawn entity "'.concat(r,'" of type "').concat(typeof t,'".'))},e.prototype.spawnMachine=function(t,r){var n=this;r===void 0&&(r={});var o=new e(t,ye(ye({},this.options),{parent:this,id:r.id||t.id})),i=ye(ye({},bF),r);i.sync&&o.onTransition(function(s){n.send(Uy,{state:s,id:o.id})});var a=o;return this.children.set(o.id,a),i.autoForward&&this.forwardTo.add(o.id),o.onDone(function(s){n.removeChild(o.id),n.send(Lt(s,{origin:o.id}))}).start(),a},e.prototype.spawnBehavior=function(t,r){var n=mF(t,{id:r,parent:this});return this.children.set(r,n),n},e.prototype.spawnPromise=function(t,r){var n,o=this,i=!1,a;t.then(function(l){i||(a=l,o.removeChild(r),o.send(Lt(rl(r,l),{origin:r})))},function(l){if(!i){o.removeChild(r);var u=qi(r,l);try{o.send(Lt(u,{origin:r}))}catch(f){zM(l,f,r),o.devTools&&o.devTools.send(u,o.state),o.machine.strict&&o.stop()}}});var s=(n={id:r,send:function(){},subscribe:function(l,u,f){var d=Qs(l,u,f),p=!1;return t.then(function(h){p||(d.next(h),!p&&d.complete())},function(h){p||d.error(h)}),{unsubscribe:function(){return p=!0}}},stop:function(){i=!0},toJSON:function(){return{id:r}},getSnapshot:function(){return a}},n[xn]=function(){return this},n);return this.children.set(r,s),s},e.prototype.spawnCallback=function(t,r){var n,o=this,i=!1,a=new Set,s=new Set,l,u=function(p){l=p,s.forEach(function(h){return h(p)}),!i&&o.send(Lt(p,{origin:r}))},f;try{f=t(u,function(p){a.add(p)})}catch(p){this.send(qi(r,p))}if(Ky(f))return this.spawnPromise(f,r);var d=(n={id:r,send:function(p){return a.forEach(function(h){return h(p)})},subscribe:function(p){var h=Qs(p);return s.add(h.next),{unsubscribe:function(){s.delete(h.next)}}},stop:function(){i=!0,nt(f)&&f()},toJSON:function(){return{id:r}},getSnapshot:function(){return l}},n[xn]=function(){return this},n);return this.children.set(r,d),d},e.prototype.spawnObservable=function(t,r){var n,o=this,i,a=t.subscribe(function(l){i=l,o.send(Lt(l,{origin:r}))},function(l){o.removeChild(r),o.send(Lt(qi(r,l),{origin:r}))},function(){o.removeChild(r),o.send(Lt(rl(r),{origin:r}))}),s=(n={id:r,send:function(){},subscribe:function(l,u,f){return t.subscribe(l,u,f)},stop:function(){return a.unsubscribe()},getSnapshot:function(){return i},toJSON:function(){return{id:r}}},n[xn]=function(){return this},n);return this.children.set(r,s),s},e.prototype.spawnActor=function(t,r){return this.children.set(r,t),t},e.prototype.spawnActivity=function(t){var r=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(!r){St||Dt(!1,"No implementation found for activity '".concat(t.type,"'"));return}var n=r(this.state.context,t);this.spawnEffect(t.id,n)},e.prototype.spawnEffect=function(t,r){var n;this.children.set(t,(n={id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:r||void 0,getSnapshot:function(){},toJSON:function(){return{id:t}}},n[xn]=function(){return this},n))},e.prototype.attachDev=function(){var t=Gf();if(this.options.devTools&&t){if(t.__REDUX_DEVTOOLS_EXTENSION__){var r=typeof this.options.devTools=="object"?this.options.devTools:void 0;this.devTools=t.__REDUX_DEVTOOLS_EXTENSION__.connect(ye(ye({name:this.id,autoPause:!0,stateSanitizer:function(n){return{value:n.value,context:n.context,actions:n.actions}}},r),{features:ye({jump:!1,skip:!1},r?r.features:void 0)}),this.machine),this.devTools.init(this.state)}gF(this)}},e.prototype.toJSON=function(){return{id:this.id}},e.prototype[xn]=function(){return this},e.prototype.getSnapshot=function(){return this.status===Et.NotStarted?this.initialState:this._state},e.defaultOptions={execute:!0,deferEvents:!0,clock:{setTimeout:function(t,r){return setTimeout(t,r)},clearTimeout:function(t){return clearTimeout(t)}},logger:console.log.bind(console),devTools:!1},e.interpret=l1,e}();function l1(e,t){var r=new yF(e,t);return r}function wF(e){if(typeof e=="string"){var t={type:e};return t.toString=function(){return e},t}return e}function al(e){return ye(ye({type:Ff},e),{toJSON:function(){e.onDone,e.onError;var t=Nf(e,["onDone","onError"]);return ye(ye({},t),{type:Ff,src:wF(e.src)})}})}var zo="",Kf="#",Qi="*",Go={},Ko=function(e){return e[0]===Kf},_F=function(){return{actions:{},guards:{},services:{},activities:{},delays:{}}},EF=function(e,t,r){var n=r.slice(0,-1).some(function(i){return!("cond"in i)&&!("in"in i)&&(tt(i.target)||to(i.target))}),o=t===zo?"the transient event":"event '".concat(t,"'");Dt(!n,"One or more transitions for ".concat(o," on state '").concat(e.id,"' are unreachable. ")+"Make sure that the default transition is the last one defined.")},xF=function(){function e(t,r,n,o){n===void 0&&(n="context"in t?t.context:void 0);var i=this,a;this.config=t,this._context=n,this.order=-1,this.__xstatenode=!0,this.__cache={events:void 0,relativeValue:new Map,initialStateValue:void 0,initialState:void 0,on:void 0,transitions:void 0,candidates:{},delayedTransitions:void 0},this.idMap={},this.tags=[],this.options=Object.assign(_F(),r),this.parent=o?.parent,this.key=this.config.key||o?.key||this.config.id||"(machine)",this.machine=this.parent?this.parent.machine:this,this.path=this.parent?this.parent.path.concat(this.key):[],this.delimiter=this.config.delimiter||(this.parent?this.parent.delimiter:Wy),this.id=this.config.id||vt([this.machine.key],et(this.path),!1).join(this.delimiter),this.version=this.parent?this.parent.version:this.config.version,this.type=this.config.type||(this.config.parallel?"parallel":this.config.states&&Object.keys(this.config.states).length?"compound":this.config.history?"history":"atomic"),this.schema=this.parent?this.machine.schema:(a=this.config.schema)!==null&&a!==void 0?a:{},this.description=this.config.description,St||Dt(!("parallel"in this.config),'The "parallel" property is deprecated and will be removed in version 4.1. '.concat(this.config.parallel?"Replace with `type: 'parallel'`":"Use `type: '".concat(this.type,"'`")," in the config for state node '").concat(this.id,"' instead.")),this.initial=this.config.initial,this.states=this.config.states?Gi(this.config.states,function(u,f){var d,p=new e(u,{},void 0,{parent:i,key:f});return Object.assign(i.idMap,ye((d={},d[p.id]=p,d),p.idMap)),p}):Go;var s=0;function l(u){var f,d;u.order=s++;try{for(var p=He(r1(u)),h=p.next();!h.done;h=p.next()){var v=h.value;l(v)}}catch(g){f={error:g}}finally{try{h&&!h.done&&(d=p.return)&&d.call(p)}finally{if(f)throw f.error}}}l(this),this.history=this.config.history===!0?"shallow":this.config.history||!1,this._transient=!!this.config.always||(this.config.on?Array.isArray(this.config.on)?this.config.on.some(function(u){var f=u.event;return f===zo}):zo in this.config.on:!1),this.strict=!!this.config.strict,this.onEntry=_r(this.config.entry||this.config.onEntry).map(function(u){return Ki(u)}),this.onExit=_r(this.config.exit||this.config.onExit).map(function(u){return Ki(u)}),this.meta=this.config.meta,this.doneData=this.type==="final"?this.config.data:void 0,this.invoke=_r(this.config.invoke).map(function(u,f){var d,p;if(to(u)){var h=el(i.id,f);return i.machine.options.services=ye((d={},d[h]=u,d),i.machine.options.services),al({src:h,id:h})}else if(tt(u.src)){var h=u.id||el(i.id,f);return al(ye(ye({},u),{id:h,src:u.src}))}else if(to(u.src)||nt(u.src)){var h=u.id||el(i.id,f);return i.machine.options.services=ye((p={},p[h]=u.src,p),i.machine.options.services),al(ye(ye({id:h},u),{src:h}))}else{var v=u.src;return al(ye(ye({id:el(i.id,f)},u),{src:v}))}}),this.activities=_r(this.config.activities).concat(this.invoke).map(function(u){return Vf(u)}),this.transition=this.transition.bind(this),this.tags=_r(this.config.tags)}return e.prototype._init=function(){this.__cache.transitions||n1(this).forEach(function(t){return t.on})},e.prototype.withConfig=function(t,r){var n=this.options,o=n.actions,i=n.activities,a=n.guards,s=n.services,l=n.delays;return new e(this.config,{actions:ye(ye({},o),t.actions),activities:ye(ye({},i),t.activities),guards:ye(ye({},a),t.guards),services:ye(ye({},s),t.services),delays:ye(ye({},l),t.delays)},r??this.context)},e.prototype.withContext=function(t){return new e(this.config,this.options,t)},Object.defineProperty(e.prototype,"context",{get:function(){return nt(this._context)?this._context():this._context},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"definition",{get:function(){return{id:this.id,key:this.key,version:this.version,context:this.context,type:this.type,initial:this.initial,history:this.history,states:Gi(this.states,function(t){return t.definition}),on:this.on,transitions:this.transitions,entry:this.onEntry,exit:this.onExit,activities:this.activities||[],meta:this.meta,order:this.order||-1,data:this.doneData,invoke:this.invoke,description:this.description,tags:this.tags}},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.definition},Object.defineProperty(e.prototype,"on",{get:function(){if(this.__cache.on)return this.__cache.on;var t=this.transitions;return this.__cache.on=t.reduce(function(r,n){return r[n.eventType]=r[n.eventType]||[],r[n.eventType].push(n),r},{})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"after",{get:function(){return this.__cache.delayedTransitions||(this.__cache.delayedTransitions=this.getDelayedTransitions(),this.__cache.delayedTransitions)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"transitions",{get:function(){return this.__cache.transitions||(this.__cache.transitions=this.formatTransitions(),this.__cache.transitions)},enumerable:!1,configurable:!0}),e.prototype.getCandidates=function(t){if(this.__cache.candidates[t])return this.__cache.candidates[t];var r=t===zo,n=this.transitions.filter(function(o){var i=o.eventType===t;return r?i:i||o.eventType===Qi});return this.__cache.candidates[t]=n,n},e.prototype.getDelayedTransitions=function(){var t=this,r=this.config.after;if(!r)return[];var n=function(i,a){var s=nt(i)?"".concat(t.id,":delay[").concat(a,"]"):i,l=rF(s,t.id);return t.onEntry.push(qM(l,{delay:i})),t.onExit.push(XM(l)),l},o=Uo(r)?r.map(function(i,a){var s=n(i.delay,a);return ye(ye({},i),{event:s})}):wt(Object.keys(r).map(function(i,a){var s=r[i],l=tt(s)?{target:s}:s,u=isNaN(+i)?i:+i,f=n(u,a);return _r(l).map(function(d){return ye(ye({},d),{event:f,delay:u})})}));return o.map(function(i){var a=i.delay;return ye(ye({},t.formatTransition(i)),{delay:a})})},e.prototype.getStateNodes=function(t){var r,n=this;if(!t)return[];var o=t instanceof ur?t.value:zi(t,this.delimiter);if(tt(o)){var i=this.getStateNode(o).initial;return i!==void 0?this.getStateNodes((r={},r[o]=i,r)):[this,this.states[o]]}var a=Object.keys(o),s=[this];return s.push.apply(s,vt([],et(wt(a.map(function(l){return n.getStateNode(l).getStateNodes(o[l])}))),!1)),s},e.prototype.handles=function(t){var r=Hy(t);return this.events.includes(r)},e.prototype.resolveState=function(t){var r=t instanceof ur?t:ur.create(t),n=Array.from(Ji([],this.getStateNodes(r.value)));return new ur(ye(ye({},r),{value:this.resolve(r.value),configuration:n,done:il(n,this),tags:i1(n),machine:this.machine}))},e.prototype.transitionLeafNode=function(t,r,n){var o=this.getStateNode(t),i=o.next(r,n);return!i||!i.transitions.length?this.next(r,n):i},e.prototype.transitionCompoundNode=function(t,r,n){var o=Object.keys(t),i=this.getStateNode(o[0]),a=i._transition(t[o[0]],r,n);return!a||!a.transitions.length?this.next(r,n):a},e.prototype.transitionParallelNode=function(t,r,n){var o,i,a={};try{for(var s=He(Object.keys(t)),l=s.next();!l.done;l=s.next()){var u=l.value,f=t[u];if(f){var d=this.getStateNode(u),p=d._transition(f,r,n);p&&(a[u]=p)}}}catch(m){o={error:m}}finally{try{l&&!l.done&&(i=s.return)&&i.call(s)}finally{if(o)throw o.error}}var h=Object.keys(a).map(function(m){return a[m]}),v=wt(h.map(function(m){return m.transitions})),g=h.some(function(m){return m.transitions.length>0});if(!g)return this.next(r,n);var y=wt(Object.keys(a).map(function(m){return a[m].configuration}));return{transitions:v,exitSet:wt(h.map(function(m){return m.exitSet})),configuration:y,source:r,actions:wt(Object.keys(a).map(function(m){return a[m].actions}))}},e.prototype._transition=function(t,r,n){return tt(t)?this.transitionLeafNode(t,r,n):Object.keys(t).length===1?this.transitionCompoundNode(t,r,n):this.transitionParallelNode(t,r,n)},e.prototype.getTransitionData=function(t,r){return this._transition(t.value,t,Lt(r))},e.prototype.next=function(t,r){var n,o,i=this,a=r.name,s=[],l=[],u;try{for(var f=He(this.getCandidates(a)),d=f.next();!d.done;d=f.next()){var p=d.value,h=p.cond,v=p.in,g=t.context,y=v?tt(v)&&Ko(v)?t.matches(zi(this.getStateNodeById(v).path,this.delimiter)):Bf(zi(v,this.delimiter),MM(this.path.slice(0,-2))(t.value)):!0,m=!1;try{m=!h||Xy(this.machine,h,g,r,t)}catch(x){throw new Error("Unable to evaluate guard '".concat(h.name||h.type,"' in transition for event '").concat(a,"' in state node '").concat(this.id,`':
|
|
206
|
+
`).concat(x.message))}if(m&&y){p.target!==void 0&&(l=p.target),s.push.apply(s,vt([],et(p.actions),!1)),u=p;break}}}catch(x){n={error:x}}finally{try{d&&!d.done&&(o=f.return)&&o.call(f)}finally{if(n)throw n.error}}if(u){if(!l.length)return{transitions:[u],exitSet:[],configuration:t.value?[this]:[],source:t,actions:s};var w=wt(l.map(function(x){return i.getRelativeStateNodes(x,t.historyValue)})),E=!!u.internal;return{transitions:[u],exitSet:E?[]:wt(l.map(function(x){return i.getPotentiallyReenteringNodes(x)})),configuration:w,source:t,actions:s}}},e.prototype.getPotentiallyReenteringNodes=function(t){if(this.order<t.order)return[this];for(var r=[],n=this,o=t;n&&n!==o;)r.push(n),n=n.parent;return n!==o?[]:(r.push(o),r)},e.prototype.getActions=function(t,r,n,o,i,a,s){var l,u,f,d,p=this,h=a?Ji([],this.getStateNodes(a.value)):[],v=new Set;try{for(var g=He(Array.from(t).sort(function(D,N){return D.order-N.order})),y=g.next();!y.done;y=g.next()){var m=y.value;(!Xi(h,m)||Xi(n.exitSet,m)||m.parent&&v.has(m.parent))&&v.add(m)}}catch(D){l={error:D}}finally{try{y&&!y.done&&(u=g.return)&&u.call(g)}finally{if(l)throw l.error}}try{for(var w=He(h),E=w.next();!E.done;E=w.next()){var m=E.value;(!Xi(t,m)||Xi(n.exitSet,m.parent))&&n.exitSet.push(m)}}catch(D){f={error:D}}finally{try{E&&!E.done&&(d=w.return)&&d.call(w)}finally{if(f)throw f.error}}n.exitSet.sort(function(D,N){return N.order-D.order});var x=Array.from(v).sort(function(D,N){return D.order-N.order}),P=new Set(n.exitSet),I=wt(x.map(function(D){var N=[];if(D.type!=="final")return N;var J=D.parent;if(!J.parent)return N;N.push(tl(D.id,D.doneData),tl(J.id,D.doneData?Xs(D.doneData,o,i):void 0));var K=J.parent;return K.type==="parallel"&&Yi(K).every(function(Y){return il(n.configuration,Y)})&&N.push(tl(K.id)),N})),S=x.map(function(D){var N=D.onEntry,J=D.activities.map(function(K){return ZM(K)});return{type:"entry",actions:Sn(s?vt(vt([],et(N),!1),et(J),!1):vt(vt([],et(J),!1),et(N),!1),p.machine.options.actions)}}).concat({type:"state_done",actions:I.map(function(D){return GM(D)})}),A=Array.from(P).map(function(D){return{type:"exit",actions:Sn(vt(vt([],et(D.onExit),!1),et(D.activities.map(function(N){return QM(N)})),!1),p.machine.options.actions)}}),k=A.concat({type:"transition",actions:Sn(n.actions,this.machine.options.actions)}).concat(S);if(r){var j=Sn(wt(vt([],et(t),!1).sort(function(D,N){return N.order-D.order}).map(function(D){return D.onExit})),this.machine.options.actions).filter(function(D){return!Uf(D)});return k.concat({type:"stop",actions:j})}return k},e.prototype.transition=function(t,r,n,o){t===void 0&&(t=this.initialState);var i=Lt(r),a;if(t instanceof ur)a=n===void 0?t:this.resolveState(ur.from(t,n));else{var s=tt(t)?this.resolve(Ys(this.getResolvedPath(t))):this.resolve(t),l=n??this.machine.context;a=this.resolveState(ur.from(s,l))}if(!St&&i.name===Qi)throw new Error("An event cannot have the wildcard type ('".concat(Qi,"')"));if(this.strict&&!this.events.includes(i.name)&&!jM(i.name))throw new Error("Machine '".concat(this.id,"' does not accept event '").concat(i.name,"'"));var u=this._transition(a.value,a,i)||{transitions:[],configuration:[],exitSet:[],source:a,actions:[]},f=Ji([],this.getStateNodes(a.value)),d=u.configuration.length?Ji(f,u.configuration):f;return u.configuration=vt([],et(d),!1),this.resolveTransition(u,a,a.context,o,i)},e.prototype.resolveRaisedTransition=function(t,r,n,o){var i,a=t.actions;return t=this.transition(t,r,void 0,o),t._event=n,t.event=n.data,(i=t.actions).unshift.apply(i,vt([],et(a),!1)),t},e.prototype.resolveTransition=function(t,r,n,o,i){var a,s,l,u,f=this;i===void 0&&(i=Vo);var d=t.configuration,p=!r||t.transitions.length>0,h=p?t.configuration:r?r.configuration:[],v=il(h,this),g=p?lF(this.machine,d):void 0,y=r?r.historyValue?r.historyValue:t.source?this.machine.historyValue(r.value):void 0:void 0,m=this.getActions(new Set(h),v,t,n,i,r,o),w=r?ye({},r.activities):{};try{for(var E=He(m),x=E.next();!x.done;x=E.next()){var P=x.value;try{for(var I=(l=void 0,He(P.actions)),S=I.next();!S.done;S=I.next()){var A=S.value;A.type===Df?w[A.activity.id||A.activity.type]=A:A.type===Lf&&(w[A.activity.id||A.activity.type]=!1)}}catch(re){l={error:re}}finally{try{S&&!S.done&&(u=I.return)&&u.call(I)}finally{if(l)throw l.error}}}}catch(re){a={error:re}}finally{try{x&&!x.done&&(s=E.return)&&s.call(E)}finally{if(a)throw a.error}}var k=et(nl(this,r,n,i,m,o,this.machine.config.predictableActionArguments||this.machine.config.preserveActionOrder),2),j=k[0],D=k[1],N=et(RM(j,Uf),2),J=N[0],K=N[1],Y=j.filter(function(re){var de;return re.type===Df&&((de=re.activity)===null||de===void 0?void 0:de.type)===Ff}),te=Y.reduce(function(re,de){return re[de.activity.id]=oF(de.activity,f.machine,D,i),re},r?ye({},r.children):{}),oe=new ur({value:g||r.value,context:D,_event:i,_sessionid:r?r._sessionid:null,historyValue:g?y?UM(y,g):void 0:r?r.historyValue:void 0,history:!g||t.source?r:void 0,actions:g?K:[],activities:g?w:r?r.activities:{},events:[],configuration:h,transitions:t.transitions,children:te,done:v,tags:i1(h),machine:this}),le=n!==D;oe.changed=i.name===Uy||le;var ae=oe.history;ae&&delete ae.history;var ve=!v&&(this._transient||d.some(function(re){return re._transient}));if(!p&&(!ve||i.name===zo))return oe;var ce=oe;if(!v)for(ve&&(ce=this.resolveRaisedTransition(ce,{type:TM},i,o));J.length;){var q=J.shift();ce=this.resolveRaisedTransition(ce,q._event,i,o)}var V=ce.changed||(ae?!!ce.actions.length||le||typeof ae.value!=typeof ce.value||!a1(ce.value,ae.value):void 0);return ce.changed=V,ce.history=ae,ce},e.prototype.getStateNode=function(t){if(Ko(t))return this.machine.getStateNodeById(t);if(!this.states)throw new Error("Unable to retrieve child state '".concat(t,"' from '").concat(this.id,"'; no child states exist."));var r=this.states[t];if(!r)throw new Error("Child state '".concat(t,"' does not exist on '").concat(this.id,"'"));return r},e.prototype.getStateNodeById=function(t){var r=Ko(t)?t.slice(Kf.length):t;if(r===this.id)return this;var n=this.machine.idMap[r];if(!n)throw new Error("Child state node '#".concat(r,"' does not exist on machine '").concat(this.id,"'"));return n},e.prototype.getStateNodeByPath=function(t){if(typeof t=="string"&&Ko(t))try{return this.getStateNodeById(t.slice(1))}catch{}for(var r=Rf(t,this.delimiter).slice(),n=this;r.length;){var o=r.shift();if(!o.length)break;n=n.getStateNode(o)}return n},e.prototype.resolve=function(t){var r,n=this;if(!t)return this.initialStateValue||Go;switch(this.type){case"parallel":return Gi(this.initialStateValue,function(i,a){return i?n.getStateNode(a).resolve(t[a]||i):Go});case"compound":if(tt(t)){var o=this.getStateNode(t);return o.type==="parallel"||o.type==="compound"?(r={},r[t]=o.initialStateValue,r):t}return Object.keys(t).length?Gi(t,function(i,a){return i?n.getStateNode(a).resolve(i):Go}):this.initialStateValue||{};default:return t||Go}},e.prototype.getResolvedPath=function(t){if(Ko(t)){var r=this.machine.idMap[t.slice(Kf.length)];if(!r)throw new Error("Unable to find state node '".concat(t,"'"));return r.path}return Rf(t,this.delimiter)},Object.defineProperty(e.prototype,"initialStateValue",{get:function(){var t;if(this.__cache.initialStateValue)return this.__cache.initialStateValue;var r;if(this.type==="parallel")r=zy(this.states,function(n){return n.initialStateValue||Go},function(n){return n.type!=="history"});else if(this.initial!==void 0){if(!this.states[this.initial])throw new Error("Initial state '".concat(this.initial,"' not found on '").concat(this.key,"'"));r=ol(this.states[this.initial])?this.initial:(t={},t[this.initial]=this.states[this.initial].initialStateValue,t)}else r={};return this.__cache.initialStateValue=r,this.__cache.initialStateValue},enumerable:!1,configurable:!0}),e.prototype.getInitialState=function(t,r){this._init();var n=this.getStateNodes(t);return this.resolveTransition({configuration:n,exitSet:[],transitions:[],source:void 0,actions:[]},void 0,r??this.machine.context,void 0)},Object.defineProperty(e.prototype,"initialState",{get:function(){var t=this.initialStateValue;if(!t)throw new Error("Cannot retrieve initial state from simple state '".concat(this.id,"'."));return this.getInitialState(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){var t;if(this.type==="history"){var r=this.config;tt(r.target)?t=Ko(r.target)?Ys(this.machine.getStateNodeById(r.target).path.slice(this.path.length-1)):r.target:t=r.target}return t},enumerable:!1,configurable:!0}),e.prototype.getRelativeStateNodes=function(t,r,n){return n===void 0&&(n=!0),n?t.type==="history"?t.resolveHistory(r):t.initialStateNodes:[t]},Object.defineProperty(e.prototype,"initialStateNodes",{get:function(){var t=this;if(ol(this))return[this];if(this.type==="compound"&&!this.initial)return St||Dt(!1,"Compound state node '".concat(this.id,"' has no initial state.")),[this];var r=Js(this.initialStateValue);return wt(r.map(function(n){return t.getFromRelativePath(n)}))},enumerable:!1,configurable:!0}),e.prototype.getFromRelativePath=function(t){if(!t.length)return[this];var r=et(t),n=r[0],o=r.slice(1);if(!this.states)throw new Error("Cannot retrieve subPath '".concat(n,"' from node with no states"));var i=this.getStateNode(n);if(i.type==="history")return i.resolveHistory();if(!this.states[n])throw new Error("Child state '".concat(n,"' does not exist on '").concat(this.id,"'"));return this.states[n].getFromRelativePath(o)},e.prototype.historyValue=function(t){if(Object.keys(this.states).length)return{current:t||this.initialStateValue,states:zy(this.states,function(r,n){if(!t)return r.historyValue();var o=tt(t)?void 0:t[n];return r.historyValue(o||r.initialStateValue)},function(r){return!r.history})}},e.prototype.resolveHistory=function(t){var r=this;if(this.type!=="history")return[this];var n=this.parent;if(!t){var o=this.target;return o?wt(Js(o).map(function(a){return n.getFromRelativePath(a)})):n.initialStateNodes}var i=FM(n.path,"states")(t).current;return tt(i)?[n.getStateNode(i)]:wt(Js(i).map(function(a){return r.history==="deep"?n.getFromRelativePath(a):[n.states[a[0]]]}))},Object.defineProperty(e.prototype,"stateIds",{get:function(){var t=this,r=wt(Object.keys(this.states).map(function(n){return t.states[n].stateIds}));return[this.id].concat(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){var t,r,n,o;if(this.__cache.events)return this.__cache.events;var i=this.states,a=new Set(this.ownEvents);if(i)try{for(var s=He(Object.keys(i)),l=s.next();!l.done;l=s.next()){var u=l.value,f=i[u];if(f.states)try{for(var d=(n=void 0,He(f.events)),p=d.next();!p.done;p=d.next()){var h=p.value;a.add("".concat(h))}}catch(v){n={error:v}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(n)throw n.error}}}}catch(v){t={error:v}}finally{try{l&&!l.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return this.__cache.events=Array.from(a)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ownEvents",{get:function(){var t=new Set(this.transitions.filter(function(r){return!(!r.target&&!r.actions.length&&r.internal)}).map(function(r){return r.eventType}));return Array.from(t)},enumerable:!1,configurable:!0}),e.prototype.resolveTarget=function(t){var r=this;if(t!==void 0)return t.map(function(n){if(!tt(n))return n;var o=n[0]===r.delimiter;if(o&&!r.parent)return r.getStateNodeByPath(n.slice(1));var i=o?r.key+n:n;if(r.parent)try{var a=r.parent.getStateNodeByPath(i);return a}catch(s){throw new Error("Invalid transition definition for state node '".concat(r.id,`':
|
|
207
|
+
`).concat(s.message))}else return r.getStateNodeByPath(i)})},e.prototype.formatTransition=function(t){var r=this,n=HM(t.target),o="internal"in t?t.internal:n?n.some(function(l){return tt(l)&&l[0]===r.delimiter}):!0,i=this.machine.options.guards,a=this.resolveTarget(n),s=ye(ye({},t),{actions:Sn(_r(t.actions)),cond:Jy(t.cond,i),target:a,source:this,internal:o,eventType:t.event,toJSON:function(){return ye(ye({},s),{target:s.target?s.target.map(function(l){return"#".concat(l.id)}):void 0,source:"#".concat(r.id)})}});return s},e.prototype.formatTransitions=function(){var t,r,n=this,o;if(!this.config.on)o=[];else if(Array.isArray(this.config.on))o=this.config.on;else{var i=this.config.on,a=Qi,s=i[a],l=s===void 0?[]:s,u=Nf(i,[typeof a=="symbol"?a:a+""]);o=wt(Object.keys(u).map(function(w){!St&&w===zo&&Dt(!1,"Empty string transition configs (e.g., `{ on: { '': ... }}`) for transient transitions are deprecated. Specify the transition in the `{ always: ... }` property instead. "+'Please check the `on` configuration for "#'.concat(n.id,'".'));var E=Wo(w,u[w]);return St||EF(n,w,E),E}).concat(Wo(Qi,l)))}var f=this.config.always?Wo("",this.config.always):[],d=this.config.onDone?Wo(String(tl(this.id)),this.config.onDone):[];St||Dt(!(this.config.onDone&&!this.parent),'Root nodes cannot have an ".onDone" transition. Please check the config of "'.concat(this.id,'".'));var p=wt(this.invoke.map(function(w){var E=[];return w.onDone&&E.push.apply(E,vt([],et(Wo(String(rl(w.id)),w.onDone)),!1)),w.onError&&E.push.apply(E,vt([],et(Wo(String(qi(w.id)),w.onError)),!1)),E})),h=this.after,v=wt(vt(vt(vt(vt([],et(d),!1),et(p),!1),et(o),!1),et(f),!1).map(function(w){return _r(w).map(function(E){return n.formatTransition(E)})}));try{for(var g=He(h),y=g.next();!y.done;y=g.next()){var m=y.value;v.push(m)}}catch(w){t={error:w}}finally{try{y&&!y.done&&(r=g.return)&&r.call(g)}finally{if(t)throw t.error}}return v},e}(),c1=!1;function qf(e,t){return!St&&!("predictableActionArguments"in e)&&!c1&&(c1=!0,console.warn("It is highly recommended to set `predictableActionArguments` to `true` when using `createMachine`. https://xstate.js.org/docs/guides/actions.html")),new xF(e,t)}var Ht=tF,SF=c.useLayoutEffect;function u1(e){var t=ge.useRef();return t.current||(t.current={v:e()}),t.current.v}var sl=globalThis&&globalThis.__assign||function(){return sl=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},sl.apply(this,arguments)},$F=globalThis&&globalThis.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r},CF=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i};function OF(e,t){var r=u1(function(){return typeof e=="function"?e():e});if(process.env.NODE_ENV!=="production"&&typeof e!="function"){var n=CF(c.useState(r),1),o=n[0];e!==o&&console.warn("Machine given to `useMachine` has changed between renders. This is not supported and might lead to unexpected results.\nPlease make sure that you pass the same Machine as argument each time.")}var i=t.context,a=t.guards,s=t.actions,l=t.activities,u=t.services,f=t.delays;t.state;var d=$F(t,["context","guards","actions","activities","services","delays","state"]),p=u1(function(){var h={context:i,guards:a,actions:s,activities:l,services:u,delays:f},v=r.withConfig(h,function(){return sl(sl({},r.context),i)});return l1(v,d)});return SF(function(){Object.assign(p.machine.options.actions,s),Object.assign(p.machine.options.guards,a),Object.assign(p.machine.options.activities,l),Object.assign(p.machine.options.services,u),Object.assign(p.machine.options.delays,f)},[s,a,l,u,f]),p}globalThis&&globalThis.__read,globalThis&&globalThis.__values;function AF(e,t,r){if(e.status===Et.NotStarted)return!0;var n=r.changed===void 0&&(Object.keys(r.children).length>0||typeof t.changed=="boolean");return!(r.changed||n)}var TF=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return i};function IF(e){return e}function Yf(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var n=TF(t,1),o=n[0],i=o===void 0?{}:o,a=OF(e,i),s=c.useCallback(function(){return a.status===Et.NotStarted?i.state?ur.create(i.state):a.machine.initialState:a.getSnapshot()},[a]),l=c.useCallback(function(d,p){return AF(a,d,p)},[a]),u=c.useCallback(function(d){var p=a.subscribe(d).unsubscribe;return p},[a]),f=AM.useSyncExternalStoreWithSelector(u,s,s,IF,l);return c.useEffect(function(){var d=i.state;return a.start(d?ur.create(d):void 0),function(){a.stop(),a.status=Et.NotStarted}},[]),[f,a.send,a]}const PF=qf({id:"identity",predictableActionArguments:!0,context:{identity:null,identitySubscribable:null},initial:"choosingAction",invoke:{src:e=>e.identitySubscribable},states:{choosingAction:{},managingDeviceInvitation:{},managingDevices:{},managingProfile:{initial:"idle",states:{idle:{},pending:{}},on:{setIdentity:{target:"choosingAction",actions:["setIdentity","log"]},updateProfile:{target:".pending",actions:"log"}}}},on:{unchooseAction:{target:".choosingAction",actions:["unsetInvitation","log"]},deselectInvitation:{target:".choosingAction",actions:["unsetInvitation","log"]},selectInvitation:{target:".managingDeviceInvitation",actions:["setInvitation","log"]},chooseDevices:{target:".managingDevices",actions:"log"},chooseProfile:{target:".managingProfile",actions:"log"}}},{actions:{setIdentity:Ht({identity:(e,t)=>t?.identity??null}),setInvitation:Ht({invitation:(e,t)=>t?.invitation??null}),unsetInvitation:Ht({invitation:()=>{}}),log:(e,t)=>{Qe("[transition]",{event:t,context:e})}}}),kF=(e,t)=>Yf(PF,{...t,context:{...t?.context,identity:e.halo.identity.get(),identitySubscribable:e.halo.identity.map(r=>({type:"setIdentity",identity:r}))}}),NF=({devices:e,active:t,send:r})=>{const{t:n}=it("os"),o=!t;return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow"},c.createElement(xk,{devices:e})),c.createElement(nr,null,c.createElement(yt,{variant:"ghost",disabled:o,onClick:()=>r?.({type:"unchooseAction"}),"data-testid":"manage-devices-back"},n("back label"))))},DF=e=>{const{send:t}=e,r=Ze.useClient(),n=da.useHaloInvitations(),o=c.useCallback(a=>{const s=Tn.InvitationEncoder.encode(a);a.state===_e.State.CONNECTING&&console.log(JSON.stringify({invitationCode:s,authCode:a.authCode}))},[]),i=a=>{const s=a.altKey&&a.shiftKey;n.forEach(u=>u.cancel());const l=r.halo.share(s?{type:_e.Type.MULTIUSE,authMethod:_e.AuthMethod.NONE}:void 0);process.env.NODE_ENV!=="production"&&l.subscribe(o),t?.({type:"selectInvitation",invitation:l})};return c.createElement(LF,{...e,onCreateInvitationClick:a=>i(a)})},LF=({onCreateInvitationClick:e,active:t,send:r,onDone:n,doneActionParent:o})=>{const{t:i}=it("os");return c.createElement("div",{role:"none",className:"grow flex flex-col gap-1"},c.createElement(So,{density:"coarse"},c.createElement("div",{className:"grow justify-center flex flex-col gap-1"},c.createElement(yt,{disabled:!t,"data-testid":"devices-panel.create-invitation",onClick:e,classNames:"plb-4"},c.createElement(Xe.Plus,{className:Ke(6)}),c.createElement("span",{className:"grow mli-3"},i("choose add device label")),c.createElement(Xe.CaretRight,{weight:"bold",className:Ke(4)})),c.createElement(yt,{"data-testid":"manage-devices",onClick:()=>r?.({type:"chooseDevices"}),classNames:"plb-4"},c.createElement(Xe.Devices,{className:Ke(6)}),c.createElement("span",{className:"grow mli-3"},i("choose devices label")),c.createElement(Xe.CaretRight,{weight:"bold",className:Ke(4)})),c.createElement(yt,{"data-testid":"manage-profile",onClick:()=>r?.({type:"chooseProfile"}),classNames:"plb-4"},c.createElement(Xe.UserGear,{className:Ke(6)}),c.createElement("span",{className:"grow mli-3"},i("choose profile label")),c.createElement(Xe.CaretRight,{weight:"bold",className:Ke(4)})),c.createElement(yt,{disabled:!0,"data-testid":"sign-out",onClick:()=>{},classNames:"plb-4"},c.createElement(Xe.Power,{className:Ke(6)}),c.createElement("span",{className:"grow mli-3"},i("choose sign out label")),c.createElement(Xe.CaretRight,{weight:"bold",className:Ke(4)})))))},MF=e=>{const{onUpdateProfile:t}=e,{t:r}=it("os"),[n,o]=c.useState(""),i=async a=>{await t?.(a).catch(s=>{Qe.catch(s),o(r("failed to update profile message"))})};return c.createElement(FF,{...e,onUpdateProfile:i,validationMessage:n})},FF=e=>{const{active:t,profile:r,send:n,onUpdateProfile:o,validationMessage:i}=e,a=!t,{t:s}=it("os"),[l,u]=c.useState(r?.displayName??"");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Hs,{validationMessage:i,label:c.createElement(Rr,null,s("display name input label")),disabled:a,"data-testid":"display-name-input",placeholder:s("display name input placeholder"),value:l,onChange:({target:{value:f}})=>u(f),onKeyDown:({key:f})=>f==="Enter"&&o?.({displayName:l})})),c.createElement(nr,null,c.createElement(yt,{variant:"ghost",disabled:a,onClick:()=>n?.({type:"unchooseAction"}),"data-testid":"update-profile-form-back"},s("back label")),c.createElement(yt,{variant:"primary",disabled:a,onClick:()=>o?.({displayName:l}),"data-testid":"update-profile-form-continue"},s("done label"))))};var f1={exports:{}};(function(e,t){var r=function(){var n=function(P,I){var S=236,A=17,k=P,j=i[I],D=null,N=0,J=null,K=[],Y={},te=function(M,R){N=k*4+17,D=function(G){for(var O=new Array(G),T=0;T<G;T+=1){O[T]=new Array(G);for(var Z=0;Z<G;Z+=1)O[T][Z]=null}return O}(N),oe(0,0),oe(N-7,0),oe(0,N-7),ve(),ae(),q(M,R),k>=7&&ce(M),J==null&&(J=de(k,j,K)),V(J,R)},oe=function(M,R){for(var G=-1;G<=7;G+=1)if(!(M+G<=-1||N<=M+G))for(var O=-1;O<=7;O+=1)R+O<=-1||N<=R+O||(0<=G&&G<=6&&(O==0||O==6)||0<=O&&O<=6&&(G==0||G==6)||2<=G&&G<=4&&2<=O&&O<=4?D[M+G][R+O]=!0:D[M+G][R+O]=!1)},le=function(){for(var M=0,R=0,G=0;G<8;G+=1){te(!0,G);var O=s.getLostPoint(Y);(G==0||M>O)&&(M=O,R=G)}return R},ae=function(){for(var M=8;M<N-8;M+=1)D[M][6]==null&&(D[M][6]=M%2==0);for(var R=8;R<N-8;R+=1)D[6][R]==null&&(D[6][R]=R%2==0)},ve=function(){for(var M=s.getPatternPosition(k),R=0;R<M.length;R+=1)for(var G=0;G<M.length;G+=1){var O=M[R],T=M[G];if(D[O][T]==null)for(var Z=-2;Z<=2;Z+=1)for(var ne=-2;ne<=2;ne+=1)Z==-2||Z==2||ne==-2||ne==2||Z==0&&ne==0?D[O+Z][T+ne]=!0:D[O+Z][T+ne]=!1}},ce=function(M){for(var R=s.getBCHTypeNumber(k),G=0;G<18;G+=1){var O=!M&&(R>>G&1)==1;D[Math.floor(G/3)][G%3+N-8-3]=O}for(var G=0;G<18;G+=1){var O=!M&&(R>>G&1)==1;D[G%3+N-8-3][Math.floor(G/3)]=O}},q=function(M,R){for(var G=j<<3|R,O=s.getBCHTypeInfo(G),T=0;T<15;T+=1){var Z=!M&&(O>>T&1)==1;T<6?D[T][8]=Z:T<8?D[T+1][8]=Z:D[N-15+T][8]=Z}for(var T=0;T<15;T+=1){var Z=!M&&(O>>T&1)==1;T<8?D[8][N-T-1]=Z:T<9?D[8][15-T-1+1]=Z:D[8][15-T-1]=Z}D[N-8][8]=!M},V=function(M,R){for(var G=-1,O=N-1,T=7,Z=0,ne=s.getMaskFunction(R),pe=N-1;pe>0;pe-=2)for(pe==6&&(pe-=1);;){for(var me=0;me<2;me+=1)if(D[O][pe-me]==null){var xe=!1;Z<M.length&&(xe=(M[Z]>>>T&1)==1);var Ee=ne(O,pe-me);Ee&&(xe=!xe),D[O][pe-me]=xe,T-=1,T==-1&&(Z+=1,T=7)}if(O+=G,O<0||N<=O){O-=G,G=-G;break}}},re=function(M,R){for(var G=0,O=0,T=0,Z=new Array(R.length),ne=new Array(R.length),pe=0;pe<R.length;pe+=1){var me=R[pe].dataCount,xe=R[pe].totalCount-me;O=Math.max(O,me),T=Math.max(T,xe),Z[pe]=new Array(me);for(var Ee=0;Ee<Z[pe].length;Ee+=1)Z[pe][Ee]=255&M.getBuffer()[Ee+G];G+=me;var ie=s.getErrorCorrectPolynomial(xe),Ne=u(Z[pe],ie.getLength()-1),ft=Ne.mod(ie);ne[pe]=new Array(ie.getLength()-1);for(var Ee=0;Ee<ne[pe].length;Ee+=1){var Te=Ee+ft.getLength()-ne[pe].length;ne[pe][Ee]=Te>=0?ft.getAt(Te):0}}for(var Me=0,Ee=0;Ee<R.length;Ee+=1)Me+=R[Ee].totalCount;for(var mt=new Array(Me),$e=0,Ee=0;Ee<O;Ee+=1)for(var pe=0;pe<R.length;pe+=1)Ee<Z[pe].length&&(mt[$e]=Z[pe][Ee],$e+=1);for(var Ee=0;Ee<T;Ee+=1)for(var pe=0;pe<R.length;pe+=1)Ee<ne[pe].length&&(mt[$e]=ne[pe][Ee],$e+=1);return mt},de=function(M,R,G){for(var O=f.getRSBlocks(M,R),T=d(),Z=0;Z<G.length;Z+=1){var ne=G[Z];T.put(ne.getMode(),4),T.put(ne.getLength(),s.getLengthInBits(ne.getMode(),M)),ne.write(T)}for(var pe=0,Z=0;Z<O.length;Z+=1)pe+=O[Z].dataCount;if(T.getLengthInBits()>pe*8)throw"code length overflow. ("+T.getLengthInBits()+">"+pe*8+")";for(T.getLengthInBits()+4<=pe*8&&T.put(0,4);T.getLengthInBits()%8!=0;)T.putBit(!1);for(;!(T.getLengthInBits()>=pe*8||(T.put(S,8),T.getLengthInBits()>=pe*8));)T.put(A,8);return re(T,O)};Y.addData=function(M,R){R=R||"Byte";var G=null;switch(R){case"Numeric":G=p(M);break;case"Alphanumeric":G=h(M);break;case"Byte":G=v(M);break;case"Kanji":G=g(M);break;default:throw"mode:"+R}K.push(G),J=null},Y.isDark=function(M,R){if(M<0||N<=M||R<0||N<=R)throw M+","+R;return D[M][R]},Y.getModuleCount=function(){return N},Y.make=function(){if(k<1){for(var M=1;M<40;M++){for(var R=f.getRSBlocks(M,j),G=d(),O=0;O<K.length;O++){var T=K[O];G.put(T.getMode(),4),G.put(T.getLength(),s.getLengthInBits(T.getMode(),M)),T.write(G)}for(var Z=0,O=0;O<R.length;O++)Z+=R[O].dataCount;if(G.getLengthInBits()<=Z*8)break}k=M}te(!1,le())},Y.createTableTag=function(M,R){M=M||2,R=typeof R>"u"?M*4:R;var G="";G+='<table style="',G+=" border-width: 0px; border-style: none;",G+=" border-collapse: collapse;",G+=" padding: 0px; margin: "+R+"px;",G+='">',G+="<tbody>";for(var O=0;O<Y.getModuleCount();O+=1){G+="<tr>";for(var T=0;T<Y.getModuleCount();T+=1)G+='<td style="',G+=" border-width: 0px; border-style: none;",G+=" border-collapse: collapse;",G+=" padding: 0px; margin: 0px;",G+=" width: "+M+"px;",G+=" height: "+M+"px;",G+=" background-color: ",G+=Y.isDark(O,T)?"#000000":"#ffffff",G+=";",G+='"/>';G+="</tr>"}return G+="</tbody>",G+="</table>",G},Y.createSvgTag=function(M,R,G,O){var T={};typeof arguments[0]=="object"&&(T=arguments[0],M=T.cellSize,R=T.margin,G=T.alt,O=T.title),M=M||2,R=typeof R>"u"?M*4:R,G=typeof G=="string"?{text:G}:G||{},G.text=G.text||null,G.id=G.text?G.id||"qrcode-description":null,O=typeof O=="string"?{text:O}:O||{},O.text=O.text||null,O.id=O.text?O.id||"qrcode-title":null;var Z=Y.getModuleCount()*M+R*2,ne,pe,me,xe,Ee="",ie;for(ie="l"+M+",0 0,"+M+" -"+M+",0 0,-"+M+"z ",Ee+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',Ee+=T.scalable?"":' width="'+Z+'px" height="'+Z+'px"',Ee+=' viewBox="0 0 '+Z+" "+Z+'" ',Ee+=' preserveAspectRatio="xMinYMin meet"',Ee+=O.text||G.text?' role="img" aria-labelledby="'+U([O.id,G.id].join(" ").trim())+'"':"",Ee+=">",Ee+=O.text?'<title id="'+U(O.id)+'">'+U(O.text)+"</title>":"",Ee+=G.text?'<description id="'+U(G.id)+'">'+U(G.text)+"</description>":"",Ee+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',Ee+='<path d="',me=0;me<Y.getModuleCount();me+=1)for(xe=me*M+R,ne=0;ne<Y.getModuleCount();ne+=1)Y.isDark(me,ne)&&(pe=ne*M+R,Ee+="M"+pe+","+xe+ie);return Ee+='" stroke="transparent" fill="black"/>',Ee+="</svg>",Ee},Y.createDataURL=function(M,R){M=M||2,R=typeof R>"u"?M*4:R;var G=Y.getModuleCount()*M+R*2,O=R,T=G-R;return x(G,G,function(Z,ne){if(O<=Z&&Z<T&&O<=ne&&ne<T){var pe=Math.floor((Z-O)/M),me=Math.floor((ne-O)/M);return Y.isDark(me,pe)?0:1}else return 1})},Y.createImgTag=function(M,R,G){M=M||2,R=typeof R>"u"?M*4:R;var O=Y.getModuleCount()*M+R*2,T="";return T+="<img",T+=' src="',T+=Y.createDataURL(M,R),T+='"',T+=' width="',T+=O,T+='"',T+=' height="',T+=O,T+='"',G&&(T+=' alt="',T+=U(G),T+='"'),T+="/>",T};var U=function(M){for(var R="",G=0;G<M.length;G+=1){var O=M.charAt(G);switch(O){case"<":R+="<";break;case">":R+=">";break;case"&":R+="&";break;case'"':R+=""";break;default:R+=O;break}}return R},z=function(M){var R=1;M=typeof M>"u"?R*2:M;var G=Y.getModuleCount()*R+M*2,O=M,T=G-M,Z,ne,pe,me,xe,Ee={"██":"█","█ ":"▀"," █":"▄"," ":" "},ie={"██":"▀","█ ":"▀"," █":" "," ":" "},Ne="";for(Z=0;Z<G;Z+=2){for(pe=Math.floor((Z-O)/R),me=Math.floor((Z+1-O)/R),ne=0;ne<G;ne+=1)xe="█",O<=ne&&ne<T&&O<=Z&&Z<T&&Y.isDark(pe,Math.floor((ne-O)/R))&&(xe=" "),O<=ne&&ne<T&&O<=Z+1&&Z+1<T&&Y.isDark(me,Math.floor((ne-O)/R))?xe+=" ":xe+="█",Ne+=M<1&&Z+1>=T?ie[xe]:Ee[xe];Ne+=`
|
|
208
|
+
`}return G%2&&M>0?Ne.substring(0,Ne.length-G-1)+Array(G+1).join("▀"):Ne.substring(0,Ne.length-1)};return Y.createASCII=function(M,R){if(M=M||1,M<2)return z(R);M-=1,R=typeof R>"u"?M*2:R;var G=Y.getModuleCount()*M+R*2,O=R,T=G-R,Z,ne,pe,me,xe=Array(M+1).join("██"),Ee=Array(M+1).join(" "),ie="",Ne="";for(Z=0;Z<G;Z+=1){for(pe=Math.floor((Z-O)/M),Ne="",ne=0;ne<G;ne+=1)me=1,O<=ne&&ne<T&&O<=Z&&Z<T&&Y.isDark(pe,Math.floor((ne-O)/M))&&(me=0),Ne+=me?xe:Ee;for(pe=0;pe<M;pe+=1)ie+=Ne+`
|
|
209
|
+
`}return ie.substring(0,ie.length-1)},Y.renderTo2dContext=function(M,R){R=R||2;for(var G=Y.getModuleCount(),O=0;O<G;O++)for(var T=0;T<G;T++)M.fillStyle=Y.isDark(O,T)?"black":"white",M.fillRect(O*R,T*R,R,R)},Y};n.stringToBytesFuncs={default:function(P){for(var I=[],S=0;S<P.length;S+=1){var A=P.charCodeAt(S);I.push(A&255)}return I}},n.stringToBytes=n.stringToBytesFuncs.default,n.createStringToBytes=function(P,I){var S=function(){for(var k=w(P),j=function(){var ae=k.read();if(ae==-1)throw"eof";return ae},D=0,N={};;){var J=k.read();if(J==-1)break;var K=j(),Y=j(),te=j(),oe=String.fromCharCode(J<<8|K),le=Y<<8|te;N[oe]=le,D+=1}if(D!=I)throw D+" != "+I;return N}(),A="?".charCodeAt(0);return function(k){for(var j=[],D=0;D<k.length;D+=1){var N=k.charCodeAt(D);if(N<128)j.push(N);else{var J=S[k.charAt(D)];typeof J=="number"?(J&255)==J?j.push(J):(j.push(J>>>8),j.push(J&255)):j.push(A)}}return j}};var o={MODE_NUMBER:1<<0,MODE_ALPHA_NUM:1<<1,MODE_8BIT_BYTE:1<<2,MODE_KANJI:1<<3},i={L:1,M:0,Q:3,H:2},a={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},s=function(){var P=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],I=1<<10|1<<8|1<<5|1<<4|1<<2|1<<1|1<<0,S=1<<12|1<<11|1<<10|1<<9|1<<8|1<<5|1<<2|1<<0,A=1<<14|1<<12|1<<10|1<<4|1<<1,k={},j=function(D){for(var N=0;D!=0;)N+=1,D>>>=1;return N};return k.getBCHTypeInfo=function(D){for(var N=D<<10;j(N)-j(I)>=0;)N^=I<<j(N)-j(I);return(D<<10|N)^A},k.getBCHTypeNumber=function(D){for(var N=D<<12;j(N)-j(S)>=0;)N^=S<<j(N)-j(S);return D<<12|N},k.getPatternPosition=function(D){return P[D-1]},k.getMaskFunction=function(D){switch(D){case a.PATTERN000:return function(N,J){return(N+J)%2==0};case a.PATTERN001:return function(N,J){return N%2==0};case a.PATTERN010:return function(N,J){return J%3==0};case a.PATTERN011:return function(N,J){return(N+J)%3==0};case a.PATTERN100:return function(N,J){return(Math.floor(N/2)+Math.floor(J/3))%2==0};case a.PATTERN101:return function(N,J){return N*J%2+N*J%3==0};case a.PATTERN110:return function(N,J){return(N*J%2+N*J%3)%2==0};case a.PATTERN111:return function(N,J){return(N*J%3+(N+J)%2)%2==0};default:throw"bad maskPattern:"+D}},k.getErrorCorrectPolynomial=function(D){for(var N=u([1],0),J=0;J<D;J+=1)N=N.multiply(u([1,l.gexp(J)],0));return N},k.getLengthInBits=function(D,N){if(1<=N&&N<10)switch(D){case o.MODE_NUMBER:return 10;case o.MODE_ALPHA_NUM:return 9;case o.MODE_8BIT_BYTE:return 8;case o.MODE_KANJI:return 8;default:throw"mode:"+D}else if(N<27)switch(D){case o.MODE_NUMBER:return 12;case o.MODE_ALPHA_NUM:return 11;case o.MODE_8BIT_BYTE:return 16;case o.MODE_KANJI:return 10;default:throw"mode:"+D}else if(N<41)switch(D){case o.MODE_NUMBER:return 14;case o.MODE_ALPHA_NUM:return 13;case o.MODE_8BIT_BYTE:return 16;case o.MODE_KANJI:return 12;default:throw"mode:"+D}else throw"type:"+N},k.getLostPoint=function(D){for(var N=D.getModuleCount(),J=0,K=0;K<N;K+=1)for(var Y=0;Y<N;Y+=1){for(var te=0,oe=D.isDark(K,Y),le=-1;le<=1;le+=1)if(!(K+le<0||N<=K+le))for(var ae=-1;ae<=1;ae+=1)Y+ae<0||N<=Y+ae||le==0&&ae==0||oe==D.isDark(K+le,Y+ae)&&(te+=1);te>5&&(J+=3+te-5)}for(var K=0;K<N-1;K+=1)for(var Y=0;Y<N-1;Y+=1){var ve=0;D.isDark(K,Y)&&(ve+=1),D.isDark(K+1,Y)&&(ve+=1),D.isDark(K,Y+1)&&(ve+=1),D.isDark(K+1,Y+1)&&(ve+=1),(ve==0||ve==4)&&(J+=3)}for(var K=0;K<N;K+=1)for(var Y=0;Y<N-6;Y+=1)D.isDark(K,Y)&&!D.isDark(K,Y+1)&&D.isDark(K,Y+2)&&D.isDark(K,Y+3)&&D.isDark(K,Y+4)&&!D.isDark(K,Y+5)&&D.isDark(K,Y+6)&&(J+=40);for(var Y=0;Y<N;Y+=1)for(var K=0;K<N-6;K+=1)D.isDark(K,Y)&&!D.isDark(K+1,Y)&&D.isDark(K+2,Y)&&D.isDark(K+3,Y)&&D.isDark(K+4,Y)&&!D.isDark(K+5,Y)&&D.isDark(K+6,Y)&&(J+=40);for(var ce=0,Y=0;Y<N;Y+=1)for(var K=0;K<N;K+=1)D.isDark(K,Y)&&(ce+=1);var q=Math.abs(100*ce/N/N-50)/5;return J+=q*10,J},k}(),l=function(){for(var P=new Array(256),I=new Array(256),S=0;S<8;S+=1)P[S]=1<<S;for(var S=8;S<256;S+=1)P[S]=P[S-4]^P[S-5]^P[S-6]^P[S-8];for(var S=0;S<255;S+=1)I[P[S]]=S;var A={};return A.glog=function(k){if(k<1)throw"glog("+k+")";return I[k]},A.gexp=function(k){for(;k<0;)k+=255;for(;k>=256;)k-=255;return P[k]},A}();function u(P,I){if(typeof P.length>"u")throw P.length+"/"+I;var S=function(){for(var k=0;k<P.length&&P[k]==0;)k+=1;for(var j=new Array(P.length-k+I),D=0;D<P.length-k;D+=1)j[D]=P[D+k];return j}(),A={};return A.getAt=function(k){return S[k]},A.getLength=function(){return S.length},A.multiply=function(k){for(var j=new Array(A.getLength()+k.getLength()-1),D=0;D<A.getLength();D+=1)for(var N=0;N<k.getLength();N+=1)j[D+N]^=l.gexp(l.glog(A.getAt(D))+l.glog(k.getAt(N)));return u(j,0)},A.mod=function(k){if(A.getLength()-k.getLength()<0)return A;for(var j=l.glog(A.getAt(0))-l.glog(k.getAt(0)),D=new Array(A.getLength()),N=0;N<A.getLength();N+=1)D[N]=A.getAt(N);for(var N=0;N<k.getLength();N+=1)D[N]^=l.gexp(l.glog(k.getAt(N))+j);return u(D,0).mod(k)},A}var f=function(){var P=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],I=function(k,j){var D={};return D.totalCount=k,D.dataCount=j,D},S={},A=function(k,j){switch(j){case i.L:return P[(k-1)*4+0];case i.M:return P[(k-1)*4+1];case i.Q:return P[(k-1)*4+2];case i.H:return P[(k-1)*4+3];default:return}};return S.getRSBlocks=function(k,j){var D=A(k,j);if(typeof D>"u")throw"bad rs block @ typeNumber:"+k+"/errorCorrectionLevel:"+j;for(var N=D.length/3,J=[],K=0;K<N;K+=1)for(var Y=D[K*3+0],te=D[K*3+1],oe=D[K*3+2],le=0;le<Y;le+=1)J.push(I(te,oe));return J},S}(),d=function(){var P=[],I=0,S={};return S.getBuffer=function(){return P},S.getAt=function(A){var k=Math.floor(A/8);return(P[k]>>>7-A%8&1)==1},S.put=function(A,k){for(var j=0;j<k;j+=1)S.putBit((A>>>k-j-1&1)==1)},S.getLengthInBits=function(){return I},S.putBit=function(A){var k=Math.floor(I/8);P.length<=k&&P.push(0),A&&(P[k]|=128>>>I%8),I+=1},S},p=function(P){var I=o.MODE_NUMBER,S=P,A={};A.getMode=function(){return I},A.getLength=function(D){return S.length},A.write=function(D){for(var N=S,J=0;J+2<N.length;)D.put(k(N.substring(J,J+3)),10),J+=3;J<N.length&&(N.length-J==1?D.put(k(N.substring(J,J+1)),4):N.length-J==2&&D.put(k(N.substring(J,J+2)),7))};var k=function(D){for(var N=0,J=0;J<D.length;J+=1)N=N*10+j(D.charAt(J));return N},j=function(D){if("0"<=D&&D<="9")return D.charCodeAt(0)-"0".charCodeAt(0);throw"illegal char :"+D};return A},h=function(P){var I=o.MODE_ALPHA_NUM,S=P,A={};A.getMode=function(){return I},A.getLength=function(j){return S.length},A.write=function(j){for(var D=S,N=0;N+1<D.length;)j.put(k(D.charAt(N))*45+k(D.charAt(N+1)),11),N+=2;N<D.length&&j.put(k(D.charAt(N)),6)};var k=function(j){if("0"<=j&&j<="9")return j.charCodeAt(0)-"0".charCodeAt(0);if("A"<=j&&j<="Z")return j.charCodeAt(0)-"A".charCodeAt(0)+10;switch(j){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+j}};return A},v=function(P){var I=o.MODE_8BIT_BYTE,S=n.stringToBytes(P),A={};return A.getMode=function(){return I},A.getLength=function(k){return S.length},A.write=function(k){for(var j=0;j<S.length;j+=1)k.put(S[j],8)},A},g=function(P){var I=o.MODE_KANJI,S=n.stringToBytesFuncs.SJIS;if(!S)throw"sjis not supported.";(function(j,D){var N=S(j);if(N.length!=2||(N[0]<<8|N[1])!=D)throw"sjis not supported."})("友",38726);var A=S(P),k={};return k.getMode=function(){return I},k.getLength=function(j){return~~(A.length/2)},k.write=function(j){for(var D=A,N=0;N+1<D.length;){var J=(255&D[N])<<8|255&D[N+1];if(33088<=J&&J<=40956)J-=33088;else if(57408<=J&&J<=60351)J-=49472;else throw"illegal char at "+(N+1)+"/"+J;J=(J>>>8&255)*192+(J&255),j.put(J,13),N+=2}if(N<D.length)throw"illegal char at "+(N+1)},k},y=function(){var P=[],I={};return I.writeByte=function(S){P.push(S&255)},I.writeShort=function(S){I.writeByte(S),I.writeByte(S>>>8)},I.writeBytes=function(S,A,k){A=A||0,k=k||S.length;for(var j=0;j<k;j+=1)I.writeByte(S[j+A])},I.writeString=function(S){for(var A=0;A<S.length;A+=1)I.writeByte(S.charCodeAt(A))},I.toByteArray=function(){return P},I.toString=function(){var S="";S+="[";for(var A=0;A<P.length;A+=1)A>0&&(S+=","),S+=P[A];return S+="]",S},I},m=function(){var P=0,I=0,S=0,A="",k={},j=function(N){A+=String.fromCharCode(D(N&63))},D=function(N){if(!(N<0)){if(N<26)return 65+N;if(N<52)return 97+(N-26);if(N<62)return 48+(N-52);if(N==62)return 43;if(N==63)return 47}throw"n:"+N};return k.writeByte=function(N){for(P=P<<8|N&255,I+=8,S+=1;I>=6;)j(P>>>I-6),I-=6},k.flush=function(){if(I>0&&(j(P<<6-I),P=0,I=0),S%3!=0)for(var N=3-S%3,J=0;J<N;J+=1)A+="="},k.toString=function(){return A},k},w=function(P){var I=P,S=0,A=0,k=0,j={};j.read=function(){for(;k<8;){if(S>=I.length){if(k==0)return-1;throw"unexpected end of file./"+k}var N=I.charAt(S);if(S+=1,N=="=")return k=0,-1;if(N.match(/^\s$/))continue;A=A<<6|D(N.charCodeAt(0)),k+=6}var J=A>>>k-8&255;return k-=8,J};var D=function(N){if(65<=N&&N<=90)return N-65;if(97<=N&&N<=122)return N-97+26;if(48<=N&&N<=57)return N-48+52;if(N==43)return 62;if(N==47)return 63;throw"c:"+N};return j},E=function(P,I){var S=P,A=I,k=new Array(P*I),j={};j.setPixel=function(K,Y,te){k[Y*S+K]=te},j.write=function(K){K.writeString("GIF87a"),K.writeShort(S),K.writeShort(A),K.writeByte(128),K.writeByte(0),K.writeByte(0),K.writeByte(0),K.writeByte(0),K.writeByte(0),K.writeByte(255),K.writeByte(255),K.writeByte(255),K.writeString(","),K.writeShort(0),K.writeShort(0),K.writeShort(S),K.writeShort(A),K.writeByte(0);var Y=2,te=N(Y);K.writeByte(Y);for(var oe=0;te.length-oe>255;)K.writeByte(255),K.writeBytes(te,oe,255),oe+=255;K.writeByte(te.length-oe),K.writeBytes(te,oe,te.length-oe),K.writeByte(0),K.writeString(";")};var D=function(K){var Y=K,te=0,oe=0,le={};return le.write=function(ae,ve){if(ae>>>ve)throw"length over";for(;te+ve>=8;)Y.writeByte(255&(ae<<te|oe)),ve-=8-te,ae>>>=8-te,oe=0,te=0;oe=ae<<te|oe,te=te+ve},le.flush=function(){te>0&&Y.writeByte(oe)},le},N=function(K){for(var Y=1<<K,te=(1<<K)+1,oe=K+1,le=J(),ae=0;ae<Y;ae+=1)le.add(String.fromCharCode(ae));le.add(String.fromCharCode(Y)),le.add(String.fromCharCode(te));var ve=y(),ce=D(ve);ce.write(Y,oe);var q=0,V=String.fromCharCode(k[q]);for(q+=1;q<k.length;){var re=String.fromCharCode(k[q]);q+=1,le.contains(V+re)?V=V+re:(ce.write(le.indexOf(V),oe),le.size()<4095&&(le.size()==1<<oe&&(oe+=1),le.add(V+re)),V=re)}return ce.write(le.indexOf(V),oe),ce.write(te,oe),ce.flush(),ve.toByteArray()},J=function(){var K={},Y=0,te={};return te.add=function(oe){if(te.contains(oe))throw"dup key:"+oe;K[oe]=Y,Y+=1},te.size=function(){return Y},te.indexOf=function(oe){return K[oe]},te.contains=function(oe){return typeof K[oe]<"u"},te};return j},x=function(P,I,S){for(var A=E(P,I),k=0;k<I;k+=1)for(var j=0;j<P;j+=1)A.setPixel(j,k,S(j,k));var D=y();A.write(D);for(var N=m(),J=D.toByteArray(),K=0;K<J.length;K+=1)N.writeByte(J[K]);return N.flush(),"data:image/gif;base64,"+N};return n}();(function(){r.stringToBytesFuncs["UTF-8"]=function(n){function o(i){for(var a=[],s=0;s<i.length;s++){var l=i.charCodeAt(s);l<128?a.push(l):l<2048?a.push(192|l>>6,128|l&63):l<55296||l>=57344?a.push(224|l>>12,128|l>>6&63,128|l&63):(s++,l=65536+((l&1023)<<10|i.charCodeAt(s)&1023),a.push(240|l>>18,128|l>>12&63,128|l>>6&63,128|l&63))}return a}return o(n)}})(),function(n){e.exports=n()}(function(){return r})})(f1);var jF=f1.exports;const Jf=In(jF);var BF=Object.defineProperty,ll=Object.getOwnPropertySymbols,d1=Object.prototype.hasOwnProperty,p1=Object.prototype.propertyIsEnumerable,h1=(e,t,r)=>t in e?BF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,RF=(e,t)=>{for(var r in t||(t={}))d1.call(t,r)&&h1(e,r,t[r]);if(ll)for(var r of ll(t))p1.call(t,r)&&h1(e,r,t[r]);return e},UF=(e,t)=>{var r={};for(var n in e)d1.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&ll)for(var n of ll(e))t.indexOf(n)<0&&p1.call(e,n)&&(r[n]=e[n]);return r},en=1e3,WF=/code length overflow/i;Jf.stringToBytes=Jf.stringToBytesFuncs["UTF-8"];var VF=(e,t,r)=>{r=Math.max(1,r);for(let n=r;n<=40;n+=1)try{const o=Jf(n,t);o.addData(e),o.make();const i=o.getModuleCount();return{text:e,level:t,version:n,moduleCount:i,isDark:(s,l)=>s>=0&&s<i&&l>=0&&l<i&&o.isDark(s,l)}}catch(o){if(!(n<40&&WF.test(String(o))))throw o}return null},$n=Math.round,qo=(e,t)=>`M ${$n(e)} ${$n(t)}`,Bt=(e,t)=>`L ${$n(e)} ${$n(t)}`,Cn=(e,t,r)=>`A ${$n(r)} ${$n(r)} 0 0 1 ${$n(e)} ${$n(t)}`,HF=(e,t,r,n,o,i,a,s,l)=>{const u=[];return i?u.push(qo(e+o,t)):u.push(qo(e,t)),a?u.push(Bt(r-o,t),Cn(r,t+o,o)):u.push(Bt(r,t)),s?u.push(Bt(r,n-o),Cn(r-o,n,o)):u.push(Bt(r,n)),l?u.push(Bt(e+o,n),Cn(e,n-o,o)):u.push(Bt(e,n)),i?u.push(Bt(e,t+o),Cn(e+o,t,o)):u.push(Bt(e,t)),u.join(" ")},zF=(e,t,r,n,o,i,a,s,l)=>{const u=[];return i&&u.push(qo(e+o,t),Bt(e,t),Bt(e,t+o),Cn(e+o,t,o)),a&&u.push(qo(r,t+o),Bt(r,t),Bt(r-o,t),Cn(r,t+o,o)),s&&u.push(qo(r-o,n),Bt(r,n),Bt(r,n-o),Cn(r-o,n,o)),l&&u.push(qo(e,n-o),Bt(e,n),Bt(e+o,n),Cn(e,n-o,o)),u.join(" ")},GF=(e,t,r,n,o)=>{const i=o*r,a=n*r,s=i+r,l=a+r,u=t*.005*r,f=e.isDark,d=n-1,p=n+1,h=o-1,v=o+1,g=f(n,o),y=f(d,h),m=f(d,o),w=f(d,v),E=f(n,v),x=f(p,v),P=f(p,o),I=f(p,h),S=f(n,h);return g?HF(i,a,s,l,u,!m&&!S,!m&&!E,!P&&!E,!P&&!S):zF(i,a,s,l,u,m&&S&&y,m&&E&&w,P&&E&&x,P&&S&&I)},KF=(e,t)=>{if(!e)return"";const r=e.moduleCount,n=en/r,o=[];for(let i=0;i<r;i+=1)for(let a=0;a<r;a+=1)o.push(GF(e,t,n,i,a));return o.join(" ")},qF=e=>{var t=e,{color:r="#000",backgroundColor:n,cutout:o=!1,cutoutElement:i,errorCorrectionLevel:a="Q",rounding:s=0,children:l}=t,u=UF(t,["color","backgroundColor","cutout","cutoutElement","errorCorrectionLevel","rounding","children"]),f,d;const p=c.useMemo(()=>VF(l,a,1),[l,a]);if(!p)return null;const h=(f=p?.moduleCount)!=null?f:1,g=en/((d=p?.moduleCount)!=null?d:1)*(Math.floor(h*.18)*2-1)+2,y=(en-g)/2;return ge.createElement("svg",RF({xmlns:"http://www.w3.org/2000/svg",viewBox:`0 0 ${en} ${en}`},u),o?ge.createElement("mask",{id:"react-qr-rounded__mask"},ge.createElement("rect",{x:"0",y:"0",width:en,height:en,fill:"#fff"}),ge.createElement("rect",{x:y,y,width:g,height:g,rx:s,ry:s,fill:"#000"})):null,n?ge.createElement("rect",{x:"0",y:"0",width:en,height:en,fill:n}):null,ge.createElement("path",{fill:r,d:KF(p,s),mask:o?"url(#react-qr-rounded__mask)":void 0}),i?ge.createElement("foreignObject",{x:y,y,width:g,height:g},ge.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",width:"100%",overflow:"hidden",borderRadius:s}},i)):null)};const Xf=({children:e,...t})=>c.createElement(lt.View,{...t,classNames:"grow flex flex-col justify-around items-center"},e),v1=({invitationUrl:e,active:t,send:r,status:n,type:o,authCode:i,id:a})=>{const{t:s}=it("os"),l=_t("invitation-manager__qr-code"),u=o===_e.Type.MULTIUSE?0:pL.get(n)??0,f=u===3,d=mf(a??""),p=c.useMemo(()=>{switch(!0){case u===5:case u<0:return"showing final";case u===3:return"showing auth code";default:return"showing qr"}},[u]);return c.createElement(c.Fragment,null,c.createElement(lt.Root,{activeView:p,classNames:"grow plb-1"},c.createElement(lt.Views,null,c.createElement(Xf,{id:"showing qr",emoji:d},c.createElement("p",{className:"text-sm mlb-1 font-normal text-center"},s(o===_e.Type.MULTIUSE?"invite many qr label":"invite one qr label")),c.createElement("div",{role:"none",className:ue(Ot,"is-full max-is-[14rem] relative")},c.createElement(qF,{rounding:100,backgroundColor:"transparent",color:"currentColor",className:ue("is-full bs-full p-2",f&&"invisible"),"aria-labelledby":l,errorCorrectionLevel:"Q",cutout:!0},e??"never"),c.createElement(_7,null,c.createElement(yf,{text:d}))),c.createElement("span",{id:l,className:"sr-only"},s("qr label")),c.createElement(_k,{variant:"ghost",value:e??"never"})),c.createElement(Xf,{id:"showing auth code"},c.createElement(uy,null,s("auth code message")),c.createElement(ly,{code:i,large:!0,classNames:"text-black dark:text-white"}),c.createElement(uy,null,"Be sure the other device is showing this symbol:"),d&&c.createElement(yf,{text:d})),c.createElement(Xf,{id:"showing final"},u>0?c.createElement(Xe.Check,{className:ue("m-1.5",Ke(6))}):c.createElement(Xe.X,{className:ue("m-1.5",Ke(6))})))),c.createElement(nr,{classNames:"mbs-4"},c.createElement(yt,{disabled:!t,onClick:()=>r?.({type:"deselectInvitation"})},s("back label"))))},cl="pbs-1 pbe-3 pli-3",YF=({titleId:e,title:t,identity:r,onDone:n})=>{const o=rs(r.identityKey.toHex(),12);return c.createElement(wf,{titleId:e,title:t,corner:c.createElement(cy,{onDone:n})},c.createElement(At.Root,{size:12,variant:"circle",status:"active"},c.createElement(At.Frame,{classNames:"block mbs-4 mbe-2 mli-auto chromatic-ignore"},c.createElement(At.Fallback,{href:o})),c.createElement(At.Label,{classNames:"block text-center font-light text-xl"},r.profile?.displayName??au(r.identityKey.toHex()))))},g1=e=>{const{identity:t,titleId:r,activeView:n,onUpdateProfile:o,IdentityActionChooser:i=DF,InvitationManager:a=v1,onDone:s,...l}=e,{t:u}=it("os"),f=c.useMemo(()=>{switch(n){case"device manager":return u("choose devices label");case"device invitation manager":return u("choose add device label");default:return u("identity heading")}},[n,u]);return console.log("[IdentityPanelImpl]",{activeView:n}),c.createElement(So,{density:"fine"},c.createElement(YF,{identity:t,titleId:r,title:f,onDone:s}),c.createElement(lt.Root,{activeView:n},c.createElement(lt.Views,null,c.createElement(lt.View,{id:"identity action chooser",classNames:cl},c.createElement(i,{active:n==="identity action chooser",...l})),c.createElement(lt.View,{id:"device invitation manager",classNames:cl},c.createElement(a,{active:n==="device invitation manager",...l,invitationUrl:l.createInvitationUrl(l.invitationCode)})),c.createElement(lt.View,{id:"device manager",classNames:cl},c.createElement(NF,{active:n==="device manager",...l})),c.createElement(lt.View,{classNames:cl,id:"update profile form"},c.createElement(MF,{send:l.send,active:n==="update profile form",profile:t.profile,onUpdateProfile:o})))))},JF=({invitation:e,...t})=>{const r=rf(e);return c.createElement(g1,{...t,...r})},XF=({titleId:e,createInvitationUrl:t=n=>n,...r})=>{const n=_t("identityPanel__heading",e),o=Ze.useClient(),i=da.useDevices(),a=da.useIdentity();if(!a)return console.error("IdentityPanel rendered with no active identity."),null;const[s,l,u]=kF(o);c.useEffect(()=>u.subscribe(v=>{Qe("[state]",v)}).unsubscribe,[u]);const f=c.useMemo(()=>{switch(!0){case s.matches("choosingAction"):return"identity action chooser";case s.matches("managingDeviceInvitation"):return"device invitation manager";case s.matches("managingDevices"):return"device manager";case[{managingProfile:"idle"},{managingProfile:"pending"}].some(s.matches):return"update profile form";default:return"identity action chooser"}},[s]);console.log({activeView:f,identityState:s});const p={...r,identity:a,devices:i,activeView:f,send:l,titleId:n,createInvitationUrl:t,onUpdateProfile:async h=>{l({type:"updateProfile"}),await o.halo.updateProfile(h)}};return s.context.invitation?c.createElement(JF,{...p,invitation:s.context.invitation}):c.createElement(g1,{...p})},ZF=c.forwardRef(({mode:e,titleId:t,onExit:r,exitActionParent:n},o)=>{const{t:i}=it("os"),a=c.createElement(br,{variant:"ghost",...r&&{onClick:r},classNames:ue(Ot,"plb-0 pli-2 absolute block-start-0 inline-end-0 z-[1]"),"data-testid":"join-exit"},c.createElement(Xe.X,{weight:"bold",className:Ke(4)}),c.createElement("span",{className:"sr-only"},i("exit label")));return c.createElement(wf,{ref:o,titleId:t,title:i(e==="halo-only"?"selecting identity heading":"joining space heading"),...e==="halo-only"?{titleSrOnly:!0}:{corner:n?c.cloneElement(n,{},a):a},titleSrOnly:e==="halo-only"})}),m1=(e,t)=>(Qe("[subscribing to invitation]",t),{subscribe:(r,n,o)=>t.subscribe(i=>{switch(i.state){case _e.State.CONNECTING:return Qe("[invitation connecting]",{Kind:e,invitation:i}),r({type:`connecting${e}Invitation`,invitation:i});case _e.State.CONNECTED:return Qe("[invitation connected]",{Kind:e,invitation:i}),r({type:`connected${e}Invitation`,invitation:i});case _e.State.READY_FOR_AUTHENTICATION:return Qe("[invitation ready for authentication]",{Kind:e,invitation:i}),r({type:`readyForAuthentication${e}Invitation`,invitation:i});case _e.State.AUTHENTICATING:return Qe("[invitation authenticating]",{Kind:e,invitation:i}),r({type:`authenticating${e}Invitation`,invitation:i});case _e.State.SUCCESS:return Qe("[invitation success]",{Kind:e,invitation:i}),r({type:`success${e}Invitation`,invitation:i}),o?.();case _e.State.CANCELLED:return Qe.warn("[invitation cancelled]",{Kind:e}),r({type:`fail${e}Invitation`,reason:"cancelled"});case _e.State.TIMEOUT:return Qe.error("[invitation timeout]",{Kind:e}),r({type:`fail${e}Invitation`,reason:"timeout"})}},i=>(Qe.error("[invitation errored]",{Kind:e,error:i}),r({type:`fail${e}Invitation`,reason:"error"}),n?.(i)))}),b1=(e,t)=>({initial:`unknown${e}`,states:{[`unknown${e}`]:{always:[{cond:({mode:n})=>n==="halo-only"&&e==="Space",target:"#join.finishingJoiningHalo"},{cond:n=>!!n[e.toLowerCase()].unredeemedCode,target:`acceptingRedeemed${e}Invitation`,actions:[`redeem${e}InvitationCode`,`invalidate${e}InvitationCode`,"log"]},{target:`inputting${e}InvitationCode`,actions:"log"}]},[`inputting${e}InvitationCode`]:{},[`acceptingRedeemed${e}Invitation`]:{invoke:{src:n=>n[e.toLowerCase()].invitationSubscribable},initial:`unknown${e}Invitation`,states:{[`unknown${e}Invitation`]:{always:[{cond:n=>{if(e!=="Space")return!1;{const o=n.space.invitation?.spaceKey?.toHex(),i=n.space.succeededKeys;return o?!!i?.has(o):!1}},target:t,actions:"log"},{cond:n=>{const o=n[e.toLowerCase()].invitation;return!o||o?.state===_e.State.CONNECTING},target:`connecting${e}Invitation`,actions:"log"},{target:`inputting${e}VerificationCode`,actions:"log"}]},[`connecting${e}Invitation`]:{},[`inputting${e}VerificationCode`]:{},[`authenticating${e}VerificationCode`]:{on:{[`readyForAuthentication${e}Invitation`]:{target:`authenticationFailing${e}VerificationCode`,actions:["setInvitation","log"]}}},[`authenticationFailing${e}VerificationCode`]:{},[`failing${e}Invitation`]:{},[`success${e}Invitation`]:{}},on:{[`reset${e}Invitation`]:{target:`#join${e==="Halo"?".choosingIdentity":""}.accepting${e}Invitation.unknown${e}`,actions:["resetInvitation","log"]},[`connecting${e}Invitation`]:{target:`.connecting${e}Invitation`,actions:["setInvitation","log"]},[`connected${e}Invitation`]:{target:`.connecting${e}Invitation`,actions:["setInvitation","log"]},[`readyForAuthentication${e}Invitation`]:{target:`.inputting${e}VerificationCode`,actions:["setInvitation","log"]},[`authenticating${e}Invitation`]:{target:`.authenticating${e}VerificationCode`,actions:["setInvitation","log"]},[`success${e}Invitation`]:{target:t,actions:["setInvitation","log"]},[`fail${e}Invitation`]:{target:`.failing${e}Invitation`,actions:[Ht({[e.toLowerCase()]:(n,o)=>({...n[e.toLowerCase()],failReason:o.reason})}),"log"]}}}},on:{[`set${e}InvitationCode`]:{target:`.acceptingRedeemed${e}Invitation`,actions:[Ht({[e.toLowerCase()]:(n,o)=>({...n[e.toLowerCase()],unredeemedCode:o.code,succeededKeys:o.succeededKeys})}),`redeem${e}InvitationCode`,`invalidate${e}InvitationCode`,"log"]}}}),QF=qf({id:"join",predictableActionArguments:!0,context:{mode:"default",identity:null,halo:{},space:{}},initial:"unknown",states:{unknown:{always:[{cond:"existingIdentity",target:"resettingIdentity",actions:"log"},{cond:"noSelectedIdentity",target:"choosingIdentity",actions:"log"},{target:"acceptingSpaceInvitation",actions:"log"}]},choosingIdentity:{initial:"unknownAuthMethod",states:{unknownAuthMethod:{always:[{cond:"hasHaloUnredeemedCode",target:"acceptingHaloInvitation",actions:"log"},{target:"choosingAuthMethod",actions:"log"}]},choosingAuthMethod:{},recoveringIdentity:{},creatingIdentity:{},acceptingHaloInvitation:b1("Halo","#join.acceptingSpaceInvitation"),confirmingAddedIdentity:{}},on:{recoverIdentity:{target:".recoveringIdentity",actions:"log"},createIdentity:{target:".creatingIdentity",actions:"log"},acceptHaloInvitation:{target:".acceptingHaloInvitation",actions:"log"},addIdentity:{target:".confirmingAddedIdentity",actions:"log"},selectIdentity:{target:"acceptingSpaceInvitation",actions:["setIdentity","log"]},deselectAuthMethod:{target:".choosingAuthMethod",actions:"log"}}},resettingIdentity:{},acceptingSpaceInvitation:b1("Space","#join.finishingJoiningSpace"),finishingJoiningSpace:{type:"final"},finishingJoiningHalo:{type:"final"}},on:{resetIdentity:{target:"choosingIdentity",actions:"unsetIdentity"}}},{guards:{existingIdentity:({identity:e,mode:t},r)=>t==="halo-only"&&!!e,noSelectedIdentity:({identity:e},t)=>!e,hasHaloUnredeemedCode:({halo:e},t)=>!!e.unredeemedCode,noSpaceInvitation:({space:e},t)=>!e.invitation&&!e.unredeemedCode},actions:{setIdentity:Ht({identity:(e,t)=>t.identity}),unsetIdentity:Ht({identity:()=>null}),resetInvitation:Ht({halo:(e,t)=>t.type!=="resetHaloInvitation"?e.halo:(e.halo.invitationObservable&&e.halo.invitationObservable.cancel(),{...e.halo,invitation:void 0,invitationObservable:void 0,invitationSubscribable:void 0}),space:(e,t)=>t.type!=="resetSpaceInvitation"?e.space:(e.space.invitationObservable&&e.space.invitationObservable.cancel(),{...e.space,invitation:void 0,invitationObservable:void 0,invitationSubscribable:void 0})}),setInvitation:Ht({halo:(e,t)=>t.type.includes("Halo")?{...e.halo,invitation:t.invitation}:e.halo,space:(e,t)=>t.type.includes("Space")?{...e.space,invitation:t.invitation}:e.space}),log:(e,t)=>{Qe.info("[transition]",{event:t,haloInvitation:e.halo.invitation,spaceInvitation:e.space.invitation})}}}),y1=(e,t)=>{try{const r=new URLSearchParams(t.substring(t.lastIndexOf("?")));return r.get(`${e}InvitationCode`)??r.get(`${e}Invitation`)??r.get("invitationCode")??r.get("invitation")??t}catch(r){return Qe.catch(r),t}},e9=(e,t)=>{const r=c.useCallback(({halo:a})=>{if(a.unredeemedCode)try{const s=e.halo.join(Tn.InvitationEncoder.decode(y1("halo",a.unredeemedCode)));return{...a,invitationObservable:s,invitationSubscribable:m1("Halo",s)}}catch(s){return Qe.error("Could not redeem device invitation code",s),a}else return a},[e]),n=c.useCallback(({space:a})=>{if(a.unredeemedCode)try{const s=Tn.InvitationEncoder.decode(y1("space",a.unredeemedCode));if(a.succeededKeys?.has(s.spaceKey?.toHex()??"never"))return{...a,invitation:s};{const l=e.spaces.join(s);return{...a,invitationObservable:l,invitationSubscribable:m1("Space",l)}}}catch(s){return Qe.error("Could not redeem space invitation code",s),a}else return a},[e]),o=c.useCallback(({halo:a})=>a.unredeemedCode?(t?.onInvalidateInvitationCode?.(a.unredeemedCode),{...a,unredeemedCode:void 0}):a,[t?.onInvalidateInvitationCode]),i=c.useCallback(({space:a})=>a.unredeemedCode?(t?.onInvalidateInvitationCode?.(a.unredeemedCode),{...a,unredeemedCode:void 0}):a,[t?.onInvalidateInvitationCode]);return Yf(QF,{...t,actions:{...t?.actions,redeemHaloInvitationCode:Ht({halo:r}),redeemSpaceInvitationCode:Ht({space:n}),invalidateHaloInvitationCode:Ht({halo:o}),invalidateSpaceInvitationCode:Ht({space:i})}})},t9=e=>{const t=!e.active,{send:r}=e,{t:n}=it("os"),o={disabled:t,after:c.createElement(Xe.CaretRight,{className:Ke(4),weight:"bold"}),slots:{label:{className:"text-sm"}}};return c.createElement(c.Fragment,null,c.createElement(Rr,null,n("addition method chooser title")),c.createElement("div",{role:"none",className:"flex flex-col gap-1 grow"},c.createElement(iu,{...o,description:n("create identity description"),before:c.createElement(Xe.Plus,{className:Ke(6)}),onClick:()=>r({type:"createIdentity"}),"data-autofocus":"choosingAuthMethod","data-testid":"create-identity"},n("create identity label")),c.createElement(iu,{...o,description:n("join identity description"),before:c.createElement(Xe.QrCode,{className:Ke(6)}),onClick:()=>r({type:"acceptHaloInvitation"}),"data-testid":"join-identity"},n("join identity label")),c.createElement(iu,{...o,disabled:!0,description:n("recover identity description"),before:c.createElement(Xe.Textbox,{className:Ke(6)}),onClick:()=>r({type:"recoverIdentity"}),"data-testid":"recover-identity"},n("recover identity label"))))},r9=e=>{const{mode:t,addedIdentity:r,active:n,send:o,onDone:i,doneActionParent:a}=e,s=!n,{t:l}=it("os"),u=r?.identityKey.toHex(),f=_t("identityListItem__label"),d=rs(u??"",12),p=r?.profile?.displayName??(r&&au(r?.identityKey.toHex())),h=c.createElement(yt,{...i&&{onClick:()=>i(null)},disabled:s,"data-autofocus":"confirmingAddedIdentity","data-testid":"identity-added-done"},c.createElement("span",null,l("done label")));return c.createElement(c.Fragment,null,c.createElement(Rr,null,l("identity added label")),c.createElement("div",{role:"none",className:"grow flex flex-col items-center justify-center text-center gap-2"},c.createElement(At.Root,{status:"active",labelId:f},c.createElement(At.Frame,null,c.createElement(At.Fallback,{href:d})),c.createElement(At.Label,{classNames:ue("text-lg truncate",!r?.profile?.displayName&&"font-mono")},p))),c.createElement(nr,null,t==="halo-only"?a?c.cloneElement(a,{},h):h:c.createElement(yt,{variant:"primary",disabled:s||!r,onClick:()=>r&&o({type:"selectIdentity",identity:r}),"data-autofocus":"confirmingAddedIdentity"},l("continue label"))))},n9=e=>{const{send:t,method:r}=e,n=r==="recover identity",o=Ze.useClient(),{t:i}=it("os"),[a,s]=c.useState(""),l=u=>{o.halo.createIdentity({[n?"seedphrase":"displayName"]:u}).then(f=>{t?.({type:"selectIdentity",identity:f})},f=>{Qe.catch(f),s(i(n?"failed to recover identity message":"failed to create identity message"))})};return c.createElement(o9,{...e,onDisplayNameConfirm:l,validationMessage:a})},o9=e=>{const{method:t,send:r,active:n,onDisplayNameConfirm:o,validationMessage:i}=e,a=!n,{t:s}=it("os"),[l,u]=c.useState(""),f=t==="recover identity";return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Hs,{validationMessage:i,label:c.createElement(Rr,null,s(f?"recover identity input label":"new identity input label")),disabled:a,"data-testid":"identity-input",placeholder:f?"Type your recovery phrase":"Type a display name",onChange:({target:{value:d}})=>u(d)})),c.createElement(nr,null,c.createElement(yt,{variant:"ghost",disabled:a,onClick:()=>r?.({type:"deselectAuthMethod"}),"data-testid":`${t==="recover identity"?"recover":"create"}-identity-input-back`},s("back label")),c.createElement(yt,{variant:"primary",disabled:a,onClick:()=>o?.(l),"data-testid":`${t==="recover identity"?"recover":"create"}-identity-input-continue`},s("continue label"))))},w1=e=>{const{active:t,Kind:r,doneActionParent:n,onDone:o}=e,i=!t,{t:a}=it("os"),s=c.createElement(yt,{variant:"primary",onClick:o,disabled:i,"data-autofocus":`success${r}Invitation finishingJoining${r}`,"data-testid":`${r.toLowerCase()}-invitation-accepted-done`},a("done label"));return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement("p",{className:"text-center text-sm font-normal"},a("welcome message"))),c.createElement(nr,null,n?c.cloneElement(n,{},s):s))},i9=e=>{try{const t=new URLSearchParams(e.substring(e.lastIndexOf("?")));return t.get("spaceInvitationCode")??t.get("deviceInvitationCode")??e}catch(t){return Qe.catch(t),e}},_1=e=>{const{Kind:t,active:r,send:n,unredeemedCode:o,onExit:i,exitActionParent:a,onDone:s,doneActionParent:l,succeededKeys:u}=e,f=!r,{t:d}=it("os"),[p,h]=c.useState(o??"");c.useEffect(()=>{o&&h(o??"")},[o]);const v=()=>n({type:`set${t}InvitationCode`,code:i9(p),...t==="Space"&&{succeededKeys:u}}),g=c.createElement(yt,{variant:"ghost",disabled:f,...i?{onClick:()=>i()}:{onClick:()=>s?.(null)},"data-testid":"join-exit"},d("cancel label"));return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Hs,{label:c.createElement(Rr,null,d("invitation input label")),placeholder:"Type an invitation code",disabled:f,value:p,onChange:({target:{value:y}})=>h(y),"data-autofocus":`inputting${t}InvitationCode`,"data-testid":`${t.toLowerCase()}-invitation-input`,onKeyUp:({key:y})=>y==="Enter"&&v()})),c.createElement(nr,null,t==="Halo"?c.createElement(yt,{variant:"ghost",disabled:f,onClick:()=>n({type:"deselectAuthMethod"}),"data-testid":`${t.toLowerCase()}-invitation-input-back`},d("back label")):a?c.cloneElement(a,{},g):l?c.cloneElement(l,{},g):g,c.createElement(yt,{variant:"primary",disabled:f,onClick:v,"data-testid":`${t.toLowerCase()}-invitation-input-continue`},d("continue label"))))},a9=({invitationState:e,onInvitationCancel:t,active:r,send:n,Kind:o,failReason:i})=>{const{t:a}=it("os");return i?c.createElement(c.Fragment,null,c.createElement(Rr,{className:Ot},a(i==="timeout"?"timeout status label":i==="cancelled"?"cancelled status label":"error status label")),c.createElement("div",{role:"none",className:"grow"}),c.createElement(nr,null,c.createElement(yt,{disabled:!r,onClick:()=>n({type:`reset${o}Invitation`}),"data-testid":"invitation-rescuer-reset"},a("reset label")))):c.createElement(c.Fragment,null,c.createElement(Rr,{className:Ot},a("connecting status label")),c.createElement("div",{role:"none",className:"grow"}),c.createElement(nr,null,c.createElement(yt,{disabled:!0,classNames:"order-2","data-testid":"next"},a("next label")),c.createElement(yt,{disabled:!r,onClick:t,"data-testid":"invitation-rescuer-cancel"},a("cancel label"))))},E1=e=>{const{Kind:t,invitationState:r,active:n,send:o}=e,{t:i}=it("os");return c.createElement(c.Fragment,null,typeof r>"u"?c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Rr,{className:Ot},"There was a problem joining the space")),c.createElement(nr,null,c.createElement(yt,{disabled:!n,"data-testid":"invitation-rescuer-blank-reset",onClick:()=>o({type:`reset${t}Invitation`})},i("reset label")))):c.createElement(a9,{...e}))},x1=6,S1=({failed:e,Kind:t,active:r,pending:n,invitationId:o,onInvitationAuthenticate:i,onInvitationCancel:a})=>{const s=!r||n,{t:l}=it("os"),u=t.toLowerCase(),[f,d]=c.useState(""),p=({target:{value:h}})=>{d(h),h.length===x1&&document.querySelector(`[data-autofocus-pinlength="${u}"]`)?.focus()};return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},o&&c.createElement(yf,{text:mf(o)}),c.createElement(Mr.Root,{...e&&{validationValence:"error"}},c.createElement(Mr.Label,{asChild:!0},c.createElement(Rr,null,l("auth code input label"))),c.createElement(Mr.PinInput,{disabled:s,length:x1,onChange:p,inputMode:"numeric",autoComplete:"off",pattern:"\\d*","data-autofocus":`connecting${t}Invitation inputting${t}VerificationCode authenticationFailing${t}VerificationCode authenticating${t}VerificationCode`,"data-prevent-ios-autofocus":!0,"data-testid":`${u}-auth-code-input`,"data-1p-ignore":!0}),e&&c.createElement(Mr.DescriptionAndValidation,{classNames:"text-center"},c.createElement(Mr.Validation,null,l("failed to authenticate message"))))),c.createElement(nr,null,c.createElement(yt,{variant:"ghost",disabled:s,onClick:()=>a?.(),"data-testid":`${u}-invitation-authenticator-cancel`},l("cancel label")),c.createElement(yt,{variant:"primary",disabled:s,onClick:()=>i?.(f),"data-autofocus-pinlength":u,"data-testid":`${u}-invitation-authenticator-next`},l("next label"))))},s9=({send:e,active:t})=>{const r=Ze.useClient(),{t:n}=it("os"),[o,i]=c.useState(""),a=()=>{r.reset().then(()=>e?.({type:"resetIdentity"}),s=>{Qe.catch(s),i(n("failed to reset identity message"))})};return c.createElement(l9,{disabled:!t,validationMessage:o,onConfirm:()=>a()})},l9=({disabled:e,validationMessage:t,onConfirm:r})=>{const{t:n}=it("os"),o=n("confirmation value"),[i,a]=c.useState("");return c.createElement(c.Fragment,null,c.createElement("div",{role:"none",className:"grow flex flex-col justify-center"},c.createElement(Hs,{validationMessage:t,label:c.createElement(Rr,null,n("reset identity input label",{confirmationValue:o})),disabled:e,"data-testid":"identity-input",placeholder:o,onChange:({target:{value:s}})=>a(s)})),c.createElement(nr,null,c.createElement(yt,{variant:"primary",disabled:e||i!==o,onClick:()=>r?.(),"data-testid":"reset-identity-input-confirm"},n("confirm label"))))},zt="pbs-1 pbe-3 pli-3",c9=e=>{const{titleId:t,send:r,activeView:n,failed:o,mode:i,unredeemedCodes:a,invitationStates:s,succeededKeys:l,failReasons:u,onExit:f,onHaloDone:d,onSpaceDone:p,exitActionParent:h,doneActionParent:v,onHaloInvitationCancel:g,onSpaceInvitationCancel:y,onHaloInvitationAuthenticate:m,onSpaceInvitationAuthenticate:w,IdentityInput:E=n9,ResetIdentity:x=s9}=e;return c.createElement(So,{density:"fine"},i!=="halo-only"&&c.createElement(ZF,{titleId:t,mode:i,onExit:f,exitActionParent:h}),c.createElement(lt.Root,{focusManaged:!0,activeView:n},c.createElement(lt.Views,null,c.createElement(lt.View,{classNames:zt,id:"addition method chooser"},c.createElement(t9,{send:r,active:n==="addition method chooser"})),c.createElement(lt.View,{classNames:zt,id:"reset identity confirmation"},c.createElement(x,{send:r,method:"reset identity",active:n==="reset identity confirmation"})),c.createElement(lt.View,{classNames:zt,id:"create identity input"},c.createElement(E,{send:r,method:"create identity",active:n==="create identity input"})),c.createElement(lt.View,{classNames:zt,id:"recover identity input"},c.createElement(E,{send:r,method:"recover identity",active:n==="recover identity input"})),c.createElement(lt.View,{classNames:zt,id:"halo invitation input"},c.createElement(_1,{send:r,Kind:"Halo",active:n==="halo invitation input",...a?.Halo&&{unredeemedCode:a.Halo},...l?.Halo&&{succeededKeys:l.Halo}})),c.createElement(lt.View,{classNames:zt,id:"halo invitation rescuer"},c.createElement(E1,{send:r,Kind:"Halo",active:n==="halo invitation rescuer",invitationState:s?.Halo,onInvitationCancel:g,failReason:u?.Halo})),c.createElement(lt.View,{classNames:zt,id:"halo invitation authenticator"},c.createElement(S1,{send:r,Kind:"Halo",active:n==="halo invitation authenticator",onInvitationCancel:g,onInvitationAuthenticate:m,...o.has("Halo")&&{failed:!0}})),c.createElement(lt.View,{classNames:zt,id:"halo invitation accepted"},c.createElement(w1,{send:r,Kind:"Halo",active:n==="halo invitation accepted",doneActionParent:v,onDone:d})),c.createElement(lt.View,{classNames:zt,id:"identity added"},c.createElement(r9,{send:r,mode:i,active:n==="identity added",doneActionParent:v,onDone:d})),c.createElement(lt.View,{classNames:zt,id:"space invitation input"},c.createElement(_1,{send:r,Kind:"Space",active:n==="space invitation input",...a?.Space&&{unredeemedCode:a.Space},...l?.Space&&{succeededKeys:l.Space},onExit:f,exitActionParent:h})),c.createElement(lt.View,{classNames:zt,id:"space invitation rescuer"},c.createElement(E1,{send:r,Kind:"Space",active:n==="space invitation rescuer",invitationState:s?.Space,onInvitationCancel:y,failReason:u?.Space})),c.createElement(lt.View,{classNames:zt,id:"space invitation authenticator"},c.createElement(S1,{send:r,Kind:"Space",active:n==="space invitation authenticator",onInvitationCancel:y,onInvitationAuthenticate:w,...o.has("Space")&&{failed:!0}})),c.createElement(lt.View,{classNames:zt,id:"space invitation accepted"},c.createElement(w1,{send:r,Kind:"Space",active:n==="space invitation accepted",doneActionParent:v,onDone:p})))))},u9=({titleId:e,mode:t="default",initialInvitationCode:r,exitActionParent:n,onExit:o,doneActionParent:i,onDone:a})=>{const s=Ze.useClient(),l=da.useIdentity(),{hasIosKeyboard:u}=Oe(),f=_t("joinPanel__heading",e),[d,p,h]=e9(s,{context:{mode:t,identity:l,...r&&{[t==="halo-only"?"halo":"space"]:{unredeemedCode:r}}}});console.log("[joinState]",d),c.useEffect(()=>h.subscribe(A=>{Qe("[state]",A)}).unsubscribe,[h]),c.useEffect(()=>{const S=d.configuration[0].id.split("."),A=S[S.length-1],k=A==="finishingJoining"?"successSpaceInvitation":A,j=document.querySelector(`[data-autofocus~="${k}"]`);j&&!(u&&j.hasAttribute("data-prevent-ios-autofocus"))&&j.focus()},[d.value,u]);const v=c.useMemo(()=>{switch(!0){case d.matches({choosingIdentity:"choosingAuthMethod"}):return"addition method chooser";case d.matches("resettingIdentity"):return"reset identity confirmation";case d.matches({choosingIdentity:"creatingIdentity"}):return"create identity input";case d.matches({choosingIdentity:"recoveringIdentity"}):return"recover identity input";case d.matches({choosingIdentity:{acceptingHaloInvitation:"inputtingHaloInvitationCode"}}):return"halo invitation input";case[{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"connectingHaloInvitation"}}},{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"failingHaloInvitation"}}}].some(d.matches):return"halo invitation rescuer";case[{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"inputtingHaloVerificationCode"}}},{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"authenticatingHaloVerificationCode"}}},{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"authenticationFailingHaloVerificationCode"}}}].some(d.matches):return"halo invitation authenticator";case[{choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"successHaloInvitation"}}},"finishingJoiningHalo"].some(d.matches):return"halo invitation accepted";case d.matches({choosingIdentity:"confirmingAddedIdentity"}):return"identity added";case d.matches({acceptingSpaceInvitation:"inputtingSpaceInvitationCode"}):return"space invitation input";case[{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"connectingSpaceInvitation"}},{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"failingSpaceInvitation"}}].some(d.matches):return"space invitation rescuer";case[{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"inputtingSpaceVerificationCode"}},{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"authenticatingSpaceVerificationCode"}},{acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"authenticationFailingSpaceVerificationCode"}}].some(d.matches):return"space invitation authenticator";case d.matches("finishingJoiningSpace"):return"space invitation accepted";default:return"never"}},[d]),g=c.useMemo(()=>{const S=new Set;switch(!0){case d.matches({choosingIdentity:{acceptingHaloInvitation:{acceptingRedeemedHaloInvitation:"authenticationFailingHaloVerificationCode"}}}):S.add("Halo");break;case d.matches({acceptingSpaceInvitation:{acceptingRedeemedSpaceInvitation:"authenticationFailingSpaceVerificationCode"}}):S.add("Space");break}return S},[d]),y=c.useMemo(()=>({Halo:d.context.halo.unredeemedCode,Space:d.context.space.unredeemedCode}),[d]),m=Ze.useMulticastObservable(s.spaces),w=c.useMemo(()=>({Space:m?new Set(m.map(({key:S})=>S.toHex())):void 0}),[m]),E=c.useMemo(()=>({Halo:d.context.halo.invitationObservable?.get().state,Space:d.context.space.invitationObservable?.get().state}),[d]),x=c.useMemo(()=>({Halo:d.context.halo.failReason,Space:d.context.space.failReason}),[d]),P=c.useCallback(()=>{a?.({identityKey:d.context.halo.invitation?.identityKey??null,swarmKey:d.context.halo.invitation?.swarmKey??null,spaceKey:d.context.halo.invitation?.spaceKey??null})},[d,a]),I=c.useCallback(()=>{a?.({identityKey:d.context.space.invitation?.identityKey??null,swarmKey:d.context.space.invitation?.swarmKey??null,spaceKey:d.context.space.invitation?.spaceKey??null})},[d,a]);return c.createElement(c9,{titleId:f,mode:t,send:p,activeView:v,failed:g,failReasons:x,pending:["connecting","authenticating"].some(S=>d?.configuration[0].id.includes(S)),unredeemedCodes:y,invitationStates:E,succeededKeys:w,identity:l,onExit:o,exitActionParent:n,doneActionParent:i,onHaloDone:P,onSpaceDone:I,onHaloInvitationCancel:()=>d.context.halo.invitationObservable?.cancel(),onSpaceInvitationCancel:()=>d.context.space.invitationObservable?.cancel(),onHaloInvitationAuthenticate:S=>(p({type:"authenticateHaloVerificationCode"}),d.context.halo.invitationObservable?.authenticate(S)),onSpaceInvitationAuthenticate:S=>(p({type:"authenticateSpaceVerificationCode"}),d.context.space.invitationObservable?.authenticate(S))})},f9=qf({id:"space",predictableActionArguments:!0,context:{space:null},initial:"managingSpace",states:{managingSpace:{},managingSpaceInvitation:{}},on:{deselectInvitation:{target:".managingSpace",actions:["unsetInvitation","log"]},selectInvitation:{target:".managingSpaceInvitation",actions:["setInvitation","log"]}}},{actions:{setInvitation:Ht({invitation:(e,t)=>t?.invitation??null}),unsetInvitation:Ht({invitation:()=>{}}),log:(e,t)=>{Qe("[transition]",{event:t,context:e})}}}),d9=e=>Yf(f9,{...e,context:{...e?.context}}),$1="dxos:react-shell/space-manager/active-action",p9=e=>{const{space:t}=e,{t:r}=it("os"),n=Ze.useConfig(),o=fa.useSpaceInvitations(t?.key),i=c.useCallback(s=>{const l=Tn.InvitationEncoder.encode(s);s.state===_e.State.CONNECTING&&console.log(JSON.stringify({invitationCode:l,authCode:s.authCode}))},[]),a={inviteOne:{label:r("invite one label"),description:r("invite one description"),icon:Xe.UserPlus,onClick:c.useCallback(()=>{const s=t.share?.({type:_e.Type.INTERACTIVE,authMethod:_e.AuthMethod.SHARED_SECRET});s&&n.values.runtime?.app?.env?.DX_ENVIRONMENT!=="production"&&s.subscribe(i)},[t])},inviteMany:{label:r("invite many label"),description:r("invite many description"),icon:Xe.UsersThree,onClick:c.useCallback(()=>{const s=t.share?.({type:_e.Type.MULTIUSE,authMethod:_e.AuthMethod.NONE});s&&n.values.runtime?.app?.env?.DX_ENVIRONMENT!=="production"&&s.subscribe(i)},[t])}};return c.createElement(h9,{...e,invitations:o,inviteActions:a})},C1="pis-3 pie-1 plb-1 mbe-1 font-medium",h9=e=>{const{active:t,space:r,createInvitationUrl:n,send:o,inviteActions:i,invitations:a,showInactiveInvitations:s,SpaceMemberList:l=Sk,InvitationList:u=b7}=e,{t:f}=it("os"),d=i??{noopInvite:{label:f("create space invitation label"),description:"",icon:Xe.Placeholder,onClick:()=>{}}},[p,h]=c.useState(localStorage.getItem($1)??"inviteOne"),v=y=>{h(y),localStorage.setItem($1,y)},g=s?a:a?.filter(y=>![_e.State.CANCELLED].includes(y.get().state));return c.createElement(c.Fragment,null,c.createElement(ns.Root,{classNames:"grow shrink basis-28 -mli-2"},c.createElement(ns.Viewport,{classNames:"is-full pie-2"},!!g?.length&&c.createElement(c.Fragment,null,c.createElement("h3",{className:ue(C1,Ot)},f("invitation list heading")),c.createElement(u,{className:"mb-2",send:o,invitations:g??[],onClickRemove:y=>y.cancel(),createInvitationUrl:n}),c.createElement("h3",{className:ue(C1,Ot,"mbs-2")},f("space member list heading"))),c.createElement(l,{spaceKey:r.key,includeSelf:!0})),c.createElement(ns.Scrollbar,{orientation:"vertical"},c.createElement(ns.Thumb,null))),c.createElement(nr,null,c.createElement(w7,{disabled:!t,actions:d,activeAction:p,onChangeActiveAction:v,"data-testid":"spaces-panel.create-invitation"})))},v9=({titleId:e,space:t,onDone:r})=>{const{t:n}=it("os"),o=t.properties.name;return c.createElement(wf,{titleId:e,title:n("space panel heading"),corner:c.createElement(cy,{"data-testid":"identity-panel-done",onDone:r})},c.createElement("div",{role:"none",className:"flex gap-4 items-center justify-center mlb-4"},c.createElement(Xe.Planet,{size:32}),c.createElement("div",{className:"block text-start font-light text-xl"},o??t.key.truncate())))},O1=e=>{const{titleId:t,activeView:r,space:n,SpaceManager:o=p9,InvitationManager:i=v1,...a}=e;return c.createElement(So,{density:"fine"},c.createElement(v9,{...a,titleId:t,space:n}),c.createElement(lt.Root,{activeView:r},c.createElement(lt.Views,null,c.createElement(lt.View,{id:"space manager",classNames:zt},c.createElement(o,{active:r==="space manager",space:n,...a})),c.createElement(lt.View,{id:"space invitation manager",classNames:zt},c.createElement(i,{active:r==="space invitation manager",...a,invitationUrl:e.invitationUrl})))))},g9=({invitation:e,...t})=>{const r=rf(e);return c.createElement(O1,{...t,...r,invitationUrl:t.createInvitationUrl(r.invitationCode)})},m9=({titleId:e,createInvitationUrl:t=n=>n,...r})=>{const n=_t("spacePanel__heading",e),[o,i,a]=d9({context:{space:r.space}});c.useEffect(()=>a.subscribe(f=>{Qe("[state]",f)}).unsubscribe,[a]);const s=c.useMemo(()=>{switch(!0){case o.matches("managingSpace"):return"space manager";case o.matches("managingSpaceInvitation"):return"space invitation manager";default:return"never"}},[o]),l={...r,activeView:s,send:i,titleId:n,createInvitationUrl:t};return o.context.invitation?c.createElement(g9,{...l,invitation:o.context.invitation}):c.createElement(O1,{...l})},b9=e=>{const t=_t("spaceDialog__title");return c.createElement(Lr.Root,{defaultOpen:!0,onOpenChange:r=>r||e.onDone?.()},c.createElement(Lr.Portal,null,c.createElement(Lr.Overlay,null,c.createElement(Lr.Content,{"aria-labelledby":t,onOpenAutoFocus:r=>r.preventDefault()},c.createElement(ou,null,c.createElement(XF,{...e,titleId:t,doneActionParent:c.createElement(Lr.Close,{asChild:!0})}))))))},A1=e=>{const t=_t("joinDialog__title"),{height:r}=zO();return c.createElement(xo.Root,{defaultOpen:!0,onOpenChange:n=>n||(e.onExit?e.onExit():e.onDone?.(null))},c.createElement(xo.Portal,null,c.createElement(xo.Overlay,{classNames:"backdrop-blur",...r&&{style:{blockSize:`${r}px`}}},c.createElement(xo.Content,{"aria-labelledby":t},c.createElement(u9,{...e,titleId:t,exitActionParent:c.createElement(xo.Cancel,{asChild:!0}),doneActionParent:c.createElement(xo.Action,{asChild:!0})})))))};var Zf,ul=on;if(process.env.NODE_ENV==="production")Zf=ul.createRoot,ul.hydrateRoot;else{var T1=ul.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Zf=function(e,t){T1.usingClientEntryPoint=!0;try{return ul.createRoot(e,t)}finally{T1.usingClientEntryPoint=!1}}}var Qf={exports:{}};(function(e,t){(function(r,n){var o="1.0.35",i="",a="?",s="function",l="undefined",u="object",f="string",d="major",p="model",h="name",v="type",g="vendor",y="version",m="architecture",w="console",E="mobile",x="tablet",P="smarttv",I="wearable",S="embedded",A=350,k="Amazon",j="Apple",D="ASUS",N="BlackBerry",J="Browser",K="Chrome",Y="Edge",te="Firefox",oe="Google",le="Huawei",ae="LG",ve="Microsoft",ce="Motorola",q="Opera",V="Samsung",re="Sharp",de="Sony",U="Xiaomi",z="Zebra",M="Facebook",R="Chromium OS",G="Mac OS",O=function($e,De){var C={};for(var b in $e)De[b]&&De[b].length%2===0?C[b]=De[b].concat($e[b]):C[b]=$e[b];return C},T=function($e){for(var De={},C=0;C<$e.length;C++)De[$e[C].toUpperCase()]=$e[C];return De},Z=function($e,De){return typeof $e===f?ne(De).indexOf(ne($e))!==-1:!1},ne=function($e){return $e.toLowerCase()},pe=function($e){return typeof $e===f?$e.replace(/[^\d\.]/g,i).split(".")[0]:n},me=function($e,De){if(typeof $e===f)return $e=$e.replace(/^\s\s*/,i),typeof De===l?$e:$e.substring(0,A)},xe=function($e,De){for(var C=0,b,_,L,W,X,se;C<De.length&&!X;){var Pe=De[C],ot=De[C+1];for(b=_=0;b<Pe.length&&!X&&Pe[b];)if(X=Pe[b++].exec($e),X)for(L=0;L<ot.length;L++)se=X[++_],W=ot[L],typeof W===u&&W.length>0?W.length===2?typeof W[1]==s?this[W[0]]=W[1].call(this,se):this[W[0]]=W[1]:W.length===3?typeof W[1]===s&&!(W[1].exec&&W[1].test)?this[W[0]]=se?W[1].call(this,se,W[2]):n:this[W[0]]=se?se.replace(W[1],W[2]):n:W.length===4&&(this[W[0]]=se?W[3].call(this,se.replace(W[1],W[2])):n):this[W]=se||n;C+=2}},Ee=function($e,De){for(var C in De)if(typeof De[C]===u&&De[C].length>0){for(var b=0;b<De[C].length;b++)if(Z(De[C][b],$e))return C===a?n:C}else if(Z(De[C],$e))return C===a?n:C;return $e},ie={"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"},Ne={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},ft={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[y,[h,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[y,[h,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[h,y],[/opios[\/ ]+([\w\.]+)/i],[y,[h,q+" Mini"]],[/\bopr\/([\w\.]+)/i],[y,[h,q]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[h,y],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[y,[h,"UC"+J]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[y,[h,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[y,[h,"WeChat"]],[/konqueror\/([\w\.]+)/i],[y,[h,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[y,[h,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[y,[h,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[h,/(.+)/,"$1 Secure "+J],y],[/\bfocus\/([\w\.]+)/i],[y,[h,te+" Focus"]],[/\bopt\/([\w\.]+)/i],[y,[h,q+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[y,[h,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[y,[h,"Dolphin"]],[/coast\/([\w\.]+)/i],[y,[h,q+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[y,[h,"MIUI "+J]],[/fxios\/([-\w\.]+)/i],[y,[h,te]],[/\bqihu|(qi?ho?o?|360)browser/i],[[h,"360 "+J]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[h,/(.+)/,"$1 "+J],y],[/(comodo_dragon)\/([\w\.]+)/i],[[h,/_/g," "],y],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[h,y],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[h],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[h,M],y],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[h,y],[/\bgsa\/([\w\.]+) .*safari\//i],[y,[h,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[y,[h,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[y,[h,K+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[h,K+" WebView"],y],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[y,[h,"Android "+J]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[h,y],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[y,[h,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[y,h],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[h,[y,Ee,ie]],[/(webkit|khtml)\/([\w\.]+)/i],[h,y],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[h,"Netscape"],y],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[y,[h,te+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[h,y],[/(cobalt)\/([\w\.]+)/i],[h,[y,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,ne]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,i,ne]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,ne]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[p,[g,V],[v,x]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[p,[g,V],[v,E]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[p,[g,j],[v,E]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[p,[g,j],[v,x]],[/(macintosh);/i],[p,[g,j]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[p,[g,re],[v,E]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[p,[g,le],[v,x]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[p,[g,le],[v,E]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[p,/_/g," "],[g,U],[v,E]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[p,/_/g," "],[g,U],[v,x]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[p,[g,"OPPO"],[v,E]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[p,[g,"Vivo"],[v,E]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[p,[g,"Realme"],[v,E]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[p,[g,ce],[v,E]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[p,[g,ce],[v,x]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[p,[g,ae],[v,x]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[p,[g,ae],[v,E]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[p,[g,"Lenovo"],[v,x]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[p,/_/g," "],[g,"Nokia"],[v,E]],[/(pixel c)\b/i],[p,[g,oe],[v,x]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[p,[g,oe],[v,E]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[p,[g,de],[v,E]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[p,"Xperia Tablet"],[g,de],[v,x]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[p,[g,"OnePlus"],[v,E]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[p,[g,k],[v,x]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[p,/(.+)/g,"Fire Phone $1"],[g,k],[v,E]],[/(playbook);[-\w\),; ]+(rim)/i],[p,g,[v,x]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[p,[g,N],[v,E]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[p,[g,D],[v,x]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[p,[g,D],[v,E]],[/(nexus 9)/i],[p,[g,"HTC"],[v,x]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[g,[p,/_/g," "],[v,E]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[p,[g,"Acer"],[v,x]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[p,[g,"Meizu"],[v,E]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[g,p,[v,E]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[g,p,[v,x]],[/(surface duo)/i],[p,[g,ve],[v,x]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[p,[g,"Fairphone"],[v,E]],[/(u304aa)/i],[p,[g,"AT&T"],[v,E]],[/\bsie-(\w*)/i],[p,[g,"Siemens"],[v,E]],[/\b(rct\w+) b/i],[p,[g,"RCA"],[v,x]],[/\b(venue[\d ]{2,7}) b/i],[p,[g,"Dell"],[v,x]],[/\b(q(?:mv|ta)\w+) b/i],[p,[g,"Verizon"],[v,x]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[p,[g,"Barnes & Noble"],[v,x]],[/\b(tm\d{3}\w+) b/i],[p,[g,"NuVision"],[v,x]],[/\b(k88) b/i],[p,[g,"ZTE"],[v,x]],[/\b(nx\d{3}j) b/i],[p,[g,"ZTE"],[v,E]],[/\b(gen\d{3}) b.+49h/i],[p,[g,"Swiss"],[v,E]],[/\b(zur\d{3}) b/i],[p,[g,"Swiss"],[v,x]],[/\b((zeki)?tb.*\b) b/i],[p,[g,"Zeki"],[v,x]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[g,"Dragon Touch"],p,[v,x]],[/\b(ns-?\w{0,9}) b/i],[p,[g,"Insignia"],[v,x]],[/\b((nxa|next)-?\w{0,9}) b/i],[p,[g,"NextBook"],[v,x]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[g,"Voice"],p,[v,E]],[/\b(lvtel\-)?(v1[12]) b/i],[[g,"LvTel"],p,[v,E]],[/\b(ph-1) /i],[p,[g,"Essential"],[v,E]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[p,[g,"Envizen"],[v,x]],[/\b(trio[-\w\. ]+) b/i],[p,[g,"MachSpeed"],[v,x]],[/\btu_(1491) b/i],[p,[g,"Rotor"],[v,x]],[/(shield[\w ]+) b/i],[p,[g,"Nvidia"],[v,x]],[/(sprint) (\w+)/i],[g,p,[v,E]],[/(kin\.[onetw]{3})/i],[[p,/\./g," "],[g,ve],[v,E]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[p,[g,z],[v,x]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[p,[g,z],[v,E]],[/smart-tv.+(samsung)/i],[g,[v,P]],[/hbbtv.+maple;(\d+)/i],[[p,/^/,"SmartTV"],[g,V],[v,P]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[g,ae],[v,P]],[/(apple) ?tv/i],[g,[p,j+" TV"],[v,P]],[/crkey/i],[[p,K+"cast"],[g,oe],[v,P]],[/droid.+aft(\w)( bui|\))/i],[p,[g,k],[v,P]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[p,[g,re],[v,P]],[/(bravia[\w ]+)( bui|\))/i],[p,[g,de],[v,P]],[/(mitv-\w{5}) bui/i],[p,[g,U],[v,P]],[/Hbbtv.*(technisat) (.*);/i],[g,p,[v,P]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[g,me],[p,me],[v,P]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[v,P]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[g,p,[v,w]],[/droid.+; (shield) bui/i],[p,[g,"Nvidia"],[v,w]],[/(playstation [345portablevi]+)/i],[p,[g,de],[v,w]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[p,[g,ve],[v,w]],[/((pebble))app/i],[g,p,[v,I]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[p,[g,j],[v,I]],[/droid.+; (glass) \d/i],[p,[g,oe],[v,I]],[/droid.+; (wt63?0{2,3})\)/i],[p,[g,z],[v,I]],[/(quest( 2| pro)?)/i],[p,[g,M],[v,I]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[g,[v,S]],[/(aeobc)\b/i],[p,[g,k],[v,S]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[p,[v,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[p,[v,x]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[v,x]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[v,E]],[/(android[-\w\. ]{0,9});.+buil/i],[p,[g,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[y,[h,Y+"HTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[y,[h,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[h,y],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[y,h]],os:[[/microsoft (windows) (vista|xp)/i],[h,y],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[h,[y,Ee,Ne]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[h,"Windows"],[y,Ee,Ne]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[y,/_/g,"."],[h,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[h,G],[y,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[y,h],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[h,y],[/\(bb(10);/i],[y,[h,N]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[y,[h,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[y,[h,te+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[y,[h,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[y,[h,"watchOS"]],[/crkey\/([\d\.]+)/i],[y,[h,K+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[h,R],y],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[h,y],[/(sunos) ?([\w\.\d]*)/i],[[h,"Solaris"],y],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[h,y]]},Te=function($e,De){if(typeof $e===u&&(De=$e,$e=n),!(this instanceof Te))return new Te($e,De).getResult();var C=typeof r!==l&&r.navigator?r.navigator:n,b=$e||(C&&C.userAgent?C.userAgent:i),_=C&&C.userAgentData?C.userAgentData:n,L=De?O(ft,De):ft,W=C&&C.userAgent==b;return this.getBrowser=function(){var X={};return X[h]=n,X[y]=n,xe.call(X,b,L.browser),X[d]=pe(X[y]),W&&C&&C.brave&&typeof C.brave.isBrave==s&&(X[h]="Brave"),X},this.getCPU=function(){var X={};return X[m]=n,xe.call(X,b,L.cpu),X},this.getDevice=function(){var X={};return X[g]=n,X[p]=n,X[v]=n,xe.call(X,b,L.device),W&&!X[v]&&_&&_.mobile&&(X[v]=E),W&&X[p]=="Macintosh"&&C&&typeof C.standalone!==l&&C.maxTouchPoints&&C.maxTouchPoints>2&&(X[p]="iPad",X[v]=x),X},this.getEngine=function(){var X={};return X[h]=n,X[y]=n,xe.call(X,b,L.engine),X},this.getOS=function(){var X={};return X[h]=n,X[y]=n,xe.call(X,b,L.os),W&&!X[h]&&_&&_.platform!="Unknown"&&(X[h]=_.platform.replace(/chrome os/i,R).replace(/macos/i,G)),X},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return b},this.setUA=function(X){return b=typeof X===f&&X.length>A?me(X,A):X,this},this.setUA(b),this};Te.VERSION=o,Te.BROWSER=T([h,y,d]),Te.CPU=T([m]),Te.DEVICE=T([p,g,v,w,E,P,x,I,S]),Te.ENGINE=Te.OS=T([h,y]),e.exports&&(t=e.exports=Te),t.UAParser=Te;var Me=typeof r!==l&&(r.jQuery||r.Zepto);if(Me&&!Me.ua){var mt=new Te;Me.ua=mt.getResult(),Me.ua.get=function(){return mt.getUA()},Me.ua.set=function($e){mt.setUA($e);var De=mt.getResult();for(var C in De)Me.ua[C]=De[C]}}})(typeof window=="object"?window:Ge)})(Qf,Qf.exports);var y9=Qf.exports,fl="/home/runner/work/dxos/dxos/packages/core/mesh/rpc-tunnel/src/ports/iframe.ts",ed,td;if(typeof navigator<"u"){const e=new y9.UAParser(navigator.userAgent);ed=e.getBrowser().name,td=e.getOS().name}var w9=(e,t,r)=>{if(!e.contentWindow){Qe("IFrame content window missing",{origin:t},{F:fl,L:24,S:void 0,C:(n,o)=>n(...o)});return}ed==="Chrome"&&td==="iOS"?e.contentWindow.postMessage(r,t):e.contentWindow.postMessage(r,t,[r.payload])},_9=(e,t)=>{ed==="Chrome"&&td==="iOS"?window.parent.postMessage(t,e):window.parent.postMessage(t,e,[t.payload])},I1=({channel:e,iframe:t,origin:r,onOrigin:n})=>({send:async o=>{if(!r){Qe("no origin set",{channel:e},{F:fl,L:62,S:void 0,C:(s,l)=>s(...l)});return}Qe("sending",{channel:e,data:o.length},{F:fl,L:66,S:void 0,C:(s,l)=>s(...l)});const i=o.buffer.slice(o.byteOffset,o.byteOffset+o.byteLength),a={channel:e,payload:i};t?w9(t,r,a):_9(r,a)},subscribe:o=>{const i=a=>{if(!t&&a.source!==window.parent)return;if(t&&a.source!==t.contentWindow)return;const l=a.data&&typeof a.data=="object"&&"channel"in a.data&&"payload"in a.data?a.data:void 0;l?.channel===e&&(r||(r=a.origin,n?.(r)),Qe("received",l,{F:fl,L:98,S:void 0,C:(u,f)=>u(...f)}),o(new Uint8Array(l.payload)))};return window.addEventListener("message",i),()=>window.removeEventListener("message",i)}});const E9=e=>{const t=_t("spaceDialog__title");return c.createElement(Lr.Root,{defaultOpen:!0,onOpenChange:r=>r||e.onDone?.()},c.createElement(Lr.Portal,null,c.createElement(Lr.Overlay,null,c.createElement(Lr.Content,{"aria-labelledby":t},c.createElement(ou,null,c.createElement(m9,{...e,titleId:t,doneActionParent:c.createElement(Lr.Close,{asChild:!0})}))))))},x9=({runtime:e,origin:t})=>{const[{layout:r,invitationCode:n,spaceKey:o},i]=c.useState({layout:e.layout,invitationCode:e.invitationCode,spaceKey:e.spaceKey}),a=fa.useSpace(o);switch(c.useEffect(()=>e.layoutUpdate.on(s=>i(s)),[e]),c.useEffect(()=>{if(r===Ze.ShellLayout.SPACE&&!a){Qe.warn("No space found for shell space invitations.");const s=setTimeout(async()=>{await e.setAppContext({display:Ze.ShellDisplay.NONE}),e.setLayout({layout:Ze.ShellLayout.DEFAULT})});return()=>clearTimeout(s)}},[e,r,a]),r){case Ze.ShellLayout.INITIALIZE_IDENTITY:return c.createElement(A1,{mode:"halo-only",initialInvitationCode:n,onDone:()=>{e.setAppContext({display:Ze.ShellDisplay.NONE}),e.setLayout({layout:Ze.ShellLayout.DEFAULT})}});case Ze.ShellLayout.IDENTITY:case Ze.ShellLayout.SHARE_IDENTITY:case Ze.ShellLayout.EDIT_PROFILE:return c.createElement(b9,{createInvitationUrl:s=>`${t}?deviceInvitationCode=${s}`,onDone:async()=>{await e.setAppContext({display:Ze.ShellDisplay.NONE}),e.setLayout({layout:Ze.ShellLayout.DEFAULT})}});case Ze.ShellLayout.SPACE:return a?c.createElement(E9,{space:a,createInvitationUrl:s=>`${t}?spaceInvitationCode=${s}`,onDone:async()=>{await e.setAppContext({display:Ze.ShellDisplay.NONE}),e.setLayout({layout:Ze.ShellLayout.DEFAULT})}}):null;case Ze.ShellLayout.JOIN_SPACE:return c.createElement(A1,{initialInvitationCode:n,onDone:async s=>{await e.setAppContext({display:Ze.ShellDisplay.NONE,spaceKey:s?.spaceKey??void 0}),e.setLayout({layout:Ze.ShellLayout.DEFAULT})},onExit:async()=>{await e.setAppContext({display:Ze.ShellDisplay.NONE}),e.setLayout({layout:Ze.ShellLayout.DEFAULT})}});default:return null}},S9={"en-US":Object.freeze(Object.defineProperty({__proto__:null,os:{"manage profile label":"Manage identity","identity offline description":"Offline","sidebar label":"DXOS sidebar","copy invitation code label":"Copy URL","copy invitation code success label":"Copied","open share panel label":"View QR code","joining space heading":"Joining space","join space heading":"Enter space invitation","halo heading":"Initialize device identity","exit label":"Exit","identity selector title":"Join as","identity radio group title":"Select an identity you’ve associated with this device already","add identity label":"Add","continue label":"Continue","back label":"Back","next label":"Next","close label":"Close","auth choices label":"Choose an identity","create identity label":"Create an identity","create identity description":"Create a new identity.","recover identity label":"Use a seed phrase","recover identity description":"Enter your seed phrase to log in manually.","join identity label":"Use another device","join identity description":"Add this device to an identity you’re already logged into on another device.","deselect identity label":"Back to identities","addition method chooser title":"An identity is required to continue","new identity input label":"Set display name","recover identity input label":"Type or paste your seed phrase","failed to create identity message":"Failed to create an identity.","failed to recover identity message":"Failed to recover an identity from the provided seed phrase.","failed to authenticate message":"Incorrect PIN.","identity added label":"Created identity & added to this device:","join space as identity heading":"<part>as </part><part><icon/><label>{{labelValue}}</label></part>","error status label":"Failed","timeout status label":"Timed out","cancelled status label":"Cancelled","init status label":"Ready to connect","connecting status label":"Connecting…","connected status label":"Enter confirmation PIN","authenticating status label":"Enter confirmation PIN","success status label":"Success","connect label":"Connect","reconnect label":"Reconnect","cancel label":"Cancel","done label":"Done","reset label":"Start over","auth code input label":"Enter the verification code","invitation input label":"Paste an invitation code or URL","create device invitation label":"Add device","create space invitation label":"Invite","qr label":"Scan to accept invitation","empty invitations message":"No pending invitations","empty device list message":"No devices authenticated other than this device.","show all spaces label":"All spaces","all spaces label":"All spaces","create space label":"Create a new space","join space label":"Join a space","show current space label":"Current space","view space invitations label":"View space invitations","toggle sidebar label":"Open/close sidebar","open sidebar label":"Open sidebar","close sidebar label":"Close sidebar","welcome message":"Welcome","selecting identity heading":"Selecting identity","devices heading":"Devices","identity heading":"Profile settings","choose add device label":"Add device","choose devices label":"Manage devices","choose profile label":"Edit profile","choose sign out label":"Sign out","empty space members message":"There is nobody in this space yet.","back to all invitations label":"Back to all invitations","invitation heading":"Invitation","invitation list heading":"Invitations","device invitation list heading":"Pending device invitations","space invitation list heading":"Pending invitations","device list heading":"Devices","space member list heading":"Members","space panel heading":"Space membership","auth code message":"Enter the following auth code on the joining device.","display name input label":"Display name","display name input placeholder":"Enter a display name","invite one label":"Invite one","invite one description":"Only one user may join.","invite one qr label":"Single-use","invite one list item label":"Active single-use invitation","invite many label":"Invite many","invite many description":"Anyone with the link can join.","invite many qr label":"Multiple-use","invite many list item label":"Active multiple-use invitation","invite options label":"Change the active invite option.","confirm label":"Confirm","reset identity input label":"This will clear this device and all associated data. Type {{confirmationValue}} and confirm to continue.","failed to reset identity message":"Failed to reset identity.","confirmation value":"CONFIRM"}},Symbol.toStringTag,{value:"Module"}))},$9=async(e=new Ze.Config)=>{const t=new Ze.ClientServicesProxy(I1({channel:Tn.DEFAULT_CLIENT_CHANNEL})),r=new Ze.Client({config:e,services:t}),n=new D1.ShellRuntimeImpl(I1({channel:Tn.DEFAULT_SHELL_CHANNEL}));await Promise.all([n.open(),r.initialize()]),Zf(document.getElementById("root")).render(c.createElement(c.StrictMode,null,c.createElement(hT,{tx:wk,resourceExtensions:[S9]},c.createElement(Ze.ClientContext.Provider,{value:{client:r,status:Ze.SystemStatus.ACTIVE}},c.createElement(ou,null,c.createElement(yr.Provider,null,c.createElement(x9,{runtime:n,origin:location.origin})))))))};c.createContext({}),Yt.runShell=$9,Object.defineProperty(Yt,Symbol.toStringTag,{value:"Module"})});
|
|
210
|
+
//# sourceMappingURL=shell.umd.js.map
|