var vG=Object.defineProperty;var yG=(e,t,n)=>t in e?vG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var bG=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var S=(e,t,n)=>(yG(e,typeof t!="symbol"?t+"":t,n),n);var EFe=bG((GFe,Ia)=>{function xG(e,t){return t.forEach(function(n){n&&typeof n!="string"&&!Array.isArray(n)&&Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Ri(e){return Ri=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},Ri(e)}function zi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function SG(e,t){if(Ri(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ri(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function UM(e){var t=SG(e,"string");return Ri(t)==="symbol"?t:String(t)}function J8(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,UM(r.key),r)}}function ji(e,t,n){return t&&J8(e.prototype,t),n&&J8(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _s(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ng(e,t){return Ng=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Ng(e,t)}function Rh(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&&Ng(e,t)}function Pd(e,t){if(t&&(Ri(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _s(e)}function Bi(e){return Bi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Bi(e)}function ur(e,t,n){return t=UM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GM(e){if(Array.isArray(e))return e}function KM(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Ex(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Y4(e,t){if(!!e){if(typeof e=="string")return Ex(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ex(e,t)}}function qM(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wG(e){return GM(e)||KM(e)||Y4(e)||qM()}function e7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function t7(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?e7(Object(n),!0).forEach(function(r){ur(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var CG={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,n){console&&console[t]&&console[t].apply(console,n)}},kG=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};zi(this,e),this.init(t,n)}return ji(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||CG,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,i,o){return o&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(i).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new e(this.logger,t7(t7({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}},{key:"clone",value:function(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new e(this.logger,n)}}]),e}(),Fo=new kG,Hs=function(){function e(){zi(this,e),this.observers={}}return ji(e,[{key:"on",value:function(n,r){var i=this;return n.split(" ").forEach(function(o){i.observers[o]=i.observers[o]||[],i.observers[o].push(r)}),this}},{key:"off",value:function(n,r){if(!!this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(i){return i!==r})}}},{key:"emit",value:function(n){for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];if(this.observers[n]){var a=[].concat(this.observers[n]);a.forEach(function(l){l.apply(void 0,i)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(l){l.apply(l,[n].concat(i))})}}}]),e}();function cf(){var e,t,n=new Promise(function(r,i){e=r,t=i});return n.resolve=e,n.reject=t,n}function n7(e){return e==null?"":""+e}function EG(e,t,n){e.forEach(function(r){t[r]&&(n[r]=t[r])})}function X4(e,t,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function i(){return!e||typeof e=="string"}for(var o=typeof t!="string"?[].concat(t):t.split(".");o.length>1;){if(i())return{};var a=r(o.shift());!e[a]&&n&&(e[a]=new n),Object.prototype.hasOwnProperty.call(e,a)?e=e[a]:e={}}return i()?{}:{obj:e,k:r(o.shift())}}function r7(e,t,n){var r=X4(e,t,Object),i=r.obj,o=r.k;i[o]=n}function IG(e,t,n,r){var i=X4(e,t,Object),o=i.obj,a=i.k;o[a]=o[a]||[],r&&(o[a]=o[a].concat(n)),r||o[a].push(n)}function zg(e,t){var n=X4(e,t),r=n.obj,i=n.k;if(!!r)return r[i]}function i7(e,t,n){var r=zg(e,n);return r!==void 0?r:zg(t,n)}function YM(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):YM(e[r],t[r],n):e[r]=t[r]);return e}function zc(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var TG={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function _G(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return TG[t]}):e}var Bv=typeof window!="undefined"&&window.navigator&&typeof window.navigator.userAgentData=="undefined"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,PG=[" ",",","?","!",";"];function OG(e,t,n){t=t||"",n=n||"";var r=PG.filter(function(s){return t.indexOf(s)<0&&n.indexOf(s)<0});if(r.length===0)return!0;var i=new RegExp("(".concat(r.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),o=!i.test(e);if(!o){var a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o}function o7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function S1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?o7(Object(n),!0).forEach(function(r){ur(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MG(e){var t=RG();return function(){var r=Bi(e),i;if(t){var o=Bi(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Pd(this,i)}}function RG(){if(typeof Reflect=="undefined"||!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 XM(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!!e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;o<r.length;++o){if(!i||typeof i[r[o]]=="string"&&o+1<r.length)return;if(i[r[o]]===void 0){for(var a=2,s=r.slice(o,o+a).join(n),l=i[s];l===void 0&&r.length>o+a;)a++,s=r.slice(o,o+a).join(n),l=i[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 c=r.slice(o+a).join(n);return c?XM(l,c,n):void 0}i=i[r[o]]}return i}}var DG=function(e){Rh(n,e);var t=MG(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return zi(this,n),i=t.call(this),Bv&&Hs.call(_s(i)),i.data=r||{},i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return ji(n,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var o=this.options.ns.indexOf(i);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,u=[i,o];a&&typeof a!="string"&&(u=u.concat(a)),a&&typeof a=="string"&&(u=u.concat(l?a.split(l):a)),i.indexOf(".")>-1&&(u=i.split("."));var d=zg(this.data,u);return d||!c||typeof a!="string"?d:XM(this.data&&this.data[i]&&this.data[i][o],a,l)}},{key:"addResource",value:function(i,o,a,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},c=this.options.keySeparator;c===void 0&&(c=".");var u=[i,o];a&&(u=u.concat(c?a.split(c):a)),i.indexOf(".")>-1&&(u=i.split("."),s=o,o=u[1]),this.addNamespaces(o),r7(this.data,u,s),l.silent||this.emit("added",i,o,a,s)}},{key:"addResources",value:function(i,o,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(i,o,l,a[l],{silent:!0});s.silent||this.emit("added",i,o,a)}},{key:"addResourceBundle",value:function(i,o,a,s,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},u=[i,o];i.indexOf(".")>-1&&(u=i.split("."),s=a,a=o,o=u[1]),this.addNamespaces(o);var d=zg(this.data,u)||{};s?YM(d,a,l):d=S1(S1({},d),a),r7(this.data,u,d),c.silent||this.emit("added",i,o,a)}},{key:"removeResourceBundle",value:function(i,o){this.hasResourceBundle(i,o)&&delete this.data[i][o],this.removeNamespaces(o),this.emit("removed",i,o)}},{key:"hasResourceBundle",value:function(i,o){return this.getResource(i,o)!==void 0}},{key:"getResourceBundle",value:function(i,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?S1(S1({},{}),this.getResource(i,o)):this.getResource(i,o)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var o=this.getDataByLanguage(i),a=o&&Object.keys(o)||[];return!!a.find(function(s){return o[s]&&Object.keys(o[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Hs),ZM={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,i,o){var a=this;return t.forEach(function(s){a.processors[s]&&(n=a.processors[s].process(n,r,i,o))}),n}};function a7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?a7(Object(n),!0).forEach(function(r){ur(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function AG(e){var t=LG();return function(){var r=Bi(e),i;if(t){var o=Bi(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Pd(this,i)}}function LG(){if(typeof Reflect=="undefined"||!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 s7={},l7=function(e){Rh(n,e);var t=AG(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return zi(this,n),i=t.call(this),Bv&&Hs.call(_s(i)),EG(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,_s(i)),i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Fo.create("translator"),i}return ji(n,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var a=this.resolve(i,o);return a&&a.res!==void 0}},{key:"extractFromKey",value:function(i,o){var a=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;a===void 0&&(a=":");var s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,l=o.ns||this.options.defaultNS||[],c=a&&i.indexOf(a)>-1,u=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!OG(i,a,s);if(c&&!u){var d=i.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:i,namespaces:l};var f=i.split(a);(a!==s||a===s&&this.options.ns.indexOf(f[0])>-1)&&(l=f.shift()),i=f.join(s)}return typeof l=="string"&&(l=[l]),{key:i,namespaces:l}}},{key:"translate",value:function(i,o,a){var s=this;if(Ri(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var l=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,c=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,u=this.extractFromKey(i[i.length-1],o),d=u.key,f=u.namespaces,p=f[f.length-1],m=o.lng||this.language,g=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(m&&m.toLowerCase()==="cimode"){if(g){var y=o.nsSeparator||this.options.nsSeparator;return l?(v.res="".concat(p).concat(y).concat(d),v):"".concat(p).concat(y).concat(d)}return l?(v.res=d,v):d}var v=this.resolve(i,o),b=v&&v.res,x=v&&v.usedKey||d,w=v&&v.exactUsedKey||d,E=Object.prototype.toString.apply(b),C=["[object Number]","[object Function]","[object RegExp]"],I=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,_=typeof b!="string"&&typeof b!="boolean"&&typeof b!="number";if(T&&b&&_&&C.indexOf(E)<0&&!(typeof I=="string"&&E==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var P=this.options.returnedObjectHandler?this.options.returnedObjectHandler(x,b,gr(gr({},o),{},{ns:f})):"key '".concat(d," (").concat(this.language,")' returned an object instead of string.");return l?(v.res=P,v):P}if(c){var M=E==="[object Array]",D=M?[]:{},V=M?w:x;for(var B in b)if(Object.prototype.hasOwnProperty.call(b,B)){var L="".concat(V).concat(c).concat(B);D[B]=this.translate(L,gr(gr({},o),{joinArrays:!1,ns:f})),D[B]===L&&(D[B]=b[B])}b=D}}else if(T&&typeof I=="string"&&E==="[object Array]")b=b.join(I),b&&(b=this.extendTranslation(b,i,o,a));else{var G=!1,z=!1,j=o.count!==void 0&&typeof o.count!="string",F=n.hasDefaultValue(o),H=j?this.pluralResolver.getSuffix(m,o.count,o):"",R=o["defaultValue".concat(H)]||o.defaultValue;!this.isValidLookup(b)&&F&&(G=!0,b=R),this.isValidLookup(b)||(z=!0,b=d);var W=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,X=W&&z?void 0:b,te=F&&R!==b&&this.options.updateMissing;if(z||G||te){if(this.logger.log(te?"updateKey":"missingKey",m,p,d,te?R:b),c){var re=this.resolve(d,gr(gr({},o),{},{keySeparator:!1}));re&&re.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 ne=[],ie=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ie&&ie[0])for(var ae=0;ae<ie.length;ae++)ne.push(ie[ae]);else this.options.saveMissingTo==="all"?ne=this.languageUtils.toResolveHierarchy(o.lng||this.language):ne.push(o.lng||this.language);var le=function(Se,pe,st){var Ot=F&&st!==b?st:X;s.options.missingKeyHandler?s.options.missingKeyHandler(Se,p,pe,Ot,te,o):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(Se,p,pe,Ot,te,o),s.emit("missingKey",Se,p,pe,b)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?ne.forEach(function(he){s.pluralResolver.getSuffixes(he,o).forEach(function(Se){le([he],d+Se,o["defaultValue".concat(Se)]||R)})}):le(ne,d,R))}b=this.extendTranslation(b,i,o,v,a),z&&b===d&&this.options.appendNamespaceToMissingKey&&(b="".concat(p,":").concat(d)),(z||G)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?b=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(p,":").concat(d):d,G?b:void 0):b=this.options.parseMissingKeyHandler(b))}return l?(v.res=b,v):b}},{key:"extendTranslation",value:function(i,o,a,s,l){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,gr(gr({},this.options.interpolation.defaultVariables),a),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!a.skipInterpolation){a.interpolation&&this.interpolator.init(gr(gr({},a),{interpolation:gr(gr({},this.options.interpolation),a.interpolation)}));var u=typeof i=="string"&&(a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),d;if(u){var f=i.match(this.interpolator.nestingRegexp);d=f&&f.length}var p=a.replace&&typeof a.replace!="string"?a.replace:a;if(this.options.interpolation.defaultVariables&&(p=gr(gr({},this.options.interpolation.defaultVariables),p)),i=this.interpolator.interpolate(i,p,a.lng||this.language,a),u){var m=i.match(this.interpolator.nestingRegexp),g=m&&m.length;d<g&&(a.nest=!1)}a.nest!==!1&&(i=this.interpolator.nest(i,function(){for(var b=arguments.length,x=new Array(b),w=0;w<b;w++)x[w]=arguments[w];return l&&l[0]===x[0]&&!a.context?(c.logger.warn("It seems you are nesting recursively key: ".concat(x[0]," in key: ").concat(o[0])),null):c.translate.apply(c,x.concat([o]))},a)),a.interpolation&&this.interpolator.reset()}var y=a.postProcess||this.options.postProcess,v=typeof y=="string"?[y]:y;return i!=null&&v&&v.length&&a.applyPostProcessor!==!1&&(i=ZM.handle(v,i,o,this.options&&this.options.postProcessPassResolved?gr({i18nResolved:s},a):a,this)),i}},{key:"resolve",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,c,u,d;return typeof i=="string"&&(i=[i]),i.forEach(function(f){if(!o.isValidLookup(s)){var p=o.extractFromKey(f,a),m=p.key;l=m;var g=p.namespaces;o.options.fallbackNS&&(g=g.concat(o.options.fallbackNS));var y=a.count!==void 0&&typeof a.count!="string",v=y&&!a.ordinal&&a.count===0&&o.pluralResolver.shouldUseIntlApi(),b=a.context!==void 0&&(typeof a.context=="string"||typeof a.context=="number")&&a.context!=="",x=a.lngs?a.lngs:o.languageUtils.toResolveHierarchy(a.lng||o.language,a.fallbackLng);g.forEach(function(w){o.isValidLookup(s)||(d=w,!s7["".concat(x[0],"-").concat(w)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(d)&&(s7["".concat(x[0],"-").concat(w)]=!0,o.logger.warn('key "'.concat(l,'" for languages "').concat(x.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!!!")),x.forEach(function(E){if(!o.isValidLookup(s)){u=E;var C=[m];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(C,m,E,w,a);else{var I;y&&(I=o.pluralResolver.getSuffix(E,a.count,a));var T="".concat(o.options.pluralSeparator,"zero");if(y&&(C.push(m+I),v&&C.push(m+T)),b){var _="".concat(m).concat(o.options.contextSeparator).concat(a.context);C.push(_),y&&(C.push(_+I),v&&C.push(_+T))}}for(var P;P=C.pop();)o.isValidLookup(s)||(c=P,s=o.getResource(E,w,P,a))}}))})}}),{res:s,usedKey:l,exactUsedKey:c,usedLng:u,usedNS:d}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,o,a){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,o,a,s):this.resourceStore.getResource(i,o,a,s)}}],[{key:"hasDefaultValue",value:function(i){var o="defaultValue";for(var a in i)if(Object.prototype.hasOwnProperty.call(i,a)&&o===a.substring(0,o.length)&&i[a]!==void 0)return!0;return!1}}]),n}(Hs);function eb(e){return e.charAt(0).toUpperCase()+e.slice(1)}var BG=function(){function e(t){zi(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Fo.create("languageUtils")}return ji(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],i=n.split("-");return this.options.lowerCaseLng?i=i.map(function(o){return o.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=eb(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=eb(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=eb(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var i;return n.forEach(function(o){if(!i){var a=r.formatLanguageCode(o);(!r.options.supportedLngs||r.isSupportedCode(a))&&(i=a)}}),!i&&this.options.supportedLngs&&n.forEach(function(o){if(!i){var a=r.getLanguagePartFromCode(o);if(r.isSupportedCode(a))return i=a;i=r.options.supportedLngs.find(function(s){if(s.indexOf(a)===0)return s})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var i=n[r];return i||(i=n[this.getScriptPartFromCode(r)]),i||(i=n[this.formatLanguageCode(r)]),i||(i=n[this.getLanguagePartFromCode(r)]),i||(i=n.default),i||[]}},{key:"toResolveHierarchy",value:function(n,r){var i=this,o=this.getFallbackCodes(r||this.options.fallbackLng||[],n),a=[],s=function(c){!c||(i.isSupportedCode(c)?a.push(c):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(c)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(n))):typeof n=="string"&&s(this.formatLanguageCode(n)),o.forEach(function(l){a.indexOf(l)<0&&s(i.formatLanguageCode(l))}),a}}]),e}(),$G=[{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}],FG={1:function(t){return Number(t>1)},2:function(t){return Number(t!=1)},3:function(t){return 0},4:function(t){return Number(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 Number(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 Number(t==1?0:t>=2&&t<=4?1:2)},7:function(t){return Number(t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(t==1?0:t==2?1:t!=8&&t!=11?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(t==1?0:t==2?1:t<7?2:t<11?3:4)},11:function(t){return Number(t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(t!==0)},14:function(t){return Number(t==1?0:t==2?1:t==3?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:t!==0?1:2)},17:function(t){return Number(t==1||t%10==1&&t%100!=11?0:1)},18:function(t){return Number(t==0?0:t==1?1:2)},19:function(t){return Number(t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(t==1?0:t==0||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0)},22:function(t){return Number(t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3)}},NG=["v1","v2","v3"],c7={zero:0,one:1,two:2,few:3,many:4,other:5};function zG(){var e={};return $G.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:FG[t.fc]}})}),e}var jG=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};zi(this,e),this.languageUtils=t,this.options=n,this.logger=Fo.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl=="undefined"||!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=zG()}return ji(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,i).map(function(o){return"".concat(r).concat(o)})}},{key:"getSuffixes",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(function(a,s){return c7[a]-c7[s]}).map(function(a){return"".concat(r.options.prepend).concat(a)}):o.numbers.map(function(a){return r.getSuffix(n,a,i)}):[]}},{key:"getSuffix",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(o.select(r)):this.getSuffixRetroCompatible(o,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var i=this,o=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),a=n.numbers[o];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));var s=function(){return i.options.prepend&&a.toString()?i.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&&n.numbers.length===2&&n.numbers[0]===1?s():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}},{key:"shouldUseIntlApi",value:function(){return!NG.includes(this.options.compatibilityJSON)}}]),e}();function u7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ui(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?u7(Object(n),!0).forEach(function(r){ur(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var HG=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};zi(this,e),this.logger=Fo.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return ji(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:_G,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?zc(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?zc(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?zc(r.nestingPrefix):r.nestingPrefixEscaped||zc("$t("),this.nestingSuffix=r.nestingSuffix?zc(r.nestingSuffix):r.nestingSuffixEscaped||zc(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(n,r,i,o){var a=this,s,l,c,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(y){return y.replace(/\$/g,"$$$$")}var f=function(v){if(v.indexOf(a.formatSeparator)<0){var b=i7(r,u,v);return a.alwaysFormat?a.format(b,void 0,i,Ui(Ui(Ui({},o),r),{},{interpolationkey:v})):b}var x=v.split(a.formatSeparator),w=x.shift().trim(),E=x.join(a.formatSeparator).trim();return a.format(i7(r,u,w),E,i,Ui(Ui(Ui({},o),r),{},{interpolationkey:w}))};this.resetRegExp();var p=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,m=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,g=[{regex:this.regexpUnescape,safeValue:function(v){return d(v)}},{regex:this.regexp,safeValue:function(v){return a.escapeValue?d(a.escape(v)):d(v)}}];return g.forEach(function(y){for(c=0;s=y.regex.exec(n);){var v=s[1].trim();if(l=f(v),l===void 0)if(typeof p=="function"){var b=p(n,s,o);l=typeof b=="string"?b:""}else if(o&&o.hasOwnProperty(v))l="";else if(m){l=s[0];continue}else a.logger.warn("missed to pass in variable ".concat(v," for interpolating ").concat(n)),l="";else typeof l!="string"&&!a.useRawValueToEscape&&(l=n7(l));var x=y.safeValue(l);if(n=n.replace(s[0],x),m?(y.regex.lastIndex+=l.length,y.regex.lastIndex-=s[0].length):y.regex.lastIndex=0,c++,c>=a.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,s,l=Ui({},o);l.applyPostProcessor=!1,delete l.defaultValue;function c(p,m){var g=this.nestingOptionsSeparator;if(p.indexOf(g)<0)return p;var y=p.split(new RegExp("".concat(g,"[ ]*{"))),v="{".concat(y[1]);p=y[0],v=this.interpolate(v,l);var b=v.match(/'/g),x=v.match(/"/g);(b&&b.length%2===0&&!x||x.length%2!==0)&&(v=v.replace(/'/g,'"'));try{l=JSON.parse(v),m&&(l=Ui(Ui({},m),l))}catch(w){return this.logger.warn("failed parsing options string in nesting for key ".concat(p),w),"".concat(p).concat(g).concat(v)}return delete l.defaultValue,p}for(;a=this.nestingRegexp.exec(n);){var u=[],d=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){var f=a[1].split(this.formatSeparator).map(function(p){return p.trim()});a[1]=f.shift(),u=f,d=!0}if(s=r(c.call(this,a[1].trim(),l),l),s&&a[0]===n&&typeof s!="string")return s;typeof s!="string"&&(s=n7(s)),s||(this.logger.warn("missed to resolve ".concat(a[1]," for nesting ").concat(n)),s=""),d&&(s=u.reduce(function(p,m){return i.format(p,m,o.lng,Ui(Ui({},o),{},{interpolationkey:a[1].trim()}))},s.trim())),n=n.replace(a[0],s),this.regexp.lastIndex=0}return n}}]),e}();function d7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d7(Object(n),!0).forEach(function(r){ur(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function VG(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if(t==="currency"&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if(t==="relativetime"&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{var o=i.split(";");o.forEach(function(a){if(!!a){var s=a.split(":"),l=wG(s),c=l[0],u=l.slice(1),d=u.join(":").trim().replace(/^'+|'+$/g,"");n[c.trim()]||(n[c.trim()]=d),d==="false"&&(n[c.trim()]=!1),d==="true"&&(n[c.trim()]=!0),isNaN(d)||(n[c.trim()]=parseInt(d,10))}})}}return{formatName:t,formatOptions:n}}function jc(e){var t={};return function(r,i,o){var a=i+JSON.stringify(o),s=t[a];return s||(s=e(i,o),t[a]=s),s(r)}}var WG=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};zi(this,e),this.logger=Fo.create("formatter"),this.options=t,this.formats={number:jc(function(n,r){var i=new Intl.NumberFormat(n,r);return function(o){return i.format(o)}}),currency:jc(function(n,r){var i=new Intl.NumberFormat(n,Xa(Xa({},r),{},{style:"currency"}));return function(o){return i.format(o)}}),datetime:jc(function(n,r){var i=new Intl.DateTimeFormat(n,Xa({},r));return function(o){return i.format(o)}}),relativetime:jc(function(n,r){var i=new Intl.RelativeTimeFormat(n,Xa({},r));return function(o){return i.format(o,r.range||"day")}}),list:jc(function(n,r){var i=new Intl.ListFormat(n,Xa({},r));return function(o){return i.format(o)}})},this.init(t)}return ji(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=r.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=jc(r)}},{key:"format",value:function(n,r,i,o){var a=this,s=r.split(this.formatSeparator),l=s.reduce(function(c,u){var d=VG(u),f=d.formatName,p=d.formatOptions;if(a.formats[f]){var m=c;try{var g=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},y=g.locale||g.lng||o.locale||o.lng||i;m=a.formats[f](c,y,Xa(Xa(Xa({},p),o),g))}catch(v){a.logger.warn(v)}return m}else a.logger.warn("there was no format function for ".concat(f));return c},n);return l}}]),e}();function f7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function p7(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?f7(Object(n),!0).forEach(function(r){ur(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function UG(e){var t=GG();return function(){var r=Bi(e),i;if(t){var o=Bi(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Pd(this,i)}}function GG(){if(typeof Reflect=="undefined"||!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 KG(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var qG=function(e){Rh(n,e);var t=UG(n);function n(r,i,o){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return zi(this,n),a=t.call(this),Bv&&Hs.call(_s(a)),a.backend=r,a.store=i,a.services=o,a.languageUtils=o.languageUtils,a.options=s,a.logger=Fo.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(o,s.backend,s),a}return ji(n,[{key:"queueLoad",value:function(i,o,a,s){var l=this,c={},u={},d={},f={};return i.forEach(function(p){var m=!0;o.forEach(function(g){var y="".concat(p,"|").concat(g);!a.reload&&l.store.hasResourceBundle(p,g)?l.state[y]=2:l.state[y]<0||(l.state[y]===1?u[y]===void 0&&(u[y]=!0):(l.state[y]=1,m=!1,u[y]===void 0&&(u[y]=!0),c[y]===void 0&&(c[y]=!0),f[g]===void 0&&(f[g]=!0)))}),m||(d[p]=!0)}),(Object.keys(c).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(c),pending:Object.keys(u),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(f)}}},{key:"loaded",value:function(i,o,a){var s=i.split("|"),l=s[0],c=s[1];o&&this.emit("failedLoading",l,c,o),a&&this.store.addResourceBundle(l,c,a),this.state[i]=o?-1:2;var u={};this.queue.forEach(function(d){IG(d.loaded,[l],c),KG(d,i),o&&d.errors.push(o),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(function(f){u[f]||(u[f]={});var p=d.loaded[f];p.length&&p.forEach(function(m){u[f][m]===void 0&&(u[f][m]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(i,o,a){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,u=arguments.length>5?arguments[5]:void 0;if(!i.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:o,fcName:a,tried:l,wait:c,callback:u});return}return this.readingCalls++,this.backend[a](i,o,function(d,f){if(s.readingCalls--,s.waitingReads.length>0){var p=s.waitingReads.shift();s.read(p.lng,p.ns,p.fcName,p.tried,p.wait,p.callback)}if(d&&f&&l<s.maxRetries){setTimeout(function(){s.read.call(s,i,o,a,l+1,c*2,u)},c);return}u(d,f)})}},{key:"prepareLoading",value:function(i,o){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 i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof o=="string"&&(o=[o]);var c=this.queueLoad(i,o,s,l);if(!c.toLoad.length)return c.pending.length||l(),null;c.toLoad.forEach(function(u){a.loadOne(u)})}},{key:"load",value:function(i,o,a){this.prepareLoading(i,o,{},a)}},{key:"reload",value:function(i,o,a){this.prepareLoading(i,o,{reload:!0},a)}},{key:"loadOne",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=i.split("|"),l=s[0],c=s[1];this.read(l,c,"read",void 0,void 0,function(u,d){u&&o.logger.warn("".concat(a,"loading namespace ").concat(c," for language ").concat(l," failed"),u),!u&&d&&o.logger.log("".concat(a,"loaded namespace ").concat(c," for language ").concat(l),d),o.loaded(i,u,d)})}},{key:"saveMissing",value:function(i,o,a,s,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn('did not save key "'.concat(a,'" as the namespace "').concat(o,'" 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(i,o,a,s,null,p7(p7({},c),{},{isUpdate:l})),!(!i||!i[0])&&this.store.addResource(i[0],o,a,s))}}]),n}(Hs);function YG(){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 n={};if(Ri(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),Ri(t[2])==="object"||Ri(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(i){n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function h7(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 m7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Eo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?m7(Object(n),!0).forEach(function(r){ur(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function XG(e){var t=ZG();return function(){var r=Bi(e),i;if(t){var o=Bi(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Pd(this,i)}}function ZG(){if(typeof Reflect=="undefined"||!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 w1(){}function QG(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var jg=function(e){Rh(n,e);var t=XG(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(zi(this,n),r=t.call(this),Bv&&Hs.call(_s(r)),r.options=h7(i),r.services={},r.logger=Fo,r.modules={external:[]},QG(_s(r)),o&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,o),Pd(r,_s(r));setTimeout(function(){r.init(i,o)},0)}return r}return ji(n,[{key:"init",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(a=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));var s=YG();this.options=Eo(Eo(Eo({},s),this.options),h7(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Eo(Eo({},s.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function l(v){return v?typeof v=="function"?new v:v:null}if(!this.options.isClone){this.modules.logger?Fo.init(l(this.modules.logger),this.options):Fo.init(null,this.options);var c;this.modules.formatter?c=this.modules.formatter:typeof Intl!="undefined"&&(c=WG);var u=new BG(this.options);this.store=new DG(this.options.resources,this.options);var d=this.services;d.logger=Fo,d.resourceStore=this.store,d.languageUtils=u,d.pluralResolver=new jG(u,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(d.formatter=l(c),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new HG(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new qG(l(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(v){for(var b=arguments.length,x=new Array(b>1?b-1:0),w=1;w<b;w++)x[w-1]=arguments[w];i.emit.apply(i,[v].concat(x))}),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 l7(this.services,this.options),this.translator.on("*",function(v){for(var b=arguments.length,x=new Array(b>1?b-1:0),w=1;w<b;w++)x[w-1]=arguments[w];i.emit.apply(i,[v].concat(x))}),this.modules.external.forEach(function(v){v.init&&v.init(i)})}if(this.format=this.options.interpolation.format,a||(a=w1),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var p=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];p.forEach(function(v){i[v]=function(){var b;return(b=i.store)[v].apply(b,arguments)}});var m=["addResource","addResources","addResourceBundle","removeResourceBundle"];m.forEach(function(v){i[v]=function(){var b;return(b=i.store)[v].apply(b,arguments),i}});var g=cf(),y=function(){var b=function(w,E){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),g.resolve(E),a(w,E)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return b(null,i.t.bind(i));i.changeLanguage(i.options.lng,b)};return this.options.resources||!this.options.initImmediate?y():setTimeout(y,0),g}},{key:"loadResources",value:function(i){var o=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w1,s=a,l=typeof i=="string"?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var c=[],u=function(p){if(!!p){var m=o.services.languageUtils.toResolveHierarchy(p);m.forEach(function(g){c.indexOf(g)<0&&c.push(g)})}};if(l)u(l);else{var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.forEach(function(f){return u(f)})}this.options.preload&&this.options.preload.forEach(function(f){return u(f)}),this.services.backendConnector.load(c,this.options.ns,function(f){!f&&!o.resolvedLanguage&&o.language&&o.setResolvedLanguage(o.language),s(f)})}else s(null)}},{key:"reloadResources",value:function(i,o,a){var s=cf();return i||(i=this.languages),o||(o=this.options.ns),a||(a=w1),this.services.backendConnector.reload(i,o,function(l){s.resolve(),a(l)}),s}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&ZM.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var o=0;o<this.languages.length;o++){var a=this.languages[o];if(!(["cimode","dev"].indexOf(a)>-1)&&this.store.hasLanguageSomeTranslations(a)){this.resolvedLanguage=a;break}}}},{key:"changeLanguage",value:function(i,o){var a=this;this.isLanguageChangingTo=i;var s=cf();this.emit("languageChanging",i);var l=function(f){a.language=f,a.languages=a.services.languageUtils.toResolveHierarchy(f),a.resolvedLanguage=void 0,a.setResolvedLanguage(f)},c=function(f,p){p?(l(p),a.translator.changeLanguage(p),a.isLanguageChangingTo=void 0,a.emit("languageChanged",p),a.logger.log("languageChanged",p)):a.isLanguageChangingTo=void 0,s.resolve(function(){return a.t.apply(a,arguments)}),o&&o(f,function(){return a.t.apply(a,arguments)})},u=function(f){!i&&!f&&a.services.languageDetector&&(f=[]);var p=typeof f=="string"?f:a.services.languageUtils.getBestMatchFromCodes(f);p&&(a.language||l(p),a.translator.language||a.translator.changeLanguage(p),a.services.languageDetector&&a.services.languageDetector.cacheUserLanguage(p)),a.loadResources(p,function(m){c(m,p)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(u):u(i),s}},{key:"getFixedT",value:function(i,o,a){var s=this,l=function c(u,d){var f;if(Ri(d)!=="object"){for(var p=arguments.length,m=new Array(p>2?p-2:0),g=2;g<p;g++)m[g-2]=arguments[g];f=s.options.overloadTranslationOptionHandler([u,d].concat(m))}else f=Eo({},d);f.lng=f.lng||c.lng,f.lngs=f.lngs||c.lngs,f.ns=f.ns||c.ns,f.keyPrefix=f.keyPrefix||a||c.keyPrefix;var y=s.options.keySeparator||".",v=f.keyPrefix?"".concat(f.keyPrefix).concat(y).concat(u):u;return s.t(v,f)};return typeof i=="string"?l.lng=i:l.lngs=i,l.ns=o,l.keyPrefix=a,l}},{key:"t",value:function(){var i;return this.translator&&(i=this.translator).translate.apply(i,arguments)}},{key:"exists",value:function(){var i;return this.translator&&(i=this.translator).exists.apply(i,arguments)}},{key:"setDefaultNamespace",value:function(i){this.options.defaultNS=i}},{key:"hasLoadedNamespace",value:function(i){var o=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,c=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var u=function(p,m){var g=o.services.backendConnector.state["".concat(p,"|").concat(m)];return g===-1||g===2};if(a.precheck){var d=a.precheck(this,u);if(d!==void 0)return d}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(s,i)&&(!l||u(c,i)))}},{key:"loadNamespaces",value:function(i,o){var a=this,s=cf();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(l){a.options.ns.indexOf(l)<0&&a.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),o&&o(l)}),s):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(i,o){var a=cf();typeof i=="string"&&(i=[i]);var s=this.options.preload||[],l=i.filter(function(c){return s.indexOf(c)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(c){a.resolve(),o&&o(c)}),a):(o&&o(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var o=["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 o.indexOf(this.services.languageUtils.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w1,s=Eo(Eo(Eo({},this.options),o),{isClone:!0}),l=new n(s);(o.debug!==void 0||o.prefix!==void 0)&&(l.logger=l.logger.clone(o));var c=["store","services","language"];return c.forEach(function(u){l[u]=i[u]}),l.services=Eo({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new l7(l.services,l.options),l.translator.on("*",function(u){for(var d=arguments.length,f=new Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];l.emit.apply(l,[u].concat(f))}),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}}}]),n}(Hs);ur(jg,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new jg(e,t)});var Tr=jg.createInstance();Tr.createInstance=jg.createInstance;Tr.createInstance;Tr.init;Tr.loadResources;Tr.reloadResources;Tr.use;Tr.changeLanguage;Tr.getFixedT;Tr.t;Tr.exists;Tr.setDefaultNamespace;Tr.hasLoadedNamespace;Tr.loadNamespaces;Tr.loadLanguages;function QM(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Od(e,t){if(e==null)return{};var n=QM(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}var Fl=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},h={exports:{}},je={};/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Dh=Symbol.for("react.element"),JG=Symbol.for("react.portal"),eK=Symbol.for("react.fragment"),tK=Symbol.for("react.strict_mode"),nK=Symbol.for("react.profiler"),rK=Symbol.for("react.provider"),iK=Symbol.for("react.context"),oK=Symbol.for("react.forward_ref"),aK=Symbol.for("react.suspense"),sK=Symbol.for("react.memo"),lK=Symbol.for("react.lazy"),g7=Symbol.iterator;function cK(e){return e===null||typeof e!="object"?null:(e=g7&&e[g7]||e["@@iterator"],typeof e=="function"?e:null)}var JM={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},eR=Object.assign,tR={};function Md(e,t,n){this.props=e,this.context=t,this.refs=tR,this.updater=n||JM}Md.prototype.isReactComponent={};Md.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Md.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function nR(){}nR.prototype=Md.prototype;function Z4(e,t,n){this.props=e,this.context=t,this.refs=tR,this.updater=n||JM}var Q4=Z4.prototype=new nR;Q4.constructor=Z4;eR(Q4,Md.prototype);Q4.isPureReactComponent=!0;var v7=Array.isArray,rR=Object.prototype.hasOwnProperty,J4={current:null},iR={key:!0,ref:!0,__self:!0,__source:!0};function oR(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)rR.call(t,r)&&!iR.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1<s){for(var l=Array(s),c=0;c<s;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(r in s=e.defaultProps,s)i[r]===void 0&&(i[r]=s[r]);return{$$typeof:Dh,type:e,key:o,ref:a,props:i,_owner:J4.current}}function uK(e,t){return{$$typeof:Dh,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function ew(e){return typeof e=="object"&&e!==null&&e.$$typeof===Dh}function dK(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var y7=/\/+/g;function tb(e,t){return typeof e=="object"&&e!==null&&e.key!=null?dK(""+e.key):t.toString(36)}function Gm(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Dh:case JG:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+tb(a,0):r,v7(i)?(n="",e!=null&&(n=e.replace(y7,"$&/")+"/"),Gm(i,t,n,"",function(c){return c})):i!=null&&(ew(i)&&(i=uK(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(y7,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",v7(e))for(var s=0;s<e.length;s++){o=e[s];var l=r+tb(o,s);a+=Gm(o,t,n,l,i)}else if(l=cK(e),typeof l=="function")for(e=l.call(e),s=0;!(o=e.next()).done;)o=o.value,l=r+tb(o,s++),a+=Gm(o,t,n,l,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function C1(e,t,n){if(e==null)return e;var r=[],i=0;return Gm(e,r,"","",function(o){return t.call(n,o,i++)}),r}function fK(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var _r={current:null},Km={transition:null},pK={ReactCurrentDispatcher:_r,ReactCurrentBatchConfig:Km,ReactCurrentOwner:J4};je.Children={map:C1,forEach:function(e,t,n){C1(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return C1(e,function(){t++}),t},toArray:function(e){return C1(e,function(t){return t})||[]},only:function(e){if(!ew(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};je.Component=Md;je.Fragment=eK;je.Profiler=nK;je.PureComponent=Z4;je.StrictMode=tK;je.Suspense=aK;je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=pK;je.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=eR({},e.props),i=e.key,o=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,a=J4.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)rR.call(t,l)&&!iR.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){s=Array(l);for(var c=0;c<l;c++)s[c]=arguments[c+2];r.children=s}return{$$typeof:Dh,type:e.type,key:i,ref:o,props:r,_owner:a}};je.createContext=function(e){return e={$$typeof:iK,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:rK,_context:e},e.Consumer=e};je.createElement=oR;je.createFactory=function(e){var t=oR.bind(null,e);return t.type=e,t};je.createRef=function(){return{current:null}};je.forwardRef=function(e){return{$$typeof:oK,render:e}};je.isValidElement=ew;je.lazy=function(e){return{$$typeof:lK,_payload:{_status:-1,_result:e},_init:fK}};je.memo=function(e,t){return{$$typeof:sK,type:e,compare:t===void 0?null:t}};je.startTransition=function(e){var t=Km.transition;Km.transition={};try{e()}finally{Km.transition=t}};je.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};je.useCallback=function(e,t){return _r.current.useCallback(e,t)};je.useContext=function(e){return _r.current.useContext(e)};je.useDebugValue=function(){};je.useDeferredValue=function(e){return _r.current.useDeferredValue(e)};je.useEffect=function(e,t){return _r.current.useEffect(e,t)};je.useId=function(){return _r.current.useId()};je.useImperativeHandle=function(e,t,n){return _r.current.useImperativeHandle(e,t,n)};je.useInsertionEffect=function(e,t){return _r.current.useInsertionEffect(e,t)};je.useLayoutEffect=function(e,t){return _r.current.useLayoutEffect(e,t)};je.useMemo=function(e,t){return _r.current.useMemo(e,t)};je.useReducer=function(e,t,n){return _r.current.useReducer(e,t,n)};je.useRef=function(e){return _r.current.useRef(e)};je.useState=function(e){return _r.current.useState(e)};je.useSyncExternalStore=function(e,t,n){return _r.current.useSyncExternalStore(e,t,n)};je.useTransition=function(){return _r.current.useTransition()};je.version="18.2.0";h.exports=je;var A=h.exports,Ix=xG({__proto__:null,default:A},[h.exports]),hK=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,mK={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xA9","&#169;":"\xA9","&reg;":"\xAE","&#174;":"\xAE","&hellip;":"\u2026","&#8230;":"\u2026","&#x2F;":"/","&#47;":"/"},gK=function(t){return mK[t]},vK=function(t){return t.replace(hK,gK)};function b7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function x7(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?b7(Object(n),!0).forEach(function(r){ur(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var Tx={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:vK},aR,yK=h.exports.createContext();function bK(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Tx=x7(x7({},Tx),e)}function xK(){return Tx}var SK=function(){function e(){zi(this,e),this.usedNamespaces={}}return ji(e,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(i){r.usedNamespaces[i]||(r.usedNamespaces[i]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function wK(e){aR=e}function CK(){return aR}var kK={type:"3rdParty",init:function(t){bK(t.options.react),wK(t)}};function EK(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];typeof n[0]=="string"&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var S7={};function _x(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&S7[t[0]]||(typeof t[0]=="string"&&(S7[t[0]]=new Date),EK.apply(void 0,t))}function w7(e,t,n){e.loadNamespaces(t,function(){if(e.isInitialized)n();else{var r=function i(){setTimeout(function(){e.off("initialized",i)},0),n()};e.on("initialized",r)}})}function IK(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=t.languages[0],i=t.options?t.options.fallbackLng:!1,o=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var a=function(l,c){var u=t.services.backendConnector.state["".concat(l,"|").concat(c)];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!a(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||a(r,e)&&(!i||a(o,e)))}function TK(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return _x("i18n.languages were undefined or empty",t.languages),!0;var r=t.options.ignoreJSONStructure!==void 0;return r?t.hasLoadedNamespace(e,{precheck:function(o,a){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!a(o.isLanguageChangingTo,e))return!1}}):IK(e,t,n)}function _K(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function Go(e,t){return GM(e)||_K(e,t)||Y4(e,t)||qM()}function C7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function nb(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?C7(Object(n),!0).forEach(function(r){ur(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var PK=function(t,n){var r=h.exports.useRef();return h.exports.useEffect(function(){r.current=n?r.current:t},[t,n]),r.current};function dn(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=h.exports.useContext(yK)||{},i=r.i18n,o=r.defaultNS,a=n||i||CK();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new SK),!a){_x("You will need to pass in an i18next instance by using initReactI18next");var s=function(_){return Array.isArray(_)?_[_.length-1]:_},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}a.options.react&&a.options.react.wait!==void 0&&_x("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var c=nb(nb(nb({},xK()),a.options.react),t),u=c.useSuspense,d=c.keyPrefix,f=e||o||a.options&&a.options.defaultNS;f=typeof f=="string"?[f]:f||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(f);var p=(a.isInitialized||a.initializedStoreOnce)&&f.every(function(T){return TK(T,a,c)});function m(){return a.getFixedT(null,c.nsMode==="fallback"?f:f[0],d)}var g=h.exports.useState(m),y=Go(g,2),v=y[0],b=y[1],x=f.join(),w=PK(x),E=h.exports.useRef(!0);h.exports.useEffect(function(){var T=c.bindI18n,_=c.bindI18nStore;E.current=!0,!p&&!u&&w7(a,f,function(){E.current&&b(m)}),p&&w&&w!==x&&E.current&&b(m);function P(){E.current&&b(m)}return T&&a&&a.on(T,P),_&&a&&a.store.on(_,P),function(){E.current=!1,T&&a&&T.split(" ").forEach(function(M){return a.off(M,P)}),_&&a&&_.split(" ").forEach(function(M){return a.store.off(M,P)})}},[a,x]);var C=h.exports.useRef(!0);h.exports.useEffect(function(){E.current&&!C.current&&b(m),C.current=!1},[a,d]);var I=[v,a,p];if(I.t=v,I.i18n=a,I.ready=p,p||!p&&!u)return I;throw new Promise(function(T){w7(a,f,function(){T()})})}const OK={noElementAvailable:"Sorry no {{element}} available",search:"Search...",searchElement:"Search for {{element}}",promptSearch:"Please input a search term",notEnoughElement:"Please input more than {{element}} characters",recentElement:"Recently used {{element}}"},MK={move:"Move",flipHorizontal:"Flip Horizontal",flipVertical:"Flip Vertical",changeIcon:"Change Icon",changeUrl:"Change Url",connectUrl:"Connect to WorldAnvil",addUrl:"Add Url",changeName:"Change Title",changeFill:"Change Fill Color",changeColor:"Change Color",changeStroke:"Change Stroke",open:"Open",changeBlock:"Change Block",showText:"Show Text",hideText:"Hide Text",disableStroke:"Disable Stroke",disableElement:"Disable {{element}}",sure:"Are you sure? You can't undo this action afterwards.",replaceTitle:"Replace Whiteboard with template",copyElementToClipboard:"Copy {{element}} to clipboard",copiedToClipboard:"Copied to Clipboard",copiedToClipboardLabel:"Right Click > Paste or ctrl+V to paste anywhere you want ",cancel:"Cancel",replace:"Replace Whiteboard",blockIcon:"Icon",blockAvatar:"Avatar",blockBanner:"Banner",blockShield:"Shield",blockDefault:"Horizontal",blockBook:"Book",type:"Type",lockUnlock:"Lock / Unlock",ungroup:"Ungroup",toFront:"  To Front",forward:"  Forward",backward:"  Backward",toBack:"  To Back",export:"Export",PNG:"PNG",JPG:"JPG",WEBP:"WEBP",SVG:"SVG",JSON:"JSON",copyAsSVG:"Copy as SVG",copyAsJSON:"Copy as JSON",cut:"Cut",copy:"Copy",paste:"Paste",undo:"Undo",redo:"Redo",moveToPage:"Move To Page",page:"Page",edit:"Edit",changeBg:"Change Background",selectAll:"Select All",selectNone:"Select None",setDefaultCanvas:"Set Whiteboard Example Template",deleteCanvas:"Delete Current Canvas",changeBgColor:"Set a colored background",changeBgImage:"Set an image as background",changeElement:"Change {{ element}}",editElement:"Edit {{ element}}",renameElement:"Rename {{ element}}",removeElement:"Remove {{ element}}",close:"Close",zoomIn:"Zoom In",zoomOut:"Zoom Out",to100:"To 100%",toFit:"To Fit",toSelection:"To Selection",select:"Select",eraser:"Eraser",draw:"Draw",arrow:"Arrow",text:"Text",sticky:"Sticky",shapeMenu:"Shape Menu",otherActions:"Other Actions",alignLeftIcon:"Align Left",alignCenterHorizontallyIcon:"Align Center Horizontally",alignRightIcon:"Align Right",stretchHorizontallyIcon:"Stretch Horizontally",spaceEvenlyHorizontallyIcon:"Space Evenly Horizontally",alignTopIcon:"Align Top",alignCenterVerticallyIcon:"Align Center Vertically",alignBottomIcon:"Align Bottom",stretchVerticallyIcon:"Stretch Vertically",spaceEvenlyVerticallyIcon:"Space Evenly Vertically",delete:"Delete",ellipse:"Ellipse",rectangle:"Rectangle",triangle:"Triangle",diamond:"Diamond",polygon:"Tilted Rectangle",line:"Line",image:"Image",block:"Block",book:"Book",icon:"Icon",searchMenu:"Search",backToContent:"Back to content",duplicate:"Duplicate",rotate:"Rotate",group:"Group",moveBackward:"Move Backward",moveForward:"Move Forward",resetAngle:"Reset Angle",moveToBack:"Move to Back",moveToFront:"Move to Front",toggleLocked:"Toggle Locked",toggleAspectRatioLock:"Toggle Aspect Ratio Lock",loading:"Loading...",styles:"Styles",color:"Color",strokeColor:"Stroke Color",fillColor:"Background Color",fill:"Fill",dash:"Dash",size:"Size",font:"Font",aA:"aA",align:"Align",darkMode:"Dark Mode",focusMode:"Focus Mode",debugMode:"Debug Mode",rotateHandles:"Rotate Handles",bindingHandles:"Binding Handles",cloneHandles:"Clone Handles",grid:"Grid",alwaysShowSnaps:"Always Show Snaps",preferences:"Preferences",articles:"Articles",categories:"Categories",events:"Events",title:"Title",untitled:"Untitled",elementStatus:"{{element}} status",images:"Images",maps:"Maps",markers:"Markers",canvas:"Whiteboard",canvases:"Whiteboards",notes:"Notes",secrets:"Secrets",statblocks:"Statblocks",timelines:"Timelines",private:"Private",public:"Public",subscriberGroups:"Subscriber Groups",subscriberGroupHelper:"Select one or more groups that you want to allow access to this article.This only affects private articles.",subscriberGroupPlaceholder:"Make your choice",applyChanges:"Apply Changes",connecting:"Trying to Connect...",reconnecting:"Reconnecting...",allSaved:"All changes saved in WorldAnvil",saved:"Saved",saving:"Saving...",offlineBeCareful:`Looks like you're offline. 
Please be careful as your changes might be lost`};var RK={search:OK,externalUI:MK};const DK={en:{translation:RK}};Tr.use(kK).init({lng:"en",interpolation:{escapeValue:!1},resources:DK});function AK(e){e.then(null,function(t){console.error(t)})}function LK(){return typeof __SENTRY_BROWSER_BUNDLE__!="undefined"&&!!__SENTRY_BROWSER_BUNDLE__}function Ah(){return!LK()&&Object.prototype.toString.call(typeof process!="undefined"?process:0)==="[object process]"}function xs(e,t){return e.require(t)}function BK(e){var t;try{t=xs(Ia,e)}catch{}try{var n=xs(Ia,"process").cwd;t=xs(Ia,n()+"/node_modules/"+e)}catch{}return t}var $K={};function rt(){return Ah()?global:typeof window!="undefined"?window:typeof self!="undefined"?self:$K}function tw(e,t,n){var r=n||rt(),i=r.__SENTRY__=r.__SENTRY__||{},o=i[e]||(i[e]=t());return o}var sR=Object.prototype.toString;function nw(e){switch(sR.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return aa(e,Error)}}function Rd(e,t){return sR.call(e)==="[object "+t+"]"}function lR(e){return Rd(e,"ErrorEvent")}function k7(e){return Rd(e,"DOMError")}function FK(e){return Rd(e,"DOMException")}function ad(e){return Rd(e,"String")}function rw(e){return e===null||typeof e!="object"&&typeof e!="function"}function sd(e){return Rd(e,"Object")}function $v(e){return typeof Event!="undefined"&&aa(e,Event)}function NK(e){return typeof Element!="undefined"&&aa(e,Element)}function zK(e){return Rd(e,"RegExp")}function iw(e){return Boolean(e&&e.then&&typeof e.then=="function")}function jK(e){return sd(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function cR(e){return typeof e=="number"&&e!==e}function aa(e,t){try{return e instanceof t}catch{return!1}}function Op(e,t){try{for(var n=e,r=5,i=80,o=[],a=0,s=0,l=" > ",c=l.length,u=void 0;n&&a++<r&&(u=HK(n,t),!(u==="html"||a>1&&s+o.length*c+u.length>=i));)o.push(u),s+=u.length,n=n.parentNode;return o.reverse().join(l)}catch{return"<unknown>"}}function HK(e,t){var n=e,r=[],i,o,a,s,l;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());var c=t&&t.length?t.filter(function(d){return n.getAttribute(d)}).map(function(d){return[d,n.getAttribute(d)]}):null;if(c&&c.length)c.forEach(function(d){r.push("["+d[0]+'="'+d[1]+'"]')});else if(n.id&&r.push("#"+n.id),i=n.className,i&&ad(i))for(o=i.split(/\s+/),l=0;l<o.length;l++)r.push("."+o[l]);var u=["type","name","title","alt"];for(l=0;l<u.length;l++)a=u[l],s=n.getAttribute(a),s&&r.push("["+a+'="'+s+'"]');return r.join("")}function VK(){var e=rt();try{return e.document.location.href}catch{return""}}/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Px=function(e,t){return Px=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},Px(e,t)};function WK(e,t){Px(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Kn=function(){return Kn=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Kn.apply(this,arguments)};function ld(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ps(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function UK(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ps(arguments[t]));return e}var GK=Object.setPrototypeOf||({__proto__:[]}instanceof Array?KK:qK);function KK(e,t){return e.__proto__=t,e}function qK(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(e,n)||(e[n]=t[n]);return e}var On=function(e){WK(t,e);function t(n){var r=this.constructor,i=e.call(this,n)||this;return i.message=n,i.name=r.prototype.constructor.name,GK(i,r.prototype),i}return t}(Error),Dd=typeof __SENTRY_DEBUG__=="undefined"?!0:__SENTRY_DEBUG__,YK=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function XK(e){return e==="http"||e==="https"}function Lh(e,t){t===void 0&&(t=!1);var n=e.host,r=e.path,i=e.pass,o=e.port,a=e.projectId,s=e.protocol,l=e.publicKey;return s+"://"+l+(t&&i?":"+i:"")+("@"+n+(o?":"+o:"")+"/"+(r&&r+"/")+a)}function ZK(e){var t=YK.exec(e);if(!t)throw new On("Invalid Sentry Dsn: "+e);var n=Ps(t.slice(1),6),r=n[0],i=n[1],o=n[2],a=o===void 0?"":o,s=n[3],l=n[4],c=l===void 0?"":l,u=n[5],d="",f=u,p=f.split("/");if(p.length>1&&(d=p.slice(0,-1).join("/"),f=p.pop()),f){var m=f.match(/^\d+/);m&&(f=m[0])}return uR({host:s,pass:a,path:d,projectId:f,port:c,protocol:r,publicKey:i})}function uR(e){return"user"in e&&!("publicKey"in e)&&(e.publicKey=e.user),{user:e.publicKey||"",protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function QK(e){if(!!Dd){var t=e.port,n=e.projectId,r=e.protocol,i=["protocol","publicKey","host","projectId"];if(i.forEach(function(o){if(!e[o])throw new On("Invalid Sentry Dsn: "+o+" missing")}),!n.match(/^\d+$/))throw new On("Invalid Sentry Dsn: Invalid projectId "+n);if(!XK(r))throw new On("Invalid Sentry Dsn: Invalid protocol "+r);if(t&&isNaN(parseInt(t,10)))throw new On("Invalid Sentry Dsn: Invalid port "+t);return!0}}function ow(e){var t=typeof e=="string"?ZK(e):uR(e);return QK(t),t}var JK=["fatal","error","warning","log","info","debug","critical"],eq=rt(),tq="Sentry Logger ",Mp=["debug","info","warn","error","log","assert"];function dR(e){var t=rt();if(!("console"in t))return e();var n=t.console,r={};Mp.forEach(function(i){var o=n[i]&&n[i].__sentry_original__;i in t.console&&o&&(r[i]=n[i],n[i]=o)});try{return e()}finally{Object.keys(r).forEach(function(i){n[i]=r[i]})}}function E7(){var e=!1,t={enable:function(){e=!0},disable:function(){e=!1}};return Dd?Mp.forEach(function(n){t[n]=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];e&&dR(function(){var o;(o=eq.console)[n].apply(o,UK([tq+"["+n+"]:"],r))})}}):Mp.forEach(function(n){t[n]=function(){}}),t}var ue;Dd?ue=tw("logger",E7):ue=E7();function Jf(e,t){return t===void 0&&(t=0),typeof e!="string"||t===0||e.length<=t?e:e.substr(0,t)+"..."}function Hg(e,t){if(!Array.isArray(e))return"";for(var n=[],r=0;r<e.length;r++){var i=e[r];try{n.push(String(i))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Rp(e,t){return ad(e)?zK(t)?t.test(e):typeof t=="string"?e.indexOf(t)!==-1:!1:!1}function qn(e,t,n){if(t in e){var r=e[t],i=n(r);if(typeof i=="function")try{fR(i,r)}catch{}e[t]=i}}function Fv(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function fR(e,t){var n=t.prototype||{};e.prototype=t.prototype=n,Fv(e,"__sentry_original__",t)}function aw(e){return e.__sentry_original__}function nq(e){return Object.keys(e).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])}).join("&")}function pR(e){var t=e;if(nw(e))t=Kn({message:e.message,name:e.name,stack:e.stack},T7(e));else if($v(e)){var n=e;t=Kn({type:n.type,target:I7(n.target),currentTarget:I7(n.currentTarget)},T7(n)),typeof CustomEvent!="undefined"&&aa(e,CustomEvent)&&(t.detail=n.detail)}return t}function I7(e){try{return NK(e)?Op(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function T7(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function rq(e,t){t===void 0&&(t=40);var n=Object.keys(pR(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Jf(n[0],t);for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(!(i.length>t))return r===n.length?i:Jf(i,t)}return""}function ql(e){var t,n;if(sd(e)){var r={};try{for(var i=ld(Object.keys(e)),o=i.next();!o.done;o=i.next()){var a=o.value;typeof e[a]!="undefined"&&(r[a]=ql(e[a]))}}catch(s){t={error:s}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r}return Array.isArray(e)?e.map(ql):e}var iq=50;function oq(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.sort(function(r,i){return r[0]-i[0]}).map(function(r){return r[1]});return function(r,i){var o,a,s,l;i===void 0&&(i=0);var c=[];try{for(var u=ld(r.split(`
`).slice(i)),d=u.next();!d.done;d=u.next()){var f=d.value;try{for(var p=(s=void 0,ld(n)),m=p.next();!m.done;m=p.next()){var g=m.value,y=g(f);if(y){c.push(y);break}}}catch(v){s={error:v}}finally{try{m&&!m.done&&(l=p.return)&&l.call(p)}finally{if(s)throw s.error}}}}catch(v){o={error:v}}finally{try{d&&!d.done&&(a=u.return)&&a.call(u)}finally{if(o)throw o.error}}return aq(c)}}function aq(e){if(!e.length)return[];var t=e,n=t[0].function||"",r=t[t.length-1].function||"";return(n.indexOf("captureMessage")!==-1||n.indexOf("captureException")!==-1)&&(t=t.slice(1)),r.indexOf("sentryWrapped")!==-1&&(t=t.slice(0,-1)),t.slice(0,iq).map(function(i){return Kn(Kn({},i),{filename:i.filename||t[0].filename,function:i.function||"?"})}).reverse()}var rb="<anonymous>";function Vs(e){try{return!e||typeof e!="function"?rb:e.name||rb}catch{return rb}}function Nv(){if(!("fetch"in rt()))return!1;try{return new Headers,new Request(""),new Response,!0}catch{return!1}}function Ox(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function sq(){if(!Nv())return!1;var e=rt();if(Ox(e.fetch))return!0;var t=!1,n=e.document;if(n&&typeof n.createElement=="function")try{var r=n.createElement("iframe");r.hidden=!0,n.head.appendChild(r),r.contentWindow&&r.contentWindow.fetch&&(t=Ox(r.contentWindow.fetch)),n.head.removeChild(r)}catch(i){Dd&&ue.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return t}function lq(){if(!Nv())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch{return!1}}function cq(){var e=rt(),t=e.chrome,n=t&&t.app&&t.app.runtime,r="history"in e&&!!e.history.pushState&&!!e.history.replaceState;return!n&&r}var Nt=rt(),ep={},_7={};function uq(e){if(!_7[e])switch(_7[e]=!0,e){case"console":dq();break;case"dom":xq();break;case"xhr":mq();break;case"fetch":fq();break;case"history":gq();break;case"error":Sq();break;case"unhandledrejection":wq();break;default:Dd&&ue.warn("unknown instrumentation type:",e);return}}function Jr(e,t){ep[e]=ep[e]||[],ep[e].push(t),uq(e)}function co(e,t){var n,r;if(!(!e||!ep[e]))try{for(var i=ld(ep[e]||[]),o=i.next();!o.done;o=i.next()){var a=o.value;try{a(t)}catch(s){Dd&&ue.error(`Error while triggering instrumentation handler.
Type: `+e+`
Name: `+Vs(a)+`
Error:`,s)}}}catch(s){n={error:s}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}function dq(){"console"in Nt&&Mp.forEach(function(e){e in Nt.console&&qn(Nt.console,e,function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];co("console",{args:n,level:e}),t&&t.apply(Nt.console,n)}})})}function fq(){!sq()||qn(Nt,"fetch",function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r={args:t,fetchData:{method:pq(t),url:hq(t)},startTimestamp:Date.now()};return co("fetch",Kn({},r)),e.apply(Nt,t).then(function(i){return co("fetch",Kn(Kn({},r),{endTimestamp:Date.now(),response:i})),i},function(i){throw co("fetch",Kn(Kn({},r),{endTimestamp:Date.now(),error:i})),i})}})}function pq(e){return e===void 0&&(e=[]),"Request"in Nt&&aa(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function hq(e){return e===void 0&&(e=[]),typeof e[0]=="string"?e[0]:"Request"in Nt&&aa(e[0],Request)?e[0].url:String(e[0])}function mq(){if("XMLHttpRequest"in Nt){var e=XMLHttpRequest.prototype;qn(e,"open",function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=this,o=n[1],a=i.__sentry_xhr__={method:ad(n[0])?n[0].toUpperCase():n[0],url:n[1]};ad(o)&&a.method==="POST"&&o.match(/sentry_key/)&&(i.__sentry_own_request__=!0);var s=function(){if(i.readyState===4){try{a.status_code=i.status}catch{}co("xhr",{args:n,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:i})}};return"onreadystatechange"in i&&typeof i.onreadystatechange=="function"?qn(i,"onreadystatechange",function(l){return function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];return s(),l.apply(i,c)}}):i.addEventListener("readystatechange",s),t.apply(i,n)}}),qn(e,"send",function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return this.__sentry_xhr__&&n[0]!==void 0&&(this.__sentry_xhr__.body=n[0]),co("xhr",{args:n,startTimestamp:Date.now(),xhr:this}),t.apply(this,n)}})}}var k1;function gq(){if(!cq())return;var e=Nt.onpopstate;Nt.onpopstate=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=Nt.location.href,o=k1;if(k1=i,co("history",{from:o,to:i}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var o=r.length>2?r[2]:void 0;if(o){var a=k1,s=String(o);k1=s,co("history",{from:a,to:s})}return n.apply(this,r)}}qn(Nt.history,"pushState",t),qn(Nt.history,"replaceState",t)}var vq=1e3,E1,I1;function yq(e,t){if(!e||e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch{}return!1}function bq(e){if(e.type!=="keypress")return!1;try{var t=e.target;if(!t||!t.tagName)return!0;if(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)return!1}catch{}return!0}function P7(e,t){return t===void 0&&(t=!1),function(n){if(!(!n||I1===n)&&!bq(n)){var r=n.type==="keypress"?"input":n.type;E1===void 0?(e({event:n,name:r,global:t}),I1=n):yq(I1,n)&&(e({event:n,name:r,global:t}),I1=n),clearTimeout(E1),E1=Nt.setTimeout(function(){E1=void 0},vq)}}}function xq(){if("document"in Nt){var e=co.bind(null,"dom"),t=P7(e,!0);Nt.document.addEventListener("click",t,!1),Nt.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(function(n){var r=Nt[n]&&Nt[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(qn(r,"addEventListener",function(i){return function(o,a,s){if(o==="click"||o=="keypress")try{var l=this,c=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},u=c[o]=c[o]||{refCount:0};if(!u.handler){var d=P7(e);u.handler=d,i.call(this,o,d,s)}u.refCount+=1}catch{}return i.call(this,o,a,s)}}),qn(r,"removeEventListener",function(i){return function(o,a,s){if(o==="click"||o=="keypress")try{var l=this,c=l.__sentry_instrumentation_handlers__||{},u=c[o];u&&(u.refCount-=1,u.refCount<=0&&(i.call(this,o,u.handler,s),u.handler=void 0,delete c[o]),Object.keys(c).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return i.call(this,o,a,s)}}))})}}var ib=null;function Sq(){ib=Nt.onerror,Nt.onerror=function(e,t,n,r,i){return co("error",{column:r,error:i,line:n,msg:e,url:t}),ib?ib.apply(this,arguments):!1}}var ob=null;function wq(){ob=Nt.onunhandledrejection,Nt.onunhandledrejection=function(e){return co("unhandledrejection",e),ob?ob.apply(this,arguments):!0}}function Cq(){var e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(i){if(e)return t.has(i)?!0:(t.add(i),!1);for(var o=0;o<t.length;o++){var a=t[o];if(a===i)return!0}return t.push(i),!1}function r(i){if(e)t.delete(i);else for(var o=0;o<t.length;o++)if(t[o]===i){t.splice(o,1);break}}return[n,r]}function Os(){var e=rt(),t=e.crypto||e.msCrypto;if(t!==void 0&&t.getRandomValues){var n=new Uint16Array(8);t.getRandomValues(n),n[3]=n[3]&4095|16384,n[4]=n[4]&16383|32768;var r=function(i){for(var o=i.toString(16);o.length<4;)o="0"+o;return o};return r(n[0])+r(n[1])+r(n[2])+r(n[3])+r(n[4])+r(n[5])+r(n[6])+r(n[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(i){var o=Math.random()*16|0,a=i==="x"?o:o&3|8;return a.toString(16)})}function ab(e){if(!e)return{};var t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}function hR(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Nl(e){var t=e.message,n=e.event_id;if(t)return t;var r=hR(e);return r?r.type&&r.value?r.type+": "+r.value:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Mx(e,t,n){var r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function Dp(e,t){var n=hR(e);if(!!n){var r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism=Kn(Kn(Kn({},r),i),t),t&&"data"in t){var o=Kn(Kn({},i&&i.data),t.data);n.mechanism.data=o}}}function O7(e){if(e&&e.__sentry_captured__)return!0;try{Fv(e,"__sentry_captured__",!0)}catch{}return!1}function Ml(e,t,n){t===void 0&&(t=1/0),n===void 0&&(n=1/0);try{return gR("",e,t,n)}catch(r){return{ERROR:"**non-serializable** ("+r+")"}}}function mR(e,t,n){t===void 0&&(t=3),n===void 0&&(n=100*1024);var r=Ml(e,t);return Iq(r)>n?mR(e,t-1,n):r}function gR(e,t,n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=Cq());var o=Ps(i,2),a=o[0],s=o[1],l=t;if(l&&typeof l.toJSON=="function")try{return l.toJSON()}catch{}if(t===null||["number","boolean","string"].includes(typeof t)&&!cR(t))return t;var c=kq(e,t);if(!c.startsWith("[object "))return c;if(n===0)return c.replace("object ","");if(a(t))return"[Circular ~]";var u=Array.isArray(t)?[]:{},d=0,f=nw(t)||$v(t)?pR(t):t;for(var p in f)if(!!Object.prototype.hasOwnProperty.call(f,p)){if(d>=r){u[p]="[MaxProperties ~]";break}var m=f[p];u[p]=gR(p,m,n-1,r,i),d+=1}return s(t),u}function kq(e,t){try{return e==="domain"&&t&&typeof t=="object"&&t._events?"[Domain]":e==="domainEmitter"?"[DomainEmitter]":typeof global!="undefined"&&t===global?"[Global]":typeof window!="undefined"&&t===window?"[Window]":typeof document!="undefined"&&t===document?"[Document]":jK(t)?"[SyntheticEvent]":typeof t=="number"&&t!==t?"[NaN]":t===void 0?"[undefined]":typeof t=="function"?"[Function: "+Vs(t)+"]":typeof t=="symbol"?"["+String(t)+"]":typeof t=="bigint"?"[BigInt: "+String(t)+"]":"[object "+Object.getPrototypeOf(t).constructor.name+"]"}catch(n){return"**non-serializable** ("+n+")"}}function Eq(e){return~-encodeURI(e).split(/%..|./).length}function Iq(e){return Eq(JSON.stringify(e))}function oc(e){return new tl(function(t){t(e)})}function Ap(e){return new tl(function(t,n){n(e)})}var tl=function(){function e(t){var n=this;this._state=0,this._handlers=[],this._resolve=function(r){n._setResult(1,r)},this._reject=function(r){n._setResult(2,r)},this._setResult=function(r,i){if(n._state===0){if(iw(i)){i.then(n._resolve,n._reject);return}n._state=r,n._value=i,n._executeHandlers()}},this._executeHandlers=function(){if(n._state!==0){var r=n._handlers.slice();n._handlers=[],r.forEach(function(i){i[0]||(n._state===1&&i[1](n._value),n._state===2&&i[2](n._value),i[0]=!0)})}};try{t(this._resolve,this._reject)}catch(r){this._reject(r)}}return e.prototype.then=function(t,n){var r=this;return new e(function(i,o){r._handlers.push([!1,function(a){if(!t)i(a);else try{i(t(a))}catch(s){o(s)}},function(a){if(!n)o(a);else try{i(n(a))}catch(s){o(s)}}]),r._executeHandlers()})},e.prototype.catch=function(t){return this.then(function(n){return n},t)},e.prototype.finally=function(t){var n=this;return new e(function(r,i){var o,a;return n.then(function(s){a=!1,o=s,t&&t()},function(s){a=!0,o=s,t&&t()}).then(function(){if(a){i(o);return}r(o)})})},e}();function vR(e){var t=[];function n(){return e===void 0||t.length<e}function r(a){return t.splice(t.indexOf(a),1)[0]}function i(a){if(!n())return Ap(new On("Not adding Promise due to buffer limit reached."));var s=a();return t.indexOf(s)===-1&&t.push(s),s.then(function(){return r(s)}).then(null,function(){return r(s).then(null,function(){})}),s}function o(a){return new tl(function(s,l){var c=t.length;if(!c)return s(!0);var u=setTimeout(function(){a&&a>0&&s(!1)},a);t.forEach(function(d){oc(d).then(function(){--c||(clearTimeout(u),s(!0))},l)})})}return{$:t,add:i,drain:o}}var ta;(function(e){e.Fatal="fatal",e.Error="error",e.Warning="warning",e.Log="log",e.Info="info",e.Debug="debug",e.Critical="critical"})(ta||(ta={}));function Tq(e){return JK.indexOf(e)!==-1}function yR(e){return e==="warn"?ta.Warning:Tq(e)?e:ta.Log}function bR(e){return e>=200&&e<300?"success":e===429?"rate_limit":e>=400&&e<500?"invalid":e>=500?"failed":"unknown"}var Rx={nowSeconds:function(){return Date.now()/1e3}};function _q(){var e=rt().performance;if(!(!e||!e.now)){var t=Date.now()-e.now();return{now:function(){return e.now()},timeOrigin:t}}}function Pq(){try{var e=xs(Ia,"perf_hooks");return e.performance}catch{return}}var sb=Ah()?Pq():_q(),M7=sb===void 0?Rx:{nowSeconds:function(){return(sb.timeOrigin+sb.now())/1e3}},zv=Rx.nowSeconds.bind(Rx),Dx=M7.nowSeconds.bind(M7),Lp=Dx,uf=function(){var e=rt().performance;if(!(!e||!e.now)){var t=3600*1e3,n=e.now(),r=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=i<t,a=e.timing&&e.timing.navigationStart,s=typeof a=="number",l=s?Math.abs(a+n-r):t,c=l<t;return o||c?i<=l?e.timeOrigin:a:r}}(),Oq=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Mq(e){var t=e.match(Oq);if(t){var n=void 0;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}}function jv(e,t){return t===void 0&&(t=[]),[e,t]}function Rq(e){var t=Ps(e,2),n=Ps(t[1],1),r=Ps(n[0],1),i=r[0];return i.type}function Hv(e){var t=Ps(e,2),n=t[0],r=t[1],i=JSON.stringify(n);return r.reduce(function(o,a){var s=Ps(a,2),l=s[0],c=s[1],u=rw(c)?String(c):JSON.stringify(c);return o+`
`+JSON.stringify(l)+`
`+u},i)}function Dq(e,t,n){var r=[{type:"client_report"},{timestamp:n||zv(),discarded_events:e}];return jv(t?{dsn:t}:{},[r])}var Aq=60*1e3;function Lq(e,t){t===void 0&&(t=Date.now());var n=parseInt(""+e,10);if(!isNaN(n))return n*1e3;var r=Date.parse(""+e);return isNaN(r)?Aq:r-t}function sw(e,t){return e[t]||e.all||0}function xR(e,t,n){return n===void 0&&(n=Date.now()),sw(e,t)>n}function SR(e,t,n){var r,i,o,a;n===void 0&&(n=Date.now());var s=Kn({},e),l=t["x-sentry-rate-limits"],c=t["retry-after"];if(l)try{for(var u=ld(l.trim().split(",")),d=u.next();!d.done;d=u.next()){var f=d.value,p=f.split(":",2),m=parseInt(p[0],10),g=(isNaN(m)?60:m)*1e3;if(!p[1])s.all=n+g;else try{for(var y=(o=void 0,ld(p[1].split(";"))),v=y.next();!v.done;v=y.next()){var b=v.value;s[b]=n+g}}catch(x){o={error:x}}finally{try{v&&!v.done&&(a=y.return)&&a.call(y)}finally{if(o)throw o.error}}}}catch(x){r={error:x}}finally{try{d&&!d.done&&(i=u.return)&&i.call(u)}finally{if(r)throw r.error}}else c&&(s.all=n+Lq(c,n));return s}var T1=rt(),Bq=function(){function e(t){t===void 0&&(t={}),this.name=e.id,this._levels=Mp,t.levels&&(this._levels=t.levels)}return e.prototype.setupOnce=function(t,n){"console"in T1&&this._levels.forEach(function(r){r in T1.console&&qn(T1.console,r,function(i){return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var s=n();s.getIntegration(e)&&s.withScope(function(l){l.setLevel(yR(r)),l.setExtra("arguments",o),l.addEventProcessor(function(u){return u.logger="console",u});var c=Hg(o," ");r==="assert"?o[0]===!1&&(c="Assertion failed: "+(Hg(o.slice(1)," ")||"console.assert"),l.setExtra("arguments",o.slice(1)),s.captureMessage(c)):r==="error"&&o[0]instanceof Error?s.captureException(o[0]):s.captureMessage(c)}),i&&i.apply(T1.console,o)}})})},e.id="CaptureConsole",e}();/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Ax=function(e,t){return Ax=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},Ax(e,t)};function Vv(e,t){Ax(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var $t=function(){return $t=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},$t.apply(this,arguments)};function Ad(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function wR(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ad(arguments[t]));return e}/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function $q(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function Fq(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat($q(arguments[t]));return e}/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Ce=function(){return Ce=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ce.apply(this,arguments)};function Nq(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function ou(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Nq(arguments[t]));return e}var R7=100,Vg=function(){function e(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}return e.clone=function(t){var n=new e;return t&&(n._breadcrumbs=ou(t._breadcrumbs),n._tags=Ce({},t._tags),n._extra=Ce({},t._extra),n._contexts=Ce({},t._contexts),n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=ou(t._eventProcessors),n._requestSession=t._requestSession),n},e.prototype.addScopeListener=function(t){this._scopeListeners.push(t)},e.prototype.addEventProcessor=function(t){return this._eventProcessors.push(t),this},e.prototype.setUser=function(t){return this._user=t||{},this._session&&this._session.update({user:t}),this._notifyScopeListeners(),this},e.prototype.getUser=function(){return this._user},e.prototype.getRequestSession=function(){return this._requestSession},e.prototype.setRequestSession=function(t){return this._requestSession=t,this},e.prototype.setTags=function(t){return this._tags=Ce(Ce({},this._tags),t),this._notifyScopeListeners(),this},e.prototype.setTag=function(t,n){var r;return this._tags=Ce(Ce({},this._tags),(r={},r[t]=n,r)),this._notifyScopeListeners(),this},e.prototype.setExtras=function(t){return this._extra=Ce(Ce({},this._extra),t),this._notifyScopeListeners(),this},e.prototype.setExtra=function(t,n){var r;return this._extra=Ce(Ce({},this._extra),(r={},r[t]=n,r)),this._notifyScopeListeners(),this},e.prototype.setFingerprint=function(t){return this._fingerprint=t,this._notifyScopeListeners(),this},e.prototype.setLevel=function(t){return this._level=t,this._notifyScopeListeners(),this},e.prototype.setTransactionName=function(t){return this._transactionName=t,this._notifyScopeListeners(),this},e.prototype.setTransaction=function(t){return this.setTransactionName(t)},e.prototype.setContext=function(t,n){var r;return n===null?delete this._contexts[t]:this._contexts=Ce(Ce({},this._contexts),(r={},r[t]=n,r)),this._notifyScopeListeners(),this},e.prototype.setSpan=function(t){return this._span=t,this._notifyScopeListeners(),this},e.prototype.getSpan=function(){return this._span},e.prototype.getTransaction=function(){var t=this.getSpan();return t&&t.transaction},e.prototype.setSession=function(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this},e.prototype.getSession=function(){return this._session},e.prototype.update=function(t){if(!t)return this;if(typeof t=="function"){var n=t(this);return n instanceof e?n:this}return t instanceof e?(this._tags=Ce(Ce({},this._tags),t._tags),this._extra=Ce(Ce({},this._extra),t._extra),this._contexts=Ce(Ce({},this._contexts),t._contexts),t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):sd(t)&&(t=t,this._tags=Ce(Ce({},this._tags),t.tags),this._extra=Ce(Ce({},this._extra),t.extra),this._contexts=Ce(Ce({},this._contexts),t.contexts),t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this},e.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this},e.prototype.addBreadcrumb=function(t,n){var r=typeof n=="number"?Math.min(n,R7):R7;if(r<=0)return this;var i=Ce({timestamp:zv()},t);return this._breadcrumbs=ou(this._breadcrumbs,[i]).slice(-r),this._notifyScopeListeners(),this},e.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},e.prototype.applyToEvent=function(t,n){if(this._extra&&Object.keys(this._extra).length&&(t.extra=Ce(Ce({},this._extra),t.extra)),this._tags&&Object.keys(this._tags).length&&(t.tags=Ce(Ce({},this._tags),t.tags)),this._user&&Object.keys(this._user).length&&(t.user=Ce(Ce({},this._user),t.user)),this._contexts&&Object.keys(this._contexts).length&&(t.contexts=Ce(Ce({},this._contexts),t.contexts)),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts=Ce({trace:this._span.getTraceContext()},t.contexts);var r=this._span.transaction&&this._span.transaction.name;r&&(t.tags=Ce({transaction:r},t.tags))}return this._applyFingerprint(t),t.breadcrumbs=ou(t.breadcrumbs||[],this._breadcrumbs),t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata=this._sdkProcessingMetadata,this._notifyEventProcessors(ou(CR(),this._eventProcessors),t,n)},e.prototype.setSDKProcessingMetadata=function(t){return this._sdkProcessingMetadata=Ce(Ce({},this._sdkProcessingMetadata),t),this},e.prototype._notifyEventProcessors=function(t,n,r,i){var o=this;return i===void 0&&(i=0),new tl(function(a,s){var l=t[i];if(n===null||typeof l!="function")a(n);else{var c=l(Ce({},n),r);iw(c)?c.then(function(u){return o._notifyEventProcessors(t,u,r,i+1).then(a)}).then(null,s):o._notifyEventProcessors(t,c,r,i+1).then(a).then(null,s)}})},e.prototype._notifyScopeListeners=function(){var t=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(function(n){n(t)}),this._notifyingListeners=!1)},e.prototype._applyFingerprint=function(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint},e}();function CR(){return tw("globalEventProcessors",function(){return[]})}function lw(e){CR().push(e)}var zq=function(){function e(t){this.errors=0,this.sid=Os(),this.duration=0,this.status="ok",this.init=!0,this.ignoreDuration=!1;var n=Dx();this.timestamp=n,this.started=n,t&&this.update(t)}return e.prototype.update=function(t){if(t===void 0&&(t={}),t.user&&(!this.ipAddress&&t.user.ip_address&&(this.ipAddress=t.user.ip_address),!this.did&&!t.did&&(this.did=t.user.id||t.user.email||t.user.username)),this.timestamp=t.timestamp||Dx(),t.ignoreDuration&&(this.ignoreDuration=t.ignoreDuration),t.sid&&(this.sid=t.sid.length===32?t.sid:Os()),t.init!==void 0&&(this.init=t.init),!this.did&&t.did&&(this.did=""+t.did),typeof t.started=="number"&&(this.started=t.started),this.ignoreDuration)this.duration=void 0;else if(typeof t.duration=="number")this.duration=t.duration;else{var n=this.timestamp-this.started;this.duration=n>=0?n:0}t.release&&(this.release=t.release),t.environment&&(this.environment=t.environment),!this.ipAddress&&t.ipAddress&&(this.ipAddress=t.ipAddress),!this.userAgent&&t.userAgent&&(this.userAgent=t.userAgent),typeof t.errors=="number"&&(this.errors=t.errors),t.status&&(this.status=t.status)},e.prototype.close=function(t){t?this.update({status:t}):this.status==="ok"?this.update({status:"exited"}):this.update()},e.prototype.toJSON=function(){return ql({sid:""+this.sid,init:this.init,started:new Date(this.started*1e3).toISOString(),timestamp:new Date(this.timestamp*1e3).toISOString(),status:this.status,errors:this.errors,did:typeof this.did=="number"||typeof this.did=="string"?""+this.did:void 0,duration:this.duration,attrs:{release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent}})},e}(),D7=typeof __SENTRY_DEBUG__=="undefined"?!0:__SENTRY_DEBUG__,cw=4,jq=100,Wv=function(){function e(t,n,r){n===void 0&&(n=new Vg),r===void 0&&(r=cw),this._version=r,this._stack=[{}],this.getStackTop().scope=n,t&&this.bindClient(t)}return e.prototype.isOlderThan=function(t){return this._version<t},e.prototype.bindClient=function(t){var n=this.getStackTop();n.client=t,t&&t.setupIntegrations&&t.setupIntegrations()},e.prototype.pushScope=function(){var t=Vg.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t},e.prototype.popScope=function(){return this.getStack().length<=1?!1:!!this.getStack().pop()},e.prototype.withScope=function(t){var n=this.pushScope();try{t(n)}finally{this.popScope()}},e.prototype.getClient=function(){return this.getStackTop().client},e.prototype.getScope=function(){return this.getStackTop().scope},e.prototype.getStack=function(){return this._stack},e.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},e.prototype.captureException=function(t,n){var r=this._lastEventId=n&&n.event_id?n.event_id:Os(),i=n;if(!n){var o=void 0;try{throw new Error("Sentry syntheticException")}catch(a){o=a}i={originalException:t,syntheticException:o}}return this._invokeClient("captureException",t,Ce(Ce({},i),{event_id:r})),r},e.prototype.captureMessage=function(t,n,r){var i=this._lastEventId=r&&r.event_id?r.event_id:Os(),o=r;if(!r){var a=void 0;try{throw new Error(t)}catch(s){a=s}o={originalException:t,syntheticException:a}}return this._invokeClient("captureMessage",t,n,Ce(Ce({},o),{event_id:i})),i},e.prototype.captureEvent=function(t,n){var r=n&&n.event_id?n.event_id:Os();return t.type!=="transaction"&&(this._lastEventId=r),this._invokeClient("captureEvent",t,Ce(Ce({},n),{event_id:r})),r},e.prototype.lastEventId=function(){return this._lastEventId},e.prototype.addBreadcrumb=function(t,n){var r=this.getStackTop(),i=r.scope,o=r.client;if(!(!i||!o)){var a=o.getOptions&&o.getOptions()||{},s=a.beforeBreadcrumb,l=s===void 0?null:s,c=a.maxBreadcrumbs,u=c===void 0?jq:c;if(!(u<=0)){var d=zv(),f=Ce({timestamp:d},t),p=l?dR(function(){return l(f,n)}):f;p!==null&&i.addBreadcrumb(p,u)}}},e.prototype.setUser=function(t){var n=this.getScope();n&&n.setUser(t)},e.prototype.setTags=function(t){var n=this.getScope();n&&n.setTags(t)},e.prototype.setExtras=function(t){var n=this.getScope();n&&n.setExtras(t)},e.prototype.setTag=function(t,n){var r=this.getScope();r&&r.setTag(t,n)},e.prototype.setExtra=function(t,n){var r=this.getScope();r&&r.setExtra(t,n)},e.prototype.setContext=function(t,n){var r=this.getScope();r&&r.setContext(t,n)},e.prototype.configureScope=function(t){var n=this.getStackTop(),r=n.scope,i=n.client;r&&i&&t(r)},e.prototype.run=function(t){var n=A7(this);try{t(this)}finally{A7(n)}},e.prototype.getIntegration=function(t){var n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return D7&&ue.warn("Cannot retrieve integration "+t.id+" from the current Hub"),null}},e.prototype.startSpan=function(t){return this._callExtensionMethod("startSpan",t)},e.prototype.startTransaction=function(t,n){return this._callExtensionMethod("startTransaction",t,n)},e.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},e.prototype.captureSession=function(t){if(t===void 0&&(t=!1),t)return this.endSession();this._sendSessionUpdate()},e.prototype.endSession=function(){var t=this.getStackTop(),n=t&&t.scope,r=n&&n.getSession();r&&r.close(),this._sendSessionUpdate(),n&&n.setSession()},e.prototype.startSession=function(t){var n=this.getStackTop(),r=n.scope,i=n.client,o=i&&i.getOptions()||{},a=o.release,s=o.environment,l=rt(),c=(l.navigator||{}).userAgent,u=new zq(Ce(Ce(Ce({release:a,environment:s},r&&{user:r.getUser()}),c&&{userAgent:c}),t));if(r){var d=r.getSession&&r.getSession();d&&d.status==="ok"&&d.update({status:"exited"}),this.endSession(),r.setSession(u)}return u},e.prototype._sendSessionUpdate=function(){var t=this.getStackTop(),n=t.scope,r=t.client;if(!!n){var i=n.getSession&&n.getSession();i&&r&&r.captureSession&&r.captureSession(i)}},e.prototype._invokeClient=function(t){for(var n,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var o=this.getStackTop(),a=o.scope,s=o.client;s&&s[t]&&(n=s)[t].apply(n,ou(r,[a]))},e.prototype._callExtensionMethod=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=Ld(),o=i.__SENTRY__;if(o&&o.extensions&&typeof o.extensions[t]=="function")return o.extensions[t].apply(this,n);D7&&ue.warn("Extension method "+t+" couldn't be found, doing nothing.")},e}();function Ld(){var e=rt();return e.__SENTRY__=e.__SENTRY__||{extensions:{},hub:void 0},e}function A7(e){var t=Ld(),n=fs(t);return uw(t,e),n}function zn(){var e=Ld();return(!kR(e)||fs(e).isOlderThan(cw))&&uw(e,new Wv),Ah()?Hq(e):fs(e)}function Hq(e){try{var t=Ld().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return fs(e);if(!kR(n)||fs(n).isOlderThan(cw)){var r=fs(e).getStackTop();uw(n,new Wv(r.client,Vg.clone(r.scope)))}return fs(n)}catch{return fs(e)}}function kR(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function fs(e){return tw("hub",function(){return new Wv},e)}function uw(e,t){if(!e)return!1;var n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}function ER(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=zn();if(r&&r[e])return r[e].apply(r,Fq(t));throw new Error("No hub defined or "+e+" was not found on the hub, please open a bug report.")}function Vq(e,t){var n=new Error("Sentry syntheticException");return ER("captureException",e,{captureContext:t,originalException:e,syntheticException:n})}function Wq(e){ER("withScope",e)}var Uq="7";function Wg(e,t,n){return{initDsn:e,metadata:t||{},dsn:ow(e),tunnel:n}}function IR(e){var t=e.protocol?e.protocol+":":"",n=e.port?":"+e.port:"";return t+"//"+e.host+n+(e.path?"/"+e.path:"")+"/api/"}function TR(e,t){return""+IR(e)+e.projectId+"/"+t+"/"}function _R(e){return nq({sentry_key:e.publicKey,sentry_version:Uq})}function Gq(e){return TR(e,"store")}function PR(e){return Gq(e)+"?"+_R(e)}function Kq(e){return TR(e,"envelope")}function Uv(e,t){return t||Kq(e)+"?"+_R(e)}function qq(e,t){var n=ow(e),r=IR(n)+"embed/error-page/",i="dsn="+Lh(n);for(var o in t)if(o!=="dsn")if(o==="user"){if(!t.user)continue;t.user.name&&(i+="&name="+encodeURIComponent(t.user.name)),t.user.email&&(i+="&email="+encodeURIComponent(t.user.email))}else i+="&"+encodeURIComponent(o)+"="+encodeURIComponent(t[o]);return r+"?"+i}/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Ht=function(){return Ht=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Ht.apply(this,arguments)};function Yq(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function dw(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function No(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(dw(arguments[t]));return e}var Sn=typeof __SENTRY_DEBUG__=="undefined"?!0:__SENTRY_DEBUG__,L7=[];function B7(e){return e.reduce(function(t,n){return t.every(function(r){return n.name!==r.name})&&t.push(n),t},[])}function Xq(e){var t=e.defaultIntegrations&&No(e.defaultIntegrations)||[],n=e.integrations,r=No(B7(t));Array.isArray(n)?r=No(r.filter(function(a){return n.every(function(s){return s.name!==a.name})}),B7(n)):typeof n=="function"&&(r=n(r),r=Array.isArray(r)?r:[r]);var i=r.map(function(a){return a.name}),o="Debug";return i.indexOf(o)!==-1&&r.push.apply(r,No(r.splice(i.indexOf(o),1))),r}function Zq(e){L7.indexOf(e.name)===-1&&(e.setupOnce(lw,zn),L7.push(e.name),Sn&&ue.log("Integration installed: "+e.name))}function Qq(e){var t={};return Xq(e).forEach(function(n){t[n.name]=n,Zq(n)}),Fv(t,"initialized",!0),t}var $7="Not capturing exception because it's already been captured.",Jq=function(){function e(t,n){this._integrations={},this._numProcessing=0,this._backend=new t(n),this._options=n,n.dsn&&(this._dsn=ow(n.dsn))}return e.prototype.captureException=function(t,n,r){var i=this;if(O7(t)){Sn&&ue.log($7);return}var o=n&&n.event_id;return this._process(this._getBackend().eventFromException(t,n).then(function(a){return i._captureEvent(a,n,r)}).then(function(a){o=a})),o},e.prototype.captureMessage=function(t,n,r,i){var o=this,a=r&&r.event_id,s=rw(t)?this._getBackend().eventFromMessage(String(t),n,r):this._getBackend().eventFromException(t,r);return this._process(s.then(function(l){return o._captureEvent(l,r,i)}).then(function(l){a=l})),a},e.prototype.captureEvent=function(t,n,r){if(n&&n.originalException&&O7(n.originalException)){Sn&&ue.log($7);return}var i=n&&n.event_id;return this._process(this._captureEvent(t,n,r).then(function(o){i=o})),i},e.prototype.captureSession=function(t){if(!this._isEnabled()){Sn&&ue.warn("SDK not enabled, will not capture session.");return}typeof t.release!="string"?Sn&&ue.warn("Discarded session because of missing or non-string release"):(this._sendSession(t),t.update({init:!1}))},e.prototype.getDsn=function(){return this._dsn},e.prototype.getOptions=function(){return this._options},e.prototype.getTransport=function(){return this._getBackend().getTransport()},e.prototype.flush=function(t){var n=this;return this._isClientDoneProcessing(t).then(function(r){return n.getTransport().close(t).then(function(i){return r&&i})})},e.prototype.close=function(t){var n=this;return this.flush(t).then(function(r){return n.getOptions().enabled=!1,r})},e.prototype.setupIntegrations=function(){this._isEnabled()&&!this._integrations.initialized&&(this._integrations=Qq(this._options))},e.prototype.getIntegration=function(t){try{return this._integrations[t.id]||null}catch{return Sn&&ue.warn("Cannot retrieve integration "+t.id+" from the current Client"),null}},e.prototype._updateSessionFromEvent=function(t,n){var r,i,o=!1,a=!1,s=n.exception&&n.exception.values;if(s){a=!0;try{for(var l=Yq(s),c=l.next();!c.done;c=l.next()){var u=c.value,d=u.mechanism;if(d&&d.handled===!1){o=!0;break}}}catch(m){r={error:m}}finally{try{c&&!c.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}var f=t.status==="ok",p=f&&t.errors===0||f&&o;p&&(t.update(Ht(Ht({},o&&{status:"crashed"}),{errors:t.errors||Number(a||o)})),this.captureSession(t))},e.prototype._sendSession=function(t){this._getBackend().sendSession(t)},e.prototype._isClientDoneProcessing=function(t){var n=this;return new tl(function(r){var i=0,o=1,a=setInterval(function(){n._numProcessing==0?(clearInterval(a),r(!0)):(i+=o,t&&i>=t&&(clearInterval(a),r(!1)))},o)})},e.prototype._getBackend=function(){return this._backend},e.prototype._isEnabled=function(){return this.getOptions().enabled!==!1&&this._dsn!==void 0},e.prototype._prepareEvent=function(t,n,r){var i=this,o=this.getOptions(),a=o.normalizeDepth,s=a===void 0?3:a,l=o.normalizeMaxBreadth,c=l===void 0?1e3:l,u=Ht(Ht({},t),{event_id:t.event_id||(r&&r.event_id?r.event_id:Os()),timestamp:t.timestamp||zv()});this._applyClientOptions(u),this._applyIntegrationsMetadata(u);var d=n;r&&r.captureContext&&(d=Vg.clone(d).update(r.captureContext));var f=oc(u);return d&&(f=d.applyToEvent(u,r)),f.then(function(p){return p&&(p.sdkProcessingMetadata=Ht(Ht({},p.sdkProcessingMetadata),{normalizeDepth:Ml(s)+" ("+typeof s+")"})),typeof s=="number"&&s>0?i._normalizeEvent(p,s,c):p})},e.prototype._normalizeEvent=function(t,n,r){if(!t)return null;var i=Ht(Ht(Ht(Ht(Ht({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(function(o){return Ht(Ht({},o),o.data&&{data:Ml(o.data,n,r)})})}),t.user&&{user:Ml(t.user,n,r)}),t.contexts&&{contexts:Ml(t.contexts,n,r)}),t.extra&&{extra:Ml(t.extra,n,r)});return t.contexts&&t.contexts.trace&&(i.contexts.trace=t.contexts.trace),i.sdkProcessingMetadata=Ht(Ht({},i.sdkProcessingMetadata),{baseClientNormalized:!0}),i},e.prototype._applyClientOptions=function(t){var n=this.getOptions(),r=n.environment,i=n.release,o=n.dist,a=n.maxValueLength,s=a===void 0?250:a;"environment"in t||(t.environment="environment"in n?r:"production"),t.release===void 0&&i!==void 0&&(t.release=i),t.dist===void 0&&o!==void 0&&(t.dist=o),t.message&&(t.message=Jf(t.message,s));var l=t.exception&&t.exception.values&&t.exception.values[0];l&&l.value&&(l.value=Jf(l.value,s));var c=t.request;c&&c.url&&(c.url=Jf(c.url,s))},e.prototype._applyIntegrationsMetadata=function(t){var n=Object.keys(this._integrations);n.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=No(t.sdk.integrations||[],n))},e.prototype._sendEvent=function(t){this._getBackend().sendEvent(t)},e.prototype._captureEvent=function(t,n,r){return this._processEvent(t,n,r).then(function(i){return i.event_id},function(i){Sn&&ue.error(i)})},e.prototype._processEvent=function(t,n,r){var i=this,o=this.getOptions(),a=o.beforeSend,s=o.sampleRate,l=this.getTransport();function c(d,f){l.recordLostEvent&&l.recordLostEvent(d,f)}if(!this._isEnabled())return Ap(new On("SDK not enabled, will not capture event."));var u=t.type==="transaction";return!u&&typeof s=="number"&&Math.random()>s?(c("sample_rate","event"),Ap(new On("Discarding event because it's not included in the random sample (sampling rate = "+s+")"))):this._prepareEvent(t,r,n).then(function(d){if(d===null)throw c("event_processor",t.type||"event"),new On("An event processor returned null, will not send event.");var f=n&&n.data&&n.data.__sentry__===!0;if(f||u||!a)return d;var p=a(d,n);return eY(p)}).then(function(d){if(d===null)throw c("before_send",t.type||"event"),new On("`beforeSend` returned `null`, will not send event.");var f=r&&r.getSession&&r.getSession();return!u&&f&&i._updateSessionFromEvent(f,d),i._sendEvent(d),d}).then(null,function(d){throw d instanceof On?d:(i.captureException(d,{data:{__sentry__:!0},originalException:d}),new On(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: `+d))})},e.prototype._process=function(t){var n=this;this._numProcessing+=1,t.then(function(r){return n._numProcessing-=1,r},function(r){return n._numProcessing-=1,r})},e}();function eY(e){var t="`beforeSend` method has to return `null` or a valid event.";if(iw(e))return e.then(function(n){if(!(sd(n)||n===null))throw new On(t);return n},function(n){throw new On("beforeSend rejected with "+n)});if(!(sd(e)||e===null))throw new On(t);return e}function fw(e){if(!(!e.metadata||!e.metadata.sdk)){var t=e.metadata.sdk,n=t.name,r=t.version;return{name:n,version:r}}}function OR(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=No(e.sdk.integrations||[],t.integrations||[]),e.sdk.packages=No(e.sdk.packages||[],t.packages||[])),e}function MR(e,t){var n=fw(t),r=Ht(Ht({sent_at:new Date().toISOString()},n&&{sdk:n}),!!t.tunnel&&{dsn:Lh(t.dsn)}),i="aggregates"in e?"sessions":"session",o=[{type:i},e],a=jv(r,[o]);return[a,i]}function tY(e,t){var n=dw(MR(e,t),2),r=n[0],i=n[1];return{body:Hv(r),type:i,url:Uv(t.dsn,t.tunnel)}}function nY(e,t){var n=fw(t),r=e.type||"event",i=(e.sdkProcessingMetadata||{}).transactionSampling,o=i||{},a=o.method,s=o.rate;OR(e,t.metadata.sdk),e.tags=e.tags||{},e.extra=e.extra||{},e.sdkProcessingMetadata&&e.sdkProcessingMetadata.baseClientNormalized||(e.tags.skippedNormalization=!0,e.extra.normalizeDepth=e.sdkProcessingMetadata?e.sdkProcessingMetadata.normalizeDepth:"unset"),delete e.sdkProcessingMetadata;var l=Ht(Ht({event_id:e.event_id,sent_at:new Date().toISOString()},n&&{sdk:n}),!!t.tunnel&&{dsn:Lh(t.dsn)}),c=[{type:r,sample_rates:[{id:a,rate:s}]},e];return jv(l,[c])}function rY(e,t){var n=fw(t),r=e.type||"event",i=r==="transaction"||!!t.tunnel,o=(e.sdkProcessingMetadata||{}).transactionSampling,a=o||{},s=a.method,l=a.rate;OR(e,t.metadata.sdk),e.tags=e.tags||{},e.extra=e.extra||{},e.sdkProcessingMetadata&&e.sdkProcessingMetadata.baseClientNormalized||(e.tags.skippedNormalization=!0,e.extra.normalizeDepth=e.sdkProcessingMetadata?e.sdkProcessingMetadata.normalizeDepth:"unset"),delete e.sdkProcessingMetadata;var c;try{c=JSON.stringify(e)}catch(g){e.tags.JSONStringifyError=!0,e.extra.JSONStringifyError=g;try{c=JSON.stringify(Ml(e))}catch(y){var u=y;c=JSON.stringify({message:"JSON.stringify error after renormalization",extra:{message:u.message,stack:u.stack}})}}var d={body:c,type:r,url:i?Uv(t.dsn,t.tunnel):PR(t.dsn)};if(i){var f=Ht(Ht({event_id:e.event_id,sent_at:new Date().toISOString()},n&&{sdk:n}),!!t.tunnel&&{dsn:Lh(t.dsn)}),p=[{type:r,sample_rates:[{id:s,rate:l}]},d.body],m=jv(f,[p]);d.body=Hv(m)}return d}var iY=function(){function e(){}return e.prototype.sendEvent=function(t){return oc({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:"skipped"})},e.prototype.close=function(t){return oc(!0)},e}(),oY=function(){function e(t){this._options=t,this._options.dsn||Sn&&ue.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return e.prototype.eventFromException=function(t,n){throw new On("Backend has to implement `eventFromException` method")},e.prototype.eventFromMessage=function(t,n,r){throw new On("Backend has to implement `eventFromMessage` method")},e.prototype.sendEvent=function(t){if(this._newTransport&&this._options.dsn&&this._options._experiments&&this._options._experiments.newTransport){var n=Wg(this._options.dsn,this._options._metadata,this._options.tunnel),r=nY(t,n);this._newTransport.send(r).then(null,function(i){Sn&&ue.error("Error while sending event:",i)})}else this._transport.sendEvent(t).then(null,function(i){Sn&&ue.error("Error while sending event:",i)})},e.prototype.sendSession=function(t){if(!this._transport.sendSession){Sn&&ue.warn("Dropping session because custom transport doesn't implement sendSession");return}if(this._newTransport&&this._options.dsn&&this._options._experiments&&this._options._experiments.newTransport){var n=Wg(this._options.dsn,this._options._metadata,this._options.tunnel),r=dw(MR(t,n),1),i=r[0];this._newTransport.send(i).then(null,function(o){Sn&&ue.error("Error while sending session:",o)})}else this._transport.sendSession(t).then(null,function(o){Sn&&ue.error("Error while sending session:",o)})},e.prototype.getTransport=function(){return this._transport},e.prototype._setupTransport=function(){return new iY},e}();function aY(e,t){t.debug===!0&&(Sn?ue.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));var n=zn(),r=n.getScope();r&&r.update(t.initialScope);var i=new e(t);n.bindClient(i)}var sY=30;function RR(e,t,n){n===void 0&&(n=vR(e.bufferSize||sY));var r={},i=function(a){return n.drain(a)};function o(a){var s=Rq(a),l=s==="event"?"error":s,c={category:l,body:Hv(a)};if(xR(r,l))return Ap({status:"rate_limit",reason:F7(r,l)});var u=function(){return t(c).then(function(d){var f=d.body,p=d.headers,m=d.reason,g=d.statusCode,y=bR(g);return p&&(r=SR(r,p)),y==="success"?oc({status:y,reason:m}):Ap({status:y,reason:m||f||(y==="rate_limit"?F7(r,l):"Unknown transport error")})})};return n.add(u)}return{send:o,flush:i}}function F7(e,t){return"Too many "+t+" requests, backing off until: "+new Date(sw(e,t)).toISOString()}var Ug="6.19.7",N7,lY=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(){N7=Function.prototype.toString,Function.prototype.toString=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=aw(this)||this;return N7.apply(r,t)}},e.id="FunctionToString",e}(),cY=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],uY=function(){function e(t){t===void 0&&(t={}),this._options=t,this.name=e.id}return e.prototype.setupOnce=function(t,n){t(function(r){var i=n();if(i){var o=i.getIntegration(e);if(o){var a=i.getClient(),s=a?a.getOptions():{},l=dY(o._options,s);return fY(r,l)?null:r}}return r})},e.id="InboundFilters",e}();function dY(e,t){return e===void 0&&(e={}),t===void 0&&(t={}),{allowUrls:No(e.whitelistUrls||[],e.allowUrls||[],t.whitelistUrls||[],t.allowUrls||[]),denyUrls:No(e.blacklistUrls||[],e.denyUrls||[],t.blacklistUrls||[],t.denyUrls||[]),ignoreErrors:No(e.ignoreErrors||[],t.ignoreErrors||[],cY),ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function fY(e,t){return t.ignoreInternal&&vY(e)?(Sn&&ue.warn(`Event dropped due to being internal Sentry Error.
Event: `+Nl(e)),!0):pY(e,t.ignoreErrors)?(Sn&&ue.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+Nl(e)),!0):hY(e,t.denyUrls)?(Sn&&ue.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: "+Nl(e)+`.
Url: `+Gg(e)),!0):mY(e,t.allowUrls)?!1:(Sn&&ue.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: "+Nl(e)+`.
Url: `+Gg(e)),!0)}function pY(e,t){return!t||!t.length?!1:gY(e).some(function(n){return t.some(function(r){return Rp(n,r)})})}function hY(e,t){if(!t||!t.length)return!1;var n=Gg(e);return n?t.some(function(r){return Rp(n,r)}):!1}function mY(e,t){if(!t||!t.length)return!0;var n=Gg(e);return n?t.some(function(r){return Rp(n,r)}):!0}function gY(e){if(e.message)return[e.message];if(e.exception)try{var t=e.exception.values&&e.exception.values[0]||{},n=t.type,r=n===void 0?"":n,i=t.value,o=i===void 0?"":i;return[""+o,r+": "+o]}catch{return Sn&&ue.error("Cannot extract message for event "+Nl(e)),[]}return[]}function vY(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function z7(e){e===void 0&&(e=[]);for(var t=e.length-1;t>=0;t--){var n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Gg(e){try{if(e.stacktrace)return z7(e.stacktrace.frames);var t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?z7(t):null}catch{return Sn&&ue.error("Cannot extract url for event "+Nl(e)),null}}var Bd="?",yY=10,bY=20,xY=30,SY=40,wY=50;function Bh(e,t,n,r){var i={filename:e,function:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var CY=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,kY=/\((\S*)(?::(\d+))(?::(\d+))\)/,EY=function(e){var t=CY.exec(e);if(t){var n=t[2]&&t[2].indexOf("eval")===0;if(n){var r=kY.exec(t[2]);r&&(t[2]=r[1],t[3]=r[2],t[4]=r[3])}var i=Ad(DR(t[1]||Bd,t[2]),2),o=i[0],a=i[1];return Bh(a,o,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},IY=[xY,EY],TY=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,_Y=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,PY=function(e){var t,n=TY.exec(e);if(n){var r=n[3]&&n[3].indexOf(" > eval")>-1;if(r){var i=_Y.exec(n[3]);i&&(n[1]=n[1]||"eval",n[3]=i[1],n[4]=i[2],n[5]="")}var o=n[3],a=n[1]||Bd;return t=Ad(DR(a,o),2),a=t[0],o=t[1],Bh(o,a,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}},OY=[wY,PY],MY=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,RY=function(e){var t=MY.exec(e);return t?Bh(t[2],t[1]||Bd,+t[3],t[4]?+t[4]:void 0):void 0},DY=[SY,RY],AY=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,LY=function(e){var t=AY.exec(e);return t?Bh(t[2],t[3]||Bd,+t[1]):void 0},BY=[yY,LY],$Y=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,FY=function(e){var t=$Y.exec(e);return t?Bh(t[5],t[3]||t[4]||Bd,+t[1],+t[2]):void 0},NY=[bY,FY],DR=function(e,t){var n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Bd,n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]};function AR(e){var t=pw(e),n={type:e&&e.name,value:VY(e)};return t.length&&(n.stacktrace={frames:t}),n.type===void 0&&n.value===""&&(n.value="Unrecoverable error caught"),n}function zY(e,t,n){var r={exception:{values:[{type:$v(e)?e.constructor.name:n?"UnhandledRejection":"Error",value:"Non-Error "+(n?"promise rejection":"exception")+" captured with keys: "+rq(e)}]},extra:{__serialized__:mR(e)}};if(t){var i=pw(t);i.length&&(r.stacktrace={frames:i})}return r}function lb(e){return{exception:{values:[AR(e)]}}}function pw(e){var t=e.stacktrace||e.stack||"",n=HY(e);try{return oq(BY,NY,IY,DY,OY)(t,n)}catch{}return[]}var jY=/Minified React error #\d+;/i;function HY(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(jY.test(e.message))return 1}return 0}function VY(e){var t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function WY(e,t,n){var r=t&&t.syntheticException||void 0,i=hw(e,r,n);return Dp(i),i.level=ta.Error,t&&t.event_id&&(i.event_id=t.event_id),oc(i)}function UY(e,t,n,r){t===void 0&&(t=ta.Info);var i=n&&n.syntheticException||void 0,o=Lx(e,i,r);return o.level=t,n&&n.event_id&&(o.event_id=n.event_id),oc(o)}function hw(e,t,n,r){var i;if(lR(e)&&e.error){var o=e;return lb(o.error)}if(k7(e)||FK(e)){var a=e;if("stack"in e)i=lb(e);else{var s=a.name||(k7(a)?"DOMError":"DOMException"),l=a.message?s+": "+a.message:s;i=Lx(l,t,n),Mx(i,l)}return"code"in a&&(i.tags=$t($t({},i.tags),{"DOMException.code":""+a.code})),i}if(nw(e))return lb(e);if(sd(e)||$v(e)){var c=e;return i=zY(c,t,r),Dp(i,{synthetic:!0}),i}return i=Lx(e,t,n),Mx(i,""+e,void 0),Dp(i,{synthetic:!0}),i}function Lx(e,t,n){var r={message:e};if(n&&t){var i=pw(t);i.length&&(r.stacktrace={frames:i})}return r}var _i=typeof __SENTRY_DEBUG__=="undefined"?!0:__SENTRY_DEBUG__,ao=rt(),_1;function mw(){if(_1)return _1;if(Ox(ao.fetch))return _1=ao.fetch.bind(ao);var e=ao.document,t=ao.fetch;if(e&&typeof e.createElement=="function")try{var n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);var r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(i){_i&&ue.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return _1=t.bind(ao)}function GY(e,t){var n=Object.prototype.toString.call(ao&&ao.navigator)==="[object Navigator]",r=n&&typeof ao.navigator.sendBeacon=="function";if(r){var i=ao.navigator.sendBeacon.bind(ao.navigator);return i(e,t)}if(Nv()){var o=mw();return AK(o(e,{body:t,method:"POST",credentials:"omit",keepalive:!0}))}}function cb(e){var t=e;return t==="event"?"error":t}var ub=rt(),LR=function(){function e(t){var n=this;this.options=t,this._buffer=vR(30),this._rateLimits={},this._outcomes={},this._api=Wg(t.dsn,t._metadata,t.tunnel),this.url=PR(this._api.dsn),this.options.sendClientReports&&ub.document&&ub.document.addEventListener("visibilitychange",function(){ub.document.visibilityState==="hidden"&&n._flushOutcomes()})}return e.prototype.sendEvent=function(t){return this._sendRequest(rY(t,this._api),t)},e.prototype.sendSession=function(t){return this._sendRequest(tY(t,this._api),t)},e.prototype.close=function(t){return this._buffer.drain(t)},e.prototype.recordLostEvent=function(t,n){var r;if(!!this.options.sendClientReports){var i=cb(n)+":"+t;_i&&ue.log("Adding outcome: "+i),this._outcomes[i]=(r=this._outcomes[i],(r!=null?r:0)+1)}},e.prototype._flushOutcomes=function(){if(!!this.options.sendClientReports){var t=this._outcomes;if(this._outcomes={},!Object.keys(t).length){_i&&ue.log("No outcomes to flush");return}_i&&ue.log(`Flushing outcomes:
`+JSON.stringify(t,null,2));var n=Uv(this._api.dsn,this._api.tunnel),r=Object.keys(t).map(function(o){var a=Ad(o.split(":"),2),s=a[0],l=a[1];return{reason:l,category:s,quantity:t[o]}}),i=Dq(r,this._api.tunnel&&Lh(this._api.dsn));try{GY(n,Hv(i))}catch(o){_i&&ue.error(o)}}},e.prototype._handleResponse=function(t){var n=t.requestType,r=t.response,i=t.headers,o=t.resolve,a=t.reject,s=bR(r.status);if(this._rateLimits=SR(this._rateLimits,i),this._isRateLimited(n)&&_i&&ue.warn("Too many "+n+" requests, backing off until: "+this._disabledUntil(n)),s==="success"){o({status:s});return}a(r)},e.prototype._disabledUntil=function(t){var n=cb(t);return new Date(sw(this._rateLimits,n))},e.prototype._isRateLimited=function(t){var n=cb(t);return xR(this._rateLimits,n)},e}(),KY=function(e){Vv(t,e);function t(n,r){r===void 0&&(r=mw());var i=e.call(this,n)||this;return i._fetch=r,i}return t.prototype._sendRequest=function(n,r){var i=this;if(this._isRateLimited(n.type))return this.recordLostEvent("ratelimit_backoff",n.type),Promise.reject({event:r,type:n.type,reason:"Transport for "+n.type+" requests locked till "+this._disabledUntil(n.type)+" due to too many requests.",status:429});var o={body:n.body,method:"POST",referrerPolicy:lq()?"origin":""};return this.options.fetchParameters!==void 0&&Object.assign(o,this.options.fetchParameters),this.options.headers!==void 0&&(o.headers=this.options.headers),this._buffer.add(function(){return new tl(function(a,s){i._fetch(n.url,o).then(function(l){var c={"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")};i._handleResponse({requestType:n.type,response:l,headers:c,resolve:a,reject:s})}).catch(s)})}).then(void 0,function(a){throw a instanceof On?i.recordLostEvent("queue_overflow",n.type):i.recordLostEvent("network_error",n.type),a})},t}(LR),qY=function(e){Vv(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._sendRequest=function(n,r){var i=this;return this._isRateLimited(n.type)?(this.recordLostEvent("ratelimit_backoff",n.type),Promise.reject({event:r,type:n.type,reason:"Transport for "+n.type+" requests locked till "+this._disabledUntil(n.type)+" due to too many requests.",status:429})):this._buffer.add(function(){return new tl(function(o,a){var s=new XMLHttpRequest;s.onreadystatechange=function(){if(s.readyState===4){var c={"x-sentry-rate-limits":s.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":s.getResponseHeader("Retry-After")};i._handleResponse({requestType:n.type,response:s,headers:c,resolve:o,reject:a})}},s.open("POST",n.url);for(var l in i.options.headers)Object.prototype.hasOwnProperty.call(i.options.headers,l)&&s.setRequestHeader(l,i.options.headers[l]);s.send(n.body)})}).then(void 0,function(o){throw o instanceof On?i.recordLostEvent("queue_overflow",n.type):i.recordLostEvent("network_error",n.type),o})},t}(LR);function YY(e,t){t===void 0&&(t=mw());function n(r){var i=$t({body:r.body,method:"POST",referrerPolicy:"origin"},e.requestOptions);return t(e.url,i).then(function(o){return o.text().then(function(a){return{body:a,headers:{"x-sentry-rate-limits":o.headers.get("X-Sentry-Rate-Limits"),"retry-after":o.headers.get("Retry-After")},reason:o.statusText,statusCode:o.status}})})}return RR({bufferSize:e.bufferSize},n)}var XY=4;function ZY(e){function t(n){return new tl(function(r,i){var o=new XMLHttpRequest;o.onreadystatechange=function(){if(o.readyState===XY){var s={body:o.response,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")},reason:o.statusText,statusCode:o.status};r(s)}},o.open("POST",e.url);for(var a in e.headers)Object.prototype.hasOwnProperty.call(e.headers,a)&&o.setRequestHeader(a,e.headers[a]);o.send(n.body)})}return RR({bufferSize:e.bufferSize},t)}var QY=function(e){Vv(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.eventFromException=function(n,r){return WY(n,r,this._options.attachStacktrace)},t.prototype.eventFromMessage=function(n,r,i){return r===void 0&&(r=ta.Info),UY(n,r,i,this._options.attachStacktrace)},t.prototype._setupTransport=function(){if(!this._options.dsn)return e.prototype._setupTransport.call(this);var n=$t($t({},this._options.transportOptions),{dsn:this._options.dsn,tunnel:this._options.tunnel,sendClientReports:this._options.sendClientReports,_metadata:this._options._metadata}),r=Wg(n.dsn,n._metadata,n.tunnel),i=Uv(r.dsn,r.tunnel);if(this._options.transport)return new this._options.transport(n);if(Nv()){var o=$t({},n.fetchParameters);return this._newTransport=YY({requestOptions:o,url:i}),new KY(n)}return this._newTransport=ZY({url:i,headers:n.headers}),new qY(n)},t}(oY),P1=rt(),Bx=0;function BR(){return Bx>0}function JY(){Bx+=1,setTimeout(function(){Bx-=1})}function cd(e,t,n){if(t===void 0&&(t={}),typeof e!="function")return e;try{var r=e.__sentry_wrapped__;if(r)return r;if(aw(e))return e}catch{return e}var i=function(){var s=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);var l=s.map(function(c){return cd(c,t)});return e.apply(this,l)}catch(c){throw JY(),Wq(function(u){u.addEventProcessor(function(d){return t.mechanism&&(Mx(d,void 0,void 0),Dp(d,t.mechanism)),d.extra=$t($t({},d.extra),{arguments:s}),d}),Vq(c)}),c}};try{for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(i[o]=e[o])}catch{}fR(i,e),Fv(e,"__sentry_wrapped__",i);try{var a=Object.getOwnPropertyDescriptor(i,"name");a.configurable&&Object.defineProperty(i,"name",{get:function(){return e.name}})}catch{}return i}function eX(e){if(e===void 0&&(e={}),!!P1.document){if(!e.eventId){_i&&ue.error("Missing eventId option in showReportDialog call");return}if(!e.dsn){_i&&ue.error("Missing dsn option in showReportDialog call");return}var t=P1.document.createElement("script");t.async=!0,t.src=qq(e.dsn,e),e.onLoad&&(t.onload=e.onLoad);var n=P1.document.head||P1.document.body;n&&n.appendChild(t)}}var gw=function(){function e(t){this.name=e.id,this._installFunc={onerror:tX,onunhandledrejection:nX},this._options=$t({onerror:!0,onunhandledrejection:!0},t)}return e.prototype.setupOnce=function(){Error.stackTraceLimit=50;var t=this._options;for(var n in t){var r=this._installFunc[n];r&&t[n]&&(oX(n),r(),this._installFunc[n]=void 0)}},e.id="GlobalHandlers",e}();function tX(){Jr("error",function(e){var t=Ad(NR(),2),n=t[0],r=t[1];if(!!n.getIntegration(gw)){var i=e.msg,o=e.url,a=e.line,s=e.column,l=e.error;if(!(BR()||l&&l.__sentry_own_request__)){var c=l===void 0&&ad(i)?iX(i,o,a,s):$R(hw(l||i,void 0,r,!1),o,a,s);c.level=ta.Error,FR(n,l,c,"onerror")}}})}function nX(){Jr("unhandledrejection",function(e){var t=Ad(NR(),2),n=t[0],r=t[1];if(!!n.getIntegration(gw)){var i=e;try{"reason"in e?i=e.reason:"detail"in e&&"reason"in e.detail&&(i=e.detail.reason)}catch{}if(BR()||i&&i.__sentry_own_request__)return!0;var o=rw(i)?rX(i):hw(i,void 0,r,!0);o.level=ta.Error,FR(n,i,o,"onunhandledrejection")}})}function rX(e){return{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(e)}]}}}function iX(e,t,n,r){var i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,o=lR(e)?e.message:e,a="Error",s=o.match(i);s&&(a=s[1],o=s[2]);var l={exception:{values:[{type:a,value:o}]}};return $R(l,t,n,r)}function $R(e,t,n,r){var i=e.exception=e.exception||{},o=i.values=i.values||[],a=o[0]=o[0]||{},s=a.stacktrace=a.stacktrace||{},l=s.frames=s.frames||[],c=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,d=ad(t)&&t.length>0?t:VK();return l.length===0&&l.push({colno:c,filename:d,function:"?",in_app:!0,lineno:u}),e}function oX(e){_i&&ue.log("Global Handler attached: "+e)}function FR(e,t,n,r){Dp(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function NR(){var e=zn(),t=e.getClient(),n=t&&t.getOptions().attachStacktrace;return[e,n]}var aX=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],sX=function(){function e(t){this.name=e.id,this._options=$t({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}return e.prototype.setupOnce=function(){var t=rt();this._options.setTimeout&&qn(t,"setTimeout",j7),this._options.setInterval&&qn(t,"setInterval",j7),this._options.requestAnimationFrame&&qn(t,"requestAnimationFrame",lX),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&qn(XMLHttpRequest.prototype,"send",cX);var n=this._options.eventTarget;if(n){var r=Array.isArray(n)?n:aX;r.forEach(uX)}},e.id="TryCatch",e}();function j7(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t[0];return t[0]=cd(r,{mechanism:{data:{function:Vs(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function lX(e){return function(t){return e.apply(this,[cd(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Vs(e)},handled:!0,type:"instrument"}})])}}function cX(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=this,i=["onload","onerror","onprogress","onreadystatechange"];return i.forEach(function(o){o in r&&typeof r[o]=="function"&&qn(r,o,function(a){var s={mechanism:{data:{function:o,handler:Vs(a)},handled:!0,type:"instrument"}},l=aw(a);return l&&(s.mechanism.data.handler=Vs(l)),cd(a,s)})}),e.apply(this,t)}}function uX(e){var t=rt(),n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(qn(n,"addEventListener",function(r){return function(i,o,a){try{typeof o.handleEvent=="function"&&(o.handleEvent=cd(o.handleEvent.bind(o),{mechanism:{data:{function:"handleEvent",handler:Vs(o),target:e},handled:!0,type:"instrument"}}))}catch{}return r.apply(this,[i,cd(o,{mechanism:{data:{function:"addEventListener",handler:Vs(o),target:e},handled:!0,type:"instrument"}}),a])}}),qn(n,"removeEventListener",function(r){return function(i,o,a){var s=o;try{var l=s&&s.__sentry_wrapped__;l&&r.call(this,i,l,a)}catch{}return r.call(this,i,s,a)}}))}var zR=function(){function e(t){this.name=e.id,this._options=$t({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}return e.prototype.addSentryBreadcrumb=function(t){!this._options.sentry||zn().addBreadcrumb({category:"sentry."+(t.type==="transaction"?"transaction":"event"),event_id:t.event_id,level:t.level,message:Nl(t)},{event:t})},e.prototype.setupOnce=function(){this._options.console&&Jr("console",fX),this._options.dom&&Jr("dom",dX(this._options.dom)),this._options.xhr&&Jr("xhr",pX),this._options.fetch&&Jr("fetch",hX),this._options.history&&Jr("history",mX)},e.id="Breadcrumbs",e}();function dX(e){function t(n){var r,i=typeof e=="object"?e.serializeAttribute:void 0;typeof i=="string"&&(i=[i]);try{r=n.event.target?Op(n.event.target,i):Op(n.event,i)}catch{r="<unknown>"}r.length!==0&&zn().addBreadcrumb({category:"ui."+n.name,message:r},{event:n.event,name:n.name,global:n.global})}return t}function fX(e){var t={category:"console",data:{arguments:e.args,logger:"console"},level:yR(e.level),message:Hg(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)t.message="Assertion failed: "+(Hg(e.args.slice(1)," ")||"console.assert"),t.data.arguments=e.args.slice(1);else return;zn().addBreadcrumb(t,{input:e.args,level:e.level})}function pX(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;var t=e.xhr.__sentry_xhr__||{},n=t.method,r=t.url,i=t.status_code,o=t.body;zn().addBreadcrumb({category:"xhr",data:{method:n,url:r,status_code:i},type:"http"},{xhr:e.xhr,input:o});return}}function hX(e){!e.endTimestamp||e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"||(e.error?zn().addBreadcrumb({category:"fetch",data:e.fetchData,level:ta.Error,type:"http"},{data:e.error,input:e.args}):zn().addBreadcrumb({category:"fetch",data:$t($t({},e.fetchData),{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response}))}function mX(e){var t=rt(),n=e.from,r=e.to,i=ab(t.location.href),o=ab(n),a=ab(r);o.path||(o=i),i.protocol===a.protocol&&i.host===a.host&&(r=a.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),zn().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}var gX="cause",vX=5,yX=function(){function e(t){t===void 0&&(t={}),this.name=e.id,this._key=t.key||gX,this._limit=t.limit||vX}return e.prototype.setupOnce=function(){lw(function(t,n){var r=zn().getIntegration(e);return r?bX(r._key,r._limit,t,n):t})},e.id="LinkedErrors",e}();function bX(e,t,n,r){if(!n.exception||!n.exception.values||!r||!aa(r.originalException,Error))return n;var i=jR(t,r.originalException,e);return n.exception.values=wR(i,n.exception.values),n}function jR(e,t,n,r){if(r===void 0&&(r=[]),!aa(t[n],Error)||r.length+1>=e)return r;var i=AR(t[n]);return jR(e,t[n],n,wR([i],r))}var vl=rt(),xX=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(){lw(function(t){if(zn().getIntegration(e)){if(!vl.navigator&&!vl.location&&!vl.document)return t;var n=t.request&&t.request.url||vl.location&&vl.location.href,r=(vl.document||{}).referrer,i=(vl.navigator||{}).userAgent,o=$t($t($t({},t.request&&t.request.headers),r&&{Referer:r}),i&&{"User-Agent":i}),a=$t($t({},n&&{url:n}),{headers:o});return $t($t({},t),{request:a})}return t})},e.id="UserAgent",e}(),SX=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(t,n){t(function(r){var i=n().getIntegration(e);if(i){try{if(wX(r,i._previousEvent))return _i&&ue.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return i._previousEvent=r}return i._previousEvent=r}return r})},e.id="Dedupe",e}();function wX(e,t){return t?!!(CX(e,t)||kX(e,t)):!1}function CX(e,t){var n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!VR(e,t)||!HR(e,t))}function kX(e,t){var n=H7(t),r=H7(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!VR(e,t)||!HR(e,t))}function HR(e,t){var n=V7(e),r=V7(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(var i=0;i<r.length;i++){var o=r[i],a=n[i];if(o.filename!==a.filename||o.lineno!==a.lineno||o.colno!==a.colno||o.function!==a.function)return!1}return!0}function VR(e,t){var n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function H7(e){return e.exception&&e.exception.values&&e.exception.values[0]}function V7(e){var t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}else if(e.stacktrace)return e.stacktrace.frames}var EX=function(e){Vv(t,e);function t(n){n===void 0&&(n={});var r=this;return n._metadata=n._metadata||{},n._metadata.sdk=n._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:Ug}],version:Ug},r=e.call(this,QY,n)||this,r}return t.prototype.showReportDialog=function(n){n===void 0&&(n={});var r=rt().document;if(!!r){if(!this._isEnabled()){_i&&ue.error("Trying to call showReportDialog with Sentry Client disabled");return}eX($t($t({},n),{dsn:n.dsn||this.getDsn()}))}},t.prototype._prepareEvent=function(n,r,i){return n.platform=n.platform||"javascript",e.prototype._prepareEvent.call(this,n,r,i)},t.prototype._sendEvent=function(n){var r=this.getIntegration(zR);r&&r.addSentryBreadcrumb(n),e.prototype._sendEvent.call(this,n)},t}(Jq),IX=[new uY,new lY,new sX,new zR,new gw,new yX,new SX,new xX];function TX(e){if(e===void 0&&(e={}),e.defaultIntegrations===void 0&&(e.defaultIntegrations=IX),e.release===void 0){var t=rt();t.SENTRY_RELEASE&&t.SENTRY_RELEASE.id&&(e.release=t.SENTRY_RELEASE.id)}e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0),aY(EX,e),e.autoSessionTracking&&_X()}function W7(e){e.startSession({ignoreDuration:!0}),e.captureSession()}function _X(){var e=rt(),t=e.document;if(typeof t=="undefined"){_i&&ue.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}var n=zn();!n.captureSession||(W7(n),Jr("history",function(r){var i=r.from,o=r.to;i===void 0||i===o||W7(zn())}))}function PX(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:Ug}],version:Ug},TX(e)}var WR={exports:{}},ft={};/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var jn=typeof Symbol=="function"&&Symbol.for,vw=jn?Symbol.for("react.element"):60103,yw=jn?Symbol.for("react.portal"):60106,Gv=jn?Symbol.for("react.fragment"):60107,Kv=jn?Symbol.for("react.strict_mode"):60108,qv=jn?Symbol.for("react.profiler"):60114,Yv=jn?Symbol.for("react.provider"):60109,Xv=jn?Symbol.for("react.context"):60110,bw=jn?Symbol.for("react.async_mode"):60111,Zv=jn?Symbol.for("react.concurrent_mode"):60111,Qv=jn?Symbol.for("react.forward_ref"):60112,Jv=jn?Symbol.for("react.suspense"):60113,OX=jn?Symbol.for("react.suspense_list"):60120,ey=jn?Symbol.for("react.memo"):60115,ty=jn?Symbol.for("react.lazy"):60116,MX=jn?Symbol.for("react.block"):60121,RX=jn?Symbol.for("react.fundamental"):60117,DX=jn?Symbol.for("react.responder"):60118,AX=jn?Symbol.for("react.scope"):60119;function fi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case vw:switch(e=e.type,e){case bw:case Zv:case Gv:case qv:case Kv:case Jv:return e;default:switch(e=e&&e.$$typeof,e){case Xv:case Qv:case ty:case ey:case Yv:return e;default:return t}}case yw:return t}}}function UR(e){return fi(e)===Zv}ft.AsyncMode=bw;ft.ConcurrentMode=Zv;ft.ContextConsumer=Xv;ft.ContextProvider=Yv;ft.Element=vw;ft.ForwardRef=Qv;ft.Fragment=Gv;ft.Lazy=ty;ft.Memo=ey;ft.Portal=yw;ft.Profiler=qv;ft.StrictMode=Kv;ft.Suspense=Jv;ft.isAsyncMode=function(e){return UR(e)||fi(e)===bw};ft.isConcurrentMode=UR;ft.isContextConsumer=function(e){return fi(e)===Xv};ft.isContextProvider=function(e){return fi(e)===Yv};ft.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===vw};ft.isForwardRef=function(e){return fi(e)===Qv};ft.isFragment=function(e){return fi(e)===Gv};ft.isLazy=function(e){return fi(e)===ty};ft.isMemo=function(e){return fi(e)===ey};ft.isPortal=function(e){return fi(e)===yw};ft.isProfiler=function(e){return fi(e)===qv};ft.isStrictMode=function(e){return fi(e)===Kv};ft.isSuspense=function(e){return fi(e)===Jv};ft.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Gv||e===Zv||e===qv||e===Kv||e===Jv||e===OX||typeof e=="object"&&e!==null&&(e.$$typeof===ty||e.$$typeof===ey||e.$$typeof===Yv||e.$$typeof===Xv||e.$$typeof===Qv||e.$$typeof===RX||e.$$typeof===DX||e.$$typeof===AX||e.$$typeof===MX)};ft.typeOf=fi;WR.exports=ft;var GR=WR.exports,LX={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},BX={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},KR={};KR[GR.ForwardRef]=LX;KR[GR.Memo]=BX;/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var $x=function(e,t){return $x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},$x(e,t)};function xw(e,t){$x(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Xe=function(){return Xe=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Xe.apply(this,arguments)};function $X(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function FX(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function NX(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function qR(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(NX(arguments[t]));return e}var $e=typeof __SENTRY_DEBUG__=="undefined"?!0:__SENTRY_DEBUG__;function Sw(e){var t=zn().getClient(),n=e||t&&t.getOptions();return!!n&&("tracesSampleRate"in n||"tracesSampler"in n)}function ny(e){var t=e||zn(),n=t.getScope();return n&&n.getTransaction()}function Bn(e){return e/1e3}function zX(e){return e*1e3}function jX(){Jr("error",U7),Jr("unhandledrejection",U7)}function U7(){var e=ny();if(e){var t="internal_error";$e&&ue.log("[Tracing] Transaction: "+t+" -> Global error occured"),e.setStatus(t)}}var Fx="finishReason",Nx=["heartbeatFailed","idleTimeout","documentHidden"],YR=function(){function e(t){t===void 0&&(t=1e3),this.spans=[],this._maxlen=t}return e.prototype.add=function(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)},e}(),HX=function(){function e(t){if(this.traceId=Os(),this.spanId=Os().substring(16),this.startTimestamp=Lp(),this.tags={},this.data={},!t)return this;t.traceId&&(this.traceId=t.traceId),t.spanId&&(this.spanId=t.spanId),t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this.sampled=t.sampled),t.op&&(this.op=t.op),t.description&&(this.description=t.description),t.data&&(this.data=t.data),t.tags&&(this.tags=t.tags),t.status&&(this.status=t.status),t.startTimestamp&&(this.startTimestamp=t.startTimestamp),t.endTimestamp&&(this.endTimestamp=t.endTimestamp)}return e.prototype.child=function(t){return this.startChild(t)},e.prototype.startChild=function(t){var n=new e(Xe(Xe({},t),{parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId}));return n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n),n.transaction=this.transaction,n},e.prototype.setTag=function(t,n){var r;return this.tags=Xe(Xe({},this.tags),(r={},r[t]=n,r)),this},e.prototype.setData=function(t,n){var r;return this.data=Xe(Xe({},this.data),(r={},r[t]=n,r)),this},e.prototype.setStatus=function(t){return this.status=t,this},e.prototype.setHttpStatus=function(t){this.setTag("http.status_code",String(t));var n=VX(t);return n!=="unknown_error"&&this.setStatus(n),this},e.prototype.isSuccess=function(){return this.status==="ok"},e.prototype.finish=function(t){this.endTimestamp=typeof t=="number"?t:Lp()},e.prototype.toTraceparent=function(){var t="";return this.sampled!==void 0&&(t=this.sampled?"-1":"-0"),this.traceId+"-"+this.spanId+t},e.prototype.toContext=function(){return ql({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})},e.prototype.updateWithContext=function(t){var n,r,i,o,a;return this.data=(n=t.data,n!=null?n:{}),this.description=t.description,this.endTimestamp=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this.sampled=t.sampled,this.spanId=(r=t.spanId,r!=null?r:this.spanId),this.startTimestamp=(i=t.startTimestamp,i!=null?i:this.startTimestamp),this.status=t.status,this.tags=(o=t.tags,o!=null?o:{}),this.traceId=(a=t.traceId,a!=null?a:this.traceId),this},e.prototype.getTraceContext=function(){return ql({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})},e.prototype.toJSON=function(){return ql({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})},e}();function VX(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}var XR=function(e){xw(t,e);function t(n,r){var i=e.call(this,n)||this;return i._measurements={},i._hub=zn(),aa(r,Wv)&&(i._hub=r),i.name=n.name||"",i.metadata=n.metadata||{},i._trimEnd=n.trimEnd,i.transaction=i,i}return t.prototype.setName=function(n){this.name=n},t.prototype.initSpanRecorder=function(n){n===void 0&&(n=1e3),this.spanRecorder||(this.spanRecorder=new YR(n)),this.spanRecorder.add(this)},t.prototype.setMeasurements=function(n){this._measurements=Xe({},n)},t.prototype.setMetadata=function(n){this.metadata=Xe(Xe({},this.metadata),n)},t.prototype.finish=function(n){var r=this;if(this.endTimestamp===void 0){if(this.name||($e&&ue.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),e.prototype.finish.call(this,n),this.sampled!==!0){$e&&ue.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled.");var i=this._hub.getClient(),o=i&&i.getTransport&&i.getTransport();o&&o.recordLostEvent&&o.recordLostEvent("sample_rate","transaction");return}var a=this.spanRecorder?this.spanRecorder.spans.filter(function(c){return c!==r&&c.endTimestamp}):[];this._trimEnd&&a.length>0&&(this.endTimestamp=a.reduce(function(c,u){return c.endTimestamp&&u.endTimestamp?c.endTimestamp>u.endTimestamp?c:u:c}).endTimestamp);var s={contexts:{trace:this.getTraceContext()},spans:a,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:this.metadata},l=Object.keys(this._measurements).length>0;return l&&($e&&ue.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),s.measurements=this._measurements),$e&&ue.log("[Tracing] Finishing "+this.op+" transaction: "+this.name+"."),this._hub.captureEvent(s)}},t.prototype.toContext=function(){var n=e.prototype.toContext.call(this);return ql(Xe(Xe({},n),{name:this.name,trimEnd:this._trimEnd}))},t.prototype.updateWithContext=function(n){var r;return e.prototype.updateWithContext.call(this,n),this.name=(r=n.name,r!=null?r:""),this._trimEnd=n.trimEnd,this},t}(HX),ZR=1e3,WX=5e3,UX=function(e){xw(t,e);function t(n,r,i,o){i===void 0&&(i="");var a=e.call(this,o)||this;return a._pushActivity=n,a._popActivity=r,a.transactionSpanId=i,a}return t.prototype.add=function(n){var r=this;n.spanId!==this.transactionSpanId&&(n.finish=function(i){n.endTimestamp=typeof i=="number"?i:Lp(),r._popActivity(n.spanId)},n.endTimestamp===void 0&&this._pushActivity(n.spanId)),e.prototype.add.call(this,n)},t}(YR),GX=function(e){xw(t,e);function t(n,r,i,o){i===void 0&&(i=ZR),o===void 0&&(o=!1);var a=e.call(this,n,r)||this;return a._idleHub=r,a._idleTimeout=i,a._onScope=o,a.activities={},a._heartbeatCounter=0,a._finished=!1,a._beforeFinishCallbacks=[],r&&o&&(G7(r),$e&&ue.log("Setting idle transaction on scope. Span ID: "+a.spanId),r.configureScope(function(s){return s.setSpan(a)})),a._initTimeout=setTimeout(function(){a._finished||a.finish()},a._idleTimeout),a}return t.prototype.finish=function(n){var r,i,o=this;if(n===void 0&&(n=Lp()),this._finished=!0,this.activities={},this.spanRecorder){$e&&ue.log("[Tracing] finishing IdleTransaction",new Date(n*1e3).toISOString(),this.op);try{for(var a=FX(this._beforeFinishCallbacks),s=a.next();!s.done;s=a.next()){var l=s.value;l(this,n)}}catch(c){r={error:c}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}this.spanRecorder.spans=this.spanRecorder.spans.filter(function(c){if(c.spanId===o.spanId)return!0;c.endTimestamp||(c.endTimestamp=n,c.setStatus("cancelled"),$e&&ue.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(c,void 0,2)));var u=c.startTimestamp<n;return u||$e&&ue.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(c,void 0,2)),u}),$e&&ue.log("[Tracing] flushing IdleTransaction")}else $e&&ue.log("[Tracing] No active IdleTransaction");return this._onScope&&G7(this._idleHub),e.prototype.finish.call(this,n)},t.prototype.registerBeforeFinishCallback=function(n){this._beforeFinishCallbacks.push(n)},t.prototype.initSpanRecorder=function(n){var r=this;if(!this.spanRecorder){var i=function(a){r._finished||r._pushActivity(a)},o=function(a){r._finished||r._popActivity(a)};this.spanRecorder=new UX(i,o,this.spanId,n),$e&&ue.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)},t.prototype._pushActivity=function(n){this._initTimeout&&(clearTimeout(this._initTimeout),this._initTimeout=void 0),$e&&ue.log("[Tracing] pushActivity: "+n),this.activities[n]=!0,$e&&ue.log("[Tracing] new activities count",Object.keys(this.activities).length)},t.prototype._popActivity=function(n){var r=this;if(this.activities[n]&&($e&&ue.log("[Tracing] popActivity "+n),delete this.activities[n],$e&&ue.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){var i=this._idleTimeout,o=Lp()+i/1e3;setTimeout(function(){r._finished||(r.setTag(Fx,Nx[1]),r.finish(o))},i)}},t.prototype._beat=function(){if(!this._finished){var n=Object.keys(this.activities).join("");n===this._prevHeartbeatString?this._heartbeatCounter+=1:this._heartbeatCounter=1,this._prevHeartbeatString=n,this._heartbeatCounter>=3?($e&&ue.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this.setTag(Fx,Nx[0]),this.finish()):this._pingHeartbeat()}},t.prototype._pingHeartbeat=function(){var n=this;$e&&ue.log("pinging Heartbeat -> current counter: "+this._heartbeatCounter),setTimeout(function(){n._beat()},WX)},t}(XR);function G7(e){if(e){var t=e.getScope();if(t){var n=t.getTransaction();n&&t.setSpan(void 0)}}}function KX(){var e=this.getScope();if(e){var t=e.getSpan();if(t)return{"sentry-trace":t.toTraceparent()}}return{}}function QR(e,t,n){if(!Sw(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setMetadata({transactionSampling:{method:"explicitly_set"}}),e;var r;return typeof t.tracesSampler=="function"?(r=t.tracesSampler(n),e.setMetadata({transactionSampling:{method:"client_sampler",rate:Number(r)}})):n.parentSampled!==void 0?(r=n.parentSampled,e.setMetadata({transactionSampling:{method:"inheritance"}})):(r=t.tracesSampleRate,e.setMetadata({transactionSampling:{method:"client_rate",rate:Number(r)}})),qX(r)?r?(e.sampled=Math.random()<r,e.sampled?($e&&ue.log("[Tracing] starting "+e.op+" transaction - "+e.name),e):($e&&ue.log("[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = "+Number(r)+")"),e)):($e&&ue.log("[Tracing] Discarding transaction because "+(typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),e.sampled=!1,e):($e&&ue.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function qX(e){return cR(e)||!(typeof e=="number"||typeof e=="boolean")?($e&&ue.warn("[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got "+JSON.stringify(e)+" of type "+JSON.stringify(typeof e)+"."),!1):e<0||e>1?($e&&ue.warn("[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got "+e+"."),!1):!0}function YX(e,t){var n=this.getClient(),r=n&&n.getOptions()||{},i=new XR(e,this);return i=QR(i,r,Xe({parentSampled:e.parentSampled,transactionContext:e},t)),i.sampled&&i.initSpanRecorder(r._experiments&&r._experiments.maxSpans),i}function XX(e,t,n,r,i){var o=e.getClient(),a=o&&o.getOptions()||{},s=new GX(t,e,n,r);return s=QR(s,a,Xe({parentSampled:t.parentSampled,transactionContext:t},i)),s.sampled&&s.initSpanRecorder(a._experiments&&a._experiments.maxSpans),s}function ZX(){var e=Ld();!e.__SENTRY__||(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=YX),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=KX))}function QX(){var e=Ld();if(!!e.__SENTRY__){var t={mongodb:function(){var r=xs(Ia,"./integrations/node/mongo");return new r.Mongo},mongoose:function(){var r=xs(Ia,"./integrations/node/mongo");return new r.Mongo({mongoose:!0})},mysql:function(){var r=xs(Ia,"./integrations/node/mysql");return new r.Mysql},pg:function(){var r=xs(Ia,"./integrations/node/postgres");return new r.Postgres}},n=Object.keys(t).filter(function(r){return!!BK(r)}).map(function(r){try{return t[r]()}catch{return}}).filter(function(r){return r});n.length>0&&(e.__SENTRY__.integrations=qR(e.__SENTRY__.integrations||[],n))}}function JX(){ZX(),Ah()&&QX(),jX()}var O1=rt();function eZ(){O1&&O1.document?O1.document.addEventListener("visibilitychange",function(){var e=ny();if(O1.document.hidden&&e){var t="cancelled";$e&&ue.log("[Tracing] Transaction: "+t+" -> since tab moved to the background, op: "+e.op),e.status||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.setTag(Fx,Nx[2]),e.finish()}}):$e&&ue.warn("[Tracing] Could not set up background tab detection due to lack of global document")}var ww=function(e,t,n){var r;return function(i){t.value>=0&&(i||n)&&(t.delta=t.value-(r||0),(t.delta||r===void 0)&&(r=t.value,e(t)))}},tZ=function(){return"v2-"+Date.now()+"-"+(Math.floor(Math.random()*(9e12-1))+1e12)},Cw=function(e,t){return{name:e,value:t!=null?t:-1,delta:0,entries:[],id:tZ()}},kw=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if(e==="first-input"&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver(function(r){return r.getEntries().map(t)});return n.observe({type:e,buffered:!0}),n}}catch{}},ry=function(e,t){var n=function(r){(r.type==="pagehide"||rt().document.visibilityState==="hidden")&&(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},nZ=function(e,t){var n=Cw("CLS",0),r,i=0,o=[],a=function(l){if(l&&!l.hadRecentInput){var c=o[0],u=o[o.length-1];i&&o.length!==0&&l.startTime-u.startTime<1e3&&l.startTime-c.startTime<5e3?(i+=l.value,o.push(l)):(i=l.value,o=[l]),i>n.value&&(n.value=i,n.entries=o,r&&r())}},s=kw("layout-shift",a);s&&(r=ww(e,n,t),ry(function(){s.takeRecords().map(a),r(!0)}))},qm=-1,rZ=function(){return rt().document.visibilityState==="hidden"?0:1/0},iZ=function(){ry(function(e){var t=e.timeStamp;qm=t},!0)},Ew=function(){return qm<0&&(qm=rZ(),iZ()),{get firstHiddenTime(){return qm}}},oZ=function(e,t){var n=Ew(),r=Cw("FID"),i,o=function(s){i&&s.startTime<n.firstHiddenTime&&(r.value=s.processingStart-s.startTime,r.entries.push(s),i(!0))},a=kw("first-input",o);a&&(i=ww(e,r,t),ry(function(){a.takeRecords().map(o),a.disconnect()},!0))},K7={},aZ=function(e,t){var n=Ew(),r=Cw("LCP"),i,o=function(l){var c=l.startTime;c<n.firstHiddenTime&&(r.value=c,r.entries.push(l)),i&&i()},a=kw("largest-contentful-paint",o);if(a){i=ww(e,r,t);var s=function(){K7[r.id]||(a.takeRecords().map(o),a.disconnect(),K7[r.id]=!0,i(!0))};["keydown","click"].forEach(function(l){addEventListener(l,s,{once:!0,capture:!0})}),ry(s,!0)}},Gi=rt(),sZ=function(){function e(t){t===void 0&&(t=!1),this._reportAllChanges=t,this._measurements={},this._performanceCursor=0,!Ah()&&Gi&&Gi.performance&&Gi.document&&(Gi.performance.mark&&Gi.performance.mark("sentry-tracing-init"),this._trackCLS(),this._trackLCP(),this._trackFID())}return e.prototype.addPerformanceEntries=function(t){var n=this;if(!(!Gi||!Gi.performance||!Gi.performance.getEntries||!uf)){$e&&ue.log("[Tracing] Adding & adjusting spans using Performance API");var r=Bn(uf),i,o;if(Gi.performance.getEntries().slice(this._performanceCursor).forEach(function(s){var l=Bn(s.startTime),c=Bn(s.duration);if(!(t.op==="navigation"&&r+l<t.startTimestamp))switch(s.entryType){case"navigation":{lZ(t,s,r),i=r+Bn(s.responseStart),o=r+Bn(s.requestStart);break}case"mark":case"paint":case"measure":{var u=cZ(t,s,l,c,r),d=Ew(),f=s.startTime<d.firstHiddenTime;s.name==="first-paint"&&f&&($e&&ue.log("[Measurements] Adding FP"),n._measurements.fp={value:s.startTime},n._measurements["mark.fp"]={value:u}),s.name==="first-contentful-paint"&&f&&($e&&ue.log("[Measurements] Adding FCP"),n._measurements.fcp={value:s.startTime},n._measurements["mark.fcp"]={value:u});break}case"resource":{var p=s.name.replace(Gi.location.origin,"");uZ(t,s,p,l,c,r);break}}}),this._performanceCursor=Math.max(performance.getEntries().length-1,0),this._trackNavigator(t),t.op==="pageload"){var a=Bn(uf);typeof i=="number"&&($e&&ue.log("[Measurements] Adding TTFB"),this._measurements.ttfb={value:(i-t.startTimestamp)*1e3},typeof o=="number"&&o<=i&&(this._measurements["ttfb.requestTime"]={value:(i-o)*1e3})),["fcp","fp","lcp"].forEach(function(s){if(!(!n._measurements[s]||a>=t.startTimestamp)){var l=n._measurements[s].value,c=a+Bn(l),u=Math.abs((c-t.startTimestamp)*1e3),d=u-l;$e&&ue.log("[Measurements] Normalized "+s+" from "+l+" to "+u+" ("+d+")"),n._measurements[s].value=u}}),this._measurements["mark.fid"]&&this._measurements.fid&&ud(t,{description:"first input delay",endTimestamp:this._measurements["mark.fid"].value+Bn(this._measurements.fid.value),op:"web.vitals",startTimestamp:this._measurements["mark.fid"].value}),"fcp"in this._measurements||delete this._measurements.cls,t.setMeasurements(this._measurements),fZ(t,this._lcpEntry,this._clsEntry),t.setTag("sentry_reportAllChanges",this._reportAllChanges)}}},e.prototype._trackNavigator=function(t){var n=Gi.navigator;if(!!n){var r=n.connection;r&&(r.effectiveType&&t.setTag("effectiveConnectionType",r.effectiveType),r.type&&t.setTag("connectionType",r.type),R1(r.rtt)&&(this._measurements["connection.rtt"]={value:r.rtt}),R1(r.downlink)&&(this._measurements["connection.downlink"]={value:r.downlink})),R1(n.deviceMemory)&&t.setTag("deviceMemory",String(n.deviceMemory)),R1(n.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(n.hardwareConcurrency))}},e.prototype._trackCLS=function(){var t=this;nZ(function(n){var r=n.entries.pop();!r||($e&&ue.log("[Measurements] Adding CLS"),t._measurements.cls={value:n.value},t._clsEntry=r)})},e.prototype._trackLCP=function(){var t=this;aZ(function(n){var r=n.entries.pop();if(!!r){var i=Bn(uf),o=Bn(r.startTime);$e&&ue.log("[Measurements] Adding LCP"),t._measurements.lcp={value:n.value},t._measurements["mark.lcp"]={value:i+o},t._lcpEntry=r}},this._reportAllChanges)},e.prototype._trackFID=function(){var t=this;oZ(function(n){var r=n.entries.pop();if(!!r){var i=Bn(uf),o=Bn(r.startTime);$e&&ue.log("[Measurements] Adding FID"),t._measurements.fid={value:n.value},t._measurements["mark.fid"]={value:i+o}}})},e}();function lZ(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(function(r){M1(e,t,r,n)}),M1(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),M1(e,t,"fetch",n,"cache","domainLookupStart"),M1(e,t,"domainLookup",n,"DNS"),dZ(e,t,n)}function cZ(e,t,n,r,i){var o=i+n,a=o+r;return ud(e,{description:t.name,endTimestamp:a,op:t.entryType,startTimestamp:o}),o}function uZ(e,t,n,r,i,o){if(!(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")){var a={};"transferSize"in t&&(a["Transfer Size"]=t.transferSize),"encodedBodySize"in t&&(a["Encoded Body Size"]=t.encodedBodySize),"decodedBodySize"in t&&(a["Decoded Body Size"]=t.decodedBodySize);var s=o+r,l=s+i;ud(e,{description:n,endTimestamp:l,op:t.initiatorType?"resource."+t.initiatorType:"resource",startTimestamp:s,data:a})}}function M1(e,t,n,r,i,o){var a=o?t[o]:t[n+"End"],s=t[n+"Start"];!s||!a||ud(e,{op:"browser",description:i!=null?i:n,startTimestamp:r+Bn(s),endTimestamp:r+Bn(a)})}function dZ(e,t,n){ud(e,{op:"browser",description:"request",startTimestamp:n+Bn(t.requestStart),endTimestamp:n+Bn(t.responseEnd)}),ud(e,{op:"browser",description:"response",startTimestamp:n+Bn(t.responseStart),endTimestamp:n+Bn(t.responseEnd)})}function ud(e,t){var n=t.startTimestamp,r=$X(t,["startTimestamp"]);return n&&e.startTimestamp>n&&(e.startTimestamp=n),e.startChild(Xe({startTimestamp:n},r))}function R1(e){return typeof e=="number"&&isFinite(e)}function fZ(e,t,n){t&&($e&&ue.log("[Measurements] Adding LCP Data"),t.element&&e.setTag("lcp.element",Op(t.element)),t.id&&e.setTag("lcp.id",t.id),t.url&&e.setTag("lcp.url",t.url.trim().slice(0,200)),e.setTag("lcp.size",t.size)),n&&n.sources&&($e&&ue.log("[Measurements] Adding CLS Data"),n.sources.forEach(function(r,i){return e.setTag("cls.source."+(i+1),Op(r.node))}))}var pZ=["localhost",/^\//],Kg={traceFetch:!0,traceXHR:!0,tracingOrigins:pZ};function hZ(e){var t=Xe(Xe({},Kg),e),n=t.traceFetch,r=t.traceXHR,i=t.tracingOrigins,o=t.shouldCreateSpanForRequest,a={},s=function(u){if(a[u])return a[u];var d=i;return a[u]=d.some(function(f){return Rp(u,f)})&&!Rp(u,"sentry_key"),a[u]},l=s;typeof o=="function"&&(l=function(u){return s(u)&&o(u)});var c={};n&&Jr("fetch",function(u){mZ(u,l,c)}),r&&Jr("xhr",function(u){gZ(u,l,c)})}function mZ(e,t,n){if(!(!Sw()||!(e.fetchData&&t(e.fetchData.url)))){if(e.endTimestamp){var r=e.fetchData.__span;if(!r)return;var i=n[r];i&&(e.response?i.setHttpStatus(e.response.status):e.error&&i.setStatus("internal_error"),i.finish(),delete n[r]);return}var o=ny();if(o){var i=o.startChild({data:Xe(Xe({},e.fetchData),{type:"fetch"}),description:e.fetchData.method+" "+e.fetchData.url,op:"http.client"});e.fetchData.__span=i.spanId,n[i.spanId]=i;var a=e.args[0]=e.args[0],s=e.args[1]=e.args[1]||{},l=s.headers;aa(a,Request)&&(l=a.headers),l?typeof l.append=="function"?l.append("sentry-trace",i.toTraceparent()):Array.isArray(l)?l=qR(l,[["sentry-trace",i.toTraceparent()]]):l=Xe(Xe({},l),{"sentry-trace":i.toTraceparent()}):l={"sentry-trace":i.toTraceparent()},s.headers=l}}}function gZ(e,t,n){if(!(!Sw()||e.xhr&&e.xhr.__sentry_own_request__||!(e.xhr&&e.xhr.__sentry_xhr__&&t(e.xhr.__sentry_xhr__.url)))){var r=e.xhr.__sentry_xhr__;if(e.endTimestamp){var i=e.xhr.__sentry_xhr_span_id__;if(!i)return;var o=n[i];o&&(o.setHttpStatus(r.status_code),o.finish(),delete n[i]);return}var a=ny();if(a){var o=a.startChild({data:Xe(Xe({},r.data),{type:"xhr",method:r.method,url:r.url}),description:r.method+" "+r.url,op:"http.client"});if(e.xhr.__sentry_xhr_span_id__=o.spanId,n[e.xhr.__sentry_xhr_span_id__]=o,e.xhr.setRequestHeader)try{e.xhr.setRequestHeader("sentry-trace",o.toTraceparent())}catch{}}}}var df=rt();function vZ(e,t,n){if(t===void 0&&(t=!0),n===void 0&&(n=!0),!df||!df.location){$e&&ue.warn("Could not initialize routing instrumentation due to invalid location");return}var r=df.location.href,i;t&&(i=e({name:df.location.pathname,op:"pageload"})),n&&Jr("history",function(o){var a=o.to,s=o.from;if(s===void 0&&r&&r.indexOf(a)!==-1){r=void 0;return}s!==a&&(r=void 0,i&&($e&&ue.log("[Tracing] Finishing current transaction with op: "+i.op),i.finish()),i=e({name:df.location.pathname,op:"navigation"}))})}var yZ=600,bZ=Xe({idleTimeout:ZR,markBackgroundTransactions:!0,maxTransactionDuration:yZ,routingInstrumentation:vZ,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0},Kg),xZ=function(){function e(t){this.name=e.id,this._configuredIdleTimeout=void 0;var n=Kg.tracingOrigins;t&&(this._configuredIdleTimeout=t.idleTimeout,t.tracingOrigins&&Array.isArray(t.tracingOrigins)&&t.tracingOrigins.length!==0?n=t.tracingOrigins:$e&&(this._emitOptionsWarning=!0)),this.options=Xe(Xe(Xe({},bZ),t),{tracingOrigins:n});var r=this.options._metricOptions;this._metrics=new sZ(r&&r._reportAllChanges)}return e.prototype.setupOnce=function(t,n){var r=this;this._getCurrentHub=n,this._emitOptionsWarning&&($e&&ue.warn("[Tracing] You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace."),$e&&ue.warn("[Tracing] We added a reasonable default for you: "+Kg.tracingOrigins));var i=this.options,o=i.routingInstrumentation,a=i.startTransactionOnLocationChange,s=i.startTransactionOnPageLoad,l=i.markBackgroundTransactions,c=i.traceFetch,u=i.traceXHR,d=i.tracingOrigins,f=i.shouldCreateSpanForRequest;o(function(p){return r._createRouteTransaction(p)},s,a),l&&eZ(),hZ({traceFetch:c,traceXHR:u,tracingOrigins:d,shouldCreateSpanForRequest:f})},e.prototype._createRouteTransaction=function(t){var n=this;if(!this._getCurrentHub){$e&&ue.warn("[Tracing] Did not create "+t.op+" transaction because _getCurrentHub is invalid.");return}var r=this.options,i=r.beforeNavigate,o=r.idleTimeout,a=r.maxTransactionDuration,s=t.op==="pageload"?SZ():void 0,l=Xe(Xe(Xe({},t),s),{trimEnd:!0}),c=typeof i=="function"?i(l):l,u=c===void 0?Xe(Xe({},l),{sampled:!1}):c;u.sampled===!1&&$e&&ue.log("[Tracing] Will not send "+u.op+" transaction because of beforeNavigate."),$e&&ue.log("[Tracing] Starting "+u.op+" transaction on scope");var d=this._getCurrentHub(),f=rt().location,p=XX(d,u,o,!0,{location:f});return p.registerBeforeFinishCallback(function(m,g){n._metrics.addPerformanceEntries(m),CZ(zX(a),m,g)}),p.setTag("idleTimeout",this._configuredIdleTimeout),p},e.id="BrowserTracing",e}();function SZ(){var e=wZ("sentry-trace");if(e)return Mq(e)}function wZ(e){var t=rt().document.querySelector("meta[name="+e+"]");return t?t.getAttribute("content"):null}function CZ(e,t,n){var r=n-t.startTimestamp,i=n&&(r>e||r<0);i&&(t.setStatus("deadline_exceeded"),t.setTag("maxTransactionDurationExceeded","true"))}JX();var LM;const uo={node:{}.NODE_ENV||"development",isProduction:{}.NODE_ENV==="production"&&/www.worldanvil/.test(window.location.host),isDevelopment:{}.NODE_ENV==="development"&&/dev.worldanvil/.test(window.location.host),isLocal:(LM={REACT_APP_SERVER_URL:"https://dev.server.phidias.docker.worldanvil.com/api",REACT_APP_SOCKET_URL:"https://dev.server.phidias.docker.worldanvil.com",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}.IS_LOCAL)!=null?LM:!1,app:{sentryDsn:{}.SENTRY_DSN||"https://e0a65b412fed402893ffc97dd137c5d2@sentry.worldanvil.com/3",nodeEnv:{}.NODE_ENV||"??",serverUrl:"https://dev.server.phidias.docker.worldanvil.com/api",socketUrl:"https://dev.server.phidias.docker.worldanvil.com",socketInterval:Number({}.REACT_APP_SOCKET_INTERVAL)||1500,version:"1.6.2"}},kZ="token-phidias",EZ="canvas-root";class JR{constructor(t,n){S(this,"rootElement",null);S(this,"getRootElement",()=>{try{if(this.rootElement)return this.rootElement;const t=document.getElementById(this.rootPrefix);if(t)return console.log(`Naive Element already exists, react will inject itself onto the regular #${this.rootPrefix} element`),this.rootElement=t,t;const n=document.getElementsByClassName(this.rootPrefix);if(n&&n.length>0){const r=sessionStorage.getItem(this.token);if(!r)throw Error("No token");sessionStorage.removeItem(this.token),console.debug("Data",{id:r,rootElementsByClass:n,token:this.token});const i=Array.from(n).find(o=>o.id===this.getIdentifier(r));if(!i)throw Error("Not found element");return console.info("Loaded multiple one",{result:i,entityId:r,containerNeededProps:this.generateContainerProps(r)}),this.rootElement=i,i}throw Error(`Element already exists, react will inject itself onto the regular #${this.rootPrefix} element`)}catch(t){return console.error("Error on loading rootElement",{error:t}),null}});this.token=t,this.rootPrefix=n,this.rootPrefix=n,this.token=t}buildClient(){return this.rootElement=this.getRootElement(),this}getIdentifier(t){return`${this.rootPrefix}-${t}`}getAttribute(t){var n;return this.rootElement?(n=this.rootElement.getAttribute(t))!=null?n:void 0:null}generateContainerProps(t){return t?(sessionStorage.setItem(this.token,`${t}`),{className:this.rootPrefix,id:this.getIdentifier(`${t}`)}):{id:this.rootPrefix}}}const Di=new JR(kZ,EZ).buildClient(),zx=Di.getRootElement(),Ym=Di.getAttribute("data-id"),Xm=Di.getAttribute("data-world-id");let Fu=Di.getAttribute("data-server-url");var BM;Fu=/dev.worldanvil.com/.test((BM=window==null?void 0:window.location.href)!=null?BM:"")?"https://dev.server.phidias.docker.worldanvil.com":Fu;const Zm=Di.getAttribute("data-user-id");var $M;const jx=($M=Di==null?void 0:Di.getAttribute("data-readonly"))!=null?$M:void 0;var FM;const Hx=(FM=Di==null?void 0:Di.getAttribute("data-erebus"))!=null?FM:void 0;var eD=Object.freeze(Object.defineProperty({__proto__:null,ReactContainer:JR,aL:Di,rootElement:zx,canvasId:Ym,worldId:Xm,get serverUrl(){return Fu},userId:Zm,readonly:jx,erebusEmbedded:Hx},Symbol.toStringTag,{value:"Module"}));const{canvasId:IZ,userId:db,worldId:D1}=eD;uo.isProduction?PX({dsn:"https://53bc20bac1014079a0d167975587c559@o1195760.ingest.sentry.io/6318881",release:"phidias-client@"+uo.app.version,environment:D1&&typeof D1=="string"&&/dev.server/.test(D1)?"development":"production",initialScope:{tags:{worldId:D1,canvasId:IZ},user:{id:db!=null?db:"unknownId"}},integrations:[new xZ,new Bq({levels:["error"]})],tracesSampleRate:1}):console.log({elements:"elements",env:uo,...eD});const q7=["debug","info","notice","warning","error","critical","alert","emergency"],Nu={debug:7,info:6,notice:5,warning:4,error:3,critical:2,alert:1,emergency:0};function iy(e){return typeof e=="object"&&e!==null&&typeof e.handleSync=="function"&&typeof e.handleBatchSync=="function"}class TZ{async handleBatch(t){for(const n of t)await this.handle(n)}handleBatchSync(t){if(!iy(this))throw new Error("Cannot invoke handleBatchSync() on an asynchronous handler");for(const n of t)this.handleSync(n)}}function Iw(e){return(t=class{},...n)=>e(t,...n)}const _Z=Iw(e=>class extends e{constructor(){super(...arguments),this.level="debug"}isHandling(n){return Nu[n]<=Nu[this.level]}});class PZ extends _Z(TZ){constructor({level:t="debug",bubble:n=!0}={}){super(),this.bubble=!0,this.level=t,this.bubble=n}}const OZ=Iw(e=>class extends e{constructor(...n){if(super(...n),!iy(this))throw new Error("Cannot use MirrorSyncHandlerMixin on an async handler")}handle(n){return Promise.resolve(this.handleSync(n))}handleBatch(n){return Promise.resolve(this.handleBatchSync(n))}});function Vx(e){return typeof e=="object"&&e!==null&&typeof e.reset=="function"}const MZ=Iw(e=>class extends e{constructor(){super(...arguments),this._processors=new Set}get processors(){return this._processors}processRecord(n){if(this._processors.size>0)for(const r of this._processors)typeof r=="function"?n=r(n):n=r.process(n);return n}resetProcessors(){for(const n of this._processors)Vx(n)&&n.reset()}reset(){this.resetProcessors()}});function Y7(e){if(e==null)return!0;if(typeof e=="string"||Array.isArray(e))return e.length===0;if(typeof e=="object"){const t=Object.getPrototypeOf(e);return(t===Object.prototype||t===null)&&Object.keys(e).length===0}return!1}function RZ(e){return e===null||["undefined","string","number","boolean","symbol","bigint"].includes(typeof e)}function tD(e){return e===null?"null":Array.isArray(e)?"array":typeof e}class DZ extends OZ(MZ(PZ)){constructor({useNativeDebug:t=!1,timestamps:n=!1,console:r=self.console,...i}={}){super(i),this.console=r,this.timestamps=n,this.useNativeDebug=t}formatDatetime(t){return["color: #888",t.toFormat("HH:mm:ss.SSS")]}formatLevel(t){const n=t.toUpperCase();let r;switch(t){case"emergency":r="background-color: #f43a63; padding: 0 0.4em; color: #fff";break;case"alert":r="background-color: #f43a63; padding: 0 0.4em; color: #fff";break;case"critical":r="color: #f43a63";break;case"error":r="color: #f43a63";break;case"warning":r="color: #ffaa2b";break;case"notice":r="color: rgb(60, 161, 224)";break;case"info":r="color: rgb(60, 161, 224)";break;case"debug":default:r="color: rgba(60, 161, 224, 0.7)";break}return[r,n]}handleSync(t){if(!this.isHandling(t.level))return;const n="color: inherit; background-color: inherit",r=[t.message],i=!Y7(t.extra);(i||!Y7(t.context))&&r.push(t.context),i&&r.push(t.extra);const o=this.timestamps?this.formatDatetime(t.datetime).concat(n):[],a=this.formatLevel(t.level).concat(n);let s=["%c%s"];return this.timestamps&&s.push("%c%s"),s=s.map(l=>`${l}%c`),t.severity<=Nu.error?this.console.error(s.join(" "),...o,...a,...r):t.severity===Nu.warning?this.console.warn(s.join(" "),...o,...a,...r):t.severity<=Nu.info?this.console.info(s.join(" "),...o,...a,...r):this.useNativeDebug?(s.pop(),this.console.debug(s.join(" "),...o,...r)):this.console.log(s.join(" "),...o,...a,...r),!this.bubble}}const Wx=typeof process!="undefined"&&typeof process.release=="object"&&process.release.name==="node",X7=typeof self=="object"&&self!==null&&self.self===self&&typeof self.navigator=="object";Wx&&require("os").EOL;function AZ(e){return typeof e=="object"&&e!==null&&typeof e.close=="function"}class nD extends Set{some(t){for(const n of this)if(t(n))return!0;return!1}every(t){for(const n of this)if(!t(n))return!1;return!0}}class yc extends Error{}class LZ extends yc{constructor(t){super(`Invalid DateTime: ${t.toMessage()}`)}}class BZ extends yc{constructor(t){super(`Invalid Interval: ${t.toMessage()}`)}}class $Z extends yc{constructor(t){super(`Invalid Duration: ${t.toMessage()}`)}}class $f extends yc{}class rD extends yc{constructor(t){super(`Invalid unit ${t}`)}}class ki extends yc{}class Za extends yc{constructor(){super("Zone is an abstract class")}}const fe="numeric",mo="short",ri="long",qg={year:fe,month:fe,day:fe},Tw={year:fe,month:mo,day:fe},iD={year:fe,month:mo,day:fe,weekday:mo},_w={year:fe,month:ri,day:fe},Pw={year:fe,month:ri,day:fe,weekday:ri},Ow={hour:fe,minute:fe},Mw={hour:fe,minute:fe,second:fe},Rw={hour:fe,minute:fe,second:fe,timeZoneName:mo},Dw={hour:fe,minute:fe,second:fe,timeZoneName:ri},Aw={hour:fe,minute:fe,hour12:!1},Lw={hour:fe,minute:fe,second:fe,hour12:!1},Bw={hour:fe,minute:fe,second:fe,hour12:!1,timeZoneName:mo},$w={hour:fe,minute:fe,second:fe,hour12:!1,timeZoneName:ri},Fw={year:fe,month:fe,day:fe,hour:fe,minute:fe},Nw={year:fe,month:fe,day:fe,hour:fe,minute:fe,second:fe},zw={year:fe,month:mo,day:fe,hour:fe,minute:fe},jw={year:fe,month:mo,day:fe,hour:fe,minute:fe,second:fe},oD={year:fe,month:mo,day:fe,weekday:mo,hour:fe,minute:fe},Hw={year:fe,month:ri,day:fe,hour:fe,minute:fe,timeZoneName:mo},Vw={year:fe,month:ri,day:fe,hour:fe,minute:fe,second:fe,timeZoneName:mo},Ww={year:fe,month:ri,day:fe,weekday:ri,hour:fe,minute:fe,timeZoneName:ri},Uw={year:fe,month:ri,day:fe,weekday:ri,hour:fe,minute:fe,second:fe,timeZoneName:ri};function qe(e){return typeof e=="undefined"}function ac(e){return typeof e=="number"}function oy(e){return typeof e=="number"&&e%1===0}function FZ(e){return typeof e=="string"}function NZ(e){return Object.prototype.toString.call(e)==="[object Date]"}function na(){try{return typeof Intl!="undefined"&&Intl.DateTimeFormat}catch{return!1}}function $h(){return!qe(Intl.DateTimeFormat.prototype.formatToParts)}function aD(){try{return typeof Intl!="undefined"&&!!Intl.RelativeTimeFormat}catch{return!1}}function zZ(e){return Array.isArray(e)?e:[e]}function Z7(e,t,n){if(e.length!==0)return e.reduce((r,i)=>{const o=[t(i),i];return r&&n(r[0],o[0])===r[0]?r:o},null)[1]}function sD(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function dd(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Sa(e,t,n){return oy(e)&&e>=t&&e<=n}function jZ(e,t){return e-t*Math.floor(e/t)}function hu(e,t=2){const n=e<0?"-":"",r=n?e*-1:e;let i;return r.toString().length<t?i=("0".repeat(t)+r).slice(-t):i=r.toString(),`${n}${i}`}function xr(e){if(!(qe(e)||e===null||e===""))return parseInt(e,10)}function Gw(e){if(!(qe(e)||e===null||e==="")){const t=parseFloat("0."+e)*1e3;return Math.floor(t)}}function Kw(e,t,n=!1){const r=10**t;return(n?Math.trunc:Math.round)(e*r)/r}function Fh(e){return e%4===0&&(e%100!==0||e%400===0)}function tp(e){return Fh(e)?366:365}function Yg(e,t){const n=jZ(t-1,12)+1,r=e+(t-n)/12;return n===2?Fh(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function qw(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(t.getUTCFullYear()-1900)),+t}function Xg(e){const t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,r=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return t===4||r===3?53:52}function Ux(e){return e>99?e:e>60?1900+e:2e3+e}function lD(e,t,n,r=null){const i=new Date(e),o={hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(o.timeZone=r);const a=Object.assign({timeZoneName:t},o),s=na();if(s&&$h()){const l=new Intl.DateTimeFormat(n,a).formatToParts(i).find(c=>c.type.toLowerCase()==="timezonename");return l?l.value:null}else if(s){const l=new Intl.DateTimeFormat(n,o).format(i);return new Intl.DateTimeFormat(n,a).format(i).substring(l.length).replace(/^[, \u200e]+/,"")}else return null}function ay(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function cD(e){const t=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(t))throw new ki(`Invalid unit value ${e}`);return t}function Zg(e,t,n){const r={};for(const i in e)if(dd(e,i)){if(n.indexOf(i)>=0)continue;const o=e[i];if(o==null)continue;r[t(i)]=cD(o)}return r}function Qg(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return`${i}${hu(n,2)}:${hu(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${hu(n,2)}${hu(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function sy(e){return sD(e,["hour","minute","second","millisecond"])}const uD=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function jt(e){return JSON.stringify(e,Object.keys(e).sort())}const HZ=["January","February","March","April","May","June","July","August","September","October","November","December"],dD=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],VZ=["J","F","M","A","M","J","J","A","S","O","N","D"];function fD(e){switch(e){case"narrow":return[...VZ];case"short":return[...dD];case"long":return[...HZ];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const pD=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],hD=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],WZ=["M","T","W","T","F","S","S"];function mD(e){switch(e){case"narrow":return[...WZ];case"short":return[...hD];case"long":return[...pD];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const gD=["AM","PM"],UZ=["Before Christ","Anno Domini"],GZ=["BC","AD"],KZ=["B","A"];function vD(e){switch(e){case"narrow":return[...KZ];case"short":return[...GZ];case"long":return[...UZ];default:return null}}function qZ(e){return gD[e.hour<12?0:1]}function YZ(e,t){return mD(t)[e.weekday-1]}function XZ(e,t){return fD(t)[e.month-1]}function ZZ(e,t){return vD(t)[e.year<0?0:1]}function QZ(e,t,n="always",r=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(e)===-1;if(n==="auto"&&o){const d=e==="days";switch(t){case 1:return d?"tomorrow":`next ${i[e][0]}`;case-1:return d?"yesterday":`last ${i[e][0]}`;case 0:return d?"today":`this ${i[e][0]}`}}const a=Object.is(t,-0)||t<0,s=Math.abs(t),l=s===1,c=i[e],u=r?l?c[1]:c[2]||c[1]:l?i[e][0]:e;return a?`${s} ${u} ago`:`in ${s} ${u}`}function JZ(e){const t=sD(e,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]),n=jt(t),r="EEEE, LLLL d, yyyy, h:mm a";switch(n){case jt(qg):return"M/d/yyyy";case jt(Tw):return"LLL d, yyyy";case jt(iD):return"EEE, LLL d, yyyy";case jt(_w):return"LLLL d, yyyy";case jt(Pw):return"EEEE, LLLL d, yyyy";case jt(Ow):return"h:mm a";case jt(Mw):return"h:mm:ss a";case jt(Rw):return"h:mm a";case jt(Dw):return"h:mm a";case jt(Aw):return"HH:mm";case jt(Lw):return"HH:mm:ss";case jt(Bw):return"HH:mm";case jt($w):return"HH:mm";case jt(Fw):return"M/d/yyyy, h:mm a";case jt(zw):return"LLL d, yyyy, h:mm a";case jt(Hw):return"LLLL d, yyyy, h:mm a";case jt(Ww):return r;case jt(Nw):return"M/d/yyyy, h:mm:ss a";case jt(jw):return"LLL d, yyyy, h:mm:ss a";case jt(oD):return"EEE, d LLL yyyy, h:mm a";case jt(Vw):return"LLLL d, yyyy, h:mm:ss a";case jt(Uw):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return r}}function Q7(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const eQ={D:qg,DD:Tw,DDD:_w,DDDD:Pw,t:Ow,tt:Mw,ttt:Rw,tttt:Dw,T:Aw,TT:Lw,TTT:Bw,TTTT:$w,f:Fw,ff:zw,fff:Hw,ffff:Ww,F:Nw,FF:jw,FFF:Vw,FFFF:Uw};class wr{static create(t,n={}){return new wr(t,n)}static parseFormat(t){let n=null,r="",i=!1;const o=[];for(let a=0;a<t.length;a++){const s=t.charAt(a);s==="'"?(r.length>0&&o.push({literal:i,val:r}),n=null,r="",i=!i):i||s===n?r+=s:(r.length>0&&o.push({literal:!1,val:r}),r=s,n=s)}return r.length>0&&o.push({literal:i,val:r}),o}static macroTokenToFormatOpts(t){return eQ[t]}constructor(t,n){this.opts=n,this.loc=t,this.systemLoc=null}formatWithSystemDefault(t,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,Object.assign({},this.opts,n)).format()}formatDateTime(t,n={}){return this.loc.dtFormatter(t,Object.assign({},this.opts,n)).format()}formatDateTimeParts(t,n={}){return this.loc.dtFormatter(t,Object.assign({},this.opts,n)).formatToParts()}resolvedOptions(t,n={}){return this.loc.dtFormatter(t,Object.assign({},this.opts,n)).resolvedOptions()}num(t,n=0){if(this.opts.forceSimple)return hu(t,n);const r=Object.assign({},this.opts);return n>0&&(r.padTo=n),this.loc.numberFormatter(r).format(t)}formatDateTimeFromString(t,n){const r=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory"&&$h(),o=(p,m)=>this.loc.extract(t,p,m),a=p=>t.isOffsetFixed&&t.offset===0&&p.allowZ?"Z":t.isValid?t.zone.formatOffset(t.ts,p.format):"",s=()=>r?qZ(t):o({hour:"numeric",hour12:!0},"dayperiod"),l=(p,m)=>r?XZ(t,p):o(m?{month:p}:{month:p,day:"numeric"},"month"),c=(p,m)=>r?YZ(t,p):o(m?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),u=p=>{const m=wr.macroTokenToFormatOpts(p);return m?this.formatWithSystemDefault(t,m):p},d=p=>r?ZZ(t,p):o({era:p},"era"),f=p=>{switch(p){case"S":return this.num(t.millisecond);case"u":case"SSS":return this.num(t.millisecond,3);case"s":return this.num(t.second);case"ss":return this.num(t.second,2);case"m":return this.num(t.minute);case"mm":return this.num(t.minute,2);case"h":return this.num(t.hour%12===0?12:t.hour%12);case"hh":return this.num(t.hour%12===0?12:t.hour%12,2);case"H":return this.num(t.hour);case"HH":return this.num(t.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return t.zone.offsetName(t.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return t.zone.offsetName(t.ts,{format:"long",locale:this.loc.locale});case"z":return t.zoneName;case"a":return s();case"d":return i?o({day:"numeric"},"day"):this.num(t.day);case"dd":return i?o({day:"2-digit"},"day"):this.num(t.day,2);case"c":return this.num(t.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(t.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return i?o({month:"numeric",day:"numeric"},"month"):this.num(t.month);case"LL":return i?o({month:"2-digit",day:"numeric"},"month"):this.num(t.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return i?o({month:"numeric"},"month"):this.num(t.month);case"MM":return i?o({month:"2-digit"},"month"):this.num(t.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return i?o({year:"numeric"},"year"):this.num(t.year);case"yy":return i?o({year:"2-digit"},"year"):this.num(t.year.toString().slice(-2),2);case"yyyy":return i?o({year:"numeric"},"year"):this.num(t.year,4);case"yyyyyy":return i?o({year:"numeric"},"year"):this.num(t.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(t.weekYear.toString().slice(-2),2);case"kkkk":return this.num(t.weekYear,4);case"W":return this.num(t.weekNumber);case"WW":return this.num(t.weekNumber,2);case"o":return this.num(t.ordinal);case"ooo":return this.num(t.ordinal,3);case"q":return this.num(t.quarter);case"qq":return this.num(t.quarter,2);case"X":return this.num(Math.floor(t.ts/1e3));case"x":return this.num(t.ts);default:return u(p)}};return Q7(wr.parseFormat(n),f)}formatDurationFromString(t,n){const r=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},i=l=>c=>{const u=r(c);return u?this.num(l.get(u),c.length):c},o=wr.parseFormat(n),a=o.reduce((l,{literal:c,val:u})=>c?l:l.concat(u),[]),s=t.shiftTo(...a.map(r).filter(l=>l));return Q7(o,i(s))}}class lo{constructor(t,n){this.reason=t,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Nh{get type(){throw new Za}get name(){throw new Za}get universal(){throw new Za}offsetName(t,n){throw new Za}formatOffset(t,n){throw new Za}offset(t){throw new Za}equals(t){throw new Za}get isValid(){throw new Za}}let fb=null;class Yw extends Nh{static get instance(){return fb===null&&(fb=new Yw),fb}get type(){return"local"}get name(){return na()?new Intl.DateTimeFormat().resolvedOptions().timeZone:"local"}get universal(){return!1}offsetName(t,{format:n,locale:r}){return lD(t,n,r)}formatOffset(t,n){return Qg(this.offset(t),n)}offset(t){return-new Date(t).getTimezoneOffset()}equals(t){return t.type==="local"}get isValid(){return!0}}const tQ=RegExp(`^${uD.source}$`);let Qm={};function nQ(e){return Qm[e]||(Qm[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Qm[e]}const rQ={year:0,month:1,day:2,hour:3,minute:4,second:5};function iQ(e,t){const n=e.format(t).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(n),[,i,o,a,s,l,c]=r;return[a,i,o,s,l,c]}function oQ(e,t){const n=e.formatToParts(t),r=[];for(let i=0;i<n.length;i++){const{type:o,value:a}=n[i],s=rQ[o];qe(s)||(r[s]=parseInt(a,10))}return r}let A1={};class ii extends Nh{static create(t){return A1[t]||(A1[t]=new ii(t)),A1[t]}static resetCache(){A1={},Qm={}}static isValidSpecifier(t){return!!(t&&t.match(tQ))}static isValidZone(t){try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch{return!1}}static parseGMTOffset(t){if(t){const n=t.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);if(n)return-60*parseInt(n[1])}return null}constructor(t){super(),this.zoneName=t,this.valid=ii.isValidZone(t)}get type(){return"iana"}get name(){return this.zoneName}get universal(){return!1}offsetName(t,{format:n,locale:r}){return lD(t,n,r,this.name)}formatOffset(t,n){return Qg(this.offset(t),n)}offset(t){const n=new Date(t);if(isNaN(n))return NaN;const r=nQ(this.name),[i,o,a,s,l,c]=r.formatToParts?oQ(r,n):iQ(r,n),d=qw({year:i,month:o,day:a,hour:s===24?0:s,minute:l,second:c,millisecond:0});let f=+n;const p=f%1e3;return f-=p>=0?p:1e3+p,(d-f)/(60*1e3)}equals(t){return t.type==="iana"&&t.name===this.name}get isValid(){return this.valid}}let pb=null;class Yn extends Nh{static get utcInstance(){return pb===null&&(pb=new Yn(0)),pb}static instance(t){return t===0?Yn.utcInstance:new Yn(t)}static parseSpecifier(t){if(t){const n=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Yn(ay(n[1],n[2]))}return null}constructor(t){super(),this.fixed=t}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Qg(this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(t,n){return Qg(this.fixed,n)}get universal(){return!0}offset(){return this.fixed}equals(t){return t.type==="fixed"&&t.fixed===this.fixed}get isValid(){return!0}}class J7 extends Nh{constructor(t){super(),this.zoneName=t}get type(){return"invalid"}get name(){return this.zoneName}get universal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Rl(e,t){let n;if(qe(e)||e===null)return t;if(e instanceof Nh)return e;if(FZ(e)){const r=e.toLowerCase();return r==="local"?t:r==="utc"||r==="gmt"?Yn.utcInstance:(n=ii.parseGMTOffset(e))!=null?Yn.instance(n):ii.isValidSpecifier(r)?ii.create(e):Yn.parseSpecifier(r)||new J7(e)}else return ac(e)?Yn.instance(e):typeof e=="object"&&e.offset&&typeof e.offset=="number"?e:new J7(e)}let ek=()=>Date.now(),hb=null,tk=null,nk=null,rk=null,ik=!1;class Vt{static get now(){return ek}static set now(t){ek=t}static get defaultZoneName(){return Vt.defaultZone.name}static set defaultZoneName(t){t?hb=Rl(t):hb=null}static get defaultZone(){return hb||Yw.instance}static get defaultLocale(){return tk}static set defaultLocale(t){tk=t}static get defaultNumberingSystem(){return nk}static set defaultNumberingSystem(t){nk=t}static get defaultOutputCalendar(){return rk}static set defaultOutputCalendar(t){rk=t}static get throwOnInvalid(){return ik}static set throwOnInvalid(t){ik=t}static resetCaches(){Gt.resetCache(),ii.resetCache()}}let Gx={};function Kx(e,t={}){const n=JSON.stringify([e,t]);let r=Gx[n];return r||(r=new Intl.DateTimeFormat(e,t),Gx[n]=r),r}let qx={};function aQ(e,t={}){const n=JSON.stringify([e,t]);let r=qx[n];return r||(r=new Intl.NumberFormat(e,t),qx[n]=r),r}let Yx={};function sQ(e,t={}){const{base:n,...r}=t,i=JSON.stringify([e,r]);let o=Yx[i];return o||(o=new Intl.RelativeTimeFormat(e,t),Yx[i]=o),o}let Cl=null;function lQ(){if(Cl)return Cl;if(na()){const e=new Intl.DateTimeFormat().resolvedOptions().locale;return Cl=!e||e==="und"?"en-US":e,Cl}else return Cl="en-US",Cl}function cQ(e){const t=e.indexOf("-u-");if(t===-1)return[e];{let n;const r=e.substring(0,t);try{n=Kx(e).resolvedOptions()}catch{n=Kx(r).resolvedOptions()}const{numberingSystem:i,calendar:o}=n;return[r,i,o]}}function uQ(e,t,n){return na()?((n||t)&&(e+="-u",n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`)),e):[]}function dQ(e){const t=[];for(let n=1;n<=12;n++){const r=Be.utc(2016,n,1);t.push(e(r))}return t}function fQ(e){const t=[];for(let n=1;n<=7;n++){const r=Be.utc(2016,11,13+n);t.push(e(r))}return t}function L1(e,t,n,r,i){const o=e.listingMode(n);return o==="error"?null:o==="en"?r(t):i(t)}function pQ(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||na()&&new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class hQ{constructor(t,n,r){if(this.padTo=r.padTo||0,this.floor=r.floor||!1,!n&&na()){const i={useGrouping:!1};r.padTo>0&&(i.minimumIntegerDigits=r.padTo),this.inf=aQ(t,i)}}format(t){if(this.inf){const n=this.floor?Math.floor(t):t;return this.inf.format(n)}else{const n=this.floor?Math.floor(t):Kw(t,3);return hu(n,this.padTo)}}}class mQ{constructor(t,n,r){this.opts=r,this.hasIntl=na();let i;if(t.zone.universal&&this.hasIntl){const o=-1*(t.offset/60),a=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`,s=ii.isValidZone(a);t.offset!==0&&s?(i=a,this.dt=t):(i="UTC",r.timeZoneName?this.dt=t:this.dt=t.offset===0?t:Be.fromMillis(t.ts+t.offset*60*1e3))}else t.zone.type==="local"?this.dt=t:(this.dt=t,i=t.zone.name);if(this.hasIntl){const o=Object.assign({},this.opts);i&&(o.timeZone=i),this.dtf=Kx(n,o)}}format(){if(this.hasIntl)return this.dtf.format(this.dt.toJSDate());{const t=JZ(this.opts),n=Gt.create("en-US");return wr.create(n).formatDateTimeFromString(this.dt,t)}}formatToParts(){return this.hasIntl&&$h()?this.dtf.formatToParts(this.dt.toJSDate()):[]}resolvedOptions(){return this.hasIntl?this.dtf.resolvedOptions():{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"}}}class gQ{constructor(t,n,r){this.opts=Object.assign({style:"long"},r),!n&&aD()&&(this.rtf=sQ(t,r))}format(t,n){return this.rtf?this.rtf.format(t,n):QZ(n,t,this.opts.numeric,this.opts.style!=="long")}formatToParts(t,n){return this.rtf?this.rtf.formatToParts(t,n):[]}}class Gt{static fromOpts(t){return Gt.create(t.locale,t.numberingSystem,t.outputCalendar,t.defaultToEN)}static create(t,n,r,i=!1){const o=t||Vt.defaultLocale,a=o||(i?"en-US":lQ()),s=n||Vt.defaultNumberingSystem,l=r||Vt.defaultOutputCalendar;return new Gt(a,s,l,o)}static resetCache(){Cl=null,Gx={},qx={},Yx={}}static fromObject({locale:t,numberingSystem:n,outputCalendar:r}={}){return Gt.create(t,n,r)}constructor(t,n,r,i){const[o,a,s]=cQ(t);this.locale=o,this.numberingSystem=n||a||null,this.outputCalendar=r||s||null,this.intl=uQ(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=pQ(this)),this.fastNumbersCached}listingMode(t=!0){const n=na(),r=n&&$h(),i=this.isEnglish(),o=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return!r&&!(i&&o)&&!t?"error":!r||i&&o?"en":"intl"}clone(t){return!t||Object.getOwnPropertyNames(t).length===0?this:Gt.create(t.locale||this.specifiedLocale,t.numberingSystem||this.numberingSystem,t.outputCalendar||this.outputCalendar,t.defaultToEN||!1)}redefaultToEN(t={}){return this.clone(Object.assign({},t,{defaultToEN:!0}))}redefaultToSystem(t={}){return this.clone(Object.assign({},t,{defaultToEN:!1}))}months(t,n=!1,r=!0){return L1(this,t,r,fD,()=>{const i=n?{month:t,day:"numeric"}:{month:t},o=n?"format":"standalone";return this.monthsCache[o][t]||(this.monthsCache[o][t]=dQ(a=>this.extract(a,i,"month"))),this.monthsCache[o][t]})}weekdays(t,n=!1,r=!0){return L1(this,t,r,mD,()=>{const i=n?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},o=n?"format":"standalone";return this.weekdaysCache[o][t]||(this.weekdaysCache[o][t]=fQ(a=>this.extract(a,i,"weekday"))),this.weekdaysCache[o][t]})}meridiems(t=!0){return L1(this,void 0,t,()=>gD,()=>{if(!this.meridiemCache){const n={hour:"numeric",hour12:!0};this.meridiemCache=[Be.utc(2016,11,13,9),Be.utc(2016,11,13,19)].map(r=>this.extract(r,n,"dayperiod"))}return this.meridiemCache})}eras(t,n=!0){return L1(this,t,n,vD,()=>{const r={era:t};return this.eraCache[t]||(this.eraCache[t]=[Be.utc(-40,1,1),Be.utc(2017,1,1)].map(i=>this.extract(i,r,"era"))),this.eraCache[t]})}extract(t,n,r){const i=this.dtFormatter(t,n),o=i.formatToParts(),a=o.find(s=>s.type.toLowerCase()===r);return a?a.value:null}numberFormatter(t={}){return new hQ(this.intl,t.forceSimple||this.fastNumbers,t)}dtFormatter(t,n={}){return new mQ(t,this.intl,n)}relFormatter(t={}){return new gQ(this.intl,this.isEnglish(),t)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||na()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar}}function $d(...e){const t=e.reduce((n,r)=>n+r.source,"");return RegExp(`^${t}$`)}function bc(...e){return t=>e.reduce(([n,r,i],o)=>{const[a,s,l]=o(t,i);return[Object.assign(n,a),r||s,l]},[{},null,1]).slice(0,2)}function Fd(e,...t){if(e==null)return[null,null];for(const[n,r]of t){const i=n.exec(e);if(i)return r(i)}return[null,null]}function yD(...e){return(t,n)=>{const r={};let i;for(i=0;i<e.length;i++)r[e[i]]=xr(t[n+i]);return[r,null,n+i]}}const bD=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,Xw=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,xD=RegExp(`${Xw.source}${bD.source}?`),Zw=RegExp(`(?:T${xD.source})?`),vQ=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,yQ=/(\d{4})-?W(\d\d)(?:-?(\d))?/,bQ=/(\d{4})-?(\d{3})/,xQ=yD("weekYear","weekNumber","weekDay"),SQ=yD("year","ordinal"),wQ=/(\d{4})-(\d\d)-(\d\d)/,SD=RegExp(`${Xw.source} ?(?:${bD.source}|(${uD.source}))?`),CQ=RegExp(`(?: ${SD.source})?`);function zu(e,t,n){const r=e[t];return qe(r)?n:xr(r)}function wD(e,t){return[{year:zu(e,t),month:zu(e,t+1,1),day:zu(e,t+2,1)},null,t+3]}function xc(e,t){return[{hours:zu(e,t,0),minutes:zu(e,t+1,0),seconds:zu(e,t+2,0),milliseconds:Gw(e[t+3])},null,t+4]}function Nd(e,t){const n=!e[t]&&!e[t+1],r=ay(e[t+1],e[t+2]),i=n?null:Yn.instance(r);return[{},i,t+3]}function CD(e,t){const n=e[t]?ii.create(e[t]):null;return[{},n,t+1]}const kQ=RegExp(`^T?${Xw.source}$`),EQ=/^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function IQ(e){const[t,n,r,i,o,a,s,l,c]=e,u=t[0]==="-",d=l&&l[0]==="-",f=(p,m=!1)=>p!==void 0&&(m||p&&u)?-p:p;return[{years:f(xr(n)),months:f(xr(r)),weeks:f(xr(i)),days:f(xr(o)),hours:f(xr(a)),minutes:f(xr(s)),seconds:f(xr(l),l==="-0"),milliseconds:f(Gw(c),d)}]}const TQ={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Qw(e,t,n,r,i,o,a){const s={year:t.length===2?Ux(xr(t)):xr(t),month:dD.indexOf(n)+1,day:xr(r),hour:xr(i),minute:xr(o)};return a&&(s.second=xr(a)),e&&(s.weekday=e.length>3?pD.indexOf(e)+1:hD.indexOf(e)+1),s}const _Q=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function PQ(e){const[,t,n,r,i,o,a,s,l,c,u,d]=e,f=Qw(t,i,r,n,o,a,s);let p;return l?p=TQ[l]:c?p=0:p=ay(u,d),[f,new Yn(p)]}function OQ(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const MQ=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,RQ=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,DQ=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function ok(e){const[,t,n,r,i,o,a,s]=e;return[Qw(t,i,r,n,o,a,s),Yn.utcInstance]}function AQ(e){const[,t,n,r,i,o,a,s]=e;return[Qw(t,s,n,r,i,o,a),Yn.utcInstance]}const LQ=$d(vQ,Zw),BQ=$d(yQ,Zw),$Q=$d(bQ,Zw),FQ=$d(xD),NQ=bc(wD,xc,Nd),zQ=bc(xQ,xc,Nd),jQ=bc(SQ,xc,Nd),HQ=bc(xc,Nd);function VQ(e){return Fd(e,[LQ,NQ],[BQ,zQ],[$Q,jQ],[FQ,HQ])}function WQ(e){return Fd(OQ(e),[_Q,PQ])}function UQ(e){return Fd(e,[MQ,ok],[RQ,ok],[DQ,AQ])}function GQ(e){return Fd(e,[EQ,IQ])}const KQ=bc(xc);function qQ(e){return Fd(e,[kQ,KQ])}const YQ=$d(wQ,CQ),XQ=$d(SD),ZQ=bc(wD,xc,Nd,CD),QQ=bc(xc,Nd,CD);function JQ(e){return Fd(e,[YQ,ZQ],[XQ,QQ])}const eJ="Invalid Duration",kD={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},tJ=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3}},kD),bi=146097/400,Hc=146097/4800,nJ=Object.assign({years:{quarters:4,months:12,weeks:bi/7,days:bi,hours:bi*24,minutes:bi*24*60,seconds:bi*24*60*60,milliseconds:bi*24*60*60*1e3},quarters:{months:3,weeks:bi/28,days:bi/4,hours:bi*24/4,minutes:bi*24*60/4,seconds:bi*24*60*60/4,milliseconds:bi*24*60*60*1e3/4},months:{weeks:Hc/7,days:Hc,hours:Hc*24,minutes:Hc*24*60,seconds:Hc*24*60*60,milliseconds:Hc*24*60*60*1e3}},kD),au=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],rJ=au.slice(0).reverse();function yl(e,t,n=!1){const r={values:n?t.values:Object.assign({},e.values,t.values||{}),loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy};return new bt(r)}function iJ(e){return e<0?Math.floor(e):Math.ceil(e)}function ED(e,t,n,r,i){const o=e[i][n],a=t[n]/o,s=Math.sign(a)===Math.sign(r[i]),l=!s&&r[i]!==0&&Math.abs(a)<=1?iJ(a):Math.trunc(a);r[i]+=l,t[n]-=l*o}function oJ(e,t){rJ.reduce((n,r)=>qe(t[r])?n:(n&&ED(e,t,n,t,r),r),null)}class bt{constructor(t){const n=t.conversionAccuracy==="longterm"||!1;this.values=t.values,this.loc=t.loc||Gt.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=n?nJ:tJ,this.isLuxonDuration=!0}static fromMillis(t,n){return bt.fromObject(Object.assign({milliseconds:t},n))}static fromObject(t){if(t==null||typeof t!="object")throw new ki(`Duration.fromObject: argument expected to be an object, got ${t===null?"null":typeof t}`);return new bt({values:Zg(t,bt.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:Gt.fromObject(t),conversionAccuracy:t.conversionAccuracy})}static fromISO(t,n){const[r]=GQ(t);if(r){const i=Object.assign(r,n);return bt.fromObject(i)}else return bt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static fromISOTime(t,n){const[r]=qQ(t);if(r){const i=Object.assign(r,n);return bt.fromObject(i)}else return bt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static invalid(t,n=null){if(!t)throw new ki("need to specify a reason the Duration is invalid");const r=t instanceof lo?t:new lo(t,n);if(Vt.throwOnInvalid)throw new $Z(r);return new bt({invalid:r})}static normalizeUnit(t){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t&&t.toLowerCase()];if(!n)throw new rD(t);return n}static isDuration(t){return t&&t.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(t,n={}){const r=Object.assign({},n,{floor:n.round!==!1&&n.floor!==!1});return this.isValid?wr.create(this.loc,r).formatDurationFromString(this,t):eJ}toObject(t={}){if(!this.isValid)return{};const n=Object.assign({},this.values);return t.includeConfig&&(n.conversionAccuracy=this.conversionAccuracy,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toISO(){if(!this.isValid)return null;let t="P";return this.years!==0&&(t+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(t+=this.months+this.quarters*3+"M"),this.weeks!==0&&(t+=this.weeks+"W"),this.days!==0&&(t+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(t+="T"),this.hours!==0&&(t+=this.hours+"H"),this.minutes!==0&&(t+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(t+=Kw(this.seconds+this.milliseconds/1e3,3)+"S"),t==="P"&&(t+="T0S"),t}toISOTime(t={}){if(!this.isValid)return null;const n=this.toMillis();if(n<0||n>=864e5)return null;t=Object.assign({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},t);const r=this.shiftTo("hours","minutes","seconds","milliseconds");let i=t.format==="basic"?"hhmm":"hh:mm";(!t.suppressSeconds||r.seconds!==0||r.milliseconds!==0)&&(i+=t.format==="basic"?"ss":":ss",(!t.suppressMilliseconds||r.milliseconds!==0)&&(i+=".SSS"));let o=r.toFormat(i);return t.includePrefix&&(o="T"+o),o}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(t){if(!this.isValid)return this;const n=Yl(t),r={};for(const i of au)(dd(n.values,i)||dd(this.values,i))&&(r[i]=n.get(i)+this.get(i));return yl(this,{values:r},!0)}minus(t){if(!this.isValid)return this;const n=Yl(t);return this.plus(n.negate())}mapUnits(t){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=cD(t(this.values[r],r));return yl(this,{values:n},!0)}get(t){return this[bt.normalizeUnit(t)]}set(t){if(!this.isValid)return this;const n=Object.assign(this.values,Zg(t,bt.normalizeUnit,[]));return yl(this,{values:n})}reconfigure({locale:t,numberingSystem:n,conversionAccuracy:r}={}){const i=this.loc.clone({locale:t,numberingSystem:n}),o={loc:i};return r&&(o.conversionAccuracy=r),yl(this,o)}as(t){return this.isValid?this.shiftTo(t).get(t):NaN}normalize(){if(!this.isValid)return this;const t=this.toObject();return oJ(this.matrix,t),yl(this,{values:t},!0)}shiftTo(...t){if(!this.isValid)return this;if(t.length===0)return this;t=t.map(a=>bt.normalizeUnit(a));const n={},r={},i=this.toObject();let o;for(const a of au)if(t.indexOf(a)>=0){o=a;let s=0;for(const c in r)s+=this.matrix[c][a]*r[c],r[c]=0;ac(i[a])&&(s+=i[a]);const l=Math.trunc(s);n[a]=l,r[a]=s-l;for(const c in i)au.indexOf(c)>au.indexOf(a)&&ED(this.matrix,i,c,n,a)}else ac(i[a])&&(r[a]=i[a]);for(const a in r)r[a]!==0&&(n[o]+=a===o?r[a]:r[a]/this.matrix[o][a]);return yl(this,{values:n},!0).normalize()}negate(){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=-this.values[n];return yl(this,{values:t},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(t){if(!this.isValid||!t.isValid||!this.loc.equals(t.loc))return!1;function n(r,i){return r===void 0||r===0?i===void 0||i===0:r===i}for(const r of au)if(!n(this.values[r],t.values[r]))return!1;return!0}}function Yl(e){if(ac(e))return bt.fromMillis(e);if(bt.isDuration(e))return e;if(typeof e=="object")return bt.fromObject(e);throw new ki(`Unknown duration argument ${e} of type ${typeof e}`)}const ff="Invalid Interval";function aJ(e,t){return!e||!e.isValid?Qt.invalid("missing or invalid start"):!t||!t.isValid?Qt.invalid("missing or invalid end"):t<e?Qt.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null}class Qt{constructor(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}static invalid(t,n=null){if(!t)throw new ki("need to specify a reason the Interval is invalid");const r=t instanceof lo?t:new lo(t,n);if(Vt.throwOnInvalid)throw new BZ(r);return new Qt({invalid:r})}static fromDateTimes(t,n){const r=mf(t),i=mf(n),o=aJ(r,i);return o==null?new Qt({start:r,end:i}):o}static after(t,n){const r=Yl(n),i=mf(t);return Qt.fromDateTimes(i,i.plus(r))}static before(t,n){const r=Yl(n),i=mf(t);return Qt.fromDateTimes(i.minus(r),i)}static fromISO(t,n){const[r,i]=(t||"").split("/",2);if(r&&i){let o,a;try{o=Be.fromISO(r,n),a=o.isValid}catch{a=!1}let s,l;try{s=Be.fromISO(i,n),l=s.isValid}catch{l=!1}if(a&&l)return Qt.fromDateTimes(o,s);if(a){const c=bt.fromISO(i,n);if(c.isValid)return Qt.after(o,c)}else if(l){const c=bt.fromISO(r,n);if(c.isValid)return Qt.before(s,c)}}return Qt.invalid("unparsable",`the input "${t}" can't be parsed as ISO 8601`)}static isInterval(t){return t&&t.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(t="milliseconds"){return this.isValid?this.toDuration(t).get(t):NaN}count(t="milliseconds"){if(!this.isValid)return NaN;const n=this.start.startOf(t),r=this.end.startOf(t);return Math.floor(r.diff(n,t).get(t))+1}hasSame(t){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,t):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(t){return this.isValid?this.s>t:!1}isBefore(t){return this.isValid?this.e<=t:!1}contains(t){return this.isValid?this.s<=t&&this.e>t:!1}set({start:t,end:n}={}){return this.isValid?Qt.fromDateTimes(t||this.s,n||this.e):this}splitAt(...t){if(!this.isValid)return[];const n=t.map(mf).filter(a=>this.contains(a)).sort(),r=[];let{s:i}=this,o=0;for(;i<this.e;){const a=n[o]||this.e,s=+a>+this.e?this.e:a;r.push(Qt.fromDateTimes(i,s)),i=s,o+=1}return r}splitBy(t){const n=Yl(t);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,i=1,o;const a=[];for(;r<this.e;){const s=this.start.plus(n.mapUnits(l=>l*i));o=+s>+this.e?this.e:s,a.push(Qt.fromDateTimes(r,o)),r=o,i+=1}return a}divideEqually(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]}overlaps(t){return this.e>t.s&&this.s<t.e}abutsStart(t){return this.isValid?+this.e==+t.s:!1}abutsEnd(t){return this.isValid?+t.e==+this.s:!1}engulfs(t){return this.isValid?this.s<=t.s&&this.e>=t.e:!1}equals(t){return!this.isValid||!t.isValid?!1:this.s.equals(t.s)&&this.e.equals(t.e)}intersection(t){if(!this.isValid)return this;const n=this.s>t.s?this.s:t.s,r=this.e<t.e?this.e:t.e;return n>=r?null:Qt.fromDateTimes(n,r)}union(t){if(!this.isValid)return this;const n=this.s<t.s?this.s:t.s,r=this.e>t.e?this.e:t.e;return Qt.fromDateTimes(n,r)}static merge(t){const[n,r]=t.sort((i,o)=>i.s-o.s).reduce(([i,o],a)=>o?o.overlaps(a)||o.abutsStart(a)?[i,o.union(a)]:[i.concat([o]),a]:[i,a],[[],null]);return r&&n.push(r),n}static xor(t){let n=null,r=0;const i=[],o=t.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),a=Array.prototype.concat(...o),s=a.sort((l,c)=>l.time-c.time);for(const l of s)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&i.push(Qt.fromDateTimes(n,l.time)),n=null);return Qt.merge(i)}difference(...t){return Qt.xor([this].concat(t)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:ff}toISO(t){return this.isValid?`${this.s.toISO(t)}/${this.e.toISO(t)}`:ff}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:ff}toISOTime(t){return this.isValid?`${this.s.toISOTime(t)}/${this.e.toISOTime(t)}`:ff}toFormat(t,{separator:n=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(t)}${n}${this.e.toFormat(t)}`:ff}toDuration(t,n){return this.isValid?this.e.diff(this.s,t,n):bt.invalid(this.invalidReason)}mapEndpoints(t){return Qt.fromDateTimes(t(this.s),t(this.e))}}class B1{static hasDST(t=Vt.defaultZone){const n=Be.now().setZone(t).set({month:12});return!t.universal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(t){return ii.isValidSpecifier(t)&&ii.isValidZone(t)}static normalizeZone(t){return Rl(t,Vt.defaultZone)}static months(t="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||Gt.create(n,r,o)).months(t)}static monthsFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||Gt.create(n,r,o)).months(t,!0)}static weekdays(t="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||Gt.create(n,r,null)).weekdays(t)}static weekdaysFormat(t="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||Gt.create(n,r,null)).weekdays(t,!0)}static meridiems({locale:t=null}={}){return Gt.create(t).meridiems()}static eras(t="short",{locale:n=null}={}){return Gt.create(n,null,"gregory").eras(t)}static features(){let t=!1,n=!1,r=!1,i=!1;if(na()){t=!0,n=$h(),i=aD();try{r=new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone==="America/New_York"}catch{r=!1}}return{intl:t,intlTokens:n,zones:r,relative:i}}}function ak(e,t){const n=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(bt.fromMillis(r).as("days"))}function sJ(e,t,n){const r=[["years",(s,l)=>l.year-s.year],["quarters",(s,l)=>l.quarter-s.quarter],["months",(s,l)=>l.month-s.month+(l.year-s.year)*12],["weeks",(s,l)=>{const c=ak(s,l);return(c-c%7)/7}],["days",ak]],i={};let o,a;for(const[s,l]of r)if(n.indexOf(s)>=0){o=s;let c=l(e,t);a=e.plus({[s]:c}),a>t?(e=e.plus({[s]:c-1}),c-=1):e=a,i[s]=c}return[e,i,a,o]}function lJ(e,t,n,r){let[i,o,a,s]=sJ(e,t,n);const l=t-i,c=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);c.length===0&&(a<t&&(a=i.plus({[s]:1})),a!==i&&(o[s]=(o[s]||0)+l/(a-i)));const u=bt.fromObject(Object.assign(o,r));return c.length>0?bt.fromMillis(l,r).shiftTo(...c).plus(u):u}const Jw={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},sk={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},cJ=Jw.hanidec.replace(/[\[|\]]/g,"").split("");function uJ(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(e[n].search(Jw.hanidec)!==-1)t+=cJ.indexOf(e[n]);else for(const i in sk){const[o,a]=sk[i];r>=o&&r<=a&&(t+=r-o)}}return parseInt(t,10)}else return t}function Ki({numberingSystem:e},t=""){return new RegExp(`${Jw[e||"latn"]}${t}`)}const dJ="missing Intl.DateTimeFormat.formatToParts support";function it(e,t=n=>n){return{regex:e,deser:([n])=>t(uJ(n))}}const fJ=String.fromCharCode(160),ID=`( |${fJ})`,TD=new RegExp(ID,"g");function pJ(e){return e.replace(/\./g,"\\.?").replace(TD,ID)}function lk(e){return e.replace(/\./g,"").replace(TD," ").toLowerCase()}function qi(e,t){return e===null?null:{regex:RegExp(e.map(pJ).join("|")),deser:([n])=>e.findIndex(r=>lk(n)===lk(r))+t}}function ck(e,t){return{regex:e,deser:([,n,r])=>ay(n,r),groups:t}}function uk(e){return{regex:e,deser:([t])=>t}}function hJ(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function mJ(e,t){const n=Ki(t),r=Ki(t,"{2}"),i=Ki(t,"{3}"),o=Ki(t,"{4}"),a=Ki(t,"{6}"),s=Ki(t,"{1,2}"),l=Ki(t,"{1,3}"),c=Ki(t,"{1,6}"),u=Ki(t,"{1,9}"),d=Ki(t,"{2,4}"),f=Ki(t,"{4,6}"),p=y=>({regex:RegExp(hJ(y.val)),deser:([v])=>v,literal:!0}),g=(y=>{if(e.literal)return p(y);switch(y.val){case"G":return qi(t.eras("short",!1),0);case"GG":return qi(t.eras("long",!1),0);case"y":return it(c);case"yy":return it(d,Ux);case"yyyy":return it(o);case"yyyyy":return it(f);case"yyyyyy":return it(a);case"M":return it(s);case"MM":return it(r);case"MMM":return qi(t.months("short",!0,!1),1);case"MMMM":return qi(t.months("long",!0,!1),1);case"L":return it(s);case"LL":return it(r);case"LLL":return qi(t.months("short",!1,!1),1);case"LLLL":return qi(t.months("long",!1,!1),1);case"d":return it(s);case"dd":return it(r);case"o":return it(l);case"ooo":return it(i);case"HH":return it(r);case"H":return it(s);case"hh":return it(r);case"h":return it(s);case"mm":return it(r);case"m":return it(s);case"q":return it(s);case"qq":return it(r);case"s":return it(s);case"ss":return it(r);case"S":return it(l);case"SSS":return it(i);case"u":return uk(u);case"a":return qi(t.meridiems(),0);case"kkkk":return it(o);case"kk":return it(d,Ux);case"W":return it(s);case"WW":return it(r);case"E":case"c":return it(n);case"EEE":return qi(t.weekdays("short",!1,!1),1);case"EEEE":return qi(t.weekdays("long",!1,!1),1);case"ccc":return qi(t.weekdays("short",!0,!1),1);case"cccc":return qi(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return ck(new RegExp(`([+-]${s.source})(?::(${r.source}))?`),2);case"ZZZ":return ck(new RegExp(`([+-]${s.source})(${r.source})?`),2);case"z":return uk(/[a-z_+-/]{1,256}?/i);default:return p(y)}})(e)||{invalidReason:dJ};return g.token=e,g}const gJ={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function vJ(e,t,n){const{type:r,value:i}=e;if(r==="literal")return{literal:!0,val:i};const o=n[r];let a=gJ[r];if(typeof a=="object"&&(a=a[o]),a)return{literal:!1,val:a}}function yJ(e){return[`^${e.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,e]}function bJ(e,t,n){const r=e.match(t);if(r){const i={};let o=1;for(const a in n)if(dd(n,a)){const s=n[a],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(i[s.token.val[0]]=s.deser(r.slice(o,o+l))),o+=l}return[r,i]}else return[r,{}]}function xJ(e){const t=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n;return qe(e.Z)?qe(e.z)?n=null:n=ii.create(e.z):n=new Yn(e.Z),qe(e.q)||(e.M=(e.q-1)*3+1),qe(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),qe(e.u)||(e.S=Gw(e.u)),[Object.keys(e).reduce((i,o)=>{const a=t(o);return a&&(i[a]=e[o]),i},{}),n]}let mb=null;function SJ(){return mb||(mb=Be.fromMillis(1555555555555)),mb}function wJ(e,t){if(e.literal)return e;const n=wr.macroTokenToFormatOpts(e.val);if(!n)return e;const o=wr.create(t,n).formatDateTimeParts(SJ()).map(a=>vJ(a,t,n));return o.includes(void 0)?e:o}function CJ(e,t){return Array.prototype.concat(...e.map(n=>wJ(n,t)))}function _D(e,t,n){const r=CJ(wr.parseFormat(n),e),i=r.map(a=>mJ(a,e)),o=i.find(a=>a.invalidReason);if(o)return{input:t,tokens:r,invalidReason:o.invalidReason};{const[a,s]=yJ(i),l=RegExp(a,"i"),[c,u]=bJ(t,l,s),[d,f]=u?xJ(u):[null,null];if(dd(u,"a")&&dd(u,"H"))throw new $f("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:r,regex:l,rawMatches:c,matches:u,result:d,zone:f}}}function kJ(e,t,n){const{result:r,zone:i,invalidReason:o}=_D(e,t,n);return[r,i,o]}const PD=[0,31,59,90,120,151,181,212,243,273,304,334],OD=[0,31,60,91,121,152,182,213,244,274,305,335];function Pi(e,t){return new lo("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function MD(e,t,n){const r=new Date(Date.UTC(e,t-1,n)).getUTCDay();return r===0?7:r}function RD(e,t,n){return n+(Fh(e)?OD:PD)[t-1]}function DD(e,t){const n=Fh(e)?OD:PD,r=n.findIndex(o=>o<t),i=t-n[r];return{month:r+1,day:i}}function Xx(e){const{year:t,month:n,day:r}=e,i=RD(t,n,r),o=MD(t,n,r);let a=Math.floor((i-o+10)/7),s;return a<1?(s=t-1,a=Xg(s)):a>Xg(t)?(s=t+1,a=1):s=t,Object.assign({weekYear:s,weekNumber:a,weekday:o},sy(e))}function dk(e){const{weekYear:t,weekNumber:n,weekday:r}=e,i=MD(t,1,4),o=tp(t);let a=n*7+r-i-3,s;a<1?(s=t-1,a+=tp(s)):a>o?(s=t+1,a-=tp(t)):s=t;const{month:l,day:c}=DD(s,a);return Object.assign({year:s,month:l,day:c},sy(e))}function gb(e){const{year:t,month:n,day:r}=e,i=RD(t,n,r);return Object.assign({year:t,ordinal:i},sy(e))}function fk(e){const{year:t,ordinal:n}=e,{month:r,day:i}=DD(t,n);return Object.assign({year:t,month:r,day:i},sy(e))}function EJ(e){const t=oy(e.weekYear),n=Sa(e.weekNumber,1,Xg(e.weekYear)),r=Sa(e.weekday,1,7);return t?n?r?!1:Pi("weekday",e.weekday):Pi("week",e.week):Pi("weekYear",e.weekYear)}function IJ(e){const t=oy(e.year),n=Sa(e.ordinal,1,tp(e.year));return t?n?!1:Pi("ordinal",e.ordinal):Pi("year",e.year)}function AD(e){const t=oy(e.year),n=Sa(e.month,1,12),r=Sa(e.day,1,Yg(e.year,e.month));return t?n?r?!1:Pi("day",e.day):Pi("month",e.month):Pi("year",e.year)}function LD(e){const{hour:t,minute:n,second:r,millisecond:i}=e,o=Sa(t,0,23)||t===24&&n===0&&r===0&&i===0,a=Sa(n,0,59),s=Sa(r,0,59),l=Sa(i,0,999);return o?a?s?l?!1:Pi("millisecond",i):Pi("second",r):Pi("minute",n):Pi("hour",t)}const vb="Invalid DateTime",pk=864e13;function $1(e){return new lo("unsupported zone",`the zone "${e.name}" is not supported`)}function yb(e){return e.weekData===null&&(e.weekData=Xx(e.c)),e.weekData}function pf(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Be(Object.assign({},n,t,{old:n}))}function BD(e,t,n){let r=e-t*60*1e3;const i=n.offset(r);if(t===i)return[r,t];r-=(i-t)*60*1e3;const o=n.offset(r);return i===o?[r,i]:[e-Math.min(i,o)*60*1e3,Math.max(i,o)]}function hk(e,t){e+=t*60*1e3;const n=new Date(e);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Jm(e,t,n){return BD(qw(e),t,n)}function mk(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+Math.trunc(t.quarters)*3,o=Object.assign({},e.c,{year:r,month:i,day:Math.min(e.c.day,Yg(r,i))+Math.trunc(t.days)+Math.trunc(t.weeks)*7}),a=bt.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),s=qw(o);let[l,c]=BD(s,n,e.zone);return a!==0&&(l+=a,c=e.zone.offset(l)),{ts:l,o:c}}function hf(e,t,n,r,i){const{setZone:o,zone:a}=n;if(e&&Object.keys(e).length!==0){const s=t||a,l=Be.fromObject(Object.assign(e,n,{zone:s,setZone:void 0}));return o?l:l.setZone(a)}else return Be.invalid(new lo("unparsable",`the input "${i}" can't be parsed as ${r}`))}function su(e,t,n=!0){return e.isValid?wr.create(Gt.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function gk(e,{suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r,includePrefix:i=!1,includeZone:o=!1,spaceZone:a=!1,format:s="extended"}){let l=s==="basic"?"HHmm":"HH:mm";(!t||e.second!==0||e.millisecond!==0)&&(l+=s==="basic"?"ss":":ss",(!n||e.millisecond!==0)&&(l+=".SSS")),(o||r)&&a&&(l+=" "),o?l+="z":r&&(l+=s==="basic"?"ZZZ":"ZZ");let c=su(e,l);return i&&(c="T"+c),c}const $D={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},TJ={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},_J={ordinal:1,hour:0,minute:0,second:0,millisecond:0},FD=["year","month","day","hour","minute","second","millisecond"],PJ=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],OJ=["year","ordinal","hour","minute","second","millisecond"];function vk(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new rD(e);return t}function yk(e,t){for(const s of FD)qe(e[s])&&(e[s]=$D[s]);const n=AD(e)||LD(e);if(n)return Be.invalid(n);const r=Vt.now(),i=t.offset(r),[o,a]=Jm(e,i,t);return new Be({ts:o,zone:t,o:a})}function bk(e,t,n){const r=qe(n.round)?!0:n.round,i=(a,s)=>(a=Kw(a,r||n.calendary?0:2,!0),t.loc.clone(n).relFormatter(n).format(a,s)),o=a=>n.calendary?t.hasSame(e,a)?0:t.startOf(a).diff(e.startOf(a),a).get(a):t.diff(e,a).get(a);if(n.unit)return i(o(n.unit),n.unit);for(const a of n.units){const s=o(a);if(Math.abs(s)>=1)return i(s,a)}return i(e>t?-0:0,n.units[n.units.length-1])}class Be{constructor(t){const n=t.zone||Vt.defaultZone;let r=t.invalid||(Number.isNaN(t.ts)?new lo("invalid input"):null)||(n.isValid?null:$1(n));this.ts=qe(t.ts)?Vt.now():t.ts;let i=null,o=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(n))[i,o]=[t.old.c,t.old.o];else{const s=n.offset(this.ts);i=hk(this.ts,s),r=Number.isNaN(i.year)?new lo("invalid input"):null,i=r?null:i,o=r?null:s}this._zone=n,this.loc=t.loc||Gt.create(),this.invalid=r,this.weekData=null,this.c=i,this.o=o,this.isLuxonDateTime=!0}static now(){return new Be({})}static local(t,n,r,i,o,a,s){return qe(t)?Be.now():yk({year:t,month:n,day:r,hour:i,minute:o,second:a,millisecond:s},Vt.defaultZone)}static utc(t,n,r,i,o,a,s){return qe(t)?new Be({ts:Vt.now(),zone:Yn.utcInstance}):yk({year:t,month:n,day:r,hour:i,minute:o,second:a,millisecond:s},Yn.utcInstance)}static fromJSDate(t,n={}){const r=NZ(t)?t.valueOf():NaN;if(Number.isNaN(r))return Be.invalid("invalid input");const i=Rl(n.zone,Vt.defaultZone);return i.isValid?new Be({ts:r,zone:i,loc:Gt.fromObject(n)}):Be.invalid($1(i))}static fromMillis(t,n={}){if(ac(t))return t<-pk||t>pk?Be.invalid("Timestamp out of range"):new Be({ts:t,zone:Rl(n.zone,Vt.defaultZone),loc:Gt.fromObject(n)});throw new ki(`fromMillis requires a numerical input, but received a ${typeof t} with value ${t}`)}static fromSeconds(t,n={}){if(ac(t))return new Be({ts:t*1e3,zone:Rl(n.zone,Vt.defaultZone),loc:Gt.fromObject(n)});throw new ki("fromSeconds requires a numerical input")}static fromObject(t){const n=Rl(t.zone,Vt.defaultZone);if(!n.isValid)return Be.invalid($1(n));const r=Vt.now(),i=n.offset(r),o=Zg(t,vk,["zone","locale","outputCalendar","numberingSystem"]),a=!qe(o.ordinal),s=!qe(o.year),l=!qe(o.month)||!qe(o.day),c=s||l,u=o.weekYear||o.weekNumber,d=Gt.fromObject(t);if((c||a)&&u)throw new $f("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&a)throw new $f("Can't mix ordinal dates with month/day");const f=u||o.weekday&&!c;let p,m,g=hk(r,i);f?(p=PJ,m=TJ,g=Xx(g)):a?(p=OJ,m=_J,g=gb(g)):(p=FD,m=$D);let y=!1;for(const I of p){const T=o[I];qe(T)?y?o[I]=m[I]:o[I]=g[I]:y=!0}const v=f?EJ(o):a?IJ(o):AD(o),b=v||LD(o);if(b)return Be.invalid(b);const x=f?dk(o):a?fk(o):o,[w,E]=Jm(x,i,n),C=new Be({ts:w,zone:n,o:E,loc:d});return o.weekday&&c&&t.weekday!==C.weekday?Be.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${C.toISO()}`):C}static fromISO(t,n={}){const[r,i]=VQ(t);return hf(r,i,n,"ISO 8601",t)}static fromRFC2822(t,n={}){const[r,i]=WQ(t);return hf(r,i,n,"RFC 2822",t)}static fromHTTP(t,n={}){const[r,i]=UQ(t);return hf(r,i,n,"HTTP",n)}static fromFormat(t,n,r={}){if(qe(t)||qe(n))throw new ki("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:o=null}=r,a=Gt.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0}),[s,l,c]=kJ(a,t,n);return c?Be.invalid(c):hf(s,l,r,`format ${n}`,t)}static fromString(t,n,r={}){return Be.fromFormat(t,n,r)}static fromSQL(t,n={}){const[r,i]=JQ(t);return hf(r,i,n,"SQL",t)}static invalid(t,n=null){if(!t)throw new ki("need to specify a reason the DateTime is invalid");const r=t instanceof lo?t:new lo(t,n);if(Vt.throwOnInvalid)throw new LZ(r);return new Be({invalid:r})}static isDateTime(t){return t&&t.isLuxonDateTime||!1}get(t){return this[t]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?yb(this).weekYear:NaN}get weekNumber(){return this.isValid?yb(this).weekNumber:NaN}get weekday(){return this.isValid?yb(this).weekday:NaN}get ordinal(){return this.isValid?gb(this.c).ordinal:NaN}get monthShort(){return this.isValid?B1.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?B1.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?B1.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?B1.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.universal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return Fh(this.year)}get daysInMonth(){return Yg(this.year,this.month)}get daysInYear(){return this.isValid?tp(this.year):NaN}get weeksInWeekYear(){return this.isValid?Xg(this.weekYear):NaN}resolvedLocaleOpts(t={}){const{locale:n,numberingSystem:r,calendar:i}=wr.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:i}}toUTC(t=0,n={}){return this.setZone(Yn.instance(t),n)}toLocal(){return this.setZone(Vt.defaultZone)}setZone(t,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(t=Rl(t,Vt.defaultZone),t.equals(this.zone))return this;if(t.isValid){let i=this.ts;if(n||r){const o=t.offset(this.ts),a=this.toObject();[i]=Jm(a,o,t)}return pf(this,{ts:i,zone:t})}else return Be.invalid($1(t))}reconfigure({locale:t,numberingSystem:n,outputCalendar:r}={}){const i=this.loc.clone({locale:t,numberingSystem:n,outputCalendar:r});return pf(this,{loc:i})}setLocale(t){return this.reconfigure({locale:t})}set(t){if(!this.isValid)return this;const n=Zg(t,vk,[]),r=!qe(n.weekYear)||!qe(n.weekNumber)||!qe(n.weekday),i=!qe(n.ordinal),o=!qe(n.year),a=!qe(n.month)||!qe(n.day),s=o||a,l=n.weekYear||n.weekNumber;if((s||i)&&l)throw new $f("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&i)throw new $f("Can't mix ordinal dates with month/day");let c;r?c=dk(Object.assign(Xx(this.c),n)):qe(n.ordinal)?(c=Object.assign(this.toObject(),n),qe(n.day)&&(c.day=Math.min(Yg(c.year,c.month),c.day))):c=fk(Object.assign(gb(this.c),n));const[u,d]=Jm(c,this.o,this.zone);return pf(this,{ts:u,o:d})}plus(t){if(!this.isValid)return this;const n=Yl(t);return pf(this,mk(this,n))}minus(t){if(!this.isValid)return this;const n=Yl(t).negate();return pf(this,mk(this,n))}startOf(t){if(!this.isValid)return this;const n={},r=bt.normalizeUnit(t);switch(r){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(r==="weeks"&&(n.weekday=1),r==="quarters"){const i=Math.ceil(this.month/3);n.month=(i-1)*3+1}return this.set(n)}endOf(t){return this.isValid?this.plus({[t]:1}).startOf(t).minus(1):this}toFormat(t,n={}){return this.isValid?wr.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,t):vb}toLocaleString(t=qg){return this.isValid?wr.create(this.loc.clone(t),t).formatDateTime(this):vb}toLocaleParts(t={}){return this.isValid?wr.create(this.loc.clone(t),t).formatDateTimeParts(this):[]}toISO(t={}){return this.isValid?`${this.toISODate(t)}T${this.toISOTime(t)}`:null}toISODate({format:t="extended"}={}){let n=t==="basic"?"yyyyMMdd":"yyyy-MM-dd";return this.year>9999&&(n="+"+n),su(this,n)}toISOWeekDate(){return su(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:t=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:i=!1,format:o="extended"}={}){return gk(this,{suppressSeconds:n,suppressMilliseconds:t,includeOffset:r,includePrefix:i,format:o})}toRFC2822(){return su(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return su(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return su(this,"yyyy-MM-dd")}toSQLTime({includeOffset:t=!0,includeZone:n=!1}={}){return gk(this,{includeOffset:t,includeZone:n,spaceZone:!0})}toSQL(t={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(t)}`:null}toString(){return this.isValid?this.toISO():vb}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(t={}){if(!this.isValid)return{};const n=Object.assign({},this.c);return t.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(t,n="milliseconds",r={}){if(!this.isValid||!t.isValid)return bt.invalid(this.invalid||t.invalid,"created by diffing an invalid DateTime");const i=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},r),o=zZ(n).map(bt.normalizeUnit),a=t.valueOf()>this.valueOf(),s=a?this:t,l=a?t:this,c=lJ(s,l,o,i);return a?c.negate():c}diffNow(t="milliseconds",n={}){return this.diff(Be.now(),t,n)}until(t){return this.isValid?Qt.fromDateTimes(this,t):this}hasSame(t,n){if(!this.isValid)return!1;const r=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(n)<=r&&r<=i.endOf(n)}equals(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)}toRelative(t={}){if(!this.isValid)return null;const n=t.base||Be.fromObject({zone:this.zone}),r=t.padding?this<n?-t.padding:t.padding:0;let i=["years","months","days","hours","minutes","seconds"],o=t.unit;return Array.isArray(t.unit)&&(i=t.unit,o=void 0),bk(n,this.plus(r),Object.assign(t,{numeric:"always",units:i,unit:o}))}toRelativeCalendar(t={}){return this.isValid?bk(t.base||Be.fromObject({zone:this.zone}),this,Object.assign(t,{numeric:"auto",units:["years","months","days"],calendary:!0})):null}static min(...t){if(!t.every(Be.isDateTime))throw new ki("min requires all arguments be DateTimes");return Z7(t,n=>n.valueOf(),Math.min)}static max(...t){if(!t.every(Be.isDateTime))throw new ki("max requires all arguments be DateTimes");return Z7(t,n=>n.valueOf(),Math.max)}static fromFormatExplain(t,n,r={}){const{locale:i=null,numberingSystem:o=null}=r,a=Gt.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});return _D(a,t,n)}static fromStringExplain(t,n,r={}){return Be.fromFormatExplain(t,n,r)}static get DATE_SHORT(){return qg}static get DATE_MED(){return Tw}static get DATE_MED_WITH_WEEKDAY(){return iD}static get DATE_FULL(){return _w}static get DATE_HUGE(){return Pw}static get TIME_SIMPLE(){return Ow}static get TIME_WITH_SECONDS(){return Mw}static get TIME_WITH_SHORT_OFFSET(){return Rw}static get TIME_WITH_LONG_OFFSET(){return Dw}static get TIME_24_SIMPLE(){return Aw}static get TIME_24_WITH_SECONDS(){return Lw}static get TIME_24_WITH_SHORT_OFFSET(){return Bw}static get TIME_24_WITH_LONG_OFFSET(){return $w}static get DATETIME_SHORT(){return Fw}static get DATETIME_SHORT_WITH_SECONDS(){return Nw}static get DATETIME_MED(){return zw}static get DATETIME_MED_WITH_SECONDS(){return jw}static get DATETIME_MED_WITH_WEEKDAY(){return oD}static get DATETIME_FULL(){return Hw}static get DATETIME_FULL_WITH_SECONDS(){return Vw}static get DATETIME_HUGE(){return Ww}static get DATETIME_HUGE_WITH_SECONDS(){return Uw}}function mf(e){if(Be.isDateTime(e))return e;if(e&&e.valueOf&&ac(e.valueOf()))return Be.fromJSDate(e);if(e&&typeof e=="object")return Be.fromObject(e);throw new ki(`Unknown datetime argument: ${e}, of type ${typeof e}`)}class Ar{constructor(t,{autoClose:n=!0,handlers:r=[],processors:i=[],timezone:o=Vt.defaultZoneName}={}){this._name=t,this._handlers=new nD(r),this._processors=new Set(i),this.timezone=o,n&&this.closeOnExit()}static exitHandler(){for(const t of Ar.openLoggers)t.close()}static clearExitHandlers(){Ar.openLoggers.length>0&&(Ar.openLoggers.splice(0),Wx?process.removeListener("exit",Ar.exitHandler):X7&&self.removeEventListener("unload",Ar.exitHandler))}get name(){return this._name}get timezone(){return this._timezone}set timezone(t){if(!ii.isValidZone(t))throw new Error(`Invalid timezone "${t}"`);this._timezone=t}get handlers(){return this._handlers}get processors(){return this._processors}closeOnExit(){Ar.openLoggers.length===0&&(Wx?process.on("exit",Ar.exitHandler):X7&&self.addEventListener("unload",Ar.exitHandler)),Ar.openLoggers.push(this)}close(){for(const t of this._handlers)AZ(t)&&t.close()}reset(){for(const t of this._handlers)Vx(t)&&t.reset();for(const t of this._processors)Vx(t)&&t.reset()}isHandling(t){return this._handlers.size>0&&[...this._handlers].some(n=>n.isHandling(t))}log(t,n,r={}){if(!q7.includes(t))throw new Error(`Invalid log level "${t}", use one of: ${q7.join(", ")}`);if(!RZ(n))throw new Error(`Log message must be a primitive, ${tD(n)} given`);let i={level:t,severity:Nu[t],message:String(n),context:r,extra:{},datetime:Be.local().setZone(this._timezone),channel:this._name};for(const o of this._processors)typeof o=="function"?i=o(i):i=o.process(i);return this.runHandlers(i)}emergency(t,n={}){return this.log("emergency",t,n)}alert(t,n={}){return this.log("alert",t,n)}critical(t,n={}){return this.log("critical",t,n)}error(t,n={}){return this.log("error",t,n)}warning(t,n={}){return this.log("warning",t,n)}notice(t,n={}){return this.log("notice",t,n)}info(t,n={}){return this.log("info",t,n)}debug(t,n={}){return this.log("debug",t,n)}}Ar.openLoggers=[];class e9 extends Ar{withName(t){return new e9(t,{handlers:this._handlers,processors:this._processors,timezone:this._timezone})}async runHandlers(t){for(const n of this._handlers)if(await n.handle({...t})===!0)break}}class t9 extends Ar{withName(t){return new t9(t,{handlers:this._handlers,processors:this._processors,timezone:this._timezone})}runHandlers(t){for(const n of[...this._handlers].reverse())if(iy(n)){if(n.handleSync({...t})===!0)break}else n.handle({...t}).catch(r=>{console.warn("Asynchronous handler failed to execute: %o",r)})}}class MJ extends nD{constructor(t,n){if(typeof t!="function")throw new TypeError(`The validator must be a function, ${tD(t)} given`);if(super(),this.validator=t,n)for(const r of n)this.add(r)}add(t){return this.validator(t),super.add(t),this}}class n9 extends Ar{constructor(t,n){super(t,n),this._handlers=new MJ(r=>{if(!iy(r))throw new Error("Invalid asynchronous handler in synchronous logger instance")},[...this._handlers])}withName(t){return new n9(t,{handlers:this._handlers,processors:this._processors,timezone:this._timezone})}runHandlers(t){for(const n of[...this._handlers].reverse())if(n.handleSync({...t})===!0)break}}function RJ(e,{mode:t="mixed",...n}={}){switch(t){case"sync":return new n9(e,n);case"async":return new e9(e,n);case"mixed":return new t9(e,n);default:throw new Error(`Invalid logging mode "${t}". Use one of "sync", "async" or "mixed".`)}}const lt=RJ("erebus-server-logger",{handlers:[new DZ({timestamps:!0,useNativeDebug:!0})]});var Bp=Boolean(globalThis==null?void 0:globalThis.document)?h.exports.useLayoutEffect:h.exports.useEffect,ly=h.exports.createContext({});ly.displayName="ColorModeContext";function cy(){const e=h.exports.useContext(ly);if(e===void 0)throw new Error("useColorMode must be used within a ColorModeProvider");return e}function $p(e,t){const{colorMode:n}=cy();return n==="dark"?t:e}var F1={light:"chakra-ui-light",dark:"chakra-ui-dark"};function DJ(e={}){const{preventTransition:t=!0}=e,n={setDataset:r=>{const i=t?n.preventTransition():void 0;document.documentElement.dataset.theme=r,document.documentElement.style.colorScheme=r,i==null||i()},setClassName(r){document.body.classList.add(r?F1.dark:F1.light),document.body.classList.remove(r?F1.light:F1.dark)},query(){return window.matchMedia("(prefers-color-scheme: dark)")},getSystemTheme(r){var o;return((o=n.query().matches)!=null?o:r==="dark")?"dark":"light"},addListener(r){const i=n.query(),o=a=>{r(a.matches?"dark":"light")};return typeof i.addListener=="function"?i.addListener(o):i.addEventListener("change",o),()=>{typeof i.removeListener=="function"?i.removeListener(o):i.removeEventListener("change",o)}},preventTransition(){const r=document.createElement("style");return r.appendChild(document.createTextNode("*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(r),()=>{window.getComputedStyle(document.body),requestAnimationFrame(()=>{requestAnimationFrame(()=>{document.head.removeChild(r)})})}}};return n}var AJ="chakra-ui-color-mode";function LJ(e){return{ssr:!1,type:"localStorage",get(t){if(!(globalThis!=null&&globalThis.document))return t;let n;try{n=localStorage.getItem(e)||t}catch{}return n||t},set(t){try{localStorage.setItem(e,t)}catch{}}}}var BJ=LJ(AJ),xk=()=>{};function Sk(e,t){return e.type==="cookie"&&e.ssr?e.get(t):t}function ND(e){const{value:t,children:n,options:{useSystemColorMode:r,initialColorMode:i,disableTransitionOnChange:o}={},colorModeManager:a=BJ}=e,s=i==="dark"?"dark":"light",[l,c]=h.exports.useState(()=>Sk(a,s)),[u,d]=h.exports.useState(()=>Sk(a)),{getSystemTheme:f,setClassName:p,setDataset:m,addListener:g}=h.exports.useMemo(()=>DJ({preventTransition:o}),[o]),y=i==="system"&&!l?u:l,v=h.exports.useCallback(w=>{const E=w==="system"?f():w;c(E),p(E==="dark"),m(E),a.set(E)},[a,f,p,m]);Bp(()=>{i==="system"&&d(f())},[]),h.exports.useEffect(()=>{const w=a.get();if(w){v(w);return}if(i==="system"){v("system");return}v(s)},[a,s,i,v]);const b=h.exports.useCallback(()=>{v(y==="dark"?"light":"dark")},[y,v]);h.exports.useEffect(()=>{if(!!r)return g(v)},[r,g,v]);const x=h.exports.useMemo(()=>({colorMode:t!=null?t:y,toggleColorMode:t?xk:b,setColorMode:t?xk:v,forced:t!==void 0}),[y,b,v,t]);return A.createElement(ly.Provider,{value:x},n)}ND.displayName="ColorModeProvider";var Zx={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",i=800,o=16,a=9007199254740991,s="[object Arguments]",l="[object Array]",c="[object AsyncFunction]",u="[object Boolean]",d="[object Date]",f="[object Error]",p="[object Function]",m="[object GeneratorFunction]",g="[object Map]",y="[object Number]",v="[object Null]",b="[object Object]",x="[object Proxy]",w="[object RegExp]",E="[object Set]",C="[object String]",I="[object Undefined]",T="[object WeakMap]",_="[object ArrayBuffer]",P="[object DataView]",M="[object Float32Array]",D="[object Float64Array]",V="[object Int8Array]",B="[object Int16Array]",L="[object Int32Array]",G="[object Uint8Array]",z="[object Uint8ClampedArray]",j="[object Uint16Array]",F="[object Uint32Array]",H=/[\\^$.*+?()[\]{}|]/g,R=/^\[object .+?Constructor\]$/,W=/^(?:0|[1-9]\d*)$/,X={};X[M]=X[D]=X[V]=X[B]=X[L]=X[G]=X[z]=X[j]=X[F]=!0,X[s]=X[l]=X[_]=X[u]=X[P]=X[d]=X[f]=X[p]=X[g]=X[y]=X[b]=X[w]=X[E]=X[C]=X[T]=!1;var te=typeof Fl=="object"&&Fl&&Fl.Object===Object&&Fl,re=typeof self=="object"&&self&&self.Object===Object&&self,ne=te||re||Function("return this")(),ie=t&&!t.nodeType&&t,ae=ie&&!0&&e&&!e.nodeType&&e,le=ae&&ae.exports===ie,he=le&&te.process,Se=function(){try{var N=ae&&ae.require&&ae.require("util").types;return N||he&&he.binding&&he.binding("util")}catch{}}(),pe=Se&&Se.isTypedArray;function st(N,K,ee){switch(ee.length){case 0:return N.call(K);case 1:return N.call(K,ee[0]);case 2:return N.call(K,ee[0],ee[1]);case 3:return N.call(K,ee[0],ee[1],ee[2])}return N.apply(K,ee)}function Ot(N,K){for(var ee=-1,me=Array(N);++ee<N;)me[ee]=K(ee);return me}function In(N){return function(K){return N(K)}}function Wi(N,K){return N==null?void 0:N[K]}function ua(N,K){return function(ee){return N(K(ee))}}var Mr=Array.prototype,Rr=Function.prototype,pn=Object.prototype,fl=ne["__core-js_shared__"],pl=Rr.toString,hn=pn.hasOwnProperty,Kr=function(){var N=/[^.]+$/.exec(fl&&fl.keys&&fl.keys.IE_PROTO||"");return N?"Symbol(src)_1."+N:""}(),L8=pn.toString,dU=pl.call(Object),fU=RegExp("^"+pl.call(hn).replace(H,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),m1=le?ne.Buffer:void 0,B8=ne.Symbol,$8=ne.Uint8Array,F8=m1?m1.allocUnsafe:void 0,N8=ua(Object.getPrototypeOf,Object),z8=Object.create,pU=pn.propertyIsEnumerable,hU=Mr.splice,hl=B8?B8.toStringTag:void 0,g1=function(){try{var N=G2(Object,"defineProperty");return N({},"",{}),N}catch{}}(),mU=m1?m1.isBuffer:void 0,j8=Math.max,gU=Date.now,H8=G2(ne,"Map"),af=G2(Object,"create"),vU=function(){function N(){}return function(K){if(!gl(K))return{};if(z8)return z8(K);N.prototype=K;var ee=new N;return N.prototype=void 0,ee}}();function ml(N){var K=-1,ee=N==null?0:N.length;for(this.clear();++K<ee;){var me=N[K];this.set(me[0],me[1])}}function yU(){this.__data__=af?af(null):{},this.size=0}function bU(N){var K=this.has(N)&&delete this.__data__[N];return this.size-=K?1:0,K}function xU(N){var K=this.__data__;if(af){var ee=K[N];return ee===r?void 0:ee}return hn.call(K,N)?K[N]:void 0}function SU(N){var K=this.__data__;return af?K[N]!==void 0:hn.call(K,N)}function wU(N,K){var ee=this.__data__;return this.size+=this.has(N)?0:1,ee[N]=af&&K===void 0?r:K,this}ml.prototype.clear=yU,ml.prototype.delete=bU,ml.prototype.get=xU,ml.prototype.has=SU,ml.prototype.set=wU;function da(N){var K=-1,ee=N==null?0:N.length;for(this.clear();++K<ee;){var me=N[K];this.set(me[0],me[1])}}function CU(){this.__data__=[],this.size=0}function kU(N){var K=this.__data__,ee=v1(K,N);if(ee<0)return!1;var me=K.length-1;return ee==me?K.pop():hU.call(K,ee,1),--this.size,!0}function EU(N){var K=this.__data__,ee=v1(K,N);return ee<0?void 0:K[ee][1]}function IU(N){return v1(this.__data__,N)>-1}function TU(N,K){var ee=this.__data__,me=v1(ee,N);return me<0?(++this.size,ee.push([N,K])):ee[me][1]=K,this}da.prototype.clear=CU,da.prototype.delete=kU,da.prototype.get=EU,da.prototype.has=IU,da.prototype.set=TU;function Fc(N){var K=-1,ee=N==null?0:N.length;for(this.clear();++K<ee;){var me=N[K];this.set(me[0],me[1])}}function _U(){this.size=0,this.__data__={hash:new ml,map:new(H8||da),string:new ml}}function PU(N){var K=b1(this,N).delete(N);return this.size-=K?1:0,K}function OU(N){return b1(this,N).get(N)}function MU(N){return b1(this,N).has(N)}function RU(N,K){var ee=b1(this,N),me=ee.size;return ee.set(N,K),this.size+=ee.size==me?0:1,this}Fc.prototype.clear=_U,Fc.prototype.delete=PU,Fc.prototype.get=OU,Fc.prototype.has=MU,Fc.prototype.set=RU;function Nc(N){var K=this.__data__=new da(N);this.size=K.size}function DU(){this.__data__=new da,this.size=0}function AU(N){var K=this.__data__,ee=K.delete(N);return this.size=K.size,ee}function LU(N){return this.__data__.get(N)}function BU(N){return this.__data__.has(N)}function $U(N,K){var ee=this.__data__;if(ee instanceof da){var me=ee.__data__;if(!H8||me.length<n-1)return me.push([N,K]),this.size=++ee.size,this;ee=this.__data__=new Fc(me)}return ee.set(N,K),this.size=ee.size,this}Nc.prototype.clear=DU,Nc.prototype.delete=AU,Nc.prototype.get=LU,Nc.prototype.has=BU,Nc.prototype.set=$U;function FU(N,K){var ee=Y2(N),me=!ee&&q2(N),Ue=!ee&&!me&&K8(N),mt=!ee&&!me&&!Ue&&Y8(N),Mt=ee||me||Ue||mt,He=Mt?Ot(N.length,String):[],Rt=He.length;for(var yi in N)(K||hn.call(N,yi))&&!(Mt&&(yi=="length"||Ue&&(yi=="offset"||yi=="parent")||mt&&(yi=="buffer"||yi=="byteLength"||yi=="byteOffset")||U8(yi,Rt)))&&He.push(yi);return He}function W2(N,K,ee){(ee!==void 0&&!x1(N[K],ee)||ee===void 0&&!(K in N))&&U2(N,K,ee)}function NU(N,K,ee){var me=N[K];(!(hn.call(N,K)&&x1(me,ee))||ee===void 0&&!(K in N))&&U2(N,K,ee)}function v1(N,K){for(var ee=N.length;ee--;)if(x1(N[ee][0],K))return ee;return-1}function U2(N,K,ee){K=="__proto__"&&g1?g1(N,K,{configurable:!0,enumerable:!0,value:ee,writable:!0}):N[K]=ee}var zU=JU();function y1(N){return N==null?N===void 0?I:v:hl&&hl in Object(N)?eG(N):aG(N)}function V8(N){return sf(N)&&y1(N)==s}function jU(N){if(!gl(N)||iG(N))return!1;var K=Z2(N)?fU:R;return K.test(uG(N))}function HU(N){return sf(N)&&q8(N.length)&&!!X[y1(N)]}function VU(N){if(!gl(N))return oG(N);var K=G8(N),ee=[];for(var me in N)me=="constructor"&&(K||!hn.call(N,me))||ee.push(me);return ee}function W8(N,K,ee,me,Ue){N!==K&&zU(K,function(mt,Mt){if(Ue||(Ue=new Nc),gl(mt))WU(N,K,Mt,ee,W8,me,Ue);else{var He=me?me(K2(N,Mt),mt,Mt+"",N,K,Ue):void 0;He===void 0&&(He=mt),W2(N,Mt,He)}},X8)}function WU(N,K,ee,me,Ue,mt,Mt){var He=K2(N,ee),Rt=K2(K,ee),yi=Mt.get(Rt);if(yi){W2(N,ee,yi);return}var qr=mt?mt(He,Rt,ee+"",N,K,Mt):void 0,lf=qr===void 0;if(lf){var Q2=Y2(Rt),J2=!Q2&&K8(Rt),Q8=!Q2&&!J2&&Y8(Rt);qr=Rt,Q2||J2||Q8?Y2(He)?qr=He:dG(He)?qr=XU(He):J2?(lf=!1,qr=KU(Rt,!0)):Q8?(lf=!1,qr=YU(Rt,!0)):qr=[]:fG(Rt)||q2(Rt)?(qr=He,q2(He)?qr=pG(He):(!gl(He)||Z2(He))&&(qr=tG(Rt))):lf=!1}lf&&(Mt.set(Rt,qr),Ue(qr,Rt,me,mt,Mt),Mt.delete(Rt)),W2(N,ee,qr)}function UU(N,K){return lG(sG(N,K,Z8),N+"")}var GU=g1?function(N,K){return g1(N,"toString",{configurable:!0,enumerable:!1,value:mG(K),writable:!0})}:Z8;function KU(N,K){if(K)return N.slice();var ee=N.length,me=F8?F8(ee):new N.constructor(ee);return N.copy(me),me}function qU(N){var K=new N.constructor(N.byteLength);return new $8(K).set(new $8(N)),K}function YU(N,K){var ee=K?qU(N.buffer):N.buffer;return new N.constructor(ee,N.byteOffset,N.length)}function XU(N,K){var ee=-1,me=N.length;for(K||(K=Array(me));++ee<me;)K[ee]=N[ee];return K}function ZU(N,K,ee,me){var Ue=!ee;ee||(ee={});for(var mt=-1,Mt=K.length;++mt<Mt;){var He=K[mt],Rt=me?me(ee[He],N[He],He,ee,N):void 0;Rt===void 0&&(Rt=N[He]),Ue?U2(ee,He,Rt):NU(ee,He,Rt)}return ee}function QU(N){return UU(function(K,ee){var me=-1,Ue=ee.length,mt=Ue>1?ee[Ue-1]:void 0,Mt=Ue>2?ee[2]:void 0;for(mt=N.length>3&&typeof mt=="function"?(Ue--,mt):void 0,Mt&&nG(ee[0],ee[1],Mt)&&(mt=Ue<3?void 0:mt,Ue=1),K=Object(K);++me<Ue;){var He=ee[me];He&&N(K,He,me,mt)}return K})}function JU(N){return function(K,ee,me){for(var Ue=-1,mt=Object(K),Mt=me(K),He=Mt.length;He--;){var Rt=Mt[N?He:++Ue];if(ee(mt[Rt],Rt,mt)===!1)break}return K}}function b1(N,K){var ee=N.__data__;return rG(K)?ee[typeof K=="string"?"string":"hash"]:ee.map}function G2(N,K){var ee=Wi(N,K);return jU(ee)?ee:void 0}function eG(N){var K=hn.call(N,hl),ee=N[hl];try{N[hl]=void 0;var me=!0}catch{}var Ue=L8.call(N);return me&&(K?N[hl]=ee:delete N[hl]),Ue}function tG(N){return typeof N.constructor=="function"&&!G8(N)?vU(N8(N)):{}}function U8(N,K){var ee=typeof N;return K=K==null?a:K,!!K&&(ee=="number"||ee!="symbol"&&W.test(N))&&N>-1&&N%1==0&&N<K}function nG(N,K,ee){if(!gl(ee))return!1;var me=typeof K;return(me=="number"?X2(ee)&&U8(K,ee.length):me=="string"&&K in ee)?x1(ee[K],N):!1}function rG(N){var K=typeof N;return K=="string"||K=="number"||K=="symbol"||K=="boolean"?N!=="__proto__":N===null}function iG(N){return!!Kr&&Kr in N}function G8(N){var K=N&&N.constructor,ee=typeof K=="function"&&K.prototype||pn;return N===ee}function oG(N){var K=[];if(N!=null)for(var ee in Object(N))K.push(ee);return K}function aG(N){return L8.call(N)}function sG(N,K,ee){return K=j8(K===void 0?N.length-1:K,0),function(){for(var me=arguments,Ue=-1,mt=j8(me.length-K,0),Mt=Array(mt);++Ue<mt;)Mt[Ue]=me[K+Ue];Ue=-1;for(var He=Array(K+1);++Ue<K;)He[Ue]=me[Ue];return He[K]=ee(Mt),st(N,this,He)}}function K2(N,K){if(!(K==="constructor"&&typeof N[K]=="function")&&K!="__proto__")return N[K]}var lG=cG(GU);function cG(N){var K=0,ee=0;return function(){var me=gU(),Ue=o-(me-ee);if(ee=me,Ue>0){if(++K>=i)return arguments[0]}else K=0;return N.apply(void 0,arguments)}}function uG(N){if(N!=null){try{return pl.call(N)}catch{}try{return N+""}catch{}}return""}function x1(N,K){return N===K||N!==N&&K!==K}var q2=V8(function(){return arguments}())?V8:function(N){return sf(N)&&hn.call(N,"callee")&&!pU.call(N,"callee")},Y2=Array.isArray;function X2(N){return N!=null&&q8(N.length)&&!Z2(N)}function dG(N){return sf(N)&&X2(N)}var K8=mU||gG;function Z2(N){if(!gl(N))return!1;var K=y1(N);return K==p||K==m||K==c||K==x}function q8(N){return typeof N=="number"&&N>-1&&N%1==0&&N<=a}function gl(N){var K=typeof N;return N!=null&&(K=="object"||K=="function")}function sf(N){return N!=null&&typeof N=="object"}function fG(N){if(!sf(N)||y1(N)!=b)return!1;var K=N8(N);if(K===null)return!0;var ee=hn.call(K,"constructor")&&K.constructor;return typeof ee=="function"&&ee instanceof ee&&pl.call(ee)==dU}var Y8=pe?In(pe):HU;function pG(N){return ZU(N,X8(N))}function X8(N){return X2(N)?FU(N,!0):VU(N)}var hG=QU(function(N,K,ee,me){W8(N,K,ee,me)});function mG(N){return function(){return N}}function Z8(N){return N}function gG(){return!1}e.exports=hG})(Zx,Zx.exports);var Oi=Zx.exports;function Ko(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function zl(e,...t){return $J(e)?e(...t):e}var $J=e=>typeof e=="function",FJ=e=>/!(important)?$/.test(e),wk=e=>typeof e=="string"?e.replace(/!(important)?$/,"").trim():e,Qx=(e,t)=>n=>{const r=String(t),i=FJ(r),o=wk(r),a=e?`${e}.${o}`:o;let s=Ko(n.__cssMap)&&a in n.__cssMap?n.__cssMap[a].varRef:t;return s=wk(s),i?`${s} !important`:s};function Fp(e){const{scale:t,transform:n,compose:r}=e;return(o,a)=>{var c;const s=Qx(t,o)(a);let l=(c=n==null?void 0:n(s,a))!=null?c:s;return r&&(l=r(l,a)),l}}var N1=(...e)=>t=>e.reduce((n,r)=>r(n),t);function Yi(e,t){return n=>{const r={property:n,scale:e};return r.transform=Fp({scale:e,transform:t}),r}}var NJ=({rtl:e,ltr:t})=>n=>n.direction==="rtl"?e:t;function zJ(e){const{property:t,scale:n,transform:r}=e;return{scale:n,property:NJ(t),transform:n?Fp({scale:n,compose:r}):r}}var zD=["rotate(var(--chakra-rotate, 0))","scaleX(var(--chakra-scale-x, 1))","scaleY(var(--chakra-scale-y, 1))","skewX(var(--chakra-skew-x, 0))","skewY(var(--chakra-skew-y, 0))"];function jJ(){return["translateX(var(--chakra-translate-x, 0))","translateY(var(--chakra-translate-y, 0))",...zD].join(" ")}function HJ(){return["translate3d(var(--chakra-translate-x, 0), var(--chakra-translate-y, 0), 0)",...zD].join(" ")}var VJ={"--chakra-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-sepia":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-drop-shadow":"var(--chakra-empty,/*!*/ /*!*/)",filter:["var(--chakra-blur)","var(--chakra-brightness)","var(--chakra-contrast)","var(--chakra-grayscale)","var(--chakra-hue-rotate)","var(--chakra-invert)","var(--chakra-saturate)","var(--chakra-sepia)","var(--chakra-drop-shadow)"].join(" ")},WJ={backdropFilter:["var(--chakra-backdrop-blur)","var(--chakra-backdrop-brightness)","var(--chakra-backdrop-contrast)","var(--chakra-backdrop-grayscale)","var(--chakra-backdrop-hue-rotate)","var(--chakra-backdrop-invert)","var(--chakra-backdrop-opacity)","var(--chakra-backdrop-saturate)","var(--chakra-backdrop-sepia)"].join(" "),"--chakra-backdrop-blur":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-brightness":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-contrast":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-grayscale":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-hue-rotate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-invert":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-opacity":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-saturate":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-backdrop-sepia":"var(--chakra-empty,/*!*/ /*!*/)"};function UJ(e){return{"--chakra-ring-offset-shadow":"var(--chakra-ring-inset) 0 0 0 var(--chakra-ring-offset-width) var(--chakra-ring-offset-color)","--chakra-ring-shadow":"var(--chakra-ring-inset) 0 0 0 calc(var(--chakra-ring-width) + var(--chakra-ring-offset-width)) var(--chakra-ring-color)","--chakra-ring-width":e,boxShadow:["var(--chakra-ring-offset-shadow)","var(--chakra-ring-shadow)","var(--chakra-shadow, 0 0 #0000)"].join(", ")}}var GJ={"row-reverse":{space:"--chakra-space-x-reverse",divide:"--chakra-divide-x-reverse"},"column-reverse":{space:"--chakra-space-y-reverse",divide:"--chakra-divide-y-reverse"}},jD="& > :not(style) ~ :not(style)",KJ={[jD]:{marginInlineStart:"calc(var(--chakra-space-x) * calc(1 - var(--chakra-space-x-reverse)))",marginInlineEnd:"calc(var(--chakra-space-x) * var(--chakra-space-x-reverse))"}},qJ={[jD]:{marginTop:"calc(var(--chakra-space-y) * calc(1 - var(--chakra-space-y-reverse)))",marginBottom:"calc(var(--chakra-space-y) * var(--chakra-space-y-reverse))"}},Jx={"to-t":"to top","to-tr":"to top right","to-r":"to right","to-br":"to bottom right","to-b":"to bottom","to-bl":"to bottom left","to-l":"to left","to-tl":"to top left"},YJ=new Set(Object.values(Jx)),HD=new Set(["none","-moz-initial","inherit","initial","revert","unset"]),XJ=e=>e.trim();function ZJ(e,t){var d;var n;if(e==null||HD.has(e))return e;const r=/(?<type>^[a-z-A-Z]+)\((?<values>(.*))\)/g,{type:i,values:o}=(d=(n=r.exec(e))==null?void 0:n.groups)!=null?d:{};if(!i||!o)return e;const a=i.includes("-gradient")?i:`${i}-gradient`,[s,...l]=o.split(",").map(XJ).filter(Boolean);if((l==null?void 0:l.length)===0)return e;const c=s in Jx?Jx[s]:s;l.unshift(c);const u=l.map(f=>{if(YJ.has(f))return f;const p=f.indexOf(" "),[m,g]=p!==-1?[f.substr(0,p),f.substr(p+1)]:[f],y=VD(g)?g:g&&g.split(" "),v=`colors.${m}`,b=v in t.__cssMap?t.__cssMap[v].varRef:m;return y?[b,...Array.isArray(y)?y:[y]].join(" "):b});return`${a}(${u.join(", ")})`}var VD=e=>typeof e=="string"&&e.includes("(")&&e.includes(")"),QJ=(e,t)=>ZJ(e,t!=null?t:{});function JJ(e){return/^var\(--.+\)$/.test(e)}var eee=e=>{const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}},Io=e=>t=>`${e}(${t})`,Ye={filter(e){return e!=="auto"?e:VJ},backdropFilter(e){return e!=="auto"?e:WJ},ring(e){return UJ(Ye.px(e))},bgClip(e){return e==="text"?{color:"transparent",backgroundClip:"text"}:{backgroundClip:e}},transform(e){return e==="auto"?jJ():e==="auto-gpu"?HJ():e},vh(e){return e==="$100vh"?"var(--chakra-vh)":e},px(e){if(e==null)return e;const{unitless:t}=eee(e);return t||typeof e=="number"?`${e}px`:e},fraction(e){return typeof e!="number"||e>1?e:`${e*100}%`},float(e,t){const n={left:"right",right:"left"};return t.direction==="rtl"?n[e]:e},degree(e){if(JJ(e)||e==null)return e;const t=typeof e=="string"&&!e.endsWith("deg");return typeof e=="number"||t?`${e}deg`:e},gradient:QJ,blur:Io("blur"),opacity:Io("opacity"),brightness:Io("brightness"),contrast:Io("contrast"),dropShadow:Io("drop-shadow"),grayscale:Io("grayscale"),hueRotate:Io("hue-rotate"),invert:Io("invert"),saturate:Io("saturate"),sepia:Io("sepia"),bgImage(e){return e==null||VD(e)||HD.has(e)?e:`url(${e})`},outline(e){const t=String(e)==="0"||String(e)==="none";return e!==null&&t?{outline:"2px solid transparent",outlineOffset:"2px"}:{outline:e}},flexDirection(e){var i;const{space:t,divide:n}=(i=GJ[e])!=null?i:{},r={flexDirection:e};return t&&(r[t]=1),n&&(r[n]=1),r}},q={borderWidths:Yi("borderWidths"),borderStyles:Yi("borderStyles"),colors:Yi("colors"),borders:Yi("borders"),radii:Yi("radii",Ye.px),space:Yi("space",N1(Ye.vh,Ye.px)),spaceT:Yi("space",N1(Ye.vh,Ye.px)),degreeT(e){return{property:e,transform:Ye.degree}},prop(e,t,n){return{property:e,scale:t,...t&&{transform:Fp({scale:t,transform:n})}}},propT(e,t){return{property:e,transform:t}},sizes:Yi("sizes",N1(Ye.vh,Ye.px)),sizesT:Yi("sizes",N1(Ye.vh,Ye.fraction)),shadows:Yi("shadows"),logical:zJ,blur:Yi("blur",Ye.blur)},eg={background:q.colors("background"),backgroundColor:q.colors("backgroundColor"),backgroundImage:q.propT("backgroundImage",Ye.bgImage),backgroundSize:!0,backgroundPosition:!0,backgroundRepeat:!0,backgroundAttachment:!0,backgroundClip:{transform:Ye.bgClip},bgSize:q.prop("backgroundSize"),bgPosition:q.prop("backgroundPosition"),bg:q.colors("background"),bgColor:q.colors("backgroundColor"),bgPos:q.prop("backgroundPosition"),bgRepeat:q.prop("backgroundRepeat"),bgAttachment:q.prop("backgroundAttachment"),bgGradient:q.propT("backgroundImage",Ye.gradient),bgClip:{transform:Ye.bgClip}};Object.assign(eg,{bgImage:eg.backgroundImage,bgImg:eg.backgroundImage});var Je={border:q.borders("border"),borderWidth:q.borderWidths("borderWidth"),borderStyle:q.borderStyles("borderStyle"),borderColor:q.colors("borderColor"),borderRadius:q.radii("borderRadius"),borderTop:q.borders("borderTop"),borderBlockStart:q.borders("borderBlockStart"),borderTopLeftRadius:q.radii("borderTopLeftRadius"),borderStartStartRadius:q.logical({scale:"radii",property:{ltr:"borderTopLeftRadius",rtl:"borderTopRightRadius"}}),borderEndStartRadius:q.logical({scale:"radii",property:{ltr:"borderBottomLeftRadius",rtl:"borderBottomRightRadius"}}),borderTopRightRadius:q.radii("borderTopRightRadius"),borderStartEndRadius:q.logical({scale:"radii",property:{ltr:"borderTopRightRadius",rtl:"borderTopLeftRadius"}}),borderEndEndRadius:q.logical({scale:"radii",property:{ltr:"borderBottomRightRadius",rtl:"borderBottomLeftRadius"}}),borderRight:q.borders("borderRight"),borderInlineEnd:q.borders("borderInlineEnd"),borderBottom:q.borders("borderBottom"),borderBlockEnd:q.borders("borderBlockEnd"),borderBottomLeftRadius:q.radii("borderBottomLeftRadius"),borderBottomRightRadius:q.radii("borderBottomRightRadius"),borderLeft:q.borders("borderLeft"),borderInlineStart:{property:"borderInlineStart",scale:"borders"},borderInlineStartRadius:q.logical({scale:"radii",property:{ltr:["borderTopLeftRadius","borderBottomLeftRadius"],rtl:["borderTopRightRadius","borderBottomRightRadius"]}}),borderInlineEndRadius:q.logical({scale:"radii",property:{ltr:["borderTopRightRadius","borderBottomRightRadius"],rtl:["borderTopLeftRadius","borderBottomLeftRadius"]}}),borderX:q.borders(["borderLeft","borderRight"]),borderInline:q.borders("borderInline"),borderY:q.borders(["borderTop","borderBottom"]),borderBlock:q.borders("borderBlock"),borderTopWidth:q.borderWidths("borderTopWidth"),borderBlockStartWidth:q.borderWidths("borderBlockStartWidth"),borderTopColor:q.colors("borderTopColor"),borderBlockStartColor:q.colors("borderBlockStartColor"),borderTopStyle:q.borderStyles("borderTopStyle"),borderBlockStartStyle:q.borderStyles("borderBlockStartStyle"),borderBottomWidth:q.borderWidths("borderBottomWidth"),borderBlockEndWidth:q.borderWidths("borderBlockEndWidth"),borderBottomColor:q.colors("borderBottomColor"),borderBlockEndColor:q.colors("borderBlockEndColor"),borderBottomStyle:q.borderStyles("borderBottomStyle"),borderBlockEndStyle:q.borderStyles("borderBlockEndStyle"),borderLeftWidth:q.borderWidths("borderLeftWidth"),borderInlineStartWidth:q.borderWidths("borderInlineStartWidth"),borderLeftColor:q.colors("borderLeftColor"),borderInlineStartColor:q.colors("borderInlineStartColor"),borderLeftStyle:q.borderStyles("borderLeftStyle"),borderInlineStartStyle:q.borderStyles("borderInlineStartStyle"),borderRightWidth:q.borderWidths("borderRightWidth"),borderInlineEndWidth:q.borderWidths("borderInlineEndWidth"),borderRightColor:q.colors("borderRightColor"),borderInlineEndColor:q.colors("borderInlineEndColor"),borderRightStyle:q.borderStyles("borderRightStyle"),borderInlineEndStyle:q.borderStyles("borderInlineEndStyle"),borderTopRadius:q.radii(["borderTopLeftRadius","borderTopRightRadius"]),borderBottomRadius:q.radii(["borderBottomLeftRadius","borderBottomRightRadius"]),borderLeftRadius:q.radii(["borderTopLeftRadius","borderBottomLeftRadius"]),borderRightRadius:q.radii(["borderTopRightRadius","borderBottomRightRadius"])};Object.assign(Je,{rounded:Je.borderRadius,roundedTop:Je.borderTopRadius,roundedTopLeft:Je.borderTopLeftRadius,roundedTopRight:Je.borderTopRightRadius,roundedTopStart:Je.borderStartStartRadius,roundedTopEnd:Je.borderStartEndRadius,roundedBottom:Je.borderBottomRadius,roundedBottomLeft:Je.borderBottomLeftRadius,roundedBottomRight:Je.borderBottomRightRadius,roundedBottomStart:Je.borderEndStartRadius,roundedBottomEnd:Je.borderEndEndRadius,roundedLeft:Je.borderLeftRadius,roundedRight:Je.borderRightRadius,roundedStart:Je.borderInlineStartRadius,roundedEnd:Je.borderInlineEndRadius,borderStart:Je.borderInlineStart,borderEnd:Je.borderInlineEnd,borderTopStartRadius:Je.borderStartStartRadius,borderTopEndRadius:Je.borderStartEndRadius,borderBottomStartRadius:Je.borderEndStartRadius,borderBottomEndRadius:Je.borderEndEndRadius,borderStartRadius:Je.borderInlineStartRadius,borderEndRadius:Je.borderInlineEndRadius,borderStartWidth:Je.borderInlineStartWidth,borderEndWidth:Je.borderInlineEndWidth,borderStartColor:Je.borderInlineStartColor,borderEndColor:Je.borderInlineEndColor,borderStartStyle:Je.borderInlineStartStyle,borderEndStyle:Je.borderInlineEndStyle});var tee={color:q.colors("color"),textColor:q.colors("color"),fill:q.colors("fill"),stroke:q.colors("stroke")},e3={boxShadow:q.shadows("boxShadow"),mixBlendMode:!0,blendMode:q.prop("mixBlendMode"),backgroundBlendMode:!0,bgBlendMode:q.prop("backgroundBlendMode"),opacity:!0};Object.assign(e3,{shadow:e3.boxShadow});var nee={filter:{transform:Ye.filter},blur:q.blur("--chakra-blur"),brightness:q.propT("--chakra-brightness",Ye.brightness),contrast:q.propT("--chakra-contrast",Ye.contrast),hueRotate:q.degreeT("--chakra-hue-rotate"),invert:q.propT("--chakra-invert",Ye.invert),saturate:q.propT("--chakra-saturate",Ye.saturate),dropShadow:q.propT("--chakra-drop-shadow",Ye.dropShadow),backdropFilter:{transform:Ye.backdropFilter},backdropBlur:q.blur("--chakra-backdrop-blur"),backdropBrightness:q.propT("--chakra-backdrop-brightness",Ye.brightness),backdropContrast:q.propT("--chakra-backdrop-contrast",Ye.contrast),backdropHueRotate:q.degreeT("--chakra-backdrop-hue-rotate"),backdropInvert:q.propT("--chakra-backdrop-invert",Ye.invert),backdropSaturate:q.propT("--chakra-backdrop-saturate",Ye.saturate)},Jg={alignItems:!0,alignContent:!0,justifyItems:!0,justifyContent:!0,flexWrap:!0,flexDirection:{transform:Ye.flexDirection},experimental_spaceX:{static:KJ,transform:Fp({scale:"space",transform:e=>e!==null?{"--chakra-space-x":e}:null})},experimental_spaceY:{static:qJ,transform:Fp({scale:"space",transform:e=>e!=null?{"--chakra-space-y":e}:null})},flex:!0,flexFlow:!0,flexGrow:!0,flexShrink:!0,flexBasis:q.sizes("flexBasis"),justifySelf:!0,alignSelf:!0,order:!0,placeItems:!0,placeContent:!0,placeSelf:!0,gap:q.space("gap"),rowGap:q.space("rowGap"),columnGap:q.space("columnGap")};Object.assign(Jg,{flexDir:Jg.flexDirection});var WD={gridGap:q.space("gridGap"),gridColumnGap:q.space("gridColumnGap"),gridRowGap:q.space("gridRowGap"),gridColumn:!0,gridRow:!0,gridAutoFlow:!0,gridAutoColumns:!0,gridColumnStart:!0,gridColumnEnd:!0,gridRowStart:!0,gridRowEnd:!0,gridAutoRows:!0,gridTemplate:!0,gridTemplateColumns:!0,gridTemplateRows:!0,gridTemplateAreas:!0,gridArea:!0},ree={appearance:!0,cursor:!0,resize:!0,userSelect:!0,pointerEvents:!0,outline:{transform:Ye.outline},outlineOffset:!0,outlineColor:q.colors("outlineColor")},wi={width:q.sizesT("width"),inlineSize:q.sizesT("inlineSize"),height:q.sizes("height"),blockSize:q.sizes("blockSize"),boxSize:q.sizes(["width","height"]),minWidth:q.sizes("minWidth"),minInlineSize:q.sizes("minInlineSize"),minHeight:q.sizes("minHeight"),minBlockSize:q.sizes("minBlockSize"),maxWidth:q.sizes("maxWidth"),maxInlineSize:q.sizes("maxInlineSize"),maxHeight:q.sizes("maxHeight"),maxBlockSize:q.sizes("maxBlockSize"),overflow:!0,overflowX:!0,overflowY:!0,overscrollBehavior:!0,overscrollBehaviorX:!0,overscrollBehaviorY:!0,display:!0,verticalAlign:!0,boxSizing:!0,boxDecorationBreak:!0,float:q.propT("float",Ye.float),objectFit:!0,objectPosition:!0,visibility:!0,isolation:!0};Object.assign(wi,{w:wi.width,h:wi.height,minW:wi.minWidth,maxW:wi.maxWidth,minH:wi.minHeight,maxH:wi.maxHeight,overscroll:wi.overscrollBehavior,overscrollX:wi.overscrollBehaviorX,overscrollY:wi.overscrollBehaviorY});var iee={listStyleType:!0,listStylePosition:!0,listStylePos:q.prop("listStylePosition"),listStyleImage:!0,listStyleImg:q.prop("listStyleImage")};function oee(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var aee=e=>{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r=="undefined")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},see=aee(oee),lee={border:"0px",clip:"rect(0, 0, 0, 0)",width:"1px",height:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},cee={position:"static",width:"auto",height:"auto",clip:"auto",padding:"0",margin:"0",overflow:"visible",whiteSpace:"normal"},bb=(e,t,n)=>{const r={},i=see(e,t,{});for(const o in i)o in n&&n[o]!=null||(r[o]=i[o]);return r},uee={srOnly:{transform(e){return e===!0?lee:e==="focusable"?cee:{}}},layerStyle:{processResult:!0,transform:(e,t,n)=>bb(t,`layerStyles.${e}`,n)},textStyle:{processResult:!0,transform:(e,t,n)=>bb(t,`textStyles.${e}`,n)},apply:{processResult:!0,transform:(e,t,n)=>bb(t,e,n)}},np={position:!0,pos:q.prop("position"),zIndex:q.prop("zIndex","zIndices"),inset:q.spaceT("inset"),insetX:q.spaceT(["left","right"]),insetInline:q.spaceT("insetInline"),insetY:q.spaceT(["top","bottom"]),insetBlock:q.spaceT("insetBlock"),top:q.spaceT("top"),insetBlockStart:q.spaceT("insetBlockStart"),bottom:q.spaceT("bottom"),insetBlockEnd:q.spaceT("insetBlockEnd"),left:q.spaceT("left"),insetInlineStart:q.logical({scale:"space",property:{ltr:"left",rtl:"right"}}),right:q.spaceT("right"),insetInlineEnd:q.logical({scale:"space",property:{ltr:"right",rtl:"left"}})};Object.assign(np,{insetStart:np.insetInlineStart,insetEnd:np.insetInlineEnd});var dee={ring:{transform:Ye.ring},ringColor:q.colors("--chakra-ring-color"),ringOffset:q.prop("--chakra-ring-offset-width"),ringOffsetColor:q.colors("--chakra-ring-offset-color"),ringInset:q.prop("--chakra-ring-inset")},Et={margin:q.spaceT("margin"),marginTop:q.spaceT("marginTop"),marginBlockStart:q.spaceT("marginBlockStart"),marginRight:q.spaceT("marginRight"),marginInlineEnd:q.spaceT("marginInlineEnd"),marginBottom:q.spaceT("marginBottom"),marginBlockEnd:q.spaceT("marginBlockEnd"),marginLeft:q.spaceT("marginLeft"),marginInlineStart:q.spaceT("marginInlineStart"),marginX:q.spaceT(["marginInlineStart","marginInlineEnd"]),marginInline:q.spaceT("marginInline"),marginY:q.spaceT(["marginTop","marginBottom"]),marginBlock:q.spaceT("marginBlock"),padding:q.space("padding"),paddingTop:q.space("paddingTop"),paddingBlockStart:q.space("paddingBlockStart"),paddingRight:q.space("paddingRight"),paddingBottom:q.space("paddingBottom"),paddingBlockEnd:q.space("paddingBlockEnd"),paddingLeft:q.space("paddingLeft"),paddingInlineStart:q.space("paddingInlineStart"),paddingInlineEnd:q.space("paddingInlineEnd"),paddingX:q.space(["paddingInlineStart","paddingInlineEnd"]),paddingInline:q.space("paddingInline"),paddingY:q.space(["paddingTop","paddingBottom"]),paddingBlock:q.space("paddingBlock")};Object.assign(Et,{m:Et.margin,mt:Et.marginTop,mr:Et.marginRight,me:Et.marginInlineEnd,marginEnd:Et.marginInlineEnd,mb:Et.marginBottom,ml:Et.marginLeft,ms:Et.marginInlineStart,marginStart:Et.marginInlineStart,mx:Et.marginX,my:Et.marginY,p:Et.padding,pt:Et.paddingTop,py:Et.paddingY,px:Et.paddingX,pb:Et.paddingBottom,pl:Et.paddingLeft,ps:Et.paddingInlineStart,paddingStart:Et.paddingInlineStart,pr:Et.paddingRight,pe:Et.paddingInlineEnd,paddingEnd:Et.paddingInlineEnd});var fee={textDecorationColor:q.colors("textDecorationColor"),textDecoration:!0,textDecor:{property:"textDecoration"},textDecorationLine:!0,textDecorationStyle:!0,textDecorationThickness:!0,textUnderlineOffset:!0,textShadow:q.shadows("textShadow")},pee={clipPath:!0,transform:q.propT("transform",Ye.transform),transformOrigin:!0,translateX:q.spaceT("--chakra-translate-x"),translateY:q.spaceT("--chakra-translate-y"),skewX:q.degreeT("--chakra-skew-x"),skewY:q.degreeT("--chakra-skew-y"),scaleX:q.prop("--chakra-scale-x"),scaleY:q.prop("--chakra-scale-y"),scale:q.prop(["--chakra-scale-x","--chakra-scale-y"]),rotate:q.degreeT("--chakra-rotate")},hee={transition:!0,transitionDelay:!0,animation:!0,willChange:!0,transitionDuration:q.prop("transitionDuration","transition.duration"),transitionProperty:q.prop("transitionProperty","transition.property"),transitionTimingFunction:q.prop("transitionTimingFunction","transition.easing")},mee={fontFamily:q.prop("fontFamily","fonts"),fontSize:q.prop("fontSize","fontSizes",Ye.px),fontWeight:q.prop("fontWeight","fontWeights"),lineHeight:q.prop("lineHeight","lineHeights"),letterSpacing:q.prop("letterSpacing","letterSpacings"),textAlign:!0,fontStyle:!0,wordBreak:!0,overflowWrap:!0,textOverflow:!0,textTransform:!0,whiteSpace:!0,noOfLines:{static:{overflow:"hidden",textOverflow:"ellipsis",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"var(--chakra-line-clamp)"},property:"--chakra-line-clamp"}},gee={scrollBehavior:!0,scrollSnapAlign:!0,scrollSnapStop:!0,scrollSnapType:!0,scrollMargin:q.spaceT("scrollMargin"),scrollMarginTop:q.spaceT("scrollMarginTop"),scrollMarginBottom:q.spaceT("scrollMarginBottom"),scrollMarginLeft:q.spaceT("scrollMarginLeft"),scrollMarginRight:q.spaceT("scrollMarginRight"),scrollMarginX:q.spaceT(["scrollMarginLeft","scrollMarginRight"]),scrollMarginY:q.spaceT(["scrollMarginTop","scrollMarginBottom"]),scrollPadding:q.spaceT("scrollPadding"),scrollPaddingTop:q.spaceT("scrollPaddingTop"),scrollPaddingBottom:q.spaceT("scrollPaddingBottom"),scrollPaddingLeft:q.spaceT("scrollPaddingLeft"),scrollPaddingRight:q.spaceT("scrollPaddingRight"),scrollPaddingX:q.spaceT(["scrollPaddingLeft","scrollPaddingRight"]),scrollPaddingY:q.spaceT(["scrollPaddingTop","scrollPaddingBottom"])};function UD(e){return Ko(e)&&e.reference?e.reference:String(e)}var uy=(e,...t)=>t.map(UD).join(` ${e} `).replace(/calc/g,""),Ck=(...e)=>`calc(${uy("+",...e)})`,kk=(...e)=>`calc(${uy("-",...e)})`,t3=(...e)=>`calc(${uy("*",...e)})`,Ek=(...e)=>`calc(${uy("/",...e)})`,Ik=e=>{const t=UD(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:t3(t,-1)},Dl=Object.assign(e=>({add:(...t)=>Dl(Ck(e,...t)),subtract:(...t)=>Dl(kk(e,...t)),multiply:(...t)=>Dl(t3(e,...t)),divide:(...t)=>Dl(Ek(e,...t)),negate:()=>Dl(Ik(e)),toString:()=>e.toString()}),{add:Ck,subtract:kk,multiply:t3,divide:Ek,negate:Ik});function vee(e,t="-"){return e.replace(/\s+/g,t)}function yee(e){const t=vee(e.toString());return xee(bee(t))}function bee(e){return e.includes("\\.")?e:!Number.isInteger(parseFloat(e.toString()))?e.replace(".","\\."):e}function xee(e){return e.replace(/[!-,/:-@[-^`{-~]/g,"\\$&")}function See(e,t=""){return[t,e].filter(Boolean).join("-")}function wee(e,t){return`var(${e}${t?`, ${t}`:""})`}function Cee(e,t=""){return yee(`--${See(e,t)}`)}function nl(e,t,n){const r=Cee(e,n);return{variable:r,reference:wee(r,t)}}function kee(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function Eee(e){const t=e==null?0:e.length;return t?e[t-1]:void 0}function Iee(e){const t=parseFloat(e.toString()),n=e.toString().replace(String(t),"");return{unitless:!n,value:t,unit:n}}function n3(e){if(e==null)return e;const{unitless:t}=Iee(e);return t||typeof e=="number"?`${e}px`:e}var GD=(e,t)=>parseInt(e[1],10)>parseInt(t[1],10)?1:-1,r9=e=>Object.fromEntries(Object.entries(e).sort(GD));function Tk(e){const t=r9(e);return Object.assign(Object.values(t),t)}function Tee(e){const t=Object.keys(r9(e));return new Set(t)}function _k(e){var n;if(!e)return e;e=(n=n3(e))!=null?n:e;const t=e.endsWith("px")?-1:-.0625;return typeof e=="number"?`${e+t}`:e.replace(/(\d+\.?\d*)/u,r=>`${parseFloat(r)+t}`)}function Ff(e,t){const n=["@media screen"];return e&&n.push("and",`(min-width: ${n3(e)})`),t&&n.push("and",`(max-width: ${n3(t)})`),n.join(" ")}function _ee(e){var o;if(!e)return null;e.base=(o=e.base)!=null?o:"0px";const t=Tk(e),n=Object.entries(e).sort(GD).map(([a,s],l,c)=>{var d;let[,u]=(d=c[l+1])!=null?d:[];return u=parseFloat(u)>0?_k(u):void 0,{_minW:_k(s),breakpoint:a,minW:s,maxW:u,maxWQuery:Ff(null,u),minWQuery:Ff(s),minMaxQuery:Ff(s,u)}}),r=Tee(e),i=Array.from(r.values());return{keys:r,normalized:t,isResponsive(a){const s=Object.keys(a);return s.length>0&&s.every(l=>r.has(l))},asObject:r9(e),asArray:Tk(e),details:n,media:[null,...t.map(a=>Ff(a)).slice(1)],toArrayValue(a){if(!kee(a))throw new Error("toArrayValue: value must be an object");const s=i.map(l=>{var c;return(c=a[l])!=null?c:null});for(;Eee(s)===null;)s.pop();return s},toObjectValue(a){if(!Array.isArray(a))throw new Error("toObjectValue: value must be an array");return a.reduce((s,l,c)=>{const u=i[c];return u!=null&&l!=null&&(s[u]=l),s},{})}}}var Hn={hover:(e,t)=>`${e}:hover ${t}, ${e}[data-hover] ${t}`,focus:(e,t)=>`${e}:focus ${t}, ${e}[data-focus] ${t}`,focusVisible:(e,t)=>`${e}:focus-visible ${t}`,focusWithin:(e,t)=>`${e}:focus-within ${t}`,active:(e,t)=>`${e}:active ${t}, ${e}[data-active] ${t}`,disabled:(e,t)=>`${e}:disabled ${t}, ${e}[data-disabled] ${t}`,invalid:(e,t)=>`${e}:invalid ${t}, ${e}[data-invalid] ${t}`,checked:(e,t)=>`${e}:checked ${t}, ${e}[data-checked] ${t}`,indeterminate:(e,t)=>`${e}:indeterminate ${t}, ${e}[aria-checked=mixed] ${t}, ${e}[data-indeterminate] ${t}`,readOnly:(e,t)=>`${e}:read-only ${t}, ${e}[readonly] ${t}, ${e}[data-read-only] ${t}`,expanded:(e,t)=>`${e}:read-only ${t}, ${e}[aria-expanded=true] ${t}, ${e}[data-expanded] ${t}`,placeholderShown:(e,t)=>`${e}:placeholder-shown ${t}`},Qa=e=>KD(t=>e(t,"&"),"[role=group]","[data-group]",".group"),fa=e=>KD(t=>e(t,"~ &"),"[data-peer]",".peer"),KD=(e,...t)=>t.map(e).join(", "),dy={_hover:"&:hover, &[data-hover]",_active:"&:active, &[data-active]",_focus:"&:focus, &[data-focus]",_highlighted:"&[data-highlighted]",_focusWithin:"&:focus-within",_focusVisible:"&:focus-visible, &[data-focus-visible]",_disabled:"&:disabled, &[aria-disabled=true], &[data-disabled]",_readOnly:"&[aria-readonly=true], &[readonly], &[data-readonly]",_before:"&::before",_after:"&::after",_empty:"&:empty",_expanded:"&[aria-expanded=true], &[data-expanded]",_checked:"&[aria-checked=true], &[data-checked]",_grabbed:"&[aria-grabbed=true], &[data-grabbed]",_pressed:"&[aria-pressed=true], &[data-pressed]",_invalid:"&[aria-invalid=true], &[data-invalid]",_valid:"&[data-valid], &[data-state=valid]",_loading:"&[data-loading], &[aria-busy=true]",_selected:"&[aria-selected=true], &[data-selected]",_hidden:"&[hidden], &[data-hidden]",_autofill:"&:-webkit-autofill",_even:"&:nth-of-type(even)",_odd:"&:nth-of-type(odd)",_first:"&:first-of-type",_last:"&:last-of-type",_notFirst:"&:not(:first-of-type)",_notLast:"&:not(:last-of-type)",_visited:"&:visited",_activeLink:"&[aria-current=page]",_activeStep:"&[aria-current=step]",_indeterminate:"&:indeterminate, &[aria-checked=mixed], &[data-indeterminate]",_groupHover:Qa(Hn.hover),_peerHover:fa(Hn.hover),_groupFocus:Qa(Hn.focus),_peerFocus:fa(Hn.focus),_groupFocusVisible:Qa(Hn.focusVisible),_peerFocusVisible:fa(Hn.focusVisible),_groupActive:Qa(Hn.active),_peerActive:fa(Hn.active),_groupDisabled:Qa(Hn.disabled),_peerDisabled:fa(Hn.disabled),_groupInvalid:Qa(Hn.invalid),_peerInvalid:fa(Hn.invalid),_groupChecked:Qa(Hn.checked),_peerChecked:fa(Hn.checked),_groupFocusWithin:Qa(Hn.focusWithin),_peerFocusWithin:fa(Hn.focusWithin),_peerPlaceholderShown:fa(Hn.placeholderShown),_placeholder:"&::placeholder",_placeholderShown:"&:placeholder-shown",_fullScreen:"&:fullscreen",_selection:"&::selection",_rtl:"[dir=rtl] &, &[dir=rtl]",_ltr:"[dir=ltr] &, &[dir=ltr]",_mediaDark:"@media (prefers-color-scheme: dark)",_mediaReduceMotion:"@media (prefers-reduced-motion: reduce)",_dark:".chakra-ui-dark &:not([data-theme]),[data-theme=dark] &:not([data-theme]),&[data-theme=dark]",_light:".chakra-ui-light &:not([data-theme]),[data-theme=light] &:not([data-theme]),&[data-theme=light]"},Pee=Object.keys(dy);function Pk(e,t){return nl(String(e).replace(/\./g,"-"),void 0,t)}function Oee(e,t){let n={};const r={};for(const[i,o]of Object.entries(e)){const{isSemantic:a,value:s}=o,{variable:l,reference:c}=Pk(i,t==null?void 0:t.cssVarPrefix);if(!a){if(i.startsWith("space")){const f=i.split("."),[p,...m]=f,g=`${p}.-${m.join(".")}`,y=Dl.negate(s),v=Dl.negate(c);r[g]={value:y,var:l,varRef:v}}n[l]=s,r[i]={value:s,var:l,varRef:c};continue}const u=f=>{const m=[String(i).split(".")[0],f].join(".");if(!e[m])return f;const{reference:y}=Pk(m,t==null?void 0:t.cssVarPrefix);return y},d=Ko(s)?s:{default:s};n=Oi(n,Object.entries(d).reduce((f,[p,m])=>{var b;var g;const y=u(m);if(p==="default")return f[l]=y,f;const v=(b=(g=dy)==null?void 0:g[p])!=null?b:p;return f[v]={[l]:y},f},{})),r[i]={value:c,var:l,varRef:c}}return{cssVars:n,cssMap:r}}function Mee(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function Ree(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}var Dee=["colors","borders","borderWidths","borderStyles","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","space","shadows","sizes","zIndices","transition","blur"];function Aee(e){return Ree(e,Dee)}function Lee(e){return e.semanticTokens}function Bee(e){const{__cssMap:t,__cssVars:n,__breakpoints:r,...i}=e;return i}function $ee({tokens:e,semanticTokens:t}){var i,o;const n=Object.entries((i=r3(e))!=null?i:{}).map(([a,s])=>[a,{isSemantic:!1,value:s}]),r=Object.entries((o=r3(t,1))!=null?o:{}).map(([a,s])=>[a,{isSemantic:!0,value:s}]);return Object.fromEntries([...n,...r])}function r3(e,t=1/0){return!Ko(e)&&!Array.isArray(e)||!t?e:Object.entries(e).reduce((n,[r,i])=>(Ko(i)||Array.isArray(i)?Object.entries(r3(i,t-1)).forEach(([o,a])=>{n[`${r}.${o}`]=a}):n[r]=i,n),{})}function Fee(e){var t;const n=Bee(e),r=Aee(n),i=Lee(n),o=$ee({tokens:r,semanticTokens:i}),a=(t=n.config)==null?void 0:t.cssVarPrefix,{cssMap:s,cssVars:l}=Oee(o,{cssVarPrefix:a});return Object.assign(n,{__cssVars:{...{"--chakra-ring-inset":"var(--chakra-empty,/*!*/ /*!*/)","--chakra-ring-offset-width":"0px","--chakra-ring-offset-color":"#fff","--chakra-ring-color":"rgba(66, 153, 225, 0.6)","--chakra-ring-offset-shadow":"0 0 #0000","--chakra-ring-shadow":"0 0 #0000","--chakra-space-x-reverse":"0","--chakra-space-y-reverse":"0"},...l},__cssMap:s,__breakpoints:_ee(n.breakpoints)}),n}var i9=Oi({},eg,Je,tee,Jg,wi,nee,dee,ree,WD,uee,np,e3,Et,gee,mee,fee,pee,iee,hee);Object.assign({},Et,wi,Jg,WD,np);var Nee=[...Object.keys(i9),...Pee],zee={...i9,...dy},jee=e=>e in zee,Hee=e=>t=>{if(!t.__breakpoints)return e;const{isResponsive:n,toArrayValue:r,media:i}=t.__breakpoints,o={};for(const a in e){let s=zl(e[a],t);if(s==null)continue;if(s=Ko(s)&&n(s)?r(s):s,!Array.isArray(s)){o[a]=s;continue}const l=s.slice(0,i.length).length;for(let c=0;c<l;c+=1){const u=i==null?void 0:i[c];if(!u){o[a]=s[c];continue}o[u]=o[u]||{},s[c]!=null&&(o[u][a]=s[c])}}return o};function Vee(e){const t=[];let n="",r=!1;for(let i=0;i<e.length;i++){const o=e[i];o==="("?(r=!0,n+=o):o===")"?(r=!1,n+=o):o===","&&!r?(t.push(n),n=""):n+=o}return n=n.trim(),n&&t.push(n),t}function Wee(e){return/^var\(--.+\)$/.test(e)}var Uee=(e,t)=>e.startsWith("--")&&typeof t=="string"&&!Wee(t),Gee=(e,t)=>{var a,s;if(t==null)return t;const n=l=>{var c,u;return(u=(c=e.__cssMap)==null?void 0:c[l])==null?void 0:u.varRef},r=l=>{var c;return(c=n(l))!=null?c:l},[i,o]=Vee(t);return t=(s=(a=n(i))!=null?a:r(o))!=null?s:r(t),t};function Kee(e){const{configs:t={},pseudos:n={},theme:r}=e,i=(o,a=!1)=>{var d,f;var s;const l=zl(o,r),c=Hee(l)(r);let u={};for(let p in c){const m=c[p];let g=zl(m,r);p in n&&(p=n[p]),Uee(p,g)&&(g=Gee(r,g));let y=t[p];if(y===!0&&(y={property:p}),Ko(g)){u[p]=(d=u[p])!=null?d:{},u[p]=Oi({},u[p],i(g,!0));continue}let v=(f=(s=y==null?void 0:y.transform)==null?void 0:s.call(y,g,r,l))!=null?f:g;v=y!=null&&y.processResult?i(v,!0):v;const b=zl(y==null?void 0:y.property,r);if(!a&&(y==null?void 0:y.static)){const x=zl(y.static,r);u=Oi({},u,x)}if(b&&Array.isArray(b)){for(const x of b)u[x]=v;continue}if(b){b==="&"&&Ko(v)?u=Oi({},u,v):u[b]=v;continue}if(Ko(v)){u=Oi({},u,v);continue}u[p]=v}return u};return i}var qD=e=>t=>Kee({theme:t,pseudos:dy,configs:i9})(e);function zt(e){return{definePartsStyle(t){return t},defineMultiStyleConfig(t){return{parts:e,...t}}}}function qee(e,t){if(Array.isArray(e))return e;if(Ko(e))return t(e);if(e!=null)return[e]}function Yee(e,t){for(let n=t+1;n<e.length;n++)if(e[n]!=null)return n;return-1}function Xee(e){const t=e.__breakpoints;return function(r,i,o,a){var s,l;if(!t)return;const c={},u=qee(o,t.toArrayValue);if(!u)return c;const d=u.length,f=d===1,p=!!r.parts;for(let m=0;m<d;m++){const g=t.details[m],y=t.details[Yee(u,m)],v=Ff(g.minW,y==null?void 0:y._minW),b=zl((s=r[i])==null?void 0:s[u[m]],a);if(!!b){if(p){(l=r.parts)==null||l.forEach(x=>{Oi(c,{[x]:f?b[x]:{[v]:b[x]}})});continue}if(!p){f?Oi(c,b):c[v]=b;continue}c[v]=b}}return c}}function Zee(e){return t=>{var a;const{variant:n,size:r,theme:i}=t,o=Xee(i);return Oi({},zl((a=e.baseStyle)!=null?a:{},t),o(e,"sizes",r,t),o(e,"variants",n,t))}}function nn(e){return Mee(e,["styleConfig","size","variant","colorScheme"])}function Qee(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Jee(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var ete=function(){function e(n){var r=this;this._insertTag=function(i){var o;r.tags.length===0?r.insertionPoint?o=r.insertionPoint.nextSibling:r.prepend?o=r.container.firstChild:o=r.before:o=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(i,o),r.tags.push(i)},this.isSpeedy=n.speedy===void 0?!0:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Jee(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var o=Qee(i);try{o.insertRule(r,o.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){return r.parentNode&&r.parentNode.removeChild(r)}),this.tags=[],this.ctr=0},e}(),rr="-ms-",e0="-moz-",et="-webkit-",YD="comm",o9="rule",a9="decl",tte="@import",XD="@keyframes",nte=Math.abs,fy=String.fromCharCode,rte=Object.assign;function ite(e,t){return Gn(e,0)^45?(((t<<2^Gn(e,0))<<2^Gn(e,1))<<2^Gn(e,2))<<2^Gn(e,3):0}function ZD(e){return e.trim()}function ote(e,t){return(e=t.exec(e))?e[0]:e}function ot(e,t,n){return e.replace(t,n)}function i3(e,t){return e.indexOf(t)}function Gn(e,t){return e.charCodeAt(t)|0}function Np(e,t,n){return e.slice(t,n)}function Ro(e){return e.length}function s9(e){return e.length}function z1(e,t){return t.push(e),e}function ate(e,t){return e.map(t).join("")}var py=1,fd=1,QD=0,Vr=0,wn=0,zd="";function hy(e,t,n,r,i,o,a){return{value:e,root:t,parent:n,type:r,props:i,children:o,line:py,column:fd,length:a,return:""}}function gf(e,t){return rte(hy("",null,null,"",null,null,0),e,{length:-e.length},t)}function ste(){return wn}function lte(){return wn=Vr>0?Gn(zd,--Vr):0,fd--,wn===10&&(fd=1,py--),wn}function oi(){return wn=Vr<QD?Gn(zd,Vr++):0,fd++,wn===10&&(fd=1,py++),wn}function qo(){return Gn(zd,Vr)}function tg(){return Vr}function zh(e,t){return Np(zd,e,t)}function zp(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function JD(e){return py=fd=1,QD=Ro(zd=e),Vr=0,[]}function eA(e){return zd="",e}function ng(e){return ZD(zh(Vr-1,o3(e===91?e+2:e===40?e+1:e)))}function cte(e){for(;(wn=qo())&&wn<33;)oi();return zp(e)>2||zp(wn)>3?"":" "}function ute(e,t){for(;--t&&oi()&&!(wn<48||wn>102||wn>57&&wn<65||wn>70&&wn<97););return zh(e,tg()+(t<6&&qo()==32&&oi()==32))}function o3(e){for(;oi();)switch(wn){case e:return Vr;case 34:case 39:e!==34&&e!==39&&o3(wn);break;case 40:e===41&&o3(e);break;case 92:oi();break}return Vr}function dte(e,t){for(;oi()&&e+wn!==47+10;)if(e+wn===42+42&&qo()===47)break;return"/*"+zh(t,Vr-1)+"*"+fy(e===47?e:oi())}function fte(e){for(;!zp(qo());)oi();return zh(e,Vr)}function pte(e){return eA(rg("",null,null,null,[""],e=JD(e),0,[0],e))}function rg(e,t,n,r,i,o,a,s,l){for(var c=0,u=0,d=a,f=0,p=0,m=0,g=1,y=1,v=1,b=0,x="",w=i,E=o,C=r,I=x;y;)switch(m=b,b=oi()){case 40:if(m!=108&&Gn(I,d-1)==58){i3(I+=ot(ng(b),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:I+=ng(b);break;case 9:case 10:case 13:case 32:I+=cte(m);break;case 92:I+=ute(tg()-1,7);continue;case 47:switch(qo()){case 42:case 47:z1(hte(dte(oi(),tg()),t,n),l);break;default:I+="/"}break;case 123*g:s[c++]=Ro(I)*v;case 125*g:case 59:case 0:switch(b){case 0:case 125:y=0;case 59+u:p>0&&Ro(I)-d&&z1(p>32?Mk(I+";",r,n,d-1):Mk(ot(I," ","")+";",r,n,d-2),l);break;case 59:I+=";";default:if(z1(C=Ok(I,t,n,c,u,i,s,x,w=[],E=[],d),o),b===123)if(u===0)rg(I,t,C,C,w,o,d,s,E);else switch(f===99&&Gn(I,3)===110?100:f){case 100:case 109:case 115:rg(e,C,C,r&&z1(Ok(e,C,C,0,0,i,s,x,i,w=[],d),E),i,E,d,s,r?w:E);break;default:rg(I,C,C,C,[""],E,0,s,E)}}c=u=p=0,g=v=1,x=I="",d=a;break;case 58:d=1+Ro(I),p=m;default:if(g<1){if(b==123)--g;else if(b==125&&g++==0&&lte()==125)continue}switch(I+=fy(b),b*g){case 38:v=u>0?1:(I+="\f",-1);break;case 44:s[c++]=(Ro(I)-1)*v,v=1;break;case 64:qo()===45&&(I+=ng(oi())),f=qo(),u=d=Ro(x=I+=fte(tg())),b++;break;case 45:m===45&&Ro(I)==2&&(g=0)}}return o}function Ok(e,t,n,r,i,o,a,s,l,c,u){for(var d=i-1,f=i===0?o:[""],p=s9(f),m=0,g=0,y=0;m<r;++m)for(var v=0,b=Np(e,d+1,d=nte(g=a[m])),x=e;v<p;++v)(x=ZD(g>0?f[v]+" "+b:ot(b,/&\f/g,f[v])))&&(l[y++]=x);return hy(e,t,n,i===0?o9:s,l,c,u)}function hte(e,t,n){return hy(e,t,n,YD,fy(ste()),Np(e,2,-2),0)}function Mk(e,t,n,r){return hy(e,t,n,a9,Np(e,0,r),Np(e,r+1,-1),r)}function ju(e,t){for(var n="",r=s9(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||"";return n}function mte(e,t,n,r){switch(e.type){case tte:case a9:return e.return=e.return||e.value;case YD:return"";case XD:return e.return=e.value+"{"+ju(e.children,r)+"}";case o9:e.value=e.props.join(",")}return Ro(n=ju(e.children,r))?e.return=e.value+"{"+n+"}":""}function gte(e){var t=s9(e);return function(n,r,i,o){for(var a="",s=0;s<t;s++)a+=e[s](n,r,i,o)||"";return a}}function vte(e){return function(t){t.root||(t=t.return)&&e(t)}}var Rk=function(t){var n=new WeakMap;return function(r){if(n.has(r))return n.get(r);var i=t(r);return n.set(r,i),i}};function tA(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var yte=function(t,n,r){for(var i=0,o=0;i=o,o=qo(),i===38&&o===12&&(n[r]=1),!zp(o);)oi();return zh(t,Vr)},bte=function(t,n){var r=-1,i=44;do switch(zp(i)){case 0:i===38&&qo()===12&&(n[r]=1),t[r]+=yte(Vr-1,n,r);break;case 2:t[r]+=ng(i);break;case 4:if(i===44){t[++r]=qo()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=fy(i)}while(i=oi());return t},xte=function(t,n){return eA(bte(JD(t),n))},Dk=new WeakMap,Ste=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,i=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!Dk.get(r))&&!i){Dk.set(t,!0);for(var o=[],a=xte(n,o),s=r.props,l=0,c=0;l<a.length;l++)for(var u=0;u<s.length;u++,c++)t.props[c]=o[l]?a[l].replace(/&\f/g,s[u]):s[u]+" "+a[l]}}},wte=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function nA(e,t){switch(ite(e,t)){case 5103:return et+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return et+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return et+e+e0+e+rr+e+e;case 6828:case 4268:return et+e+rr+e+e;case 6165:return et+e+rr+"flex-"+e+e;case 5187:return et+e+ot(e,/(\w+).+(:[^]+)/,et+"box-$1$2"+rr+"flex-$1$2")+e;case 5443:return et+e+rr+"flex-item-"+ot(e,/flex-|-self/,"")+e;case 4675:return et+e+rr+"flex-line-pack"+ot(e,/align-content|flex-|-self/,"")+e;case 5548:return et+e+rr+ot(e,"shrink","negative")+e;case 5292:return et+e+rr+ot(e,"basis","preferred-size")+e;case 6060:return et+"box-"+ot(e,"-grow","")+et+e+rr+ot(e,"grow","positive")+e;case 4554:return et+ot(e,/([^-])(transform)/g,"$1"+et+"$2")+e;case 6187:return ot(ot(ot(e,/(zoom-|grab)/,et+"$1"),/(image-set)/,et+"$1"),e,"")+e;case 5495:case 3959:return ot(e,/(image-set\([^]*)/,et+"$1$`$1");case 4968:return ot(ot(e,/(.+:)(flex-)?(.*)/,et+"box-pack:$3"+rr+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+et+e+e;case 4095:case 3583:case 4068:case 2532:return ot(e,/(.+)-inline(.+)/,et+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ro(e)-1-t>6)switch(Gn(e,t+1)){case 109:if(Gn(e,t+4)!==45)break;case 102:return ot(e,/(.+:)(.+)-([^]+)/,"$1"+et+"$2-$3$1"+e0+(Gn(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~i3(e,"stretch")?nA(ot(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Gn(e,t+1)!==115)break;case 6444:switch(Gn(e,Ro(e)-3-(~i3(e,"!important")&&10))){case 107:return ot(e,":",":"+et)+e;case 101:return ot(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+et+(Gn(e,14)===45?"inline-":"")+"box$3$1"+et+"$2$3$1"+rr+"$2box$3")+e}break;case 5936:switch(Gn(e,t+11)){case 114:return et+e+rr+ot(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return et+e+rr+ot(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return et+e+rr+ot(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return et+e+rr+e+e}return e}var Cte=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case a9:t.return=nA(t.value,t.length);break;case XD:return ju([gf(t,{value:ot(t.value,"@","@"+et)})],i);case o9:if(t.length)return ate(t.props,function(o){switch(ote(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ju([gf(t,{props:[ot(o,/:(read-\w+)/,":"+e0+"$1")]})],i);case"::placeholder":return ju([gf(t,{props:[ot(o,/:(plac\w+)/,":"+et+"input-$1")]}),gf(t,{props:[ot(o,/:(plac\w+)/,":"+e0+"$1")]}),gf(t,{props:[ot(o,/:(plac\w+)/,rr+"input-$1")]})],i)}return""})}},kte=[Cte],Ete=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(g){var y=g.getAttribute("data-emotion");y.indexOf(" ")!==-1&&(document.head.appendChild(g),g.setAttribute("data-s",""))})}var i=t.stylisPlugins||kte,o={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(g){for(var y=g.getAttribute("data-emotion").split(" "),v=1;v<y.length;v++)o[y[v]]=!0;s.push(g)});var l,c=[Ste,wte];{var u,d=[mte,vte(function(g){u.insert(g)})],f=gte(c.concat(i,d)),p=function(y){return ju(pte(y),f)};l=function(y,v,b,x){u=b,p(y?y+"{"+v.styles+"}":v.styles),x&&(m.inserted[v.name]=!0)}}var m={key:n,sheet:new ete({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:o,registered:{},insert:l};return m.sheet.hydrate(s),m};function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},J.apply(this,arguments)}var Ite=!0;function rA(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var l9=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||Ite===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},c9=function(t,n,r){l9(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var o=n;do t.insert(n===o?"."+i:"",o,t.sheet,!0),o=o.next;while(o!==void 0)}};function Tte(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var _te={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Pte=/[A-Z]|^ms/g,Ote=/_EMO_([^_]+?)_([^]*?)_EMO_/g,iA=function(t){return t.charCodeAt(1)===45},Ak=function(t){return t!=null&&typeof t!="boolean"},xb=tA(function(e){return iA(e)?e:e.replace(Pte,"-$&").toLowerCase()}),Lk=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(Ote,function(r,i,o){return Do={name:i,styles:o,next:Do},i})}return _te[t]!==1&&!iA(t)&&typeof n=="number"&&n!==0?n+"px":n};function jp(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return Do={name:n.name,styles:n.styles,next:Do},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)Do={name:r.name,styles:r.styles,next:Do},r=r.next;var i=n.styles+";";return i}return Mte(e,t,n)}case"function":{if(e!==void 0){var o=Do,a=n(e);return Do=o,jp(e,t,a)}break}}if(t==null)return n;var s=t[n];return s!==void 0?s:n}function Mte(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=jp(e,t,n[i])+";";else for(var o in n){var a=n[o];if(typeof a!="object")t!=null&&t[a]!==void 0?r+=o+"{"+t[a]+"}":Ak(a)&&(r+=xb(o)+":"+Lk(o,a)+";");else if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var s=0;s<a.length;s++)Ak(a[s])&&(r+=xb(o)+":"+Lk(o,a[s])+";");else{var l=jp(e,t,a);switch(o){case"animation":case"animationName":{r+=xb(o)+":"+l+";";break}default:r+=o+"{"+l+"}"}}}return r}var Bk=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Do,my=function(t,n,r){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var i=!0,o="";Do=void 0;var a=t[0];a==null||a.raw===void 0?(i=!1,o+=jp(r,n,a)):o+=a[0];for(var s=1;s<t.length;s++)o+=jp(r,n,t[s]),i&&(o+=a[s]);Bk.lastIndex=0;for(var l="",c;(c=Bk.exec(o))!==null;)l+="-"+c[1];var u=Tte(o)+l;return{name:u,styles:o,next:Do}},Rte=function(t){return t()},oA=Ix["useInsertionEffect"]?Ix["useInsertionEffect"]:!1,aA=oA||Rte,$k=oA||h.exports.useLayoutEffect,u9={}.hasOwnProperty,sA=h.exports.createContext(typeof HTMLElement!="undefined"?Ete({key:"css"}):null);sA.Provider;var d9=function(t){return h.exports.forwardRef(function(n,r){var i=h.exports.useContext(sA);return t(n,i,r)})},pd=h.exports.createContext({}),Dte=function(t,n){if(typeof n=="function"){var r=n(t);return r}return J({},t,n)},Ate=Rk(function(e){return Rk(function(t){return Dte(e,t)})}),Lte=function(t){var n=h.exports.useContext(pd);return t.theme!==n&&(n=Ate(n)(t.theme)),h.exports.createElement(pd.Provider,{value:n},t.children)},a3="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Bte=function(t,n){var r={};for(var i in n)u9.call(n,i)&&(r[i]=n[i]);return r[a3]=t,r},$te=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return l9(n,r,i),aA(function(){return c9(n,r,i)}),null},Fte=d9(function(e,t,n){var r=e.css;typeof r=="string"&&t.registered[r]!==void 0&&(r=t.registered[r]);var i=e[a3],o=[r],a="";typeof e.className=="string"?a=rA(t.registered,o,e.className):e.className!=null&&(a=e.className+" ");var s=my(o,void 0,h.exports.useContext(pd));a+=t.key+"-"+s.name;var l={};for(var c in e)u9.call(e,c)&&c!=="css"&&c!==a3&&(l[c]=e[c]);return l.ref=n,l.className=a,h.exports.createElement(h.exports.Fragment,null,h.exports.createElement($te,{cache:t,serialized:s,isStringTag:typeof i=="string"}),h.exports.createElement(i,l))}),ke=function(t,n){var r=arguments;if(n==null||!u9.call(n,"css"))return h.exports.createElement.apply(void 0,r);var i=r.length,o=new Array(i);o[0]=Fte,o[1]=Bte(t,n);for(var a=2;a<i;a++)o[a]=r[a];return h.exports.createElement.apply(null,o)},gy=d9(function(e,t){var n=e.styles,r=my([n],void 0,h.exports.useContext(pd)),i=h.exports.useRef();return $k(function(){var o=t.key+"-global",a=new t.sheet.constructor({key:o,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),s=!1,l=document.querySelector('style[data-emotion="'+o+" "+r.name+'"]');return t.sheet.tags.length&&(a.before=t.sheet.tags[0]),l!==null&&(s=!0,l.setAttribute("data-emotion",o),a.hydrate([l])),i.current=[a,s],function(){a.flush()}},[t]),$k(function(){var o=i.current,a=o[0],s=o[1];if(s){o[1]=!1;return}if(r.next!==void 0&&c9(t,r.next,!0),a.tags.length){var l=a.tags[a.tags.length-1].nextElementSibling;a.before=l,a.flush()}t.insert("",r,a,!1)},[t,r.name]),null});function f9(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return my(t)}var lA=function(){var t=f9.apply(void 0,arguments),n="animation-"+t.name;return{name:n,styles:"@keyframes "+n+"{"+t.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}};function mu(e){return typeof e=="function"}function Nte(e,t){const n={};return Object.keys(e).forEach(r=>{t.includes(r)||(n[r]=e[r])}),n}function zte(e,t,n,r){const i=typeof t=="string"?t.split("."):[t];for(r=0;r<i.length&&e;r+=1)e=e[i[r]];return e===void 0?n:e}var jte=e=>{const t=new WeakMap;return(r,i,o,a)=>{if(typeof r=="undefined")return e(r,i,o);t.has(r)||t.set(r,new Map);const s=t.get(r);if(s.has(i))return s.get(i);const l=e(r,i,o,a);return s.set(i,l),l}},cA=jte(zte);function uA(e,t){const n={};return Object.keys(e).forEach(r=>{const i=e[r];t(i,r,e)&&(n[r]=i)}),n}var dA=e=>uA(e,t=>t!=null);function Hte(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Vte=Hte();function fA(e,...t){return mu(e)?e(...t):e}function Wte(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var Ute=(...e)=>t=>e.reduce((n,r)=>r(n),t);Object.freeze(["base","sm","md","lg","xl","2xl"]);function Gte(e={}){const{strict:t=!0,errorMessage:n="useContext: `context` is undefined. Seems you forgot to wrap component within the Provider",name:r}=e,i=h.exports.createContext(void 0);i.displayName=r;function o(){var a;const s=h.exports.useContext(i);if(!s&&t){const l=new Error(n);throw l.name="ContextError",(a=Error.captureStackTrace)==null||a.call(Error,l,o),l}return s}return[i.Provider,o,i]}var Kte=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,qte=tA(function(e){return Kte.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Yte=qte,Xte=function(t){return t!=="theme"},Fk=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Yte:Xte},Nk=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(a){return t.__emotion_forwardProp(a)&&o(a)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},Zte=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return l9(n,r,i),aA(function(){return c9(n,r,i)}),null},Qte=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,a;n!==void 0&&(o=n.label,a=n.target);var s=Nk(t,n,r),l=s||Fk(i),c=!l("as");return function(){var u=arguments,d=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&d.push("label:"+o+";"),u[0]==null||u[0].raw===void 0)d.push.apply(d,u);else{d.push(u[0][0]);for(var f=u.length,p=1;p<f;p++)d.push(u[p],u[0][p])}var m=d9(function(g,y,v){var b=c&&g.as||i,x="",w=[],E=g;if(g.theme==null){E={};for(var C in g)E[C]=g[C];E.theme=h.exports.useContext(pd)}typeof g.className=="string"?x=rA(y.registered,w,g.className):g.className!=null&&(x=g.className+" ");var I=my(d.concat(w),y.registered,E);x+=y.key+"-"+I.name,a!==void 0&&(x+=" "+a);var T=c&&s===void 0?Fk(b):l,_={};for(var P in g)c&&P==="as"||T(P)&&(_[P]=g[P]);return _.className=x,_.ref=v,h.exports.createElement(h.exports.Fragment,null,h.exports.createElement(Zte,{cache:y,serialized:I,isStringTag:typeof b=="string"}),h.exports.createElement(b,_))});return m.displayName=o!==void 0?o:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=i,m.__emotion_styles=d,m.__emotion_forwardProp=s,Object.defineProperty(m,"toString",{value:function(){return"."+a}}),m.withComponent=function(g,y){return e(g,J({},n,y,{shouldForwardProp:Nk(m,y,!0)})).apply(void 0,d)},m}},Jte=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],s3=Qte.bind();Jte.forEach(function(e){s3[e]=s3(e)});var ene=typeof Element!="undefined",tne=typeof Map=="function",nne=typeof Set=="function",rne=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function ig(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,i;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!ig(e[r],t[r]))return!1;return!0}var o;if(tne&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;for(o=e.entries();!(r=o.next()).done;)if(!ig(r.value[1],t.get(r.value[0])))return!1;return!0}if(nne&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(o=e.entries();!(r=o.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(rne&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[r]))return!1;if(ene&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((i[r]==="_owner"||i[r]==="__v"||i[r]==="__o")&&e.$$typeof)&&!ig(e[i[r]],t[i[r]]))return!1;return!0}return e!==e&&t!==t}var ine=function(t,n){try{return ig(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};function p9(){const e=h.exports.useContext(pd);if(!e)throw Error("useTheme: `theme` is undefined. Seems you forgot to wrap your app in `<ChakraProvider />` or `<ThemeProvider />`");return e}function pA(){const e=cy(),t=p9();return{...e,theme:t}}function one(e,t,n){var i,o;if(t==null)return t;const r=a=>{var s,l;return(l=(s=e.__breakpoints)==null?void 0:s.asArray)==null?void 0:l[a]};return(o=(i=r(t))!=null?i:r(n))!=null?o:n}function ane(e,t,n){var i,o;if(t==null)return t;const r=a=>{var s,l;return(l=(s=e.__cssMap)==null?void 0:s[a])==null?void 0:l.value};return(o=(i=r(t))!=null?i:r(n))!=null?o:n}function sne(e,t,n){const r=Array.isArray(t)?t:[t],i=Array.isArray(n)?n:[n];return o=>{const a=i.filter(Boolean),s=r.map((l,c)=>{var d,f;if(e==="breakpoints")return one(o,l,(d=a[c])!=null?d:l);const u=`${e}.${l}`;return ane(o,u,(f=a[c])!=null?f:l)});return Array.isArray(t)?s:s[0]}}function hA(e){const{cssVarsRoot:t,theme:n,children:r}=e,i=h.exports.useMemo(()=>Fee(n),[n]);return A.createElement(Lte,{theme:i},A.createElement(lne,{root:t}),r)}function lne({root:e=":host, :root"}){const t=[e,"[data-theme]"].join(",");return A.createElement(gy,{styles:n=>({[t]:n.__cssVars})})}var[Xl,vy]=Gte({name:"StylesContext",errorMessage:"useStyles: `styles` is undefined. Seems you forgot to wrap the components in `<StylesProvider />` "});function cne(){const{colorMode:e}=cy();return A.createElement(gy,{styles:t=>{const n=cA(t,"styles.global"),r=fA(n,{theme:t,colorMode:e});return r?qD(r)(t):void 0}})}var une=new Set([...Nee,"textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"]),dne=new Set(["htmlWidth","htmlHeight","htmlSize"]);function fne(e){return dne.has(e)||!une.has(e)}var pne=({baseStyle:e})=>t=>{const{theme:n,css:r,__css:i,sx:o,...a}=t,s=uA(a,(d,f)=>jee(f)),l=fA(e,t),c=Object.assign({},i,l,dA(s),o),u=qD(c)(t.theme);return r?[u,r]:u};function Sb(e,t){const{baseStyle:n,...r}=t!=null?t:{};r.shouldForwardProp||(r.shouldForwardProp=fne);const i=pne({baseStyle:n}),o=s3(e,r)(i);return A.forwardRef(function(l,c){const{colorMode:u,forced:d}=cy();return A.createElement(o,{ref:c,"data-theme":d?u:void 0,...l})})}function de(e){return h.exports.forwardRef(e)}function mA(e,t={}){var u;const{styleConfig:n,...r}=t,{theme:i,colorMode:o}=pA(),a=cA(i,`components.${e}`),s=n||a,l=Oi({theme:i,colorMode:o},(u=s==null?void 0:s.defaultProps)!=null?u:{},dA(Nte(r,["children"]))),c=h.exports.useRef({});if(s){const f=Zee(s)(l);ine(c.current,f)||(c.current=f)}return c.current}function Pr(e,t={}){return mA(e,t)}function vt(e,t={}){return mA(e,t)}function hne(){const e=new Map;return new Proxy(Sb,{apply(t,n,r){return Sb(...r)},get(t,n){return e.has(n)||e.set(n,Sb(n)),e.get(n)}})}var ce=hne();function mne(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function En(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:o}=e,a=h.exports.createContext(void 0);a.displayName=t;function s(){var l;const c=h.exports.useContext(a);if(!c&&n){const u=new Error(o!=null?o:mne(r,i));throw u.name="ContextError",(l=Error.captureStackTrace)==null||l.call(Error,u,s),u}return c}return[a.Provider,s,a]}function gne(e,t){if(e!=null){if(typeof e=="function"){e(t);return}try{e.current=t}catch{throw new Error(`Cannot assign value '${t}' to ref '${e}'`)}}}function go(...e){return t=>{e.forEach(n=>{gne(n,t)})}}function vne(...e){return h.exports.useMemo(()=>go(...e),e)}function zk(e){return e.sort((t,n)=>{const r=t.compareDocumentPosition(n);if(r&Node.DOCUMENT_POSITION_FOLLOWING||r&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(r&Node.DOCUMENT_POSITION_PRECEDING||r&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(r&Node.DOCUMENT_POSITION_DISCONNECTED||r&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0})}var yne=e=>typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE;function jk(e,t,n){let r=e+1;return n&&r>=t&&(r=0),r}function Hk(e,t,n){let r=e-1;return n&&r<0&&(r=t),r}var l3=typeof window!="undefined"?h.exports.useLayoutEffect:h.exports.useEffect,t0=e=>e,bne=class{constructor(){S(this,"descendants",new Map);S(this,"register",e=>{if(e!=null)return yne(e)?this.registerNode(e):t=>{this.registerNode(t,e)}});S(this,"unregister",e=>{this.descendants.delete(e);const t=zk(Array.from(this.descendants.keys()));this.assignIndex(t)});S(this,"destroy",()=>{this.descendants.clear()});S(this,"assignIndex",e=>{this.descendants.forEach(t=>{const n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()})});S(this,"count",()=>this.descendants.size);S(this,"enabledCount",()=>this.enabledValues().length);S(this,"values",()=>Array.from(this.descendants.values()).sort((t,n)=>t.index-n.index));S(this,"enabledValues",()=>this.values().filter(e=>!e.disabled));S(this,"item",e=>{if(this.count()!==0)return this.values()[e]});S(this,"enabledItem",e=>{if(this.enabledCount()!==0)return this.enabledValues()[e]});S(this,"first",()=>this.item(0));S(this,"firstEnabled",()=>this.enabledItem(0));S(this,"last",()=>this.item(this.descendants.size-1));S(this,"lastEnabled",()=>{const e=this.enabledValues().length-1;return this.enabledItem(e)});S(this,"indexOf",e=>{var n;var t;return e&&(n=(t=this.descendants.get(e))==null?void 0:t.index)!=null?n:-1});S(this,"enabledIndexOf",e=>e==null?-1:this.enabledValues().findIndex(t=>t.node.isSameNode(e)));S(this,"next",(e,t=!0)=>{const n=jk(e,this.count(),t);return this.item(n)});S(this,"nextEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=jk(r,this.enabledCount(),t);return this.enabledItem(i)});S(this,"prev",(e,t=!0)=>{const n=Hk(e,this.count()-1,t);return this.item(n)});S(this,"prevEnabled",(e,t=!0)=>{const n=this.item(e);if(!n)return;const r=this.enabledIndexOf(n.node),i=Hk(r,this.enabledCount()-1,t);return this.enabledItem(i)});S(this,"registerNode",(e,t)=>{if(!e||this.descendants.has(e))return;const n=Array.from(this.descendants.keys()).concat(e),r=zk(n);t!=null&&t.disabled&&(t.disabled=!!t.disabled);const i={node:e,index:-1,...t};this.descendants.set(e,i),this.assignIndex(r)})}};function xne(){const e=h.exports.useRef(new bne);return l3(()=>()=>e.current.destroy()),e.current}var[Sne,gA]=En({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"});function wne(e){const t=gA(),[n,r]=h.exports.useState(-1),i=h.exports.useRef(null);l3(()=>()=>{!i.current||t.unregister(i.current)},[]),l3(()=>{if(!i.current)return;const a=Number(i.current.dataset.index);n!=a&&!Number.isNaN(a)&&r(a)});const o=t0(e?t.register(e):t.register);return{descendants:t,index:n,enabledIndex:t.enabledIndexOf(i.current),register:go(o,i)}}function vA(){return[t0(Sne),()=>t0(gA()),()=>xne(),i=>wne(i)]}var fn=(...e)=>e.filter(Boolean).join(" "),Vk={path:A.createElement("g",{stroke:"currentColor",strokeWidth:"1.5"},A.createElement("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),A.createElement("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),A.createElement("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})),viewBox:"0 0 24 24"},Wr=de((e,t)=>{const{as:n,viewBox:r,color:i="currentColor",focusable:o=!1,children:a,className:s,__css:l,...c}=e,u=fn("chakra-icon",s),d={w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:i,...l},f={ref:t,focusable:o,className:u,__css:d},p=r!=null?r:Vk.viewBox;if(n&&typeof n!="string")return A.createElement(ce.svg,{as:n,...f,...c});const m=a!=null?a:Vk.path;return A.createElement(ce.svg,{verticalAlign:"middle",viewBox:p,...f,...c},m)});Wr.displayName="Icon";var Cne=Wr;function yA(e){const{viewBox:t="0 0 24 24",d:n,displayName:r,defaultProps:i={}}=e,o=h.exports.Children.toArray(e.path),a=de((s,l)=>A.createElement(Wr,{ref:l,viewBox:t,...i,...s},o.length?o:A.createElement("path",{fill:"currentColor",d:n})));return a.displayName=r,a}function og(e,t=[]){const n=h.exports.useRef(e);return h.exports.useEffect(()=>{n.current=e}),h.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function kne(e){const{value:t,defaultValue:n,onChange:r,shouldUpdate:i=(f,p)=>f!==p}=e,o=og(r),a=og(i),[s,l]=h.exports.useState(n),c=t!==void 0,u=c?t:s,d=og(f=>{const m=typeof f=="function"?f(u):f;!a(u,m)||(c||l(m),o(m))},[c,o,u,a]);return[u,d]}const yy=h.exports.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),by=h.exports.createContext({});function Ene(){return h.exports.useContext(by).visualElement}const jd=h.exports.createContext(null),Sc=typeof document!="undefined",Hu=Sc?h.exports.useLayoutEffect:h.exports.useEffect,bA=h.exports.createContext({strict:!1});function Ine(e,t,n,r){const i=Ene(),o=h.exports.useContext(bA),a=h.exports.useContext(jd),s=h.exports.useContext(yy).reducedMotion,l=h.exports.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceId:a?a.id:void 0,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:s}));const c=l.current;return Hu(()=>{c&&c.render()}),Hu(()=>{c&&c.animationState&&c.animationState.animateChanges()}),Hu(()=>()=>c&&c.notify("Unmount"),[]),c}function gu(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function Tne(e,t,n){return h.exports.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):gu(n)&&(n.current=r))},[t])}function Hp(e){return typeof e=="string"||Array.isArray(e)}function xy(e){return typeof e=="object"&&typeof e.start=="function"}const _ne=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function Sy(e){return xy(e.animate)||_ne.some(t=>Hp(e[t]))}function xA(e){return Boolean(Sy(e)||e.variants)}function Pne(e,t){if(Sy(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Hp(n)?n:void 0,animate:Hp(r)?r:void 0}}return e.inherit!==!1?t:{}}function One(e){const{initial:t,animate:n}=Pne(e,h.exports.useContext(by));return h.exports.useMemo(()=>({initial:t,animate:n}),[Wk(t),Wk(n)])}function Wk(e){return Array.isArray(e)?e.join(" "):e}const pa=e=>({isEnabled:t=>e.some(n=>!!t[n])}),Vp={measureLayout:pa(["layout","layoutId","drag"]),animation:pa(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:pa(["exit"]),drag:pa(["drag","dragControls"]),focus:pa(["whileFocus"]),hover:pa(["whileHover","onHoverStart","onHoverEnd"]),tap:pa(["whileTap","onTap","onTapStart","onTapCancel"]),pan:pa(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:pa(["whileInView","onViewportEnter","onViewportLeave"])};function Mne(e){for(const t in e)t==="projectionNodeConstructor"?Vp.projectionNodeConstructor=e[t]:Vp[t].Component=e[t]}function Va(e){const t=h.exports.useRef(null);return t.current===null&&(t.current=e()),t.current}const rp={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Rne=1;function Dne(){return Va(()=>{if(rp.hasEverUpdated)return Rne++})}const h9=h.exports.createContext({});class Ane extends A.Component{getSnapshotBeforeUpdate(){const{visualElement:t,props:n}=this.props;return t&&t.setProps(n),null}componentDidUpdate(){}render(){return this.props.children}}const SA=h.exports.createContext({}),Lne=Symbol.for("motionComponentSymbol");function Bne({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:o}){e&&Mne(e);function a(l,c){const u={...h.exports.useContext(yy),...l,layoutId:$ne(l)},{isStatic:d}=u;let f=null;const p=One(l),m=d?void 0:Dne(),g=i(l,d);if(!d&&Sc){p.visualElement=Ine(o,g,u,t);const y=h.exports.useContext(bA).strict,v=h.exports.useContext(SA);p.visualElement&&(f=p.visualElement.loadFeatures(u,y,e,m,n||Vp.projectionNodeConstructor,v))}return h.exports.createElement(Ane,{visualElement:p.visualElement,props:u},f,h.exports.createElement(by.Provider,{value:p},r(o,l,m,Tne(g,p.visualElement,c),g,d,p.visualElement)))}const s=h.exports.forwardRef(a);return s[Lne]=o,s}function $ne({layoutId:e}){const t=h.exports.useContext(h9).id;return t&&e!==void 0?t+"-"+e:e}function Fne(e){function t(r,i={}){return Bne(e(r,i))}if(typeof Proxy=="undefined")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const Nne=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function m9(e){return typeof e!="string"||e.includes("-")?!1:!!(Nne.indexOf(e)>-1||/[A-Z]/.test(e))}const n0={};function zne(e){Object.assign(n0,e)}const r0=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],wc=new Set(r0);function wA(e,{layout:t,layoutId:n}){return wc.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!n0[e]||e==="opacity")}const vo=e=>!!(e!=null&&e.getVelocity),jne={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Hne=(e,t)=>r0.indexOf(e)-r0.indexOf(t);function Vne({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,o){let a="";t.sort(Hne);for(const s of t)a+=`${jne[s]||s}(${e[s]}) `;return n&&!e.z&&(a+="translateZ(0)"),a=a.trim(),o?a=o(e,i?"":a):r&&i&&(a="none"),a}function CA(e){return e.startsWith("--")}const Wne=(e,t)=>t&&typeof e=="number"?t.transform(e):e,hd=(e,t,n)=>Math.min(Math.max(n,e),t),Cc={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ip={...Cc,transform:e=>hd(0,1,e)},j1={...Cc,default:1},op=e=>Math.round(e*1e5)/1e5,Wp=/(-)?([\d]*\.?[\d])+/g,c3=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Une=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function jh(e){return typeof e=="string"}const Hh=e=>({test:t=>jh(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),as=Hh("deg"),Yo=Hh("%"),Te=Hh("px"),Gne=Hh("vh"),Kne=Hh("vw"),Uk={...Yo,parse:e=>Yo.parse(e)/100,transform:e=>Yo.transform(e*100)},Gk={...Cc,transform:Math.round},kA={borderWidth:Te,borderTopWidth:Te,borderRightWidth:Te,borderBottomWidth:Te,borderLeftWidth:Te,borderRadius:Te,radius:Te,borderTopLeftRadius:Te,borderTopRightRadius:Te,borderBottomRightRadius:Te,borderBottomLeftRadius:Te,width:Te,maxWidth:Te,height:Te,maxHeight:Te,size:Te,top:Te,right:Te,bottom:Te,left:Te,padding:Te,paddingTop:Te,paddingRight:Te,paddingBottom:Te,paddingLeft:Te,margin:Te,marginTop:Te,marginRight:Te,marginBottom:Te,marginLeft:Te,rotate:as,rotateX:as,rotateY:as,rotateZ:as,scale:j1,scaleX:j1,scaleY:j1,scaleZ:j1,skew:as,skewX:as,skewY:as,distance:Te,translateX:Te,translateY:Te,translateZ:Te,x:Te,y:Te,z:Te,perspective:Te,transformPerspective:Te,opacity:ip,originX:Uk,originY:Uk,originZ:Te,zIndex:Gk,fillOpacity:ip,strokeOpacity:ip,numOctaves:Gk};function g9(e,t,n,r){const{style:i,vars:o,transform:a,transformKeys:s,transformOrigin:l}=e;s.length=0;let c=!1,u=!1,d=!0;for(const f in t){const p=t[f];if(CA(f)){o[f]=p;continue}const m=kA[f],g=Wne(p,m);if(wc.has(f)){if(c=!0,a[f]=g,s.push(f),!d)continue;p!==(m.default||0)&&(d=!1)}else f.startsWith("origin")?(u=!0,l[f]=g):i[f]=g}if(t.transform||(c||r?i.transform=Vne(e,n,d,r):i.transform&&(i.transform="none")),u){const{originX:f="50%",originY:p="50%",originZ:m=0}=l;i.transformOrigin=`${f} ${p} ${m}`}}const v9=()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}});function EA(e,t,n){for(const r in t)!vo(t[r])&&!wA(r,n)&&(e[r]=t[r])}function qne({transformTemplate:e},t,n){return h.exports.useMemo(()=>{const r=v9();return g9(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function Yne(e,t,n){const r=e.style||{},i={};return EA(i,r,e),Object.assign(i,qne(e,t,n)),e.transformValues?e.transformValues(i):i}function Xne(e,t,n){const r={},i=Yne(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),r.style=i,r}const Zne=["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"],Qne=["whileTap","onTap","onTapStart","onTapCancel"],Jne=["onPan","onPanStart","onPanSessionStart","onPanEnd"],ere=["whileInView","onViewportEnter","onViewportLeave","viewport"],tre=new Set(["initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","onHoverStart","onHoverEnd","layoutScroll",...ere,...Qne,...Zne,...Jne]);function Up(e){return tre.has(e)}let IA=e=>!Up(e);function nre(e){!e||(IA=t=>t.startsWith("on")?!Up(t):e(t))}try{nre(require("@emotion/is-prop-valid").default)}catch{}function rre(e,t,n){const r={};for(const i in e)(IA(i)||n===!0&&Up(i)||!t&&!Up(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function Kk(e,t,n){return typeof e=="string"?e:Te.transform(t+n*e)}function ire(e,t,n){const r=Kk(t,e.x,e.width),i=Kk(n,e.y,e.height);return`${r} ${i}`}const ore={offset:"stroke-dashoffset",array:"stroke-dasharray"},are={offset:"strokeDashoffset",array:"strokeDasharray"};function sre(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?ore:are;e[o.offset]=Te.transform(-r);const a=Te.transform(t),s=Te.transform(n);e[o.array]=`${a} ${s}`}function y9(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:s=0,...l},c,u,d){if(g9(e,l,c,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(r!==void 0||i!==void 0||p.transform)&&(p.transformOrigin=ire(m,r!==void 0?r:.5,i!==void 0?i:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),o!==void 0&&sre(f,o,a,s,!1)}const TA=()=>({...v9(),attrs:{}}),b9=e=>typeof e=="string"&&e.toLowerCase()==="svg";function lre(e,t,n,r){const i=h.exports.useMemo(()=>{const o=TA();return y9(o,t,{enableHardwareAcceleration:!1},b9(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};EA(o,e.style,e),i.style={...o,...i.style}}return i}function cre(e=!1){return(n,r,i,o,{latestValues:a},s)=>{const c=(m9(n)?lre:Xne)(r,a,s,n),d={...rre(r,typeof n=="string",e),...c,ref:o};return i&&(d["data-projection-id"]=i),h.exports.createElement(n,d)}}const x9=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function _A(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const PA=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function OA(e,t,n,r){_A(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(PA.has(i)?i:x9(i),t.attrs[i])}function S9(e){const{style:t}=e,n={};for(const r in t)(vo(t[r])||wA(r,e))&&(n[r]=t[r]);return n}function MA(e){const t=S9(e);for(const n in e)if(vo(e[n])){const r=n==="x"||n==="y"?"attr"+n.toUpperCase():n;t[r]=e[n]}return t}function w9(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}const i0=e=>Array.isArray(e),ure=e=>Boolean(e&&typeof e=="object"&&e.mix&&e.toValue),dre=e=>i0(e)?e[e.length-1]||0:e;function ag(e){const t=vo(e)?e.get():e;return ure(t)?t.toValue():t}function fre({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const a={latestValues:pre(r,i,o,e),renderState:t()};return n&&(a.mount=s=>n(r,s,a)),a}const RA=e=>(t,n)=>{const r=h.exports.useContext(by),i=h.exports.useContext(jd),o=()=>fre(e,t,r,i);return n?o():Va(o)};function pre(e,t,n,r){const i={},o=r(e);for(const f in o)i[f]=ag(o[f]);let{initial:a,animate:s}=e;const l=Sy(e),c=xA(e);t&&c&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u=u||a===!1;const d=u?s:a;return d&&typeof d!="boolean"&&!xy(d)&&(Array.isArray(d)?d:[d]).forEach(p=>{const m=w9(e,p);if(!m)return;const{transitionEnd:g,transition:y,...v}=m;for(const b in v){let x=v[b];if(Array.isArray(x)){const w=u?x.length-1:0;x=x[w]}x!==null&&(i[b]=x)}for(const b in g)i[b]=g[b]}),i}const hre={useVisualState:RA({scrapeMotionValuesFromProps:MA,createRenderState:TA,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}y9(n,r,{enableHardwareAcceleration:!1},b9(t.tagName),e.transformTemplate),OA(t,n)}})},mre={useVisualState:RA({scrapeMotionValuesFromProps:S9,createRenderState:v9})};function gre(e,{forwardMotionProps:t=!1},n,r,i){return{...m9(e)?hre:mre,preloadedFeatures:n,useRender:cre(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}var xt;(function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"})(xt||(xt={}));function wy(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function u3(e,t,n,r){h.exports.useEffect(()=>{const i=e.current;if(n&&i)return wy(i,t,n,r)},[e,t,n,r])}function vre({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=()=>{n&&n.setActive(xt.Focus,!0)},i=()=>{n&&n.setActive(xt.Focus,!1)};u3(t,"focus",e?r:void 0),u3(t,"blur",e?i:void 0)}function DA(e){return typeof PointerEvent!="undefined"&&e instanceof PointerEvent?e.pointerType==="mouse":e instanceof MouseEvent}function AA(e){return!!e.touches}function yre(e){return t=>{const n=t instanceof MouseEvent;(!n||n&&t.button===0)&&e(t)}}const bre={pageX:0,pageY:0};function xre(e,t="page"){const r=e.touches[0]||e.changedTouches[0]||bre;return{x:r[t+"X"],y:r[t+"Y"]}}function Sre(e,t="page"){return{x:e[t+"X"],y:e[t+"Y"]}}function C9(e,t="page"){return{point:AA(e)?xre(e,t):Sre(e,t)}}const LA=(e,t=!1)=>{const n=r=>e(r,C9(r));return t?yre(n):n},wre=()=>Sc&&window.onpointerdown===null,Cre=()=>Sc&&window.ontouchstart===null,kre=()=>Sc&&window.onmousedown===null,Ere={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Ire={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function BA(e){return wre()?e:Cre()?Ire[e]:kre()?Ere[e]:e}function Vu(e,t,n,r){return wy(e,BA(t),LA(n,t==="pointerdown"),r)}function o0(e,t,n,r){return u3(e,BA(t),n&&LA(n,t==="pointerdown"),r)}function $A(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const qk=$A("dragHorizontal"),Yk=$A("dragVertical");function FA(e){let t=!1;if(e==="y")t=Yk();else if(e==="x")t=qk();else{const n=qk(),r=Yk();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function NA(){const e=FA(!0);return e?(e(),!1):!0}function Xk(e,t,n){return(r,i)=>{!DA(r)||NA()||(e.animationState&&e.animationState.setActive(xt.Hover,t),n&&n(r,i))}}function Tre({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){o0(r,"pointerenter",e||n?Xk(r,!0,e):void 0,{passive:!e}),o0(r,"pointerleave",t||n?Xk(r,!1,t):void 0,{passive:!t})}const zA=(e,t)=>t?e===t?!0:zA(e,t.parentElement):!1;function k9(e){return h.exports.useEffect(()=>()=>e(),[])}const _re=(e,t)=>n=>t(e(n)),Cy=(...e)=>e.reduce(_re);function Pre({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i}){const o=e||t||n||r,a=h.exports.useRef(!1),s=h.exports.useRef(null),l={passive:!(t||e||n||p)};function c(){s.current&&s.current(),s.current=null}function u(){return c(),a.current=!1,i.animationState&&i.animationState.setActive(xt.Tap,!1),!NA()}function d(m,g){!u()||(zA(i.current,m.target)?e&&e(m,g):n&&n(m,g))}function f(m,g){!u()||n&&n(m,g)}function p(m,g){c(),!a.current&&(a.current=!0,s.current=Cy(Vu(window,"pointerup",d,l),Vu(window,"pointercancel",f,l)),i.animationState&&i.animationState.setActive(xt.Tap,!0),t&&t(m,g))}o0(i,"pointerdown",o?p:void 0,l),k9(c)}const Ore="production",jA=typeof process=="undefined"||process.env===void 0?Ore:"production",Zk=new Set;function HA(e,t,n){e||Zk.has(t)||(console.warn(t),n&&console.warn(n),Zk.add(t))}const d3=new WeakMap,wb=new WeakMap,Mre=e=>{const t=d3.get(e.target);t&&t(e)},Rre=e=>{e.forEach(Mre)};function Dre({root:e,...t}){const n=e||document;wb.has(n)||wb.set(n,{});const r=wb.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Rre,{root:e,...t})),r[i]}function Are(e,t,n){const r=Dre(t);return d3.set(e,n),r.observe(e),()=>{d3.delete(e),r.unobserve(e)}}function Lre({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const o=h.exports.useRef({hasEnteredView:!1,isInView:!1});let a=Boolean(t||n||r);i.once&&o.current.hasEnteredView&&(a=!1),(typeof IntersectionObserver=="undefined"?Fre:$re)(a,o.current,e,i)}const Bre={some:0,all:1};function $re(e,t,n,{root:r,margin:i,amount:o="some",once:a}){h.exports.useEffect(()=>{if(!e||!n.current)return;const s={root:r==null?void 0:r.current,rootMargin:i,threshold:typeof o=="number"?o:Bre[o]},l=c=>{const{isIntersecting:u}=c;if(t.isInView===u||(t.isInView=u,a&&!u&&t.hasEnteredView))return;u&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(xt.InView,u);const d=n.getProps(),f=u?d.onViewportEnter:d.onViewportLeave;f&&f(c)};return Are(n.current,s,l)},[e,r,i,o])}function Fre(e,t,n,{fallback:r=!0}){h.exports.useEffect(()=>{!e||!r||(jA!=="production"&&HA(!1,"IntersectionObserver not available on this device. whileInView animations will trigger on mount."),requestAnimationFrame(()=>{t.hasEnteredView=!0;const{onViewportEnter:i}=n.getProps();i&&i(null),n.animationState&&n.animationState.setActive(xt.InView,!0)}))},[e])}const Ss=e=>t=>(e(t),null),Nre={inView:Ss(Lre),tap:Ss(Pre),focus:Ss(vre),hover:Ss(Tre)};function E9(){const e=h.exports.useContext(jd);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=h.exports.useId();return h.exports.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function zre(){return jre(h.exports.useContext(jd))}function jre(e){return e===null?!0:e.isPresent}function VA(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Hre=e=>/^\-?\d*\.?\d+$/.test(e),Vre=e=>/^0[^.\s]+$/.test(e),Ta={delta:0,timestamp:0},WA=1/60*1e3,Wre=typeof performance!="undefined"?()=>performance.now():()=>Date.now(),UA=typeof window!="undefined"?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Wre()),WA);function Ure(e){let t=[],n=[],r=0,i=!1,o=!1;const a=new WeakSet,s={schedule:(l,c=!1,u=!1)=>{const d=u&&i,f=d?t:n;return c&&a.add(l),f.indexOf(l)===-1&&(f.push(l),d&&i&&(r=t.length)),l},cancel:l=>{const c=n.indexOf(l);c!==-1&&n.splice(c,1),a.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let c=0;c<r;c++){const u=t[c];u(l),a.has(u)&&(s.schedule(u),e())}i=!1,o&&(o=!1,s.process(l))}};return s}const Gre=40;let f3=!0,Gp=!1,p3=!1;const Vh=["read","update","preRender","render","postRender"],ky=Vh.reduce((e,t)=>(e[t]=Ure(()=>Gp=!0),e),{}),kr=Vh.reduce((e,t)=>{const n=ky[t];return e[t]=(r,i=!1,o=!1)=>(Gp||qre(),n.schedule(r,i,o)),e},{}),Ma=Vh.reduce((e,t)=>(e[t]=ky[t].cancel,e),{}),Cb=Vh.reduce((e,t)=>(e[t]=()=>ky[t].process(Ta),e),{}),Kre=e=>ky[e].process(Ta),GA=e=>{Gp=!1,Ta.delta=f3?WA:Math.max(Math.min(e-Ta.timestamp,Gre),1),Ta.timestamp=e,p3=!0,Vh.forEach(Kre),p3=!1,Gp&&(f3=!1,UA(GA))},qre=()=>{Gp=!0,f3=!0,p3||UA(GA)};function I9(e,t){e.indexOf(t)===-1&&e.push(t)}function T9(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}function Yre([...e],t,n){const r=t<0?e.length+t:t;if(r>=0&&r<e.length){const i=n<0?e.length+n:n,[o]=e.splice(t,1);e.splice(i,0,o)}return e}class _9{constructor(){this.subscriptions=[]}add(t){return I9(this.subscriptions,t),()=>T9(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(!!i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function P9(e,t){return t?e*(1e3/t):0}const Xre=e=>!isNaN(parseFloat(e));class Zre{constructor(t,n={}){this.version="7.10.3",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{this.prev=this.current,this.current=r;const{delta:o,timestamp:a}=Ta;this.lastUpdated!==a&&(this.timeDelta=o,this.lastUpdated=a,kr.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>kr.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=Xre(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){return this.events[t]||(this.events[t]=new _9),this.events[t].add(n)}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t){this.passiveEffect=t}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?P9(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.stopAnimation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.stopAnimation&&(this.stopAnimation(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.clearListeners(),this.stop()}}function sc(e,t){return new Zre(e,t)}const O9=(e,t)=>n=>Boolean(jh(n)&&Une.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),KA=(e,t,n)=>r=>{if(!jh(r))return r;const[i,o,a,s]=r.match(Wp);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:s!==void 0?parseFloat(s):1}},Qre=e=>hd(0,255,e),kb={...Cc,transform:e=>Math.round(Qre(e))},jl={test:O9("rgb","red"),parse:KA("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+kb.transform(e)+", "+kb.transform(t)+", "+kb.transform(n)+", "+op(ip.transform(r))+")"};function Jre(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const h3={test:O9("#"),parse:Jre,transform:jl.transform},vu={test:O9("hsl","hue"),parse:KA("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Yo.transform(op(t))+", "+Yo.transform(op(n))+", "+op(ip.transform(r))+")"},yr={test:e=>jl.test(e)||h3.test(e)||vu.test(e),parse:e=>jl.test(e)?jl.parse(e):vu.test(e)?vu.parse(e):h3.parse(e),transform:e=>jh(e)?e:e.hasOwnProperty("red")?jl.transform(e):vu.transform(e)},qA="${c}",YA="${n}";function eie(e){var t,n;return isNaN(e)&&jh(e)&&(((t=e.match(Wp))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(c3))===null||n===void 0?void 0:n.length)||0)>0}function a0(e){typeof e=="number"&&(e=`${e}`);const t=[];let n=0,r=0;const i=e.match(c3);i&&(n=i.length,e=e.replace(c3,qA),t.push(...i.map(yr.parse)));const o=e.match(Wp);return o&&(r=o.length,e=e.replace(Wp,YA),t.push(...o.map(Cc.parse))),{values:t,numColors:n,numNumbers:r,tokenised:e}}function XA(e){return a0(e).values}function ZA(e){const{values:t,numColors:n,tokenised:r}=a0(e),i=t.length;return o=>{let a=r;for(let s=0;s<i;s++)a=a.replace(s<n?qA:YA,s<n?yr.transform(o[s]):op(o[s]));return a}}const tie=e=>typeof e=="number"?0:e;function nie(e){const t=XA(e);return ZA(e)(t.map(tie))}const Ws={test:eie,parse:XA,createTransformer:ZA,getAnimatableNone:nie},rie=new Set(["brightness","contrast","saturate","opacity"]);function iie(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Wp)||[];if(!r)return e;const i=n.replace(r,"");let o=rie.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const oie=/([a-z-]*)\(.*?\)/g,m3={...Ws,getAnimatableNone:e=>{const t=e.match(oie);return t?t.map(iie).join(" "):e}},aie={...kA,color:yr,backgroundColor:yr,outlineColor:yr,fill:yr,stroke:yr,borderColor:yr,borderTopColor:yr,borderRightColor:yr,borderBottomColor:yr,borderLeftColor:yr,filter:m3,WebkitFilter:m3},M9=e=>aie[e];function R9(e,t){var n;let r=M9(e);return r!==m3&&(r=Ws),(n=r.getAnimatableNone)===null||n===void 0?void 0:n.call(r,t)}const QA=e=>t=>t.test(e),sie={test:e=>e==="auto",parse:e=>e},JA=[Cc,Te,Yo,as,Kne,Gne,sie],vf=e=>JA.find(QA(e)),lie=[...JA,yr,Ws],cie=e=>lie.find(QA(e));function uie(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function die(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Ey(e,t,n){const r=e.getProps();return w9(r,t,n!==void 0?n:r.custom,uie(e),die(e))}function fie(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,sc(n))}function pie(e,t){const n=Ey(e,t);let{transitionEnd:r={},transition:i={},...o}=n?e.makeTargetAnimatable(n,!1):{};o={...o,...r};for(const a in o){const s=dre(o[a]);fie(e,a,s)}}function hie(e,t,n){var r,i;const o=Object.keys(t).filter(s=>!e.hasValue(s)),a=o.length;if(!!a)for(let s=0;s<a;s++){const l=o[s],c=t[l];let u=null;Array.isArray(c)&&(u=c[0]),u===null&&(u=(i=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&i!==void 0?i:t[l]),u!=null&&(typeof u=="string"&&(Hre(u)||Vre(u))?u=parseFloat(u):!cie(u)&&Ws.test(c)&&(u=R9(l,c)),e.addValue(l,sc(u,{owner:e})),n[l]===void 0&&(n[l]=u),u!==null&&e.setBaseTarget(l,u))}}function mie(e,t){return t?(t[e]||t.default||t).from:void 0}function gie(e,t,n){var r;const i={};for(const o in e){const a=mie(o,t);i[o]=a!==void 0?a:(r=n.getValue(o))===null||r===void 0?void 0:r.get()}return i}function s0(e){return Boolean(vo(e)&&e.add)}const vie=(e,t)=>`${e}: ${t}`;function yie(e,t){const{MotionAppearAnimations:n}=window,r=vie(e,wc.has(t)?"transform":t),i=n&&n.get(r);return i?(kr.render(()=>{try{i.cancel(),n.delete(r)}catch{}}),i.currentTime||0):0}const bie="framerAppearId",xie="data-"+x9(bie);var Sie=function(){},l0=function(){};const sg=e=>e*1e3,wie={current:!1},D9=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,A9=e=>t=>1-e(1-t),L9=e=>e*e,Cie=A9(L9),B9=D9(L9),qt=(e,t,n)=>-n*e+n*t+e;function Eb(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function kie({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;i=Eb(l,s,e+1/3),o=Eb(l,s,e),a=Eb(l,s,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}const Ib=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},Eie=[h3,jl,vu],Iie=e=>Eie.find(t=>t.test(e));function Qk(e){const t=Iie(e);let n=t.parse(e);return t===vu&&(n=kie(n)),n}const eL=(e,t)=>{const n=Qk(e),r=Qk(t),i={...n};return o=>(i.red=Ib(n.red,r.red,o),i.green=Ib(n.green,r.green,o),i.blue=Ib(n.blue,r.blue,o),i.alpha=qt(n.alpha,r.alpha,o),jl.transform(i))};function tL(e,t){return typeof e=="number"?n=>qt(e,t,n):yr.test(e)?eL(e,t):rL(e,t)}const nL=(e,t)=>{const n=[...e],r=n.length,i=e.map((o,a)=>tL(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}},Tie=(e,t)=>{const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=tL(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}},rL=(e,t)=>{const n=Ws.createTransformer(t),r=a0(e),i=a0(t);return r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?Cy(nL(r.values,i.values),n):a=>`${a>0?t:e}`},c0=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Jk=(e,t)=>n=>qt(e,t,n);function _ie(e){return typeof e=="number"?Jk:typeof e=="string"?yr.test(e)?eL:rL:Array.isArray(e)?nL:typeof e=="object"?Tie:Jk}function Pie(e,t,n){const r=[],i=n||_ie(e[0]),o=e.length-1;for(let a=0;a<o;a++){let s=i(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]:t;s=Cy(l,s)}r.push(s)}return r}function $9(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;l0(o===t.length),l0(!r||!Array.isArray(r)||r.length===o-1),e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=Pie(t,r,i),s=a.length,l=c=>{let u=0;if(s>1)for(;u<e.length-2&&!(c<e[u+1]);u++);const d=c0(e[u],e[u+1],c);return a[u](d)};return n?c=>l(hd(e[0],e[o-1],c)):l}const F9=e=>e,iL=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Oie=1e-7,Mie=12;function Rie(e,t,n,r,i){let o,a,s=0;do a=t+(n-t)/2,o=iL(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>Oie&&++s<Mie);return a}function oL(e,t,n,r){if(e===t&&n===r)return F9;const i=o=>Rie(o,0,1,e,n);return o=>o===0||o===1?o:iL(i(o),t,r)}const aL=e=>1-Math.sin(Math.acos(e)),N9=A9(aL),Die=D9(N9),sL=oL(.33,1.53,.69,.99),z9=A9(sL),Aie=D9(z9),Lie=e=>(e*=2)<1?.5*z9(e):.5*(2-Math.pow(2,-10*(e-1))),Bie={linear:F9,easeIn:L9,easeInOut:B9,easeOut:Cie,circIn:aL,circInOut:Die,circOut:N9,backIn:z9,backInOut:Aie,backOut:sL,anticipate:Lie},eE=e=>{if(Array.isArray(e)){l0(e.length===4);const[t,n,r,i]=e;return oL(t,n,r,i)}else if(typeof e=="string")return Bie[e];return e},$ie=e=>Array.isArray(e)&&typeof e[0]!="number";function Fie(e,t){return e.map(()=>t||B9).splice(0,e.length-1)}function Nie(e){const t=e.length;return e.map((n,r)=>r!==0?r/(t-1):0)}function zie(e,t){return e.map(n=>n*t)}function u0({keyframes:e,ease:t=B9,times:n,duration:r=300}){e=[...e];const i=u0[0],o=$ie(t)?t.map(eE):eE(t),a={done:!1,value:i},s=zie(n&&n.length===u0.length?n:Nie(e),r);function l(){return $9(s,e,{ease:Array.isArray(o)?o:Fie(e,o)})}let c=l();return{next:u=>(a.value=c(u),a.done=u>=r,a),flipTarget:()=>{e.reverse(),c=l()}}}const Tb=.001,jie=.01,tE=10,Hie=.05,Vie=1;function Wie({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o;Sie(e<=tE*1e3);let a=1-t;a=hd(Hie,Vie,a),e=hd(jie,tE,e/1e3),a<1?(i=c=>{const u=c*a,d=u*e,f=u-n,p=g3(c,a),m=Math.exp(-d);return Tb-f/p*m},o=c=>{const d=c*a*e,f=d*n+n,p=Math.pow(a,2)*Math.pow(c,2)*e,m=Math.exp(-d),g=g3(Math.pow(c,2),a);return(-i(c)+Tb>0?-1:1)*((f-p)*m)/g}):(i=c=>{const u=Math.exp(-c*e),d=(c-n)*e+1;return-Tb+u*d},o=c=>{const u=Math.exp(-c*e),d=(n-c)*(e*e);return u*d});const s=5/e,l=Gie(i,o,s);if(e=e*1e3,isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:a*2*Math.sqrt(r*c),duration:e}}}const Uie=12;function Gie(e,t,n){let r=n;for(let i=1;i<Uie;i++)r=r-e(r)/t(r);return r}function g3(e,t){return e*Math.sqrt(1-t*t)}const Kie=["duration","bounce"],qie=["stiffness","damping","mass"];function nE(e,t){return t.some(n=>e[n]!==void 0)}function Yie(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!nE(e,qie)&&nE(e,Kie)){const n=Wie(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}const Xie=5;function lL({keyframes:e,restSpeed:t=2,restDelta:n=.01,...r}){let i=e[0],o=e[e.length-1];const a={done:!1,value:i},{stiffness:s,damping:l,mass:c,velocity:u,duration:d,isResolvedFromDuration:f}=Yie(r);let p=Zie,m=u?-(u/1e3):0;const g=l/(2*Math.sqrt(s*c));function y(){const v=o-i,b=Math.sqrt(s/c)/1e3;if(n===void 0&&(n=Math.min(Math.abs(o-i)/100,.4)),g<1){const x=g3(b,g);p=w=>{const E=Math.exp(-g*b*w);return o-E*((m+g*b*v)/x*Math.sin(x*w)+v*Math.cos(x*w))}}else if(g===1)p=x=>o-Math.exp(-b*x)*(v+(m+b*v)*x);else{const x=b*Math.sqrt(g*g-1);p=w=>{const E=Math.exp(-g*b*w),C=Math.min(x*w,300);return o-E*((m+g*b*v)*Math.sinh(C)+x*v*Math.cosh(C))/x}}}return y(),{next:v=>{const b=p(v);if(f)a.done=v>=d;else{let x=m;if(v!==0)if(g<1){const C=Math.max(0,v-Xie);x=P9(b-p(C),v-C)}else x=0;const w=Math.abs(x)<=t,E=Math.abs(o-b)<=n;a.done=w&&E}return a.value=a.done?o:b,a},flipTarget:()=>{m=-m,[i,o]=[o,i],y()}}}lL.needsInterpolation=(e,t)=>typeof e=="string"||typeof t=="string";const Zie=e=>0;function Qie({keyframes:e=[0],velocity:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:o}){const a=e[0],s={done:!1,value:a};let l=n*t;const c=a+l,u=o===void 0?c:o(c);return u!==c&&(l=u-a),{next:d=>{const f=-l*Math.exp(-d/r);return s.done=!(f>i||f<-i),s.value=s.done?u:u+f,s},flipTarget:()=>{}}}const Jie={decay:Qie,keyframes:u0,tween:u0,spring:lL};function cL(e,t,n=0){return e-t-n}function eoe(e,t=0,n=0,r=!0){return r?cL(t+-e,t,n):t-(e-t)+n}function toe(e,t,n,r){return r?e>=t+n:e<=-n}const noe=e=>{const t=({delta:n})=>e(n);return{start:()=>kr.update(t,!0),stop:()=>Ma.update(t)}};function d0({duration:e,driver:t=noe,elapsed:n=0,repeat:r=0,repeatType:i="loop",repeatDelay:o=0,keyframes:a,autoplay:s=!0,onPlay:l,onStop:c,onComplete:u,onRepeat:d,onUpdate:f,type:p="keyframes",...m}){var g,y;let v,b=0,x=e,w,E=!1,C=!0,I;const T=Jie[a.length>2?"keyframes":p],_=a[0],P=a[a.length-1];!((y=(g=T).needsInterpolation)===null||y===void 0)&&y.call(g,_,P)&&(I=$9([0,100],[_,P],{clamp:!1}),a=[0,100]);const M=T({...m,duration:e,keyframes:a});function D(){b++,i==="reverse"?(C=b%2===0,n=eoe(n,x,o,C)):(n=cL(n,x,o),i==="mirror"&&M.flipTarget()),E=!1,d&&d()}function V(){v.stop(),u&&u()}function B(G){if(C||(G=-G),n+=G,!E){const z=M.next(Math.max(0,n));w=z.value,I&&(w=I(w)),E=C?z.done:n<=0}f&&f(w),E&&(b===0&&(x=x!==void 0?x:n),b<r?toe(n,x,o,C)&&D():V())}function L(){l&&l(),v=t(B),v.start()}return s&&L(),{stop:()=>{c&&c(),v.stop()},sample:G=>M.next(Math.max(0,G))}}function roe(e){return!e||Array.isArray(e)||typeof e=="string"&&uL[e]}const Nf=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,uL={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Nf([0,.65,.55,1]),circOut:Nf([.55,0,1,.45]),backIn:Nf([.31,.01,.66,-.59]),backOut:Nf([.33,1.53,.69,.99])};function ioe(e){if(!!e)return Array.isArray(e)?Nf(e):uL[e]}function ooe(e,t,n,{delay:r=0,duration:i,repeat:o=0,repeatType:a="loop",ease:s,times:l}={}){return e.animate({[t]:n,offset:l},{delay:r,duration:i,easing:ioe(s),fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}const H1=10;function aoe(e,t,{onUpdate:n,onComplete:r,...i}){let{keyframes:o,duration:a=.3,elapsed:s=0,ease:l}=i;if(i.type==="spring"||!roe(i.ease)){const u=d0(i);let d={done:!1,value:o[0]};const f=[];let p=0;for(;!d.done;)d=u.sample(p),f.push(d.value),p+=H1;o=f,a=p-H1,l="linear"}const c=ooe(e.owner.current,t,o,{...i,delay:-s,duration:a,ease:l});return c.onfinish=()=>{e.set(o[o.length-1]),r&&r()},()=>{const{currentTime:u}=c;if(u){const d=d0(i);e.setWithVelocity(d.sample(u-H1).value,d.sample(u).value,H1)}kr.update(()=>c.cancel())}}function dL(e,t){const n=performance.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Ma.read(r),e(o-t))};return kr.read(r,!0),()=>Ma.read(r)}function soe({keyframes:e,elapsed:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),()=>{});return t?dL(i,-t):i()}function loe({keyframes:e,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:o=750,bounceStiffness:a=500,bounceDamping:s=10,restDelta:l=1,modifyTarget:c,driver:u,onUpdate:d,onComplete:f,onStop:p}){const m=e[0];let g;function y(w){return n!==void 0&&w<n||r!==void 0&&w>r}function v(w){return n===void 0?r:r===void 0||Math.abs(n-w)<Math.abs(r-w)?n:r}function b(w){g==null||g.stop(),g=d0({keyframes:[0,1],velocity:0,...w,driver:u,onUpdate:E=>{var C;d==null||d(E),(C=w.onUpdate)===null||C===void 0||C.call(w,E)},onComplete:f,onStop:p})}function x(w){b({type:"spring",stiffness:a,damping:s,restDelta:l,...w})}if(y(m))x({velocity:t,keyframes:[m,v(m)]});else{let w=i*t+m;typeof c!="undefined"&&(w=c(w));const E=v(w),C=E===n?-1:1;let I,T;const _=P=>{I=T,T=P,t=P9(P-I,Ta.delta),(C===1&&P>E||C===-1&&P<E)&&x({keyframes:[P,E],velocity:t})};b({type:"decay",keyframes:[m,0],velocity:t,timeConstant:o,power:i,restDelta:l,modifyTarget:c,onUpdate:y(w)?_:void 0})}return{stop:()=>g==null?void 0:g.stop()}}const bl=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),V1=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),_b=()=>({type:"keyframes",ease:"linear",duration:.3}),coe={type:"keyframes",duration:.8},rE={x:bl,y:bl,z:bl,rotate:bl,rotateX:bl,rotateY:bl,rotateZ:bl,scaleX:V1,scaleY:V1,scale:V1,opacity:_b,backgroundColor:_b,color:_b,default:V1},uoe=(e,{keyframes:t})=>t.length>2?coe:(rE[e]||rE.default)(t[1]),v3=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&Ws.test(t)&&!t.startsWith("url("));function doe({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:s,from:l,...c}){return!!Object.keys(c).length}function iE(e){return e===0||typeof e=="string"&&parseFloat(e)===0&&e.indexOf(" ")===-1}function oE(e){return typeof e=="number"?0:R9("",e)}function fL(e,t){return e[t]||e.default||e}function foe(e,t,n,r){const i=v3(t,n);let o=r.from!==void 0?r.from:e.get();return o==="none"&&i&&typeof n=="string"?o=R9(t,n):iE(o)&&typeof n=="string"?o=oE(n):!Array.isArray(n)&&iE(n)&&typeof o=="string"&&(n=oE(o)),Array.isArray(n)?(n[0]===null&&(n[0]=o),n):[o,n]}const aE={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},Pb={},pL={};for(const e in aE)pL[e]=()=>(Pb[e]===void 0&&(Pb[e]=aE[e]()),Pb[e]);const poe=new Set(["opacity"]),j9=(e,t,n,r={})=>i=>{const o=fL(r,e)||{},a=o.delay||r.delay||0;let{elapsed:s=0}=r;s=s-sg(a);const l=foe(t,e,n,o),c=l[0],u=l[l.length-1],d=v3(e,c),f=v3(e,u);let p={keyframes:l,velocity:t.getVelocity(),...o,elapsed:s,onUpdate:v=>{t.set(v),o.onUpdate&&o.onUpdate(v)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(!d||!f||wie.current||o.type===!1)return soe(p);if(o.type==="inertia"){const v=loe(p);return()=>v.stop()}doe(o)||(p={...p,...uoe(e,p)}),p.duration&&(p.duration=sg(p.duration)),p.repeatDelay&&(p.repeatDelay=sg(p.repeatDelay));const m=t.owner,g=m&&m.current;if(pL.waapi()&&poe.has(e)&&!p.repeatDelay&&p.repeatType!=="mirror"&&p.damping!==0&&m&&g instanceof HTMLElement&&!m.getProps().onUpdate)return aoe(t,e,p);{const v=d0(p);return()=>v.stop()}};function hoe(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>y3(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=y3(e,t,n);else{const i=typeof t=="function"?Ey(e,t,n.custom):t;r=hL(e,i,n)}return r.then(()=>e.notify("AnimationComplete",t))}function y3(e,t,n={}){var r;const i=Ey(e,t,n.custom);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>hL(e,i,n):()=>Promise.resolve(),s=!((r=e.variantChildren)===null||r===void 0)&&r.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:d,staggerDirection:f}=o;return moe(e,t,u+c,d,f,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[c,u]=l==="beforeChildren"?[a,s]:[s,a];return c().then(u)}else return Promise.all([a(),s(n.delay)])}function hL(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:s,...l}=e.makeTargetAnimatable(t);const c=e.getValue("willChange");r&&(a=r);const u=[],d=i&&((o=e.animationState)===null||o===void 0?void 0:o.getState()[i]);for(const f in l){const p=e.getValue(f),m=l[f];if(!p||m===void 0||d&&voe(d,f))continue;let g={delay:n,elapsed:0,...a};if(e.shouldReduceMotion&&wc.has(f)&&(g={...g,type:!1,delay:0}),!p.hasAnimated){const v=e.getProps()[xie];v&&(g.elapsed=yie(v,f))}let y=p.start(j9(f,p,m,g));s0(c)&&(c.add(f),y=y.then(()=>c.remove(f))),u.push(y)}return Promise.all(u).then(()=>{s&&pie(e,s)})}function moe(e,t,n=0,r=0,i=1,o){const a=[],s=(e.variantChildren.size-1)*r,l=i===1?(c=0)=>c*r:(c=0)=>s-c*r;return Array.from(e.variantChildren).sort(goe).forEach((c,u)=>{a.push(y3(c,t,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(a)}function goe(e,t){return e.sortNodePosition(t)}function voe({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}const H9=[xt.Animate,xt.InView,xt.Focus,xt.Hover,xt.Tap,xt.Drag,xt.Exit],yoe=[...H9].reverse(),boe=H9.length;function xoe(e){return t=>Promise.all(t.map(({animation:n,options:r})=>hoe(e,n,r)))}function Soe(e){let t=xoe(e);const n=Coe();let r=!0;const i=(l,c)=>{const u=Ey(e,c);if(u){const{transition:d,transitionEnd:f,...p}=u;l={...l,...p,...f}}return l};function o(l){t=l(e)}function a(l,c){const u=e.getProps(),d=e.getVariantContext(!0)||{},f=[],p=new Set;let m={},g=1/0;for(let v=0;v<boe;v++){const b=yoe[v],x=n[b],w=u[b]!==void 0?u[b]:d[b],E=Hp(w),C=b===c?x.isActive:null;C===!1&&(g=v);let I=w===d[b]&&w!==u[b]&&E;if(I&&r&&e.manuallyAnimateOnMount&&(I=!1),x.protectedKeys={...m},!x.isActive&&C===null||!w&&!x.prevProp||xy(w)||typeof w=="boolean")continue;const T=woe(x.prevProp,w);let _=T||b===c&&x.isActive&&!I&&E||v>g&&E;const P=Array.isArray(w)?w:[w];let M=P.reduce(i,{});C===!1&&(M={});const{prevResolvedValues:D={}}=x,V={...D,...M},B=L=>{_=!0,p.delete(L),x.needsAnimating[L]=!0};for(const L in V){const G=M[L],z=D[L];m.hasOwnProperty(L)||(G!==z?i0(G)&&i0(z)?!VA(G,z)||T?B(L):x.protectedKeys[L]=!0:G!==void 0?B(L):p.add(L):G!==void 0&&p.has(L)?B(L):x.protectedKeys[L]=!0)}x.prevProp=w,x.prevResolvedValues=M,x.isActive&&(m={...m,...M}),r&&e.blockInitialAnimation&&(_=!1),_&&!I&&f.push(...P.map(L=>({animation:L,options:{type:b,...l}})))}if(p.size){const v={};p.forEach(b=>{const x=e.getBaseTarget(b);x!==void 0&&(v[b]=x)}),f.push({animation:v})}let y=Boolean(f.length);return r&&u.initial===!1&&!e.manuallyAnimateOnMount&&(y=!1),r=!1,y?t(f):Promise.resolve()}function s(l,c,u){var d;if(n[l].isActive===c)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(p=>{var m;return(m=p.animationState)===null||m===void 0?void 0:m.setActive(l,c)}),n[l].isActive=c;const f=a(u,l);for(const p in n)n[p].protectedKeys={};return f}return{animateChanges:a,setActive:s,setAnimateFunction:o,getState:()=>n}}function woe(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!VA(t,e):!1}function xl(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Coe(){return{[xt.Animate]:xl(!0),[xt.InView]:xl(),[xt.Hover]:xl(),[xt.Tap]:xl(),[xt.Drag]:xl(),[xt.Focus]:xl(),[xt.Exit]:xl()}}const koe={animation:Ss(({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Soe(e)),xy(t)&&h.exports.useEffect(()=>t.subscribe(e),[t])}),exit:Ss(e=>{const{custom:t,visualElement:n}=e,[r,i]=E9(),o=h.exports.useContext(jd);h.exports.useEffect(()=>{n.isPresent=r;const a=n.animationState&&n.animationState.setActive(xt.Exit,!r,{custom:o&&o.custom||t});a&&!r&&a.then(i)},[r])})},sE=(e,t)=>Math.abs(e-t);function Eoe(e,t){const n=sE(e.x,t.x),r=sE(e.y,t.y);return Math.sqrt(n**2+r**2)}class mL{constructor(t,n,{transformPagePoint:r}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const c=Mb(this.lastMoveEventInfo,this.history),u=this.startEvent!==null,d=Eoe(c.offset,{x:0,y:0})>=3;if(!u&&!d)return;const{point:f}=c,{timestamp:p}=Ta;this.history.push({...f,timestamp:p});const{onStart:m,onMove:g}=this.handlers;u||(m&&m(this.lastMoveEvent,c),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,c)},this.handlePointerMove=(c,u)=>{if(this.lastMoveEvent=c,this.lastMoveEventInfo=Ob(u,this.transformPagePoint),DA(c)&&c.buttons===0){this.handlePointerUp(c,u);return}kr.update(this.updatePoint,!0)},this.handlePointerUp=(c,u)=>{this.end();const{onEnd:d,onSessionEnd:f}=this.handlers,p=Mb(Ob(u,this.transformPagePoint),this.history);this.startEvent&&d&&d(c,p),f&&f(c,p)},AA(t)&&t.touches.length>1)return;this.handlers=n,this.transformPagePoint=r;const i=C9(t),o=Ob(i,this.transformPagePoint),{point:a}=o,{timestamp:s}=Ta;this.history=[{...a,timestamp:s}];const{onSessionStart:l}=n;l&&l(t,Mb(o,this.history)),this.removeListeners=Cy(Vu(window,"pointermove",this.handlePointerMove),Vu(window,"pointerup",this.handlePointerUp),Vu(window,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ma.update(this.updatePoint)}}function Ob(e,t){return t?{point:t(e.point)}:e}function lE(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Mb({point:e},t){return{point:e,delta:lE(e,gL(t)),offset:lE(e,Ioe(t)),velocity:Toe(t,.1)}}function Ioe(e){return e[0]}function gL(e){return e[e.length-1]}function Toe(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=gL(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>sg(t)));)n--;if(!r)return{x:0,y:0};const o=(i.timestamp-r.timestamp)/1e3;if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function li(e){return e.max-e.min}function b3(e,t=0,n=.01){return Math.abs(e-t)<=n}function cE(e,t,n,r=.5){e.origin=r,e.originPoint=qt(t.min,t.max,e.origin),e.scale=li(n)/li(t),(b3(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=qt(n.min,n.max,e.origin)-e.originPoint,(b3(e.translate)||isNaN(e.translate))&&(e.translate=0)}function ap(e,t,n,r){cE(e.x,t.x,n.x,r==null?void 0:r.originX),cE(e.y,t.y,n.y,r==null?void 0:r.originY)}function uE(e,t,n){e.min=n.min+t.min,e.max=e.min+li(t)}function _oe(e,t,n){uE(e.x,t.x,n.x),uE(e.y,t.y,n.y)}function dE(e,t,n){e.min=t.min-n.min,e.max=e.min+li(t)}function sp(e,t,n){dE(e.x,t.x,n.x),dE(e.y,t.y,n.y)}function Poe(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?qt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?qt(n,e,r.max):Math.min(e,n)),e}function fE(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function Ooe(e,{top:t,left:n,bottom:r,right:i}){return{x:fE(e.x,n,i),y:fE(e.y,t,r)}}function pE(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function Moe(e,t){return{x:pE(e.x,t.x),y:pE(e.y,t.y)}}function Roe(e,t){let n=.5;const r=li(e),i=li(t);return i>r?n=c0(t.min,t.max-r,e.min):r>i&&(n=c0(e.min,e.max-i,t.min)),hd(0,1,n)}function Doe(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const x3=.35;function Aoe(e=x3){return e===!1?e=0:e===!0&&(e=x3),{x:hE(e,"left","right"),y:hE(e,"top","bottom")}}function hE(e,t,n){return{min:mE(e,t),max:mE(e,n)}}function mE(e,t){return typeof e=="number"?e:e[t]||0}const gE=()=>({translate:0,scale:1,origin:0,originPoint:0}),lp=()=>({x:gE(),y:gE()}),vE=()=>({min:0,max:0}),_n=()=>({x:vE(),y:vE()});function Po(e){return[e("x"),e("y")]}function vL({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Loe({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Boe(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Rb(e){return e===void 0||e===1}function S3({scale:e,scaleX:t,scaleY:n}){return!Rb(e)||!Rb(t)||!Rb(n)}function kl(e){return S3(e)||yL(e)||e.z||e.rotate||e.rotateX||e.rotateY}function yL(e){return yE(e.x)||yE(e.y)}function yE(e){return e&&e!=="0%"}function f0(e,t,n){const r=e-n,i=t*r;return n+i}function bE(e,t,n,r,i){return i!==void 0&&(e=f0(e,i,r)),f0(e,n,r)+t}function w3(e,t=0,n=1,r,i){e.min=bE(e.min,t,n,r,i),e.max=bE(e.max,t,n,r,i)}function bL(e,{x:t,y:n}){w3(e.x,t.translate,t.scale,t.originPoint),w3(e.y,n.translate,n.scale,n.originPoint)}function $oe(e,t,n,r=!1){var i,o;const a=n.length;if(!a)return;t.x=t.y=1;let s,l;for(let c=0;c<a;c++)s=n[c],l=s.projectionDelta,((o=(i=s.instance)===null||i===void 0?void 0:i.style)===null||o===void 0?void 0:o.display)!=="contents"&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&yu(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,bL(e,l)),r&&kl(s.latestValues)&&yu(e,s.latestValues));t.x=xE(t.x),t.y=xE(t.y)}function xE(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function ss(e,t){e.min=e.min+t,e.max=e.max+t}function SE(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,a=qt(e.min,e.max,o);w3(e,t[n],t[r],a,t.scale)}const Foe=["x","scaleX","originX"],Noe=["y","scaleY","originY"];function yu(e,t){SE(e.x,t,Foe),SE(e.y,t,Noe)}function xL(e,t){return vL(Boe(e.getBoundingClientRect(),t))}function zoe(e,t,n){const r=xL(e,n),{scroll:i}=t;return i&&(ss(r.x,i.offset.x),ss(r.y,i.offset.y)),r}const joe=new WeakMap;class Hoe{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=_n(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){if(this.visualElement.isPresent===!1)return;const r=s=>{this.stopAnimation(),n&&this.snapToCursor(C9(s,"page").point)},i=(s,l)=>{var c;const{drag:u,dragPropagation:d,onDragStart:f}=this.getProps();u&&!d&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=FA(u),!this.openGlobalLock)||(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Po(p=>{var m,g;let y=this.getAxisMotionValue(p).get()||0;if(Yo.test(y)){const v=(g=(m=this.visualElement.projection)===null||m===void 0?void 0:m.layout)===null||g===void 0?void 0:g.layoutBox[p];v&&(y=li(v)*(parseFloat(y)/100))}this.originPoint[p]=y}),f==null||f(s,l),(c=this.visualElement.animationState)===null||c===void 0||c.setActive(xt.Drag,!0))},o=(s,l)=>{const{dragPropagation:c,dragDirectionLock:u,onDirectionLock:d,onDrag:f}=this.getProps();if(!c&&!this.openGlobalLock)return;const{offset:p}=l;if(u&&this.currentDirection===null){this.currentDirection=Voe(p),this.currentDirection!==null&&(d==null||d(this.currentDirection));return}this.updateAxis("x",l.point,p),this.updateAxis("y",l.point,p),this.visualElement.render(),f==null||f(s,l)},a=(s,l)=>this.stop(s,l);this.panSession=new mL(t,{onSessionStart:r,onStart:i,onMove:o,onSessionEnd:a},{transformPagePoint:this.visualElement.getTransformPagePoint()})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o==null||o(t,n)}cancel(){var t,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),(t=this.panSession)===null||t===void 0||t.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),(n=this.visualElement.animationState)===null||n===void 0||n.setActive(xt.Drag,!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!W1(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=Poe(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){const{dragConstraints:t,dragElastic:n}=this.getProps(),{layout:r}=this.visualElement.projection||{},i=this.constraints;t&&gu(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=Ooe(r.layoutBox,t):this.constraints=!1,this.elastic=Aoe(n),i!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Po(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Doe(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!gu(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=zoe(r,i.root,this.visualElement.getTransformPagePoint());let a=Moe(i.layout.layoutBox,o);if(n){const s=n(Loe(a));this.hasMutatedConstraints=!!s,s&&(a=vL(s))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=Po(u=>{if(!W1(u,n,this.currentDirection))return;let d=(l==null?void 0:l[u])||{};a&&(d={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,m={type:"inertia",velocity:r?t[u]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(s)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(j9(t,r,0,n))}stopAnimation(){Po(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){var n;const r="_drag"+t.toUpperCase(),i=this.visualElement.getProps()[r];return i||this.visualElement.getValue(t,((n=this.visualElement.getProps().initial)===null||n===void 0?void 0:n[t])||0)}snapToCursor(t){Po(n=>{const{drag:r}=this.getProps();if(!W1(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:s}=i.layout.layoutBox[n];o.set(t[n]-qt(a,s,.5))}})}scalePositionWithinConstraints(){var t;if(!this.visualElement.current)return;const{drag:n,dragConstraints:r}=this.getProps(),{projection:i}=this.visualElement;if(!gu(r)||!i||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Po(s=>{const l=this.getAxisMotionValue(s);if(l){const c=l.get();o[s]=Roe({min:c,max:c},this.constraints[s])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",(t=i.root)===null||t===void 0||t.updateScroll(),i.updateLayout(),this.resolveConstraints(),Po(s=>{if(!W1(s,n,null))return;const l=this.getAxisMotionValue(s),{min:c,max:u}=this.constraints[s];l.set(qt(c,u,o[s]))})}addListeners(){var t;if(!this.visualElement.current)return;joe.set(this.visualElement,this);const n=this.visualElement.current,r=Vu(n,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),i=()=>{const{dragConstraints:c}=this.getProps();gu(c)&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,a=o.addEventListener("measure",i);o&&!o.layout&&((t=o.root)===null||t===void 0||t.updateScroll(),o.updateLayout()),i();const s=wy(window,"resize",()=>this.scalePositionWithinConstraints()),l=o.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Po(d=>{const f=this.getAxisMotionValue(d);!f||(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{s(),r(),a(),l==null||l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=x3,dragMomentum:s=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:s}}}function W1(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Voe(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}function Woe(e){const{dragControls:t,visualElement:n}=e,r=Va(()=>new Hoe(n));h.exports.useEffect(()=>t&&t.subscribe(r),[r,t]),h.exports.useEffect(()=>r.addListeners(),[r])}function Uoe({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const o=e||t||n||r,a=h.exports.useRef(null),{transformPagePoint:s}=h.exports.useContext(yy),l={onSessionStart:r,onStart:t,onMove:e,onEnd:(u,d)=>{a.current=null,n&&n(u,d)}};h.exports.useEffect(()=>{a.current!==null&&a.current.updateHandlers(l)});function c(u){a.current=new mL(u,l,{transformPagePoint:s})}o0(i,"pointerdown",o&&c),k9(()=>a.current&&a.current.end())}const Goe={pan:Ss(Uoe),drag:Ss(Woe)};function C3(e){return typeof e=="string"&&e.startsWith("var(--")}const SL=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function Koe(e){const t=SL.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function k3(e,t,n=1){const[r,i]=Koe(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);return o?o.trim():C3(i)?k3(i,t,n+1):i}function qoe(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(i=>{const o=i.get();if(!C3(o))return;const a=k3(o,r);a&&i.set(a)});for(const i in t){const o=t[i];if(!C3(o))continue;const a=k3(o,r);!a||(t[i]=a,n&&n[i]===void 0&&(n[i]=o))}return{target:t,transitionEnd:n}}const Yoe=new Set(["width","height","top","left","right","bottom","x","y"]),wL=e=>Yoe.has(e),Xoe=e=>Object.keys(e).some(wL),CL=(e,t)=>{e.set(t,!1),e.set(t)},wE=e=>e===Cc||e===Te;var CE;(function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"})(CE||(CE={}));const kE=(e,t)=>parseFloat(e.split(", ")[t]),EE=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return kE(i[1],t);{const o=r.match(/^matrix\((.+)\)$/);return o?kE(o[1],e):0}},Zoe=new Set(["x","y","z"]),Qoe=r0.filter(e=>!Zoe.has(e));function Joe(e){const t=[];return Qoe.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const IE={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:EE(4,13),y:EE(5,14)},eae=(e,t,n)=>{const r=t.measureViewportBox(),i=t.current,o=getComputedStyle(i),{display:a}=o,s={};a==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(c=>{s[c]=IE[c](r,o)}),t.render();const l=t.measureViewportBox();return n.forEach(c=>{const u=t.getValue(c);CL(u,s[c]),e[c]=IE[c](l,o)}),e},tae=(e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(wL);let o=[],a=!1;const s=[];if(i.forEach(l=>{const c=e.getValue(l);if(!e.hasValue(l))return;let u=n[l],d=vf(u);const f=t[l];let p;if(i0(f)){const m=f.length,g=f[0]===null?1:0;u=f[g],d=vf(u);for(let y=g;y<m;y++)p?l0(vf(f[y])===p):p=vf(f[y])}else p=vf(f);if(d!==p)if(wE(d)&&wE(p)){const m=c.get();typeof m=="string"&&c.set(parseFloat(m)),typeof f=="string"?t[l]=parseFloat(f):Array.isArray(f)&&p===Te&&(t[l]=f.map(parseFloat))}else(d==null?void 0:d.transform)&&(p==null?void 0:p.transform)&&(u===0||f===0)?u===0?c.set(p.transform(u)):t[l]=d.transform(f):(a||(o=Joe(e),a=!0),s.push(l),r[l]=r[l]!==void 0?r[l]:t[l],CL(c,f))}),s.length){const l=s.indexOf("height")>=0?window.pageYOffset:null,c=eae(t,e,s);return o.length&&o.forEach(([u,d])=>{e.getValue(u).set(d)}),e.render(),Sc&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:r}}else return{target:t,transitionEnd:r}};function nae(e,t,n,r){return Xoe(t)?tae(e,t,n,r):{target:t,transitionEnd:r}}const rae=(e,t,n,r)=>{const i=qoe(e,t,r);return t=i.target,r=i.transitionEnd,nae(e,t,n,r)},E3={current:null},kL={current:!1};function iae(){if(kL.current=!0,!!Sc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>E3.current=e.matches;e.addListener(t),t()}else E3.current=!1}function oae(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],a=n[i];if(vo(o))e.addValue(i,o),s0(r)&&r.add(i);else if(vo(a))e.addValue(i,sc(o,{owner:e})),s0(r)&&r.remove(i);else if(a!==o)if(e.hasValue(i)){const s=e.getValue(i);!s.hasAnimated&&s.set(o)}else{const s=e.getStaticValue(i);e.addValue(i,sc(s!==void 0?s:o))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const EL=Object.keys(Vp),aae=EL.length,TE=["AnimationStart","AnimationComplete","Update","Unmount","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class sae{constructor({parent:t,props:n,reducedMotionConfig:r,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{!this.current||(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>kr.render(this.render,!1,!0);const{latestValues:a,renderState:s}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=s,this.parent=t,this.props=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=Sy(n),this.isVariantNode=xA(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(n);for(const u in c){const d=c[u];a[u]!==void 0&&vo(d)&&(d.set(a[u],!1),s0(l)&&l.add(u))}}scrapeMotionValuesFromProps(t){return{}}mount(t){var n;this.current=t,this.projection&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=(n=this.parent)===null||n===void 0?void 0:n.addVariantChild(this)),this.values.forEach((r,i)=>this.bindToMotionValue(i,r)),kL.current||iae(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:E3.current,this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var t,n,r;(t=this.projection)===null||t===void 0||t.unmount(),Ma.update(this.notifyUpdate),Ma.render(this.render),this.valueSubscriptions.forEach(i=>i()),(n=this.removeFromVariantTree)===null||n===void 0||n.call(this),(r=this.parent)===null||r===void 0||r.children.delete(this);for(const i in this.events)this.events[i].clear();this.current=null}bindToMotionValue(t,n){const r=wc.has(t),i=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&kr.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures(t,n,r,i,o,a){const s=[];for(let l=0;l<aae;l++){const c=EL[l],{isEnabled:u,Component:d}=Vp[c];u(t)&&d&&s.push(h.exports.createElement(d,{key:c,...t,visualElement:this}))}if(!this.projection&&o){this.projection=new o(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:c,drag:u,dragConstraints:d,layoutScroll:f}=t;this.projection.setOptions({layoutId:l,layout:c,alwaysMeasureLayout:Boolean(u)||d&&gu(d),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:a,layoutScroll:f})}return s}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):_n()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}setProps(t){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.props=t;for(let n=0;n<TE.length;n++){const r=TE[n];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const i=t["on"+r];i&&(this.propEventSubscriptions[r]=this.on(r,i))}this.prevMotionValues=oae(this,this.scrapeMotionValuesFromProps(t),this.prevMotionValues)}getProps(){return this.props}getVariant(t){var n;return(n=this.props.variants)===null||n===void 0?void 0:n[t]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var t;return this.isVariantNode?this:(t=this.parent)===null||t===void 0?void 0:t.getClosestVariantNode()}getVariantContext(t=!1){var n,r;if(t)return(n=this.parent)===null||n===void 0?void 0:n.getVariantContext();if(!this.isControllingVariants){const o=((r=this.parent)===null||r===void 0?void 0:r.getVariantContext())||{};return this.props.initial!==void 0&&(o.initial=this.props.initial),o}const i={};for(let o=0;o<lae;o++){const a=IL[o],s=this.props[a];(Hp(s)||s===!1)&&(i[a]=s)}return i}addVariantChild(t){var n;const r=this.getClosestVariantNode();if(r)return(n=r.variantChildren)===null||n===void 0||n.add(t),()=>r.variantChildren.delete(t)}addValue(t,n){this.hasValue(t)&&this.removeValue(t),this.values.set(t,n),this.latestValues[t]=n.get(),this.bindToMotionValue(t,n)}removeValue(t){var n;this.values.delete(t),(n=this.valueSubscriptions.get(t))===null||n===void 0||n(),this.valueSubscriptions.delete(t),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=sc(n,{owner:this}),this.addValue(t,r)),r}readValue(t){return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,i=typeof r=="string"||typeof r=="object"?(n=w9(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!vo(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new _9),this.events[t].add(n)}notify(t,...n){var r;(r=this.events[t])===null||r===void 0||r.notify(...n)}}const IL=["initial",...H9],lae=IL.length;class TL extends sae{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){var r;return(r=t.style)===null||r===void 0?void 0:r[n]}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:i},o){let a=gie(r,t||{},this);if(i&&(n&&(n=i(n)),r&&(r=i(r)),a&&(a=i(a))),o){hie(this,r,a);const s=rae(this,r,a,n);n=s.transitionEnd,r=s.target}return{transition:t,transitionEnd:n,...r}}}function cae(e){return window.getComputedStyle(e)}class uae extends TL{readValueFromInstance(t,n){if(wc.has(n)){const r=M9(n);return r&&r.default||0}else{const r=cae(t),i=(CA(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return xL(t,n)}build(t,n,r,i){g9(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t){return S9(t)}renderInstance(t,n,r,i){_A(t,n,r,i)}}class dae extends TL{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){var r;return wc.has(n)?((r=M9(n))===null||r===void 0?void 0:r.default)||0:(n=PA.has(n)?n:x9(n),t.getAttribute(n))}measureInstanceViewportBox(){return _n()}scrapeMotionValuesFromProps(t){return MA(t)}build(t,n,r,i){y9(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){OA(t,n,r,i)}mount(t){this.isSVGTag=b9(t.tagName),super.mount(t)}}const fae=(e,t)=>m9(e)?new dae(t,{enableHardwareAcceleration:!1}):new uae(t,{enableHardwareAcceleration:!0});function _E(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const yf={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Te.test(e))e=parseFloat(e);else return e;const n=_E(e,t.target.x),r=_E(e,t.target.y);return`${n}% ${r}%`}},PE="_$css",pae={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),o=[];i&&(e=e.replace(SL,p=>(o.push(p),PE)));const a=Ws.parse(e);if(a.length>5)return r;const s=Ws.createTransformer(e),l=typeof a[0]!="number"?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;a[0+l]/=c,a[1+l]/=u;const d=qt(c,u,.5);typeof a[2+l]=="number"&&(a[2+l]/=d),typeof a[3+l]=="number"&&(a[3+l]/=d);let f=s(a);if(i){let p=0;f=f.replace(PE,()=>{const m=o[p];return p++,m})}return f}};var Iy={exports:{}},Ty={};/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var hae=h.exports,mae=Symbol.for("react.element"),gae=Symbol.for("react.fragment"),vae=Object.prototype.hasOwnProperty,yae=hae.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,bae={key:!0,ref:!0,__self:!0,__source:!0};function _L(e,t,n){var r,i={},o=null,a=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)vae.call(t,r)&&!bae.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:mae,type:e,key:o,ref:a,props:i,_owner:yae.current}}Ty.Fragment=gae;Ty.jsx=_L;Ty.jsxs=_L;Iy.exports=Ty;const k=Iy.exports.jsx,Z=Iy.exports.jsxs,Pe=Iy.exports.Fragment;class xae extends A.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;zne(wae),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),rp.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||kr.postRender(()=>{var s;!((s=a.getStack())===null||s===void 0)&&s.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),!t.currentAnimation&&t.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n!=null&&n.group&&n.group.remove(i),r!=null&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t==null||t()}render(){return null}}function Sae(e){const[t,n]=E9(),r=h.exports.useContext(h9);return k(xae,{...e,layoutGroup:r,switchLayoutGroup:h.exports.useContext(SA),isPresent:t,safeToRemove:n})}const wae={borderRadius:{...yf,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:yf,borderTopRightRadius:yf,borderBottomLeftRadius:yf,borderBottomRightRadius:yf,boxShadow:pae},Cae={measureLayout:Sae};function kae(e,t,n={}){const r=vo(e)?e:sc(e);return r.start(j9("",r,t,n)),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}const PL=["TopLeft","TopRight","BottomLeft","BottomRight"],Eae=PL.length,OE=e=>typeof e=="string"?parseFloat(e):e,ME=e=>typeof e=="number"||Te.test(e);function Iae(e,t,n,r,i,o){i?(e.opacity=qt(0,n.opacity!==void 0?n.opacity:1,Tae(r)),e.opacityExit=qt(t.opacity!==void 0?t.opacity:1,0,_ae(r))):o&&(e.opacity=qt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<Eae;a++){const s=`border${PL[a]}Radius`;let l=RE(t,s),c=RE(n,s);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||ME(l)===ME(c)?(e[s]=Math.max(qt(OE(l),OE(c),r),0),(Yo.test(c)||Yo.test(l))&&(e[s]+="%")):e[s]=c}(t.rotate||n.rotate)&&(e.rotate=qt(t.rotate||0,n.rotate||0,r))}function RE(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const Tae=OL(0,.5,N9),_ae=OL(.5,.95,F9);function OL(e,t,n){return r=>r<e?0:r>t?1:n(c0(e,t,r))}function DE(e,t){e.min=t.min,e.max=t.max}function Xi(e,t){DE(e.x,t.x),DE(e.y,t.y)}function AE(e,t,n,r,i){return e-=t,e=f0(e,1/n,r),i!==void 0&&(e=f0(e,1/i,r)),e}function Pae(e,t=0,n=1,r=.5,i,o=e,a=e){if(Yo.test(t)&&(t=parseFloat(t),t=qt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let s=qt(o.min,o.max,r);e===o&&(s-=t),e.min=AE(e.min,t,n,s,i),e.max=AE(e.max,t,n,s,i)}function LE(e,t,[n,r,i],o,a){Pae(e,t[n],t[r],t[i],t.scale,o,a)}const Oae=["x","scaleX","originX"],Mae=["y","scaleY","originY"];function BE(e,t,n,r){LE(e.x,t,Oae,n==null?void 0:n.x,r==null?void 0:r.x),LE(e.y,t,Mae,n==null?void 0:n.y,r==null?void 0:r.y)}function $E(e){return e.translate===0&&e.scale===1}function ML(e){return $E(e.x)&&$E(e.y)}function RL(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function FE(e){return li(e.x)/li(e.y)}class Rae{constructor(){this.members=[]}add(t){I9(this.members,t),t.scheduleRender()}remove(t){if(T9(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){var r;const i=this.lead;if(t!==i&&(this.prevLead=i,this.lead=t,t.show(),i)){i.instance&&i.scheduleRender(),t.scheduleRender(),t.resumeFrom=i,n&&(t.resumeFrom.preserveOpacity=!0),i.snapshot&&(t.snapshot=i.snapshot,t.snapshot.latestValues=i.animationValues||i.latestValues),!((r=t.root)===null||r===void 0)&&r.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(t=>{var n,r,i,o,a;(r=(n=t.options).onExitComplete)===null||r===void 0||r.call(n),(a=(i=t.resumingFrom)===null||i===void 0?void 0:(o=i.options).onExitComplete)===null||a===void 0||a.call(o)})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function NE(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y;if((i||o)&&(r=`translate3d(${i}px, ${o}px, 0) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:l,rotateX:c,rotateY:u}=n;l&&(r+=`rotate(${l}deg) `),c&&(r+=`rotateX(${c}deg) `),u&&(r+=`rotateY(${u}deg) `)}const a=e.x.scale*t.x,s=e.y.scale*t.y;return(a!==1||s!==1)&&(r+=`scale(${a}, ${s})`),r||"none"}const Dae=(e,t)=>e.depth-t.depth;class Aae{constructor(){this.children=[],this.isDirty=!1}add(t){I9(this.children,t),this.isDirty=!0}remove(t){T9(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Dae),this.isDirty=!1,this.children.forEach(t)}}const zE=["","X","Y","Z"],jE=1e3;let Lae=0;function DL({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a,s={},l=t==null?void 0:t()){this.id=Lae++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Fae),this.nodes.forEach(jae),this.nodes.forEach(Hae)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=a,this.latestValues=s,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0,a&&this.root.registerPotentialNode(a,this);for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new Aae)}addEventListener(a,s){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new _9),this.eventHandlers.get(a).add(s)}notifyListeners(a,...s){const l=this.eventHandlers.get(a);l==null||l.notify(...s)}hasListeners(a){return this.eventHandlers.has(a)}registerPotentialNode(a,s){this.potentialNodes.set(a,s)}mount(a,s=!1){var l;if(this.instance)return;this.isSVG=a instanceof SVGElement&&a.tagName!=="svg",this.instance=a;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),(l=this.parent)===null||l===void 0||l.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),s&&(u||c)&&(this.isLayoutDirty=!0),e){let f;const p=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=dL(p,250),rp.hasAnimatedSinceResize&&(rp.hasAnimatedSinceResize=!1,this.nodes.forEach(VE))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:p,hasRelativeTargetChanged:m,layout:g})=>{var y,v,b,x,w;if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const E=(v=(y=this.options.transition)!==null&&y!==void 0?y:d.getDefaultTransition())!==null&&v!==void 0?v:Kae,{onLayoutAnimationStart:C,onLayoutAnimationComplete:I}=d.getProps(),T=!this.targetLayout||!RL(this.targetLayout,g)||m,_=!p&&m;if(((b=this.resumeFrom)===null||b===void 0?void 0:b.instance)||_||p&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,_);const P={...fL(E,"layout"),onPlay:C,onComplete:I};d.shouldReduceMotion&&(P.delay=0,P.type=!1),this.startAnimation(P)}else!p&&this.animationProgress===0&&VE(this),this.isLead()&&((w=(x=this.options).onExitComplete)===null||w===void 0||w.call(x));this.targetLayout=g})}unmount(){var a,s;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),(a=this.getStack())===null||a===void 0||a.remove(this),(s=this.parent)===null||s===void 0||s.children.delete(this),this.instance=void 0,Ma.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var a;return this.isAnimationBlocked||((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimationBlocked())||!1}startUpdate(){var a;this.isUpdateBlocked()||(this.isUpdating=!0,(a=this.nodes)===null||a===void 0||a.forEach(Vae),this.animationId++)}willUpdate(a=!0){var s,l,c;if(this.root.isUpdateBlocked()){(l=(s=this.options).onExitComplete)===null||l===void 0||l.call(s);return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let p=0;p<this.path.length;p++){const m=this.path[p];m.shouldResetTransform=!0,m.updateScroll("snapshot")}const{layoutId:u,layout:d}=this.options;if(u===void 0&&!d)return;const f=(c=this.options.visualElement)===null||c===void 0?void 0:c.getProps().transformTemplate;this.prevTransformTemplateValue=f==null?void 0:f(this.latestValues,""),this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}didUpdate(){if(this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(HE);return}!this.isUpdating||(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(qae),this.potentialNodes.clear()),this.nodes.forEach(zae),this.nodes.forEach(Bae),this.nodes.forEach($ae),this.clearAllSnapshots(),Cb.update(),Cb.preRender(),Cb.render())}clearAllSnapshots(){this.nodes.forEach(Nae),this.sharedNodes.forEach(Wae)}scheduleUpdateProjection(){kr.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){kr.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){var a;if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=_n(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox),(a=this.options.visualElement)===null||a===void 0||a.notify("LayoutMeasure",this.layout.layoutBox,s==null?void 0:s.layoutBox)}updateScroll(a="measure"){let s=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(s=!1),s&&(this.scroll={animationId:this.root.animationId,phase:a,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){var a;if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,l=this.projectionDelta&&!ML(this.projectionDelta),c=(a=this.options.visualElement)===null||a===void 0?void 0:a.getProps().transformTemplate,u=c==null?void 0:c(this.latestValues,""),d=u!==this.prevTransformTemplateValue;s&&(l||kl(this.latestValues)||d)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const s=this.measurePageBox();let l=this.removeElementScroll(s);return a&&(l=this.removeTransform(l)),Yae(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:a}=this.options;if(!a)return _n();const s=a.measureViewportBox(),{scroll:l}=this.root;return l&&(ss(s.x,l.offset.x),ss(s.y,l.offset.y)),s}removeElementScroll(a){const s=_n();Xi(s,a);for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:d}=c;if(c!==this.root&&u&&d.layoutScroll){if(u.isRoot){Xi(s,a);const{scroll:f}=this.root;f&&(ss(s.x,-f.offset.x),ss(s.y,-f.offset.y))}ss(s.x,u.offset.x),ss(s.y,u.offset.y)}}return s}applyTransform(a,s=!1){const l=_n();Xi(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];!s&&u.options.layoutScroll&&u.scroll&&u!==u.root&&yu(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),kl(u.latestValues)&&yu(l,u.latestValues)}return kl(this.latestValues)&&yu(l,this.latestValues),l}removeTransform(a){var s;const l=_n();Xi(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!kl(u.latestValues))continue;S3(u.latestValues)&&u.updateSnapshot();const d=_n(),f=u.measurePageBox();Xi(d,f),BE(l,u.latestValues,(s=u.snapshot)===null||s===void 0?void 0:s.layoutBox,d)}return kl(this.latestValues)&&BE(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.isProjectionDirty=!0,this.root.scheduleUpdateProjection()}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(){var a;const s=this.getLead();if(this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),!this.isProjectionDirty&&!this.attemptToResolveRelativeTarget)return;const{layout:l,layoutId:c}=this.options;if(!(!this.layout||!(l||c))){if(!this.targetDelta&&!this.relativeTarget){const u=this.getClosestProjectingParent();u&&u.layout?(this.relativeParent=u,this.relativeTarget=_n(),this.relativeTargetOrigin=_n(),sp(this.relativeTargetOrigin,this.layout.layoutBox,u.layout.layoutBox),Xi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=_n(),this.targetWithTransforms=_n()),this.relativeTarget&&this.relativeTargetOrigin&&((a=this.relativeParent)===null||a===void 0?void 0:a.target)?_oe(this.target,this.relativeTarget,this.relativeParent.target):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Xi(this.target,this.layout.layoutBox),bL(this.target,this.targetDelta)):Xi(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const u=this.getClosestProjectingParent();u&&Boolean(u.resumingFrom)===Boolean(this.resumingFrom)&&!u.options.layoutScroll&&u.target?(this.relativeParent=u,this.relativeTarget=_n(),this.relativeTargetOrigin=_n(),sp(this.relativeTargetOrigin,this.target,u.target),Xi(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||S3(this.parent.latestValues)||yL(this.parent.latestValues)))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var a;const{isProjectionDirty:s,isTransformDirty:l}=this;this.isProjectionDirty=this.isTransformDirty=!1;const c=this.getLead(),u=Boolean(this.resumingFrom)||this!==c;let d=!0;if(s&&(d=!1),u&&l&&(d=!1),d)return;const{layout:f,layoutId:p}=this.options;if(this.isTreeAnimating=Boolean(((a=this.parent)===null||a===void 0?void 0:a.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(f||p))return;Xi(this.layoutCorrected,this.layout.layoutBox),$oe(this.layoutCorrected,this.treeScale,this.path,u);const{target:m}=c;if(!m)return;this.projectionDelta||(this.projectionDelta=lp(),this.projectionDeltaWithTransform=lp());const g=this.treeScale.x,y=this.treeScale.y,v=this.projectionTransform;ap(this.projectionDelta,this.layoutCorrected,m,this.latestValues),this.projectionTransform=NE(this.projectionDelta,this.treeScale),(this.projectionTransform!==v||this.treeScale.x!==g||this.treeScale.y!==y)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var s,l,c;(l=(s=this.options).scheduleRender)===null||l===void 0||l.call(s),a&&((c=this.getStack())===null||c===void 0||c.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(a,s=!1){var l,c;const u=this.snapshot,d=(u==null?void 0:u.latestValues)||{},f={...this.latestValues},p=lp();this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!s;const m=_n(),g=(u==null?void 0:u.source)!==((l=this.layout)===null||l===void 0?void 0:l.source),y=(((c=this.getStack())===null||c===void 0?void 0:c.members.length)||0)<=1,v=Boolean(g&&!y&&this.options.crossfade===!0&&!this.path.some(Gae));this.animationProgress=0,this.mixTargetDelta=b=>{var x;const w=b/1e3;WE(p.x,a.x,w),WE(p.y,a.y,w),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&((x=this.relativeParent)===null||x===void 0?void 0:x.layout)&&(sp(m,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Uae(this.relativeTarget,this.relativeTargetOrigin,m,w)),g&&(this.animationValues=f,Iae(f,d,this.latestValues,w,v,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=w},this.mixTargetDelta(0)}startAnimation(a){var s,l;this.notifyListeners("animationStart"),(s=this.currentAnimation)===null||s===void 0||s.stop(),this.resumingFrom&&((l=this.resumingFrom.currentAnimation)===null||l===void 0||l.stop()),this.pendingAnimation&&(Ma.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=kr.update(()=>{rp.hasAnimatedSinceResize=!0,this.currentAnimation=kae(0,jE,{...a,onUpdate:c=>{var u;this.mixTargetDelta(c),(u=a.onUpdate)===null||u===void 0||u.call(a,c)},onComplete:()=>{var c;(c=a.onComplete)===null||c===void 0||c.call(a),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){var a;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),(a=this.getStack())===null||a===void 0||a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var a;this.currentAnimation&&((a=this.mixTargetDelta)===null||a===void 0||a.call(this,jE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:s,target:l,layout:c,latestValues:u}=a;if(!(!s||!l||!c)){if(this!==a&&this.layout&&c&&AL(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||_n();const d=li(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+d;const f=li(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}Xi(s,l),yu(s,u),ap(this.projectionDeltaWithTransform,this.layoutCorrected,s,u)}}registerSharedNode(a,s){var l,c,u;this.sharedNodes.has(a)||this.sharedNodes.set(a,new Rae),this.sharedNodes.get(a).add(s),s.promote({transition:(l=s.options.initialPromotionConfig)===null||l===void 0?void 0:l.transition,preserveFollowOpacity:(u=(c=s.options.initialPromotionConfig)===null||c===void 0?void 0:c.shouldPreserveFollowOpacity)===null||u===void 0?void 0:u.call(c,s)})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:s}=this.options;return s?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:s}=this.options;return s?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:s,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetRotation(){const{visualElement:a}=this.options;if(!a)return;let s=!1;const{latestValues:l}=a;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(s=!0),!s)return;const c={};for(let u=0;u<zE.length;u++){const d="rotate"+zE[u];l[d]&&(c[d]=l[d],a.setStaticValue(d,0))}a==null||a.render();for(const u in c)a.setStaticValue(u,c[u]);a.scheduleRender()}getProjectionStyles(a={}){var s,l,c;const u={};if(!this.instance||this.isSVG)return u;if(this.isVisible)u.visibility="";else return{visibility:"hidden"};const d=(s=this.options.visualElement)===null||s===void 0?void 0:s.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=ag(a.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const y={};return this.options.layoutId&&(y.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,y.pointerEvents=ag(a.pointerEvents)||""),this.hasProjected&&!kl(this.latestValues)&&(y.transform=d?d({},""):"none",this.hasProjected=!1),y}const p=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=NE(this.projectionDeltaWithTransform,this.treeScale,p),d&&(u.transform=d(p,u.transform));const{x:m,y:g}=this.projectionDelta;u.transformOrigin=`${m.origin*100}% ${g.origin*100}% 0`,f.animationValues?u.opacity=f===this?(c=(l=p.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:u.opacity=f===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const y in n0){if(p[y]===void 0)continue;const{correct:v,applyTo:b}=n0[y],x=v(p[y],f);if(b){const w=b.length;for(let E=0;E<w;E++)u[b[E]]=x}else u[y]=x}return this.options.layoutId&&(u.pointerEvents=f===this?ag(a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var s;return(s=a.currentAnimation)===null||s===void 0?void 0:s.stop()}),this.root.nodes.forEach(HE),this.root.sharedNodes.clear()}}}function Bae(e){e.updateLayout()}function $ae(e){var t,n,r;const i=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:a}=e.layout,{animationType:s}=e.options,l=i.source!==e.layout.source;s==="size"?Po(p=>{const m=l?i.measuredBox[p]:i.layoutBox[p],g=li(m);m.min=o[p].min,m.max=m.min+g}):AL(s,i.layoutBox,o)&&Po(p=>{const m=l?i.measuredBox[p]:i.layoutBox[p],g=li(o[p]);m.max=m.min+g});const c=lp();ap(c,o,i.layoutBox);const u=lp();l?ap(u,e.applyTransform(a,!0),i.measuredBox):ap(u,o,i.layoutBox);const d=!ML(c);let f=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:m,layout:g}=p;if(m&&g){const y=_n();sp(y,i.layoutBox,m.layoutBox);const v=_n();sp(v,o,g.layoutBox),RL(y,v)||(f=!0)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:i,delta:u,layoutDelta:c,hasLayoutChanged:d,hasRelativeTargetChanged:f})}else e.isLead()&&((r=(n=e.options).onExitComplete)===null||r===void 0||r.call(n));e.options.transition=void 0}function Fae(e){e.isProjectionDirty||(e.isProjectionDirty=Boolean(e.parent&&e.parent.isProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=Boolean(e.parent&&e.parent.isTransformDirty))}function Nae(e){e.clearSnapshot()}function HE(e){e.clearMeasurements()}function zae(e){const{visualElement:t}=e.options;t!=null&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function VE(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function jae(e){e.resolveTargetDelta()}function Hae(e){e.calcProjection()}function Vae(e){e.resetRotation()}function Wae(e){e.removeLeadSnapshot()}function WE(e,t,n){e.translate=qt(t.translate,0,n),e.scale=qt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function UE(e,t,n,r){e.min=qt(t.min,n.min,r),e.max=qt(t.max,n.max,r)}function Uae(e,t,n,r){UE(e.x,t.x,n.x,r),UE(e.y,t.y,n.y,r)}function Gae(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Kae={duration:.45,ease:[.4,0,.1,1]};function qae(e,t){let n=e.root;for(let o=e.path.length-1;o>=0;o--)if(Boolean(e.path[o].instance)){n=e.path[o];break}const i=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);i&&e.mount(i,!0)}function GE(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Yae(e){GE(e.x),GE(e.y)}function AL(e,t,n){return e==="position"||e==="preserve-aspect"&&!b3(FE(t),FE(n),.2)}const Xae=DL({attachResizeListener:(e,t)=>wy(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Db={current:void 0},Zae=DL({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Db.current){const e=new Xae(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Db.current=e}return Db.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>Boolean(window.getComputedStyle(e).position==="fixed")}),Qae={...koe,...Nre,...Goe,...Cae},Ur=Fne((e,t)=>gre(e,t,Qae,fae,Zae));function LL(){const e=h.exports.useRef(!1);return Hu(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Jae(){const e=LL(),[t,n]=h.exports.useState(0),r=h.exports.useCallback(()=>{e.current&&n(t+1)},[t]);return[h.exports.useCallback(()=>kr.postRender(r),[r]),t]}class ese extends h.exports.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function tse({children:e,isPresent:t}){const n=h.exports.useId(),r=h.exports.useRef(null),i=h.exports.useRef({width:0,height:0,top:0,left:0});return h.exports.useInsertionEffect(()=>{const{width:o,height:a,top:s,left:l}=i.current;if(t||!r.current||!o||!a)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
          [data-motion-pop-id="${n}"] {
            position: absolute !important;
            width: ${o}px !important;
            height: ${a}px !important;
            top: ${s}px !important;
            left: ${l}px !important;
          }
        `),()=>{document.head.removeChild(c)}},[t]),h.exports.createElement(ese,{isPresent:t,childRef:r,sizeRef:i},h.exports.cloneElement(e,{ref:r}))}const Ab=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a})=>{const s=Va(nse),l=h.exports.useId(),c=h.exports.useMemo(()=>({id:l,initial:t,isPresent:n,custom:i,onExitComplete:u=>{s.set(u,!0);for(const d of s.values())if(!d)return;r&&r()},register:u=>(s.set(u,!1),()=>s.delete(u))}),o?void 0:[n]);return h.exports.useMemo(()=>{s.forEach((u,d)=>s.set(d,!1))},[n]),h.exports.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),a==="popLayout"&&(e=h.exports.createElement(tse,{isPresent:n},e)),h.exports.createElement(jd.Provider,{value:c},e)};function nse(){return new Map}const lu=e=>e.key||"";function rse(e,t){e.forEach(n=>{const r=lu(n);t.set(r,n)})}function ise(e){const t=[];return h.exports.Children.forEach(e,n=>{h.exports.isValidElement(n)&&t.push(n)}),t}const Wa=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:o=!0,mode:a="sync"})=>{i&&(a="wait",HA(!1,"Replace exitBeforeEnter with mode='wait'"));let[s]=Jae();const l=h.exports.useContext(h9).forceRender;l&&(s=l);const c=LL(),u=ise(e);let d=u;const f=new Set,p=h.exports.useRef(d),m=h.exports.useRef(new Map).current,g=h.exports.useRef(!0);if(Hu(()=>{g.current=!1,rse(u,m),p.current=d}),k9(()=>{g.current=!0,m.clear(),f.clear()}),g.current)return h.exports.createElement(h.exports.Fragment,null,d.map(x=>h.exports.createElement(Ab,{key:lu(x),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:o,mode:a},x)));d=[...d];const y=p.current.map(lu),v=u.map(lu),b=y.length;for(let x=0;x<b;x++){const w=y[x];v.indexOf(w)===-1&&f.add(w)}return a==="wait"&&f.size&&(d=[]),f.forEach(x=>{if(v.indexOf(x)!==-1)return;const w=m.get(x);if(!w)return;const E=y.indexOf(x),C=()=>{m.delete(x),f.delete(x);const I=p.current.findIndex(T=>T.key===x);if(p.current.splice(I,1),!f.size){if(p.current=u,c.current===!1)return;s(),r&&r()}};d.splice(E,0,h.exports.createElement(Ab,{key:lu(w),isPresent:!1,onExitComplete:C,custom:t,presenceAffectsLayout:o,mode:a},w))}),d=d.map(x=>{const w=x.key;return f.has(w)?x:h.exports.createElement(Ab,{key:lu(x),isPresent:!0,presenceAffectsLayout:o,mode:a},x)}),jA!=="production"&&a==="wait"&&d.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`),h.exports.createElement(h.exports.Fragment,null,f.size?d:d.map(x=>h.exports.cloneElement(x)))},BL=h.exports.createContext(null);function ose(e,t,n,r){if(!r)return e;const i=e.findIndex(u=>u.value===t);if(i===-1)return e;const o=r>0?1:-1,a=e[i+o];if(!a)return e;const s=e[i],l=a.layout,c=qt(l.min,l.max,.5);return o===1&&s.layout.max+n>c||o===-1&&s.layout.min+n<c?Yre(e,i,i+o):e}function ase({children:e,as:t="ul",axis:n="y",onReorder:r,values:i,...o},a){const s=Va(()=>Ur(t)),l=[],c=h.exports.useRef(!1),u={axis:n,registerItem:(d,f)=>{f&&l.findIndex(p=>d===p.value)===-1&&(l.push({value:d,layout:f[n]}),l.sort(cse))},updateOrder:(d,f,p)=>{if(c.current)return;const m=ose(l,d,f,p);l!==m&&(c.current=!0,r(m.map(lse).filter(g=>i.indexOf(g)!==-1)))}};return h.exports.useEffect(()=>{c.current=!1}),h.exports.createElement(s,{...o,ref:a},h.exports.createElement(BL.Provider,{value:u},e))}const sse=h.exports.forwardRef(ase);function lse(e){return e.value}function cse(e,t){return e.layout.min-t.layout.min}function $L(e){const t=Va(()=>sc(e)),{isStatic:n}=h.exports.useContext(yy);if(n){const[,r]=h.exports.useState(e);h.exports.useEffect(()=>t.on("change",r),[])}return t}const use=e=>typeof e=="object"&&e.mix,dse=e=>use(e)?e.mix:void 0;function fse(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],o=e[2+n],a=e[3+n],s=$9(i,o,{mixer:dse(o[0]),...a});return t?s(r):s}function pse(e,t,n){Hu(()=>{const r=e.map(i=>i.on("change",t));return()=>{r.forEach(i=>i()),n()}})}function hse(e,t){const n=$L(t()),r=()=>n.set(t());return r(),pse(e,()=>kr.update(r,!1,!0),()=>Ma.update(r)),n}function mse(e,t,n,r){const i=typeof t=="function"?t:fse(t,n,r);return Array.isArray(e)?KE(e,i):KE([e],([o])=>i(o))}function KE(e,t){const n=Va(()=>[]);return hse(e,()=>{n.length=0;const r=e.length;for(let i=0;i<r;i++)n[i]=e[i].get();return t(n)})}function qE(e,t=0){return vo(e)?e:$L(t)}function gse({children:e,style:t={},value:n,as:r="li",onDrag:i,layout:o=!0,...a},s){const l=Va(()=>Ur(r)),c=h.exports.useContext(BL),u={x:qE(t.x),y:qE(t.y)},d=mse([u.x,u.y],([y,v])=>y||v?1:"unset"),f=h.exports.useRef(null),{axis:p,registerItem:m,updateOrder:g}=c;return h.exports.useEffect(()=>{m(n,f.current)},[c]),h.exports.createElement(l,{drag:p,...a,dragSnapToOrigin:!0,style:{...t,x:u.x,y:u.y,zIndex:d},layout:o,onDrag:(y,v)=>{const{velocity:b}=v;b[p]&&g(n,u[p].get(),b[p]),i&&i(y,v)},onLayoutMeasure:y=>{f.current=y},ref:s},e)}const vse=h.exports.forwardRef(gse),yse={Group:sse,Item:vse};var Lo=function(){return Lo=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Lo.apply(this,arguments)};function FL(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function bse(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}class xse{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,n){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,n)})}}const Sse=()=>new xse;function wse(){return Va(Sse)}var Wh=(...e)=>e.filter(Boolean).join(" ");function Cse(){return!1}var kse=e=>{const{condition:t,message:n}=e;t&&Cse()&&console.warn(n)},Hl={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]},bf={scale:{enter:{scale:1},exit:{scale:.95}},fade:{enter:{opacity:1},exit:{opacity:0}},pushLeft:{enter:{x:"100%"},exit:{x:"-30%"}},pushRight:{enter:{x:"-100%"},exit:{x:"30%"}},pushUp:{enter:{y:"100%"},exit:{y:"-30%"}},pushDown:{enter:{y:"-100%"},exit:{y:"30%"}},slideLeft:{position:{left:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"-100%",y:0}},slideRight:{position:{right:0,top:0,bottom:0,width:"100%"},enter:{x:0,y:0},exit:{x:"100%",y:0}},slideUp:{position:{top:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"-100%"}},slideDown:{position:{bottom:0,left:0,right:0,maxWidth:"100vw"},enter:{x:0,y:0},exit:{x:0,y:"100%"}}};function I3(e){var n;switch((n=e==null?void 0:e.direction)!=null?n:"right"){case"right":return bf.slideRight;case"left":return bf.slideLeft;case"bottom":return bf.slideDown;case"top":return bf.slideUp;default:return bf.slideRight}}var Zl={enter:{duration:.2,ease:Hl.easeOut},exit:{duration:.1,ease:Hl.easeIn}},fo={enter:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.enter}),exit:(e,t)=>({...e,delay:typeof t=="number"?t:t==null?void 0:t.exit})},Ese=e=>e!=null&&parseInt(e.toString(),10)>0,YE={exit:{height:{duration:.2,ease:Hl.ease},opacity:{duration:.3,ease:Hl.ease}},enter:{height:{duration:.3,ease:Hl.ease},opacity:{duration:.4,ease:Hl.ease}}},Ise={exit:({animateOpacity:e,startingHeight:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{...e&&{opacity:Ese(t)?1:0},height:t,transitionEnd:r==null?void 0:r.exit,transition:(o=n==null?void 0:n.exit)!=null?o:fo.exit(YE.exit,i)}},enter:({animateOpacity:e,endingHeight:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{...e&&{opacity:1},height:t,transitionEnd:r==null?void 0:r.enter,transition:(o=n==null?void 0:n.enter)!=null?o:fo.enter(YE.enter,i)}}},NL=h.exports.forwardRef((e,t)=>{const{in:n,unmountOnExit:r,animateOpacity:i=!0,startingHeight:o=0,endingHeight:a="auto",style:s,className:l,transition:c,transitionEnd:u,...d}=e,[f,p]=h.exports.useState(!1);h.exports.useEffect(()=>{const b=setTimeout(()=>{p(!0)});return()=>clearTimeout(b)},[]),kse({condition:Boolean(o>0&&r),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});const m=parseFloat(o.toString())>0,g={startingHeight:o,endingHeight:a,animateOpacity:i,transition:f?c:{enter:{duration:0}},transitionEnd:{enter:u==null?void 0:u.enter,exit:r?u==null?void 0:u.exit:{...u==null?void 0:u.exit,display:m?"block":"none"}}},y=r?n:!0,v=n||r?"enter":"exit";return A.createElement(Wa,{initial:!1,custom:g},y&&A.createElement(Ur.div,{ref:t,...d,className:Wh("chakra-collapse",l),style:{overflow:"hidden",display:"block",...s},custom:g,variants:Ise,initial:r?"exit":!1,animate:v,exit:"exit"}))});NL.displayName="Collapse";var Tse={enter:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:1,transition:(r=e==null?void 0:e.enter)!=null?r:fo.enter(Zl.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({transition:e,transitionEnd:t,delay:n}={})=>{var r;return{opacity:0,transition:(r=e==null?void 0:e.exit)!=null?r:fo.exit(Zl.exit,n),transitionEnd:t==null?void 0:t.exit}}},zL={initial:"exit",animate:"enter",exit:"exit",variants:Tse},_se=h.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,className:o,transition:a,transitionEnd:s,delay:l,...c}=t,u=i||r?"enter":"exit",d=r?i&&r:!0,f={transition:a,transitionEnd:s,delay:l};return A.createElement(Wa,{custom:f},d&&A.createElement(Ur.div,{ref:n,className:Wh("chakra-fade",o),custom:f,...zL,animate:u,...c}))});_se.displayName="Fade";var Pse={exit:({reverse:e,initialScale:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{opacity:0,...e?{scale:t,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{scale:t,...r==null?void 0:r.exit}},transition:(o=n==null?void 0:n.exit)!=null?o:fo.exit(Zl.exit,i)}},enter:({transitionEnd:e,transition:t,delay:n})=>{var r;return{opacity:1,scale:1,transition:(r=t==null?void 0:t.enter)!=null?r:fo.enter(Zl.enter,n),transitionEnd:e==null?void 0:e.enter}}},jL={initial:"exit",animate:"enter",exit:"exit",variants:Pse},Ose=h.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,initialScale:a=.95,className:s,transition:l,transitionEnd:c,delay:u,...d}=t,f=r?i&&r:!0,p=i||r?"enter":"exit",m={initialScale:a,reverse:o,transition:l,transitionEnd:c,delay:u};return A.createElement(Wa,{custom:m},f&&A.createElement(Ur.div,{ref:n,className:Wh("chakra-offset-slide",s),...jL,animate:p,custom:m,...d}))});Ose.displayName="ScaleFade";var XE={exit:{duration:.15,ease:Hl.easeInOut},enter:{type:"spring",damping:25,stiffness:180}},Mse={exit:({direction:e,transition:t,transitionEnd:n,delay:r})=>{var o;const{exit:i}=I3({direction:e});return{...i,transition:(o=t==null?void 0:t.exit)!=null?o:fo.exit(XE.exit,r),transitionEnd:n==null?void 0:n.exit}},enter:({direction:e,transitionEnd:t,transition:n,delay:r})=>{var o;const{enter:i}=I3({direction:e});return{...i,transition:(o=n==null?void 0:n.enter)!=null?o:fo.enter(XE.enter,r),transitionEnd:t==null?void 0:t.enter}}},HL=h.exports.forwardRef(function(t,n){const{direction:r="right",style:i,unmountOnExit:o,in:a,className:s,transition:l,transitionEnd:c,delay:u,...d}=t,f=I3({direction:r}),p=Object.assign({position:"fixed"},f.position,i),m=o?a&&o:!0,g=a||o?"enter":"exit",y={transitionEnd:c,transition:l,direction:r,delay:u};return A.createElement(Wa,{custom:y},m&&A.createElement(Ur.div,{...d,ref:n,initial:"exit",className:Wh("chakra-slide",s),animate:g,exit:"exit",custom:y,variants:Mse,style:p}))});HL.displayName="Slide";var Rse={initial:({offsetX:e,offsetY:t,transition:n,transitionEnd:r,delay:i})=>{var o;return{opacity:0,x:e,y:t,transition:(o=n==null?void 0:n.exit)!=null?o:fo.exit(Zl.exit,i),transitionEnd:r==null?void 0:r.exit}},enter:({transition:e,transitionEnd:t,delay:n})=>{var r;return{opacity:1,x:0,y:0,transition:(r=e==null?void 0:e.enter)!=null?r:fo.enter(Zl.enter,n),transitionEnd:t==null?void 0:t.enter}},exit:({offsetY:e,offsetX:t,transition:n,transitionEnd:r,reverse:i,delay:o})=>{var s;const a={x:t,y:e};return{opacity:0,transition:(s=n==null?void 0:n.exit)!=null?s:fo.exit(Zl.exit,o),...i?{...a,transitionEnd:r==null?void 0:r.exit}:{transitionEnd:{...a,...r==null?void 0:r.exit}}}}},T3={initial:"initial",animate:"enter",exit:"exit",variants:Rse},Dse=h.exports.forwardRef(function(t,n){const{unmountOnExit:r,in:i,reverse:o=!0,className:a,offsetX:s=0,offsetY:l=8,transition:c,transitionEnd:u,delay:d,...f}=t,p=r?i&&r:!0,m=i||r?"enter":"exit",g={offsetX:s,offsetY:l,reverse:o,transition:c,transitionEnd:u,delay:d};return A.createElement(Wa,{custom:g},p&&A.createElement(Ur.div,{ref:n,className:Wh("chakra-offset-slide",a),custom:g,...T3,animate:m,...f}))});Dse.displayName="SlideFade";var _y=(...e)=>e.filter(Boolean).join(" ");function Ase(){return!1}var Py=e=>{const{condition:t,message:n}=e;t&&Ase()&&console.warn(n)};function Lb(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[Lse,V9]=En({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:"<Accordion />"}),[Bse,VL]=En({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:"<AccordionItem />"}),[$se,MFe,Fse,Nse]=vA(),_3=de(function(t,n){const{getButtonProps:r}=VL(),i=r(t,n),o=V9(),a={display:"flex",alignItems:"center",width:"100%",outline:0,...o.button};return A.createElement(ce.button,{...i,className:_y("chakra-accordion__button",t.className),__css:a})});_3.displayName="AccordionButton";function zse(e){const{onChange:t,defaultIndex:n,index:r,allowMultiple:i,allowToggle:o,...a}=e;Vse(e),Wse(e);const s=Fse(),[l,c]=h.exports.useState(-1);h.exports.useEffect(()=>()=>{c(-1)},[]);const[u,d]=kne({value:r,defaultValue(){return i?n!=null?n:[]:n!=null?n:-1},onChange:t});return{index:u,setIndex:d,htmlProps:a,getAccordionItemProps:p=>{let m=!1;return p!==null&&(m=Array.isArray(u)?u.includes(p):u===p),{isOpen:m,onChange:y=>{if(p!==null)if(i&&Array.isArray(u)){const v=y?u.concat(p):u.filter(b=>b!==p);d(v)}else y?d(p):o&&d(-1)}}},focusedIndex:l,setFocusedIndex:c,descendants:s}}var[jse,WL]=En({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"});function Hse(e){const{isDisabled:t,isFocusable:n,id:r,...i}=e,{getAccordionItemProps:o,setFocusedIndex:a}=WL(),s=h.exports.useRef(null),l=h.exports.useId(),c=r!=null?r:l,u=`accordion-button-${c}`,d=`accordion-panel-${c}`;Use(e);const{register:f,index:p,descendants:m}=Nse({disabled:t&&!n}),{isOpen:g,onChange:y}=o(p===-1?null:p);Gse({isOpen:g,isDisabled:t});const v=()=>{y==null||y(!0)},b=()=>{y==null||y(!1)},x=h.exports.useCallback(()=>{y==null||y(!g),a(p)},[p,a,g,y]),w=h.exports.useCallback(T=>{const P={ArrowDown:()=>{const M=m.nextEnabled(p);M==null||M.node.focus()},ArrowUp:()=>{const M=m.prevEnabled(p);M==null||M.node.focus()},Home:()=>{const M=m.firstEnabled();M==null||M.node.focus()},End:()=>{const M=m.lastEnabled();M==null||M.node.focus()}}[T.key];P&&(T.preventDefault(),P(T))},[m,p]),E=h.exports.useCallback(()=>{a(p)},[a,p]),C=h.exports.useCallback(function(_={},P=null){return{..._,type:"button",ref:go(f,s,P),id:u,disabled:!!t,"aria-expanded":!!g,"aria-controls":d,onClick:Lb(_.onClick,x),onFocus:Lb(_.onFocus,E),onKeyDown:Lb(_.onKeyDown,w)}},[u,t,g,x,E,w,d,f]),I=h.exports.useCallback(function(_={},P=null){return{..._,ref:P,role:"region",id:d,"aria-labelledby":u,hidden:!g}},[u,g,d]);return{isOpen:g,isDisabled:t,isFocusable:n,onOpen:v,onClose:b,getButtonProps:C,getPanelProps:I,htmlProps:i}}function Vse(e){const t=e.index||e.defaultIndex,n=t==null&&!Array.isArray(t)&&e.allowMultiple;Py({condition:!!n,message:`If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ${typeof t},`})}function Wse(e){Py({condition:!!(e.allowMultiple&&e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}function Use(e){Py({condition:!!(e.isFocusable&&!e.isDisabled),message:`Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well.
    `})}function Gse(e){Py({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}var UL=de(function(t,n){const{children:r,className:i}=t,{htmlProps:o,...a}=Hse(t),l={...V9().container,overflowAnchor:"none"},c=h.exports.useMemo(()=>a,[a]);return A.createElement(Bse,{value:c},A.createElement(ce.div,{ref:n,...o,className:_y("chakra-accordion__item",i),__css:l},typeof r=="function"?r({isExpanded:!!a.isOpen,isDisabled:!!a.isDisabled}):r))});UL.displayName="AccordionItem";var GL=de(function(t,n){const{className:r,motionProps:i,...o}=t,{reduceMotion:a}=WL(),{getPanelProps:s,isOpen:l}=VL(),c=s(o,n),u=_y("chakra-accordion__panel",r),d=V9();a||delete c.hidden;const f=A.createElement(ce.div,{...c,__css:d.panel,className:u});return a?f:A.createElement(NL,{in:l,...i},f)});GL.displayName="AccordionPanel";var W9=de(function({children:t,reduceMotion:n,...r},i){const o=vt("Accordion",r),a=nn(r),{htmlProps:s,descendants:l,...c}=zse(a),u=h.exports.useMemo(()=>({...c,reduceMotion:!!n}),[c,n]);return A.createElement($se,{value:l},A.createElement(jse,{value:u},A.createElement(Lse,{value:o},A.createElement(ce.div,{ref:i,...s,className:_y("chakra-accordion",r.className),__css:o.root},t))))});W9.displayName="Accordion";var Kse=(...e)=>e.filter(Boolean).join(" "),qse=lA({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),Oy=de((e,t)=>{const n=Pr("Spinner",e),{label:r="Loading...",thickness:i="2px",speed:o="0.45s",emptyColor:a="transparent",className:s,...l}=nn(e),c=Kse("chakra-spinner",s),u={display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:i,borderBottomColor:a,borderLeftColor:a,animation:`${qse} ${o} linear infinite`,...n};return A.createElement(ce.div,{ref:t,__css:u,className:c,...l},r&&A.createElement(ce.span,{srOnly:!0},r))});Oy.displayName="Spinner";var My=(...e)=>e.filter(Boolean).join(" ");function Yse(e){return A.createElement(Wr,{viewBox:"0 0 24 24",...e},A.createElement("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"}))}function Xse(e){return A.createElement(Wr,{viewBox:"0 0 24 24",...e},A.createElement("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"}))}function ZE(e){return A.createElement(Wr,{viewBox:"0 0 24 24",...e},A.createElement("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"}))}var[Zse,Qse]=En({name:"AlertContext",hookName:"useAlertContext",providerName:"<Alert />"}),[Jse,U9]=En({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:"<Alert />"}),KL={info:{icon:Xse,colorScheme:"blue"},warning:{icon:ZE,colorScheme:"orange"},success:{icon:Yse,colorScheme:"green"},error:{icon:ZE,colorScheme:"red"},loading:{icon:Oy,colorScheme:"blue"}};function ele(e){return KL[e].colorScheme}function tle(e){return KL[e].icon}var G9=de(function(t,n){var c;const{status:r="info",addRole:i=!0,...o}=nn(t),a=(c=t.colorScheme)!=null?c:ele(r),s=vt("Alert",{...t,colorScheme:a}),l={width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden",...s.container};return A.createElement(Zse,{value:{status:r}},A.createElement(Jse,{value:s},A.createElement(ce.div,{role:i?"alert":void 0,ref:n,...o,className:My("chakra-alert",t.className),__css:l})))});G9.displayName="Alert";var qL=de(function(t,n){const r=U9(),i={display:"inline",...r.description};return A.createElement(ce.div,{ref:n,...t,className:My("chakra-alert__desc",t.className),__css:i})});qL.displayName="AlertDescription";function K9(e){const{status:t}=Qse(),n=tle(t),r=U9(),i=t==="loading"?r.spinner:r.icon;return A.createElement(ce.span,{display:"inherit",...e,className:My("chakra-alert__icon",e.className),__css:i},e.children||A.createElement(n,{h:"100%",w:"100%"}))}K9.displayName="AlertIcon";var q9=de(function(t,n){const r=U9();return A.createElement(ce.div,{ref:n,...t,className:My("chakra-alert__title",t.className),__css:r.title})});q9.displayName="AlertTitle";function nle(e,t=[]){const n=Object.assign({},e);for(const r of t)r in n&&delete n[r];return n}function YL(e){const{loading:t,src:n,srcSet:r,onLoad:i,onError:o,crossOrigin:a,sizes:s,ignoreFallback:l}=e,[c,u]=h.exports.useState("pending");h.exports.useEffect(()=>{u(n?"loading":"pending")},[n]);const d=h.exports.useRef(),f=h.exports.useCallback(()=>{if(!n)return;p();const m=new Image;m.src=n,a&&(m.crossOrigin=a),r&&(m.srcset=r),s&&(m.sizes=s),t&&(m.loading=t),m.onload=g=>{p(),u("loaded"),i==null||i(g)},m.onerror=g=>{p(),u("failed"),o==null||o(g)},d.current=m},[n,a,r,s,i,o,t]),p=()=>{d.current&&(d.current.onload=null,d.current.onerror=null,d.current=null)};return Bp(()=>{if(!l)return c==="loading"&&f(),()=>{p()}},[c,f,l]),l?"loaded":c}var rle=(e,t)=>e!=="loaded"&&t==="beforeLoadOrError"||e==="failed"&&t==="onError",p0=de(function(t,n){const{htmlWidth:r,htmlHeight:i,alt:o,...a}=t;return A.createElement("img",{width:r,height:i,ref:n,alt:o,...a})});p0.displayName="NativeImage";var ile=de(function(t,n){const{fallbackSrc:r,fallback:i,src:o,srcSet:a,align:s,fit:l,loading:c,ignoreFallback:u,crossOrigin:d,fallbackStrategy:f="beforeLoadOrError",referrerPolicy:p,...m}=t,g=r!==void 0||i!==void 0,y=c!=null||u||!g,v=YL({...t,ignoreFallback:y}),b=rle(v,f),x={ref:n,objectFit:l,objectPosition:s,...y?m:nle(m,["onError","onLoad"])};return b?i||A.createElement(ce.img,{as:p0,className:"chakra-image__placeholder",src:r,...x}):A.createElement(ce.img,{as:p0,src:o,srcSet:a,crossOrigin:d,loading:c,referrerPolicy:p,className:"chakra-image",...x})});ile.displayName="Image";de((e,t)=>A.createElement(ce.img,{ref:t,as:p0,className:"chakra-image",...e}));var ole=Object.create,XL=Object.defineProperty,ale=Object.getOwnPropertyDescriptor,ZL=Object.getOwnPropertyNames,sle=Object.getPrototypeOf,lle=Object.prototype.hasOwnProperty,QL=(e,t)=>function(){return t||(0,e[ZL(e)[0]])((t={exports:{}}).exports,t),t.exports},cle=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ZL(t))!lle.call(e,i)&&i!==n&&XL(e,i,{get:()=>t[i],enumerable:!(r=ale(t,i))||r.enumerable});return e},ule=(e,t,n)=>(n=e!=null?ole(sle(e)):{},cle(t||!e||!e.__esModule?XL(n,"default",{value:e,enumerable:!0}):n,e)),dle=QL({"../../node_modules/.pnpm/react@18.2.0/node_modules/react/cjs/react.production.min.js"(e){var t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator;function p(R){return R===null||typeof R!="object"?null:(R=f&&R[f]||R["@@iterator"],typeof R=="function"?R:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,y={};function v(R,W,X){this.props=R,this.context=W,this.refs=y,this.updater=X||m}v.prototype.isReactComponent={},v.prototype.setState=function(R,W){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,W,"setState")},v.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function b(){}b.prototype=v.prototype;function x(R,W,X){this.props=R,this.context=W,this.refs=y,this.updater=X||m}var w=x.prototype=new b;w.constructor=x,g(w,v.prototype),w.isPureReactComponent=!0;var E=Array.isArray,C=Object.prototype.hasOwnProperty,I={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function _(R,W,X){var te,re={},ne=null,ie=null;if(W!=null)for(te in W.ref!==void 0&&(ie=W.ref),W.key!==void 0&&(ne=""+W.key),W)C.call(W,te)&&!T.hasOwnProperty(te)&&(re[te]=W[te]);var ae=arguments.length-2;if(ae===1)re.children=X;else if(1<ae){for(var le=Array(ae),he=0;he<ae;he++)le[he]=arguments[he+2];re.children=le}if(R&&R.defaultProps)for(te in ae=R.defaultProps,ae)re[te]===void 0&&(re[te]=ae[te]);return{$$typeof:t,type:R,key:ne,ref:ie,props:re,_owner:I.current}}function P(R,W){return{$$typeof:t,type:R.type,key:W,ref:R.ref,props:R.props,_owner:R._owner}}function M(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function D(R){var W={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(X){return W[X]})}var V=/\/+/g;function B(R,W){return typeof R=="object"&&R!==null&&R.key!=null?D(""+R.key):W.toString(36)}function L(R,W,X,te,re){var ne=typeof R;(ne==="undefined"||ne==="boolean")&&(R=null);var ie=!1;if(R===null)ie=!0;else switch(ne){case"string":case"number":ie=!0;break;case"object":switch(R.$$typeof){case t:case n:ie=!0}}if(ie)return ie=R,re=re(ie),R=te===""?"."+B(ie,0):te,E(re)?(X="",R!=null&&(X=R.replace(V,"$&/")+"/"),L(re,W,X,"",function(he){return he})):re!=null&&(M(re)&&(re=P(re,X+(!re.key||ie&&ie.key===re.key?"":(""+re.key).replace(V,"$&/")+"/")+R)),W.push(re)),1;if(ie=0,te=te===""?".":te+":",E(R))for(var ae=0;ae<R.length;ae++){ne=R[ae];var le=te+B(ne,ae);ie+=L(ne,W,X,le,re)}else if(le=p(R),typeof le=="function")for(R=le.call(R),ae=0;!(ne=R.next()).done;)ne=ne.value,le=te+B(ne,ae++),ie+=L(ne,W,X,le,re);else if(ne==="object")throw W=String(R),Error("Objects are not valid as a React child (found: "+(W==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":W)+"). If you meant to render a collection of children, use an array instead.");return ie}function G(R,W,X){if(R==null)return R;var te=[],re=0;return L(R,te,"","",function(ne){return W.call(X,ne,re++)}),te}function z(R){if(R._status===-1){var W=R._result;W=W(),W.then(function(X){(R._status===0||R._status===-1)&&(R._status=1,R._result=X)},function(X){(R._status===0||R._status===-1)&&(R._status=2,R._result=X)}),R._status===-1&&(R._status=0,R._result=W)}if(R._status===1)return R._result.default;throw R._result}var j={current:null},F={transition:null},H={ReactCurrentDispatcher:j,ReactCurrentBatchConfig:F,ReactCurrentOwner:I};e.Children={map:G,forEach:function(R,W,X){G(R,function(){W.apply(this,arguments)},X)},count:function(R){var W=0;return G(R,function(){W++}),W},toArray:function(R){return G(R,function(W){return W})||[]},only:function(R){if(!M(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},e.Component=v,e.Fragment=r,e.Profiler=o,e.PureComponent=x,e.StrictMode=i,e.Suspense=c,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=H,e.cloneElement=function(R,W,X){if(R==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+R+".");var te=g({},R.props),re=R.key,ne=R.ref,ie=R._owner;if(W!=null){if(W.ref!==void 0&&(ne=W.ref,ie=I.current),W.key!==void 0&&(re=""+W.key),R.type&&R.type.defaultProps)var ae=R.type.defaultProps;for(le in W)C.call(W,le)&&!T.hasOwnProperty(le)&&(te[le]=W[le]===void 0&&ae!==void 0?ae[le]:W[le])}var le=arguments.length-2;if(le===1)te.children=X;else if(1<le){ae=Array(le);for(var he=0;he<le;he++)ae[he]=arguments[he+2];te.children=ae}return{$$typeof:t,type:R.type,key:re,ref:ne,props:te,_owner:ie}},e.createContext=function(R){return R={$$typeof:s,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},R.Provider={$$typeof:a,_context:R},R.Consumer=R},e.createElement=_,e.createFactory=function(R){var W=_.bind(null,R);return W.type=R,W},e.createRef=function(){return{current:null}},e.forwardRef=function(R){return{$$typeof:l,render:R}},e.isValidElement=M,e.lazy=function(R){return{$$typeof:d,_payload:{_status:-1,_result:R},_init:z}},e.memo=function(R,W){return{$$typeof:u,type:R,compare:W===void 0?null:W}},e.startTransition=function(R){var W=F.transition;F.transition={};try{R()}finally{F.transition=W}},e.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},e.useCallback=function(R,W){return j.current.useCallback(R,W)},e.useContext=function(R){return j.current.useContext(R)},e.useDebugValue=function(){},e.useDeferredValue=function(R){return j.current.useDeferredValue(R)},e.useEffect=function(R,W){return j.current.useEffect(R,W)},e.useId=function(){return j.current.useId()},e.useImperativeHandle=function(R,W,X){return j.current.useImperativeHandle(R,W,X)},e.useInsertionEffect=function(R,W){return j.current.useInsertionEffect(R,W)},e.useLayoutEffect=function(R,W){return j.current.useLayoutEffect(R,W)},e.useMemo=function(R,W){return j.current.useMemo(R,W)},e.useReducer=function(R,W,X){return j.current.useReducer(R,W,X)},e.useRef=function(R){return j.current.useRef(R)},e.useState=function(R){return j.current.useState(R)},e.useSyncExternalStore=function(R,W,X){return j.current.useSyncExternalStore(R,W,X)},e.useTransition=function(){return j.current.useTransition()},e.version="18.2.0"}}),fle=QL({"../../node_modules/.pnpm/react@18.2.0/node_modules/react/index.js"(e,t){t.exports=dle()}}),QE=ule(fle());function Ry(e){return QE.Children.toArray(e).filter(t=>(0,QE.isValidElement)(t))}/**
 * @license React
 * react.development.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *//**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Y9=(...e)=>e.filter(Boolean).join(" "),[ple,JL]=En({name:"AvatarStylesContext",hookName:"useAvatarStyles",providerName:"<Avatar/>"});function hle(e){const[t,n]=e.split(" ");return t&&n?`${t.charAt(0)}${n.charAt(0)}`:t.charAt(0)}function eB(e){const{name:t,getInitials:n,...r}=e,i=JL();return A.createElement(ce.div,{role:"img","aria-label":t,...r,__css:i.label},t?n==null?void 0:n(t):null)}eB.displayName="AvatarName";var tB=e=>A.createElement(ce.svg,{viewBox:"0 0 128 128",color:"#fff",width:"100%",height:"100%",className:"chakra-avatar__svg",...e},A.createElement("path",{fill:"currentColor",d:"M103,102.1388 C93.094,111.92 79.3504,118 64.1638,118 C48.8056,118 34.9294,111.768 25,101.7892 L25,95.2 C25,86.8096 31.981,80 40.6,80 L87.4,80 C96.019,80 103,86.8096 103,95.2 L103,102.1388 Z"}),A.createElement("path",{fill:"currentColor",d:"M63.9961647,24 C51.2938136,24 41,34.2938136 41,46.9961647 C41,59.7061864 51.2938136,70 63.9961647,70 C76.6985159,70 87,59.7061864 87,46.9961647 C87,34.2938136 76.6985159,24 63.9961647,24"}));function nB(e){const{src:t,srcSet:n,onError:r,getInitials:i,name:o,borderRadius:a,loading:s,iconLabel:l,icon:c=A.createElement(tB,null),ignoreFallback:u,referrerPolicy:d}=e,p=YL({src:t,onError:r,ignoreFallback:u})==="loaded";return!t||!p?o?A.createElement(eB,{className:"chakra-avatar__initials",getInitials:i,name:o}):h.exports.cloneElement(c,{role:"img","aria-label":l}):A.createElement(ce.img,{src:t,srcSet:n,alt:o,referrerPolicy:d,className:"chakra-avatar__img",loading:s,__css:{width:"100%",height:"100%",objectFit:"cover",borderRadius:a}})}nB.displayName="AvatarImage";var rB={display:"inline-flex",alignItems:"center",justifyContent:"center",textAlign:"center",textTransform:"uppercase",fontWeight:"medium",position:"relative",flexShrink:0},iB=de((e,t)=>{const n=vt("Avatar",e),{src:r,srcSet:i,name:o,showBorder:a,borderRadius:s="full",onError:l,getInitials:c=hle,icon:u=A.createElement(tB,null),iconLabel:d=" avatar",loading:f,children:p,borderColor:m,ignoreFallback:g,...y}=nn(e),v={borderRadius:s,borderWidth:a?"2px":void 0,...rB,...n.container};return m&&(v.borderColor=m),A.createElement(ce.span,{ref:t,...y,className:Y9("chakra-avatar",e.className),__css:v},A.createElement(ple,{value:n},A.createElement(nB,{src:r,srcSet:i,loading:f,onError:l,getInitials:c,name:o,borderRadius:s,icon:u,iconLabel:d,ignoreFallback:g}),p))});iB.displayName="Avatar";function mle(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var gle=de(function(t,n){const r=vt("Avatar",t),{children:i,borderColor:o,max:a,spacing:s="-0.75rem",borderRadius:l="full",...c}=nn(t),u=Ry(i),d=a?u.slice(0,a):u,f=a!=null&&u.length-a,m=d.reverse().map((v,b)=>{var E;const w={marginEnd:b===0?0:s,size:t.size,borderColor:(E=v.props.borderColor)!=null?E:o,showBorder:!0};return h.exports.cloneElement(v,mle(w))}),g={display:"flex",alignItems:"center",justifyContent:"flex-end",flexDirection:"row-reverse"},y={borderRadius:l,marginStart:s,...rB,...r.excessLabel};return A.createElement(ce.div,{ref:n,role:"group",__css:g,...c,className:Y9("chakra-avatar__group",t.className)},f>0&&A.createElement(ce.span,{className:"chakra-avatar__excess",__css:y},`+${f}`),m)});gle.displayName="AvatarGroup";var vle={"top-start":{top:"0",insetStart:"0",transform:"translate(-25%, -25%)"},"top-end":{top:"0",insetEnd:"0",transform:"translate(25%, -25%)"},"bottom-start":{bottom:"0",insetStart:"0",transform:"translate(-25%, 25%)"},"bottom-end":{bottom:"0",insetEnd:"0",transform:"translate(25%, 25%)"}},yle=de(function(t,n){const{placement:r="bottom-end",className:i,...o}=t,a=JL(),s=vle[r],l={position:"absolute",display:"flex",alignItems:"center",justifyContent:"center",...s,...a.badge};return A.createElement(ce.div,{ref:n,...o,className:Y9("chakra-avatar__badge",i),__css:l})});yle.displayName="AvatarBadge";var Dy=(...e)=>e.filter(Boolean).join(" "),JE=e=>e?"":void 0,[ble,xle]=En({strict:!1,name:"ButtonGroupContext"});function P3(e){const{children:t,className:n,...r}=e,i=h.exports.isValidElement(t)?h.exports.cloneElement(t,{"aria-hidden":!0,focusable:!1}):t,o=Dy("chakra-button__icon",n);return A.createElement(ce.span,{display:"inline-flex",alignSelf:"center",flexShrink:0,...r,className:o},i)}P3.displayName="ButtonIcon";function O3(e){const{label:t,placement:n,spacing:r="0.5rem",children:i=A.createElement(Oy,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:a,...s}=e,l=Dy("chakra-button__spinner",o),c=n==="start"?"marginEnd":"marginStart",u=h.exports.useMemo(()=>({display:"flex",alignItems:"center",position:t?"relative":"absolute",[c]:t?r:0,fontSize:"1em",lineHeight:"normal",...a}),[a,t,c,r]);return A.createElement(ce.div,{className:l,...s,__css:u},i)}O3.displayName="ButtonSpinner";function Sle(e){const[t,n]=h.exports.useState(!e);return{ref:h.exports.useCallback(o=>{!o||n(o.tagName==="BUTTON")},[]),type:t?"button":void 0}}var Dr=de((e,t)=>{const n=xle(),r=Pr("Button",{...n,...e}),{isDisabled:i=n==null?void 0:n.isDisabled,isLoading:o,isActive:a,children:s,leftIcon:l,rightIcon:c,loadingText:u,iconSpacing:d="0.5rem",type:f,spinner:p,spinnerPlacement:m="start",className:g,as:y,...v}=nn(e),b=h.exports.useMemo(()=>{const C={...r==null?void 0:r._focus,zIndex:1};return{display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",...r,...!!n&&{_focus:C}}},[r,n]),{ref:x,type:w}=Sle(y),E={rightIcon:c,leftIcon:l,iconSpacing:d,children:s};return A.createElement(ce.button,{disabled:i||o,ref:vne(t,x),as:y,type:f!=null?f:w,"data-active":JE(a),"data-loading":JE(o),__css:b,className:Dy("chakra-button",g),...v},o&&m==="start"&&A.createElement(O3,{className:"chakra-button__spinner--start",label:u,placement:"start",spacing:d},p),o?u||A.createElement(ce.span,{opacity:0},A.createElement(eI,{...E})):A.createElement(eI,{...E}),o&&m==="end"&&A.createElement(O3,{className:"chakra-button__spinner--end",label:u,placement:"end",spacing:d},p))});Dr.displayName="Button";function eI(e){const{leftIcon:t,rightIcon:n,children:r,iconSpacing:i}=e;return A.createElement(A.Fragment,null,t&&A.createElement(P3,{marginEnd:i},t),r,n&&A.createElement(P3,{marginStart:i},n))}var wle=de(function(t,n){const{size:r,colorScheme:i,variant:o,className:a,spacing:s="0.5rem",isAttached:l,isDisabled:c,...u}=t,d=Dy("chakra-button__group",a),f=h.exports.useMemo(()=>({size:r,colorScheme:i,variant:o,isDisabled:c}),[r,i,o,c]);let p={display:"inline-flex"};return l?p={...p,"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:p={...p,"& > *:not(style) ~ *:not(style)":{marginStart:s}},A.createElement(ble,{value:f},A.createElement(ce.div,{ref:n,role:"group",__css:p,className:d,"data-attached":l?"":void 0,...u}))});wle.displayName="ButtonGroup";var lc=de((e,t)=>{const{icon:n,children:r,isRound:i,"aria-label":o,...a}=e,s=n||r,l=h.exports.isValidElement(s)?h.exports.cloneElement(s,{"aria-hidden":!0,focusable:!1}):null;return A.createElement(Dr,{padding:"0",borderRadius:i?"full":void 0,ref:t,"aria-label":o,...a},l)});lc.displayName="IconButton";var Hd=(...e)=>e.filter(Boolean).join(" "),U1=e=>e?"":void 0,Bb=e=>e?!0:void 0;function tI(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var[Cle,oB]=En({name:"FormControlStylesContext",errorMessage:`useFormControlStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormControl />" `}),[kle,Vd]=En({strict:!1,name:"FormControlContext"});function Ele(e){const{id:t,isRequired:n,isInvalid:r,isDisabled:i,isReadOnly:o,...a}=e,s=h.exports.useId(),l=t||`field-${s}`,c=`${l}-label`,u=`${l}-feedback`,d=`${l}-helptext`,[f,p]=h.exports.useState(!1),[m,g]=h.exports.useState(!1),[y,v]=h.exports.useState(!1),b=h.exports.useCallback((I={},T=null)=>({id:d,...I,ref:go(T,_=>{!_||g(!0)})}),[d]),x=h.exports.useCallback((I={},T=null)=>{var _,P;return{...I,ref:T,"data-focus":U1(y),"data-disabled":U1(i),"data-invalid":U1(r),"data-readonly":U1(o),id:(_=I.id)!=null?_:c,htmlFor:(P=I.htmlFor)!=null?P:l}},[l,i,y,r,o,c]),w=h.exports.useCallback((I={},T=null)=>({id:u,...I,ref:go(T,_=>{!_||p(!0)}),"aria-live":"polite"}),[u]),E=h.exports.useCallback((I={},T=null)=>({...I,...a,ref:T,role:"group"}),[a]),C=h.exports.useCallback((I={},T=null)=>({...I,ref:T,role:"presentation","aria-hidden":!0,children:I.children||"*"}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!o,isDisabled:!!i,isFocused:!!y,onFocus:()=>v(!0),onBlur:()=>v(!1),hasFeedbackText:f,setHasFeedbackText:p,hasHelpText:m,setHasHelpText:g,id:l,labelId:c,feedbackId:u,helpTextId:d,htmlProps:a,getHelpTextProps:b,getErrorMessageProps:w,getRootProps:E,getLabelProps:x,getRequiredIndicatorProps:C}}var X9=de(function(t,n){const r=vt("Form",t),i=nn(t),{getRootProps:o,htmlProps:a,...s}=Ele(i),l=Hd("chakra-form-control",t.className);return A.createElement(kle,{value:s},A.createElement(Cle,{value:r},A.createElement(ce.div,{...o({},n),className:l,__css:r.container})))});X9.displayName="FormControl";var aB=de(function(t,n){const r=Vd(),i=oB(),o=Hd("chakra-form__helper-text",t.className);return A.createElement(ce.div,{...r==null?void 0:r.getHelpTextProps(t,n),__css:i.helperText,className:o})});aB.displayName="FormHelperText";function sB(e){const{isDisabled:t,isInvalid:n,isReadOnly:r,isRequired:i,...o}=Ile(e);return{...o,disabled:t,readOnly:r,required:i,"aria-invalid":Bb(n),"aria-required":Bb(i),"aria-readonly":Bb(r)}}function Ile(e){var m,g,y;const t=Vd(),{id:n,disabled:r,readOnly:i,required:o,isRequired:a,isInvalid:s,isReadOnly:l,isDisabled:c,onFocus:u,onBlur:d,...f}=e,p=e["aria-describedby"]?[e["aria-describedby"]]:[];return(t==null?void 0:t.hasFeedbackText)&&(t==null?void 0:t.isInvalid)&&p.push(t.feedbackId),t!=null&&t.hasHelpText&&p.push(t.helpTextId),{...f,"aria-describedby":p.join(" ")||void 0,id:n!=null?n:t==null?void 0:t.id,isDisabled:(m=r!=null?r:c)!=null?m:t==null?void 0:t.isDisabled,isReadOnly:(g=i!=null?i:l)!=null?g:t==null?void 0:t.isReadOnly,isRequired:(y=o!=null?o:a)!=null?y:t==null?void 0:t.isRequired,isInvalid:s!=null?s:t==null?void 0:t.isInvalid,onFocus:tI(t==null?void 0:t.onFocus,u),onBlur:tI(t==null?void 0:t.onBlur,d)}}var[Tle,_le]=En({name:"FormErrorStylesContext",errorMessage:`useFormErrorStyles returned is 'undefined'. Seems you forgot to wrap the components in "<FormError />" `}),Ple=de((e,t)=>{const n=vt("FormError",e),r=nn(e),i=Vd();return i!=null&&i.isInvalid?A.createElement(Tle,{value:n},A.createElement(ce.div,{...i==null?void 0:i.getErrorMessageProps(r,t),className:Hd("chakra-form__error-message",e.className),__css:{display:"flex",alignItems:"center",...n.text}})):null});Ple.displayName="FormErrorMessage";var Ole=de((e,t)=>{const n=_le(),r=Vd();if(!(r!=null&&r.isInvalid))return null;const i=Hd("chakra-form__error-icon",e.className);return A.createElement(Wr,{ref:t,"aria-hidden":!0,...e,__css:n.icon,className:i},A.createElement("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"}))});Ole.displayName="FormErrorIcon";var lg=de(function(t,n){var f;const r=Pr("FormLabel",t),i=nn(t),{className:o,children:a,requiredIndicator:s=A.createElement(lB,null),optionalIndicator:l=null,...c}=i,u=Vd(),d=(f=u==null?void 0:u.getLabelProps(c,n))!=null?f:{ref:n,...c};return A.createElement(ce.label,{...d,className:Hd("chakra-form__label",i.className),__css:{display:"block",textAlign:"start",...r}},a,u!=null&&u.isRequired?s:l)});lg.displayName="FormLabel";var lB=de(function(t,n){const r=Vd(),i=oB();if(!(r!=null&&r.isRequired))return null;const o=Hd("chakra-form__required-indicator",t.className);return A.createElement(ce.span,{...r==null?void 0:r.getRequiredIndicatorProps(t,n),__css:i.requiredIndicator,className:o})});lB.displayName="RequiredIndicator";function M3(e,t){const n=h.exports.useRef(!1),r=h.exports.useRef(!1);h.exports.useEffect(()=>{if(n.current&&r.current)return e();r.current=!0},t),h.exports.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])}function Mle(e){return A.createElement(Wr,{focusable:"false","aria-hidden":!0,...e},A.createElement("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}))}var Z9=de(function(t,n){const r=Pr("CloseButton",t),{children:i,isDisabled:o,__css:a,...s}=nn(t),l={outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0};return A.createElement(ce.button,{type:"button","aria-label":"Close",ref:n,disabled:o,__css:{...l,...r,...a},...s},i||A.createElement(Mle,{width:"1em",height:"1em"}))});Z9.displayName="CloseButton";var cB=`
  :root {
    --chakra-vh: 100vh;
  }

  @supports (height: -webkit-fill-available) {
    :root {
      --chakra-vh: -webkit-fill-available;
    }
  }

  @supports (height: -moz-fill-available) {
    :root {
      --chakra-vh: -moz-fill-available;
    }
  }

  @supports (height: 100lvh) {
    :root {
      --chakra-vh: 100lvh;
    }
  }
`,Rle=()=>A.createElement(gy,{styles:cB}),Dle=()=>A.createElement(gy,{styles:`
      html {
        line-height: 1.5;
        -webkit-text-size-adjust: 100%;
        font-family: system-ui, sans-serif;
        -webkit-font-smoothing: antialiased;
        text-rendering: optimizeLegibility;
        -moz-osx-font-smoothing: grayscale;
        touch-action: manipulation;
      }

      body {
        position: relative;
        min-height: 100%;
        font-feature-settings: 'kern';
      }

      *,
      *::before,
      *::after {
        border-width: 0;
        border-style: solid;
        box-sizing: border-box;
      }

      main {
        display: block;
      }

      hr {
        border-top-width: 1px;
        box-sizing: content-box;
        height: 0;
        overflow: visible;
      }

      pre,
      code,
      kbd,
      samp {
        font-family: SFMono-Regular,  Menlo, Monaco, Consolas, monospace;
        font-size: 1em;
      }

      a {
        background-color: transparent;
        color: inherit;
        text-decoration: inherit;
      }

      abbr[title] {
        border-bottom: none;
        text-decoration: underline;
        -webkit-text-decoration: underline dotted;
        text-decoration: underline dotted;
      }

      b,
      strong {
        font-weight: bold;
      }

      small {
        font-size: 80%;
      }

      sub,
      sup {
        font-size: 75%;
        line-height: 0;
        position: relative;
        vertical-align: baseline;
      }

      sub {
        bottom: -0.25em;
      }

      sup {
        top: -0.5em;
      }

      img {
        border-style: none;
      }

      button,
      input,
      optgroup,
      select,
      textarea {
        font-family: inherit;
        font-size: 100%;
        line-height: 1.15;
        margin: 0;
      }

      button,
      input {
        overflow: visible;
      }

      button,
      select {
        text-transform: none;
      }

      button::-moz-focus-inner,
      [type="button"]::-moz-focus-inner,
      [type="reset"]::-moz-focus-inner,
      [type="submit"]::-moz-focus-inner {
        border-style: none;
        padding: 0;
      }

      fieldset {
        padding: 0.35em 0.75em 0.625em;
      }

      legend {
        box-sizing: border-box;
        color: inherit;
        display: table;
        max-width: 100%;
        padding: 0;
        white-space: normal;
      }

      progress {
        vertical-align: baseline;
      }

      textarea {
        overflow: auto;
      }

      [type="checkbox"],
      [type="radio"] {
        box-sizing: border-box;
        padding: 0;
      }

      [type="number"]::-webkit-inner-spin-button,
      [type="number"]::-webkit-outer-spin-button {
        -webkit-appearance: none !important;
      }

      input[type="number"] {
        -moz-appearance: textfield;
      }

      [type="search"] {
        -webkit-appearance: textfield;
        outline-offset: -2px;
      }

      [type="search"]::-webkit-search-decoration {
        -webkit-appearance: none !important;
      }

      ::-webkit-file-upload-button {
        -webkit-appearance: button;
        font: inherit;
      }

      details {
        display: block;
      }

      summary {
        display: list-item;
      }

      template {
        display: none;
      }

      [hidden] {
        display: none !important;
      }

      body,
      blockquote,
      dl,
      dd,
      h1,
      h2,
      h3,
      h4,
      h5,
      h6,
      hr,
      figure,
      p,
      pre {
        margin: 0;
      }

      button {
        background: transparent;
        padding: 0;
      }

      fieldset {
        margin: 0;
        padding: 0;
      }

      ol,
      ul {
        margin: 0;
        padding: 0;
      }

      textarea {
        resize: vertical;
      }

      button,
      [role="button"] {
        cursor: pointer;
      }

      button::-moz-focus-inner {
        border: 0 !important;
      }

      table {
        border-collapse: collapse;
      }

      h1,
      h2,
      h3,
      h4,
      h5,
      h6 {
        font-size: inherit;
        font-weight: inherit;
      }

      button,
      input,
      optgroup,
      select,
      textarea {
        padding: 0;
        line-height: inherit;
        color: inherit;
      }

      img,
      svg,
      video,
      canvas,
      audio,
      iframe,
      embed,
      object {
        display: block;
      }

      img,
      video {
        max-width: 100%;
        height: auto;
      }

      [data-js-focus-visible] :focus:not([data-focus-visible-added]):not([data-focus-visible-disabled]) {
        outline: none;
        box-shadow: none;
      }

      select::-ms-expand {
        display: none;
      }

      ${cB}
    `}),Ale=Vte?h.exports.useLayoutEffect:h.exports.useEffect;function nI(e,t=[]){const n=h.exports.useRef(e);return Ale(()=>{n.current=e}),h.exports.useCallback((...r)=>{var i;return(i=n.current)==null?void 0:i.call(n,...r)},t)}function Lle(e,t){const n=e!==void 0;return[n,n&&typeof e!="undefined"?e:t]}function Ble(e,t){const n=h.exports.useId();return h.exports.useMemo(()=>e||[t,n].filter(Boolean).join("-"),[e,t,n])}function $le(e={}){const{onClose:t,onOpen:n,isOpen:r,id:i}=e,o=nI(n),a=nI(t),[s,l]=h.exports.useState(e.defaultIsOpen||!1),[c,u]=Lle(r,s),d=Ble(i,"disclosure"),f=h.exports.useCallback(()=>{c||l(!1),a==null||a()},[c,a]),p=h.exports.useCallback(()=>{c||l(!0),o==null||o()},[c,o]),m=h.exports.useCallback(()=>{(u?f:p)()},[u,p,f]);return{isOpen:!!u,onOpen:p,onClose:f,onToggle:m,isControlled:c,getButtonProps:(g={})=>({...g,"aria-expanded":u,"aria-controls":d,onClick:Wte(g.onClick,m)}),getDisclosureProps:(g={})=>({...g,hidden:!u,id:d})}}function Q9(e){const t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}var Wd=de(function(t,n){const{htmlSize:r,...i}=t,o=vt("Input",i),a=nn(i),s=sB(a),l=fn("chakra-input",t.className);return A.createElement(ce.input,{size:r,...s,__css:o.field,ref:n,className:l})});Wd.displayName="Input";Wd.id="Input";var[Fle,uB]=En({name:"InputGroupStylesContext",errorMessage:`useInputGroupStyles returned is 'undefined'. Seems you forgot to wrap the components in "<InputGroup />" `}),J9=de(function(t,n){const r=vt("Input",t),{children:i,className:o,...a}=nn(t),s=fn("chakra-input__group",o),l={},c=Ry(i),u=r.field;c.forEach(f=>{var p,m;!r||(u&&f.type.id==="InputLeftElement"&&(l.paddingStart=(p=u.height)!=null?p:u.h),u&&f.type.id==="InputRightElement"&&(l.paddingEnd=(m=u.height)!=null?m:u.h),f.type.id==="InputRightAddon"&&(l.borderEndRadius=0),f.type.id==="InputLeftAddon"&&(l.borderStartRadius=0))});const d=c.map(f=>{var p,m;const g=Q9({size:((p=f.props)==null?void 0:p.size)||t.size,variant:((m=f.props)==null?void 0:m.variant)||t.variant});return f.type.id!=="Input"?h.exports.cloneElement(f,g):h.exports.cloneElement(f,Object.assign(g,l,f.props))});return A.createElement(ce.div,{className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative"},...a},A.createElement(Fle,{value:r},d))});J9.displayName="InputGroup";var Nle={left:{marginEnd:"-1px",borderEndRadius:0,borderEndColor:"transparent"},right:{marginStart:"-1px",borderStartRadius:0,borderStartColor:"transparent"}},zle=ce("div",{baseStyle:{flex:"0 0 auto",width:"auto",display:"flex",alignItems:"center",whiteSpace:"nowrap"}}),eC=de(function(t,n){var s;const{placement:r="left",...i}=t,o=(s=Nle[r])!=null?s:{},a=uB();return A.createElement(zle,{ref:n,...i,__css:{...a.addon,...o}})});eC.displayName="InputAddon";var dB=de(function(t,n){return A.createElement(eC,{ref:n,placement:"left",...t,className:fn("chakra-input__left-addon",t.className)})});dB.displayName="InputLeftAddon";dB.id="InputLeftAddon";var fB=de(function(t,n){return A.createElement(eC,{ref:n,placement:"right",...t,className:fn("chakra-input__right-addon",t.className)})});fB.displayName="InputRightAddon";fB.id="InputRightAddon";var jle=ce("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),Ay=de(function(t,n){var c,u;const{placement:r="left",...i}=t,o=uB(),a=o.field,l={[r==="left"?"insetStart":"insetEnd"]:"0",width:(c=a==null?void 0:a.height)!=null?c:a==null?void 0:a.h,height:(u=a==null?void 0:a.height)!=null?u:a==null?void 0:a.h,fontSize:a==null?void 0:a.fontSize,...o.element};return A.createElement(jle,{ref:n,__css:l,...i})});Ay.id="InputElement";Ay.displayName="InputElement";var pB=de(function(t,n){const{className:r,...i}=t,o=fn("chakra-input__left-element",r);return A.createElement(Ay,{ref:n,placement:"left",className:o,...i})});pB.id="InputLeftElement";pB.displayName="InputLeftElement";var Ly=de(function(t,n){const{className:r,...i}=t,o=fn("chakra-input__right-element",r);return A.createElement(Ay,{ref:n,placement:"right",className:o,...i})});Ly.id="InputRightElement";Ly.displayName="InputRightElement";function Hle(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}Object.freeze(["base","sm","md","lg","xl","2xl"]);function Us(e,t){return Array.isArray(e)?e.map(n=>n===null?null:t(n)):Hle(e)?Object.keys(e).reduce((n,r)=>(n[r]=t(e[r]),n),{}):e!=null?t(e):null}var Vle=de(function(e,t){const{ratio:n=4/3,children:r,className:i,...o}=e,a=h.exports.Children.only(r),s=fn("chakra-aspect-ratio",i);return A.createElement(ce.div,{ref:t,position:"relative",className:s,_before:{height:0,content:'""',display:"block",paddingBottom:Us(n,l=>`${1/l*100}%`)},__css:{"& > *:not(style)":{overflow:"hidden",position:"absolute",top:"0",right:"0",bottom:"0",left:"0",display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%"},"& > img, & > video":{objectFit:"cover"}},...o},a)});Vle.displayName="AspectRatio";var Wle=de(function(t,n){const r=Pr("Badge",t),{className:i,...o}=nn(t);return A.createElement(ce.span,{ref:n,className:fn("chakra-badge",t.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...r}})});Wle.displayName="Badge";var _e=ce("div");_e.displayName="Box";var hB=de(function(t,n){const{size:r,centerContent:i=!0,...o}=t,a=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return A.createElement(_e,{ref:n,boxSize:r,__css:{...a,flexShrink:0,flexGrow:0},...o})});hB.displayName="Square";var Ule=de(function(t,n){const{size:r,...i}=t;return A.createElement(hB,{size:r,ref:n,borderRadius:"9999px",...i})});Ule.displayName="Circle";var Gle=ce("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center"}});Gle.displayName="Center";var Kle={horizontal:{insetStart:"50%",transform:"translateX(-50%)"},vertical:{top:"50%",transform:"translateY(-50%)"},both:{insetStart:"50%",top:"50%",transform:"translate(-50%, -50%)"}};de(function(t,n){const{axis:r="both",...i}=t;return A.createElement(ce.div,{ref:n,__css:Kle[r],...i,position:"absolute"})});var qle=de(function(t,n){const r=Pr("Code",t),{className:i,...o}=nn(t);return A.createElement(ce.code,{ref:n,className:fn("chakra-code",t.className),...o,__css:{display:"inline-block",...r}})});qle.displayName="Code";var Yle=de(function(t,n){const{className:r,centerContent:i,...o}=nn(t),a=Pr("Container",t);return A.createElement(ce.div,{ref:n,className:fn("chakra-container",r),...o,__css:{...a,...i&&{display:"flex",flexDirection:"column",alignItems:"center"}}})});Yle.displayName="Container";var mB=de(function(t,n){const{borderLeftWidth:r,borderBottomWidth:i,borderTopWidth:o,borderRightWidth:a,borderWidth:s,borderStyle:l,borderColor:c,...u}=Pr("Divider",t),{className:d,orientation:f="horizontal",__css:p,...m}=nn(t),g={vertical:{borderLeftWidth:r||a||s||"1px",height:"100%"},horizontal:{borderBottomWidth:i||o||s||"1px",width:"100%"}};return A.createElement(ce.hr,{ref:n,"aria-orientation":f,...m,__css:{...u,border:"0",borderColor:c,borderStyle:l,...g[f],...p},className:fn("chakra-divider",d)})});mB.displayName="Divider";var ws=de(function(t,n){const{direction:r,align:i,justify:o,wrap:a,basis:s,grow:l,shrink:c,...u}=t,d={display:"flex",flexDirection:r,alignItems:i,justifyContent:o,flexWrap:a,flexBasis:s,flexGrow:l,flexShrink:c};return A.createElement(ce.div,{ref:n,__css:d,...u})});ws.displayName="Flex";var gB=de(function(t,n){const{templateAreas:r,gap:i,rowGap:o,columnGap:a,column:s,row:l,autoFlow:c,autoRows:u,templateRows:d,autoColumns:f,templateColumns:p,...m}=t,g={display:"grid",gridTemplateAreas:r,gridGap:i,gridRowGap:o,gridColumnGap:a,gridAutoColumns:f,gridColumn:s,gridRow:l,gridAutoFlow:c,gridAutoRows:u,gridTemplateRows:d,gridTemplateColumns:p};return A.createElement(ce.div,{ref:n,__css:g,...m})});gB.displayName="Grid";function rI(e){return Us(e,t=>t==="auto"?"auto":`span ${t}/span ${t}`)}var Xle=de(function(t,n){const{area:r,colSpan:i,colStart:o,colEnd:a,rowEnd:s,rowSpan:l,rowStart:c,...u}=t,d=Q9({gridArea:r,gridColumn:rI(i),gridRow:rI(l),gridColumnStart:o,gridColumnEnd:a,gridRowStart:c,gridRowEnd:s});return A.createElement(ce.div,{ref:n,__css:d,...u})});Xle.displayName="GridItem";var Zle=de(function(t,n){const r=Pr("Heading",t),{className:i,...o}=nn(t);return A.createElement(ce.h2,{ref:n,className:fn("chakra-heading",t.className),...o,__css:r})});Zle.displayName="Heading";de(function(t,n){const r=Pr("Mark",t),i=nn(t);return A.createElement(_e,{ref:n,...i,as:"mark",__css:{bg:"transparent",whiteSpace:"nowrap",...r}})});var Qle=de(function(t,n){const r=Pr("Kbd",t),{className:i,...o}=nn(t);return A.createElement(ce.kbd,{ref:n,className:fn("chakra-kbd",i),...o,__css:{fontFamily:"mono",...r}})});Qle.displayName="Kbd";var Jle=de(function(t,n){const r=Pr("Link",t),{className:i,isExternal:o,...a}=nn(t);return A.createElement(ce.a,{target:o?"_blank":void 0,rel:o?"noopener":void 0,ref:n,className:fn("chakra-link",i),...a,__css:r})});Jle.displayName="Link";de(function(t,n){const{isExternal:r,target:i,rel:o,className:a,...s}=t;return A.createElement(ce.a,{...s,ref:n,className:fn("chakra-linkbox__overlay",a),rel:r?"noopener noreferrer":o,target:r?"_blank":i,__css:{position:"static","&::before":{content:"''",cursor:"inherit",display:"block",position:"absolute",top:0,left:0,zIndex:0,width:"100%",height:"100%"}}})});de(function(t,n){const{className:r,...i}=t;return A.createElement(ce.div,{ref:n,position:"relative",...i,className:fn("chakra-linkbox",r),__css:{"a[href]:not(.chakra-linkbox__overlay), abbr[title]":{position:"relative",zIndex:1}}})});var[ece,vB]=En({name:"ListStylesContext",errorMessage:`useListStyles returned is 'undefined'. Seems you forgot to wrap the components in "<List />" `}),tC=de(function(t,n){const r=vt("List",t),{children:i,styleType:o="none",stylePosition:a,spacing:s,...l}=nn(t),c=Ry(i),d=s?{["& > *:not(style) ~ *:not(style)"]:{mt:s}}:{};return A.createElement(ece,{value:r},A.createElement(ce.ul,{ref:n,listStyleType:o,listStylePosition:a,role:"list",__css:{...r.container,...d},...l},c))});tC.displayName="List";var tce=de((e,t)=>{const{as:n,...r}=e;return A.createElement(tC,{ref:t,as:"ol",styleType:"decimal",marginStart:"1em",...r})});tce.displayName="OrderedList";var nce=de(function(t,n){const{as:r,...i}=t;return A.createElement(tC,{ref:n,as:"ul",styleType:"initial",marginStart:"1em",...i})});nce.displayName="UnorderedList";var rce=de(function(t,n){const r=vB();return A.createElement(ce.li,{ref:n,...t,__css:r.item})});rce.displayName="ListItem";var ice=de(function(t,n){const r=vB();return A.createElement(Wr,{ref:n,role:"presentation",...t,__css:r.icon})});ice.displayName="ListIcon";var oce=de(function(t,n){const{columns:r,spacingX:i,spacingY:o,spacing:a,minChildWidth:s,...l}=t,c=p9(),u=s?sce(s,c):lce(r);return A.createElement(gB,{ref:n,gap:a,columnGap:i,rowGap:o,templateColumns:u,...l})});oce.displayName="SimpleGrid";function ace(e){return typeof e=="number"?`${e}px`:e}function sce(e,t){return Us(e,n=>{const r=sne("sizes",n,ace(n))(t);return n===null?null:`repeat(auto-fit, minmax(${r}, 1fr))`})}function lce(e){return Us(e,t=>t===null?null:`repeat(${t}, minmax(0, 1fr))`)}var cce=ce("div",{baseStyle:{flex:1,justifySelf:"stretch",alignSelf:"stretch"}});cce.displayName="Spacer";var R3="& > *:not(style) ~ *:not(style)";function uce(e){const{spacing:t,direction:n}=e,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return{flexDirection:n,[R3]:Us(n,i=>r[i])}}function dce(e){const{spacing:t,direction:n}=e,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":Us(n,i=>r[i])}}var yB=e=>A.createElement(ce.div,{className:"chakra-stack__item",...e,__css:{display:"inline-block",flex:"0 0 auto",minWidth:0,...e.__css}});yB.displayName="StackItem";var nC=de((e,t)=>{const{isInline:n,direction:r,align:i,justify:o,spacing:a="0.5rem",wrap:s,children:l,divider:c,className:u,shouldWrapChildren:d,...f}=e,p=n?"row":r!=null?r:"column",m=h.exports.useMemo(()=>uce({direction:p,spacing:a}),[p,a]),g=h.exports.useMemo(()=>dce({spacing:a,direction:p}),[a,p]),y=!!c,v=!d&&!y,b=h.exports.useMemo(()=>{const w=Ry(l);return v?w:w.map((E,C)=>{const I=typeof E.key!="undefined"?E.key:C,T=C+1===w.length,P=d?A.createElement(yB,{key:I},E):E;if(!y)return P;const M=h.exports.cloneElement(c,{__css:g}),D=T?null:M;return A.createElement(h.exports.Fragment,{key:I},P,D)})},[c,g,y,v,d,l]),x=fn("chakra-stack",u);return A.createElement(ce.div,{ref:t,display:"flex",alignItems:i,justifyContent:o,flexDirection:m.flexDirection,flexWrap:s,className:x,__css:y?{}:{[R3]:m[R3]},...f},b)});nC.displayName="Stack";var fce=de((e,t)=>A.createElement(nC,{align:"center",...e,direction:"row",ref:t}));fce.displayName="HStack";var pce=de((e,t)=>A.createElement(nC,{align:"center",...e,direction:"column",ref:t}));pce.displayName="VStack";var Sr=de(function(t,n){const r=Pr("Text",t),{className:i,align:o,decoration:a,casing:s,...l}=nn(t),c=Q9({textAlign:t.align,textDecoration:t.decoration,textTransform:t.casing});return A.createElement(ce.p,{ref:n,className:fn("chakra-text",t.className),...c,...l,__css:r})});Sr.displayName="Text";function iI(e){return typeof e=="number"?`${e}px`:e}var hce=de(function(t,n){const{spacing:r="0.5rem",spacingX:i,spacingY:o,children:a,justify:s,direction:l,align:c,className:u,shouldWrapChildren:d,...f}=t,p=h.exports.useMemo(()=>{const{spacingX:g=r,spacingY:y=r}={spacingX:i,spacingY:o};return{"--chakra-wrap-x-spacing":v=>Us(g,b=>iI(Qx("space",b)(v))),"--chakra-wrap-y-spacing":v=>Us(y,b=>iI(Qx("space",b)(v))),"--wrap-x-spacing":"calc(var(--chakra-wrap-x-spacing) / 2)","--wrap-y-spacing":"calc(var(--chakra-wrap-y-spacing) / 2)",display:"flex",flexWrap:"wrap",justifyContent:s,alignItems:c,flexDirection:l,listStyleType:"none",padding:"0",margin:"calc(var(--wrap-y-spacing) * -1) calc(var(--wrap-x-spacing) * -1)","& > *:not(style)":{margin:"var(--wrap-y-spacing) var(--wrap-x-spacing)"}}},[r,i,o,s,c,l]),m=h.exports.useMemo(()=>d?h.exports.Children.map(a,(g,y)=>A.createElement(bB,{key:y},g)):a,[a,d]);return A.createElement(ce.div,{ref:n,className:fn("chakra-wrap",u),overflow:"hidden",...f},A.createElement(ce.ul,{className:"chakra-wrap__list",__css:p},m))});hce.displayName="Wrap";var bB=de(function(t,n){const{className:r,...i}=t;return A.createElement(ce.li,{ref:n,__css:{display:"flex",alignItems:"flex-start"},className:fn("chakra-wrap__listitem",r),...i})});bB.displayName="WrapItem";var mce={body:{classList:{add(){},remove(){}}},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}}},xB=mce,Vc=()=>{},gce={document:xB,navigator:{userAgent:""},CustomEvent:function(){return this},addEventListener:Vc,removeEventListener:Vc,getComputedStyle(){return{getPropertyValue(){return""}}},matchMedia(){return{matches:!1,addListener:Vc,removeListener:Vc}},requestAnimationFrame(e){return typeof setTimeout=="undefined"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout!="undefined"&&clearTimeout(e)},setTimeout:()=>0,clearTimeout:Vc,setInterval:()=>0,clearInterval:Vc},vce=gce,yce={window:vce,document:xB},SB=typeof window!="undefined"?{window,document}:yce,wB=h.exports.createContext(SB);wB.displayName="EnvironmentContext";function CB(e){const{children:t,environment:n}=e,[r,i]=h.exports.useState(null),[o,a]=h.exports.useState(!1);h.exports.useEffect(()=>a(!0),[]);const s=h.exports.useMemo(()=>{if(n)return n;const l=r==null?void 0:r.ownerDocument,c=r==null?void 0:r.ownerDocument.defaultView;return l?{document:l,window:c}:SB},[r,n]);return A.createElement(wB.Provider,{value:s},t,!n&&o&&A.createElement("span",{id:"__chakra_env",hidden:!0,ref:l=>{h.exports.startTransition(()=>{l&&i(l)})}}))}CB.displayName="EnvironmentProvider";var bce=e=>e?"":void 0;function xce(){const e=h.exports.useRef(new Map),t=e.current,n=h.exports.useCallback((i,o,a,s)=>{e.current.set(a,{type:o,el:i,options:s}),i.addEventListener(o,a,s)},[]),r=h.exports.useCallback((i,o,a,s)=>{i.removeEventListener(o,a,s),e.current.delete(a)},[]);return h.exports.useEffect(()=>()=>{t.forEach((i,o)=>{r(i.el,i.type,o,i.options)})},[r,t]),{add:n,remove:r}}function $b(e){const t=e.target,{tagName:n,isContentEditable:r}=t;return n!=="INPUT"&&n!=="TEXTAREA"&&r!==!0}function Sce(e={}){const{ref:t,isDisabled:n,isFocusable:r,clickOnEnter:i=!0,clickOnSpace:o=!0,onMouseDown:a,onMouseUp:s,onClick:l,onKeyDown:c,onKeyUp:u,tabIndex:d,onMouseOver:f,onMouseLeave:p,...m}=e,[g,y]=h.exports.useState(!0),[v,b]=h.exports.useState(!1),x=xce(),w=z=>{!z||z.tagName!=="BUTTON"&&y(!1)},E=g?d:d||0,C=n&&!r,I=h.exports.useCallback(z=>{if(n){z.stopPropagation(),z.preventDefault();return}z.currentTarget.focus(),l==null||l(z)},[n,l]),T=h.exports.useCallback(z=>{v&&$b(z)&&(z.preventDefault(),z.stopPropagation(),b(!1),x.remove(document,"keyup",T,!1))},[v,x]),_=h.exports.useCallback(z=>{if(c==null||c(z),n||z.defaultPrevented||z.metaKey||!$b(z.nativeEvent)||g)return;const j=i&&z.key==="Enter";o&&z.key===" "&&(z.preventDefault(),b(!0)),j&&(z.preventDefault(),z.currentTarget.click()),x.add(document,"keyup",T,!1)},[n,g,c,i,o,x,T]),P=h.exports.useCallback(z=>{if(u==null||u(z),n||z.defaultPrevented||z.metaKey||!$b(z.nativeEvent)||g)return;o&&z.key===" "&&(z.preventDefault(),b(!1),z.currentTarget.click())},[o,g,n,u]),M=h.exports.useCallback(z=>{z.button===0&&(b(!1),x.remove(document,"mouseup",M,!1))},[x]),D=h.exports.useCallback(z=>{if(z.button!==0)return;if(n){z.stopPropagation(),z.preventDefault();return}g||b(!0),z.currentTarget.focus({preventScroll:!0}),x.add(document,"mouseup",M,!1),a==null||a(z)},[n,g,a,x,M]),V=h.exports.useCallback(z=>{z.button===0&&(g||b(!1),s==null||s(z))},[s,g]),B=h.exports.useCallback(z=>{if(n){z.preventDefault();return}f==null||f(z)},[n,f]),L=h.exports.useCallback(z=>{v&&(z.preventDefault(),b(!1)),p==null||p(z)},[v,p]),G=go(t,w);return g?{...m,ref:G,type:"button","aria-disabled":C?void 0:n,disabled:C,onClick:I,onMouseDown:a,onMouseUp:s,onKeyUp:u,onKeyDown:c,onMouseOver:f,onMouseLeave:p}:{...m,ref:G,role:"button","data-active":bce(v),"aria-disabled":n?"true":void 0,tabIndex:C?void 0:E,onClick:I,onMouseDown:D,onMouseUp:V,onKeyUp:P,onKeyDown:_,onMouseOver:B,onMouseLeave:L}}function wce(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function Cce(e){var n;if(!wce(e))return!1;const t=(n=e.ownerDocument.defaultView)!=null?n:window;return e instanceof t.HTMLElement}var kce=e=>e.hasAttribute("tabindex");function Ece(e){return Boolean(e.getAttribute("disabled"))===!0||Boolean(e.getAttribute("aria-disabled"))===!0}function kB(e){return e.parentElement&&kB(e.parentElement)?!0:e.hidden}function Ice(e){const t=e.getAttribute("contenteditable");return t!=="false"&&t!=null}function Tce(e){if(!Cce(e)||kB(e)||Ece(e))return!1;const{localName:t}=e;if(["input","select","textarea","button"].indexOf(t)>=0)return!0;const r={a:()=>e.hasAttribute("href"),audio:()=>e.hasAttribute("controls"),video:()=>e.hasAttribute("controls")};return t in r?r[t]():Ice(e)?!0:kce(e)}var _ce=["input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)","embed","iframe","object","a[href]","area[href]","button:not(:disabled)","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"],Pce=_ce.join(),Oce=e=>e.offsetWidth>0&&e.offsetHeight>0;function Mce(e){const t=Array.from(e.querySelectorAll(Pce));return t.unshift(e),t.filter(n=>Tce(n)&&Oce(n))}function Rce(e){const{wasSelected:t,enabled:n,isSelected:r,mode:i="unmount"}=e;return!!(!n||r||i==="keepMounted"&&t)}var cc=(...e)=>e.filter(Boolean).join(" "),Dce=e=>e?"":void 0;function D3(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}function Ace(...e){return function(n){e.forEach(r=>{r==null||r(n)})}}function Lce(e){const{key:t}=e;return t.length===1||t.length>1&&/[^a-zA-Z0-9]/.test(t)}function Bce(e={}){const{timeout:t=300,preventDefault:n=()=>!0}=e,[r,i]=h.exports.useState([]),o=h.exports.useRef(),a=()=>{o.current&&(clearTimeout(o.current),o.current=null)},s=()=>{a(),o.current=setTimeout(()=>{i([]),o.current=null},t)};h.exports.useEffect(()=>a,[]);function l(c){return u=>{if(u.key==="Backspace"){const d=[...r];d.pop(),i(d);return}if(Lce(u)){const d=r.concat(u.key);n(u)&&(u.preventDefault(),u.stopPropagation()),i(d),c(d.join("")),s()}}}return l}function $ce(e,t,n,r){if(t==null)return r;if(!r)return e.find(a=>n(a).toLowerCase().startsWith(t.toLowerCase()));const i=e.filter(o=>n(o).toLowerCase().startsWith(t.toLowerCase()));if(i.length>0){let o;return i.includes(r)?(o=i.indexOf(r)+1,o===i.length&&(o=0),i[o]):(o=e.indexOf(i[0]),e[o])}return r}var[RFe,Fce,DFe,Nce]=vA(),[AFe,Uh]=En({strict:!1,name:"MenuContext"});function zce(e){var t;return(t=e==null?void 0:e.ownerDocument)!=null?t:document}function oI(e){return zce(e).activeElement===e}function jce(e={},t=null){const n=Uh(),{onToggle:r,popper:i,openAndFocusFirstItem:o,openAndFocusLastItem:a}=n,s=h.exports.useCallback(l=>{const c=l.key,d={Enter:o,ArrowDown:o,ArrowUp:a}[c];d&&(l.preventDefault(),l.stopPropagation(),d(l))},[o,a]);return{...e,ref:go(n.buttonRef,t,i.referenceRef),id:n.buttonId,"data-active":Dce(n.isOpen),"aria-expanded":n.isOpen,"aria-haspopup":"menu","aria-controls":n.menuId,onClick:D3(e.onClick,r),onKeyDown:D3(e.onKeyDown,s)}}function A3(e){var t;return Uce(e)&&!!((t=e==null?void 0:e.getAttribute("role"))!=null&&t.startsWith("menuitem"))}function Hce(e={},t=null){const n=Uh();if(!n)throw new Error("useMenuContext: context is undefined. Seems you forgot to wrap component within <Menu>");const{focusedIndex:r,setFocusedIndex:i,menuRef:o,isOpen:a,onClose:s,menuId:l,isLazy:c,lazyBehavior:u,unstable__animationState:d}=n,f=Fce(),p=Bce({preventDefault:v=>v.key!==" "&&A3(v.target)}),m=h.exports.useCallback(v=>{const b=v.key,w={Tab:C=>C.preventDefault(),Escape:s,ArrowDown:()=>{const C=f.nextEnabled(r);C&&i(C.index)},ArrowUp:()=>{const C=f.prevEnabled(r);C&&i(C.index)}}[b];if(w){v.preventDefault(),w(v);return}const E=p(C=>{const I=$ce(f.values(),C,T=>{var P;var _;return(P=(_=T==null?void 0:T.node)==null?void 0:_.textContent)!=null?P:""},f.item(r));if(I){const T=f.indexOf(I.node);i(T)}});A3(v.target)&&E(v)},[f,r,p,s,i]),g=h.exports.useRef(!1);a&&(g.current=!0);const y=Rce({wasSelected:g.current,enabled:c,mode:u,isSelected:d.present});return{...e,ref:go(o,t),children:y?e.children:null,tabIndex:-1,role:"menu",id:l,style:{...e.style,transformOrigin:"var(--popper-transform-origin)"},"aria-orientation":"vertical",onKeyDown:D3(e.onKeyDown,m)}}function Vce(e={}){const{popper:t,isOpen:n}=Uh();return t.getPopperProps({...e,style:{visibility:n?"visible":"hidden",...e.style}})}function EB(e={},t=null){const{onMouseEnter:n,onMouseMove:r,onMouseLeave:i,onClick:o,isDisabled:a,isFocusable:s,closeOnSelect:l,type:c,...u}=e,d=Uh(),{setFocusedIndex:f,focusedIndex:p,closeOnSelect:m,onClose:g,menuRef:y,isOpen:v,menuId:b}=d,x=h.exports.useRef(null),w=`${b}-menuitem-${h.exports.useId()}`,{index:E,register:C}=Nce({disabled:a&&!s}),I=h.exports.useCallback(B=>{n==null||n(B),!a&&f(E)},[f,E,a,n]),T=h.exports.useCallback(B=>{r==null||r(B),x.current&&!oI(x.current)&&I(B)},[I,r]),_=h.exports.useCallback(B=>{i==null||i(B),!a&&f(-1)},[f,a,i]),P=h.exports.useCallback(B=>{o==null||o(B),!!A3(B.currentTarget)&&(l!=null?l:m)&&g()},[g,o,m,l]),M=E===p,D=a&&!s;M3(()=>{!v||(M&&!D&&x.current?requestAnimationFrame(()=>{var B;(B=x.current)==null||B.focus()}):y.current&&!oI(y.current)&&y.current.focus())},[M,D,y,v]);const V=Sce({onClick:P,onMouseEnter:I,onMouseMove:T,onMouseLeave:_,ref:go(C,x,t),isDisabled:a,isFocusable:s});return{...u,...V,type:c!=null?c:V.type,id:w,role:"menuitem",tabIndex:M?0:-1}}function Wce(e={},t=null){const{type:n="radio",isChecked:r,...i}=e;return{...EB(i,t),role:`menuitem${n}`,"aria-checked":r}}function Uce(e){var n;if(!Gce(e))return!1;const t=(n=e.ownerDocument.defaultView)!=null?n:window;return e instanceof t.HTMLElement}function Gce(e){return e!=null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}var[LFe,Gh]=En({name:"MenuStylesContext",errorMessage:`useMenuStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Menu />" `}),Kce=de((e,t)=>{const n=Gh();return A.createElement(ce.button,{ref:t,...e,__css:{display:"inline-flex",appearance:"none",alignItems:"center",outline:0,...n.button}})}),qce=de((e,t)=>{const{children:n,as:r,...i}=e,o=jce(i,t),a=r||Kce;return A.createElement(a,{...o,className:cc("chakra-menu__menu-button",e.className)},A.createElement(ce.span,{__css:{pointerEvents:"none",flex:"1 1 auto",minW:0}},e.children))});qce.displayName="MenuButton";var IB=de((e,t)=>{const n=Gh();return A.createElement(ce.span,{ref:t,...e,__css:n.command,className:"chakra-menu__command"})});IB.displayName="MenuCommand";var Yce=de((e,t)=>{const{title:n,children:r,className:i,...o}=e,a=cc("chakra-menu__group__title",i),s=Gh();return A.createElement("div",{ref:t,className:"chakra-menu__group",role:"group"},n&&A.createElement(ce.p,{className:a,...o,__css:s.groupTitle},n),r)});Yce.displayName="MenuGroup";var By=e=>{const{className:t,children:n,...r}=e,i=h.exports.Children.only(n),o=h.exports.isValidElement(i)?h.exports.cloneElement(i,{focusable:"false","aria-hidden":!0,className:cc("chakra-menu__icon",i.props.className)}):null,a=cc("chakra-menu__icon-wrapper",t);return A.createElement(ce.span,{className:a,...r,__css:{flexShrink:0}},o)};By.displayName="MenuIcon";var TB=de((e,t)=>{const{type:n,...r}=e,i=Gh(),o=r.as||n?n!=null?n:void 0:"button",a=h.exports.useMemo(()=>({textDecoration:"none",color:"inherit",userSelect:"none",display:"flex",width:"100%",alignItems:"center",textAlign:"start",flex:"0 0 auto",outline:0,...i.item}),[i.item]);return A.createElement(ce.button,{ref:t,type:o,...r,__css:a})}),Xce=e=>A.createElement("svg",{viewBox:"0 0 14 14",width:"1em",height:"1em",...e},A.createElement("polygon",{fill:"currentColor",points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"})),_B=de((e,t)=>{const{icon:n,iconSpacing:r="0.75rem",...i}=e,o=Wce(i,t);return A.createElement(TB,{...o,className:cc("chakra-menu__menuitem-option",i.className)},n!==null&&A.createElement(By,{fontSize:"0.8em",marginEnd:r,opacity:e.isChecked?1:0},n||A.createElement(Xce,null)),A.createElement("span",{style:{flex:1}},o.children))});_B.id="MenuItemOption";_B.displayName="MenuItemOption";var Zce=de((e,t)=>{const{icon:n,iconSpacing:r="0.75rem",command:i,commandSpacing:o="0.75rem",children:a,...s}=e,l=EB(s,t),u=n||i?A.createElement("span",{style:{pointerEvents:"none",flex:1}},a):a;return A.createElement(TB,{...l,className:cc("chakra-menu__menuitem",l.className)},n&&A.createElement(By,{fontSize:"0.8em",marginEnd:r},n),u,i&&A.createElement(IB,{marginStart:o},i))});Zce.displayName="MenuItem";var Qce={enter:{visibility:"visible",opacity:1,scale:1,transition:{duration:.2,ease:[.4,0,.2,1]}},exit:{transitionEnd:{visibility:"hidden"},opacity:0,scale:.8,transition:{duration:.1,easings:"easeOut"}}},Jce=ce(Ur.div),eue=de(function(t,n){var p;var r;const{rootProps:i,motionProps:o,...a}=t,{isOpen:s,onTransitionEnd:l,unstable__animationState:c}=Uh(),u=Hce(a,n),d=Vce(i),f=Gh();return A.createElement(ce.div,{...d,__css:{zIndex:(p=t.zIndex)!=null?p:(r=f.list)==null?void 0:r.zIndex}},A.createElement(Jce,{variants:Qce,initial:!1,animate:s?"enter":"exit",__css:{outline:0,...f.list},...o,className:cc("chakra-menu__menu-list",u.className),...u,onUpdate:l,onAnimationComplete:Ace(c.onComplete,u.onAnimationComplete)}))});eue.displayName="MenuList";var rl={exports:{}},pi={},PB={exports:{}},OB={};/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(e){function t(j,F){var H=j.length;j.push(F);e:for(;0<H;){var R=H-1>>>1,W=j[R];if(0<i(W,F))j[R]=F,j[H]=W,H=R;else break e}}function n(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var F=j[0],H=j.pop();if(H!==F){j[0]=H;e:for(var R=0,W=j.length,X=W>>>1;R<X;){var te=2*(R+1)-1,re=j[te],ne=te+1,ie=j[ne];if(0>i(re,H))ne<W&&0>i(ie,re)?(j[R]=ie,j[ne]=H,R=ne):(j[R]=re,j[te]=H,R=te);else if(ne<W&&0>i(ie,H))j[R]=ie,j[ne]=H,R=ne;else break e}}return F}function i(j,F){var H=j.sortIndex-F.sortIndex;return H!==0?H:j.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],c=[],u=1,d=null,f=3,p=!1,m=!1,g=!1,y=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,b=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(j){for(var F=n(c);F!==null;){if(F.callback===null)r(c);else if(F.startTime<=j)r(c),F.sortIndex=F.expirationTime,t(l,F);else break;F=n(c)}}function w(j){if(g=!1,x(j),!m)if(n(l)!==null)m=!0,G(E);else{var F=n(c);F!==null&&z(w,F.startTime-j)}}function E(j,F){m=!1,g&&(g=!1,v(T),T=-1),p=!0;var H=f;try{for(x(F),d=n(l);d!==null&&(!(d.expirationTime>F)||j&&!M());){var R=d.callback;if(typeof R=="function"){d.callback=null,f=d.priorityLevel;var W=R(d.expirationTime<=F);F=e.unstable_now(),typeof W=="function"?d.callback=W:d===n(l)&&r(l),x(F)}else r(l);d=n(l)}if(d!==null)var X=!0;else{var te=n(c);te!==null&&z(w,te.startTime-F),X=!1}return X}finally{d=null,f=H,p=!1}}var C=!1,I=null,T=-1,_=5,P=-1;function M(){return!(e.unstable_now()-P<_)}function D(){if(I!==null){var j=e.unstable_now();P=j;var F=!0;try{F=I(!0,j)}finally{F?V():(C=!1,I=null)}}else C=!1}var V;if(typeof b=="function")V=function(){b(D)};else if(typeof MessageChannel!="undefined"){var B=new MessageChannel,L=B.port2;B.port1.onmessage=D,V=function(){L.postMessage(null)}}else V=function(){y(D,0)};function G(j){I=j,C||(C=!0,V())}function z(j,F){T=y(function(){j(e.unstable_now())},F)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(j){j.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,G(E))},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(j){switch(f){case 1:case 2:case 3:var F=3;break;default:F=f}var H=f;f=F;try{return j()}finally{f=H}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(j,F){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var H=f;f=j;try{return F()}finally{f=H}},e.unstable_scheduleCallback=function(j,F,H){var R=e.unstable_now();switch(typeof H=="object"&&H!==null?(H=H.delay,H=typeof H=="number"&&0<H?R+H:R):H=R,j){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=H+W,j={id:u++,callback:F,priorityLevel:j,startTime:H,expirationTime:W,sortIndex:-1},H>R?(j.sortIndex=H,t(c,j),n(l)===null&&j===n(c)&&(g?(v(T),T=-1):g=!0,z(w,H-R))):(j.sortIndex=W,t(l,j),m||p||(m=!0,G(E))),j},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(j){var F=f;return function(){var H=f;f=F;try{return j.apply(this,arguments)}finally{f=H}}}})(OB);PB.exports=OB;/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var MB=h.exports,ci=PB.exports;function se(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var RB=new Set,Kp={};function kc(e,t){md(e,t),md(e+"Capture",t)}function md(e,t){for(Kp[e]=t,e=0;e<t.length;e++)RB.add(t[e])}var Ra=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),L3=Object.prototype.hasOwnProperty,tue=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,aI={},sI={};function nue(e){return L3.call(sI,e)?!0:L3.call(aI,e)?!1:tue.test(e)?sI[e]=!0:(aI[e]=!0,!1)}function rue(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function iue(e,t,n,r){if(t===null||typeof t=="undefined"||rue(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Or(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var Qn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Qn[e]=new Or(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Qn[t]=new Or(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Qn[e]=new Or(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Qn[e]=new Or(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Qn[e]=new Or(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Qn[e]=new Or(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Qn[e]=new Or(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Qn[e]=new Or(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Qn[e]=new Or(e,5,!1,e.toLowerCase(),null,!1,!1)});var rC=/[\-:]([a-z])/g;function iC(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(rC,iC);Qn[t]=new Or(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(rC,iC);Qn[t]=new Or(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(rC,iC);Qn[t]=new Or(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Qn[e]=new Or(e,1,!1,e.toLowerCase(),null,!1,!1)});Qn.xlinkHref=new Or("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Qn[e]=new Or(e,1,!1,e.toLowerCase(),null,!0,!0)});function oC(e,t,n,r){var i=Qn.hasOwnProperty(t)?Qn[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(iue(t,n,i,r)&&(n=null),r||i===null?nue(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Ua=MB.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,G1=Symbol.for("react.element"),bu=Symbol.for("react.portal"),xu=Symbol.for("react.fragment"),aC=Symbol.for("react.strict_mode"),B3=Symbol.for("react.profiler"),DB=Symbol.for("react.provider"),AB=Symbol.for("react.context"),sC=Symbol.for("react.forward_ref"),$3=Symbol.for("react.suspense"),F3=Symbol.for("react.suspense_list"),lC=Symbol.for("react.memo"),ls=Symbol.for("react.lazy"),LB=Symbol.for("react.offscreen"),lI=Symbol.iterator;function xf(e){return e===null||typeof e!="object"?null:(e=lI&&e[lI]||e["@@iterator"],typeof e=="function"?e:null)}var Zt=Object.assign,Fb;function zf(e){if(Fb===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Fb=t&&t[1]||""}return`
`+Fb+e}var Nb=!1;function zb(e,t){if(!e||Nb)return"";Nb=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(`
`),o=r.stack.split(`
`),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(a!==1||s!==1)do if(a--,s--,0>s||i[a]!==o[s]){var l=`
`+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{Nb=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?zf(e):""}function oue(e){switch(e.tag){case 5:return zf(e.type);case 16:return zf("Lazy");case 13:return zf("Suspense");case 19:return zf("SuspenseList");case 0:case 2:case 15:return e=zb(e.type,!1),e;case 11:return e=zb(e.type.render,!1),e;case 1:return e=zb(e.type,!0),e;default:return""}}function N3(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case xu:return"Fragment";case bu:return"Portal";case B3:return"Profiler";case aC:return"StrictMode";case $3:return"Suspense";case F3:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case AB:return(e.displayName||"Context")+".Consumer";case DB:return(e._context.displayName||"Context")+".Provider";case sC:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case lC:return t=e.displayName||null,t!==null?t:N3(e.type)||"Memo";case ls:t=e._payload,e=e._init;try{return N3(e(t))}catch{}}return null}function aue(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return N3(t);case 8:return t===aC?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Gs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function BB(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sue(e){var t=BB(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function K1(e){e._valueTracker||(e._valueTracker=sue(e))}function $B(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=BB(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function h0(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch{return e.body}}function z3(e,t){var n=t.checked;return Zt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function cI(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Gs(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function FB(e,t){t=t.checked,t!=null&&oC(e,"checked",t,!1)}function j3(e,t){FB(e,t);var n=Gs(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?H3(e,t.type,n):t.hasOwnProperty("defaultValue")&&H3(e,t.type,Gs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function uI(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function H3(e,t,n){(t!=="number"||h0(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var jf=Array.isArray;function Wu(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Gs(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function V3(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(se(91));return Zt({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function dI(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(se(92));if(jf(n)){if(1<n.length)throw Error(se(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Gs(n)}}function NB(e,t){var n=Gs(t.value),r=Gs(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function fI(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function zB(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function W3(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?zB(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var q1,jB=function(e){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(q1=q1||document.createElement("div"),q1.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=q1.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qp(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var cp={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lue=["Webkit","ms","Moz","O"];Object.keys(cp).forEach(function(e){lue.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),cp[t]=cp[e]})});function HB(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||cp.hasOwnProperty(e)&&cp[e]?(""+t).trim():t+"px"}function VB(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=HB(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var cue=Zt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function U3(e,t){if(t){if(cue[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(se(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(se(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(se(61))}if(t.style!=null&&typeof t.style!="object")throw Error(se(62))}}function G3(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var K3=null;function cC(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var q3=null,Uu=null,Gu=null;function pI(e){if(e=Yh(e)){if(typeof q3!="function")throw Error(se(280));var t=e.stateNode;t&&(t=jy(t),q3(e.stateNode,e.type,t))}}function WB(e){Uu?Gu?Gu.push(e):Gu=[e]:Uu=e}function UB(){if(Uu){var e=Uu,t=Gu;if(Gu=Uu=null,pI(e),t)for(e=0;e<t.length;e++)pI(t[e])}}function GB(e,t){return e(t)}function KB(){}var jb=!1;function qB(e,t,n){if(jb)return e(t,n);jb=!0;try{return GB(e,t,n)}finally{jb=!1,(Uu!==null||Gu!==null)&&(KB(),UB())}}function Yp(e,t){var n=e.stateNode;if(n===null)return null;var r=jy(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(se(231,t,typeof n));return n}var Y3=!1;if(Ra)try{var Sf={};Object.defineProperty(Sf,"passive",{get:function(){Y3=!0}}),window.addEventListener("test",Sf,Sf),window.removeEventListener("test",Sf,Sf)}catch{Y3=!1}function uue(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(u){this.onError(u)}}var up=!1,m0=null,g0=!1,X3=null,due={onError:function(e){up=!0,m0=e}};function fue(e,t,n,r,i,o,a,s,l){up=!1,m0=null,uue.apply(due,arguments)}function pue(e,t,n,r,i,o,a,s,l){if(fue.apply(this,arguments),up){if(up){var c=m0;up=!1,m0=null}else throw Error(se(198));g0||(g0=!0,X3=c)}}function Ec(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function YB(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function hI(e){if(Ec(e)!==e)throw Error(se(188))}function hue(e){var t=e.alternate;if(!t){if(t=Ec(e),t===null)throw Error(se(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return hI(i),e;if(o===r)return hI(i),t;o=o.sibling}throw Error(se(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,s=i.child;s;){if(s===n){a=!0,n=i,r=o;break}if(s===r){a=!0,r=i,n=o;break}s=s.sibling}if(!a){for(s=o.child;s;){if(s===n){a=!0,n=o,r=i;break}if(s===r){a=!0,r=o,n=i;break}s=s.sibling}if(!a)throw Error(se(189))}}if(n.alternate!==r)throw Error(se(190))}if(n.tag!==3)throw Error(se(188));return n.stateNode.current===n?e:t}function XB(e){return e=hue(e),e!==null?ZB(e):null}function ZB(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ZB(e);if(t!==null)return t;e=e.sibling}return null}var QB=ci.unstable_scheduleCallback,mI=ci.unstable_cancelCallback,mue=ci.unstable_shouldYield,gue=ci.unstable_requestPaint,sn=ci.unstable_now,vue=ci.unstable_getCurrentPriorityLevel,uC=ci.unstable_ImmediatePriority,JB=ci.unstable_UserBlockingPriority,v0=ci.unstable_NormalPriority,yue=ci.unstable_LowPriority,e$=ci.unstable_IdlePriority,$y=null,Xo=null;function bue(e){if(Xo&&typeof Xo.onCommitFiberRoot=="function")try{Xo.onCommitFiberRoot($y,e,void 0,(e.current.flags&128)===128)}catch{}}var po=Math.clz32?Math.clz32:wue,xue=Math.log,Sue=Math.LN2;function wue(e){return e>>>=0,e===0?32:31-(xue(e)/Sue|0)|0}var Y1=64,X1=4194304;function Hf(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function y0(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=Hf(s):(o&=a,o!==0&&(r=Hf(o)))}else a=n&~i,a!==0?r=Hf(a):o!==0&&(r=Hf(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-po(t),i=1<<n,r|=e[n],t&=~i;return r}function Cue(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function kue(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-po(o),s=1<<a,l=i[a];l===-1?((s&n)===0||(s&r)!==0)&&(i[a]=Cue(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}function Z3(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function t$(){var e=Y1;return Y1<<=1,(Y1&4194240)===0&&(Y1=64),e}function Hb(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Kh(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-po(t),e[t]=n}function Eue(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-po(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function dC(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-po(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ut=0;function n$(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var r$,fC,i$,o$,a$,Q3=!1,Z1=[],Ms=null,Rs=null,Ds=null,Xp=new Map,Zp=new Map,ps=[],Iue="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function gI(e,t){switch(e){case"focusin":case"focusout":Ms=null;break;case"dragenter":case"dragleave":Rs=null;break;case"mouseover":case"mouseout":Ds=null;break;case"pointerover":case"pointerout":Xp.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zp.delete(t.pointerId)}}function wf(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Yh(t),t!==null&&fC(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tue(e,t,n,r,i){switch(t){case"focusin":return Ms=wf(Ms,e,t,n,r,i),!0;case"dragenter":return Rs=wf(Rs,e,t,n,r,i),!0;case"mouseover":return Ds=wf(Ds,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Xp.set(o,wf(Xp.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Zp.set(o,wf(Zp.get(o)||null,e,t,n,r,i)),!0}return!1}function s$(e){var t=Vl(e.target);if(t!==null){var n=Ec(t);if(n!==null){if(t=n.tag,t===13){if(t=YB(n),t!==null){e.blockedOn=t,a$(e.priority,function(){i$(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function cg(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=J3(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);K3=r,n.target.dispatchEvent(r),K3=null}else return t=Yh(n),t!==null&&fC(t),e.blockedOn=n,!1;t.shift()}return!0}function vI(e,t,n){cg(e)&&n.delete(t)}function _ue(){Q3=!1,Ms!==null&&cg(Ms)&&(Ms=null),Rs!==null&&cg(Rs)&&(Rs=null),Ds!==null&&cg(Ds)&&(Ds=null),Xp.forEach(vI),Zp.forEach(vI)}function Cf(e,t){e.blockedOn===t&&(e.blockedOn=null,Q3||(Q3=!0,ci.unstable_scheduleCallback(ci.unstable_NormalPriority,_ue)))}function Qp(e){function t(i){return Cf(i,e)}if(0<Z1.length){Cf(Z1[0],e);for(var n=1;n<Z1.length;n++){var r=Z1[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Ms!==null&&Cf(Ms,e),Rs!==null&&Cf(Rs,e),Ds!==null&&Cf(Ds,e),Xp.forEach(t),Zp.forEach(t),n=0;n<ps.length;n++)r=ps[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ps.length&&(n=ps[0],n.blockedOn===null);)s$(n),n.blockedOn===null&&ps.shift()}var Ku=Ua.ReactCurrentBatchConfig,b0=!0;function Pue(e,t,n,r){var i=ut,o=Ku.transition;Ku.transition=null;try{ut=1,pC(e,t,n,r)}finally{ut=i,Ku.transition=o}}function Oue(e,t,n,r){var i=ut,o=Ku.transition;Ku.transition=null;try{ut=4,pC(e,t,n,r)}finally{ut=i,Ku.transition=o}}function pC(e,t,n,r){if(b0){var i=J3(e,t,n,r);if(i===null)Qb(e,t,r,x0,n),gI(e,r);else if(Tue(i,e,t,n,r))r.stopPropagation();else if(gI(e,r),t&4&&-1<Iue.indexOf(e)){for(;i!==null;){var o=Yh(i);if(o!==null&&r$(o),o=J3(e,t,n,r),o===null&&Qb(e,t,r,x0,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else Qb(e,t,r,null,n)}}var x0=null;function J3(e,t,n,r){if(x0=null,e=cC(r),e=Vl(e),e!==null)if(t=Ec(e),t===null)e=null;else if(n=t.tag,n===13){if(e=YB(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return x0=e,null}function l$(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(vue()){case uC:return 1;case JB:return 4;case v0:case yue:return 16;case e$:return 536870912;default:return 16}default:return 16}}var Cs=null,hC=null,ug=null;function c$(){if(ug)return ug;var e,t=hC,n=t.length,r,i="value"in Cs?Cs.value:Cs.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[o-r];r++);return ug=i.slice(e,1<r?1-r:void 0)}function dg(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Q1(){return!0}function yI(){return!1}function hi(e){function t(n,r,i,o,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(o):o[s]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Q1:yI,this.isPropagationStopped=yI,this}return Zt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Q1)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Q1)},persist:function(){},isPersistent:Q1}),t}var Ud={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mC=hi(Ud),qh=Zt({},Ud,{view:0,detail:0}),Mue=hi(qh),Vb,Wb,kf,Fy=Zt({},qh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gC,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==kf&&(kf&&e.type==="mousemove"?(Vb=e.screenX-kf.screenX,Wb=e.screenY-kf.screenY):Wb=Vb=0,kf=e),Vb)},movementY:function(e){return"movementY"in e?e.movementY:Wb}}),bI=hi(Fy),Rue=Zt({},Fy,{dataTransfer:0}),Due=hi(Rue),Aue=Zt({},qh,{relatedTarget:0}),Ub=hi(Aue),Lue=Zt({},Ud,{animationName:0,elapsedTime:0,pseudoElement:0}),Bue=hi(Lue),$ue=Zt({},Ud,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Fue=hi($ue),Nue=Zt({},Ud,{data:0}),xI=hi(Nue),zue={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jue={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Hue={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Vue(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Hue[e])?!!t[e]:!1}function gC(){return Vue}var Wue=Zt({},qh,{key:function(e){if(e.key){var t=zue[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=dg(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?jue[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gC,charCode:function(e){return e.type==="keypress"?dg(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?dg(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Uue=hi(Wue),Gue=Zt({},Fy,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),SI=hi(Gue),Kue=Zt({},qh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gC}),que=hi(Kue),Yue=Zt({},Ud,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xue=hi(Yue),Zue=Zt({},Fy,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Que=hi(Zue),Jue=[9,13,27,32],vC=Ra&&"CompositionEvent"in window,dp=null;Ra&&"documentMode"in document&&(dp=document.documentMode);var ede=Ra&&"TextEvent"in window&&!dp,u$=Ra&&(!vC||dp&&8<dp&&11>=dp),wI=String.fromCharCode(32),CI=!1;function d$(e,t){switch(e){case"keyup":return Jue.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function f$(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Su=!1;function tde(e,t){switch(e){case"compositionend":return f$(t);case"keypress":return t.which!==32?null:(CI=!0,wI);case"textInput":return e=t.data,e===wI&&CI?null:e;default:return null}}function nde(e,t){if(Su)return e==="compositionend"||!vC&&d$(e,t)?(e=c$(),ug=hC=Cs=null,Su=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return u$&&t.locale!=="ko"?null:t.data;default:return null}}var rde={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function kI(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!rde[e.type]:t==="textarea"}function p$(e,t,n,r){WB(r),t=S0(t,"onChange"),0<t.length&&(n=new mC("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var fp=null,Jp=null;function ide(e){k$(e,0)}function Ny(e){var t=ku(e);if($B(t))return e}function ode(e,t){if(e==="change")return t}var h$=!1;if(Ra){var Gb;if(Ra){var Kb="oninput"in document;if(!Kb){var EI=document.createElement("div");EI.setAttribute("oninput","return;"),Kb=typeof EI.oninput=="function"}Gb=Kb}else Gb=!1;h$=Gb&&(!document.documentMode||9<document.documentMode)}function II(){fp&&(fp.detachEvent("onpropertychange",m$),Jp=fp=null)}function m$(e){if(e.propertyName==="value"&&Ny(Jp)){var t=[];p$(t,Jp,e,cC(e)),qB(ide,t)}}function ade(e,t,n){e==="focusin"?(II(),fp=t,Jp=n,fp.attachEvent("onpropertychange",m$)):e==="focusout"&&II()}function sde(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ny(Jp)}function lde(e,t){if(e==="click")return Ny(t)}function cde(e,t){if(e==="input"||e==="change")return Ny(t)}function ude(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yo=typeof Object.is=="function"?Object.is:ude;function eh(e,t){if(yo(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!L3.call(t,i)||!yo(e[i],t[i]))return!1}return!0}function TI(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _I(e,t){var n=TI(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=TI(n)}}function g$(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?g$(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function v$(){for(var e=window,t=h0();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=h0(e.document)}return t}function yC(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function dde(e){var t=v$(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&g$(n.ownerDocument.documentElement,n)){if(r!==null&&yC(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=_I(n,o);var a=_I(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var fde=Ra&&"documentMode"in document&&11>=document.documentMode,wu=null,eS=null,pp=null,tS=!1;function PI(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;tS||wu==null||wu!==h0(r)||(r=wu,"selectionStart"in r&&yC(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),pp&&eh(pp,r)||(pp=r,r=S0(eS,"onSelect"),0<r.length&&(t=new mC("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=wu)))}function J1(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Cu={animationend:J1("Animation","AnimationEnd"),animationiteration:J1("Animation","AnimationIteration"),animationstart:J1("Animation","AnimationStart"),transitionend:J1("Transition","TransitionEnd")},qb={},y$={};Ra&&(y$=document.createElement("div").style,"AnimationEvent"in window||(delete Cu.animationend.animation,delete Cu.animationiteration.animation,delete Cu.animationstart.animation),"TransitionEvent"in window||delete Cu.transitionend.transition);function zy(e){if(qb[e])return qb[e];if(!Cu[e])return e;var t=Cu[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in y$)return qb[e]=t[n];return e}var b$=zy("animationend"),x$=zy("animationiteration"),S$=zy("animationstart"),w$=zy("transitionend"),C$=new Map,OI="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function il(e,t){C$.set(e,t),kc(t,[e])}for(var Yb=0;Yb<OI.length;Yb++){var Xb=OI[Yb],pde=Xb.toLowerCase(),hde=Xb[0].toUpperCase()+Xb.slice(1);il(pde,"on"+hde)}il(b$,"onAnimationEnd");il(x$,"onAnimationIteration");il(S$,"onAnimationStart");il("dblclick","onDoubleClick");il("focusin","onFocus");il("focusout","onBlur");il(w$,"onTransitionEnd");md("onMouseEnter",["mouseout","mouseover"]);md("onMouseLeave",["mouseout","mouseover"]);md("onPointerEnter",["pointerout","pointerover"]);md("onPointerLeave",["pointerout","pointerover"]);kc("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));kc("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));kc("onBeforeInput",["compositionend","keypress","textInput","paste"]);kc("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));kc("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));kc("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vf="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),mde=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vf));function MI(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,pue(r,t,void 0,e),e.currentTarget=null}function k$(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;MI(i,s,c),o=l}else for(a=0;a<r.length;a++){if(s=r[a],l=s.instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;MI(i,s,c),o=l}}}if(g0)throw e=X3,g0=!1,X3=null,e}function kt(e,t){var n=t[aS];n===void 0&&(n=t[aS]=new Set);var r=e+"__bubble";n.has(r)||(E$(t,e,2,!1),n.add(r))}function Zb(e,t,n){var r=0;t&&(r|=4),E$(n,e,r,t)}var em="_reactListening"+Math.random().toString(36).slice(2);function th(e){if(!e[em]){e[em]=!0,RB.forEach(function(n){n!=="selectionchange"&&(mde.has(n)||Zb(n,!1,e),Zb(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[em]||(t[em]=!0,Zb("selectionchange",!1,t))}}function E$(e,t,n,r){switch(l$(t)){case 1:var i=Pue;break;case 4:i=Oue;break;default:i=pC}n=i.bind(null,t,n,e),i=void 0,!Y3||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Qb(e,t,n,r,i){var o=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;s!==null;){if(a=Vl(s),a===null)return;if(l=a.tag,l===5||l===6){r=o=a;continue e}s=s.parentNode}}r=r.return}qB(function(){var c=o,u=cC(n),d=[];e:{var f=C$.get(e);if(f!==void 0){var p=mC,m=e;switch(e){case"keypress":if(dg(n)===0)break e;case"keydown":case"keyup":p=Uue;break;case"focusin":m="focus",p=Ub;break;case"focusout":m="blur",p=Ub;break;case"beforeblur":case"afterblur":p=Ub;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=bI;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=Due;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=que;break;case b$:case x$:case S$:p=Bue;break;case w$:p=Xue;break;case"scroll":p=Mue;break;case"wheel":p=Que;break;case"copy":case"cut":case"paste":p=Fue;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=SI}var g=(t&4)!==0,y=!g&&e==="scroll",v=g?f!==null?f+"Capture":null:f;g=[];for(var b=c,x;b!==null;){x=b;var w=x.stateNode;if(x.tag===5&&w!==null&&(x=w,v!==null&&(w=Yp(b,v),w!=null&&g.push(nh(b,w,x)))),y)break;b=b.return}0<g.length&&(f=new p(f,m,null,n,u),d.push({event:f,listeners:g}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&n!==K3&&(m=n.relatedTarget||n.fromElement)&&(Vl(m)||m[Da]))break e;if((p||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,p?(m=n.relatedTarget||n.toElement,p=c,m=m?Vl(m):null,m!==null&&(y=Ec(m),m!==y||m.tag!==5&&m.tag!==6)&&(m=null)):(p=null,m=c),p!==m)){if(g=bI,w="onMouseLeave",v="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(g=SI,w="onPointerLeave",v="onPointerEnter",b="pointer"),y=p==null?f:ku(p),x=m==null?f:ku(m),f=new g(w,b+"leave",p,n,u),f.target=y,f.relatedTarget=x,w=null,Vl(u)===c&&(g=new g(v,b+"enter",m,n,u),g.target=x,g.relatedTarget=y,w=g),y=w,p&&m)t:{for(g=p,v=m,b=0,x=g;x;x=Wc(x))b++;for(x=0,w=v;w;w=Wc(w))x++;for(;0<b-x;)g=Wc(g),b--;for(;0<x-b;)v=Wc(v),x--;for(;b--;){if(g===v||v!==null&&g===v.alternate)break t;g=Wc(g),v=Wc(v)}g=null}else g=null;p!==null&&RI(d,f,p,g,!1),m!==null&&y!==null&&RI(d,y,m,g,!0)}}e:{if(f=c?ku(c):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var E=ode;else if(kI(f))if(h$)E=cde;else{E=sde;var C=ade}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(E=lde);if(E&&(E=E(e,c))){p$(d,E,n,u);break e}C&&C(e,f,c),e==="focusout"&&(C=f._wrapperState)&&C.controlled&&f.type==="number"&&H3(f,"number",f.value)}switch(C=c?ku(c):window,e){case"focusin":(kI(C)||C.contentEditable==="true")&&(wu=C,eS=c,pp=null);break;case"focusout":pp=eS=wu=null;break;case"mousedown":tS=!0;break;case"contextmenu":case"mouseup":case"dragend":tS=!1,PI(d,n,u);break;case"selectionchange":if(fde)break;case"keydown":case"keyup":PI(d,n,u)}var I;if(vC)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Su?d$(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&(u$&&n.locale!=="ko"&&(Su||T!=="onCompositionStart"?T==="onCompositionEnd"&&Su&&(I=c$()):(Cs=u,hC="value"in Cs?Cs.value:Cs.textContent,Su=!0)),C=S0(c,T),0<C.length&&(T=new xI(T,e,null,n,u),d.push({event:T,listeners:C}),I?T.data=I:(I=f$(n),I!==null&&(T.data=I)))),(I=ede?tde(e,n):nde(e,n))&&(c=S0(c,"onBeforeInput"),0<c.length&&(u=new xI("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=I))}k$(d,t)})}function nh(e,t,n){return{instance:e,listener:t,currentTarget:n}}function S0(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=Yp(e,n),o!=null&&r.unshift(nh(e,o,i)),o=Yp(e,t),o!=null&&r.push(nh(e,o,i))),e=e.return}return r}function Wc(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function RI(e,t,n,r,i){for(var o=t._reactName,a=[];n!==null&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(l!==null&&l===r)break;s.tag===5&&c!==null&&(s=c,i?(l=Yp(n,o),l!=null&&a.unshift(nh(n,l,s))):i||(l=Yp(n,o),l!=null&&a.push(nh(n,l,s)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var gde=/\r\n?/g,vde=/\u0000|\uFFFD/g;function DI(e){return(typeof e=="string"?e:""+e).replace(gde,`
`).replace(vde,"")}function tm(e,t,n){if(t=DI(t),DI(e)!==t&&n)throw Error(se(425))}function w0(){}var nS=null,rS=null;function iS(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var oS=typeof setTimeout=="function"?setTimeout:void 0,yde=typeof clearTimeout=="function"?clearTimeout:void 0,AI=typeof Promise=="function"?Promise:void 0,bde=typeof queueMicrotask=="function"?queueMicrotask:typeof AI!="undefined"?function(e){return AI.resolve(null).then(e).catch(xde)}:oS;function xde(e){setTimeout(function(){throw e})}function Jb(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Qp(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Qp(t)}function As(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function LI(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Gd=Math.random().toString(36).slice(2),Bo="__reactFiber$"+Gd,rh="__reactProps$"+Gd,Da="__reactContainer$"+Gd,aS="__reactEvents$"+Gd,Sde="__reactListeners$"+Gd,wde="__reactHandles$"+Gd;function Vl(e){var t=e[Bo];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Da]||n[Bo]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=LI(e);e!==null;){if(n=e[Bo])return n;e=LI(e)}return t}e=n,n=e.parentNode}return null}function Yh(e){return e=e[Bo]||e[Da],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ku(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(se(33))}function jy(e){return e[rh]||null}var sS=[],Eu=-1;function ol(e){return{current:e}}function _t(e){0>Eu||(e.current=sS[Eu],sS[Eu]=null,Eu--)}function wt(e,t){Eu++,sS[Eu]=e.current,e.current=t}var Ks={},hr=ol(Ks),Fr=ol(!1),uc=Ks;function gd(e,t){var n=e.type.contextTypes;if(!n)return Ks;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Nr(e){return e=e.childContextTypes,e!=null}function C0(){_t(Fr),_t(hr)}function BI(e,t,n){if(hr.current!==Ks)throw Error(se(168));wt(hr,t),wt(Fr,n)}function I$(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(se(108,aue(e)||"Unknown",i));return Zt({},n,r)}function k0(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ks,uc=hr.current,wt(hr,e),wt(Fr,Fr.current),!0}function $I(e,t,n){var r=e.stateNode;if(!r)throw Error(se(169));n?(e=I$(e,t,uc),r.__reactInternalMemoizedMergedChildContext=e,_t(Fr),_t(hr),wt(hr,e)):_t(Fr),wt(Fr,n)}var ya=null,Hy=!1,e5=!1;function T$(e){ya===null?ya=[e]:ya.push(e)}function Cde(e){Hy=!0,T$(e)}function al(){if(!e5&&ya!==null){e5=!0;var e=0,t=ut;try{var n=ya;for(ut=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ya=null,Hy=!1}catch(i){throw ya!==null&&(ya=ya.slice(e+1)),QB(uC,al),i}finally{ut=t,e5=!1}}return null}var Iu=[],Tu=0,E0=null,I0=0,Ei=[],Ii=0,dc=null,wa=1,Ca="";function El(e,t){Iu[Tu++]=I0,Iu[Tu++]=E0,E0=e,I0=t}function _$(e,t,n){Ei[Ii++]=wa,Ei[Ii++]=Ca,Ei[Ii++]=dc,dc=e;var r=wa;e=Ca;var i=32-po(r)-1;r&=~(1<<i),n+=1;var o=32-po(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,wa=1<<32-po(t)+i|n<<i|r,Ca=o+e}else wa=1<<o|n<<i|r,Ca=e}function bC(e){e.return!==null&&(El(e,1),_$(e,1,0))}function xC(e){for(;e===E0;)E0=Iu[--Tu],Iu[Tu]=null,I0=Iu[--Tu],Iu[Tu]=null;for(;e===dc;)dc=Ei[--Ii],Ei[Ii]=null,Ca=Ei[--Ii],Ei[Ii]=null,wa=Ei[--Ii],Ei[Ii]=null}var ai=null,ei=null,Ft=!1,so=null;function P$(e,t){var n=Mi(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function FI(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ai=e,ei=As(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ai=e,ei=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=dc!==null?{id:wa,overflow:Ca}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Mi(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ai=e,ei=null,!0):!1;default:return!1}}function lS(e){return(e.mode&1)!==0&&(e.flags&128)===0}function cS(e){if(Ft){var t=ei;if(t){var n=t;if(!FI(e,t)){if(lS(e))throw Error(se(418));t=As(n.nextSibling);var r=ai;t&&FI(e,t)?P$(r,n):(e.flags=e.flags&-4097|2,Ft=!1,ai=e)}}else{if(lS(e))throw Error(se(418));e.flags=e.flags&-4097|2,Ft=!1,ai=e}}}function NI(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ai=e}function nm(e){if(e!==ai)return!1;if(!Ft)return NI(e),Ft=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!iS(e.type,e.memoizedProps)),t&&(t=ei)){if(lS(e))throw O$(),Error(se(418));for(;t;)P$(e,t),t=As(t.nextSibling)}if(NI(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(se(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){ei=As(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}ei=null}}else ei=ai?As(e.stateNode.nextSibling):null;return!0}function O$(){for(var e=ei;e;)e=As(e.nextSibling)}function vd(){ei=ai=null,Ft=!1}function SC(e){so===null?so=[e]:so.push(e)}var kde=Ua.ReactCurrentBatchConfig;function no(e,t){if(e&&e.defaultProps){t=Zt({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var T0=ol(null),_0=null,_u=null,wC=null;function CC(){wC=_u=_0=null}function kC(e){var t=T0.current;_t(T0),e._currentValue=t}function uS(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function qu(e,t){_0=e,wC=_u=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&($r=!0),e.firstContext=null)}function $i(e){var t=e._currentValue;if(wC!==e)if(e={context:e,memoizedValue:t,next:null},_u===null){if(_0===null)throw Error(se(308));_u=e,_0.dependencies={lanes:0,firstContext:e}}else _u=_u.next=e;return t}var Wl=null;function EC(e){Wl===null?Wl=[e]:Wl.push(e)}function M$(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,EC(t)):(n.next=i.next,i.next=n),t.interleaved=n,Aa(e,r)}function Aa(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var cs=!1;function IC(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function R$(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function _a(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ls(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Ze&2)!==0){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Aa(e,n)}return i=r.interleaved,i===null?(t.next=t,EC(r)):(t.next=i.next,i.next=t),r.interleaved=t,Aa(e,n)}function fg(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dC(e,n)}}function zI(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function P0(e,t,n,r){var i=e.updateQueue;cs=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?o=c:a.next=c,a=l;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==a&&(s===null?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(o!==null){var d=i.baseState;a=0,u=c=l=null,s=o;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,g=s;switch(f=t,p=n,g.tag){case 1:if(m=g.payload,typeof m=="function"){d=m.call(p,d,f);break e}d=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m=="function"?m.call(p,d,f):m,f==null)break e;d=Zt({},d,f);break e;case 2:cs=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(c=u=p,l=d):u=u.next=p,a|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);pc|=a,e.lanes=a,e.memoizedState=d}}function jI(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(se(191,i));i.call(r)}}}var D$=new MB.Component().refs;function dS(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Zt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Vy={isMounted:function(e){return(e=e._reactInternals)?Ec(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Er(),i=$s(e),o=_a(r,i);o.payload=t,n!=null&&(o.callback=n),t=Ls(e,o,i),t!==null&&(ho(t,e,i,r),fg(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Er(),i=$s(e),o=_a(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=Ls(e,o,i),t!==null&&(ho(t,e,i,r),fg(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Er(),r=$s(e),i=_a(n,r);i.tag=2,t!=null&&(i.callback=t),t=Ls(e,i,r),t!==null&&(ho(t,e,r,n),fg(t,e,r))}};function HI(e,t,n,r,i,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!eh(n,r)||!eh(i,o):!0}function A$(e,t,n){var r=!1,i=Ks,o=t.contextType;return typeof o=="object"&&o!==null?o=$i(o):(i=Nr(t)?uc:hr.current,r=t.contextTypes,o=(r=r!=null)?gd(e,i):Ks),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Vy,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function VI(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Vy.enqueueReplaceState(t,t.state,null)}function fS(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=D$,IC(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=$i(o):(o=Nr(t)?uc:hr.current,i.context=gd(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(dS(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&Vy.enqueueReplaceState(i,i.state,null),P0(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function Ef(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(se(309));var r=n.stateNode}if(!r)throw Error(se(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(a){var s=i.refs;s===D$&&(s=i.refs={}),a===null?delete s[o]:s[o]=a},t._stringRef=o,t)}if(typeof e!="string")throw Error(se(284));if(!n._owner)throw Error(se(290,e))}return e}function rm(e,t){throw e=Object.prototype.toString.call(t),Error(se(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function WI(e){var t=e._init;return t(e._payload)}function L$(e){function t(v,b){if(e){var x=v.deletions;x===null?(v.deletions=[b],v.flags|=16):x.push(b)}}function n(v,b){if(!e)return null;for(;b!==null;)t(v,b),b=b.sibling;return null}function r(v,b){for(v=new Map;b!==null;)b.key!==null?v.set(b.key,b):v.set(b.index,b),b=b.sibling;return v}function i(v,b){return v=Fs(v,b),v.index=0,v.sibling=null,v}function o(v,b,x){return v.index=x,e?(x=v.alternate,x!==null?(x=x.index,x<b?(v.flags|=2,b):x):(v.flags|=2,b)):(v.flags|=1048576,b)}function a(v){return e&&v.alternate===null&&(v.flags|=2),v}function s(v,b,x,w){return b===null||b.tag!==6?(b=s5(x,v.mode,w),b.return=v,b):(b=i(b,x),b.return=v,b)}function l(v,b,x,w){var E=x.type;return E===xu?u(v,b,x.props.children,w,x.key):b!==null&&(b.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===ls&&WI(E)===b.type)?(w=i(b,x.props),w.ref=Ef(v,b,x),w.return=v,w):(w=yg(x.type,x.key,x.props,null,v.mode,w),w.ref=Ef(v,b,x),w.return=v,w)}function c(v,b,x,w){return b===null||b.tag!==4||b.stateNode.containerInfo!==x.containerInfo||b.stateNode.implementation!==x.implementation?(b=l5(x,v.mode,w),b.return=v,b):(b=i(b,x.children||[]),b.return=v,b)}function u(v,b,x,w,E){return b===null||b.tag!==7?(b=Jl(x,v.mode,w,E),b.return=v,b):(b=i(b,x),b.return=v,b)}function d(v,b,x){if(typeof b=="string"&&b!==""||typeof b=="number")return b=s5(""+b,v.mode,x),b.return=v,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case G1:return x=yg(b.type,b.key,b.props,null,v.mode,x),x.ref=Ef(v,null,b),x.return=v,x;case bu:return b=l5(b,v.mode,x),b.return=v,b;case ls:var w=b._init;return d(v,w(b._payload),x)}if(jf(b)||xf(b))return b=Jl(b,v.mode,x,null),b.return=v,b;rm(v,b)}return null}function f(v,b,x,w){var E=b!==null?b.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return E!==null?null:s(v,b,""+x,w);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case G1:return x.key===E?l(v,b,x,w):null;case bu:return x.key===E?c(v,b,x,w):null;case ls:return E=x._init,f(v,b,E(x._payload),w)}if(jf(x)||xf(x))return E!==null?null:u(v,b,x,w,null);rm(v,x)}return null}function p(v,b,x,w,E){if(typeof w=="string"&&w!==""||typeof w=="number")return v=v.get(x)||null,s(b,v,""+w,E);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case G1:return v=v.get(w.key===null?x:w.key)||null,l(b,v,w,E);case bu:return v=v.get(w.key===null?x:w.key)||null,c(b,v,w,E);case ls:var C=w._init;return p(v,b,x,C(w._payload),E)}if(jf(w)||xf(w))return v=v.get(x)||null,u(b,v,w,E,null);rm(b,w)}return null}function m(v,b,x,w){for(var E=null,C=null,I=b,T=b=0,_=null;I!==null&&T<x.length;T++){I.index>T?(_=I,I=null):_=I.sibling;var P=f(v,I,x[T],w);if(P===null){I===null&&(I=_);break}e&&I&&P.alternate===null&&t(v,I),b=o(P,b,T),C===null?E=P:C.sibling=P,C=P,I=_}if(T===x.length)return n(v,I),Ft&&El(v,T),E;if(I===null){for(;T<x.length;T++)I=d(v,x[T],w),I!==null&&(b=o(I,b,T),C===null?E=I:C.sibling=I,C=I);return Ft&&El(v,T),E}for(I=r(v,I);T<x.length;T++)_=p(I,v,T,x[T],w),_!==null&&(e&&_.alternate!==null&&I.delete(_.key===null?T:_.key),b=o(_,b,T),C===null?E=_:C.sibling=_,C=_);return e&&I.forEach(function(M){return t(v,M)}),Ft&&El(v,T),E}function g(v,b,x,w){var E=xf(x);if(typeof E!="function")throw Error(se(150));if(x=E.call(x),x==null)throw Error(se(151));for(var C=E=null,I=b,T=b=0,_=null,P=x.next();I!==null&&!P.done;T++,P=x.next()){I.index>T?(_=I,I=null):_=I.sibling;var M=f(v,I,P.value,w);if(M===null){I===null&&(I=_);break}e&&I&&M.alternate===null&&t(v,I),b=o(M,b,T),C===null?E=M:C.sibling=M,C=M,I=_}if(P.done)return n(v,I),Ft&&El(v,T),E;if(I===null){for(;!P.done;T++,P=x.next())P=d(v,P.value,w),P!==null&&(b=o(P,b,T),C===null?E=P:C.sibling=P,C=P);return Ft&&El(v,T),E}for(I=r(v,I);!P.done;T++,P=x.next())P=p(I,v,T,P.value,w),P!==null&&(e&&P.alternate!==null&&I.delete(P.key===null?T:P.key),b=o(P,b,T),C===null?E=P:C.sibling=P,C=P);return e&&I.forEach(function(D){return t(v,D)}),Ft&&El(v,T),E}function y(v,b,x,w){if(typeof x=="object"&&x!==null&&x.type===xu&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case G1:e:{for(var E=x.key,C=b;C!==null;){if(C.key===E){if(E=x.type,E===xu){if(C.tag===7){n(v,C.sibling),b=i(C,x.props.children),b.return=v,v=b;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===ls&&WI(E)===C.type){n(v,C.sibling),b=i(C,x.props),b.ref=Ef(v,C,x),b.return=v,v=b;break e}n(v,C);break}else t(v,C);C=C.sibling}x.type===xu?(b=Jl(x.props.children,v.mode,w,x.key),b.return=v,v=b):(w=yg(x.type,x.key,x.props,null,v.mode,w),w.ref=Ef(v,b,x),w.return=v,v=w)}return a(v);case bu:e:{for(C=x.key;b!==null;){if(b.key===C)if(b.tag===4&&b.stateNode.containerInfo===x.containerInfo&&b.stateNode.implementation===x.implementation){n(v,b.sibling),b=i(b,x.children||[]),b.return=v,v=b;break e}else{n(v,b);break}else t(v,b);b=b.sibling}b=l5(x,v.mode,w),b.return=v,v=b}return a(v);case ls:return C=x._init,y(v,b,C(x._payload),w)}if(jf(x))return m(v,b,x,w);if(xf(x))return g(v,b,x,w);rm(v,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,b!==null&&b.tag===6?(n(v,b.sibling),b=i(b,x),b.return=v,v=b):(n(v,b),b=s5(x,v.mode,w),b.return=v,v=b),a(v)):n(v,b)}return y}var yd=L$(!0),B$=L$(!1),Xh={},Zo=ol(Xh),ih=ol(Xh),oh=ol(Xh);function Ul(e){if(e===Xh)throw Error(se(174));return e}function TC(e,t){switch(wt(oh,t),wt(ih,e),wt(Zo,Xh),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:W3(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=W3(t,e)}_t(Zo),wt(Zo,t)}function bd(){_t(Zo),_t(ih),_t(oh)}function $$(e){Ul(oh.current);var t=Ul(Zo.current),n=W3(t,e.type);t!==n&&(wt(ih,e),wt(Zo,n))}function _C(e){ih.current===e&&(_t(Zo),_t(ih))}var Ut=ol(0);function O0(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var t5=[];function PC(){for(var e=0;e<t5.length;e++)t5[e]._workInProgressVersionPrimary=null;t5.length=0}var pg=Ua.ReactCurrentDispatcher,n5=Ua.ReactCurrentBatchConfig,fc=0,Xt=null,Pn=null,$n=null,M0=!1,hp=!1,ah=0,Ede=0;function Jn(){throw Error(se(321))}function OC(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yo(e[n],t[n]))return!1;return!0}function MC(e,t,n,r,i,o){if(fc=o,Xt=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,pg.current=e===null||e.memoizedState===null?Pde:Ode,e=n(r,i),hp){o=0;do{if(hp=!1,ah=0,25<=o)throw Error(se(301));o+=1,$n=Pn=null,t.updateQueue=null,pg.current=Mde,e=n(r,i)}while(hp)}if(pg.current=R0,t=Pn!==null&&Pn.next!==null,fc=0,$n=Pn=Xt=null,M0=!1,t)throw Error(se(300));return e}function RC(){var e=ah!==0;return ah=0,e}function Oo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $n===null?Xt.memoizedState=$n=e:$n=$n.next=e,$n}function Fi(){if(Pn===null){var e=Xt.alternate;e=e!==null?e.memoizedState:null}else e=Pn.next;var t=$n===null?Xt.memoizedState:$n.next;if(t!==null)$n=t,Pn=e;else{if(e===null)throw Error(se(310));Pn=e,e={memoizedState:Pn.memoizedState,baseState:Pn.baseState,baseQueue:Pn.baseQueue,queue:Pn.queue,next:null},$n===null?Xt.memoizedState=$n=e:$n=$n.next=e}return $n}function sh(e,t){return typeof t=="function"?t(e):t}function r5(e){var t=Fi(),n=t.queue;if(n===null)throw Error(se(311));n.lastRenderedReducer=e;var r=Pn,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var s=a=null,l=null,c=o;do{var u=c.lane;if((fc&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(s=l=d,a=r):l=l.next=d,Xt.lanes|=u,pc|=u}c=c.next}while(c!==null&&c!==o);l===null?a=r:l.next=s,yo(r,t.memoizedState)||($r=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,Xt.lanes|=o,pc|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function i5(e){var t=Fi(),n=t.queue;if(n===null)throw Error(se(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);yo(o,t.memoizedState)||($r=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function F$(){}function N$(e,t){var n=Xt,r=Fi(),i=t(),o=!yo(r.memoizedState,i);if(o&&(r.memoizedState=i,$r=!0),r=r.queue,DC(H$.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||$n!==null&&$n.memoizedState.tag&1){if(n.flags|=2048,lh(9,j$.bind(null,n,r,i,t),void 0,null),Nn===null)throw Error(se(349));(fc&30)!==0||z$(n,t,i)}return i}function z$(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Xt.updateQueue,t===null?(t={lastEffect:null,stores:null},Xt.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function j$(e,t,n,r){t.value=n,t.getSnapshot=r,V$(t)&&W$(e)}function H$(e,t,n){return n(function(){V$(t)&&W$(e)})}function V$(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yo(e,n)}catch{return!0}}function W$(e){var t=Aa(e,1);t!==null&&ho(t,e,1,-1)}function UI(e){var t=Oo();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:sh,lastRenderedState:e},t.queue=e,e=e.dispatch=_de.bind(null,Xt,e),[t.memoizedState,e]}function lh(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Xt.updateQueue,t===null?(t={lastEffect:null,stores:null},Xt.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function U$(){return Fi().memoizedState}function hg(e,t,n,r){var i=Oo();Xt.flags|=e,i.memoizedState=lh(1|t,n,void 0,r===void 0?null:r)}function Wy(e,t,n,r){var i=Fi();r=r===void 0?null:r;var o=void 0;if(Pn!==null){var a=Pn.memoizedState;if(o=a.destroy,r!==null&&OC(r,a.deps)){i.memoizedState=lh(t,n,o,r);return}}Xt.flags|=e,i.memoizedState=lh(1|t,n,o,r)}function GI(e,t){return hg(8390656,8,e,t)}function DC(e,t){return Wy(2048,8,e,t)}function G$(e,t){return Wy(4,2,e,t)}function K$(e,t){return Wy(4,4,e,t)}function q$(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Y$(e,t,n){return n=n!=null?n.concat([e]):null,Wy(4,4,q$.bind(null,t,e),n)}function AC(){}function X$(e,t){var n=Fi();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&OC(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Z$(e,t){var n=Fi();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&OC(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Q$(e,t,n){return(fc&21)===0?(e.baseState&&(e.baseState=!1,$r=!0),e.memoizedState=n):(yo(n,t)||(n=t$(),Xt.lanes|=n,pc|=n,e.baseState=!0),t)}function Ide(e,t){var n=ut;ut=n!==0&&4>n?n:4,e(!0);var r=n5.transition;n5.transition={};try{e(!1),t()}finally{ut=n,n5.transition=r}}function J$(){return Fi().memoizedState}function Tde(e,t,n){var r=$s(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},eF(e))tF(t,n);else if(n=M$(e,t,n,r),n!==null){var i=Er();ho(n,e,r,i),nF(n,t,r)}}function _de(e,t,n){var r=$s(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(eF(e))tF(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,yo(s,a)){var l=t.interleaved;l===null?(i.next=i,EC(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=M$(e,t,i,r),n!==null&&(i=Er(),ho(n,e,r,i),nF(n,t,r))}}function eF(e){var t=e.alternate;return e===Xt||t!==null&&t===Xt}function tF(e,t){hp=M0=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function nF(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,dC(e,n)}}var R0={readContext:$i,useCallback:Jn,useContext:Jn,useEffect:Jn,useImperativeHandle:Jn,useInsertionEffect:Jn,useLayoutEffect:Jn,useMemo:Jn,useReducer:Jn,useRef:Jn,useState:Jn,useDebugValue:Jn,useDeferredValue:Jn,useTransition:Jn,useMutableSource:Jn,useSyncExternalStore:Jn,useId:Jn,unstable_isNewReconciler:!1},Pde={readContext:$i,useCallback:function(e,t){return Oo().memoizedState=[e,t===void 0?null:t],e},useContext:$i,useEffect:GI,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,hg(4194308,4,q$.bind(null,t,e),n)},useLayoutEffect:function(e,t){return hg(4194308,4,e,t)},useInsertionEffect:function(e,t){return hg(4,2,e,t)},useMemo:function(e,t){var n=Oo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Oo();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Tde.bind(null,Xt,e),[r.memoizedState,e]},useRef:function(e){var t=Oo();return e={current:e},t.memoizedState=e},useState:UI,useDebugValue:AC,useDeferredValue:function(e){return Oo().memoizedState=e},useTransition:function(){var e=UI(!1),t=e[0];return e=Ide.bind(null,e[1]),Oo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Xt,i=Oo();if(Ft){if(n===void 0)throw Error(se(407));n=n()}else{if(n=t(),Nn===null)throw Error(se(349));(fc&30)!==0||z$(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,GI(H$.bind(null,r,o,e),[e]),r.flags|=2048,lh(9,j$.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Oo(),t=Nn.identifierPrefix;if(Ft){var n=Ca,r=wa;n=(r&~(1<<32-po(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ah++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Ede++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Ode={readContext:$i,useCallback:X$,useContext:$i,useEffect:DC,useImperativeHandle:Y$,useInsertionEffect:G$,useLayoutEffect:K$,useMemo:Z$,useReducer:r5,useRef:U$,useState:function(){return r5(sh)},useDebugValue:AC,useDeferredValue:function(e){var t=Fi();return Q$(t,Pn.memoizedState,e)},useTransition:function(){var e=r5(sh)[0],t=Fi().memoizedState;return[e,t]},useMutableSource:F$,useSyncExternalStore:N$,useId:J$,unstable_isNewReconciler:!1},Mde={readContext:$i,useCallback:X$,useContext:$i,useEffect:DC,useImperativeHandle:Y$,useInsertionEffect:G$,useLayoutEffect:K$,useMemo:Z$,useReducer:i5,useRef:U$,useState:function(){return i5(sh)},useDebugValue:AC,useDeferredValue:function(e){var t=Fi();return Pn===null?t.memoizedState=e:Q$(t,Pn.memoizedState,e)},useTransition:function(){var e=i5(sh)[0],t=Fi().memoizedState;return[e,t]},useMutableSource:F$,useSyncExternalStore:N$,useId:J$,unstable_isNewReconciler:!1};function xd(e,t){try{var n="",r=t;do n+=oue(r),r=r.return;while(r);var i=n}catch(o){i=`
Error generating stack: `+o.message+`
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function o5(e,t,n){return{value:e,source:null,stack:n!=null?n:null,digest:t!=null?t:null}}function pS(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Rde=typeof WeakMap=="function"?WeakMap:Map;function rF(e,t,n){n=_a(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){A0||(A0=!0,CS=r),pS(e,t)},n}function iF(e,t,n){n=_a(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){pS(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){pS(e,t),typeof r!="function"&&(Bs===null?Bs=new Set([this]):Bs.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function KI(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rde;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Gde.bind(null,e,t,n),t.then(e,e))}function qI(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function YI(e,t,n,r,i){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=_a(-1,1),t.tag=2,Ls(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var Dde=Ua.ReactCurrentOwner,$r=!1;function br(e,t,n,r){t.child=e===null?B$(t,null,n,r):yd(t,e.child,n,r)}function XI(e,t,n,r,i){n=n.render;var o=t.ref;return qu(t,i),r=MC(e,t,n,r,o,i),n=RC(),e!==null&&!$r?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,La(e,t,i)):(Ft&&n&&bC(t),t.flags|=1,br(e,t,r,i),t.child)}function ZI(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!HC(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,oF(e,t,o,r,i)):(e=yg(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,(e.lanes&i)===0){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:eh,n(a,r)&&e.ref===t.ref)return La(e,t,i)}return t.flags|=1,e=Fs(o,r),e.ref=t.ref,e.return=t,t.child=e}function oF(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(eh(o,r)&&e.ref===t.ref)if($r=!1,t.pendingProps=r=o,(e.lanes&i)!==0)(e.flags&131072)!==0&&($r=!0);else return t.lanes=e.lanes,La(e,t,i)}return hS(e,t,n,r,i)}function aF(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},wt(Ou,Zr),Zr|=n;else{if((n&1073741824)===0)return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,wt(Ou,Zr),Zr|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,wt(Ou,Zr),Zr|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,wt(Ou,Zr),Zr|=r;return br(e,t,i,n),t.child}function sF(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function hS(e,t,n,r,i){var o=Nr(n)?uc:hr.current;return o=gd(t,o),qu(t,i),n=MC(e,t,n,r,o,i),r=RC(),e!==null&&!$r?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,La(e,t,i)):(Ft&&r&&bC(t),t.flags|=1,br(e,t,n,i),t.child)}function QI(e,t,n,r,i){if(Nr(n)){var o=!0;k0(t)}else o=!1;if(qu(t,i),t.stateNode===null)mg(e,t),A$(t,n,r),fS(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=$i(c):(c=Nr(n)?uc:hr.current,c=gd(t,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||l!==c)&&VI(t,a,r,c),cs=!1;var f=t.memoizedState;a.state=f,P0(t,r,a,i),l=t.memoizedState,s!==r||f!==l||Fr.current||cs?(typeof u=="function"&&(dS(t,n,u,r),l=t.memoizedState),(s=cs||HI(t,n,s,r,f,l,c))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,R$(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:no(t.type,s),a.props=c,d=t.pendingProps,f=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=$i(l):(l=Nr(n)?uc:hr.current,l=gd(t,l));var p=n.getDerivedStateFromProps;(u=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==d||f!==l)&&VI(t,a,r,l),cs=!1,f=t.memoizedState,a.state=f,P0(t,r,a,i);var m=t.memoizedState;s!==d||f!==m||Fr.current||cs?(typeof p=="function"&&(dS(t,n,p,r),m=t.memoizedState),(c=cs||HI(t,n,c,r,f,m,l)||!1)?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,m,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,m,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),a.props=r,a.state=m,a.context=l,r=c):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return mS(e,t,n,r,o,i)}function mS(e,t,n,r,i,o){sF(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&$I(t,n,!1),La(e,t,o);r=t.stateNode,Dde.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=yd(t,e.child,null,o),t.child=yd(t,null,s,o)):br(e,t,s,o),t.memoizedState=r.state,i&&$I(t,n,!0),t.child}function lF(e){var t=e.stateNode;t.pendingContext?BI(e,t.pendingContext,t.pendingContext!==t.context):t.context&&BI(e,t.context,!1),TC(e,t.containerInfo)}function JI(e,t,n,r,i){return vd(),SC(i),t.flags|=256,br(e,t,n,r),t.child}var gS={dehydrated:null,treeContext:null,retryLane:0};function vS(e){return{baseLanes:e,cachePool:null,transitions:null}}function cF(e,t,n){var r=t.pendingProps,i=Ut.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),wt(Ut,i&1),e===null)return cS(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},(r&1)===0&&o!==null?(o.childLanes=0,o.pendingProps=a):o=Ky(a,r,0,null),e=Jl(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=vS(n),t.memoizedState=gS,e):LC(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return Ade(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var l={mode:"hidden",children:r.children};return(a&1)===0&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Fs(i,l),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=Fs(s,o):(o=Jl(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?vS(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=gS,r}return o=e.child,e=o.sibling,r=Fs(o,{mode:"visible",children:r.children}),(t.mode&1)===0&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function LC(e,t){return t=Ky({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function im(e,t,n,r){return r!==null&&SC(r),yd(t,e.child,null,n),e=LC(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ade(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=o5(Error(se(422))),im(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Ky({mode:"visible",children:r.children},i,0,null),o=Jl(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,(t.mode&1)!==0&&yd(t,e.child,null,a),t.child.memoizedState=vS(a),t.memoizedState=gS,o);if((t.mode&1)===0)return im(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(se(419)),r=o5(o,r,void 0),im(e,t,a,r)}if(s=(a&e.childLanes)!==0,$r||s){if(r=Nn,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=(i&(r.suspendedLanes|a))!==0?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Aa(e,i),ho(r,e,i,-1))}return jC(),r=o5(Error(se(421))),im(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Kde.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ei=As(i.nextSibling),ai=t,Ft=!0,so=null,e!==null&&(Ei[Ii++]=wa,Ei[Ii++]=Ca,Ei[Ii++]=dc,wa=e.id,Ca=e.overflow,dc=t),t=LC(t,r.children),t.flags|=4096,t)}function eT(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),uS(e.return,t,n)}function a5(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function uF(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(br(e,t,r.children,n),r=Ut.current,(r&2)!==0)r=r&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&eT(e,n,t);else if(e.tag===19)eT(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(wt(Ut,r),(t.mode&1)===0)t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&O0(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),a5(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&O0(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}a5(t,!0,n,null,o);break;case"together":a5(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function mg(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function La(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),pc|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(se(153));if(t.child!==null){for(e=t.child,n=Fs(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Fs(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Lde(e,t,n){switch(t.tag){case 3:lF(t),vd();break;case 5:$$(t);break;case 1:Nr(t.type)&&k0(t);break;case 4:TC(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;wt(T0,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(wt(Ut,Ut.current&1),t.flags|=128,null):(n&t.child.childLanes)!==0?cF(e,t,n):(wt(Ut,Ut.current&1),e=La(e,t,n),e!==null?e.sibling:null);wt(Ut,Ut.current&1);break;case 19:if(r=(n&t.childLanes)!==0,(e.flags&128)!==0){if(r)return uF(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),wt(Ut,Ut.current),r)break;return null;case 22:case 23:return t.lanes=0,aF(e,t,n)}return La(e,t,n)}var dF,yS,fF,pF;dF=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};yS=function(){};fF=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ul(Zo.current);var o=null;switch(n){case"input":i=z3(e,i),r=z3(e,r),o=[];break;case"select":i=Zt({},i,{value:void 0}),r=Zt({},r,{value:void 0}),o=[];break;case"textarea":i=V3(e,i),r=V3(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=w0)}U3(n,r);var a;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var s=i[c];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Kp.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var l=r[c];if(s=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==s&&(l!=null||s!=null))if(c==="style")if(s){for(a in s)!s.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&s[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(o||(o=[]),o.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(o=o||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Kp.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&kt("scroll",e),o||s===l||(o=[])):(o=o||[]).push(c,l))}n&&(o=o||[]).push("style",n);var c=o;(t.updateQueue=c)&&(t.flags|=4)}};pF=function(e,t,n,r){n!==r&&(t.flags|=4)};function If(e,t){if(!Ft)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function er(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Bde(e,t,n){var r=t.pendingProps;switch(xC(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return er(t),null;case 1:return Nr(t.type)&&C0(),er(t),null;case 3:return r=t.stateNode,bd(),_t(Fr),_t(hr),PC(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(nm(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,so!==null&&(IS(so),so=null))),yS(e,t),er(t),null;case 5:_C(t);var i=Ul(oh.current);if(n=t.type,e!==null&&t.stateNode!=null)fF(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(se(166));return er(t),null}if(e=Ul(Zo.current),nm(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Bo]=t,r[rh]=o,e=(t.mode&1)!==0,n){case"dialog":kt("cancel",r),kt("close",r);break;case"iframe":case"object":case"embed":kt("load",r);break;case"video":case"audio":for(i=0;i<Vf.length;i++)kt(Vf[i],r);break;case"source":kt("error",r);break;case"img":case"image":case"link":kt("error",r),kt("load",r);break;case"details":kt("toggle",r);break;case"input":cI(r,o),kt("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},kt("invalid",r);break;case"textarea":dI(r,o),kt("invalid",r)}U3(n,o),i=null;for(var a in o)if(o.hasOwnProperty(a)){var s=o[a];a==="children"?typeof s=="string"?r.textContent!==s&&(o.suppressHydrationWarning!==!0&&tm(r.textContent,s,e),i=["children",s]):typeof s=="number"&&r.textContent!==""+s&&(o.suppressHydrationWarning!==!0&&tm(r.textContent,s,e),i=["children",""+s]):Kp.hasOwnProperty(a)&&s!=null&&a==="onScroll"&&kt("scroll",r)}switch(n){case"input":K1(r),uI(r,o,!0);break;case"textarea":K1(r),fI(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=w0)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=zB(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[Bo]=t,e[rh]=r,dF(e,t,!1,!1),t.stateNode=e;e:{switch(a=G3(n,r),n){case"dialog":kt("cancel",e),kt("close",e),i=r;break;case"iframe":case"object":case"embed":kt("load",e),i=r;break;case"video":case"audio":for(i=0;i<Vf.length;i++)kt(Vf[i],e);i=r;break;case"source":kt("error",e),i=r;break;case"img":case"image":case"link":kt("error",e),kt("load",e),i=r;break;case"details":kt("toggle",e),i=r;break;case"input":cI(e,r),i=z3(e,r),kt("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Zt({},r,{value:void 0}),kt("invalid",e);break;case"textarea":dI(e,r),i=V3(e,r),kt("invalid",e);break;default:i=r}U3(n,i),s=i;for(o in s)if(s.hasOwnProperty(o)){var l=s[o];o==="style"?VB(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&jB(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&qp(e,l):typeof l=="number"&&qp(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Kp.hasOwnProperty(o)?l!=null&&o==="onScroll"&&kt("scroll",e):l!=null&&oC(e,o,l,a))}switch(n){case"input":K1(e),uI(e,r,!1);break;case"textarea":K1(e),fI(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Gs(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?Wu(e,!!r.multiple,o,!1):r.defaultValue!=null&&Wu(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=w0)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return er(t),null;case 6:if(e&&t.stateNode!=null)pF(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(se(166));if(n=Ul(oh.current),Ul(Zo.current),nm(t)){if(r=t.stateNode,n=t.memoizedProps,r[Bo]=t,(o=r.nodeValue!==n)&&(e=ai,e!==null))switch(e.tag){case 3:tm(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&tm(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Bo]=t,t.stateNode=r}return er(t),null;case 13:if(_t(Ut),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Ft&&ei!==null&&(t.mode&1)!==0&&(t.flags&128)===0)O$(),vd(),t.flags|=98560,o=!1;else if(o=nm(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error(se(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(se(317));o[Bo]=t}else vd(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;er(t),o=!1}else so!==null&&(IS(so),so=null),o=!0;if(!o)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Ut.current&1)!==0?Rn===0&&(Rn=3):jC())),t.updateQueue!==null&&(t.flags|=4),er(t),null);case 4:return bd(),yS(e,t),e===null&&th(t.stateNode.containerInfo),er(t),null;case 10:return kC(t.type._context),er(t),null;case 17:return Nr(t.type)&&C0(),er(t),null;case 19:if(_t(Ut),o=t.memoizedState,o===null)return er(t),null;if(r=(t.flags&128)!==0,a=o.rendering,a===null)if(r)If(o,!1);else{if(Rn!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=O0(e),a!==null){for(t.flags|=128,If(o,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,a=o.alternate,a===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=a.childLanes,o.lanes=a.lanes,o.child=a.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=a.memoizedProps,o.memoizedState=a.memoizedState,o.updateQueue=a.updateQueue,o.type=a.type,e=a.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return wt(Ut,Ut.current&1|2),t.child}e=e.sibling}o.tail!==null&&sn()>Sd&&(t.flags|=128,r=!0,If(o,!1),t.lanes=4194304)}else{if(!r)if(e=O0(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),If(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!Ft)return er(t),null}else 2*sn()-o.renderingStartTime>Sd&&n!==1073741824&&(t.flags|=128,r=!0,If(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=sn(),t.sibling=null,n=Ut.current,wt(Ut,r?n&1|2:n&1),t):(er(t),null);case 22:case 23:return zC(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Zr&1073741824)!==0&&(er(t),t.subtreeFlags&6&&(t.flags|=8192)):er(t),null;case 24:return null;case 25:return null}throw Error(se(156,t.tag))}function $de(e,t){switch(xC(t),t.tag){case 1:return Nr(t.type)&&C0(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return bd(),_t(Fr),_t(hr),PC(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return _C(t),null;case 13:if(_t(Ut),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(se(340));vd()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _t(Ut),null;case 4:return bd(),null;case 10:return kC(t.type._context),null;case 22:case 23:return zC(),null;case 24:return null;default:return null}}var om=!1,lr=!1,Fde=typeof WeakSet=="function"?WeakSet:Set,ge=null;function Pu(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){en(e,t,r)}else n.current=null}function bS(e,t,n){try{n()}catch(r){en(e,t,r)}}var tT=!1;function Nde(e,t){if(nS=b0,e=v$(),yC(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(s=a+i),d!==o||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===i&&(s=a),f===o&&++u===r&&(l=a),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(rS={focusedElem:e,selectionRange:n},b0=!1,ge=t;ge!==null;)if(t=ge,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ge=e;else for(;ge!==null;){t=ge;try{var m=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var g=m.memoizedProps,y=m.memoizedState,v=t.stateNode,b=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:no(t.type,g),y);v.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(se(163))}}catch(w){en(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,ge=e;break}ge=t.return}return m=tT,tT=!1,m}function mp(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&bS(t,n,o)}i=i.next}while(i!==r)}}function Uy(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function xS(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function hF(e){var t=e.alternate;t!==null&&(e.alternate=null,hF(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Bo],delete t[rh],delete t[aS],delete t[Sde],delete t[wde])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function mF(e){return e.tag===5||e.tag===3||e.tag===4}function nT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mF(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function SS(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=w0));else if(r!==4&&(e=e.child,e!==null))for(SS(e,t,n),e=e.sibling;e!==null;)SS(e,t,n),e=e.sibling}function wS(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(wS(e,t,n),e=e.sibling;e!==null;)wS(e,t,n),e=e.sibling}var Vn=null,io=!1;function Ja(e,t,n){for(n=n.child;n!==null;)gF(e,t,n),n=n.sibling}function gF(e,t,n){if(Xo&&typeof Xo.onCommitFiberUnmount=="function")try{Xo.onCommitFiberUnmount($y,n)}catch{}switch(n.tag){case 5:lr||Pu(n,t);case 6:var r=Vn,i=io;Vn=null,Ja(e,t,n),Vn=r,io=i,Vn!==null&&(io?(e=Vn,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Vn.removeChild(n.stateNode));break;case 18:Vn!==null&&(io?(e=Vn,n=n.stateNode,e.nodeType===8?Jb(e.parentNode,n):e.nodeType===1&&Jb(e,n),Qp(e)):Jb(Vn,n.stateNode));break;case 4:r=Vn,i=io,Vn=n.stateNode.containerInfo,io=!0,Ja(e,t,n),Vn=r,io=i;break;case 0:case 11:case 14:case 15:if(!lr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&((o&2)!==0||(o&4)!==0)&&bS(n,t,a),i=i.next}while(i!==r)}Ja(e,t,n);break;case 1:if(!lr&&(Pu(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){en(n,t,s)}Ja(e,t,n);break;case 21:Ja(e,t,n);break;case 22:n.mode&1?(lr=(r=lr)||n.memoizedState!==null,Ja(e,t,n),lr=r):Ja(e,t,n);break;default:Ja(e,t,n)}}function rT(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Fde),t.forEach(function(r){var i=qde.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Zi(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,a=t,s=a;e:for(;s!==null;){switch(s.tag){case 5:Vn=s.stateNode,io=!1;break e;case 3:Vn=s.stateNode.containerInfo,io=!0;break e;case 4:Vn=s.stateNode.containerInfo,io=!0;break e}s=s.return}if(Vn===null)throw Error(se(160));gF(o,a,i),Vn=null,io=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){en(i,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)vF(t,e),t=t.sibling}function vF(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Zi(t,e),To(e),r&4){try{mp(3,e,e.return),Uy(3,e)}catch(g){en(e,e.return,g)}try{mp(5,e,e.return)}catch(g){en(e,e.return,g)}}break;case 1:Zi(t,e),To(e),r&512&&n!==null&&Pu(n,n.return);break;case 5:if(Zi(t,e),To(e),r&512&&n!==null&&Pu(n,n.return),e.flags&32){var i=e.stateNode;try{qp(i,"")}catch(g){en(e,e.return,g)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,a=n!==null?n.memoizedProps:o,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&o.type==="radio"&&o.name!=null&&FB(i,o),G3(s,a);var c=G3(s,o);for(a=0;a<l.length;a+=2){var u=l[a],d=l[a+1];u==="style"?VB(i,d):u==="dangerouslySetInnerHTML"?jB(i,d):u==="children"?qp(i,d):oC(i,u,d,c)}switch(s){case"input":j3(i,o);break;case"textarea":NB(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;p!=null?Wu(i,!!o.multiple,p,!1):f!==!!o.multiple&&(o.defaultValue!=null?Wu(i,!!o.multiple,o.defaultValue,!0):Wu(i,!!o.multiple,o.multiple?[]:"",!1))}i[rh]=o}catch(g){en(e,e.return,g)}}break;case 6:if(Zi(t,e),To(e),r&4){if(e.stateNode===null)throw Error(se(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(g){en(e,e.return,g)}}break;case 3:if(Zi(t,e),To(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Qp(t.containerInfo)}catch(g){en(e,e.return,g)}break;case 4:Zi(t,e),To(e);break;case 13:Zi(t,e),To(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(FC=sn())),r&4&&rT(e);break;case 22:if(u=n!==null&&n.memoizedState!==null,e.mode&1?(lr=(c=lr)||u,Zi(t,e),lr=c):Zi(t,e),To(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!u&&(e.mode&1)!==0)for(ge=e,u=e.child;u!==null;){for(d=ge=u;ge!==null;){switch(f=ge,p=f.child,f.tag){case 0:case 11:case 14:case 15:mp(4,f,f.return);break;case 1:Pu(f,f.return);var m=f.stateNode;if(typeof m.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(g){en(r,n,g)}}break;case 5:Pu(f,f.return);break;case 22:if(f.memoizedState!==null){oT(d);continue}}p!==null?(p.return=f,ge=p):oT(d)}u=u.sibling}e:for(u=null,d=e;;){if(d.tag===5){if(u===null){u=d;try{i=d.stateNode,c?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(s=d.stateNode,l=d.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=HB("display",a))}catch(g){en(e,e.return,g)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(g){en(e,e.return,g)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Zi(t,e),To(e),r&4&&rT(e);break;case 21:break;default:Zi(t,e),To(e)}}function To(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(mF(n)){var r=n;break e}n=n.return}throw Error(se(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(qp(i,""),r.flags&=-33);var o=nT(e);wS(e,o,i);break;case 3:case 4:var a=r.stateNode.containerInfo,s=nT(e);SS(e,s,a);break;default:throw Error(se(161))}}catch(l){en(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function zde(e,t,n){ge=e,yF(e)}function yF(e,t,n){for(var r=(e.mode&1)!==0;ge!==null;){var i=ge,o=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||om;if(!a){var s=i.alternate,l=s!==null&&s.memoizedState!==null||lr;s=om;var c=lr;if(om=a,(lr=l)&&!c)for(ge=i;ge!==null;)a=ge,l=a.child,a.tag===22&&a.memoizedState!==null?aT(i):l!==null?(l.return=a,ge=l):aT(i);for(;o!==null;)ge=o,yF(o),o=o.sibling;ge=i,om=s,lr=c}iT(e)}else(i.subtreeFlags&8772)!==0&&o!==null?(o.return=i,ge=o):iT(e)}}function iT(e){for(;ge!==null;){var t=ge;if((t.flags&8772)!==0){var n=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:lr||Uy(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!lr)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:no(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&jI(t,o,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}jI(t,a,n)}break;case 5:var s=t.stateNode;if(n===null&&t.flags&4){n=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&Qp(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(se(163))}lr||t.flags&512&&xS(t)}catch(f){en(t,t.return,f)}}if(t===e){ge=null;break}if(n=t.sibling,n!==null){n.return=t.return,ge=n;break}ge=t.return}}function oT(e){for(;ge!==null;){var t=ge;if(t===e){ge=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ge=n;break}ge=t.return}}function aT(e){for(;ge!==null;){var t=ge;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Uy(4,t)}catch(l){en(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){en(t,i,l)}}var o=t.return;try{xS(t)}catch(l){en(t,o,l)}break;case 5:var a=t.return;try{xS(t)}catch(l){en(t,a,l)}}}catch(l){en(t,t.return,l)}if(t===e){ge=null;break}var s=t.sibling;if(s!==null){s.return=t.return,ge=s;break}ge=t.return}}var jde=Math.ceil,D0=Ua.ReactCurrentDispatcher,BC=Ua.ReactCurrentOwner,Ai=Ua.ReactCurrentBatchConfig,Ze=0,Nn=null,Cn=null,Xn=0,Zr=0,Ou=ol(0),Rn=0,ch=null,pc=0,Gy=0,$C=0,gp=null,Br=null,FC=0,Sd=1/0,va=null,A0=!1,CS=null,Bs=null,am=!1,ks=null,L0=0,vp=0,kS=null,gg=-1,vg=0;function Er(){return(Ze&6)!==0?sn():gg!==-1?gg:gg=sn()}function $s(e){return(e.mode&1)===0?1:(Ze&2)!==0&&Xn!==0?Xn&-Xn:kde.transition!==null?(vg===0&&(vg=t$()),vg):(e=ut,e!==0||(e=window.event,e=e===void 0?16:l$(e.type)),e)}function ho(e,t,n,r){if(50<vp)throw vp=0,kS=null,Error(se(185));Kh(e,n,r),((Ze&2)===0||e!==Nn)&&(e===Nn&&((Ze&2)===0&&(Gy|=n),Rn===4&&hs(e,Xn)),zr(e,r),n===1&&Ze===0&&(t.mode&1)===0&&(Sd=sn()+500,Hy&&al()))}function zr(e,t){var n=e.callbackNode;kue(e,t);var r=y0(e,e===Nn?Xn:0);if(r===0)n!==null&&mI(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&mI(n),t===1)e.tag===0?Cde(sT.bind(null,e)):T$(sT.bind(null,e)),bde(function(){(Ze&6)===0&&al()}),n=null;else{switch(n$(r)){case 1:n=uC;break;case 4:n=JB;break;case 16:n=v0;break;case 536870912:n=e$;break;default:n=v0}n=IF(n,bF.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function bF(e,t){if(gg=-1,vg=0,(Ze&6)!==0)throw Error(se(327));var n=e.callbackNode;if(Yu()&&e.callbackNode!==n)return null;var r=y0(e,e===Nn?Xn:0);if(r===0)return null;if((r&30)!==0||(r&e.expiredLanes)!==0||t)t=B0(e,r);else{t=r;var i=Ze;Ze|=2;var o=SF();(Nn!==e||Xn!==t)&&(va=null,Sd=sn()+500,Ql(e,t));do try{Wde();break}catch(s){xF(e,s)}while(1);CC(),D0.current=o,Ze=i,Cn!==null?t=0:(Nn=null,Xn=0,t=Rn)}if(t!==0){if(t===2&&(i=Z3(e),i!==0&&(r=i,t=ES(e,i))),t===1)throw n=ch,Ql(e,0),hs(e,r),zr(e,sn()),n;if(t===6)hs(e,r);else{if(i=e.current.alternate,(r&30)===0&&!Hde(i)&&(t=B0(e,r),t===2&&(o=Z3(e),o!==0&&(r=o,t=ES(e,o))),t===1))throw n=ch,Ql(e,0),hs(e,r),zr(e,sn()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(se(345));case 2:Il(e,Br,va);break;case 3:if(hs(e,r),(r&130023424)===r&&(t=FC+500-sn(),10<t)){if(y0(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){Er(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=oS(Il.bind(null,e,Br,va),t);break}Il(e,Br,va);break;case 4:if(hs(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-po(r);o=1<<a,a=t[a],a>i&&(i=a),r&=~o}if(r=i,r=sn()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*jde(r/1960))-r,10<r){e.timeoutHandle=oS(Il.bind(null,e,Br,va),r);break}Il(e,Br,va);break;case 5:Il(e,Br,va);break;default:throw Error(se(329))}}}return zr(e,sn()),e.callbackNode===n?bF.bind(null,e):null}function ES(e,t){var n=gp;return e.current.memoizedState.isDehydrated&&(Ql(e,t).flags|=256),e=B0(e,t),e!==2&&(t=Br,Br=n,t!==null&&IS(t)),e}function IS(e){Br===null?Br=e:Br.push.apply(Br,e)}function Hde(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!yo(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function hs(e,t){for(t&=~$C,t&=~Gy,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-po(t),r=1<<n;e[n]=-1,t&=~r}}function sT(e){if((Ze&6)!==0)throw Error(se(327));Yu();var t=y0(e,0);if((t&1)===0)return zr(e,sn()),null;var n=B0(e,t);if(e.tag!==0&&n===2){var r=Z3(e);r!==0&&(t=r,n=ES(e,r))}if(n===1)throw n=ch,Ql(e,0),hs(e,t),zr(e,sn()),n;if(n===6)throw Error(se(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Il(e,Br,va),zr(e,sn()),null}function NC(e,t){var n=Ze;Ze|=1;try{return e(t)}finally{Ze=n,Ze===0&&(Sd=sn()+500,Hy&&al())}}function hc(e){ks!==null&&ks.tag===0&&(Ze&6)===0&&Yu();var t=Ze;Ze|=1;var n=Ai.transition,r=ut;try{if(Ai.transition=null,ut=1,e)return e()}finally{ut=r,Ai.transition=n,Ze=t,(Ze&6)===0&&al()}}function zC(){Zr=Ou.current,_t(Ou)}function Ql(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,yde(n)),Cn!==null)for(n=Cn.return;n!==null;){var r=n;switch(xC(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&C0();break;case 3:bd(),_t(Fr),_t(hr),PC();break;case 5:_C(r);break;case 4:bd();break;case 13:_t(Ut);break;case 19:_t(Ut);break;case 10:kC(r.type._context);break;case 22:case 23:zC()}n=n.return}if(Nn=e,Cn=e=Fs(e.current,null),Xn=Zr=t,Rn=0,ch=null,$C=Gy=pc=0,Br=gp=null,Wl!==null){for(t=0;t<Wl.length;t++)if(n=Wl[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var a=o.next;o.next=i,r.next=a}n.pending=r}Wl=null}return e}function xF(e,t){do{var n=Cn;try{if(CC(),pg.current=R0,M0){for(var r=Xt.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}M0=!1}if(fc=0,$n=Pn=Xt=null,hp=!1,ah=0,BC.current=null,n===null||n.return===null){Rn=1,ch=t,Cn=null;break}e:{var o=e,a=n.return,s=n,l=t;if(t=Xn,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=s,d=u.tag;if((u.mode&1)===0&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var p=qI(a);if(p!==null){p.flags&=-257,YI(p,a,s,o,t),p.mode&1&&KI(o,c,t),t=p,l=c;var m=t.updateQueue;if(m===null){var g=new Set;g.add(l),t.updateQueue=g}else m.add(l);break e}else{if((t&1)===0){KI(o,c,t),jC();break e}l=Error(se(426))}}else if(Ft&&s.mode&1){var y=qI(a);if(y!==null){(y.flags&65536)===0&&(y.flags|=256),YI(y,a,s,o,t),SC(xd(l,s));break e}}o=l=xd(l,s),Rn!==4&&(Rn=2),gp===null?gp=[o]:gp.push(o),o=a;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=rF(o,l,t);zI(o,v);break e;case 1:s=l;var b=o.type,x=o.stateNode;if((o.flags&128)===0&&(typeof b.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Bs===null||!Bs.has(x)))){o.flags|=65536,t&=-t,o.lanes|=t;var w=iF(o,s,t);zI(o,w);break e}}o=o.return}while(o!==null)}CF(n)}catch(E){t=E,Cn===n&&n!==null&&(Cn=n=n.return);continue}break}while(1)}function SF(){var e=D0.current;return D0.current=R0,e===null?R0:e}function jC(){(Rn===0||Rn===3||Rn===2)&&(Rn=4),Nn===null||(pc&268435455)===0&&(Gy&268435455)===0||hs(Nn,Xn)}function B0(e,t){var n=Ze;Ze|=2;var r=SF();(Nn!==e||Xn!==t)&&(va=null,Ql(e,t));do try{Vde();break}catch(i){xF(e,i)}while(1);if(CC(),Ze=n,D0.current=r,Cn!==null)throw Error(se(261));return Nn=null,Xn=0,Rn}function Vde(){for(;Cn!==null;)wF(Cn)}function Wde(){for(;Cn!==null&&!mue();)wF(Cn)}function wF(e){var t=EF(e.alternate,e,Zr);e.memoizedProps=e.pendingProps,t===null?CF(e):Cn=t,BC.current=null}function CF(e){var t=e;do{var n=t.alternate;if(e=t.return,(t.flags&32768)===0){if(n=Bde(n,t,Zr),n!==null){Cn=n;return}}else{if(n=$de(n,t),n!==null){n.flags&=32767,Cn=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Rn=6,Cn=null;return}}if(t=t.sibling,t!==null){Cn=t;return}Cn=t=e}while(t!==null);Rn===0&&(Rn=5)}function Il(e,t,n){var r=ut,i=Ai.transition;try{Ai.transition=null,ut=1,Ude(e,t,n,r)}finally{Ai.transition=i,ut=r}return null}function Ude(e,t,n,r){do Yu();while(ks!==null);if((Ze&6)!==0)throw Error(se(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(se(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(Eue(e,o),e===Nn&&(Cn=Nn=null,Xn=0),(n.subtreeFlags&2064)===0&&(n.flags&2064)===0||am||(am=!0,IF(v0,function(){return Yu(),null})),o=(n.flags&15990)!==0,(n.subtreeFlags&15990)!==0||o){o=Ai.transition,Ai.transition=null;var a=ut;ut=1;var s=Ze;Ze|=4,BC.current=null,Nde(e,n),vF(n,e),dde(rS),b0=!!nS,rS=nS=null,e.current=n,zde(n),gue(),Ze=s,ut=a,Ai.transition=o}else e.current=n;if(am&&(am=!1,ks=e,L0=i),o=e.pendingLanes,o===0&&(Bs=null),bue(n.stateNode),zr(e,sn()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(A0)throw A0=!1,e=CS,CS=null,e;return(L0&1)!==0&&e.tag!==0&&Yu(),o=e.pendingLanes,(o&1)!==0?e===kS?vp++:(vp=0,kS=e):vp=0,al(),null}function Yu(){if(ks!==null){var e=n$(L0),t=Ai.transition,n=ut;try{if(Ai.transition=null,ut=16>e?16:e,ks===null)var r=!1;else{if(e=ks,ks=null,L0=0,(Ze&6)!==0)throw Error(se(331));var i=Ze;for(Ze|=4,ge=e.current;ge!==null;){var o=ge,a=o.child;if((ge.flags&16)!==0){var s=o.deletions;if(s!==null){for(var l=0;l<s.length;l++){var c=s[l];for(ge=c;ge!==null;){var u=ge;switch(u.tag){case 0:case 11:case 15:mp(8,u,o)}var d=u.child;if(d!==null)d.return=u,ge=d;else for(;ge!==null;){u=ge;var f=u.sibling,p=u.return;if(hF(u),u===c){ge=null;break}if(f!==null){f.return=p,ge=f;break}ge=p}}}var m=o.alternate;if(m!==null){var g=m.child;if(g!==null){m.child=null;do{var y=g.sibling;g.sibling=null,g=y}while(g!==null)}}ge=o}}if((o.subtreeFlags&2064)!==0&&a!==null)a.return=o,ge=a;else e:for(;ge!==null;){if(o=ge,(o.flags&2048)!==0)switch(o.tag){case 0:case 11:case 15:mp(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,ge=v;break e}ge=o.return}}var b=e.current;for(ge=b;ge!==null;){a=ge;var x=a.child;if((a.subtreeFlags&2064)!==0&&x!==null)x.return=a,ge=x;else e:for(a=b;ge!==null;){if(s=ge,(s.flags&2048)!==0)try{switch(s.tag){case 0:case 11:case 15:Uy(9,s)}}catch(E){en(s,s.return,E)}if(s===a){ge=null;break e}var w=s.sibling;if(w!==null){w.return=s.return,ge=w;break e}ge=s.return}}if(Ze=i,al(),Xo&&typeof Xo.onPostCommitFiberRoot=="function")try{Xo.onPostCommitFiberRoot($y,e)}catch{}r=!0}return r}finally{ut=n,Ai.transition=t}}return!1}function lT(e,t,n){t=xd(n,t),t=rF(e,t,1),e=Ls(e,t,1),t=Er(),e!==null&&(Kh(e,1,t),zr(e,t))}function en(e,t,n){if(e.tag===3)lT(e,e,n);else for(;t!==null;){if(t.tag===3){lT(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Bs===null||!Bs.has(r))){e=xd(n,e),e=iF(t,e,1),t=Ls(t,e,1),e=Er(),t!==null&&(Kh(t,1,e),zr(t,e));break}}t=t.return}}function Gde(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Er(),e.pingedLanes|=e.suspendedLanes&n,Nn===e&&(Xn&n)===n&&(Rn===4||Rn===3&&(Xn&130023424)===Xn&&500>sn()-FC?Ql(e,0):$C|=n),zr(e,t)}function kF(e,t){t===0&&((e.mode&1)===0?t=1:(t=X1,X1<<=1,(X1&130023424)===0&&(X1=4194304)));var n=Er();e=Aa(e,t),e!==null&&(Kh(e,t,n),zr(e,n))}function Kde(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),kF(e,n)}function qde(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(se(314))}r!==null&&r.delete(t),kF(e,n)}var EF;EF=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Fr.current)$r=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return $r=!1,Lde(e,t,n);$r=(e.flags&131072)!==0}else $r=!1,Ft&&(t.flags&1048576)!==0&&_$(t,I0,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;mg(e,t),e=t.pendingProps;var i=gd(t,hr.current);qu(t,n),i=MC(null,t,r,e,i,n);var o=RC();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Nr(r)?(o=!0,k0(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,IC(t),i.updater=Vy,t.stateNode=i,i._reactInternals=t,fS(t,r,e,n),t=mS(null,t,r,!0,o,n)):(t.tag=0,Ft&&o&&bC(t),br(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(mg(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Xde(r),e=no(r,e),i){case 0:t=hS(null,t,r,e,n);break e;case 1:t=QI(null,t,r,e,n);break e;case 11:t=XI(null,t,r,e,n);break e;case 14:t=ZI(null,t,r,no(r.type,e),n);break e}throw Error(se(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:no(r,i),hS(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:no(r,i),QI(e,t,r,i,n);case 3:e:{if(lF(t),e===null)throw Error(se(387));r=t.pendingProps,o=t.memoizedState,i=o.element,R$(e,t),P0(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=xd(Error(se(423)),t),t=JI(e,t,r,n,i);break e}else if(r!==i){i=xd(Error(se(424)),t),t=JI(e,t,r,n,i);break e}else for(ei=As(t.stateNode.containerInfo.firstChild),ai=t,Ft=!0,so=null,n=B$(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(vd(),r===i){t=La(e,t,n);break e}br(e,t,r,n)}t=t.child}return t;case 5:return $$(t),e===null&&cS(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,iS(r,i)?a=null:o!==null&&iS(r,o)&&(t.flags|=32),sF(e,t),br(e,t,a,n),t.child;case 6:return e===null&&cS(t),null;case 13:return cF(e,t,n);case 4:return TC(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=yd(t,null,r,n):br(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:no(r,i),XI(e,t,r,i,n);case 7:return br(e,t,t.pendingProps,n),t.child;case 8:return br(e,t,t.pendingProps.children,n),t.child;case 12:return br(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,wt(T0,r._currentValue),r._currentValue=a,o!==null)if(yo(o.value,a)){if(o.children===i.children&&!Fr.current){t=La(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=_a(-1,n&-n),l.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),uS(o.return,n,t),s.lanes|=n;break}l=l.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(se(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),uS(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}br(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,qu(t,n),i=$i(i),r=r(i),t.flags|=1,br(e,t,r,n),t.child;case 14:return r=t.type,i=no(r,t.pendingProps),i=no(r.type,i),ZI(e,t,r,i,n);case 15:return oF(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:no(r,i),mg(e,t),t.tag=1,Nr(r)?(e=!0,k0(t)):e=!1,qu(t,n),A$(t,r,i),fS(t,r,i,n),mS(null,t,r,!0,e,n);case 19:return uF(e,t,n);case 22:return aF(e,t,n)}throw Error(se(156,t.tag))};function IF(e,t){return QB(e,t)}function Yde(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Mi(e,t,n,r){return new Yde(e,t,n,r)}function HC(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xde(e){if(typeof e=="function")return HC(e)?1:0;if(e!=null){if(e=e.$$typeof,e===sC)return 11;if(e===lC)return 14}return 2}function Fs(e,t){var n=e.alternate;return n===null?(n=Mi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function yg(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")HC(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case xu:return Jl(n.children,i,o,t);case aC:a=8,i|=8;break;case B3:return e=Mi(12,n,t,i|2),e.elementType=B3,e.lanes=o,e;case $3:return e=Mi(13,n,t,i),e.elementType=$3,e.lanes=o,e;case F3:return e=Mi(19,n,t,i),e.elementType=F3,e.lanes=o,e;case LB:return Ky(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case DB:a=10;break e;case AB:a=9;break e;case sC:a=11;break e;case lC:a=14;break e;case ls:a=16,r=null;break e}throw Error(se(130,e==null?e:typeof e,""))}return t=Mi(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Jl(e,t,n,r){return e=Mi(7,e,r,t),e.lanes=n,e}function Ky(e,t,n,r){return e=Mi(22,e,r,t),e.elementType=LB,e.lanes=n,e.stateNode={isHidden:!1},e}function s5(e,t,n){return e=Mi(6,e,null,t),e.lanes=n,e}function l5(e,t,n){return t=Mi(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Zde(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hb(0),this.expirationTimes=Hb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hb(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function VC(e,t,n,r,i,o,a,s,l){return e=new Zde(e,t,n,s,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Mi(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},IC(o),e}function Qde(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:bu,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function TF(e){if(!e)return Ks;e=e._reactInternals;e:{if(Ec(e)!==e||e.tag!==1)throw Error(se(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Nr(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(se(171))}if(e.tag===1){var n=e.type;if(Nr(n))return I$(e,n,t)}return t}function _F(e,t,n,r,i,o,a,s,l){return e=VC(n,r,!0,e,i,o,a,s,l),e.context=TF(null),n=e.current,r=Er(),i=$s(n),o=_a(r,i),o.callback=t!=null?t:null,Ls(n,o,i),e.current.lanes=i,Kh(e,i,r),zr(e,r),e}function qy(e,t,n,r){var i=t.current,o=Er(),a=$s(i);return n=TF(n),t.context===null?t.context=n:t.pendingContext=n,t=_a(o,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Ls(i,t,a),e!==null&&(ho(e,i,a,o),fg(e,i,a)),a}function $0(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function cT(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function WC(e,t){cT(e,t),(e=e.alternate)&&cT(e,t)}function Jde(){return null}var PF=typeof reportError=="function"?reportError:function(e){console.error(e)};function UC(e){this._internalRoot=e}Yy.prototype.render=UC.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(se(409));qy(e,t,null,null)};Yy.prototype.unmount=UC.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hc(function(){qy(null,e,null,null)}),t[Da]=null}};function Yy(e){this._internalRoot=e}Yy.prototype.unstable_scheduleHydration=function(e){if(e){var t=o$();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ps.length&&t!==0&&t<ps[n].priority;n++);ps.splice(n,0,e),n===0&&s$(e)}};function GC(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Xy(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function uT(){}function efe(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var c=$0(a);o.call(c)}}var a=_F(t,r,e,0,null,!1,!1,"",uT);return e._reactRootContainer=a,e[Da]=a.current,th(e.nodeType===8?e.parentNode:e),hc(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var s=r;r=function(){var c=$0(l);s.call(c)}}var l=VC(e,0,!1,null,null,!1,!1,"",uT);return e._reactRootContainer=l,e[Da]=l.current,th(e.nodeType===8?e.parentNode:e),hc(function(){qy(t,l,n,r)}),l}function Zy(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if(typeof i=="function"){var s=i;i=function(){var l=$0(a);s.call(l)}}qy(t,a,e,i)}else a=efe(n,t,e,i,r);return $0(a)}r$=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Hf(t.pendingLanes);n!==0&&(dC(t,n|1),zr(t,sn()),(Ze&6)===0&&(Sd=sn()+500,al()))}break;case 13:hc(function(){var r=Aa(e,1);if(r!==null){var i=Er();ho(r,e,1,i)}}),WC(e,1)}};fC=function(e){if(e.tag===13){var t=Aa(e,134217728);if(t!==null){var n=Er();ho(t,e,134217728,n)}WC(e,134217728)}};i$=function(e){if(e.tag===13){var t=$s(e),n=Aa(e,t);if(n!==null){var r=Er();ho(n,e,t,r)}WC(e,t)}};o$=function(){return ut};a$=function(e,t){var n=ut;try{return ut=e,t()}finally{ut=n}};q3=function(e,t,n){switch(t){case"input":if(j3(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=jy(r);if(!i)throw Error(se(90));$B(r),j3(r,i)}}}break;case"textarea":NB(e,n);break;case"select":t=n.value,t!=null&&Wu(e,!!n.multiple,t,!1)}};GB=NC;KB=hc;var tfe={usingClientEntryPoint:!1,Events:[Yh,ku,jy,WB,UB,NC]},Tf={findFiberByHostInstance:Vl,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},nfe={bundleType:Tf.bundleType,version:Tf.version,rendererPackageName:Tf.rendererPackageName,rendererConfig:Tf.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ua.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=XB(e),e===null?null:e.stateNode},findFiberByHostInstance:Tf.findFiberByHostInstance||Jde,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var sm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sm.isDisabled&&sm.supportsFiber)try{$y=sm.inject(nfe),Xo=sm}catch{}}pi.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tfe;pi.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!GC(t))throw Error(se(200));return Qde(e,t,null,n)};pi.createRoot=function(e,t){if(!GC(e))throw Error(se(299));var n=!1,r="",i=PF;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=VC(e,1,!1,null,null,n,!1,r,i),e[Da]=t.current,th(e.nodeType===8?e.parentNode:e),new UC(t)};pi.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(se(188)):(e=Object.keys(e).join(","),Error(se(268,e)));return e=XB(t),e=e===null?null:e.stateNode,e};pi.flushSync=function(e){return hc(e)};pi.hydrate=function(e,t,n){if(!Xy(t))throw Error(se(200));return Zy(null,e,t,!0,n)};pi.hydrateRoot=function(e,t,n){if(!GC(e))throw Error(se(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",a=PF;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=_F(t,null,e,1,n!=null?n:null,i,!1,o,a),e[Da]=t.current,th(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Yy(t)};pi.render=function(e,t,n){if(!Xy(t))throw Error(se(200));return Zy(null,e,t,!1,n)};pi.unmountComponentAtNode=function(e){if(!Xy(e))throw Error(se(40));return e._reactRootContainer?(hc(function(){Zy(null,null,e,!1,function(){e._reactRootContainer=null,e[Da]=null})}),!0):!1};pi.unstable_batchedUpdates=NC;pi.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Xy(n))throw Error(se(200));if(e==null||e._reactInternals===void 0)throw Error(se(38));return Zy(e,t,n,!1,r)};pi.version="18.2.0-next-9e3b772b8-20220608";function OF(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(OF)}catch(e){console.error(e)}}OF(),rl.exports=pi;var MF=rl.exports,[rfe,ife]=En({strict:!1,name:"PortalManagerContext"});function RF(e){const{children:t,zIndex:n}=e;return A.createElement(rfe,{value:{zIndex:n}},t)}RF.displayName="PortalManager";var[DF,ofe]=En({strict:!1,name:"PortalContext"}),KC="chakra-portal",afe=".chakra-portal",sfe=e=>A.createElement("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0}},e.children),lfe=e=>{const{appendToParentPortal:t,children:n}=e,[r,i]=h.exports.useState(null),o=h.exports.useRef(null),[,a]=h.exports.useState({});h.exports.useEffect(()=>a({}),[]);const s=ofe(),l=ife();Bp(()=>{if(!r)return;const u=r.ownerDocument,d=t&&s!=null?s:u.body;if(!d)return;o.current=u.createElement("div"),o.current.className=KC,d.appendChild(o.current),a({});const f=o.current;return()=>{d.contains(f)&&d.removeChild(f)}},[r]);const c=l!=null&&l.zIndex?A.createElement(sfe,{zIndex:l==null?void 0:l.zIndex},n):n;return o.current?rl.exports.createPortal(A.createElement(DF,{value:o.current},c),o.current):A.createElement("span",{ref:u=>{u&&i(u)}})},cfe=e=>{const{children:t,containerRef:n,appendToParentPortal:r}=e,i=n.current,o=i!=null?i:typeof window!="undefined"?document.body:void 0,a=h.exports.useMemo(()=>{const l=i==null?void 0:i.ownerDocument.createElement("div");return l&&(l.className=KC),l},[i]),[,s]=h.exports.useState({});return Bp(()=>s({}),[]),Bp(()=>{if(!(!a||!o))return o.appendChild(a),()=>{o.removeChild(a)}},[a,o]),o&&a?rl.exports.createPortal(A.createElement(DF,{value:r?a:null},t),a):null};function Kd(e){const{containerRef:t,...n}=e;return t?A.createElement(cfe,{containerRef:t,...n}):A.createElement(lfe,{...n})}Kd.defaultProps={appendToParentPortal:!0};Kd.className=KC;Kd.selector=afe;Kd.displayName="Portal";var ufe=function(e){if(typeof document=="undefined")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Uc=new WeakMap,lm=new WeakMap,cm={},c5=0,AF=function(e){return e&&(e.host||AF(e.parentNode))},dfe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=AF(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return Boolean(n)})},ffe=function(e,t,n,r){var i=dfe(t,Array.isArray(e)?e:[e]);cm[n]||(cm[n]=new WeakMap);var o=cm[n],a=[],s=new Set,l=new Set(i),c=function(d){!d||s.has(d)||(s.add(d),c(d.parentNode))};i.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(s.has(f))u(f);else{var p=f.getAttribute(r),m=p!==null&&p!=="false",g=(Uc.get(f)||0)+1,y=(o.get(f)||0)+1;Uc.set(f,g),o.set(f,y),a.push(f),g===1&&m&&lm.set(f,!0),y===1&&f.setAttribute(n,"true"),m||f.setAttribute(r,"true")}})};return u(t),s.clear(),c5++,function(){a.forEach(function(d){var f=Uc.get(d)-1,p=o.get(d)-1;Uc.set(d,f),o.set(d,p),f||(lm.has(d)||d.removeAttribute(r),lm.delete(d)),p||d.removeAttribute(n)}),c5--,c5||(Uc=new WeakMap,Uc=new WeakMap,lm=new WeakMap,cm={})}},qC=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||ufe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),ffe(r,i,n,"aria-hidden")):function(){return null}},YC={exports:{}},pfe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",hfe=pfe,mfe=hfe;function LF(){}function BF(){}BF.resetWarningCache=LF;var gfe=function(){function e(r,i,o,a,s,l){if(l!==mfe){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:BF,resetWarningCache:LF};return n.PropTypes=n,n};YC.exports=gfe();var ze=YC.exports,TS="data-focus-lock",$F="data-focus-lock-disabled",vfe="data-no-focus-lock",yfe="data-autofocus-inside",bfe="data-no-autofocus";function xfe(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Sfe(e,t){var n=h.exports.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}function FF(e,t){return Sfe(t||null,function(n){return e.forEach(function(r){return xfe(r,n)})})}var u5={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"};function NF(e){return e}function zF(e,t){t===void 0&&(t=NF);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var u=a;a=[],u.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){a.push(u),c()},filter:function(u){return a=a.filter(u),n}}}};return i}function XC(e,t){return t===void 0&&(t=NF),zF(e,t)}function jF(e){e===void 0&&(e={});var t=zF(null);return t.options=Lo({async:!0,ssr:!1},e),t}var HF=function(e){var t=e.sideCar,n=FL(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return h.exports.createElement(r,Lo({},n))};HF.isSideCarExport=!0;function wfe(e,t){return e.useMedium(t),HF}var VF=XC({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),WF=XC(),Cfe=XC(),kfe=jF({async:!0}),Efe=[],ZC=h.exports.forwardRef(function(t,n){var r,i=h.exports.useState(),o=i[0],a=i[1],s=h.exports.useRef(),l=h.exports.useRef(!1),c=h.exports.useRef(null),u=t.children,d=t.disabled,f=t.noFocusGuards,p=t.persistentFocus,m=t.crossFrame,g=t.autoFocus;t.allowTextSelection;var y=t.group,v=t.className,b=t.whiteList,x=t.hasPositiveIndices,w=t.shards,E=w===void 0?Efe:w,C=t.as,I=C===void 0?"div":C,T=t.lockProps,_=T===void 0?{}:T,P=t.sideCar,M=t.returnFocus,D=t.focusOptions,V=t.onActivation,B=t.onDeactivation,L=h.exports.useState({}),G=L[0],z=h.exports.useCallback(function(){c.current=c.current||document&&document.activeElement,s.current&&V&&V(s.current),l.current=!0},[V]),j=h.exports.useCallback(function(){l.current=!1,B&&B(s.current)},[B]);h.exports.useEffect(function(){d||(c.current=null)},[]);var F=h.exports.useCallback(function(ie){var ae=c.current;if(ae&&ae.focus){var le=typeof M=="function"?M(ae):M;if(le){var he=typeof le=="object"?le:void 0;c.current=null,ie?Promise.resolve().then(function(){return ae.focus(he)}):ae.focus(he)}}},[M]),H=h.exports.useCallback(function(ie){l.current&&VF.useMedium(ie)},[]),R=WF.useMedium,W=h.exports.useCallback(function(ie){s.current!==ie&&(s.current=ie,a(ie))},[]),X=J((r={},r[$F]=d&&"disabled",r[TS]=y,r),_),te=f!==!0,re=te&&f!=="tail",ne=FF([n,W]);return h.exports.createElement(h.exports.Fragment,null,te&&[h.exports.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:d?-1:0,style:u5}),x?h.exports.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:d?-1:1,style:u5}):null],!d&&h.exports.createElement(P,{id:G,sideCar:kfe,observed:o,disabled:d,persistentFocus:p,crossFrame:m,autoFocus:g,whiteList:b,shards:E,onActivation:z,onDeactivation:j,returnFocus:F,focusOptions:D}),h.exports.createElement(I,J({ref:ne},X,{className:v,onBlur:R,onFocus:H}),u),re&&h.exports.createElement("div",{"data-focus-guard":!0,tabIndex:d?-1:0,style:u5}))});ZC.propTypes={};ZC.defaultProps={children:void 0,disabled:!1,returnFocus:!1,focusOptions:void 0,noFocusGuards:!1,autoFocus:!0,persistentFocus:!1,crossFrame:!0,hasPositiveIndices:void 0,allowTextSelection:void 0,group:void 0,className:void 0,whiteList:void 0,shards:void 0,as:"div",lockProps:{},onActivation:void 0,onDeactivation:void 0};var UF=ZC;function Ife(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ng(e,t)}function Tfe(e,t){function n(r){return r.displayName||r.name||"Component"}return function(i){var o=[],a;function s(){a=e(o.map(function(c){return c.props})),t(a)}var l=function(c){Ife(u,c);function u(){return c.apply(this,arguments)||this}u.peek=function(){return a};var d=u.prototype;return d.componentDidMount=function(){o.push(this),s()},d.componentDidUpdate=function(){s()},d.componentWillUnmount=function(){var p=o.indexOf(this);o.splice(p,1),s()},d.render=function(){return k(i,{...this.props})},u}(h.exports.PureComponent);return ur(l,"displayName","SideEffect("+n(i)+")"),l}}var sa=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},_S=function(e){return Array.isArray(e)?e:[e]},_fe=function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!t||!t.getPropertyValue?!1:t.getPropertyValue("display")==="none"||t.getPropertyValue("visibility")==="hidden"},GF=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},KF=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},Pfe=function(e,t){return!e||KF(e)||!_fe(e)&&t(GF(e))},qF=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=Pfe(t,qF.bind(void 0,e));return e.set(t,r),r},Ofe=function(e,t){return e&&!KF(e)?Dfe(e)?t(GF(e)):!1:!0},YF=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=Ofe(t,YF.bind(void 0,e));return e.set(t,r),r},XF=function(e){return e.dataset},Mfe=function(e){return e.tagName==="BUTTON"},ZF=function(e){return e.tagName==="INPUT"},QF=function(e){return ZF(e)&&e.type==="radio"},Rfe=function(e){return!((ZF(e)||Mfe(e))&&(e.type==="hidden"||e.disabled))},Dfe=function(e){var t=e.getAttribute(bfe);return![!0,"true",""].includes(t)},QC=function(e){var t;return Boolean(e&&((t=XF(e))===null||t===void 0?void 0:t.focusGuard))},F0=function(e){return!QC(e)},Afe=function(e){return Boolean(e)},Lfe=function(e,t){var n=e.tabIndex-t.tabIndex,r=e.index-t.index;if(n){if(!e.tabIndex)return 1;if(!t.tabIndex)return-1}return n||r},JF=function(e,t,n){return sa(e).map(function(r,i){return{node:r,index:i,tabIndex:n&&r.tabIndex===-1?(r.dataset||{}).focusGuard?0:-1:r.tabIndex}}).filter(function(r){return!t||r.tabIndex>=0}).sort(Lfe)},Bfe=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],JC=Bfe.join(","),$fe="".concat(JC,", [data-focus-guard]"),eN=function(e,t){var n;return sa(((n=e.shadowRoot)===null||n===void 0?void 0:n.children)||e.children).reduce(function(r,i){return r.concat(i.matches(t?$fe:JC)?[i]:[],eN(i))},[])},e6=function(e,t){return e.reduce(function(n,r){return n.concat(eN(r,t),r.parentNode?sa(r.parentNode.querySelectorAll(JC)).filter(function(i){return i===r}):[])},[])},Ffe=function(e){var t=e.querySelectorAll("[".concat(yfe,"]"));return sa(t).map(function(n){return e6([n])}).reduce(function(n,r){return n.concat(r)},[])},t6=function(e,t){return sa(e).filter(function(n){return qF(t,n)}).filter(function(n){return Rfe(n)})},dT=function(e,t){return t===void 0&&(t=new Map),sa(e).filter(function(n){return YF(t,n)})},PS=function(e,t,n){return JF(t6(e6(e,n),t),!0,n)},fT=function(e,t){return JF(t6(e6(e),t),!1)},Nfe=function(e,t){return t6(Ffe(e),t)},uh=function(e,t){return e.shadowRoot?uh(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:sa(e.children).some(function(n){return uh(n,t)})},zfe=function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var o=e[r].compareDocumentPosition(e[i]);(o&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(a,s){return!t.has(s)})},tN=function(e){return e.parentNode?tN(e.parentNode):e},n6=function(e){var t=_S(e);return t.filter(Boolean).reduce(function(n,r){var i=r.getAttribute(TS);return n.push.apply(n,i?zfe(sa(tN(r).querySelectorAll("[".concat(TS,'="').concat(i,'"]:not([').concat($F,'="disabled"])')))):[r]),n},[])},nN=function(e){return e.activeElement?e.activeElement.shadowRoot?nN(e.activeElement.shadowRoot):e.activeElement:void 0},r6=function(){return document.activeElement?document.activeElement.shadowRoot?nN(document.activeElement.shadowRoot):document.activeElement:void 0},jfe=function(e){return e===document.activeElement},Hfe=function(e){return Boolean(sa(e.querySelectorAll("iframe")).some(function(t){return jfe(t)}))},rN=function(e){var t=document&&r6();return!t||t.dataset&&t.dataset.focusGuard?!1:n6(e).some(function(n){return uh(n,t)||Hfe(n)})},Vfe=function(){var e=document&&r6();return e?sa(document.querySelectorAll("[".concat(vfe,"]"))).some(function(t){return uh(t,e)}):!1},Wfe=function(e,t){return t.filter(QF).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},i6=function(e,t){return QF(e)&&e.name?Wfe(e,t):e},Ufe=function(e){var t=new Set;return e.forEach(function(n){return t.add(i6(n,e))}),e.filter(function(n){return t.has(n)})},pT=function(e){return e[0]&&e.length>1?i6(e[0],e):e[0]},hT=function(e,t){return e.length>1?e.indexOf(i6(e[t],e)):t},iN="NEW_FOCUS",Gfe=function(e,t,n,r){var i=e.length,o=e[0],a=e[i-1],s=QC(n);if(!(n&&e.indexOf(n)>=0)){var l=n!==void 0?t.indexOf(n):-1,c=r?t.indexOf(r):l,u=r?e.indexOf(r):-1,d=l-c,f=t.indexOf(o),p=t.indexOf(a),m=Ufe(t),g=n!==void 0?m.indexOf(n):-1,y=g-(r?m.indexOf(r):l),v=hT(e,0),b=hT(e,i-1);if(l===-1||u===-1)return iN;if(!d&&u>=0)return u;if(l<=f&&s&&Math.abs(d)>1)return b;if(l>=p&&s&&Math.abs(d)>1)return v;if(d&&Math.abs(y)>1)return u;if(l<=f)return b;if(l>p)return v;if(d)return Math.abs(d)>1?u:(i+u+d)%i}},Kfe=function(e){return function(t){var n,r=(n=XF(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},qfe=function(e,t,n){var r=e.map(function(o){var a=o.node;return a}),i=dT(r.filter(Kfe(n)));return i&&i.length?pT(i):pT(dT(t))},OS=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&OS(e.parentNode.host||e.parentNode,t),t},d5=function(e,t){for(var n=OS(e),r=OS(t),i=0;i<n.length;i+=1){var o=n[i];if(r.indexOf(o)>=0)return o}return!1},oN=function(e,t,n){var r=_S(e),i=_S(t),o=r[0],a=!1;return i.filter(Boolean).forEach(function(s){a=d5(a||s,s)||a,n.filter(Boolean).forEach(function(l){var c=d5(o,l);c&&(!a||uh(c,a)?a=c:a=d5(c,a))})}),a},Yfe=function(e,t){return e.reduce(function(n,r){return n.concat(Nfe(r,t))},[])},Xfe=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Afe)},Zfe=function(e,t){var n=document&&r6(),r=n6(e).filter(F0),i=oN(n||e,e,r),o=new Map,a=fT(r,o),s=PS(r,o).filter(function(p){var m=p.node;return F0(m)});if(!(!s[0]&&(s=a,!s[0]))){var l=fT([i],o).map(function(p){var m=p.node;return m}),c=Xfe(l,s),u=c.map(function(p){var m=p.node;return m}),d=Gfe(u,l,n,t);if(d===iN){var f=qfe(a,u,Yfe(r,o));if(f)return{node:f};console.warn("focus-lock: cannot find any node to move focus into");return}return d===void 0?d:c[d]}},Qfe=function(e){var t=n6(e).filter(F0),n=oN(e,e,t),r=new Map,i=PS([n],r,!0),o=PS(t,r).filter(function(a){var s=a.node;return F0(s)}).map(function(a){var s=a.node;return s});return i.map(function(a){var s=a.node,l=a.index;return{node:s,index:l,lockItem:o.indexOf(s)>=0,guard:QC(s)}})},Jfe=function(e,t){"focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus()},f5=0,p5=!1,epe=function(e,t,n){n===void 0&&(n={});var r=Zfe(e,t);if(!p5&&r){if(f5>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),p5=!0,setTimeout(function(){p5=!1},1);return}f5++,Jfe(r.node,n.focusOptions),f5--}},aN=epe;function sN(e){var t=window,n=t.setImmediate;typeof n!="undefined"?n(e):setTimeout(e,1)}var tpe=function(){return document&&document.activeElement===document.body},npe=function(){return tpe()||Vfe()},Xu=null,Mu=null,Zu=null,dh=!1,rpe=function(){return!0},ipe=function(t){return(Xu.whiteList||rpe)(t)},ope=function(t,n){Zu={observerNode:t,portaledElement:n}},ape=function(t){return Zu&&Zu.portaledElement===t};function mT(e,t,n,r){var i=null,o=e;do{var a=r[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else if(a.lockItem){if(o!==e)return;i=null}else break}while((o+=n)!==t);i&&(i.node.tabIndex=0)}var spe=function(t){return t&&"current"in t?t.current:t},lpe=function(t){return t?Boolean(dh):dh==="meanwhile"},cpe=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},upe=function(t,n){return n.some(function(r){return cpe(t,r,r)})},N0=function(){var t=!1;if(Xu){var n=Xu,r=n.observed,i=n.persistentFocus,o=n.autoFocus,a=n.shards,s=n.crossFrame,l=n.focusOptions,c=r||Zu&&Zu.portaledElement,u=document&&document.activeElement;if(c){var d=[c].concat(a.map(spe).filter(Boolean));if((!u||ipe(u))&&(i||lpe(s)||!npe()||!Mu&&o)&&(c&&!(rN(d)||u&&upe(u,d)||ape(u))&&(document&&!Mu&&u&&!o?(u.blur&&u.blur(),document.body.focus()):(t=aN(d,Mu,{focusOptions:l}),Zu={})),dh=!1,Mu=document&&document.activeElement),document){var f=document&&document.activeElement,p=Qfe(d),m=p.map(function(g){var y=g.node;return y}).indexOf(f);m>-1&&(p.filter(function(g){var y=g.guard,v=g.node;return y&&v.dataset.focusAutoGuard}).forEach(function(g){var y=g.node;return y.removeAttribute("tabIndex")}),mT(m,p.length,1,p),mT(m,-1,-1,p))}}}return t},lN=function(t){N0()&&t&&(t.stopPropagation(),t.preventDefault())},o6=function(){return sN(N0)},dpe=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||ope(r,n)},fpe=function(){return null},cN=function(){dh="just",setTimeout(function(){dh="meanwhile"},0)},ppe=function(){document.addEventListener("focusin",lN),document.addEventListener("focusout",o6),window.addEventListener("blur",cN)},hpe=function(){document.removeEventListener("focusin",lN),document.removeEventListener("focusout",o6),window.removeEventListener("blur",cN)};function mpe(e){return e.filter(function(t){var n=t.disabled;return!n})}function gpe(e){var t=e.slice(-1)[0];t&&!Xu&&ppe();var n=Xu,r=n&&t&&t.id===n.id;Xu=t,n&&!r&&(n.onDeactivation(),e.filter(function(i){var o=i.id;return o===n.id}).length||n.returnFocus(!t)),t?(Mu=null,(!r||n.observed!==t.observed)&&t.onActivation(),N0(),sN(N0)):(hpe(),Mu=null)}VF.assignSyncMedium(dpe);WF.assignMedium(o6);Cfe.assignMedium(function(e){return e({moveFocusInside:aN,focusInside:rN})});var vpe=Tfe(mpe,gpe)(fpe),uN=h.exports.forwardRef(function(t,n){return h.exports.createElement(UF,J({sideCar:vpe,ref:n},t))}),dN=UF.propTypes||{};dN.sideCar;QM(dN,["sideCar"]);uN.propTypes={};var ype=uN,fN=e=>{const{initialFocusRef:t,finalFocusRef:n,contentRef:r,restoreFocus:i,children:o,isDisabled:a,autoFocus:s,persistentFocus:l,lockFocusAcrossFrames:c}=e,u=h.exports.useCallback(()=>{t!=null&&t.current?t.current.focus():r!=null&&r.current&&Mce(r.current).length===0&&requestAnimationFrame(()=>{var m;(m=r.current)==null||m.focus()})},[t,r]),d=h.exports.useCallback(()=>{var p;(p=n==null?void 0:n.current)==null||p.focus()},[n]),f=i&&!n;return A.createElement(ype,{crossFrame:c,persistentFocus:l,autoFocus:s,disabled:a,onActivation:u,onDeactivation:d,returnFocus:f},o)};fN.displayName="FocusLock";var bg="right-scroll-bar-position",xg="width-before-scroll-bar",bpe="with-scroll-bars-hidden",xpe="--removed-body-scroll-bar-size",pN=jF(),h5=function(){},Qy=h.exports.forwardRef(function(e,t){var n=h.exports.useRef(null),r=h.exports.useState({onScrollCapture:h5,onWheelCapture:h5,onTouchMoveCapture:h5}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,g=e.allowPinchZoom,y=e.as,v=y===void 0?"div":y,b=FL(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),x=f,w=FF([n,t]),E=Lo(Lo({},b),i);return h.exports.createElement(h.exports.Fragment,null,u&&h.exports.createElement(x,{sideCar:pN,removeScrollBar:c,shards:d,noIsolation:p,inert:m,setCallbacks:o,allowPinchZoom:!!g,lockRef:n}),a?h.exports.cloneElement(h.exports.Children.only(s),Lo(Lo({},E),{ref:w})):h.exports.createElement(v,Lo({},E,{className:l,ref:w}),s))});Qy.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Qy.classNames={fullWidth:xg,zeroRight:bg};var Spe=function(){if(typeof __webpack_nonce__!="undefined")return __webpack_nonce__};function wpe(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Spe();return t&&e.setAttribute("nonce",t),e}function Cpe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function kpe(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Epe=function(){var e=0,t=null;return{add:function(n){e==0&&(t=wpe())&&(Cpe(t,n),kpe(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Ipe=function(){var e=Epe();return function(t,n){h.exports.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},hN=function(){var e=Ipe(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Tpe={left:0,top:0,right:0,gap:0},m5=function(e){return parseInt(e||"",10)||0},_pe=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[m5(n),m5(r),m5(i)]},Ppe=function(e){if(e===void 0&&(e="margin"),typeof window=="undefined")return Tpe;var t=_pe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ope=hN(),Mpe=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
  .`.concat(bpe,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(s,"px ").concat(r,`;
  }
  body {
    overflow: hidden `).concat(r,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
    padding-left: `.concat(i,`px;
    padding-top: `).concat(o,`px;
    padding-right: `).concat(a,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(s,"px ").concat(r,`;
    `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(bg,` {
    right: `).concat(s,"px ").concat(r,`;
  }
  
  .`).concat(xg,` {
    margin-right: `).concat(s,"px ").concat(r,`;
  }
  
  .`).concat(bg," .").concat(bg,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(xg," .").concat(xg,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body {
    `).concat(xpe,": ").concat(s,`px;
  }
`)},Rpe=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r,o=h.exports.useMemo(function(){return Ppe(i)},[i]);return h.exports.createElement(Ope,{styles:Mpe(o,!t,i,n?"":"!important")})},MS=!1;if(typeof window!="undefined")try{var um=Object.defineProperty({},"passive",{get:function(){return MS=!0,!0}});window.addEventListener("test",um,um),window.removeEventListener("test",um,um)}catch{MS=!1}var Gc=MS?{passive:!1}:!1,Dpe=function(e){return e.tagName==="TEXTAREA"},mN=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Dpe(e)&&n[t]==="visible")},Ape=function(e){return mN(e,"overflowY")},Lpe=function(e){return mN(e,"overflowX")},gT=function(e,t){var n=t;do{typeof ShadowRoot!="undefined"&&n instanceof ShadowRoot&&(n=n.host);var r=gN(e,n);if(r){var i=vN(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},Bpe=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},$pe=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},gN=function(e,t){return e==="v"?Ape(t):Lpe(t)},vN=function(e,t){return e==="v"?Bpe(t):$pe(t)},Fpe=function(e,t){return e==="h"&&t==="rtl"?-1:1},Npe=function(e,t,n,r,i){var o=Fpe(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),c=!1,u=a>0,d=0,f=0;do{var p=vN(e,s),m=p[0],g=p[1],y=p[2],v=g-y-o*m;(m||v)&&gN(e,s)&&(d+=v,f+=m),s=s.parentNode}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(u&&(i&&d===0||!i&&a>d)||!u&&(i&&f===0||!i&&-a>f))&&(c=!0),c},dm=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},vT=function(e){return[e.deltaX,e.deltaY]},yT=function(e){return e&&"current"in e?e.current:e},zpe=function(e,t){return e[0]===t[0]&&e[1]===t[1]},jpe=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},Hpe=0,Kc=[];function Vpe(e){var t=h.exports.useRef([]),n=h.exports.useRef([0,0]),r=h.exports.useRef(),i=h.exports.useState(Hpe++)[0],o=h.exports.useState(function(){return hN()})[0],a=h.exports.useRef(e);h.exports.useEffect(function(){a.current=e},[e]),h.exports.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var g=bse([e.lockRef.current],(e.shards||[]).map(yT),!0).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=h.exports.useCallback(function(g,y){if("touches"in g&&g.touches.length===2)return!a.current.allowPinchZoom;var v=dm(g),b=n.current,x="deltaX"in g?g.deltaX:b[0]-v[0],w="deltaY"in g?g.deltaY:b[1]-v[1],E,C=g.target,I=Math.abs(x)>Math.abs(w)?"h":"v";if("touches"in g&&I==="h"&&C.type==="range")return!1;var T=gT(I,C);if(!T)return!0;if(T?E=I:(E=I==="v"?"h":"v",T=gT(I,C)),!T)return!1;if(!r.current&&"changedTouches"in g&&(x||w)&&(r.current=E),!E)return!0;var _=r.current||E;return Npe(_,y,g,_==="h"?x:w,!0)},[]),l=h.exports.useCallback(function(g){var y=g;if(!(!Kc.length||Kc[Kc.length-1]!==o)){var v="deltaY"in y?vT(y):dm(y),b=t.current.filter(function(E){return E.name===y.type&&E.target===y.target&&zpe(E.delta,v)})[0];if(b&&b.should){y.cancelable&&y.preventDefault();return}if(!b){var x=(a.current.shards||[]).map(yT).filter(Boolean).filter(function(E){return E.contains(y.target)}),w=x.length>0?s(y,x[0]):!a.current.noIsolation;w&&y.cancelable&&y.preventDefault()}}},[]),c=h.exports.useCallback(function(g,y,v,b){var x={name:g,delta:y,target:v,should:b};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(w){return w!==x})},1)},[]),u=h.exports.useCallback(function(g){n.current=dm(g),r.current=void 0},[]),d=h.exports.useCallback(function(g){c(g.type,vT(g),g.target,s(g,e.lockRef.current))},[]),f=h.exports.useCallback(function(g){c(g.type,dm(g),g.target,s(g,e.lockRef.current))},[]);h.exports.useEffect(function(){return Kc.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Gc),document.addEventListener("touchmove",l,Gc),document.addEventListener("touchstart",u,Gc),function(){Kc=Kc.filter(function(g){return g!==o}),document.removeEventListener("wheel",l,Gc),document.removeEventListener("touchmove",l,Gc),document.removeEventListener("touchstart",u,Gc)}},[]);var p=e.removeScrollBar,m=e.inert;return h.exports.createElement(h.exports.Fragment,null,m?h.exports.createElement(o,{styles:jpe(i)}):null,p?h.exports.createElement(Rpe,{gapMode:"margin"}):null)}var Wpe=wfe(pN,Vpe),yN=h.exports.forwardRef(function(e,t){return h.exports.createElement(Qy,Lo({},e,{ref:t,sideCar:Wpe}))});yN.classNames=Qy.classNames;var a6=yN,Ic=(...e)=>e.filter(Boolean).join(" ");function Wf(...e){return function(n){e.some(r=>(r==null||r(n),n==null?void 0:n.defaultPrevented))}}var Upe=class{constructor(){S(this,"modals");this.modals=[]}add(e){this.modals.push(e)}remove(e){this.modals=this.modals.filter(t=>t!==e)}isTopModal(e){return this.modals[this.modals.length-1]===e}},RS=new Upe;function Gpe(e,t){h.exports.useEffect(()=>(t&&RS.add(e),()=>{RS.remove(e)}),[t,e])}function Kpe(e){const{isOpen:t,onClose:n,id:r,closeOnOverlayClick:i=!0,closeOnEsc:o=!0,useInert:a=!0,onOverlayClick:s,onEsc:l}=e,c=h.exports.useRef(null),u=h.exports.useRef(null),[d,f,p]=Ype(r,"chakra-modal","chakra-modal--header","chakra-modal--body");qpe(c,t&&a),Gpe(c,t);const m=h.exports.useRef(null),g=h.exports.useCallback(T=>{m.current=T.target},[]),y=h.exports.useCallback(T=>{T.key==="Escape"&&(T.stopPropagation(),o&&(n==null||n()),l==null||l())},[o,n,l]),[v,b]=h.exports.useState(!1),[x,w]=h.exports.useState(!1),E=h.exports.useCallback((T={},_=null)=>({role:"dialog",...T,ref:go(_,c),id:d,tabIndex:-1,"aria-modal":!0,"aria-labelledby":v?f:void 0,"aria-describedby":x?p:void 0,onClick:Wf(T.onClick,P=>P.stopPropagation())}),[p,x,d,f,v]),C=h.exports.useCallback(T=>{T.stopPropagation(),m.current===T.target&&(!RS.isTopModal(c)||(i&&(n==null||n()),s==null||s()))},[n,i,s]),I=h.exports.useCallback((T={},_=null)=>({...T,ref:go(_,u),onClick:Wf(T.onClick,C),onKeyDown:Wf(T.onKeyDown,y),onMouseDown:Wf(T.onMouseDown,g)}),[y,g,C]);return{isOpen:t,onClose:n,headerId:f,bodyId:p,setBodyMounted:w,setHeaderMounted:b,dialogRef:c,overlayRef:u,getDialogProps:E,getDialogContainerProps:I}}function qpe(e,t){const n=e.current;h.exports.useEffect(()=>{if(!(!e.current||!t))return qC(e.current)},[t,e,n])}function Ype(e,...t){const n=h.exports.useId(),r=e||n;return h.exports.useMemo(()=>t.map(i=>`${i}-${r}`),[r,t])}var[Xpe,Tc]=En({name:"ModalStylesContext",errorMessage:`useModalStyles returned is 'undefined'. Seems you forgot to wrap the components in "<Modal />" `}),[Zpe,qs]=En({strict:!0,name:"ModalContext",errorMessage:"useModalContext: `context` is undefined. Seems you forgot to wrap modal components in `<Modal />`"}),Jy=e=>{const{portalProps:t,children:n,autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:c,preserveScrollBarGap:u,motionPreset:d,lockFocusAcrossFrames:f,onCloseComplete:p}=e,m=vt("Modal",e),y={...Kpe(e),autoFocus:r,trapFocus:i,initialFocusRef:o,finalFocusRef:a,returnFocusOnClose:s,blockScrollOnMount:l,allowPinchZoom:c,preserveScrollBarGap:u,motionPreset:d,lockFocusAcrossFrames:f};return A.createElement(Zpe,{value:y},A.createElement(Xpe,{value:m},A.createElement(Wa,{onExitComplete:p},y.isOpen&&A.createElement(Kd,{...t},n))))};Jy.defaultProps={lockFocusAcrossFrames:!0,returnFocusOnClose:!0,scrollBehavior:"outside",trapFocus:!0,autoFocus:!0,blockScrollOnMount:!0,allowPinchZoom:!1,motionPreset:"scale"};Jy.displayName="Modal";var s6=de((e,t)=>{const{className:n,...r}=e,{bodyId:i,setBodyMounted:o}=qs();h.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Ic("chakra-modal__body",n),s=Tc();return A.createElement(ce.div,{ref:t,className:a,id:i,...r,__css:s.body})});s6.displayName="ModalBody";var bN=de((e,t)=>{const{onClick:n,className:r,...i}=e,{onClose:o}=qs(),a=Ic("chakra-modal__close-btn",r),s=Tc();return A.createElement(Z9,{ref:t,__css:s.closeButton,className:a,onClick:Wf(n,l=>{l.stopPropagation(),o()}),...i})});bN.displayName="ModalCloseButton";function xN(e){const{autoFocus:t,trapFocus:n,dialogRef:r,initialFocusRef:i,blockScrollOnMount:o,allowPinchZoom:a,finalFocusRef:s,returnFocusOnClose:l,preserveScrollBarGap:c,lockFocusAcrossFrames:u}=qs(),[d,f]=E9();return h.exports.useEffect(()=>{!d&&f&&setTimeout(f)},[d,f]),A.createElement(fN,{autoFocus:t,isDisabled:!n,initialFocusRef:i,finalFocusRef:s,restoreFocus:l,contentRef:r,lockFocusAcrossFrames:u},A.createElement(a6,{removeScrollBar:!c,allowPinchZoom:a,enabled:o,forwardProps:!0},e.children))}var Qpe={slideInBottom:{...T3,custom:{offsetY:16,reverse:!0}},slideInRight:{...T3,custom:{offsetX:16,reverse:!0}},scale:{...jL,custom:{initialScale:.95,reverse:!0}},none:{}},Jpe=ce(Ur.section),ehe=e=>Qpe[e||"none"],SN=h.exports.forwardRef((e,t)=>{const{preset:n,motionProps:r=ehe(n),...i}=e;return A.createElement(Jpe,{ref:t,...r,...i})});SN.displayName="ModalTransition";var l6=de((e,t)=>{const{className:n,children:r,containerProps:i,motionProps:o,...a}=e,{getDialogProps:s,getDialogContainerProps:l}=qs(),c=s(a,t),u=l(i),d=Ic("chakra-modal__content",n),f=Tc(),p={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...f.dialog},m={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...f.dialogContainer},{motionPreset:g}=qs();return A.createElement(xN,null,A.createElement(ce.div,{...u,className:"chakra-modal__content-container",tabIndex:-1,__css:m},A.createElement(SN,{preset:g,motionProps:o,className:d,...c,__css:p},r)))});l6.displayName="ModalContent";var c6=de((e,t)=>{const{className:n,...r}=e,i=Ic("chakra-modal__footer",n),o=Tc(),a={display:"flex",alignItems:"center",justifyContent:"flex-end",...o.footer};return A.createElement(ce.footer,{ref:t,...r,__css:a,className:i})});c6.displayName="ModalFooter";var u6=de((e,t)=>{const{className:n,...r}=e,{headerId:i,setHeaderMounted:o}=qs();h.exports.useEffect(()=>(o(!0),()=>o(!1)),[o]);const a=Ic("chakra-modal__header",n),s=Tc(),l={flex:0,...s.header};return A.createElement(ce.header,{ref:t,className:a,id:i,...r,__css:l})});u6.displayName="ModalHeader";var the=ce(Ur.div),d6=de((e,t)=>{const{className:n,transition:r,motionProps:i,...o}=e,a=Ic("chakra-modal__overlay",n),s=Tc(),l={pos:"fixed",left:"0",top:"0",w:"100vw",h:"100vh",...s.overlay},{motionPreset:c}=qs(),d=i||(c==="none"?{}:zL);return A.createElement(the,{...d,__css:l,ref:t,className:a,...o})});d6.displayName="ModalOverlay";function nhe(e){const{leastDestructiveRef:t,...n}=e;return A.createElement(Jy,{...n,initialFocusRef:t})}var rhe=de((e,t)=>A.createElement(l6,{ref:t,role:"alertdialog",...e})),[BFe,ihe]=En(),ohe=ce(HL),ahe=de((e,t)=>{const{className:n,children:r,motionProps:i,...o}=e,{getDialogProps:a,getDialogContainerProps:s,isOpen:l}=qs(),c=a(o,t),u=s(),d=Ic("chakra-modal__content",n),f=Tc(),p={display:"flex",flexDirection:"column",position:"relative",width:"100%",outline:0,...f.dialog},m={display:"flex",width:"100vw",height:"$100vh",position:"fixed",left:0,top:0,...f.dialogContainer},{placement:g}=ihe();return A.createElement(ce.div,{...u,className:"chakra-modal__content-container",__css:m},A.createElement(xN,null,A.createElement(ohe,{motionProps:i,direction:g,in:l,className:d,...c,__css:p},r)))});ahe.displayName="DrawerContent";function dt(e,t={}){let n=!1;function r(){if(!n){n=!0;return}throw new Error("[anatomy] .part(...) should only be called once. Did you mean to use .extend(...) ?")}function i(...u){r();for(const d of u)t[d]=l(d);return dt(e,t)}function o(...u){for(const d of u)d in t||(t[d]=l(d));return dt(e,t)}function a(){return Object.fromEntries(Object.entries(t).map(([d,f])=>[d,f.selector]))}function s(){return Object.fromEntries(Object.entries(t).map(([d,f])=>[d,f.className]))}function l(u){const p=`chakra-${(["container","root"].includes(u!=null?u:"")?[e]:[e,u]).filter(Boolean).join("__")}`;return{className:p,selector:`.${p}`,toString:()=>u}}return{parts:i,toPart:l,extend:o,selectors:a,classnames:s,get keys(){return Object.keys(t)},__type:{}}}var she=dt("accordion").parts("root","container","button","panel").extend("icon"),lhe=dt("alert").parts("title","description","container").extend("icon","spinner"),che=dt("avatar").parts("label","badge","container").extend("excessLabel","group"),uhe=dt("breadcrumb").parts("link","item","container").extend("separator");dt("button").parts();var dhe=dt("checkbox").parts("control","icon","container").extend("label");dt("progress").parts("track","filledTrack").extend("label");var fhe=dt("drawer").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),phe=dt("editable").parts("preview","input","textarea"),hhe=dt("form").parts("container","requiredIndicator","helperText"),mhe=dt("formError").parts("text","icon"),ghe=dt("input").parts("addon","field","element"),vhe=dt("list").parts("container","item","icon"),yhe=dt("menu").parts("button","list","item").extend("groupTitle","command","divider"),bhe=dt("modal").parts("overlay","dialogContainer","dialog").extend("header","closeButton","body","footer"),xhe=dt("numberinput").parts("root","field","stepperGroup","stepper");dt("pininput").parts("field");var She=dt("popover").parts("content","header","body","footer").extend("popper","arrow","closeButton"),whe=dt("progress").parts("label","filledTrack","track"),Che=dt("radio").parts("container","control","label"),khe=dt("select").parts("field","icon"),Ehe=dt("slider").parts("container","track","thumb","filledTrack","mark"),Ihe=dt("stat").parts("container","label","helpText","number","icon"),The=dt("switch").parts("container","track","thumb"),_he=dt("table").parts("table","thead","tbody","tr","th","td","tfoot","caption"),Phe=dt("tabs").parts("root","tab","tablist","tabpanel","tabpanels","indicator"),Ohe=dt("tag").parts("container","label","closeButton");function Zn(e,t){Mhe(e)&&(e="100%");var n=Rhe(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function fm(e){return Math.min(1,Math.max(0,e))}function Mhe(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Rhe(e){return typeof e=="string"&&e.indexOf("%")!==-1}function wN(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function pm(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Gl(e){return e.length===1?"0"+e:String(e)}function Dhe(e,t,n){return{r:Zn(e,255)*255,g:Zn(t,255)*255,b:Zn(n,255)*255}}function bT(e,t,n){e=Zn(e,255),t=Zn(t,255),n=Zn(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t<n?6:0);break;case t:o=(n-e)/l+2;break;case n:o=(e-t)/l+4;break}o/=6}return{h:o,s:a,l:s}}function g5(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Ahe(e,t,n){var r,i,o;if(e=Zn(e,360),t=Zn(t,100),n=Zn(n,100),t===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=g5(s,a,e+1/3),i=g5(s,a,e),o=g5(s,a,e-1/3)}return{r:r*255,g:i*255,b:o*255}}function xT(e,t,n){e=Zn(e,255),t=Zn(t,255),n=Zn(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4;break}o/=6}return{h:o,s:l,v:a}}function Lhe(e,t,n){e=Zn(e,360)*6,t=Zn(t,100),n=Zn(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),l=r%6,c=[n,a,o,o,s,n][l],u=[s,n,n,a,o,o][l],d=[o,o,s,n,n,a][l];return{r:c*255,g:u*255,b:d*255}}function ST(e,t,n,r){var i=[Gl(Math.round(e).toString(16)),Gl(Math.round(t).toString(16)),Gl(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function Bhe(e,t,n,r,i){var o=[Gl(Math.round(e).toString(16)),Gl(Math.round(t).toString(16)),Gl(Math.round(n).toString(16)),Gl($he(r))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function $he(e){return Math.round(parseFloat(e)*255).toString(16)}function wT(e){return Yr(e)/255}function Yr(e){return parseInt(e,16)}function Fhe(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var DS={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Nhe(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof e=="string"&&(e=Hhe(e)),typeof e=="object"&&(ha(e.r)&&ha(e.g)&&ha(e.b)?(t=Dhe(e.r,e.g,e.b),a=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):ha(e.h)&&ha(e.s)&&ha(e.v)?(r=pm(e.s),i=pm(e.v),t=Lhe(e.h,r,i),a=!0,s="hsv"):ha(e.h)&&ha(e.s)&&ha(e.l)&&(r=pm(e.s),o=pm(e.l),t=Ahe(e.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=wN(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var zhe="[-\\+]?\\d+%?",jhe="[-\\+]?\\d*\\.\\d+%?",Es="(?:".concat(jhe,")|(?:").concat(zhe,")"),v5="[\\s|\\(]+(".concat(Es,")[,|\\s]+(").concat(Es,")[,|\\s]+(").concat(Es,")\\s*\\)?"),y5="[\\s|\\(]+(".concat(Es,")[,|\\s]+(").concat(Es,")[,|\\s]+(").concat(Es,")[,|\\s]+(").concat(Es,")\\s*\\)?"),eo={CSS_UNIT:new RegExp(Es),rgb:new RegExp("rgb"+v5),rgba:new RegExp("rgba"+y5),hsl:new RegExp("hsl"+v5),hsla:new RegExp("hsla"+y5),hsv:new RegExp("hsv"+v5),hsva:new RegExp("hsva"+y5),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Hhe(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(DS[e])e=DS[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=eo.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=eo.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=eo.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=eo.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=eo.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=eo.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=eo.hex8.exec(e),n?{r:Yr(n[1]),g:Yr(n[2]),b:Yr(n[3]),a:wT(n[4]),format:t?"name":"hex8"}:(n=eo.hex6.exec(e),n?{r:Yr(n[1]),g:Yr(n[2]),b:Yr(n[3]),format:t?"name":"hex"}:(n=eo.hex4.exec(e),n?{r:Yr(n[1]+n[1]),g:Yr(n[2]+n[2]),b:Yr(n[3]+n[3]),a:wT(n[4]+n[4]),format:t?"name":"hex8"}:(n=eo.hex3.exec(e),n?{r:Yr(n[1]+n[1]),g:Yr(n[2]+n[2]),b:Yr(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function ha(e){return Boolean(eo.CSS_UNIT.exec(String(e)))}var Zh=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=Fhe(t)),this.originalInput=t;var i=Nhe(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,i,o=t.r/255,a=t.g/255,s=t.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=wN(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=xT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=xT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=bT(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=bT(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),i=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),ST(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Bhe(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(Zn(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(Zn(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+ST(this.r,this.g,this.b,!1),n=0,r=Object.entries(DS);n<r.length;n++){var i=r[n],o=i[0],a=i[1];if(t===a)return o}return!1},e.prototype.toString=function(t){var n=Boolean(t);t=t!=null?t:this.format;var r=!1,i=this.a<1&&this.a>=0,o=!n&&i&&(t.startsWith("hex")||t==="name");return o?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=fm(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=fm(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=fm(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=fm(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new e(a)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;a<t;a++)i.push(new e({h:(r+a*o)%360,s:n.s,l:n.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();function CN(e){if(e===void 0&&(e={}),e.count!==void 0&&e.count!==null){var t=e.count,n=[];for(e.count=void 0;t>n.length;)e.count=null,e.seed&&(e.seed+=1),n.push(CN(e));return e.count=t,n}var r=Vhe(e.hue,e.seed),i=Whe(r,e),o=Uhe(r,i,e),a={h:r,s:i,v:o};return e.alpha!==void 0&&(a.a=e.alpha),new Zh(a)}function Vhe(e,t){var n=Khe(e),r=z0(n,t);return r<0&&(r=360+r),r}function Whe(e,t){if(t.hue==="monochrome")return 0;if(t.luminosity==="random")return z0([0,100],t.seed);var n=kN(e).saturationRange,r=n[0],i=n[1];switch(t.luminosity){case"bright":r=55;break;case"dark":r=i-10;break;case"light":i=55;break}return z0([r,i],t.seed)}function Uhe(e,t,n){var r=Ghe(e,t),i=100;switch(n.luminosity){case"dark":i=r+20;break;case"light":r=(i+r)/2;break;case"random":r=0,i=100;break}return z0([r,i],n.seed)}function Ghe(e,t){for(var n=kN(e).lowerBounds,r=0;r<n.length-1;r++){var i=n[r][0],o=n[r][1],a=n[r+1][0],s=n[r+1][1];if(t>=i&&t<=a){var l=(s-o)/(a-i),c=o-l*i;return l*t+c}}return 0}function Khe(e){var t=parseInt(e,10);if(!Number.isNaN(t)&&t<360&&t>0)return[t,t];if(typeof e=="string"){var n=IN.find(function(a){return a.name===e});if(n){var r=EN(n);if(r.hueRange)return r.hueRange}var i=new Zh(e);if(i.isValid){var o=i.toHsv().h;return[o,o]}}return[0,360]}function kN(e){e>=334&&e<=360&&(e-=360);for(var t=0,n=IN;t<n.length;t++){var r=n[t],i=EN(r);if(i.hueRange&&e>=i.hueRange[0]&&e<=i.hueRange[1])return i}throw Error("Color not found")}function z0(e,t){if(t===void 0)return Math.floor(e[0]+Math.random()*(e[1]+1-e[0]));var n=e[1]||1,r=e[0]||0;t=(t*9301+49297)%233280;var i=t/233280;return Math.floor(r+i*(n-r))}function EN(e){var t=e.lowerBounds[0][0],n=e.lowerBounds[e.lowerBounds.length-1][0],r=e.lowerBounds[e.lowerBounds.length-1][1],i=e.lowerBounds[0][1];return{name:e.name,hueRange:e.hueRange,lowerBounds:e.lowerBounds,saturationRange:[t,n],brightnessRange:[r,i]}}var IN=[{name:"monochrome",hueRange:null,lowerBounds:[[0,0],[100,0]]},{name:"red",hueRange:[-26,18],lowerBounds:[[20,100],[30,92],[40,89],[50,85],[60,78],[70,70],[80,60],[90,55],[100,50]]},{name:"orange",hueRange:[19,46],lowerBounds:[[20,100],[30,93],[40,88],[50,86],[60,85],[70,70],[100,70]]},{name:"yellow",hueRange:[47,62],lowerBounds:[[25,100],[40,94],[50,89],[60,86],[70,84],[80,82],[90,80],[100,75]]},{name:"green",hueRange:[63,178],lowerBounds:[[30,100],[40,90],[50,85],[60,81],[70,74],[80,64],[90,50],[100,40]]},{name:"blue",hueRange:[179,257],lowerBounds:[[20,100],[30,86],[40,80],[50,74],[60,60],[70,52],[80,44],[90,39],[100,35]]},{name:"purple",hueRange:[258,282],lowerBounds:[[20,100],[30,87],[40,79],[50,70],[60,65],[70,59],[80,52],[90,45],[100,42]]},{name:"pink",hueRange:[283,334],lowerBounds:[[20,100],[30,90],[40,86],[60,84],[80,80],[90,75],[100,73]]}];function qhe(e,t,n,r,i){for(t=t.split?t.split("."):t,r=0;r<t.length;r++)e=e?e[t[r]]:i;return e===i?n:e}var Yhe=e=>Object.keys(e).length===0,Dn=(e,t,n)=>{const r=qhe(e,`colors.${t}`,t),{isValid:i}=new Zh(r);return i?r:n},Xhe=e=>t=>{const n=Dn(t,e);return new Zh(n).isDark()?"dark":"light"},Zhe=e=>t=>Xhe(e)(t)==="dark",wd=(e,t)=>n=>{const r=Dn(n,e);return new Zh(r).setAlpha(t).toRgbString()};function CT(e="1rem",t="rgba(255, 255, 255, 0.15)"){return{backgroundImage:`linear-gradient(
    45deg,
    ${t} 25%,
    transparent 25%,
    transparent 50%,
    ${t} 50%,
    ${t} 75%,
    transparent 75%,
    transparent
  )`,backgroundSize:`${e} ${e}`}}function Qhe(e){const t=CN().toHexString();return!e||Yhe(e)?t:e.string&&e.colors?e1e(e.string,e.colors):e.string&&!e.colors?Jhe(e.string):e.colors&&!e.string?t1e(e.colors):t}function Jhe(e){let t=0;if(e.length===0)return t.toString();for(let r=0;r<e.length;r+=1)t=e.charCodeAt(r)+((t<<5)-t),t=t&t;let n="#";for(let r=0;r<3;r+=1)n+=`00${(t>>r*8&255).toString(16)}`.substr(-2);return n}function e1e(e,t){let n=0;if(e.length===0)return t[0];for(let r=0;r<e.length;r+=1)n=e.charCodeAt(r)+((n<<5)-n),n=n&n;return n=(n%t.length+t.length)%t.length,t[n]}function t1e(e){return e[Math.floor(Math.random()*e.length)]}function oe(e,t){return n=>n.colorMode==="dark"?t:e}function f6(e){const{orientation:t,vertical:n,horizontal:r}=e;return t?t==="vertical"?n:r:{}}function n1e(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}function TN(e){return n1e(e)&&e.reference?e.reference:String(e)}var e2=(e,...t)=>t.map(TN).join(` ${e} `).replace(/calc/g,""),kT=(...e)=>`calc(${e2("+",...e)})`,ET=(...e)=>`calc(${e2("-",...e)})`,AS=(...e)=>`calc(${e2("*",...e)})`,IT=(...e)=>`calc(${e2("/",...e)})`,TT=e=>{const t=TN(e);return t!=null&&!Number.isNaN(parseFloat(t))?String(t).startsWith("-")?String(t).slice(1):`-${t}`:AS(t,-1)},ba=Object.assign(e=>({add:(...t)=>ba(kT(e,...t)),subtract:(...t)=>ba(ET(e,...t)),multiply:(...t)=>ba(AS(e,...t)),divide:(...t)=>ba(IT(e,...t)),negate:()=>ba(TT(e)),toString:()=>e.toString()}),{add:kT,subtract:ET,multiply:AS,divide:IT,negate:TT});function r1e(e){return!Number.isInteger(parseFloat(e.toString()))}function i1e(e,t="-"){return e.replace(/\s+/g,t)}function _N(e){const t=i1e(e.toString());return t.includes("\\.")?e:r1e(e)?t.replace(".","\\."):e}function o1e(e,t=""){return[t,_N(e)].filter(Boolean).join("-")}function a1e(e,t){return`var(${_N(e)}${t?`, ${t}`:""})`}function s1e(e,t=""){return`--${o1e(e,t)}`}function Gr(e,t){const n=s1e(e,t==null?void 0:t.prefix);return{variable:n,reference:a1e(n,l1e(t==null?void 0:t.fallback))}}function l1e(e){return typeof e=="string"?e:e==null?void 0:e.reference}var{definePartsStyle:c1e,defineMultiStyleConfig:u1e}=zt(she.keys),d1e={borderTopWidth:"1px",borderColor:"inherit",_last:{borderBottomWidth:"1px"}},f1e={transitionProperty:"common",transitionDuration:"normal",fontSize:"md",_focusVisible:{boxShadow:"outline"},_hover:{bg:"blackAlpha.50"},_disabled:{opacity:.4,cursor:"not-allowed"},px:"4",py:"2"},p1e={pt:"2",px:"4",pb:"5"},h1e={fontSize:"1.25em"},m1e=c1e({container:d1e,button:f1e,panel:p1e,icon:h1e}),g1e=u1e({baseStyle:m1e}),{definePartsStyle:Qh,defineMultiStyleConfig:v1e}=zt(lhe.keys),Ba=nl("alert-fg"),Jh=nl("alert-bg"),y1e=Qh({container:{bg:Jh.reference,px:"4",py:"3"},title:{fontWeight:"bold",lineHeight:"6",marginEnd:"2"},description:{lineHeight:"6"},icon:{color:Ba.reference,flexShrink:0,marginEnd:"3",w:"5",h:"6"},spinner:{color:Ba.reference,flexShrink:0,marginEnd:"3",w:"5",h:"5"}});function p6(e){const{theme:t,colorScheme:n}=e,r=Dn(t,`${n}.100`,n),i=wd(`${n}.200`,.16)(t);return oe(r,i)(e)}var b1e=Qh(e=>{const{colorScheme:t}=e,n=oe(`${t}.500`,`${t}.200`)(e);return{container:{[Jh.variable]:p6(e),[Ba.variable]:`colors.${n}`}}}),x1e=Qh(e=>{const{colorScheme:t}=e,n=oe(`${t}.500`,`${t}.200`)(e);return{container:{[Jh.variable]:p6(e),[Ba.variable]:`colors.${n}`,paddingStart:"3",borderStartWidth:"4px",borderStartColor:Ba.reference}}}),S1e=Qh(e=>{const{colorScheme:t}=e,n=oe(`${t}.500`,`${t}.200`)(e);return{container:{[Jh.variable]:p6(e),[Ba.variable]:`colors.${n}`,pt:"2",borderTopWidth:"4px",borderTopColor:Ba.reference}}}),w1e=Qh(e=>{const{colorScheme:t}=e,n=oe(`${t}.500`,`${t}.200`)(e),r=oe("white","gray.900")(e);return{container:{[Jh.variable]:`colors.${n}`,[Ba.variable]:`colors.${r}`,color:Ba.reference}}}),C1e={subtle:b1e,"left-accent":x1e,"top-accent":S1e,solid:w1e},k1e=v1e({baseStyle:y1e,variants:C1e,defaultProps:{variant:"subtle",colorScheme:"blue"}}),PN={px:"1px",.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",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"},E1e={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",prose:"60ch"},I1e={sm:"640px",md:"768px",lg:"1024px",xl:"1280px"},T1e={...PN,...E1e,container:I1e},ON=T1e,_1e=e=>typeof e=="function";function cn(e,...t){return _1e(e)?e(...t):e}var{definePartsStyle:MN,defineMultiStyleConfig:P1e}=zt(che.keys),O1e=e=>({borderRadius:"full",border:"0.2em solid",borderColor:oe("white","gray.800")(e)}),M1e=e=>({bg:oe("gray.200","whiteAlpha.400")(e)}),R1e=e=>{const{name:t,theme:n}=e,r=t?Qhe({string:t}):"gray.400",i=Zhe(r)(n);let o="white";i||(o="gray.800");const a=oe("white","gray.800")(e);return{bg:r,color:o,borderColor:a,verticalAlign:"top"}},D1e=MN(e=>({badge:cn(O1e,e),excessLabel:cn(M1e,e),container:cn(R1e,e)}));function es(e){const t=e!=="100%"?ON[e]:void 0;return MN({container:{width:e,height:e,fontSize:`calc(${t!=null?t:e} / 2.5)`},excessLabel:{width:e,height:e},label:{fontSize:`calc(${t!=null?t:e} / 2.5)`,lineHeight:e!=="100%"?t!=null?t:e:void 0}})}var A1e={"2xs":es(4),xs:es(6),sm:es(8),md:es(12),lg:es(16),xl:es(24),"2xl":es(32),full:es("100%")},L1e=P1e({baseStyle:D1e,sizes:A1e,defaultProps:{size:"md"}}),B1e={px:1,textTransform:"uppercase",fontSize:"xs",borderRadius:"sm",fontWeight:"bold"},$1e=e=>{const{colorScheme:t,theme:n}=e,r=wd(`${t}.500`,.6)(n);return{bg:oe(`${t}.500`,r)(e),color:oe("white","whiteAlpha.800")(e)}},F1e=e=>{const{colorScheme:t,theme:n}=e,r=wd(`${t}.200`,.16)(n);return{bg:oe(`${t}.100`,r)(e),color:oe(`${t}.800`,`${t}.200`)(e)}},N1e=e=>{const{colorScheme:t,theme:n}=e,r=wd(`${t}.200`,.8)(n),i=Dn(n,`${t}.500`),o=oe(i,r)(e);return{color:o,boxShadow:`inset 0 0 0px 1px ${o}`}},z1e={solid:$1e,subtle:F1e,outline:N1e},yp={baseStyle:B1e,variants:z1e,defaultProps:{variant:"subtle",colorScheme:"gray"}},{defineMultiStyleConfig:j1e,definePartsStyle:H1e}=zt(uhe.keys),V1e={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},W1e=H1e({link:V1e}),U1e=j1e({baseStyle:W1e}),G1e={lineHeight:"1.2",borderRadius:"md",fontWeight:"semibold",transitionProperty:"common",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{_disabled:{bg:"initial"}}},RN=e=>{const{colorScheme:t,theme:n}=e;if(t==="gray")return{color:oe("inherit","whiteAlpha.900")(e),_hover:{bg:oe("gray.100","whiteAlpha.200")(e)},_active:{bg:oe("gray.200","whiteAlpha.300")(e)}};const r=wd(`${t}.200`,.12)(n),i=wd(`${t}.200`,.24)(n);return{color:oe(`${t}.600`,`${t}.200`)(e),bg:"transparent",_hover:{bg:oe(`${t}.50`,r)(e)},_active:{bg:oe(`${t}.100`,i)(e)}}},K1e=e=>{const{colorScheme:t}=e,n=oe("gray.200","whiteAlpha.300")(e);return{border:"1px solid",borderColor:t==="gray"?n:"currentColor",".chakra-button__group[data-attached] > &:not(:last-of-type)":{marginEnd:"-1px"},...cn(RN,e)}},q1e={yellow:{bg:"yellow.400",color:"black",hoverBg:"yellow.500",activeBg:"yellow.600"},cyan:{bg:"cyan.400",color:"black",hoverBg:"cyan.500",activeBg:"cyan.600"}},Y1e=e=>{var s;const{colorScheme:t}=e;if(t==="gray"){const l=oe("gray.100","whiteAlpha.200")(e);return{bg:l,_hover:{bg:oe("gray.200","whiteAlpha.300")(e),_disabled:{bg:l}},_active:{bg:oe("gray.300","whiteAlpha.400")(e)}}}const{bg:n=`${t}.500`,color:r="white",hoverBg:i=`${t}.600`,activeBg:o=`${t}.700`}=(s=q1e[t])!=null?s:{},a=oe(n,`${t}.200`)(e);return{bg:a,color:oe(r,"gray.800")(e),_hover:{bg:oe(i,`${t}.300`)(e),_disabled:{bg:a}},_active:{bg:oe(o,`${t}.400`)(e)}}},X1e=e=>{const{colorScheme:t}=e;return{padding:0,height:"auto",lineHeight:"normal",verticalAlign:"baseline",color:oe(`${t}.500`,`${t}.200`)(e),_hover:{textDecoration:"underline",_disabled:{textDecoration:"none"}},_active:{color:oe(`${t}.700`,`${t}.500`)(e)}}},Z1e={bg:"none",color:"inherit",display:"inline",lineHeight:"inherit",m:"0",p:"0"},Q1e={ghost:RN,outline:K1e,solid:Y1e,link:X1e,unstyled:Z1e},J1e={lg:{h:"12",minW:"12",fontSize:"lg",px:"6"},md:{h:"10",minW:"10",fontSize:"md",px:"4"},sm:{h:"8",minW:"8",fontSize:"sm",px:"3"},xs:{h:"6",minW:"6",fontSize:"xs",px:"2"}},eme={baseStyle:G1e,variants:Q1e,sizes:J1e,defaultProps:{variant:"solid",size:"md",colorScheme:"gray"}},{definePartsStyle:Sg,defineMultiStyleConfig:tme}=zt(dhe.keys),bp=nl("checkbox-size"),nme=e=>{const{colorScheme:t}=e;return{w:bp.reference,h:bp.reference,transitionProperty:"box-shadow",transitionDuration:"normal",border:"2px solid",borderRadius:"sm",borderColor:"inherit",color:"white",_checked:{bg:oe(`${t}.500`,`${t}.200`)(e),borderColor:oe(`${t}.500`,`${t}.200`)(e),color:oe("white","gray.900")(e),_hover:{bg:oe(`${t}.600`,`${t}.300`)(e),borderColor:oe(`${t}.600`,`${t}.300`)(e)},_disabled:{borderColor:oe("gray.200","transparent")(e),bg:oe("gray.200","whiteAlpha.300")(e),color:oe("gray.500","whiteAlpha.500")(e)}},_indeterminate:{bg:oe(`${t}.500`,`${t}.200`)(e),borderColor:oe(`${t}.500`,`${t}.200`)(e),color:oe("white","gray.900")(e)},_disabled:{bg:oe("gray.100","whiteAlpha.100")(e),borderColor:oe("gray.100","transparent")(e)},_focusVisible:{boxShadow:"outline"},_invalid:{borderColor:oe("red.500","red.300")(e)}}},rme={_disabled:{cursor:"not-allowed"}},ime={userSelect:"none",_disabled:{opacity:.4}},ome={transitionProperty:"transform",transitionDuration:"normal"},ame=Sg(e=>({icon:ome,container:rme,control:cn(nme,e),label:ime})),sme={sm:Sg({control:{[bp.variable]:"sizes.3"},label:{fontSize:"sm"},icon:{fontSize:"3xs"}}),md:Sg({control:{[bp.variable]:"sizes.4"},label:{fontSize:"md"},icon:{fontSize:"2xs"}}),lg:Sg({control:{[bp.variable]:"sizes.5"},label:{fontSize:"lg"},icon:{fontSize:"2xs"}})},j0=tme({baseStyle:ame,sizes:sme,defaultProps:{size:"md",colorScheme:"blue"}}),xp=Gr("close-button-size"),lme=e=>{const t=oe("blackAlpha.100","whiteAlpha.100")(e),n=oe("blackAlpha.200","whiteAlpha.200")(e);return{w:[xp.reference],h:[xp.reference],borderRadius:"md",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed",boxShadow:"none"},_hover:{bg:t},_active:{bg:n},_focusVisible:{boxShadow:"outline"}}},cme={lg:{[xp.variable]:"sizes.10",fontSize:"md"},md:{[xp.variable]:"sizes.8",fontSize:"xs"},sm:{[xp.variable]:"sizes.6",fontSize:"2xs"}},ume={baseStyle:lme,sizes:cme,defaultProps:{size:"md"}},{variants:dme,defaultProps:fme}=yp,pme={fontFamily:"mono",fontSize:"sm",px:"0.2em",borderRadius:"sm"},hme={baseStyle:pme,variants:dme,defaultProps:fme},mme={w:"100%",mx:"auto",maxW:"prose",px:"4"},gme={baseStyle:mme},vme={opacity:.6,borderColor:"inherit"},yme={borderStyle:"solid"},bme={borderStyle:"dashed"},xme={solid:yme,dashed:bme},Sme={baseStyle:vme,variants:xme,defaultProps:{variant:"solid"}},{definePartsStyle:LS,defineMultiStyleConfig:wme}=zt(fhe.keys);function qc(e){return LS(e==="full"?{dialog:{maxW:"100vw",h:"100vh"}}:{dialog:{maxW:e}})}var Cme={bg:"blackAlpha.600",zIndex:"overlay"},kme={display:"flex",zIndex:"modal",justifyContent:"center"},Eme=e=>{const{isFullHeight:t}=e;return{...t&&{height:"100vh"},zIndex:"modal",maxH:"100vh",bg:oe("white","gray.700")(e),color:"inherit",boxShadow:oe("lg","dark-lg")(e)}},Ime={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Tme={position:"absolute",top:"2",insetEnd:"3"},_me={px:"6",py:"2",flex:"1",overflow:"auto"},Pme={px:"6",py:"4"},Ome=LS(e=>({overlay:Cme,dialogContainer:kme,dialog:cn(Eme,e),header:Ime,closeButton:Tme,body:_me,footer:Pme})),Mme={xs:qc("xs"),sm:qc("md"),md:qc("lg"),lg:qc("2xl"),xl:qc("4xl"),full:qc("full")},Rme=wme({baseStyle:Ome,sizes:Mme,defaultProps:{size:"xs"}}),{definePartsStyle:Dme,defineMultiStyleConfig:Ame}=zt(phe.keys),Lme={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal"},Bme={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},$me={borderRadius:"md",py:"1",transitionProperty:"common",transitionDuration:"normal",width:"full",_focusVisible:{boxShadow:"outline"},_placeholder:{opacity:.6}},Fme=Dme({preview:Lme,input:Bme,textarea:$me}),Nme=Ame({baseStyle:Fme}),{definePartsStyle:zme,defineMultiStyleConfig:jme}=zt(hhe.keys),Hme=e=>({marginStart:"1",color:oe("red.500","red.300")(e)}),Vme=e=>({mt:"2",color:oe("gray.600","whiteAlpha.600")(e),lineHeight:"normal",fontSize:"sm"}),Wme=zme(e=>({container:{width:"100%",position:"relative"},requiredIndicator:cn(Hme,e),helperText:cn(Vme,e)})),Ume=jme({baseStyle:Wme}),{definePartsStyle:Gme,defineMultiStyleConfig:Kme}=zt(mhe.keys),qme=e=>({color:oe("red.500","red.300")(e),mt:"2",fontSize:"sm",lineHeight:"normal"}),Yme=e=>({marginEnd:"0.5em",color:oe("red.500","red.300")(e)}),Xme=Gme(e=>({text:cn(qme,e),icon:cn(Yme,e)})),Zme=Kme({baseStyle:Xme}),Qme={fontSize:"md",marginEnd:"3",mb:"2",fontWeight:"medium",transitionProperty:"common",transitionDuration:"normal",opacity:1,_disabled:{opacity:.4}},Jme={baseStyle:Qme},ege={fontFamily:"heading",fontWeight:"bold"},tge={"4xl":{fontSize:["6xl",null,"7xl"],lineHeight:1},"3xl":{fontSize:["5xl",null,"6xl"],lineHeight:1},"2xl":{fontSize:["4xl",null,"5xl"],lineHeight:[1.2,null,1]},xl:{fontSize:["3xl",null,"4xl"],lineHeight:[1.33,null,1.2]},lg:{fontSize:["2xl",null,"3xl"],lineHeight:[1.33,null,1.2]},md:{fontSize:"xl",lineHeight:1.2},sm:{fontSize:"md",lineHeight:1.2},xs:{fontSize:"sm",lineHeight:1.2}},nge={baseStyle:ege,sizes:tge,defaultProps:{size:"xl"}},{definePartsStyle:ka,defineMultiStyleConfig:rge}=zt(ghe.keys),ige=ka({field:{width:"100%",minWidth:0,outline:0,position:"relative",appearance:"none",transitionProperty:"common",transitionDuration:"normal",_disabled:{opacity:.4,cursor:"not-allowed"}}}),ts={lg:{fontSize:"lg",px:"4",h:"12",borderRadius:"md"},md:{fontSize:"md",px:"4",h:"10",borderRadius:"md"},sm:{fontSize:"sm",px:"3",h:"8",borderRadius:"sm"},xs:{fontSize:"xs",px:"2",h:"6",borderRadius:"sm"}},oge={lg:ka({field:ts.lg,addon:ts.lg}),md:ka({field:ts.md,addon:ts.md}),sm:ka({field:ts.sm,addon:ts.sm}),xs:ka({field:ts.xs,addon:ts.xs})};function h6(e){const{focusBorderColor:t,errorBorderColor:n}=e;return{focusBorderColor:t||oe("blue.500","blue.300")(e),errorBorderColor:n||oe("red.500","red.300")(e)}}var age=ka(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=h6(e);return{field:{border:"1px solid",borderColor:"inherit",bg:"inherit",_hover:{borderColor:oe("gray.300","whiteAlpha.400")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Dn(t,r),boxShadow:`0 0 0 1px ${Dn(t,r)}`},_focusVisible:{zIndex:1,borderColor:Dn(t,n),boxShadow:`0 0 0 1px ${Dn(t,n)}`}},addon:{border:"1px solid",borderColor:oe("inherit","whiteAlpha.50")(e),bg:oe("gray.100","whiteAlpha.300")(e)}}}),sge=ka(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=h6(e);return{field:{border:"2px solid",borderColor:"transparent",bg:oe("gray.100","whiteAlpha.50")(e),_hover:{bg:oe("gray.200","whiteAlpha.100")(e)},_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Dn(t,r)},_focusVisible:{bg:"transparent",borderColor:Dn(t,n)}},addon:{border:"2px solid",borderColor:"transparent",bg:oe("gray.100","whiteAlpha.50")(e)}}}),lge=ka(e=>{const{theme:t}=e,{focusBorderColor:n,errorBorderColor:r}=h6(e);return{field:{borderBottom:"1px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent",_readOnly:{boxShadow:"none !important",userSelect:"all"},_invalid:{borderColor:Dn(t,r),boxShadow:`0px 1px 0px 0px ${Dn(t,r)}`},_focusVisible:{borderColor:Dn(t,n),boxShadow:`0px 1px 0px 0px ${Dn(t,n)}`}},addon:{borderBottom:"2px solid",borderColor:"inherit",borderRadius:"0",px:"0",bg:"transparent"}}}),cge=ka({field:{bg:"transparent",px:"0",height:"auto"},addon:{bg:"transparent",px:"0",height:"auto"}}),uge={outline:age,filled:sge,flushed:lge,unstyled:cge},tt=rge({baseStyle:ige,sizes:oge,variants:uge,defaultProps:{size:"md",variant:"outline"}}),dge=e=>({bg:oe("gray.100","whiteAlpha")(e),borderRadius:"md",borderWidth:"1px",borderBottomWidth:"3px",fontSize:"0.8em",fontWeight:"bold",lineHeight:"normal",px:"0.4em",whiteSpace:"nowrap"}),fge={baseStyle:dge},pge={transitionProperty:"common",transitionDuration:"fast",transitionTimingFunction:"ease-out",cursor:"pointer",textDecoration:"none",outline:"none",color:"inherit",_hover:{textDecoration:"underline"},_focusVisible:{boxShadow:"outline"}},hge={baseStyle:pge},{defineMultiStyleConfig:mge,definePartsStyle:gge}=zt(vhe.keys),vge={marginEnd:"2",display:"inline",verticalAlign:"text-bottom"},yge=gge({icon:vge}),bge=mge({baseStyle:yge}),{defineMultiStyleConfig:xge,definePartsStyle:Sge}=zt(yhe.keys),wge=e=>({bg:oe("#fff","gray.700")(e),boxShadow:oe("sm","dark-lg")(e),color:"inherit",minW:"3xs",py:"2",zIndex:1,borderRadius:"md",borderWidth:"1px"}),Cge=e=>({py:"1.5",px:"3",transitionProperty:"background",transitionDuration:"ultra-fast",transitionTimingFunction:"ease-in",_focus:{bg:oe("gray.100","whiteAlpha.100")(e)},_active:{bg:oe("gray.200","whiteAlpha.200")(e)},_expanded:{bg:oe("gray.100","whiteAlpha.100")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),kge={mx:4,my:2,fontWeight:"semibold",fontSize:"sm"},Ege={opacity:.6},Ige={border:0,borderBottom:"1px solid",borderColor:"inherit",my:"2",opacity:.6},Tge={transitionProperty:"common",transitionDuration:"normal"},_ge=Sge(e=>({button:Tge,list:cn(wge,e),item:cn(Cge,e),groupTitle:kge,command:Ege,divider:Ige})),Pge=xge({baseStyle:_ge}),{defineMultiStyleConfig:Oge,definePartsStyle:BS}=zt(bhe.keys),Mge={bg:"blackAlpha.600",zIndex:"modal"},Rge=e=>{const{isCentered:t,scrollBehavior:n}=e;return{display:"flex",zIndex:"modal",justifyContent:"center",alignItems:t?"center":"flex-start",overflow:n==="inside"?"hidden":"auto"}},Dge=e=>{const{scrollBehavior:t}=e;return{borderRadius:"md",bg:oe("white","gray.700")(e),color:"inherit",my:"16",zIndex:"modal",maxH:t==="inside"?"calc(100% - 7.5rem)":void 0,boxShadow:oe("lg","dark-lg")(e)}},Age={px:"6",py:"4",fontSize:"xl",fontWeight:"semibold"},Lge={position:"absolute",top:"2",insetEnd:"3"},Bge=e=>{const{scrollBehavior:t}=e;return{px:"6",py:"2",flex:"1",overflow:t==="inside"?"auto":void 0}},$ge={px:"6",py:"4"},Fge=BS(e=>({overlay:Mge,dialogContainer:cn(Rge,e),dialog:cn(Dge,e),header:Age,closeButton:Lge,body:cn(Bge,e),footer:$ge}));function Qi(e){return BS(e==="full"?{dialog:{maxW:"100vw",minH:"$100vh",my:"0",borderRadius:"0"}}:{dialog:{maxW:e}})}var Nge={xs:Qi("xs"),sm:Qi("sm"),md:Qi("md"),lg:Qi("lg"),xl:Qi("xl"),"2xl":Qi("2xl"),"3xl":Qi("3xl"),"4xl":Qi("4xl"),"5xl":Qi("5xl"),"6xl":Qi("6xl"),full:Qi("full")},zge=Oge({baseStyle:Fge,sizes:Nge,defaultProps:{size:"md"}}),jge={letterSpacings:{tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},lineHeights:{normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fontWeights:{hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},fonts:{heading:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',body:'-apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',mono:'SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'},fontSizes:{"3xs":"0.45rem","2xs":"0.625rem",xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"}},DN=jge,{defineMultiStyleConfig:Hge,definePartsStyle:AN}=zt(xhe.keys),m6=Gr("number-input-stepper-width"),LN=Gr("number-input-input-padding"),Vge=ba(m6).add("0.5rem").toString(),Wge={[m6.variable]:"sizes.6",[LN.variable]:Vge},Uge=e=>{var n;var t;return(n=(t=cn(tt.baseStyle,e))==null?void 0:t.field)!=null?n:{}},Gge={width:[m6.reference]},Kge=e=>({borderStart:"1px solid",borderStartColor:oe("inherit","whiteAlpha.300")(e),color:oe("inherit","whiteAlpha.800")(e),_active:{bg:oe("gray.200","whiteAlpha.300")(e)},_disabled:{opacity:.4,cursor:"not-allowed"}}),qge=AN(e=>{var t;return{root:Wge,field:Uge,stepperGroup:Gge,stepper:(t=cn(Kge,e))!=null?t:{}}});function hm(e){var s;var t,n;const r=(t=tt.sizes)==null?void 0:t[e],i={lg:"md",md:"md",sm:"sm",xs:"sm"},o=(s=(n=r.field)==null?void 0:n.fontSize)!=null?s:"md",a=DN.fontSizes[o];return AN({field:{...r.field,paddingInlineEnd:LN.reference,verticalAlign:"top"},stepper:{fontSize:ba(a).multiply(.75).toString(),_first:{borderTopEndRadius:i[e]},_last:{borderBottomEndRadius:i[e],mt:"-1px",borderTopWidth:1}}})}var Yge={xs:hm("xs"),sm:hm("sm"),md:hm("md"),lg:hm("lg")},Xge=Hge({baseStyle:qge,sizes:Yge,variants:tt.variants,defaultProps:tt.defaultProps}),_T,Zge={...(_T=tt.baseStyle)==null?void 0:_T.field,textAlign:"center"},Qge={lg:{fontSize:"lg",w:12,h:12,borderRadius:"md"},md:{fontSize:"md",w:10,h:10,borderRadius:"md"},sm:{fontSize:"sm",w:8,h:8,borderRadius:"sm"},xs:{fontSize:"xs",w:6,h:6,borderRadius:"sm"}},PT,NM,Jge={outline:e=>{var r;var t,n;return(r=(n=cn((t=tt.variants)==null?void 0:t.outline,e))==null?void 0:n.field)!=null?r:{}},flushed:e=>{var r;var t,n;return(r=(n=cn((t=tt.variants)==null?void 0:t.flushed,e))==null?void 0:n.field)!=null?r:{}},filled:e=>{var r;var t,n;return(r=(n=cn((t=tt.variants)==null?void 0:t.filled,e))==null?void 0:n.field)!=null?r:{}},unstyled:(NM=(PT=tt.variants)==null?void 0:PT.unstyled.field)!=null?NM:{}},e0e={baseStyle:Zge,sizes:Qge,variants:Jge,defaultProps:tt.defaultProps},{defineMultiStyleConfig:t0e,definePartsStyle:n0e}=zt(She.keys),b5=Gr("popper-bg"),r0e=Gr("popper-arrow-bg"),i0e=Gr("popper-arrow-shadow-color"),o0e={zIndex:10},a0e=e=>{const t=oe("white","gray.700")(e),n=oe("gray.200","whiteAlpha.300")(e);return{[b5.variable]:`colors.${t}`,bg:b5.reference,[r0e.variable]:b5.reference,[i0e.variable]:`colors.${n}`,width:"xs",border:"1px solid",borderColor:"inherit",borderRadius:"md",boxShadow:"sm",zIndex:"inherit",_focusVisible:{outline:0,boxShadow:"outline"}}},s0e={px:3,py:2,borderBottomWidth:"1px"},l0e={px:3,py:2},c0e={px:3,py:2,borderTopWidth:"1px"},u0e={position:"absolute",borderRadius:"md",top:1,insetEnd:2,padding:2},d0e=n0e(e=>({popper:o0e,content:a0e(e),header:s0e,body:l0e,footer:c0e,closeButton:u0e})),f0e=t0e({baseStyle:d0e}),{defineMultiStyleConfig:p0e,definePartsStyle:Uf}=zt(whe.keys),h0e=e=>{const{colorScheme:t,theme:n,isIndeterminate:r,hasStripe:i}=e,o=oe(CT(),CT("1rem","rgba(0,0,0,0.1)"))(e),a=oe(`${t}.500`,`${t}.200`)(e),s=`linear-gradient(
    to right,
    transparent 0%,
    ${Dn(n,a)} 50%,
    transparent 100%
  )`;return{...!r&&i&&o,...r?{bgImage:s}:{bgColor:a}}},m0e={lineHeight:"1",fontSize:"0.25em",fontWeight:"bold",color:"white"},g0e=e=>({bg:oe("gray.100","whiteAlpha.300")(e)}),v0e=e=>({transitionProperty:"common",transitionDuration:"slow",...h0e(e)}),y0e=Uf(e=>({label:m0e,filledTrack:v0e(e),track:g0e(e)})),b0e={xs:Uf({track:{h:"1"}}),sm:Uf({track:{h:"2"}}),md:Uf({track:{h:"3"}}),lg:Uf({track:{h:"4"}})},x0e=p0e({sizes:b0e,baseStyle:y0e,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:S0e,definePartsStyle:wg}=zt(Che.keys),w0e=e=>{var t;const n=(t=cn(j0.baseStyle,e))==null?void 0:t.control;return{...n,borderRadius:"full",_checked:{...n==null?void 0:n._checked,_before:{content:'""',display:"inline-block",pos:"relative",w:"50%",h:"50%",borderRadius:"50%",bg:"currentColor"}}}},C0e=wg(e=>{var t,n,r,i;return{label:(n=(t=j0).baseStyle)==null?void 0:n.call(t,e).label,container:(i=(r=j0).baseStyle)==null?void 0:i.call(r,e).container,control:w0e(e)}}),k0e={md:wg({control:{w:"4",h:"4"},label:{fontSize:"md"}}),lg:wg({control:{w:"5",h:"5"},label:{fontSize:"lg"}}),sm:wg({control:{width:"3",height:"3"},label:{fontSize:"sm"}})},E0e=S0e({baseStyle:C0e,sizes:k0e,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:I0e,definePartsStyle:T0e}=zt(khe.keys),_0e=e=>{var t;return{...(t=tt.baseStyle)==null?void 0:t.field,bg:oe("white","gray.700")(e),appearance:"none",paddingBottom:"1px",lineHeight:"normal","> option, > optgroup":{bg:oe("white","gray.700")(e)}}},P0e={width:"6",height:"100%",insetEnd:"2",position:"relative",color:"currentColor",fontSize:"xl",_disabled:{opacity:.5}},O0e=T0e(e=>({field:_0e(e),icon:P0e})),mm={paddingInlineEnd:"8"},OT,MT,RT,DT,AT,LT,BT,$T,M0e={lg:{...(OT=tt.sizes)==null?void 0:OT.lg,field:{...(MT=tt.sizes)==null?void 0:MT.lg.field,...mm}},md:{...(RT=tt.sizes)==null?void 0:RT.md,field:{...(DT=tt.sizes)==null?void 0:DT.md.field,...mm}},sm:{...(AT=tt.sizes)==null?void 0:AT.sm,field:{...(LT=tt.sizes)==null?void 0:LT.sm.field,...mm}},xs:{...(BT=tt.sizes)==null?void 0:BT.xs,field:{...($T=tt.sizes)==null?void 0:$T.xs.field,...mm},icon:{insetEnd:"1"}}},R0e=I0e({baseStyle:O0e,sizes:M0e,variants:tt.variants,defaultProps:tt.defaultProps}),D0e=nl("skeleton-start-color"),A0e=nl("skeleton-end-color"),L0e=e=>{const t=oe("gray.100","gray.800")(e),n=oe("gray.400","gray.600")(e),{startColor:r=t,endColor:i=n,theme:o}=e,a=Dn(o,r),s=Dn(o,i);return{[D0e.variable]:a,[A0e.variable]:s,opacity:.7,borderRadius:"2px",borderColor:a,background:s}},B0e={baseStyle:L0e},$0e=e=>({borderRadius:"md",fontWeight:"semibold",_focusVisible:{boxShadow:"outline",padding:"4",position:"fixed",top:"6",insetStart:"6",bg:oe("white","gray.700")(e)}}),F0e={baseStyle:$0e},{defineMultiStyleConfig:N0e,definePartsStyle:t2}=zt(Ehe.keys),fh=nl("slider-thumb-size"),ph=nl("slider-track-size"),z0e=e=>{const{orientation:t}=e;return{display:"inline-block",position:"relative",cursor:"pointer",_disabled:{opacity:.6,cursor:"default",pointerEvents:"none"},...f6({orientation:t,vertical:{h:"100%"},horizontal:{w:"100%"}})}},j0e=e=>({...f6({orientation:e.orientation,horizontal:{h:ph.reference},vertical:{w:ph.reference}}),overflow:"hidden",borderRadius:"sm",bg:oe("gray.200","whiteAlpha.200")(e),_disabled:{bg:oe("gray.300","whiteAlpha.300")(e)}}),H0e=e=>{const{orientation:t}=e;return{...f6({orientation:t,vertical:{left:"50%",transform:"translateX(-50%)",_active:{transform:"translateX(-50%) scale(1.15)"}},horizontal:{top:"50%",transform:"translateY(-50%)",_active:{transform:"translateY(-50%) scale(1.15)"}}}),w:fh.reference,h:fh.reference,display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",outline:0,zIndex:1,borderRadius:"full",bg:"white",boxShadow:"base",border:"1px solid",borderColor:"transparent",transitionProperty:"transform",transitionDuration:"normal",_focusVisible:{boxShadow:"outline"},_disabled:{bg:"gray.300"}}},V0e=e=>{const{colorScheme:t}=e;return{width:"inherit",height:"inherit",bg:oe(`${t}.500`,`${t}.200`)(e)}},W0e=t2(e=>({container:z0e(e),track:j0e(e),thumb:H0e(e),filledTrack:V0e(e)})),U0e=t2({container:{[fh.variable]:"sizes.4",[ph.variable]:"sizes.1"}}),G0e=t2({container:{[fh.variable]:"sizes.3.5",[ph.variable]:"sizes.1"}}),K0e=t2({container:{[fh.variable]:"sizes.2.5",[ph.variable]:"sizes.0.5"}}),q0e={lg:U0e,md:G0e,sm:K0e},Y0e=N0e({baseStyle:W0e,sizes:q0e,defaultProps:{size:"md",colorScheme:"blue"}}),Al=Gr("spinner-size"),X0e={width:[Al.reference],height:[Al.reference]},Z0e={xs:{[Al.variable]:"sizes.3"},sm:{[Al.variable]:"sizes.4"},md:{[Al.variable]:"sizes.6"},lg:{[Al.variable]:"sizes.8"},xl:{[Al.variable]:"sizes.12"}},Q0e={baseStyle:X0e,sizes:Z0e,defaultProps:{size:"md"}},{defineMultiStyleConfig:J0e,definePartsStyle:BN}=zt(Ihe.keys),eve={fontWeight:"medium"},tve={opacity:.8,marginBottom:"2"},nve={verticalAlign:"baseline",fontWeight:"semibold"},rve={marginEnd:1,w:"3.5",h:"3.5",verticalAlign:"middle"},ive=BN({container:{},label:eve,helpText:tve,number:nve,icon:rve}),ove={md:BN({label:{fontSize:"sm"},helpText:{fontSize:"sm"},number:{fontSize:"2xl"}})},ave=J0e({baseStyle:ive,sizes:ove,defaultProps:{size:"md"}}),{defineMultiStyleConfig:sve,definePartsStyle:Cg}=zt(The.keys),Sp=Gr("switch-track-width"),ec=Gr("switch-track-height"),x5=Gr("switch-track-diff"),lve=ba.subtract(Sp,ec),$S=Gr("switch-thumb-x"),cve=e=>{const{colorScheme:t}=e;return{borderRadius:"full",p:"0.5",width:[Sp.reference],height:[ec.reference],transitionProperty:"common",transitionDuration:"fast",bg:oe("gray.300","whiteAlpha.400")(e),_focusVisible:{boxShadow:"outline"},_disabled:{opacity:.4,cursor:"not-allowed"},_checked:{bg:oe(`${t}.500`,`${t}.200`)(e)}}},uve={bg:"white",transitionProperty:"transform",transitionDuration:"normal",borderRadius:"inherit",width:[ec.reference],height:[ec.reference],_checked:{transform:`translateX(${$S.reference})`}},dve=Cg(e=>({container:{[x5.variable]:lve,[$S.variable]:x5.reference,_rtl:{[$S.variable]:ba(x5).negate().toString()}},track:cve(e),thumb:uve})),fve={sm:Cg({container:{[Sp.variable]:"1.375rem",[ec.variable]:"sizes.3"}}),md:Cg({container:{[Sp.variable]:"1.875rem",[ec.variable]:"sizes.4"}}),lg:Cg({container:{[Sp.variable]:"2.875rem",[ec.variable]:"sizes.6"}})},pve=sve({baseStyle:dve,sizes:fve,defaultProps:{size:"md",colorScheme:"blue"}}),{defineMultiStyleConfig:hve,definePartsStyle:Qu}=zt(_he.keys),mve=Qu({table:{fontVariantNumeric:"lining-nums tabular-nums",borderCollapse:"collapse",width:"full"},th:{fontFamily:"heading",fontWeight:"bold",textTransform:"uppercase",letterSpacing:"wider",textAlign:"start"},td:{textAlign:"start"},caption:{mt:4,fontFamily:"heading",textAlign:"center",fontWeight:"medium"}}),H0={"&[data-is-numeric=true]":{textAlign:"end"}},gve=Qu(e=>{const{colorScheme:t}=e;return{th:{color:oe("gray.600","gray.400")(e),borderBottom:"1px",borderColor:oe(`${t}.100`,`${t}.700`)(e),...H0},td:{borderBottom:"1px",borderColor:oe(`${t}.100`,`${t}.700`)(e),...H0},caption:{color:oe("gray.600","gray.100")(e)},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),vve=Qu(e=>{const{colorScheme:t}=e;return{th:{color:oe("gray.600","gray.400")(e),borderBottom:"1px",borderColor:oe(`${t}.100`,`${t}.700`)(e),...H0},td:{borderBottom:"1px",borderColor:oe(`${t}.100`,`${t}.700`)(e),...H0},caption:{color:oe("gray.600","gray.100")(e)},tbody:{tr:{"&:nth-of-type(odd)":{"th, td":{borderBottomWidth:"1px",borderColor:oe(`${t}.100`,`${t}.700`)(e)},td:{background:oe(`${t}.100`,`${t}.700`)(e)}}}},tfoot:{tr:{"&:last-of-type":{th:{borderBottomWidth:0}}}}}}),yve={simple:gve,striped:vve,unstyled:{}},bve={sm:Qu({th:{px:"4",py:"1",lineHeight:"4",fontSize:"xs"},td:{px:"4",py:"2",fontSize:"sm",lineHeight:"4"},caption:{px:"4",py:"2",fontSize:"xs"}}),md:Qu({th:{px:"6",py:"3",lineHeight:"4",fontSize:"xs"},td:{px:"6",py:"4",lineHeight:"5"},caption:{px:"6",py:"2",fontSize:"sm"}}),lg:Qu({th:{px:"8",py:"4",lineHeight:"5",fontSize:"sm"},td:{px:"8",py:"5",lineHeight:"6"},caption:{px:"6",py:"2",fontSize:"md"}})},xve=hve({baseStyle:mve,variants:yve,sizes:bve,defaultProps:{variant:"simple",size:"md",colorScheme:"gray"}}),{defineMultiStyleConfig:Sve,definePartsStyle:Qo}=zt(Phe.keys),wve=e=>{const{orientation:t}=e;return{display:t==="vertical"?"flex":"block"}},Cve=e=>{const{isFitted:t}=e;return{flex:t?1:void 0,transitionProperty:"common",transitionDuration:"normal",_focusVisible:{zIndex:1,boxShadow:"outline"},_disabled:{cursor:"not-allowed",opacity:.4}}},kve=e=>{const{align:t="start",orientation:n}=e;return{justifyContent:{end:"flex-end",center:"center",start:"flex-start"}[t],flexDirection:n==="vertical"?"column":"row"}},Eve={p:4},Ive=Qo(e=>({root:wve(e),tab:Cve(e),tablist:kve(e),tabpanel:Eve})),Tve={sm:Qo({tab:{py:1,px:4,fontSize:"sm"}}),md:Qo({tab:{fontSize:"md",py:2,px:4}}),lg:Qo({tab:{fontSize:"lg",py:3,px:4}})},_ve=Qo(e=>{const{colorScheme:t,orientation:n}=e,r=n==="vertical",i=n==="vertical"?"borderStart":"borderBottom",o=r?"marginStart":"marginBottom";return{tablist:{[i]:"2px solid",borderColor:"inherit"},tab:{[i]:"2px solid",borderColor:"transparent",[o]:"-2px",_selected:{color:oe(`${t}.600`,`${t}.300`)(e),borderColor:"currentColor"},_active:{bg:oe("gray.200","whiteAlpha.300")(e)},_disabled:{_active:{bg:"none"}}}}}),Pve=Qo(e=>{const{colorScheme:t}=e;return{tab:{borderTopRadius:"md",border:"1px solid",borderColor:"transparent",mb:"-1px",_selected:{color:oe(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderBottomColor:oe("white","gray.800")(e)}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Ove=Qo(e=>{const{colorScheme:t}=e;return{tab:{border:"1px solid",borderColor:"inherit",bg:oe("gray.50","whiteAlpha.50")(e),mb:"-1px",_notLast:{marginEnd:"-1px"},_selected:{bg:oe("#fff","gray.800")(e),color:oe(`${t}.600`,`${t}.300`)(e),borderColor:"inherit",borderTopColor:"currentColor",borderBottomColor:"transparent"}},tablist:{mb:"-1px",borderBottom:"1px solid",borderColor:"inherit"}}}),Mve=Qo(e=>{const{colorScheme:t,theme:n}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:"gray.600",_selected:{color:Dn(n,`${t}.700`),bg:Dn(n,`${t}.100`)}}}}),Rve=Qo(e=>{const{colorScheme:t}=e;return{tab:{borderRadius:"full",fontWeight:"semibold",color:oe("gray.600","inherit")(e),_selected:{color:oe("#fff","gray.800")(e),bg:oe(`${t}.600`,`${t}.300`)(e)}}}}),Dve=Qo({}),Ave={line:_ve,enclosed:Pve,"enclosed-colored":Ove,"soft-rounded":Mve,"solid-rounded":Rve,unstyled:Dve},Lve=Sve({baseStyle:Ive,sizes:Tve,variants:Ave,defaultProps:{size:"md",variant:"line",colorScheme:"blue"}}),{defineMultiStyleConfig:Bve,definePartsStyle:tc}=zt(Ohe.keys),$ve={fontWeight:"medium",lineHeight:1.2,outline:0,borderRadius:"md",_focusVisible:{boxShadow:"outline"}},Fve={lineHeight:1.2,overflow:"visible"},Nve={fontSize:"lg",w:"5",h:"5",transitionProperty:"common",transitionDuration:"normal",borderRadius:"full",marginStart:"1.5",marginEnd:"-1",opacity:.5,_disabled:{opacity:.4},_focusVisible:{boxShadow:"outline",bg:"rgba(0, 0, 0, 0.14)"},_hover:{opacity:.8},_active:{opacity:1}},zve=tc({container:$ve,label:Fve,closeButton:Nve}),jve={sm:tc({container:{minH:"5",minW:"5",fontSize:"xs",px:"2"},closeButton:{marginEnd:"-2px",marginStart:"0.35rem"}}),md:tc({container:{minH:"6",minW:"6",fontSize:"sm",px:"2"}}),lg:tc({container:{minH:"8",minW:"8",fontSize:"md",px:"3"}})},Hve={subtle:tc(e=>{var t;return{container:(t=yp.variants)==null?void 0:t.subtle(e)}}),solid:tc(e=>{var t;return{container:(t=yp.variants)==null?void 0:t.solid(e)}}),outline:tc(e=>{var t;return{container:(t=yp.variants)==null?void 0:t.outline(e)}})},Vve=Bve({variants:Hve,baseStyle:zve,sizes:jve,defaultProps:{size:"md",variant:"subtle",colorScheme:"gray"}}),FT,Wve={...(FT=tt.baseStyle)==null?void 0:FT.field,paddingY:"2",minHeight:"20",lineHeight:"short",verticalAlign:"top"},NT,zM,Uve={outline:e=>{var n;var t;return(n=(t=tt.variants)==null?void 0:t.outline(e).field)!=null?n:{}},flushed:e=>{var n;var t;return(n=(t=tt.variants)==null?void 0:t.flushed(e).field)!=null?n:{}},filled:e=>{var n;var t;return(n=(t=tt.variants)==null?void 0:t.filled(e).field)!=null?n:{}},unstyled:(zM=(NT=tt.variants)==null?void 0:NT.unstyled.field)!=null?zM:{}},zT,jT,HT,VT,jM,HM,VM,WM,Gve={xs:(jM=(zT=tt.sizes)==null?void 0:zT.xs.field)!=null?jM:{},sm:(HM=(jT=tt.sizes)==null?void 0:jT.sm.field)!=null?HM:{},md:(VM=(HT=tt.sizes)==null?void 0:HT.md.field)!=null?VM:{},lg:(WM=(VT=tt.sizes)==null?void 0:VT.lg.field)!=null?WM:{}},Kve={baseStyle:Wve,sizes:Gve,variants:Uve,defaultProps:{size:"md",variant:"outline"}},S5=Gr("tooltip-bg"),WT=Gr("tooltip-fg"),qve=Gr("popper-arrow-bg"),Yve=e=>{const t=oe("gray.700","gray.300")(e),n=oe("whiteAlpha.900","gray.900")(e);return{bg:S5.reference,color:WT.reference,[S5.variable]:`colors.${t}`,[WT.variable]:`colors.${n}`,[qve.variable]:S5.reference,px:"2",py:"0.5",borderRadius:"sm",fontWeight:"medium",fontSize:"sm",boxShadow:"md",maxW:"xs",zIndex:"tooltip"}},Xve={baseStyle:Yve},Zve={Accordion:g1e,Alert:k1e,Avatar:L1e,Badge:yp,Breadcrumb:U1e,Button:eme,Checkbox:j0,CloseButton:ume,Code:hme,Container:gme,Divider:Sme,Drawer:Rme,Editable:Nme,Form:Ume,FormError:Zme,FormLabel:Jme,Heading:nge,Input:tt,Kbd:fge,Link:hge,List:bge,Menu:Pge,Modal:zge,NumberInput:Xge,PinInput:e0e,Popover:f0e,Progress:x0e,Radio:E0e,Select:R0e,Skeleton:B0e,SkipLink:F0e,Slider:Y0e,Spinner:Q0e,Stat:ave,Switch:pve,Table:xve,Tabs:Lve,Tag:Vve,Textarea:Kve,Tooltip:Xve},Qve={none:0,"1px":"1px solid","2px":"2px solid","4px":"4px solid","8px":"8px solid"},Jve=Qve,eye={base:"0em",sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},tye=eye,nye={transparent:"transparent",current:"currentColor",black:"#000000",white:"#FFFFFF",whiteAlpha:{50:"rgba(255, 255, 255, 0.04)",100:"rgba(255, 255, 255, 0.06)",200:"rgba(255, 255, 255, 0.08)",300:"rgba(255, 255, 255, 0.16)",400:"rgba(255, 255, 255, 0.24)",500:"rgba(255, 255, 255, 0.36)",600:"rgba(255, 255, 255, 0.48)",700:"rgba(255, 255, 255, 0.64)",800:"rgba(255, 255, 255, 0.80)",900:"rgba(255, 255, 255, 0.92)"},blackAlpha:{50:"rgba(0, 0, 0, 0.04)",100:"rgba(0, 0, 0, 0.06)",200:"rgba(0, 0, 0, 0.08)",300:"rgba(0, 0, 0, 0.16)",400:"rgba(0, 0, 0, 0.24)",500:"rgba(0, 0, 0, 0.36)",600:"rgba(0, 0, 0, 0.48)",700:"rgba(0, 0, 0, 0.64)",800:"rgba(0, 0, 0, 0.80)",900:"rgba(0, 0, 0, 0.92)"},gray:{50:"#F7FAFC",100:"#EDF2F7",200:"#E2E8F0",300:"#CBD5E0",400:"#A0AEC0",500:"#718096",600:"#4A5568",700:"#2D3748",800:"#1A202C",900:"#171923"},red:{50:"#FFF5F5",100:"#FED7D7",200:"#FEB2B2",300:"#FC8181",400:"#F56565",500:"#E53E3E",600:"#C53030",700:"#9B2C2C",800:"#822727",900:"#63171B"},orange:{50:"#FFFAF0",100:"#FEEBC8",200:"#FBD38D",300:"#F6AD55",400:"#ED8936",500:"#DD6B20",600:"#C05621",700:"#9C4221",800:"#7B341E",900:"#652B19"},yellow:{50:"#FFFFF0",100:"#FEFCBF",200:"#FAF089",300:"#F6E05E",400:"#ECC94B",500:"#D69E2E",600:"#B7791F",700:"#975A16",800:"#744210",900:"#5F370E"},green:{50:"#F0FFF4",100:"#C6F6D5",200:"#9AE6B4",300:"#68D391",400:"#48BB78",500:"#38A169",600:"#2F855A",700:"#276749",800:"#22543D",900:"#1C4532"},teal:{50:"#E6FFFA",100:"#B2F5EA",200:"#81E6D9",300:"#4FD1C5",400:"#38B2AC",500:"#319795",600:"#2C7A7B",700:"#285E61",800:"#234E52",900:"#1D4044"},blue:{50:"#ebf8ff",100:"#bee3f8",200:"#90cdf4",300:"#63b3ed",400:"#4299e1",500:"#3182ce",600:"#2b6cb0",700:"#2c5282",800:"#2a4365",900:"#1A365D"},cyan:{50:"#EDFDFD",100:"#C4F1F9",200:"#9DECF9",300:"#76E4F7",400:"#0BC5EA",500:"#00B5D8",600:"#00A3C4",700:"#0987A0",800:"#086F83",900:"#065666"},purple:{50:"#FAF5FF",100:"#E9D8FD",200:"#D6BCFA",300:"#B794F4",400:"#9F7AEA",500:"#805AD5",600:"#6B46C1",700:"#553C9A",800:"#44337A",900:"#322659"},pink:{50:"#FFF5F7",100:"#FED7E2",200:"#FBB6CE",300:"#F687B3",400:"#ED64A6",500:"#D53F8C",600:"#B83280",700:"#97266D",800:"#702459",900:"#521B41"},linkedin:{50:"#E8F4F9",100:"#CFEDFB",200:"#9BDAF3",300:"#68C7EC",400:"#34B3E4",500:"#00A0DC",600:"#008CC9",700:"#0077B5",800:"#005E93",900:"#004471"},facebook:{50:"#E8F4F9",100:"#D9DEE9",200:"#B7C2DA",300:"#6482C0",400:"#4267B2",500:"#385898",600:"#314E89",700:"#29487D",800:"#223B67",900:"#1E355B"},messenger:{50:"#D0E6FF",100:"#B9DAFF",200:"#A2CDFF",300:"#7AB8FF",400:"#2E90FF",500:"#0078FF",600:"#0063D1",700:"#0052AC",800:"#003C7E",900:"#002C5C"},whatsapp:{50:"#dffeec",100:"#b9f5d0",200:"#90edb3",300:"#65e495",400:"#3cdd78",500:"#22c35e",600:"#179848",700:"#0c6c33",800:"#01421c",900:"#001803"},twitter:{50:"#E5F4FD",100:"#C8E9FB",200:"#A8DCFA",300:"#83CDF7",400:"#57BBF5",500:"#1DA1F2",600:"#1A94DA",700:"#1681BF",800:"#136B9E",900:"#0D4D71"},telegram:{50:"#E3F2F9",100:"#C5E4F3",200:"#A2D4EC",300:"#7AC1E4",400:"#47A9DA",500:"#0088CC",600:"#007AB8",700:"#006BA1",800:"#005885",900:"#003F5E"}},rye=nye,iye={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},oye=iye,aye={xs:"0 0 0 1px rgba(0, 0, 0, 0.05)",sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)","2xl":"0 25px 50px -12px rgba(0, 0, 0, 0.25)",outline:"0 0 0 3px rgba(66, 153, 225, 0.6)",inner:"inset 0 2px 4px 0 rgba(0,0,0,0.06)",none:"none","dark-lg":"rgba(0, 0, 0, 0.1) 0px 0px 0px 1px, rgba(0, 0, 0, 0.2) 0px 5px 10px, rgba(0, 0, 0, 0.4) 0px 15px 40px"},sye=aye,lye={common:"background-color, border-color, color, fill, stroke, opacity, box-shadow, transform",colors:"background-color, border-color, color, fill, stroke",dimensions:"width, height",position:"left, right, top, bottom",background:"background-color, background-image, background-position"},cye={"ease-in":"cubic-bezier(0.4, 0, 1, 1)","ease-out":"cubic-bezier(0, 0, 0.2, 1)","ease-in-out":"cubic-bezier(0.4, 0, 0.2, 1)"},uye={"ultra-fast":"50ms",faster:"100ms",fast:"150ms",normal:"200ms",slow:"300ms",slower:"400ms","ultra-slow":"500ms"},dye={property:lye,easing:cye,duration:uye},fye=dye,pye={hide:-1,auto:"auto",base:0,docked:10,dropdown:1e3,sticky:1100,banner:1200,overlay:1300,modal:1400,popover:1500,skipLink:1600,toast:1700,tooltip:1800},hye=pye,mye={none:0,sm:"4px",base:"8px",md:"12px",lg:"16px",xl:"24px","2xl":"40px","3xl":"64px"},gye=mye,vye={breakpoints:tye,zIndices:hye,radii:oye,blur:gye,colors:rye,...DN,sizes:ON,shadows:sye,space:PN,borders:Jve,transition:fye},yye={colors:{"chakra-body-text":{_light:"gray.800",_dark:"whiteAlpha.900"},"chakra-body-bg":{_light:"white",_dark:"gray.800"},"chakra-border-color":{_light:"gray.200",_dark:"whiteAlpha.300"},"chakra-placeholder-color":{_light:"gray.500",_dark:"whiteAlpha.400"}}},bye={global:{body:{fontFamily:"body",color:"chakra-body-text",bg:"chakra-body-bg",transitionProperty:"background-color",transitionDuration:"normal",lineHeight:"base"},"*::placeholder":{color:"chakra-placeholder-color"},"*, *::before, &::after":{borderColor:"chakra-border-color",wordWrap:"break-word"}}};function xye(e){const t=typeof e;return e!=null&&(t==="object"||t==="function")&&!Array.isArray(e)}var Sye=["borders","breakpoints","colors","components","config","direction","fonts","fontSizes","fontWeights","letterSpacings","lineHeights","radii","shadows","sizes","space","styles","transition","zIndices"];function wye(e){return xye(e)?Sye.every(t=>Object.prototype.hasOwnProperty.call(e,t)):!1}var Cye="ltr",kye={useSystemColorMode:!1,initialColorMode:"light",cssVarPrefix:"chakra"},Ln={semanticTokens:yye,direction:Cye,...vye,components:Zve,styles:bye,config:kye},Eye=Ln;function Iye(e,t){const n=og(e);h.exports.useEffect(()=>{if(t==null)return;let r=null;return r=window.setTimeout(()=>{n()},t),()=>{r&&window.clearTimeout(r)}},[t,n])}function FS(e,...t){return Tye(e)?e(...t):e}var Tye=e=>typeof e=="function";function _ye(e,t){var o;const n=e!=null?e:"bottom",i={"top-start":{ltr:"top-left",rtl:"top-right"},"top-end":{ltr:"top-right",rtl:"top-left"},"bottom-start":{ltr:"bottom-left",rtl:"bottom-right"},"bottom-end":{ltr:"bottom-right",rtl:"bottom-left"}}[n];return(o=i==null?void 0:i[t])!=null?o:n}var Pye=(e,t)=>e.find(n=>n.id===t);function UT(e,t){const n=$N(e,t),r=n?e[n].findIndex(i=>i.id===t):-1;return{position:n,index:r}}function $N(e,t){for(const[n,r]of Object.entries(e))if(Pye(r,t))return n}function Oye(e){const t=e.includes("right"),n=e.includes("left");let r="center";return t&&(r="flex-end"),n&&(r="flex-start"),{display:"flex",flexDirection:"column",alignItems:r}}function Mye(e){const n=e==="top"||e==="bottom"?"0 auto":void 0,r=e.includes("top")?"env(safe-area-inset-top, 0px)":void 0,i=e.includes("bottom")?"env(safe-area-inset-bottom, 0px)":void 0,o=e.includes("left")?void 0:"env(safe-area-inset-right, 0px)",a=e.includes("right")?void 0:"env(safe-area-inset-left, 0px)";return{position:"fixed",zIndex:5500,pointerEvents:"none",display:"flex",flexDirection:"column",margin:n,top:r,bottom:i,right:o,left:a}}var Rye={top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]},$o=Dye(Rye);function Dye(e){let t=e;const n=new Set,r=i=>{t=i(t),n.forEach(o=>o())};return{getState:()=>t,subscribe:i=>(n.add(i),()=>{r(()=>e),n.delete(i)}),removeToast:(i,o)=>{r(a=>({...a,[o]:a[o].filter(s=>s.id!=i)}))},notify:(i,o)=>{const a=Aye(i,o),{position:s,id:l}=a;return r(c=>{var f,p;const d=s.includes("top")?[a,...(f=c[s])!=null?f:[]]:[...(p=c[s])!=null?p:[],a];return{...c,[s]:d}}),l},update:(i,o)=>{!i||r(a=>{const s={...a},{position:l,index:c}=UT(s,i);return l&&c!==-1&&(s[l][c]={...s[l][c],...o,message:FN(o)}),s})},closeAll:({positions:i}={})=>{r(o=>{const a=["bottom","bottom-right","bottom-left","top","top-left","top-right"];return(i!=null?i:a).reduce((l,c)=>(l[c]=o[c].map(u=>({...u,requestClose:!0})),l),{...o})})},close:i=>{r(o=>{const a=$N(o,i);return a?{...o,[a]:o[a].map(s=>s.id==i?{...s,requestClose:!0}:s)}:o})},isActive:i=>Boolean(UT($o.getState(),i).position)}}var GT=0;function Aye(e,t={}){var i,o;GT+=1;const n=(i=t.id)!=null?i:GT,r=(o=t.position)!=null?o:"bottom";return{id:n,message:e,position:r,duration:t.duration,onCloseComplete:t.onCloseComplete,onRequestRemove:()=>$o.removeToast(String(n),r),status:t.status,requestClose:!1,containerStyle:t.containerStyle}}var Lye=e=>{const{status:t,variant:n="solid",id:r,title:i,isClosable:o,onClose:a,description:s,icon:l}=e,c=r?{root:`toast-${r}`,title:`toast-${r}-title`,description:`toast-${r}-description`}:void 0;return A.createElement(G9,{addRole:!1,status:t,variant:n,id:c==null?void 0:c.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto"},A.createElement(K9,null,l),A.createElement(ce.div,{flex:"1",maxWidth:"100%"},i&&A.createElement(q9,{id:c==null?void 0:c.title},i),s&&A.createElement(qL,{id:c==null?void 0:c.description,display:"block"},s)),o&&A.createElement(Z9,{size:"sm",onClick:a,position:"absolute",insetEnd:1,top:1}))};function FN(e={}){const{render:t,toastComponent:n=Lye}=e;return i=>typeof t=="function"?t(i):A.createElement(n,{...i,...e})}function NN(e,t){const n=i=>{var o;return{...t,...i,position:_ye((o=i==null?void 0:i.position)!=null?o:t==null?void 0:t.position,e)}},r=i=>{const o=n(i),a=FN(o);return $o.notify(a,o)};return r.update=(i,o)=>{$o.update(i,n(o))},r.promise=(i,o)=>{const a=r({...o.loading,status:"loading",duration:null});i.then(s=>r.update(a,{status:"success",duration:5e3,...FS(o.success,s)})).catch(s=>r.update(a,{status:"error",duration:5e3,...FS(o.error,s)}))},r.closeAll=$o.closeAll,r.close=$o.close,r.isActive=$o.isActive,r}function Bye(e){const{theme:t}=pA();return h.exports.useMemo(()=>NN(t.direction,e),[e,t.direction])}var $ye={initial:e=>{const{position:t}=e,n=["top","bottom"].includes(t)?"y":"x";let r=["top-right","bottom-right"].includes(t)?1:-1;return t==="bottom"&&(r=1),{opacity:0,[n]:r*24}},animate:{opacity:1,y:0,x:0,scale:1,transition:{duration:.4,ease:[.4,0,.2,1]}},exit:{opacity:0,scale:.85,transition:{duration:.2,ease:[.4,0,1,1]}}},zN=h.exports.memo(e=>{const{id:t,message:n,onCloseComplete:r,onRequestRemove:i,requestClose:o=!1,position:a="bottom",duration:s=5e3,containerStyle:l,motionVariants:c=$ye,toastSpacing:u="0.5rem"}=e,[d,f]=h.exports.useState(s),p=zre();M3(()=>{p||r==null||r()},[p]),M3(()=>{f(s)},[s]);const m=()=>f(null),g=()=>f(s),y=()=>{p&&i()};h.exports.useEffect(()=>{p&&o&&i()},[p,o,i]),Iye(y,d);const v=h.exports.useMemo(()=>({pointerEvents:"auto",maxWidth:560,minWidth:300,margin:u,...l}),[l,u]),b=h.exports.useMemo(()=>Oye(a),[a]);return A.createElement(Ur.li,{layout:!0,className:"chakra-toast",variants:c,initial:"initial",animate:"animate",exit:"exit",onHoverStart:m,onHoverEnd:g,custom:{position:a},style:b},A.createElement(ce.div,{role:"status","aria-atomic":"true",className:"chakra-toast__inner",__css:v},FS(n,{id:t,onClose:y})))});zN.displayName="ToastComponent";var jN=e=>{const t=h.exports.useSyncExternalStore($o.subscribe,$o.getState,$o.getState),{children:n,motionVariants:r,component:i=zN,portalProps:o}=e,s=Object.keys(t).map(l=>{const c=t[l];return A.createElement("ul",{role:"region","aria-live":"polite",key:l,id:`chakra-toast-manager-${l}`,style:Mye(l)},A.createElement(Wa,{initial:!1},c.map(u=>A.createElement(i,{key:u.id,motionVariants:r,...u}))))});return A.createElement(A.Fragment,null,n,A.createElement(Kd,{...o},s))},Fye={duration:5e3,variant:"solid"},Yc={theme:Eye,colorMode:"light",toggleColorMode:()=>{},setColorMode:()=>{},defaultOptions:Fye,forced:!1};function Nye({theme:e=Yc.theme,colorMode:t=Yc.colorMode,toggleColorMode:n=Yc.toggleColorMode,setColorMode:r=Yc.setColorMode,defaultOptions:i=Yc.defaultOptions,motionVariants:o,toastSpacing:a,component:s,forced:l}=Yc){const c={colorMode:t,setColorMode:r,toggleColorMode:n,forced:l};return{ToastContainer:()=>A.createElement(hA,{theme:e},A.createElement(ly.Provider,{value:c},A.createElement(jN,{defaultOptions:i,motionVariants:o,toastSpacing:a,component:s}))),toast:NN(e.direction,i)}}var zye=e=>{const{children:t,colorModeManager:n,portalZIndex:r,resetCSS:i=!0,theme:o={},environment:a,cssVarsRoot:s}=e,l=A.createElement(CB,{environment:a},t);return A.createElement(hA,{theme:o,cssVarsRoot:s},A.createElement(ND,{colorModeManager:n,options:o.config},i?A.createElement(Dle,null):A.createElement(Rle,null),A.createElement(cne,null),r?A.createElement(RF,{zIndex:r},l):l))};function jye({children:e,theme:t=Ln,toastOptions:n,...r}){return A.createElement(zye,{theme:t,...r},e,A.createElement(jN,{...n}))}function HN(...e){let t=[...e],n=e[e.length-1];return wye(n)&&t.length>1?t=t.slice(0,t.length-1):n=Ln,Ute(...t.map(r=>i=>mu(r)?r(i):Hye(i,r)))(n)}function Hye(...e){return Oi({},...e,VN)}function VN(e,t,n,r){if((mu(e)||mu(t))&&Object.prototype.hasOwnProperty.call(r,n))return(...i)=>{const o=mu(e)?e(...i):e,a=mu(t)?t(...i):t;return Oi({},o,a,VN)}}var WN,KT=rl.exports;WN=KT.createRoot,KT.hydrateRoot;const Vye=e=>{const t=document.getElementById("canvas-root");if(e&&t)t.style.minHeight="unset";else{const n=()=>{var c;lt.debug("Resized Canvas-Root because windows was resized");const r=(c=document.getElementsByClassName("row border-bottom").item(0))==null?void 0:c.clientHeight,i=document.body.clientHeight,o=document.getElementsByClassName("wrapper-content").item(0),a=o?getComputedStyle(o):{paddingBottom:"0px",paddingTop:"0px"},{paddingBottom:s,paddingTop:l}=a;if(r&&t&&a){const u=i-r-Number(l.split("px")[0])-Number(s.split("px")[0])+"px";t.style.height=u,t.style.minHeight="unset"}};n(),window.addEventListener("resize",n),lt.info("Script injected to listen to resizing")}},Wye="#000000",qT="#323c46",g6="#b4141e",Uye="#8c0a0a",Gye={parts:["box","legend"],baseStyle:{root:{backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",borderColor:"black",borderWidth:"thin",color:"white",display:"flex",flexDirection:"column-reverse",pointerEvents:"all",cursor:"pointer",width:"inherit",height:"inherit"},legend:{color:"white",display:"flex",backgroundColor:Uye,clipPath:"polygon(0 0, 100% 0, 95% 100%, 0% 100%)",width:"10rem",maxWidth:"12rem",padding:"0.25rem",marginLeft:"-1px",marginBottom:"1.5rem",alignItems:"center","& p":{overflow:"hidden",textOverflow:"ellipsis",wordWrap:"break-word",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"2"}}}},Kye={parts:["root","container","maskedImage","label","outer"],baseStyle:{root:{width:"100%",height:"100%",cursor:"pointer",display:"grid",gridTemplateColumns:"1fr",gridTemplateRows:"1fr"},svg:{width:"100%",height:"100%"},maskedImage:{gridArea:"1/1/2/2",maskPosition:"center"},label:{fontWeight:"semibold",size:"small",justifySelf:"center",fontSize:"1rem",color:"white",backgroundColor:"black",textAlign:"left",textTransform:"uppercase",minWidth:"3rem",maxWidth:"10rem",alignItems:"center",overflow:"hidden",textOverflow:"ellipsis",wordWrap:"break-word",padding:"0.25rem 0.5rem 0rem",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:"3"}}},qye={parts:["container","content","searchBar","accordion","searchBarInput"],baseStyle:{container:{minHeight:"10vh",backgroundColor:"white",borderRadius:6,padding:0,maxWidth:"25rem",color:"black",minWidth:"25rem",boxShadow:"0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2)"},content:{},searchBar:{backgroundColor:"#f2f2f2",color:qT,position:"relative"},searchBarInput:{color:qT,border:"none","* &:focus":{border:"none",boxShadow:"none"}},accordion:{maxHeight:"30vh",overflowY:"auto"}},variants:{icon:{container:{width:"20rem"}}}},Yye={initialColorMode:"system",useSystemColorMode:!0,cssVarPrefix:"phidias"},UN=HN({...Yye,colors:{},useSystemColorMode:!1,styles:{global:()=>({cursor:"auto",".canvas  *":{"--tl-accent":"#ff0000","--tl-brushFill":"#0000000c","--tl-brushStroke":"#0000003f","--tl-selectStroke":"#4285f4","--tl-selectFill":"#4184f40c","--tl-binding":"#4184f41e","--tl-foreground":"#333333","--tl-grid":"#909090ff","--tl-background":"unset !important"},body:{fontFamily:'"open sans", "Helvetica Neue", Helvetica, Arial, sans-serif',color:"---",background:"---",transitionProperty:"all",transitionDuration:"---",lineHeight:"---"}})},components:{SearchMenu:qye,IconBlock:{baseStyle:{cursor:"pointer",backgroundColor:g6,height:"inherit",width:"in",padding:"0.5rem",display:"flex",flexWrap:"nowrap",alignContent:"center",justifyContent:"center",alignItems:"center",boxShadow:"3px 3px 5px 1px rgb(0,0,0,50%)"}},MaskBlock:Kye,Block:Gye}});var GN={exports:{}},KN={};/**
 * @license React
 * use-sync-external-store-shim.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Cd=h.exports;function Xye(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Zye=typeof Object.is=="function"?Object.is:Xye,Qye=Cd.useState,Jye=Cd.useEffect,e2e=Cd.useLayoutEffect,t2e=Cd.useDebugValue;function n2e(e,t){var n=t(),r=Qye({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return e2e(function(){i.value=n,i.getSnapshot=t,w5(i)&&o({inst:i})},[e,n,t]),Jye(function(){return w5(i)&&o({inst:i}),e(function(){w5(i)&&o({inst:i})})},[e]),t2e(n),n}function w5(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Zye(e,n)}catch{return!0}}function r2e(e,t){return t()}var i2e=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?r2e:n2e;KN.useSyncExternalStore=Cd.useSyncExternalStore!==void 0?Cd.useSyncExternalStore:i2e;GN.exports=KN;var qN={exports:{}},YN={};/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var n2=h.exports,o2e=GN.exports;function a2e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var s2e=typeof Object.is=="function"?Object.is:a2e,l2e=o2e.useSyncExternalStore,c2e=n2.useRef,u2e=n2.useEffect,d2e=n2.useMemo,f2e=n2.useDebugValue;YN.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=c2e(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=d2e(function(){function l(p){if(!c){if(c=!0,u=p,p=r(p),i!==void 0&&a.hasValue){var m=a.value;if(i(m,p))return d=m}return d=p}if(m=d,s2e(u,p))return m;var g=r(p);return i!==void 0&&i(m,g)?m:(u=p,d=g)}var c=!1,u,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var s=l2e(e,o[0],o[1]);return u2e(function(){a.hasValue=!0,a.value=s},[s]),f2e(s),s};qN.exports=YN;function p2e(e){e()}let XN=p2e;const h2e=e=>XN=e,m2e=()=>XN,Ys=h.exports.createContext(null);function ZN(){return h.exports.useContext(Ys)}const g2e=()=>{throw new Error("uSES not initialized!")};let QN=g2e;const v2e=e=>{QN=e},y2e=(e,t)=>e===t;function b2e(e=Ys){const t=e===Ys?ZN:()=>h.exports.useContext(e);return function(r,i=y2e){const{store:o,subscription:a,getServerState:s}=t(),l=QN(a.addNestedSub,o.getState,s||o.getState,r,i);return h.exports.useDebugValue(l),l}}const JN=b2e();var ht={};/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var v6=Symbol.for("react.element"),y6=Symbol.for("react.portal"),r2=Symbol.for("react.fragment"),i2=Symbol.for("react.strict_mode"),o2=Symbol.for("react.profiler"),a2=Symbol.for("react.provider"),s2=Symbol.for("react.context"),x2e=Symbol.for("react.server_context"),l2=Symbol.for("react.forward_ref"),c2=Symbol.for("react.suspense"),u2=Symbol.for("react.suspense_list"),d2=Symbol.for("react.memo"),f2=Symbol.for("react.lazy"),S2e=Symbol.for("react.offscreen"),ez;ez=Symbol.for("react.module.reference");function Hi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case v6:switch(e=e.type,e){case r2:case o2:case i2:case c2:case u2:return e;default:switch(e=e&&e.$$typeof,e){case x2e:case s2:case l2:case f2:case d2:case a2:return e;default:return t}}case y6:return t}}}ht.ContextConsumer=s2;ht.ContextProvider=a2;ht.Element=v6;ht.ForwardRef=l2;ht.Fragment=r2;ht.Lazy=f2;ht.Memo=d2;ht.Portal=y6;ht.Profiler=o2;ht.StrictMode=i2;ht.Suspense=c2;ht.SuspenseList=u2;ht.isAsyncMode=function(){return!1};ht.isConcurrentMode=function(){return!1};ht.isContextConsumer=function(e){return Hi(e)===s2};ht.isContextProvider=function(e){return Hi(e)===a2};ht.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===v6};ht.isForwardRef=function(e){return Hi(e)===l2};ht.isFragment=function(e){return Hi(e)===r2};ht.isLazy=function(e){return Hi(e)===f2};ht.isMemo=function(e){return Hi(e)===d2};ht.isPortal=function(e){return Hi(e)===y6};ht.isProfiler=function(e){return Hi(e)===o2};ht.isStrictMode=function(e){return Hi(e)===i2};ht.isSuspense=function(e){return Hi(e)===c2};ht.isSuspenseList=function(e){return Hi(e)===u2};ht.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===r2||e===o2||e===i2||e===c2||e===u2||e===S2e||typeof e=="object"&&e!==null&&(e.$$typeof===f2||e.$$typeof===d2||e.$$typeof===a2||e.$$typeof===s2||e.$$typeof===l2||e.$$typeof===ez||e.getModuleId!==void 0)};ht.typeOf=Hi;function w2e(){const e=m2e();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,o=n={callback:r,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){!i||t===null||(i=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}const YT={notify(){},get:()=>[]};function C2e(e,t){let n,r=YT;function i(d){return l(),r.subscribe(d)}function o(){r.notify()}function a(){u.onStateChange&&u.onStateChange()}function s(){return Boolean(n)}function l(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=w2e())}function c(){n&&(n(),n=void 0,r.clear(),r=YT)}const u={addNestedSub:i,notifyNestedSubs:o,handleChangeWrapper:a,isSubscribed:s,trySubscribe:l,tryUnsubscribe:c,getListeners:()=>r};return u}const k2e=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined",E2e=k2e?h.exports.useLayoutEffect:h.exports.useEffect;function XT(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function V0(e,t){if(XT(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!XT(e[n[i]],t[n[i]]))return!1;return!0}function I2e({store:e,context:t,children:n,serverState:r}){const i=h.exports.useMemo(()=>{const s=C2e(e);return{store:e,subscription:s,getServerState:r?()=>r:void 0}},[e,r]),o=h.exports.useMemo(()=>e.getState(),[e]);return E2e(()=>{const{subscription:s}=i;return s.onStateChange=s.notifyNestedSubs,s.trySubscribe(),o!==e.getState()&&s.notifyNestedSubs(),()=>{s.tryUnsubscribe(),s.onStateChange=void 0}},[i,o]),k((t||Ys).Provider,{value:i,children:n})}function tz(e=Ys){const t=e===Ys?ZN:()=>h.exports.useContext(e);return function(){const{store:r}=t();return r}}const nz=tz();function T2e(e=Ys){const t=e===Ys?nz:tz(e);return function(){return t().dispatch}}const b6=T2e();v2e(qN.exports.useSyncExternalStoreWithSelector);h2e(rl.exports.unstable_batchedUpdates);function cr(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map(function(i){return"'"+i+"'"}).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function $a(e){return!!e&&!!e[At]}function bo(e){var t;return!!e&&(function(n){if(!n||typeof n!="object")return!1;var r=Object.getPrototypeOf(n);if(r===null)return!0;var i=Object.hasOwnProperty.call(r,"constructor")&&r.constructor;return i===Object||typeof i=="function"&&Function.toString.call(i)===L2e}(e)||Array.isArray(e)||!!e[wp]||!!(!((t=e.constructor)===null||t===void 0)&&t[wp])||p2(e)||h2(e))}function Xs(e,t,n){n===void 0&&(n=!1),Zs(e)===0?(n?Object.keys:Ju)(e).forEach(function(r){n&&typeof r=="symbol"||t(r,e[r],e)}):e.forEach(function(r,i){return t(i,r,e)})}function Zs(e){var t=e[At];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:p2(e)?2:h2(e)?3:0}function Ns(e,t){return Zs(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function kg(e,t){return Zs(e)===2?e.get(t):e[t]}function rz(e,t,n){var r=Zs(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function iz(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function p2(e){return D2e&&e instanceof Map}function h2(e){return A2e&&e instanceof Set}function Tl(e){return e.o||e.t}function x6(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=az(e);delete t[At];for(var n=Ju(t),r=0;r<n.length;r++){var i=n[r],o=t[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(t[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(Object.getPrototypeOf(e),t)}function S6(e,t){return t===void 0&&(t=!1),w6(e)||$a(e)||!bo(e)||(Zs(e)>1&&(e.set=e.add=e.clear=e.delete=_2e),Object.freeze(e),t&&Xs(e,function(n,r){return S6(r,!0)},!0)),e}function _2e(){cr(2)}function w6(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Jo(e){var t=HS[e];return t||cr(18,e),t}function oz(e,t){HS[e]||(HS[e]=t)}function NS(){return hh}function C5(e,t){t&&(Jo("Patches"),e.u=[],e.s=[],e.v=t)}function W0(e){zS(e),e.p.forEach(P2e),e.p=null}function zS(e){e===hh&&(hh=e.l)}function ZT(e){return hh={p:[],l:hh,h:e,m:!0,_:0}}function P2e(e){var t=e[At];t.i===0||t.i===1?t.j():t.O=!0}function k5(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Jo("ES5").S(t,e,r),r?(n[At].P&&(W0(t),cr(4)),bo(e)&&(e=U0(t,e),t.l||G0(t,e)),t.u&&Jo("Patches").M(n[At].t,e,t.u,t.s)):e=U0(t,n,[]),W0(t),t.u&&t.v(t.u,t.s),e!==k6?e:void 0}function U0(e,t,n){if(w6(t))return t;var r=t[At];if(!r)return Xs(t,function(o,a){return QT(e,r,t,o,a,n)},!0),t;if(r.A!==e)return t;if(!r.P)return G0(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=x6(r.k):r.o;Xs(r.i===3?new Set(i):i,function(o,a){return QT(e,r,i,o,a,n)}),G0(e,i,!1),n&&e.u&&Jo("Patches").R(r,n,e.u,e.s)}return r.o}function QT(e,t,n,r,i,o){if($a(i)){var a=U0(e,i,o&&t&&t.i!==3&&!Ns(t.D,r)?o.concat(r):void 0);if(rz(n,r,a),!$a(a))return;e.m=!1}if(bo(i)&&!w6(i)){if(!e.h.F&&e._<1)return;U0(e,i),t&&t.A.l||G0(e,i)}}function G0(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&S6(t,n)}function E5(e,t){var n=e[At];return(n?Tl(n):e)[t]}function JT(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function ms(e){e.P||(e.P=!0,e.l&&ms(e.l))}function I5(e){e.o||(e.o=x6(e.t))}function jS(e,t,n){var r=p2(t)?Jo("MapSet").N(t,n):h2(t)?Jo("MapSet").T(t,n):e.g?function(i,o){var a=Array.isArray(i),s={i:a?1:0,A:o?o.A:NS(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=s,c=mh;a&&(l=[s],c=Gf);var u=Proxy.revocable(l,c),d=u.revoke,f=u.proxy;return s.k=f,s.j=d,f}(t,n):Jo("ES5").J(t,n);return(n?n.A:NS()).p.push(r),r}function O2e(e){return $a(e)||cr(22,e),function t(n){if(!bo(n))return n;var r,i=n[At],o=Zs(n);if(i){if(!i.P&&(i.i<4||!Jo("ES5").K(i)))return i.t;i.I=!0,r=e_(n,o),i.I=!1}else r=e_(n,o);return Xs(r,function(a,s){i&&kg(i.t,a)===s||rz(r,a,t(s))}),o===3?new Set(r):r}(e)}function e_(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return x6(e)}function M2e(){function e(o,a){var s=i[o];return s?s.enumerable=a:i[o]=s={configurable:!0,enumerable:a,get:function(){var l=this[At];return mh.get(l,o)},set:function(l){var c=this[At];mh.set(c,o,l)}},s}function t(o){for(var a=o.length-1;a>=0;a--){var s=o[a][At];if(!s.P)switch(s.i){case 5:r(s)&&ms(s);break;case 4:n(s)&&ms(s)}}}function n(o){for(var a=o.t,s=o.k,l=Ju(s),c=l.length-1;c>=0;c--){var u=l[c];if(u!==At){var d=a[u];if(d===void 0&&!Ns(a,u))return!0;var f=s[u],p=f&&f[At];if(p?p.t!==d:!iz(f,d))return!0}}var m=!!a[At];return l.length!==Ju(a).length+(m?0:1)}function r(o){var a=o.k;if(a.length!==o.t.length)return!0;var s=Object.getOwnPropertyDescriptor(a,a.length-1);if(s&&!s.get)return!0;for(var l=0;l<a.length;l++)if(!a.hasOwnProperty(l))return!0;return!1}var i={};oz("ES5",{J:function(o,a){var s=Array.isArray(o),l=function(u,d){if(u){for(var f=Array(d.length),p=0;p<d.length;p++)Object.defineProperty(f,""+p,e(p,!0));return f}var m=az(d);delete m[At];for(var g=Ju(m),y=0;y<g.length;y++){var v=g[y];m[v]=e(v,u||!!m[v].enumerable)}return Object.create(Object.getPrototypeOf(d),m)}(s,o),c={i:s?5:4,A:a?a.A:NS(),P:!1,I:!1,D:{},l:a,t:o,k:l,o:null,O:!1,C:!1};return Object.defineProperty(l,At,{value:c,writable:!0}),l},S:function(o,a,s){s?$a(a)&&a[At].A===o&&t(o.p):(o.u&&function l(c){if(c&&typeof c=="object"){var u=c[At];if(u){var d=u.t,f=u.k,p=u.D,m=u.i;if(m===4)Xs(f,function(x){x!==At&&(d[x]!==void 0||Ns(d,x)?p[x]||l(f[x]):(p[x]=!0,ms(u)))}),Xs(d,function(x){f[x]!==void 0||Ns(f,x)||(p[x]=!1,ms(u))});else if(m===5){if(r(u)&&(ms(u),p.length=!0),f.length<d.length)for(var g=f.length;g<d.length;g++)p[g]=!1;else for(var y=d.length;y<f.length;y++)p[y]=!0;for(var v=Math.min(f.length,d.length),b=0;b<v;b++)f.hasOwnProperty(b)||(p[b]=!0),p[b]===void 0&&l(f[b])}}}}(o.p[0]),t(o.p))},K:function(o){return o.i===4?n(o):r(o)}})}function R2e(){function e(r){if(!bo(r))return r;if(Array.isArray(r))return r.map(e);if(p2(r))return new Map(Array.from(r.entries()).map(function(a){return[a[0],e(a[1])]}));if(h2(r))return new Set(Array.from(r).map(e));var i=Object.create(Object.getPrototypeOf(r));for(var o in r)i[o]=e(r[o]);return Ns(r,wp)&&(i[wp]=r[wp]),i}function t(r){return $a(r)?e(r):r}var n="add";oz("Patches",{$:function(r,i){return i.forEach(function(o){for(var a=o.path,s=o.op,l=r,c=0;c<a.length-1;c++){var u=Zs(l),d=""+a[c];u!==0&&u!==1||d!=="__proto__"&&d!=="constructor"||cr(24),typeof l=="function"&&d==="prototype"&&cr(24),typeof(l=kg(l,d))!="object"&&cr(15,a.join("/"))}var f=Zs(l),p=e(o.value),m=a[a.length-1];switch(s){case"replace":switch(f){case 2:return l.set(m,p);case 3:cr(16);default:return l[m]=p}case n:switch(f){case 1:return m==="-"?l.push(p):l.splice(m,0,p);case 2:return l.set(m,p);case 3:return l.add(p);default:return l[m]=p}case"remove":switch(f){case 1:return l.splice(m,1);case 2:return l.delete(m);case 3:return l.delete(o.value);default:return delete l[m]}default:cr(17,s)}}),r},R:function(r,i,o,a){switch(r.i){case 0:case 4:case 2:return function(s,l,c,u){var d=s.t,f=s.o;Xs(s.D,function(p,m){var g=kg(d,p),y=kg(f,p),v=m?Ns(d,p)?"replace":n:"remove";if(g!==y||v!=="replace"){var b=l.concat(p);c.push(v==="remove"?{op:v,path:b}:{op:v,path:b,value:y}),u.push(v===n?{op:"remove",path:b}:v==="remove"?{op:n,path:b,value:t(g)}:{op:"replace",path:b,value:t(g)})}})}(r,i,o,a);case 5:case 1:return function(s,l,c,u){var d=s.t,f=s.D,p=s.o;if(p.length<d.length){var m=[p,d];d=m[0],p=m[1];var g=[u,c];c=g[0],u=g[1]}for(var y=0;y<d.length;y++)if(f[y]&&p[y]!==d[y]){var v=l.concat([y]);c.push({op:"replace",path:v,value:t(p[y])}),u.push({op:"replace",path:v,value:t(d[y])})}for(var b=d.length;b<p.length;b++){var x=l.concat([b]);c.push({op:n,path:x,value:t(p[b])})}d.length<p.length&&u.push({op:"replace",path:l.concat(["length"]),value:d.length})}(r,i,o,a);case 3:return function(s,l,c,u){var d=s.t,f=s.o,p=0;d.forEach(function(m){if(!f.has(m)){var g=l.concat([p]);c.push({op:"remove",path:g,value:m}),u.unshift({op:n,path:g,value:m})}p++}),p=0,f.forEach(function(m){if(!d.has(m)){var g=l.concat([p]);c.push({op:n,path:g,value:m}),u.unshift({op:"remove",path:g,value:m})}p++})}(r,i,o,a)}},M:function(r,i,o,a){o.push({op:"replace",path:[],value:i===k6?void 0:i}),a.push({op:"replace",path:[],value:r})}})}var t_,hh,C6=typeof Symbol!="undefined"&&typeof Symbol("x")=="symbol",D2e=typeof Map!="undefined",A2e=typeof Set!="undefined",n_=typeof Proxy!="undefined"&&Proxy.revocable!==void 0&&typeof Reflect!="undefined",k6=C6?Symbol.for("immer-nothing"):((t_={})["immer-nothing"]=!0,t_),wp=C6?Symbol.for("immer-draftable"):"__$immer_draftable",At=C6?Symbol.for("immer-state"):"__$immer_state",L2e=""+Object.prototype.constructor,Ju=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,az=Object.getOwnPropertyDescriptors||function(e){var t={};return Ju(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},HS={},mh={get:function(e,t){if(t===At)return e;var n=Tl(e);if(!Ns(n,t))return function(i,o,a){var s,l=JT(o,a);return l?"value"in l?l.value:(s=l.get)===null||s===void 0?void 0:s.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!bo(r)?r:r===E5(e.t,t)?(I5(e),e.o[t]=jS(e.A.h,r,e)):r},has:function(e,t){return t in Tl(e)},ownKeys:function(e){return Reflect.ownKeys(Tl(e))},set:function(e,t,n){var r=JT(Tl(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=E5(Tl(e),t),o=i==null?void 0:i[At];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(iz(n,i)&&(n!==void 0||Ns(e.t,t)))return!0;I5(e),ms(e)}return e.o[t]===n&&typeof n!="number"&&(n!==void 0||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return E5(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,I5(e),ms(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=Tl(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){cr(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){cr(12)}},Gf={};Xs(mh,function(e,t){Gf[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Gf.deleteProperty=function(e,t){return Gf.set.call(this,e,t,void 0)},Gf.set=function(e,t,n){return mh.set.call(this,e[0],t,n,e[0])};var B2e=function(){function e(n){var r=this;this.g=n_,this.F=!0,this.produce=function(i,o,a){if(typeof i=="function"&&typeof o!="function"){var s=o;o=i;var l=r;return function(g){var y=this;g===void 0&&(g=s);for(var v=arguments.length,b=Array(v>1?v-1:0),x=1;x<v;x++)b[x-1]=arguments[x];return l.produce(g,function(w){var E;return(E=o).call.apply(E,[y,w].concat(b))})}}var c;if(typeof o!="function"&&cr(6),a!==void 0&&typeof a!="function"&&cr(7),bo(i)){var u=ZT(r),d=jS(r,i,void 0),f=!0;try{c=o(d),f=!1}finally{f?W0(u):zS(u)}return typeof Promise!="undefined"&&c instanceof Promise?c.then(function(g){return C5(u,a),k5(g,u)},function(g){throw W0(u),g}):(C5(u,a),k5(c,u))}if(!i||typeof i!="object"){if((c=o(i))===void 0&&(c=i),c===k6&&(c=void 0),r.F&&S6(c,!0),a){var p=[],m=[];Jo("Patches").M(i,c,p,m),a(p,m)}return c}cr(21,i)},this.produceWithPatches=function(i,o){if(typeof i=="function")return function(c){for(var u=arguments.length,d=Array(u>1?u-1:0),f=1;f<u;f++)d[f-1]=arguments[f];return r.produceWithPatches(c,function(p){return i.apply(void 0,[p].concat(d))})};var a,s,l=r.produce(i,o,function(c,u){a=c,s=u});return typeof Promise!="undefined"&&l instanceof Promise?l.then(function(c){return[c,a,s]}):[l,a,s]},typeof(n==null?void 0:n.useProxies)=="boolean"&&this.setUseProxies(n.useProxies),typeof(n==null?void 0:n.autoFreeze)=="boolean"&&this.setAutoFreeze(n.autoFreeze)}var t=e.prototype;return t.createDraft=function(n){bo(n)||cr(8),$a(n)&&(n=O2e(n));var r=ZT(this),i=jS(this,n,void 0);return i[At].C=!0,zS(r),i},t.finishDraft=function(n,r){var i=n&&n[At],o=i.A;return C5(o,r),k5(void 0,o)},t.setAutoFreeze=function(n){this.F=n},t.setUseProxies=function(n){n&&!n_&&cr(20),this.g=n},t.applyPatches=function(n,r){var i;for(i=r.length-1;i>=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var a=Jo("Patches").$;return $a(n)?a(n,r):this.produce(n,function(s){return a(s,r)})},e}(),ui=new B2e,e1=ui.produce,sz=ui.produceWithPatches.bind(ui);ui.setAutoFreeze.bind(ui);ui.setUseProxies.bind(ui);var r_=ui.applyPatches.bind(ui);ui.createDraft.bind(ui);ui.finishDraft.bind(ui);function i_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Oe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i_(Object(n),!0).forEach(function(r){ur(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function or(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var o_=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}(),T5=function(){return Math.random().toString(36).substring(7).split("").join(".")},K0={INIT:"@@redux/INIT"+T5(),REPLACE:"@@redux/REPLACE"+T5(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+T5()}};function $2e(e){if(typeof e!="object"||e===null)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function lz(e,t,n){var r;if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(or(0));if(typeof t=="function"&&typeof n=="undefined"&&(n=t,t=void 0),typeof n!="undefined"){if(typeof n!="function")throw new Error(or(1));return n(lz)(e,t)}if(typeof e!="function")throw new Error(or(2));var i=e,o=t,a=[],s=a,l=!1;function c(){s===a&&(s=a.slice())}function u(){if(l)throw new Error(or(3));return o}function d(g){if(typeof g!="function")throw new Error(or(4));if(l)throw new Error(or(5));var y=!0;return c(),s.push(g),function(){if(!!y){if(l)throw new Error(or(6));y=!1,c();var b=s.indexOf(g);s.splice(b,1),a=null}}}function f(g){if(!$2e(g))throw new Error(or(7));if(typeof g.type=="undefined")throw new Error(or(8));if(l)throw new Error(or(9));try{l=!0,o=i(o,g)}finally{l=!1}for(var y=a=s,v=0;v<y.length;v++){var b=y[v];b()}return g}function p(g){if(typeof g!="function")throw new Error(or(10));i=g,f({type:K0.REPLACE})}function m(){var g,y=d;return g={subscribe:function(b){if(typeof b!="object"||b===null)throw new Error(or(11));function x(){b.next&&b.next(u())}x();var w=y(x);return{unsubscribe:w}}},g[o_]=function(){return this},g}return f({type:K0.INIT}),r={dispatch:f,subscribe:d,getState:u,replaceReducer:p},r[o_]=m,r}function F2e(e){Object.keys(e).forEach(function(t){var n=e[t],r=n(void 0,{type:K0.INIT});if(typeof r=="undefined")throw new Error(or(12));if(typeof n(void 0,{type:K0.PROBE_UNKNOWN_ACTION()})=="undefined")throw new Error(or(13))})}function cz(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++){var i=t[r];typeof e[i]=="function"&&(n[i]=e[i])}var o=Object.keys(n),a;try{F2e(n)}catch(s){a=s}return function(l,c){if(l===void 0&&(l={}),a)throw a;for(var u=!1,d={},f=0;f<o.length;f++){var p=o[f],m=n[p],g=l[p],y=m(g,c);if(typeof y=="undefined")throw c&&c.type,new Error(or(14));d[p]=y,u=u||y!==g}return u=u||o.length!==Object.keys(l).length,u?d:l}}function q0(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.length===0?function(r){return r}:t.length===1?t[0]:t.reduce(function(r,i){return function(){return r(i.apply(void 0,arguments))}})}function N2e(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return function(){var i=r.apply(void 0,arguments),o=function(){throw new Error(or(15))},a={getState:i.getState,dispatch:function(){return o.apply(void 0,arguments)}},s=t.map(function(l){return l(a)});return o=q0.apply(void 0,s)(i.dispatch),Oe(Oe({},i),{},{dispatch:o})}}}var Y0="NOT_FOUND";function z2e(e){var t;return{get:function(r){return t&&e(t.key,r)?t.value:Y0},put:function(r,i){t={key:r,value:i}},getEntries:function(){return t?[t]:[]},clear:function(){t=void 0}}}function j2e(e,t){var n=[];function r(s){var l=n.findIndex(function(u){return t(s,u.key)});if(l>-1){var c=n[l];return l>0&&(n.splice(l,1),n.unshift(c)),c.value}return Y0}function i(s,l){r(s)===Y0&&(n.unshift({key:s,value:l}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var H2e=function(t,n){return t===n};function V2e(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;for(var i=n.length,o=0;o<i;o++)if(!e(n[o],r[o]))return!1;return!0}}function VS(e,t){var n=typeof t=="object"?t:{equalityCheck:t},r=n.equalityCheck,i=r===void 0?H2e:r,o=n.maxSize,a=o===void 0?1:o,s=n.resultEqualityCheck,l=V2e(i),c=a===1?z2e(l):j2e(a,l);function u(){var d=c.get(arguments);if(d===Y0){if(d=e.apply(null,arguments),s){var f=c.getEntries(),p=f.find(function(m){return s(m.value,d)});p&&(d=p.value)}c.put(arguments,d)}return d}return u.clearCache=function(){return c.clear()},u}function W2e(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(r){return typeof r=="function"})){var n=t.map(function(r){return typeof r=="function"?"function "+(r.name||"unnamed")+"()":typeof r}).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function U2e(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=0,u,d={memoizeOptions:void 0},f=s.pop();if(typeof f=="object"&&(d=f,f=s.pop()),typeof f!="function")throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof f+"]");var p=d,m=p.memoizeOptions,g=m===void 0?n:m,y=Array.isArray(g)?g:[g],v=W2e(s),b=e.apply(void 0,[function(){return c++,f.apply(null,arguments)}].concat(y)),x=e(function(){for(var E=[],C=v.length,I=0;I<C;I++)E.push(v[I].apply(null,arguments));return u=b.apply(null,E),u});return Object.assign(x,{resultFunc:f,memoizedResultFunc:b,dependencies:v,lastResult:function(){return u},recomputations:function(){return c},resetRecomputations:function(){return c=0}}),x};return i}var Cp=U2e(VS);function uz(e){var t=function(r){var i=r.dispatch,o=r.getState;return function(a){return function(s){return typeof s=="function"?s(i,o,e):a(s)}}};return t}var dz=uz();dz.withExtraArgument=uz;var a_=dz,G2e=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),K2e=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},X0=globalThis&&globalThis.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},q2e=Object.defineProperty,Y2e=Object.defineProperties,X2e=Object.getOwnPropertyDescriptors,s_=Object.getOwnPropertySymbols,Z2e=Object.prototype.hasOwnProperty,Q2e=Object.prototype.propertyIsEnumerable,l_=function(e,t,n){return t in e?q2e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},zs=function(e,t){for(var n in t||(t={}))Z2e.call(t,n)&&l_(e,n,t[n]);if(s_)for(var r=0,i=s_(t);r<i.length;r++){var n=i[r];Q2e.call(t,n)&&l_(e,n,t[n])}return e},_5=function(e,t){return Y2e(e,X2e(t))},J2e=function(e,t,n){return new Promise(function(r,i){var o=function(l){try{s(n.next(l))}catch(c){i(c)}},a=function(l){try{s(n.throw(l))}catch(c){i(c)}},s=function(l){return l.done?r(l.value):Promise.resolve(l.value).then(o,a)};s((n=n.apply(e,t)).next())})},ebe=typeof window!="undefined"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?q0:q0.apply(null,arguments)};function qd(e){if(typeof e!="object"||e===null)return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(var n=t;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return t===n}var tbe=function(e){G2e(t,e);function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=e.apply(this,n)||this;return Object.setPrototypeOf(i,t.prototype),i}return Object.defineProperty(t,Symbol.species,{get:function(){return t},enumerable:!1,configurable:!0}),t.prototype.concat=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.prototype.concat.apply(this,n)},t.prototype.prepend=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.length===1&&Array.isArray(n[0])?new(t.bind.apply(t,X0([void 0],n[0].concat(this)))):new(t.bind.apply(t,X0([void 0],n.concat(this))))},t}(Array);function WS(e){return bo(e)?e1(e,function(){}):e}function nbe(e){return typeof e=="boolean"}function rbe(){return function(t){return ibe(t)}}function ibe(e){e===void 0&&(e={});var t=e.thunk,n=t===void 0?!0:t;e.immutableCheck,e.serializableCheck;var r=new tbe;return n&&(nbe(n)?r.push(a_):r.push(a_.withExtraArgument(n.extraArgument))),r}var obe=!0;function abe(e){var t=rbe(),n=e||{},r=n.reducer,i=r===void 0?void 0:r,o=n.middleware,a=o===void 0?t():o,s=n.devTools,l=s===void 0?!0:s,c=n.preloadedState,u=c===void 0?void 0:c,d=n.enhancers,f=d===void 0?void 0:d,p;if(typeof i=="function")p=i;else if(qd(i))p=cz(i);else throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');var m=a;typeof m=="function"&&(m=m(t));var g=N2e.apply(void 0,m),y=q0;l&&(y=ebe(zs({trace:!obe},typeof l=="object"&&l)));var v=[g];Array.isArray(f)?v=X0([g],f):typeof f=="function"&&(v=f(v));var b=y.apply(void 0,v);return lz(p,u,b)}function jr(e,t){function n(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(t){var o=t.apply(void 0,r);if(!o)throw new Error("prepareAction did not return an object");return zs(zs({type:e,payload:o.payload},"meta"in o&&{meta:o.meta}),"error"in o&&{error:o.error})}return{type:e,payload:r[0]}}return n.toString=function(){return""+e},n.type=e,n.match=function(r){return r.type===e},n}function fz(e){var t={},n=[],r,i={addCase:function(o,a){var s=typeof o=="string"?o:o.type;if(s in t)throw new Error("addCase cannot be called with two reducers for the same action type");return t[s]=a,i},addMatcher:function(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase:function(o){return r=o,i}};return e(i),[t,n,r]}function sbe(e){return typeof e=="function"}function lbe(e,t,n,r){n===void 0&&(n=[]);var i=typeof t=="function"?fz(t):[t,n,r],o=i[0],a=i[1],s=i[2],l;if(sbe(e))l=function(){return WS(e())};else{var c=WS(e);l=function(){return c}}function u(d,f){d===void 0&&(d=l());var p=X0([o[f.type]],a.filter(function(m){var g=m.matcher;return g(f)}).map(function(m){var g=m.reducer;return g}));return p.filter(function(m){return!!m}).length===0&&(p=[s]),p.reduce(function(m,g){if(g)if($a(m)){var y=m,v=g(y,f);return v===void 0?m:v}else{if(bo(m))return e1(m,function(b){return g(b,f)});var v=g(m,f);if(v===void 0){if(m===null)return m;throw Error("A case reducer on a non-draftable value must not return undefined")}return v}return m},d)}return u.getInitialState=l,u}function cbe(e,t){return e+"/"+t}function us(e){var t=e.name;if(!t)throw new Error("`name` is a required option for createSlice");var n=typeof e.initialState=="function"?e.initialState:WS(e.initialState),r=e.reducers||{},i=Object.keys(r),o={},a={},s={};i.forEach(function(u){var d=r[u],f=cbe(t,u),p,m;"reducer"in d?(p=d.reducer,m=d.prepare):p=d,o[u]=p,a[f]=p,s[u]=m?jr(f,m):jr(f)});function l(){var u=typeof e.extraReducers=="function"?fz(e.extraReducers):[e.extraReducers],d=u[0],f=d===void 0?{}:d,p=u[1],m=p===void 0?[]:p,g=u[2],y=g===void 0?void 0:g,v=zs(zs({},f),a);return lbe(n,function(b){for(var x in v)b.addCase(x,v[x]);for(var w=0,E=m;w<E.length;w++){var C=E[w];b.addMatcher(C.matcher,C.reducer)}y&&b.addDefaultCase(y)})}var c;return{name:t,reducer:function(u,d){return c||(c=l()),c(u,d)},actions:s,caseReducers:o,getInitialState:function(){return c||(c=l()),c.getInitialState()}}}var ube="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",pz=function(e){e===void 0&&(e=21);for(var t="",n=e;n--;)t+=ube[Math.random()*64|0];return t},dbe=["name","message","stack","code"],P5=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),c_=function(){function e(t,n){this.payload=t,this.meta=n}return e}(),fbe=function(e){if(typeof e=="object"&&e!==null){for(var t={},n=0,r=dbe;n<r.length;n++){var i=r[n];typeof e[i]=="string"&&(t[i]=e[i])}return t}return{message:String(e)}},u_=function(){function e(t,n,r){var i=jr(t+"/fulfilled",function(c,u,d,f){return{payload:c,meta:_5(zs({},f||{}),{arg:d,requestId:u,requestStatus:"fulfilled"})}}),o=jr(t+"/pending",function(c,u,d){return{payload:void 0,meta:_5(zs({},d||{}),{arg:u,requestId:c,requestStatus:"pending"})}}),a=jr(t+"/rejected",function(c,u,d,f,p){return{payload:f,error:(r&&r.serializeError||fbe)(c||"Rejected"),meta:_5(zs({},p||{}),{arg:d,requestId:u,rejectedWithValue:!!f,requestStatus:"rejected",aborted:(c==null?void 0:c.name)==="AbortError",condition:(c==null?void 0:c.name)==="ConditionError"})}}),s=typeof AbortController!="undefined"?AbortController:function(){function c(){this.signal={aborted:!1,addEventListener:function(){},dispatchEvent:function(){return!1},onabort:function(){},removeEventListener:function(){},reason:void 0,throwIfAborted:function(){}}}return c.prototype.abort=function(){},c}();function l(c){return function(u,d,f){var p=r!=null&&r.idGenerator?r.idGenerator(c):pz(),m=new s,g;function y(b){g=b,m.abort()}var v=function(){return J2e(this,null,function(){var b,x,w,E,C,I,T;return K2e(this,function(_){switch(_.label){case 0:return _.trys.push([0,4,,5]),E=(b=r==null?void 0:r.condition)==null?void 0:b.call(r,c,{getState:d,extra:f}),hbe(E)?[4,E]:[3,2];case 1:E=_.sent(),_.label=2;case 2:if(E===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};return C=new Promise(function(P,M){return m.signal.addEventListener("abort",function(){return M({name:"AbortError",message:g||"Aborted"})})}),u(o(p,c,(x=r==null?void 0:r.getPendingMeta)==null?void 0:x.call(r,{requestId:p,arg:c},{getState:d,extra:f}))),[4,Promise.race([C,Promise.resolve(n(c,{dispatch:u,getState:d,extra:f,requestId:p,signal:m.signal,abort:y,rejectWithValue:function(P,M){return new P5(P,M)},fulfillWithValue:function(P,M){return new c_(P,M)}})).then(function(P){if(P instanceof P5)throw P;return P instanceof c_?i(P.payload,p,c,P.meta):i(P,p,c)})])];case 3:return w=_.sent(),[3,5];case 4:return I=_.sent(),w=I instanceof P5?a(null,p,c,I.payload,I.meta):a(I,p,c),[3,5];case 5:return T=r&&!r.dispatchConditionRejection&&a.match(w)&&w.meta.condition,T||u(w),[2,w]}})})}();return Object.assign(v,{abort:y,requestId:p,arg:c,unwrap:function(){return v.then(pbe)}})}}return Object.assign(l,{pending:o,rejected:a,fulfilled:i,typePrefix:t})}return e.withTypes=function(){return e},e}();function pbe(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function hbe(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var mbe=function(e){return e&&typeof e.match=="function"},hz=function(e,t){return mbe(e)?e.match(t):e(t)};function Yd(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(n){return e.some(function(r){return hz(r,n)})}}function kp(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(n){return e.every(function(r){return hz(r,n)})}}function m2(e,t){if(!e||!e.meta)return!1;var n=typeof e.meta.requestId=="string",r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function t1(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function E6(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?function(n){return m2(n,["pending"])}:t1(e)?function(n){var r=e.map(function(o){return o.pending}),i=Yd.apply(void 0,r);return i(n)}:E6()(e[0])}function gh(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?function(n){return m2(n,["rejected"])}:t1(e)?function(n){var r=e.map(function(o){return o.rejected}),i=Yd.apply(void 0,r);return i(n)}:gh()(e[0])}function g2(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=function(r){return r&&r.meta&&r.meta.rejectedWithValue};return e.length===0?function(r){var i=kp(gh.apply(void 0,e),n);return i(r)}:t1(e)?function(r){var i=kp(gh.apply(void 0,e),n);return i(r)}:g2()(e[0])}function _c(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?function(n){return m2(n,["fulfilled"])}:t1(e)?function(n){var r=e.map(function(o){return o.fulfilled}),i=Yd.apply(void 0,r);return i(n)}:_c()(e[0])}function US(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?function(n){return m2(n,["pending","fulfilled","rejected"])}:t1(e)?function(n){for(var r=[],i=0,o=e;i<o.length;i++){var a=o[i];r.push(a.pending,a.rejected,a.fulfilled)}var s=Yd.apply(void 0,r);return s(n)}:US()(e[0])}var I6="listenerMiddleware";jr(I6+"/add");jr(I6+"/removeAll");jr(I6+"/remove");var Kf="RTK_autoBatch",d_=function(){return function(e){var t;return{payload:e,meta:(t={},t[Kf]=!0,t)}}},f_;typeof queueMicrotask=="function"&&queueMicrotask.bind(typeof window!="undefined"?window:typeof global!="undefined"?global:globalThis);M2e();var Z0=globalThis&&globalThis.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Q0=globalThis&&globalThis.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},gbe=Object.defineProperty,vbe=Object.defineProperties,ybe=Object.getOwnPropertyDescriptors,J0=Object.getOwnPropertySymbols,mz=Object.prototype.hasOwnProperty,gz=Object.prototype.propertyIsEnumerable,p_=function(e,t,n){return t in e?gbe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},an=function(e,t){for(var n in t||(t={}))mz.call(t,n)&&p_(e,n,t[n]);if(J0)for(var r=0,i=J0(t);r<i.length;r++){var n=i[r];gz.call(t,n)&&p_(e,n,t[n])}return e},zo=function(e,t){return vbe(e,ybe(t))},h_=function(e,t){var n={};for(var r in e)mz.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&J0)for(var i=0,o=J0(e);i<o.length;i++){var r=o[i];t.indexOf(r)<0&&gz.call(e,r)&&(n[r]=e[r])}return n},ev=function(e,t,n){return new Promise(function(r,i){var o=function(l){try{s(n.next(l))}catch(c){i(c)}},a=function(l){try{s(n.throw(l))}catch(c){i(c)}},s=function(l){return l.done?r(l.value):Promise.resolve(l.value).then(o,a)};s((n=n.apply(e,t)).next())})},Lt;(function(e){e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected"})(Lt||(Lt={}));function bbe(e){return{status:e,isUninitialized:e===Lt.uninitialized,isLoading:e===Lt.pending,isSuccess:e===Lt.fulfilled,isError:e===Lt.rejected}}function xbe(e){return new RegExp("(^|:)//").test(e)}var Sbe=function(e){return e.replace(/\/$/,"")},wbe=function(e){return e.replace(/^\//,"")};function Cbe(e,t){if(!e)return t;if(!t)return e;if(xbe(t))return t;var n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=Sbe(e),t=wbe(t),""+e+n+t}var m_=function(e){return[].concat.apply([],e)};function kbe(){return typeof navigator=="undefined"||navigator.onLine===void 0?!0:navigator.onLine}function Ebe(){return typeof document=="undefined"?!0:document.visibilityState!=="hidden"}var g_=qd;function vz(e,t){if(e===t||!(g_(e)&&g_(t)||Array.isArray(e)&&Array.isArray(t)))return t;for(var n=Object.keys(t),r=Object.keys(e),i=n.length===r.length,o=Array.isArray(t)?[]:{},a=0,s=n;a<s.length;a++){var l=s[a];o[l]=vz(e[l],t[l]),i&&(i=e[l]===o[l])}return i?e:o}var v_=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return fetch.apply(void 0,e)},Ibe=function(e){return e.status>=200&&e.status<=299},Tbe=function(e){return/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"")};function y_(e){if(!qd(e))return e;for(var t=an({},e),n=0,r=Object.entries(t);n<r.length;n++){var i=r[n],o=i[0],a=i[1];a===void 0&&delete t[o]}return t}function _be(e){var t=this;e===void 0&&(e={});var n=e,r=n.baseUrl,i=n.prepareHeaders,o=i===void 0?function(v){return v}:i,a=n.fetchFn,s=a===void 0?v_:a,l=n.paramsSerializer,c=n.isJsonContentType,u=c===void 0?Tbe:c,d=n.jsonContentType,f=d===void 0?"application/json":d,p=n.timeout,m=n.validateStatus,g=h_(n,["baseUrl","prepareHeaders","fetchFn","paramsSerializer","isJsonContentType","jsonContentType","timeout","validateStatus"]);return typeof fetch=="undefined"&&s===v_&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),function(v,b){return ev(t,null,function(){var x,w,E,C,I,T,_,P,M,D,V,B,L,G,z,j,F,H,R,W,X,te,re,ne,ie,ae,le,he,Se,pe,st,Ot,In,Wi,ua,Mr,Rr,pn,fl,pl;return Z0(this,function(hn){switch(hn.label){case 0:return x=b.signal,w=b.getState,E=b.extra,C=b.endpoint,I=b.forced,T=b.type,P=typeof v=="string"?{url:v}:v,M=P.url,D=P.method,V=D===void 0?"GET":D,B=P.headers,L=B===void 0?new Headers(g.headers):B,G=P.body,z=G===void 0?void 0:G,j=P.params,F=j===void 0?void 0:j,H=P.responseHandler,R=H===void 0?"json":H,W=P.validateStatus,X=W===void 0?m!=null?m:Ibe:W,te=P.timeout,re=te===void 0?p:te,ne=h_(P,["url","method","headers","body","params","responseHandler","validateStatus","timeout"]),ie=an(zo(an({},g),{method:V,signal:x,body:z}),ne),L=new Headers(y_(L)),ae=ie,[4,o(L,{getState:w,extra:E,endpoint:C,forced:I,type:T})];case 1:ae.headers=hn.sent()||L,le=function(Kr){return typeof Kr=="object"&&(qd(Kr)||Array.isArray(Kr)||typeof Kr.toJSON=="function")},!ie.headers.has("content-type")&&le(z)&&ie.headers.set("content-type",f),le(z)&&u(ie.headers)&&(ie.body=JSON.stringify(z)),F&&(he=~M.indexOf("?")?"&":"?",Se=l?l(F):new URLSearchParams(y_(F)),M+=he+Se),M=Cbe(r,M),pe=new Request(M,ie),st=pe.clone(),_={request:st},In=!1,Wi=re&&setTimeout(function(){In=!0,b.abort()},re),hn.label=2;case 2:return hn.trys.push([2,4,5,6]),[4,s(pe)];case 3:return Ot=hn.sent(),[3,6];case 4:return ua=hn.sent(),[2,{error:{status:In?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(ua)},meta:_}];case 5:return Wi&&clearTimeout(Wi),[7];case 6:Mr=Ot.clone(),_.response=Mr,pn="",hn.label=7;case 7:return hn.trys.push([7,9,,10]),[4,Promise.all([y(Ot,R).then(function(Kr){return Rr=Kr},function(Kr){return fl=Kr}),Mr.text().then(function(Kr){return pn=Kr},function(){})])];case 8:if(hn.sent(),fl)throw fl;return[3,10];case 9:return pl=hn.sent(),[2,{error:{status:"PARSING_ERROR",originalStatus:Ot.status,data:pn,error:String(pl)},meta:_}];case 10:return[2,X(Ot,Rr)?{data:Rr,meta:_}:{error:{status:Ot.status,data:Rr},meta:_}]}})})};function y(v,b){return ev(this,null,function(){var x;return Z0(this,function(w){switch(w.label){case 0:return typeof b=="function"?[2,b(v)]:(b==="content-type"&&(b=u(v.headers)?"json":"text"),b!=="json"?[3,2]:[4,v.text()]);case 1:return x=w.sent(),[2,x.length?JSON.parse(x):null];case 2:return[2,v.text()]}})})}}var b_=function(){function e(t,n){n===void 0&&(n=void 0),this.value=t,this.meta=n}return e}(),T6=jr("__rtkq/focused"),yz=jr("__rtkq/unfocused"),_6=jr("__rtkq/online"),bz=jr("__rtkq/offline"),ra;(function(e){e.query="query",e.mutation="mutation"})(ra||(ra={}));function xz(e){return e.type===ra.query}function Pbe(e){return e.type===ra.mutation}function Sz(e,t,n,r,i,o){return Obe(e)?e(t,n,r,i).map(GS).map(o):Array.isArray(e)?e.map(GS).map(o):[]}function Obe(e){return typeof e=="function"}function GS(e){return typeof e=="string"?{type:e}:e}function O5(e){return e!=null}var vh=Symbol("forceQueryFn"),KS=function(e){return typeof e[vh]=="function"};function Mbe(e){var t=e.serializeQueryArgs,n=e.queryThunk,r=e.mutationThunk,i=e.api,o=e.context,a=new Map,s=new Map,l=i.internalActions,c=l.unsubscribeQueryResult,u=l.removeMutationResult,d=l.updateSubscriptionOptions;return{buildInitiateQuery:b,buildInitiateMutation:x,getRunningQueryThunk:m,getRunningMutationThunk:g,getRunningQueriesThunk:y,getRunningMutationsThunk:v,getRunningOperationPromises:p,removalWarning:f};function f(){throw new Error(`This method had to be removed due to a conceptual bug in RTK.
       Please see https://github.com/reduxjs/redux-toolkit/pull/2481 for details.
       See https://redux-toolkit.js.org/rtk-query/usage/server-side-rendering for new guidance on SSR.`)}function p(){var w=function(E){return Array.from(E.values()).flatMap(function(C){return C?Object.values(C):[]})};return Q0(Q0([],w(a)),w(s)).filter(O5)}function m(w,E){return function(C){var I,T=o.endpointDefinitions[w],_=t({queryArgs:E,endpointDefinition:T,endpointName:w});return(I=a.get(C))==null?void 0:I[_]}}function g(w,E){return function(C){var I;return(I=s.get(C))==null?void 0:I[E]}}function y(){return function(w){return Object.values(a.get(w)||{}).filter(O5)}}function v(){return function(w){return Object.values(s.get(w)||{}).filter(O5)}}function b(w,E){var C=function(I,T){var _=T===void 0?{}:T,P=_.subscribe,M=P===void 0?!0:P,D=_.forceRefetch,V=_.subscriptionOptions,B=vh,L=_[B];return function(G,z){var j,F,H=t({queryArgs:I,endpointDefinition:E,endpointName:w}),R=n((j={type:"query",subscribe:M,forceRefetch:D,subscriptionOptions:V,endpointName:w,originalArgs:I,queryCacheKey:H},j[vh]=L,j)),W=i.endpoints[w].select(I),X=G(R),te=W(z()),re=X.requestId,ne=X.abort,ie=te.requestId!==re,ae=(F=a.get(G))==null?void 0:F[H],le=function(){return W(z())},he=Object.assign(L?X.then(le):ie&&!ae?Promise.resolve(te):Promise.all([ae,X]).then(le),{arg:I,requestId:re,subscriptionOptions:V,queryCacheKey:H,abort:ne,unwrap:function(){return ev(this,null,function(){var pe;return Z0(this,function(st){switch(st.label){case 0:return[4,he];case 1:if(pe=st.sent(),pe.isError)throw pe.error;return[2,pe.data]}})})},refetch:function(){return G(C(I,{subscribe:!1,forceRefetch:!0}))},unsubscribe:function(){M&&G(c({queryCacheKey:H,requestId:re}))},updateSubscriptionOptions:function(pe){he.subscriptionOptions=pe,G(d({endpointName:w,requestId:re,queryCacheKey:H,options:pe}))}});if(!ae&&!ie&&!L){var Se=a.get(G)||{};Se[H]=he,a.set(G,Se),he.then(function(){delete Se[H],Object.keys(Se).length||a.delete(G)})}return he}};return C}function x(w){return function(E,C){var I=C===void 0?{}:C,T=I.track,_=T===void 0?!0:T,P=I.fixedCacheKey;return function(M,D){var V=r({type:"mutation",endpointName:w,originalArgs:E,track:_,fixedCacheKey:P}),B=M(V),L=B.requestId,G=B.abort,z=B.unwrap,j=B.unwrap().then(function(W){return{data:W}}).catch(function(W){return{error:W}}),F=function(){M(u({requestId:L,fixedCacheKey:P}))},H=Object.assign(j,{arg:B.arg,requestId:L,abort:G,unwrap:z,unsubscribe:F,reset:F}),R=s.get(M)||{};return s.set(M,R),R[L]=H,H.then(function(){delete R[L],Object.keys(R).length||s.delete(M)}),P&&(R[P]=H,H.then(function(){R[P]===H&&(delete R[P],Object.keys(R).length||s.delete(M))})),H}}}}function x_(e){return e}function Rbe(e){var t=this,n=e.reducerPath,r=e.baseQuery,i=e.context.endpointDefinitions,o=e.serializeQueryArgs,a=e.api,s=function(x,w,E){return function(C){var I=i[x];C(a.internalActions.queryResultPatched({queryCacheKey:o({queryArgs:w,endpointDefinition:I,endpointName:x}),patches:E}))}},l=function(x,w,E){return function(C,I){var T,_,P=a.endpoints[x].select(w)(I()),M={patches:[],inversePatches:[],undo:function(){return C(a.util.patchQueryData(x,w,M.inversePatches))}};if(P.status===Lt.uninitialized)return M;if("data"in P)if(bo(P.data)){var D=sz(P.data,E),V=D[1],B=D[2];(T=M.patches).push.apply(T,V),(_=M.inversePatches).push.apply(_,B)}else{var L=E(P.data);M.patches.push({op:"replace",path:[],value:L}),M.inversePatches.push({op:"replace",path:[],value:P.data})}return C(a.util.patchQueryData(x,w,M.patches)),M}},c=function(x,w,E){return function(C){var I;return C(a.endpoints[x].initiate(w,(I={subscribe:!1,forceRefetch:!0},I[vh]=function(){return{data:E}},I)))}},u=function(x,w){return ev(t,[x,w],function(E,C){var I,T,_,P,M,D,V,B,L,G,z,j,F,H,R,W,X,te,re=C.signal,ne=C.abort,ie=C.rejectWithValue,ae=C.fulfillWithValue,le=C.dispatch,he=C.getState,Se=C.extra;return Z0(this,function(pe){switch(pe.label){case 0:I=i[E.endpointName],pe.label=1;case 1:return pe.trys.push([1,8,,13]),T=x_,_=void 0,P={signal:re,abort:ne,dispatch:le,getState:he,extra:Se,endpoint:E.endpointName,type:E.type,forced:E.type==="query"?d(E,he()):void 0},M=E.type==="query"?E[vh]:void 0,M?(_=M(),[3,6]):[3,2];case 2:return I.query?[4,r(I.query(E.originalArgs),P,I.extraOptions)]:[3,4];case 3:return _=pe.sent(),I.transformResponse&&(T=I.transformResponse),[3,6];case 4:return[4,I.queryFn(E.originalArgs,P,I.extraOptions,function(st){return r(st,P,I.extraOptions)})];case 5:_=pe.sent(),pe.label=6;case 6:if(_.error)throw new b_(_.error,_.meta);return z=ae,[4,T(_.data,_.meta,E.originalArgs)];case 7:return[2,z.apply(void 0,[pe.sent(),(X={fulfilledTimeStamp:Date.now(),baseQueryMeta:_.meta},X[Kf]=!0,X)])];case 8:if(j=pe.sent(),F=j,!(F instanceof b_))return[3,12];H=x_,I.query&&I.transformErrorResponse&&(H=I.transformErrorResponse),pe.label=9;case 9:return pe.trys.push([9,11,,12]),R=ie,[4,H(F.value,F.meta,E.originalArgs)];case 10:return[2,R.apply(void 0,[pe.sent(),(te={baseQueryMeta:F.meta},te[Kf]=!0,te)])];case 11:return W=pe.sent(),F=W,[3,12];case 12:throw console.error(F),F;case 13:return[2]}})})};function d(x,w){var E,C,I,T,_=(C=(E=w[n])==null?void 0:E.queries)==null?void 0:C[x.queryCacheKey],P=(I=w[n])==null?void 0:I.config.refetchOnMountOrArgChange,M=_==null?void 0:_.fulfilledTimeStamp,D=(T=x.forceRefetch)!=null?T:x.subscribe&&P;return D?D===!0||(Number(new Date)-Number(M))/1e3>=D:!1}var f=u_(n+"/executeQuery",u,{getPendingMeta:function(){var x;return x={startedTimeStamp:Date.now()},x[Kf]=!0,x},condition:function(x,w){var E=w.getState,C,I,T,_=E(),P=(I=(C=_[n])==null?void 0:C.queries)==null?void 0:I[x.queryCacheKey],M=P==null?void 0:P.fulfilledTimeStamp,D=x.originalArgs,V=P==null?void 0:P.originalArgs,B=i[x.endpointName];return KS(x)?!0:(P==null?void 0:P.status)==="pending"?!1:d(x,_)||xz(B)&&((T=B==null?void 0:B.forceRefetch)==null?void 0:T.call(B,{currentArg:D,previousArg:V,endpointState:P,state:_}))?!0:!M},dispatchConditionRejection:!0}),p=u_(n+"/executeMutation",u,{getPendingMeta:function(){var x;return x={startedTimeStamp:Date.now()},x[Kf]=!0,x}}),m=function(x){return"force"in x},g=function(x){return"ifOlderThan"in x},y=function(x,w,E){return function(C,I){var T=m(E)&&E.force,_=g(E)&&E.ifOlderThan,P=function(B){return B===void 0&&(B=!0),a.endpoints[x].initiate(w,{forceRefetch:B})},M=a.endpoints[x].select(w)(I());if(T)C(P());else if(_){var D=M==null?void 0:M.fulfilledTimeStamp;if(!D){C(P());return}var V=(Number(new Date)-Number(new Date(D)))/1e3>=_;V&&C(P())}else C(P(!1))}};function v(x){return function(w){var E,C;return((C=(E=w==null?void 0:w.meta)==null?void 0:E.arg)==null?void 0:C.endpointName)===x}}function b(x,w){return{matchPending:kp(E6(x),v(w)),matchFulfilled:kp(_c(x),v(w)),matchRejected:kp(gh(x),v(w))}}return{queryThunk:f,mutationThunk:p,prefetch:y,updateQueryData:l,upsertQueryData:c,patchQueryData:s,buildMatchThunkActions:b}}function wz(e,t,n,r){return Sz(n[e.meta.arg.endpointName][t],_c(e)?e.payload:void 0,g2(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function gm(e,t,n){var r=e[t];r&&n(r)}function yh(e){var t;return(t="arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)!=null?t:e.requestId}function S_(e,t,n){var r=e[yh(t)];r&&n(r)}var _f={};function Dbe(e){var t=e.reducerPath,n=e.queryThunk,r=e.mutationThunk,i=e.context,o=i.endpointDefinitions,a=i.apiUid,s=i.extractRehydrationInfo,l=i.hasRehydrationInfo,c=e.assertTagType,u=e.config,d=jr(t+"/resetApiState"),f=us({name:t+"/queries",initialState:_f,reducers:{removeQueryResult:{reducer:function(E,C){var I=C.payload.queryCacheKey;delete E[I]},prepare:d_()},queryResultPatched:function(E,C){var I=C.payload,T=I.queryCacheKey,_=I.patches;gm(E,T,function(P){P.data=r_(P.data,_.concat())})}},extraReducers:function(E){E.addCase(n.pending,function(C,I){var T=I.meta,_=I.meta.arg,P,M,D=KS(_);(_.subscribe||D)&&((M=C[P=_.queryCacheKey])!=null||(C[P]={status:Lt.uninitialized,endpointName:_.endpointName})),gm(C,_.queryCacheKey,function(V){V.status=Lt.pending,V.requestId=D&&V.requestId?V.requestId:T.requestId,_.originalArgs!==void 0&&(V.originalArgs=_.originalArgs),V.startedTimeStamp=T.startedTimeStamp})}).addCase(n.fulfilled,function(C,I){var T=I.meta,_=I.payload;gm(C,T.arg.queryCacheKey,function(P){var M;if(!(P.requestId!==T.requestId&&!KS(T.arg))){var D=o[T.arg.endpointName].merge;if(P.status=Lt.fulfilled,D)if(P.data!==void 0){var V=T.fulfilledTimeStamp,B=T.arg,L=T.baseQueryMeta,G=T.requestId,z=e1(P.data,function(j){return D(j,_,{arg:B.originalArgs,baseQueryMeta:L,fulfilledTimeStamp:V,requestId:G})});P.data=z}else P.data=_;else P.data=(M=o[T.arg.endpointName].structuralSharing)==null||M?vz(P.data,_):_;delete P.error,P.fulfilledTimeStamp=T.fulfilledTimeStamp}})}).addCase(n.rejected,function(C,I){var T=I.meta,_=T.condition,P=T.arg,M=T.requestId,D=I.error,V=I.payload;gm(C,P.queryCacheKey,function(B){if(!_){if(B.requestId!==M)return;B.status=Lt.rejected,B.error=V!=null?V:D}})}).addMatcher(l,function(C,I){for(var T=s(I).queries,_=0,P=Object.entries(T);_<P.length;_++){var M=P[_],D=M[0],V=M[1];((V==null?void 0:V.status)===Lt.fulfilled||(V==null?void 0:V.status)===Lt.rejected)&&(C[D]=V)}})}}),p=us({name:t+"/mutations",initialState:_f,reducers:{removeMutationResult:{reducer:function(E,C){var I=C.payload,T=yh(I);T in E&&delete E[T]},prepare:d_()}},extraReducers:function(E){E.addCase(r.pending,function(C,I){var T=I.meta,_=I.meta,P=_.requestId,M=_.arg,D=_.startedTimeStamp;!M.track||(C[yh(T)]={requestId:P,status:Lt.pending,endpointName:M.endpointName,startedTimeStamp:D})}).addCase(r.fulfilled,function(C,I){var T=I.payload,_=I.meta;!_.arg.track||S_(C,_,function(P){P.requestId===_.requestId&&(P.status=Lt.fulfilled,P.data=T,P.fulfilledTimeStamp=_.fulfilledTimeStamp)})}).addCase(r.rejected,function(C,I){var T=I.payload,_=I.error,P=I.meta;!P.arg.track||S_(C,P,function(M){M.requestId===P.requestId&&(M.status=Lt.rejected,M.error=T!=null?T:_)})}).addMatcher(l,function(C,I){for(var T=s(I).mutations,_=0,P=Object.entries(T);_<P.length;_++){var M=P[_],D=M[0],V=M[1];((V==null?void 0:V.status)===Lt.fulfilled||(V==null?void 0:V.status)===Lt.rejected)&&D!==(V==null?void 0:V.requestId)&&(C[D]=V)}})}}),m=us({name:t+"/invalidation",initialState:_f,reducers:{},extraReducers:function(E){E.addCase(f.actions.removeQueryResult,function(C,I){for(var T=I.payload.queryCacheKey,_=0,P=Object.values(C);_<P.length;_++)for(var M=P[_],D=0,V=Object.values(M);D<V.length;D++){var B=V[D],L=B.indexOf(T);L!==-1&&B.splice(L,1)}}).addMatcher(l,function(C,I){for(var T,_,P,M,D=s(I).provided,V=0,B=Object.entries(D);V<B.length;V++)for(var L=B[V],G=L[0],z=L[1],j=0,F=Object.entries(z);j<F.length;j++)for(var H=F[j],R=H[0],W=H[1],X=(M=(_=(T=C[G])!=null?T:C[G]={})[P=R||"__internal_without_id"])!=null?M:_[P]=[],te=0,re=W;te<re.length;te++){var ne=re[te],ie=X.includes(ne);ie||X.push(ne)}}).addMatcher(Yd(_c(n),g2(n)),function(C,I){for(var T,_,P,M,D=wz(I,"providesTags",o,c),V=I.meta.arg.queryCacheKey,B=0,L=Object.values(C);B<L.length;B++)for(var G=L[B],z=0,j=Object.values(G);z<j.length;z++){var F=j[z],H=F.indexOf(V);H!==-1&&F.splice(H,1)}for(var R=0,W=D;R<W.length;R++){var X=W[R],te=X.type,re=X.id,ne=(M=(_=(T=C[te])!=null?T:C[te]={})[P=re||"__internal_without_id"])!=null?M:_[P]=[],ie=ne.includes(V);ie||ne.push(V)}})}}),g=us({name:t+"/subscriptions",initialState:_f,reducers:{updateSubscriptionOptions:function(E,C){},unsubscribeQueryResult:function(E,C){},internal_probeSubscription:function(E,C){}}}),y=us({name:t+"/internalSubscriptions",initialState:_f,reducers:{subscriptionsUpdated:function(E,C){return r_(E,C.payload)}}}),v=us({name:t+"/config",initialState:an({online:kbe(),focused:Ebe(),middlewareRegistered:!1},u),reducers:{middlewareRegistered:function(E,C){var I=C.payload;E.middlewareRegistered=E.middlewareRegistered==="conflict"||a!==I?"conflict":!0}},extraReducers:function(E){E.addCase(_6,function(C){C.online=!0}).addCase(bz,function(C){C.online=!1}).addCase(T6,function(C){C.focused=!0}).addCase(yz,function(C){C.focused=!1}).addMatcher(l,function(C){return an({},C)})}}),b=cz({queries:f.reducer,mutations:p.reducer,provided:m.reducer,subscriptions:y.reducer,config:v.reducer}),x=function(E,C){return b(d.match(C)?void 0:E,C)},w=zo(an(an(an(an(an({},v.actions),f.actions),g.actions),y.actions),p.actions),{unsubscribeMutationResult:p.actions.removeMutationResult,resetApiState:d});return{reducer:x,actions:w}}var gs=Symbol.for("RTKQ/skipToken"),Cz={status:Lt.uninitialized},w_=e1(Cz,function(){}),C_=e1(Cz,function(){});function Abe(e){var t=e.serializeQueryArgs,n=e.reducerPath,r=function(u){return w_},i=function(u){return C_};return{buildQuerySelector:s,buildMutationSelector:l,selectInvalidatedBy:c};function o(u){return an(an({},u),bbe(u.status))}function a(u){var d=u[n];return d}function s(u,d){return function(f){var p=t({queryArgs:f,endpointDefinition:d,endpointName:u}),m=function(y){var v,b,x;return(x=(b=(v=a(y))==null?void 0:v.queries)==null?void 0:b[p])!=null?x:w_},g=f===gs?r:m;return Cp(g,o)}}function l(){return function(u){var d,f;typeof u=="object"?f=(d=yh(u))!=null?d:gs:f=u;var p=function(g){var y,v,b;return(b=(v=(y=a(g))==null?void 0:y.mutations)==null?void 0:v[f])!=null?b:C_},m=f===gs?i:p;return Cp(m,o)}}function c(u,d){for(var f,p=u[n],m=new Set,g=0,y=d.map(GS);g<y.length;g++){var v=y[g],b=p.provided[v.type];if(!!b)for(var x=(f=v.id!==void 0?b[v.id]:m_(Object.values(b)))!=null?f:[],w=0,E=x;w<E.length;w++){var C=E[w];m.add(C)}}return m_(Array.from(m.values()).map(function(I){var T=p.queries[I];return T?[{queryCacheKey:I,endpointName:T.endpointName,originalArgs:T.originalArgs}]:[]}))}}var k_=function(e){var t=e.endpointName,n=e.queryArgs;return t+"("+JSON.stringify(n,function(r,i){return qd(i)?Object.keys(i).sort().reduce(function(o,a){return o[a]=i[a],o},{}):i})+")"};function Lbe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(r){var i=VS(function(u){var d,f;return(f=r.extractRehydrationInfo)==null?void 0:f.call(r,u,{reducerPath:(d=r.reducerPath)!=null?d:"api"})}),o=zo(an({reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1},r),{extractRehydrationInfo:i,serializeQueryArgs:function(u){var d=k_;if("serializeQueryArgs"in u.endpointDefinition){var f=u.endpointDefinition.serializeQueryArgs;d=function(p){var m=f(p);return typeof m=="string"?m:k_(zo(an({},p),{queryArgs:m}))}}else r.serializeQueryArgs&&(d=r.serializeQueryArgs);return d(u)},tagTypes:Q0([],r.tagTypes||[])}),a={endpointDefinitions:{},batch:function(u){u()},apiUid:pz(),extractRehydrationInfo:i,hasRehydrationInfo:VS(function(u){return i(u)!=null})},s={injectEndpoints:c,enhanceEndpoints:function(u){var d=u.addTagTypes,f=u.endpoints;if(d)for(var p=0,m=d;p<m.length;p++){var g=m[p];o.tagTypes.includes(g)||o.tagTypes.push(g)}if(f)for(var y=0,v=Object.entries(f);y<v.length;y++){var b=v[y],x=b[0],w=b[1];typeof w=="function"?w(a.endpointDefinitions[x]):Object.assign(a.endpointDefinitions[x]||{},w)}return s}},l=e.map(function(u){return u.init(s,o,a)});function c(u){for(var d=u.endpoints({query:function(w){return zo(an({},w),{type:ra.query})},mutation:function(w){return zo(an({},w),{type:ra.mutation})}}),f=0,p=Object.entries(d);f<p.length;f++){var m=p[f],g=m[0],y=m[1];if(!(!u.overrideExisting&&g in a.endpointDefinitions)){a.endpointDefinitions[g]=y;for(var v=0,b=l;v<b.length;v++){var x=b[v];x.injectEndpoint(g,y)}}}return s}return s.injectEndpoints({endpoints:r.endpoints})}}function Bbe(e){for(var t in e)return!1;return!0}var $be=2147483647/1e3-1,Fbe=function(e){var t=e.reducerPath,n=e.api,r=e.context,i=e.internalState,o=n.internalActions,a=o.removeQueryResult,s=o.unsubscribeQueryResult;function l(f){var p=i.currentSubscriptions[f];return!!p&&!Bbe(p)}var c={},u=function(f,p,m){var g;if(s.match(f)){var y=p.getState()[t],v=f.payload.queryCacheKey;d(v,(g=y.queries[v])==null?void 0:g.endpointName,p,y.config)}if(n.util.resetApiState.match(f))for(var b=0,x=Object.entries(c);b<x.length;b++){var w=x[b],E=w[0],C=w[1];C&&clearTimeout(C),delete c[E]}if(r.hasRehydrationInfo(f))for(var y=p.getState()[t],I=r.extractRehydrationInfo(f).queries,T=0,_=Object.entries(I);T<_.length;T++){var P=_[T],v=P[0],M=P[1];d(v,M==null?void 0:M.endpointName,p,y.config)}};function d(f,p,m,g){var y,v=r.endpointDefinitions[p],b=(y=v==null?void 0:v.keepUnusedDataFor)!=null?y:g.keepUnusedDataFor;if(b!==1/0){var x=Math.max(0,Math.min(b,$be));if(!l(f)){var w=c[f];w&&clearTimeout(w),c[f]=setTimeout(function(){l(f)||m.dispatch(a({queryCacheKey:f})),delete c[f]},x*1e3)}}}return u},Nbe=function(e){var t=e.reducerPath,n=e.context,r=e.context.endpointDefinitions,i=e.mutationThunk,o=e.api,a=e.assertTagType,s=e.refetchQuery,l=o.internalActions.removeQueryResult,c=Yd(_c(i),g2(i)),u=function(f,p){c(f)&&d(wz(f,"invalidatesTags",r,a),p),o.util.invalidateTags.match(f)&&d(Sz(f.payload,void 0,void 0,void 0,void 0,a),p)};function d(f,p){var m=p.getState(),g=m[t],y=o.util.selectInvalidatedBy(m,f);n.batch(function(){for(var v,b=Array.from(y.values()),x=0,w=b;x<w.length;x++){var E=w[x].queryCacheKey,C=g.queries[E],I=(v=g.subscriptions[E])!=null?v:{};C&&(Object.keys(I).length===0?p.dispatch(l({queryCacheKey:E})):C.status!==Lt.uninitialized&&p.dispatch(s(C,E)))}})}return u},zbe=function(e){var t=e.reducerPath,n=e.queryThunk,r=e.api,i=e.refetchQuery,o=e.internalState,a={},s=function(p,m){(r.internalActions.updateSubscriptionOptions.match(p)||r.internalActions.unsubscribeQueryResult.match(p))&&c(p.payload,m),(n.pending.match(p)||n.rejected.match(p)&&p.meta.condition)&&c(p.meta.arg,m),(n.fulfilled.match(p)||n.rejected.match(p)&&!p.meta.condition)&&l(p.meta.arg,m),r.util.resetApiState.match(p)&&d()};function l(p,m){var g=p.queryCacheKey,y=m.getState()[t],v=y.queries[g],b=o.currentSubscriptions[g];if(!(!v||v.status===Lt.uninitialized)){var x=f(b);if(!!Number.isFinite(x)){var w=a[g];w!=null&&w.timeout&&(clearTimeout(w.timeout),w.timeout=void 0);var E=Date.now()+x,C=a[g]={nextPollTimestamp:E,pollingInterval:x,timeout:setTimeout(function(){C.timeout=void 0,m.dispatch(i(v,g))},x)}}}}function c(p,m){var g=p.queryCacheKey,y=m.getState()[t],v=y.queries[g],b=o.currentSubscriptions[g];if(!(!v||v.status===Lt.uninitialized)){var x=f(b);if(!Number.isFinite(x)){u(g);return}var w=a[g],E=Date.now()+x;(!w||E<w.nextPollTimestamp)&&l({queryCacheKey:g},m)}}function u(p){var m=a[p];m!=null&&m.timeout&&clearTimeout(m.timeout),delete a[p]}function d(){for(var p=0,m=Object.keys(a);p<m.length;p++){var g=m[p];u(g)}}function f(p){p===void 0&&(p={});var m=Number.POSITIVE_INFINITY;for(var g in p)p[g].pollingInterval&&(m=Math.min(p[g].pollingInterval,m));return m}return s},jbe=function(e){var t=e.reducerPath,n=e.context,r=e.api,i=e.refetchQuery,o=e.internalState,a=r.internalActions.removeQueryResult,s=function(c,u){T6.match(c)&&l(u,"refetchOnFocus"),_6.match(c)&&l(u,"refetchOnReconnect")};function l(c,u){var d=c.getState()[t],f=d.queries,p=o.currentSubscriptions;n.batch(function(){for(var m=0,g=Object.keys(p);m<g.length;m++){var y=g[m],v=f[y],b=p[y];if(!(!b||!v)){var x=Object.values(b).some(function(w){return w[u]===!0})||Object.values(b).every(function(w){return w[u]===void 0})&&d.config[u];x&&(Object.keys(b).length===0?c.dispatch(a({queryCacheKey:y})):v.status!==Lt.uninitialized&&c.dispatch(i(v,y)))}}})}return s},E_=new Error("Promise never resolved before cacheEntryRemoved."),Hbe=function(e){var t=e.api,n=e.reducerPath,r=e.context,i=e.queryThunk,o=e.mutationThunk;e.internalState;var a=US(i),s=US(o),l=_c(i,o),c={},u=function(p,m,g){var y=d(p);if(i.pending.match(p)){var v=g[n].queries[y],b=m.getState()[n].queries[y];!v&&b&&f(p.meta.arg.endpointName,p.meta.arg.originalArgs,y,m,p.meta.requestId)}else if(o.pending.match(p)){var b=m.getState()[n].mutations[y];b&&f(p.meta.arg.endpointName,p.meta.arg.originalArgs,y,m,p.meta.requestId)}else if(l(p)){var x=c[y];x!=null&&x.valueResolved&&(x.valueResolved({data:p.payload,meta:p.meta.baseQueryMeta}),delete x.valueResolved)}else if(t.internalActions.removeQueryResult.match(p)||t.internalActions.removeMutationResult.match(p)){var x=c[y];x&&(delete c[y],x.cacheEntryRemoved())}else if(t.util.resetApiState.match(p))for(var w=0,E=Object.entries(c);w<E.length;w++){var C=E[w],I=C[0],x=C[1];delete c[I],x.cacheEntryRemoved()}};function d(p){return a(p)?p.meta.arg.queryCacheKey:s(p)?p.meta.requestId:t.internalActions.removeQueryResult.match(p)?p.payload.queryCacheKey:t.internalActions.removeMutationResult.match(p)?yh(p.payload):""}function f(p,m,g,y,v){var b=r.endpointDefinitions[p],x=b==null?void 0:b.onCacheEntryAdded;if(!!x){var w={},E=new Promise(function(M){w.cacheEntryRemoved=M}),C=Promise.race([new Promise(function(M){w.valueResolved=M}),E.then(function(){throw E_})]);C.catch(function(){}),c[g]=w;var I=t.endpoints[p].select(b.type===ra.query?m:g),T=y.dispatch(function(M,D,V){return V}),_=zo(an({},y),{getCacheEntry:function(){return I(y.getState())},requestId:v,extra:T,updateCachedData:b.type===ra.query?function(M){return y.dispatch(t.util.updateQueryData(p,m,M))}:void 0,cacheDataLoaded:C,cacheEntryRemoved:E}),P=x(m,_);Promise.resolve(P).catch(function(M){if(M!==E_)throw M})}}return u},Vbe=function(e){var t=e.api,n=e.context,r=e.queryThunk,i=e.mutationThunk,o=E6(r,i),a=gh(r,i),s=_c(r,i),l={},c=function(u,d){var f,p,m;if(o(u)){var g=u.meta,y=g.requestId,v=g.arg,b=v.endpointName,x=v.originalArgs,w=n.endpointDefinitions[b],E=w==null?void 0:w.onQueryStarted;if(E){var C={},I=new Promise(function(L,G){C.resolve=L,C.reject=G});I.catch(function(){}),l[y]=C;var T=t.endpoints[b].select(w.type===ra.query?x:y),_=d.dispatch(function(L,G,z){return z}),P=zo(an({},d),{getCacheEntry:function(){return T(d.getState())},requestId:y,extra:_,updateCachedData:w.type===ra.query?function(L){return d.dispatch(t.util.updateQueryData(b,x,L))}:void 0,queryFulfilled:I});E(x,P)}}else if(s(u)){var M=u.meta,y=M.requestId,D=M.baseQueryMeta;(f=l[y])==null||f.resolve({data:u.payload,meta:D}),delete l[y]}else if(a(u)){var V=u.meta,y=V.requestId,B=V.rejectedWithValue,D=V.baseQueryMeta;(m=l[y])==null||m.reject({error:(p=u.payload)!=null?p:u.error,isUnhandledError:!B,meta:D}),delete l[y]}};return c},Wbe=function(e){var t=e.api,n=e.context.apiUid,r=e.reducerPath;return function(i,o){var a,s;t.util.resetApiState.match(i)&&o.dispatch(t.internalActions.middlewareRegistered(n))}},I_,Ube=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window!="undefined"?window:typeof global!="undefined"?global:globalThis):function(e){return(I_||(I_=Promise.resolve())).then(e).catch(function(t){return setTimeout(function(){throw t},0)})},Gbe=function(e){var t=e.api,n=e.queryThunk,r=e.internalState,i=t.reducerPath+"/subscriptions",o=null,a=!1,s=t.internalActions,l=s.updateSubscriptionOptions,c=s.unsubscribeQueryResult,u=function(d,f){var p,m,g,y,v,b,x,w,E;if(l.match(f)){var C=f.payload,I=C.queryCacheKey,T=C.requestId,_=C.options;return(p=d==null?void 0:d[I])!=null&&p[T]&&(d[I][T]=_),!0}if(c.match(f)){var P=f.payload,I=P.queryCacheKey,T=P.requestId;return d[I]&&delete d[I][T],!0}if(t.internalActions.removeQueryResult.match(f))return delete d[f.payload.queryCacheKey],!0;if(n.pending.match(f)){var M=f.meta,D=M.arg,T=M.requestId;if(D.subscribe){var V=(g=d[m=D.queryCacheKey])!=null?g:d[m]={};return V[T]=(v=(y=D.subscriptionOptions)!=null?y:V[T])!=null?v:{},!0}}if(n.rejected.match(f)){var B=f.meta,L=B.condition,D=B.arg,T=B.requestId;if(L&&D.subscribe){var V=(x=d[b=D.queryCacheKey])!=null?x:d[b]={};return V[T]=(E=(w=D.subscriptionOptions)!=null?w:V[T])!=null?E:{},!0}}return!1};return function(d,f){var p,m;if(o||(o=JSON.parse(JSON.stringify(r.currentSubscriptions))),t.internalActions.internal_probeSubscription.match(d)){var g=d.payload,y=g.queryCacheKey,v=g.requestId,b=!!((p=r.currentSubscriptions[y])!=null&&p[v]);return[!1,b]}var x=u(r.currentSubscriptions,d);if(x){a||(Ube(function(){var I=JSON.parse(JSON.stringify(r.currentSubscriptions)),T=sz(o,function(){return I}),_=T[1];f.next(t.internalActions.subscriptionsUpdated(_)),o=I,a=!1}),a=!0);var w=!!((m=d.type)!=null&&m.startsWith(i)),E=n.rejected.match(d)&&d.meta.condition&&!!d.meta.arg.subscribe,C=!w&&!E;return[C,!1]}return[!0,!1]}};function Kbe(e){var t=e.reducerPath,n=e.queryThunk,r=e.api,i=e.context,o=i.apiUid,a={invalidateTags:jr(t+"/invalidateTags")},s=function(d){return!!d&&typeof d.type=="string"&&d.type.startsWith(t+"/")},l=[Wbe,Fbe,Nbe,zbe,Hbe,Vbe],c=function(d){var f=!1,p={currentSubscriptions:{}},m=zo(an({},e),{internalState:p,refetchQuery:u}),g=l.map(function(b){return b(m)}),y=Gbe(m),v=jbe(m);return function(b){return function(x){f||(f=!0,d.dispatch(r.internalActions.middlewareRegistered(o)));var w=zo(an({},d),{next:b}),E=d.getState(),C=y(x,w,E),I=C[0],T=C[1],_;if(I?_=b(x):_=T,d.getState()[t]&&(v(x,w,E),s(x)||i.hasRehydrationInfo(x)))for(var P=0,M=g;P<M.length;P++){var D=M[P];D(x,w,E)}return _}}};return{middleware:c,actions:a};function u(d,f,p){return p===void 0&&(p={}),n(an({type:"query",endpointName:d.endpointName,originalArgs:d.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:f},p))}}function ns(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Object.assign.apply(Object,Q0([e],t))}var T_=Symbol(),qbe=function(){return{name:T_,init:function(e,t,n){var r=t.baseQuery,i=t.tagTypes,o=t.reducerPath,a=t.serializeQueryArgs,s=t.keepUnusedDataFor,l=t.refetchOnMountOrArgChange,c=t.refetchOnFocus,u=t.refetchOnReconnect;R2e();var d=function(X){return X};Object.assign(e,{reducerPath:o,endpoints:{},internalActions:{onOnline:_6,onOffline:bz,onFocus:T6,onFocusLost:yz},util:{}});var f=Rbe({baseQuery:r,reducerPath:o,context:n,api:e,serializeQueryArgs:a}),p=f.queryThunk,m=f.mutationThunk,g=f.patchQueryData,y=f.updateQueryData,v=f.upsertQueryData,b=f.prefetch,x=f.buildMatchThunkActions,w=Dbe({context:n,queryThunk:p,mutationThunk:m,reducerPath:o,assertTagType:d,config:{refetchOnFocus:c,refetchOnReconnect:u,refetchOnMountOrArgChange:l,keepUnusedDataFor:s,reducerPath:o}}),E=w.reducer,C=w.actions;ns(e.util,{patchQueryData:g,updateQueryData:y,upsertQueryData:v,prefetch:b,resetApiState:C.resetApiState}),ns(e.internalActions,C);var I=Kbe({reducerPath:o,context:n,queryThunk:p,mutationThunk:m,api:e,assertTagType:d}),T=I.middleware,_=I.actions;ns(e.util,_),ns(e,{reducer:E,middleware:T});var P=Abe({serializeQueryArgs:a,reducerPath:o}),M=P.buildQuerySelector,D=P.buildMutationSelector,V=P.selectInvalidatedBy;ns(e.util,{selectInvalidatedBy:V});var B=Mbe({queryThunk:p,mutationThunk:m,api:e,serializeQueryArgs:a,context:n}),L=B.buildInitiateQuery,G=B.buildInitiateMutation,z=B.getRunningMutationThunk,j=B.getRunningMutationsThunk,F=B.getRunningQueriesThunk,H=B.getRunningQueryThunk,R=B.getRunningOperationPromises,W=B.removalWarning;return ns(e.util,{getRunningOperationPromises:R,getRunningOperationPromise:W,getRunningMutationThunk:z,getRunningMutationsThunk:j,getRunningQueryThunk:H,getRunningQueriesThunk:F}),{name:T_,injectEndpoint:function(X,te){var re,ne,ie=e;(ne=(re=ie.endpoints)[X])!=null||(re[X]={}),xz(te)?ns(ie.endpoints[X],{name:X,select:M(X,te),initiate:L(X,te)},x(p,X)):Pbe(te)&&ns(ie.endpoints[X],{name:X,select:D(),initiate:G(X)},x(m,X))}}}}},Ybe=globalThis&&globalThis.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},Xbe=Object.defineProperty,Zbe=Object.defineProperties,Qbe=Object.getOwnPropertyDescriptors,__=Object.getOwnPropertySymbols,Jbe=Object.prototype.hasOwnProperty,e5e=Object.prototype.propertyIsEnumerable,P_=function(e,t,n){return t in e?Xbe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n},ga=function(e,t){for(var n in t||(t={}))Jbe.call(t,n)&&P_(e,n,t[n]);if(__)for(var r=0,i=__(t);r<i.length;r++){var n=i[r];e5e.call(t,n)&&P_(e,n,t[n])}return e},Eg=function(e,t){return Zbe(e,Qbe(t))};function O_(e,t,n,r){var i=h.exports.useMemo(function(){return{queryArgs:e,serialized:typeof e=="object"?t({queryArgs:e,endpointDefinition:n,endpointName:r}):e}},[e,t,n,r]),o=h.exports.useRef(i);return h.exports.useEffect(function(){o.current.serialized!==i.serialized&&(o.current=i)},[i]),o.current.serialized===i.serialized?o.current.queryArgs:e}var M5=Symbol();function R5(e){var t=h.exports.useRef(e);return h.exports.useEffect(function(){V0(t.current,e)||(t.current=e)},[e]),V0(t.current,e)?t.current:e}var t5e=function(e){var t=e.endpointName,n=e.queryArgs;return t+"("+JSON.stringify(n,function(r,i){return qd(i)?Object.keys(i).sort().reduce(function(o,a){return o[a]=i[a],o},{}):i})+")"},n5e=typeof window!="undefined"&&!!window.document&&!!window.document.createElement?h.exports.useLayoutEffect:h.exports.useEffect,r5e=function(e){return e},i5e=function(e){return e.isUninitialized?Eg(ga({},e),{isUninitialized:!1,isFetching:!0,isLoading:e.data===void 0,status:Lt.pending}):e};function o5e(e){var t=e.api,n=e.moduleOptions,r=n.batch,i=n.useDispatch,o=n.useSelector,a=n.useStore,s=n.unstable__sideEffectsInRender,l=e.serializeQueryArgs,c=e.context,u=s?function(g){return g()}:h.exports.useEffect;return{buildQueryHooks:p,buildMutationHook:m,usePrefetch:f};function d(g,y,v){if((y==null?void 0:y.endpointName)&&g.isUninitialized){var b=y.endpointName,x=c.endpointDefinitions[b];l({queryArgs:y.originalArgs,endpointDefinition:x,endpointName:b})===l({queryArgs:v,endpointDefinition:x,endpointName:b})&&(y=void 0)}v===gs&&(y=void 0);var w=g.isSuccess?g.data:y==null?void 0:y.data;w===void 0&&(w=g.data);var E=w!==void 0,C=g.isLoading,I=!E&&C,T=g.isSuccess||C&&E;return Eg(ga({},g),{data:w,currentData:g.data,isFetching:C,isLoading:I,isSuccess:T})}function f(g,y){var v=i(),b=R5(y);return h.exports.useCallback(function(x,w){return v(t.util.prefetch(g,x,ga(ga({},b),w)))},[g,v,b])}function p(g){var y=function(x,w){var E=w===void 0?{}:w,C=E.refetchOnReconnect,I=E.refetchOnFocus,T=E.refetchOnMountOrArgChange,_=E.skip,P=_===void 0?!1:_,M=E.pollingInterval,D=M===void 0?0:M,V=t.endpoints[g].initiate,B=i(),L=O_(P?gs:x,t5e,c.endpointDefinitions[g],g),G=R5({refetchOnReconnect:C,refetchOnFocus:I,pollingInterval:D}),z=h.exports.useRef(!1),j=h.exports.useRef(),F=j.current||{},H=F.queryCacheKey,R=F.requestId,W=!1;if(H&&R){var X=B(t.internalActions.internal_probeSubscription({queryCacheKey:H,requestId:R}));W=!!X}var te=!W&&z.current;return u(function(){z.current=W}),u(function(){j.current=void 0},[te]),u(function(){var re,ne=j.current;if(L===gs){ne==null||ne.unsubscribe(),j.current=void 0;return}var ie=(re=j.current)==null?void 0:re.subscriptionOptions;if(!ne||ne.arg!==L){ne==null||ne.unsubscribe();var ae=B(V(L,{subscriptionOptions:G,forceRefetch:T}));j.current=ae}else G!==ie&&ne.updateSubscriptionOptions(G)},[B,V,T,L,G,te]),h.exports.useEffect(function(){return function(){var re;(re=j.current)==null||re.unsubscribe(),j.current=void 0}},[]),h.exports.useMemo(function(){return{refetch:function(){var re;if(!j.current)throw new Error("Cannot refetch a query that has not been started yet.");return(re=j.current)==null?void 0:re.refetch()}}},[])},v=function(x){var w=x===void 0?{}:x,E=w.refetchOnReconnect,C=w.refetchOnFocus,I=w.pollingInterval,T=I===void 0?0:I,_=t.endpoints[g].initiate,P=i(),M=h.exports.useState(M5),D=M[0],V=M[1],B=h.exports.useRef(),L=R5({refetchOnReconnect:E,refetchOnFocus:C,pollingInterval:T});u(function(){var j,F,H=(j=B.current)==null?void 0:j.subscriptionOptions;L!==H&&((F=B.current)==null||F.updateSubscriptionOptions(L))},[L]);var G=h.exports.useRef(L);u(function(){G.current=L},[L]);var z=h.exports.useCallback(function(j,F){F===void 0&&(F=!1);var H;return r(function(){var R;(R=B.current)==null||R.unsubscribe(),B.current=H=P(_(j,{subscriptionOptions:G.current,forceRefetch:!F})),V(j)}),H},[P,_]);return h.exports.useEffect(function(){return function(){var j;(j=B==null?void 0:B.current)==null||j.unsubscribe()}},[]),h.exports.useEffect(function(){D!==M5&&!B.current&&z(D,!0)},[D,z]),h.exports.useMemo(function(){return[z,D]},[z,D])},b=function(x,w){var E=w===void 0?{}:w,C=E.skip,I=C===void 0?!1:C,T=E.selectFromResult,_=t.endpoints[g].select,P=O_(I?gs:x,l,c.endpointDefinitions[g],g),M=h.exports.useRef(),D=h.exports.useMemo(function(){return Cp([_(P),function(z,j){return j},function(z){return P}],d)},[_,P]),V=h.exports.useMemo(function(){return T?Cp([D],T):D},[D,T]),B=o(function(z){return V(z,M.current)},V0),L=a(),G=D(L.getState(),M.current);return n5e(function(){M.current=G},[G]),B};return{useQueryState:b,useQuerySubscription:y,useLazyQuerySubscription:v,useLazyQuery:function(x){var w=v(x),E=w[0],C=w[1],I=b(C,Eg(ga({},x),{skip:C===M5})),T=h.exports.useMemo(function(){return{lastArg:C}},[C]);return h.exports.useMemo(function(){return[E,I,T]},[E,I,T])},useQuery:function(x,w){var E=y(x,w),C=b(x,ga({selectFromResult:x===gs||(w==null?void 0:w.skip)?void 0:i5e},w)),I=C.data,T=C.status,_=C.isLoading,P=C.isSuccess,M=C.isError,D=C.error;return h.exports.useDebugValue({data:I,status:T,isLoading:_,isSuccess:P,isError:M,error:D}),h.exports.useMemo(function(){return ga(ga({},C),E)},[C,E])}}}function m(g){return function(y){var v=y===void 0?{}:y,b=v.selectFromResult,x=b===void 0?r5e:b,w=v.fixedCacheKey,E=t.endpoints[g],C=E.select,I=E.initiate,T=i(),_=h.exports.useState(),P=_[0],M=_[1];h.exports.useEffect(function(){return function(){P!=null&&P.arg.fixedCacheKey||P==null||P.reset()}},[P]);var D=h.exports.useCallback(function(ne){var ie=T(I(ne,{fixedCacheKey:w}));return M(ie),ie},[T,I,w]),V=(P||{}).requestId,B=h.exports.useMemo(function(){return Cp([C({fixedCacheKey:w,requestId:P==null?void 0:P.requestId})],x)},[C,P,x,w]),L=o(B,V0),G=w==null?P==null?void 0:P.arg.originalArgs:void 0,z=h.exports.useCallback(function(){r(function(){P&&M(void 0),w&&T(t.internalActions.removeMutationResult({requestId:V,fixedCacheKey:w}))})},[T,w,P,V]),j=L.endpointName,F=L.data,H=L.status,R=L.isLoading,W=L.isSuccess,X=L.isError,te=L.error;h.exports.useDebugValue({endpointName:j,data:F,status:H,isLoading:R,isSuccess:W,isError:X,error:te});var re=h.exports.useMemo(function(){return Eg(ga({},L),{originalArgs:G,reset:z})},[L,G,z]);return h.exports.useMemo(function(){return[D,re]},[D,re])}}}var tv;(function(e){e.query="query",e.mutation="mutation"})(tv||(tv={}));function a5e(e){return e.type===tv.query}function s5e(e){return e.type===tv.mutation}function D5(e){return e.replace(e[0],e[0].toUpperCase())}function vm(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];Object.assign.apply(Object,Ybe([e],t))}var l5e=Symbol(),c5e=function(e){var t=e===void 0?{}:e,n=t.batch,r=n===void 0?rl.exports.unstable_batchedUpdates:n,i=t.useDispatch,o=i===void 0?b6:i,a=t.useSelector,s=a===void 0?JN:a,l=t.useStore,c=l===void 0?nz:l,u=t.unstable__sideEffectsInRender,d=u===void 0?!1:u;return{name:l5e,init:function(f,p,m){var g=p.serializeQueryArgs,y=f,v=o5e({api:f,moduleOptions:{batch:r,useDispatch:o,useSelector:s,useStore:c,unstable__sideEffectsInRender:d},serializeQueryArgs:g,context:m}),b=v.buildQueryHooks,x=v.buildMutationHook,w=v.usePrefetch;return vm(y,{usePrefetch:w}),vm(m,{batch:r}),{injectEndpoint:function(E,C){if(a5e(C)){var I=b(E),T=I.useQuery,_=I.useLazyQuery,P=I.useLazyQuerySubscription,M=I.useQueryState,D=I.useQuerySubscription;vm(y.endpoints[E],{useQuery:T,useLazyQuery:_,useLazyQuerySubscription:P,useQueryState:M,useQuerySubscription:D}),f["use"+D5(E)+"Query"]=T,f["useLazy"+D5(E)+"Query"]=_}else if(s5e(C)){var V=x(E);vm(y.endpoints[E],{useMutation:V}),f["use"+D5(E)+"Mutation"]=V}}}}}},u5e=Lbe(qbe(),c5e()),kz=(e=>(e.CANVAS="Canvas",e))(kz||{});const Ig=u5e({reducerPath:"canvasApi",baseQuery:_be({prepareHeaders:(e,t)=>(e.set("mode","no-cors"),e)}),tagTypes:[kz.CANVAS],endpoints:e=>({searchCanvas:e.mutation({query:({worldId:t,term:n,serverUrl:r,userId:i})=>({method:"post",url:r+"/api/world/search",params:{id:t},body:{term:n},headers:{token:i,"x-user-token":i}})}),loadCanvas:e.query({query:({canvasId:t,userId:n,serverUrl:r})=>({url:r+"/api/canvas",params:{id:t},headers:{token:n,"x-user-token":n}})})})}),kd=JN,{useLoadCanvasQuery:d5e,useSearchCanvasMutation:f5e}=Ig;function Ez(e,t){const[n,r]=h.exports.useState(e);return h.exports.useEffect(()=>{const i=setTimeout(()=>r(e),t||500);return()=>{clearTimeout(i)}},[e,t]),n}var Iz={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(typeof self!="undefined"?self:Fl,function(){return function(n){var r={};function i(o){if(r[o])return r[o].exports;var a=r[o]={i:o,l:!1,exports:{}};return n[o].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=n,i.c=r,i.d=function(o,a,s){i.o(o,a)||Object.defineProperty(o,a,{enumerable:!0,get:s})},i.r=function(o){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},i.t=function(o,a){if(1&a&&(o=i(o)),8&a||4&a&&typeof o=="object"&&o&&o.__esModule)return o;var s=Object.create(null);if(i.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:o}),2&a&&typeof o!="string")for(var l in o)i.d(s,l,function(c){return o[c]}.bind(null,l));return s},i.n=function(o){var a=o&&o.__esModule?function(){return o.default}:function(){return o};return i.d(a,"a",a),a},i.o=function(o,a){return Object.prototype.hasOwnProperty.call(o,a)},i.p="",i(i.s=0)}([function(n,r,i){const{types:o,iterableTypes:a,errors:s}=i(1),l=i(2),c={[o.NUMBER]:l.isNumber,[o.BOOLEAN]:l.isBoolean,[o.STRING]:l.isString,[o.DATE]:l.isDate,[o.UNDEFINED]:l.isUndefined,[o.NULL]:l.isNull,[o.ARRAY]:l.isArray,[o.MAP]:l.isMap,[o.SET]:l.isSet,[o.ITERABLE_OBJECT]:l.isIterableObject},u={[o.DATE]:l.areDatesEqual};function d(y){const v=Object.keys(c);let b=o.DEFAULT;for(let x=0;x<v.length;x+=1)if(c[v[x]](y)){b=v[x];break}return b}function f(y,v,b,x){let w;return b===o.UNDEFINED&&x!==o.UNDEFINED?w="add":b!==o.UNDEFINED&&x===o.UNDEFINED?w="delete":function(E,C,I,T){return I===T&&(u[I]?u[I](E,C):E===C)}(y,v,b,x)?l.noop():w="update",w}function p(y,v,b,x,w){const E={op:b,path:x};return b!=="add"&&b!=="update"||(E.val=v),w&&b!=="add"&&(E.oldVal=y),E}function m(y,v,b,x,w){const E=d(y),C=d(v),I=x||[],T=w||[];if(function(_,P){return _===P&&a.indexOf(_)>=0}(E,C)){const _=function(D,V,B){if(B===o.ARRAY){const L=D.length>V.length?new Array(D.length):new Array(V.length);return L.fill(0),new Set(L.map((G,z)=>z))}return new Set(Object.keys(D).concat(Object.keys(V)))}(y,v,E).values();let{value:P,done:M}=_.next();for(;!M;){Object.prototype.hasOwnProperty.call(y,P)?Object.prototype.hasOwnProperty.call(v,P)?m(y[P],v[P],b,I.concat(P),T):T.push(p(y[P],v[P],"delete",I.concat(P),b)):T.push(p(y[P],v[P],"add",I.concat(P),b));const D=_.next();P=D.value,M=D.done}}else{const _=f(y,v,E,C);_!=null&&T.push(p(y,v,_,x,b))}return T}const g={add:l.setValueByPath,update:l.setValueByPath,delete:l.deleteValueByPath};n.exports={getDiff:(y,v,b=!1)=>m(y,v,b),applyDiff:(y,v,b)=>function(x,w,E){if(!(w instanceof Array))throw new Error(s.INVALID_DIFF_FORMAT);let C=x;return w.forEach(I=>{const{op:T,val:_,path:P}=I;if(!g[T])throw new Error(s.INVALID_DIFF_OP);C=g[T](C,P,_,E)}),C}(y,v,b)}},function(n,r){const i={NUMBER:"NUMBER",BOOLEAN:"BOOLEAN",STRING:"STRING",NULL:"NULL",UNDEFINED:"UNDEFINED",DATE:"DATE",ARRAY:"ARRAY",MAP:"MAP",SET:"SET",ITERABLE_OBJECT:"ITERABLE_OBJECT",DEFAULT:"OBJECT"};n.exports={types:i,iterableTypes:[i.ITERABLE_OBJECT,i.MAP,i.ARRAY,i.SET],errors:{EMPTY_DIFF:"No diff object is provided, Nothing to apply",INVALID_DIFF_FORMAT:"Invalid diff format",INVALID_DIFF_OP:"Unsupported operation provided into diff object"}}},function(n,r){const i=u=>d=>d instanceof u,o=i(Date),a=i(Array),s=i(Map),l=i(Set),c=u=>Object.prototype.toString.call(u)==="[object Object]";n.exports={isNumber:u=>typeof u=="number",isBoolean:u=>typeof u=="boolean",isString:u=>typeof u=="string",isDate:o,isUndefined:u=>u===void 0,isNull:u=>u===null,isArray:a,isMap:s,isSet:l,isIterableObject:c,noop:()=>{},areDatesEqual:(u,d)=>u.getTime()===d.getTime(),setValueByPath:function(u,d=[],f,p){if(!a(d))throw new Error(`Diff path: "${d}" is not valid`);const{length:m}=d;if(m===0)return f;let g=u;for(let y=0;y<m;y+=1){const v=d[y];if(!g)throw new Error(`Invalid path: "${d}" for object: ${JSON.stringify(u,null,2)}`);if(v==null)throw new Error(`Invalid path: "${d}" for object: ${JSON.stringify(u,null,2)}`);y!==m-1?(g=g[v],p&&p(g)):g[v]=f}return u},deleteValueByPath:function(u,d){const f=d||[];if(f.length===0)return;let p=u;const{length:m}=f;for(let g=0;g<m;g+=1)if(g!==m-1){if(!p[f[g]])throw new Error(`Invalid path: "${d}" for object: ${JSON.stringify(u,null,2)}`);p=p[f[g]]}else if(c(p))delete p[f[g]];else{const y=parseInt(f[g],10);for(;p.length>y;)p.pop()}return u}}}])})})(Iz);const ia=Object.create(null);ia.open="0";ia.close="1";ia.ping="2";ia.pong="3";ia.message="4";ia.upgrade="5";ia.noop="6";const Tg=Object.create(null);Object.keys(ia).forEach(e=>{Tg[ia[e]]=e});const p5e={type:"error",data:"parser error"},h5e=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",m5e=typeof ArrayBuffer=="function",g5e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Tz=({type:e,data:t},n,r)=>h5e&&t instanceof Blob?n?r(t):M_(t,r):m5e&&(t instanceof ArrayBuffer||g5e(t))?n?r(t):M_(new Blob([t]),r):r(ia[e]+(t||"")),M_=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+r)},n.readAsDataURL(e)},R_="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qf=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<R_.length;e++)qf[R_.charCodeAt(e)]=e;const v5e=e=>{let t=e.length*.75,n=e.length,r,i=0,o,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),u=new Uint8Array(c);for(r=0;r<n;r+=4)o=qf[e.charCodeAt(r)],a=qf[e.charCodeAt(r+1)],s=qf[e.charCodeAt(r+2)],l=qf[e.charCodeAt(r+3)],u[i++]=o<<2|a>>4,u[i++]=(a&15)<<4|s>>2,u[i++]=(s&3)<<6|l&63;return c},y5e=typeof ArrayBuffer=="function",_z=(e,t)=>{if(typeof e!="string")return{type:"message",data:Pz(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:b5e(e.substring(1),t)}:Tg[n]?e.length>1?{type:Tg[n],data:e.substring(1)}:{type:Tg[n]}:p5e},b5e=(e,t)=>{if(y5e){const n=v5e(e);return Pz(n,t)}else return{base64:!0,data:e}},Pz=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},Oz=String.fromCharCode(30),x5e=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,a)=>{Tz(o,!1,s=>{r[a]=s,++i===n&&t(r.join(Oz))})})},S5e=(e,t)=>{const n=e.split(Oz),r=[];for(let i=0;i<n.length;i++){const o=_z(n[i],t);if(r.push(o),o.type==="error")break}return r},Mz=4;function kn(e){if(e)return w5e(e)}function w5e(e){for(var t in kn.prototype)e[t]=kn.prototype[t];return e}kn.prototype.on=kn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};kn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};kn.prototype.off=kn.prototype.removeListener=kn.prototype.removeAllListeners=kn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};kn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};kn.prototype.emitReserved=kn.prototype.emit;kn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};kn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Is=(()=>typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")())();function Rz(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const C5e=setTimeout,k5e=clearTimeout;function v2(e,t){t.useNativeTimers?(e.setTimeoutFn=C5e.bind(Is),e.clearTimeoutFn=k5e.bind(Is)):(e.setTimeoutFn=setTimeout.bind(Is),e.clearTimeoutFn=clearTimeout.bind(Is))}const E5e=1.33;function I5e(e){return typeof e=="string"?T5e(e):Math.ceil((e.byteLength||e.size)*E5e)}function T5e(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}class _5e extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Dz extends kn{constructor(t){super(),this.writable=!1,v2(this,t),this.opts=t,this.query=t.query,this.readyState="",this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new _5e(t,n,r)),this}open(){return(this.readyState==="closed"||this.readyState==="")&&(this.readyState="opening",this.doOpen()),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=_z(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}}const Az="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),qS=64,P5e={};let D_=0,ym=0,A_;function L_(e){let t="";do t=Az[e%qS]+t,e=Math.floor(e/qS);while(e>0);return t}function Lz(){const e=L_(+new Date);return e!==A_?(D_=0,A_=e):e+"."+L_(D_++)}for(;ym<qS;ym++)P5e[Az[ym]]=ym;function Bz(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function O5e(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}let $z=!1;try{$z=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch{}const M5e=$z;function Fz(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||M5e))return new XMLHttpRequest}catch{}if(!t)try{return new Is[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function R5e(){}const D5e=function(){return new Fz({xdomain:!1}).responseType!=null}();class A5e extends Dz{constructor(t){if(super(t),this.polling=!1,typeof location!="undefined"){const r=location.protocol==="https:";let i=location.port;i||(i=r?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||i!==t.port,this.xs=t.secure!==r}const n=t&&t.forceBase64;this.supportsBinary=D5e&&!n}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};S5e(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,x5e(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=Lz()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=Bz(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new ea(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class ea extends kn{constructor(t,n){super(),v2(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=Rz(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new Fz(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document!="undefined"&&(this.index=ea.requestsCount++,ea.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr=="undefined"||this.xhr===null)){if(this.xhr.onreadystatechange=R5e,t)try{this.xhr.abort()}catch{}typeof document!="undefined"&&delete ea.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}ea.requestsCount=0;ea.requests={};if(typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",B_);else if(typeof addEventListener=="function"){const e="onpagehide"in Is?"pagehide":"unload";addEventListener(e,B_,!1)}}function B_(){for(let e in ea.requests)ea.requests.hasOwnProperty(e)&&ea.requests[e].abort()}const Nz=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),bm=Is.WebSocket||Is.MozWebSocket,$_=!0,L5e="arraybuffer",F_=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class B5e extends Dz{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=F_?{}:Rz(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=$_&&!F_?n?new bm(t,n):new bm(t):new bm(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||L5e,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;Tz(r,this.supportsBinary,o=>{const a={};try{$_&&this.ws.send(o)}catch{}i&&Nz(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=Lz()),this.supportsBinary||(t.b64=1);const i=Bz(t),o=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(o?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!bm}}const $5e={websocket:B5e,polling:A5e},F5e=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,N5e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function YS(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=F5e.exec(e||""),o={},a=14;for(;a--;)o[N5e[a]]=i[a]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=z5e(o,o.path),o.queryKey=j5e(o,o.query),o}function z5e(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function j5e(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}class vs extends kn{constructor(t,n={}){super(),t&&typeof t=="object"&&(n=t,t=null),t?(t=YS(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=YS(n.host).host),v2(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+"/",typeof this.opts.query=="string"&&(this.opts.query=O5e(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Mz,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new $5e[t](r)}open(){let t;if(this.opts.rememberUpgrade&&vs.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;vs.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;vs.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function o(){r||(r=!0,u(),n.close(),n=null)}const a=d=>{const f=new Error("probe error: "+d);f.transport=n.name,o(),this.emitReserved("upgradeError",f)};function s(){a("transport closed")}function l(){a("socket closed")}function c(d){n&&d.name!==n.name&&o()}const u=()=>{n.removeListener("open",i),n.removeListener("error",a),n.removeListener("close",s),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",a),n.once("close",s),this.once("close",l),this.once("upgrading",c),n.open()}onOpen(){if(this.readyState="open",vs.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade&&this.transport.pause){let t=0;const n=this.upgrades.length;for(;t<n;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.resetPingTimeout(),this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const n=new Error("server error");n.code=t.data,this.onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=I5e(i)),r>0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){vs.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;r<i;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}vs.protocol=Mz;function H5e(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=YS(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const V5e=typeof ArrayBuffer=="function",W5e=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,zz=Object.prototype.toString,U5e=typeof Blob=="function"||typeof Blob!="undefined"&&zz.call(Blob)==="[object BlobConstructor]",G5e=typeof File=="function"||typeof File!="undefined"&&zz.call(File)==="[object FileConstructor]";function P6(e){return V5e&&(e instanceof ArrayBuffer||W5e(e))||U5e&&e instanceof Blob||G5e&&e instanceof File}function _g(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(_g(e[n]))return!0;return!1}if(P6(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return _g(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&_g(e[n]))return!0;return!1}function K5e(e){const t=[],n=e.data,r=e;return r.data=XS(n,t),r.attachments=t.length,{packet:r,buffers:t}}function XS(e,t){if(!e)return e;if(P6(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=XS(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=XS(e[r],t));return n}return e}function q5e(e,t){return e.data=ZS(e.data,t),e.attachments=void 0,e}function ZS(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=ZS(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=ZS(e[n],t));return e}const Y5e=5;var Ke;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Ke||(Ke={}));class X5e{constructor(t){this.replacer=t}encode(t){return(t.type===Ke.EVENT||t.type===Ke.ACK)&&_g(t)?(t.type=t.type===Ke.EVENT?Ke.BINARY_EVENT:Ke.BINARY_ACK,this.encodeAsBinary(t)):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Ke.BINARY_EVENT||t.type===Ke.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=K5e(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class O6 extends kn{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t),n.type===Ke.BINARY_EVENT||n.type===Ke.BINARY_ACK?(this.reconstructor=new Z5e(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(P6(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Ke[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ke.BINARY_EVENT||r.type===Ke.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const a=t.substring(o,n);if(a!=Number(a)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(a)}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const a=t.charAt(n);if(a==null||Number(a)!=a){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(O6.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case Ke.CONNECT:return typeof n=="object";case Ke.DISCONNECT:return n===void 0;case Ke.CONNECT_ERROR:return typeof n=="string"||typeof n=="object";case Ke.EVENT:case Ke.BINARY_EVENT:return Array.isArray(n)&&n.length>0;case Ke.ACK:case Ke.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&this.reconstructor.finishedReconstruction()}}class Z5e{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=q5e(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}var Q5e=Object.freeze(Object.defineProperty({__proto__:null,protocol:Y5e,get PacketType(){return Ke},Encoder:X5e,Decoder:O6},Symbol.toStringTag,{value:"Module"}));function oo(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const J5e=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class jz extends kn{constructor(t,n,r){super(),this.connected=!1,this.receiveBuffer=[],this.sendBuffer=[],this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[oo(t,"open",this.onopen.bind(this)),oo(t,"packet",this.onpacket.bind(this)),oo(t,"error",this.onerror.bind(this)),oo(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(J5e.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');n.unshift(t);const r={type:Ke.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const a=this.ids++,s=n.pop();this._registerAckCallback(a,s),r.id=a}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){const r=this.flags.timeout;if(r===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o<this.sendBuffer.length;o++)this.sendBuffer[o].id===t&&this.sendBuffer.splice(o,1);n.call(this,new Error("operation has timed out"))},r);this.acks[t]=(...o)=>{this.io.clearTimeoutFn(i),n.apply(this,[null,...o])}}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this.packet({type:Ke.CONNECT,data:t})}):this.packet({type:Ke.CONNECT,data:this.auth})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ke.CONNECT:if(t.data&&t.data.sid){const i=t.data.sid;this.onconnect(i)}else this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ke.EVENT:case Ke.BINARY_EVENT:this.onevent(t);break;case Ke.ACK:case Ke.BINARY_ACK:this.onack(t);break;case Ke.DISCONNECT:this.ondisconnect();break;case Ke.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t)}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:Ke.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t){this.id=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ke.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Xd(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Xd.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Xd.prototype.reset=function(){this.attempts=0};Xd.prototype.setMin=function(e){this.ms=e};Xd.prototype.setMax=function(e){this.max=e};Xd.prototype.setJitter=function(e){this.jitter=e};class QS extends kn{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,v2(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Xd({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||Q5e;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new vs(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=oo(n,"open",function(){r.onopen(),t&&t()}),o=oo(n,"error",a=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",a),t?t(a):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const a=this._timeout;a===0&&i();const s=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},a);this.opts.autoUnref&&s.unref(),this.subs.push(function(){clearTimeout(s)})}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(oo(t,"ping",this.onping.bind(this)),oo(t,"data",this.ondata.bind(this)),oo(t,"error",this.onerror.bind(this)),oo(t,"close",this.onclose.bind(this)),oo(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Nz(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r||(r=new jz(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Pf={};function Pg(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=H5e(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,a=Pf[i]&&o in Pf[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a;let l;return s?l=new QS(r,t):(Pf[i]||(Pf[i]=new QS(r,t)),l=Pf[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Pg,{Manager:QS,Socket:jz,io:Pg,connect:Pg});var exe=Object.defineProperty,txe=(e,t,n)=>t in e?exe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ie=(e,t,n)=>(txe(e,typeof t!="symbol"?t+"":t,n),n),we=class{static clamp(e,t,n){return Math.max(t,typeof n!="undefined"?Math.min(e,n):e)}static clampV(e,t,n){return e.map(r=>n?we.clamp(r,t,n):we.clamp(r,t))}static cross(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(n[0]-e[0])*(t[1]-e[1])}static snap(e,t=1){return[Math.round(e[0]/t)*t,Math.round(e[1]/t)*t]}},O=we;Ie(O,"neg",e=>[-e[0],-e[1]]),Ie(O,"add",(e,t)=>[e[0]+t[0],e[1]+t[1]]),Ie(O,"addScalar",(e,t)=>[e[0]+t,e[1]+t]),Ie(O,"sub",(e,t)=>[e[0]-t[0],e[1]-t[1]]),Ie(O,"subScalar",(e,t)=>[e[0]-t,e[1]-t]),Ie(O,"vec",(e,t)=>[t[0]-e[0],t[1]-e[1]]),Ie(O,"mul",(e,t)=>[e[0]*t,e[1]*t]),Ie(O,"mulV",(e,t)=>[e[0]*t[0],e[1]*t[1]]),Ie(O,"div",(e,t)=>[e[0]/t,e[1]/t]),Ie(O,"divV",(e,t)=>[e[0]/t[0],e[1]/t[1]]),Ie(O,"per",e=>[e[1],-e[0]]),Ie(O,"dpr",(e,t)=>e[0]*t[0]+e[1]*t[1]),Ie(O,"cpr",(e,t)=>e[0]*t[1]-t[0]*e[1]),Ie(O,"len2",e=>e[0]*e[0]+e[1]*e[1]),Ie(O,"len",e=>Math.hypot(e[0],e[1])),Ie(O,"pry",(e,t)=>we.dpr(e,t)/we.len(t)),Ie(O,"uni",e=>we.div(e,we.len(e))),Ie(O,"normalize",e=>we.uni(e)),Ie(O,"tangent",(e,t)=>we.uni(we.sub(e,t))),Ie(O,"dist2",(e,t)=>we.len2(we.sub(e,t))),Ie(O,"dist",(e,t)=>Math.hypot(e[1]-t[1],e[0]-t[0])),Ie(O,"fastDist",(e,t)=>{let n=[t[0]-e[0],t[1]-e[1]],r=[Math.abs(n[0]),Math.abs(n[1])],i=1/Math.max(r[0],r[1]);return i=i*(1.29289-(r[0]+r[1])*i*.29289),[n[0]*i,n[1]*i]}),Ie(O,"ang",(e,t)=>Math.atan2(we.cpr(e,t),we.dpr(e,t))),Ie(O,"angle",(e,t)=>Math.atan2(t[1]-e[1],t[0]-e[0])),Ie(O,"med",(e,t)=>we.mul(we.add(e,t),.5)),Ie(O,"rot",(e,t=0)=>[e[0]*Math.cos(t)-e[1]*Math.sin(t),e[0]*Math.sin(t)+e[1]*Math.cos(t)]),Ie(O,"rotWith",(e,t,n=0)=>{if(n===0)return e;let r=Math.sin(n),i=Math.cos(n),o=e[0]-t[0],a=e[1]-t[1],s=o*i-a*r,l=o*r+a*i;return[s+t[0],l+t[1]]}),Ie(O,"isEqual",(e,t)=>e[0]===t[0]&&e[1]===t[1]),Ie(O,"lrp",(e,t,n)=>we.add(e,we.mul(we.sub(t,e),n))),Ie(O,"int",(e,t,n,r,i=1)=>{let o=(we.clamp(n,r)-n)/(r-n);return we.add(we.mul(e,1-o),we.mul(t,i))}),Ie(O,"ang3",(e,t,n)=>{let r=we.vec(t,e),i=we.vec(t,n);return we.ang(r,i)}),Ie(O,"abs",e=>[Math.abs(e[0]),Math.abs(e[1])]),Ie(O,"rescale",(e,t)=>{let n=we.len(e);return[t*e[0]/n,t*e[1]/n]}),Ie(O,"isLeft",(e,t,n)=>(t[0]-e[0])*(n[1]-e[1])-(n[0]-e[0])*(t[1]-e[1])),Ie(O,"clockwise",(e,t,n)=>we.isLeft(e,t,n)>0),Ie(O,"toFixed",e=>e.map(t=>Math.round(t*100)/100)),Ie(O,"nearestPointOnLineThroughPoint",(e,t,n)=>we.add(e,we.mul(t,we.pry(we.sub(n,e),t)))),Ie(O,"distanceToLineThroughPoint",(e,t,n)=>we.dist(n,we.nearestPointOnLineThroughPoint(e,t,n))),Ie(O,"nearestPointOnLineSegment",(e,t,n,r=!0)=>{let i=we.uni(we.sub(t,e)),o=we.add(e,we.mul(i,we.pry(we.sub(n,e),i)));if(r){if(o[0]<Math.min(e[0],t[0]))return e[0]<t[0]?e:t;if(o[0]>Math.max(e[0],t[0]))return e[0]>t[0]?e:t;if(o[1]<Math.min(e[1],t[1]))return e[1]<t[1]?e:t;if(o[1]>Math.max(e[1],t[1]))return e[1]>t[1]?e:t}return o}),Ie(O,"distanceToLineSegment",(e,t,n,r=!0)=>we.dist(n,we.nearestPointOnLineSegment(e,t,n,r))),Ie(O,"nearestPointOnBounds",(e,t)=>[we.clamp(t[0],e.minX,e.maxX),we.clamp(t[1],e.minY,e.maxY)]),Ie(O,"distanceToBounds",(e,t)=>we.dist(t,we.nearestPointOnBounds(e,t))),Ie(O,"nudge",(e,t,n)=>we.isEqual(e,t)?e:we.add(e,we.mul(we.uni(we.sub(t,e)),n))),Ie(O,"nudgeAtAngle",(e,t,n)=>[Math.cos(t)*n+e[0],Math.sin(t)*n+e[1]]),Ie(O,"toPrecision",(e,t=4)=>[+e[0].toPrecision(t),+e[1].toPrecision(t)]),Ie(O,"pointsBetween",(e,t,n=6)=>Array.from(Array(n)).map((r,i)=>{let o=i/(n-1),a=Math.min(1,.5+Math.abs(.5-o));return[...we.lrp(e,t,o),a]})),Ie(O,"slope",(e,t)=>e[0]===t[0]?NaN:(e[1]-t[1])/(e[0]-t[0])),Ie(O,"max",(...e)=>[Math.max(...e.map(t=>t[0])),Math.max(...e.map(t=>t[1]))]),Ie(O,"min",(...e)=>[Math.min(...e.map(t=>t[0])),Math.min(...e.map(t=>t[1]))]);var Y=O;function nxe(e,t,n){return Math.max(t,Math.min(e,n))}const Pt={toVector(e,t){return e===void 0&&(e=t),Array.isArray(e)?e:[e,e]},add(e,t){return[e[0]+t[0],e[1]+t[1]]},sub(e,t){return[e[0]-t[0],e[1]-t[1]]},addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function N_(e,t,n){return t===0||Math.abs(t)===1/0?Math.pow(e,n*5):e*t*n/(t+n*e)}function z_(e,t,n,r=.15){return r===0?nxe(e,t,n):e<t?-N_(t-e,n-t,r)+t:e>n?+N_(e-n,n-t,r)+n:e}function rxe(e,[t,n],[r,i]){const[[o,a],[s,l]]=e;return[z_(t,o,a,r),z_(n,s,l,i)]}function yn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?j_(Object(n),!0).forEach(function(r){yn(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}const Hz={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function H_(e){return e?e[0].toUpperCase()+e.slice(1):""}const ixe=["enter","leave"];function oxe(e=!1,t){return e&&!ixe.includes(t)}function axe(e,t="",n=!1){const r=Hz[e],i=r&&r[t]||t;return"on"+H_(e)+H_(i)+(oxe(n,i)?"Capture":"")}const sxe=["gotpointercapture","lostpointercapture"];function lxe(e){let t=e.substring(2).toLowerCase();const n=!!~t.indexOf("passive");n&&(t=t.replace("passive",""));const r=sxe.includes(t)?"capturecapture":"capture",i=!!~t.indexOf(r);return i&&(t=t.replace("capture","")),{device:t,capture:i,passive:n}}function cxe(e,t=""){const n=Hz[e],r=n&&n[t]||t;return e+r}function y2(e){return"touches"in e}function Vz(e){return y2(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function uxe(e){return Array.from(e.touches).filter(t=>{var n,r;return t.target===e.currentTarget||((n=e.currentTarget)===null||n===void 0||(r=n.contains)===null||r===void 0?void 0:r.call(n,t.target))})}function dxe(e){return e.type==="touchend"||e.type==="touchcancel"?e.changedTouches:e.targetTouches}function Wz(e){return y2(e)?dxe(e)[0]:e}function JS(e,t){const n=t.clientX-e.clientX,r=t.clientY-e.clientY,i=(t.clientX+e.clientX)/2,o=(t.clientY+e.clientY)/2,a=Math.hypot(n,r);return{angle:-(Math.atan2(n,r)*180)/Math.PI,distance:a,origin:[i,o]}}function fxe(e){return uxe(e).map(t=>t.identifier)}function V_(e,t){const[n,r]=Array.from(e.touches).filter(i=>t.includes(i.identifier));return JS(n,r)}function A5(e){const t=Wz(e);return y2(e)?t.identifier:t.pointerId}function Ed(e){const t=Wz(e);return[t.clientX,t.clientY]}const W_=40,U_=800;function Uz(e){let{deltaX:t,deltaY:n,deltaMode:r}=e;return r===1?(t*=W_,n*=W_):r===2&&(t*=U_,n*=U_),[t,n]}function pxe(e){var t,n;const{scrollX:r,scrollY:i,scrollLeft:o,scrollTop:a}=e.currentTarget;return[(t=r!=null?r:o)!==null&&t!==void 0?t:0,(n=i!=null?i:a)!==null&&n!==void 0?n:0]}function hxe(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:r,metaKey:i,ctrlKey:o}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:i,ctrlKey:o})}return t}function nv(e,...t){return typeof e=="function"?e(...t):e}function mxe(){}function gxe(...e){return e.length===0?mxe:e.length===1?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function G_(e,t){return Object.assign({},t,e||{})}const vxe=32;class Gz{constructor(t,n,r){this.ctrl=t,this.args=n,this.key=r,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(t){this.ctrl.state[this.key]=t}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:t,shared:n,ingKey:r,args:i}=this;n[r]=t._active=t.active=t._blocked=t._force=!1,t._step=[!1,!1],t.intentional=!1,t._movement=[0,0],t._distance=[0,0],t._direction=[0,0],t._delta=[0,0],t._bounds=[[-1/0,1/0],[-1/0,1/0]],t.args=i,t.axis=void 0,t.memo=void 0,t.elapsedTime=0,t.direction=[0,0],t.distance=[0,0],t.overflow=[0,0],t._movementBound=[!1,!1],t.velocity=[0,0],t.movement=[0,0],t.delta=[0,0],t.timeStamp=0}start(t){const n=this.state,r=this.config;n._active||(this.reset(),this.computeInitial(),n._active=!0,n.target=t.target,n.currentTarget=t.currentTarget,n.lastOffset=r.from?nv(r.from,n):n.offset,n.offset=n.lastOffset),n.startTime=n.timeStamp=t.timeStamp}computeValues(t){const n=this.state;n._values=t,n.values=this.config.transform(t)}computeInitial(){const t=this.state;t._initial=t._values,t.initial=t.values}compute(t){const{state:n,config:r,shared:i}=this;n.args=this.args;let o=0;if(t&&(n.event=t,r.preventDefault&&t.cancelable&&n.event.preventDefault(),n.type=t.type,i.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,i.locked=!!document.pointerLockElement,Object.assign(i,hxe(t)),i.down=i.pressed=i.buttons%2===1||i.touches>0,o=t.timeStamp-n.timeStamp,n.timeStamp=t.timeStamp,n.elapsedTime=n.timeStamp-n.startTime),n._active){const C=n._delta.map(Math.abs);Pt.addTo(n._distance,C)}this.axisIntent&&this.axisIntent(t);const[a,s]=n._movement,[l,c]=r.threshold,{_step:u,values:d}=n;if(r.hasCustomTransform?(u[0]===!1&&(u[0]=Math.abs(a)>=l&&d[0]),u[1]===!1&&(u[1]=Math.abs(s)>=c&&d[1])):(u[0]===!1&&(u[0]=Math.abs(a)>=l&&Math.sign(a)*l),u[1]===!1&&(u[1]=Math.abs(s)>=c&&Math.sign(s)*c)),n.intentional=u[0]!==!1||u[1]!==!1,!n.intentional)return;const f=[0,0];if(r.hasCustomTransform){const[C,I]=d;f[0]=u[0]!==!1?C-u[0]:0,f[1]=u[1]!==!1?I-u[1]:0}else f[0]=u[0]!==!1?a-u[0]:0,f[1]=u[1]!==!1?s-u[1]:0;this.restrictToAxis&&!n._blocked&&this.restrictToAxis(f);const p=n.offset,m=n._active&&!n._blocked||n.active;m&&(n.first=n._active&&!n.active,n.last=!n._active&&n.active,n.active=i[this.ingKey]=n._active,t&&(n.first&&("bounds"in r&&(n._bounds=nv(r.bounds,n)),this.setup&&this.setup()),n.movement=f,this.computeOffset()));const[g,y]=n.offset,[[v,b],[x,w]]=n._bounds;n.overflow=[g<v?-1:g>b?1:0,y<x?-1:y>w?1:0],n._movementBound[0]=n.overflow[0]?n._movementBound[0]===!1?n._movement[0]:n._movementBound[0]:!1,n._movementBound[1]=n.overflow[1]?n._movementBound[1]===!1?n._movement[1]:n._movementBound[1]:!1;const E=n._active?r.rubberband||[0,0]:[0,0];if(n.offset=rxe(n._bounds,n.offset,E),n.delta=Pt.sub(n.offset,p),this.computeMovement(),m&&(!n.last||o>vxe)){n.delta=Pt.sub(n.offset,p);const C=n.delta.map(Math.abs);Pt.addTo(n.distance,C),n.direction=n.delta.map(Math.sign),n._direction=n._delta.map(Math.sign),!n.first&&o>0&&(n.velocity=[C[0]/o,C[1]/o])}}emit(){const t=this.state,n=this.shared,r=this.config;if(t._active||this.clean(),(t._blocked||!t.intentional)&&!t._force&&!r.triggerAllEvents)return;const i=this.handler(Yt(Yt(Yt({},n),t),{},{[this.aliasKey]:t.values}));i!==void 0&&(t.memo=i)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}function yxe([e,t],n){const r=Math.abs(e),i=Math.abs(t);if(r>i&&r>n)return"x";if(i>r&&i>n)return"y"}class n1 extends Gz{constructor(...t){super(...t),yn(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=Pt.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=Pt.sub(this.state.offset,this.state.lastOffset)}axisIntent(t){const n=this.state,r=this.config;if(!n.axis&&t){const i=typeof r.axisThreshold=="object"?r.axisThreshold[Vz(t)]:r.axisThreshold;n.axis=yxe(n._movement,i)}n._blocked=(r.lockDirection||!!r.axis)&&!n.axis||!!r.axis&&r.axis!==n.axis}restrictToAxis(t){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":t[1]=0;break;case"y":t[0]=0;break}}}const bxe=e=>e,K_=.15,Kz={enabled(e=!0){return e},eventOptions(e,t,n){return Yt(Yt({},n.shared.eventOptions),e)},preventDefault(e=!1){return e},triggerAllEvents(e=!1){return e},rubberband(e=0){switch(e){case!0:return[K_,K_];case!1:return[0,0];default:return Pt.toVector(e)}},from(e){if(typeof e=="function")return e;if(e!=null)return Pt.toVector(e)},transform(e,t,n){const r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||bxe},threshold(e){return Pt.toVector(e,0)}},xxe=0,Pc=Yt(Yt({},Kz),{},{axis(e,t,{axis:n}){if(this.lockDirection=n==="lock",!this.lockDirection)return n},axisThreshold(e=xxe){return e},bounds(e={}){if(typeof e=="function")return o=>Pc.bounds(e(o));if("current"in e)return()=>e.current;if(typeof HTMLElement=="function"&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:i=1/0}=e;return[[t,n],[r,i]]}}),xm=10,q_={ArrowRight:(e=1)=>[xm*e,0],ArrowLeft:(e=1)=>[-xm*e,0],ArrowUp:(e=1)=>[0,-xm*e],ArrowDown:(e=1)=>[0,xm*e]};class Sxe extends n1{constructor(...t){super(...t),yn(this,"ingKey","dragging")}reset(){super.reset();const t=this.state;t._pointerId=void 0,t._pointerActive=!1,t._keyboardActive=!1,t._preventScroll=!1,t._delayed=!1,t.swipe=[0,0],t.tap=!1,t.canceled=!1,t.cancel=this.cancel.bind(this)}setup(){const t=this.state;if(t._bounds instanceof HTMLElement){const n=t._bounds.getBoundingClientRect(),r=t.currentTarget.getBoundingClientRect(),i={left:n.left-r.left+t.offset[0],right:n.right-r.right+t.offset[0],top:n.top-r.top+t.offset[1],bottom:n.bottom-r.bottom+t.offset[1]};t._bounds=Pc.bounds(i)}}cancel(){const t=this.state;t.canceled||(t.canceled=!0,t._active=!1,setTimeout(()=>{this.compute(),this.emit()},0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(t){const n=this.config,r=this.state;if(t.buttons!=null&&(Array.isArray(n.pointerButtons)?!n.pointerButtons.includes(t.buttons):n.pointerButtons!==-1&&n.pointerButtons!==t.buttons))return;const i=this.ctrl.setEventIds(t);n.pointerCapture&&t.target.setPointerCapture(t.pointerId),!(i&&i.size>1&&r._pointerActive)&&(this.start(t),this.setupPointer(t),r._pointerId=A5(t),r._pointerActive=!0,this.computeValues(Ed(t)),this.computeInitial(),n.preventScrollAxis&&Vz(t)!=="mouse"?(r._active=!1,this.setupScrollPrevention(t)):n.delay>0?(this.setupDelayTrigger(t),n.triggerAllEvents&&(this.compute(t),this.emit())):this.startPointerDrag(t))}startPointerDrag(t){const n=this.state;n._active=!0,n._preventScroll=!0,n._delayed=!1,this.compute(t),this.emit()}pointerMove(t){const n=this.state,r=this.config;if(!n._pointerActive||n.type===t.type&&t.timeStamp===n.timeStamp)return;const i=A5(t);if(n._pointerId!==void 0&&i!==n._pointerId)return;const o=Ed(t);if(document.pointerLockElement===t.target?n._delta=[t.movementX,t.movementY]:(n._delta=Pt.sub(o,n._values),this.computeValues(o)),Pt.addTo(n._movement,n._delta),this.compute(t),n._delayed&&n.intentional){this.timeoutStore.remove("dragDelay"),n.active=!1,this.startPointerDrag(t);return}if(r.preventScrollAxis&&!n._preventScroll)if(n.axis)if(n.axis===r.preventScrollAxis||r.preventScrollAxis==="xy"){n._active=!1,this.clean();return}else{this.timeoutStore.remove("startPointerDrag"),this.startPointerDrag(t);return}else return;this.emit()}pointerUp(t){this.ctrl.setEventIds(t);try{this.config.pointerCapture&&t.target.hasPointerCapture(t.pointerId)&&t.target.releasePointerCapture(t.pointerId)}catch{}const n=this.state,r=this.config;if(!n._active||!n._pointerActive)return;const i=A5(t);if(n._pointerId!==void 0&&i!==n._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(t);const[o,a]=n._distance;if(n.tap=o<=r.tapsThreshold&&a<=r.tapsThreshold,n.tap&&r.filterTaps)n._force=!0;else{const[s,l]=n.direction,[c,u]=n.velocity,[d,f]=n.movement,[p,m]=r.swipe.velocity,[g,y]=r.swipe.distance,v=r.swipe.duration;n.elapsedTime<v&&(Math.abs(c)>p&&Math.abs(d)>g&&(n.swipe[0]=s),Math.abs(u)>m&&Math.abs(f)>y&&(n.swipe[1]=l))}this.emit()}pointerClick(t){!this.state.tap&&t.detail>0&&(t.preventDefault(),t.stopPropagation())}setupPointer(t){const n=this.config,r=n.device;n.pointerLock&&t.currentTarget.requestPointerLock(),n.pointerCapture||(this.eventStore.add(this.sharedConfig.window,r,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,r,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,r,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(t){this.state._preventScroll&&t.cancelable&&t.preventDefault()}setupScrollPrevention(t){this.state._preventScroll=!1,wxe(t);const n=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",n),this.eventStore.add(this.sharedConfig.window,"touch","cancel",n),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,t)}setupDelayTrigger(t){this.state._delayed=!0,this.timeoutStore.add("dragDelay",()=>{this.state._step=[0,0],this.startPointerDrag(t)},this.config.delay)}keyDown(t){const n=q_[t.key];if(n){const r=this.state,i=t.shiftKey?10:t.altKey?.1:1;this.start(t),r._delta=n(i),r._keyboardActive=!0,Pt.addTo(r._movement,r._delta),this.compute(t),this.emit()}}keyUp(t){t.key in q_&&(this.state._keyboardActive=!1,this.setActive(),this.compute(t),this.emit())}bind(t){const n=this.config.device;t(n,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(t(n,"change",this.pointerMove.bind(this)),t(n,"end",this.pointerUp.bind(this)),t(n,"cancel",this.pointerUp.bind(this)),t("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(t("key","down",this.keyDown.bind(this)),t("key","up",this.keyUp.bind(this))),this.config.filterTaps&&t("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}}function wxe(e){"persist"in e&&typeof e.persist=="function"&&e.persist()}const r1=typeof window!="undefined"&&window.document&&window.document.createElement;function Cxe(){return r1&&"ontouchstart"in window}function Y_(){return Cxe()||r1&&window.navigator.maxTouchPoints>1}function kxe(){return r1&&"onpointerdown"in window}function Exe(){return r1&&"exitPointerLock"in window.document}function Ixe(){try{return"constructor"in GestureEvent}catch{return!1}}const Ti={isBrowser:r1,gesture:Ixe(),touch:Y_(),touchscreen:Y_(),pointer:kxe(),pointerLock:Exe()},Txe=250,_xe=180,Pxe=.5,Oxe=50,Mxe=250,X_={mouse:0,touch:0,pen:8},Rxe=Yt(Yt({},Pc),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:i=!1}={}}){return this.pointerLock=r&&Ti.pointerLock,Ti.touch&&n?"touch":this.pointerLock?"mouse":Ti.pointer&&!i?"pointer":Ti.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay=typeof n=="number"?n:n||n===void 0&&e?Txe:void 0,!(!Ti.touchscreen||n===!1))return e||(n!==void 0?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:i=!0}={}}){return this.pointerButtons=r,this.keys=i,!this.pointerLock&&this.device==="pointer"&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:r=3,axis:i=void 0}){const o=Pt.toVector(e,n?r:i?1:0);return this.filterTaps=n,this.tapsThreshold=r,o},swipe({velocity:e=Pxe,distance:t=Oxe,duration:n=Mxe}={}){return{velocity:this.transform(Pt.toVector(e)),distance:this.transform(Pt.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return _xe;case!1:return 0;default:return e}},axisThreshold(e){return e?Yt(Yt({},X_),e):X_}});function qz(e){const[t,n]=e.overflow,[r,i]=e._delta,[o,a]=e._direction;(t<0&&r>0&&o<0||t>0&&r<0&&o>0)&&(e._movement[0]=e._movementBound[0]),(n<0&&i>0&&a<0||n>0&&i<0&&a>0)&&(e._movement[1]=e._movementBound[1])}const Dxe=30,Axe=100;class Lxe extends Gz{constructor(...t){super(...t),yn(this,"ingKey","pinching"),yn(this,"aliasKey","da")}init(){this.state.offset=[1,0],this.state.lastOffset=[1,0],this.state._pointerEvents=new Map}reset(){super.reset();const t=this.state;t._touchIds=[],t.canceled=!1,t.cancel=this.cancel.bind(this),t.turns=0}computeOffset(){const{type:t,movement:n,lastOffset:r}=this.state;t==="wheel"?this.state.offset=Pt.add(n,r):this.state.offset=[(1+n[0])*r[0],n[1]+r[1]]}computeMovement(){const{offset:t,lastOffset:n}=this.state;this.state.movement=[t[0]/n[0],t[1]-n[1]]}axisIntent(){const t=this.state,[n,r]=t._movement;if(!t.axis){const i=Math.abs(n)*Dxe-Math.abs(r);i<0?t.axis="angle":i>0&&(t.axis="scale")}}restrictToAxis(t){this.config.lockDirection&&(this.state.axis==="scale"?t[1]=0:this.state.axis==="angle"&&(t[0]=0))}cancel(){const t=this.state;t.canceled||setTimeout(()=>{t.canceled=!0,t._active=!1,this.compute(),this.emit()},0)}touchStart(t){this.ctrl.setEventIds(t);const n=this.state,r=this.ctrl.touchIds;if(n._active&&n._touchIds.every(o=>r.has(o))||r.size<2)return;this.start(t),n._touchIds=Array.from(r).slice(0,2);const i=V_(t,n._touchIds);this.pinchStart(t,i)}pointerStart(t){if(t.buttons!=null&&t.buttons%2!==1)return;this.ctrl.setEventIds(t),t.target.setPointerCapture(t.pointerId);const n=this.state,r=n._pointerEvents,i=this.ctrl.pointerIds;if(n._active&&Array.from(r.keys()).every(a=>i.has(a))||(r.size<2&&r.set(t.pointerId,t),n._pointerEvents.size<2))return;this.start(t);const o=JS(...Array.from(r.values()));this.pinchStart(t,o)}pinchStart(t,n){const r=this.state;r.origin=n.origin,this.computeValues([n.distance,n.angle]),this.computeInitial(),this.compute(t),this.emit()}touchMove(t){if(!this.state._active)return;const n=V_(t,this.state._touchIds);this.pinchMove(t,n)}pointerMove(t){const n=this.state._pointerEvents;if(n.has(t.pointerId)&&n.set(t.pointerId,t),!this.state._active)return;const r=JS(...Array.from(n.values()));this.pinchMove(t,r)}pinchMove(t,n){const r=this.state,i=r._values[1],o=n.angle-i;let a=0;Math.abs(o)>270&&(a+=Math.sign(o)),this.computeValues([n.distance,n.angle-360*a]),r.origin=n.origin,r.turns=a,r._movement=[r._values[0]/r._initial[0]-1,r._values[1]-r._initial[1]],this.compute(t),this.emit()}touchEnd(t){this.ctrl.setEventIds(t),!!this.state._active&&this.state._touchIds.some(n=>!this.ctrl.touchIds.has(n))&&(this.state._active=!1,this.compute(t),this.emit())}pointerEnd(t){const n=this.state;this.ctrl.setEventIds(t);try{t.target.releasePointerCapture(t.pointerId)}catch{}n._pointerEvents.has(t.pointerId)&&n._pointerEvents.delete(t.pointerId),!!n._active&&n._pointerEvents.size<2&&(n._active=!1,this.compute(t),this.emit())}gestureStart(t){t.cancelable&&t.preventDefault();const n=this.state;n._active||(this.start(t),this.computeValues([t.scale,t.rotation]),n.origin=[t.clientX,t.clientY],this.compute(t),this.emit())}gestureMove(t){if(t.cancelable&&t.preventDefault(),!this.state._active)return;const n=this.state;this.computeValues([t.scale,t.rotation]),n.origin=[t.clientX,t.clientY];const r=n._movement;n._movement=[t.scale-1,t.rotation],n._delta=Pt.sub(n._movement,r),this.compute(t),this.emit()}gestureEnd(t){!this.state._active||(this.state._active=!1,this.compute(t),this.emit())}wheel(t){const n=this.config.modifierKey;n&&!t[n]||(this.state._active?this.wheelChange(t):this.wheelStart(t),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this)))}wheelStart(t){this.start(t),this.wheelChange(t)}wheelChange(t){"uv"in t||t.cancelable&&t.preventDefault();const r=this.state;r._delta=[-Uz(t)[1]/Axe*r.offset[0],0],Pt.addTo(r._movement,r._delta),qz(r),this.state.origin=[t.clientX,t.clientY],this.compute(t),this.emit()}wheelEnd(){!this.state._active||(this.state._active=!1,this.compute(),this.emit())}bind(t){const n=this.config.device;n&&(t(n,"start",this[n+"Start"].bind(this)),t(n,"change",this[n+"Move"].bind(this)),t(n,"end",this[n+"End"].bind(this)),t(n,"cancel",this[n+"End"].bind(this))),this.config.pinchOnWheel&&t("wheel","",this.wheel.bind(this),{passive:!1})}}const Bxe=Yt(Yt({},Kz),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!Ti.touch&&Ti.gesture)return"gesture";if(Ti.touch&&r)return"touch";if(Ti.touchscreen){if(Ti.pointer)return"pointer";if(Ti.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const i=a=>{const s=G_(nv(n,a),{min:-1/0,max:1/0});return[s.min,s.max]},o=a=>{const s=G_(nv(r,a),{min:-1/0,max:1/0});return[s.min,s.max]};return typeof n!="function"&&typeof r!="function"?[i(),o()]:a=>[i(a),o(a)]},threshold(e,t,n){return this.lockDirection=n.axis==="lock",Pt.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey(e){return e===void 0?"ctrlKey":e},pinchOnWheel(e=!0){return e}});class $xe extends n1{constructor(...t){super(...t),yn(this,"ingKey","moving")}move(t){this.config.mouseOnly&&t.pointerType!=="mouse"||(this.state._active?this.moveChange(t):this.moveStart(t),this.timeoutStore.add("moveEnd",this.moveEnd.bind(this)))}moveStart(t){this.start(t),this.computeValues(Ed(t)),this.compute(t),this.computeInitial(),this.emit()}moveChange(t){if(!this.state._active)return;const n=Ed(t),r=this.state;r._delta=Pt.sub(n,r._values),Pt.addTo(r._movement,r._delta),this.computeValues(n),this.compute(t),this.emit()}moveEnd(t){!this.state._active||(this.state._active=!1,this.compute(t),this.emit())}bind(t){t("pointer","change",this.move.bind(this)),t("pointer","leave",this.moveEnd.bind(this))}}const Fxe=Yt(Yt({},Pc),{},{mouseOnly:(e=!0)=>e});class Nxe extends n1{constructor(...t){super(...t),yn(this,"ingKey","scrolling")}scroll(t){this.state._active||this.start(t),this.scrollChange(t),this.timeoutStore.add("scrollEnd",this.scrollEnd.bind(this))}scrollChange(t){t.cancelable&&t.preventDefault();const n=this.state,r=pxe(t);n._delta=Pt.sub(r,n._values),Pt.addTo(n._movement,n._delta),this.computeValues(r),this.compute(t),this.emit()}scrollEnd(){!this.state._active||(this.state._active=!1,this.compute(),this.emit())}bind(t){t("scroll","",this.scroll.bind(this))}}const zxe=Pc;class jxe extends n1{constructor(...t){super(...t),yn(this,"ingKey","wheeling")}wheel(t){this.state._active||this.start(t),this.wheelChange(t),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this))}wheelChange(t){const n=this.state;n._delta=Uz(t),Pt.addTo(n._movement,n._delta),qz(n),this.compute(t),this.emit()}wheelEnd(){!this.state._active||(this.state._active=!1,this.compute(),this.emit())}bind(t){t("wheel","",this.wheel.bind(this))}}const Hxe=Pc;class Vxe extends n1{constructor(...t){super(...t),yn(this,"ingKey","hovering")}enter(t){this.config.mouseOnly&&t.pointerType!=="mouse"||(this.start(t),this.computeValues(Ed(t)),this.compute(t),this.emit())}leave(t){if(this.config.mouseOnly&&t.pointerType!=="mouse")return;const n=this.state;if(!n._active)return;n._active=!1;const r=Ed(t);n._movement=n._delta=Pt.sub(r,n._values),this.computeValues(r),this.compute(t),n.delta=n.movement,this.emit()}bind(t){t("pointer","enter",this.enter.bind(this)),t("pointer","leave",this.leave.bind(this))}}const Wxe=Yt(Yt({},Pc),{},{mouseOnly:(e=!0)=>e}),M6=new Map,e4=new Map;function Uxe(e){M6.set(e.key,e.engine),e4.set(e.key,e.resolver)}const Gxe={key:"drag",engine:Sxe,resolver:Rxe},Kxe={key:"hover",engine:Vxe,resolver:Wxe},qxe={key:"move",engine:$xe,resolver:Fxe},Yxe={key:"pinch",engine:Lxe,resolver:Bxe},Xxe={key:"scroll",engine:Nxe,resolver:zxe},Zxe={key:"wheel",engine:jxe,resolver:Hxe};function Qxe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Jxe(e,t){if(e==null)return{};var n=Qxe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}const e3e={target(e){if(e)return()=>"current"in e?e.current:e},enabled(e=!0){return e},window(e=Ti.isBrowser?window:void 0){return e},eventOptions({passive:e=!0,capture:t=!1}={}){return{passive:e,capture:t}},transform(e){return e}},t3e=["target","eventOptions","window","enabled","transform"];function Og(e={},t){const n={};for(const[r,i]of Object.entries(t))switch(typeof i){case"function":n[r]=i.call(n,e[r],r,e);break;case"object":n[r]=Og(e[r],i);break;case"boolean":i&&(n[r]=e[r]);break}return n}function n3e(e,t,n={}){const r=e,{target:i,eventOptions:o,window:a,enabled:s,transform:l}=r,c=Jxe(r,t3e);if(n.shared=Og({target:i,eventOptions:o,window:a,enabled:s,transform:l},e3e),t){const u=e4.get(t);n[t]=Og(Yt({shared:n.shared},c),u)}else for(const u in c){const d=e4.get(u);d&&(n[u]=Og(Yt({shared:n.shared},c[u]),d))}return n}class Yz{constructor(t,n){yn(this,"_listeners",new Set),this._ctrl=t,this._gestureKey=n}add(t,n,r,i,o){const a=this._listeners,s=cxe(n,r),l=this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{},c=Yt(Yt({},l),o);t.addEventListener(s,i,c);const u=()=>{t.removeEventListener(s,i,c),a.delete(u)};return a.add(u),u}clean(){this._listeners.forEach(t=>t()),this._listeners.clear()}}class r3e{constructor(){yn(this,"_timeouts",new Map)}add(t,n,r=140,...i){this.remove(t),this._timeouts.set(t,window.setTimeout(n,r,...i))}remove(t){const n=this._timeouts.get(t);n&&window.clearTimeout(n)}clean(){this._timeouts.forEach(t=>void window.clearTimeout(t)),this._timeouts.clear()}}class i3e{constructor(t){yn(this,"gestures",new Set),yn(this,"_targetEventStore",new Yz(this)),yn(this,"gestureEventStores",{}),yn(this,"gestureTimeoutStores",{}),yn(this,"handlers",{}),yn(this,"config",{}),yn(this,"pointerIds",new Set),yn(this,"touchIds",new Set),yn(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),o3e(this,t)}setEventIds(t){if(y2(t))return this.touchIds=new Set(fxe(t)),this.touchIds;if("pointerId"in t)return t.type==="pointerup"||t.type==="pointercancel"?this.pointerIds.delete(t.pointerId):t.type==="pointerdown"&&this.pointerIds.add(t.pointerId),this.pointerIds}applyHandlers(t,n){this.handlers=t,this.nativeHandlers=n}applyConfig(t,n){this.config=n3e(t,n,this.config)}clean(){this._targetEventStore.clean();for(const t of this.gestures)this.gestureEventStores[t].clean(),this.gestureTimeoutStores[t].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...t){const n=this.config.shared,r={};let i;if(!(n.target&&(i=n.target(),!i))){if(n.enabled){for(const a of this.gestures){const s=this.config[a],l=Z_(r,s.eventOptions,!!i);if(s.enabled){const c=M6.get(a);new c(this,t,a).bind(l)}}const o=Z_(r,n.eventOptions,!!i);for(const a in this.nativeHandlers)o(a,"",s=>this.nativeHandlers[a](Yt(Yt({},this.state.shared),{},{event:s,args:t})),void 0,!0)}for(const o in r)r[o]=gxe(...r[o]);if(!i)return r;for(const o in r){const{device:a,capture:s,passive:l}=lxe(o);this._targetEventStore.add(i,a,"",r[o],{capture:s,passive:l})}}}}function Xc(e,t){e.gestures.add(t),e.gestureEventStores[t]=new Yz(e,t),e.gestureTimeoutStores[t]=new r3e}function o3e(e,t){t.drag&&Xc(e,"drag"),t.wheel&&Xc(e,"wheel"),t.scroll&&Xc(e,"scroll"),t.move&&Xc(e,"move"),t.pinch&&Xc(e,"pinch"),t.hover&&Xc(e,"hover")}const Z_=(e,t,n)=>(r,i,o,a={},s=!1)=>{var l,c;const u=(l=a.capture)!==null&&l!==void 0?l:t.capture,d=(c=a.passive)!==null&&c!==void 0?c:t.passive;let f=s?r:axe(r,i,u);n&&d&&(f+="Passive"),e[f]=e[f]||[],e[f].push(o)},a3e=/^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;function s3e(e){const t={},n={},r=new Set;for(let i in e)a3e.test(i)?(r.add(RegExp.lastMatch),n[i]=e[i]):t[i]=e[i];return[n,t,r]}function Zc(e,t,n,r,i,o){if(!e.has(n)||!M6.has(r))return;const a=n+"Start",s=n+"End",l=c=>{let u;return c.first&&a in t&&t[a](c),n in t&&(u=t[n](c)),c.last&&s in t&&t[s](c),u};i[r]=l,o[r]=o[r]||{}}function l3e(e,t){const[n,r,i]=s3e(e),o={};return Zc(i,n,"onDrag","drag",o,t),Zc(i,n,"onWheel","wheel",o,t),Zc(i,n,"onScroll","scroll",o,t),Zc(i,n,"onPinch","pinch",o,t),Zc(i,n,"onMove","move",o,t),Zc(i,n,"onHover","hover",o,t),{handlers:o,config:t,nativeHandlers:r}}function c3e(e,t={},n,r){const i=A.useMemo(()=>new i3e(e),[]);if(i.applyHandlers(e,r),i.applyConfig(t,n),A.useEffect(i.effect.bind(i)),A.useEffect(()=>i.clean.bind(i),[]),t.target===void 0)return i.bind.bind(i)}function u3e(e){return e.forEach(Uxe),function(n,r){const{handlers:i,nativeHandlers:o,config:a}=l3e(n,r||{});return c3e(i,a,void 0,o)}}function d3e(e,t){return u3e([Gxe,Yxe,Xxe,Zxe,qxe,Kxe])(e,t||{})}function Q_(e,t,n,r=i=>i){return e*r(.5-t*(.5-n))}function f3e(e){return[-e[0],-e[1]]}function ro(e,t){return[e[0]+t[0],e[1]+t[1]]}function Ci(e,t){return[e[0]-t[0],e[1]-t[1]]}function to(e,t){return[e[0]*t,e[1]*t]}function p3e(e,t){return[e[0]/t,e[1]/t]}function Of(e){return[e[1],-e[0]]}function J_(e,t){return e[0]*t[0]+e[1]*t[1]}function h3e(e,t){return e[0]===t[0]&&e[1]===t[1]}function m3e(e){return Math.hypot(e[0],e[1])}function g3e(e){return e[0]*e[0]+e[1]*e[1]}function eP(e,t){return g3e(Ci(e,t))}function Xz(e){return p3e(e,m3e(e))}function v3e(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function Mf(e,t,n){let r=Math.sin(n),i=Math.cos(n),o=e[0]-t[0],a=e[1]-t[1],s=o*i-a*r,l=o*r+a*i;return[s+t[0],l+t[1]]}function t4(e,t,n){return ro(e,to(Ci(t,e),n))}function tP(e,t,n){return ro(e,to(t,n))}var{min:Qc,PI:y3e}=Math,nP=.275,Rf=y3e+1e-4;function R6(e,t={}){let{size:n=16,smoothing:r=.5,thinning:i=.5,simulatePressure:o=!0,easing:a=z=>z,start:s={},end:l={},last:c=!1}=t,{cap:u=!0,easing:d=z=>z*(2-z)}=s,{cap:f=!0,easing:p=z=>--z*z*z+1}=l;if(e.length===0||n<=0)return[];let m=e[e.length-1].runningLength,g=s.taper===!1?0:s.taper===!0?Math.max(n,m):s.taper,y=l.taper===!1?0:l.taper===!0?Math.max(n,m):l.taper,v=Math.pow(n*r,2),b=[],x=[],w=e.slice(0,10).reduce((z,j)=>{let F=j.pressure;if(o){let H=Qc(1,j.distance/n),R=Qc(1,1-H);F=Qc(1,z+(R-z)*(H*nP))}return(z+F)/2},e[0].pressure),E=Q_(n,i,e[e.length-1].pressure,a),C,I=e[0].vector,T=e[0].point,_=T,P=T,M=_,D=!1;for(let z=0;z<e.length;z++){let{pressure:j}=e[z],{point:F,vector:H,distance:R,runningLength:W}=e[z];if(z<e.length-1&&m-W<3)continue;if(i){if(o){let he=Qc(1,R/n),Se=Qc(1,1-he);j=Qc(1,w+(Se-w)*(he*nP))}E=Q_(n,i,j,a)}else E=n/2;C===void 0&&(C=E);let X=W<g?d(W/g):1,te=m-W<y?p((m-W)/y):1;E=Math.max(.01,E*Math.min(X,te));let re=(z<e.length-1?e[z+1]:e[z]).vector,ne=z<e.length-1?J_(H,re):1,ie=J_(H,I)<0&&!D,ae=ne!==null&&ne<0;if(ie||ae){let he=to(Of(I),E);for(let Se=1/13,pe=0;pe<=1;pe+=Se)P=Mf(Ci(F,he),F,Rf*pe),b.push(P),M=Mf(ro(F,he),F,Rf*-pe),x.push(M);T=P,_=M,ae&&(D=!0);continue}if(D=!1,z===e.length-1){let he=to(Of(H),E);b.push(Ci(F,he)),x.push(ro(F,he));continue}let le=to(Of(t4(re,H,ne)),E);P=Ci(F,le),(z<=1||eP(T,P)>v)&&(b.push(P),T=P),M=ro(F,le),(z<=1||eP(_,M)>v)&&(x.push(M),_=M),w=j,I=H}let V=e[0].point.slice(0,2),B=e.length>1?e[e.length-1].point.slice(0,2):ro(e[0].point,[1,1]),L=[],G=[];if(e.length===1){if(!(g||y)||c){let z=tP(V,Xz(Of(Ci(V,B))),-(C||E)),j=[];for(let F=1/13,H=F;H<=1;H+=F)j.push(Mf(z,V,Rf*2*H));return j}}else{if(!(g||y&&e.length===1))if(u)for(let j=1/13,F=j;F<=1;F+=j){let H=Mf(x[0],V,Rf*F);L.push(H)}else{let j=Ci(b[0],x[0]),F=to(j,.5),H=to(j,.51);L.push(Ci(V,F),Ci(V,H),ro(V,H),ro(V,F))}let z=Of(f3e(e[e.length-1].vector));if(y||g&&e.length===1)G.push(B);else if(f){let j=tP(B,z,E);for(let F=1/29,H=F;H<1;H+=F)G.push(Mf(j,B,Rf*3*H))}else G.push(ro(B,to(z,E)),ro(B,to(z,E*.99)),Ci(B,to(z,E*.99)),Ci(B,to(z,E)))}return b.concat(G,x.reverse(),L)}function sl(e,t={}){var n;let{streamline:r=.5,size:i=16,last:o=!1}=t;if(e.length===0)return[];let a=.15+(1-r)*.85,s=Array.isArray(e[0])?e:e.map(({x:p,y:m,pressure:g=.5})=>[p,m,g]);if(s.length===2){let p=s[1];s=s.slice(0,-1);for(let m=1;m<5;m++)s.push(t4(s[0],p,m/4))}s.length===1&&(s=[...s,[...ro(s[0],[1,1]),...s[0].slice(2)]]);let l=[{point:[s[0][0],s[0][1]],pressure:s[0][2]>=0?s[0][2]:.25,vector:[1,1],distance:0,runningLength:0}],c=!1,u=0,d=l[0],f=s.length-1;for(let p=1;p<s.length;p++){let m=o&&p===f?s[p].slice(0,2):t4(d.point,s[p],a);if(h3e(d.point,m))continue;let g=v3e(m,d.point);if(u+=g,p<f&&!c){if(u<i)continue;c=!0}d={point:m,pressure:s[p][2]>=0?s[p][2]:.5,vector:Xz(Ci(d.point,m)),distance:g,runningLength:u},l.push(d)}return l[0].vector=((n=l[1])==null?void 0:n.vector)||[0,0],l}function b3e(e,t={}){return R6(sl(e,t),t)}var Oc=b3e,x3e=Object.defineProperty,S3e=Object.defineProperties,w3e=Object.getOwnPropertyDescriptors,rP=Object.getOwnPropertySymbols,C3e=Object.prototype.hasOwnProperty,k3e=Object.prototype.propertyIsEnumerable,iP=(e,t,n)=>t in e?x3e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,D6=(e,t)=>{for(var n in t||(t={}))C3e.call(t,n)&&iP(e,n,t[n]);if(rP)for(var n of rP(t))k3e.call(t,n)&&iP(e,n,t[n]);return e},A6=(e,t)=>S3e(e,w3e(t));function Ct(e,...t){return{didIntersect:t.length>0,message:e,points:t}}function ll(e,t,n=0){let r=[e[0]+t[0]/2,e[1]+t[1]/2],i=O.rotWith(e,r,n),o=O.rotWith(O.add(e,[t[0],0]),r,n),a=O.rotWith(O.add(e,t),r,n),s=O.rotWith(O.add(e,[0,t[1]]),r,n);return[["top",[i,o]],["right",[o,a]],["bottom",[a,s]],["left",[s,i]]]}function E3e(e,t,n){if(n===e||n===t)return!0;let r=Math.PI*2,i=(t-e+r)%r,o=(n-e+r)%r;return i<=Math.PI!=o>i}function I3e(e,t){let n=O.slope(e[0],e[1]),r=O.slope(t[0],t[1]);if(n===r)return;if(Number.isNaN(n)&&!Number.isNaN(r))return[e[0][0],(e[0][0]-t[0][0])*r+t[0][1]];if(Number.isNaN(r)&&!Number.isNaN(n))return[t[0][0],(t[0][0]-e[0][0])*n+e[0][1]];let i=(n*e[0][0]-r*t[0][0]+t[0][1]-e[0][1])/(n-r),o=r*(i-t[0][0])+t[0][1];return[i,o]}function i1(e,t,n,r){let[i,o]=e,[a,s]=t,[l,c]=n,[u,d]=r;if(s/a!==(d-c)/(u-l)){let f=a*(d-c)-s*(u-l);if(f!==0){let p=((o-c)*(u-l)-(i-l)*(d-c))/f,m=((o-c)*a-(i-l)*s)/f;if(p>=0&&m>=0&&m<=1)return Ct("intersection",[i+p*a,o+p*s])}}return Ct("no intersection")}function T3e(e,t,n,r,i=0){return M3e(n,r,i,e,t)}function Zz(e,t,n,r,i,o){let a=e,s=O.mul(t,999999999);return ed(a,s,n,r,i,o)}function n4(e,t,n,r=0){let{minX:i,minY:o,width:a,height:s}=n;return T3e(e,t,[i,o],[a,s],r)}function o1(e,t,n,r){let i=O.sub(e,n),o=O.sub(r,n),a=O.sub(t,e),s=o[0]*i[1]-o[1]*i[0],l=a[0]*i[1]-a[1]*i[0],c=o[1]*a[0]-o[0]*a[1];if(s===0||l===0)return Ct("coincident");if(c===0)return Ct("parallel");if(c!==0){let u=s/c,d=l/c;if(0<=u&&u<=1&&0<=d&&d<=1)return Ct("intersection",O.add(e,O.mul(a,u)))}return Ct("no intersection")}function _3e(e,t,n,r){return Qz(n,r,e,t)}function P3e(e,t,n,r,i,o){let a=O.angle(n,i),s=O.angle(n,o),l=V3e(n,r,r,0,e,t);if(!l.didIntersect)return Ct("no intersection");let c=l.points.filter(u=>E3e(a,s,O.angle(n,u)));return c.length===0?Ct("no intersection"):Ct("intersection",...c)}function L6(e,t,n,r){let i=(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]),o=2*((t[0]-e[0])*(e[0]-n[0])+(t[1]-e[1])*(e[1]-n[1])),a=n[0]*n[0]+n[1]*n[1]+e[0]*e[0]+e[1]*e[1]-2*(n[0]*e[0]+n[1]*e[1])-r*r,s=o*o-4*i*a;if(s<0)return Ct("outside");if(s===0)return Ct("tangent");let l=Math.sqrt(s),c=(-o+l)/(2*i),u=(-o-l)/(2*i);if((c<0||c>1)&&(u<0||u>1))return c<0&&u<0||c>1&&u>1?Ct("outside"):Ct("inside");let d=[];return 0<=c&&c<=1&&d.push(O.lrp(e,t,c)),0<=u&&u<=1&&d.push(O.lrp(e,t,u)),Ct("intersection",...d)}function ed(e,t,n,r,i,o=0){if(r===0||i===0||O.isEqual(e,t))return Ct("no intersection");r=r<0?r:-r,i=i<0?i:-i,e=O.sub(O.rotWith(e,n,-o),n),t=O.sub(O.rotWith(t,n,-o),n);let a=O.sub(t,e),s=a[0]*a[0]/r/r+a[1]*a[1]/i/i,l=2*e[0]*a[0]/r/r+2*e[1]*a[1]/i/i,c=e[0]*e[0]/r/r+e[1]*e[1]/i/i-1,u=[],d=l*l-4*s*c;if(d===0)u.push(-l/2/s);else if(d>0){let p=Math.sqrt(d);u.push((-l+p)/2/s),u.push((-l-p)/2/s)}let f=u.filter(p=>p>=0&&p<=1).map(p=>O.add(n,O.add(e,O.mul(O.sub(t,e),p)))).map(p=>O.rotWith(p,n,o));return Ct("intersection",...f)}function B6(e,t,n){return G3e(n,e,t)}function a1(e,t,n){let r=[];for(let i=1;i<n.length;i++){let o=o1(e,t,n[i-1],n[i]);o&&r.push(...o.points)}return r.length===0?Ct("no intersection"):Ct("intersection",...n)}function O3e(e,t,n){let r=[];for(let i=1;i<n.length+1;i++){let o=o1(e,t,n[i-1],n[i%n.length]);o&&r.push(...o.points)}return r.length===0?Ct("no intersection"):Ct("intersection",...n)}function M3e(e,t,n,r,i){return ll(e,t,n).reduce((o,[a,[s,l]])=>{let c=i1(r,i,s,l);return c&&o.push(Ct(a,...c.points)),o},[]).filter(o=>o.didIntersect)}function Qz(e,t,n,r){return ll(e,t).reduce((i,[o,[a,s]])=>{let l=o1(n,r,a,s);return l&&i.push(Ct(o,...l.points)),i},[]).filter(i=>i.didIntersect)}function R3e(e,t,n,r){return ll(e,t).reduce((i,[o,[a,s]])=>{let l=Qz(n,r,a,s);return i.push(...l.map(c=>Ct(`${o} ${c.message}`,...c.points))),i},[]).filter(i=>i.didIntersect)}function D3e(e,t,n,r,i,o){return ll(e,t).reduce((a,[s,[l,c]])=>{let u=F3e(n,r,i,o,l,c);return u&&a.push(A6(D6({},u),{message:s})),a},[]).filter(a=>a.didIntersect)}function A3e(e,t,n,r){return ll(e,t).reduce((i,[o,[a,s]])=>{let l=L6(a,s,n,r);return l&&i.push(A6(D6({},l),{message:o})),i},[]).filter(i=>i.didIntersect)}function L3e(e,t,n,r,i,o=0){return ll(e,t).reduce((a,[s,[l,c]])=>{let u=ed(l,c,n,r,i,o);return u&&a.push(A6(D6({},u),{message:s})),a},[]).filter(a=>a.didIntersect)}function B3e(e,t,n){return ll(e,t).reduce((r,[i,[o,a]])=>{let s=a1(o,a,n);return s.didIntersect&&r.push(Ct(i,...s.points)),r},[]).filter(r=>r.didIntersect)}function $3e(e,t,n){return ll(e,t).reduce((r,[i,[o,a]])=>{let s=O3e(o,a,n);return s.didIntersect&&r.push(Ct(i,...s.points)),r},[]).filter(r=>r.didIntersect)}function F3e(e,t,n,r,i,o){return P3e(i,o,e,t,n,r)}function N3e(e,t,n,r,i,o){return D3e(i,o,e,t,n,r)}function z3e(e,t,n,r,i){let{minX:o,minY:a,width:s,height:l}=i;return N3e(e,t,n,r,[o,a],[s,l])}function j3e(e,t,n,r){return L6(n,r,e,t)}function H3e(e,t,n,r){let i=n[0]-e[0],o=n[1]-e[1],a=Math.sqrt(i*i+o*o),s=(a*a-r*r+t*t)/(2*a),l=Math.sqrt(t*t-s*s);return i/=a,o/=a,Ct("intersection",[e[0]+i*s-o*l,e[1]+o*s+i*l],[e[0]+i*s+o*l,e[1]+o*s-i*l])}function V3e(e,t,n,r=0,i,o){return t===n?L6(i,o,e,t):ed(i,o,e,t,n,r)}function W3e(e,t,n,r=0,i,o){return t===n?A3e(i,o,e,t):L3e(i,o,e,t,n,r)}function U3e(e,t,n,r,i){let{minX:o,minY:a,width:s,height:l}=i;return W3e(e,t,n,r,[o,a],[s,l])}function G3e(e,t,n){let{minX:r,minY:i,width:o,height:a}=e;return _3e(t,n,[r,i],[o,a])}function K3e(e,t){return R3e([e.minX,e.minY],[e.width,e.height],[t.minX,t.minY],[t.width,t.height])}function oP(e,t){return q3e(t,e)}function $6(e,t){return Jz(t,e)}function q3e(e,t){return B3e([t.minX,t.minY],[t.width,t.height],e)}function Jz(e,t){return $3e([t.minX,t.minY],[t.width,t.height],e)}var Y3e=Object.defineProperty,X3e=Object.defineProperties,Z3e=Object.getOwnPropertyDescriptors,rv=Object.getOwnPropertySymbols,ej=Object.prototype.hasOwnProperty,tj=Object.prototype.propertyIsEnumerable,r4=(e,t,n)=>t in e?Y3e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qe=(e,t)=>{for(var n in t||(t={}))ej.call(t,n)&&r4(e,n,t[n]);if(rv)for(var n of rv(t))tj.call(t,n)&&r4(e,n,t[n]);return e},jo=(e,t)=>X3e(e,Z3e(t)),Zd=(e,t)=>{var n={};for(var r in e)ej.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&rv)for(var r of rv(e))t.indexOf(r)<0&&tj.call(e,r)&&(n[r]=e[r]);return n},Bt=(e,t,n)=>(r4(e,typeof t!="symbol"?t+"":t,n),n),F6=h.exports.createContext({});function mr(){return h.exports.useContext(F6)}var Q3e=(e=>(e.TransformSelected="transform_selected",e.TranslateSelected="translate_selected",e.TransformAll="transform_all",e.TranslateAll="translate_all",e))(Q3e||{}),J3e=(e=>(e.Top="top_edge",e.Right="right_edge",e.Bottom="bottom_edge",e.Left="left_edge",e))(J3e||{}),xo=(e=>(e.TopLeft="top_left_corner",e.TopRight="top_right_corner",e.BottomRight="bottom_right_corner",e.BottomLeft="bottom_left_corner",e))(xo||{}),eSe=(e=>(e.minX="minX",e.midX="midX",e.maxX="maxX",e.minY="minY",e.midY="midY",e.maxY="maxY",e))(eSe||{});String.prototype.replaceAll||(String.prototype.replaceAll=function(e,t){return Object.prototype.toString.call(e).toLowerCase()==="[object regexp]"?this.replace(e,t):this.replace(new RegExp(e,"g"),t)});var Sm=Math.PI*2,Tn=class{static lerp(e,t,n){return n=Tn.clamp(n,0,1),e*(1-n)+t*n}static lerpColor(e,t,n=.5){function r(l){let c=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(l);return[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)]}function i(l){return"#"+((1<<24)+(l[0]<<16)+(l[1]<<8)+l[2]).toString(16).slice(1)}let o=r(e)||[0,0,0],a=r(t)||[0,0,0],s=o.slice();for(let l=0;l<3;l++)s[l]=Math.round(s[l]+n*(a[l]-o[l]));return i(s)}static modulate(e,t,n,r=!1){let[i,o]=t,[a,s]=n,l=a+(e-i)/(o-i)*(s-a);return r?a<s?Math.max(Math.min(l,s),a):Math.max(Math.min(l,a),s):l}static clamp(e,t,n){return Math.max(t,typeof n!="undefined"?Math.min(e,n):e)}static deepClone(e){if(e===null)return e;if(Array.isArray(e))return[...e];if(typeof e=="object"){let t=Qe({},e);return Object.keys(t).forEach(n=>t[n]=typeof e[n]=="object"?Tn.deepClone(e[n]):e[n]),t}return e}static rng(e=""){let t=0,n=0,r=0,i=0;function o(){let a=t^t<<11;return t=n,n=r,r=i,i^=(i>>>19^a^a>>>8)>>>0,i/4294967296}for(let a=0;a<e.length+64;a++)t^=e.charCodeAt(a)|0,o();return o}static pointsToLineSegments(e,t=!1){let n=[];for(let r=1;r<e.length;r++)n.push([e[r-1],e[r]]);return t&&n.push([e[e.length-1],e[0]]),n}static getRectangleSides(e,t,n=0){let r=[e[0]+t[0]/2,e[1]+t[1]/2],i=O.rotWith(e,r,n),o=O.rotWith(O.add(e,[t[0],0]),r,n),a=O.rotWith(O.add(e,t),r,n),s=O.rotWith(O.add(e,[0,t[1]]),r,n);return[["top",[i,o]],["right",[o,a]],["bottom",[a,s]],["left",[s,i]]]}static circleFromThreePoints(e,t,n){let[r,i]=e,[o,a]=t,[s,l]=n,c=r*(a-l)-i*(o-s)+o*l-s*a,u=(r*r+i*i)*(l-a)+(o*o+a*a)*(i-l)+(s*s+l*l)*(a-i),d=(r*r+i*i)*(o-s)+(o*o+a*a)*(s-r)+(s*s+l*l)*(r-o),f=-u/(2*c),p=-d/(2*c);return[f,p,Math.hypot(f-r,p-i)]}static perimeterOfEllipse(e,t){let n=Math.pow(e-t,2)/Math.pow(e+t,2);return Math.PI*(e+t)*(1+3*n/(10+Math.sqrt(4-3*n)))}static shortAngleDist(e,t){let n=Math.PI*2,r=(t-e)%n;return 2*r%n-r}static longAngleDist(e,t){return Math.PI*2-Tn.shortAngleDist(e,t)}static lerpAngles(e,t,n){return e+Tn.shortAngleDist(e,t)*n}static angleDelta(e,t){return Tn.shortAngleDist(e,t)}static getSweep(e,t,n){return Tn.angleDelta(O.angle(e,t),O.angle(e,n))}static clampRadians(e){return(Math.PI*2+e)%(Math.PI*2)}static snapAngleToSegments(e,t){let n=Math.PI*2/t;return Math.floor((Tn.clampRadians(e)+n/2)/n)*n}static isAngleBetween(e,t,n){if(n===e||n===t)return!0;let r=(t-e+Sm)%Sm,i=(n-e+Sm)%Sm;return r<=Math.PI!=i>r}static degreesToRadians(e){return e*Math.PI/180}static radiansToDegrees(e){return e*180/Math.PI}static getArcLength(e,t,n,r){let i=Tn.getSweep(e,n,r);return t*(2*Math.PI)*(i/(2*Math.PI))}static getSweepFlag(e,t,n){let r=O.angle(e,n);return(O.angle(e,t)-r+3*Math.PI)%(2*Math.PI)-Math.PI>0?0:1}static getLargeArcFlag(e,t,n){let r=O.angle(n,e),i=(O.angle(n,t)-r+3*Math.PI)%(2*Math.PI)-Math.PI;return Math.abs(i)>Math.PI/2?0:1}static getArcDashOffset(e,t,n,r,i){let o=Tn.getSweepFlag(e,n,r),a=Tn.getArcLength(e,t,n,r);return-(o<0?a:2*Math.PI*e[2]-a)/2+i}static getEllipseDashOffset(e,t){return-(2*Math.PI*e[2])/2+-t}static pointInCircle(e,t,n){return O.dist(e,t)<=n}static pointInEllipse(e,t,n,r,i=0){i=i||0;let o=Math.cos(i),a=Math.sin(i),s=O.sub(e,t),l=o*s[0]+a*s[1],c=a*s[0]-o*s[1];return l*l/(n*n)+c*c/(r*r)<=1}static pointInRect(e,t){return!(e[0]<t[0]||e[0]>e[0]+t[0]||e[1]<t[1]||e[1]>e[1]+t[1])}static pointInPolygon(e,t){let n=0;return t.forEach((r,i)=>{let o=t[(i+1)%t.length];r[1]<=e[1]?o[1]>e[1]&&O.cross(r,o,e)>0&&(n+=1):o[1]<=e[1]&&O.cross(r,o,e)<0&&(n-=1)}),n!==0}static pointInBounds(e,t){return!(e[0]<t.minX||e[0]>t.maxX||e[1]<t.minY||e[1]>t.maxY)}static pointInPolyline(e,t,n=3){for(let r=1;r<t.length;r++)if(O.distanceToLineSegment(t[r-1],t[r],e)<n)return!0;return!1}static getBoundsSides(e){return this.getRectangleSides([e.minX,e.minY],[e.width,e.height])}static expandBounds(e,t){return{minX:e.minX-t,minY:e.minY-t,maxX:e.maxX+t,maxY:e.maxY+t,width:e.width+t*2,height:e.height+t*2}}static boundsCollide(e,t){return!(e.maxX<t.minX||e.minX>t.maxX||e.maxY<t.minY||e.minY>t.maxY)}static boundsContain(e,t){return e.minX<t.minX&&e.minY<t.minY&&e.maxY>t.maxY&&e.maxX>t.maxX}static boundsContained(e,t){return Tn.boundsContain(t,e)}static boundsAreEqual(e,t){return!(t.maxX!==e.maxX||t.minX!==e.minX||t.maxY!==e.maxY||t.minY!==e.minY)}static getBoundsFromPoints(e,t=0){let n=1/0,r=1/0,i=-1/0,o=-1/0;if(e.length<2)n=0,r=0,i=1,o=1;else for(let[a,s]of e)n=Math.min(a,n),r=Math.min(s,r),i=Math.max(a,i),o=Math.max(s,o);return t!==0?Tn.getBoundsFromPoints(e.map(a=>O.rotWith(a,[(n+i)/2,(r+o)/2],t))):{minX:n,minY:r,maxX:i,maxY:o,width:Math.max(1,i-n),height:Math.max(1,o-r)}}static centerBounds(e,t){let n=this.getBoundsCenter(e),r=t[0]-n[0],i=t[1]-n[1];return this.translateBounds(e,[r,i])}static snapBoundsToGrid(e,t){let n=Math.round(e.minX/t)*t,r=Math.round(e.minY/t)*t,i=Math.round(e.maxX/t)*t,o=Math.round(e.maxY/t)*t;return{minX:n,minY:r,maxX:i,maxY:o,width:Math.max(1,i-n),height:Math.max(1,o-r)}}static translateBounds(e,t){return{minX:e.minX+t[0],minY:e.minY+t[1],maxX:e.maxX+t[0],maxY:e.maxY+t[1],width:e.width,height:e.height}}static rotateBounds(e,t,n){let[r,i]=O.rotWith([e.minX,e.minY],t,n),[o,a]=O.rotWith([e.maxX,e.maxY],t,n);return{minX:r,minY:i,maxX:o,maxY:a,width:e.width,height:e.height}}static getRotatedEllipseBounds(e,t,n,r,i=0){let o=Math.cos(i),a=Math.sin(i),s=Math.hypot(n*o,r*a),l=Math.hypot(n*a,r*o);return{minX:e+n-s,minY:t+r-l,maxX:e+n+s,maxY:t+r+l,width:s*2,height:l*2}}static getExpandedBounds(e,t){let n=Math.min(e.minX,t.minX),r=Math.min(e.minY,t.minY),i=Math.max(e.maxX,t.maxX),o=Math.max(e.maxY,t.maxY),a=Math.abs(i-n),s=Math.abs(o-r);return{minX:n,minY:r,maxX:i,maxY:o,width:a,height:s}}static getCommonBounds(e){if(e.length<2)return e[0];let t=e[0];for(let n=1;n<e.length;n++)t=Tn.getExpandedBounds(t,e[n]);return t}static getRotatedCorners(e,t=0){let n=[e.minX+e.width/2,e.minY+e.height/2];return[[e.minX,e.minY],[e.maxX,e.minY],[e.maxX,e.maxY],[e.minX,e.maxY]].map(r=>O.rotWith(r,n,t))}static getTransformedBoundingBox(e,t,n,r=0,i=!1){let[o,a]=[e.minX,e.minY],[s,l]=[e.maxX,e.maxY],[c,u]=[e.minX,e.minY],[d,f]=[e.maxX,e.maxY];if(t==="center")return{minX:c+n[0],minY:u+n[1],maxX:d+n[0],maxY:f+n[1],width:d-c,height:f-u,scaleX:1,scaleY:1};let[p,m]=O.rot(n,-r);switch(t){case"top_edge":case"top_left_corner":case"top_right_corner":{u+=m;break}case"bottom_edge":case"bottom_left_corner":case"bottom_right_corner":{f+=m;break}}switch(t){case"left_edge":case"top_left_corner":case"bottom_left_corner":{c+=p;break}case"right_edge":case"top_right_corner":case"bottom_right_corner":{d+=p;break}}let g=s-o,y=l-a,v=(d-c)/g,b=(f-u)/y,x=v<0,w=b<0,E=Math.abs(d-c),C=Math.abs(f-u);if(i){let I=g/y,T=I<E/C,_=E*(b<0?1:-1)*(1/I),P=C*(v<0?1:-1)*I;switch(t){case"top_left_corner":{T?u=f+_:c=d+P;break}case"top_right_corner":{T?u=f+_:d=c-P;break}case"bottom_right_corner":{T?f=u-_:d=c-P;break}case"bottom_left_corner":{T?f=u-_:c=d+P;break}case"bottom_edge":case"top_edge":{let M=(c+d)/2,D=C*I;c=M-D/2,d=M+D/2;break}case"left_edge":case"right_edge":{let M=(u+f)/2,D=E/I;u=M-D/2,f=M+D/2;break}}}if(r%(Math.PI*2)!==0){let I=[0,0],T=O.med([o,a],[s,l]),_=O.med([c,u],[d,f]);switch(t){case"top_left_corner":{I=O.sub(O.rotWith([d,f],_,r),O.rotWith([s,l],T,r));break}case"top_right_corner":{I=O.sub(O.rotWith([c,f],_,r),O.rotWith([o,l],T,r));break}case"bottom_right_corner":{I=O.sub(O.rotWith([c,u],_,r),O.rotWith([o,a],T,r));break}case"bottom_left_corner":{I=O.sub(O.rotWith([d,u],_,r),O.rotWith([s,a],T,r));break}case"top_edge":{I=O.sub(O.rotWith(O.med([c,f],[d,f]),_,r),O.rotWith(O.med([o,l],[s,l]),T,r));break}case"left_edge":{I=O.sub(O.rotWith(O.med([d,u],[d,f]),_,r),O.rotWith(O.med([s,a],[s,l]),T,r));break}case"bottom_edge":{I=O.sub(O.rotWith(O.med([c,u],[d,u]),_,r),O.rotWith(O.med([o,a],[s,a]),T,r));break}case"right_edge":{I=O.sub(O.rotWith(O.med([c,u],[c,f]),_,r),O.rotWith(O.med([o,a],[o,l]),T,r));break}}[c,u]=O.sub([c,u],I),[d,f]=O.sub([d,f],I)}return d<c&&([d,c]=[c,d]),f<u&&([f,u]=[u,f]),{minX:c,minY:u,maxX:d,maxY:f,width:d-c,height:f-u,scaleX:(d-c)/(s-o||1)*(x?-1:1),scaleY:(f-u)/(l-a||1)*(w?-1:1)}}static getTransformAnchor(e,t,n){let r=e;switch(e){case"top_left_corner":{t&&n?r="bottom_right_corner":t?r="top_right_corner":n?r="bottom_left_corner":r="bottom_right_corner";break}case"top_right_corner":{t&&n?r="bottom_left_corner":t?r="top_left_corner":n?r="bottom_right_corner":r="bottom_left_corner";break}case"bottom_right_corner":{t&&n?r="top_left_corner":t?r="bottom_left_corner":n?r="top_right_corner":r="top_left_corner";break}case"bottom_left_corner":{t&&n?r="top_right_corner":t?r="bottom_right_corner":n?r="top_left_corner":r="top_right_corner";break}}return r}static getRelativeTransformedBoundingBox(e,t,n,r,i){let o=(r?t.maxX-n.maxX:n.minX-t.minX)/t.width,a=(i?t.maxY-n.maxY:n.minY-t.minY)/t.height,s=n.width/t.width,l=n.height/t.height,c=e.minX+e.width*o,u=e.minY+e.height*a,d=e.width*s,f=e.height*l;return{minX:c,minY:u,maxX:c+d,maxY:u+f,width:d,height:f}}static getRotatedSize(e,t){let n=O.div(e,2),r=[[0,0],[e[0],0],e,[0,e[1]]].map(o=>O.rotWith(o,n,t)),i=Tn.getBoundsFromPoints(r);return[i.width,i.height]}static getBoundsCenter(e){return[e.minX+e.width/2,e.minY+e.height/2]}static getBoundsWithCenter(e){let t=Tn.getBoundsCenter(e);return jo(Qe({},e),{midX:t[0],midY:t[1]})}static getCommonTopLeft(e){let t=[1/0,1/0];return e.forEach(n=>{t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1])}),t}static getFromCache(e,t,n){let r=e.get(t);if(r===void 0&&(e.set(t,n()),r=e.get(t),r===void 0))throw Error("Cache did not include item!");return r}static uniqueId(e=""){return e?((Number(e)^Math.random()*16)>>Number(e)/4).toString(16):`${1e7}-${1e3}-${4e3}-${8e3}-${1e11}`.replace(/[018]/g,Tn.uniqueId)}static rotateArray(e,t){return e.map((n,r)=>e[(r+t)%e.length])}static debounce(e,t=0){let n;return function(...r){clearTimeout(n),n=setTimeout(()=>e.apply(r),t)}}static getSvgPathFromStroke(e,t=!0){let n=e.length;if(n<4)return"";let r=e[0],i=e[1],o=e[2],a=`M${r[0].toFixed(2)},${r[1].toFixed(2)} Q${i[0].toFixed(2)},${i[1].toFixed(2)} ${rs(i[0],o[0]).toFixed(2)},${rs(i[1],o[1]).toFixed(2)} T`;for(let s=2,l=n-1;s<l;s++)r=e[s],i=e[s+1],a+=`${rs(r[0],i[0]).toFixed(2)},${rs(r[1],i[1]).toFixed(2)} `;return t&&(a+="Z"),a}static getSvgPathFromStrokePoints(e,t=!1){let n=e.length;if(n<4)return"";let r=e[0].point,i=e[1].point,o=e[2].point,a=`M${r[0].toFixed(2)},${r[1].toFixed(2)} Q${i[0].toFixed(2)},${i[1].toFixed(2)} ${rs(i[0],o[0]).toFixed(2)},${rs(i[1],o[1]).toFixed(2)} T`;for(let s=2,l=n-1;s<l;s++)r=e[s].point,i=e[s+1].point,a+=`${rs(r[0],i[0]).toFixed(2)},${rs(r[1],i[1]).toFixed(2)} `;return t&&(a+="Z"),a}static getPerfectDashProps(e,t,n,r=1,i=!0,o=2){let a,s,l;if(n.toLowerCase()==="dashed")a=t*o,l=1,s=i?(a/2).toString():"0";else if(n.toLowerCase()==="dotted")a=t/100,l=100,s="0";else return{strokeDasharray:"none",strokeDashoffset:"none"};let c=Math.floor(e/a/(2*l));c-=c%r,c=Math.max(c,4);let u=Math.max(a,(e-c*a)/(i?c:c-1));return{strokeDasharray:[a,u].join(" "),strokeDashoffset:s}}static isMobileSafari(){if(typeof window=="undefined")return!1;let e=window.navigator.userAgent,t=!!e.match(/iPad/i)||!!e.match(/iPhone/i),n=!!e.match(/WebKit/i);return t&&n&&!e.match(/CriOS/i)}static throttle(e,t){let n,r;return function(...i){return n||(n=!0,setTimeout(()=>n=!1,t),r=e(...i)),r}}static isDarwin(){return/Mac|iPod|iPhone|iPad/.test(window.navigator.platform)}static metaKey(e){return Tn.isDarwin()?e.metaKey:e.ctrlKey}static lns(e){let t=e.split("");return t.push(...t.splice(0,Math.round(t.length/5))),t.push(...t.splice(0,Math.round(t.length/4))),t.push(...t.splice(0,Math.round(t.length/3))),t.push(...t.splice(0,Math.round(t.length/2))),t.reverse().map(n=>+n?+n<5?5+ +n:+n>5?+n-5:n:n).join("")}},$=Tn;Bt($,"getSnapPoints",(e,t,n)=>{let r=Qe({},e),i=[0,0],o=[],a={minX:{id:"minX",isSnapped:!1},midX:{id:"midX",isSnapped:!1},maxX:{id:"maxX",isSnapped:!1},minY:{id:"minY",isSnapped:!1},midY:{id:"midY",isSnapped:!1},maxY:{id:"maxY",isSnapped:!1}},s=["midX","minX","maxX"],l=["midY","minY","maxY"],c=t.map(m=>{let g=s.flatMap((v,b)=>s.map((x,w)=>{let E=r[v]-m[x],C=Math.abs(E);return{f:v,t:x,gap:E,distance:C,isCareful:b===0||b+w===3}})),y=l.flatMap((v,b)=>l.map((x,w)=>{let E=r[v]-m[x],C=Math.abs(E);return{f:v,t:x,gap:E,distance:C,isCareful:b===0||b+w===3}}));return[m,g,y]}),u=1/0,d=1/0,f=1/0,p=1/0;return c.forEach(([m,g,y])=>{g.forEach(v=>{v.distance<n&&v.distance<f&&(f=v.distance,u=v.gap)}),y.forEach(v=>{v.distance<n&&v.distance<p&&(p=v.distance,d=v.gap)})}),c.forEach(([m,g,y])=>{u!==1/0&&g.forEach(v=>{Math.abs(v.gap-u)<2&&(a[v.f]=jo(Qe({},a[v.f]),{isSnapped:!0,to:m[v.t],B:m,distance:v.distance}))}),d!==1/0&&y.forEach(v=>{Math.abs(v.gap-d)<2&&(a[v.f]=jo(Qe({},a[v.f]),{isSnapped:!0,to:m[v.t],B:m,distance:v.distance}))})}),i[0]=u===1/0?0:u,i[1]=d===1/0?0:d,r.minX-=i[0],r.midX-=i[0],r.maxX-=i[0],r.minY-=i[1],r.midY-=i[1],r.maxY-=i[1],s.forEach(m=>{let g=a[m];if(!g.isSnapped)return;let{id:y,B:v}=g,b=r[y];o.push(y==="minX"?[[b,r.midY],[b,v.minY],[b,v.maxY]]:[[b,r.minY],[b,r.maxY],[b,v.minY],[b,v.maxY]])}),l.forEach(m=>{let g=a[m];if(!g.isSnapped)return;let{id:y,B:v}=g,b=r[y];o.push(y==="midY"?[[r.midX,b],[v.minX,b],[v.maxX,b]]:[[r.minX,b],[r.maxX,b],[v.minX,b],[v.maxX,b]])}),{offset:i,snapLines:o}}),Bt($,"deepMerge",(e,t)=>{let n=Qe({},e),r=Object.entries(t);for(let[i,o]of r)n[i]=o===Object(o)&&!Array.isArray(o)?Tn.deepMerge(n[i],o):o;return n});function rs(e,t){return(e+t)/2}var ti=$;function tSe(e,t){let n=h.exports.useRef(void 0),r=h.exports.useRef(void 0),i=h.exports.useRef([0,0]),o=h.exports.useRef(0),{inputs:a,bounds:s,callbacks:l}=mr();h.exports.useEffect(()=>{let p=m=>m.preventDefault();return document.addEventListener("gesturestart",p),document.addEventListener("gesturechange",p),()=>{document.removeEventListener("gesturestart",p),document.removeEventListener("gesturechange",p)}},[]);let c=h.exports.useCallback(({event:p})=>{var m,g,y,v;if(p.preventDefault(),a.isPinching||p.timeStamp<=o.current)return;o.current=p.timeStamp;let[b,x,w]=nSe(p);if((p.altKey||p.ctrlKey||p.metaKey)&&p.buttons===0){let I=[...(g=(m=a.pointer)==null?void 0:m.point)!=null?g:[s.width/2,s.height/2],w*.618],T=a.pan(I,p);(y=l.onZoom)==null||y.call(l,jo(Qe({},T),{delta:I}),p);return}let E=O.mul(p.shiftKey&&!ti.isDarwin()?[x,0]:[b,x],.5);if(O.isEqual(E,[0,0]))return;let C=a.pan(E,p);(v=l.onPan)==null||v.call(l,C,p)},[l,a,s]),u=h.exports.useCallback(({origin:p,event:m})=>{var g;if(m instanceof WheelEvent)return;let y=t.current;if(!y||!(m.target===y||y.contains(m.target)))return;let v=a.pinch(p,p);a.isPinching=!0,(g=l.onPinchStart)==null||g.call(l,v,m),r.current=v.point,n.current=v.origin,i.current=[0,0]},[l,a,s]),d=h.exports.useCallback(({origin:p,offset:m,event:g})=>{var y;if(g instanceof WheelEvent)return;let v=t.current;if(!(g.target===v||(v==null?void 0:v.contains(g.target)))||!n.current)return;let b=a.pinch(p,n.current),x=O.sub(b.delta,i.current);i.current=b.delta,(y=l.onPinch)==null||y.call(l,jo(Qe({},b),{point:b.point,origin:n.current,delta:[...x,m[0]]}),g),r.current=p},[l,a,s]),f=h.exports.useCallback(({origin:p,event:m})=>{var g;let y=t.current;if(!(m.target===y||(y==null?void 0:y.contains(m.target))))return;let v=a.pinch(p,p);a.isPinching=!1,(g=l.onPinchEnd)==null||g.call(l,v,m),r.current=void 0,n.current=void 0,i.current=[0,0]},[]);d3e({onWheel:c,onPinchStart:u,onPinch:d,onPinchEnd:f},{target:t,eventOptions:{passive:!1},pinch:{from:[e.current,0],scaleBounds:()=>({from:e.current,max:5,min:.1})}})}var aP=10;function nSe(e){let{deltaY:t,deltaX:n}=e,r=0;if(e.ctrlKey||e.metaKey){let i=Math.sign(e.deltaY),o=Math.abs(e.deltaY),a=t;o>aP&&(a=aP*i),r=a}return[n,t,r]}function rSe(){let{callbacks:e}=mr();h.exports.useEffect(()=>{function t(){var n;(n=e.onShapeBlur)==null||n.call(e)}return ti.isMobileSafari()?(document.addEventListener("focusout",t),()=>document.removeEventListener("focusout",t)):()=>null},[e])}function iSe(){let{callbacks:e,inputs:t}=mr();return h.exports.useMemo(()=>({onPointerDown:n=>{var r,i,o;if(n.dead||(n.dead=!0,!t.pointerIsValid(n)))return;if(n.currentTarget.setPointerCapture(n.pointerId),n.button===2){(r=e.onRightPointCanvas)==null||r.call(e,t.pointerDown(n,"canvas"),n);return}let a=t.pointerDown(n,"canvas");n.button===0&&((i=e.onPointCanvas)==null||i.call(e,a,n)),(o=e.onPointerDown)==null||o.call(e,a,n)},onPointerMove:n=>{var r,i;if(n.dead||(n.dead=!0,!t.pointerIsValid(n)))return;let o=t.pointerMove(n,"canvas");n.buttons===1&&n.currentTarget.hasPointerCapture(n.pointerId)&&((r=e.onDragCanvas)==null||r.call(e,o,n)),(i=e.onPointerMove)==null||i.call(e,o,n)},onPointerUp:n=>{var r,i,o,a,s;if(n.dead||(n.dead=!0,t.activePointer=void 0,!t.pointerIsValid(n)))return;let l=t.isDoubleClick(),c=t.pointerUp(n,"canvas");if(n.button===2){(r=e.onPointerUp)==null||r.call(e,c,n);return}n.currentTarget.hasPointerCapture(n.pointerId)&&((i=n.currentTarget)==null||i.releasePointerCapture(n.pointerId)),n.button===0&&(l&&!(c.altKey||c.metaKey)&&((o=e.onDoubleClickCanvas)==null||o.call(e,c,n)),(a=e.onReleaseCanvas)==null||a.call(e,c,n)),(s=e.onPointerUp)==null||s.call(e,c,n)},onDrop:e.onDrop,onDragOver:e.onDragOver}),[e,t])}function oSe(e){let{rPageState:t,rSelectionBounds:n,callbacks:r,inputs:i}=h.exports.useContext(F6);return h.exports.useMemo(()=>({onPointerDown:o=>{var a,s,l,c,u,d,f;if(o.dead||(o.dead=!0,!i.pointerIsValid(o)))return;if(o.button===2){(a=r.onRightPointShape)==null||a.call(r,i.pointerDown(o,e),o);return}let p=i.pointerDown(o,e);if((s=o.currentTarget)==null||s.setPointerCapture(o.pointerId),n.current&&$.pointInBounds(p.point,n.current)&&!t.current.selectedIds.includes(e)){o.button===0&&((l=r.onPointBounds)==null||l.call(r,i.pointerDown(o,"bounds"),o),(c=r.onPointShape)==null||c.call(r,p,o)),(u=r.onPointerDown)==null||u.call(r,p,o);return}o.button===0&&((d=r.onPointShape)==null||d.call(r,p,o)),(f=r.onPointerDown)==null||f.call(r,p,o)},onPointerUp:o=>{var a,s,l,c;if(o.dead||(o.dead=!0,!i.pointerIsValid(o))||o.button===2)return;i.activePointer=void 0;let u=i.isDoubleClick(),d=i.pointerUp(o,e);o.pointerId&&o.currentTarget.hasPointerCapture(o.pointerId)&&((a=o.currentTarget)==null||a.releasePointerCapture(o.pointerId)),o.button===0&&(u&&!(d.altKey||d.metaKey)&&((s=r.onDoubleClickShape)==null||s.call(r,d,o)),(l=r.onReleaseShape)==null||l.call(r,d,o)),(c=r.onPointerUp)==null||c.call(r,d,o)},onPointerMove:o=>{var a,s;if(o.dead||(o.dead=!0,o.buttons===2||!i.pointerIsValid(o)||i.pointer&&o.pointerId!==i.pointer.pointerId))return;let l=i.pointerMove(o,e);o.buttons===1&&o.currentTarget.hasPointerCapture(o.pointerId)&&((a=r.onDragShape)==null||a.call(r,l,o)),(s=r.onPointerMove)==null||s.call(r,l,o)},onPointerEnter:o=>{var a;if(!i.pointerIsValid(o))return;let s=i.pointerEnter(o,e);(a=r.onHoverShape)==null||a.call(r,s,o)},onPointerLeave:o=>{var a;if(!i.pointerIsValid(o))return;let s=i.pointerEnter(o,e);(a=r.onUnhoverShape)==null||a.call(r,s,o)}}),[i,r,e])}function nj(e,t,n,r,i,o=!1,a=!1,s,l){let c={shape:e,asset:e.assetId?i[e.assetId]:void 0,meta:s,isChildOfSelected:a,isGhost:e.isGhost||o,isEditing:r.editingId===e.id,isBinding:l===e.id,isSelected:r.selectedIds.includes(e.id),isHovered:r.hoveredId===e.id||e.children!==void 0&&(r.hoveredId&&e.children.includes(r.hoveredId)||e.children.some(u=>r.selectedIds.includes(u)))};t.push(c),e.children&&(c.children=[],e.children.map(u=>n[u]).filter(u=>n[u.id]).sort((u,d)=>u.childIndex-d.childIndex).forEach(u=>nj(u,c.children,n,r,i,c.isGhost,c.isSelected||c.isChildOfSelected,s)))}function aSe(e,t){return $.boundsContain(t,e)||$.boundsCollide(t,e)}function sSe(e,t,n,r){let{callbacks:i,shapeUtils:o,bounds:a}=mr(),s=h.exports.useRef(),l=h.exports.useRef(-1),c=h.exports.useRef(new Set),u=h.exports.useRef(new Set),{selectedIds:d,camera:f}=t,[p,m]=O.sub(O.div([0,0],f.zoom),f.point),[g,y]=O.sub(O.div([a.width,a.height],f.zoom),f.point),v={minX:p,minY:m,maxX:g,maxY:y,height:g-p,width:y-m},b=u.current,x=c.current;b.clear(),x.clear(),Object.values(e.shapes).filter(C=>o[C.type].isStateful||d.includes(C.id)||aSe(o[C.type].getBounds(C),v)).forEach(C=>{if(C.parentId===e.id){x.add(C.id),b.add(C);return}let I=e.shapes[C.parentId];if(I===void 0)throw Error(`A shape (${C.id}) has a parent (${C.parentId}) that does not exist!`);x.add(I.id),b.add(I)}),b.size!==l.current&&(s.current&&clearTimeout(s.current),s.current=requestAnimationFrame(()=>{var C;(C=i.onRenderCountChange)==null||C.call(i,Array.from(x.values()))}),l.current=b.size);let w=t.bindingId?e.bindings[t.bindingId].toId:void 0,E=[];return b.forEach(C=>{if(C===void 0)throw Error("Rendered shapes included a missing shape");nj(C,E,e.shapes,t,n,C.isGhost,!1,r,w)}),E.sort((C,I)=>C.shape.childIndex-I.shape.childIndex),E}var L5=new Map;function lSe(e,t){return Object.keys(t).reduce((n,r)=>{let i=t[r];return i?n+`${`--${e}-${r}`}: ${i};
`:n},"")}function cSe(e,t,n=":root"){h.exports.useLayoutEffect(()=>{let r=document.createElement("style"),i=lSe(e,t);return r.setAttribute("id",`${e}-theme`),r.setAttribute("data-selector",n),r.innerHTML=`
        ${n} {
          ${i}
        }
      `,document.head.appendChild(r),()=>{r&&document.head.contains(r)&&document.head.removeChild(r)}},[e,t,n])}function uSe(e,t){h.exports.useLayoutEffect(()=>{if(L5.get(e))return()=>{};let n=document.createElement("style");return n.innerHTML=t,n.setAttribute("id",e),document.head.appendChild(n),L5.set(e,n),()=>{n&&document.head.contains(n)&&(document.head.removeChild(n),L5.delete(e))}},[e,t])}var dSe=(e,...t)=>e.reduce((n,r,i)=>n+r+(i<t.length?t[i]:""),""),fSe={accent:"rgb(255, 0, 0)",brushFill:"rgba(0,0,0,.05)",brushStroke:"rgba(0,0,0,.25)",brushDashStroke:"rgba(0,0,0,.6)",selectStroke:"rgb(66, 133, 244)",selectFill:"rgba(65, 132, 244, 0.05)",binding:"rgba(65, 132, 244, 0.12)",background:"rgb(248, 249, 250)",foreground:"rgb(51, 51, 51)",grid:"rgba(144, 144, 144, 1)"},pSe=dSe`
  .tl-container {
    --tl-zoom: 1;
    --tl-scale: calc(1 / var(--tl-zoom));
    --tl-padding: calc(64px * max(1, var(--tl-scale)));
    --tl-performance-all: auto;
    --tl-performance-selected: auto;
    position: relative;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    box-sizing: border-box;
    padding: 0px;
    margin: 0px;
    z-index: 100;
    overflow: hidden;
    touch-action: none;
    overscroll-behavior: none;
    background-color: var(--tl-background);
  }
  .tl-container * {
    box-sizing: border-box;
  }
  .tl-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    touch-action: none;
    pointer-events: none;
  }
  .tl-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    touch-action: none;
    pointer-events: none;
    user-select: none;
  }
  .tl-snap-line {
    stroke: var(--tl-accent);
    stroke-width: calc(1px * var(--tl-scale));
  }
  .tl-snap-point {
    stroke: var(--tl-accent);
    stroke-width: calc(1px * var(--tl-scale));
  }
  .tl-canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    touch-action: none;
    pointer-events: all;
    overflow: clip;
  }
  .tl-layer {
    position: absolute;
    top: 0px;
    left: 0px;
    height: 0px;
    width: 0px;
    contain: layout style size;
  }
  .tl-absolute {
    position: absolute;
    top: 0px;
    left: 0px;
    transform-origin: center center;
    contain: layout style size;
  }
  .tl-positioned {
    position: absolute;
    top: 0px;
    left: 0px;
    transform-origin: center center;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    contain: layout style size;
    will-change: var(--tl-performance-all);
  }
  .tl-positioned-svg {
    width: 100%;
    height: 100%;
    overflow: hidden;
    contain: layout style size;
  }
  .tl-positioned-div {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    padding: var(--tl-padding);
    overflow: hidden;
    contain: layout style size;
  }
  .tl-positioned-selected {
    will-change: var(--tl-performance-selected);
  }
  .tl-inner-div {
    position: relative;
    width: 100%;
    height: 100%;
  }
  .tl-stroke-hitarea {
    fill: none;
    stroke: transparent;
    stroke-width: calc(24px * var(--tl-scale));
    pointer-events: stroke;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .tl-fill-hitarea {
    fill: transparent;
    stroke: transparent;
    stroke-width: calc(24px * var(--tl-scale));
    pointer-events: all;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .tl-counter-scaled {
    transform: scale(var(--tl-scale));
  }
  .tl-dashed {
    stroke-dasharray: calc(2px * var(--tl-scale)), calc(2px * var(--tl-scale));
  }
  .tl-transparent {
    fill: transparent;
    stroke: transparent;
  }
  .tl-cursor-ns {
    cursor: ns-resize;
  }
  .tl-cursor-ew {
    cursor: ew-resize;
  }
  .tl-cursor-nesw {
    cursor: nesw-resize;
  }
  .tl-cursor-nwse {
    cursor: nwse-resize;
  }
  .tl-corner-handle {
    stroke: var(--tl-selectStroke);
    fill: var(--tl-background);
    stroke-width: calc(1.5px * var(--tl-scale));
  }
  .tl-rotate-handle {
    stroke: var(--tl-selectStroke);
    fill: var(--tl-background);
    stroke-width: calc(1.5px * var(--tl-scale));
    cursor: grab;
  }
  .tl-binding {
    fill: var(--tl-selectFill);
    stroke: var(--tl-selectStroke);
    stroke-width: calc(1px * var(--tl-scale));
    pointer-events: none;
  }
  .tl-user {
    left: calc(-15px * var(--tl-scale));
    top: calc(-15px * var(--tl-scale));
    height: calc(35px * var(--tl-scale));
    width: calc(35px * var(--tl-scale));
    transform: scale(var(--tl-scale));
    pointer-events: none;
    will-change: transform;
  }
  .tl-animated {
    transition: transform 200ms linear;
  }
  .tl-indicator {
    fill: transparent;
    stroke-width: calc(1.5px * var(--tl-scale));
    pointer-events: none;
  }
  .tl-user-indicator-bounds {
    border-style: solid;
    border-width: calc(1px * var(--tl-scale));
  }
  .tl-hovered {
    stroke: var(--tl-selectStroke);
  }
  .tl-selected {
    stroke: var(--tl-selectStroke);
  }
  .tl-locked {
    stroke-dasharray: calc(3px * var(--tl-scale)) calc(3px * var(--tl-scale));
  }
  .tl-editing {
    stroke-width: calc(2.5px * min(5, var(--tl-scale)));
  }
  .tl-performance {
    will-change: transform, contents;
  }
  .tl-clone-target {
    pointer-events: all;
  }
  .tl-clone-target:hover .tl-clone-button {
    opacity: 1;
  }
  .tl-clone-button-target {
    cursor: pointer;
    pointer-events: all;
  }
  .tl-clone-button-target:hover .tl-clone-button {
    fill: var(--tl-selectStroke);
  }
  .tl-clone-button {
    opacity: 0;
    r: calc(8px * var(--tl-scale));
    stroke-width: calc(1.5px * var(--tl-scale));
    stroke: var(--tl-selectStroke);
    fill: var(--tl-background);
  }
  .tl-bounds {
    pointer-events: none;
    contain: layout style size;
  }
  .tl-bounds-bg {
    stroke: none;
    fill: var(--tl-selectFill);
    pointer-events: all;
    contain: layout style size;
  }
  .tl-bounds-center {
    fill: transparent;
    stroke: var(--tl-selectStroke);
    stroke-width: calc(1.5px * var(--tl-scale));
  }
  .tl-brush {
    fill: var(--tl-brushFill);
    stroke: var(--tl-brushStroke);
    stroke-width: calc(1px * var(--tl-scale));
    pointer-events: none;
    contain: layout style size;
  }
  .tl-dashed-brush-line {
    fill: none;
    stroke: var(--tl-brushDashStroke);
    stroke-width: calc(1px * var(--tl-scale));
    pointer-events: none;
  }
  .tl-brush.dashed {
    stroke: none;
  }
  .tl-handle {
    pointer-events: all;
    cursor: grab;
  }
  .tl-handle:hover .tl-handle-bg {
    fill: var(--tl-selectFill);
  }
  .tl-handle:hover .tl-handle-bg > * {
    stroke: var(--tl-selectFill);
  }
  .tl-handle:active .tl-handle-bg {
    cursor: grabbing;
    fill: var(--tl-selectFill);
  }
  .tl-handle:active .tl-handle-bg > * {
    stroke: var(--tl-selectFill);
  }
  .tl-handle {
    fill: var(--tl-background);
    stroke: var(--tl-selectStroke);
    stroke-width: 1.5px;
  }
  .tl-handle-bg {
    fill: transparent;
    stroke: none;
    pointer-events: all;
    r: calc(16px / max(1, var(--tl-zoom)));
  }
  .tl-binding-indicator {
    fill: transparent;
    stroke: var(--tl-binding);
  }
  .tl-centered-g {
    transform: translate(var(--tl-padding), var(--tl-padding));
  }
  .tl-current-parent > *[data-shy='true'] {
    opacity: 1;
  }
  .tl-binding {
    fill: none;
    stroke: var(--tl-selectStroke);
    stroke-width: calc(2px * var(--tl-scale));
  }
  .tl-grid-dot {
    fill: var(--tl-grid);
  }
  .tl-erase-line {
    stroke-linejoin: round;
    stroke-linecap: round;
    pointer-events: none;
    fill: var(--tl-grid);
    opacity: 0.32;
  }
`;function hSe(e,t){let n=h.exports.useMemo(()=>Qe(Qe({},fSe),e),[e]);cSe("tl",n,t),uSe("tl-canvas",pSe)}function td(e){let{callbacks:t,inputs:n}=mr(),r=h.exports.useCallback(l=>{var c,u,d,f;if(l.dead||(l.dead=!0,!n.pointerIsValid(l)))return;(c=l.currentTarget)==null||c.setPointerCapture(l.pointerId);let p=n.pointerDown(l,e);if(l.button===2){(u=t.onRightPointBoundsHandle)==null||u.call(t,p,l);return}l.button===0&&((d=t.onPointBoundsHandle)==null||d.call(t,p,l)),(f=t.onPointerDown)==null||f.call(t,p,l)},[n,t,e]),i=h.exports.useCallback(l=>{var c,u,d;if(l.dead||(l.dead=!0,l.button===2||!n.pointerIsValid(l)))return;let f=n.pointerUp(l,e),p=n.isDoubleClick();l.button===0&&(p&&!(f.altKey||f.metaKey)&&((c=t.onDoubleClickBoundsHandle)==null||c.call(t,f,l)),(u=t.onReleaseBoundsHandle)==null||u.call(t,f,l)),(d=t.onPointerUp)==null||d.call(t,f,l)},[n,t,e]),o=h.exports.useCallback(l=>{var c,u;if(l.dead||(l.dead=!0,!n.pointerIsValid(l))||l.buttons===2)return;let d=n.pointerMove(l,e);l.buttons===1&&l.currentTarget.hasPointerCapture(l.pointerId)&&((c=t.onDragBoundsHandle)==null||c.call(t,d,l)),(u=t.onPointerMove)==null||u.call(t,d,l)},[n,t,e]),a=h.exports.useCallback(l=>{var c;!n.pointerIsValid(l)||(c=t.onHoverBoundsHandle)==null||c.call(t,n.pointerEnter(l,e),l)},[n,t,e]),s=h.exports.useCallback(l=>{var c;!n.pointerIsValid(l)||(c=t.onUnhoverBoundsHandle)==null||c.call(t,n.pointerEnter(l,e),l)},[n,t,e]);return{onPointerDown:r,onPointerUp:i,onPointerEnter:a,onPointerMove:o,onPointerLeave:s}}function mSe(e,t,n){let r=h.exports.useRef(),i=h.exports.useRef();h.exports.useLayoutEffect(()=>{let{zoom:o,point:a}=n.camera,s=o!==r.current,l=a!==i.current;if(r.current=o,i.current=a,s||l){let c=e.current;if(t&&"current"in t){let u=t.current;s&&u&&u.style.setProperty("--tl-zoom",o.toString()),c&&c.style.setProperty("transform",`scale(${o}) translateX(${a[0]}px) translateY(${a[1]}px)`)}}},[n.camera.zoom,n.camera.point])}function sP(e,t){return[(e[0]+t.point[0])*t.zoom,(e[1]+t.point[1])*t.zoom]}function B5(e,t){return e[t.type]}function gSe(e,t,n){let{rSelectionBounds:r}=mr(),{selectedIds:i}=t,o=h.exports.useRef(),a,s=0,l=!1,c=!1;if(i.length===1){let d=i[0],f=e.shapes[d];if(!f)throw Error(`selectedIds is set to the id of a shape that doesn't exist: ${d}`);s=f.rotation||0,l=f.isLocked||!1;let p=B5(n,f);a=p.hideBounds?void 0:p.getBounds(f)}else if(i.length>1){let d=i.map(f=>e.shapes[f]);s=0,l=d.every(f=>f.isLocked),a=d.reduce((f,p,m)=>m===0?B5(n,p).getRotatedBounds(p):ti.getExpandedBounds(f,B5(n,p).getRotatedBounds(p)),{})}if(a){let[d,f]=sP([a.minX,a.minY],t.camera),[p,m]=sP([a.maxX,a.maxY],t.camera);c=!!Object.values(e.bindings).find(g=>i.includes(g.toId)||i.includes(g.fromId)),r.current={minX:d,minY:f,maxX:p,maxY:m,width:p-d,height:m-f}}else r.current=null;let u=o.current;return!u||!a?o.current=a:a&&u.minX===a.minX&&u.minY===a.minY&&u.maxX===a.maxX&&u.maxY===a.maxY&&(a=o.current),{bounds:a,rotation:s,isLocked:l,isLinked:c}}function vSe(e){let{inputs:t,callbacks:n}=mr();return h.exports.useMemo(()=>({onPointerDown:r=>{var i,o,a;if(r.dead||(r.dead=!0,!t.pointerIsValid(r))||r.button===2)return;(i=r.currentTarget)==null||i.setPointerCapture(r.pointerId);let s=t.pointerDown(r,e);r.button===0&&((o=n.onPointHandle)==null||o.call(n,s,r)),(a=n.onPointerDown)==null||a.call(n,s,r)},onPointerUp:r=>{var i,o,a,s;if(r.dead||(r.dead=!0,!t.pointerIsValid(r))||r.button===2)return;let l=t.isDoubleClick(),c=t.pointerUp(r,e);r.currentTarget.hasPointerCapture(r.pointerId)&&((i=r.currentTarget)==null||i.releasePointerCapture(r.pointerId),r.button===0&&(l&&!(c.altKey||c.metaKey)&&((o=n.onDoubleClickHandle)==null||o.call(n,c,r)),(a=n.onReleaseHandle)==null||a.call(n,c,r))),(s=n.onPointerUp)==null||s.call(n,c,r)},onPointerMove:r=>{var i,o;if(r.dead||(r.dead=!0,!t.pointerIsValid(r))||r.buttons===2)return;let a=t.pointerMove(r,e);r.buttons===1&&r.currentTarget.hasPointerCapture(r.pointerId)&&((i=n.onDragHandle)==null||i.call(n,a,r)),(o=n.onPointerMove)==null||o.call(n,a,r)},onPointerEnter:r=>{var i;if(!t.pointerIsValid(r))return;let o=t.pointerEnter(r,e);(i=n.onHoverHandle)==null||i.call(n,o,r)},onPointerLeave:r=>{var i;if(!t.pointerIsValid(r))return;let o=t.pointerEnter(r,e);(i=n.onUnhoverHandle)==null||i.call(n,o,r)}}),[t,n,e])}function ySe(e){let{bounds:t}=mr();h.exports.useEffect(()=>{let n=o=>{o.preventDefault()},r=o=>{let a=o.touches[0].pageX,s=o.touches[0].radiusX||0;(a-s<10||a+s>t.width-10)&&o.preventDefault()},i=e.current;return i?(i.addEventListener("gestureend",n),i.addEventListener("gesturechange",n),i.addEventListener("gesturestart",n),i.addEventListener("touchstart",r),()=>{i&&(i.removeEventListener("gestureend",n),i.removeEventListener("gesturechange",n),i.removeEventListener("gesturestart",n),i.removeEventListener("touchstart",r))}):()=>{}},[e,t.width])}function bSe(){let{callbacks:e,inputs:t}=mr();return h.exports.useMemo(()=>({onPointerDown:n=>{var r,i,o,a;if(n.dead||(n.dead=!0,!t.pointerIsValid(n)))return;if(n.button===2){(r=e.onRightPointBounds)==null||r.call(e,t.pointerDown(n,"bounds"),n);return}let s=t.pointerDown(n,"bounds");(i=n.currentTarget)==null||i.setPointerCapture(n.pointerId),n.button===0&&((o=e.onPointBounds)==null||o.call(e,s,n)),(a=e.onPointerDown)==null||a.call(e,s,n)},onPointerUp:n=>{var r,i,o,a;if(n.dead||(n.dead=!0,n.button===2)||(t.activePointer=void 0,!t.pointerIsValid(n)))return;let s=t.isDoubleClick(),l=t.pointerUp(n,"bounds");n.currentTarget.hasPointerCapture(n.pointerId)&&((r=n.currentTarget)==null||r.releasePointerCapture(n.pointerId)),n.button===0&&(s&&!(l.altKey||l.metaKey)&&((i=e.onDoubleClickBounds)==null||i.call(e,l,n)),(o=e.onReleaseBounds)==null||o.call(e,l,n)),(a=e.onPointerUp)==null||a.call(e,l,n)},onPointerMove:n=>{var r,i;if(n.dead||(n.dead=!0,!t.pointerIsValid(n)))return;n.buttons===1&&n.currentTarget.hasPointerCapture(n.pointerId)&&((r=e.onDragBounds)==null||r.call(e,t.pointerMove(n,"bounds"),n));let o=t.pointerMove(n,"bounds");(i=e.onPointerMove)==null||i.call(e,o,n)},onPointerEnter:n=>{var r;!t.pointerIsValid(n)||(r=e.onHoverBounds)==null||r.call(e,t.pointerEnter(n,"bounds"),n)},onPointerLeave:n=>{var r;!t.pointerIsValid(n)||(r=e.onUnhoverBounds)==null||r.call(e,t.pointerEnter(n,"bounds"),n)}}),[t,e])}function rj(e,t=0){let n=h.exports.useRef(null);return h.exports.useLayoutEffect(()=>{let r=n.current,i=`
    translate(
      calc(${e.minX}px - var(--tl-padding)),
      calc(${e.minY}px - var(--tl-padding))
    )
    rotate(${t+(e.rotation||0)}rad)`;r.style.setProperty("transform",i),r.style.setProperty("width",`calc(${Math.floor(e.width)}px + (var(--tl-padding) * 2))`),r.style.setProperty("height",`calc(${Math.floor(e.height)}px + (var(--tl-padding) * 2))`)},[e,t]),n}function xSe(){let{inputs:e,callbacks:t}=mr();h.exports.useEffect(()=>{let n=i=>{var o;(o=t.onKeyDown)==null||o.call(t,i.key,e.keydown(i),i)},r=i=>{var o;e.keyup(i),(o=t.onKeyUp)==null||o.call(t,i.key,e.keyup(i),i)};return window.addEventListener("keydown",n),window.addEventListener("keyup",r),()=>{window.removeEventListener("keydown",n),window.removeEventListener("keyup",r)}},[e,t])}function SSe(e,t){h.exports.useLayoutEffect(()=>{if(t&&"current"in t){let n=t==null?void 0:t.current;if(!n)return;switch(e){case"transform_selected":{n.style.setProperty("--tl-performance-all","auto"),n.style.setProperty("--tl-performance-selected","transform, contents");break}case"transform_all":{n.style.setProperty("--tl-performance-all","transform, contents"),n.style.setProperty("--tl-performance-selected","transform, contents");break}case"translate_selected":{n.style.setProperty("--tl-performance-all","auto"),n.style.setProperty("--tl-performance-selected","transform");break}case"translate_all":{n.style.setProperty("--tl-performance-all","transform"),n.style.setProperty("--tl-performance-selected","transform");break}default:n.style.setProperty("--tl-performance-all","auto"),n.style.setProperty("--tl-performance-selected","auto")}}},[e])}function wSe(e){var t=e,{id:n,bounds:r,rotation:i=0,isGhost:o=!1,isSelected:a=!1,children:s}=t,l=Zd(t,["id","bounds","rotation","isGhost","isSelected","children"]);let c=rj(r,i);return h.exports.createElement("div",Qe({id:n,ref:c,className:`tl-positioned${o?" tl-ghost":""}${a?" tl-positioned-selected":""}`,"aria-label":"container","data-testid":"container"},l),s)}var s1=h.exports.memo(wSe);function CSe({brush:e,zoom:t,dashed:n}){return h.exports.createElement(s1,{bounds:e,rotation:0},h.exports.createElement(Hr,null,h.exports.createElement("rect",{className:"tl-brush"+(n?" dashed":""),opacity:1,x:0,y:0,width:e.width,height:e.height,"aria-label":"brush"}),n&&h.exports.createElement("g",{className:"tl-dashed-brush-line"},h.exports.createElement(wm,{x1:0,y1:0,x2:e.width,y2:0,zoom:t}),h.exports.createElement(wm,{x1:e.width,y1:0,x2:e.width,y2:e.height,zoom:t}),h.exports.createElement(wm,{x1:0,y1:e.height,x2:e.width,y2:e.height,zoom:t}),h.exports.createElement(wm,{x1:0,y1:0,x2:0,y2:e.height,zoom:t}))))}var kSe=h.exports.memo(CSe);function wm({x1:e,y1:t,x2:n,y2:r,zoom:i}){let o=ti.getPerfectDashProps(Math.hypot(n-e,r-t),1/i,"dashed",1,!0,3);return h.exports.createElement("line",{x1:e,y1:t,x2:n,y2:r,strokeWidth:1/i,strokeDasharray:o.strokeDasharray,strokeDashoffset:o.strokeDashoffset})}var ESe=h.exports.memo(({color:e})=>h.exports.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 35 35",fill:"none",fillRule:"evenodd"},h.exports.createElement("g",{fill:"rgba(0,0,0,.2)",transform:"translate(1,1)"},h.exports.createElement("path",{d:"m12 24.4219v-16.015l11.591 11.619h-6.781l-.411.124z"}),h.exports.createElement("path",{d:"m21.0845 25.0962-3.605 1.535-4.682-11.089 3.686-1.553z"})),h.exports.createElement("g",{fill:"white"},h.exports.createElement("path",{d:"m12 24.4219v-16.015l11.591 11.619h-6.781l-.411.124z"}),h.exports.createElement("path",{d:"m21.0845 25.0962-3.605 1.535-4.682-11.089 3.686-1.553z"})),h.exports.createElement("g",{fill:e},h.exports.createElement("path",{d:"m19.751 24.4155-1.844.774-3.1-7.374 1.841-.775z"}),h.exports.createElement("path",{d:"m13 10.814v11.188l2.969-2.866.428-.139h4.768z"}))));function ISe({points:e,zoom:t}){if(e.length===0)return null;let n=ti.getSvgPathFromStroke(Oc(e,{size:16/t,start:{taper:!0}}));return h.exports.createElement("path",{d:n,className:"tl-erase-line"})}var TSe=h.exports.memo(ISe),lP=[[-1,.15,64],[.05,.375,16],[.15,1,4],[.7,2.5,1]];function _Se({grid:e,camera:t}){return h.exports.createElement("svg",{className:"tl-grid",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},h.exports.createElement("defs",null,lP.map(([n,r,i],o)=>{let a=i*e*t.zoom,s=t.point[0]*t.zoom,l=t.point[1]*t.zoom,c=s>0?s%a:a+s%a,u=l>0?l%a:a+l%a,d=t.zoom<r?ti.modulate(t.zoom,[n,r],[0,1]):1;return h.exports.createElement("pattern",{key:`grid-pattern-${o}`,id:`grid-${o}`,width:a,height:a,patternUnits:"userSpaceOnUse"},h.exports.createElement("circle",{className:"tl-grid-dot",cx:c,cy:u,r:1,opacity:d}))})),lP.map((n,r)=>h.exports.createElement("rect",{key:`grid-rect-${r}`,width:"100%",height:"100%",fill:`url(#grid-${r})`})))}function PSe({camera:{zoom:e,point:t},children:n}){let r=2.5/e;return h.exports.createElement("svg",{className:"tl-overlay"},h.exports.createElement("defs",null,h.exports.createElement("g",{id:"tl-snap-point"},h.exports.createElement("path",{className:"tl-snap-point",d:`M ${-r},${-r} L ${r},${r} M ${-r},${r} L ${r},${-r}`}))),h.exports.createElement("g",{transform:`scale(${e}) translate(${t})`},n))}var OSe=h.exports.memo(PSe),Hr=h.exports.memo(h.exports.forwardRef(function(e,t){var n=e,{id:r,className:i="",children:o}=n,a=Zd(n,["id","className","children"]);return h.exports.createElement("svg",Qe({ref:t,className:`tl-positioned-svg ${i}`},a),h.exports.createElement("g",{id:r,className:"tl-centered-g"},o))}));function MSe({bounds:e,isLocked:t,isHidden:n}){return h.exports.createElement("rect",{className:["tl-bounds-center",t?"tl-dashed":""].join(" "),x:-1,y:-1,width:e.width+2,height:e.height+2,opacity:n?0:1,pointerEvents:"none","aria-label":"center handle"})}var RSe=h.exports.memo(MSe),DSe={right:0,bottomRight:45,bottom:90,bottomLeft:135,left:180,topLeft:225,top:270,topRight:315};function ASe({bounds:e,side:t,targetSize:n,size:r}){let i=n*2,o={left:-i,topLeft:-i,bottomLeft:-i,right:e.width,topRight:e.width,bottomRight:e.width,top:e.width/2-i/2,bottom:e.width/2-i/2}[t],a={left:e.height/2-i/2,right:e.height/2-i/2,top:-i*2,topLeft:-i,topRight:-i,bottom:e.height,bottomLeft:e.height,bottomRight:e.height}[t],{callbacks:s,inputs:l}=mr(),c=h.exports.useCallback(u=>{var d;u.stopPropagation();let f=l.pointerDown(u,t);(d=s.onShapeClone)==null||d.call(s,f,u)},[s.onShapeClone]);return h.exports.createElement("g",{className:"tl-clone-target",transform:`translate(${o}, ${a})`,"aria-label":"clone button"},h.exports.createElement("rect",{className:"tl-transparent",width:n*2,height:n*2}),h.exports.createElement("g",{className:"tl-clone-button-target",onPointerDown:c,transform:`translate(${n}, ${n}) rotate(${DSe[t]})`},h.exports.createElement("circle",{className:"tl-transparent ",r:n}),h.exports.createElement("path",{className:"tl-clone-button",d:`M -${r/2},-${r/2} L ${r/2},0 -${r/2},${r/2} Z`,strokeLinejoin:"round"})))}var is=h.exports.memo(ASe);function LSe({targetSize:e,size:t,bounds:n}){return h.exports.createElement(h.exports.Fragment,null,h.exports.createElement(is,{targetSize:e,size:t,bounds:n,side:"top"}),h.exports.createElement(is,{targetSize:e,size:t,bounds:n,side:"right"}),h.exports.createElement(is,{targetSize:e,size:t,bounds:n,side:"bottom"}),h.exports.createElement(is,{targetSize:e,size:t,bounds:n,side:"left"}),h.exports.createElement(is,{targetSize:e,size:t,bounds:n,side:"topLeft"}),h.exports.createElement(is,{targetSize:e,size:t,bounds:n,side:"topRight"}),h.exports.createElement(is,{targetSize:e,size:t,bounds:n,side:"bottomLeft"}),h.exports.createElement(is,{targetSize:e,size:t,bounds:n,side:"bottomRight"}))}var BSe=h.exports.memo(LSe),$Se={top_left_corner:"tl-cursor-nwse",top_right_corner:"tl-cursor-nesw",bottom_right_corner:"tl-cursor-nwse",bottom_left_corner:"tl-cursor-nesw"};function FSe({size:e,targetSize:t,isHidden:n,corner:r,bounds:i}){let o=td(r),a=r==="top_left_corner"||r==="top_right_corner",s=r==="top_left_corner"||r==="bottom_left_corner";return h.exports.createElement("g",{opacity:n?0:1},h.exports.createElement("rect",Qe({className:"tl-transparent "+(n?"":$Se[r]),"aria-label":"corner transparent",x:(s?-1:i.width+1)-t,y:(a?-1:i.height+1)-t,width:t*2,height:t*2,pointerEvents:n?"none":"all"},o)),h.exports.createElement("rect",{className:"tl-corner-handle","aria-label":"corner handle",x:(s?-1:i.width+1)-e/2,y:(a?-1:i.height+1)-e/2,width:e,height:e,pointerEvents:"none"}))}var Cm=h.exports.memo(FSe),NSe={top_edge:"tl-cursor-ns",right_edge:"tl-cursor-ew",bottom_edge:"tl-cursor-ns",left_edge:"tl-cursor-ew"};function zSe({size:e,isHidden:t,bounds:n,edge:r}){let i=td(r),o=r==="top_edge"||r==="bottom_edge",a=r==="right_edge"||r==="bottom_edge",{height:s,width:l}=n;return h.exports.createElement("rect",Qe({pointerEvents:t?"none":"all",className:"tl-transparent tl-edge-handle "+(t?"":NSe[r]),"aria-label":`${r} handle`,opacity:t?0:1,x:o?e/2:(a?l+1:-1)-e/2,y:o?(a?s+1:-1)-e/2:e/2,width:o?Math.max(0,l+1-e):e,height:o?e:Math.max(0,s+1-e)},i))}var km=h.exports.memo(zSe);function jSe({size:e,bounds:t,isHidden:n}){let r=td("left"),i=td("center"),o=td("right");return h.exports.createElement("g",{cursor:"grab",transform:`translate(${t.width/2-e*4}, ${t.height+e*2})`,"aria-label":"link handle"},h.exports.createElement("g",{className:"tl-transparent",pointerEvents:n?"none":"all"},h.exports.createElement("rect",Qe({x:0,y:0,width:e*2,height:e*2},r)),h.exports.createElement("rect",Qe({x:e*3,y:0,width:e*2,height:e*2},i)),h.exports.createElement("rect",Qe({x:e*6,y:0,width:e*2,height:e*2},o))),h.exports.createElement("g",{className:"tl-rotate-handle",transform:`translate(${e/2}, ${e/2})`,"aria-label":"link rotate handle"},h.exports.createElement("path",{d:`M 0,${e/2} L ${e},${e} ${e},0 Z`,pointerEvents:"none",opacity:n?0:1}),h.exports.createElement("path",{transform:`translate(${e*3}, 0)`,d:`M 0,0 L ${e},0 ${e/2},${e} Z`,pointerEvents:"none",opacity:n?0:1}),h.exports.createElement("path",{transform:`translate(${e*6}, 0)`,d:`M ${e},${e/2} L 0,0 0,${e} Z`,pointerEvents:"none",opacity:n?0:1})))}var HSe=h.exports.memo(jSe);function VSe({bounds:e,targetSize:t,size:n,isHidden:r}){let i=td("rotate");return h.exports.createElement("g",{cursor:"grab",opacity:r?0:1},h.exports.createElement("circle",Qe({className:"tl-transparent","aria-label":"rotate handle transparent",cx:e.width/2,cy:n*-2,r:t,pointerEvents:r?"none":"all"},i)),h.exports.createElement("circle",{className:"tl-rotate-handle","aria-label":"rotate handle",cx:e.width/2,cy:n*-2,r:n/2,pointerEvents:"none"}))}var WSe=h.exports.memo(VSe),USe=function({zoom:e,bounds:t,viewportWidth:n,rotation:r,isHidden:i,isLocked:o,hideCloneHandles:a,hideResizeHandles:s,hideRotateHandle:l,hideBindingHandles:c}){let u=(n<768?16:8)/e,d=8/e,f=Math.min(t.width,t.height)*e,p=!l&&!i&&!o&&f>32,m=!i&&!o&&f>24,g=!i&&!o&&f>20,y=!a&&f>24;return h.exports.createElement(s1,{bounds:t,rotation:r},h.exports.createElement(Hr,null,h.exports.createElement(RSe,{bounds:t,isLocked:o,isHidden:i}),!s&&!o?h.exports.createElement(h.exports.Fragment,null,h.exports.createElement(km,{targetSize:u,size:d,bounds:t,edge:"top_edge",isHidden:!m}),h.exports.createElement(km,{targetSize:u,size:d,bounds:t,edge:"right_edge",isHidden:!m}),h.exports.createElement(km,{targetSize:u,size:d,bounds:t,edge:"bottom_edge",isHidden:!m}),h.exports.createElement(km,{targetSize:u,size:d,bounds:t,edge:"left_edge",isHidden:!m}),h.exports.createElement(Cm,{targetSize:u,size:d,bounds:t,isHidden:i||!g,corner:"top_left_corner"}),h.exports.createElement(Cm,{targetSize:u,size:d,bounds:t,isHidden:i||!g,corner:"top_right_corner"}),h.exports.createElement(Cm,{targetSize:u,size:d,bounds:t,isHidden:i||!g,corner:"bottom_right_corner"}),h.exports.createElement(Cm,{targetSize:u,size:d,bounds:t,isHidden:i||!g,corner:"bottom_left_corner"})):null,p&&h.exports.createElement(WSe,{targetSize:u,size:d,bounds:t,isHidden:!m}),y&&h.exports.createElement(BSe,{bounds:t,targetSize:u,size:d}),!c&&h.exports.createElement(HSe,{targetSize:u,size:d,bounds:t,isHidden:!m})))},GSe=h.exports.memo(USe);function KSe({bounds:e,rotation:t,isHidden:n}){let r=bSe();return h.exports.createElement(s1,{bounds:e,rotation:t},h.exports.createElement(Hr,null,h.exports.createElement("rect",Qe({className:"tl-bounds-bg","aria-label":"bounds bg",width:e.width,height:e.height,opacity:n?0:1},r))))}var qSe=h.exports.memo(KSe);function YSe({id:e,point:t}){let n=vSe(e);return h.exports.createElement(s1,{bounds:ti.translateBounds({minX:0,minY:0,maxX:0,maxY:0,width:0,height:0},t)},h.exports.createElement(Hr,null,h.exports.createElement("g",Qe({className:"tl-handle","aria-label":"handle"},n),h.exports.createElement("circle",{className:"tl-handle-bg",pointerEvents:"all"}),h.exports.createElement("circle",{className:"tl-counter-scaled tl-handle",pointerEvents:"none",r:4}))))}var XSe=h.exports.memo(YSe);function ZSe({shape:e,zoom:t}){if(e.handles===void 0)return null;let n=null,r=Object.values(e.handles).reduce((i,o)=>{let a=O.add(o.point,e.point);return(!n||O.dist(a,n)*t>=32)&&(i.push(o),n=a),i},[]);return r.length===1?null:h.exports.createElement(h.exports.Fragment,null,r.map(i=>h.exports.createElement(XSe,{key:e.id+"_"+i.id,id:i.id,point:O.add(i.point,e.point)})))}var QSe=h.exports.memo(ZSe);function JSe(e){let t=e.utils.getRef(e.shape);return h.exports.createElement(e.utils.Component,Qe({ref:t},e))}var e4e=h.exports.memo(JSe,(e,t)=>e.isHovered!==t.isHovered||e.isSelected!==t.isSelected||e.isEditing!==t.isEditing||e.isBinding!==t.isBinding||e.isGhost!==t.isGhost||e.meta!==t.meta?!1:t.shape!==e.shape?!t.utils.shouldRender(t.shape,e.shape):!0);function t4e(e){var t=e,{shape:n,utils:r,meta:i}=t,o=Zd(t,["shape","utils","meta"]);let{callbacks:a}=mr(),s=r.getBounds(n),l=oSe(n.id);return h.exports.createElement(s1,{id:n.id,bounds:s,rotation:n.rotation,"data-shape":n.type,isGhost:o.isGhost,isSelected:o.isSelected},h.exports.createElement(e4e,Qe({shape:n,utils:r,meta:i,events:l,bounds:s,onShapeChange:a.onShapeChange,onShapeBlur:a.onShapeBlur},o)))}var n4e=h.exports.memo(t4e);function r4e(e){var t=e,{shape:n,utils:r,meta:i,children:o}=t,a=Zd(t,["shape","utils","meta","children"]);return h.exports.createElement(h.exports.Fragment,null,h.exports.createElement(n4e,Qe({shape:n,utils:r[n.type],meta:i},a)),o&&o.map(s=>h.exports.createElement(ij,Qe({key:s.shape.id,utils:r},s))))}var ij=h.exports.memo(r4e);function i4e({isHovered:e=!1,isSelected:t=!1,isEditing:n=!1,shape:r,user:i,meta:o}){let{shapeUtils:a}=mr(),s=a[r.type],l=s.getBounds(r),c=rj(l,r.rotation);return h.exports.createElement("div",{ref:c,draggable:!1,className:["tl-indicator","tl-absolute",t&&!i?"tl-selected":"tl-hovered",n?"tl-editing":"",r.isLocked?"tl-locked":""].join(" ")},h.exports.createElement("svg",{width:"100%",height:"100%"},h.exports.createElement("g",{className:"tl-centered-g",stroke:i==null?void 0:i.color},h.exports.createElement(s.Indicator,{shape:r,meta:o,user:i,bounds:l,isSelected:t,isHovered:e}))))}var i4=h.exports.memo(i4e);function o4e({page:e,pageState:t,assets:n,hideBounds:r,hideHandles:i,hideIndicators:o,hideBindingHandles:a,hideCloneHandles:s,hideRotateHandle:l,hideResizeHandles:c,meta:u}){let{bounds:d,shapeUtils:f}=mr(),p=sSe(e,t,n,u),{bounds:m,isLinked:g,isLocked:y,rotation:v}=gSe(e,t,f),{selectedIds:b,hoveredId:x,editingId:w,camera:{zoom:E}}=t,C=o,I=!0,T=!1,_,P=b.map(M=>e.shapes[M]);if(P.length===1){let M=P[0];T=w===M.id,T&&(C=!0);let D=f[M.type];I=s||!D.showCloneHandles,M.handles!==void 0&&!T&&(_=M)}return h.exports.createElement(h.exports.Fragment,null,m&&h.exports.createElement(qSe,{bounds:m,rotation:v,isHidden:r}),p.map(M=>h.exports.createElement(ij,Qe({key:M.shape.id,utils:f},M))),!C&&P.map(M=>h.exports.createElement(i4,{key:"selected_"+M.id,shape:M,meta:u,isSelected:!0,isEditing:T})),!C&&x&&x!==w&&h.exports.createElement(i4,{key:"hovered_"+x,shape:e.shapes[x],meta:u,isHovered:!0}),m&&h.exports.createElement(GSe,{zoom:E,bounds:m,viewportWidth:d.width,isLocked:y,rotation:v,isHidden:r,hideRotateHandle:l,hideResizeHandles:c,hideBindingHandles:a||!g,hideCloneHandles:I}),!i&&_&&h.exports.createElement(QSe,{shape:_,zoom:E}))}var a4e=h.exports.memo(o4e);function s4e({snapLines:e}){return h.exports.createElement(h.exports.Fragment,null,e.map((t,n)=>h.exports.createElement(c4e,{key:n,snapLine:t})))}function l4e({snapLine:e}){let t=ti.getBoundsFromPoints(e);return h.exports.createElement(h.exports.Fragment,null,h.exports.createElement("line",{className:"tl-snap-line",x1:t.minX,y1:t.minY,x2:t.maxX,y2:t.maxY}),e.map(([n,r],i)=>h.exports.createElement("use",{key:i,href:"#tl-snap-point",x:n,y:r})))}var c4e=h.exports.memo(l4e),u4e=h.exports.memo(s4e);function d4e({user:e,Cursor:t}){let n=h.exports.useRef(null);return h.exports.useLayoutEffect(()=>{n.current&&(n.current.style.transform=`translate(${e.point[0]}px, ${e.point[1]}px)`)},[e.point]),h.exports.createElement("div",{ref:n,className:`tl-absolute tl-user tl-counter-scaled ${e.session?"":"tl-animated"}`},h.exports.createElement(t,{id:e.id,color:e.color,metadata:e.metadata}))}function f4e({userId:e,users:t,Cursor:n}){return h.exports.createElement(h.exports.Fragment,null,Object.values(t).filter(r=>r&&r.id!==e).map(r=>h.exports.createElement(d4e,{key:r.id,user:r,Cursor:n})))}function p4e({userId:e,users:t,meta:n,page:r}){let{shapeUtils:i}=mr();return h.exports.createElement(h.exports.Fragment,null,Object.values(t).filter(Boolean).filter(o=>o.id!==e&&o.selectedIds.length>0).map(o=>{let a=o.selectedIds.map(l=>r.shapes[l]).filter(Boolean);if(a.length===0)return null;let s=ti.getCommonBounds(a.map(l=>i[l.type].getBounds(l)));return h.exports.createElement(h.exports.Fragment,{key:o.id+"_shapes"},h.exports.createElement("div",{className:"tl-absolute tl-user-indicator-bounds",style:{backgroundColor:o.color+"0d",borderColor:o.color+"78",transform:`translate(${s.minX}px, ${s.minY}px)`,width:s.width,height:s.height,pointerEvents:"none"}}),a.map(l=>h.exports.createElement(i4,{key:`${o.id}_${l.id}_indicator`,shape:l,user:o,meta:n,isHovered:!0})))}))}var h4e=e=>{let t=e.parentElement;for(;t;){if(t===document.body)return document;let{overflowY:n}=window.getComputedStyle(t);if(t.scrollHeight>t.clientHeight&&(n==="auto"||n==="scroll"||n==="overlay"))return t;t=t.parentElement}return document};function m4e(e,t){let{inputs:n,callbacks:r}=mr(),i=h.exports.useRef(!1),o=h.exports.useCallback(()=>{var a,s;if(i.current){let l=(a=e.current)==null?void 0:a.getBoundingClientRect();if(l){let c={minX:l.left,maxX:l.left+l.width,minY:l.top,maxY:l.top+l.height,width:l.width,height:l.height};n.bounds=c,t(c),(s=r.onBoundsChange)==null||s.call(r,c)}}else i.current=!0},[e,n,r.onBoundsChange]);h.exports.useEffect(()=>{let a=e.current?h4e(e.current):document,s=$.debounce(o,100);return a.addEventListener("scroll",s),window.addEventListener("resize",s),()=>{a.removeEventListener("scroll",s),window.removeEventListener("resize",s)}},[]),h.exports.useEffect(()=>{let a=new ResizeObserver(s=>{n.isPinching||s[0].contentRect&&o()});return e.current&&a.observe(e.current),()=>{a.disconnect()}},[e,n]),h.exports.useEffect(()=>{o()},[e])}function g4e({id:e,page:t,pageState:n,assets:r,snapLines:i,eraseLine:o,grid:a,users:s,userId:l,components:c={},meta:u,performanceMode:d,showDashedBrush:f,hideHandles:p,hideBounds:m,hideIndicators:g,hideBindingHandles:y,hideCloneHandles:v,hideResizeHandles:b,hideRotateHandle:x,hideGrid:w,onBoundsChange:E,hideCursors:C}){var I;let T=h.exports.useRef(null),_=h.exports.useRef(n.camera.zoom);_.current=n.camera.zoom,tSe(_,T),m4e(T,E),rSe(),ySe(T);let P=h.exports.useRef(null),M=h.exports.useRef(null);mSe(M,P,n),SSe(d,P),xSe();let D=iSe();return h.exports.createElement("div",{id:e,className:"tl-container",ref:P},h.exports.createElement("div",Qe({id:"canvas",className:"tl-absolute tl-canvas",ref:T},D),!w&&a&&h.exports.createElement(_Se,{grid:a,camera:n.camera}),h.exports.createElement("div",{ref:M,className:"tl-absolute tl-layer","data-testid":"layer"},h.exports.createElement(a4e,{page:t,pageState:n,assets:r,hideBounds:m,hideIndicators:g,hideHandles:p,hideBindingHandles:y,hideCloneHandles:v,hideResizeHandles:b,hideRotateHandle:x,meta:u}),s&&l&&h.exports.createElement(p4e,{userId:l,users:s,page:t,meta:u}),n.brush&&h.exports.createElement(kSe,{brush:n.brush,dashed:f,zoom:n.camera.zoom}),s&&!C&&h.exports.createElement(f4e,{userId:l,users:s,Cursor:(I=c==null?void 0:c.Cursor)!=null?I:ESe})),h.exports.createElement(OSe,{camera:n.camera},o&&h.exports.createElement(TSe,{points:o,zoom:n.camera.zoom}),i&&h.exports.createElement(u4e,{snapLines:i}))))}var v4e=h.exports.memo(g4e),y4e=250,mn=class{constructor(){Bt(this,"pointer"),Bt(this,"keyboard"),Bt(this,"keys",{}),Bt(this,"isPinching",!1),Bt(this,"bounds",{minX:0,maxX:640,minY:0,maxY:480,width:640,height:480}),Bt(this,"pointerUpTime",0),Bt(this,"activePointer"),Bt(this,"panStart",e=>{var t,n;let{shiftKey:r,ctrlKey:i,metaKey:o,altKey:a}=e,s={target:"wheel",pointerId:((t=this.pointer)==null?void 0:t.pointerId)||0,origin:((n=this.pointer)==null?void 0:n.origin)||[0,0],delta:[0,0],pressure:.5,point:mn.getPoint(e,this.bounds),shiftKey:r,ctrlKey:i,metaKey:o,altKey:a,spaceKey:this.keys[" "]};return this.pointer=s,s}),Bt(this,"pan",(e,t)=>{if(!this.pointer||this.pointer.target!=="wheel")return this.panStart(t);let{shiftKey:n,ctrlKey:r,metaKey:i,altKey:o}=t,a=this.pointer,s=mn.getPoint(t,this.bounds),l=jo(Qe({},a),{target:"wheel",delta:e,point:s,shiftKey:n,ctrlKey:r,metaKey:i,altKey:o,spaceKey:this.keys[" "]});return this.pointer=l,l}),Bt(this,"keydown",e=>{var t,n;let{shiftKey:r,ctrlKey:i,metaKey:o,altKey:a}=e;return this.keys[e.key]=!0,{point:((t=this.pointer)==null?void 0:t.point)||[0,0],origin:((n=this.pointer)==null?void 0:n.origin)||[0,0],key:e.key,keys:Object.keys(this.keys),shiftKey:r,ctrlKey:i,metaKey:$.isDarwin()?o:i,altKey:a}}),Bt(this,"keyup",e=>{var t,n;let{shiftKey:r,ctrlKey:i,metaKey:o,altKey:a}=e;return delete this.keys[e.key],{point:((t=this.pointer)==null?void 0:t.point)||[0,0],origin:((n=this.pointer)==null?void 0:n.origin)||[0,0],key:e.key,keys:Object.keys(this.keys),shiftKey:r,ctrlKey:i,metaKey:$.isDarwin()?o:i,altKey:a}})}pointerIsValid(e){if("pointerId"in e&&this.activePointer&&this.activePointer!==e.pointerId)return!1;if("touches"in e){let t=e.changedTouches[0];if(this.activePointer&&this.activePointer!==t.identifier)return!1}return!0}touchStart(e,t){let{shiftKey:n,ctrlKey:r,metaKey:i,altKey:o}=e,a=e.changedTouches[0];this.activePointer=a.identifier;let s={target:t,pointerId:a.identifier,origin:mn.getPoint(a,this.bounds),delta:[0,0],point:mn.getPoint(a,this.bounds),pressure:mn.getPressure(a),shiftKey:n,ctrlKey:r,metaKey:$.isDarwin()?i:r,altKey:o,spaceKey:this.keys[" "]};return this.pointer=s,s}touchEnd(e,t){let{shiftKey:n,ctrlKey:r,metaKey:i,altKey:o}=e,a=e.changedTouches[0],s={target:t,pointerId:a.identifier,origin:mn.getPoint(a,this.bounds),delta:[0,0],point:mn.getPoint(a,this.bounds),pressure:mn.getPressure(a),shiftKey:n,ctrlKey:r,metaKey:$.isDarwin()?i:r,altKey:o,spaceKey:this.keys[" "]};return this.pointer=s,this.activePointer=void 0,s}touchMove(e,t){let{shiftKey:n,ctrlKey:r,metaKey:i,altKey:o}=e,a=e.changedTouches[0],s=this.pointer,l=mn.getPoint(a,this.bounds),c=s!=null&&s.point?O.sub(l,s.point):[0,0],u=jo(Qe({origin:l},s),{target:t,pointerId:a.identifier,point:l,delta:c,pressure:mn.getPressure(a),shiftKey:n,ctrlKey:r,metaKey:$.isDarwin()?i:r,altKey:o,spaceKey:this.keys[" "]});return this.pointer=u,u}pointerDown(e,t){let{shiftKey:n,ctrlKey:r,metaKey:i,altKey:o}=e,a=mn.getPoint(e,this.bounds);this.activePointer=e.pointerId;let s={target:t,pointerId:e.pointerId,origin:a,point:a,delta:[0,0],pressure:mn.getPressure(e),shiftKey:n,ctrlKey:r,metaKey:$.isDarwin()?i:r,altKey:o,spaceKey:this.keys[" "]};return this.pointer=s,s}pointerEnter(e,t){let{shiftKey:n,ctrlKey:r,metaKey:i,altKey:o}=e,a=mn.getPoint(e,this.bounds),s={target:t,pointerId:e.pointerId,origin:a,delta:[0,0],point:a,pressure:mn.getPressure(e),shiftKey:n,ctrlKey:r,metaKey:$.isDarwin()?i:r,altKey:o,spaceKey:this.keys[" "]};return this.pointer=s,s}pointerMove(e,t){let{shiftKey:n,ctrlKey:r,metaKey:i,altKey:o}=e,a=this.pointer,s=mn.getPoint(e,this.bounds),l=a!=null&&a.point?O.sub(s,a.point):[0,0],c=jo(Qe({origin:s},a),{target:t,pointerId:e.pointerId,point:s,delta:l,pressure:mn.getPressure(e),shiftKey:n,ctrlKey:r,metaKey:$.isDarwin()?i:r,altKey:o,spaceKey:this.keys[" "]});return this.pointer=c,c}pointerUp(e,t){let{shiftKey:n,ctrlKey:r,metaKey:i,altKey:o}=e,a=this.pointer,s=mn.getPoint(e,this.bounds),l=a!=null&&a.point?O.sub(s,a.point):[0,0];this.activePointer=void 0;let c=jo(Qe({origin:s},a),{target:t,pointerId:e.pointerId,point:s,delta:l,pressure:mn.getPressure(e),shiftKey:n,ctrlKey:r,metaKey:$.isDarwin()?i:r,altKey:o,spaceKey:this.keys[" "]});return this.pointer=c,this.pointerUpTime=performance.now(),c}isDoubleClick(){if(!this.pointer)return!1;let{origin:e,point:t}=this.pointer,n=performance.now()-this.pointerUpTime<y4e&&O.dist(e,t)<4;return n&&(this.activePointer=void 0),n}clear(){this.pointer=void 0}resetDoubleClick(){this.pointerUpTime=0}pinch(e,t){let{shiftKey:n,ctrlKey:r,metaKey:i,altKey:o}=this.keys,a=O.sub(t,e),s={pointerId:0,target:"pinch",origin:t,delta:a,point:O.sub(O.toFixed(e),[this.bounds.minX,this.bounds.minY]),pressure:.5,shiftKey:n,ctrlKey:r,metaKey:$.isDarwin()?i:r,altKey:o,spaceKey:this.keys[" "]};return this.pointer=s,s}reset(){this.pointerUpTime=0,this.pointer=void 0,this.keyboard=void 0,this.activePointer=void 0,this.keys={}}static getPoint(e,t){return[+e.clientX.toFixed(2)-t.minX,+e.clientY.toFixed(2)-t.minY]}static getPressure(e){return"pressure"in e&&+e.pressure.toFixed(2)||.5}static commandKey(){return $.isDarwin()?"\u2318":"Ctrl"}};new mn;var b4e=Object.freeze({});function x4e(e){var t=e,{id:n="tl",shapeUtils:r,page:i,pageState:o,assets:a=b4e,users:s,userId:l,theme:c,meta:u,snapLines:d,eraseLine:f,grid:p,containerRef:m,performanceMode:g,components:y,hideHandles:v=!1,hideIndicators:b=!1,hideCloneHandles:x=!1,hideBindingHandles:w=!1,hideResizeHandles:E=!1,hideRotateHandles:C=!1,hideBounds:I=!1,hideGrid:T=!0,showDashedBrush:_=!1,hideCursors:P}=t,M=Zd(t,["id","shapeUtils","page","pageState","assets","users","userId","theme","meta","snapLines","eraseLine","grid","containerRef","performanceMode","components","hideHandles","hideIndicators","hideCloneHandles","hideBindingHandles","hideResizeHandles","hideRotateHandles","hideBounds","hideGrid","showDashedBrush","hideCursors"]);hSe(c,"#"+n);let D=h.exports.useRef(null),V=h.exports.useRef(o);h.exports.useEffect(()=>{V.current=o},[o]);let[B,L]=h.exports.useState(()=>({callbacks:M,shapeUtils:r,rSelectionBounds:D,rPageState:V,bounds:{minX:0,minY:0,maxX:1/0,maxY:1/0,width:1/0,height:1/0},inputs:new mn})),G=h.exports.useCallback(z=>{L(j=>jo(Qe({},j),{bounds:z}))},[]);return h.exports.createElement(F6.Provider,{value:B},h.exports.createElement(v4e,{id:n,page:i,pageState:o,assets:a,snapLines:d,eraseLine:f,grid:p,users:s,userId:l,externalContainerRef:m,hideBounds:I,hideIndicators:b,hideHandles:v,hideCloneHandles:x,hideBindingHandles:w,hideRotateHandle:C,hideResizeHandles:E,hideGrid:T,showDashedBrush:_,onBoundsChange:G,performanceMode:g,components:y,meta:u,hideCursors:P}))}var S4e=h.exports.memo(x4e),l1=h.exports.memo(h.exports.forwardRef(function(e,t){var n=e,{children:r,className:i=""}=n,o=Zd(n,["children","className"]);return h.exports.createElement("div",Qe({ref:t,className:`tl-positioned-div ${i}`,draggable:!1},o),h.exports.createElement("div",{className:"tl-inner-div"},r))})),o4=class{constructor(){Bt(this,"refMap",new Map),Bt(this,"boundsCache",new WeakMap),Bt(this,"showCloneHandles",!1),Bt(this,"hideBounds",!1),Bt(this,"isStateful",!1),Bt(this,"shouldRender",(e,t)=>!0),Bt(this,"getRef",e=>(this.refMap.has(e.id)||this.refMap.set(e.id,h.exports.createRef()),this.refMap.get(e.id))),Bt(this,"hitTestBounds",(e,t)=>{let n=this.getBounds(e),r=ti.getRotatedCorners(n,e.rotation);return r.every(i=>ti.pointInBounds(i,t))||Jz(r,t).length>0}),Bt(this,"getRotatedBounds",e=>ti.getBoundsFromPoints(ti.getRotatedCorners(this.getBounds(e),e.rotation)))}};Bt(o4,"Component",e=>h.exports.forwardRef(e)),Bt(o4,"Indicator",e=>e);/**
* String.prototype.replaceAll() polyfill
* https://gomakethings.com/how-to-replace-a-section-of-a-string-with-another-one-with-vanilla-js/
* @author Chris Ferdinandi
* @license MIT
*/function Ni(e){const t=h.exports.useRef(e);return h.exports.useEffect(()=>{t.current=e}),h.exports.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const bh=Boolean(globalThis==null?void 0:globalThis.document)?h.exports.useLayoutEffect:()=>{},w4e=Ix["useId".toString()]||(()=>{});let C4e=0;function Pa(e){const[t,n]=h.exports.useState(w4e());return bh(()=>{e||n(r=>r!=null?r:String(C4e++))},[e]),e||(t?`radix-${t}`:"")}let $5=0;function oj(){h.exports.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:cP()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:cP()),$5++,()=>{$5===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),$5--}},[])}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}function k4e(e,t){const[n,r]=h.exports.useState("ltr"),[i,o]=h.exports.useState(),a=h.exports.useRef(0);return h.exports.useEffect(()=>{if(t===void 0&&e!=null&&e.parentElement){const s=getComputedStyle(e.parentElement);o(s)}},[e,t]),h.exports.useEffect(()=>(t===void 0&&function s(){a.current=requestAnimationFrame(()=>{const l=i==null?void 0:i.direction;l&&r(l),s()})}(),()=>cancelAnimationFrame(a.current)),[i,t,r]),t||n}function b2({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=function({defaultProp:l,onChange:c}){const u=h.exports.useState(l),[d]=u,f=h.exports.useRef(d),p=Ni(c);return h.exports.useEffect(()=>{f.current!==d&&(p(d),f.current=d)},[d,f,p]),u}({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Ni(n);return[a,h.exports.useCallback(l=>{if(o){const c=l,u=typeof l=="function"?c(e):l;u!==e&&s(u)}else i(l)},[o,e,i,s])]}function x2(...e){return t=>e.forEach(n=>function(r,i){typeof r=="function"?r(i):r!=null&&(r.current=i)}(n,t))}function un(...e){return h.exports.useCallback(x2(...e),e)}const xh=h.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return h.exports.Children.toArray(n).some(uP)?h.exports.createElement(h.exports.Fragment,null,h.exports.Children.map(n,i=>uP(i)?h.exports.createElement(a4,J({},r,{ref:t}),i.props.children):i)):h.exports.createElement(a4,J({},r,{ref:t}),n)});xh.displayName="Slot";const a4=h.exports.forwardRef((e,t)=>{const{children:n,...r}=e;return h.exports.isValidElement(n)?h.exports.cloneElement(n,{...E4e(r,n.props),ref:x2(t,n.ref)}):h.exports.Children.count(n)>1?h.exports.Children.only(null):null});a4.displayName="SlotClone";const N6=({children:e})=>h.exports.createElement(h.exports.Fragment,null,e);function uP(e){return h.exports.isValidElement(e)&&e.type===N6}function E4e(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?n[r]=(...a)=>{o==null||o(...a),i==null||i(...a)}:r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const rn=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>({...e,[t]:h.exports.forwardRef((n,r)=>{const{asChild:i,...o}=n,a=i?xh:t;return h.exports.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),h.exports.createElement(a,J({},o,{ref:r}))})}),{});function aj(e,t){const n=h.exports.createContext(t);function r(i){const{children:o,...a}=i,s=h.exports.useMemo(()=>a,Object.values(a));return h.exports.createElement(n.Provider,{value:s},o)}return r.displayName=e+"Provider",[r,function(i){const o=h.exports.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}]}function ko(e,t=[]){let n=[];const r=()=>{const i=n.map(o=>h.exports.createContext(o));return function(o){const a=(o==null?void 0:o[e])||i;return h.exports.useMemo(()=>({[`__scope${e}`]:{...o,[e]:a}}),[o,a])}};return r.scopeName=e,[function(i,o){const a=h.exports.createContext(o),s=n.length;function l(c){const{scope:u,children:d,...f}=c,p=(u==null?void 0:u[e][s])||a,m=h.exports.useMemo(()=>f,Object.values(f));return h.exports.createElement(p.Provider,{value:m},d)}return n=[...n,o],l.displayName=i+"Provider",[l,function(c,u){const d=(u==null?void 0:u[e][s])||a,f=h.exports.useContext(d);if(f)return f;if(o!==void 0)return o;throw new Error(`\`${c}\` must be used within \`${i}\``)}]},I4e(r,...t)]}function I4e(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(i){const o=r.reduce((a,{useScope:s,scopeName:l})=>({...a,...s(i)[`__scope${l}`]}),{});return h.exports.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}function sj(e){const t=e+"CollectionProvider",[n,r]=ko(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=f=>{const{scope:p,children:m}=f,g=A.useRef(null),y=A.useRef(new Map).current;return A.createElement(i,{scope:p,itemMap:y,collectionRef:g},m)},s=e+"CollectionSlot",l=A.forwardRef((f,p)=>{const{scope:m,children:g}=f,y=o(s,m),v=un(p,y.collectionRef);return A.createElement(xh,{ref:v},g)}),c=e+"CollectionItemSlot",u="data-radix-collection-item";return[{Provider:a,Slot:l,ItemSlot:A.forwardRef((f,p)=>{const{scope:m,children:g,...y}=f,v=A.useRef(null),b=un(p,v),x=o(c,m);return A.useEffect(()=>(x.itemMap.set(v,{ref:v,...y}),()=>{x.itemMap.delete(v)})),A.createElement(xh,{[u]:"",ref:b},g)})},function(f){const p=o(e+"CollectionConsumer",f);return A.useCallback(()=>{const m=p.collectionRef.current;if(!m)return[];const g=Array.from(m.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((y,v)=>g.indexOf(y.ref.current)-g.indexOf(v.ref.current))},[p.collectionRef,p.itemMap])},r]}function Ee(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}const T4e={bubbles:!1,cancelable:!0},[s4,lj,_4e]=sj("RovingFocusGroup"),[P4e,S2]=ko("RovingFocusGroup",[_4e]),[O4e,M4e]=P4e("RovingFocusGroup"),R4e=h.exports.forwardRef((e,t)=>h.exports.createElement(s4.Provider,{scope:e.__scopeRovingFocusGroup},h.exports.createElement(s4.Slot,{scope:e.__scopeRovingFocusGroup},h.exports.createElement(D4e,J({},e,{ref:t}))))),D4e=h.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,dir:i="ltr",loop:o=!1,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:c,...u}=e,d=h.exports.useRef(null),f=un(t,d),[p=null,m]=b2({prop:a,defaultProp:s,onChange:l}),[g,y]=h.exports.useState(!1),v=Ni(c),b=lj(n),x=h.exports.useRef(!1);return h.exports.useEffect(()=>{const w=d.current;if(w)return w.addEventListener("rovingFocusGroup.onEntryFocus",v),()=>w.removeEventListener("rovingFocusGroup.onEntryFocus",v)},[v]),h.exports.createElement(O4e,{scope:n,orientation:r,dir:i,loop:o,currentTabStopId:p,onItemFocus:h.exports.useCallback(w=>m(w),[m]),onItemShiftTab:h.exports.useCallback(()=>y(!0),[])},h.exports.createElement(rn.div,J({tabIndex:g?-1:0,"data-orientation":r},u,{ref:f,style:{outline:"none",...e.style},onMouseDown:Ee(e.onMouseDown,()=>{x.current=!0}),onFocus:Ee(e.onFocus,w=>{const E=!x.current;if(w.target===w.currentTarget&&E&&!g){const C=new Event("rovingFocusGroup.onEntryFocus",T4e);if(w.currentTarget.dispatchEvent(C),!C.defaultPrevented){const I=b().filter(T=>T.focusable);cj([I.find(T=>T.active),I.find(T=>T.id===p),...I].filter(Boolean).map(T=>T.ref.current))}}x.current=!1}),onBlur:Ee(e.onBlur,()=>y(!1))})))}),A4e=h.exports.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,...o}=e,a=Pa(),s=M4e("RovingFocusGroupItem",n),l=s.currentTabStopId===a,c=lj(n);return h.exports.createElement(s4.ItemSlot,{scope:n,id:a,focusable:r,active:i},h.exports.createElement(rn.span,J({tabIndex:l?0:-1,"data-orientation":s.orientation},o,{ref:t,onMouseDown:Ee(e.onMouseDown,u=>{r?s.onItemFocus(a):u.preventDefault()}),onFocus:Ee(e.onFocus,()=>s.onItemFocus(a)),onKeyDown:Ee(e.onKeyDown,u=>{if(u.key==="Tab"&&u.shiftKey)return void s.onItemShiftTab();if(u.target!==u.currentTarget)return;const d=function(m,g,y){const v=function(b,x){return x!=="rtl"?b:b==="ArrowLeft"?"ArrowRight":b==="ArrowRight"?"ArrowLeft":b}(m.key,y);return g==="vertical"&&["ArrowLeft","ArrowRight"].includes(v)||g==="horizontal"&&["ArrowUp","ArrowDown"].includes(v)?void 0:L4e[v]}(u,s.orientation,s.dir);if(d!==void 0){u.preventDefault();let m=c().filter(g=>g.focusable).map(g=>g.ref.current);if(d==="last")m.reverse();else if(d==="prev"||d==="next"){d==="prev"&&m.reverse();const g=m.indexOf(u.currentTarget);m=s.loop?(p=g+1,(f=m).map((y,v)=>f[(p+v)%f.length])):m.slice(g+1)}setTimeout(()=>cj(m))}var f,p})})))}),L4e={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cj(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}const B4e=R4e,uj=A4e,dj=h.exports.forwardRef((e,t)=>{var n,r;const{containerRef:i,style:o,...a}=e,s=(n=i==null?void 0:i.current)!==null&&n!==void 0?n:globalThis==null||(r=globalThis.document)===null||r===void 0?void 0:r.body,[,l]=h.exports.useState({});return bh(()=>{l({})},[]),s?MF.createPortal(h.exports.createElement(rn.div,J({"data-radix-portal":""},a,{ref:t,style:s===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...o}:void 0})),s):null}),$4e=h.exports.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?MF.createPortal(h.exports.createElement(rn.div,J({},i,{ref:t})),r):null}),F4e=h.exports.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return h.exports.createElement(rn.svg,J({},o,{ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:h.exports.createElement("polygon",{points:"0,0 30,0 15,10"}))}),N4e=F4e;function l4(e){const[t,n]=h.exports.useState(void 0);return h.exports.useEffect(()=>{if(e){const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,s=c.blockSize}else{const l=e.getBoundingClientRect();a=l.width,s=l.height}n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}n(void 0)},[e]),t}function z4e(e,t){const n=_l.get(e);return n===void 0?(_l.set(e,{rect:{},callbacks:[t]}),_l.size===1&&(c4=requestAnimationFrame(fj))):(n.callbacks.push(t),t(e.getBoundingClientRect())),()=>{const r=_l.get(e);if(r===void 0)return;const i=r.callbacks.indexOf(t);i>-1&&r.callbacks.splice(i,1),r.callbacks.length===0&&(_l.delete(e),_l.size===0&&cancelAnimationFrame(c4))}}let c4;const _l=new Map;function fj(){const e=[];_l.forEach((t,n)=>{const r=n.getBoundingClientRect();var i,o;i=t.rect,o=r,(i.width!==o.width||i.height!==o.height||i.top!==o.top||i.right!==o.right||i.bottom!==o.bottom||i.left!==o.left)&&(t.rect=r,e.push(t))}),e.forEach(t=>{t.callbacks.forEach(n=>n(t.rect))}),c4=requestAnimationFrame(fj)}function pj(e){const[t,n]=h.exports.useState();return h.exports.useEffect(()=>{if(e){const r=z4e(e,n);return()=>{n(void 0),r()}}},[e]),t}function j4e({anchorRect:e,popperSize:t,arrowSize:n,arrowOffset:r=0,side:i,sideOffset:o=0,align:a,alignOffset:s=0,shouldAvoidCollisions:l=!0,collisionBoundariesRect:c,collisionTolerance:u=0}){if(!e||!t||!c)return{popperStyles:H4e,arrowStyles:F5};const d=function(I,T,_=0,P=0,M){const D=M?M.height:0,V=dP(T,I,"x"),B=dP(T,I,"y"),L=B.before-_-D,G=B.after+_+D,z=V.before-_-D,j=V.after+_+D;return{top:{start:{x:V.start+P,y:L},center:{x:V.center,y:L},end:{x:V.end-P,y:L}},right:{start:{x:j,y:B.start+P},center:{x:j,y:B.center},end:{x:j,y:B.end-P}},bottom:{start:{x:V.start+P,y:G},center:{x:V.center,y:G},end:{x:V.end-P,y:G}},left:{start:{x:z,y:B.start+P},center:{x:z,y:B.center},end:{x:z,y:B.end-P}}}}(t,e,o,s,n),f=d[i][a];if(l===!1){const I=fP(f);let T=F5;return n&&(T=hP({popperSize:t,arrowSize:n,arrowOffset:r,side:i,align:a})),{popperStyles:{...I,"--radix-popper-transform-origin":pP(t,i,a,r,n)},arrowStyles:T,placedSide:i,placedAlign:a}}const p=DOMRect.fromRect({...t,...f}),m=(g=c,y=u,DOMRect.fromRect({width:g.width-2*y,height:g.height-2*y,x:g.left+y,y:g.top+y}));var g,y;const v=gP(p,m),b=d[mP(i)][a],x=function(I,T,_){const P=mP(I);return T[I]&&!_[P]?P:I}(i,v,gP(DOMRect.fromRect({...t,...b}),m)),w=function(I,T,_,P,M){const D=_==="top"||_==="bottom",V=D?"left":"top",B=D?"right":"bottom",L=D?"width":"height",G=T[L]>I[L];return(P==="start"||P==="center")&&(M[V]&&G||M[B]&&!G)?"end":(P==="end"||P==="center")&&(M[B]&&G||M[V]&&!G)?"start":P}(t,e,i,a,v),E=fP(d[x][w]);let C=F5;return n&&(C=hP({popperSize:t,arrowSize:n,arrowOffset:r,side:x,align:w})),{popperStyles:{...E,"--radix-popper-transform-origin":pP(t,x,w,r,n)},arrowStyles:C,placedSide:x,placedAlign:w}}function dP(e,t,n){const r=e[n==="x"?"left":"top"],i=n==="x"?"width":"height",o=e[i],a=t[i];return{before:r-a,start:r,center:r+(o-a)/2,end:r+o-a,after:r+o}}function fP(e){return{position:"absolute",top:0,left:0,minWidth:"max-content",willChange:"transform",transform:`translate3d(${Math.round(e.x+window.scrollX)}px, ${Math.round(e.y+window.scrollY)}px, 0)`}}function pP(e,t,n,r,i){const o=t==="top"||t==="bottom",a=i?i.width:0,s=i?i.height:0,l=a/2+r;let c="",u="";return o?(c={start:`${l}px`,center:"center",end:e.width-l+"px"}[n],u=t==="top"?`${e.height+s}px`:-s+"px"):(c=t==="left"?`${e.width+s}px`:-s+"px",u={start:`${l}px`,center:"center",end:e.height-l+"px"}[n]),`${c} ${u}`}const H4e={position:"fixed",top:0,left:0,opacity:0,transform:"translate3d(0, -200%, 0)"},F5={position:"absolute",opacity:0};function hP({popperSize:e,arrowSize:t,arrowOffset:n,side:r,align:i}){const o=(e.width-t.width)/2,a=(e.height-t.width)/2,s={top:0,right:90,bottom:180,left:-90}[r],l=Math.max(t.width,t.height),c={width:`${l}px`,height:`${l}px`,transform:`rotate(${s}deg)`,willChange:"transform",position:"absolute",[r]:"100%",direction:V4e(r,i)};return r!=="top"&&r!=="bottom"||(i==="start"&&(c.left=`${n}px`),i==="center"&&(c.left=`${o}px`),i==="end"&&(c.right=`${n}px`)),r!=="left"&&r!=="right"||(i==="start"&&(c.top=`${n}px`),i==="center"&&(c.top=`${a}px`),i==="end"&&(c.bottom=`${n}px`)),c}function V4e(e,t){return(e!=="top"&&e!=="right"||t!=="end")&&(e!=="bottom"&&e!=="left"||t==="end")?"ltr":"rtl"}function mP(e){return{top:"bottom",right:"left",bottom:"top",left:"right"}[e]}function gP(e,t){return{top:e.top<t.top,right:e.right>t.right,bottom:e.bottom>t.bottom,left:e.left<t.left}}const[hj,w2]=ko("Popper"),[W4e,mj]=hj("Popper"),U4e=e=>{const{__scopePopper:t,children:n}=e,[r,i]=h.exports.useState(null);return h.exports.createElement(W4e,{scope:t,anchor:r,onAnchorChange:i},n)},G4e=h.exports.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=mj("PopperAnchor",n),a=h.exports.useRef(null),s=un(t,a);return h.exports.useEffect(()=>{o.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:h.exports.createElement(rn.div,J({},i,{ref:s}))}),[K4e,q4e]=hj("PopperContent"),Y4e=h.exports.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i,align:o="center",alignOffset:a,collisionTolerance:s,avoidCollisions:l=!0,...c}=e,u=mj("PopperContent",n),[d,f]=h.exports.useState(),p=pj(u.anchor),[m,g]=h.exports.useState(null),y=l4(m),[v,b]=h.exports.useState(null),x=l4(v),w=un(t,D=>g(D)),E=function(){const[D,V]=h.exports.useState(void 0);return h.exports.useEffect(()=>{let B;function L(){V({width:window.innerWidth,height:window.innerHeight})}function G(){window.clearTimeout(B),B=window.setTimeout(L,100)}return L(),window.addEventListener("resize",G),()=>window.removeEventListener("resize",G)},[]),D}(),C=E?DOMRect.fromRect({...E,x:0,y:0}):void 0,{popperStyles:I,arrowStyles:T,placedSide:_,placedAlign:P}=j4e({anchorRect:p,popperSize:y,arrowSize:x,arrowOffset:d,side:r,sideOffset:i,align:o,alignOffset:a,shouldAvoidCollisions:l,collisionBoundariesRect:C,collisionTolerance:s}),M=_!==void 0;return h.exports.createElement("div",{style:I,"data-radix-popper-content-wrapper":""},h.exports.createElement(K4e,{scope:n,arrowStyles:T,onArrowChange:b,onArrowOffsetChange:f},h.exports.createElement(rn.div,J({"data-side":_,"data-align":P},c,{style:{...c.style,animation:M?void 0:"none"},ref:w}))))}),X4e=h.exports.forwardRef(function(e,t){const{__scopePopper:n,offset:r,...i}=e,o=q4e("PopperArrow",n),{onArrowOffsetChange:a}=o;return h.exports.useEffect(()=>a(r),[a,r]),h.exports.createElement("span",{style:{...o.arrowStyles,pointerEvents:"none"}},h.exports.createElement("span",{ref:o.onArrowChange,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},h.exports.createElement(N4e,J({},i,{ref:t,style:{...i.style,display:"block"}}))))}),z6=U4e,gj=G4e,vj=Y4e,yj=X4e,cl=e=>{const{present:t,children:n}=e,r=function(a){const[s,l]=h.exports.useState(),c=h.exports.useRef({}),u=h.exports.useRef(a),d=h.exports.useRef("none"),f=a?"mounted":"unmounted",[p,m]=function(g,y){return h.exports.useReducer((v,b)=>{const x=y[v][b];return x!=null?x:v},g)}(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.exports.useEffect(()=>{const g=Em(c.current);d.current=p==="mounted"?g:"none"},[p]),bh(()=>{const g=c.current,y=u.current;if(y!==a){const v=d.current,b=Em(g);a?m("MOUNT"):b==="none"||(g==null?void 0:g.display)==="none"?m("UNMOUNT"):m(y&&v!==b?"ANIMATION_OUT":"UNMOUNT"),u.current=a}},[a,m]),bh(()=>{if(s){const g=v=>{const b=Em(c.current).includes(v.animationName);v.target===s&&b&&m("ANIMATION_END")},y=v=>{v.target===s&&(d.current=Em(c.current))};return s.addEventListener("animationstart",y),s.addEventListener("animationcancel",g),s.addEventListener("animationend",g),()=>{s.removeEventListener("animationstart",y),s.removeEventListener("animationcancel",g),s.removeEventListener("animationend",g)}}m("ANIMATION_END")},[s,m]),{isPresent:["mounted","unmountSuspended"].includes(p),ref:h.exports.useCallback(g=>{g&&(c.current=getComputedStyle(g)),l(g)},[])}}(t),i=typeof n=="function"?n({present:r.isPresent}):h.exports.Children.only(n),o=un(r.ref,i.ref);return typeof n=="function"||r.isPresent?h.exports.cloneElement(i,{ref:o}):null};function Em(e){return(e==null?void 0:e.animationName)||"none"}cl.displayName="Presence";const vP={bubbles:!1,cancelable:!0},bj=h.exports.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=h.exports.useState(null),c=Ni(i),u=Ni(o),d=h.exports.useRef(null),f=un(t,g=>l(g)),p=h.exports.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.exports.useEffect(()=>{if(r){let v=function(x){if(p.paused||!s)return;const w=x.target;s.contains(w)?d.current=w:Sl(d.current,{select:!0})},b=function(x){!p.paused&&s&&(s.contains(x.relatedTarget)||Sl(d.current,{select:!0}))};var g=v,y=b;return document.addEventListener("focusin",v),document.addEventListener("focusout",b),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b)}}},[r,s,p.paused]),h.exports.useEffect(()=>{if(s){xP.add(p);const y=document.activeElement;if(!s.contains(y)){const v=new Event("focusScope.autoFocusOnMount",vP);s.addEventListener("focusScope.autoFocusOnMount",c),s.dispatchEvent(v),v.defaultPrevented||(function(b,{select:x=!1}={}){const w=document.activeElement;for(const E of b)if(Sl(E,{select:x}),document.activeElement!==w)return}((g=yP(s),g.filter(b=>b.tagName!=="A")),{select:!0}),document.activeElement===y&&Sl(s))}return()=>{s.removeEventListener("focusScope.autoFocusOnMount",c),setTimeout(()=>{const v=new Event("focusScope.autoFocusOnUnmount",vP);s.addEventListener("focusScope.autoFocusOnUnmount",u),s.dispatchEvent(v),v.defaultPrevented||Sl(y!=null?y:document.body,{select:!0}),s.removeEventListener("focusScope.autoFocusOnUnmount",u),xP.remove(p)},0)}}var g},[s,c,u,p]);const m=h.exports.useCallback(g=>{if(!n&&!r||p.paused)return;const y=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(y&&v){const b=g.currentTarget,[x,w]=function(E){const C=yP(E),I=bP(C,E),T=bP(C.reverse(),E);return[I,T]}(b);x&&w?g.shiftKey||v!==w?g.shiftKey&&v===x&&(g.preventDefault(),n&&Sl(w,{select:!0})):(g.preventDefault(),n&&Sl(x,{select:!0})):v===b&&g.preventDefault()}},[n,r,p.paused]);return h.exports.createElement(rn.div,J({tabIndex:-1},a,{ref:f,onKeyDown:m}))});function yP(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function bP(e,t){for(const n of e)if(!Z4e(n,{upTo:t}))return n}function Z4e(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 Sl(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(r){return r instanceof HTMLInputElement&&"select"in r}(e)&&t&&e.select()}}const xP=function(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=SP(e,t),e.unshift(t)},remove(t){var n;e=SP(e,t),(n=e[0])===null||n===void 0||n.resume()}}}();function SP(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function xj(e){const t=Ni(e);h.exports.useEffect(()=>{const n=r=>{r.key==="Escape"&&t(r)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t])}let wP,Im=0;function Q4e({disabled:e}){const t=h.exports.useRef(!1);bh(()=>{if(e){let i=function(){Im--,Im===0&&(document.body.style.pointerEvents=wP)},o=function(a){t.current=a.pointerType!=="mouse"};var n=i,r=o;return Im===0&&(wP=document.body.style.pointerEvents),document.body.style.pointerEvents="none",Im++,document.addEventListener("pointerup",o),()=>{t.current?document.addEventListener("click",i,{once:!0}):i(),document.removeEventListener("pointerup",o)}}},[e])}const J4e=h.exports.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sj=h.exports.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...l}=e,c=h.exports.useContext(J4e),[u,d]=h.exports.useState(null),[,f]=h.exports.useState({}),p=un(t,C=>d(C)),m=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=m.indexOf(g),v=u?m.indexOf(u):-1,b=c.layersWithOutsidePointerEventsDisabled.size>0,x=v>=y,w=function(C){const I=Ni(C),T=h.exports.useRef(!1);return h.exports.useEffect(()=>{const _=M=>{M.target&&!T.current&&kP("dismissableLayer.pointerDownOutside",I,{originalEvent:M}),T.current=!1},P=window.setTimeout(()=>{document.addEventListener("pointerdown",_)},0);return()=>{window.clearTimeout(P),document.removeEventListener("pointerdown",_)}},[I]),{onPointerDownCapture:()=>T.current=!0}}(C=>{const I=C.target,T=[...c.branches].some(_=>_.contains(I));x&&!T&&(i==null||i(C),a==null||a(C),C.defaultPrevented||s==null||s())}),E=function(C){const I=Ni(C),T=h.exports.useRef(!1);return h.exports.useEffect(()=>{const _=P=>{P.target&&!T.current&&kP("dismissableLayer.focusOutside",I,{originalEvent:P})};return document.addEventListener("focusin",_),()=>document.removeEventListener("focusin",_)},[I]),{onFocusCapture:()=>T.current=!0,onBlurCapture:()=>T.current=!1}}(C=>{const I=C.target;[...c.branches].some(T=>T.contains(I))||(o==null||o(C),a==null||a(C),C.defaultPrevented||s==null||s())});return xj(C=>{v===c.layers.size-1&&(r==null||r(C),C.defaultPrevented||s==null||s())}),Q4e({disabled:n}),h.exports.useEffect(()=>{u&&(n&&c.layersWithOutsidePointerEventsDisabled.add(u),c.layers.add(u),CP())},[u,n,c]),h.exports.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),CP())},[u,c]),h.exports.useEffect(()=>{const C=()=>f({});return document.addEventListener("dismissableLayer.update",C),()=>document.removeEventListener("dismissableLayer.update",C)},[]),h.exports.createElement(rn.div,J({},l,{ref:p,style:{pointerEvents:b?x?"auto":"none":void 0,...e.style},onFocusCapture:Ee(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Ee(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Ee(e.onPointerDownCapture,w.onPointerDownCapture)}))});function CP(){const e=new Event("dismissableLayer.update");document.dispatchEvent(e)}function kP(e,t,n){const r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});return t&&r.addEventListener(e,t,{once:!0}),!r.dispatchEvent(i)}const u4=["Enter"," "],wj=["ArrowUp","PageDown","End"],ewe=["ArrowDown","PageUp","Home",...wj],twe={ltr:[...u4,"ArrowRight"],rtl:[...u4,"ArrowLeft"]},nwe={ltr:["ArrowLeft"],rtl:["ArrowRight"]},[d4,rwe,iwe]=sj("Menu"),[C2,k2]=ko("Menu",[iwe,w2,S2]),c1=w2(),Cj=S2(),[kj,Ga]=C2("Menu"),owe=e=>{const{__scopeMenu:t,open:n=!1,children:r,onOpenChange:i,modal:o=!0}=e,a=c1(t),[s,l]=h.exports.useState(null),c=h.exports.useRef(!1),u=Ni(i),d=k4e(s,e.dir);return h.exports.useEffect(()=>{const f=()=>{c.current=!0,document.addEventListener("pointerdown",p,{capture:!0,once:!0}),document.addEventListener("pointermove",p,{capture:!0,once:!0})},p=()=>c.current=!1;return document.addEventListener("keydown",f,{capture:!0}),()=>{document.removeEventListener("keydown",f,{capture:!0}),document.removeEventListener("pointerdown",p,{capture:!0}),document.removeEventListener("pointermove",p,{capture:!0})}},[]),h.exports.createElement(z6,a,h.exports.createElement(kj,{scope:t,isSubmenu:!1,isUsingKeyboardRef:c,dir:d,open:n,onOpenChange:u,content:s,onContentChange:l,onRootClose:h.exports.useCallback(()=>u(!1),[u]),modal:o},r))},awe=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,o=Ga("MenuSub",t),a=c1(t),[s,l]=h.exports.useState(null),[c,u]=h.exports.useState(null),d=Ni(i);return h.exports.useEffect(()=>(o.open===!1&&d(!1),()=>d(!1)),[o.open,d]),h.exports.createElement(z6,a,h.exports.createElement(kj,{scope:t,isSubmenu:!0,isUsingKeyboardRef:o.isUsingKeyboardRef,dir:o.dir,open:r,onOpenChange:d,content:c,onContentChange:u,onRootClose:o.onRootClose,contentId:Pa(),trigger:s,onTriggerChange:l,triggerId:Pa(),modal:!1},n))},Ej=h.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=c1(n);return h.exports.createElement(gj,J({},i,r,{ref:t}))}),[swe,j6]=C2("MenuContent"),lwe=h.exports.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Ga("MenuContent",e.__scopeMenu);return h.exports.createElement(d4.Provider,{scope:e.__scopeMenu},h.exports.createElement(cl,{present:n||i.open},h.exports.createElement(d4.Slot,{scope:e.__scopeMenu},i.isSubmenu?h.exports.createElement(fwe,J({},r,{ref:t})):h.exports.createElement(cwe,J({},r,{ref:t})))))}),cwe=h.exports.forwardRef((e,t)=>Ga("MenuContent",e.__scopeMenu).modal?h.exports.createElement(uwe,J({},e,{ref:t})):h.exports.createElement(dwe,J({},e,{ref:t}))),uwe=h.exports.forwardRef((e,t)=>{const n=Ga("MenuContent",e.__scopeMenu),r=h.exports.useRef(null),i=un(t,r);return h.exports.useEffect(()=>{const o=r.current;if(o)return qC(o)},[]),h.exports.createElement(H6,J({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ee(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))}),dwe=h.exports.forwardRef((e,t)=>{const n=Ga("MenuContent",e.__scopeMenu);return h.exports.createElement(H6,J({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))}),fwe=h.exports.forwardRef((e,t)=>{const n=Ga("MenuContent",e.__scopeMenu),r=h.exports.useRef(null),i=un(t,r);return n.isSubmenu?h.exports.createElement(H6,J({id:n.contentId,"aria-labelledby":n.triggerId},e,{ref:i,align:"start",side:n.dir==="rtl"?"left":"right",portalled:!0,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:o=>{var a;n.isUsingKeyboardRef.current&&((a=r.current)===null||a===void 0||a.focus()),o.preventDefault()},onCloseAutoFocus:o=>o.preventDefault(),onFocusOutside:Ee(e.onFocusOutside,o=>{o.target!==n.trigger&&n.onOpenChange(!1)}),onEscapeKeyDown:Ee(e.onEscapeKeyDown,n.onRootClose),onKeyDown:Ee(e.onKeyDown,o=>{const a=o.currentTarget.contains(o.target),s=nwe[n.dir].includes(o.key);var l;a&&s&&(n.onOpenChange(!1),(l=n.trigger)===null||l===void 0||l.focus(),o.preventDefault())})})):null}),H6=h.exports.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,onDismiss:f,disableOutsideScroll:p,allowPinchZoom:m,portalled:g,...y}=e,v=Ga("MenuContent",n),b=c1(n),x=Cj(n),w=rwe(n),[E,C]=h.exports.useState(null),I=h.exports.useRef(null),T=un(t,I,v.onContentChange),_=h.exports.useRef(0),P=h.exports.useRef(""),M=h.exports.useRef(0),D=h.exports.useRef(null),V=h.exports.useRef("right"),B=h.exports.useRef(0),L=g?dj:h.exports.Fragment,G=p?a6:h.exports.Fragment,z=p?{allowPinchZoom:m}:void 0,j=H=>{var R,W;const X=P.current+H,te=w().filter(le=>!le.disabled),re=document.activeElement,ne=(R=te.find(le=>le.ref.current===re))===null||R===void 0?void 0:R.textValue,ie=function(le,he,Se){const pe=he.length>1&&Array.from(he).every(Mr=>Mr===he[0])?he[0]:he,st=Se?le.indexOf(Se):-1;let Ot=(In=le,Wi=Math.max(st,0),In.map((Mr,Rr)=>In[(Wi+Rr)%In.length]));var In,Wi;pe.length===1&&(Ot=Ot.filter(Mr=>Mr!==Se));const ua=Ot.find(Mr=>Mr.toLowerCase().startsWith(pe.toLowerCase()));return ua!==Se?ua:void 0}(te.map(le=>le.textValue),X,ne),ae=(W=te.find(le=>le.textValue===ie))===null||W===void 0?void 0:W.ref.current;(function le(he){P.current=he,window.clearTimeout(_.current),he!==""&&(_.current=window.setTimeout(()=>le(""),1e3))})(X),ae&&setTimeout(()=>ae.focus())};h.exports.useEffect(()=>()=>window.clearTimeout(_.current),[]),oj();const F=h.exports.useCallback(H=>{var R,W;return V.current===((R=D.current)===null||R===void 0?void 0:R.side)&&function(X,te){return te?function(re,ne){const{x:ie,y:ae}=re;let le=!1;for(let he=0,Se=ne.length-1;he<ne.length;Se=he++){const pe=ne[he].x,st=ne[he].y,Ot=ne[Se].x,In=ne[Se].y;st>ae!=In>ae&&ie<(Ot-pe)*(ae-st)/(In-st)+pe&&(le=!le)}return le}({x:X.clientX,y:X.clientY},te):!1}(H,(W=D.current)===null||W===void 0?void 0:W.area)},[]);return h.exports.createElement(L,null,h.exports.createElement(G,z,h.exports.createElement(swe,{scope:n,searchRef:P,onItemEnter:h.exports.useCallback(H=>{F(H)&&H.preventDefault()},[F]),onItemLeave:h.exports.useCallback(H=>{var R;F(H)||((R=I.current)===null||R===void 0||R.focus(),C(null))},[F]),onTriggerLeave:h.exports.useCallback(H=>{F(H)&&H.preventDefault()},[F]),pointerGraceTimerRef:M,onPointerGraceIntentChange:h.exports.useCallback(H=>{D.current=H},[])},h.exports.createElement(bj,{asChild:!0,trapped:i,onMountAutoFocus:Ee(o,H=>{var R;H.preventDefault(),(R=I.current)===null||R===void 0||R.focus()}),onUnmountAutoFocus:a},h.exports.createElement(Sj,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,onDismiss:f},h.exports.createElement(B4e,J({asChild:!0},x,{dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:C,onEntryFocus:H=>{v.isUsingKeyboardRef.current||H.preventDefault()}}),h.exports.createElement(vj,J({role:"menu","aria-orientation":"vertical","data-state":_j(v.open),dir:v.dir},b,y,{ref:T,style:{outline:"none",...y.style},onKeyDown:Ee(y.onKeyDown,H=>{const R=H.target,W=H.currentTarget.contains(R),X=H.ctrlKey||H.altKey||H.metaKey,te=H.key.length===1;W&&(H.key==="Tab"&&H.preventDefault(),!X&&te&&j(H.key));const re=I.current;if(H.target!==re||!ewe.includes(H.key))return;H.preventDefault();const ne=w().filter(ie=>!ie.disabled).map(ie=>ie.ref.current);wj.includes(H.key)&&ne.reverse(),function(ie){const ae=document.activeElement;for(const le of ie)if(le===ae||(le.focus(),document.activeElement!==ae))return}(ne)}),onBlur:Ee(e.onBlur,H=>{H.currentTarget.contains(H.target)||(window.clearTimeout(_.current),P.current="")}),onPointerMove:Ee(e.onPointerMove,Sh(H=>{const R=H.target,W=B.current!==H.clientX;if(H.currentTarget.contains(R)&&W){const X=H.clientX>B.current?"right":"left";V.current=X,B.current=H.clientX}}))}))))))))}),pwe=h.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.exports.createElement(rn.div,J({role:"group"},r,{ref:t}))}),V6=h.exports.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=h.exports.useRef(null),a=Ga("MenuItem",e.__scopeMenu),s=j6("MenuItem",e.__scopeMenu),l=un(t,o),c=h.exports.useRef(!1);return h.exports.createElement(Ij,J({},i,{ref:l,disabled:n,onClick:Ee(e.onClick,()=>{const u=o.current;if(!n&&u){const d=new Event("menu.itemSelect",{bubbles:!0,cancelable:!0});u.addEventListener("menu.itemSelect",f=>r==null?void 0:r(f),{once:!0}),u.dispatchEvent(d),d.defaultPrevented?c.current=!1:a.onRootClose()}}),onPointerDown:u=>{var d;(d=e.onPointerDown)===null||d===void 0||d.call(e,u),c.current=!0},onPointerUp:Ee(e.onPointerUp,u=>{var d;c.current||(d=u.currentTarget)===null||d===void 0||d.click()}),onKeyDown:Ee(e.onKeyDown,u=>{const d=s.searchRef.current!=="";n||d&&u.key===" "||u4.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})}))}),hwe=h.exports.forwardRef((e,t)=>{const n=Ga("MenuSubTrigger",e.__scopeMenu),r=j6("MenuSubTrigger",e.__scopeMenu),i=h.exports.useRef(null),{pointerGraceTimerRef:o,onPointerGraceIntentChange:a}=r,s={__scopeMenu:e.__scopeMenu},l=h.exports.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return h.exports.useEffect(()=>l,[l]),h.exports.useEffect(()=>{const c=o.current;return()=>{window.clearTimeout(c),a(null)}},[o,a]),n.isSubmenu?h.exports.createElement(Ej,J({asChild:!0},s),h.exports.createElement(Ij,J({id:n.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":_j(n.open)},e,{ref:x2(t,n.onTriggerChange),onClick:c=>{var u;(u=e.onClick)===null||u===void 0||u.call(e,c),e.disabled||c.defaultPrevented||(c.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ee(e.onPointerMove,Sh(c=>{r.onItemEnter(c),c.defaultPrevented||e.disabled||n.open||i.current||(r.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),l()},100))})),onPointerLeave:Ee(e.onPointerLeave,Sh(c=>{var u;l();const d=(u=n.content)===null||u===void 0?void 0:u.getBoundingClientRect();if(d){var f;const p=(f=n.content)===null||f===void 0?void 0:f.dataset.side,m=p==="right",g=m?-5:5,y=d[m?"left":"right"],v=d[m?"right":"left"];r.onPointerGraceIntentChange({area:[{x:c.clientX+g,y:c.clientY},{x:y,y:d.top},{x:v,y:d.top},{x:v,y:d.bottom},{x:y,y:d.bottom}],side:p}),window.clearTimeout(o.current),o.current=window.setTimeout(()=>r.onPointerGraceIntentChange(null),300)}else{if(r.onTriggerLeave(c),c.defaultPrevented)return;r.onPointerGraceIntentChange(null)}})),onKeyDown:Ee(e.onKeyDown,c=>{const u=r.searchRef.current!=="";var d;e.disabled||u&&c.key===" "||twe[n.dir].includes(c.key)&&(n.onOpenChange(!0),(d=n.content)===null||d===void 0||d.focus(),c.preventDefault())})}))):null}),Ij=h.exports.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=j6("MenuItem",n),s=Cj(n),l=h.exports.useRef(null),c=un(t,l),[u,d]=h.exports.useState("");return h.exports.useEffect(()=>{const f=l.current;var p;f&&d(((p=f.textContent)!==null&&p!==void 0?p:"").trim())},[o.children]),h.exports.createElement(d4.ItemSlot,{scope:n,disabled:r,textValue:i!=null?i:u},h.exports.createElement(uj,J({asChild:!0},s,{focusable:!r}),h.exports.createElement(rn.div,J({role:"menuitem","aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:c,onPointerMove:Ee(e.onPointerMove,Sh(f=>{r?a.onItemLeave(f):(a.onItemEnter(f),!f.defaultPrevented&&f.currentTarget.focus())})),onPointerLeave:Ee(e.onPointerLeave,Sh(f=>a.onItemLeave(f)))}))))}),mwe=h.exports.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return h.exports.createElement(Tj,{scope:e.__scopeMenu,checked:n},h.exports.createElement(V6,J({role:"menuitemcheckbox","aria-checked":n},i,{ref:t,"data-state":W6(n),onSelect:Ee(i.onSelect,()=>r==null?void 0:r(!n),{checkForDefaultPrevented:!1})})))}),[gwe,vwe]=C2("MenuRadioGroup",{value:void 0,onValueChange:()=>{}}),ywe=h.exports.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Ni(r);return h.exports.createElement(gwe,{scope:e.__scopeMenu,value:n,onValueChange:o},h.exports.createElement(pwe,J({},i,{ref:t})))}),bwe=h.exports.forwardRef((e,t)=>{const{value:n,...r}=e,i=vwe("MenuRadioItem",e.__scopeMenu),o=n===i.value;return h.exports.createElement(Tj,{scope:e.__scopeMenu,checked:o},h.exports.createElement(V6,J({role:"menuitemradio","aria-checked":o},r,{ref:t,"data-state":W6(o),onSelect:Ee(r.onSelect,()=>{var a;return(a=i.onValueChange)===null||a===void 0?void 0:a.call(i,n)},{checkForDefaultPrevented:!1})})))}),[Tj,xwe]=C2("MenuItemIndicator",{checked:!1}),Swe=h.exports.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=xwe("MenuItemIndicator",n);return h.exports.createElement(cl,{present:r||o.checked},h.exports.createElement(rn.span,J({},i,{ref:t,"data-state":W6(o.checked)})))}),wwe=h.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.exports.createElement(rn.div,J({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))}),Cwe=h.exports.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=c1(n);return h.exports.createElement(yj,J({},i,r,{ref:t}))});function _j(e){return e?"open":"closed"}function W6(e){return e?"checked":"unchecked"}function Sh(e){return t=>t.pointerType==="mouse"?e(t):void 0}const Pj=owe,Oj=awe,Mj=Ej,Rj=hwe,E2=lwe,Dj=V6,kwe=mwe,Ewe=ywe,Iwe=bwe,Twe=Swe,_we=wwe,Aj=Cwe,[Lj,$Fe]=ko("ContextMenu",[k2]),Mc=k2(),[EP,U6]=Lj("ContextMenu"),Pwe=e=>{const{__scopeContextMenu:t,children:n,onOpenChange:r,dir:i,modal:o=!0}=e,[a,s]=h.exports.useState(!1),l=Mwe("ContextMenu",t),c=Mc(t),u=Ni(r),d=h.exports.useCallback(f=>{s(f),u(f)},[u]);return l.isInsideContent?h.exports.createElement(EP,{scope:t,isRootMenu:!1,open:a,onOpenChange:d,modal:o},h.exports.createElement(Oj,J({},c,{open:a,onOpenChange:d}),n)):h.exports.createElement(EP,{scope:t,isRootMenu:!0,open:a,onOpenChange:d,modal:o},h.exports.createElement(Pj,J({},c,{dir:i,open:a,onOpenChange:d,modal:o}),n))},Owe=h.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=U6("ContextMenuTrigger",n),o=Mc(n),a=h.exports.useRef({x:0,y:0}),s=h.exports.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...a.current})}),l=h.exports.useRef(0),c=h.exports.useCallback(()=>window.clearTimeout(l.current),[]),u=d=>{a.current={x:d.clientX,y:d.clientY},i.onOpenChange(!0)};return h.exports.useEffect(()=>c,[c]),h.exports.createElement(Bj,{scope:n,isInsideContent:!1},h.exports.createElement(Mj,J({},o,{virtualRef:s})),h.exports.createElement(rn.span,J({},r,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:Ee(e.onContextMenu,d=>{c(),d.preventDefault(),u(d)}),onPointerDown:Ee(e.onPointerDown,Tm(d=>{c(),l.current=window.setTimeout(()=>u(d),700)})),onPointerMove:Ee(e.onPointerMove,Tm(c)),onPointerCancel:Ee(e.onPointerCancel,Tm(c)),onPointerUp:Ee(e.onPointerUp,Tm(c))})))}),[Bj,Mwe]=Lj("ContextMenuContent",{isInsideContent:!1}),Rwe=h.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=U6("ContextMenuContent",n),o=Mc(n),a={...r,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)"}};return h.exports.createElement(Bj,{scope:n,isInsideContent:!0},i.isRootMenu?h.exports.createElement(Dwe,J({__scopeContextMenu:n},a,{ref:t})):h.exports.createElement(E2,J({},o,a,{ref:t})))}),Dwe=h.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=U6("ContextMenuContent",n),o=Mc(n),a=h.exports.useRef(!1);return h.exports.createElement(E2,J({},o,r,{ref:t,portalled:!0,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:s=>{var l;(l=e.onCloseAutoFocus)===null||l===void 0||l.call(e,s),!s.defaultPrevented&&a.current&&s.preventDefault(),a.current=!1},onInteractOutside:s=>{var l;(l=e.onInteractOutside)===null||l===void 0||l.call(e,s),s.defaultPrevented||i.modal||(a.current=!0)}}))}),$j=h.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Mc(n);return h.exports.createElement(Dj,J({},i,r,{ref:t}))}),Awe=h.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Mc(n);return h.exports.createElement(Rj,J({},i,r,{ref:t}))}),Lwe=h.exports.forwardRef((e,t)=>{const{__scopeContextMenu:n,...r}=e,i=Mc(n);return h.exports.createElement(Aj,J({},i,r,{ref:t}))});function Tm(e){return t=>t.pointerType!=="mouse"?e(t):void 0}const I2=Pwe,Bwe=Owe,T2=Rwe;function Ne(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var $we=["color"],Fj=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,$we);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M9 3C9 2.44772 8.55229 2 8 2H7C6.44772 2 6 2.44772 6 3L6 14H1.5C1.22386 14 1 14.2239 1 14.5C1 14.7761 1.22386 15 1.5 15L6 15H9H13.5C13.7761 15 14 14.7761 14 14.5C14 14.2239 13.7761 14 13.5 14H9V3Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Fwe=["color"],Nj=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,Fwe);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M1.99988 6C1.44759 6 0.999877 6.44772 0.999877 7L0.999877 8C0.999877 8.55228 1.44759 9 1.99988 9L6.99988 9L6.99988 13.5C6.99988 13.7761 7.22374 14 7.49988 14C7.77602 14 7.99988 13.7761 7.99988 13.5L7.99988 9L12.9999 9C13.5522 9 13.9999 8.55228 13.9999 8L13.9999 7C13.9999 6.44772 13.5522 6 12.9999 6L7.99988 6L7.99988 1.5C7.99988 1.22386 7.77602 1 7.49988 1C7.22373 1 6.99988 1.22386 6.99988 1.5L6.99988 6L1.99988 6Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Nwe=["color"],zj=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,Nwe);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M6.99988 1C6.44759 1 5.99988 1.44772 5.99988 2V7H1.49988C1.22374 7 0.999878 7.22386 0.999878 7.5C0.999878 7.77614 1.22374 8 1.49988 8H5.99988V13C5.99988 13.5523 6.44759 14 6.99988 14H7.99988C8.55216 14 8.99988 13.5523 8.99988 13V8H13.4999C13.776 8 13.9999 7.77614 13.9999 7.5C13.9999 7.22386 13.776 7 13.4999 7H8.99988V2C8.99988 1.44772 8.55216 1 7.99988 1L6.99988 1Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),zwe=["color"],jj=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,zwe);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M0.499995 0.999995C0.223855 0.999995 -5.58458e-07 1.22385 -5.46388e-07 1.49999L-2.18554e-08 13.4999C-9.78492e-09 13.776 0.223855 13.9999 0.499995 13.9999C0.776136 13.9999 0.999991 13.776 0.999991 13.4999L0.999991 8.99993L12 8.99993C12.5523 8.99993 13 8.55222 13 7.99993L13 6.99994C13 6.44766 12.5523 5.99995 12 5.99995L0.999991 5.99995L0.999991 1.49999C0.999991 1.22385 0.776135 0.999995 0.499995 0.999995Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),jwe=["color"],Hj=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,jwe);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M14.4999 1C14.2237 1 13.9999 1.22386 13.9999 1.5L13.9999 6L2.99988 6C2.44759 6 1.99988 6.44772 1.99988 7L1.99988 8C1.99988 8.55228 2.44759 9 2.99988 9L13.9999 9L13.9999 13.5C13.9999 13.7761 14.2237 14 14.4999 14C14.776 14 14.9999 13.7761 14.9999 13.5L14.9999 9L14.9999 6L14.9999 1.5C14.9999 1.22386 14.776 1 14.4999 1Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Hwe=["color"],Vj=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,Hwe);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M1.5 0C1.22386 0 1 0.223858 1 0.5C1 0.776142 1.22386 1 1.5 1H6V12C6 12.5523 6.44772 13 7 13H8C8.55228 13 9 12.5523 9 12V1H13.5C13.7761 1 14 0.776142 14 0.5C14 0.223858 13.7761 0 13.5 0H9H6H1.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Vwe=["color"],Wwe=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,Vwe);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M8.8914 2.1937C9.1158 2.35464 9.16725 2.66701 9.00631 2.89141L2.47388 12H13.5C13.7761 12 14 12.2239 14 12.5C14 12.7762 13.7761 13 13.5 13H1.5C1.31254 13 1.14082 12.8952 1.0552 12.7284C0.969578 12.5616 0.984438 12.361 1.09369 12.2086L8.19369 2.30862C8.35462 2.08422 8.667 2.03277 8.8914 2.1937ZM11.1 6.50001C11.1 6.22387 11.3238 6.00001 11.6 6.00001C11.8761 6.00001 12.1 6.22387 12.1 6.50001C12.1 6.77615 11.8761 7.00001 11.6 7.00001C11.3238 7.00001 11.1 6.77615 11.1 6.50001ZM10.4 4.00001C10.1239 4.00001 9.90003 4.22387 9.90003 4.50001C9.90003 4.77615 10.1239 5.00001 10.4 5.00001C10.6762 5.00001 10.9 4.77615 10.9 4.50001C10.9 4.22387 10.6762 4.00001 10.4 4.00001ZM12.1 8.50001C12.1 8.22387 12.3238 8.00001 12.6 8.00001C12.8761 8.00001 13.1 8.22387 13.1 8.50001C13.1 8.77615 12.8761 9.00001 12.6 9.00001C12.3238 9.00001 12.1 8.77615 12.1 8.50001ZM13.4 10C13.1239 10 12.9 10.2239 12.9 10.5C12.9 10.7761 13.1239 11 13.4 11C13.6762 11 13.9 10.7761 13.9 10.5C13.9 10.2239 13.6762 10 13.4 10Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Uwe=["color"],Gwe=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,Uwe);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M7.5 2C7.77614 2 8 2.22386 8 2.5L8 11.2929L11.1464 8.14645C11.3417 7.95118 11.6583 7.95118 11.8536 8.14645C12.0488 8.34171 12.0488 8.65829 11.8536 8.85355L7.85355 12.8536C7.75979 12.9473 7.63261 13 7.5 13C7.36739 13 7.24021 12.9473 7.14645 12.8536L3.14645 8.85355C2.95118 8.65829 2.95118 8.34171 3.14645 8.14645C3.34171 7.95118 3.65829 7.95118 3.85355 8.14645L7 11.2929L7 2.5C7 2.22386 7.22386 2 7.5 2Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Kwe=["color"],qwe=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,Kwe);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M3.64645 11.3536C3.45118 11.1583 3.45118 10.8417 3.64645 10.6465L10.2929 4L6 4C5.72386 4 5.5 3.77614 5.5 3.5C5.5 3.22386 5.72386 3 6 3L11.5 3C11.6326 3 11.7598 3.05268 11.8536 3.14645C11.9473 3.24022 12 3.36739 12 3.5L12 9.00001C12 9.27615 11.7761 9.50001 11.5 9.50001C11.2239 9.50001 11 9.27615 11 9.00001V4.70711L4.35355 11.3536C4.15829 11.5488 3.84171 11.5488 3.64645 11.3536Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ywe=["color"],Xwe=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,Ywe);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M7.14645 2.14645C7.34171 1.95118 7.65829 1.95118 7.85355 2.14645L11.8536 6.14645C12.0488 6.34171 12.0488 6.65829 11.8536 6.85355C11.6583 7.04882 11.3417 7.04882 11.1464 6.85355L8 3.70711L8 12.5C8 12.7761 7.77614 13 7.5 13C7.22386 13 7 12.7761 7 12.5L7 3.70711L3.85355 6.85355C3.65829 7.04882 3.34171 7.04882 3.14645 6.85355C2.95118 6.65829 2.95118 6.34171 3.14645 6.14645L7.14645 2.14645Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Zwe=["color"],Qwe=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,Zwe);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M2.5 2H12.5C12.7761 2 13 2.22386 13 2.5V12.5C13 12.7761 12.7761 13 12.5 13H2.5C2.22386 13 2 12.7761 2 12.5V2.5C2 2.22386 2.22386 2 2.5 2ZM1 2.5C1 1.67157 1.67157 1 2.5 1H12.5C13.3284 1 14 1.67157 14 2.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V2.5ZM7.5 4C7.77614 4 8 3.77614 8 3.5C8 3.22386 7.77614 3 7.5 3C7.22386 3 7 3.22386 7 3.5C7 3.77614 7.22386 4 7.5 4ZM8 5.5C8 5.77614 7.77614 6 7.5 6C7.22386 6 7 5.77614 7 5.5C7 5.22386 7.22386 5 7.5 5C7.77614 5 8 5.22386 8 5.5ZM7.5 8C7.77614 8 8 7.77614 8 7.5C8 7.22386 7.77614 7 7.5 7C7.22386 7 7 7.22386 7 7.5C7 7.77614 7.22386 8 7.5 8ZM10 7.5C10 7.77614 9.77614 8 9.5 8C9.22386 8 9 7.77614 9 7.5C9 7.22386 9.22386 7 9.5 7C9.77614 7 10 7.22386 10 7.5ZM11.5 8C11.7761 8 12 7.77614 12 7.5C12 7.22386 11.7761 7 11.5 7C11.2239 7 11 7.22386 11 7.5C11 7.77614 11.2239 8 11.5 8Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Jwe=["color"],e9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,Jwe);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M12.5 2H2.5C2.22386 2 2 2.22386 2 2.5V12.5C2 12.7761 2.22386 13 2.5 13H12.5C12.7761 13 13 12.7761 13 12.5V2.5C13 2.22386 12.7761 2 12.5 2ZM2.5 1C1.67157 1 1 1.67157 1 2.5V12.5C1 13.3284 1.67157 14 2.5 14H12.5C13.3284 14 14 13.3284 14 12.5V2.5C14 1.67157 13.3284 1 12.5 1H2.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),t9e=["color"],Wj=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,t9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),n9e=["color"],r9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,n9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),i9e=["color"],o9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,i9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M1 9.50006C1 10.3285 1.67157 11.0001 2.5 11.0001H4L4 10.0001H2.5C2.22386 10.0001 2 9.7762 2 9.50006L2 2.50006C2 2.22392 2.22386 2.00006 2.5 2.00006L9.5 2.00006C9.77614 2.00006 10 2.22392 10 2.50006V4.00002H5.5C4.67158 4.00002 4 4.67159 4 5.50002V12.5C4 13.3284 4.67158 14 5.5 14H12.5C13.3284 14 14 13.3284 14 12.5V5.50002C14 4.67159 13.3284 4.00002 12.5 4.00002H11V2.50006C11 1.67163 10.3284 1.00006 9.5 1.00006H2.5C1.67157 1.00006 1 1.67163 1 2.50006V9.50006ZM5 5.50002C5 5.22388 5.22386 5.00002 5.5 5.00002H12.5C12.7761 5.00002 13 5.22388 13 5.50002V12.5C13 12.7762 12.7761 13 12.5 13H5.5C5.22386 13 5 12.7762 5 12.5V5.50002Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),a9e=["color"],f4=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,a9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),s9e=["color"],l9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,s9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M3.29227 0.048984C3.47033 -0.032338 3.67946 -0.00228214 3.8274 0.125891L12.8587 7.95026C13.0134 8.08432 13.0708 8.29916 13.0035 8.49251C12.9362 8.68586 12.7578 8.81866 12.5533 8.82768L9.21887 8.97474L11.1504 13.2187C11.2648 13.47 11.1538 13.7664 10.9026 13.8808L8.75024 14.8613C8.499 14.9758 8.20255 14.8649 8.08802 14.6137L6.15339 10.3703L3.86279 12.7855C3.72196 12.934 3.50487 12.9817 3.31479 12.9059C3.1247 12.8301 3 12.6461 3 12.4414V0.503792C3 0.308048 3.11422 0.130306 3.29227 0.048984ZM4 1.59852V11.1877L5.93799 9.14425C6.05238 9.02363 6.21924 8.96776 6.38319 8.99516C6.54715 9.02256 6.68677 9.12965 6.75573 9.2809L8.79056 13.7441L10.0332 13.178L8.00195 8.71497C7.93313 8.56376 7.94391 8.38824 8.03072 8.24659C8.11753 8.10494 8.26903 8.01566 8.435 8.00834L11.2549 7.88397L4 1.59852Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),c9e=["color"],u9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,c9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:r}))}),d9e=["color"],f9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,d9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M3.625 7.5C3.625 8.12132 3.12132 8.625 2.5 8.625C1.87868 8.625 1.375 8.12132 1.375 7.5C1.375 6.87868 1.87868 6.375 2.5 6.375C3.12132 6.375 3.625 6.87868 3.625 7.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM12.5 8.625C13.1213 8.625 13.625 8.12132 13.625 7.5C13.625 6.87868 13.1213 6.375 12.5 6.375C11.8787 6.375 11.375 6.87868 11.375 7.5C11.375 8.12132 11.8787 8.625 12.5 8.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),p9e=["color"],h9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,p9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M1.44995 0.949951C1.31734 0.949951 1.19016 1.00263 1.0964 1.0964C1.00263 1.19017 0.949951 1.31735 0.949951 1.44995L0.949966 3.44995C0.949969 3.7261 1.17383 3.94995 1.44997 3.94995C1.72611 3.94995 1.94997 3.72609 1.94997 3.44995L1.94995 1.94995H3.44997C3.72611 1.94995 3.94997 1.72609 3.94997 1.44995C3.94997 1.17381 3.72611 0.949951 3.44997 0.949951H1.44995ZM5.94995 0.949951C5.67381 0.949951 5.44995 1.17381 5.44995 1.44995C5.44995 1.72609 5.67381 1.94995 5.94995 1.94995H8.94995C9.22609 1.94995 9.44995 1.72609 9.44995 1.44995C9.44995 1.17381 9.22609 0.949951 8.94995 0.949951H5.94995ZM5.44995 13.45C5.44995 13.1738 5.67381 12.95 5.94995 12.95H8.94995C9.22609 12.95 9.44995 13.1738 9.44995 13.45C9.44995 13.7261 9.22609 13.95 8.94995 13.95H5.94995C5.67381 13.95 5.44995 13.7261 5.44995 13.45ZM1.94995 5.94995C1.94995 5.67381 1.72609 5.44995 1.44995 5.44995C1.17381 5.44995 0.949951 5.67381 0.949951 5.94995V8.94995C0.949951 9.22609 1.17381 9.44995 1.44995 9.44995C1.72609 9.44995 1.94995 9.22609 1.94995 8.94995V5.94995ZM13.45 5.44995C13.7261 5.44995 13.95 5.67381 13.95 5.94995V8.94995C13.95 9.22609 13.7261 9.44995 13.45 9.44995C13.1738 9.44995 12.95 9.22609 12.95 8.94995V5.94995C12.95 5.67381 13.1738 5.44995 13.45 5.44995ZM11.45 0.949951C11.1738 0.949951 10.95 1.17381 10.95 1.44995C10.95 1.72609 11.1738 1.94995 11.45 1.94995H12.9499V3.44995C12.9499 3.72609 13.1738 3.94995 13.4499 3.94995C13.7261 3.94995 13.9499 3.72609 13.9499 3.44995V1.44995C13.9499 1.17381 13.7252 0.949951 13.449 0.949951H11.45ZM1.44995 10.95C1.72609 10.95 1.94995 11.1738 1.94995 11.45V12.95H3.44997C3.72611 12.95 3.94997 13.1738 3.94997 13.45C3.94997 13.7261 3.72611 13.95 3.44997 13.95H1.44995C1.17381 13.95 0.949951 13.7261 0.949951 13.45V11.45C0.949951 11.1738 1.17381 10.95 1.44995 10.95ZM13.95 11.45C13.95 11.1738 13.7261 10.95 13.45 10.95C13.1738 10.9499 12.95 11.1738 12.95 11.4499L12.9491 12.95H11.45C11.1738 12.95 10.95 13.1738 10.95 13.45C10.95 13.7261 11.1738 13.95 11.45 13.95H13.4499C13.7261 13.95 13.9499 13.7261 13.9499 13.45L13.95 11.45Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),m9e=["color"],g9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,m9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M1.5 3C1.22386 3 1 3.22386 1 3.5C1 3.77614 1.22386 4 1.5 4H13.5C13.7761 4 14 3.77614 14 3.5C14 3.22386 13.7761 3 13.5 3H1.5ZM1 7.5C1 7.22386 1.22386 7 1.5 7H13.5C13.7761 7 14 7.22386 14 7.5C14 7.77614 13.7761 8 13.5 8H1.5C1.22386 8 1 7.77614 1 7.5ZM1 11.5C1 11.2239 1.22386 11 1.5 11H13.5C13.7761 11 14 11.2239 14 11.5C14 11.7761 13.7761 12 13.5 12H1.5C1.22386 12 1 11.7761 1 11.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),v9e=["color"],y9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,v9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M5 4.63601C5 3.76031 5.24219 3.1054 5.64323 2.67357C6.03934 2.24705 6.64582 1.9783 7.5014 1.9783C8.35745 1.9783 8.96306 2.24652 9.35823 2.67208C9.75838 3.10299 10 3.75708 10 4.63325V5.99999H5V4.63601ZM4 5.99999V4.63601C4 3.58148 4.29339 2.65754 4.91049 1.99307C5.53252 1.32329 6.42675 0.978302 7.5014 0.978302C8.57583 0.978302 9.46952 1.32233 10.091 1.99162C10.7076 2.65557 11 3.57896 11 4.63325V5.99999H12C12.5523 5.99999 13 6.44771 13 6.99999V13C13 13.5523 12.5523 14 12 14H3C2.44772 14 2 13.5523 2 13V6.99999C2 6.44771 2.44772 5.99999 3 5.99999H4ZM3 6.99999H12V13H3V6.99999Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),b9e=["color"],x9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,b9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M7.4986 0C6.3257 0 5.36107 0.38943 4.73753 1.19361C4.23745 1.83856 4 2.68242 4 3.63325H5C5 2.84313 5.19691 2.23312 5.5278 1.80636C5.91615 1.30552 6.55152 1 7.4986 1C8.35683 1 8.96336 1.26502 9.35846 1.68623C9.75793 2.11211 10 2.76044 10 3.63601V6H3C2.44772 6 2 6.44772 2 7V13C2 13.5523 2.44772 14 3 14H12C12.5523 14 13 13.5523 13 13V7C13 6.44771 12.5523 6 12 6H11V3.63601C11 2.58135 10.7065 1.66167 10.0878 1.0021C9.46477 0.337871 8.57061 0 7.4986 0ZM3 7H12V13H3V7Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),S9e=["color"],w9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,S9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M5 1.5C5 1.22386 4.77614 1 4.5 1C4.22386 1 4 1.22386 4 1.5L4 7C4 7.01671 4.00082 7.03323 4.00242 7.04952C2.86009 7.28022 2 8.28967 2 9.5C2 10.7103 2.86009 11.7198 4.00242 11.9505C4.00082 11.9668 4 11.9833 4 12V13.5C4 13.7761 4.22386 14 4.5 14C4.77614 14 5 13.7761 5 13.5V12C5 11.9833 4.99918 11.9668 4.99758 11.9505C6.1399 11.7198 7 10.7103 7 9.5C7 8.28967 6.1399 7.28022 4.99758 7.04952C4.99918 7.03323 5 7.01671 5 7L5 1.5ZM11 1.5C11 1.22386 10.7761 1 10.5 1C10.2239 1 10 1.22386 10 1.5V3C10 3.01671 10.0008 3.03323 10.0024 3.04952C8.8601 3.28022 8 4.28967 8 5.5C8 6.71033 8.8601 7.71978 10.0024 7.95048C10.0008 7.96677 10 7.98329 10 8V13.5C10 13.7761 10.2239 14 10.5 14C10.7761 14 11 13.7761 11 13.5V8C11 7.98329 10.9992 7.96677 10.9976 7.95048C12.1399 7.71978 13 6.71033 13 5.5C13 4.28967 12.1399 3.28022 10.9976 3.04952C10.9992 3.03323 11 3.01671 11 3V1.5ZM4.5 8C3.67157 8 3 8.67157 3 9.5C3 10.3284 3.67157 11 4.5 11C5.32843 11 6 10.3284 6 9.5C6 8.67157 5.32843 8 4.5 8ZM9 5.5C9 4.67157 9.67157 4 10.5 4C11.3284 4 12 4.67157 12 5.5C12 6.32843 11.3284 7 10.5 7C9.67157 7 9 6.32843 9 5.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),C9e=["color"],k9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,C9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M11.8536 1.14645C11.6583 0.951184 11.3417 0.951184 11.1465 1.14645L3.71455 8.57836C3.62459 8.66832 3.55263 8.77461 3.50251 8.89155L2.04044 12.303C1.9599 12.491 2.00189 12.709 2.14646 12.8536C2.29103 12.9981 2.50905 13.0401 2.69697 12.9596L6.10847 11.4975C6.2254 11.4474 6.3317 11.3754 6.42166 11.2855L13.8536 3.85355C14.0488 3.65829 14.0488 3.34171 13.8536 3.14645L11.8536 1.14645ZM4.42166 9.28547L11.5 2.20711L12.7929 3.5L5.71455 10.5784L4.21924 11.2192L3.78081 10.7808L4.42166 9.28547Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),E9e=["color"],I9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,E9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M12.1464 1.14645C12.3417 0.951184 12.6583 0.951184 12.8535 1.14645L14.8535 3.14645C15.0488 3.34171 15.0488 3.65829 14.8535 3.85355L10.9109 7.79618C10.8349 7.87218 10.7471 7.93543 10.651 7.9835L6.72359 9.94721C6.53109 10.0435 6.29861 10.0057 6.14643 9.85355C5.99425 9.70137 5.95652 9.46889 6.05277 9.27639L8.01648 5.34897C8.06455 5.25283 8.1278 5.16507 8.2038 5.08907L12.1464 1.14645ZM12.5 2.20711L8.91091 5.79618L7.87266 7.87267L8.12731 8.12732L10.2038 7.08907L13.7929 3.5L12.5 2.20711ZM9.99998 2L8.99998 3H4.9C4.47171 3 4.18056 3.00039 3.95552 3.01877C3.73631 3.03668 3.62421 3.06915 3.54601 3.10899C3.35785 3.20487 3.20487 3.35785 3.10899 3.54601C3.06915 3.62421 3.03669 3.73631 3.01878 3.95552C3.00039 4.18056 3 4.47171 3 4.9V11.1C3 11.5283 3.00039 11.8194 3.01878 12.0445C3.03669 12.2637 3.06915 12.3758 3.10899 12.454C3.20487 12.6422 3.35785 12.7951 3.54601 12.891C3.62421 12.9309 3.73631 12.9633 3.95552 12.9812C4.18056 12.9996 4.47171 13 4.9 13H11.1C11.5283 13 11.8194 12.9996 12.0445 12.9812C12.2637 12.9633 12.3758 12.9309 12.454 12.891C12.6422 12.7951 12.7951 12.6422 12.891 12.454C12.9309 12.3758 12.9633 12.2637 12.9812 12.0445C12.9996 11.8194 13 11.5283 13 11.1V6.99998L14 5.99998V11.1V11.1207C14 11.5231 14 11.8553 13.9779 12.1259C13.9549 12.407 13.9057 12.6653 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.6653 13.9057 12.407 13.9549 12.1259 13.9779C11.8553 14 11.5231 14 11.1207 14H11.1H4.9H4.87934C4.47686 14 4.14468 14 3.87409 13.9779C3.59304 13.9549 3.33469 13.9057 3.09202 13.782C2.7157 13.5903 2.40973 13.2843 2.21799 12.908C2.09434 12.6653 2.04506 12.407 2.0221 12.1259C1.99999 11.8553 1.99999 11.5231 2 11.1207V11.1206V11.1V4.9V4.87935V4.87932V4.87931C1.99999 4.47685 1.99999 4.14468 2.0221 3.87409C2.04506 3.59304 2.09434 3.33469 2.21799 3.09202C2.40973 2.71569 2.7157 2.40973 3.09202 2.21799C3.33469 2.09434 3.59304 2.04506 3.87409 2.0221C4.14468 1.99999 4.47685 1.99999 4.87932 2H4.87935H4.9H9.99998Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),T9e=["color"],_9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,T9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M13.5 13.95C13.7485 13.95 13.95 13.7485 13.95 13.5C13.95 13.2514 13.7485 13.05 13.5 13.05L1.49995 13.05C1.25142 13.05 1.04995 13.2514 1.04995 13.5C1.04995 13.7485 1.25142 13.95 1.49995 13.95L13.5 13.95ZM11.0681 7.5683C11.2439 7.39257 11.2439 7.10764 11.0681 6.93191C10.8924 6.75617 10.6075 6.75617 10.4317 6.93191L7.94993 9.41371L7.94993 1.49998C7.94993 1.25146 7.74846 1.04998 7.49993 1.04998C7.2514 1.04998 7.04993 1.25146 7.04993 1.49998L7.04993 9.41371L4.56813 6.93191C4.39239 6.75617 4.10746 6.75617 3.93173 6.93191C3.75599 7.10764 3.75599 7.39257 3.93173 7.5683L7.18173 10.8183C7.35746 10.994 7.64239 10.994 7.81812 10.8183L11.0681 7.5683Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),P9e=["color"],O9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,P9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M1.50005 1.05005C1.25152 1.05005 1.05005 1.25152 1.05005 1.50005C1.05005 1.74858 1.25152 1.95005 1.50005 1.95005L13.5 1.95005C13.7486 1.95005 13.95 1.74858 13.95 1.50005C13.95 1.25152 13.7486 1.05005 13.5 1.05005H1.50005ZM3.93188 7.43169C3.75614 7.60743 3.75614 7.89236 3.93188 8.06809C4.10761 8.24383 4.39254 8.24383 4.56827 8.06809L7.05007 5.58629V13.5C7.05007 13.7485 7.25155 13.95 7.50007 13.95C7.7486 13.95 7.95007 13.7485 7.95007 13.5L7.95007 5.58629L10.4319 8.06809C10.6076 8.24383 10.8925 8.24383 11.0683 8.06809C11.244 7.89235 11.244 7.60743 11.0683 7.43169L7.81827 4.18169C7.64254 4.00596 7.35761 4.00596 7.18188 4.18169L3.93188 7.43169Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),M9e=["color"],R9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,M9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),D9e=["color"],A9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,D9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M7.59664 2.93628C7.76085 3.06401 8.00012 2.94698 8.00012 2.73895V1.99998C9.98143 2 11.1848 2.3637 11.9105 3.08945C12.6363 3.81522 13 5.0186 13 6.99998C13 7.27613 13.2239 7.49998 13.5 7.49998C13.7761 7.49998 14 7.27613 14 6.99998C14 4.9438 13.6325 3.39719 12.6176 2.38234C11.6028 1.36752 10.0562 0.999999 8.00012 0.999984V0.261266C8.00012 0.0532293 7.76085 -0.0637944 7.59664 0.063928L6.00384 1.30277C5.87516 1.40286 5.87516 1.59735 6.00384 1.69744L7.59664 2.93628ZM9.5 5H2.5C2.22386 5 2 5.22386 2 5.5V12.5C2 12.7761 2.22386 13 2.5 13H9.5C9.77614 13 10 12.7761 10 12.5V5.5C10 5.22386 9.77614 5 9.5 5ZM2.5 4C1.67157 4 1 4.67157 1 5.5V12.5C1 13.3284 1.67157 14 2.5 14H9.5C10.3284 14 11 13.3284 11 12.5V5.5C11 4.67157 10.3284 4 9.5 4H2.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),L9e=["color"],Uj=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,L9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M14.4999 0.999992C14.2237 0.999992 13.9999 1.22385 13.9999 1.49999L13.9999 13.4999C13.9999 13.776 14.2237 13.9999 14.4999 13.9999C14.776 13.9999 14.9999 13.776 14.9999 13.4999L14.9999 1.49999C14.9999 1.22385 14.776 0.999992 14.4999 0.999992ZM0.499996 0.999992C0.223856 0.999992 -9.78509e-09 1.22385 -2.18556e-08 1.49999L4.07279e-07 13.4999C3.95208e-07 13.776 0.223855 13.9999 0.499996 13.9999C0.776136 13.9999 0.999992 13.776 0.999992 13.4999L0.999992 1.49999C0.999992 1.22385 0.776136 0.999992 0.499996 0.999992ZM1.99998 6.99994C1.99998 6.44766 2.44769 5.99995 2.99998 5.99995L5.99995 5.99995C6.55223 5.99995 6.99994 6.44766 6.99994 6.99994L6.99994 7.99993C6.99994 8.55221 6.55223 8.99992 5.99995 8.99992L2.99998 8.99992C2.4477 8.99992 1.99998 8.55221 1.99998 7.99993L1.99998 6.99994ZM8.99993 5.99995C8.44765 5.99995 7.99993 6.44766 7.99993 6.99994L7.99993 7.99993C7.99993 8.55221 8.44765 8.99992 8.99993 8.99992L11.9999 8.99992C12.5522 8.99992 12.9999 8.55221 12.9999 7.99993L12.9999 6.99994C12.9999 6.44766 12.5522 5.99995 11.9999 5.99995L8.99993 5.99995Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),B9e=["color"],Gj=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,B9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M0.999878 0.5C0.999878 0.223858 1.22374 0 1.49988 0H13.4999C13.776 0 13.9999 0.223858 13.9999 0.5C13.9999 0.776142 13.776 1 13.4999 1H1.49988C1.22374 1 0.999878 0.776142 0.999878 0.5ZM7 2C6.44772 2 6 2.44772 6 3V6C6 6.55228 6.44772 7 7 7H8C8.55228 7 9 6.55228 9 6V3C9 2.44772 8.55228 2 8 2H7ZM7 8C6.44772 8 6 8.44771 6 9V12C6 12.5523 6.44772 13 7 13H8C8.55228 13 9 12.5523 9 12V9C9 8.44772 8.55228 8 8 8H7ZM1.49988 14C1.22374 14 0.999878 14.2239 0.999878 14.5C0.999878 14.7761 1.22374 15 1.49988 15H13.4999C13.776 15 13.9999 14.7761 13.9999 14.5C13.9999 14.2239 13.776 14 13.4999 14H1.49988Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),$9e=["color"],Kj=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,$9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M14.4999 0.999992C14.2237 0.999992 13.9999 1.22385 13.9999 1.49999L13.9999 5.99995L0.999992 5.99995L0.999992 1.49999C0.999992 1.22385 0.776136 0.999992 0.499996 0.999992C0.223856 0.999992 -9.78509e-09 1.22385 -2.18556e-08 1.49999L4.07279e-07 13.4999C3.95208e-07 13.776 0.223855 13.9999 0.499996 13.9999C0.776136 13.9999 0.999992 13.776 0.999992 13.4999L0.999992 8.99992L13.9999 8.99992L13.9999 13.4999C13.9999 13.776 14.2237 13.9999 14.4999 13.9999C14.776 13.9999 14.9999 13.776 14.9999 13.4999L14.9999 1.49999C14.9999 1.22385 14.776 0.999992 14.4999 0.999992Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),F9e=["color"],qj=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,F9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M0.999878 0.5C0.999878 0.223858 1.22374 0 1.49988 0H13.4999C13.776 0 13.9999 0.223858 13.9999 0.5C13.9999 0.776142 13.776 1 13.4999 1H6H1.49988C1.22374 1 0.999878 0.776142 0.999878 0.5ZM9 14V1L6 1V14H1.49988C1.22374 14 0.999878 14.2239 0.999878 14.5C0.999878 14.7761 1.22374 15 1.49988 15H13.4999C13.776 15 13.9999 14.7761 13.9999 14.5C13.9999 14.2239 13.776 14 13.4999 14H9Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),N9e=["color"],z9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,N9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M3.94993 2.95002L3.94993 4.49998C3.94993 4.74851 3.74845 4.94998 3.49993 4.94998C3.2514 4.94998 3.04993 4.74851 3.04993 4.49998V2.50004C3.04993 2.45246 3.05731 2.40661 3.07099 2.36357C3.12878 2.18175 3.29897 2.05002 3.49993 2.05002H11.4999C11.6553 2.05002 11.7922 2.12872 11.8731 2.24842C11.9216 2.32024 11.9499 2.40682 11.9499 2.50002L11.9499 2.50004V4.49998C11.9499 4.74851 11.7485 4.94998 11.4999 4.94998C11.2514 4.94998 11.0499 4.74851 11.0499 4.49998V2.95002H8.04993V12.05H9.25428C9.50281 12.05 9.70428 12.2515 9.70428 12.5C9.70428 12.7486 9.50281 12.95 9.25428 12.95H5.75428C5.50575 12.95 5.30428 12.7486 5.30428 12.5C5.30428 12.2515 5.50575 12.05 5.75428 12.05H6.94993V2.95002H3.94993Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),j9e=["color"],H9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,j9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM4 7.5C4 7.22386 4.22386 7 4.5 7H10.5C10.7761 7 11 7.22386 11 7.5C11 7.77614 10.7761 8 10.5 8H4.5C4.22386 8 4 7.77614 4 7.5ZM3 10.5C3 10.2239 3.22386 10 3.5 10H11.5C11.7761 10 12 10.2239 12 10.5C12 10.7761 11.7761 11 11.5 11H3.5C3.22386 11 3 10.7761 3 10.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),V9e=["color"],W9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,V9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M2.5 4C2.22386 4 2 4.22386 2 4.5C2 4.77614 2.22386 5 2.5 5H12.5C12.7761 5 13 4.77614 13 4.5C13 4.22386 12.7761 4 12.5 4H2.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),U9e=["color"],G9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,U9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM2 7.5C2 7.22386 2.22386 7 2.5 7H7.5C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8H2.5C2.22386 8 2 7.77614 2 7.5ZM2 10.5C2 10.2239 2.22386 10 2.5 10H10.5C10.7761 10 11 10.2239 11 10.5C11 10.7761 10.7761 11 10.5 11H2.5C2.22386 11 2 10.7761 2 10.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),K9e=["color"],q9e=h.exports.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Ne(e,K9e);return h.exports.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),h.exports.createElement("path",{d:"M2 4.5C2 4.22386 2.22386 4 2.5 4H12.5C12.7761 4 13 4.22386 13 4.5C13 4.77614 12.7761 5 12.5 5H2.5C2.22386 5 2 4.77614 2 4.5ZM7 7.5C7 7.22386 7.22386 7 7.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H7.5C7.22386 8 7 7.77614 7 7.5ZM4 10.5C4 10.2239 4.22386 10 4.5 10H12.5C12.7761 10 13 10.2239 13 10.5C13 10.7761 12.7761 11 12.5 11H4.5C4.22386 11 4 10.7761 4 10.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});function Y9e(e){const t=e.iconName,[n,r,,,i]=e.icon;return yA({viewBox:`0 0 ${n} ${r}`,displayName:t,path:typeof i=="string"?k("path",{fill:"currentColor",d:i}):k("g",{children:i.map((o,a)=>k("path",{d:o},a))})})}const X9e=/ra-\w/,Z9e=/fa-\w/,Kt=({icon:e,fw:t,iconProps:n,css:r})=>{var a,s;const i=(a=n==null?void 0:n.size)!=null?a:"",o=(s=n==null?void 0:n.color)!=null?s:"";if(typeof e=="string"){let l="";return X9e.test(e)?(i&&(l+=` ra-${i} `),t&&(l+=" ra-fw "),l+="ra "):Z9e.test(e)&&(i&&(l+=` fa-${i} `),t&&(l+=" fa-fw ")),l+=`${e} `,k("i",{className:l,style:{...r,color:o,alignSelf:"center"}})}else return e.icon?k(Wr,{as:Y9e(e),style:{...r}}):k(Pe,{})};Kt.defaultProps={icon:"ra ra-anvil",fw:!0,iconProps:{color:void 0,size:void 0}};/*!
 * Font Awesome Pro 5.15.4 by @fontawesome - https://fontawesome.com
 * License - https://fontawesome.com/license (Commercial License)
 */var Q9e={prefix:"fas",iconName:"eye",icon:[576,512,[],"f06e","M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"]},J9e={prefix:"fas",iconName:"pennant",icon:[576,512,[],"f456","M571 228.5c-78.1 88.2-179.8 108.8-184.1 109.6-134.8 26.1-153.3 7.5-237.1 37.5-10.6 3.8-21.8-3.6-21.8-14.8V112.5c0-9 7.3-16.4 16.3-16 43.2 2 95.3 13.2 155.2 42.4 140.6 68.5 223.7 62.9 252.9 57.2 18-3.8 31.3 18.1 18.6 32.4zM56 0C25.1 0 0 25.1 0 56c0 22.3 13.2 41.4 32 50.4V504c0 4.4 3.6 8 8 8h32c4.4 0 8-3.6 8-8V106.4c18.8-9 32-28.1 32-50.4 0-30.9-25.1-56-56-56z"]};/*!
 * Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com
 * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
 */function Ep(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ep=function(t){return typeof t}:Ep=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ep(e)}function eCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function IP(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tCe(e,t,n){return t&&IP(e.prototype,t),n&&IP(e,n),e}function nCe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable}))),r.forEach(function(i){nCe(e,i,n[i])})}return e}function Yj(e,t){return rCe(e)||iCe(e,t)||oCe()}function rCe(e){if(Array.isArray(e))return e}function iCe(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){i=!0,o=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}function oCe(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}var TP=function(){},G6={},Xj={},aCe=null,Zj={mark:TP,measure:TP};try{typeof window!="undefined"&&(G6=window),typeof document!="undefined"&&(Xj=document),typeof MutationObserver!="undefined"&&(aCe=MutationObserver),typeof performance!="undefined"&&(Zj=performance)}catch{}var sCe=G6.navigator||{},_P=sCe.userAgent,PP=_P===void 0?"":_P,_2=G6,Cr=Xj,_m=Zj;_2.document;var K6=!!Cr.documentElement&&!!Cr.head&&typeof Cr.addEventListener=="function"&&typeof Cr.createElement=="function";~PP.indexOf("MSIE")||~PP.indexOf("Trident/");var Fa="___FONT_AWESOME___",Qj="fa",Jj="svg-inline--fa",lCe="data-fa-i2svg";(function(){try{return!0}catch{return!1}})();var N5={GROUP:"group",SWAP_OPACITY:"swap-opacity",PRIMARY:"primary",SECONDARY:"secondary"},eH=_2.FontAwesomeConfig||{};function cCe(e){var t=Cr.querySelector("script["+e+"]");if(t)return t.getAttribute(e)}function uCe(e){return e===""?!0:e==="false"?!1:e==="true"?!0:e}if(Cr&&typeof Cr.querySelector=="function"){var dCe=[["data-family-prefix","familyPrefix"],["data-replacement-class","replacementClass"],["data-auto-replace-svg","autoReplaceSvg"],["data-auto-add-css","autoAddCss"],["data-auto-a11y","autoA11y"],["data-search-pseudo-elements","searchPseudoElements"],["data-observe-mutations","observeMutations"],["data-mutate-approach","mutateApproach"],["data-keep-original-source","keepOriginalSource"],["data-measure-performance","measurePerformance"],["data-show-missing-icons","showMissingIcons"]];dCe.forEach(function(e){var t=Yj(e,2),n=t[0],r=t[1],i=uCe(cCe(n));i!=null&&(eH[r]=i)})}var fCe={familyPrefix:Qj,replacementClass:Jj,autoReplaceSvg:!0,autoAddCss:!0,autoA11y:!0,searchPseudoElements:!1,observeMutations:!0,mutateApproach:"async",keepOriginalSource:!0,measurePerformance:!1,showMissingIcons:!0},p4=nt({},fCe,eH);p4.autoReplaceSvg||(p4.observeMutations=!1);var si=nt({},p4);_2.FontAwesomeConfig=si;var Na=_2||{};Na[Fa]||(Na[Fa]={});Na[Fa].styles||(Na[Fa].styles={});Na[Fa].hooks||(Na[Fa].hooks={});Na[Fa].shims||(Na[Fa].shims=[]);var Ho=Na[Fa],pCe=[],hCe=function e(){Cr.removeEventListener("DOMContentLoaded",e),h4=1,pCe.map(function(t){return t()})},h4=!1;K6&&(h4=(Cr.documentElement.doScroll?/^loaded|^c/:/^loaded|^i|^c/).test(Cr.readyState),h4||Cr.addEventListener("DOMContentLoaded",hCe));var q6="pending",tH="settled",iv="fulfilled",ov="rejected",mCe=function(){},nH=typeof global!="undefined"&&typeof global.process!="undefined"&&typeof global.process.emit=="function",gCe=typeof setImmediate=="undefined"?setTimeout:setImmediate,Yf=[],m4;function vCe(){for(var e=0;e<Yf.length;e++)Yf[e][0](Yf[e][1]);Yf=[],m4=!1}function av(e,t){Yf.push([e,t]),m4||(m4=!0,gCe(vCe,0))}function yCe(e,t){function n(i){Y6(t,i)}function r(i){wh(t,i)}try{e(n,r)}catch(i){r(i)}}function rH(e){var t=e.owner,n=t._state,r=t._data,i=e[n],o=e.then;if(typeof i=="function"){n=iv;try{r=i(r)}catch(a){wh(o,a)}}iH(o,r)||(n===iv&&Y6(o,r),n===ov&&wh(o,r))}function iH(e,t){var n;try{if(e===t)throw new TypeError("A promises callback cannot return that same promise.");if(t&&(typeof t=="function"||Ep(t)==="object")){var r=t.then;if(typeof r=="function")return r.call(t,function(i){n||(n=!0,t===i?oH(e,i):Y6(e,i))},function(i){n||(n=!0,wh(e,i))}),!0}}catch(i){return n||wh(e,i),!0}return!1}function Y6(e,t){(e===t||!iH(e,t))&&oH(e,t)}function oH(e,t){e._state===q6&&(e._state=tH,e._data=t,av(bCe,e))}function wh(e,t){e._state===q6&&(e._state=tH,e._data=t,av(xCe,e))}function aH(e){e._then=e._then.forEach(rH)}function bCe(e){e._state=iv,aH(e)}function xCe(e){e._state=ov,aH(e),!e._handled&&nH&&global.process.emit("unhandledRejection",e._data,e)}function SCe(e){global.process.emit("rejectionHandled",e)}function Li(e){if(typeof e!="function")throw new TypeError("Promise resolver "+e+" is not a function");if(!(this instanceof Li))throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");this._then=[],yCe(e,this)}Li.prototype={constructor:Li,_state:q6,_then:null,_data:void 0,_handled:!1,then:function(t,n){var r={owner:this,then:new this.constructor(mCe),fulfilled:t,rejected:n};return(n||t)&&!this._handled&&(this._handled=!0,this._state===ov&&nH&&av(SCe,this)),this._state===iv||this._state===ov?av(rH,r):this._then.push(r),r.then},catch:function(t){return this.then(null,t)}};Li.all=function(e){if(!Array.isArray(e))throw new TypeError("You must pass an array to Promise.all().");return new Li(function(t,n){var r=[],i=0;function o(l){return i++,function(c){r[l]=c,--i||t(r)}}for(var a=0,s;a<e.length;a++)s=e[a],s&&typeof s.then=="function"?s.then(o(a),n):r[a]=s;i||t(r)})};Li.race=function(e){if(!Array.isArray(e))throw new TypeError("You must pass an array to Promise.race().");return new Li(function(t,n){for(var r=0,i;r<e.length;r++)i=e[r],i&&typeof i.then=="function"?i.then(t,n):t(i)})};Li.resolve=function(e){return e&&Ep(e)==="object"&&e.constructor===Li?e:new Li(function(t){t(e)})};Li.reject=function(e){return new Li(function(t,n){n(e)})};var Ru={size:16,x:0,y:0,rotate:0,flipX:!1,flipY:!1};function wCe(e){if(!(!e||!K6)){var t=Cr.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e;for(var n=Cr.head.childNodes,r=null,i=n.length-1;i>-1;i--){var o=n[i],a=(o.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=o)}return Cr.head.insertBefore(t,r),e}}var CCe="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function sv(){for(var e=12,t="";e-- >0;)t+=CCe[Math.random()*62|0];return t}function sH(e){return"".concat(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function kCe(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,'="').concat(sH(e[n]),'" ')},"").trim()}function lH(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n],";")},"")}function cH(e){return e.size!==Ru.size||e.x!==Ru.x||e.y!==Ru.y||e.rotate!==Ru.rotate||e.flipX||e.flipY}function uH(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,i={transform:"translate(".concat(n/2," 256)")},o="translate(".concat(t.x*32,", ").concat(t.y*32,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),s="rotate(".concat(t.rotate," 0 0)"),l={transform:"".concat(o," ").concat(a," ").concat(s)},c={transform:"translate(".concat(r/2*-1," -256)")};return{outer:i,inner:l,path:c}}var z5={x:0,y:0,width:"100%",height:"100%"};function OP(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return e.attributes&&(e.attributes.fill||t)&&(e.attributes.fill="black"),e}function ECe(e){return e.tag==="g"?e.children:[e]}function ICe(e){var t=e.children,n=e.attributes,r=e.main,i=e.mask,o=e.maskId,a=e.transform,s=r.width,l=r.icon,c=i.width,u=i.icon,d=uH({transform:a,containerWidth:c,iconWidth:s}),f={tag:"rect",attributes:nt({},z5,{fill:"white"})},p=l.children?{children:l.children.map(OP)}:{},m={tag:"g",attributes:nt({},d.inner),children:[OP(nt({tag:l.tag,attributes:nt({},l.attributes,d.path)},p))]},g={tag:"g",attributes:nt({},d.outer),children:[m]},y="mask-".concat(o||sv()),v="clip-".concat(o||sv()),b={tag:"mask",attributes:nt({},z5,{id:y,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[f,g]},x={tag:"defs",children:[{tag:"clipPath",attributes:{id:v},children:ECe(u)},b]};return t.push(x,{tag:"rect",attributes:nt({fill:"currentColor","clip-path":"url(#".concat(v,")"),mask:"url(#".concat(y,")")},z5)}),{children:t,attributes:n}}function TCe(e){var t=e.children,n=e.attributes,r=e.main,i=e.transform,o=e.styles,a=lH(o);if(a.length>0&&(n.style=a),cH(i)){var s=uH({transform:i,containerWidth:r.width,iconWidth:r.width});t.push({tag:"g",attributes:nt({},s.outer),children:[{tag:"g",attributes:nt({},s.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:nt({},r.icon.attributes,s.path)}]}]})}else t.push(r.icon);return{children:t,attributes:n}}function _Ce(e){var t=e.children,n=e.main,r=e.mask,i=e.attributes,o=e.styles,a=e.transform;if(cH(a)&&n.found&&!r.found){var s=n.width,l=n.height,c={x:s/l/2,y:.5};i.style=lH(nt({},o,{"transform-origin":"".concat(c.x+a.x/16,"em ").concat(c.y+a.y/16,"em")}))}return[{tag:"svg",attributes:i,children:t}]}function PCe(e){var t=e.prefix,n=e.iconName,r=e.children,i=e.attributes,o=e.symbol,a=o===!0?"".concat(t,"-").concat(si.familyPrefix,"-").concat(n):o;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:nt({},i,{id:a}),children:r}]}]}function OCe(e){var t=e.icons,n=t.main,r=t.mask,i=e.prefix,o=e.iconName,a=e.transform,s=e.symbol,l=e.title,c=e.maskId,u=e.titleId,d=e.extra,f=e.watchable,p=f===void 0?!1:f,m=r.found?r:n,g=m.width,y=m.height,v=i==="fak",b=v?"":"fa-w-".concat(Math.ceil(g/y*16)),x=[si.replacementClass,o?"".concat(si.familyPrefix,"-").concat(o):"",b].filter(function(P){return d.classes.indexOf(P)===-1}).filter(function(P){return P!==""||!!P}).concat(d.classes).join(" "),w={children:[],attributes:nt({},d.attributes,{"data-prefix":i,"data-icon":o,class:x,role:d.attributes.role||"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(g," ").concat(y)})},E=v&&!~d.classes.indexOf("fa-fw")?{width:"".concat(g/y*16*.0625,"em")}:{};p&&(w.attributes[lCe]=""),l&&w.children.push({tag:"title",attributes:{id:w.attributes["aria-labelledby"]||"title-".concat(u||sv())},children:[l]});var C=nt({},w,{prefix:i,iconName:o,main:n,mask:r,maskId:c,transform:a,symbol:s,styles:nt({},E,d.styles)}),I=r.found&&n.found?ICe(C):TCe(C),T=I.children,_=I.attributes;return C.children=T,C.attributes=_,s?PCe(C):_Ce(C)}var MP=function(){};si.measurePerformance&&_m&&_m.mark&&_m.measure;var MCe=function(t,n){return function(r,i,o,a){return t.call(n,r,i,o,a)}},j5=function(t,n,r,i){var o=Object.keys(t),a=o.length,s=i!==void 0?MCe(n,i):n,l,c,u;for(r===void 0?(l=1,u=t[o[0]]):(l=0,u=r);l<a;l++)c=o[l],u=s(u,t[c],c,t);return u};function dH(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.skipHooks,i=r===void 0?!1:r,o=Object.keys(t).reduce(function(a,s){var l=t[s],c=!!l.icon;return c?a[l.iconName]=l.icon:a[s]=l,a},{});typeof Ho.hooks.addPack=="function"&&!i?Ho.hooks.addPack(e,o):Ho.styles[e]=nt({},Ho.styles[e]||{},o),e==="fas"&&dH("fa",t)}var RP=Ho.styles,RCe=Ho.shims,fH=function(){var t=function(i){return j5(RP,function(o,a,s){return o[s]=j5(a,i,{}),o},{})};t(function(r,i,o){return i[3]&&(r[i[3]]=o),r}),t(function(r,i,o){var a=i[2];return r[o]=o,a.forEach(function(s){r[s]=o}),r});var n="far"in RP;j5(RCe,function(r,i){var o=i[0],a=i[1],s=i[2];return a==="far"&&!n&&(a="fas"),r[o]={prefix:a,iconName:s},r},{})};fH();Ho.styles;function DP(e,t,n){if(e&&e[t]&&e[t][n])return{prefix:t,iconName:n,icon:e[t][n]}}function pH(e){var t=e.tag,n=e.attributes,r=n===void 0?{}:n,i=e.children,o=i===void 0?[]:i;return typeof e=="string"?sH(e):"<".concat(t," ").concat(kCe(r),">").concat(o.map(pH).join(""),"</").concat(t,">")}var DCe=function(t){var n={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return t?t.toLowerCase().split(" ").reduce(function(r,i){var o=i.toLowerCase().split("-"),a=o[0],s=o.slice(1).join("-");if(a&&s==="h")return r.flipX=!0,r;if(a&&s==="v")return r.flipY=!0,r;if(s=parseFloat(s),isNaN(s))return r;switch(a){case"grow":r.size=r.size+s;break;case"shrink":r.size=r.size-s;break;case"left":r.x=r.x-s;break;case"right":r.x=r.x+s;break;case"up":r.y=r.y-s;break;case"down":r.y=r.y+s;break;case"rotate":r.rotate=r.rotate+s;break}return r},n):n};function g4(e){this.name="MissingIcon",this.message=e||"Icon unavailable",this.stack=new Error().stack}g4.prototype=Object.create(Error.prototype);g4.prototype.constructor=g4;var P2={fill:"currentColor"},hH={attributeType:"XML",repeatCount:"indefinite",dur:"2s"};nt({},P2,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"});var X6=nt({},hH,{attributeName:"opacity"});nt({},P2,{cx:"256",cy:"364",r:"28"}),nt({},hH,{attributeName:"r",values:"28;14;28;28;14;28;"}),nt({},X6,{values:"1;0;1;1;0;1;"});nt({},P2,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),nt({},X6,{values:"1;0;0;0;0;1;"});nt({},P2,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),nt({},X6,{values:"0;0;1;1;0;0;"});Ho.styles;function AP(e){var t=e[0],n=e[1],r=e.slice(4),i=Yj(r,1),o=i[0],a=null;return Array.isArray(o)?a={tag:"g",attributes:{class:"".concat(si.familyPrefix,"-").concat(N5.GROUP)},children:[{tag:"path",attributes:{class:"".concat(si.familyPrefix,"-").concat(N5.SECONDARY),fill:"currentColor",d:o[0]}},{tag:"path",attributes:{class:"".concat(si.familyPrefix,"-").concat(N5.PRIMARY),fill:"currentColor",d:o[1]}}]}:a={tag:"path",attributes:{fill:"currentColor",d:o}},{found:!0,width:t,height:n,icon:a}}Ho.styles;var ACe=`svg:not(:root).svg-inline--fa {
  overflow: visible;
}

.svg-inline--fa {
  display: inline-block;
  font-size: inherit;
  height: 1em;
  overflow: visible;
  vertical-align: -0.125em;
}
.svg-inline--fa.fa-lg {
  vertical-align: -0.225em;
}
.svg-inline--fa.fa-w-1 {
  width: 0.0625em;
}
.svg-inline--fa.fa-w-2 {
  width: 0.125em;
}
.svg-inline--fa.fa-w-3 {
  width: 0.1875em;
}
.svg-inline--fa.fa-w-4 {
  width: 0.25em;
}
.svg-inline--fa.fa-w-5 {
  width: 0.3125em;
}
.svg-inline--fa.fa-w-6 {
  width: 0.375em;
}
.svg-inline--fa.fa-w-7 {
  width: 0.4375em;
}
.svg-inline--fa.fa-w-8 {
  width: 0.5em;
}
.svg-inline--fa.fa-w-9 {
  width: 0.5625em;
}
.svg-inline--fa.fa-w-10 {
  width: 0.625em;
}
.svg-inline--fa.fa-w-11 {
  width: 0.6875em;
}
.svg-inline--fa.fa-w-12 {
  width: 0.75em;
}
.svg-inline--fa.fa-w-13 {
  width: 0.8125em;
}
.svg-inline--fa.fa-w-14 {
  width: 0.875em;
}
.svg-inline--fa.fa-w-15 {
  width: 0.9375em;
}
.svg-inline--fa.fa-w-16 {
  width: 1em;
}
.svg-inline--fa.fa-w-17 {
  width: 1.0625em;
}
.svg-inline--fa.fa-w-18 {
  width: 1.125em;
}
.svg-inline--fa.fa-w-19 {
  width: 1.1875em;
}
.svg-inline--fa.fa-w-20 {
  width: 1.25em;
}
.svg-inline--fa.fa-pull-left {
  margin-right: 0.3em;
  width: auto;
}
.svg-inline--fa.fa-pull-right {
  margin-left: 0.3em;
  width: auto;
}
.svg-inline--fa.fa-border {
  height: 1.5em;
}
.svg-inline--fa.fa-li {
  width: 2em;
}
.svg-inline--fa.fa-fw {
  width: 1.25em;
}

.fa-layers svg.svg-inline--fa {
  bottom: 0;
  left: 0;
  margin: auto;
  position: absolute;
  right: 0;
  top: 0;
}

.fa-layers {
  display: inline-block;
  height: 1em;
  position: relative;
  text-align: center;
  vertical-align: -0.125em;
  width: 1em;
}
.fa-layers svg.svg-inline--fa {
  -webkit-transform-origin: center center;
          transform-origin: center center;
}

.fa-layers-counter, .fa-layers-text {
  display: inline-block;
  position: absolute;
  text-align: center;
}

.fa-layers-text {
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  -webkit-transform-origin: center center;
          transform-origin: center center;
}

.fa-layers-counter {
  background-color: #ff253a;
  border-radius: 1em;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  color: #fff;
  height: 1.5em;
  line-height: 1;
  max-width: 5em;
  min-width: 1.5em;
  overflow: hidden;
  padding: 0.25em;
  right: 0;
  text-overflow: ellipsis;
  top: 0;
  -webkit-transform: scale(0.25);
          transform: scale(0.25);
  -webkit-transform-origin: top right;
          transform-origin: top right;
}

.fa-layers-bottom-right {
  bottom: 0;
  right: 0;
  top: auto;
  -webkit-transform: scale(0.25);
          transform: scale(0.25);
  -webkit-transform-origin: bottom right;
          transform-origin: bottom right;
}

.fa-layers-bottom-left {
  bottom: 0;
  left: 0;
  right: auto;
  top: auto;
  -webkit-transform: scale(0.25);
          transform: scale(0.25);
  -webkit-transform-origin: bottom left;
          transform-origin: bottom left;
}

.fa-layers-top-right {
  right: 0;
  top: 0;
  -webkit-transform: scale(0.25);
          transform: scale(0.25);
  -webkit-transform-origin: top right;
          transform-origin: top right;
}

.fa-layers-top-left {
  left: 0;
  right: auto;
  top: 0;
  -webkit-transform: scale(0.25);
          transform: scale(0.25);
  -webkit-transform-origin: top left;
          transform-origin: top left;
}

.fa-lg {
  font-size: 1.3333333333em;
  line-height: 0.75em;
  vertical-align: -0.0667em;
}

.fa-xs {
  font-size: 0.75em;
}

.fa-sm {
  font-size: 0.875em;
}

.fa-1x {
  font-size: 1em;
}

.fa-2x {
  font-size: 2em;
}

.fa-3x {
  font-size: 3em;
}

.fa-4x {
  font-size: 4em;
}

.fa-5x {
  font-size: 5em;
}

.fa-6x {
  font-size: 6em;
}

.fa-7x {
  font-size: 7em;
}

.fa-8x {
  font-size: 8em;
}

.fa-9x {
  font-size: 9em;
}

.fa-10x {
  font-size: 10em;
}

.fa-fw {
  text-align: center;
  width: 1.25em;
}

.fa-ul {
  list-style-type: none;
  margin-left: 2.5em;
  padding-left: 0;
}
.fa-ul > li {
  position: relative;
}

.fa-li {
  left: -2em;
  position: absolute;
  text-align: center;
  width: 2em;
  line-height: inherit;
}

.fa-border {
  border: solid 0.08em #eee;
  border-radius: 0.1em;
  padding: 0.2em 0.25em 0.15em;
}

.fa-pull-left {
  float: left;
}

.fa-pull-right {
  float: right;
}

.fa.fa-pull-left,
.fas.fa-pull-left,
.far.fa-pull-left,
.fal.fa-pull-left,
.fab.fa-pull-left {
  margin-right: 0.3em;
}
.fa.fa-pull-right,
.fas.fa-pull-right,
.far.fa-pull-right,
.fal.fa-pull-right,
.fab.fa-pull-right {
  margin-left: 0.3em;
}

.fa-spin {
  -webkit-animation: fa-spin 2s infinite linear;
          animation: fa-spin 2s infinite linear;
}

.fa-pulse {
  -webkit-animation: fa-spin 1s infinite steps(8);
          animation: fa-spin 1s infinite steps(8);
}

@-webkit-keyframes fa-spin {
  0% {
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
            transform: rotate(360deg);
  }
}

@keyframes fa-spin {
  0% {
    -webkit-transform: rotate(0deg);
            transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
            transform: rotate(360deg);
  }
}
.fa-rotate-90 {
  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";
  -webkit-transform: rotate(90deg);
          transform: rotate(90deg);
}

.fa-rotate-180 {
  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";
  -webkit-transform: rotate(180deg);
          transform: rotate(180deg);
}

.fa-rotate-270 {
  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";
  -webkit-transform: rotate(270deg);
          transform: rotate(270deg);
}

.fa-flip-horizontal {
  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";
  -webkit-transform: scale(-1, 1);
          transform: scale(-1, 1);
}

.fa-flip-vertical {
  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
  -webkit-transform: scale(1, -1);
          transform: scale(1, -1);
}

.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {
  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";
  -webkit-transform: scale(-1, -1);
          transform: scale(-1, -1);
}

:root .fa-rotate-90,
:root .fa-rotate-180,
:root .fa-rotate-270,
:root .fa-flip-horizontal,
:root .fa-flip-vertical,
:root .fa-flip-both {
  -webkit-filter: none;
          filter: none;
}

.fa-stack {
  display: inline-block;
  height: 2em;
  position: relative;
  width: 2.5em;
}

.fa-stack-1x,
.fa-stack-2x {
  bottom: 0;
  left: 0;
  margin: auto;
  position: absolute;
  right: 0;
  top: 0;
}

.svg-inline--fa.fa-stack-1x {
  height: 1em;
  width: 1.25em;
}
.svg-inline--fa.fa-stack-2x {
  height: 2em;
  width: 2.5em;
}

.fa-inverse {
  color: #fff;
}

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.sr-only-focusable:active, .sr-only-focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  width: auto;
}

.svg-inline--fa .fa-primary {
  fill: var(--fa-primary-color, currentColor);
  opacity: 1;
  opacity: var(--fa-primary-opacity, 1);
}

.svg-inline--fa .fa-secondary {
  fill: var(--fa-secondary-color, currentColor);
  opacity: 0.4;
  opacity: var(--fa-secondary-opacity, 0.4);
}

.svg-inline--fa.fa-swap-opacity .fa-primary {
  opacity: 0.4;
  opacity: var(--fa-secondary-opacity, 0.4);
}

.svg-inline--fa.fa-swap-opacity .fa-secondary {
  opacity: 1;
  opacity: var(--fa-primary-opacity, 1);
}

.svg-inline--fa mask .fa-primary,
.svg-inline--fa mask .fa-secondary {
  fill: black;
}

.fad.fa-inverse {
  color: #fff;
}`;function LCe(){var e=Qj,t=Jj,n=si.familyPrefix,r=si.replacementClass,i=ACe;if(n!==e||r!==t){var o=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\--".concat(e,"\\-"),"g"),s=new RegExp("\\.".concat(t),"g");i=i.replace(o,".".concat(n,"-")).replace(a,"--".concat(n,"-")).replace(s,".".concat(r))}return i}var BCe=function(){function e(){eCe(this,e),this.definitions={}}return tCe(e,[{key:"add",value:function(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];var a=i.reduce(this._pullDefinitions,{});Object.keys(a).forEach(function(s){n.definitions[s]=nt({},n.definitions[s]||{},a[s]),dH(s,a[s]),fH()})}},{key:"reset",value:function(){this.definitions={}}},{key:"_pullDefinitions",value:function(n,r){var i=r.prefix&&r.iconName&&r.icon?{0:r}:r;return Object.keys(i).map(function(o){var a=i[o],s=a.prefix,l=a.iconName,c=a.icon;n[s]||(n[s]={}),n[s][l]=c}),n}}]),e}();function $Ce(){si.autoAddCss&&!BP&&(wCe(LCe()),BP=!0)}function FCe(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(r){return pH(r)})}}),Object.defineProperty(e,"node",{get:function(){if(!!K6){var r=Cr.createElement("div");return r.innerHTML=e.html,r.children}}}),e}function LP(e){var t=e.prefix,n=t===void 0?"fa":t,r=e.iconName;if(!!r)return DP(zCe.definitions,n,r)||DP(Ho.styles,n,r)}function NCe(e){return function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=(t||{}).icon?t:LP(t||{}),i=n.mask;return i&&(i=(i||{}).icon?i:LP(i||{})),e(r,nt({},n,{mask:i}))}}var zCe=new BCe,BP=!1,v4={transform:function(t){return DCe(t)}},jCe=NCe(function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.transform,r=n===void 0?Ru:n,i=t.symbol,o=i===void 0?!1:i,a=t.mask,s=a===void 0?null:a,l=t.maskId,c=l===void 0?null:l,u=t.title,d=u===void 0?null:u,f=t.titleId,p=f===void 0?null:f,m=t.classes,g=m===void 0?[]:m,y=t.attributes,v=y===void 0?{}:y,b=t.styles,x=b===void 0?{}:b;if(!!e){var w=e.prefix,E=e.iconName,C=e.icon;return FCe(nt({type:"icon"},e),function(){return $Ce(),si.autoA11y&&(d?v["aria-labelledby"]="".concat(si.replacementClass,"-title-").concat(p||sv()):(v["aria-hidden"]="true",v.focusable="false")),OCe({icons:{main:AP(C),mask:s?AP(s.icon):{found:!1,width:null,height:null,icon:{}}},prefix:w,iconName:E,transform:nt({},Ru,r),symbol:o,title:d,maskId:c,titleId:p,extra:{attributes:v,styles:x,classes:g}})})}});function $P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ts(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$P(Object(n),!0).forEach(function(r){Du(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$P(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lv(e){return lv=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},lv(e)}function Du(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HCe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function mH(e,t){if(e==null)return{};var n=HCe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,r)||(n[r]=e[r]))}return n}function y4(e){return VCe(e)||WCe(e)||UCe(e)||GCe()}function VCe(e){if(Array.isArray(e))return b4(e)}function WCe(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function UCe(e,t){if(!!e){if(typeof e=="string")return b4(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b4(e,t)}}function b4(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function GCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function KCe(e){var t,n=e.beat,r=e.fade,i=e.beatFade,o=e.bounce,a=e.shake,s=e.flash,l=e.spin,c=e.spinPulse,u=e.spinReverse,d=e.pulse,f=e.fixedWidth,p=e.inverse,m=e.border,g=e.listItem,y=e.flip,v=e.size,b=e.rotation,x=e.pull,w=(t={"fa-beat":n,"fa-fade":r,"fa-beat-fade":i,"fa-bounce":o,"fa-shake":a,"fa-flash":s,"fa-spin":l,"fa-spin-reverse":u,"fa-spin-pulse":c,"fa-pulse":d,"fa-fw":f,"fa-inverse":p,"fa-border":m,"fa-li":g,"fa-flip":y===!0,"fa-flip-horizontal":y==="horizontal"||y==="both","fa-flip-vertical":y==="vertical"||y==="both"},Du(t,"fa-".concat(v),typeof v!="undefined"&&v!==null),Du(t,"fa-rotate-".concat(b),typeof b!="undefined"&&b!==null&&b!==0),Du(t,"fa-pull-".concat(x),typeof x!="undefined"&&x!==null),Du(t,"fa-swap-opacity",e.swapOpacity),t);return Object.keys(w).map(function(E){return w[E]?E:null}).filter(function(E){return E})}function qCe(e){return e=e-0,e===e}function gH(e){return qCe(e)?e:(e=e.replace(/[\-_\s]+(.)?/g,function(t,n){return n?n.toUpperCase():""}),e.substr(0,1).toLowerCase()+e.substr(1))}var YCe=["style"];function XCe(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ZCe(e){return e.split(";").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,n){var r=n.indexOf(":"),i=gH(n.slice(0,r)),o=n.slice(r+1).trim();return i.startsWith("webkit")?t[XCe(i)]=o:t[i]=o,t},{})}function vH(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(typeof t=="string")return t;var r=(t.children||[]).map(function(l){return vH(e,l)}),i=Object.keys(t.attributes||{}).reduce(function(l,c){var u=t.attributes[c];switch(c){case"class":l.attrs.className=u,delete t.attributes.class;break;case"style":l.attrs.style=ZCe(u);break;default:c.indexOf("aria-")===0||c.indexOf("data-")===0?l.attrs[c.toLowerCase()]=u:l.attrs[gH(c)]=u}return l},{attrs:{}}),o=n.style,a=o===void 0?{}:o,s=mH(n,YCe);return i.attrs.style=Ts(Ts({},i.attrs.style),a),e.apply(void 0,[t.tag,Ts(Ts({},i.attrs),s)].concat(y4(r)))}var yH=!1;try{yH=!0}catch{}function QCe(){if(!yH&&console&&typeof console.error=="function"){var e;(e=console).error.apply(e,arguments)}}function FP(e){if(e&&lv(e)==="object"&&e.prefix&&e.iconName&&e.icon)return e;if(v4.icon)return v4.icon(e);if(e===null)return null;if(e&&lv(e)==="object"&&e.prefix&&e.iconName)return e;if(Array.isArray(e)&&e.length===2)return{prefix:e[0],iconName:e[1]};if(typeof e=="string")return{prefix:"fas",iconName:e}}function H5(e,t){return Array.isArray(t)&&t.length>0||!Array.isArray(t)&&t?Du({},e,t):{}}var JCe=["forwardedRef"];function u1(e){var t=e.forwardedRef,n=mH(e,JCe),r=n.icon,i=n.mask,o=n.symbol,a=n.className,s=n.title,l=n.titleId,c=n.maskId,u=FP(r),d=H5("classes",[].concat(y4(KCe(n)),y4(a.split(" ")))),f=H5("transform",typeof n.transform=="string"?v4.transform(n.transform):n.transform),p=H5("mask",FP(i)),m=jCe(u,Ts(Ts(Ts(Ts({},d),f),p),{},{symbol:o,title:s,titleId:l,maskId:c}));if(!m)return QCe("Could not find icon",u),null;var g=m.abstract,y={ref:t};return Object.keys(n).forEach(function(v){u1.defaultProps.hasOwnProperty(v)||(y[v]=n[v])}),e6e(g[0],y)}u1.displayName="FontAwesomeIcon";u1.propTypes={beat:ze.bool,border:ze.bool,beatFade:ze.bool,bounce:ze.bool,className:ze.string,fade:ze.bool,flash:ze.bool,mask:ze.oneOfType([ze.object,ze.array,ze.string]),maskId:ze.string,fixedWidth:ze.bool,inverse:ze.bool,flip:ze.oneOf([!0,!1,"horizontal","vertical","both"]),icon:ze.oneOfType([ze.object,ze.array,ze.string]),listItem:ze.bool,pull:ze.oneOf(["right","left"]),pulse:ze.bool,rotation:ze.oneOf([0,90,180,270]),shake:ze.bool,size:ze.oneOf(["2xs","xs","sm","lg","xl","2xl","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:ze.bool,spinPulse:ze.bool,spinReverse:ze.bool,symbol:ze.oneOfType([ze.bool,ze.string]),title:ze.string,titleId:ze.string,transform:ze.oneOfType([ze.string,ze.object]),swapOpacity:ze.bool};u1.defaultProps={border:!1,className:"",mask:null,maskId:null,fixedWidth:!1,inverse:!1,flip:!1,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,spinPulse:!1,spinReverse:!1,beat:!1,fade:!1,beatFade:!1,bounce:!1,shake:!1,symbol:!1,title:"",titleId:null,transform:null,swapOpacity:!1};var e6e=vH.bind(null,A.createElement);const t6e=e=>k(u1,{...e,icon:{iconName:"heart",prefix:"fas"}}),n6e=A.forwardRef((e,t)=>{var w,E,C;const{blockType:n,excerpt:r,tlBgImage:i,tlAltImage:o,tlTitle:a,likes:s,template:l,author:c,views:u,tlIcon:d,tlStrokeColor:f,tlBgColor:p}=e,[m,g]=h.exports.useState(!!e.hovered),y=Ez(m,300),v=vt("Block",{});let b=y?{display:"flex",flexDirection:"column",justifyContent:"space-between",backgroundColor:"rgb(0,0,0,0.75)",transition:"background-color 0.5s ease"}:{display:"flex",flexDirection:"column-reverse"};f&&(b={...b,borderWidth:"0.3rem",borderStyle:"solid",borderColor:f});const x=e.hovered?{}:{onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1)};return k(_e,{ref:t,className:"block-root",backgroundImage:`url("${(w=i!=null?i:o)!=null?w:""}")`,__css:{backgroundColor:p!=null?p:"unset",...v.root,...b},...x,children:k(_e,{...b,border:"none",paddingBottom:"0",height:"100%",width:"100%",children:Z(Xl,{value:v,children:[y&&Z(_e,{display:"flex",flexDirection:"column",height:"100%",justifyContent:"space-between",children:[Z(_e,{padding:"0.5rem",display:"flex",flexDirection:"row",justifyContent:(c==null?void 0:c.username)&&(c==null?void 0:c.id)?"space-between":"flex-end",children:[(c==null?void 0:c.username)&&(c==null?void 0:c.id)&&Z(_e,{display:"flex",maxWidth:"7rem",alignItems:"center",children:[k(iB,{name:c.username,size:"sm",src:(C=(E=c==null?void 0:c.avatar)==null?void 0:E.url)!=null?C:"",borderRadius:"100%"}),k(Sr,{paddingStart:"0.5rem",fontSize:"smaller",fontWeight:"semibold",children:c.username})]}),Z(_e,{display:"inline-flex",minWidth:"7rem",maxWidth:"9rem",flexDirection:"row",justifyContent:s&&u?"space-between":"flex-end",alignItems:"center",children:[s&&Z(_e,{display:"inline-flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",paddingStart:"0.5rem",children:[k(t6e,{color:g6}),k(Sr,{fontWeight:"semibold",paddingStart:"0.5rem",fontSize:"sm",children:s})]}),u&&Z(_e,{display:"inline-flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-end",paddingStart:"0.5rem",children:[k(Kt,{icon:Q9e}),k(Sr,{fontWeight:"semibold",paddingStart:"0.5rem",fontSize:"sm",children:u})]})]})]}),Z(_e,{display:"flex",flexDirection:"column",textAlign:"center",children:[l&&k(Sr,{textTransform:"uppercase",fontWeight:"bold",children:l}),r!=null?r:k(Sr,{fontWeight:"semibold",children:r})]}),k(_e,{})]}),k(bH,{marginBottom:"1rem",title:a,icon:d})]})})})}),bH=e=>{const{title:t,icon:n}=e,r=vy();return Z(_e,{as:"button",__css:r.legend,children:[n&&k(Kt,{icon:n,iconProps:{color:"white"},fw:!0}),k(Sr,{paddingStart:"1",fontWeight:"semibold",fontSize:"small",children:t})]})};bH.defaultProps={icon:J9e};const Ch=e=>{/^https?:\/\//i.test(e)||(e="http://"+e);const t=window.open(e,"_blank");t&&(t.opener=null)};function NP(e,t){let n=0;switch(t){case"brighter":n=100;break;case"darker":n=-50;break}if(e===""||typeof e!="string"||!Number.isInteger(n))return;let r=parseInt(e.substring(1,3),16),i=parseInt(e.substring(3,5),16),o=parseInt(e.substring(5,7),16);r=parseInt(r*(100+n)/100+""),i=parseInt(i*(100+n)/100+""),o=parseInt(o*(100+n)/100+""),r=r<255?r:255,i=i<255?i:255,o=o<255?o:255;const a=r.toString(16).length==1?"0"+r.toString(16):r.toString(16),s=i.toString(16).length==1?"0"+i.toString(16):i.toString(16),l=o.toString(16).length==1?"0"+o.toString(16):o.toString(16),c=e==="#000000",u=e==="#ffffff";return c?"#ffffff":u?"#000000":"#"+a+s+l}function za(e){return Array.isArray?Array.isArray(e):wH(e)==="[object Array]"}const r6e=1/0;function i6e(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-r6e?"-0":t}function o6e(e){return e==null?"":i6e(e)}function Vo(e){return typeof e=="string"}function xH(e){return typeof e=="number"}function a6e(e){return e===!0||e===!1||s6e(e)&&wH(e)=="[object Boolean]"}function SH(e){return typeof e=="object"}function s6e(e){return SH(e)&&e!==null}function Qr(e){return e!=null}function V5(e){return!e.trim().length}function wH(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const l6e="Incorrect 'index' type",c6e=e=>`Invalid value for key ${e}`,u6e=e=>`Pattern length exceeds max of ${e}.`,d6e=e=>`Missing ${e} property in key`,f6e=e=>`Property 'weight' in key '${e}' must be a positive integer`,zP=Object.prototype.hasOwnProperty;class p6e{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(r=>{let i=CH(r);n+=i.weight,this._keys.push(i),this._keyMap[i.id]=i,n+=i.weight}),this._keys.forEach(r=>{r.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function CH(e){let t=null,n=null,r=null,i=1,o=null;if(Vo(e)||za(e))r=e,t=jP(e),n=x4(e);else{if(!zP.call(e,"name"))throw new Error(d6e("name"));const a=e.name;if(r=a,zP.call(e,"weight")&&(i=e.weight,i<=0))throw new Error(f6e(a));t=jP(a),n=x4(a),o=e.getFn}return{path:t,id:n,weight:i,src:r,getFn:o}}function jP(e){return za(e)?e:e.split(".")}function x4(e){return za(e)?e.join("."):e}function h6e(e,t){let n=[],r=!1;const i=(o,a,s)=>{if(!!Qr(o))if(!a[s])n.push(o);else{let l=a[s];const c=o[l];if(!Qr(c))return;if(s===a.length-1&&(Vo(c)||xH(c)||a6e(c)))n.push(o6e(c));else if(za(c)){r=!0;for(let u=0,d=c.length;u<d;u+=1)i(c[u],a,s+1)}else a.length&&i(c,a,s+1)}};return i(e,Vo(t)?t.split("."):t,0),r?n:n[0]}const m6e={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},g6e={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},v6e={location:0,threshold:.6,distance:100},y6e={useExtendedSearch:!1,getFn:h6e,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var De={...g6e,...m6e,...v6e,...y6e};const b6e=/[^ ]+/g;function x6e(e=1,t=3){const n=new Map,r=Math.pow(10,t);return{get(i){const o=i.match(b6e).length;if(n.has(o))return n.get(o);const a=1/Math.pow(o,.5*e),s=parseFloat(Math.round(a*r)/r);return n.set(o,s),s},clear(){n.clear()}}}class Z6{constructor({getFn:t=De.getFn,fieldNormWeight:n=De.fieldNormWeight}={}){this.norm=x6e(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,r)=>{this._keysMap[n.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Vo(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();Vo(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,r=this.size();n<r;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!Qr(t)||V5(t))return;let r={v:t,i:n,n:this.norm.get(t)};this.records.push(r)}_addObject(t,n){let r={i:n,$:{}};this.keys.forEach((i,o)=>{let a=i.getFn?i.getFn(t):this.getFn(t,i.path);if(!!Qr(a)){if(za(a)){let s=[];const l=[{nestedArrIndex:-1,value:a}];for(;l.length;){const{nestedArrIndex:c,value:u}=l.pop();if(!!Qr(u))if(Vo(u)&&!V5(u)){let d={v:u,i:c,n:this.norm.get(u)};s.push(d)}else za(u)&&u.forEach((d,f)=>{l.push({nestedArrIndex:f,value:d})})}r.$[o]=s}else if(Vo(a)&&!V5(a)){let s={v:a,n:this.norm.get(a)};r.$[o]=s}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function kH(e,t,{getFn:n=De.getFn,fieldNormWeight:r=De.fieldNormWeight}={}){const i=new Z6({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(CH)),i.setSources(t),i.create(),i}function S6e(e,{getFn:t=De.getFn,fieldNormWeight:n=De.fieldNormWeight}={}){const{keys:r,records:i}=e,o=new Z6({getFn:t,fieldNormWeight:n});return o.setKeys(r),o.setIndexRecords(i),o}function Pm(e,{errors:t=0,currentLocation:n=0,expectedLocation:r=0,distance:i=De.distance,ignoreLocation:o=De.ignoreLocation}={}){const a=t/e.length;if(o)return a;const s=Math.abs(r-n);return i?a+s/i:s?1:a}function w6e(e=[],t=De.minMatchCharLength){let n=[],r=-1,i=-1,o=0;for(let a=e.length;o<a;o+=1){let s=e[o];s&&r===-1?r=o:!s&&r!==-1&&(i=o-1,i-r+1>=t&&n.push([r,i]),r=-1)}return e[o-1]&&o-r>=t&&n.push([r,o-1]),n}const Ll=32;function C6e(e,t,n,{location:r=De.location,distance:i=De.distance,threshold:o=De.threshold,findAllMatches:a=De.findAllMatches,minMatchCharLength:s=De.minMatchCharLength,includeMatches:l=De.includeMatches,ignoreLocation:c=De.ignoreLocation}={}){if(t.length>Ll)throw new Error(u6e(Ll));const u=t.length,d=e.length,f=Math.max(0,Math.min(r,d));let p=o,m=f;const g=s>1||l,y=g?Array(d):[];let v;for(;(v=e.indexOf(t,m))>-1;){let I=Pm(t,{currentLocation:v,expectedLocation:f,distance:i,ignoreLocation:c});if(p=Math.min(I,p),m=v+u,g){let T=0;for(;T<u;)y[v+T]=1,T+=1}}m=-1;let b=[],x=1,w=u+d;const E=1<<u-1;for(let I=0;I<u;I+=1){let T=0,_=w;for(;T<_;)Pm(t,{errors:I,currentLocation:f+_,expectedLocation:f,distance:i,ignoreLocation:c})<=p?T=_:w=_,_=Math.floor((w-T)/2+T);w=_;let P=Math.max(1,f-_+1),M=a?d:Math.min(f+_,d)+u,D=Array(M+2);D[M+1]=(1<<I)-1;for(let B=M;B>=P;B-=1){let L=B-1,G=n[e.charAt(L)];if(g&&(y[L]=+!!G),D[B]=(D[B+1]<<1|1)&G,I&&(D[B]|=(b[B+1]|b[B])<<1|1|b[B+1]),D[B]&E&&(x=Pm(t,{errors:I,currentLocation:L,expectedLocation:f,distance:i,ignoreLocation:c}),x<=p)){if(p=x,m=L,m<=f)break;P=Math.max(1,2*f-m)}}if(Pm(t,{errors:I+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:c})>p)break;b=D}const C={isMatch:m>=0,score:Math.max(.001,x)};if(g){const I=w6e(y,s);I.length?l&&(C.indices=I):C.isMatch=!1}return C}function k6e(e){let t={};for(let n=0,r=e.length;n<r;n+=1){const i=e.charAt(n);t[i]=(t[i]||0)|1<<r-n-1}return t}class EH{constructor(t,{location:n=De.location,threshold:r=De.threshold,distance:i=De.distance,includeMatches:o=De.includeMatches,findAllMatches:a=De.findAllMatches,minMatchCharLength:s=De.minMatchCharLength,isCaseSensitive:l=De.isCaseSensitive,ignoreLocation:c=De.ignoreLocation}={}){if(this.options={location:n,threshold:r,distance:i,includeMatches:o,findAllMatches:a,minMatchCharLength:s,isCaseSensitive:l,ignoreLocation:c},this.pattern=l?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const u=(f,p)=>{this.chunks.push({pattern:f,alphabet:k6e(f),startIndex:p})},d=this.pattern.length;if(d>Ll){let f=0;const p=d%Ll,m=d-p;for(;f<m;)u(this.pattern.substr(f,Ll),f),f+=Ll;if(p){const g=d-Ll;u(this.pattern.substr(g),g)}}else u(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,includeMatches:r}=this.options;if(n||(t=t.toLowerCase()),this.pattern===t){let m={isMatch:!0,score:0};return r&&(m.indices=[[0,t.length-1]]),m}const{location:i,distance:o,threshold:a,findAllMatches:s,minMatchCharLength:l,ignoreLocation:c}=this.options;let u=[],d=0,f=!1;this.chunks.forEach(({pattern:m,alphabet:g,startIndex:y})=>{const{isMatch:v,score:b,indices:x}=C6e(t,m,g,{location:i+y,distance:o,threshold:a,findAllMatches:s,minMatchCharLength:l,includeMatches:r,ignoreLocation:c});v&&(f=!0),d+=b,v&&x&&(u=[...u,...x])});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=u),p}}class ul{constructor(t){this.pattern=t}static isMultiMatch(t){return HP(t,this.multiRegex)}static isSingleMatch(t){return HP(t,this.singleRegex)}search(){}}function HP(e,t){const n=e.match(t);return n?n[1]:null}class E6e extends ul{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class I6e extends ul{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const r=t.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,t.length-1]}}}class T6e extends ul{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class _6e extends ul{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class P6e extends ul{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class O6e extends ul{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class IH extends ul{constructor(t,{location:n=De.location,threshold:r=De.threshold,distance:i=De.distance,includeMatches:o=De.includeMatches,findAllMatches:a=De.findAllMatches,minMatchCharLength:s=De.minMatchCharLength,isCaseSensitive:l=De.isCaseSensitive,ignoreLocation:c=De.ignoreLocation}={}){super(t),this._bitapSearch=new EH(t,{location:n,threshold:r,distance:i,includeMatches:o,findAllMatches:a,minMatchCharLength:s,isCaseSensitive:l,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class TH extends ul{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,r;const i=[],o=this.pattern.length;for(;(r=t.indexOf(this.pattern,n))>-1;)n=r+o,i.push([r,n-1]);const a=!!i.length;return{isMatch:a,score:a?0:1,indices:i}}}const S4=[E6e,TH,T6e,_6e,O6e,P6e,I6e,IH],VP=S4.length,M6e=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,R6e="|";function D6e(e,t={}){return e.split(R6e).map(n=>{let r=n.trim().split(M6e).filter(o=>o&&!!o.trim()),i=[];for(let o=0,a=r.length;o<a;o+=1){const s=r[o];let l=!1,c=-1;for(;!l&&++c<VP;){const u=S4[c];let d=u.isMultiMatch(s);d&&(i.push(new u(d,t)),l=!0)}if(!l)for(c=-1;++c<VP;){const u=S4[c];let d=u.isSingleMatch(s);if(d){i.push(new u(d,t));break}}}return i})}const A6e=new Set([IH.type,TH.type]);class L6e{constructor(t,{isCaseSensitive:n=De.isCaseSensitive,includeMatches:r=De.includeMatches,minMatchCharLength:i=De.minMatchCharLength,ignoreLocation:o=De.ignoreLocation,findAllMatches:a=De.findAllMatches,location:s=De.location,threshold:l=De.threshold,distance:c=De.distance}={}){this.query=null,this.options={isCaseSensitive:n,includeMatches:r,minMatchCharLength:i,findAllMatches:a,ignoreLocation:o,location:s,threshold:l,distance:c},this.pattern=n?t:t.toLowerCase(),this.query=D6e(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:i}=this.options;t=i?t:t.toLowerCase();let o=0,a=[],s=0;for(let l=0,c=n.length;l<c;l+=1){const u=n[l];a.length=0,o=0;for(let d=0,f=u.length;d<f;d+=1){const p=u[d],{isMatch:m,indices:g,score:y}=p.search(t);if(m){if(o+=1,s+=y,r){const v=p.constructor.type;A6e.has(v)?a=[...a,...g]:a.push(g)}}else{s=0,o=0,a.length=0;break}}if(o){let d={isMatch:!0,score:s/o};return r&&(d.indices=a),d}}return{isMatch:!1,score:1}}}const w4=[];function B6e(...e){w4.push(...e)}function C4(e,t){for(let n=0,r=w4.length;n<r;n+=1){let i=w4[n];if(i.condition(e,t))return new i(e,t)}return new EH(e,t)}const cv={AND:"$and",OR:"$or"},k4={PATH:"$path",PATTERN:"$val"},E4=e=>!!(e[cv.AND]||e[cv.OR]),$6e=e=>!!e[k4.PATH],F6e=e=>!za(e)&&SH(e)&&!E4(e),WP=e=>({[cv.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function _H(e,t,{auto:n=!0}={}){const r=i=>{let o=Object.keys(i);const a=$6e(i);if(!a&&o.length>1&&!E4(i))return r(WP(i));if(F6e(i)){const l=a?i[k4.PATH]:o[0],c=a?i[k4.PATTERN]:i[l];if(!Vo(c))throw new Error(c6e(l));const u={keyId:x4(l),pattern:c};return n&&(u.searcher=C4(c,t)),u}let s={children:[],operator:o[0]};return o.forEach(l=>{const c=i[l];za(c)&&c.forEach(u=>{s.children.push(r(u))})}),s};return E4(e)||(e=WP(e)),r(e)}function N6e(e,{ignoreFieldNorm:t=De.ignoreFieldNorm}){e.forEach(n=>{let r=1;n.matches.forEach(({key:i,norm:o,score:a})=>{const s=i?i.weight:null;r*=Math.pow(a===0&&s?Number.EPSILON:a,(s||1)*(t?1:o))}),n.score=r})}function z6e(e,t){const n=e.matches;t.matches=[],Qr(n)&&n.forEach(r=>{if(!Qr(r.indices)||!r.indices.length)return;const{indices:i,value:o}=r;let a={indices:i,value:o};r.key&&(a.key=r.key.src),r.idx>-1&&(a.refIndex=r.idx),t.matches.push(a)})}function j6e(e,t){t.score=e.score}function H6e(e,t,{includeMatches:n=De.includeMatches,includeScore:r=De.includeScore}={}){const i=[];return n&&i.push(z6e),r&&i.push(j6e),e.map(o=>{const{idx:a}=o,s={item:t[a],refIndex:a};return i.length&&i.forEach(l=>{l(o,s)}),s})}class Qd{constructor(t,n={},r){this.options={...De,...n},this.options.useExtendedSearch,this._keyStore=new p6e(this.options.keys),this.setCollection(t,r)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof Z6))throw new Error(l6e);this._myIndex=n||kH(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){!Qr(t)||(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let r=0,i=this._docs.length;r<i;r+=1){const o=this._docs[r];t(o,r)&&(this.removeAt(r),r-=1,i-=1,n.push(o))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:r,includeScore:i,shouldSort:o,sortFn:a,ignoreFieldNorm:s}=this.options;let l=Vo(t)?Vo(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return N6e(l,{ignoreFieldNorm:s}),o&&l.sort(a),xH(n)&&n>-1&&(l=l.slice(0,n)),H6e(l,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(t){const n=C4(t,this.options),{records:r}=this._myIndex,i=[];return r.forEach(({v:o,i:a,n:s})=>{if(!Qr(o))return;const{isMatch:l,score:c,indices:u}=n.searchIn(o);l&&i.push({item:o,idx:a,matches:[{score:c,value:o,norm:s,indices:u}]})}),i}_searchLogical(t){const n=_H(t,this.options),r=(s,l,c)=>{if(!s.children){const{keyId:d,searcher:f}=s,p=this._findMatches({key:this._keyStore.get(d),value:this._myIndex.getValueForItemAtKeyId(l,d),searcher:f});return p&&p.length?[{idx:c,item:l,matches:p}]:[]}const u=[];for(let d=0,f=s.children.length;d<f;d+=1){const p=s.children[d],m=r(p,l,c);if(m.length)u.push(...m);else if(s.operator===cv.AND)return[]}return u},i=this._myIndex.records,o={},a=[];return i.forEach(({$:s,i:l})=>{if(Qr(s)){let c=r(n,s,l);c.length&&(o[l]||(o[l]={idx:l,item:s,matches:[]},a.push(o[l])),c.forEach(({matches:u})=>{o[l].matches.push(...u)}))}}),a}_searchObjectList(t){const n=C4(t,this.options),{keys:r,records:i}=this._myIndex,o=[];return i.forEach(({$:a,i:s})=>{if(!Qr(a))return;let l=[];r.forEach((c,u)=>{l.push(...this._findMatches({key:c,value:a[u],searcher:n}))}),l.length&&o.push({idx:s,item:a,matches:l})}),o}_findMatches({key:t,value:n,searcher:r}){if(!Qr(n))return[];let i=[];if(za(n))n.forEach(({v:o,i:a,n:s})=>{if(!Qr(o))return;const{isMatch:l,score:c,indices:u}=r.searchIn(o);l&&i.push({score:c,key:t,value:o,idx:a,norm:s,indices:u})});else{const{v:o,n:a}=n,{isMatch:s,score:l,indices:c}=r.searchIn(o);s&&i.push({score:l,key:t,value:o,norm:a,indices:c})}return i}}Qd.version="6.6.2";Qd.createIndex=kH;Qd.parseIndex=S6e;Qd.config=De;Qd.parseQuery=_H;B6e(L6e);const V6e=["ra-acid","ra-acorn","ra-alien-fire","ra-all-for-one","ra-alligator-clip","ra-ammo-bag","ra-anchor","ra-angel-wings","ra-ankh","ra-anvil","ra-apple","ra-aquarius","ra-arcane-mask","ra-archer","ra-archery-target","ra-arena","ra-aries","ra-arrow-cluster","ra-arrow-flights","ra-arson","ra-aura","ra-aware","ra-axe-swing","ra-axe","ra-ball","ra-barbed-arrow","ra-barrier","ra-bat-sword","ra-battered-axe","ra-batteries","ra-battery-0","ra-battery-25","ra-battery-50","ra-battery-75","ra-battery-100","ra-battery-black","ra-battery-negative","ra-battery-positive","ra-battery-white","ra-batwings","ra-beam-wake","ra-bear-trap","ra-beer","ra-beetle","ra-bell","ra-biohazard","ra-bird-claw","ra-bird-mask","ra-blade-bite","ra-blast","ra-blaster","ra-bleeding-eye","ra-bleeding-hearts","ra-bolt-shield","ra-bomb-explosion","ra-bombs","ra-bone-bite","ra-bone-knife","ra-book","ra-boomerang","ra-boot-stomp","ra-bottle-vapors","ra-bottled-bolt","ra-bottom-right","ra-bowie-knife","ra-bowling-pin","ra-brain-freeze","ra-brandy-bottle","ra-bridge","ra-broadhead-arrow","ra-broadsword","ra-broken-bone","ra-broken-bottle","ra-broken-heart","ra-broken-shield","ra-broken-skull","ra-bubbling-potion","ra-bullets","ra-burning-book","ra-burning-embers","ra-burning-eye","ra-burning-meteor","ra-burst-blob","ra-butterfly","ra-campfire","ra-cancel","ra-cancer","ra-candle-fire","ra-candle","ra-cannon-shot","ra-capitol","ra-capricorn","ra-carrot","ra-castle-emblem","ra-castle-flag","ra-cat","ra-chain","ra-cheese","ra-chemical-arrow","ra-chessboard","ra-chicken-leg","ra-circle-of-circles","ra-circular-saw","ra-circular-shield","ra-cloak-and-dagger","ra-clockwork","ra-clover","ra-clovers-card","ra-clovers","ra-cluster-bomb","ra-coffee-mug","ra-cog-wheel","ra-cog","ra-cold-heart","ra-compass","ra-corked-tube","ra-crab-claw","ra-cracked-helm","ra-cracked-shield","ra-croc-sword","ra-crossbow","ra-crossed-axes","ra-crossed-bones","ra-crossed-pistols","ra-crossed-sabres","ra-crossed-swords","ra-crown-of-thorns","ra-crown","ra-crowned-heart","ra-crush","ra-crystal-ball","ra-crystal-cluster","ra-crystal-wand","ra-crystals","ra-cubes","ra-cut-palm","ra-cycle","ra-daggers","ra-daisy","ra-dead-tree","ra-death-skull","ra-decapitation","ra-defibrillate","ra-demolish","ra-dervish-swords","ra-desert-skull","ra-diamond","ra-diamonds-card","ra-diamonds","ra-dice-five","ra-dice-four","ra-dice-one","ra-dice-six","ra-dice-three","ra-dice-two","ra-dinosaur","ra-divert","ra-diving-dagger","ra-double-team","ra-doubled","ra-dragon-breath","ra-dragon-wing","ra-dragon","ra-dragonfly","ra-drill","ra-dripping-blade","ra-dripping-knife","ra-dripping-sword","ra-droplet-splash","ra-droplet","ra-droplets","ra-duel","ra-egg-pod","ra-egg","ra-eggplant","ra-emerald","ra-energise","ra-explosion","ra-explosive-materials","ra-eye-monster","ra-eye-shield","ra-eyeball","ra-fairy-wand","ra-fairy","ra-fall-down","ra-falling","ra-fast-ship","ra-feather-wing","ra-feathered-wing","ra-fedora","ra-fire-bomb","ra-fire-breath","ra-fire-ring","ra-fire-shield","ra-fire-symbol","ra-fire","ra-fireball-sword","ra-fish","ra-fizzing-flask","ra-flame-symbol","ra-flaming-arrow","ra-flaming-claw","ra-flaming-trident","ra-flask","ra-flat-hammer","ra-flower","ra-flowers","ra-fluffy-swirl","ra-focused-lightning","ra-food-chain","ra-footprint","ra-forging","ra-forward","ra-fox","ra-frost-emblem","ra-frostfire","ra-frozen-arrow","ra-gamepad-cross","ra-gavel","ra-gear-hammer","ra-gear-heart","ra-gears","ra-gecko","ra-gem-pendant","ra-gem","ra-gemini","ra-glass-heart","ra-gloop","ra-gold-bar","ra-grappling-hook","ra-grass-patch","ra-grass","ra-grenade","ra-groundbreaker","ra-guarded-tower","ra-guillotine","ra-halberd","ra-hammer-drop","ra-hammer","ra-hand-emblem","ra-hand-saw","ra-hand","ra-harpoon-trident","ra-health-decrease","ra-health-increase","ra-health","ra-heart-bottle","ra-heart-tower","ra-heartburn","ra-hearts-card","ra-hearts","ra-heat-haze","ra-heavy-fall","ra-heavy-shield","ra-helmet","ra-help","ra-hive-emblem","ra-hole-ladder","ra-honeycomb","ra-hood","ra-horn-call","ra-horns","ra-horseshoe","ra-hospital-cross","ra-hot-surface","ra-hourglass","ra-hydra-shot","ra-hydra","ra-ice-cube","ra-implosion","ra-incense","ra-insect-jaws","ra-interdiction","ra-jetpack","ra-jigsaw-piece","ra-kaleidoscope","ra-kettlebell","ra-key-basic","ra-key","ra-kitchen-knives","ra-knife-fork","ra-knife","ra-knight-helmet","ra-kunai","ra-lantern-flame","ra-large-hammer","ra-laser-blast","ra-laser-site","ra-lava","ra-leaf","ra-leo","ra-level-four-advanced","ra-level-four","ra-level-three-advanced","ra-level-three","ra-level-two-advanced","ra-level-two","ra-lever","ra-libra","ra-light-bulb","ra-lighthouse","ra-lightning-bolt","ra-lightning-storm","ra-lightning-sword","ra-lightning-trio","ra-lightning","ra-lion","ra-lit-candelabra","ra-load","ra-locked-fortress","ra-love-howl","ra-maggot","ra-magnet","ra-mass-driver","ra-match","ra-meat-hook","ra-meat","ra-medical-pack","ra-metal-gate","ra-microphone","ra-mine-wagon","ra-mining-diamonds","ra-mirror","ra-monster-skull","ra-moon-sun","ra-mountains","ra-mp5","ra-muscle-fat","ra-muscle-up","ra-musket","ra-nails","ra-nodular","ra-noose","ra-nuclear","ra-ocarina","ra-ocean-emblem","ra-octopus","ra-omega","ra-on-target","ra-ophiuchus","ra-overhead","ra-overmind","ra-palm-tree","ra-pawn","ra-pawprint","ra-perspective-dice-five","ra-perspective-dice-four","ra-perspective-dice-one","ra-perspective-dice-random","ra-perspective-dice-two","ra-perspective-dice-six","ra-perspective-dice-three","ra-pill","ra-pills","ra-pine-tree","ra-ping-pong","ra-pisces","ra-plain-dagger","ra-player-despair","ra-player-dodge","ra-player-king","ra-player-lift","ra-player-pain","ra-player-pyromaniac","ra-player-shot","ra-player-teleport","ra-player-thunder-struck","ra-player","ra-podium","ra-poison-cloud","ra-potion","ra-pyramids","ra-queen-crown","ra-quill-ink","ra-rabbit","ra-radar-dish","ra-radial-balance","ra-radioactive","ra-raven","ra-reactor","ra-recycle","ra-regeneration","ra-relic-blade","ra-repair","ra-reverse","ra-revolver","ra-rifle","ra-ringing-bell","ra-roast-chicken","ra-robot-arm","ra-round-bottom-flask","ra-round-shield","ra-rss","ra-rune-stone","ra-sagittarius","ra-sapphire","ra-satellite","ra-save","ra-scorpio","ra-scroll-unfurled","ra-scythe","ra-sea-serpent","ra-seagull","ra-shark","ra-sheep","ra-sheriff","ra-shield","ra-ship-emblem","ra-shoe-prints","ra-shot-through-the-heart","ra-shotgun-shell","ra-shovel","ra-shuriken","ra-sickle","ra-sideswipe","ra-site","ra-skull-trophy","ra-skull","ra-slash-ring","ra-small-fire","ra-snail","ra-snake","ra-snorkel","ra-snowflake","ra-soccer-ball","ra-spades-card","ra-spades","ra-spawn-node","ra-spear-head","ra-speech-bubble","ra-speech-bubbles","ra-spider-face","ra-spikeball","ra-spiked-mace","ra-spiked-tentacle","ra-spinning-sword","ra-spiral-shell","ra-splash","ra-spray-can","ra-sprout-emblem","ra-sprout","ra-stopwatch","ra-suckered-tentacle","ra-suits","ra-sun-symbol","ra-sun","ra-sunbeams","ra-super-mushroom","ra-supersonic-arrow","ra-surveillance-camera","ra-syringe","ra-target-arrows","ra-target-laser","ra-targeted","ra-taurus","ra-telescope","ra-tentacle","ra-tesla","ra-thorn-arrow","ra-thorny-vine","ra-three-keys","ra-tic-tac-toe","ra-toast","ra-tombstone","ra-tooth","ra-torch","ra-tower","ra-trail","ra-trefoil-lily","ra-trident","ra-triforce","ra-trophy","ra-turd","ra-two-dragons","ra-two-hearts","ra-uncertainty","ra-underhand","ra-unplugged","ra-vase","ra-venomous-snake","ra-vest","ra-vial","ra-vine-whip","ra-virgo","ra-water-drop","ra-wifi","ra-wireless-signal","ra-wolf-head","ra-wolf-howl","ra-wooden-sign","ra-wrench","ra-wyvern","ra-x-mark","ra-zebra-shield","ra-zigzag-leaf"],W6e=V6e.map(PH),U6e=e=>fetch("https://api.fontawesome.com/",{method:"POST",headers:{"Content-Type":"application/json"},body:'{"query":"query searchIcon($iconName:String!) {\\n\\tsearch(version: \\"6.0.0\\", query: $iconName, first: 5) {\\n\\t\\tid\\n\\t\\tstyles\\n\\t\\tlabel\\n\\t\\t\\n\\t}\\n}\\n","variables":{"iconName":" '+e+'"},"operationName":"searchIcon"}'}).then(t=>t.json()).then(t=>t.data.search).catch(t=>(lt.error("error",t),[]));function G6e(){const e=new Qd(W6e,{threshold:.1,shouldSort:!0,distance:100,keys:["title"]}),[t,n]=h.exports.useState(""),[r,i]=h.exports.useState([]),o=()=>{n(""),i([])},a=e.search(t);return h.exports.useEffect(()=>{t.length<3||t===""?lt.debug("Term too small"+t):(i([]),U6e(t).then(s=>s.filter(c=>X6e(c.styles,["solid","brands"])).map(K6e)).then(s=>i([...a,...s])).catch(s=>console.error("Error",s)))},[t]),{result:r,search:n,term:t,reset:o}}const K6e=e=>{let t=` ${e.styles.includes("solid")?"fas":""}`;t=`${t} ${e.styles.includes("brands")?"fab":""}`;const n=`${t} fa-${e.id}`,r="FA "+e.id.replace(/-/g," ").trim();return{type:"fa",icon:n.trim(),title:r}};function PH(e){return{icon:e.trim(),type:"ra",title:"RA "+e.replace(/ra-/,"").replace(/-/g," ")}}function q6e(e){return{icon:e.trim(),type:"fa",title:"FA "+e.replace(/fa[bs\s]?-/,"").replace(/-/g," ")}}const Y6e=e=>/^fa/.test(e.trim())?q6e(e):/^ra/.test(e.trim())?PH(e):(lt.error("Wrong Str to Dynamic icon conversion"+e),{icon:e,title:e}),X6e=(e,t)=>t.some(n=>e.includes(n)),UP=(e,t=2)=>{let n=[];const r=JSON.stringify(e,(i,o)=>typeof o=="object"&&o!==null?n!=null&&n.includes(o)?void 0:(n==null?void 0:n.push(o))&&o:o,t);return n=null,r},Z6e=e=>`[whiteboard:${e}]`,Q6e=e=>`${location.origin}/world/whiteboard/${e}`,OH=A.forwardRef((e,t)=>{const{tlStrokeColor:n,tlBgColor:r,tlShowText:i,tlTitle:o,tlIcon:a}=e,s=Pr("IconBlock"),l=r,c=NP(r,"darker"),u=NP(r,"brighter");let d={...s,backgroundColor:l};return n&&(d={...d,borderWidth:"0.5rem",borderStyle:"solid",borderColor:n}),i&&o!==""&&(d={...d,width:"auto"}),Z(_e,{ref:t,__css:d,children:[k(Kt,{icon:a,iconProps:{size:"3x",color:c}}),i&&o!==""&&k(Sr,{textTransform:"uppercase",color:u,textOverflow:"ellipsis",fontWeight:"bold",whiteSpace:"nowrap",paddingLeft:"0.5rem",overflow:"hidden",children:o})]})});OH.defaultProps={tlStrokeColor:void 0,tlBgColor:void 0,tlShowText:!1};const J6e=({fill:e})=>k("path",{d:"M4.67447 83.53V161.269L31.4065 135.321L58.1386 109.374L84.8706 135.321L111.603 161.269V83.5819V5.84306H58.1386H4.67447V83.53Z",fill:e}),e8e=({fill:e})=>k("path",{fill:e,d:"M0 87.4708V175L29.2154 145.785L58.4307 116.569L87.6461 145.785L116.861 175V87.5292V4.39584e-06H58.4307H0V87.4708Z"}),t8e=({fill:e})=>k("ellipse",{cx:"87.2917",cy:"87.2917",rx:"77.2917",ry:"77.2917",fill:e}),n8e=({fill:e})=>k("circle",{cx:"87.5",cy:"87.5",r:"87.5",fill:e}),r8e=({fill:e})=>k("path",{fill:e,d:"M36.2808 12.2403C36.2311 12.9224 36.1467 13.4805 36.0929 13.4805C36.0394 13.4805 35.9557 13.9066 35.9069 14.4275C35.8582 14.948 35.771 15.408 35.713 15.4489C35.6551 15.4901 35.5681 15.852 35.52 16.2529C35.472 16.6541 35.3879 16.9824 35.3334 16.9824C35.2787 16.9824 35.1955 17.2597 35.1481 17.5982C35.101 17.9367 35.022 18.2486 34.9726 18.2913C34.9236 18.3339 34.7421 18.8446 34.5695 19.4265C34.3969 20.0083 34.2112 20.4843 34.1568 20.4843C34.1027 20.4843 34.0218 20.7459 33.9772 21.0654C33.9326 21.385 33.8504 21.6141 33.795 21.5747C33.7393 21.5353 33.6559 21.7009 33.6097 21.9424C33.5632 22.1835 33.4871 22.3827 33.44 22.3841C33.3932 22.3859 33.2113 22.7456 33.0362 23.1837C32.861 23.6218 32.6748 23.9815 32.6222 23.9833C32.5697 23.9848 32.5267 24.0497 32.5267 24.127C32.5267 24.2044 32.3598 24.5484 32.1557 24.8909C31.9516 25.2338 31.8172 25.5745 31.857 25.6482C31.8965 25.7219 31.8691 25.7397 31.7955 25.6876C31.6822 25.6073 31.5159 25.855 31.514 26.1067C31.5137 26.1479 31.3832 26.3351 31.2239 26.5229C31.0647 26.7108 30.8485 27.0125 30.7434 27.1941C29.8999 28.65 25.5324 33.7624 25.1321 33.7624C25.0713 33.7624 24.8761 33.9422 24.6981 34.1622C24.5201 34.3821 24.3746 34.5036 24.3746 34.4329C24.3746 34.3617 24.2329 34.4788 24.0593 34.6929C23.8861 34.9071 23.716 35.0647 23.6813 35.0428C23.6469 35.0205 23.5138 35.1055 23.3858 35.231C23.2578 35.3565 23.0556 35.502 22.9358 35.5546C22.8164 35.6071 22.7187 35.7125 22.7187 35.7891C22.7187 35.8654 22.5467 35.9711 22.3365 36.024C22.1264 36.0769 21.9544 36.1794 21.9544 36.2517C21.9544 36.3239 21.8111 36.4246 21.636 36.4749C21.4608 36.5252 21.3175 36.6248 21.3175 36.6963C21.3175 36.7682 21.2296 36.8266 21.1223 36.8266C21.0153 36.8266 20.8959 36.921 20.8571 37.0367C20.8185 37.1519 20.6195 37.2884 20.4154 37.3398C20.2109 37.3912 20.0438 37.4886 20.0438 37.5561C20.0438 37.6236 19.8718 37.7221 19.6616 37.775C19.4515 37.8279 19.2795 37.9264 19.2795 37.9939C19.2795 38.0613 19.1075 38.1598 18.8974 38.2127C18.6872 38.2656 18.5152 38.3641 18.5152 38.4316C18.5152 38.4991 18.3433 38.5976 18.1331 38.6505C17.9229 38.7034 17.751 38.807 17.751 38.881C17.751 38.9547 17.636 39.0152 17.4959 39.0152C17.3555 39.0152 17.0265 39.1466 16.7651 39.3071C16.504 39.4676 16.1887 39.5989 16.0651 39.5989C15.9416 39.5989 15.8403 39.6594 15.8403 39.7331C15.8403 39.8072 15.654 39.9133 15.4263 39.9688C15.1987 40.0246 14.9551 40.1209 14.885 40.1825C14.8149 40.2442 14.557 40.3427 14.3118 40.4014C14.0666 40.4601 13.8087 40.5586 13.7386 40.6203C13.6685 40.6819 13.4106 40.7804 13.1654 40.8392C12.9202 40.8979 12.6623 40.9949 12.5922 41.0547C12.5222 41.1146 12.2929 41.2079 12.0827 41.2619C11.8725 41.3159 11.5429 41.4312 11.3503 41.5184L11 41.6771V44.0583C11 45.3679 11.0494 46.4747 11.1099 46.5173C11.17 46.56 11.2614 47.8605 11.3124 49.4075C11.3637 50.9546 11.4509 52.286 11.5066 52.3663C11.5621 52.4465 11.649 53.5463 11.6993 54.8103C11.7499 56.0743 11.8356 57.1084 11.8897 57.1084C11.9439 57.1084 12.0298 57.9948 12.0805 59.0782C12.1311 60.1616 12.2164 61.0481 12.2706 61.0481C12.3244 61.0481 12.4094 61.8356 12.4597 62.7983C12.5097 63.7609 12.5963 64.5806 12.6518 64.62C12.7072 64.6594 12.7938 65.3817 12.8438 66.2258C12.8941 67.0695 12.9801 67.7601 13.0352 67.7601C13.0903 67.7601 13.1759 68.3838 13.2259 69.1459C13.2756 69.9082 13.3609 70.5634 13.4154 70.6021C13.4698 70.6404 13.5558 71.2806 13.6068 72.0247C13.6574 72.7689 13.7447 73.4105 13.8007 73.4506C13.8564 73.4908 13.943 74.0161 13.9934 74.6179C14.0437 75.2198 14.1287 75.7451 14.1828 75.7852C14.237 75.8254 14.3229 76.3999 14.3736 77.062C14.4242 77.7241 14.5121 78.2658 14.5691 78.2658C14.6258 78.2658 14.7124 78.7582 14.7618 79.3601C14.8108 79.962 14.8961 80.4545 14.9506 80.4545C15.0054 80.4545 15.0904 80.9144 15.1397 81.4766C15.1891 82.0383 15.2741 82.5301 15.3289 82.5687C15.3834 82.6074 15.4681 83.0667 15.5171 83.5894C15.5658 84.1121 15.6512 84.54 15.7066 84.54C15.762 84.54 15.847 84.9996 15.8954 85.5614C15.9435 86.1232 16.0314 86.5828 16.0903 86.5828C16.1492 86.5828 16.2374 86.9768 16.2861 87.4586C16.3349 87.9401 16.4224 88.368 16.4807 88.4092C16.539 88.4505 16.6259 88.8444 16.674 89.2844C16.7221 89.7247 16.8065 90.0847 16.8616 90.0847C16.9167 90.0847 17.0017 90.4787 17.0504 90.9602C17.0991 91.4417 17.1854 91.8356 17.2421 91.8356C17.2985 91.8356 17.3844 92.164 17.4325 92.5652C17.4806 92.9665 17.5653 93.2948 17.6207 93.2948C17.6761 93.2948 17.7608 93.6548 17.8089 94.0951C17.857 94.535 17.9446 94.9294 18.0035 94.9713C18.0627 95.0129 18.1516 95.3259 18.2012 95.6666C18.2509 96.0073 18.3372 96.3192 18.3926 96.36C18.4484 96.4005 18.5321 96.7285 18.5789 97.0885C18.6257 97.4485 18.7095 97.7765 18.7652 97.817C18.8206 97.8578 18.9069 98.1697 18.9566 98.5104C19.0063 98.8511 19.0942 99.1634 19.1521 99.2042C19.2101 99.2451 19.2961 99.5409 19.3432 99.8616C19.3906 100.182 19.475 100.444 19.5311 100.444C19.5868 100.444 19.6715 100.74 19.7186 101.101C19.7661 101.462 19.8521 101.758 19.9097 101.758C19.9676 101.758 20.0536 102.053 20.1008 102.414C20.1482 102.775 20.2355 103.071 20.295 103.071C20.3549 103.071 20.4421 103.334 20.4896 103.655C20.537 103.976 20.6214 104.238 20.6778 104.238C20.7338 104.238 20.8172 104.468 20.8634 104.749C20.9093 105.03 21.0016 105.26 21.0685 105.26C21.1354 105.26 21.1921 105.407 21.1946 105.588C21.1968 105.768 21.3096 106.179 21.4449 106.5C21.5802 106.821 21.693 107.166 21.6952 107.266C21.6977 107.366 21.7496 107.448 21.8108 107.448C21.8719 107.448 21.9585 107.711 22.0034 108.032C22.048 108.353 22.135 108.616 22.1964 108.616C22.2579 108.616 22.3458 108.845 22.3919 109.126C22.4378 109.407 22.5257 109.637 22.5868 109.637C22.6483 109.637 22.7362 109.834 22.7824 110.075C22.8285 110.315 22.9126 110.512 22.9693 110.512C23.026 110.512 23.1104 110.744 23.1568 111.027C23.203 111.31 23.297 111.502 23.3651 111.454C23.4333 111.406 23.4769 111.42 23.4619 111.486C23.411 111.709 23.6294 112.555 23.7377 112.555C23.7966 112.555 23.8826 112.752 23.9287 112.993C23.9749 113.234 24.0609 113.431 24.1198 113.431C24.1787 113.431 24.2647 113.628 24.3109 113.868C24.3571 114.109 24.443 114.306 24.5019 114.306C24.5609 114.306 24.6468 114.503 24.693 114.744C24.7392 114.985 24.8296 115.182 24.8943 115.182C24.9586 115.182 25.0114 115.27 25.0114 115.378C25.0114 115.486 25.1261 115.726 25.2662 115.911C25.4063 116.096 25.521 116.336 25.521 116.444C25.521 116.553 25.5738 116.641 25.6381 116.641C25.7028 116.641 25.7923 116.832 25.8372 117.067C25.8821 117.3 26.0012 117.528 26.1018 117.572C26.2027 117.617 26.2852 117.787 26.2852 117.949C26.2852 118.112 26.3288 118.246 26.3823 118.246C26.4785 118.246 26.5527 118.378 26.9205 119.206C27.025 119.44 27.1826 119.719 27.2708 119.825C27.3593 119.931 27.4316 120.109 27.4316 120.221C27.4316 120.333 27.5456 120.494 27.6851 120.58C27.8246 120.665 27.9249 120.79 27.908 120.858C27.8688 121.014 28.9646 122.95 29.1802 123.105C29.2693 123.169 29.3423 123.29 29.3423 123.374C29.3423 123.457 29.4426 123.676 29.5652 123.86C29.6878 124.044 29.8741 124.342 29.9791 124.523C30.0842 124.704 30.4138 125.199 30.7116 125.624C31.0093 126.049 31.2529 126.434 31.2529 126.48C31.2529 126.526 31.3532 126.684 31.4758 126.832C31.5984 126.981 31.928 127.45 32.2082 127.876C32.4885 128.302 32.8037 128.757 32.9088 128.888C33.0139 129.019 33.2518 129.353 33.4371 129.632C33.6228 129.91 33.895 130.283 34.0421 130.46C34.1896 130.637 34.31 130.829 34.31 130.886C34.31 130.944 34.5536 131.259 34.8513 131.587C35.1491 131.915 35.4955 132.366 35.6213 132.588C35.7493 132.815 35.9117 132.948 35.991 132.892C36.0693 132.837 36.0971 132.858 36.0531 132.939C35.8971 133.229 42.0729 140.383 43.7976 141.911C44.0068 142.097 44.3918 142.5 44.6526 142.808C44.9526 143.161 45.1879 143.327 45.2914 143.259C45.3815 143.199 45.415 143.201 45.3656 143.264C45.279 143.374 46.3821 144.656 46.5636 144.656C46.613 144.656 46.848 144.886 47.0862 145.167C47.3244 145.448 47.5594 145.677 47.6087 145.677C47.6581 145.677 47.8816 145.874 48.1055 146.114C48.3294 146.355 48.5781 146.552 48.658 146.552C48.7383 146.553 48.8379 146.655 48.88 146.781C48.922 146.906 49.0143 146.968 49.0847 146.918C49.1554 146.868 49.213 146.93 49.213 147.055C49.213 147.18 49.2962 147.282 49.3977 147.282C49.4993 147.282 49.6283 147.368 49.6843 147.472C49.7404 147.576 49.9869 147.819 50.2321 148.012C50.4773 148.205 50.7237 148.448 50.7798 148.552C50.8358 148.656 50.9648 148.742 51.0664 148.742C51.168 148.742 51.2511 148.793 51.2511 148.856C51.2511 148.919 51.4208 149.086 51.6284 149.226C51.8361 149.366 52.0813 149.561 52.1733 149.659C52.4936 149.998 53.1522 150.493 53.284 150.493C53.3569 150.493 53.4165 150.551 53.4165 150.621C53.4165 150.779 54.9679 151.952 55.1768 151.952C55.2596 151.952 55.3271 152.02 55.3271 152.102C55.3271 152.185 55.4274 152.296 55.55 152.35C55.6726 152.404 55.9163 152.599 56.0914 152.785C56.2665 152.971 56.5219 153.163 56.6585 153.213C56.7955 153.263 56.9859 153.393 57.0817 153.503C57.1776 153.613 57.3317 153.703 57.4244 153.703C57.5171 153.703 57.6256 153.801 57.6661 153.922C57.7062 154.042 57.8272 154.14 57.9342 154.14C58.0415 154.14 58.1294 154.205 58.1294 154.283C58.1294 154.362 58.2686 154.466 58.4386 154.515C58.6087 154.565 58.7787 154.697 58.8169 154.81C58.8548 154.923 58.9736 155.016 59.0806 155.016C59.1879 155.016 59.2758 155.08 59.2758 155.159C59.2758 155.238 59.4191 155.343 59.5943 155.394C59.7694 155.444 59.9127 155.544 59.9127 155.615C59.9127 155.687 60.0006 155.745 60.1079 155.745C60.2149 155.745 60.3343 155.84 60.3732 155.956C60.4117 156.071 60.6107 156.207 60.8148 156.259C61.0193 156.31 61.1865 156.408 61.1865 156.477C61.1865 156.545 61.3129 156.647 61.467 156.703C61.6215 156.76 61.8202 156.879 61.9084 156.969C62.3341 157.4 62.4621 157.491 62.7678 157.579C62.949 157.631 63.0971 157.721 63.0971 157.778C63.0971 157.836 63.3694 158.038 63.7022 158.228C64.0349 158.417 64.3836 158.66 64.4766 158.765C64.5699 158.872 64.6992 158.92 64.7642 158.875C64.8291 158.829 64.9151 158.89 64.9555 159.01C64.996 159.131 65.1963 159.271 65.4004 159.323C65.6048 159.374 65.772 159.472 65.772 159.539C65.772 159.607 65.944 159.705 66.1542 159.758C66.3643 159.811 66.5363 159.905 66.5363 159.967C66.5363 160.03 66.9805 160.333 67.5235 160.642C68.0664 160.95 68.5399 161.25 68.5756 161.308C68.6113 161.366 68.7976 161.458 68.9896 161.513C69.1816 161.568 69.3386 161.667 69.3386 161.732C69.3386 161.797 69.5105 161.894 69.7207 161.947C69.9309 162 70.1028 162.103 70.1028 162.177C70.1028 162.251 70.1754 162.311 70.264 162.311C70.3525 162.311 70.6391 162.443 70.9002 162.603C71.1617 162.764 71.462 162.895 71.5674 162.895C71.6724 162.895 71.7587 162.954 71.7587 163.025C71.7587 163.096 71.9594 163.198 72.2046 163.25C72.4498 163.303 72.6504 163.404 72.6504 163.474C72.6504 163.544 72.8223 163.645 73.0325 163.698C73.2427 163.751 73.4146 163.854 73.4146 163.928C73.4146 164.002 73.7012 164.062 74.0515 164.062C74.4018 164.062 74.6884 164.002 74.6884 163.928C74.6884 163.854 74.8604 163.751 75.0705 163.698C75.2807 163.645 75.4527 163.544 75.4527 163.474C75.4527 163.404 75.6533 163.303 75.8985 163.25C76.1437 163.198 76.3443 163.096 76.3443 163.025C76.3443 162.954 76.4182 162.895 76.5083 162.895C76.5987 162.895 76.8974 162.764 77.1723 162.603C77.4471 162.443 77.7458 162.311 77.8362 162.311C77.9263 162.311 78.0002 162.251 78.0002 162.177C78.0002 162.103 78.1722 162 78.3823 161.947C78.5925 161.894 78.7645 161.797 78.7645 161.732C78.7645 161.667 78.9215 161.568 79.1135 161.513C79.3055 161.458 79.4918 161.369 79.5275 161.315C79.5631 161.261 80.0366 160.954 80.5796 160.634C81.1225 160.313 81.5668 160.006 81.5668 159.952C81.5668 159.898 81.7387 159.811 81.9489 159.758C82.1591 159.705 82.331 159.607 82.331 159.539C82.331 159.472 82.4982 159.374 82.7026 159.323C82.9068 159.271 83.1071 159.131 83.1475 159.01C83.1879 158.89 83.2739 158.829 83.3389 158.875C83.4038 158.92 83.5341 158.876 83.6287 158.775C83.7229 158.674 84.0716 158.428 84.4031 158.229C84.7346 158.03 85.0059 157.822 85.0059 157.766C85.0059 157.711 85.182 157.621 85.3973 157.567C85.6122 157.513 85.759 157.435 85.7227 157.393C85.6868 157.352 85.9262 157.155 86.2552 156.955C86.5838 156.755 86.8822 156.537 86.9179 156.472C86.9535 156.406 87.1398 156.307 87.3318 156.252C87.5238 156.197 87.6808 156.102 87.6808 156.042C87.6808 155.981 87.9388 155.775 88.254 155.583C88.5693 155.392 88.8272 155.186 88.8272 155.126C88.8272 155.065 88.9043 155.016 88.9989 155.016C89.0931 155.016 89.3081 154.886 89.4765 154.727C89.6447 154.568 89.8399 154.384 89.9099 154.318C89.98 154.252 90.1376 154.155 90.2602 154.101C90.3828 154.047 90.4831 153.936 90.4831 153.853C90.4831 153.77 90.565 153.703 90.665 153.703C90.7653 153.703 90.9254 153.613 91.0213 153.503C91.1171 153.393 91.3076 153.263 91.4445 153.213C91.5811 153.163 91.8365 152.971 92.0117 152.785C92.1868 152.599 92.4304 152.404 92.553 152.35C92.6756 152.296 92.7759 152.19 92.7759 152.112C92.7759 152.034 92.9033 151.925 93.0593 151.869C93.444 151.728 94.6866 150.773 94.6866 150.618C94.6866 150.549 94.7636 150.493 94.8582 150.493C94.9525 150.493 95.1505 150.378 95.298 150.237C95.8603 149.702 96.1629 149.443 96.5017 149.211C96.6943 149.079 96.852 148.919 96.852 148.856C96.852 148.793 96.9351 148.742 97.0367 148.742C97.1383 148.742 97.2672 148.656 97.3233 148.552C97.3793 148.448 97.6258 148.205 97.871 148.012C98.1162 147.819 98.3627 147.576 98.4187 147.472C98.4748 147.368 98.6069 147.282 98.7126 147.282C98.8187 147.282 98.8696 147.217 98.8263 147.137C98.783 147.056 98.8387 146.991 98.9502 146.991C99.0616 146.991 99.1858 146.892 99.226 146.772C99.2664 146.651 99.375 146.553 99.4677 146.553C99.56 146.553 99.7469 146.391 99.8829 146.193C100.019 145.995 100.166 145.875 100.211 145.925C100.255 145.976 100.291 145.941 100.291 145.848C100.291 145.754 100.357 145.677 100.438 145.677C100.518 145.677 100.779 145.448 101.017 145.167C101.255 144.886 101.49 144.656 101.539 144.656C101.589 144.656 101.906 144.361 102.245 143.999C102.583 143.638 102.916 143.343 102.984 143.343C103.053 143.343 103.073 143.277 103.03 143.197C102.986 143.117 103.028 143.051 103.121 143.051C103.215 143.051 103.434 142.87 103.607 142.65C103.78 142.429 104.194 141.998 104.526 141.692C104.859 141.386 105.464 140.762 105.872 140.306C106.281 139.85 106.94 139.15 107.338 138.751C107.736 138.352 108.061 137.937 108.061 137.83C108.061 137.723 108.122 137.679 108.197 137.731C108.272 137.784 108.364 137.69 108.403 137.523C108.441 137.355 108.524 137.254 108.586 137.298C108.649 137.343 108.753 137.227 108.818 137.042C108.883 136.856 108.94 136.761 108.945 136.832C108.949 136.903 109.324 136.516 109.777 135.973C110.231 135.43 110.571 134.929 110.534 134.86C110.497 134.791 110.524 134.734 110.595 134.734C110.744 134.734 112.519 132.701 112.519 132.53C112.519 132.467 112.806 132.092 113.156 131.698C113.506 131.302 113.793 130.929 113.793 130.867C113.793 130.805 113.939 130.6 114.118 130.41C114.297 130.22 114.412 130.065 114.373 130.065C114.334 130.065 114.403 129.945 114.526 129.799C114.648 129.653 114.92 129.282 115.131 128.976C115.341 128.669 115.599 128.312 115.705 128.182C115.811 128.052 116.038 127.716 116.208 127.437C116.379 127.157 116.595 126.874 116.687 126.809C116.78 126.744 116.822 126.629 116.781 126.553C116.74 126.477 116.789 126.379 116.89 126.335C116.991 126.29 117.294 125.88 117.565 125.424C117.835 124.967 118.086 124.56 118.122 124.52C118.309 124.311 118.761 123.49 118.761 123.359C118.761 123.275 118.807 123.207 118.864 123.207C119.004 123.207 119.98 121.453 119.936 121.28C119.917 121.204 119.958 121.183 120.028 121.232C120.097 121.282 120.191 121.155 120.236 120.951C120.28 120.747 120.37 120.58 120.434 120.58C120.498 120.58 120.606 120.433 120.674 120.252C120.802 119.914 121.068 119.396 121.181 119.267C121.313 119.115 121.708 118.303 121.836 117.918C121.91 117.697 122.017 117.516 122.075 117.516C122.132 117.516 122.217 117.319 122.264 117.079C122.31 116.838 122.4 116.641 122.465 116.641C122.529 116.641 122.582 116.553 122.582 116.444C122.582 116.336 122.697 116.096 122.837 115.911C122.977 115.726 123.092 115.486 123.092 115.378C123.092 115.27 123.144 115.182 123.209 115.182C123.273 115.182 123.364 114.985 123.41 114.744C123.456 114.503 123.542 114.306 123.601 114.306C123.66 114.306 123.746 114.109 123.792 113.868C123.838 113.628 123.924 113.431 123.983 113.431C124.042 113.431 124.128 113.234 124.174 112.993C124.22 112.752 124.306 112.555 124.365 112.555C124.474 112.555 124.692 111.709 124.641 111.486C124.626 111.42 124.67 111.406 124.738 111.454C124.806 111.502 124.9 111.31 124.946 111.027C124.993 110.744 125.077 110.512 125.134 110.512C125.19 110.512 125.275 110.315 125.321 110.075C125.367 109.834 125.455 109.637 125.516 109.637C125.577 109.637 125.665 109.407 125.711 109.126C125.757 108.845 125.845 108.616 125.907 108.616C125.968 108.616 126.055 108.353 126.1 108.032C126.145 107.711 126.231 107.448 126.292 107.448C126.353 107.448 126.405 107.366 126.408 107.266C126.41 107.166 126.523 106.821 126.658 106.5C126.793 106.179 126.906 105.768 126.908 105.588C126.911 105.407 126.968 105.26 127.035 105.26C127.101 105.26 127.194 105.03 127.24 104.749C127.286 104.468 127.369 104.238 127.425 104.238C127.482 104.238 127.566 103.976 127.613 103.655C127.661 103.334 127.748 103.071 127.808 103.071C127.868 103.071 127.955 102.775 128.002 102.414C128.049 102.053 128.135 101.758 128.193 101.758C128.251 101.758 128.337 101.462 128.384 101.101C128.432 100.74 128.516 100.444 128.572 100.444C128.628 100.444 128.712 100.182 128.76 99.8616C128.807 99.5409 128.895 99.244 128.955 99.2017C129.015 99.159 129.102 98.8307 129.149 98.4714C129.196 98.1121 129.283 97.8181 129.343 97.8181C129.403 97.8181 129.49 97.4898 129.536 97.0885C129.583 96.6872 129.664 96.3589 129.717 96.3589C129.77 96.3589 129.852 96.0649 129.899 95.7056C129.946 95.3463 130.035 95.0173 130.096 94.9739C130.157 94.9305 130.246 94.535 130.294 94.0951C130.342 93.6548 130.427 93.2948 130.482 93.2948C130.538 93.2948 130.622 92.9665 130.671 92.5652C130.719 92.164 130.805 91.8356 130.861 91.8356C130.918 91.8356 131.004 91.4417 131.053 90.9602C131.101 90.4787 131.186 90.0847 131.241 90.0847C131.297 90.0847 131.381 89.7247 131.429 89.2844C131.477 88.8444 131.564 88.4505 131.622 88.4092C131.681 88.368 131.768 87.9401 131.817 87.4586C131.866 86.9768 131.954 86.5828 132.013 86.5828C132.072 86.5828 132.16 86.1232 132.208 85.5614C132.256 84.9996 132.341 84.54 132.396 84.54C132.452 84.54 132.537 84.1132 132.586 83.5916C132.635 83.0699 132.718 82.6431 132.772 82.6431C132.826 82.6431 132.91 82.1507 132.959 81.5488C133.009 80.9469 133.095 80.4545 133.15 80.4545C133.206 80.4545 133.292 79.962 133.341 79.3601C133.391 78.7582 133.478 78.2658 133.536 78.2658C133.594 78.2658 133.682 77.7076 133.731 77.0255C133.781 76.3434 133.868 75.7852 133.925 75.7852C133.982 75.7852 134.069 75.26 134.117 74.6179C134.166 73.9759 134.251 73.4506 134.305 73.4506C134.36 73.4506 134.445 72.8258 134.495 72.0623C134.545 71.2988 134.631 70.6418 134.686 70.6028C134.741 70.5638 134.827 69.9082 134.877 69.1459C134.927 68.3838 135.013 67.7601 135.068 67.7601C135.123 67.7601 135.209 67.0695 135.259 66.2258C135.309 65.3817 135.396 64.6594 135.451 64.62C135.507 64.5806 135.593 63.7609 135.643 62.7983C135.694 61.8356 135.779 61.0481 135.832 61.0481C135.887 61.0481 135.972 60.1616 136.023 59.0782C136.073 57.9948 136.159 57.1084 136.213 57.1084C136.267 57.1084 136.353 56.0743 136.404 54.8103C136.454 53.5463 136.541 52.4465 136.596 52.3663C136.652 52.286 136.739 50.9546 136.791 49.4075C136.842 47.8605 136.929 46.5629 136.984 46.5239C137.039 46.4849 137.089 45.3869 137.096 44.0839C137.11 41.4188 137.131 41.4797 136.112 41.2824C135.817 41.2251 135.547 41.1244 135.511 41.058C135.475 40.9916 135.217 40.8931 134.938 40.8392C134.658 40.7852 134.4 40.6867 134.364 40.6203C134.329 40.5539 134.071 40.4554 133.791 40.4014C133.511 40.3471 133.282 40.2515 133.282 40.1884C133.282 40.1253 133.052 40.0319 132.772 39.9805C132.492 39.9294 132.263 39.8298 132.263 39.7594C132.263 39.689 132.062 39.5883 131.817 39.5354C131.572 39.4829 131.371 39.3778 131.371 39.3023C131.371 39.2264 131.142 39.1225 130.862 39.0714C130.581 39.02 130.352 38.9208 130.352 38.8507C130.352 38.7807 130.309 38.7303 130.257 38.7391C130.073 38.7694 129.588 38.5425 129.588 38.4261C129.588 38.3616 129.416 38.2656 129.206 38.2127C128.996 38.1598 128.824 38.0613 128.824 37.9939C128.824 37.9264 128.652 37.8279 128.441 37.775C128.231 37.7221 128.059 37.6236 128.059 37.5561C128.059 37.4886 127.892 37.3912 127.688 37.3398C127.484 37.2884 127.285 37.1519 127.246 37.0367C127.207 36.921 127.088 36.8266 126.981 36.8266C126.873 36.8266 126.786 36.7682 126.786 36.6963C126.786 36.6248 126.642 36.5252 126.467 36.4749C126.292 36.4246 126.149 36.3239 126.149 36.2517C126.149 36.1794 125.977 36.0769 125.767 36.024C125.556 35.9711 125.384 35.8654 125.384 35.7891C125.384 35.7125 125.287 35.6071 125.167 35.5546C125.047 35.502 124.861 35.3722 124.753 35.266C124.645 35.1599 124.499 35.0595 124.429 35.0424C124.359 35.0256 124.187 34.8735 124.047 34.7046C123.907 34.5357 123.692 34.3548 123.569 34.3034C123.447 34.2516 123.346 34.1461 123.346 34.0688C123.346 33.9911 123.234 33.8871 123.096 33.8368C122.658 33.6778 119.243 29.9001 118.108 28.3202C117.784 27.8693 117.474 27.5465 117.419 27.6034C117.364 27.6603 117.36 27.6257 117.409 27.5264C117.459 27.4272 117.439 27.2631 117.364 27.1617C116.869 26.4923 116.723 26.2606 116.723 26.1439C116.723 26.0713 116.675 26.0454 116.617 26.087C116.558 26.1282 116.51 26.0815 116.51 25.9827C116.51 25.8842 116.3 25.461 116.044 25.0423C115.787 24.6235 115.576 24.2146 115.576 24.1336C115.576 24.0526 115.533 23.9848 115.481 23.9833C115.428 23.9815 115.242 23.6218 115.067 23.1837C114.892 22.7456 114.71 22.3859 114.663 22.3841C114.616 22.3827 114.54 22.1842 114.494 21.9435C114.447 21.7027 114.363 21.5057 114.307 21.5057C114.25 21.5057 114.166 21.2759 114.12 20.995C114.074 20.7141 113.982 20.4843 113.915 20.4843C113.848 20.4843 113.793 20.3858 113.793 20.2655C113.793 20.1451 113.742 20.0466 113.68 20.0466C113.618 20.0466 113.571 19.9645 113.577 19.8642C113.594 19.5658 113.238 18.2956 113.138 18.2956C113.086 18.2956 113.006 18.0002 112.958 17.639C112.911 17.2779 112.827 16.9824 112.772 16.9824C112.716 16.9824 112.631 16.6541 112.583 16.2529C112.535 15.852 112.448 15.4901 112.39 15.4489C112.332 15.408 112.245 14.948 112.196 14.4275C112.147 13.9066 112.064 13.4805 112.01 13.4805C111.956 13.4805 111.872 12.9224 111.822 12.2403L111.732 11H74.0515H36.3709L36.2808 12.2403Z"}),i8e=({fill:e})=>k("path",{fill:e,d:"M29.6181 1.41802C29.5599 2.19793 29.461 2.83603 29.398 2.83603C29.3353 2.83603 29.2372 3.32316 29.1801 3.91873C29.123 4.51388 29.0208 5.0398 28.9529 5.08651C28.885 5.13364 28.7831 5.54737 28.7268 6.00572C28.6705 6.46449 28.572 6.83985 28.5082 6.83985C28.444 6.83985 28.3466 7.15682 28.2911 7.54385C28.2358 7.93089 28.1433 8.28748 28.0855 8.33627C28.028 8.38507 27.8154 8.96896 27.6132 9.63418C27.411 10.2994 27.1935 10.8437 27.1297 10.8437C27.0663 10.8437 26.9715 11.1427 26.9193 11.508C26.867 11.8734 26.7708 12.1353 26.7059 12.0903C26.6406 12.0452 26.5428 12.2346 26.4887 12.5107C26.4343 12.7863 26.3451 13.0141 26.2899 13.0157C26.235 13.0178 26.022 13.429 25.8168 13.9299C25.6116 14.4308 25.3934 14.8421 25.3318 14.8441C25.2703 14.8458 25.2199 14.92 25.2199 15.0085C25.2199 15.0969 25.0244 15.4902 24.7853 15.8818C24.5461 16.2738 24.3887 16.6634 24.4353 16.7476C24.4816 16.8319 24.4495 16.8523 24.3633 16.7927C24.2305 16.7009 24.0358 16.9841 24.0335 17.2719C24.0331 17.319 23.8802 17.5329 23.6936 17.7477C23.5071 17.9625 23.2538 18.3074 23.1307 18.5151C22.1424 20.1796 17.0257 26.0248 16.5567 26.0248C16.4855 26.0248 16.2568 26.2304 16.0482 26.4819C15.8397 26.7334 15.6692 26.8723 15.6692 26.7913C15.6692 26.71 15.5031 26.8439 15.2998 27.0887C15.0969 27.3335 14.8976 27.5137 14.857 27.4887C14.8167 27.4632 14.6607 27.5604 14.5108 27.7039C14.3608 27.8474 14.1239 28.0138 13.9836 28.0738C13.8437 28.1339 13.7292 28.2544 13.7292 28.342C13.7292 28.4292 13.5277 28.5501 13.2815 28.6106C13.0353 28.6711 12.8338 28.7882 12.8338 28.8708C12.8338 28.9534 12.6659 29.0685 12.4607 29.1261C12.2555 29.1836 12.0876 29.2975 12.0876 29.3792C12.0876 29.4614 11.9847 29.5281 11.8589 29.5281C11.7336 29.5281 11.5937 29.6361 11.5482 29.7684C11.503 29.9001 11.2699 30.0561 11.0307 30.1149C10.7912 30.1737 10.5953 30.2851 10.5953 30.3623C10.5953 30.4394 10.3939 30.552 10.1477 30.6125C9.90142 30.673 9.69996 30.7856 9.69996 30.8627C9.69996 30.9399 9.4985 31.0525 9.25227 31.113C9.00604 31.1734 8.80458 31.286 8.80458 31.3632C8.80458 31.4404 8.60312 31.553 8.35689 31.6134C8.11066 31.6739 7.9092 31.7924 7.9092 31.877C7.9092 31.9613 7.77452 32.0305 7.61037 32.0305C7.44584 32.0305 7.06045 32.1806 6.75416 32.3642C6.44824 32.5477 6.07889 32.6978 5.93414 32.6978C5.78938 32.6978 5.67075 32.767 5.67075 32.8513C5.67075 32.9359 5.4525 33.0573 5.18575 33.1207C4.919 33.1845 4.6336 33.2946 4.55152 33.3651C4.46944 33.4356 4.16725 33.5482 3.87998 33.6153C3.59272 33.6825 3.29053 33.7951 3.20845 33.8656C3.12637 33.9361 2.82418 34.0487 2.53691 34.1158C2.24964 34.183 1.94745 34.2939 1.86538 34.3623C1.7833 34.4307 1.51469 34.5375 1.26846 34.5992C1.02223 34.6609 0.636094 34.7927 0.410383 34.8924L0 35.0738V37.7964C0 39.2937 0.0578267 40.559 0.128711 40.6078C0.199222 40.6566 0.306295 42.1435 0.365987 43.9122C0.426052 45.681 0.528275 47.2033 0.593563 47.295C0.658478 47.3868 0.760328 48.6442 0.819274 50.0894C0.878593 51.5345 0.97895 52.7169 1.04237 52.7169C1.1058 52.7169 1.20653 53.7303 1.26585 54.969C1.32516 56.2077 1.42515 57.2212 1.48857 57.2212C1.55162 57.2212 1.65123 58.1216 1.71018 59.2222C1.76875 60.3229 1.87023 61.26 1.93514 61.3051C2.00006 61.3501 2.10153 62.1759 2.16011 63.141C2.21905 64.1056 2.31978 64.8951 2.38433 64.8951C2.44887 64.8951 2.54922 65.6083 2.6078 66.4796C2.666 67.3512 2.76598 68.1003 2.82978 68.1445C2.89357 68.1883 2.9943 68.9202 3.054 69.771C3.11331 70.6218 3.21554 71.3555 3.2812 71.4013C3.34649 71.4472 3.44796 72.0478 3.50691 72.7359C3.56586 73.4241 3.66547 74.0247 3.72889 74.0705C3.79231 74.1164 3.89304 74.7733 3.95236 75.5303C4.01168 76.2872 4.11465 76.9066 4.18143 76.9066C4.24784 76.9066 4.34931 77.4696 4.40714 78.1578C4.46459 78.8459 4.56458 79.409 4.62837 79.409C4.69254 79.409 4.79215 79.9349 4.84998 80.5776C4.90781 81.2198 5.00742 81.7821 5.07159 81.8263C5.13538 81.8705 5.23462 82.3956 5.29208 82.9932C5.34916 83.5909 5.44914 84.0801 5.51406 84.0801C5.57897 84.0801 5.67858 84.6056 5.73529 85.2478C5.79162 85.8901 5.89459 86.4156 5.96361 86.4156C6.03263 86.4156 6.13597 86.8661 6.19305 87.417C6.25013 87.9675 6.35273 88.4567 6.421 88.5039C6.48927 88.551 6.59112 89.0014 6.64746 89.5044C6.70379 90.0078 6.80266 90.4194 6.8672 90.4194C6.93174 90.4194 7.03135 90.8699 7.08843 91.4204C7.14551 91.9709 7.24662 92.4214 7.31302 92.4214C7.37906 92.4214 7.47979 92.7967 7.53612 93.2555C7.59246 93.7142 7.6917 94.0896 7.75661 94.0896C7.82153 94.0896 7.92076 94.5013 7.9771 95.0046C8.03343 95.5076 8.13603 95.9585 8.20505 96.0064C8.27444 96.054 8.37853 96.4118 8.43673 96.8014C8.49493 97.1909 8.59603 97.5475 8.66095 97.5942C8.72624 97.6405 8.82435 98.0154 8.8792 98.4271C8.93404 98.8387 9.03216 99.2137 9.09745 99.2599C9.16236 99.3067 9.26346 99.6632 9.32166 100.053C9.37986 100.442 9.48283 100.799 9.55073 100.846C9.61863 100.893 9.71936 101.231 9.77458 101.598C9.83017 101.964 9.92903 102.264 9.99469 102.264C10.06 102.264 10.1592 102.602 10.2144 103.015C10.27 103.428 10.3708 103.765 10.4383 103.765C10.5062 103.765 10.6069 104.103 10.6621 104.516C10.7177 104.929 10.8199 105.267 10.8897 105.267C10.9598 105.267 11.0621 105.567 11.1176 105.934C11.1732 106.301 11.2721 106.602 11.3381 106.602C11.4038 106.602 11.5015 106.864 11.5556 107.185C11.6094 107.507 11.7176 107.769 11.7959 107.769C11.8742 107.769 11.9407 107.938 11.9436 108.145C11.9462 108.351 12.0783 108.82 12.2369 109.187C12.3954 109.554 12.5275 109.948 12.5301 110.063C12.5331 110.178 12.5939 110.272 12.6655 110.272C12.7372 110.272 12.8386 110.572 12.8912 110.939C12.9435 111.306 13.0453 111.606 13.1173 111.606C13.1893 111.606 13.2923 111.869 13.3464 112.19C13.4001 112.511 13.5031 112.774 13.5747 112.774C13.6467 112.774 13.7497 112.999 13.8038 113.275C13.8579 113.55 13.9564 113.775 14.0228 113.775C14.0892 113.775 14.1881 114.04 14.2425 114.363C14.2966 114.687 14.4067 114.907 14.4865 114.851C14.5664 114.796 14.6175 114.813 14.5999 114.889C14.5402 115.143 14.7962 116.111 14.923 116.111C14.992 116.111 15.0928 116.336 15.1469 116.611C15.201 116.886 15.3017 117.112 15.3707 117.112C15.4397 117.112 15.5405 117.337 15.5946 117.612C15.6486 117.887 15.7494 118.112 15.8184 118.112C15.8874 118.112 15.9881 118.338 16.0422 118.613C16.0963 118.888 16.2023 119.113 16.278 119.113C16.3534 119.113 16.4153 119.214 16.4153 119.338C16.4153 119.462 16.5496 119.736 16.7138 119.948C16.8779 120.159 17.0122 120.433 17.0122 120.557C17.0122 120.681 17.0742 120.782 17.1495 120.782C17.2253 120.782 17.3301 121.001 17.3827 121.268C17.4353 121.536 17.5748 121.796 17.6927 121.847C17.811 121.898 17.9076 122.092 17.9076 122.278C17.9076 122.464 17.9587 122.617 18.0214 122.617C18.1341 122.617 18.221 122.768 18.6519 123.714C18.7743 123.982 18.9589 124.301 19.0623 124.422C19.166 124.543 19.2507 124.747 19.2507 124.875C19.2507 125.003 19.3843 125.188 19.5477 125.285C19.7111 125.383 19.8286 125.526 19.8088 125.603C19.7629 125.782 21.0467 127.995 21.2993 128.172C21.4037 128.245 21.4891 128.384 21.4891 128.479C21.4891 128.575 21.6067 128.825 21.7503 129.036C21.8939 129.246 22.1122 129.587 22.2353 129.794C22.3584 130 22.7445 130.566 23.0934 131.053C23.4422 131.539 23.7276 131.979 23.7276 132.031C23.7276 132.083 23.8451 132.265 23.9888 132.434C24.1324 132.604 24.5185 133.141 24.8468 133.627C25.1751 134.114 25.5445 134.634 25.6676 134.784C25.7907 134.934 26.0694 135.316 26.2865 135.635C26.504 135.953 26.823 136.379 26.9954 136.581C27.1681 136.784 27.3091 137.003 27.3091 137.069C27.3091 137.134 27.5945 137.495 27.9434 137.87C28.2922 138.245 28.6981 138.76 28.8454 139.015C28.9954 139.274 29.1857 139.427 29.2786 139.362C29.3704 139.299 29.4028 139.323 29.3513 139.416C29.1685 139.747 36.404 147.927 38.4245 149.674C38.6696 149.886 39.1207 150.347 39.4262 150.699C39.7777 151.103 40.0534 151.292 40.1746 151.214C40.2802 151.146 40.3194 151.149 40.2616 151.221C40.1601 151.347 41.4524 152.812 41.6651 152.812C41.7229 152.812 41.9982 153.075 42.2773 153.396C42.5563 153.717 42.8317 153.98 42.8895 153.98C42.9473 153.98 43.2092 154.205 43.4715 154.48C43.7338 154.754 44.0251 154.98 44.1188 154.98C44.2128 154.981 44.3296 155.098 44.3788 155.242C44.4281 155.385 44.5363 155.456 44.6187 155.399C44.7015 155.342 44.7691 155.412 44.7691 155.555C44.7691 155.698 44.8664 155.815 44.9854 155.815C45.1045 155.815 45.2555 155.913 45.3212 156.032C45.3869 156.151 45.6756 156.429 45.9629 156.649C46.2502 156.869 46.5389 157.147 46.6046 157.266C46.6702 157.386 46.8213 157.483 46.9404 157.483C47.0594 157.483 47.1567 157.542 47.1567 157.614C47.1567 157.686 47.3556 157.877 47.5988 158.037C47.8421 158.198 48.1293 158.42 48.2372 158.532C48.6125 158.92 49.384 159.485 49.5384 159.485C49.6239 159.485 49.6936 159.552 49.6936 159.632C49.6936 159.813 51.5113 161.153 51.756 161.153C51.853 161.153 51.9321 161.231 51.9321 161.326C51.9321 161.42 52.0496 161.548 52.1933 161.609C52.3369 161.67 52.6223 161.894 52.8275 162.106C53.0327 162.318 53.3319 162.539 53.4919 162.595C53.6524 162.652 53.8755 162.802 53.9878 162.927C54.1 163.053 54.2806 163.155 54.3892 163.155C54.4977 163.155 54.625 163.268 54.6723 163.406C54.7193 163.543 54.8611 163.656 54.9865 163.656C55.1122 163.656 55.2152 163.73 55.2152 163.819C55.2152 163.909 55.3782 164.029 55.5774 164.085C55.7766 164.141 55.9759 164.292 56.0206 164.422C56.065 164.551 56.2042 164.657 56.3295 164.657C56.4553 164.657 56.5582 164.731 56.5582 164.82C56.5582 164.91 56.7261 165.031 56.9313 165.089C57.1365 165.146 57.3044 165.26 57.3044 165.342C57.3044 165.424 57.4074 165.491 57.5331 165.491C57.6584 165.491 57.7983 165.599 57.8439 165.731C57.889 165.863 58.1222 166.019 58.3613 166.078C58.6008 166.137 58.7967 166.249 58.7967 166.327C58.7967 166.406 58.9448 166.522 59.1254 166.586C59.3063 166.65 59.5391 166.787 59.6425 166.889C60.1413 167.383 60.2912 167.487 60.6494 167.588C60.8617 167.647 61.0351 167.749 61.0351 167.815C61.0351 167.881 61.3541 168.112 61.744 168.329C62.1339 168.546 62.5424 168.823 62.6513 168.944C62.7606 169.065 62.9121 169.121 62.9882 169.069C63.0643 169.016 63.165 169.086 63.2124 169.224C63.2598 169.362 63.4945 169.522 63.7336 169.581C63.9731 169.64 64.169 169.751 64.169 169.828C64.169 169.906 64.3704 170.018 64.6167 170.079C64.8629 170.139 65.0644 170.247 65.0644 170.318C65.0644 170.389 65.5848 170.736 66.2209 171.089C66.857 171.442 67.4118 171.784 67.4535 171.851C67.4953 171.917 67.7136 172.022 67.9385 172.086C68.1635 172.149 68.3474 172.261 68.3474 172.336C68.3474 172.41 68.5489 172.521 68.7951 172.581C69.0413 172.641 69.2428 172.76 69.2428 172.845C69.2428 172.929 69.3279 172.998 69.4316 172.998C69.5353 172.998 69.8711 173.148 70.177 173.332C70.4833 173.515 70.8351 173.665 70.9586 173.665C71.0817 173.665 71.1828 173.732 71.1828 173.813C71.1828 173.895 71.4178 174.011 71.7051 174.072C71.9924 174.132 72.2274 174.247 72.2274 174.327C72.2274 174.407 72.4289 174.522 72.6751 174.583C72.9213 174.643 73.1228 174.762 73.1228 174.847C73.1228 174.931 73.4586 175 73.8689 175C74.2793 175 74.6151 174.931 74.6151 174.847C74.6151 174.762 74.8166 174.643 75.0628 174.583C75.309 174.522 75.5105 174.407 75.5105 174.327C75.5105 174.247 75.7455 174.132 76.0328 174.072C76.32 174.011 76.5551 173.895 76.5551 173.813C76.5551 173.732 76.6416 173.665 76.7472 173.665C76.8532 173.665 77.2031 173.515 77.5251 173.332C77.847 173.148 78.197 172.998 78.3029 172.998C78.4085 172.998 78.4951 172.929 78.4951 172.845C78.4951 172.76 78.6965 172.641 78.9428 172.581C79.189 172.521 79.3905 172.41 79.3905 172.336C79.3905 172.261 79.5744 172.149 79.7993 172.086C80.0243 172.022 80.2426 171.92 80.2843 171.859C80.3261 171.797 80.8809 171.447 81.517 171.08C82.1531 170.713 82.6735 170.362 82.6735 170.301C82.6735 170.239 82.875 170.139 83.1212 170.079C83.3674 170.018 83.5689 169.906 83.5689 169.828C83.5689 169.751 83.7648 169.64 84.0043 169.581C84.2434 169.522 84.4781 169.362 84.5255 169.224C84.5728 169.086 84.6736 169.016 84.7497 169.069C84.8258 169.121 84.9784 169.07 85.0892 168.954C85.1996 168.839 85.6081 168.558 85.9965 168.33C86.3849 168.103 86.7027 167.865 86.7027 167.801C86.7027 167.738 86.909 167.635 87.1612 167.574C87.4131 167.512 87.5851 167.422 87.5425 167.375C87.5004 167.328 87.7809 167.102 88.1663 166.874C88.5513 166.645 88.9009 166.396 88.9427 166.321C88.9845 166.246 89.2027 166.133 89.4277 166.07C89.6526 166.007 89.8366 165.899 89.8366 165.83C89.8366 165.761 90.1388 165.525 90.5081 165.306C90.8774 165.087 91.1796 164.851 91.1796 164.782C91.1796 164.713 91.2699 164.657 91.3807 164.657C91.4912 164.657 91.743 164.508 91.9403 164.326C92.1373 164.144 92.366 163.934 92.4481 163.859C92.5302 163.784 92.7148 163.672 92.8585 163.611C93.0021 163.549 93.1196 163.422 93.1196 163.328C93.1196 163.233 93.2155 163.155 93.3327 163.155C93.4502 163.155 93.6378 163.053 93.7501 162.927C93.8624 162.802 94.0855 162.652 94.2459 162.595C94.406 162.539 94.7052 162.318 94.9104 162.106C95.1156 161.894 95.401 161.67 95.5446 161.609C95.6883 161.548 95.8058 161.425 95.8058 161.337C95.8058 161.248 95.955 161.123 96.1378 161.058C96.5885 160.898 98.0442 159.806 98.0442 159.628C98.0442 159.55 98.1345 159.485 98.2453 159.485C98.3557 159.485 98.5878 159.354 98.7605 159.193C99.4194 158.581 99.7738 158.286 100.171 158.02C100.396 157.869 100.581 157.686 100.581 157.614C100.581 157.542 100.679 157.483 100.798 157.483C100.917 157.483 101.068 157.386 101.133 157.266C101.199 157.147 101.488 156.869 101.775 156.649C102.062 156.429 102.351 156.151 102.417 156.032C102.482 155.913 102.637 155.815 102.761 155.815C102.885 155.815 102.945 155.74 102.894 155.648C102.843 155.556 102.909 155.481 103.039 155.481C103.17 155.481 103.315 155.369 103.362 155.231C103.41 155.094 103.537 154.981 103.646 154.981C103.754 154.981 103.973 154.796 104.132 154.57C104.291 154.343 104.464 154.206 104.516 154.264C104.568 154.322 104.61 154.282 104.61 154.175C104.61 154.068 104.688 153.98 104.782 153.98C104.876 153.98 105.182 153.717 105.461 153.396C105.74 153.075 106.015 152.812 106.073 152.812C106.131 152.812 106.502 152.474 106.899 152.061C107.296 151.649 107.686 151.311 107.765 151.311C107.846 151.311 107.87 151.236 107.819 151.144C107.768 151.052 107.816 150.977 107.926 150.977C108.036 150.977 108.292 150.771 108.495 150.518C108.698 150.266 109.183 149.773 109.572 149.424C109.961 149.074 110.671 148.36 111.149 147.839C111.628 147.317 112.4 146.517 112.866 146.06C113.332 145.604 113.713 145.131 113.713 145.008C113.713 144.885 113.785 144.835 113.873 144.895C113.96 144.956 114.069 144.848 114.113 144.657C114.158 144.465 114.255 144.35 114.329 144.4C114.402 144.451 114.524 144.319 114.601 144.106C114.677 143.894 114.743 143.786 114.749 143.867C114.754 143.947 115.193 143.505 115.724 142.884C116.256 142.263 116.654 141.691 116.611 141.612C116.567 141.533 116.599 141.468 116.682 141.468C116.857 141.468 118.936 139.144 118.936 138.948C118.936 138.876 119.272 138.448 119.683 137.996C120.093 137.545 120.429 137.117 120.429 137.047C120.429 136.976 120.6 136.741 120.81 136.524C121.019 136.307 121.153 136.13 121.108 136.13C121.063 136.13 121.143 135.993 121.287 135.826C121.43 135.659 121.749 135.235 121.996 134.885C122.242 134.534 122.545 134.126 122.669 133.977C122.793 133.828 123.059 133.445 123.259 133.125C123.459 132.805 123.711 132.482 123.819 132.407C123.928 132.333 123.977 132.201 123.929 132.115C123.881 132.028 123.939 131.915 124.057 131.865C124.175 131.814 124.531 131.346 124.847 130.823C125.165 130.301 125.459 129.836 125.501 129.79C125.72 129.552 126.249 128.613 126.249 128.462C126.249 128.367 126.303 128.289 126.369 128.289C126.533 128.289 127.677 126.283 127.625 126.086C127.603 125.999 127.651 125.975 127.733 126.031C127.815 126.088 127.924 125.943 127.977 125.71C128.029 125.477 128.134 125.286 128.209 125.286C128.284 125.286 128.411 125.117 128.491 124.911C128.64 124.524 128.952 123.932 129.084 123.785C129.239 123.611 129.702 122.682 129.852 122.241C129.938 121.989 130.064 121.783 130.131 121.783C130.199 121.783 130.298 121.557 130.353 121.282C130.407 121.007 130.513 120.782 130.588 120.782C130.664 120.782 130.726 120.681 130.726 120.557C130.726 120.433 130.86 120.159 131.024 119.948C131.188 119.736 131.323 119.462 131.323 119.338C131.323 119.214 131.384 119.113 131.46 119.113C131.536 119.113 131.642 118.888 131.696 118.613C131.75 118.338 131.85 118.112 131.919 118.112C131.988 118.112 132.089 117.887 132.143 117.612C132.197 117.337 132.298 117.112 132.367 117.112C132.436 117.112 132.537 116.886 132.591 116.611C132.645 116.336 132.746 116.111 132.815 116.111C132.942 116.111 133.198 115.143 133.138 114.889C133.12 114.813 133.172 114.796 133.251 114.851C133.331 114.907 133.441 114.687 133.495 114.363C133.55 114.04 133.649 113.775 133.715 113.775C133.781 113.775 133.88 113.55 133.934 113.275C133.988 112.999 134.091 112.774 134.163 112.774C134.235 112.774 134.338 112.511 134.391 112.19C134.446 111.869 134.549 111.606 134.621 111.606C134.693 111.606 134.794 111.306 134.847 110.939C134.899 110.572 135.001 110.272 135.072 110.272C135.144 110.272 135.205 110.178 135.208 110.063C135.21 109.948 135.342 109.554 135.501 109.187C135.66 108.82 135.792 108.351 135.794 108.145C135.797 107.938 135.864 107.769 135.942 107.769C136.02 107.769 136.129 107.507 136.182 107.185C136.236 106.864 136.334 106.602 136.4 106.602C136.466 106.602 136.565 106.301 136.62 105.934C136.676 105.567 136.778 105.267 136.848 105.267C136.918 105.267 137.02 104.929 137.076 104.516C137.131 104.103 137.232 103.765 137.3 103.765C137.367 103.765 137.468 103.428 137.523 103.015C137.579 102.602 137.678 102.264 137.743 102.264C137.809 102.264 137.908 101.964 137.963 101.598C138.019 101.231 138.121 100.892 138.192 100.843C138.262 100.794 138.364 100.419 138.419 100.008C138.474 99.5974 138.577 99.2612 138.647 99.2612C138.717 99.2612 138.818 98.8858 138.873 98.4271C138.927 97.9683 139.022 97.5929 139.085 97.5929C139.147 97.5929 139.243 97.2568 139.298 96.846C139.353 96.4352 139.457 96.059 139.528 96.0094C139.6 95.9597 139.704 95.5076 139.761 95.0046C139.817 94.5013 139.916 94.0896 139.981 94.0896C140.046 94.0896 140.145 93.7142 140.202 93.2555C140.258 92.7967 140.359 92.4214 140.425 92.4214C140.491 92.4214 140.592 91.9709 140.649 91.4204C140.707 90.8699 140.806 90.4194 140.871 90.4194C140.935 90.4194 141.034 90.0078 141.09 89.5044C141.147 89.0014 141.249 88.551 141.317 88.5039C141.385 88.4567 141.488 87.9675 141.545 87.417C141.602 86.8661 141.705 86.4156 141.774 86.4156C141.843 86.4156 141.946 85.8901 142.003 85.2478C142.059 84.6056 142.159 84.0801 142.224 84.0801C142.289 84.0801 142.389 83.5921 142.446 82.9957C142.503 82.3993 142.601 81.9113 142.664 81.9113C142.727 81.9113 142.826 81.3483 142.883 80.6601C142.941 79.972 143.042 79.409 143.107 79.409C143.173 79.409 143.273 78.8459 143.331 78.1578C143.389 77.4696 143.491 76.9066 143.559 76.9066C143.627 76.9066 143.73 76.2685 143.787 75.4886C143.846 74.7086 143.948 74.0705 144.015 74.0705C144.081 74.0705 144.183 73.47 144.24 72.7359C144.297 72.0019 144.396 71.4013 144.46 71.4013C144.524 71.4013 144.624 70.6869 144.683 69.814C144.741 68.9411 144.842 68.1899 144.907 68.1453C144.971 68.1007 145.072 67.3512 145.13 66.4796C145.189 65.6083 145.289 64.8951 145.354 64.8951C145.418 64.8951 145.519 64.1056 145.578 63.141C145.636 62.1759 145.738 61.3501 145.803 61.3051C145.868 61.26 145.969 60.3229 146.028 59.2222C146.087 58.1216 146.186 57.2212 146.249 57.2212C146.313 57.2212 146.413 56.2077 146.472 54.969C146.531 53.7303 146.632 52.7169 146.696 52.7169C146.759 52.7169 146.859 51.5345 146.919 50.0894C146.978 48.6442 147.079 47.3868 147.144 47.295C147.21 47.2033 147.312 45.681 147.372 43.9122C147.432 42.1435 147.533 40.66 147.598 40.6153C147.663 40.5707 147.722 39.3154 147.73 37.8256C147.746 34.7785 147.771 34.8482 146.576 34.6226C146.231 34.5571 145.914 34.442 145.872 34.3661C145.831 34.2902 145.529 34.1776 145.201 34.1158C144.873 34.0541 144.571 33.9415 144.529 33.8656C144.488 33.7897 144.185 33.6771 143.857 33.6153C143.529 33.5532 143.261 33.4439 143.261 33.3718C143.261 33.2996 142.992 33.1929 142.664 33.1341C142.336 33.0757 142.067 32.9618 142.067 32.8813C142.067 32.8008 141.832 32.6857 141.545 32.6252C141.258 32.5652 141.023 32.4451 141.023 32.3587C141.023 32.272 140.754 32.1531 140.426 32.0947C140.097 32.0359 139.829 31.9225 139.829 31.8424C139.829 31.7623 139.778 31.7048 139.717 31.7148C139.501 31.7494 138.933 31.49 138.933 31.3569C138.933 31.2831 138.732 31.1734 138.486 31.113C138.239 31.0525 138.038 30.9399 138.038 30.8627C138.038 30.7856 137.836 30.673 137.59 30.6125C137.344 30.552 137.143 30.4394 137.143 30.3623C137.143 30.2851 136.947 30.1737 136.707 30.1149C136.468 30.0561 136.235 29.9001 136.19 29.7684C136.144 29.6361 136.004 29.5281 135.879 29.5281C135.753 29.5281 135.65 29.4614 135.65 29.3792C135.65 29.2975 135.482 29.1836 135.277 29.1261C135.072 29.0685 134.904 28.9534 134.904 28.8708C134.904 28.7882 134.703 28.6711 134.456 28.6106C134.21 28.5501 134.009 28.4292 134.009 28.342C134.009 28.2544 133.894 28.1339 133.754 28.0738C133.614 28.0138 133.396 27.8653 133.269 27.7439C133.142 27.6226 132.972 27.5079 132.889 27.4883C132.807 27.4691 132.606 27.2952 132.442 27.1021C132.278 26.909 132.026 26.7021 131.882 26.6433C131.739 26.5841 131.621 26.4635 131.621 26.3751C131.621 26.2863 131.489 26.1674 131.327 26.1099C130.815 25.928 126.814 21.6089 125.484 19.8026C125.105 19.2871 124.741 18.918 124.677 18.9831C124.612 19.0481 124.607 19.0085 124.665 18.8951C124.724 18.7816 124.7 18.594 124.612 18.478C124.032 17.7127 123.861 17.4479 123.861 17.3144C123.861 17.2314 123.805 17.2018 123.737 17.2493C123.668 17.2965 123.612 17.2431 123.612 17.1301C123.612 17.0175 123.366 16.5337 123.065 16.0549C122.764 15.5761 122.518 15.1086 122.518 15.016C122.518 14.9234 122.468 14.8458 122.406 14.8441C122.345 14.8421 122.126 14.4308 121.921 13.9299C121.716 13.429 121.503 13.0178 121.448 13.0157C121.393 13.0141 121.304 12.7872 121.25 12.5119C121.195 12.2367 121.097 12.0114 121.031 12.0114C120.964 12.0114 120.866 11.7487 120.812 11.4275C120.758 11.1064 120.65 10.8437 120.571 10.8437C120.493 10.8437 120.429 10.7311 120.429 10.5934C120.429 10.4558 120.369 10.3432 120.296 10.3432C120.223 10.3432 120.169 10.2493 120.176 10.1347C120.196 9.79349 119.779 8.34128 119.661 8.34128C119.601 8.34128 119.507 8.00346 119.451 7.59056C119.396 7.17767 119.297 6.83985 119.232 6.83985C119.167 6.83985 119.067 6.46449 119.011 6.00572C118.955 5.54737 118.853 5.13364 118.785 5.08651C118.717 5.0398 118.615 4.51388 118.558 3.91873C118.501 3.32316 118.403 2.83603 118.34 2.83603C118.277 2.83603 118.178 2.19793 118.12 1.41802L118.014 0H73.8689H29.7237L29.6181 1.41802Z"}),GP={inner:void 0,outer:void 0,viewBox:""},MH=A.forwardRef((e,t)=>{var y;const{tlTitle:n,tlShowText:r,tlBgImage:i,tlMaskType:o,tlStrokeColor:a,tlAltImage:s,tlBgColor:l,shapeId:c}=e,u=vt("MaskBlock",{});A.useState(0);const[{inner:d,outer:f,viewBox:p},m]=A.useState(GP);A.useEffect(()=>{let v="white";l&&!(i!=null?i:s)&&(v=l),m((()=>{let x=GP;switch(o){case"shield":x={viewBox:"148 175",inner:k(r8e,{fill:v}),outer:a?k(i8e,{fill:a}):k(Pe,{})};break;case"banner":x={viewBox:"117 175",inner:k(J6e,{fill:v}),outer:a?k(e8e,{fill:a}):k(Pe,{})};break;case"circle":x={viewBox:"175 175",inner:k(t8e,{fill:v}),outer:a?k(n8e,{fill:a}):k(Pe,{})}}return x})())},[o,a,l]);const g=(y=i!=null?i:s)!=null?y:"http://placekitten.com/g/200";return Z(_e,{ref:t,__css:u.root,className:"mask-block-root",minHeight:p.split(" ")[1],minWidth:p.split(" ")[0],children:[p&&d&&Z("svg",{viewBox:`0 0 ${p}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f,k("g",{id:"svgg",children:k("clipPath",{id:`clip-${c}`,children:d})}),(i!=null?i:s)?k("a",{children:k("image",{clipPath:`url(#clip-${c})`,x:"0",y:"0",height:"100%",width:"100%",preserveAspectRatio:"xMaxYMax slice",href:g})}):d]}),r&&n!==""&&Z(Sr,{sx:u.label,transform:`
      translateY(-1rem)
      `,children:[n," "]})]})});MH.defaultProps={tlStrokeColor:void 0,tlBgColor:void 0,tlShowText:!1};const Wo={"@initial":"mobile","@micro":"micro","@sm":"small","@md":"medium","@lg":"large"},o8e=h.exports.forwardRef((e,t)=>h.exports.createElement(rn.span,J({},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}}))),a8e=o8e;function I4(e){const t=h.exports.useRef({value:e,previous:e});return h.exports.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}const[RH,FFe]=ko("Tooltip",[w2]),O2=w2(),s8e=700,[NFe,l8e]=RH("TooltipProvider",{isOpenDelayed:!0,delayDuration:s8e,onOpen:()=>{},onClose:()=>{}}),[c8e,M2]=RH("Tooltip"),u8e=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,delayDuration:a}=e,s=l8e("Tooltip",t),l=O2(t),[c,u]=h.exports.useState(null),d=Pa(),f=h.exports.useRef(0),p=a!=null?a:s.delayDuration,m=h.exports.useRef(!1),{onOpen:g,onClose:y}=s,[v=!1,b]=b2({prop:r,defaultProp:i,onChange:C=>{C&&(document.dispatchEvent(new CustomEvent("tooltip.open")),g()),o==null||o(C)}}),x=h.exports.useMemo(()=>v?m.current?"delayed-open":"instant-open":"closed",[v]),w=h.exports.useCallback(()=>{window.clearTimeout(f.current),m.current=!1,b(!0)},[b]),E=h.exports.useCallback(()=>{window.clearTimeout(f.current),f.current=window.setTimeout(()=>{m.current=!0,b(!0)},p)},[p,b]);return h.exports.useEffect(()=>()=>window.clearTimeout(f.current),[]),h.exports.createElement(z6,l,h.exports.createElement(c8e,{scope:t,contentId:d,open:v,stateAttribute:x,trigger:c,onTriggerChange:u,onTriggerEnter:h.exports.useCallback(()=>{s.isOpenDelayed?E():w()},[s.isOpenDelayed,E,w]),onOpen:h.exports.useCallback(w,[w]),onClose:h.exports.useCallback(()=>{window.clearTimeout(f.current),b(!1),y()},[b,y])},n))},d8e=h.exports.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=M2("TooltipTrigger",n),o=O2(n),a=un(t,i.onTriggerChange),s=h.exports.useRef(!1),l=h.exports.useCallback(()=>s.current=!1,[]);return h.exports.useEffect(()=>()=>document.removeEventListener("mouseup",l),[l]),h.exports.createElement(gj,J({asChild:!0},o),h.exports.createElement(rn.button,J({"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute},r,{ref:a,onMouseEnter:Ee(e.onMouseEnter,i.onTriggerEnter),onMouseLeave:Ee(e.onMouseLeave,i.onClose),onMouseDown:Ee(e.onMouseDown,()=>{i.onClose(),s.current=!0,document.addEventListener("mouseup",l,{once:!0})}),onFocus:Ee(e.onFocus,()=>{s.current||i.onOpen()}),onBlur:Ee(e.onBlur,i.onClose),onClick:Ee(e.onClick,c=>{c.detail===0&&i.onClose()})})))}),f8e=h.exports.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=M2("TooltipContent",e.__scopeTooltip);return h.exports.createElement(cl,{present:n||i.open},h.exports.createElement(p8e,J({ref:t},r)))}),p8e=h.exports.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,portalled:o=!0,...a}=e,s=M2("TooltipContent",n),l=O2(n),c=o?dj:h.exports.Fragment,{onClose:u}=s;return xj(()=>u()),h.exports.useEffect(()=>(document.addEventListener("tooltip.open",u),()=>document.removeEventListener("tooltip.open",u)),[u]),h.exports.createElement(c,null,h.exports.createElement(m8e,{__scopeTooltip:n}),h.exports.createElement(vj,J({"data-state":s.stateAttribute},l,a,{ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),h.exports.createElement(N6,null,r),h.exports.createElement(a8e,{id:s.contentId,role:"tooltip"},i||r)))}),h8e=h.exports.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=O2(n);return h.exports.createElement(yj,J({},i,r,{ref:t}))});function m8e(e){const{__scopeTooltip:t}=e,n=M2("CheckTriggerMoved",t),r=pj(n.trigger),i=r==null?void 0:r.left,o=I4(i),a=r==null?void 0:r.top,s=I4(a),l=n.onClose;return h.exports.useEffect(()=>{(o!==void 0&&o!==i||s!==void 0&&s!==a)&&l()},[l,o,s,i,a]),null}const g8e=u8e,v8e=d8e,y8e=f8e,b8e=h8e;var pt="colors",vr="sizes",ve="space",DH={gap:ve,gridGap:ve,columnGap:ve,gridColumnGap:ve,rowGap:ve,gridRowGap:ve,inset:ve,insetBlock:ve,insetBlockEnd:ve,insetBlockStart:ve,insetInline:ve,insetInlineEnd:ve,insetInlineStart:ve,margin:ve,marginTop:ve,marginRight:ve,marginBottom:ve,marginLeft:ve,marginBlock:ve,marginBlockEnd:ve,marginBlockStart:ve,marginInline:ve,marginInlineEnd:ve,marginInlineStart:ve,padding:ve,paddingTop:ve,paddingRight:ve,paddingBottom:ve,paddingLeft:ve,paddingBlock:ve,paddingBlockEnd:ve,paddingBlockStart:ve,paddingInline:ve,paddingInlineEnd:ve,paddingInlineStart:ve,top:ve,right:ve,bottom:ve,left:ve,scrollMargin:ve,scrollMarginTop:ve,scrollMarginRight:ve,scrollMarginBottom:ve,scrollMarginLeft:ve,scrollMarginX:ve,scrollMarginY:ve,scrollMarginBlock:ve,scrollMarginBlockEnd:ve,scrollMarginBlockStart:ve,scrollMarginInline:ve,scrollMarginInlineEnd:ve,scrollMarginInlineStart:ve,scrollPadding:ve,scrollPaddingTop:ve,scrollPaddingRight:ve,scrollPaddingBottom:ve,scrollPaddingLeft:ve,scrollPaddingX:ve,scrollPaddingY:ve,scrollPaddingBlock:ve,scrollPaddingBlockEnd:ve,scrollPaddingBlockStart:ve,scrollPaddingInline:ve,scrollPaddingInlineEnd:ve,scrollPaddingInlineStart:ve,fontSize:"fontSizes",background:pt,backgroundColor:pt,backgroundImage:pt,borderImage:pt,border:pt,borderBlock:pt,borderBlockEnd:pt,borderBlockStart:pt,borderBottom:pt,borderBottomColor:pt,borderColor:pt,borderInline:pt,borderInlineEnd:pt,borderInlineStart:pt,borderLeft:pt,borderLeftColor:pt,borderRight:pt,borderRightColor:pt,borderTop:pt,borderTopColor:pt,caretColor:pt,color:pt,columnRuleColor:pt,fill:pt,outline:pt,outlineColor:pt,stroke:pt,textDecorationColor:pt,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:vr,minBlockSize:vr,maxBlockSize:vr,inlineSize:vr,minInlineSize:vr,maxInlineSize:vr,width:vr,minWidth:vr,maxWidth:vr,height:vr,minHeight:vr,maxHeight:vr,flexBasis:vr,gridTemplateColumns:vr,gridTemplateRows:vr,borderWidth:"borderWidths",borderTopWidth:"borderWidths",borderRightWidth:"borderWidths",borderBottomWidth:"borderWidths",borderLeftWidth:"borderWidths",borderStyle:"borderStyles",borderTopStyle:"borderStyles",borderRightStyle:"borderStyles",borderBottomStyle:"borderStyles",borderLeftStyle:"borderStyles",borderRadius:"radii",borderTopLeftRadius:"radii",borderTopRightRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",boxShadow:"shadows",textShadow:"shadows",transition:"transitions",zIndex:"zIndices"},x8e=(e,t)=>typeof t=="function"?{"()":Function.prototype.toString.call(t)}:t,Jd=()=>{const e=Object.create(null);return(t,n,...r)=>{const i=(o=>JSON.stringify(o,x8e))(t);return i in e?e[i]:e[i]=n(t,...r)}},nc=Symbol.for("sxs.internal"),Q6=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),KP=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:S8e}=Object.prototype,T4=e=>e.includes("-")?e:e.replace(/[A-Z]/g,t=>"-"+t.toLowerCase()),w8e=/\s+(?![^()]*\))/,Jc=e=>t=>e(...typeof t=="string"?String(t).split(w8e):[t]),qP={appearance:e=>({WebkitAppearance:e,appearance:e}),backfaceVisibility:e=>({WebkitBackfaceVisibility:e,backfaceVisibility:e}),backdropFilter:e=>({WebkitBackdropFilter:e,backdropFilter:e}),backgroundClip:e=>({WebkitBackgroundClip:e,backgroundClip:e}),boxDecorationBreak:e=>({WebkitBoxDecorationBreak:e,boxDecorationBreak:e}),clipPath:e=>({WebkitClipPath:e,clipPath:e}),content:e=>({content:e.includes('"')||e.includes("'")||/^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e)?e:`"${e}"`}),hyphens:e=>({WebkitHyphens:e,hyphens:e}),maskImage:e=>({WebkitMaskImage:e,maskImage:e}),maskSize:e=>({WebkitMaskSize:e,maskSize:e}),tabSize:e=>({MozTabSize:e,tabSize:e}),textSizeAdjust:e=>({WebkitTextSizeAdjust:e,textSizeAdjust:e}),userSelect:e=>({WebkitUserSelect:e,userSelect:e}),marginBlock:Jc((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e})),marginInline:Jc((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e})),maxSize:Jc((e,t)=>({maxBlockSize:e,maxInlineSize:t||e})),minSize:Jc((e,t)=>({minBlockSize:e,minInlineSize:t||e})),paddingBlock:Jc((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e})),paddingInline:Jc((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e}))},W5=/([\d.]+)([^]*)/,C8e=(e,t)=>e.length?e.reduce((n,r)=>(n.push(...t.map(i=>i.includes("&")?i.replace(/&/g,/[ +>|~]/.test(r)&&/&.*&/.test(i)?`:is(${r})`:r):r+" "+i)),n),[]):t,k8e=(e,t)=>e in E8e&&typeof t=="string"?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,(n,r,i,o)=>r+(i==="stretch"?`-moz-available${o};${T4(e)}:${r}-webkit-fill-available`:`-moz-fit-content${o};${T4(e)}:${r}fit-content`)+o):String(t),E8e={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},ja=e=>e?e+"-":"",AH=(e,t,n)=>e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,(r,i,o,a,s)=>a=="$"==!!o?r:(i||a=="--"?"calc(":"")+"var(--"+(a==="$"?ja(t)+(s.includes("$")?"":ja(n))+s.replace(/\$/g,"-"):s)+")"+(i||a=="--"?"*"+(i||"")+(o||"1")+")":"")),I8e=/\s*,\s*(?![^()]*\))/,T8e=Object.prototype.toString,Au=(e,t,n,r,i)=>{let o,a,s;const l=(c,u,d)=>{let f,p;const m=g=>{for(f in g){const b=f.charCodeAt(0)===64,x=b&&Array.isArray(g[f])?g[f]:[g[f]];for(p of x){const w=/[A-Z]/.test(v=f)?v:v.replace(/-[^]/g,C=>C[1].toUpperCase()),E=typeof p=="object"&&p&&p.toString===T8e&&(!r.utils[w]||!u.length);if(w in r.utils&&!E){const C=r.utils[w];if(C!==a){a=C,m(C(p)),a=null;continue}}else if(w in qP){const C=qP[w];if(C!==s){s=C,m(C(p)),s=null;continue}}if(b&&(y=f.slice(1)in r.media?"@media "+r.media[f.slice(1)]:f,f=y.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,(C,I,T,_,P,M)=>{const D=W5.test(I),V=.0625*(D?-1:1),[B,L]=D?[_,I]:[I,_];return"("+(T[0]==="="?"":T[0]===">"===D?"max-":"min-")+B+":"+(T[0]!=="="&&T.length===1?L.replace(W5,(G,z,j)=>Number(z)+V*(T===">"?1:-1)+j):L)+(P?") and ("+(P[0]===">"?"min-":"max-")+B+":"+(P.length===1?M.replace(W5,(G,z,j)=>Number(z)+V*(P===">"?-1:1)+j):M):"")+")"})),E){const C=b?d.concat(f):[...d],I=b?[...u]:C8e(u,f.split(I8e));o!==void 0&&i(YP(...o)),o=void 0,l(p,I,C)}else o===void 0&&(o=[[],u,d]),f=b||f.charCodeAt(0)!==36?f:`--${ja(r.prefix)}${f.slice(1).replace(/\$/g,"-")}`,p=E?p:typeof p=="number"?p&&w in _8e?String(p)+"px":String(p):AH(k8e(w,p==null?"":p),r.prefix,r.themeMap[w]),o[0].push(`${b?`${f} `:`${T4(f)}:`}${p}`)}}var y,v};m(c),o!==void 0&&i(YP(...o)),o=void 0};l(e,t,n)},YP=(e,t,n)=>`${n.map(r=>`${r}{`).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(n.length?n.length+1:0).join("}")}`,_8e={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},XP=e=>String.fromCharCode(e+(e>25?39:97)),rc=e=>(t=>{let n,r="";for(n=Math.abs(t);n>52;n=n/52|0)r=XP(n%52)+r;return XP(n%52)+r})(((t,n)=>{let r=n.length;for(;r;)t=33*t^n.charCodeAt(--r);return t})(5381,JSON.stringify(e))>>>0),Xf=["themed","global","styled","onevar","resonevar","allvar","inline"],P8e=e=>{if(e.href&&!e.href.startsWith(location.origin))return!1;try{return!!e.cssRules}catch{return!1}},O8e=e=>{let t;const n=()=>{const{cssRules:i}=t.sheet;return[].map.call(i,(o,a)=>{const{cssText:s}=o;let l="";if(s.startsWith("--sxs"))return"";if(i[a-1]&&(l=i[a-1].cssText).startsWith("--sxs")){if(!o.cssRules.length)return"";for(const c in t.rules)if(t.rules[c].group===o)return`--sxs{--sxs:${[...t.rules[c].cache].join(" ")}}${s}`;return o.cssRules.length?`${l}${s}`:""}return s}).join("")},r=()=>{if(t){const{rules:s,sheet:l}=t;if(!l.deleteRule){for(;Object(Object(l.cssRules)[0]).type===3;)l.cssRules.splice(0,1);l.cssRules=[]}for(const c in s)delete s[c]}const i=Object(e).styleSheets||[];for(const s of i)if(P8e(s)){for(let l=0,c=s.cssRules;c[l];++l){const u=Object(c[l]);if(u.type!==1)continue;const d=Object(c[l+1]);if(d.type!==4)continue;++l;const{cssText:f}=u;if(!f.startsWith("--sxs"))continue;const p=f.slice(14,-3).trim().split(/\s+/),m=Xf[p[0]];m&&(t||(t={sheet:s,reset:r,rules:{},toString:n}),t.rules[m]={group:d,index:l,cache:new Set(p)})}if(t)break}if(!t){const s=(l,c)=>({type:c,cssRules:[],insertRule(u,d){this.cssRules.splice(d,0,s(u,{import:3,undefined:1}[(u.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return l==="@media{}"?`@media{${[].map.call(this.cssRules,u=>u.cssText).join("")}}`:l}});t={sheet:e?(e.head||e).appendChild(document.createElement("style")).sheet:s("","text/css"),rules:{},reset:r,toString:n}}const{sheet:o,rules:a}=t;for(let s=Xf.length-1;s>=0;--s){const l=Xf[s];if(!a[l]){const c=Xf[s+1],u=a[c]?a[c].index:o.cssRules.length;o.insertRule("@media{}",u),o.insertRule(`--sxs{--sxs:${s}}`,u),a[l]={group:o.cssRules[u+1],index:u,cache:new Set([s])}}M8e(a[l])}};return r(),t},M8e=e=>{const t=e.group;let n=t.cssRules.length;e.apply=r=>{try{t.insertRule(r,n),++n}catch{}}},Df=Symbol(),R8e=Jd(),ZP=(e,t)=>R8e(e,()=>(...n)=>{let r={type:null,composers:new Set};for(const i of n)if(i!=null)if(i[nc]){r.type==null&&(r.type=i[nc].type);for(const o of i[nc].composers)r.composers.add(o)}else i.constructor!==Object||i.$$typeof?r.type==null&&(r.type=i):r.composers.add(D8e(i,e));return r.type==null&&(r.type="span"),r.composers.size||r.composers.add(["PJLV",{},[],[],{},[]]),A8e(e,r,t)}),D8e=({variants:e,compoundVariants:t,defaultVariants:n,...r},i)=>{const o=`${ja(i.prefix)}c-${rc(r)}`,a=[],s=[],l=Object.create(null),c=[];for(const f in n)l[f]=String(n[f]);if(typeof e=="object"&&e)for(const f in e){u=l,d=f,S8e.call(u,d)||(l[f]="undefined");const p=e[f];for(const m in p){const g={[f]:String(m)};String(m)==="undefined"&&c.push(f);const y=p[m],v=[g,y,!KP(y)];a.push(v)}}var u,d;if(typeof t=="object"&&t)for(const f of t){let{css:p,...m}=f;p=typeof p=="object"&&p||{};for(const y in m)m[y]=String(m[y]);const g=[m,p,!KP(p)];s.push(g)}return[o,r,a,s,l,c]},A8e=(e,t,n)=>{const[r,i,o,a]=L8e(t.composers),s=typeof t.type=="function"||t.type.$$typeof?(d=>{function f(){for(let p=0;p<f[Df].length;p++){const[m,g]=f[Df][p];d.rules[m].apply(g)}return f[Df]=[],null}return f[Df]=[],f.rules={},Xf.forEach(p=>f.rules[p]={apply:m=>f[Df].push([p,m])}),f})(n):null,l=(s||n).rules,c=`.${r}${i.length>1?`:where(.${i.slice(1).join(".")})`:""}`,u=d=>{d=typeof d=="object"&&d||B8e;const{css:f,...p}=d,m={};for(const v in o)if(delete p[v],v in d){let b=d[v];typeof b=="object"&&b?m[v]={"@initial":o[v],...b}:(b=String(b),m[v]=b!=="undefined"||a.has(v)?b:o[v])}else m[v]=o[v];const g=new Set([...i]);for(const[v,b,x,w]of t.composers){n.rules.styled.cache.has(v)||(n.rules.styled.cache.add(v),Au(b,[`.${v}`],[],e,I=>{l.styled.apply(I)}));const E=QP(x,m,e.media),C=QP(w,m,e.media,!0);for(const I of E)if(I!==void 0)for(const[T,_,P]of I){const M=`${v}-${rc(_)}-${T}`;g.add(M);const D=(P?n.rules.resonevar:n.rules.onevar).cache,V=P?l.resonevar:l.onevar;D.has(M)||(D.add(M),Au(_,[`.${M}`],[],e,B=>{V.apply(B)}))}for(const I of C)if(I!==void 0)for(const[T,_]of I){const P=`${v}-${rc(_)}-${T}`;g.add(P),n.rules.allvar.cache.has(P)||(n.rules.allvar.cache.add(P),Au(_,[`.${P}`],[],e,M=>{l.allvar.apply(M)}))}}if(typeof f=="object"&&f){const v=`${r}-i${rc(f)}-css`;g.add(v),n.rules.inline.cache.has(v)||(n.rules.inline.cache.add(v),Au(f,[`.${v}`],[],e,b=>{l.inline.apply(b)}))}for(const v of String(d.className||"").trim().split(/\s+/))v&&g.add(v);const y=p.className=[...g].join(" ");return{type:t.type,className:y,selector:c,props:p,toString:()=>y,deferredInjector:s}};return Q6(u,{className:r,selector:c,[nc]:t,toString:()=>(n.rules.styled.cache.has(r)||u(),r)})},L8e=e=>{let t="";const n=[],r={},i=[];for(const[o,,,,a,s]of e){t===""&&(t=o),n.push(o),i.push(...s);for(const l in a){const c=a[l];(r[l]===void 0||c!=="undefined"||s.includes(c))&&(r[l]=c)}}return[t,n,r,new Set(i)]},QP=(e,t,n,r)=>{const i=[];e:for(let[o,a,s]of e){if(s)continue;let l,c=0,u=!1;for(l in o){const d=o[l];let f=t[l];if(f!==d){if(typeof f!="object"||!f)continue e;{let p,m,g=0;for(const y in f){if(d===String(f[y])){if(y!=="@initial"){const v=y.slice(1);(m=m||[]).push(v in n?n[v]:y.replace(/^@media ?/,"")),u=!0}c+=g,p=!0}++g}if(m&&m.length&&(a={["@media "+m.join(", ")]:a}),!p)continue e}}}(i[c]=i[c]||[]).push([r?"cv":`${l}-${o[l]}`,a,u])}return i},B8e={},$8e=Jd(),F8e=(e,t)=>$8e(e,()=>(...n)=>{const r=()=>{for(let i of n){i=typeof i=="object"&&i||{};let o=rc(i);if(!t.rules.global.cache.has(o)){if(t.rules.global.cache.add(o),"@import"in i){let a=[].indexOf.call(t.sheet.cssRules,t.rules.themed.group)-1;for(let s of[].concat(i["@import"]))s=s.includes('"')||s.includes("'")?s:`"${s}"`,t.sheet.insertRule(`@import ${s};`,a++);delete i["@import"]}Au(i,[],[],e,a=>{t.rules.global.apply(a)})}}return""};return Q6(r,{toString:r})}),N8e=Jd(),z8e=(e,t)=>N8e(e,()=>n=>{const r=`${ja(e.prefix)}k-${rc(n)}`,i=()=>{if(!t.rules.global.cache.has(r)){t.rules.global.cache.add(r);const o=[];Au(n,[],[],e,s=>o.push(s));const a=`@keyframes ${r}{${o.join("")}}`;t.rules.global.apply(a)}return r};return Q6(i,{get name(){return i()},toString:i})}),j8e=class{constructor(e,t,n,r){this.token=e==null?"":String(e),this.value=t==null?"":String(t),this.scale=n==null?"":String(n),this.prefix=r==null?"":String(r)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+ja(this.prefix)+ja(this.scale)+this.token}toString(){return this.computedValue}},H8e=Jd(),V8e=(e,t)=>H8e(e,()=>(n,r)=>{r=typeof n=="object"&&n||Object(r);const i=`.${n=(n=typeof n=="string"?n:"")||`${ja(e.prefix)}t-${rc(r)}`}`,o={},a=[];for(const l in r){o[l]={};for(const c in r[l]){const u=`--${ja(e.prefix)}${l}-${c}`,d=AH(String(r[l][c]),e.prefix,l);o[l][c]=new j8e(c,d,l,e.prefix),a.push(`${u}:${d}`)}}const s=()=>{if(a.length&&!t.rules.themed.cache.has(n)){t.rules.themed.cache.add(n);const l=`${r===e.theme?":root,":""}.${n}{${a.join(";")}}`;t.rules.themed.apply(l)}return n};return{...o,get className(){return s()},selector:i,toString:s}}),W8e=Jd(),JP,U8e=Jd(),LH=e=>{const t=(n=>{let r=!1;const i=W8e(n,o=>{r=!0;const a="prefix"in(o=typeof o=="object"&&o||{})?String(o.prefix):"",s=typeof o.media=="object"&&o.media||{},l=typeof o.root=="object"?o.root||null:globalThis.document||null,c=typeof o.theme=="object"&&o.theme||{},u={prefix:a,media:s,theme:c,themeMap:typeof o.themeMap=="object"&&o.themeMap||{...DH},utils:typeof o.utils=="object"&&o.utils||{}},d=O8e(l),f={css:ZP(u,d),globalCss:F8e(u,d),keyframes:z8e(u,d),createTheme:V8e(u,d),reset(){d.reset(),f.theme.toString()},theme:{},sheet:d,config:u,prefix:a,getCssText:d.toString,toString:d.toString};return String(f.theme=f.createTheme(c)),f});return r||i.reset(),i})(e);return t.styled=(({config:n,sheet:r})=>U8e(n,()=>{const i=ZP(n,r);return(...o)=>{const a=i(...o),s=a[nc].type,l=A.forwardRef((c,u)=>{const d=c&&c.as||s,{props:f,deferredInjector:p}=a(c);return delete f.as,f.ref=u,p?A.createElement(A.Fragment,null,A.createElement(d,f),A.createElement(p,null)):A.createElement(d,f)});return l.className=a.className,l.displayName=`Styled.${s.displayName||s.name||s}`,l.selector=a.selector,l.toString=()=>a.selector,l[nc]=a[nc],l}}))(t),t},G8e=()=>JP||(JP=LH()),Rc=(...e)=>G8e().styled(...e);const{styled:be,createTheme:K8e}=LH({themeMap:{...DH},theme:{colors:{bounds:"rgba(65, 132, 244, 1.000)",boundsBg:"rgba(65, 132, 244, 0.05)",hover:"#ececec",overlay:"rgba(0, 0, 0, 0.15)",overlayContrast:"rgba(255, 255, 255, 0.15)",panel:"#fefefe",panelContrast:"#ffffff",selected:"rgba(66, 133, 244, 1.000)",selectedContrast:"#fefefe",sponsor:"#ec6cb9",sponsorContrast:"#ec6cb944",text:"#333333",tooltip:"#1d1d1d",tooltipContrast:"#ffffff",warn:"rgba(255, 100, 100, 1)"},shadows:{2:"0px 1px 1px rgba(0, 0, 0, 0.14)",3:"0px 2px 3px rgba(0, 0, 0, 0.14)",4:"0px 4px 5px -1px rgba(0, 0, 0, 0.14)",8:"0px 12px 17px rgba(0, 0, 0, 0.14)",12:"0px 12px 17px rgba(0, 0, 0, 0.14)",24:"0px 24px 38px rgba(0, 0, 0, 0.14)",key:"1px 1px rgba(0,0,0,1)",panel:`0px 0px 16px -1px rgba(0, 0, 0, 0.05), 
        0px 0px 16px -8px rgba(0, 0, 0, 0.05), 
        0px 0px 16px -12px rgba(0, 0, 0, 0.12),
        0px 0px 2px 0px rgba(0, 0, 0, 0.08)`},space:{0:"2px",1:"3px",2:"4px",3:"8px",4:"12px",5:"16px"},fontSizes:{0:"10px",1:"12px",2:"13px",3:"16px",4:"18px"},fonts:{ui:'"Recursive", system-ui, sans-serif',body:'"Recursive", system-ui, sans-serif',mono:'"Recursive Mono", monospace'},fontWeights:{},lineHeights:{},letterSpacings:{},sizes:{},borderWidths:{0:"$1"},borderStyles:{},radii:{0:"2px",1:"4px",2:"8px",3:"12px",4:"16px"},zIndices:{},transitions:{}},media:{micro:"(max-width: 370px)",sm:"(min-width: 640px)",md:"(min-width: 768px)",lg:"(min-width: 1024px)"},utils:{zStrokeWidth:()=>e=>Array.isArray(e)?{strokeWidth:`calc(${e[0]}px / var(--camera-zoom))`}:{strokeWidth:`calc(${e}px / var(--camera-zoom))`}}}),q8e=K8e({colors:{bounds:"rgba(38, 150, 255, 1.000)",boundsBg:"rgba(38, 150, 255, 0.05)",hover:"#444A50",overlay:"rgba(0, 0, 0, 0.15)",overlayContrast:"rgba(255, 255, 255, 0.15)",panel:"#363D44",panelContrast:"#49555f",selected:"rgba(38, 150, 255, 1.000)",selectedContrast:"#fefefe",text:"#f8f9fa",tooltip:"#1d1d1d",tooltipContrast:"#ffffff"},shadows:{2:"0px 1px 1px rgba(0, 0, 0, 0.24)",3:"0px 2px 3px rgba(0, 0, 0, 0.24)",4:"0px 4px 5px -1px rgba(0, 0, 0, 0.24)",8:"0px 12px 17px rgba(0, 0, 0, 0.24)",12:"0px 12px 17px rgba(0, 0, 0, 0.24)",24:"0px 24px 38px rgba(0, 0, 0, 0.24)",panel:`0px 0px 16px -1px rgba(0, 0, 0, 0.05), 
      0px 0px 16px -8px rgba(0, 0, 0, 0.09), 
      0px 0px 16px -12px rgba(0, 0, 0, 0.2)`}}),Y8e=()=>$.isDarwin()?"\u2318":"Ctrl";function BH({variant:e,children:t}){return k(X8e,{variant:e,children:t.split("").map((n,r)=>k("span",{children:n.replace("#",Y8e())},r))})}const X8e=be("kbd",{marginLeft:"$3",textShadow:"$2",textAlign:"center",fontSize:"$0",fontFamily:"$ui",color:"$text",background:"none",fontWeight:400,gap:"$1",display:"flex",alignItems:"center","& > span":{padding:"$0",borderRadius:"$0",display:"flex",alignItems:"center",justifyContent:"center"},variants:{variant:{tooltip:{"& > span":{color:"$tooltipContrast",background:"$overlayContrast",boxShadow:"$key",width:"20px",height:"20px"}},menu:{}}}});function yt({children:e,label:t,kbd:n,side:r="top"}){return Z(g8e,{children:[k(v8e,{dir:"ltr",asChild:!0,children:k("span",{children:e})}),Z(Z8e,{dir:"ltr",side:r,sideOffset:8,children:[t,n?k(BH,{variant:"tooltip",children:n}):null,k(Q8e,{})]})]})}const Z8e=be(y8e,{borderRadius:3,padding:"$3 $3 $3 $3",fontSize:"$1",backgroundColor:"$tooltip",color:"$tooltipContrast",boxShadow:"$3",display:"flex",textTransform:"capitalize",alignItems:"center",fontFamily:"$ui",userSelect:"none"}),Q8e=be(b8e,{fill:"$tooltip",margin:"0 8px"});var U5=typeof navigator!="undefined"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function G5(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r):e.attachEvent&&e.attachEvent("on".concat(t),function(){n(window.event)})}function $H(e,t){for(var n=t.slice(0,t.length-1),r=0;r<n.length;r++)n[r]=e[n[r].toLowerCase()];return n}function FH(e){typeof e!="string"&&(e=""),e=e.replace(/\s/g,"");for(var t=e.split(","),n=t.lastIndexOf("");n>=0;)t[n-1]+=",",t.splice(n,1),n=t.lastIndexOf("");return t}function J8e(e,t){for(var n=e.length>=t.length?e:t,r=e.length>=t.length?t:e,i=!0,o=0;o<n.length;o++)r.indexOf(n[o])===-1&&(i=!1);return i}var J6={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":U5?173:189,"=":U5?61:187,";":U5?59:186,"'":222,"[":219,"]":221,"\\":220},Qs={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,command:91},_4={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Un={16:!1,18:!1,17:!1,91:!1},xn={};for(var Om=1;Om<20;Om++)J6["f".concat(Om)]=111+Om;var Dt=[],eO=!1,NH="all",zH=[],R2=function(t){return J6[t.toLowerCase()]||Qs[t.toLowerCase()]||t.toUpperCase().charCodeAt(0)};function jH(e){NH=e||"all"}function kh(){return NH||"all"}function e7e(){return Dt.slice(0)}function t7e(e){var t=e.target||e.srcElement,n=t.tagName,r=!0;return(t.isContentEditable||(n==="INPUT"||n==="TEXTAREA"||n==="SELECT")&&!t.readOnly)&&(r=!1),r}function n7e(e){return typeof e=="string"&&(e=R2(e)),Dt.indexOf(e)!==-1}function r7e(e,t){var n,r;e||(e=kh());for(var i in xn)if(Object.prototype.hasOwnProperty.call(xn,i))for(n=xn[i],r=0;r<n.length;)n[r].scope===e?n.splice(r,1):r++;kh()===e&&jH(t||"all")}function i7e(e){var t=e.keyCode||e.which||e.charCode,n=Dt.indexOf(t);if(n>=0&&Dt.splice(n,1),e.key&&e.key.toLowerCase()==="meta"&&Dt.splice(0,Dt.length),(t===93||t===224)&&(t=91),t in Un){Un[t]=!1;for(var r in Qs)Qs[r]===t&&(ni[r]=!1)}}function o7e(e){if(typeof e=="undefined")Object.keys(xn).forEach(function(a){return delete xn[a]});else if(Array.isArray(e))e.forEach(function(a){a.key&&K5(a)});else if(typeof e=="object")e.key&&K5(e);else if(typeof e=="string"){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=n[0],o=n[1];typeof i=="function"&&(o=i,i=""),K5({key:e,scope:i,method:o,splitKey:"+"})}}var K5=function(t){var n=t.key,r=t.scope,i=t.method,o=t.splitKey,a=o===void 0?"+":o,s=FH(n);s.forEach(function(l){var c=l.split(a),u=c.length,d=c[u-1],f=d==="*"?"*":R2(d);if(!!xn[f]){r||(r=kh());var p=u>1?$H(Qs,c):[];xn[f]=xn[f].filter(function(m){var g=i?m.method===i:!0;return!(g&&m.scope===r&&J8e(m.mods,p))})}})};function tO(e,t,n,r){if(t.element===r){var i;if(t.scope===n||t.scope==="all"){i=t.mods.length>0;for(var o in Un)Object.prototype.hasOwnProperty.call(Un,o)&&(!Un[o]&&t.mods.indexOf(+o)>-1||Un[o]&&t.mods.indexOf(+o)===-1)&&(i=!1);(t.mods.length===0&&!Un[16]&&!Un[18]&&!Un[17]&&!Un[91]||i||t.shortcut==="*")&&t.method(e,t)===!1&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}}function nO(e,t){var n=xn["*"],r=e.keyCode||e.which||e.charCode;if(!!ni.filter.call(this,e)){if((r===93||r===224)&&(r=91),Dt.indexOf(r)===-1&&r!==229&&Dt.push(r),["ctrlKey","altKey","shiftKey","metaKey"].forEach(function(m){var g=_4[m];e[m]&&Dt.indexOf(g)===-1?Dt.push(g):!e[m]&&Dt.indexOf(g)>-1?Dt.splice(Dt.indexOf(g),1):m==="metaKey"&&e[m]&&Dt.length===3&&(e.ctrlKey||e.shiftKey||e.altKey||(Dt=Dt.slice(Dt.indexOf(g))))}),r in Un){Un[r]=!0;for(var i in Qs)Qs[i]===r&&(ni[i]=!0);if(!n)return}for(var o in Un)Object.prototype.hasOwnProperty.call(Un,o)&&(Un[o]=e[_4[o]]);e.getModifierState&&!(e.altKey&&!e.ctrlKey)&&e.getModifierState("AltGraph")&&(Dt.indexOf(17)===-1&&Dt.push(17),Dt.indexOf(18)===-1&&Dt.push(18),Un[17]=!0,Un[18]=!0);var a=kh();if(n)for(var s=0;s<n.length;s++)n[s].scope===a&&(e.type==="keydown"&&n[s].keydown||e.type==="keyup"&&n[s].keyup)&&tO(e,n[s],a,t);if(r in xn){for(var l=0;l<xn[r].length;l++)if((e.type==="keydown"&&xn[r][l].keydown||e.type==="keyup"&&xn[r][l].keyup)&&xn[r][l].key){for(var c=xn[r][l],u=c.splitKey,d=c.key.split(u),f=[],p=0;p<d.length;p++)f.push(R2(d[p]));f.sort().join("")===Dt.sort().join("")&&tO(e,c,a,t)}}}}function a7e(e){return zH.indexOf(e)>-1}function ni(e,t,n){Dt=[];var r=FH(e),i=[],o="all",a=document,s=0,l=!1,c=!0,u="+",d=!1;for(n===void 0&&typeof t=="function"&&(n=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(o=t.scope),t.element&&(a=t.element),t.keyup&&(l=t.keyup),t.keydown!==void 0&&(c=t.keydown),t.capture!==void 0&&(d=t.capture),typeof t.splitKey=="string"&&(u=t.splitKey)),typeof t=="string"&&(o=t);s<r.length;s++)e=r[s].split(u),i=[],e.length>1&&(i=$H(Qs,e)),e=e[e.length-1],e=e==="*"?"*":R2(e),e in xn||(xn[e]=[]),xn[e].push({keyup:l,keydown:c,scope:o,mods:i,shortcut:r[s],method:n,key:r[s],splitKey:u,element:a});typeof a!="undefined"&&!a7e(a)&&window&&(zH.push(a),G5(a,"keydown",function(f){nO(f,a)},d),eO||(eO=!0,G5(window,"focus",function(){Dt=[]},d)),G5(a,"keyup",function(f){nO(f,a),i7e(f)},d))}function s7e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(xn).forEach(function(n){var r=xn[n].find(function(i){return i.scope===t&&i.shortcut===e});r&&r.method&&r.method()})}var q5={setScope:jH,getScope:kh,deleteScope:r7e,getPressedKeyCodes:e7e,isPressed:n7e,filter:t7e,trigger:s7e,unbind:o7e,keyMap:J6,modifier:Qs,modifierMap:_4};for(var Y5 in q5)Object.prototype.hasOwnProperty.call(q5,Y5)&&(ni[Y5]=q5[Y5]);if(typeof window!="undefined"){var l7e=window.hotkeys;ni.noConflict=function(e){return e&&window.hotkeys===ni&&(window.hotkeys=l7e),ni},window.hotkeys=ni}ni.filter=function(){return!0};var HH=function(t,n){var r=t.target,i=r&&r.tagName;return Boolean(i&&n&&n.includes(i))},c7e=function(t){return HH(t,["INPUT","TEXTAREA","SELECT"])};function xe(e,t,n,r){n instanceof Array&&(r=n,n=void 0);var i=n||{},o=i.enableOnTags,a=i.filter,s=i.keyup,l=i.keydown,c=i.filterPreventDefault,u=c===void 0?!0:c,d=i.enabled,f=d===void 0?!0:d,p=i.enableOnContentEditable,m=p===void 0?!1:p,g=h.exports.useRef(null),y=h.exports.useCallback(function(v,b){var x,w;return a&&!a(v)?!u:c7e(v)&&!HH(v,o)||(x=v.target)!=null&&x.isContentEditable&&!m?!0:g.current===null||document.activeElement===g.current||(w=g.current)!=null&&w.contains(document.activeElement)?(t(v,b),!0):!1},r?[g,o,a].concat(r):[g,o,a]);return h.exports.useEffect(function(){if(!f){ni.unbind(e,y);return}return s&&l!==!0&&(n.keydown=!1),ni(e,n||{},y),function(){return ni.unbind(e,y)}},[y,e,f]),g}ni.isPressed;class u7e{constructor(){S(this,"onPinchStart");S(this,"onPinchEnd");S(this,"onPinch");S(this,"onKeyDown");S(this,"onKeyUp");S(this,"onPointerMove");S(this,"onPointerUp");S(this,"onPan");S(this,"onZoom");S(this,"onPointerDown");S(this,"onPointCanvas");S(this,"onDoubleClickCanvas");S(this,"onRightPointCanvas");S(this,"onDragCanvas");S(this,"onReleaseCanvas");S(this,"onPointShape");S(this,"onDoubleClickShape");S(this,"onRightPointShape");S(this,"onDragShape");S(this,"onHoverShape");S(this,"onUnhoverShape");S(this,"onReleaseShape");S(this,"onPointBounds");S(this,"onDoubleClickBounds");S(this,"onRightPointBounds");S(this,"onDragBounds");S(this,"onHoverBounds");S(this,"onUnhoverBounds");S(this,"onReleaseBounds");S(this,"onPointBoundsHandle");S(this,"onDoubleClickBoundsHandle");S(this,"onRightPointBoundsHandle");S(this,"onDragBoundsHandle");S(this,"onHoverBoundsHandle");S(this,"onUnhoverBoundsHandle");S(this,"onReleaseBoundsHandle");S(this,"onPointHandle");S(this,"onDoubleClickHandle");S(this,"onRightPointHandle");S(this,"onDragHandle");S(this,"onHoverHandle");S(this,"onUnhoverHandle");S(this,"onReleaseHandle");S(this,"onShapeBlur");S(this,"onShapeClone")}}function d7e(e){return e.assets!==void 0&&e.name!==void 0&&e.pages!==void 0}var Re=(e=>(e.Transform="transform",e.Translate="translate",e.TransformSingle="transformSingle",e.Brush="brush",e.Arrow="arrow",e.Draw="draw",e.Erase="erase",e.Rotate="rotate",e.Handle="handle",e.Grid="grid",e))(Re||{}),bn=(e=>(e.Idle="idle",e.PointingHandle="pointingHandle",e.PointingBounds="pointingBounds",e.PointingBoundsHandle="pointingBoundsHandle",e.TranslatingLabel="translatingLabel",e.TranslatingHandle="translatingHandle",e.Translating="translating",e.Transforming="transforming",e.Rotating="rotating",e.Pinching="pinching",e.Brushing="brushing",e.Creating="creating",e.EditingText="editing-text",e))(bn||{}),Ea=(e=>(e.Backward="backward",e.Forward="forward",e.ToFront="toFront",e.ToBack="toBack",e))(Ea||{}),Mn=(e=>(e.Top="top",e.CenterVertical="centerVertical",e.Bottom="bottom",e.Left="left",e.CenterHorizontal="centerHorizontal",e.Right="right",e))(Mn||{}),mc=(e=>(e.Horizontal="horizontal",e.Vertical="vertical",e))(mc||{}),gc=(e=>(e.Horizontal="horizontal",e.Vertical="vertical",e))(gc||{}),Eh=(e=>(e.Horizontal="horizontal",e.Vertical="vertical",e))(Eh||{}),U=(e=>(e.Sticky="sticky",e.Ellipse="ellipse",e.Rectangle="rectangle",e.Triangle="triangle",e.TiltedRectangle="TiltedRectangle",e.Diamond="diamond",e.Polygon="polygon",e.Draw="draw",e.Arrow="arrow",e.Line="line",e.Text="text",e.Group="group",e.Image="image",e.Video="video",e.Block="block",e))(U||{}),nd=(e=>(e.Arrow="arrow",e))(nd||{}),Le=(e=>(e.White="#ffffff",e.Gray="#c8c8c8",e.Indigo="#14466e",e.Green2="#003c1e",e.Black="#000000",e.Green="#003c1e",e.Blue="#1e5a82",e.Red="#8c0a0a",e.Purple="#7f00ff",e.Orange="#d27d1e",e.Yellow="#f0af32",e.Brown="#3c2828",e))(Le||{});const P4=e=>{let t="";for(const n in Le)if(e===Le[n]){t=n;break}return t};var Ir=(e=>(e.Small="small",e.Medium="medium",e.Large="large",e))(Ir||{}),It=(e=>(e.Solid="solid",e.Draw="draw",e.Dashed="dashed",e.Dotted="dotted",e))(It||{}),ct=(e=>(e.Start="start",e.Middle="middle",e.End="end",e.Justify="justify",e))(ct||{}),Fn=(e=>(e.Sans="sans",e.Serif="serif",e.Mono="mono",e.Script="script",e))(Fn||{}),Bl=(e=>(e.Image="image",e.Video="video",e.Block="block",e))(Bl||{}),ys=(e=>(e.PNG="png",e.JPG="jpeg",e.WEBP="webp",e.PDF="pdf",e.SVG="svg",e.JSON="json",e))(ys||{});function f7e(e){const t=at(),n=h.exports.useCallback((l=!1)=>{const c=e.current;return l&&t.isMenuOpen?!0:c&&(document.activeElement===c||c.contains(document.activeElement))},[e]);xe("v,1",()=>{!n(!0)||t.selectTool("select")},[t,e.current]),xe("d,p,2",()=>{!n(!0)||t.selectTool(U.Draw)},void 0,[t]),xe("e,3",()=>{!n(!0)||t.selectTool("erase")},void 0,[t]),xe("r,4",()=>{!n(!0)||t.selectTool(U.Rectangle)},void 0,[t]),xe("o,5",()=>{!n(!0)||t.selectTool(U.Ellipse)},void 0,[t]),xe("g,6",()=>{!n()||t.selectTool(U.Triangle)},void 0,[t]),xe("l,7",()=>{!n(!0)||t.selectTool(U.Line)},void 0,[t]),xe("a,8",()=>{!n(!0)||t.selectTool(U.Arrow)},void 0,[t]),xe("t,9",()=>{!n(!0)||t.selectTool(U.Text)},void 0,[t]),xe("s,0",()=>{!n(!0)||t.selectTool(U.Sticky)},void 0,[t]),xe("ctrl+.,\u2318+.",()=>{!n(!0)||t.toggleFocusMode()},void 0,[t]),xe("ctrl+shift+g,\u2318+shift+g",()=>{!n(!0)||t.toggleGrid()},void 0,[t]);const{onNewProject:r,onOpenProject:i,onSaveProject:o,onSaveProjectAs:a,onOpenMedia:s}=h7e();xe("ctrl+n,\u2318+n",l=>{!n()||r(l)},void 0,[t]),xe("ctrl+s,\u2318+s",l=>{!n()||o(l)},void 0,[t]),xe("ctrl+shift+s,\u2318+shift+s",l=>{!n()||a(l)},void 0,[t]),xe("ctrl+o,\u2318+o",l=>{!n()||i(l)},void 0,[t]),xe("ctrl+u,\u2318+u",l=>{!n()||s(l)},void 0,[t]),xe("\u2318+z,ctrl+z",()=>{!n(!0)||(t.session?t.cancelSession():t.undo())},void 0,[t]),xe("ctrl+shift-z,\u2318+shift+z",()=>{!n(!0)||(t.session?t.cancelSession():t.redo())},void 0,[t]),xe("\u2318+u,ctrl+u",()=>{!n()||t.undoSelect()},void 0,[t]),xe("ctrl+shift-u,\u2318+shift+u",()=>{!n()||t.redoSelect()},void 0,[t]),xe("ctrl+=,\u2318+=,ctrl+num_subtract,\u2318+num_subtract",l=>{!n(!0)||(t.zoomIn(),l.preventDefault())},void 0,[t]),xe("ctrl+-,\u2318+-,ctrl+num_add,\u2318+num_add",l=>{!n(!0)||(t.zoomOut(),l.preventDefault())},void 0,[t]),xe("shift+0,ctrl+numpad_0,\u2318+numpad_0",()=>{!n(!0)||t.resetZoom()},void 0,[t]),xe("shift+1",()=>{!n(!0)||t.zoomToFit()},void 0,[t]),xe("shift+2",()=>{!n(!0)||t.zoomToSelection()},void 0,[t]),xe("ctrl+d,\u2318+d",l=>{!n()||(t.duplicate(),l.preventDefault())},void 0,[t]),xe("shift+h",()=>{!n(!0)||t.flipHorizontal()},void 0,[t]),xe("shift+v",()=>{!n(!0)||t.flipVertical()},void 0,[t]),xe("escape",()=>{!n(!0)||t.cancel()},void 0,[t]),xe("backspace,del",()=>{!n()||t.delete()},void 0,[t]),xe("\u2318+a,ctrl+a",()=>{!n(!0)||t.selectAll()},void 0,[t]),xe("up",()=>{!n()||t.nudge([0,-1],!1)},void 0,[t]),xe("right",()=>{!n()||t.nudge([1,0],!1)},void 0,[t]),xe("down",()=>{!n()||t.nudge([0,1],!1)},void 0,[t]),xe("left",()=>{!n()||t.nudge([-1,0],!1)},void 0,[t]),xe("shift+up",()=>{!n()||t.nudge([0,-1],!0)},void 0,[t]),xe("shift+right",()=>{!n()||t.nudge([1,0],!0)},void 0,[t]),xe("shift+down",()=>{!n()||t.nudge([0,1],!0)},void 0,[t]),xe("shift+left",()=>{!n()||t.nudge([-1,0],!0)},void 0,[t]),xe("\u2318+shift+l,ctrl+shift+l",()=>{!n()||t.toggleLocked()},void 0,[t]),xe("\u2318+c,ctrl+c",()=>{!n()||t.copy()},void 0,[t]),xe("\u2318+x,ctrl+x",()=>{!n()||t.cut()},void 0,[t]),xe("\u2318+v,ctrl+v",()=>{!n()||t.paste()},void 0,[t]),xe("\u2318+g,ctrl+g",l=>{!n()||(t.group(),l.preventDefault())},void 0,[t]),xe("\u2318+shift+g,ctrl+shift+g",l=>{!n()||(t.ungroup(),l.preventDefault())},void 0,[t]),xe("[",()=>{!n(!0)||t.moveBackward()},void 0,[t]),xe("]",()=>{!n(!0)||t.moveForward()},void 0,[t]),xe("shift+[",()=>{!n(!0)||t.moveToBack()},void 0,[t]),xe("shift+]",()=>{!n(!0)||t.moveToFront()},void 0,[t]),xe("ctrl+shift+backspace,\u2318+shift+backspace",l=>{!n()||(t.settings.isDebugMode&&t.resetDocument(),l.preventDefault())},void 0,[t]),xe("alt+command+l,alt+ctrl+l",l=>{!n(!0)||(t.style({textAlign:ct.Start}),l.preventDefault())},void 0,[t]),xe("alt+command+t,alt+ctrl+t",l=>{!n(!0)||(t.style({textAlign:ct.Middle}),l.preventDefault())},void 0,[t]),xe("alt+command+r,alt+ctrl+r",l=>{!n(!0)||(t.style({textAlign:ct.End}),l.preventDefault())},void 0,[t])}const VH=h.exports.createContext({});function at(){return h.exports.useContext(VH)}const X5=new Map,Af="Tldraw-fonts",rO=`
@import url('https://fonts.googleapis.com/css2?family=Caveat+Brush&family=Source+Code+Pro&family=Source+Sans+Pro&family=Crimson+Pro&display=block');
`;function p7e(){h.exports.useLayoutEffect(()=>{if(X5.get(Af))return;const e=document.createElement("style");return e.innerHTML=rO,e.setAttribute("id",Af),document.head.appendChild(e),X5.set(Af,e),()=>{e&&document.head.contains(e)&&(document.head.removeChild(e),X5.delete(Af))}},[Af,rO])}function h7e(){const e=at(),t=h.exports.useCallback(async a=>{var s,l;a&&e.callbacks.onOpenProject&&a.preventDefault(),(l=(s=e.callbacks).onNewProject)==null||l.call(s,e)},[e]),n=h.exports.useCallback(a=>{var s,l;a&&e.callbacks.onOpenProject&&a.preventDefault(),(l=(s=e.callbacks).onSaveProject)==null||l.call(s,e)},[e]),r=h.exports.useCallback(a=>{var s,l;a&&e.callbacks.onOpenProject&&a.preventDefault(),(l=(s=e.callbacks).onSaveProjectAs)==null||l.call(s,e)},[e]),i=h.exports.useCallback(async a=>{var s,l;a&&e.callbacks.onOpenProject&&a.preventDefault(),(l=(s=e.callbacks).onOpenProject)==null||l.call(s,e)},[e]),o=h.exports.useCallback(async a=>{var s,l;a&&e.callbacks.onOpenMedia&&a.preventDefault(),(l=(s=e.callbacks).onOpenMedia)==null||l.call(s,e)},[e]);return{onNewProject:t,onSaveProject:n,onSaveProjectAs:r,onOpenProject:i,onOpenMedia:o}}const Me=h.exports.forwardRef(({onSelect:e,onClick:t,onDoubleClick:n,variant:r,children:i,isToolLocked:o=!1,disabled:a=!1,isActive:s=!1,isSponsor:l=!1,onKeyDown:c,label:u,...d},f)=>{let p=Z(m7e,{ref:f,isActive:s,isSponsor:l,variant:r,onClick:t,disabled:a,onPointerDown:e,onDoubleClick:n,onKeyDown:c,bp:Wo,...d,children:[k(Si,{children:i}),o&&k(g7e,{})]});return u&&(p=k(yt,{label:u,children:p})),p});function eu({label:e,kbd:t,isLocked:n,...r}){const i=at(),o=h.exports.useCallback(()=>{i.toggleToolLock()},[]),a=h.exports.useCallback(s=>{s.key===" "&&i.isForcePanning&&s.preventDefault()},[]);return k(yt,{label:e[0].toUpperCase()+e.slice(1),kbd:t,children:k(Me,{...r,variant:"primary",isToolLocked:n&&r.isActive,onDoubleClick:o,onKeyDown:a})})}const Si=be("div",{position:"relative",height:"100%",width:"100%",backgroundColor:"$panel",borderRadius:"$2",margin:"0",display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"$ui",color:"inherit",userSelect:"none",boxSizing:"border-box",border:"1px solid transparent"}),m7e=be("button",{position:"relative",color:"$text",fontSize:"$0",background:"none",margin:"0",padding:"$2",display:"flex",alignItems:"center",justifyContent:"center",outline:"none",cursor:"pointer",pointerEvents:"all",border:"none",height:"40px",width:"40px",[`&:disabled ${Si}`]:{opacity:.618},variants:{variant:{primary:{marginTop:"0"},icon:{[`& ${Si}`]:{display:"grid","& > *":{gridRow:1,gridColumn:1}}},text:{width:"auto",[`& ${Si}`]:{fontSize:"$1",padding:"0 $3",gap:"$3"}},circle:{padding:"$2",[`& ${Si}`]:{border:"1px solid $panelContrast",borderRadius:"100%",boxShadow:"$panel"},[`& ${Si} > svg`]:{width:14,height:14}}},isSponsor:{true:{[`${Si}`]:{backgroundColor:"$sponsorContrast"}}},isActive:{true:{},false:{}},bp:{mobile:{},small:{}}},compoundVariants:[{variant:"primary",bp:"mobile",css:{height:"40px",width:"40px",[`& ${Si} > svg`]:{width:16,height:16}}},{variant:"primary",bp:"small",css:{height:"44px",width:"44px",[`& ${Si} > svg`]:{width:20,height:20}}},{isActive:!0,isSponsor:!1,css:{[`${Si}`]:{backgroundColor:"$selected",color:"$selectedContrast"}}},{isActive:!1,isSponsor:!1,bp:"small",css:{[`&:hover:not(:disabled) ${Si}`]:{backgroundColor:"$hover",border:"1px solid $panel"},[`&:focus:not(:disabled) ${Si}`]:{backgroundColor:"$hover"}}}]}),g7e=be("div",{position:"absolute",width:10,height:10,backgroundColor:"$selected",borderRadius:"100%",bottom:-2,border:"2px solid $panel",zIndex:100});function v7e(e){return["private","public"].some(n=>n===e)}var Ge=(e=>(e.ARTICLES="articles",e.CATEGORIES="categories",e.EVENTS="events",e.IMAGES="images",e.MAPS="maps",e.CANVASES="canvases",e.NOTES="notes",e.SECRETS="secrets",e.STATBLOCKS="statblocks",e.TIMELINES="timelines",e))(Ge||{}),O4=(e=>(e.toClient="sendCanvas",e.informNewUserJoinedRoom="informNewUserJoinedRoom",e.informCanvasState="informCanvasState",e))(O4||{}),M4=(e=>(e.enterRoom="enterRoom",e.toServer="toServer",e))(M4||{}),Tt=(e=>(e.ICON="ICON",e.ICON_W_TEXT="ICON_W_TEXT",e.DEFAULT="DEFAULT",e.BOOK="BOOK",e.MASK="MASK",e))(Tt||{});const vn={uuid:"",tlStrokeColor:void 0,tlShowText:!0,tlBgColor:Wye,tlTitle:"",tlUrl:"https://www.worldanvil.com/404",tlIcon:"ra ra-anvil"},y7e={tlStrokeColor:vn==null?void 0:vn.tlStrokeColor,tlBgColor:vn==null?void 0:vn.tlBgColor,recentIcons:[],tlShowText:vn==null?void 0:vn.tlShowText,tlCanvasBackground:void 0,DANGEROUSLY_SET_CSS:{cursor:"pointer"}};var sr=(e=>(e.title="tlTitle",e.url="tlUrl",e.image="tlBgImage",e.canvas="canvas",e.background="background",e))(sr||{});const b7e=2,x7e=e=>{const t=e8(e);switch(e.blockType){case"BOOK":case"DEFAULT":case"ICON":case"MASK":return t.map(n=>n*b7e);default:return[1/0,1/0]}},e8=e=>{switch(e.blockType){case"BOOK":return[320,448];case"DEFAULT":return[320,192];case"ICON":return e.tlShowText?[192,80]:[80,80];case"MASK":switch(e==null?void 0:e.tlMaskType){case"banner":return[117,175];case"shield":return[148,175];case"circle":default:return[175,175]}default:return[0,0]}},WH=(e,t="px")=>{const n=e8(e);return t==="em"?n.map(r=>r/16):n},S7e=e=>{switch(e.blockType){case"MASK":case"BOOK":case"DEFAULT":case"ICON":return!0;default:return!1}},[UH,zFe]=ko("DropdownMenu",[k2]),mi=k2(),[GH,t8]=UH("DropdownMenu"),w7e=e=>{const{__scopeDropdownMenu:t,children:n,open:r,defaultOpen:i,onOpenChange:o}=e,a=I7e("DropdownMenu",t),s=mi(t),[l=!1,c]=b2({prop:r,defaultProp:i,onChange:o}),u=h.exports.useCallback(()=>c(d=>!d),[c]);return a.isInsideContent?h.exports.createElement(GH,{scope:t,isRootMenu:!1,open:l,onOpenChange:c,onOpenToggle:u},h.exports.createElement(Oj,J({},s,{open:l,onOpenChange:c}),n)):h.exports.createElement(C7e,J({},e,{open:l,onOpenChange:c,onOpenToggle:u}),n)},C7e=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,onOpenChange:o,onOpenToggle:a,modal:s=!0}=e,l=mi(t),c=h.exports.useRef(null);return h.exports.createElement(GH,{scope:t,isRootMenu:!0,triggerId:Pa(),triggerRef:c,contentId:Pa(),open:i,onOpenChange:o,onOpenToggle:a,modal:s},h.exports.createElement(Pj,J({},l,{open:i,onOpenChange:o,dir:r,modal:s}),n))},k7e=h.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=t8("DropdownMenuTrigger",n),a=mi(n);return o.isRootMenu?h.exports.createElement(Mj,J({asChild:!0},a),h.exports.createElement(rn.button,J({type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":!!o.open||void 0,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r},i,{ref:x2(t,o.triggerRef),onPointerDown:Ee(e.onPointerDown,s=>{r||s.button!==0||s.ctrlKey!==!1||(o.open||s.preventDefault(),o.onOpenToggle())}),onKeyDown:Ee(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&o.onOpenToggle(),s.key==="ArrowDown"&&o.onOpenChange(!0),[" ","ArrowDown"].includes(s.key)&&s.preventDefault())})}))):null}),[E7e,I7e]=UH("DropdownMenuContent",{isInsideContent:!1}),T7e=h.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=t8("DropdownMenuContent",n),o=mi(n),a={...r,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)"}};return h.exports.createElement(E7e,{scope:n,isInsideContent:!0},i.isRootMenu?h.exports.createElement(_7e,J({__scopeDropdownMenu:n},a,{ref:t})):h.exports.createElement(E2,J({},o,a,{ref:t})))}),_7e=h.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,portalled:r=!0,...i}=e,o=t8("DropdownMenuContent",n),a=mi(n),s=h.exports.useRef(!1);return o.isRootMenu?h.exports.createElement(E2,J({id:o.contentId,"aria-labelledby":o.triggerId},a,i,{ref:t,portalled:r,onCloseAutoFocus:Ee(e.onCloseAutoFocus,l=>{var c;s.current||(c=o.triggerRef.current)===null||c===void 0||c.focus(),s.current=!1,l.preventDefault()}),onInteractOutside:Ee(e.onInteractOutside,l=>{const c=l.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;o.modal&&!d||(s.current=!0)})})):null}),P7e=h.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mi(n);return h.exports.createElement(Dj,J({},i,r,{ref:t}))}),O7e=h.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mi(n);return h.exports.createElement(Rj,J({},i,r,{ref:t}))}),M7e=h.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mi(n);return h.exports.createElement(kwe,J({},i,r,{ref:t}))}),KH=h.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mi(n);return h.exports.createElement(Ewe,J({},i,r,{ref:t}))}),R7e=h.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mi(n);return h.exports.createElement(Iwe,J({},i,r,{ref:t}))}),D7e=h.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mi(n);return h.exports.createElement(Twe,J({},i,r,{ref:t}))}),A7e=h.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mi(n);return h.exports.createElement(_we,J({},i,r,{ref:t}))}),L7e=h.exports.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mi(n);return h.exports.createElement(Aj,J({},i,r,{ref:t}))}),Ka=w7e,dl=k7e,D2=T7e,Kl=P7e,B7e=O7e,$7e=M7e,F7e=KH,qH=R7e,YH=D7e,N7e=A7e,n8=L7e,z7e=Rc(D2,{minHeight:"10vh",backgroundColor:"white",borderRadius:6,alignOffset:10,sideOffset:5,padding:0,maxWidth:"25rem",minWidth:"25rem",boxShadow:"0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2)"}),j7e=Rc(n8,{fill:"white",height:10,width:20,offset:500}),H7e=Ka,V7e=dl,W7e=[U.Block],$u=class{static extractBgImage(t,n){if(typeof t=="string")return t;let r=function(){var i,o,a,s,l,c;switch(n){case Ge.ARTICLES:return t.template==="person"?(a=(i=t.portrait)==null?void 0:i.url)!=null?a:(o=t.cover)==null?void 0:o.url:(c=(s=t.cover)==null?void 0:s.url)!=null?c:(l=t.portrait)==null?void 0:l.url;case Ge.MAPS:case Ge.IMAGES:return t.url;case Ge.TIMELINES:case Ge.CATEGORIES:case Ge.SECRETS:case Ge.NOTES:default:return}}();return uo.isDevelopment&&(r="http://placekitten.com/g/200/300"),r||void 0}};let Jt=$u;S(Jt,"articleToWaAtom",t=>{var i,o,a;const n=Ge.ARTICLES;return{...vn,uuid:`${t.id}`,tlUrl:t.url,tlIcon:t.icon,tlBgImage:$u.extractBgImage(t,n),tlAltImage:(a=(i=t==null?void 0:t.portrait)==null?void 0:i.url)!=null?a:(o=t==null?void 0:t.flag)==null?void 0:o.url,tlTitle:t.title,author:typeof(t==null?void 0:t.author)!="string"?t.author:void 0,likes:t==null?void 0:t.likes,views:t==null?void 0:t.views,excerpt:t==null?void 0:t.excerpt,template:t.template,rawData:t,tlWaType:n}}),S(Jt,"imageToWaAtom",t=>{var i,o,a;const n=$u.extractBgImage(t,Ge.IMAGES);return{...vn,uuid:`${t.id}`,tlUrl:t.url,tlIcon:t==null?void 0:t.icon,tlBgImage:n===""?t.id+"":n,tlTitle:t.title,author:typeof t.author!="string"?t.author:void 0,likes:void 0,views:void 0,excerpt:(a=(o=(i=t==null?void 0:t.description)!=null?i:t==null?void 0:t.alt)!=null?o:t==null?void 0:t.title)!=null?a:"",rawData:t,tlWaType:Ge.IMAGES}}),S(Jt,"mapToWaAtom",(t,n)=>{var a,s,l,c,u,d,f;const r=Ge.MAPS,i=$u.extractBgImage(n!=null?n:"",r);return console.log(t),{...vn,uuid:`${t.id}`,tlUrl:(s=(a=t.page_url)!=null?a:t==null?void 0:t.url)!=null?s:"",tlIcon:t.icon,tlBgImage:i,tlTitle:t.title,author:(d=(u=(l=t==null?void 0:t.owner)==null?void 0:l.title)!=null?u:(c=t==null?void 0:t.author)==null?void 0:c.title)!=null?d:"",excerpt:(f=t.description)!=null?f:"",template:"Map",rawData:t,tlWaType:r}}),S(Jt,"timelineToWaAtom",t=>{var i,o,a,s,l,c;const n=Ge.TIMELINES;return{...vn,uuid:`${t.id}`,tlUrl:(o=(i=t.page_url)!=null?i:t==null?void 0:t.url)!=null?o:"",tlIcon:t.icon,tlBgImage:void 0,tlTitle:t.title,author:(c=(l=(a=t==null?void 0:t.owner)==null?void 0:a.title)!=null?l:(s=t==null?void 0:t.author)==null?void 0:s.title)!=null?c:"",excerpt:t.description||"",template:"Timeline",rawData:t,tlWaType:n}}),S(Jt,"categoryToWaAtom",t=>{const n=Ge.CATEGORIES;return{...vn,uuid:`${t.id}`,tlUrl:t.url,tlIcon:t.icon,tlBgImage:$u.extractBgImage(t,n),tlTitle:t.title,excerpt:t.description||"",template:"Category",rawData:t,tlWaType:n}}),S(Jt,"secretToWaAtom",t=>{const n=Ge.SECRETS;return{...vn,uuid:`${t.id}`,tlUrl:void 0,tlIcon:t.icon,tlBgImage:void 0,tlTitle:t.title,author:typeof(t==null?void 0:t.author)!="string"?t.author:void 0,excerpt:void 0,rawData:t,template:"Secret",tlWaType:n}}),S(Jt,"canvasToWaAtom",t=>{const n=Ge.CANVASES;return{...vn,uuid:`${t.id}`,tlUrl:void 0,tlIcon:t.icon,tlBgImage:void 0,tlTitle:t.title,author:typeof(t==null?void 0:t.author)!="string"?t.author:void 0,excerpt:void 0,rawData:t,template:"Canvas",tlWaType:n}}),S(Jt,"statblockToWaAtom",t=>{var i,o,a,s,l,c;const n=Ge.STATBLOCKS;return{...vn,uuid:`${t.id}`,tlUrl:(o=(i=t.page_url)!=null?i:t==null?void 0:t.url)!=null?o:"",tlIcon:t.icon,tlBgImage:void 0,tlTitle:t.title,author:typeof(t==null?void 0:t.author)!="string"?t.author:void 0,excerpt:(c=(l=(a=t.template)==null?void 0:a.title)!=null?l:(s=t.data)==null?void 0:s.name)!=null?c:"",rawData:t,template:"Statblock",tlWaType:n}}),S(Jt,"eventToWaAtom",t=>{var i,o,a,s;const n=Ge.EVENTS;return{...vn,uuid:`${t.id}`,tlUrl:(o=(i=t.page_url)!=null?i:t==null?void 0:t.url)!=null?o:"",tlIcon:t.icon,tlBgImage:void 0,tlTitle:t.title,author:typeof(t==null?void 0:t.author)!="string"?t.author:void 0,excerpt:(s=(a=t.content_parsed)!=null?a:t.content)!=null?s:"",rawData:t,template:"Event",tlWaType:n}}),S(Jt,"notesToWaAtom",t=>{var i,o,a,s;const n=Ge.NOTES;return{...vn,uuid:`${t.id}`,tlUrl:void 0,tlIcon:t.icon,tlBgColor:(i=t.color)!=null?i:vn.tlBgColor,tlBgImage:void 0,tlTitle:(o=t.title)!=null?o:"Untitled",author:typeof(t==null?void 0:t.author)!="string"?t.author:void 0,excerpt:(s=(a=t.content_parsed)!=null?a:t.content)!=null?s:"",template:"Notes",rawData:t,tlWaType:n}});function U7e(e,t){let n;switch(e){case Ge.ARTICLES:n=r=>Promise.resolve({...Jt.articleToWaAtom(r),blockType:Tt.DEFAULT});break;case Ge.IMAGES:n=async({id:r})=>{const i=await(t==null?void 0:t.getImages(r));if(i)return{...Jt.imageToWaAtom(i),blockType:Tt.DEFAULT}};break;case Ge.TIMELINES:n=async({id:r})=>{const i=await(t==null?void 0:t.getTimeline(r));if(i)return{...Jt.timelineToWaAtom(i),blockType:Tt.DEFAULT}};break;case Ge.MAPS:n=async({id:r})=>{var a,s;const i=await(t==null?void 0:t.getMap(r)),o=await(t==null?void 0:t.getImages((s=(a=i==null?void 0:i.image)==null?void 0:a.id)!=null?s:void 0));if(i)return{...Jt.mapToWaAtom(i,o),blockType:Tt.DEFAULT}};break;case Ge.SECRETS:n=async({id:r})=>{const i=await(t==null?void 0:t.getSecret(r));if(i)return{...Jt.secretToWaAtom(i),blockType:Tt.DEFAULT}};break;case Ge.CATEGORIES:n=async({id:r})=>{const i=await(t==null?void 0:t.getCategory(r));if(i)return{...Jt.categoryToWaAtom(i),blockType:Tt.DEFAULT}};break;case Ge.CANVASES:n=async r=>{const i=await(t==null?void 0:t.getExternalCanvas(r.id));if(i)return Promise.resolve({...Jt.canvasToWaAtom(i),blockType:Tt.DEFAULT})};break;case Ge.STATBLOCKS:n=async r=>{const i=await(t==null?void 0:t.getStatBlock(r.id));if(i)return Promise.resolve({...Jt.statblockToWaAtom(i),blockType:Tt.DEFAULT})};break;case Ge.EVENTS:n=async r=>{const i=await(t==null?void 0:t.getEvent(r.id));if(i)return Promise.resolve({...Jt.eventToWaAtom(i),blockType:Tt.DEFAULT})};break;case Ge.NOTES:n=async r=>{const i=await(t==null?void 0:t.getNote(r.id));if(i)return Promise.resolve({...Jt.notesToWaAtom(i),blockType:Tt.DEFAULT})};break;default:n=async r=>{};break}return n}const XH=e=>{var o,a,s;const{onSearchTerm:t}=e,n=vy(),[r,i]=A.useState("");return A.useEffect(()=>{t(r)},[r]),Z(J9,{__css:n.searchBar,className:(o=e.className)!=null?o:"",children:[k(Wd,{onChange:({target:{value:l}})=>i(l),placeholder:e.placeholder,__css:n.searchBarInput,_focus:{border:"none",boxShadow:"none"}}),k(Ly,{children:k(lc,{"aria-label":e.placeholder,onClick:()=>t(r),children:k(Kt,{icon:"fas fa-search",iconProps:{color:(s=(a=n==null?void 0:n.searchBar)==null?void 0:a.color)!=null?s:""}})})})]})};var r8={};Object.defineProperty(r8,"__esModule",{value:!0});var ZH=r8.sanitizeUrl=void 0,G7e=/^([^\w]*)(javascript|data|vbscript)/im,K7e=/&#(\w+)(^\w|;)?/g,q7e=/&(newline|tab);/gi,Y7e=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,X7e=/^.+(:|&colon;)/gim,Z7e=[".","/"];function Q7e(e){return Z7e.indexOf(e[0])>-1}function J7e(e){return e.replace(K7e,function(t,n){return String.fromCharCode(n)})}function eke(e){var t=J7e(e||"").replace(q7e,"").replace(Y7e,"").trim();if(!t)return"about:blank";if(Q7e(t))return t;var n=t.match(X7e);if(!n)return t;var r=n[0];return G7e.test(r)?"about:blank":t}ZH=r8.sanitizeUrl=eke;const tke=/https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()!@:%_\+.~#?&\/\/=]*)/,nke=e=>{var f;const{onSaveInput:t,defaultValue:n}=e,r=vy(),[i,o]=h.exports.useState(!0),[a,s]=A.useState(n),[l,c]=h.exports.useState(!1),u=Bye({title:"Adding url",description:"Please make sure the url is valid",position:"bottom-right",variant:"subtle"});A.useEffect(()=>{s(n)},[n]),A.useEffect(()=>{c(!1),a!==""&&o(!tke.test(a))},[a]);const d=()=>{i?u():t(ZH(a))};return Z(J9,{__css:r.searchBar,className:(f=e.className)!=null?f:"",children:[k(Wd,{type:"url",minWidth:"15em",isInvalid:i,onChange:p=>{p.stopPropagation(),s(p.target.value)},onKeyPress:p=>{p.key==="Enter"&&d()},value:a,placeholder:"https://",__css:r.searchBarInput,_focus:{border:"none",boxShadow:"none"},focusBorderColor:l?"green.300":"blue.500",errorBorderColor:"red.300"}),k(Ly,{children:k(lc,{"aria-label":e.defaultValue,onClick:d,children:k(Kt,{icon:"fas fa-save"})})})]})},rke=e=>{const t=vt("SearchMenu",{variant:"icon"});return k(Xl,{value:t,children:k(nke,{...e})})},QH=e=>k(_e,{padding:"0 1rem",paddingBottom:"0",children:k(Sr,{children:e.term==""?e.strPleaseInputText:e.term.length>=3?e.strNoTextAvailable:e.strNotEnoughCharacters})}),ike=e=>{const{data:{title:t,elements:n,extendData:r},isSingleCategory:i}=e,{t:o}=dn("",{keyPrefix:"externalUI"}),a=n&&n.length>0,s=l=>{var u,d;const c=async()=>{try{const f=await r(l);f&&e.onClickElement(f)}catch(f){console.error(f)}};return k(oke,{title:(u=l.title)!=null?u:"",icon:(d=l.icon)!=null?d:"ra ra-anvil",onClickElement:c},l.id)};return k(UL,{border:"hidden",className:"category-row",isDisabled:!a,children:({isExpanded:l})=>Z(Pe,{children:[i?k(_3,{style:{visibility:"hidden",padding:0}}):k(_3,{children:Z(_e,{flex:"1",textAlign:"left",justifyContent:"flex-start",display:"flex",children:[a?l?k(Kt,{icon:"fas fa-chevron-right"}):k(Kt,{icon:"fas fa-chevron-up"}):k("div",{className:"separator",style:{width:"20px"}}),k(Sr,{textAlign:"start",fontWeight:"semibold",textTransform:"capitalize",children:o(t)})]})}),a&&k(GL,{children:n&&n.map(s)},t)]})})},oke=({onClickElement:e,title:t,icon:n})=>Z(_e,{onClick:e,as:"button",flex:"1",display:"flex",paddingLeft:"1rem",justifyContent:"flex-start",children:[k(Kt,{icon:n}),k(Sr,{marginInlineStart:"1rem",textAlign:"start",children:t})]}),ake=e=>{var c;const{results:t,onClickElement:n,onSearchTerm:r,searchTerm:i,loading:o}=e,a=vy(),{t:s}=dn("",{keyPrefix:"search"}),l={element:"elements"};return Z(_e,{className:"search-menu-content",children:[k(XH,{onSearchTerm:r,placeholder:s("search"),className:"search-menu-bar"}),k(W9,{__css:(c=a.accordion)!=null?c:{},defaultIndex:0,className:"search-menu-accordion",children:t.length?t.map(u=>k(ike,{data:u,onClickElement:n,isSingleCategory:e.isSingleCategory},u.title)):o?k(Pe,{}):k(QH,{term:i!=null?i:"",strNotEnoughCharacters:s("notEnoughElement",{element:3}),strPleaseInputText:s("promptSearch"),strNoTextAvailable:s("noElementAvailable",l)})})]})},Mg=e=>{const{worldId:t,api:n,serverUrl:r,userId:i}=kd(g=>g.user),[o,a]=f5e(),[s,l]=h.exports.useState([]),[c,u]=h.exports.useState(),[d,f]=h.exports.useState(!1),p=()=>l([]),m=e.acceptedCategories?Array.isArray(e.acceptedCategories)?e.acceptedCategories:[e.acceptedCategories]:Object.values(Ge);return h.exports.useEffect(()=>{p()},[]),h.exports.useEffect(()=>{typeof c=="string"&&(c==""?p():c.trim().length<3?lt.debug("Term too small"+c):o({worldId:t,term:c,serverUrl:r,userId:i}))},[c]),h.exports.useEffect(()=>{if(typeof(a==null?void 0:a.data)!="undefined"){let g=a.data;e.acceptedCategories&&(f(m.length===1),g=ske(a.data,m));const y=Object.entries(g).map(([v,b])=>{var w;if(((w=e==null?void 0:e.acceptedCategories)!=null?w:Object.values(Ge)).includes(v)&&Array.isArray(b)&&(b==null?void 0:b.length)){let E;const C=U7e(v,n);if(b!=null&&b.length)return E={title:v,elements:b,extendData:C},E}lt.warning("Category not exists in system "+v+JSON.stringify(b))}).filter(Boolean);l(y)}},[a]),k(ake,{onSearchTerm:u,results:s,searchTerm:c!=null?c:"",onClickElement:e.onClickElement,acceptedCategories:m,isSingleCategory:d,loading:a.isLoading})};function ske(e,t){return Object.entries(e).filter(n=>{const[r]=n;return t.some(i=>i===r)}).reduce((n,r)=>{if(r&&r[0]){const[i,o]=r;return{...n,[i]:o}}else return n},{})}const lke=({showArrow:e,isToolLocked:t,activeTool:n,onClick:r})=>{const i=vt("SearchMenu",{}),o=at();dn("",{keyPrefix:"externalUI"});const[a,s]=A.useState(!1),l=W7e.includes(n),c=A.useCallback(()=>{o.selectTool("select")},[n,o]),u=A.useCallback(p=>{p.key===" "&&o.shiftKey&&p.preventDefault()},[]),d=A.useCallback(async p=>{p!=null&&p.tlWaType?p.tlWaType==Ge.IMAGES&&p.tlBgImage?o.addWaImage({...p}):o.addWaElement(p):console.error(`No type for block, please${p}`),s(!1),r()},[]),f=()=>s(!1);return Z(H7e,{onOpenChange:c,open:a,defaultOpen:!1,children:[k(V7e,{asChild:!0,children:k(Me,{variant:"primary",isToolLocked:l&&t,isActive:l,onKeyDown:u,onClick:()=>s(!0),children:k(lc,{as:"div",bgColor:"green.500",_hover:{background:"gray.200"},isRound:!0,size:"md","aria-label":"Show Elements",children:k(Kt,{icon:"fa-solid fa-plus",iconProps:{color:"white",size:"lg"}})})})}),Z(z7e,{onEscapeKeyDown:f,onPointerDownOutside:f,avoidCollisions:!1,loop:!0,side:"top",alignOffset:10,sideOffset:10,className:"dd-menu-content",children:[k(_e,{__css:i.container,className:"search-menu-container",children:k(Xl,{value:i,children:k(Mg,{onClickElement:d})})}),e&&k(j7e,{})]})]},"dd-menu")},cke=e=>{const n=at().useStore(f=>{var p;return(p=f.document.userSettings)==null?void 0:p.recentIcons}),r=vt("SearchMenu",{variant:"icon"}),{search:i,result:o}=G6e(),[a,s]=A.useState("");A.useEffect(()=>{a.length<3||a===""?lt.debug("Term too small "+a):i(a)},[a]);const{t:l}=dn("",{keyPrefix:"search"}),c=o.length===0,u={element:"icons"},d=f=>k(yt,{label:f.title,children:k(lc,{"aria-label":f.icon,onClick:()=>e.onClick(f.icon),variant:"ghost",margin:"0.5rem",icon:k(Kt,{icon:f.icon,iconProps:{size:"2x"}})})},f.title);return k(_e,{as:"div",className:"IconMenu",dir:"ltr",__css:r.container,children:Z(Xl,{value:r,children:[k(XH,{onSearchTerm:s,placeholder:l("searchElement",u)}),k(W9,{allowMultiple:!0,allowToggle:!0,reduceMotion:!0,__css:r.accordion,children:k(_e,{className:"iconContainer",padding:"1rem",children:c?Z(Pe,{children:[k(QH,{term:a!=null?a:"",strNotEnoughCharacters:l("notEnoughElement",{element:3}),strPleaseInputText:l("promptSearch"),strNoTextAvailable:l("noElementAvailable",u)}),n&&n.length>=1&&k(_e,{padding:"0rem",paddingTop:"0",children:n==null?void 0:n.map(Y6e).map(d)})]}):o.map(d)})})]})})},bs=be("hr",{height:1,marginTop:"$1",marginRight:"-$2",marginBottom:"$1",marginLeft:"-$2",border:"none",borderBottom:"1px solid $hover"}),Dc=be("div",{position:"relative",overflow:"hidden",userSelect:"none",display:"flex",flexDirection:"column",zIndex:180,minWidth:180,pointerEvents:"all",backgroundColor:"$panel",boxShadow:"$panel",padding:"$2 $2",borderRadius:"$3",font:"$ui",variants:{size:{small:{minWidth:72}}}}),Ih=be("div",{height:"100%",borderRadius:"4px",marginRight:"1px",width:"fit-content",display:"grid",alignItems:"center",justifyContent:"center",outline:"none",border:"none",pointerEvents:"all",cursor:"pointer",color:"currentColor","& svg":{height:16,width:16,strokeWidth:1},"& > *":{gridRow:1,gridColumn:1}}),la=h.exports.forwardRef(({onClick:e,isActive:t=!1,isWarning:n=!1,hasIndicator:r=!1,hasArrow:i=!1,disabled:o=!1,isSponsor:a=!1,variant:s,kbd:l,children:c,...u},d)=>k(uke,{ref:d,bp:Wo,isWarning:n,isActive:t,isSponsor:a,disabled:o,onClick:e,variant:s,...u,children:Z(Rg,{children:[c,l?k(BH,{variant:"menu",children:l}):void 0,r&&k(YH,{dir:"ltr",children:k(Ih,{children:k(Wj,{})})}),i&&k(Ih,{children:k(r9e,{})})]})})),Rg=be("div",{height:"100%",width:"100%",backgroundColor:"$panel",borderRadius:"$2",display:"flex",gap:"$1",flexDirection:"row",alignItems:"center",padding:"0 $3",justifyContent:"space-between",border:"1px solid transparent","& svg":{position:"relative",stroke:"$overlay",strokeWidth:1,zIndex:1}}),uke=be("button",{position:"relative",width:"100%",background:"none",border:"none",cursor:"pointer",height:"32px",outline:"none",color:"$text",fontFamily:"$ui",fontWeight:400,fontSize:"$1",borderRadius:4,userSelect:"none",margin:0,padding:"0 0","&[data-disabled]":{opacity:.3},"&:disabled":{opacity:.3},[`&:focus:not(:disabled) ${Rg}`]:{backgroundColor:"$hover"},"& a":{textDecoration:"none",color:"$text"},variants:{bp:{mobile:{},small:{}},variant:{styleMenu:{margin:"$1 0 $1 0"},wide:{gridColumn:"1 / span 4"}},size:{icon:{padding:"4px ",width:"auto"}},isSponsor:{true:{color:"#eb30a2"},false:{}},isWarning:{true:{color:"$warn"}},isActive:{true:{backgroundColor:"$hover"},false:{}}},compoundVariants:[{isActive:!1,isSponsor:!0,bp:"small",css:{[`&:hover:not(:disabled) ${Rg}`]:{backgroundColor:"$sponsorContrast",border:"1px solid $panel",'& *[data-shy="true"]':{opacity:1}}}},{isActive:!1,isSponsor:!1,bp:"small",css:{[`&:hover:not(:disabled) ${Rg}`]:{backgroundColor:"$hover",border:"1px solid $panel",'& *[data-shy="true"]':{opacity:1}}}}]}),dke=e=>{try{if(e.document.pageStates[e.appState.currentPageId].selectedIds.some(n=>{var r;return((r=e.document.pages[e.appState.currentPageId].shapes[n])==null?void 0:r.type)==="block"})){const n=e.document.pageStates[e.appState.currentPageId].selectedIds[0];return e.document.pages[e.appState.currentPageId].shapes[n].asset.block}else return}catch{return}},fke=e=>{try{return e.document.pageStates[e.appState.currentPageId].selectedIds.map(r=>{var i,o;return(o=(i=e.document.pages[e.appState.currentPageId])==null?void 0:i.shapes[r])==null?void 0:o.type})}catch{return[]}},pke=[U.Arrow,U.Rectangle,U.Draw,U.Polygon,U.Diamond,U.Triangle,U.Ellipse,U.Group,U.Image,U.Line,U.Sticky],hke=[U.Arrow,U.Polygon,U.Diamond,U.Rectangle,U.Draw,U.Triangle,U.Ellipse,U.Group,U.Image,U.Line],mke=[U.Polygon,U.Diamond,U.Rectangle,U.TiltedRectangle,U.Draw,U.Triangle,U.Ellipse,U.Group,U.Image,U.Block],R4=[U.Polygon,U.Diamond,U.Rectangle,U.TiltedRectangle,U.Draw,U.Triangle,U.Ellipse,U.Group,U.Image,U.Block],D4=[U.Arrow,U.Polygon,U.Diamond,U.Rectangle,U.TiltedRectangle,U.Draw,U.Triangle,U.Ellipse,U.Group,U.Image,U.Line],iO=[U.Diamond,U.Ellipse,U.Polygon,U.Rectangle,U.TiltedRectangle,U.Triangle];function JH(){const e=at(),t=e.useStore(dke),n=e.useStore(fke),r=h.exports.useCallback((i,o)=>{let a=!0;const s=i!=null&&i.some(l=>l==="shapes")?[...new Set([...i,...iO])]:i;return s&&s.length&&a&&(a=s.some(l=>n&&n.every(c=>c&&c===l))),o&&o.length&&t&&a&&(a=a&&o.some(l=>t.blockType===l)),a},[n,t]);return{isWaBlock:t,filterByType:r,BasicShapeArr:iO}}const gke=e=>e.document.pageStates[e.appState.currentPageId].selectedIds.length,vke=e=>{const t=e.document.pages[e.appState.currentPageId],{selectedIds:n}=e.document.pageStates[e.appState.currentPageId];return n.every(r=>{var i;return(i=t.shapes[r])==null?void 0:i.isLocked})},yke=e=>{const t=e.document.pages[e.appState.currentPageId],{selectedIds:n}=e.document.pageStates[e.appState.currentPageId];return n.every(r=>{var i;return(i=t.shapes[r])==null?void 0:i.isAspectRatioLocked})},bke=e=>{const t=e.document.pages[e.appState.currentPageId],n=e.document.pageStates[e.appState.currentPageId].selectedIds.map(r=>t.shapes[r]);try{return n.every(i=>(i==null?void 0:i.children)&&(i==null?void 0:i.children)!==void 0||i.parentId===n[0].parentId&&n[0].parentId!==e.appState.currentPageId)}catch{return!1}},xke=e=>{const{selectedIds:t}=e.document.pageStates[e.appState.currentPageId];return t.length>0},Ske=e=>{const{selectedIds:t}=e.document.pageStates[e.appState.currentPageId];return t.length>1},wke=e=>e.document.pageStates[e.appState.currentPageId].selectedIds.length,Cke=e=>{var n,r,i;const t=e.document.pageStates[e.appState.currentPageId].selectedIds[0];return(i=(r=(n=e.document.pages[e.appState.currentPageId])==null?void 0:n.shapes[t])==null?void 0:r.link)!=null?i:void 0},kke=e=>{var r,i;const t=e.document.pageStates[e.appState.currentPageId].selectedIds[0],n=(i=(r=e.document.pages[e.appState.currentPageId])==null?void 0:r.shapes[t])==null?void 0:i.type;return n&&n===U.Sticky},Eke=e=>e.document.pageStates[e.appState.currentPageId].selectedIds.some(t=>{var n;return((n=e.document.pages[e.appState.currentPageId].shapes[t])==null?void 0:n.children)!==void 0});function ln(e){return(...t)=>{try{return e(...t)}catch{lt.error(e.name+" caused an error");return}}}const Wt=e=>e.preventDefault();be(n8,{fill:"$panel",bp:Wo});function ar({onSelect:e,...t}){return k(Kl,{dir:"ltr",asChild:!0,onSelect:e,children:k(la,{...t})})}function tu({checked:e,disabled:t=!1,variant:n,onCheckedChange:r,kbd:i,children:o}){return k($7e,{dir:"ltr",onSelect:Wt,onCheckedChange:r,checked:e,disabled:t,asChild:!0,children:k(la,{kbd:i,variant:n,hasIndicator:!0,children:o})})}const A2=e=>e.stopPropagation();function ef({sideOffset:e=8,children:t,align:n,variant:r,css:i}){return k(D2,{dir:"ltr",align:n,sideOffset:e,onEscapeKeyDown:A2,asChild:!0,style:i,children:k(Ike,{variant:r,children:t})})}const Ike=be(Dc,{width:"fit-content",cursor:"default",height:"fit-content",minWidth:0,variants:{variant:{horizontal:{flexDirection:"row"},menu:{minWidth:128}}}}),Ip=be(N7e,{backgroundColor:"$hover",height:1,marginTop:"$2",marginRight:"-$2",marginBottom:"$2",marginLeft:"-$2"}),Mm=be(qH,{height:"32px",width:"32px",backgroundColor:"$panel",borderRadius:"4px",padding:"0",margin:"0",display:"flex",alignItems:"center",justifyContent:"center",outline:"none",border:"none",pointerEvents:"all",cursor:"pointer",variants:{isActive:{true:{backgroundColor:"$selected",color:"$panel"},false:{}},bp:{mobile:{},small:{}}},compoundVariants:[{isActive:!1,bp:"small",css:{"&:focus":{backgroundColor:"$hover"},"&:hover:not(:disabled)":{backgroundColor:"$hover"}}}]});function eV({children:e,size:t,disabled:n=!1,label:r}){return Z(Ka,{dir:"ltr",children:[k(B7e,{dir:"ltr",asChild:!0,children:k(la,{disabled:n,hasArrow:!0,children:r})}),k(D2,{dir:"ltr",asChild:!0,sideOffset:2,alignOffset:-2,children:Z(Dc,{size:t,children:[e,k(n8,{offset:13})]})})]})}function Tke({children:e,...t}){return k(dl,{asChild:!0,children:k(Me,{...t,children:e})})}function Dg(e){const{size:t=16,...n}=e;return k("svg",{width:24,height:24,...n,children:k("circle",{cx:12,cy:12,r:t/2})})}function _ke(){return k("svg",{width:"24",height:"24",stroke:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:k("circle",{cx:12,cy:12,r:8,fill:"none",strokeWidth:2.5,strokeLinecap:"round",strokeDasharray:50.26548*.1})})}const Pke=`${50.26548*.025} ${50.26548*.1}`;function Oke(){return k("svg",{width:"24",height:"24",stroke:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:k("circle",{cx:12,cy:12,r:8,fill:"none",strokeWidth:2.5,strokeLinecap:"round",strokeDasharray:Pke})})}function Mke(){return k("svg",{width:"24",height:"24",viewBox:"1 1.5 21 22",fill:"currentColor",stroke:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:k("path",{d:"M10.0162 19.2768C10.0162 19.2768 9.90679 19.2517 9.6879 19.2017C9.46275 19.1454 9.12816 19.0422 8.68413 18.8921C8.23384 18.7358 7.81482 18.545 7.42707 18.3199C7.03307 18.101 6.62343 17.7883 6.19816 17.3818C5.77289 16.9753 5.33511 16.3718 4.88482 15.5713C4.43453 14.7645 4.1531 13.8545 4.04053 12.8414C3.92795 11.822 4.04991 10.8464 4.40639 9.91451C4.76286 8.98266 5.39452 8.10084 6.30135 7.26906C7.21444 6.44353 8.29325 5.83377 9.5378 5.43976C10.7823 5.05202 11.833 4.92068 12.6898 5.04576C13.5466 5.16459 14.3878 5.43664 15.2133 5.86191C16.0388 6.28718 16.7768 6.8688 17.4272 7.60678C18.0714 8.34475 18.5404 9.21406 18.8344 10.2147C19.1283 11.2153 19.1721 12.2598 18.9657 13.348C18.7593 14.4299 18.2872 15.4337 17.5492 16.3593C16.8112 17.2849 15.9263 18.0072 14.8944 18.5263C13.8624 19.0391 12.9056 19.3174 12.0238 19.3612C11.142 19.405 10.2101 19.2705 9.22823 18.9578C8.24635 18.6451 7.35828 18.151 6.56402 17.4756C5.77601 16.8002 6.08871 16.8658 7.50212 17.6726C8.90927 18.4731 10.1444 18.8484 11.2076 18.7983C12.2645 18.7545 13.2965 18.4825 14.3034 17.9822C15.3102 17.4819 16.1264 16.8221 16.7518 16.0028C17.3772 15.1835 17.7681 14.3111 17.9244 13.3855C18.0808 12.4599 18.0401 11.5781 17.8025 10.74C17.5586 9.902 17.1739 9.15464 16.6486 8.49797C16.1233 7.8413 15.2289 7.27844 13.9656 6.80939C12.7086 6.34034 11.4203 6.20901 10.1007 6.41539C8.78732 6.61552 7.69599 7.06893 6.82669 7.77564C5.96363 8.48859 5.34761 9.26409 4.97863 10.1021C4.60964 10.9402 4.45329 11.8376 4.50958 12.7945C4.56586 13.7513 4.79101 14.6238 5.18501 15.4118C5.57276 16.1998 5.96363 16.8002 6.35764 17.2129C6.75164 17.6257 7.13313 17.9509 7.50212 18.1886C7.87736 18.4325 8.28074 18.642 8.71227 18.8171C9.15005 18.9922 9.47839 19.111 9.69728 19.1736C9.91617 19.2361 10.0256 19.2705 10.0256 19.2768H10.0162Z",strokeWidth:"2"})})}function Rke(){return k("svg",{width:"24",height:"24",stroke:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:k("circle",{cx:12,cy:12,r:8,fill:"none",strokeWidth:2,strokeLinecap:"round"})})}function Dke(e){return k("svg",{width:32,height:32,viewBox:"0 0 15 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:k("path",{d:"M4.32978 8.5081C4.32978 10.1923 5.70009 11.5625 7.38418 11.5625H8.46539C8.64456 11.5625 8.78975 11.4173 8.78975 11.2382V11.13C8.78975 10.9508 8.64457 10.8057 8.46539 10.8057H7.38418C6.11736 10.8057 5.08662 9.77492 5.08662 8.5081C5.08662 7.24128 6.11736 6.21054 7.38418 6.21054H9.37894L8.00515 7.58433C7.8576 7.73183 7.8576 7.97195 8.00515 8.11944C8.14833 8.26251 8.39751 8.2623 8.54036 8.11944L10.56 6.09971C10.6315 6.02824 10.6709 5.93321 10.6709 5.8321C10.6709 5.73106 10.6315 5.63598 10.56 5.56454L8.54025 3.54472C8.3974 3.40176 8.14801 3.40176 8.00513 3.54472C7.85758 3.69218 7.85758 3.93234 8.00513 4.07979L9.37892 5.45368H7.38418C5.70009 5.45368 4.32978 6.82393 4.32978 8.5081Z"})})}function Ake(e){return Z("svg",{width:18,height:18,viewBox:"0 0 15 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:[k("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 4.656a.5.5 0 01.5-.5h9.7a.5.5 0 010 1H2.5a.5.5 0 01-.5-.5z"}),k("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.272 3a.578.578 0 00-.578.578v.578h3.311v-.578A.578.578 0 008.428 3H6.272zm3.733 1.156v-.578A1.578 1.578 0 008.428 2H6.272a1.578 1.578 0 00-1.578 1.578v.578H3.578a.5.5 0 00-.5.5V12.2a1.578 1.578 0 001.577 1.578h5.39a1.578 1.578 0 001.577-1.578V4.656a.5.5 0 00-.5-.5h-1.117zm-5.927 1V12.2a.578.578 0 00.577.578h5.39a.578.578 0 00.577-.578V5.156H4.078z"}),k("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.272 6.85a.5.5 0 01.5.5v3.233a.5.5 0 11-1 0V7.35a.5.5 0 01.5-.5zM8.428 6.85a.5.5 0 01.5.5v3.233a.5.5 0 11-1 0V7.35a.5.5 0 01.5-.5z"})]})}function Lke(e){return k("svg",{width:32,height:32,viewBox:"0 0 15 15",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:k("path",{d:"M10.6707 8.5081C10.6707 10.1923 9.3004 11.5625 7.61631 11.5625H6.5351C6.35593 11.5625 6.21074 11.4173 6.21074 11.2382V11.13C6.21074 10.9508 6.35591 10.8057 6.5351 10.8057H7.61631C8.88313 10.8057 9.91387 9.77492 9.91387 8.5081C9.91387 7.24128 8.88313 6.21054 7.61631 6.21054H5.62155L6.99534 7.58433C7.14289 7.73183 7.14289 7.97195 6.99534 8.11944C6.85216 8.26251 6.60298 8.2623 6.46013 8.11944L4.44045 6.09971C4.36898 6.02824 4.32959 5.93321 4.32959 5.8321C4.32959 5.73106 4.36898 5.63598 4.44045 5.56454L6.46024 3.54472C6.60309 3.40176 6.85248 3.40176 6.99535 3.54472C7.14291 3.69218 7.14291 3.93234 6.99535 4.07979L5.62156 5.45368H7.61631C9.3004 5.45368 10.6707 6.82393 10.6707 8.5081Z"})})}function Bke(e){return k("svg",{width:24,height:24,viewBox:"-2 -2 28 28",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:k("path",{d:"M12.4239 4.62C13.3572 4.62 14.1572 4.73333 14.8239 4.96C15.4906 5.17333 15.9772 5.43333 16.2839 5.74C16.3639 5.82 16.4039 5.94 16.4039 6.1V8.86H14.0639C13.9172 8.86 13.8439 8.78666 13.8439 8.64V7.26C13.4306 7.12666 12.9572 7.06 12.4239 7.06C11.6506 7.06 11.0639 7.18 10.6639 7.42C10.2639 7.66 10.0639 8.04666 10.0639 8.58V9C10.0639 9.38666 10.1639 9.69333 10.3639 9.92C10.5772 10.1333 11.0306 10.3467 11.7239 10.56L13.6439 11.14C14.4706 11.38 15.1172 11.66 15.5839 11.98C16.0506 12.3 16.3772 12.68 16.5639 13.12C16.7639 13.5467 16.8639 14.0733 16.8639 14.7V15.62C16.8639 16.7933 16.4039 17.7133 15.4839 18.38C14.5639 19.0467 13.2839 19.38 11.6439 19.38C10.6706 19.38 9.79723 19.2867 9.0239 19.1C8.2639 18.9133 7.71056 18.6533 7.3639 18.32C7.3239 18.28 7.29056 18.24 7.2639 18.2C7.25056 18.1467 7.2439 18.06 7.2439 17.94V15.74H7.6239C8.2239 16.1533 8.85056 16.4533 9.5039 16.64C10.1572 16.8267 10.9306 16.92 11.8239 16.92C12.6506 16.92 13.2506 16.7867 13.6239 16.52C14.0106 16.2533 14.2039 15.9333 14.2039 15.56V14.88C14.2039 14.6667 14.1639 14.48 14.0839 14.32C14.0172 14.16 13.8706 14.0133 13.6439 13.88C13.4172 13.7467 13.0572 13.6067 12.5639 13.46L10.6639 12.88C9.7839 12.6133 9.11056 12.3 8.6439 11.94C8.17723 11.58 7.85056 11.18 7.6639 10.74C7.49056 10.3 7.4039 9.83333 7.4039 9.34V8.38C7.4039 7.64666 7.61056 7 8.0239 6.44C8.43723 5.88 9.01723 5.44 9.7639 5.12C10.5239 4.78666 11.4106 4.62 12.4239 4.62Z"})})}function $ke(e){return k("svg",{width:24,height:24,viewBox:"-2 -2 28 28",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:k("path",{d:"M8.16191 19H5.68191C5.53525 19 5.46191 18.9267 5.46191 18.78V5H8.76191C8.88191 5 8.97525 5.03333 9.04191 5.1C9.10858 5.15333 9.17525 5.27333 9.24191 5.46C9.72191 6.59333 10.1686 7.7 10.5819 8.78C11.0086 9.84667 11.4352 10.98 11.8619 12.18H12.1619C12.6019 10.9667 13.0352 9.79333 13.4619 8.66C13.8886 7.52667 14.3552 6.30667 14.8619 5H18.3219C18.4686 5 18.5419 5.07333 18.5419 5.22V19H16.0619C15.9152 19 15.8419 18.9267 15.8419 18.78V16.26C15.8419 15.5267 15.8486 14.8133 15.8619 14.12C15.8886 13.4267 15.9286 12.6867 15.9819 11.9C16.0486 11.1 16.1419 10.1933 16.2619 9.18H15.9019C15.4352 10.3533 14.9486 11.5667 14.4419 12.82C13.9486 14.06 13.4819 15.2333 13.0419 16.34H11.1019C11.0619 16.34 11.0152 16.3333 10.9619 16.32C10.9219 16.2933 10.8886 16.2467 10.8619 16.18C10.4619 15.18 10.0086 14.06 9.50191 12.82C9.00858 11.58 8.53525 10.3667 8.08191 9.18H7.70191C7.83525 10.18 7.93525 11.0733 8.00191 11.86C8.06858 12.6467 8.10858 13.3933 8.12191 14.1C8.14858 14.8067 8.16191 15.5267 8.16191 16.26V19Z"})})}function Fke(e){return k("svg",{width:24,height:24,viewBox:"-2 -2 28 28",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",...e,children:k("path",{d:"M7.68191 19C7.53525 19 7.46191 18.9267 7.46191 18.78V5H10.1219C10.2686 5 10.3419 5.07333 10.3419 5.22V16.56H13.4419V15.02H15.7619C15.9086 15.02 15.9819 15.0933 15.9819 15.24V19H7.68191Z"})})}function Nke(){return Z("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[k("path",{d:"M1.72838 9.33987L8.84935 2.34732C9.23874 1.96494 9.86279 1.96539 10.2516 2.34831L13.5636 5.60975C13.9655 6.00555 13.9607 6.65526 13.553 7.04507L8.13212 12.2278C7.94604 12.4057 7.69851 12.505 7.44107 12.505L6.06722 12.505L3.83772 12.505C3.5673 12.505 3.30842 12.3954 3.12009 12.2014L1.7114 10.7498C1.32837 10.3551 1.33596 9.72521 1.72838 9.33987Z",stroke:"currentColor"}),k("line",{x1:"6.01807",y1:"12.5",x2:"10.7959",y2:"12.5",stroke:"currentColor",strokeLinecap:"round"}),k("line",{x1:"5.50834",y1:"5.74606",x2:"10.1984",y2:"10.4361",stroke:"currentColor"})]})}const tV="#fafafa",i8="#343d45",Id={[Le.White]:Le.White,[Le.Gray]:Le.Gray,[Le.Black]:Le.Black,[Le.Purple]:Le.Purple,[Le.Green]:Le.Green,[Le.Blue]:Le.Blue,[Le.Indigo]:Le.Indigo,[Le.Green2]:Le.Green2,[Le.Red]:Le.Red,[Le.Orange]:Le.Orange,[Le.Yellow]:Le.Yellow,[Le.Brown]:Le.Brown},zke={light:{...Object.fromEntries(Object.entries(Id).map(([e,t])=>[e,$.lerpColor(t,tV,.45)])),[Le.White]:"#ffffff",[Le.Black]:"#3d3d3d"},dark:{...Object.fromEntries(Object.entries(Id).map(([e,t])=>[e,$.lerpColor($.lerpColor(t,"#999999",.3),i8,.4)])),[Le.White]:"#1d1d1d",[Le.Black]:"#bbbbbb"}},xa={light:{...Id,[Le.White]:"#1d1d1d"},dark:{...Object.fromEntries(Object.entries(Id).map(([e,t])=>[e,$.lerpColor(t,i8,.1)])),[Le.White]:"#cecece",[Le.Black]:"#cecece"}},A4={light:{...Object.fromEntries(Object.entries(Id).map(([e,t])=>[e,$.lerpColor(t,tV,.82)])),[Le.White]:"#fefefe"},dark:{...Object.fromEntries(Object.entries(Id).map(([e,t])=>[e,$.lerpColor(t,i8,.82)])),[Le.White]:"rgb(30,33,37)",[Le.Black]:"#1e1e1f"}},jke={[Ir.Small]:2,[Ir.Medium]:3.5,[Ir.Large]:5},Hke={[Ir.Small]:28,[Ir.Medium]:48,[Ir.Large]:96,auto:"auto"},Vke={[Fn.Sans]:'"Source Sans Pro", sans-serif',[Fn.Serif]:'"Crimson Pro", serif',[Fn.Mono]:'"Source Code Pro", monospace',[Fn.Script]:'"Caveat Brush"'},Wke={[Fn.Serif]:1,[Fn.Mono]:1,[Fn.Sans]:1,[Fn.Script]:1},Uke={[Ir.Small]:24,[Ir.Medium]:36,[Ir.Large]:48,auto:"auto"};function Gke(e){return jke[e]}function nV(e,t=Fn.Script){return Hke[e]*Wke[t]}function o8(e=Fn.Script){return Vke[e]}function Kke(e){return Uke[e]}function oa(e){const t=nV(e.size,e.font),n=o8(e.font),{scale:r=1}=e;return`${t*r}px/1 ${n}`}function qke(e){const t=Kke(e.size),n=o8(e.font),{scale:r=1}=e;return`${t*r}px/1 ${n}`}function oO(e,t=!1){const{color:n}=e,r=t?"dark":"light",i=n===Le.White||n===Le.Black||n==="unset"?Le.Yellow:n;return{fill:zke[r][i],stroke:xa[r][i],color:t?"#1d1d1d":"#0d0d0d"}}function We(e,t){const{color:n,size:r,isFilled:i,bgColor:o}=e,a=Gke(r);return{stroke:n==="unset"?Le.Black:xa[t?"dark":"light"][n],fill:o!=null?o:"none",strokeWidth:a}}const dr={color:Le.Black,bgColor:Le.White,size:Ir.Small,isFilled:!1,dash:It.Solid,scale:1},a8={...dr,font:Fn.Sans,textAlign:ct.Middle},Yke=e=>e.appState.currentStyle,Xke=e=>e.document.pageStates[e.appState.currentPageId].selectedIds,Zke=Object.keys(a8),aO={[It.Solid]:k(Rke,{}),[It.Draw]:k(Mke,{}),[It.Dashed]:k(_ke,{}),[It.Dotted]:k(Oke,{})},Qke={[Ir.Small]:k(Bke,{}),[Ir.Medium]:k($ke,{}),[Ir.Large]:k(Fke,{})},Jke={[ct.Start]:k(G9e,{}),[ct.Middle]:k(H9e,{}),[ct.End]:k(q9e,{}),[ct.Justify]:k(W9e,{})},eEe=e=>e.settings.isDarkMode?"dark":"light",tEe=e=>{const{activeTool:t,currentPageId:n}=e.appState;switch(t){case"select":{const r=e.document.pages[n];let i=!1,o=!1;for(const a of e.document.pageStates[n].selectedIds)r.shapes[a]&&("text"in r.shapes[a]&&(i=!0),"label"in r.shapes[a]&&(o=!0));return i?"text":o?"label":""}case U.Text:return"text";case U.Rectangle:return"label";case U.Ellipse:return"label";case U.Triangle:return"label";case U.Arrow:return"label";case U.Line:return"label"}return!1},nEe=h.exports.memo(function(){const t=at(),{isWaBlock:n,filterByType:r}=JH(),{t:i}=dn("",{keyPrefix:"externalUI"}),o=t.useStore(eEe),a=t.useStore(tEe),s=t.useStore(Yke),l=t.useStore(Xke),[c,u]=h.exports.useState(s),d=h.exports.useRef(s);h.exports.useEffect(()=>{const{appState:{currentStyle:v},page:b,selectedIds:x}=t;let w={};if(x.length<=0)w=v;else{const E=new Set([]);t.selectedIds.map(C=>b.shapes[C]).forEach(C=>{Zke.forEach(I=>{if(!E.has(I))if(w[I]===void 0)w[I]=C==null?void 0:C.style[I];else{if(w[I]===(C==null?void 0:C.style[I]))return;w[I]=C.style[I],E.add(I)}})})}JSON.stringify(w)!==JSON.stringify(d.current)&&(d.current=w,u(w))},[s,l]),h.exports.useCallback(v=>{t.style({isFilled:v})},[]);const f=h.exports.useCallback(v=>{t.style({dash:v})},[]),p=h.exports.useCallback(v=>{t.style({size:v})},[]),m=h.exports.useCallback(v=>{t.style({font:v})},[]),g=h.exports.useCallback(v=>{t.style({textAlign:v})},[]),y=h.exports.useCallback(v=>{t.setMenuOpen(v)},[t]);return Z(Ka,{dir:"ltr",onOpenChange:y,children:[k(dl,{asChild:!0,children:Z(Me,{variant:"text",children:[i("styles"),Z(rEe,{style:{color:xa[o][c.color]},children:[c.isFilled&&k(Dg,{size:16,stroke:"none",fill:A4[o][c.color]}),aO[c.dash]]})]})}),Z(ef,{children:[Z(Pl,{variant:"tall",children:[k("span",{children:i(n?"strokeColor":"color")}),Z(L4,{children:[Object.keys(xa.light).map(v=>k(Kl,{onSelect:Wt,asChild:!0,children:k(Me,{variant:"icon",label:P4(v),isActive:c.color===v,onClick:()=>n?t.style({color:v,isFilled:!1}):t.style({color:v}),children:k(Dg,{size:18,strokeWidth:2.5,fill:"transparent",stroke:xa.light[v]})})},v)),l.length>0&&r(R4)&&k(Kl,{onSelect:Wt,asChild:!0,children:k(Me,{variant:"icon",label:i("disableElement",{element:i(n?"strokeColor":"color")}),isActive:c.color==="unset",onClick:()=>n?t.style({color:"unset",isFilled:!1}):t.style({color:void 0}),children:k(f4,{strokeWidth:2.5})})})]})]}),r(mke)&&Z(Pl,{variant:"tall",children:[k("span",{children:i("fillColor")}),Z(L4,{children:[Object.keys(xa.light).map(v=>k(Kl,{onSelect:Wt,asChild:!0,children:k(Me,{variant:"icon",label:P4(v),isActive:c.bgColor===v,onClick:()=>t.style({color:v,isFilled:!0}),children:k(Dg,{size:18,strokeWidth:2.5,fill:A4.light[v],stroke:xa.light[v]})})},v)),r(D4)&&k(Kl,{onSelect:Wt,asChild:!0,children:k(Me,{variant:"icon",label:i("disableElement",{element:i("fillColor")}),isActive:typeof c.bgColor=="undefined",onClick:()=>t.style({bgColor:void 0,isFilled:!0}),children:k(f4,{strokeWidth:2.5})})})]})]}),r(hke)&&Z(Pl,{children:[i("dash"),k(Rm,{dir:"ltr",value:c.dash,onValueChange:f,children:Object.values(It).map(v=>k(Mm,{isActive:v===c.dash,value:v,onSelect:Wt,bp:Wo,children:aO[v]},v))})]}),r(pke)&&Z(Pl,{children:[i("size"),k(Rm,{dir:"ltr",value:c.size,onValueChange:p,children:Object.values(Ir).map(v=>k(Mm,{isActive:v===c.size,value:v,onSelect:Wt,bp:Wo,children:Qke[v]},v))})]}),(a==="text"||a==="label"||n)&&Z(Pe,{children:[k(bs,{}),Z(Pl,{children:[i("font"),k(Rm,{dir:"ltr",value:c.font,onValueChange:m,children:Object.values(Fn).map(v=>k(Mm,{isActive:v===c.font,value:v,onSelect:Wt,bp:Wo,children:k(iEe,{fontStyle:v,children:i("aA")})},v))})]}),a==="text"&&Z(Pl,{children:[i("align"),k(Rm,{dir:"ltr",value:c.textAlign,onValueChange:g,children:Object.values(ct).map(v=>k(Mm,{isActive:v===c.textAlign,value:v,onSelect:Wt,bp:Wo,children:Jke[v]},v))})]})]})]})]})}),L4=be("div",{display:"grid",gridTemplateColumns:"repeat(4, auto)",gap:0}),Pl=be("div",{position:"relative",width:"100%",background:"none",border:"none",minHeight:"32px",outline:"none",color:"$text",fontFamily:"$ui",fontWeight:400,fontSize:"$1",padding:"$2 0 $2 $3",borderRadius:4,userSelect:"none",margin:0,display:"flex",gap:"$3",flexDirection:"row",alignItems:"center",justifyContent:"space-between",variants:{variant:{tall:{alignItems:"flex-start",padding:"0 0 0 $3","& > span":{paddingTop:"$4"}}}}}),Rm=be(KH,{display:"flex",flexDirection:"row",gap:"$1"}),rEe=be("div",{display:"grid","& > *":{gridColumn:1,gridRow:1}}),iEe=be("div",{width:32,height:32,display:"flex",alignItems:"center",justifyContent:"center",fontSize:"$3",variants:{fontStyle:{[Fn.Script]:{fontFamily:"Caveat Brush"},[Fn.Sans]:{fontFamily:"Recursive"},[Fn.Serif]:{fontFamily:"Georgia"},[Fn.Mono]:{fontFamily:"Recursive Mono"}}}}),cu=e=>{const{currentColor:t,changeStyle:n,isFilled:r,css:i,transparencySettings:o,canBeTransparent:a}=e,s=l=>r?A4.light[l]:"transparent";return k(Pl,{variant:"tall",children:Z(L4,{style:i,children:[Object.keys(xa.light).map(l=>k("div",{children:k(Me,{variant:"icon",label:P4(l),isActive:t===l,onClick:()=>n({isFilled:!!r,color:l}),children:k(Dg,{size:18,strokeWidth:2.5,fill:s(l),stroke:xa.light[l]})})},l)),a&&k("div",{children:k(Me,{variant:"icon",label:o==null?void 0:o.transparentLabel,isActive:t==="undefined",onClick:o==null?void 0:o.setTransparent,children:k(f4,{strokeWidth:2.5})})})]})})},oEe=({onBlur:e,children:t})=>Z(I2,{dir:"ltr",children:[k(Bwe,{dir:"ltr",children:t}),k(aEe,{onBlur:e})]}),aEe=h.exports.memo(function({onBlur:t}){const n=at(),{filterByType:r,isWaBlock:i}=JH(),{t:o}=dn("",{keyPrefix:"externalUI"}),a=ae=>o(ae?"hideText":"showText"),s=n.useStore(ln(wke)),l=n.useStore(ln(Eke)),c=n.useStore(ln(Cke)),u=n.useStore(ln(kke)),d=(s!=null?s:0)>0,f=(s!=null?s:0)>1,p=(s!=null?s:0)>2,m=s==1,g=h.exports.useRef(null),y=h.exports.useCallback(()=>{n.flipHorizontal()},[n]),v=h.exports.useCallback(()=>{n.flipVertical()},[n]),b=h.exports.useCallback(()=>{n.duplicate()},[n]),x=h.exports.useCallback(()=>{n.toggleLocked()},[n]),w=h.exports.useCallback(()=>{n.group(),n.toggleAspectRatioLocked()},[n]),E=h.exports.useCallback(()=>{n.moveToBack()},[n]),C=h.exports.useCallback(()=>{n.moveBackward()},[n]),I=h.exports.useCallback(()=>{n.moveForward()},[n]),T=h.exports.useCallback(()=>{n.moveToFront()},[n]),_=h.exports.useCallback(()=>{n.delete()},[n]),P=h.exports.useCallback(()=>{n.cut()},[n]),M=h.exports.useCallback(()=>{n.copy()},[n]),D=h.exports.useCallback(()=>{n.paste()},[n]),V=h.exports.useCallback(()=>{n.undo()},[n]),B=h.exports.useCallback(()=>{n.redo()},[n]),L=h.exports.useCallback(async()=>{await n.exportSelectedShapesAs(ys.PNG)},[n]),G=h.exports.useCallback(async()=>{await n.exportSelectedShapesAs(ys.JPG)},[n]),z=h.exports.useCallback(async()=>{await n.exportSelectedShapesAs(ys.WEBP)},[n]),j=h.exports.useCallback(async()=>{await n.exportSelectedShapesAs(ys.SVG)},[n]),F=h.exports.useCallback(async()=>{await n.exportSelectedShapesAs(ys.JSON)},[n]),H=h.exports.useCallback((ae,le)=>{n.changeBlockType(ae,le),n.selectTool("select")},[n]),R=h.exports.useCallback(()=>{n.openLink()},[n]),W=h.exports.useCallback(ae=>{n.addLinkToShape(ae)},[n]),X=h.exports.useCallback(ae=>{n.style(ae)},[n]),te=h.exports.useCallback(ae=>{n.updateWAElement({tlIcon:ae})},[n]),re=h.exports.useCallback(ae=>{n.handleModalOpened(ae)},[n]),ne=h.exports.useCallback(ae=>{n.updateWAElement({tlShowText:!ae})},[n]),ie=!!(i&&i.tlUrl||c);return k(T2,{dir:"ltr",ref:g,asChild:!0,tabIndex:-1,onBlur:t,children:k(Dc,{children:d?Z(Pe,{children:[ie&&k(Ve,{onClick:R,children:o("open")}),i?Z(Pe,{children:[m&&k(Pe,{children:Z(Ji,{label:o("changeBlock"),children:[k(Ji,{label:o("changeStroke"),children:k(cu,{changeStyle:X,currentColor:i==null?void 0:i.tlStrokeColor,canBeTransparent:r(R4),transparencySettings:{setTransparent:()=>i?n.style({color:"unset",isFilled:!1}):n.style({color:void 0}),transparentLabel:o("disableElement",{element:o("strokeColor")})}})}),k(Ji,{label:o("changeFill"),children:k(cu,{isFilled:!0,changeStyle:X,currentColor:i==null?void 0:i.tlBgColor,canBeTransparent:r(D4),transparencySettings:{setTransparent:()=>n.style({bgColor:void 0}),transparentLabel:o("disableElement",{element:o(i?"strokeColor":"color")})}})}),k(Ve,{onClick:()=>re(sr.image),children:o("changeBgImage")}),k(Ve,{onClick:()=>re(sr.title),children:o("changeName")}),k(Ji,{label:o("changeIcon"),children:k(cke,{onClick:te})}),r([],[Tt.ICON,Tt.MASK,Tt.ICON_W_TEXT])&&k(Ve,{onClick:()=>ne(Boolean(i==null?void 0:i.tlShowText)),children:a(i==null?void 0:i.tlShowText)})]})}),Z(Ji,{label:o("type"),children:[k(Ve,{onClick:()=>H(Tt.ICON),kbd:"",children:o("blockIcon")}),k(Ve,{onClick:()=>H(Tt.MASK,"circle"),kbd:"",children:o("blockAvatar")}),k(Ve,{onClick:()=>H(Tt.MASK,"banner"),kbd:"",children:o("blockBanner")}),k(Ve,{onClick:()=>H(Tt.MASK,"shield"),kbd:"",children:o("blockShield")}),k(Ve,{onClick:()=>H(Tt.DEFAULT),kbd:"",children:o("blockDefault")}),k(Ve,{onClick:()=>H(Tt.BOOK),kbd:"",children:o("blockBook")})]})]}):Z(Pe,{children:[u&&k(Ve,{onClick:()=>re(sr.image),children:o("changeBgImage")}),k(Ve,{onClick:b,kbd:"#D",children:o("duplicate")}),r([U.Group])&&Z(Pe,{children:[k(Ve,{onClick:y,kbd:"\u21E7H",children:o("flipHorizontal")}),k(Ve,{onClick:v,kbd:"\u21E7V",children:o("flipVertical")})]}),k(bs,{}),m&&Z(Pe,{children:[k(Ve,{onClick:()=>re(sr.url),children:o("connectUrl")}),r(["shapes",U.Image])&&k(Ji,{label:o(ie?"changeUrl":"addUrl"),children:k(rke,{onSaveInput:W,defaultValue:c!=null?c:"",className:"url-changer"})})]}),r(["shapes",U.Image])&&k(Ji,{label:o("changeStroke"),children:k(cu,{changeStyle:X,currentColor:"#FFF",canBeTransparent:r(R4),transparencySettings:{setTransparent:()=>i?n.style({color:"unset",isFilled:!1}):n.style({color:void 0}),transparentLabel:o("disableElement",{element:o("strokeColor")})}})}),r([U.Block,"shapes"])&&k(Ji,{label:o("changeFill"),children:k(cu,{isFilled:!0,changeStyle:X,canBeTransparent:r(D4),transparencySettings:{setTransparent:()=>n.style({bgColor:void 0}),transparentLabel:o("disableElement",{element:o(i?"strokeColor":"color")})}})}),r([U.Image,U.Text,U.Sticky])&&k(Ji,{label:o("changeColor"),children:k(cu,{changeStyle:X,currentColor:"#FFF"})})]}),k(Ve,{onClick:x,kbd:"#\u21E7L",children:o("lockUnlock")}),(f||l)&&k(bs,{}),f&&k(Ve,{onClick:w,kbd:"#G",children:o("group")}),l&&k(Ve,{onClick:w,kbd:"#G",children:o("ungroup")}),Z(Ji,{label:o("move"),children:[k(Ve,{onClick:T,kbd:"\u21E7]",children:o("toFront")}),k(Ve,{onClick:I,kbd:"]",children:o("forward")}),k(Ve,{onClick:C,kbd:"[",children:o("backward")}),k(Ve,{onClick:E,kbd:"\u21E7[",children:o("toBack")})]}),k(dEe,{}),f&&k(sEe,{hasTwoOrMore:f,hasThreeOrMore:p}),n.callbacks.onExport?Z(Pe,{children:[k(bs,{}),Z(Ji,{label:o("export"),size:"small",children:[k(Ve,{onClick:L,children:o("PNG")}),k(Ve,{onClick:G,children:o("JPG")}),k(Ve,{onClick:z,children:o("WEBP")}),k(Ve,{onClick:j,children:o("SVG")}),k(Ve,{onClick:F,children:o("JSON")})]})]}):k(Pe,{children:k(bs,{})}),k(Ve,{onClick:P,kbd:"#X",children:o("cut")}),k(Ve,{onClick:M,kbd:"#C",children:o("copy")}),k(Ve,{onClick:D,kbd:"#V",children:o("paste")}),k(bs,{}),k(Ve,{onClick:_,kbd:"\u232B",children:o("delete")})]}):Z(Pe,{children:[k(Ve,{onClick:D,kbd:"#V",children:o("paste")}),k(Ve,{onClick:V,kbd:"#Z",children:o("undo")}),k(Ve,{onClick:B,kbd:"#Y",children:o("redo")})]})})})});function sEe({hasThreeOrMore:e}){const t=at(),n=h.exports.useCallback(()=>{t.align(Mn.Top)},[t]),r=h.exports.useCallback(()=>{t.align(Mn.CenterVertical)},[t]),i=h.exports.useCallback(()=>{t.align(Mn.Bottom)},[t]),o=h.exports.useCallback(()=>{t.stretch(mc.Vertical)},[t]),a=h.exports.useCallback(()=>{t.distribute(gc.Vertical)},[t]),s=h.exports.useCallback(()=>{t.align(Mn.Left)},[t]),l=h.exports.useCallback(()=>{t.align(Mn.CenterHorizontal)},[t]),c=h.exports.useCallback(()=>{t.align(Mn.Right)},[t]),u=h.exports.useCallback(()=>{t.stretch(mc.Horizontal)},[t]),d=h.exports.useCallback(()=>{t.distribute(gc.Horizontal)},[t]);return Z(I2,{dir:"ltr",children:[k(l8,{isSubmenu:!0,children:"Align / Distribute"}),k(T2,{asChild:!0,sideOffset:2,alignOffset:-2,children:Z(lEe,{numberOfSelected:e?"threeOrMore":"twoOrMore",children:[k(_o,{onClick:s,children:k(jj,{})}),k(_o,{onClick:l,children:k(Nj,{})}),k(_o,{onClick:c,children:k(Hj,{})}),k(_o,{onClick:u,children:k(Kj,{})}),e&&k(_o,{onClick:d,children:k(Uj,{})}),k(_o,{onClick:n,children:k(Vj,{})}),k(_o,{onClick:r,children:k(zj,{})}),k(_o,{onClick:i,children:k(Fj,{})}),k(_o,{onClick:o,children:k(qj,{})}),e&&k(_o,{onClick:a,children:k(Gj,{})}),k(s8,{offset:13})]})})]})}const lEe=be(Dc,{display:"grid",variants:{numberOfSelected:{threeOrMore:{gridTemplateColumns:"repeat(5, auto)"},twoOrMore:{gridTemplateColumns:"repeat(4, auto)"}}}}),cEe=e=>e.appState.currentPageId,uEe=e=>e.document.pages;function dEe(){const e=at(),{t}=dn("",{keyPrefix:"externalUI"}),n=e.useStore(cEe),r=e.useStore(uEe),i=Object.values(r).sort((o,a)=>(o.childIndex||0)-(a.childIndex||0)).filter(o=>o.id!==n);return i.length===0?null:Z(I2,{dir:"ltr",children:[k(l8,{isSubmenu:!0,children:t("moveToPage")}),k(T2,{dir:"ltr",sideOffset:2,alignOffset:-2,asChild:!0,children:Z(Dc,{children:[i.map(({id:o,name:a},s)=>k(Ve,{disabled:o===n,onClick:()=>e.moveToPage(o),children:a||`${t("page")} ${s}`},o)),k(s8,{offset:13})]})})]})}function Ji({children:e,label:t,size:n}){return Z(I2,{dir:"ltr",children:[k(l8,{isSubmenu:!0,children:t}),k(T2,{dir:"ltr",sideOffset:2,alignOffset:-2,asChild:!0,children:Z(Dc,{size:n,children:[e,k(s8,{offset:13})]})})]})}const s8=be(Lwe,{fill:"$panel"});function _o({onSelect:e,...t}){return k($j,{dir:"ltr",onSelect:e,asChild:!0,children:k(Me,{...t})})}const Ve=({...e})=>k($j,{asChild:!0,children:k(la,{...e})}),l8=({isSubmenu:e,...t})=>k(Awe,{asChild:!0,children:k(la,{hasArrow:e,...t})}),rV=be("button",{position:"relative",height:"32px",width:"32px",backgroundColor:"$panel",borderRadius:"4px",padding:"0",margin:"0",outline:"none",border:"none",pointerEvents:"all",fontSize:"$0",color:"$text",cursor:"pointer",display:"grid",alignItems:"center",justifyContent:"center","& > *":{gridRow:1,gridColumn:1},"&:disabled":{opacity:"0.5"},"& > span":{width:"100%",height:"100%",display:"flex",alignItems:"center"},variants:{bp:{mobile:{backgroundColor:"transparent"},small:{"&:hover:not(:disabled)":{backgroundColor:"$hover"}}},size:{small:{height:32,width:32,"& svg:nth-of-type(1)":{height:"16px",width:"16px"}},medium:{height:44,width:44,"& svg:nth-of-type(1)":{height:"18px",width:"18px"}},large:{height:44,width:44,"& svg:nth-of-type(1)":{height:"20px",width:"20px"}}},isActive:{true:{color:"$selected"}}}});function fEe({onSelect:e}){return k(pEe,{children:k(rV,{onClick:e,children:k(u9e,{})})})}const pEe=be("div",{opacity:1,zIndex:100,backgroundColor:"transparent","& svg":{color:"$text"},"&:hover svg":{color:"$text"}});var ir={},c8={exports:{}},iV=function(t,n){return function(){for(var i=new Array(arguments.length),o=0;o<i.length;o++)i[o]=arguments[o];return t.apply(n,i)}},hEe=iV,Ac=Object.prototype.toString;function u8(e){return Ac.call(e)==="[object Array]"}function B4(e){return typeof e=="undefined"}function mEe(e){return e!==null&&!B4(e)&&e.constructor!==null&&!B4(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function gEe(e){return Ac.call(e)==="[object ArrayBuffer]"}function vEe(e){return typeof FormData!="undefined"&&e instanceof FormData}function yEe(e){var t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&e.buffer instanceof ArrayBuffer,t}function bEe(e){return typeof e=="string"}function xEe(e){return typeof e=="number"}function oV(e){return e!==null&&typeof e=="object"}function Ag(e){if(Ac.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function SEe(e){return Ac.call(e)==="[object Date]"}function wEe(e){return Ac.call(e)==="[object File]"}function CEe(e){return Ac.call(e)==="[object Blob]"}function aV(e){return Ac.call(e)==="[object Function]"}function kEe(e){return oV(e)&&aV(e.pipe)}function EEe(e){return typeof URLSearchParams!="undefined"&&e instanceof URLSearchParams}function IEe(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function TEe(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function d8(e,t){if(!(e===null||typeof e=="undefined"))if(typeof e!="object"&&(e=[e]),u8(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}function $4(){var e={};function t(i,o){Ag(e[o])&&Ag(i)?e[o]=$4(e[o],i):Ag(i)?e[o]=$4({},i):u8(i)?e[o]=i.slice():e[o]=i}for(var n=0,r=arguments.length;n<r;n++)d8(arguments[n],t);return e}function _Ee(e,t,n){return d8(t,function(i,o){n&&typeof i=="function"?e[o]=hEe(i,n):e[o]=i}),e}function PEe(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}var gi={isArray:u8,isArrayBuffer:gEe,isBuffer:mEe,isFormData:vEe,isArrayBufferView:yEe,isString:bEe,isNumber:xEe,isObject:oV,isPlainObject:Ag,isUndefined:B4,isDate:SEe,isFile:wEe,isBlob:CEe,isFunction:aV,isStream:kEe,isURLSearchParams:EEe,isStandardBrowserEnv:TEe,forEach:d8,merge:$4,extend:_Ee,trim:IEe,stripBOM:PEe},nu=gi;function sO(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var sV=function(t,n,r){if(!n)return t;var i;if(r)i=r(n);else if(nu.isURLSearchParams(n))i=n.toString();else{var o=[];nu.forEach(n,function(l,c){l===null||typeof l=="undefined"||(nu.isArray(l)?c=c+"[]":l=[l],nu.forEach(l,function(d){nu.isDate(d)?d=d.toISOString():nu.isObject(d)&&(d=JSON.stringify(d)),o.push(sO(c)+"="+sO(d))}))}),i=o.join("&")}if(i){var a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t},OEe=gi;function L2(){this.handlers=[]}L2.prototype.use=function(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1};L2.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};L2.prototype.forEach=function(t){OEe.forEach(this.handlers,function(r){r!==null&&t(r)})};var MEe=L2,REe=gi,DEe=function(t,n){REe.forEach(t,function(i,o){o!==n&&o.toUpperCase()===n.toUpperCase()&&(t[n]=i,delete t[o])})},lV=function(t,n,r,i,o){return t.config=n,r&&(t.code=r),t.request=i,t.response=o,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t},AEe=lV,cV=function(t,n,r,i,o){var a=new Error(t);return AEe(a,n,r,i,o)},LEe=cV,BEe=function(t,n,r){var i=r.config.validateStatus;!r.status||!i||i(r.status)?t(r):n(LEe("Request failed with status code "+r.status,r.config,null,r.request,r))},Dm=gi,$Ee=Dm.isStandardBrowserEnv()?function(){return{write:function(n,r,i,o,a,s){var l=[];l.push(n+"="+encodeURIComponent(r)),Dm.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),Dm.isString(o)&&l.push("path="+o),Dm.isString(a)&&l.push("domain="+a),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){var r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),FEe=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)},NEe=function(t,n){return n?t.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):t},zEe=FEe,jEe=NEe,HEe=function(t,n){return t&&!zEe(n)?jEe(t,n):n},Z5=gi,VEe=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],WEe=function(t){var n={},r,i,o;return t&&Z5.forEach(t.split(`
`),function(s){if(o=s.indexOf(":"),r=Z5.trim(s.substr(0,o)).toLowerCase(),i=Z5.trim(s.substr(o+1)),r){if(n[r]&&VEe.indexOf(r)>=0)return;r==="set-cookie"?n[r]=(n[r]?n[r]:[]).concat([i]):n[r]=n[r]?n[r]+", "+i:i}}),n},lO=gi,UEe=lO.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a"),r;function i(o){var a=o;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(a){var s=lO.isString(a)?i(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),Am=gi,GEe=BEe,KEe=$Ee,qEe=sV,YEe=HEe,XEe=WEe,ZEe=UEe,Q5=cV,cO=function(t){return new Promise(function(r,i){var o=t.data,a=t.headers,s=t.responseType;Am.isFormData(o)&&delete a["Content-Type"];var l=new XMLHttpRequest;if(t.auth){var c=t.auth.username||"",u=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";a.Authorization="Basic "+btoa(c+":"+u)}var d=YEe(t.baseURL,t.url);l.open(t.method.toUpperCase(),qEe(d,t.params,t.paramsSerializer),!0),l.timeout=t.timeout;function f(){if(!!l){var m="getAllResponseHeaders"in l?XEe(l.getAllResponseHeaders()):null,g=!s||s==="text"||s==="json"?l.responseText:l.response,y={data:g,status:l.status,statusText:l.statusText,headers:m,config:t,request:l};GEe(r,i,y),l=null}}if("onloadend"in l?l.onloadend=f:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(f)},l.onabort=function(){!l||(i(Q5("Request aborted",t,"ECONNABORTED",l)),l=null)},l.onerror=function(){i(Q5("Network Error",t,null,l)),l=null},l.ontimeout=function(){var g="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(g=t.timeoutErrorMessage),i(Q5(g,t,t.transitional&&t.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",l)),l=null},Am.isStandardBrowserEnv()){var p=(t.withCredentials||ZEe(d))&&t.xsrfCookieName?KEe.read(t.xsrfCookieName):void 0;p&&(a[t.xsrfHeaderName]=p)}"setRequestHeader"in l&&Am.forEach(a,function(g,y){typeof o=="undefined"&&y.toLowerCase()==="content-type"?delete a[y]:l.setRequestHeader(y,g)}),Am.isUndefined(t.withCredentials)||(l.withCredentials=!!t.withCredentials),s&&s!=="json"&&(l.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&l.addEventListener("progress",t.onDownloadProgress),typeof t.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(g){!l||(l.abort(),i(g),l=null)}),o||(o=null),l.send(o)})},Wn=gi,uO=DEe,QEe=lV,JEe={"Content-Type":"application/x-www-form-urlencoded"};function dO(e,t){!Wn.isUndefined(e)&&Wn.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function eIe(){var e;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(e=cO),e}function tIe(e,t,n){if(Wn.isString(e))try{return(t||JSON.parse)(e),Wn.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}var B2={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:eIe(),transformRequest:[function(t,n){return uO(n,"Accept"),uO(n,"Content-Type"),Wn.isFormData(t)||Wn.isArrayBuffer(t)||Wn.isBuffer(t)||Wn.isStream(t)||Wn.isFile(t)||Wn.isBlob(t)?t:Wn.isArrayBufferView(t)?t.buffer:Wn.isURLSearchParams(t)?(dO(n,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):Wn.isObject(t)||n&&n["Content-Type"]==="application/json"?(dO(n,"application/json"),tIe(t)):t}],transformResponse:[function(t){var n=this.transitional,r=n&&n.silentJSONParsing,i=n&&n.forcedJSONParsing,o=!r&&this.responseType==="json";if(o||i&&Wn.isString(t)&&t.length)try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?QEe(a,this,"E_JSON_PARSE"):a}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300}};B2.headers={common:{Accept:"application/json, text/plain, */*"}};Wn.forEach(["delete","get","head"],function(t){B2.headers[t]={}});Wn.forEach(["post","put","patch"],function(t){B2.headers[t]=Wn.merge(JEe)});var f8=B2,nIe=gi,rIe=f8,iIe=function(t,n,r){var i=this||rIe;return nIe.forEach(r,function(a){t=a.call(i,t,n)}),t},uV=function(t){return!!(t&&t.__CANCEL__)},fO=gi,J5=iIe,oIe=uV,aIe=f8;function ex(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var sIe=function(t){ex(t),t.headers=t.headers||{},t.data=J5.call(t,t.data,t.headers,t.transformRequest),t.headers=fO.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),fO.forEach(["delete","get","head","post","put","patch","common"],function(i){delete t.headers[i]});var n=t.adapter||aIe.adapter;return n(t).then(function(i){return ex(t),i.data=J5.call(t,i.data,i.headers,t.transformResponse),i},function(i){return oIe(i)||(ex(t),i&&i.response&&(i.response.data=J5.call(t,i.response.data,i.response.headers,t.transformResponse))),Promise.reject(i)})},tr=gi,dV=function(t,n){n=n||{};var r={},i=["url","method","data"],o=["headers","auth","proxy","params"],a=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],s=["validateStatus"];function l(f,p){return tr.isPlainObject(f)&&tr.isPlainObject(p)?tr.merge(f,p):tr.isPlainObject(p)?tr.merge({},p):tr.isArray(p)?p.slice():p}function c(f){tr.isUndefined(n[f])?tr.isUndefined(t[f])||(r[f]=l(void 0,t[f])):r[f]=l(t[f],n[f])}tr.forEach(i,function(p){tr.isUndefined(n[p])||(r[p]=l(void 0,n[p]))}),tr.forEach(o,c),tr.forEach(a,function(p){tr.isUndefined(n[p])?tr.isUndefined(t[p])||(r[p]=l(void 0,t[p])):r[p]=l(void 0,n[p])}),tr.forEach(s,function(p){p in n?r[p]=l(t[p],n[p]):p in t&&(r[p]=l(void 0,t[p]))});var u=i.concat(o).concat(a).concat(s),d=Object.keys(t).concat(Object.keys(n)).filter(function(p){return u.indexOf(p)===-1});return tr.forEach(d,c),r};const lIe="axios",cIe="0.21.4",uIe="Promise based HTTP client for the browser and node.js",dIe="index.js",fIe={test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},pIe={type:"git",url:"https://github.com/axios/axios.git"},hIe=["xhr","http","ajax","promise","node"],mIe="Matt Zabriskie",gIe="MIT",vIe={url:"https://github.com/axios/axios/issues"},yIe="https://axios-http.com",bIe={coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},xIe={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},SIe="dist/axios.min.js",wIe="dist/axios.min.js",CIe="./index.d.ts",kIe={"follow-redirects":"^1.14.0"},EIe=[{path:"./dist/axios.min.js",threshold:"5kB"}];var IIe={name:lIe,version:cIe,description:uIe,main:dIe,scripts:fIe,repository:pIe,keywords:hIe,author:mIe,license:gIe,bugs:vIe,homepage:yIe,devDependencies:bIe,browser:xIe,jsdelivr:SIe,unpkg:wIe,typings:CIe,dependencies:kIe,bundlesize:EIe},fV=IIe,p8={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){p8[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var pO={},TIe=fV.version.split(".");function pV(e,t){for(var n=t?t.split("."):TIe,r=e.split("."),i=0;i<3;i++){if(n[i]>r[i])return!0;if(n[i]<r[i])return!1}return!1}p8.transitional=function(t,n,r){var i=n&&pV(n);function o(a,s){return"[Axios v"+fV.version+"] Transitional option '"+a+"'"+s+(r?". "+r:"")}return function(a,s,l){if(t===!1)throw new Error(o(s," has been removed in "+n));return i&&!pO[s]&&(pO[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,s,l):!0}};function _Ie(e,t,n){if(typeof e!="object")throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var o=r[i],a=t[o];if(a){var s=e[o],l=s===void 0||a(s,o,e);if(l!==!0)throw new TypeError("option "+o+" must be "+l);continue}if(n!==!0)throw Error("Unknown option "+o)}}var PIe={isOlderVersion:pV,assertOptions:_Ie,validators:p8},hV=gi,OIe=sV,hO=MEe,mO=sIe,$2=dV,mV=PIe,ru=mV.validators;function d1(e){this.defaults=e,this.interceptors={request:new hO,response:new hO}}d1.prototype.request=function(t){typeof t=="string"?(t=arguments[1]||{},t.url=arguments[0]):t=t||{},t=$2(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;n!==void 0&&mV.assertOptions(n,{silentJSONParsing:ru.transitional(ru.boolean,"1.0.0"),forcedJSONParsing:ru.transitional(ru.boolean,"1.0.0"),clarifyTimeoutError:ru.transitional(ru.boolean,"1.0.0")},!1);var r=[],i=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(t)===!1||(i=i&&f.synchronous,r.unshift(f.fulfilled,f.rejected))});var o=[];this.interceptors.response.forEach(function(f){o.push(f.fulfilled,f.rejected)});var a;if(!i){var s=[mO,void 0];for(Array.prototype.unshift.apply(s,r),s=s.concat(o),a=Promise.resolve(t);s.length;)a=a.then(s.shift(),s.shift());return a}for(var l=t;r.length;){var c=r.shift(),u=r.shift();try{l=c(l)}catch(d){u(d);break}}try{a=mO(l)}catch(d){return Promise.reject(d)}for(;o.length;)a=a.then(o.shift(),o.shift());return a};d1.prototype.getUri=function(t){return t=$2(this.defaults,t),OIe(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};hV.forEach(["delete","get","head","options"],function(t){d1.prototype[t]=function(n,r){return this.request($2(r||{},{method:t,url:n,data:(r||{}).data}))}});hV.forEach(["post","put","patch"],function(t){d1.prototype[t]=function(n,r,i){return this.request($2(i||{},{method:t,url:n,data:r}))}});var MIe=d1;function h8(e){this.message=e}h8.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};h8.prototype.__CANCEL__=!0;var gV=h8,RIe=gV;function uv(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(i){t=i});var n=this;e(function(i){n.reason||(n.reason=new RIe(i),t(n.reason))})}uv.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};uv.source=function(){var t,n=new uv(function(i){t=i});return{token:n,cancel:t}};var DIe=uv,AIe=function(t){return function(r){return t.apply(null,r)}},LIe=function(t){return typeof t=="object"&&t.isAxiosError===!0},gO=gi,BIe=iV,Lg=MIe,$Ie=dV,FIe=f8;function vV(e){var t=new Lg(e),n=BIe(Lg.prototype.request,t);return gO.extend(n,Lg.prototype,t),gO.extend(n,t),n}var So=vV(FIe);So.Axios=Lg;So.create=function(t){return vV($Ie(So.defaults,t))};So.Cancel=gV;So.CancelToken=DIe;So.isCancel=uV;So.all=function(t){return Promise.all(t)};So.spread=AIe;So.isAxiosError=LIe;c8.exports=So;c8.exports.default=So;var NIe=c8.exports;function zIe(e){return e&&typeof e=="object"&&"default"in e?e.default:e}Object.defineProperty(ir,"__esModule",{value:!0});var Th=zIe(NIe),Ol=function(){return(Ol=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},tx=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(c){try{l(r.next(c))}catch(u){o(u)}}function s(c){try{l(r.throw(c))}catch(u){o(u)}}function l(c){c.done?i(c.value):new n(function(u){u(c.value)}).then(a,s)}l((r=r.apply(e,t||[])).next())})},nx=function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(l){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return a.label++,{value:u[1],done:!1};case 5:a.label++,r=u[1],u=[0];continue;case 7:u=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){a=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){a.label=u[1];break}if(u[0]===6&&a.label<i[1]){a.label=i[1],i=u;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(u);break}i[2]&&a.ops.pop(),a.trys.pop();continue}u=t.call(e,a)}catch(d){u=[6,d],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([l,c])}}},vO=void 0,yO=function(e){return e instanceof Date?e.getTime():typeof e=="number"||e===null||e===void 0?e:Number(e)},m8=function(e,t,n){return n>=e&&n<=t},bO=function(e){return!!e&&(typeof e=="object"||typeof e=="function")&&typeof e.then=="function"},g8={Accept:"application/json","Content-Type":"application/json"},jIe={timeout:0},v8=null,y8="CLIENT_ERROR",b8="SERVER_ERROR",x8="TIMEOUT_ERROR",S8="CONNECTION_ERROR",w8="NETWORK_ERROR",_h="UNKNOWN_ERROR",yV="CANCEL_ERROR",HIe=["ECONNABORTED"],VIe=["ENOTFOUND","ECONNREFUSED","ECONNRESET"],bV=function(e){return m8(200,299,e)},WIe=function(e){return m8(400,499,e)},UIe=function(e){return m8(500,599,e)},xV=function(e){return e.message==="Network Error"?w8:Th.isCancel(e)?yV:e.code?HIe.includes(e.code)?x8:VIe.includes(e.code)?S8:_h:C8(e.response?e.response.status:null)},C8=function(e){return e?bV(e)?v8:WIe(e)?y8:UIe(e)?b8:_h:_h},SV=function(e){var t,n=Ol({},g8,e.headers||{});if(e.axiosInstance)t=e.axiosInstance;else{var r=Ol({},e,{headers:void 0}),i=Ol({},jIe,r);t=Th.create(i)}var o=[],a=[],s=[],l=[],c=[],u=function(y,v){return n[y]=v,t},d=function(y){return function(v,b,x){return b===void 0&&(b={}),x===void 0&&(x={}),p(Ol({},x,{url:v,params:b,method:y}))}},f=function(y){return function(v,b,x){return x===void 0&&(x={}),p(Ol({},x,{url:v,method:y,data:b}))}},p=function(y){return tx(vO,void 0,void 0,function(){var v,b,x,w,E=this;return nx(this,function(C){switch(C.label){case 0:if(y.headers=Ol({},n,y.headers),a.length>0&&a.forEach(function(I){return I(y)}),!(s.length>0))return[3,6];v=0,C.label=1;case 1:return v<s.length?(b=s[v](y),bO(b)?[4,b]:[3,3]):[3,6];case 2:return C.sent(),[3,5];case 3:return[4,b(y)];case 4:C.sent(),C.label=5;case 5:return v++,[3,1];case 6:return x=yO(new Date),w=function(I){return tx(E,void 0,void 0,function(){var T;return nx(this,function(_){switch(_.label){case 0:return[4,g(x,I)];case 1:return T=_.sent(),[2,m(T)]}})})},[2,t.request(y).then(w).catch(w)]}})})},m=function(y){return o.forEach(function(v){try{v(y)}catch{}}),y},g=function(y,v){return tx(vO,void 0,void 0,function(){var b,x,w,E,C,I,T,_,P,M,D,V,B,L,G,z;return nx(this,function(j){switch(j.label){case 0:if(b=yO(new Date),x=b-y,w=v instanceof Error||Th.isCancel(v),E=v,C=v,I=w?C.response:E,T=I&&I.status||null,_=w?xV(v):C8(T),P=w?C:null,M=bV(T),D=v.config||null,V=I&&I.headers||null,B=I&&I.data||null,L={duration:x,problem:_,originalError:P,ok:M,status:T,headers:V,config:D,data:B},l.length>0&&l.forEach(function(F){return F(L)}),!(c.length>0))return[3,6];G=0,j.label=1;case 1:return G<c.length?(z=c[G](L),bO(z)?[4,z]:[3,3]):[3,6];case 2:return j.sent(),[3,5];case 3:return[4,z(L)];case 4:j.sent(),j.label=5;case 5:return G++,[3,1];case 6:return[2,L]}})})};return{axiosInstance:t,monitors:o,addMonitor:function(y){o.push(y)},requestTransforms:a,asyncRequestTransforms:s,responseTransforms:l,asyncResponseTransforms:c,addRequestTransform:function(y){return a.push(y)},addAsyncRequestTransform:function(y){return s.push(y)},addResponseTransform:function(y){return l.push(y)},addAsyncResponseTransform:function(y){return c.push(y)},setHeader:u,setHeaders:function(y){return Object.keys(y).forEach(function(v){return u(v,y[v])}),t},deleteHeader:function(y){return delete n[y],t},headers:n,setBaseURL:function(y){return t.defaults.baseURL=y,t},getBaseURL:function(){return t.defaults.baseURL},any:p,get:d("get"),delete:d("delete"),head:d("head"),post:f("post"),put:f("put"),patch:f("patch"),link:d("link"),unlink:d("unlink")}},wV=Th.isCancel,CV=Th.CancelToken,GIe={DEFAULT_HEADERS:g8,NONE:v8,CLIENT_ERROR:y8,SERVER_ERROR:b8,TIMEOUT_ERROR:x8,CONNECTION_ERROR:S8,NETWORK_ERROR:w8,UNKNOWN_ERROR:_h,create:SV,isCancel:wV,CancelToken:CV};ir.DEFAULT_HEADERS=g8,ir.NONE=v8,ir.CLIENT_ERROR=y8,ir.SERVER_ERROR=b8,ir.TIMEOUT_ERROR=x8,ir.CONNECTION_ERROR=S8,ir.NETWORK_ERROR=w8,ir.UNKNOWN_ERROR=_h,ir.CANCEL_ERROR=yV,ir.getProblemFromError=xV,ir.getProblemFromStatus=C8,ir.create=SV,ir.isCancel=wV,ir.CancelToken=CV,ir.default=GIe;var xO;(function(e){e[e.LEGACY=0]="LEGACY",e[e.EREBUS=1]="EREBUS"})(xO||(xO={}));var SO;(function(e){e.ERROR="ERROR",e.SAVING="SAVING",e.STASHED="STASHED",e.SAVED="SAVED"})(SO||(SO={}));var wO;(function(e){e.localError="localError",e.onlineError="onlineError"})(wO||(wO={}));var CO;(function(e){e.LOADING="loading",e.RESOLVED="resolved",e.REJECTED="rejected"})(CO||(CO={}));var kO;(function(e){e.FRESH="fresh",e.EXPIRED="expired",e.DYING="dying"})(kO||(kO={}));var EO;(function(e){e[e.FREEMAN=0]="FREEMAN",e[e.JOURNEYMAN=1]="JOURNEYMAN",e[e.MASTER=2]="MASTER",e[e.GRANDMASTER=3]="GRANDMASTER",e[e.SAGE=4]="SAGE",e[e.GRANDSAGE=5]="GRANDSAGE"})(EO||(EO={}));var IO;(function(e){e[e.BAREBONES=-1]="BAREBONES",e[e.BASE=0]="BASE",e[e.STANDARD=1]="STANDARD",e[e.EXPANDED=2]="EXPANDED",e[e.CONNECTED=3]="CONNECTED"})(IO||(IO={}));var TO;(function(e){e.UNINITIALIZED="uninitialized",e.WORLD="world",e.CHARACTER="character"})(TO||(TO={}));typeof process!="undefined"&&process.versions!=null&&process.versions.node!=null;var _O;(function(e){e[e.BAREBONES=-1]="BAREBONES",e[e.BASE=0]="BASE",e[e.STANDARD=1]="STANDARD",e[e.EXPANDED=2]="EXPANDED",e[e.CONNECTED=3]="CONNECTED"})(_O||(_O={}));var KIe=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function qIe(e){var t=e.defaultInputValue,n=t===void 0?"":t,r=e.defaultMenuIsOpen,i=r===void 0?!1:r,o=e.defaultValue,a=o===void 0?null:o,s=e.inputValue,l=e.menuIsOpen,c=e.onChange,u=e.onInputChange,d=e.onMenuClose,f=e.onMenuOpen,p=e.value,m=Od(e,KIe),g=h.exports.useState(s!==void 0?s:n),y=Go(g,2),v=y[0],b=y[1],x=h.exports.useState(l!==void 0?l:i),w=Go(x,2),E=w[0],C=w[1],I=h.exports.useState(p!==void 0?p:a),T=Go(I,2),_=T[0],P=T[1],M=h.exports.useCallback(function(j,F){typeof c=="function"&&c(j,F),P(j)},[c]),D=h.exports.useCallback(function(j,F){var H;typeof u=="function"&&(H=u(j,F)),b(H!==void 0?H:j)},[u]),V=h.exports.useCallback(function(){typeof f=="function"&&f(),C(!0)},[f]),B=h.exports.useCallback(function(){typeof d=="function"&&d(),C(!1)},[d]),L=s!==void 0?s:v,G=l!==void 0?l:E,z=p!==void 0?p:_;return Oe(Oe({},m),{},{inputValue:L,menuIsOpen:G,onChange:M,onInputChange:D,onMenuClose:B,onMenuOpen:V,value:z})}function YIe(){if(typeof Reflect=="undefined"||!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 XIe(e){var t=YIe();return function(){var r=Bi(e),i;if(t){var o=Bi(this).constructor;i=Reflect.construct(r,arguments,o)}else i=r.apply(this,arguments);return Pd(this,i)}}function ZIe(e){if(Array.isArray(e))return Ex(e)}function QIe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kV(e){return ZIe(e)||KM(e)||Y4(e)||QIe()}function JIe(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Lc(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function EV(e){return Lc(e).getComputedStyle(e)}function IV(e){return _V(e)?(e.nodeName||"").toLowerCase():""}let Lm;function eTe(){if(Lm)return Lm;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(Lm=e.brands.map(t=>t.brand+"/"+t.version).join(" "),Lm):navigator.userAgent}function TV(e){return e instanceof Lc(e).HTMLElement}function ic(e){return e instanceof Lc(e).Element}function _V(e){return e instanceof Lc(e).Node}function PO(e){if(typeof ShadowRoot=="undefined")return!1;const t=Lc(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function PV(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=EV(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(i)}function tTe(){return!/^((?!chrome|android).)*safari/i.test(eTe())}function nTe(e){return["html","body","#document"].includes(IV(e))}const OO=Math.round,F4={x:1,y:1};function MO(e){const t=!ic(e)&&e.contextElement?e.contextElement:ic(e)?e:null;if(!t)return F4;const n=t.getBoundingClientRect(),r=EV(t);if(r.boxSizing!=="border-box")return TV(t)?{x:t.offsetWidth>0&&OO(n.width)/t.offsetWidth||1,y:t.offsetHeight>0&&OO(n.height)/t.offsetHeight||1}:F4;let i=n.width/parseFloat(r.width),o=n.height/parseFloat(r.height);return(!i||!Number.isFinite(i))&&(i=1),(!o||!Number.isFinite(o))&&(o=1),{x:i,y:o}}function RO(e,t,n,r){var i,o,a,s;t===void 0&&(t=!1),n===void 0&&(n=!1);const l=e.getBoundingClientRect();let c=F4;t&&(r?ic(r)&&(c=MO(r)):c=MO(e));const u=ic(e)?Lc(e):window,d=!tTe()&&n,f=(l.left+(d&&(i=(o=u.visualViewport)==null?void 0:o.offsetLeft)!=null?i:0))/c.x,p=(l.top+(d&&(a=(s=u.visualViewport)==null?void 0:s.offsetTop)!=null?a:0))/c.y,m=l.width/c.x,g=l.height/c.y;return{width:m,height:g,top:p,right:f+m,bottom:p+g,left:f,x:f,y:p}}function rTe(e){return((_V(e)?e.ownerDocument:e.document)||window.document).documentElement}function iTe(e){if(IV(e)==="html")return e;const t=e.assignedSlot||e.parentNode||(PO(e)?e.host:null)||rTe(e);return PO(t)?t.host:t}function OV(e){const t=iTe(e);return nTe(t)?e.ownerDocument.body:TV(t)&&PV(t)?t:OV(t)}function Bg(e,t){var n;t===void 0&&(t=[]);const r=OV(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=Lc(r);return i?t.concat(o,o.visualViewport||[],PV(r)?r:[]):t.concat(r,Bg(r))}function oTe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=!0,animationFrame:s=!1}=r,l=i&&!s,c=l||o?[...ic(e)?Bg(e):e.contextElement?Bg(e.contextElement):[],...Bg(t)]:[];c.forEach(m=>{l&&m.addEventListener("scroll",n,{passive:!0}),o&&m.addEventListener("resize",n)});let u=null;if(a){let m=!0;u=new ResizeObserver(()=>{m||n(),m=!1}),ic(e)&&!s&&u.observe(e),!ic(e)&&e.contextElement&&!s&&u.observe(e.contextElement),u.observe(t)}let d,f=s?RO(e):null;s&&p();function p(){const m=RO(e);f&&(m.x!==f.x||m.y!==f.y||m.width!==f.width||m.height!==f.height)&&n(),f=m,d=requestAnimationFrame(p)}return n(),()=>{var m;c.forEach(g=>{l&&g.removeEventListener("scroll",n),o&&g.removeEventListener("resize",n)}),(m=u)==null||m.disconnect(),u=null,s&&cancelAnimationFrame(d)}}var N4=h.exports.useLayoutEffect,aTe=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],dv=function(){};function sTe(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function lTe(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&o.push("".concat(sTe(e,a)));return o.filter(function(s){return s}).map(function(s){return String(s).trim()}).join(" ")}var DO=function(t){return vTe(t)?t.filter(Boolean):Ri(t)==="object"&&t!==null?[t]:[]},MV=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=Od(t,aTe);return Oe({},n)},tn=function(t,n,r){var i=t.cx,o=t.getStyles,a=t.getClassNames,s=t.className;return{css:o(n,t),className:i(r!=null?r:{},a(n,t),s)}};function F2(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function cTe(e){return F2(e)?window.innerHeight:e.clientHeight}function RV(e){return F2(e)?window.pageYOffset:e.scrollTop}function fv(e,t){if(F2(e)){window.scrollTo(0,t);return}e.scrollTop=t}function uTe(e){var t=getComputedStyle(e),n=t.position==="absolute",r=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),!(n&&t.position==="static")&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return document.documentElement}function dTe(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function Bm(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:dv,i=RV(e),o=t-i,a=10,s=0;function l(){s+=a;var c=dTe(s,i,o,n);fv(e,c),s<n?window.requestAnimationFrame(l):r(e)}l()}function AO(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=t.offsetHeight/3;r.bottom+i>n.bottom?fv(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+i,e.scrollHeight)):r.top-i<n.top&&fv(e,Math.max(t.offsetTop-i,0))}function fTe(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function LO(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function pTe(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var DV=!1,hTe={get passive(){return DV=!0}},$m=typeof window!="undefined"?window:{};$m.addEventListener&&$m.removeEventListener&&($m.addEventListener("p",dv,hTe),$m.removeEventListener("p",dv,!1));var mTe=DV;function gTe(e){return e!=null}function vTe(e){return Array.isArray(e)}function Fm(e,t,n){return e?t:n}var yTe=function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var o=Object.entries(t).filter(function(a){var s=Go(a,1),l=s[0];return!r.includes(l)});return o.reduce(function(a,s){var l=Go(s,2),c=l[0],u=l[1];return a[c]=u,a},{})};function bTe(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,i=e.placement,o=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=uTe(n),c={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return c;var u=l.getBoundingClientRect(),d=u.height,f=n.getBoundingClientRect(),p=f.bottom,m=f.height,g=f.top,y=n.offsetParent.getBoundingClientRect(),v=y.top,b=a?window.innerHeight:cTe(l),x=RV(l),w=parseInt(getComputedStyle(n).marginBottom,10),E=parseInt(getComputedStyle(n).marginTop,10),C=v-E,I=b-g,T=C+x,_=d-x-g,P=p-b+x+w,M=x+g-E,D=160;switch(i){case"auto":case"bottom":if(I>=m)return{placement:"bottom",maxHeight:t};if(_>=m&&!a)return o&&Bm(l,P,D),{placement:"bottom",maxHeight:t};if(!a&&_>=r||a&&I>=r){o&&Bm(l,P,D);var V=a?I-w:_-w;return{placement:"bottom",maxHeight:V}}if(i==="auto"||a){var B=t,L=a?C:T;return L>=r&&(B=Math.min(L-w-s,t)),{placement:"top",maxHeight:B}}if(i==="bottom")return o&&fv(l,P),{placement:"bottom",maxHeight:t};break;case"top":if(C>=m)return{placement:"top",maxHeight:t};if(T>=m&&!a)return o&&Bm(l,M,D),{placement:"top",maxHeight:t};if(!a&&T>=r||a&&C>=r){var G=t;return(!a&&T>=r||a&&C>=r)&&(G=a?C-E:T-E),o&&Bm(l,M,D),{placement:"top",maxHeight:G}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(i,'".'))}return c}function xTe(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var AV=function(t){return t==="auto"?"bottom":t},STe=function(t,n){var r,i=t.placement,o=t.theme,a=o.borderRadius,s=o.spacing,l=o.colors;return Oe((r={label:"menu"},ur(r,xTe(i),"100%"),ur(r,"position","absolute"),ur(r,"width","100%"),ur(r,"zIndex",1),r),n?{}:{backgroundColor:l.neutral0,borderRadius:a,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:s.menuGutter,marginTop:s.menuGutter})},LV=h.exports.createContext(null),wTe=function(t){var n=t.children,r=t.minMenuHeight,i=t.maxMenuHeight,o=t.menuPlacement,a=t.menuPosition,s=t.menuShouldScrollIntoView,l=t.theme,c=h.exports.useContext(LV)||{},u=c.setPortalPlacement,d=h.exports.useRef(null),f=h.exports.useState(i),p=Go(f,2),m=p[0],g=p[1],y=h.exports.useState(null),v=Go(y,2),b=v[0],x=v[1],w=l.spacing.controlHeight;return N4(function(){var E=d.current;if(!!E){var C=a==="fixed",I=s&&!C,T=bTe({maxHeight:i,menuEl:E,minHeight:r,placement:o,shouldScroll:I,isFixedPosition:C,controlHeight:w});g(T.maxHeight),x(T.placement),u==null||u(T.placement)}},[i,o,a,s,r,u,w]),n({ref:d,placerProps:Oe(Oe({},t),{},{placement:b||AV(o),maxHeight:m})})},CTe=function(t){var n=t.children,r=t.innerRef,i=t.innerProps;return ke("div",J({},tn(t,"menu",{menu:!0}),{ref:r},i),n)},kTe=function(t,n){var r=t.maxHeight,i=t.theme.spacing.baseUnit;return Oe({maxHeight:r,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},n?{}:{paddingBottom:i,paddingTop:i})},ETe=function(t){var n=t.children,r=t.innerProps,i=t.innerRef,o=t.isMulti;return ke("div",J({},tn(t,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:i},r),n)},BV=function(t,n){var r=t.theme,i=r.spacing.baseUnit,o=r.colors;return Oe({textAlign:"center"},n?{}:{color:o.neutral40,padding:"".concat(i*2,"px ").concat(i*3,"px")})},ITe=BV,TTe=BV,$V=function(t){var n=t.children,r=t.innerProps;return ke("div",J({},tn(t,"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)};$V.defaultProps={children:"No options"};var FV=function(t){var n=t.children,r=t.innerProps;return ke("div",J({},tn(t,"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)};FV.defaultProps={children:"Loading..."};var _Te=function(t){var n=t.rect,r=t.offset,i=t.position;return{left:n.left,position:i,top:r,width:n.width,zIndex:1}},PTe=function(t){var n=t.appendTo,r=t.children,i=t.controlElement,o=t.innerProps,a=t.menuPlacement,s=t.menuPosition,l=h.exports.useRef(null),c=h.exports.useRef(null),u=h.exports.useState(AV(a)),d=Go(u,2),f=d[0],p=d[1],m=h.exports.useMemo(function(){return{setPortalPlacement:p}},[]),g=h.exports.useState(null),y=Go(g,2),v=y[0],b=y[1],x=h.exports.useCallback(function(){if(!!i){var I=fTe(i),T=s==="fixed"?0:window.pageYOffset,_=I[f]+T;(_!==(v==null?void 0:v.offset)||I.left!==(v==null?void 0:v.rect.left)||I.width!==(v==null?void 0:v.rect.width))&&b({offset:_,rect:I})}},[i,s,f,v==null?void 0:v.offset,v==null?void 0:v.rect.left,v==null?void 0:v.rect.width]);N4(function(){x()},[x]);var w=h.exports.useCallback(function(){typeof c.current=="function"&&(c.current(),c.current=null),i&&l.current&&(c.current=oTe(i,l.current,x,{elementResize:"ResizeObserver"in window}))},[i,x]);N4(function(){w()},[w]);var E=h.exports.useCallback(function(I){l.current=I,w()},[w]);if(!n&&s!=="fixed"||!v)return null;var C=ke("div",J({ref:E},tn(Oe(Oe({},t),{},{offset:v.offset,position:s,rect:v.rect}),"menuPortal",{"menu-portal":!0}),o),r);return ke(LV.Provider,{value:m},n?rl.exports.createPortal(C,n):C)},OTe=function(t){var n=t.isDisabled,r=t.isRtl;return{label:"container",direction:r?"rtl":void 0,pointerEvents:n?"none":void 0,position:"relative"}},MTe=function(t){var n=t.children,r=t.innerProps,i=t.isDisabled,o=t.isRtl;return ke("div",J({},tn(t,"container",{"--is-disabled":i,"--is-rtl":o}),r),n)},RTe=function(t,n){var r=t.theme.spacing,i=t.isMulti,o=t.hasValue,a=t.selectProps.controlShouldRenderValue;return Oe({alignItems:"center",display:i&&o&&a?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},n?{}:{padding:"".concat(r.baseUnit/2,"px ").concat(r.baseUnit*2,"px")})},DTe=function(t){var n=t.children,r=t.innerProps,i=t.isMulti,o=t.hasValue;return ke("div",J({},tn(t,"valueContainer",{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":o}),r),n)},ATe=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},LTe=function(t){var n=t.children,r=t.innerProps;return ke("div",J({},tn(t,"indicatorsContainer",{indicators:!0}),r),n)},BO,BTe=["size"],$Te={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},NV=function(t){var n=t.size,r=Od(t,BTe);return ke("svg",J({height:n,width:n,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:$Te},r))},k8=function(t){return ke(NV,J({size:20},t),ke("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},zV=function(t){return ke(NV,J({size:20},t),ke("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},jV=function(t,n){var r=t.isFocused,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return Oe({label:"indicatorContainer",display:"flex",transition:"color 150ms"},n?{}:{color:r?a.neutral60:a.neutral20,padding:o*2,":hover":{color:r?a.neutral80:a.neutral40}})},FTe=jV,NTe=function(t){var n=t.children,r=t.innerProps;return ke("div",J({},tn(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),r),n||ke(zV,null))},zTe=jV,jTe=function(t){var n=t.children,r=t.innerProps;return ke("div",J({},tn(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),r),n||ke(k8,null))},HTe=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing.baseUnit,a=i.colors;return Oe({label:"indicatorSeparator",alignSelf:"stretch",width:1},n?{}:{backgroundColor:r?a.neutral10:a.neutral20,marginBottom:o*2,marginTop:o*2})},VTe=function(t){var n=t.innerProps;return ke("span",J({},n,tn(t,"indicatorSeparator",{"indicator-separator":!0})))},WTe=lA(BO||(BO=JIe([`
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
`]))),UTe=function(t,n){var r=t.isFocused,i=t.size,o=t.theme,a=o.colors,s=o.spacing.baseUnit;return Oe({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:i,lineHeight:1,marginRight:i,textAlign:"center",verticalAlign:"middle"},n?{}:{color:r?a.neutral60:a.neutral20,padding:s*2})},rx=function(t){var n=t.delay,r=t.offset;return ke("span",{css:f9({animation:"".concat(WTe," 1s ease-in-out ").concat(n,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:r?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},HV=function(t){var n=t.innerProps,r=t.isRtl;return ke("div",J({},tn(t,"loadingIndicator",{indicator:!0,"loading-indicator":!0}),n),ke(rx,{delay:0,offset:r}),ke(rx,{delay:160,offset:!0}),ke(rx,{delay:320,offset:!r}))};HV.defaultProps={size:4};var GTe=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.theme,a=o.colors,s=o.borderRadius,l=o.spacing;return Oe({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:l.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},n?{}:{backgroundColor:r?a.neutral5:a.neutral0,borderColor:r?a.neutral10:i?a.primary:a.neutral20,borderRadius:s,borderStyle:"solid",borderWidth:1,boxShadow:i?"0 0 0 1px ".concat(a.primary):void 0,"&:hover":{borderColor:i?a.primary:a.neutral30}})},KTe=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.innerRef,a=t.innerProps,s=t.menuIsOpen;return ke("div",J({ref:o},tn(t,"control",{control:!0,"control--is-disabled":r,"control--is-focused":i,"control--menu-is-open":s}),a),n)},qTe=["data"],YTe=function(t,n){var r=t.theme.spacing;return n?{}:{paddingBottom:r.baseUnit*2,paddingTop:r.baseUnit*2}},XTe=function(t){var n=t.children,r=t.cx,i=t.getStyles,o=t.getClassNames,a=t.Heading,s=t.headingProps,l=t.innerProps,c=t.label,u=t.theme,d=t.selectProps;return ke("div",J({},tn(t,"group",{group:!0}),l),ke(a,J({},s,{selectProps:d,theme:u,getStyles:i,getClassNames:o,cx:r}),c),ke("div",null,n))},ZTe=function(t,n){var r=t.theme,i=r.colors,o=r.spacing;return Oe({label:"group",cursor:"default",display:"block"},n?{}:{color:i.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:o.baseUnit*3,paddingRight:o.baseUnit*3,textTransform:"uppercase"})},QTe=function(t){var n=MV(t);n.data;var r=Od(n,qTe);return ke("div",J({},tn(t,"groupHeading",{"group-heading":!0}),r))},JTe=["innerRef","isDisabled","isHidden","inputClassName"],e_e=function(t,n){var r=t.isDisabled,i=t.value,o=t.theme,a=o.spacing,s=o.colors;return Oe(Oe({visibility:r?"hidden":"visible",transform:i?"translateZ(0)":""},t_e),n?{}:{margin:a.baseUnit/2,paddingBottom:a.baseUnit/2,paddingTop:a.baseUnit/2,color:s.neutral80})},VV={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},t_e={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":Oe({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},VV)},n_e=function(t){return Oe({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},VV)},r_e=function(t){var n=t.cx,r=t.value,i=MV(t),o=i.innerRef,a=i.isDisabled,s=i.isHidden,l=i.inputClassName,c=Od(i,JTe);return ke("div",J({},tn(t,"input",{"input-container":!0}),{"data-value":r||""}),ke("input",J({className:n({input:!0},l),ref:o,style:n_e(s),disabled:a},c)))},i_e=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors;return Oe({label:"multiValue",display:"flex",minWidth:0},n?{}:{backgroundColor:a.neutral10,borderRadius:o/2,margin:i.baseUnit/2})},o_e=function(t,n){var r=t.theme,i=r.borderRadius,o=r.colors,a=t.cropWithEllipsis;return Oe({overflow:"hidden",textOverflow:a||a===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},n?{}:{borderRadius:i/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},a_e=function(t,n){var r=t.theme,i=r.spacing,o=r.borderRadius,a=r.colors,s=t.isFocused;return Oe({alignItems:"center",display:"flex"},n?{}:{borderRadius:o/2,backgroundColor:s?a.dangerLight:void 0,paddingLeft:i.baseUnit,paddingRight:i.baseUnit,":hover":{backgroundColor:a.dangerLight,color:a.danger}})},WV=function(t){var n=t.children,r=t.innerProps;return ke("div",r,n)},s_e=WV,l_e=WV;function c_e(e){var t=e.children,n=e.innerProps;return ke("div",J({role:"button"},n),t||ke(k8,{size:14}))}var u_e=function(t){var n=t.children,r=t.components,i=t.data,o=t.innerProps,a=t.isDisabled,s=t.removeProps,l=t.selectProps,c=r.Container,u=r.Label,d=r.Remove;return ke(c,{data:i,innerProps:Oe(Oe({},tn(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":a})),o),selectProps:l},ke(u,{data:i,innerProps:Oe({},tn(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},n),ke(d,{data:i,innerProps:Oe(Oe({},tn(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(n||"option")},s),selectProps:l}))},d_e=function(t,n){var r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.theme,s=a.spacing,l=a.colors;return Oe({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},n?{}:{backgroundColor:o?l.primary:i?l.primary25:"transparent",color:r?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(s.baseUnit*2,"px ").concat(s.baseUnit*3,"px"),":active":{backgroundColor:r?void 0:o?l.primary:l.primary50}})},f_e=function(t){var n=t.children,r=t.isDisabled,i=t.isFocused,o=t.isSelected,a=t.innerRef,s=t.innerProps;return ke("div",J({},tn(t,"option",{option:!0,"option--is-disabled":r,"option--is-focused":i,"option--is-selected":o}),{ref:a,"aria-disabled":r},s),n)},p_e=function(t,n){var r=t.theme,i=r.spacing,o=r.colors;return Oe({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},n?{}:{color:o.neutral50,marginLeft:i.baseUnit/2,marginRight:i.baseUnit/2})},h_e=function(t){var n=t.children,r=t.innerProps;return ke("div",J({},tn(t,"placeholder",{placeholder:!0}),r),n)},m_e=function(t,n){var r=t.isDisabled,i=t.theme,o=i.spacing,a=i.colors;return Oe({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n?{}:{color:r?a.neutral40:a.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},g_e=function(t){var n=t.children,r=t.isDisabled,i=t.innerProps;return ke("div",J({},tn(t,"singleValue",{"single-value":!0,"single-value--is-disabled":r}),i),n)},v_e={ClearIndicator:jTe,Control:KTe,DropdownIndicator:NTe,DownChevron:zV,CrossIcon:k8,Group:XTe,GroupHeading:QTe,IndicatorsContainer:LTe,IndicatorSeparator:VTe,Input:r_e,LoadingIndicator:HV,Menu:CTe,MenuList:ETe,MenuPortal:PTe,LoadingMessage:FV,NoOptionsMessage:$V,MultiValue:u_e,MultiValueContainer:s_e,MultiValueLabel:l_e,MultiValueRemove:c_e,Option:f_e,Placeholder:h_e,SelectContainer:MTe,SingleValue:g_e,ValueContainer:DTe},y_e=function(t){return Oe(Oe({},v_e),t.components)},$O=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function b_e(e,t){return!!(e===t||$O(e)&&$O(t))}function x_e(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!b_e(e[n],t[n]))return!1;return!0}function S_e(e,t){t===void 0&&(t=x_e);var n=null;function r(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];if(n&&n.lastThis===this&&t(i,n.lastArgs))return n.lastResult;var a=e.apply(this,i);return n={lastResult:a,lastArgs:i,lastThis:this},a}return r.clear=function(){n=null},r}var w_e={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},FO=function(t){return ke("span",J({css:w_e},t))},C_e={guidance:function(t){var n=t.isSearchable,r=t.isMulti,i=t.isDisabled,o=t.tabSelectsValue,a=t.context;switch(a){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(t["aria-label"]||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(t){var n=t.action,r=t.label,i=r===void 0?"":r,o=t.labels,a=t.isDisabled;switch(n){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(i,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return a?"option ".concat(i," is disabled. Select another option."):"option ".concat(i,", selected.");default:return""}},onFocus:function(t){var n=t.context,r=t.focused,i=t.options,o=t.label,a=o===void 0?"":o,s=t.selectValue,l=t.isDisabled,c=t.isSelected,u=function(m,g){return m&&m.length?"".concat(m.indexOf(g)+1," of ").concat(m.length):""};if(n==="value"&&s)return"value ".concat(a," focused, ").concat(u(s,r),".");if(n==="menu"){var d=l?" disabled":"",f="".concat(c?"selected":"focused").concat(d);return"option ".concat(a," ").concat(f,", ").concat(u(i,r),".")}return""},onFilter:function(t){var n=t.inputValue,r=t.resultsMessage;return"".concat(r).concat(n?" for search term "+n:"",".")}},k_e=function(t){var n=t.ariaSelection,r=t.focusedOption,i=t.focusedValue,o=t.focusableOptions,a=t.isFocused,s=t.selectValue,l=t.selectProps,c=t.id,u=l.ariaLiveMessages,d=l.getOptionLabel,f=l.inputValue,p=l.isMulti,m=l.isOptionDisabled,g=l.isSearchable,y=l.menuIsOpen,v=l.options,b=l.screenReaderStatus,x=l.tabSelectsValue,w=l["aria-label"],E=l["aria-live"],C=h.exports.useMemo(function(){return Oe(Oe({},C_e),u||{})},[u]),I=h.exports.useMemo(function(){var B="";if(n&&C.onChange){var L=n.option,G=n.options,z=n.removedValue,j=n.removedValues,F=n.value,H=function(ie){return Array.isArray(ie)?null:ie},R=z||L||H(F),W=R?d(R):"",X=G||j||void 0,te=X?X.map(d):[],re=Oe({isDisabled:R&&m(R,s),label:W,labels:te},n);B=C.onChange(re)}return B},[n,C,m,s,d]),T=h.exports.useMemo(function(){var B="",L=r||i,G=!!(r&&s&&s.includes(r));if(L&&C.onFocus){var z={focused:L,label:d(L),isDisabled:m(L,s),isSelected:G,options:o,context:L===r?"menu":"value",selectValue:s};B=C.onFocus(z)}return B},[r,i,d,m,C,o,s]),_=h.exports.useMemo(function(){var B="";if(y&&v.length&&C.onFilter){var L=b({count:o.length});B=C.onFilter({inputValue:f,resultsMessage:L})}return B},[o,f,y,C,v,b]),P=h.exports.useMemo(function(){var B="";if(C.guidance){var L=i?"value":y?"menu":"input";B=C.guidance({"aria-label":w,context:L,isDisabled:r&&m(r,s),isMulti:p,isSearchable:g,tabSelectsValue:x})}return B},[w,r,i,p,m,g,y,C,s,x]),M="".concat(T," ").concat(_," ").concat(P),D=ke(h.exports.Fragment,null,ke("span",{id:"aria-selection"},I),ke("span",{id:"aria-context"},M)),V=(n==null?void 0:n.action)==="initial-input-focus";return ke(h.exports.Fragment,null,ke(FO,{id:c},V&&D),ke(FO,{"aria-live":E,"aria-atomic":"false","aria-relevant":"additions text"},a&&!V&&D))},z4=[{base:"A",letters:"A\u24B6\uFF21\xC0\xC1\xC2\u1EA6\u1EA4\u1EAA\u1EA8\xC3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\xC4\u01DE\u1EA2\xC5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F"},{base:"AA",letters:"\uA732"},{base:"AE",letters:"\xC6\u01FC\u01E2"},{base:"AO",letters:"\uA734"},{base:"AU",letters:"\uA736"},{base:"AV",letters:"\uA738\uA73A"},{base:"AY",letters:"\uA73C"},{base:"B",letters:"B\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181"},{base:"C",letters:"C\u24B8\uFF23\u0106\u0108\u010A\u010C\xC7\u1E08\u0187\u023B\uA73E"},{base:"D",letters:"D\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779"},{base:"DZ",letters:"\u01F1\u01C4"},{base:"Dz",letters:"\u01F2\u01C5"},{base:"E",letters:"E\u24BA\uFF25\xC8\xC9\xCA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\xCB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E"},{base:"F",letters:"F\u24BB\uFF26\u1E1E\u0191\uA77B"},{base:"G",letters:"G\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E"},{base:"H",letters:"H\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D"},{base:"I",letters:"I\u24BE\uFF29\xCC\xCD\xCE\u0128\u012A\u012C\u0130\xCF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197"},{base:"J",letters:"J\u24BF\uFF2A\u0134\u0248"},{base:"K",letters:"K\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2"},{base:"L",letters:"L\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780"},{base:"LJ",letters:"\u01C7"},{base:"Lj",letters:"\u01C8"},{base:"M",letters:"M\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C"},{base:"N",letters:"N\u24C3\uFF2E\u01F8\u0143\xD1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4"},{base:"NJ",letters:"\u01CA"},{base:"Nj",letters:"\u01CB"},{base:"O",letters:"O\u24C4\uFF2F\xD2\xD3\xD4\u1ED2\u1ED0\u1ED6\u1ED4\xD5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\xD6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\xD8\u01FE\u0186\u019F\uA74A\uA74C"},{base:"OI",letters:"\u01A2"},{base:"OO",letters:"\uA74E"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754"},{base:"Q",letters:"Q\u24C6\uFF31\uA756\uA758\u024A"},{base:"R",letters:"R\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782"},{base:"S",letters:"S\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784"},{base:"T",letters:"T\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786"},{base:"TZ",letters:"\uA728"},{base:"U",letters:"U\u24CA\uFF35\xD9\xDA\xDB\u0168\u1E78\u016A\u1E7A\u016C\xDC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244"},{base:"V",letters:"V\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245"},{base:"VY",letters:"\uA760"},{base:"W",letters:"W\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72"},{base:"X",letters:"X\u24CD\uFF38\u1E8A\u1E8C"},{base:"Y",letters:"Y\u24CE\uFF39\u1EF2\xDD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE"},{base:"Z",letters:"Z\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762"},{base:"a",letters:"a\u24D0\uFF41\u1E9A\xE0\xE1\xE2\u1EA7\u1EA5\u1EAB\u1EA9\xE3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\xE4\u01DF\u1EA3\xE5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250"},{base:"aa",letters:"\uA733"},{base:"ae",letters:"\xE6\u01FD\u01E3"},{base:"ao",letters:"\uA735"},{base:"au",letters:"\uA737"},{base:"av",letters:"\uA739\uA73B"},{base:"ay",letters:"\uA73D"},{base:"b",letters:"b\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253"},{base:"c",letters:"c\u24D2\uFF43\u0107\u0109\u010B\u010D\xE7\u1E09\u0188\u023C\uA73F\u2184"},{base:"d",letters:"d\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A"},{base:"dz",letters:"\u01F3\u01C6"},{base:"e",letters:"e\u24D4\uFF45\xE8\xE9\xEA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\xEB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD"},{base:"f",letters:"f\u24D5\uFF46\u1E1F\u0192\uA77C"},{base:"g",letters:"g\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F"},{base:"h",letters:"h\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24D8\uFF49\xEC\xED\xEE\u0129\u012B\u012D\xEF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131"},{base:"j",letters:"j\u24D9\uFF4A\u0135\u01F0\u0249"},{base:"k",letters:"k\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3"},{base:"l",letters:"l\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747"},{base:"lj",letters:"\u01C9"},{base:"m",letters:"m\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F"},{base:"n",letters:"n\u24DD\uFF4E\u01F9\u0144\xF1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5"},{base:"nj",letters:"\u01CC"},{base:"o",letters:"o\u24DE\uFF4F\xF2\xF3\xF4\u1ED3\u1ED1\u1ED7\u1ED5\xF5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\xF6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\xF8\u01FF\u0254\uA74B\uA74D\u0275"},{base:"oi",letters:"\u01A3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\uA74F"},{base:"p",letters:"p\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755"},{base:"q",letters:"q\u24E0\uFF51\u024B\uA757\uA759"},{base:"r",letters:"r\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783"},{base:"s",letters:"s\u24E2\uFF53\xDF\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B"},{base:"t",letters:"t\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787"},{base:"tz",letters:"\uA729"},{base:"u",letters:"u\u24E4\uFF55\xF9\xFA\xFB\u0169\u1E79\u016B\u1E7B\u016D\xFC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289"},{base:"v",letters:"v\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C"},{base:"vy",letters:"\uA761"},{base:"w",letters:"w\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73"},{base:"x",letters:"x\u24E7\uFF58\u1E8B\u1E8D"},{base:"y",letters:"y\u24E8\uFF59\u1EF3\xFD\u0177\u1EF9\u0233\u1E8F\xFF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF"},{base:"z",letters:"z\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763"}],E_e=new RegExp("["+z4.map(function(e){return e.letters}).join("")+"]","g"),UV={};for(var ix=0;ix<z4.length;ix++)for(var ox=z4[ix],ax=0;ax<ox.letters.length;ax++)UV[ox.letters[ax]]=ox.base;var GV=function(t){return t.replace(E_e,function(n){return UV[n]})},I_e=S_e(GV),NO=function(t){return t.replace(/^\s+|\s+$/g,"")},T_e=function(t){return"".concat(t.label," ").concat(t.value)},__e=function(t){return function(n,r){if(n.data.__isNew__)return!0;var i=Oe({ignoreCase:!0,ignoreAccents:!0,stringify:T_e,trim:!0,matchFrom:"any"},t),o=i.ignoreCase,a=i.ignoreAccents,s=i.stringify,l=i.trim,c=i.matchFrom,u=l?NO(r):r,d=l?NO(s(n)):s(n);return o&&(u=u.toLowerCase(),d=d.toLowerCase()),a&&(u=I_e(u),d=GV(d)),c==="start"?d.substr(0,u.length)===u:d.indexOf(u)>-1}},P_e=["innerRef"];function O_e(e){var t=e.innerRef,n=Od(e,P_e),r=yTe(n,"onExited","in","enter","exit","appear");return ke("input",J({ref:t},r,{css:f9({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var M_e=function(t){t.preventDefault(),t.stopPropagation()};function R_e(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,i=e.onTopArrive,o=e.onTopLeave,a=h.exports.useRef(!1),s=h.exports.useRef(!1),l=h.exports.useRef(0),c=h.exports.useRef(null),u=h.exports.useCallback(function(y,v){if(c.current!==null){var b=c.current,x=b.scrollTop,w=b.scrollHeight,E=b.clientHeight,C=c.current,I=v>0,T=w-E-x,_=!1;T>v&&a.current&&(r&&r(y),a.current=!1),I&&s.current&&(o&&o(y),s.current=!1),I&&v>T?(n&&!a.current&&n(y),C.scrollTop=w,_=!0,a.current=!0):!I&&-v>x&&(i&&!s.current&&i(y),C.scrollTop=0,_=!0,s.current=!0),_&&M_e(y)}},[n,r,i,o]),d=h.exports.useCallback(function(y){u(y,y.deltaY)},[u]),f=h.exports.useCallback(function(y){l.current=y.changedTouches[0].clientY},[]),p=h.exports.useCallback(function(y){var v=l.current-y.changedTouches[0].clientY;u(y,v)},[u]),m=h.exports.useCallback(function(y){if(!!y){var v=mTe?{passive:!1}:!1;y.addEventListener("wheel",d,v),y.addEventListener("touchstart",f,v),y.addEventListener("touchmove",p,v)}},[p,f,d]),g=h.exports.useCallback(function(y){!y||(y.removeEventListener("wheel",d,!1),y.removeEventListener("touchstart",f,!1),y.removeEventListener("touchmove",p,!1))},[p,f,d]);return h.exports.useEffect(function(){if(!!t){var y=c.current;return m(y),function(){g(y)}}},[t,m,g]),function(y){c.current=y}}var zO=["boxSizing","height","overflow","paddingRight","position"],jO={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function HO(e){e.preventDefault()}function VO(e){e.stopPropagation()}function WO(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;e===0?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function UO(){return"ontouchstart"in window||navigator.maxTouchPoints}var GO=!!(typeof window!="undefined"&&window.document&&window.document.createElement),Lf=0,iu={capture:!1,passive:!1};function D_e(e){var t=e.isEnabled,n=e.accountForScrollbars,r=n===void 0?!0:n,i=h.exports.useRef({}),o=h.exports.useRef(null),a=h.exports.useCallback(function(l){if(!!GO){var c=document.body,u=c&&c.style;if(r&&zO.forEach(function(m){var g=u&&u[m];i.current[m]=g}),r&&Lf<1){var d=parseInt(i.current.paddingRight,10)||0,f=document.body?document.body.clientWidth:0,p=window.innerWidth-f+d||0;Object.keys(jO).forEach(function(m){var g=jO[m];u&&(u[m]=g)}),u&&(u.paddingRight="".concat(p,"px"))}c&&UO()&&(c.addEventListener("touchmove",HO,iu),l&&(l.addEventListener("touchstart",WO,iu),l.addEventListener("touchmove",VO,iu))),Lf+=1}},[r]),s=h.exports.useCallback(function(l){if(!!GO){var c=document.body,u=c&&c.style;Lf=Math.max(Lf-1,0),r&&Lf<1&&zO.forEach(function(d){var f=i.current[d];u&&(u[d]=f)}),c&&UO()&&(c.removeEventListener("touchmove",HO,iu),l&&(l.removeEventListener("touchstart",WO,iu),l.removeEventListener("touchmove",VO,iu)))}},[r]);return h.exports.useEffect(function(){if(!!t){var l=o.current;return a(l),function(){s(l)}}},[t,a,s]),function(l){o.current=l}}var A_e=function(){return document.activeElement&&document.activeElement.blur()},L_e={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function B_e(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,i=r===void 0?!0:r,o=e.onBottomArrive,a=e.onBottomLeave,s=e.onTopArrive,l=e.onTopLeave,c=R_e({isEnabled:i,onBottomArrive:o,onBottomLeave:a,onTopArrive:s,onTopLeave:l}),u=D_e({isEnabled:n}),d=function(p){c(p),u(p)};return ke(h.exports.Fragment,null,n&&ke("div",{onClick:A_e,css:L_e}),t(d))}var $_e={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},F_e=function(t){var n=t.name,r=t.onFocus;return ke("input",{required:!0,name:n,tabIndex:-1,onFocus:r,css:$_e,value:"",onChange:function(){}})},N_e=function(t){return t.label},z_e=function(t){return t.label},j_e=function(t){return t.value},H_e=function(t){return!!t.isDisabled},V_e={clearIndicator:zTe,container:OTe,control:GTe,dropdownIndicator:FTe,group:YTe,groupHeading:ZTe,indicatorsContainer:ATe,indicatorSeparator:HTe,input:e_e,loadingIndicator:UTe,loadingMessage:TTe,menu:STe,menuList:kTe,menuPortal:_Te,multiValue:i_e,multiValueLabel:o_e,multiValueRemove:a_e,noOptionsMessage:ITe,option:d_e,placeholder:p_e,singleValue:m_e,valueContainer:RTe},W_e={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},U_e=4,KV=4,G_e=38,K_e=KV*2,q_e={baseUnit:KV,controlHeight:G_e,menuGutter:K_e},sx={borderRadius:U_e,colors:W_e,spacing:q_e},Y_e={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:LO(),captureMenuScroll:!LO(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:__e(),formatGroupLabel:N_e,getOptionLabel:z_e,getOptionValue:j_e,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:H_e,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!pTe(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(t){var n=t.count;return"".concat(n," result").concat(n!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function KO(e,t,n,r){var i=ZV(e,t,n),o=QV(e,t,n),a=XV(e,t),s=pv(e,t);return{type:"option",data:t,isDisabled:i,isSelected:o,label:a,value:s,index:r}}function qV(e,t){return e.options.map(function(n,r){if("options"in n){var i=n.options.map(function(a,s){return KO(e,a,t,s)}).filter(function(a){return qO(e,a)});return i.length>0?{type:"group",data:n,options:i,index:r}:void 0}var o=KO(e,n,t,r);return qO(e,o)?o:void 0}).filter(gTe)}function YV(e){return e.reduce(function(t,n){return n.type==="group"?t.push.apply(t,kV(n.options.map(function(r){return r.data}))):t.push(n.data),t},[])}function X_e(e,t){return YV(qV(e,t))}function qO(e,t){var n=e.inputValue,r=n===void 0?"":n,i=t.data,o=t.isSelected,a=t.label,s=t.value;return(!eW(e)||!o)&&JV(e,{label:a,value:s,data:i},r)}function Z_e(e,t){var n=e.focusedValue,r=e.selectValue,i=r.indexOf(n);if(i>-1){var o=t.indexOf(n);if(o>-1)return n;if(i<t.length)return t[i]}return null}function Q_e(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}var XV=function(t,n){return t.getOptionLabel(n)},pv=function(t,n){return t.getOptionValue(n)};function ZV(e,t,n){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,n):!1}function QV(e,t,n){if(n.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,n);var r=pv(e,t);return n.some(function(i){return pv(e,i)===r})}function JV(e,t,n){return e.filterOption?e.filterOption(t,n):!0}var eW=function(t){var n=t.hideSelectedOptions,r=t.isMulti;return n===void 0?r:n},J_e=1,tW=function(e){Rh(n,e);var t=XIe(n);function n(r){var i;if(zi(this,n),i=t.call(this,r),i.state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},i.blockOptionHover=!1,i.isComposing=!1,i.commonProps=void 0,i.initialTouchX=0,i.initialTouchY=0,i.instancePrefix="",i.openAfterFocus=!1,i.scrollToFocusedOptionOnUpdate=!1,i.userIsDragging=void 0,i.controlRef=null,i.getControlRef=function(s){i.controlRef=s},i.focusedOptionRef=null,i.getFocusedOptionRef=function(s){i.focusedOptionRef=s},i.menuListRef=null,i.getMenuListRef=function(s){i.menuListRef=s},i.inputRef=null,i.getInputRef=function(s){i.inputRef=s},i.focus=i.focusInput,i.blur=i.blurInput,i.onChange=function(s,l){var c=i.props,u=c.onChange,d=c.name;l.name=d,i.ariaOnChange(s,l),u(s,l)},i.setValue=function(s,l,c){var u=i.props,d=u.closeMenuOnSelect,f=u.isMulti,p=u.inputValue;i.onInputChange("",{action:"set-value",prevInputValue:p}),d&&(i.setState({inputIsHiddenAfterUpdate:!f}),i.onMenuClose()),i.setState({clearFocusValueOnUpdate:!0}),i.onChange(s,{action:l,option:c})},i.selectOption=function(s){var l=i.props,c=l.blurInputOnSelect,u=l.isMulti,d=l.name,f=i.state.selectValue,p=u&&i.isOptionSelected(s,f),m=i.isOptionDisabled(s,f);if(p){var g=i.getOptionValue(s);i.setValue(f.filter(function(y){return i.getOptionValue(y)!==g}),"deselect-option",s)}else if(!m)u?i.setValue([].concat(kV(f),[s]),"select-option",s):i.setValue(s,"select-option");else{i.ariaOnChange(s,{action:"select-option",option:s,name:d});return}c&&i.blurInput()},i.removeValue=function(s){var l=i.props.isMulti,c=i.state.selectValue,u=i.getOptionValue(s),d=c.filter(function(p){return i.getOptionValue(p)!==u}),f=Fm(l,d,d[0]||null);i.onChange(f,{action:"remove-value",removedValue:s}),i.focusInput()},i.clearValue=function(){var s=i.state.selectValue;i.onChange(Fm(i.props.isMulti,[],null),{action:"clear",removedValues:s})},i.popValue=function(){var s=i.props.isMulti,l=i.state.selectValue,c=l[l.length-1],u=l.slice(0,l.length-1),d=Fm(s,u,u[0]||null);i.onChange(d,{action:"pop-value",removedValue:c})},i.getValue=function(){return i.state.selectValue},i.cx=function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return lTe.apply(void 0,[i.props.classNamePrefix].concat(l))},i.getOptionLabel=function(s){return XV(i.props,s)},i.getOptionValue=function(s){return pv(i.props,s)},i.getStyles=function(s,l){var c=i.props.unstyled,u=V_e[s](l,c);u.boxSizing="border-box";var d=i.props.styles[s];return d?d(u,l):u},i.getClassNames=function(s,l){var c,u;return(c=(u=i.props.classNames)[s])===null||c===void 0?void 0:c.call(u,l)},i.getElementId=function(s){return"".concat(i.instancePrefix,"-").concat(s)},i.getComponents=function(){return y_e(i.props)},i.buildCategorizedOptions=function(){return qV(i.props,i.state.selectValue)},i.getCategorizedOptions=function(){return i.props.menuIsOpen?i.buildCategorizedOptions():[]},i.buildFocusableOptions=function(){return YV(i.buildCategorizedOptions())},i.getFocusableOptions=function(){return i.props.menuIsOpen?i.buildFocusableOptions():[]},i.ariaOnChange=function(s,l){i.setState({ariaSelection:Oe({value:s},l)})},i.onMenuMouseDown=function(s){s.button===0&&(s.stopPropagation(),s.preventDefault(),i.focusInput())},i.onMenuMouseMove=function(s){i.blockOptionHover=!1},i.onControlMouseDown=function(s){if(!s.defaultPrevented){var l=i.props.openMenuOnClick;i.state.isFocused?i.props.menuIsOpen?s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&i.onMenuClose():l&&i.openMenu("first"):(l&&(i.openAfterFocus=!0),i.focusInput()),s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&s.preventDefault()}},i.onDropdownIndicatorMouseDown=function(s){if(!(s&&s.type==="mousedown"&&s.button!==0)&&!i.props.isDisabled){var l=i.props,c=l.isMulti,u=l.menuIsOpen;i.focusInput(),u?(i.setState({inputIsHiddenAfterUpdate:!c}),i.onMenuClose()):i.openMenu("first"),s.preventDefault()}},i.onClearIndicatorMouseDown=function(s){s&&s.type==="mousedown"&&s.button!==0||(i.clearValue(),s.preventDefault(),i.openAfterFocus=!1,s.type==="touchend"?i.focusInput():setTimeout(function(){return i.focusInput()}))},i.onScroll=function(s){typeof i.props.closeMenuOnScroll=="boolean"?s.target instanceof HTMLElement&&F2(s.target)&&i.props.onMenuClose():typeof i.props.closeMenuOnScroll=="function"&&i.props.closeMenuOnScroll(s)&&i.props.onMenuClose()},i.onCompositionStart=function(){i.isComposing=!0},i.onCompositionEnd=function(){i.isComposing=!1},i.onTouchStart=function(s){var l=s.touches,c=l&&l.item(0);!c||(i.initialTouchX=c.clientX,i.initialTouchY=c.clientY,i.userIsDragging=!1)},i.onTouchMove=function(s){var l=s.touches,c=l&&l.item(0);if(!!c){var u=Math.abs(c.clientX-i.initialTouchX),d=Math.abs(c.clientY-i.initialTouchY),f=5;i.userIsDragging=u>f||d>f}},i.onTouchEnd=function(s){i.userIsDragging||(i.controlRef&&!i.controlRef.contains(s.target)&&i.menuListRef&&!i.menuListRef.contains(s.target)&&i.blurInput(),i.initialTouchX=0,i.initialTouchY=0)},i.onControlTouchEnd=function(s){i.userIsDragging||i.onControlMouseDown(s)},i.onClearIndicatorTouchEnd=function(s){i.userIsDragging||i.onClearIndicatorMouseDown(s)},i.onDropdownIndicatorTouchEnd=function(s){i.userIsDragging||i.onDropdownIndicatorMouseDown(s)},i.handleInputChange=function(s){var l=i.props.inputValue,c=s.currentTarget.value;i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange(c,{action:"input-change",prevInputValue:l}),i.props.menuIsOpen||i.onMenuOpen()},i.onInputFocus=function(s){i.props.onFocus&&i.props.onFocus(s),i.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(i.openAfterFocus||i.props.openMenuOnFocus)&&i.openMenu("first"),i.openAfterFocus=!1},i.onInputBlur=function(s){var l=i.props.inputValue;if(i.menuListRef&&i.menuListRef.contains(document.activeElement)){i.inputRef.focus();return}i.props.onBlur&&i.props.onBlur(s),i.onInputChange("",{action:"input-blur",prevInputValue:l}),i.onMenuClose(),i.setState({focusedValue:null,isFocused:!1})},i.onOptionHover=function(s){i.blockOptionHover||i.state.focusedOption===s||i.setState({focusedOption:s})},i.shouldHideSelectedOptions=function(){return eW(i.props)},i.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),i.focus()},i.onKeyDown=function(s){var l=i.props,c=l.isMulti,u=l.backspaceRemovesValue,d=l.escapeClearsValue,f=l.inputValue,p=l.isClearable,m=l.isDisabled,g=l.menuIsOpen,y=l.onKeyDown,v=l.tabSelectsValue,b=l.openMenuOnFocus,x=i.state,w=x.focusedOption,E=x.focusedValue,C=x.selectValue;if(!m&&!(typeof y=="function"&&(y(s),s.defaultPrevented))){switch(i.blockOptionHover=!0,s.key){case"ArrowLeft":if(!c||f)return;i.focusValue("previous");break;case"ArrowRight":if(!c||f)return;i.focusValue("next");break;case"Delete":case"Backspace":if(f)return;if(E)i.removeValue(E);else{if(!u)return;c?i.popValue():p&&i.clearValue()}break;case"Tab":if(i.isComposing||s.shiftKey||!g||!v||!w||b&&i.isOptionSelected(w,C))return;i.selectOption(w);break;case"Enter":if(s.keyCode===229)break;if(g){if(!w||i.isComposing)return;i.selectOption(w);break}return;case"Escape":g?(i.setState({inputIsHiddenAfterUpdate:!1}),i.onInputChange("",{action:"menu-close",prevInputValue:f}),i.onMenuClose()):p&&d&&i.clearValue();break;case" ":if(f)return;if(!g){i.openMenu("first");break}if(!w)return;i.selectOption(w);break;case"ArrowUp":g?i.focusOption("up"):i.openMenu("last");break;case"ArrowDown":g?i.focusOption("down"):i.openMenu("first");break;case"PageUp":if(!g)return;i.focusOption("pageup");break;case"PageDown":if(!g)return;i.focusOption("pagedown");break;case"Home":if(!g)return;i.focusOption("first");break;case"End":if(!g)return;i.focusOption("last");break;default:return}s.preventDefault()}},i.instancePrefix="react-select-"+(i.props.instanceId||++J_e),i.state.selectValue=DO(r.value),r.menuIsOpen&&i.state.selectValue.length){var o=i.buildFocusableOptions(),a=o.indexOf(i.state.selectValue[0]);i.state.focusedOption=o[a]}return i}return ji(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&AO(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isDisabled,s=o.menuIsOpen,l=this.state.isFocused;(l&&!a&&i.isDisabled||l&&s&&!i.menuIsOpen)&&this.focusInput(),l&&a&&!i.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!l&&!a&&i.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(AO(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(i,o){this.props.onInputChange(i,o)}},{key:"focusInput",value:function(){!this.inputRef||this.inputRef.focus()}},{key:"blurInput",value:function(){!this.inputRef||this.inputRef.blur()}},{key:"openMenu",value:function(i){var o=this,a=this.state,s=a.selectValue,l=a.isFocused,c=this.buildFocusableOptions(),u=i==="first"?0:c.length-1;if(!this.props.isMulti){var d=c.indexOf(s[0]);d>-1&&(u=d)}this.scrollToFocusedOptionOnUpdate=!(l&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:c[u]},function(){return o.onMenuOpen()})}},{key:"focusValue",value:function(i){var o=this.state,a=o.selectValue,s=o.focusedValue;if(!!this.props.isMulti){this.setState({focusedOption:null});var l=a.indexOf(s);s||(l=-1);var c=a.length-1,u=-1;if(!!a.length){switch(i){case"previous":l===0?u=0:l===-1?u=c:u=l-1;break;case"next":l>-1&&l<c&&(u=l+1);break}this.setState({inputIsHidden:u!==-1,focusedValue:a[u]})}}}},{key:"focusOption",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",o=this.props.pageSize,a=this.state.focusedOption,s=this.getFocusableOptions();if(!!s.length){var l=0,c=s.indexOf(a);a||(c=-1),i==="up"?l=c>0?c-1:s.length-1:i==="down"?l=(c+1)%s.length:i==="pageup"?(l=c-o,l<0&&(l=0)):i==="pagedown"?(l=c+o,l>s.length-1&&(l=s.length-1)):i==="last"&&(l=s.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:s[l],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(sx):Oe(Oe({},sx),this.props.theme):sx}},{key:"getCommonProps",value:function(){var i=this.clearValue,o=this.cx,a=this.getStyles,s=this.getClassNames,l=this.getValue,c=this.selectOption,u=this.setValue,d=this.props,f=d.isMulti,p=d.isRtl,m=d.options,g=this.hasValue();return{clearValue:i,cx:o,getStyles:a,getClassNames:s,getValue:l,hasValue:g,isMulti:f,isRtl:p,options:m,selectOption:c,selectProps:d,setValue:u,theme:this.getTheme()}}},{key:"hasValue",value:function(){var i=this.state.selectValue;return i.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var i=this.props,o=i.isClearable,a=i.isMulti;return o===void 0?a:o}},{key:"isOptionDisabled",value:function(i,o){return ZV(this.props,i,o)}},{key:"isOptionSelected",value:function(i,o){return QV(this.props,i,o)}},{key:"filterOption",value:function(i,o){return JV(this.props,i,o)}},{key:"formatOptionLabel",value:function(i,o){if(typeof this.props.formatOptionLabel=="function"){var a=this.props.inputValue,s=this.state.selectValue;return this.props.formatOptionLabel(i,{context:o,inputValue:a,selectValue:s})}else return this.getOptionLabel(i)}},{key:"formatGroupLabel",value:function(i){return this.props.formatGroupLabel(i)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var i=this.props,o=i.isDisabled,a=i.isSearchable,s=i.inputId,l=i.inputValue,c=i.tabIndex,u=i.form,d=i.menuIsOpen,f=i.required,p=this.getComponents(),m=p.Input,g=this.state,y=g.inputIsHidden,v=g.ariaSelection,b=this.commonProps,x=s||this.getElementId("input"),w=Oe(Oe(Oe({"aria-autocomplete":"list","aria-expanded":d,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":f,role:"combobox"},d&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!a&&{"aria-readonly":!0}),this.hasValue()?(v==null?void 0:v.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return a?h.exports.createElement(m,J({},b,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:x,innerRef:this.getInputRef,isDisabled:o,isHidden:y,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:c,form:u,type:"text",value:l},w)):h.exports.createElement(O_e,J({id:x,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:dv,onFocus:this.onInputFocus,disabled:o,tabIndex:c,inputMode:"none",form:u,value:""},w))}},{key:"renderPlaceholderOrValue",value:function(){var i=this,o=this.getComponents(),a=o.MultiValue,s=o.MultiValueContainer,l=o.MultiValueLabel,c=o.MultiValueRemove,u=o.SingleValue,d=o.Placeholder,f=this.commonProps,p=this.props,m=p.controlShouldRenderValue,g=p.isDisabled,y=p.isMulti,v=p.inputValue,b=p.placeholder,x=this.state,w=x.selectValue,E=x.focusedValue,C=x.isFocused;if(!this.hasValue()||!m)return v?null:h.exports.createElement(d,J({},f,{key:"placeholder",isDisabled:g,isFocused:C,innerProps:{id:this.getElementId("placeholder")}}),b);if(y)return w.map(function(T,_){var P=T===E,M="".concat(i.getOptionLabel(T),"-").concat(i.getOptionValue(T));return h.exports.createElement(a,J({},f,{components:{Container:s,Label:l,Remove:c},isFocused:P,isDisabled:g,key:M,index:_,removeProps:{onClick:function(){return i.removeValue(T)},onTouchEnd:function(){return i.removeValue(T)},onMouseDown:function(V){V.preventDefault()}},data:T}),i.formatOptionLabel(T,"value"))});if(v)return null;var I=w[0];return h.exports.createElement(u,J({},f,{data:I,isDisabled:g}),this.formatOptionLabel(I,"value"))}},{key:"renderClearIndicator",value:function(){var i=this.getComponents(),o=i.ClearIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,c=s.isLoading,u=this.state.isFocused;if(!this.isClearable()||!o||l||!this.hasValue()||c)return null;var d={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return h.exports.createElement(o,J({},a,{innerProps:d,isFocused:u}))}},{key:"renderLoadingIndicator",value:function(){var i=this.getComponents(),o=i.LoadingIndicator,a=this.commonProps,s=this.props,l=s.isDisabled,c=s.isLoading,u=this.state.isFocused;if(!o||!c)return null;var d={"aria-hidden":"true"};return h.exports.createElement(o,J({},a,{innerProps:d,isDisabled:l,isFocused:u}))}},{key:"renderIndicatorSeparator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator,a=i.IndicatorSeparator;if(!o||!a)return null;var s=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused;return h.exports.createElement(a,J({},s,{isDisabled:l,isFocused:c}))}},{key:"renderDropdownIndicator",value:function(){var i=this.getComponents(),o=i.DropdownIndicator;if(!o)return null;var a=this.commonProps,s=this.props.isDisabled,l=this.state.isFocused,c={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return h.exports.createElement(o,J({},a,{innerProps:c,isDisabled:s,isFocused:l}))}},{key:"renderMenu",value:function(){var i=this,o=this.getComponents(),a=o.Group,s=o.GroupHeading,l=o.Menu,c=o.MenuList,u=o.MenuPortal,d=o.LoadingMessage,f=o.NoOptionsMessage,p=o.Option,m=this.commonProps,g=this.state.focusedOption,y=this.props,v=y.captureMenuScroll,b=y.inputValue,x=y.isLoading,w=y.loadingMessage,E=y.minMenuHeight,C=y.maxMenuHeight,I=y.menuIsOpen,T=y.menuPlacement,_=y.menuPosition,P=y.menuPortalTarget,M=y.menuShouldBlockScroll,D=y.menuShouldScrollIntoView,V=y.noOptionsMessage,B=y.onMenuScrollToTop,L=y.onMenuScrollToBottom;if(!I)return null;var G=function(X,te){var re=X.type,ne=X.data,ie=X.isDisabled,ae=X.isSelected,le=X.label,he=X.value,Se=g===ne,pe=ie?void 0:function(){return i.onOptionHover(ne)},st=ie?void 0:function(){return i.selectOption(ne)},Ot="".concat(i.getElementId("option"),"-").concat(te),In={id:Ot,onClick:st,onMouseMove:pe,onMouseOver:pe,tabIndex:-1};return h.exports.createElement(p,J({},m,{innerProps:In,data:ne,isDisabled:ie,isSelected:ae,key:Ot,label:le,type:re,value:he,isFocused:Se,innerRef:Se?i.getFocusedOptionRef:void 0}),i.formatOptionLabel(X.data,"menu"))},z;if(this.hasOptions())z=this.getCategorizedOptions().map(function(W){if(W.type==="group"){var X=W.data,te=W.options,re=W.index,ne="".concat(i.getElementId("group"),"-").concat(re),ie="".concat(ne,"-heading");return h.exports.createElement(a,J({},m,{key:ne,data:X,options:te,Heading:s,headingProps:{id:ie,data:W.data},label:i.formatGroupLabel(W.data)}),W.options.map(function(ae){return G(ae,"".concat(re,"-").concat(ae.index))}))}else if(W.type==="option")return G(W,"".concat(W.index))});else if(x){var j=w({inputValue:b});if(j===null)return null;z=h.exports.createElement(d,m,j)}else{var F=V({inputValue:b});if(F===null)return null;z=h.exports.createElement(f,m,F)}var H={minMenuHeight:E,maxMenuHeight:C,menuPlacement:T,menuPosition:_,menuShouldScrollIntoView:D},R=h.exports.createElement(wTe,J({},m,H),function(W){var X=W.ref,te=W.placerProps,re=te.placement,ne=te.maxHeight;return h.exports.createElement(l,J({},m,H,{innerRef:X,innerProps:{onMouseDown:i.onMenuMouseDown,onMouseMove:i.onMenuMouseMove,id:i.getElementId("listbox")},isLoading:x,placement:re}),h.exports.createElement(B_e,{captureEnabled:v,onTopArrive:B,onBottomArrive:L,lockEnabled:M},function(ie){return h.exports.createElement(c,J({},m,{innerRef:function(le){i.getMenuListRef(le),ie(le)},isLoading:x,maxHeight:ne,focusedOption:g}),z)}))});return P||_==="fixed"?h.exports.createElement(u,J({},m,{appendTo:P,controlElement:this.controlRef,menuPlacement:T,menuPosition:_}),R):R}},{key:"renderFormField",value:function(){var i=this,o=this.props,a=o.delimiter,s=o.isDisabled,l=o.isMulti,c=o.name,u=o.required,d=this.state.selectValue;if(!(!c||s)){if(u&&!this.hasValue())return h.exports.createElement(F_e,{name:c,onFocus:this.onValueInputFocus});if(l)if(a){var f=d.map(function(g){return i.getOptionValue(g)}).join(a);return h.exports.createElement("input",{name:c,type:"hidden",value:f})}else{var p=d.length>0?d.map(function(g,y){return h.exports.createElement("input",{key:"i-".concat(y),name:c,type:"hidden",value:i.getOptionValue(g)})}):h.exports.createElement("input",{name:c,type:"hidden",value:""});return h.exports.createElement("div",null,p)}else{var m=d[0]?this.getOptionValue(d[0]):"";return h.exports.createElement("input",{name:c,type:"hidden",value:m})}}}},{key:"renderLiveRegion",value:function(){var i=this.commonProps,o=this.state,a=o.ariaSelection,s=o.focusedOption,l=o.focusedValue,c=o.isFocused,u=o.selectValue,d=this.getFocusableOptions();return h.exports.createElement(k_e,J({},i,{id:this.getElementId("live-region"),ariaSelection:a,focusedOption:s,focusedValue:l,isFocused:c,selectValue:u,focusableOptions:d}))}},{key:"render",value:function(){var i=this.getComponents(),o=i.Control,a=i.IndicatorsContainer,s=i.SelectContainer,l=i.ValueContainer,c=this.props,u=c.className,d=c.id,f=c.isDisabled,p=c.menuIsOpen,m=this.state.isFocused,g=this.commonProps=this.getCommonProps();return h.exports.createElement(s,J({},g,{className:u,innerProps:{id:d,onKeyDown:this.onKeyDown},isDisabled:f,isFocused:m}),this.renderLiveRegion(),h.exports.createElement(o,J({},g,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:f,isFocused:m,menuIsOpen:p}),h.exports.createElement(l,J({},g,{isDisabled:f}),this.renderPlaceholderOrValue(),this.renderInput()),h.exports.createElement(a,J({},g,{isDisabled:f}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(i,o){var a=o.prevProps,s=o.clearFocusValueOnUpdate,l=o.inputIsHiddenAfterUpdate,c=o.ariaSelection,u=o.isFocused,d=o.prevWasFocused,f=i.options,p=i.value,m=i.menuIsOpen,g=i.inputValue,y=i.isMulti,v=DO(p),b={};if(a&&(p!==a.value||f!==a.options||m!==a.menuIsOpen||g!==a.inputValue)){var x=m?X_e(i,v):[],w=s?Z_e(o,v):null,E=Q_e(o,x);b={selectValue:v,focusedOption:E,focusedValue:w,clearFocusValueOnUpdate:!1}}var C=l!=null&&i!==a?{inputIsHidden:l,inputIsHiddenAfterUpdate:void 0}:{},I=c,T=u&&d;return u&&!T&&(I={value:Fm(y,v,v[0]||null),options:v,action:"initial-input-focus"},T=!d),(c==null?void 0:c.action)==="initial-input-focus"&&(I=null),Oe(Oe(Oe({},b),C),{},{prevProps:i,ariaSelection:I,prevWasFocused:T})}}]),n}(h.exports.Component);tW.defaultProps=Y_e;var ePe=h.exports.forwardRef(function(e,t){var n=qIe(e);return h.exports.createElement(tW,J({ref:t},n))}),tPe=ePe,nPe={cm:!0,mm:!0,in:!0,px:!0,pt:!0,pc:!0,em:!0,ex:!0,ch:!0,rem:!0,vw:!0,vh:!0,vmin:!0,vmax:!0,"%":!0};function wo(e){if(typeof e=="number")return{value:e,unit:"px"};var t,n=(e.match(/^[0-9.]*/)||"").toString();n.includes(".")?t=parseFloat(n):t=parseInt(n,10);var r=(e.match(/[^0-9]*$/)||"").toString();return nPe[r]?{value:t,unit:r}:(console.warn("React Spinners: ".concat(e," is not a valid css value. Defaulting to ").concat(t,"px.")),{value:t,unit:"px"})}function Ae(e){var t=wo(e);return"".concat(t.value).concat(t.unit)}var gt=function(e,t,n){var r="react-spinners-".concat(e,"-").concat(n);if(typeof window=="undefined"||!window.document)return r;var i=document.createElement("style");document.head.appendChild(i);var o=i.sheet,a=`
    @keyframes `.concat(r,` {
      `).concat(t,`
    }
  `);return o&&o.insertRule(a,0),r},hv;(function(e){e.maroon="#800000",e.red="#FF0000",e.orange="#FFA500",e.yellow="#FFFF00",e.olive="#808000",e.green="#008000",e.purple="#800080",e.fuchsia="#FF00FF",e.lime="#00FF00",e.teal="#008080",e.aqua="#00FFFF",e.blue="#0000FF",e.navy="#000080",e.black="#000000",e.gray="#808080",e.silver="#C0C0C0",e.white="#FFFFFF"})(hv||(hv={}));var rPe=function(e,t){if(Object.keys(hv).includes(e)&&(e=hv[e]),e[0]==="#"&&(e=e.slice(1)),e.length===3){var n="";e.split("").forEach(function(i){n+=i,n+=i}),e=n}var r=(e.match(/.{2}/g)||[]).map(function(i){return parseInt(i,16)}).join(", ");return"rgba(".concat(r,", ").concat(t,")")},mv=globalThis&&globalThis.__assign||function(){return mv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},mv.apply(this,arguments)},iPe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},oPe=gt("BarLoader","0% {left: -35%;right: 100%} 60% {left: 100%;right: -90%} 100% {left: 100%;right: -90%}","long"),aPe=gt("BarLoader","0% {left: -200%;right: 100%} 60% {left: 107%;right: -8%} 100% {left: 107%;right: -8%}","short");function sPe(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,a=o===void 0?1:o,s=e.cssOverride,l=s===void 0?{}:s,c=e.height,u=c===void 0?4:c,d=e.width,f=d===void 0?100:d,p=iPe(e,["loading","color","speedMultiplier","cssOverride","height","width"]),m=mv({display:"inherit",position:"relative",width:Ae(f),height:Ae(u),overflow:"hidden",backgroundColor:rPe(i,.2),backgroundClip:"padding-box"},l),g=function(y){return{position:"absolute",height:Ae(u),overflow:"hidden",backgroundColor:i,backgroundClip:"padding-box",display:"block",borderRadius:2,willChange:"left, right",animationFillMode:"forwards",animation:"".concat(y===1?oPe:aPe," ").concat(2.1/a,"s ").concat(y===2?"".concat(1.15/a,"s"):""," ").concat(y===1?"cubic-bezier(0.65, 0.815, 0.735, 0.395)":"cubic-bezier(0.165, 0.84, 0.44, 1)"," infinite")}};return n?h.exports.createElement("span",mv({style:m},p),h.exports.createElement("span",{style:g(1)}),h.exports.createElement("span",{style:g(2)})):null}var gv=globalThis&&globalThis.__assign||function(){return gv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},gv.apply(this,arguments)},lPe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},cPe=gt("BeatLoader","50% {transform: scale(0.75);opacity: 0.2} 100% {transform: scale(1);opacity: 1}","beat");function uPe(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,a=o===void 0?1:o,s=e.cssOverride,l=s===void 0?{}:s,c=e.size,u=c===void 0?15:c,d=e.margin,f=d===void 0?2:d,p=lPe(e,["loading","color","speedMultiplier","cssOverride","size","margin"]),m=gv({display:"inherit"},l),g=function(y){return{display:"inline-block",backgroundColor:i,width:Ae(u),height:Ae(u),margin:Ae(f),borderRadius:"100%",animation:"".concat(cPe," ").concat(.7/a,"s ").concat(y%2?"0s":"".concat(.35/a,"s")," infinite linear"),animationFillMode:"both"}};return n?h.exports.createElement("span",gv({style:m},p),h.exports.createElement("span",{style:g(1)}),h.exports.createElement("span",{style:g(2)}),h.exports.createElement("span",{style:g(3)})):null}var vv=globalThis&&globalThis.__assign||function(){return vv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},vv.apply(this,arguments)},dPe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},fPe=gt("BounceLoader","0% {transform: scale(0)} 50% {transform: scale(1.0)} 100% {transform: scale(0)}","bounce");function pPe(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,a=o===void 0?1:o,s=e.cssOverride,l=s===void 0?{}:s,c=e.size,u=c===void 0?60:c,d=dPe(e,["loading","color","speedMultiplier","cssOverride","size"]),f=function(m){var g=m===1?"".concat(1/a,"s"):"0s";return{position:"absolute",height:Ae(u),width:Ae(u),backgroundColor:i,borderRadius:"100%",opacity:.6,top:0,left:0,animationFillMode:"both",animation:"".concat(fPe," ").concat(2.1/a,"s ").concat(g," infinite ease-in-out")}},p=vv({display:"inherit",position:"relative",width:Ae(u),height:Ae(u)},l);return n?h.exports.createElement("span",vv({style:p},d),h.exports.createElement("span",{style:f(1)}),h.exports.createElement("span",{style:f(2)})):null}var yv=globalThis&&globalThis.__assign||function(){return yv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},yv.apply(this,arguments)},hPe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},mPe=gt("CircleLoader","0% {transform: rotate(0deg)} 50% {transform: rotate(180deg)} 100% {transform: rotate(360deg)}","circle");function gPe(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,a=o===void 0?1:o,s=e.cssOverride,l=s===void 0?{}:s,c=e.size,u=c===void 0?50:c,d=hPe(e,["loading","color","speedMultiplier","cssOverride","size"]),f=yv({display:"inherit",position:"relative",width:Ae(u),height:Ae(u)},l),p=function(m){var g=wo(u),y=g.value,v=g.unit;return{position:"absolute",height:"".concat(y*(1-m/10)).concat(v),width:"".concat(y*(1-m/10)).concat(v),borderTop:"1px solid ".concat(i),borderBottom:"none",borderLeft:"1px solid ".concat(i),borderRight:"none",borderRadius:"100%",transition:"2s",top:"".concat(m*.7*2.5,"%"),left:"".concat(m*.35*2.5,"%"),animationFillMode:"",animation:"".concat(mPe," ").concat(1/a,"s ").concat(m*.2/a,"s infinite linear")}};return n?h.exports.createElement("span",yv({style:f},d),h.exports.createElement("span",{style:p(0)}),h.exports.createElement("span",{style:p(1)}),h.exports.createElement("span",{style:p(2)}),h.exports.createElement("span",{style:p(3)}),h.exports.createElement("span",{style:p(4)})):null}var bv=globalThis&&globalThis.__assign||function(){return bv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},bv.apply(this,arguments)},vPe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},yPe=gt("ClipLoader","0% {transform: rotate(0deg) scale(1)} 50% {transform: rotate(180deg) scale(0.8)} 100% {transform: rotate(360deg) scale(1)}","clip");function bPe(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,a=o===void 0?1:o,s=e.cssOverride,l=s===void 0?{}:s,c=e.size,u=c===void 0?35:c,d=vPe(e,["loading","color","speedMultiplier","cssOverride","size"]),f=bv({background:"transparent !important",width:Ae(u),height:Ae(u),borderRadius:"100%",border:"2px solid",borderTopColor:i,borderBottomColor:"transparent",borderLeftColor:i,borderRightColor:i,display:"inline-block",animation:"".concat(yPe," ").concat(.75/a,"s 0s infinite linear"),animationFillMode:"both"},l);return n?h.exports.createElement("span",bv({style:f},d)):null}var xv=globalThis&&globalThis.__assign||function(){return xv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},xv.apply(this,arguments)},xPe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},YO=gt("ClockLoader","100% { transform: rotate(360deg) }","rotate");function SPe(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,a=o===void 0?1:o,s=e.cssOverride,l=s===void 0?{}:s,c=e.size,u=c===void 0?50:c,d=xPe(e,["loading","color","speedMultiplier","cssOverride","size"]),f=wo(u),p=f.value,m=f.unit,g=xv({display:"inherit",position:"relative",width:"".concat(p).concat(m),height:"".concat(p).concat(m),backgroundColor:"transparent",boxShadow:"inset 0px 0px 0px 2px ".concat(i),borderRadius:"50%"},l),y={position:"absolute",backgroundColor:i,width:"".concat(p/3,"px"),height:"2px",top:"".concat(p/2-1,"px"),left:"".concat(p/2-1,"px"),transformOrigin:"1px 1px",animation:"".concat(YO," ").concat(8/a,"s linear infinite")},v={position:"absolute",backgroundColor:i,width:"".concat(p/2.4,"px"),height:"2px",top:"".concat(p/2-1,"px"),left:"".concat(p/2-1,"px"),transformOrigin:"1px 1px",animation:"".concat(YO," ").concat(2/a,"s linear infinite")};return n?h.exports.createElement("span",xv({style:g},d),h.exports.createElement("span",{style:v}),h.exports.createElement("span",{style:y})):null}var Sv=globalThis&&globalThis.__assign||function(){return Sv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Sv.apply(this,arguments)},wPe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},CPe=gt("DotLoader","100% {transform: rotate(360deg)}","rotate"),kPe=gt("DotLoader","0%, 100% {transform: scale(0)} 50% {transform: scale(1.0)}","bounce");function EPe(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,a=o===void 0?1:o,s=e.cssOverride,l=s===void 0?{}:s,c=e.size,u=c===void 0?60:c,d=wPe(e,["loading","color","speedMultiplier","cssOverride","size"]),f=Sv({display:"inherit",position:"relative",width:Ae(u),height:Ae(u),animationFillMode:"forwards",animation:"".concat(CPe," ").concat(2/a,"s 0s infinite linear")},l),p=function(m){var g=wo(u),y=g.value,v=g.unit;return{position:"absolute",top:m%2?"0":"auto",bottom:m%2?"auto":"0",height:"".concat(y/2).concat(v),width:"".concat(y/2).concat(v),backgroundColor:i,borderRadius:"100%",animationFillMode:"forwards",animation:"".concat(kPe," ").concat(2/a,"s ").concat(m===2?"1s":"0s"," infinite linear")}};return n?h.exports.createElement("span",Sv({style:f},d),h.exports.createElement("span",{style:p(1)}),h.exports.createElement("span",{style:p(2)})):null}var gn=globalThis&&globalThis.__assign||function(){return gn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},gn.apply(this,arguments)},IPe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},TPe=gt("FadeLoader","50% {opacity: 0.3} 100% {opacity: 1}","fade");function _Pe(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,a=o===void 0?1:o,s=e.cssOverride,l=s===void 0?{}:s,c=e.height,u=c===void 0?15:c,d=e.width,f=d===void 0?5:d,p=e.radius,m=p===void 0?2:p,g=e.margin,y=g===void 0?2:g,v=IPe(e,["loading","color","speedMultiplier","cssOverride","height","width","radius","margin"]),b=wo(y).value,x=b+18,w=x/2+x/5.5,E=gn({display:"inherit",position:"relative",fontSize:"0",top:x,left:x,width:"".concat(x*3,"px"),height:"".concat(x*3,"px")},l),C=function(L){return{position:"absolute",width:Ae(f),height:Ae(u),margin:Ae(y),backgroundColor:i,borderRadius:Ae(m),transition:"2s",animationFillMode:"both",animation:"".concat(TPe," ").concat(1.2/a,"s ").concat(L*.12,"s infinite ease-in-out")}},I=gn(gn({},C(1)),{top:"".concat(x,"px"),left:"0"}),T=gn(gn({},C(2)),{top:"".concat(w,"px"),left:"".concat(w,"px"),transform:"rotate(-45deg)"}),_=gn(gn({},C(3)),{top:"0",left:"".concat(x,"px"),transform:"rotate(90deg)"}),P=gn(gn({},C(4)),{top:"".concat(-1*w,"px"),left:"".concat(w,"px"),transform:"rotate(45deg)"}),M=gn(gn({},C(5)),{top:"".concat(-1*x,"px"),left:"0"}),D=gn(gn({},C(6)),{top:"".concat(-1*w,"px"),left:"".concat(-1*w,"px"),transform:"rotate(-45deg)"}),V=gn(gn({},C(7)),{top:"0",left:"".concat(-1*x,"px"),transform:"rotate(90deg)"}),B=gn(gn({},C(8)),{top:"".concat(w,"px"),left:"".concat(-1*w,"px"),transform:"rotate(45deg)"});return n?h.exports.createElement("span",gn({style:E},v),h.exports.createElement("span",{style:I}),h.exports.createElement("span",{style:T}),h.exports.createElement("span",{style:_}),h.exports.createElement("span",{style:P}),h.exports.createElement("span",{style:M}),h.exports.createElement("span",{style:D}),h.exports.createElement("span",{style:V}),h.exports.createElement("span",{style:B})):null}var wv=globalThis&&globalThis.__assign||function(){return wv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},wv.apply(this,arguments)},PPe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},OPe=gt("GridLoader","0% {transform: scale(1)} 50% {transform: scale(0.5); opacity: 0.7} 100% {transform: scale(1); opacity: 1}","grid"),ma=function(e){return Math.random()*e};function MPe(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,a=o===void 0?1:o,s=e.cssOverride,l=s===void 0?{}:s,c=e.size,u=c===void 0?15:c,d=e.margin,f=d===void 0?2:d,p=PPe(e,["loading","color","speedMultiplier","cssOverride","size","margin"]),m=wo(u),g=wo(f),y=parseFloat(m.value.toString())*3+parseFloat(g.value.toString())*6,v=wv({width:"".concat(y).concat(m.unit),fontSize:0,display:"inline-block"},l),b=function(x){return{display:"inline-block",backgroundColor:i,width:"".concat(Ae(u)),height:"".concat(Ae(u)),margin:Ae(f),borderRadius:"100%",animationFillMode:"both",animation:"".concat(OPe," ").concat((x/100+.6)/a,"s ").concat(x/100-.2,"s infinite ease")}};return n?h.exports.createElement("span",wv({style:v},p,{ref:function(x){x&&x.style.setProperty("width","".concat(y).concat(m.unit),"important")}}),h.exports.createElement("span",{style:b(ma(100))}),h.exports.createElement("span",{style:b(ma(100))}),h.exports.createElement("span",{style:b(ma(100))}),h.exports.createElement("span",{style:b(ma(100))}),h.exports.createElement("span",{style:b(ma(100))}),h.exports.createElement("span",{style:b(ma(100))}),h.exports.createElement("span",{style:b(ma(100))}),h.exports.createElement("span",{style:b(ma(100))}),h.exports.createElement("span",{style:b(ma(100))})):null}var ds=globalThis&&globalThis.__assign||function(){return ds=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},ds.apply(this,arguments)},RPe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},XO=gt("MoonLoader","100% {transform: rotate(360deg)}","moon");function DPe(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,a=o===void 0?1:o,s=e.cssOverride,l=s===void 0?{}:s,c=e.size,u=c===void 0?60:c,d=RPe(e,["loading","color","speedMultiplier","cssOverride","size"]),f=wo(u),p=f.value,m=f.unit,g=p/7,y=ds({display:"inherit",position:"relative",width:"".concat("".concat(p+g*2).concat(m)),height:"".concat("".concat(p+g*2).concat(m)),animation:"".concat(XO," ").concat(.6/a,"s 0s infinite linear"),animationFillMode:"forwards"},l),v=function(w){return{width:Ae(w),height:Ae(w),borderRadius:"100%"}},b=ds(ds({},v(g)),{backgroundColor:"".concat(i),opacity:"0.8",position:"absolute",top:"".concat("".concat(p/2-g/2).concat(m)),animation:"".concat(XO," ").concat(.6/a,"s 0s infinite linear"),animationFillMode:"forwards"}),x=ds(ds({},v(p)),{border:"".concat(g,"px solid ").concat(i),opacity:"0.1",boxSizing:"content-box",position:"absolute"});return n?h.exports.createElement("span",ds({style:y},d),h.exports.createElement("span",{style:b}),h.exports.createElement("span",{style:x})):null}var Cv=globalThis&&globalThis.__assign||function(){return Cv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Cv.apply(this,arguments)},APe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},nr=[1,3,5],LPe=[gt("PropagateLoader","25% {transform: translateX(-".concat(nr[0],`rem) scale(0.75)}
    50% {transform: translateX(-`).concat(nr[1],`rem) scale(0.6)}
    75% {transform: translateX(-`).concat(nr[2],`rem) scale(0.5)}
    95% {transform: translateX(0rem) scale(1)}`),"propogate-0"),gt("PropagateLoader","25% {transform: translateX(-".concat(nr[0],`rem) scale(0.75)}
    50% {transform: translateX(-`).concat(nr[1],`rem) scale(0.6)}
    75% {transform: translateX(-`).concat(nr[1],`rem) scale(0.6)}
    95% {transform: translateX(0rem) scale(1)}`),"propogate-1"),gt("PropagateLoader","25% {transform: translateX(-".concat(nr[0],`rem) scale(0.75)}
    75% {transform: translateX(-`).concat(nr[0],`rem) scale(0.75)}
    95% {transform: translateX(0rem) scale(1)}`),"propogate-2"),gt("PropagateLoader","25% {transform: translateX(".concat(nr[0],`rem) scale(0.75)}
    75% {transform: translateX(`).concat(nr[0],`rem) scale(0.75)}
    95% {transform: translateX(0rem) scale(1)}`),"propogate-3"),gt("PropagateLoader","25% {transform: translateX(".concat(nr[0],`rem) scale(0.75)}
    50% {transform: translateX(`).concat(nr[1],`rem) scale(0.6)}
    75% {transform: translateX(`).concat(nr[1],`rem) scale(0.6)}
    95% {transform: translateX(0rem) scale(1)}`),"propogate-4"),gt("PropagateLoader","25% {transform: translateX(".concat(nr[0],`rem) scale(0.75)}
    50% {transform: translateX(`).concat(nr[1],`rem) scale(0.6)}
    75% {transform: translateX(`).concat(nr[2],`rem) scale(0.5)}
    95% {transform: translateX(0rem) scale(1)}`),"propogate-5")];function BPe(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,a=o===void 0?1:o,s=e.cssOverride,l=s===void 0?{}:s,c=e.size,u=c===void 0?15:c,d=APe(e,["loading","color","speedMultiplier","cssOverride","size"]),f=wo(u),p=f.value,m=f.unit,g=Cv({display:"inherit",position:"relative"},l),y=function(v){return{position:"absolute",fontSize:"".concat(p/3).concat(m),width:"".concat(p).concat(m),height:"".concat(p).concat(m),background:i,borderRadius:"50%",animation:"".concat(LPe[v]," ").concat(1.5/a,"s infinite"),animationFillMode:"forwards"}};return n?h.exports.createElement("span",Cv({style:g},d),h.exports.createElement("span",{style:y(0)}),h.exports.createElement("span",{style:y(1)}),h.exports.createElement("span",{style:y(2)}),h.exports.createElement("span",{style:y(3)}),h.exports.createElement("span",{style:y(4)}),h.exports.createElement("span",{style:y(5)})):null}var kv=globalThis&&globalThis.__assign||function(){return kv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},kv.apply(this,arguments)},$Pe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},FPe=gt("PulseLoader","0% {transform: scale(1); opacity: 1} 45% {transform: scale(0.1); opacity: 0.7} 80% {transform: scale(1); opacity: 1}","pulse");function NPe(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,a=o===void 0?1:o,s=e.cssOverride,l=s===void 0?{}:s,c=e.size,u=c===void 0?15:c,d=e.margin,f=d===void 0?2:d,p=$Pe(e,["loading","color","speedMultiplier","cssOverride","size","margin"]),m=kv({display:"inherit"},l),g=function(y){return{backgroundColor:i,width:Ae(u),height:Ae(u),margin:Ae(f),borderRadius:"100%",display:"inline-block",animation:"".concat(FPe," ").concat(.75/a,"s ").concat(y*.12/a,"s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08)"),animationFillMode:"both"}};return n?h.exports.createElement("span",kv({style:m},p),h.exports.createElement("span",{style:g(1)}),h.exports.createElement("span",{style:g(2)}),h.exports.createElement("span",{style:g(3)})):null}var Ev=globalThis&&globalThis.__assign||function(){return Ev=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Ev.apply(this,arguments)},zPe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},ZO=[gt("PuffLoader","0% {transform: scale(0)} 100% {transform: scale(1.0)}","puff-1"),gt("PuffLoader","0% {opacity: 1} 100% {opacity: 0}","puff-2")];function jPe(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,a=o===void 0?1:o,s=e.cssOverride,l=s===void 0?{}:s,c=e.size,u=c===void 0?60:c,d=zPe(e,["loading","color","speedMultiplier","cssOverride","size"]),f=Ev({display:"inherit",position:"relative",width:Ae(u),height:Ae(u)},l),p=function(m){return{position:"absolute",height:Ae(u),width:Ae(u),border:"thick solid ".concat(i),borderRadius:"50%",opacity:"1",top:"0",left:"0",animationFillMode:"both",animation:"".concat(ZO[0],", ").concat(ZO[1]),animationDuration:"".concat(2/a,"s"),animationIterationCount:"infinite",animationTimingFunction:"cubic-bezier(0.165, 0.84, 0.44, 1), cubic-bezier(0.3, 0.61, 0.355, 1)",animationDelay:m===1?"-1s":"0s"}};return n?h.exports.createElement("span",Ev({style:f},d),h.exports.createElement("span",{style:p(1)}),h.exports.createElement("span",{style:p(2)})):null}var Iv=globalThis&&globalThis.__assign||function(){return Iv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Iv.apply(this,arguments)},HPe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},VPe=gt("RingLoader","0% {transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg)} 100% {transform: rotateX(180deg) rotateY(360deg) rotateZ(360deg)}","right"),WPe=gt("RingLoader","0% {transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg)} 100% {transform: rotateX(360deg) rotateY(180deg) rotateZ(360deg)}","left");function lx(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,a=o===void 0?1:o,s=e.cssOverride,l=s===void 0?{}:s,c=e.size,u=c===void 0?60:c,d=HPe(e,["loading","color","speedMultiplier","cssOverride","size"]),f=wo(u),p=f.value,m=f.unit,g=Iv({display:"inherit",width:Ae(u),height:Ae(u),position:"relative"},l),y=function(v){return{position:"absolute",top:"0",left:"0",width:"".concat(p).concat(m),height:"".concat(p).concat(m),border:"".concat(p/10).concat(m," solid ").concat(i),opacity:"0.4",borderRadius:"100%",animationFillMode:"forwards",perspective:"800px",animation:"".concat(v===1?VPe:WPe," ").concat(2/a,"s 0s infinite linear")}};return n?h.exports.createElement("span",Iv({style:g},d),h.exports.createElement("span",{style:y(1)}),h.exports.createElement("span",{style:y(2)})):null}var Mo=globalThis&&globalThis.__assign||function(){return Mo=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Mo.apply(this,arguments)},UPe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},GPe=gt("RotateLoader","0% {transform: rotate(0deg)} 50% {transform: rotate(180deg)} 100% {transform: rotate(360deg)}","rotate");function KPe(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,a=o===void 0?1:o,s=e.cssOverride,l=s===void 0?{}:s,c=e.size,u=c===void 0?15:c,d=e.margin,f=d===void 0?2:d,p=UPe(e,["loading","color","speedMultiplier","cssOverride","size","margin"]),m=wo(f),g=m.value,y=m.unit,v={backgroundColor:i,width:Ae(u),height:Ae(u),borderRadius:"100%"},b=Mo(Mo(Mo({},v),{display:"inline-block",position:"relative",animationFillMode:"both",animation:"".concat(GPe," ").concat(1/a,"s 0s infinite cubic-bezier(0.7, -0.13, 0.22, 0.86)")}),l),x=function(w){var E=(w%2?-1:1)*(26+g);return{opacity:"0.8",position:"absolute",top:"0",left:"".concat(E).concat(y)}};return n?h.exports.createElement("span",Mo({style:b},p),h.exports.createElement("span",{style:Mo(Mo({},v),x(1))}),h.exports.createElement("span",{style:Mo(Mo({},v),x(2))})):null}var Tv=globalThis&&globalThis.__assign||function(){return Tv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Tv.apply(this,arguments)},qPe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},YPe=gt("ScaleLoader","0% {transform: scaley(1.0)} 50% {transform: scaley(0.4)} 100% {transform: scaley(1.0)}","scale");function XPe(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,a=o===void 0?1:o,s=e.cssOverride,l=s===void 0?{}:s,c=e.height,u=c===void 0?35:c,d=e.width,f=d===void 0?4:d,p=e.radius,m=p===void 0?2:p,g=e.margin,y=g===void 0?2:g,v=qPe(e,["loading","color","speedMultiplier","cssOverride","height","width","radius","margin"]),b=Tv({display:"inherit"},l),x=function(w){return{backgroundColor:i,width:Ae(f),height:Ae(u),margin:Ae(y),borderRadius:Ae(m),display:"inline-block",animation:"".concat(YPe," ").concat(1/a,"s ").concat(w*.1,"s infinite cubic-bezier(0.2, 0.68, 0.18, 1.08)"),animationFillMode:"both"}};return n?h.exports.createElement("span",Tv({style:b},v),h.exports.createElement("span",{style:x(1)}),h.exports.createElement("span",{style:x(2)}),h.exports.createElement("span",{style:x(3)}),h.exports.createElement("span",{style:x(4)}),h.exports.createElement("span",{style:x(5)})):null}var _v=globalThis&&globalThis.__assign||function(){return _v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},_v.apply(this,arguments)},ZPe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},QPe=gt("SquareLoader",`25% {transform: rotateX(180deg) rotateY(0)}
  50% {transform: rotateX(180deg) rotateY(180deg)} 
  75% {transform: rotateX(0) rotateY(180deg)} 
  100% {transform: rotateX(0) rotateY(0)}`,"square");function JPe(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,a=o===void 0?1:o,s=e.cssOverride,l=s===void 0?{}:s,c=e.size,u=c===void 0?50:c,d=ZPe(e,["loading","color","speedMultiplier","cssOverride","size"]),f=_v({backgroundColor:i,width:Ae(u),height:Ae(u),display:"inline-block",animation:"".concat(QPe," ").concat(3/a,"s 0s infinite cubic-bezier(0.09, 0.57, 0.49, 0.9)"),animationFillMode:"both"},l);return n?h.exports.createElement("span",_v({style:f},d)):null}var Pv=globalThis&&globalThis.__assign||function(){return Pv=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Pv.apply(this,arguments)},eOe=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},tOe=gt("SyncLoader",`33% {transform: translateY(10px)}
  66% {transform: translateY(-10px)}
  100% {transform: translateY(0)}`,"sync");function nOe(e){var t=e.loading,n=t===void 0?!0:t,r=e.color,i=r===void 0?"#000000":r,o=e.speedMultiplier,a=o===void 0?1:o,s=e.cssOverride,l=s===void 0?{}:s,c=e.size,u=c===void 0?15:c,d=e.margin,f=d===void 0?2:d,p=eOe(e,["loading","color","speedMultiplier","cssOverride","size","margin"]),m=Pv({display:"inherit"},l),g=function(y){return{backgroundColor:i,width:Ae(u),height:Ae(u),margin:Ae(f),borderRadius:"100%",display:"inline-block",animation:"".concat(tOe," ").concat(.6/a,"s ").concat(y*.07,"s infinite ease-in-out"),animationFillMode:"both"}};return n?h.exports.createElement("span",Pv({style:m},p),h.exports.createElement("span",{style:g(1)}),h.exports.createElement("span",{style:g(2)}),h.exports.createElement("span",{style:g(3)})):null}const rOe=h.exports.createContext({dragDropManager:void 0});function Js(e,t,...n){if(iOe()&&t===void 0)throw new Error("invariant requires an error message argument");if(!e){let r;if(t===void 0)r=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;r=new Error(t.replace(/%s/g,function(){return n[i++]})),r.name="Invariant Violation"}throw r.framesToPop=1,r}}function iOe(){return typeof process!="undefined"&&process.env.NODE_ENV==="production"}var oOe=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,i,o;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(i=r;i--!==0;)if(!e(t[i],n[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(o=Object.keys(t),r=o.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!Object.prototype.hasOwnProperty.call(n,o[i]))return!1;for(i=r;i--!==0;){var a=o[i];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n};const vc=typeof window!="undefined"?h.exports.useLayoutEffect:h.exports.useEffect;function aOe(e,t,n){const[r,i]=h.exports.useState(()=>t(e)),o=h.exports.useCallback(()=>{const a=t(e);oOe(r,a)||(i(a),n&&n())},[r,e,n]);return vc(o),[r,o]}function sOe(e,t,n){const[r,i]=aOe(e,t,n);return vc(function(){const a=e.getHandlerId();if(a!=null)return e.subscribeToStateChange(i,{handlerIds:[a]})},[e,i]),r}function nW(e,t,n){return sOe(t,e||(()=>({})),()=>n.reconnect())}function rW(e,t){const n=[...t||[]];return t==null&&typeof e!="function"&&n.push(e),h.exports.useMemo(()=>typeof e=="function"?e():e,n)}function lOe(e){return h.exports.useMemo(()=>e.hooks.dragSource(),[e])}function cOe(e){return h.exports.useMemo(()=>e.hooks.dragPreview(),[e])}let cx=!1,ux=!1;class uOe{receiveHandlerId(t){this.sourceId=t}getHandlerId(){return this.sourceId}canDrag(){Js(!cx,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return cx=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{cx=!1}}isDragging(){if(!this.sourceId)return!1;Js(!ux,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return ux=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{ux=!1}}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}isDraggingSource(t){return this.internalMonitor.isDraggingSource(t)}isOverTarget(t,n){return this.internalMonitor.isOverTarget(t,n)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(t){return this.internalMonitor.subscribeToOffsetChange(t)}canDragSource(t){return this.internalMonitor.canDragSource(t)}canDropOnTarget(t){return this.internalMonitor.canDropOnTarget(t)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.sourceId=null,this.internalMonitor=t.getMonitor()}}let dx=!1;class dOe{receiveHandlerId(t){this.targetId=t}getHandlerId(){return this.targetId}subscribeToStateChange(t,n){return this.internalMonitor.subscribeToStateChange(t,n)}canDrop(){if(!this.targetId)return!1;Js(!dx,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return dx=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{dx=!1}}isOver(t){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,t):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(t){this.targetId=null,this.internalMonitor=t.getMonitor()}}function fOe(e,t,n){const r=n.getRegistry(),i=r.addTarget(e,t);return[i,()=>r.removeTarget(i)]}function pOe(e,t,n){const r=n.getRegistry(),i=r.addSource(e,t);return[i,()=>r.removeSource(i)]}function j4(e,t,n,r){let i=n?n.call(r,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;const o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;const s=Object.prototype.hasOwnProperty.bind(t);for(let l=0;l<o.length;l++){const c=o[l];if(!s(c))return!1;const u=e[c],d=t[c];if(i=n?n.call(r,u,d,c):void 0,i===!1||i===void 0&&u!==d)return!1}return!0}function H4(e){return e!==null&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function hOe(e){if(typeof e.type=="string")return;const t=e.type.displayName||e.type.name||"the component";throw new Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function mOe(e){return(t=null,n=null)=>{if(!h.exports.isValidElement(t)){const o=t;return e(o,n),o}const r=t;return hOe(r),gOe(r,n?o=>e(o,n):e)}}function iW(e){const t={};return Object.keys(e).forEach(n=>{const r=e[n];if(n.endsWith("Ref"))t[n]=e[n];else{const i=mOe(r);t[n]=()=>i}}),t}function QO(e,t){typeof e=="function"?e(t):e.current=t}function gOe(e,t){const n=e.ref;return Js(typeof n!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),n?h.exports.cloneElement(e,{ref:r=>{QO(n,r),QO(t,r)}}):h.exports.cloneElement(e,{ref:t})}class vOe{receiveHandlerId(t){this.handlerId!==t&&(this.handlerId=t,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(t){this.dragSourceOptionsInternal=t}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(t){this.dragPreviewOptionsInternal=t}reconnect(){const t=this.reconnectDragSource();this.reconnectDragPreview(t)}reconnectDragSource(){const t=this.dragSource,n=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return n&&this.disconnectDragSource(),this.handlerId?t?(n&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=t,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,t,this.dragSourceOptions)),n):(this.lastConnectedDragSource=t,n):n}reconnectDragPreview(t=!1){const n=this.dragPreview,r=t||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),!!this.handlerId){if(!n){this.lastConnectedDragPreview=n;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=n,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,n,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!j4(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!j4(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe(),this.dragSourceUnsubscribe=void 0)}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(t){this.hooks=iW({dragSource:(n,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,H4(n)?this.dragSourceRef=n:this.dragSourceNode=n,this.reconnectDragSource()},dragPreview:(n,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,H4(n)?this.dragPreviewRef=n:this.dragPreviewNode=n,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=t}}class yOe{get connectTarget(){return this.dropTarget}reconnect(){const t=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();t&&this.disconnectDropTarget();const n=this.dropTarget;if(!!this.handlerId){if(!n){this.lastConnectedDropTarget=n;return}t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=n,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,n,this.dropTargetOptions))}}receiveHandlerId(t){t!==this.handlerId&&(this.handlerId=t,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(t){this.dropTargetOptionsInternal=t}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!j4(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget(),this.unsubscribeDropTarget=void 0)}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(t){this.hooks=iW({dropTarget:(n,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,H4(n)?this.dropTargetRef=n:this.dropTargetNode=n,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=t}}function tf(){const{dragDropManager:e}=h.exports.useContext(rOe);return Js(e!=null,"Expected drag drop context"),e}function bOe(e,t){const n=tf(),r=h.exports.useMemo(()=>new vOe(n.getBackend()),[n]);return vc(()=>(r.dragSourceOptions=e||null,r.reconnect(),()=>r.disconnectDragSource()),[r,e]),vc(()=>(r.dragPreviewOptions=t||null,r.reconnect(),()=>r.disconnectDragPreview()),[r,t]),r}function xOe(){const e=tf();return h.exports.useMemo(()=>new uOe(e),[e])}class SOe{beginDrag(){const t=this.spec,n=this.monitor;let r=null;return typeof t.item=="object"?r=t.item:typeof t.item=="function"?r=t.item(n):r={},r!=null?r:null}canDrag(){const t=this.spec,n=this.monitor;return typeof t.canDrag=="boolean"?t.canDrag:typeof t.canDrag=="function"?t.canDrag(n):!0}isDragging(t,n){const r=this.spec,i=this.monitor,{isDragging:o}=r;return o?o(i):n===t.getSourceId()}endDrag(){const t=this.spec,n=this.monitor,r=this.connector,{end:i}=t;i&&i(n.getItem(),n),r.reconnect()}constructor(t,n,r){this.spec=t,this.monitor=n,this.connector=r}}function wOe(e,t,n){const r=h.exports.useMemo(()=>new SOe(e,t,n),[t,n]);return h.exports.useEffect(()=>{r.spec=e},[e]),r}function COe(e){return h.exports.useMemo(()=>{const t=e.type;return Js(t!=null,"spec.type must be defined"),t},[e])}function kOe(e,t,n){const r=tf(),i=wOe(e,t,n),o=COe(e);vc(function(){if(o!=null){const[s,l]=pOe(o,i,r);return t.receiveHandlerId(s),n.receiveHandlerId(s),l}},[r,t,n,i,o])}function EOe(e,t){const n=rW(e,t);Js(!n.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");const r=xOe(),i=bOe(n.options,n.previewOptions);return kOe(n,r,i),[nW(n.collect,r,i),lOe(i),cOe(i)]}function IOe(e){return h.exports.useMemo(()=>e.hooks.dropTarget(),[e])}function TOe(e){const t=tf(),n=h.exports.useMemo(()=>new yOe(t.getBackend()),[t]);return vc(()=>(n.dropTargetOptions=e||null,n.reconnect(),()=>n.disconnectDropTarget()),[e]),n}function _Oe(){const e=tf();return h.exports.useMemo(()=>new dOe(e),[e])}function POe(e){const{accept:t}=e;return h.exports.useMemo(()=>(Js(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}class OOe{canDrop(){const t=this.spec,n=this.monitor;return t.canDrop?t.canDrop(n.getItem(),n):!0}hover(){const t=this.spec,n=this.monitor;t.hover&&t.hover(n.getItem(),n)}drop(){const t=this.spec,n=this.monitor;if(t.drop)return t.drop(n.getItem(),n)}constructor(t,n){this.spec=t,this.monitor=n}}function MOe(e,t){const n=h.exports.useMemo(()=>new OOe(e,t),[t]);return h.exports.useEffect(()=>{n.spec=e},[e]),n}function ROe(e,t,n){const r=tf(),i=MOe(e,t),o=POe(e);vc(function(){const[s,l]=fOe(o,i,r);return t.receiveHandlerId(s),n.receiveHandlerId(s),l},[r,t,i,n,o.map(a=>a.toString()).join("|")])}function DOe(e,t){const n=rW(e,t),r=_Oe(),i=TOe(n.options);return ROe(n,r,i),[nW(n.collect,r,i),IOe(i)]}var AOe={exports:{}};/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var o=arguments[i];if(!!o){var a=typeof o;if(a==="string"||a==="number")r.push(o);else if(Array.isArray(o)){if(o.length){var s=n.apply(null,o);s&&r.push(s)}}else if(a==="object"){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){r.push(o.toString());continue}for(var l in o)t.call(o,l)&&o[l]&&r.push(l)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(AOe);var LOe={},oW={},N2={exports:{}},Zf={exports:{}};(function(){var e,t,n,r,i,o;typeof performance!="undefined"&&performance!==null&&performance.now?Zf.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(Zf.exports=function(){return(e()-i)/1e6},t=process.hrtime,e=function(){var a;return a=t(),a[0]*1e9+a[1]},r=e(),o=process.uptime()*1e9,i=r-o):Date.now?(Zf.exports=function(){return Date.now()-n},n=Date.now()):(Zf.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(Fl);var BOe=Zf.exports,Oa=typeof window=="undefined"?Fl:window,Nm=["moz","webkit"],rd="AnimationFrame",Td=Oa["request"+rd],Ph=Oa["cancel"+rd]||Oa["cancelRequest"+rd];for(var Bf=0;!Td&&Bf<Nm.length;Bf++)Td=Oa[Nm[Bf]+"Request"+rd],Ph=Oa[Nm[Bf]+"Cancel"+rd]||Oa[Nm[Bf]+"CancelRequest"+rd];if(!Td||!Ph){var fx=0,JO=0,wl=[],$Oe=1e3/60;Td=function(e){if(wl.length===0){var t=BOe(),n=Math.max(0,$Oe-(t-fx));fx=n+t,setTimeout(function(){var r=wl.slice(0);wl.length=0;for(var i=0;i<r.length;i++)if(!r[i].cancelled)try{r[i].callback(fx)}catch(o){setTimeout(function(){throw o},0)}},Math.round(n))}return wl.push({handle:++JO,callback:e,cancelled:!1}),JO},Ph=function(e){for(var t=0;t<wl.length;t++)wl[t].handle===e&&(wl[t].cancelled=!0)}}N2.exports=function(e){return Td.call(Oa,e)};N2.exports.cancel=function(){Ph.apply(Oa,arguments)};N2.exports.polyfill=function(e){e||(e=Oa),e.requestAnimationFrame=Td,e.cancelAnimationFrame=Ph};var f1={exports:{}},px=null,eM=["Webkit","Moz","O","ms"],FOe=function(t){px||(px=document.createElement("div"));var n=px.style;if(t in n)return t;for(var r=t.charAt(0).toUpperCase()+t.slice(1),i=eM.length;i>=0;i--){var o=eM[i]+r;if(o in n)return o}return!1},NOe=VOe,zOe=/\s/,jOe=/(_|-|\.|:)/,HOe=/([a-z][A-Z]|[A-Z][a-z])/;function VOe(e){return zOe.test(e)?e.toLowerCase():jOe.test(e)?(UOe(e)||e).toLowerCase():HOe.test(e)?KOe(e).toLowerCase():e.toLowerCase()}var WOe=/[\W_]+(.|$)/g;function UOe(e){return e.replace(WOe,function(t,n){return n?" "+n:""})}var GOe=/(.)([A-Z]+)/g;function KOe(e){return e.replace(GOe,function(t,n,r){return n+" "+r.toLowerCase().split("").join(" ")})}var qOe=NOe,YOe=XOe;function XOe(e){return qOe(e).replace(/[\W_]+(.|$)/g,function(t,n){return n?" "+n:""}).trim()}var ZOe=YOe,QOe=JOe;function JOe(e){return ZOe(e).replace(/\s(\w)/g,function(t,n){return n.toUpperCase()})}var eMe={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridColumn:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},tMe=function(e,t){return typeof t=="number"&&!eMe[e]?t+"px":t},nMe=FOe,rMe=QOe,$g={float:"cssFloat"},iMe=tMe;function Ov(e,t,n){var r=$g[t];if(typeof r=="undefined"&&(r=aMe(t)),r){if(n===void 0)return e.style[r];e.style[r]=iMe(r,n)}}function oMe(e,t){for(var n in t)t.hasOwnProperty(n)&&Ov(e,n,t[n])}function aMe(e){var t=rMe(e),n=nMe(t);return $g[t]=$g[e]=$g[n]=n,n}function aW(){arguments.length===2?typeof arguments[1]=="string"?arguments[0].style.cssText=arguments[1]:oMe(arguments[0],arguments[1]):Ov(arguments[0],arguments[1],arguments[2])}f1.exports=aW;f1.exports.set=aW;f1.exports.get=function(e,t){return Array.isArray(t)?t.reduce(function(n,r){return n[r]=Ov(e,r||""),n},{}):Ov(e,t||"")};var sW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(n){return typeof n=="string"}})(sW);var lW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=o;var t=f1.exports,n=r(t);function r(a){return a&&a.__esModule?a:{default:a}}var i=!1;function o(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(a&&i!==!1)return i;if(typeof document!="undefined"){var s=document.createElement("div");(0,n.default)(s,{width:100,height:100,position:"absolute",top:-9999,overflow:"scroll",MsOverflowStyle:"scrollbar"}),document.body.appendChild(s),i=s.offsetWidth-s.clientWidth,document.body.removeChild(s)}else i=0;return i||0}})(lW);var cW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(){return!1}})(cW);var uW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(n){var r=n.clientWidth,i=getComputedStyle(n),o=i.paddingLeft,a=i.paddingRight;return r-parseFloat(o)-parseFloat(a)}})(uW);var dW={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=t;function t(n){var r=n.clientHeight,i=getComputedStyle(n),o=i.paddingTop,a=i.paddingBottom;return r-parseFloat(o)-parseFloat(a)}})(dW);var vi={};Object.defineProperty(vi,"__esModule",{value:!0});vi.containerStyleDefault={position:"relative",overflow:"hidden",width:"100%",height:"100%"};vi.containerStyleAutoHeight={height:"auto"};vi.viewStyleDefault={position:"absolute",top:0,left:0,right:0,bottom:0,overflow:"scroll",WebkitOverflowScrolling:"touch"};vi.viewStyleAutoHeight={position:"relative",top:void 0,left:void 0,right:void 0,bottom:void 0};vi.viewStyleUniversalInitial={overflow:"hidden",marginRight:0,marginBottom:0};vi.trackHorizontalStyleDefault={position:"absolute",height:6};vi.trackVerticalStyleDefault={position:"absolute",width:6};vi.thumbHorizontalStyleDefault={position:"relative",display:"block",height:"100%"};vi.thumbVerticalStyleDefault={position:"relative",display:"block",width:"100%"};vi.disableSelectStyle={userSelect:"none"};vi.disableSelectStyleReset={userSelect:""};var Bc={};Object.defineProperty(Bc,"__esModule",{value:!0});var el=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e};Bc.renderViewDefault=cMe;Bc.renderTrackHorizontalDefault=uMe;Bc.renderTrackVerticalDefault=dMe;Bc.renderThumbHorizontalDefault=fMe;Bc.renderThumbVerticalDefault=pMe;var sMe=h.exports,p1=lMe(sMe);function lMe(e){return e&&e.__esModule?e:{default:e}}function z2(e,t){var n={};for(var r in e)t.indexOf(r)>=0||!Object.prototype.hasOwnProperty.call(e,r)||(n[r]=e[r]);return n}function cMe(e){return p1.default.createElement("div",e)}function uMe(e){var t=e.style,n=z2(e,["style"]),r=el({},t,{right:2,bottom:2,left:2,borderRadius:3});return p1.default.createElement("div",el({style:r},n))}function dMe(e){var t=e.style,n=z2(e,["style"]),r=el({},t,{right:2,bottom:2,top:2,borderRadius:3});return p1.default.createElement("div",el({style:r},n))}function fMe(e){var t=e.style,n=z2(e,["style"]),r=el({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return p1.default.createElement("div",el({style:r},n))}function pMe(e){var t=e.style,n=z2(e,["style"]),r=el({},t,{cursor:"pointer",borderRadius:"inherit",backgroundColor:"rgba(0,0,0,.2)"});return p1.default.createElement("div",el({style:r},n))}(function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=Object.assign||function(D){for(var V=1;V<arguments.length;V++){var B=arguments[V];for(var L in B)Object.prototype.hasOwnProperty.call(B,L)&&(D[L]=B[L])}return D},n=function(){function D(V,B){for(var L=0;L<B.length;L++){var G=B[L];G.enumerable=G.enumerable||!1,G.configurable=!0,"value"in G&&(G.writable=!0),Object.defineProperty(V,G.key,G)}}return function(V,B,L){return B&&D(V.prototype,B),L&&D(V,L),V}}(),r=N2.exports,i=C(r),o=f1.exports,a=C(o),s=h.exports,l=YC.exports,c=C(l),u=sW,d=C(u),f=lW,p=C(f),m=cW,g=C(m),y=uW,v=C(y),b=dW,x=C(b),w=vi,E=Bc;function C(D){return D&&D.__esModule?D:{default:D}}function I(D,V){var B={};for(var L in D)V.indexOf(L)>=0||!Object.prototype.hasOwnProperty.call(D,L)||(B[L]=D[L]);return B}function T(D,V){if(!(D instanceof V))throw new TypeError("Cannot call a class as a function")}function _(D,V){if(!D)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return V&&(typeof V=="object"||typeof V=="function")?V:D}function P(D,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof V);D.prototype=Object.create(V&&V.prototype,{constructor:{value:D,enumerable:!1,writable:!0,configurable:!0}}),V&&(Object.setPrototypeOf?Object.setPrototypeOf(D,V):D.__proto__=V)}var M=function(D){P(V,D);function V(B){var L;T(this,V);for(var G=arguments.length,z=Array(G>1?G-1:0),j=1;j<G;j++)z[j-1]=arguments[j];var F=_(this,(L=V.__proto__||Object.getPrototypeOf(V)).call.apply(L,[this,B].concat(z)));return F.getScrollLeft=F.getScrollLeft.bind(F),F.getScrollTop=F.getScrollTop.bind(F),F.getScrollWidth=F.getScrollWidth.bind(F),F.getScrollHeight=F.getScrollHeight.bind(F),F.getClientWidth=F.getClientWidth.bind(F),F.getClientHeight=F.getClientHeight.bind(F),F.getValues=F.getValues.bind(F),F.getThumbHorizontalWidth=F.getThumbHorizontalWidth.bind(F),F.getThumbVerticalHeight=F.getThumbVerticalHeight.bind(F),F.getScrollLeftForOffset=F.getScrollLeftForOffset.bind(F),F.getScrollTopForOffset=F.getScrollTopForOffset.bind(F),F.scrollLeft=F.scrollLeft.bind(F),F.scrollTop=F.scrollTop.bind(F),F.scrollToLeft=F.scrollToLeft.bind(F),F.scrollToTop=F.scrollToTop.bind(F),F.scrollToRight=F.scrollToRight.bind(F),F.scrollToBottom=F.scrollToBottom.bind(F),F.handleTrackMouseEnter=F.handleTrackMouseEnter.bind(F),F.handleTrackMouseLeave=F.handleTrackMouseLeave.bind(F),F.handleHorizontalTrackMouseDown=F.handleHorizontalTrackMouseDown.bind(F),F.handleVerticalTrackMouseDown=F.handleVerticalTrackMouseDown.bind(F),F.handleHorizontalThumbMouseDown=F.handleHorizontalThumbMouseDown.bind(F),F.handleVerticalThumbMouseDown=F.handleVerticalThumbMouseDown.bind(F),F.handleWindowResize=F.handleWindowResize.bind(F),F.handleScroll=F.handleScroll.bind(F),F.handleDrag=F.handleDrag.bind(F),F.handleDragEnd=F.handleDragEnd.bind(F),F.state={didMountUniversal:!1},F}return n(V,[{key:"componentDidMount",value:function(){this.addListeners(),this.update(),this.componentDidMountUniversal()}},{key:"componentDidMountUniversal",value:function(){var L=this.props.universal;!L||this.setState({didMountUniversal:!0})}},{key:"componentDidUpdate",value:function(){this.update()}},{key:"componentWillUnmount",value:function(){this.removeListeners(),(0,r.cancel)(this.requestFrame),clearTimeout(this.hideTracksTimeout),clearInterval(this.detectScrollingInterval)}},{key:"getScrollLeft",value:function(){return this.view?this.view.scrollLeft:0}},{key:"getScrollTop",value:function(){return this.view?this.view.scrollTop:0}},{key:"getScrollWidth",value:function(){return this.view?this.view.scrollWidth:0}},{key:"getScrollHeight",value:function(){return this.view?this.view.scrollHeight:0}},{key:"getClientWidth",value:function(){return this.view?this.view.clientWidth:0}},{key:"getClientHeight",value:function(){return this.view?this.view.clientHeight:0}},{key:"getValues",value:function(){var L=this.view||{},G=L.scrollLeft,z=G===void 0?0:G,j=L.scrollTop,F=j===void 0?0:j,H=L.scrollWidth,R=H===void 0?0:H,W=L.scrollHeight,X=W===void 0?0:W,te=L.clientWidth,re=te===void 0?0:te,ne=L.clientHeight,ie=ne===void 0?0:ne;return{left:z/(R-re)||0,top:F/(X-ie)||0,scrollLeft:z,scrollTop:F,scrollWidth:R,scrollHeight:X,clientWidth:re,clientHeight:ie}}},{key:"getThumbHorizontalWidth",value:function(){var L=this.props,G=L.thumbSize,z=L.thumbMinSize,j=this.view,F=j.scrollWidth,H=j.clientWidth,R=(0,v.default)(this.trackHorizontal),W=Math.ceil(H/F*R);return R<=W?0:G||Math.max(W,z)}},{key:"getThumbVerticalHeight",value:function(){var L=this.props,G=L.thumbSize,z=L.thumbMinSize,j=this.view,F=j.scrollHeight,H=j.clientHeight,R=(0,x.default)(this.trackVertical),W=Math.ceil(H/F*R);return R<=W?0:G||Math.max(W,z)}},{key:"getScrollLeftForOffset",value:function(L){var G=this.view,z=G.scrollWidth,j=G.clientWidth,F=(0,v.default)(this.trackHorizontal),H=this.getThumbHorizontalWidth();return L/(F-H)*(z-j)}},{key:"getScrollTopForOffset",value:function(L){var G=this.view,z=G.scrollHeight,j=G.clientHeight,F=(0,x.default)(this.trackVertical),H=this.getThumbVerticalHeight();return L/(F-H)*(z-j)}},{key:"scrollLeft",value:function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;!this.view||(this.view.scrollLeft=L)}},{key:"scrollTop",value:function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;!this.view||(this.view.scrollTop=L)}},{key:"scrollToLeft",value:function(){!this.view||(this.view.scrollLeft=0)}},{key:"scrollToTop",value:function(){!this.view||(this.view.scrollTop=0)}},{key:"scrollToRight",value:function(){!this.view||(this.view.scrollLeft=this.view.scrollWidth)}},{key:"scrollToBottom",value:function(){!this.view||(this.view.scrollTop=this.view.scrollHeight)}},{key:"addListeners",value:function(){if(!(typeof document=="undefined"||!this.view)){var L=this.view,G=this.trackHorizontal,z=this.trackVertical,j=this.thumbHorizontal,F=this.thumbVertical;L.addEventListener("scroll",this.handleScroll),(0,p.default)()&&(G.addEventListener("mouseenter",this.handleTrackMouseEnter),G.addEventListener("mouseleave",this.handleTrackMouseLeave),G.addEventListener("mousedown",this.handleHorizontalTrackMouseDown),z.addEventListener("mouseenter",this.handleTrackMouseEnter),z.addEventListener("mouseleave",this.handleTrackMouseLeave),z.addEventListener("mousedown",this.handleVerticalTrackMouseDown),j.addEventListener("mousedown",this.handleHorizontalThumbMouseDown),F.addEventListener("mousedown",this.handleVerticalThumbMouseDown),window.addEventListener("resize",this.handleWindowResize))}}},{key:"removeListeners",value:function(){if(!(typeof document=="undefined"||!this.view)){var L=this.view,G=this.trackHorizontal,z=this.trackVertical,j=this.thumbHorizontal,F=this.thumbVertical;L.removeEventListener("scroll",this.handleScroll),(0,p.default)()&&(G.removeEventListener("mouseenter",this.handleTrackMouseEnter),G.removeEventListener("mouseleave",this.handleTrackMouseLeave),G.removeEventListener("mousedown",this.handleHorizontalTrackMouseDown),z.removeEventListener("mouseenter",this.handleTrackMouseEnter),z.removeEventListener("mouseleave",this.handleTrackMouseLeave),z.removeEventListener("mousedown",this.handleVerticalTrackMouseDown),j.removeEventListener("mousedown",this.handleHorizontalThumbMouseDown),F.removeEventListener("mousedown",this.handleVerticalThumbMouseDown),window.removeEventListener("resize",this.handleWindowResize),this.teardownDragging())}}},{key:"handleScroll",value:function(L){var G=this,z=this.props,j=z.onScroll,F=z.onScrollFrame;j&&j(L),this.update(function(H){var R=H.scrollLeft,W=H.scrollTop;G.viewScrollLeft=R,G.viewScrollTop=W,F&&F(H)}),this.detectScrolling()}},{key:"handleScrollStart",value:function(){var L=this.props.onScrollStart;L&&L(),this.handleScrollStartAutoHide()}},{key:"handleScrollStartAutoHide",value:function(){var L=this.props.autoHide;!L||this.showTracks()}},{key:"handleScrollStop",value:function(){var L=this.props.onScrollStop;L&&L(),this.handleScrollStopAutoHide()}},{key:"handleScrollStopAutoHide",value:function(){var L=this.props.autoHide;!L||this.hideTracks()}},{key:"handleWindowResize",value:function(){(0,p.default)(!1),this.forceUpdate()}},{key:"handleHorizontalTrackMouseDown",value:function(L){L.preventDefault();var G=L.target,z=L.clientX,j=G.getBoundingClientRect(),F=j.left,H=this.getThumbHorizontalWidth(),R=Math.abs(F-z)-H/2;this.view.scrollLeft=this.getScrollLeftForOffset(R)}},{key:"handleVerticalTrackMouseDown",value:function(L){L.preventDefault();var G=L.target,z=L.clientY,j=G.getBoundingClientRect(),F=j.top,H=this.getThumbVerticalHeight(),R=Math.abs(F-z)-H/2;this.view.scrollTop=this.getScrollTopForOffset(R)}},{key:"handleHorizontalThumbMouseDown",value:function(L){L.preventDefault(),this.handleDragStart(L);var G=L.target,z=L.clientX,j=G.offsetWidth,F=G.getBoundingClientRect(),H=F.left;this.prevPageX=j-(z-H)}},{key:"handleVerticalThumbMouseDown",value:function(L){L.preventDefault(),this.handleDragStart(L);var G=L.target,z=L.clientY,j=G.offsetHeight,F=G.getBoundingClientRect(),H=F.top;this.prevPageY=j-(z-H)}},{key:"setupDragging",value:function(){(0,a.default)(document.body,w.disableSelectStyle),document.addEventListener("mousemove",this.handleDrag),document.addEventListener("mouseup",this.handleDragEnd),document.onselectstart=g.default}},{key:"teardownDragging",value:function(){(0,a.default)(document.body,w.disableSelectStyleReset),document.removeEventListener("mousemove",this.handleDrag),document.removeEventListener("mouseup",this.handleDragEnd),document.onselectstart=void 0}},{key:"handleDragStart",value:function(L){this.dragging=!0,L.stopImmediatePropagation(),this.setupDragging()}},{key:"handleDrag",value:function(L){if(this.prevPageX){var G=L.clientX,z=this.trackHorizontal.getBoundingClientRect(),j=z.left,F=this.getThumbHorizontalWidth(),H=F-this.prevPageX,R=-j+G-H;this.view.scrollLeft=this.getScrollLeftForOffset(R)}if(this.prevPageY){var W=L.clientY,X=this.trackVertical.getBoundingClientRect(),te=X.top,re=this.getThumbVerticalHeight(),ne=re-this.prevPageY,ie=-te+W-ne;this.view.scrollTop=this.getScrollTopForOffset(ie)}return!1}},{key:"handleDragEnd",value:function(){this.dragging=!1,this.prevPageX=this.prevPageY=0,this.teardownDragging(),this.handleDragEndAutoHide()}},{key:"handleDragEndAutoHide",value:function(){var L=this.props.autoHide;!L||this.hideTracks()}},{key:"handleTrackMouseEnter",value:function(){this.trackMouseOver=!0,this.handleTrackMouseEnterAutoHide()}},{key:"handleTrackMouseEnterAutoHide",value:function(){var L=this.props.autoHide;!L||this.showTracks()}},{key:"handleTrackMouseLeave",value:function(){this.trackMouseOver=!1,this.handleTrackMouseLeaveAutoHide()}},{key:"handleTrackMouseLeaveAutoHide",value:function(){var L=this.props.autoHide;!L||this.hideTracks()}},{key:"showTracks",value:function(){clearTimeout(this.hideTracksTimeout),(0,a.default)(this.trackHorizontal,{opacity:1}),(0,a.default)(this.trackVertical,{opacity:1})}},{key:"hideTracks",value:function(){var L=this;if(!this.dragging&&!this.scrolling&&!this.trackMouseOver){var G=this.props.autoHideTimeout;clearTimeout(this.hideTracksTimeout),this.hideTracksTimeout=setTimeout(function(){(0,a.default)(L.trackHorizontal,{opacity:0}),(0,a.default)(L.trackVertical,{opacity:0})},G)}}},{key:"detectScrolling",value:function(){var L=this;this.scrolling||(this.scrolling=!0,this.handleScrollStart(),this.detectScrollingInterval=setInterval(function(){L.lastViewScrollLeft===L.viewScrollLeft&&L.lastViewScrollTop===L.viewScrollTop&&(clearInterval(L.detectScrollingInterval),L.scrolling=!1,L.handleScrollStop()),L.lastViewScrollLeft=L.viewScrollLeft,L.lastViewScrollTop=L.viewScrollTop},100))}},{key:"raf",value:function(L){var G=this;this.requestFrame&&i.default.cancel(this.requestFrame),this.requestFrame=(0,i.default)(function(){G.requestFrame=void 0,L()})}},{key:"update",value:function(L){var G=this;this.raf(function(){return G._update(L)})}},{key:"_update",value:function(L){var G=this.props,z=G.onUpdate,j=G.hideTracksWhenNotNeeded,F=this.getValues();if((0,p.default)()){var H=F.scrollLeft,R=F.clientWidth,W=F.scrollWidth,X=(0,v.default)(this.trackHorizontal),te=this.getThumbHorizontalWidth(),re=H/(W-R)*(X-te),ne={width:te,transform:"translateX("+re+"px)"},ie=F.scrollTop,ae=F.clientHeight,le=F.scrollHeight,he=(0,x.default)(this.trackVertical),Se=this.getThumbVerticalHeight(),pe=ie/(le-ae)*(he-Se),st={height:Se,transform:"translateY("+pe+"px)"};if(j){var Ot={visibility:W>R?"visible":"hidden"},In={visibility:le>ae?"visible":"hidden"};(0,a.default)(this.trackHorizontal,Ot),(0,a.default)(this.trackVertical,In)}(0,a.default)(this.thumbHorizontal,ne),(0,a.default)(this.thumbVertical,st)}z&&z(F),typeof L=="function"&&L(F)}},{key:"render",value:function(){var L=this,G=(0,p.default)(),z=this.props;z.onScroll,z.onScrollFrame,z.onScrollStart,z.onScrollStop,z.onUpdate;var j=z.renderView,F=z.renderTrackHorizontal,H=z.renderTrackVertical,R=z.renderThumbHorizontal,W=z.renderThumbVertical,X=z.tagName;z.hideTracksWhenNotNeeded;var te=z.autoHide;z.autoHideTimeout;var re=z.autoHideDuration;z.thumbSize,z.thumbMinSize;var ne=z.universal,ie=z.autoHeight,ae=z.autoHeightMin,le=z.autoHeightMax,he=z.style,Se=z.children,pe=I(z,["onScroll","onScrollFrame","onScrollStart","onScrollStop","onUpdate","renderView","renderTrackHorizontal","renderTrackVertical","renderThumbHorizontal","renderThumbVertical","tagName","hideTracksWhenNotNeeded","autoHide","autoHideTimeout","autoHideDuration","thumbSize","thumbMinSize","universal","autoHeight","autoHeightMin","autoHeightMax","style","children"]),st=this.state.didMountUniversal,Ot=t({},w.containerStyleDefault,ie&&t({},w.containerStyleAutoHeight,{minHeight:ae,maxHeight:le}),he),In=t({},w.viewStyleDefault,{marginRight:G?-G:0,marginBottom:G?-G:0},ie&&t({},w.viewStyleAutoHeight,{minHeight:(0,d.default)(ae)?"calc("+ae+" + "+G+"px)":ae+G,maxHeight:(0,d.default)(le)?"calc("+le+" + "+G+"px)":le+G}),ie&&ne&&!st&&{minHeight:ae,maxHeight:le},ne&&!st&&w.viewStyleUniversalInitial),Wi={transition:"opacity "+re+"ms",opacity:0},ua=t({},w.trackHorizontalStyleDefault,te&&Wi,(!G||ne&&!st)&&{display:"none"}),Mr=t({},w.trackVerticalStyleDefault,te&&Wi,(!G||ne&&!st)&&{display:"none"});return(0,s.createElement)(X,t({},pe,{style:Ot,ref:function(pn){L.container=pn}}),[(0,s.cloneElement)(j({style:In}),{key:"view",ref:function(pn){L.view=pn}},Se),(0,s.cloneElement)(F({style:ua}),{key:"trackHorizontal",ref:function(pn){L.trackHorizontal=pn}},(0,s.cloneElement)(R({style:w.thumbHorizontalStyleDefault}),{ref:function(pn){L.thumbHorizontal=pn}})),(0,s.cloneElement)(H({style:Mr}),{key:"trackVertical",ref:function(pn){L.trackVertical=pn}},(0,s.cloneElement)(W({style:w.thumbVerticalStyleDefault}),{ref:function(pn){L.thumbVertical=pn}}))])}}]),V}(s.Component);e.default=M,M.propTypes={onScroll:c.default.func,onScrollFrame:c.default.func,onScrollStart:c.default.func,onScrollStop:c.default.func,onUpdate:c.default.func,renderView:c.default.func,renderTrackHorizontal:c.default.func,renderTrackVertical:c.default.func,renderThumbHorizontal:c.default.func,renderThumbVertical:c.default.func,tagName:c.default.string,thumbSize:c.default.number,thumbMinSize:c.default.number,hideTracksWhenNotNeeded:c.default.bool,autoHide:c.default.bool,autoHideTimeout:c.default.number,autoHideDuration:c.default.number,autoHeight:c.default.bool,autoHeightMin:c.default.oneOfType([c.default.number,c.default.string]),autoHeightMax:c.default.oneOfType([c.default.number,c.default.string]),universal:c.default.bool,style:c.default.object,children:c.default.node},M.defaultProps={renderView:E.renderViewDefault,renderTrackHorizontal:E.renderTrackHorizontalDefault,renderTrackVertical:E.renderTrackVerticalDefault,renderThumbHorizontal:E.renderThumbHorizontalDefault,renderThumbVertical:E.renderThumbVerticalDefault,tagName:"div",thumbMinSize:30,hideTracksWhenNotNeeded:!1,autoHide:!1,autoHideTimeout:1e3,autoHideDuration:200,autoHeight:!1,autoHeightMin:0,autoHeightMax:200,universal:!1}})(oW);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scrollbars=void 0;var t=oW,n=r(t);function r(i){return i&&i.__esModule?i:{default:i}}e.default=n.default,e.Scrollbars=n.default})(LOe);function tM(e,t){return n=>n.colorMode==="dark"?t:e}function on(){return on=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},on.apply(this,arguments)}function hMe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var nM;(function(e){e.ToggleLoading="toggleLoading",e.SetForge="setForge",e.SetWorkspaces="setWorkspaces"})(nM||(nM={}));var rM;(function(e){e.SetModal="setModal",e.CloseModal="closeModal"})(rM||(rM={}));var iM;(function(e){e.closeDialog="DIALOG_CLOSE_ACTION",e.openDialog="DIALOG_OPEN_ACTION",e.setDialogProps="DIALOG_SET_COMPONENT_PROPS_ACTION",e.setProps="DIALOG_SET_ENTITY_PROPS_ACTION"})(iM||(iM={}));var oM;(function(e){e.ToggleExpand="MEGAMENU_TOGGLE_OPEN",e.Open="MEGAMENU_SET_OPEN",e.Close="MEGAMENU_SET_CLOSED",e.SetMenu="MEGAMENU_SET_CURRENT_MENU",e.Clear="MEGAMENU_CLEAR_MENU"})(oM||(oM={}));var mMe=h.exports.createContext({activeNav:void 0,setActiveNav:function(){return null},isSideBarOpen:!1,isSideBarExpanded:!1,openSideBar:function(){return null},closeSideBar:function(){return null},toggleSideBar:function(){return null},expandSideBar:function(){return null},collapseSideBar:function(){return null}}),gMe=function(){return h.exports.useContext(mMe)},vMe={fw:!0,style:{},iconProps:{color:void 0,size:void 0}};function yMe(e){var t=e.iconName,n=e.icon,r=n[0],i=n[1],o=n[4];return yA({viewBox:"0 0 "+r+" "+i,displayName:t,path:typeof o=="string"?k("path",{fill:"currentColor",d:o}):k("g",{children:o.map(function(a){return k("path",{d:a},a)})})})}var bMe=/ra-\w/,xMe=/fa-\w/,Oh=function(t){var n,r,i=t.iconIdentifier,o=t.fw,a=t.iconProps,s=t.style,l=t.family,c=l===void 0?"fas":l,u=t.icon,d=u===void 0?"":u,f=t.color,p=t.size;if(typeof i=="undefined"){var m=[],g=c.indexOf("ra")>-1;return o&&m.push(g?"ra-fw":"fa-fw"),m.push(c),m.push(d),typeof p!="undefined"&&m.push(g?"ra-"+p:"fa-"+p),k("i",{className:m.join(" "),style:on({},s,{color:f})})}var y=(n=a==null?void 0:a.size)!=null?n:"",v=(r=a==null?void 0:a.color)!=null?r:"";if(typeof i=="string"){var b="";return bMe.test(i)?(y&&(b+=" ra-"+y+" "),o&&(b+=" ra-fw "),b+="ra "):xMe.test(i)&&(y&&(b+=" fa-"+y+" "),o&&(b+=" fa-fw ")),b+=i+" ",k("i",{className:b,style:on({},s,{color:v})})}return typeof i!="undefined"&&i.icon?k(Wr,{as:yMe(i),style:on({},s)}):k("i",{})};Oh.defaultProps=vMe;var aM;(function(e){e.RPG_AWESOME="ra",e.FONT_AWESOME="fa"})(aM||(aM={}));var Qf={transparent:"transparent",black:"#000000",white:"#ffffff",offWhite:"#f2f2f2",darkWhite:"#f6f6f6",lightestGray:"#eaeaea",lightGray:"#d2d2d2",gray:"#c1c1c1",darkGray:"#595959",darkerGray:"#262626",darkestGray:"#1a1a1a",darkRed:"#7e0508",lightRed:"#9f0e11",primaryAction:"#166c94",danger:"#c10106",create:"#005216",info:"#f0f0f0",success:"#307e1c",secondaryAction:"#f0f0f0"},Mh={getColor:function(t){if(Qf&&t!==void 0&&Object.keys(Qf).includes(t))return Qf[t];var n=Object.keys(Qf);return console.warn('Invalid color key defined! "'+t+`" is not a valid option!.
Valid options include: `,n),"#ff0000"}},sM,lM,cM,uM;typeof navigator!="undefined"&&typeof navigator.connection!="undefined"&&!["slow-2g","2g"].includes((sM=navigator)==null||(lM=sM.connection)==null?void 0:lM.effectiveType)&&((cM=navigator)!=null&&(uM=cM.connection)!=null&&uM.saveData);function SMe(e){if(!e)return{Component:lx,defaultProps:{size:"",color:"",loading:!0,cssOverride:{},speedMultiplier:1}};switch(e.toLowerCase()){case"bar":return{Component:sPe,defaultProps:{height:4,width:100,color:"#36d7b7",loading:!0,cssOverride:{},speedMultiplier:1.2}};case"beat":return{Component:uPe,defaultProps:{size:15,margin:2,color:"#36d7b7",loading:!0,cssOverride:{},speedMultiplier:1.2}};case"bounce":return{Component:pPe,defaultProps:{size:60,color:"#36d7b7",loading:!0,cssOverride:{},speedMultiplier:.8}};case"circle":return{Component:gPe,defaultProps:{size:50,color:"#36d7b7",loading:!0,cssOverride:{},speedMultiplier:1.25}};case"clip":return{Component:bPe,defaultProps:{size:35,color:"#36d7b7",loading:!0,cssOverride:{},speedMultiplier:1}};case"clock":return{Component:SPe,defaultProps:{size:50,color:"#36d7b7",loading:!0,cssOverride:{},speedMultiplier:1}};case"dot":return{Component:EPe,defaultProps:{size:60,color:"#36d7b7",loading:!0,cssOverride:{},speedMultiplier:1}};case"fade":return{Component:_Pe,defaultProps:{height:15,width:5,radius:2,margin:2,color:"#36d7b7",loading:!0,cssOverride:{},speedMultiplier:1.2}};case"grid":return{Component:MPe,defaultProps:{size:15,margin:2,color:"#36d7b7",loading:!0,cssOverride:{},speedMultiplier:.8}};case"moon":return{Component:DPe,defaultProps:{size:60,color:"#36d7b7",loading:!0,cssOverride:{},speedMultiplier:.9}};case"propagate":return{Component:BPe,defaultProps:{size:15,color:"#36d7b7",loading:!0,cssOverride:{paddingBottom:"1rem"},speedMultiplier:1}};case"puff":return{Component:jPe,defaultProps:{size:60,color:"#36d7b7",loading:!0,cssOverride:{},speedMultiplier:1}};case"pulse":return{Component:NPe,defaultProps:{size:15,margin:2,color:"#36d7b7",loading:!0,cssOverride:{},speedMultiplier:1}};case"ring":return{Component:lx,defaultProps:{size:60,color:"#36d7b7",loading:!0,cssOverride:{},speedMultiplier:1}};case"rotate":return{Component:KPe,defaultProps:{size:15,margin:2,color:"#36d7b7",loading:!0,cssOverride:{},speedMultiplier:1}};case"scale":return{Component:XPe,defaultProps:{height:35,width:4,radius:2,margin:2,color:"#36d7b7",loading:!0,cssOverride:{},speedMultiplier:1}};case"square":return{Component:JPe,defaultProps:{size:50,color:"#36d7b7",loading:!0,cssOverride:{},speedMultiplier:1}};case"sync":return{Component:nOe,defaultProps:{size:15,margin:2,color:"#36d7b7",loading:!0,cssOverride:{},speedMultiplier:.7}};default:return{Component:lx,defaultProps:{size:60,color:"#36d7b7",loading:!0,cssOverride:{},speedMultiplier:1}}}}var wMe=["variant","spinnerType","spinnerProps","loaderMsg","isLoading"],fW=function(t){var n=t.variant,r=t.spinnerType,i=t.spinnerProps,o=t.loaderMsg,a=t.isLoading,s=hMe(t,wMe),l=vt("Loader",{variant:n}),c=l.Wrapper,u=l.LoaderBody,d=l.LoaderMsg,f=l.LoaderSpinner,p=SMe(r),m=p.Component,g=p.defaultProps,y=on({},g,i);return k(Wa,{children:a&&k(ws,{className:"fullscreen-loader",__css:c,as:Ur.div,transition:{duration:1,type:"tween",ease:"easeIn"},initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},...s,children:Z(ws,{className:"loader-body",__css:u,children:[k(ws,{className:"loader-spinner",__css:f,children:k(m,{...y})}),o&&k(ws,{className:"loader-msg",__css:d,children:o})]})},"motion-fullscreen-loader")})};fW.defaultProps={variant:"fullscreen",spinnerType:"square",isLoading:!0};Ur.div;var pW=function(t){var n=t.toggleHide,r=t.isHidable,i=t.isHidden,o=t.isDraggable,a=t.title,s=t.controls,l=vt("SidebarItemActions",{}),c=l.SidebarItemActionsWrapper,u=l.SidebarItemActionsButton,d=function(m){s&&s.start(m)},f=function(m){m.preventDefault(),m.stopPropagation(),n&&n(a)};return Z(ws,{className:"sidebar-item-actions",__css:c,children:[r&&k(lc,{"aria-label":"Hide Sidebar Link",size:"xs",onClick:f,__css:u,color:i?"gray":"darkWhite",icon:k(Oh,{icon:i?"fas fa-eye-slash":"fas fa-eye",fw:!0})}),o&&k(lc,{"aria-label":"Move Sidebar Link",size:"xs",onPointerDown:d,__css:u,icon:k(Oh,{icon:"fa-bars",fw:!0})})]})};pW.defaultProps={isDraggable:!0,isHidden:!1,isHidable:!0,title:void 0};var CMe=A.memo(function(e){var t=wse(),n=gMe(),r=n.isSideBarExpanded,i=n.activeNav,o=vt("SidebarItem",{variant:r?void 0:"iconOnly"}),a=o.SidebarItemContainer,s=o.SidebarItemIconWrapper,l=o.SidebarItemLabelWrapper,c=o.SidebarItemLabelText,u=e.option,d=u.title,f=u.icon,p=u.route,m=e.option,g=e.isHidable,y=e.isHidden,v=e.isDraggable,b=e.editMode,x=e.isStatic,w=e.isAdvancedOpen,E=e.onPin,C=e.onClick,I=e.onRoute,T=e.isMotion,_=e.itemId,P=e.itemIndex,M=e.moveItem,D=h.exports.useRef(null),V=DOe({accept:"nav-item",collect:function(te){return{handlerId:te.getHandlerId()}},hover:function(te,re){var ne;if(!!D.current){var ie=te.index,ae=P;if(!(ae===void 0||ie===ae)){var le=(ne=D.current)==null?void 0:ne.getBoundingClientRect(),he=(le.bottom-le.top)/2,Se=re.getClientOffset(),pe=Se.y-le.top;ie<ae&&pe<he||ie>ae&&pe>he||M instanceof Function&&(M(ie,ae),te.index=ae)}}}}),B=V[0].handlerId,L=V[1],G=EOe({type:"nav-item",item:function(){return{id:_,index:P}},collect:function(te){return{isDragging:te.isDragging()}}}),z=G[0].isDragging,j=G[1],F=i&&i.route===p,H=function(te){C?C(te):I&&I(m)},R=T&&v?{as:yse.Item,value:m,dragListener:!1,dragControls:t}:{value:""},W=z&&!T?0:1;return j(L(D)),k(ws,{className:"sidebar-item",__css:a,ref:T?void 0:D,...R,onClick:H,background:F?"linear-gradient(0deg, rgba(234,234,234,1) 0%, rgba(246,246,246,1) 39%, rgba(246,246,246,1) 70%)":void 0,color:F?"lightRed":"inherit",opacity:W,"data-handler-id":B,children:(!y||b)&&Z(Pe,{children:[k(_e,{className:"sidebar-item-icon",ml:r&&!m.pin&&!x?"0.5rem":"0",__css:s,children:k(Oh,{icon:f,fw:!0})}),r&&k(Wa,{children:k(ws,{className:"sidebar-item-label",__css:l,as:Ur.div,initial:{opacity:1},animate:{opacity:1,transition:{duration:.75,type:"tween"}},exit:{opacity:0,transition:{duration:.5,type:"tween"}},children:k(Sr,{as:"span",sx:c,children:d})},m.route)}),b&&k(pW,{title:d,isHidable:g,isDraggable:v,isHidden:y,toggleHide:E,controls:v?t:void 0}),x&&r&&k(_e,{px:2,children:k(Oh,{icon:"fa-caret-down",style:{transform:w?"rotate(0deg)":"rotate(90deg)",transition:"transform .15s ease-out"}})})]})})});CMe.defaultProps={isExpanded:!0,isHidable:!0,isDraggable:!0,isHidden:!1};var kMe={baseStyle:{rounded:0,fontWeight:"medium"},sizes:{lg:{fontSize:"md"},xl:{h:"3.75rem",minW:"3.75rem",fontSize:"lg",px:7}},variants:{"top-menu":{h:"42px",color:"white",outline:"none !important",_hover:{},_focus:{}},"side-bar":{variant:"ghost",px:4,minW:"2xs",justifyContent:"start",_hover:{bg:"#595959",color:"#9f0e11"}},settings:{w:"5rem",fontSize:"10px",bg:"#7e0508",_hover:{bg:"#9f0e11"},_active:{bg:"#1a1a1a"},_focus:{bg:"#1a1a1a !important"}}}},EMe={parts:["contentPanelContainer","contentPanel","contentPanelHeader","contentPanelBody","contentPanelFooter"],baseStyle:{contentPanelContainer:{flex:"auto",display:"flex",zIndex:600,flexDir:"column",height:"100%",width:"100%",position:"relative",transition:"max-width 0.3s ease-in-out"},contentPanel:{position:"absolute",display:"flex",flexDir:"column",height:"100%",width:"100%",backgroundColor:"white",filter:"drop-shadow(-1px 6px 3px rgba(50, 50, 0, 0.5))"},contentPanelHeader:{color:"white",width:"100%"},contentPanelBody:{display:"flex",justifyContent:"space-between",flexDir:"column",height:"inherit",padding:"1rem",overflow:"hidden",overflowY:"auto",width:"100%","&::-webkit-scrollbar":{width:"0px"},"&::-webkit-scrollbar-track":{width:"0px"},"&::-webkit-scrollbar-thumb":{borderRadius:"0px"}},contentPanelFooter:{}},variants:{default:{contentPanelContainer:{width:"650px",maxWidth:"650px"}},fullscreen:{contentPanelContainer:{width:"100%",maxWidth:"100%"}}}},IMe={parts:["EntityListContainer","EntityListHeader","EntityListItems","EntityListFooter","EntityListItem","EntityListItemTitle","EntityListFolder"],baseStyle:{EntityListContainer:{flexDir:"column",justifyContent:"flex-start",maxW:"305px",flexGrow:1,backgroundColor:"darkWhite",overflow:"hidden"},EntityListHeader:{flexDir:"column"},EntityListItems:{position:"relative",flexDir:"column",flexGrow:1,overflow:"hidden",overflowY:"auto","&::-webkit-scrollbar":{width:"0px"},"&::-webkit-scrollbar-track":{width:"0px"},"&::-webkit-scrollbar-thumb":{borderRadius:"0px"}},EntityListFooter:{position:"relative",justifySelf:"flex-end",justifyContent:"flex-start",backgroundColor:"lightGray",overflow:"hidden",width:"200%"},EntityListItem:{display:"flex",flexDir:"row",flexWrap:"nowrap",justifyContent:"space-between",alignItems:"center",cursor:"pointer",color:"darkGray",width:"100%",backgroundColor:"transparent",overflowX:"hidden",py:"0.125rem",_hover:{backgroundColor:"offWhite","&>:last-child":{display:"inline-flex"}}},EntityListItemTitle:{paddingY:"0.25rem",flexGrow:"1"},EntityListFolder:{width:"100%",display:"flex",flexDir:"row",justifyContent:"space-between",alignItems:"center",flexWrap:"nowrap",cursor:"pointer",color:"darkGray",backgroundColor:"transparent",_hover:{backgroundColor:"offWhite","& > :last-child":{display:"inline-flex"}}}}},TMe={parts:["titleContainer","titleIcon","titleText"],baseStyle:{titleContainer:{display:"inline-flex",fontWeight:"bold",fontSize:"14px",overflow:"hidden",flexGrow:1,justifyContent:"flex-start",flexDir:"row",alignItems:"center",color:"inherit",flexWrap:"nowrap"},titleIcon:{color:"inherit",display:"inline-block",justifyContent:"center",alignItems:"center",position:"relative"},titleText:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flexGrow:1,display:"inline-block"}},sizes:{},variants:{list:{titleContainer:{fontSize:"14px",fontWeight:"bold",flexGrow:1,justifyContent:"flex-start",flexDir:"row",flexWrap:"nowrap"},titleText:{display:"inline-block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:"inherit"}},"top-menu":{titleText:{textTransform:"uppercase",fontSize:"0.8rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},titleIcon:{marginLeft:"0.5rem",fontSize:"0.9rem"}},contentPanelTitle:{titleContainer:{marginLeft:"0.75rem"}}}},_Me={parts:["container","content","searchBar","accordion","searchBarInput"],baseStyle:{container:{minHeight:"10vh",backgroundColor:"white",borderRadius:6,padding:0,maxWidth:"25rem",color:"black",minWidth:"25rem",boxShadow:"0px 10px 38px -10px rgba(22, 23, 24, 0.35), 0px 10px 20px -15px rgba(22, 23, 24, 0.2)"},content:{},searchBar:{backgroundColor:"#f2f2f2",color:"#323c46",position:"relative"},searchBarInput:{color:"#323c46",border:"none","* &:focus":{border:"none",boxShadow:"none"}},accordion:{maxHeight:"30vh",overflowY:"auto"}},variants:{icon:{container:{width:"20rem"}}}},PMe={parts:["megaMenu","megaMenuCard","MegaMenuContainer","MegaMenuColumn"],baseStyle:{megaMenu:{display:"flex",opacity:"100%",flexWrap:"nowrap",flexDir:"row",width:"100%",height:"350px",position:"absolute",justifyContent:"center",alignItems:"center",gap:5,backgroundColor:"darkerGray",translate:"translateZ(-10px)",zIndex:1e3},megaMenuCard:{width:"100%",maxWidth:"280px",maxHeight:"310px",position:"relative",overflow:"hidden",cursor:"pointer"},MegaMenuContainer:{display:"flex",flexDir:"row",paddingX:"0.5rem",justifyContent:"center",position:"relative",height:"350px",width:"100%",background:"lightGray",overflow:"hidden"},MegaMenuColumn:{display:"flex",flexDir:"column",justifyContent:"center",alignContent:"center",alignItems:"center",gap:5,maxW:"280px",maxH:"220px"}},variants:{}},OMe={baseStyle:{dialog:{rounded:0}}},MMe={parts:[],baseStyle:{},variants:{}},hx=Mh.getColor,RMe={parts:["sideBarContainer","sideBar","SidebarHeaderContainer","SidebarContinueWorking","SidebarHeaderNav","SidebarFooter","SidebarFooterLabel","SidebarFooterContent","SidebarFooterOptions","SidebarFooterVersionTag"],baseStyle:{sideBarContainer:{backgroundColor:"#262626",color:"white",flex:"auto",display:"flex",zIndex:800,flexDir:"column"},sideBar:{display:"flex",flexDir:"column",flex:"auto",overflow:"hidden",overflowY:"auto","&::-webkit-scrollbar":{width:"0px"},"&::-webkit-scrollbar-track":{width:"0px"},"&::-webkit-scrollbar-thumb":{borderRadius:"0px"}},sideBarItem:{display:"flex",flexDir:"row",flexWrap:"nowrap",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",width:"100%",py:"0.25rem",_hover:{background:"darkestGray",color:hx("darkWhite")}},sideBarItemLabel:{py:"0.4rem",display:"flex",flexDir:"row",flexWrap:"nowrap",justifyContent:"flex-start",alignItems:"center"},sideBarItemAction:{background:"none",_hover:{background:"none"},_active:{background:"none"},_focus:{boxShadow:"none"}},SidebarHeaderContainer:{display:"flex",flexDir:"column",flexWrap:"nowrap",gap:"0.25rem",position:"relative",paddingTop:"0.125rem"},SidebarContinueWorking:{display:"flex",flexDir:"column",marginTop:"0.5rem",paddingX:"0.65rem",">:first-child":{fontSize:9,textTransform:"uppercase",color:"darkWhite"},">:last-child":{fontSize:12,cursor:"pointer"}},SidebarHeaderNav:{display:"flex",flexDir:"column"},SidebarFooter:{display:"flex",flexDirection:"column",width:"100%",justifyContent:"center",animationDelay:"0.5s",animation:{},paddingTop:"0.5rem",marginTop:"-1px"},SidebarFooterLabel:{whiteSpace:"pre",fontSize:"10px"},SidebarFooterContent:{marginY:"0.5rem",paddingX:"0.5rem",gap:2},SidebarFooterOptions:{display:"flex",flexDir:"row",flexWrap:"nowrap",justifyContent:"space-between",alignItems:"center",fontSize:"10px",marginY:"0.5rem",paddingX:"0.75rem"},SidebarFooterVersionTag:{opacity:0,cursor:"wait"}},variants:{sideBarItemConcealed:{sideBarItem:{backgroundColor:hx("gray"),color:hx("gray")}}}},DMe={parts:["sidePanelContainer","sidePanel","sidePanelHeader","sidePanelContent","sidePanelFooter"],baseStyle:{sidePanelContainer:{flex:"auto",display:"flex",zIndex:700,flexDir:"column",height:"100%",position:"relative"},sidePanel:{position:"absolute",display:"flex",flexDir:"column",height:"100%",flexGrow:1,flex:"auto",minW:{base:"xs"},maxW:{base:"full",sm:"md"}},sidePanelHeader:{color:"white"},sidePanelBody:{bg:"#f6f6f6",display:"flex",justifyContent:"space-between",flexDir:"column",overflow:"hidden",overflowY:"auto",flexGrow:1,"&::-webkit-scrollbar":{width:"0px"},"&::-webkit-scrollbar-track":{width:"0px"},"&::-webkit-scrollbar-thumb":{borderRadius:"0px"}},sidePanelFooter:{}},variants:{}},AMe={parts:["topMenuContainer","topMenuDivider","topMenuDropDownButton","topMenuNavItem","topMenuButtonItem"],baseStyle:{topMenuContainer:{position:"relative",bg:"darkerGray",zIndex:1100,height:"43px"},topMenuDivider:{orientation:"horizontal",borderStyle:"unset",backgroundColor:"darkRed",opacity:1,height:"2px"},topMenuButton:{variant:"thin-text"},topMenuNavItem:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",height:"43px",marginRight:2,fontSize:12,fontWeight:"bold",cursor:"pointer",color:"lightGray",transition:"color .3s ease-in-out",_hover:{color:"darkWhite"}},topMenuButtonItem:{}}},LMe={parts:["windowsManager","windowDock","window"],baseStyle:{windowsContainer:{pos:"absolute",top:0,left:0,bottom:0,right:0,overflow:"hidden",zIndex:"backdrop"},windowsManager:{pos:"fixed",p:1,right:0,textAlign:"center",top:"20%",height:"60%",bg:"rgba(255,255,255,1)",borderRadius:"10px 0 0 10px",zIndex:1800},windowsDock:{display:"flex",flexDir:"column",justifyContent:"flex-start",alignItems:"center",flexGrow:1,gap:"0.25rem",zIndex:"anchored",position:"absolute",top:"20%",right:0,width:"40px",p:4,bg:"darkerGray",clipPath:"polygon(0 97%, 0 3%, 100% 0, 100% 100%)",height:"424px",transform:"translateZ(3rem)"},window:{width:"14em",position:"relative",overflow:"hidden",cursor:"pointer",zIndex:900}}},BMe=Mh.getColor,$Me={baseStyle:{borderBottomColor:BMe("gray"),opacity:.1}},FMe={parts:["Wrapper","Title","InputGroup","InputControl","InputRightIcon"],baseStyle:{Wrapper:{display:"flex",flexDirection:"column",justifyContent:"flex-start",fontFamily:"Lato",letterSpacing:".075rem",width:"100%"},Title:{fontWeight:"bold",fontSize:"0.75rem",color:"lightGray"},InputGroup:{display:"flex",flexDirection:"row",borderWidth:"1px",borderStyle:"solid",borderColor:"transparent",color:"transparent",flexWrap:"nowrap",transition:"color .3s ease-in, border-bottom-color .3s ease-in, background-color .3s ease-in",_hover:{borderBottomColor:"lightGray",color:"gray"},_focusWithin:{color:"gray",backgroundColor:"darkWhite",borderBottomColor:"darkRed"}},InputRightIcon:{borderRadius:"0px"}},variants:{heading:{InputGroup:{fontWeight:"800",fontSize:"1rem"}}}},NMe={parts:["Wrapper"],baseStyle:{Wrapper:{display:"flex",flexDirection:"column",justifyContent:"flex-start",fontFamily:"Lato",letterSpacing:".075rem",width:"100%",position:"relative",transition:"height .3s ease-in-out, border-color .3s ease-in-out, background-color .3s ease-in-out",border:"1px solid transparent"},Title:{fontWeight:"bold",fontSize:"0.75rem",color:"lightGray"},bbContainer:{position:"absolute",backgroundColor:"white",zIndex:1,pointerEvents:"none",height:"100%",width:"100%",overflow:"hidden",overflowY:"auto"},bbContent:{display:"block",width:"100%",height:"100%"},InputGroup:{display:"flex",flexDirection:"row",borderWidth:"1px",borderStyle:"solid",borderColor:"transparent",color:"transparent",transition:"color .3s ease-in, border-bottom-color .3s ease-in, background-color .3s ease-in",_hover:{borderBottomColor:"gray",color:"gray"},_focusWithin:{color:"gray",backgroundColor:"lightestGray"}},InputRightIcon:{borderRadius:"0px"}}},zMe={parts:["Wrapper","ActiveIcon","Content","Body","SearchResults"],baseStyle:{ActiveIcon:{width:"auto",display:"inline-block",backgroundColor:"transparent",transition:"background-color 0.3s ease-in",_hover:{backgroundColor:"white"}},Content:{background:"white",borderColor:"darkWhite",zIndex:2e3,_focus:{outline:"none"}},SearchResults:{padding:"5px",maxHeight:"200px",overflow:"hidden",overflowY:"auto"}}},jMe={parts:["ControlWrapper","InputControl","InputWrapper","MenuWrapper","SelectField"],baseStyle:{ControlWrapper:{display:"flex",flexDir:"row",flexWrap:"nowrap",alignItems:"flex-start",borderRadius:0,fontSize:"0.9rem",width:"100%"},InputWrapper:{backgroundColor:"darkWhite",width:"100%",display:"flex",flexDir:"row",alignItems:"center",border:"none",_focusWithin:{backgroundColor:"white"}},InputControl:{outline:"none !important",boxShadow:"none !important",border:"none",padding:"0.5rem",flexGrow:1,backgroundColor:"transparent",_focus:{boxShadow:"none !important",outline:"none !important",borderColor:"none !important"}},MenuWrapper:{backgroundColor:"darkWhite"},SelectField:{backgroundColor:"transparent",border:"1px solid transparent",transition:"background-color .3s ease-in, border-color .3s ease-in",width:"100%",justifyContent:"space-between",alignItems:"center",flexDir:"row",flexWrap:"nowrap",display:"flex",fontFamily:"Lato",cursor:"pointer",_hover:{backgroundColor:"darkWhite",borderBottomColor:"lightestGray"},_focusWithin:{backgroundColor:"darkWhite",borderBottomColor:"darkRed !important"}},SelectOptionItem:{backgroundColor:"transparent"},SelectedOption:{width:"100%",display:"flex",flexDir:"row",alignItems:"center"}},variants:{}},HMe={parts:["Wrapper","Label","LabelIcon","LabelText"],baseStyle:{Wrapper:{flexDir:"row",justifyContent:"space-between",alignItems:"center",width:"100%",transition:"color .3s ease-in-out"},Label:{display:"flex",flexDir:"row",gap:"0.5rem",alignItems:"center",justifyContent:"flex-start",color:"lightGray"},LabelIcon:{},LabelText:{fontSize:"xs",fontFamily:"Lato",fontWeight:"600",transition:"color .3s ease-in-out",margin:"0px"}},variants:{}},VMe={parts:["control"],baseStyle:{control:{backgroundColor:"lightestGray",boxShadow:"none !important","&[data-checked]":{backgroundColor:"primaryAction"}}}},WMe={parts:["control"],baseStyle:{control:{backgroundColor:"lightestGray",boxShadow:"none !important","&[data-checked]":{backgroundColor:"primaryAction"}}}},UMe={parts:["container","label"],baseStyle:{container:{backgroundColor:"primaryAction",color:"white",borderRadius:"0px",border:"1px solid green"},label:{color:"white"},closeButton:{color:"white",opacity:.5,fontWeight:700,transition:"opacity .3s ease-out",_hover:{opacity:1,color:"white"}},leftIcon:{color:"white"},rightIcon:{color:"white"}}},GMe={parts:["outerWrapper","innerWrapper","btn","icon"],baseStyle:{outerWrapper:{display:"inline-block",border:"1px solid black",backgroundColor:"success",color:"white",margin:2,position:"absolute",bottom:2,right:4,boxShadow:"0px 0px 10px 3px "+Mh.getColor("gray"),transition:"box-shadow .3s ease-in-out, background-color .3s ease-in-out",_hover:{boxShadow:"0px 0px 10px 3px gray"}},innerWrapper:{padding:0,margin:0},btn:{outline:"none !important",_active:{outline:"none"},_focus:{outline:"none"}}}},KMe={parts:["SidebarItemContainer","SidebarItemIconWrapper","SidebarItemLabelWrapper","SidebarItemLabelText"],baseStyle:function(t){return{SidebarItemContainer:{display:"flex",flexDir:"row",justifyContent:"flex-start",alignItems:"center",width:"100%",paddingY:"0.5rem",backgroundColor:(t.colorMode==="dark","darkerGray"),transition:"background-color .2s ease-out",_hover:{backgroundColor:"darkGray"}},SidebarItemIconWrapper:{display:"flex",justifyContent:"center",alignItems:"center",height:"100%",width:"40px",userSelect:"none",cursor:"pointer"},SidebarItemLabelWrapper:{flexGrow:1,display:"flex",flexDir:"row",flexWrap:"nowrap",justifyContent:"space-between",alignItems:"center",cursor:"pointer",height:"100%",position:"relative"},SidebarItemLabelText:{fontSize:14,fontWeight:700,userSelect:"none",display:"inline-block",height:"100%",lineHeight:"1.75em"}}},variants:{iconOnly:{SidebarItemContainer:{_hover:{backgroundColor:"lightRed"}}}}},qMe={parts:["SidebarItemActionsWrapper","SidebarItemActionsButton"],baseStyle:{SidebarItemActionsWrapper:{display:"flex",flexDir:"row",flexWrap:"nowrap",justifyContent:"flex-end",alignItems:"center",gap:1,fontSize:14,paddingX:"0.5rem"},SidebarItemActionsButton:{color:"darkWhite",transition:"color .3s ease-out",_hover:{color:"red"}}}},YMe={parts:["DialogViewport","Backdrop","DialogContainer","HeaderWrapper","HeaderCloseButton","HeaderContainer","HeaderIconContainer","HeaderTitleContainer","HeaderTitleText","BodyContainer","FooterContainer"],baseStyle:{DialogViewport:{display:"flex",flexDir:"column",justifyContent:"center",alignItems:"center",position:"absolute",width:"100vw",height:"100vh",top:0,left:0,bottom:0,right:0},Backdrop:{position:"absolute",top:0,left:0,right:0,bottom:0,opacity:.85,backgroundColor:"darkestGray",zIndex:-1},DialogContainer:{marginX:2,boxShadow:"2px 2px 15px 1px #333",backgroundColor:"white",width:{base:"100%",md:"80%"}},HeaderWrapper:{position:"relative",width:"100%"},HeaderCloseButton:{position:"absolute",top:0,right:0,color:"gray",p:2,fontSize:"sm",cursor:"pointer",transition:"color .2s ease-out",_hover:{color:"darkGray"}},HeaderContainer:{width:"100%",display:"flex",flexDir:"row",flexWrap:"nowrap",position:"relative",justifyContent:"flex-start",alignItems:"center",gap:2},HeaderIconContainer:{display:"inline-block",fontSize:"0.9rem"},HeaderTitleContainer:{display:"inline-block"},HeaderTitleText:{fontSize:"0.9rem",fontWeight:700,color:"white"},BodyContainer:{display:"block",width:"100%",px:2,py:2},FooterContainer:{display:"flex",width:"100%",flexDir:"row",flexWrap:"nowrap",justifyContent:"flex-end",alignItems:"center",gap:4,px:2,py:2,fontSize:"0.9rem"}}},XMe={parts:["TabsList","TabsPanels","TabItem","TabPanelItem"],baseStyle:{TabsList:{backgroundColor:"darkWhite",minWidth:"120px",paddingLeft:"1rem"},TabItem:{paddingY:"0.5rem",textAlign:"left",justifyContent:"flex-start",paddingX:"0.5rem",_hover:{backgroundColor:"lightGray"}},TabsPanels:{background:"white"},TabPanelItem:{height:"100%",padding:"0.5rem 1rem"}}},ZMe={parts:["Container","Content"],baseStyle:{Container:{position:"absolute",backgroundColor:"white",zIndex:1,pointerEvents:"none",height:"100%",width:"100%",overflow:"hidden",overflowY:"auto"},Content:{display:"block",width:"100%",height:"100%","h1,h2,h3,h4,h5,h6":{fontWeight:800},h1:{fontSize:"1.4em"},h2:{fontSize:"1.3em"},h3:{fontSize:"1.175em"},h4:{fontSize:"1em"},h5:{fontSize:"0.9em"},h6:{fontSize:"0.8em"}}}},QMe={parts:["Wrapper","LoaderBody","LoaderMsg","LoaderSpinner"],baseStyle:{Wrapper:{width:"100%",height:"100%"}},variants:{fullscreen:{Wrapper:{position:"fixed",top:0,bottom:0,left:0,right:0,backgroundColor:"lightestGray",display:"flex",flexDir:"column",justifyContent:"center",alignItems:"center",width:"100vw",height:"100vh",zIndex:1e4,bg:"darkWhite"},LoaderBody:{width:"100%",padding:"1rem",display:"flex",flexDir:"column",flexWrap:"nowrap",justifyContent:"center",alignItems:"center",position:"relative"},LoaderMsg:{marginTop:"1rem",fontWeight:"600",fontSize:"1em",color:"Gray",letterSpacing:1,textTransform:"uppercase"}},component:{Wrapper:{position:"absolute",top:0,right:0,bottom:0,left:0,zIndex:1,backgroundColor:"lightGray",display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"center"},LoaderBody:{width:"100%",padding:"1rem",marginTop:"clamp(1rem, 16%, 4rem)",display:"flex",flexDir:"column",flexWrap:"nowrap",justifyContent:"center",alignItems:"center"},LoaderMsg:{marginTop:"1rem",fontWeight:"600",fontSize:"0.9em",color:"Gray",textTransform:"uppercase"}},list:{Wrapper:{width:"100%"},LoaderBody:{width:"100%"},LoaderSpinner:{minHeight:"2px"}}}},JMe={parts:["container","value","clearBtn","divider","caret","options","optionItem","optionItemMulti","noOptionItem","selectSearchInputWrapper","selectInput"],baseStyle:{container:{position:"relative",width:"20em;",minH:"1.5em",border:"0.05em solid #777",display:"flex",alignItems:"center",gap:".5em",padding:".5em",borderRadius:".25em",outline:"none",_focus:{borderColor:"darkGray"}},value:{flexGrow:1,display:"flex",gap:"0.5em",flexWrap:"wrap"},clearBtn:{background:"none",color:"#777",border:"none",outline:"none",cursor:"pointer",padding:0,fontSize:"1.25em",_focus:{color:"darkGray"},_hover:{color:"darkGray"}},divider:{backgroundColor:"#777",alignSelf:"stretch",width:".05em"},caret:{translate:"0 25%",border:".25em solid transparent",borderTopColor:"#777",cursor:"pointer"},options:{margin:0,padding:0,listStyle:"none",display:"none",maxH:"15em",overflowY:"auto",border:".05em solid #777",borderRadius:".25em",width:"100%",position:"absolute",left:0,top:"calc(100% + .25em)",backgroundColor:"white",zIndex:100,"&.show":{display:"block"}},optionItem:{padding:".25em .5em",cursor:"pointer","&.selected":{backgroundColor:"hsl(200, 100%, 70%)"},"&.highlighted":{backgroundColor:"hsl(200, 100%, 50%)",color:"white"}},optionItemMulti:{display:"flex",alignItems:"center",border:"0.05em solid #777",borderRadius:".25em",padding:"0.15em 0.25em",gap:"0.25em",cursor:"pointer",background:"none",outline:"none","> .removeBtn":{fontSize:"1.25em",color:"#777"},_hover:{backgroundColor:"hsl(0, 100%, 90%)",borderColor:"hsl(0, 100%, 50%)","> .removeBtn":{color:"hsl(0, 100%, 50%)"}},_focus:{backgroundColor:"hsl(0, 100%, 90%)",borderColor:"hsl(0, 100%, 50%)","> .removeBtn":{color:"hsl(0, 100%, 50%)"}}},noOptionItem:{display:"flex",width:"100%",padding:"0.15em 0.25em",justifyContent:"center",alignItems:"center",userSelect:"none",color:"#777",fontSize:"0.9em",fontWeight:"500"},selectSearchInputWrapper:{display:"flex",flexGrow:1,alignItems:"center",padding:"0.15em 0.25em"},selectInput:{paddingX:"0.25em"}}},eRe={parts:["EntityIcon","EntityItem","EntityText","ListWrapper"],baseStyle:{EntityItem:{display:"flex",alignItems:"center",flexDir:"row",flexWrap:"nowrap",gap:"0.5rem",py:2,width:"100%",px:"1rem"},EntityIcon:{width:"1rem",height:"1rem",visibility:"visible",display:"block",position:"relative"},EntityText:{width:"100%",flexGrow:1},ListWrapper:{display:"flex",flexGrow:1,flexDir:"column",justifyContent:"flex-start",alignItems:"stretch",width:"100%",paddingY:"0.5rem",overflow:"hidden"}}},tRe={parts:["Wrapper","PrimaryImage","InfoContainer","InfoLoaderBox","InfoTipBox"],baseStyle:{Wrapper:{position:"fixed",overflow:"hidden",width:"100%",height:"100vh",backgroundColor:"lightestGray",display:"flex",flexDir:"column",justifyContent:"flex-end",zIndex:"100000"},PrimaryImage:{position:"absolute",bottom:0,left:0,display:"block",height:"480px",width:"640px",backgroundColor:"lightestGray",backgroundRepeat:"no-repeat",objectFit:"cover",transformOrigin:"left bottom",filter:"grayscale(1)",_after:{content:'""',position:"absolute",display:"block",top:0,left:0,width:"100%",height:"100%",borderCollapse:"separate",boxShadow:"inset -60px 60px 80px 80px "+Mh.getColor("lightestGray")}},InfoContainer:{position:"relative",display:"flex",flexDir:"column",justifyContent:"flex-start",zIndex:20,height:200,width:640,margin:"10px",padding:"1em"},InfoLoaderBox:{width:"100%",textAlign:"left",paddingY:"0.5rem",paddingRight:"1rem",fontSize:"1.1em",fontWeight:600,color:"darkGray",fontStyle:"italic"},InfoMessageBox:{maxWidth:"60%",paddingX:"1rem",paddingY:"1rem",textAlign:"center",backgroundColor:"darkWhite",borderRadius:"0px",boxShadow:"0px 0px 5px 1px "+Mh.getColor("darkWhite"),fontSize:"0.9em",fontWeight:500,color:"darkestGray"}}},nRe={parts:["DockItemContainer","PreviewWrapper","DockItemTooltip"],baseStyle:{DockItemContainer:{position:"relative",display:"flex",flexDirection:"row",height:"40px",width:"40px",overflow:"visible",bgColor:"lightGray",cursor:"pointer"},PreviewWrapper:{display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"center",height:"100%",width:"100%",color:"darkWhite"},DockItemTooltip:{position:"absolute",bgColor:"blue",right:"calc(100% + 1rem)",top:"-2px",height:"40px",minW:"300px"}},variants:{}},rRe={parts:["ArtemisContainer","ArtemisHead","ArtemisIconContainer","ArtemisInputWrapper","ArtemisUserInputContainer","ArtemisUserInput","ArtemisSuggestInputContainer","ArtemisSuggestInput","ArtemisBody","ArtemisResultsContainer","ArtemisResultItem","ArtemisResultDescription","ArtemisResultTitle","ArtemisCommandButton","ArtemisFiltersContainer"],baseStyle:{ArtemisContainer:{display:"flex",flexDir:"column",flexWrap:"nowrap",width:650,height:490},ArtemisHead:{display:"flex",width:"100%",borderBottom:"2px solid lightGray",pb:4},ArtemisIconContainer:{display:"flex",flexDir:"column",justifyContent:"center",height:"100%",px:4,py:6,color:"lightGray"},ArtemisInputWrapper:{display:"flex",flexDir:"column",gap:4,pt:6,pr:4,overflow:"hidden",position:"relative",justifyContent:"flex-start"},ArtemisUserInputContainer:{display:"flex",flexDir:"row",flexGrow:1,position:"absolute",top:6},ArtemisUserInput:{color:"black",zIndex:1,backgroundColor:"transparent"},ArtemisSuggestInputContainer:{display:"flex",flexDir:"row",flexGrow:1,position:"relative",top:0},ArtemisSuggestInput:{color:"Gray",backgroundColor:"transparent"},ArtemisBody:{},ArtemisResultsContainer:{display:"flex",flexDir:"column",position:"relative",overflow:"hidden",overflowY:"auto",width:"70%",height:"300px"},ArtemisResultItem:{display:"flex",flexDir:"row",alignItems:"center",justifyContent:"flex-start",width:"100%",cursor:"pointer",px:4,gap:4,py:2,transition:"background-color .3s ease-in-out",_hover:{backgroundColor:"lightestGray"}},ArtemisResultDescription:{display:"flex",flexDir:"column"},ArtemisResultTitle:{fontWeight:"bold",fontSize:"1rem",color:"darkestGray"},ArtemisCommandButton:{display:"flex",backgroundColor:"darkWhite",color:"lightGray",transition:"all .3s ease-in-out",_hover:{backgroundColor:"lightestGray",color:"Gray"},py:1,px:4,fontSize:".75rem",textAlign:"center",cursor:"pointer"},ArtemisFiltersContainer:{display:"flex",width:"30%",backgroundColor:"darkWhite",flexGrow:1,flexDir:"column",p:4}}},iRe={__proto__:null,Button:kMe,ContentPanel:EMe,EntityList:IMe,EntityTitle:TMe,IconSearchMenu:_Me,MegaMenu:PMe,Modal:OMe,ModalWindow:MMe,SideBar:RMe,SidePanel:DMe,TopMenu:AMe,WindowManager:LMe,Divider:$Me,Input:FMe,Textarea:NMe,IconPicker:zMe,Select:jMe,FormLabel:HMe,Checkbox:VMe,Radio:WMe,Tag:UMe,GreenButton:GMe,SidebarItem:KMe,SidebarItemActions:qMe,Dialog:YMe,Tabs:XMe,BBCode:ZMe,Loader:QMe,CustomSelect:JMe,SkeletonLoaders:eRe,Splashscreen:tRe,DockItem:nRe,Artemis:rRe},oRe=function(t){return{body:{bg:tM("gray.200","gray.900")(t),color:tM("gray.800","gray.300")(t),padding:"0!important",fontFamily:"Lato",height:"100vh"},"*":{margin:0,padding:0,boxSizing:"border-box"},"*::before":{margin:0,padding:0,boxSizing:"border-box"},"*::after":{margin:0,padding:0,boxSizing:"border-box"},"button:focus":{boxShadow:"none!important"}}},aRe={__proto__:null,global:oRe},sRe={body:"Lato, sans-serif",heading:"Lato, sans-serif",mono:"Menlo, monospace",default:"Lato, sans-serif"},lRe={xs:"0.75rem",sm:"0.875rem",md:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem","7xl":"4.5rem","8xl":"6rem","9xl":"8rem"},cRe={hairline:100,thin:200,light:300,normal:400,medium:500,semibold:600,bold:700,extrabold:800,black:900},uRe={tighter:"-0.05em",tight:"-0.025em",normal:"0",wide:"0.025em",wider:"0.05em",widest:"0.1em"},dRe={normal:"normal",none:1,shorter:1.25,short:1.375,base:1.5,tall:1.625,taller:"2",3:".75rem",4:"1rem",5:"1.25rem",6:"1.5rem",7:"1.75rem",8:"2rem",9:"2.25rem",10:"2.5rem"},fRe={none:"0",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px",circle:"100%"},pRe={sm:"30em",md:"48em",lg:"62em",xl:"80em","2xl":"96em"},hRe={max:"max-content",min:"min-content",full:"100%","3xs":"14rem","2xs":"16rem",xs:"20rem",sm:"24rem",md:"28rem",lg:"32rem",xl:"36rem","2xl":"42rem","3xl":"48rem","4xl":"56rem","5xl":"64rem","6xl":"72rem","7xl":"80rem","8xl":"90rem",container:{sm:"640px",md:"768px",lg:"1024px",xl:"1280px"}},mRe={px:"1px",.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",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"},gRe={hide:-1,auto:"auto",base:0,docked:10,backdrop:200,back:500,front:800,dropdown:1e3,anchored:1050,sticky:1100,overlay:1300,modal:1400,global:1450,popover:1500,skipLink:1600,toast:1700,tooltip:1800};Ln.config,Ln.colors,Ln.styles,Ln.fonts,Ln.fontSizes,Ln.fontWeights,Ln.letterSpacings,Ln.lineHeights,Ln.radii,Ln.breakpoints,Ln.sizes,Ln.space,Ln.zIndices,Ln.components;const vRe=e=>e.appState.isLoading;function yRe(){const t=at().useStore(ln(vRe)),{t:n}=dn("",{keyPrefix:"externalUI"});return k(fW,{isLoading:t,loaderMsg:n("loading"),css:{height:"100%",width:"100%",display:"flex",justifyContent:"center",alignContent:"center",alignItems:"center"}})}be("div",{position:"absolute",top:0,left:"50%",transform:"translate(-50%, 0)",borderBottomLeftRadius:"12px",borderBottomRightRadius:"12px",padding:"8px 16px",fontFamily:"var(--fonts-ui)",fontSize:"var(--fontSizes-1)",boxShadow:"var(--shadows-panel)",backgroundColor:"white",zIndex:200,pointerEvents:"none","& > div > *":{pointerEvents:"all"},variants:{transform:{hidden:{transform:"translate(-50%, 100%)"},visible:{transform:"translate(-50%, 0%)"}}}});function bRe(){const e=at(),{t}=dn("",{keyPrefix:"externalUI"}),n=e.useStore(ln(vke)),r=e.useStore(ln(yke)),i=e.useStore(ln(bke)),o=e.useStore(ln(xke)),a=e.useStore(ln(Ske)),s=e.useStore(ln(gke)),l=s!=null?s:0>1,c=s!=null?s:0>2,u=h.exports.useCallback(()=>{e.rotate()},[e]),d=h.exports.useCallback(()=>{e.duplicate()},[e]),f=h.exports.useCallback(()=>{e.toggleLocked()},[e]),p=h.exports.useCallback(()=>{e.toggleAspectRatioLocked()},[e]),m=h.exports.useCallback(()=>{e.group()},[e]),g=h.exports.useCallback(()=>{e.moveToBack()},[e]),y=h.exports.useCallback(()=>{e.moveBackward()},[e]),v=h.exports.useCallback(()=>{e.moveForward()},[e]),b=h.exports.useCallback(()=>{e.moveToFront()},[e]),x=h.exports.useCallback(()=>{e.setShapeProps({rotation:0})},[e]),w=h.exports.useCallback(()=>{e.align(Mn.Top)},[e]),E=h.exports.useCallback(()=>{e.align(Mn.CenterVertical)},[e]),C=h.exports.useCallback(()=>{e.align(Mn.Bottom)},[e]),I=h.exports.useCallback(()=>{e.stretch(mc.Vertical)},[e]),T=h.exports.useCallback(()=>{e.distribute(gc.Vertical)},[e]),_=h.exports.useCallback(()=>{e.align(Mn.Left)},[e]),P=h.exports.useCallback(()=>{e.align(Mn.CenterHorizontal)},[e]),M=h.exports.useCallback(()=>{e.align(Mn.Right)},[e]),D=h.exports.useCallback(()=>{e.stretch(mc.Horizontal)},[e]),V=h.exports.useCallback(()=>{e.distribute(gc.Horizontal)},[e]),B=h.exports.useCallback(L=>{e.setMenuOpen(L)},[e]);return Z(Ka,{dir:"ltr",onOpenChange:B,children:[k(dl,{dir:"ltr",asChild:!0,children:k(Me,{variant:"circle",label:t("otherActions"),children:k(f9e,{})})}),k(ef,{sideOffset:16,children:Z(Pe,{children:[Z(zm,{children:[k(Me,{variant:"icon",disabled:!o,onClick:d,children:k(yt,{label:t("duplicate"),kbd:"#D",children:k(o9e,{})})}),k(Me,{disabled:!o,onClick:u,children:k(yt,{label:t("rotate"),children:k(A9e,{})})}),k(Me,{disabled:!o,onClick:f,children:k(yt,{label:t("toggleLocked"),kbd:"#\u21E7L",children:n?k(y9e,{}):k(x9e,{})})}),k(Me,{disabled:!o,onClick:p,children:k(yt,{label:t("toggleAspectRatioLock"),children:r?k(Qwe,{}):k(e9e,{})})}),k(Me,{disabled:!o||!i&&!a,onClick:m,children:k(yt,{label:t("group"),kbd:"#G",children:k(h9e,{})})})]}),Z(zm,{children:[k(Me,{disabled:!o,onClick:g,children:k(yt,{label:t("moveToBack"),kbd:"#\u21E7[",children:k(_9e,{})})}),k(Me,{disabled:!o,onClick:y,children:k(yt,{label:t("moveBackward"),kbd:"#[",children:k(Gwe,{})})}),k(Me,{disabled:!o,onClick:v,children:k(yt,{label:t("moveForward"),kbd:"#]",children:k(Xwe,{})})}),k(Me,{disabled:!o,onClick:b,children:k(yt,{label:t("moveToFront"),kbd:"#\u21E7]",children:k(O9e,{})})}),k(Me,{disabled:!o,onClick:x,children:k(yt,{label:t("resetAngle"),children:k(Wwe,{})})})]}),k(bs,{}),Z(zm,{children:[k(Me,{disabled:!l,onClick:_,children:k(yt,{label:t("alignLeftIcon"),children:k(jj,{})})}),k(Me,{disabled:!l,onClick:P,children:k(yt,{label:t("alignCenterHorizontallyIcon"),children:k(Nj,{})})}),k(Me,{disabled:!l,onClick:M,children:k(yt,{label:t("alignRightIcon"),children:k(Hj,{})})}),k(Me,{disabled:!l,onClick:D,children:k(yt,{label:t("stretchHorizontallyIcon"),children:k(Kj,{})})}),k(Me,{disabled:!c,onClick:V,children:k(yt,{label:t("spaceEvenlyHorizontallyIcon"),children:k(Uj,{})})})]}),Z(zm,{children:[k(Me,{disabled:!l,onClick:w,children:k(yt,{label:t("alignTopIcon"),children:k(Vj,{})})}),k(Me,{disabled:!l,onClick:E,children:k(yt,{label:t("alignCenterVerticallyIcon"),children:k(zj,{})})}),k(Me,{disabled:!l,onClick:C,children:k(yt,{label:t("alignBottomIcon"),children:k(Fj,{})})}),k(Me,{disabled:!l,onClick:I,children:k(yt,{label:t("stretchVerticallyIcon"),children:k(qj,{})})}),k(Me,{disabled:!c,onClick:T,children:k(yt,{label:t("spaceEvenlyVerticallyIcon"),children:k(Gj,{})})})]})]})})]})}const zm=be("div",{position:"relative",display:"flex",width:"100%",background:"none",border:"none",cursor:"pointer",outline:"none",alignItems:"center",justifyContent:"flex-start",padding:0}),xRe=e=>Object.keys(e.document.pages[e.appState.currentPageId].shapes).length>0&&e.appState.isEmptyCanvas,SRe=h.exports.memo(function(){const t=at(),{t:n}=dn("",{keyPrefix:"externalUI"});return t.useStore(ln(xRe))?k(wRe,{children:k(la,{onClick:t.zoomToContent,children:n("backToContent")})}):null}),wRe=be(Dc,{pointerEvents:"all",width:"fit-content",minWidth:0,gridRow:1,flexGrow:2,display:"block"});function CRe(){const e=at(),t=h.exports.useCallback(()=>{e.delete()},[e]),n=e.useStore(ln(i=>i.appState.status==="idle"&&i.document.pageStates[i.appState.currentPageId].selectedIds.length>0)),{t:r}=dn("",{keyPrefix:"externalUI"});return k(yt,{label:r("delete"),kbd:"\u232B",children:k(Me,{variant:"circle",disabled:!n,onSelect:t,children:k(Ake,{})})})}const Mv=be("div",{backgroundColor:"$panel",display:"flex",flexDirection:"row",boxShadow:"$panel",padding:"$2",border:"1px solid $panelContrast",gap:0,variants:{side:{center:{borderRadius:"$4"},left:{padding:0,borderTop:0,borderLeft:0,borderTopRightRadius:"$1",borderBottomRightRadius:"$3",borderBottomLeftRadius:"$1"},right:{padding:0,borderTop:0,borderRight:0,borderTopLeftRadius:"$1",borderBottomLeftRadius:"$3",borderBottomRightRadius:"$1"}}}}),mx=[U.Rectangle,U.Ellipse,U.Triangle,U.Line,U.Diamond,U.Polygon],dM={[U.Rectangle]:k(Kt,{icon:"fal fa-rectangle",iconProps:{size:"2x"}}),[U.Ellipse]:k(Kt,{icon:"fal fa-circle",iconProps:{size:"2x"}}),[U.Triangle]:k(Kt,{icon:"fal fa-triangle",iconProps:{size:"2x"}}),[U.Line]:k(Kt,{icon:"fal fa-pipe",iconProps:{size:"2x"}}),[U.Diamond]:k(Kt,{icon:"fal fa-diamond",iconProps:{size:"2x"}}),[U.Polygon]:k(Kt,{icon:"fal fa-rhombus",iconProps:{size:"2x"}})},kRe=h.exports.memo(function({activeTool:t,isToolLocked:n}){const r=at(),{t:i}=dn("",{keyPrefix:"externalUI"}),[o,a]=h.exports.useState(U.Rectangle);h.exports.useEffect(()=>{mx.includes(t)&&o!==t&&a(t)},[t]);const s=h.exports.useCallback(()=>{r.selectTool(o)},[t,r]),l=h.exports.useCallback(()=>{r.toggleToolLock()},[r]),c=h.exports.useCallback(d=>{d.key===" "&&r.shiftKey&&d.preventDefault()},[]),u=mx.includes(t);return Z(Ka,{dir:"ltr",onOpenChange:s,children:[k(dl,{dir:"ltr",asChild:!0,children:k(Me,{label:i("shapeMenu"),disabled:u&&r.shiftKey,variant:"primary",onDoubleClick:l,isToolLocked:u&&n,isActive:u,onKeyDown:c,children:dM[o]})}),k(D2,{asChild:!0,dir:"ltr",side:"top",sideOffset:12,children:k(Mv,{side:"center",className:"panel",children:mx.map((d,f)=>k(yt,{label:i(d),kbd:(4+f).toString(),children:k(Kl,{asChild:!0,children:k(Me,{variant:"primary",onClick:()=>{r.selectTool(d),a(d)},children:dM[d]})})},d))})})]})}),ERe=e=>e.appState.activeTool,IRe=e=>e.appState.isToolLocked,TRe=h.exports.memo(function(){const t=at(),{t:n}=dn("",{keyPrefix:"externalUI"}),r=t.useStore(ERe),i=t.useStore(ln(IRe)),o=h.exports.useCallback(()=>{t.selectTool("select")},[t]),a=h.exports.useCallback(()=>{t.selectTool("erase")},[t]),s=h.exports.useCallback(()=>{t.selectTool(U.Draw)},[t]),l=h.exports.useCallback(()=>{t.selectTool(U.Arrow)},[t]),c=h.exports.useCallback(()=>{t.selectTool(U.Text)},[t]),u=h.exports.useCallback(()=>{t.selectTool(U.Sticky)},[t]);return Z(Mv,{side:"center",children:[k(eu,{kbd:"1",label:n("select"),onClick:o,isActive:r==="select",children:k(l9e,{})}),k(eu,{kbd:"2",label:n("draw"),onClick:s,isActive:r===U.Draw,children:k(k9e,{})}),k(eu,{kbd:"3",label:n("eraser"),onClick:a,isActive:r==="erase",children:k(Nke,{})}),k(kRe,{activeTool:r,isToolLocked:Boolean(i)}),k(yt,{label:n("searchMenu"),children:k(lke,{activeTool:r,isToolLocked:i,onClick:o,showArrow:!0})}),k(eu,{kbd:"8",label:n("arrow"),onClick:l,isLocked:i,isActive:r===U.Arrow,children:k(qwe,{})}),k(eu,{kbd:"9",label:n("text"),onClick:c,isLocked:i,isActive:r===U.Text,children:k(z9e,{})}),k(eu,{kbd:"0",label:n("sticky"),onClick:u,isActive:r===U.Sticky,children:k(I9e,{})})]})}),[jFe,_Re]=aj("Label",{id:void 0,controlRef:{current:null}}),PRe=e=>{const t=_Re("LabelConsumer"),{controlRef:n}=t;return h.exports.useEffect(()=>{e&&(n.current=e)},[e,n]),t.id},[ORe,hW]=ko("Radio"),[MRe,RRe]=ORe("Radio"),DRe=h.exports.forwardRef((e,t)=>{const{__scopeRadio:n,"aria-labelledby":r,name:i,checked:o=!1,required:a,disabled:s,value:l="on",onCheck:c,...u}=e,[d,f]=h.exports.useState(null),p=un(t,b=>f(b)),m=PRe(d),g=r||m,y=h.exports.useRef(!1),v=!d||Boolean(d.closest("form"));return h.exports.createElement(MRe,{scope:n,checked:o,disabled:s},h.exports.createElement(rn.button,J({type:"button",role:"radio","aria-checked":o,"aria-labelledby":g,"data-state":mW(o),"data-disabled":s?"":void 0,disabled:s,value:l},u,{ref:p,onClick:Ee(e.onClick,b=>{o||c==null||c(),v&&(y.current=b.isPropagationStopped(),y.current||b.stopPropagation())})})),v&&h.exports.createElement(LRe,{control:d,bubbles:!y.current,name:i,value:l,checked:o,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))}),ARe=h.exports.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...i}=e,o=RRe("RadioIndicator",n);return h.exports.createElement(cl,{present:r||o.checked},h.exports.createElement(rn.span,J({"data-state":mW(o.checked),"data-disabled":o.disabled?"":void 0},i,{ref:t})))}),LRe=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=h.exports.useRef(null),a=I4(n),s=l4(t);return h.exports.useEffect(()=>{const l=o.current,c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"checked").set;if(a!==n&&u){const d=new Event("click",{bubbles:r});u.call(l,n),l.dispatchEvent(d)}},[a,n,r]),h.exports.createElement("input",J({type:"radio","aria-hidden":!0,defaultChecked:n},i,{tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function mW(e){return e?"checked":"unchecked"}const BRe=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],[$Re,HFe]=ko("RadioGroup",[S2,hW]),FRe=S2(),gW=hW(),[VFe,NRe]=$Re("RadioGroup"),zRe=h.exports.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...i}=e,o=NRe("RadioGroupItem",n),a=FRe(n),s=gW(n),l=h.exports.useRef(null),c=un(t,l),u=o.value===i.value,d=h.exports.useRef(!1);return h.exports.useEffect(()=>{const f=m=>{BRe.includes(m.key)&&(d.current=!0)},p=()=>d.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",p),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",p)}},[]),h.exports.createElement(uj,J({asChild:!0},a,{focusable:!r,active:u}),h.exports.createElement(DRe,J({disabled:r,required:o.required,checked:u},s,i,{name:o.name,ref:c,onCheck:()=>o.onValueChange(i.value),onKeyDown:Ee(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:Ee(i.onFocus,()=>{var f;d.current&&((f=l.current)===null||f===void 0||f.click())})})))}),jRe=h.exports.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,i=gW(n);return h.exports.createElement(ARe,J({},i,r,{ref:t}))}),HRe=zRe,VRe=jRe,WRe=e=>e.appState.status,URe=e=>e.appState.activeTool;function GRe(){const e=at(),t=e.useStore(ln(WRe)),n=e.useStore(ln(URe));return k(KRe,{bp:Wo,className:"debug-bar",children:Z(qRe,{children:[n," ","|",t]})})}be(HRe,{all:"unset",backgroundColor:"white",width:25,height:25,borderRadius:"100%",boxShadow:"0 2px 10px black","&:hover":"black","&:focus":{boxShadow:"0 0 0 2px black"}});be(VRe,{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",padding:"unset",position:"relative","&::after":{content:'""',display:"block",width:11,height:11,borderRadius:"50%",backgroundColor:"black"}});be("div",{"&>div":{display:"flex","flex-direction":"horizontal"}});const KRe=be("div",{userSelect:"none",borderTop:"1px solid $panelContrast",gridArea:"status",display:"flex",color:"$text",justifyContent:"space-between",alignItems:"center",backgroundColor:"$panel",gap:8,fontFamily:"$ui",fontSize:"$0",padding:"0 16px",variants:{bp:{small:{fontSize:"$1"}}}}),qRe=be("div",{whiteSpace:"nowrap",overflow:"hidden"});be("label",{fontSize:15,lineHeight:1,userSelect:"none",paddingLeft:15});const YRe=e=>e.settings.isDebugMode,XRe=h.exports.memo(function({onBlur:t}){const r=at().useStore(ln(YRe));return Z(ZRe,{onBlur:t,children:[Z(QRe,{children:[k(SRe,{}),Z(eDe,{children:[k(bRe,{}),k(TRe,{}),k(CRe,{})]})]}),r&&k(JRe,{children:k(GRe,{})})]})}),ZRe=be("div",{position:"absolute",bottom:0,left:0,right:0,width:"100%",minWidth:0,maxWidth:"100%",display:"grid",gridTemplateColumns:"auto auto auto",gridTemplateRows:"auto auto",justifyContent:"space-between",padding:"0",gap:"$4",zIndex:200,pointerEvents:"none","& > div > *":{pointerEvents:"all"}}),QRe=be("div",{gridRow:1,gridColumn:2,display:"flex",width:"fit-content",alignItems:"center",justifyContent:"center",flexDirection:"column",gap:"$4"}),JRe=be("div",{gridRow:2,gridColumn:"1 / span 3"}),eDe=be("div",{position:"relative",display:"flex",alignItems:"center",gap:"$2"}),{ToastContainer:tDe,toast:Tp}=Nye({theme:UN}),nDe=()=>{const{t:e}=dn("",{keyPrefix:"externalUI"}),t=kd(a=>a.connection.connectionState),[n,r]=h.exports.useState(!0);h.exports.useEffect(()=>{const a="connection-toast"+Math.random();t==="disconnected"?Tp({id:a,title:e("reconnecting"),status:"info",duration:null,position:"top"}):Tp.close(a);let s;return t==="fresh"&&(r(!0),s=setTimeout(()=>{r(!1)},uo.app.socketInterval)),()=>{clearTimeout(s),Tp.close(a)}},[t]);const i=a=>{switch(a){case"updating":return k(Me,{variant:"text",children:Z(_e,{color:"inherit",children:[k(Kt,{icon:"fa-solid fa-rotate",css:{paddingRight:"1rem"}}),e("saving")]})});case"persisted":return Z(Me,{variant:"text",children:[k(Kt,{icon:"fa-solid fa-cloud-check"}),`${e("saved")} ${Date.now()}`]});case"fresh":return n?Z(Me,{variant:"text",children:[k(Kt,{icon:"fa-solid fa-cloud-check"}),e("saved")]}):k(Me,{variant:"text",children:k(Kt,{icon:"fa-solid fa-cloud-check"})});case"disconnected":default:return k(Me,{variant:"text",children:Z(_e,{color:"inherit",children:[k(Kt,{icon:"fa-solid fa-cloud-slash",css:{paddingRight:"1rem"}}),e("connecting")]})})}},o=a=>{switch(a){case"updating":case"fresh":default:return k(Pe,{});case"disconnected":return k(_e,{color:"gray.700",padding:0,className:"container",children:Z(G9,{status:"error",variant:"subtle",children:[k(K9,{}),k(q9,{mr:2,children:e("offlineBeCareful")})]})})}};return Z(Ka,{dir:"ltr",children:[k(dl,{asChild:!0,children:i(t)}),k(ef,{variant:"menu",css:{padding:0},children:o(t)})]})};function rDe(e){const t=at(),{t:n}=dn("",{keyPrefix:"externalUI"}),r=h.exports.useCallback(()=>{t.handleModalOpened(sr.canvas)},[]);return k(Me,{variant:"text",onClick:r,disabled:e.readOnly,children:e.name||n("canvas")})}const iDe=({canvasId:e})=>{const{t}=dn("",{keyPrefix:"externalUI"}),n=h.exports.useCallback(()=>{Ch(Q6e(e))},[e]);return k(Me,{variant:"text",onClick:n,children:t("editElement",{element:t("canvas")})})},j2="-0.03em",oDe=1.3,uu=16,jm=16,fr=16,xi=32,Hm=128,E8=5,I8=10,pr=.3,du=3,h1=[.5,.5],H2={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>e*(2-e),easeInOutQuad:e=>e<.5?2*e*e:-1+(4-2*e)*e,easeInCubic:e=>e*e*e,easeOutCubic:e=>--e*e*e+1,easeInOutCubic:e=>e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1- --e*e*e*e,easeInOutQuart:e=>e<.5?8*e*e*e*e:1-8*--e*e*e*e,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1+--e*e*e*e*e,easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e<=0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e>=1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e<=0?0:e>=1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2},fM=["#EC5E41","#F2555A","#F04F88","#E34BA9","#BD54C6","#9D5BD2","#7B66DC","#02B1CC","#11B3A3","#39B178","#55B467","#FF802B"],aDe=typeof Window=="undefined"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent),vW=[".png",".svg",".jpg",".jpeg",".gif"],yW=aDe?[]:[".mp4",".webm"];function qa(e,t){const n=$.getFromCache(t,e,()=>{const[r,i]=e.size;return{minX:0,maxX:r,minY:0,maxY:i,width:r,height:i}});return $.translateBounds(n,e.point)}function nf(e,t,{initialShape:n,transformOrigin:r,scaleX:i,scaleY:o}){if(e.rotation||n.isAspectRatioLocked){const a=Y.toFixed(Y.mul(n.size,Math.min(Math.abs(i),Math.abs(o)))),s=Y.toFixed([t.minX+(t.width-e.size[0])*(i<0?1-r[0]:r[0]),t.minY+(t.height-e.size[1])*(o<0?1-r[1]:r[1])]),l=i<0&&o>=0||o<0&&i>=0?n.rotation?-n.rotation:0:n.rotation;return{size:a,point:s,rotation:l}}else return{point:Y.toFixed([t.minX,t.minY]),size:Y.toFixed([t.width,t.height])}}function rf(e,t){return{size:Y.toFixed([t.width,t.height]),point:Y.toFixed([t.minX,t.minY])}}const pM="  ";class Lr{static insertTextFirefox(t,n){t.setRangeText(n,t.selectionStart||0,t.selectionEnd||0,"end"),t.dispatchEvent(new InputEvent("input",{data:n,inputType:"insertText",isComposing:!1}))}static insert(t,n){const r=t.ownerDocument,i=r.activeElement;i!==t&&t.focus(),r.execCommand("insertText",!1,n)||Lr.insertTextFirefox(t,n),i===r.body?t.blur():i instanceof HTMLElement&&i!==t&&i.focus()}static set(t,n){t.select(),Lr.insert(t,n)}static getSelection(t){const{selectionStart:n,selectionEnd:r}=t;return t.value.slice(n||void 0,r||void 0)}static wrapSelection(t,n,r){const{selectionStart:i,selectionEnd:o}=t,a=Lr.getSelection(t);Lr.insert(t,n+a+(r!=null?r:n)),t.selectionStart=(i||0)+n.length,t.selectionEnd=(o||0)+n.length}static replace(t,n,r){let i=0;t.value.replace(n,(...o)=>{const a=i+o[o.length-2],s=o[0].length;t.selectionStart=a,t.selectionEnd=a+s;const l=typeof r=="string"?r:r(...o);return Lr.insert(t,l),t.selectionStart=a,i+=l.length-s,l})}static findLineEnd(t,n){const r=t.lastIndexOf(`
`,n-1)+1;return t.charAt(r)!=="	"?n:r+1}static indent(t){var s;const{selectionStart:n,selectionEnd:r,value:i}=t,o=i.slice(n,r),a=(s=/\n/g.exec(o))==null?void 0:s.length;if(a&&a>0){const l=i.lastIndexOf(`
`,n-1)+1,c=t.value.slice(l,r-1),u=c.replace(/^|\n/g,`$&${pM}`),d=u.length-c.length;t.setSelectionRange(l,r-1),Lr.insert(t,u),t.setSelectionRange(n+1,r+d)}else Lr.insert(t,pM)}static unindent(t){const{selectionStart:n,selectionEnd:r,value:i}=t,o=i.lastIndexOf(`
`,n-1)+1,a=Lr.findLineEnd(i,r),s=t.value.slice(o,a),l=s.replace(/(^|\n)(\t| {1,2})/g,"$1"),c=s.length-l.length;t.setSelectionRange(o,a),Lr.insert(t,l);const u=/\t| {1,2}/.exec(i.slice(o,n)),d=u?u[0].length:0,f=n-d;t.setSelectionRange(n-d,Math.max(f,r-c))}}const sDe={[ct.Start]:"left",[ct.Middle]:"center",[ct.End]:"right",[ct.Justify]:"justify"};function bW(e=ct.Start){return sDe[e]}let fu;function lDe(){var t;(t=document.getElementById("__textLabelMeasure"))==null||t.remove();const e=document.createElement("pre");return e.id="__textLabelMeasure",Object.assign(e.style,{whiteSpace:"pre",width:"auto",border:"1px solid transparent",padding:"4px",margin:"0px",letterSpacing:`${j2}px`,opacity:"0",position:"absolute",top:"-500px",left:"0px",zIndex:"9999",pointerEvents:"none",userSelect:"none",alignmentBaseline:"mathematical",dominantBaseline:"mathematical"}),e.tabIndex=-1,document.body.appendChild(e),e}typeof window!="undefined"&&(fu=lDe());let hM="",mM="",gx=[0,0];function Rv(e,t){if(!e)return[16,32];if(!fu)return[10,10];if(e===hM&&t===mM)return gx;hM=e,mM=t,fu.innerHTML=`${e}&zwj;`,fu.style.font=t;const n=fu.offsetWidth||1,r=fu.offsetHeight||1;return gx=[n,r],gx}function xW(e){return h.exports.useCallback(n=>{switch(n.metaKey&&n.stopPropagation(),n.key){case"Meta":{n.stopPropagation();break}case"z":{n.metaKey&&(n.shiftKey?document.execCommand("redo",!1):document.execCommand("undo",!1),n.preventDefault());break}case"Escape":{n.currentTarget.blur();break}case"Enter":{(n.ctrlKey||n.metaKey)&&n.currentTarget.blur();break}case"Tab":{n.preventDefault(),n.shiftKey?Lr.unindent(n.currentTarget):Lr.indent(n.currentTarget),e(Q.normalizeText(n.currentTarget.value));break}}},[e])}const of=h.exports.memo(function({font:t,text:n,color:r,offsetX:i=0,offsetY:o=0,scale:a=1,isEditing:s=!1,onBlur:l,onChange:c}){const u=h.exports.useRef(null),d=h.exports.useRef(!1),f=Rv(n,t),p=h.exports.useCallback(x=>{c(Q.normalizeText(x.currentTarget.value))},[c]),m=xW(c),g=h.exports.useCallback(x=>{x.currentTarget.setSelectionRange(0,0),l==null||l()},[l]),y=h.exports.useCallback(x=>{!s||!d.current||document.activeElement===x.currentTarget&&x.currentTarget.select()},[s]),v=h.exports.useCallback(x=>{s&&x.stopPropagation()},[s]);h.exports.useEffect(()=>{s?requestAnimationFrame(()=>{d.current=!0;const x=u.current;x&&(x.focus(),x.select())}):l==null||l()},[s,l]);const b=h.exports.useRef(null);return h.exports.useLayoutEffect(()=>{const x=b.current;!x||(x.style.transform=`scale(${a}, ${a}) translate(${i}px, ${o}px)`,x.style.width=f[0]+"px",x.style.height=f[1]+"px")},[f,o,i,a]),k(cDe,{children:Z(uDe,{ref:b,hasText:!!n,isEditing:s,style:{font:t,color:r},children:[s?k(dDe,{ref:u,style:{font:t,color:r},name:"text",tabIndex:-1,autoComplete:"false",autoCapitalize:"false",autoCorrect:"false",autoSave:"false",autoFocus:!0,placeholder:"",spellCheck:"true",wrap:"off",dir:"auto",datatype:"wysiwyg",defaultValue:n,color:r,onFocus:y,onChange:p,onKeyDown:m,onBlur:g,onPointerDown:v,onContextMenu:A2}):n,"\u200B"]})})}),cDe=be("div",{position:"absolute",top:0,left:0,width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",userSelect:"none",variants:{isGhost:{false:{opacity:1},true:{transition:"opacity .2s",opacity:pr}}}}),SW={whiteSpace:"pre-wrap",overflowWrap:"break-word"},uDe=be("div",{position:"absolute",padding:"4px",zIndex:1,minHeight:1,minWidth:1,lineHeight:1,letterSpacing:j2,outline:0,fontWeight:"500",textAlign:"center",backfaceVisibility:"hidden",userSelect:"none",WebkitUserSelect:"none",WebkitTouchCallout:"none",variants:{hasText:{false:{pointerEvents:"none"},true:{pointerEvents:"all"}},isEditing:{false:{userSelect:"none"},true:{background:"$boundsBg",userSelect:"text",WebkitUserSelect:"text"}}},...SW}),dDe=be("textarea",{position:"absolute",top:0,left:0,zIndex:1,width:"100%",height:"100%",border:"none",padding:"4px",resize:"none",textAlign:"inherit",minHeight:"inherit",minWidth:"inherit",lineHeight:"inherit",letterSpacing:"inherit",outline:0,fontWeight:"inherit",overflow:"hidden",backfaceVisibility:"hidden",display:"inline-block",pointerEvents:"all",background:"$boundsBg",userSelect:"text",WebkitUserSelect:"text",...SW});function fDe(e,t,{initialShape:n,transformOrigin:r,scaleX:i,scaleY:o}){try{if((e==null?void 0:e.rotation)||(n==null?void 0:n.isAspectRatioLocked)){const a=Y.toFixed(Y.mul(n.size,Math.min(Math.abs(i),Math.abs(o)))),s=Y.toFixed([t.minX+(t.width-e.size[0])*(i<0?1-r[0]:r[0]),t.minY+(t.height-e.size[1])*(o<0?1-r[1]:r[1])]),l=i<0&&o>=0||o<0&&i>=0?n.rotation?-n.rotation:0:n.rotation;return{size:a,point:s,rotation:l}}else return{point:Y.toFixed([t.minX,t.minY]),size:Y.toFixed([t.width,t.height])}}catch{return{point:Y.toFixed([t.minX,t.minY]),size:Y.toFixed([t.width,t.height])}}}const Fg=(e,t,n)=>Math.min(Math.max(t,e),n);function pDe(e,t){let{height:n,width:r,scaleX:i,scaleY:o}=t;if((t==null?void 0:t.scaleX)&&(t==null?void 0:t.scaleY)){lt.debug("transformSingleBlock",{scaleX:t.scaleX,scaleY:t.scaleY});const a=e.maxHeight/e.maxWidth;t.scaleX===1?(n=Fg(e.minHeight,t.height,e.maxHeight),r=n/a):(t.scaleY,r=Fg(e.minWidth,t.width,e.maxWidth),n=a*r),r=Math.round(r),n=Math.round(n)}return{size:Y.toFixed([r,n]),point:Y.toFixed([t.minX,t.minY])}}function hDe({id:e,bounds:t,labelSize:n,offset:r,scale:i=1}){return k("defs",{children:Z("mask",{id:e+"_clip",children:[k("rect",{x:-100,y:-100,width:t.width+200,height:t.height+200,fill:"white"}),k("rect",{x:t.width/2-n[0]/2*i+((r==null?void 0:r[0])||0),y:t.height/2-n[1]/2*i+((r==null?void 0:r[1])||0),width:n[0]*i,height:n[1]*i,rx:4*i,ry:4*i,fill:"black",opacity:Math.max(i,.8)})]})})}function T8(e,t,n){const r=nV(t.size,t.font),i=document.createElementNS("http://www.w3.org/2000/svg","g"),o=e.split(`
`).map((a,s)=>{const l=document.createElementNS("http://www.w3.org/2000/svg","text");return l.textContent=a,l.setAttribute("y",oDe*r*(.5+s)+""),i.appendChild(l),l});switch(i.setAttribute("font-size",r+""),i.setAttribute("font-family",o8(t.font).slice(1,-1)),i.setAttribute("text-align",bW(t.textAlign)),t.textAlign){case ct.Middle:{i.setAttribute("text-align","center"),i.setAttribute("text-anchor","middle"),o.forEach(a=>a.setAttribute("x",n.width/2+""));break}case ct.End:{i.setAttribute("text-align","right"),i.setAttribute("text-anchor","end"),o.forEach(a=>a.setAttribute("x",n.width+""));break}case ct.Start:i.setAttribute("text-anchor","start"),i.setAttribute("alignment-baseline","central")}return i}class Fe extends o4{constructor(){super(...arguments);S(this,"canBind",!1);S(this,"canEdit",!1);S(this,"canClone",!1);S(this,"isAspectRatioLocked",!1);S(this,"hideResizeHandles",!1);S(this,"bindingDistance",fr);S(this,"hitTestPoint",(n,r)=>$.pointInBounds(r,this.getRotatedBounds(n)));S(this,"hitTestLineSegment",(n,r,i)=>{const o=$.getBoundsFromPoints([r,i]),a=this.getBounds(n);return $.boundsContain(a,o)||n.rotation?a1(r,i,$.getRotatedCorners(this.getBounds(n))).didIntersect:B6(r,i,this.getBounds(n)).length>0});S(this,"create",n=>(this.refMap.set(n.id,h.exports.createRef()),this.getShape(n)));S(this,"getCenter",n=>$.getBoundsCenter(this.getBounds(n)));S(this,"getExpandedBounds",n=>$.expandBounds(this.getBounds(n),this.bindingDistance));S(this,"getBindingPoint",(n,r,i,o,a,s)=>{const l=this.getBounds(n),c=this.getExpandedBounds(n);if(!$.pointInBounds(i,c))return;const u=n4(o,a,c).filter(v=>v.didIntersect).map(v=>v.points[0]);if(!u.length)return;const d=this.getCenter(n),f=u.sort((v,b)=>O.dist(b,o)-O.dist(v,o))[0],p=O.med(i,f);let m,g;s?(m=O.dist(i,d)<fr/2?d:i,g=0):(O.distanceToLineSegment(i,p,d)<fr/2?m=d:m=p,$.pointInBounds(i,l)?g=this.bindingDistance:g=Math.max(this.bindingDistance,$.getBoundsSides(l).map(v=>O.distanceToLineSegment(v[1][0],v[1][1],i)).sort((v,b)=>v-b)[0]));const y=O.divV(O.sub(m,[c.minX,c.minY]),[c.width,c.height]);return{point:O.clampV(y,0,1),distance:g}});S(this,"mutate",(n,r)=>r);S(this,"transform",(n,r,i)=>({...n,point:[r.minX,r.minY]}));S(this,"transformSingle",(n,r,i)=>this.transform(n,r,i));S(this,"updateChildren");S(this,"onChildrenChange");S(this,"onBindingChange");S(this,"onHandleChange");S(this,"onRightPointHandle");S(this,"onDoubleClickHandle");S(this,"onDoubleClickBoundsHandle");S(this,"onSessionComplete");S(this,"getSvgElement",n=>{var i;const r=(i=document.getElementById(n.id+"_svg"))==null?void 0:i.cloneNode(!0);if(!!r){if("label"in n&&n.label!==void 0){const o=n,a=document.createElementNS("http://www.w3.org/2000/svg","g"),s=this.getBounds(n),l=T8(o.label,n.style,s);l.setAttribute("fill",We(n.style).stroke);const c=oa(n.style),u=Rv(o.label,c);return l.setAttribute("transform-origin","top left"),l.setAttribute("transform",`translate(${(s.width-u[0])/2}, ${(s.height-u[1])/2})`),a.appendChild(r),a.appendChild(l),a}return r}})}}const Vm=Math.PI*2,Xr=class{static inwardEdgeNormal(t){const n=Y.sub(t[1],t[0]),r=Y.len2(n);return[-n[0]/r,n[1]/r]}static outwardEdgeNormal(t){return Y.neg(Xr.inwardEdgeNormal(t))}static isReflexVertex(t,n){const r=t.length,i=t[(n+r-1)%r],o=t[n],a=t[(n+1)%r];return Xr.leftSide(i,a,o)<0}static getEdges(t){return t.map((n,r)=>[n,t[(r+1)%t.length]])}static edgesIntersection([t,n],[r,i]){const o=(i[1]-r[1])*(n[0]-t[0])-(i[0]-r[0])*(n[1]-t[1]);if(o==0)return null;const a=((i[0]-r[0])*(t[1]-r[1])-(i[1]-r[1])*(t[0]-r[0]))/o,s=((n[0]-t[0])*(t[1]-r[1])-(n[1]-t[1])*(t[0]-r[0]))/o;return a<0||s<0||a>1||s>1?null:[t[0]+a*(n[0]-t[0]),t[1]+a*(n[1]-t[1])]}static appendArc(t,n,r,i,o,a=!1){const s=[...t];let l=Math.atan2(i[1]-n[1],i[0]-n[0]),c=Math.atan2(o[1]-n[1],o[0]-n[0]);l<0&&(l+=Vm),c<0&&(c+=Vm);const u=5,d=l>c?l-c:l+Vm-c,f=(a?-d:Vm-d)/u;s.push(i);for(let p=1;p<u;++p){const m=l+f*p;s.push([n[0]+Math.cos(m)*r,n[1]+Math.sin(m)*r])}return s.push(o),s}static createOffsetEdge(t,n){return t.map(r=>Y.add(r,n))}static getOffsetPolygon(t,n=0){const r=Xr.getEdges(t),i=r.map(a=>Xr.createOffsetEdge(a,Y.mul(Xr.outwardEdgeNormal(a),n))),o=[];for(let a=0;a<i.length;a++){const s=i[a],l=i[(a+i.length-1)%i.length],c=Xr.edgesIntersection(l,s);c?o.push(c):Xr.appendArc(o,r[a][0],n,l[1],s[0],!1)}return o}static createPaddingPolygon(t,n=0){const r=t.map(o=>Xr.createOffsetEdge(o,Xr.inwardEdgeNormal(o))),i=[];for(let o=0;o<r.length;o++){const a=r[o],s=r[(o+r.length-1)%r.length],l=Xr.edgesIntersection(s,a);l?i.push(l):Xr.appendArc(i,t[o][0],n,s[1],a[0],!0)}return i}};let vx=Xr;S(vx,"leftSide",Y.isLeft);function _8(e,t){if(e.length<3)throw Error("Polygon must have at least 3 points");const n=e.length;return e.map((r,i)=>[r,e[(i+1)%n]]).map(([r,i])=>{const o=Y.mul(Y.per(Y.uni(Y.sub(i,r))),t);return[Y.add(r,o),Y.add(i,o)]}).map((r,i,o)=>{const a=I3e(r,o[(i+1)%o.length]);if(a===void 0)throw Error("Expected an intersection");return a})}function id(e,t=0,n=0){const[r,i]=e;let o=[[r/2,0],[r,i],[0,i]];return t&&(o=_8(o,t)),n&&(o=o.map(a=>Y.rotWith(a,[r/2,i/2],n))),o}function gM(e){const[t,n]=e,r=[[t/2,0],[t,n],[0,n]];return[(r[0][0]+r[1][0]+r[2][0])/3,(r[0][1]+r[1][1]+r[2][1])/3]}function mDe(e,t,n){const[r,i]=t,o=$.rng(e),a=Array.from(Array(3)).map(()=>[o()*n*.75,o()*n*.75]),s=[Y.add([r/2,0],a[0]),Y.add([r,i],a[1]),Y.add([0,i],a[2])],l=Math.round(Math.abs(o()*2*3)),c=$.rotateArray([Y.pointsBetween(s[0],s[1],32),Y.pointsBetween(s[1],s[2],32),Y.pointsBetween(s[2],s[0],32)],l);return{points:[...c.flat(),...c[0]]}}function wW(e,t,n){const{strokeWidth:r}=We(n),{points:i}=mDe(e,t,r);return{points:i,options:{size:r,thinning:.65,streamline:.3,smoothing:1,simulatePressure:!1,last:!0}}}function gDe(e,t,n){const{points:r,options:i}=wW(e,t,n),o=Oc(r,i);return $.getSvgPathFromStroke(o)}function vDe(e,t,n){const{points:r,options:i}=wW(e,t,n),o=sl(r,i);return $.getSvgPathFromStroke(o.map(a=>a.point.slice(0,2)),!1)}function yDe(e,t,n,r){return["M",e[0],e[1],"A",n[2],n[2],0,0,r<0?0:1,t[0],t[1]].join(" ")}function yx(e,t){const{start:n,end:r}=e,i=Y.dist(n.point,r.point),o=Y.med(n.point,r.point),a=i/2*t,s=Y.uni(Y.vec(n.point,r.point));return Y.toFixed(Math.abs(a)<10?o:Y.add(o,Y.mul(Y.per(s),a)))}function bDe(e,t,n,r,i,o){const a=$.rng(e),s=We(t).strokeWidth,l=i?Y.nudge(n,r,s):n,c=o?Y.nudge(r,n,s):r,u=Oc([l,c],{size:s,thinning:.618+a()*.2,easing:H2.easeOutQuad,simulatePressure:!0,streamline:0,last:!0});return $.getSvgPathFromStroke(u)}function xDe(e,t,n,r,i,o,a,s,l,c){const u=$.rng(e),d=We(t).strokeWidth,f=i?Y.rotWith(n,a,d/l):n,p=o?Y.rotWith(r,a,-(d/l)):r,m=Y.angle(a,f),g=Y.angle(a,p),y=[],v=8+Math.floor(Math.abs(l)/20*1+u()/2);for(let x=0;x<v;x++){const w=c(x/v),E=$.lerpAngles(m,g,w);y.push(Y.toFixed(Y.nudgeAtAngle(a,E,s)))}const b=Oc([f,...y,p],{size:1+d,thinning:.618+u()*.2,easing:H2.easeOutQuad,simulatePressure:!1,streamline:0,last:!0});return $.getSvgPathFromStroke(b)}function od(e,t,n){return $.circleFromThreePoints(e,n,t)}function V4(e,t,n,r,i){const o=H3e(e,t*.618,n,r).points;if(!o)return Q.warn("Could not find an intersection for the arrow head."),{left:e,right:e};const a=i?o[0]:o[1],s=a?Y.nudge(Y.rotWith(a,e,Math.PI/6),e,t*-.382):e,l=a?Y.nudge(Y.rotWith(a,e,-Math.PI/6),e,t*-.382):e;return{left:s,right:l}}function W4(e,t,n){const r=j3e(e,n,e,t).points;if(!r)return Q.warn("Could not find an intersection for the arrow head."),{left:e,right:e};const i=r[0],o=i?Y.rotWith(i,e,Math.PI/6):e,a=i?Y.rotWith(i,e,-Math.PI/6):e;return{left:o,right:a}}function vM(e,t,n,r,i){const{left:o,right:a}=V4(e,t,n,r,i);return`M ${o} L ${e} ${a}`}function yM(e,t,n){const{left:r,right:i}=W4(e,t,n);return`M ${r} L ${e} ${i}`}function SDe(e,t,n,r,i,o){const{strokeWidth:a}=We(e,!1),s=Y.dist(t,r),l=Math.min(s/3,a*8),c=[];if(Y.dist(n,Y.toFixed(Y.med(t,r)))<1)c.push(`M ${t} L ${r}`),i&&c.push(yM(t,r,l)),o&&c.push(yM(r,t,l));else{const d=od(t,n,r),f=[d[0],d[1]],p=d[2],m=Dv(f,p,t,r);c.push(`M ${t} A ${p} ${p} 0 0 ${m>0?"1":"0"} ${r}`),i&&c.push(vM(t,l,f,p,m<0)),o&&c.push(vM(r,l,f,p,m>=0))}return c.join(" ")}function Wm(e,t,n){if(Y.dist2(t,Y.med(e,n))<=4)return[e,n];const r=[],i=od(e,t,n),o=[i[0],i[1]],a=i[2],s=Y.angle(o,e),l=Y.angle(o,n);for(let c=1/20;c<1;c+=1/20){const u=$.lerpAngles(s,l,c);r.push(Y.nudgeAtAngle(o,u,a))}return r}function wDe(e,t,n){if(n===e||n===t)return!0;const r=Math.PI*2,i=(t-e+r)%r,o=(n-e+r)%r;return i<=Math.PI!=o>i}function Dv(e,t,n,r){const i=$.getSweep(e,n,r);return t*(2*Math.PI)*(i/(2*Math.PI))}function Av({left:e,middle:t,right:n,stroke:r,strokeWidth:i}){return Z("g",{children:[k("path",{className:"tl-stroke-hitarea",d:`M ${e} L ${t} ${n}`}),k("path",{d:`M ${e} L ${t} ${n}`,fill:"none",stroke:r,strokeWidth:i,strokeLinecap:"round",strokeLinejoin:"round",pointerEvents:"none"})]})}const CDe=h.exports.memo(function({id:t,style:n,start:r,bend:i,end:o,arrowBend:a,decorationStart:s,decorationEnd:l,isDraw:c,isDarkMode:u}){const d=Y.dist(r,o);if(d<2)return null;const f=We(n,u),{strokeWidth:p}=f,m=1+p*1.618,g=od(r,i,o),y=[g[0],g[1]],v=g[2],b=Dv(y,v,r,o),x=$.rng(t),w=H2[x()>0?"easeInOutSine":"easeInOutCubic"],E=c?xDe(t,n,r,o,s,l,y,v,b,w):yDe(r,o,g,a),{strokeDasharray:C,strokeDashoffset:I}=$.getPerfectDashProps(Math.abs(b),m,n.dash,2,!1),T=Math.min(d/3,p*8),_=s?V4(r,T,y,v,b<0):null,P=l?V4(o,T,y,v,b>=0):null;return Z(Pe,{children:[k("path",{className:"tl-stroke-hitarea",d:E}),k("path",{d:E,fill:c?f.stroke:"none",stroke:f.stroke,strokeWidth:c?0:m,strokeDasharray:C,strokeDashoffset:I,strokeLinecap:"round",strokeLinejoin:"round",pointerEvents:"none"}),_&&k(Av,{left:_.left,middle:r,right:_.right,stroke:f.stroke,strokeWidth:m}),P&&k(Av,{left:P.left,middle:o,right:P.right,stroke:f.stroke,strokeWidth:m})]})}),kDe=h.exports.memo(function({id:t,style:n,start:r,end:i,decorationStart:o,decorationEnd:a,isDraw:s,isDarkMode:l}){const c=Y.dist(r,i);if(c<2)return null;const u=We(n,l),{strokeWidth:d}=u,f=1+d*1.618,p=s?bDe(t,n,r,i,o,a):"M"+Y.toFixed(r)+"L"+Y.toFixed(i),{strokeDasharray:m,strokeDashoffset:g}=$.getPerfectDashProps(c,d*1.618,n.dash,2,!1),y=Math.min(c/3,d*8),v=o?W4(r,i,y):null,b=a?W4(i,r,y):null;return Z(Pe,{children:[k("path",{className:"tl-stroke-hitarea",d:p}),k("path",{d:p,fill:u.stroke,stroke:u.stroke,strokeWidth:s?f/2:f,strokeDasharray:m,strokeDashoffset:g,strokeLinecap:"round",strokeLinejoin:"round",pointerEvents:"stroke"}),v&&k(Av,{left:v.left,middle:r,right:v.right,stroke:u.stroke,strokeWidth:f}),b&&k(Av,{left:b.left,middle:i,right:b.right,stroke:u.stroke,strokeWidth:f})]})});class EDe extends Fe{constructor(){super(...arguments);S(this,"type",U.Arrow);S(this,"hideBounds",!0);S(this,"canEdit",!0);S(this,"pathCache",new WeakMap);S(this,"getShape",n=>{var r,i,o,a;return{id:"id",type:U.Arrow,name:"Arrow",parentId:"page",childIndex:1,point:[0,0],rotation:0,bend:0,handles:{start:{id:"start",index:0,point:[0,0],canBind:!0,...(r=n.handles)==null?void 0:r.start},end:{id:"end",index:1,point:[1,1],canBind:!0,...(i=n.handles)==null?void 0:i.end},bend:{id:"bend",index:2,point:[.5,.5],...(o=n.handles)==null?void 0:o.bend}},decorations:(a=n.decorations)!=null?a:{end:nd.Arrow},style:{...dr,isFilled:!1,...n.style},label:"",labelPoint:[.5,.5],...n}});S(this,"Component",Fe.Component(({shape:n,isEditing:r,isGhost:i,meta:o,events:a,onShapeChange:s,onShapeBlur:l},c)=>{const{id:u,label:d="",handles:{start:f,bend:p,end:m},decorations:g={},style:y}=n,v=O.dist(p.point,O.toFixed(O.med(f.point,m.point)))<1,b=oa(y),x=We(y),w=d||r?Rv(d,b):[0,0],E=this.getBounds(n),C=h.exports.useMemo(()=>{const{start:M,bend:D,end:V}=n.handles;if(v)return O.dist(M.point,V.point);const B=od(M.point,D.point,V.point),L=B.slice(0,2),G=B[2],z=Dv(L,G,M.point,V.point);return Math.abs(z)},[n.handles]),I=Math.max(.5,Math.min(1,Math.max(C/(w[1]+128),C/(w[0]+128)))),T=h.exports.useMemo(()=>{const M=this.getBounds(n);return O.sub(n.handles.bend.point,[M.width/2,M.height/2])},[n,I]),_=h.exports.useCallback(M=>{s==null||s({id:u,label:M})},[s]),P=v?kDe:CDe;return Z(IDe,{ref:c,...a,isLinked:!!(n!=null&&n.link),children:[k(of,{font:b,text:d,color:x.stroke,offsetX:T[0],offsetY:T[1],scale:I,isEditing:r,onChange:_,onBlur:l}),Z(Hr,{id:n.id+"_svg",children:[k("defs",{children:Z("mask",{id:n.id+"_clip",children:[k("rect",{x:-100,y:-100,width:E.width+200,height:E.height+200,fill:"white"}),k("rect",{x:E.width/2-w[0]/2*I+T[0],y:E.height/2-w[1]/2*I+T[1],width:w[0]*I,height:w[1]*I,rx:4*I,ry:4*I,fill:"black",opacity:Math.max(I,.9)})]})}),k("g",{pointerEvents:"none",opacity:i?pr:1,mask:d||r?`url(#${n.id}_clip)`:"",children:k(P,{id:u,style:y,start:f.point,end:m.point,bend:p.point,arrowBend:n.bend,decorationStart:g==null?void 0:g.start,decorationEnd:g==null?void 0:g.end,isDraw:y.dash===It.Draw,isDarkMode:o.isDarkMode})})]})]})}));S(this,"Indicator",Fe.Indicator(({shape:n,bounds:r})=>{const{style:i,decorations:o,label:a,handles:{start:s,bend:l,end:c}}=n,u=oa(i),d=a?Rv(a,u):[0,0],f=O.dist(l.point,O.toFixed(O.med(s.point,c.point)))<1,p=h.exports.useMemo(()=>{const{start:y,bend:v,end:b}=n.handles;if(f)return O.dist(y.point,b.point);const x=od(y.point,v.point,b.point),w=x.slice(0,2),E=x[2],C=Dv(w,E,y.point,b.point);return Math.abs(C)},[n.handles]),m=Math.max(.5,Math.min(1,Math.max(p/(d[1]+128),p/(d[0]+128)))),g=h.exports.useMemo(()=>{const y=this.getBounds(n);return O.sub(n.handles.bend.point,[y.width/2,y.height/2])},[n,m]);return Z(Pe,{children:[k(hDe,{id:n.id,scale:m,offset:g,bounds:r,labelSize:d}),k("path",{d:SDe(i,s.point,l.point,c.point,o==null?void 0:o.start,o==null?void 0:o.end),mask:a?`url(#${n.id}_clip)`:""}),a&&k("rect",{x:r.width/2-d[0]/2*m+g[0],y:r.height/2-d[1]/2*m+g[1],width:d[0]*m,height:d[1]*m,rx:4*m,ry:4*m,fill:"transparent"})]})}));S(this,"getBounds",n=>{const r=$.getFromCache(this.boundsCache,n,()=>{const{handles:{start:i,bend:o,end:a}}=n;return $.getBoundsFromPoints(Wm(i.point,o.point,a.point))});return $.translateBounds(r,n.point)});S(this,"getRotatedBounds",n=>{const{handles:{start:r,bend:i,end:o}}=n;let a=Wm(r.point,i.point,o.point);const{minX:s,minY:l,maxX:c,maxY:u}=$.getBoundsFromPoints(a);return n.rotation!==0&&(a=a.map(d=>O.rotWith(d,[(s+c)/2,(l+u)/2],n.rotation||0))),$.translateBounds($.getBoundsFromPoints(a),n.point)});S(this,"getCenter",n=>{const{start:r,end:i}=n.handles;return O.add(n.point,O.med(r.point,i.point))});S(this,"shouldRender",(n,r)=>r.decorations!==n.decorations||r.handles!==n.handles||r.style!==n.style||r.label!==n.label);S(this,"hitTestPoint",(n,r)=>{const{handles:{start:i,bend:o,end:a}}=n,s=O.sub(r,n.point),l=Wm(i.point,o.point,a.point);for(let c=1;c<l.length;c++)if(O.distanceToLineSegment(l[c-1],l[c],s)<1)return!0;return!1});S(this,"hitTestLineSegment",(n,r,i)=>{const{handles:{start:o,bend:a,end:s}}=n,l=O.sub(r,n.point),c=O.sub(i,n.point),u=Wm(o.point,a.point,s.point);for(let d=1;d<u.length;d++)if(o1(u[d-1],u[d],l,c).didIntersect)return!0;return!1});S(this,"hitTestBounds",(n,r)=>{const{start:i,end:o,bend:a}=n.handles,s=O.add(n.point,i.point),l=O.add(n.point,o.point);if($.pointInBounds(s,r)||$.pointInBounds(l,r))return!0;if(O.isEqual(O.med(i.point,o.point),a.point))return B6(s,l,r).length>0;{const[c,u,d]=od(i.point,a.point,o.point),f=O.add(n.point,[c,u]);return z3e(f,d,s,l,r).length>0}});S(this,"transform",(n,r,{initialShape:i,scaleX:o,scaleY:a})=>{const s=this.getBounds(i),l=["start","end"],c={...i.handles};l.forEach(b=>{const[x,w]=c[b].point,E=x/s.width,C=w/s.height;c[b]={...c[b],point:[r.width*(o<0?1-E:E),r.height*(a<0?1-C:C)]}});const{start:u,bend:d,end:f}=c,p=O.dist(u.point,f.point),m=O.med(u.point,f.point),g=p/2*i.bend,y=O.uni(O.vec(u.point,f.point)),v=O.add(m,O.mul(O.per(y),g));return c.bend={...d,point:O.toFixed(Math.abs(g)<10?m:v)},{point:O.toFixed([r.minX,r.minY]),handles:c}});S(this,"onDoubleClickHandle",(n,r)=>{var i,o;switch(r){case"bend":return{bend:0,handles:{...n.handles,bend:{...n.handles.bend,point:yx(n.handles,n.bend)}}};case"start":return{decorations:{...n.decorations,start:(i=n.decorations)!=null&&i.start?void 0:nd.Arrow}};case"end":return{decorations:{...n.decorations,end:(o=n.decorations)!=null&&o.end?void 0:nd.Arrow}}}return this});S(this,"onBindingChange",(n,r,i,o,a,s)=>{const l=n.handles[r.handleId];let c=O.sub(O.add([a.minX,a.minY],O.mulV([a.width,a.height],O.rotWith(r.point,[.5,.5],i.rotation||0))),n.point);if(r.distance){const u=$.expandBounds(o,r.distance),d=O.add(n.point,n.handles[l.id==="start"?"end":"start"].point),f=O.uni(O.sub(O.add(c,n.point),d));if(i.type===U.Ellipse){const p=Zz(d,f,s,i.radius[0]+r.distance,i.radius[1]+r.distance,i.rotation||0).points.sort((m,g)=>O.dist(m,d)-O.dist(g,d));p[0]&&(c=O.sub(p[0],n.point))}else if(i.type===U.Triangle){const p=id(i.size,fr,i.rotation).map(y=>O.add(y,i.point)),g=$.pointsToLineSegments(p,!0).map(y=>i1(d,f,y[0],y[1])).filter(y=>y.didIntersect).flatMap(y=>y.points).sort((y,v)=>O.dist(y,d)-O.dist(v,d));g[0]&&(c=O.sub(g[0],n.point))}else{let p=n4(d,f,u,i.rotation).filter(m=>m.didIntersect).map(m=>m.points[0]).sort((m,g)=>O.dist(m,d)-O.dist(g,d));p.length<2&&(p=n4(d,O.neg(f),u).filter(m=>m.didIntersect).map(m=>m.points[0]).sort((m,g)=>O.dist(m,d)-O.dist(g,d))),p[0]&&(c=O.sub(p[0],n.point))}}return this.onHandleChange(n,{[l.id]:{...l,point:O.toFixed(c)}})});S(this,"onHandleChange",(n,r)=>{let i=$.deepMerge(n.handles,r),o=n.bend;if(i={...i,start:{...i.start,point:O.toFixed(i.start.point)},end:{...i.end,point:O.toFixed(i.end.point)}},"bend"in r){const{start:u,end:d,bend:f}=i,p=O.dist(u.point,d.point),m=O.med(u.point,d.point),g=O.angle(u.point,d.point),y=O.uni(O.vec(u.point,d.point)),v=O.add(m,O.mul(O.per(y),p/2)),b=O.sub(m,O.mul(O.per(y),p/2)),x=O.nearestPointOnLineSegment(v,b,f.point,!0),w=O.dist(m,x);o=$.clamp(w/(p/2),-.99,.99);const E=O.angle(u.point,x);O.isEqual(m,yx(i,o))?o=0:wDe(g,g+Math.PI,E)&&(o*=-1)}const a={point:n.point,bend:o,handles:{...i,bend:{...i.bend,point:yx(i,o)}}},s=n.point,l=this.getBounds({...a}),c=O.sub([l.minX,l.minY],s);return O.isEqual(c,[0,0])||(Object.values(a.handles).forEach(u=>{u.point=O.toFixed(O.sub(u.point,c))}),a.point=O.toFixed(O.add(a.point,c))),a})}}const IDe=be("div",{width:"100%",height:"100%",variants:{isLinked:{true:{pointerEvents:"all",cursor:"pointer"},false:{}}}});class TDe extends Fe{constructor(){super(...arguments);S(this,"type",U.Block);S(this,"canBind",!0);S(this,"canClone",!0);S(this,"isAspectRatioLocked",!1);S(this,"hideResizeHandles",!1);S(this,"showCloneHandles",!1);S(this,"block");S(this,"getShape",n=>{var r,i,o,a;return $.deepMerge({id:"block",type:U.Block,name:"Block",parentId:"page",childIndex:1,point:[0,0],size:[1,1],rotation:0,style:{...dr,isFilled:!0},assetId:"assetId",maxHeight:(r=n.maxHeight)!=null?r:1/0,maxWidth:(i=n.maxWidth)!=null?i:1/0,minHeight:(o=n.minHeight)!=null?o:0,minWidth:(a=n.minWidth)!=null?a:0,asset:n.asset},n)});S(this,"Component",Fe.Component((n,r)=>{const{shape:i,isBinding:o,events:a,isGhost:s,meta:l}=n,c=at(),{size:u,asset:d={src:""}}=i;if(!d.block)return console.error("Block failed to load correctly"),k(Pe,{});const f=d.block;this.block=f;const p=h.exports.useRef(null),[m,g]=h.exports.useState();h.exports.useEffect(()=>{if(JSON.stringify(f)!==JSON.stringify(m)){g(f),this.block=f;const v=S7e(f);this.isAspectRatioLocked=!v,this.hideResizeHandles=!v;const{maxWidth:b,maxHeight:x,minHeight:w,minWidth:E,size:C}=this.latestShape(i);c.updateShapes({id:i.id,maxWidth:b,maxHeight:x,minHeight:w,minWidth:E,size:C})}},[u,f]);const y=h.exports.useMemo(()=>{const v={...f,shapeId:i.id};switch(v.blockType){case Tt.MASK:return k(MH,{...v,ref:p});case Tt.ICON:return k(OH,{...v,ref:p});case Tt.BOOK:case Tt.DEFAULT:return k(n6e,{...v,ref:p});default:return k(Pe,{})}},[f]);return Z(l1,{ref:r,...a,children:[o&&k("div",{className:"tl-binding-indicator",style:{position:"absolute",top:`calc(${-this.bindingDistance}px * var(--tl-zoom))`,left:`calc(${-this.bindingDistance}px * var(--tl-zoom))`,width:`calc(100% + ${this.bindingDistance*2}px * var(--tl-zoom))`,height:`calc(100% + ${this.bindingDistance*2}px * var(--tl-zoom))`,backgroundColor:"rgba(65, 132, 244, 0.05)"}}),k(_De,{ref:p,isDarkMode:l.isDarkMode,isGhost:s,className:"block-util-wrapper",children:y})]})}));S(this,"Indicator",Fe.Indicator(({shape:n})=>{const{size:[r,i]}=n;return k("rect",{x:0,y:0,rx:2,ry:2,width:Math.max(1,r),height:Math.max(1,i),className:"indicator"})}));S(this,"getBounds",n=>qa(n,this.boundsCache));S(this,"shouldRender",(n,r)=>r.size!==n.size||r.style!==n.style);S(this,"latestShape",(n,r)=>{if(this.block){const[i,o]=x7e(this.block),[a,s]=e8(this.block),l=i/o,c=(r==null?void 0:r.length)===2?r:n.size,u=Fg(s,c[1],o),d=l*u;return{...n,maxWidth:i,maxHeight:o,minWidth:a,minHeight:s,size:[d,u]}}else return console.error("No block on Block"),n});S(this,"transform",(n,r,i)=>fDe(this.latestShape(n),r,i));S(this,"transformSingle",(n,r)=>pDe(this.latestShape(n),r));S(this,"getSvgElement",n=>{const r=this.getBounds(n),i=document.createElementNS("http://www.w3.org/2000/svg","block");return i.classList.add("svgElement"),i.setAttribute("width",`${r.width}`),i.setAttribute("height",`${r.height}`),i.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),i})}}const _De=Rc("div",{pointerEvents:"all",position:"relative",height:"100%",width:"100%",overflow:"hidden",p:{userSelect:"none"},img:{userSelect:"none"},variants:{isGhost:{false:{opacity:1},true:{transition:"opacity .2s",opacity:pr}},isFilled:{true:{},false:{}},isDarkMode:{true:{},false:{}}},compoundVariants:[{isFilled:!0,isDarkMode:!0,css:{boxShadow:"2px 3px 12px -2px rgba(0,0,0,.3), 1px 1px 4px rgba(0,0,0,.3), 1px 1px 2px rgba(0,0,0,.3)"}},{isFilled:!0,isDarkMode:!1,css:{boxShadow:"2px 3px 12px -2px rgba(0,0,0,.2), 1px 1px 4px rgba(0,0,0,.16),  1px 1px 2px rgba(0,0,0,.16)"}}]});function Lu(e,t=0,n=0){const[r,i]=e;let o=[[0,i/2],[r/2,i],[r,i/2],[r/2,0]];return t&&(o=_8(o,t)),n&&(o=o.map(a=>Y.rotWith(a,[r/2,i/2],n))),o}function bM(e){const[t,n]=e,r=[[0,n/2],[t/2,n],[t,n/2],[t/2,0]];return[(r[0][0]+r[1][0]+r[2][0]+r[3][0])/4,(r[0][1]+r[1][1]+r[2][1])/3]}function PDe(e,t,n){const[r,i]=t,o=$.rng(e),a=Array.from(Array(4)).map(()=>[o()*n*.75,o()*n*.75]),s=[Y.add([0,i/2],a[0]),Y.add([r/2,i],a[1]),Y.add([r,i/2],a[2]),Y.add([r/2,0],a[3])],l=Math.round(Math.abs(o()*2*3)),c=$.rotateArray([Y.pointsBetween(s[0],s[1],32),Y.pointsBetween(s[1],s[2],32),Y.pointsBetween(s[2],s[3],32),Y.pointsBetween(s[3],s[0],32)],l);return{points:[...c.flat(),...c[0]]}}function CW(e,t,n){const{strokeWidth:r}=We(n),{points:i}=PDe(e,t,r);return{points:i,options:{size:r,thinning:.65,streamline:.3,smoothing:1,simulatePressure:!1,last:!0}}}function ODe(e,t,n){const{points:r,options:i}=CW(e,t,n),o=Oc(r,i);return $.getSvgPathFromStroke(o)}function MDe(e,t,n){const{points:r,options:i}=CW(e,t,n),o=sl(r,i);return $.getSvgPathFromStroke(o.map(a=>a.point.slice(0,2)),!1)}const RDe=h.exports.memo(function({id:t,size:n,style:r,isSelected:i,isDarkMode:o}){const{stroke:a,strokeWidth:s,fill:l}=We(r,o),c=1+s*1.618,u=Lu(n),f=$.pointsToLineSegments(u,!0).map(([m,g],y)=>{const{strokeDasharray:v,strokeDashoffset:b}=$.getPerfectDashProps(Y.dist(m,g),s*1.618,r.dash);return k("line",{x1:m[0],y1:m[1],x2:g[0],y2:g[1],stroke:a,strokeWidth:c,strokeLinecap:"round",strokeDasharray:v,strokeDashoffset:b},t+"_"+y)}),p=u.join();return Z(Pe,{children:[k("polygon",{className:r.isFilled||i?"tl-fill-hitarea":"tl-stroke-hitarea",points:p}),r.isFilled&&k("polygon",{fill:l,points:p,pointerEvents:"none"}),k("g",{pointerEvents:"stroke",children:f})]})});function DDe({size:e}){const t=Lu(e).join();return k("polygon",{className:"tl-binding-indicator",points:t,strokeWidth:fr*2})}const ADe=h.exports.memo(function({id:t,size:n,style:r,isSelected:i,isDarkMode:o}){const{stroke:a,strokeWidth:s,fill:l}=We(r,o),c=ODe(t,n,r),u=MDe(t,n,r);return Z(Pe,{children:[k("path",{className:r.isFilled||i?"tl-fill-hitarea":"tl-stroke-hitarea",d:u}),r.isFilled&&k("path",{d:u,fill:l,pointerEvents:"none"}),k("path",{d:c,fill:a,stroke:a,strokeWidth:s,pointerEvents:"none"})]})});class LDe extends Fe{constructor(){super(...arguments);S(this,"type",U.Diamond);S(this,"canBind",!0);S(this,"canClone",!0);S(this,"canEdit",!0);S(this,"getShape",n=>$.deepMerge({id:"id",type:U.Diamond,name:"Diamond",parentId:"page",childIndex:1,point:[0,0],size:[1,1],rotation:0,style:dr,label:"",labelPoint:[.5,.5]},n));S(this,"Component",Fe.Component(({shape:n,bounds:r,isBinding:i,isEditing:o,isSelected:a,isGhost:s,meta:l,events:c,onShapeChange:u,onShapeBlur:d},f)=>{const{id:p,label:m="",size:g,style:y,labelPoint:v=h1}=n,b=oa(y),x=We(y),w=y.dash===It.Draw?ADe:RDe,E=h.exports.useCallback(C=>u==null?void 0:u({id:p,label:C}),[u]);return h.exports.useMemo(()=>{const C=Y.div(g,2);return(bM(g)[1]-C[1])*.72},[g]),Z(BDe,{ref:f,...c,isLinked:!!(n!=null&&n.link),children:[k(of,{isEditing:o,onChange:E,onBlur:d,font:b,text:m,color:x.stroke,offsetX:(v[0]-.5)*r.width,offsetY:(v[1]-.5)*r.height}),Z(Hr,{id:n.id+"_svg",opacity:s?pr:1,children:[i&&k(DDe,{size:g}),k(w,{id:p,style:y,size:g,isSelected:a,isDarkMode:l.isDarkMode})]})]})}));S(this,"Indicator",Fe.Indicator(({shape:n})=>{const{size:r}=n;return k("polygon",{points:Lu(r).join()})}));S(this,"shouldRender",(n,r)=>r.size!==n.size||r.style!==n.style||r.label!==n.label);S(this,"getBounds",n=>qa(n,this.boundsCache));S(this,"getExpandedBounds",n=>$.getBoundsFromPoints(Lu(n.size,this.bindingDistance).map(r=>Y.add(r,n.point))));S(this,"hitTestLineSegment",(n,r,i)=>a1(r,i,this.getPoints(n)).didIntersect);S(this,"hitTestBounds",(n,r)=>$.boundsContained(this.getBounds(n),r)||$6(r,this.getPoints(n)).length>0);S(this,"getBindingPoint",(n,r,i,o,a,s)=>{const l=this.getExpandedBounds(n);if(!$.pointInBounds(i,l))return;const c=Lu(n.size).map(x=>Y.add(x,n.point)),u=Lu(n.size,this.bindingDistance).map(x=>Y.add(x,n.point)),d=$.pointsToLineSegments(c,!0).map(([x,w])=>Y.distanceToLineSegment(x,w,i)).sort((x,w)=>x-w)[0];if(!($.pointInPolygon(i,u)||d<this.bindingDistance))return;const f=$.pointsToLineSegments(u.concat([u[0]])).map(x=>i1(o,a,x[0],x[1])).filter(x=>x.didIntersect).flatMap(x=>x.points);if(!f.length)return;const p=Y.add(bM(n.size),n.point),m=f.sort((x,w)=>Y.dist(w,o)-Y.dist(x,o))[0],g=Y.med(i,m);let y,v;s?(y=Y.dist(i,p)<fr/2?p:i,v=0):(Y.distanceToLineSegment(i,g,p)<fr/2?y=p:y=g,$.pointInPolygon(i,c)?v=this.bindingDistance:v=Math.max(this.bindingDistance,d));const b=Y.divV(Y.sub(y,[l.minX,l.minY]),[l.width,l.height]);return{point:Y.clampV(b,0,1),distance:v}});S(this,"transform",nf);S(this,"transformSingle",rf)}getPoints(n){const{rotation:r=0,point:[i,o],size:[a,s]}=n;return[[0,s/2],[a/2,s],[a,s/2],[a/2,0]].map(l=>Y.rotWith(l,this.getCenter(n),r))}}const BDe=be("div",{width:"100%",height:"100%",variants:{isLinked:{true:{pointerEvents:"all",cursor:"pointer"},false:{}}}}),$De={easing:e=>Math.sin(e*Math.PI/2),simulatePressure:!0},FDe={easing:e=>e*e,simulatePressure:!1};function P8(e){const t=We(e.style);return{size:1+t.strokeWidth*1.5,thinning:.65,streamline:.65,smoothing:.65,...e.points[1][2]===.5?$De:FDe,last:e.isComplete}}function NDe(e){return e.points.length<2?"":$.getSvgPathFromStroke(sl(e.points,P8(e)).map(t=>t.point))}function kW(e,t){return sl(e.points,t)}function zDe(e){if(e.points.length<2)return"";const t=P8(e),n=kW(e,t);return $.getSvgPathFromStroke(R6(n,t))}function xM(e){const{points:t}=e;if(t.length<2)return"M 0 0 L 0 0";const n=P8(e),r=kW(e,n).map(a=>a.point.slice(0,2)),i=t[t.length-1].slice(0,2);return Y.isEqual(r[0],i)||r.push(i),$.getSvgPathFromStroke(r,!1)}class jDe extends Fe{constructor(){super(...arguments);S(this,"type",U.Draw);S(this,"pointsBoundsCache",new WeakMap([]));S(this,"shapeBoundsCache",new Map);S(this,"rotatedCache",new WeakMap([]));S(this,"pointCache",{});S(this,"canClone",!0);S(this,"getShape",n=>$.deepMerge({id:"id",type:U.Draw,name:"Draw",parentId:"page",childIndex:1,point:[0,0],rotation:0,style:dr,points:[],isComplete:!1},n));S(this,"Component",Fe.Component(({shape:n,meta:r,isSelected:i,isGhost:o,events:a},s)=>{const{points:l,style:c,isComplete:u}=n,d=h.exports.useMemo(()=>NDe(n),[l,c.size]),f=h.exports.useMemo(()=>c.dash===It.Draw?zDe(n):xM(n),[l,c.size,c.dash,u]),p=We(c,r.isDarkMode),{stroke:m,fill:g,strokeWidth:y}=p,v=this.getBounds(n);if(v.width<=y/2&&v.height<=y/2){const I=1+y;return k(Hr,{ref:s,id:n.id+"_svg",...a,children:k("circle",{r:I,fill:m,stroke:m,pointerEvents:"all",opacity:o?pr:1})})}const x=c.isFilled&&l.length>3&&O.dist(l[0],l[l.length-1])<y*2;if(n.style.dash===It.Draw)return k(Hr,{ref:s,id:n.id+"_svg",...a,cursor:n.link?"pointer":"default",children:Z("g",{opacity:o?pr:1,children:[k("path",{className:x||i?"tl-fill-hitarea":"tl-stroke-hitarea",d:f}),x&&k("path",{d,stroke:"none",fill:g,strokeLinejoin:"round",strokeLinecap:"round",pointerEvents:"none"}),k("path",{d:f,fill:m,stroke:m,strokeWidth:y/2,strokeLinejoin:"round",strokeLinecap:"round",pointerEvents:"none"})]})});const w={[It.Draw]:"none",[It.Solid]:"none",[It.Dotted]:`0.1 ${y*4}`,[It.Dashed]:`${y*4} ${y*4}`}[c.dash],E={[It.Draw]:"none",[It.Solid]:"none",[It.Dotted]:"0",[It.Dashed]:"0"}[c.dash],C=1+y*1.5;return k(Hr,{ref:s,id:n.id+"_svg",...a,children:Z("g",{opacity:o?pr:1,children:[k("path",{className:x&&i?"tl-fill-hitarea":"tl-stroke-hitarea",d:f}),k("path",{d:f,fill:x?g:"none",stroke:"none",strokeWidth:Math.min(4,y*2),strokeLinejoin:"round",strokeLinecap:"round",pointerEvents:"none"}),k("path",{d:f,fill:"none",stroke:m,strokeWidth:C,strokeDasharray:w,strokeDashoffset:E,strokeLinejoin:"round",strokeLinecap:"round",pointerEvents:"none"})]})})}));S(this,"Indicator",Fe.Indicator(({shape:n})=>{const{points:r}=n,i=h.exports.useMemo(()=>xM(n),[r]),o=this.getBounds(n);return o.width<4&&o.height<4?k("circle",{x:o.width/2,y:o.height/2,r:1}):k("path",{d:i})}));S(this,"transform",(n,r,{initialShape:i,scaleX:o,scaleY:a})=>{const s=$.getFromCache(this.boundsCache,i,()=>$.getBoundsFromPoints(i.points)),l=i.points.map(([d,f,p])=>[r.width*(o<0?1-d/s.width:d/s.width),r.height*(a<0?1-f/s.height:f/s.height),p]),c=$.getBoundsFromPoints(n.points),u=O.sub([r.minX,r.minY],[c.minX,c.minY]);return{points:l,point:u}});S(this,"getBounds",n=>{const r=!this.pointsBoundsCache.has(n.points),i=this.pointCache[n.id]!==n.point;if(r){const o=$.getBoundsFromPoints(n.points);this.pointsBoundsCache.set(n.points,o),this.shapeBoundsCache.set(n.id,$.translateBounds(o,n.point)),this.pointCache[n.id]=n.point}else i&&!r&&(this.pointCache[n.id]=n.point,this.shapeBoundsCache.set(n.id,$.translateBounds(this.pointsBoundsCache.get(n.points),n.point)));return this.shapeBoundsCache.get(n.id)});S(this,"shouldRender",(n,r)=>r.points!==n.points||r.style!==n.style||r.isComplete!==n.isComplete);S(this,"hitTestPoint",(n,r)=>{const i=O.sub(r,n.point);return $.pointInPolyline(i,n.points)});S(this,"hitTestLineSegment",(n,r,i)=>{const{points:o,point:a}=n,s=O.sub(r,a),l=O.sub(i,a),c=this.getBounds(n);if(o.length<=2)return O.distanceToLineSegment(r,i,n.point)<4;if(B6(s,l,c)){for(let u=1;u<o.length;u++)if(o1(o[u-1],o[u],s,l).didIntersect)return!0}return!1});S(this,"hitTestBounds",(n,r)=>{if(!n.rotation){const a=this.getBounds(n);return $.boundsContain(r,a)||($.boundsContain(a,r)||K3e(a,r).length>0)&&oP($.translateBounds(r,O.neg(n.point)),n.points).length>0}const i=this.getRotatedBounds(n),o=$.getFromCache(this.rotatedCache,n,()=>{const a=$.getBoundsCenter($.getBoundsFromPoints(n.points));return n.points.map(s=>O.rotWith(s,a,n.rotation||0))});return $.boundsContain(r,i)||oP($.translateBounds(r,O.neg(n.point)),o).length>0})}}const HDe=h.exports.memo(function({radius:t,style:n,isSelected:r,isDarkMode:i}){const{stroke:o,strokeWidth:a,fill:s}=We(n,i),l=1+a*1.618,c=Math.max(0,t[0]-l/2),u=Math.max(0,t[1]-l/2),d=$.perimeterOfEllipse(c,u),{strokeDasharray:f,strokeDashoffset:p}=$.getPerfectDashProps(d<64?d*2:d,a*1.618,n.dash,4);return Z(Pe,{children:[k("ellipse",{className:n.isFilled||r?"tl-fill-hitarea":"tl-stroke-hitarea",cx:t[0],cy:t[1],rx:t[0],ry:t[1]}),k("ellipse",{cx:t[0],cy:t[1],rx:c,ry:u,fill:s,stroke:o,strokeWidth:l,strokeDasharray:f,strokeDashoffset:p,pointerEvents:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})});function EW(e,t,n){const{strokeWidth:r}=We(n),i=$.rng(e),o=t[0]+i()*r*2,a=t[1]+i()*r*2,s=$.perimeterOfEllipse(o,a),l=[],c=Math.PI+Math.PI*i(),u=Math.abs(i()),d=Math.max(16,s/10);for(let f=0;f<d;f++){const p=H2.easeInOutSine(f/(d+1)),m=c*2+Math.PI*(2+u)*p,g=Math.cos(m),y=Math.sin(m);l.push([o*g+t[0],a*y+t[1],p+.5+i()/2])}return sl(l,{size:1+r*2,thinning:.618,end:{taper:s/8},start:{taper:s/12},streamline:0,simulatePressure:!0})}function VDe(e,t,n){const{strokeWidth:r}=We(n),i=$.rng(e),o=t[0]+i()*r*2,a=t[1]+i()*r*2,s=$.perimeterOfEllipse(o,a);return $.getSvgPathFromStroke(R6(EW(e,t,n),{size:2+r*2,thinning:.618,end:{taper:s/8},start:{taper:s/12},streamline:0,simulatePressure:!0}))}function IW(e,t,n){return $.getSvgPathFromStroke(EW(e,t,n).map(r=>r.point.slice(0,2)),!1)}const WDe=h.exports.memo(function({id:t,radius:n,style:r,isSelected:i,isDarkMode:o}){const{stroke:a,strokeWidth:s,fill:l}=We(r,o),c=VDe(t,n,r);return Z(Pe,{children:[k("ellipse",{className:r.isFilled||i?"tl-fill-hitarea":"tl-stroke-hitarea",cx:n[0],cy:n[1],rx:n[0],ry:n[1]}),r.isFilled&&k("path",{d:IW(t,n,r),stroke:"none",fill:l,pointerEvents:"none"}),k("path",{d:c,fill:a,stroke:a,strokeWidth:s,pointerEvents:"none",strokeLinecap:"round",strokeLinejoin:"round"})]})});class UDe extends Fe{constructor(){super(...arguments);S(this,"type",U.Ellipse);S(this,"canBind",!0);S(this,"canClone",!0);S(this,"canEdit",!0);S(this,"getShape",n=>$.deepMerge({id:"id",type:U.Ellipse,name:"Ellipse",parentId:"page",childIndex:1,point:[0,0],radius:[1,1],rotation:0,style:dr,label:"",labelPoint:[.5,.5]},n));S(this,"Component",Fe.Component(({shape:n,isGhost:r,isSelected:i,isBinding:o,isEditing:a,meta:s,bounds:l,events:c,onShapeChange:u,onShapeBlur:d},f)=>{const{id:p,radius:m,style:g,label:y="",labelPoint:v=h1}=n,b=oa(n.style),x=We(g,s.isDarkMode),w=x.strokeWidth,E=1+w*1.618,C=Math.max(0,m[0]-E/2),I=Math.max(0,m[1]-E/2),T=g.dash===It.Draw?WDe:HDe,_=h.exports.useCallback(P=>u==null?void 0:u({id:p,label:P}),[u]);return Z(GDe,{ref:f,...c,isLinked:!!n.link,children:[k(of,{isEditing:a,onChange:_,onBlur:d,font:b,text:y,color:x.stroke,offsetX:(v[0]-.5)*l.width,offsetY:(v[1]-.5)*l.height}),Z(Hr,{id:n.id+"_svg",opacity:r?pr:1,children:[o&&k("ellipse",{className:"tl-binding-indicator",cx:m[0],cy:m[1],rx:C,ry:I,strokeWidth:this.bindingDistance}),k(T,{id:p,radius:m,style:g,isSelected:i,isDarkMode:s.isDarkMode})]})]})}));S(this,"Indicator",Fe.Indicator(({shape:n})=>{const{id:r,radius:i,style:o}=n,s=We(o).strokeWidth,l=1+s*1.618,c=Math.max(0,i[0]-l/2),u=Math.max(0,i[1]-l/2);return o.dash===It.Draw?k("path",{d:IW(r,i,o)}):k("ellipse",{cx:i[0],cy:i[1],rx:c,ry:u})}));S(this,"hitTestPoint",(n,r)=>$.pointInBounds(r,this.getRotatedBounds(n))&&$.pointInEllipse(r,this.getCenter(n),n.radius[0],n.radius[1],n.rotation||0));S(this,"hitTestLineSegment",(n,r,i)=>ed(r,i,this.getCenter(n),n.radius[0],n.radius[1],n.rotation||0).didIntersect);S(this,"getBounds",n=>$.getFromCache(this.boundsCache,n,()=>$.getRotatedEllipseBounds(n.point[0],n.point[1],n.radius[0],n.radius[1],0)));S(this,"getRotatedBounds",n=>$.getRotatedEllipseBounds(n.point[0],n.point[1],n.radius[0],n.radius[1],n.rotation));S(this,"hitTestBounds",(n,r)=>{const i=this.getBounds(n);return $.boundsContained(i,r)||U3e(this.getCenter(n),n.radius[0],n.radius[1],n.rotation||0,r).length>0});S(this,"shouldRender",(n,r)=>r.radius!==n.radius||r.style!==n.style||r.label!==n.label);S(this,"getCenter",n=>O.add(n.point,n.radius));S(this,"getBindingPoint",(n,r,i,o,a,s)=>{{const l=this.getExpandedBounds(n),c=this.getCenter(n);let u,d;if(!$.pointInEllipse(i,c,n.radius[0]+this.bindingDistance,n.radius[1]+this.bindingDistance))return;if(s)O.dist(i,this.getCenter(n))<12?u=[.5,.5]:u=O.divV(O.sub(i,[l.minX,l.minY]),[l.width,l.height]),d=0;else{let f=Zz(o,a,c,n.radius[0],n.radius[1],n.rotation||0).points.sort((m,g)=>O.dist(m,o)-O.dist(g,o))[0];if(f||(f=ed(i,c,c,n.radius[0],n.radius[1],n.rotation||0).points.sort((m,g)=>O.dist(m,i)-O.dist(g,i))[0]),!f)return;const p=O.med(i,f);if(O.distanceToLineSegment(i,p,this.getCenter(n))<12?u=[.5,.5]:u=O.divV(O.sub(p,[l.minX,l.minY]),[l.width,l.height]),$.pointInEllipse(i,c,n.radius[0],n.radius[1],n.rotation||0))d=this.bindingDistance/2;else{const m=ed(i,c,c,n.radius[0],n.radius[1],n.rotation||0).points[0];if(!m)return;d=Math.max(this.bindingDistance/2,O.dist(i,m))}}return{point:u,distance:d}}});S(this,"transform",(n,r,{scaleX:i,scaleY:o,initialShape:a})=>{const{rotation:s=0}=a;return{point:[r.minX,r.minY],radius:[r.width/2,r.height/2],rotation:i<0&&o>=0||o<0&&i>=0?-(s||0):s||0}});S(this,"transformSingle",(n,r)=>({point:O.toFixed([r.minX,r.minY]),radius:O.div([r.width,r.height],2)}))}}const GDe=be("div",{width:"100%",height:"100%",variants:{isLinked:{true:{pointerEvents:"all",cursor:"pointer"},false:{}}}});class KDe extends Fe{constructor(){super(...arguments);S(this,"type",U.Group);S(this,"canBind",!0);S(this,"getShape",n=>$.deepMerge({id:"id",type:U.Group,name:"Group",parentId:"page",childIndex:1,point:[0,0],size:[100,100],rotation:0,children:[],style:dr},n));S(this,"Component",Fe.Component(({shape:n,isBinding:r,isGhost:i,isHovered:o,isSelected:a,events:s},l)=>{const{id:c,size:u}=n,d=2,f=Math.max(0,u[0]-d/2),p=Math.max(0,u[1]-d/2),g=[[[d/2,d/2],[f,d/2],f-d/2],[[f,d/2],[f,p],p-d/2],[[f,p],[d/2,p],f-d/2],[[d/2,p],[d/2,d/2],p-d/2]].map(([y,v],b)=>k("line",{x1:y[0],y1:y[1],x2:v[0],y2:v[1]},c+"_"+b));return Z(Hr,{ref:l,...s,children:[r&&k("rect",{className:"tl-binding-indicator",strokeWidth:this.bindingDistance}),Z("g",{opacity:i?pr:1,children:[k("rect",{x:0,y:0,width:u[0],height:u[1],fill:"transparent",pointerEvents:"all"}),k(SM,{stroke:Le.Black,opacity:o||a?1:0,strokeLinecap:"round",pointerEvents:"stroke",children:g})]})]})}));S(this,"Indicator",Fe.Indicator(({shape:n})=>{const{id:r,size:i}=n,o=2,a=Math.max(0,i[0]-o/2),s=Math.max(0,i[1]-o/2),c=[[[o/2,o/2],[a,o/2],a-o/2],[[a,o/2],[a,s],s-o/2],[[a,s],[o/2,s],a-o/2],[[o/2,s],[o/2,o/2],s-o/2]].map(([u,d],f)=>k("line",{x1:u[0],y1:u[1],x2:d[0],y2:d[1]},r+"_"+f));return k(SM,{strokeLinecap:"round",pointerEvents:"stroke",children:c})}));S(this,"getBounds",n=>qa(n,this.boundsCache));S(this,"shouldRender",(n,r)=>r.size!==n.size||r.style!==n.style)}}const SM=be("g",{strokeWidth:"calc(1.5px * var(--tl-scale))",strokeDasharray:"calc(1px * var(--tl-scale)), calc(3px * var(--tl-scale))"});class qDe extends Fe{constructor(){super(...arguments);S(this,"type",U.Image);S(this,"canBind",!0);S(this,"canClone",!0);S(this,"isAspectRatioLocked",!0);S(this,"showCloneHandles",!0);S(this,"getShape",n=>$.deepMerge({id:"image",type:U.Image,name:"Image",parentId:"page",childIndex:1,point:[0,0],size:[1,1],rotation:0,style:{...dr,isFilled:!0},tlStrokeColor:!dr.isFilled&&dr.color?dr.bgColor:"",assetId:"assetId"},n));S(this,"Component",Fe.Component(({shape:n,asset:r={src:""},isBinding:i,isGhost:o,meta:a,events:s,onShapeChange:l},c)=>{const{size:u,style:d}=n,f=h.exports.useRef(null),p=h.exports.useRef(null),[m,g]=h.exports.useState({});h.exports.useLayoutEffect(()=>{const v=p.current;if(!v)return;const[b,x]=u;v.style.width=`${b}px`,v.style.height=`${x}px`},[u]),h.exports.useLayoutEffect(()=>{n.style.isFilled?g({borderColor:"unset",borderStyle:"unset",borderWidth:0}):g({borderColor:n.style.color,borderStyle:"solid",borderWidth:5})},[n]);const y=h.exports.useCallback(()=>{const v=p.current,b=f.current;if(!(b&&v))return;const{width:x,height:w}=b;v.style.width=`${x}px`,v.style.height=`${w}px`,l==null||l({id:n.id,size:[x,w]})},[]);return Z(l1,{ref:c,...s,children:[i&&k("div",{className:"tl-binding-indicator",style:{position:"absolute",top:`calc(${-this.bindingDistance}px * var(--tl-zoom))`,left:`calc(${-this.bindingDistance}px * var(--tl-zoom))`,width:`calc(100% + ${this.bindingDistance*2}px * var(--tl-zoom))`,height:`calc(100% + ${this.bindingDistance*2}px * var(--tl-zoom))`,backgroundColor:"rgba(65, 132, 244, 0.05)"}}),k(YDe,{ref:p,isDarkMode:a.isDarkMode,isFilled:d.isFilled,isGhost:o,isLinked:!!(n!=null&&n.link),children:k(XDe,{css:m,ref:f,src:r.src,alt:"tl_image_asset",draggable:!1,onLoad:y})})]})}));S(this,"Indicator",Fe.Indicator(({shape:n})=>{const{size:[r,i]}=n;return k("rect",{x:0,y:0,rx:2,ry:2,width:Math.max(1,r),height:Math.max(1,i)})}));S(this,"getBounds",n=>qa(n,this.boundsCache));S(this,"shouldRender",(n,r)=>r.size!==n.size||r.style!==n.style);S(this,"transform",nf);S(this,"transformSingle",rf);S(this,"getSvgElement",n=>{const r=this.getBounds(n),i=document.createElementNS("http://www.w3.org/2000/svg","image");return i.setAttribute("width",`${r.width}`),i.setAttribute("height",`${r.height}`),i.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),i})}}const YDe=Rc("div",{pointerEvents:"all",position:"relative",fontFamily:"sans-serif",fontSize:"2em",height:"100%",width:"100%",borderRadius:"3px",perspective:"800px",overflow:"hidden",p:{userSelect:"none"},img:{userSelect:"none"},variants:{isGhost:{false:{opacity:1},true:{transition:"opacity .2s",opacity:pr}},isLinked:{true:{cursor:"pointer"},false:{}},isFilled:{true:{},false:{}},isDarkMode:{true:{},false:{}}},compoundVariants:[{isFilled:!0,isDarkMode:!0,css:{boxShadow:"2px 3px 12px -2px rgba(0,0,0,.3), 1px 1px 4px rgba(0,0,0,.3), 1px 1px 2px rgba(0,0,0,.3)"}},{isFilled:!0,isDarkMode:!1,css:{boxShadow:"2px 3px 12px -2px rgba(0,0,0,.2), 1px 1px 4px rgba(0,0,0,.16),  1px 1px 2px rgba(0,0,0,.16)"}}]}),XDe=Rc("img",{position:"absolute",top:0,left:0,width:"100%",height:"100%",maxWidth:"100%",minWidth:"100%",pointerEvents:"none",objectFit:"cover",userSelect:"none",borderRadius:2}),ZDe=e=>e*.25,TW=(e,t)=>{const n=ZDe(e);return[[n,0],[e,0],[e-n,t],[0,t]]};function QDe(e){const[t,n]=e;return[t/2,n/2]}function JDe(e,t=0,n=0){const[r,i]=e;let o=TW(r,i);return t&&(o=_8(o,t)),n&&(o=o.map(a=>Y.rotWith(a,[r/2,i/2],n))),o}function eAe(e,t,n){const[r,i]=t,o=$.rng(e),a=Array.from(Array(4)).map(()=>[o()*n*.75,o()*n*.75]),s=TW(r,i),l=[Y.add(s[0],a[0]),Y.add(s[1],a[1]),Y.add(s[2],a[2]),Y.add(s[3],a[3])],c=Math.round(Math.abs(o()*2*3)),u=$.rotateArray([Y.pointsBetween(l[0],l[1],32),Y.pointsBetween(l[1],l[2],32),Y.pointsBetween(l[2],l[3],32),Y.pointsBetween(l[3],l[0],32)],c);return{points:[...u.flat(),...u[0]]}}function _W(e,t,n){const{strokeWidth:r}=We(n),{points:i}=eAe(e,t,r);return{points:i,options:{size:r,thinning:.65,streamline:.3,smoothing:1,simulatePressure:!1,last:!0}}}function tAe(e,t,n){const{points:r,options:i}=_W(e,t,n),o=Oc(r,i);return $.getSvgPathFromStroke(o)}function nAe(e,t,n){const{points:r,options:i}=_W(e,t,n),o=sl(r,i);return $.getSvgPathFromStroke(o.map(a=>a.point.slice(0,2)),!1)}const Bu=(e,t,n=0,r=0)=>{switch(e){case"fixed-parallelogram":default:return JDe(t,n,r)}},wM=(e,t)=>{switch(e){case"fixed-parallelogram":default:return QDe(t)}},rAe=(e,t,n,r)=>{switch(e){case"fixed-parallelogram":default:return tAe(t,n,r)}},iAe=(e,t,n,r)=>{switch(e){case"fixed-parallelogram":default:return nAe(t,n,r)}},oAe=h.exports.memo(function({id:t,size:n,style:r,isSelected:i,isDarkMode:o,polygonType:a}){const{stroke:s,strokeWidth:l,fill:c}=We(r,o),u=1+l*1.618,d=Bu(a,n),p=$.pointsToLineSegments(d,!0).map(([g,y],v)=>{const{strokeDasharray:b,strokeDashoffset:x}=$.getPerfectDashProps(Y.dist(g,y),l*1.618,r.dash);return k("line",{x1:g[0],y1:g[1],x2:y[0],y2:y[1],stroke:s,strokeWidth:u,strokeLinecap:"round",strokeDasharray:b,strokeDashoffset:x},t+"_"+v)}),m=d.join();return Z(Pe,{children:[k("polygon",{className:r.isFilled||i?"tl-fill-hitarea":"tl-stroke-hitarea",points:m}),r.isFilled&&k("polygon",{fill:c,points:m,pointerEvents:"none"}),k("g",{pointerEvents:"stroke",children:p})]})}),aAe=h.exports.memo(function({id:t,size:n,style:r,isSelected:i,isDarkMode:o,polygonType:a}){const{stroke:s,strokeWidth:l,fill:c}=We(r,o),u=rAe(a,t,n,r),d=iAe(a,t,n,r);return Z(Pe,{children:[k("path",{className:r.isFilled||i?"tl-fill-hitarea":"tl-stroke-hitarea",d}),r.isFilled&&k("path",{d,fill:c,pointerEvents:"none"}),k("path",{d:u,fill:s,stroke:s,strokeWidth:l,pointerEvents:"none"})]})});function sAe({size:e,polygonType:t}){const n=Bu(t,e).join();return k("polygon",{className:"tl-binding-indicator",points:n,strokeWidth:fr*2})}class lAe extends Fe{constructor(){super(...arguments);S(this,"type",U.Polygon);S(this,"canBind",!0);S(this,"canClone",!0);S(this,"canEdit",!0);S(this,"getShape",n=>{var r;return $.deepMerge({id:"id",type:U.Polygon,name:"Polygon",parentId:"page",childIndex:1,point:[0,0],size:[1,1],rotation:0,style:dr,label:"",labelPoint:[.5,.5],polygonType:(r=n.polygonType)!=null?r:"fixed-parallelogram"},n)});S(this,"Component",Fe.Component(({shape:n,bounds:r,isBinding:i,isEditing:o,isSelected:a,isGhost:s,meta:l,events:c,onShapeChange:u,onShapeBlur:d},f)=>{const{id:p,label:m="",size:g,style:y,polygonType:v,labelPoint:b=h1}=n,x=oa(y),w=We(y),E=y.dash===It.Draw?aAe:oAe,C=h.exports.useCallback(I=>u==null?void 0:u({id:p,label:I}),[u]);return h.exports.useMemo(()=>{const I=Y.div(g,2);return(wM(n.polygonType,g)[1]-I[1])*.72},[g]),Z(cAe,{ref:f,...c,isLinked:!!(n!=null&&n.link),children:[k(of,{isEditing:o,onChange:C,onBlur:d,font:x,text:m,color:w.stroke,offsetX:(b[0]-.5)*r.width,offsetY:(b[1]-.5)*r.height}),Z(Hr,{id:n.id+"_svg",opacity:s?pr:1,children:[i&&k(sAe,{size:g,polygonType:v}),k(E,{id:p,style:y,size:g,isSelected:a,isDarkMode:l.isDarkMode,polygonType:v})]})]})}));S(this,"Indicator",Fe.Indicator(({shape:n})=>{const{size:r}=n;return k("polygon",{points:Bu(n.polygonType,r).join()})}));S(this,"shouldRender",(n,r)=>r.size!==n.size||r.style!==n.style||r.label!==n.label);S(this,"getBounds",n=>qa(n,this.boundsCache));S(this,"getExpandedBounds",n=>$.getBoundsFromPoints(Bu(n.polygonType,n.size,this.bindingDistance).map(r=>Y.add(r,n.point))));S(this,"hitTestLineSegment",(n,r,i)=>a1(r,i,this.getPoints(n)).didIntersect);S(this,"hitTestBounds",(n,r)=>$.boundsContained(this.getBounds(n),r)||$6(r,this.getPoints(n)).length>0);S(this,"getBindingPoint",(n,r,i,o,a,s)=>{const l=this.getExpandedBounds(n);if(!$.pointInBounds(i,l))return;const c=Bu(n.polygonType,n.size).map(x=>Y.add(x,n.point)),u=Bu(n.polygonType,n.size,this.bindingDistance).map(x=>Y.add(x,n.point)),d=$.pointsToLineSegments(c,!0).map(([x,w])=>Y.distanceToLineSegment(x,w,i)).sort((x,w)=>x-w)[0];if(!($.pointInPolygon(i,u)||d<this.bindingDistance))return;const f=$.pointsToLineSegments(u.concat([u[0]])).map(x=>i1(o,a,x[0],x[1])).filter(x=>x.didIntersect).flatMap(x=>x.points);if(!f.length)return;const p=Y.add(wM(n.polygonType,n.size),n.point),m=f.sort((x,w)=>Y.dist(w,o)-Y.dist(x,o))[0],g=Y.med(i,m);let y,v;s?(y=Y.dist(i,p)<fr/2?p:i,v=0):(Y.distanceToLineSegment(i,g,p)<fr/2?y=p:y=g,$.pointInPolygon(i,c)?v=this.bindingDistance:v=Math.max(this.bindingDistance,d));const b=Y.divV(Y.sub(y,[l.minX,l.minY]),[l.width,l.height]);return{point:Y.clampV(b,0,1),distance:v}});S(this,"transform",nf);S(this,"transformSingle",rf)}getPoints(n){const{rotation:r=0,point:[i,o],size:[a,s]}=n;return[[0,s/2],[a/2,s],[a,s/2],[a/2,0]].map(l=>Y.rotWith(l,this.getCenter(n),r))}}const cAe=be("div",{width:"100%",height:"100%",variants:{isLinked:{true:{pointerEvents:"all",cursor:"pointer"},false:{}}}});function uAe({strokeWidth:e,size:t}){return k("rect",{className:"tl-binding-indicator",x:e,y:e,width:Math.max(0,t[0]-e/2),height:Math.max(0,t[1]-e/2),strokeWidth:fr*2})}const dAe=h.exports.memo(function({id:t,style:n,size:r,isSelected:i,isDarkMode:o}){const{stroke:a,strokeWidth:s,fill:l}=We(n,o),c=1+s*1.618,u=Math.max(0,r[0]-c/2),d=Math.max(0,r[1]-c/2),p=[[[c/2,c/2],[u,c/2],u-c/2],[[u,c/2],[u,d],d-c/2],[[u,d],[c/2,d],u-c/2],[[c/2,d],[c/2,c/2],d-c/2]].map(([m,g,y],v)=>{const{strokeDasharray:b,strokeDashoffset:x}=$.getPerfectDashProps(y,s*1.618,n.dash);return k("line",{x1:m[0],y1:m[1],x2:g[0],y2:g[1],strokeDasharray:b,strokeDashoffset:x},t+"_"+v)});return Z(Pe,{children:[k("rect",{className:i||n.isFilled?"tl-fill-hitarea":"tl-stroke-hitarea",x:c/2,y:c/2,width:u,height:d,strokeWidth:fr}),n.isFilled&&k("rect",{x:c/2,y:c/2,width:u,height:d,fill:l,pointerEvents:"none"}),k("g",{pointerEvents:"none",stroke:a,strokeWidth:c,strokeLinecap:"round",children:p})]})});function fAe(e,t,n){const r=We(t),i=$.rng(e),o=r.strokeWidth,a=Math.max(0,n[0]),s=Math.max(0,n[1]),l=Array.from(Array(4)).map(()=>[i()*o*.75,i()*o*.75]),c=Y.add([o/2,o/2],l[0]),u=Y.add([a-o/2,o/2],l[1]),d=Y.add([a-o/2,s-o/2],l[2]),f=Y.add([o/2,s-o/2],l[3]),p=Math.round(Math.abs(i()*2*4)),m=Math.min(a/2,o*2),g=Math.min(s/2,o*2),y=Math.max(8,Math.floor(a/16)),v=Math.max(8,Math.floor(s/16)),b=$.rotateArray([Y.pointsBetween(Y.add(c,[m,0]),Y.sub(u,[m,0]),y),Y.pointsBetween(Y.add(u,[0,g]),Y.sub(d,[0,g]),v),Y.pointsBetween(Y.sub(d,[m,0]),Y.add(f,[m,0]),y),Y.pointsBetween(Y.sub(f,[0,g]),Y.add(c,[0,g]),v)],p);return{points:[...b.flat(),...b[0]].slice(5,Math.floor((p%2===0?y:v)/-2)+3)}}function PW(e,t,n){const{points:r}=fAe(e,t,n),{strokeWidth:i}=We(t);return{points:r,options:{size:i,thinning:.65,streamline:.3,smoothing:1,simulatePressure:!1,last:!0}}}function pAe(e,t,n){const{points:r,options:i}=PW(e,t,n),o=Oc(r,i);return $.getSvgPathFromStroke(o)}function OW(e,t,n){const{points:r,options:i}=PW(e,t,n),o=sl(r,i);return $.getSvgPathFromStroke(o.map(a=>a.point.slice(0,2)),!1)}const hAe=h.exports.memo(function({id:t,style:n,size:r,isSelected:i,isDarkMode:o}){const{isFilled:a}=n,{stroke:s,strokeWidth:l,fill:c}=We(n,o),u=pAe(t,n,r),d=OW(t,n,r);return Z(Pe,{children:[k("path",{className:n.isFilled||i?"tl-fill-hitarea":"tl-stroke-hitarea",d}),a&&k("path",{d,fill:c,pointerEvents:"none"}),k("path",{d:u,fill:s,stroke:s,strokeWidth:l,pointerEvents:"none"})]})});class mAe extends Fe{constructor(){super(...arguments);S(this,"type",U.Rectangle);S(this,"canBind",!0);S(this,"canClone",!0);S(this,"canEdit",!0);S(this,"getShape",n=>$.deepMerge({id:"id",type:U.Rectangle,name:"Rectangle",parentId:"page",childIndex:1,point:[0,0],size:[1,1],rotation:0,style:dr,label:"",labelPoint:[.5,.5]},n));S(this,"Component",Fe.Component(({shape:n,isEditing:r,isBinding:i,isSelected:o,isGhost:a,meta:s,bounds:l,events:c,onShapeBlur:u,onShapeChange:d},f)=>{const{id:p,size:m,style:g,label:y="",labelPoint:v=h1}=n,b=oa(g),x=We(g,s.isDarkMode),w=g.dash===It.Draw?hAe:dAe,E=h.exports.useCallback(C=>d==null?void 0:d({id:p,label:C}),[d]);return Z(gAe,{ref:f,...c,isLinked:!!(n!=null&&n.link),children:[k(of,{isEditing:r,onChange:E,onBlur:u,font:b,text:y,color:x.stroke,offsetX:(v[0]-.5)*l.width,offsetY:(v[1]-.5)*l.height}),Z(Hr,{id:n.id+"_svg",opacity:a?pr:1,children:[i&&k(uAe,{strokeWidth:x.strokeWidth,size:m}),k(w,{id:p,style:g,size:m,isSelected:o,isDarkMode:s.isDarkMode})]})]})}));S(this,"Indicator",Fe.Indicator(({shape:n})=>{const{id:r,style:i,size:o}=n,s=We(i,!1).strokeWidth;return i.dash===It.Draw?k("path",{d:OW(r,i,o)}):k("rect",{x:s,y:s,rx:1,ry:1,width:Math.max(1,o[0]-s*2),height:Math.max(1,o[1]-s*2)})}));S(this,"getBounds",n=>qa(n,this.boundsCache));S(this,"shouldRender",(n,r)=>r.size!==n.size||r.style!==n.style||r.label!==n.label);S(this,"transform",nf);S(this,"transformSingle",rf)}}const gAe=be("div",{width:"100%",height:"100%",variants:{isLinked:{true:{pointerEvents:"all",cursor:"pointer"},false:{}}}});class vAe extends Fe{constructor(){super(...arguments);S(this,"type",U.Sticky);S(this,"canBind",!0);S(this,"canEdit",!0);S(this,"canClone",!0);S(this,"hideResizeHandles",!0);S(this,"showCloneHandles",!0);S(this,"getShape",n=>$.deepMerge({id:"id",type:U.Sticky,name:"Sticky",parentId:"page",childIndex:1,point:[0,0],size:[200,200],text:"",rotation:0,style:a8},n));S(this,"Component",Fe.Component(({shape:n,meta:r,events:i,isGhost:o,isBinding:a,isEditing:s,onShapeBlur:l,onShapeChange:c},u)=>{var T;const d=qke(n.style),{color:f,fill:p}=oO(n.style,r.isDarkMode),m=h.exports.useRef(null),g=h.exports.useRef(null),y=h.exports.useRef(null),v=h.exports.useRef(!1),b=h.exports.useCallback(_=>{_.stopPropagation()},[]),x=h.exports.useCallback(_=>{c==null||c({id:n.id,type:n.type,text:Q.normalizeText(_.currentTarget.value)})},[c]),w=h.exports.useCallback(_=>{if(_.key!=="Escape"){if(_.key==="Tab"&&n.text.length===0){_.preventDefault();return}if(!(_.key==="Meta"||_.metaKey))_.stopPropagation();else if(_.key==="z"&&_.metaKey){_.shiftKey?document.execCommand("redo",!1):document.execCommand("undo",!1),_.stopPropagation(),_.preventDefault();return}_.key==="Tab"&&(_.preventDefault(),_.shiftKey?Lr.unindent(_.currentTarget):Lr.indent(_.currentTarget),c==null||c({...n,text:Q.normalizeText(_.currentTarget.value)}))}},[n,c]),E=h.exports.useCallback(_=>{_.currentTarget.setSelectionRange(0,0),l==null||l()},[]),C=h.exports.useCallback(_=>{!s||!v.current||_.currentTarget.select()},[s]);h.exports.useEffect(()=>{if(s){v.current=!0;const _=g.current;_.focus(),_.select()}},[s]),h.exports.useEffect(()=>{const _=y.current,{size:P}=n,{offsetHeight:M}=_,D=bx-Ao*2,V=P[1]-Ao*2;if(M===V)return;if(M>D){c==null||c({id:n.id,size:[P[0],M+Ao*2]});return}if(M<D&&P[1]>bx){c==null||c({id:n.id,size:[P[0],bx]});return}const B=g.current;B==null||B.focus()},[n.text,n.size[1],n.style,n.tlBgImage]);const I={font:d,color:f,textShadow:r.isDarkMode?"0.5px 0.5px 2px rgba(255, 255, 255,.25)":"0.5px 0.5px 2px rgba(255, 255, 255,.5)"};return k(l1,{ref:u,...i,children:Z(yAe,{isLinked:!!(n!=null&&n.link),ref:m,isDarkMode:r.isDarkMode,isGhost:o,className:"hey",style:{backgroundColor:p,...I,backgroundImage:`url(${(T=n==null?void 0:n.tlBgImage)!=null?T:""})`,backgroundSize:"cover"},children:[a&&k("div",{className:"tl-binding-indicator",style:{position:"absolute",top:-this.bindingDistance,left:-this.bindingDistance,width:`calc(100% + ${this.bindingDistance*2}px)`,height:`calc(100% + ${this.bindingDistance*2}px)`,backgroundColor:"rgba(65, 132, 244, 0.05)"}}),Z(bAe,{ref:y,isEditing:s,alignment:n.style.textAlign,children:[n.text,"\u200B"]}),s&&k(xAe,{ref:g,onPointerDown:b,value:n.text,onChange:x,onKeyDown:w,onFocus:C,onBlur:E,tabIndex:-1,autoComplete:"false",autoCapitalize:"false",autoCorrect:"false",autoSave:"false",autoFocus:!0,spellCheck:!0,alignment:n.style.textAlign,onContextMenu:A2})]})})}));S(this,"Indicator",Fe.Indicator(({shape:n})=>{const{size:[r,i]}=n;return k("rect",{x:0,y:0,rx:3,ry:3,width:Math.max(1,r),height:Math.max(1,i)})}));S(this,"getBounds",n=>qa(n,this.boundsCache));S(this,"shouldRender",(n,r)=>r.size!==n.size||r.style!==n.style||r.text!==n.text);S(this,"transform",(n,r,{scaleX:i,scaleY:o,transformOrigin:a})=>({point:O.toFixed([r.minX+(r.width-n.size[0])*(i<0?1-a[0]:a[0]),r.minY+(r.height-n.size[1])*(o<0?1-a[1]:a[1])])}));S(this,"transformSingle",n=>n);S(this,"getSvgElement",n=>{const r=this.getBounds(n),i=$.expandBounds(r,-Ao),o=T8(n.text,n.style,i),a=oO(n.style);o.setAttribute("fill",a.color),o.setAttribute("transform",`translate(${Ao}, ${Ao})`);const s=document.createElementNS("http://www.w3.org/2000/svg","g"),l=document.createElementNS("http://www.w3.org/2000/svg","rect");return l.setAttribute("width",r.width+""),l.setAttribute("height",r.height+""),l.setAttribute("fill",a.fill),l.setAttribute("rx","3"),l.setAttribute("ry","3"),s.appendChild(l),s.appendChild(o),s})}}const Ao=16,bx=200,yAe=be("div",{pointerEvents:"all",position:"relative",backgroundColor:"rgba(255, 220, 100)",fontFamily:"sans-serif",height:"100%",width:"100%",padding:Ao+"px",borderRadius:"3px",perspective:"800px",variants:{isGhost:{false:{opacity:1},true:{transition:"opacity .2s",opacity:pr}},isLinked:{true:{pointerEvents:"all",cursor:"pointer"},false:{}},isDarkMode:{true:{boxShadow:"2px 3px 12px -2px rgba(0,0,0,.3), 1px 1px 4px rgba(0,0,0,.3), 1px 1px 2px rgba(0,0,0,.3)"},false:{boxShadow:"2px 3px 12px -2px rgba(0,0,0,.2), 1px 1px 4px rgba(0,0,0,.16),  1px 1px 2px rgba(0,0,0,.16)"}}}}),MW={whiteSpace:"pre-wrap",overflowWrap:"break-word"},bAe=be("div",{position:"absolute",top:Ao,left:Ao,width:`calc(100% - ${Ao*2}px)`,height:"fit-content",font:"inherit",pointerEvents:"none",userSelect:"none",variants:{isEditing:{true:{opacity:1},false:{opacity:1}},alignment:{[ct.Start]:{textAlign:"left"},[ct.Middle]:{textAlign:"center"},[ct.End]:{textAlign:"right"},[ct.Justify]:{textAlign:"justify"}}},...MW}),xAe=be("textarea",{width:"100%",height:"100%",border:"none",overflow:"hidden",background:"none",outline:"none",textAlign:"left",font:"inherit",padding:0,color:"transparent !important",verticalAlign:"top",resize:"none",caretColor:"black",...MW,variants:{alignment:{[ct.Start]:{textAlign:"left"},[ct.Middle]:{textAlign:"center"},[ct.End]:{textAlign:"right"},[ct.Justify]:{textAlign:"justify"}}}});class SAe extends Fe{constructor(){super(...arguments);S(this,"type",U.Text);S(this,"isAspectRatioLocked",!0);S(this,"canEdit",!0);S(this,"canBind",!0);S(this,"canClone",!0);S(this,"bindingDistance",fr/2);S(this,"getShape",n=>$.deepMerge({id:"id",type:U.Text,name:"Text",parentId:"page",childIndex:1,point:[0,0],rotation:0,text:" ",style:a8},n));S(this,"Component",Fe.Component(({shape:n,isBinding:r,isGhost:i,isEditing:o,onShapeBlur:a,onShapeChange:s,meta:l,events:c},u)=>{const{text:d,style:f}=n,p=We(f,l.isDarkMode),m=oa(n.style),g=h.exports.useRef(null),y=h.exports.useRef(!1),v=h.exports.useCallback(I=>{let T=[0,0];const _=this.getBounds(n);switch(n.style.textAlign){case ct.Start:break;case ct.Middle:{const P=this.getBounds({...n,text:Q.normalizeText(I.currentTarget.value)});T=O.div([P.width-_.width,0],2);break}case ct.End:{T=[this.getBounds({...n,text:Q.normalizeText(I.currentTarget.value)}).width-_.width,0];break}}s==null||s({id:n.id,point:O.sub(n.point,T),text:Q.normalizeText(I.currentTarget.value)})},[n.id,n.point]),b=h.exports.useCallback(I=>{s==null||s({id:n.id,text:I})},[n.id]),x=xW(b),w=h.exports.useCallback(I=>{I.currentTarget.setSelectionRange(0,0),a==null||a()},[]),E=h.exports.useCallback(I=>{!o||!y.current||document.activeElement===I.currentTarget&&I.currentTarget.select()},[o]),C=h.exports.useCallback(I=>{o&&I.stopPropagation()},[o]);return h.exports.useEffect(()=>{o?requestAnimationFrame(()=>{y.current=!0;const I=g.current;I&&(I.focus(),I.select())}):a==null||a()},[o]),k(l1,{ref:u,...c,children:k(CAe,{isGhost:i,isEditing:o,onPointerDown:C,isLinked:!!(n!=null&&n.link),children:Z(kAe,{style:{font:m,color:p.stroke,textAlign:bW(f.textAlign)},children:[r&&k("div",{className:"tl-binding-indicator",style:{position:"absolute",top:-this.bindingDistance,left:-this.bindingDistance,width:`calc(100% + ${this.bindingDistance*2}px)`,height:`calc(100% + ${this.bindingDistance*2}px)`,backgroundColor:"rgba(65, 132, 244, 0.05)"}}),o?k(EAe,{ref:g,style:{font:m,color:p.stroke},name:"text",tabIndex:-1,autoComplete:"false",autoCapitalize:"false",autoCorrect:"false",autoSave:"false",autoFocus:!0,placeholder:"",spellCheck:"true",wrap:"off",dir:"auto",datatype:"wysiwyg",defaultValue:d,color:p.stroke,onFocus:E,onChange:v,onKeyDown:x,onBlur:w,onPointerDown:C,onContextMenu:A2}):d,"\u200B"]})})})}));S(this,"Indicator",Fe.Indicator(({shape:n})=>{const{width:r,height:i}=this.getBounds(n);return k("rect",{x:0,y:0,width:r,height:i})}));S(this,"getBounds",n=>{const r=$.getFromCache(this.boundsCache,n,()=>{if(!pu)return{minX:0,minY:0,maxX:10,maxY:10,width:10,height:10};pu.innerHTML=`${n.text}&zwj;`,pu.style.font=oa(n.style);const i=pu.offsetWidth||1,o=pu.offsetHeight||1;return{minX:0,maxX:i,minY:0,maxY:o,width:i,height:o}});return $.translateBounds(r,n.point)});S(this,"shouldRender",(n,r)=>r.text!==n.text||r.style.scale!==n.style.scale||r.style!==n.style);S(this,"transform",(n,r,{initialShape:i,scaleX:o,scaleY:a})=>{const{rotation:s=0,style:{scale:l=1}}=i,c=l*Math.abs(Math.min(o,a));return{point:[r.minX,r.minY],rotation:o<0&&a>=0||a<0&&o>=0?-(s||0):s,style:{...i.style,scale:c}}});S(this,"transformSingle",(n,r,{initialShape:i,scaleX:o,scaleY:a})=>{const{style:{scale:s=1}}=i;return{point:O.toFixed([r.minX,r.minY]),style:{...i.style,scale:s*Math.max(Math.abs(a),Math.abs(o))}}});S(this,"onDoubleClickBoundsHandle",n=>{const r=this.getCenter(n),i=this.getCenter({...n,style:{...n.style,scale:1}});return{style:{...n.style,scale:1},point:O.toFixed(O.add(n.point,O.sub(r,i)))}});S(this,"getSvgElement",n=>{const r=this.getBounds(n),i=T8(n.text,n.style,r);return i.setAttribute("fill",We(n.style).stroke),i})}}let pu;function wAe(){var t;(t=document.getElementById("__textMeasure"))==null||t.remove();const e=document.createElement("pre");return e.id="__textMeasure",Object.assign(e.style,{whiteSpace:"pre",width:"auto",border:"1px solid transparent",padding:"4px",margin:"0px",letterSpacing:`${j2}px`,opacity:"0",position:"absolute",top:"-500px",left:"0px",zIndex:"9999",pointerEvents:"none",userSelect:"none",alignmentBaseline:"mathematical",dominantBaseline:"mathematical"}),e.tabIndex=-1,document.body.appendChild(e),e}typeof window!="undefined"&&(pu=wAe());const CAe=be("div",{width:"100%",height:"100%",variants:{isLinked:{true:{pointerEvents:"all",cursor:"pointer"},false:{}},isGhost:{false:{opacity:1},true:{transition:"opacity .2s",opacity:pr}},isEditing:{false:{pointerEvents:"all",userSelect:"all"},true:{pointerEvents:"none",userSelect:"none"}}}}),RW={whiteSpace:"pre-wrap",overflowWrap:"break-word"},kAe=be("div",{position:"absolute",width:"100%",height:"100%",padding:"4px",zIndex:1,minHeight:1,minWidth:1,lineHeight:1,letterSpacing:j2,outline:0,fontWeight:"500",backfaceVisibility:"hidden",userSelect:"none",pointerEvents:"none",WebkitUserSelect:"none",WebkitTouchCallout:"none",isEditing:{false:{},true:{pointerEvents:"all",background:"$boundsBg",userSelect:"text",WebkitUserSelect:"text"}},...RW}),EAe=be("textarea",{position:"absolute",top:0,left:0,zIndex:1,width:"100%",height:"100%",border:"none",padding:"4px",resize:"none",textAlign:"inherit",minHeight:"inherit",minWidth:"inherit",lineHeight:"inherit",letterSpacing:"inherit",outline:0,fontWeight:"inherit",overflow:"hidden",backfaceVisibility:"hidden",display:"inline-block",pointerEvents:"all",background:"$boundsBg",userSelect:"text",WebkitUserSelect:"text",...RW}),IAe=h.exports.memo(function({id:t,size:n,style:r,isSelected:i,isDarkMode:o}){const{stroke:a,strokeWidth:s,fill:l}=We(r,o),c=1+s*1.618,u=id(n),f=$.pointsToLineSegments(u,!0).map(([m,g],y)=>{const{strokeDasharray:v,strokeDashoffset:b}=$.getPerfectDashProps(Y.dist(m,g),s*1.618,r.dash);return k("line",{x1:m[0],y1:m[1],x2:g[0],y2:g[1],stroke:a,strokeWidth:c,strokeLinecap:"round",strokeDasharray:v,strokeDashoffset:b},t+"_"+y)}),p=u.join();return Z(Pe,{children:[k("polygon",{className:r.isFilled||i?"tl-fill-hitarea":"tl-stroke-hitarea",points:p}),r.isFilled&&k("polygon",{fill:l,points:p,pointerEvents:"none"}),k("g",{pointerEvents:"stroke",children:f})]})}),TAe=h.exports.memo(function({id:t,size:n,style:r,isSelected:i,isDarkMode:o}){const{stroke:a,strokeWidth:s,fill:l}=We(r,o),c=gDe(t,n,r),u=vDe(t,n,r);return Z(Pe,{children:[k("path",{className:r.isFilled||i?"tl-fill-hitarea":"tl-stroke-hitarea",d:u}),r.isFilled&&k("path",{d:u,fill:l,pointerEvents:"none"}),k("path",{d:c,fill:a,stroke:a,strokeWidth:s,pointerEvents:"none"})]})});function _Ae({size:e}){const t=id(e).join();return k("polygon",{className:"tl-binding-indicator",points:t,strokeWidth:fr*2})}class PAe extends Fe{constructor(){super(...arguments);S(this,"type",U.Triangle);S(this,"canBind",!0);S(this,"canClone",!0);S(this,"canEdit",!0);S(this,"getShape",n=>$.deepMerge({id:"id",type:U.Triangle,name:"Triangle",parentId:"page",childIndex:1,point:[0,0],size:[1,1],rotation:0,style:dr,label:"",labelPoint:[.5,.5]},n));S(this,"Component",Fe.Component(({shape:n,bounds:r,isBinding:i,isEditing:o,isSelected:a,isGhost:s,meta:l,events:c,onShapeChange:u,onShapeBlur:d},f)=>{const{id:p,label:m="",size:g,style:y,labelPoint:v=h1}=n,b=oa(y),x=We(y),w=y.dash===It.Draw?TAe:IAe,E=h.exports.useCallback(I=>u==null?void 0:u({id:p,label:I}),[u]),C=h.exports.useMemo(()=>{const I=Y.div(g,2);return(gM(g)[1]-I[1])*.72},[g]);return Z(OAe,{ref:f,...c,isLinked:!!(n!=null&&n.link),children:[k(of,{font:b,text:m,color:x.stroke,offsetX:(v[0]-.5)*r.width,offsetY:C+(v[1]-.5)*r.height,isEditing:o,onChange:E,onBlur:d}),Z(Hr,{id:n.id+"_svg",opacity:s?pr:1,children:[i&&k(_Ae,{size:g}),k(w,{id:p,style:y,size:g,isSelected:a,isDarkMode:l.isDarkMode})]})]})}));S(this,"Indicator",Fe.Indicator(({shape:n})=>{const{size:r}=n;return k("polygon",{points:id(r).join()})}));S(this,"shouldRender",(n,r)=>r.size!==n.size||r.style!==n.style||r.label!==n.label);S(this,"getBounds",n=>qa(n,this.boundsCache));S(this,"getExpandedBounds",n=>$.getBoundsFromPoints(id(n.size,this.bindingDistance).map(r=>Y.add(r,n.point))));S(this,"hitTestLineSegment",(n,r,i)=>a1(r,i,this.getPoints(n)).didIntersect);S(this,"hitTestBounds",(n,r)=>$.boundsContained(this.getBounds(n),r)||$6(r,this.getPoints(n)).length>0);S(this,"getBindingPoint",(n,r,i,o,a,s)=>{const l=this.getExpandedBounds(n);if(!$.pointInBounds(i,l))return;const c=id(n.size).map(x=>Y.add(x,n.point)),u=c,d=$.pointsToLineSegments(c,!0).map(([x,w])=>Y.distanceToLineSegment(x,w,i)).sort((x,w)=>x-w)[0];if(!($.pointInPolygon(i,u)||d<this.bindingDistance))return;const f=$.pointsToLineSegments(u.concat([u[0]])).map(x=>i1(o,a,x[0],x[1])).filter(x=>x.didIntersect).flatMap(x=>x.points);if(!f.length)return;const p=Y.add(gM(n.size),n.point),m=f.sort((x,w)=>Y.dist(w,o)-Y.dist(x,o))[0],g=Y.med(i,m);let y,v;s?(y=Y.dist(i,p)<fr/2?p:i,v=0):(Y.distanceToLineSegment(i,g,p)<fr/2?y=p:y=g,$.pointInPolygon(i,c)?v=this.bindingDistance:v=Math.max(this.bindingDistance,d));const b=Y.divV(Y.sub(y,[l.minX,l.minY]),[l.width,l.height]);return{point:Y.clampV(b,0,1),distance:v}});S(this,"transform",nf);S(this,"transformSingle",rf)}getPoints(n){const{rotation:r=0,point:[i,o],size:[a,s]}=n;return[[i+a/2,o],[i,o+s],[i+a,o+s]].map(l=>Y.rotWith(l,this.getCenter(n),r))}}const OAe=be("div",{width:"100%",height:"100%",variants:{isLinked:{true:{pointerEvents:"all",cursor:"pointer"},false:{}}}});class MAe extends Fe{constructor(){super(...arguments);S(this,"type",U.Video);S(this,"canBind",!0);S(this,"canEdit",!0);S(this,"canClone",!0);S(this,"isAspectRatioLocked",!0);S(this,"showCloneHandles",!0);S(this,"isStateful",!0);S(this,"getShape",n=>$.deepMerge({id:"video",type:U.Video,name:"Video",parentId:"page",childIndex:1,point:[0,0],size:[1,1],rotation:0,style:dr,assetId:"assetId",isPlaying:!0,currentTime:0},n));S(this,"Component",Fe.Component(({shape:n,asset:r={src:""},isBinding:i,isEditing:o,isGhost:a,meta:s,events:l,onShapeChange:c},u)=>{const d=h.exports.useRef(null),f=h.exports.useRef(null),{currentTime:p=0,size:m,isPlaying:g,style:y}=n;h.exports.useLayoutEffect(()=>{const E=f.current;if(!E)return;const[C,I]=m;E.style.width=`${C}px`,E.style.height=`${I}px`},[m]);const v=h.exports.useCallback(()=>{const E=f.current,C=d.current;if(!(C&&E)||!Y.isEqual(m,[401.42,401.42]))return;const{videoWidth:I,videoHeight:T}=C;E.style.width=`${I}px`,E.style.height=`${T}px`;const _=[I,T],P=Y.sub(m,_);c==null||c({id:n.id,point:Y.add(n.point,Y.div(P,2)),size:[I,T]})},[m]);h.exports.useLayoutEffect(()=>{const E=d.current;!E||(g?E.play():E.pause())},[g]),h.exports.useLayoutEffect(()=>{const E=d.current;!E||p!==E.currentTime&&(E.currentTime=p)},[p]);const b=h.exports.useCallback(()=>{c==null||c({id:n.id,isPlaying:!0})},[]),x=h.exports.useCallback(()=>{c==null||c({id:n.id,isPlaying:!1})},[]),w=h.exports.useCallback(()=>{const E=d.current;!E||!o||c==null||c({id:n.id,currentTime:E.currentTime})},[o]);return Z(l1,{ref:u,...l,children:[i&&k("div",{className:"tl-binding-indicator",style:{position:"absolute",top:-this.bindingDistance,left:-this.bindingDistance,width:`calc(100% + ${this.bindingDistance*2}px)`,height:`calc(100% + ${this.bindingDistance*2}px)`,backgroundColor:"rgba(65, 132, 244, 0.05)"}}),k(RAe,{ref:f,isDarkMode:s.isDarkMode,isGhost:a,isFilled:y.isFilled,children:k(DAe,{ref:d,id:n.id+"_video",muted:!0,loop:!0,playsInline:!0,disablePictureInPicture:!0,controls:o,autoPlay:g,onPlay:b,onPause:x,onTimeUpdate:w,onLoadedMetadata:v,children:k("source",{src:r.src})})})]})}));S(this,"Indicator",Fe.Indicator(({shape:n})=>{const{size:[r,i]}=n;return k("rect",{x:0,y:0,rx:2,ry:2,width:Math.max(1,r),height:Math.max(1,i)})}));S(this,"getBounds",n=>qa(n,this.boundsCache));S(this,"shouldRender",(n,r)=>r.size!==n.size||r.style!==n.style||r.isPlaying!==n.isPlaying);S(this,"getSvgElement",n=>{const r=this.getBounds(n),i=document.createElementNS("http://www.w3.org/2000/svg","image");return i.setAttribute("width",`${r.width}`),i.setAttribute("height",`${r.height}`),i.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),i});S(this,"transform",nf);S(this,"transformSingle",rf)}}const RAe=Rc("div",{pointerEvents:"all",position:"relative",fontFamily:"sans-serif",fontSize:"2em",height:"100%",width:"100%",borderRadius:"3px",perspective:"800px",overflow:"hidden",p:{userSelect:"none"},img:{userSelect:"none"},variants:{isGhost:{false:{opacity:1},true:{transition:"opacity .2s",opacity:pr}},isFilled:{true:{},false:{}},isDarkMode:{true:{},false:{}}},compoundVariants:[{isFilled:!0,isDarkMode:!0,css:{boxShadow:"2px 3px 12px -2px rgba(0,0,0,.3), 1px 1px 4px rgba(0,0,0,.3), 1px 1px 2px rgba(0,0,0,.3)"}},{isFilled:!0,isDarkMode:!1,css:{boxShadow:"2px 3px 12px -2px rgba(0,0,0,.2), 1px 1px 4px rgba(0,0,0,.16),  1px 1px 2px rgba(0,0,0,.16)"}}]}),DAe=Rc("video",{position:"absolute",top:0,left:0,width:"100%",height:"100%",maxWidth:"100%",minWidth:"100%",pointerEvents:"none",objectFit:"cover",userSelect:"none",borderRadius:2}),DW=new mAe,AW=new PAe,LW=new UDe,BW=new jDe,O8=new EDe,AAe=new SAe,LAe=new KDe,U4=new vAe,BAe=new qDe,$Ae=new MAe,FAe=new TDe,$W=new LDe,FW=new lAe,js={[U.Rectangle]:DW,[U.Triangle]:AW,[U.Diamond]:$W,[U.Ellipse]:LW,[U.Polygon]:FW,[U.Draw]:BW,[U.Arrow]:O8,[U.Text]:AAe,[U.Group]:LAe,[U.Sticky]:U4,[U.Image]:BAe,[U.Video]:$Ae,[U.Block]:FAe},NAe=e=>typeof e=="string"?js[e]:js[e.type],CM={}.NODE_ENV==="development",ye=class{static getShapeUtil(t){return NAe(t)}static getSelectedShapes(t,n){const r=ye.getPage(t,n);return ye.getSelectedIds(t,n).map(o=>r.shapes[o])}static screenToWorld(t,n){const r=ye.getPageState(t,t.appState.currentPageId).camera;return O.sub(O.div(n,r.zoom),r.point)}static getCameraZoom(t){return $.clamp(t,.1,5)}static getPage(t,n){return t.document.pages[n]}static getBlock(t,n,r){try{const i=ye.getShape(t,n,r);if(!i.asset)throw Error(`No asset on ${i.id} of type ${i.type}`);const o=i.asset;if((o==null?void 0:o.type)===Bl.Block)return o.block;throw Error("Wrong type of asset when extracting block data "+o)}catch(i){console.error(`Problems getting the assets for the block on ${i}`);return}}static getPageState(t,n){return t.document.pageStates[n]}static getSelectedIds(t,n){return ye.getPageState(t,n).selectedIds}static getShapes(t,n){return Object.values(ye.getPage(t,n).shapes)}static getCamera(t,n){return ye.getPageState(t,n).camera}static getShape(t,n,r){return ye.getPage(t,r).shapes[n]}static getCenter(t){return ye.getShapeUtil(t).getCenter(t)}static getBounds(t){return ye.getShapeUtil(t).getBounds(t)}static getRotatedBounds(t){return ye.getShapeUtil(t).getRotatedBounds(t)}static getSelectedBounds(t){return $.getCommonBounds(ye.getSelectedShapes(t,t.appState.currentPageId).map(n=>ye.getShapeUtil(n).getBounds(n)))}static getParentId(t,n,r){return ye.getShape(t,n,r).parentId}static getDocumentBranch(t,n,r){const i=ye.getShape(t,n,r);return i.children===void 0?[n]:[n,...i.children.flatMap(o=>ye.getDocumentBranch(t,o,r))]}static getSelectedBranchSnapshot(t,n,r){const i=ye.getPage(t,n),o=ye.getSelectedIds(t,n).flatMap(a=>ye.getDocumentBranch(t,a,n).map(s=>i.shapes[s])).filter(a=>!a.isLocked).map($.deepClone);return r!==void 0?o.map(a=>({id:a.id,...r(a)})):o}static getSelectedShapeSnapshot(t,n,r){const i=ye.getSelectedShapes(t,n).filter(o=>!o.isLocked).map($.deepClone);return r!==void 0?i.map(o=>({id:o.id,...r(o)})):i}static getAllEffectedShapeIds(t,n,r){const i=ye.getPage(t,r),o=new Set(n);return n.forEach(a=>{const s=i.shapes[a];function l(u){u.children!==void 0&&u.children.filter(d=>!o.has(d)).forEach(d=>{o.add(d),l(i.shapes[d])})}l(s);function c(u){const d=u.parentId;d!==i.id&&(o.has(d)||(o.add(d),c(i.shapes[d])))}c(s),o.forEach(u=>{Object.values(i.bindings).filter(d=>d.fromId===u||d.toId===u).forEach(d=>o.add(d.fromId===u?d.toId:d.fromId))})}),Array.from(o.values())}static updateBindings(t,n,r={},i={},o){const a={...ye.getPage(t,o)};return Object.values(a.bindings).filter(s=>s.fromId===n||s.toId===n).reduce((s,l)=>(r[l.fromId]||(r[l.fromId]=$.deepClone(ye.getShape(s,l.fromId,o))),r[l.toId]||(r[l.toId]=$.deepClone(ye.getShape(s,l.toId,o))),ye.onBindingChange(ye.getShape(s,l.fromId,o),l,ye.getShape(s,l.toId,o)),i[l.fromId]=$.deepClone(ye.getShape(s,l.fromId,o)),i[l.toId]=$.deepClone(ye.getShape(s,l.toId,o)),s),t)}static getLinkedShapeIds(t,n,r,i=!0){const o=ye.getSelectedIds(t,n),a=ye.getPage(t,n),s=new Set(o),l=new Set,c=[...o],u=new Set(Object.values(a.shapes).filter(d=>{var f;return d.type===U.Arrow&&(d.handles.start.bindingId||((f=d.handles)==null?void 0:f.end.bindingId))}));for(;c.length;){const d=c.pop();if(!(d&&u.size))break;l.has(d)||(l.add(d),u.forEach(f=>{var b,x;const{handles:{start:{bindingId:p},end:{bindingId:m}}}=f,g=p?a.bindings[p]:null,y=m?a.bindings[m]:null;let v=!1;g&&g.toId===d?(r==="center"?v=!0:((b=f.decorations)==null?void 0:b.start)&&y?v=r==="left":v=r==="right",v&&(i&&s.add(f.id),s.add(d),y&&(s.add(y.toId),c.push(y.toId)))):y&&y.toId===d&&(r==="center"?v=!0:((x=f.decorations)==null?void 0:x.end)&&g?v=r==="left":v=r==="right",v&&(i&&s.add(f.id),s.add(d),g&&(s.add(g.toId),c.push(g.toId)))),(!g||s.has(g.toId))&&(!y||s.has(y.toId))&&u.delete(f)}))}return Array.from(s.values())}static getChildIndexAbove(t,n,r){const i=t.document.pages[r],o=i.shapes[n];let a;if(o.parentId===i.id)a=Object.values(i.shapes).filter(c=>c.parentId===i.id).sort((c,u)=>c.childIndex-u.childIndex);else{const c=i.shapes[o.parentId];if(!c.children)throw Error("No children in parent!");a=c.children.map(u=>i.shapes[u]).sort((u,d)=>u.childIndex-d.childIndex)}const s=a.indexOf(o),l=a[s+1];return l?l.childIndex:o.childIndex+1}static getBeforeShape(t,n){return Object.fromEntries(Object.keys(n).map(r=>[r,t[r]]))}static getBeforeBlock(t,n){return Object.fromEntries(Object.keys(n).map(r=>[r,t[r]]))}static mutateShapes(t,n,r,i){const o={},a={};n.forEach((c,u)=>{const d=ye.getShape(t,c,i);if(d.isLocked)return;const f=r(d,u);f&&(o[c]=ye.getBeforeShape(d,f),a[c]=f)});const s=$.deepMerge(t,{document:{pages:{[t.appState.currentPageId]:{shapes:a}}}}),l=n.reduce((c,u)=>ye.updateBindings(c,u,o,a,i),s);return{before:o,after:a,data:l}}static mutateBlockAsset(t,n,r,i){let o={},a={};try{const s=ye.getBlock(t,n,i),l=r(s);return l&&(o=ye.getBeforeBlock(s,l),a=l),{before:{block:o},after:{block:a}}}catch{return{before:{block:o},after:{block:a}}}}static createShapes(t,n,r){const i={document:{pages:{[r]:{shapes:{...Object.fromEntries(n.flatMap(a=>{const s=[[a.id,void 0]];if(a.parentId!==r){const l=ye.getShape(t,a.parentId,r);if(!l.children)throw Error("No children in parent!");s.push([l.id,{children:l.children}])}return s}))}}}}},o={document:{pages:{[r]:{shapes:{shapes:{...Object.fromEntries(n.flatMap(a=>{const s=[[a.id,a]];if(a.parentId!==r){const l=ye.getShape(t,a.parentId,r);if(!l.children)throw Error("No children in parent!");s.push([l.id,{children:[...l.children,a.id]}])}return s}))}}}}}};return{before:i,after:o}}static deleteShapes(t,n,r){r=r||t.appState.currentPageId;const i=ye.getPage(t,r),o=typeof n[0]=="string"?n:n.map(l=>l.id),a={document:{pages:{[r]:{shapes:{...Object.fromEntries(o.flatMap(l=>{const c=i.shapes[l],u=[[c.id,c]];if(c.parentId!==r){const d=i.shapes[c.parentId];if(!d.children)throw Error("No children in parent!");u.push([d.id,{children:d.children}])}return u}))},bindings:{...Object.fromEntries(Object.values(i.bindings).filter(l=>o.includes(l.fromId)||o.includes(l.toId)).map(l=>[l.id,l]))}}}}},s={document:{pages:{[r]:{shapes:{...Object.fromEntries(o.flatMap(l=>{const c=i.shapes[l],u=[[c.id,void 0]];if(c.parentId!==i.id){const d=i.shapes[c.parentId];if(!d.children)throw Error("No children in parent!");u.push([d.id,{children:d.children.filter(f=>f!==c.id)}])}return u}))}}}}};return{before:a,after:s}}static onSessionComplete(t){var r,i;const n=(i=(r=ye.getShapeUtil(t)).onSessionComplete)==null?void 0:i.call(r,t);return n?{...t,...n}:t}static onChildrenChange(t,n,r){var o,a;if(!n.children)return;const i=(a=(o=ye.getShapeUtil(n)).onChildrenChange)==null?void 0:a.call(o,n,n.children.map(s=>ye.getShape(t,s,r)));return i?{...n,...i}:n}static onBindingChange(t,n,r){var o,a;const i=(a=(o=ye.getShapeUtil(t)).onBindingChange)==null?void 0:a.call(o,t,n,r,ye.getShapeUtil(r).getBounds(r),ye.getShapeUtil(r).getExpandedBounds(r),ye.getShapeUtil(r).getCenter(r));return i?{...t,...i}:t}static transform(t,n,r){const i=ye.getShapeUtil(t).transform(t,n,r);return i?{...t,...i}:t}static transformSingle(t,n,r){const i=ye.getShapeUtil(t).transformSingle(t,n,r);return i?{...t,...i}:t}static getRotatedShapeMutation(t,n,r,i){var c,u;const o=O.sub(n,t.point),a=O.rotWith(n,r,i),s=O.toFixed(O.sub(a,o));if(t.handles!==void 0)return(u=(c=this.getShapeUtil(t)).onHandleChange)==null?void 0:u.call(c,{...t,point:s},Object.fromEntries(Object.entries(t.handles).map(([f,p])=>{const m=O.toFixed(O.rotWith(p.point,o,i));return[f,{...p,point:m}]})),{shiftKey:!1});const l=$.clampRadians((t.rotation||0)+i);return{point:s,rotation:l}}static updateParents(t,n,r){const i=ye.getPage(t,n);if(r.length===0)return;const{shapes:o}=ye.getPage(t,n),a=Array.from(new Set(r.map(s=>o[s].parentId).values())).filter(s=>s!==i.id);for(const s of a){const l=o[s];if(!l.children)throw Error("A shape is parented to a shape without a children array.");ye.onChildrenChange(t,l,n)}ye.updateParents(t,n,a)}static getBinding(t,n,r){return ye.getPage(t,r).bindings[n]}static getBindings(t,n){const r=ye.getPage(t,n);return Object.values(r.bindings)}static getBindableShapeIds(t){return ye.getShapes(t,t.appState.currentPageId).filter(n=>ye.getShapeUtil(n).canBind).sort((n,r)=>r.childIndex-n.childIndex).map(n=>n.id)}static getBindingsWithShapeIds(t,n,r){return Array.from(new Set(ye.getBindings(t,r).filter(i=>n.includes(i.toId)||n.includes(i.fromId))).values())}static getRelatedBindings(t,n,r){const i=new Set(n),o=ye.getPage(t,r),a=Object.values(o.bindings),s=new Set(a.filter(u=>i.has(u.toId)||i.has(u.fromId)));let l=s.size,c=-1;for(;c!==0;)s.forEach(u=>{const d=u.fromId;for(const f of a)f.fromId===d&&s.add(f),f.toId===d&&s.add(f)}),c=s.size-l,l=s.size;return Array.from(s.values())}static normalizeText(t){return t.replace(ye.fixNewLines,`
`)}static assertShapeHasProperty(t,n){if(t[n]===void 0)throw new Error}static warn(t){CM&&(console.warn(t),lt.warning("TLDR",t))}static error(t){CM&&(console.error(t),lt.error("TLDR",t))}};let Q=ye;S(Q,"copyStringToClipboard",t=>{try{navigator.clipboard.writeText(t)}catch{const r=document.createElement("textarea");r.setAttribute("position","fixed"),r.setAttribute("top","0"),r.setAttribute("readonly","true"),r.setAttribute("contenteditable","true"),r.style.position="fixed",r.value=t,document.body.appendChild(r),r.focus(),r.select();try{const i=document.createRange();i.selectNodeContents(r);const o=window.getSelection();o&&(o.removeAllRanges(),o.addRange(i),r.setSelectionRange(0,r.value.length))}catch{}finally{document.body.removeChild(r)}}}),S(Q,"flattenShape",(t,n)=>{var r;return[n,...((r=n.children)!=null?r:[]).map(i=>ye.getShape(t,i,t.appState.currentPageId)).sort((i,o)=>i.childIndex-o.childIndex).flatMap(i=>ye.flattenShape(t,i))]}),S(Q,"flattenPage",(t,n)=>Object.values(t.document.pages[n].shapes).sort((r,i)=>r.childIndex-i.childIndex).reduce((r,i)=>[...r,...ye.flattenShape(t,i)],[])),S(Q,"getTopChildIndex",(t,n)=>{const r=ye.getShapes(t,n);return r.length===0?1:r.filter(i=>i.parentId===n).sort((i,o)=>o.childIndex-i.childIndex)[0].childIndex+1}),S(Q,"fixNewLines",/\r?\n|\r/g);const NW={id:"doc",name:"Testboard",uuid:"03b5103b-db6c-49e5-a505-25f80b54fd47",pages:{page:{id:"page",name:"Page 1",shapes:{"0052b7f9-33d3-45d1-2fc5-c93330a9fadd":{id:"0052b7f9-33d3-45d1-2fc5-c93330a9fadd",name:"Sticky",size:[200,200],text:`Sticky notes

(for those of you
who are forgetful)`,type:"sticky",point:[848,496],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:19},"0201c2d0-1d21-46f1-0e49-f2f965132f59":{id:"0201c2d0-1d21-46f1-0e49-f2f965132f59",name:"Text",text:"What can Whiteboards do?",type:"text",point:[880,32],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1.8157894736842104,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:1},"05987556-5f4d-4d3e-0576-5990e99783f9":{id:"05987556-5f4d-4d3e-0576-5990e99783f9",name:"Text",text:`Edit your
Preferences
& Settings!`,type:"text",point:[160,112],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1.5476190476190477,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:28},"066b562a-9c49-4b32-128a-fd4c8d41220b":{id:"066b562a-9c49-4b32-128a-fd4c8d41220b",bend:0,name:"Arrow",type:"arrow",label:"",point:[640,528],style:{dash:"dashed",font:"script",size:"large",color:"#7f00ff",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[0,160],canBind:!0},bend:{id:"bend",index:2,point:[32,80]},start:{id:"start",index:0,point:[64,0],canBind:!0}},parentId:"page",rotation:0,childIndex:16,labelPoint:[.5,.5],decorations:{end:"arrow"}},"09e9cce5-fe6f-4e50-37d4-15733fb5a022":{id:"09e9cce5-fe6f-4e50-37d4-15733fb5a022",bend:0,name:"Arrow",type:"arrow",label:"",point:[1008,736],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[0,0],canBind:!0},bend:{id:"bend",index:2,point:[0,24]},start:{id:"start",index:0,point:[0,48],canBind:!0}},parentId:"page",rotation:0,childIndex:42,labelPoint:[.5,.5],decorations:[]},"0cbcb642-14c9-4eb3-3d70-30028b1f0970":{id:"0cbcb642-14c9-4eb3-3d70-30028b1f0970",bend:0,name:"Arrow",type:"arrow",label:"",point:[1056,768],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[0,0],canBind:!0},bend:{id:"bend",index:2,point:[0,8]},start:{id:"start",index:0,point:[0,16],canBind:!0}},parentId:"page",rotation:0,childIndex:43,labelPoint:[.5,.5],decorations:[]},"0f4c50b2-a5c7-40bc-2a52-3ecd82e8b8a3":{id:"0f4c50b2-a5c7-40bc-2a52-3ecd82e8b8a3",bend:0,name:"Arrow",type:"arrow",label:"",point:[448,496],style:{dash:"solid",font:"script",size:"small",color:"#7f00ff",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[160,128],canBind:!0},bend:{id:"bend",index:2,point:[80,64]},start:{id:"start",index:0,point:[0,0],canBind:!0}},parentId:"page",rotation:0,childIndex:15,labelPoint:[.5,.5],decorations:{end:"arrow"}},"18220690-26ed-4e81-3971-4ba7a7fec217":{id:"18220690-26ed-4e81-3971-4ba7a7fec217",name:"Text",text:`- Plan out your workflow
visually`,type:"text",point:[16,768],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#f0af32",isFilled:!0,textAlign:"middle"},parentId:"page",rotation:0,childIndex:37},"18d21652-7853-4228-0db0-2743ba3a9994":{id:"18d21652-7853-4228-0db0-2743ba3a9994",name:"Text",text:"What to use Whiteboards for:",type:"text",point:[0,304],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1.1578947368421053,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:31},"19e2260c-129f-4f7a-0e3b-d5437435dd7f":{id:"19e2260c-129f-4f7a-0e3b-d5437435dd7f",bend:0,name:"Arrow",type:"arrow",label:"",point:[1104,976],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[0,64],canBind:!0},bend:{id:"bend",index:2,point:[0,32]},start:{id:"start",index:0,point:[0,0],canBind:!0}},parentId:"page",rotation:0,childIndex:56,labelPoint:[.5,.5],decorations:[]},"22064e82-1c15-4977-0f3d-cc93f5a9fc41":{id:"22064e82-1c15-4977-0f3d-cc93f5a9fc41",name:"Text",text:`A Drawing tool
for diagrams or doodling!`,type:"text",point:[768,368],style:{dash:"solid",font:"script",size:"small",color:"#1e5a82",scale:1.3696498054474713,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:9},"2b969edb-6221-494d-3e50-d6db07572a85":{id:"2b969edb-6221-494d-3e50-d6db07572a85",bend:0,name:"Arrow",type:"arrow",label:"",point:[1232,976],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[48,64],canBind:!0},bend:{id:"bend",index:2,point:[24,32]},start:{id:"start",index:0,point:[0,0],canBind:!0}},parentId:"page",rotation:0,childIndex:59,labelPoint:[.5,.5],decorations:[]},"2ba1f5c6-813a-49c3-2ee8-fa7e7b326419":{id:"2ba1f5c6-813a-49c3-2ee8-fa7e7b326419",name:"Text",text:"Make the Most Out of Whiteboards!",type:"text",point:[1584,304],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1.973684210526316,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:61},"2f807454-02fc-4bec-38d2-6473b1d04681":{id:"2f807454-02fc-4bec-38d2-6473b1d04681",name:"Text",text:`Shapes! For whatever
your heart desires!`,type:"text",point:[1216,384],style:{dash:"solid",font:"script",size:"small",color:"#003c1e",scale:1.3484848484848484,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:13},"3263454a-3c67-4d9f-1ee1-15413628fcfc":{id:"3263454a-3c67-4d9f-1ee1-15413628fcfc",bend:0,name:"Arrow",type:"arrow",label:"",point:[1184,768],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[16,0],canBind:!0},bend:{id:"bend",index:2,point:[8,8]},start:{id:"start",index:0,point:[0,16],canBind:!0}},parentId:"page",rotation:0,childIndex:46,labelPoint:[.5,.5],decorations:[]},"3821705b-c453-4ea8-06ff-c951b7289999":{id:"3821705b-c453-4ea8-06ff-c951b7289999",bend:0,name:"Arrow",type:"arrow",label:"",point:[976,976],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[0,48],canBind:!0},bend:{id:"bend",index:2,point:[0,24]},start:{id:"start",index:0,point:[0,0],canBind:!0}},parentId:"page",rotation:0,childIndex:53,labelPoint:[.5,.5],decorations:[]},"3b6226fa-6a6b-400d-17a8-709db78ee29a":{id:"3b6226fa-6a6b-400d-17a8-709db78ee29a",bend:0,name:"Arrow",type:"arrow",label:"",point:[464,512],style:{dash:"solid",font:"script",size:"small",color:"#7f00ff",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[176,0],canBind:!0},bend:{id:"bend",index:2,point:[88,80]},start:{id:"start",index:0,point:[0,160],canBind:!0}},parentId:"page",rotation:0,childIndex:14,labelPoint:[.5,.5],decorations:{end:"arrow"}},"3b994a69-9766-4a30-3998-5ea02d142a14":{id:"3b994a69-9766-4a30-3998-5ea02d142a14",name:"Text",text:`- Create Tavern / Quest Boards
for your players`,type:"text",point:[0,608],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:35},"3d0a0b1a-64d7-4e0e-0a00-84c14b028601":{id:"3d0a0b1a-64d7-4e0e-0a00-84c14b028601",bend:0,name:"Arrow",type:"arrow",label:"",point:[944,768],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[0,0],canBind:!0},bend:{id:"bend",index:2,point:[8,8]},start:{id:"start",index:0,point:[16,16],canBind:!0}},parentId:"page",rotation:0,childIndex:41,labelPoint:[.5,.5],decorations:[]},"4141d7fe-47eb-4fcb-3a89-0e1425d6156f":{id:"4141d7fe-47eb-4fcb-3a89-0e1425d6156f",name:"Ellipse",type:"ellipse",label:"",point:[1360,176],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},radius:[72,64],parentId:"page",rotation:0,childIndex:11,labelPoint:[.5,.5]},"4a0a43c2-2858-47ef-185c-1028bc6fa44a":{id:"4a0a43c2-2858-47ef-185c-1028bc6fa44a",name:"Rectangle",size:[160,112],type:"rectangle",label:"",point:[1184,128],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},parentId:"page",rotation:0,childIndex:10,labelPoint:[.5,.5]},"4e2ee475-6999-46fc-1407-a4134f057361":{id:"4e2ee475-6999-46fc-1407-a4134f057361",bend:0,name:"Arrow",type:"arrow",label:"",point:[848,752],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[0,0],canBind:!0},bend:{id:"bend",index:2,point:[24,24]},start:{id:"start",index:0,point:[48,48],canBind:!0}},parentId:"page",rotation:0,childIndex:40,labelPoint:[.5,.5],decorations:[]},"515e2428-1917-4ddb-0d3c-f52ffe792364":{id:"515e2428-1917-4ddb-0d3c-f52ffe792364",name:"Draw",type:"draw",point:[912,272],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},points:[[0,0,.5],[0,0,.5],[1,1,.5],[2,2,.5],[3,5,.5],[4,7,.5],[4,9,.5],[5,12,.5],[6,14,.5],[7,15,.5],[7,17,.5],[7,18,.5],[7,19,.5],[8,19,.5],[8,20,.5],[9,21,.5],[10,22,.5],[10,23,.5],[11,23,.5],[11,24,.5],[12,25,.5]],parentId:"page",rotation:0,childIndex:6,isComplete:!0},"518a4ad1-1d1c-46cc-0751-15af69b80683":{id:"518a4ad1-1d1c-46cc-0751-15af69b80683",bend:0,name:"Arrow",type:"arrow",label:"",point:[1280,976],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[16,16],canBind:!0},bend:{id:"bend",index:2,point:[8,8]},start:{id:"start",index:0,point:[0,0],canBind:!0}},parentId:"page",rotation:0,childIndex:60,labelPoint:[.5,.5],decorations:[]},"53873476-b39f-4a52-1bb0-b96f4a334db5":{id:"53873476-b39f-4a52-1bb0-b96f4a334db5",name:"Text",text:`- Plan out your adventure or novel
with a storyboard`,type:"text",point:[0,448],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:33},"547604b3-e9df-4e22-2376-04c48e917e3f":{id:"547604b3-e9df-4e22-2376-04c48e917e3f",name:"Text",text:`And text, so you can
leave yourself little
motivational messages!`,type:"text",point:[1088,512],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1.5677966101694918,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:20},"54dceaaa-91a1-4e9f-0b47-c6be7133ec54":{id:"54dceaaa-91a1-4e9f-0b47-c6be7133ec54",name:"Triangle",size:[144,128],type:"triangle",label:"",point:[1200,240],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},parentId:"page",rotation:0,childIndex:12,labelPoint:[.5,.5]},"55dd94df-a542-4334-00ba-20f34a890c0c":{id:"55dd94df-a542-4334-00ba-20f34a890c0c",name:"Text",text:`- Create Mind Maps for current
or future articles`,type:"text",point:[0,368],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:32},"5a45522e-7b94-4d83-29f0-24d3e2c679f3":{id:"5a45522e-7b94-4d83-29f0-24d3e2c679f3",name:"Text",text:`Directly link to articles
so they're only one
click away!`,type:"text",point:[432,336],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1.2365145228215768,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:3},"5bd35455-db71-45d9-02d3-5dbacd56c7ca":{id:"5bd35455-db71-45d9-02d3-5dbacd56c7ca",bend:0,name:"Arrow",type:"arrow",label:"",point:[1184,1136],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[0,16],canBind:!0},bend:{id:"bend",index:2,point:[0,8]},start:{id:"start",index:0,point:[0,0],canBind:!0}},parentId:"page",rotation:0,childIndex:25,labelPoint:[.5,.5],decorations:{end:"arrow"}},"5ecd2560-ff34-4f33-0ff2-5250c5698875":{id:"5ecd2560-ff34-4f33-0ff2-5250c5698875",bend:0,name:"Arrow",type:"arrow",label:"",point:[1152,768],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[0,0],canBind:!0},bend:{id:"bend",index:2,point:[0,8]},start:{id:"start",index:0,point:[0,16],canBind:!0}},parentId:"page",rotation:0,childIndex:45,labelPoint:[.5,.5],decorations:[]},"60f51f53-117e-42ab-2e93-925e2c3e7fda":{id:"60f51f53-117e-42ab-2e93-925e2c3e7fda",name:"Text",text:"You're cute! :)",type:"text",point:[1360,672],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1.006896551724138,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:21},"626c593c-2434-4288-3e45-befb3b5b36fb":{id:"626c593c-2434-4288-3e45-befb3b5b36fb",name:"Text",text:" ",type:"text",point:[896,544],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:29},"63b519b5-169f-444e-197c-7af8a99766fa":{id:"63b519b5-169f-444e-197c-7af8a99766fa",bend:0,name:"Arrow",type:"arrow",label:"",point:[96,80],style:{dash:"solid",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[0,0],canBind:!0},bend:{id:"bend",index:2,point:[40,32]},start:{id:"start",index:0,point:[80,64],canBind:!0}},parentId:"page",rotation:0,childIndex:27,labelPoint:[.5,.5],decorations:{end:"arrow"}},"694034c9-75d4-4ce4-31e0-a6fa2e20ddbf":{id:"694034c9-75d4-4ce4-31e0-a6fa2e20ddbf",name:"Block",size:[320,192],type:"block",asset:{id:"170e9196-e343-472e-2af4-4f1c658600ee",src:"",size:[320,192],type:"block",block:{uuid:"2cd1c534-9778-43c4-8403-3aabbb8ba84e",likes:null,tlUrl:"https://www.worldanvil.com/w/WorldAnvilCodex/a/whiteboards",views:40,author:{id:"17c15203-026e-4ac4-88ab-85641c5cf145",url:"http://www.worldanvil.com/author/Ayydam",avatar:{id:3029095,url:"https://www.worldanvil.com/uploads/images/3c9a612ac1f49d3fdb5db7852a209306.jpeg",state:"public",title:"gJ86xOHQ.jpeg",page_url:"http://www.worldanvil.com/i/3029095",subscribergroups:[]},username:"Ayydam"},tlIcon:"ra ra-fairy",excerpt:null,rawData:{id:"2cd1c534-9778-43c4-8403-3aabbb8ba84e",url:"https://www.worldanvil.com/w/WorldAnvilCodex/a/whiteboards",icon:"ra ra-fairy",tags:null,cover:{id:3202975,url:"https://www.worldanvil.com/uploads/images/8a537f32710a399ac7cfd358f327e41c.png",state:"public",title:"Fae header.png",page_url:"http://www.worldanvil.com/i/3202975",subscribergroups:[]},likes:null,state:"public",title:"Fae of the Forest",views:40,world:{id:"814fe58c-904e-49a9-821d-0ef392afbcc4",url:"http://www.worldanvil.com/w/fearann-Ur-ayydam",slug:"fearann-Ur-ayydam",state:"public",title:"Fearann \xD9r"},author:{id:"17c15203-026e-4ac4-88ab-85641c5cf145",url:"http://www.worldanvil.com/author/Ayydam",avatar:{id:3029095,url:"https://www.worldanvil.com/uploads/images/3c9a612ac1f49d3fdb5db7852a209306.jpeg",state:"public",title:"gJ86xOHQ.jpeg",page_url:"http://www.worldanvil.com/i/3029095",subscribergroups:[]},username:"Ayydam"},is_wip:!0,excerpt:null,category:{id:"a860c978-5ba0-487a-b656-108e47381592",url:"http://www.worldanvil.com/w/fearann-Ur-ayydam/c/enigmas-26-higher-beings-category",slug:"enigmas-26-higher-beings-category",title:"Enigmas & Higher Beings"},is_draft:!1,passcode:null,position:null,template:"person",wordcount:208,css_styles:null,css_classes:null,update_date:{date:"2022-03-26 09:57:47.000000",timezone:"UTC",timezone_type:3},creation_date:{date:"2021-05-25 23:35:33.000000",timezone:"UTC",timezone_type:3},metadata_user:null,metadata_article:null,publication_date:{date:"2021-05-25 23:50:39.000000",timezone:"UTC",timezone_type:3},subscribergroups:[],notification_date:null},tlTitle:"Fae of the Forest",template:"person",tlWaType:"articles",blockType:"DEFAULT",tlBgColor:"#000000",tlBgImage:"https://www.worldanvil.com/uploads/images/8a537f32710a399ac7cfd358f327e41c.png",tlShowText:!0}},point:[416,128],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},assetId:"assetId",maxWidth:640,minWidth:320,parentId:"page",rotation:0,maxHeight:384,minHeight:192,childIndex:2},"69838d9a-5bbf-4d2a-116e-d3ce37ec6cda":{id:"69838d9a-5bbf-4d2a-116e-d3ce37ec6cda",name:"Text",text:`- Link articles together with
relationship webs`,type:"text",point:[0,688],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:36},"6a4da6de-862e-40d1-043a-15bff2eb587c":{id:"6a4da6de-862e-40d1-043a-15bff2eb587c",link:"https://youtu.be/RhftTnO9EzA",name:"Image",size:[318,158],type:"image",point:[1888,400],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},assetId:"5a15873f-d053-4062-2ab1-6494487094bd",parentId:"page",rotation:0,childIndex:62,tlStrokeColor:"#ffffff"},"6cd4185e-322a-4733-3ff2-7abd09f3bbe0":{id:"6cd4185e-322a-4733-3ff2-7abd09f3bbe0",bend:0,name:"Arrow",type:"arrow",label:"",point:[1184,976],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[0,64],canBind:!0},bend:{id:"bend",index:2,point:[0,32]},start:{id:"start",index:0,point:[0,0],canBind:!0}},parentId:"page",rotation:0,childIndex:58,labelPoint:[.5,.5],decorations:[]},"6d304afa-4ed6-4d15-38d1-95c3bf8c1de1":{id:"6d304afa-4ed6-4d15-38d1-95c3bf8c1de1",name:"Ellipse",type:"ellipse",label:"",point:[1568,656],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},radius:[64,64],parentId:"page",rotation:0,childIndex:.5,labelPoint:[.5,.5]},"744da32c-abf5-4b57-1163-7aed8273aa78":{id:"744da32c-abf5-4b57-1163-7aed8273aa78",name:"Rectangle",size:[352,640],type:"rectangle",label:"",point:[0,288],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#f0af32",isFilled:!0},parentId:"page",rotation:0,childIndex:30,labelPoint:[.5,.5]},"7e23a738-3ea0-4afe-2cff-a6d114090a9f":{id:"7e23a738-3ea0-4afe-2cff-a6d114090a9f",name:"Draw",type:"draw",point:[912,272],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},points:[[0,0,.5],[0,0,.5],[1,3,.5],[2,4,.5],[3,6,.5],[3,8,.5],[5,9,.5],[5,10,.5],[6,11,.5],[7,12,.5],[7,13,.5],[8,13,.5],[9,13,.5],[10,15,.5],[11,16,.5],[13,17,.5],[14,19,.5],[15,21,.5],[17,23,.5],[18,25,.5],[19,27,.5],[19,28,.5],[20,28,.5],[21,29,.5],[22,29,.5],[22,30,.5]],parentId:"page",rotation:0,childIndex:7,isComplete:!0},"7f89a1bf-4cf6-4317-05f5-10a8dbd9141b":{id:"7f89a1bf-4cf6-4317-05f5-10a8dbd9141b",bend:0,name:"Arrow",type:"arrow",label:"",point:[880,976],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[16,0],canBind:!0},bend:{id:"bend",index:2,point:[8,16]},start:{id:"start",index:0,point:[0,32],canBind:!0}},parentId:"page",rotation:0,childIndex:51,labelPoint:[.5,.5],decorations:[]},"86f265e1-cc42-42b0-21ae-c46015c802fa":{id:"86f265e1-cc42-42b0-21ae-c46015c802fa",bend:0,name:"Arrow",type:"arrow",label:"",point:[816,960],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[48,0],canBind:!0},bend:{id:"bend",index:2,point:[24,16]},start:{id:"start",index:0,point:[0,32],canBind:!0}},parentId:"page",rotation:0,childIndex:50,labelPoint:[.5,.5],decorations:[]},"8d3b0747-dff8-4929-3fee-cda213f43cef":{id:"8d3b0747-dff8-4929-3fee-cda213f43cef",bend:0,name:"Arrow",type:"arrow",label:"",point:[912,976],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[32,0],canBind:!0},bend:{id:"bend",index:2,point:[16,32]},start:{id:"start",index:0,point:[0,64],canBind:!0}},parentId:"page",rotation:0,childIndex:52,labelPoint:[.5,.5],decorations:[]},"8f983c7a-1e0b-4ca3-22e5-2a715c03c79a":{id:"8f983c7a-1e0b-4ca3-22e5-2a715c03c79a",bend:0,name:"Arrow",type:"arrow",label:"",point:[1104,736],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[0,0],canBind:!0},bend:{id:"bend",index:2,point:[0,24]},start:{id:"start",index:0,point:[0,48],canBind:!0}},parentId:"page",rotation:0,childIndex:44,labelPoint:[.5,.5],decorations:[]},"927f2639-a2c7-41cc-289e-5da549adb8cb":{id:"927f2639-a2c7-41cc-289e-5da549adb8cb",bend:0,name:"Arrow",type:"arrow",label:"",point:[1232,752],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[48,0],canBind:!0},bend:{id:"bend",index:2,point:[24,24]},start:{id:"start",index:0,point:[0,48],canBind:!0}},parentId:"page",rotation:0,childIndex:47,labelPoint:[.5,.5],decorations:[]},"96b11b23-aee8-43cd-2087-abe3c7d3b473":{id:"96b11b23-aee8-43cd-2087-abe3c7d3b473",name:"Text",text:`- Diagram any of those crazy
concepts from your world`,type:"text",point:[0,528],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:34},"9d0af60d-5fd3-4194-3335-425950edaa4c":{id:"9d0af60d-5fd3-4194-3335-425950edaa4c",bend:0,name:"Arrow",type:"arrow",label:"",point:[1677,749.62],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[179,194.38],canBind:!0},bend:{id:"bend",index:2,point:[89.5,97.19]},start:{id:"start",index:0,point:[0,0],canBind:!0,bindingId:"5627ffa9-5fd0-479b-1d78-03b3fe79e404"}},parentId:"page",rotation:0,childIndex:.375,labelPoint:[.5,.5],decorations:{end:"arrow"}},"a16fca92-6471-4752-0534-2d0cf6aa5c8d":{id:"a16fca92-6471-4752-0534-2d0cf6aa5c8d",link:"https://youtu.be/DQHJfVW5cz8",name:"Image",size:[318,158],type:"image",point:[1888,880],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},assetId:"1f478e7f-404a-4d22-3506-4fcbc06f8b1a",parentId:"page",rotation:0,childIndex:64,tlStrokeColor:"#ffffff"},"a217888f-237e-487a-1266-8308c4d0f26b":{id:"a217888f-237e-487a-1266-8308c4d0f26b",bend:0,name:"Arrow",type:"arrow",label:"",point:[1677,720],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[181.5,0],canBind:!0},bend:{id:"bend",index:2,point:[90.75,.41]},start:{id:"start",index:0,point:[0,.81],canBind:!0,bindingId:"dabec6de-4414-4dae-3ae8-f7d10ac6718e"}},parentId:"page",rotation:0,childIndex:.25,labelPoint:[.5,.5],decorations:{end:"arrow"}},"a271bb18-b939-4971-2ad1-01a7adebcbc4":{id:"a271bb18-b939-4971-2ad1-01a7adebcbc4",bend:0,name:"Arrow",type:"arrow",label:"",point:[1680,495.08],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[192,0],canBind:!0,bindingId:"79a29f36-2073-4e49-1da4-ebb923956ba2"},bend:{id:"bend",index:2,point:[96,96.46]},start:{id:"start",index:0,point:[0,192.92],canBind:!0}},parentId:"page",rotation:0,childIndex:.125,labelPoint:[.5,.5],decorations:{end:"arrow"}},"a39437ae-f19d-4d94-2560-4abf88d8ab7c":{id:"a39437ae-f19d-4d94-2560-4abf88d8ab7c",name:"Text",text:"Add Images, Articles, or any of our other tools down here!",type:"text",point:[704,1072],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1.599154135338346,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:24},"b0d687f7-9f66-4b2e-0222-9a87b9e77ef1":{id:"b0d687f7-9f66-4b2e-0222-9a87b9e77ef1",bend:0,name:"Arrow",type:"arrow",label:"",point:[816,800],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[18.87,8],canBind:!0,bindingId:"fe1e2796-09ec-4f0b-050b-e1f8d00e73c4"},bend:{id:"bend",index:2,point:[9.44,4]},start:{id:"start",index:0,point:[0,0],canBind:!0}},parentId:"page",rotation:0,childIndex:49,labelPoint:[.5,.5],decorations:[]},"b43fd41d-e0b2-4ce5-013c-94df9fab3922":{id:"b43fd41d-e0b2-4ce5-013c-94df9fab3922",name:"Text",text:`Connector Arrows
(for those who like to point at things)`,type:"text",point:[368,720],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1.121212121212121,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:18},"bf6a0222-a423-4597-373b-b7e92ab2ddda":{id:"bf6a0222-a423-4597-373b-b7e92ab2ddda",name:"Text",text:`...and any other uses you
can dream of!`,type:"text",point:[32,848],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#f0af32",isFilled:!0,textAlign:"middle"},parentId:"page",rotation:0,childIndex:38},"c7a8d4bc-eee9-4a6b-363b-059e814ac094":{id:"c7a8d4bc-eee9-4a6b-363b-059e814ac094",name:"Text",text:`CLICK
HERE!`,type:"text",point:[1600,688],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:65},"db80e529-38e1-4c9d-13e4-83bf14f9df38":{id:"db80e529-38e1-4c9d-13e4-83bf14f9df38",name:"Text",text:`Looking to Start Fresh?
Hit CTRL + A and then DEL or Backspace
to remove everything on the screen!`,type:"text",point:[800,816],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1.26636216466235,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:39},"e5849aba-3c2a-4c92-3d5d-a7f8b840013e":{id:"e5849aba-3c2a-4c92-3d5d-a7f8b840013e",bend:0,name:"Arrow",type:"arrow",label:"",point:[1024,976],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[0,64],canBind:!0},bend:{id:"bend",index:2,point:[0,32]},start:{id:"start",index:0,point:[0,0],canBind:!0}},parentId:"page",rotation:0,childIndex:54,labelPoint:[.5,.5],decorations:[]},"e6cedf9a-9ca4-4cc4-2969-6533855e12d8":{id:"e6cedf9a-9ca4-4cc4-2969-6533855e12d8",link:"https://youtu.be/uIJND_QTJ-Y",name:"Image",size:[318,158],type:"image",point:[1888,640],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},assetId:"ad26eb74-4a66-4f9c-25b2-fefce19c441d",parentId:"page",rotation:0,childIndex:63,tlStrokeColor:"#ffffff"},"e895202a-9813-4e89-1861-a79d79190660":{id:"e895202a-9813-4e89-1861-a79d79190660",bend:0,name:"Arrow",type:"arrow",label:"",point:[464,496],style:{dash:"solid",font:"script",size:"small",color:"#7f00ff",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[80,0],canBind:!0},bend:{id:"bend",index:2,point:[40,48]},start:{id:"start",index:0,point:[0,96],canBind:!0}},parentId:"page",rotation:0,childIndex:17,labelPoint:[.5,.5],decorations:{end:"arrow"}},"e909b7da-6737-444a-28a8-234d2c9064a2":{id:"e909b7da-6737-444a-28a8-234d2c9064a2",name:"Text",text:`Change Colour, Font Size and other
properties up here`,type:"text",point:[1680,128],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1.4338028169014083,bgColor:"#ffffff",isFilled:!1,textAlign:"middle"},parentId:"page",rotation:0,childIndex:22},"eae64118-b130-4eff-29af-8fb76436d98a":{id:"eae64118-b130-4eff-29af-8fb76436d98a",name:"Draw",type:"draw",point:[976,128],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},points:[[0,0,.5],[0,0,.5],[1,0,.5],[2,0,.5],[3,0,.5],[6,0,.5],[8,0,.5],[12,2,.5],[16,3,.5],[21,4,.5],[26,7,.5],[31,9,.5],[36,12,.5],[40,15,.5],[44,19,.5],[48,22,.5],[51,26,.5],[54,30,.5],[57,34,.5],[59,37,.5],[62,41,.5],[64,45,.5],[66,50,.5],[67,54,.5],[68,58,.5],[69,62,.5],[69,67,.5],[69,71,.5],[68,74,.5],[67,78,.5],[64,81,.5],[63,82,.5],[61,83,.5],[60,83,.5],[59,83,.5],[57,82,.5],[56,81,.5],[55,79,.5],[54,78,.5],[52,76,.5],[51,75,.5],[49,73,.5],[47,71,.5],[46,69,.5],[45,68,.5],[44,67,.5],[43,66,.5]],parentId:"page",rotation:0,childIndex:5,isComplete:!0},"efac7826-6e7e-4426-396c-aa2cd5fa546d":{id:"efac7826-6e7e-4426-396c-aa2cd5fa546d",name:"Draw",type:"draw",point:[880,288],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},points:[[0,20,.5],[0,20,.5],[0,21,.5],[0,22,.5],[0,23,.5],[1,25,.5],[2,26,.5],[2,28,.5],[3,29,.5],[3,30,.5],[4,32,.5],[5,33,.5],[6,35,.5],[6,36,.5],[7,37,.5],[7,39,.5],[8,40,.5],[9,42,.5],[11,44,.5],[12,45,.5],[14,45,.5],[15,46,.5],[17,46,.5],[18,47,.5],[19,47,.5],[20,47,.5],[21,47,.5],[22,47,.5],[24,48,.5],[26,48,.5],[29,48,.5],[32,49,.5],[36,49,.5],[39,50,.5],[43,50,.5],[46,50,.5],[49,50,.5],[50,50,.5],[52,51,.5],[53,51,.5],[55,51,.5],[56,50,.5],[57,50,.5],[58,49,.5],[59,49,.5],[60,48,.5],[61,47,.5],[62,47,.5],[63,46,.5],[65,45,.5],[66,43,.5],[68,42,.5],[69,41,.5],[70,39,.5],[71,38,.5],[72,36,.5],[73,35,.5],[74,33,.5],[74,32,.5],[75,30,.5],[76,28,.5],[76,26,.5],[76,24,.5],[76,22,.5],[77,20,.5],[77,18,.5],[77,16,.5],[77,14,.5],[78,13,.5],[78,12,.5],[78,10,.5],[78,9,.5],[78,8,.5],[78,6,.5],[78,5,.5],[78,4,.5],[78,3,.5],[78,2,.5],[77,1,.5],[77,0,.5]],parentId:"page",rotation:0,childIndex:8,isComplete:!0},"f3c4d6c5-524d-41a6-3ee8-edbc9b178282":{id:"f3c4d6c5-524d-41a6-3ee8-edbc9b178282",bend:0,name:"Arrow",type:"arrow",label:"",point:[1152,976],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[0,32],canBind:!0},bend:{id:"bend",index:2,point:[0,16]},start:{id:"start",index:0,point:[0,0],canBind:!0}},parentId:"page",rotation:0,childIndex:57,labelPoint:[.5,.5],decorations:[]},"f41a466f-f9aa-4740-1980-5964d786cfbe":{id:"f41a466f-f9aa-4740-1980-5964d786cfbe",bend:0,name:"Arrow",type:"arrow",label:"",point:[1264,784],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[32,0],canBind:!0},bend:{id:"bend",index:2,point:[16,16]},start:{id:"start",index:0,point:[0,32],canBind:!0}},parentId:"page",rotation:0,childIndex:48,labelPoint:[.5,.5],decorations:[]},"f8ff3d27-6e0a-45e4-38b3-b4fe1ddd39b0":{id:"f8ff3d27-6e0a-45e4-38b3-b4fe1ddd39b0",name:"Draw",type:"draw",point:[816,160],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},points:[[40,89,.5],[40,89,.5],[35,86,.5],[32,85,.5],[30,84,.5],[29,83,.5],[28,82,.5],[27,82,.5],[25,81,.5],[23,80,.5],[22,79,.5],[20,77,.5],[19,75,.5],[17,72,.5],[15,70,.5],[13,67,.5],[11,63,.5],[8,60,.5],[6,56,.5],[4,51,.5],[3,47,.5],[1,43,.5],[0,39,.5],[0,36,.5],[0,34,.5],[0,31,.5],[0,29,.5],[0,27,.5],[2,24,.5],[3,22,.5],[6,20,.5],[8,18,.5],[11,17,.5],[14,15,.5],[18,14,.5],[22,13,.5],[28,12,.5],[35,12,.5],[42,11,.5],[49,11,.5],[56,11,.5],[61,12,.5],[66,12,.5],[70,14,.5],[74,15,.5],[78,18,.5],[82,20,.5],[86,23,.5],[89,27,.5],[90,31,.5],[91,35,.5],[93,39,.5],[94,43,.5],[94,46,.5],[94,48,.5],[94,51,.5],[94,53,.5],[94,56,.5],[95,58,.5],[96,61,.5],[98,64,.5],[100,67,.5],[103,69,.5],[107,72,.5],[111,73,.5],[116,75,.5],[122,75,.5],[127,75,.5],[133,75,.5],[137,75,.5],[140,75,.5],[142,74,.5],[145,73,.5],[146,72,.5],[148,70,.5],[149,68,.5],[150,66,.5],[152,63,.5],[153,60,.5],[154,56,.5],[155,53,.5],[155,49,.5],[155,45,.5],[155,42,.5],[154,37,.5],[151,32,.5],[148,27,.5],[145,22,.5],[141,17,.5],[137,13,.5],[133,9,.5],[129,5,.5],[125,3,.5],[123,2,.5],[121,1,.5],[121,0,.5],[120,0,.5],[119,0,.5],[116,0,.5],[113,0,.5],[110,0,.5],[106,0,.5],[102,2,.5],[99,3,.5],[97,4,.5],[95,6,.5],[94,7,.5]],parentId:"page",rotation:0,childIndex:4,isComplete:!0},"f9e73de0-e6a5-41c1-2849-2cbdc98e6dd7":{id:"f9e73de0-e6a5-41c1-2849-2cbdc98e6dd7",bend:0,name:"Arrow",type:"arrow",label:"",point:[2080,64],style:{dash:"solid",font:"script",size:"small",color:"#000000",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[96,0],canBind:!0},bend:{id:"bend",index:2,point:[48,24]},start:{id:"start",index:0,point:[0,48],canBind:!0}},parentId:"page",rotation:0,childIndex:23,labelPoint:[.5,.5],decorations:{end:"arrow"}},"ff511deb-6fad-40aa-27d4-4d7782e5b8d1":{id:"ff511deb-6fad-40aa-27d4-4d7782e5b8d1",bend:0,name:"Arrow",type:"arrow",label:"",point:[1056,976],style:{dash:"solid",font:"script",size:"small",color:"#f0af32",scale:1,bgColor:"#ffffff",isFilled:!1},handles:{end:{id:"end",index:1,point:[0,32],canBind:!0},bend:{id:"bend",index:2,point:[0,16]},start:{id:"start",index:0,point:[0,0],canBind:!0}},parentId:"page",rotation:0,childIndex:55,labelPoint:[.5,.5],decorations:[]}},bindings:{"5627ffa9-5fd0-479b-1d78-03b3fe79e404":{id:"5627ffa9-5fd0-479b-1d78-03b3fe79e404",toId:"c7a8d4bc-eee9-4a6b-363b-059e814ac094",type:"arrow",point:[.53,.32],fromId:"9d0af60d-5fd3-4194-3335-425950edaa4c",distance:8,handleId:"start"},"79a29f36-2073-4e49-1da4-ebb923956ba2":{id:"79a29f36-2073-4e49-1da4-ebb923956ba2",toId:"6a4da6de-862e-40d1-043a-15bff2eb587c",type:"arrow",point:[.17,.27],fromId:"a271bb18-b939-4971-2ad1-01a7adebcbc4",distance:16,handleId:"end"},"dabec6de-4414-4dae-3ae8-f7d10ac6718e":{id:"dabec6de-4414-4dae-3ae8-f7d10ac6718e",toId:"c7a8d4bc-eee9-4a6b-363b-059e814ac094",type:"arrow",point:[.5,.5],fromId:"a217888f-237e-487a-1266-8308c4d0f26b",distance:8,handleId:"start"},"fe1e2796-09ec-4f0b-050b-e1f8d00e73c4":{id:"fe1e2796-09ec-4f0b-050b-e1f8d00e73c4",toId:"db80e529-38e1-4c9d-13e4-83bf14f9df38",type:"arrow",point:[.41,.58],fromId:"b0d687f7-9f66-4b2e-0222-9a87b9e77ef1",distance:8,handleId:"end"}},childIndex:1}},state:"public",title:"Testboard",assets:{"1f478e7f-404a-4d22-3506-4fcbc06f8b1a":{id:"1f478e7f-404a-4d22-3506-4fcbc06f8b1a",src:"https://www.worldanvil.com/uploads/images/a9cfca846617f3c6c9b138821c4475a5.jpg",size:[480,268],type:"image"},"5a15873f-d053-4062-2ab1-6494487094bd":{id:"5a15873f-d053-4062-2ab1-6494487094bd",src:"https://www.worldanvil.com/uploads/images/e763b5ac85444aff3225a7af45dc5904.jpg",size:[1280,720],type:"image"},"ad26eb74-4a66-4f9c-25b2-fefce19c441d":{id:"ad26eb74-4a66-4f9c-25b2-fefce19c441d",src:"https://www.worldanvil.com/uploads/images/bf722191e67c5f5dcd4c023763dc30be.jpg",size:[480,267],type:"image"}},version:16,settings:{showGrid:!0,isPenMode:!1,isDarkMode:!1,isSnapping:!1,isZoomSnap:!1,isDebugMode:!1,isFocusMode:!1,isReadonlyMode:!1,showCloneHandles:!1,showRotateHandles:!0,nudgeDistanceLarge:16,nudgeDistanceSmall:1,showBindingHandles:!1},pageStates:{page:{id:"page",camera:{zoom:1,point:[6.77,25]},editingId:null,hoveredId:"5a45522e-7b94-4d83-29f0-24d3e2c679f3",selectedIds:["5a45522e-7b94-4d83-29f0-24d3e2c679f3"]}},userSettings:{tlBgColor:"#000000",tlShowText:!0,recentIcons:[],DANGEROUSLY_SET_CSS:{cursor:"unset",background:"white"}},subscribergroups:[]},zAe=e=>e.settings;function jAe(){const e=at(),{t}=dn("",{keyPrefix:"externalUI"}),n=e.useStore(zAe),r=h.exports.useCallback(()=>{e.setSetting("isDebugMode",c=>!c)},[e]),i=h.exports.useCallback(()=>{e.setSetting("isFocusMode",c=>!c)},[e]),o=h.exports.useCallback(()=>{e.setSetting("showRotateHandles",c=>!c)},[e]),a=h.exports.useCallback(()=>{e.setSetting("showGrid",c=>!c)},[e]),s=h.exports.useCallback(()=>{e.setSetting("isSnapping",c=>!c)},[e]),l=h.exports.useCallback(()=>{e.setSetting("showCloneHandles",c=>!c)},[e]);return Z(eV,{label:t("preferences"),children:[k(tu,{checked:n.isFocusMode,onCheckedChange:i,kbd:"#.",children:t("focusMode")}),uo.isDevelopment&&k(tu,{checked:n.isDebugMode,onCheckedChange:r,children:t("debugMode")}),k(Ip,{}),k(tu,{checked:n.showRotateHandles,onCheckedChange:o,children:t("rotateHandles")}),k(tu,{checked:n.showCloneHandles,onCheckedChange:l,children:t("cloneHandles")}),k(tu,{checked:n.showGrid,onCheckedChange:a,kbd:"#\u21E7G",children:t("grid")}),k(tu,{checked:n.isSnapping,onCheckedChange:s,children:t("alwaysShowSnaps")})]})}const HAe=e=>e.document.pageStates[e.appState.currentPageId].selectedIds.length,VAe=h.exports.memo(function({readOnly:t}){const n=at(),{t:r}=dn("",{keyPrefix:"externalUI"}),i=kd(E=>E.user.canvasId),o=n.useStore(ln(HAe)),[,a]=h.exports.useState(0);h.exports.useEffect(()=>a(1),[]);const s=h.exports.useCallback(()=>{n.cut()},[n]),l=h.exports.useCallback(()=>{n.copy()},[n]),c=h.exports.useCallback(()=>{n.paste()},[n]);h.exports.useCallback(()=>{n.copySvg()},[n]),h.exports.useCallback(()=>{n.copyJson()},[n]);const u=h.exports.useCallback(()=>{n.selectAll()},[n]),d=h.exports.useCallback(()=>{n.selectNone()},[n]),f=$le(),p=h.exports.useCallback(()=>{const E="bbcode-toast";Q.copyStringToClipboard(Z6e(i)),Tp.isActive(E)||Tp({id:E,title:r("copiedToClipboard"),description:r("copiedToClipboardLabel"),status:"success",position:"top-right",duration:3e3,isClosable:!0})},[n,i]),{worldId:m,api:g,serverUrl:y,userId:v}=kd(E=>E.user),b=h.exports.useCallback(async()=>{await(g==null?void 0:g.deleteCanvas(i))},[n,g]),x=h.exports.useCallback(()=>{n.handleModalOpened(sr.background)},[n]),w=(o!=null?o:0)>0;return t?k(Pe,{}):Z(Ka,{dir:"ltr",children:[k(Tke,{isSponsor:!1,children:k(g9e,{})}),Z(ef,{variant:"menu",children:[!t&&Z(Pe,{children:[Z(ar,{onSelect:Wt,onClick:p,kbd:"",children:[k(Kt,{icon:"fas fa-clipboard"}),r("copyElementToClipboard",{element:""})]}),Z(eV,{label:r("edit"),children:[k(ar,{onSelect:Wt,onClick:x,kbd:"",children:r("changeBg")}),k(ar,{onSelect:Wt,onClick:n.undo,kbd:"#Z",children:r("undo")}),k(ar,{onSelect:Wt,onClick:n.redo,kbd:"#Y",children:r("redo")}),k(Ip,{dir:"ltr"}),k(ar,{onSelect:Wt,disabled:!w,onClick:s,kbd:"#X",children:r("cut")}),k(ar,{onSelect:Wt,disabled:!w,onClick:l,kbd:"#C",children:r("copy")}),k(ar,{onSelect:Wt,onClick:c,kbd:"#V",children:r("paste")}),k(Ip,{dir:"ltr"}),k(ar,{onSelect:Wt,onClick:u,kbd:"#A",children:r("selectAll")}),k(ar,{onSelect:Wt,onClick:d,children:r("selectNone")}),k(ar,{onSelect:f.onOpen,onClick:d,children:r("setDefaultCanvas")}),k(ar,{onClick:b,children:r("deleteCanvas")})]}),k(Ip,{dir:"ltr"})]}),k(jAe,{})]}),k(WAe,{disclosure:f})]})}),WAe=({disclosure:e})=>{const t=h.exports.useRef(null),n=at(),r=h.exports.useCallback(()=>{n.updateDocument(NW)},[n]),i=()=>{r(),s()},{t:o}=dn("",{keyPrefix:"externalUI"}),{isOpen:a,onClose:s}=e;return k(Pe,{children:k(nhe,{isOpen:a,leastDestructiveRef:t,onClose:s,children:k(d6,{children:Z(rhe,{children:[k(u6,{fontSize:"lg",fontWeight:"bold",children:o("replaceTitle")}),k(s6,{children:o("sure")}),Z(c6,{children:[k(Dr,{ref:t,onClick:s,children:o("cancel")}),k(Dr,{colorScheme:"red",onClick:i,ml:3,children:o("replace")})]})]})})})})},[UAe,zW]=ko("Dialog"),[GAe,Ya]=UAe("Dialog"),KAe=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0,allowPinchZoom:s}=e,l=h.exports.useRef(null),c=h.exports.useRef(null),[u=!1,d]=b2({prop:r,defaultProp:i,onChange:o});return h.exports.createElement(GAe,{scope:t,triggerRef:l,contentRef:c,contentId:Pa(),titleId:Pa(),descriptionId:Pa(),open:u,onOpenChange:d,onOpenToggle:h.exports.useCallback(()=>d(f=>!f),[d]),modal:a,allowPinchZoom:s},n)},qAe=h.exports.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ya("DialogTrigger",n),o=un(t,i.triggerRef);return h.exports.createElement(rn.button,J({type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":M8(i.open)},r,{ref:o,onClick:Ee(e.onClick,i.onOpenToggle)}))}),YAe=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=Ya("DialogPortal",t);return h.exports.createElement(h.exports.Fragment,null,h.exports.Children.map(r,a=>h.exports.createElement(cl,{present:n||o.open},h.exports.createElement($4e,{asChild:!0,container:i},a))))},XAe=h.exports.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Ya("DialogOverlay",e.__scopeDialog);return i.modal?h.exports.createElement(cl,{present:n||i.open},h.exports.createElement(ZAe,J({},r,{ref:t}))):null}),ZAe=h.exports.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ya("DialogOverlay",n);return h.exports.createElement(a6,{as:xh,allowPinchZoom:i.allowPinchZoom,shards:[i.contentRef]},h.exports.createElement(rn.div,J({"data-state":M8(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),QAe=h.exports.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Ya("DialogContent",e.__scopeDialog);return h.exports.createElement(cl,{present:n||i.open},i.modal?h.exports.createElement(JAe,J({},r,{ref:t})):h.exports.createElement(eLe,J({},r,{ref:t})))}),JAe=h.exports.forwardRef((e,t)=>{const n=Ya("DialogContent",e.__scopeDialog),r=h.exports.useRef(null),i=un(t,n.contentRef,r);return h.exports.useEffect(()=>{const o=r.current;if(o)return qC(o)},[]),h.exports.createElement(jW,J({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ee(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Ee(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Ee(e.onFocusOutside,o=>o.preventDefault())}))}),eLe=h.exports.forwardRef((e,t)=>{const n=Ya("DialogContent",e.__scopeDialog),r=h.exports.useRef(!1);return h.exports.createElement(jW,J({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,a;(o=e.onCloseAutoFocus)===null||o===void 0||o.call(e,i),i.defaultPrevented||(r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()),r.current=!1},onInteractOutside:i=>{var o,a;(o=e.onInteractOutside)===null||o===void 0||o.call(e,i),i.defaultPrevented||(r.current=!0);const s=i.target;!((a=n.triggerRef.current)===null||a===void 0)&&a.contains(s)&&i.preventDefault()}}))}),jW=h.exports.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=Ya("DialogContent",n),l=h.exports.useRef(null),c=un(t,l);return oj(),h.exports.createElement(h.exports.Fragment,null,h.exports.createElement(bj,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},h.exports.createElement(Sj,J({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":M8(s.open)},a,{ref:c,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),tLe=h.exports.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ya("DialogClose",n);return h.exports.createElement(rn.button,J({type:"button"},r,{ref:t,onClick:Ee(e.onClick,()=>i.onOpenChange(!1))}))});function M8(e){return e?"open":"closed"}const[nLe,WFe]=aj("DialogTitleWarning",{contentName:"DialogContent",titleName:"DialogTitle",docsSlug:"dialog"}),rLe=KAe,iLe=qAe,oLe=YAe,aLe=XAe,sLe=QAe,HW=tLe,[lLe,UFe]=ko("AlertDialog",[zW]),$c=zW(),cLe=e=>{const{__scopeAlertDialog:t,...n}=e,r=$c(t);return h.exports.createElement(rLe,J({},r,n,{modal:!0}))},uLe=h.exports.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=$c(n);return h.exports.createElement(iLe,J({},i,r,{ref:t}))}),dLe=e=>{const{__scopeAlertDialog:t,...n}=e,r=$c(t);return h.exports.createElement(oLe,J({},r,n))},fLe=h.exports.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=$c(n);return h.exports.createElement(aLe,J({},i,r,{ref:t}))}),[pLe,hLe]=lLe("AlertDialogContent"),mLe=h.exports.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,o=$c(n),a=h.exports.useRef(null),s=un(t,a),l=h.exports.useRef(null);return h.exports.createElement(nLe,{contentName:"AlertDialogContent",titleName:gLe,docsSlug:"alert-dialog"},h.exports.createElement(pLe,{scope:n,cancelRef:l},h.exports.createElement(sLe,J({role:"alertdialog"},o,i,{ref:s,onOpenAutoFocus:Ee(i.onOpenAutoFocus,c=>{var u;c.preventDefault(),(u=l.current)===null||u===void 0||u.focus({preventScroll:!0})}),onPointerDownOutside:c=>c.preventDefault(),onInteractOutside:c=>c.preventDefault()}),h.exports.createElement(N6,null,r),!1)))}),gLe="AlertDialogTitle",vLe=h.exports.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=$c(n);return h.exports.createElement(HW,J({},i,r,{ref:t}))}),yLe=h.exports.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=hLe("AlertDialogCancel",n),o=$c(n),a=un(t,i);return h.exports.createElement(HW,J({},o,r,{ref:a}))}),bLe=cLe,xLe=uLe,SLe=dLe,wLe=fLe,CLe=mLe,kLe=vLe,ELe=yLe,ILe=e=>Object.keys(e.document.pages).length>1;function TLe({page:e,onOpen:t,onClose:n}){const r=at(),[i,o]=h.exports.useState(!1),a=r.useStore(ILe),s=h.exports.useRef(null),l=h.exports.useCallback(()=>{r.duplicatePage(e.id),n==null||n()},[r]),c=h.exports.useCallback(()=>{window.confirm("Are you sure you want to delete this page?")&&(r.deletePage(e.id),n==null||n())},[r]),u=h.exports.useCallback(m=>{if(o(m),m){t==null||t();return}},[r]),d=h.exports.useCallback(()=>o(!1),[]);function f(m){m.stopPropagation()}function p(){const m=window.prompt("New name:",e.name);r.renamePage(e.id,m||e.name||"Page")}return h.exports.useEffect(()=>{i&&requestAnimationFrame(()=>{const m=s.current;m&&(m.focus(),m.select())})},[i]),Z(bLe,{open:i,onOpenChange:u,children:[k(xLe,{asChild:!0,"data-shy":"true",children:k(rV,{bp:Wo,children:k(Ih,{children:k(w9e,{})})})}),Z(SLe,{children:[k(PLe,{onPointerDown:d}),Z(_Le,{dir:"ltr",onKeyDown:f,onKeyUp:f,children:[k(xx,{onSelect:p,children:"Rename"}),k(xx,{onSelect:l,children:"Duplicate"}),k(xx,{disabled:!a,onSelect:c,children:"Delete"}),k(bs,{}),k(ELe,{asChild:!0,children:k(la,{children:"Cancel"})})]})]})]})}const _Le=be(CLe,{position:"fixed",top:"50%",left:"50%",transform:"translate(-50%, -50%)",minWidth:240,maxWidth:"fit-content",maxHeight:"85vh",marginTop:"-5vh",pointerEvents:"all",backgroundColor:"$panel",padding:"$0",borderRadius:"$2",font:"$ui","&:focus":{outline:"none"}}),PLe=be(wLe,{backgroundColor:"rgba(0, 0, 0, .15)",position:"fixed",pointerEvents:"all",inset:0});function xx({onSelect:e,...t}){return k(kLe,{asChild:!0,onClick:e,onSelect:e,children:k(la,{...t})})}const OLe=e=>Object.values(e.document.pages).sort((t,n)=>(t.childIndex||0)-(n.childIndex||0)),MLe=e=>e.document.pages[e.appState.currentPageId].name,RLe=e=>e.document.pages[e.appState.currentPageId].id;function DLe(){const e=at(),t=h.exports.useRef(!1),[n,r]=h.exports.useState(!1);h.exports.useEffect(()=>{t.current!==n&&(t.current=n)},[n]);const i=h.exports.useCallback(()=>{r(!1)},[r]),o=h.exports.useCallback(s=>{t.current!==s&&r(s)},[r]),a=e.useStore(ln(MLe));return Z(Ka,{dir:"ltr",open:n,onOpenChange:o,children:[k(dl,{dir:"ltr",asChild:!0,children:k(Me,{variant:"text",children:a||"Page"})}),k(ef,{variant:"menu",align:"start",children:n&&k(ALe,{onClose:i})})]})}function ALe({onClose:e}){const t=at(),n=t.useStore(ln(OLe)),r=t.useStore(ln(RLe)),i=h.exports.useCallback(()=>{t.createPage()},[t]),o=h.exports.useCallback(a=>{e(),t.changePage(a)},[t]);return Z(Pe,{children:[k(F7e,{dir:"ltr",value:r,onValueChange:o,children:(n!=null?n:[]).map(a=>Z(LLe,{children:[k(qH,{title:a.name||"Page",value:a.id,asChild:!0,children:Z(BLe,{children:[k("span",{children:a.name||"Page"}),k(YH,{children:k(Ih,{children:k(Wj,{})})})]})},a.id),k(TLe,{page:a,onClose:e})]},a.id))}),k(Ip,{}),k(Kl,{onSelect:i,asChild:!0,children:Z(la,{children:[k("span",{children:"Create Page"}),k(Ih,{children:k(R9e,{})})]})})]})}const LLe=be("div",{display:"grid",gridTemplateColumns:"1fr auto",gridAutoFlow:"column",'& > *[data-shy="true"]':{opacity:0},'&:hover > *[data-shy="true"]':{opacity:1}}),BLe=be(la,{minWidth:128}),$Le=e=>e.document.pageStates[e.appState.currentPageId].camera.zoom,FLe=h.exports.memo(function(){const t=at(),{t:n}=dn("",{keyPrefix:"externalUI"}),r=t.useStore($Le);return Z(Ka,{dir:"ltr",children:[k(dl,{dir:"ltr",asChild:!0,children:Z(NLe,{onDoubleClick:t.resetZoom,variant:"text",children:[Math.round(r*100),"%"]})}),Z(ef,{align:"end",children:[k(ar,{onSelect:Wt,onClick:t.zoomIn,kbd:"#+",children:n("zoomIn")}),k(ar,{onSelect:Wt,onClick:t.zoomOut,kbd:"#\u2212",children:n("zoomOut")}),k(ar,{onSelect:Wt,onClick:t.resetZoom,kbd:"\u21E70",children:n("to100")}),k(ar,{onSelect:Wt,onClick:t.zoomToFit,kbd:"\u21E71",children:n("toFit")}),k(ar,{onSelect:Wt,onClick:t.zoomToSelection,kbd:"\u21E72",children:n("toSelection")})]})]})}),NLe=be(Me,{minWidth:56});function zLe({readOnly:e,showPages:t,showMenu:n,showStyles:r,showZoom:i,showSponsorLink:o,canEdit:a}){const s=at(),l=kd(u=>u.user.canvasId),c=s.useStore(u=>u.appState.isLoading);return Z(jLe,{children:[(n||t)&&Z(Mv,{side:"left",children:[n&&k(VAe,{showSponsorLink:o,readOnly:e}),t&&k(DLe,{}),k(rDe,{name:s.document.name,readOnly:e}),!c&&!e&&k(nDe,{currentState:"updating"})]}),k(HLe,{}),(r||i)&&Z(Mv,{side:"right",children:[a&&e&&l&&k(iDe,{canvasId:l}),r&&!e&&k(nEe,{}),Z(VLe,{bp:Wo,children:[k(Me,{children:k(Lke,{onClick:s.undo})}),k(Me,{children:k(Dke,{onClick:s.redo})})]}),i&&k(FLe,{})]})]})}const jLe=be("div",{width:"100%",position:"absolute",top:0,left:0,right:0,display:"flex",flexDirection:"row",pointerEvents:"none","& > *":{pointerEvents:"all"}}),HLe=be("div",{flexGrow:2,pointerEvents:"none"}),VLe=be("div",{display:"flex",flexDirection:"row",variants:{bp:{small:{display:"inherit"},large:{display:"none"}}}});function WLe(e,t,n){const{currentPageId:r}=e,i=t.map(f=>e.getShape(f)),o=i.map(f=>({id:f.id,point:[...f.point],bounds:Q.getBounds(f)})),a=$.getCommonBounds(o.map(({bounds:f})=>f)),s=a.minX+a.width/2,l=a.minY+a.height/2,c=Object.fromEntries(o.map(({id:f,point:p,bounds:m})=>[f,{prev:p,next:{[Mn.CenterVertical]:[p[0],l-m.height/2],[Mn.CenterHorizontal]:[s-m.width/2,p[1]],[Mn.Top]:[p[0],a.minY],[Mn.Bottom]:[p[0],a.maxY-m.height],[Mn.Left]:[a.minX,p[1]],[Mn.Right]:[a.maxX-m.width,p[1]]}[n]}])),{before:u,after:d}=Q.mutateShapes(e.state,t,f=>c[f.id]?{point:c[f.id].next}:f,r);return i.forEach(f=>{if(f.type===U.Group){const p=O.sub(d[f.id].point,u[f.id].point);f.children.forEach(m=>{const g=e.getShape(m);u[g.id]={point:g.point},d[g.id]={point:O.add(g.point,p)}}),delete u[f.id],delete d[f.id]}}),{id:"align",before:{document:{pages:{[r]:{shapes:u}},pageStates:{[r]:{selectedIds:t}}}},after:{document:{pages:{[r]:{shapes:d}},pageStates:{[r]:{selectedIds:t}}}}}}function ULe(e,t){return{id:"change_page",before:{appState:{currentPageId:e.currentPageId}},after:{appState:{currentPageId:t}}}}function GLe(e,t,n=$.uniqueId()){const{currentPageId:r}=e,i=Object.values(e.state.document.pages).sort((c,u)=>(u.childIndex||0)-(c.childIndex||0))[0],o=i!=null&&i.childIndex?(i==null?void 0:i.childIndex)+1:1,s={id:n,name:"New Page",childIndex:o,shapes:{},bindings:{}},l={id:n,selectedIds:[],camera:{point:t,zoom:1},editingId:void 0,bindingId:void 0,hoveredId:void 0,pointedId:void 0};return{id:"create_page",before:{appState:{currentPageId:r},document:{pages:{[n]:void 0},pageStates:{[n]:void 0}}},after:{appState:{currentPageId:s.id},document:{pages:{[n]:s},pageStates:{[n]:l}}}}}function kM(e,t,n=[]){const{currentPageId:r}=e,i={},o={};t.forEach(l=>{i[l.id]=void 0,o[l.id]=l});const a={},s={};return n.forEach(l=>{a[l.id]=void 0,s[l.id]=l}),{id:"create",before:{document:{pages:{[r]:{shapes:i,bindings:a}},pageStates:{[r]:{selectedIds:[...e.selectedIds]}}}},after:{document:{pages:{[r]:{shapes:o,bindings:s}},pageStates:{[r]:{selectedIds:t.map(l=>l.id)}}}}}}function KLe(e,t){const{currentPageId:n,document:{pages:r,pageStates:i}}=e,o=Object.values(r).sort((l,c)=>(l.childIndex||0)-(c.childIndex||0)),a=o.findIndex(l=>l.id===t);let s;return t===n?a===o.length-1?s=o[o.length-2].id:s=o[a+1].id:s=n,{id:"delete_page",before:{appState:{currentPageId:t},document:{pages:{[t]:{...r[t]}},pageStates:{[t]:{...i[t]}}}},after:{appState:{currentPageId:s},document:{pages:{[t]:void 0},pageStates:{[t]:void 0}}}}}function qLe(e,t,n){const r={shapes:{},bindings:{}},i={shapes:{},bindings:{}},o=[],a=new Set,s=new Set;t.filter(c=>!Q.getShape(e,c,n).isLocked).forEach(c=>{a.add(c);const u=Q.getShape(e,c,n);r.shapes[c]=u,i.shapes[c]=void 0,u.children!==void 0&&u.children.forEach(d=>{a.add(d);const f=Q.getShape(e,d,n);r.shapes[d]=f,i.shapes[d]=void 0}),u.parentId!==n&&o.push(Q.getShape(e,u.parentId,n)),u.assetId&&s.add(u.assetId)}),o.forEach(c=>{var u;t.includes(c.id)||(a.add(c.id),r.shapes[c.id]={children:c.children},i.shapes[c.id]={children:c.children.filter(d=>!t.includes(d))},((u=i.shapes[c.id])==null?void 0:u.children.length)===0&&(i.shapes[c.id]=void 0,r.shapes[c.id]=Q.getShape(e,c.id,n)))});const l=Q.getPage(e,n);return Object.values(l.bindings).filter(c=>a.has(c.fromId)||a.has(c.toId)).forEach(c=>{for(const u of[c.toId,c.fromId])if(i.shapes[u]===void 0){r.bindings[c.id]=c,i.bindings[c.id]=void 0;const d=l.shapes[u];d&&d.handles&&Object.values(d.handles).filter(f=>f.bindingId===c.id).forEach(f=>{var p,m,g,y,v,b;r.shapes[u]={...r.shapes[u],handles:{...(p=r.shapes[u])==null?void 0:p.handles,[f.id]:{...(g=(m=r.shapes[u])==null?void 0:m.handles)==null?void 0:g[f.id],bindingId:c.id}}},a.has(u)||(i.shapes[u]={...i.shapes[u],handles:{...(y=i.shapes[u])==null?void 0:y.handles,[f.id]:{...(b=(v=i.shapes[u])==null?void 0:v.handles)==null?void 0:b[f.id],bindingId:void 0}}})})}}),Object.values(e.document.pages).flatMap(c=>Object.values(c.shapes)).forEach(c=>{"assetId"in c&&c.assetId&&!a.has(c.id)&&s.delete(c.assetId)}),{before:r,after:i,assetsToRemove:Array.from(s)}}const YLe=(e,t)=>{const n={...e};return t.forEach(r=>n[r]=void 0),n};function EM(e,t,n=e.currentPageId){const{pageState:r,selectedIds:i,document:{assets:o}}=e,{before:a,after:s,assetsToRemove:l}=qLe(e.state,t,n),c=YLe(o,l);return{id:"delete",before:{document:{assets:o,pages:{[n]:a},pageStates:{[n]:{selectedIds:[...e.selectedIds]}}}},after:{document:{assets:c,pages:{[n]:s},pageStates:{[n]:{selectedIds:i.filter(u=>!t.includes(u)),hoveredId:r.hoveredId&&t.includes(r.hoveredId)?void 0:r.hoveredId}}}}}}function XLe(e,t,n){const{currentPageId:r}=e,i=t.map(l=>e.getShape(l)),o=Object.fromEntries(ZLe(i,n).map(l=>[l.id,l])),{before:a,after:s}=Q.mutateShapes(e.state,t.filter(l=>o[l]!==void 0),l=>({point:o[l.id].next}),r);return i.forEach(l=>{if(l.type===U.Group){const c=Y.sub(s[l.id].point,a[l.id].point);l.children.forEach(u=>{const d=e.getShape(u);a[d.id]={point:d.point},s[d.id]={point:Y.add(d.point,c)}}),delete a[l.id],delete s[l.id]}}),{id:"distribute",before:{document:{pages:{[r]:{shapes:a}},pageStates:{[r]:{selectedIds:t}}}},after:{document:{pages:{[r]:{shapes:s}},pageStates:{[r]:{selectedIds:t}}}}}}function ZLe(e,t){const n=e.map(a=>{const s=Q.getShapeUtil(a);return{id:a.id,point:[...a.point],bounds:s.getBounds(a),center:s.getCenter(a)}}),r=n.length,i=$.getCommonBounds(n.map(({bounds:a})=>a)),o=[];switch(t){case gc.Horizontal:{const a=n.reduce((s,l)=>s+l.bounds.width,0);if(a>i.width){const s=n.sort((f,p)=>f.bounds.minX-p.bounds.minX)[0],l=n.sort((f,p)=>p.bounds.maxX-f.bounds.maxX)[0],c=n.filter(f=>f!==s&&f!==l).sort((f,p)=>f.center[0]-p.center[0]),u=(l.center[0]-s.center[0])/(r-1),d=s.center[0]+u;c.forEach(({id:f,point:p,bounds:m},g)=>{o.push({id:f,prev:p,next:[d+u*g-m.width/2,m.minY]})})}else{const s=n.sort((u,d)=>u.center[0]-d.center[0]);let l=i.minX;const c=(i.width-a)/(r-1);s.forEach(({id:u,point:d,bounds:f})=>{o.push({id:u,prev:d,next:[l,f.minY]}),l+=f.width+c})}break}case gc.Vertical:{const a=n.reduce((s,l)=>s+l.bounds.height,0);if(a>i.height){const s=n.sort((f,p)=>f.bounds.minY-p.bounds.minY)[0],l=n.sort((f,p)=>p.bounds.maxY-f.bounds.maxY)[0],c=n.filter(f=>f!==s&&f!==l).sort((f,p)=>f.center[1]-p.center[1]),u=(l.center[1]-s.center[1])/(r-1),d=s.center[1]+u;c.forEach(({id:f,point:p,bounds:m},g)=>{o.push({id:f,prev:p,next:[m.minX,d+u*g-m.height/2]})})}else{const s=n.sort((u,d)=>u.center[1]-d.center[1]);let l=i.minY;const c=(i.height-a)/(r-1);s.forEach(({id:u,point:d,bounds:f})=>{o.push({id:u,prev:d,next:[f.minX,l]}),l+=f.height+c})}break}}return o}function QLe(e,t){const n=$.uniqueId(),{currentPageId:r,page:i,pageState:{camera:o}}=e,a={...i,id:n,name:i.name+" Copy",shapes:Object.fromEntries(Object.entries(i.shapes).map(([s,l])=>[s,{...l,parentId:l.parentId===t?n:l.parentId}]))};return{id:"duplicate_page",before:{appState:{currentPageId:r},document:{pages:{[n]:void 0},pageStates:{[n]:void 0}}},after:{appState:{currentPageId:n},document:{pages:{[n]:a},pageStates:{[n]:{...i,id:n,selectedIds:[],camera:{...o},editingId:void 0,bindingId:void 0,hoveredId:void 0,pointedId:void 0}}}}}}function JLe(e,t,n){const{selectedIds:r,currentPageId:i,page:o,shapes:a}=e,s={shapes:{},bindings:{}},l={shapes:{},bindings:{}},c={},u=t.map(p=>e.getShape(p)).filter(p=>!t.includes(p.parentId));u.forEach(p=>{const m=$.uniqueId();if(s.shapes[m]=void 0,l.shapes[m]={...$.deepClone(p),id:m,childIndex:Q.getChildIndexAbove(e.state,p.id,i)},p.children&&(l.shapes[m].children=[]),p.parentId!==i){const g=e.getShape(p.parentId);s.shapes[g.id]={...s.shapes[g.id],children:g.children},l.shapes[g.id]={...l.shapes[g.id],children:[...(l.shapes[g.id]||g).children,m]}}c[p.id]=m}),u.forEach(p=>{p.children&&p.children.forEach(m=>{var b,x;const g=e.getShape(m),y=$.uniqueId(),v=c[p.id];s.shapes[y]=void 0,l.shapes[y]={...$.deepClone(g),id:y,parentId:v,childIndex:Q.getChildIndexAbove(e.state,g.id,i)},c[m]=y,(x=(b=l.shapes[c[p.id]])==null?void 0:b.children)==null||x.push(y)})});const d=new Set(Object.keys(c));Object.values(o.bindings).filter(p=>d.has(p.fromId)||d.has(p.toId)).forEach(p=>{if(d.has(p.fromId))if(d.has(p.toId)){const m=$.uniqueId(),g={...$.deepClone(p),id:m,fromId:c[p.fromId],toId:c[p.toId]};s.bindings[m]=void 0,l.bindings[m]=g;const y=l.shapes[g.fromId];Object.values(y.handles).forEach(v=>{v.bindingId===p.id&&(v.bindingId=m)})}else{const m=l.shapes[c[p.fromId]];Object.values(m.handles).forEach(g=>{g.bindingId===p.id&&(g.bindingId=void 0)})}});const f=Object.values(l.shapes);if(n){const p=$.getCommonBounds(f.map(g=>Q.getBounds(g))),m=$.getBoundsCenter(p);f.forEach(g=>{!g.point||(g.point=O.sub(n,O.sub(m,g.point)))})}else{const p=[16,16];f.forEach(m=>{!m.point||(m.point=O.add(m.point,p))})}return f.forEach(p=>{p.isLocked&&(p.isLocked=!1)}),{id:"duplicate",before:{document:{pages:{[i]:s},pageStates:{[i]:{selectedIds:r}}}},after:{document:{pages:{[i]:l},pageStates:{[i]:{selectedIds:Array.from(d.values()).map(p=>c[p])}}}}}}function IM(e,t,n){const{selectedIds:r,currentPageId:i,shapes:o}=e,a=o.map(u=>Q.getBounds(u)),s=$.getCommonBounds(a),{before:l,after:c}=Q.mutateShapes(e.state,t,u=>{const d=Q.getBounds(u);switch(n){case Eh.Horizontal:{const f=$.getRelativeTransformedBoundingBox(s,s,d,!0,!1);return Q.getShapeUtil(u).transform(u,f,{type:xo.TopLeft,scaleX:-1,scaleY:1,initialShape:u,transformOrigin:[.5,.5]})}case Eh.Vertical:{const f=$.getRelativeTransformedBoundingBox(s,s,d,!1,!0);return Q.getShapeUtil(u).transform(u,f,{type:xo.TopLeft,scaleX:1,scaleY:-1,initialShape:u,transformOrigin:[.5,.5]})}}},i);return{id:"flip",before:{document:{pages:{[i]:{shapes:l}},pageStates:{[i]:{selectedIds:r}}}},after:{document:{pages:{[i]:{shapes:c}},pageStates:{[i]:{selectedIds:t}}}}}}function eBe(e,t,n,r){var x,w;if(t.length<2)return;const i={},o={},a={},s={},l=[...t],c=[],u=[],d=[];for(const E of t){const C=e.getShape(E);if(!C.isLocked)if(C.children===void 0)c.push(C);else{const I=C.children.filter(T=>!e.getShape(T).isLocked);d.push(C),l.push(...I),c.push(...I.map(T=>e.getShape(T)).filter(Boolean))}}if(c.every(E=>E.parentId===c[0].parentId)&&c[0].parentId!==r&&((x=e.getShape(c[0].parentId).children)==null?void 0:x.length)===l.length)return;const f=Q.flattenPage(e.state,r),p=Object.fromEntries(c.map(E=>[E.id,f.indexOf(E)])),m=c.sort((E,C)=>p[E.id]-p[C.id]),g=r,y=(m.filter(E=>E.parentId===r)[0]||m[0]).childIndex,v=$.getCommonBounds(c.map(E=>Q.getBounds(E)));for(i[n]=void 0,o[n]=Q.getShapeUtil(U.Group).create({id:n,childIndex:y,parentId:g,point:[v.minX,v.minY],size:[v.width,v.height],children:m.map(E=>E.id)}),m.forEach((E,C)=>{if(E.parentId!==r){const I=e.getShape(E.parentId);d.push(I)}i[E.id]={...i[E.id],parentId:E.parentId,childIndex:E.childIndex},o[E.id]={...o[E.id],parentId:n,childIndex:C+1}});d.length>0;){const E=d.pop();if(!E)break;const C=(((w=i[E.id])==null?void 0:w.children)||E.children).filter(I=>I&&!(l.includes(I)||u.includes(I)));C.length===0?(i[E.id]=E,o[E.id]=void 0,E.parentId!==r&&(u.push(E.id),d.push(e.getShape(E.parentId)))):(i[E.id]={...i[E.id],children:E.children},o[E.id]={...o[E.id],children:C})}const{bindings:b}=e;return b.forEach(E=>{for(const C of[E.toId,E.fromId])if(o[C]===void 0){a[E.id]=E,s[E.id]=void 0;const I=e.getShape(C);I.handles&&Object.values(I.handles).filter(T=>T.bindingId===E.id).forEach(T=>{var _,P;i[C]={...i[C],handles:{...(_=i[C])==null?void 0:_.handles,[T.id]:{bindingId:E.id}}},u.includes(C)||(o[C]={...o[C],handles:{...(P=o[C])==null?void 0:P.handles,[T.id]:{bindingId:void 0}}})})}}),{id:"group",before:{document:{pages:{[r]:{shapes:i,bindings:a}},pageStates:{[r]:{selectedIds:t}}}},after:{document:{pages:{[r]:{shapes:o,bindings:a}},pageStates:{[r]:{selectedIds:[n]}}}}}}function tBe(e,t,n,r,i){const{page:o}=e,a={before:{shapes:{},bindings:{}},after:{shapes:{},bindings:{}}},s={before:{shapes:{},bindings:{}},after:{shapes:{},bindings:{}}},l=new Set,c=new Set;t.map(b=>e.getShape(b,r)).filter(b=>!b.isLocked).forEach(b=>{l.add(b.id),c.add(b),b.children!==void 0&&b.children.forEach(x=>{l.add(x),c.add(e.getShape(x,r))})});const u=Q.getTopChildIndex(e.state,i),d=Array.from(c.values());d.forEach((b,x)=>{if(a.before.shapes[b.id]=b,a.after.shapes[b.id]=void 0,s.before.shapes[b.id]=void 0,s.after.shapes[b.id]=b,!l.has(b.parentId)&&(s.after.shapes[b.id]={...b,parentId:i,childIndex:u+x},b.parentId!==r)){const w=e.getShape(b.parentId,r);a.before.shapes[w.id]={children:w.children},a.after.shapes[w.id]={children:w.children.filter(E=>E!==b.id)}}}),Object.values(o.bindings).filter(b=>l.has(b.fromId)||l.has(b.toId)).forEach(b=>{a.before.bindings[b.id]=b,a.after.bindings[b.id]=void 0;const x=e.getShape(b.fromId,r);if(l.has(b.fromId)&&l.has(b.toId))s.before.bindings[b.id]=void 0,s.after.bindings[b.id]=b;else if(l.has(b.fromId)){const E=e.getShape(b.fromId,r),I=Object.values(x.handles).find(_=>_.bindingId===b.id).id,T=s.after.shapes[E.id];T.handles={...T.handles,[I]:{...T.handles[I],bindingId:void 0}}}else{const E=e.getShape(b.fromId,r),C=Object.values(x.handles).find(I=>I.bindingId===b.id);a.before.shapes[E.id]={handles:{[C.id]:{bindingId:b.id}}},a.after.shapes[E.id]={handles:{[C.id]:{bindingId:void 0}}}}});const f=e.state.document.pageStates[i],p=$.getCommonBounds(d.map(b=>Q.getBounds(b))),m=Q.getCameraZoom(n.width<n.height?(n.width-128)/p.width:(n.height-128)/p.height),g=(n.width-p.width*m)/2/m,y=(n.height-p.height*m)/2/m,v=O.toFixed(O.add([-p.minX,-p.minY],[g,y]));return{id:"move_to_page",before:{appState:{currentPageId:r},document:{pages:{[r]:a.before,[i]:s.before},pageStates:{[r]:{selectedIds:t},[i]:{selectedIds:f.selectedIds,camera:f.camera}}}},after:{appState:{currentPageId:i},document:{pages:{[r]:a.after,[i]:s.after},pageStates:{[r]:{selectedIds:[]},[i]:{selectedIds:t,camera:{zoom:m,point:v}}}}}}}function Um(e,t,n){const{currentPageId:r,page:i}=e,o=new Set(t.map(u=>e.getShape(u).parentId));let a={before:{},after:{}},s,l,c;return Array.from(o.values()).forEach(u=>{let d=[];if(u===i.id)d=Object.values(i.shapes).sort((m,g)=>m.childIndex-g.childIndex);else{const m=e.getShape(u);if(!m.children)throw Error("No children in parent!");d=m.children.map(g=>e.getShape(g)).sort((g,y)=>g.childIndex-y.childIndex)}const f=d.map(m=>m.id),p=t.filter(m=>f.includes(m)).map(m=>f.indexOf(m)).sort((m,g)=>m-g);if(p.length!==f.length)switch(n){case Ea.ToBack:{for(let m=0;m<f.length;m++)if(!p.includes(m)){s=m;break}l=d[s].childIndex,c=l/(p.length+1),a=Q.mutateShapes(e.state,p.map(m=>d[m].id).reverse(),(m,g)=>({childIndex:l-(g+1)*c}),r);break}case Ea.ToFront:{for(let m=f.length-1;m>=0;m--)if(!p.includes(m)){s=m;break}l=d[s].childIndex,c=1,a=Q.mutateShapes(e.state,p.map(m=>d[m].id),(m,g)=>({childIndex:l+(g+1)}),r);break}case Ea.Backward:{const m={};for(let g=f.length-1;g>=0;g--)if(p.includes(g)){for(let y=g;y>=0;y--)if(!p.includes(y)){const v=d[y].childIndex;let b,x;y===0?(b=v/2,x=v/2/(g-y+1)):(b=d[y-1].childIndex,x=(v-b)/(g-y+1),b+=x);for(let w=0;w<g-y;w++)m[d[y+w+1].id]=b+x*w;break}}Object.values(m).length>0&&(a=Q.mutateShapes(e.state,p.map(g=>d[g].id),g=>({childIndex:m[g.id]}),r));break}case Ea.Forward:{const m={};for(let g=0;g<f.length;g++)if(p.includes(g)){for(let y=g;y<f.length;y++)if(!p.includes(y)){l=d[y].childIndex;const v=y===f.length-1?1:(d[y+1].childIndex-l)/(y-g+1);for(let b=0;b<y-g;b++)m[d[g+b].id]=l+v*(b+1);break}}Object.values(m).length>0&&(a=Q.mutateShapes(e.state,p.map(g=>d[g].id),g=>({childIndex:m[g.id]}),r));break}}}),{id:"move",before:{document:{pages:{[r]:{shapes:a.before}},pageStates:{[r]:{selectedIds:t}}}},after:{document:{pages:{[r]:{shapes:a.after}},pageStates:{[r]:{selectedIds:t}}}}}}function nBe(e,t,n){const{page:r}=e;return{id:"rename_page",before:{document:{pages:{[t]:{name:r.name}}}},after:{document:{pages:{[t]:{name:n}}}}}}function rBe(e,t){return{id:"rename_document",before:{document:{name:e.document.name}},after:{document:{name:t}}}}function iBe(e,t,n){return e&&typeof e=="string"&&t&&v7e(t)&&n&&Array.isArray(n)}function oBe(e,t){const{name:n,state:r,subscribergroups:i}=t;return{id:"update_document_basics",before:{document:{name:e.document.name,state:"public",subscribergroups:[]}},after:{document:{name:n,state:r,subscribergroups:i}}}}function TM(e,t,n){const{currentPageId:r}=e,{before:i,after:o}=Q.mutateShapes(e.state,t,a=>{var s,l;return(l=(s=e.getShapeUtil(a)).onDoubleClickBoundsHandle)==null?void 0:l.call(s,a)},n);return{id:"reset_bounds",before:{document:{pages:{[r]:{shapes:i}},pageStates:{[r]:{selectedIds:t}}}},after:{document:{pages:{[r]:{shapes:o}},pageStates:{[r]:{selectedIds:t}}}}}}const aBe=Math.PI*2;function sBe(e,t,n=-aBe/4){const{currentPageId:r}=e,i={},o={},a=t.flatMap(l=>{const c=e.getShape(l);return c.children?c.children.map(u=>e.getShape(u)):c}).filter(l=>!l.isLocked),s=$.getBoundsCenter($.getCommonBounds(a.map(l=>Q.getBounds(l))));return a.forEach(l=>{const c=Q.getRotatedShapeMutation(l,Q.getCenter(l),s,n);!c||(i[l.id]=Q.getBeforeShape(l,c),o[l.id]=c)}),{id:"rotate",before:{document:{pages:{[r]:{shapes:i}},pageStates:{[r]:{selectedIds:t}}}},after:{document:{pages:{[r]:{shapes:o}},pageStates:{[r]:{selectedIds:t}}}}}}function lBe(e,t,n){const{currentPageId:r,selectedIds:i}=e,o=t.map(d=>e.getShape(d)),a=o.map(d=>Q.getBounds(d)),s=$.getCommonBounds(a),l=t.flatMap(d=>{const f=e.getShape(d);return f.children?f.children:f.id}).filter(d=>!e.getShape(d).isLocked),{before:c,after:u}=Q.mutateShapes(e.state,l,d=>{const f=Q.getBounds(d);switch(n){case mc.Horizontal:{const p={...f,minX:s.minX,maxX:s.maxX,width:s.width};return Q.getShapeUtil(d).transformSingle(d,p,{type:xo.TopLeft,scaleX:p.width/f.width,scaleY:1,initialShape:d,transformOrigin:[.5,.5]})}case mc.Vertical:{const p={...f,minY:s.minY,maxY:s.maxY,height:s.height};return Q.getShapeUtil(d).transformSingle(d,p,{type:xo.TopLeft,scaleX:1,scaleY:p.height/f.height,initialShape:d,transformOrigin:[.5,.5]})}}},r);return o.forEach(d=>{d.type===U.Group&&(delete c[d.id],delete u[d.id])}),{id:"stretch",before:{document:{pages:{[r]:{shapes:c}},pageStates:{[r]:{selectedIds:i}}}},after:{document:{pages:{[r]:{shapes:u}},pageStates:{[r]:{selectedIds:t}}}}}}function cBe(e,t,n){var l;const{currentPageId:r,selectedIds:i}=e,o=t.flatMap(c=>Q.getDocumentBranch(e.state,c,r)).filter(c=>!e.getShape(c).isLocked),a={},s={};return typeof n.isFilled=="boolean"&&n.color&&(n.isFilled?(n={...n,bgColor:(l=n==null?void 0:n.color)!=null?l:"unset"},delete n.color):delete n.isFilled),o.map(c=>e.getShape(c)).filter(c=>!c.isLocked).forEach(c=>{a[c.id]={style:{...Object.fromEntries(Object.keys(n).map(u=>[u,c.style[u]]))}},s[c.id]={style:n},c.type===U.Text&&(a[c.id].point=c.point,s[c.id].point=O.toFixed(O.add(c.point,O.sub(e.getShapeUtil(c).getCenter(c),e.getShapeUtil(c).getCenter({...c,style:{...c.style,...n}})))))}),{id:"style",before:{document:{pages:{[r]:{shapes:a}},pageStates:{[r]:{selectedIds:i}}},appState:{currentStyle:{...e.appState.currentStyle}}},after:{document:{pages:{[r]:{shapes:s}},pageStates:{[r]:{selectedIds:t}}},appState:{currentStyle:{...e.appState.currentStyle,...n}}}}}function uBe(e,t,n){const{currentPageId:r,selectedIds:i}=e,o=Object.fromEntries(t.map(s=>{var l;return[s,{decorations:{[n]:(l=e.getShape(s).decorations)==null?void 0:l[n]}}]})),a=Object.fromEntries(t.filter(s=>!e.getShape(s).isLocked).map(s=>{var l;return[s,{decorations:{[n]:(l=e.getShape(s).decorations)!=null&&l[n]?void 0:nd.Arrow}}]}));return{id:"toggle_decorations",before:{document:{pages:{[r]:{shapes:o}},pageStates:{[r]:{selectedIds:i}}}},after:{document:{pages:{[r]:{shapes:a}},pageStates:{[r]:{selectedIds:t}}}}}}function Sx(e,t,n){const{currentPageId:r}=e,i=t.map(l=>e.getShape(l)).filter(l=>n==="isLocked"?!0:!l.isLocked),o=i.every(l=>l[n]),a={},s={};return i.forEach(l=>{a[l.id]={[n]:l[n]},s[l.id]={[n]:!o}}),{id:"toggle"+n,before:{document:{pages:{[r]:{shapes:a}},pageStates:{[r]:{selectedIds:t}}}},after:{document:{pages:{[r]:{shapes:s}},pageStates:{[r]:{selectedIds:t}}}}}}function dBe(e,t,n){const{currentPageId:r,selectedIds:i}=e;e.rotationInfo.selectedIds=[...i];const o={shapes:{},bindings:{}},a={shapes:{},bindings:{}},s=t.flatMap(u=>{const d=e.getShape(u);return d.children?d.children:d.id}).filter(u=>!e.getShape(u).isLocked),l=Q.mutateShapes(e.state,s,u=>({point:O.toFixed(O.add(u.point,n))}),r);return o.shapes=l.before,a.shapes=l.after,Q.getBindings(e.state,r).filter(u=>t.includes(u.fromId)&&!t.includes(u.toId)).forEach(u=>{o.bindings[u.id]=u,a.bindings[u.id]=void 0;for(const d of[u.toId,u.fromId]){const f=e.getShape(d);!f.handles||Object.values(f.handles).filter(p=>p.bindingId===u.id).forEach(p=>{var m,g;o.shapes[d]={...o.shapes[d],handles:{...(m=o.shapes[d])==null?void 0:m.handles,[p.id]:{bindingId:u.id}}},a.shapes[d]={...a.shapes[d],handles:{...(g=a.shapes[d])==null?void 0:g.handles,[p.id]:{bindingId:void 0}}}})}}),{id:"translate",before:{document:{pages:{[r]:o},pageStates:{[r]:{selectedIds:t}}}},after:{document:{pages:{[r]:a},pageStates:{[r]:{selectedIds:t}}}}}}function fBe(e,t,n,r){const{bindings:i}=e,o={},a={},s={},l={},c=t,u=t.filter(d=>!n.find(f=>f.id===d));return n.filter(d=>!d.isLocked).forEach(d=>{const f=[],p=[];o[d.id]=d,a[d.id]=void 0,d.children.forEach(b=>{u.push(b);const x=e.getShape(b,r);f.push(x)});const m=d.childIndex,y=(Q.getChildIndexAbove(e.state,d.id,r)-m)/f.length;f.sort((b,x)=>b.childIndex-x.childIndex).forEach((b,x)=>{o[b.id]={parentId:b.parentId,childIndex:b.childIndex},a[b.id]={parentId:r,childIndex:m+y*x}}),i.filter(b=>b.toId===d.id||b.fromId===d.id).forEach(b=>{for(const x of[b.toId,b.fromId])if(a[x]===void 0){s[b.id]=b,l[b.id]=void 0;const w=e.getShape(x,r);w.handles&&Object.values(w.handles).filter(E=>E.bindingId===b.id).forEach(E=>{var C,I;o[x]={...o[x],handles:{...(C=o[x])==null?void 0:C.handles,[E.id]:{bindingId:b.id}}},p.includes(x)||(a[x]={...a[x],handles:{...(I=a[x])==null?void 0:I.handles,[E.id]:{bindingId:void 0}}})})}})}),{id:"ungroup",before:{document:{pages:{[r]:{shapes:o,bindings:s}},pageStates:{[r]:{selectedIds:c}}}},after:{document:{pages:{[r]:{shapes:a,bindings:s}},pageStates:{[r]:{selectedIds:u}}}}}}function pBe(e,t,n){const r=t.map(o=>o.id),i=Q.mutateShapes(e.state,r.filter(o=>!e.getShape(o,n).isLocked),(o,a)=>t[a],n);return{id:"update",before:{document:{pages:{[n]:{shapes:i.before}}}},after:{document:{pages:{[n]:{shapes:i.after}}}}}}function hBe(e,t,n){const{currentPageId:r,selectedIds:i}=e,o=t.map(c=>e.getShape(c)).filter(c=>n.isLocked?!0:!c.isLocked),a={},s={},l=Object.keys(n);return o.forEach(c=>{a[c.id]=Object.fromEntries(l.map(u=>[u,c[u]])),s[c.id]=n}),{id:"set_props",before:{document:{pages:{[r]:{shapes:a}},pageStates:{[r]:{selectedIds:i}}}},after:{document:{pages:{[r]:{shapes:s}},pageStates:{[r]:{selectedIds:i}}}}}}const _M=6;function mBe(e,t,n,r){const{selectedIds:i,currentPageId:o,shapes:a}=e;let s;n===Tt.MASK&&(s=r);const l={},c={};return i.forEach(u=>{const d=Q.getBlock(e,u,o);if(d&&u){const f=WH({...d,blockType:n},"px"),{after:p}=Q.mutateBlockAsset(e.state,u,y=>({...y,blockType:n,size:f,tlMaskType:s}),o),{before:m,after:g}=Q.mutateShapes(e.state,[u],y=>({...y,size:f,asset:p}),o);l[u]=m[u],c[u]=g[u]}}),{id:"changeType",before:{document:{pages:{[o]:{shapes:l}},pageStates:{[o]:{selectedIds:i}}}},after:{document:{pages:{[o]:{shapes:c}},pageStates:{[o]:{selectedIds:t}}}}}}function gBe(e,t,n){var o;const r=e.state.appState.currentStyle,i={};return n!=null&&n.color&&(((o=n.isFilled)!=null?o:r.isFilled)?n.color==="unset"?i.tlBgColor=g6:i.tlBgColor=n.color:n.color==="unset"?i.tlStrokeColor=void 0:i.tlStrokeColor=n.color),lt.info("styleBlock",{settings:i}),VW(e,t,i)}const VW=(e,t,n)=>{var p,m,g,y,v,b,x,w,E;const{selectedIds:r,currentPageId:i}=e,o=Q.getShape(e.state,r[0],i).assetId||"",{before:a,after:s}=Q.mutateBlockAsset(e.state,t[0],C=>({...C,...n}),i),{before:l,after:c}=Q.mutateShapes(e.state,t,C=>({...C,...n,asset:s}),i),u=e.document.userSettings,d={...u,tlBgColor:(p=n.tlBgColor)!=null?p:u==null?void 0:u.tlBgColor,tlStrokeColor:(m=n.tlStrokeColor)!=null?m:u==null?void 0:u.tlStrokeColor,tlShowText:(g=n.tlShowText)!=null?g:u==null?void 0:u.tlShowText,recentIcons:[...new Set(n!=null&&n.tlIcon?((v=(y=u==null?void 0:u.recentIcons)==null?void 0:y.length)!=null?v:0>=_M)?[...((b=u==null?void 0:u.recentIcons)!=null?b:[]).slice(-_M),n.tlIcon]:[...(x=u==null?void 0:u.recentIcons)!=null?x:[],n.tlIcon]:u==null?void 0:u.recentIcons)]},f={bgColor:(w=d.tlBgColor)!=null?w:e.appState.currentStyle.bgColor,color:(E=d.tlStrokeColor)!=null?E:e.appState.currentStyle.color};return{id:"updateWaAtomSettings",before:{document:{assets:{[o]:a},pages:{[i]:{shapes:l}},pageStates:{[i]:{selectedIds:r}}},appState:{currentStyle:{...e.appState.currentStyle}}},after:{document:{userSettings:d,assets:{[o]:s},pages:{[i]:{shapes:c}},pageStates:{[i]:{selectedIds:t}}},appState:{currentStyle:{...e.appState.currentStyle,...f}}}}};function vBe(e,t,n){return{id:"handleModalOpened",before:{appState:{modalSetting:void 0}},after:{appState:{modalSetting:n}}}}function yBe(e,t){var r,i,o;let n=e.document;return t&&(n={...n,name:(r=t==null?void 0:t.title)!=null?r:e.document.name,title:(i=t==null?void 0:t.title)!=null?i:e.document.name,subscribergroups:t==null?void 0:t.subscribergroups,state:(o=t==null?void 0:t.state)!=null?o:e.document.state}),{id:"updateCanvasSettings",before:{appState:e.appState},after:{appState:{modalSetting:void 0,...n}}}}function bBe(e,t){var r,i,o;const n={...e.document.userSettings,...t!=null?t:{},DANGEROUSLY_SET_CSS:{...(i=(r=e.document.userSettings)==null?void 0:r.DANGEROUSLY_SET_CSS)!=null?i:{},...(o=t==null?void 0:t.DANGEROUSLY_SET_CSS)!=null?o:{}}};return{id:"updateWaUserSettings",before:{appState:e.appState},after:{document:{userSettings:n},appState:{modalSetting:void 0}}}}const xBe=(e,t,n)=>{const{selectedIds:r,currentPageId:i}=e,{before:o,after:a}=Q.mutateShapes(e.state,t,s=>({...s,link:n}),i);return{id:"updateWaAtomSettings",before:{document:{pages:{[i]:{shapes:o}},pageStates:{[i]:{selectedIds:r}}}},after:{document:{pages:{[i]:{shapes:a}},pageStates:{[i]:{selectedIds:t}}}}}};function os(e,t){const{version:n=0}=e;if("assets"in e){const r=new Set;Object.values(e.pages).forEach(i=>Object.values(i.shapes).forEach(o=>{o.assetId&&r.add(o.assetId)})),Object.keys(e.assets).forEach(i=>{r.has(i)||delete e.assets[i]})}return n===t||(n<14&&Object.values(e.pages).forEach(r=>{Object.values(r.shapes).filter(i=>i.type===U.Text).forEach(i=>i.style.font===Fn.Script)}),n<=13&&Object.values(e.pages).forEach(r=>{Object.values(r.bindings).forEach(i=>{Object.assign(i,i.meta)}),Object.values(r.shapes).forEach(i=>{Object.entries(i.style).forEach(([o,a])=>{typeof a=="string"&&(i.style[o]=a&&a.toLowerCase())}),i.type===U.Arrow&&i.decorations&&Object.entries(i.decorations).forEach(([o,a])=>{a==="Arrow"&&(i.decorations={...i.decorations,[o]:nd.Arrow})})})}),n<=13.1&&(e.name="New Document"),n<15&&(e.assets={}),Object.values(e.pages).forEach(r=>{Object.values(r.shapes).forEach(i=>{n<15.2&&(i.type===U.Image||i.type===U.Video)&&(i.style.isFilled=!0),n<15.3&&(i.type===U.Rectangle||i.type===U.Triangle||i.type===U.Ellipse||i.type===U.Arrow)&&(i.label=i.text||"",i.labelPoint=[.5,.5])})}),Object.values(e.pageStates).forEach(r=>{r.selectedIds=r.selectedIds.filter(i=>e.pages[r.id].shapes[i]!==void 0),r.bindingId=void 0,r.editingId=void 0,r.hoveredId=void 0,r.pointedId=void 0}),e.version=t),e}const SBe="modulepreload",PM={},wBe="/",Ha=function(t,n){return!n||n.length===0?t():Promise.all(n.map(r=>{if(r=`${wBe}${r}`,r in PM)return;PM[r]=!0;const i=r.endsWith(".css"),o=i?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${r}"]${o}`))return;const a=document.createElement("link");if(a.rel=i?"stylesheet":SBe,i||(a.as="script",a.crossOrigin=""),a.href=r,document.head.appendChild(a),i)return new Promise((s,l)=>{a.addEventListener("load",s),a.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${r}`)))})})).then(()=>t())};function R8(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function CBe(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=R8(n);return(i,o)=>r.then(a=>o(a.transaction(t,i).objectStore(t)))}let wx;function WW(){return wx||(wx=CBe("keyval-store","keyval")),wx}function kBe(e,t=WW()){return t("readonly",n=>R8(n.get(e)))}function UW(e,t,n=WW()){return n("readwrite",r=>(r.put(t,e),R8(r.transaction)))}const OM={mode:"readwrite"},EBe=async e=>await e.queryPermission(OM)==="granted"||await e.requestPermission(OM)==="granted";async function IBe(){if(typeof Window=="undefined"||!("_location"in Window))return;const e=await kBe(`Tldraw_file_handle_${window.location.origin}`);return e||null}async function GW(e){return UW(`Tldraw_file_handle_${window.location.origin}`,e)}async function MM(e,t){const n={name:e.name||"New Document",fileHandle:t!=null?t:null,document:e,assets:{}},r=JSON.stringify(n,null,2),i=new Blob([r],{type:"application/vnd.Tldraw+json"});if(t&&!await EBe(t))return null;const a=(await Ha(()=>Promise.resolve().then(function(){return D8}),void 0)).fileSave,s=await a(i,{fileName:`${n.name}.tldr`,description:"Tldraw File",extensions:[".tldr"]},t);return await GW(s),s}async function TBe(){var a;const t=(await Ha(()=>Promise.resolve().then(function(){return D8}),void 0)).fileOpen,n=await t({description:"Tldraw File",extensions:[".tldr"],multiple:!1});if(!n)return null;const r=await new Promise(s=>{const l=new FileReader;l.onloadend=()=>{l.readyState===FileReader.DONE&&s(l.result)},l.readAsText(n,"utf8")}),i=JSON.parse(r),o=(a=n.handle)!=null?a:null;return await GW(o),{fileHandle:o,document:i.document}}async function _Be(){const t=(await Ha(()=>Promise.resolve().then(function(){return D8}),void 0)).fileOpen;return t({description:"Image or Video",extensions:[...vW,...yW],multiple:!1})}function PBe(e){return new Promise((t,n)=>{if(e){const r=new FileReader;r.readAsDataURL(e),r.onload=()=>t(r.result),r.onerror=i=>n(i),r.onabort=i=>n(i)}})}const OBe=e=>fetch(e).then(t=>t.blob()).then(t=>new Promise((n,r)=>{const i=new FileReader;i.onloadend=()=>n(i.result),i.onerror=r,i.readAsDataURL(t)})).then(t=>typeof t=="string"?t:"").catch(t=>(console.error(t),""));function RM(e){return new Promise((t,n)=>{const r=new Image;r.onload=()=>t([r.width,r.height]),r.onerror=()=>n(new Error("Could not get image size")),r.src=e})}// @license © 2020 Google LLC. Licensed under the Apache License, Version 2.0.
const V2=(()=>{if(typeof self=="undefined")return!1;if("top"in self&&self!==top)try{top.location+""}catch{return!1}else if("showOpenFilePicker"in self)return"showOpenFilePicker";return!1})(),MBe=Ha(V2?()=>Promise.resolve().then(function(){return mFe}):()=>Promise.resolve().then(function(){return fFe}),void 0);async function RBe(...e){return(await MBe).default(...e)}const DBe=Ha(V2?()=>Promise.resolve().then(function(){return bFe}):()=>Promise.resolve().then(function(){return vFe}),void 0);async function ABe(...e){return(await DBe).default(...e)}const LBe=Ha(V2?()=>Promise.resolve().then(function(){return kFe}):()=>Promise.resolve().then(function(){return wFe}),void 0);async function BBe(...e){return(await LBe).default(...e)}var D8=Object.freeze(Object.defineProperty({__proto__:null,fileOpen:RBe,directoryOpen:ABe,fileSave:BBe,supported:V2},Symbol.toStringTag,{value:"Module"}));class ca{constructor(t){this.app=t}}class $Be extends ca{constructor(n,r,i,o=!1){var u,d,f;super(n);S(this,"type",Re.Arrow);S(this,"performanceMode");S(this,"status",bn.TranslatingHandle);S(this,"newStartBindingId",$.uniqueId());S(this,"draggedBindingId",$.uniqueId());S(this,"didBind",!1);S(this,"initialShape");S(this,"handleId");S(this,"bindableShapeIds");S(this,"initialBinding");S(this,"startBindingShapeId");S(this,"isCreate");S(this,"start",()=>{});S(this,"update",()=>{var x,w,E;const{initialShape:n}=this,{currentPoint:r,shiftKey:i,altKey:o,metaKey:a,currentGrid:s,settings:{showGrid:l}}=this.app,c=this.app.getShape(n.id);if(c.isLocked)return;const u=c.handles,d=this.handleId;if(!u[d].canBind)return;let f=O.sub(r,u[d].point);if(i){const C=u[d==="start"?"end":"start"].point,I=u[d].point,T=O.toFixed(O.sub(O.add(I,f),c.point)),_=O.angle(C,T),P=O.rotWith(T,C,$.snapAngleToSegments(_,24)-_);f=O.add(f,O.sub(P,T))}const p=O.sub(O.add(u[d].point,f),c.point),m={...u[d],point:l?O.snap(p,s):O.toFixed(p),bindingId:void 0},g=js[U.Arrow],y=(x=g.onHandleChange)==null?void 0:x.call(g,c,{[d]:m});if(!y)return;const v={shape:$.deepMerge(c,y),bindings:{}};if(this.initialBinding&&(v.bindings[this.initialBinding.id]=void 0),this.startBindingShapeId){let C;const I=this.app.page.shapes[this.startBindingShapeId],T=Q.getShapeUtil(I);if(!a){const _=T.getCenter(I),P=v.shape.handles.start,M=O.add(P.point,v.shape.point),D=_,V=O.uni(O.sub(M,D)),B=T.hitTestPoint(I,r);C=this.findBindingPoint(c,I,"start",this.newStartBindingId,_,D,V,B)}if(C){this.didBind=!0,v.bindings[this.newStartBindingId]=C,v.shape.handles={...v.shape.handles,start:{...v.shape.handles.start,bindingId:C.id}};const _=this.app.page.shapes[this.startBindingShapeId],P=Q.getShapeUtil(_),M=(E=(w=Q.getShapeUtil(v.shape.type)).onBindingChange)==null?void 0:E.call(w,v.shape,C,_,P.getBounds(_),P.getExpandedBounds(_),P.getCenter(_));M&&Object.assign(v.shape,M)}else this.didBind=this.didBind||!1,this.app.page.bindings[this.newStartBindingId]&&(v.bindings[this.newStartBindingId]=void 0),c.handles.start.bindingId===this.newStartBindingId&&(v.shape.handles={...v.shape.handles,start:{...v.shape.handles.start,bindingId:void 0}})}let b;if(!a){const C=v.shape.handles[this.handleId],I=v.shape.handles[this.handleId==="start"?"end":"start"],T=O.add(I.point,v.shape.point),_=O.add(C.point,v.shape.point),P=O.uni(O.sub(_,T)),M=this.bindableShapeIds.map(D=>this.app.page.shapes[D]);for(const D of M)if(b=this.findBindingPoint(c,D,this.handleId,this.draggedBindingId,_,T,P,o),b)break}if(b){this.didBind=!0,v.bindings[this.draggedBindingId]=b,v.shape.handles={...v.shape.handles,[this.handleId]:{...v.shape.handles[this.handleId],bindingId:this.draggedBindingId}};const C=this.app.page.shapes[b.toId],I=Q.getShapeUtil(C),_=js[U.Arrow].onBindingChange(v.shape,b,C,I.getBounds(C),I.getExpandedBounds(C),I.getCenter(C));_&&Object.assign(v.shape,_)}else{this.didBind=this.didBind||!1;const C=c.handles[this.handleId].bindingId;C&&(v.bindings={...v.bindings,[C]:void 0},v.shape.handles={...v.shape.handles,[this.handleId]:{...v.shape.handles[this.handleId],bindingId:void 0}})}return{document:{pages:{[this.app.currentPageId]:{shapes:{[c.id]:v.shape},bindings:v.bindings}},pageStates:{[this.app.currentPageId]:{bindingId:v.shape.handles[d].bindingId}}}}});S(this,"cancel",()=>{const{initialShape:n,initialBinding:r,newStartBindingId:i,draggedBindingId:o}=this,a=Q.onSessionComplete(this.app.page.shapes[n.id]),s=this.isCreate||O.dist(a.handles.start.point,a.handles.end.point)<4,l={};return l[o]=void 0,r&&(l[r.id]=s?void 0:r),i&&(l[i]=void 0),{document:{pages:{[this.app.currentPageId]:{shapes:{[n.id]:s?void 0:n},bindings:l}},pageStates:{[this.app.currentPageId]:{selectedIds:s?[]:[n.id],bindingId:void 0,hoveredId:void 0,editingId:void 0}}}}});S(this,"complete",()=>{const{initialShape:n,initialBinding:r,newStartBindingId:i,startBindingShapeId:o,handleId:a}=this,s=Q.onSessionComplete(this.app.page.shapes[n.id]),l=s.handles[a].bindingId,c=O.dist(s.handles.start.point,s.handles.end.point);if(!(l||r)&&c<4)return this.cancel();const u={},d={};return r&&(u[r.id]=this.isCreate?void 0:r,d[r.id]=void 0),l&&(u[l]=void 0,d[l]=this.app.page.bindings[l]),o&&(u[i]=void 0,d[i]=this.app.page.bindings[i]),{id:"arrow",before:{document:{pages:{[this.app.currentPageId]:{shapes:{[n.id]:this.isCreate?void 0:n},bindings:u}},pageStates:{[this.app.currentPageId]:{selectedIds:this.isCreate?[]:[n.id],bindingId:void 0,hoveredId:void 0,editingId:void 0}}}},after:{document:{pages:{[this.app.currentPageId]:{shapes:{[n.id]:s},bindings:d}},pageStates:{[this.app.currentPageId]:{selectedIds:[n.id],bindingId:void 0,hoveredId:void 0,editingId:void 0}}}}}});S(this,"findBindingPoint",(n,r,i,o,a,s,l,c)=>{const d=Q.getShapeUtil(r.type).getBindingPoint(r,n,a,s,l,c);if(!!d)return{id:o,type:"arrow",fromId:n.id,toId:r.id,handleId:i,point:O.toFixed(d.point),distance:d.distance}});this.isCreate=o;const{currentPageId:a}=n.state.appState,s=n.state.document.pages[a];this.handleId=i,this.initialShape=s.shapes[r],this.bindableShapeIds=Q.getBindableShapeIds(n.state).filter(p=>!(p===this.initialShape.id||p===this.initialShape.parentId));const l=(u=this.initialShape.handles[i==="start"?"end":"start"])==null?void 0:u.bindingId;if(l){const p=(d=s.bindings[l])==null?void 0:d.toId;p&&(this.bindableShapeIds=this.bindableShapeIds.filter(m=>m!==p))}const{originPoint:c}=this.app;if(this.isCreate)this.startBindingShapeId=(f=this.bindableShapeIds.map(p=>s.shapes[p]).find(p=>$.pointInBounds(c,Q.getShapeUtil(p).getBounds(p))))==null?void 0:f.id,this.startBindingShapeId&&this.bindableShapeIds.splice(this.bindableShapeIds.indexOf(this.startBindingShapeId),1);else{const p=this.initialShape.handles[this.handleId].bindingId;p?this.initialBinding=s.bindings[p]:this.initialShape.handles[this.handleId].bindingId=void 0}}}class FBe extends ca{constructor(n){super(n);S(this,"type",Re.Brush);S(this,"performanceMode");S(this,"status",bn.Brushing);S(this,"initialSelectedIds");S(this,"shapesToTest");S(this,"start",()=>{});S(this,"update",()=>{const{initialSelectedIds:n,shapesToTest:r,app:{originPoint:i,currentPoint:o}}=this,a=$.getBoundsFromPoints([i,o]),s=new Set,l=new Set(n);r.forEach(({id:f,selectId:p})=>{const{metaKey:m}=this.app,g=this.app.getShape(f);if(!s.has(p)){const y=this.app.getShapeUtil(g);(m?$.boundsContain(a,y.getBounds(g)):y.hitTestBounds(g,a))?(s.add(p),l.has(p)||l.add(p)):l.has(p)&&l.delete(p)}});const c=this.app.selectedIds,d=l.size!==c.length||c.some(f=>!l.has(f))?Array.from(l.values()):c;return{document:{pageStates:{[this.app.currentPageId]:{brush:a,selectedIds:d}}}}});S(this,"cancel",()=>({document:{pageStates:{[this.app.currentPageId]:{brush:null,selectedIds:Array.from(this.initialSelectedIds.values())}}}}));S(this,"complete",()=>({document:{pageStates:{[this.app.currentPageId]:{brush:null,selectedIds:[...this.app.selectedIds]}}}}));const{currentPageId:r}=n;this.initialSelectedIds=new Set(this.app.selectedIds),this.shapesToTest=this.app.shapes.filter(i=>!(i.isLocked||i.isHidden||i.parentId!==r||this.initialSelectedIds.has(i.id)||this.initialSelectedIds.has(i.parentId))).map(i=>({id:i.id,bounds:this.app.getShapeUtil(i).getBounds(i),selectId:i.id})),this.update()}}class NBe extends ca{constructor(n,r){var c;super(n);S(this,"type",Re.Draw);S(this,"performanceMode");S(this,"status",bn.Creating);S(this,"topLeft");S(this,"points");S(this,"initialShape");S(this,"lastAdjustedPoint");S(this,"shiftedPoints",[]);S(this,"shapeId");S(this,"isLocked");S(this,"isExtending");S(this,"lockedDirection");S(this,"start",()=>{var a;const n=this.app.originPoint,r=[0,0,(a=n[2])!=null?a:.5];this.points.push(r);const i=[Math.min(this.topLeft[0],n[0]),Math.min(this.topLeft[1],n[1])],o=O.sub(i,n);return this.topLeft=i,this.shiftedPoints=this.points.map(s=>O.toFixed(O.sub(s,o)).concat(s[2])),{document:{pages:{[this.app.currentPageId]:{shapes:{[this.shapeId]:{point:this.topLeft,points:this.shiftedPoints}}}},pageStates:{[this.app.currentPageId]:{selectedIds:[this.shapeId]}}}}});S(this,"update",()=>{const{shapeId:n}=this,{currentPoint:r,originPoint:i,shiftKey:o}=this.app;if(!this.lockedDirection&&this.points.length>1){const s=$.getBoundsFromPoints(this.points);(s.width>8||s.height>8)&&(this.lockedDirection=s.width>s.height?"horizontal":"vertical")}if(o){if(!this.isLocked&&this.points.length>2){if(!this.lockedDirection){const l=$.getBoundsFromPoints(this.points);this.lockedDirection=l.width>l.height?"horizontal":"vertical"}this.isLocked=!0;const s=[...this.lastAdjustedPoint];this.lockedDirection==="vertical"?s[0]=0:s[1]=0,this.points.push(s.concat(r[2]))}}else this.isLocked&&(this.isLocked=!1);this.isLocked&&(this.lockedDirection==="vertical"?r[0]=i[0]:r[1]=i[1]);const a=this.addPoint(r);if(!!a)return{document:{pages:{[this.app.currentPageId]:{shapes:{[n]:a}}},pageStates:{[this.app.currentPageId]:{selectedIds:[n]}}}}});S(this,"cancel",()=>{const{shapeId:n}=this,r=this.app.currentPageId;return{document:{pages:{[r]:{shapes:{[n]:this.isExtending?this.initialShape:void 0}}},pageStates:{[r]:{selectedIds:[]}}}}});S(this,"complete",()=>{const{shapeId:n}=this,r=this.app.currentPageId,i=this.app.getShape(n);return{id:"create_draw",before:{document:{pages:{[r]:{shapes:{[n]:this.isExtending?this.initialShape:void 0}}},pageStates:{[r]:{selectedIds:[]}}}},after:{document:{pages:{[r]:{shapes:{[n]:{...i,point:O.toFixed(i.point),points:i.points.map(o=>O.toFixed(o)),isComplete:!0}}}},pageStates:{[this.app.currentPageId]:{selectedIds:[]}}}}}});S(this,"addPoint",n=>{const{originPoint:r}=this.app,i=O.toFixed(O.sub(n,r)).concat(n[2]);if(O.isEqual(this.lastAdjustedPoint,i))return;this.points.push(i),this.lastAdjustedPoint=i;const o=[...this.topLeft],a=[Math.min(this.topLeft[0],n[0]),Math.min(this.topLeft[1],n[1])],s=O.sub(a,r);let l;return o[0]!==a[0]||o[1]!==a[1]?(this.topLeft=a,l=this.points.map(c=>O.toFixed(O.sub(c,s)).concat(c[2]))):l=[...this.shiftedPoints,O.sub(i,s).concat(i[2])],this.shiftedPoints=l,{point:this.topLeft,points:l}});const{originPoint:i}=this.app;this.shapeId=r,this.initialShape=this.app.getShape(r),this.topLeft=[...this.initialShape.point];const o=[0,0,(c=i[2])!=null?c:.5],a=O.sub(i,this.topLeft),s=this.initialShape.points.map(u=>O.sub(u,a).concat(u[2]));this.isExtending=s.length>0;const l=[];if(this.isExtending){const u=s[s.length-1];l.push(u,u);const d=Math.ceil(O.dist(u,o)/16);for(let f=0;f<d;f++){const p=f/(d-1);l.push(O.lrp(u,o,p).concat(u[2]))}}else l.push(o);this.points=[...s,...l],this.shiftedPoints=this.points.map(u=>O.add(u,a).concat(u[2])),this.lastAdjustedPoint=this.points[this.points.length-1]}}class zBe extends ca{constructor(n){super(n);S(this,"type",Re.Draw);S(this,"performanceMode");S(this,"status",bn.Creating);S(this,"isLocked");S(this,"lockedDirection");S(this,"erasedShapes",new Set);S(this,"erasedBindings",new Set);S(this,"initialSelectedShapes");S(this,"erasableShapes");S(this,"prevPoint");S(this,"start",()=>{});S(this,"update",()=>{const{page:n,shiftKey:r,originPoint:i,currentPoint:o}=this.app;if(r){if(!this.isLocked&&O.dist(i,o)>4){if(!this.lockedDirection){const c=O.sub(o,i);this.lockedDirection=c[0]>c[1]?"horizontal":"vertical"}this.isLocked=!0}}else this.isLocked&&(this.isLocked=!1);this.isLocked&&(this.lockedDirection==="vertical"?o[0]=i[0]:o[1]=i[1]);const a=O.toFixed(O.add(i,O.sub(o,i))),s=new Set([]);this.erasableShapes.forEach(c=>{if(!this.erasedShapes.has(c)&&this.app.getShapeUtil(c).hitTestLineSegment(c,this.prevPoint,a)&&(this.erasedShapes.add(c),s.add(c.id),c.children!==void 0))for(const u of c.children)this.erasedShapes.add(this.app.getShape(u)),s.add(u)}),Object.values(n.bindings).forEach(c=>{for(const u of[c.toId,c.fromId])s.has(u)&&this.erasedBindings.add(c)}),this.erasedShapes.forEach(c=>{this.app.getShape(c.id)||(this.erasedShapes.delete(c),this.erasableShapes.delete(c),s.delete(c.id))});const l=Array.from(this.erasedShapes.values());return this.prevPoint=a,{document:{pages:{[n.id]:{shapes:Object.fromEntries(l.map(c=>[c.id,{isGhost:!0}]))}}}}});S(this,"cancel",()=>{const{page:n}=this.app;this.erasedShapes.forEach(i=>{this.app.getShape(i.id)||(this.erasedShapes.delete(i),this.erasableShapes.delete(i))});const r=Array.from(this.erasedShapes.values());return{document:{pages:{[n.id]:{shapes:Object.fromEntries(r.map(i=>[i.id,{isGhost:!1}]))}},pageStates:{[n.id]:{selectedIds:this.initialSelectedShapes.map(i=>i.id)}}}}});S(this,"complete",()=>{const{page:n}=this.app;this.erasedShapes.forEach(c=>{this.app.getShape(c.id)||(this.erasedShapes.delete(c),this.erasableShapes.delete(c))}),this.erasedBindings.forEach(c=>{this.app.getBinding(c.id)||this.erasedBindings.delete(c)});const r=Array.from(this.erasedShapes.values()),i=Array.from(this.erasedBindings.values()),o=r.map(c=>c.id),a=i.map(c=>c.id),s={shapes:Object.fromEntries(r.map(c=>[c.id,c])),bindings:Object.fromEntries(i.map(c=>[c.id,c]))},l={shapes:Object.fromEntries(r.map(c=>[c.id,void 0])),bindings:Object.fromEntries(i.map(c=>[c.id,void 0]))};return this.app.shapes.forEach(c=>{c.handles&&!l.shapes[c.id]&&Object.values(c.handles).forEach(u=>{var d,f;u.bindingId&&a.includes(u.bindingId)&&(s.shapes[c.id]={...s.shapes[c.id],handles:{...(d=s.shapes[c.id])==null?void 0:d.handles,[u.id]:u}},o.includes(c.id)||(l.shapes[c.id]={...l.shapes[c.id],handles:{...(f=l.shapes[c.id])==null?void 0:f.handles,[u.id]:{...u,bindingId:void 0}}}))})}),{id:"erase",before:{document:{pages:{[n.id]:s},pageStates:{[n.id]:{selectedIds:this.initialSelectedShapes.filter(c=>!!this.app.getShape(c.id)).map(c=>c.id)}}}},after:{document:{pages:{[n.id]:l},pageStates:{[n.id]:{selectedIds:this.initialSelectedShapes.filter(c=>!!this.app.getShape(c.id)).filter(c=>!o.includes(c.id)).map(c=>c.id)}}}}}});this.prevPoint=[...n.originPoint],this.initialSelectedShapes=this.app.selectedIds.map(r=>this.app.getShape(r)),this.erasableShapes=new Set(this.app.shapes.filter(r=>!r.isLocked))}}class jBe extends ca{constructor(n,r){var i;super(n);S(this,"type",Re.Grid);S(this,"performanceMode");S(this,"status",bn.Translating);S(this,"shape");S(this,"bounds");S(this,"initialSelectedIds");S(this,"initialSiblings");S(this,"grid",{});S(this,"columns",1);S(this,"rows",1);S(this,"isCopying",!1);S(this,"start",()=>{});S(this,"update",()=>{const{currentPageId:n,altKey:r,shiftKey:i,currentPoint:o}=this.app,a={},s={},l=$.getBoundsCenter(this.bounds),c=O.sub(o,l);i&&(Math.abs(c[0])<Math.abs(c[1])?c[0]=0:c[1]=0);const u=this.bounds.width+32,d=this.bounds.height+32,f=Math.ceil(c[0]/u),p=Math.ceil(c[1]/d),m=Math.min(f,0),g=Math.min(p,0),y=Math.max(f,1),v=Math.max(p,1),b=new Set,x=r;x!==this.isCopying&&(Object.values(this.grid).filter(w=>w!==this.shape.id).forEach(w=>a[w]=void 0),this.grid={"0_0":this.shape.id},this.isCopying=x);for(let w=m;w<y;w++)for(let E=g;E<v;E++){const C=`${w}_${E}`;if(b.add(C),this.grid[C]||w===0&&E===0)continue;const I=this.getClone(O.add(this.shape.point,[w*u,E*d]),x);a[I.id]=I,this.grid[C]=I.id}if(Object.entries(this.grid).forEach(([w,E])=>{b.has(w)||(a[E]=void 0,delete this.grid[w])}),Object.values(a).length!==0)return this.initialSiblings&&(a[this.shape.parentId]={children:[...this.initialSiblings,...Object.values(this.grid)]}),{document:{pages:{[n]:{shapes:a}},pageStates:{[n]:s}}}});S(this,"cancel",()=>{const{currentPageId:n}=this.app,r={};return Object.values(this.grid).forEach(i=>{r[i]=void 0}),r[this.shape.id]={...r[this.shape.id],point:this.shape.point},this.initialSiblings&&(r[this.shape.parentId]={children:[...this.initialSiblings,this.shape.id]}),{document:{pages:{[n]:{shapes:r}},pageStates:{[n]:{selectedIds:[this.shape.id]}}}}});S(this,"complete",()=>{const{currentPageId:n}=this.app,r={},i={},o=[];if(Object.values(this.grid).forEach(a=>{r[a]=void 0,i[a]=this.app.getShape(a),o.push(a)}),r[this.shape.id]=this.shape,this.initialSiblings&&(r[this.shape.parentId]={children:[...this.initialSiblings,this.shape.id]},i[this.shape.parentId]={children:[...this.initialSiblings,...Object.values(this.grid)]}),o.length!==1)return{id:"grid",before:{document:{pages:{[n]:{shapes:r}},pageStates:{[n]:{selectedIds:[],hoveredId:void 0}}}},after:{document:{pages:{[n]:{shapes:i}},pageStates:{[n]:{selectedIds:o,hoveredId:void 0}}}}}});S(this,"getClone",(n,r)=>{const i={...this.shape,id:$.uniqueId(),point:n};return r||i.type===U.Sticky&&(i.text=""),i});this.shape=this.app.getShape(r),this.grid["0_0"]=this.shape.id,this.bounds=this.app.getShapeBounds(r),this.initialSelectedIds=[...this.app.selectedIds],this.shape.parentId!==this.app.currentPageId&&(this.initialSiblings=(i=this.app.getShape(this.shape.parentId).children)==null?void 0:i.filter(o=>o!==this.shape.id))}}class HBe extends ca{constructor(n,r,i,o="move_handle"){super(n);S(this,"type",Re.Handle);S(this,"performanceMode");S(this,"status",bn.TranslatingHandle);S(this,"commandId");S(this,"topLeft");S(this,"shiftKey",!1);S(this,"initialShape");S(this,"handleId");S(this,"start",()=>{});S(this,"update",()=>{var m,g;const{initialShape:n,app:{currentPageId:r,currentPoint:i,shiftKey:o,altKey:a,metaKey:s}}=this,l=this.app.getShape(n.id);if(l.isLocked)return;const c=l.handles,u=this.handleId,d=O.sub(i,c[u].point),f={...c[u],point:O.sub(O.add(c[u].point,d),l.point)},p=(g=(m=Q.getShapeUtil(l)).onHandleChange)==null?void 0:g.call(m,l,{[u]:f},{delta:d,shiftKey:o,altKey:a,metaKey:s});if(!!p)return{document:{pages:{[r]:{shapes:{[l.id]:p}}}}}});S(this,"cancel",()=>{const{initialShape:n,app:{currentPageId:r}}=this;return{document:{pages:{[r]:{shapes:{[n.id]:n}}}}}});S(this,"complete",()=>{const{initialShape:n,app:{currentPageId:r}}=this;return{id:this.commandId,before:{document:{pages:{[r]:{shapes:{[n.id]:n}}}}},after:{document:{pages:{[r]:{shapes:{[n.id]:Q.onSessionComplete(this.app.getShape(this.initialShape.id))}}}}}}});const{originPoint:a}=n;this.topLeft=[...a],this.handleId=i,this.initialShape=this.app.getShape(r),this.commandId=o}}class VBe extends ca{constructor(n){super(n);S(this,"type",Re.Rotate);S(this,"status",bn.Transforming);S(this,"performanceMode");S(this,"delta",[0,0]);S(this,"commonBoundsCenter");S(this,"initialAngle");S(this,"initialShapes");S(this,"changes",{});S(this,"start",()=>{});S(this,"update",()=>{const{commonBoundsCenter:n,initialShapes:r,app:{currentPageId:i,currentPoint:o,shiftKey:a}}=this,s={};let l=O.angle(n,o)-this.initialAngle;return a&&(l=$.snapAngleToSegments(l,24)),r.forEach(({center:c,shape:u})=>{const{rotation:d=0}=u;let f=0;a&&(f=$.snapAngleToSegments(d,24)-d);const p=Q.getRotatedShapeMutation(u,c,n,a?l+f:l);p&&(s[u.id]=p)}),this.changes=s,{document:{pages:{[i]:{shapes:s}}}}});S(this,"cancel",()=>{const{initialShapes:n,app:{currentPageId:r}}=this,i={};return n.forEach(({shape:o})=>i[o.id]=o),{document:{pages:{[r]:{shapes:i}}}}});S(this,"complete",()=>{const{initialShapes:n,app:{currentPageId:r}}=this,i={},o=this.changes;return n.forEach(({shape:{id:a,point:s,rotation:l,handles:c}})=>{i[a]={point:s,rotation:l,handles:c}}),{id:"rotate",before:{document:{pages:{[r]:{shapes:i}}}},after:{document:{pages:{[r]:{shapes:o}}}}}});const{app:{currentPageId:r,pageState:i,originPoint:o}}=this,a=Q.getSelectedBranchSnapshot(n.state,r).filter(s=>!s.isLocked);if(a.length===0)throw Error("No selected shapes!");if(n.rotationInfo.selectedIds===i.selectedIds){if(n.rotationInfo.center===void 0)throw Error("We should have a center for rotation!");this.commonBoundsCenter=n.rotationInfo.center}else this.commonBoundsCenter=$.getBoundsCenter($.getCommonBounds(a.map(Q.getBounds))),n.rotationInfo.selectedIds=i.selectedIds,n.rotationInfo.center=this.commonBoundsCenter;this.initialShapes=a.filter(s=>s.children===void 0).map(s=>({shape:s,center:this.app.getShapeUtil(s).getCenter(s)})),this.initialAngle=O.angle(this.commonBoundsCenter,o)}}class WBe extends ca{constructor(n,r=xo.BottomRight,i=!1){super(n);S(this,"type",Re.Transform);S(this,"performanceMode");S(this,"status",bn.Transforming);S(this,"scaleX",1);S(this,"scaleY",1);S(this,"initialShapes");S(this,"initialShapeIds");S(this,"initialSelectedIds");S(this,"shapeBounds");S(this,"hasUnlockedShapes");S(this,"isAllAspectRatioLocked");S(this,"initialCommonBounds");S(this,"snapInfo",{state:"empty"});S(this,"prevPoint",[0,0]);S(this,"speed",1);S(this,"start",()=>{this.snapInfo={state:"ready",bounds:this.app.shapes.filter(n=>!this.initialShapeIds.includes(n.id)).map(n=>$.getBoundsWithCenter(Q.getRotatedBounds(n)))}});S(this,"update",()=>{const{transformType:n,shapeBounds:r,initialCommonBounds:i,isAllAspectRatioLocked:o,app:{currentPageId:a,pageState:{camera:s},viewport:l,currentPoint:c,previousPoint:u,originPoint:d,shiftKey:f,altKey:p,metaKey:m,currentGrid:g,settings:{isSnapping:y,showGrid:v}}}=this,b={},x=p?O.mul(O.sub(c,d),2):O.sub(c,d);let w=$.getTransformedBoundingBox(i,n,x,0,f||o);p&&(w={...w,...$.centerBounds(w,$.getBoundsCenter(i))}),v&&(w={...w,...$.snapBoundsToGrid(w,g)});const C=O.dist(c,u)-this.speed;this.speed=this.speed+C*(C>1?.5:.15);let I=[];if((y&&!m||!y&&m)&&this.speed*s.zoom<I8&&this.snapInfo.state==="ready"){const T=$.getSnapPoints($.getBoundsWithCenter(w),this.snapInfo.bounds.filter(_=>$.boundsContain(l,_)||$.boundsCollide(l,_)),E8/s.zoom);T&&(I=T.snapLines,w=$.getTransformedBoundingBox(i,n,O.sub(x,T.offset),0,f||o))}return this.scaleX=w.scaleX,this.scaleY=w.scaleY,r.forEach(({initialShape:T,initialShapeBounds:_,transformOrigin:P})=>{let M=$.getRelativeTransformedBoundingBox(w,i,_,this.scaleX<0,this.scaleY<0);v&&(M=$.snapBoundsToGrid(M,g));const D=Q.transform(this.app.getShape(T.id),M,{type:this.transformType,initialShape:T,scaleX:this.scaleX,scaleY:this.scaleY,transformOrigin:P});b[T.id]=D}),{appState:{snapLines:I},document:{pages:{[a]:{shapes:b}}}}});S(this,"cancel",()=>{const{shapeBounds:n,app:{currentPageId:r}}=this,i={};return this.isCreate?n.forEach(o=>i[o.initialShape.id]=void 0):n.forEach(o=>i[o.initialShape.id]=o.initialShape),{appState:{snapLines:[]},document:{pages:{[r]:{shapes:i}},pageStates:{[r]:{selectedIds:this.isCreate?[]:n.map(o=>o.initialShape.id)}}}}});S(this,"complete",()=>{const{isCreate:n,shapeBounds:r,hasUnlockedShapes:i,app:{currentPageId:o}}=this;if(!i)return;const a={},s={};let l,c;return n?(l=[],c=[],r.forEach(({initialShape:u})=>{a[u.id]=void 0,s[u.id]=this.app.getShape(u.id)})):(l=this.initialSelectedIds,c=this.initialSelectedIds,r.forEach(({initialShape:u})=>{a[u.id]=u,s[u.id]=this.app.getShape(u.id)})),{id:"transform",before:{appState:{snapLines:[]},document:{pages:{[o]:{shapes:a}},pageStates:{[o]:{selectedIds:l,hoveredId:void 0,editingId:void 0}}}},after:{appState:{snapLines:[]},document:{pages:{[o]:{shapes:s}},pageStates:{[o]:{selectedIds:c,hoveredId:void 0,editingId:void 0}}}}}});this.transformType=r,this.isCreate=i,this.initialSelectedIds=[...this.app.selectedIds],this.app.rotationInfo.selectedIds=[...this.initialSelectedIds],this.initialShapes=Q.getSelectedBranchSnapshot(this.app.state,this.app.currentPageId).filter(l=>!l.isLocked),this.initialShapeIds=this.initialShapes.map(l=>l.id),this.hasUnlockedShapes=this.initialShapes.length>0,this.isAllAspectRatioLocked=this.initialShapes.every(l=>l.isAspectRatioLocked||Q.getShapeUtil(l).isAspectRatioLocked);const o=Object.fromEntries(this.initialShapes.map(l=>[l.id,Q.getBounds(l)])),a=Object.values(o);this.initialCommonBounds=$.getCommonBounds(a);const s=$.getBoundsFromPoints(a.map($.getBoundsCenter));this.shapeBounds=this.initialShapes.map(l=>{const c=o[l.id],u=$.getBoundsCenter(c),d=(u[0]-s.minX)/s.width,f=(u[1]-s.minY)/s.height;return{initialShape:l,initialShapeBounds:c,transformOrigin:[d,f]}})}}class UBe extends ca{constructor(n,r,i,o=!1){super(n);S(this,"type",Re.TransformSingle);S(this,"status",bn.Transforming);S(this,"performanceMode");S(this,"transformType");S(this,"scaleX",1);S(this,"scaleY",1);S(this,"isCreate");S(this,"initialShape");S(this,"initialShapeBounds");S(this,"initialCommonBounds");S(this,"snapInfo",{state:"empty"});S(this,"prevPoint",[0,0]);S(this,"speed",1);S(this,"start",()=>{this.snapInfo={state:"ready",bounds:this.app.shapes.filter(n=>n.id!==this.initialShape.id).map(n=>$.getBoundsWithCenter(Q.getRotatedBounds(n)))}});S(this,"update",()=>{var P;const{transformType:n,initialShape:r,initialShapeBounds:i,app:{settings:{isSnapping:o,showGrid:a},currentPageId:s,pageState:{camera:l},viewport:c,currentPoint:u,previousPoint:d,originPoint:f,currentGrid:p,shiftKey:m,altKey:g,metaKey:y}}=this;if(r.isLocked)return;const v={},b=g?O.mul(O.sub(u,f),2):O.sub(u,f),x=this.app.getShape(r.id),w=Q.getShapeUtil(x);let E=$.getTransformedBoundingBox(i,n,b,(P=x.rotation)!=null?P:0,m||x.isAspectRatioLocked||w.isAspectRatioLocked);g&&(E={...E,...$.centerBounds(E,$.getBoundsCenter(i))}),a&&(E={...E,...$.snapBoundsToGrid(E,p)});const I=O.dist(u,d)-this.speed;this.speed=this.speed+I*(I>1?.5:.15);let T=[];if((o&&!y||!o&&y)&&!r.rotation&&this.speed*l.zoom<I8&&this.snapInfo.state==="ready"){const M=$.getSnapPoints($.getBoundsWithCenter(E),this.snapInfo.bounds.filter(D=>$.boundsContain(c,D)||$.boundsCollide(c,D)),E8/l.zoom);M&&(T=M.snapLines,E=$.getTransformedBoundingBox(i,n,O.sub(b,M.offset),x.rotation,m||x.isAspectRatioLocked||w.isAspectRatioLocked))}const _=Q.getShapeUtil(x).transformSingle(x,E,{initialShape:r,type:this.transformType,scaleX:E.scaleX,scaleY:E.scaleY,transformOrigin:[.5,.5]});return _&&(v[x.id]=_),a&&_&&_.point&&(_.point=O.snap(_.point,p)),{appState:{snapLines:T},document:{pages:{[s]:{shapes:v}}}}});S(this,"cancel",()=>{const{initialShape:n,app:{currentPageId:r}}=this,i={};return this.isCreate?i[n.id]=void 0:i[n.id]=n,{appState:{snapLines:[]},document:{pages:{[r]:{shapes:i}},pageStates:{[r]:{selectedIds:this.isCreate?[]:[n.id]}}}}});S(this,"complete",()=>{const{initialShape:n,app:{currentPageId:r}}=this;if(n.isLocked)return;const i={},o={};return i[n.id]=this.isCreate?void 0:n,o[n.id]=Q.onSessionComplete(this.app.getShape(n.id)),{id:"transform_single",before:{appState:{snapLines:[]},document:{pages:{[r]:{shapes:i}},pageStates:{[r]:{selectedIds:this.isCreate?[]:[n.id],editingId:void 0,hoveredId:void 0}}}},after:{appState:{snapLines:[]},document:{pages:{[r]:{shapes:o}},pageStates:{[r]:{selectedIds:[n.id],editingId:void 0,hoveredId:void 0}}}}}});this.isCreate=o,this.transformType=i;const a=this.app.getShape(r);this.initialShape=a,this.initialShapeBounds=Q.getBounds(a),this.initialCommonBounds=Q.getRotatedBounds(a),this.app.rotationInfo.selectedIds=[a.id]}}class GBe extends ca{constructor(n,r=!1,i=!1){super(n);S(this,"performanceMode");S(this,"type",Re.Translate);S(this,"status",bn.Translating);S(this,"delta",[0,0]);S(this,"prev",[0,0]);S(this,"prevPoint",[0,0]);S(this,"speed",1);S(this,"cloneInfo",{state:"empty"});S(this,"snapInfo",{state:"empty"});S(this,"snapLines",[]);S(this,"isCloning",!1);S(this,"isCreate");S(this,"link");S(this,"initialIds");S(this,"hasUnlockedShapes");S(this,"initialSelectedIds");S(this,"initialCommonBounds");S(this,"initialShapes");S(this,"initialParentChildren");S(this,"bindingsToDelete");S(this,"start",()=>{const{bindingsToDelete:n,initialIds:r,app:{currentPageId:i,page:o}}=this,a=[],s=[];if(Object.values(o.shapes).forEach(c=>{const u=$.getBoundsWithCenter(Q.getRotatedBounds(c));a.push(u),r.has(c.id)||s.push(u)}),this.snapInfo={state:"ready",bounds:a,others:s},n.length===0)return;const l={};return n.forEach(c=>l[c.id]=void 0),{document:{pages:{[i]:{bindings:l}}}}});S(this,"update",()=>{const{initialParentChildren:n,initialShapes:r,initialCommonBounds:i,bindingsToDelete:o,app:{pageState:{camera:a},settings:{isSnapping:s,showGrid:l},currentPageId:c,viewport:u,selectedIds:d,currentPoint:f,previousPoint:p,originPoint:m,altKey:g,shiftKey:y,metaKey:v,currentGrid:b}}=this,x={},w={},E={};let C=O.sub(f,m),I=!1;this.isCreate||(g&&!this.isCloning?(this.isCloning=!0,I=!0):!g&&this.isCloning&&(this.isCloning=!1,I=!0)),y&&(Math.abs(C[0])<Math.abs(C[1])?C[0]=0:C[1]=0);const _=O.dist(f,p)-this.speed;if(this.speed=this.speed+_*(_>1?.5:.15),this.snapLines=[],(s&&!v||!s&&v)&&this.speed*a.zoom<I8&&this.snapInfo.state==="ready"){const P=$.getSnapPoints($.getBoundsWithCenter(l?$.snapBoundsToGrid($.translateBounds(i,C),b):$.translateBounds(i,C)),(this.isCloning?this.snapInfo.bounds:this.snapInfo.others).filter(M=>$.boundsContain(u,M)||$.boundsCollide(u,M)),E8/a.zoom);P&&(this.snapLines=P.snapLines,C=O.sub(C,P.offset))}if(this.prev=C,this.isCloning)if(I){if(this.cloneInfo.state==="empty"&&this.createCloneInfo(),this.cloneInfo.state==="empty")throw Error;const{clones:P,clonedBindings:M}=this.cloneInfo;this.isCloning=!0,o.forEach(D=>x[D.id]=D),r.forEach(D=>w[D.id]={point:D.point}),P.forEach(D=>{var V;if(w[D.id]={...D},D.parentId!==c&&!d.includes(D.parentId)){const B=((V=w[D.parentId])==null?void 0:V.children)||n[D.parentId];B.includes(D.id)||(w[D.parentId]={...w[D.parentId],children:[...B,D.id]})}});for(const D of M)x[D.id]=D;E.selectedIds=P.map(D=>D.id),P.forEach(D=>{w[D.id]={...D,point:l?O.snap(O.toFixed(O.add(D.point,C)),b):O.toFixed(O.add(D.point,C))}})}else{if(this.cloneInfo.state==="empty")throw Error;const{clones:P}=this.cloneInfo;P.forEach(M=>{w[M.id]={point:l?O.snap(O.toFixed(O.add(M.point,C)),b):O.toFixed(O.add(M.point,C))}})}else if(I){if(this.cloneInfo.state==="empty")throw Error;const{clones:P,clonedBindings:M}=this.cloneInfo;this.isCloning=!1,o.forEach(D=>x[D.id]=void 0),P.forEach(D=>{D.parentId!==c&&(w[D.parentId]={...w[D.parentId],children:n[D.parentId]})}),P.forEach(D=>w[D.id]=void 0),r.forEach(D=>{w[D.id]={point:l?O.snap(O.toFixed(O.add(D.point,C)),b):O.toFixed(O.add(D.point,C))}});for(const D of M)x[D.id]=void 0;E.selectedIds=r.map(D=>D.id)}else r.forEach(P=>{w[P.id]={point:l?O.snap(O.toFixed(O.add(P.point,C)),b):O.toFixed(O.add(P.point,C))}});return{appState:{snapLines:this.snapLines},document:{pages:{[c]:{shapes:w,bindings:x}},pageStates:{[c]:E}}}});S(this,"cancel",()=>{const{initialShapes:n,initialSelectedIds:r,bindingsToDelete:i,app:{currentPageId:o}}=this,a={},s={},l={editingId:void 0,hoveredId:void 0};if(i.forEach(c=>a[c.id]=c),this.isCreate?(n.forEach(({id:c})=>s[c]=void 0),l.selectedIds=[]):(n.forEach(({id:c,point:u})=>s[c]={...s[c],point:u}),l.selectedIds=r),this.cloneInfo.state==="ready"){const{clones:c,clonedBindings:u}=this.cloneInfo;c.forEach(d=>s[d.id]=void 0),u.forEach(d=>a[d.id]=void 0)}return{appState:{snapLines:[]},document:{pages:{[o]:{shapes:s,bindings:a}},pageStates:{[o]:l}}}});S(this,"complete",()=>{const{initialShapes:n,initialParentChildren:r,bindingsToDelete:i,app:{currentPageId:o}}=this,a={},s={},l={},c={};if(this.isCloning){if(this.cloneInfo.state==="empty"&&this.createCloneInfo(),this.cloneInfo.state!=="ready")throw Error;const{clones:u,clonedBindings:d}=this.cloneInfo;u.forEach(f=>{s[f.id]=void 0,c[f.id]=this.app.getShape(f.id),f.parentId!==o&&(s[f.parentId]={...s[f.parentId],children:r[f.parentId]},c[f.parentId]={...c[f.parentId],children:this.app.getShape(f.parentId).children})}),d.forEach(f=>{a[f.id]=void 0,l[f.id]=this.app.getBinding(f.id)})}else n.forEach(u=>{s[u.id]=this.isCreate?void 0:{...s[u.id],point:u.point},c[u.id]={...c[u.id],...this.isCreate?this.app.getShape(u.id):{point:this.app.getShape(u.id).point}}});return i.forEach(u=>{a[u.id]=u;for(const d of[u.toId,u.fromId]){const f=this.app.getShape(d);!f.handles||Object.values(f.handles).filter(p=>p.bindingId===u.id).forEach(p=>{s[d]={...s[d],handles:{}},c[d]={...c[d],handles:{}},s[d].handles[p.id]={bindingId:u.id},c[d].handles[p.id]={bindingId:void 0}})}}),{id:"translate",before:{appState:{snapLines:[]},document:{pages:{[o]:{shapes:s,bindings:a}},pageStates:{[o]:{selectedIds:this.isCreate?[]:[...this.initialSelectedIds]}}}},after:{appState:{snapLines:[]},document:{pages:{[o]:{shapes:c,bindings:l}},pageStates:{[o]:{selectedIds:[...this.app.selectedIds]}}}}}});S(this,"createCloneInfo",()=>{const{initialShapes:n,initialParentChildren:r,app:{selectedIds:i,currentPageId:o,page:a}}=this,s={},l={},c=[],u=[];n.forEach(f=>{const p=$.uniqueId();r[p]=r[f.id],s[f.id]=p;const m={...$.deepClone(f),id:p,parentId:f.parentId,childIndex:Q.getChildIndexAbove(this.app.state,f.id,o)};if(m.type===U.Video){const g=document.getElementById(f.id+"_video");g&&(m.currentTime=(g.currentTime+16)%g.duration)}u.push(m)}),u.forEach(f=>{f.children!==void 0&&(f.children=f.children.map(p=>s[p]))}),u.forEach(f=>{i.includes(f.parentId)&&(f.parentId=s[f.parentId])});const d=new Set(Object.keys(s));Object.values(a.bindings).filter(f=>d.has(f.fromId)||d.has(f.toId)).forEach(f=>{if(d.has(f.fromId)&&d.has(f.toId)){const p=$.uniqueId(),m={...$.deepClone(f),id:p,fromId:s[f.fromId]||f.fromId,toId:s[f.toId]||f.toId};l[f.id]=p,c.push(m)}}),u.forEach(f=>{if(f.handles&&f.handles)for(const p in f.handles){const m=f.handles[p];m.bindingId=m.bindingId?l[m.bindingId]:void 0}}),u.forEach(f=>{if(a.shapes[f.id])throw Error("uh oh, we didn't clone correctly")}),this.cloneInfo={state:"ready",clones:u,cloneMap:s,clonedBindings:c}});this.isCreate=r,this.link=i;const{currentPageId:o,selectedIds:a,page:s}=this.app;this.initialSelectedIds=[...a];const l=(i?Q.getLinkedShapeIds(this.app.state,o,i,!1):a).map(u=>this.app.getShape(u)).filter(u=>!u.isLocked),c=new Set(l.map(u=>u.id));this.hasUnlockedShapes=l.length>0,this.initialShapes=Array.from(new Set(l.filter(u=>!c.has(u.parentId)).flatMap(u=>u.children?[u,...u.children.map(d=>this.app.getShape(d))]:[u])).values()),this.initialIds=new Set(this.initialShapes.map(u=>u.id)),this.bindingsToDelete=[],Object.values(s.bindings).filter(u=>this.initialIds.has(u.fromId)||this.initialIds.has(u.toId)).forEach(u=>{this.initialIds.has(u.fromId)&&(this.initialIds.has(u.toId)||this.bindingsToDelete.push(u))}),this.initialParentChildren={},this.initialShapes.map(u=>u.parentId).filter(u=>u!==s.id).forEach(u=>{this.initialParentChildren[u]=this.app.getShape(u).children}),this.initialCommonBounds=$.getCommonBounds(this.initialShapes.map(Q.getRotatedBounds)),this.app.rotationInfo.selectedIds=[...this.app.selectedIds]}}const KBe={[Re.Arrow]:$Be,[Re.Brush]:FBe,[Re.Draw]:NBe,[Re.Erase]:zBe,[Re.Handle]:HBe,[Re.Rotate]:VBe,[Re.Transform]:WBe,[Re.TransformSingle]:UBe,[Re.Translate]:GBe,[Re.Grid]:jBe},qBe=e=>KBe[e];function YBe(e){let t;const n=new Set,r=(c,u)=>{const d=typeof c=="function"?c(t):c;if(d!==t){const f=t;t=u?d:Object.assign({},t,d),n.forEach(p=>p(t,f))}},i=()=>t,o=(c,u=i,d=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let f=u(t);function p(){const m=u(t);if(!d(f,m)){const g=f;c(f=m,g)}}return n.add(p),()=>n.delete(p)},l={setState:r,getState:i,subscribe:(c,u,d)=>u||d?o(c,u,d):(n.add(c),()=>n.delete(c)),destroy:()=>n.clear()};return t=e(r,i,l),l}const XBe=typeof window=="undefined"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),DM=XBe?h.exports.useEffect:h.exports.useLayoutEffect;function ZBe(e){const t=typeof e=="function"?YBe(e):e,n=(r=t.getState,i=Object.is)=>{const[,o]=h.exports.useReducer(y=>y+1,0),a=t.getState(),s=h.exports.useRef(a),l=h.exports.useRef(r),c=h.exports.useRef(i),u=h.exports.useRef(!1),d=h.exports.useRef();d.current===void 0&&(d.current=r(a));let f,p=!1;(s.current!==a||l.current!==r||c.current!==i||u.current)&&(f=r(a),p=!i(d.current,f)),DM(()=>{p&&(d.current=f),s.current=a,l.current=r,c.current=i,u.current=!1});const m=h.exports.useRef(a);DM(()=>{const y=()=>{try{const b=t.getState(),x=l.current(b);c.current(d.current,x)||(s.current=b,d.current=x,o())}catch{u.current=!0,o()}},v=t.subscribe(y);return t.getState()!==m.current&&y(),v},[]);const g=p?f:d.current;return h.exports.useDebugValue(g),g};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const r=[n,t];return{next(){const i=r.length<=0;return{value:r.shift(),done:i}}}},n}function QBe(e){let t;const n=new Set,r=(c,u)=>{const d=typeof c=="function"?c(t):c;if(d!==t){const f=t;t=u?d:Object.assign({},t,d),n.forEach(p=>p(t,f))}},i=()=>t,o=(c,u=i,d=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let f=u(t);function p(){const m=u(t);if(!d(f,m)){const g=f;c(f=m,g)}}return n.add(p),()=>n.delete(p)},l={setState:r,getState:i,subscribe:(c,u,d)=>u||d?o(c,u,d):(n.add(c),()=>n.delete(c)),destroy:()=>n.clear()};return t=e(r,i,l),l}function _p(e){if(e===null)return e;if(e instanceof Date)return new Date(e.getTime());if(typeof e=="object")if(typeof e[Symbol.iterator]=="function"){const t=[];if(e.length>0)for(const n of e)t.push(_p(n));return t}else{const t=Object.keys(e),n={};if(t.length>0)for(const r of t)n[r]=_p(e[r]);return n}return e}class JBe{constructor(t,n,r,i){S(this,"_idbId");S(this,"initialState");S(this,"store");S(this,"pointer",-1);S(this,"_state");S(this,"_status","loading");S(this,"stack",[]);S(this,"_snapshot");S(this,"useStore");S(this,"ready");S(this,"isPaused",!1);S(this,"persist",t=>{if(this._status==="ready"&&(this.onPersist&&this.onPersist(this._state,t),this._idbId))return UW(this._idbId,this._state).catch(n=>console.error(n))});S(this,"applyPatch",(t,n)=>{try{delete this._state.document.userSettings.DANGEROUSLY_SET_CSS.DANGEROUSLY_SET_CSS}catch{}const r=this._state,i=$.deepMerge(this._state,t),o=this.cleanup(i,r,t,n);return this.onStateWillChange&&this.onStateWillChange(o,n),this._state=o,this.store.setState(this._state,!0),this.onStateDidChange&&this.onStateDidChange(this._state,n),this});S(this,"cleanup",(t,n,r,i)=>t);S(this,"onStateWillChange");S(this,"onStateDidChange");S(this,"patchState",(t,n)=>(this.applyPatch(t,n),this.onPatch&&this.onPatch(this._state,n),this));S(this,"replaceState",(t,n)=>{const r=this.cleanup(t,this._state,t,n);return this.onStateWillChange&&this.onStateWillChange(r,"replace"),this._state=r,this.store.setState(this._state,!0),this.onStateDidChange&&this.onStateDidChange(this._state,"replace"),this});S(this,"setState",(t,n=t.id)=>(this.pointer<this.stack.length-1&&(this.stack=this.stack.slice(0,this.pointer+1)),this.stack.push({...t,id:n}),this.pointer=this.stack.length-1,this.applyPatch(t.after,n),this.onCommand&&this.onCommand(this._state,n),this.persist(n),this));S(this,"onReady");S(this,"onPatch");S(this,"onCommand");S(this,"onPersist");S(this,"onReplace");S(this,"onReset");S(this,"onResetHistory");S(this,"onUndo");S(this,"onRedo");S(this,"reset",()=>(this.onStateWillChange&&this.onStateWillChange(this.initialState,"reset"),this._state=this.initialState,this.store.setState(this._state,!0),this.resetHistory(),this.persist("reset"),this.onStateDidChange&&this.onStateDidChange(this._state,"reset"),this.onReset&&this.onReset(this._state),this));S(this,"replaceHistory",(t,n=t.length-1)=>(this.stack=t,this.pointer=n,this.onReplace&&this.onReplace(this._state),this));S(this,"resetHistory",()=>(this.stack=[],this.pointer=-1,this.onResetHistory&&this.onResetHistory(this._state),this));S(this,"undo",()=>{if(!this.isPaused){if(!this.canUndo)return this;const t=this.stack[this.pointer];this.pointer--,this.applyPatch(t.before,"undo"),this.persist("undo")}return this.onUndo&&this.onUndo(this._state),this});S(this,"redo",()=>{if(!this.isPaused){if(!this.canRedo)return this;this.pointer++;const t=this.stack[this.pointer];this.applyPatch(t.after,"redo"),this.persist("undo")}return this.onRedo&&this.onRedo(this._state),this});S(this,"setSnapshot",()=>(this._snapshot={...this._state},this));S(this,"forceUpdate",()=>{this.store.setState(this._state,!0)});this._idbId=n,this._state=_p(t),this._snapshot=_p(t),this.initialState=_p(t),this.store=QBe(()=>this._state),this.useStore=ZBe(this.store),this.ready=new Promise(o=>{const a="none";this._status="ready",o(a)}).then(o=>(this.onReady&&this.onReady(o),o))}pause(){this.isPaused=!0}resume(){this.isPaused=!1}get canUndo(){return this.pointer>-1}get canRedo(){return this.pointer<this.stack.length-1}get state(){return this._state}get status(){return this._status}get snapshot(){return this._snapshot}}var St=(e=>(e.Idle="idle",e.Creating="creating",e.Pinching="pinching",e))(St||{});class Vi extends u7e{constructor(n){super();S(this,"type","select");S(this,"previous");S(this,"status","idle");S(this,"setStatus",n=>{this.status=n,this.app.setStatus(this.status)});S(this,"onEnter",()=>{this.setStatus("idle")});S(this,"onExit",()=>{this.setStatus("idle")});S(this,"onCancel",()=>{this.status==="idle"?this.app.selectTool("select"):this.setStatus("idle"),this.app.cancelSession()});S(this,"getNextChildIndex",()=>{const{shapes:n,appState:{currentPageId:r}}=this.app;return n.length===0?1:n.filter(i=>i.parentId===r).sort((i,o)=>o.childIndex-i.childIndex)[0].childIndex+1});S(this,"onPinchStart",()=>{this.app.cancelSession(),this.setStatus("pinching")});S(this,"onPinchEnd",()=>{$.isMobileSafari()&&this.app.undoSelect(),this.setStatus("idle")});S(this,"onPinch",(n,r)=>{var i;this.status==="pinching"&&(isNaN(n.delta[0])||isNaN(n.delta[1])||(this.app.pinchZoom(n.point,n.delta,n.delta[2]),(i=this.onPointerMove)==null||i.call(this,n,r)))});S(this,"onKeyDown",n=>{if(n==="Escape"){this.onCancel();return}if(n==="Meta"||n==="Control"||n==="Alt"){this.app.updateSession();return}});S(this,"onKeyUp",n=>{if(n==="Meta"||n==="Control"||n==="Alt"){this.app.updateSession();return}});S(this,"onPointerMove",()=>{this.status==="creating"&&this.app.updateSession()});S(this,"onPointerUp",()=>{if(this.status==="creating"){this.app.completeSession();const{isToolLocked:n}=this.app.appState;n||this.app.selectTool("select")}this.setStatus("idle")});this.app=n}}class KW extends Vi{constructor(){super(...arguments);S(this,"type",U.Arrow);S(this,"onPointerDown",()=>{if(this.status!==St.Idle)return;const{currentPoint:n,currentGrid:r,settings:{showGrid:i},appState:{currentPageId:o,currentStyle:a}}=this.app,s=this.getNextChildIndex(),l=$.uniqueId(),c=O8.create({id:l,parentId:o,childIndex:s,point:i?Y.snap(n,r):n,style:{...a}});this.app.patchCreate([c]),this.app.startSession(Re.Arrow,c.id,"end",!0),this.setStatus(St.Creating)})}}class qW extends Vi{constructor(){super(...arguments);S(this,"type",U.Diamond);S(this,"onPointerDown",()=>{if(this.status!==St.Idle)return;const{currentPoint:n,currentGrid:r,settings:{showGrid:i},appState:{currentPageId:o,currentStyle:a}}=this.app,s=this.getNextChildIndex(),l=$.uniqueId(),c=$W.create({id:l,parentId:o,childIndex:s,point:i?Y.snap(n,r):n,style:{...a}});this.app.patchCreate([c]),this.app.startSession(Re.TransformSingle,c.id,xo.BottomRight,!0),this.setStatus(St.Creating)})}}class YW extends Vi{constructor(){super(...arguments);S(this,"type",U.Draw);S(this,"lastShapeId");S(this,"onEnter",()=>{this.lastShapeId=void 0});S(this,"onCancel",()=>{switch(this.status){case"idle":{this.app.selectTool("select");break}default:{this.setStatus("idle");break}}this.app.cancelSession()});S(this,"onPointerDown",n=>{if(this.status!=="idle")return;const{currentPoint:r,appState:{currentPageId:i,currentStyle:o}}=this.app,a=this.lastShapeId&&this.app.getShape(this.lastShapeId);if(n.shiftKey&&a)this.app.startSession(Re.Draw,a.id),this.setStatus("extending");else{const s=this.getNextChildIndex(),l=$.uniqueId(),c=BW.create({id:l,parentId:i,childIndex:s,point:r,style:{...o}});this.lastShapeId=l,this.app.patchCreate([c]),this.app.startSession(Re.Draw,l),this.setStatus("creating")}});S(this,"onPointerMove",()=>{switch(this.status){case"extending":case"creating":this.app.updateSession()}});S(this,"onPointerUp",()=>{this.app.completeSession(),this.setStatus("idle")})}}class XW extends Vi{constructor(){super(...arguments);S(this,"type",U.Ellipse);S(this,"onPointerDown",()=>{if(this.status!==St.Idle)return;const{currentPoint:n,currentGrid:r,settings:{showGrid:i},appState:{currentPageId:o,currentStyle:a}}=this.app,s=this.getNextChildIndex(),l=$.uniqueId(),c=LW.create({id:l,parentId:o,childIndex:s,point:i?Y.snap(n,r):n,style:{...a}});this.app.patchCreate([c]),this.app.startSession(Re.TransformSingle,c.id,xo.BottomRight,!0),this.setStatus(St.Creating)})}}class ZW extends Vi{constructor(){super(...arguments);S(this,"type","erase");S(this,"status","idle");S(this,"onPointerDown",()=>{this.status==="idle"&&this.setStatus("pointing")});S(this,"onPointerMove",n=>{switch(this.status){case"pointing":{Y.dist(n.origin,n.point)>du&&(this.app.startSession(Re.Erase),this.app.updateSession(),this.setStatus("erasing"));break}case"erasing":this.app.updateSession()}});S(this,"onPointerUp",()=>{switch(this.status){case"pointing":{const n=this.app.shapes.filter(r=>!r.isLocked).filter(r=>this.app.getShapeUtil(r).hitTestPoint(r,this.app.currentPoint)).flatMap(r=>r.children?[r.id,...r.children]:r.id);this.app.delete(n);break}case"erasing":this.app.completeSession()}this.setStatus("idle")});S(this,"onCancel",()=>{this.status==="idle"?this.previous?this.app.selectTool(this.previous):this.app.selectTool("select"):this.setStatus("idle"),this.app.cancelSession()})}}class QW extends Vi{constructor(){super(...arguments);S(this,"type",U.Line);S(this,"onPointerDown",()=>{if(this.status!==St.Idle)return;const{currentPoint:n,currentGrid:r,settings:{showGrid:i},appState:{currentPageId:o,currentStyle:a}}=this.app,s=this.getNextChildIndex(),l=$.uniqueId(),c=O8.create({id:l,parentId:o,childIndex:s,point:i?Y.snap(n,r):n,decorations:{start:void 0,end:void 0},style:{...a}});this.app.patchCreate([c]),this.app.startSession(Re.Arrow,c.id,"end",!0),this.setStatus(St.Creating)})}}class JW extends Vi{constructor(){super(...arguments);S(this,"type",U.Polygon);S(this,"onPointerDown",()=>{if(this.status!==St.Idle)return;const{currentPoint:n,currentGrid:r,settings:{showGrid:i},appState:{currentPageId:o,currentStyle:a}}=this.app,s=this.getNextChildIndex(),l=$.uniqueId(),c=FW.create({id:l,parentId:o,childIndex:s,point:i?Y.snap(n,r):n,style:{...a}});this.app.patchCreate([c]),this.app.startSession(Re.TransformSingle,c.id,xo.BottomRight,!0),this.setStatus(St.Creating)})}}class eU extends Vi{constructor(){super(...arguments);S(this,"type",U.Rectangle);S(this,"onPointerDown",()=>{if(this.status!==St.Idle)return;const{currentPoint:n,currentGrid:r,settings:{showGrid:i},appState:{currentPageId:o,currentStyle:a}}=this.app,s=this.getNextChildIndex(),l=$.uniqueId(),c=DW.create({id:l,parentId:o,childIndex:s,point:i?Y.snap(n,r):n,style:{...a}});this.app.patchCreate([c]),this.app.startSession(Re.TransformSingle,c.id,xo.BottomRight,!0),this.setStatus(St.Creating)})}}class tU extends Vi{constructor(){super(...arguments);S(this,"type","select");S(this,"pointedId");S(this,"selectedGroupId");S(this,"pointedHandleId");S(this,"pointedBoundsHandle");S(this,"pointedLinkHandleId");S(this,"onEnter",()=>{this.setStatus("idle")});S(this,"onExit",()=>{this.setStatus("idle")});S(this,"clonePaint",n=>{if(this.app.selectedIds.length===0)return;const r=this.app.selectedIds.map(u=>this.app.getShape(u)),i=$.expandBounds($.getCommonBounds(r.map(Q.getBounds)),16),o=$.getBoundsCenter(i),a=[i.width,i.height],s=[o[0]+a[0]*Math.floor((n[0]+a[0]/2-o[0])/a[0]),o[1]+a[1]*Math.floor((n[1]+a[1]/2-o[1])/a[1])],l=$.centerBounds(i,s);this.app.shapes.some(u=>Q.getShapeUtil(u).hitTestBounds(u,l))||this.app.duplicate(this.app.selectedIds,s)});S(this,"getShapeClone",(n,r)=>{const i=this.app.getShape(n),o=Q.getShapeUtil(i);if(o.canClone){const a=o.getBounds(i),s=o.getCenter(i);let l={top:[a.minX,a.minY-(a.height+xi)],right:[a.maxX+xi,a.minY],bottom:[a.minX,a.maxY+xi],left:[a.minX-(a.width+xi),a.minY],topLeft:[a.minX-(a.width+xi),a.minY-(a.height+xi)],topRight:[a.maxX+xi,a.minY-(a.height+xi)],bottomLeft:[a.minX-(a.width+xi),a.maxY+xi],bottomRight:[a.maxX+xi,a.maxY+xi]}[r];if(i.rotation!==0){const d=Y.add(l,[a.width/2,a.height/2]),f=Y.rotWith(d,s,i.rotation||0);l=Y.sub(f,[a.width/2,a.height/2])}const c=$.uniqueId(),u={...i,id:c,point:l};return u.type===U.Sticky&&(u.text=""),u}});S(this,"onCancel",()=>{this.app.pageState.editingId?this.app.setEditingId():this.selectNone(),this.app.cancelSession(),this.setStatus("idle")});S(this,"onKeyDown",(n,r,i)=>{switch(n){case"Escape":{this.onCancel();break}case"Tab":{if(!this.app.pageState.editingId&&this.status==="idle"&&this.app.selectedIds.length===1){const[o]=this.app.selectedIds,a=this.getShapeClone(o,"right");a&&(this.app.createShapes(a),this.setStatus("idle"),a.type===U.Sticky&&(this.app.select(a.id),this.app.setEditingId(a.id)))}break}case"Meta":case"Control":case"Alt":{this.app.updateSession();break}case"Enter":{const{pageState:o}=this.app;o.selectedIds.length===1&&!o.editingId&&(this.app.setEditingId(o.selectedIds[0]),i.preventDefault())}}});S(this,"onKeyUp",(n,r)=>{if(this.status==="clonePainting"&&!(r.altKey&&r.shiftKey)){this.setStatus("idle");return}if(n==="Meta"||n==="Control"||n==="Alt"){this.app.updateSession();return}});S(this,"onPointerMove",(n,r)=>{const{originPoint:i,currentPoint:o}=this.app;switch(this.status){case"pointingBoundsHandle":{if(!this.pointedBoundsHandle)throw Error("No pointed bounds handle");if(Y.dist(i,o)>du){if(this.pointedBoundsHandle==="rotate")this.setStatus("rotating"),this.app.startSession(Re.Rotate);else if(this.pointedBoundsHandle==="center"||this.pointedBoundsHandle==="left"||this.pointedBoundsHandle==="right")this.setStatus("translating"),this.app.startSession(Re.Translate,!1,this.pointedBoundsHandle);else{this.setStatus("transforming");const a=this.app.selectedIds.flatMap(s=>Q.getDocumentBranch(this.app.state,s,this.app.currentPageId));a.length===1?this.app.startSession(Re.TransformSingle,a[0],this.pointedBoundsHandle):this.app.startSession(Re.Transform,this.pointedBoundsHandle)}this.app.updateSession()}break}case"pointingCanvas":{Y.dist(i,o)>du&&(this.app.startSession(Re.Brush),this.setStatus("brushing"));break}case"pointingClone":{Y.dist(i,o)>du&&(this.setStatus("translatingClone"),this.app.startSession(Re.Translate),this.app.updateSession());break}case"pointingBounds":{Y.dist(i,o)>du&&(this.setStatus("translating"),this.app.startSession(Re.Translate),this.app.updateSession());break}case"pointingHandle":{if(!this.pointedHandleId)throw Error("No pointed handle");if(Y.dist(i,o)>du){this.setStatus("translatingHandle");const a=this.app.getShape(this.app.selectedIds[0]);a&&(this.pointedHandleId==="bend"?(this.app.startSession(Re.Handle,a.id,this.pointedHandleId),this.app.updateSession()):(this.app.startSession(Re.Arrow,a.id,this.pointedHandleId,!1),this.app.updateSession()))}break}case"clonePainting":{this.clonePaint(o);break}default:if(this.app.session){this.app.updateSession();break}}});S(this,"onPointerDown",(n,r)=>{if(n.target==="canvas"&&this.status==="idle"){const{currentPoint:i}=this.app;if(n.spaceKey&&r.buttons===1)return;if(this.status==="idle"&&n.altKey&&n.shiftKey){this.setStatus("clonePainting"),this.clonePaint(i);return}if(!n.shiftKey){if(this.app.onShapeBlur(),n.altKey&&this.app.selectedIds.length>0){this.app.duplicate(this.app.selectedIds,i);return}this.selectNone()}this.setStatus("pointingCanvas")}});S(this,"onPointerUp",n=>{if(this.status==="translatingClone"||this.status==="pointingClone"){this.pointedId&&(this.app.completeSession(),this.app.setEditingId(this.pointedId)),this.setStatus("idle"),this.pointedId=void 0;return}if(this.status==="pointingBounds"){if(n.target==="bounds")this.selectNone();else if(this.app.isSelected(n.target))n.shiftKey?this.pointedId!==n.target&&this.deselect(n.target):this.pointedId!==n.target&&this.app.selectedIds.length>1&&this.select(n.target);else if(this.pointedId===n.target){if(this.app.getShape(n.target).isLocked)return;n.shiftKey?this.pushSelect(n.target):this.select(n.target)}}this.app.completeSession(),this.setStatus("idle"),this.pointedBoundsHandle=void 0,this.pointedHandleId=void 0,this.pointedId=void 0});S(this,"onDoubleClickCanvas",()=>{});S(this,"onPointShape",(n,r)=>{if(n.spaceKey&&r.buttons===1||this.app.getShape(n.target).isLocked)return;const{editingId:i,hoveredId:o}=this.app.pageState;if(i&&n.target!==i&&this.app.onShapeBlur(),(this.status==="idle"||this.status==="pointingBounds")&&n.metaKey&&n.shiftKey&&o){this.pointedId=o,this.app.isSelected(o)?this.deselect(o):(this.pushSelect(o),this.setStatus("pointingBounds"));return}if(this.status==="pointingBounds"){const{parentId:a}=this.app.getShape(n.target);this.pointedId=a===this.app.currentPageId?n.target:a;return}if(this.status==="idle"){if(this.setStatus("pointingBounds"),n.metaKey){n.shiftKey||this.selectNone(),this.app.startSession(Re.Brush),this.setStatus("brushing");return}let a;const{parentId:s}=this.app.getShape(n.target);s===this.app.currentPageId?(a=n.target,this.selectedGroupId=void 0):s===this.selectedGroupId?a=n.target:(a=s,this.selectedGroupId=void 0),this.app.isSelected(a)||(this.pointedId=a,n.shiftKey?this.pushSelect(a):this.select(a))}});S(this,"onDoubleClickShape",n=>{var i;const r=this.app.getShape(n.target);if(r.isLocked){this.app.select(n.target);return}if(this.app.isWAElement(n.target)){const o=(i=this.app.getBlock(n.target))==null?void 0:i.tlUrl;o&&Ch(o);return}if(r.link){Ch(r.link);return}Q.getShapeUtil(r.type).canEdit&&(r.parentId===this.app.currentPageId||r.parentId===this.selectedGroupId)&&this.app.setEditingId(n.target),r.parentId!==this.app.currentPageId&&(this.selectedGroupId=r.parentId),this.app.select(n.target)});S(this,"onRightPointShape",n=>{this.app.isSelected(n.target)||this.app.select(n.target)});S(this,"onHoverShape",n=>{this.app.setHoveredId(n.target)});S(this,"onUnhoverShape",n=>{const{currentPageId:r}=this.app;requestAnimationFrame(()=>{r===this.app.currentPageId&&this.app.pageState.hoveredId===n.target&&this.app.setHoveredId(void 0)})});S(this,"onPointBounds",n=>{if(n.metaKey){n.shiftKey||this.selectNone(),this.app.startSession(Re.Brush),this.setStatus("brushing");return}this.setStatus("pointingBounds")});S(this,"onRightPointBounds",(n,r)=>{r.stopPropagation()});S(this,"onReleaseBounds",()=>{(this.status==="translating"||this.status==="brushing")&&this.app.completeSession(),this.setStatus("idle")});S(this,"onPointBoundsHandle",(n,r)=>{switch(this.pointedBoundsHandle=n.target,this.setStatus("pointingBoundsHandle"),n.target){case"center":case"left":case"right":{Q.getLinkedShapeIds(this.app.state,this.app.currentPageId,n.target,n.shiftKey);break}default:if(this.app.selectedIds.length===1){this.app.resetBounds(this.app.selectedIds);const i=this.app.getShape(this.app.selectedIds[0]);"label"in i&&this.app.setEditingId(i.id)}}});S(this,"onDoubleClickBoundsHandle",n=>{});S(this,"onReleaseBoundsHandle",()=>{this.setStatus("idle")});S(this,"onPointHandle",n=>{this.pointedHandleId=n.target,this.setStatus("pointingHandle")});S(this,"onDoubleClickHandle",n=>{if(n.target==="bend"){const{selectedIds:r}=this.app;if(r.length!==1)return;const i=this.app.getShape(r[0]);Q.getShapeUtil(i.type).canEdit&&(i.parentId===this.app.currentPageId||i.parentId===this.selectedGroupId)&&this.app.setEditingId(i.id);return}this.app.toggleDecoration(n.target)});S(this,"onReleaseHandle",()=>{this.setStatus("idle")});S(this,"onShapeClone",n=>{const r=this.app.selectedIds[0],i=this.getShapeClone(r,n.target);n.target==="left"||n.target==="right"||n.target==="top"||n.target==="bottom"?i&&(this.app.createShapes(i),this.pointedId=i.id,this.setStatus("pointingClone")):(this.setStatus("gridCloning"),this.app.startSession(Re.Grid,r))})}deselect(n){this.app.select(...this.app.selectedIds.filter(r=>r!==n))}select(n){this.app.select(n)}pushSelect(n){const r=this.app.getShape(n);this.app.select(...this.app.selectedIds.filter(i=>i!==r.parentId),n)}selectNone(){this.app.selectNone()}}class nU extends Vi{constructor(){super(...arguments);S(this,"type",U.Sticky);S(this,"shapeId");S(this,"onPointerDown",()=>{if(this.status===St.Creating){this.setStatus(St.Idle),this.app.appState.isToolLocked||this.app.selectTool("select");return}if(this.status===St.Idle){const{currentPoint:n,currentGrid:r,settings:{showGrid:i},appState:{currentPageId:o,currentStyle:a}}=this.app,s=this.getNextChildIndex(),l=$.uniqueId();this.shapeId=l;const c=U4.create({id:l,parentId:o,childIndex:s,point:i?Y.snap(n,r):n,style:{...a}}),u=U4.getBounds(c);c.point=Y.sub(c.point,[u.width/2,u.height/2]),this.app.createShapes(c),this.app.startSession(Re.Translate),this.setStatus(St.Creating)}});S(this,"onPointerUp",()=>{this.status===St.Creating&&(this.setStatus(St.Idle),this.app.completeSession(),this.app.selectTool("select"),this.app.setEditingId(this.shapeId))})}}class rU extends Vi{constructor(){super(...arguments);S(this,"type",U.Text);S(this,"stopEditingShape",()=>{this.setStatus(St.Idle),this.app.appState.isToolLocked||this.app.selectTool("select"),this.app.updateWaUserSettings({DANGEROUSLY_SET_CSS:{cursor:"unset"}})});S(this,"onEnter",()=>{this.app.updateWaUserSettings({DANGEROUSLY_SET_CSS:{cursor:"text"}})});S(this,"onKeyUp",()=>{});S(this,"onKeyDown",()=>{});S(this,"onPointerDown",()=>{if(this.app.updateWaUserSettings({DANGEROUSLY_SET_CSS:{cursor:"unset"}}),this.status===St.Creating){this.stopEditingShape();return}if(this.status===St.Idle){const{currentPoint:n,currentGrid:r,settings:{showGrid:i}}=this.app;this.app.createTextShapeAtPoint(i?Y.snap(n,r):n),this.setStatus(St.Creating);return}});S(this,"onPointerUp",()=>{});S(this,"onPointShape",n=>{const r=this.app.getShape(n.target);r.type===U.Text&&(this.setStatus(St.Idle),this.app.setEditingId(r.id))});S(this,"onShapeBlur",()=>{this.stopEditingShape()})}}class iU extends Vi{constructor(){super(...arguments);S(this,"type",U.Triangle);S(this,"onPointerDown",()=>{if(this.status!==St.Idle)return;const{currentPoint:n,currentGrid:r,settings:{showGrid:i},appState:{currentPageId:o,currentStyle:a}}=this.app,s=this.getNextChildIndex(),l=$.uniqueId(),c=AW.create({id:l,parentId:o,childIndex:s,point:i?Y.snap(n,r):n,style:{...a}});this.app.patchCreate([c]),this.app.startSession(Re.TransformSingle,c.id,xo.BottomRight,!0),this.setStatus(St.Creating)})}}const Cx=$.uniqueId(),An=class extends JBe{constructor(n,r={}){super(An.defaultState,n,An.version,(i,o,a)=>({...o,document:os({...o.document,...i.document,version:a},An.version)}));S(this,"callbacks",{});S(this,"tools",{select:new tU(this),erase:new ZW(this),[U.Text]:new rU(this),[U.Draw]:new YW(this),[U.Ellipse]:new XW(this),[U.Rectangle]:new eU(this),[U.Triangle]:new iU(this),[U.Line]:new QW(this),[U.Arrow]:new KW(this),[U.Sticky]:new nU(this),[U.Diamond]:new qW(this),[U.Polygon]:new JW(this)});S(this,"currentTool",this.tools.select);S(this,"session");S(this,"readOnly",!1);S(this,"isDirty",!1);S(this,"isCreating",!1);S(this,"originPoint",[0,0]);S(this,"currentPoint",[0,0]);S(this,"previousPoint",[0,0]);S(this,"shiftKey",!1);S(this,"altKey",!1);S(this,"metaKey",!1);S(this,"ctrlKey",!1);S(this,"spaceKey",!1);S(this,"isPointing",!1);S(this,"isForcePanning",!1);S(this,"editingStartTime",-1);S(this,"fileSystemHandle",null);S(this,"viewport",$.getBoundsFromPoints([[0,0],[100,100]]));S(this,"rendererBounds",$.getBoundsFromPoints([[0,0],[100,100]]));S(this,"selectHistory",{stack:[[]],pointer:0});S(this,"clipboard");S(this,"rotationInfo",{selectedIds:[],center:[0,0]});S(this,"pasteInfo",{center:[0,0],offset:[0,0]});S(this,"onReady",()=>{var n,r;this.loadDocument(this.document),IBe().then(i=>{this.fileSystemHandle=i});try{this.patchState({appState:{status:bn.Idle},document:os(this.document,An.version)})}catch(i){console.error("The data appears to be corrupted. Resetting!",i),localStorage.setItem(this.document.id+"_corrupted",JSON.stringify(this.document)),this.patchState({...An.defaultState,appState:{...An.defaultState.appState,status:bn.Idle}})}(r=(n=this.callbacks).onMount)==null||r.call(n,this)});S(this,"cleanup",(n,r)=>{var l;const i=((l=n==null?void 0:n.document)==null?void 0:l.assets)||{},o={...n,documents:{...n.document,assets:i}};o.document!==r.document&&Object.entries(o.document.pages).forEach(([c,u])=>{if(u===void 0){delete o.document.pages[c],delete o.document.pageStates[c];return}const d=r.document.pages[c],f={};if(!d||u.shapes!==d.shapes||u.bindings!==d.bindings){u.shapes={...u.shapes},u.bindings={...u.bindings};const m=new Set;Object.entries(u.shapes).forEach(([y,v])=>{var x;let b;v?b=v.parentId:(b=(x=d==null?void 0:d.shapes[y])==null?void 0:x.parentId,delete u.shapes[y]),u.id===o.appState.currentPageId&&(d==null?void 0:d.shapes[y])!==v&&(f[y]=v),b&&b!==c&&u.shapes[b]!==void 0&&m.add(u.shapes[b])}),Object.keys(u.bindings).forEach(y=>{u.bindings[y]||delete u.bindings[y]}),o.document.pages[c]=u,Q.getRelatedBindings(o,Object.keys(f),c).forEach(y=>{var C;if(!u.bindings[y.id])return;const v=u.shapes[y.toId],b=u.shapes[y.fromId];if(!(v&&b)){delete o.document.pages[c].bindings[y.id];return}const x=Q.getShapeUtil(v),w=Q.getShapeUtil(b),E=(C=w.onBindingChange)==null?void 0:C.call(w,b,y,v,x.getBounds(v),x.getExpandedBounds(v),x.getCenter(v));if(E){const I={...b,...E};u.shapes[b.id]=I}}),m.forEach(y=>{if(!y)throw Error("no group!");const v=y.children.filter(x=>u.shapes[x]!==void 0),b=$.getCommonBounds(v.map(x=>u.shapes[x]).filter(Boolean).map(x=>Q.getRotatedBounds(x)));u.shapes[y.id]={...y,point:[b.minX,b.minY],size:[b.width,b.height],children:v}})}const p={...o.document.pageStates[c]};p.brush||delete p.brush,p.hoveredId&&!u.shapes[p.hoveredId]&&delete p.hoveredId,p.bindingId&&!u.bindings[p.bindingId]&&(Q.warn(`Could not find the binding of ${c}`),delete p.bindingId),p.editingId&&!u.shapes[p.editingId]&&(Q.warn("Could not find the editing shape!"),delete p.editingId),o.document.pageStates[c]=p}),"assets"in o.document||(o.document.assets=n.document.assets||{}),Object.keys(o.document.assets).forEach(c=>{o.document.assets[c]||delete o.document.assets[c]});const a=o.appState.currentPageId,s=o.document.pageStates[a];if(o.room&&o.room!==r.room){const c={...o.room,users:{...o.room.users}};r.room&&Object.values(r.room.users).filter(Boolean).forEach(u=>{c.users[u.id]===void 0&&delete c.users[u.id]}),o.room=c}return o.room&&(o.room.users[o.room.userId]={...o.room.users[o.room.userId],point:this.currentPoint,selectedIds:s.selectedIds}),this.readOnly&&(o.document.pages=r.document.pages),o});S(this,"onPatch",(n,r)=>{var i,o;(o=(i=this.callbacks).onPatch)==null||o.call(i,this,r)});S(this,"onCommand",(n,r)=>{var i,o;this.clearSelectHistory(),this.isDirty=!0,(o=(i=this.callbacks).onCommand)==null||o.call(i,this,r)});S(this,"onReplace",()=>{this.clearSelectHistory(),this.isDirty=!1});S(this,"onUndo",()=>{var n,r;this.rotationInfo.selectedIds=[...this.selectedIds],(r=(n=this.callbacks).onUndo)==null||r.call(n,this)});S(this,"onRedo",()=>{var n,r;this.rotationInfo.selectedIds=[...this.selectedIds],(r=(n=this.callbacks).onRedo)==null||r.call(n,this)});S(this,"onPersist",()=>{var n,r;this.callbacks.onChangePage&&this.broadcastPageChanges(),(r=(n=this.callbacks).onPersist)==null||r.call(n,this)});S(this,"prevSelectedIds",this.selectedIds);S(this,"onStateDidChange",(n,r)=>{var i,o,a,s;(o=(i=this.callbacks).onChange)==null||o.call(i,this,r),this.room&&this.selectedIds!==this.prevSelectedIds&&((s=(a=this.callbacks).onChangePresence)==null||s.call(a,this,{...this.room.users[this.room.userId],selectedIds:this.selectedIds}),this.prevSelectedIds=this.selectedIds)});S(this,"justSent",!1);S(this,"prevShapes",this.page.shapes);S(this,"prevBindings",this.page.bindings);S(this,"prevAssets",this.document.assets);S(this,"broadcastPageChanges",()=>{var a,s;const n=new Set,r={},i={},o={};this.shapes.forEach(l=>{n.add(l.id),this.prevShapes[l.id]!==l&&(r[l.id]=l)}),Object.keys(this.prevShapes).filter(l=>!n.has(l)).forEach(l=>{r[l]=void 0}),this.bindings.forEach(l=>{n.add(l.id),this.prevBindings[l.id]!==l&&(i[l.id]=l)}),Object.keys(this.prevBindings).filter(l=>!n.has(l)).forEach(l=>{i[l]=void 0}),this.assets.forEach(l=>{n.add(l.id),this.prevAssets[l.id]!==l&&(o[l.id]=l)}),Object.keys(this.prevAssets).filter(l=>!n.has(l)).forEach(l=>{o[l]=void 0}),(Object.keys(i).length>0||Object.keys(r).length>0||Object.keys(o).length>0)&&(this.justSent=!0,(s=(a=this.callbacks).onChangePage)==null||s.call(a,this,r,i,o),this.prevShapes=this.page.shapes,this.prevBindings=this.page.bindings,this.prevAssets=this.document.assets)});S(this,"getReservedContent",(n,r=this.currentPageId)=>{const{bindings:i}=this.document.pages[r],o={},a={},s=Object.values(i),l=new Map(s.map(m=>[m.toId,m])),c=new Map(s.map(m=>[m.fromId,m])),u=[l,c],d=[];this.session&&n.forEach(m=>d.push(m));const f=new Set(d),p=new Set;for(;d.length>0;){const m=d.pop();if(!m)break;if(p.has(m))continue;p.add(m);const g=this.getShape(m);o[m]=g,g.parentId!==r&&d.push(g.parentId),g.children&&d.push(...g.children),u.map(y=>y.get(g.id)).filter(Boolean).forEach(y=>{a[y.id]=y,d.push(y.toId,y.fromId)})}return{reservedShapes:o,reservedBindings:a,strongReservedShapeIds:f}});S(this,"updateWaDocument",(n,r=this.currentPageId)=>{const{userSettings:i,subscribergroups:o,title:a,name:s,state:l}=n;return this.justSent?(this.justSent=!1,this):i?(this.useStore.setState(c=>{const{userSettings:u}=c.document;return{...c,document:{...c.document,userSettings:{...u,...i},name:s,title:a,subscribergroups:o,state:l}}},!0),this):this});S(this,"replacePageContent",(n,r,i,o=this.currentPageId)=>this.justSent?(this.justSent=!1,this):(this.useStore.setState(a=>{const{hoveredId:s,editingId:l,bindingId:c,selectedIds:u}=a.document.pageStates[o],d=[...u];l&&d.push(l);const{reservedShapes:f,reservedBindings:p,strongReservedShapeIds:m}=this.getReservedContent(d,this.currentPageId);Object.values(f).filter(E=>!("text"in E)).forEach(E=>{const C=n[E.id];if(!!C){if(!(E.type===U.Arrow||m.has(E.id))){f[E.id]=C;return}"decorations"in C&&"decorations"in E&&(E.decorations=C.decorations),E.style=C.style}}),this.prevShapes=n,this.prevBindings=r,this.prevAssets=i;const g={...n,...f},y={...r,...p},v={...i},b={...a,document:{...a.document,pages:{[o]:{...a.document.pages[o],shapes:g,bindings:y}},assets:v,pageStates:{...a.document.pageStates,[o]:{...a.document.pageStates[o],selectedIds:u.filter(E=>g[E]!==void 0),hoveredId:s?g[s]===void 0?void 0:s:void 0,editingId:l,bindingId:c?y[c]===void 0?void 0:c:void 0}}}},x=Q.getRelatedBindings(b,Object.keys(g),o),w=b.document.pages[o];return x.forEach(E=>{var M;if(!w.bindings[E.id])return;const C=w.shapes[E.toId],I=w.shapes[E.fromId],T=Q.getShapeUtil(C),_=Q.getShapeUtil(I),P=(M=_.onBindingChange)==null?void 0:M.call(_,I,E,C,T.getBounds(C),T.getExpandedBounds(C),T.getCenter(C));if(P){const D={...I,...P};w.shapes[I.id]=D}}),Object.values(g).forEach(E=>{if(E.type!==U.Group)return;const C=E.children.filter(T=>w.shapes[T]!==void 0),I=$.getCommonBounds(C.map(T=>w.shapes[T]).filter(Boolean).map(T=>Q.getRotatedBounds(T)));w.shapes[E.id]={...E,point:[I.minX,I.minY],size:[I.width,I.height],children:C}}),this.state.document=b.document,b},!0),this));S(this,"updateBounds",n=>{this.rendererBounds=n;const{point:r,zoom:i}=this.pageState.camera;this.updateViewport(r,i),!this.readOnly&&this.session&&this.session.update()});S(this,"updateViewport",(n,r)=>{const{width:i,height:o}=this.rendererBounds,[a,s]=O.sub(O.div([0,0],r),n),[l,c]=O.sub(O.div([i,o],r),n);this.viewport={minX:a,minY:s,maxX:l,maxY:c,height:l-a,width:c-s}});S(this,"setEditingId",n=>{this.readOnly||(this.editingStartTime=performance.now(),this.patchState({document:{pageStates:{[this.currentPageId]:{editingId:n}}}},"set_editing_id"))});S(this,"setHoveredId",n=>{this.patchState({document:{pageStates:{[this.currentPageId]:{hoveredId:n}}}},"set_hovered_id")});S(this,"setSetting",(n,r)=>this.session?this:(this.patchState({settings:{[n]:typeof r=="function"?r(this.settings[n]):r}},`settings:${n}`),this.persist(),this));S(this,"replaceSetting",n=>this.session?this:(this.patchState({settings:n},"settings:all"),this.persist(),this));S(this,"toggleFocusMode",()=>this.session?this:(this.patchState({settings:{isFocusMode:!this.settings.isFocusMode}},"settings:toggled_focus_mode"),this.persist(),this));S(this,"togglePenMode",()=>this.session?this:(this.patchState({settings:{isPenMode:!this.settings.isPenMode}},"settings:toggled_pen_mode"),this.persist(),this));S(this,"toggleDarkMode",()=>this);S(this,"setDarkMode",n=>this);S(this,"toggleZoomSnap",()=>this.session?this:(this.patchState({settings:{isZoomSnap:!this.settings.isZoomSnap}},"settings:toggled_zoom_snap"),this.persist(),this));S(this,"toggleDebugMode",()=>this.session?this:(this.patchState({settings:{isDebugMode:!this.settings.isDebugMode}},"settings:toggled_debug"),this.persist(),this));S(this,"setMenuOpen",n=>(this.patchState({appState:{isMenuOpen:n}},"ui:toggled_menu_opened"),this.persist(),this));S(this,"setIsLoading",n=>(this.patchState({appState:{isLoading:n}},"ui:toggled_is_loading"),this.persist(),this));S(this,"setDisableAssets",n=>(this.patchState({appState:{disableAssets:n}},"ui:toggled_disable_images"),this));S(this,"toggleGrid",()=>this.session?this:(this.patchState({settings:{showGrid:!this.settings.showGrid}},"settings:toggled_grid"),this.persist(),this));S(this,"selectTool",n=>{if(this.readOnly||this.session)return this;this.isPointing=!1;const r=this.tools[n];return r===this.currentTool?(this.patchState({appState:{isToolLocked:!1}}),this):(this.currentTool.onExit(),r.previous=this.currentTool.type,this.currentTool=r,this.currentTool.onEnter(),this.patchState({appState:{activeTool:n,isToolLocked:!1}},`selected_tool:${n}`))});S(this,"toggleToolLock",()=>this.session?this:this.patchState({appState:{isToolLocked:!this.appState.isToolLocked}},"toggled_tool_lock"));S(this,"resetDocument",()=>this.session?this:(this.session=void 0,this.pasteInfo.offset=[0,0],this.currentTool=this.tools.select,this.resetHistory().clearSelectHistory().loadDocument(os(An.defaultDocument,An.version)).persist(),this));S(this,"updateUsers",(n,r=!1)=>{this.patchState({room:{users:Object.fromEntries(n.map(i=>[i.id,i]))}},r?"room:self:update":"room:user:update")});S(this,"removeUser",n=>{this.patchState({room:{users:{[n]:void 0}}})});S(this,"mergeDocument",n=>{if(this.document.id!==n.id)return this.replaceState({...this.state,appState:{...this.appState,currentPageId:Object.keys(n.pages)[0]},document:os(n,An.version)}),this;const r={...this.document.pageStates},i={...this.appState,currentPageId:n.pages[this.currentPageId]?this.currentPageId:Object.keys(n.pages)[0],pages:Object.values(n.pages).map((a,s)=>({id:a.id,name:a.name,childIndex:a.childIndex||s}))};this.resetHistory(),Object.keys(this.document.pages).forEach(a=>{n.pages[a]||(a===this.appState.currentPageId&&(this.cancelSession(),this.selectNone()),r[a]=void 0)}),this.session&&this.selectedIds.filter(a=>!n.pages[this.currentPageId].shapes[a]).forEach(a=>n.pages[this.currentPageId].shapes[a]=this.page.shapes[a]),Object.entries(r).forEach(([a,s])=>{s.selectedIds=s.selectedIds.filter(l=>!!n.pages[a].shapes[l])});const{editingId:o}=this.pageState;return o&&(n.pages[this.currentPageId].shapes[o]=this.page.shapes[o],r[this.currentPageId].selectedIds=[o]),this.replaceState({...this.state,appState:i,document:{...os(n,An.version),pageStates:r}},"merge")});S(this,"updateDocument",(n,r="updated_document")=>{const i=this.state,o={...i,document:{...i.document}};n.pages[this.currentPageId]||(o.appState={...i.appState,currentPageId:Object.keys(n.pages)[0]});let a=1;for(const s of Object.values(n.pages))s!==i.document.pages[s.id]&&(o.document.pages[s.id]=s,s.name||(o.document.pages[s.id].name=`Page ${a+1}`,a++));return n.assets&&(o.document.assets=n.assets),n.userSettings&&(o.document.userSettings=n.userSettings),n.name&&(o.document.name=n.name),n.subscribergroups&&(o.document.subscribergroups=n.subscribergroups),n.state&&(o.document.state=n.state),n.title&&(o.document.title=n.title),o.document=os(o.document,o.document.version||0),this.replaceState(o,`${r}:${n.id}`)});S(this,"loadRoom",n=>(this.patchState({room:{id:n,userId:Cx,users:{[Cx]:{id:Cx,color:fM[Math.floor(Math.random()*fM.length)],point:[100,100],selectedIds:[],activeShapes:[]}}}}),this));S(this,"loadDocument",n=>{this.selectNone(),this.resetHistory(),this.clearSelectHistory(),this.session=void 0,this.replaceState({...An.defaultState,settings:{...this.state.settings},document:os(n,An.version),appState:{...An.defaultState.appState,...this.state.appState,currentPageId:Object.keys(n.pages)[0],disableAssets:this.disableAssets}},"loaded_document");const{point:r,zoom:i}=this.pageState.camera;return this.updateViewport(r,i),this});S(this,"newProject",()=>{!this.isLocal||(this.fileSystemHandle=null,this.resetDocument())});S(this,"saveProject",async()=>{if(!this.readOnly){try{const n=await MM(os(this.document,An.version),this.fileSystemHandle);this.fileSystemHandle=n,this.persist(),this.isDirty=!1}catch(n){console.error(n.message)}return this}});S(this,"saveProjectAs",async()=>{try{const n=await MM(this.document,null);this.fileSystemHandle=n,this.persist(),this.isDirty=!1}catch(n){console.error(n.message)}return this});S(this,"openProject",async()=>{if(!!this.isLocal)try{const n=await TBe();if(!n)throw Error();const{fileHandle:r,document:i}=n;this.loadDocument(i),this.fileSystemHandle=r,this.zoomToFit(),this.persist()}catch(n){console.error(n)}finally{this.persist()}});S(this,"openAsset",async()=>{if(!!this.isLocal&&!this.disableAssets)try{const n=await _Be();if(!n)return;this.addMediaFromFile(n)}catch(n){console.error(n)}finally{this.persist()}});S(this,"signOut",()=>{});S(this,"getAppState",()=>this.appState);S(this,"getPage",(n=this.currentPageId)=>Q.getPage(this.state,n||this.currentPageId));S(this,"getShapes",(n=this.currentPageId)=>Q.getShapes(this.state,n||this.currentPageId));S(this,"getBindings",(n=this.currentPageId)=>Q.getBindings(this.state,n||this.currentPageId));S(this,"getShape",(n,r=this.currentPageId)=>Q.getShape(this.state,n,r));S(this,"getBlock",(n,r=this.currentPageId)=>Q.getBlock(this.state,n,r));S(this,"isWAElement",n=>this.getShape(n).type===U.Block);S(this,"getShapeBounds",(n,r=this.currentPageId)=>Q.getBounds(this.getShape(n,r)));S(this,"getBinding",(n,r=this.currentPageId)=>Q.getBinding(this.state,n,r));S(this,"getPageState",(n=this.currentPageId)=>Q.getPageState(this.state,n||this.currentPageId));S(this,"getPagePoint",(n,r=this.currentPageId)=>{const{camera:i}=this.getPageState(r);return O.sub(O.div(n,i.zoom),i.point)});S(this,"createPage",n=>{if(this.readOnly)return this;const{width:r,height:i}=this.rendererBounds;return this.setState(GLe(this,[-r/2,-i/2],n))});S(this,"changePage",n=>this.setState(ULe(this,n)));S(this,"renamePage",(n,r)=>this.readOnly?this:this.setState(nBe(this,n,r)));S(this,"renameDocument",n=>this.readOnly?this:this.setState(rBe(this,n)));S(this,"updateDocumentBasics",n=>this.readOnly?this:this.setState(oBe(this,n)));S(this,"setCanEdit",n=>this.setState({id:"can-edit",before:{canEdit:this.state.canEdit},after:{canEdit:n}}));S(this,"duplicatePage",n=>this.readOnly?this:this.setState(QLe(this,n)));S(this,"deletePage",n=>this.readOnly?this:Object.values(this.document.pages).length<=1?this:this.setState(KLe(this,n||this.currentPageId)));S(this,"copy",(n=this.selectedIds)=>{const r=n.flatMap(s=>Q.getDocumentBranch(this.state,s,this.currentPageId)),i=r.map(s=>$.deepClone(this.getShape(s,this.currentPageId)));if(i.length===0)return this;const o=Object.values(this.page.bindings).filter(s=>r.includes(s.fromId)&&r.includes(s.toId)),a=i.map(s=>{if(!!s.assetId)return this.document.assets[s.assetId]}).filter(Boolean);this.clipboard={shapes:i,bindings:o,assets:a};try{const s=JSON.stringify({type:"tldr/clipboard",...this.clipboard});navigator.clipboard.writeText(s).then(()=>{},()=>{})}catch{}return this.pasteInfo.offset=[0,0],this.pasteInfo.center=[0,0],this});S(this,"cut",(n=this.selectedIds)=>(this.copy(n),this.delete(n),this));S(this,"paste",n=>{if(this.readOnly)return;const r=(i,o,a)=>{const s={},l=a.filter(y=>this.document.assets[y.id]===void 0);l.length&&this.patchState({document:{assets:Object.fromEntries(l.map(y=>[y.id,y]))}}),i.forEach(y=>s[y.id]=$.uniqueId()),o.forEach(y=>s[y.id]=$.uniqueId());let c=Q.getTopChildIndex(this.state,this.currentPageId);const u=i.sort((y,v)=>y.childIndex-v.childIndex).map(y=>{const v=s[y.parentId],b={...y,id:s[y.id],parentId:v||this.currentPageId};return y.children&&(b.children=y.children.map(x=>s[x])),v||(b.childIndex=c,c++),b.handles&&Object.values(b.handles).forEach(x=>{x.bindingId&&(x.bindingId=s[x.bindingId])}),b}),d=o.map(y=>({...y,id:s[y.id],toId:s[y.toId],fromId:s[y.fromId]})),f=$.getCommonBounds(u.map(Q.getBounds));let p=O.toFixed(this.getPagePoint(n||this.centerPoint));O.dist(p,this.pasteInfo.center)<2||O.dist(p,O.toFixed($.getBoundsCenter(f)))<2?(p=O.add(p,this.pasteInfo.offset),this.pasteInfo.offset=O.add(this.pasteInfo.offset,[uu,uu])):(this.pasteInfo.center=p,this.pasteInfo.offset=[0,0]);const m=$.centerBounds(f,p),g=O.sub($.getBoundsCenter(m),$.getBoundsCenter(f));this.create(u.map(y=>Q.getShapeUtil(y.type).create({...y,point:O.toFixed(O.add(y.point,g)),parentId:y.parentId||this.currentPageId})),d)};if(!("clipboard"in navigator&&navigator.clipboard.readText)){Q.warn("This browser does not support the Clipboard API!"),this.clipboard&&r(this.clipboard.shapes,this.clipboard.bindings,this.clipboard.assets);return}return navigator.clipboard.readText().then(i=>{let o=JSON.parse(i);if(o.type==="tldr/clipboard")r(o.shapes,o.bindings,o.assets);else{Q.warn("The selected shape was not a tldraw shape, treating as text.");const a=$.uniqueId();this.createShapes({id:a,type:U.Text,parentId:this.appState.currentPageId,text:Q.normalizeText(i),point:this.getPagePoint(this.centerPoint,this.currentPageId),style:{...this.appState.currentStyle}}),this.select(a)}}).catch(()=>{Q.warn("Read permissions denied!"),this.clipboard&&r(this.clipboard.shapes,this.clipboard.bindings,this.clipboard.assets)}),this});S(this,"copySvg",(n=this.selectedIds,r=this.currentPageId)=>{if(n.length===0&&(n=Object.keys(this.page.shapes)),n.length===0)return;const i=document.createElementNS("http://www.w3.org/2000/svg","svg"),o=document.createElementNS("http://www.w3.org/2000/svg","defs"),a=document.createElementNS("http://www.w3.org/2000/svg","style");a.textContent="@import url('https://fonts.googleapis.com/css2?family=Caveat+Brush&family=Source+Code+Pro&family=Source+Sans+Pro&family=Crimson+Pro&display=block');",o.appendChild(a),i.appendChild(o);const s=n.map(d=>this.getShape(d,r)).sort((d,f)=>d.childIndex-f.childIndex),l=$.getCommonBounds(s.map(Q.getRotatedBounds)),c=d=>{const f=Q.getShapeUtil(d),p=f.getBounds(d),m=f.getSvgElement(d);if(!m)return;d.type===U.Image?m.setAttribute("xlink:href",this.document.assets[d.assetId].src):d.type===U.Video&&m.setAttribute("xlink:href",this.serializeVideo(d.id));const g=jm+d.point[0]-l.minX,y=jm+d.point[1]-l.minY,v=(d.rotation||0)*180/Math.PI,b=p.width/2,x=p.height/2;return m.setAttribute("transform",`translate(${g}, ${y}) rotate(${v}, ${b}, ${x})`),m};s.forEach(d=>{var p;if((p=d.children)!=null&&p.length){const m=document.createElementNS("http://www.w3.org/2000/svg","g");d.children.forEach(g=>{const y=this.getShape(g,r),v=c(y);v&&m.appendChild(v)}),i.appendChild(m);return}const f=c(d);f&&i.appendChild(f)}),i.setAttribute("viewBox",[0,0,l.width+jm*2,l.height+jm*2].join(" ")),i.setAttribute("width",String(l.width)),i.setAttribute("height",String(l.height)),i.setAttribute("fill","transparent"),i.querySelectorAll(".tl-fill-hitarea, .tl-stroke-hitarea, .tl-binding-indicator").forEach(d=>d.remove());const u=new XMLSerializer().serializeToString(i).replaceAll("&#10;      ","").replaceAll(/((\s|")[0-9]*\.[0-9]{2})([0-9]*)(\b|"|\))/g,"$1");return Q.copyStringToClipboard(u),u});S(this,"copyJson",(n=this.selectedIds,r=this.currentPageId)=>{if(n.length===0&&(n=Object.keys(this.page.shapes)),n.length===0)return;const i=n.map(a=>this.getShape(a,r)),o=JSON.stringify(i,null,2);return Q.copyStringToClipboard(o),o});S(this,"setCamera",(n,r,i)=>(this.updateViewport(n,r),this.patchState({document:{pageStates:{[this.currentPageId]:{camera:{point:n,zoom:r}}}}},i),this));S(this,"resetCamera",()=>this.setCamera(this.centerPoint,1,"reset_camera"));S(this,"pan",n=>{const{camera:r}=this.pageState;return this.setCamera(O.toFixed(O.sub(r.point,n)),r.zoom,"panned")});S(this,"pinchZoom",(n,r,i)=>{const{camera:o}=this.pageState,a=O.sub(o.point,O.div(r,o.zoom)),s=i,l=O.sub(O.div(n,o.zoom),a),c=O.sub(O.div(n,s),a);return this.setCamera(O.toFixed(O.add(a,O.sub(c,l))),s,"pinch_zoomed")});S(this,"zoomTo",(n,r=this.centerPoint)=>{const{zoom:i,point:o}=this.pageState.camera,a=O.sub(O.div(r,i),o),s=O.sub(O.div(r,n),o);return this.setCamera(O.toFixed(O.add(o,O.sub(s,a))),n,"zoomed_camera")});S(this,"zoomIn",()=>{const n=Math.round(this.pageState.camera.zoom*100/25),r=Q.getCameraZoom((n+1)*.25);return this.zoomTo(r)});S(this,"zoomOut",()=>{const n=Math.round(this.pageState.camera.zoom*100/25),r=Q.getCameraZoom((n-1)*.25);return this.zoomTo(r)});S(this,"zoomToFit",()=>{const{shapes:n,pageState:{camera:r}}=this;if(n.length===0)return this;const{rendererBounds:i}=this,o=$.getCommonBounds(n.map(Q.getBounds));let a=Q.getCameraZoom(Math.min((i.width-Hm)/o.width,(i.height-Hm)/o.height));a=r.zoom===a||r.zoom<1?Math.min(1,a):a;const s=(i.width-o.width*a)/2/a,l=(i.height-o.height*a)/2/a;return this.setCamera(O.toFixed(O.sub([s,l],[o.minX,o.minY])),a,"zoomed_to_fit")});S(this,"zoomToSelection",()=>{if(this.selectedIds.length===0)return this;const{rendererBounds:n}=this,r=Q.getSelectedBounds(this.state);let i=Q.getCameraZoom(Math.min((n.width-Hm)/r.width,(n.height-Hm)/r.height));i=this.pageState.camera.zoom===i||this.pageState.camera.zoom<1?Math.min(1,i):i;const o=(n.width-r.width*i)/2/i,a=(n.height-r.height*i)/2/i;return this.setCamera(O.toFixed(O.sub([o,a],[r.minX,r.minY])),i,"zoomed_to_selection")});S(this,"zoomToContent",()=>{const n=this.shapes,r=this.pageState;if(n.length===0)return this;const{rendererBounds:i}=this,{zoom:o}=r.camera,a=$.getCommonBounds(n.map(Q.getBounds)),s=(i.width-a.width*o)/2/o,l=(i.height-a.height*o)/2/o;return this.setCamera(O.toFixed(O.sub([s,l],[a.minX,a.minY])),this.pageState.camera.zoom,"zoomed_to_content")});S(this,"resetZoom",()=>this.zoomTo(1));S(this,"zoomBy",$.throttle((n,r)=>{const{zoom:i}=this.pageState.camera,o=Q.getCameraZoom(i-n*i);return this.zoomTo(o,r)},16));S(this,"clearSelectHistory",()=>(this.selectHistory.pointer=0,this.selectHistory.stack=[this.selectedIds],this));S(this,"addToSelectHistory",n=>(this.selectHistory.pointer<this.selectHistory.stack.length&&(this.selectHistory.stack=this.selectHistory.stack.slice(0,this.selectHistory.pointer+1)),this.selectHistory.pointer++,this.selectHistory.stack.push(n),this));S(this,"setSelectedIds",(n,r=!1)=>{const i=r?[...this.pageState.selectedIds,...n]:[...n];return this.patchState({appState:{activeTool:"select"},document:{pageStates:{[this.currentPageId]:{selectedIds:i}}}},"selected")});S(this,"undoSelect",()=>(this.selectHistory.pointer>0&&(this.selectHistory.pointer--,this.setSelectedIds(this.selectHistory.stack[this.selectHistory.pointer])),this));S(this,"redoSelect",()=>(this.selectHistory.pointer<this.selectHistory.stack.length-1&&(this.selectHistory.pointer++,this.setSelectedIds(this.selectHistory.stack[this.selectHistory.pointer])),this));S(this,"select",(...n)=>(n.forEach(r=>{if(!this.page.shapes[r])throw Error(`That shape does not exist on page ${this.currentPageId}`)}),this.setSelectedIds(n),this.addToSelectHistory(n),this));S(this,"selectAll",(n=this.currentPageId)=>this.session?this:(this.setSelectedIds(Object.values(this.document.pages[n].shapes).filter(r=>r.parentId===n).map(r=>r.id)),this.addToSelectHistory(this.selectedIds),this.selectTool("select"),this));S(this,"selectNone",()=>(this.setSelectedIds([]),this.addToSelectHistory(this.selectedIds),this));S(this,"startSession",(n,...r)=>{if(this.readOnly&&n!==Re.Brush)return this;this.session&&(Q.warn(`Already in a session! (${this.session.constructor.name})`),this.cancelSession());const i=qBe(n);this.session=new i(this,...r);const o=this.session.start();return o&&this.patchState(o,`session:start_${this.session.constructor.name}`),this});S(this,"updateSession",()=>{const{session:n}=this;if(!n)return this;const r=n.update();return r?this.patchState(r,`session:${n==null?void 0:n.constructor.name}`):this});S(this,"cancelSession",()=>{const{session:n}=this;if(!n)return this;this.session=void 0;const r=n.cancel();return r&&this.patchState(r,`session:cancel:${n.constructor.name}`),this});S(this,"completeSession",()=>{var i,o,a,s,l,c,u;const{session:n}=this;if(!n)return this;this.session=void 0;const r=n.complete();if(r===void 0)return this.isCreating=!1,this.patchState({appState:{status:bn.Idle},document:{pageStates:{[this.currentPageId]:{editingId:void 0,bindingId:void 0,hoveredId:void 0}}}},`session:complete:${n.constructor.name}`);if("after"in r){if(this.isCreating){if(r.before={appState:{...r.before.appState,status:bn.Idle},document:{pages:{[this.currentPageId]:{shapes:Object.fromEntries(this.selectedIds.map(d=>[d,void 0]))}},pageStates:{[this.currentPageId]:{selectedIds:[],editingId:null,bindingId:null,hoveredId:null}}}},this.appState.isToolLocked){const d=((a=(o=(i=r.after)==null?void 0:i.document)==null?void 0:o.pageStates)==null?void 0:a[this.currentPageId])||{};d.selectedIds=[]}this.isCreating=!1}r.after.appState={...r.after.appState,status:bn.Idle},r.after.document={...r.after.document,pageStates:{...(s=r.after.document)==null?void 0:s.pageStates,[this.currentPageId]:{...(((l=r.after.document)==null?void 0:l.pageStates)||{})[this.currentPageId],editingId:null}}},this.setState(r,`session:complete:${n.constructor.name}`)}else this.patchState({...r,appState:{...r.appState,status:bn.Idle},document:{...r.document,pageStates:{[this.currentPageId]:{...(u=(c=r.document)==null?void 0:c.pageStates)==null?void 0:u[this.currentPageId],editingId:null}}}},`session:complete:${n.constructor.name}`);return this});S(this,"createShapes",(...n)=>n.length===0?this:this.create(n.map(r=>Q.getShapeUtil(r.type).create({parentId:this.currentPageId,...r}))));S(this,"updateShapes",(...n)=>{const r=this.document.pages[this.currentPageId].shapes,i=n.filter(o=>r[o.id]);return i.length===0?this:this.setState(pBe(this,i,this.currentPageId),"updated_shapes")});S(this,"create",(n=[],r=[])=>n.length===0?this:this.setState(kM(this,n,r)));S(this,"patchCreate",(n=[],r=[])=>n.length===0?this:this.patchState(kM(this,n,r).after));S(this,"delete",(n=this.selectedIds)=>{var i,o;if(n.length===0)return this;const r=EM(this,n);if(this.callbacks.onAssetDelete&&((i=r.before.document)==null?void 0:i.assets)&&((o=r.after.document)==null?void 0:o.assets)){const a=Object.keys(r.before.document.assets).filter(c=>!!r.before.document.assets[c]),s=Object.keys(r.after.document.assets).filter(c=>!!r.after.document.assets[c]);a.filter(c=>!s.includes(c)).forEach(c=>this.callbacks.onAssetDelete(c))}return this.setState(r)});S(this,"deleteAll",()=>(this.selectAll(),this.delete(),this));S(this,"style",(n,r=this.selectedIds)=>{const i=Object.keys(n).length===1&&Object.keys(n)[0]==="isFilled";return r.length===1&&this.isWAElement(r[0])&&!i?this.setState(gBe(this,r,n)):this.setState(cBe(this,r,n))});S(this,"align",(n,r=this.selectedIds)=>r.length<2?this:this.setState(WLe(this,r,n)));S(this,"distribute",(n,r=this.selectedIds)=>r.length<3?this:this.setState(XLe(this,r,n)));S(this,"stretch",(n,r=this.selectedIds)=>r.length<2?this:this.setState(lBe(this,r,n)));S(this,"changeBlockType",(n,r,i=this.selectedIds)=>i.length===0?this:this.setState(mBe(this,i,n,r)));S(this,"updateWAElement",(n,r=this.selectedIds)=>r.length===0?this:this.setState(VW(this,r,n)));S(this,"updateWaUserSettings",n=>this.setState(bBe(this,n)));S(this,"updateCanvasSettings",n=>this.setState(yBe(this,n)));S(this,"handleModalOpened",(n,r=this.selectedIds)=>(n!==sr.background&&n!==sr.canvas&&r.length!==1&&lt.debug("selected multiple ids"),this.setState(vBe(this,r[0],n))));S(this,"openLink",(n,r=this.selectedIds)=>{if(r.length===1&&r[0]){const i=this.getBlock(r[0]),o=this.getShape(r[0]);i&&(i==null?void 0:i.tlUrl)?(Ch(i.tlUrl),i.tlUrl||console.error(`No block data on ${o}`)):o.link&&(Ch(o.link),o!=null&&o.link||console.error(`No link for ${r} with data ${o}`))}else{console.error("Open can only work on one element");return}});S(this,"flipHorizontal",(n=this.selectedIds)=>n.length===0?this:this.setState(IM(this,n,Eh.Horizontal)));S(this,"flipVertical",(n=this.selectedIds)=>n.length===0?this:this.setState(IM(this,n,Eh.Vertical)));S(this,"addLinkToShape",(n,r=this.selectedIds)=>r.length===0?this:this.setState(xBe(this,r,n)));S(this,"moveToPage",(n,r=this.currentPageId,i=this.selectedIds)=>{if(i.length===0)return this;const{rendererBounds:o}=this;return this.setState(tBe(this,i,o,r,n)),this});S(this,"moveToBack",(n=this.selectedIds)=>n.length===0?this:this.setState(Um(this,n,Ea.ToBack)));S(this,"moveBackward",(n=this.selectedIds)=>n.length===0?this:this.setState(Um(this,n,Ea.Backward)));S(this,"moveForward",(n=this.selectedIds)=>n.length===0?this:this.setState(Um(this,n,Ea.Forward)));S(this,"moveToFront",(n=this.selectedIds)=>n.length===0?this:this.setState(Um(this,n,Ea.ToFront)));S(this,"nudge",(n,r=!1,i=this.selectedIds)=>{if(i.length===0)return this;const o=r?this.settings.showGrid?this.currentGrid*4:10:this.settings.showGrid?this.currentGrid:1;return this.setState(dBe(this,i,O.mul(n,o)))});S(this,"duplicate",(n=this.selectedIds,r)=>this.readOnly?this:n.length===0?this:this.setState(JLe(this,n,r)));S(this,"resetBounds",(n=this.selectedIds)=>{const r=TM(this,n,this.currentPageId);return this.setState(TM(this,n,this.currentPageId),r.id)});S(this,"toggleHidden",(n=this.selectedIds)=>n.length===0?this:this.setState(Sx(this,n,"isHidden")));S(this,"toggleLocked",(n=this.selectedIds)=>n.length===0?this:this.setState(Sx(this,n,"isLocked")));S(this,"toggleAspectRatioLocked",(n=this.selectedIds)=>n.length===0?this:this.setState(Sx(this,n,"isAspectRatioLocked")));S(this,"toggleDecoration",(n,r=this.selectedIds)=>r.length===0||!(n==="start"||n==="end")?this:this.setState(uBe(this,r,n)));S(this,"setShapeProps",(n,r=this.selectedIds)=>this.setState(hBe(this,r,n)));S(this,"rotate",(n=Math.PI*-.5,r=this.selectedIds)=>{if(r.length===0)return this;const i=sBe(this,r,n);return i?this.setState(i):this});S(this,"group",(n=this.selectedIds,r=$.uniqueId(),i=this.currentPageId)=>{if(this.readOnly)return this;if(n.length===1&&this.getShape(n[0],i).type===U.Group)return this.ungroup(n,i);if(n.length<2)return this;const o=eBe(this,n,r,i);return o?this.setState(o):this});S(this,"ungroup",(n=this.selectedIds,r=this.currentPageId)=>{if(this.readOnly)return this;const i=n.map(a=>this.getShape(a,r)).filter(a=>a.type===U.Group);if(i.length===0)return this;const o=fBe(this,n,i,r);return o?this.setState(o):this});S(this,"cancel",()=>{var n,r;return(r=(n=this.currentTool).onCancel)==null||r.call(n),this});S(this,"addMediaFromFile",async(n,r=this.centerPoint)=>{this.setIsLoading(!0);const i=$.uniqueId(),o=this.getPagePoint(r),a=n.name.match(/\.[0-9a-z]+$/i);if(!a)throw Error("No extension");const s=vW.includes(a[0].toLowerCase()),l=yW.includes(a[0].toLowerCase());if(!(s||l))throw Error("Wrong extension");const c=s?U.Image:U.Video,u=s?Bl.Image:Bl.Video;let d;try{if(this.callbacks.onAssetCreate){const f=await this.callbacks.onAssetCreate(n,i);if(!f)throw Error("Asset creation callback returned false");d=f}else d=await PBe(n);if(typeof d=="string"){const f=s?await RM(d).catch(g=>{throw g}):[401.42,401.42],p=Object.values(this.document.assets).find(g=>g.type===u&&g.src===d);let m;if(p)m=p.id;else{m=$.uniqueId();const g={id:m,type:u,src:d,size:f};this.patchState({document:{assets:{[m]:g}}})}this.createImageOrVideoShapeAtPoint(i,c,o,f,m)}}catch(f){return console.warn(f),this.setIsLoading(!1),this}return this.setIsLoading(!1),this});S(this,"addWaImage",async(n,r=this.centerPoint)=>{var u,d;this.setIsLoading(!0);const i=$.uniqueId(),o=this.getPagePoint(r),a=U.Image,s=Bl.Image;let l;const c=(d=(u=n==null?void 0:n.tlBgImage)!=null?u:n.tlAltImage)!=null?d:"";try{if(!c)throw Error("No image url on image");if(l=await OBe(c),typeof l=="string"){const f=await RM(l).catch(g=>{throw g}),p=Object.values(this.document.assets).find(g=>g.type===s&&g.src===l);let m;if(p)m=p.id;else{m=$.uniqueId();const g={id:m,type:s,src:c,size:f};this.patchState({document:{assets:{[m]:g}}})}this.createImageOrVideoShapeAtPoint(i,a,o,f,m)}}catch(f){return console.warn(f),this.setIsLoading(!1),this}return this.setIsLoading(!1),this});S(this,"addWaElement",async(n,r=this.centerPoint)=>{var c,u,d;this.setIsLoading(!0);const i=$.uniqueId(),o=this.getPagePoint(r);let a;const s=U.Block,l=Bl.Block;try{a="";const f=WH(n,"px"),p=$.uniqueId(),m=this.document.userSettings,g={...n,tlStrokeColor:(c=m==null?void 0:m.tlStrokeColor)!=null?c:n.tlStrokeColor,tlShowText:(u=m==null?void 0:m.tlShowText)!=null?u:n.tlShowText,tlBgColor:(d=m==null?void 0:m.tlBgColor)!=null?d:n.tlBgColor},y={id:p,type:l,src:a,size:f,block:g};this.createBlockShapeAtPoint(i,s,o,f,y)}catch(f){return console.warn(f),this.setIsLoading(!1),this}return this.setIsLoading(!1),this});S(this,"onKeyDown",(n,r,i)=>{var o,a;switch(i.key){case"Escape":{this.cancel();break}case"Meta":{this.metaKey=!0;break}case"Alt":{this.altKey=!0;break}case"Control":{this.ctrlKey=!0;break}case" ":{this.isForcePanning=!0,this.spaceKey=!0;break}}return(a=(o=this.currentTool).onKeyDown)==null||a.call(o,n,r,i),this});S(this,"onKeyUp",(n,r,i)=>{var o,a;if(!!r){switch(i.key){case"Meta":{this.metaKey=!1;break}case"Alt":{this.altKey=!1;break}case"Control":{this.ctrlKey=!1;break}case" ":{this.isForcePanning=!1,this.spaceKey=!1;break}}(a=(o=this.currentTool).onKeyUp)==null||a.call(o,n,r,i)}});S(this,"onDragOver",n=>{n.preventDefault()});S(this,"onDrop",async n=>{var r;if(n.preventDefault(),this.disableAssets)return this;if((r=n.dataTransfer.files)!=null&&r.length){const i=n.dataTransfer.files[0];this.addMediaFromFile(i,[n.clientX,n.clientY])}return this});S(this,"onPinchStart",(n,r)=>{var i,o;return(o=(i=this.currentTool).onPinchStart)==null?void 0:o.call(i,n,r)});S(this,"onPinchEnd",(n,r)=>{var i,o;return(o=(i=this.currentTool).onPinchEnd)==null?void 0:o.call(i,n,r)});S(this,"onPinch",(n,r)=>{var i,o;return(o=(i=this.currentTool).onPinch)==null?void 0:o.call(i,n,r)});S(this,"onPan",(n,r)=>{if(this.appState.status==="pinching")return;const i=O.div(n.delta,this.pageState.camera.zoom),o=this.pageState.camera.point,a=O.sub(o,i);O.isEqual(a,o)||(this.pan(i),this.isForcePanning||this.onPointerMove(n,r))});S(this,"onZoom",(n,r)=>{if(this.state.appState.status!==bn.Idle)return;const i=n.delta[2],o=r.deltaMode===WheelEvent.DOM_DELTA_PIXEL?i/250:r.deltaMode===WheelEvent.DOM_DELTA_LINE?i/100:i/2;this.zoomBy(o,this.centerPoint),this.onPointerMove(n,r)});S(this,"updateInputs",n=>{this.currentPoint=[...this.getPagePoint(n.point),n.pressure],this.shiftKey=n.shiftKey,this.altKey=n.altKey,this.ctrlKey=n.ctrlKey,this.metaKey=n.metaKey});S(this,"onPointerMove",(n,r)=>{var i,o,a,s,l;if(this.previousPoint=this.currentPoint,this.updateInputs(n,r),this.isForcePanning&&this.isPointing){(i=this.onPan)==null||i.call(this,{...n,delta:O.neg(n.delta)},r);return}if((a=(o=this.currentTool).onPointerMove)==null||a.call(o,n,r),this.state.room){const{users:c,userId:u}=this.state.room;(l=(s=this.callbacks).onChangePresence)==null||l.call(s,this,{...c[u],point:this.getPagePoint(n.point)})}});S(this,"onPointerDown",(n,r)=>{var i,o;if(r.buttons===4)this.isForcePanning=!0;else if(this.isPointing)return;this.isPointing=!0,this.originPoint=this.getPagePoint(n.point),this.updateInputs(n,r),!this.isForcePanning&&((o=(i=this.currentTool).onPointerDown)==null||o.call(i,n,r))});S(this,"onPointerUp",(n,r)=>{var i,o;this.isPointing=!1,this.shiftKey||(this.isForcePanning=!1),this.updateInputs(n,r),(o=(i=this.currentTool).onPointerUp)==null||o.call(i,n,r)});S(this,"onPointCanvas",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onPointCanvas)==null||o.call(i,n,r)});S(this,"onDoubleClickCanvas",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onDoubleClickCanvas)==null||o.call(i,n,r)});S(this,"onRightPointCanvas",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onRightPointCanvas)==null||o.call(i,n,r)});S(this,"onDragCanvas",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onDragCanvas)==null||o.call(i,n,r)});S(this,"onReleaseCanvas",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onReleaseCanvas)==null||o.call(i,n,r)});S(this,"onPointShape",(n,r)=>{var i,o;this.originPoint=this.getPagePoint(n.point),this.updateInputs(n,r),(o=(i=this.currentTool).onPointShape)==null||o.call(i,n,r)});S(this,"onReleaseShape",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onReleaseShape)==null||o.call(i,n,r)});S(this,"onDoubleClickShape",(n,r)=>{var i,o;this.originPoint=this.getPagePoint(n.point),this.updateInputs(n,r),(o=(i=this.currentTool).onDoubleClickShape)==null||o.call(i,n,r)});S(this,"onRightPointShape",(n,r)=>{var i,o;this.originPoint=this.getPagePoint(n.point),this.updateInputs(n,r),(o=(i=this.currentTool).onRightPointShape)==null||o.call(i,n,r)});S(this,"onDragShape",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onDragShape)==null||o.call(i,n,r)});S(this,"onHoverShape",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onHoverShape)==null||o.call(i,n,r)});S(this,"onUnhoverShape",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onUnhoverShape)==null||o.call(i,n,r)});S(this,"onPointBounds",(n,r)=>{var i,o;this.originPoint=this.getPagePoint(n.point),this.updateInputs(n,r),(o=(i=this.currentTool).onPointBounds)==null||o.call(i,n,r)});S(this,"onDoubleClickBounds",(n,r)=>{var i,o;this.originPoint=this.getPagePoint(n.point),this.updateInputs(n,r),(o=(i=this.currentTool).onDoubleClickBounds)==null||o.call(i,n,r)});S(this,"onRightPointBounds",(n,r)=>{var i,o;this.originPoint=this.getPagePoint(n.point),this.updateInputs(n,r),(o=(i=this.currentTool).onRightPointBounds)==null||o.call(i,n,r)});S(this,"onDragBounds",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onDragBounds)==null||o.call(i,n,r)});S(this,"onHoverBounds",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onHoverBounds)==null||o.call(i,n,r)});S(this,"onUnhoverBounds",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onUnhoverBounds)==null||o.call(i,n,r)});S(this,"onReleaseBounds",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onReleaseBounds)==null||o.call(i,n,r)});S(this,"onPointBoundsHandle",(n,r)=>{var i,o;this.originPoint=this.getPagePoint(n.point),this.updateInputs(n,r),(o=(i=this.currentTool).onPointBoundsHandle)==null||o.call(i,n,r)});S(this,"onDoubleClickBoundsHandle",(n,r)=>{var o,a;if(this.originPoint=this.getPagePoint(n.point),this.updateInputs(n,r),(a=(o=this.currentTool).onDoubleClickBoundsHandle)==null||a.call(o,n,r),this.selectedIds.length!==1)return;const i=this.getShape(this.selectedIds[0]);if(i.type===U.Image||i.type===U.Video){const s=this.document.assets[i.assetId],l=Q.getShapeUtil(i),c=l.getCenter(i),u=l.getCenter({...i,size:s.size}),d=O.sub(u,c);this.updateShapes({id:i.id,point:O.sub(i.point,d),size:s.size})}});S(this,"onRightPointBoundsHandle",(n,r)=>{var i,o;this.originPoint=this.getPagePoint(n.point),this.updateInputs(n,r),(o=(i=this.currentTool).onRightPointBoundsHandle)==null||o.call(i,n,r)});S(this,"onDragBoundsHandle",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onDragBoundsHandle)==null||o.call(i,n,r)});S(this,"onHoverBoundsHandle",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onHoverBoundsHandle)==null||o.call(i,n,r)});S(this,"onUnhoverBoundsHandle",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onUnhoverBoundsHandle)==null||o.call(i,n,r)});S(this,"onReleaseBoundsHandle",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onReleaseBoundsHandle)==null||o.call(i,n,r)});S(this,"onPointHandle",(n,r)=>{var i,o;this.originPoint=this.getPagePoint(n.point),this.updateInputs(n,r),(o=(i=this.currentTool).onPointHandle)==null||o.call(i,n,r)});S(this,"onDoubleClickHandle",(n,r)=>{var i,o;this.originPoint=this.getPagePoint(n.point),this.updateInputs(n,r),(o=(i=this.currentTool).onDoubleClickHandle)==null||o.call(i,n,r)});S(this,"onRightPointHandle",(n,r)=>{var i,o;this.originPoint=this.getPagePoint(n.point),this.updateInputs(n,r),(o=(i=this.currentTool).onRightPointHandle)==null||o.call(i,n,r)});S(this,"onDragHandle",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onDragHandle)==null||o.call(i,n,r)});S(this,"onHoverHandle",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onHoverHandle)==null||o.call(i,n,r)});S(this,"onUnhoverHandle",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onUnhoverHandle)==null||o.call(i,n,r)});S(this,"onReleaseHandle",(n,r)=>{var i,o;this.updateInputs(n,r),(o=(i=this.currentTool).onReleaseHandle)==null||o.call(i,n,r)});S(this,"onShapeChange",n=>{this.updateShapes(n)});S(this,"onShapeBlur",()=>{var i,o;if(performance.now()-this.editingStartTime<50)return;const{editingId:n}=this.pageState,{isToolLocked:r}=this.getAppState();if(n){const a=this.getShape(n);this.setEditingId(),a.type===U.Text&&(a.text.trim().length<=0?this.patchState(EM(this,[n]).after,"delete_empty_text"):r||this.select(n))}(o=(i=this.currentTool).onShapeBlur)==null||o.call(i)});S(this,"onShapeClone",(n,r)=>{var i,o;this.originPoint=this.getPagePoint(n.point),this.updateInputs(n,r),(o=(i=this.currentTool).onShapeClone)==null||o.call(i,n,r)});S(this,"onRenderCountChange",n=>{const r=this.getAppState();r.isEmptyCanvas&&n.length>0?this.patchState({appState:{isEmptyCanvas:!1}},"empty_canvas:false"):!r.isEmptyCanvas&&n.length<=0&&this.patchState({appState:{isEmptyCanvas:!0}},"empty_canvas:true")});S(this,"onError",()=>{});S(this,"getShapeUtil",Q.getShapeUtil);this.callbacks=r}setStatus(n){return this.patchState({appState:{status:n}},`set_status:${n}`)}get isMenuOpen(){return this.appState.isMenuOpen}get isLoading(){return this.appState.isLoading}get disableAssets(){return this.appState.disableAssets}get history(){return this.stack.slice(0,this.pointer+1)}set history(n){this.replaceHistory(n)}get document(){return this.state.document}get settings(){return this.state.settings}get appState(){return this.state.appState}get currentPageId(){return this.state.appState.currentPageId}get page(){return this.state.document.pages[this.currentPageId]}get shapes(){return Object.values(this.page.shapes)}get bindings(){return Object.values(this.page.bindings)}get assets(){return Object.values(this.document.assets)}get pageState(){return this.state.document.pageStates[this.currentPageId]}get selectedIds(){return this.pageState.selectedIds}createTextShapeAtPoint(n,r){const{shapes:i,appState:{currentPageId:o,currentStyle:a}}=this,s=i.length===0?1:i.filter(d=>d.parentId===o).sort(kx)[0].childIndex+1,l=js[U.Text],c=l.create({id:r||$.uniqueId(),parentId:o,childIndex:s,point:n,style:{...a}}),u=l.getBounds(c);return c.point=O.sub(c.point,[u.width/2,u.height/2]),this.createShapes(c),this.setEditingId(c.id),this}createImageOrVideoShapeAtPoint(n,r,i,o,a){const{shapes:s,appState:{currentPageId:l,currentStyle:c}}=this,u=s.length===0?1:s.filter(m=>m.parentId===l).sort(kx)[0].childIndex+1,d=js[r],f=d.create({id:n,parentId:l,childIndex:u,point:i,size:o,style:{...c},assetId:a}),p=d.getBounds(f);return f.point=O.sub(f.point,[p.width/2,p.height/2]),this.createShapes(f),this}createBlockShapeAtPoint(n,r,i,o,a){const{shapes:s,appState:{currentPageId:l,currentStyle:c}}=this,u=s.length===0?1:s.filter(m=>m.parentId===l).sort(kx)[0].childIndex+1,d=js[r],f=d.create({id:n,parentId:l,childIndex:u,point:i,size:o,style:{...c},asset:a}),p=d.getBounds(f);return f.point=O.sub(f.point,[p.width/2,p.height/2]),this.createShapes(f),this}isSelected(n){return this.selectedIds.includes(n)}serializeVideo(n){const r=document.getElementById(n+"_video");if(r){const i=document.createElement("canvas");return i.width=r.videoWidth,i.height=r.videoHeight,i.getContext("2d").drawImage(r,0,0),i.toDataURL("image/png")}else throw new Error("Video with id "+n+" not found")}patchAssets(n){this.document.assets={...this.document.assets,...n}}async exportAllShapesAs(n){const r=[...this.selectedIds];this.selectAll();const{width:i,height:o}=$.expandBounds(Q.getSelectedBounds(this.state),64),a=[...this.selectedIds];this.setSelectedIds(r),await this.exportShapesAs(a,[i,o],n)}async exportSelectedShapesAs(n){const{width:r,height:i}=$.expandBounds(Q.getSelectedBounds(this.state),64);await this.exportShapesAs(this.selectedIds,[r,i],n)}async exportShapesAs(n,r,i){var c,u,d;this.setIsLoading(!0);const o={};let a=n.map(f=>({...this.getShape(f)}));a.forEach(f=>{f.assetId&&(o[f.assetId]={...this.document.assets[f.assetId]},f.type===U.Video&&(o[f.assetId].src=this.serializeVideo(f.id),o[f.assetId].type=Bl.Image))}),a=a.map(f=>{if(f.type===U.Video){const p=f;return p.type=U.Image,p}else return f});let s;i==ys.SVG?s=this.copySvg(n):i==ys.JSON&&(s=this.copyJson(n));const l={name:(c=this.page.name)!=null?c:"export",shapes:a,assets:o,type:i,size:i==="png"?O.mul(r,2):r,serialized:s};if(this.callbacks.onExport)try{this.setIsLoading(!0),await((d=(u=this.callbacks).onExport)==null?void 0:d.call(u,l))}catch(f){console.error(f)}finally{this.setIsLoading(!1)}}get room(){return this.state.room}get isLocal(){return this.state.room===void 0||this.state.room.id==="local"}get status(){return this.appState.status}get currentUser(){if(!!this.state.room)return this.state.room.users[this.state.room.userId]}get centerPoint(){const{width:n,height:r}=this.rendererBounds;return O.toFixed([n/2,r/2])}get currentGrid(){const{zoom:n}=this.pageState.camera;return n<.15?uu*16:n<1?uu*4:uu*1}};let $l=An;S($l,"version",16),S($l,"defaultDocument",{id:"doc",name:"",version:An.version,pages:{page:{id:"page",name:"Page 1",childIndex:1,shapes:{},bindings:{}}},userSettings:y7e,pageStates:{page:{id:"page",selectedIds:[],camera:{point:[0,0],zoom:1}}},assets:{}}),S($l,"defaultState",{settings:{isPenMode:!1,isDarkMode:!1,isZoomSnap:!1,isFocusMode:!1,isSnapping:!1,isDebugMode:uo.isDevelopment,isReadonlyMode:!1,nudgeDistanceLarge:16,nudgeDistanceSmall:1,showRotateHandles:!0,showBindingHandles:!1,showCloneHandles:!1,showGrid:!0},appState:{status:bn.Idle,activeTool:"select",hoveredId:void 0,currentPageId:"page",currentStyle:dr,isToolLocked:!1,isMenuOpen:!1,isEmptyCanvas:!1,snapLines:[],isLoading:!1,disableAssets:!1},document:An.defaultDocument});const kx=(e,t)=>t.childIndex-e.childIndex;U.Text+"",U.Draw+"",U.Ellipse+"",U.Rectangle+"",U.Triangle+"",U.Line+"",U.Arrow+"",U.Sticky+"",U.Diamond+"",U.Polygon+"";function _d(){return _d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_d.apply(this,arguments)}var e$e=function(t){var n=t.children,r=t.className,i=t.cx,o=t.innerProps,a=t.isDisabled,s=t.isRtl,l=t.hasValue,c=t.selectProps.chakraStyles,u=_d({position:"relative",direction:s?"rtl":void 0},a?{cursor:"not-allowed"}:{}),d=c!=null&&c.container?c.container(u,t):u;return A.createElement(_e,_d({},o,{className:i({"--is-disabled":a,"--is-rtl":s,"--has-value":l},r),sx:d}),n)},t$e=function(t){var n=t.children,r=t.className,i=t.cx,o=t.isMulti,a=t.hasValue,s=t.innerProps,l=t.selectProps,c=l.size,u=l.chakraStyles,d=l.variant,f=vt("Input",{size:c,variant:d}),p={display:"flex",alignItems:"center",flex:1,paddingY:"2px",paddingX:f.field.px,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},m=u!=null&&u.valueContainer?u.valueContainer(p,t):p;return A.createElement(_e,_d({},s,{className:i({"value-container":!0,"value-container--is-multi":o,"value-container--has-value":a},r),sx:m}),n)},n$e=function(t){var n=t.children,r=t.className,i=t.cx,o=t.innerProps,a=t.selectProps.chakraStyles,s={display:"flex",alignItems:"center",alignSelf:"stretch",flexShrink:0},l=a!=null&&a.indicatorsContainer?a.indicatorsContainer(s,t):s;return A.createElement(_e,_d({},o,{className:i({indicators:!0},r),sx:l}),n)};function Co(){return Co=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Co.apply(this,arguments)}var r$e=function(t){var n=t.className,r=t.cx,i=t.children,o=t.innerRef,a=t.innerProps,s=t.isDisabled,l=t.isFocused,c=t.menuIsOpen,u=t.selectProps,d=u.size,f=u.isInvalid,p=u.isReadOnly,m=u.chakraStyles,g=u.focusBorderColor,y=u.errorBorderColor,v=u.variant,b=vt("Input",{focusBorderColor:g,errorBorderColor:y,size:d,variant:v}),x=Co({},b.field,{display:"flex",padding:0,overflow:"hidden",height:"auto",minH:b.field.h},s?{pointerEvents:"none"}:{}),w=m!=null&&m.control?m.control(x,t):x;return A.createElement(_e,Co({ref:o,className:r({control:!0,"control--is-disabled":s,"control--is-focused":l,"control--menu-is-open":c},n),sx:w},a,{"data-focus":l?!0:void 0,"data-focus-visible":l?!0:void 0,"data-invalid":f?!0:void 0,"data-disabled":s?!0:void 0,"aria-readonly":p?!0:void 0}),i)},i$e=function(t){var n=t.className,r=t.cx,i=t.selectProps,o=i.chakraStyles,a=i.useBasicStyles,s=i.variant,l=Co({opacity:1},a||s!=="outline"?{display:"none"}:{}),c=o!=null&&o.indicatorSeparator?o.indicatorSeparator(l,t):l;return A.createElement(mB,{className:r({"indicator-separator":!0},n),sx:c,orientation:"vertical"})},o$e=function(t){return A.createElement(Wr,t,A.createElement("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"}))},a$e=function(t){var n=t.children,r=t.className,i=t.cx,o=t.innerProps,a=t.selectProps,s=a.chakraStyles,l=a.useBasicStyles,c=a.size,u=a.focusBorderColor,d=a.errorBorderColor,f=a.variant,p=vt("Input",{size:c,focusBorderColor:u,errorBorderColor:d,variant:f}),m={sm:"16px",md:"20px",lg:"24px"},g=m[c||"md"],y=Co({},p.addon,{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",borderRadius:0,borderWidth:0,fontSize:g},l&&{background:"transparent",padding:0,width:6,marginRight:2,marginLeft:1,cursor:"inherit"}),v=s!=null&&s.dropdownIndicator?s.dropdownIndicator(y,t):y,b={height:"1em",width:"1em"},x=s!=null&&s.downChevron?s.downChevron(b,t):b;return A.createElement(_e,Co({},o,{className:i({indicator:!0,"dropdown-indicator":!0},r),sx:v}),n||A.createElement(o$e,{sx:x}))},s$e=function(t){return A.createElement(Wr,Co({focusable:"false","aria-hidden":!0},t),A.createElement("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}))},l$e=function(t){var n=t.children,r=t.className,i=t.cx,o=t.innerProps,a=t.selectProps,s=a.size,l=a.chakraStyles,c=Pr("CloseButton",{size:s}),u=Co({},c,{marginX:1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,cursor:"pointer"}),d=l!=null&&l.clearIndicator?l.clearIndicator(u,t):u,f={width:"1em",height:"1em"},p=l!=null&&l.crossIcon?l.crossIcon(f,t):f;return A.createElement(_e,Co({role:"button",className:i({indicator:!0,"clear-indicator":!0},r),sx:d,"aria-label":"Clear selected options"},o),n||A.createElement(s$e,{sx:p}))},c$e=function(t){var n=t.className,r=t.cx,i=t.innerProps,o=t.selectProps,a=o.size,s=o.chakraStyles,l=t.color,c=t.emptyColor,u=t.speed,d=t.thickness,f=t.spinnerSize,p={sm:"xs",md:"sm",lg:"md"},m=p[a||"md"],g={marginRight:3},y=s!=null&&s.loadingIndicator?s.loadingIndicator(g,t):g;return A.createElement(Oy,Co({className:r({indicator:!0,"loading-indicator":!0},n),sx:y},i,{size:f||m,color:l,emptyColor:c,speed:u,thickness:d}))},u$e=r$e,d$e=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"];function G4(){return G4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},G4.apply(this,arguments)}function f$e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var p$e=function(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var n=f$e(t,d$e);return G4({},n)},h$e=["innerRef","isDisabled","isHidden","inputClassName"];function Pp(){return Pp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pp.apply(this,arguments)}function m$e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var g$e=function(t){var n=t.className,r=t.cx,i=t.value,o=t.selectProps,a=o.chakraStyles,s=o.isReadOnly,l=o.isRequired,c=p$e(t),u=c.innerRef,d=c.isDisabled,f=c.isHidden,p=c.inputClassName,m=m$e(c,h$e),g={gridArea:"1 / 2",font:"inherit",minW:"2px",border:0,margin:0,outline:0},y={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content",color:"inherit",marginX:"0.125rem",paddingY:"0.125rem",_after:Pp({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre",padding:0},g)},v=a!=null&&a.inputContainer?a.inputContainer(y,t):y,b=Pp({label:"input",color:"inherit",background:0,opacity:f?0:1,width:"100%"},g),x=a!=null&&a.input?a.input(b,t):b;return A.createElement(_e,{className:r({"input-container":!0},n),"data-value":i||"",sx:v},A.createElement(ce.input,Pp({className:r({input:!0},p),ref:u,sx:x,disabled:d,readOnly:s?!0:void 0,"aria-readonly":s?!0:void 0,"aria-required":l?!0:void 0},m)))},v$e=g$e;function di(){return di=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},di.apply(this,arguments)}var y$e=function(t){var n={bottom:"top",top:"bottom"};return t?n[t]:"top"},b$e=function(t){var n,r=t.className,i=t.cx,o=t.children,a=t.innerProps,s=t.innerRef,l=t.placement,c=t.selectProps.chakraStyles,u=(n={position:"absolute"},n[y$e(l)]="100%",n.marginY="8px",n.width="100%",n.zIndex=1,n),d=c!=null&&c.menu?c.menu(u,t):u;return A.createElement(_e,di({},a,{ref:s,className:i({menu:!0},r),sx:d}),o)},x$e=b$e,S$e=function(t){var n,r=t.className,i=t.cx,o=t.innerRef,a=t.children,s=t.maxHeight,l=t.isMulti,c=t.innerProps,u=t.selectProps,d=u.size,f=u.chakraStyles,p=vt("Menu"),m=vt("Input",{size:d}),g=di({},p.list,{minW:"100%",maxHeight:s+"px",overflowY:"auto",borderRadius:(n=m.field)==null?void 0:n.borderRadius,position:"relative",WebkitOverflowScrolling:"touch"}),y=f!=null&&f.menuList?f.menuList(g,t):g;return A.createElement(_e,di({},c,{className:i({"menu-list":!0,"menu-list--is-multi":l},r),sx:y,ref:o}),a)},w$e=function(t){var n=t.children,r=t.className,i=t.cx,o=t.innerProps,a=t.selectProps,s=a.size,l=a.chakraStyles,c=$p("gray.400","whiteAlpha.400"),u={sm:"6px",md:"8px",lg:"10px"},d={color:c,textAlign:"center",paddingY:u[s||"md"],fontSize:s},f=l!=null&&l.loadingMessage?l.loadingMessage(d,t):d;return A.createElement(_e,di({},o,{className:i({"menu-notice":!0,"menu-notice--loading":!0},r),sx:f}),n)},C$e=function(t){var n=t.children,r=t.className,i=t.cx,o=t.innerProps,a=t.selectProps,s=a.size,l=a.chakraStyles,c=$p("gray.400","whiteAlpha.400"),u={sm:"6px",md:"8px",lg:"10px"},d={color:c,textAlign:"center",paddingY:u[s||"md"],fontSize:s},f=l!=null&&l.noOptionsMessage?l.noOptionsMessage(d,t):d;return A.createElement(_e,di({},o,{className:i({"menu-notice":!0,"menu-notice--no-options":!0},r),sx:f}),n)},k$e=function(t){var n=t.children,r=t.className,i=t.cx,o=t.theme,a=t.getStyles,s=t.Heading,l=t.headingProps,c=t.label,u=t.selectProps,d=t.innerProps,f=t.getClassNames,p=u.chakraStyles,m=p!=null&&p.group?p.group({},t):{};return A.createElement(_e,di({},d,{className:i({group:!0},r),sx:m}),A.createElement(s,di({},l,{selectProps:u,cx:i,theme:o,getStyles:a,getClassNames:f}),c),A.createElement(_e,null,n))},E$e=function(t){var n=t.cx,r=t.className,i=t.children,o=t.selectProps,a=o.size,s=o.hasStickyGroupHeaders,l=o.chakraStyles,c=vt("Menu"),u={sm:"xs",md:"sm",lg:"md"},d={sm:"0.4rem 0.8rem",md:"0.5rem 1rem",lg:"0.6rem 1.2rem"},f=di({},c.groupTitle,{fontSize:u[a||"md"],padding:d[a||"md"],margin:0,borderBottomWidth:s?"1px":0,position:s?"sticky":"static",top:-2,bg:c.list.bg,zIndex:1}),p=l!=null&&l.groupHeading?l.groupHeading(f,t):f;return A.createElement(_e,{className:n({"group-heading":!0},r),sx:p},i)},I$e=function(t){return A.createElement(Cne,di({viewBox:"0 0 14 14",w:"1em",h:"1em"},t),A.createElement("polygon",{fill:"currentColor",points:"5.5 11.9993304 14 3.49933039 12.5 2 5.5 8.99933039 1.5 4.9968652 0 6.49933039"}))},T$e=function(t){var n=t.className,r=t.cx,i=t.innerRef,o=t.innerProps,a=t.children,s=t.isFocused,l=t.isDisabled,c=t.isSelected,u=t.selectProps,d=u.size,f=u.isMulti,p=u.hideSelectedOptions,m=u.selectedOptionStyle,g=u.selectedOptionColor,y=u.chakraStyles,v=vt("Menu").item,b={sm:"0.3rem 0.6rem",md:"0.4rem 0.8rem",lg:"0.5rem 1rem"},x=$p(g+".500",g+".300"),w=$p("white","black"),E=m==="check"&&(!f||p===!1),C=m==="color"&&c,I=di({},v,{display:"flex",alignItems:"center",width:"100%",textAlign:"start",fontSize:d,padding:b[d||"md"]},s&&v._focus,C&&{bg:x,color:w,_active:{bg:x}},l&&v._disabled,l&&{_active:{}}),T=y!=null&&y.option?y.option(I,t):I;return A.createElement(_e,di({},o,{role:"button",className:r({option:!0,"option--is-disabled":l,"option--is-focused":s,"option--is-selected":c},n),sx:T,ref:i,"data-disabled":l?!0:void 0,"aria-disabled":l?!0:void 0}),E&&A.createElement(By,{fontSize:"0.8em",marginEnd:"0.75rem",opacity:c?1:0},A.createElement(I$e,null)),a)};function Uo(){return Uo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Uo.apply(this,arguments)}var _$e=function(t){return typeof t=="object"&&t!==null&&"colorScheme"in t},oU=function(t){return typeof t=="object"&&t!==null&&"isFixed"in t},P$e=function(t){return typeof t=="object"&&t!==null&&"variant"in t},O$e=function(t){var n=t.children,r=t.className,i=t.components,o=t.cx,a=t.data,s=t.innerProps,l=t.isDisabled,c=t.isFocused,u=t.removeProps,d=t.selectProps,f=i.Container,p=i.Label,m=i.Remove,g=d.chakraStyles,y=d.colorScheme,v=d.tagVariant,b=d.size,x="",w="",E=!1;_$e(a)&&typeof a.colorScheme=="string"&&(x=a.colorScheme),P$e(a)&&typeof a.variant=="string"&&(w=a.variant),oU(a)&&(E=!!a.isFixed);var C=vt("Tag",{size:b,colorScheme:x||y,variant:w||v||(E?"solid":"subtle")}),I=Uo({},C.container,{display:"inline-flex",verticalAlign:"top",alignItems:"center",maxWidth:"100%",margin:"0.125rem"}),T=g!=null&&g.multiValue?g.multiValue(I,t):I,_=C.label,P=g!=null&&g.multiValueLabel?g.multiValueLabel(_,t):_,M=Uo({display:"flex",alignItems:"center",justifyContent:"center"},C.closeButton),D=g!=null&&g.multiValueRemove?g.multiValueRemove(M,t):M;return A.createElement(f,{data:a,innerProps:Uo({className:o({"multi-value":!0,"multi-value--is-disabled":l},r)},s),sx:T,selectProps:d},A.createElement(p,{data:a,innerProps:{className:o({"multi-value__label":!0},r)},sx:P,selectProps:d},n),A.createElement(m,{data:a,innerProps:Uo({className:o({"multi-value__remove":!0},r),"aria-label":"Remove "+(n||"option")},u),sx:D,selectProps:d,isFocused:c}))},M$e=function(t){var n=t.children,r=t.innerProps,i=t.sx;return A.createElement(ce.span,Uo({},r,{sx:i}),n)},R$e=function(t){var n=t.children,r=t.innerProps,i=t.sx;return A.createElement(ce.span,Uo({},r,{sx:i}),n)},D$e=function(t){return A.createElement(Wr,Uo({verticalAlign:"inherit",viewBox:"0 0 512 512"},t),A.createElement("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"}))},A$e=function(t){var n=t.children,r=t.innerProps,i=t.isFocused,o=t.data,a=t.sx;return oU(o)&&o.isFixed?null:A.createElement(_e,Uo({},r,{role:"button",sx:a,"data-focus":i?!0:void 0,"data-focus-visible":i?!0:void 0}),n||A.createElement(D$e,null))},L$e=O$e;function K4(){return K4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},K4.apply(this,arguments)}var B$e=function(t){var n=t.children,r=t.className,i=t.cx,o=t.innerProps,a=t.selectProps.chakraStyles,s=$p("gray.400","whiteAlpha.400"),l={color:s,mx:"0.125rem",position:"absolute",top:"50%",transform:"translateY(-50%)",userSelect:"none"},c=a!=null&&a.placeholder?a.placeholder(l,t):l;return A.createElement(_e,K4({},o,{className:i({placeholder:!0},r),sx:c}),n)},$$e=B$e;function q4(){return q4=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},q4.apply(this,arguments)}var F$e=function(t){var n=t.children,r=t.className,i=t.cx,o=t.isDisabled,a=t.innerProps,s=t.selectProps.chakraStyles,l={label:"singleValue",mx:"0.125rem",maxWidth:"calc(100% - 0.5rem)",overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"},c=s!=null&&s.singleValue?s.singleValue(l,t):l;return A.createElement(_e,q4({className:i({"single-value":!0,"single-value--is-disabled":o},r),sx:c},a),n)},N$e=F$e,z$e={ClearIndicator:l$e,Control:u$e,DropdownIndicator:a$e,Group:k$e,GroupHeading:E$e,IndicatorSeparator:i$e,IndicatorsContainer:n$e,Input:v$e,LoadingIndicator:c$e,LoadingMessage:w$e,Menu:x$e,MenuList:S$e,MultiValue:L$e,MultiValueContainer:M$e,MultiValueLabel:R$e,MultiValueRemove:A$e,NoOptionsMessage:C$e,Option:T$e,Placeholder:$$e,SelectContainer:e$e,SingleValue:N$e,ValueContainer:t$e},j$e=z$e,H$e=["components","theme","size","colorScheme","isDisabled","isInvalid","isReadOnly","isRequired","inputId","tagVariant","hasStickyGroupHeaders","selectedOptionStyle","selectedOptionColor","variant","focusBorderColor","errorBorderColor","chakraStyles","onFocus","onBlur","menuIsOpen"];function Lv(){return Lv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lv.apply(this,arguments)}function V$e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var W$e=function(t){var n,r=t.components,i=r===void 0?{}:r;t.theme;var o=t.size,a=t.colorScheme,s=a===void 0?"gray":a,l=t.isDisabled,c=t.isInvalid,u=t.isReadOnly,d=t.isRequired,f=t.inputId,p=t.tagVariant,m=t.hasStickyGroupHeaders,g=m===void 0?!1:m,y=t.selectedOptionStyle,v=y===void 0?"color":y,b=t.selectedOptionColor,x=b===void 0?"blue":b,w=t.variant,E=t.focusBorderColor,C=t.errorBorderColor,I=t.chakraStyles,T=I===void 0?{}:I,_=t.onFocus,P=t.onBlur,M=t.menuIsOpen,D=V$e(t,H$e),V=p9(),B=V.components.Input.defaultProps,L=B.variant,G=B.size,z=sB({id:f,isDisabled:l,isInvalid:c,isRequired:d,isReadOnly:u,onFocus:_,onBlur:P}),j=M!=null?M:z.readOnly?!1:void 0,F=o!=null?o:G==="xs"?"sm":G,H=["sm","md","lg"];H.includes(F)||(F="md");var R=p,W=["subtle","solid","outline"];p!==void 0&&(W.includes(p)||(R="subtle"));var X=v,te=["color","check"];te.includes(v)||(X="color");var re=x;typeof x!="string"&&(re="blue");var ne=w!=null?w:L,ie=["outline","filled","flushed","unstyled"];ie.includes(ne)||(ne=L);var ae=Lv({components:Lv({},j$e,i),colorScheme:s,size:F,tagVariant:R,selectedOptionStyle:X,selectedOptionColor:re,variant:ne,hasStickyGroupHeaders:g,chakraStyles:T,focusBorderColor:E,errorBorderColor:C,onFocus:z.onFocus,onBlur:z.onBlur,isDisabled:z.disabled,isInvalid:!!z["aria-invalid"],inputId:z.id,isReadOnly:z.readOnly,menuIsOpen:j},D,{"aria-invalid":((n=D["aria-invalid"])!=null?n:z["aria-invalid"])?!0:void 0});return ae},U$e=W$e,G$e=h.exports.forwardRef(function(e,t){var n=U$e(e);return k(tPe,{ref:t,...n})}),AM=G$e;const K$e=({initialCanvasState:e,updateCanvas:t,t:n,worldSubscriberGroups:r})=>{const[i,o]=h.exports.useState(e),a=u=>({value:u,label:n(u)}),s=["private","public"].map(a),l=r;h.exports.useEffect(()=>{i&&t(i)},[i,t]);const c=u=>{u&&u.length>0&&o({...i,subscribergroups:[...u]})};return Z(X9,{children:[k(lg,{htmlFor:"title",children:n("title")}),k(Wd,{name:"title",placeholder:n("untitled"),defaultValue:i==null?void 0:i.title,onChange:u=>{o({...i,title:u.target.value})}}),k(lg,{paddingTop:"1rem",htmlFor:"status",children:n("elementStatus",{element:n("canvas")})}),k(AM,{name:"status",options:s,closeMenuOnSelect:!0,size:"sm",defaultValue:i!=null&&i.state?a(i.state):void 0,css:{textTransform:"capitalize",paddingBottom:"1rem"},onChange:u=>{u!=null&&u.value&&o({...i,state:u==null?void 0:u.value})}}),!!l.length&&Z(Pe,{children:[k(lg,{paddingTop:"1rem",htmlFor:"subscriberGroups",children:n("subscriberGroups")}),k(aB,{paddingBottom:"0.5rem",children:n("subscriberGroupHelper")}),k(AM,{isMulti:!0,name:"subscriberGroups",placeholder:n("subscriberGroupPlaceholder"),size:"sm",options:l,defaultValue:i==null?void 0:i.subscribergroups,getOptionLabel:u=>u.title,getOptionValue:u=>u.id,onChange:c})]})]})},q$e=()=>{const e=h.exports.useRef(null),t=at(),{state:{appState:{modalSetting:n},document:r},selectedIds:i}=t,o=kd(T=>T.user.subscriberGroups),a=t.useStore(T=>T.settings.isDarkMode),{t:s}=dn("",{keyPrefix:"externalUI"}),[l,c]=h.exports.useState(!1),[u,d]=h.exports.useState(),[f,p]=h.exports.useState(),[m,g]=h.exports.useState({body:k(Pe,{}),footer:k(Pe,{}),title:""}),[y,v]=h.exports.useState(""),[b,x]=h.exports.useState(),w=()=>{n===sr.background&&t.updateWaUserSettings(),t.handleModalOpened(void 0,f?[f]:[])},E=h.exports.useCallback(()=>{var T,_,P;t.updateDocument({...r,name:(T=b==null?void 0:b.title)!=null?T:r.name,title:(_=b==null?void 0:b.title)!=null?_:r.name,subscribergroups:b==null?void 0:b.subscribergroups,state:(P=b==null?void 0:b.state)!=null?P:r.state}),t.updateCanvasSettings(b),t.handleModalOpened(void 0,[])},[b]),C=vt("SearchMenu",{}),I=T=>_=>{_.key==="Enter"&&(_.preventDefault(),_.stopPropagation(),T()),_.key=="Tab"&&(_.preventDefault(),_.stopPropagation())};return h.exports.useEffect(()=>{var _;const T=!!n;T&&l===!1&&(i.length===1||n===sr.background)&&(p(i[0]),d((_=t.getBlock(i[0]))!=null?_:void 0)),c(T)},[i,n,i]),h.exports.useEffect(()=>{var T,_;switch(n){case sr.canvas:const P={...r,title:r.name,subscribergroups:(T=r.subscribergroups)!=null?T:[],state:(_=r.state)!=null?_:"private"};g({title:s("editElement",{element:s("canvas")}),body:k(K$e,{t:s,updateCanvas:D=>x(D),initialCanvasState:P,worldSubscriberGroups:o}),footer:Z(Pe,{children:[k(Dr,{mr:3,onClick:w,textTransform:"capitalize",variant:"ghost",children:s("close")}),k(Dr,{colorScheme:"blue",textTransform:"capitalize",type:"submit",onClick:E,children:s("applyChanges")})]})});break;case sr.title:const M=()=>{f&&y&&t.updateWAElement({tlTitle:y},[f]),w()};g({title:s("renameElement",{element:"title"}),body:k(X9,{onKeyDown:I(M),children:k(Wd,{ref:e,onChange:D=>{v(D.target.value)}})}),footer:Z(Pe,{children:[k(Dr,{mr:3,onClick:w,textTransform:"capitalize",variant:"ghost",children:s("close")}),k(Dr,{colorScheme:"blue",textTransform:"capitalize",type:"submit",onClick:M,children:s("renameElement",{element:"title"})})]})});break;case sr.url:g({title:s("changeElement",{element:"Url"}),body:k(Xl,{value:C,children:k(Mg,{onClickElement:async D=>{f&&JSON.stringify(D)!=="{}"&&t.addLinkToShape(D.tlUrl),w()}})}),footer:Z(Pe,{children:[k(Dr,{colorScheme:"blue",mr:3,onClick:w,textTransform:"capitalize",children:s("close")}),k(Dr,{colorScheme:"red",onClick:()=>{f&&t.addLinkToShape(void 0),w()},textTransform:"capitalize",children:s("removeElement",{element:"Url"})})]})});break;case sr.image:g({title:s("changeElement",{element:"Image"}),body:k(Xl,{value:C,children:k(Mg,{acceptedCategories:Ge.IMAGES,onClickElement:async D=>{f&&JSON.stringify(D)!=="{}"&&t.updateWAElement({tlBgImage:D.tlBgImage},[f]),w()}})}),footer:Z(Pe,{children:[k(Dr,{colorScheme:"blue",mr:3,onClick:w,textTransform:"capitalize",children:s("close")}),k(Dr,{colorScheme:"red",onClick:()=>{f&&t.updateWAElement({tlBgImage:void 0,tlAltImage:void 0},[f]),w()},textTransform:"capitalize",children:s("removeElement",{element:"Image"})})]})});break;case sr.background:g({title:s("changeElement",{element:"Background"}),body:Z(Xl,{value:C,children:[k(Sr,{fontWeight:"semibold",fontSize:"lg",children:s("changeBgColor")}),k(cu,{css:{display:"flex",flexWrap:"wrap"},changeStyle:({color:D})=>{t.updateWaUserSettings({DANGEROUSLY_SET_CSS:{background:D}})}}),k(Sr,{fontWeight:"semibold",fontSize:"lg",paddingTop:"8",children:s("changeBgImage")}),k(Mg,{acceptedCategories:Ge.IMAGES,onClickElement:async D=>{t.updateWaUserSettings({DANGEROUSLY_SET_CSS:{background:`url(${D.tlBgImage})`,backgroundSize:"cover"}})}})]}),footer:Z(Pe,{children:[k(Dr,{colorScheme:"blue",mr:3,onClick:()=>{t.updateWaUserSettings()},textTransform:"capitalize",children:s("close")}),k(Dr,{colorScheme:"red",onClick:()=>{t.updateWaUserSettings({DANGEROUSLY_SET_CSS:{background:void 0,backgroundSize:"unset"}})},textTransform:"capitalize",children:s("removeElement",{element:"Background"})})]})})}},[u,y,a,b,n,f,o]),Z(Jy,{initialFocusRef:e,isOpen:l,onClose:w,children:[k(d6,{}),Z(l6,{children:[k(u6,{textTransform:"capitalize",children:m.title}),k(bN,{}),k(s6,{children:m.body}),k(c6,{children:m.footer})]})]})};function Y$e({id:e,document:t,currentPageId:n,autofocus:r=!0,showMenu:i=!0,showPages:o=!0,showTools:a=!0,showZoom:s=!0,showStyles:l=!0,showUI:c=!0,readOnly:u=!1,showSponsorLink:d=!1,disableAssets:f=!1,isErebus:p,onMount:m,onChange:g,onChangePresence:y,onNewProject:v,onSaveProject:b,onSaveProjectAs:x,onOpenProject:w,onOpenMedia:E,onSignOut:C,onSignIn:I,onUndo:T,onRedo:_,onPersist:P,onPatch:M,onCommand:D,onChangePage:V,onAssetCreate:B,onAssetDelete:L,onExport:G,isLoading:z}){h.exports.useEffect(()=>{H==null||H.updateWaUserSettings({DANGEROUSLY_SET_CSS:{cursor:"unset"}})},[]);const[j,F]=h.exports.useState(e),[H,R]=h.exports.useState(()=>new $l(e,{onMount:m,onChange:g,onChangePresence:y,onNewProject:v,onSaveProject:b,onSaveProjectAs:x,onOpenProject:w,onOpenMedia:E,onSignOut:C,onSignIn:I,onUndo:T,onRedo:_,onPersist:P,onPatch:M,onCommand:D,onChangePage:V,onAssetDelete:L,onAssetCreate:B}));return h.exports.useEffect(()=>{z&&H.zoomToFit(),H.setIsLoading(!!z)},[z]),h.exports.useEffect(()=>{if(e===j)return;const W=new $l(e,{onMount:m,onChange:g,onChangePresence:y,onNewProject:v,onSaveProject:b,onSaveProjectAs:x,onOpenProject:w,onOpenMedia:E,onSignOut:C,onSignIn:I,onUndo:T,onRedo:_,onPersist:P,onPatch:M,onCommand:D,onChangePage:V,onAssetDelete:L,onAssetCreate:B,onExport:G});F(e),R(W)},[j,e]),h.exports.useEffect(()=>{!t||(t.id===H.document.id?H.updateDocument(t):H.loadDocument(t))},[t,H]),h.exports.useEffect(()=>{H.setDisableAssets(f)},[H,f]),h.exports.useEffect(()=>{!n||H.changePage(n)},[n,H]),h.exports.useEffect(()=>{H.readOnly=u},[H,u]),h.exports.useEffect(()=>{H.callbacks={onMount:m,onChange:g,onChangePresence:y,onNewProject:v,onSaveProject:b,onSaveProjectAs:x,onOpenProject:w,onOpenMedia:E,onSignOut:C,onSignIn:I,onUndo:T,onRedo:_,onPersist:P,onPatch:M,onCommand:D,onChangePage:V,onAssetDelete:L,onAssetCreate:B,onExport:G}},[m,g,y,v,b,x,w,E,C,I,T,_,P,M,D,V,L,B,G]),k(VH.Provider,{value:H,children:k(X$e,{id:j,autofocus:r,showPages:o,showMenu:i,showStyles:l,showZoom:s,showTools:a,showUI:c,showSponsorLink:d,isErebus:p,readOnly:u},j||"Tldraw")})}const X$e=h.exports.memo(function({id:t,autofocus:n,showPages:r,showMenu:i,showZoom:o,showStyles:a,showTools:s,showSponsorLink:l,readOnly:c,showUI:u,isErebus:d}){var R,W,X,te;const f=at(),p=h.exports.useRef(null),m=f.useStore(),{document:g,settings:y,appState:v,room:b,canEdit:x}=m,w=m.appState.activeTool==="select",E=m.appState.isLoading,C=g.pages[v.currentPageId],I=g.pageStates[C.id],T=g.assets,{selectedIds:_}=I,P=_.length===1&&C.shapes[_[0]]&&Q.getShapeUtil(C.shapes[_[0]].type).hideBounds,M=_.length===1&&C.shapes[_[0]]&&Q.getShapeUtil(C.shapes[_[0]].type).hideResizeHandles,D=h.exports.useMemo(()=>({isDarkMode:y.isDarkMode}),[y.isDarkMode]),V=h.exports.useMemo(()=>({}),[y.isDarkMode]),B=f.session!==void 0,L=B&&((R=f.session)==null?void 0:R.constructor.name)!=="BrushSession"||!w||P||!!I.editingId,G=B||!w,z=B&&m.appState.status!==bn.Brushing||!w,j=B||!w||!y.showCloneHandles||I.camera.zoom<.2,[F,H]=h.exports.useState((X=(W=m.document.userSettings)==null?void 0:W.DANGEROUSLY_SET_CSS)!=null?X:{});return h.exports.useEffect(()=>{var ne,ie,ae,le,he,Se,pe;let re={};if(c)re={...(ne=m.document.userSettings)==null?void 0:ne.DANGEROUSLY_SET_CSS,position:"relative",height:"100%",flexGrow:"1",minHeight:"500px",maxHeight:"620px"};else{const st=(Se=(he=(ae=(ie=m.document.userSettings)==null?void 0:ie.DANGEROUSLY_SET_CSS)==null?void 0:ae.background)!=null?he:(le=m.document.userSettings)==null?void 0:le.tlCanvasBackground)!=null?Se:"unset";re={...(pe=m.document.userSettings)==null?void 0:pe.DANGEROUSLY_SET_CSS,background:st},re.background==="unset"&&(re.background=y.isDarkMode?"black":"white")}H(re)},[m.document.userSettings,c,y.isDarkMode,H]),Z(Q$e,{usage:d?"erebus":"default",ref:p,tabIndex:-0,css:F,className:(y.isDarkMode?q8e:"")+" DANGEROUSLY_SET_CSS",children:[k(yRe,{}),k(Z$e,{focusableRef:p,autofocus:n}),k(oEe,{children:k(S4e,{id:t,containerRef:p,shapeUtils:js,page:C,pageState:I,assets:T,snapLines:v.snapLines,grid:uu,users:b==null?void 0:b.users,userId:b==null?void 0:b.userId,theme:V,meta:D,hideBounds:L,hideHandles:G,hideResizeHandles:M,hideIndicators:z,hideBindingHandles:!0,hideCloneHandles:j,hideRotateHandles:!y.showRotateHandles,hideGrid:!y.showGrid,performanceMode:(te=f.session)==null?void 0:te.performanceMode,onPinchStart:f.onPinchStart,onPinchEnd:f.onPinchEnd,onPinch:f.onPinch,onPan:f.onPan,onZoom:f.onZoom,onPointerDown:f.onPointerDown,onPointerMove:f.onPointerMove,onPointerUp:f.onPointerUp,onPointCanvas:f.onPointCanvas,onDoubleClickCanvas:f.onDoubleClickCanvas,onRightPointCanvas:f.onRightPointCanvas,onDragCanvas:f.onDragCanvas,onReleaseCanvas:f.onReleaseCanvas,onPointShape:f.onPointShape,onDoubleClickShape:f.onDoubleClickShape,onRightPointShape:f.onRightPointShape,onDragShape:f.onDragShape,onHoverShape:f.onHoverShape,onUnhoverShape:f.onUnhoverShape,onReleaseShape:f.onReleaseShape,onPointBounds:f.onPointBounds,onDoubleClickBounds:f.onDoubleClickBounds,onRightPointBounds:f.onRightPointBounds,onDragBounds:f.onDragBounds,onHoverBounds:f.onHoverBounds,onUnhoverBounds:f.onUnhoverBounds,onReleaseBounds:f.onReleaseBounds,onPointBoundsHandle:f.onPointBoundsHandle,onDoubleClickBoundsHandle:f.onDoubleClickBoundsHandle,onRightPointBoundsHandle:f.onRightPointBoundsHandle,onDragBoundsHandle:f.onDragBoundsHandle,onHoverBoundsHandle:f.onHoverBoundsHandle,onUnhoverBoundsHandle:f.onUnhoverBoundsHandle,onReleaseBoundsHandle:f.onReleaseBoundsHandle,onPointHandle:f.onPointHandle,onDoubleClickHandle:f.onDoubleClickHandle,onRightPointHandle:f.onRightPointHandle,onDragHandle:f.onDragHandle,onHoverHandle:f.onHoverHandle,onUnhoverHandle:f.onUnhoverHandle,onReleaseHandle:f.onReleaseHandle,onError:f.onError,onRenderCountChange:f.onRenderCountChange,onShapeChange:f.onShapeChange,onShapeBlur:f.onShapeBlur,onShapeClone:f.onShapeClone,onBoundsChange:f.updateBounds,onKeyDown:f.onKeyDown,onKeyUp:f.onKeyUp,onDragOver:f.onDragOver,onDrop:f.onDrop})}),u&&k(J$e,{children:y.isFocusMode?k(fEe,{onSelect:f.toggleFocusMode}):Z(Pe,{children:[k(zLe,{readOnly:c,showPages:r,showMenu:i,showStyles:a,showZoom:o,showSponsorLink:l,canEdit:x}),k(eFe,{}),s&&!c&&!E&&k(XRe,{}),k(q$e,{})]})})]})}),Z$e=h.exports.memo(function({focusableRef:t,autofocus:n}){return f7e(t),p7e(),h.exports.useEffect(()=>{var r;n&&((r=t.current)==null||r.focus())},[n]),null}),Q$e=be("div",{variants:{usage:{erebus:{position:"unset",flexGrow:1,minHeight:"100%",minWidth:"100%"},default:{position:"absolute",height:"100%",width:"100%",minHeight:"100%",minWidth:"100%",maxHeight:"100%",maxWidth:"100%",overflow:"hidden",boxSizing:"border-box",outline:"none"}}},"& .tl-container":{position:"absolute",top:0,left:0,height:"100%",width:"100%",zIndex:1,backgroundColor:"unset !important"},"& input, textarea, button, select, label, button":{webkitTouchCallout:"none",webkitUserSelect:"none","-webkit-tap-highlight-color":"transparent","tap-highlight-color":"transparent"}}),J$e=be("div",{position:"absolute",top:0,left:0,height:"100%",width:"100%",padding:"8px 8px 0 8px",display:"flex",alignItems:"flex-start",justifyContent:"flex-start",pointerEvents:"none",zIndex:2,"& > *":{pointerEvents:"all "}}),eFe=be("div",{flexGrow:2}),tFe={connectionState:"disconnected"},aU=us({name:"connection",initialState:tFe,reducers:{updateConnection:(e,t)=>{e.connectionState=t.payload}}}),{updateConnection:nFe}=aU.actions;var rFe=aU.reducer;class A8{constructor(t,n){this.erebusEmbedded=t,this.cb=n}goBack(t){var n;try{if(!this.erebusEmbedded){t();return}if(!((n=this.cb)!=null&&n.goBackCb))throw Error("No goBack cb done");return this.cb.goBackCb(),!0}catch(r){return lt.error("[ErebusService] goBack",{error:r}),!1}}invalidate(t){var n;try{if(!this.erebusEmbedded){t();return}if(!((n=this.cb)!=null&&n.invalidateCb))throw Error("No invalidate cb done");return this.cb.invalidateCb(),!0}catch(r){return lt.error("[ErebusService] invalidate",{error:r}),!1}}}function iFe(e,t,n,r,i=new A8){let{data:o,error:a,refetch:s}=d5e({userId:t,canvasId:e,serverUrl:n});const[l,c]=h.exports.useState(),[u,d]=h.exports.useState(),[f,p]=h.exports.useState(),m=b6(),g=R=>m(nFe(R)),y=l==null?void 0:l.state.document.title,v=h.exports.useCallback(R=>{y&&y!==""&&R!==y&&i.invalidate(()=>{lt.info("If connected to erebus it should invalidate because the title changed",{docTitle:y,newTitle:R})})},[y,i]),[b,x]=h.exports.useState(!0),[w,E]=h.exports.useState(),[C,I]=h.exports.useState(!1),T=Ez(w,uo.app.socketInterval);h.exports.useEffect(()=>{l==null||l.updateWaUserSettings({DANGEROUSLY_SET_CSS:{cursor:"unset"}})},[]),h.exports.useEffect(()=>{T&&u&&(v(T.title),u.emit(M4.toServer,T),lt.debug("[SOCKET HOOK] stateSentToServer",{state:JSON.parse(JSON.stringify(T))}),g("updating"),lt.info("[socketio] Updated Backend with new state"))},[T,u,v]),h.exports.useEffect(()=>{var R,W,X,te,re,ne;if(a&&(p(f),console.error(a),x(!1),t&&!C&&(s(),I(!0))),o){const ie=o.title,ae=o.state,le=o.subscribergroups,he=o.serverVersion;if(he&&lt.info(`v: ${he} \u{1F5A5}`),iBe(ie,ae,le)){const pe={state:ae,subscribergroups:le,name:ie};l!=null&&l.updateDocumentBasics(pe)||((R=window.app)==null||R.updateDocumentBasics(pe))}if((W=o.author)!=null&&W.id){const pe=((X=o.author)==null?void 0:X.id)===t;l!=null&&l.setCanEdit(pe)||((te=window.app)==null||te.setCanEdit(pe))}let Se;if(typeof o.data=="string")if(o.data==="")console.log({isFirstTime:r,data:o.data}),_(NW),g("fresh"),x(!1);else{Se=JSON.parse(o.data),_({...Se,name:Se.title},!0);let pe=Se.settings;pe&&(pe={...pe,isDarkMode:!1},l!=null&&l.replaceSetting(pe)||((re=window.app)==null||re.replaceSetting(pe))),g("fresh"),x(!1)}else if(typeof o.data=="object"){Se=o.data,_({...o.data,name:Se.title},!0);let pe=Se.settings;pe&&(pe={...pe,isDarkMode:!1},l!=null&&l.replaceSetting(pe)||((ne=window.app)==null||ne.replaceSetting(pe))),g("fresh"),x(!1)}else console.error("cant load")}},[o,a,t,r]);const _=(R,W)=>{var X,te;try{if(!l&&!(window!=null&&window.app))throw Error("App not defined");if(!d7e(R))console.error("Not valid document"+JSON.stringify(R));else if(W)l!=null&&l.updateDocument(R)||((X=window.app)==null||X.updateDocument(R)),g("fresh");else{const{assets:re,pages:{page:{shapes:ne,bindings:ie}}}=R;l!=null&&l.replacePageContent(ne,ie,re)||((te=window.app)==null||te.replacePageContent(ne,ie,re)),g("fresh")}}catch(re){console.error(re)}};A.useEffect(()=>{if(!b)if(u)console.log("[SOCKET HOOK] - No active Socket");else{const R=Pg(n,{withCredentials:!0,extraHeaders:{"my-custom-header":"true"},rejectUnauthorized:!1});d(R),R.onAny(W=>{lt.info("[socketio] On Any",W)}),R.on("connect",()=>{lt.info(`[socketio] Connected and entered room - ${e}`),R.emit(M4.enterRoom,e,t)}),R.on("connect_error",W=>{console.error("[socketio] Error when connecting"+W.message),g("disconnected")}),R.on(O4.informNewUserJoinedRoom,W=>{lt.info("[socketio] New User entered"+W)}),R.on(O4.informCanvasState,W=>{lt.info("[socketio] Server Informed state"+W),g(W)}),R.on("disconnect",()=>{g("disconnected")})}},[o,b,u,l]);const P=A.useCallback(R=>{R.loadRoom(e),window.app=R,c(R)},[e]),M=R=>{F(R)},D=A.useCallback(async R=>{var W;(W=R.openAsset)==null||W.call(R)},[]),V=A.useCallback((R,W)=>{},[]),B=(R,W)=>{["updateWaUserSettings","updateCanvasSettings"].some(X=>X===W)&&F(R),H(R)},L=(R,W)=>{H(R)},G=(R,W)=>{W&&/settings:*/.test(W)&&F(R)},[z,j]=h.exports.useState();function F(R){if(R||c(R),!u&&!b)console.error("[socketio] No Socket when trying to update the backend");else{const W={...R.document,id:e,uuid:e,title:R.document.name,settings:R==null?void 0:R.settings};E(W)}}function H(R,W){uo.isProduction||(z&&Iz.exports.getDiff(JSON.parse(UP(R.document)),z),j(JSON.parse(UP(R.document))))}return{onPatch:L,onChange:G,onMount:P,onChangePage:M,onCommand:B,onChangePresence:V,onOpenMedia:D,isLoading:b}}class sU{constructor(t,n,r=new A8){S(this,"headers");S(this,"baseUrl");this.erebus=r,this.headers=new Headers,this.headers.append("token",t),this.headers.append("x-user-token",t),this.headers.set("mode","no-cors"),this.headers.set("Content-Type","application/json"),this.baseUrl=n}genericGetFunction(t){return r=>r?fetch(`${this.baseUrl}/api/${t}?id=`+r,{method:"GET",headers:this.headers,redirect:"manual"}).then(i=>i.json()).catch(i=>{lt.warning("error",i)}):(console.error("No id"),Promise.resolve(void 0))}getImages(t){return this.genericGetFunction("image")(t)}getMap(t){return this.genericGetFunction("map")(t)}getTimeline(t){return this.genericGetFunction("timeline")(t)}getSecret(t){return this.genericGetFunction("secret")(t)}getCategory(t){return this.genericGetFunction("category")(t)}getExternalCanvas(t){return this.genericGetFunction("canvas")(t)}getNote(t){return this.genericGetFunction("notes")(t)}getStatBlock(t){return this.genericGetFunction("block")(t)}getEvent(t){return this.genericGetFunction("history")(t)}getWorld(t){return this.genericGetFunction("world")(t)}postSearch(t){const{worldId:n,term:r}=t;return fetch(this.baseUrl+"/api/world/search?"+new URLSearchParams({id:n}),{method:"post",body:JSON.stringify({term:r}),headers:this.headers})}deleteCanvas(t){return fetch(`${this.baseUrl}/api/canvas?id=`+t,{method:"delete",headers:this.headers,redirect:"manual"}).then(n=>(this.erebus.goBack(()=>window.location.replace(window.location.origin)),n.json())).catch(n=>{lt.warning("error",n)})}}const oFe={userId:"",canvasId:"",worldId:"",serverUrl:"",subscriberGroups:[],api:void 0},lU=us({name:"user",initialState:oFe,reducers:{updateAvailableSubscriberGroups:(e,t)=>{e.subscriberGroups=t.payload},updateUserData:(e,t)=>{e.canvasId=t.payload.canvasId,e.worldId=t.payload.worldId,e.userId=t.payload.userId,e.serverUrl=t.payload.serverUrl,e.api=new sU(t.payload.userId,t.payload.serverUrl)}}}),{updateUserData:aFe,updateAvailableSubscriberGroups:sFe}=lU.actions;var lFe=lU.reducer;const cFe=abe({reducer:{user:lFe,connection:rFe,[Ig.reducerPath]:Ig.reducer},middleware:e=>e({serializableCheck:!1}).concat(Ig.middleware)}),cU=e=>{const{canvasId:t,userId:n,worldId:r,serverUrl:i,readonly:o,erebusEmbedded:a}=e,[s,l]=A.useState(!1),c=new A8(e.erebusEmbedded,e.callbacks),u=iFe(t,n,i,s,c),d=()=>l(!0),f=new sU(n,i,c),p=b6();return h.exports.useEffect(()=>{p(aFe({userId:n,canvasId:t,worldId:r,serverUrl:i})),Promise.all([f.getWorld(r).then(m=>{var g;return p(sFe((g=m==null?void 0:m.subscribergroups)!=null?g:[]))}).catch(m=>{lt.error("problems_getting_world_subscriber_groups",m)}),f.postSearch({worldId:r,term:""}).then(m=>m.json()).then(m=>{m&&(console.log("User has not worked with whiteboards,adding default whiteboard "),d())}).catch(m=>{})]),lt.debug("initialization",{env:uo}),lt.info(`v: ${uo.app.version} \u{1F4BB}`)},[]),Z(_e,{className:"tldraw-container",style:a?{minWidth:"100%",minHeight:"100%",display:"flex"}:{position:o?"unset":"fixed",top:"0px",left:"0px",right:"0px",bottom:"0px",width:"100%",height:"100%"},children:[k(tDe,{}),k(Y$e,{...u,id:t,showMenu:!0,disableAssets:!0,showPages:!1,isErebus:a,readOnly:o})]})};cU.defaultProps={readonly:!1,callbacks:void 0};const uFe=e=>k(I2e,{store:cFe,children:k(cU,{...e})});try{if(zx)WN(zx).render(k(A.StrictMode,{children:k(jye,{theme:UN,children:k(uFe,{erebusEmbedded:Hx,canvasId:Ym!=null?Ym:"",worldId:Xm!=null?Xm:"",userId:Zm!=null?Zm:"",serverUrl:Fu!=null?Fu:"",readonly:jx})})})),Hx||Vye(jx),console.log("[PHIDIAS] Injected");else throw Error("[Phidias] No rootElement")}catch(e){console.error("[Phidias] Can't load",{error:e})}console.log("[PHIDIAS] Called | executed");// @license © 2020 Google LLC. Licensed under the Apache License, Version 2.0.
var dFe=async(e=[{}])=>(Array.isArray(e)||(e=[e]),new Promise((t,n)=>{const r=document.createElement("input");r.type="file";const i=[...e.map(l=>l.mimeTypes||[]).join(),e.map(l=>l.extensions||[]).join()].join();r.multiple=e[0].multiple||!1,r.accept=i||"";const o=()=>s(n),a=l=>{typeof s=="function"&&s(),t(l)},s=e[0].legacySetup&&e[0].legacySetup(a,o,r);r.addEventListener("change",()=>{a(r.multiple?Array.from(r.files):r.files[0])}),r.click()})),fFe=Object.freeze(Object.defineProperty({__proto__:null,default:dFe},Symbol.toStringTag,{value:"Module"}));// @license © 2020 Google LLC. Licensed under the Apache License, Version 2.0.
const pFe=async e=>{const t=await e.getFile();return t.handle=e,t};var hFe=async(e=[{}])=>{Array.isArray(e)||(e=[e]);const t=[];e.forEach((i,o)=>{t[o]={description:i.description||"",accept:{}},i.mimeTypes?i.mimeTypes.map(a=>{t[o].accept[a]=i.extensions||[]}):t[o].accept["*/*"]=i.extensions||[]});const n=await window.showOpenFilePicker({id:e[0].id,startIn:e[0].startIn,types:t,multiple:e[0].multiple||!1,excludeAcceptAllOption:e[0].excludeAcceptAllOption||!1}),r=await Promise.all(n.map(pFe));return e[0].multiple?r:r[0]},mFe=Object.freeze(Object.defineProperty({__proto__:null,default:hFe},Symbol.toStringTag,{value:"Module"}));// @license © 2020 Google LLC. Licensed under the Apache License, Version 2.0.
var gFe=async(e=[{}])=>(Array.isArray(e)||(e=[e]),e[0].recursive=e[0].recursive||!1,new Promise((t,n)=>{const r=document.createElement("input");r.type="file",r.webkitdirectory=!0;const i=()=>a(n),o=s=>{typeof a=="function"&&a(),t(s)},a=e[0].legacySetup&&e[0].legacySetup(o,i,r);r.addEventListener("change",()=>{let s=Array.from(r.files);e[0].recursive?e[0].recursive&&e[0].skipDirectory&&(s=s.filter(l=>l.webkitRelativePath.split("/").every(u=>!e[0].skipDirectory({name:u,kind:"directory"})))):s=s.filter(l=>l.webkitRelativePath.split("/").length===2),o(s)}),r.click()})),vFe=Object.freeze(Object.defineProperty({__proto__:null,default:gFe},Symbol.toStringTag,{value:"Module"}));// @license © 2020 Google LLC. Licensed under the Apache License, Version 2.0.
const uU=async(e,t,n=e.name,r)=>{const i=[],o=[];for(const a of e.values()){const s=`${n}/${a.name}`;a.kind==="file"?o.push(await a.getFile().then(l=>(l.directoryHandle=e,Object.defineProperty(l,"webkitRelativePath",{configurable:!0,enumerable:!0,get:()=>s})))):a.kind==="directory"&&t&&(!r||!r(a))&&i.push(await uU(a,t,s,r))}return[...(await Promise.all(i)).flat(),...await Promise.all(o)]};var yFe=async(e={})=>{e.recursive=e.recursive||!1;const t=await window.showDirectoryPicker({id:e.id,startIn:e.startIn});return uU(t,e.recursive,void 0,e.skipDirectory)},bFe=Object.freeze(Object.defineProperty({__proto__:null,default:yFe},Symbol.toStringTag,{value:"Module"}));// @license © 2020 Google LLC. Licensed under the Apache License, Version 2.0.
var xFe=async(e,t={})=>{Array.isArray(t)&&(t=t[0]);const n=document.createElement("a");let r=e;"body"in e&&(r=await SFe(e.body,e.headers.get("content-type"))),n.download=t.fileName||"Untitled",n.href=URL.createObjectURL(r);const i=()=>a(reject),o=()=>{typeof a=="function"&&a()},a=t.legacySetup&&t.legacySetup(o,i,n);return n.addEventListener("click",()=>{setTimeout(()=>URL.revokeObjectURL(n.href),30*1e3),o()}),n.click(),null};async function SFe(e,t){const n=e.getReader(),r=new ReadableStream({start(o){return a();async function a(){return n.read().then(({done:s,value:l})=>{if(s){o.close();return}return o.enqueue(l),a()})}}}),i=new Response(r);return n.releaseLock(),new Blob([await i.blob()],{type:t})}var wFe=Object.freeze(Object.defineProperty({__proto__:null,default:xFe},Symbol.toStringTag,{value:"Module"}));// @license © 2020 Google LLC. Licensed under the Apache License, Version 2.0.
var CFe=async(e,t=[{}],n=null,r=!1)=>{Array.isArray(t)||(t=[t]),t[0].fileName=t[0].fileName||"Untitled";const i=[];if(t.forEach((s,l)=>{i[l]={description:s.description||"",accept:{}},s.mimeTypes?(l===0&&(e.type?s.mimeTypes.push(e.type):e.headers&&e.headers.get("content-type")&&s.mimeTypes.push(e.headers.get("content-type"))),s.mimeTypes.map(c=>{i[l].accept[c]=s.extensions||[]})):e.type&&(i[l].accept[e.type]=s.extensions||[])}),n)try{await n.getFile()}catch(s){if(n=null,r)throw s}const o=n||await window.showSaveFilePicker({suggestedName:t[0].fileName,id:t[0].id,startIn:t[0].startIn,types:i,excludeAcceptAllOption:t[0].excludeAcceptAllOption||!1}),a=await o.createWritable();return"stream"in e?(await e.stream().pipeTo(a),o):"body"in e?(await e.body.pipeTo(a),o):(await a.write(blob),await a.close(),o)},kFe=Object.freeze(Object.defineProperty({__proto__:null,default:CFe},Symbol.toStringTag,{value:"Module"}))});export default EFe();
