34 lines
99 KiB
JavaScript
34 lines
99 KiB
JavaScript
var ys=Object.defineProperty;var ms=(e,t,n)=>t in e?ys(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var yt=(e,t,n)=>ms(e,typeof t!="symbol"?t+"":t,n);import{a as rr,r as p,g as gs,b as _s}from"./react-vendor-C_od1ZSF.js";function Ai(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ai(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function xa(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ai(e))&&(r&&(r+=" "),r+=t);return r}function Ln(e){return e==="__proto__"}function Ni(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}function ir(e){var t;return typeof e=="string"||typeof e=="symbol"?e:Object.is((t=e==null?void 0:e.valueOf)==null?void 0:t.call(e),-0)?"-0":String(e)}function Ci(e){if(e==null)return"";if(typeof e=="string")return e;if(Array.isArray(e))return e.map(Ci).join(",");const t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}function or(e){if(Array.isArray(e))return e.map(ir);if(typeof e=="symbol")return[e];e=Ci(e);const t=[],n=e.length;if(n===0)return t;let r=0,i="",o="",s=!1;for(e.charCodeAt(0)===46&&t.push("");r<n;){const c=e[r];if(o)c==="\\"&&r+1<n?(r++,i+=e[r]):c===o?o="":i+=c;else if(s)c==='"'||c==="'"?o=c:c==="]"?(s=!1,t.push(i),i=""):i+=c;else if(c==="[")s=!0,i&&(t.push(i),i="");else if(c==="."){i&&(t.push(i),i="");const u=e[r+1];(u===void 0||u===".")&&t.push("")}else i+=c;r++}return i&&t.push(i),t}function sr(e,t,n){if(e==null)return n;switch(typeof t){case"string":{if(Ln(t))return n;const r=e[t];return r===void 0?Ni(t)?sr(e,or(t),n):n:r}case"number":case"symbol":{typeof t=="number"&&(t=ir(t));const r=e[t];return r===void 0?n:r}default:{if(Array.isArray(t))return ws(e,t,n);if(Object.is(t==null?void 0:t.valueOf(),-0)?t="-0":t=String(t),Ln(t))return n;const r=e[t];return r===void 0?n:r}}}function ws(e,t,n){if(t.length===0)return n;let r=e;for(let i=0;i<t.length;i++){if(r==null||Ln(t[i]))return n;r=r[t[i]]}return r===void 0?n:r}function vs(e,t){const n=new Map;for(let r=0;r<e.length;r++){const i=e[r],o=t(i,r,e);n.has(o)||n.set(o,i)}return Array.from(n.values())}function Es(e,t){return function(...n){return e.apply(this,n.slice(0,t))}}function Mi(e){return e}function bs(e){return function(t){return sr(t,e)}}function Tn(e){return e==null||typeof e!="object"&&typeof e!="function"}function Ss(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ps(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function cr(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Os="[object RegExp]",Ii="[object String]",Li="[object Number]",Ti="[object Boolean]",Di="[object Arguments]",xs="[object Symbol]",Rs="[object Date]",As="[object Map]",Ns="[object Set]",Cs="[object Array]",Ms="[object ArrayBuffer]",Is="[object Object]",Ls="[object DataView]",Ts="[object Uint8Array]",Ds="[object Uint8ClampedArray]",ks="[object Uint16Array]",$s="[object Uint32Array]",Fs="[object Int8Array]",Ws="[object Int16Array]",zs="[object Int32Array]",Us="[object Float32Array]",Bs="[object Float64Array]",Mr=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function js(e){return typeof Mr.Buffer<"u"&&Mr.Buffer.isBuffer(e)}function qs(e,t){return Re(e,void 0,e,new Map,t)}function Re(e,t,n,r=new Map,i=void 0){const o=i==null?void 0:i(e,t,n,r);if(o!==void 0)return o;if(Tn(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){const s=new Array(e.length);r.set(e,s);for(let c=0;c<e.length;c++)s[c]=Re(e[c],c,n,r,i);return Object.hasOwn(e,"index")&&(s.index=e.index),Object.hasOwn(e,"input")&&(s.input=e.input),s}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const s=new RegExp(e.source,e.flags);return s.lastIndex=e.lastIndex,s}if(e instanceof Map){const s=new Map;r.set(e,s);for(const[c,u]of e)s.set(c,Re(u,c,n,r,i));return s}if(e instanceof Set){const s=new Set;r.set(e,s);for(const c of e)s.add(Re(c,void 0,n,r,i));return s}if(js(e))return e.subarray();if(Ss(e)){const s=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,s);for(let c=0;c<e.length;c++)s[c]=Re(e[c],c,n,r,i);return s}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const s=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,s),se(s,e,n,r,i),s}if(typeof File<"u"&&e instanceof File){const s=new File([e],e.name,{type:e.type});return r.set(e,s),se(s,e,n,r,i),s}if(typeof Blob<"u"&&e instanceof Blob){const s=new Blob([e],{type:e.type});return r.set(e,s),se(s,e,n,r,i),s}if(e instanceof Error){const s=structuredClone(e);return r.set(e,s),s.message=e.message,s.name=e.name,s.stack=e.stack,s.cause=e.cause,s.constructor=e.constructor,se(s,e,n,r,i),s}if(e instanceof Boolean){const s=new Boolean(e.valueOf());return r.set(e,s),se(s,e,n,r,i),s}if(e instanceof Number){const s=new Number(e.valueOf());return r.set(e,s),se(s,e,n,r,i),s}if(e instanceof String){const s=new String(e.valueOf());return r.set(e,s),se(s,e,n,r,i),s}if(typeof e=="object"&&Vs(e)){const s=Object.create(Object.getPrototypeOf(e));return r.set(e,s),se(s,e,n,r,i),s}return e}function se(e,t,n=e,r,i){const o=[...Object.keys(t),...Ps(t)];for(let s=0;s<o.length;s++){const c=o[s],u=Object.getOwnPropertyDescriptor(e,c);(u==null||u.writable)&&(e[c]=Re(t[c],c,n,r,i))}}function Vs(e){switch(cr(e)){case Di:case Cs:case Ms:case Ls:case Ti:case Rs:case Us:case Bs:case Fs:case Ws:case zs:case As:case Li:case Is:case Os:case Ns:case Ii:case xs:case Ts:case Ds:case ks:case $s:return!0;default:return!1}}function Xs(e){return Re(e,void 0,e,new Map,void 0)}function Et(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function ki(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function $i(e,t,n){return typeof n!="function"?$i(e,t,()=>{}):Dn(e,t,function r(i,o,s,c,u,a){const f=n(i,o,s,c,u,a);return f!==void 0?!!f:Dn(i,o,r,a,!1)},new Map,!0)}function Dn(e,t,n,r,i=!1){if(t===e)return!0;switch(typeof t){case"object":return Hs(e,t,n,r);case"function":return Object.keys(t).length>0?Dn(e,{...t},n,r,i):Et(e,t);default:return ki(e)&&i?typeof t=="string"?t==="":!0:Et(e,t)}}function Hs(e,t,n,r){if(t==null)return!0;if(Array.isArray(t))return Fi(e,t,n,r);if(t instanceof Map)return Ys(e,t,n,r);if(t instanceof Set)return Ks(e,t,n,r);const i=Object.keys(t);if(e==null||Tn(e))return i.length===0;if(i.length===0)return!0;if(r!=null&&r.has(t))return r.get(t)===e;r==null||r.set(t,e);try{for(let o=0;o<i.length;o++){const s=i[o];if(!Tn(e)&&!(s in e)||t[s]===void 0&&e[s]!==void 0||t[s]===null&&e[s]!==null||!n(e[s],t[s],s,e,t,r))return!1}return!0}finally{r==null||r.delete(t)}}function Ys(e,t,n,r){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(const[i,o]of t.entries())if(n(e.get(i),o,i,e,t,r)===!1)return!1;return!0}function Fi(e,t,n,r){if(t.length===0)return!0;if(!Array.isArray(e))return!1;const i=new Set;for(let o=0;o<t.length;o++){const s=t[o];let c=!1;for(let u=0;u<e.length;u++){if(i.has(u))continue;const a=e[u];let f=!1;if(n(a,s,o,e,t,r)&&(f=!0),f){i.add(u),c=!0;break}}if(!c)return!1}return!0}function Ks(e,t,n,r){return t.size===0?!0:e instanceof Set?Fi([...e],[...t],n,r):!1}function Wi(e,t){return $i(e,t,()=>{})}function Gs(e){return e=Xs(e),t=>Wi(t,e)}function Zs(e,t){return qs(e,(n,r,i,o)=>{if(typeof e=="object"){if(cr(e)==="[object Object]"&&typeof e.constructor!="function"){const s={};return o.set(e,s),se(s,e,i,o),s}switch(Object.prototype.toString.call(e)){case Li:case Ii:case Ti:{const s=new e.constructor(e==null?void 0:e.valueOf());return se(s,e),s}case Di:{const s={};return se(s,e),s.length=e.length,s[Symbol.iterator]=e[Symbol.iterator],s}default:return}}})}function Js(e){return Zs(e)}const Qs=/^(?:0|[1-9]\d*)$/;function zi(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return Qs.test(e)}}function ec(e){return e!==null&&typeof e=="object"&&cr(e)==="[object Arguments]"}function tc(e,t){let n;if(Array.isArray(t)?n=t:typeof t=="string"&&Ni(t)&&(e==null?void 0:e[t])==null?n=or(t):n=[t],n.length===0)return!1;let r=e;for(let i=0;i<n.length;i++){const o=n[i];if((r==null||!Object.hasOwn(r,o))&&!((Array.isArray(r)||ec(r))&&zi(o)&&o<r.length))return!1;r=r[o]}return!0}function nc(e,t){switch(typeof e){case"object":Object.is(e==null?void 0:e.valueOf(),-0)&&(e="-0");break;case"number":e=ir(e);break}return t=Js(t),function(n){const r=sr(n,e);return r===void 0?tc(n,e):t===void 0?r===void 0:Wi(r,t)}}function rc(e){if(e==null)return Mi;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?nc(e[0],e[1]):Gs(e);case"string":case"symbol":case"number":return bs(e)}}function ic(e){return Number.isSafeInteger(e)&&e>=0}function Ui(e){return e!=null&&typeof e!="function"&&ic(e.length)}function oc(e){return typeof e=="object"&&e!==null}function sc(e){return oc(e)&&Ui(e)}function Ra(e,t=Mi){return sc(e)?vs(Array.from(e),Es(rc(t),1)):[]}var an={exports:{}},ln={},dn={exports:{}},hn={};/**
|
|
* @license React
|
|
* use-sync-external-store-shim.production.js
|
|
*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/var Ir;function cc(){if(Ir)return hn;Ir=1;var e=rr();function t(l,m){return l===m&&(l!==0||1/l===1/m)||l!==l&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,s=e.useDebugValue;function c(l,m){var h=m(),y=r({inst:{value:h,getSnapshot:m}}),d=y[0].inst,g=y[1];return o(function(){d.value=h,d.getSnapshot=m,u(d)&&g({inst:d})},[l,h,m]),i(function(){return u(d)&&g({inst:d}),l(function(){u(d)&&g({inst:d})})},[l]),s(h),h}function u(l){var m=l.getSnapshot;l=l.value;try{var h=m();return!n(l,h)}catch{return!0}}function a(l,m){return m()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?a:c;return hn.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,hn}var Lr;function uc(){return Lr||(Lr=1,dn.exports=cc()),dn.exports}/**
|
|
* @license React
|
|
* use-sync-external-store-shim/with-selector.production.js
|
|
*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/var Tr;function fc(){if(Tr)return ln;Tr=1;var e=rr(),t=uc();function n(a,f){return a===f&&(a!==0||1/a===1/f)||a!==a&&f!==f}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,s=e.useEffect,c=e.useMemo,u=e.useDebugValue;return ln.useSyncExternalStoreWithSelector=function(a,f,l,m,h){var y=o(null);if(y.current===null){var d={hasValue:!1,value:null};y.current=d}else d=y.current;y=c(function(){function _(x){if(!E){if(E=!0,b=x,x=m(x),h!==void 0&&d.hasValue){var O=d.value;if(h(O,x))return w=O}return w=x}if(O=w,r(b,x))return O;var C=m(x);return h!==void 0&&h(O,C)?(b=x,O):(b=x,w=C)}var E=!1,b,w,v=l===void 0?null:l;return[function(){return _(f())},v===null?void 0:function(){return _(v())}]},[f,l,m,h]);var g=i(a,y[0],y[1]);return s(function(){d.hasValue=!0,d.value=g},[g]),u(g),g},ln}var Dr;function ac(){return Dr||(Dr=1,an.exports=fc()),an.exports}var Aa=ac();function lc(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function dc(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var kr=e=>Array.isArray(e)?e:[e];function hc(e){const t=Array.isArray(e[0])?e[0]:e;return dc(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function pc(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var yc=class{constructor(e){this.value=e}deref(){return this.value}},mc=()=>typeof WeakRef>"u"?yc:WeakRef,Bi=mc(),gc=0,$r=1;function mt(){return{s:gc,v:void 0,o:null,p:null}}function _c(e){return e instanceof Bi?e.deref():e}function ji(e,t={}){let n=mt();const{resultEqualityCheck:r}=t;let i,o=0;function s(){let c=n;const{length:u}=arguments;for(let l=0,m=u;l<m;l++){const h=arguments[l];if(typeof h=="function"||typeof h=="object"&&h!==null){let y=c.o;y===null&&(c.o=y=new WeakMap);const d=y.get(h);d===void 0?(c=mt(),y.set(h,c)):c=d}else{let y=c.p;y===null&&(c.p=y=new Map);const d=y.get(h);d===void 0?(c=mt(),y.set(h,c)):c=d}}const a=c;let f;if(c.s===$r)f=c.v;else if(f=e.apply(null,arguments),o++,r){const l=_c(i);l!=null&&r(l,f)&&(f=l,o!==0&&o--),i=typeof f=="object"&&f!==null||typeof f=="function"?new Bi(f):f}return a.s=$r,a.v=f,f}return s.clearCache=()=>{n=mt(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function wc(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,s=0,c,u={},a=i.pop();typeof a=="object"&&(u=a,a=i.pop()),lc(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const f={...n,...u},{memoize:l,memoizeOptions:m=[],argsMemoize:h=ji,argsMemoizeOptions:y=[]}=f,d=kr(m),g=kr(y),_=hc(i),E=l(function(){return o++,a.apply(null,arguments)},...d),b=h(function(){s++;const v=pc(_,arguments);return c=E.apply(null,v),c},...g);return Object.assign(b,{resultFunc:a,memoizedResultFunc:E,dependencies:_,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>c,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:l,argsMemoize:h})};return Object.assign(r,{withTypes:()=>r}),r}var Na=wc(ji);function vc(e,t=1){const n=[],r=Math.floor(t),i=(o,s)=>{for(let c=0;c<o.length;c++){const u=o[c];Array.isArray(u)&&s<r?i(u,s+1):n.push(u)}};return i(e,0),n}function kn(e,t,n){return ki(n)&&(typeof t=="number"&&Ui(n)&&zi(t)&&t<n.length||typeof t=="string"&&t in n)?Et(n[t],e):!1}function Fr(e){return typeof e=="symbol"?1:e===null?2:e===void 0?3:e!==e?4:0}const Ec=(e,t,n)=>{if(e!==t){const r=Fr(e),i=Fr(t);if(r===i&&r===0){if(e<t)return n==="desc"?1:-1;if(e>t)return n==="desc"?-1:1}return n==="desc"?i-r:r-i}return 0};function qi(e){return typeof e=="symbol"||e instanceof Symbol}const bc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sc=/^\w*$/;function Pc(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||qi(e)?!0:typeof e=="string"&&(Sc.test(e)||!bc.test(e))||t!=null}function Oc(e,t,n,r){if(e==null)return[];n=n,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(n)||(n=n==null?[]:[n]),n=n.map(c=>String(c));const i=(c,u)=>{let a=c;for(let f=0;f<u.length&&a!=null;++f)a=a[u[f]];return a},o=(c,u)=>u==null||c==null?u:typeof c=="object"&&"key"in c?Object.hasOwn(u,c.key)?u[c.key]:i(u,c.path):typeof c=="function"?c(u):Array.isArray(c)?i(u,c):typeof u=="object"?u[c]:u,s=t.map(c=>(Array.isArray(c)&&c.length===1&&(c=c[0]),c==null||typeof c=="function"||Array.isArray(c)||Pc(c)?c:{key:c,path:or(c)}));return e.map(c=>({original:c,criteria:s.map(u=>o(u,c))})).slice().sort((c,u)=>{for(let a=0;a<s.length;a++){const f=Ec(c.criteria[a],u.criteria[a],n[a]);if(f!==0)return f}return 0}).map(c=>c.original)}function Ca(e,...t){const n=t.length;return n>1&&kn(e,t[0],t[1])?t=[]:n>2&&kn(t[0],t[1],t[2])&&(t=[t[0]]),Oc(e,vc(t),["asc"])}function Y(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 xc=typeof Symbol=="function"&&Symbol.observable||"@@observable",Wr=xc,pn=()=>Math.random().toString(36).substring(7).split("").join("."),Rc={INIT:`@@redux/INIT${pn()}`,REPLACE:`@@redux/REPLACE${pn()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${pn()}`},Ot=Rc;function ur(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Vi(e,t,n){if(typeof e!="function")throw new Error(Y(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(Y(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Y(1));return n(Vi)(e,t)}let r=e,i=t,o=new Map,s=o,c=0,u=!1;function a(){s===o&&(s=new Map,o.forEach((g,_)=>{s.set(_,g)}))}function f(){if(u)throw new Error(Y(3));return i}function l(g){if(typeof g!="function")throw new Error(Y(4));if(u)throw new Error(Y(5));let _=!0;a();const E=c++;return s.set(E,g),function(){if(_){if(u)throw new Error(Y(6));_=!1,a(),s.delete(E),o=null}}}function m(g){if(!ur(g))throw new Error(Y(7));if(typeof g.type>"u")throw new Error(Y(8));if(typeof g.type!="string")throw new Error(Y(17));if(u)throw new Error(Y(9));try{u=!0,i=r(i,g)}finally{u=!1}return(o=s).forEach(E=>{E()}),g}function h(g){if(typeof g!="function")throw new Error(Y(10));r=g,m({type:Ot.REPLACE})}function y(){const g=l;return{subscribe(_){if(typeof _!="object"||_===null)throw new Error(Y(11));function E(){const w=_;w.next&&w.next(f())}return E(),{unsubscribe:g(E)}},[Wr](){return this}}}return m({type:Ot.INIT}),{dispatch:m,subscribe:l,getState:f,replaceReducer:h,[Wr]:y}}function Ac(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Ot.INIT})>"u")throw new Error(Y(12));if(typeof n(void 0,{type:Ot.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Y(13))})}function Nc(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const s=t[o];typeof e[s]=="function"&&(n[s]=e[s])}const r=Object.keys(n);let i;try{Ac(n)}catch(o){i=o}return function(s={},c){if(i)throw i;let u=!1;const a={};for(let f=0;f<r.length;f++){const l=r[f],m=n[l],h=s[l],y=m(h,c);if(typeof y>"u")throw c&&c.type,new Error(Y(14));a[l]=y,u=u||y!==h}return u=u||r.length!==Object.keys(s).length,u?a:s}}function xt(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Cc(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(Y(15))};const s={getState:i.getState,dispatch:(u,...a)=>o(u,...a)},c=e.map(u=>u(s));return o=xt(...c)(i.dispatch),{...i,dispatch:o}}}function Xi(e){return ur(e)&&"type"in e&&typeof e.type=="string"}var Hi=Symbol.for("immer-nothing"),zr=Symbol.for("immer-draftable"),Z=Symbol.for("immer-state");function ce(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ee=Object,ze=ee.getPrototypeOf,Rt="constructor",zt="prototype",$n="configurable",At="enumerable",bt="writable",Je="value",ge=e=>!!e&&!!e[Z];function fe(e){var t;return e?Yi(e)||Bt(e)||!!e[zr]||!!((t=e[Rt])!=null&&t[zr])||jt(e)||qt(e):!1}var Mc=ee[zt][Rt].toString(),Ur=new WeakMap;function Yi(e){if(!e||!fr(e))return!1;const t=ze(e);if(t===null||t===ee[zt])return!0;const n=ee.hasOwnProperty.call(t,Rt)&&t[Rt];if(n===Object)return!0;if(!Fe(n))return!1;let r=Ur.get(n);return r===void 0&&(r=Function.toString.call(n),Ur.set(n,r)),r===Mc}function Ut(e,t,n=!0){ot(e)===0?(n?Reflect.ownKeys(e):ee.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function ot(e){const t=e[Z];return t?t.type_:Bt(e)?1:jt(e)?2:qt(e)?3:0}var Br=(e,t,n=ot(e))=>n===2?e.has(t):ee[zt].hasOwnProperty.call(e,t),Fn=(e,t,n=ot(e))=>n===2?e.get(t):e[t],Nt=(e,t,n,r=ot(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function Ic(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var Bt=Array.isArray,jt=e=>e instanceof Map,qt=e=>e instanceof Set,fr=e=>typeof e=="object",Fe=e=>typeof e=="function",yn=e=>typeof e=="boolean";function Lc(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var pe=e=>e.copy_||e.base_,ar=e=>e.modified_?e.copy_:e.base_;function Wn(e,t){if(jt(e))return new Map(e);if(qt(e))return new Set(e);if(Bt(e))return Array[zt].slice.call(e);const n=Yi(e);if(t===!0||t==="class_only"&&!n){const r=ee.getOwnPropertyDescriptors(e);delete r[Z];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],c=r[s];c[bt]===!1&&(c[bt]=!0,c[$n]=!0),(c.get||c.set)&&(r[s]={[$n]:!0,[bt]:!0,[At]:c[At],[Je]:e[s]})}return ee.create(ze(e),r)}else{const r=ze(e);if(r!==null&&n)return{...e};const i=ee.create(r);return ee.assign(i,e)}}function lr(e,t=!1){return Vt(e)||ge(e)||!fe(e)||(ot(e)>1&&ee.defineProperties(e,{set:gt,add:gt,clear:gt,delete:gt}),ee.freeze(e),t&&Ut(e,(n,r)=>{lr(r,!0)},!1)),e}function Tc(){ce(2)}var gt={[Je]:Tc};function Vt(e){return e===null||!fr(e)?!0:ee.isFrozen(e)}var Ct="MapSet",zn="Patches",jr="ArrayMethods",Ki={};function Ce(e){const t=Ki[e];return t||ce(0,e),t}var qr=e=>!!Ki[e],Qe,Gi=()=>Qe,Dc=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:qr(Ct)?Ce(Ct):void 0,arrayMethodsPlugin_:qr(jr)?Ce(jr):void 0});function Vr(e,t){t&&(e.patchPlugin_=Ce(zn),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Un(e){Bn(e),e.drafts_.forEach(kc),e.drafts_=null}function Bn(e){e===Qe&&(Qe=e.parent_)}var Xr=e=>Qe=Dc(Qe,e);function kc(e){const t=e[Z];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Hr(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[Z].modified_&&(Un(t),ce(4)),fe(e)&&(e=Yr(t,e));const{patchPlugin_:i}=t;i&&i.generateReplacementPatches_(n[Z].base_,e,t)}else e=Yr(t,n);return $c(t,e,!0),Un(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Hi?e:void 0}function Yr(e,t){if(Vt(t))return t;const n=t[Z];if(!n)return Mt(t,e.handledSet_,e);if(!Xt(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:r}=n;if(r)for(;r.length>0;)r.pop()(e);Qi(n,e)}return n.copy_}function $c(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&lr(t,n)}function Zi(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Xt=(e,t)=>e.scope_===t,Fc=[];function Ji(e,t,n,r){const i=pe(e),o=e.type_;if(r!==void 0&&Fn(i,r,o)===t){Nt(i,r,n,o);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;Ut(i,(u,a)=>{if(ge(a)){const f=c.get(a)||[];f.push(u),c.set(a,f)}})}const s=e.draftLocations_.get(t)??Fc;for(const c of s)Nt(i,c,n,o)}function Wc(e,t,n){e.callbacks_.push(function(i){var c;const o=t;if(!o||!Xt(o,i))return;(c=i.mapSetPlugin_)==null||c.fixSetContents(o);const s=ar(o);Ji(e,o.draft_??o,s,n),Qi(o,i)})}function Qi(e,t){var r;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((r=e.assigned_)==null?void 0:r.size)??0)>0)){const{patchPlugin_:i}=t;if(i){const o=i.getPath(e);o&&i.generatePatches_(e,o,t)}Zi(e)}}function zc(e,t,n){const{scope_:r}=e;if(ge(n)){const i=n[Z];Xt(i,r)&&i.callbacks_.push(function(){St(e);const s=ar(i);Ji(e,n,s,t)})}else fe(n)&&e.callbacks_.push(function(){const o=pe(e);e.type_===3?o.has(n)&&Mt(n,r.handledSet_,r):Fn(o,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Mt(Fn(e.copy_,t,e.type_),r.handledSet_,r)})}function Mt(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||ge(e)||t.has(e)||!fe(e)||Vt(e)||(t.add(e),Ut(e,(r,i)=>{if(ge(i)){const o=i[Z];if(Xt(o,n)){const s=ar(o);Nt(e,r,s,e.type_),Zi(o)}}else fe(i)&&Mt(i,t,n)})),e}function Uc(e,t){const n=Bt(e),r={type_:n?1:0,scope_:t?t.scope_:Gi(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let i=r,o=It;n&&(i=[r],o=et);const{revoke:s,proxy:c}=Proxy.revocable(i,o);return r.draft_=c,r.revoke_=s,[c,r]}var It={get(e,t){if(t===Z)return e;let n=e.scope_.arrayMethodsPlugin_;const r=e.type_===1&&typeof t=="string";if(r&&n!=null&&n.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const i=pe(e);if(!Br(i,t,e.type_))return Bc(e,i,t);const o=i[t];if(e.finalized_||!fe(o)||r&&e.operationMethod&&(n!=null&&n.isMutatingArrayMethod(e.operationMethod))&&Lc(t))return o;if(o===mn(e.base_,t)){St(e);const s=e.type_===1?+t:t,c=qn(e.scope_,o,e,s);return e.copy_[s]=c}return o},has(e,t){return t in pe(e)},ownKeys(e){return Reflect.ownKeys(pe(e))},set(e,t,n){const r=eo(pe(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=mn(pe(e),t),o=i==null?void 0:i[Z];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(Ic(n,i)&&(n!==void 0||Br(e.base_,t,e.type_)))return!0;St(e),jn(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),zc(e,t,n)),!0},deleteProperty(e,t){return St(e),mn(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),jn(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=pe(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[bt]:!0,[$n]:e.type_!==1||t!=="length",[At]:r[At],[Je]:n[t]}},defineProperty(){ce(11)},getPrototypeOf(e){return ze(e.base_)},setPrototypeOf(){ce(12)}},et={};for(let e in It){let t=It[e];et[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}et.deleteProperty=function(e,t){return et.set.call(this,e,t,void 0)};et.set=function(e,t,n){return It.set.call(this,e[0],t,n,e[0])};function mn(e,t){const n=e[Z];return(n?pe(n):e)[t]}function Bc(e,t,n){var i;const r=eo(t,n);return r?Je in r?r[Je]:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function eo(e,t){if(!(t in e))return;let n=ze(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ze(n)}}function jn(e){e.modified_||(e.modified_=!0,e.parent_&&jn(e.parent_))}function St(e){e.copy_||(e.assigned_=new Map,e.copy_=Wn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var jc=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,r,i)=>{if(Fe(n)&&!Fe(r)){const s=r;r=n;const c=this;return function(a=s,...f){return c.produce(a,l=>r.call(this,l,...f))}}Fe(r)||ce(6),i!==void 0&&!Fe(i)&&ce(7);let o;if(fe(n)){const s=Xr(this),c=qn(s,n,void 0);let u=!0;try{o=r(c),u=!1}finally{u?Un(s):Bn(s)}return Vr(s,i),Hr(o,s)}else if(!n||!fr(n)){if(o=r(n),o===void 0&&(o=n),o===Hi&&(o=void 0),this.autoFreeze_&&lr(o,!0),i){const s=[],c=[];Ce(zn).generateReplacementPatches_(n,o,{patches_:s,inversePatches_:c}),i(s,c)}return o}else ce(1,n)},this.produceWithPatches=(n,r)=>{if(Fe(n))return(c,...u)=>this.produceWithPatches(c,a=>n(a,...u));let i,o;return[this.produce(n,r,(c,u)=>{i=c,o=u}),i,o]},yn(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),yn(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),yn(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){fe(t)||ce(8),ge(t)&&(t=qc(t));const n=Xr(this),r=qn(n,t,void 0);return r[Z].isManual_=!0,Bn(n),r}finishDraft(t,n){const r=t&&t[Z];(!r||!r.isManual_)&&ce(9);const{scope_:i}=r;return Vr(i,n),Hr(void 0,i)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let r;for(r=n.length-1;r>=0;r--){const o=n[r];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}r>-1&&(n=n.slice(r+1));const i=Ce(zn).applyPatches_;return ge(t)?i(t,n):this.produce(t,o=>i(o,n))}};function qn(e,t,n,r){const[i,o]=jt(t)?Ce(Ct).proxyMap_(t,n):qt(t)?Ce(Ct).proxySet_(t,n):Uc(t,n);return((n==null?void 0:n.scope_)??Gi()).drafts_.push(i),o.callbacks_=(n==null?void 0:n.callbacks_)??[],o.key_=r,n&&r!==void 0?Wc(n,o,r):o.callbacks_.push(function(u){var f;(f=u.mapSetPlugin_)==null||f.fixSetContents(o);const{patchPlugin_:a}=u;o.modified_&&a&&a.generatePatches_(o,[],u)}),i}function qc(e){return ge(e)||ce(10,e),to(e)}function to(e){if(!fe(e)||Vt(e))return e;const t=e[Z];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Wn(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Wn(e,!0);return Ut(n,(i,o)=>{Nt(n,i,to(o))},r),t&&(t.finalized_=!1),n}var Vc=new jc,no=Vc.produce;function ro(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var Xc=ro(),Hc=ro,Yc=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?xt:xt.apply(null,arguments)};function Ue(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(te(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Xi(r)&&r.type===e,n}var io=class Ze extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ze.prototype)}static get[Symbol.species](){return Ze}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ze(...t[0].concat(this)):new Ze(...t.concat(this))}};function Kr(e){return fe(e)?no(e,()=>{}):e}function _t(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Kc(e){return typeof e=="boolean"}var Gc=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let s=new io;return n&&(Kc(n)?s.push(Xc):s.push(Hc(n.extraArgument))),s},oo="RTK_autoBatch",Ia=()=>e=>({payload:e,meta:{[oo]:!0}}),Gr=e=>t=>{setTimeout(t,e)},Zc=(e,t)=>n=>{let r=!1;const i=()=>{r||(r=!0,cancelAnimationFrame(o),clearTimeout(s),n())},o=e(i),s=setTimeout(i,t)},Jc=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,s=!1;const c=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Zc(window.requestAnimationFrame,100):Gr(10):e.type==="callback"?e.queueNotification:Gr(e.timeout),a=()=>{s=!1,o&&(o=!1,c.forEach(f=>f()))};return Object.assign({},r,{subscribe(f){const l=()=>i&&f(),m=r.subscribe(l);return c.add(f),()=>{m(),c.delete(f)}},dispatch(f){var l;try{return i=!((l=f==null?void 0:f.meta)!=null&&l[oo]),o=!i,o&&(s||(s=!0,u(a))),r.dispatch(f)}finally{i=!0}}})},Qc=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new io(e);return r&&i.push(Jc(typeof r=="object"?r:void 0)),i};function La(e){const t=Gc(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{};let c;if(typeof n=="function")c=n;else if(ur(n))c=Nc(n);else throw new Error(te(1));let u;typeof r=="function"?u=r(t):u=t();let a=xt;i&&(a=Yc({trace:!1,...typeof i=="object"&&i}));const f=Cc(...u),l=Qc(f);let m=typeof s=="function"?s(l):l();const h=a(...m);return Vi(c,o,h)}function so(e){const t={},n=[];let r;const i={addCase(o,s){const c=typeof o=="string"?o:o.type;if(!c)throw new Error(te(28));if(c in t)throw new Error(te(29));return t[c]=s,i},addAsyncThunk(o,s){return s.pending&&(t[o.pending.type]=s.pending),s.rejected&&(t[o.rejected.type]=s.rejected),s.fulfilled&&(t[o.fulfilled.type]=s.fulfilled),s.settled&&n.push({matcher:o.settled,reducer:s.settled}),i},addMatcher(o,s){return n.push({matcher:o,reducer:s}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function eu(e){return typeof e=="function"}function tu(e,t){let[n,r,i]=so(t),o;if(eu(e))o=()=>Kr(e());else{const c=Kr(e);o=()=>c}function s(c=o(),u){let a=[n[u.type],...r.filter(({matcher:f})=>f(u)).map(({reducer:f})=>f)];return a.filter(f=>!!f).length===0&&(a=[i]),a.reduce((f,l)=>{if(l)if(ge(f)){const h=l(f,u);return h===void 0?f:h}else{if(fe(f))return no(f,m=>l(m,u));{const m=l(f,u);if(m===void 0){if(f===null)return f;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return f},c)}return s.getInitialState=o,s}var nu="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ru=(e=21)=>{let t="",n=e;for(;n--;)t+=nu[Math.random()*64|0];return t},iu=Symbol.for("rtk-slice-createasyncthunk");function ou(e,t){return`${e}/${t}`}function su({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[iu];return function(i){const{name:o,reducerPath:s=o}=i;if(!o)throw new Error(te(11));const c=(typeof i.reducers=="function"?i.reducers(uu()):i.reducers)||{},u=Object.keys(c),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(w,v){const x=typeof w=="string"?w:w.type;if(!x)throw new Error(te(12));if(x in a.sliceCaseReducersByType)throw new Error(te(13));return a.sliceCaseReducersByType[x]=v,f},addMatcher(w,v){return a.sliceMatchers.push({matcher:w,reducer:v}),f},exposeAction(w,v){return a.actionCreators[w]=v,f},exposeCaseReducer(w,v){return a.sliceCaseReducersByName[w]=v,f}};u.forEach(w=>{const v=c[w],x={reducerName:w,type:ou(o,w),createNotation:typeof i.reducers=="function"};au(v)?du(x,v,f,t):fu(x,v,f)});function l(){const[w={},v=[],x=void 0]=typeof i.extraReducers=="function"?so(i.extraReducers):[i.extraReducers],O={...w,...a.sliceCaseReducersByType};return tu(i.initialState,C=>{for(let R in O)C.addCase(R,O[R]);for(let R of a.sliceMatchers)C.addMatcher(R.matcher,R.reducer);for(let R of v)C.addMatcher(R.matcher,R.reducer);x&&C.addDefaultCase(x)})}const m=w=>w,h=new Map,y=new WeakMap;let d;function g(w,v){return d||(d=l()),d(w,v)}function _(){return d||(d=l()),d.getInitialState()}function E(w,v=!1){function x(C){let R=C[w];return typeof R>"u"&&v&&(R=_t(y,x,_)),R}function O(C=m){const R=_t(h,v,()=>new WeakMap);return _t(R,C,()=>{const B={};for(const[F,I]of Object.entries(i.selectors??{}))B[F]=cu(I,C,()=>_t(y,C,_),v);return B})}return{reducerPath:w,getSelectors:O,get selectors(){return O(x)},selectSlice:x}}const b={name:o,reducer:g,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:_,...E(s),injectInto(w,{reducerPath:v,...x}={}){const O=v??s;return w.inject({reducerPath:O,reducer:g},x),{...b,...E(O,!0)}}};return b}}function cu(e,t,n,r){function i(o,...s){let c=t(o);return typeof c>"u"&&r&&(c=n()),e(c,...s)}return i.unwrapped=e,i}var Ta=su();function uu(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function fu({type:e,reducerName:t,createNotation:n},r,i){let o,s;if("reducer"in r){if(n&&!lu(r))throw new Error(te(17));o=r.reducer,s=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?Ue(e,s):Ue(e))}function au(e){return e._reducerDefinitionType==="asyncThunk"}function lu(e){return e._reducerDefinitionType==="reducerWithPrepare"}function du({type:e,reducerName:t},n,r,i){if(!i)throw new Error(te(18));const{payloadCreator:o,fulfilled:s,pending:c,rejected:u,settled:a,options:f}=n,l=i(e,o,f);r.exposeAction(t,l),s&&r.addCase(l.fulfilled,s),c&&r.addCase(l.pending,c),u&&r.addCase(l.rejected,u),a&&r.addMatcher(l.settled,a),r.exposeCaseReducer(t,{fulfilled:s||wt,pending:c||wt,rejected:u||wt,settled:a||wt})}function wt(){}var hu="task",co="listener",uo="completed",dr="cancelled",pu=`task-${dr}`,yu=`task-${uo}`,Vn=`${co}-${dr}`,mu=`${co}-${uo}`,Ht=class{constructor(e){yt(this,"code");yt(this,"name","TaskAbortError");yt(this,"message");this.code=e,this.message=`${hu} ${dr} (reason: ${e})`}},hr=(e,t)=>{if(typeof e!="function")throw new TypeError(te(32))},Lt=()=>{},fo=(e,t=Lt)=>(e.catch(t),e),ao=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Ae=e=>{if(e.aborted)throw new Ht(e.reason)};function lo(e,t){let n=Lt;return new Promise((r,i)=>{const o=()=>i(new Ht(e.reason));if(e.aborted){o();return}n=ao(e,o),t.finally(()=>n()).then(r,i)}).finally(()=>{n=Lt})}var gu=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof Ht?"cancelled":"rejected",error:n}}finally{t==null||t()}},Tt=e=>t=>fo(lo(e,t).then(n=>(Ae(e),n))),ho=e=>{const t=Tt(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:We}=Object,Zr={},Yt="listenerMiddleware",_u=(e,t)=>{const n=r=>ao(e,()=>r.abort(e.reason));return(r,i)=>{hr(r);const o=new AbortController;n(o);const s=gu(async()=>{Ae(e),Ae(o.signal);const c=await r({pause:Tt(o.signal),delay:ho(o.signal),signal:o.signal});return Ae(o.signal),c},()=>o.abort(yu));return i!=null&&i.autoJoin&&t.push(s.catch(Lt)),{result:Tt(e)(s),cancel(){o.abort(pu)}}}},wu=(e,t)=>{const n=async(r,i)=>{Ae(t);let o=()=>{};const c=[new Promise((u,a)=>{let f=e({predicate:r,effect:(l,m)=>{m.unsubscribe(),u([l,m.getState(),m.getOriginalState()])}});o=()=>{f(),a()}})];i!=null&&c.push(new Promise(u=>setTimeout(u,i,null)));try{const u=await lo(t,Promise.race(c));return Ae(t),u}finally{o()}};return((r,i)=>fo(n(r,i)))},po=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=Ue(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(te(21));return hr(o),{predicate:i,type:t,effect:o}},yo=We(e=>{const{type:t,predicate:n,effect:r}=po(e);return{id:ru(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(te(22))}}},{withTypes:()=>yo}),Jr=(e,t)=>{const{type:n,effect:r,predicate:i}=po(t);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===r)},Xn=e=>{e.pending.forEach(t=>{t.abort(Vn)})},vu=(e,t)=>()=>{for(const n of t.keys())Xn(n);e.clear()},Qr=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},mo=We(Ue(`${Yt}/add`),{withTypes:()=>mo}),Eu=Ue(`${Yt}/removeAll`),go=We(Ue(`${Yt}/remove`),{withTypes:()=>go}),bu=(...e)=>{console.error(`${Yt}/error`,...e)},Da=(e={})=>{const t=new Map,n=new Map,r=h=>{const y=n.get(h)??0;n.set(h,y+1)},i=h=>{const y=n.get(h)??1;y===1?n.delete(h):n.set(h,y-1)},{extra:o,onError:s=bu}=e;hr(s);const c=h=>(h.unsubscribe=()=>t.delete(h.id),t.set(h.id,h),y=>{h.unsubscribe(),y!=null&&y.cancelActive&&Xn(h)}),u=(h=>{const y=Jr(t,h)??yo(h);return c(y)});We(u,{withTypes:()=>u});const a=h=>{const y=Jr(t,h);return y&&(y.unsubscribe(),h.cancelActive&&Xn(y)),!!y};We(a,{withTypes:()=>a});const f=async(h,y,d,g)=>{const _=new AbortController,E=wu(u,_.signal),b=[];try{h.pending.add(_),r(h),await Promise.resolve(h.effect(y,We({},d,{getOriginalState:g,condition:(w,v)=>E(w,v).then(Boolean),take:E,delay:ho(_.signal),pause:Tt(_.signal),extra:o,signal:_.signal,fork:_u(_.signal,b),unsubscribe:h.unsubscribe,subscribe:()=>{t.set(h.id,h)},cancelActiveListeners:()=>{h.pending.forEach((w,v,x)=>{w!==_&&(w.abort(Vn),x.delete(w))})},cancel:()=>{_.abort(Vn),h.pending.delete(_)},throwIfCancelled:()=>{Ae(_.signal)}})))}catch(w){w instanceof Ht||Qr(s,w,{raisedBy:"effect"})}finally{await Promise.all(b),_.abort(mu),i(h),h.pending.delete(_)}},l=vu(t,n);return{middleware:h=>y=>d=>{if(!Xi(d))return y(d);if(mo.match(d))return u(d.payload);if(Eu.match(d)){l();return}if(go.match(d))return a(d.payload);let g=h.getState();const _=()=>{if(g===Zr)throw new Error(te(23));return g};let E;try{if(E=y(d),t.size>0){const b=h.getState(),w=Array.from(t.values());for(const v of w){let x=!1;try{x=v.predicate(d,b,g)}catch(O){x=!1,Qr(s,O,{raisedBy:"predicate"})}x&&f(v,d,h,_)}}}finally{g=Zr}return E},startListening:u,stopListening:a,clearListeners:l}};function te(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function Su(e,t,{signal:n,edges:r}={}){let i,o=null;const s=r!=null&&r.includes("leading"),c=r==null||r.includes("trailing"),u=()=>{o!==null&&(e.apply(i,o),i=void 0,o=null)},a=()=>{c&&u(),h()};let f=null;const l=()=>{f!=null&&clearTimeout(f),f=setTimeout(()=>{f=null,a()},t)},m=()=>{f!==null&&(clearTimeout(f),f=null)},h=()=>{m(),i=void 0,o=null},y=()=>{u()},d=function(...g){if(n!=null&&n.aborted)return;i=this,o=g;const _=f==null;l(),s&&_&&u()};return d.schedule=l,d.cancel=h,d.flush=y,n==null||n.addEventListener("abort",h,{once:!0}),d}function Pu(e,t=0,n={}){typeof n!="object"&&(n={});const{leading:r=!1,trailing:i=!0,maxWait:o}=n,s=Array(2);r&&(s[0]="leading"),i&&(s[1]="trailing");let c,u=null;const a=Su(function(...m){c=e.apply(this,m),u=null},t,{edges:s}),f=function(...m){return o!=null&&(u===null&&(u=Date.now()),Date.now()-u>=o)?(c=e.apply(this,m),u=Date.now(),a.cancel(),a.schedule(),c):(a.apply(this,m),c)},l=()=>(a.flush(),c);return f.cancel=a.cancel,f.flush=l,f}function ka(e,t=0,n={}){const{leading:r=!0,trailing:i=!0}=n;return Pu(e,t,{leading:r,maxWait:t,trailing:i})}var _o=Symbol.for("immer-nothing"),ei=Symbol.for("immer-draftable"),ne=Symbol.for("immer-state");function ue(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var tt=Object.getPrototypeOf;function Be(e){return!!e&&!!e[ne]}function Me(e){var t;return e?wo(e)||Array.isArray(e)||!!e[ei]||!!((t=e.constructor)!=null&&t[ei])||st(e)||Gt(e):!1}var Ou=Object.prototype.constructor.toString(),ti=new WeakMap;function wo(e){if(!e||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);if(t===null||t===Object.prototype)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;if(n===Object)return!0;if(typeof n!="function")return!1;let r=ti.get(n);return r===void 0&&(r=Function.toString.call(n),ti.set(n,r)),r===Ou}function Dt(e,t,n=!0){Kt(e)===0?(n?Reflect.ownKeys(e):Object.keys(e)).forEach(i=>{t(i,e[i],e)}):e.forEach((r,i)=>t(i,r,e))}function Kt(e){const t=e[ne];return t?t.type_:Array.isArray(e)?1:st(e)?2:Gt(e)?3:0}function Hn(e,t){return Kt(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function vo(e,t,n){const r=Kt(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function xu(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function st(e){return e instanceof Map}function Gt(e){return e instanceof Set}function Se(e){return e.copy_||e.base_}function Yn(e,t){if(st(e))return new Map(e);if(Gt(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=wo(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[ne];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const s=i[o],c=r[s];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[s]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[s]})}return Object.create(tt(e),r)}else{const r=tt(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function pr(e,t=!1){return Zt(e)||Be(e)||!Me(e)||(Kt(e)>1&&Object.defineProperties(e,{set:vt,add:vt,clear:vt,delete:vt}),Object.freeze(e),t&&Object.values(e).forEach(n=>pr(n,!0))),e}function Ru(){ue(2)}var vt={value:Ru};function Zt(e){return e===null||typeof e!="object"?!0:Object.isFrozen(e)}var Au={};function Ie(e){const t=Au[e];return t||ue(0,e),t}var nt;function Eo(){return nt}function Nu(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ni(e,t){t&&(Ie("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Kn(e){Gn(e),e.drafts_.forEach(Cu),e.drafts_=null}function Gn(e){e===nt&&(nt=e.parent_)}function ri(e){return nt=Nu(nt,e)}function Cu(e){const t=e[ne];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ii(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ne].modified_&&(Kn(t),ue(4)),Me(e)&&(e=kt(t,e),t.parent_||$t(t,e)),t.patches_&&Ie("Patches").generateReplacementPatches_(n[ne].base_,e,t.patches_,t.inversePatches_)):e=kt(t,n,[]),Kn(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==_o?e:void 0}function kt(e,t,n){if(Zt(t))return t;const r=e.immer_.shouldUseStrictIteration(),i=t[ne];if(!i)return Dt(t,(o,s)=>oi(e,i,t,o,s,n),r),t;if(i.scope_!==e)return t;if(!i.modified_)return $t(e,i.base_,!0),i.base_;if(!i.finalized_){i.finalized_=!0,i.scope_.unfinalizedDrafts_--;const o=i.copy_;let s=o,c=!1;i.type_===3&&(s=new Set(o),o.clear(),c=!0),Dt(s,(u,a)=>oi(e,i,o,u,a,n,c),r),$t(e,o,!1),n&&e.patches_&&Ie("Patches").generatePatches_(i,n,e.patches_,e.inversePatches_)}return i.copy_}function oi(e,t,n,r,i,o,s){if(i==null||typeof i!="object"&&!s)return;const c=Zt(i);if(!(c&&!s)){if(Be(i)){const u=o&&t&&t.type_!==3&&!Hn(t.assigned_,r)?o.concat(r):void 0,a=kt(e,i,u);if(vo(n,r,a),Be(a))e.canAutoFreeze_=!1;else return}else s&&n.add(i);if(Me(i)&&!c){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1||t&&t.base_&&t.base_[r]===i&&c)return;kt(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(st(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&$t(e,i)}}}function $t(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&pr(t,n)}function Mu(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Eo(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=yr;n&&(i=[r],o=rt);const{revoke:s,proxy:c}=Proxy.revocable(i,o);return r.draft_=c,r.revoke_=s,c}var yr={get(e,t){if(t===ne)return e;const n=Se(e);if(!Hn(n,t))return Iu(e,n,t);const r=n[t];return e.finalized_||!Me(r)?r:r===gn(e.base_,t)?(_n(e),e.copy_[t]=Jn(r,e)):r},has(e,t){return t in Se(e)},ownKeys(e){return Reflect.ownKeys(Se(e))},set(e,t,n){const r=bo(Se(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=gn(Se(e),t),o=i==null?void 0:i[ne];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(xu(n,i)&&(n!==void 0||Hn(e.base_,t)))return!0;_n(e),Zn(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return gn(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,_n(e),Zn(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Se(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ue(11)},getPrototypeOf(e){return tt(e.base_)},setPrototypeOf(){ue(12)}},rt={};Dt(yr,(e,t)=>{rt[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});rt.deleteProperty=function(e,t){return rt.set.call(this,e,t,void 0)};rt.set=function(e,t,n){return yr.set.call(this,e[0],t,n,e[0])};function gn(e,t){const n=e[ne];return(n?Se(n):e)[t]}function Iu(e,t,n){var i;const r=bo(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function bo(e,t){if(!(t in e))return;let n=tt(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=tt(n)}}function Zn(e){e.modified_||(e.modified_=!0,e.parent_&&Zn(e.parent_))}function _n(e){e.copy_||(e.copy_=Yn(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Lu=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!0,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const s=this;return function(u=o,...a){return s.produce(u,f=>n.call(this,f,...a))}}typeof n!="function"&&ue(6),r!==void 0&&typeof r!="function"&&ue(7);let i;if(Me(t)){const o=ri(this),s=Jn(t,void 0);let c=!0;try{i=n(s),c=!1}finally{c?Kn(o):Gn(o)}return ni(o,r),ii(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===_o&&(i=void 0),this.autoFreeze_&&pr(i,!0),r){const o=[],s=[];Ie("Patches").generateReplacementPatches_(t,i,o,s),r(o,s)}return i}else ue(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(s,...c)=>this.produceWithPatches(s,u=>t(u,...c));let r,i;return[this.produce(t,n,(s,c)=>{r=s,i=c}),r,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),typeof(e==null?void 0:e.useStrictIteration)=="boolean"&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Me(e)||ue(8),Be(e)&&(e=Tu(e));const t=ri(this),n=Jn(e,void 0);return n[ne].isManual_=!0,Gn(t),n}finishDraft(e,t){const n=e&&e[ne];(!n||!n.isManual_)&&ue(9);const{scope_:r}=n;return ni(r,t),ii(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Ie("Patches").applyPatches_;return Be(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Jn(e,t){const n=st(e)?Ie("MapSet").proxyMap_(e,t):Gt(e)?Ie("MapSet").proxySet_(e,t):Mu(e,t);return(t?t.scope_:Eo()).drafts_.push(n),n}function Tu(e){return Be(e)||ue(10,e),So(e)}function So(e){if(!Me(e)||Zt(e))return e;const t=e[ne];let n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Yn(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=Yn(e,!0);return Dt(n,(i,o)=>{vo(n,i,So(o))},r),t&&(t.finalized_=!1),n}var Du=new Lu;Du.produce;function $a(e){return e}var wn={exports:{}},vn={};/**
|
|
* @license React
|
|
* use-sync-external-store-with-selector.production.js
|
|
*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/var si;function ku(){if(si)return vn;si=1;var e=rr();function t(u,a){return u===a&&(u!==0||1/u===1/a)||u!==u&&a!==a}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,s=e.useMemo,c=e.useDebugValue;return vn.useSyncExternalStoreWithSelector=function(u,a,f,l,m){var h=i(null);if(h.current===null){var y={hasValue:!1,value:null};h.current=y}else y=h.current;h=s(function(){function g(v){if(!_){if(_=!0,E=v,v=l(v),m!==void 0&&y.hasValue){var x=y.value;if(m(x,v))return b=x}return b=v}if(x=b,n(E,v))return x;var O=l(v);return m!==void 0&&m(x,O)?(E=v,x):(E=v,b=O)}var _=!1,E,b,w=f===void 0?null:f;return[function(){return g(a())},w===null?void 0:function(){return g(w())}]},[a,f,l,m]);var d=r(u,h[0],h[1]);return o(function(){y.hasValue=!0,y.value=d},[d]),c(d),d},vn}var ci;function $u(){return ci||(ci=1,wn.exports=ku()),wn.exports}$u();function Fu(e){e()}function Wu(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Fu(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var ui={notify(){},get:()=>[]};function zu(e,t){let n,r=ui,i=0,o=!1;function s(d){f();const g=r.subscribe(d);let _=!1;return()=>{_||(_=!0,g(),l())}}function c(){r.notify()}function u(){y.onStateChange&&y.onStateChange()}function a(){return o}function f(){i++,n||(n=e.subscribe(u),r=Wu())}function l(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=ui)}function m(){o||(o=!0,f())}function h(){o&&(o=!1,l())}const y={addNestedSub:s,notifyNestedSubs:c,handleChangeWrapper:u,isSubscribed:a,trySubscribe:m,tryUnsubscribe:h,getListeners:()=>r};return y}var Uu=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Bu=Uu(),ju=()=>typeof navigator<"u"&&navigator.product==="ReactNative",qu=ju(),Vu=()=>Bu||qu?p.useLayoutEffect:p.useEffect,Xu=Vu();function fi(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Fa(e,t){if(fi(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])||!fi(e[n[i]],t[n[i]]))return!1;return!0}var En=Symbol.for("react-redux-context"),bn=typeof globalThis<"u"?globalThis:{};function Hu(){if(!p.createContext)return{};const e=bn[En]??(bn[En]=new Map);let t=e.get(p.createContext);return t||(t=p.createContext(null),e.set(p.createContext,t)),t}var Yu=Hu();function Ku(e){const{children:t,context:n,serverState:r,store:i}=e,o=p.useMemo(()=>{const u=zu(i);return{store:i,subscription:u,getServerState:r?()=>r:void 0}},[i,r]),s=p.useMemo(()=>i.getState(),[i]);Xu(()=>{const{subscription:u}=o;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),s!==i.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[o,s]);const c=n||Yu;return p.createElement(c.Provider,{value:o},t)}var Wa=Ku;function Gu(e){return qi(e)?NaN:Number(e)}function Sn(e){return e?(e=Gu(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function za(e,t,n){n&&typeof n!="number"&&kn(e,t,n)&&(t=n=void 0),e=Sn(e),t===void 0?(t=e,e=0):t=Sn(t),n=n===void 0?e<t?1:-1:Sn(n);const r=Math.max(Math.ceil((t-e)/(n||1)),0),i=new Array(r);for(let o=0;o<r;o++)i[o]=e,e+=n;return i}var Ve=1e9,Zu={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},gr,z=!0,ie="[DecimalError] ",Ne=ie+"Invalid argument: ",mr=ie+"Exponent out of range: ",Xe=Math.floor,Pe=Math.pow,Ju=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Q,X=1e7,$=7,Po=9007199254740991,Ft=Xe(Po/$),S={};S.absoluteValue=S.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};S.comparedTo=S.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};S.decimalPlaces=S.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*$;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};S.dividedBy=S.div=function(e){return ye(this,new this.constructor(e))};S.dividedToIntegerBy=S.idiv=function(e){var t=this,n=t.constructor;return k(ye(t,new n(e),0,1),n.precision)};S.equals=S.eq=function(e){return!this.cmp(e)};S.exponent=function(){return j(this)};S.greaterThan=S.gt=function(e){return this.cmp(e)>0};S.greaterThanOrEqualTo=S.gte=function(e){return this.cmp(e)>=0};S.isInteger=S.isint=function(){return this.e>this.d.length-2};S.isNegative=S.isneg=function(){return this.s<0};S.isPositive=S.ispos=function(){return this.s>0};S.isZero=function(){return this.s===0};S.lessThan=S.lt=function(e){return this.cmp(e)<0};S.lessThanOrEqualTo=S.lte=function(e){return this.cmp(e)<1};S.logarithm=S.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Q))throw Error(ie+"NaN");if(n.s<1)throw Error(ie+(n.s?"NaN":"-Infinity"));return n.eq(Q)?new r(0):(z=!1,t=ye(it(n,o),it(e,o),o),z=!0,k(t,i))};S.minus=S.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Ro(t,e):Oo(t,(e.s=-e.s,e))};S.modulo=S.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(ie+"NaN");return n.s?(z=!1,t=ye(n,e,0,1).times(e),z=!0,n.minus(t)):k(new r(n),i)};S.naturalExponential=S.exp=function(){return xo(this)};S.naturalLogarithm=S.ln=function(){return it(this)};S.negated=S.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};S.plus=S.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Oo(t,e):Ro(t,(e.s=-e.s,e))};S.precision=S.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ne+e);if(t=j(i)+1,r=i.d.length-1,n=r*$+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};S.squareRoot=S.sqrt=function(){var e,t,n,r,i,o,s,c=this,u=c.constructor;if(c.s<1){if(!c.s)return new u(0);throw Error(ie+"NaN")}for(e=j(c),z=!1,i=Math.sqrt(+c),i==0||i==1/0?(t=de(c.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Xe((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new u(t)):r=new u(i.toString()),n=u.precision,i=s=n+3;;)if(o=r,r=o.plus(ye(c,o,s+2)).times(.5),de(o.d).slice(0,s)===(t=de(r.d)).slice(0,s)){if(t=t.slice(s-3,s+1),i==s&&t=="4999"){if(k(o,n+1,0),o.times(o).eq(c)){r=o;break}}else if(t!="9999")break;s+=4}return z=!0,k(r,n)};S.times=S.mul=function(e){var t,n,r,i,o,s,c,u,a,f=this,l=f.constructor,m=f.d,h=(e=new l(e)).d;if(!f.s||!e.s)return new l(0);for(e.s*=f.s,n=f.e+e.e,u=m.length,a=h.length,u<a&&(o=m,m=h,h=o,s=u,u=a,a=s),o=[],s=u+a,r=s;r--;)o.push(0);for(r=a;--r>=0;){for(t=0,i=u+r;i>r;)c=o[i]+h[r]*m[i-r-1]+t,o[i--]=c%X|0,t=c/X|0;o[i]=(o[i]+t)%X|0}for(;!o[--s];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,z?k(e,l.precision):e};S.toDecimalPlaces=S.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(he(e,0,Ve),t===void 0?t=r.rounding:he(t,0,8),k(n,e+j(n)+1,t))};S.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Le(r,!0):(he(e,0,Ve),t===void 0?t=i.rounding:he(t,0,8),r=k(new i(r),e+1,t),n=Le(r,!0,e+1)),n};S.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Le(i):(he(e,0,Ve),t===void 0?t=o.rounding:he(t,0,8),r=k(new o(i),e+j(i)+1,t),n=Le(r.abs(),!1,e+j(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};S.toInteger=S.toint=function(){var e=this,t=e.constructor;return k(new t(e),j(e)+1,t.rounding)};S.toNumber=function(){return+this};S.toPower=S.pow=function(e){var t,n,r,i,o,s,c=this,u=c.constructor,a=12,f=+(e=new u(e));if(!e.s)return new u(Q);if(c=new u(c),!c.s){if(e.s<1)throw Error(ie+"Infinity");return c}if(c.eq(Q))return c;if(r=u.precision,e.eq(Q))return k(c,r);if(t=e.e,n=e.d.length-1,s=t>=n,o=c.s,s){if((n=f<0?-f:f)<=Po){for(i=new u(Q),t=Math.ceil(r/$+4),z=!1;n%2&&(i=i.times(c),li(i.d,t)),n=Xe(n/2),n!==0;)c=c.times(c),li(c.d,t);return z=!0,e.s<0?new u(Q).div(i):k(i,r)}}else if(o<0)throw Error(ie+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,c.s=1,z=!1,i=e.times(it(c,r+a)),z=!0,i=xo(i),i.s=o,i};S.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=j(i),r=Le(i,n<=o.toExpNeg||n>=o.toExpPos)):(he(e,1,Ve),t===void 0?t=o.rounding:he(t,0,8),i=k(new o(i),e,t),n=j(i),r=Le(i,e<=n||n<=o.toExpNeg,e)),r};S.toSignificantDigits=S.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(he(e,1,Ve),t===void 0?t=r.rounding:he(t,0,8)),k(new r(n),e,t)};S.toString=S.valueOf=S.val=S.toJSON=S[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=j(e),n=e.constructor;return Le(e,t<=n.toExpNeg||t>=n.toExpPos)};function Oo(e,t){var n,r,i,o,s,c,u,a,f=e.constructor,l=f.precision;if(!e.s||!t.s)return t.s||(t=new f(e)),z?k(t,l):t;if(u=e.d,a=t.d,s=e.e,i=t.e,u=u.slice(),o=s-i,o){for(o<0?(r=u,o=-o,c=a.length):(r=a,i=s,c=u.length),s=Math.ceil(l/$),c=s>c?s+1:c+1,o>c&&(o=c,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(c=u.length,o=a.length,c-o<0&&(o=c,r=a,a=u,u=r),n=0;o;)n=(u[--o]=u[o]+a[o]+n)/X|0,u[o]%=X;for(n&&(u.unshift(n),++i),c=u.length;u[--c]==0;)u.pop();return t.d=u,t.e=i,z?k(t,l):t}function he(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Ne+e)}function de(e){var t,n,r,i=e.length-1,o="",s=e[0];if(i>0){for(o+=s,t=1;t<i;t++)r=e[t]+"",n=$-r.length,n&&(o+=ve(n)),o+=r;s=e[t],r=s+"",n=$-r.length,n&&(o+=ve(n))}else if(s===0)return"0";for(;s%10===0;)s/=10;return o+s}var ye=(function(){function e(r,i){var o,s=0,c=r.length;for(r=r.slice();c--;)o=r[c]*i+s,r[c]=o%X|0,s=o/X|0;return s&&r.unshift(s),r}function t(r,i,o,s){var c,u;if(o!=s)u=o>s?1:-1;else for(c=u=0;c<o;c++)if(r[c]!=i[c]){u=r[c]>i[c]?1:-1;break}return u}function n(r,i,o){for(var s=0;o--;)r[o]-=s,s=r[o]<i[o]?1:0,r[o]=s*X+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,s){var c,u,a,f,l,m,h,y,d,g,_,E,b,w,v,x,O,C,R=r.constructor,B=r.s==i.s?1:-1,F=r.d,I=i.d;if(!r.s)return new R(r);if(!i.s)throw Error(ie+"Division by zero");for(u=r.e-i.e,O=I.length,v=F.length,h=new R(B),y=h.d=[],a=0;I[a]==(F[a]||0);)++a;if(I[a]>(F[a]||0)&&--u,o==null?E=o=R.precision:s?E=o+(j(r)-j(i))+1:E=o,E<0)return new R(0);if(E=E/$+2|0,a=0,O==1)for(f=0,I=I[0],E++;(a<v||f)&&E--;a++)b=f*X+(F[a]||0),y[a]=b/I|0,f=b%I|0;else{for(f=X/(I[0]+1)|0,f>1&&(I=e(I,f),F=e(F,f),O=I.length,v=F.length),w=O,d=F.slice(0,O),g=d.length;g<O;)d[g++]=0;C=I.slice(),C.unshift(0),x=I[0],I[1]>=X/2&&++x;do f=0,c=t(I,d,O,g),c<0?(_=d[0],O!=g&&(_=_*X+(d[1]||0)),f=_/x|0,f>1?(f>=X&&(f=X-1),l=e(I,f),m=l.length,g=d.length,c=t(l,d,m,g),c==1&&(f--,n(l,O<m?C:I,m))):(f==0&&(c=f=1),l=I.slice()),m=l.length,m<g&&l.unshift(0),n(d,l,g),c==-1&&(g=d.length,c=t(I,d,O,g),c<1&&(f++,n(d,O<g?C:I,g))),g=d.length):c===0&&(f++,d=[0]),y[a++]=f,c&&d[0]?d[g++]=F[w]||0:(d=[F[w]],g=1);while((w++<v||d[0]!==void 0)&&E--)}return y[0]||y.shift(),h.e=u,k(h,s?o+j(h)+1:o)}})();function xo(e,t){var n,r,i,o,s,c,u=0,a=0,f=e.constructor,l=f.precision;if(j(e)>16)throw Error(mr+j(e));if(!e.s)return new f(Q);for(z=!1,c=l,s=new f(.03125);e.abs().gte(.1);)e=e.times(s),a+=5;for(r=Math.log(Pe(2,a))/Math.LN10*2+5|0,c+=r,n=i=o=new f(Q),f.precision=c;;){if(i=k(i.times(e),c),n=n.times(++u),s=o.plus(ye(i,n,c)),de(s.d).slice(0,c)===de(o.d).slice(0,c)){for(;a--;)o=k(o.times(o),c);return f.precision=l,t==null?(z=!0,k(o,l)):o}o=s}}function j(e){for(var t=e.e*$,n=e.d[0];n>=10;n/=10)t++;return t}function Pn(e,t,n){if(t>e.LN10.sd())throw z=!0,n&&(e.precision=n),Error(ie+"LN10 precision limit exceeded");return k(new e(e.LN10),t)}function ve(e){for(var t="";e--;)t+="0";return t}function it(e,t){var n,r,i,o,s,c,u,a,f,l=1,m=10,h=e,y=h.d,d=h.constructor,g=d.precision;if(h.s<1)throw Error(ie+(h.s?"NaN":"-Infinity"));if(h.eq(Q))return new d(0);if(t==null?(z=!1,a=g):a=t,h.eq(10))return t==null&&(z=!0),Pn(d,a);if(a+=m,d.precision=a,n=de(y),r=n.charAt(0),o=j(h),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)h=h.times(e),n=de(h.d),r=n.charAt(0),l++;o=j(h),r>1?(h=new d("0."+n),o++):h=new d(r+"."+n.slice(1))}else return u=Pn(d,a+2,g).times(o+""),h=it(new d(r+"."+n.slice(1)),a-m).plus(u),d.precision=g,t==null?(z=!0,k(h,g)):h;for(c=s=h=ye(h.minus(Q),h.plus(Q),a),f=k(h.times(h),a),i=3;;){if(s=k(s.times(f),a),u=c.plus(ye(s,new d(i),a)),de(u.d).slice(0,a)===de(c.d).slice(0,a))return c=c.times(2),o!==0&&(c=c.plus(Pn(d,a+2,g).times(o+""))),c=ye(c,new d(l),a),d.precision=g,t==null?(z=!0,k(c,g)):c;c=u,i+=2}}function ai(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Xe(n/$),e.d=[],r=(n+1)%$,n<0&&(r+=$),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=$;r<i;)e.d.push(+t.slice(r,r+=$));t=t.slice(r),r=$-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),z&&(e.e>Ft||e.e<-Ft))throw Error(mr+n)}else e.s=0,e.e=0,e.d=[0];return e}function k(e,t,n){var r,i,o,s,c,u,a,f,l=e.d;for(s=1,o=l[0];o>=10;o/=10)s++;if(r=t-s,r<0)r+=$,i=t,a=l[f=0];else{if(f=Math.ceil((r+1)/$),o=l.length,f>=o)return e;for(a=o=l[f],s=1;o>=10;o/=10)s++;r%=$,i=r-$+s}if(n!==void 0&&(o=Pe(10,s-i-1),c=a/o%10|0,u=t<0||l[f+1]!==void 0||a%o,u=n<4?(c||u)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||u||n==6&&(r>0?i>0?a/Pe(10,s-i):0:l[f-1])%10&1||n==(e.s<0?8:7))),t<1||!l[0])return u?(o=j(e),l.length=1,t=t-o-1,l[0]=Pe(10,($-t%$)%$),e.e=Xe(-t/$)||0):(l.length=1,l[0]=e.e=e.s=0),e;if(r==0?(l.length=f,o=1,f--):(l.length=f+1,o=Pe(10,$-r),l[f]=i>0?(a/Pe(10,s-i)%Pe(10,i)|0)*o:0),u)for(;;)if(f==0){(l[0]+=o)==X&&(l[0]=1,++e.e);break}else{if(l[f]+=o,l[f]!=X)break;l[f--]=0,o=1}for(r=l.length;l[--r]===0;)l.pop();if(z&&(e.e>Ft||e.e<-Ft))throw Error(mr+j(e));return e}function Ro(e,t){var n,r,i,o,s,c,u,a,f,l,m=e.constructor,h=m.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new m(e),z?k(t,h):t;if(u=e.d,l=t.d,r=t.e,a=e.e,u=u.slice(),s=a-r,s){for(f=s<0,f?(n=u,s=-s,c=l.length):(n=l,r=a,c=u.length),i=Math.max(Math.ceil(h/$),c)+2,s>i&&(s=i,n.length=1),n.reverse(),i=s;i--;)n.push(0);n.reverse()}else{for(i=u.length,c=l.length,f=i<c,f&&(c=i),i=0;i<c;i++)if(u[i]!=l[i]){f=u[i]<l[i];break}s=0}for(f&&(n=u,u=l,l=n,t.s=-t.s),c=u.length,i=l.length-c;i>0;--i)u[c++]=0;for(i=l.length;i>s;){if(u[--i]<l[i]){for(o=i;o&&u[--o]===0;)u[o]=X-1;--u[o],u[i]+=X}u[i]-=l[i]}for(;u[--c]===0;)u.pop();for(;u[0]===0;u.shift())--r;return u[0]?(t.d=u,t.e=r,z?k(t,h):t):new m(0)}function Le(e,t,n){var r,i=j(e),o=de(e.d),s=o.length;return t?(n&&(r=n-s)>0?o=o.charAt(0)+"."+o.slice(1)+ve(r):s>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+ve(-i-1)+o,n&&(r=n-s)>0&&(o+=ve(r))):i>=s?(o+=ve(i+1-s),n&&(r=n-i-1)>0&&(o=o+"."+ve(r))):((r=i+1)<s&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-s)>0&&(i+1===s&&(o+="."),o+=ve(r))),e.s<0?"-"+o:o}function li(e,t){if(e.length>t)return e.length=t,!0}function Ao(e){var t,n,r;function i(o){var s=this;if(!(s instanceof i))return new i(o);if(s.constructor=i,o instanceof i){s.s=o.s,s.e=o.e,s.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(Ne+o);if(o>0)s.s=1;else if(o<0)o=-o,s.s=-1;else{s.s=0,s.e=0,s.d=[0];return}if(o===~~o&&o<1e7){s.e=0,s.d=[o];return}return ai(s,o.toString())}else if(typeof o!="string")throw Error(Ne+o);if(o.charCodeAt(0)===45?(o=o.slice(1),s.s=-1):s.s=1,Ju.test(o))ai(s,o);else throw Error(Ne+o)}if(i.prototype=S,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Ao,i.config=i.set=Qu,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function Qu(e){if(!e||typeof e!="object")throw Error(ie+"Object expected");var t,n,r,i=["precision",1,Ve,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(Xe(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Ne+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(Ne+n+": "+r);return this}var gr=Ao(Zu);Q=new gr(1);const Ua=gr;class Ba extends Map{constructor(t,n=nf){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(di(this,t))}has(t){return super.has(di(this,t))}set(t,n){return super.set(ef(this,t),n)}delete(t){return super.delete(tf(this,t))}}function di({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function ef({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function tf({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function nf(e){return e!==null&&typeof e=="object"?e.valueOf():e}var On={exports:{}},hi;function rf(){return hi||(hi=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(u,a,f){this.fn=u,this.context=a,this.once=f||!1}function o(u,a,f,l,m){if(typeof f!="function")throw new TypeError("The listener must be a function");var h=new i(f,l||u,m),y=n?n+a:a;return u._events[y]?u._events[y].fn?u._events[y]=[u._events[y],h]:u._events[y].push(h):(u._events[y]=h,u._eventsCount++),u}function s(u,a){--u._eventsCount===0?u._events=new r:delete u._events[a]}function c(){this._events=new r,this._eventsCount=0}c.prototype.eventNames=function(){var a=[],f,l;if(this._eventsCount===0)return a;for(l in f=this._events)t.call(f,l)&&a.push(n?l.slice(1):l);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(f)):a},c.prototype.listeners=function(a){var f=n?n+a:a,l=this._events[f];if(!l)return[];if(l.fn)return[l.fn];for(var m=0,h=l.length,y=new Array(h);m<h;m++)y[m]=l[m].fn;return y},c.prototype.listenerCount=function(a){var f=n?n+a:a,l=this._events[f];return l?l.fn?1:l.length:0},c.prototype.emit=function(a,f,l,m,h,y){var d=n?n+a:a;if(!this._events[d])return!1;var g=this._events[d],_=arguments.length,E,b;if(g.fn){switch(g.once&&this.removeListener(a,g.fn,void 0,!0),_){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,f),!0;case 3:return g.fn.call(g.context,f,l),!0;case 4:return g.fn.call(g.context,f,l,m),!0;case 5:return g.fn.call(g.context,f,l,m,h),!0;case 6:return g.fn.call(g.context,f,l,m,h,y),!0}for(b=1,E=new Array(_-1);b<_;b++)E[b-1]=arguments[b];g.fn.apply(g.context,E)}else{var w=g.length,v;for(b=0;b<w;b++)switch(g[b].once&&this.removeListener(a,g[b].fn,void 0,!0),_){case 1:g[b].fn.call(g[b].context);break;case 2:g[b].fn.call(g[b].context,f);break;case 3:g[b].fn.call(g[b].context,f,l);break;case 4:g[b].fn.call(g[b].context,f,l,m);break;default:if(!E)for(v=1,E=new Array(_-1);v<_;v++)E[v-1]=arguments[v];g[b].fn.apply(g[b].context,E)}}return!0},c.prototype.on=function(a,f,l){return o(this,a,f,l,!1)},c.prototype.once=function(a,f,l){return o(this,a,f,l,!0)},c.prototype.removeListener=function(a,f,l,m){var h=n?n+a:a;if(!this._events[h])return this;if(!f)return s(this,h),this;var y=this._events[h];if(y.fn)y.fn===f&&(!m||y.once)&&(!l||y.context===l)&&s(this,h);else{for(var d=0,g=[],_=y.length;d<_;d++)(y[d].fn!==f||m&&!y[d].once||l&&y[d].context!==l)&&g.push(y[d]);g.length?this._events[h]=g.length===1?g[0]:g:s(this,h)}return this},c.prototype.removeAllListeners=function(a){var f;return a?(f=n?n+a:a,this._events[f]&&s(this,f)):(this._events=new r,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,e.exports=c})(On)),On.exports}var of=rf();const ja=gs(of);var xn={exports:{}},D={};/**
|
|
* @license React
|
|
* react-is.production.js
|
|
*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/var pi;function sf(){if(pi)return D;pi=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),a=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),m=Symbol.for("react.view_transition"),h=Symbol.for("react.client.reference");function y(d){if(typeof d=="object"&&d!==null){var g=d.$$typeof;switch(g){case e:switch(d=d.type,d){case n:case i:case r:case u:case a:case m:return d;default:switch(d=d&&d.$$typeof,d){case s:case c:case l:case f:return d;case o:return d;default:return g}}case t:return g}}}return D.ContextConsumer=o,D.ContextProvider=s,D.Element=e,D.ForwardRef=c,D.Fragment=n,D.Lazy=l,D.Memo=f,D.Portal=t,D.Profiler=i,D.StrictMode=r,D.Suspense=u,D.SuspenseList=a,D.isContextConsumer=function(d){return y(d)===o},D.isContextProvider=function(d){return y(d)===s},D.isElement=function(d){return typeof d=="object"&&d!==null&&d.$$typeof===e},D.isForwardRef=function(d){return y(d)===c},D.isFragment=function(d){return y(d)===n},D.isLazy=function(d){return y(d)===l},D.isMemo=function(d){return y(d)===f},D.isPortal=function(d){return y(d)===t},D.isProfiler=function(d){return y(d)===i},D.isStrictMode=function(d){return y(d)===r},D.isSuspense=function(d){return y(d)===u},D.isSuspenseList=function(d){return y(d)===a},D.isValidElementType=function(d){return typeof d=="string"||typeof d=="function"||d===n||d===i||d===r||d===u||d===a||typeof d=="object"&&d!==null&&(d.$$typeof===l||d.$$typeof===f||d.$$typeof===s||d.$$typeof===o||d.$$typeof===c||d.$$typeof===h||d.getModuleId!==void 0)},D.typeOf=y,D}var yi;function cf(){return yi||(yi=1,xn.exports=sf()),xn.exports}var qa=cf(),uf="Invariant failed";function Va(e,t){throw new Error(uf)}const No="carousel",Co="controller",ff="navigation",af="no-scroll",_r="portal",lf="root",Mo="toolbar",Rn="loading",An="error",Nn="complete",df="placeholder",hf=e=>`active-slide-${e}`,Io="flex_center",pf="no_scroll",Lo="no_scroll_padding",wr="slide",yf="slide_wrapper",Oe="prev",xe="next",mi="swipe",je="close",To="onPointerDown",Do="onPointerMove",ko="onPointerUp",$o="onPointerLeave",Fo="onPointerCancel",Wo="onKeyDown",mf="onKeyUp",zo="onWheel",gf="Escape",_f="ArrowLeft",wf="ArrowRight",vf="button",Qn="icon",Uo="contain",gi="cover",Ef="Unknown action type",Bo="yarl__";function me(...e){return e.filter(Boolean).join(" ")}function T(e){return`${Bo}${e}`}function J(e){return`--${Bo}${e}`}function ct(e,t){return`${e}${t?`_${t}`:""}`}function vr(e){return t=>ct(e,t)}function qe(e,t){var n;return(n=e==null?void 0:e[t])!==null&&n!==void 0?n:t}function bf(e,t,n){return qe(e,"{index} of {total}").replace(/\{index}/g,`${Er(n,t.length)+1}`).replace(/\{total}/g,`${t.length}`)}function jo(...e){return()=>{e.forEach(t=>{t()})}}function _e(e,t,n){return()=>{const r=p.useContext(n);if(!r)throw new Error(`${e} must be used within a ${t}.Provider`);return r}}function qo(){return typeof window<"u"}function Sf(e,t=0){const n=10**t;return Math.round((e+Number.EPSILON)*n)/n}function Vo(e){return e.type===void 0||e.type==="image"}function Pf(e,t){return e.imageFit===gi||e.imageFit!==Uo&&t===gi}function Jt(e){return typeof e=="string"?Number.parseInt(e,10):e}function Wt(e){if(typeof e=="number")return{pixel:e};if(typeof e=="string"){const t=Jt(e);return e.endsWith("%")?{percent:t}:{pixel:t}}return{pixel:0}}function Of(e,t){const n=Wt(t),r=n.percent!==void 0?e.width/100*n.percent:n.pixel;return{width:Math.max(e.width-2*r,0),height:Math.max(e.height-2*r,0)}}function Er(e,t){return t>0?(e%t+t)%t:0}function Xo(e){return e.length>0}function Ho(e,t){return e[Er(t,e.length)]}function er(e,t){return Xo(e)?Ho(e,t):void 0}function xf(e){return Vo(e)?e.src:void 0}function Rf(e,t,n=0){return Math.min(e.preload,Math.max(e.finite?t.length-1:Math.floor(t.length/2),n))}const Af=Number(p.version.split(".")[0])>=19;function Nf(e){return{inert:Af?e:e?"":void 0}}function Cf(e){e.scrollTop}const tr={open:!1,close:()=>{},index:0,slides:[],render:{},plugins:[],toolbar:{buttons:[je]},labels:{},animation:{fade:250,swipe:500,easing:{fade:"ease",swipe:"ease-out",navigation:"ease-in-out"}},carousel:{finite:!1,preload:2,padding:"16px",spacing:"30%",imageFit:Uo,imageProps:{}},controller:{ref:null,focus:!0,aria:!1,touchAction:"none",closeOnPullUp:!1,closeOnPullDown:!1,closeOnBackdropClick:!1,closeOnEscape:!0,preventDefaultWheelX:!0,preventDefaultWheelY:!1,disableSwipeNavigation:!1},portal:{},noScroll:{disabled:!1},on:{},styles:{},className:""};function Te(e,t){return{name:e,component:t}}function V(e,t){return{module:e,children:t}}function Yo(e,t,n){return e.module.name===t?n(e):e.children?[V(e.module,e.children.flatMap(r=>{var i;return(i=Yo(r,t,n))!==null&&i!==void 0?i:[]}))]:[e]}function $e(e,t,n){return e.flatMap(r=>{var i;return(i=Yo(r,t,n))!==null&&i!==void 0?i:[]})}function Mf(e,t=[],n=[]){let r=e;const i=h=>{const y=[...r];for(;y.length>0;){const d=y.pop();if((d==null?void 0:d.module.name)===h)return!0;d!=null&&d.children&&y.push(...d.children)}return!1},o=(h,y)=>{if(h===""){r=[V(y,r)];return}r=$e(r,h,d=>[V(y,[d])])},s=(h,y)=>{r=$e(r,h,d=>[V(d.module,[V(y,d.children)])])},c=(h,y,d)=>{r=$e(r,h,g=>{var _;return[V(g.module,[...d?[V(y)]:[],...(_=g.children)!==null&&_!==void 0?_:[],...d?[]:[V(y)]])]})},u=(h,y,d)=>{r=$e(r,h,g=>[...d?[V(y)]:[],g,...d?[]:[V(y)]])},a=h=>{s(Co,h)},f=(h,y)=>{r=$e(r,h,d=>[V(y,d.children)])},l=h=>{r=$e(r,h,y=>y.children)},m=h=>{n.push(h)};return t.forEach(h=>{h({contains:i,addParent:o,append:s,addChild:c,addSibling:u,addModule:a,replace:f,remove:l,augment:m})}),{config:r,augmentation:h=>n.reduce((y,d)=>d(y),h)}}const Ko=p.createContext(null),Go=_e("useA11yContext","A11yContext",Ko);function If({children:e}){const[t,n]=p.useState(!1),[r,i]=p.useState(!1),o=p.useMemo(()=>({focusWithin:t,trackFocusWithin:(c,u)=>{const a=f=>l=>{var m;l.currentTarget.contains(l.relatedTarget)||n(f),(m=f?c:u)===null||m===void 0||m(l)};return{onFocus:a(!0),onBlur:a(!1)}},autoPlaying:r,setAutoPlaying:i}),[t,r]);return p.createElement(Ko.Provider,{value:o},e)}const Zo=p.createContext(null),br=_e("useDocument","DocumentContext",Zo);function Lf({nodeRef:e,children:t}){const n=p.useMemo(()=>{const r=o=>{var s;return((s=o||e.current)===null||s===void 0?void 0:s.ownerDocument)||document};return{getOwnerDocument:r,getOwnerWindow:o=>{var s;return((s=r(o))===null||s===void 0?void 0:s.defaultView)||window}}},[e]);return p.createElement(Zo.Provider,{value:n},t)}const Jo=p.createContext(null),Qt=_e("useEvents","EventsContext",Jo);function Tf({children:e}){const[t]=p.useState({});p.useEffect(()=>()=>{Object.keys(t).forEach(r=>delete t[r])},[t]);const n=p.useMemo(()=>{const r=(s,c)=>{var u;(u=t[s])===null||u===void 0||u.splice(0,t[s].length,...t[s].filter(a=>a!==c))};return{publish:(...[s,c])=>{var u;(u=t[s])===null||u===void 0||u.forEach(a=>a(c))},subscribe:(s,c)=>(t[s]||(t[s]=[]),t[s].push(c),()=>r(s,c)),unsubscribe:r}},[t]);return p.createElement(Jo.Provider,{value:n},e)}const Qo=p.createContext(null),ut=_e("useLightboxProps","LightboxPropsContext",Qo);function Df({children:e,...t}){return p.createElement(Qo.Provider,{value:t},e)}const es=p.createContext(null),en=_e("useLightboxState","LightboxStateContext",es),ts=p.createContext(null),kf=_e("useLightboxDispatch","LightboxDispatchContext",ts);function $f(e,t){switch(t.type){case"swipe":{const{slides:n}=e,r=(t==null?void 0:t.increment)||0,i=e.globalIndex+r,o=Er(i,n.length),s=er(n,o),c=r||t.duration!==void 0?{increment:r,duration:t.duration,easing:t.easing}:void 0;return{slides:n,currentIndex:o,globalIndex:i,currentSlide:s,animation:c}}case"update":return t.slides!==e.slides||t.index!==e.currentIndex?{slides:t.slides,currentIndex:t.index,globalIndex:t.index,currentSlide:er(t.slides,t.index)}:e;default:throw new Error(Ef)}}function Ff({slides:e,index:t,children:n}){const[r,i]=p.useReducer($f,{slides:e,currentIndex:t,globalIndex:t,currentSlide:er(e,t)}),[o,s]=p.useState(e),[c,u]=p.useState(t);(e!==o||t!==c)&&(s(e),u(t),i({type:"update",slides:e,index:t}));const a=p.useMemo(()=>({...r,state:r,dispatch:i}),[r,i]);return p.createElement(ts.Provider,{value:i},p.createElement(es.Provider,{value:a},n))}const ns=p.createContext(null),Wf=_e("useRTLContext","RTLContext",ns);function zf({isRTL:e,children:t}){const n=p.useMemo(()=>({isRTL:e}),[e]);return p.createElement(ns.Provider,{value:n},t)}const rs=p.createContext(null),tn=_e("useTimeouts","TimeoutsContext",rs);function Uf({children:e}){const[t]=p.useState([]);p.useEffect(()=>()=>{t.forEach(r=>window.clearTimeout(r)),t.splice(0,t.length)},[t]);const n=p.useMemo(()=>{const r=s=>{t.splice(0,t.length,...t.filter(c=>c!==s))};return{setTimeout:(s,c)=>{const u=window.setTimeout(()=>{r(u),s()},c);return t.push(u),u},clearTimeout:s=>{s!==void 0&&(r(s),window.clearTimeout(s))}}},[t]);return p.createElement(rs.Provider,{value:n},e)}const is=p.forwardRef(function({label:t,className:n,icon:r,renderIcon:i,onClick:o,style:s,...c},u){const{styles:a,labels:f}=ut(),l=qe(f,t);return p.createElement("button",{ref:u,type:"button",title:l,"aria-label":l,className:me(T(vf),n),onClick:o,style:{...s,...a.button},...c},i?i():p.createElement(r,{className:T(Qn),style:a.icon}))});function Bf(e,t){const n=r=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24","aria-hidden":"true",focusable:"false",...r},t);return n.displayName=e,n}function ft(e,t){return Bf(e,p.createElement("g",{fill:"currentColor"},p.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}),t))}const jf=ft("Close",p.createElement("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})),qf=ft("Previous",p.createElement("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})),Vf=ft("Next",p.createElement("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})),Xf=ft("Loading",p.createElement(p.Fragment,null,Array.from({length:8}).map((e,t,n)=>p.createElement("line",{key:t,x1:"12",y1:"6.5",x2:"12",y2:"1.8",strokeLinecap:"round",strokeWidth:"2.6",stroke:"currentColor",strokeOpacity:1/n.length*(t+1),transform:`rotate(${360/n.length*t}, 12, 12)`})))),Hf=ft("Error",p.createElement("path",{d:"M21.9,21.9l-8.49-8.49l0,0L3.59,3.59l0,0L2.1,2.1L0.69,3.51L3,5.83V19c0,1.1,0.9,2,2,2h13.17l2.31,2.31L21.9,21.9z M5,18 l3.5-4.5l2.5,3.01L12.17,15l3,3H5z M21,18.17L5.83,3H19c1.1,0,2,0.9,2,2V18.17z"})),nn=qo()?p.useLayoutEffect:p.useEffect;function os(){const[e,t]=p.useState(!1);return p.useEffect(()=>{var n,r;const i=(n=window.matchMedia)===null||n===void 0?void 0:n.call(window,"(prefers-reduced-motion: reduce)");t(i==null?void 0:i.matches);const o=s=>t(s.matches);return(r=i==null?void 0:i.addEventListener)===null||r===void 0||r.call(i,"change",o),()=>{var s;return(s=i==null?void 0:i.removeEventListener)===null||s===void 0?void 0:s.call(i,"change",o)}},[]),e}function Yf(e){let t=0,n=0,r=0;const o=window.getComputedStyle(e).transform.match(/matrix.*\((.+)\)/);if(o){const s=o[1].split(",").map(Jt);s.length===6?(t=s[4],n=s[5]):s.length===16&&(t=s[12],n=s[13],r=s[14])}return{x:t,y:n,z:r}}function _i(e,t){const n=p.useRef(void 0),r=p.useRef(void 0),i=os();return nn(()=>{var o,s,c;if(e.current&&n.current!==void 0&&!i){const{keyframes:u,duration:a,easing:f,onfinish:l}=t(n.current,e.current.getBoundingClientRect(),Yf(e.current))||{};if(u&&a){(o=r.current)===null||o===void 0||o.cancel(),r.current=void 0;try{r.current=(c=(s=e.current).animate)===null||c===void 0?void 0:c.call(s,u,{duration:a,easing:f})}catch(m){console.error(m)}r.current&&(r.current.onfinish=()=>{r.current=void 0,l==null||l()})}}n.current=void 0}),{prepareAnimation:o=>{n.current=o},isAnimationPlaying:()=>{var o;return((o=r.current)===null||o===void 0?void 0:o.playState)==="running"}}}function ss(){const e=p.useRef(null),t=p.useRef(void 0),[n,r]=p.useState();return{setContainerRef:p.useCallback(o=>{e.current=o,t.current&&(t.current.disconnect(),t.current=void 0);const s=()=>{if(o){const c=window.getComputedStyle(o),u=a=>parseFloat(a)||0;r({width:Math.round(o.clientWidth-u(c.paddingLeft)-u(c.paddingRight)),height:Math.round(o.clientHeight-u(c.paddingTop)-u(c.paddingBottom))})}else r(void 0)};s(),o&&typeof ResizeObserver<"u"&&(t.current=new ResizeObserver(s),t.current.observe(o))},[]),containerRef:e,containerRect:n}}function Pt(){const e=p.useRef(void 0),{setTimeout:t,clearTimeout:n}=tn();return p.useCallback((r,i)=>{n(e.current),e.current=t(r,i>0?i:0)},[t,n])}function U(e){const t=p.useRef(e);return nn(()=>{t.current=e}),p.useCallback((...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function wi(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function nr(e,t){return p.useMemo(()=>e==null&&t==null?null:n=>{wi(e,n),wi(t,n)},[e,t])}function Kf(e,t=!1){const n=p.useRef(!1);nn(()=>{t&&n.current&&(n.current=!1,e())},[t,e]);const r=p.useCallback(()=>{n.current=!0},[]),i=p.useCallback(()=>{n.current=!1},[]);return{onFocus:r,onBlur:i}}function Sr(){return Wf().isRTL}function Gf(){const[e]=p.useState({}),t=p.useCallback((i,o)=>{var s;(s=e[i])===null||s===void 0||s.forEach(c=>{o.isPropagationStopped()||c(o)})},[e]),n=p.useMemo(()=>({onPointerDown:i=>t(To,i),onPointerMove:i=>t(Do,i),onPointerUp:i=>t(ko,i),onPointerLeave:i=>t($o,i),onPointerCancel:i=>t(Fo,i),onKeyDown:i=>t(Wo,i),onKeyUp:i=>t(mf,i),onWheel:i=>t(zo,i)}),[t]),r=p.useCallback((i,o)=>(e[i]||(e[i]=[]),e[i].unshift(o),()=>{const s=e[i];s&&s.splice(0,s.length,...s.filter(c=>c!==o))}),[e]);return{registerSensors:n,subscribeSensors:r}}function vi(e,t){const n=p.useRef(0),r=Pt(),i=U((...o)=>{n.current=Date.now(),e(...o)});return p.useCallback((...o)=>{r(()=>{i(...o)},t-(Date.now()-n.current))},[t,i,r])}const Cn=vr("slide"),Mn=vr("slide_image");function Zf({slide:e,offset:t,render:n,rect:r,imageFit:i,imageProps:o,onClick:s,onLoad:c,onError:u,style:a}){var f,l,m,h,y,d,g,_;const[E,b]=p.useState(Rn),{publish:w}=Qt(),{setTimeout:v}=tn(),x=p.useRef(null);p.useEffect(()=>{t===0&&w(hf(E))},[t,E,w]);const O=U(L=>{("decode"in L?L.decode():Promise.resolve()).catch(()=>{}).then(()=>{L.parentNode&&(b(Nn),v(()=>{c==null||c(L)},0))})}),C=p.useCallback(L=>{x.current=L,L!=null&&L.complete&&O(L)},[O]),R=p.useCallback(L=>{O(L.currentTarget)},[O]),B=U(()=>{b(An),u==null||u()}),F=Pf(e,i),I=(L,De)=>Number.isFinite(L)?L:De,A=I(Math.max(...((l=(f=e.srcSet)===null||f===void 0?void 0:f.map(L=>L.width))!==null&&l!==void 0?l:[]).concat(e.width?[e.width]:[]).filter(Boolean)),((m=x.current)===null||m===void 0?void 0:m.naturalWidth)||0),M=I(Math.max(...((y=(h=e.srcSet)===null||h===void 0?void 0:h.map(L=>L.height))!==null&&y!==void 0?y:[]).concat(e.height?[e.height]:[]).filter(Boolean)),((d=x.current)===null||d===void 0?void 0:d.naturalHeight)||0),N=A&&M?{maxWidth:`min(${A}px, 100%)`,maxHeight:`min(${M}px, 100%)`}:{maxWidth:"100%",maxHeight:"100%"},q=(g=e.srcSet)===null||g===void 0?void 0:g.slice().sort((L,De)=>L.width-De.width).map(L=>`${L.src} ${L.width}w`).join(", "),H=()=>r&&!F&&e.width&&e.height?r.height/e.height*e.width:Number.MAX_VALUE,Ee=q&&r&&qo()?`${Math.round(Math.min(H(),r.width))}px`:void 0,{style:He,className:rn,...we}=(typeof o=="function"?o(e):o)||{};return p.createElement(p.Fragment,null,p.createElement("img",{ref:C,onLoad:R,onError:B,onClick:s,draggable:!1,className:me(T(Mn()),F&&T(Mn("cover")),E!==Nn&&T(Mn("loading")),rn),style:{...N,...a,...He},...we,alt:(_=e.alt)!==null&&_!==void 0?_:"",sizes:Ee,srcSet:q,src:e.src}),E!==Nn&&p.createElement("div",{className:T(Cn(df))},E===Rn&&(n!=null&&n.iconLoading?n.iconLoading():p.createElement(Xf,{className:me(T(Qn),T(Cn(Rn)))})),E===An&&(n!=null&&n.iconError?n.iconError():p.createElement(Hf,{className:me(T(Qn),T(Cn(An)))}))))}const Jf=p.forwardRef(function({className:t,children:n,onFocus:r,onBlur:i,...o},s){const c=p.useRef(null),[u,a]=p.useState(!1),{trackFocusWithin:f}=Go(),l=U(()=>{if(c.current){const m=window.getComputedStyle(c.current).direction==="rtl";m!==u&&a(m)}});return p.useEffect(l),p.createElement(Lf,{nodeRef:c},p.createElement(zf,{isRTL:u},p.createElement("div",{ref:nr(s,c),className:me(T("root"),t),...f(r,i),...o},n)))});var K;(function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL=2]="PULL",e[e.ANIMATION=3]="ANIMATION"})(K||(K={}));function Qf(e,t,n,r,i){p.useEffect(()=>jo(e(To,t),e(Do,n),e(ko,r),e($o,r),e(Fo,r)),[e,t,n,r,i])}var oe;(function(e){e[e.NONE=0]="NONE",e[e.SWIPE=1]="SWIPE",e[e.PULL=2]="PULL"})(oe||(oe={}));const In=30;function ea({disableSwipeNavigation:e,closeOnBackdropClick:t},n,r,i,o,s,c,u,a,f,l,m,h,y,d,g){const _=p.useRef(0),E=p.useRef([]),b=p.useRef(void 0),w=p.useRef(0),v=p.useRef(oe.NONE),x=p.useCallback(A=>{b.current===A.pointerId&&(b.current=void 0,v.current=oe.NONE);const M=E.current;M.splice(0,M.length,...M.filter(N=>N.pointerId!==A.pointerId))},[]),O=p.useCallback(A=>{x(A),A.persist(),E.current.push(A)},[x]),C=p.useCallback(A=>E.current.find(({pointerId:M})=>A.pointerId===M),[]),R=U(A=>{O(A)}),B=(A,M)=>l&&A>M||f&&A<-M,F=U(A=>{const M=C(A);if(M)if(b.current===A.pointerId){const N=Date.now()-w.current,q=_.current;v.current===oe.SWIPE?Math.abs(q)>.3*i||Math.abs(q)>5&&N<o?u(q,N):a(q):v.current===oe.PULL&&(B(q,2*In)?y(q,N):d(q)),_.current=0,v.current=oe.NONE}else{const{target:N}=A;t&&N instanceof HTMLElement&&N===M.target&&(N.classList.contains(T(wr))||N.classList.contains(T(yf)))&&g()}x(A)}),I=U(A=>{const M=C(A);if(M){const N=b.current===A.pointerId;if(A.buttons===0){N&&_.current!==0?F(A):x(M);return}const q=A.clientX-M.clientX,H=A.clientY-M.clientY;if(b.current===void 0){const Ee=He=>{O(A),b.current=A.pointerId,w.current=Date.now(),v.current=He};Math.abs(q)>Math.abs(H)&&Math.abs(q)>In&&r(q)?e||(Ee(oe.SWIPE),s()):Math.abs(H)>Math.abs(q)&&B(H,In)&&(Ee(oe.PULL),m())}else N&&(v.current===oe.SWIPE?(_.current=q,c(q)):v.current===oe.PULL&&(_.current=H,h(H)))}});Qf(n,R,I,F)}function ta({preventDefaultWheelX:e,preventDefaultWheelY:t}){const n=p.useRef(null),r=U(i=>{const o=Math.abs(i.deltaX)>Math.abs(i.deltaY);(o&&e||!o&&t||i.ctrlKey)&&i.preventDefault()});return p.useCallback(i=>{var o;i?i.addEventListener("wheel",r,{passive:!1}):(o=n.current)===null||o===void 0||o.removeEventListener("wheel",r),n.current=i},[r])}function na(e,t,n,r,i,o,s,c,u){const a=p.useRef(0),f=p.useRef(0),l=p.useRef(void 0),m=p.useRef(void 0),h=p.useRef(0),y=p.useRef(void 0),d=p.useRef(0),{setTimeout:g,clearTimeout:_}=tn(),E=p.useCallback(()=>{l.current&&(_(l.current),l.current=void 0)},[_]),b=p.useCallback(()=>{m.current&&(_(m.current),m.current=void 0)},[_]),w=U(()=>{e!==K.SWIPE&&(a.current=0,d.current=0,E(),b())});p.useEffect(w,[e,w]);const v=U(O=>{m.current=void 0,a.current===O&&u(a.current)}),x=U(O=>{if(O.ctrlKey||Math.abs(O.deltaY)>Math.abs(O.deltaX))return;const C=R=>{h.current=R,_(y.current),y.current=R>0?g(()=>{h.current=0,y.current=void 0},300):void 0};if(e===K.NONE){if(Math.abs(O.deltaX)<=1.2*Math.abs(h.current)){C(O.deltaX);return}if(!n(-O.deltaX))return;if(f.current+=O.deltaX,E(),Math.abs(f.current)>30)f.current=0,C(0),d.current=Date.now(),o();else{const R=f.current;l.current=g(()=>{l.current=void 0,R===f.current&&(f.current=0)},i)}}else if(e===K.SWIPE){let R=a.current-O.deltaX;if(R=Math.min(Math.abs(R),r)*Math.sign(R),a.current=R,s(R),b(),Math.abs(R)>.2*r){C(O.deltaX),c(R,Date.now()-d.current);return}m.current=g(()=>v(R),2*i)}else C(O.deltaX)});p.useEffect(()=>t(zo,x),[t,x])}const Ei=vr("container"),cs=p.createContext(null),at=_e("useController","ControllerContext",cs);function ra({children:e,...t}){var n;const{carousel:r,animation:i,controller:o,on:s,styles:c,render:u}=t,{closeOnPullUp:a,closeOnPullDown:f,preventDefaultWheelX:l,preventDefaultWheelY:m}=o,[h,y]=p.useState(),d=en(),g=kf(),[_,E]=p.useState(K.NONE),b=p.useRef(0),w=p.useRef(0),v=p.useRef(1),{registerSensors:x,subscribeSensors:O}=Gf(),{subscribe:C,publish:R}=Qt(),B=Pt(),F=Pt(),I=Pt(),{containerRef:A,setContainerRef:M,containerRect:N}=ss(),q=nr(ta({preventDefaultWheelX:l,preventDefaultWheelY:m}),M),H=p.useRef(null),Ee=nr(H,void 0),{getOwnerDocument:He}=br(),rn=Sr(),we=P=>(rn?-1:1)*(typeof P=="number"?P:1),L=U(()=>{var P;return(P=A.current)===null||P===void 0?void 0:P.focus()}),De=U(()=>t),Pr=U(()=>d),lt=p.useCallback(P=>R(Oe,P),[R]),dt=p.useCallback(P=>R(xe,P),[R]),ke=p.useCallback(()=>R(je),[R]),on=P=>!(r.finite&&(we(P)>0&&d.currentIndex===0||we(P)<0&&d.currentIndex===d.slides.length-1)),Or=P=>{var W;b.current=P,(W=A.current)===null||W===void 0||W.style.setProperty(J("swipe_offset"),`${Math.round(P)}px`)},sn=P=>{var W,G;w.current=P,v.current=(()=>{const Ke=f&&P>0?P:a&&P<0?-P:0;return Math.min(Math.max(Sf(1-Ke/60*(1-.5),2),.5),1)})(),(W=A.current)===null||W===void 0||W.style.setProperty(J("pull_offset"),`${Math.round(P)}px`),(G=A.current)===null||G===void 0||G.style.setProperty(J("pull_opacity"),`${v.current}`)},{prepareAnimation:as}=_i(H,(P,W,G)=>{if(H.current&&N)return{keyframes:[{transform:`translate(0, ${P.rect.y-W.y+G.y}px)`,opacity:P.opacity},{transform:"translate(0, 0)",opacity:1}],duration:P.duration,easing:i.easing.fade}}),xr=(P,W)=>{if(a||f){sn(P);let G=0;H.current&&(G=i.fade*(W?2:1),as({rect:H.current.getBoundingClientRect(),opacity:v.current,duration:G})),I(()=>{sn(0),E(K.NONE)},G),E(K.ANIMATION),W||ke()}},{prepareAnimation:ls,isAnimationPlaying:ds}=_i(H,(P,W,G)=>{var ae;if(H.current&&N&&(!((ae=d.animation)===null||ae===void 0)&&ae.duration)){const re=Wt(r.spacing),Ke=(re.percent?re.percent*N.width/100:re.pixel)||0;return{keyframes:[{transform:`translate(${we(d.globalIndex-P.index)*(N.width+Ke)+P.rect.x-W.x+G.x}px, 0)`},{transform:"translate(0, 0)"}],duration:d.animation.duration,easing:d.animation.easing}}}),Ye=U(P=>{var W,G;const ae=P.offset||0,re=ae?i.swipe:(W=i.navigation)!==null&&W!==void 0?W:i.swipe,Ke=!ae&&!ds()?i.easing.navigation:i.easing.swipe;let{direction:ht}=P;const pt=(G=P.count)!==null&&G!==void 0?G:1;let cn=K.ANIMATION,le=re*pt;if(!ht){const Ge=N==null?void 0:N.width,Cr=P.duration||0,fn=Ge?re/Ge*Math.abs(ae):re;pt!==0?(Cr<fn?le=le/fn*Math.max(Cr,fn/5):Ge&&(le=re/Ge*(Ge-Math.abs(ae))),ht=we(ae)>0?Oe:xe):le=re/2}let un=0;ht===Oe?on(we(1))?un=-pt:(cn=K.NONE,le=re):ht===xe&&(on(we(-1))?un=pt:(cn=K.NONE,le=re)),le=Math.round(le),F(()=>{Or(0),E(K.NONE)},le),H.current&&ls({rect:H.current.getBoundingClientRect(),index:d.globalIndex}),E(cn),R(mi,{type:"swipe",increment:un,duration:le,easing:Ke})});p.useEffect(()=>{var P,W;!((P=d.animation)===null||P===void 0)&&P.increment&&(!((W=d.animation)===null||W===void 0)&&W.duration)&&B(()=>g({type:"swipe",increment:0}),d.animation.duration)},[d.animation,g,B]);const Rr=[O,on,(N==null?void 0:N.width)||0,i.swipe,()=>E(K.SWIPE),P=>Or(P),(P,W)=>Ye({offset:P,duration:W,count:1}),P=>Ye({offset:P,count:0})],hs=[()=>{f&&E(K.PULL)},P=>sn(P),P=>xr(P),P=>xr(P,!0)];ea(o,...Rr,a,f,...hs,ke),na(_,...Rr);const Ar=U(()=>{o.focus&&He().querySelector(`.${T(_r)} .${T(Ei())}`)&&L()});p.useEffect(Ar,[Ar]);const Nr=U(()=>{var P;(P=s.view)===null||P===void 0||P.call(s,{index:d.currentIndex})});p.useEffect(Nr,[d.globalIndex,Nr]),p.useEffect(()=>jo(C(Oe,P=>Ye({direction:Oe,...P})),C(xe,P=>Ye({direction:xe,...P})),C(mi,P=>g(P))),[C,Ye,g]);const ps=p.useMemo(()=>({prev:lt,next:dt,close:ke,focus:L,slideRect:N?Of(N,r.padding):{width:0,height:0},containerRect:N||{width:0,height:0},subscribeSensors:O,containerRef:A,setCarouselRef:Ee,toolbarWidth:h,setToolbarWidth:y}),[lt,dt,ke,L,O,N,A,Ee,h,y,r.padding]);return p.useImperativeHandle(o.ref,()=>({prev:lt,next:dt,close:ke,focus:L,getLightboxProps:De,getLightboxState:Pr}),[lt,dt,ke,L,De,Pr]),p.createElement("div",{ref:q,className:me(T(Ei()),T(Io)),style:{..._===K.SWIPE?{[J("swipe_offset")]:`${Math.round(b.current)}px`}:null,..._===K.PULL?{[J("pull_offset")]:`${Math.round(w.current)}px`,[J("pull_opacity")]:`${v.current}`}:null,...o.touchAction!=="none"?{[J("controller_touch_action")]:o.touchAction}:null,...c.container},tabIndex:-1,...x},N&&p.createElement(cs.Provider,{value:ps},e,(n=u.controls)===null||n===void 0?void 0:n.call(u)))}const ia=Te(Co,ra);function be(e){return ct(No,e)}function bi(e){return ct(wr,e)}function oa({slide:e,offset:t}){const n=p.useRef(null),{currentIndex:r,slides:i}=en(),{slideRect:o,focus:s}=at(),{render:c,carousel:{imageFit:u,imageProps:a},on:{click:f},styles:{slide:l},labels:m}=ut(),{getOwnerDocument:h}=br(),y=t!==0;p.useEffect(()=>{var g;y&&(!((g=n.current)===null||g===void 0)&&g.contains(h().activeElement))&&s()},[y,s,h]);const d=()=>{var g,_,E,b;let w=(g=c.slide)===null||g===void 0?void 0:g.call(c,{slide:e,offset:t,rect:o});return!w&&Vo(e)&&(w=p.createElement(Zf,{slide:e,offset:t,render:c,rect:o,imageFit:u,imageProps:a,onClick:y?void 0:()=>f==null?void 0:f({index:r})})),w?p.createElement(p.Fragment,null,(_=c.slideHeader)===null||_===void 0?void 0:_.call(c,{slide:e}),((E=c.slideContainer)!==null&&E!==void 0?E:(({children:v})=>v))({slide:e,children:w}),(b=c.slideFooter)===null||b===void 0?void 0:b.call(c,{slide:e})):null};return p.createElement("div",{ref:n,className:me(T(bi()),!y&&T(bi("current")),T(Io)),...Nf(y),style:l,role:"group","aria-roledescription":qe(m,"Slide"),"aria-label":bf(m,i,r+t)},d())}function sa(){const e=ut().styles.slide;return p.createElement("div",{className:T(wr),style:e})}function ca({carousel:e,labels:t}){const{slides:n,currentIndex:r,globalIndex:i}=en(),{setCarouselRef:o}=at(),{autoPlaying:s,focusWithin:c}=Go(),u=Wt(e.spacing),a=Wt(e.padding),f=Rf(e,n,1),l=[];if(Xo(n))for(let m=r-f;m<=r+f;m+=1){const h=Ho(n,m),y=i-r+m,d=e.finite&&(m<0||m>n.length-1);l.push(d?{key:y}:{key:[`${y}`,xf(h)].filter(Boolean).join("|"),offset:m-r,slide:h})}return p.createElement("div",{ref:o,className:me(T(be()),l.length>0&&T(be("with_slides"))),style:{[`${J(be("slides_count"))}`]:l.length,[`${J(be("spacing_px"))}`]:u.pixel||0,[`${J(be("spacing_percent"))}`]:u.percent||0,[`${J(be("padding_px"))}`]:a.pixel||0,[`${J(be("padding_percent"))}`]:a.percent||0},role:"region","aria-live":s&&!c?"off":"polite","aria-roledescription":qe(t,"Carousel"),"aria-label":qe(t,"Photo gallery")},l.map(({key:m,slide:h,offset:y})=>h?p.createElement(oa,{key:m,slide:h,offset:y}):p.createElement(sa,{key:m})))}const ua=Te(No,ca);function us(){const{carousel:e}=ut(),{slides:t,currentIndex:n}=en(),r=t.length===0||e.finite&&n===0,i=t.length===0||e.finite&&n===t.length-1;return{prevDisabled:r,nextDisabled:i}}function fa(e){var t;const n=Sr(),{publish:r}=Qt(),{animation:i,controller:o}=ut(),{prevDisabled:s,nextDisabled:c}=us(),u=((t=i.navigation)!==null&&t!==void 0?t:i.swipe)/2,a=vi(()=>r(Oe),u),f=vi(()=>r(xe),u),l=U(m=>{switch(m.key){case gf:if(!o.closeOnEscape)return;r(je);break;case _f:(n?c:s)||(n?f:a)();break;case wf:(n?s:c)||(n?a:f)();break;default:return}m.stopPropagation()});p.useEffect(()=>e(Wo,l),[e,l])}function Si({label:e,icon:t,renderIcon:n,action:r,onClick:i,disabled:o,style:s}){return p.createElement(is,{label:e,icon:t,renderIcon:n,className:T(`navigation_${r}`),disabled:o,onClick:i,style:s,...Kf(at().focus,o)})}function aa({render:{buttonPrev:e,buttonNext:t,iconPrev:n,iconNext:r},styles:i}){const{prev:o,next:s,subscribeSensors:c}=at(),{prevDisabled:u,nextDisabled:a}=us();return fa(c),p.createElement(p.Fragment,null,e?e():p.createElement(Si,{label:"Previous",action:Oe,icon:qf,renderIcon:n,style:i.navigationPrev,disabled:u,onClick:o}),t?t():p.createElement(Si,{label:"Next",action:xe,icon:Vf,renderIcon:r,style:i.navigationNext,disabled:a,onClick:s}))}const la=Te(ff,aa),Pi=T(pf),da=T(Lo);function ha(e){return"style"in e}function Oi(e,t,n){const r=window.getComputedStyle(e),i=n?"padding-left":"padding-right",o=n?r.paddingLeft:r.paddingRight,s=e.style.getPropertyValue(i);return e.style.setProperty(i,`${(Jt(o)||0)+t}px`),()=>{s?e.style.setProperty(i,s):e.style.removeProperty(i)}}function pa({noScroll:{disabled:e},children:t}){const n=Sr(),{getOwnerDocument:r,getOwnerWindow:i}=br();return p.useEffect(()=>{if(e)return()=>{};const o=[],s=i(),{body:c,documentElement:u}=r(),a=Math.round(s.innerWidth-u.clientWidth);if(a>0){o.push(Oi(c,a,n));const f=c.getElementsByTagName("*");for(let l=0;l<f.length;l+=1){const m=f[l];ha(m)&&s.getComputedStyle(m).getPropertyValue("position")==="fixed"&&!m.classList.contains(da)&&o.push(Oi(m,a,n))}}return c.classList.add(Pi),()=>{c.classList.remove(Pi),o.forEach(f=>f())}},[n,e,r,i]),p.createElement(p.Fragment,null,t)}const ya=Te(af,pa);function xi(e){return ct(_r,e)}function Ri(e,t,n){const r=e.getAttribute(t);return e.setAttribute(t,n),()=>{r?e.setAttribute(t,r):e.removeAttribute(t)}}function ma({portal:{root:e,container:{className:t,style:n,...r}={}},animation:i,styles:o,className:s,on:c,close:u,labels:a,children:f}){const[l,m]=p.useState(!1),[h,y]=p.useState(!1),d=p.useRef([]),g=p.useRef(null),{setTimeout:_}=tn(),{subscribe:E}=Qt(),w=os()?0:i.fade;p.useEffect(()=>(m(!0),()=>{m(!1),y(!1)}),[]);const v=U(()=>{d.current.forEach(R=>R()),d.current=[]}),x=U(()=>{var R;y(!1),v(),(R=c.exiting)===null||R===void 0||R.call(c),_(()=>{var B;(B=c.exited)===null||B===void 0||B.call(c),u()},w)});p.useEffect(()=>E(je,x),[E,x]);const O=U(R=>{var B,F,I;Cf(R),y(!0),(B=c.entering)===null||B===void 0||B.call(c);const A=(I=(F=R.parentNode)===null||F===void 0?void 0:F.children)!==null&&I!==void 0?I:[];for(let M=0;M<A.length;M+=1){const N=A[M];["TEMPLATE","SCRIPT","STYLE"].indexOf(N.tagName)===-1&&N!==R&&(d.current.push(Ri(N,"inert","")),d.current.push(Ri(N,"aria-hidden","true")))}d.current.push(()=>{var M,N;(N=(M=g.current)===null||M===void 0?void 0:M.focus)===null||N===void 0||N.call(M)}),_(()=>{var M;(M=c.entered)===null||M===void 0||M.call(c)},w)}),C=p.useCallback(R=>{R?O(R):v()},[O,v]);return l?_s.createPortal(p.createElement(Jf,{ref:C,className:me(s,t,T(xi()),T(Lo),h&&T(xi("open"))),"aria-modal":!0,role:"dialog","aria-label":qe(a,"Lightbox"),style:{...i.fade!==tr.animation.fade?{[J("fade_animation_duration")]:`${w}ms`}:null,...i.easing.fade!==tr.animation.easing.fade?{[J("fade_animation_timing_function")]:i.easing.fade}:null,...o.root,...n},onFocus:R=>{g.current||(g.current=R.relatedTarget)},...r},f),(typeof e=="function"?e():e)||document.body):null}const ga=Te(_r,ma);function _a({children:e}){return p.createElement(p.Fragment,null,e)}const wa=Te(lf,_a);function va(e){return ct(Mo,e)}function Ea({toolbar:{buttons:e},render:{buttonClose:t,iconClose:n},styles:r}){const{close:i,setToolbarWidth:o}=at(),{setContainerRef:s,containerRect:c}=ss();nn(()=>{o(c==null?void 0:c.width)},[o,c==null?void 0:c.width]);const u=()=>t?t():p.createElement(is,{key:je,label:"Close",icon:jf,renderIcon:n,onClick:i});return p.createElement("div",{ref:s,style:r.toolbar,className:T(va())},e==null?void 0:e.map(a=>a===je?u():a))}const ba=Te(Mo,Ea);function fs(e,t){var n;return p.createElement(e.module.component,{key:e.module.name,...t},(n=e.children)===null||n===void 0?void 0:n.map(r=>fs(r,t)))}function Sa(e,t={}){const{easing:n,...r}=e,{easing:i,...o}=t;return{easing:{...n,...i},...r,...o}}function Xa({carousel:e,animation:t,render:n,toolbar:r,controller:i,noScroll:o,on:s,plugins:c,slides:u,index:a,...f}){const{animation:l,carousel:m,render:h,toolbar:y,controller:d,noScroll:g,on:_,slides:E,index:b,plugins:w,...v}=tr,{config:x,augmentation:O}=Mf([V(ga,[V(ya,[V(ia,[V(ua),V(ba),V(la)])])])],c||w),C=O({animation:Sa(l,t),carousel:{...m,...e},render:{...h,...n},toolbar:{...y,...r},controller:{...d,...i},noScroll:{...g,...o},on:{..._,...s},...v,...f});return C.open?p.createElement(Df,{...C},p.createElement(Ff,{slides:u||E,index:Jt(a||b)},p.createElement(Uf,null,p.createElement(Tf,null,p.createElement(If,null,fs(V(wa,x),C)))))):null}export{Ua as D,ja as E,Ba as I,Xa as L,Wa as P,Na as a,Ta as b,xa as c,qc as d,$a as e,Fa as f,sr as g,qa as h,Va as i,Ue as j,Da as k,La as l,Nc as m,Jc as n,Ia as p,za as r,Ca as s,ka as t,Ra as u,Aa as w};
|