Files
Ydisks-Xianyu-Helper/internal/webui/static/assets/vendor-cRYyTeIw.js
T

34 lines
105 KiB
JavaScript
Raw Blame History

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