From aae568b8822e8f02c85d9d07e2b19181cde5d556 Mon Sep 17 00:00:00 2001 From: DreamXZE Date: Fri, 23 Feb 2024 14:40:43 +0100 Subject: [PATCH] Baun Improvement Just starting to change for video capture --- .../src/client/job/baun/baun.cofe.provider.ts | 50 ++++++++++ .../src/client/job/baun/baun.module.ts | 3 +- .../src/server/job/baun/baun.cofe.provider.ts | 92 +++++++++++++++++++ .../src/server/job/baun/baun.module.ts | 3 +- .../[soz]/soz-core/src/shared/event/server.ts | 1 + .../[soz]/soz-inventory/html/assets/index.js | 18 ++-- .../[soz]/soz-jobs/client/jobs/baun/_main.lua | 5 - .../soz-jobs/client/jobs/baun/icecube.lua | 37 ++++++++ resources/[soz]/soz-jobs/config/jobs/baun.lua | 1 + resources/[soz]/soz-jobs/server/jobs/baun.lua | 6 ++ 10 files changed, 200 insertions(+), 16 deletions(-) create mode 100644 resources/[soz]/soz-core/src/client/job/baun/baun.cofe.provider.ts create mode 100644 resources/[soz]/soz-core/src/server/job/baun/baun.cofe.provider.ts create mode 100644 resources/[soz]/soz-jobs/client/jobs/baun/icecube.lua diff --git a/resources/[soz]/soz-core/src/client/job/baun/baun.cofe.provider.ts b/resources/[soz]/soz-core/src/client/job/baun/baun.cofe.provider.ts new file mode 100644 index 0000000000..9b4aaded22 --- /dev/null +++ b/resources/[soz]/soz-core/src/client/job/baun/baun.cofe.provider.ts @@ -0,0 +1,50 @@ +import { TargetFactory } from '../../target/target.factory'; +import { JobType } from '@public/shared/job'; +import { ServerEvent } from '../../../shared/event'; + +import { Once, OnceStep } from '../../../core/decorators/event'; +import { Inject } from '../../../core/decorators/injectable'; +import { Provider } from '../../../core/decorators/provider'; +import { PlayerService } from '../../player/player.service'; +import { ProgressService } from '../../progress.service'; + +@Provider() +export class BaunCofeProvider { + @Inject(TargetFactory) + private targetFactory: TargetFactory; + + @Inject(PlayerService) + private playerService: PlayerService; + + @Inject(ProgressService) + private progressService: ProgressService; + + @Once(OnceStep.PlayerLoaded) + public setupBaunCraftZone() { + this.targetFactory.createForBoxZone(`baun:bahama:cofe:1`, { + center: [-1386.60, -605.19, 30.32], + length: 0.60, + width: 1.20, + heading: 211.43, + minZ: 30.32, + maxZ: 30.92, + }, [ + { + label: 'Faire des cafés', + icon: 'c:food/cafe.png', + blackoutGlobal: true, + job: JobType.Baun, + canInteract: () => { + return this.playerService.isOnDuty(); + }, + action: () => { + this.makeCofe(); + }, + }, + ]); + } + + async makeCofe() { + TriggerServerEvent(ServerEvent.BAUN_COFE); + } +} \ No newline at end of file diff --git a/resources/[soz]/soz-core/src/client/job/baun/baun.module.ts b/resources/[soz]/soz-core/src/client/job/baun/baun.module.ts index 63b8186500..8867f73eef 100644 --- a/resources/[soz]/soz-core/src/client/job/baun/baun.module.ts +++ b/resources/[soz]/soz-core/src/client/job/baun/baun.module.ts @@ -2,8 +2,9 @@ import { Module } from '../../../core/decorators/module'; import { BaunCraftProvider } from './baun.craft.provider'; import { BaunProvider } from './baun.provider'; import { BaunResellProvider } from './baun.resell.provider'; +import { BaunCofeProvider } from './baun.cofe.provider'; @Module({ - providers: [BaunProvider, BaunCraftProvider, BaunResellProvider], + providers: [BaunProvider, BaunCraftProvider, BaunResellProvider, BaunCofeProvider], }) export class BaunModule {} diff --git a/resources/[soz]/soz-core/src/server/job/baun/baun.cofe.provider.ts b/resources/[soz]/soz-core/src/server/job/baun/baun.cofe.provider.ts new file mode 100644 index 0000000000..a744b4f342 --- /dev/null +++ b/resources/[soz]/soz-core/src/server/job/baun/baun.cofe.provider.ts @@ -0,0 +1,92 @@ +import { OnEvent } from '@core/decorators/event'; +import { Inject } from '@core/decorators/injectable'; +import { Provider } from '@core/decorators/provider'; +import { FieldProvider } from '@public/server/farm/field.provider'; +import { InventoryManager } from '@public/server/inventory/inventory.manager'; +import { ItemService } from '@public/server/item/item.service'; +import { Notifier } from '@public/server/notifier'; +import { ProgressService } from '@public/server/player/progress.service'; +import { ServerEvent } from '@public/shared/event'; + +const EasterHarvestDrop: Record = { + golden_egg: 0.01, + chocolat_egg: 0.5, + chocolat_milk_egg: 1, +}; + +@Provider() +export class BaunCofeProvider { + @Inject(ProgressService) + private progressService: ProgressService; + + @Inject(InventoryManager) + private inventoryManager: InventoryManager; + + @Inject(FieldProvider) + private fieldService: FieldProvider; + + @Inject(ItemService) + private itemService: ItemService; + + @Inject(Notifier) + private notifier: Notifier; + + @OnEvent(ServerEvent.BAUN_COFE) + async onMakeCofe(source: number) { + this.notifier.notify(source, 'Vous ~g~commencez~s~ à faire du café.'); + + while (await this.doMakeCofe(source)) { + /* empty */ + } + this.notifier.notify(source, 'Vous avez ~r~terminé~s~ de faire du café.', 'success'); + } + + async doMakeCofe(source: number) { + const { completed } = await this.progressService.progress( + source, + 'dispenser_buy', + 'Vous faites du café.', + 1000, + { + dictionary: 'mini@sprunk', + name: 'plyr_buy_drink_pt1', + flags: 16, + options: { + repeat: true, + }, + }, + { + useAnimationService: true, + disableMovement: true, + disableCarMovement: false, + disableMouse: false, + disableCombat: true, + } + ); + if (!completed) { + return false; + } + + if (!this.inventoryManager.canCarryItem(source, 'coffee', 1)) { + this.notifier.notify( + source, + `Vous ne possédez pas suffisamment de place dans votre inventaire pour faire un café.` + ); + return false; + } + + const { success, reason } = this.inventoryManager.addItemToInventory(source, 'coffee', 1); + if (success) { + this.notifier.notify(source, `Vous avez récolté un ~b~${this.itemService.getItem('coffee').label}.`); + } else if (reason == 'invalid_weight') { + this.notifier.notify(source, 'Vos poches sont pleines...', 'error'); + return false; + } else { + this.notifier.notify(source, `Il y a eu une erreur: ${'coffee'} ${reason}`, 'error'); + return false; + } + return true; + } +} + + diff --git a/resources/[soz]/soz-core/src/server/job/baun/baun.module.ts b/resources/[soz]/soz-core/src/server/job/baun/baun.module.ts index 9c5dde6a52..5a30970424 100644 --- a/resources/[soz]/soz-core/src/server/job/baun/baun.module.ts +++ b/resources/[soz]/soz-core/src/server/job/baun/baun.module.ts @@ -1,7 +1,8 @@ import { Module } from '../../../core/decorators/module'; import { BaunResellProvider } from './baun.resell.provider'; +import { BaunCofeProvider } from './baun.cofe.provider'; @Module({ - providers: [BaunResellProvider], + providers: [BaunResellProvider, BaunCofeProvider], }) export class BaunModule {} diff --git a/resources/[soz]/soz-core/src/shared/event/server.ts b/resources/[soz]/soz-core/src/shared/event/server.ts index f319c95851..43dedba533 100644 --- a/resources/[soz]/soz-core/src/shared/event/server.ts +++ b/resources/[soz]/soz-core/src/shared/event/server.ts @@ -44,6 +44,7 @@ export enum ServerEvent { BASE_CHANGE_VEHICLE_SEAT = 'baseevents:changeVehicleSeat', BAUN_RESELL = 'soz-core:server:job:baun:resell', + BAUN_COFE = 'soz-core:server:job:baun:cofe', BENNYS_ESTIMATE_VEHICLE = 'soz-core:server:job:bennys:estimate-vehicle', BENNYS_SELL_VEHICLE = 'soz-core:server:job:bennys:sell-vehicle', diff --git a/resources/[soz]/soz-inventory/html/assets/index.js b/resources/[soz]/soz-inventory/html/assets/index.js index 103e67384d..e7710d93f1 100644 --- a/resources/[soz]/soz-inventory/html/assets/index.js +++ b/resources/[soz]/soz-inventory/html/assets/index.js @@ -6,7 +6,7 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var uo=Symbol.for("react.element"),Zf=Symbol.for("react.portal"),qf=Symbol.for("react.fragment"),ep=Symbol.for("react.strict_mode"),tp=Symbol.for("react.profiler"),np=Symbol.for("react.provider"),rp=Symbol.for("react.context"),op=Symbol.for("react.forward_ref"),lp=Symbol.for("react.suspense"),ip=Symbol.for("react.memo"),sp=Symbol.for("react.lazy"),Aa=Symbol.iterator;function ap(e){return e===null||typeof e!="object"?null:(e=Aa&&e[Aa]||e["@@iterator"],typeof e=="function"?e:null)}var dc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},fc=Object.assign,pc={};function lr(e,t,n){this.props=e,this.context=t,this.refs=pc,this.updater=n||dc}lr.prototype.isReactComponent={};lr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};lr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function hc(){}hc.prototype=lr.prototype;function Ds(e,t,n){this.props=e,this.context=t,this.refs=pc,this.updater=n||dc}var Ts=Ds.prototype=new hc;Ts.constructor=Ds;fc(Ts,lr.prototype);Ts.isPureReactComponent=!0;var ja=Array.isArray,yc=Object.prototype.hasOwnProperty,Ms={current:null},mc={key:!0,ref:!0,__self:!0,__source:!0};function vc(e,t,n){var r,o={},l=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(l=""+t.key),t)yc.call(t,r)&&!mc.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1>>1,B=T[V];if(0>>1;Vo(St,O))Zo(ct,St)?(T[V]=ct,T[Z]=O,V=Z):(T[V]=St,T[Se]=O,V=Se);else if(Zo(ct,O))T[V]=ct,T[Z]=O,V=Z;else break e}}return L}function o(T,L){var O=T.sortIndex-L.sortIndex;return O!==0?O:T.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var i=Date,s=i.now();e.unstable_now=function(){return i.now()-s}}var a=[],d=[],m=1,h=null,p=3,v=!1,w=!1,x=!1,D=typeof setTimeout=="function"?setTimeout:null,c=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function u(T){for(var L=n(d);L!==null;){if(L.callback===null)r(d);else if(L.startTime<=T)r(d),L.sortIndex=L.expirationTime,t(a,L);else break;L=n(d)}}function g(T){if(x=!1,u(T),!w)if(n(a)!==null)w=!0,me(k);else{var L=n(d);L!==null&&de(g,L.startTime-T)}}function k(T,L){w=!1,x&&(x=!1,c(C),C=-1),v=!0;var O=p;try{for(u(L),h=n(a);h!==null&&(!(h.expirationTime>L)||T&&!z());){var V=h.callback;if(typeof V=="function"){h.callback=null,p=h.priorityLevel;var B=V(h.expirationTime<=L);L=e.unstable_now(),typeof B=="function"?h.callback=B:h===n(a)&&r(a),u(L)}else r(a);h=n(a)}if(h!==null)var De=!0;else{var Se=n(d);Se!==null&&de(g,Se.startTime-L),De=!1}return De}finally{h=null,p=O,v=!1}}var S=!1,_=null,C=-1,P=5,M=-1;function z(){return!(e.unstable_now()-MT||125V?(T.sortIndex=O,t(d,T),n(a)===null&&T===n(d)&&(x?(c(C),C=-1):x=!0,de(g,O-V))):(T.sortIndex=B,t(a,T),w||v||(w=!0,me(k))),T},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(T){var L=p;return function(){var O=p;p=L;try{return T.apply(this,arguments)}finally{p=O}}}})(wc);(function(e){e.exports=wc})(gc);/** + */(function(e){function t(T,L){var O=T.length;T.push(L);e:for(;0>>1,B=T[V];if(0>>1;Vo(St,O))bo(ct,St)?(T[V]=ct,T[b]=O,V=b):(T[V]=St,T[Se]=O,V=Se);else if(bo(ct,O))T[V]=ct,T[b]=O,V=b;else break e}}return L}function o(T,L){var O=T.sortIndex-L.sortIndex;return O!==0?O:T.id-L.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;e.unstable_now=function(){return l.now()}}else{var i=Date,s=i.now();e.unstable_now=function(){return i.now()-s}}var a=[],d=[],m=1,h=null,p=3,v=!1,w=!1,x=!1,D=typeof setTimeout=="function"?setTimeout:null,c=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function u(T){for(var L=n(d);L!==null;){if(L.callback===null)r(d);else if(L.startTime<=T)r(d),L.sortIndex=L.expirationTime,t(a,L);else break;L=n(d)}}function g(T){if(x=!1,u(T),!w)if(n(a)!==null)w=!0,me(k);else{var L=n(d);L!==null&&de(g,L.startTime-T)}}function k(T,L){w=!1,x&&(x=!1,c(C),C=-1),v=!0;var O=p;try{for(u(L),h=n(a);h!==null&&(!(h.expirationTime>L)||T&&!z());){var V=h.callback;if(typeof V=="function"){h.callback=null,p=h.priorityLevel;var B=V(h.expirationTime<=L);L=e.unstable_now(),typeof B=="function"?h.callback=B:h===n(a)&&r(a),u(L)}else r(a);h=n(a)}if(h!==null)var De=!0;else{var Se=n(d);Se!==null&&de(g,Se.startTime-L),De=!1}return De}finally{h=null,p=O,v=!1}}var S=!1,_=null,C=-1,P=5,M=-1;function z(){return!(e.unstable_now()-MT||125V?(T.sortIndex=O,t(d,T),n(a)===null&&T===n(d)&&(x?(c(C),C=-1):x=!0,de(g,O-V))):(T.sortIndex=B,t(a,T),w||v||(w=!0,me(k))),T},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(T){var L=p;return function(){var O=p;p=L;try{return T.apply(this,arguments)}finally{p=O}}}})(wc);(function(e){e.exports=wc})(gc);/** * @license React * react-dom.production.min.js * @@ -22,14 +22,14 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var xc=y.exports,Ue=gc.exports;function N(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pi=Object.prototype.hasOwnProperty,pp=/^[: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]*$/,$a={},Ua={};function hp(e){return Pi.call(Ua,e)?!0:Pi.call($a,e)?!1:pp.test(e)?Ua[e]=!0:($a[e]=!0,!1)}function yp(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function mp(e,t,n,r){if(t===null||typeof t>"u"||yp(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ee(e,t,n,r,o,l,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=i}var ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ye[e]=new Ee(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ye[t]=new Ee(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ye[e]=new Ee(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ye[e]=new Ee(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ye[e]=new Ee(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ye[e]=new Ee(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ye[e]=new Ee(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ye[e]=new Ee(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ye[e]=new Ee(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ls=/[\-:]([a-z])/g;function Is(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ls,Is);ye[t]=new Ee(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ls,Is);ye[t]=new Ee(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ls,Is);ye[t]=new Ee(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ye[e]=new Ee(e,1,!1,e.toLowerCase(),null,!1,!1)});ye.xlinkHref=new Ee("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ye[e]=new Ee(e,1,!1,e.toLowerCase(),null,!0,!0)});function Os(e,t,n,r){var o=ye.hasOwnProperty(t)?ye[t]:null;(o!==null?o.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pi=Object.prototype.hasOwnProperty,hp=/^[: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]*$/,$a={},Ua={};function yp(e){return Pi.call(Ua,e)?!0:Pi.call($a,e)?!1:hp.test(e)?Ua[e]=!0:($a[e]=!0,!1)}function mp(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function vp(e,t,n,r){if(t===null||typeof t>"u"||mp(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Ee(e,t,n,r,o,l,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=l,this.removeEmptyString=i}var ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ye[e]=new Ee(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ye[t]=new Ee(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ye[e]=new Ee(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ye[e]=new Ee(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ye[e]=new Ee(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ye[e]=new Ee(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ye[e]=new Ee(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ye[e]=new Ee(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ye[e]=new Ee(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ls=/[\-:]([a-z])/g;function Is(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Ls,Is);ye[t]=new Ee(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Ls,Is);ye[t]=new Ee(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Ls,Is);ye[t]=new Ee(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ye[e]=new Ee(e,1,!1,e.toLowerCase(),null,!1,!1)});ye.xlinkHref=new Ee("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ye[e]=new Ee(e,1,!1,e.toLowerCase(),null,!0,!0)});function Os(e,t,n,r){var o=ye.hasOwnProperty(t)?ye[t]:null;(o!==null?o.type!==0:r||!(2s||o[i]!==l[s]){var a=` -`+o[i].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=i&&0<=s);break}}}finally{ei=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Tr(e):""}function vp(e){switch(e.tag){case 5:return Tr(e.type);case 16:return Tr("Lazy");case 13:return Tr("Suspense");case 19:return Tr("SuspenseList");case 0:case 2:case 15:return e=ti(e.type,!1),e;case 11:return e=ti(e.type.render,!1),e;case 1:return e=ti(e.type,!0),e;default:return""}}function zi(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Rn:return"Fragment";case Mn:return"Portal";case Li:return"Profiler";case zs:return"StrictMode";case Ii:return"Suspense";case Oi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Cc:return(e.displayName||"Context")+".Consumer";case kc:return(e._context.displayName||"Context")+".Provider";case As:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case js:return t=e.displayName||null,t!==null?t:zi(e.type)||"Memo";case Ft:t=e._payload,e=e._init;try{return zi(e(t))}catch{}}return null}function gp(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return zi(t);case 8:return t===zs?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function qt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ec(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function wp(e){var t=Ec(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,l.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _o(e){e._valueTracker||(e._valueTracker=wp(e))}function Nc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ec(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ai(e,t){var n=t.checked;return b({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function Wa(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=qt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Dc(e,t){t=t.checked,t!=null&&Os(e,"checked",t,!1)}function ji(e,t){Dc(e,t);var n=qt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Fi(e,t.type,n):t.hasOwnProperty("defaultValue")&&Fi(e,t.type,qt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Va(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Fi(e,t,n){(t!=="number"||Zo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Mr=Array.isArray;function Vn(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Eo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Kr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Lr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xp=["Webkit","ms","Moz","O"];Object.keys(Lr).forEach(function(e){xp.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Lr[t]=Lr[e]})});function Pc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Lr.hasOwnProperty(e)&&Lr[e]?(""+t).trim():t+"px"}function Lc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Pc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var Sp=b({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Bi(e,t){if(t){if(Sp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function Wi(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Vi=null;function Fs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hi=null,Hn=null,Kn=null;function Qa(e){if(e=po(e)){if(typeof Hi!="function")throw Error(N(280));var t=e.stateNode;t&&(t=Il(t),Hi(e.stateNode,e.type,t))}}function Ic(e){Hn?Kn?Kn.push(e):Kn=[e]:Hn=e}function Oc(){if(Hn){var e=Hn,t=Kn;if(Kn=Hn=null,Qa(e),t)for(e=0;e>>=0,e===0?32:31-(Lp(e)/Ip|0)|0}var No=64,Do=4194304;function Rr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function nl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,l=e.pingedLanes,i=n&268435455;if(i!==0){var s=i&~o;s!==0?r=Rr(s):(l&=i,l!==0&&(r=Rr(l)))}else i=n&~o,i!==0?r=Rr(i):l!==0&&(r=Rr(l));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,l=t&-t,o>=l||o===16&&(l&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function co(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-lt(t),e[t]=n}function jp(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Or),tu=String.fromCharCode(32),nu=!1;function ed(e,t){switch(e){case"keyup":return dh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function td(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Pn=!1;function ph(e,t){switch(e){case"compositionend":return td(t);case"keypress":return t.which!==32?null:(nu=!0,tu);case"textInput":return e=t.data,e===tu&&nu?null:e;default:return null}}function hh(e,t){if(Pn)return e==="compositionend"||!Qs&&ed(e,t)?(e=Zc(),Wo=Vs=Vt=null,Pn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=iu(n)}}function ld(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ld(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function id(){for(var e=window,t=Zo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zo(e.document)}return t}function Ys(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Ch(e){var t=id(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ld(n.ownerDocument.documentElement,n)){if(r!==null&&Ys(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,l=Math.min(r.start,o);r=r.end===void 0?l:Math.min(r.end,o),!e.extend&&l>r&&(o=r,r=l,l=o),o=su(n,l);var i=su(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ln=null,Ji=null,Ar=null,bi=!1;function au(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;bi||Ln==null||Ln!==Zo(r)||(r=Ln,"selectionStart"in r&&Ys(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ar&&br(Ar,r)||(Ar=r,r=ll(Ji,"onSelect"),0zn||(e.current=rs[zn],rs[zn]=null,zn--)}function K(e,t){zn++,rs[zn]=e.current,e.current=t}var en={},xe=rn(en),Pe=rn(!1),yn=en;function bn(e,t){var n=e.type.contextTypes;if(!n)return en;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},l;for(l in n)o[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Le(e){return e=e.childContextTypes,e!=null}function sl(){Y(Pe),Y(xe)}function yu(e,t,n){if(xe.current!==en)throw Error(N(168));K(xe,t),K(Pe,n)}function yd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(N(108,gp(e)||"Unknown",o));return b({},n,r)}function al(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||en,yn=xe.current,K(xe,e),K(Pe,Pe.current),!0}function mu(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=yd(e,t,yn),r.__reactInternalMemoizedMergedChildContext=e,Y(Pe),Y(xe),K(xe,e)):Y(Pe),K(Pe,n)}var _t=null,Ol=!1,yi=!1;function md(e){_t===null?_t=[e]:_t.push(e)}function zh(e){Ol=!0,md(e)}function on(){if(!yi&&_t!==null){yi=!0;var e=0,t=W;try{var n=_t;for(W=1;e>=i,o-=i,Et=1<<32-lt(t)+o|n<C?(P=_,_=null):P=_.sibling;var M=p(c,_,u[C],g);if(M===null){_===null&&(_=P);break}e&&_&&M.alternate===null&&t(c,_),f=l(M,f,C),S===null?k=M:S.sibling=M,S=M,_=P}if(C===u.length)return n(c,_),X&&an(c,C),k;if(_===null){for(;CC?(P=_,_=null):P=_.sibling;var z=p(c,_,M.value,g);if(z===null){_===null&&(_=P);break}e&&_&&z.alternate===null&&t(c,_),f=l(z,f,C),S===null?k=z:S.sibling=z,S=z,_=P}if(M.done)return n(c,_),X&&an(c,C),k;if(_===null){for(;!M.done;C++,M=u.next())M=h(c,M.value,g),M!==null&&(f=l(M,f,C),S===null?k=M:S.sibling=M,S=M);return X&&an(c,C),k}for(_=r(c,_);!M.done;C++,M=u.next())M=v(_,c,C,M.value,g),M!==null&&(e&&M.alternate!==null&&_.delete(M.key===null?C:M.key),f=l(M,f,C),S===null?k=M:S.sibling=M,S=M);return e&&_.forEach(function(ee){return t(c,ee)}),X&&an(c,C),k}function D(c,f,u,g){if(typeof u=="object"&&u!==null&&u.type===Rn&&u.key===null&&(u=u.props.children),typeof u=="object"&&u!==null){switch(u.$$typeof){case Co:e:{for(var k=u.key,S=f;S!==null;){if(S.key===k){if(k=u.type,k===Rn){if(S.tag===7){n(c,S.sibling),f=o(S,u.props.children),f.return=c,c=f;break e}}else if(S.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Ft&&Cu(k)===S.type){n(c,S.sibling),f=o(S,u.props),f.ref=Er(c,S,u),f.return=c,c=f;break e}n(c,S);break}else t(c,S);S=S.sibling}u.type===Rn?(f=hn(u.props.children,c.mode,g,u.key),f.return=c,c=f):(g=Jo(u.type,u.key,u.props,null,c.mode,g),g.ref=Er(c,f,u),g.return=c,c=g)}return i(c);case Mn:e:{for(S=u.key;f!==null;){if(f.key===S)if(f.tag===4&&f.stateNode.containerInfo===u.containerInfo&&f.stateNode.implementation===u.implementation){n(c,f.sibling),f=o(f,u.children||[]),f.return=c,c=f;break e}else{n(c,f);break}else t(c,f);f=f.sibling}f=Ci(u,c.mode,g),f.return=c,c=f}return i(c);case Ft:return S=u._init,D(c,f,S(u._payload),g)}if(Mr(u))return w(c,f,u,g);if(xr(u))return x(c,f,u,g);Oo(c,u)}return typeof u=="string"&&u!==""||typeof u=="number"?(u=""+u,f!==null&&f.tag===6?(n(c,f.sibling),f=o(f,u),f.return=c,c=f):(n(c,f),f=ki(u,c.mode,g),f.return=c,c=f),i(c)):n(c,f)}return D}var qn=_d(!0),Ed=_d(!1),ho={},wt=rn(ho),to=rn(ho),no=rn(ho);function fn(e){if(e===ho)throw Error(N(174));return e}function na(e,t){switch(K(no,t),K(to,e),K(wt,ho),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ui(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ui(t,e)}Y(wt),K(wt,t)}function er(){Y(wt),Y(to),Y(no)}function Nd(e){fn(no.current);var t=fn(wt.current),n=Ui(t,e.type);t!==n&&(K(to,e),K(wt,n))}function ra(e){to.current===e&&(Y(wt),Y(to))}var G=rn(0);function hl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mi=[];function oa(){for(var e=0;en?n:4,e(!0);var r=vi.transition;vi.transition={};try{e(!1),t()}finally{W=n,vi.transition=r}}function Wd(){return be().memoizedState}function $h(e,t,n){var r=bt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Vd(e))Hd(t,n);else if(n=xd(e,t,n,r),n!==null){var o=Ce();it(n,e,r,o),Kd(n,t,r)}}function Uh(e,t,n){var r=bt(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vd(e))Hd(t,o);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var i=t.lastRenderedState,s=l(i,n);if(o.hasEagerState=!0,o.eagerState=s,st(s,i)){var a=t.interleaved;a===null?(o.next=o,ea(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=xd(e,t,o,r),n!==null&&(o=Ce(),it(n,e,r,o),Kd(n,t,r))}}function Vd(e){var t=e.alternate;return e===J||t!==null&&t===J}function Hd(e,t){jr=yl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Kd(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Us(e,n)}}var ml={readContext:Je,useCallback:ve,useContext:ve,useEffect:ve,useImperativeHandle:ve,useInsertionEffect:ve,useLayoutEffect:ve,useMemo:ve,useReducer:ve,useRef:ve,useState:ve,useDebugValue:ve,useDeferredValue:ve,useTransition:ve,useMutableSource:ve,useSyncExternalStore:ve,useId:ve,unstable_isNewReconciler:!1},Bh={readContext:Je,useCallback:function(e,t){return yt().memoizedState=[e,t===void 0?null:t],e},useContext:Je,useEffect:Eu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Qo(4194308,4,jd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qo(4,2,e,t)},useMemo:function(e,t){var n=yt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=yt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=$h.bind(null,J,e),[r.memoizedState,e]},useRef:function(e){var t=yt();return e={current:e},t.memoizedState=e},useState:_u,useDebugValue:ua,useDeferredValue:function(e){return yt().memoizedState=e},useTransition:function(){var e=_u(!1),t=e[0];return e=Fh.bind(null,e[1]),yt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=J,o=yt();if(X){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),ce===null)throw Error(N(349));(vn&30)!==0||Md(r,t,n)}o.memoizedState=n;var l={value:n,getSnapshot:t};return o.queue=l,Eu(Pd.bind(null,r,l,e),[e]),r.flags|=2048,lo(9,Rd.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=yt(),t=ce.identifierPrefix;if(X){var n=Nt,r=Et;n=(r&~(1<<32-lt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ro++,0")&&(a=a.replace("",e.displayName)),a}while(1<=i&&0<=s);break}}}finally{ei=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Tr(e):""}function gp(e){switch(e.tag){case 5:return Tr(e.type);case 16:return Tr("Lazy");case 13:return Tr("Suspense");case 19:return Tr("SuspenseList");case 0:case 2:case 15:return e=ti(e.type,!1),e;case 11:return e=ti(e.type.render,!1),e;case 1:return e=ti(e.type,!0),e;default:return""}}function zi(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Rn:return"Fragment";case Mn:return"Portal";case Li:return"Profiler";case zs:return"StrictMode";case Ii:return"Suspense";case Oi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Cc:return(e.displayName||"Context")+".Consumer";case kc:return(e._context.displayName||"Context")+".Provider";case As:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case js:return t=e.displayName||null,t!==null?t:zi(e.type)||"Memo";case Ft:t=e._payload,e=e._init;try{return zi(e(t))}catch{}}return null}function wp(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return zi(t);case 8:return t===zs?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function qt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ec(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xp(e){var t=Ec(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,l=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(i){r=""+i,l.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _o(e){e._valueTracker||(e._valueTracker=xp(e))}function Nc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Ec(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function bo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ai(e,t){var n=t.checked;return Z({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function Wa(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=qt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Dc(e,t){t=t.checked,t!=null&&Os(e,"checked",t,!1)}function ji(e,t){Dc(e,t);var n=qt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Fi(e,t.type,n):t.hasOwnProperty("defaultValue")&&Fi(e,t.type,qt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Va(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Fi(e,t,n){(t!=="number"||bo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Mr=Array.isArray;function Vn(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Eo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Kr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Lr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Sp=["Webkit","ms","Moz","O"];Object.keys(Lr).forEach(function(e){Sp.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Lr[t]=Lr[e]})});function Pc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Lr.hasOwnProperty(e)&&Lr[e]?(""+t).trim():t+"px"}function Lc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=Pc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var kp=Z({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Bi(e,t){if(t){if(kp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function Wi(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Vi=null;function Fs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hi=null,Hn=null,Kn=null;function Qa(e){if(e=po(e)){if(typeof Hi!="function")throw Error(N(280));var t=e.stateNode;t&&(t=Il(t),Hi(e.stateNode,e.type,t))}}function Ic(e){Hn?Kn?Kn.push(e):Kn=[e]:Hn=e}function Oc(){if(Hn){var e=Hn,t=Kn;if(Kn=Hn=null,Qa(e),t)for(e=0;e>>=0,e===0?32:31-(Ip(e)/Op|0)|0}var No=64,Do=4194304;function Rr(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function nl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,l=e.pingedLanes,i=n&268435455;if(i!==0){var s=i&~o;s!==0?r=Rr(s):(l&=i,l!==0&&(r=Rr(l)))}else i=n&~o,i!==0?r=Rr(i):l!==0&&(r=Rr(l));if(r===0)return 0;if(t!==0&&t!==r&&(t&o)===0&&(o=r&-r,l=t&-t,o>=l||o===16&&(l&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function co(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-lt(t),e[t]=n}function Fp(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Or),tu=String.fromCharCode(32),nu=!1;function ed(e,t){switch(e){case"keyup":return fh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function td(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Pn=!1;function hh(e,t){switch(e){case"compositionend":return td(t);case"keypress":return t.which!==32?null:(nu=!0,tu);case"textInput":return e=t.data,e===tu&&nu?null:e;default:return null}}function yh(e,t){if(Pn)return e==="compositionend"||!Qs&&ed(e,t)?(e=bc(),Wo=Vs=Vt=null,Pn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=iu(n)}}function ld(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ld(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function id(){for(var e=window,t=bo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=bo(e.document)}return t}function Ys(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function _h(e){var t=id(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ld(n.ownerDocument.documentElement,n)){if(r!==null&&Ys(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=n.textContent.length,l=Math.min(r.start,o);r=r.end===void 0?l:Math.min(r.end,o),!e.extend&&l>r&&(o=r,r=l,l=o),o=su(n,l);var i=su(n,r);o&&i&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),l>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ln=null,Ji=null,Ar=null,Zi=!1;function au(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zi||Ln==null||Ln!==bo(r)||(r=Ln,"selectionStart"in r&&Ys(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ar&&Zr(Ar,r)||(Ar=r,r=ll(Ji,"onSelect"),0zn||(e.current=rs[zn],rs[zn]=null,zn--)}function K(e,t){zn++,rs[zn]=e.current,e.current=t}var en={},xe=rn(en),Pe=rn(!1),yn=en;function Zn(e,t){var n=e.type.contextTypes;if(!n)return en;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},l;for(l in n)o[l]=t[l];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Le(e){return e=e.childContextTypes,e!=null}function sl(){Y(Pe),Y(xe)}function yu(e,t,n){if(xe.current!==en)throw Error(N(168));K(xe,t),K(Pe,n)}function yd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(N(108,wp(e)||"Unknown",o));return Z({},n,r)}function al(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||en,yn=xe.current,K(xe,e),K(Pe,Pe.current),!0}function mu(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=yd(e,t,yn),r.__reactInternalMemoizedMergedChildContext=e,Y(Pe),Y(xe),K(xe,e)):Y(Pe),K(Pe,n)}var _t=null,Ol=!1,yi=!1;function md(e){_t===null?_t=[e]:_t.push(e)}function Ah(e){Ol=!0,md(e)}function on(){if(!yi&&_t!==null){yi=!0;var e=0,t=W;try{var n=_t;for(W=1;e>=i,o-=i,Et=1<<32-lt(t)+o|n<C?(P=_,_=null):P=_.sibling;var M=p(c,_,u[C],g);if(M===null){_===null&&(_=P);break}e&&_&&M.alternate===null&&t(c,_),f=l(M,f,C),S===null?k=M:S.sibling=M,S=M,_=P}if(C===u.length)return n(c,_),X&&an(c,C),k;if(_===null){for(;CC?(P=_,_=null):P=_.sibling;var z=p(c,_,M.value,g);if(z===null){_===null&&(_=P);break}e&&_&&z.alternate===null&&t(c,_),f=l(z,f,C),S===null?k=z:S.sibling=z,S=z,_=P}if(M.done)return n(c,_),X&&an(c,C),k;if(_===null){for(;!M.done;C++,M=u.next())M=h(c,M.value,g),M!==null&&(f=l(M,f,C),S===null?k=M:S.sibling=M,S=M);return X&&an(c,C),k}for(_=r(c,_);!M.done;C++,M=u.next())M=v(_,c,C,M.value,g),M!==null&&(e&&M.alternate!==null&&_.delete(M.key===null?C:M.key),f=l(M,f,C),S===null?k=M:S.sibling=M,S=M);return e&&_.forEach(function(ee){return t(c,ee)}),X&&an(c,C),k}function D(c,f,u,g){if(typeof u=="object"&&u!==null&&u.type===Rn&&u.key===null&&(u=u.props.children),typeof u=="object"&&u!==null){switch(u.$$typeof){case Co:e:{for(var k=u.key,S=f;S!==null;){if(S.key===k){if(k=u.type,k===Rn){if(S.tag===7){n(c,S.sibling),f=o(S,u.props.children),f.return=c,c=f;break e}}else if(S.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Ft&&Cu(k)===S.type){n(c,S.sibling),f=o(S,u.props),f.ref=Er(c,S,u),f.return=c,c=f;break e}n(c,S);break}else t(c,S);S=S.sibling}u.type===Rn?(f=hn(u.props.children,c.mode,g,u.key),f.return=c,c=f):(g=Jo(u.type,u.key,u.props,null,c.mode,g),g.ref=Er(c,f,u),g.return=c,c=g)}return i(c);case Mn:e:{for(S=u.key;f!==null;){if(f.key===S)if(f.tag===4&&f.stateNode.containerInfo===u.containerInfo&&f.stateNode.implementation===u.implementation){n(c,f.sibling),f=o(f,u.children||[]),f.return=c,c=f;break e}else{n(c,f);break}else t(c,f);f=f.sibling}f=Ci(u,c.mode,g),f.return=c,c=f}return i(c);case Ft:return S=u._init,D(c,f,S(u._payload),g)}if(Mr(u))return w(c,f,u,g);if(xr(u))return x(c,f,u,g);Oo(c,u)}return typeof u=="string"&&u!==""||typeof u=="number"?(u=""+u,f!==null&&f.tag===6?(n(c,f.sibling),f=o(f,u),f.return=c,c=f):(n(c,f),f=ki(u,c.mode,g),f.return=c,c=f),i(c)):n(c,f)}return D}var qn=_d(!0),Ed=_d(!1),ho={},wt=rn(ho),to=rn(ho),no=rn(ho);function fn(e){if(e===ho)throw Error(N(174));return e}function na(e,t){switch(K(no,t),K(to,e),K(wt,ho),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ui(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ui(t,e)}Y(wt),K(wt,t)}function er(){Y(wt),Y(to),Y(no)}function Nd(e){fn(no.current);var t=fn(wt.current),n=Ui(t,e.type);t!==n&&(K(to,e),K(wt,n))}function ra(e){to.current===e&&(Y(wt),Y(to))}var G=rn(0);function hl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mi=[];function oa(){for(var e=0;en?n:4,e(!0);var r=vi.transition;vi.transition={};try{e(!1),t()}finally{W=n,vi.transition=r}}function Wd(){return Ze().memoizedState}function Uh(e,t,n){var r=Zt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Vd(e))Hd(t,n);else if(n=xd(e,t,n,r),n!==null){var o=Ce();it(n,e,r,o),Kd(n,t,r)}}function Bh(e,t,n){var r=Zt(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vd(e))Hd(t,o);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var i=t.lastRenderedState,s=l(i,n);if(o.hasEagerState=!0,o.eagerState=s,st(s,i)){var a=t.interleaved;a===null?(o.next=o,ea(t)):(o.next=a.next,a.next=o),t.interleaved=o;return}}catch{}finally{}n=xd(e,t,o,r),n!==null&&(o=Ce(),it(n,e,r,o),Kd(n,t,r))}}function Vd(e){var t=e.alternate;return e===J||t!==null&&t===J}function Hd(e,t){jr=yl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Kd(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Us(e,n)}}var ml={readContext:Je,useCallback:ve,useContext:ve,useEffect:ve,useImperativeHandle:ve,useInsertionEffect:ve,useLayoutEffect:ve,useMemo:ve,useReducer:ve,useRef:ve,useState:ve,useDebugValue:ve,useDeferredValue:ve,useTransition:ve,useMutableSource:ve,useSyncExternalStore:ve,useId:ve,unstable_isNewReconciler:!1},Wh={readContext:Je,useCallback:function(e,t){return yt().memoizedState=[e,t===void 0?null:t],e},useContext:Je,useEffect:Eu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Qo(4194308,4,jd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qo(4,2,e,t)},useMemo:function(e,t){var n=yt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=yt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Uh.bind(null,J,e),[r.memoizedState,e]},useRef:function(e){var t=yt();return e={current:e},t.memoizedState=e},useState:_u,useDebugValue:ua,useDeferredValue:function(e){return yt().memoizedState=e},useTransition:function(){var e=_u(!1),t=e[0];return e=$h.bind(null,e[1]),yt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=J,o=yt();if(X){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),ce===null)throw Error(N(349));(vn&30)!==0||Md(r,t,n)}o.memoizedState=n;var l={value:n,getSnapshot:t};return o.queue=l,Eu(Pd.bind(null,r,l,e),[e]),r.flags|=2048,lo(9,Rd.bind(null,r,l,n,t),void 0,null),n},useId:function(){var e=yt(),t=ce.identifierPrefix;if(X){var n=Nt,r=Et;n=(r&~(1<<32-lt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ro++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[vt]=t,e[eo]=r,ef(e,t,!1,!1),t.stateNode=e;e:{switch(i=Wi(n,r),n){case"dialog":Q("cancel",e),Q("close",e),o=r;break;case"iframe":case"object":case"embed":Q("load",e),o=r;break;case"video":case"audio":for(o=0;onr&&(t.flags|=128,r=!0,Nr(l,!1),t.lanes=4194304)}else{if(!r)if(e=hl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Nr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!X)return ge(t),null}else 2*ne()-l.renderingStartTime>nr&&n!==1073741824&&(t.flags|=128,r=!0,Nr(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(n=l.last,n!==null?n.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=ne(),t.sibling=null,n=G.current,K(G,r?n&1|2:n&1),t):(ge(t),null);case 22:case 23:return ya(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(je&1073741824)!==0&&(ge(t),t.subtreeFlags&6&&(t.flags|=8192)):ge(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function Gh(e,t){switch(Gs(t),t.tag){case 1:return Le(t.type)&&sl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return er(),Y(Pe),Y(xe),oa(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return ra(t),null;case 13:if(Y(G),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));Zn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(G),null;case 4:return er(),null;case 10:return qs(t.type._context),null;case 22:case 23:return ya(),null;case 24:return null;default:return null}}var Ao=!1,we=!1,Jh=typeof WeakSet=="function"?WeakSet:Set,R=null;function $n(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){q(e,t,r)}else n.current=null}function ys(e,t,n){try{n()}catch(r){q(e,t,r)}}var Ou=!1;function bh(e,t){if(Zi=rl,e=id(),Ys(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var i=0,s=-1,a=-1,d=0,m=0,h=e,p=null;t:for(;;){for(var v;h!==n||o!==0&&h.nodeType!==3||(s=i+o),h!==l||r!==0&&h.nodeType!==3||(a=i+r),h.nodeType===3&&(i+=h.nodeValue.length),(v=h.firstChild)!==null;)p=h,h=v;for(;;){if(h===e)break t;if(p===n&&++d===o&&(s=i),p===l&&++m===r&&(a=i),(v=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=v}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(qi={focusedElem:e,selectionRange:n},rl=!1,R=t;R!==null;)if(t=R,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,R=e;else for(;R!==null;){t=R;try{var w=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var x=w.memoizedProps,D=w.memoizedState,c=t.stateNode,f=c.getSnapshotBeforeUpdate(t.elementType===t.type?x:nt(t.type,x),D);c.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var u=t.stateNode.containerInfo;u.nodeType===1?u.textContent="":u.nodeType===9&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(g){q(t,t.return,g)}if(e=t.sibling,e!==null){e.return=t.return,R=e;break}R=t.return}return w=Ou,Ou=!1,w}function Fr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var l=o.destroy;o.destroy=void 0,l!==void 0&&ys(t,n,l)}o=o.next}while(o!==r)}}function jl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ms(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function rf(e){var t=e.alternate;t!==null&&(e.alternate=null,rf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vt],delete t[eo],delete t[ns],delete t[Ih],delete t[Oh])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function of(e){return e.tag===5||e.tag===3||e.tag===4}function zu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||of(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function vs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=il));else if(r!==4&&(e=e.child,e!==null))for(vs(e,t,n),e=e.sibling;e!==null;)vs(e,t,n),e=e.sibling}function gs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(gs(e,t,n),e=e.sibling;e!==null;)gs(e,t,n),e=e.sibling}var pe=null,rt=!1;function At(e,t,n){for(n=n.child;n!==null;)lf(e,t,n),n=n.sibling}function lf(e,t,n){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Ml,n)}catch{}switch(n.tag){case 5:we||$n(n,t);case 6:var r=pe,o=rt;pe=null,At(e,t,n),pe=r,rt=o,pe!==null&&(rt?(e=pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):pe.removeChild(n.stateNode));break;case 18:pe!==null&&(rt?(e=pe,n=n.stateNode,e.nodeType===8?hi(e.parentNode,n):e.nodeType===1&&hi(e,n),Gr(e)):hi(pe,n.stateNode));break;case 4:r=pe,o=rt,pe=n.stateNode.containerInfo,rt=!0,At(e,t,n),pe=r,rt=o;break;case 0:case 11:case 14:case 15:if(!we&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var l=o,i=l.destroy;l=l.tag,i!==void 0&&((l&2)!==0||(l&4)!==0)&&ys(n,t,i),o=o.next}while(o!==r)}At(e,t,n);break;case 1:if(!we&&($n(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){q(n,t,s)}At(e,t,n);break;case 21:At(e,t,n);break;case 22:n.mode&1?(we=(r=we)||n.memoizedState!==null,At(e,t,n),we=r):At(e,t,n);break;default:At(e,t,n)}}function Au(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Jh),t.forEach(function(r){var o=iy.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function tt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=i),r&=~l}if(r=o,r=ne()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*qh(r/1960))-r,10e?16:e,Ht===null)var r=!1;else{if(e=Ht,Ht=null,wl=0,($&6)!==0)throw Error(N(331));var o=$;for($|=4,R=e.current;R!==null;){var l=R,i=l.child;if((R.flags&16)!==0){var s=l.deletions;if(s!==null){for(var a=0;ane()-pa?pn(e,0):fa|=n),Ie(e,t)}function hf(e,t){t===0&&((e.mode&1)===0?t=1:(t=Do,Do<<=1,(Do&130023424)===0&&(Do=4194304)));var n=Ce();e=Rt(e,t),e!==null&&(co(e,t,n),Ie(e,n))}function ly(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hf(e,n)}function iy(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(N(314))}r!==null&&r.delete(t),hf(e,n)}var yf;yf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Pe.current)Re=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Re=!1,Yh(e,t,n);Re=(e.flags&131072)!==0}else Re=!1,X&&(t.flags&1048576)!==0&&vd(t,cl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yo(e,t),e=t.pendingProps;var o=bn(t,xe.current);Yn(t,n),o=ia(null,t,r,e,o,n);var l=sa();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Le(r)?(l=!0,al(t)):l=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,ta(t),o.updater=zl,t.stateNode=o,o._reactInternals=t,as(t,r,e,n),t=ds(null,t,r,!0,l,n)):(t.tag=0,X&&l&&Xs(t),ke(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yo(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=ay(r),e=nt(r,e),o){case 0:t=cs(null,t,r,e,n);break e;case 1:t=Pu(null,t,r,e,n);break e;case 11:t=Mu(null,t,r,e,n);break e;case 14:t=Ru(null,t,r,nt(r.type,e),n);break e}throw Error(N(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:nt(r,o),cs(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:nt(r,o),Pu(e,t,r,o,n);case 3:e:{if(bd(t),e===null)throw Error(N(387));r=t.pendingProps,l=t.memoizedState,o=l.element,Sd(e,t),pl(t,r,null,n);var i=t.memoizedState;if(r=i.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){o=tr(Error(N(423)),t),t=Lu(e,t,r,n,o);break e}else if(r!==o){o=tr(Error(N(424)),t),t=Lu(e,t,r,n,o);break e}else for(Fe=Xt(t.stateNode.containerInfo.firstChild),$e=t,X=!0,ot=null,n=Ed(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Zn(),r===o){t=Pt(e,t,n);break e}ke(e,t,r,n)}t=t.child}return t;case 5:return Nd(t),e===null&&ls(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,i=o.children,es(r,o)?i=null:l!==null&&es(r,l)&&(t.flags|=32),Jd(e,t),ke(e,t,i,n),t.child;case 6:return e===null&&ls(t),null;case 13:return Zd(e,t,n);case 4:return na(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=qn(t,null,r,n):ke(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:nt(r,o),Mu(e,t,r,o,n);case 7:return ke(e,t,t.pendingProps,n),t.child;case 8:return ke(e,t,t.pendingProps.children,n),t.child;case 12:return ke(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,l=t.memoizedProps,i=o.value,K(dl,r._currentValue),r._currentValue=i,l!==null)if(st(l.value,i)){if(l.children===o.children&&!Pe.current){t=Pt(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var s=l.dependencies;if(s!==null){i=l.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(l.tag===1){a=Dt(-1,n&-n),a.tag=2;var d=l.updateQueue;if(d!==null){d=d.shared;var m=d.pending;m===null?a.next=a:(a.next=m.next,m.next=a),d.pending=a}}l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),is(l.return,n,t),s.lanes|=n;break}a=a.next}}else if(l.tag===10)i=l.type===t.type?null:l.child;else if(l.tag===18){if(i=l.return,i===null)throw Error(N(341));i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),is(i,n,t),i=l.sibling}else i=l.child;if(i!==null)i.return=l;else for(i=l;i!==null;){if(i===t){i=null;break}if(l=i.sibling,l!==null){l.return=i.return,i=l;break}i=i.return}l=i}ke(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Yn(t,n),o=Je(o),r=r(o),t.flags|=1,ke(e,t,r,n),t.child;case 14:return r=t.type,o=nt(r,t.pendingProps),o=nt(r.type,o),Ru(e,t,r,o,n);case 15:return Xd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:nt(r,o),Yo(e,t),t.tag=1,Le(r)?(e=!0,al(t)):e=!1,Yn(t,n),Cd(t,r,o),as(t,r,o,n),ds(null,t,r,!0,e,n);case 19:return qd(e,t,n);case 22:return Gd(e,t,n)}throw Error(N(156,t.tag))};function mf(e,t){return Bc(e,t)}function sy(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xe(e,t,n,r){return new sy(e,t,n,r)}function va(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ay(e){if(typeof e=="function")return va(e)?1:0;if(e!=null){if(e=e.$$typeof,e===As)return 11;if(e===js)return 14}return 2}function Zt(e,t){var n=e.alternate;return n===null?(n=Xe(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Jo(e,t,n,r,o,l){var i=2;if(r=e,typeof e=="function")va(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Rn:return hn(n.children,o,l,t);case zs:i=8,o|=8;break;case Li:return e=Xe(12,n,t,o|2),e.elementType=Li,e.lanes=l,e;case Ii:return e=Xe(13,n,t,o),e.elementType=Ii,e.lanes=l,e;case Oi:return e=Xe(19,n,t,o),e.elementType=Oi,e.lanes=l,e;case _c:return $l(n,o,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case kc:i=10;break e;case Cc:i=9;break e;case As:i=11;break e;case js:i=14;break e;case Ft:i=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=Xe(i,n,t,o),t.elementType=e,t.type=r,t.lanes=l,t}function hn(e,t,n,r){return e=Xe(7,e,r,t),e.lanes=n,e}function $l(e,t,n,r){return e=Xe(22,e,r,t),e.elementType=_c,e.lanes=n,e.stateNode={isHidden:!1},e}function ki(e,t,n){return e=Xe(6,e,null,t),e.lanes=n,e}function Ci(e,t,n){return t=Xe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uy(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ri(0),this.expirationTimes=ri(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ri(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function ga(e,t,n,r,o,l,i,s,a){return e=new uy(e,t,n,s,a),t===1?(t=1,l===!0&&(t|=8)):t=0,l=Xe(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ta(l),e}function cy(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=Be})(mt);var Hu=mt.exports;Ri.createRoot=Hu.createRoot,Ri.hydrateRoot=Hu.hydrateRoot;function xf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[vt]=t,e[eo]=r,ef(e,t,!1,!1),t.stateNode=e;e:{switch(i=Wi(n,r),n){case"dialog":Q("cancel",e),Q("close",e),o=r;break;case"iframe":case"object":case"embed":Q("load",e),o=r;break;case"video":case"audio":for(o=0;onr&&(t.flags|=128,r=!0,Nr(l,!1),t.lanes=4194304)}else{if(!r)if(e=hl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Nr(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!X)return ge(t),null}else 2*ne()-l.renderingStartTime>nr&&n!==1073741824&&(t.flags|=128,r=!0,Nr(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(n=l.last,n!==null?n.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=ne(),t.sibling=null,n=G.current,K(G,r?n&1|2:n&1),t):(ge(t),null);case 22:case 23:return ya(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(je&1073741824)!==0&&(ge(t),t.subtreeFlags&6&&(t.flags|=8192)):ge(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function Jh(e,t){switch(Gs(t),t.tag){case 1:return Le(t.type)&&sl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return er(),Y(Pe),Y(xe),oa(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return ra(t),null;case 13:if(Y(G),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));bn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(G),null;case 4:return er(),null;case 10:return qs(t.type._context),null;case 22:case 23:return ya(),null;case 24:return null;default:return null}}var Ao=!1,we=!1,Zh=typeof WeakSet=="function"?WeakSet:Set,R=null;function $n(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){q(e,t,r)}else n.current=null}function ys(e,t,n){try{n()}catch(r){q(e,t,r)}}var Ou=!1;function bh(e,t){if(bi=rl,e=id(),Ys(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var o=r.anchorOffset,l=r.focusNode;r=r.focusOffset;try{n.nodeType,l.nodeType}catch{n=null;break e}var i=0,s=-1,a=-1,d=0,m=0,h=e,p=null;t:for(;;){for(var v;h!==n||o!==0&&h.nodeType!==3||(s=i+o),h!==l||r!==0&&h.nodeType!==3||(a=i+r),h.nodeType===3&&(i+=h.nodeValue.length),(v=h.firstChild)!==null;)p=h,h=v;for(;;){if(h===e)break t;if(p===n&&++d===o&&(s=i),p===l&&++m===r&&(a=i),(v=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=v}n=s===-1||a===-1?null:{start:s,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(qi={focusedElem:e,selectionRange:n},rl=!1,R=t;R!==null;)if(t=R,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,R=e;else for(;R!==null;){t=R;try{var w=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var x=w.memoizedProps,D=w.memoizedState,c=t.stateNode,f=c.getSnapshotBeforeUpdate(t.elementType===t.type?x:nt(t.type,x),D);c.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var u=t.stateNode.containerInfo;u.nodeType===1?u.textContent="":u.nodeType===9&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(g){q(t,t.return,g)}if(e=t.sibling,e!==null){e.return=t.return,R=e;break}R=t.return}return w=Ou,Ou=!1,w}function Fr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var l=o.destroy;o.destroy=void 0,l!==void 0&&ys(t,n,l)}o=o.next}while(o!==r)}}function jl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ms(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function rf(e){var t=e.alternate;t!==null&&(e.alternate=null,rf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vt],delete t[eo],delete t[ns],delete t[Oh],delete t[zh])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function of(e){return e.tag===5||e.tag===3||e.tag===4}function zu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||of(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function vs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=il));else if(r!==4&&(e=e.child,e!==null))for(vs(e,t,n),e=e.sibling;e!==null;)vs(e,t,n),e=e.sibling}function gs(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(gs(e,t,n),e=e.sibling;e!==null;)gs(e,t,n),e=e.sibling}var pe=null,rt=!1;function At(e,t,n){for(n=n.child;n!==null;)lf(e,t,n),n=n.sibling}function lf(e,t,n){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Ml,n)}catch{}switch(n.tag){case 5:we||$n(n,t);case 6:var r=pe,o=rt;pe=null,At(e,t,n),pe=r,rt=o,pe!==null&&(rt?(e=pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):pe.removeChild(n.stateNode));break;case 18:pe!==null&&(rt?(e=pe,n=n.stateNode,e.nodeType===8?hi(e.parentNode,n):e.nodeType===1&&hi(e,n),Gr(e)):hi(pe,n.stateNode));break;case 4:r=pe,o=rt,pe=n.stateNode.containerInfo,rt=!0,At(e,t,n),pe=r,rt=o;break;case 0:case 11:case 14:case 15:if(!we&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var l=o,i=l.destroy;l=l.tag,i!==void 0&&((l&2)!==0||(l&4)!==0)&&ys(n,t,i),o=o.next}while(o!==r)}At(e,t,n);break;case 1:if(!we&&($n(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){q(n,t,s)}At(e,t,n);break;case 21:At(e,t,n);break;case 22:n.mode&1?(we=(r=we)||n.memoizedState!==null,At(e,t,n),we=r):At(e,t,n);break;default:At(e,t,n)}}function Au(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Zh),t.forEach(function(r){var o=sy.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function tt(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=i),r&=~l}if(r=o,r=ne()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ey(r/1960))-r,10e?16:e,Ht===null)var r=!1;else{if(e=Ht,Ht=null,wl=0,($&6)!==0)throw Error(N(331));var o=$;for($|=4,R=e.current;R!==null;){var l=R,i=l.child;if((R.flags&16)!==0){var s=l.deletions;if(s!==null){for(var a=0;ane()-pa?pn(e,0):fa|=n),Ie(e,t)}function hf(e,t){t===0&&((e.mode&1)===0?t=1:(t=Do,Do<<=1,(Do&130023424)===0&&(Do=4194304)));var n=Ce();e=Rt(e,t),e!==null&&(co(e,t,n),Ie(e,n))}function iy(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hf(e,n)}function sy(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(N(314))}r!==null&&r.delete(t),hf(e,n)}var yf;yf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Pe.current)Re=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Re=!1,Xh(e,t,n);Re=(e.flags&131072)!==0}else Re=!1,X&&(t.flags&1048576)!==0&&vd(t,cl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yo(e,t),e=t.pendingProps;var o=Zn(t,xe.current);Yn(t,n),o=ia(null,t,r,e,o,n);var l=sa();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Le(r)?(l=!0,al(t)):l=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,ta(t),o.updater=zl,t.stateNode=o,o._reactInternals=t,as(t,r,e,n),t=ds(null,t,r,!0,l,n)):(t.tag=0,X&&l&&Xs(t),ke(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yo(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=uy(r),e=nt(r,e),o){case 0:t=cs(null,t,r,e,n);break e;case 1:t=Pu(null,t,r,e,n);break e;case 11:t=Mu(null,t,r,e,n);break e;case 14:t=Ru(null,t,r,nt(r.type,e),n);break e}throw Error(N(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:nt(r,o),cs(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:nt(r,o),Pu(e,t,r,o,n);case 3:e:{if(Zd(t),e===null)throw Error(N(387));r=t.pendingProps,l=t.memoizedState,o=l.element,Sd(e,t),pl(t,r,null,n);var i=t.memoizedState;if(r=i.element,l.isDehydrated)if(l={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){o=tr(Error(N(423)),t),t=Lu(e,t,r,n,o);break e}else if(r!==o){o=tr(Error(N(424)),t),t=Lu(e,t,r,n,o);break e}else for(Fe=Xt(t.stateNode.containerInfo.firstChild),$e=t,X=!0,ot=null,n=Ed(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(bn(),r===o){t=Pt(e,t,n);break e}ke(e,t,r,n)}t=t.child}return t;case 5:return Nd(t),e===null&&ls(t),r=t.type,o=t.pendingProps,l=e!==null?e.memoizedProps:null,i=o.children,es(r,o)?i=null:l!==null&&es(r,l)&&(t.flags|=32),Jd(e,t),ke(e,t,i,n),t.child;case 6:return e===null&&ls(t),null;case 13:return bd(e,t,n);case 4:return na(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=qn(t,null,r,n):ke(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:nt(r,o),Mu(e,t,r,o,n);case 7:return ke(e,t,t.pendingProps,n),t.child;case 8:return ke(e,t,t.pendingProps.children,n),t.child;case 12:return ke(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,l=t.memoizedProps,i=o.value,K(dl,r._currentValue),r._currentValue=i,l!==null)if(st(l.value,i)){if(l.children===o.children&&!Pe.current){t=Pt(e,t,n);break e}}else for(l=t.child,l!==null&&(l.return=t);l!==null;){var s=l.dependencies;if(s!==null){i=l.child;for(var a=s.firstContext;a!==null;){if(a.context===r){if(l.tag===1){a=Dt(-1,n&-n),a.tag=2;var d=l.updateQueue;if(d!==null){d=d.shared;var m=d.pending;m===null?a.next=a:(a.next=m.next,m.next=a),d.pending=a}}l.lanes|=n,a=l.alternate,a!==null&&(a.lanes|=n),is(l.return,n,t),s.lanes|=n;break}a=a.next}}else if(l.tag===10)i=l.type===t.type?null:l.child;else if(l.tag===18){if(i=l.return,i===null)throw Error(N(341));i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),is(i,n,t),i=l.sibling}else i=l.child;if(i!==null)i.return=l;else for(i=l;i!==null;){if(i===t){i=null;break}if(l=i.sibling,l!==null){l.return=i.return,i=l;break}i=i.return}l=i}ke(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Yn(t,n),o=Je(o),r=r(o),t.flags|=1,ke(e,t,r,n),t.child;case 14:return r=t.type,o=nt(r,t.pendingProps),o=nt(r.type,o),Ru(e,t,r,o,n);case 15:return Xd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:nt(r,o),Yo(e,t),t.tag=1,Le(r)?(e=!0,al(t)):e=!1,Yn(t,n),Cd(t,r,o),as(t,r,o,n),ds(null,t,r,!0,e,n);case 19:return qd(e,t,n);case 22:return Gd(e,t,n)}throw Error(N(156,t.tag))};function mf(e,t){return Bc(e,t)}function ay(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xe(e,t,n,r){return new ay(e,t,n,r)}function va(e){return e=e.prototype,!(!e||!e.isReactComponent)}function uy(e){if(typeof e=="function")return va(e)?1:0;if(e!=null){if(e=e.$$typeof,e===As)return 11;if(e===js)return 14}return 2}function bt(e,t){var n=e.alternate;return n===null?(n=Xe(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Jo(e,t,n,r,o,l){var i=2;if(r=e,typeof e=="function")va(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Rn:return hn(n.children,o,l,t);case zs:i=8,o|=8;break;case Li:return e=Xe(12,n,t,o|2),e.elementType=Li,e.lanes=l,e;case Ii:return e=Xe(13,n,t,o),e.elementType=Ii,e.lanes=l,e;case Oi:return e=Xe(19,n,t,o),e.elementType=Oi,e.lanes=l,e;case _c:return $l(n,o,l,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case kc:i=10;break e;case Cc:i=9;break e;case As:i=11;break e;case js:i=14;break e;case Ft:i=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=Xe(i,n,t,o),t.elementType=e,t.type=r,t.lanes=l,t}function hn(e,t,n,r){return e=Xe(7,e,r,t),e.lanes=n,e}function $l(e,t,n,r){return e=Xe(22,e,r,t),e.elementType=_c,e.lanes=n,e.stateNode={isHidden:!1},e}function ki(e,t,n){return e=Xe(6,e,null,t),e.lanes=n,e}function Ci(e,t,n){return t=Xe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function cy(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ri(0),this.expirationTimes=ri(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ri(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function ga(e,t,n,r,o,l,i,s,a){return e=new cy(e,t,n,s,a),t===1?(t=1,l===!0&&(t|=8)):t=0,l=Xe(3,null,null,t),e.current=l,l.stateNode=e,l.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ta(l),e}function dy(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=Be})(mt);var Hu=mt.exports;Ri.createRoot=Hu.createRoot,Ri.hydrateRoot=Hu.hydrateRoot;function xf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;tF("main",{className:at(jt.Wrapper,{[jt.Show]:e,[jt.Hide]:!e}),children:[F("header",{className:jt.Banner,style:{background:`url("${t}") left center / cover no-repeat, url("/html/banner/default.jpg") left center / cover no-repeat`,backgroundSize:"cover"},children:[r!==-1&&F(oe,{children:[o?F("span",{className:jt.Sort,onClick:o,children:[E("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:E("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7.5L7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5"})}),"A-Z"]}):E("span",{}),F("span",{children:[n/1e3,"/",r/1e3," Kg"]})]}),(i||l)&&F("div",{className:jt.giveBanner,children:[l&&E("span",{className:jt.GiveAll,onClick:l,children:E("img",{src:xy})}),i&&E("span",{className:jt.GiveAll,onClick:i,children:E("img",{src:Sy})})]})]}),s]});tn.defaultProps={display:!1,banner:"",weight:0,maxWeight:0};const Ty="_Wrapper_14kmu_1",My={Wrapper:Ty},Ry="_Wrapper_137xu_1",Py="_Description_137xu_22",Ku={Wrapper:Ry,Description:Py},Ql=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ar(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function ka(e){return"nodeType"in e}function Ne(e){var t,n;return e?ar(e)?e:ka(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Ca(e){const{Document:t}=Ne(e);return e instanceof t}function yo(e){return ar(e)?!1:e instanceof Ne(e).HTMLElement}function Ly(e){return e instanceof Ne(e).SVGElement}function ur(e){return e?ar(e)?e.document:ka(e)?Ca(e)?e:yo(e)?e.ownerDocument:document:document:document}const xt=Ql?y.exports.useLayoutEffect:y.exports.useEffect;function Yl(e){const t=y.exports.useRef(e);return xt(()=>{t.current=e}),y.exports.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o{e.current=setInterval(r,o)},[]),n=y.exports.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function so(e,t){t===void 0&&(t=[e]);const n=y.exports.useRef(e);return xt(()=>{n.current!==e&&(n.current=e)},t),n}function mo(e,t){const n=y.exports.useRef();return y.exports.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function kl(e){const t=Yl(e),n=y.exports.useRef(null),r=y.exports.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function Cl(e){const t=y.exports.useRef();return y.exports.useEffect(()=>{t.current=e},[e]),t.current}let _i={};function Xl(e,t){return y.exports.useMemo(()=>{if(t)return t;const n=_i[e]==null?0:_i[e]+1;return _i[e]=n,e+"-"+n},[e,t])}function kf(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{const s=Object.entries(i);for(const[a,d]of s){const m=l[a];m!=null&&(l[a]=m+e*d)}return l},{...t})}}const Gn=kf(1),_l=kf(-1);function Oy(e){return"clientX"in e&&"clientY"in e}function _a(e){if(!e)return!1;const{KeyboardEvent:t}=Ne(e.target);return t&&e instanceof t}function zy(e){if(!e)return!1;const{TouchEvent:t}=Ne(e.target);return t&&e instanceof t}function El(e){if(zy(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Oy(e)?{x:e.clientX,y:e.clientY}:null}const rr=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(!!e)return[rr.Translate.toString(e),rr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Qu="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ay(e){return e.matches(Qu)?e:e.querySelector(Qu)}const jy={display:"none"};function Fy(e){let{id:t,value:n}=e;return E("div",{id:t,style:jy,children:n})}const $y={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function Uy(e){let{id:t,announcement:n}=e;return E("div",{id:t,style:$y,role:"status","aria-live":"assertive","aria-atomic":!0,children:n})}function By(){const[e,t]=y.exports.useState("");return{announce:y.exports.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const Cf=y.exports.createContext(null);function Wy(e){const t=y.exports.useContext(Cf);y.exports.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function Vy(){const[e]=y.exports.useState(()=>new Set),t=y.exports.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[y.exports.useCallback(r=>{let{type:o,event:l}=r;e.forEach(i=>{var s;return(s=i[o])==null?void 0:s.call(i,l)})},[e]),t]}const Hy={draggable:` + */var Cy=y.exports,_y=Symbol.for("react.element"),Ey=Symbol.for("react.fragment"),Ny=Object.prototype.hasOwnProperty,Dy=Cy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ty={key:!0,ref:!0,__self:!0,__source:!0};function Sf(e,t,n){var r,o={},l=null,i=null;n!==void 0&&(l=""+n),t.key!==void 0&&(l=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)Ny.call(t,r)&&!Ty.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:_y,type:e,key:l,ref:i,props:o,_owner:Dy.current}}Kl.Fragment=Ey;Kl.jsx=Sf;Kl.jsxs=Sf;(function(e){e.exports=Kl})(Hl);const oe=Hl.exports.Fragment,E=Hl.exports.jsx,F=Hl.exports.jsxs,tn=({display:e,banner:t,weight:n=1e3,maxWeight:r=1e3,sortCallback:o,giveAllVehicleKeysCallback:l,giveAllAppartmentKeysCallback:i,children:s})=>F("main",{className:at(jt.Wrapper,{[jt.Show]:e,[jt.Hide]:!e}),children:[F("header",{className:jt.Banner,style:{background:`url("${t}") left center / cover no-repeat, url("/html/banner/default.jpg") left center / cover no-repeat`,backgroundSize:"cover"},children:[r!==-1&&F(oe,{children:[o?F("span",{className:jt.Sort,onClick:o,children:[E("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:E("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 7.5L7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5"})}),"A-Z"]}):E("span",{}),F("span",{children:[n/1e3,"/",r/1e3," Kg"]})]}),(i||l)&&F("div",{className:jt.giveBanner,children:[l&&E("span",{className:jt.GiveAll,onClick:l,children:E("img",{src:Sy})}),i&&E("span",{className:jt.GiveAll,onClick:i,children:E("img",{src:ky})})]})]}),s]});tn.defaultProps={display:!1,banner:"",weight:0,maxWeight:0};const My="_Wrapper_14kmu_1",Ry={Wrapper:My},Py="_Wrapper_137xu_1",Ly="_Description_137xu_22",Ku={Wrapper:Py,Description:Ly},Ql=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ar(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function ka(e){return"nodeType"in e}function Ne(e){var t,n;return e?ar(e)?e:ka(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Ca(e){const{Document:t}=Ne(e);return e instanceof t}function yo(e){return ar(e)?!1:e instanceof Ne(e).HTMLElement}function kf(e){return e instanceof Ne(e).SVGElement}function ur(e){return e?ar(e)?e.document:ka(e)?Ca(e)?e:yo(e)||kf(e)?e.ownerDocument:document:document:document}const xt=Ql?y.exports.useLayoutEffect:y.exports.useEffect;function Yl(e){const t=y.exports.useRef(e);return xt(()=>{t.current=e}),y.exports.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o{e.current=setInterval(r,o)},[]),n=y.exports.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function so(e,t){t===void 0&&(t=[e]);const n=y.exports.useRef(e);return xt(()=>{n.current!==e&&(n.current=e)},t),n}function mo(e,t){const n=y.exports.useRef();return y.exports.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function kl(e){const t=Yl(e),n=y.exports.useRef(null),r=y.exports.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function Cl(e){const t=y.exports.useRef();return y.exports.useEffect(()=>{t.current=e},[e]),t.current}let _i={};function Xl(e,t){return y.exports.useMemo(()=>{if(t)return t;const n=_i[e]==null?0:_i[e]+1;return _i[e]=n,e+"-"+n},[e,t])}function Cf(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{const s=Object.entries(i);for(const[a,d]of s){const m=l[a];m!=null&&(l[a]=m+e*d)}return l},{...t})}}const Gn=Cf(1),_l=Cf(-1);function Oy(e){return"clientX"in e&&"clientY"in e}function _a(e){if(!e)return!1;const{KeyboardEvent:t}=Ne(e.target);return t&&e instanceof t}function zy(e){if(!e)return!1;const{TouchEvent:t}=Ne(e.target);return t&&e instanceof t}function El(e){if(zy(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Oy(e)?{x:e.clientX,y:e.clientY}:null}const rr=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(!!e)return[rr.Translate.toString(e),rr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Qu="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function Ay(e){return e.matches(Qu)?e:e.querySelector(Qu)}const jy={display:"none"};function Fy(e){let{id:t,value:n}=e;return E("div",{id:t,style:jy,children:n})}function $y(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;return E("div",{id:t,style:{position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0,children:n})}function Uy(){const[e,t]=y.exports.useState("");return{announce:y.exports.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const _f=y.exports.createContext(null);function By(e){const t=y.exports.useContext(_f);y.exports.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(e)},[e,t])}function Wy(){const[e]=y.exports.useState(()=>new Set),t=y.exports.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[y.exports.useCallback(r=>{let{type:o,event:l}=r;e.forEach(i=>{var s;return(s=i[o])==null?void 0:s.call(i,l)})},[e]),t]}const Vy={draggable:` To pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel. - `},Ky={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Qy(e){let{announcements:t=Ky,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Hy}=e;const{announce:l,announcement:i}=By(),s=Xl("DndLiveRegion"),[a,d]=y.exports.useState(!1);if(y.exports.useEffect(()=>{d(!0)},[]),Wy(y.exports.useMemo(()=>({onDragStart(h){let{active:p}=h;l(t.onDragStart({active:p}))},onDragMove(h){let{active:p,over:v}=h;t.onDragMove&&l(t.onDragMove({active:p,over:v}))},onDragOver(h){let{active:p,over:v}=h;l(t.onDragOver({active:p,over:v}))},onDragEnd(h){let{active:p,over:v}=h;l(t.onDragEnd({active:p,over:v}))},onDragCancel(h){let{active:p,over:v}=h;l(t.onDragCancel({active:p,over:v}))}}),[l,t])),!a)return null;const m=F(oe,{children:[E(Fy,{id:r,value:o.draggable}),E(Uy,{id:s,announcement:i})]});return n?mt.exports.createPortal(m,n):m}var ie;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ie||(ie={}));function Nl(){}const ut=Object.freeze({x:0,y:0});function Yy(e,t){const n=El(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function Xy(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Gy(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function Jy(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height),i=o-r,s=l-n;if(r{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const l of r){const{id:i}=l,s=n.get(i);if(s){const a=Jy(s,t);a>0&&o.push({id:i,data:{droppableContainer:l,value:a}})}}return o.sort(Xy)};function by(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function _f(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:ut}function Zy(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),l=1;l({...i,top:i.top+e*s.y,bottom:i.bottom+e*s.y,left:i.left+e*s.x,right:i.right+e*s.x}),{...n})}}const qy=Zy(1);function Ef(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function em(e,t,n){const r=Ef(t);if(!r)return e;const{scaleX:o,scaleY:l,x:i,y:s}=r,a=e.left-i-(1-o)*parseFloat(n),d=e.top-s-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),m=o?e.width/o:e.width,h=l?e.height/l:e.height;return{width:m,height:h,top:d,right:a+m,bottom:d+h,left:a}}const tm={ignoreTransform:!1};function vo(e,t){t===void 0&&(t=tm);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:d,transformOrigin:m}=Ne(e).getComputedStyle(e);d&&(n=em(n,d,m))}const{top:r,left:o,width:l,height:i,bottom:s,right:a}=n;return{top:r,left:o,width:l,height:i,bottom:s,right:a}}function Yu(e){return vo(e,{ignoreTransform:!0})}function nm(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function rm(e,t){return t===void 0&&(t=Ne(e).getComputedStyle(e)),t.position==="fixed"}function om(e,t){t===void 0&&(t=Ne(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const l=t[o];return typeof l=="string"?n.test(l):!1})}function Ea(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Ca(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!yo(o)||Ly(o)||n.includes(o))return n;const l=Ne(e).getComputedStyle(o);return o!==e&&om(o,l)&&n.push(o),rm(o,l)?n:r(o.parentNode)}return e?r(e):n}function Nf(e){const[t]=Ea(e,1);return t!=null?t:null}function Ei(e){return!Ql||!e?null:ar(e)?e:ka(e)?Ca(e)||e===ur(e).scrollingElement?window:yo(e)?e:null:null}function Df(e){return ar(e)?e.scrollX:e.scrollLeft}function Tf(e){return ar(e)?e.scrollY:e.scrollTop}function Cs(e){return{x:Df(e),y:Tf(e)}}var ue;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ue||(ue={}));function Mf(e){return!Ql||!e?!1:e===document.scrollingElement}function Rf(e){const t={x:0,y:0},n=Mf(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,l=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:o,isLeft:l,isBottom:i,isRight:s,maxScroll:r,minScroll:t}}const lm={x:.2,y:.2};function im(e,t,n,r,o){let{top:l,left:i,right:s,bottom:a}=n;r===void 0&&(r=10),o===void 0&&(o=lm);const{isTop:d,isBottom:m,isLeft:h,isRight:p}=Rf(e),v={x:0,y:0},w={x:0,y:0},x={height:t.height*o.y,width:t.width*o.x};return!d&&l<=t.top+x.height?(v.y=ue.Backward,w.y=r*Math.abs((t.top+x.height-l)/x.height)):!m&&a>=t.bottom-x.height&&(v.y=ue.Forward,w.y=r*Math.abs((t.bottom-x.height-a)/x.height)),!p&&s>=t.right-x.width?(v.x=ue.Forward,w.x=r*Math.abs((t.right-x.width-s)/x.width)):!h&&i<=t.left+x.width&&(v.x=ue.Backward,w.x=r*Math.abs((t.left+x.width-i)/x.width)),{direction:v,speed:w}}function sm(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:i}=window;return{top:0,left:0,right:l,bottom:i,width:l,height:i}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Pf(e){return e.reduce((t,n)=>Gn(t,Cs(n)),ut)}function am(e){return e.reduce((t,n)=>t+Df(n),0)}function um(e){return e.reduce((t,n)=>t+Tf(n),0)}function Lf(e,t){if(t===void 0&&(t=vo),!e)return;const{top:n,left:r,bottom:o,right:l}=t(e);!Nf(e)||(o<=0||l<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const cm=[["x",["left","right"],am],["y",["top","bottom"],um]];class Na{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Ea(n),o=Pf(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,i,s]of cm)for(const a of i)Object.defineProperty(this,a,{get:()=>{const d=s(r),m=o[l]-d;return this.rect[a]+m},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Br{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function dm(e){const{EventTarget:t}=Ne(e);return e instanceof t?e:ur(e)}function Ni(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var Ke;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ke||(Ke={}));function Xu(e){e.preventDefault()}function fm(e){e.stopPropagation()}var H;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(H||(H={}));const If={start:[H.Space,H.Enter],cancel:[H.Esc],end:[H.Space,H.Enter]},pm=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case H.Right:return{...n,x:n.x+25};case H.Left:return{...n,x:n.x-25};case H.Down:return{...n,y:n.y+25};case H.Up:return{...n,y:n.y-25}}};class Of{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Br(ur(n)),this.windowListeners=new Br(Ne(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ke.Resize,this.handleCancel),this.windowListeners.add(Ke.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ke.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&Lf(r),n(ut)}handleKeyDown(t){if(_a(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:l=If,coordinateGetter:i=pm,scrollBehavior:s="smooth"}=o,{code:a}=t;if(l.end.includes(a)){this.handleEnd(t);return}if(l.cancel.includes(a)){this.handleCancel(t);return}const{collisionRect:d}=r.current,m=d?{x:d.left,y:d.top}:ut;this.referenceCoordinates||(this.referenceCoordinates=m);const h=i(t,{active:n,context:r.current,currentCoordinates:m});if(h){const p=_l(h,m),v={x:0,y:0},{scrollableAncestors:w}=r.current;for(const x of w){const D=t.code,{isTop:c,isRight:f,isLeft:u,isBottom:g,maxScroll:k,minScroll:S}=Rf(x),_=sm(x),C={x:Math.min(D===H.Right?_.right-_.width/2:_.right,Math.max(D===H.Right?_.left:_.left+_.width/2,h.x)),y:Math.min(D===H.Down?_.bottom-_.height/2:_.bottom,Math.max(D===H.Down?_.top:_.top+_.height/2,h.y))},P=D===H.Right&&!f||D===H.Left&&!u,M=D===H.Down&&!g||D===H.Up&&!c;if(P&&C.x!==h.x){const z=x.scrollLeft+p.x,ee=D===H.Right&&z<=k.x||D===H.Left&&z>=S.x;if(ee&&!p.y){x.scrollTo({left:z,behavior:s});return}ee?v.x=x.scrollLeft-z:v.x=D===H.Right?x.scrollLeft-k.x:x.scrollLeft-S.x,v.x&&x.scrollBy({left:-v.x,behavior:s});break}else if(M&&C.y!==h.y){const z=x.scrollTop+p.y,ee=D===H.Down&&z<=k.y||D===H.Up&&z>=S.y;if(ee&&!p.x){x.scrollTo({top:z,behavior:s});return}ee?v.y=x.scrollTop-z:v.y=D===H.Down?x.scrollTop-k.y:x.scrollTop-S.y,v.y&&x.scrollBy({top:-v.y,behavior:s});break}}this.handleMove(t,Gn(_l(h,this.referenceCoordinates),v))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Of.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=If,onActivation:o}=t,{active:l}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const s=l.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function Gu(e){return Boolean(e&&"distance"in e)}function Ju(e){return Boolean(e&&"delay"in e)}class Da{constructor(t,n,r){var o;r===void 0&&(r=dm(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:l}=t,{target:i}=l;this.props=t,this.events=n,this.document=ur(i),this.documentListeners=new Br(this.document),this.listeners=new Br(r),this.windowListeners=new Br(Ne(i)),this.initialCoordinates=(o=El(l))!=null?o:ut,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(Ke.Resize,this.handleCancel),this.windowListeners.add(Ke.DragStart,Xu),this.windowListeners.add(Ke.VisibilityChange,this.handleCancel),this.windowListeners.add(Ke.ContextMenu,Xu),this.documentListeners.add(Ke.Keydown,this.handleKeydown),n){if(Gu(n))return;if(Ju(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Ke.Click,fm,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ke.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:l}=this,{onMove:i,options:{activationConstraint:s}}=l;if(!o)return;const a=(n=El(t))!=null?n:ut,d=_l(o,a);if(!r&&s){if(Ju(s))return Ni(d,s.tolerance)?this.handleCancel():void 0;if(Gu(s))return s.tolerance!=null&&Ni(d,s.tolerance)?this.handleCancel():Ni(d,s.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),i(a)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===H.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const hm={move:{name:"pointermove"},end:{name:"pointerup"}};class zf extends Da{constructor(t){const{event:n}=t,r=ur(n.target);super(t,hm,r)}}zf.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const ym={move:{name:"mousemove"},end:{name:"mouseup"}};var _s;(function(e){e[e.RightClick=2]="RightClick"})(_s||(_s={}));class mm extends Da{constructor(t){super(t,ym,ur(t.event.target))}}mm.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===_s.RightClick?!1:(r==null||r({event:n}),!0)}}];const Di={move:{name:"touchmove"},end:{name:"touchend"}};class vm extends Da{constructor(t){super(t,Di)}static setup(){return window.addEventListener(Di.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Di.move.name,t)};function t(){}}}vm.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var Wr;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Wr||(Wr={}));var Dl;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Dl||(Dl={}));function gm(e){let{acceleration:t,activator:n=Wr.Pointer,canScroll:r,draggingRect:o,enabled:l,interval:i=5,order:s=Dl.TreeOrder,pointerCoordinates:a,scrollableAncestors:d,scrollableAncestorRects:m,delta:h,threshold:p}=e;const v=xm({delta:h,disabled:!l}),[w,x]=Iy(),D=y.exports.useRef({x:0,y:0}),c=y.exports.useRef({x:0,y:0}),f=y.exports.useMemo(()=>{switch(n){case Wr.Pointer:return a?{top:a.y,bottom:a.y,left:a.x,right:a.x}:null;case Wr.DraggableRect:return o}},[n,o,a]),u=y.exports.useRef(null),g=y.exports.useCallback(()=>{const S=u.current;if(!S)return;const _=D.current.x*c.current.x,C=D.current.y*c.current.y;S.scrollBy(_,C)},[]),k=y.exports.useMemo(()=>s===Dl.TreeOrder?[...d].reverse():d,[s,d]);y.exports.useEffect(()=>{if(!l||!d.length||!f){x();return}for(const S of k){if((r==null?void 0:r(S))===!1)continue;const _=d.indexOf(S),C=m[_];if(!C)continue;const{direction:P,speed:M}=im(S,C,f,t,p);for(const z of["x","y"])v[z][P[z]]||(M[z]=0,P[z]=0);if(M.x>0||M.y>0){x(),u.current=S,w(g,i),D.current=M,c.current=P;return}}D.current={x:0,y:0},c.current={x:0,y:0},x()},[t,g,r,x,l,i,JSON.stringify(f),JSON.stringify(v),w,d,k,m,JSON.stringify(p)])}const wm={x:{[ue.Backward]:!1,[ue.Forward]:!1},y:{[ue.Backward]:!1,[ue.Forward]:!1}};function xm(e){let{delta:t,disabled:n}=e;const r=Cl(t);return mo(o=>{if(n||!r||!o)return wm;const l={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[ue.Backward]:o.x[ue.Backward]||l.x===-1,[ue.Forward]:o.x[ue.Forward]||l.x===1},y:{[ue.Backward]:o.y[ue.Backward]||l.y===-1,[ue.Forward]:o.y[ue.Forward]||l.y===1}}},[n,t,r])}function Sm(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return mo(o=>{var l;return t===null?null:(l=r!=null?r:o)!=null?l:null},[r,t])}function km(e,t){return y.exports.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,l=o.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...l]},[]),[e,t])}var ao;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(ao||(ao={}));var Es;(function(e){e.Optimized="optimized"})(Es||(Es={}));const bu=new Map;function Cm(e,t){let{dragging:n,dependencies:r,config:o}=t;const[l,i]=y.exports.useState(null),{frequency:s,measure:a,strategy:d}=o,m=y.exports.useRef(e),h=D(),p=so(h),v=y.exports.useCallback(function(c){c===void 0&&(c=[]),!p.current&&i(f=>f===null?c:f.concat(c.filter(u=>!f.includes(u))))},[p]),w=y.exports.useRef(null),x=mo(c=>{if(h&&!n)return bu;if(!c||c===bu||m.current!==e||l!=null){const f=new Map;for(let u of e){if(!u)continue;if(l&&l.length>0&&!l.includes(u.id)&&u.rect.current){f.set(u.id,u.rect.current);continue}const g=u.node.current,k=g?new Na(a(g),g):null;u.rect.current=k,k&&f.set(u.id,k)}return f}return c},[e,l,n,h,a]);return y.exports.useEffect(()=>{m.current=e},[e]),y.exports.useEffect(()=>{h||v()},[n,h]),y.exports.useEffect(()=>{l&&l.length>0&&i(null)},[JSON.stringify(l)]),y.exports.useEffect(()=>{h||typeof s!="number"||w.current!==null||(w.current=setTimeout(()=>{v(),w.current=null},s))},[s,h,v,...r]),{droppableRects:x,measureDroppableContainers:v,measuringScheduled:l!=null};function D(){switch(d){case ao.Always:return!1;case ao.BeforeDragging:return n;default:return!n}}}function Ta(e,t){return mo(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function _m(e,t){return Ta(e,t)}function Em(e){let{callback:t,disabled:n}=e;const r=Yl(t),o=y.exports.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:l}=window;return new l(r)},[r,n]);return y.exports.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Gl(e){let{callback:t,disabled:n}=e;const r=Yl(t),o=y.exports.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:l}=window;return new l(r)},[n]);return y.exports.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Nm(e){return new Na(vo(e),e)}function Zu(e,t,n){t===void 0&&(t=Nm);const[r,o]=y.exports.useReducer(s,null),l=Em({callback(a){if(!!e)for(const d of a){const{type:m,target:h}=d;if(m==="childList"&&h instanceof HTMLElement&&h.contains(e)){o();break}}}}),i=Gl({callback:o});return xt(()=>{o(),e?(i==null||i.observe(e),l==null||l.observe(document.body,{childList:!0,subtree:!0})):(i==null||i.disconnect(),l==null||l.disconnect())},[e]),r;function s(a){if(!e)return null;if(e.isConnected===!1){var d;return(d=a!=null?a:n)!=null?d:null}const m=t(e);return JSON.stringify(a)===JSON.stringify(m)?a:m}}function Dm(e){const t=Ta(e);return _f(e,t)}const qu=[];function Tm(e){const t=y.exports.useRef(e),n=mo(r=>e?r&&r!==qu&&e&&t.current&&e.parentNode===t.current.parentNode?r:Ea(e):qu,[e]);return y.exports.useEffect(()=>{t.current=e},[e]),n}function Mm(e){const[t,n]=y.exports.useState(null),r=y.exports.useRef(e),o=y.exports.useCallback(l=>{const i=Ei(l.target);!i||n(s=>s?(s.set(i,Cs(i)),new Map(s)):null)},[]);return y.exports.useEffect(()=>{const l=r.current;if(e!==l){i(l);const s=e.map(a=>{const d=Ei(a);return d?(d.addEventListener("scroll",o,{passive:!0}),[d,Cs(d)]):null}).filter(a=>a!=null);n(s.length?new Map(s):null),r.current=e}return()=>{i(e),i(l)};function i(s){s.forEach(a=>{const d=Ei(a);d==null||d.removeEventListener("scroll",o)})}},[o,e]),y.exports.useMemo(()=>e.length?t?Array.from(t.values()).reduce((l,i)=>Gn(l,i),ut):Pf(e):ut,[e,t])}function ec(e,t){t===void 0&&(t=[]);const n=y.exports.useRef(null);return y.exports.useEffect(()=>{n.current=null},t),y.exports.useEffect(()=>{const r=e!==ut;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?_l(e,n.current):ut}function Rm(e){y.exports.useEffect(()=>{if(!Ql)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function Pm(e,t){return y.exports.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:l}=r;return n[o]=i=>{l(i,t)},n},{}),[e,t])}function Af(e){return y.exports.useMemo(()=>e?nm(e):null,[e])}const Ti=[];function Lm(e,t){t===void 0&&(t=vo);const[n]=e,r=Af(n?Ne(n):null),[o,l]=y.exports.useReducer(s,Ti),i=Gl({callback:l});return e.length>0&&o===Ti&&l(),xt(()=>{e.length?e.forEach(a=>i==null?void 0:i.observe(a)):(i==null||i.disconnect(),l())},[e]),o;function s(){return e.length?e.map(a=>Mf(a)?r:new Na(t(a),a)):Ti}}function jf(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return yo(t)?t:e}function Im(e){let{measure:t}=e;const[n,r]=y.exports.useState(null),o=y.exports.useCallback(d=>{for(const{target:m}of d)if(yo(m)){r(h=>{const p=t(m);return h?{...h,width:p.width,height:p.height}:p});break}},[t]),l=Gl({callback:o}),i=y.exports.useCallback(d=>{const m=jf(d);l==null||l.disconnect(),m&&(l==null||l.observe(m)),r(m?t(m):null)},[t,l]),[s,a]=kl(i);return y.exports.useMemo(()=>({nodeRef:s,rect:n,setRef:a}),[n,s,a])}const Om=[{sensor:zf,options:{}},{sensor:Of,options:{}}],zm={current:{}},bo={draggable:{measure:Yu},droppable:{measure:Yu,strategy:ao.WhileDragging,frequency:Es.Optimized},dragOverlay:{measure:vo}};class Vr extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Am={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Vr,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Nl},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:bo,measureDroppableContainers:Nl,windowRect:null,measuringScheduled:!1},Ff={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Nl,draggableNodes:new Map,over:null,measureDroppableContainers:Nl},go=y.exports.createContext(Ff),$f=y.exports.createContext(Am);function jm(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Vr}}}function Fm(e,t){switch(t.type){case ie.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ie.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case ie.DragEnd:case ie.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ie.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Vr(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case ie.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,l=e.droppable.containers.get(n);if(!l||r!==l.key)return e;const i=new Vr(e.droppable.containers);return i.set(n,{...l,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case ie.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const l=new Vr(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function $m(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=y.exports.useContext(go),l=Cl(r),i=Cl(n==null?void 0:n.id);return y.exports.useEffect(()=>{if(!t&&!r&&l&&i!=null){if(!_a(l)||document.activeElement===l.target)return;const s=o.get(i);if(!s)return;const{activatorNode:a,node:d}=s;if(!a.current&&!d.current)return;requestAnimationFrame(()=>{for(const m of[a.current,d.current]){if(!m)continue;const h=Ay(m);if(h){h.focus();break}}})}},[r,t,o,i,l]),null}function Uf(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,l)=>l({transform:o,...r}),n):n}function Um(e){return y.exports.useMemo(()=>({draggable:{...bo.draggable,...e==null?void 0:e.draggable},droppable:{...bo.droppable,...e==null?void 0:e.droppable},dragOverlay:{...bo.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Bm(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const l=y.exports.useRef(!1),{x:i,y:s}=typeof o=="boolean"?{x:o,y:o}:o;xt(()=>{if(!i&&!s||!t){l.current=!1;return}if(l.current||!r)return;const d=t==null?void 0:t.node.current;if(!d||d.isConnected===!1)return;const m=n(d),h=_f(m,r);if(i||(h.x=0),s||(h.y=0),l.current=!0,Math.abs(h.x)>0||Math.abs(h.y)>0){const p=Nf(d);p&&p.scrollBy({top:h.y,left:h.x})}},[t,i,s,r,n])}const Jl=y.exports.createContext({...ut,scaleX:1,scaleY:1});var Ut;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ut||(Ut={}));const cr=y.exports.memo(function(t){var n,r,o,l;let{id:i,accessibility:s,autoScroll:a=!0,children:d,sensors:m=Om,collisionDetection:h=kn,measuring:p,modifiers:v,...w}=t;const x=y.exports.useReducer(Fm,void 0,jm),[D,c]=x,[f,u]=Vy(),[g,k]=y.exports.useState(Ut.Uninitialized),S=g===Ut.Initialized,{draggable:{active:_,nodes:C,translate:P},droppable:{containers:M}}=D,z=_?C.get(_):null,ee=y.exports.useRef({initial:null,translated:null}),I=y.exports.useMemo(()=>{var fe;return _!=null?{id:_,data:(fe=z==null?void 0:z.data)!=null?fe:zm,rect:ee}:null},[_,z]),U=y.exports.useRef(null),[Oe,me]=y.exports.useState(null),[de,T]=y.exports.useState(null),L=so(w,Object.values(w)),O=Xl("DndDescribedBy",i),V=y.exports.useMemo(()=>M.getEnabled(),[M]),B=Um(p),{droppableRects:De,measureDroppableContainers:Se,measuringScheduled:St}=Cm(V,{dragging:S,dependencies:[P.x,P.y],config:B.droppable}),Z=Sm(C,_),ct=y.exports.useMemo(()=>de?El(de):null,[de]),dr=Jf(),fr=_m(Z,B.draggable.measure);Bm({activeNode:_?C.get(_):null,config:dr.layoutShiftCompensation,initialRect:fr,measure:B.draggable.measure});const Te=Zu(Z,B.draggable.measure,fr),Cn=Zu(Z?Z.parentElement:null),dt=y.exports.useRef({activatorEvent:null,active:null,activeNode:Z,collisionRect:null,collisions:null,droppableRects:De,draggableNodes:C,draggingNode:null,draggingNodeRect:null,droppableContainers:M,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),pr=M.getNodeFor((n=dt.current.over)==null?void 0:n.id),ft=Im({measure:B.dragOverlay.measure}),ln=(r=ft.nodeRef.current)!=null?r:Z,kt=S?(o=ft.rect)!=null?o:Te:null,hr=Boolean(ft.nodeRef.current&&ft.rect),Ve=Dm(hr?null:Te),It=Af(ln?Ne(ln):null),Ze=Tm(S?pr!=null?pr:Z:null),sn=Lm(Ze),wo=Uf(v,{transform:{x:P.x-Ve.x,y:P.y-Ve.y,scaleX:1,scaleY:1},activatorEvent:de,active:I,activeNodeRect:Te,containerNodeRect:Cn,draggingNodeRect:kt,over:dt.current.over,overlayNodeRect:ft.rect,scrollableAncestors:Ze,scrollableAncestorRects:sn,windowRect:It}),Ma=ct?Gn(ct,P):null,Ra=Mm(Ze),Vf=ec(Ra),Hf=ec(Ra,[Te]),_n=Gn(wo,Vf),En=kt?qy(kt,wo):null,yr=I&&En?h({active:I,collisionRect:En,droppableRects:De,droppableContainers:V,pointerCoordinates:Ma}):null,Pa=Gy(yr,"id"),[Ot,La]=y.exports.useState(null),Kf=hr?wo:Gn(wo,Hf),Qf=by(Kf,(l=Ot==null?void 0:Ot.rect)!=null?l:null,Te),Ia=y.exports.useCallback((fe,ze)=>{let{sensor:Ae,options:zt}=ze;if(U.current==null)return;const He=C.get(U.current);if(!He)return;const qe=fe.nativeEvent,pt=new Ae({active:U.current,activeNode:He,event:qe,options:zt,context:dt,onStart(et){const mr=U.current;if(mr==null)return;const vr=C.get(mr);if(!vr)return;const{onDragStart:xo}=L.current,So={active:{id:mr,data:vr.data,rect:ee}};mt.exports.unstable_batchedUpdates(()=>{xo==null||xo(So),k(Ut.Initializing),c({type:ie.DragStart,initialCoordinates:et,active:mr}),f({type:"onDragStart",event:So})})},onMove(et){c({type:ie.DragMove,coordinates:et})},onEnd:Nn(ie.DragEnd),onCancel:Nn(ie.DragCancel)});mt.exports.unstable_batchedUpdates(()=>{me(pt),T(fe.nativeEvent)});function Nn(et){return async function(){const{active:vr,collisions:xo,over:So,scrollAdjustedTranslate:za}=dt.current;let gr=null;if(vr&&za){const{cancelDrop:wr}=L.current;gr={activatorEvent:qe,active:vr,collisions:xo,delta:za,over:So},et===ie.DragEnd&&typeof wr=="function"&&await Promise.resolve(wr(gr))&&(et=ie.DragCancel)}U.current=null,mt.exports.unstable_batchedUpdates(()=>{c({type:et}),k(Ut.Uninitialized),La(null),me(null),T(null);const wr=et===ie.DragEnd?"onDragEnd":"onDragCancel";if(gr){const bl=L.current[wr];bl==null||bl(gr),f({type:wr,event:gr})}})}}},[C]),Yf=y.exports.useCallback((fe,ze)=>(Ae,zt)=>{const He=Ae.nativeEvent,qe=C.get(zt);if(U.current!==null||!qe||He.dndKit||He.defaultPrevented)return;const pt={active:qe};fe(Ae,ze.options,pt)===!0&&(He.dndKit={capturedBy:ze.sensor},U.current=zt,Ia(Ae,ze))},[C,Ia]),Oa=km(m,Yf);Rm(m),xt(()=>{Te&&g===Ut.Initializing&&k(Ut.Initialized)},[Te,g]),y.exports.useEffect(()=>{const{onDragMove:fe}=L.current,{active:ze,activatorEvent:Ae,collisions:zt,over:He}=dt.current;if(!ze||!Ae)return;const qe={active:ze,activatorEvent:Ae,collisions:zt,delta:{x:_n.x,y:_n.y},over:He};mt.exports.unstable_batchedUpdates(()=>{fe==null||fe(qe),f({type:"onDragMove",event:qe})})},[_n.x,_n.y]),y.exports.useEffect(()=>{const{active:fe,activatorEvent:ze,collisions:Ae,droppableContainers:zt,scrollAdjustedTranslate:He}=dt.current;if(!fe||U.current==null||!ze||!He)return;const{onDragOver:qe}=L.current,pt=zt.get(Pa),Nn=pt&&pt.rect.current?{id:pt.id,rect:pt.rect.current,data:pt.data,disabled:pt.disabled}:null,et={active:fe,activatorEvent:ze,collisions:Ae,delta:{x:He.x,y:He.y},over:Nn};mt.exports.unstable_batchedUpdates(()=>{La(Nn),qe==null||qe(et),f({type:"onDragOver",event:et})})},[Pa]),xt(()=>{dt.current={activatorEvent:de,active:I,activeNode:Z,collisionRect:En,collisions:yr,droppableRects:De,draggableNodes:C,draggingNode:ln,draggingNodeRect:kt,droppableContainers:M,over:Ot,scrollableAncestors:Ze,scrollAdjustedTranslate:_n},ee.current={initial:kt,translated:En}},[I,Z,yr,En,C,ln,kt,De,M,Ot,Ze,_n]),gm({...dr,delta:P,draggingRect:En,pointerCoordinates:Ma,scrollableAncestors:Ze,scrollableAncestorRects:sn});const Xf=y.exports.useMemo(()=>({active:I,activeNode:Z,activeNodeRect:Te,activatorEvent:de,collisions:yr,containerNodeRect:Cn,dragOverlay:ft,draggableNodes:C,droppableContainers:M,droppableRects:De,over:Ot,measureDroppableContainers:Se,scrollableAncestors:Ze,scrollableAncestorRects:sn,measuringConfiguration:B,measuringScheduled:St,windowRect:It}),[I,Z,Te,de,yr,Cn,ft,C,M,De,Ot,Se,Ze,sn,B,St,It]),Gf=y.exports.useMemo(()=>({activatorEvent:de,activators:Oa,active:I,activeNodeRect:Te,ariaDescribedById:{draggable:O},dispatch:c,draggableNodes:C,over:Ot,measureDroppableContainers:Se}),[de,Oa,I,Te,c,O,C,Ot,Se]);return F(Cf.Provider,{value:u,children:[F(go.Provider,{value:Gf,children:[E($f.Provider,{value:Xf,children:E(Jl.Provider,{value:Qf,children:d})}),E($m,{disabled:(s==null?void 0:s.restoreFocus)===!1})]}),E(Qy,{...s,hiddenTextDescribedById:O})]});function Jf(){const fe=(Oe==null?void 0:Oe.autoScrollEnabled)===!1,ze=typeof a=="object"?a.enabled===!1:a===!1,Ae=S&&!fe&&!ze;return typeof a=="object"?{...a,enabled:Ae}:{enabled:Ae}}}),Wm=y.exports.createContext(null),tc="button",Vm="Droppable";function Hm(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const l=Xl(Vm),{activators:i,activatorEvent:s,active:a,activeNodeRect:d,ariaDescribedById:m,draggableNodes:h,over:p}=y.exports.useContext(go),{role:v=tc,roleDescription:w="draggable",tabIndex:x=0}=o!=null?o:{},D=(a==null?void 0:a.id)===t,c=y.exports.useContext(D?Jl:Wm),[f,u]=kl(),[g,k]=kl(),S=Pm(i,t),_=so(n);xt(()=>(h.set(t,{id:t,key:l,node:f,activatorNode:g,data:_}),()=>{const P=h.get(t);P&&P.key===l&&h.delete(t)}),[h,t]);const C=y.exports.useMemo(()=>({role:v,tabIndex:x,"aria-disabled":r,"aria-pressed":D&&v===tc?!0:void 0,"aria-roledescription":w,"aria-describedby":m.draggable}),[r,v,x,D,w,m.draggable]);return{active:a,activatorEvent:s,activeNodeRect:d,attributes:C,isDragging:D,listeners:r?void 0:S,node:f,over:p,setNodeRef:u,setActivatorNodeRef:k,transform:c}}function Km(){return y.exports.useContext($f)}const Qm="Droppable",Ym={timeout:25};function Xm(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const l=Xl(Qm),{active:i,dispatch:s,over:a,measureDroppableContainers:d}=y.exports.useContext(go),m=y.exports.useRef({disabled:n}),h=y.exports.useRef(!1),p=y.exports.useRef(null),v=y.exports.useRef(null),{disabled:w,updateMeasurementsFor:x,timeout:D}={...Ym,...o},c=so(x!=null?x:r),f=y.exports.useCallback(()=>{if(!h.current){h.current=!0;return}v.current!=null&&clearTimeout(v.current),v.current=setTimeout(()=>{d(Array.isArray(c.current)?c.current:[c.current]),v.current=null},D)},[D]),u=Gl({callback:f,disabled:w||!i}),g=y.exports.useCallback((C,P)=>{!u||(P&&(u.unobserve(P),h.current=!1),C&&u.observe(C))},[u]),[k,S]=kl(g),_=so(t);return y.exports.useEffect(()=>{!u||!k.current||(u.disconnect(),h.current=!1,u.observe(k.current))},[k,u]),xt(()=>(s({type:ie.RegisterDroppable,element:{id:r,key:l,disabled:n,node:k,rect:p,data:_}}),()=>s({type:ie.UnregisterDroppable,key:l,id:r})),[r]),y.exports.useEffect(()=>{n!==m.current.disabled&&(s({type:ie.SetDroppableDisabled,id:r,key:l,disabled:n}),m.current.disabled=n)},[r,l,n,s]),{active:i,rect:p,isOver:(a==null?void 0:a.id)===r,node:k,over:a,setNodeRef:S}}function Gm(e){let{animation:t,children:n}=e;const[r,o]=y.exports.useState(null),[l,i]=y.exports.useState(null),s=Cl(n);return!n&&!r&&s&&o(s),xt(()=>{if(!l)return;const a=r==null?void 0:r.key,d=r==null?void 0:r.props.id;if(a==null||d==null){o(null);return}Promise.resolve(t(d,l)).then(()=>{o(null)})},[t,r,l]),F(oe,{children:[n,r?y.exports.cloneElement(r,{ref:i}):null]})}const Jm={x:0,y:0,scaleX:1,scaleY:1};function bm(e){let{children:t}=e;return E(go.Provider,{value:Ff,children:E(Jl.Provider,{value:Jm,children:t})})}const Zm={position:"fixed",touchAction:"none"},qm=e=>_a(e)?"transform 250ms ease":void 0,ev=y.exports.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:l,className:i,rect:s,style:a,transform:d,transition:m=qm}=e;if(!s)return null;const h=o?d:{...d,scaleX:1,scaleY:1},p={...Zm,width:s.width,height:s.height,top:s.top,left:s.left,transform:rr.Transform.toString(h),transformOrigin:o&&r?Yy(r,s):void 0,transition:typeof m=="function"?m(r):m,...a};return Ps.createElement(n,{className:i,style:p,ref:t},l)}),tv=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:l,className:i}=e;if(l!=null&&l.active)for(const[s,a]of Object.entries(l.active))a!==void 0&&(o[s]=n.node.style.getPropertyValue(s),n.node.style.setProperty(s,a));if(l!=null&&l.dragOverlay)for(const[s,a]of Object.entries(l.dragOverlay))a!==void 0&&r.node.style.setProperty(s,a);return i!=null&&i.active&&n.node.classList.add(i.active),i!=null&&i.dragOverlay&&r.node.classList.add(i.dragOverlay),function(){for(const[a,d]of Object.entries(o))n.node.style.setProperty(a,d);i!=null&&i.active&&n.node.classList.remove(i.active)}},nv=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:rr.Transform.toString(t)},{transform:rr.Transform.toString(n)}]},rv={duration:250,easing:"ease",keyframes:nv,sideEffects:tv({styles:{active:{opacity:"0"}}})};function ov(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return Yl((l,i)=>{if(t===null)return;const s=n.get(l);if(!s)return;const a=s.node.current;if(!a)return;const d=jf(i);if(!d)return;const{transform:m}=Ne(i).getComputedStyle(i),h=Ef(m);if(!h)return;const p=typeof t=="function"?t:lv(t);return Lf(a,o.draggable.measure),p({active:{id:l,data:s.data,node:a,rect:o.draggable.measure(a)},draggableNodes:n,dragOverlay:{node:i,rect:o.dragOverlay.measure(d)},droppableContainers:r,measuringConfiguration:o,transform:h})})}function lv(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...rv,...e};return l=>{let{active:i,dragOverlay:s,transform:a,...d}=l;if(!t)return;const m={x:s.rect.left-i.rect.left,y:s.rect.top-i.rect.top},h={scaleX:a.scaleX!==1?i.rect.width*a.scaleX/s.rect.width:1,scaleY:a.scaleY!==1?i.rect.height*a.scaleY/s.rect.height:1},p={x:a.x-m.x,y:a.y-m.y,...h},v=o({...d,active:i,dragOverlay:s,transform:{initial:a,final:p}}),[w]=v,x=v[v.length-1];if(JSON.stringify(w)===JSON.stringify(x))return;const D=r==null?void 0:r({active:i,dragOverlay:s,...d}),c=s.node.animate(v,{duration:t,easing:n,fill:"forwards"});return new Promise(f=>{c.onfinish=()=>{D==null||D(),f()}})}}let nc=0;function iv(e){return y.exports.useMemo(()=>{if(e!=null)return nc++,nc},[e])}const rc=Ps.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:o,transition:l,modifiers:i,wrapperElement:s="div",className:a,zIndex:d=999}=e;const{activatorEvent:m,active:h,activeNodeRect:p,containerNodeRect:v,draggableNodes:w,droppableContainers:x,dragOverlay:D,over:c,measuringConfiguration:f,scrollableAncestors:u,scrollableAncestorRects:g,windowRect:k}=Km(),S=y.exports.useContext(Jl),_=iv(h==null?void 0:h.id),C=Uf(i,{activatorEvent:m,active:h,activeNodeRect:p,containerNodeRect:v,draggingNodeRect:D.rect,over:c,overlayNodeRect:D.rect,scrollableAncestors:u,scrollableAncestorRects:g,transform:S,windowRect:k}),P=Ta(p),M=ov({config:r,draggableNodes:w,droppableContainers:x,measuringConfiguration:f}),z=P?D.setRef:void 0;return E(bm,{children:E(Gm,{animation:M,children:h&&_?E(ev,{id:h.id,ref:z,as:s,activatorEvent:m,adjustScale:t,className:a,transition:l,rect:P,style:{zIndex:d,...o},transform:C,children:n},_):null})})}),sv="_Card_10g5x_1",av="_Disabled_10g5x_24",uv="_Money_10g5x_29",cv="_Icon_10g5x_35",dv="_Amount_10g5x_43",fv="_Shortcut_10g5x_54",pv="_Key_10g5x_72",hv="_ContextMenu_10g5x_91",yv="_OptionsList_10g5x_102",mv="_OptionListItem_10g5x_110",vv="_OptionListOption_10g5x_122",j={Card:sv,Disabled:av,Money:uv,Icon:cv,Amount:dv,Shortcut:fv,Key:pv,ContextMenu:hv,OptionsList:yv,OptionListItem:mv,OptionListOption:vv},gv="/html/icon/apartment_key.png",wv="/html/icon/license.webp",xv="/html/icon/health.webp",Sv="/html/icon/identity.webp",oc="/html/icon/money.png",kv="/html/icon/wallet.webp",Cv="/html/icon/bank.webp",_v="/html/icon/keychain.webp",Ev="/html/icon/vehicle_key.png",lc={weapon_pistol:"9x19 AP",weapon_pistol_mk2:"9x19 AP",weapon_revolver_mk2:".357 Magnum",weapon_combatpistol:"9x19 AP",weapon_appistol:"9x19 AP",weapon_pistol50:".357 Magnum",weapon_snspistol:"9x19 AP",weapon_heavypistol:"9x19 AP",weapon_vintagepistol:"9x19 AP",weapon_flaregun:"Flair",weapon_marksmanpistol:"9x19 AP",weapon_revolver:".357 Magnum",weapon_doubleaction:".357 Magnum",weapon_snspistol_mk2:"9x19 AP",weapon_ceramicpistol:"9x19 AP",weapon_navyrevolver:".357 Magnum",weapon_gadgetpistol:"9x19 AP",weapon_pistolxm3:"9x19 AP",weapon_microsmg:"9x19 AP",weapon_smg:"9x19 AP",weapon_assaultsmg:"5.7x28 SB193",weapon_combatpdw:"9x19 AP",weapon_smg_mk2:"5.7x28 SB193",weapon_machinepistol:"9x19 AP",weapon_minismg:"9x19 AP",weapon_raycarbine:"Munition Alien",weapon_tecpistol:"9x19 AP",weapon_assaultrifle:"7.62x39 BP",weapon_assaultrifle_mk2:"7.62x39 BP",weapon_carbinerifle:"5.56x45 M995",weapon_carbinerifle_mk2:"5.56x45 M995",weapon_advancedrifle:"7.62x51 M62",weapon_specialcarbine:"5.56x45 M995",weapon_bullpuprifle:"5.56x45 M995",weapon_compactrifle:"5.56x45 M995",weapon_specialcarbine_mk2:"5.56x45 M995",weapon_bullpuprifle_mk2:"7.62x39 BP",weapon_militaryrifle:"7.62x51 M62",weapon_heavyrifle:"7.62x51 M62",weapon_tacticalrifle:"5.56x45 M995",weapon_pumpshotgun:"Billes caoutchouc",weapon_sawnoffshotgun:"12/70 Buckshot",weapon_assaultshotgun:"12/70 Buckshot",weapon_bullpupshotgun:"12/70 Buckshot",weapon_musket:"Lead Bullet",weapon_heavyshotgun:"12/70 Buckshot",weapon_dbshotgun:"12/70 Buckshot",weapon_autoshotgun:"12/70 Buckshot",weapon_pumpshotgun_mk2:"12/70 Buckshot",weapon_combatshotgun:"12/70 Buckshot",weapon_mg:"12,7x108 BZT-44M",weapon_combatmg:"12,7x108 BZT-44M",weapon_gusenberg:"12,7x108 BZT-44M",weapon_combatmg_mk2:"12,7x108 BZT-44M",weapon_rpg:"85mm PG-7",weapon_grenadelauncher:"40x46mm M381",weapon_grenadelauncher_smoke:"40x46mm M381",weapon_minigun:"12,7x108 BZT-44M",weapon_firework:"85mn Artifice",weapon_railgun:"Munition Alien",weapon_hominglauncher:"AIM-9X",weapon_compactlauncher:"40x46mm M381",weapon_rayminigun:"Munition Alien",weapon_emplauncher:"Munition Alien",weapon_railgunxm3:"Munition Alien",weapon_sniperrifle:".50 BMG",weapon_heavysniper:".50 BMG",weapon_heavysniper_mk2:".50 BMG",weapon_marksmanrifle:"7.62x51 M62",weapon_marksmanrifle_mk2:"7.62x51 M62",weapon_precisionrifle:".50 BMG"},ic={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},Nv={style:"currency",currency:"USD",maximumFractionDigits:0},Bn=({id:e,containerName:t,item:n,money:r,interactAction:o,wallet:l,keychain:i,onItemHover:s,price:a,undraggable:d})=>{var M,z,ee;const{attributes:m,listeners:h,setNodeRef:p,transform:v,isDragging:w}=Hm({id:`${e}_${(M=n==null?void 0:n.slot)!=null?M:""}`,data:{container:t,item:n},disabled:(n==null?void 0:n.disabled)===!0||r==-1||l==-1||i==-1}),x=y.exports.useRef(null),D=y.exports.useRef(null),[c,f]=y.exports.useState({visible:!1,posX:0,posY:0}),u={transform:rr.Translate.toString(v)},g=y.exports.useCallback(()=>s==null?void 0:s(null),[s]),k=y.exports.useCallback(()=>{var L,O,V,B,De,Se,St,Z,ct,dr,fr,Te,Cn,dt,pr,ft,ln,kt,hr;if(!n)return null;let I=(L=n==null?void 0:n.metadata)!=null&&L.label?`${n.metadata.label} ${n.label}`:n.label,U="",Oe="",me="",de=0,T=n.illustrator||"";if(n.type==="weapon")(O=n==null?void 0:n.metadata)!=null&&O.ammo&&(U+=` [${n.metadata.ammo} munitions]`),lc[n.name]&&(Oe+=` Munition : ${lc[n.name]}`);else if(n.type==="fishing_rod")(V=n==null?void 0:n.metadata)!=null&&V.bait&&(U+=` [${(B=n.metadata.bait)==null?void 0:B.label}]`);else if(n.name==="bank")(De=n==null?void 0:n.metadata)!=null&&De.iban&&(U+=`[ IBAN : ${(Se=n.metadata.iban)==null?void 0:Se.replace(/.{4}/g,"$& ")}]`);else if(n.name==="chainsaw")(St=n==null?void 0:n.metadata)!=null&&St.fuel&&(U+=` [${n.metadata.fuel.toString()} L]`);else if(n.type==="fish")((Z=n==null?void 0:n.metadata)==null?void 0:Z.weight)&&((ct=n==null?void 0:n.metadata)==null?void 0:ct.length)&&(me+='
',me+=`Poids : ${(dr=n==null?void 0:n.metadata)==null?void 0:dr.weight} grammes `,me+=`Taille : ${(fr=n==null?void 0:n.metadata)==null?void 0:fr.length} centim\xE8tres `,me+="
");else if(n.type==="crate"&&((Cn=(Te=n.metadata)==null?void 0:Te.crateElements)==null?void 0:Cn.length))n.metadata.label&&(I=`${n.label} "${n.metadata.label}"`),n.metadata.crateElements.map(Ve=>{var Ze,sn;const It=new Date((sn=(Ze=Ve==null?void 0:Ve.metadata)==null?void 0:Ze.expiration)!=null?sn:"");me+=`
- ${Ve.amount} ${Ve.label} [DLC: ${It.toLocaleDateString("fr-FR",ic)}]`,de=de+Ve.amount*Ve.weight}),U=`[${de/1e3}/12 Kg]`;else if((dt=n==null?void 0:n.metadata)!=null&&dt.expiration){const Ve=new Date().getTime(),It=new Date(n.metadata.expiration);Ve>It.getTime()?U+=" [P\xE9rim\xE9]":U+=` [DLC: ${It.toLocaleDateString("fr-FR",ic)}]`}else((pr=n==null?void 0:n.metadata)==null?void 0:pr.type)&&!((ft=n==null?void 0:n.metadata)!=null&&ft.label)&&(U+=` [${(ln=n==null?void 0:n.metadata)==null?void 0:ln.type}]`);(kt=n==null?void 0:n.metadata)!=null&&kt.crafted&&(U+=" [Ill\xE9gal]"),n.illustrator&&n.illustrator instanceof Object&&(n.name==="outfit"||n.name==="armor")&&(T=n.illustrator[((hr=n==null?void 0:n.metadata)==null?void 0:hr.type)||""]||""),s==null||s(` + `},Hy={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function Ky(e){let{announcements:t=Hy,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=Vy}=e;const{announce:l,announcement:i}=Uy(),s=Xl("DndLiveRegion"),[a,d]=y.exports.useState(!1);if(y.exports.useEffect(()=>{d(!0)},[]),By(y.exports.useMemo(()=>({onDragStart(h){let{active:p}=h;l(t.onDragStart({active:p}))},onDragMove(h){let{active:p,over:v}=h;t.onDragMove&&l(t.onDragMove({active:p,over:v}))},onDragOver(h){let{active:p,over:v}=h;l(t.onDragOver({active:p,over:v}))},onDragEnd(h){let{active:p,over:v}=h;l(t.onDragEnd({active:p,over:v}))},onDragCancel(h){let{active:p,over:v}=h;l(t.onDragCancel({active:p,over:v}))}}),[l,t])),!a)return null;const m=F(oe,{children:[E(Fy,{id:r,value:o.draggable}),E($y,{id:s,announcement:i})]});return n?mt.exports.createPortal(m,n):m}var ie;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(ie||(ie={}));function Nl(){}const ut=Object.freeze({x:0,y:0});function Qy(e,t){const n=El(e);if(!n)return"0 0";const r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+"% "+r.y+"%"}function Yy(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Xy(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}function Gy(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height),i=o-r,s=l-n;if(r{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const l of r){const{id:i}=l,s=n.get(i);if(s){const a=Gy(s,t);a>0&&o.push({id:i,data:{droppableContainer:l,value:a}})}}return o.sort(Yy)};function Jy(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function Ef(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:ut}function Zy(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),l=1;l({...i,top:i.top+e*s.y,bottom:i.bottom+e*s.y,left:i.left+e*s.x,right:i.right+e*s.x}),{...n})}}const by=Zy(1);function Nf(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function qy(e,t,n){const r=Nf(t);if(!r)return e;const{scaleX:o,scaleY:l,x:i,y:s}=r,a=e.left-i-(1-o)*parseFloat(n),d=e.top-s-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),m=o?e.width/o:e.width,h=l?e.height/l:e.height;return{width:m,height:h,top:d,right:a+m,bottom:d+h,left:a}}const em={ignoreTransform:!1};function vo(e,t){t===void 0&&(t=em);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:d,transformOrigin:m}=Ne(e).getComputedStyle(e);d&&(n=qy(n,d,m))}const{top:r,left:o,width:l,height:i,bottom:s,right:a}=n;return{top:r,left:o,width:l,height:i,bottom:s,right:a}}function Yu(e){return vo(e,{ignoreTransform:!0})}function tm(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function nm(e,t){return t===void 0&&(t=Ne(e).getComputedStyle(e)),t.position==="fixed"}function rm(e,t){t===void 0&&(t=Ne(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const l=t[o];return typeof l=="string"?n.test(l):!1})}function Ea(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Ca(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!yo(o)||kf(o)||n.includes(o))return n;const l=Ne(e).getComputedStyle(o);return o!==e&&rm(o,l)&&n.push(o),nm(o,l)?n:r(o.parentNode)}return e?r(e):n}function Df(e){const[t]=Ea(e,1);return t!=null?t:null}function Ei(e){return!Ql||!e?null:ar(e)?e:ka(e)?Ca(e)||e===ur(e).scrollingElement?window:yo(e)?e:null:null}function Tf(e){return ar(e)?e.scrollX:e.scrollLeft}function Mf(e){return ar(e)?e.scrollY:e.scrollTop}function Cs(e){return{x:Tf(e),y:Mf(e)}}var ue;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(ue||(ue={}));function Rf(e){return!Ql||!e?!1:e===document.scrollingElement}function Pf(e){const t={x:0,y:0},n=Rf(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,l=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:o,isLeft:l,isBottom:i,isRight:s,maxScroll:r,minScroll:t}}const om={x:.2,y:.2};function lm(e,t,n,r,o){let{top:l,left:i,right:s,bottom:a}=n;r===void 0&&(r=10),o===void 0&&(o=om);const{isTop:d,isBottom:m,isLeft:h,isRight:p}=Pf(e),v={x:0,y:0},w={x:0,y:0},x={height:t.height*o.y,width:t.width*o.x};return!d&&l<=t.top+x.height?(v.y=ue.Backward,w.y=r*Math.abs((t.top+x.height-l)/x.height)):!m&&a>=t.bottom-x.height&&(v.y=ue.Forward,w.y=r*Math.abs((t.bottom-x.height-a)/x.height)),!p&&s>=t.right-x.width?(v.x=ue.Forward,w.x=r*Math.abs((t.right-x.width-s)/x.width)):!h&&i<=t.left+x.width&&(v.x=ue.Backward,w.x=r*Math.abs((t.left+x.width-i)/x.width)),{direction:v,speed:w}}function im(e){if(e===document.scrollingElement){const{innerWidth:l,innerHeight:i}=window;return{top:0,left:0,right:l,bottom:i,width:l,height:i}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Lf(e){return e.reduce((t,n)=>Gn(t,Cs(n)),ut)}function sm(e){return e.reduce((t,n)=>t+Tf(n),0)}function am(e){return e.reduce((t,n)=>t+Mf(n),0)}function If(e,t){if(t===void 0&&(t=vo),!e)return;const{top:n,left:r,bottom:o,right:l}=t(e);!Df(e)||(o<=0||l<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const um=[["x",["left","right"],sm],["y",["top","bottom"],am]];class Na{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=Ea(n),o=Lf(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[l,i,s]of um)for(const a of i)Object.defineProperty(this,a,{get:()=>{const d=s(r),m=o[l]-d;return this.rect[a]+m},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Br{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function cm(e){const{EventTarget:t}=Ne(e);return e instanceof t?e:ur(e)}function Ni(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var Ke;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Ke||(Ke={}));function Xu(e){e.preventDefault()}function dm(e){e.stopPropagation()}var H;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(H||(H={}));const Of={start:[H.Space,H.Enter],cancel:[H.Esc],end:[H.Space,H.Enter]},fm=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case H.Right:return{...n,x:n.x+25};case H.Left:return{...n,x:n.x-25};case H.Down:return{...n,y:n.y+25};case H.Up:return{...n,y:n.y-25}}};class zf{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Br(ur(n)),this.windowListeners=new Br(Ne(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ke.Resize,this.handleCancel),this.windowListeners.add(Ke.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ke.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&If(r),n(ut)}handleKeyDown(t){if(_a(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:l=Of,coordinateGetter:i=fm,scrollBehavior:s="smooth"}=o,{code:a}=t;if(l.end.includes(a)){this.handleEnd(t);return}if(l.cancel.includes(a)){this.handleCancel(t);return}const{collisionRect:d}=r.current,m=d?{x:d.left,y:d.top}:ut;this.referenceCoordinates||(this.referenceCoordinates=m);const h=i(t,{active:n,context:r.current,currentCoordinates:m});if(h){const p=_l(h,m),v={x:0,y:0},{scrollableAncestors:w}=r.current;for(const x of w){const D=t.code,{isTop:c,isRight:f,isLeft:u,isBottom:g,maxScroll:k,minScroll:S}=Pf(x),_=im(x),C={x:Math.min(D===H.Right?_.right-_.width/2:_.right,Math.max(D===H.Right?_.left:_.left+_.width/2,h.x)),y:Math.min(D===H.Down?_.bottom-_.height/2:_.bottom,Math.max(D===H.Down?_.top:_.top+_.height/2,h.y))},P=D===H.Right&&!f||D===H.Left&&!u,M=D===H.Down&&!g||D===H.Up&&!c;if(P&&C.x!==h.x){const z=x.scrollLeft+p.x,ee=D===H.Right&&z<=k.x||D===H.Left&&z>=S.x;if(ee&&!p.y){x.scrollTo({left:z,behavior:s});return}ee?v.x=x.scrollLeft-z:v.x=D===H.Right?x.scrollLeft-k.x:x.scrollLeft-S.x,v.x&&x.scrollBy({left:-v.x,behavior:s});break}else if(M&&C.y!==h.y){const z=x.scrollTop+p.y,ee=D===H.Down&&z<=k.y||D===H.Up&&z>=S.y;if(ee&&!p.x){x.scrollTo({top:z,behavior:s});return}ee?v.y=x.scrollTop-z:v.y=D===H.Down?x.scrollTop-k.y:x.scrollTop-S.y,v.y&&x.scrollBy({top:-v.y,behavior:s});break}}this.handleMove(t,Gn(_l(h,this.referenceCoordinates),v))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}zf.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Of,onActivation:o}=t,{active:l}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const s=l.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function Gu(e){return Boolean(e&&"distance"in e)}function Ju(e){return Boolean(e&&"delay"in e)}class Da{constructor(t,n,r){var o;r===void 0&&(r=cm(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:l}=t,{target:i}=l;this.props=t,this.events=n,this.document=ur(i),this.documentListeners=new Br(this.document),this.listeners=new Br(r),this.windowListeners=new Br(Ne(i)),this.initialCoordinates=(o=El(l))!=null?o:ut,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(Ke.Resize,this.handleCancel),this.windowListeners.add(Ke.DragStart,Xu),this.windowListeners.add(Ke.VisibilityChange,this.handleCancel),this.windowListeners.add(Ke.ContextMenu,Xu),this.documentListeners.add(Ke.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Ju(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}if(Gu(n))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Ke.Click,dm,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ke.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:l}=this,{onMove:i,options:{activationConstraint:s}}=l;if(!o)return;const a=(n=El(t))!=null?n:ut,d=_l(o,a);if(!r&&s){if(Gu(s)){if(s.tolerance!=null&&Ni(d,s.tolerance))return this.handleCancel();if(Ni(d,s.distance))return this.handleStart()}return Ju(s)&&Ni(d,s.tolerance)?this.handleCancel():void 0}t.cancelable&&t.preventDefault(),i(a)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===H.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const pm={move:{name:"pointermove"},end:{name:"pointerup"}};class Af extends Da{constructor(t){const{event:n}=t,r=ur(n.target);super(t,pm,r)}}Af.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const hm={move:{name:"mousemove"},end:{name:"mouseup"}};var _s;(function(e){e[e.RightClick=2]="RightClick"})(_s||(_s={}));class ym extends Da{constructor(t){super(t,hm,ur(t.event.target))}}ym.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===_s.RightClick?!1:(r==null||r({event:n}),!0)}}];const Di={move:{name:"touchmove"},end:{name:"touchend"}};class mm extends Da{constructor(t){super(t,Di)}static setup(){return window.addEventListener(Di.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Di.move.name,t)};function t(){}}}mm.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var Wr;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Wr||(Wr={}));var Dl;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Dl||(Dl={}));function vm(e){let{acceleration:t,activator:n=Wr.Pointer,canScroll:r,draggingRect:o,enabled:l,interval:i=5,order:s=Dl.TreeOrder,pointerCoordinates:a,scrollableAncestors:d,scrollableAncestorRects:m,delta:h,threshold:p}=e;const v=wm({delta:h,disabled:!l}),[w,x]=Iy(),D=y.exports.useRef({x:0,y:0}),c=y.exports.useRef({x:0,y:0}),f=y.exports.useMemo(()=>{switch(n){case Wr.Pointer:return a?{top:a.y,bottom:a.y,left:a.x,right:a.x}:null;case Wr.DraggableRect:return o}},[n,o,a]),u=y.exports.useRef(null),g=y.exports.useCallback(()=>{const S=u.current;if(!S)return;const _=D.current.x*c.current.x,C=D.current.y*c.current.y;S.scrollBy(_,C)},[]),k=y.exports.useMemo(()=>s===Dl.TreeOrder?[...d].reverse():d,[s,d]);y.exports.useEffect(()=>{if(!l||!d.length||!f){x();return}for(const S of k){if((r==null?void 0:r(S))===!1)continue;const _=d.indexOf(S),C=m[_];if(!C)continue;const{direction:P,speed:M}=lm(S,C,f,t,p);for(const z of["x","y"])v[z][P[z]]||(M[z]=0,P[z]=0);if(M.x>0||M.y>0){x(),u.current=S,w(g,i),D.current=M,c.current=P;return}}D.current={x:0,y:0},c.current={x:0,y:0},x()},[t,g,r,x,l,i,JSON.stringify(f),JSON.stringify(v),w,d,k,m,JSON.stringify(p)])}const gm={x:{[ue.Backward]:!1,[ue.Forward]:!1},y:{[ue.Backward]:!1,[ue.Forward]:!1}};function wm(e){let{delta:t,disabled:n}=e;const r=Cl(t);return mo(o=>{if(n||!r||!o)return gm;const l={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[ue.Backward]:o.x[ue.Backward]||l.x===-1,[ue.Forward]:o.x[ue.Forward]||l.x===1},y:{[ue.Backward]:o.y[ue.Backward]||l.y===-1,[ue.Forward]:o.y[ue.Forward]||l.y===1}}},[n,t,r])}function xm(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return mo(o=>{var l;return t===null?null:(l=r!=null?r:o)!=null?l:null},[r,t])}function Sm(e,t){return y.exports.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,l=o.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...l]},[]),[e,t])}var ao;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(ao||(ao={}));var Es;(function(e){e.Optimized="optimized"})(Es||(Es={}));const Zu=new Map;function km(e,t){let{dragging:n,dependencies:r,config:o}=t;const[l,i]=y.exports.useState(null),{frequency:s,measure:a,strategy:d}=o,m=y.exports.useRef(e),h=D(),p=so(h),v=y.exports.useCallback(function(c){c===void 0&&(c=[]),!p.current&&i(f=>f===null?c:f.concat(c.filter(u=>!f.includes(u))))},[p]),w=y.exports.useRef(null),x=mo(c=>{if(h&&!n)return Zu;if(!c||c===Zu||m.current!==e||l!=null){const f=new Map;for(let u of e){if(!u)continue;if(l&&l.length>0&&!l.includes(u.id)&&u.rect.current){f.set(u.id,u.rect.current);continue}const g=u.node.current,k=g?new Na(a(g),g):null;u.rect.current=k,k&&f.set(u.id,k)}return f}return c},[e,l,n,h,a]);return y.exports.useEffect(()=>{m.current=e},[e]),y.exports.useEffect(()=>{h||v()},[n,h]),y.exports.useEffect(()=>{l&&l.length>0&&i(null)},[JSON.stringify(l)]),y.exports.useEffect(()=>{h||typeof s!="number"||w.current!==null||(w.current=setTimeout(()=>{v(),w.current=null},s))},[s,h,v,...r]),{droppableRects:x,measureDroppableContainers:v,measuringScheduled:l!=null};function D(){switch(d){case ao.Always:return!1;case ao.BeforeDragging:return n;default:return!n}}}function Ta(e,t){return mo(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function Cm(e,t){return Ta(e,t)}function _m(e){let{callback:t,disabled:n}=e;const r=Yl(t),o=y.exports.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:l}=window;return new l(r)},[r,n]);return y.exports.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Gl(e){let{callback:t,disabled:n}=e;const r=Yl(t),o=y.exports.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:l}=window;return new l(r)},[n]);return y.exports.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Em(e){return new Na(vo(e),e)}function bu(e,t,n){t===void 0&&(t=Em);const[r,o]=y.exports.useReducer(s,null),l=_m({callback(a){if(!!e)for(const d of a){const{type:m,target:h}=d;if(m==="childList"&&h instanceof HTMLElement&&h.contains(e)){o();break}}}}),i=Gl({callback:o});return xt(()=>{o(),e?(i==null||i.observe(e),l==null||l.observe(document.body,{childList:!0,subtree:!0})):(i==null||i.disconnect(),l==null||l.disconnect())},[e]),r;function s(a){if(!e)return null;if(e.isConnected===!1){var d;return(d=a!=null?a:n)!=null?d:null}const m=t(e);return JSON.stringify(a)===JSON.stringify(m)?a:m}}function Nm(e){const t=Ta(e);return Ef(e,t)}const qu=[];function Dm(e){const t=y.exports.useRef(e),n=mo(r=>e?r&&r!==qu&&e&&t.current&&e.parentNode===t.current.parentNode?r:Ea(e):qu,[e]);return y.exports.useEffect(()=>{t.current=e},[e]),n}function Tm(e){const[t,n]=y.exports.useState(null),r=y.exports.useRef(e),o=y.exports.useCallback(l=>{const i=Ei(l.target);!i||n(s=>s?(s.set(i,Cs(i)),new Map(s)):null)},[]);return y.exports.useEffect(()=>{const l=r.current;if(e!==l){i(l);const s=e.map(a=>{const d=Ei(a);return d?(d.addEventListener("scroll",o,{passive:!0}),[d,Cs(d)]):null}).filter(a=>a!=null);n(s.length?new Map(s):null),r.current=e}return()=>{i(e),i(l)};function i(s){s.forEach(a=>{const d=Ei(a);d==null||d.removeEventListener("scroll",o)})}},[o,e]),y.exports.useMemo(()=>e.length?t?Array.from(t.values()).reduce((l,i)=>Gn(l,i),ut):Lf(e):ut,[e,t])}function ec(e,t){t===void 0&&(t=[]);const n=y.exports.useRef(null);return y.exports.useEffect(()=>{n.current=null},t),y.exports.useEffect(()=>{const r=e!==ut;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?_l(e,n.current):ut}function Mm(e){y.exports.useEffect(()=>{if(!Ql)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function Rm(e,t){return y.exports.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:l}=r;return n[o]=i=>{l(i,t)},n},{}),[e,t])}function jf(e){return y.exports.useMemo(()=>e?tm(e):null,[e])}const Ti=[];function Pm(e,t){t===void 0&&(t=vo);const[n]=e,r=jf(n?Ne(n):null),[o,l]=y.exports.useReducer(s,Ti),i=Gl({callback:l});return e.length>0&&o===Ti&&l(),xt(()=>{e.length?e.forEach(a=>i==null?void 0:i.observe(a)):(i==null||i.disconnect(),l())},[e]),o;function s(){return e.length?e.map(a=>Rf(a)?r:new Na(t(a),a)):Ti}}function Ff(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return yo(t)?t:e}function Lm(e){let{measure:t}=e;const[n,r]=y.exports.useState(null),o=y.exports.useCallback(d=>{for(const{target:m}of d)if(yo(m)){r(h=>{const p=t(m);return h?{...h,width:p.width,height:p.height}:p});break}},[t]),l=Gl({callback:o}),i=y.exports.useCallback(d=>{const m=Ff(d);l==null||l.disconnect(),m&&(l==null||l.observe(m)),r(m?t(m):null)},[t,l]),[s,a]=kl(i);return y.exports.useMemo(()=>({nodeRef:s,rect:n,setRef:a}),[n,s,a])}const Im=[{sensor:Af,options:{}},{sensor:zf,options:{}}],Om={current:{}},Zo={draggable:{measure:Yu},droppable:{measure:Yu,strategy:ao.WhileDragging,frequency:Es.Optimized},dragOverlay:{measure:vo}};class Vr extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const zm={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Vr,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Nl},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Zo,measureDroppableContainers:Nl,windowRect:null,measuringScheduled:!1},$f={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Nl,draggableNodes:new Map,over:null,measureDroppableContainers:Nl},go=y.exports.createContext($f),Uf=y.exports.createContext(zm);function Am(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Vr}}}function jm(e,t){switch(t.type){case ie.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case ie.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case ie.DragEnd:case ie.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case ie.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new Vr(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case ie.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,l=e.droppable.containers.get(n);if(!l||r!==l.key)return e;const i=new Vr(e.droppable.containers);return i.set(n,{...l,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case ie.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const l=new Vr(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function Fm(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=y.exports.useContext(go),l=Cl(r),i=Cl(n==null?void 0:n.id);return y.exports.useEffect(()=>{if(!t&&!r&&l&&i!=null){if(!_a(l)||document.activeElement===l.target)return;const s=o.get(i);if(!s)return;const{activatorNode:a,node:d}=s;if(!a.current&&!d.current)return;requestAnimationFrame(()=>{for(const m of[a.current,d.current]){if(!m)continue;const h=Ay(m);if(h){h.focus();break}}})}},[r,t,o,i,l]),null}function Bf(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,l)=>l({transform:o,...r}),n):n}function $m(e){return y.exports.useMemo(()=>({draggable:{...Zo.draggable,...e==null?void 0:e.draggable},droppable:{...Zo.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Zo.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Um(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const l=y.exports.useRef(!1),{x:i,y:s}=typeof o=="boolean"?{x:o,y:o}:o;xt(()=>{if(!i&&!s||!t){l.current=!1;return}if(l.current||!r)return;const d=t==null?void 0:t.node.current;if(!d||d.isConnected===!1)return;const m=n(d),h=Ef(m,r);if(i||(h.x=0),s||(h.y=0),l.current=!0,Math.abs(h.x)>0||Math.abs(h.y)>0){const p=Df(d);p&&p.scrollBy({top:h.y,left:h.x})}},[t,i,s,r,n])}const Jl=y.exports.createContext({...ut,scaleX:1,scaleY:1});var Ut;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ut||(Ut={}));const cr=y.exports.memo(function(t){var n,r,o,l;let{id:i,accessibility:s,autoScroll:a=!0,children:d,sensors:m=Im,collisionDetection:h=kn,measuring:p,modifiers:v,...w}=t;const x=y.exports.useReducer(jm,void 0,Am),[D,c]=x,[f,u]=Wy(),[g,k]=y.exports.useState(Ut.Uninitialized),S=g===Ut.Initialized,{draggable:{active:_,nodes:C,translate:P},droppable:{containers:M}}=D,z=_?C.get(_):null,ee=y.exports.useRef({initial:null,translated:null}),I=y.exports.useMemo(()=>{var fe;return _!=null?{id:_,data:(fe=z==null?void 0:z.data)!=null?fe:Om,rect:ee}:null},[_,z]),U=y.exports.useRef(null),[Oe,me]=y.exports.useState(null),[de,T]=y.exports.useState(null),L=so(w,Object.values(w)),O=Xl("DndDescribedBy",i),V=y.exports.useMemo(()=>M.getEnabled(),[M]),B=$m(p),{droppableRects:De,measureDroppableContainers:Se,measuringScheduled:St}=km(V,{dragging:S,dependencies:[P.x,P.y],config:B.droppable}),b=xm(C,_),ct=y.exports.useMemo(()=>de?El(de):null,[de]),dr=Zf(),fr=Cm(b,B.draggable.measure);Um({activeNode:_?C.get(_):null,config:dr.layoutShiftCompensation,initialRect:fr,measure:B.draggable.measure});const Te=bu(b,B.draggable.measure,fr),Cn=bu(b?b.parentElement:null),dt=y.exports.useRef({activatorEvent:null,active:null,activeNode:b,collisionRect:null,collisions:null,droppableRects:De,draggableNodes:C,draggingNode:null,draggingNodeRect:null,droppableContainers:M,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),pr=M.getNodeFor((n=dt.current.over)==null?void 0:n.id),ft=Lm({measure:B.dragOverlay.measure}),ln=(r=ft.nodeRef.current)!=null?r:b,kt=S?(o=ft.rect)!=null?o:Te:null,hr=Boolean(ft.nodeRef.current&&ft.rect),Ve=Nm(hr?null:Te),It=jf(ln?Ne(ln):null),be=Dm(S?pr!=null?pr:b:null),sn=Pm(be),wo=Bf(v,{transform:{x:P.x-Ve.x,y:P.y-Ve.y,scaleX:1,scaleY:1},activatorEvent:de,active:I,activeNodeRect:Te,containerNodeRect:Cn,draggingNodeRect:kt,over:dt.current.over,overlayNodeRect:ft.rect,scrollableAncestors:be,scrollableAncestorRects:sn,windowRect:It}),Ma=ct?Gn(ct,P):null,Ra=Tm(be),Hf=ec(Ra),Kf=ec(Ra,[Te]),_n=Gn(wo,Hf),En=kt?by(kt,wo):null,yr=I&&En?h({active:I,collisionRect:En,droppableRects:De,droppableContainers:V,pointerCoordinates:Ma}):null,Pa=Xy(yr,"id"),[Ot,La]=y.exports.useState(null),Qf=hr?wo:Gn(wo,Kf),Yf=Jy(Qf,(l=Ot==null?void 0:Ot.rect)!=null?l:null,Te),Ia=y.exports.useCallback((fe,ze)=>{let{sensor:Ae,options:zt}=ze;if(U.current==null)return;const He=C.get(U.current);if(!He)return;const qe=fe.nativeEvent,pt=new Ae({active:U.current,activeNode:He,event:qe,options:zt,context:dt,onStart(et){const mr=U.current;if(mr==null)return;const vr=C.get(mr);if(!vr)return;const{onDragStart:xo}=L.current,So={active:{id:mr,data:vr.data,rect:ee}};mt.exports.unstable_batchedUpdates(()=>{xo==null||xo(So),k(Ut.Initializing),c({type:ie.DragStart,initialCoordinates:et,active:mr}),f({type:"onDragStart",event:So})})},onMove(et){c({type:ie.DragMove,coordinates:et})},onEnd:Nn(ie.DragEnd),onCancel:Nn(ie.DragCancel)});mt.exports.unstable_batchedUpdates(()=>{me(pt),T(fe.nativeEvent)});function Nn(et){return async function(){const{active:vr,collisions:xo,over:So,scrollAdjustedTranslate:za}=dt.current;let gr=null;if(vr&&za){const{cancelDrop:wr}=L.current;gr={activatorEvent:qe,active:vr,collisions:xo,delta:za,over:So},et===ie.DragEnd&&typeof wr=="function"&&await Promise.resolve(wr(gr))&&(et=ie.DragCancel)}U.current=null,mt.exports.unstable_batchedUpdates(()=>{c({type:et}),k(Ut.Uninitialized),La(null),me(null),T(null);const wr=et===ie.DragEnd?"onDragEnd":"onDragCancel";if(gr){const Zl=L.current[wr];Zl==null||Zl(gr),f({type:wr,event:gr})}})}}},[C]),Xf=y.exports.useCallback((fe,ze)=>(Ae,zt)=>{const He=Ae.nativeEvent,qe=C.get(zt);if(U.current!==null||!qe||He.dndKit||He.defaultPrevented)return;const pt={active:qe};fe(Ae,ze.options,pt)===!0&&(He.dndKit={capturedBy:ze.sensor},U.current=zt,Ia(Ae,ze))},[C,Ia]),Oa=Sm(m,Xf);Mm(m),xt(()=>{Te&&g===Ut.Initializing&&k(Ut.Initialized)},[Te,g]),y.exports.useEffect(()=>{const{onDragMove:fe}=L.current,{active:ze,activatorEvent:Ae,collisions:zt,over:He}=dt.current;if(!ze||!Ae)return;const qe={active:ze,activatorEvent:Ae,collisions:zt,delta:{x:_n.x,y:_n.y},over:He};mt.exports.unstable_batchedUpdates(()=>{fe==null||fe(qe),f({type:"onDragMove",event:qe})})},[_n.x,_n.y]),y.exports.useEffect(()=>{const{active:fe,activatorEvent:ze,collisions:Ae,droppableContainers:zt,scrollAdjustedTranslate:He}=dt.current;if(!fe||U.current==null||!ze||!He)return;const{onDragOver:qe}=L.current,pt=zt.get(Pa),Nn=pt&&pt.rect.current?{id:pt.id,rect:pt.rect.current,data:pt.data,disabled:pt.disabled}:null,et={active:fe,activatorEvent:ze,collisions:Ae,delta:{x:He.x,y:He.y},over:Nn};mt.exports.unstable_batchedUpdates(()=>{La(Nn),qe==null||qe(et),f({type:"onDragOver",event:et})})},[Pa]),xt(()=>{dt.current={activatorEvent:de,active:I,activeNode:b,collisionRect:En,collisions:yr,droppableRects:De,draggableNodes:C,draggingNode:ln,draggingNodeRect:kt,droppableContainers:M,over:Ot,scrollableAncestors:be,scrollAdjustedTranslate:_n},ee.current={initial:kt,translated:En}},[I,b,yr,En,C,ln,kt,De,M,Ot,be,_n]),vm({...dr,delta:P,draggingRect:En,pointerCoordinates:Ma,scrollableAncestors:be,scrollableAncestorRects:sn});const Gf=y.exports.useMemo(()=>({active:I,activeNode:b,activeNodeRect:Te,activatorEvent:de,collisions:yr,containerNodeRect:Cn,dragOverlay:ft,draggableNodes:C,droppableContainers:M,droppableRects:De,over:Ot,measureDroppableContainers:Se,scrollableAncestors:be,scrollableAncestorRects:sn,measuringConfiguration:B,measuringScheduled:St,windowRect:It}),[I,b,Te,de,yr,Cn,ft,C,M,De,Ot,Se,be,sn,B,St,It]),Jf=y.exports.useMemo(()=>({activatorEvent:de,activators:Oa,active:I,activeNodeRect:Te,ariaDescribedById:{draggable:O},dispatch:c,draggableNodes:C,over:Ot,measureDroppableContainers:Se}),[de,Oa,I,Te,c,O,C,Ot,Se]);return F(_f.Provider,{value:u,children:[F(go.Provider,{value:Jf,children:[E(Uf.Provider,{value:Gf,children:E(Jl.Provider,{value:Yf,children:d})}),E(Fm,{disabled:(s==null?void 0:s.restoreFocus)===!1})]}),E(Ky,{...s,hiddenTextDescribedById:O})]});function Zf(){const fe=(Oe==null?void 0:Oe.autoScrollEnabled)===!1,ze=typeof a=="object"?a.enabled===!1:a===!1,Ae=S&&!fe&&!ze;return typeof a=="object"?{...a,enabled:Ae}:{enabled:Ae}}}),Bm=y.exports.createContext(null),tc="button",Wm="Droppable";function Vm(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const l=Xl(Wm),{activators:i,activatorEvent:s,active:a,activeNodeRect:d,ariaDescribedById:m,draggableNodes:h,over:p}=y.exports.useContext(go),{role:v=tc,roleDescription:w="draggable",tabIndex:x=0}=o!=null?o:{},D=(a==null?void 0:a.id)===t,c=y.exports.useContext(D?Jl:Bm),[f,u]=kl(),[g,k]=kl(),S=Rm(i,t),_=so(n);xt(()=>(h.set(t,{id:t,key:l,node:f,activatorNode:g,data:_}),()=>{const P=h.get(t);P&&P.key===l&&h.delete(t)}),[h,t]);const C=y.exports.useMemo(()=>({role:v,tabIndex:x,"aria-disabled":r,"aria-pressed":D&&v===tc?!0:void 0,"aria-roledescription":w,"aria-describedby":m.draggable}),[r,v,x,D,w,m.draggable]);return{active:a,activatorEvent:s,activeNodeRect:d,attributes:C,isDragging:D,listeners:r?void 0:S,node:f,over:p,setNodeRef:u,setActivatorNodeRef:k,transform:c}}function Hm(){return y.exports.useContext(Uf)}const Km="Droppable",Qm={timeout:25};function Ym(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const l=Xl(Km),{active:i,dispatch:s,over:a,measureDroppableContainers:d}=y.exports.useContext(go),m=y.exports.useRef({disabled:n}),h=y.exports.useRef(!1),p=y.exports.useRef(null),v=y.exports.useRef(null),{disabled:w,updateMeasurementsFor:x,timeout:D}={...Qm,...o},c=so(x!=null?x:r),f=y.exports.useCallback(()=>{if(!h.current){h.current=!0;return}v.current!=null&&clearTimeout(v.current),v.current=setTimeout(()=>{d(Array.isArray(c.current)?c.current:[c.current]),v.current=null},D)},[D]),u=Gl({callback:f,disabled:w||!i}),g=y.exports.useCallback((C,P)=>{!u||(P&&(u.unobserve(P),h.current=!1),C&&u.observe(C))},[u]),[k,S]=kl(g),_=so(t);return y.exports.useEffect(()=>{!u||!k.current||(u.disconnect(),h.current=!1,u.observe(k.current))},[k,u]),xt(()=>(s({type:ie.RegisterDroppable,element:{id:r,key:l,disabled:n,node:k,rect:p,data:_}}),()=>s({type:ie.UnregisterDroppable,key:l,id:r})),[r]),y.exports.useEffect(()=>{n!==m.current.disabled&&(s({type:ie.SetDroppableDisabled,id:r,key:l,disabled:n}),m.current.disabled=n)},[r,l,n,s]),{active:i,rect:p,isOver:(a==null?void 0:a.id)===r,node:k,over:a,setNodeRef:S}}function Xm(e){let{animation:t,children:n}=e;const[r,o]=y.exports.useState(null),[l,i]=y.exports.useState(null),s=Cl(n);return!n&&!r&&s&&o(s),xt(()=>{if(!l)return;const a=r==null?void 0:r.key,d=r==null?void 0:r.props.id;if(a==null||d==null){o(null);return}Promise.resolve(t(d,l)).then(()=>{o(null)})},[t,r,l]),F(oe,{children:[n,r?y.exports.cloneElement(r,{ref:i}):null]})}const Gm={x:0,y:0,scaleX:1,scaleY:1};function Jm(e){let{children:t}=e;return E(go.Provider,{value:$f,children:E(Jl.Provider,{value:Gm,children:t})})}const Zm={position:"fixed",touchAction:"none"},bm=e=>_a(e)?"transform 250ms ease":void 0,qm=y.exports.forwardRef((e,t)=>{let{as:n,activatorEvent:r,adjustScale:o,children:l,className:i,rect:s,style:a,transform:d,transition:m=bm}=e;if(!s)return null;const h=o?d:{...d,scaleX:1,scaleY:1},p={...Zm,width:s.width,height:s.height,top:s.top,left:s.left,transform:rr.Transform.toString(h),transformOrigin:o&&r?Qy(r,s):void 0,transition:typeof m=="function"?m(r):m,...a};return Ps.createElement(n,{className:i,style:p,ref:t},l)}),ev=e=>t=>{let{active:n,dragOverlay:r}=t;const o={},{styles:l,className:i}=e;if(l!=null&&l.active)for(const[s,a]of Object.entries(l.active))a!==void 0&&(o[s]=n.node.style.getPropertyValue(s),n.node.style.setProperty(s,a));if(l!=null&&l.dragOverlay)for(const[s,a]of Object.entries(l.dragOverlay))a!==void 0&&r.node.style.setProperty(s,a);return i!=null&&i.active&&n.node.classList.add(i.active),i!=null&&i.dragOverlay&&r.node.classList.add(i.dragOverlay),function(){for(const[a,d]of Object.entries(o))n.node.style.setProperty(a,d);i!=null&&i.active&&n.node.classList.remove(i.active)}},tv=e=>{let{transform:{initial:t,final:n}}=e;return[{transform:rr.Transform.toString(t)},{transform:rr.Transform.toString(n)}]},nv={duration:250,easing:"ease",keyframes:tv,sideEffects:ev({styles:{active:{opacity:"0"}}})};function rv(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:o}=e;return Yl((l,i)=>{if(t===null)return;const s=n.get(l);if(!s)return;const a=s.node.current;if(!a)return;const d=Ff(i);if(!d)return;const{transform:m}=Ne(i).getComputedStyle(i),h=Nf(m);if(!h)return;const p=typeof t=="function"?t:ov(t);return If(a,o.draggable.measure),p({active:{id:l,data:s.data,node:a,rect:o.draggable.measure(a)},draggableNodes:n,dragOverlay:{node:i,rect:o.dragOverlay.measure(d)},droppableContainers:r,measuringConfiguration:o,transform:h})})}function ov(e){const{duration:t,easing:n,sideEffects:r,keyframes:o}={...nv,...e};return l=>{let{active:i,dragOverlay:s,transform:a,...d}=l;if(!t)return;const m={x:s.rect.left-i.rect.left,y:s.rect.top-i.rect.top},h={scaleX:a.scaleX!==1?i.rect.width*a.scaleX/s.rect.width:1,scaleY:a.scaleY!==1?i.rect.height*a.scaleY/s.rect.height:1},p={x:a.x-m.x,y:a.y-m.y,...h},v=o({...d,active:i,dragOverlay:s,transform:{initial:a,final:p}}),[w]=v,x=v[v.length-1];if(JSON.stringify(w)===JSON.stringify(x))return;const D=r==null?void 0:r({active:i,dragOverlay:s,...d}),c=s.node.animate(v,{duration:t,easing:n,fill:"forwards"});return new Promise(f=>{c.onfinish=()=>{D==null||D(),f()}})}}let nc=0;function lv(e){return y.exports.useMemo(()=>{if(e!=null)return nc++,nc},[e])}const rc=Ps.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:o,transition:l,modifiers:i,wrapperElement:s="div",className:a,zIndex:d=999}=e;const{activatorEvent:m,active:h,activeNodeRect:p,containerNodeRect:v,draggableNodes:w,droppableContainers:x,dragOverlay:D,over:c,measuringConfiguration:f,scrollableAncestors:u,scrollableAncestorRects:g,windowRect:k}=Hm(),S=y.exports.useContext(Jl),_=lv(h==null?void 0:h.id),C=Bf(i,{activatorEvent:m,active:h,activeNodeRect:p,containerNodeRect:v,draggingNodeRect:D.rect,over:c,overlayNodeRect:D.rect,scrollableAncestors:u,scrollableAncestorRects:g,transform:S,windowRect:k}),P=Ta(p),M=rv({config:r,draggableNodes:w,droppableContainers:x,measuringConfiguration:f}),z=P?D.setRef:void 0;return E(Jm,{children:E(Xm,{animation:M,children:h&&_?E(qm,{id:h.id,ref:z,as:s,activatorEvent:m,adjustScale:t,className:a,transition:l,rect:P,style:{zIndex:d,...o},transform:C,children:n},_):null})})}),iv="_Card_10g5x_1",sv="_Disabled_10g5x_24",av="_Money_10g5x_29",uv="_Icon_10g5x_35",cv="_Amount_10g5x_43",dv="_Shortcut_10g5x_54",fv="_Key_10g5x_72",pv="_ContextMenu_10g5x_91",hv="_OptionsList_10g5x_102",yv="_OptionListItem_10g5x_110",mv="_OptionListOption_10g5x_122",j={Card:iv,Disabled:sv,Money:av,Icon:uv,Amount:cv,Shortcut:dv,Key:fv,ContextMenu:pv,OptionsList:hv,OptionListItem:yv,OptionListOption:mv},vv="/html/icon/apartment_key.png",gv="/html/icon/license.webp",wv="/html/icon/health.webp",xv="/html/icon/identity.webp",oc="/html/icon/money.png",Sv="/html/icon/wallet.webp",kv="/html/icon/bank.webp",Cv="/html/icon/keychain.webp",_v="/html/icon/vehicle_key.png",lc={weapon_pistol:"9x19 AP",weapon_pistol_mk2:"9x19 AP",weapon_revolver_mk2:".357 Magnum",weapon_combatpistol:"9x19 AP",weapon_appistol:"9x19 AP",weapon_pistol50:".357 Magnum",weapon_snspistol:"9x19 AP",weapon_heavypistol:"9x19 AP",weapon_vintagepistol:"9x19 AP",weapon_flaregun:"Flair",weapon_marksmanpistol:"9x19 AP",weapon_revolver:".357 Magnum",weapon_doubleaction:".357 Magnum",weapon_snspistol_mk2:"9x19 AP",weapon_ceramicpistol:"9x19 AP",weapon_navyrevolver:".357 Magnum",weapon_gadgetpistol:"9x19 AP",weapon_pistolxm3:"9x19 AP",weapon_microsmg:"9x19 AP",weapon_smg:"9x19 AP",weapon_assaultsmg:"5.7x28 SB193",weapon_combatpdw:"9x19 AP",weapon_smg_mk2:"5.7x28 SB193",weapon_machinepistol:"9x19 AP",weapon_minismg:"9x19 AP",weapon_raycarbine:"Munition Alien",weapon_tecpistol:"9x19 AP",weapon_assaultrifle:"7.62x39 BP",weapon_assaultrifle_mk2:"7.62x39 BP",weapon_carbinerifle:"5.56x45 M995",weapon_carbinerifle_mk2:"5.56x45 M995",weapon_advancedrifle:"7.62x51 M62",weapon_specialcarbine:"5.56x45 M995",weapon_bullpuprifle:"5.56x45 M995",weapon_compactrifle:"5.56x45 M995",weapon_specialcarbine_mk2:"5.56x45 M995",weapon_bullpuprifle_mk2:"7.62x39 BP",weapon_militaryrifle:"7.62x51 M62",weapon_heavyrifle:"7.62x51 M62",weapon_tacticalrifle:"5.56x45 M995",weapon_pumpshotgun:"Billes caoutchouc",weapon_sawnoffshotgun:"12/70 Buckshot",weapon_assaultshotgun:"12/70 Buckshot",weapon_bullpupshotgun:"12/70 Buckshot",weapon_musket:"Lead Bullet",weapon_heavyshotgun:"12/70 Buckshot",weapon_dbshotgun:"12/70 Buckshot",weapon_autoshotgun:"12/70 Buckshot",weapon_pumpshotgun_mk2:"12/70 Buckshot",weapon_combatshotgun:"12/70 Buckshot",weapon_mg:"12,7x108 BZT-44M",weapon_combatmg:"12,7x108 BZT-44M",weapon_gusenberg:"12,7x108 BZT-44M",weapon_combatmg_mk2:"12,7x108 BZT-44M",weapon_rpg:"85mm PG-7",weapon_grenadelauncher:"40x46mm M381",weapon_grenadelauncher_smoke:"40x46mm M381",weapon_minigun:"12,7x108 BZT-44M",weapon_firework:"85mn Artifice",weapon_railgun:"Munition Alien",weapon_hominglauncher:"AIM-9X",weapon_compactlauncher:"40x46mm M381",weapon_rayminigun:"Munition Alien",weapon_emplauncher:"Munition Alien",weapon_railgunxm3:"Munition Alien",weapon_sniperrifle:".50 BMG",weapon_heavysniper:".50 BMG",weapon_heavysniper_mk2:".50 BMG",weapon_marksmanrifle:"7.62x51 M62",weapon_marksmanrifle_mk2:"7.62x51 M62",weapon_precisionrifle:".50 BMG"},ic={day:"numeric",month:"numeric",year:"numeric",hour:"numeric",minute:"numeric"},Ev={style:"currency",currency:"USD",maximumFractionDigits:0},Bn=({id:e,containerName:t,item:n,money:r,interactAction:o,wallet:l,keychain:i,onItemHover:s,price:a,undraggable:d})=>{var M,z,ee;const{attributes:m,listeners:h,setNodeRef:p,transform:v,isDragging:w}=Vm({id:`${e}_${(M=n==null?void 0:n.slot)!=null?M:""}`,data:{container:t,item:n},disabled:(n==null?void 0:n.disabled)===!0||r==-1||l==-1||i==-1}),x=y.exports.useRef(null),D=y.exports.useRef(null),[c,f]=y.exports.useState({visible:!1,posX:0,posY:0}),u={transform:rr.Translate.toString(v)},g=y.exports.useCallback(()=>s==null?void 0:s(null),[s]),k=y.exports.useCallback(()=>{var L,O,V,B,De,Se,St,b,ct,dr,fr,Te,Cn,dt,pr,ft,ln,kt,hr;if(!n)return null;let I=(L=n==null?void 0:n.metadata)!=null&&L.label?`${n.metadata.label} ${n.label}`:n.label,U="",Oe="",me="",de=0,T=n.illustrator||"";if(n.type==="weapon")(O=n==null?void 0:n.metadata)!=null&&O.ammo&&(U+=` [${n.metadata.ammo} munitions]`),lc[n.name]&&(Oe+=` Munition : ${lc[n.name]}`);else if(n.type==="fishing_rod")(V=n==null?void 0:n.metadata)!=null&&V.bait&&(U+=` [${(B=n.metadata.bait)==null?void 0:B.label}]`);else if(n.name==="bank")(De=n==null?void 0:n.metadata)!=null&&De.iban&&(U+=`[ IBAN : ${(Se=n.metadata.iban)==null?void 0:Se.replace(/.{4}/g,"$& ")}]`);else if(n.name==="chainsaw")(St=n==null?void 0:n.metadata)!=null&&St.fuel&&(U+=` [${n.metadata.fuel.toString()} L]`);else if(n.type==="fish")((b=n==null?void 0:n.metadata)==null?void 0:b.weight)&&((ct=n==null?void 0:n.metadata)==null?void 0:ct.length)&&(me+='
',me+=`Poids : ${(dr=n==null?void 0:n.metadata)==null?void 0:dr.weight} grammes `,me+=`Taille : ${(fr=n==null?void 0:n.metadata)==null?void 0:fr.length} centim\xE8tres `,me+="
");else if(n.type==="crate"&&((Cn=(Te=n.metadata)==null?void 0:Te.crateElements)==null?void 0:Cn.length))n.metadata.label&&(I=`${n.label} "${n.metadata.label}"`),n.metadata.crateElements.map(Ve=>{var be,sn;const It=new Date((sn=(be=Ve==null?void 0:Ve.metadata)==null?void 0:be.expiration)!=null?sn:"");me+=`
- ${Ve.amount} ${Ve.label} [DLC: ${It.toLocaleDateString("fr-FR",ic)}]`,de=de+Ve.amount*Ve.weight}),U=`[${de/1e3}/12 Kg]`;else if((dt=n==null?void 0:n.metadata)!=null&&dt.expiration){const Ve=new Date().getTime(),It=new Date(n.metadata.expiration);Ve>It.getTime()?U+=" [P\xE9rim\xE9]":U+=` [DLC: ${It.toLocaleDateString("fr-FR",ic)}]`}else((pr=n==null?void 0:n.metadata)==null?void 0:pr.type)&&!((ft=n==null?void 0:n.metadata)!=null&&ft.label)&&(U+=` [${(ln=n==null?void 0:n.metadata)==null?void 0:ln.type}]`);(kt=n==null?void 0:n.metadata)!=null&&kt.crafted&&(U+=" [Ill\xE9gal]"),n.illustrator&&n.illustrator instanceof Object&&(n.name==="outfit"||n.name==="armor")&&(T=n.illustrator[((hr=n==null?void 0:n.metadata)==null?void 0:hr.type)||""]||""),s==null||s(`
${I} ${U}
${n.description?n.description:""}
${me}
${Oe} ${T}
- `)},[n,s]),S=y.exports.useCallback(I=>{x.current&&x.current.contains(I.target)?(I.preventDefault(),f({visible:!0,posX:I.clientX,posY:I.clientY})):D.current&&!D.current.contains(I.target)&&f({...c,visible:!1})},[x,D,f]),_=y.exports.useCallback(I=>{D.current&&!D.current.contains(I.target)&&f({...c,visible:!1})},[D,f]);y.exports.useEffect(()=>(window.addEventListener("click",_),window.addEventListener("contextmenu",S),()=>{window.removeEventListener("click",_),window.removeEventListener("contextmenu",S)}),[_,S]);const C=(I,U)=>()=>{f({...c,visible:!1}),o(I,n,U)},P=y.exports.useCallback(I=>{var Oe,me;let U=I.name;return I.name==="vehicle_key"?Ev:I.name==="apartment_key"?gv:I.name==="health"?xv:I.name==="license"?wv:I.name==="identity"?Sv:I.name==="bank"?Cv:(I.name==="outfit"||I.name==="armor"?U+=`_${(Oe=I.metadata)==null?void 0:Oe.type}`:I.name==="cabinet_zkea"&&(U+=`_${(me=I.metadata)==null?void 0:me.tier}`),`https://cfx-nui-soz-core/public/images/items/${U}.webp`)},[]);if(!n&&!r&&!l&&!i)return null;if(w&&!d){if(n)return mt.exports.createPortal(E(rc,{className:j.Card,children:E("img",{alt:"",className:j.Icon,src:P(n),onError:I=>I.currentTarget.src="https://placekitten.com/200/200"})}),document.body);if(r)return mt.exports.createPortal(E(rc,{className:j.Card,children:E("img",{alt:"",className:j.Icon,src:oc})}),document.body)}return F("div",{ref:x,className:at({[j.Money]:!!r}),children:[F("div",{ref:p,style:u,...h,...m,className:at(j.Card,{[j.Disabled]:(n==null?void 0:n.disabled)===!0||r&&r<0||l&&l<0||i&&i<0}),onMouseEnter:k,onMouseLeave:g,children:[n&&F(oe,{children:[a?F("span",{className:j.Amount,children:[a>1&&a," $"]}):E("span",{className:j.Amount,children:n.amount>1&&n.amount}),(n==null?void 0:n.shortcut)&&E("span",{className:j.Shortcut,children:n==null?void 0:n.shortcut}),(n==null?void 0:n.name)=="vehicle_key"&&E("span",{className:j.Key,children:n==null?void 0:n.label.replace("V\xE9hicule ","")}),E("img",{alt:"",className:j.Icon,src:P(n),onError:I=>I.currentTarget.src="https://placekitten.com/200/200"})]}),r&&F(oe,{children:[E("span",{className:j.Amount,children:r>=0&&r.toLocaleString("en-US",Nv)}),E("img",{alt:"",className:j.Icon,src:oc})]}),l&&F(oe,{children:[E("span",{className:j.Amount,children:"Portefeuille"}),E("img",{alt:"",className:j.Icon,src:kv})]}),i&&F(oe,{children:[E("span",{className:j.Amount,children:"Trousseau"}),E("img",{alt:"",className:j.Icon,src:_v})]})]}),o&&E("div",{ref:D,className:j.ContextMenu,style:{display:`${c.visible?"block":"none"}`,left:c.posX,top:c.posY},children:F("div",{className:j.OptionsList,children:[n&&(n.useable||n.type==="weapon")&&E("li",{className:j.OptionListItem,onClick:C("useItem"),children:n.type==="weapon"?"\xC9quiper":n.usableLabel||"Utiliser"}),n&&n.type!=="card"&&E("li",{className:j.OptionListItem,onClick:C("giveItem"),children:n.giveLabel||"Donner"}),n&&n.type==="weapon"&&F(oe,{children:[E("li",{className:j.OptionListItem,onClick:C("setItemUsage",1),children:"D\xE9finir comme arme principale"}),E("li",{className:j.OptionListItem,onClick:C("setItemUsage",2),children:"D\xE9finir comme arme secondaire"})]}),n&&n.type==="crate"&&((ee=(z=n.metadata)==null?void 0:z.crateElements)==null?void 0:ee.length)&&E("li",{className:j.OptionListItem,onClick:C("renameItem"),children:"Renommer"}),n&&n.useable&&n.type!=="weapon"&&E(oe,{children:F("li",{className:j.OptionListItem,children:["Raccourci d'utilisation",E("div",{children:Array(8).fill(1).map(function(I,U){const Oe=U+3===10?0:U+3;return E("p",{className:j.OptionListOption,onClick:C("setItemUsage",Oe),children:Oe})})})]})}),r&&F(oe,{children:[E("li",{className:j.OptionListItem,onClick:C("giveMoney"),children:"Donner en propre"}),E("li",{className:j.OptionListItem,onClick:C("giveMarkedMoney"),children:"Donner en sale"})]}),l&&E(oe,{children:E("li",{className:j.OptionListItem,onClick:C("openPlayerWalletInventory"),children:"Ouvrir le portefeuille"})}),i&&E(oe,{children:E("li",{className:j.OptionListItem,onClick:C("openPlayerKeyInventory"),children:"Ouvrir le trousseau"})}),n&&n.type==="card"&&F(oe,{children:[E("li",{className:j.OptionListItem,onClick:C("showCard"),children:"Montrer"}),E("li",{className:j.OptionListItem,onClick:C("seeCard"),children:"Regarder"})]})]})})]})},Dv="_Card_qbn2z_1",Tv="_CardHover_qbn2z_7",sc={Card:Dv,CardHover:Tv},Wn=({id:e,slot:t,containerName:n,children:r})=>{const{isOver:o,setNodeRef:l}=Xm({id:e,data:{container:n,slot:t}});return E("div",{ref:l,className:at(sc.Card,{[sc.CardHover]:o}),children:r})},or=({id:e,columns:t=5,rows:n,items:r,money:o,wallet:l,keychain:i,action:s})=>{const[a,d]=y.exports.useState(""),[m,h]=y.exports.useState({}),p=y.exports.useCallback(v=>w=>h(x=>({...x,[v]:w})),[h]);return y.exports.useEffect(()=>{d(null)},[r]),F(oe,{children:[F("div",{className:Ku.Wrapper,style:{gridTemplateColumns:`repeat(${t}, 1fr)`,gridTemplateRows:`repeat(${n+1}, 1fr)`},children:[o&&E(Wn,{id:`${e}_money`,containerName:e,slot:0,children:E(Bn,{id:`${e}_drag_money`,containerName:e,money:o,interactAction:s},0)},"money"),l&&E(Wn,{id:`${e}_wallet`,containerName:e,slot:1,children:E(Bn,{id:`${e}_drag_wallet`,containerName:e,wallet:l,interactAction:s,undraggable:!0},0)},"wallet"),i&&E(Wn,{id:`${e}_keychain`,containerName:e,slot:2,children:E(Bn,{id:`${e}_drag_keychain`,containerName:e,keychain:i,interactAction:s,undraggable:!0},0)},"keychain"),[...Array(t*(n+1)-(o?3:0))].map((v,w)=>E(Wn,{id:`${e}_${w-1}`,containerName:e,slot:w+1,children:E(Bn,{id:`${e}_drag`,containerName:e,item:r.find(x=>x.slot-1===w),setInContext:p(w),interactAction:s,onItemHover:d},w)},w))]}),a&&E("footer",{className:Ku.Description,dangerouslySetInnerHTML:{__html:a}})]})},Mv="/html/banner/inventory_banner.png";function te(e,t={}){fetch("https://soz-inventory/closeNUI",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(t)}).then(e())}const Tl=e=>{if(!e||e.length===0)return 0;const t=e.filter(n=>n!==null).sort((n,r)=>r.slot-n.slot)[0].slot;return Math.ceil(t/5)},Bf=(e,t)=>{fetch("https://soz-inventory/sortInventoryAZ",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({inventory:e})}).then(n=>n.json()).then(n=>{typeof n.sourceInventory=="object"&&(n.sourceInventory.items=Object.values(n.sourceInventory.items)),n.sourceInventory.items=n.sourceInventory.items.filter(r=>r!==null),t(n.sourceInventory)}).catch(n=>{console.error("Failed to sort inventory",n)})},Ns=e=>{if(!!e)return(e==null?void 0:e.ctrlKey)==!0&&(e==null?void 0:e.altKey)==!1?"CTRL":(e==null?void 0:e.ctrlKey)==!1&&(e==null?void 0:e.altKey)==!0?"ALT":"NONE"},Rv=()=>{const[e,t]=y.exports.useState(!1),n=y.exports.useRef(null),[r,o]=y.exports.useState(0),[l,i]=y.exports.useState(),[s,a]=y.exports.useState(),d=y.exports.useCallback(()=>{t(!1),i(null),a([])},[t,i,a]),m=y.exports.useCallback((c,f,u)=>{fetch(`https://soz-inventory/player/${c}`,{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({...f,shortcut:u})}).then(()=>te(()=>d()))},[d]),h=y.exports.useCallback(c=>{e&&n.current&&!n.current.contains(c.target)&&(c.preventDefault(),te(()=>d()))},[n,e,d]),p=y.exports.useCallback(c=>{if(c.data.action==="openPlayerInventory"){if(c.data.playerInventory===void 0)return;try{typeof c.data.playerInventory=="object"&&(c.data.playerInventory.items=Object.values(c.data.playerInventory.items)),c.data.playerInventory.items=c.data.playerInventory.items.filter(f=>f!==null),i(c.data.playerInventory),o(c.data.playerMoney||-1),a(c.data.playerShortcuts),t(!0)}catch(f){console.error(f,c.data.playerInventory,c.data.playerMoney),te(()=>d())}}else e&&c.data.action==="closeInventory"?te(()=>d()):(c.data.action==="openShop"||c.data.action==="openInventory"||c.data.action==="openPlayerKeyInventory"||c.data.action==="openPlayerWalletInventory")&&d()},[t,d,o,i,a,e]),v=y.exports.useCallback(c=>{e&&!c.repeat&&(c.key==="Escape"||c.key==="F2")&&te(()=>d())},[e,d]),w=y.exports.useCallback(c=>{if(!c.active.data.current)return;const f=c==null?void 0:c.activatorEvent;if(c.over!==null){if(c.active.id=="player_drag_keychain_"||c.over.id=="player_keychain"||c.active.id=="player_drag_wallet_"||c.over.id=="player_wallet"||c.active.id=="player_drag_money_"||c.over.id=="player_money")return;fetch("https://soz-inventory/sortItem",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({item:c.active.data.current.item,slot:c.over.data.current.slot,inventory:l==null?void 0:l.id,keyModifier:Ns(f)})}).then(u=>u.json()).then(u=>{typeof u.sourceInventory=="object"&&(u.sourceInventory.items=Object.values(u.sourceInventory.items)),u.sourceInventory.items=u.sourceInventory.items.filter(g=>g!==null),i(u.sourceInventory)}).catch(u=>{console.error("Failed to sort item",u)})}else c.active.id=="player_drag_money_"?fetch("https://soz-inventory/player/giveMoneyToTarget",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"}}).then(()=>te(()=>d())):fetch("https://soz-inventory/player/giveItemToTarget",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(c.active.data.current.item)}).then(()=>te(()=>d()))},[l,d]),x=y.exports.useCallback(c=>{var u;if(!c)return null;const f=(u=Object.entries(s||{}))==null?void 0:u.find(([g,k])=>{if(k===null)return!1;const S=Object.values(c.metadata||{}),_=Object.values((k==null?void 0:k.metadata)||{});return k.name===c.name&&_.every(C=>S.includes(C))});return f?f[0]:null},[s]);y.exports.useEffect(()=>(window.addEventListener("contextmenu",h),window.addEventListener("message",p),window.addEventListener("keydown",v),()=>{window.removeEventListener("contextmenu",h),window.removeEventListener("message",p),window.removeEventListener("keydown",v)}),[h,p,v]);const D=y.exports.useMemo(()=>Tl((l==null?void 0:l.items)||[]),[l]);return l?E(cr,{autoScroll:{enabled:!1},collisionDetection:kn,onDragEnd:w,children:e&&E("div",{className:at(My.Wrapper),children:E(tn,{display:!0,banner:Mv,weight:l.weight,maxWeight:l.maxWeight,sortCallback:()=>Bf(l.id,i),children:E(or,{id:"player",rows:D,money:r,wallet:1,keychain:1,items:l.items.map((c,f)=>({...c,id:f,shortcut:x(c)})),action:m})})})}):null},Pv="_Wrapper_ybyzp_1",Lv="_PlayerContainer_ybyzp_12",Iv="_StorageContainer_ybyzp_18",Mi={Wrapper:Pv,PlayerContainer:Lv,StorageContainer:Iv},Wf="/html/banner/player.jpg",Ov=()=>{const[e,t]=y.exports.useState(!1),[n,r]=y.exports.useState(0),[o,l]=y.exports.useState(0),[i,s]=y.exports.useState(),[a,d]=y.exports.useState(),m=y.exports.useCallback(()=>{t(!1),s(null),d(null)},[t,s,d]),h=y.exports.useMemo(()=>{let u=(a==null?void 0:a.type)||"default";return u==="stash"&&(u="storage"),u==="ammo"&&(u="armory"),u==="tanker"&&(u="trunk"),u==="trailerlogs"&&(u="trunk"),u==="brickade"&&(u="trunk"),u==="trash"&&(u="trunk"),u==="tiptruck"&&(u="trunk"),u==="metal_storage"&&(u="default"),u==="storage"&&(u="default"),u==="storage_tank"&&(u="default"),`/html/banner/${u}.jpg`},[a==null?void 0:a.type]),p=y.exports.useCallback(u=>{if(u.data.action==="openInventory"){if(u.data.playerInventory===void 0||u.data.targetInventory===void 0)return;try{typeof u.data.playerInventory=="object"&&(u.data.playerInventory.items=Object.values(u.data.playerInventory.items)),typeof u.data.targetInventory=="object"&&(u.data.targetInventory.items=Object.values(u.data.targetInventory.items)),u.data.playerInventory.items=u.data.playerInventory.items.filter(g=>g!==null),u.data.targetInventory.items=u.data.targetInventory.items.filter(g=>g!==null),s(u.data.playerInventory),d(u.data.targetInventory),u.data.targetInventory.type=="player"?(r(u.data.playerMoney||-1),l(u.data.targetMoney||-1)):(r(-1),l(void 0)),t(!0)}catch(g){console.error(g,u.data.playerInventory,u.data.targetInventory),te(()=>{m()},{target:a==null?void 0:a.id})}}else if(u.data.action==="updateInventory")try{u.data.playerInventory!==void 0&&(typeof u.data.playerInventory=="object"&&(u.data.playerInventory.items=Object.values(u.data.playerInventory.items)),u.data.playerInventory.items=u.data.playerInventory.items.filter(g=>g!==null),s(u.data.playerInventory)),u.data.targetInventory!==void 0&&(typeof u.data.targetInventory=="object"&&(u.data.targetInventory.items=Object.values(u.data.targetInventory.items)),u.data.targetInventory.items=u.data.targetInventory.items.filter(g=>g!==null),d(u.data.targetInventory))}catch(g){console.error(g,u.data.playerInventory,u.data.targetInventory),te(()=>{m()},{target:a==null?void 0:a.id})}else e&&u.data.action==="closeInventory"?te(()=>{m()},{target:a==null?void 0:a.id}):(u.data.action==="openShop"||u.data.action==="openInventory"||u.data.action==="openPlayerKeyInventory"||u.data.action==="openPlayerWalletInventory")&&m()},[m,s,d,r,l,e]),v=y.exports.useCallback(u=>{e&&!u.repeat&&u.key==="Escape"&&fetch("https://soz-inventory/closeNUI",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({target:a==null?void 0:a.id})}).then(()=>{m()})},[a,m,e]),w=y.exports.useCallback(u=>{if(!u.sourceInventory||!u.targetInventory||u.sourceInventory.id===u.targetInventory.id)return;let g=u.sourceInventory,k=u.targetInventory;u.inverse&&(g=u.targetInventory,k=u.sourceInventory),s(g),d(k)},[s,d]),x=y.exports.useCallback(u=>{u.inverse?(r(u.targetMoney||-1),l(u.sourceMoney||-1)):(r(u.sourceMoney||-1),l(u.targetMoney||-1))},[r,l]),D=y.exports.useCallback(u=>{var k;if(!u.active.data.current||!((k=u.over)!=null&&k.data.current))return;const g=u==null?void 0:u.activatorEvent;if(u.active.id=="player_drag_money_"){if(u.over.data.current.container==="player")return;fetch("https://soz-inventory/transfertMoney",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({target:a==null?void 0:a.id})}).then(S=>S.json()).then(S=>x(S))}else if(u.active.id=="storage_drag_money_"){if(u.over.data.current.container==="storage")return;fetch("https://soz-inventory/transfertMoney",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({target:a==null?void 0:a.id,inverse:!0})}).then(S=>S.json()).then(S=>x(S))}else if(u.active.data.current.container===u.over.data.current.container){if(u.active.id=="player_drag_money_"||u.over.id=="player_money"||u.active.id=="storage_drag_money_"||u.over.id=="storage_money")return;fetch("https://soz-inventory/sortItem",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({item:u.active.data.current.item,slot:u.over.data.current.slot,inventory:u.active.data.current.container==="player"?i==null?void 0:i.id:a==null?void 0:a.id,manualFilter:u.active.data.current.container==="player"&&(a==null?void 0:a.type),keyModifier:Ns(g)})}).then(S=>S.json()).then(S=>{var _;typeof S.sourceInventory=="object"&&(S.sourceInventory.items=Object.values(S.sourceInventory.items)),S.sourceInventory.items=S.sourceInventory.items.filter(C=>C!==null),((_=u.active.data.current)==null?void 0:_.container)==="player"?s(S.sourceInventory):d(S.sourceInventory)}).catch(S=>{console.error("Failed to sort item",S)})}else{if(u.active.id=="player_drag_money_"||u.over.id=="player_money"||u.active.id=="storage_drag_money_"||u.over.id=="storage_money")return;const S=u.active.data.current.container==="player"?i==null?void 0:i.id:a==null?void 0:a.id,_=u.over.data.current.container==="player"?i==null?void 0:i.id:a==null?void 0:a.id,C=u.active.data.current.container==="storage",P=u.over.data.current.container==="player"?i==null?void 0:i.maxWeight:a==null?void 0:a.maxWeight,M=u.over.data.current.container==="player"?i==null?void 0:i.weight:a==null?void 0:a.weight;fetch("https://soz-inventory/transfertItem",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({source:S,target:_,targetCurrentWeight:M,targetMaxWeight:P,item:u.active.data.current.item,slot:u.over.data.current.slot,keyModifier:Ns(g)})}).then(z=>z.json()).then(z=>w({...z,inverse:C}))}},[i,a,s,d]);y.exports.useEffect(()=>(window.addEventListener("message",p),window.addEventListener("keydown",v),()=>{window.removeEventListener("message",p),window.removeEventListener("keydown",v)}),[p,v]);const c=y.exports.useMemo(()=>Tl((i==null?void 0:i.items)||[]),[i]),f=y.exports.useMemo(()=>Tl((a==null?void 0:a.items)||[]),[a]);return!i||!a?null:E("div",{className:Mi.Wrapper,children:e&&F(cr,{autoScroll:{enabled:!1},collisionDetection:kn,onDragEnd:D,children:[E("div",{className:at(Mi.PlayerContainer),children:E(tn,{display:!0,banner:Wf,weight:i.weight,maxWeight:i.maxWeight,children:E(or,{id:"player",rows:c,money:n,wallet:-1,keychain:-1,items:i.items.map((u,g)=>({...u,id:g}))})})}),E("div",{className:at(Mi.StorageContainer),children:E(tn,{display:!0,banner:h,weight:a.weight,maxWeight:a.maxWeight,sortCallback:()=>Bf(a.id,d),children:E(or,{id:"storage",rows:f,money:o,items:a.items.map((u,g)=>({...u,id:g}))})})})]})})},zv="_Wrapper_1qz33_1",Av={Wrapper:zv},jv="/html/banner/keychain_banner.png",Fv=()=>{const[e,t]=y.exports.useState(!1),n=y.exports.useRef(null),[r,o]=y.exports.useState([]),l=y.exports.useCallback(()=>{t(!1),o(null)},[t,o]),i=y.exports.useCallback(v=>{!v.active.data.current||fetch("https://soz-inventory/player/giveKeyToTarget",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(v.active.data.current.item)}).then()},[l]),s=y.exports.useCallback(v=>{fetch("https://soz-inventory/player/giveAllVehicleKeysToTarget",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(v)}).then()},[l]),a=y.exports.useCallback(v=>{fetch("https://soz-inventory/player/giveAllAppartmentKeysToTarget",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(v)}).then()},[l]),d=y.exports.useCallback(v=>{if(v.data.action==="openPlayerKeyInventory"){if(v.data.keys===void 0)return;o(v.data.keys.filter(w=>w!==null).map(w=>({...w,id:`key_${w.slot}`}))),t(!0)}else(v.data.action==="openShop"||v.data.action==="openInventory"||v.data.action==="openPlayerInventory"||v.data.action==="openPlayerWalletInventory")&&l()},[t,o]),m=y.exports.useCallback(v=>{e&&n.current&&!n.current.contains(v.target)&&(v.preventDefault(),te(()=>l()))},[n,e,l]),h=y.exports.useCallback(v=>{e&&!v.repeat&&(v.key==="Escape"||v.key==="F2")&&te(()=>l())},[e,l]);y.exports.useEffect(()=>(window.addEventListener("contextmenu",m),window.addEventListener("message",d),window.addEventListener("keydown",h),()=>{window.removeEventListener("contextmenu",m),window.removeEventListener("message",d),window.removeEventListener("keydown",h)}),[m,d,h]);const p=y.exports.useMemo(()=>Math.floor((r||[]).length/5),[r]);return r?E(oe,{children:e&&E(cr,{autoScroll:{enabled:!1},collisionDetection:kn,onDragEnd:i,children:E("div",{className:at(Av.Wrapper),children:E(tn,{display:!0,banner:jv,maxWeight:-1,giveAllAppartmentKeysCallback:()=>a(r.map((v,w)=>({...v,id:w,slot:w+1,type:"key"}))),giveAllVehicleKeysCallback:()=>s(r.map((v,w)=>({...v,id:w,slot:w+1,type:"key"}))),children:E(or,{id:"player",rows:p,items:r.map((v,w)=>({...v,id:w,slot:w+1,type:"key"}))})})})})}):null},$v="_Wrapper_1qz33_1",Uv={Wrapper:$v},Bv="/html/banner/wallet_banner.png",Wv=()=>{const[e,t]=y.exports.useState(!1),n=y.exports.useRef(null),[r,o]=y.exports.useState([]),l=y.exports.useCallback(()=>{t(!1),o(null)},[t,o]),i=y.exports.useCallback(p=>{!p.active.data.current||fetch("https://soz-inventory/player/showCard",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(p.active.data.current.item)}).then()},[]),s=y.exports.useCallback((p,v,w)=>{fetch(`https://soz-inventory/player/${p}`,{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({...v,shortcut:w})}).then()},[]),a=y.exports.useCallback(p=>{if(p.data.action==="openPlayerWalletInventory"){if(p.data.cards===void 0)return;o(p.data.cards.filter(v=>v!==null).map(v=>({...v,id:`key_${v.slot}`}))),t(!0)}else(p.data.action==="openShop"||p.data.action==="openInventory"||p.data.action==="openPlayerInventory"||p.data.action==="openPlayerKeyInventory")&&l()},[t,o]),d=y.exports.useCallback(p=>{e&&!p.repeat&&(p.key==="Escape"||p.key==="F2")&&te(()=>l())},[e,l]),m=y.exports.useCallback(p=>{e&&n.current&&!n.current.contains(p.target)&&(p.preventDefault(),te(()=>l()))},[n,e,l]);y.exports.useEffect(()=>(window.addEventListener("contextmenu",m),window.addEventListener("message",a),window.addEventListener("keydown",d),()=>{window.removeEventListener("contextmenu",m),window.removeEventListener("message",a),window.removeEventListener("keydown",d)}),[m,a,d]);const h=y.exports.useMemo(()=>Math.floor((r||[]).length/5),[r]);return r?E(oe,{children:e&&E(cr,{autoScroll:{enabled:!1},collisionDetection:kn,onDragEnd:i,children:E("div",{className:at(Uv.Wrapper),children:E(tn,{display:!0,banner:Bv,maxWeight:-1,children:E(or,{id:"player",rows:h,items:r.map((p,v)=>({...p,id:v,slot:v+1,type:"card"})),action:s})})})})}):null},Vv="_Wrapper_1qz33_1",Hv={Wrapper:Vv},Kv=()=>{const[e,t]=y.exports.useState(!1),n=y.exports.useRef(null);let r=0;const[o,l]=y.exports.useState([]),i=y.exports.useCallback(()=>{t(!1),l(null)},[t,l]),s=y.exports.useCallback(p=>{!p.active.data.current||fetch("https://soz-inventory/player/forceconsume",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({item:p.active.data.current.item,targetId:r})}).then(()=>{te(()=>i())})},[i]),a=y.exports.useCallback(p=>{if(p.data.action==="openForceConsume")try{typeof p.data.playerInventory=="object"&&(p.data.playerInventory.items=Object.values(p.data.playerInventory.items)),l(p.data.playerInventory.items.filter(v=>v!==null).map(v=>({...v,disabled:v.type!="food"&&v.type!="drink"&&v.type!="cocktail"&&v.type!="liquor"&&v.type!="drug"}))),r=p.data.targetId,t(!0)}catch(v){console.error(v,p.data.playerInventory,JSON.stringify(p.data.playerInventory)),te(()=>i())}},[t,l]),d=y.exports.useCallback(p=>{e&&!p.repeat&&p.key==="Escape"&&te(()=>i())},[e,i]),m=y.exports.useCallback(p=>{e&&n.current&&!n.current.contains(p.target)&&(p.preventDefault(),te(()=>i()))},[n,e,i]);y.exports.useEffect(()=>(window.addEventListener("contextmenu",m),window.addEventListener("message",a),window.addEventListener("keydown",d),()=>{window.removeEventListener("contextmenu",m),window.removeEventListener("message",a),window.removeEventListener("keydown",d)}),[m,a,d]);const h=y.exports.useMemo(()=>Tl(o||[]),[o]);return o?E(oe,{children:e&&E(cr,{autoScroll:{enabled:!1},collisionDetection:kn,onDragEnd:s,children:e&&E("div",{className:at(Hv.Wrapper),children:E(tn,{display:!0,banner:Wf,maxWeight:-1,children:E(or,{id:"player",rows:h,items:o.map((p,v)=>({...p,id:v})),money:-1,wallet:-1,keychain:-1})})})})}):null},Qv="_Wrapper_hjlc5_1",Yv="_CartContainer_hjlc5_12",ac={Wrapper:Qv,CartContainer:Yv},Xv="_Wrapper_1ynup_1",Gv="_Description_1ynup_22",uc={Wrapper:Xv,Description:Gv},Jv=({id:e,columns:t=5,rows:n,items:r,action:o})=>{const[l,i]=y.exports.useState(""),[s,a]=y.exports.useState({}),d=y.exports.useCallback(m=>h=>a(p=>({...p,[m]:h})),[a]);return y.exports.useEffect(()=>{i(null)},[r]),F(oe,{children:[E("div",{className:uc.Wrapper,style:{gridTemplateColumns:`repeat(${t}, 1fr)`,gridTemplateRows:`repeat(${n+1}, 1fr)`},children:[...Array(t*(n+1))].map((m,h)=>{var p;return E(Wn,{id:`${e}_${h-1}`,containerName:e,slot:h+1,children:E(Bn,{id:`${e}_drag`,containerName:e,item:r.find(v=>v.slot-1===h),setInContext:d(h),interactAction:o,onItemHover:i,price:(p=r.find(v=>v.slot-1===h))==null?void 0:p.price},h)},h)})}),l&&E("footer",{className:uc.Description,dangerouslySetInnerHTML:{__html:l}})]})},cc=e=>!e||e.length===0?0:(e.filter(t=>t!==null).sort((t,n)=>n.slot-t.slot)[0].slot,Math.ceil(e.length/5)),bv="_Wrapper_y08hc_1",Zv="_CartHeader_y08hc_15",qv="_CartHeaderIcon_y08hc_28",eg="_CartFooter_y08hc_34",tg="_CartButton_y08hc_54",ng="_Description_y08hc_87",Tn={Wrapper:bv,CartHeader:Zv,CartHeaderIcon:qv,CartFooter:eg,CartButton:tg,Description:ng};function rg({title:e,titleId:t,...n},r){return F("svg",{...Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true",ref:r,"aria-labelledby":t},n),children:[e?E("title",{id:t,children:e}):null,E("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 10.5V6a3.75 3.75 0 10-7.5 0v4.5m11.356-1.993l1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 01-1.12-1.243l1.264-12A1.125 1.125 0 015.513 7.5h12.974c.576 0 1.059.435 1.119 1.007zM8.625 10.5a.375.375 0 11-.75 0 .375.375 0 01.75 0zm7.5 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})]})}const og=y.exports.forwardRef(rg),lg=og,ig=({id:e,columns:t=5,rows:n,items:r,validateAction:o,cartAmount:l,cartContent:i})=>{var p;const[s,a]=y.exports.useState(""),[d,m]=y.exports.useState({}),h=y.exports.useCallback(v=>w=>m(x=>({...x,[v]:w})),[m]);return y.exports.useEffect(()=>{a(null)},[r]),F(oe,{children:[F("div",{className:Tn.CartHeader,children:[E(lg,{className:Tn.CartHeaderIcon}),E("p",{children:"Glisse et d\xE9pose dans ton panier"})]}),E("div",{className:Tn.Wrapper,style:{gridTemplateColumns:`repeat(${t}, 1fr)`,gridTemplateRows:`repeat(${n+1}, 1fr)`},children:[...Array(t*(n+1)-0)].map((v,w)=>E(Wn,{id:`${e}_${w-1}`,containerName:e,slot:w+1,children:E(Bn,{id:`${e}_drag`,containerName:e,item:r.find(x=>x.slot-1===w),setInContext:h(w)},w)},w))}),F("div",{className:Tn.CartFooter,children:[F("p",{children:["PRIX : ",(p=l.toLocaleString("fr-fr"))!=null?p:l," $"]}),E("button",{disabled:l==0,className:Tn.CartButton,onClick:()=>{o(i)},children:"Acheter"})]}),s&&E("footer",{className:Tn.Description,dangerouslySetInnerHTML:{__html:s}})]})},sg=()=>{const[e,t]=y.exports.useState(!1),[n,r]=y.exports.useState(0),[o,l]=y.exports.useState(),[i,s]=y.exports.useState([]),[a,d]=y.exports.useState(""),m=y.exports.useCallback(()=>{t(!1),l(null),s([]),r(0)},[l,s,r,t]),h=y.exports.useCallback(c=>{if(c.data.action==="openShop"){if(c.data.shopContent===void 0)return;try{l(c.data.shopContent),d(c.data.shopHeaderTexture),t(!0)}catch{te(()=>{m()})}}else(c.data.action==="openPlayerInventory"||c.data.action==="openInventory"||c.data.action==="openPlayerKeyInventory"||c.data.action==="openPlayerWalletInventory")&&m()},[m,l]),p=y.exports.useCallback(c=>{e&&!c.repeat&&c.key==="Escape"&&te(()=>{m()})},[m,e]),v=c=>c.reduce((f,u)=>f+u.amount*u.price,0),w=y.exports.useCallback(c=>{fetch("https://soz-inventory/player/validateCart",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(c)}).then(()=>{te(()=>m())})},[m]),x=y.exports.useCallback(c=>{var f;if(!!c.active.data.current){if(c.active.data.current.container==="cart"&&!c.over){const u=c.active.data.current.item;s(g=>g.filter(k=>k.slot!==u.slot)),r(n-u.amount*u.price);return}if(!!((f=c.over)!=null&&f.data.current)&&(c==null||c.activatorEvent,!(c.over.data.current.container==="shop"&&c.active.data.current.container==="shop"))){if(c.over.data.current.container==="cart"&&c.active.data.current.container==="cart"){if(i.find(k=>{var S,_,C;return k.slot==((C=(_=(S=c==null?void 0:c.over)==null?void 0:S.data)==null?void 0:_.current)==null?void 0:C.slot)}))return;let u=c.active.data.current.item;s(k=>k.filter(S=>S.slot!==u.slot));let g=structuredClone(c.active.data.current.item);g.slot=c.over.data.current.slot,s(k=>[...k,g]);return}if(c.active.data.current.container==="cart"&&c.over.data.current.container==="shop"){const u=c.active.data.current.item;s(g=>g.filter(k=>k.slot!==u.slot)),r(n-u.amount*u.price);return}if(c.active.data.current.container==="shop"&&c.over.data.current.container==="cart"){let u=structuredClone(c.active.data.current.item);u.slot=c.over.data.current.slot;const g=i.find(S=>{var _,C;return S.name==u.name&&((_=S.metadata)==null?void 0:_.label)===((C=u.metadata)==null?void 0:C.label)}),k=i.find(S=>{var _,C,P;return S.slot==((P=(C=(_=c==null?void 0:c.over)==null?void 0:_.data)==null?void 0:C.current)==null?void 0:P.slot)});if(!g&&k)return;fetch("https://soz-inventory/player/askForAmount",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({})}).then(S=>S.json()).then(S=>{const _=parseInt(S);if(isNaN(_)||_<=0)return;u.amount=_;let C=n+u.amount*u.price,P=[];g&&(P=i.map(M=>{var z,ee;return M.name===u.name&&((z=M.metadata)==null?void 0:z.label)===((ee=u.metadata)==null?void 0:ee.label)?{...M,amount:M.amount+u.amount}:M}),C=v(i)+u.price*u.amount),s(g?P:M=>[...M,u]),r(C)})}}}},[o,i,s,l]);y.exports.useEffect(()=>(window.addEventListener("message",h),window.addEventListener("keydown",p),()=>{window.removeEventListener("message",h),window.removeEventListener("keydown",p)}),[h,p]);const D=y.exports.useMemo(()=>cc(o||[]),[o]);return y.exports.useMemo(()=>cc(o||[]),[i]),o?E("div",{className:ac.Wrapper,children:e&&E(cr,{autoScroll:{enabled:!1},collisionDetection:kn,onDragEnd:x,children:E("div",{className:at(ac.StorageContainer),children:F(tn,{display:!0,banner:`https://nui-img/soz/${a}`,maxWeight:-1,children:[E(Jv,{id:"shop",rows:D,items:o.map((c,f)=>({...c,id:f}))}),E(ig,{cartAmount:n,cartContent:i,id:"cart",rows:2,items:i.map((c,f)=>({...c,id:f})),validateAction:w})]})})})}):null};Ri.createRoot(document.getElementById("app")).render(F(Ps.StrictMode,{children:[E(Rv,{}),E(Ov,{}),E(sg,{}),E(Fv,{}),E(Wv,{}),E(Kv,{})]})); + `)},[n,s]),S=y.exports.useCallback(I=>{x.current&&x.current.contains(I.target)?(I.preventDefault(),f({visible:!0,posX:I.clientX,posY:I.clientY})):D.current&&!D.current.contains(I.target)&&f({...c,visible:!1})},[x,D,f]),_=y.exports.useCallback(I=>{D.current&&!D.current.contains(I.target)&&f({...c,visible:!1})},[D,f]);y.exports.useEffect(()=>(window.addEventListener("click",_),window.addEventListener("contextmenu",S),()=>{window.removeEventListener("click",_),window.removeEventListener("contextmenu",S)}),[_,S]);const C=(I,U)=>()=>{f({...c,visible:!1}),o(I,n,U)},P=y.exports.useCallback(I=>{var Oe,me;let U=I.name;return I.name==="vehicle_key"?_v:I.name==="apartment_key"?vv:I.name==="health"?wv:I.name==="license"?gv:I.name==="identity"?xv:I.name==="bank"?kv:(I.name==="outfit"||I.name==="armor"?U+=`_${(Oe=I.metadata)==null?void 0:Oe.type}`:I.name==="cabinet_zkea"&&(U+=`_${(me=I.metadata)==null?void 0:me.tier}`),`https://cfx-nui-soz-core/public/images/items/${U}.webp`)},[]);if(!n&&!r&&!l&&!i)return null;if(w&&!d){if(n)return mt.exports.createPortal(E(rc,{className:j.Card,children:E("img",{alt:"",className:j.Icon,src:P(n),onError:I=>I.currentTarget.src="https://placekitten.com/200/200"})}),document.body);if(r)return mt.exports.createPortal(E(rc,{className:j.Card,children:E("img",{alt:"",className:j.Icon,src:oc})}),document.body)}return F("div",{ref:x,className:at({[j.Money]:!!r}),children:[F("div",{ref:p,style:u,...h,...m,className:at(j.Card,{[j.Disabled]:(n==null?void 0:n.disabled)===!0||r&&r<0||l&&l<0||i&&i<0}),onMouseEnter:k,onMouseLeave:g,children:[n&&F(oe,{children:[a?F("span",{className:j.Amount,children:[a>1&&a," $"]}):E("span",{className:j.Amount,children:n.amount>1&&n.amount}),(n==null?void 0:n.shortcut)&&E("span",{className:j.Shortcut,children:n==null?void 0:n.shortcut}),(n==null?void 0:n.name)=="vehicle_key"&&E("span",{className:j.Key,children:n==null?void 0:n.label.replace("V\xE9hicule ","")}),E("img",{alt:"",className:j.Icon,src:P(n),onError:I=>I.currentTarget.src="https://placekitten.com/200/200"})]}),r&&F(oe,{children:[E("span",{className:j.Amount,children:r>=0&&r.toLocaleString("en-US",Ev)}),E("img",{alt:"",className:j.Icon,src:oc})]}),l&&F(oe,{children:[E("span",{className:j.Amount,children:"Portefeuille"}),E("img",{alt:"",className:j.Icon,src:Sv})]}),i&&F(oe,{children:[E("span",{className:j.Amount,children:"Trousseau"}),E("img",{alt:"",className:j.Icon,src:Cv})]})]}),o&&E("div",{ref:D,className:j.ContextMenu,style:{display:`${c.visible?"block":"none"}`,left:c.posX,top:c.posY},children:F("div",{className:j.OptionsList,children:[n&&(n.useable||n.type==="weapon")&&E("li",{className:j.OptionListItem,onClick:C("useItem"),children:n.type==="weapon"?"\xC9quiper":n.usableLabel||"Utiliser"}),n&&n.type!=="card"&&E("li",{className:j.OptionListItem,onClick:C("giveItem"),children:n.giveLabel||"Donner"}),n&&n.type==="weapon"&&F(oe,{children:[E("li",{className:j.OptionListItem,onClick:C("setItemUsage",1),children:"D\xE9finir comme arme principale"}),E("li",{className:j.OptionListItem,onClick:C("setItemUsage",2),children:"D\xE9finir comme arme secondaire"})]}),n&&n.type==="crate"&&((ee=(z=n.metadata)==null?void 0:z.crateElements)==null?void 0:ee.length)&&E("li",{className:j.OptionListItem,onClick:C("renameItem"),children:"Renommer"}),n&&n.useable&&n.type!=="weapon"&&E(oe,{children:F("li",{className:j.OptionListItem,children:["Raccourci d'utilisation",E("div",{children:Array(8).fill(1).map(function(I,U){const Oe=U+3===10?0:U+3;return E("p",{className:j.OptionListOption,onClick:C("setItemUsage",Oe),children:Oe})})})]})}),r&&F(oe,{children:[E("li",{className:j.OptionListItem,onClick:C("giveMoney"),children:"Donner en propre"}),E("li",{className:j.OptionListItem,onClick:C("giveMarkedMoney"),children:"Donner en sale"})]}),l&&E(oe,{children:E("li",{className:j.OptionListItem,onClick:C("openPlayerWalletInventory"),children:"Ouvrir le portefeuille"})}),i&&E(oe,{children:E("li",{className:j.OptionListItem,onClick:C("openPlayerKeyInventory"),children:"Ouvrir le trousseau"})}),n&&n.type==="card"&&F(oe,{children:[E("li",{className:j.OptionListItem,onClick:C("showCard"),children:"Montrer"}),E("li",{className:j.OptionListItem,onClick:C("seeCard"),children:"Regarder"})]})]})})]})},Nv="_Card_qbn2z_1",Dv="_CardHover_qbn2z_7",sc={Card:Nv,CardHover:Dv},Wn=({id:e,slot:t,containerName:n,children:r})=>{const{isOver:o,setNodeRef:l}=Ym({id:e,data:{container:n,slot:t}});return E("div",{ref:l,className:at(sc.Card,{[sc.CardHover]:o}),children:r})},or=({id:e,columns:t=5,rows:n,items:r,money:o,wallet:l,keychain:i,action:s})=>{const[a,d]=y.exports.useState(""),[m,h]=y.exports.useState({}),p=y.exports.useCallback(v=>w=>h(x=>({...x,[v]:w})),[h]);return y.exports.useEffect(()=>{d(null)},[r]),F(oe,{children:[F("div",{className:Ku.Wrapper,style:{gridTemplateColumns:`repeat(${t}, 1fr)`,gridTemplateRows:`repeat(${n+1}, 1fr)`},children:[o&&E(Wn,{id:`${e}_money`,containerName:e,slot:0,children:E(Bn,{id:`${e}_drag_money`,containerName:e,money:o,interactAction:s},0)},"money"),l&&E(Wn,{id:`${e}_wallet`,containerName:e,slot:1,children:E(Bn,{id:`${e}_drag_wallet`,containerName:e,wallet:l,interactAction:s,undraggable:!0},0)},"wallet"),i&&E(Wn,{id:`${e}_keychain`,containerName:e,slot:2,children:E(Bn,{id:`${e}_drag_keychain`,containerName:e,keychain:i,interactAction:s,undraggable:!0},0)},"keychain"),[...Array(t*(n+1)-(o?3:0))].map((v,w)=>E(Wn,{id:`${e}_${w-1}`,containerName:e,slot:w+1,children:E(Bn,{id:`${e}_drag`,containerName:e,item:r.find(x=>x.slot-1===w),setInContext:p(w),interactAction:s,onItemHover:d},w)},w))]}),a&&E("footer",{className:Ku.Description,dangerouslySetInnerHTML:{__html:a}})]})},Tv="/html/banner/inventory_banner.png";function te(e,t={}){fetch("https://soz-inventory/closeNUI",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(t)}).then(e())}const Tl=e=>{if(!e||e.length===0)return 0;const t=e.filter(n=>n!==null).sort((n,r)=>r.slot-n.slot)[0].slot;return Math.ceil(t/5)},Wf=(e,t)=>{fetch("https://soz-inventory/sortInventoryAZ",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({inventory:e})}).then(n=>n.json()).then(n=>{typeof n.sourceInventory=="object"&&(n.sourceInventory.items=Object.values(n.sourceInventory.items)),n.sourceInventory.items=n.sourceInventory.items.filter(r=>r!==null),t(n.sourceInventory)}).catch(n=>{console.error("Failed to sort inventory",n)})},Ns=e=>{if(!!e)return(e==null?void 0:e.ctrlKey)==!0&&(e==null?void 0:e.altKey)==!1?"CTRL":(e==null?void 0:e.ctrlKey)==!1&&(e==null?void 0:e.altKey)==!0?"ALT":"NONE"},Mv=()=>{const[e,t]=y.exports.useState(!1),n=y.exports.useRef(null),[r,o]=y.exports.useState(0),[l,i]=y.exports.useState(),[s,a]=y.exports.useState(),d=y.exports.useCallback(()=>{t(!1),i(null),a([])},[t,i,a]),m=y.exports.useCallback((c,f,u)=>{fetch(`https://soz-inventory/player/${c}`,{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({...f,shortcut:u})}).then(()=>te(()=>d()))},[d]),h=y.exports.useCallback(c=>{e&&n.current&&!n.current.contains(c.target)&&(c.preventDefault(),te(()=>d()))},[n,e,d]),p=y.exports.useCallback(c=>{if(c.data.action==="openPlayerInventory"){if(c.data.playerInventory===void 0)return;try{typeof c.data.playerInventory=="object"&&(c.data.playerInventory.items=Object.values(c.data.playerInventory.items)),c.data.playerInventory.items=c.data.playerInventory.items.filter(f=>f!==null),i(c.data.playerInventory),o(c.data.playerMoney||-1),a(c.data.playerShortcuts),t(!0)}catch(f){console.error(f,c.data.playerInventory,c.data.playerMoney),te(()=>d())}}else e&&c.data.action==="closeInventory"?te(()=>d()):(c.data.action==="openShop"||c.data.action==="openInventory"||c.data.action==="openPlayerKeyInventory"||c.data.action==="openPlayerWalletInventory")&&d()},[t,d,o,i,a,e]),v=y.exports.useCallback(c=>{e&&!c.repeat&&(c.key==="Escape"||c.key==="F2")&&te(()=>d())},[e,d]),w=y.exports.useCallback(c=>{if(!c.active.data.current)return;const f=c==null?void 0:c.activatorEvent;if(c.over!==null){if(c.active.id=="player_drag_keychain_"||c.over.id=="player_keychain"||c.active.id=="player_drag_wallet_"||c.over.id=="player_wallet"||c.active.id=="player_drag_money_"||c.over.id=="player_money")return;fetch("https://soz-inventory/sortItem",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({item:c.active.data.current.item,slot:c.over.data.current.slot,inventory:l==null?void 0:l.id,keyModifier:Ns(f)})}).then(u=>u.json()).then(u=>{typeof u.sourceInventory=="object"&&(u.sourceInventory.items=Object.values(u.sourceInventory.items)),u.sourceInventory.items=u.sourceInventory.items.filter(g=>g!==null),i(u.sourceInventory)}).catch(u=>{console.error("Failed to sort item",u)})}else c.active.id=="player_drag_money_"?fetch("https://soz-inventory/player/giveMoneyToTarget",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"}}).then(()=>te(()=>d())):fetch("https://soz-inventory/player/giveItemToTarget",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(c.active.data.current.item)}).then(()=>te(()=>d()))},[l,d]),x=y.exports.useCallback(c=>{var u;if(!c)return null;const f=(u=Object.entries(s||{}))==null?void 0:u.find(([g,k])=>{if(k===null)return!1;const S=Object.values(c.metadata||{}),_=Object.values((k==null?void 0:k.metadata)||{});return k.name===c.name&&_.every(C=>S.includes(C))});return f?f[0]:null},[s]);y.exports.useEffect(()=>(window.addEventListener("contextmenu",h),window.addEventListener("message",p),window.addEventListener("keydown",v),()=>{window.removeEventListener("contextmenu",h),window.removeEventListener("message",p),window.removeEventListener("keydown",v)}),[h,p,v]);const D=y.exports.useMemo(()=>Tl((l==null?void 0:l.items)||[]),[l]);return l?E(cr,{autoScroll:{enabled:!1},collisionDetection:kn,onDragEnd:w,children:e&&E("div",{className:at(Ry.Wrapper),children:E(tn,{display:!0,banner:Tv,weight:l.weight,maxWeight:l.maxWeight,sortCallback:()=>Wf(l.id,i),children:E(or,{id:"player",rows:D,money:r,wallet:1,keychain:1,items:l.items.map((c,f)=>({...c,id:f,shortcut:x(c)})),action:m})})})}):null},Rv="_Wrapper_ybyzp_1",Pv="_PlayerContainer_ybyzp_12",Lv="_StorageContainer_ybyzp_18",Mi={Wrapper:Rv,PlayerContainer:Pv,StorageContainer:Lv},Vf="/html/banner/player.jpg",Iv=()=>{const[e,t]=y.exports.useState(!1),[n,r]=y.exports.useState(0),[o,l]=y.exports.useState(0),[i,s]=y.exports.useState(),[a,d]=y.exports.useState(),m=y.exports.useCallback(()=>{t(!1),s(null),d(null)},[t,s,d]),h=y.exports.useMemo(()=>{let u=(a==null?void 0:a.type)||"default";return u==="stash"&&(u="storage"),u==="ammo"&&(u="armory"),u==="tanker"&&(u="trunk"),u==="trailerlogs"&&(u="trunk"),u==="brickade"&&(u="trunk"),u==="trash"&&(u="trunk"),u==="tiptruck"&&(u="trunk"),u==="metal_storage"&&(u="default"),u==="storage"&&(u="default"),u==="storage_tank"&&(u="default"),`/html/banner/${u}.jpg`},[a==null?void 0:a.type]),p=y.exports.useCallback(u=>{if(u.data.action==="openInventory"){if(u.data.playerInventory===void 0||u.data.targetInventory===void 0)return;try{typeof u.data.playerInventory=="object"&&(u.data.playerInventory.items=Object.values(u.data.playerInventory.items)),typeof u.data.targetInventory=="object"&&(u.data.targetInventory.items=Object.values(u.data.targetInventory.items)),u.data.playerInventory.items=u.data.playerInventory.items.filter(g=>g!==null),u.data.targetInventory.items=u.data.targetInventory.items.filter(g=>g!==null),s(u.data.playerInventory),d(u.data.targetInventory),u.data.targetInventory.type=="player"?(r(u.data.playerMoney||-1),l(u.data.targetMoney||-1)):(r(-1),l(void 0)),t(!0)}catch(g){console.error(g,u.data.playerInventory,u.data.targetInventory),te(()=>{m()},{target:a==null?void 0:a.id})}}else if(u.data.action==="updateInventory")try{u.data.playerInventory!==void 0&&(typeof u.data.playerInventory=="object"&&(u.data.playerInventory.items=Object.values(u.data.playerInventory.items)),u.data.playerInventory.items=u.data.playerInventory.items.filter(g=>g!==null),s(u.data.playerInventory)),u.data.targetInventory!==void 0&&(typeof u.data.targetInventory=="object"&&(u.data.targetInventory.items=Object.values(u.data.targetInventory.items)),u.data.targetInventory.items=u.data.targetInventory.items.filter(g=>g!==null),d(u.data.targetInventory))}catch(g){console.error(g,u.data.playerInventory,u.data.targetInventory),te(()=>{m()},{target:a==null?void 0:a.id})}else e&&u.data.action==="closeInventory"?te(()=>{m()},{target:a==null?void 0:a.id}):(u.data.action==="openShop"||u.data.action==="openInventory"||u.data.action==="openPlayerKeyInventory"||u.data.action==="openPlayerWalletInventory")&&m()},[m,s,d,r,l,e]),v=y.exports.useCallback(u=>{e&&!u.repeat&&u.key==="Escape"&&fetch("https://soz-inventory/closeNUI",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({target:a==null?void 0:a.id})}).then(()=>{m()})},[a,m,e]),w=y.exports.useCallback(u=>{if(!u.sourceInventory||!u.targetInventory||u.sourceInventory.id===u.targetInventory.id)return;let g=u.sourceInventory,k=u.targetInventory;u.inverse&&(g=u.targetInventory,k=u.sourceInventory),s(g),d(k)},[s,d]),x=y.exports.useCallback(u=>{u.inverse?(r(u.targetMoney||-1),l(u.sourceMoney||-1)):(r(u.sourceMoney||-1),l(u.targetMoney||-1))},[r,l]),D=y.exports.useCallback(u=>{var k;if(!u.active.data.current||!((k=u.over)!=null&&k.data.current))return;const g=u==null?void 0:u.activatorEvent;if(u.active.id=="player_drag_money_"){if(u.over.data.current.container==="player")return;fetch("https://soz-inventory/transfertMoney",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({target:a==null?void 0:a.id})}).then(S=>S.json()).then(S=>x(S))}else if(u.active.id=="storage_drag_money_"){if(u.over.data.current.container==="storage")return;fetch("https://soz-inventory/transfertMoney",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({target:a==null?void 0:a.id,inverse:!0})}).then(S=>S.json()).then(S=>x(S))}else if(u.active.data.current.container===u.over.data.current.container){if(u.active.id=="player_drag_money_"||u.over.id=="player_money"||u.active.id=="storage_drag_money_"||u.over.id=="storage_money")return;fetch("https://soz-inventory/sortItem",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({item:u.active.data.current.item,slot:u.over.data.current.slot,inventory:u.active.data.current.container==="player"?i==null?void 0:i.id:a==null?void 0:a.id,manualFilter:u.active.data.current.container==="player"&&(a==null?void 0:a.type),keyModifier:Ns(g)})}).then(S=>S.json()).then(S=>{var _;typeof S.sourceInventory=="object"&&(S.sourceInventory.items=Object.values(S.sourceInventory.items)),S.sourceInventory.items=S.sourceInventory.items.filter(C=>C!==null),((_=u.active.data.current)==null?void 0:_.container)==="player"?s(S.sourceInventory):d(S.sourceInventory)}).catch(S=>{console.error("Failed to sort item",S)})}else{if(u.active.id=="player_drag_money_"||u.over.id=="player_money"||u.active.id=="storage_drag_money_"||u.over.id=="storage_money")return;const S=u.active.data.current.container==="player"?i==null?void 0:i.id:a==null?void 0:a.id,_=u.over.data.current.container==="player"?i==null?void 0:i.id:a==null?void 0:a.id,C=u.active.data.current.container==="storage",P=u.over.data.current.container==="player"?i==null?void 0:i.maxWeight:a==null?void 0:a.maxWeight,M=u.over.data.current.container==="player"?i==null?void 0:i.weight:a==null?void 0:a.weight;fetch("https://soz-inventory/transfertItem",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({source:S,target:_,targetCurrentWeight:M,targetMaxWeight:P,item:u.active.data.current.item,slot:u.over.data.current.slot,keyModifier:Ns(g)})}).then(z=>z.json()).then(z=>w({...z,inverse:C}))}},[i,a,s,d]);y.exports.useEffect(()=>(window.addEventListener("message",p),window.addEventListener("keydown",v),()=>{window.removeEventListener("message",p),window.removeEventListener("keydown",v)}),[p,v]);const c=y.exports.useMemo(()=>Tl((i==null?void 0:i.items)||[]),[i]),f=y.exports.useMemo(()=>Tl((a==null?void 0:a.items)||[]),[a]);return!i||!a?null:E("div",{className:Mi.Wrapper,children:e&&F(cr,{autoScroll:{enabled:!1},collisionDetection:kn,onDragEnd:D,children:[E("div",{className:at(Mi.PlayerContainer),children:E(tn,{display:!0,banner:Vf,weight:i.weight,maxWeight:i.maxWeight,children:E(or,{id:"player",rows:c,money:n,wallet:-1,keychain:-1,items:i.items.map((u,g)=>({...u,id:g}))})})}),E("div",{className:at(Mi.StorageContainer),children:E(tn,{display:!0,banner:h,weight:a.weight,maxWeight:a.maxWeight,sortCallback:()=>Wf(a.id,d),children:E(or,{id:"storage",rows:f,money:o,items:a.items.map((u,g)=>({...u,id:g}))})})})]})})},Ov="_Wrapper_1qz33_1",zv={Wrapper:Ov},Av="/html/banner/keychain_banner.png",jv=()=>{const[e,t]=y.exports.useState(!1),n=y.exports.useRef(null),[r,o]=y.exports.useState([]),l=y.exports.useCallback(()=>{t(!1),o(null)},[t,o]),i=y.exports.useCallback(v=>{!v.active.data.current||fetch("https://soz-inventory/player/giveKeyToTarget",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(v.active.data.current.item)}).then()},[l]),s=y.exports.useCallback(v=>{fetch("https://soz-inventory/player/giveAllVehicleKeysToTarget",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(v)}).then()},[l]),a=y.exports.useCallback(v=>{fetch("https://soz-inventory/player/giveAllAppartmentKeysToTarget",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(v)}).then()},[l]),d=y.exports.useCallback(v=>{if(v.data.action==="openPlayerKeyInventory"){if(v.data.keys===void 0)return;o(v.data.keys.filter(w=>w!==null).map(w=>({...w,id:`key_${w.slot}`}))),t(!0)}else(v.data.action==="openShop"||v.data.action==="openInventory"||v.data.action==="openPlayerInventory"||v.data.action==="openPlayerWalletInventory")&&l()},[t,o]),m=y.exports.useCallback(v=>{e&&n.current&&!n.current.contains(v.target)&&(v.preventDefault(),te(()=>l()))},[n,e,l]),h=y.exports.useCallback(v=>{e&&!v.repeat&&(v.key==="Escape"||v.key==="F2")&&te(()=>l())},[e,l]);y.exports.useEffect(()=>(window.addEventListener("contextmenu",m),window.addEventListener("message",d),window.addEventListener("keydown",h),()=>{window.removeEventListener("contextmenu",m),window.removeEventListener("message",d),window.removeEventListener("keydown",h)}),[m,d,h]);const p=y.exports.useMemo(()=>Math.floor((r||[]).length/5),[r]);return r?E(oe,{children:e&&E(cr,{autoScroll:{enabled:!1},collisionDetection:kn,onDragEnd:i,children:E("div",{className:at(zv.Wrapper),children:E(tn,{display:!0,banner:Av,maxWeight:-1,giveAllAppartmentKeysCallback:()=>a(r.map((v,w)=>({...v,id:w,slot:w+1,type:"key"}))),giveAllVehicleKeysCallback:()=>s(r.map((v,w)=>({...v,id:w,slot:w+1,type:"key"}))),children:E(or,{id:"player",rows:p,items:r.map((v,w)=>({...v,id:w,slot:w+1,type:"key"}))})})})})}):null},Fv="_Wrapper_1qz33_1",$v={Wrapper:Fv},Uv="/html/banner/wallet_banner.png",Bv=()=>{const[e,t]=y.exports.useState(!1),n=y.exports.useRef(null),[r,o]=y.exports.useState([]),l=y.exports.useCallback(()=>{t(!1),o(null)},[t,o]),i=y.exports.useCallback(p=>{!p.active.data.current||fetch("https://soz-inventory/player/showCard",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(p.active.data.current.item)}).then()},[]),s=y.exports.useCallback((p,v,w)=>{fetch(`https://soz-inventory/player/${p}`,{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({...v,shortcut:w})}).then()},[]),a=y.exports.useCallback(p=>{if(p.data.action==="openPlayerWalletInventory"){if(p.data.cards===void 0)return;o(p.data.cards.filter(v=>v!==null).map(v=>({...v,id:`key_${v.slot}`}))),t(!0)}else(p.data.action==="openShop"||p.data.action==="openInventory"||p.data.action==="openPlayerInventory"||p.data.action==="openPlayerKeyInventory")&&l()},[t,o]),d=y.exports.useCallback(p=>{e&&!p.repeat&&(p.key==="Escape"||p.key==="F2")&&te(()=>l())},[e,l]),m=y.exports.useCallback(p=>{e&&n.current&&!n.current.contains(p.target)&&(p.preventDefault(),te(()=>l()))},[n,e,l]);y.exports.useEffect(()=>(window.addEventListener("contextmenu",m),window.addEventListener("message",a),window.addEventListener("keydown",d),()=>{window.removeEventListener("contextmenu",m),window.removeEventListener("message",a),window.removeEventListener("keydown",d)}),[m,a,d]);const h=y.exports.useMemo(()=>Math.floor((r||[]).length/5),[r]);return r?E(oe,{children:e&&E(cr,{autoScroll:{enabled:!1},collisionDetection:kn,onDragEnd:i,children:E("div",{className:at($v.Wrapper),children:E(tn,{display:!0,banner:Uv,maxWeight:-1,children:E(or,{id:"player",rows:h,items:r.map((p,v)=>({...p,id:v,slot:v+1,type:"card"})),action:s})})})})}):null},Wv="_Wrapper_1qz33_1",Vv={Wrapper:Wv},Hv=()=>{const[e,t]=y.exports.useState(!1),n=y.exports.useRef(null);let r=0;const[o,l]=y.exports.useState([]),i=y.exports.useCallback(()=>{t(!1),l(null)},[t,l]),s=y.exports.useCallback(p=>{!p.active.data.current||fetch("https://soz-inventory/player/forceconsume",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({item:p.active.data.current.item,targetId:r})}).then(()=>{te(()=>i())})},[i]),a=y.exports.useCallback(p=>{if(p.data.action==="openForceConsume")try{typeof p.data.playerInventory=="object"&&(p.data.playerInventory.items=Object.values(p.data.playerInventory.items)),l(p.data.playerInventory.items.filter(v=>v!==null).map(v=>({...v,disabled:v.type!="food"&&v.type!="drink"&&v.type!="cocktail"&&v.type!="liquor"&&v.type!="drug"}))),r=p.data.targetId,t(!0)}catch(v){console.error(v,p.data.playerInventory,JSON.stringify(p.data.playerInventory)),te(()=>i())}},[t,l]),d=y.exports.useCallback(p=>{e&&!p.repeat&&p.key==="Escape"&&te(()=>i())},[e,i]),m=y.exports.useCallback(p=>{e&&n.current&&!n.current.contains(p.target)&&(p.preventDefault(),te(()=>i()))},[n,e,i]);y.exports.useEffect(()=>(window.addEventListener("contextmenu",m),window.addEventListener("message",a),window.addEventListener("keydown",d),()=>{window.removeEventListener("contextmenu",m),window.removeEventListener("message",a),window.removeEventListener("keydown",d)}),[m,a,d]);const h=y.exports.useMemo(()=>Tl(o||[]),[o]);return o?E(oe,{children:e&&E(cr,{autoScroll:{enabled:!1},collisionDetection:kn,onDragEnd:s,children:e&&E("div",{className:at(Vv.Wrapper),children:E(tn,{display:!0,banner:Vf,maxWeight:-1,children:E(or,{id:"player",rows:h,items:o.map((p,v)=>({...p,id:v})),money:-1,wallet:-1,keychain:-1})})})})}):null},Kv="_Wrapper_hjlc5_1",Qv="_CartContainer_hjlc5_12",ac={Wrapper:Kv,CartContainer:Qv},Yv="_Wrapper_1ynup_1",Xv="_Description_1ynup_22",uc={Wrapper:Yv,Description:Xv},Gv=({id:e,columns:t=5,rows:n,items:r,action:o})=>{const[l,i]=y.exports.useState(""),[s,a]=y.exports.useState({}),d=y.exports.useCallback(m=>h=>a(p=>({...p,[m]:h})),[a]);return y.exports.useEffect(()=>{i(null)},[r]),F(oe,{children:[E("div",{className:uc.Wrapper,style:{gridTemplateColumns:`repeat(${t}, 1fr)`,gridTemplateRows:`repeat(${n+1}, 1fr)`},children:[...Array(t*(n+1))].map((m,h)=>{var p;return E(Wn,{id:`${e}_${h-1}`,containerName:e,slot:h+1,children:E(Bn,{id:`${e}_drag`,containerName:e,item:r.find(v=>v.slot-1===h),setInContext:d(h),interactAction:o,onItemHover:i,price:(p=r.find(v=>v.slot-1===h))==null?void 0:p.price},h)},h)})}),l&&E("footer",{className:uc.Description,dangerouslySetInnerHTML:{__html:l}})]})},cc=e=>!e||e.length===0?0:(e.filter(t=>t!==null).sort((t,n)=>n.slot-t.slot)[0].slot,Math.ceil(e.length/5)),Jv="_Wrapper_y08hc_1",Zv="_CartHeader_y08hc_15",bv="_CartHeaderIcon_y08hc_28",qv="_CartFooter_y08hc_34",eg="_CartButton_y08hc_54",tg="_Description_y08hc_87",Tn={Wrapper:Jv,CartHeader:Zv,CartHeaderIcon:bv,CartFooter:qv,CartButton:eg,Description:tg};function ng({title:e,titleId:t,...n},r){return F("svg",{...Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:r,"aria-labelledby":t},n),children:[e?E("title",{id:t,children:e}):null,E("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 10.5V6a3.75 3.75 0 1 0-7.5 0v4.5m11.356-1.993 1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 0 1-1.12-1.243l1.264-12A1.125 1.125 0 0 1 5.513 7.5h12.974c.576 0 1.059.435 1.119 1.007ZM8.625 10.5a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm7.5 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"})]})}const rg=y.exports.forwardRef(ng),og=rg,lg=({id:e,columns:t=5,rows:n,items:r,validateAction:o,cartAmount:l,cartContent:i})=>{var p;const[s,a]=y.exports.useState(""),[d,m]=y.exports.useState({}),h=y.exports.useCallback(v=>w=>m(x=>({...x,[v]:w})),[m]);return y.exports.useEffect(()=>{a(null)},[r]),F(oe,{children:[F("div",{className:Tn.CartHeader,children:[E(og,{className:Tn.CartHeaderIcon}),E("p",{children:"Glisse et d\xE9pose dans ton panier"})]}),E("div",{className:Tn.Wrapper,style:{gridTemplateColumns:`repeat(${t}, 1fr)`,gridTemplateRows:`repeat(${n+1}, 1fr)`},children:[...Array(t*(n+1)-0)].map((v,w)=>E(Wn,{id:`${e}_${w-1}`,containerName:e,slot:w+1,children:E(Bn,{id:`${e}_drag`,containerName:e,item:r.find(x=>x.slot-1===w),setInContext:h(w)},w)},w))}),F("div",{className:Tn.CartFooter,children:[F("p",{children:["PRIX : ",(p=l.toLocaleString("fr-fr"))!=null?p:l," $"]}),E("button",{disabled:l==0,className:Tn.CartButton,onClick:()=>{o(i)},children:"Acheter"})]}),s&&E("footer",{className:Tn.Description,dangerouslySetInnerHTML:{__html:s}})]})},ig=()=>{const[e,t]=y.exports.useState(!1),[n,r]=y.exports.useState(0),[o,l]=y.exports.useState(),[i,s]=y.exports.useState([]),[a,d]=y.exports.useState(""),m=y.exports.useCallback(()=>{t(!1),l(null),s([]),r(0)},[l,s,r,t]),h=y.exports.useCallback(c=>{if(c.data.action==="openShop"){if(c.data.shopContent===void 0)return;try{l(c.data.shopContent),d(c.data.shopHeaderTexture),t(!0)}catch{te(()=>{m()})}}else(c.data.action==="openPlayerInventory"||c.data.action==="openInventory"||c.data.action==="openPlayerKeyInventory"||c.data.action==="openPlayerWalletInventory")&&m()},[m,l]),p=y.exports.useCallback(c=>{e&&!c.repeat&&c.key==="Escape"&&te(()=>{m()})},[m,e]),v=c=>c.reduce((f,u)=>f+u.amount*u.price,0),w=y.exports.useCallback(c=>{fetch("https://soz-inventory/player/validateCart",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify(c)}).then(()=>{te(()=>m())})},[m]),x=y.exports.useCallback(c=>{var f;if(!!c.active.data.current){if(c.active.data.current.container==="cart"&&!c.over){const u=c.active.data.current.item;s(g=>g.filter(k=>k.slot!==u.slot)),r(n-u.amount*u.price);return}if(!!((f=c.over)!=null&&f.data.current)&&(c==null||c.activatorEvent,!(c.over.data.current.container==="shop"&&c.active.data.current.container==="shop"))){if(c.over.data.current.container==="cart"&&c.active.data.current.container==="cart"){if(i.find(k=>{var S,_,C;return k.slot==((C=(_=(S=c==null?void 0:c.over)==null?void 0:S.data)==null?void 0:_.current)==null?void 0:C.slot)}))return;let u=c.active.data.current.item;s(k=>k.filter(S=>S.slot!==u.slot));let g=structuredClone(c.active.data.current.item);g.slot=c.over.data.current.slot,s(k=>[...k,g]);return}if(c.active.data.current.container==="cart"&&c.over.data.current.container==="shop"){const u=c.active.data.current.item;s(g=>g.filter(k=>k.slot!==u.slot)),r(n-u.amount*u.price);return}if(c.active.data.current.container==="shop"&&c.over.data.current.container==="cart"){let u=structuredClone(c.active.data.current.item);u.slot=c.over.data.current.slot;const g=i.find(S=>{var _,C;return S.name==u.name&&((_=S.metadata)==null?void 0:_.label)===((C=u.metadata)==null?void 0:C.label)}),k=i.find(S=>{var _,C,P;return S.slot==((P=(C=(_=c==null?void 0:c.over)==null?void 0:_.data)==null?void 0:C.current)==null?void 0:P.slot)});if(!g&&k)return;fetch("https://soz-inventory/player/askForAmount",{method:"POST",headers:{"Content-Type":"application/json; charset=UTF-8"},body:JSON.stringify({})}).then(S=>S.json()).then(S=>{const _=parseInt(S);if(isNaN(_)||_<=0)return;u.amount=_;let C=n+u.amount*u.price,P=[];g&&(P=i.map(M=>{var z,ee;return M.name===u.name&&((z=M.metadata)==null?void 0:z.label)===((ee=u.metadata)==null?void 0:ee.label)?{...M,amount:M.amount+u.amount}:M}),C=v(i)+u.price*u.amount),s(g?P:M=>[...M,u]),r(C)})}}}},[o,i,s,l]);y.exports.useEffect(()=>(window.addEventListener("message",h),window.addEventListener("keydown",p),()=>{window.removeEventListener("message",h),window.removeEventListener("keydown",p)}),[h,p]);const D=y.exports.useMemo(()=>cc(o||[]),[o]);return y.exports.useMemo(()=>cc(o||[]),[i]),o?E("div",{className:ac.Wrapper,children:e&&E(cr,{autoScroll:{enabled:!1},collisionDetection:kn,onDragEnd:x,children:E("div",{className:at(ac.StorageContainer),children:F(tn,{display:!0,banner:`https://nui-img/soz/${a}`,maxWeight:-1,children:[E(Gv,{id:"shop",rows:D,items:o.map((c,f)=>({...c,id:f}))}),E(lg,{cartAmount:n,cartContent:i,id:"cart",rows:2,items:i.map((c,f)=>({...c,id:f})),validateAction:w})]})})})}):null};Ri.createRoot(document.getElementById("app")).render(F(Ps.StrictMode,{children:[E(Mv,{}),E(Iv,{}),E(ig,{}),E(jv,{}),E(Bv,{}),E(Hv,{})]})); diff --git a/resources/[soz]/soz-jobs/client/jobs/baun/_main.lua b/resources/[soz]/soz-jobs/client/jobs/baun/_main.lua index 776e777da9..474a6e4dc7 100644 --- a/resources/[soz]/soz-jobs/client/jobs/baun/_main.lua +++ b/resources/[soz]/soz-jobs/client/jobs/baun/_main.lua @@ -33,8 +33,3 @@ RegisterNetEvent("soz-jobs:client:baun:createCocktailBox", function() QBCore.Functions.TriggerCallback("soz-jobs:server:baun:createCocktailBox", function() end) end) - -RegisterNetEvent("soz-jobs:client:baun:createIceCubes", function() - QBCore.Functions.TriggerCallback("soz-jobs:server:baun:createIceCubes", function() - end) -end) diff --git a/resources/[soz]/soz-jobs/client/jobs/baun/icecube.lua b/resources/[soz]/soz-jobs/client/jobs/baun/icecube.lua new file mode 100644 index 0000000000..507e1cb949 --- /dev/null +++ b/resources/[soz]/soz-jobs/client/jobs/baun/icecube.lua @@ -0,0 +1,37 @@ +RegisterNetEvent("soz-jobs:client:baun:createIceCubes", function(data) + QBCore.Functions.TriggerCallback("soz-jobs:server:baun:can-createIceCubes", function(canRestock) + if canRestock then + createIceCubes(data) + end + end, data.item) +end) + +function createIceCubes(data) + local action_message = "Vous commencez à fabriquer des glaçons." + local stopped_message = "Vous avez arrêté de fabriquer des glaçons." + local finished_message = "Vous avez terminé de fabriquer des glaçons." + QBCore.Functions.Progressbar("restock", action_message, BaunConfig.Durations.Icecube, false, true, + { + disableMovement = true, + disableCarMovement = true, + disableMouse = false, + disableCombat = true, + }, {animDict = "rcmextreme3", anim = "idle", flags = 1}, {}, {}, function() + QBCore.Functions.TriggerCallback("soz-jobs:server:baun:createIceCubes", function(success, reason) + if success then + TriggerEvent("soz-jobs:client:baun:createIceCubes", data) + else + if reason == "missing_ingredient" then + exports["soz-core"]:DrawNotification(finished_message) + elseif reason == "invalid_weight" then + exports["soz-core"]:DrawNotification("Le stockage est plein... ", "error") + else + exports["soz-core"]:DrawNotification(string.format("Une erreur est survenue: %s.", reason), "error") + end + end + end, data.storage, data.item) + end, function() + exports["soz-core"]:DrawNotification(stopped_message) + end) +end + diff --git a/resources/[soz]/soz-jobs/config/jobs/baun.lua b/resources/[soz]/soz-jobs/config/jobs/baun.lua index a2a378ccd1..eebdbc8204 100644 --- a/resources/[soz]/soz-jobs/config/jobs/baun.lua +++ b/resources/[soz]/soz-jobs/config/jobs/baun.lua @@ -185,4 +185,5 @@ BaunConfig.Durations = { Crafting = 4000, -- in ms Restocking = 4000, -- in ms Harvesting = 2000, -- in ms + Icecube = 1000, -- in ms } diff --git a/resources/[soz]/soz-jobs/server/jobs/baun.lua b/resources/[soz]/soz-jobs/server/jobs/baun.lua index b80f2f4255..9d1677296f 100644 --- a/resources/[soz]/soz-jobs/server/jobs/baun.lua +++ b/resources/[soz]/soz-jobs/server/jobs/baun.lua @@ -189,6 +189,12 @@ QBCore.Functions.CreateCallback("soz-jobs:server:baun:createCocktailBox", functi end) end) +QBCore.Functions.CreateCallback("soz-jobs:server:baun:can-createIceCubes", function(source, cb) + local canCreateIceCubes = exports["soz-inventory"]:GetItem(source, "water_bottle", nil, true) > 0 + cb(canCreateIceCubes) +end) + + QBCore.Functions.CreateCallback("soz-jobs:server:baun:createIceCubes", function(source, cb) local player = QBCore.Functions.GetPlayer(source) local bottleToRemove = 1