(function(bt,gt){typeof exports=="object"&&typeof module<"u"?module.exports=gt():typeof define=="function"&&define.amd?define(gt):(bt=typeof globalThis<"u"?globalThis:bt||self,bt.ReactProductSliderUserTarget=gt())})(this,function(){"use strict";var H1=Object.defineProperty;var jy=bt=>{throw TypeError(bt)};var x1=(bt,gt,Ut)=>gt in bt?H1(bt,gt,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):bt[gt]=Ut;var pe=(bt,gt,Ut)=>x1(bt,typeof gt!="symbol"?gt+"":gt,Ut),Wf=(bt,gt,Ut)=>gt.has(bt)||jy("Cannot "+Ut);var g=(bt,gt,Ut)=>(Wf(bt,gt,"read from private field"),Ut?Ut.call(bt):gt.get(bt)),P=(bt,gt,Ut)=>gt.has(bt)?jy("Cannot add the same private member more than once"):gt instanceof WeakSet?gt.add(bt):gt.set(bt,Ut),G=(bt,gt,Ut,cl)=>(Wf(bt,gt,"write to private field"),cl?cl.call(bt,Ut):gt.set(bt,Ut),Ut),ht=(bt,gt,Ut)=>(Wf(bt,gt,"access private method"),Ut);var oc=(bt,gt,Ut,cl)=>({set _(dc){G(bt,gt,dc,Ut)},get _(){return g(bt,gt,cl)}});var fl,Ma,Xl,Gr,Vl,Ca,Zl,Lr,rl,Xr,Kl,Jl,Me,ol,le,Xn,dl,Ke,za,Vr,Pe,Zr,Ie,se,hl,ta,il,Kr,ra,Je,Vn,Jr,xt,Ua,Na,kl,$l,ja,Fl,Wl,kr,ye,rt,Zn,fe,yl,Pl,Ha,ea,Kn,Il,tn,vl,ml,xa,en,_t,Vu,Pf,If,tr,er,ar,lr,nr,Hy,$r,Yc;function bt(c){return c&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c}var gt={exports:{}},Ut={};/** * @license React * react-jsx-runtime.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 cl;function dc(){if(cl)return Ut;cl=1;var c=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function f(r,d,S){var E=null;if(S!==void 0&&(E=""+S),d.key!==void 0&&(E=""+d.key),"key"in d){S={};for(var M in d)M!=="key"&&(S[M]=d[M])}else S=d;return d=S.ref,{$$typeof:c,type:r,key:E,ref:d!==void 0?d:null,props:S}}return Ut.Fragment=i,Ut.jsx=f,Ut.jsxs=f,Ut}var hc={exports:{}},lt={};/** * @license React * react.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 ur;function xy(){if(ur)return lt;ur=1;var c=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),E=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),C=Symbol.iterator;function j(v){return v===null||typeof v!="object"?null:(v=C&&v[C]||v["@@iterator"],typeof v=="function"?v:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L=Object.assign,Q={};function B(v,H,F){this.props=v,this.context=H,this.refs=Q,this.updater=F||x}B.prototype.isReactComponent={},B.prototype.setState=function(v,H){if(typeof v!="object"&&typeof v!="function"&&v!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,v,H,"setState")},B.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function I(){}I.prototype=B.prototype;function W(v,H,F){this.props=v,this.context=H,this.refs=Q,this.updater=F||x}var nt=W.prototype=new I;nt.constructor=W,L(nt,B.prototype),nt.isPureReactComponent=!0;var tt=Array.isArray,V={H:null,A:null,T:null,S:null},ot=Object.prototype.hasOwnProperty;function At(v,H,F,J,Y,vt){return F=vt.ref,{$$typeof:c,type:v,key:H,ref:F!==void 0?F:null,props:vt}}function pt(v,H){return At(v.type,H,void 0,void 0,void 0,v.props)}function q(v){return typeof v=="object"&&v!==null&&v.$$typeof===c}function ut(v){var H={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(F){return H[F]})}var Bt=/\/+/g;function Yt(v,H){return typeof v=="object"&&v!==null&&v.key!=null?ut(""+v.key):H.toString(36)}function Ce(){}function re(v){switch(v.status){case"fulfilled":return v.value;case"rejected":throw v.reason;default:switch(typeof v.status=="string"?v.then(Ce,Ce):(v.status="pending",v.then(function(H){v.status==="pending"&&(v.status="fulfilled",v.value=H)},function(H){v.status==="pending"&&(v.status="rejected",v.reason=H)})),v.status){case"fulfilled":return v.value;case"rejected":throw v.reason}}throw v}function ne(v,H,F,J,Y){var vt=typeof v;(vt==="undefined"||vt==="boolean")&&(v=null);var it=!1;if(v===null)it=!0;else switch(vt){case"bigint":case"string":case"number":it=!0;break;case"object":switch(v.$$typeof){case c:case i:it=!0;break;case O:return it=v._init,ne(it(v._payload),H,F,J,Y)}}if(it)return Y=Y(v),it=J===""?"."+Yt(v,0):J,tt(Y)?(F="",it!=null&&(F=it.replace(Bt,"$&/")+"/"),ne(Y,H,F,"",function(Lt){return Lt})):Y!=null&&(q(Y)&&(Y=pt(Y,F+(Y.key==null||v&&v.key===Y.key?"":(""+Y.key).replace(Bt,"$&/")+"/")+it)),H.push(Y)),1;it=0;var oe=J===""?".":J+":";if(tt(v))for(var Tt=0;Tt>>1,v=w[Ot];if(0>>1;Otd(J,k))Yd(vt,J)?(w[Ot]=vt,w[Y]=k,Ot=Y):(w[Ot]=J,w[F]=k,Ot=F);else if(Yd(vt,k))w[Ot]=vt,w[Y]=k,Ot=Y;else break t}}return et}function d(w,et){var k=w.sortIndex-et.sortIndex;return k!==0?k:w.id-et.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var S=performance;c.unstable_now=function(){return S.now()}}else{var E=Date,M=E.now();c.unstable_now=function(){return E.now()-M}}var A=[],y=[],O=1,C=null,j=3,x=!1,L=!1,Q=!1,B=typeof setTimeout=="function"?setTimeout:null,I=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function nt(w){for(var et=f(y);et!==null;){if(et.callback===null)r(y);else if(et.startTime<=w)r(y),et.sortIndex=et.expirationTime,i(A,et);else break;et=f(y)}}function tt(w){if(Q=!1,nt(w),!L)if(f(A)!==null)L=!0,re();else{var et=f(y);et!==null&&ne(tt,et.startTime-w)}}var V=!1,ot=-1,At=5,pt=-1;function q(){return!(c.unstable_now()-ptw&&q());){var Ot=C.callback;if(typeof Ot=="function"){C.callback=null,j=C.priorityLevel;var v=Ot(C.expirationTime<=w);if(w=c.unstable_now(),typeof v=="function"){C.callback=v,nt(w),et=!0;break e}C===f(A)&&r(A),nt(w)}else r(A);C=f(A)}if(C!==null)et=!0;else{var H=f(y);H!==null&&ne(tt,H.startTime-w),et=!1}}break t}finally{C=null,j=k,x=!1}et=void 0}}finally{et?Bt():V=!1}}}var Bt;if(typeof W=="function")Bt=function(){W(ut)};else if(typeof MessageChannel<"u"){var Yt=new MessageChannel,Ce=Yt.port2;Yt.port1.onmessage=ut,Bt=function(){Ce.postMessage(null)}}else Bt=function(){B(ut,0)};function re(){V||(V=!0,Bt())}function ne(w,et){ot=B(function(){w(c.unstable_now())},et)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(w){w.callback=null},c.unstable_continueExecution=function(){L||x||(L=!0,re())},c.unstable_forceFrameRate=function(w){0>w||125Ot?(w.sortIndex=k,i(y,w),f(A)===null&&w===f(y)&&(Q?(I(ot),ot=-1):Q=!0,ne(tt,k-Ot))):(w.sortIndex=v,i(A,w),L||x||(L=!0,re())),w},c.unstable_shouldYield=q,c.unstable_wrapCallback=function(w){var et=j;return function(){var k=j;j=et;try{return w.apply(this,arguments)}finally{j=k}}}}(gc)),gc}var fr;function Qy(){return fr||(fr=1,mc.exports=wy()),mc.exports}var pc={exports:{}},ae={};/** * @license React * react-dom.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 rr;function By(){if(rr)return ae;rr=1;var c=yc();function i(A){var y="https://react.dev/errors/"+A;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(i){console.error(i)}}return c(),pc.exports=By(),pc.exports}/** * @license React * react-dom-client.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 dr;function Gy(){if(dr)return Bn;dr=1;var c=Qy(),i=yc(),f=Yy();function r(t){var e="https://react.dev/errors/"+t;if(1)":-1n||h[l]!==p[n]){var z=` `+h[l].replace(" at new "," at ");return t.displayName&&z.includes("")&&(z=z.replace("",t.displayName)),z}while(1<=l&&0<=n);break}}}finally{re=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?Ce(a):""}function w(t){switch(t.tag){case 26:case 27:case 5:return Ce(t.type);case 16:return Ce("Lazy");case 13:return Ce("Suspense");case 19:return Ce("SuspenseList");case 0:case 15:return t=ne(t.type,!1),t;case 11:return t=ne(t.type.render,!1),t;case 1:return t=ne(t.type,!0),t;default:return""}}function et(t){try{var e="";do e+=w(t),t=t.return;while(t);return e}catch(a){return` Error generating stack: `+a.message+` `+a.stack}}function k(t){var e=t,a=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(a=e.return),t=e.return;while(t)}return e.tag===3?a:null}function Ot(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function v(t){if(k(t)!==t)throw Error(r(188))}function H(t){var e=t.alternate;if(!e){if(e=k(t),e===null)throw Error(r(188));return e!==t?null:t}for(var a=t,l=e;;){var n=a.return;if(n===null)break;var u=n.alternate;if(u===null){if(l=n.return,l!==null){a=l;continue}break}if(n.child===u.child){for(u=n.child;u;){if(u===a)return v(n),t;if(u===l)return v(n),e;u=u.sibling}throw Error(r(188))}if(a.return!==l.return)a=n,l=u;else{for(var s=!1,o=n.child;o;){if(o===a){s=!0,a=n,l=u;break}if(o===l){s=!0,l=n,a=u;break}o=o.sibling}if(!s){for(o=u.child;o;){if(o===a){s=!0,a=u,l=n;break}if(o===l){s=!0,l=u,a=n;break}o=o.sibling}if(!s)throw Error(r(189))}}if(a.alternate!==l)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?t:e}function F(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=F(t),e!==null)return e;t=t.sibling}return null}var J=Array.isArray,Y=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,vt={pending:!1,data:null,method:null,action:null},it=[],oe=-1;function Tt(t){return{current:t}}function Lt(t){0>oe||(t.current=it[oe],it[oe]=null,oe--)}function Nt(t,e){oe++,it[oe]=t.current,t.current=e}var aa=Tt(null),Jn=Tt(null),qa=Tt(null),Wu=Tt(null);function Pu(t,e){switch(Nt(qa,e),Nt(Jn,t),Nt(aa,null),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)&&(e=e.namespaceURI)?sy(e):0;break;default:if(t=t===8?e.parentNode:e,e=t.tagName,t=t.namespaceURI)t=sy(t),e=fy(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Lt(aa),Nt(aa,e)}function an(){Lt(aa),Lt(Jn),Lt(qa)}function Gc(t){t.memoizedState!==null&&Nt(Wu,t);var e=aa.current,a=fy(e,t.type);e!==a&&(Nt(Jn,t),Nt(aa,a))}function Iu(t){Jn.current===t&&(Lt(aa),Lt(Jn)),Wu.current===t&&(Lt(Wu),Bu._currentValue=vt)}var Lc=Object.prototype.hasOwnProperty,Xc=c.unstable_scheduleCallback,Vc=c.unstable_cancelCallback,dv=c.unstable_shouldYield,hv=c.unstable_requestPaint,la=c.unstable_now,yv=c.unstable_getCurrentPriorityLevel,Fr=c.unstable_ImmediatePriority,Wr=c.unstable_UserBlockingPriority,ti=c.unstable_NormalPriority,vv=c.unstable_LowPriority,Pr=c.unstable_IdlePriority,mv=c.log,gv=c.unstable_setDisableYieldValue,kn=null,Ee=null;function pv(t){if(Ee&&typeof Ee.onCommitFiberRoot=="function")try{Ee.onCommitFiberRoot(kn,t,void 0,(t.current.flags&128)===128)}catch{}}function wa(t){if(typeof mv=="function"&&gv(t),Ee&&typeof Ee.setStrictMode=="function")try{Ee.setStrictMode(kn,t)}catch{}}var _e=Math.clz32?Math.clz32:Ev,bv=Math.log,Sv=Math.LN2;function Ev(t){return t>>>=0,t===0?32:31-(bv(t)/Sv|0)|0}var ei=128,ai=4194304;function pl(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function li(t,e){var a=t.pendingLanes;if(a===0)return 0;var l=0,n=t.suspendedLanes,u=t.pingedLanes,s=t.warmLanes;t=t.finishedLanes!==0;var o=a&134217727;return o!==0?(a=o&~n,a!==0?l=pl(a):(u&=o,u!==0?l=pl(u):t||(s=o&~s,s!==0&&(l=pl(s))))):(o=a&~n,o!==0?l=pl(o):u!==0?l=pl(u):t||(s=a&~s,s!==0&&(l=pl(s)))),l===0?0:e!==0&&e!==l&&!(e&n)&&(n=l&-l,s=e&-e,n>=s||n===32&&(s&4194176)!==0)?e:l}function $n(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function _v(t,e){switch(t){case 1:case 2:case 4:case 8:return e+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ir(){var t=ei;return ei<<=1,!(ei&4194176)&&(ei=128),t}function to(){var t=ai;return ai<<=1,!(ai&62914560)&&(ai=4194304),t}function Zc(t){for(var e=[],a=0;31>a;a++)e.push(t);return e}function Fn(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Tv(t,e,a,l,n,u){var s=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var o=t.entanglements,h=t.expirationTimes,p=t.hiddenUpdates;for(a=s&~a;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Rv=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),so={},fo={};function zv(t){return Lc.call(fo,t)?!0:Lc.call(so,t)?!1:Rv.test(t)?fo[t]=!0:(so[t]=!0,!1)}function ni(t,e,a){if(zv(e))if(a===null)t.removeAttribute(e);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var l=e.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+a)}}function ui(t,e,a){if(a===null)t.removeAttribute(e);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+a)}}function da(t,e,a,l){if(l===null)t.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(e,a,""+l)}}function Ue(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ro(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Mv(t){var e=ro(t)?"checked":"value",a=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),l=""+t[e];if(!t.hasOwnProperty(e)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,u=a.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return n.call(this)},set:function(s){l=""+s,u.call(this,s)}}),Object.defineProperty(t,e,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(s){l=""+s},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function ii(t){t._valueTracker||(t._valueTracker=Mv(t))}function oo(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var a=e.getValue(),l="";return t&&(l=ro(t)?t.checked?"true":"false":t.value),t=l,t!==a?(e.setValue(t),!0):!1}function ci(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Cv=/[\n"\\]/g;function Ne(t){return t.replace(Cv,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function kc(t,e,a,l,n,u,s,o){t.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?t.type=s:t.removeAttribute("type"),e!=null?s==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Ue(e)):t.value!==""+Ue(e)&&(t.value=""+Ue(e)):s!=="submit"&&s!=="reset"||t.removeAttribute("value"),e!=null?$c(t,s,Ue(e)):a!=null?$c(t,s,Ue(a)):l!=null&&t.removeAttribute("value"),n==null&&u!=null&&(t.defaultChecked=!!u),n!=null&&(t.checked=n&&typeof n!="function"&&typeof n!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?t.name=""+Ue(o):t.removeAttribute("name")}function ho(t,e,a,l,n,u,s,o){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.type=u),e!=null||a!=null){if(!(u!=="submit"&&u!=="reset"||e!=null))return;a=a!=null?""+Ue(a):"",e=e!=null?""+Ue(e):a,o||e===t.value||(t.value=e),t.defaultValue=e}l=l??n,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=o?t.checked:!!l,t.defaultChecked=!!l,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(t.name=s)}function $c(t,e,a){e==="number"&&ci(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function sn(t,e,a,l){if(t=t.options,e){e={};for(var n=0;n=lu),Do=" ",Ro=!1;function zo(t,e){switch(t){case"keyup":return nm.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Mo(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var dn=!1;function im(t,e){switch(t){case"compositionend":return Mo(e);case"keypress":return e.which!==32?null:(Ro=!0,Do);case"textInput":return t=e.data,t===Do&&Ro?null:t;default:return null}}function cm(t,e){if(dn)return t==="compositionend"||!is&&zo(t,e)?(t=So(),fi=es=Ba=null,dn=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:a,offset:e-t};t=l}t:{for(;a;){if(a.nextSibling){a=a.nextSibling;break t}a=a.parentNode}a=void 0}a=wo(a)}}function Bo(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Bo(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Yo(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=ci(t.document);e instanceof t.HTMLIFrameElement;){try{var a=typeof e.contentWindow.location.href=="string"}catch{a=!1}if(a)t=e.contentWindow;else break;e=ci(t.document)}return e}function fs(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function vm(t,e){var a=Yo(e);e=t.focusedElem;var l=t.selectionRange;if(a!==e&&e&&e.ownerDocument&&Bo(e.ownerDocument.documentElement,e)){if(l!==null&&fs(e)){if(t=l.start,a=l.end,a===void 0&&(a=t),"selectionStart"in e)e.selectionStart=t,e.selectionEnd=Math.min(a,e.value.length);else if(a=(t=e.ownerDocument||document)&&t.defaultView||window,a.getSelection){a=a.getSelection();var n=e.textContent.length,u=Math.min(l.start,n);l=l.end===void 0?u:Math.min(l.end,n),!a.extend&&u>l&&(n=l,l=u,u=n),n=Qo(e,u);var s=Qo(e,l);n&&s&&(a.rangeCount!==1||a.anchorNode!==n.node||a.anchorOffset!==n.offset||a.focusNode!==s.node||a.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(n.node,n.offset),a.removeAllRanges(),u>l?(a.addRange(t),a.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),a.addRange(t)))}}for(t=[],a=e;a=a.parentNode;)a.nodeType===1&&t.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof e.focus=="function"&&e.focus(),e=0;e=document.documentMode,hn=null,rs=null,cu=null,os=!1;function Go(t,e,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;os||hn==null||hn!==ci(l)||(l=hn,"selectionStart"in l&&fs(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),cu&&iu(cu,l)||(cu=l,l=Fi(rs,"onSelect"),0>=s,n-=s,ha=1<<32-_e(e)+n|a<$?(Wt=K,K=null):Wt=K.sibling;var Et=T(b,K,_[$],U);if(Et===null){K===null&&(K=Wt);break}t&&K&&Et.alternate===null&&e(b,K),m=u(Et,m,$),st===null?X=Et:st.sibling=Et,st=Et,K=Wt}if($===_.length)return a(b,K),St&&Ol(b,$),X;if(K===null){for(;$<_.length;$++)K=N(b,_[$],U),K!==null&&(m=u(K,m,$),st===null?X=K:st.sibling=K,st=K);return St&&Ol(b,$),X}for(K=l(K);$<_.length;$++)Wt=R(K,b,$,_[$],U),Wt!==null&&(t&&Wt.alternate!==null&&K.delete(Wt.key===null?$:Wt.key),m=u(Wt,m,$),st===null?X=Wt:st.sibling=Wt,st=Wt);return t&&K.forEach(function(ul){return e(b,ul)}),St&&Ol(b,$),X}function at(b,m,_,U){if(_==null)throw Error(r(151));for(var X=null,st=null,K=m,$=m=0,Wt=null,Et=_.next();K!==null&&!Et.done;$++,Et=_.next()){K.index>$?(Wt=K,K=null):Wt=K.sibling;var ul=T(b,K,Et.value,U);if(ul===null){K===null&&(K=Wt);break}t&&K&&ul.alternate===null&&e(b,K),m=u(ul,m,$),st===null?X=ul:st.sibling=ul,st=ul,K=Wt}if(Et.done)return a(b,K),St&&Ol(b,$),X;if(K===null){for(;!Et.done;$++,Et=_.next())Et=N(b,Et.value,U),Et!==null&&(m=u(Et,m,$),st===null?X=Et:st.sibling=Et,st=Et);return St&&Ol(b,$),X}for(K=l(K);!Et.done;$++,Et=_.next())Et=R(K,b,$,Et.value,U),Et!==null&&(t&&Et.alternate!==null&&K.delete(Et.key===null?$:Et.key),m=u(Et,m,$),st===null?X=Et:st.sibling=Et,st=Et);return t&&K.forEach(function(j1){return e(b,j1)}),St&&Ol(b,$),X}function Qt(b,m,_,U){if(typeof _=="object"&&_!==null&&_.type===A&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case E:t:{for(var X=_.key;m!==null;){if(m.key===X){if(X=_.type,X===A){if(m.tag===7){a(b,m.sibling),U=n(m,_.props.children),U.return=b,b=U;break t}}else if(m.elementType===X||typeof X=="object"&&X!==null&&X.$$typeof===W&&nd(X)===m.type){a(b,m.sibling),U=n(m,_.props),yu(U,_),U.return=b,b=U;break t}a(b,m);break}else e(b,m);m=m.sibling}_.type===A?(U=ql(_.props.children,b.mode,U,_.key),U.return=b,b=U):(U=Yi(_.type,_.key,_.props,null,b.mode,U),yu(U,_),U.return=b,b=U)}return s(b);case M:t:{for(X=_.key;m!==null;){if(m.key===X)if(m.tag===4&&m.stateNode.containerInfo===_.containerInfo&&m.stateNode.implementation===_.implementation){a(b,m.sibling),U=n(m,_.children||[]),U.return=b,b=U;break t}else{a(b,m);break}else e(b,m);m=m.sibling}U=yf(_,b.mode,U),U.return=b,b=U}return s(b);case W:return X=_._init,_=X(_._payload),Qt(b,m,_,U)}if(J(_))return Z(b,m,_,U);if(ot(_)){if(X=ot(_),typeof X!="function")throw Error(r(150));return _=X.call(_),at(b,m,_,U)}if(typeof _.then=="function")return Qt(b,m,Ei(_),U);if(_.$$typeof===x)return Qt(b,m,wi(b,_),U);_i(b,_)}return typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint"?(_=""+_,m!==null&&m.tag===6?(a(b,m.sibling),U=n(m,_),U.return=b,b=U):(a(b,m),U=hf(_,b.mode,U),U.return=b,b=U),s(b)):a(b,m)}return function(b,m,_,U){try{hu=0;var X=Qt(b,m,_,U);return bn=null,X}catch(K){if(K===ou)throw K;var st=Ye(29,K,null,b.mode);return st.lanes=U,st.return=b,st}finally{}}}var Rl=ud(!0),id=ud(!1),Sn=Tt(null),Ti=Tt(0);function cd(t,e){t=Oa,Nt(Ti,t),Nt(Sn,e),Oa=t|e.baseLanes}function bs(){Nt(Ti,Oa),Nt(Sn,Sn.current)}function Ss(){Oa=Ti.current,Lt(Sn),Lt(Ti)}var we=Tt(null),ua=null;function Ga(t){var e=t.alternate;Nt(Kt,Kt.current&1),Nt(we,t),ua===null&&(e===null||Sn.current!==null||e.memoizedState!==null)&&(ua=t)}function sd(t){if(t.tag===22){if(Nt(Kt,Kt.current),Nt(we,t),ua===null){var e=t.alternate;e!==null&&e.memoizedState!==null&&(ua=t)}}else La()}function La(){Nt(Kt,Kt.current),Nt(we,we.current)}function va(t){Lt(we),ua===t&&(ua=null),Lt(Kt)}var Kt=Tt(0);function Ai(t){for(var e=t;e!==null;){if(e.tag===13){var a=e.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||a.data==="$?"||a.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Sm=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(a,l){t.push(l)}};this.abort=function(){e.aborted=!0,t.forEach(function(a){return a()})}},Em=c.unstable_scheduleCallback,_m=c.unstable_NormalPriority,Jt={$$typeof:x,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Es(){return{controller:new Sm,data:new Map,refCount:0}}function vu(t){t.refCount--,t.refCount===0&&Em(_m,function(){t.controller.abort()})}var mu=null,_s=0,En=0,_n=null;function Tm(t,e){if(mu===null){var a=mu=[];_s=0,En=Mf(),_n={status:"pending",value:void 0,then:function(l){a.push(l)}}}return _s++,e.then(fd,fd),e}function fd(){if(--_s===0&&mu!==null){_n!==null&&(_n.status="fulfilled");var t=mu;mu=null,En=0,_n=null;for(var e=0;eu?u:8;var s=q.T,o={};q.T=o,Bs(t,!1,e,a);try{var h=n(),p=q.S;if(p!==null&&p(o,h),h!==null&&typeof h=="object"&&typeof h.then=="function"){var z=Am(h,l);bu(t,e,z,Re(t))}else bu(t,e,l,Re(t))}catch(N){bu(t,e,{then:function(){},status:"rejected",reason:N},Re())}finally{Y.p=u,q.T=s}}function Mm(){}function ws(t,e,a,l){if(t.tag!==5)throw Error(r(476));var n=Yd(t).queue;Bd(t,n,e,vt,a===null?Mm:function(){return Gd(t),a(l)})}function Yd(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:vt,baseState:vt,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:vt},next:null};var a={};return e.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:a},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Gd(t){var e=Yd(t).next.queue;bu(t,e,{},Re())}function Qs(){return ie(Bu)}function Ld(){return Vt().memoizedState}function Xd(){return Vt().memoizedState}function Cm(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var a=Re();t=Ja(a);var l=ka(e,t,a);l!==null&&(he(l,e,a),_u(l,e,a)),e={cache:Es()},t.payload=e;return}e=e.return}}function Um(t,e,a){var l=Re();a={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null},ji(t)?Zd(e,a):(a=ys(t,e,a,l),a!==null&&(he(a,t,l),Kd(a,e,l)))}function Vd(t,e,a){var l=Re();bu(t,e,a,l)}function bu(t,e,a,l){var n={lane:l,revertLane:0,action:a,hasEagerState:!1,eagerState:null,next:null};if(ji(t))Zd(e,n);else{var u=t.alternate;if(t.lanes===0&&(u===null||u.lanes===0)&&(u=e.lastRenderedReducer,u!==null))try{var s=e.lastRenderedState,o=u(s,a);if(n.hasEagerState=!0,n.eagerState=o,Te(o,s))return mi(t,e,n,0),Mt===null&&vi(),!1}catch{}finally{}if(a=ys(t,e,n,l),a!==null)return he(a,t,l),Kd(a,e,l),!0}return!1}function Bs(t,e,a,l){if(l={lane:2,revertLane:Mf(),action:l,hasEagerState:!1,eagerState:null,next:null},ji(t)){if(e)throw Error(r(479))}else e=ys(t,a,l,2),e!==null&&he(e,t,2)}function ji(t){var e=t.alternate;return t===ct||e!==null&&e===ct}function Zd(t,e){Tn=Di=!0;var a=t.pending;a===null?e.next=e:(e.next=a.next,a.next=e),t.pending=e}function Kd(t,e,a){if(a&4194176){var l=e.lanes;l&=t.pendingLanes,a|=l,e.lanes=a,ao(t,a)}}var ia={readContext:ie,use:Mi,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useLayoutEffect:Gt,useInsertionEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useSyncExternalStore:Gt,useId:Gt};ia.useCacheRefresh=Gt,ia.useMemoCache=Gt,ia.useHostTransitionStatus=Gt,ia.useFormState=Gt,ia.useActionState=Gt,ia.useOptimistic=Gt;var Cl={readContext:ie,use:Mi,useCallback:function(t,e){return ge().memoizedState=[t,e===void 0?null:e],t},useContext:ie,useEffect:Ud,useImperativeHandle:function(t,e,a){a=a!=null?a.concat([t]):null,Ui(4194308,4,Hd.bind(null,e,t),a)},useLayoutEffect:function(t,e){return Ui(4194308,4,t,e)},useInsertionEffect:function(t,e){Ui(4,2,t,e)},useMemo:function(t,e){var a=ge();e=e===void 0?null:e;var l=t();if(Ml){wa(!0);try{t()}finally{wa(!1)}}return a.memoizedState=[l,e],l},useReducer:function(t,e,a){var l=ge();if(a!==void 0){var n=a(e);if(Ml){wa(!0);try{a(e)}finally{wa(!1)}}}else n=e;return l.memoizedState=l.baseState=n,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:n},l.queue=t,t=t.dispatch=Um.bind(null,ct,t),[l.memoizedState,t]},useRef:function(t){var e=ge();return t={current:t},e.memoizedState=t},useState:function(t){t=Ns(t);var e=t.queue,a=Vd.bind(null,ct,e);return e.dispatch=a,[t.memoizedState,a]},useDebugValue:xs,useDeferredValue:function(t,e){var a=ge();return qs(a,t,e)},useTransition:function(){var t=Ns(!1);return t=Bd.bind(null,ct,t.queue,!0,!1),ge().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,a){var l=ct,n=ge();if(St){if(a===void 0)throw Error(r(407));a=a()}else{if(a=e(),Mt===null)throw Error(r(349));mt&60||vd(l,e,a)}n.memoizedState=a;var u={value:a,getSnapshot:e};return n.queue=u,Ud(gd.bind(null,l,u,t),[t]),l.flags|=2048,On(9,md.bind(null,l,u,a,e),{destroy:void 0},null),a},useId:function(){var t=ge(),e=Mt.identifierPrefix;if(St){var a=ya,l=ha;a=(l&~(1<<32-_e(l)-1)).toString(32)+a,e=":"+e+"R"+a,a=Ri++,0 title"))),ee(u,l,a),u[ue]=t,kt(u),l=u;break t;case"link":var s=by("link","href",n).get(l+(a.href||""));if(s){for(var o=0;o<\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof l.is=="string"?n.createElement("select",{is:l.is}):n.createElement("select"),l.multiple?t.multiple=!0:l.size&&(t.size=l.size);break;default:t=typeof l.is=="string"?n.createElement(a,{is:l.is}):n.createElement(a)}}t[ue]=e,t[ve]=l;t:for(n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.tag!==27&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break t;for(;n.sibling===null;){if(n.return===null||n.return===e)break t;n=n.return}n.sibling.return=n.return,n=n.sibling}e.stateNode=t;t:switch(ee(t,a,l),a){case"button":case"input":case"select":case"textarea":t=!!l.autoFocus;break t;case"img":t=!0;break t;default:t=!1}t&&Ta(e)}}return jt(e),e.flags&=-16777217,null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==l&&Ta(e);else{if(typeof l!="string"&&e.stateNode===null)throw Error(r(166));if(t=qa.current,su(e)){if(t=e.stateNode,a=e.memoizedProps,l=null,n=de,n!==null)switch(n.tag){case 27:case 5:l=n.memoizedProps}t[ue]=e,t=!!(t.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||cy(t.nodeValue,a)),t||Dl(e)}else t=Pi(t).createTextNode(l),t[ue]=e,e.stateNode=t}return jt(e),null;case 13:if(l=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(n=su(e),l!==null&&l.dehydrated!==null){if(t===null){if(!n)throw Error(r(318));if(n=e.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));n[ue]=e}else fu(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;jt(e),n=!1}else $e!==null&&(_f($e),$e=null),n=!0;if(!n)return e.flags&256?(va(e),e):(va(e),null)}if(va(e),e.flags&128)return e.lanes=a,e;if(a=l!==null,t=t!==null&&t.memoizedState!==null,a){l=e.child,n=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(n=l.alternate.memoizedState.cachePool.pool);var u=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(u=l.memoizedState.cachePool.pool),u!==n&&(l.flags|=2048)}return a!==t&&a&&(e.child.flags|=8192),Gi(e,e.updateQueue),jt(e),null;case 4:return an(),t===null&&jf(e.stateNode.containerInfo),jt(e),null;case 10:return ba(e.type),jt(e),null;case 19:if(Lt(Kt),n=e.memoizedState,n===null)return jt(e),null;if(l=(e.flags&128)!==0,u=n.rendering,u===null)if(l)Mu(n,!1);else{if(wt!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(u=Ai(t),u!==null){for(e.flags|=128,Mu(n,!1),t=u.updateQueue,e.updateQueue=t,Gi(e,t),e.subtreeFlags=0,t=a,a=e.child;a!==null;)xh(a,t),a=a.sibling;return Nt(Kt,Kt.current&1|2),e.child}t=t.sibling}n.tail!==null&&la()>Li&&(e.flags|=128,l=!0,Mu(n,!1),e.lanes=4194304)}else{if(!l)if(t=Ai(u),t!==null){if(e.flags|=128,l=!0,t=t.updateQueue,e.updateQueue=t,Gi(e,t),Mu(n,!0),n.tail===null&&n.tailMode==="hidden"&&!u.alternate&&!St)return jt(e),null}else 2*la()-n.renderingStartTime>Li&&a!==536870912&&(e.flags|=128,l=!0,Mu(n,!1),e.lanes=4194304);n.isBackwards?(u.sibling=e.child,e.child=u):(t=n.last,t!==null?t.sibling=u:e.child=u,n.last=u)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=la(),e.sibling=null,t=Kt.current,Nt(Kt,l?t&1|2:t&1),e):(jt(e),null);case 22:case 23:return va(e),Ss(),l=e.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(e.flags|=8192):l&&(e.flags|=8192),l?a&536870912&&!(e.flags&128)&&(jt(e),e.subtreeFlags&6&&(e.flags|=8192)):jt(e),a=e.updateQueue,a!==null&&Gi(e,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),l=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),l!==a&&(e.flags|=2048),t!==null&&Lt(zl),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),e.memoizedState.cache!==a&&(e.flags|=2048),ba(Jt),jt(e),null;case 25:return null}throw Error(r(156,e.tag))}function Qm(t,e){switch(ms(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return ba(Jt),an(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Iu(e),null;case 13:if(va(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(r(340));fu()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Lt(Kt),null;case 4:return an(),null;case 10:return ba(e.type),null;case 22:case 23:return va(e),Ss(),t!==null&&Lt(zl),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return ba(Jt),null;case 25:return null;default:return null}}function Qh(t,e){switch(ms(e),e.tag){case 3:ba(Jt),an();break;case 26:case 27:case 5:Iu(e);break;case 4:an();break;case 13:va(e);break;case 19:Lt(Kt);break;case 10:ba(e.type);break;case 22:case 23:va(e),Ss(),t!==null&&Lt(zl);break;case 24:ba(Jt)}}var Bm={getCacheForType:function(t){var e=ie(Jt),a=e.data.get(t);return a===void 0&&(a=t(),e.data.set(t,a)),a}},Ym=typeof WeakMap=="function"?WeakMap:Map,Ht=0,Mt=null,ft=null,mt=0,Ct=0,De=null,Aa=!1,Mn=!1,vf=!1,Oa=0,wt=0,Ia=0,wl=0,mf=0,Ge=0,Cn=0,Cu=null,ca=null,gf=!1,pf=0,Li=1/0,Xi=null,tl=null,Vi=!1,Ql=null,Uu=0,bf=0,Sf=null,Nu=0,Ef=null;function Re(){if(Ht&2&&mt!==0)return mt&-mt;if(q.T!==null){var t=En;return t!==0?t:Mf()}return no()}function Bh(){Ge===0&&(Ge=!(mt&536870912)||St?Ir():536870912);var t=we.current;return t!==null&&(t.flags|=32),Ge}function he(t,e,a){(t===Mt&&Ct===2||t.cancelPendingCommit!==null)&&(Un(t,0),Da(t,mt,Ge,!1)),Fn(t,a),(!(Ht&2)||t!==Mt)&&(t===Mt&&(!(Ht&2)&&(wl|=a),wt===4&&Da(t,mt,Ge,!1)),sa(t))}function Yh(t,e,a){if(Ht&6)throw Error(r(327));var l=!a&&(e&60)===0&&(e&t.expiredLanes)===0||$n(t,e),n=l?Xm(t,e):Of(t,e,!0),u=l;do{if(n===0){Mn&&!l&&Da(t,e,0,!1);break}else if(n===6)Da(t,e,0,!Aa);else{if(a=t.current.alternate,u&&!Gm(a)){n=Of(t,e,!1),u=!1;continue}if(n===2){if(u=e,t.errorRecoveryDisabledLanes&u)var s=0;else s=t.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){e=s;t:{var o=t;n=Cu;var h=o.current.memoizedState.isDehydrated;if(h&&(Un(o,s).flags|=256),s=Of(o,s,!1),s!==2){if(vf&&!h){o.errorRecoveryDisabledLanes|=u,wl|=u,n=4;break t}u=ca,ca=n,u!==null&&_f(u)}n=s}if(u=!1,n!==2)continue}}if(n===1){Un(t,0),Da(t,e,0,!0);break}t:{switch(l=t,n){case 0:case 1:throw Error(r(345));case 4:if((e&4194176)===e){Da(l,e,Ge,!Aa);break t}break;case 2:ca=null;break;case 3:case 5:break;default:throw Error(r(329))}if(l.finishedWork=a,l.finishedLanes=e,(e&62914560)===e&&(u=pf+300-la(),10a?32:a,q.T=null,Ql===null)var u=!1;else{a=Sf,Sf=null;var s=Ql,o=Uu;if(Ql=null,Uu=0,Ht&6)throw Error(r(331));var h=Ht;if(Ht|=4,jh(s.current),Ch(s,s.current,o,a),Ht=h,ju(0,!1),Ee&&typeof Ee.onPostCommitFiberRoot=="function")try{Ee.onPostCommitFiberRoot(kn,s)}catch{}u=!0}return u}finally{Y.p=n,q.T=l,$h(t,e)}}return!1}function Fh(t,e,a){e=He(a,e),e=Ls(t.stateNode,e,2),t=ka(t,e,2),t!==null&&(Fn(t,2),sa(t))}function zt(t,e,a){if(t.tag===3)Fh(t,t,a);else for(;e!==null;){if(e.tag===3){Fh(e,t,a);break}else if(e.tag===1){var l=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(tl===null||!tl.has(l))){t=He(a,t),a=Id(2),l=ka(e,a,2),l!==null&&(th(a,l,e,t),Fn(l,2),sa(l));break}}e=e.return}}function Df(t,e,a){var l=t.pingCache;if(l===null){l=t.pingCache=new Ym;var n=new Set;l.set(e,n)}else n=l.get(e),n===void 0&&(n=new Set,l.set(e,n));n.has(a)||(vf=!0,n.add(a),t=Km.bind(null,t,e,a),e.then(t,t))}function Km(t,e,a){var l=t.pingCache;l!==null&&l.delete(e),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,Mt===t&&(mt&a)===a&&(wt===4||wt===3&&(mt&62914560)===mt&&300>la()-pf?!(Ht&2)&&Un(t,0):mf|=a,Cn===mt&&(Cn=0)),sa(t)}function Wh(t,e){e===0&&(e=to()),t=Ya(t,e),t!==null&&(Fn(t,e),sa(t))}function Jm(t){var e=t.memoizedState,a=0;e!==null&&(a=e.retryLane),Wh(t,a)}function km(t,e){var a=0;switch(t.tag){case 13:var l=t.stateNode,n=t.memoizedState;n!==null&&(a=n.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(e),Wh(t,a)}function $m(t,e){return Xc(t,e)}var Ji=null,Hn=null,Rf=!1,ki=!1,zf=!1,Bl=0;function sa(t){t!==Hn&&t.next===null&&(Hn===null?Ji=Hn=t:Hn=Hn.next=t),ki=!0,Rf||(Rf=!0,Wm(Fm))}function ju(t,e){if(!zf&&ki){zf=!0;do for(var a=!1,l=Ji;l!==null;){if(t!==0){var n=l.pendingLanes;if(n===0)var u=0;else{var s=l.suspendedLanes,o=l.pingedLanes;u=(1<<31-_e(42|t)+1)-1,u&=n&~(s&~o),u=u&201326677?u&201326677|1:u?u|2:0}u!==0&&(a=!0,ty(l,u))}else u=mt,u=li(l,l===Mt?u:0),!(u&3)||$n(l,u)||(a=!0,ty(l,u));l=l.next}while(a);zf=!1}}function Fm(){ki=Rf=!1;var t=0;Bl!==0&&(u1()&&(t=Bl),Bl=0);for(var e=la(),a=null,l=Ji;l!==null;){var n=l.next,u=Ph(l,e);u===0?(l.next=null,a===null?Ji=n:a.next=n,n===null&&(Hn=a)):(a=l,(t!==0||u&3)&&(ki=!0)),l=n}ju(t)}function Ph(t,e){for(var a=t.suspendedLanes,l=t.pingedLanes,n=t.expirationTimes,u=t.pendingLanes&-62914561;0"u"?null:document;function vy(t,e,a){var l=qn;if(l&&typeof e=="string"&&e){var n=Ne(e);n='link[rel="'+t+'"][href="'+n+'"]',typeof a=="string"&&(n+='[crossorigin="'+a+'"]'),yy.has(n)||(yy.add(n),t={rel:t,crossOrigin:a,href:e},l.querySelector(n)===null&&(e=l.createElement("link"),ee(e,"link",t),kt(e),l.head.appendChild(e)))}}function h1(t){Ra.D(t),vy("dns-prefetch",t,null)}function y1(t,e){Ra.C(t,e),vy("preconnect",t,e)}function v1(t,e,a){Ra.L(t,e,a);var l=qn;if(l&&t&&e){var n='link[rel="preload"][as="'+Ne(e)+'"]';e==="image"&&a&&a.imageSrcSet?(n+='[imagesrcset="'+Ne(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(n+='[imagesizes="'+Ne(a.imageSizes)+'"]')):n+='[href="'+Ne(t)+'"]';var u=n;switch(e){case"style":u=wn(t);break;case"script":u=Qn(t)}Le.has(u)||(t=ut({rel:"preload",href:e==="image"&&a&&a.imageSrcSet?void 0:t,as:e},a),Le.set(u,t),l.querySelector(n)!==null||e==="style"&&l.querySelector(qu(u))||e==="script"&&l.querySelector(wu(u))||(e=l.createElement("link"),ee(e,"link",t),kt(e),l.head.appendChild(e)))}}function m1(t,e){Ra.m(t,e);var a=qn;if(a&&t){var l=e&&typeof e.as=="string"?e.as:"script",n='link[rel="modulepreload"][as="'+Ne(l)+'"][href="'+Ne(t)+'"]',u=n;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Qn(t)}if(!Le.has(u)&&(t=ut({rel:"modulepreload",href:t},e),Le.set(u,t),a.querySelector(n)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(wu(u)))return}l=a.createElement("link"),ee(l,"link",t),kt(l),a.head.appendChild(l)}}}function g1(t,e,a){Ra.S(t,e,a);var l=qn;if(l&&t){var n=un(l).hoistableStyles,u=wn(t);e=e||"default";var s=n.get(u);if(!s){var o={loading:0,preload:null};if(s=l.querySelector(qu(u)))o.loading=5;else{t=ut({rel:"stylesheet",href:t,"data-precedence":e},a),(a=Le.get(u))&&Lf(t,a);var h=s=l.createElement("link");kt(h),ee(h,"link",t),h._p=new Promise(function(p,z){h.onload=p,h.onerror=z}),h.addEventListener("load",function(){o.loading|=1}),h.addEventListener("error",function(){o.loading|=2}),o.loading|=4,tc(s,e,l)}s={type:"stylesheet",instance:s,count:1,state:o},n.set(u,s)}}}function p1(t,e){Ra.X(t,e);var a=qn;if(a&&t){var l=un(a).hoistableScripts,n=Qn(t),u=l.get(n);u||(u=a.querySelector(wu(n)),u||(t=ut({src:t,async:!0},e),(e=Le.get(n))&&Xf(t,e),u=a.createElement("script"),kt(u),ee(u,"link",t),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(n,u))}}function b1(t,e){Ra.M(t,e);var a=qn;if(a&&t){var l=un(a).hoistableScripts,n=Qn(t),u=l.get(n);u||(u=a.querySelector(wu(n)),u||(t=ut({src:t,async:!0,type:"module"},e),(e=Le.get(n))&&Xf(t,e),u=a.createElement("script"),kt(u),ee(u,"link",t),a.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},l.set(n,u))}}function my(t,e,a,l){var n=(n=qa.current)?Ii(n):null;if(!n)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(e=wn(a.href),a=un(n).hoistableStyles,l=a.get(e),l||(l={type:"style",instance:null,count:0,state:null},a.set(e,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=wn(a.href);var u=un(n).hoistableStyles,s=u.get(t);if(s||(n=n.ownerDocument||n,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(t,s),(u=n.querySelector(qu(t)))&&!u._p&&(s.instance=u,s.state.loading=5),Le.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Le.set(t,a),u||S1(n,t,a,s.state))),e&&l===null)throw Error(r(528,""));return s}if(e&&l!==null)throw Error(r(529,""));return null;case"script":return e=a.async,a=a.src,typeof a=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Qn(a),a=un(n).hoistableScripts,l=a.get(e),l||(l={type:"script",instance:null,count:0,state:null},a.set(e,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function wn(t){return'href="'+Ne(t)+'"'}function qu(t){return'link[rel="stylesheet"]['+t+"]"}function gy(t){return ut({},t,{"data-precedence":t.precedence,precedence:null})}function S1(t,e,a,l){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?l.loading=1:(e=t.createElement("link"),l.preload=e,e.addEventListener("load",function(){return l.loading|=1}),e.addEventListener("error",function(){return l.loading|=2}),ee(e,"link",a),kt(e),t.head.appendChild(e))}function Qn(t){return'[src="'+Ne(t)+'"]'}function wu(t){return"script[async]"+t}function py(t,e,a){if(e.count++,e.instance===null)switch(e.type){case"style":var l=t.querySelector('style[data-href~="'+Ne(a.href)+'"]');if(l)return e.instance=l,kt(l),l;var n=ut({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),kt(l),ee(l,"style",n),tc(l,a.precedence,t),e.instance=l;case"stylesheet":n=wn(a.href);var u=t.querySelector(qu(n));if(u)return e.state.loading|=4,e.instance=u,kt(u),u;l=gy(a),(n=Le.get(n))&&Lf(l,n),u=(t.ownerDocument||t).createElement("link"),kt(u);var s=u;return s._p=new Promise(function(o,h){s.onload=o,s.onerror=h}),ee(u,"link",l),e.state.loading|=4,tc(u,a.precedence,t),e.instance=u;case"script":return u=Qn(a.src),(n=t.querySelector(wu(u)))?(e.instance=n,kt(n),n):(l=a,(n=Le.get(u))&&(l=ut({},a),Xf(l,n)),t=t.ownerDocument||t,n=t.createElement("script"),kt(n),ee(n,"link",l),t.head.appendChild(n),e.instance=n);case"void":return null;default:throw Error(r(443,e.type))}else e.type==="stylesheet"&&!(e.state.loading&4)&&(l=e.instance,e.state.loading|=4,tc(l,a.precedence,t));return e.instance}function tc(t,e,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=l.length?l[l.length-1]:null,u=n,s=0;s title"):null)}function E1(t,e,a){if(a===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Ey(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}var Qu=null;function _1(){}function T1(t,e,a){if(Qu===null)throw Error(r(475));var l=Qu;if(e.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&!(e.state.loading&4)){if(e.instance===null){var n=wn(a.href),u=t.querySelector(qu(n));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=ac.bind(l),t.then(l,l)),e.state.loading|=4,e.instance=u,kt(u);return}u=t.ownerDocument||t,a=gy(a),(n=Le.get(n))&&Lf(a,n),u=u.createElement("link"),kt(u);var s=u;s._p=new Promise(function(o,h){s.onload=o,s.onerror=h}),ee(u,"link",a),e.instance=u}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(e,t),(t=e.state.preload)&&!(e.state.loading&3)&&(l.count++,e=ac.bind(l),t.addEventListener("load",e),t.addEventListener("error",e))}}function A1(){if(Qu===null)throw Error(r(475));var t=Qu;return t.stylesheets&&t.count===0&&Vf(t,t.stylesheets),0"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(i){console.error(i)}}return c(),vc.exports=Gy(),vc.exports}var Xy=Ly();const Vy=bt(Xy);var Yn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(c){return this.listeners.add(c),this.onSubscribe(),()=>{this.listeners.delete(c),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},sl=typeof window>"u"||"Deno"in globalThis;function ze(){}function Zy(c,i){return typeof c=="function"?c(i):c}function bc(c){return typeof c=="number"&&c>=0&&c!==1/0}function yr(c,i){return Math.max(c+(i||0)-Date.now(),0)}function Yl(c,i){return typeof c=="function"?c(i):c}function Xe(c,i){return typeof c=="function"?c(i):c}function vr(c,i){const{type:f="all",exact:r,fetchStatus:d,predicate:S,queryKey:E,stale:M}=c;if(E){if(r){if(i.queryHash!==Sc(E,i.options))return!1}else if(!Ln(i.queryKey,E))return!1}if(f!=="all"){const A=i.isActive();if(f==="active"&&!A||f==="inactive"&&A)return!1}return!(typeof M=="boolean"&&i.isStale()!==M||d&&d!==i.state.fetchStatus||S&&!S(i))}function mr(c,i){const{exact:f,status:r,predicate:d,mutationKey:S}=c;if(S){if(!i.options.mutationKey)return!1;if(f){if(Gn(i.options.mutationKey)!==Gn(S))return!1}else if(!Ln(i.options.mutationKey,S))return!1}return!(r&&i.state.status!==r||d&&!d(i))}function Sc(c,i){return((i==null?void 0:i.queryKeyHashFn)||Gn)(c)}function Gn(c){return JSON.stringify(c,(i,f)=>_c(f)?Object.keys(f).sort().reduce((r,d)=>(r[d]=f[d],r),{}):f)}function Ln(c,i){return c===i?!0:typeof c!=typeof i?!1:c&&i&&typeof c=="object"&&typeof i=="object"?!Object.keys(i).some(f=>!Ln(c[f],i[f])):!1}function gr(c,i){if(c===i)return c;const f=pr(c)&&pr(i);if(f||_c(c)&&_c(i)){const r=f?c:Object.keys(c),d=r.length,S=f?i:Object.keys(i),E=S.length,M=f?[]:{};let A=0;for(let y=0;y{setTimeout(i,c)})}function Tc(c,i,f){return typeof f.structuralSharing=="function"?f.structuralSharing(c,i):f.structuralSharing!==!1?gr(c,i):i}function Jy(c,i,f=0){const r=[...c,i];return f&&r.length>f?r.slice(1):r}function ky(c,i,f=0){const r=[i,...c];return f&&r.length>f?r.slice(0,-1):r}var Ac=Symbol();function Sr(c,i){return!c.queryFn&&(i!=null&&i.initialPromise)?()=>i.initialPromise:!c.queryFn||c.queryFn===Ac?()=>Promise.reject(new Error(`Missing queryFn: '${c.queryHash}'`)):c.queryFn}var $y=(Gr=class extends Yn{constructor(){super();P(this,fl);P(this,Ma);P(this,Xl);G(this,Xl,i=>{if(!sl&&window.addEventListener){const f=()=>i();return window.addEventListener("visibilitychange",f,!1),()=>{window.removeEventListener("visibilitychange",f)}}})}onSubscribe(){g(this,Ma)||this.setEventListener(g(this,Xl))}onUnsubscribe(){var i;this.hasListeners()||((i=g(this,Ma))==null||i.call(this),G(this,Ma,void 0))}setEventListener(i){var f;G(this,Xl,i),(f=g(this,Ma))==null||f.call(this),G(this,Ma,i(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(i){g(this,fl)!==i&&(G(this,fl,i),this.onFocus())}onFocus(){const i=this.isFocused();this.listeners.forEach(f=>{f(i)})}isFocused(){var i;return typeof g(this,fl)=="boolean"?g(this,fl):((i=globalThis.document)==null?void 0:i.visibilityState)!=="hidden"}},fl=new WeakMap,Ma=new WeakMap,Xl=new WeakMap,Gr),Oc=new $y,Fy=(Lr=class extends Yn{constructor(){super();P(this,Vl,!0);P(this,Ca);P(this,Zl);G(this,Zl,i=>{if(!sl&&window.addEventListener){const f=()=>i(!0),r=()=>i(!1);return window.addEventListener("online",f,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",f),window.removeEventListener("offline",r)}}})}onSubscribe(){g(this,Ca)||this.setEventListener(g(this,Zl))}onUnsubscribe(){var i;this.hasListeners()||((i=g(this,Ca))==null||i.call(this),G(this,Ca,void 0))}setEventListener(i){var f;G(this,Zl,i),(f=g(this,Ca))==null||f.call(this),G(this,Ca,i(this.setOnline.bind(this)))}setOnline(i){g(this,Vl)!==i&&(G(this,Vl,i),this.listeners.forEach(r=>{r(i)}))}isOnline(){return g(this,Vl)}},Vl=new WeakMap,Ca=new WeakMap,Zl=new WeakMap,Lr),Zu=new Fy;function Dc(){let c,i;const f=new Promise((d,S)=>{c=d,i=S});f.status="pending",f.catch(()=>{});function r(d){Object.assign(f,d),delete f.resolve,delete f.reject}return f.resolve=d=>{r({status:"fulfilled",value:d}),c(d)},f.reject=d=>{r({status:"rejected",reason:d}),i(d)},f}function Wy(c){return Math.min(1e3*2**c,3e4)}function Er(c){return(c??"online")==="online"?Zu.isOnline():!0}var _r=class extends Error{constructor(c){super("CancelledError"),this.revert=c==null?void 0:c.revert,this.silent=c==null?void 0:c.silent}};function Rc(c){return c instanceof _r}function Tr(c){let i=!1,f=0,r=!1,d;const S=Dc(),E=Q=>{var B;r||(j(new _r(Q)),(B=c.abort)==null||B.call(c))},M=()=>{i=!0},A=()=>{i=!1},y=()=>Oc.isFocused()&&(c.networkMode==="always"||Zu.isOnline())&&c.canRun(),O=()=>Er(c.networkMode)&&c.canRun(),C=Q=>{var B;r||(r=!0,(B=c.onSuccess)==null||B.call(c,Q),d==null||d(),S.resolve(Q))},j=Q=>{var B;r||(r=!0,(B=c.onError)==null||B.call(c,Q),d==null||d(),S.reject(Q))},x=()=>new Promise(Q=>{var B;d=I=>{(r||y())&&Q(I)},(B=c.onPause)==null||B.call(c)}).then(()=>{var Q;d=void 0,r||(Q=c.onContinue)==null||Q.call(c)}),L=()=>{if(r)return;let Q;const B=f===0?c.initialPromise:void 0;try{Q=B??c.fn()}catch(I){Q=Promise.reject(I)}Promise.resolve(Q).then(C).catch(I=>{var ot;if(r)return;const W=c.retry??(sl?0:3),nt=c.retryDelay??Wy,tt=typeof nt=="function"?nt(f,I):nt,V=W===!0||typeof W=="number"&&fy()?void 0:x()).then(()=>{i?j(I):L()})})};return{promise:S,cancel:E,continue:()=>(d==null||d(),S),cancelRetry:M,continueRetry:A,canStart:O,start:()=>(O()?L():x().then(L),S)}}function Py(){let c=[],i=0,f=M=>{M()},r=M=>{M()},d=M=>setTimeout(M,0);const S=M=>{i?c.push(M):d(()=>{f(M)})},E=()=>{const M=c;c=[],M.length&&d(()=>{r(()=>{M.forEach(A=>{f(A)})})})};return{batch:M=>{let A;i++;try{A=M()}finally{i--,i||E()}return A},batchCalls:M=>(...A)=>{S(()=>{M(...A)})},schedule:S,setNotifyFunction:M=>{f=M},setBatchNotifyFunction:M=>{r=M},setScheduler:M=>{d=M}}}var Pt=Py(),Ar=(Xr=class{constructor(){P(this,rl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bc(this.gcTime)&&G(this,rl,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(c){this.gcTime=Math.max(this.gcTime||0,c??(sl?1/0:5*60*1e3))}clearGcTimeout(){g(this,rl)&&(clearTimeout(g(this,rl)),G(this,rl,void 0))}},rl=new WeakMap,Xr),Iy=(Vr=class extends Ar{constructor(i){super();P(this,Ke);P(this,Kl);P(this,Jl);P(this,Me);P(this,ol);P(this,le);P(this,Xn);P(this,dl);G(this,dl,!1),G(this,Xn,i.defaultOptions),this.setOptions(i.options),this.observers=[],G(this,ol,i.client),G(this,Me,g(this,ol).getQueryCache()),this.queryKey=i.queryKey,this.queryHash=i.queryHash,G(this,Kl,t0(this.options)),this.state=i.state??g(this,Kl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var i;return(i=g(this,le))==null?void 0:i.promise}setOptions(i){this.options={...g(this,Xn),...i},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&g(this,Me).remove(this)}setData(i,f){const r=Tc(this.state.data,i,this.options);return ht(this,Ke,za).call(this,{data:r,type:"success",dataUpdatedAt:f==null?void 0:f.updatedAt,manual:f==null?void 0:f.manual}),r}setState(i,f){ht(this,Ke,za).call(this,{type:"setState",state:i,setStateOptions:f})}cancel(i){var r,d;const f=(r=g(this,le))==null?void 0:r.promise;return(d=g(this,le))==null||d.cancel(i),f?f.then(ze).catch(ze):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(g(this,Kl))}isActive(){return this.observers.some(i=>Xe(i.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ac||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(i=>i.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(i=0){return this.state.isInvalidated||this.state.data===void 0||!yr(this.state.dataUpdatedAt,i)}onFocus(){var f;const i=this.observers.find(r=>r.shouldFetchOnWindowFocus());i==null||i.refetch({cancelRefetch:!1}),(f=g(this,le))==null||f.continue()}onOnline(){var f;const i=this.observers.find(r=>r.shouldFetchOnReconnect());i==null||i.refetch({cancelRefetch:!1}),(f=g(this,le))==null||f.continue()}addObserver(i){this.observers.includes(i)||(this.observers.push(i),this.clearGcTimeout(),g(this,Me).notify({type:"observerAdded",query:this,observer:i}))}removeObserver(i){this.observers.includes(i)&&(this.observers=this.observers.filter(f=>f!==i),this.observers.length||(g(this,le)&&(g(this,dl)?g(this,le).cancel({revert:!0}):g(this,le).cancelRetry()),this.scheduleGc()),g(this,Me).notify({type:"observerRemoved",query:this,observer:i}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||ht(this,Ke,za).call(this,{type:"invalidate"})}fetch(i,f){var A,y,O;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(f!=null&&f.cancelRefetch))this.cancel({silent:!0});else if(g(this,le))return g(this,le).continueRetry(),g(this,le).promise}if(i&&this.setOptions(i),!this.options.queryFn){const C=this.observers.find(j=>j.options.queryFn);C&&this.setOptions(C.options)}const r=new AbortController,d=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(G(this,dl,!0),r.signal)})},S=()=>{const C=Sr(this.options,f),j={client:g(this,ol),queryKey:this.queryKey,meta:this.meta};return d(j),G(this,dl,!1),this.options.persister?this.options.persister(C,j,this):C(j)},E={fetchOptions:f,options:this.options,queryKey:this.queryKey,client:g(this,ol),state:this.state,fetchFn:S};d(E),(A=this.options.behavior)==null||A.onFetch(E,this),G(this,Jl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=E.fetchOptions)==null?void 0:y.meta))&&ht(this,Ke,za).call(this,{type:"fetch",meta:(O=E.fetchOptions)==null?void 0:O.meta});const M=C=>{var j,x,L,Q;Rc(C)&&C.silent||ht(this,Ke,za).call(this,{type:"error",error:C}),Rc(C)||((x=(j=g(this,Me).config).onError)==null||x.call(j,C,this),(Q=(L=g(this,Me).config).onSettled)==null||Q.call(L,this.state.data,C,this)),this.scheduleGc()};return G(this,le,Tr({initialPromise:f==null?void 0:f.initialPromise,fn:E.fetchFn,abort:r.abort.bind(r),onSuccess:C=>{var j,x,L,Q;if(C===void 0){M(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(C)}catch(B){M(B);return}(x=(j=g(this,Me).config).onSuccess)==null||x.call(j,C,this),(Q=(L=g(this,Me).config).onSettled)==null||Q.call(L,C,this.state.error,this),this.scheduleGc()},onError:M,onFail:(C,j)=>{ht(this,Ke,za).call(this,{type:"failed",failureCount:C,error:j})},onPause:()=>{ht(this,Ke,za).call(this,{type:"pause"})},onContinue:()=>{ht(this,Ke,za).call(this,{type:"continue"})},retry:E.options.retry,retryDelay:E.options.retryDelay,networkMode:E.options.networkMode,canRun:()=>!0})),g(this,le).start()}},Kl=new WeakMap,Jl=new WeakMap,Me=new WeakMap,ol=new WeakMap,le=new WeakMap,Xn=new WeakMap,dl=new WeakMap,Ke=new WeakSet,za=function(i){const f=r=>{switch(i.type){case"failed":return{...r,fetchFailureCount:i.failureCount,fetchFailureReason:i.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Or(r.data,this.options),fetchMeta:i.meta??null};case"success":return{...r,data:i.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:i.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!i.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const d=i.error;return Rc(d)&&d.revert&&g(this,Jl)?{...g(this,Jl),fetchStatus:"idle"}:{...r,error:d,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:d,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...i.state}}};this.state=f(this.state),Pt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),g(this,Me).notify({query:this,type:"updated",action:i})})},Vr);function Or(c,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Er(i.networkMode)?"fetching":"paused",...c===void 0&&{error:null,status:"pending"}}}function t0(c){const i=typeof c.initialData=="function"?c.initialData():c.initialData,f=i!==void 0,r=f?typeof c.initialDataUpdatedAt=="function"?c.initialDataUpdatedAt():c.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:f?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:f?"success":"pending",fetchStatus:"idle"}}var e0=(Zr=class extends Yn{constructor(i={}){super();P(this,Pe);this.config=i,G(this,Pe,new Map)}build(i,f,r){const d=f.queryKey,S=f.queryHash??Sc(d,f);let E=this.get(S);return E||(E=new Iy({client:i,queryKey:d,queryHash:S,options:i.defaultQueryOptions(f),state:r,defaultOptions:i.getQueryDefaults(d)}),this.add(E)),E}add(i){g(this,Pe).has(i.queryHash)||(g(this,Pe).set(i.queryHash,i),this.notify({type:"added",query:i}))}remove(i){const f=g(this,Pe).get(i.queryHash);f&&(i.destroy(),f===i&&g(this,Pe).delete(i.queryHash),this.notify({type:"removed",query:i}))}clear(){Pt.batch(()=>{this.getAll().forEach(i=>{this.remove(i)})})}get(i){return g(this,Pe).get(i)}getAll(){return[...g(this,Pe).values()]}find(i){const f={exact:!0,...i};return this.getAll().find(r=>vr(f,r))}findAll(i={}){const f=this.getAll();return Object.keys(i).length>0?f.filter(r=>vr(i,r)):f}notify(i){Pt.batch(()=>{this.listeners.forEach(f=>{f(i)})})}onFocus(){Pt.batch(()=>{this.getAll().forEach(i=>{i.onFocus()})})}onOnline(){Pt.batch(()=>{this.getAll().forEach(i=>{i.onOnline()})})}},Pe=new WeakMap,Zr),a0=(Kr=class extends Ar{constructor(i){super();P(this,ta);P(this,Ie);P(this,se);P(this,hl);this.mutationId=i.mutationId,G(this,se,i.mutationCache),G(this,Ie,[]),this.state=i.state||l0(),this.setOptions(i.options),this.scheduleGc()}setOptions(i){this.options=i,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(i){g(this,Ie).includes(i)||(g(this,Ie).push(i),this.clearGcTimeout(),g(this,se).notify({type:"observerAdded",mutation:this,observer:i}))}removeObserver(i){G(this,Ie,g(this,Ie).filter(f=>f!==i)),this.scheduleGc(),g(this,se).notify({type:"observerRemoved",mutation:this,observer:i})}optionalRemove(){g(this,Ie).length||(this.state.status==="pending"?this.scheduleGc():g(this,se).remove(this))}continue(){var i;return((i=g(this,hl))==null?void 0:i.continue())??this.execute(this.state.variables)}async execute(i){var d,S,E,M,A,y,O,C,j,x,L,Q,B,I,W,nt,tt,V,ot,At;G(this,hl,Tr({fn:()=>this.options.mutationFn?this.options.mutationFn(i):Promise.reject(new Error("No mutationFn found")),onFail:(pt,q)=>{ht(this,ta,il).call(this,{type:"failed",failureCount:pt,error:q})},onPause:()=>{ht(this,ta,il).call(this,{type:"pause"})},onContinue:()=>{ht(this,ta,il).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>g(this,se).canRun(this)}));const f=this.state.status==="pending",r=!g(this,hl).canStart();try{if(!f){ht(this,ta,il).call(this,{type:"pending",variables:i,isPaused:r}),await((S=(d=g(this,se).config).onMutate)==null?void 0:S.call(d,i,this));const q=await((M=(E=this.options).onMutate)==null?void 0:M.call(E,i));q!==this.state.context&&ht(this,ta,il).call(this,{type:"pending",context:q,variables:i,isPaused:r})}const pt=await g(this,hl).start();return await((y=(A=g(this,se).config).onSuccess)==null?void 0:y.call(A,pt,i,this.state.context,this)),await((C=(O=this.options).onSuccess)==null?void 0:C.call(O,pt,i,this.state.context)),await((x=(j=g(this,se).config).onSettled)==null?void 0:x.call(j,pt,null,this.state.variables,this.state.context,this)),await((Q=(L=this.options).onSettled)==null?void 0:Q.call(L,pt,null,i,this.state.context)),ht(this,ta,il).call(this,{type:"success",data:pt}),pt}catch(pt){try{throw await((I=(B=g(this,se).config).onError)==null?void 0:I.call(B,pt,i,this.state.context,this)),await((nt=(W=this.options).onError)==null?void 0:nt.call(W,pt,i,this.state.context)),await((V=(tt=g(this,se).config).onSettled)==null?void 0:V.call(tt,void 0,pt,this.state.variables,this.state.context,this)),await((At=(ot=this.options).onSettled)==null?void 0:At.call(ot,void 0,pt,i,this.state.context)),pt}finally{ht(this,ta,il).call(this,{type:"error",error:pt})}}finally{g(this,se).runNext(this)}}},Ie=new WeakMap,se=new WeakMap,hl=new WeakMap,ta=new WeakSet,il=function(i){const f=r=>{switch(i.type){case"failed":return{...r,failureCount:i.failureCount,failureReason:i.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:i.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:i.isPaused,status:"pending",variables:i.variables,submittedAt:Date.now()};case"success":return{...r,data:i.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:i.error,failureCount:r.failureCount+1,failureReason:i.error,isPaused:!1,status:"error"}}};this.state=f(this.state),Pt.batch(()=>{g(this,Ie).forEach(r=>{r.onMutationUpdate(i)}),g(this,se).notify({mutation:this,type:"updated",action:i})})},Kr);function l0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var n0=(Jr=class extends Yn{constructor(i={}){super();P(this,ra);P(this,Je);P(this,Vn);this.config=i,G(this,ra,new Set),G(this,Je,new Map),G(this,Vn,0)}build(i,f,r){const d=new a0({mutationCache:this,mutationId:++oc(this,Vn)._,options:i.defaultMutationOptions(f),state:r});return this.add(d),d}add(i){g(this,ra).add(i);const f=Ku(i);if(typeof f=="string"){const r=g(this,Je).get(f);r?r.push(i):g(this,Je).set(f,[i])}this.notify({type:"added",mutation:i})}remove(i){if(g(this,ra).delete(i)){const f=Ku(i);if(typeof f=="string"){const r=g(this,Je).get(f);if(r)if(r.length>1){const d=r.indexOf(i);d!==-1&&r.splice(d,1)}else r[0]===i&&g(this,Je).delete(f)}}this.notify({type:"removed",mutation:i})}canRun(i){const f=Ku(i);if(typeof f=="string"){const r=g(this,Je).get(f),d=r==null?void 0:r.find(S=>S.state.status==="pending");return!d||d===i}else return!0}runNext(i){var r;const f=Ku(i);if(typeof f=="string"){const d=(r=g(this,Je).get(f))==null?void 0:r.find(S=>S!==i&&S.state.isPaused);return(d==null?void 0:d.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Pt.batch(()=>{g(this,ra).forEach(i=>{this.notify({type:"removed",mutation:i})}),g(this,ra).clear(),g(this,Je).clear()})}getAll(){return Array.from(g(this,ra))}find(i){const f={exact:!0,...i};return this.getAll().find(r=>mr(f,r))}findAll(i={}){return this.getAll().filter(f=>mr(i,f))}notify(i){Pt.batch(()=>{this.listeners.forEach(f=>{f(i)})})}resumePausedMutations(){const i=this.getAll().filter(f=>f.state.isPaused);return Pt.batch(()=>Promise.all(i.map(f=>f.continue().catch(ze))))}},ra=new WeakMap,Je=new WeakMap,Vn=new WeakMap,Jr);function Ku(c){var i;return(i=c.options.scope)==null?void 0:i.id}function Dr(c){return{onFetch:(i,f)=>{var O,C,j,x,L;const r=i.options,d=(j=(C=(O=i.fetchOptions)==null?void 0:O.meta)==null?void 0:C.fetchMore)==null?void 0:j.direction,S=((x=i.state.data)==null?void 0:x.pages)||[],E=((L=i.state.data)==null?void 0:L.pageParams)||[];let M={pages:[],pageParams:[]},A=0;const y=async()=>{let Q=!1;const B=nt=>{Object.defineProperty(nt,"signal",{enumerable:!0,get:()=>(i.signal.aborted?Q=!0:i.signal.addEventListener("abort",()=>{Q=!0}),i.signal)})},I=Sr(i.options,i.fetchOptions),W=async(nt,tt,V)=>{if(Q)return Promise.reject();if(tt==null&&nt.pages.length)return Promise.resolve(nt);const ot={client:i.client,queryKey:i.queryKey,pageParam:tt,direction:V?"backward":"forward",meta:i.options.meta};B(ot);const At=await I(ot),{maxPages:pt}=i.options,q=V?ky:Jy;return{pages:q(nt.pages,At,pt),pageParams:q(nt.pageParams,tt,pt)}};if(d&&S.length){const nt=d==="backward",tt=nt?u0:Rr,V={pages:S,pageParams:E},ot=tt(r,V);M=await W(V,ot,nt)}else{const nt=c??S.length;do{const tt=A===0?E[0]??r.initialPageParam:Rr(r,M);if(A>0&&tt==null)break;M=await W(M,tt),A++}while(A{var Q,B;return(B=(Q=i.options).persister)==null?void 0:B.call(Q,y,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},f)}:i.fetchFn=y}}}function Rr(c,{pages:i,pageParams:f}){const r=i.length-1;return i.length>0?c.getNextPageParam(i[r],i,f[r],f):void 0}function u0(c,{pages:i,pageParams:f}){var r;return i.length>0?(r=c.getPreviousPageParam)==null?void 0:r.call(c,i[0],i,f[0],f):void 0}var i0=(kr=class{constructor(c={}){P(this,xt);P(this,Ua);P(this,Na);P(this,kl);P(this,$l);P(this,ja);P(this,Fl);P(this,Wl);G(this,xt,c.queryCache||new e0),G(this,Ua,c.mutationCache||new n0),G(this,Na,c.defaultOptions||{}),G(this,kl,new Map),G(this,$l,new Map),G(this,ja,0)}mount(){oc(this,ja)._++,g(this,ja)===1&&(G(this,Fl,Oc.subscribe(async c=>{c&&(await this.resumePausedMutations(),g(this,xt).onFocus())})),G(this,Wl,Zu.subscribe(async c=>{c&&(await this.resumePausedMutations(),g(this,xt).onOnline())})))}unmount(){var c,i;oc(this,ja)._--,g(this,ja)===0&&((c=g(this,Fl))==null||c.call(this),G(this,Fl,void 0),(i=g(this,Wl))==null||i.call(this),G(this,Wl,void 0))}isFetching(c){return g(this,xt).findAll({...c,fetchStatus:"fetching"}).length}isMutating(c){return g(this,Ua).findAll({...c,status:"pending"}).length}getQueryData(c){var f;const i=this.defaultQueryOptions({queryKey:c});return(f=g(this,xt).get(i.queryHash))==null?void 0:f.state.data}ensureQueryData(c){const i=this.defaultQueryOptions(c),f=g(this,xt).build(this,i),r=f.state.data;return r===void 0?this.fetchQuery(c):(c.revalidateIfStale&&f.isStaleByTime(Yl(i.staleTime,f))&&this.prefetchQuery(i),Promise.resolve(r))}getQueriesData(c){return g(this,xt).findAll(c).map(({queryKey:i,state:f})=>{const r=f.data;return[i,r]})}setQueryData(c,i,f){const r=this.defaultQueryOptions({queryKey:c}),d=g(this,xt).get(r.queryHash),S=d==null?void 0:d.state.data,E=Zy(i,S);if(E!==void 0)return g(this,xt).build(this,r).setData(E,{...f,manual:!0})}setQueriesData(c,i,f){return Pt.batch(()=>g(this,xt).findAll(c).map(({queryKey:r})=>[r,this.setQueryData(r,i,f)]))}getQueryState(c){var f;const i=this.defaultQueryOptions({queryKey:c});return(f=g(this,xt).get(i.queryHash))==null?void 0:f.state}removeQueries(c){const i=g(this,xt);Pt.batch(()=>{i.findAll(c).forEach(f=>{i.remove(f)})})}resetQueries(c,i){const f=g(this,xt),r={type:"active",...c};return Pt.batch(()=>(f.findAll(c).forEach(d=>{d.reset()}),this.refetchQueries(r,i)))}cancelQueries(c,i={}){const f={revert:!0,...i},r=Pt.batch(()=>g(this,xt).findAll(c).map(d=>d.cancel(f)));return Promise.all(r).then(ze).catch(ze)}invalidateQueries(c,i={}){return Pt.batch(()=>{if(g(this,xt).findAll(c).forEach(r=>{r.invalidate()}),(c==null?void 0:c.refetchType)==="none")return Promise.resolve();const f={...c,type:(c==null?void 0:c.refetchType)??(c==null?void 0:c.type)??"active"};return this.refetchQueries(f,i)})}refetchQueries(c,i={}){const f={...i,cancelRefetch:i.cancelRefetch??!0},r=Pt.batch(()=>g(this,xt).findAll(c).filter(d=>!d.isDisabled()).map(d=>{let S=d.fetch(void 0,f);return f.throwOnError||(S=S.catch(ze)),d.state.fetchStatus==="paused"?Promise.resolve():S}));return Promise.all(r).then(ze)}fetchQuery(c){const i=this.defaultQueryOptions(c);i.retry===void 0&&(i.retry=!1);const f=g(this,xt).build(this,i);return f.isStaleByTime(Yl(i.staleTime,f))?f.fetch(i):Promise.resolve(f.state.data)}prefetchQuery(c){return this.fetchQuery(c).then(ze).catch(ze)}fetchInfiniteQuery(c){return c.behavior=Dr(c.pages),this.fetchQuery(c)}prefetchInfiniteQuery(c){return this.fetchInfiniteQuery(c).then(ze).catch(ze)}ensureInfiniteQueryData(c){return c.behavior=Dr(c.pages),this.ensureQueryData(c)}resumePausedMutations(){return Zu.isOnline()?g(this,Ua).resumePausedMutations():Promise.resolve()}getQueryCache(){return g(this,xt)}getMutationCache(){return g(this,Ua)}getDefaultOptions(){return g(this,Na)}setDefaultOptions(c){G(this,Na,c)}setQueryDefaults(c,i){g(this,kl).set(Gn(c),{queryKey:c,defaultOptions:i})}getQueryDefaults(c){const i=[...g(this,kl).values()],f={};return i.forEach(r=>{Ln(c,r.queryKey)&&Object.assign(f,r.defaultOptions)}),f}setMutationDefaults(c,i){g(this,$l).set(Gn(c),{mutationKey:c,defaultOptions:i})}getMutationDefaults(c){const i=[...g(this,$l).values()];let f={};return i.forEach(r=>{Ln(c,r.mutationKey)&&(f={...f,...r.defaultOptions})}),f}defaultQueryOptions(c){if(c._defaulted)return c;const i={...g(this,Na).queries,...this.getQueryDefaults(c.queryKey),...c,_defaulted:!0};return i.queryHash||(i.queryHash=Sc(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===Ac&&(i.enabled=!1),i}defaultMutationOptions(c){return c!=null&&c._defaulted?c:{...g(this,Na).mutations,...(c==null?void 0:c.mutationKey)&&this.getMutationDefaults(c.mutationKey),...c,_defaulted:!0}}clear(){g(this,xt).clear(),g(this,Ua).clear()}},xt=new WeakMap,Ua=new WeakMap,Na=new WeakMap,kl=new WeakMap,$l=new WeakMap,ja=new WeakMap,Fl=new WeakMap,Wl=new WeakMap,kr),c0=($r=class extends Yn{constructor(i,f){super();P(this,_t);P(this,ye);P(this,rt);P(this,Zn);P(this,fe);P(this,yl);P(this,Pl);P(this,Ha);P(this,ea);P(this,Kn);P(this,Il);P(this,tn);P(this,vl);P(this,ml);P(this,xa);P(this,en,new Set);this.options=f,G(this,ye,i),G(this,ea,null),G(this,Ha,Dc()),this.options.experimental_prefetchInRender||g(this,Ha).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(f)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(g(this,rt).addObserver(this),zr(g(this,rt),this.options)?ht(this,_t,Vu).call(this):this.updateResult(),ht(this,_t,er).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zc(g(this,rt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zc(g(this,rt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,ht(this,_t,ar).call(this),ht(this,_t,lr).call(this),g(this,rt).removeObserver(this)}setOptions(i,f){const r=this.options,d=g(this,rt);if(this.options=g(this,ye).defaultQueryOptions(i),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Xe(this.options.enabled,g(this,rt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");ht(this,_t,nr).call(this),g(this,rt).setOptions(this.options),r._defaulted&&!Ec(this.options,r)&&g(this,ye).getQueryCache().notify({type:"observerOptionsUpdated",query:g(this,rt),observer:this});const S=this.hasListeners();S&&Mr(g(this,rt),d,this.options,r)&&ht(this,_t,Vu).call(this),this.updateResult(f),S&&(g(this,rt)!==d||Xe(this.options.enabled,g(this,rt))!==Xe(r.enabled,g(this,rt))||Yl(this.options.staleTime,g(this,rt))!==Yl(r.staleTime,g(this,rt)))&&ht(this,_t,Pf).call(this);const E=ht(this,_t,If).call(this);S&&(g(this,rt)!==d||Xe(this.options.enabled,g(this,rt))!==Xe(r.enabled,g(this,rt))||E!==g(this,xa))&&ht(this,_t,tr).call(this,E)}getOptimisticResult(i){const f=g(this,ye).getQueryCache().build(g(this,ye),i),r=this.createResult(f,i);return f0(this,r)&&(G(this,fe,r),G(this,Pl,this.options),G(this,yl,g(this,rt).state)),r}getCurrentResult(){return g(this,fe)}trackResult(i,f){const r={};return Object.keys(i).forEach(d=>{Object.defineProperty(r,d,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(d),f==null||f(d),i[d])})}),r}trackProp(i){g(this,en).add(i)}getCurrentQuery(){return g(this,rt)}refetch({...i}={}){return this.fetch({...i})}fetchOptimistic(i){const f=g(this,ye).defaultQueryOptions(i),r=g(this,ye).getQueryCache().build(g(this,ye),f);return r.fetch().then(()=>this.createResult(r,f))}fetch(i){return ht(this,_t,Vu).call(this,{...i,cancelRefetch:i.cancelRefetch??!0}).then(()=>(this.updateResult(),g(this,fe)))}createResult(i,f){var pt;const r=g(this,rt),d=this.options,S=g(this,fe),E=g(this,yl),M=g(this,Pl),y=i!==r?i.state:g(this,Zn),{state:O}=i;let C={...O},j=!1,x;if(f._optimisticResults){const q=this.hasListeners(),ut=!q&&zr(i,f),Bt=q&&Mr(i,r,f,d);(ut||Bt)&&(C={...C,...Or(O.data,i.options)}),f._optimisticResults==="isRestoring"&&(C.fetchStatus="idle")}let{error:L,errorUpdatedAt:Q,status:B}=C;if(f.select&&C.data!==void 0)if(S&&C.data===(E==null?void 0:E.data)&&f.select===g(this,Kn))x=g(this,Il);else try{G(this,Kn,f.select),x=f.select(C.data),x=Tc(S==null?void 0:S.data,x,f),G(this,Il,x),G(this,ea,null)}catch(q){G(this,ea,q)}else x=C.data;if(f.placeholderData!==void 0&&x===void 0&&B==="pending"){let q;if(S!=null&&S.isPlaceholderData&&f.placeholderData===(M==null?void 0:M.placeholderData))q=S.data;else if(q=typeof f.placeholderData=="function"?f.placeholderData((pt=g(this,tn))==null?void 0:pt.state.data,g(this,tn)):f.placeholderData,f.select&&q!==void 0)try{q=f.select(q),G(this,ea,null)}catch(ut){G(this,ea,ut)}q!==void 0&&(B="success",x=Tc(S==null?void 0:S.data,q,f),j=!0)}g(this,ea)&&(L=g(this,ea),x=g(this,Il),Q=Date.now(),B="error");const I=C.fetchStatus==="fetching",W=B==="pending",nt=B==="error",tt=W&&I,V=x!==void 0,At={status:B,fetchStatus:C.fetchStatus,isPending:W,isSuccess:B==="success",isError:nt,isInitialLoading:tt,isLoading:tt,data:x,dataUpdatedAt:C.dataUpdatedAt,error:L,errorUpdatedAt:Q,failureCount:C.fetchFailureCount,failureReason:C.fetchFailureReason,errorUpdateCount:C.errorUpdateCount,isFetched:C.dataUpdateCount>0||C.errorUpdateCount>0,isFetchedAfterMount:C.dataUpdateCount>y.dataUpdateCount||C.errorUpdateCount>y.errorUpdateCount,isFetching:I,isRefetching:I&&!W,isLoadingError:nt&&!V,isPaused:C.fetchStatus==="paused",isPlaceholderData:j,isRefetchError:nt&&V,isStale:Mc(i,f),refetch:this.refetch,promise:g(this,Ha)};if(this.options.experimental_prefetchInRender){const q=Yt=>{At.status==="error"?Yt.reject(At.error):At.data!==void 0&&Yt.resolve(At.data)},ut=()=>{const Yt=G(this,Ha,At.promise=Dc());q(Yt)},Bt=g(this,Ha);switch(Bt.status){case"pending":i.queryHash===r.queryHash&&q(Bt);break;case"fulfilled":(At.status==="error"||At.data!==Bt.value)&&ut();break;case"rejected":(At.status!=="error"||At.error!==Bt.reason)&&ut();break}}return At}updateResult(i){const f=g(this,fe),r=this.createResult(g(this,rt),this.options);if(G(this,yl,g(this,rt).state),G(this,Pl,this.options),g(this,yl).data!==void 0&&G(this,tn,g(this,rt)),Ec(r,f))return;G(this,fe,r);const d={},S=()=>{if(!f)return!0;const{notifyOnChangeProps:E}=this.options,M=typeof E=="function"?E():E;if(M==="all"||!M&&!g(this,en).size)return!0;const A=new Set(M??g(this,en));return this.options.throwOnError&&A.add("error"),Object.keys(g(this,fe)).some(y=>{const O=y;return g(this,fe)[O]!==f[O]&&A.has(O)})};(i==null?void 0:i.listeners)!==!1&&S()&&(d.listeners=!0),ht(this,_t,Hy).call(this,{...d,...i})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&ht(this,_t,er).call(this)}},ye=new WeakMap,rt=new WeakMap,Zn=new WeakMap,fe=new WeakMap,yl=new WeakMap,Pl=new WeakMap,Ha=new WeakMap,ea=new WeakMap,Kn=new WeakMap,Il=new WeakMap,tn=new WeakMap,vl=new WeakMap,ml=new WeakMap,xa=new WeakMap,en=new WeakMap,_t=new WeakSet,Vu=function(i){ht(this,_t,nr).call(this);let f=g(this,rt).fetch(this.options,i);return i!=null&&i.throwOnError||(f=f.catch(ze)),f},Pf=function(){ht(this,_t,ar).call(this);const i=Yl(this.options.staleTime,g(this,rt));if(sl||g(this,fe).isStale||!bc(i))return;const r=yr(g(this,fe).dataUpdatedAt,i)+1;G(this,vl,setTimeout(()=>{g(this,fe).isStale||this.updateResult()},r))},If=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(g(this,rt)):this.options.refetchInterval)??!1},tr=function(i){ht(this,_t,lr).call(this),G(this,xa,i),!(sl||Xe(this.options.enabled,g(this,rt))===!1||!bc(g(this,xa))||g(this,xa)===0)&&G(this,ml,setInterval(()=>{(this.options.refetchIntervalInBackground||Oc.isFocused())&&ht(this,_t,Vu).call(this)},g(this,xa)))},er=function(){ht(this,_t,Pf).call(this),ht(this,_t,tr).call(this,ht(this,_t,If).call(this))},ar=function(){g(this,vl)&&(clearTimeout(g(this,vl)),G(this,vl,void 0))},lr=function(){g(this,ml)&&(clearInterval(g(this,ml)),G(this,ml,void 0))},nr=function(){const i=g(this,ye).getQueryCache().build(g(this,ye),this.options);if(i===g(this,rt))return;const f=g(this,rt);G(this,rt,i),G(this,Zn,i.state),this.hasListeners()&&(f==null||f.removeObserver(this),i.addObserver(this))},Hy=function(i){Pt.batch(()=>{i.listeners&&this.listeners.forEach(f=>{f(g(this,fe))}),g(this,ye).getQueryCache().notify({query:g(this,rt),type:"observerResultsUpdated"})})},$r);function s0(c,i){return Xe(i.enabled,c)!==!1&&c.state.data===void 0&&!(c.state.status==="error"&&i.retryOnMount===!1)}function zr(c,i){return s0(c,i)||c.state.data!==void 0&&zc(c,i,i.refetchOnMount)}function zc(c,i,f){if(Xe(i.enabled,c)!==!1){const r=typeof f=="function"?f(c):f;return r==="always"||r!==!1&&Mc(c,i)}return!1}function Mr(c,i,f,r){return(c!==i||Xe(r.enabled,c)===!1)&&(!f.suspense||c.state.status!=="error")&&Mc(c,f)}function Mc(c,i){return Xe(i.enabled,c)!==!1&&c.isStaleByTime(Yl(i.staleTime,c))}function f0(c,i){return!Ec(c.getCurrentResult(),i)}var Cr=yt.createContext(void 0),r0=c=>{const i=yt.useContext(Cr);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},o0=({client:c,children:i})=>(yt.useEffect(()=>(c.mount(),()=>{c.unmount()}),[c]),D.jsx(Cr.Provider,{value:c,children:i})),Ur=yt.createContext(!1),d0=()=>yt.useContext(Ur);Ur.Provider;function h0(){let c=!1;return{clearReset:()=>{c=!1},reset:()=>{c=!0},isReset:()=>c}}var y0=yt.createContext(h0()),v0=()=>yt.useContext(y0);function m0(c,i){return typeof c=="function"?c(...i):!!c}function Nr(){}var g0=(c,i)=>{(c.suspense||c.throwOnError||c.experimental_prefetchInRender)&&(i.isReset()||(c.retryOnMount=!1))},p0=c=>{yt.useEffect(()=>{c.clearReset()},[c])},b0=({result:c,errorResetBoundary:i,throwOnError:f,query:r,suspense:d})=>c.isError&&!i.isReset()&&!c.isFetching&&r&&(d&&c.data===void 0||m0(f,[c.error,r])),S0=c=>{const i=c.staleTime;c.suspense&&(c.staleTime=typeof i=="function"?(...f)=>Math.max(i(...f),1e3):Math.max(i??1e3,1e3),typeof c.gcTime=="number"&&(c.gcTime=Math.max(c.gcTime,1e3)))},E0=(c,i)=>c.isLoading&&c.isFetching&&!i,_0=(c,i)=>(c==null?void 0:c.suspense)&&i.isPending,jr=(c,i,f)=>i.fetchOptimistic(c).catch(()=>{f.clearReset()});function T0(c,i,f){var C,j,x,L,Q;const r=r0(),d=d0(),S=v0(),E=r.defaultQueryOptions(c);(j=(C=r.getDefaultOptions().queries)==null?void 0:C._experimental_beforeQuery)==null||j.call(C,E),E._optimisticResults=d?"isRestoring":"optimistic",S0(E),g0(E,S),p0(S);const M=!r.getQueryCache().get(E.queryHash),[A]=yt.useState(()=>new i(r,E)),y=A.getOptimisticResult(E),O=!d&&c.subscribed!==!1;if(yt.useSyncExternalStore(yt.useCallback(B=>{const I=O?A.subscribe(Pt.batchCalls(B)):Nr;return A.updateResult(),I},[A,O]),()=>A.getCurrentResult(),()=>A.getCurrentResult()),yt.useEffect(()=>{A.setOptions(E,{listeners:!1})},[E,A]),_0(E,y))throw jr(E,A,S);if(b0({result:y,errorResetBoundary:S,throwOnError:E.throwOnError,query:r.getQueryCache().get(E.queryHash),suspense:E.suspense}))throw y.error;if((L=(x=r.getDefaultOptions().queries)==null?void 0:x._experimental_afterQuery)==null||L.call(x,E,y),E.experimental_prefetchInRender&&!sl&&E0(y,d)){const B=M?jr(E,A,S):(Q=r.getQueryCache().get(E.queryHash))==null?void 0:Q.promise;B==null||B.catch(Nr).finally(()=>{A.updateResult()})}return E.notifyOnChangeProps?y:A.trackResult(y)}function Cc(c,i){return T0(c,c0)}var A0=function(){return null};/*! js-cookie v3.0.5 | MIT */function Ju(c){for(var i=1;i"u")){E=Ju({},i,E),typeof E.expires=="number"&&(E.expires=new Date(Date.now()+E.expires*864e5)),E.expires&&(E.expires=E.expires.toUTCString()),d=encodeURIComponent(d).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var M="";for(var A in E)E[A]&&(M+="; "+A,E[A]!==!0&&(M+="="+E[A].split(";")[0]));return document.cookie=d+"="+c.write(S,d)+M}}function r(d){if(!(typeof document>"u"||arguments.length&&!d)){for(var S=document.cookie?document.cookie.split("; "):[],E={},M=0;Masync function(f,r={}){const d=M0(c,f,r.search);r=C0(r);const S=await fetch(d.toString(),r);return new D0(S)};function R0(){const c=Nc.get("dek_eshop_token");if(!c)throw new Error("DEK Eshop token was not found.");return new Headers({Authorization:"Bearer "+c})}function z0(){const c=Nc.get("dek_config");if(!c)throw new Error("DEK Config was not found.");const i=atob(c);return JSON.parse(i)}function M0(c=void 0,i,f=void 0){const r=z0(),d=c?r.api.hasOwnProperty(c)?r.api[c]:c:r.api.base,S=new URL(d+i);return f&&(S.search=f.toString()),S}function C0(c){const i={...c},f=new Headers(i.headers);return i.headers=R0(),f.forEach((r,d)=>{var S;(S=i.headers)==null||S.set(d,r)}),i}function U0(c){if(!c.ok&&c.status>=500)throw new Hc(c);if(!c.ok&&c.status>=400&&c.status<500)throw new jc(c);return c}const gl=class gl{};pe(gl,"add",({message:i,type:f})=>{dispatchEvent(new CustomEvent("ES_ADD_MESSAGE_FLASH",{detail:{message:i,type:f}}))}),pe(gl,"addByError",i=>{const f=i;console.error(f),f instanceof jc||f instanceof Hc?(f instanceof jc&&gl.add({message:`Nastala neočekávaná klientská chyba. (${f.status})`,type:"error"}),f instanceof Hc&&gl.add({message:`Nastala neočekávaná serverová chyba. (${f.status})`,type:"error"})):gl.add({message:"Nastala neočekávaná chyba.",type:"error"})});let Gl=gl;class Ll{static getConfig(){if(!this.config){const i=Nc.get("dek_config");if(i===void 0)throw new Error("Config not found");try{const f=atob(i);this.config=JSON.parse(f)}catch(f){throw console.error(f),Gl.add({type:"error",message:"Nepodařilo se načíst konfiguraci."}),new Error("Config is not valid")}}return this.config}static getApiBase(){return this.getConfig().api.base}static getApiSearch(){return this.getConfig().api.search}static getBaseCdn(){return this.getConfig().cdn.base}static getBranchCode(){return this.getConfig().branchCode}static getBranchTitle(){return this.getConfig().branchTitle}static getDomain(){switch(this.getShopId()){case"argos_cz":return"argos.cz";case"dek_cz":return"dek.cz";case"dek_sk":return"dek.sk"}}static getEmail(){return this.getConfig().email}static getLang(){switch(this.getShopId()){case"argos_cz":case"dek_cz":return"cz";case"dek_sk":return"sk";default:return"cz"}}static getSearchCompany(){return this.getShopId().replace("_","-")}static getShopId(){const i=this.getConfig().shopId;return i==="dek"?"dek_cz":i}static isDev(){return this.getConfig().isDev}}pe(Ll,"config"),function(){var c=/\[object (Boolean|Number|String|Function|Array|Date|RegExp|Arguments)\]/;function i(y){return y==null?String(y):(y=c.exec(Object.prototype.toString.call(Object(y))))?y[1].toLowerCase():"object"}function f(y,O){return Object.prototype.hasOwnProperty.call(Object(y),O)}function r(y){if(!y||i(y)!="object"||y.nodeType||y==y.window)return!1;try{if(y.constructor&&!f(y,"constructor")&&!f(y.constructor.prototype,"isPrototypeOf"))return!1}catch{return!1}for(var O in y);return O===void 0||f(y,O)}function d(y,O){var C={},j=C;y=y.split(".");for(var x=0;xthis.showMessageFlash(f)),this}addHandlerMessageError(i,f){return this.addHandlerMessage(i,{message:f,type:"error"}),this}createDefaultMessage(i){return{message:`Nastala neočekávaná chyba při požadavku na server: ${i}`,type:"error"}}async handleError(i){try{const r=await i.clone().json();if(r.some(d=>d.message))for(const{message:d}of r.filter(S=>S.message))this.showMessageFlash({message:d,type:"error"});else this.showMessageFlash(this.createDefaultMessage(i.status))}catch(r){console.error(r),this.showMessageFlash(this.createDefaultMessage(i.status))}const f=`Error: [${i.status}] => ${await i.text()}`;throw console.error(f),new Error(f)}async run(){const i=this.response.clone(),f=this.hasHandlers(this.statusCode,this.statusWildCard);f&&await this.runHandlers(this.statusCode,this.statusWildCard,i),!f&&this.statusCode>=400&&await this.handleError(i.clone())}async showMessageFlash(i){Gl.add(i)}}const j0="6682bb8f11e5033d357e8f6f",H0={3:"667bfe4bed72c377f239df32",5:"667bfe7edb522e854d477246",6:"667bfed80d7c5faafbdb4b93",22:"667bfe7edb522e854d477240",31:"667bfc511995e7a169eae95c"},x0=c=>c===void 0?j0:H0[c],q0=async c=>(await Q0(c?`lastVisitedProductsAtSection_${c}`:"lastVisitedProductsAll")).exponea.filter(f=>f!=="None")??[],w0=async c=>{const i=x0(c);if(!i)return[];const r=await xc()(`/product/get-best-seller-product-code-eshop-list?analysisId=${i}`),d=[],S=new N0(r.response);if(S.addHandler("2xx",async E=>{d.push(...await E.json())}),Ll.isDev()){const E="Nastala neočekávaná chyba při načítání produktů pro ReactProductSliderUserTarget.";S.addHandlerMessageError("4xx",E).addHandlerMessageError("5xx",E)}else S.addHandler("4xx").addHandler("5xx");return await S.run(),[...new Set(d)]},Q0=async c=>{const f=Date.now();if(window.dataLayer===void 0)return console.warn("[ReactProductSliderUserTarget]: dataLayer not found"),{event:c,exponea:[]};const r=window.dataLayer.find(d=>d.event===c);return r!==void 0?r:new Promise(d=>{const S=setTimeout(()=>{console.warn(`[ReactProductSliderUserTarget]: dataLayer event '${c}' not found`),d({event:c,exponea:[]})},2500);new DataLayerHelper(window.dataLayer,{listener:(E,M)=>{"event"in M&&M.event===c&&(console.debug(`[ReactProductSliderUserTarget]: dataLayer event '${c}' found in ${Date.now()-f}ms`),clearTimeout(S),d(M))},listenToPast:!0})})},Ve={wrap:"_wrap_ip60s_1",viewport:"_viewport_ip60s_8",grayBackground:"_grayBackground_ip60s_12",container:"_container_ip60s_25",arrowWrap:"_arrowWrap_ip60s_33",arrowNext:"_arrowNext_ip60s_38",arrowPrev:"_arrowPrev_ip60s_39",disabled:"_disabled_ip60s_83"},be={wrap:"_wrap_1am3e_1",image:"_image_1am3e_17",title:"_title_1am3e_32",content:"_content_1am3e_49",price:"_price_1am3e_65",rental:"_rental_1am3e_73",unit:"_unit_1am3e_80"},B0={image:"_image_ox479_1"},Y0="https://cdn1.idek.cz/img/2711ac4e3e85e0ac6233b02388095dbb.webp",Hr=({src:c,alt:i,resolutionList:f})=>{c??(c=Y0);const r=[...f],d=r.shift();return D.jsxs("picture",{className:"r-image",children:[r.map(({width:S,height:E,maxWidth:M},A)=>D.jsx("source",{media:M?`(max-width: ${M}px)`:void 0,srcSet:c.replace(".webp",`_ew${S}_eh${E}.webp`),type:"image/webp",width:S,height:E},A)),D.jsx("img",{className:B0.image,src:c.replace(".webp",`_ew${d==null?void 0:d.width}_eh${d==null?void 0:d.height}.webp`),width:d==null?void 0:d.width,height:d==null?void 0:d.height,alt:i})]})},ku={async getProductEshopByCode(c,i){if(Array.isArray(c)||(c=[c]),c.length===0)return[];const f=xc(),r=new URLSearchParams;for(const d of c)r.append("codes",d);for(const d of i)r.append("parts",d);try{return await(await f("/product/get-products-eshop-by-codes",{search:r})).toJson()}catch(d){Gl.addByError(d)}return[]},async getProductRentalByCode(c,i){if(Array.isArray(c)||(c=[c]),c.length===0)return[];const f=xc(),r=new URLSearchParams;for(const d of c)r.append("codes",d);for(const d of i)r.append("parts",d);try{return await(await f("/product/get-products-rental-by-codes",{search:r})).toJson()}catch(d){Gl.addByError(d)}return[]}},G0=(c,i,f=!0)=>{const r=c.split("|");if(r.length!==3&&r.length!==4)return console.warn(`Daný text "${c}" nemá správný formát`),f?`${i} ${c}`:c;let d,S,E,M;r.length===3?([S,E,M]=r.map(y=>y.trim()),d=M):[d,S,E,M]=r.map(y=>y.trim());let A=M;return i===0&&(A=d),i===1&&(A=S),i>=2&&i<=4&&(A=E),f?`${i} ${A}`:A},L0=c=>c.replace(/m2/g,"m²").replace(/m3/g,"m³");class Se{static formatPrice(i,f){const r=new Intl.NumberFormat("cs-CZ",{style:"currency",currency:f}).format(i);return f==="EUR"?r.replace("€","EUR"):r.toString()}static formatUnit(i){return i.replace("m2","m²").replace("m3","m³")}static formatQuantity(i){return(Number(i)===i&&i%1!==0?i.toFixed(2):i).toLocaleString().replace(".",",")}static calculateQuantityUnitEshopToSales(i,f){const r=f.isPackagePrimary?i*1e6*(f.unitsInPackage*1e6)/1e12:i;return{unitPrimary:i,unitSecondary:f.isPackagePrimary?r:i,unitSales:r,unitPackage:f.isPackagePrimary?i:r}}static calculateQuantityUnitEshop(i,f){return Se.calculateQuantityUnitEshopToSales(i,f)}static calculateQuantityUnitEshopToPrimary(i,f){const r=f.isPackagePrimary?i*1e12/(f.unitsInPackage*1e6)/1e6:i;return{unitPrimary:r,unitSecondary:f.isPackagePrimary?i:r,unitSales:i,unitPackage:f.isPackagePrimary?r:i}}static calculateQuantityPriceEshop(i,f){const r=Math.round(f.priceNoVatPrimary*i*100)/100,d=Math.round(r*f.vat/100*100)/100,S=Math.round((r+d)*100)/100;return{priceNoVatPrimary:r,priceVatPrimary:S}}static getAvailabilityStatusByBranchCode(i,f,r){switch(i.availabilityBranchCode){case"P00":case"P01":case"P05":case"P06":return{showButton:!0,color:"green",buttonText:r,buttonColor:"green"};case"P02":case"P07":case"P08":case"P10":return{showButton:!1,color:"red"};case"P04":return{showButton:!0,color:"red",buttonText:f,buttonColor:"blue"};case"P03":return{showButton:!0,color:"blue",buttonText:f,buttonColor:"blue"};case"P09":return{showButton:!1,color:"gray"};default:return{showButton:!0,color:"blue",buttonText:f,buttonColor:"blue"}}}static addToCartEshop(i,f,r,d){window.dispatchEvent(new CustomEvent("ES_ADD_TO_CART_ESHOP",{detail:{code:i,quantitySales:f,unitSales:r,eventInvoker:d}}))}static addToCartRental(i){const{unionCode:f,quantity:r,date:d,hasGuarantee:S,typeOfRental:E,eventInvoker:M}=i;window.dispatchEvent(new CustomEvent("ES_ADD_TO_CART_RENTAL",{detail:{unionCode:f,quantity:r,quantitySales:r,dateFrom:d.from,dateTo:d.to,withGuarantee:S,typeOfRental:E,eventInvoker:M}}))}static async getProductEshopByCode(i,f){return ku.getProductEshopByCode(i,f)}static async getProductRentalByCode(i,f){return ku.getProductRentalByCode(i,f)}static calculateSeasonPoints(i,f){if(i.season===null||i.season===void 0)return 0;const r=i.season;if(r.rewardFor==="Quantity")return Math.floor(f/r.requiredQuantity)*r.rewardPoints;if(r.rewardFor==="Price"){const d=i.price.priceNoVatSales*f;return Math.floor(d/r.requiredQuantity)*r.rewardPoints}return 0}static getNumberOfDaysByTypeOfRental(i,f){if(f==="HalfDay")return"4 hodiny";const r=Math.ceil((i.to.getTime()-i.from.getTime())/864e5),d=S=>G0(Ll.getLang()==="sk"?"deň | dni | dní":"den | dny | dní",S);return d(f==="FullDay"?r:r+1)}}const qc={cz:{toCart:"Do košíku",demand:"Poptat",labelAddToCart:(c,i)=>D.jsxs(D.Fragment,{children:["do košíku přidáte"," ",D.jsxs("strong",{children:[Se.formatQuantity(c)," ",Se.formatUnit(i)]})]}),addToCart:"Přidat",addedToCart:"Přidáno",unit:c=>`za ${c}`,withDPH:"s DPH",total:"celkem"},sk:{toCart:"Do košíka",demand:"Na dopyt",labelAddToCart:(c,i)=>D.jsxs(D.Fragment,{children:["do košíka pridáte"," ",D.jsxs("strong",{children:[Se.formatQuantity(c)," ",Se.formatUnit(i)]})]}),addToCart:"Pridať",addedToCart:"Pridané",unit:c=>`za ${c}`,withDPH:"s DPH",total:"celkom"}},ce={container:"_container_1nbmo_1",inputs:"_inputs_1nbmo_11",quantity:"_quantity_1nbmo_17",button:"_button_1nbmo_25",row:"_row_1nbmo_28",compact:"_compact_1nbmo_33",price:"_price_1nbmo_40",addToCart:"_addToCart_1nbmo_52",loading:"_loading_1nbmo_65",spin:"_spin_1nbmo_1",input:"_input_1nbmo_11",alreadyInCart:"_alreadyInCart_1nbmo_95",slide:"_slide_1nbmo_109"},X0={event:"recobox",recobox_pagetype:"modal_cart",recobox_boxName:"mohlo_by_se_vam_hodit"},xr=c=>{window.dataLayer??(window.dataLayer=[]),window.dataLayer.push({...X0,recobox_action:"add_to_cart",recobox_product_id:c})};let V0=(Yc=class{},pe(Yc,"getFormSize",i=>i?`dek-form-width--${i}`:""),Yc);const wc=({onChange:c,children:i,disabled:f,size:r,state:d,type:S,onChangeLazy:E,onBlur:M,...A})=>{const y=yt.useId(),O=L=>{if(!c)return;const{value:Q}=L.target;if(S==="number"){c(Number(Q)||Number.NaN,L);return}c(Q,L)},C=L=>{if(E){const{value:Q}=L.target;if(S==="number"){E(Number(Q)||Number.NaN,L);return}E(Q,L)}M==null||M(L)},j=V0.getFormSize(r),x=[j];return d&&x.push(d.level),D.jsxs(D.Fragment,{children:[i&&D.jsx("label",{htmlFor:y,children:i}),D.jsx("input",{id:y,role:"textbox",disabled:f,className:x.join(" "),onChange:O,onBlur:C,type:S,...A}),d&&!f&&d.message&&D.jsx("div",{className:`input-${d.level} ${j}`,children:d.message})]})},Z0=c=>{const{type:i}=c;if(i==="compact")return D.jsx(J0,{...c});if(i==="slide")return D.jsx(k0,{...c});if(i==="long")return D.jsx(K0,{...c})},K0=({lang:c,product:i})=>{const{availability:f,code:r,price:d,unit:S}=i,{addToCartEshop:E,calculateQuantityPriceEshop:M,calculateQuantityUnitEshopToSales:A,formatPrice:y,formatUnit:O,getAvailabilityStatusByBranchCode:C}=Se,j=qc[c],x=yt.useRef(null),[L,Q]=yt.useState({unitPrimary:S.minimumCountUnitPrimary,unitSecondary:S.unitsInPackage,unitSales:S.minimumCountUnitSales}),[B,I]=yt.useState({priceVatPrimary:d.priceVatPrimary}),W=V=>{V=V{var V;E(r,L.unitSales,S.unitSales,"long"),(V=x.current)==null||V.blur()},tt=C(f,j.demand,j.toCart);return tt.showButton?D.jsxs("div",{className:`r-add-to-cart-eshop-long ${ce.container}`,children:[D.jsxs("div",{className:ce.inputs,children:[D.jsxs("div",{className:ce.quantity,children:[D.jsx(wc,{onChange:W,type:"number",min:"1",value:L.unitPrimary,autoComplete:"off"}),D.jsx("label",{children:O(S.unitPrimary)})]}),D.jsx("button",{type:"button",ref:x,role:"button",className:`dek-button-${tt.buttonColor} ${ce.button}`,onClick:nt,children:tt.buttonText})]}),S.isPackagePrimary&&D.jsx("div",{className:ce.row,children:j.labelAddToCart(L.unitSecondary,S.unitSecondary)}),D.jsxs("div",{className:ce.row,children:[D.jsx("strong",{children:y(B.priceVatPrimary,d.currencyCode)})," ",j.total," ",j.withDPH]})]}):D.jsx("div",{className:`r-add-to-cart-eshop-long ${ce.container}`})},J0=({lang:c,product:i})=>{const{code:f,unit:r}=i,{addToCartEshop:d,calculateQuantityPriceEshop:S,calculateQuantityUnitEshopToSales:E,formatPrice:M}=Se,A=qc[c],[y,O]=yt.useState({unitPrimary:r.minimumCountUnitPrimary,unitSecondary:r.unitsInPackage,unitSales:r.minimumCountUnitSales}),[C,j]=yt.useState(!1),[x,L]=yt.useState(!1),[Q,B]=yt.useState(i.price.priceVatPrimary),I=tt=>{tt=tt{L(!0),window.addEventListener("ES_ADD_TO_CART_ESHOP_AFTER",nt),d(f,y.unitSales,r.unitSales,"compact")},nt=tt=>{i.code===tt.detail.code&&(L(!1),j(tt.detail.isSuccess),tt.detail.isSuccess&&xr(f),window.removeEventListener("ES_ADD_TO_CART_ESHOP_AFTER",nt))};return D.jsxs("div",{className:`r-add-to-cart-eshop-compact ${ce.compact}`,children:[D.jsxs("div",{className:ce.price,children:[D.jsx("strong",{children:M(Q,i.price.currencyCode)}),D.jsxs("div",{children:[A.unit(i.unit.unitPrimary)," ",A.withDPH]})]}),D.jsx("div",{className:ce.addToCart,children:C?D.jsxs("div",{className:ce.alreadyInCart,children:[D.jsx("img",{src:"https://cdn1.idek.cz/file/check-7c33cfe0.svg",width:16,height:16}),D.jsx("span",{children:A.addedToCart})]}):D.jsxs(D.Fragment,{children:[D.jsxs("div",{className:ce.input,children:[D.jsx(wc,{type:"number",min:1,defaultValue:y.unitPrimary,onChange:I,disabled:x}),i.unit.unitPrimary]}),D.jsxs("button",{type:"button",role:"button",className:"dek-button-green",onClick:W,disabled:x,children:[x&&D.jsx("span",{className:ce.loading}),A.addToCart]})]})})]})},k0=({lang:c,product:i})=>{const f=qc[c],r=()=>{const d=i.unit.isPackagePrimary?i.unit.minimumCountUnitSales:i.unit.minimumCountUnitPrimary;Se.addToCartEshop(i.code,d,i.unit.unitSales,"slide")};return D.jsx("div",{className:`r-add-to-cart-eshop-slide ${ce.slide}`,children:D.jsx("button",{type:"button",role:"button",onClick:r,className:`dek-button-green dek-button-small ${ce.button}`,children:f.toCart})})},Qc={cz:{toDetail:"Detail zapůjčení",unit:c=>`za ${c}`,withDPH:"s DPH",addToCart:"Přidat",addedToCart:"Přidáno"},sk:{toDetail:"Detail zapožičania",unit:c=>`za ${c}`,withDPH:"s DPH",addToCart:"Pridať",addedToCart:"Pridané"}},Ze={container:"_container_qt28n_1",topDivider:"_topDivider_qt28n_4",button:"_button_qt28n_9",compact:"_compact_qt28n_16",price:"_price_qt28n_23",addToCart:"_addToCart_qt28n_35",loading:"_loading_qt28n_48",spin:"_spin_qt28n_1",input:"_input_qt28n_68",alreadyInCart:"_alreadyInCart_qt28n_78"},$0=(c,i)=>`/produkty/detail/${c}${i?`-${i}`:""}`,Bc=(c,i)=>`/pujcovna/detail/${c.replace("|","/")}${i?`-${i}`:""}`,F0=c=>{const{type:i}=c;if(i==="compact")return D.jsx(I0,{...c});if(i==="long")return D.jsx(P0,{...c});if(i==="slide")return D.jsx(W0,{...c})},W0=({product:c,lang:i})=>{const f=Qc[i];return D.jsx("div",{className:`r-add-to-cart-rental-slide ${Ze.container}`,children:D.jsx("a",{role:"button",className:`dek-button dek-button-green dek-button-small ${Ze.button}`,href:Bc(c.code,c.detail.slug),children:f.toDetail})})},P0=({product:c,lang:i})=>{const f=Qc[i];return D.jsx("div",{className:`r-add-to-cart-rental-long ${Ze.container} ${Ze.topDivider}`,children:D.jsx("a",{role:"button",className:`dek-button dek-button-green ${Ze.button}`,href:Bc(c.code,c.detail.slug),children:f.toDetail})})},I0=({product:c,lang:i,date:f,hasGuarantee:r,typeOfRental:d})=>{const{formatPrice:S}=Se,E=Qc[i],[M,A]=yt.useState(1),[y,O]=yt.useState(c.detail.priceVatOrigin),[C,j]=yt.useState(!1),[x,L]=yt.useState(!1),Q=W=>{A(W),O(W*c.detail.priceVatOrigin)},B=()=>{L(!0),window.addEventListener("ES_ADD_TO_CART_RENTAL_AFTER",I),Se.addToCartRental({unionCode:c.code,quantity:M,date:f,hasGuarantee:r,typeOfRental:d,eventInvoker:"compact"})},I=W=>{c.code===W.detail.unionCode&&(L(!1),j(W.detail.isSuccess),W.detail.isSuccess&&xr(c.code),window.removeEventListener("ES_ADD_TO_CART_RENTAL_AFTER",I))};return D.jsxs("div",{className:`r-add-to-cart-rental-compact ${Ze.compact}`,children:[D.jsxs("div",{className:Ze.price,children:[D.jsx("strong",{children:S(y,c.detail.currencyCode)}),D.jsxs("div",{children:[E.unit(c.detail.unitPrice)," ",E.withDPH]})]}),D.jsx("div",{className:Ze.addToCart,children:C?D.jsxs("div",{className:Ze.alreadyInCart,children:[D.jsx("img",{src:"https://cdn1.idek.cz/file/check-7c33cfe0.svg",width:16,height:16}),D.jsx("span",{children:E.addedToCart})]}):D.jsxs(D.Fragment,{children:[D.jsxs("div",{className:Ze.input,children:[D.jsx(wc,{type:"number",min:1,defaultValue:M,onChange:Q,disabled:x}),c.detail.unitQuantity]}),D.jsxs("button",{type:"button",role:"button",className:"dek-button-green",onClick:B,disabled:x,children:[x&&D.jsx("span",{className:Ze.loading}),E.addToCart]})]})})]})},qr={icons:"_icons_4p8mm_1"},tv={cz:{hasVariants:"Více variant",hasGift:"Dárek k nákupu",hasPpl:"Doprava PPL"},sk:{hasVariants:"Viac variantov",hasGift:"Darček na nákup",hasPpl:"Doprava PPL"}},wr=({product:c})=>{const i=Ll.getLang(),f=tv[i];if(c.type==="eshop")return D.jsxs("div",{className:`r-product-icon ${qr.icons}`,children:[c.detail.hasVariant&&D.jsx("img",{title:f.hasVariants,alt:f.hasVariants,src:"https://cdn1.idek.cz/img/a32ef0de7bf6d55e5b00748dfe951840_rw24.png",width:24,height:24}),c.detail.hasGift&&D.jsx("img",{alt:f.hasGift,title:f.hasGift,src:"https://cdn1.idek.cz/img/13ac7588db7f1b49cbce256f5abd255f_rw24.png",width:24,height:24}),c.detail.hasPpl&&D.jsx("img",{title:f.hasPpl,alt:f.hasPpl,src:"https://cdn1.idek.cz/img/8c6599f32f6f4d9cbc8d20951dba4952_rw24.jpg",width:24,height:24})]});if(c.type==="rental")return D.jsx("div",{className:`r-product-icon ${qr.icons}`})},ev={cz:{stocksLast:"Do vyprodání zásob",recommended:"Doporučujeme",isRecent:"Novinka",isFeatured:"Výhodná cena"},sk:{stocksLast:"Do vypredania zásob",recommended:"Odporúčame",isRecent:"Novinka",isFeatured:"Výhodná ponuka"}},fa={labels:"_labels_14jqs_1",recommended:"_recommended_14jqs_12",isRecent:"_isRecent_14jqs_13",isFeatured:"_isFeatured_14jqs_14",isWhileStockLast:"_isWhileStockLast_14jqs_15",title:"_title_14jqs_39",content:"_content_14jqs_43",generousSeason:"_generousSeason_14jqs_50"},Qr=({product:c})=>{const i=Ll.getLang(),f=ev[i],r=()=>{if(c.type==="eshop")switch(!0){case c.availability.isWhileStockLast:return D.jsx("div",{className:fa.isWhileStockLast,children:f.stocksLast});case c.detail.isFeatured:return D.jsx("div",{className:fa.isFeatured,children:D.jsx("div",{className:fa.title,children:f.isFeatured})});case c.detail.isRecommended:return D.jsx("div",{className:fa.recommended,children:f.recommended});case c.detail.isRecent:return D.jsx("div",{className:fa.isRecent,children:f.isRecent});case!0:return null}if(c.type==="rental")switch(!0){case c.detail.isFeatured:return D.jsx("div",{className:fa.isFeatured,children:D.jsx("div",{className:fa.title,children:f.isFeatured})});case!0:return null}return null};return D.jsxs("div",{className:`r-product-label ${fa.labels}`,children:[r(),c.type==="eshop"&&c.detail.seasonPointsText&&D.jsxs("div",{className:fa.generousSeason,children:[D.jsx("img",{src:"https://cdn1.idek.cz/file/plus-white-a6e119fe.svg",width:22,height:22}),D.jsx("div",{children:L0(c.detail.seasonPointsText)})]})]})},av=({lang:c,product:i,showAddToCartButton:f})=>{const r=[{width:225,height:135},{width:320,height:192,maxWidth:680},{width:225,height:135,maxWidth:490},{width:170,height:170,maxWidth:370}];if(i.type==="eshop")return D.jsx(lv,{lang:c,product:i,resolutionList:r,showAddToCartButton:f});if(i.type==="rental")return D.jsx(nv,{lang:c,product:i,resolutionList:r,showAddToCartButton:f})},lv=({lang:c,product:i,resolutionList:f,showAddToCartButton:r})=>{const d=$0(i.code,i.detail.slug),S=Se.formatPrice(i.price.priceVatPrimary,i.price.currencyCode).split(",");return D.jsxs("div",{className:`r-product-preview-slide ${be.wrap}`,"data-product-code":i.code,children:[D.jsxs("a",{className:be.image,href:d,children:[D.jsx(Qr,{product:i}),D.jsx(wr,{product:i}),D.jsx(Hr,{src:i.detail.image,alt:i.detail.title,resolutionList:f})]}),D.jsxs("div",{className:be.content,children:[D.jsxs("a",{href:d,children:[D.jsx("span",{className:be.title,children:i.detail.title}),D.jsxs("div",{children:[D.jsxs("div",{className:be.price,children:[S[0],D.jsxs("span",{children:[",",S[1]]})]}),D.jsxs("div",{className:be.unit,children:["cena za"," ",i.unit.unitPrimary," ","s DPH"]})]})]}),r&&D.jsx(Z0,{lang:c,product:i,type:"slide"})]})]})},nv=({lang:c,product:i,resolutionList:f,showAddToCartButton:r})=>{const d=Bc(i.code,i.detail.slug),S=Se.formatPrice(i.detail.priceNoVatOrigin,i.detail.currencyCode).split(",");return D.jsxs("div",{className:`r-product-preview-slide ${be.wrap} ${be.rental}`,"data-product-code":i.code,children:[D.jsxs("a",{className:be.image,href:d,children:[D.jsx(Qr,{product:i}),D.jsx(wr,{product:i}),D.jsx(Hr,{src:i.detail.image,alt:i.detail.titleShort??i.detail.title,resolutionList:f})]}),D.jsxs("div",{className:be.content,children:[D.jsxs("a",{href:d,children:[D.jsx("span",{className:be.title,children:i.detail.titleShort??i.detail.title}),D.jsxs("div",{children:[D.jsxs("div",{className:be.price,children:[S[0],D.jsxs("span",{children:[",",S[1]]})]}),D.jsxs("div",{className:be.unit,children:["cena za"," ",i.detail.unitPrice," ","s DPH"]})]})]}),r&&D.jsx(F0,{lang:c,product:i,type:"slide"})]})]})};let $u,Fu;const Br=c=>{const i=c.touches[0];$u=i.clientX,Fu=i.clientY},uv=(c,i)=>{var E,M,A,y;if(!$u||!Fu)return;const f=c.touches[0].clientX,r=c.touches[0].clientY,d=$u-f,S=Fu-r;Math.abs(d)>Math.abs(S)?d>0?(E=i.onRight)==null||E.call(i):(M=i.onLeft)==null||M.call(i):S>0?(A=i.onDown)==null||A.call(i):(y=i.onUp)==null||y.call(i),$u=void 0,Fu=void 0},iv=(c,i)=>{yt.useEffect(()=>{if(c==null)return;const f=r=>uv(r,i);return c.addEventListener("touchstart",Br,!1),c.addEventListener("touchmove",f,!1),()=>{c.removeEventListener("touchstart",Br,!1),c.removeEventListener("touchmove",f,!1)}},[c,i])},Yr=c=>{const{hasGrayBackground:i,itemsMaxCount:f,loadingState:r,productList:d,showAddToCart:S,sliderMaxWidth:E}=c,M=Ll.getLang(),A=yt.useRef(null),y=yt.useRef(null),O=yt.useRef(null),[C,j]=yt.useState(0),[x,L]=yt.useState(0),[Q,B]=yt.useState(!1),[I,W]=yt.useState(0);yt.useEffect(()=>{const Yt=()=>{if(!A.current||!y.current||!O.current||!d)return;const Ce=A.current.offsetWidth??0,re=y.current.offsetWidth??0,ne=Ce-re,et=(E-ne)/f,k=Math.floor(re/et),Ot=re/k,v=Ot*d.length;j(v),L(re/Math.floor(re/Ot)),B(!0),W(0)};return Yt(),window.addEventListener("resize",Yt),()=>{window.removeEventListener("resize",Yt)}},[E,f,d]);const nt=A.current?A.current.offsetWidth:0,tt=y.current?y.current.offsetWidth:0,V=nt-tt,ot=Math.abs(I)+tt{ot&&W(I-tt)},q=()=>{At&&W(I+tt)},ut=(V/2+12)*-1,Bt=ut;return iv(y.current,{onRight:pt,onLeft:q}),r?D.jsx("div",{className:`r-slider-product ${Ve.wrap} ${i?Ve.grayBackground:""}`,role:"slider",style:{maxWidth:E},children:D.jsx("div",{className:Ve.viewport,children:D.jsx("div",{className:`${Ve.container} loading`,style:{transform:`translateX(${I}px)`,width:E,height:300}})})}):D.jsxs("div",{className:`r-slider-product ${Ve.wrap} ${i?Ve.grayBackground:""}`,ref:A,role:"slider",style:{maxWidth:E},children:[D.jsxs("div",{className:Ve.arrowWrap,children:[At&&D.jsx("div",{className:Ve.arrowPrev,onClick:q,style:{left:Bt}}),ot&&D.jsx("div",{className:Ve.arrowNext,onClick:pt,style:{right:ut}})]}),D.jsx("div",{className:Ve.viewport,ref:y,children:D.jsx("div",{className:Ve.container,ref:O,style:{transform:`translateX(${I}px)`,width:C},children:Q&&d.map(Yt=>D.jsx("div",{style:{width:x},children:D.jsx(av,{lang:M,product:Yt,showAddToCartButton:S})},Yt.code))})})]})},cv=({itemsMaxCount:c,sliderMaxWidth:i})=>{let f=!0;return c===void 0&&(console.error("[SliderProduct]: itemsMaxCount is required"),f=!1),i===void 0&&(console.error("[SliderProduct]: sliderMaxWidth is required"),f=!1),f},sv=({hasGrayBackground:c,sectionId:i,...f})=>{const r=cv({...f}),d=Cc({queryKey:["dataLayerProductCodeList",i],queryFn:async()=>q0(i),enabled:r}),S=Cc({queryKey:["fillOutProductCodeList",i],queryFn:async()=>w0(i),enabled:r}),E=[];d.isSuccess&&E.push(...d.data),S.isSuccess&&E.push(...S.data);const M=[...new Set(E)].splice(0,14),A=Cc({queryKey:["productList",M],queryFn:async()=>fv(M),enabled:r&&!d.isLoading&&!S.isLoading&&M.length>0}),y=D.jsx("div",{className:"r-a-product-slider-user-target",children:D.jsx(Yr,{...f,loadingState:!0})});return r?d.isLoading||S.isLoading?y:M.length<=0?null:A.isLoading?y:A.isSuccess?D.jsx("div",{className:"r-a-product-slider-user-target",children:D.jsx(Yr,{hasGrayBackground:c??!0,productList:A.data,...f})}):null:null},fv=async c=>{const i=c.filter(S=>S.length===10),f=c.filter(S=>S.length===7),r=await ku.getProductEshopByCode(i,["detail","availability","price","unit"]),d=await ku.getProductRentalByCode(f,["detail","price"]);return[...r,...d].filter(Boolean)},rv=new i0({defaultOptions:{queries:{staleTime:1/0,gcTime:1/0,refetchOnWindowFocus:!1,retry:!1}}});function ov(c,i){Vy.createRoot(document.querySelector(`#${c}`)).render(D.jsx(yt.StrictMode,{children:D.jsxs(o0,{client:rv,children:[D.jsx(sv,{...i}),D.jsx(A0,{})]})}))}return ov}); //# sourceMappingURL=index.umd.cjs.map