@platforma-sdk/ui-vue 1.13.15 → 1.13.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/lib.js +7087 -6858
- package/dist/lib.umd.cjs +32 -32
- package/dist/style.css +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +3 -3
package/dist/lib.umd.cjs
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(M,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("@ag-grid-enterprise/core"),require("@ag-grid-community/core"),require("@ag-grid-community/client-side-row-model"),require("@ag-grid-community/infinite-row-model"),require("@ag-grid-enterprise/server-side-row-model"),require("@ag-grid-community/csv-export"),require("@ag-grid-enterprise/clipboard"),require("@ag-grid-enterprise/range-selection"),require("@ag-grid-enterprise/rich-select"),require("@ag-grid-enterprise/menu"),require("@ag-grid-enterprise/excel-export"),require("@ag-grid-community/theming"),require("@ag-grid-community/vue3")):typeof define=="function"&&define.amd?define(["exports","vue","@ag-grid-enterprise/core","@ag-grid-community/core","@ag-grid-community/client-side-row-model","@ag-grid-community/infinite-row-model","@ag-grid-enterprise/server-side-row-model","@ag-grid-community/csv-export","@ag-grid-enterprise/clipboard","@ag-grid-enterprise/range-selection","@ag-grid-enterprise/rich-select","@ag-grid-enterprise/menu","@ag-grid-enterprise/excel-export","@ag-grid-community/theming","@ag-grid-community/vue3"],r):(M=typeof globalThis<"u"?globalThis:M||self,r(M.SdkVueLib={},M.Vue,M.core$1,M.core,M.clientSideRowModel,M.infiniteRowModel,M.serverSideRowModel,M.csvExport,M.clipboard,M.rangeSelection,M.richSelect,M.menu,M.excelExport,M.theming,M.vue3))})(this,function(M,r,Ie,x,is,mm,pd,gm,hd,fd,ym,_m,vm,md,Cm){"use strict";var nM=Object.defineProperty;var pm=M=>{throw TypeError(M)};var rM=(M,r,Ie)=>r in M?nM(M,r,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):M[r]=Ie;var Ze=(M,r,Ie)=>rM(M,typeof r!="symbol"?r+"":r,Ie),ad=(M,r,Ie)=>r.has(M)||pm("Cannot "+Ie);var b=(M,r,Ie)=>(ad(M,r,"read from private field"),Ie?Ie.call(M):r.get(M)),ze=(M,r,Ie)=>r.has(M)?pm("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(M):r.set(M,Ie),me=(M,r,Ie,x)=>(ad(M,r,"write to private field"),x?x.call(M,Ie):r.set(M,Ie),Ie),de=(M,r,Ie)=>(ad(M,r,"access private method"),Ie);var Va=(M,r,Ie,x)=>({set _(is){me(M,r,is,Ie)},get _(){return b(M,r,x)}});var Ap,To,Pp,Dp,hn,zt,fn,mn,Bo,Vo,dt,gn,lt,Ke,xe,Bt,$t,xt,ft,yn,mt,_n,vn,Ut,Cn,br,Vt,re,ld,qr,Hn,Mi,Zt,fm,Kr,No,Ii,Rr,Mr,cd,Na,Aa,Je,dd,os,Ir,ud;function wm(t,e){if(t==null)throw Error(e??"Empty (null | undefined) value");return t}function bm(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function xm(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(bm(65,91));return e}function km(){return xm(42)}const gd=Array.isArray;function Sm(t){return t!==null&&typeof t=="object"}function yd(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null}function Bn(t){if(Array.isArray(t)){const e=[];for(let n=0;n<t.length;n++)e[n]=Bn(t[n]);return e}else if(Sm(t)){const e={};return Object.keys(t).forEach(n=>{e[n]=Bn(t[n])}),e}else return t}function _d(t,e){return new Set([...Object.keys(t),...Object.keys(e)]).forEach(n=>{const o=t[n],s=e[n];yd(o)&&yd(s)||gd(o)&&gd(s)&&o.length===s.length?_d(o,s):t[n]=s}),t}function Pa(t,e,n=!0){let o=0,s;return function(...l){s=()=>{t.apply(this,l),o=new Date().getTime()+e,s=null,n&&setTimeout(()=>{s&&s()},e)},new Date().getTime()>o&&s()}}function Em(t){let e=0n,n;return async function(...o){const s=++e;try{await n}catch{}if(e!==s)return{ok:!1};const l=t(...o);return n=l,{ok:!0,value:await l}}}var Ho=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tm(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Bm=function t(e){if(typeof e=="number"&&isNaN(e))throw new Error("NaN is not allowed");if(typeof e=="number"&&!isFinite(e))throw new Error("Infinity is not allowed");return e===null||typeof e!="object"?JSON.stringify(e):e.toJSON instanceof Function?t(e.toJSON()):Array.isArray(e)?`[${e.reduce((s,l,c)=>`${s}${c===0?"":","}${t(l===void 0||typeof l=="symbol"?null:l)}`,"")}]`:`{${Object.keys(e).sort().reduce((o,s)=>{if(e[s]===void 0||typeof e[s]=="symbol")return o;const l=o.length===0?"":",";return`${o}${l}${t(s)}:${t(e[s])}`},"")}}`};const Or=Tm(Bm);class Da extends Error{}class Fa extends Error{constructor(e){super(e.join(`
|
|
2
2
|
`)),this.errors=e}toString(){return this.errors.join(`
|
|
3
|
-
`)}}function xm(t){return{ok:!0,value:t}}function gd(t){if(!t)throw new Na;if(!t.ok)throw Error(t.errors.join(";"));return t.value}function yd(t){return{value:t,errors:void 0}}function km(t){if(t.errors)throw new Aa(t.errors);if(!t.value)throw new Na;return t.value}function Sm(t){return t!==void 0}function Pa(t,e){return Lr(t)===Lr(e)}const Da=t=>t,Fa=t=>t instanceof Error?t:Error(String(t)),Ra=t=>t.name==="ZodError",Ma=t=>{const{formErrors:e,fieldErrors:n}=t.flatten(),o=Object.entries(n).map(([s,l])=>s+":"+(l==null?void 0:l.join(",")));return e.concat(o).join("; ")};function Ia(t){const e=t.validate??Da,{autoSave:n}=t,o=r.ref(),s=r.ref(),l=N=>{s.value={model:Tn(N)}};r.watch(()=>t.get(),N=>l(N),{immediate:!0});const c=()=>{var N;t.onSave(e(Tn((N=s.value)==null?void 0:N.model)))},u=()=>{l(t.get()),o.value=void 0},p=N=>{const M=Fa(N);Ra(M)?o.value=Error(Ma(M)):o.value=M},f=N=>{o.value=void 0;try{e(N),n&&c()}catch(M){p(M)}},m=r.computed({get:()=>{var N;return(N=s.value)==null?void 0:N.model},set(N){l(N),f(N)}});r.watch(s,(N,M)=>{N&&N===M&&f(N.model)},{deep:!0});const y=r.computed(()=>!o.value),B=r.computed(()=>!Pa(t.get(),r.unref(s))),T=r.computed(()=>o.value?o.value.message:"");return r.reactive({model:m,valid:y,isChanged:B,error:o,errorString:T,save:c,revert:u,setError:p})}function Em(t,e,n){const o=t.validate??Da,{autoSave:s}=t,l=r.ref(),c=r.ref(),u=G=>{var C;if(n.deepPatchModel){const F=(C=c.value)==null?void 0:C.model,O=Object.assign(Tn(G),e??{});c.value={model:F?md(F,O):O,stage:Symbol()}}else c.value={model:Object.assign(Tn(G),e??{}),stage:Symbol()}};r.watch(()=>t.get(),G=>u(G),{immediate:!0});const p=()=>{var G;t.onSave(o(Tn((G=c.value)==null?void 0:G.model)))},f=()=>{u(t.get()),l.value=void 0},m=G=>{const C=Fa(G);Ra(C)?l.value=Error(Ma(C)):l.value=C},y=G=>{l.value=void 0;try{o(G),s&&p()}catch(C){m(C)}},B=r.computed({get:()=>{var G;return(G=c.value)==null?void 0:G.model},set(){throw Error("Cannot replace base model")}});r.watch([()=>({args:B.value.args,ui:B.value.ui}),()=>{var G;return(G=c.value)==null?void 0:G.stage}],([G,C],[F,O])=>{C===O&&y(G)},{deep:!0});const T=r.computed(()=>!l.value),N=r.computed(()=>{var F;const{args:G,ui:C}=((F=r.unref(c))==null?void 0:F.model)??{};return!Pa(t.get(),{args:G,ui:C})}),M=r.computed(()=>l.value?l.value.message:"");return r.reactive({model:B,valid:T,isChanged:N,error:l,errorString:M,save:p,revert:f,setError:m})}const Tm=t=>Object.fromEntries(new URL(t,"http://dummy").searchParams);function Bm(t,e,n){const o=(C,...F)=>{n.debug&&console.log(`%c>>> %c${C}`,"color: orange; font-weight: bold","color: orange",...F)},l=Va(e.setBlockArgs,100),c=Va(e.setBlockUiState,100),u=Va(e.setBlockArgsAndUiState,100),p=r.reactive({args:Object.freeze(t.args),outputs:Object.freeze(t.outputs),ui:Object.freeze(t.ui),navigationState:Object.freeze(t.navigationState)});e.onStateUpdates(async C=>{C.forEach(F=>{F.key==="args"&&(p.args=Object.freeze(F.value),o("args patch",p.args)),F.key==="ui"&&(p.ui=Object.freeze(F.value),o("ui patch",p.ui)),F.key==="outputs"&&(p.outputs=Object.freeze(F.value),o("outputs patch",p.outputs)),F.key==="navigationState"&&(p.navigationState=Object.freeze(F.value),o("navigationState patch",p.navigationState))}),await r.nextTick()});const f=()=>Tn(p.args),m=()=>Tn(p.ui),y=()=>Tn(p.navigationState),B={createArgsModel(C={}){return Ia({get(){return C.transform?C.transform(p.args):p.args},validate:C.validate,autoSave:!0,onSave(F){l(F)}})},createUiModel(C={},F){return Ia({get(){return C.transform?C.transform(p.ui):p.ui??F()},validate:C.validate,autoSave:!0,onSave(O){c(O)}})},useOutputs(...C){const F=r.reactive({errors:void 0,value:void 0});return r.watch(()=>p.outputs,()=>{try{Object.assign(F,{value:this.unwrapOutputs(...C),errors:void 0})}catch(O){Object.assign(F,{value:void 0,errors:[String(O)]})}},{immediate:!0,deep:!0}),F},unwrapOutputs(...C){const F=p.outputs,O=C.map(Z=>[Z,gd(F[Z])]);return Object.fromEntries(O)},getOutputField(C){return p.outputs[C]},getOutputFieldOkOptional(C){console.warn("use reactive app.outputValues.fieldName instead instead of getOutputFieldOkOptional(fieldName)");const F=this.getOutputField(C);if(F&&F.ok)return F.value},getOutputFieldErrorsOptional(C){console.warn("use reactive app.outputErrors.fieldName instead instead of getOutputFieldErrorsOptional(fieldName)");const F=this.getOutputField(C);if(F&&!F.ok)return F.errors},updateArgs(C){const F=f();return C(F),e.setBlockArgs(F)},updateUiState(C){const F=m();return e.setBlockUiState(C(F))},updateNavigationState(C){const F=y();return C(F),e.setNavigationState(F)},navigateTo(C){const F=y();return F.href=C,e.setNavigationState(F)}},T=r.computed(()=>{const C=Object.entries(p.outputs).map(([F,O])=>[F,O.ok&&O.value!==void 0?O.value:void 0]);return Object.fromEntries(C)}),N=r.computed(()=>{const C=Object.entries(p.outputs).map(([F,O])=>[F,O&&!O.ok?new Aa(O.errors):void 0]);return Object.fromEntries(C)}),M={snapshot:p,queryParams:r.computed(()=>Tm(p.navigationState.href)),href:r.computed(()=>p.navigationState.href),hasErrors:r.computed(()=>Object.values(p.outputs).some(C=>!(C!=null&&C.ok))),outputValues:r.computed(()=>(console.warn("Change app.outputValues to app.model.outputs"),T.value)),outputErrors:r.computed(()=>(console.warn("Change app.outputErrors to app.model.outputErrors"),N.value)),args:r.computed(()=>(console.warn("Change app.args to app.snapshot.args"),p.args)),outputs:r.computed(()=>(console.warn("Change app.outputs to app.snapshot.outputs"),p.outputs)),ui:r.computed(()=>(console.warn("Change app.ui to app.snapshot.ui"),p.ui)),navigationState:r.computed(()=>(console.warn("Change app.navigationState to app.snapshot.navigationState"),p.navigationState))},G=Em({get(){return{args:p.args,ui:p.ui}},autoSave:!0,onSave(C){u(C.args,C.ui)}},{outputs:T,outputErrors:N},n);return r.reactive(Object.assign(G,B,M))}var Le;(function(t){t.assertEqual=s=>s;function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const l={};for(const c of s)l[c]=c;return l},t.getValidEnumValues=s=>{const l=t.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),c={};for(const u of l)c[u]=s[u];return t.objectValues(c)},t.objectValues=s=>t.objectKeys(s).map(function(l){return s[l]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const l=[];for(const c in s)Object.prototype.hasOwnProperty.call(s,c)&&l.push(c);return l},t.find=(s,l)=>{for(const c of s)if(l(c))return c},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function o(s,l=" | "){return s.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}t.joinValues=o,t.jsonStringifyReplacer=(s,l)=>typeof l=="bigint"?l.toString():l})(Le||(Le={}));var La;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(La||(La={}));const ae=Le.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),rr=t=>{switch(typeof t){case"undefined":return ae.undefined;case"string":return ae.string;case"number":return isNaN(t)?ae.nan:ae.number;case"boolean":return ae.boolean;case"function":return ae.function;case"bigint":return ae.bigint;case"symbol":return ae.symbol;case"object":return Array.isArray(t)?ae.array:t===null?ae.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ae.promise:typeof Map<"u"&&t instanceof Map?ae.map:typeof Set<"u"&&t instanceof Set?ae.set:typeof Date<"u"&&t instanceof Date?ae.date:ae.object;default:return ae.unknown}},Q=Le.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Vm=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class It extends Error{constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(l){return l.message},o={_errors:[]},s=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(s);else if(c.code==="invalid_return_type")s(c.returnTypeError);else if(c.code==="invalid_arguments")s(c.argumentsError);else if(c.path.length===0)o._errors.push(n(c));else{let u=o,p=0;for(;p<c.path.length;){const f=c.path[p];p===c.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(c))):u[f]=u[f]||{_errors:[]},u=u[f],p++}}};return s(this),o}static assert(e){if(!(e instanceof It))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Le.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},o=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(e(s))):o.push(e(s));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}It.create=t=>new It(t);const ao=(t,e)=>{let n;switch(t.code){case Q.invalid_type:t.received===ae.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case Q.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Le.jsonStringifyReplacer)}`;break;case Q.unrecognized_keys:n=`Unrecognized key(s) in object: ${Le.joinValues(t.keys,", ")}`;break;case Q.invalid_union:n="Invalid input";break;case Q.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Le.joinValues(t.options)}`;break;case Q.invalid_enum_value:n=`Invalid enum value. Expected ${Le.joinValues(t.options)}, received '${t.received}'`;break;case Q.invalid_arguments:n="Invalid function arguments";break;case Q.invalid_return_type:n="Invalid function return type";break;case Q.invalid_date:n="Invalid date";break;case Q.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Le.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case Q.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case Q.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case Q.custom:n="Invalid input";break;case Q.invalid_intersection_types:n="Intersection results could not be merged";break;case Q.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case Q.not_finite:n="Number must be finite";break;default:n=e.defaultError,Le.assertNever(t)}return{message:n}};let _d=ao;function Nm(t){_d=t}function os(){return _d}const is=t=>{const{data:e,path:n,errorMaps:o,issueData:s}=t,l=[...n,...s.path||[]],c={...s,path:l};if(s.message!==void 0)return{...s,path:l,message:s.message};let u="";const p=o.filter(f=>!!f).slice().reverse();for(const f of p)u=f(c,{data:e,defaultError:u}).message;return{...s,path:l,message:u}},Am=[];function ie(t,e){const n=os(),o=is({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===ao?void 0:ao].filter(s=>!!s)});t.common.issues.push(o)}class _t{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const o=[];for(const s of n){if(s.status==="aborted")return Ce;s.status==="dirty"&&e.dirty(),o.push(s.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,n){const o=[];for(const s of n){const l=await s.key,c=await s.value;o.push({key:l,value:c})}return _t.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const s of n){const{key:l,value:c}=s;if(l.status==="aborted"||c.status==="aborted")return Ce;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||s.alwaysSet)&&(o[l.value]=c.value)}return{status:e.value,value:o}}}const Ce=Object.freeze({status:"aborted"}),lo=t=>({status:"dirty",value:t}),St=t=>({status:"valid",value:t}),Oa=t=>t.status==="aborted",Ga=t=>t.status==="dirty",Wo=t=>t.status==="valid",Ho=t=>typeof Promise<"u"&&t instanceof Promise;function ss(t,e,n,o){if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function vd(t,e,n,o,s){if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}typeof SuppressedError=="function"&&SuppressedError;var pe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(pe||(pe={}));var jo,qo;class Bn{constructor(e,n,o,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=o,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Cd=(t,e)=>{if(Wo(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new It(t.common.issues);return this._error=n,this._error}}};function Te(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:s}=t;if(e&&(n||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(c,u)=>{var p,f;const{message:m}=t;return c.code==="invalid_enum_value"?{message:m??u.defaultError}:typeof u.data>"u"?{message:(p=m??o)!==null&&p!==void 0?p:u.defaultError}:c.code!=="invalid_type"?{message:u.defaultError}:{message:(f=m??n)!==null&&f!==void 0?f:u.defaultError}},description:s}}class Ne{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return rr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:rr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new _t,ctx:{common:e.parent.common,data:e.data,parsedType:rr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Ho(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const o=this.safeParse(e,n);if(o.success)return o.data;throw o.error}safeParse(e,n){var o;const s={common:{issues:[],async:(o=n==null?void 0:n.async)!==null&&o!==void 0?o:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:rr(e)},l=this._parseSync({data:e,path:s.path,parent:s});return Cd(s,l)}async parseAsync(e,n){const o=await this.safeParseAsync(e,n);if(o.success)return o.data;throw o.error}async safeParseAsync(e,n){const o={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:rr(e)},s=this._parse({data:e,path:o.path,parent:o}),l=await(Ho(s)?s:Promise.resolve(s));return Cd(o,l)}refine(e,n){const o=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,l)=>{const c=e(s),u=()=>l.addIssue({code:Q.custom,...o(s)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(u(),!1)):c?!0:(u(),!1)})}refinement(e,n){return this._refinement((o,s)=>e(o)?!0:(s.addIssue(typeof n=="function"?n(o,s):n),!1))}_refinement(e){return new an({schema:this,typeName:_e.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Nn.create(this,this._def)}nullable(){return ar.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return sn.create(this,this._def)}promise(){return ho.create(this,this._def)}or(e){return Xo.create([this,e],this._def)}and(e){return Qo.create(this,e,this._def)}transform(e){return new an({...Te(this._def),schema:this,typeName:_e.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new oi({...Te(this._def),innerType:this,defaultValue:n,typeName:_e.ZodDefault})}brand(){return new Za({typeName:_e.ZodBranded,type:this,...Te(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new ii({...Te(this._def),innerType:this,catchValue:n,typeName:_e.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return si.create(this,e)}readonly(){return ai.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Pm=/^c[^\s-]{8,}$/i,Dm=/^[0-9a-z]+$/,Fm=/^[0-9A-HJKMNP-TV-Z]{26}$/,Rm=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Mm=/^[a-z0-9_-]{21}$/i,Im=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Lm=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Om="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let za;const Gm=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,zm=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,$m=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,wd="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Zm=new RegExp(`^${wd}$`);function bd(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Um(t){return new RegExp(`^${bd(t)}$`)}function xd(t){let e=`${wd}T${bd(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function Wm(t,e){return!!((e==="v4"||!e)&&Gm.test(t)||(e==="v6"||!e)&&zm.test(t))}class on extends Ne{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ae.string){const l=this._getOrReturnCtx(e);return ie(l,{code:Q.invalid_type,expected:ae.string,received:l.parsedType}),Ce}const o=new _t;let s;for(const l of this._def.checks)if(l.kind==="min")e.data.length<l.value&&(s=this._getOrReturnCtx(e,s),ie(s,{code:Q.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if(l.kind==="max")e.data.length>l.value&&(s=this._getOrReturnCtx(e,s),ie(s,{code:Q.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if(l.kind==="length"){const c=e.data.length>l.value,u=e.data.length<l.value;(c||u)&&(s=this._getOrReturnCtx(e,s),c?ie(s,{code:Q.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):u&&ie(s,{code:Q.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),o.dirty())}else if(l.kind==="email")Lm.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"email",code:Q.invalid_string,message:l.message}),o.dirty());else if(l.kind==="emoji")za||(za=new RegExp(Om,"u")),za.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"emoji",code:Q.invalid_string,message:l.message}),o.dirty());else if(l.kind==="uuid")Rm.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"uuid",code:Q.invalid_string,message:l.message}),o.dirty());else if(l.kind==="nanoid")Mm.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"nanoid",code:Q.invalid_string,message:l.message}),o.dirty());else if(l.kind==="cuid")Pm.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"cuid",code:Q.invalid_string,message:l.message}),o.dirty());else if(l.kind==="cuid2")Dm.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"cuid2",code:Q.invalid_string,message:l.message}),o.dirty());else if(l.kind==="ulid")Fm.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"ulid",code:Q.invalid_string,message:l.message}),o.dirty());else if(l.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),ie(s,{validation:"url",code:Q.invalid_string,message:l.message}),o.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"regex",code:Q.invalid_string,message:l.message}),o.dirty())):l.kind==="trim"?e.data=e.data.trim():l.kind==="includes"?e.data.includes(l.value,l.position)||(s=this._getOrReturnCtx(e,s),ie(s,{code:Q.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),o.dirty()):l.kind==="toLowerCase"?e.data=e.data.toLowerCase():l.kind==="toUpperCase"?e.data=e.data.toUpperCase():l.kind==="startsWith"?e.data.startsWith(l.value)||(s=this._getOrReturnCtx(e,s),ie(s,{code:Q.invalid_string,validation:{startsWith:l.value},message:l.message}),o.dirty()):l.kind==="endsWith"?e.data.endsWith(l.value)||(s=this._getOrReturnCtx(e,s),ie(s,{code:Q.invalid_string,validation:{endsWith:l.value},message:l.message}),o.dirty()):l.kind==="datetime"?xd(l).test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{code:Q.invalid_string,validation:"datetime",message:l.message}),o.dirty()):l.kind==="date"?Zm.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{code:Q.invalid_string,validation:"date",message:l.message}),o.dirty()):l.kind==="time"?Um(l).test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{code:Q.invalid_string,validation:"time",message:l.message}),o.dirty()):l.kind==="duration"?Im.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"duration",code:Q.invalid_string,message:l.message}),o.dirty()):l.kind==="ip"?Wm(e.data,l.version)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"ip",code:Q.invalid_string,message:l.message}),o.dirty()):l.kind==="base64"?$m.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"base64",code:Q.invalid_string,message:l.message}),o.dirty()):Le.assertNever(l);return{status:o.value,value:e.data}}_regex(e,n,o){return this.refinement(s=>e.test(s),{validation:n,code:Q.invalid_string,...pe.errToObj(o)})}_addCheck(e){return new on({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...pe.errToObj(e)})}url(e){return this._addCheck({kind:"url",...pe.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...pe.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...pe.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...pe.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...pe.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...pe.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...pe.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...pe.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...pe.errToObj(e)})}datetime(e){var n,o;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(o=e==null?void 0:e.local)!==null&&o!==void 0?o:!1,...pe.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...pe.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...pe.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...pe.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...pe.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...pe.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...pe.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...pe.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...pe.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...pe.errToObj(n)})}nonempty(e){return this.min(1,pe.errToObj(e))}trim(){return new on({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new on({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new on({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}on.create=t=>{var e;return new on({checks:[],typeName:_e.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Te(t)})};function Hm(t,e){const n=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,s=n>o?n:o,l=parseInt(t.toFixed(s).replace(".","")),c=parseInt(e.toFixed(s).replace(".",""));return l%c/Math.pow(10,s)}class or extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ae.number){const l=this._getOrReturnCtx(e);return ie(l,{code:Q.invalid_type,expected:ae.number,received:l.parsedType}),Ce}let o;const s=new _t;for(const l of this._def.checks)l.kind==="int"?Le.isInteger(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:Q.invalid_type,expected:"integer",received:"float",message:l.message}),s.dirty()):l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:Q.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),s.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:Q.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),s.dirty()):l.kind==="multipleOf"?Hm(e.data,l.value)!==0&&(o=this._getOrReturnCtx(e,o),ie(o,{code:Q.not_multiple_of,multipleOf:l.value,message:l.message}),s.dirty()):l.kind==="finite"?Number.isFinite(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:Q.not_finite,message:l.message}),s.dirty()):Le.assertNever(l);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,pe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,pe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,pe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,pe.toString(n))}setLimit(e,n,o,s){return new or({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:pe.toString(s)}]})}_addCheck(e){return new or({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:pe.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:pe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:pe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:pe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:pe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:pe.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:pe.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:pe.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:pe.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Le.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(n)&&Number.isFinite(e)}}or.create=t=>new or({checks:[],typeName:_e.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Te(t)});class ir extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==ae.bigint){const l=this._getOrReturnCtx(e);return ie(l,{code:Q.invalid_type,expected:ae.bigint,received:l.parsedType}),Ce}let o;const s=new _t;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:Q.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),s.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:Q.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),s.dirty()):l.kind==="multipleOf"?e.data%l.value!==BigInt(0)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:Q.not_multiple_of,multipleOf:l.value,message:l.message}),s.dirty()):Le.assertNever(l);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,pe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,pe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,pe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,pe.toString(n))}setLimit(e,n,o,s){return new ir({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:pe.toString(s)}]})}_addCheck(e){return new ir({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:pe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:pe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:pe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:pe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:pe.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}ir.create=t=>{var e;return new ir({checks:[],typeName:_e.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Te(t)})};class Ko extends Ne{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ae.boolean){const o=this._getOrReturnCtx(e);return ie(o,{code:Q.invalid_type,expected:ae.boolean,received:o.parsedType}),Ce}return St(e.data)}}Ko.create=t=>new Ko({typeName:_e.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Te(t)});class Or extends Ne{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ae.date){const l=this._getOrReturnCtx(e);return ie(l,{code:Q.invalid_type,expected:ae.date,received:l.parsedType}),Ce}if(isNaN(e.data.getTime())){const l=this._getOrReturnCtx(e);return ie(l,{code:Q.invalid_date}),Ce}const o=new _t;let s;for(const l of this._def.checks)l.kind==="min"?e.data.getTime()<l.value&&(s=this._getOrReturnCtx(e,s),ie(s,{code:Q.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),o.dirty()):l.kind==="max"?e.data.getTime()>l.value&&(s=this._getOrReturnCtx(e,s),ie(s,{code:Q.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),o.dirty()):Le.assertNever(l);return{status:o.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Or({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:pe.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:pe.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Or.create=t=>new Or({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:_e.ZodDate,...Te(t)});class as extends Ne{_parse(e){if(this._getType(e)!==ae.symbol){const o=this._getOrReturnCtx(e);return ie(o,{code:Q.invalid_type,expected:ae.symbol,received:o.parsedType}),Ce}return St(e.data)}}as.create=t=>new as({typeName:_e.ZodSymbol,...Te(t)});class Yo extends Ne{_parse(e){if(this._getType(e)!==ae.undefined){const o=this._getOrReturnCtx(e);return ie(o,{code:Q.invalid_type,expected:ae.undefined,received:o.parsedType}),Ce}return St(e.data)}}Yo.create=t=>new Yo({typeName:_e.ZodUndefined,...Te(t)});class Jo extends Ne{_parse(e){if(this._getType(e)!==ae.null){const o=this._getOrReturnCtx(e);return ie(o,{code:Q.invalid_type,expected:ae.null,received:o.parsedType}),Ce}return St(e.data)}}Jo.create=t=>new Jo({typeName:_e.ZodNull,...Te(t)});class co extends Ne{constructor(){super(...arguments),this._any=!0}_parse(e){return St(e.data)}}co.create=t=>new co({typeName:_e.ZodAny,...Te(t)});class Gr extends Ne{constructor(){super(...arguments),this._unknown=!0}_parse(e){return St(e.data)}}Gr.create=t=>new Gr({typeName:_e.ZodUnknown,...Te(t)});class Gn extends Ne{_parse(e){const n=this._getOrReturnCtx(e);return ie(n,{code:Q.invalid_type,expected:ae.never,received:n.parsedType}),Ce}}Gn.create=t=>new Gn({typeName:_e.ZodNever,...Te(t)});class ls extends Ne{_parse(e){if(this._getType(e)!==ae.undefined){const o=this._getOrReturnCtx(e);return ie(o,{code:Q.invalid_type,expected:ae.void,received:o.parsedType}),Ce}return St(e.data)}}ls.create=t=>new ls({typeName:_e.ZodVoid,...Te(t)});class sn extends Ne{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),s=this._def;if(n.parsedType!==ae.array)return ie(n,{code:Q.invalid_type,expected:ae.array,received:n.parsedType}),Ce;if(s.exactLength!==null){const c=n.data.length>s.exactLength.value,u=n.data.length<s.exactLength.value;(c||u)&&(ie(n,{code:c?Q.too_big:Q.too_small,minimum:u?s.exactLength.value:void 0,maximum:c?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),o.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(ie(n,{code:Q.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),o.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(ie(n,{code:Q.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((c,u)=>s.type._parseAsync(new Bn(n,c,n.path,u)))).then(c=>_t.mergeArray(o,c));const l=[...n.data].map((c,u)=>s.type._parseSync(new Bn(n,c,n.path,u)));return _t.mergeArray(o,l)}get element(){return this._def.type}min(e,n){return new sn({...this._def,minLength:{value:e,message:pe.toString(n)}})}max(e,n){return new sn({...this._def,maxLength:{value:e,message:pe.toString(n)}})}length(e,n){return new sn({...this._def,exactLength:{value:e,message:pe.toString(n)}})}nonempty(e){return this.min(1,e)}}sn.create=(t,e)=>new sn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:_e.ZodArray,...Te(e)});function uo(t){if(t instanceof Qe){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=Nn.create(uo(o))}return new Qe({...t._def,shape:()=>e})}else return t instanceof sn?new sn({...t._def,type:uo(t.element)}):t instanceof Nn?Nn.create(uo(t.unwrap())):t instanceof ar?ar.create(uo(t.unwrap())):t instanceof Vn?Vn.create(t.items.map(e=>uo(e))):t}class Qe extends Ne{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Le.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==ae.object){const f=this._getOrReturnCtx(e);return ie(f,{code:Q.invalid_type,expected:ae.object,received:f.parsedType}),Ce}const{status:o,ctx:s}=this._processInputParams(e),{shape:l,keys:c}=this._getCached(),u=[];if(!(this._def.catchall instanceof Gn&&this._def.unknownKeys==="strip"))for(const f in s.data)c.includes(f)||u.push(f);const p=[];for(const f of c){const m=l[f],y=s.data[f];p.push({key:{status:"valid",value:f},value:m._parse(new Bn(s,y,s.path,f)),alwaysSet:f in s.data})}if(this._def.catchall instanceof Gn){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of u)p.push({key:{status:"valid",value:m},value:{status:"valid",value:s.data[m]}});else if(f==="strict")u.length>0&&(ie(s,{code:Q.unrecognized_keys,keys:u}),o.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of u){const y=s.data[m];p.push({key:{status:"valid",value:m},value:f._parse(new Bn(s,y,s.path,m)),alwaysSet:m in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of p){const y=await m.key,B=await m.value;f.push({key:y,value:B,alwaysSet:m.alwaysSet})}return f}).then(f=>_t.mergeObjectSync(o,f)):_t.mergeObjectSync(o,p)}get shape(){return this._def.shape()}strict(e){return pe.errToObj,new Qe({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,o)=>{var s,l,c,u;const p=(c=(l=(s=this._def).errorMap)===null||l===void 0?void 0:l.call(s,n,o).message)!==null&&c!==void 0?c:o.defaultError;return n.code==="unrecognized_keys"?{message:(u=pe.errToObj(e).message)!==null&&u!==void 0?u:p}:{message:p}}}:{}})}strip(){return new Qe({...this._def,unknownKeys:"strip"})}passthrough(){return new Qe({...this._def,unknownKeys:"passthrough"})}extend(e){return new Qe({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Qe({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_e.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Qe({...this._def,catchall:e})}pick(e){const n={};return Le.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(n[o]=this.shape[o])}),new Qe({...this._def,shape:()=>n})}omit(e){const n={};return Le.objectKeys(this.shape).forEach(o=>{e[o]||(n[o]=this.shape[o])}),new Qe({...this._def,shape:()=>n})}deepPartial(){return uo(this)}partial(e){const n={};return Le.objectKeys(this.shape).forEach(o=>{const s=this.shape[o];e&&!e[o]?n[o]=s:n[o]=s.optional()}),new Qe({...this._def,shape:()=>n})}required(e){const n={};return Le.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])n[o]=this.shape[o];else{let l=this.shape[o];for(;l instanceof Nn;)l=l._def.innerType;n[o]=l}}),new Qe({...this._def,shape:()=>n})}keyof(){return kd(Le.objectKeys(this.shape))}}Qe.create=(t,e)=>new Qe({shape:()=>t,unknownKeys:"strip",catchall:Gn.create(),typeName:_e.ZodObject,...Te(e)}),Qe.strictCreate=(t,e)=>new Qe({shape:()=>t,unknownKeys:"strict",catchall:Gn.create(),typeName:_e.ZodObject,...Te(e)}),Qe.lazycreate=(t,e)=>new Qe({shape:t,unknownKeys:"strip",catchall:Gn.create(),typeName:_e.ZodObject,...Te(e)});class Xo extends Ne{_parse(e){const{ctx:n}=this._processInputParams(e),o=this._def.options;function s(l){for(const u of l)if(u.result.status==="valid")return u.result;for(const u of l)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const c=l.map(u=>new It(u.ctx.common.issues));return ie(n,{code:Q.invalid_union,unionErrors:c}),Ce}if(n.common.async)return Promise.all(o.map(async l=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(s);{let l;const c=[];for(const p of o){const f={...n,common:{...n.common,issues:[]},parent:null},m=p._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!l&&(l={result:m,ctx:f}),f.common.issues.length&&c.push(f.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const u=c.map(p=>new It(p));return ie(n,{code:Q.invalid_union,unionErrors:u}),Ce}}get options(){return this._def.options}}Xo.create=(t,e)=>new Xo({options:t,typeName:_e.ZodUnion,...Te(e)});const zn=t=>t instanceof ti?zn(t.schema):t instanceof an?zn(t.innerType()):t instanceof ni?[t.value]:t instanceof sr?t.options:t instanceof ri?Le.objectValues(t.enum):t instanceof oi?zn(t._def.innerType):t instanceof Yo?[void 0]:t instanceof Jo?[null]:t instanceof Nn?[void 0,...zn(t.unwrap())]:t instanceof ar?[null,...zn(t.unwrap())]:t instanceof Za||t instanceof ai?zn(t.unwrap()):t instanceof ii?zn(t._def.innerType):[];class cs extends Ne{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.object)return ie(n,{code:Q.invalid_type,expected:ae.object,received:n.parsedType}),Ce;const o=this.discriminator,s=n.data[o],l=this.optionsMap.get(s);return l?n.common.async?l._parseAsync({data:n.data,path:n.path,parent:n}):l._parseSync({data:n.data,path:n.path,parent:n}):(ie(n,{code:Q.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),Ce)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,o){const s=new Map;for(const l of n){const c=zn(l.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const u of c){if(s.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);s.set(u,l)}}return new cs({typeName:_e.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:s,...Te(o)})}}function $a(t,e){const n=rr(t),o=rr(e);if(t===e)return{valid:!0,data:t};if(n===ae.object&&o===ae.object){const s=Le.objectKeys(e),l=Le.objectKeys(t).filter(u=>s.indexOf(u)!==-1),c={...t,...e};for(const u of l){const p=$a(t[u],e[u]);if(!p.valid)return{valid:!1};c[u]=p.data}return{valid:!0,data:c}}else if(n===ae.array&&o===ae.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let l=0;l<t.length;l++){const c=t[l],u=e[l],p=$a(c,u);if(!p.valid)return{valid:!1};s.push(p.data)}return{valid:!0,data:s}}else return n===ae.date&&o===ae.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Qo extends Ne{_parse(e){const{status:n,ctx:o}=this._processInputParams(e),s=(l,c)=>{if(Oa(l)||Oa(c))return Ce;const u=$a(l.value,c.value);return u.valid?((Ga(l)||Ga(c))&&n.dirty(),{status:n.value,value:u.data}):(ie(o,{code:Q.invalid_intersection_types}),Ce)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([l,c])=>s(l,c)):s(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}Qo.create=(t,e,n)=>new Qo({left:t,right:e,typeName:_e.ZodIntersection,...Te(n)});class Vn extends Ne{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.array)return ie(o,{code:Q.invalid_type,expected:ae.array,received:o.parsedType}),Ce;if(o.data.length<this._def.items.length)return ie(o,{code:Q.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ce;!this._def.rest&&o.data.length>this._def.items.length&&(ie(o,{code:Q.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const l=[...o.data].map((c,u)=>{const p=this._def.items[u]||this._def.rest;return p?p._parse(new Bn(o,c,o.path,u)):null}).filter(c=>!!c);return o.common.async?Promise.all(l).then(c=>_t.mergeArray(n,c)):_t.mergeArray(n,l)}get items(){return this._def.items}rest(e){return new Vn({...this._def,rest:e})}}Vn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Vn({items:t,typeName:_e.ZodTuple,rest:null,...Te(e)})};class ei extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.object)return ie(o,{code:Q.invalid_type,expected:ae.object,received:o.parsedType}),Ce;const s=[],l=this._def.keyType,c=this._def.valueType;for(const u in o.data)s.push({key:l._parse(new Bn(o,u,o.path,u)),value:c._parse(new Bn(o,o.data[u],o.path,u)),alwaysSet:u in o.data});return o.common.async?_t.mergeObjectAsync(n,s):_t.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,o){return n instanceof Ne?new ei({keyType:e,valueType:n,typeName:_e.ZodRecord,...Te(o)}):new ei({keyType:on.create(),valueType:e,typeName:_e.ZodRecord,...Te(n)})}}class ds extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.map)return ie(o,{code:Q.invalid_type,expected:ae.map,received:o.parsedType}),Ce;const s=this._def.keyType,l=this._def.valueType,c=[...o.data.entries()].map(([u,p],f)=>({key:s._parse(new Bn(o,u,o.path,[f,"key"])),value:l._parse(new Bn(o,p,o.path,[f,"value"]))}));if(o.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const p of c){const f=await p.key,m=await p.value;if(f.status==="aborted"||m.status==="aborted")return Ce;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const p of c){const f=p.key,m=p.value;if(f.status==="aborted"||m.status==="aborted")return Ce;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}ds.create=(t,e,n)=>new ds({valueType:e,keyType:t,typeName:_e.ZodMap,...Te(n)});class zr extends Ne{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.set)return ie(o,{code:Q.invalid_type,expected:ae.set,received:o.parsedType}),Ce;const s=this._def;s.minSize!==null&&o.data.size<s.minSize.value&&(ie(o,{code:Q.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&o.data.size>s.maxSize.value&&(ie(o,{code:Q.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const l=this._def.valueType;function c(p){const f=new Set;for(const m of p){if(m.status==="aborted")return Ce;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const u=[...o.data.values()].map((p,f)=>l._parse(new Bn(o,p,o.path,f)));return o.common.async?Promise.all(u).then(p=>c(p)):c(u)}min(e,n){return new zr({...this._def,minSize:{value:e,message:pe.toString(n)}})}max(e,n){return new zr({...this._def,maxSize:{value:e,message:pe.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}zr.create=(t,e)=>new zr({valueType:t,minSize:null,maxSize:null,typeName:_e.ZodSet,...Te(e)});class po extends Ne{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.function)return ie(n,{code:Q.invalid_type,expected:ae.function,received:n.parsedType}),Ce;function o(u,p){return is({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,os(),ao].filter(f=>!!f),issueData:{code:Q.invalid_arguments,argumentsError:p}})}function s(u,p){return is({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,os(),ao].filter(f=>!!f),issueData:{code:Q.invalid_return_type,returnTypeError:p}})}const l={errorMap:n.common.contextualErrorMap},c=n.data;if(this._def.returns instanceof ho){const u=this;return St(async function(...p){const f=new It([]),m=await u._def.args.parseAsync(p,l).catch(T=>{throw f.addIssue(o(p,T)),f}),y=await Reflect.apply(c,this,m);return await u._def.returns._def.type.parseAsync(y,l).catch(T=>{throw f.addIssue(s(y,T)),f})})}else{const u=this;return St(function(...p){const f=u._def.args.safeParse(p,l);if(!f.success)throw new It([o(p,f.error)]);const m=Reflect.apply(c,this,f.data),y=u._def.returns.safeParse(m,l);if(!y.success)throw new It([s(m,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new po({...this._def,args:Vn.create(e).rest(Gr.create())})}returns(e){return new po({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,o){return new po({args:e||Vn.create([]).rest(Gr.create()),returns:n||Gr.create(),typeName:_e.ZodFunction,...Te(o)})}}class ti extends Ne{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ti.create=(t,e)=>new ti({getter:t,typeName:_e.ZodLazy,...Te(e)});class ni extends Ne{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return ie(n,{received:n.data,code:Q.invalid_literal,expected:this._def.value}),Ce}return{status:"valid",value:e.data}}get value(){return this._def.value}}ni.create=(t,e)=>new ni({value:t,typeName:_e.ZodLiteral,...Te(e)});function kd(t,e){return new sr({values:t,typeName:_e.ZodEnum,...Te(e)})}class sr extends Ne{constructor(){super(...arguments),jo.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),o=this._def.values;return ie(n,{expected:Le.joinValues(o),received:n.parsedType,code:Q.invalid_type}),Ce}if(ss(this,jo)||vd(this,jo,new Set(this._def.values)),!ss(this,jo).has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return ie(n,{received:n.data,code:Q.invalid_enum_value,options:o}),Ce}return St(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return sr.create(e,{...this._def,...n})}exclude(e,n=this._def){return sr.create(this.options.filter(o=>!e.includes(o)),{...this._def,...n})}}jo=new WeakMap,sr.create=kd;class ri extends Ne{constructor(){super(...arguments),qo.set(this,void 0)}_parse(e){const n=Le.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==ae.string&&o.parsedType!==ae.number){const s=Le.objectValues(n);return ie(o,{expected:Le.joinValues(s),received:o.parsedType,code:Q.invalid_type}),Ce}if(ss(this,qo)||vd(this,qo,new Set(Le.getValidEnumValues(this._def.values))),!ss(this,qo).has(e.data)){const s=Le.objectValues(n);return ie(o,{received:o.data,code:Q.invalid_enum_value,options:s}),Ce}return St(e.data)}get enum(){return this._def.values}}qo=new WeakMap,ri.create=(t,e)=>new ri({values:t,typeName:_e.ZodNativeEnum,...Te(e)});class ho extends Ne{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.promise&&n.common.async===!1)return ie(n,{code:Q.invalid_type,expected:ae.promise,received:n.parsedType}),Ce;const o=n.parsedType===ae.promise?n.data:Promise.resolve(n.data);return St(o.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}ho.create=(t,e)=>new ho({type:t,typeName:_e.ZodPromise,...Te(e)});class an extends Ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_e.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:o}=this._processInputParams(e),s=this._def.effect||null,l={addIssue:c=>{ie(o,c),c.fatal?n.abort():n.dirty()},get path(){return o.path}};if(l.addIssue=l.addIssue.bind(l),s.type==="preprocess"){const c=s.transform(o.data,l);if(o.common.async)return Promise.resolve(c).then(async u=>{if(n.value==="aborted")return Ce;const p=await this._def.schema._parseAsync({data:u,path:o.path,parent:o});return p.status==="aborted"?Ce:p.status==="dirty"||n.value==="dirty"?lo(p.value):p});{if(n.value==="aborted")return Ce;const u=this._def.schema._parseSync({data:c,path:o.path,parent:o});return u.status==="aborted"?Ce:u.status==="dirty"||n.value==="dirty"?lo(u.value):u}}if(s.type==="refinement"){const c=u=>{const p=s.refinement(u,l);if(o.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(o.common.async===!1){const u=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return u.status==="aborted"?Ce:(u.status==="dirty"&&n.dirty(),c(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(u=>u.status==="aborted"?Ce:(u.status==="dirty"&&n.dirty(),c(u.value).then(()=>({status:n.value,value:u.value}))))}if(s.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Wo(c))return c;const u=s.transform(c.value,l);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>Wo(c)?Promise.resolve(s.transform(c.value,l)).then(u=>({status:n.value,value:u})):c);Le.assertNever(s)}}an.create=(t,e,n)=>new an({schema:t,typeName:_e.ZodEffects,effect:e,...Te(n)}),an.createWithPreprocess=(t,e,n)=>new an({schema:e,effect:{type:"preprocess",transform:t},typeName:_e.ZodEffects,...Te(n)});class Nn extends Ne{_parse(e){return this._getType(e)===ae.undefined?St(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Nn.create=(t,e)=>new Nn({innerType:t,typeName:_e.ZodOptional,...Te(e)});class ar extends Ne{_parse(e){return this._getType(e)===ae.null?St(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ar.create=(t,e)=>new ar({innerType:t,typeName:_e.ZodNullable,...Te(e)});class oi extends Ne{_parse(e){const{ctx:n}=this._processInputParams(e);let o=n.data;return n.parsedType===ae.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}oi.create=(t,e)=>new oi({innerType:t,typeName:_e.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Te(e)});class ii extends Ne{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Ho(s)?s.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new It(o.common.issues)},input:o.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new It(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}ii.create=(t,e)=>new ii({innerType:t,typeName:_e.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Te(e)});class us extends Ne{_parse(e){if(this._getType(e)!==ae.nan){const o=this._getOrReturnCtx(e);return ie(o,{code:Q.invalid_type,expected:ae.nan,received:o.parsedType}),Ce}return{status:"valid",value:e.data}}}us.create=t=>new us({typeName:_e.ZodNaN,...Te(t)});const jm=Symbol("zod_brand");class Za extends Ne{_parse(e){const{ctx:n}=this._processInputParams(e),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}}class si extends Ne{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return l.status==="aborted"?Ce:l.status==="dirty"?(n.dirty(),lo(l.value)):this._def.out._parseAsync({data:l.value,path:o.path,parent:o})})();{const s=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?Ce:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:o.path,parent:o})}}static create(e,n){return new si({in:e,out:n,typeName:_e.ZodPipeline})}}class ai extends Ne{_parse(e){const n=this._def.innerType._parse(e),o=s=>(Wo(s)&&(s.value=Object.freeze(s.value)),s);return Ho(n)?n.then(s=>o(s)):o(n)}unwrap(){return this._def.innerType}}ai.create=(t,e)=>new ai({innerType:t,typeName:_e.ZodReadonly,...Te(e)});function Sd(t,e={},n){return t?co.create().superRefine((o,s)=>{var l,c;if(!t(o)){const u=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,p=(c=(l=u.fatal)!==null&&l!==void 0?l:n)!==null&&c!==void 0?c:!0,f=typeof u=="string"?{message:u}:u;s.addIssue({code:"custom",...f,fatal:p})}}):co.create()}const qm={object:Qe.lazycreate};var _e;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(_e||(_e={}));const Km=(t,e={message:`Input not instance of ${t.name}`})=>Sd(n=>n instanceof t,e),Ed=on.create,Td=or.create,Ym=us.create,Jm=ir.create,Bd=Ko.create,Xm=Or.create,Qm=as.create,eg=Yo.create,tg=Jo.create,ng=co.create,rg=Gr.create,og=Gn.create,ig=ls.create,sg=sn.create,ag=Qe.create,lg=Qe.strictCreate,cg=Xo.create,dg=cs.create,ug=Qo.create,pg=Vn.create,hg=ei.create,fg=ds.create,mg=zr.create,gg=po.create,yg=ti.create,_g=ni.create,vg=sr.create,Cg=ri.create,wg=ho.create,Vd=an.create,bg=Nn.create,xg=ar.create,kg=an.createWithPreprocess,Sg=si.create;var An=Object.freeze({__proto__:null,defaultErrorMap:ao,setErrorMap:Nm,getErrorMap:os,makeIssue:is,EMPTY_PATH:Am,addIssueToContext:ie,ParseStatus:_t,INVALID:Ce,DIRTY:lo,OK:St,isAborted:Oa,isDirty:Ga,isValid:Wo,isAsync:Ho,get util(){return Le},get objectUtil(){return La},ZodParsedType:ae,getParsedType:rr,ZodType:Ne,datetimeRegex:xd,ZodString:on,ZodNumber:or,ZodBigInt:ir,ZodBoolean:Ko,ZodDate:Or,ZodSymbol:as,ZodUndefined:Yo,ZodNull:Jo,ZodAny:co,ZodUnknown:Gr,ZodNever:Gn,ZodVoid:ls,ZodArray:sn,ZodObject:Qe,ZodUnion:Xo,ZodDiscriminatedUnion:cs,ZodIntersection:Qo,ZodTuple:Vn,ZodRecord:ei,ZodMap:ds,ZodSet:zr,ZodFunction:po,ZodLazy:ti,ZodLiteral:ni,ZodEnum:sr,ZodNativeEnum:ri,ZodPromise:ho,ZodEffects:an,ZodTransformer:an,ZodOptional:Nn,ZodNullable:ar,ZodDefault:oi,ZodCatch:ii,ZodNaN:us,BRAND:jm,ZodBranded:Za,ZodPipeline:si,ZodReadonly:ai,custom:Sd,Schema:Ne,ZodSchema:Ne,late:qm,get ZodFirstPartyTypeKind(){return _e},coerce:{string:t=>on.create({...t,coerce:!0}),number:t=>or.create({...t,coerce:!0}),boolean:t=>Ko.create({...t,coerce:!0}),bigint:t=>ir.create({...t,coerce:!0}),date:t=>Or.create({...t,coerce:!0})},any:ng,array:sg,bigint:Jm,boolean:Bd,date:Xm,discriminatedUnion:dg,effect:Vd,enum:vg,function:gg,instanceof:Km,intersection:ug,lazy:yg,literal:_g,map:fg,nan:Ym,nativeEnum:Cg,never:og,null:tg,nullable:xg,number:Td,object:ag,oboolean:()=>Bd().optional(),onumber:()=>Td().optional(),optional:bg,ostring:()=>Ed().optional(),pipeline:Sg,preprocess:kg,promise:wg,record:hg,set:mg,strictObject:lg,string:Ed,symbol:Qm,transformer:Vd,tuple:pg,undefined:eg,union:cg,unknown:rg,void:ig,NEVER:Ce,ZodIssueCode:Q,quotelessJson:Vm,ZodError:It});function Eg(t){throw new Error("Unexpected object: "+t)}const Tg=-2147483648,Nd=-9007199254740991n,Bg=NaN,Vg=NaN,Ng=null,Ag=null;function Ad(t,e){switch(e){case"Int":return t===Tg;case"Long":return t===Number(Nd)||t===Nd;case"Float":return t===Bg;case"Double":return t===Vg;case"String":return t===Ng;case"Bytes":return t===Ag;default:throw Error(`unsupported data type: ${e}`)}}function Pg(t,e){const n=Math.floor(e/8),o=1<<7-e%8;return(t[n]&o)>0}function Ua(t){const{type:e,name:n,domain:o}=t;return{type:e,name:n,...o&&{domain:o}}}function Pd(t){return t.map(Ua)}function ps(t,e){switch(t.type){case"column":return{type:"column",column:e(t.column)};case"inner":case"full":return{type:t.type,entries:t.entries.map(n=>ps(n,e))};case"outer":return{type:"outer",primary:ps(t.primary,e),secondary:t.secondary.map(n=>ps(n,e))};default:Eg(t)}}An.object({__isRef:An.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:An.string().describe("Upstream block id"),name:An.string().describe("Name of the output provided to the upstream block's output context")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").strict().readonly();function Dg(t){if(t&&typeof globalThis.getPlatforma=="function")return globalThis.getPlatforma(t);if(typeof globalThis.platforma<"u")return globalThis.platforma;throw new Error("Can't get platforma instance.")}const Fg=An.object({type:An.string(),importance:An.number().optional(),id:An.string().optional(),label:An.string()});An.array(Fg);const Rg="1.13.15";function Mg(){return Dg({sdkVersion:Rg})}function Ig(t){if(typeof globalThis.getEnvironmentValue=="function")return globalThis.getEnvironmentValue(t)}function fo(t){return!!t&&typeof t.children<"u"}function lr(t){return fo(t)?t.groupId:t.colId}function Dd(t,e,n){const o=(c,u)=>{const p=c.children.map(lr),f=x._includes(p,lr(u)),m=x._last(c.children),y=m&&lr(m)!==lr(u);return f&&y};if(!fo(t))return!0;const s=t,l=n;if(o(s,l))return s.children.push(l),!0;if(s.groupId===e){const c=s.children.map(lr);if(!x._includes(c,lr(l)))return s.children.push(l),!0}for(let c=s.children.length-1;c>=0&&!Dd(s.children[c],e,n);c--);return!1}function Lg(t){const e=(s,l)=>fo(s)&&fo(l)&&lr(s)===lr(l),n=(s,l)=>{if(!fo(l))return s;const c=s,u=l;return u.children&&u.groupId&&Dd(c,u.groupId,u.children[0])||u.children.forEach(p=>n(c,p)),c},o=[];for(let s=1;s<=t.length;s++){const l=t[s-1],c=t[s];e(l,c)?t[s]=n(l,c):o.push(l)}return o}var Og=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="toolPanelColDefService"}wireBeans(t){this.columnModel=t.columnModel}createColumnTree(t){const e=[],n=(s,l)=>{if(fo(s)){const c=s,u=typeof c.groupId<"u"?c.groupId:c.headerName,p=new x.AgProvidedColumnGroup(c,u,!1,l),f=[];return c.children.forEach(m=>{const y=n(m,l+1);y&&f.push(y)}),p.setChildren(f),p}else{const c=s,u=c.colId?c.colId:c.field,p=this.columnModel.getColDefCol(u);return p||e.push(c),p}},o=[];return t.forEach(s=>{const l=n(s,0);l&&o.push(l)}),e.length>0&&x._warnOnce("unable to find grid columns for the supplied colDef(s):",e),o}syncLayoutWithGrid(t){const e=this.getLeafPathTrees(),n=Lg(e);t(n)}getLeafPathTrees(){const t=(o,s)=>{let l;if(x.isProvidedColumnGroup(o))if(o.isPadding())l=s;else{const u=Object.assign({},o.getColGroupDef());u.groupId=o.getGroupId(),u.children=[s],l=u}else{const u=Object.assign({},o.getColDef());u.colId=o.getColId(),l=u}const c=o.getOriginalParent();return c?t(c,l):l};return this.columnModel.getCols().filter(o=>{const s=o.getColDef();return o.isPrimary()&&!s.showRowGroup}).map(o=>t(o,o.getColDef()))}};function Gg(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isDisplayed())??!1}function zg(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().setDisplayed(e)}function $g(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().setSideBarPosition(e)}function Zg(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().openToolPanel(e,"api")}function Ug(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().close("api")}function Wg(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().openedItem())??null}function Hg(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().refresh()}function jg(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isToolPanelShowing())??!1}function qg(t,e){var o;const n=(o=t.sideBarService)==null?void 0:o.getSideBarComp().getToolPanelInstance(e);return x._unwrapUserComp(n)}function Kg(t){var e;return(e=t.sideBarService)==null?void 0:e.getSideBarComp().getDef()}var Yg=class extends x.Component{constructor(t){super(),this.eToggleButton=x.RefPlaceholder,this.eIconWrapper=x.RefPlaceholder,this.eLabel=x.RefPlaceholder,this.toolPanelDef=t}getToolPanelId(){return this.toolPanelDef.id}postConstruct(){const t=this.createTemplate();this.setTemplate(t,[]),this.setLabel(),this.setIcon(),this.addManagedElementListeners(this.eToggleButton,{click:this.onButtonPressed.bind(this)}),this.eToggleButton.setAttribute("id",`ag-${this.getCompId()}-button`)}createTemplate(){return`<div class="ag-side-button" role="presentation">
|
|
3
|
+
`)}}function Vm(t){return{ok:!0,value:t}}function vd(t){if(!t)throw new Da;if(!t.ok)throw Error(t.errors.join(";"));return t.value}function Cd(t){return{value:t,errors:void 0}}function Nm(t){if(t.errors)throw new Fa(t.errors);if(!t.value)throw new Da;return t.value}function Am(t){return t!==void 0}function Ra(t,e){return Or(t)===Or(e)}const Ma=t=>t,Ia=t=>t instanceof Error?t:Error(String(t)),Oa=t=>t.name==="ZodError",La=t=>{const{formErrors:e,fieldErrors:n}=t.flatten(),o=Object.entries(n).map(([s,l])=>s+":"+(l==null?void 0:l.join(",")));return e.concat(o).join("; ")};function Ga(t){const e=t.validate??Ma,{autoSave:n}=t,o=r.ref(),s=r.ref(),l=A=>{s.value={model:Bn(A)}};r.watch(()=>t.get(),A=>l(A),{immediate:!0});const c=()=>{var A;t.onSave(e(Bn((A=s.value)==null?void 0:A.model)))},u=()=>{l(t.get()),o.value=void 0},p=A=>{const I=Ia(A);Oa(I)?o.value=Error(La(I)):o.value=I},f=A=>{o.value=void 0;try{e(A),n&&c()}catch(I){p(I)}},m=r.computed({get:()=>{var A;return(A=s.value)==null?void 0:A.model},set(A){l(A),f(A)}});r.watch(s,(A,I)=>{A&&A===I&&f(A.model)},{deep:!0});const y=r.computed(()=>!o.value),T=r.computed(()=>!Ra(t.get(),r.unref(s))),B=r.computed(()=>o.value?o.value.message:"");return r.reactive({model:m,valid:y,isChanged:T,error:o,errorString:B,save:c,revert:u,setError:p})}function Pm(t,e,n){const o=t.validate??Ma,{autoSave:s}=t,l=r.ref(),c=r.ref(),u=L=>{var C;if(n.deepPatchModel){const R=(C=c.value)==null?void 0:C.model,O=Object.assign(Bn(L),e??{});c.value={model:R?_d(R,O):O,stage:Symbol()}}else c.value={model:Object.assign(Bn(L),e??{}),stage:Symbol()}};r.watch(()=>t.get(),L=>u(L),{immediate:!0});const p=()=>{var L;t.onSave(o(Bn((L=c.value)==null?void 0:L.model)))},f=()=>{u(t.get()),l.value=void 0},m=L=>{const C=Ia(L);Oa(C)?l.value=Error(La(C)):l.value=C},y=L=>{l.value=void 0;try{o(L),s&&p()}catch(C){m(C)}},T=r.computed({get:()=>{var L;return(L=c.value)==null?void 0:L.model},set(){throw Error("Cannot replace base model")}});r.watch([()=>({args:T.value.args,ui:T.value.ui}),()=>{var L;return(L=c.value)==null?void 0:L.stage}],([L,C],[R,O])=>{C===O&&y(L)},{deep:!0});const B=r.computed(()=>!l.value),A=r.computed(()=>{var R;const{args:L,ui:C}=((R=r.unref(c))==null?void 0:R.model)??{};return!Ra(t.get(),{args:L,ui:C})}),I=r.computed(()=>l.value?l.value.message:"");return r.reactive({model:T,valid:B,isChanged:A,error:l,errorString:I,save:p,revert:f,setError:m})}const Dm=t=>Object.fromEntries(new URL(t,"http://dummy").searchParams);function Fm(t,e,n){const o=(C,...R)=>{n.debug&&console.log(`%c>>> %c${C}`,"color: orange; font-weight: bold","color: orange",...R)},l=Pa(e.setBlockArgs,100),c=Pa(e.setBlockUiState,100),u=Pa(e.setBlockArgsAndUiState,100),p=r.reactive({args:Object.freeze(t.args),outputs:Object.freeze(t.outputs),ui:Object.freeze(t.ui),navigationState:Object.freeze(t.navigationState)});e.onStateUpdates(async C=>{C.forEach(R=>{R.key==="args"&&(p.args=Object.freeze(R.value),o("args patch",p.args)),R.key==="ui"&&(p.ui=Object.freeze(R.value),o("ui patch",p.ui)),R.key==="outputs"&&(p.outputs=Object.freeze(R.value),o("outputs patch",p.outputs)),R.key==="navigationState"&&(p.navigationState=Object.freeze(R.value),o("navigationState patch",p.navigationState))}),await r.nextTick()});const f=()=>Bn(p.args),m=()=>Bn(p.ui),y=()=>Bn(p.navigationState),T={createArgsModel(C={}){return Ga({get(){return C.transform?C.transform(p.args):p.args},validate:C.validate,autoSave:!0,onSave(R){l(R)}})},createUiModel(C={},R){return Ga({get(){return C.transform?C.transform(p.ui):p.ui??R()},validate:C.validate,autoSave:!0,onSave(O){c(O)}})},useOutputs(...C){const R=r.reactive({errors:void 0,value:void 0});return r.watch(()=>p.outputs,()=>{try{Object.assign(R,{value:this.unwrapOutputs(...C),errors:void 0})}catch(O){Object.assign(R,{value:void 0,errors:[String(O)]})}},{immediate:!0,deep:!0}),R},unwrapOutputs(...C){const R=p.outputs,O=C.map(F=>[F,vd(R[F])]);return Object.fromEntries(O)},getOutputField(C){return p.outputs[C]},getOutputFieldOkOptional(C){console.warn("use reactive app.outputValues.fieldName instead instead of getOutputFieldOkOptional(fieldName)");const R=this.getOutputField(C);if(R&&R.ok)return R.value},getOutputFieldErrorsOptional(C){console.warn("use reactive app.outputErrors.fieldName instead instead of getOutputFieldErrorsOptional(fieldName)");const R=this.getOutputField(C);if(R&&!R.ok)return R.errors},updateArgs(C){const R=f();return C(R),e.setBlockArgs(R)},updateUiState(C){const R=m();return e.setBlockUiState(C(R))},updateNavigationState(C){const R=y();return C(R),e.setNavigationState(R)},navigateTo(C){const R=y();return R.href=C,e.setNavigationState(R)}},B=r.computed(()=>{const C=Object.entries(p.outputs).map(([R,O])=>[R,O.ok&&O.value!==void 0?O.value:void 0]);return Object.fromEntries(C)}),A=r.computed(()=>{const C=Object.entries(p.outputs).map(([R,O])=>[R,O&&!O.ok?new Fa(O.errors):void 0]);return Object.fromEntries(C)}),I={snapshot:p,queryParams:r.computed(()=>Dm(p.navigationState.href)),href:r.computed(()=>p.navigationState.href),hasErrors:r.computed(()=>Object.values(p.outputs).some(C=>!(C!=null&&C.ok))),outputValues:r.computed(()=>(console.warn("Change app.outputValues to app.model.outputs"),B.value)),outputErrors:r.computed(()=>(console.warn("Change app.outputErrors to app.model.outputErrors"),A.value)),args:r.computed(()=>(console.warn("Change app.args to app.snapshot.args"),p.args)),outputs:r.computed(()=>(console.warn("Change app.outputs to app.snapshot.outputs"),p.outputs)),ui:r.computed(()=>(console.warn("Change app.ui to app.snapshot.ui"),p.ui)),navigationState:r.computed(()=>(console.warn("Change app.navigationState to app.snapshot.navigationState"),p.navigationState))},L=Pm({get(){return{args:p.args,ui:p.ui}},autoSave:!0,onSave(C){u(C.args,C.ui)}},{outputs:B,outputErrors:A},n);return r.reactive(Object.assign(L,T,I))}var Oe;(function(t){t.assertEqual=s=>s;function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const l={};for(const c of s)l[c]=c;return l},t.getValidEnumValues=s=>{const l=t.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),c={};for(const u of l)c[u]=s[u];return t.objectValues(c)},t.objectValues=s=>t.objectKeys(s).map(function(l){return s[l]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const l=[];for(const c in s)Object.prototype.hasOwnProperty.call(s,c)&&l.push(c);return l},t.find=(s,l)=>{for(const c of s)if(l(c))return c},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function o(s,l=" | "){return s.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}t.joinValues=o,t.jsonStringifyReplacer=(s,l)=>typeof l=="bigint"?l.toString():l})(Oe||(Oe={}));var za;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(za||(za={}));const ae=Oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),or=t=>{switch(typeof t){case"undefined":return ae.undefined;case"string":return ae.string;case"number":return isNaN(t)?ae.nan:ae.number;case"boolean":return ae.boolean;case"function":return ae.function;case"bigint":return ae.bigint;case"symbol":return ae.symbol;case"object":return Array.isArray(t)?ae.array:t===null?ae.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ae.promise:typeof Map<"u"&&t instanceof Map?ae.map:typeof Set<"u"&&t instanceof Set?ae.set:typeof Date<"u"&&t instanceof Date?ae.date:ae.object;default:return ae.unknown}},J=Oe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Rm=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Ot extends Error{constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(l){return l.message},o={_errors:[]},s=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(s);else if(c.code==="invalid_return_type")s(c.returnTypeError);else if(c.code==="invalid_arguments")s(c.argumentsError);else if(c.path.length===0)o._errors.push(n(c));else{let u=o,p=0;for(;p<c.path.length;){const f=c.path[p];p===c.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(c))):u[f]=u[f]||{_errors:[]},u=u[f],p++}}};return s(this),o}static assert(e){if(!(e instanceof Ot))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Oe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},o=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(e(s))):o.push(e(s));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}Ot.create=t=>new Ot(t);const lo=(t,e)=>{let n;switch(t.code){case J.invalid_type:t.received===ae.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case J.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Oe.jsonStringifyReplacer)}`;break;case J.unrecognized_keys:n=`Unrecognized key(s) in object: ${Oe.joinValues(t.keys,", ")}`;break;case J.invalid_union:n="Invalid input";break;case J.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Oe.joinValues(t.options)}`;break;case J.invalid_enum_value:n=`Invalid enum value. Expected ${Oe.joinValues(t.options)}, received '${t.received}'`;break;case J.invalid_arguments:n="Invalid function arguments";break;case J.invalid_return_type:n="Invalid function return type";break;case J.invalid_date:n="Invalid date";break;case J.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Oe.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case J.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case J.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case J.custom:n="Invalid input";break;case J.invalid_intersection_types:n="Intersection results could not be merged";break;case J.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case J.not_finite:n="Number must be finite";break;default:n=e.defaultError,Oe.assertNever(t)}return{message:n}};let wd=lo;function Mm(t){wd=t}function ss(){return wd}const as=t=>{const{data:e,path:n,errorMaps:o,issueData:s}=t,l=[...n,...s.path||[]],c={...s,path:l};if(s.message!==void 0)return{...s,path:l,message:s.message};let u="";const p=o.filter(f=>!!f).slice().reverse();for(const f of p)u=f(c,{data:e,defaultError:u}).message;return{...s,path:l,message:u}},Im=[];function ie(t,e){const n=ss(),o=as({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===lo?void 0:lo].filter(s=>!!s)});t.common.issues.push(o)}class vt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const o=[];for(const s of n){if(s.status==="aborted")return Ce;s.status==="dirty"&&e.dirty(),o.push(s.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,n){const o=[];for(const s of n){const l=await s.key,c=await s.value;o.push({key:l,value:c})}return vt.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const s of n){const{key:l,value:c}=s;if(l.status==="aborted"||c.status==="aborted")return Ce;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||s.alwaysSet)&&(o[l.value]=c.value)}return{status:e.value,value:o}}}const Ce=Object.freeze({status:"aborted"}),co=t=>({status:"dirty",value:t}),Et=t=>({status:"valid",value:t}),$a=t=>t.status==="aborted",Ua=t=>t.status==="dirty",jo=t=>t.status==="valid",qo=t=>typeof Promise<"u"&&t instanceof Promise;function ls(t,e,n,o){if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function bd(t,e,n,o,s){if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}typeof SuppressedError=="function"&&SuppressedError;var pe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(pe||(pe={}));var Ko,Yo;class Vn{constructor(e,n,o,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=o,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const xd=(t,e)=>{if(jo(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ot(t.common.issues);return this._error=n,this._error}}};function Te(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:s}=t;if(e&&(n||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(c,u)=>{var p,f;const{message:m}=t;return c.code==="invalid_enum_value"?{message:m??u.defaultError}:typeof u.data>"u"?{message:(p=m??o)!==null&&p!==void 0?p:u.defaultError}:c.code!=="invalid_type"?{message:u.defaultError}:{message:(f=m??n)!==null&&f!==void 0?f:u.defaultError}},description:s}}class Ne{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return or(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:or(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new vt,ctx:{common:e.parent.common,data:e.data,parsedType:or(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(qo(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const o=this.safeParse(e,n);if(o.success)return o.data;throw o.error}safeParse(e,n){var o;const s={common:{issues:[],async:(o=n==null?void 0:n.async)!==null&&o!==void 0?o:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:or(e)},l=this._parseSync({data:e,path:s.path,parent:s});return xd(s,l)}async parseAsync(e,n){const o=await this.safeParseAsync(e,n);if(o.success)return o.data;throw o.error}async safeParseAsync(e,n){const o={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:or(e)},s=this._parse({data:e,path:o.path,parent:o}),l=await(qo(s)?s:Promise.resolve(s));return xd(o,l)}refine(e,n){const o=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,l)=>{const c=e(s),u=()=>l.addIssue({code:J.custom,...o(s)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(u(),!1)):c?!0:(u(),!1)})}refinement(e,n){return this._refinement((o,s)=>e(o)?!0:(s.addIssue(typeof n=="function"?n(o,s):n),!1))}_refinement(e){return new ln({schema:this,typeName:_e.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return An.create(this,this._def)}nullable(){return lr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return an.create(this,this._def)}promise(){return fo.create(this,this._def)}or(e){return ei.create([this,e],this._def)}and(e){return ti.create(this,e,this._def)}transform(e){return new ln({...Te(this._def),schema:this,typeName:_e.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new si({...Te(this._def),innerType:this,defaultValue:n,typeName:_e.ZodDefault})}brand(){return new Ha({typeName:_e.ZodBranded,type:this,...Te(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new ai({...Te(this._def),innerType:this,catchValue:n,typeName:_e.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return li.create(this,e)}readonly(){return ci.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Om=/^c[^\s-]{8,}$/i,Lm=/^[0-9a-z]+$/,Gm=/^[0-9A-HJKMNP-TV-Z]{26}$/,zm=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,$m=/^[a-z0-9_-]{21}$/i,Um=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Zm=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Wm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Za;const Hm=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,jm=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,qm=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,kd="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Km=new RegExp(`^${kd}$`);function Sd(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Ym(t){return new RegExp(`^${Sd(t)}$`)}function Ed(t){let e=`${kd}T${Sd(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function Jm(t,e){return!!((e==="v4"||!e)&&Hm.test(t)||(e==="v6"||!e)&&jm.test(t))}class sn extends Ne{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ae.string){const l=this._getOrReturnCtx(e);return ie(l,{code:J.invalid_type,expected:ae.string,received:l.parsedType}),Ce}const o=new vt;let s;for(const l of this._def.checks)if(l.kind==="min")e.data.length<l.value&&(s=this._getOrReturnCtx(e,s),ie(s,{code:J.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if(l.kind==="max")e.data.length>l.value&&(s=this._getOrReturnCtx(e,s),ie(s,{code:J.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if(l.kind==="length"){const c=e.data.length>l.value,u=e.data.length<l.value;(c||u)&&(s=this._getOrReturnCtx(e,s),c?ie(s,{code:J.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):u&&ie(s,{code:J.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),o.dirty())}else if(l.kind==="email")Zm.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"email",code:J.invalid_string,message:l.message}),o.dirty());else if(l.kind==="emoji")Za||(Za=new RegExp(Wm,"u")),Za.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"emoji",code:J.invalid_string,message:l.message}),o.dirty());else if(l.kind==="uuid")zm.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"uuid",code:J.invalid_string,message:l.message}),o.dirty());else if(l.kind==="nanoid")$m.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"nanoid",code:J.invalid_string,message:l.message}),o.dirty());else if(l.kind==="cuid")Om.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"cuid",code:J.invalid_string,message:l.message}),o.dirty());else if(l.kind==="cuid2")Lm.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"cuid2",code:J.invalid_string,message:l.message}),o.dirty());else if(l.kind==="ulid")Gm.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"ulid",code:J.invalid_string,message:l.message}),o.dirty());else if(l.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),ie(s,{validation:"url",code:J.invalid_string,message:l.message}),o.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"regex",code:J.invalid_string,message:l.message}),o.dirty())):l.kind==="trim"?e.data=e.data.trim():l.kind==="includes"?e.data.includes(l.value,l.position)||(s=this._getOrReturnCtx(e,s),ie(s,{code:J.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),o.dirty()):l.kind==="toLowerCase"?e.data=e.data.toLowerCase():l.kind==="toUpperCase"?e.data=e.data.toUpperCase():l.kind==="startsWith"?e.data.startsWith(l.value)||(s=this._getOrReturnCtx(e,s),ie(s,{code:J.invalid_string,validation:{startsWith:l.value},message:l.message}),o.dirty()):l.kind==="endsWith"?e.data.endsWith(l.value)||(s=this._getOrReturnCtx(e,s),ie(s,{code:J.invalid_string,validation:{endsWith:l.value},message:l.message}),o.dirty()):l.kind==="datetime"?Ed(l).test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{code:J.invalid_string,validation:"datetime",message:l.message}),o.dirty()):l.kind==="date"?Km.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{code:J.invalid_string,validation:"date",message:l.message}),o.dirty()):l.kind==="time"?Ym(l).test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{code:J.invalid_string,validation:"time",message:l.message}),o.dirty()):l.kind==="duration"?Um.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"duration",code:J.invalid_string,message:l.message}),o.dirty()):l.kind==="ip"?Jm(e.data,l.version)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"ip",code:J.invalid_string,message:l.message}),o.dirty()):l.kind==="base64"?qm.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"base64",code:J.invalid_string,message:l.message}),o.dirty()):Oe.assertNever(l);return{status:o.value,value:e.data}}_regex(e,n,o){return this.refinement(s=>e.test(s),{validation:n,code:J.invalid_string,...pe.errToObj(o)})}_addCheck(e){return new sn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...pe.errToObj(e)})}url(e){return this._addCheck({kind:"url",...pe.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...pe.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...pe.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...pe.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...pe.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...pe.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...pe.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...pe.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...pe.errToObj(e)})}datetime(e){var n,o;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(o=e==null?void 0:e.local)!==null&&o!==void 0?o:!1,...pe.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...pe.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...pe.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...pe.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...pe.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...pe.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...pe.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...pe.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...pe.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...pe.errToObj(n)})}nonempty(e){return this.min(1,pe.errToObj(e))}trim(){return new sn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new sn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new sn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}sn.create=t=>{var e;return new sn({checks:[],typeName:_e.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Te(t)})};function Xm(t,e){const n=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,s=n>o?n:o,l=parseInt(t.toFixed(s).replace(".","")),c=parseInt(e.toFixed(s).replace(".",""));return l%c/Math.pow(10,s)}class ir extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ae.number){const l=this._getOrReturnCtx(e);return ie(l,{code:J.invalid_type,expected:ae.number,received:l.parsedType}),Ce}let o;const s=new vt;for(const l of this._def.checks)l.kind==="int"?Oe.isInteger(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:J.invalid_type,expected:"integer",received:"float",message:l.message}),s.dirty()):l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:J.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),s.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:J.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),s.dirty()):l.kind==="multipleOf"?Xm(e.data,l.value)!==0&&(o=this._getOrReturnCtx(e,o),ie(o,{code:J.not_multiple_of,multipleOf:l.value,message:l.message}),s.dirty()):l.kind==="finite"?Number.isFinite(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:J.not_finite,message:l.message}),s.dirty()):Oe.assertNever(l);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,pe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,pe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,pe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,pe.toString(n))}setLimit(e,n,o,s){return new ir({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:pe.toString(s)}]})}_addCheck(e){return new ir({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:pe.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:pe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:pe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:pe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:pe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:pe.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:pe.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:pe.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:pe.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Oe.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(n)&&Number.isFinite(e)}}ir.create=t=>new ir({checks:[],typeName:_e.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Te(t)});class sr extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==ae.bigint){const l=this._getOrReturnCtx(e);return ie(l,{code:J.invalid_type,expected:ae.bigint,received:l.parsedType}),Ce}let o;const s=new vt;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:J.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),s.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:J.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),s.dirty()):l.kind==="multipleOf"?e.data%l.value!==BigInt(0)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:J.not_multiple_of,multipleOf:l.value,message:l.message}),s.dirty()):Oe.assertNever(l);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,pe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,pe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,pe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,pe.toString(n))}setLimit(e,n,o,s){return new sr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:pe.toString(s)}]})}_addCheck(e){return new sr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:pe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:pe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:pe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:pe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:pe.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}sr.create=t=>{var e;return new sr({checks:[],typeName:_e.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Te(t)})};class Jo extends Ne{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ae.boolean){const o=this._getOrReturnCtx(e);return ie(o,{code:J.invalid_type,expected:ae.boolean,received:o.parsedType}),Ce}return Et(e.data)}}Jo.create=t=>new Jo({typeName:_e.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Te(t)});class Lr extends Ne{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ae.date){const l=this._getOrReturnCtx(e);return ie(l,{code:J.invalid_type,expected:ae.date,received:l.parsedType}),Ce}if(isNaN(e.data.getTime())){const l=this._getOrReturnCtx(e);return ie(l,{code:J.invalid_date}),Ce}const o=new vt;let s;for(const l of this._def.checks)l.kind==="min"?e.data.getTime()<l.value&&(s=this._getOrReturnCtx(e,s),ie(s,{code:J.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),o.dirty()):l.kind==="max"?e.data.getTime()>l.value&&(s=this._getOrReturnCtx(e,s),ie(s,{code:J.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),o.dirty()):Oe.assertNever(l);return{status:o.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Lr({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:pe.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:pe.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Lr.create=t=>new Lr({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:_e.ZodDate,...Te(t)});class cs extends Ne{_parse(e){if(this._getType(e)!==ae.symbol){const o=this._getOrReturnCtx(e);return ie(o,{code:J.invalid_type,expected:ae.symbol,received:o.parsedType}),Ce}return Et(e.data)}}cs.create=t=>new cs({typeName:_e.ZodSymbol,...Te(t)});class Xo extends Ne{_parse(e){if(this._getType(e)!==ae.undefined){const o=this._getOrReturnCtx(e);return ie(o,{code:J.invalid_type,expected:ae.undefined,received:o.parsedType}),Ce}return Et(e.data)}}Xo.create=t=>new Xo({typeName:_e.ZodUndefined,...Te(t)});class Qo extends Ne{_parse(e){if(this._getType(e)!==ae.null){const o=this._getOrReturnCtx(e);return ie(o,{code:J.invalid_type,expected:ae.null,received:o.parsedType}),Ce}return Et(e.data)}}Qo.create=t=>new Qo({typeName:_e.ZodNull,...Te(t)});class uo extends Ne{constructor(){super(...arguments),this._any=!0}_parse(e){return Et(e.data)}}uo.create=t=>new uo({typeName:_e.ZodAny,...Te(t)});class Gr extends Ne{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Et(e.data)}}Gr.create=t=>new Gr({typeName:_e.ZodUnknown,...Te(t)});class zn extends Ne{_parse(e){const n=this._getOrReturnCtx(e);return ie(n,{code:J.invalid_type,expected:ae.never,received:n.parsedType}),Ce}}zn.create=t=>new zn({typeName:_e.ZodNever,...Te(t)});class ds extends Ne{_parse(e){if(this._getType(e)!==ae.undefined){const o=this._getOrReturnCtx(e);return ie(o,{code:J.invalid_type,expected:ae.void,received:o.parsedType}),Ce}return Et(e.data)}}ds.create=t=>new ds({typeName:_e.ZodVoid,...Te(t)});class an extends Ne{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),s=this._def;if(n.parsedType!==ae.array)return ie(n,{code:J.invalid_type,expected:ae.array,received:n.parsedType}),Ce;if(s.exactLength!==null){const c=n.data.length>s.exactLength.value,u=n.data.length<s.exactLength.value;(c||u)&&(ie(n,{code:c?J.too_big:J.too_small,minimum:u?s.exactLength.value:void 0,maximum:c?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),o.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(ie(n,{code:J.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),o.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(ie(n,{code:J.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((c,u)=>s.type._parseAsync(new Vn(n,c,n.path,u)))).then(c=>vt.mergeArray(o,c));const l=[...n.data].map((c,u)=>s.type._parseSync(new Vn(n,c,n.path,u)));return vt.mergeArray(o,l)}get element(){return this._def.type}min(e,n){return new an({...this._def,minLength:{value:e,message:pe.toString(n)}})}max(e,n){return new an({...this._def,maxLength:{value:e,message:pe.toString(n)}})}length(e,n){return new an({...this._def,exactLength:{value:e,message:pe.toString(n)}})}nonempty(e){return this.min(1,e)}}an.create=(t,e)=>new an({type:t,minLength:null,maxLength:null,exactLength:null,typeName:_e.ZodArray,...Te(e)});function po(t){if(t instanceof Qe){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=An.create(po(o))}return new Qe({...t._def,shape:()=>e})}else return t instanceof an?new an({...t._def,type:po(t.element)}):t instanceof An?An.create(po(t.unwrap())):t instanceof lr?lr.create(po(t.unwrap())):t instanceof Nn?Nn.create(t.items.map(e=>po(e))):t}class Qe extends Ne{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Oe.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==ae.object){const f=this._getOrReturnCtx(e);return ie(f,{code:J.invalid_type,expected:ae.object,received:f.parsedType}),Ce}const{status:o,ctx:s}=this._processInputParams(e),{shape:l,keys:c}=this._getCached(),u=[];if(!(this._def.catchall instanceof zn&&this._def.unknownKeys==="strip"))for(const f in s.data)c.includes(f)||u.push(f);const p=[];for(const f of c){const m=l[f],y=s.data[f];p.push({key:{status:"valid",value:f},value:m._parse(new Vn(s,y,s.path,f)),alwaysSet:f in s.data})}if(this._def.catchall instanceof zn){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of u)p.push({key:{status:"valid",value:m},value:{status:"valid",value:s.data[m]}});else if(f==="strict")u.length>0&&(ie(s,{code:J.unrecognized_keys,keys:u}),o.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of u){const y=s.data[m];p.push({key:{status:"valid",value:m},value:f._parse(new Vn(s,y,s.path,m)),alwaysSet:m in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of p){const y=await m.key,T=await m.value;f.push({key:y,value:T,alwaysSet:m.alwaysSet})}return f}).then(f=>vt.mergeObjectSync(o,f)):vt.mergeObjectSync(o,p)}get shape(){return this._def.shape()}strict(e){return pe.errToObj,new Qe({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,o)=>{var s,l,c,u;const p=(c=(l=(s=this._def).errorMap)===null||l===void 0?void 0:l.call(s,n,o).message)!==null&&c!==void 0?c:o.defaultError;return n.code==="unrecognized_keys"?{message:(u=pe.errToObj(e).message)!==null&&u!==void 0?u:p}:{message:p}}}:{}})}strip(){return new Qe({...this._def,unknownKeys:"strip"})}passthrough(){return new Qe({...this._def,unknownKeys:"passthrough"})}extend(e){return new Qe({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Qe({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_e.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Qe({...this._def,catchall:e})}pick(e){const n={};return Oe.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(n[o]=this.shape[o])}),new Qe({...this._def,shape:()=>n})}omit(e){const n={};return Oe.objectKeys(this.shape).forEach(o=>{e[o]||(n[o]=this.shape[o])}),new Qe({...this._def,shape:()=>n})}deepPartial(){return po(this)}partial(e){const n={};return Oe.objectKeys(this.shape).forEach(o=>{const s=this.shape[o];e&&!e[o]?n[o]=s:n[o]=s.optional()}),new Qe({...this._def,shape:()=>n})}required(e){const n={};return Oe.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])n[o]=this.shape[o];else{let l=this.shape[o];for(;l instanceof An;)l=l._def.innerType;n[o]=l}}),new Qe({...this._def,shape:()=>n})}keyof(){return Td(Oe.objectKeys(this.shape))}}Qe.create=(t,e)=>new Qe({shape:()=>t,unknownKeys:"strip",catchall:zn.create(),typeName:_e.ZodObject,...Te(e)}),Qe.strictCreate=(t,e)=>new Qe({shape:()=>t,unknownKeys:"strict",catchall:zn.create(),typeName:_e.ZodObject,...Te(e)}),Qe.lazycreate=(t,e)=>new Qe({shape:t,unknownKeys:"strip",catchall:zn.create(),typeName:_e.ZodObject,...Te(e)});class ei extends Ne{_parse(e){const{ctx:n}=this._processInputParams(e),o=this._def.options;function s(l){for(const u of l)if(u.result.status==="valid")return u.result;for(const u of l)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const c=l.map(u=>new Ot(u.ctx.common.issues));return ie(n,{code:J.invalid_union,unionErrors:c}),Ce}if(n.common.async)return Promise.all(o.map(async l=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(s);{let l;const c=[];for(const p of o){const f={...n,common:{...n.common,issues:[]},parent:null},m=p._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!l&&(l={result:m,ctx:f}),f.common.issues.length&&c.push(f.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const u=c.map(p=>new Ot(p));return ie(n,{code:J.invalid_union,unionErrors:u}),Ce}}get options(){return this._def.options}}ei.create=(t,e)=>new ei({options:t,typeName:_e.ZodUnion,...Te(e)});const $n=t=>t instanceof ri?$n(t.schema):t instanceof ln?$n(t.innerType()):t instanceof oi?[t.value]:t instanceof ar?t.options:t instanceof ii?Oe.objectValues(t.enum):t instanceof si?$n(t._def.innerType):t instanceof Xo?[void 0]:t instanceof Qo?[null]:t instanceof An?[void 0,...$n(t.unwrap())]:t instanceof lr?[null,...$n(t.unwrap())]:t instanceof Ha||t instanceof ci?$n(t.unwrap()):t instanceof ai?$n(t._def.innerType):[];class us extends Ne{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.object)return ie(n,{code:J.invalid_type,expected:ae.object,received:n.parsedType}),Ce;const o=this.discriminator,s=n.data[o],l=this.optionsMap.get(s);return l?n.common.async?l._parseAsync({data:n.data,path:n.path,parent:n}):l._parseSync({data:n.data,path:n.path,parent:n}):(ie(n,{code:J.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),Ce)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,o){const s=new Map;for(const l of n){const c=$n(l.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const u of c){if(s.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);s.set(u,l)}}return new us({typeName:_e.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:s,...Te(o)})}}function Wa(t,e){const n=or(t),o=or(e);if(t===e)return{valid:!0,data:t};if(n===ae.object&&o===ae.object){const s=Oe.objectKeys(e),l=Oe.objectKeys(t).filter(u=>s.indexOf(u)!==-1),c={...t,...e};for(const u of l){const p=Wa(t[u],e[u]);if(!p.valid)return{valid:!1};c[u]=p.data}return{valid:!0,data:c}}else if(n===ae.array&&o===ae.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let l=0;l<t.length;l++){const c=t[l],u=e[l],p=Wa(c,u);if(!p.valid)return{valid:!1};s.push(p.data)}return{valid:!0,data:s}}else return n===ae.date&&o===ae.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ti extends Ne{_parse(e){const{status:n,ctx:o}=this._processInputParams(e),s=(l,c)=>{if($a(l)||$a(c))return Ce;const u=Wa(l.value,c.value);return u.valid?((Ua(l)||Ua(c))&&n.dirty(),{status:n.value,value:u.data}):(ie(o,{code:J.invalid_intersection_types}),Ce)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([l,c])=>s(l,c)):s(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}ti.create=(t,e,n)=>new ti({left:t,right:e,typeName:_e.ZodIntersection,...Te(n)});class Nn extends Ne{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.array)return ie(o,{code:J.invalid_type,expected:ae.array,received:o.parsedType}),Ce;if(o.data.length<this._def.items.length)return ie(o,{code:J.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ce;!this._def.rest&&o.data.length>this._def.items.length&&(ie(o,{code:J.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const l=[...o.data].map((c,u)=>{const p=this._def.items[u]||this._def.rest;return p?p._parse(new Vn(o,c,o.path,u)):null}).filter(c=>!!c);return o.common.async?Promise.all(l).then(c=>vt.mergeArray(n,c)):vt.mergeArray(n,l)}get items(){return this._def.items}rest(e){return new Nn({...this._def,rest:e})}}Nn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Nn({items:t,typeName:_e.ZodTuple,rest:null,...Te(e)})};class ni extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.object)return ie(o,{code:J.invalid_type,expected:ae.object,received:o.parsedType}),Ce;const s=[],l=this._def.keyType,c=this._def.valueType;for(const u in o.data)s.push({key:l._parse(new Vn(o,u,o.path,u)),value:c._parse(new Vn(o,o.data[u],o.path,u)),alwaysSet:u in o.data});return o.common.async?vt.mergeObjectAsync(n,s):vt.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,o){return n instanceof Ne?new ni({keyType:e,valueType:n,typeName:_e.ZodRecord,...Te(o)}):new ni({keyType:sn.create(),valueType:e,typeName:_e.ZodRecord,...Te(n)})}}class ps extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.map)return ie(o,{code:J.invalid_type,expected:ae.map,received:o.parsedType}),Ce;const s=this._def.keyType,l=this._def.valueType,c=[...o.data.entries()].map(([u,p],f)=>({key:s._parse(new Vn(o,u,o.path,[f,"key"])),value:l._parse(new Vn(o,p,o.path,[f,"value"]))}));if(o.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const p of c){const f=await p.key,m=await p.value;if(f.status==="aborted"||m.status==="aborted")return Ce;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const p of c){const f=p.key,m=p.value;if(f.status==="aborted"||m.status==="aborted")return Ce;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}ps.create=(t,e,n)=>new ps({valueType:e,keyType:t,typeName:_e.ZodMap,...Te(n)});class zr extends Ne{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.set)return ie(o,{code:J.invalid_type,expected:ae.set,received:o.parsedType}),Ce;const s=this._def;s.minSize!==null&&o.data.size<s.minSize.value&&(ie(o,{code:J.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&o.data.size>s.maxSize.value&&(ie(o,{code:J.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const l=this._def.valueType;function c(p){const f=new Set;for(const m of p){if(m.status==="aborted")return Ce;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const u=[...o.data.values()].map((p,f)=>l._parse(new Vn(o,p,o.path,f)));return o.common.async?Promise.all(u).then(p=>c(p)):c(u)}min(e,n){return new zr({...this._def,minSize:{value:e,message:pe.toString(n)}})}max(e,n){return new zr({...this._def,maxSize:{value:e,message:pe.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}zr.create=(t,e)=>new zr({valueType:t,minSize:null,maxSize:null,typeName:_e.ZodSet,...Te(e)});class ho extends Ne{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.function)return ie(n,{code:J.invalid_type,expected:ae.function,received:n.parsedType}),Ce;function o(u,p){return as({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ss(),lo].filter(f=>!!f),issueData:{code:J.invalid_arguments,argumentsError:p}})}function s(u,p){return as({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ss(),lo].filter(f=>!!f),issueData:{code:J.invalid_return_type,returnTypeError:p}})}const l={errorMap:n.common.contextualErrorMap},c=n.data;if(this._def.returns instanceof fo){const u=this;return Et(async function(...p){const f=new Ot([]),m=await u._def.args.parseAsync(p,l).catch(B=>{throw f.addIssue(o(p,B)),f}),y=await Reflect.apply(c,this,m);return await u._def.returns._def.type.parseAsync(y,l).catch(B=>{throw f.addIssue(s(y,B)),f})})}else{const u=this;return Et(function(...p){const f=u._def.args.safeParse(p,l);if(!f.success)throw new Ot([o(p,f.error)]);const m=Reflect.apply(c,this,f.data),y=u._def.returns.safeParse(m,l);if(!y.success)throw new Ot([s(m,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ho({...this._def,args:Nn.create(e).rest(Gr.create())})}returns(e){return new ho({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,o){return new ho({args:e||Nn.create([]).rest(Gr.create()),returns:n||Gr.create(),typeName:_e.ZodFunction,...Te(o)})}}class ri extends Ne{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ri.create=(t,e)=>new ri({getter:t,typeName:_e.ZodLazy,...Te(e)});class oi extends Ne{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return ie(n,{received:n.data,code:J.invalid_literal,expected:this._def.value}),Ce}return{status:"valid",value:e.data}}get value(){return this._def.value}}oi.create=(t,e)=>new oi({value:t,typeName:_e.ZodLiteral,...Te(e)});function Td(t,e){return new ar({values:t,typeName:_e.ZodEnum,...Te(e)})}class ar extends Ne{constructor(){super(...arguments),Ko.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),o=this._def.values;return ie(n,{expected:Oe.joinValues(o),received:n.parsedType,code:J.invalid_type}),Ce}if(ls(this,Ko)||bd(this,Ko,new Set(this._def.values)),!ls(this,Ko).has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return ie(n,{received:n.data,code:J.invalid_enum_value,options:o}),Ce}return Et(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return ar.create(e,{...this._def,...n})}exclude(e,n=this._def){return ar.create(this.options.filter(o=>!e.includes(o)),{...this._def,...n})}}Ko=new WeakMap,ar.create=Td;class ii extends Ne{constructor(){super(...arguments),Yo.set(this,void 0)}_parse(e){const n=Oe.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==ae.string&&o.parsedType!==ae.number){const s=Oe.objectValues(n);return ie(o,{expected:Oe.joinValues(s),received:o.parsedType,code:J.invalid_type}),Ce}if(ls(this,Yo)||bd(this,Yo,new Set(Oe.getValidEnumValues(this._def.values))),!ls(this,Yo).has(e.data)){const s=Oe.objectValues(n);return ie(o,{received:o.data,code:J.invalid_enum_value,options:s}),Ce}return Et(e.data)}get enum(){return this._def.values}}Yo=new WeakMap,ii.create=(t,e)=>new ii({values:t,typeName:_e.ZodNativeEnum,...Te(e)});class fo extends Ne{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.promise&&n.common.async===!1)return ie(n,{code:J.invalid_type,expected:ae.promise,received:n.parsedType}),Ce;const o=n.parsedType===ae.promise?n.data:Promise.resolve(n.data);return Et(o.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}fo.create=(t,e)=>new fo({type:t,typeName:_e.ZodPromise,...Te(e)});class ln extends Ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_e.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:o}=this._processInputParams(e),s=this._def.effect||null,l={addIssue:c=>{ie(o,c),c.fatal?n.abort():n.dirty()},get path(){return o.path}};if(l.addIssue=l.addIssue.bind(l),s.type==="preprocess"){const c=s.transform(o.data,l);if(o.common.async)return Promise.resolve(c).then(async u=>{if(n.value==="aborted")return Ce;const p=await this._def.schema._parseAsync({data:u,path:o.path,parent:o});return p.status==="aborted"?Ce:p.status==="dirty"||n.value==="dirty"?co(p.value):p});{if(n.value==="aborted")return Ce;const u=this._def.schema._parseSync({data:c,path:o.path,parent:o});return u.status==="aborted"?Ce:u.status==="dirty"||n.value==="dirty"?co(u.value):u}}if(s.type==="refinement"){const c=u=>{const p=s.refinement(u,l);if(o.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(o.common.async===!1){const u=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return u.status==="aborted"?Ce:(u.status==="dirty"&&n.dirty(),c(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(u=>u.status==="aborted"?Ce:(u.status==="dirty"&&n.dirty(),c(u.value).then(()=>({status:n.value,value:u.value}))))}if(s.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!jo(c))return c;const u=s.transform(c.value,l);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>jo(c)?Promise.resolve(s.transform(c.value,l)).then(u=>({status:n.value,value:u})):c);Oe.assertNever(s)}}ln.create=(t,e,n)=>new ln({schema:t,typeName:_e.ZodEffects,effect:e,...Te(n)}),ln.createWithPreprocess=(t,e,n)=>new ln({schema:e,effect:{type:"preprocess",transform:t},typeName:_e.ZodEffects,...Te(n)});class An extends Ne{_parse(e){return this._getType(e)===ae.undefined?Et(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}An.create=(t,e)=>new An({innerType:t,typeName:_e.ZodOptional,...Te(e)});class lr extends Ne{_parse(e){return this._getType(e)===ae.null?Et(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}lr.create=(t,e)=>new lr({innerType:t,typeName:_e.ZodNullable,...Te(e)});class si extends Ne{_parse(e){const{ctx:n}=this._processInputParams(e);let o=n.data;return n.parsedType===ae.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}si.create=(t,e)=>new si({innerType:t,typeName:_e.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Te(e)});class ai extends Ne{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return qo(s)?s.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Ot(o.common.issues)},input:o.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ot(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}ai.create=(t,e)=>new ai({innerType:t,typeName:_e.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Te(e)});class hs extends Ne{_parse(e){if(this._getType(e)!==ae.nan){const o=this._getOrReturnCtx(e);return ie(o,{code:J.invalid_type,expected:ae.nan,received:o.parsedType}),Ce}return{status:"valid",value:e.data}}}hs.create=t=>new hs({typeName:_e.ZodNaN,...Te(t)});const Qm=Symbol("zod_brand");class Ha extends Ne{_parse(e){const{ctx:n}=this._processInputParams(e),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}}class li extends Ne{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return l.status==="aborted"?Ce:l.status==="dirty"?(n.dirty(),co(l.value)):this._def.out._parseAsync({data:l.value,path:o.path,parent:o})})();{const s=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?Ce:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:o.path,parent:o})}}static create(e,n){return new li({in:e,out:n,typeName:_e.ZodPipeline})}}class ci extends Ne{_parse(e){const n=this._def.innerType._parse(e),o=s=>(jo(s)&&(s.value=Object.freeze(s.value)),s);return qo(n)?n.then(s=>o(s)):o(n)}unwrap(){return this._def.innerType}}ci.create=(t,e)=>new ci({innerType:t,typeName:_e.ZodReadonly,...Te(e)});function Bd(t,e={},n){return t?uo.create().superRefine((o,s)=>{var l,c;if(!t(o)){const u=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,p=(c=(l=u.fatal)!==null&&l!==void 0?l:n)!==null&&c!==void 0?c:!0,f=typeof u=="string"?{message:u}:u;s.addIssue({code:"custom",...f,fatal:p})}}):uo.create()}const eg={object:Qe.lazycreate};var _e;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(_e||(_e={}));const tg=(t,e={message:`Input not instance of ${t.name}`})=>Bd(n=>n instanceof t,e),Vd=sn.create,Nd=ir.create,ng=hs.create,rg=sr.create,Ad=Jo.create,og=Lr.create,ig=cs.create,sg=Xo.create,ag=Qo.create,lg=uo.create,cg=Gr.create,dg=zn.create,ug=ds.create,pg=an.create,hg=Qe.create,fg=Qe.strictCreate,mg=ei.create,gg=us.create,yg=ti.create,_g=Nn.create,vg=ni.create,Cg=ps.create,wg=zr.create,bg=ho.create,xg=ri.create,kg=oi.create,Sg=ar.create,Eg=ii.create,Tg=fo.create,Pd=ln.create,Bg=An.create,Vg=lr.create,Ng=ln.createWithPreprocess,Ag=li.create;var Pn=Object.freeze({__proto__:null,defaultErrorMap:lo,setErrorMap:Mm,getErrorMap:ss,makeIssue:as,EMPTY_PATH:Im,addIssueToContext:ie,ParseStatus:vt,INVALID:Ce,DIRTY:co,OK:Et,isAborted:$a,isDirty:Ua,isValid:jo,isAsync:qo,get util(){return Oe},get objectUtil(){return za},ZodParsedType:ae,getParsedType:or,ZodType:Ne,datetimeRegex:Ed,ZodString:sn,ZodNumber:ir,ZodBigInt:sr,ZodBoolean:Jo,ZodDate:Lr,ZodSymbol:cs,ZodUndefined:Xo,ZodNull:Qo,ZodAny:uo,ZodUnknown:Gr,ZodNever:zn,ZodVoid:ds,ZodArray:an,ZodObject:Qe,ZodUnion:ei,ZodDiscriminatedUnion:us,ZodIntersection:ti,ZodTuple:Nn,ZodRecord:ni,ZodMap:ps,ZodSet:zr,ZodFunction:ho,ZodLazy:ri,ZodLiteral:oi,ZodEnum:ar,ZodNativeEnum:ii,ZodPromise:fo,ZodEffects:ln,ZodTransformer:ln,ZodOptional:An,ZodNullable:lr,ZodDefault:si,ZodCatch:ai,ZodNaN:hs,BRAND:Qm,ZodBranded:Ha,ZodPipeline:li,ZodReadonly:ci,custom:Bd,Schema:Ne,ZodSchema:Ne,late:eg,get ZodFirstPartyTypeKind(){return _e},coerce:{string:t=>sn.create({...t,coerce:!0}),number:t=>ir.create({...t,coerce:!0}),boolean:t=>Jo.create({...t,coerce:!0}),bigint:t=>sr.create({...t,coerce:!0}),date:t=>Lr.create({...t,coerce:!0})},any:lg,array:pg,bigint:rg,boolean:Ad,date:og,discriminatedUnion:gg,effect:Pd,enum:Sg,function:bg,instanceof:tg,intersection:yg,lazy:xg,literal:kg,map:Cg,nan:ng,nativeEnum:Eg,never:dg,null:ag,nullable:Vg,number:Nd,object:hg,oboolean:()=>Ad().optional(),onumber:()=>Nd().optional(),optional:Bg,ostring:()=>Vd().optional(),pipeline:Ag,preprocess:Ng,promise:Tg,record:vg,set:wg,strictObject:fg,string:Vd,symbol:ig,transformer:Pd,tuple:_g,undefined:sg,union:mg,unknown:cg,void:ug,NEVER:Ce,ZodIssueCode:J,quotelessJson:Rm,ZodError:Ot});function Pg(t){throw new Error("Unexpected object: "+t)}const Dg=-2147483648,Dd=-9007199254740991n,Fg=NaN,Rg=NaN,Mg=null,Ig=null;function Fd(t,e){switch(e){case"Int":return t===Dg;case"Long":return t===Number(Dd)||t===Dd;case"Float":return t===Fg;case"Double":return t===Rg;case"String":return t===Mg;case"Bytes":return t===Ig;default:throw Error(`unsupported data type: ${e}`)}}function Og(t,e){const n=Math.floor(e/8),o=1<<7-e%8;return(t[n]&o)>0}function ja(t){const{type:e,name:n,domain:o}=t;return{type:e,name:n,...o&&{domain:o}}}function Rd(t){return t.map(ja)}function fs(t,e){switch(t.type){case"column":return{type:"column",column:e(t.column)};case"inner":case"full":return{type:t.type,entries:t.entries.map(n=>fs(n,e))};case"outer":return{type:"outer",primary:fs(t.primary,e),secondary:t.secondary.map(n=>fs(n,e))};default:Pg(t)}}Pn.object({__isRef:Pn.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:Pn.string().describe("Upstream block id"),name:Pn.string().describe("Name of the output provided to the upstream block's output context")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").strict().readonly();function Lg(t){if(t&&typeof globalThis.getPlatforma=="function")return globalThis.getPlatforma(t);if(typeof globalThis.platforma<"u")return globalThis.platforma;throw new Error("Can't get platforma instance.")}const Gg=Pn.object({type:Pn.string(),importance:Pn.number().optional(),id:Pn.string().optional(),label:Pn.string()});Pn.array(Gg);const zg="1.13.15";function $g(){return Lg({sdkVersion:zg})}function Ug(t){if(typeof globalThis.getEnvironmentValue=="function")return globalThis.getEnvironmentValue(t)}function mo(t){return!!t&&typeof t.children<"u"}function cr(t){return mo(t)?t.groupId:t.colId}function Md(t,e,n){const o=(c,u)=>{const p=c.children.map(cr),f=x._includes(p,cr(u)),m=x._last(c.children),y=m&&cr(m)!==cr(u);return f&&y};if(!mo(t))return!0;const s=t,l=n;if(o(s,l))return s.children.push(l),!0;if(s.groupId===e){const c=s.children.map(cr);if(!x._includes(c,cr(l)))return s.children.push(l),!0}for(let c=s.children.length-1;c>=0&&!Md(s.children[c],e,n);c--);return!1}function Zg(t){const e=(s,l)=>mo(s)&&mo(l)&&cr(s)===cr(l),n=(s,l)=>{if(!mo(l))return s;const c=s,u=l;return u.children&&u.groupId&&Md(c,u.groupId,u.children[0])||u.children.forEach(p=>n(c,p)),c},o=[];for(let s=1;s<=t.length;s++){const l=t[s-1],c=t[s];e(l,c)?t[s]=n(l,c):o.push(l)}return o}var Wg=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="toolPanelColDefService"}wireBeans(t){this.columnModel=t.columnModel}createColumnTree(t){const e=[],n=(s,l)=>{if(mo(s)){const c=s,u=typeof c.groupId<"u"?c.groupId:c.headerName,p=new x.AgProvidedColumnGroup(c,u,!1,l),f=[];return c.children.forEach(m=>{const y=n(m,l+1);y&&f.push(y)}),p.setChildren(f),p}else{const c=s,u=c.colId?c.colId:c.field,p=this.columnModel.getColDefCol(u);return p||e.push(c),p}},o=[];return t.forEach(s=>{const l=n(s,0);l&&o.push(l)}),e.length>0&&x._warnOnce("unable to find grid columns for the supplied colDef(s):",e),o}syncLayoutWithGrid(t){const e=this.getLeafPathTrees(),n=Zg(e);t(n)}getLeafPathTrees(){const t=(o,s)=>{let l;if(x.isProvidedColumnGroup(o))if(o.isPadding())l=s;else{const u=Object.assign({},o.getColGroupDef());u.groupId=o.getGroupId(),u.children=[s],l=u}else{const u=Object.assign({},o.getColDef());u.colId=o.getColId(),l=u}const c=o.getOriginalParent();return c?t(c,l):l};return this.columnModel.getCols().filter(o=>{const s=o.getColDef();return o.isPrimary()&&!s.showRowGroup}).map(o=>t(o,o.getColDef()))}};function Hg(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isDisplayed())??!1}function jg(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().setDisplayed(e)}function qg(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().setSideBarPosition(e)}function Kg(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().openToolPanel(e,"api")}function Yg(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().close("api")}function Jg(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().openedItem())??null}function Xg(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().refresh()}function Qg(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isToolPanelShowing())??!1}function ey(t,e){var o;const n=(o=t.sideBarService)==null?void 0:o.getSideBarComp().getToolPanelInstance(e);return x._unwrapUserComp(n)}function ty(t){var e;return(e=t.sideBarService)==null?void 0:e.getSideBarComp().getDef()}var ny=class extends x.Component{constructor(t){super(),this.eToggleButton=x.RefPlaceholder,this.eIconWrapper=x.RefPlaceholder,this.eLabel=x.RefPlaceholder,this.toolPanelDef=t}getToolPanelId(){return this.toolPanelDef.id}postConstruct(){const t=this.createTemplate();this.setTemplate(t,[]),this.setLabel(),this.setIcon(),this.addManagedElementListeners(this.eToggleButton,{click:this.onButtonPressed.bind(this)}),this.eToggleButton.setAttribute("id",`ag-${this.getCompId()}-button`)}createTemplate(){return`<div class="ag-side-button" role="presentation">
|
|
4
4
|
<button type="button" data-ref="eToggleButton" tabindex="-1" role="tab" aria-expanded="false" class="ag-button ag-side-button-button">
|
|
5
5
|
<div data-ref="eIconWrapper" class="ag-side-button-icon-wrapper" aria-hidden="true"></div>
|
|
6
6
|
<span data-ref="eLabel" class="ag-side-button-label"></span>
|
|
7
7
|
</button>
|
|
8
|
-
</div>`}setLabel(){const t=this.localeService.getLocaleTextFunc(),e=this.toolPanelDef,n=t(e.labelKey,e.labelDefault);this.eLabel.innerText=n}setIcon(){this.eIconWrapper.insertAdjacentElement("afterbegin",x._createIconNoSpan(this.toolPanelDef.iconKey,this.gos))}onButtonPressed(){this.dispatchLocalEvent({type:"toggleButtonClicked"})}setSelected(t){this.addOrRemoveCssClass("ag-selected",t),x._setAriaExpanded(this.eToggleButton,t)}getButtonElement(){return this.eToggleButton}},
|
|
8
|
+
</div>`}setLabel(){const t=this.localeService.getLocaleTextFunc(),e=this.toolPanelDef,n=t(e.labelKey,e.labelDefault);this.eLabel.innerText=n}setIcon(){this.eIconWrapper.insertAdjacentElement("afterbegin",x._createIconNoSpan(this.toolPanelDef.iconKey,this.gos))}onButtonPressed(){this.dispatchLocalEvent({type:"toggleButtonClicked"})}setSelected(t){this.addOrRemoveCssClass("ag-selected",t),x._setAriaExpanded(this.eToggleButton,t)}getButtonElement(){return this.eToggleButton}},ry=class extends x.Component{constructor(){super('<div class="ag-side-buttons" role="tablist"></div>'),this.buttonComps=[]}wireBeans(t){this.focusService=t.focusService,this.visibleColsService=t.visibleColsService}postConstruct(){this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(t){if(!(t.key!==x.KeyCode.TAB||!t.shiftKey)){if(this.focusService.focusNextGridCoreContainer(!0)){t.preventDefault();return}x._stopPropagationForAgGrid(t)}}setActiveButton(t){this.buttonComps.forEach(e=>{e.setSelected(t===e.getToolPanelId())})}addButtonComp(t){const e=this.createBean(new ny(t));return this.buttonComps.push(e),this.appendChild(e),e.addEventListener("toggleButtonClicked",()=>{this.dispatchLocalEvent({type:"sideBarButtonClicked",toolPanelId:t.id})}),e}clearButtons(){this.buttonComps=this.destroyBeans(this.buttonComps),x._clearElement(this.getGui()),super.destroy()}destroy(){this.clearButtons(),super.destroy()}},oy={selector:"AG-SIDE-BAR-BUTTONS",component:ry},Id={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},Od={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},qa={columns:Id,filters:Od};function Ka(t){if(!t)return;if(t===!0)return{toolPanels:[Id,Od],defaultToolPanel:"columns"};if(typeof t=="string")return Ka([t]);if(Array.isArray(t)){const n=[];return t.forEach(o=>{const s=qa[o];if(!s){Ld(o);return}n.push(s)}),n.length===0?void 0:{toolPanels:n,defaultToolPanel:n[0].id}}return{toolPanels:iy(t.toolPanels),defaultToolPanel:t.defaultToolPanel,hiddenByDefault:t.hiddenByDefault,position:t.position}}function Ld(t){x._warnOnce(`the key ${t} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(qa).join(",")}`)}function iy(t){const e=[];return t&&t.forEach(n=>{let o=null;if(typeof n=="string"){const s=qa[n];if(!s){Ld(n);return}o=s}else o=n;e.push(o)}),e}var sy=class extends x.Component{constructor(){super('<div class="ag-tool-panel-horizontal-resize"></div>'),this.minWidth=100,this.maxWidth=null}wireBeans(t){this.horizontalResizeService=t.horizontalResizeService}setElementToResize(t){this.elementToResize=t}postConstruct(){const t=this.horizontalResizeService.addResizeBar({eResizeBar:this.getGui(),dragStartPixels:1,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this),onResizeEnd:this.onResizeEnd.bind(this)});this.addDestroyFunc(t),this.setInverted(this.gos.get("enableRtl"))}dispatchResizeEvent(t,e,n){this.eventService.dispatchEvent({type:"toolPanelSizeChanged",width:n,started:t,ended:e})}onResizeStart(){this.startingWidth=this.elementToResize.offsetWidth,this.dispatchResizeEvent(!0,!1,this.startingWidth)}onResizeEnd(t){return this.onResizing(t,!0)}onResizing(t,e=!1){const n=this.inverted?-1:1;let o=Math.max(this.minWidth,Math.floor(this.startingWidth-t*n));this.maxWidth!=null&&(o=Math.min(this.maxWidth,o)),this.elementToResize.style.width=`${o}px`,this.dispatchResizeEvent(!1,e,o)}setInverted(t){this.inverted=t}setMaxWidth(t){this.maxWidth=t}setMinWidth(t){t!=null?this.minWidth=t:this.minWidth=100}},ay=class extends x.Component{wireBeans(t){this.userComponentFactory=t.userComponentFactory}constructor(){super('<div class="ag-tool-panel-wrapper" role="tabpanel"/>')}postConstruct(){const t=this.getGui(),e=this.resizeBar=this.createManagedBean(new sy);t.setAttribute("id",`ag-${this.getCompId()}`),e.setElementToResize(t),this.appendChild(e)}getToolPanelId(){return this.toolPanelId}setToolPanelDef(t,e){const{id:n,minWidth:o,maxWidth:s,width:l}=t;this.toolPanelId=n,this.width=l;const c=this.userComponentFactory.getToolPanelCompDetails(t,e),u=c.newAgStackInstance();if(this.params=c.params,u==null){x._warnOnce(`error processing tool panel component ${n}. You need to specify 'toolPanel'`);return}u.then(this.setToolPanelComponent.bind(this)),o!=null&&this.resizeBar.setMinWidth(o),s!=null&&this.resizeBar.setMaxWidth(s)}setToolPanelComponent(t){this.toolPanelCompInstance=t,this.appendChild(t.getGui()),this.addDestroyFunc(()=>{this.destroyBean(t)}),this.width&&(this.getGui().style.width=`${this.width}px`)}getToolPanelInstance(){return this.toolPanelCompInstance}setResizerSizerSide(t){const e=this.gos.get("enableRtl"),n=t==="left",o=e?n:!n;this.resizeBar.setInverted(o)}refresh(){var t;(t=this.toolPanelCompInstance)==null||t.refresh(this.params)}},ly=class extends x.Component{constructor(){super(`<div class="ag-side-bar ag-unselectable">
|
|
9
9
|
<ag-side-bar-buttons data-ref="sideBarButtons"></ag-side-bar-buttons>
|
|
10
|
-
</div>`,[Xg]),this.sideBarButtons=x.RefPlaceholder,this.toolPanelWrappers=[]}wireBeans(t){this.focusService=t.focusService,this.filterManager=t.filterManager,this.sideBarService=t.sideBarService}postConstruct(){this.sideBarButtons.addEventListener("sideBarButtonClicked",this.onToolPanelButtonClicked.bind(this));const{sideBar:t}=this.gos.get("initialState")??{};this.setSideBarDef({sideBarDef:Ha(this.gos.get("sideBar")),sideBarState:t}),this.addManagedPropertyListener("sideBar",this.onSideBarUpdated.bind(this)),this.sideBarService.registerSideBarComp(this);const e=this.getFocusableElement();this.createManagedBean(new x.ManagedFocusFeature(e,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)})),x._addFocusableContainerListener(this,e,this.focusService)}onTabKeyDown(t){if(t.defaultPrevented)return;const{focusService:e,sideBarButtons:n}=this,o=this.getGui(),s=n.getGui(),l=x._getActiveDomElement(this.gos),c=o.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),u=t.target;if(!c)return e.focusNextGridCoreContainer(t.shiftKey,!0);if(s.contains(l)){e.focusInto(c,t.shiftKey)&&t.preventDefault();return}if(!t.shiftKey)return;let p=null;c.contains(l)?p=this.focusService.findNextFocusableElement(c,void 0,!0):e.isTargetUnderManagedComponent(c,u)&&t.shiftKey&&(p=this.focusService.findFocusableElementBeforeTabGuard(c,u)),p||(p=s.querySelector(".ag-selected button")),p&&p!==t.target&&(t.preventDefault(),p.focus())}handleKeyDown(t){const e=x._getActiveDomElement(this.gos);if(!this.sideBarButtons.getGui().contains(e))return;const n=this.sideBarButtons.getGui(),o=Array.prototype.slice.call(n.querySelectorAll(".ag-side-button")),s=o.findIndex(u=>u.contains(e));let l=null;switch(t.key){case x.KeyCode.LEFT:case x.KeyCode.UP:l=Math.max(0,s-1);break;case x.KeyCode.RIGHT:case x.KeyCode.DOWN:l=Math.min(s+1,o.length-1);break}if(l===null)return;const c=o[l].querySelector("button");c&&(c.focus(),t.preventDefault())}onToolPanelButtonClicked(t){const e=t.toolPanelId;this.openedItem()===e?this.openToolPanel(void 0,"sideBarButtonClicked"):this.openToolPanel(e,"sideBarButtonClicked")}clearDownUi(){this.sideBarButtons.clearButtons(),this.destroyToolPanelWrappers()}setSideBarDef({sideBarDef:t,sideBarState:e,existingToolPanelWrappers:n}){if(this.setDisplayed(!1),this.sideBar=t,this.sideBar&&this.sideBar.toolPanels){const o=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(o,e,n),!this.toolPanelWrappers.length)return;const s=e?e.visible:!this.sideBar.hiddenByDefault;if(this.setDisplayed(s),this.setSideBarPosition(e?e.position:this.sideBar.position),s)if(e){const{openToolPanel:l}=e;l&&this.openToolPanel(l,"sideBarInitializing")}else this.openToolPanel(this.sideBar.defaultToolPanel,"sideBarInitializing")}}getDef(){return this.sideBar}setSideBarPosition(t){t||(t="right"),this.position=t;const e=t==="left",n=e?"right":"left";return this.addOrRemoveCssClass("ag-side-bar-left",e),this.addOrRemoveCssClass("ag-side-bar-right",!e),this.toolPanelWrappers.forEach(o=>{o.setResizerSizerSide(n)}),this.dispatchSideBarUpdated(),this}setDisplayed(t,e){super.setDisplayed(t,e),this.dispatchSideBarUpdated()}getState(){const t={};return this.toolPanelWrappers.forEach(e=>{var n,o;t[e.getToolPanelId()]=(o=(n=e.getToolPanelInstance())==null?void 0:n.getState)==null?void 0:o.call(n)}),{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:t}}createToolPanelsAndSideButtons(t,e,n){var o;for(const s of t)this.createToolPanelAndSideButton(s,(o=e==null?void 0:e.toolPanels)==null?void 0:o[s.id],n==null?void 0:n[s.id])}validateDef(t){var e;if(t.id==null)return x._warnOnce("please review all your toolPanel components, it seems like at least one of them doesn't have an id"),!1;if(t.toolPanel==="agColumnsToolPanel"&&!this.gos.assertModuleRegistered(x.ModuleNames.ColumnsToolPanelModule,"Column Tool Panel"))return!1;if(t.toolPanel==="agFiltersToolPanel"){if(!this.gos.assertModuleRegistered(x.ModuleNames.FiltersToolPanelModule,"Filters Tool Panel"))return!1;if((e=this.filterManager)!=null&&e.isAdvancedFilterEnabled())return x._warnOnce("Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled."),!1}return!0}createToolPanelAndSideButton(t,e,n){if(!this.validateDef(t))return;const o=this.sideBarButtons.addButtonComp(t);let s;n?s=n:(s=this.createBean(new ty),s.setToolPanelDef(t,{initialState:e,onStateUpdated:()=>this.dispatchSideBarUpdated()})),s.setDisplayed(!1);const l=s.getGui();this.appendChild(l),this.toolPanelWrappers.push(s),x._setAriaControls(o.getButtonElement(),l)}refresh(){this.toolPanelWrappers.forEach(t=>t.refresh())}openToolPanel(t,e="api"){const n=this.openedItem();if(n===t)return;this.toolPanelWrappers.forEach(l=>{const c=t===l.getToolPanelId();l.setDisplayed(c)});const o=this.openedItem();n!==o&&(this.sideBarButtons.setActiveButton(t),this.raiseToolPanelVisibleEvent(t,n??void 0,e))}getToolPanelInstance(t){const e=this.toolPanelWrappers.filter(n=>n.getToolPanelId()===t)[0];if(!e){x._warnOnce(`unable to lookup Tool Panel as invalid key supplied: ${t}`);return}return e.getToolPanelInstance()}raiseToolPanelVisibleEvent(t,e,n){const o=!!t&&!!e;e&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:n,key:e,visible:!1,switchingToolPanel:o}),t&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:n,key:t,visible:!0,switchingToolPanel:o})}close(t="api"){this.openToolPanel(void 0,t)}isToolPanelShowing(){return!!this.openedItem()}openedItem(){let t=null;return this.toolPanelWrappers.forEach(e=>{e.isDisplayed()&&(t=e.getToolPanelId())}),t}onSideBarUpdated(){var n;const t=Ha(this.gos.get("sideBar")),e={};t&&this.sideBar&&((n=t.toolPanels)==null||n.forEach(o=>{var f,m;const{id:s}=o;if(!s)return;const l=(f=this.sideBar.toolPanels)==null?void 0:f.find(y=>y.id===s);if(!l||o.toolPanel!==l.toolPanel)return;const c=this.toolPanelWrappers.find(y=>y.getToolPanelId()===s);if(!c)return;const u=this.gos.addGridCommonParams({...o.toolPanelParams??{},onStateUpdated:()=>this.dispatchSideBarUpdated()});((m=c.getToolPanelInstance())==null?void 0:m.refresh(u))===!0&&(this.toolPanelWrappers=this.toolPanelWrappers.filter(y=>y!==c),x._removeFromParent(c.getGui()),e[s]=c)})),this.clearDownUi(),this.setSideBarDef({sideBarDef:t,existingToolPanelWrappers:e})}dispatchSideBarUpdated(){this.eventService.dispatchEvent({type:"sideBarUpdated"})}destroyToolPanelWrappers(){this.toolPanelWrappers.forEach(t=>{x._removeFromParent(t.getGui()),this.destroyBean(t)}),this.toolPanelWrappers.length=0}destroy(){this.destroyToolPanelWrappers(),super.destroy()}},ry={selector:"AG-SIDE-BAR",component:ny},oy=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="sideBarService"}registerSideBarComp(t){this.sideBarComp=t}getSideBarComp(){return this.sideBarComp}getSideBarSelector(){return ry}},ja="32.3.3",Id=x._defineModule({version:ja,moduleName:`${x.ModuleNames.SideBarModule}-core`,beans:[Og,oy],dependantModules:[Ie.EnterpriseCoreModule]}),iy=x._defineModule({version:ja,moduleName:`${x.ModuleNames.SideBarModule}-api`,apiFunctions:{isSideBarVisible:Gg,setSideBarVisible:zg,setSideBarPosition:$g,openToolPanel:Zg,closeToolPanel:Ug,getOpenedToolPanel:Wg,refreshToolPanel:Hg,isToolPanelShowing:jg,getToolPanelInstance:qg,getSideBar:Kg},dependantModules:[Id]}),qa=x._defineModule({version:ja,moduleName:x.ModuleNames.SideBarModule,dependantModules:[Id,iy]}),sy={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},ay=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="aggFuncService",this.aggFuncsMap={},this.initialised=!1}postConstruct(){this.init()}init(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs")))}initialiseWithDefaultAggregations(){const t=this.aggFuncsMap;t.sum=ly,t.first=cy,t.last=dy,t.min=uy,t.max=py,t.count=hy,t.avg=fy,this.initialised=!0}isAggFuncPossible(t,e){const n=this.getFuncNames(t),o=x._includes(n,e),s=x._exists(this.aggFuncsMap[e]);return o&&s}getDefaultFuncLabel(t){return sy[t]??t}getDefaultAggFunc(t){const e=t.getColDef().defaultAggFunc;if(x._exists(e)&&this.isAggFuncPossible(t,e))return e;if(this.isAggFuncPossible(t,"sum"))return"sum";const n=this.getFuncNames(t);return x._existsAndNotEmpty(n)?n[0]:null}addAggFuncs(t){this.init(),x._iterateObject(t,(e,n)=>{this.aggFuncsMap[e]=n})}getAggFunc(t){return this.init(),this.aggFuncsMap[t]}getFuncNames(t){const e=t.getColDef().allowedAggFuncs;return e??Object.keys(this.aggFuncsMap).sort()}clear(){this.aggFuncsMap={}}};function ly(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const s=e[o];typeof s=="number"?n===null?n=s:n+=typeof n=="number"?s:BigInt(s):typeof s=="bigint"&&(n===null?n=s:n=(typeof n=="bigint"?n:BigInt(n))+s)}return n}function cy(t){return t.values.length>0?t.values[0]:null}function dy(t){return t.values.length>0?x._last(t.values):null}function uy(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const s=e[o];(typeof s=="number"||typeof s=="bigint")&&(n===null||n>s)&&(n=s)}return n}function py(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const s=e[o];(typeof s=="number"||typeof s=="bigint")&&(n===null||n<s)&&(n=s)}return n}function hy(t){var s,l;const{values:e}=t;let n=0;for(let c=0;c<e.length;c++){const u=e[c];n+=u!=null&&typeof u.value=="number"?u.value:1}const o=(l=(s=t.rowNode)==null?void 0:s.aggData)==null?void 0:l[t.column.getColId()];return o&&o.value===n?o:{value:n,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function fy(t){var c,u,p;const{values:e}=t;let n=0,o=0;for(let f=0;f<e.length;f++){const m=e[f];let y=null;typeof m=="number"||typeof m=="bigint"?(y=m,o++):m!=null&&(typeof m.value=="number"||typeof m.value=="bigint")&&typeof m.count=="number"&&(y=m.value*(typeof m.value=="number"?m.count:BigInt(m.count)),o+=m.count),typeof y=="number"?n+=typeof n=="number"?y:BigInt(y):typeof y=="bigint"&&(n=(typeof n=="bigint"?n:BigInt(n))+y)}let s=null;o>0&&(s=n/(typeof n=="number"?o:BigInt(o)));const l=(p=(c=t.rowNode)==null?void 0:c.aggData)==null?void 0:p[(u=t.column)==null?void 0:u.getColId()];return l&&l.count===o&&l.value===s?l:{count:o,value:s,toString:function(){return typeof this.value=="number"||typeof this.value=="bigint"?this.value.toString():""},toNumber:function(){return this.value}}}var my=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="aggregationStage"}wireBeans(t){this.columnModel=t.columnModel,this.aggFuncService=t.aggFuncService,this.funcColsService=t.funcColsService,this.pivotResultColsService=t.pivotResultColsService,this.valueService=t.valueService}execute(t){const e=x._missingOrEmpty(this.funcColsService.getValueColumns()),n=!this.gos.getCallback("getGroupRowAgg"),o=t.changedPath&&t.changedPath.isActive();if(e&&n&&o)return;const s=this.createAggDetails(t);this.recursivelyCreateAggData(s)}createAggDetails(t){const e=this.columnModel.isPivotActive(),n=this.funcColsService.getValueColumns(),o=e?this.funcColsService.getPivotColumns():[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!x._getGrandTotalRow(this.gos),changedPath:t.changedPath,valueColumns:n,pivotColumns:o,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return x._getGroupAggFiltering(this.gos)!==void 0||this.gos.get("suppressAggFilteredOnly")}recursivelyCreateAggData(t){const e=n=>{if(!n.hasChildren()){n.aggData&&n.setAggData(null);return}if(n.level===-1&&!t.groupIncludeTotalFooter){const l=!this.columnModel.isPivotMode();if(!t.alwaysAggregateAtRootLevel&&l){n.setAggData(null);return}}this.aggregateRowNode(n,t)};t.changedPath.forEachChangedNodeDepthFirst(e,!0)}aggregateRowNode(t,e){const n=e.valueColumns.length===0,o=e.pivotColumns.length===0;let s;e.userAggFunc?s=e.userAggFunc({nodes:t.childrenAfterFilter}):n?s=null:o?s=this.aggregateRowNodeUsingValuesOnly(t,e):s=this.aggregateRowNodeUsingValuesAndPivot(t),t.setAggData(s),t.sibling&&t.sibling.setAggData(s)}aggregateRowNodeUsingValuesAndPivot(t){var s;const e={},n=((s=this.pivotResultColsService.getPivotResultCols())==null?void 0:s.list)??[];let o=!0;for(let l=0;l<n.length;l++){const c=n[l],u=c.getColDef();if(u.pivotTotalColumnIds!=null){o=!1;continue}const p=u.pivotKeys??[];let f;t.leafGroup?f=this.getValuesFromMappedSet(t.childrenMapped,p,u.pivotValueColumn):f=this.getValuesPivotNonLeaf(t,u.colId),e[u.colId]=this.aggregateValues(f,u.pivotValueColumn.getAggFunc(),u.pivotValueColumn,t,c)}if(!o)for(let l=0;l<n.length;l++){const c=n[l],u=c.getColDef();if(u.pivotTotalColumnIds==null||!u.pivotTotalColumnIds.length)continue;const p=u.pivotTotalColumnIds.map(f=>e[f]);e[u.colId]=this.aggregateValues(p,u.pivotValueColumn.getAggFunc(),u.pivotValueColumn,t,c)}return e}aggregateRowNodeUsingValuesOnly(t,e){const n={},o=e.changedPath.isActive()?e.changedPath.getValueColumnsForNode(t,e.valueColumns):e.valueColumns,s=e.changedPath.isActive()?e.changedPath.getNotValueColumnsForNode(t,e.valueColumns):null,l=this.getValuesNormal(t,o,e.filteredOnly),c=t.aggData;return o.forEach((u,p)=>{n[u.getId()]=this.aggregateValues(l[p],u.getAggFunc(),u,t)}),s&&c&&s.forEach(u=>{n[u.getId()]=c[u.getId()]}),n}getValuesPivotNonLeaf(t,e){return t.childrenAfterFilter.map(n=>n.aggData[e])}getValuesFromMappedSet(t,e,n){let o=t;for(let s=0;s<e.length;s++){const l=e[s];o=o?o[l]:null}return o?o.map(s=>this.valueService.getValue(n,s)):[]}getValuesNormal(t,e,n){const o=[];e.forEach(()=>o.push([]));const s=e.length,l=n?t.childrenAfterFilter:t.childrenAfterGroup,c=l.length;for(let u=0;u<c;u++){const p=l[u];for(let f=0;f<s;f++){const m=e[f],y=this.valueService.getValue(m,p);o[f].push(y)}}return o}aggregateValues(t,e,n,o,s){const l=typeof e=="string"?this.aggFuncService.getAggFunc(e):e;if(typeof l!="function")return x._errorOnce(`unrecognised aggregation function ${e}`),null;const c=l,u=this.gos.addGridCommonParams({values:t,column:n,colDef:n?n.getColDef():void 0,pivotResultColumn:s,rowNode:o,data:o?o.data:void 0});return c(u)}},gy=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="autoColService"}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.columnFactory=t.columnFactory}createAutoCols(t){const e=[],n=this.gos.get("treeData");let o=x._isGroupMultiAutoColumn(this.gos);return n&&o&&(x._warnOnce('you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),o=!1),o?t.forEach((s,l)=>{e.push(this.createOneAutoCol(s,l))}):e.push(this.createOneAutoCol()),e}updateAutoCols(t,e){t.forEach((n,o)=>this.updateOneAutoCol(n,o,e))}createOneAutoCol(t,e){let n;t?n=`${x.GROUP_AUTO_COLUMN_ID}-${t.getId()}`:n=x.GROUP_AUTO_COLUMN_ID;const o=this.createAutoColDef(n,t,e);o.colId=n;const s=new x.AgColumn(o,null,n,!0);return this.createBean(s),s}updateOneAutoCol(t,e,n){const o=t.getColDef(),s=typeof o.showRowGroup=="string"?o.showRowGroup:void 0,l=s!=null?this.columnModel.getColDefCol(s):void 0,c=this.createAutoColDef(t.getId(),l??void 0,e);t.setColDef(c,null,n),this.columnFactory.applyColumnState(t,c,n)}createAutoColDef(t,e,n){let o=this.createBaseColDef(e);const s=this.gos.get("autoGroupColumnDef");x._mergeDeep(o,s),o=this.columnFactory.addColumnDefaultAndTypes(o,t),this.gos.get("treeData")||x._missing(o.field)&&x._missing(o.valueGetter)&&x._missing(o.filterValueGetter)&&o.filter!=="agGroupColumnFilter"&&(o.filter=!1),n&&n>0&&(o.headerCheckboxSelection=!1);const l=x._isColumnsSortingCoupledToGroup(this.gos),c=o.valueGetter||o.field!=null;return l&&!c&&(o.sortIndex=void 0,o.initialSort=void 0),o}createBaseColDef(t){const e=this.gos.get("autoGroupColumnDef"),o={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(e&&(e.cellRenderer||e.cellRendererSelector)||(o.cellRenderer="agGroupCellRenderer"),t){const l=t.getColDef();Object.assign(o,{headerName:this.columnNameService.getDisplayNameForColumn(t,"header"),headerValueGetter:l.headerValueGetter}),l.cellRenderer&&Object.assign(o,{cellRendererParams:{innerRenderer:l.cellRenderer,innerRendererParams:l.cellRendererParams}}),o.showRowGroup=t.getColId()}else o.showRowGroup=!0;return o}},yy=class extends Ie.PillDragComp{constructor(t,e,n,o,s){super(e,n,s,`
|
|
10
|
+
</div>`,[oy]),this.sideBarButtons=x.RefPlaceholder,this.toolPanelWrappers=[]}wireBeans(t){this.focusService=t.focusService,this.filterManager=t.filterManager,this.sideBarService=t.sideBarService}postConstruct(){this.sideBarButtons.addEventListener("sideBarButtonClicked",this.onToolPanelButtonClicked.bind(this));const{sideBar:t}=this.gos.get("initialState")??{};this.setSideBarDef({sideBarDef:Ka(this.gos.get("sideBar")),sideBarState:t}),this.addManagedPropertyListener("sideBar",this.onSideBarUpdated.bind(this)),this.sideBarService.registerSideBarComp(this);const e=this.getFocusableElement();this.createManagedBean(new x.ManagedFocusFeature(e,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)})),x._addFocusableContainerListener(this,e,this.focusService)}onTabKeyDown(t){if(t.defaultPrevented)return;const{focusService:e,sideBarButtons:n}=this,o=this.getGui(),s=n.getGui(),l=x._getActiveDomElement(this.gos),c=o.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),u=t.target;if(!c)return e.focusNextGridCoreContainer(t.shiftKey,!0);if(s.contains(l)){e.focusInto(c,t.shiftKey)&&t.preventDefault();return}if(!t.shiftKey)return;let p=null;c.contains(l)?p=this.focusService.findNextFocusableElement(c,void 0,!0):e.isTargetUnderManagedComponent(c,u)&&t.shiftKey&&(p=this.focusService.findFocusableElementBeforeTabGuard(c,u)),p||(p=s.querySelector(".ag-selected button")),p&&p!==t.target&&(t.preventDefault(),p.focus())}handleKeyDown(t){const e=x._getActiveDomElement(this.gos);if(!this.sideBarButtons.getGui().contains(e))return;const n=this.sideBarButtons.getGui(),o=Array.prototype.slice.call(n.querySelectorAll(".ag-side-button")),s=o.findIndex(u=>u.contains(e));let l=null;switch(t.key){case x.KeyCode.LEFT:case x.KeyCode.UP:l=Math.max(0,s-1);break;case x.KeyCode.RIGHT:case x.KeyCode.DOWN:l=Math.min(s+1,o.length-1);break}if(l===null)return;const c=o[l].querySelector("button");c&&(c.focus(),t.preventDefault())}onToolPanelButtonClicked(t){const e=t.toolPanelId;this.openedItem()===e?this.openToolPanel(void 0,"sideBarButtonClicked"):this.openToolPanel(e,"sideBarButtonClicked")}clearDownUi(){this.sideBarButtons.clearButtons(),this.destroyToolPanelWrappers()}setSideBarDef({sideBarDef:t,sideBarState:e,existingToolPanelWrappers:n}){if(this.setDisplayed(!1),this.sideBar=t,this.sideBar&&this.sideBar.toolPanels){const o=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(o,e,n),!this.toolPanelWrappers.length)return;const s=e?e.visible:!this.sideBar.hiddenByDefault;if(this.setDisplayed(s),this.setSideBarPosition(e?e.position:this.sideBar.position),s)if(e){const{openToolPanel:l}=e;l&&this.openToolPanel(l,"sideBarInitializing")}else this.openToolPanel(this.sideBar.defaultToolPanel,"sideBarInitializing")}}getDef(){return this.sideBar}setSideBarPosition(t){t||(t="right"),this.position=t;const e=t==="left",n=e?"right":"left";return this.addOrRemoveCssClass("ag-side-bar-left",e),this.addOrRemoveCssClass("ag-side-bar-right",!e),this.toolPanelWrappers.forEach(o=>{o.setResizerSizerSide(n)}),this.dispatchSideBarUpdated(),this}setDisplayed(t,e){super.setDisplayed(t,e),this.dispatchSideBarUpdated()}getState(){const t={};return this.toolPanelWrappers.forEach(e=>{var n,o;t[e.getToolPanelId()]=(o=(n=e.getToolPanelInstance())==null?void 0:n.getState)==null?void 0:o.call(n)}),{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:t}}createToolPanelsAndSideButtons(t,e,n){var o;for(const s of t)this.createToolPanelAndSideButton(s,(o=e==null?void 0:e.toolPanels)==null?void 0:o[s.id],n==null?void 0:n[s.id])}validateDef(t){var e;if(t.id==null)return x._warnOnce("please review all your toolPanel components, it seems like at least one of them doesn't have an id"),!1;if(t.toolPanel==="agColumnsToolPanel"&&!this.gos.assertModuleRegistered(x.ModuleNames.ColumnsToolPanelModule,"Column Tool Panel"))return!1;if(t.toolPanel==="agFiltersToolPanel"){if(!this.gos.assertModuleRegistered(x.ModuleNames.FiltersToolPanelModule,"Filters Tool Panel"))return!1;if((e=this.filterManager)!=null&&e.isAdvancedFilterEnabled())return x._warnOnce("Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled."),!1}return!0}createToolPanelAndSideButton(t,e,n){if(!this.validateDef(t))return;const o=this.sideBarButtons.addButtonComp(t);let s;n?s=n:(s=this.createBean(new ay),s.setToolPanelDef(t,{initialState:e,onStateUpdated:()=>this.dispatchSideBarUpdated()})),s.setDisplayed(!1);const l=s.getGui();this.appendChild(l),this.toolPanelWrappers.push(s),x._setAriaControls(o.getButtonElement(),l)}refresh(){this.toolPanelWrappers.forEach(t=>t.refresh())}openToolPanel(t,e="api"){const n=this.openedItem();if(n===t)return;this.toolPanelWrappers.forEach(l=>{const c=t===l.getToolPanelId();l.setDisplayed(c)});const o=this.openedItem();n!==o&&(this.sideBarButtons.setActiveButton(t),this.raiseToolPanelVisibleEvent(t,n??void 0,e))}getToolPanelInstance(t){const e=this.toolPanelWrappers.filter(n=>n.getToolPanelId()===t)[0];if(!e){x._warnOnce(`unable to lookup Tool Panel as invalid key supplied: ${t}`);return}return e.getToolPanelInstance()}raiseToolPanelVisibleEvent(t,e,n){const o=!!t&&!!e;e&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:n,key:e,visible:!1,switchingToolPanel:o}),t&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:n,key:t,visible:!0,switchingToolPanel:o})}close(t="api"){this.openToolPanel(void 0,t)}isToolPanelShowing(){return!!this.openedItem()}openedItem(){let t=null;return this.toolPanelWrappers.forEach(e=>{e.isDisplayed()&&(t=e.getToolPanelId())}),t}onSideBarUpdated(){var n;const t=Ka(this.gos.get("sideBar")),e={};t&&this.sideBar&&((n=t.toolPanels)==null||n.forEach(o=>{var f,m;const{id:s}=o;if(!s)return;const l=(f=this.sideBar.toolPanels)==null?void 0:f.find(y=>y.id===s);if(!l||o.toolPanel!==l.toolPanel)return;const c=this.toolPanelWrappers.find(y=>y.getToolPanelId()===s);if(!c)return;const u=this.gos.addGridCommonParams({...o.toolPanelParams??{},onStateUpdated:()=>this.dispatchSideBarUpdated()});((m=c.getToolPanelInstance())==null?void 0:m.refresh(u))===!0&&(this.toolPanelWrappers=this.toolPanelWrappers.filter(y=>y!==c),x._removeFromParent(c.getGui()),e[s]=c)})),this.clearDownUi(),this.setSideBarDef({sideBarDef:t,existingToolPanelWrappers:e})}dispatchSideBarUpdated(){this.eventService.dispatchEvent({type:"sideBarUpdated"})}destroyToolPanelWrappers(){this.toolPanelWrappers.forEach(t=>{x._removeFromParent(t.getGui()),this.destroyBean(t)}),this.toolPanelWrappers.length=0}destroy(){this.destroyToolPanelWrappers(),super.destroy()}},cy={selector:"AG-SIDE-BAR",component:ly},dy=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="sideBarService"}registerSideBarComp(t){this.sideBarComp=t}getSideBarComp(){return this.sideBarComp}getSideBarSelector(){return cy}},Ya="32.3.3",Gd=x._defineModule({version:Ya,moduleName:`${x.ModuleNames.SideBarModule}-core`,beans:[Wg,dy],dependantModules:[Ie.EnterpriseCoreModule]}),uy=x._defineModule({version:Ya,moduleName:`${x.ModuleNames.SideBarModule}-api`,apiFunctions:{isSideBarVisible:Hg,setSideBarVisible:jg,setSideBarPosition:qg,openToolPanel:Kg,closeToolPanel:Yg,getOpenedToolPanel:Jg,refreshToolPanel:Xg,isToolPanelShowing:Qg,getToolPanelInstance:ey,getSideBar:ty},dependantModules:[Gd]}),Ja=x._defineModule({version:Ya,moduleName:x.ModuleNames.SideBarModule,dependantModules:[Gd,uy]}),py={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},hy=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="aggFuncService",this.aggFuncsMap={},this.initialised=!1}postConstruct(){this.init()}init(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs")))}initialiseWithDefaultAggregations(){const t=this.aggFuncsMap;t.sum=fy,t.first=my,t.last=gy,t.min=yy,t.max=_y,t.count=vy,t.avg=Cy,this.initialised=!0}isAggFuncPossible(t,e){const n=this.getFuncNames(t),o=x._includes(n,e),s=x._exists(this.aggFuncsMap[e]);return o&&s}getDefaultFuncLabel(t){return py[t]??t}getDefaultAggFunc(t){const e=t.getColDef().defaultAggFunc;if(x._exists(e)&&this.isAggFuncPossible(t,e))return e;if(this.isAggFuncPossible(t,"sum"))return"sum";const n=this.getFuncNames(t);return x._existsAndNotEmpty(n)?n[0]:null}addAggFuncs(t){this.init(),x._iterateObject(t,(e,n)=>{this.aggFuncsMap[e]=n})}getAggFunc(t){return this.init(),this.aggFuncsMap[t]}getFuncNames(t){const e=t.getColDef().allowedAggFuncs;return e??Object.keys(this.aggFuncsMap).sort()}clear(){this.aggFuncsMap={}}};function fy(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const s=e[o];typeof s=="number"?n===null?n=s:n+=typeof n=="number"?s:BigInt(s):typeof s=="bigint"&&(n===null?n=s:n=(typeof n=="bigint"?n:BigInt(n))+s)}return n}function my(t){return t.values.length>0?t.values[0]:null}function gy(t){return t.values.length>0?x._last(t.values):null}function yy(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const s=e[o];(typeof s=="number"||typeof s=="bigint")&&(n===null||n>s)&&(n=s)}return n}function _y(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const s=e[o];(typeof s=="number"||typeof s=="bigint")&&(n===null||n<s)&&(n=s)}return n}function vy(t){var s,l;const{values:e}=t;let n=0;for(let c=0;c<e.length;c++){const u=e[c];n+=u!=null&&typeof u.value=="number"?u.value:1}const o=(l=(s=t.rowNode)==null?void 0:s.aggData)==null?void 0:l[t.column.getColId()];return o&&o.value===n?o:{value:n,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function Cy(t){var c,u,p;const{values:e}=t;let n=0,o=0;for(let f=0;f<e.length;f++){const m=e[f];let y=null;typeof m=="number"||typeof m=="bigint"?(y=m,o++):m!=null&&(typeof m.value=="number"||typeof m.value=="bigint")&&typeof m.count=="number"&&(y=m.value*(typeof m.value=="number"?m.count:BigInt(m.count)),o+=m.count),typeof y=="number"?n+=typeof n=="number"?y:BigInt(y):typeof y=="bigint"&&(n=(typeof n=="bigint"?n:BigInt(n))+y)}let s=null;o>0&&(s=n/(typeof n=="number"?o:BigInt(o)));const l=(p=(c=t.rowNode)==null?void 0:c.aggData)==null?void 0:p[(u=t.column)==null?void 0:u.getColId()];return l&&l.count===o&&l.value===s?l:{count:o,value:s,toString:function(){return typeof this.value=="number"||typeof this.value=="bigint"?this.value.toString():""},toNumber:function(){return this.value}}}var wy=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="aggregationStage"}wireBeans(t){this.columnModel=t.columnModel,this.aggFuncService=t.aggFuncService,this.funcColsService=t.funcColsService,this.pivotResultColsService=t.pivotResultColsService,this.valueService=t.valueService}execute(t){const e=x._missingOrEmpty(this.funcColsService.getValueColumns()),n=!this.gos.getCallback("getGroupRowAgg"),o=t.changedPath&&t.changedPath.isActive();if(e&&n&&o)return;const s=this.createAggDetails(t);this.recursivelyCreateAggData(s)}createAggDetails(t){const e=this.columnModel.isPivotActive(),n=this.funcColsService.getValueColumns(),o=e?this.funcColsService.getPivotColumns():[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!x._getGrandTotalRow(this.gos),changedPath:t.changedPath,valueColumns:n,pivotColumns:o,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return x._getGroupAggFiltering(this.gos)!==void 0||this.gos.get("suppressAggFilteredOnly")}recursivelyCreateAggData(t){const e=n=>{if(!n.hasChildren()){n.aggData&&n.setAggData(null);return}if(n.level===-1&&!t.groupIncludeTotalFooter){const l=!this.columnModel.isPivotMode();if(!t.alwaysAggregateAtRootLevel&&l){n.setAggData(null);return}}this.aggregateRowNode(n,t)};t.changedPath.forEachChangedNodeDepthFirst(e,!0)}aggregateRowNode(t,e){const n=e.valueColumns.length===0,o=e.pivotColumns.length===0;let s;e.userAggFunc?s=e.userAggFunc({nodes:t.childrenAfterFilter}):n?s=null:o?s=this.aggregateRowNodeUsingValuesOnly(t,e):s=this.aggregateRowNodeUsingValuesAndPivot(t),t.setAggData(s),t.sibling&&t.sibling.setAggData(s)}aggregateRowNodeUsingValuesAndPivot(t){var s;const e={},n=((s=this.pivotResultColsService.getPivotResultCols())==null?void 0:s.list)??[];let o=!0;for(let l=0;l<n.length;l++){const c=n[l],u=c.getColDef();if(u.pivotTotalColumnIds!=null){o=!1;continue}const p=u.pivotKeys??[];let f;t.leafGroup?f=this.getValuesFromMappedSet(t.childrenMapped,p,u.pivotValueColumn):f=this.getValuesPivotNonLeaf(t,u.colId),e[u.colId]=this.aggregateValues(f,u.pivotValueColumn.getAggFunc(),u.pivotValueColumn,t,c)}if(!o)for(let l=0;l<n.length;l++){const c=n[l],u=c.getColDef();if(u.pivotTotalColumnIds==null||!u.pivotTotalColumnIds.length)continue;const p=u.pivotTotalColumnIds.map(f=>e[f]);e[u.colId]=this.aggregateValues(p,u.pivotValueColumn.getAggFunc(),u.pivotValueColumn,t,c)}return e}aggregateRowNodeUsingValuesOnly(t,e){const n={},o=e.changedPath.isActive()?e.changedPath.getValueColumnsForNode(t,e.valueColumns):e.valueColumns,s=e.changedPath.isActive()?e.changedPath.getNotValueColumnsForNode(t,e.valueColumns):null,l=this.getValuesNormal(t,o,e.filteredOnly),c=t.aggData;return o.forEach((u,p)=>{n[u.getId()]=this.aggregateValues(l[p],u.getAggFunc(),u,t)}),s&&c&&s.forEach(u=>{n[u.getId()]=c[u.getId()]}),n}getValuesPivotNonLeaf(t,e){return t.childrenAfterFilter.map(n=>n.aggData[e])}getValuesFromMappedSet(t,e,n){let o=t;for(let s=0;s<e.length;s++){const l=e[s];o=o?o[l]:null}return o?o.map(s=>this.valueService.getValue(n,s)):[]}getValuesNormal(t,e,n){const o=[];e.forEach(()=>o.push([]));const s=e.length,l=n?t.childrenAfterFilter:t.childrenAfterGroup,c=l.length;for(let u=0;u<c;u++){const p=l[u];for(let f=0;f<s;f++){const m=e[f],y=this.valueService.getValue(m,p);o[f].push(y)}}return o}aggregateValues(t,e,n,o,s){const l=typeof e=="string"?this.aggFuncService.getAggFunc(e):e;if(typeof l!="function")return x._errorOnce(`unrecognised aggregation function ${e}`),null;const c=l,u=this.gos.addGridCommonParams({values:t,column:n,colDef:n?n.getColDef():void 0,pivotResultColumn:s,rowNode:o,data:o?o.data:void 0});return c(u)}},by=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="autoColService"}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.columnFactory=t.columnFactory}createAutoCols(t){const e=[],n=this.gos.get("treeData");let o=x._isGroupMultiAutoColumn(this.gos);return n&&o&&(x._warnOnce('you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),o=!1),o?t.forEach((s,l)=>{e.push(this.createOneAutoCol(s,l))}):e.push(this.createOneAutoCol()),e}updateAutoCols(t,e){t.forEach((n,o)=>this.updateOneAutoCol(n,o,e))}createOneAutoCol(t,e){let n;t?n=`${x.GROUP_AUTO_COLUMN_ID}-${t.getId()}`:n=x.GROUP_AUTO_COLUMN_ID;const o=this.createAutoColDef(n,t,e);o.colId=n;const s=new x.AgColumn(o,null,n,!0);return this.createBean(s),s}updateOneAutoCol(t,e,n){const o=t.getColDef(),s=typeof o.showRowGroup=="string"?o.showRowGroup:void 0,l=s!=null?this.columnModel.getColDefCol(s):void 0,c=this.createAutoColDef(t.getId(),l??void 0,e);t.setColDef(c,null,n),this.columnFactory.applyColumnState(t,c,n)}createAutoColDef(t,e,n){let o=this.createBaseColDef(e);const s=this.gos.get("autoGroupColumnDef");x._mergeDeep(o,s),o=this.columnFactory.addColumnDefaultAndTypes(o,t),this.gos.get("treeData")||x._missing(o.field)&&x._missing(o.valueGetter)&&x._missing(o.filterValueGetter)&&o.filter!=="agGroupColumnFilter"&&(o.filter=!1),n&&n>0&&(o.headerCheckboxSelection=!1);const l=x._isColumnsSortingCoupledToGroup(this.gos),c=o.valueGetter||o.field!=null;return l&&!c&&(o.sortIndex=void 0,o.initialSort=void 0),o}createBaseColDef(t){const e=this.gos.get("autoGroupColumnDef"),o={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(e&&(e.cellRenderer||e.cellRendererSelector)||(o.cellRenderer="agGroupCellRenderer"),t){const l=t.getColDef();Object.assign(o,{headerName:this.columnNameService.getDisplayNameForColumn(t,"header"),headerValueGetter:l.headerValueGetter}),l.cellRenderer&&Object.assign(o,{cellRendererParams:{innerRenderer:l.cellRenderer,innerRendererParams:l.cellRendererParams}}),o.showRowGroup=t.getColId()}else o.showRowGroup=!0;return o}},xy=class extends Ie.PillDragComp{constructor(t,e,n,o,s){super(e,n,s,`
|
|
11
11
|
<span role="option">
|
|
12
12
|
<span data-ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>
|
|
13
13
|
<span data-ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>
|
|
14
14
|
<ag-sort-indicator data-ref="eSortIndicator"></ag-sort-indicator>
|
|
15
15
|
<span data-ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>
|
|
16
16
|
</span>
|
|
17
|
-
`,[x.SortIndicatorSelector]),this.column=t,this.dropZonePurpose=o,this.eSortIndicator=x.RefPlaceholder,this.popupShowing=!1}wireBeans(t){super.wireBeans(t),this.popupService=t.popupService,this.sortController=t.sortController,this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService,this.aggFuncService=t.aggFuncService}postConstruct(){this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnDrop"),super.postConstruct(),this.setupSort(),this.addManagedEventListeners({sortChanged:()=>{this.setupAria()}}),this.isGroupingZone()&&this.addManagedPropertyListener("groupLockGroupColumns",()=>{this.refreshRemove(),this.refreshDraggable(),this.setupAria()})}getItem(){return this.column}getDisplayName(){return this.displayName}getTooltip(){return this.column.getColDef().headerTooltip}addAdditionalAriaInstructions(t,e){const n=this.gos.get("rowGroupPanelSuppressSort"),o=this.gos.get("functionsReadOnly");if(this.isAggregationZone()&&!o){const s=e("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");t.push(s)}if(this.isGroupingZone()&&this.column.isSortable()&&!n){const s=e("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");t.push(s)}super.addAdditionalAriaInstructions(t,e)}isDraggable(){return this.isReadOnly()}isRemovable(){return this.isReadOnly()}isReadOnly(){return!this.isGroupingAndLocked()&&!this.gos.get("functionsReadOnly")}getAriaDisplayName(){const t=this.localeService.getLocaleTextFunc(),{name:e,aggFuncName:n}=this.getColumnAndAggFuncName(),o=t("ariaDropZoneColumnComponentAggFuncSeparator"," of "),s={asc:t("ariaDropZoneColumnComponentSortAscending","ascending"),desc:t("ariaDropZoneColumnComponentSortDescending","descending")},l=this.column.getSort(),c=this.gos.get("rowGroupPanelSuppressSort");return[n&&`${n}${o}`,e,this.isGroupingZone()&&!c&&l&&`, ${s[l]}`].filter(u=>!!u).join("")}getColumnAndAggFuncName(){const t=this.displayName;let e="";if(this.isAggregationZone()){const n=this.column.getAggFunc(),o=typeof n=="string"?n:"agg";e=this.localeService.getLocaleTextFunc()(o,o)}return{name:t,aggFuncName:e}}setupSort(){const t=this.column.isSortable(),e=this.isGroupingZone();if(!(!t||!e)&&!this.gos.get("rowGroupPanelSuppressSort")){this.eSortIndicator.setupSort(this.column,!0);const n=o=>{o.preventDefault();const l=this.gos.get("multiSortKey")==="ctrl"?o.ctrlKey||o.metaKey:o.shiftKey;this.sortController.progressSort(this.column,l,"uiColumnSorted")};this.addGuiEventListener("click",n),this.addGuiEventListener("keydown",o=>{o.key===x.KeyCode.ENTER&&this.isGroupingZone()&&n(o)})}}getDefaultIconName(){return"hide"}createGetDragItem(){const{column:t}=this;return()=>{const e={};return e[t.getId()]=t.isVisible(),{columns:[t],visibleState:e}}}setupComponents(){super.setupComponents(),this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&this.addGuiEventListener("click",this.onShowAggFuncSelection.bind(this))}onKeyDown(t){super.onKeyDown(t),t.key===x.KeyCode.ENTER&&this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&(t.preventDefault(),this.onShowAggFuncSelection())}getDisplayValue(){const{name:t,aggFuncName:e}=this.getColumnAndAggFuncName();return this.isAggregationZone()?`${e}(${t})`:t}onShowAggFuncSelection(){if(this.popupShowing)return;this.popupShowing=!0;const t=new Ie.VirtualList({cssIdentifier:"select-agg-func"}),e=this.aggFuncService.getFuncNames(this.column),n=this.getGui(),o=t.getGui();t.setModel({getRow:function(m){return e[m]},getRowCount:function(){return e.length}}),this.createBean(t);const s=x._loadTemplate('<div class="ag-select-agg-func-popup"></div>');s.style.top="0px",s.style.left="0px",s.appendChild(o),s.style.width=`${n.clientWidth}px`;const[l]=this.addManagedElementListeners(s,{focusout:m=>{!s.contains(m.relatedTarget)&&p&&p.hideFunc()}}),c=m=>{this.destroyBean(t),this.popupShowing=!1,(m==null?void 0:m.key)==="Escape"&&n.focus(),l&&l()},u=this.localeService.getLocaleTextFunc(),p=this.popupService.addPopup({modal:!0,eChild:s,closeOnEsc:!0,closedCallback:c,ariaLabel:u("ariaLabelAggregationFunction","Aggregation Function")});p&&t.setComponentCreator(this.createAggSelect.bind(this,p.hideFunc)),t.addGuiEventListener("keydown",m=>{if(m.key===x.KeyCode.ENTER||m.key===x.KeyCode.SPACE){const y=t.getLastFocusedRow();if(y==null)return;const B=t.getComponentAt(y);B&&B.selectItem()}}),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:n,ePopup:s,keepWithinBounds:!0,column:this.column,position:"under"}),t.refresh();let f=e.findIndex(m=>m===this.column.getAggFunc());f===-1&&(f=0),t.focusRow(f)}createAggSelect(t,e){const n=()=>{t(),this.getGui().focus(),this.funcColsService.setColumnAggFunc(this.column,e,"toolPanelDragAndDrop")},o=this.localeService.getLocaleTextFunc(),s=e.toString(),l=o(s,s);return new _y(n,l)}isGroupingAndLocked(){return this.isGroupingZone()&&this.columnModel.isColGroupLocked(this.column)}isAggregationZone(){return this.dropZonePurpose==="aggregation"}isGroupingZone(){return this.dropZonePurpose==="rowGroup"}getDragSourceType(){return x.DragSourceType.ToolPanel}destroy(){super.destroy(),this.column=null}},_y=class extends x.Component{constructor(t,e){super('<div class="ag-select-agg-func-item"/>'),this.selectItem=t,this.getGui().innerText=e,this.addGuiEventListener("click",this.selectItem)}},Ka=class extends Ie.PillDropZonePanel{constructor(t,e){super(t),this.dropZonePurpose=e}wireBeans(t){super.wireBeans(t),this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}init(t){super.init(t),this.addManagedEventListeners({newColumnsLoaded:this.refreshGui.bind(this)}),this.addManagedPropertyListeners(["functionsReadOnly","rowGroupPanelSuppressSort","groupLockGroupColumns"],this.refreshGui.bind(this))}getItems(t){return t.columns??[]}isInterestedIn(t){return t===x.DragSourceType.HeaderCell||t===x.DragSourceType.ToolPanel}minimumAllowedNewInsertIndex(){const t=this.gos.get("groupLockGroupColumns"),e=this.funcColsService.getRowGroupColumns().length;return t===-1?e:Math.min(t,e)}showOrHideColumnOnExit(t){return this.isRowGroupPanel()&&!this.gos.get("suppressRowGroupHidesColumns")&&!t.fromNudge}handleDragEnterEnd(t){if(this.showOrHideColumnOnExit(t)){const o=t.dragSource.getDragItem().columns;this.setColumnsVisible(o,!1,"uiColumnDragged")}}handleDragLeaveEnd(t){if(this.showOrHideColumnOnExit(t)){const n=t.dragSource.getDragItem();this.setColumnsVisible(n.columns,!0,"uiColumnDragged")}}setColumnsVisible(t,e,n){if(t){const o=t.filter(s=>!s.getColDef().lockVisible);this.columnModel.setColsVisible(o,e,n)}}isRowGroupPanel(){return this.dropZonePurpose==="rowGroup"}createPillComponent(t,e,n,o){return new yy(t,e,n,this.dropZonePurpose,o)}},Ya=class extends Ka{constructor(t){super(t,"pivot")}postConstruct(){const t=this.localeService.getLocaleTextFunc(),e=t("pivotColumnsEmptyMessage","Drag here to set column labels"),n=t("pivots","Column Labels");super.init({icon:x._createIconNoSpan("pivotPanel",this.gos,null),emptyMessage:e,title:n}),this.addManagedEventListeners({newColumnsLoaded:this.refresh.bind(this),columnPivotChanged:this.refresh.bind(this),columnPivotModeChanged:this.checkVisibility.bind(this)}),this.refresh()}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaPivotDropZonePanelLabel","Column Labels")}getTooltipParams(){const t=super.getTooltipParams();return t.location="pivotColumnsList",t}refresh(){this.checkVisibility(),this.refreshGui()}checkVisibility(){const t=this.columnModel.isPivotMode();if(this.isHorizontal())switch(this.gos.get("pivotPanelShow")){case"always":this.setDisplayed(t);break;case"onlyWhenPivoting":{const e=this.columnModel.isPivotActive();this.setDisplayed(t&&e);break}default:this.setDisplayed(!1);break}else this.setDisplayed(t)}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowPivot()&&(!t.isPivotActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setPivotColumns(t,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"pivot":"notAllowed"}getExistingItems(){return this.funcColsService.getPivotColumns()}},Ja=class extends Ka{constructor(t){super(t,"rowGroup")}postConstruct(){const t=this.localeService.getLocaleTextFunc(),e=t("rowGroupColumnsEmptyMessage","Drag here to set row groups"),n=t("groups","Row Groups");super.init({icon:x._createIconNoSpan("rowGroupPanel",this.gos,null),emptyMessage:e,title:n}),this.addManagedEventListeners({columnRowGroupChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaRowGroupDropZonePanelLabel","Row Groups")}getTooltipParams(){const t=super.getTooltipParams();return t.location="rowGroupColumnsList",t}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowRowGroup()&&(!t.isRowGroupActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setRowGroupColumns(t,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"group":"notAllowed"}getExistingItems(){return this.funcColsService.getRowGroupColumns()}},vy=class extends x.Component{wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}constructor(){super()}postConstruct(){this.setGui(this.createNorthPanel());const t=this.onRowGroupChanged.bind(this);this.addManagedEventListeners({columnRowGroupChanged:t,newColumnsLoaded:t}),this.addManagedPropertyListener("rowGroupPanelShow",t),this.addManagedPropertyListener("pivotPanelShow",()=>this.onPivotPanelShow()),this.onRowGroupChanged()}createNorthPanel(){const t=document.createElement("div");t.classList.add("ag-column-drop-wrapper"),x._setAriaRole(t,"presentation"),this.rowGroupComp=new Ja(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new Ya(!0),this.createManagedBean(this.pivotComp),t.appendChild(this.rowGroupComp.getGui()),t.appendChild(this.pivotComp.getGui());const e=this.onDropPanelVisible.bind(this);return this.addManagedListeners(this.rowGroupComp,{displayChanged:e}),this.addManagedListeners(this.pivotComp,{displayChanged:e}),this.onDropPanelVisible(),t}onDropPanelVisible(){const t=this.rowGroupComp.isDisplayed()&&this.pivotComp.isDisplayed(),e="ag-column-drop-horizontal-half-width";this.rowGroupComp.addOrRemoveCssClass(e,t),this.pivotComp.addOrRemoveCssClass(e,t)}onRowGroupChanged(){if(!this.rowGroupComp)return;const t=this.gos.get("rowGroupPanelShow");if(t==="always")this.rowGroupComp.setDisplayed(!0);else if(t==="onlyWhenGrouping"){const e=!this.funcColsService.isRowGroupEmpty();this.rowGroupComp.setDisplayed(e)}else this.rowGroupComp.setDisplayed(!1)}onPivotPanelShow(){if(!this.pivotComp)return;const t=this.gos.get("pivotPanelShow");if(t==="always")this.pivotComp.setDisplayed(!0);else if(t==="onlyWhenPivoting"){const e=this.columnModel.isPivotActive();this.pivotComp.setDisplayed(e)}else this.pivotComp.setDisplayed(!1)}},Cy={selector:"AG-GRID-HEADER-DROP-ZONES",component:vy},wy=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="columnDropZonesService"}getDropZoneSelector(){return Cy}},by=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="filterAggregatesStage"}wireBeans(t){this.filterManager=t.filterManager,this.columnModel=t.columnModel}execute(t){var f,m;const e=this.columnModel.isPivotMode(),n=((f=this.filterManager)==null?void 0:f.isAggregateFilterPresent())||((m=this.filterManager)==null?void 0:m.isAggregateQuickFilterPresent()),o=y=>!y.node.group,s=y=>y.node.leafGroup,l=x._getGroupAggFiltering(this.gos)||(e?s:o),{changedPath:c}=t,u=(y,B=!1)=>{y.childrenAfterFilter&&(y.childrenAfterAggFilter=y.childrenAfterFilter,B&&y.childrenAfterAggFilter.forEach(T=>u(T,B)),this.setAllChildrenCount(y)),y.sibling&&(y.sibling.childrenAfterAggFilter=y.childrenAfterAggFilter)},p=y=>{var B;y.childrenAfterAggFilter=((B=y.childrenAfterFilter)==null?void 0:B.filter(T=>{var G;return l({node:T})&&this.filterManager.doesRowPassAggregateFilters({rowNode:T})?(u(T,!0),!0):(G=T.childrenAfterAggFilter)==null?void 0:G.length}))||null,this.setAllChildrenCount(y),y.sibling&&(y.sibling.childrenAfterAggFilter=y.childrenAfterAggFilter)};c.forEachChangedNodeDepthFirst(n?p:u,!0)}setAllChildrenCountTreeData(t){const e=t.childrenAfterAggFilter;let n=0;if(e){const o=e.length;n=o;for(let s=0;s<o;++s)n+=e[s].allChildrenCount??0}t.setAllChildrenCount(n===0&&t.level>=0?null:n)}setAllChildrenCountGridGrouping(t){let e=0;t.childrenAfterAggFilter.forEach(n=>{n.group?e+=n.allChildrenCount:e++}),t.setAllChildrenCount(e)}setAllChildrenCount(t){if(!t.hasChildren()){t.setAllChildrenCount(null);return}this.gos.get("treeData")?this.setAllChildrenCountTreeData(t):this.setAllChildrenCountGridGrouping(t)}},xy=class extends x.TabGuardComp{constructor(){super(`
|
|
17
|
+
`,[x.SortIndicatorSelector]),this.column=t,this.dropZonePurpose=o,this.eSortIndicator=x.RefPlaceholder,this.popupShowing=!1}wireBeans(t){super.wireBeans(t),this.popupService=t.popupService,this.sortController=t.sortController,this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService,this.aggFuncService=t.aggFuncService}postConstruct(){this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnDrop"),super.postConstruct(),this.setupSort(),this.addManagedEventListeners({sortChanged:()=>{this.setupAria()}}),this.isGroupingZone()&&this.addManagedPropertyListener("groupLockGroupColumns",()=>{this.refreshRemove(),this.refreshDraggable(),this.setupAria()})}getItem(){return this.column}getDisplayName(){return this.displayName}getTooltip(){return this.column.getColDef().headerTooltip}addAdditionalAriaInstructions(t,e){const n=this.gos.get("rowGroupPanelSuppressSort"),o=this.gos.get("functionsReadOnly");if(this.isAggregationZone()&&!o){const s=e("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");t.push(s)}if(this.isGroupingZone()&&this.column.isSortable()&&!n){const s=e("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");t.push(s)}super.addAdditionalAriaInstructions(t,e)}isDraggable(){return this.isReadOnly()}isRemovable(){return this.isReadOnly()}isReadOnly(){return!this.isGroupingAndLocked()&&!this.gos.get("functionsReadOnly")}getAriaDisplayName(){const t=this.localeService.getLocaleTextFunc(),{name:e,aggFuncName:n}=this.getColumnAndAggFuncName(),o=t("ariaDropZoneColumnComponentAggFuncSeparator"," of "),s={asc:t("ariaDropZoneColumnComponentSortAscending","ascending"),desc:t("ariaDropZoneColumnComponentSortDescending","descending")},l=this.column.getSort(),c=this.gos.get("rowGroupPanelSuppressSort");return[n&&`${n}${o}`,e,this.isGroupingZone()&&!c&&l&&`, ${s[l]}`].filter(u=>!!u).join("")}getColumnAndAggFuncName(){const t=this.displayName;let e="";if(this.isAggregationZone()){const n=this.column.getAggFunc(),o=typeof n=="string"?n:"agg";e=this.localeService.getLocaleTextFunc()(o,o)}return{name:t,aggFuncName:e}}setupSort(){const t=this.column.isSortable(),e=this.isGroupingZone();if(!(!t||!e)&&!this.gos.get("rowGroupPanelSuppressSort")){this.eSortIndicator.setupSort(this.column,!0);const n=o=>{o.preventDefault();const l=this.gos.get("multiSortKey")==="ctrl"?o.ctrlKey||o.metaKey:o.shiftKey;this.sortController.progressSort(this.column,l,"uiColumnSorted")};this.addGuiEventListener("click",n),this.addGuiEventListener("keydown",o=>{o.key===x.KeyCode.ENTER&&this.isGroupingZone()&&n(o)})}}getDefaultIconName(){return"hide"}createGetDragItem(){const{column:t}=this;return()=>{const e={};return e[t.getId()]=t.isVisible(),{columns:[t],visibleState:e}}}setupComponents(){super.setupComponents(),this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&this.addGuiEventListener("click",this.onShowAggFuncSelection.bind(this))}onKeyDown(t){super.onKeyDown(t),t.key===x.KeyCode.ENTER&&this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&(t.preventDefault(),this.onShowAggFuncSelection())}getDisplayValue(){const{name:t,aggFuncName:e}=this.getColumnAndAggFuncName();return this.isAggregationZone()?`${e}(${t})`:t}onShowAggFuncSelection(){if(this.popupShowing)return;this.popupShowing=!0;const t=new Ie.VirtualList({cssIdentifier:"select-agg-func"}),e=this.aggFuncService.getFuncNames(this.column),n=this.getGui(),o=t.getGui();t.setModel({getRow:function(m){return e[m]},getRowCount:function(){return e.length}}),this.createBean(t);const s=x._loadTemplate('<div class="ag-select-agg-func-popup"></div>');s.style.top="0px",s.style.left="0px",s.appendChild(o),s.style.width=`${n.clientWidth}px`;const[l]=this.addManagedElementListeners(s,{focusout:m=>{!s.contains(m.relatedTarget)&&p&&p.hideFunc()}}),c=m=>{this.destroyBean(t),this.popupShowing=!1,(m==null?void 0:m.key)==="Escape"&&n.focus(),l&&l()},u=this.localeService.getLocaleTextFunc(),p=this.popupService.addPopup({modal:!0,eChild:s,closeOnEsc:!0,closedCallback:c,ariaLabel:u("ariaLabelAggregationFunction","Aggregation Function")});p&&t.setComponentCreator(this.createAggSelect.bind(this,p.hideFunc)),t.addGuiEventListener("keydown",m=>{if(m.key===x.KeyCode.ENTER||m.key===x.KeyCode.SPACE){const y=t.getLastFocusedRow();if(y==null)return;const T=t.getComponentAt(y);T&&T.selectItem()}}),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:n,ePopup:s,keepWithinBounds:!0,column:this.column,position:"under"}),t.refresh();let f=e.findIndex(m=>m===this.column.getAggFunc());f===-1&&(f=0),t.focusRow(f)}createAggSelect(t,e){const n=()=>{t(),this.getGui().focus(),this.funcColsService.setColumnAggFunc(this.column,e,"toolPanelDragAndDrop")},o=this.localeService.getLocaleTextFunc(),s=e.toString(),l=o(s,s);return new ky(n,l)}isGroupingAndLocked(){return this.isGroupingZone()&&this.columnModel.isColGroupLocked(this.column)}isAggregationZone(){return this.dropZonePurpose==="aggregation"}isGroupingZone(){return this.dropZonePurpose==="rowGroup"}getDragSourceType(){return x.DragSourceType.ToolPanel}destroy(){super.destroy(),this.column=null}},ky=class extends x.Component{constructor(t,e){super('<div class="ag-select-agg-func-item"/>'),this.selectItem=t,this.getGui().innerText=e,this.addGuiEventListener("click",this.selectItem)}},Xa=class extends Ie.PillDropZonePanel{constructor(t,e){super(t),this.dropZonePurpose=e}wireBeans(t){super.wireBeans(t),this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}init(t){super.init(t),this.addManagedEventListeners({newColumnsLoaded:this.refreshGui.bind(this)}),this.addManagedPropertyListeners(["functionsReadOnly","rowGroupPanelSuppressSort","groupLockGroupColumns"],this.refreshGui.bind(this))}getItems(t){return t.columns??[]}isInterestedIn(t){return t===x.DragSourceType.HeaderCell||t===x.DragSourceType.ToolPanel}minimumAllowedNewInsertIndex(){const t=this.gos.get("groupLockGroupColumns"),e=this.funcColsService.getRowGroupColumns().length;return t===-1?e:Math.min(t,e)}showOrHideColumnOnExit(t){return this.isRowGroupPanel()&&!this.gos.get("suppressRowGroupHidesColumns")&&!t.fromNudge}handleDragEnterEnd(t){if(this.showOrHideColumnOnExit(t)){const o=t.dragSource.getDragItem().columns;this.setColumnsVisible(o,!1,"uiColumnDragged")}}handleDragLeaveEnd(t){if(this.showOrHideColumnOnExit(t)){const n=t.dragSource.getDragItem();this.setColumnsVisible(n.columns,!0,"uiColumnDragged")}}setColumnsVisible(t,e,n){if(t){const o=t.filter(s=>!s.getColDef().lockVisible);this.columnModel.setColsVisible(o,e,n)}}isRowGroupPanel(){return this.dropZonePurpose==="rowGroup"}createPillComponent(t,e,n,o){return new xy(t,e,n,this.dropZonePurpose,o)}},Qa=class extends Xa{constructor(t){super(t,"pivot")}postConstruct(){const t=this.localeService.getLocaleTextFunc(),e=t("pivotColumnsEmptyMessage","Drag here to set column labels"),n=t("pivots","Column Labels");super.init({icon:x._createIconNoSpan("pivotPanel",this.gos,null),emptyMessage:e,title:n}),this.addManagedEventListeners({newColumnsLoaded:this.refresh.bind(this),columnPivotChanged:this.refresh.bind(this),columnPivotModeChanged:this.checkVisibility.bind(this)}),this.refresh()}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaPivotDropZonePanelLabel","Column Labels")}getTooltipParams(){const t=super.getTooltipParams();return t.location="pivotColumnsList",t}refresh(){this.checkVisibility(),this.refreshGui()}checkVisibility(){const t=this.columnModel.isPivotMode();if(this.isHorizontal())switch(this.gos.get("pivotPanelShow")){case"always":this.setDisplayed(t);break;case"onlyWhenPivoting":{const e=this.columnModel.isPivotActive();this.setDisplayed(t&&e);break}default:this.setDisplayed(!1);break}else this.setDisplayed(t)}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowPivot()&&(!t.isPivotActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setPivotColumns(t,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"pivot":"notAllowed"}getExistingItems(){return this.funcColsService.getPivotColumns()}},el=class extends Xa{constructor(t){super(t,"rowGroup")}postConstruct(){const t=this.localeService.getLocaleTextFunc(),e=t("rowGroupColumnsEmptyMessage","Drag here to set row groups"),n=t("groups","Row Groups");super.init({icon:x._createIconNoSpan("rowGroupPanel",this.gos,null),emptyMessage:e,title:n}),this.addManagedEventListeners({columnRowGroupChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaRowGroupDropZonePanelLabel","Row Groups")}getTooltipParams(){const t=super.getTooltipParams();return t.location="rowGroupColumnsList",t}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowRowGroup()&&(!t.isRowGroupActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setRowGroupColumns(t,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"group":"notAllowed"}getExistingItems(){return this.funcColsService.getRowGroupColumns()}},Sy=class extends x.Component{wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}constructor(){super()}postConstruct(){this.setGui(this.createNorthPanel());const t=this.onRowGroupChanged.bind(this);this.addManagedEventListeners({columnRowGroupChanged:t,newColumnsLoaded:t}),this.addManagedPropertyListener("rowGroupPanelShow",t),this.addManagedPropertyListener("pivotPanelShow",()=>this.onPivotPanelShow()),this.onRowGroupChanged()}createNorthPanel(){const t=document.createElement("div");t.classList.add("ag-column-drop-wrapper"),x._setAriaRole(t,"presentation"),this.rowGroupComp=new el(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new Qa(!0),this.createManagedBean(this.pivotComp),t.appendChild(this.rowGroupComp.getGui()),t.appendChild(this.pivotComp.getGui());const e=this.onDropPanelVisible.bind(this);return this.addManagedListeners(this.rowGroupComp,{displayChanged:e}),this.addManagedListeners(this.pivotComp,{displayChanged:e}),this.onDropPanelVisible(),t}onDropPanelVisible(){const t=this.rowGroupComp.isDisplayed()&&this.pivotComp.isDisplayed(),e="ag-column-drop-horizontal-half-width";this.rowGroupComp.addOrRemoveCssClass(e,t),this.pivotComp.addOrRemoveCssClass(e,t)}onRowGroupChanged(){if(!this.rowGroupComp)return;const t=this.gos.get("rowGroupPanelShow");if(t==="always")this.rowGroupComp.setDisplayed(!0);else if(t==="onlyWhenGrouping"){const e=!this.funcColsService.isRowGroupEmpty();this.rowGroupComp.setDisplayed(e)}else this.rowGroupComp.setDisplayed(!1)}onPivotPanelShow(){if(!this.pivotComp)return;const t=this.gos.get("pivotPanelShow");if(t==="always")this.pivotComp.setDisplayed(!0);else if(t==="onlyWhenPivoting"){const e=this.columnModel.isPivotActive();this.pivotComp.setDisplayed(e)}else this.pivotComp.setDisplayed(!1)}},Ey={selector:"AG-GRID-HEADER-DROP-ZONES",component:Sy},Ty=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="columnDropZonesService"}getDropZoneSelector(){return Ey}},By=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="filterAggregatesStage"}wireBeans(t){this.filterManager=t.filterManager,this.columnModel=t.columnModel}execute(t){var f,m;const e=this.columnModel.isPivotMode(),n=((f=this.filterManager)==null?void 0:f.isAggregateFilterPresent())||((m=this.filterManager)==null?void 0:m.isAggregateQuickFilterPresent()),o=y=>!y.node.group,s=y=>y.node.leafGroup,l=x._getGroupAggFiltering(this.gos)||(e?s:o),{changedPath:c}=t,u=(y,T=!1)=>{y.childrenAfterFilter&&(y.childrenAfterAggFilter=y.childrenAfterFilter,T&&y.childrenAfterAggFilter.forEach(B=>u(B,T)),this.setAllChildrenCount(y)),y.sibling&&(y.sibling.childrenAfterAggFilter=y.childrenAfterAggFilter)},p=y=>{var T;y.childrenAfterAggFilter=((T=y.childrenAfterFilter)==null?void 0:T.filter(B=>{var L;return l({node:B})&&this.filterManager.doesRowPassAggregateFilters({rowNode:B})?(u(B,!0),!0):(L=B.childrenAfterAggFilter)==null?void 0:L.length}))||null,this.setAllChildrenCount(y),y.sibling&&(y.sibling.childrenAfterAggFilter=y.childrenAfterAggFilter)};c.forEachChangedNodeDepthFirst(n?p:u,!0)}setAllChildrenCountTreeData(t){const e=t.childrenAfterAggFilter;let n=0;if(e){const o=e.length;n=o;for(let s=0;s<o;++s)n+=e[s].allChildrenCount??0}t.setAllChildrenCount(n===0&&t.level>=0?null:n)}setAllChildrenCountGridGrouping(t){let e=0;t.childrenAfterAggFilter.forEach(n=>{n.group?e+=n.allChildrenCount:e++}),t.setAllChildrenCount(e)}setAllChildrenCount(t){if(!t.hasChildren()){t.setAllChildrenCount(null);return}this.gos.get("treeData")?this.setAllChildrenCountTreeData(t):this.setAllChildrenCountGridGrouping(t)}},Vy=class extends x.TabGuardComp{constructor(){super(`
|
|
18
18
|
<div class="ag-group-filter">
|
|
19
19
|
<div data-ref="eGroupField"></div>
|
|
20
20
|
<div data-ref="eUnderlyingFilter"></div>
|
|
21
21
|
</div>
|
|
22
|
-
`),this.eGroupField=x.RefPlaceholder,this.eUnderlyingFilter=x.RefPlaceholder}wireBeans(t){this.filterManager=t.filterManager,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService}postConstruct(){this.initialiseTabGuard({})}init(t){return this.updateParams(t).then(()=>{this.addManagedEventListeners({columnRowGroupChanged:()=>this.onColumnRowGroupChanged(),filterDestroyed:e=>this.onFilterDestroyed(e)})})}refresh(t){return this.updateParams(t),!0}updateParams(t){return this.params=t,this.validateParams(),this.updateGroups()}validateParams(){const{colDef:t}=this.params;t.field&&x._warnOnce('Group Column Filter does not work with the colDef property "field". This property will be ignored.'),t.filterValueGetter&&x._warnOnce('Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.'),t.filterParams&&x._warnOnce('Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.')}updateGroups(){const t=this.updateGroupField();return this.getUnderlyingFilters(t)}getSourceColumns(){if(this.groupColumn=this.params.column,this.gos.get("treeData"))return x._warnOnce("Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter."),[];const t=this.funcColsService.getSourceColumnsForGroupColumn(this.groupColumn);return t||(x._warnOnce("Group Column Filter only works on group columns. Please use a different filter."),[])}updateGroupField(){x._clearElement(this.eGroupField),this.eGroupFieldSelect&&this.destroyBean(this.eGroupFieldSelect);const t=this.getSourceColumns(),e=t.filter(n=>n.isFilterAllowed());return e.length?(t.length===1?(this.selectedColumn=e[0],x._setDisplayed(this.eGroupField,!1)):((!this.selectedColumn||!e.some(n=>n.getId()===this.selectedColumn.getId()))&&(this.selectedColumn=e[0]),this.createGroupFieldSelectElement(e),this.eGroupField.appendChild(this.eGroupFieldSelect.getGui()),this.eGroupField.appendChild(x._loadTemplate('<div class="ag-filter-separator"></div>')),x._setDisplayed(this.eGroupField,!0)),e):(this.selectedColumn=void 0,x._setDisplayed(this.eGroupField,!1),null)}createGroupFieldSelectElement(t){this.eGroupFieldSelect=this.createManagedBean(new x.AgSelect);const e=this.localeService.getLocaleTextFunc();this.eGroupFieldSelect.setLabel(e("groupFilterSelect","Select field:")),this.eGroupFieldSelect.setLabelAlignment("top"),this.eGroupFieldSelect.addOptions(t.map(n=>({value:n.getId(),text:this.columnNameService.getDisplayNameForColumn(n,"groupFilter",!1)??void 0}))),this.eGroupFieldSelect.setValue(this.selectedColumn.getId()),this.eGroupFieldSelect.onValueChange(n=>this.updateSelectedColumn(n)),this.eGroupFieldSelect.addCssClass("ag-group-filter-field-select-wrapper"),t.length===1&&this.eGroupFieldSelect.setDisabled(!0)}getUnderlyingFilters(t){if(!t)return this.filterColumnPairs=void 0,this.selectedFilter=void 0,this.groupColumn.setFilterActive(!1,"columnRowGroupChanged"),x.AgPromise.resolve();const e=[],n=[];return t.forEach(o=>{const s=this.filterManager.getOrCreateFilterWrapper(o);s!=null&&s.filterPromise&&e.push(s.filterPromise.then(l=>(l&&n.push({filter:l,column:o}),o.getId()===this.selectedColumn.getId()&&(this.selectedFilter=l??void 0),l)))}),x.AgPromise.all(e).then(()=>{this.filterColumnPairs=n,this.groupColumn.setFilterActive(this.isFilterActive(),"columnRowGroupChanged")})}addUnderlyingFilterElement(){var e;if(x._clearElement(this.eUnderlyingFilter),!this.selectedColumn)return x.AgPromise.resolve();const t=this.createManagedBean(new x.FilterWrapperComp(this.selectedColumn,"COLUMN_MENU"));return this.filterWrapperComp=t,t.hasFilter()?(this.eUnderlyingFilter.appendChild(t.getGui()),((e=t.getFilter())==null?void 0:e.then(()=>{var n,o;(n=t.afterGuiAttached)==null||n.call(t,this.afterGuiAttachedParams),!((o=this.afterGuiAttachedParams)!=null&&o.suppressFocus)&&this.eGroupFieldSelect&&!this.eGroupFieldSelect.isDisabled()&&this.eGroupFieldSelect.getFocusableElement().focus()}))??x.AgPromise.resolve()):x.AgPromise.resolve()}updateSelectedColumn(t){var n;if(!t)return;(n=this.filterWrapperComp)==null||n.afterGuiDetached(),this.destroyBean(this.filterWrapperComp);const e=this.getFilterColumnPair(t);this.selectedColumn=e==null?void 0:e.column,this.selectedFilter=e==null?void 0:e.filter,this.dispatchLocalEvent({type:"selectedColumnChanged"}),this.addUnderlyingFilterElement()}isFilterActive(){var t;return!!((t=this.filterColumnPairs)!=null&&t.some(({filter:e})=>e.isFilterActive()))}doesFilterPass(){return!0}getModel(){return null}setModel(){return x.AgPromise.resolve()}afterGuiAttached(t){this.afterGuiAttachedParams=t,this.addUnderlyingFilterElement()}afterGuiDetached(){var t,e;x._clearElement(this.eUnderlyingFilter),(e=(t=this.selectedFilter)==null?void 0:t.afterGuiDetached)==null||e.call(t)}onColumnRowGroupChanged(){this.updateGroups().then(()=>{this.dispatchLocalEvent({type:"columnRowGroupChanged"})})}onFilterDestroyed({column:t,source:e}){var o;if(e==="gridDestroyed")return;const n=t.getColId();(o=this.filterColumnPairs)!=null&&o.some(({column:s})=>s.getColId()===n)&&setTimeout(()=>{this.isAlive()&&this.updateGroups()})}getFilterColumnPair(t){var e;if(t)return(e=this.filterColumnPairs)==null?void 0:e.find(({column:n})=>n.getId()===t)}getSelectedFilter(){return this.selectedFilter}getSelectedColumn(){return this.selectedColumn}isFilterAllowed(){return!!this.selectedColumn}destroy(){super.destroy()}},
|
|
22
|
+
`),this.eGroupField=x.RefPlaceholder,this.eUnderlyingFilter=x.RefPlaceholder}wireBeans(t){this.filterManager=t.filterManager,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService}postConstruct(){this.initialiseTabGuard({})}init(t){return this.updateParams(t).then(()=>{this.addManagedEventListeners({columnRowGroupChanged:()=>this.onColumnRowGroupChanged(),filterDestroyed:e=>this.onFilterDestroyed(e)})})}refresh(t){return this.updateParams(t),!0}updateParams(t){return this.params=t,this.validateParams(),this.updateGroups()}validateParams(){const{colDef:t}=this.params;t.field&&x._warnOnce('Group Column Filter does not work with the colDef property "field". This property will be ignored.'),t.filterValueGetter&&x._warnOnce('Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.'),t.filterParams&&x._warnOnce('Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.')}updateGroups(){const t=this.updateGroupField();return this.getUnderlyingFilters(t)}getSourceColumns(){if(this.groupColumn=this.params.column,this.gos.get("treeData"))return x._warnOnce("Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter."),[];const t=this.funcColsService.getSourceColumnsForGroupColumn(this.groupColumn);return t||(x._warnOnce("Group Column Filter only works on group columns. Please use a different filter."),[])}updateGroupField(){x._clearElement(this.eGroupField),this.eGroupFieldSelect&&this.destroyBean(this.eGroupFieldSelect);const t=this.getSourceColumns(),e=t.filter(n=>n.isFilterAllowed());return e.length?(t.length===1?(this.selectedColumn=e[0],x._setDisplayed(this.eGroupField,!1)):((!this.selectedColumn||!e.some(n=>n.getId()===this.selectedColumn.getId()))&&(this.selectedColumn=e[0]),this.createGroupFieldSelectElement(e),this.eGroupField.appendChild(this.eGroupFieldSelect.getGui()),this.eGroupField.appendChild(x._loadTemplate('<div class="ag-filter-separator"></div>')),x._setDisplayed(this.eGroupField,!0)),e):(this.selectedColumn=void 0,x._setDisplayed(this.eGroupField,!1),null)}createGroupFieldSelectElement(t){this.eGroupFieldSelect=this.createManagedBean(new x.AgSelect);const e=this.localeService.getLocaleTextFunc();this.eGroupFieldSelect.setLabel(e("groupFilterSelect","Select field:")),this.eGroupFieldSelect.setLabelAlignment("top"),this.eGroupFieldSelect.addOptions(t.map(n=>({value:n.getId(),text:this.columnNameService.getDisplayNameForColumn(n,"groupFilter",!1)??void 0}))),this.eGroupFieldSelect.setValue(this.selectedColumn.getId()),this.eGroupFieldSelect.onValueChange(n=>this.updateSelectedColumn(n)),this.eGroupFieldSelect.addCssClass("ag-group-filter-field-select-wrapper"),t.length===1&&this.eGroupFieldSelect.setDisabled(!0)}getUnderlyingFilters(t){if(!t)return this.filterColumnPairs=void 0,this.selectedFilter=void 0,this.groupColumn.setFilterActive(!1,"columnRowGroupChanged"),x.AgPromise.resolve();const e=[],n=[];return t.forEach(o=>{const s=this.filterManager.getOrCreateFilterWrapper(o);s!=null&&s.filterPromise&&e.push(s.filterPromise.then(l=>(l&&n.push({filter:l,column:o}),o.getId()===this.selectedColumn.getId()&&(this.selectedFilter=l??void 0),l)))}),x.AgPromise.all(e).then(()=>{this.filterColumnPairs=n,this.groupColumn.setFilterActive(this.isFilterActive(),"columnRowGroupChanged")})}addUnderlyingFilterElement(){var e;if(x._clearElement(this.eUnderlyingFilter),!this.selectedColumn)return x.AgPromise.resolve();const t=this.createManagedBean(new x.FilterWrapperComp(this.selectedColumn,"COLUMN_MENU"));return this.filterWrapperComp=t,t.hasFilter()?(this.eUnderlyingFilter.appendChild(t.getGui()),((e=t.getFilter())==null?void 0:e.then(()=>{var n,o;(n=t.afterGuiAttached)==null||n.call(t,this.afterGuiAttachedParams),!((o=this.afterGuiAttachedParams)!=null&&o.suppressFocus)&&this.eGroupFieldSelect&&!this.eGroupFieldSelect.isDisabled()&&this.eGroupFieldSelect.getFocusableElement().focus()}))??x.AgPromise.resolve()):x.AgPromise.resolve()}updateSelectedColumn(t){var n;if(!t)return;(n=this.filterWrapperComp)==null||n.afterGuiDetached(),this.destroyBean(this.filterWrapperComp);const e=this.getFilterColumnPair(t);this.selectedColumn=e==null?void 0:e.column,this.selectedFilter=e==null?void 0:e.filter,this.dispatchLocalEvent({type:"selectedColumnChanged"}),this.addUnderlyingFilterElement()}isFilterActive(){var t;return!!((t=this.filterColumnPairs)!=null&&t.some(({filter:e})=>e.isFilterActive()))}doesFilterPass(){return!0}getModel(){return null}setModel(){return x.AgPromise.resolve()}afterGuiAttached(t){this.afterGuiAttachedParams=t,this.addUnderlyingFilterElement()}afterGuiDetached(){var t,e;x._clearElement(this.eUnderlyingFilter),(e=(t=this.selectedFilter)==null?void 0:t.afterGuiDetached)==null||e.call(t)}onColumnRowGroupChanged(){this.updateGroups().then(()=>{this.dispatchLocalEvent({type:"columnRowGroupChanged"})})}onFilterDestroyed({column:t,source:e}){var o;if(e==="gridDestroyed")return;const n=t.getColId();(o=this.filterColumnPairs)!=null&&o.some(({column:s})=>s.getColId()===n)&&setTimeout(()=>{this.isAlive()&&this.updateGroups()})}getFilterColumnPair(t){var e;if(t)return(e=this.filterColumnPairs)==null?void 0:e.find(({column:n})=>n.getId()===t)}getSelectedFilter(){return this.selectedFilter}getSelectedColumn(){return this.selectedColumn}isFilterAllowed(){return!!this.selectedColumn}destroy(){super.destroy()}},Ny=class extends x.Component{constructor(){super(`
|
|
23
23
|
<div data-ref="eFloatingFilter" class="ag-group-floating-filter ag-floating-filter-input" role="presentation"></div>
|
|
24
|
-
`),this.eFloatingFilter=x.RefPlaceholder,this.haveAddedColumnListeners=!1}wireBeans(t){this.columnNameService=t.columnNameService,this.filterManager=t.filterManager}init(t){this.params=t;const e=this.gos.get("groupDisplayType")==="multipleColumns";return new x.AgPromise(n=>{this.params.parentFilterInstance(o=>{this.parentFilterInstance=o,e?this.setupUnderlyingFloatingFilterElement().then(()=>n()):(this.setupReadOnlyFloatingFilterElement(),n())})}).then(()=>{this.addManagedListeners(this.parentFilterInstance,{selectedColumnChanged:this.onSelectedColumnChanged.bind(this),columnRowGroupChanged:this.onColumnRowGroupChanged.bind(this)})})}onParamsUpdated(t){this.refresh(t)}refresh(t){this.params=t,this.setParams()}setParams(){var n;const t=this.columnNameService.getDisplayNameForColumn(this.params.column,"header",!0),e=this.localeService.getLocaleTextFunc();(n=this.eFloatingFilterText)==null||n.setInputAriaLabel(`${t} ${e("ariaFilterInput","Filter Input")}`)}setupReadOnlyFloatingFilterElement(){this.eFloatingFilterText||(this.eFloatingFilterText=this.createManagedBean(new x.AgInputTextField),this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams()),this.updateDisplayedValue(),this.eFloatingFilter.appendChild(this.eFloatingFilterText.getGui())}setupUnderlyingFloatingFilterElement(){this.showingUnderlyingFloatingFilter=!1,this.underlyingFloatingFilter=void 0,x._clearElement(this.eFloatingFilter);const t=this.parentFilterInstance.getSelectedColumn();if(t&&!t.isVisible()){const e=this.filterManager.getFloatingFilterCompDetails(t,this.params.showParentFilter);if(e)return this.haveAddedColumnListeners||(this.haveAddedColumnListeners=!0,this.addManagedListeners(t,{visibleChanged:this.onColumnVisibleChanged.bind(this),colDefChanged:this.onColDefChanged.bind(this)})),e.newAgStackInstance().then(n=>{var o,s;this.underlyingFloatingFilter=n,(s=this.underlyingFloatingFilter)==null||s.onParentModelChanged((o=this.parentFilterInstance.getSelectedFilter())==null?void 0:o.getModel()),this.appendChild(n.getGui()),this.showingUnderlyingFloatingFilter=!0})}return this.setupReadOnlyFloatingFilterElement(),x.AgPromise.resolve()}onColumnVisibleChanged(){this.setupUnderlyingFloatingFilterElement()}onColDefChanged(t){var n,o,s;if(!t.column)return;const e=this.filterManager.getFloatingFilterCompDetails(t.column,this.params.showParentFilter);e&&((n=this.underlyingFloatingFilter)!=null&&n.refresh?this.underlyingFloatingFilter.refresh(e.params):(s=(o=this.underlyingFloatingFilter)==null?void 0:o.onParamsUpdated)==null||s.call(o,e.params))}onParentModelChanged(t,e){var n,o;this.showingUnderlyingFloatingFilter?(o=this.underlyingFloatingFilter)==null||o.onParentModelChanged((n=this.parentFilterInstance.getSelectedFilter())==null?void 0:n.getModel(),e):this.updateDisplayedValue()}updateDisplayedValue(){if(!this.parentFilterInstance||!this.eFloatingFilterText)return;const t=this.parentFilterInstance.getSelectedFilter();if(!t){this.eFloatingFilterText.setValue(""),this.eFloatingFilterText.setDisplayed(!1);return}if(this.eFloatingFilterText.setDisplayed(!0),t.getModelAsString){const e=t.getModel();this.eFloatingFilterText.setValue(e==null?"":t.getModelAsString(e))}else this.eFloatingFilterText.setValue("")}onSelectedColumnChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}onColumnRowGroupChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}destroy(){super.destroy()}},Xa=class{constructor(){this.allSets={},this.allParents=[]}removeFromChildrenAfterGroup(t,e){const n=this.getSet(t);n.removeFromChildrenAfterGroup[e.id]=!0}isRemoveFromAllLeafChildren(t,e){return!!this.getSet(t).removeFromAllLeafChildren[e.id]}preventRemoveFromAllLeafChildren(t,e){const n=this.getSet(t);delete n.removeFromAllLeafChildren[e.id]}removeFromAllLeafChildren(t,e){const n=this.getSet(t);n.removeFromAllLeafChildren[e.id]=!0}getSet(t){return this.allSets[t.id]||(this.allSets[t.id]={removeFromAllLeafChildren:{},removeFromChildrenAfterGroup:{}},this.allParents.push(t)),this.allSets[t.id]}getAllParents(){return this.allParents}flush(){this.allParents.forEach(t=>{var o;const e=this.allSets[t.id];t.childrenAfterGroup=t.childrenAfterGroup.filter(s=>!e.removeFromChildrenAfterGroup[s.id]),t.allLeafChildren=((o=t.allLeafChildren)==null?void 0:o.filter(s=>!e.removeFromAllLeafChildren[s.id]))??null,t.updateHasChildren();const n=t.sibling;n&&(n.childrenAfterGroup=t.childrenAfterGroup,n.allLeafChildren=t.allLeafChildren)}),this.allSets={},this.allParents.length=0}};function Sy(t){if(!t)return!1;const e=t.length;if(e<2)return!1;let n=!1;for(let o=1;o<e;o++)if(Ld(t[o-1],t[o])>0){n=!0;break}return n?(t.sort(Ld),!0):!1}function Ld(t,e){const n=t.sourceRowIndex,o=e.sourceRowIndex,s=n>=0,l=o>=0,c=s&&l,u=!s&&!l;return c?n-o:u?t.__objectId-e.__objectId:s?1:-1}var Ey=class extends x.BeanStub{wireBeans(t){this.beans=t,this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.valueService=t.valueService,this.selectionService=t.selectionService,this.showRowGroupColsService=t.showRowGroupColsService}execute(t){const e=this.createGroupingDetails(t);if(e.transactions)this.handleTransaction(e);else{const n=t.afterColumnsChanged===!0;this.shotgunResetEverything(e,n)}this.positionLeafsAndGroups(t.changedPath),this.orderGroups(e)}positionLeafsAndGroups(t){t.forEachChangedNodeDepthFirst(e=>{if(e.childrenAfterGroup){const n=[],o=[];let s;e.childrenAfterGroup.forEach(l=>{var c;(c=l.childrenAfterGroup)!=null&&c.length?l.key===""&&!s?s=l:o.push(l):n.push(l)}),s&&o.push(s),e.childrenAfterGroup=[...n,...o]}},!1)}createGroupingDetails(t){const{rowNode:e,changedPath:n,rowNodeTransactions:o,rowNodesOrderChanged:s}=t,l=this.funcColsService.getRowGroupColumns();return{expandByDefault:this.gos.get("groupDefaultExpanded"),groupedCols:l,rootNode:e,pivotMode:this.columnModel.isPivotMode(),groupedColCount:(l==null?void 0:l.length)??0,transactions:o,rowNodesOrderChanged:!!s,changedPath:n,groupAllowUnbalanced:this.gos.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),suppressGroupMaintainValueType:this.gos.get("suppressGroupMaintainValueType"),keyCreators:(l==null?void 0:l.map(u=>u.getColDef().keyCreator))??[]}}handleTransaction(t){t.transactions.forEach(e=>{const n=new Xa;x._existsAndNotEmpty(e.remove)&&this.removeNodes(e.remove,t,n),x._existsAndNotEmpty(e.update)&&this.moveNodesInWrongPath(e.update,t,n),x._existsAndNotEmpty(e.add)&&this.insertNodes(e.add,t);const o=n.getAllParents().slice();n.flush(),this.removeEmptyGroups(o,t)}),t.rowNodesOrderChanged&&this.sortChildren(t)}sortChildren(t){t.changedPath.forEachChangedNodeDepthFirst(e=>{Sy(e.childrenAfterGroup)&&t.changedPath.addParentNode(e)},!1,!0)}orderGroups(t){const e=t.initialGroupOrderComparator;x._exists(e)&&n(t.rootNode);function n(o){x._exists(o.childrenAfterGroup)&&!o.leafGroup&&(o.childrenAfterGroup.sort((l,c)=>e({nodeA:l,nodeB:c})),o.childrenAfterGroup.forEach(l=>n(l)))}}getExistingPathForNode(t,e){const n=[];let o=t.parent;for(;o&&o!==e.rootNode;)n.push({key:o.key,rowGroupColumn:o.rowGroupColumn,field:o.field}),o=o.parent;return n.reverse(),n}moveNodesInWrongPath(t,e,n){t.forEach(o=>{e.changedPath.isActive()&&e.changedPath.addParentNode(o.parent);const s=p=>p.key,l=this.getExistingPathForNode(o,e).map(s),c=this.getGroupInfo(o,e).map(s);x._areEqual(l,c)||this.moveNode(o,e,n)})}moveNode(t,e,n){if(this.removeNodesFromParents([t],e,n),this.insertOneNode(t,e,n),t.setData(t.data),e.changedPath.isActive()){const o=t.parent;e.changedPath.addParentNode(o)}}removeNodes(t,e,n){this.removeNodesFromParents(t,e,n),e.changedPath.isActive()&&t.forEach(o=>e.changedPath.addParentNode(o.parent))}forEachParentGroup(t,e,n){let o=e;for(;o&&o!==t.rootNode;)n(o),o=o.parent}removeNodesFromParents(t,e,n){const o=n==null,s=n||new Xa;t.forEach(l=>{this.removeFromParent(l,s),this.forEachParentGroup(e,l.parent,c=>{s.removeFromAllLeafChildren(c,l)})}),o&&s.flush()}removeEmptyGroups(t,e){let n=!0;const o=s=>{var p;const l=this.getChildrenMappedKey(s.key,s.rowGroupColumn),c=s.parent;return(c!=null&&c.childrenMapped?!c.childrenMapped[l]:!0)?!1:!!s.group&&(((p=s.childrenAfterGroup)==null?void 0:p.length)??0)===0};for(;n;){n=!1;const s=new Xa;t.forEach(l=>{this.forEachParentGroup(e,l,c=>{o(c)&&(n=!0,this.removeFromParent(c,s),c.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))})}),s.flush()}}removeFromParent(t,e){var o;t.parent&&(e?e.removeFromChildrenAfterGroup(t.parent,t):(x._removeFromArray(t.parent.childrenAfterGroup,t),t.parent.updateHasChildren()));const n=this.getChildrenMappedKey(t.key,t.rowGroupColumn);(o=t.parent)!=null&&o.childrenMapped&&delete t.parent.childrenMapped[n],t.setRowTop(null),t.setRowIndex(null)}addToParent(t,e){const n=this.getChildrenMappedKey(t.key,t.rowGroupColumn);e!=null&&e.childrenMapped&&e.childrenMapped[n]!==t&&(e.childrenMapped[n]=t,e.childrenAfterGroup.push(t),e.setGroup(!0))}areGroupColsEqual(t,e){return t==null||e==null||t.pivotMode!==e.pivotMode?!1:x._areEqual(t.groupedCols,e.groupedCols)&&x._areEqual(t.keyCreators,e.keyCreators)}checkAllGroupDataAfterColsChanged(t){const e=n=>{n&&n.forEach(o=>{var c;if(!o.group)return;const l={field:o.field,key:o.key,rowGroupColumn:o.rowGroupColumn,leafNode:(c=o.allLeafChildren)==null?void 0:c[0]};this.setGroupData(o,l,t),e(o.childrenAfterGroup)})};e(t.rootNode.childrenAfterGroup)}shotgunResetEverything(t,e){if(this.noChangeInGroupingColumns(t,e))return;this.selectionService.filterFromSelection(l=>l&&!l.group);const{groupedCols:n}=t,o=t.rootNode;o.leafGroup=n.length===0,o.childrenAfterGroup=[],o.childrenMapped={},o.updateHasChildren();const s=o.sibling;s&&(s.childrenAfterGroup=o.childrenAfterGroup,s.childrenMapped=o.childrenMapped),this.insertNodes(o.allLeafChildren,t)}noChangeInGroupingColumns(t,e){let n=!1;const o=this.showRowGroupColsService.getShowRowGroupCols(),s=o?o.map(l=>l.getId()).join("-"):"";return e&&(n=this.areGroupColsEqual(t,this.oldGroupingDetails),this.oldGroupDisplayColIds!==s&&this.checkAllGroupDataAfterColsChanged(t)),this.oldGroupingDetails=t,this.oldGroupDisplayColIds=s,n}insertNodes(t,e){t.forEach(n=>{this.insertOneNode(n,e),e.changedPath.isActive()&&e.changedPath.addParentNode(n.parent)})}insertOneNode(t,e,n){const o=this.getGroupInfo(t,e),s=this.findParentForNode(t,o,e,n);s.group||x._warnOnce("duplicate group keys for row data, keys should be unique",[s.data,t.data]),t.parent=s,t.level=o.length,s.childrenAfterGroup.push(t),s.updateHasChildren()}findParentForNode(t,e,n,o){let s=n.rootNode;return e.forEach((l,c)=>{s=this.getOrCreateNextNode(s,l,c,n),o!=null&&o.isRemoveFromAllLeafChildren(s,t)?o==null||o.preventRemoveFromAllLeafChildren(s,t):s.allLeafChildren.push(t)}),s}getOrCreateNextNode(t,e,n,o){var c;const s=this.getChildrenMappedKey(e.key,e.rowGroupColumn);let l=(c=t==null?void 0:t.childrenMapped)==null?void 0:c[s];return l||(l=this.createGroup(e,t,n,o),this.addToParent(l,t)),l}createGroup(t,e,n,o){const s=new x.RowNode(this.beans);return s.group=!0,s.field=t.field,s.rowGroupColumn=t.rowGroupColumn,this.setGroupData(s,t,o),s.key=t.key,s.id=this.createGroupId(s,e,n),s.level=n,s.leafGroup=n===o.groupedColCount-1,s.allLeafChildren=[],s.setAllChildrenCount(0),s.rowGroupIndex=n,s.childrenAfterGroup=[],s.childrenMapped={},s.updateHasChildren(),s.parent=e,this.setExpandedInitialValue(o,s),s}createGroupId(t,e,n){const o=(s,l)=>{if(!s.rowGroupColumn)return null;const c=l?o(l,l.parent):null;return`${c==null?"":c+"-"}${s.rowGroupColumn.getColId()}-${s.key}`};return x.RowNode.ID_PREFIX_ROW_GROUP+o(t,e)}setGroupData(t,e,n){t.groupData={},this.showRowGroupColsService.getShowRowGroupCols().forEach(s=>{const l=t.rowGroupColumn;l!==null&&s.isRowGroupDisplayed(l.getId())&&(n.suppressGroupMaintainValueType?t.groupData[s.getColId()]=e.key:t.groupData[s.getColId()]=this.valueService.getValue(l,e.leafNode))})}getChildrenMappedKey(t,e){return e?e.getId()+"-"+t:t}setExpandedInitialValue(t,e){if(t.pivotMode&&e.leafGroup){e.expanded=!1;return}const n=t.isGroupOpenByDefault;if(n){const o={rowNode:e,field:e.field,key:e.key,level:e.level,rowGroupColumn:e.rowGroupColumn};e.expanded=n(o)==!0;return}if(t.expandByDefault===-1){e.expanded=!0;return}e.expanded=e.level<t.expandByDefault}getGroupInfo(t,e){const n=[];return e.groupedCols.forEach(o=>{let s=this.valueService.getKeyForNode(o,t),l=s!=null&&s!=="";if((e.pivotMode||!e.groupAllowUnbalanced)&&!l&&(s="",l=!0),l){const u={key:s,field:o.getColDef().field,rowGroupColumn:o,leafNode:t};n.push(u)}}),n}},Ty=(t,e)=>t.treeNode.oldSourceRowIndex-e.treeNode.oldSourceRowIndex,pt=Object.freeze([]),By=pt.values(),hs=(t,e)=>{t.parent=null,t.treeNode=null,e?t.childrenAfterGroup=[]:(t.level=0,t.childrenAfterGroup=null,t.allLeafChildren=null)},Vy=class am{constructor(e,n,o){this.parent=e,this.key=n,this.level=o,this.children=null,this.invalidatedHead=null,this.invalidatedNext=void 0,this.row=null,this.oldRow=null,this.duplicateRows=null,this.childrenAfterGroup=pt,this.allLeafChildren=pt,this.childrenChanged=!1,this.leafChildrenChanged=!1,this.oldSourceRowIndex=-1}isEmptyFillerNode(){var e,n;return!((e=this.row)!=null&&e.data)&&!((n=this.children)!=null&&n.size)}hasChildren(){var e;return!!((e=this.children)!=null&&e.size)}enumChildren(){var e;return((e=this.children)==null?void 0:e.values())??By}upsertKey(e){var o,s;typeof e!="string"&&(e=String(e));let n=(o=this.children)==null?void 0:o.get(e);return n||(n=new am(this,e,this.level+1),(s=this.children??(this.children=new Map))==null||s.set(n.key,n)),n}destroy(){var o;const{row:e,parent:n}=this;n!==null&&((o=n==null?void 0:n.children)==null||o.delete(this.key),e!==null&&hs(e,!0),this.parent=null)}setRow(e){const{level:n,row:o,childrenAfterGroup:s}=this;if(n<0)o!==null&&o!==e&&hs(o,!0);else{if(o===e)return!1;o!==null?(e.allLeafChildren=o.allLeafChildren??this.allLeafChildren??pt,hs(o,!1)):e.allLeafChildren=this.allLeafChildren??pt}return e.level=n,e.childrenAfterGroup=s,e.treeNode=this,this.row=e,!0}removeRow(e){const{level:n,row:o,duplicateRows:s,childrenAfterGroup:l}=this;if(o===e){const c=this.popDuplicateRow();c?(this.row=c,c.childrenAfterGroup=l,n>=0&&(c.allLeafChildren=o.allLeafChildren??this.allLeafChildren??pt)):this.row=null}else{if(!(s!=null&&s.delete(e)))return!1;s.size===0&&(this.duplicateRows=null)}return hs(e,n<0),!0}addDuplicateRow(e){const{level:n}=this;let o=this.duplicateRows;if(o===null)o=new Set,this.duplicateRows=o;else if(o.has(e))return!1;return o.add(e),e.treeNode=this,e.level=n,n>=0&&(e.allLeafChildren=pt),e.childrenAfterGroup=pt,!0}sortFirstDuplicateRow(){const e=this.duplicateRows,n=this.row;if(!n||!e)return n;let o=n;for(const s of e)s.sourceRowIndex<o.sourceRowIndex&&(o=s);return o!==n&&(o.childrenAfterGroup=this.childrenAfterGroup,o.allLeafChildren=n.allLeafChildren??this.allLeafChildren??pt,n.childrenAfterGroup=pt,n.allLeafChildren=pt,e.delete(o),e.add(n),this.row=o),o}popDuplicateRow(){let e=null;const n=this.duplicateRows;return n!==null&&(e=n.values().next().value,e!==null&&n.delete(e)&&n.size===0&&(this.duplicateRows=null)),e}dequeueInvalidated(){const e=this.invalidatedHead;return e!==null&&(this.invalidatedHead=e.invalidatedNext??null,e.invalidatedNext=void 0),e}invalidate(){let e=this,n=this.parent;for(;n!==null&&e.invalidatedNext===void 0;)e.invalidatedNext=n.invalidatedHead,n.invalidatedHead=e,e=n,n=e.parent}invalidateOrder(){var n,o;const e=this.parent;e!==null&&!e.childrenChanged&&((((n=this.children)==null?void 0:n.size)??0)>1||!((o=e.row)!=null&&o.data))&&(e.childrenChanged=!0,e.invalidate())}getRowPosition(){var n,o;const e=this.row;return e!=null&&e.data?e.sourceRowIndex:((o=(n=this.childrenAfterGroup[0])==null?void 0:n.treeNode)==null?void 0:o.oldSourceRowIndex)??this.oldSourceRowIndex}updateChildrenAfterGroup(){var u;this.childrenChanged=!1;const e=((u=this.children)==null?void 0:u.size)??0;if(e===0)return this.childrenAfterGroup.length===0?!1:(this.leafChildrenChanged=!0,this.childrenAfterGroup=pt,this.row.childrenAfterGroup=pt,!0);let n=!1,o=this.childrenAfterGroup;o===pt?(o=new Array(e),this.childrenAfterGroup=o,this.row.childrenAfterGroup=o,n=!0):o.length!==e&&(o.length=e,n=!0);let s=0,l=-1,c=!1;for(const p of this.enumChildren()){const f=p.getRowPosition();f<l&&(c=!0),l=f,p.oldSourceRowIndex=f;const m=p.row;o[s]!==m&&(o[s]=m,n=!0),++s}return n&&(this.leafChildrenChanged=!0),c&&this.reorderChildrenList(o),n||c}reorderChildrenList(e){const n=e.length,o=this.children;e.sort(Ty),o.clear();for(let s=0;s<n;++s){const l=e[s].treeNode;o.set(l.key,l)}}updateAllLeafChildren(){var c,u;const{parent:e,row:n,childrenAfterGroup:o}=this;this.leafChildrenChanged=!1;let s=!1;const l=o.length;if(l===0)s=((c=n.allLeafChildren)==null?void 0:c.length)!==0,n.allLeafChildren=pt,this.allLeafChildren=pt;else if(l===1&&((u=o[0].allLeafChildren)!=null&&u.length))n.allLeafChildren=o[0].allLeafChildren,this.allLeafChildren=null,s=!0;else{let p=this.allLeafChildren;(p===pt||p===null)&&(p=[],this.allLeafChildren=p);const f=p.length;let m=0;for(let y=0;y<l;++y){const B=o[y],T=B.allLeafChildren,N=T.length;if(N)for(let M=0;M<N;++M){const G=T[M];(m>=f||p[m]!==G)&&(p[m]=G,s=!0),++m}else(m>=f||p[m]!==B)&&B&&(p[m]=B,s=!0),++m}f!==m&&(p.length=m,s=!0),n.allLeafChildren!==p&&(n.allLeafChildren=p,s=!0)}s&&e&&(e.leafChildrenChanged=!0)}},Od=t=>(t.treeNodeFlags&1)!==0,Gd=t=>(t.treeNodeFlags&2)!==0,zd=t=>(t.treeNodeFlags&4)!==0,Ny=t=>(t.treeNodeFlags&8)!==0,$d=t=>(t.treeNodeFlags&16)!==0,Zd=(t,e)=>{e?t.treeNodeFlags|=2:t.treeNodeFlags&=-3},Ay=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|4)},Py=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|12)},cr=t=>{t.treeNodeFlags|=16},Ud=t=>{t.treeNodeFlags=1|t.treeNodeFlags&-29},li=t=>{t.treeNodeFlags=0},Dy=class extends x.BeanStub{constructor(){super(...arguments),this.rowsPendingDestruction=null,this.root=new Vy(null,"",-1)}wireBeans(t){this.beans=t,this.showRowGroupColsService=t.showRowGroupColsService}destroy(){const t=this.root.row;t!==null&&(this.root.removeRow(t),li(t)),this.destroyTree(this.root),this.commitDestroyedRows(),super.destroy()}execute(t){const{rowNodeTransactions:e,rowNodesOrderChanged:n,changedPath:o}=t,s=t.rowNode,l=this.gos,c={changedPath:o,expandByDefault:l.get("groupDefaultExpanded"),suppressGroupMaintainValueType:l.get("suppressGroupMaintainValueType"),getDataPath:l.get("getDataPath"),isGroupOpenByDefault:l.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:l.getCallback("initialGroupOrderComparator")};this.root.setRow(s),s.leafGroup=!1;const p=s.sibling;p&&(p.childrenAfterGroup=s.childrenAfterGroup,p.childrenMapped=s.childrenMapped),e?this.handleTransaction(c,e,n):this.handleRowData(c,s,t.afterColumnsChanged===!0)}handleRowData(t,e,n){var s,l,c;const o=this.root;if(n||this.oldGroupDisplayColIds===void 0){const u=((l=(s=this.showRowGroupColsService)==null?void 0:s.getShowRowGroupCols())==null?void 0:l.map(p=>p.getId()).join("-"))??"";if(n){this.oldGroupDisplayColIds!==u&&this.checkAllGroupDataAfterColsChanged((c=o.row)==null?void 0:c.childrenAfterGroup);return}this.oldGroupDisplayColIds=u}this.clearTree(o),this.addOrUpdateRows(t,e.allLeafChildren,!1),this.commitTree(t)}handleTransaction(t,e,n){for(const{remove:o,update:s,add:l}of e)this.removeRows(o),this.addOrUpdateRows(t,s,!0),this.addOrUpdateRows(t,l,!1);n&&this.handleRowNodesOrderChanged(),this.commitTree(t)}handleRowNodesOrderChanged(){var e;const t=(e=this.root.row)==null?void 0:e.allLeafChildren;if(t)for(let n=0,o=t.length;n<o;++n){const s=t[n].treeNode;s&&s.oldSourceRowIndex!==n&&s.invalidateOrder()}}checkAllGroupDataAfterColsChanged(t){var e;for(let n=0,o=(t==null?void 0:t.length)??0;n<o;++n){const s=t[n];this.setGroupData(s,((e=s.treeNode)==null?void 0:e.key)??s.key),this.checkAllGroupDataAfterColsChanged(s.childrenAfterGroup)}}addOrUpdateRows(t,e,n){for(let o=0,s=(e==null?void 0:e.length)??0;o<s;++o){const l=e[o],c=this.upsertPath(this.getDataPath(t,l));c&&this.addOrUpdateRow(c,l,n)}}removeRows(t){for(let e=0,n=(t==null?void 0:t.length)??0;e<n;++e){const o=t[e],s=o.treeNode;s!==null&&this.removeRow(s,o)}}getDataPath({getDataPath:t},{data:e}){const n=(t==null?void 0:t(e))||pt;return n.length||x._warnOnce("getDataPath() should not return an empty path",[e]),n}upsertPath(t){let e=this.root;const n=t.length-1;for(let o=0;o<=n;++o){const s=e.upsertKey(t[o]);if(o>=n)return s.invalidate(),s;e=s}return null}addOrUpdateRow(t,e,n){var c;const{level:o,row:s}=t;if(o<0)return;let l=!1;if(s!==e){const u=e.treeNode;u!==null&&u!==t&&(u.removeRow(e),u.invalidate()),s===null?(t.setRow(e),l=!0):s.data?t.addDuplicateRow(e)&&(l=!0):(t.setRow(e),this.destroyRow(s,!0),l=!0)}n&&!zd(e)&&(Ay(e),l=!0),l&&t.invalidate(),(c=this.rowsPendingDestruction)==null||c.delete(e)}removeRow(t,e){const{parent:n,level:o}=t;if(o<0)return;let s=!1;t.removeRow(e)&&(s=!0,n&&(n.childrenChanged=!0),this.destroyRow(e,!e.data)),s&&t.invalidate()}commitTree(t){var o;const e=this.root;this.commitInvalidatedChildren(t,e);const n=e.row;e.childrenChanged&&e.updateChildrenAfterGroup()&&cr(n),n.updateHasChildren(),$d(n)&&(o=t.changedPath)!=null&&o.isActive()&&t.changedPath.addParentNode(n),Ud(n),this.commitDestroyedRows()}commitInvalidatedChildren(t,e){for(;;){const n=e.dequeueInvalidated();if(n===null)break;n.parent===e&&this.commitChild(t,e,n)}}commitChild(t,e,n){if(n.isEmptyFillerNode()){this.clearTree(n);return}this.commitNodePreOrder(e,n),this.commitInvalidatedChildren(t,n),this.commitNodePostOrder(t,e,n)}commitNodePreOrder(t,e){let n=e.row;if(n===null?(n=this.createFillerRow(e),e.setRow(n)):(n=e.sortFirstDuplicateRow(),n.allChildrenCount===void 0&&(n.allChildrenCount=null)),n.parent=t.row,e.oldRow!==n)for(const s of e.enumChildren()){const l=s.row;l!==null&&(l.parent=n)}const o=e.key;n.key!==o?(n.key=o,Py(n),this.setGroupData(n,o)):n.groupData||this.setGroupData(n,o)}commitNodePostOrder(t,e,n){var f,m,y;const o=n.row,s=n.oldRow;if(n.isEmptyFillerNode()){this.clearTree(n);return}n.childrenChanged&&n.updateChildrenAfterGroup()&&cr(o),n.leafChildrenChanged&&n.updateAllLeafChildren();const l=n.getRowPosition();n.oldSourceRowIndex!==l&&(n.oldSourceRowIndex=l,e.childrenChanged=!0);const c=!!((f=o.childrenAfterGroup)!=null&&f.length),u=c||!o.data,p=o.group;p!==u?(cr(o),o.setGroup(u),!u&&!o.expanded&&Zd(o,!1)):o.hasChildren()!==c&&(cr(o),o.updateHasChildren()),o.group&&!Gd(o)&&(s!==o&&s!==null&&s.group&&Gd(s)&&!t.isGroupOpenByDefault?o.expanded=s.expanded:o.expanded=this.getExpandedInitialValue(t,o),Zd(o,!0)),zd(o)&&(cr(e.row),Ny(o)&&o.setData(o.data)),s!==o&&(n.oldRow=o,s!==null&&(p||n.hasChildren())&&cr(o),e.childrenChanged=!0,cr(e.row)),$d(o)?(m=t.changedPath)!=null&&m.isActive()&&t.changedPath.addParentNode(o):Od(o)||(o.childrenAfterFilter||(o.childrenAfterFilter=o.childrenAfterGroup.slice()),o.childrenAfterAggFilter||(o.childrenAfterAggFilter=o.childrenAfterFilter.slice()),o.childrenAfterSort||(o.childrenAfterSort=o.childrenAfterAggFilter.slice())),Ud(o),(y=n.duplicateRows)!=null&&y.size&&!n.duplicateRowsWarned&&(n.duplicateRowsWarned=!0,x._warnOnce("duplicate group keys for row data, keys should be unique",[o.id,o.data,...Array.from(n.duplicateRows).map(B=>B.data)]))}createFillerRow(t){const e=new x.RowNode(this.beans);e.key=t.key,e.group=!0,e.field=null,e.leafGroup=!1,e.rowGroupIndex=null,e.allChildrenCount=null;let n=t.level+"-"+t.key,o=t.parent;for(;o!==null;){const s=o.parent;if(s===null)break;n=`${o.level}-${o.key}-${n}`,o=s}return e.id=x.RowNode.ID_PREFIX_ROW_GROUP+n,e}setGroupData(t,e){var s;const n={};t.groupData=n;const o=(s=this.showRowGroupColsService)==null?void 0:s.getShowRowGroupCols();if(o)for(const l of o)n[l.getColId()]=e}getExpandedInitialValue(t,e){const n=t.isGroupOpenByDefault;return n?n({rowNode:e,field:e.field,key:e.key,level:e.level,rowGroupColumn:e.rowGroupColumn})==!0:t.expandByDefault===-1||e.level<t.expandByDefault}clearTree(t){const{parent:e,oldRow:n,row:o,level:s}=t;if(e!==null&&n!==null&&(e.childrenChanged=!0,e.row!==null&&cr(e.row)),o!==null&&s>=0){let l=t.row;for(;l!==null&&t.removeRow(l);)this.destroyRow(l,!l.data),l=t.row}for(const l of t.enumChildren())this.clearTree(l);t.destroy()}destroyTree(t){const{row:e,level:n,duplicateRows:o}=t;if(e&&(n>=0&&!e.data?this.destroyRow(e,!0):li(e)),o)for(const s of o)n>=0&&!s.data?this.destroyRow(s,!0):li(s);for(const s of t.enumChildren())this.destroyTree(s);t.destroy()}destroyRow(t,e){if(!Od(t)){li(t);return}if(!e){(this.rowsPendingDestruction??(this.rowsPendingDestruction=new Set)).add(t);return}li(t),t.setRowIndex(null),t.setRowTop(null),!t.data&&t.isSelected()&&t.setSelectedParams({newValue:!1,source:"rowGroupChanged"})}commitDestroyedRows(){const{rowsPendingDestruction:t}=this;if(t!==null){this.rowsPendingDestruction=null;for(const e of t)this.destroyRow(e,!0)}}},Fy=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="groupStage"}wireBeans(t){this.selectableService=t.selectableService}execute(t){const e=this.gos.get("treeData")?Dy:Ey;let n=this.strategy;(n==null?void 0:n.constructor)!==e&&(this.destroyBean(n),n=this.createManagedBean(new e),this.strategy=n),n.execute(t),this.selectableService.updateSelectableAfterGrouping()}destroy(){this.destroyBean(this.strategy),this.strategy=void 0,super.destroy()}},Wd="PivotRowTotal_",Ry=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="pivotColDefService"}wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.columnNameService=t.columnNameService}postConstruct(){const t=()=>this.gos.get("serverSidePivotResultFieldSeparator")??"_";this.fieldSeparator=t(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",()=>{this.fieldSeparator=t()});const e=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=e(),this.addManagedPropertyListener("pivotDefaultExpanded",()=>{this.pivotDefaultExpanded=e()})}createPivotColumnDefs(t){const e=this.createPivotColumnsFromUniqueValues(t);function n(l,c=[]){return l.forEach(u=>{u.children!==void 0?n(u.children,c):c.push(u)}),c}const o=n(e);this.addRowGroupTotals(e,o),this.addExpandablePivotGroups(e,o),this.addPivotTotalsToGroups(e,o);const s=o.map(l=>x._cloneObject(l));return{pivotColumnGroupDefs:e,pivotColumnDefs:s}}createPivotColumnsFromUniqueValues(t){const e=this.funcColsService.getPivotColumns(),n=e.length;return this.recursivelyBuildGroup(0,t,[],n,e)}recursivelyBuildGroup(t,e,n,o,s){const l=this.funcColsService.getValueColumns();if(t>=o)return this.buildMeasureCols(n);const c=s[t].getColDef(),u=this.headerNameComparator.bind(this,c.pivotComparator);if(l.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&t===o-1){const f=[];return x._iterateObject(e,m=>{const y=[...n,m],B=this.createColDef(l[0],m,y);B.columnGroupShow="open",f.push(B)}),f.sort(u),f}const p=[];return x._iterateObject(e,(f,m)=>{const y=this.pivotDefaultExpanded===-1||t<this.pivotDefaultExpanded,B=[...n,f];p.push({children:this.recursivelyBuildGroup(t+1,m,B,o,s),headerName:f,pivotKeys:B,columnGroupShow:"open",openByDefault:y,groupId:this.generateColumnGroupId(B)})}),p.sort(u),p}buildMeasureCols(t){const e=this.funcColsService.getValueColumns();return e.length===0?[this.createColDef(null,"-",t)]:e.map(n=>{const o=this.columnNameService.getDisplayNameForColumn(n,"header");return{...this.createColDef(n,o,t),columnGroupShow:"open"}})}addExpandablePivotGroups(t,e){const n=this.gos.get("suppressExpandablePivotGroups");if(n||this.gos.get("pivotColumnGroupTotals"))return;const o=(s,l,c)=>{if("children"in s){const f=new Map;s.children.forEach(y=>{o(y,l,f)});const m=!s.children.some(y=>y.children);this.funcColsService.getValueColumns().forEach(y=>{const B=this.columnNameService.getDisplayNameForColumn(y,"header"),T=this.createColDef(y,B,s.pivotKeys);T.pivotTotalColumnIds=f.get(y.getColId()),T.columnGroupShow=n?"open":"closed",T.aggFunc=y.getAggFunc(),m||(s.children.push(T),l.push(T))}),this.merge(c,f);return}if(!s.pivotValueColumn)return;const u=s.pivotValueColumn.getColId();c.has(u)?c.get(u).push(s.colId):c.set(u,[s.colId])};t.forEach(s=>{o(s,e,new Map)})}addPivotTotalsToGroups(t,e){if(!this.gos.get("pivotColumnGroupTotals"))return;const n=this.gos.get("pivotColumnGroupTotals")==="after",o=this.funcColsService.getValueColumns(),s=o.map(c=>c.getAggFunc());if(!s||s.length<1||!this.sameAggFuncs(s))return;const l=o[0];t.forEach(c=>{this.recursivelyAddPivotTotal(c,e,l,n)})}recursivelyAddPivotTotal(t,e,n,o){const s=t;if(!s.children){const c=t;return c.colId?[c.colId]:null}let l=[];if(s.children.forEach(c=>{const u=this.recursivelyAddPivotTotal(c,e,n,o);u&&(l=l.concat(u))}),s.children.length>1){const u=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),p=this.createColDef(n,u,t.pivotKeys,!0);p.pivotTotalColumnIds=l,p.aggFunc=n.getAggFunc(),p.columnGroupShow=this.gos.get("suppressExpandablePivotGroups")?"open":void 0;const f=t.children;o?f.push(p):f.unshift(p),e.push(p)}return l}addRowGroupTotals(t,e){if(!this.gos.get("pivotRowTotals"))return;const n=this.gos.get("pivotRowTotals")==="after",s=this.funcColsService.getValueColumns().slice();n||s.reverse();const l=s.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let c=0;c<s.length;c++){const u=s[c],p=this.columnNameService.getDisplayNameForColumn(u,"header"),f=this.createColDef(u,p,[]),m=[];for(let B=0;B<e.length;B++){const T=e[B];T.pivotValueColumn===u&&m.push(T.colId)}f.pivotTotalColumnIds=m,f.colId=Wd+f.colId;const y=l?{children:[f],pivotKeys:[],groupId:`${Wd}_pivotGroup_${u.getColId()}`}:f;e.push(f),n?t.push(y):t.unshift(y)}}createColDef(t,e,n,o=!1){const s={};if(t){const l=t.getColDef();Object.assign(s,l),s.hide=!1}return s.headerName=e,s.colId=this.generateColumnId(n||[],t&&!o?t.getColId():""),s.field=s.colId,s.valueGetter=l=>{var c;return(c=l.data)==null?void 0:c[l.colDef.field]},s.pivotKeys=n,s.pivotValueColumn=t,s.filter===!0&&(s.filter="agNumberColumnFilter"),s}sameAggFuncs(t){if(t.length==1)return!0;for(let e=1;e<t.length;e++)if(t[e]!==t[0])return!1;return!0}headerNameComparator(t,e,n){return t?t(e.headerName,n.headerName):e.headerName&&!n.headerName?1:!e.headerName&&n.headerName?-1:!e.headerName||!n.headerName?0:e.headerName<n.headerName?-1:e.headerName>n.headerName?1:0}merge(t,e){e.forEach((n,o)=>{const l=[...t.has(o)?t.get(o):[],...n];t.set(o,l)})}generateColumnGroupId(t){return`pivotGroup_${this.funcColsService.getPivotColumns().map(n=>n.getColId()).join("-")}_${t.join("-")}`}generateColumnId(t,e){return`pivot_${this.funcColsService.getPivotColumns().map(o=>o.getColId()).join("-")}_${t.join("-")}_${e}`}createColDefsFromFields(t){const e={};for(let s=0;s<t.length;s++){const c=t[s].split(this.fieldSeparator);let u=e;for(let p=0;p<c.length;p++){const f=c[p];u[f]==null&&(u[f]={}),u=u[f]}}const n=(s,l,c,u)=>{const p=[];for(const y in c){const B=c[y],T=n(`${s}${this.fieldSeparator}${y}`,y,B,u+1);p.push(T)}if(p.length===0){const y=this.columnModel.getColDefCol(l);if(y){const T=this.columnNameService.getDisplayNameForColumn(y,"header")??l,N=this.createColDef(y,T,void 0,!1);return N.colId=s,N.aggFunc=y.getAggFunc(),N.valueGetter=M=>{var G;return(G=M.data)==null?void 0:G[s]},N}return{colId:s,headerName:l,valueGetter:T=>{var N;return(N=T.data)==null?void 0:N[s]}}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&p.length===1&&"colId"in p[0]?(p[0].headerName=l,p[0]):{openByDefault:this.pivotDefaultExpanded===-1||u<this.pivotDefaultExpanded,groupId:s,headerName:l,children:p}},o=[];for(const s in e){const l=e[s],c=n(s,s,l,0);o.push(c)}return o}},Hd="Exceeded maximum allowed pivot column count.",My=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="pivotStage",this.uniqueValues={},this.lastTimeFailed=!1,this.maxUniqueValues=-1,this.currentUniqueCount=0}wireBeans(t){this.valueService=t.valueService,this.columnModel=t.columnModel,this.pivotResultColsService=t.pivotResultColsService,this.funcColsService=t.funcColsService,this.pivotColDefService=t.pivotColDefService}execute(t){const e=t.changedPath;this.columnModel.isPivotActive()?this.executePivotOn(e):this.executePivotOff(e)}executePivotOff(t){this.aggregationColumnsHashLastTime=null,this.uniqueValues={},this.pivotResultColsService.isPivotResultColsPresent()&&(this.pivotResultColsService.setPivotResultCols(null,"rowModelUpdated"),t&&t.setInactive())}executePivotOn(t){const e=this.funcColsService.getValueColumns().length??1,n=this.gos.get("pivotMaxGeneratedColumns");this.maxUniqueValues=n===-1?-1:n/e;let o;try{o=this.bucketUpRowNodes(t)}catch(C){if(C.message===Hd){this.pivotResultColsService.setPivotResultCols([],"rowModelUpdated"),this.eventService.dispatchEvent({type:"pivotMaxColumnsExceeded",message:C.message}),this.lastTimeFailed=!0;return}throw C}const s=this.setUniqueValues(o),l=this.funcColsService.getValueColumns(),c=l.map(C=>`${C.getId()}-${C.getColDef().headerName}`).join("#"),u=l.map(C=>C.getAggFunc().toString()).join("#"),p=this.aggregationColumnsHashLastTime!==c,f=this.aggregationFuncsHashLastTime!==u;this.aggregationColumnsHashLastTime=c,this.aggregationFuncsHashLastTime=u;const m=this.funcColsService.getRowGroupColumns().map(C=>C.getId()).join("#"),y=m!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=m;const B=this.gos.get("pivotRowTotals"),T=this.gos.get("pivotColumnGroupTotals"),N=this.gos.get("suppressExpandablePivotGroups"),M=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),G=B!==this.pivotRowTotalsLastTime||T!==this.pivotColumnGroupTotalsLastTime||N!==this.suppressExpandablePivotGroupsLastTime||M!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=B,this.pivotColumnGroupTotalsLastTime=T,this.suppressExpandablePivotGroupsLastTime=N,this.removePivotHeaderRowWhenSingleValueColumnLastTime=M,this.lastTimeFailed||s||p||y||f||G){const{pivotColumnGroupDefs:C,pivotColumnDefs:F}=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);this.pivotColumnDefs=F,this.pivotResultColsService.setPivotResultCols(C,"rowModelUpdated"),t&&t.setInactive()}this.lastTimeFailed=!1}setUniqueValues(t){const e=JSON.stringify(t),n=JSON.stringify(this.uniqueValues);return e!==n?(this.uniqueValues=t,!0):!1}bucketUpRowNodes(t){this.currentUniqueCount=0;const e={};t.forEachChangedNodeDepthFirst(o=>{o.leafGroup&&(o.childrenMapped=null)});const n=o=>{var s;o.leafGroup?this.bucketRowNode(o,e):(s=o.childrenAfterFilter)==null||s.forEach(n)};return t.executeFromRootNode(n),e}bucketRowNode(t,e){const n=this.funcColsService.getPivotColumns();n.length===0?t.childrenMapped=null:t.childrenMapped=this.bucketChildren(t.childrenAfterFilter,n,0,e),t.sibling&&(t.sibling.childrenMapped=t.childrenMapped)}bucketChildren(t,e,n,o){const s={},l=e[n];if(t.forEach(c=>{let u=this.valueService.getKeyForNode(l,c);if(x._missing(u)&&(u=""),!o[u]){this.currentUniqueCount+=1,o[u]={};const p=this.maxUniqueValues!==-1,f=this.currentUniqueCount>this.maxUniqueValues;if(p&&f)throw Error(Hd)}s[u]||(s[u]=[]),s[u].push(c)}),n===e.length-1)return s;{const c={};return x._iterateObject(s,(u,p)=>{c[u]=this.bucketChildren(p,e,n+1,o[u])}),c}}getPivotColumnDefs(){return this.pivotColumnDefs}};function Iy(t,e,n){t.aggFuncService&&t.aggFuncService.addAggFuncs({key:n})}function Ly(t,e){t.aggFuncService&&t.aggFuncService.addAggFuncs(e)}function Oy(t){t.aggFuncService&&t.aggFuncService.clear()}function Gy(t,e,n){t.funcColsService.setColumnAggFunc(e,n,"api")}function zy(t){return t.columnModel.isPivotMode()}function $y(t,e,n){return t.pivotResultColsService.lookupPivotResultCol(e,n)}function Zy(t,e){t.funcColsService.setValueColumns(e,"api")}function Uy(t){return t.funcColsService.getValueColumns()}function Wy(t,e){t.funcColsService.removeValueColumns([e],"api")}function Hy(t,e){t.funcColsService.removeValueColumns(e,"api")}function jy(t,e){t.funcColsService.addValueColumns([e],"api")}function qy(t,e){t.funcColsService.addValueColumns(e,"api")}function Ky(t,e){t.funcColsService.setRowGroupColumns(e,"api")}function Yy(t,e){t.funcColsService.removeRowGroupColumns([e],"api")}function Jy(t,e){t.funcColsService.removeRowGroupColumns(e,"api")}function Xy(t,e){t.funcColsService.addRowGroupColumns([e],"api")}function Qy(t,e){t.funcColsService.addRowGroupColumns(e,"api")}function e_(t,e,n){t.funcColsService.moveRowGroupColumn(e,n,"api")}function t_(t){return t.funcColsService.getRowGroupColumns()}function n_(t,e){t.funcColsService.setPivotColumns(e,"api")}function r_(t,e){t.funcColsService.removePivotColumns([e],"api")}function o_(t,e){t.funcColsService.removePivotColumns(e,"api")}function i_(t,e){t.funcColsService.addPivotColumns([e],"api")}function s_(t,e){t.funcColsService.addPivotColumns(e,"api")}function a_(t){return t.funcColsService.getPivotColumns()}function l_(t,e){t.pivotResultColsService.setPivotResultCols(e,"api")}function c_(t){const e=t.pivotResultColsService.getPivotResultCols();return e?e.list:null}var d_=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="showRowGroupColsService"}wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}refresh(){this.showRowGroupCols=[],this.showRowGroupColsMap={},this.columnModel.getCols().forEach(t=>{const n=t.getColDef().showRowGroup,o=typeof n=="string";!o&&!(n===!0)||(this.showRowGroupCols.push(t),o?this.showRowGroupColsMap[n]=t:this.funcColsService.getRowGroupColumns().forEach(c=>{this.showRowGroupColsMap[c.getId()]=t}))})}getShowRowGroupCols(){return this.showRowGroupCols}getShowRowGroupCol(t){return this.showRowGroupColsMap[t]}},ci="32.3.3",Qa=x._defineModule({version:ci,moduleName:`${x.ModuleNames.RowGroupingModule}-core`,beans:[my,by,Fy,Ry,My,ay,gy,d_,wy],userComponents:[{name:"agGroupRowRenderer",classImp:Ie.GroupCellRenderer},{name:"agGroupCellRenderer",classImp:Ie.GroupCellRenderer}],controllers:[{name:"groupCellRendererCtrl",classImp:Ie.GroupCellRendererCtrl}],dependantModules:[Ie.EnterpriseCoreModule]}),u_=x._defineModule({version:ci,moduleName:`${x.ModuleNames.RowGroupingModule}-api`,apiFunctions:{addAggFunc:Iy,addAggFuncs:Ly,clearAggFuncs:Oy,setColumnAggFunc:Gy,isPivotMode:zy,getPivotResultColumn:$y,setValueColumns:Zy,getValueColumns:Uy,removeValueColumn:Wy,removeValueColumns:Hy,addValueColumn:jy,addValueColumns:qy,setRowGroupColumns:Ky,removeRowGroupColumn:Yy,removeRowGroupColumns:Jy,addRowGroupColumn:Xy,addRowGroupColumns:Qy,getRowGroupColumns:t_,moveRowGroupColumn:e_,setPivotColumns:n_,removePivotColumn:r_,removePivotColumns:o_,addPivotColumn:i_,addPivotColumns:s_,getPivotColumns:a_,setPivotResultColumns:l_,getPivotResultColumns:c_},dependantModules:[Qa]}),jd=x._defineModule({version:ci,moduleName:"@ag-grid-enterprise/group-filter",userComponents:[{name:"agGroupColumnFilter",classImp:xy}],dependantModules:[Qa,x._ColumnFilterModule]}),p_=x._defineModule({version:ci,moduleName:"@ag-grid-enterprise/group-floating-filter",userComponents:[{name:"agGroupColumnFloatingFilter",classImp:ky}],dependantModules:[jd,x._FloatingFilterModule]}),h_=x._defineModule({version:ci,moduleName:x.ModuleNames.RowGroupingModule,dependantModules:[Qa,u_,jd,p_]}),qd=class extends Ka{constructor(t){super(t,"aggregation")}postConstruct(){const t=this.localeService.getLocaleTextFunc(),e=t("valueColumnsEmptyMessage","Drag here to aggregate"),n=t("values","Values");super.init({icon:x._createIconNoSpan("valuePanel",this.gos,null),emptyMessage:e,title:n}),this.addManagedEventListeners({columnValueChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaValuesDropZonePanelLabel","Values")}getTooltipParams(){const t=super.getTooltipParams();return t.location="valueColumnsList",t}getIconName(){return this.isPotentialDndItems()?"aggregate":"notAllowed"}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowValue()&&(!t.isValueActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setValueColumns(t,"toolPanelUi")}getExistingItems(){return this.funcColsService.getValueColumns()}},Kd=300,f_=class extends x.Component{constructor(){super(`<div class="ag-column-select-header" role="presentation">
|
|
24
|
+
`),this.eFloatingFilter=x.RefPlaceholder,this.haveAddedColumnListeners=!1}wireBeans(t){this.columnNameService=t.columnNameService,this.filterManager=t.filterManager}init(t){this.params=t;const e=this.gos.get("groupDisplayType")==="multipleColumns";return new x.AgPromise(n=>{this.params.parentFilterInstance(o=>{this.parentFilterInstance=o,e?this.setupUnderlyingFloatingFilterElement().then(()=>n()):(this.setupReadOnlyFloatingFilterElement(),n())})}).then(()=>{this.addManagedListeners(this.parentFilterInstance,{selectedColumnChanged:this.onSelectedColumnChanged.bind(this),columnRowGroupChanged:this.onColumnRowGroupChanged.bind(this)})})}onParamsUpdated(t){this.refresh(t)}refresh(t){this.params=t,this.setParams()}setParams(){var n;const t=this.columnNameService.getDisplayNameForColumn(this.params.column,"header",!0),e=this.localeService.getLocaleTextFunc();(n=this.eFloatingFilterText)==null||n.setInputAriaLabel(`${t} ${e("ariaFilterInput","Filter Input")}`)}setupReadOnlyFloatingFilterElement(){this.eFloatingFilterText||(this.eFloatingFilterText=this.createManagedBean(new x.AgInputTextField),this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams()),this.updateDisplayedValue(),this.eFloatingFilter.appendChild(this.eFloatingFilterText.getGui())}setupUnderlyingFloatingFilterElement(){this.showingUnderlyingFloatingFilter=!1,this.underlyingFloatingFilter=void 0,x._clearElement(this.eFloatingFilter);const t=this.parentFilterInstance.getSelectedColumn();if(t&&!t.isVisible()){const e=this.filterManager.getFloatingFilterCompDetails(t,this.params.showParentFilter);if(e)return this.haveAddedColumnListeners||(this.haveAddedColumnListeners=!0,this.addManagedListeners(t,{visibleChanged:this.onColumnVisibleChanged.bind(this),colDefChanged:this.onColDefChanged.bind(this)})),e.newAgStackInstance().then(n=>{var o,s;this.underlyingFloatingFilter=n,(s=this.underlyingFloatingFilter)==null||s.onParentModelChanged((o=this.parentFilterInstance.getSelectedFilter())==null?void 0:o.getModel()),this.appendChild(n.getGui()),this.showingUnderlyingFloatingFilter=!0})}return this.setupReadOnlyFloatingFilterElement(),x.AgPromise.resolve()}onColumnVisibleChanged(){this.setupUnderlyingFloatingFilterElement()}onColDefChanged(t){var n,o,s;if(!t.column)return;const e=this.filterManager.getFloatingFilterCompDetails(t.column,this.params.showParentFilter);e&&((n=this.underlyingFloatingFilter)!=null&&n.refresh?this.underlyingFloatingFilter.refresh(e.params):(s=(o=this.underlyingFloatingFilter)==null?void 0:o.onParamsUpdated)==null||s.call(o,e.params))}onParentModelChanged(t,e){var n,o;this.showingUnderlyingFloatingFilter?(o=this.underlyingFloatingFilter)==null||o.onParentModelChanged((n=this.parentFilterInstance.getSelectedFilter())==null?void 0:n.getModel(),e):this.updateDisplayedValue()}updateDisplayedValue(){if(!this.parentFilterInstance||!this.eFloatingFilterText)return;const t=this.parentFilterInstance.getSelectedFilter();if(!t){this.eFloatingFilterText.setValue(""),this.eFloatingFilterText.setDisplayed(!1);return}if(this.eFloatingFilterText.setDisplayed(!0),t.getModelAsString){const e=t.getModel();this.eFloatingFilterText.setValue(e==null?"":t.getModelAsString(e))}else this.eFloatingFilterText.setValue("")}onSelectedColumnChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}onColumnRowGroupChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}destroy(){super.destroy()}},tl=class{constructor(){this.allSets={},this.allParents=[]}removeFromChildrenAfterGroup(t,e){const n=this.getSet(t);n.removeFromChildrenAfterGroup[e.id]=!0}isRemoveFromAllLeafChildren(t,e){return!!this.getSet(t).removeFromAllLeafChildren[e.id]}preventRemoveFromAllLeafChildren(t,e){const n=this.getSet(t);delete n.removeFromAllLeafChildren[e.id]}removeFromAllLeafChildren(t,e){const n=this.getSet(t);n.removeFromAllLeafChildren[e.id]=!0}getSet(t){return this.allSets[t.id]||(this.allSets[t.id]={removeFromAllLeafChildren:{},removeFromChildrenAfterGroup:{}},this.allParents.push(t)),this.allSets[t.id]}getAllParents(){return this.allParents}flush(){this.allParents.forEach(t=>{var o;const e=this.allSets[t.id];t.childrenAfterGroup=t.childrenAfterGroup.filter(s=>!e.removeFromChildrenAfterGroup[s.id]),t.allLeafChildren=((o=t.allLeafChildren)==null?void 0:o.filter(s=>!e.removeFromAllLeafChildren[s.id]))??null,t.updateHasChildren();const n=t.sibling;n&&(n.childrenAfterGroup=t.childrenAfterGroup,n.allLeafChildren=t.allLeafChildren)}),this.allSets={},this.allParents.length=0}};function Ay(t){if(!t)return!1;const e=t.length;if(e<2)return!1;let n=!1;for(let o=1;o<e;o++)if(zd(t[o-1],t[o])>0){n=!0;break}return n?(t.sort(zd),!0):!1}function zd(t,e){const n=t.sourceRowIndex,o=e.sourceRowIndex,s=n>=0,l=o>=0,c=s&&l,u=!s&&!l;return c?n-o:u?t.__objectId-e.__objectId:s?1:-1}var Py=class extends x.BeanStub{wireBeans(t){this.beans=t,this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.valueService=t.valueService,this.selectionService=t.selectionService,this.showRowGroupColsService=t.showRowGroupColsService}execute(t){const e=this.createGroupingDetails(t);if(e.transactions)this.handleTransaction(e);else{const n=t.afterColumnsChanged===!0;this.shotgunResetEverything(e,n)}this.positionLeafsAndGroups(t.changedPath),this.orderGroups(e)}positionLeafsAndGroups(t){t.forEachChangedNodeDepthFirst(e=>{if(e.childrenAfterGroup){const n=[],o=[];let s;e.childrenAfterGroup.forEach(l=>{var c;(c=l.childrenAfterGroup)!=null&&c.length?l.key===""&&!s?s=l:o.push(l):n.push(l)}),s&&o.push(s),e.childrenAfterGroup=[...n,...o]}},!1)}createGroupingDetails(t){const{rowNode:e,changedPath:n,rowNodeTransactions:o,rowNodesOrderChanged:s}=t,l=this.funcColsService.getRowGroupColumns();return{expandByDefault:this.gos.get("groupDefaultExpanded"),groupedCols:l,rootNode:e,pivotMode:this.columnModel.isPivotMode(),groupedColCount:(l==null?void 0:l.length)??0,transactions:o,rowNodesOrderChanged:!!s,changedPath:n,groupAllowUnbalanced:this.gos.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),suppressGroupMaintainValueType:this.gos.get("suppressGroupMaintainValueType"),keyCreators:(l==null?void 0:l.map(u=>u.getColDef().keyCreator))??[]}}handleTransaction(t){t.transactions.forEach(e=>{const n=new tl;x._existsAndNotEmpty(e.remove)&&this.removeNodes(e.remove,t,n),x._existsAndNotEmpty(e.update)&&this.moveNodesInWrongPath(e.update,t,n),x._existsAndNotEmpty(e.add)&&this.insertNodes(e.add,t);const o=n.getAllParents().slice();n.flush(),this.removeEmptyGroups(o,t)}),t.rowNodesOrderChanged&&this.sortChildren(t)}sortChildren(t){t.changedPath.forEachChangedNodeDepthFirst(e=>{Ay(e.childrenAfterGroup)&&t.changedPath.addParentNode(e)},!1,!0)}orderGroups(t){const e=t.initialGroupOrderComparator;x._exists(e)&&n(t.rootNode);function n(o){x._exists(o.childrenAfterGroup)&&!o.leafGroup&&(o.childrenAfterGroup.sort((l,c)=>e({nodeA:l,nodeB:c})),o.childrenAfterGroup.forEach(l=>n(l)))}}getExistingPathForNode(t,e){const n=[];let o=t.parent;for(;o&&o!==e.rootNode;)n.push({key:o.key,rowGroupColumn:o.rowGroupColumn,field:o.field}),o=o.parent;return n.reverse(),n}moveNodesInWrongPath(t,e,n){t.forEach(o=>{e.changedPath.isActive()&&e.changedPath.addParentNode(o.parent);const s=p=>p.key,l=this.getExistingPathForNode(o,e).map(s),c=this.getGroupInfo(o,e).map(s);x._areEqual(l,c)||this.moveNode(o,e,n)})}moveNode(t,e,n){if(this.removeNodesFromParents([t],e,n),this.insertOneNode(t,e,n),t.setData(t.data),e.changedPath.isActive()){const o=t.parent;e.changedPath.addParentNode(o)}}removeNodes(t,e,n){this.removeNodesFromParents(t,e,n),e.changedPath.isActive()&&t.forEach(o=>e.changedPath.addParentNode(o.parent))}forEachParentGroup(t,e,n){let o=e;for(;o&&o!==t.rootNode;)n(o),o=o.parent}removeNodesFromParents(t,e,n){const o=n==null,s=n||new tl;t.forEach(l=>{this.removeFromParent(l,s),this.forEachParentGroup(e,l.parent,c=>{s.removeFromAllLeafChildren(c,l)})}),o&&s.flush()}removeEmptyGroups(t,e){let n=!0;const o=s=>{var p;const l=this.getChildrenMappedKey(s.key,s.rowGroupColumn),c=s.parent;return(c!=null&&c.childrenMapped?!c.childrenMapped[l]:!0)?!1:!!s.group&&(((p=s.childrenAfterGroup)==null?void 0:p.length)??0)===0};for(;n;){n=!1;const s=new tl;t.forEach(l=>{this.forEachParentGroup(e,l,c=>{o(c)&&(n=!0,this.removeFromParent(c,s),c.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))})}),s.flush()}}removeFromParent(t,e){var o;t.parent&&(e?e.removeFromChildrenAfterGroup(t.parent,t):(x._removeFromArray(t.parent.childrenAfterGroup,t),t.parent.updateHasChildren()));const n=this.getChildrenMappedKey(t.key,t.rowGroupColumn);(o=t.parent)!=null&&o.childrenMapped&&delete t.parent.childrenMapped[n],t.setRowTop(null),t.setRowIndex(null)}addToParent(t,e){const n=this.getChildrenMappedKey(t.key,t.rowGroupColumn);e!=null&&e.childrenMapped&&e.childrenMapped[n]!==t&&(e.childrenMapped[n]=t,e.childrenAfterGroup.push(t),e.setGroup(!0))}areGroupColsEqual(t,e){return t==null||e==null||t.pivotMode!==e.pivotMode?!1:x._areEqual(t.groupedCols,e.groupedCols)&&x._areEqual(t.keyCreators,e.keyCreators)}checkAllGroupDataAfterColsChanged(t){const e=n=>{n&&n.forEach(o=>{var c;if(!o.group)return;const l={field:o.field,key:o.key,rowGroupColumn:o.rowGroupColumn,leafNode:(c=o.allLeafChildren)==null?void 0:c[0]};this.setGroupData(o,l,t),e(o.childrenAfterGroup)})};e(t.rootNode.childrenAfterGroup)}shotgunResetEverything(t,e){if(this.noChangeInGroupingColumns(t,e))return;this.selectionService.filterFromSelection(l=>l&&!l.group);const{groupedCols:n}=t,o=t.rootNode;o.leafGroup=n.length===0,o.childrenAfterGroup=[],o.childrenMapped={},o.updateHasChildren();const s=o.sibling;s&&(s.childrenAfterGroup=o.childrenAfterGroup,s.childrenMapped=o.childrenMapped),this.insertNodes(o.allLeafChildren,t)}noChangeInGroupingColumns(t,e){let n=!1;const o=this.showRowGroupColsService.getShowRowGroupCols(),s=o?o.map(l=>l.getId()).join("-"):"";return e&&(n=this.areGroupColsEqual(t,this.oldGroupingDetails),this.oldGroupDisplayColIds!==s&&this.checkAllGroupDataAfterColsChanged(t)),this.oldGroupingDetails=t,this.oldGroupDisplayColIds=s,n}insertNodes(t,e){t.forEach(n=>{this.insertOneNode(n,e),e.changedPath.isActive()&&e.changedPath.addParentNode(n.parent)})}insertOneNode(t,e,n){const o=this.getGroupInfo(t,e),s=this.findParentForNode(t,o,e,n);s.group||x._warnOnce("duplicate group keys for row data, keys should be unique",[s.data,t.data]),t.parent=s,t.level=o.length,s.childrenAfterGroup.push(t),s.updateHasChildren()}findParentForNode(t,e,n,o){let s=n.rootNode;return e.forEach((l,c)=>{s=this.getOrCreateNextNode(s,l,c,n),o!=null&&o.isRemoveFromAllLeafChildren(s,t)?o==null||o.preventRemoveFromAllLeafChildren(s,t):s.allLeafChildren.push(t)}),s}getOrCreateNextNode(t,e,n,o){var c;const s=this.getChildrenMappedKey(e.key,e.rowGroupColumn);let l=(c=t==null?void 0:t.childrenMapped)==null?void 0:c[s];return l||(l=this.createGroup(e,t,n,o),this.addToParent(l,t)),l}createGroup(t,e,n,o){const s=new x.RowNode(this.beans);return s.group=!0,s.field=t.field,s.rowGroupColumn=t.rowGroupColumn,this.setGroupData(s,t,o),s.key=t.key,s.id=this.createGroupId(s,e,n),s.level=n,s.leafGroup=n===o.groupedColCount-1,s.allLeafChildren=[],s.setAllChildrenCount(0),s.rowGroupIndex=n,s.childrenAfterGroup=[],s.childrenMapped={},s.updateHasChildren(),s.parent=e,this.setExpandedInitialValue(o,s),s}createGroupId(t,e,n){const o=(s,l)=>{if(!s.rowGroupColumn)return null;const c=l?o(l,l.parent):null;return`${c==null?"":c+"-"}${s.rowGroupColumn.getColId()}-${s.key}`};return x.RowNode.ID_PREFIX_ROW_GROUP+o(t,e)}setGroupData(t,e,n){t.groupData={},this.showRowGroupColsService.getShowRowGroupCols().forEach(s=>{const l=t.rowGroupColumn;l!==null&&s.isRowGroupDisplayed(l.getId())&&(n.suppressGroupMaintainValueType?t.groupData[s.getColId()]=e.key:t.groupData[s.getColId()]=this.valueService.getValue(l,e.leafNode))})}getChildrenMappedKey(t,e){return e?e.getId()+"-"+t:t}setExpandedInitialValue(t,e){if(t.pivotMode&&e.leafGroup){e.expanded=!1;return}const n=t.isGroupOpenByDefault;if(n){const o={rowNode:e,field:e.field,key:e.key,level:e.level,rowGroupColumn:e.rowGroupColumn};e.expanded=n(o)==!0;return}if(t.expandByDefault===-1){e.expanded=!0;return}e.expanded=e.level<t.expandByDefault}getGroupInfo(t,e){const n=[];return e.groupedCols.forEach(o=>{let s=this.valueService.getKeyForNode(o,t),l=s!=null&&s!=="";if((e.pivotMode||!e.groupAllowUnbalanced)&&!l&&(s="",l=!0),l){const u={key:s,field:o.getColDef().field,rowGroupColumn:o,leafNode:t};n.push(u)}}),n}},Dy=(t,e)=>t.treeNode.oldSourceRowIndex-e.treeNode.oldSourceRowIndex,ht=Object.freeze([]),Fy=ht.values(),ms=(t,e)=>{t.parent=null,t.treeNode=null,e?t.childrenAfterGroup=[]:(t.level=0,t.childrenAfterGroup=null,t.allLeafChildren=null)},Ry=class hm{constructor(e,n,o){this.parent=e,this.key=n,this.level=o,this.children=null,this.invalidatedHead=null,this.invalidatedNext=void 0,this.row=null,this.oldRow=null,this.duplicateRows=null,this.childrenAfterGroup=ht,this.allLeafChildren=ht,this.childrenChanged=!1,this.leafChildrenChanged=!1,this.oldSourceRowIndex=-1}isEmptyFillerNode(){var e,n;return!((e=this.row)!=null&&e.data)&&!((n=this.children)!=null&&n.size)}hasChildren(){var e;return!!((e=this.children)!=null&&e.size)}enumChildren(){var e;return((e=this.children)==null?void 0:e.values())??Fy}upsertKey(e){var o,s;typeof e!="string"&&(e=String(e));let n=(o=this.children)==null?void 0:o.get(e);return n||(n=new hm(this,e,this.level+1),(s=this.children??(this.children=new Map))==null||s.set(n.key,n)),n}destroy(){var o;const{row:e,parent:n}=this;n!==null&&((o=n==null?void 0:n.children)==null||o.delete(this.key),e!==null&&ms(e,!0),this.parent=null)}setRow(e){const{level:n,row:o,childrenAfterGroup:s}=this;if(n<0)o!==null&&o!==e&&ms(o,!0);else{if(o===e)return!1;o!==null?(e.allLeafChildren=o.allLeafChildren??this.allLeafChildren??ht,ms(o,!1)):e.allLeafChildren=this.allLeafChildren??ht}return e.level=n,e.childrenAfterGroup=s,e.treeNode=this,this.row=e,!0}removeRow(e){const{level:n,row:o,duplicateRows:s,childrenAfterGroup:l}=this;if(o===e){const c=this.popDuplicateRow();c?(this.row=c,c.childrenAfterGroup=l,n>=0&&(c.allLeafChildren=o.allLeafChildren??this.allLeafChildren??ht)):this.row=null}else{if(!(s!=null&&s.delete(e)))return!1;s.size===0&&(this.duplicateRows=null)}return ms(e,n<0),!0}addDuplicateRow(e){const{level:n}=this;let o=this.duplicateRows;if(o===null)o=new Set,this.duplicateRows=o;else if(o.has(e))return!1;return o.add(e),e.treeNode=this,e.level=n,n>=0&&(e.allLeafChildren=ht),e.childrenAfterGroup=ht,!0}sortFirstDuplicateRow(){const e=this.duplicateRows,n=this.row;if(!n||!e)return n;let o=n;for(const s of e)s.sourceRowIndex<o.sourceRowIndex&&(o=s);return o!==n&&(o.childrenAfterGroup=this.childrenAfterGroup,o.allLeafChildren=n.allLeafChildren??this.allLeafChildren??ht,n.childrenAfterGroup=ht,n.allLeafChildren=ht,e.delete(o),e.add(n),this.row=o),o}popDuplicateRow(){let e=null;const n=this.duplicateRows;return n!==null&&(e=n.values().next().value,e!==null&&n.delete(e)&&n.size===0&&(this.duplicateRows=null)),e}dequeueInvalidated(){const e=this.invalidatedHead;return e!==null&&(this.invalidatedHead=e.invalidatedNext??null,e.invalidatedNext=void 0),e}invalidate(){let e=this,n=this.parent;for(;n!==null&&e.invalidatedNext===void 0;)e.invalidatedNext=n.invalidatedHead,n.invalidatedHead=e,e=n,n=e.parent}invalidateOrder(){var n,o;const e=this.parent;e!==null&&!e.childrenChanged&&((((n=this.children)==null?void 0:n.size)??0)>1||!((o=e.row)!=null&&o.data))&&(e.childrenChanged=!0,e.invalidate())}getRowPosition(){var n,o;const e=this.row;return e!=null&&e.data?e.sourceRowIndex:((o=(n=this.childrenAfterGroup[0])==null?void 0:n.treeNode)==null?void 0:o.oldSourceRowIndex)??this.oldSourceRowIndex}updateChildrenAfterGroup(){var u;this.childrenChanged=!1;const e=((u=this.children)==null?void 0:u.size)??0;if(e===0)return this.childrenAfterGroup.length===0?!1:(this.leafChildrenChanged=!0,this.childrenAfterGroup=ht,this.row.childrenAfterGroup=ht,!0);let n=!1,o=this.childrenAfterGroup;o===ht?(o=new Array(e),this.childrenAfterGroup=o,this.row.childrenAfterGroup=o,n=!0):o.length!==e&&(o.length=e,n=!0);let s=0,l=-1,c=!1;for(const p of this.enumChildren()){const f=p.getRowPosition();f<l&&(c=!0),l=f,p.oldSourceRowIndex=f;const m=p.row;o[s]!==m&&(o[s]=m,n=!0),++s}return n&&(this.leafChildrenChanged=!0),c&&this.reorderChildrenList(o),n||c}reorderChildrenList(e){const n=e.length,o=this.children;e.sort(Dy),o.clear();for(let s=0;s<n;++s){const l=e[s].treeNode;o.set(l.key,l)}}updateAllLeafChildren(){var c,u;const{parent:e,row:n,childrenAfterGroup:o}=this;this.leafChildrenChanged=!1;let s=!1;const l=o.length;if(l===0)s=((c=n.allLeafChildren)==null?void 0:c.length)!==0,n.allLeafChildren=ht,this.allLeafChildren=ht;else if(l===1&&((u=o[0].allLeafChildren)!=null&&u.length))n.allLeafChildren=o[0].allLeafChildren,this.allLeafChildren=null,s=!0;else{let p=this.allLeafChildren;(p===ht||p===null)&&(p=[],this.allLeafChildren=p);const f=p.length;let m=0;for(let y=0;y<l;++y){const T=o[y],B=T.allLeafChildren,A=B.length;if(A)for(let I=0;I<A;++I){const L=B[I];(m>=f||p[m]!==L)&&(p[m]=L,s=!0),++m}else(m>=f||p[m]!==T)&&T&&(p[m]=T,s=!0),++m}f!==m&&(p.length=m,s=!0),n.allLeafChildren!==p&&(n.allLeafChildren=p,s=!0)}s&&e&&(e.leafChildrenChanged=!0)}},$d=t=>(t.treeNodeFlags&1)!==0,Ud=t=>(t.treeNodeFlags&2)!==0,Zd=t=>(t.treeNodeFlags&4)!==0,My=t=>(t.treeNodeFlags&8)!==0,Wd=t=>(t.treeNodeFlags&16)!==0,Hd=(t,e)=>{e?t.treeNodeFlags|=2:t.treeNodeFlags&=-3},Iy=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|4)},Oy=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|12)},dr=t=>{t.treeNodeFlags|=16},jd=t=>{t.treeNodeFlags=1|t.treeNodeFlags&-29},di=t=>{t.treeNodeFlags=0},Ly=class extends x.BeanStub{constructor(){super(...arguments),this.rowsPendingDestruction=null,this.root=new Ry(null,"",-1)}wireBeans(t){this.beans=t,this.showRowGroupColsService=t.showRowGroupColsService}destroy(){const t=this.root.row;t!==null&&(this.root.removeRow(t),di(t)),this.destroyTree(this.root),this.commitDestroyedRows(),super.destroy()}execute(t){const{rowNodeTransactions:e,rowNodesOrderChanged:n,changedPath:o}=t,s=t.rowNode,l=this.gos,c={changedPath:o,expandByDefault:l.get("groupDefaultExpanded"),suppressGroupMaintainValueType:l.get("suppressGroupMaintainValueType"),getDataPath:l.get("getDataPath"),isGroupOpenByDefault:l.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:l.getCallback("initialGroupOrderComparator")};this.root.setRow(s),s.leafGroup=!1;const p=s.sibling;p&&(p.childrenAfterGroup=s.childrenAfterGroup,p.childrenMapped=s.childrenMapped),e?this.handleTransaction(c,e,n):this.handleRowData(c,s,t.afterColumnsChanged===!0)}handleRowData(t,e,n){var s,l,c;const o=this.root;if(n||this.oldGroupDisplayColIds===void 0){const u=((l=(s=this.showRowGroupColsService)==null?void 0:s.getShowRowGroupCols())==null?void 0:l.map(p=>p.getId()).join("-"))??"";if(n){this.oldGroupDisplayColIds!==u&&this.checkAllGroupDataAfterColsChanged((c=o.row)==null?void 0:c.childrenAfterGroup);return}this.oldGroupDisplayColIds=u}this.clearTree(o),this.addOrUpdateRows(t,e.allLeafChildren,!1),this.commitTree(t)}handleTransaction(t,e,n){for(const{remove:o,update:s,add:l}of e)this.removeRows(o),this.addOrUpdateRows(t,s,!0),this.addOrUpdateRows(t,l,!1);n&&this.handleRowNodesOrderChanged(),this.commitTree(t)}handleRowNodesOrderChanged(){var e;const t=(e=this.root.row)==null?void 0:e.allLeafChildren;if(t)for(let n=0,o=t.length;n<o;++n){const s=t[n].treeNode;s&&s.oldSourceRowIndex!==n&&s.invalidateOrder()}}checkAllGroupDataAfterColsChanged(t){var e;for(let n=0,o=(t==null?void 0:t.length)??0;n<o;++n){const s=t[n];this.setGroupData(s,((e=s.treeNode)==null?void 0:e.key)??s.key),this.checkAllGroupDataAfterColsChanged(s.childrenAfterGroup)}}addOrUpdateRows(t,e,n){for(let o=0,s=(e==null?void 0:e.length)??0;o<s;++o){const l=e[o],c=this.upsertPath(this.getDataPath(t,l));c&&this.addOrUpdateRow(c,l,n)}}removeRows(t){for(let e=0,n=(t==null?void 0:t.length)??0;e<n;++e){const o=t[e],s=o.treeNode;s!==null&&this.removeRow(s,o)}}getDataPath({getDataPath:t},{data:e}){const n=(t==null?void 0:t(e))||ht;return n.length||x._warnOnce("getDataPath() should not return an empty path",[e]),n}upsertPath(t){let e=this.root;const n=t.length-1;for(let o=0;o<=n;++o){const s=e.upsertKey(t[o]);if(o>=n)return s.invalidate(),s;e=s}return null}addOrUpdateRow(t,e,n){var c;const{level:o,row:s}=t;if(o<0)return;let l=!1;if(s!==e){const u=e.treeNode;u!==null&&u!==t&&(u.removeRow(e),u.invalidate()),s===null?(t.setRow(e),l=!0):s.data?t.addDuplicateRow(e)&&(l=!0):(t.setRow(e),this.destroyRow(s,!0),l=!0)}n&&!Zd(e)&&(Iy(e),l=!0),l&&t.invalidate(),(c=this.rowsPendingDestruction)==null||c.delete(e)}removeRow(t,e){const{parent:n,level:o}=t;if(o<0)return;let s=!1;t.removeRow(e)&&(s=!0,n&&(n.childrenChanged=!0),this.destroyRow(e,!e.data)),s&&t.invalidate()}commitTree(t){var o;const e=this.root;this.commitInvalidatedChildren(t,e);const n=e.row;e.childrenChanged&&e.updateChildrenAfterGroup()&&dr(n),n.updateHasChildren(),Wd(n)&&(o=t.changedPath)!=null&&o.isActive()&&t.changedPath.addParentNode(n),jd(n),this.commitDestroyedRows()}commitInvalidatedChildren(t,e){for(;;){const n=e.dequeueInvalidated();if(n===null)break;n.parent===e&&this.commitChild(t,e,n)}}commitChild(t,e,n){if(n.isEmptyFillerNode()){this.clearTree(n);return}this.commitNodePreOrder(e,n),this.commitInvalidatedChildren(t,n),this.commitNodePostOrder(t,e,n)}commitNodePreOrder(t,e){let n=e.row;if(n===null?(n=this.createFillerRow(e),e.setRow(n)):(n=e.sortFirstDuplicateRow(),n.allChildrenCount===void 0&&(n.allChildrenCount=null)),n.parent=t.row,e.oldRow!==n)for(const s of e.enumChildren()){const l=s.row;l!==null&&(l.parent=n)}const o=e.key;n.key!==o?(n.key=o,Oy(n),this.setGroupData(n,o)):n.groupData||this.setGroupData(n,o)}commitNodePostOrder(t,e,n){var f,m,y;const o=n.row,s=n.oldRow;if(n.isEmptyFillerNode()){this.clearTree(n);return}n.childrenChanged&&n.updateChildrenAfterGroup()&&dr(o),n.leafChildrenChanged&&n.updateAllLeafChildren();const l=n.getRowPosition();n.oldSourceRowIndex!==l&&(n.oldSourceRowIndex=l,e.childrenChanged=!0);const c=!!((f=o.childrenAfterGroup)!=null&&f.length),u=c||!o.data,p=o.group;p!==u?(dr(o),o.setGroup(u),!u&&!o.expanded&&Hd(o,!1)):o.hasChildren()!==c&&(dr(o),o.updateHasChildren()),o.group&&!Ud(o)&&(s!==o&&s!==null&&s.group&&Ud(s)&&!t.isGroupOpenByDefault?o.expanded=s.expanded:o.expanded=this.getExpandedInitialValue(t,o),Hd(o,!0)),Zd(o)&&(dr(e.row),My(o)&&o.setData(o.data)),s!==o&&(n.oldRow=o,s!==null&&(p||n.hasChildren())&&dr(o),e.childrenChanged=!0,dr(e.row)),Wd(o)?(m=t.changedPath)!=null&&m.isActive()&&t.changedPath.addParentNode(o):$d(o)||(o.childrenAfterFilter||(o.childrenAfterFilter=o.childrenAfterGroup.slice()),o.childrenAfterAggFilter||(o.childrenAfterAggFilter=o.childrenAfterFilter.slice()),o.childrenAfterSort||(o.childrenAfterSort=o.childrenAfterAggFilter.slice())),jd(o),(y=n.duplicateRows)!=null&&y.size&&!n.duplicateRowsWarned&&(n.duplicateRowsWarned=!0,x._warnOnce("duplicate group keys for row data, keys should be unique",[o.id,o.data,...Array.from(n.duplicateRows).map(T=>T.data)]))}createFillerRow(t){const e=new x.RowNode(this.beans);e.key=t.key,e.group=!0,e.field=null,e.leafGroup=!1,e.rowGroupIndex=null,e.allChildrenCount=null;let n=t.level+"-"+t.key,o=t.parent;for(;o!==null;){const s=o.parent;if(s===null)break;n=`${o.level}-${o.key}-${n}`,o=s}return e.id=x.RowNode.ID_PREFIX_ROW_GROUP+n,e}setGroupData(t,e){var s;const n={};t.groupData=n;const o=(s=this.showRowGroupColsService)==null?void 0:s.getShowRowGroupCols();if(o)for(const l of o)n[l.getColId()]=e}getExpandedInitialValue(t,e){const n=t.isGroupOpenByDefault;return n?n({rowNode:e,field:e.field,key:e.key,level:e.level,rowGroupColumn:e.rowGroupColumn})==!0:t.expandByDefault===-1||e.level<t.expandByDefault}clearTree(t){const{parent:e,oldRow:n,row:o,level:s}=t;if(e!==null&&n!==null&&(e.childrenChanged=!0,e.row!==null&&dr(e.row)),o!==null&&s>=0){let l=t.row;for(;l!==null&&t.removeRow(l);)this.destroyRow(l,!l.data),l=t.row}for(const l of t.enumChildren())this.clearTree(l);t.destroy()}destroyTree(t){const{row:e,level:n,duplicateRows:o}=t;if(e&&(n>=0&&!e.data?this.destroyRow(e,!0):di(e)),o)for(const s of o)n>=0&&!s.data?this.destroyRow(s,!0):di(s);for(const s of t.enumChildren())this.destroyTree(s);t.destroy()}destroyRow(t,e){if(!$d(t)){di(t);return}if(!e){(this.rowsPendingDestruction??(this.rowsPendingDestruction=new Set)).add(t);return}di(t),t.setRowIndex(null),t.setRowTop(null),!t.data&&t.isSelected()&&t.setSelectedParams({newValue:!1,source:"rowGroupChanged"})}commitDestroyedRows(){const{rowsPendingDestruction:t}=this;if(t!==null){this.rowsPendingDestruction=null;for(const e of t)this.destroyRow(e,!0)}}},Gy=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="groupStage"}wireBeans(t){this.selectableService=t.selectableService}execute(t){const e=this.gos.get("treeData")?Ly:Py;let n=this.strategy;(n==null?void 0:n.constructor)!==e&&(this.destroyBean(n),n=this.createManagedBean(new e),this.strategy=n),n.execute(t),this.selectableService.updateSelectableAfterGrouping()}destroy(){this.destroyBean(this.strategy),this.strategy=void 0,super.destroy()}},qd="PivotRowTotal_",zy=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="pivotColDefService"}wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.columnNameService=t.columnNameService}postConstruct(){const t=()=>this.gos.get("serverSidePivotResultFieldSeparator")??"_";this.fieldSeparator=t(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",()=>{this.fieldSeparator=t()});const e=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=e(),this.addManagedPropertyListener("pivotDefaultExpanded",()=>{this.pivotDefaultExpanded=e()})}createPivotColumnDefs(t){const e=this.createPivotColumnsFromUniqueValues(t);function n(l,c=[]){return l.forEach(u=>{u.children!==void 0?n(u.children,c):c.push(u)}),c}const o=n(e);this.addRowGroupTotals(e,o),this.addExpandablePivotGroups(e,o),this.addPivotTotalsToGroups(e,o);const s=o.map(l=>x._cloneObject(l));return{pivotColumnGroupDefs:e,pivotColumnDefs:s}}createPivotColumnsFromUniqueValues(t){const e=this.funcColsService.getPivotColumns(),n=e.length;return this.recursivelyBuildGroup(0,t,[],n,e)}recursivelyBuildGroup(t,e,n,o,s){const l=this.funcColsService.getValueColumns();if(t>=o)return this.buildMeasureCols(n);const c=s[t].getColDef(),u=this.headerNameComparator.bind(this,c.pivotComparator);if(l.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&t===o-1){const f=[];return x._iterateObject(e,m=>{const y=[...n,m],T=this.createColDef(l[0],m,y);T.columnGroupShow="open",f.push(T)}),f.sort(u),f}const p=[];return x._iterateObject(e,(f,m)=>{const y=this.pivotDefaultExpanded===-1||t<this.pivotDefaultExpanded,T=[...n,f];p.push({children:this.recursivelyBuildGroup(t+1,m,T,o,s),headerName:f,pivotKeys:T,columnGroupShow:"open",openByDefault:y,groupId:this.generateColumnGroupId(T)})}),p.sort(u),p}buildMeasureCols(t){const e=this.funcColsService.getValueColumns();return e.length===0?[this.createColDef(null,"-",t)]:e.map(n=>{const o=this.columnNameService.getDisplayNameForColumn(n,"header");return{...this.createColDef(n,o,t),columnGroupShow:"open"}})}addExpandablePivotGroups(t,e){const n=this.gos.get("suppressExpandablePivotGroups");if(n||this.gos.get("pivotColumnGroupTotals"))return;const o=(s,l,c)=>{if("children"in s){const f=new Map;s.children.forEach(y=>{o(y,l,f)});const m=!s.children.some(y=>y.children);this.funcColsService.getValueColumns().forEach(y=>{const T=this.columnNameService.getDisplayNameForColumn(y,"header"),B=this.createColDef(y,T,s.pivotKeys);B.pivotTotalColumnIds=f.get(y.getColId()),B.columnGroupShow=n?"open":"closed",B.aggFunc=y.getAggFunc(),m||(s.children.push(B),l.push(B))}),this.merge(c,f);return}if(!s.pivotValueColumn)return;const u=s.pivotValueColumn.getColId();c.has(u)?c.get(u).push(s.colId):c.set(u,[s.colId])};t.forEach(s=>{o(s,e,new Map)})}addPivotTotalsToGroups(t,e){if(!this.gos.get("pivotColumnGroupTotals"))return;const n=this.gos.get("pivotColumnGroupTotals")==="after",o=this.funcColsService.getValueColumns(),s=o.map(c=>c.getAggFunc());if(!s||s.length<1||!this.sameAggFuncs(s))return;const l=o[0];t.forEach(c=>{this.recursivelyAddPivotTotal(c,e,l,n)})}recursivelyAddPivotTotal(t,e,n,o){const s=t;if(!s.children){const c=t;return c.colId?[c.colId]:null}let l=[];if(s.children.forEach(c=>{const u=this.recursivelyAddPivotTotal(c,e,n,o);u&&(l=l.concat(u))}),s.children.length>1){const u=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),p=this.createColDef(n,u,t.pivotKeys,!0);p.pivotTotalColumnIds=l,p.aggFunc=n.getAggFunc(),p.columnGroupShow=this.gos.get("suppressExpandablePivotGroups")?"open":void 0;const f=t.children;o?f.push(p):f.unshift(p),e.push(p)}return l}addRowGroupTotals(t,e){if(!this.gos.get("pivotRowTotals"))return;const n=this.gos.get("pivotRowTotals")==="after",s=this.funcColsService.getValueColumns().slice();n||s.reverse();const l=s.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let c=0;c<s.length;c++){const u=s[c],p=this.columnNameService.getDisplayNameForColumn(u,"header"),f=this.createColDef(u,p,[]),m=[];for(let T=0;T<e.length;T++){const B=e[T];B.pivotValueColumn===u&&m.push(B.colId)}f.pivotTotalColumnIds=m,f.colId=qd+f.colId;const y=l?{children:[f],pivotKeys:[],groupId:`${qd}_pivotGroup_${u.getColId()}`}:f;e.push(f),n?t.push(y):t.unshift(y)}}createColDef(t,e,n,o=!1){const s={};if(t){const l=t.getColDef();Object.assign(s,l),s.hide=!1}return s.headerName=e,s.colId=this.generateColumnId(n||[],t&&!o?t.getColId():""),s.field=s.colId,s.valueGetter=l=>{var c;return(c=l.data)==null?void 0:c[l.colDef.field]},s.pivotKeys=n,s.pivotValueColumn=t,s.filter===!0&&(s.filter="agNumberColumnFilter"),s}sameAggFuncs(t){if(t.length==1)return!0;for(let e=1;e<t.length;e++)if(t[e]!==t[0])return!1;return!0}headerNameComparator(t,e,n){return t?t(e.headerName,n.headerName):e.headerName&&!n.headerName?1:!e.headerName&&n.headerName?-1:!e.headerName||!n.headerName?0:e.headerName<n.headerName?-1:e.headerName>n.headerName?1:0}merge(t,e){e.forEach((n,o)=>{const l=[...t.has(o)?t.get(o):[],...n];t.set(o,l)})}generateColumnGroupId(t){return`pivotGroup_${this.funcColsService.getPivotColumns().map(n=>n.getColId()).join("-")}_${t.join("-")}`}generateColumnId(t,e){return`pivot_${this.funcColsService.getPivotColumns().map(o=>o.getColId()).join("-")}_${t.join("-")}_${e}`}createColDefsFromFields(t){const e={};for(let s=0;s<t.length;s++){const c=t[s].split(this.fieldSeparator);let u=e;for(let p=0;p<c.length;p++){const f=c[p];u[f]==null&&(u[f]={}),u=u[f]}}const n=(s,l,c,u)=>{const p=[];for(const y in c){const T=c[y],B=n(`${s}${this.fieldSeparator}${y}`,y,T,u+1);p.push(B)}if(p.length===0){const y=this.columnModel.getColDefCol(l);if(y){const B=this.columnNameService.getDisplayNameForColumn(y,"header")??l,A=this.createColDef(y,B,void 0,!1);return A.colId=s,A.aggFunc=y.getAggFunc(),A.valueGetter=I=>{var L;return(L=I.data)==null?void 0:L[s]},A}return{colId:s,headerName:l,valueGetter:B=>{var A;return(A=B.data)==null?void 0:A[s]}}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&p.length===1&&"colId"in p[0]?(p[0].headerName=l,p[0]):{openByDefault:this.pivotDefaultExpanded===-1||u<this.pivotDefaultExpanded,groupId:s,headerName:l,children:p}},o=[];for(const s in e){const l=e[s],c=n(s,s,l,0);o.push(c)}return o}},Kd="Exceeded maximum allowed pivot column count.",$y=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="pivotStage",this.uniqueValues={},this.lastTimeFailed=!1,this.maxUniqueValues=-1,this.currentUniqueCount=0}wireBeans(t){this.valueService=t.valueService,this.columnModel=t.columnModel,this.pivotResultColsService=t.pivotResultColsService,this.funcColsService=t.funcColsService,this.pivotColDefService=t.pivotColDefService}execute(t){const e=t.changedPath;this.columnModel.isPivotActive()?this.executePivotOn(e):this.executePivotOff(e)}executePivotOff(t){this.aggregationColumnsHashLastTime=null,this.uniqueValues={},this.pivotResultColsService.isPivotResultColsPresent()&&(this.pivotResultColsService.setPivotResultCols(null,"rowModelUpdated"),t&&t.setInactive())}executePivotOn(t){const e=this.funcColsService.getValueColumns().length??1,n=this.gos.get("pivotMaxGeneratedColumns");this.maxUniqueValues=n===-1?-1:n/e;let o;try{o=this.bucketUpRowNodes(t)}catch(C){if(C.message===Kd){this.pivotResultColsService.setPivotResultCols([],"rowModelUpdated"),this.eventService.dispatchEvent({type:"pivotMaxColumnsExceeded",message:C.message}),this.lastTimeFailed=!0;return}throw C}const s=this.setUniqueValues(o),l=this.funcColsService.getValueColumns(),c=l.map(C=>`${C.getId()}-${C.getColDef().headerName}`).join("#"),u=l.map(C=>C.getAggFunc().toString()).join("#"),p=this.aggregationColumnsHashLastTime!==c,f=this.aggregationFuncsHashLastTime!==u;this.aggregationColumnsHashLastTime=c,this.aggregationFuncsHashLastTime=u;const m=this.funcColsService.getRowGroupColumns().map(C=>C.getId()).join("#"),y=m!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=m;const T=this.gos.get("pivotRowTotals"),B=this.gos.get("pivotColumnGroupTotals"),A=this.gos.get("suppressExpandablePivotGroups"),I=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),L=T!==this.pivotRowTotalsLastTime||B!==this.pivotColumnGroupTotalsLastTime||A!==this.suppressExpandablePivotGroupsLastTime||I!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=T,this.pivotColumnGroupTotalsLastTime=B,this.suppressExpandablePivotGroupsLastTime=A,this.removePivotHeaderRowWhenSingleValueColumnLastTime=I,this.lastTimeFailed||s||p||y||f||L){const{pivotColumnGroupDefs:C,pivotColumnDefs:R}=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);this.pivotColumnDefs=R,this.pivotResultColsService.setPivotResultCols(C,"rowModelUpdated"),t&&t.setInactive()}this.lastTimeFailed=!1}setUniqueValues(t){const e=JSON.stringify(t),n=JSON.stringify(this.uniqueValues);return e!==n?(this.uniqueValues=t,!0):!1}bucketUpRowNodes(t){this.currentUniqueCount=0;const e={};t.forEachChangedNodeDepthFirst(o=>{o.leafGroup&&(o.childrenMapped=null)});const n=o=>{var s;o.leafGroup?this.bucketRowNode(o,e):(s=o.childrenAfterFilter)==null||s.forEach(n)};return t.executeFromRootNode(n),e}bucketRowNode(t,e){const n=this.funcColsService.getPivotColumns();n.length===0?t.childrenMapped=null:t.childrenMapped=this.bucketChildren(t.childrenAfterFilter,n,0,e),t.sibling&&(t.sibling.childrenMapped=t.childrenMapped)}bucketChildren(t,e,n,o){const s={},l=e[n];if(t.forEach(c=>{let u=this.valueService.getKeyForNode(l,c);if(x._missing(u)&&(u=""),!o[u]){this.currentUniqueCount+=1,o[u]={};const p=this.maxUniqueValues!==-1,f=this.currentUniqueCount>this.maxUniqueValues;if(p&&f)throw Error(Kd)}s[u]||(s[u]=[]),s[u].push(c)}),n===e.length-1)return s;{const c={};return x._iterateObject(s,(u,p)=>{c[u]=this.bucketChildren(p,e,n+1,o[u])}),c}}getPivotColumnDefs(){return this.pivotColumnDefs}};function Uy(t,e,n){t.aggFuncService&&t.aggFuncService.addAggFuncs({key:n})}function Zy(t,e){t.aggFuncService&&t.aggFuncService.addAggFuncs(e)}function Wy(t){t.aggFuncService&&t.aggFuncService.clear()}function Hy(t,e,n){t.funcColsService.setColumnAggFunc(e,n,"api")}function jy(t){return t.columnModel.isPivotMode()}function qy(t,e,n){return t.pivotResultColsService.lookupPivotResultCol(e,n)}function Ky(t,e){t.funcColsService.setValueColumns(e,"api")}function Yy(t){return t.funcColsService.getValueColumns()}function Jy(t,e){t.funcColsService.removeValueColumns([e],"api")}function Xy(t,e){t.funcColsService.removeValueColumns(e,"api")}function Qy(t,e){t.funcColsService.addValueColumns([e],"api")}function e_(t,e){t.funcColsService.addValueColumns(e,"api")}function t_(t,e){t.funcColsService.setRowGroupColumns(e,"api")}function n_(t,e){t.funcColsService.removeRowGroupColumns([e],"api")}function r_(t,e){t.funcColsService.removeRowGroupColumns(e,"api")}function o_(t,e){t.funcColsService.addRowGroupColumns([e],"api")}function i_(t,e){t.funcColsService.addRowGroupColumns(e,"api")}function s_(t,e,n){t.funcColsService.moveRowGroupColumn(e,n,"api")}function a_(t){return t.funcColsService.getRowGroupColumns()}function l_(t,e){t.funcColsService.setPivotColumns(e,"api")}function c_(t,e){t.funcColsService.removePivotColumns([e],"api")}function d_(t,e){t.funcColsService.removePivotColumns(e,"api")}function u_(t,e){t.funcColsService.addPivotColumns([e],"api")}function p_(t,e){t.funcColsService.addPivotColumns(e,"api")}function h_(t){return t.funcColsService.getPivotColumns()}function f_(t,e){t.pivotResultColsService.setPivotResultCols(e,"api")}function m_(t){const e=t.pivotResultColsService.getPivotResultCols();return e?e.list:null}var g_=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="showRowGroupColsService"}wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}refresh(){this.showRowGroupCols=[],this.showRowGroupColsMap={},this.columnModel.getCols().forEach(t=>{const n=t.getColDef().showRowGroup,o=typeof n=="string";!o&&!(n===!0)||(this.showRowGroupCols.push(t),o?this.showRowGroupColsMap[n]=t:this.funcColsService.getRowGroupColumns().forEach(c=>{this.showRowGroupColsMap[c.getId()]=t}))})}getShowRowGroupCols(){return this.showRowGroupCols}getShowRowGroupCol(t){return this.showRowGroupColsMap[t]}},ui="32.3.3",nl=x._defineModule({version:ui,moduleName:`${x.ModuleNames.RowGroupingModule}-core`,beans:[wy,By,Gy,zy,$y,hy,by,g_,Ty],userComponents:[{name:"agGroupRowRenderer",classImp:Ie.GroupCellRenderer},{name:"agGroupCellRenderer",classImp:Ie.GroupCellRenderer}],controllers:[{name:"groupCellRendererCtrl",classImp:Ie.GroupCellRendererCtrl}],dependantModules:[Ie.EnterpriseCoreModule]}),y_=x._defineModule({version:ui,moduleName:`${x.ModuleNames.RowGroupingModule}-api`,apiFunctions:{addAggFunc:Uy,addAggFuncs:Zy,clearAggFuncs:Wy,setColumnAggFunc:Hy,isPivotMode:jy,getPivotResultColumn:qy,setValueColumns:Ky,getValueColumns:Yy,removeValueColumn:Jy,removeValueColumns:Xy,addValueColumn:Qy,addValueColumns:e_,setRowGroupColumns:t_,removeRowGroupColumn:n_,removeRowGroupColumns:r_,addRowGroupColumn:o_,addRowGroupColumns:i_,getRowGroupColumns:a_,moveRowGroupColumn:s_,setPivotColumns:l_,removePivotColumn:c_,removePivotColumns:d_,addPivotColumn:u_,addPivotColumns:p_,getPivotColumns:h_,setPivotResultColumns:f_,getPivotResultColumns:m_},dependantModules:[nl]}),Yd=x._defineModule({version:ui,moduleName:"@ag-grid-enterprise/group-filter",userComponents:[{name:"agGroupColumnFilter",classImp:Vy}],dependantModules:[nl,x._ColumnFilterModule]}),__=x._defineModule({version:ui,moduleName:"@ag-grid-enterprise/group-floating-filter",userComponents:[{name:"agGroupColumnFloatingFilter",classImp:Ny}],dependantModules:[Yd,x._FloatingFilterModule]}),v_=x._defineModule({version:ui,moduleName:x.ModuleNames.RowGroupingModule,dependantModules:[nl,y_,Yd,__]}),Jd=class extends Xa{constructor(t){super(t,"aggregation")}postConstruct(){const t=this.localeService.getLocaleTextFunc(),e=t("valueColumnsEmptyMessage","Drag here to aggregate"),n=t("values","Values");super.init({icon:x._createIconNoSpan("valuePanel",this.gos,null),emptyMessage:e,title:n}),this.addManagedEventListeners({columnValueChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaValuesDropZonePanelLabel","Values")}getTooltipParams(){const t=super.getTooltipParams();return t.location="valueColumnsList",t}getIconName(){return this.isPotentialDndItems()?"aggregate":"notAllowed"}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowValue()&&(!t.isValueActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setValueColumns(t,"toolPanelUi")}getExistingItems(){return this.funcColsService.getValueColumns()}},Xd=300,C_=class extends x.Component{constructor(){super(`<div class="ag-column-select-header" role="presentation">
|
|
25
25
|
<div data-ref="eExpand" class="ag-column-select-header-icon"></div>
|
|
26
26
|
<ag-checkbox data-ref="eSelect" class="ag-column-select-header-checkbox"></ag-checkbox>
|
|
27
27
|
<ag-input-text-field class="ag-column-select-header-filter-wrapper" data-ref="eFilterTextField"></ag-input-text-field>
|
|
28
|
-
</div>`,[x.AgCheckboxSelector,x.AgInputTextFieldSelector]),this.eExpand=x.RefPlaceholder,this.eSelect=x.RefPlaceholder,this.eFilterTextField=x.RefPlaceholder}wireBeans(t){this.columnModel=t.columnModel}postConstruct(){this.createExpandIcons(),this.addManagedListeners(this.eExpand,{click:this.onExpandClicked.bind(this),keydown:e=>{e.key===x.KeyCode.SPACE&&(e.preventDefault(),this.onExpandClicked())}}),this.addManagedElementListeners(this.eSelect.getInputElement(),{click:this.onSelectClicked.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",()=>this.onFunctionsReadOnlyPropChanged()),this.eFilterTextField.setAutoComplete(!1).onValueChange(()=>this.onFilterTextChanged()),this.addManagedElementListeners(this.eFilterTextField.getInputElement(),{keydown:this.onMiniFilterKeyDown.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideOptions.bind(this)});const t=this.localeService.getLocaleTextFunc();this.eSelect.setInputAriaLabel(t("ariaColumnSelectAll","Toggle All Columns Visibility")),this.eFilterTextField.setInputAriaLabel(t("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])}onFunctionsReadOnlyPropChanged(){const t=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t)}init(t){this.params=t;const e=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e),this.columnModel.isReady()&&this.showOrHideOptions()}createExpandIcons(){this.eExpand.appendChild(this.eExpandChecked=x._createIconNoSpan("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=x._createIconNoSpan("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=x._createIconNoSpan("columnSelectIndeterminate",this.gos)),this.setExpandState(0)}showOrHideOptions(){const t=!this.params.suppressColumnFilter,e=!this.params.suppressColumnSelectAll,n=!this.params.suppressColumnExpandAll,o=this.columnModel.isProvidedColGroupsPresent(),s=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(s("searchOoo","Search...")),x._setDisplayed(this.eFilterTextField.getGui(),t),x._setDisplayed(this.eSelect.getGui(),e),x._setDisplayed(this.eExpand,n&&o)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=x._debounce(()=>{const t=this.eFilterTextField.getValue();this.dispatchLocalEvent({type:"filterChanged",filterText:t})},
|
|
28
|
+
</div>`,[x.AgCheckboxSelector,x.AgInputTextFieldSelector]),this.eExpand=x.RefPlaceholder,this.eSelect=x.RefPlaceholder,this.eFilterTextField=x.RefPlaceholder}wireBeans(t){this.columnModel=t.columnModel}postConstruct(){this.createExpandIcons(),this.addManagedListeners(this.eExpand,{click:this.onExpandClicked.bind(this),keydown:e=>{e.key===x.KeyCode.SPACE&&(e.preventDefault(),this.onExpandClicked())}}),this.addManagedElementListeners(this.eSelect.getInputElement(),{click:this.onSelectClicked.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",()=>this.onFunctionsReadOnlyPropChanged()),this.eFilterTextField.setAutoComplete(!1).onValueChange(()=>this.onFilterTextChanged()),this.addManagedElementListeners(this.eFilterTextField.getInputElement(),{keydown:this.onMiniFilterKeyDown.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideOptions.bind(this)});const t=this.localeService.getLocaleTextFunc();this.eSelect.setInputAriaLabel(t("ariaColumnSelectAll","Toggle All Columns Visibility")),this.eFilterTextField.setInputAriaLabel(t("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])}onFunctionsReadOnlyPropChanged(){const t=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t)}init(t){this.params=t;const e=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e),this.columnModel.isReady()&&this.showOrHideOptions()}createExpandIcons(){this.eExpand.appendChild(this.eExpandChecked=x._createIconNoSpan("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=x._createIconNoSpan("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=x._createIconNoSpan("columnSelectIndeterminate",this.gos)),this.setExpandState(0)}showOrHideOptions(){const t=!this.params.suppressColumnFilter,e=!this.params.suppressColumnSelectAll,n=!this.params.suppressColumnExpandAll,o=this.columnModel.isProvidedColGroupsPresent(),s=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(s("searchOoo","Search...")),x._setDisplayed(this.eFilterTextField.getGui(),t),x._setDisplayed(this.eSelect.getGui(),e),x._setDisplayed(this.eExpand,n&&o)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=x._debounce(()=>{const t=this.eFilterTextField.getValue();this.dispatchLocalEvent({type:"filterChanged",filterText:t})},Xd)),this.onFilterTextChangedDebounced()}onMiniFilterKeyDown(t){t.key===x.KeyCode.ENTER&&setTimeout(()=>this.onSelectClicked(),Xd)}onSelectClicked(){this.dispatchLocalEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchLocalEvent({type:this.expandState===0?"collapseAll":"expandAll"})}setExpandState(t){this.expandState=t,x._setDisplayed(this.eExpandChecked,this.expandState===0),x._setDisplayed(this.eExpandUnchecked,this.expandState===1),x._setDisplayed(this.eExpandIndeterminate,this.expandState===2)}setSelectionState(t){this.selectState=t,this.eSelect.setValue(this.selectState)}},w_={selector:"AG-PRIMARY-COLS-HEADER",component:C_},Qd=class{constructor(t,e,n,o=!1,s){this.localEventService=new x.LocalEventService,this.displayName=t,this.dept=n,this.group=o,o?(this.columnGroup=e,this.expanded=s,this.children=[]):this.column=e}isGroup(){return this.group}getDisplayName(){return this.displayName}getColumnGroup(){return this.columnGroup}getColumn(){return this.column}getDept(){return this.dept}isExpanded(){return!!this.expanded}getChildren(){return this.children}isPassesFilter(){return this.passesFilter}setExpanded(t){t!==this.expanded&&(this.expanded=t,this.localEventService.dispatchEvent({type:"expandedChanged"}))}setPassesFilter(t){this.passesFilter=t}addEventListener(t,e){this.localEventService.addEventListener(t,e)}removeEventListener(t,e){this.localEventService.removeEventListener(t,e)}},eu=class extends x.Component{constructor(t,e,n){super('<div class="ag-menu"></div>'),this.column=t,this.mouseEvent=e,this.parentEl=n,this.displayName=null}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService,this.popupService=t.popupService,this.focusService=t.focusService}postConstruct(){if(this.initializeProperties(this.column),this.buildMenuItemMap(),x.isColumn(this.column)?this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnToolPanel"):this.displayName=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,this.column,"columnToolPanel"),this.isActive()){this.mouseEvent.preventDefault();const t=this.getMappedMenuItems();if(t.length===0)return;this.displayContextMenu(t)}}initializeProperties(t){x.isProvidedColumnGroup(t)?this.columns=t.getLeafColumns():this.columns=[t],this.allowGrouping=this.columns.some(e=>e.isPrimary()&&e.isAllowRowGroup()),this.allowValues=this.columns.some(e=>e.isPrimary()&&e.isAllowValue()),this.allowPivoting=this.columnModel.isPivotMode()&&this.columns.some(e=>e.isPrimary()&&e.isAllowPivot())}buildMenuItemMap(){const t=this.localeService.getLocaleTextFunc();this.menuItemMap=new Map,this.menuItemMap.set("rowGroup",{allowedFunction:e=>e.isPrimary()&&e.isAllowRowGroup()&&!this.columnModel.isColGroupLocked(e),activeFunction:e=>e.isRowGroupActive(),activateLabel:()=>`${t("groupBy","Group by")} ${this.displayName}`,deactivateLabel:()=>`${t("ungroupBy","Un-Group by")} ${this.displayName}`,activateFunction:()=>{const e=this.funcColsService.getRowGroupColumns();this.funcColsService.setRowGroupColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.funcColsService.getRowGroupColumns();this.funcColsService.setRowGroupColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"}),this.menuItemMap.set("value",{allowedFunction:e=>e.isPrimary()&&e.isAllowValue(),activeFunction:e=>e.isValueActive(),activateLabel:()=>t("addToValues",`Add ${this.displayName} to values`,[this.displayName]),deactivateLabel:()=>t("removeFromValues",`Remove ${this.displayName} from values`,[this.displayName]),activateFunction:()=>{const e=this.funcColsService.getValueColumns();this.funcColsService.setValueColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.funcColsService.getValueColumns();this.funcColsService.setValueColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"valuePanel",removeIcon:"valuePanel"}),this.menuItemMap.set("pivot",{allowedFunction:e=>this.columnModel.isPivotMode()&&e.isPrimary()&&e.isAllowPivot(),activeFunction:e=>e.isPivotActive(),activateLabel:()=>t("addToLabels",`Add ${this.displayName} to labels`,[this.displayName]),deactivateLabel:()=>t("removeFromLabels",`Remove ${this.displayName} from labels`,[this.displayName]),activateFunction:()=>{const e=this.funcColsService.getPivotColumns();this.funcColsService.setPivotColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.funcColsService.getPivotColumns();this.funcColsService.setPivotColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"pivotPanel",removeIcon:"pivotPanel"})}addColumnsToList(t){return[...t].concat(this.columns.filter(e=>t.indexOf(e)===-1))}removeColumnsFromList(t){return t.filter(e=>this.columns.indexOf(e)===-1)}displayContextMenu(t){const e=this.getGui(),n=this.createBean(new Ie.AgMenuList),o=this.localeService.getLocaleTextFunc();let s=()=>{};e.appendChild(n.getGui()),n.addMenuItems(t),n.addManagedListeners(n,{closeMenu:()=>{this.parentEl.focus(),s()}});const l=this.popupService.addPopup({modal:!0,eChild:e,closeOnEsc:!0,afterGuiAttached:()=>this.focusService.focusInto(n.getGui()),ariaLabel:o("ariaLabelContextMenu","Context Menu"),closedCallback:c=>{c instanceof KeyboardEvent&&this.parentEl.focus(),this.destroyBean(n)}});l&&(s=l.hideFunc),this.popupService.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEvent,ePopup:e})}isActive(){return this.allowGrouping||this.allowValues||this.allowPivoting}getMappedMenuItems(){const t=[];for(const e of this.menuItemMap.values()){const n=this.columns.some(s=>e.allowedFunction(s)&&!e.activeFunction(s)),o=this.columns.some(s=>e.allowedFunction(s)&&e.activeFunction(s));n&&t.push({name:e.activateLabel(this.displayName),icon:x._createIconNoSpan(e.addIcon,this.gos,null),action:()=>e.activateFunction()}),o&&t.push({name:e.deactivateLabel(this.displayName),icon:x._createIconNoSpan(e.removeIcon,this.gos,null),action:()=>e.deActivateFunction()})}return t}},tu=class extends x.Component{constructor(t,e,n,o){super(),this.modelItem=t,this.allowDragging=e,this.eventType=n,this.focusWrapper=o,this.cbSelect=x.RefPlaceholder,this.eLabel=x.RefPlaceholder,this.eGroupOpenedIcon=x.RefPlaceholder,this.eGroupClosedIcon=x.RefPlaceholder,this.eColumnGroupIcons=x.RefPlaceholder,this.processingColumnStateChange=!1,this.modelItem=t,this.columnGroup=t.getColumnGroup(),this.columnDept=t.getDept(),this.displayName=t.getDisplayName(),this.allowDragging=e}wireBeans(t){this.columnModel=t.columnModel,this.dragAndDropService=t.dragAndDropService,this.modelItemUtils=t.modelItemUtils}postConstruct(){this.setTemplate(`<div class="ag-column-select-column-group">
|
|
29
29
|
<span class="ag-column-group-icons" data-ref="eColumnGroupIcons" >
|
|
30
30
|
<span class="ag-column-group-closed-icon" data-ref="eGroupClosedIcon"></span>
|
|
31
31
|
<span class="ag-column-group-opened-icon" data-ref="eGroupOpenedIcon"></span>
|
|
32
32
|
</span>
|
|
33
33
|
<ag-checkbox data-ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>
|
|
34
34
|
<span class="ag-column-select-column-label" data-ref="eLabel"></span>
|
|
35
|
-
</div>`,[x.AgCheckboxSelector]),this.eDragHandle=x._createIconNoSpan("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");const t=this.cbSelect.getGui(),e=this.cbSelect.getInputElement();t.insertAdjacentElement("afterend",this.eDragHandle),e.setAttribute("tabindex","-1"),this.eLabel.innerHTML=this.displayName?this.displayName:"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+this.columnDept),this.getGui().style.setProperty("--ag-indentation-level",String(this.columnDept)),this.addManagedEventListeners({columnPivotModeChanged:this.onColumnStateChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedListeners(this.modelItem,{expandedChanged:this.onExpandChanged.bind(this)}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),x._getToolPanelClassesFromColDef(this.columnGroup.getColGroupDef(),this.gos,null,this.columnGroup).forEach(o=>this.addOrRemoveCssClass(o,!0))}getColumns(){return this.columnGroup.getLeafColumns()}setupTooltip(){const t=this.columnGroup.getColGroupDef();if(!t)return;const e=this.gos.get("tooltipShowMode")==="whenTruncated";let n;e&&(n=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);const o=()=>{const s=t.headerTooltip;this.setTooltip({newTooltipText:s,location:"columnToolPanelColumnGroup",shouldDisplayTooltip:n})};o(),this.addManagedEventListeners({newColumnsLoaded:o})}getTooltipParams(){const t=super.getTooltipParams();return t.location="columnToolPanelColumnGroup",t}handleKeyDown(t){switch(t.key){case x.KeyCode.LEFT:t.preventDefault(),this.modelItem.setExpanded(!1);break;case x.KeyCode.RIGHT:t.preventDefault(),this.modelItem.setExpanded(!0);break;case x.KeyCode.SPACE:t.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected());break}}onContextMenu(t){const{columnGroup:e,gos:n}=this;if(n.get("functionsReadOnly"))return;const o=this.createBean(new
|
|
35
|
+
</div>`,[x.AgCheckboxSelector]),this.eDragHandle=x._createIconNoSpan("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");const t=this.cbSelect.getGui(),e=this.cbSelect.getInputElement();t.insertAdjacentElement("afterend",this.eDragHandle),e.setAttribute("tabindex","-1"),this.eLabel.innerHTML=this.displayName?this.displayName:"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+this.columnDept),this.getGui().style.setProperty("--ag-indentation-level",String(this.columnDept)),this.addManagedEventListeners({columnPivotModeChanged:this.onColumnStateChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedListeners(this.modelItem,{expandedChanged:this.onExpandChanged.bind(this)}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),x._getToolPanelClassesFromColDef(this.columnGroup.getColGroupDef(),this.gos,null,this.columnGroup).forEach(o=>this.addOrRemoveCssClass(o,!0))}getColumns(){return this.columnGroup.getLeafColumns()}setupTooltip(){const t=this.columnGroup.getColGroupDef();if(!t)return;const e=this.gos.get("tooltipShowMode")==="whenTruncated";let n;e&&(n=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);const o=()=>{const s=t.headerTooltip;this.setTooltip({newTooltipText:s,location:"columnToolPanelColumnGroup",shouldDisplayTooltip:n})};o(),this.addManagedEventListeners({newColumnsLoaded:o})}getTooltipParams(){const t=super.getTooltipParams();return t.location="columnToolPanelColumnGroup",t}handleKeyDown(t){switch(t.key){case x.KeyCode.LEFT:t.preventDefault(),this.modelItem.setExpanded(!1);break;case x.KeyCode.RIGHT:t.preventDefault(),this.modelItem.setExpanded(!0);break;case x.KeyCode.SPACE:t.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected());break}}onContextMenu(t){const{columnGroup:e,gos:n}=this;if(n.get("functionsReadOnly"))return;const o=this.createBean(new eu(e,t,this.focusWrapper));this.addDestroyFunc(()=>{o.isAlive()&&this.destroyBean(o)})}addVisibilityListenersToAllChildren(){const t=this.onColumnStateChanged.bind(this);this.columnGroup.getLeafColumns().forEach(e=>{this.addManagedListeners(e,{visibleChanged:t,columnValueChanged:t,columnPivotChanged:t,columnRowGroupChanged:t})})}setupDragging(){if(!this.allowDragging){x._setDisplayed(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns");const e={type:x.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>t?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{t=!this.gos.get("suppressDragLeaveHidesColumns"),this.eventService.dispatchEvent({type:"columnPanelItemDragStart",column:this.columnGroup})},onDragStopped:()=>{this.eventService.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:n=>{t&&this.modelItemUtils.updateColumns({columns:this.columnGroup.getLeafColumns(),visibleState:n==null?void 0:n.visibleState,pivotState:n==null?void 0:n.pivotState,eventType:this.eventType})},onGridExit:()=>{t&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(e,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(e))}createDragItem(){const t=this.columnGroup.getLeafColumns(),e={},n={};return t.forEach(o=>{const s=o.getId();e[s]=o.isVisible(),n[s]=this.modelItemUtils.createPivotState(o)}),{columns:t,visibleState:e,pivotState:n}}setupExpandContract(){this.eGroupClosedIcon.appendChild(x._createIcon("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(x._createIcon("columnSelectOpen",this.gos,null));const t=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(this.eGroupClosedIcon,{click:t}),this.addManagedElementListeners(this.eGroupOpenedIcon,{click:t});const e=new x.TouchListener(this.eColumnGroupIcons,!0);this.addManagedListeners(e,{tap:t}),this.addDestroyFunc(e.destroy.bind(e))}onLabelClicked(){const t=!this.cbSelect.getValue();this.onChangeCommon(t)}onCheckboxChanged(t){this.onChangeCommon(t.selected)}getVisibleLeafColumns(){const t=[],e=n=>{n.forEach(o=>{o.isPassesFilter()&&(o.isGroup()?e(o.getChildren()):t.push(o.getColumn()))})};return e(this.modelItem.getChildren()),t}onChangeCommon(t){this.refreshAriaLabel(),!this.processingColumnStateChange&&this.modelItemUtils.selectAllChildren(this.modelItem.getChildren(),t,this.eventType)}refreshAriaLabel(){const t=this.localeService.getLocaleTextFunc(),e=t("ariaColumnGroup","Column Group"),n=this.cbSelect.getValue(),o=n===void 0?t("ariaIndeterminate","indeterminate"):n?t("ariaVisible","visible"):t("ariaHidden","hidden"),s=t("ariaToggleVisibility","Press SPACE to toggle visibility");x._setAriaLabel(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${s} (${o})`),x._setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)}onColumnStateChanged(){const t=this.workOutSelectedValue(),e=this.workOutReadOnlyValue();this.processingColumnStateChange=!0,this.cbSelect.setValue(t),this.cbSelect.setReadOnly(e),this.addOrRemoveCssClass("ag-column-select-column-group-readonly",e),this.processingColumnStateChange=!1}workOutSelectedValue(){const t=this.columnModel.isPivotMode(),e=this.getVisibleLeafColumns();let n=0,o=0;if(e.forEach(s=>{!t&&s.getColDef().lockVisible||(this.isColumnChecked(s,t)?n++:o++)}),!(n>0&&o>0))return n>0}workOutReadOnlyValue(){const t=this.columnModel.isPivotMode();let e=0;return this.columnGroup.getLeafColumns().forEach(n=>{t?n.isAnyFunctionAllowed()&&e++:n.getColDef().lockVisible||e++}),e===0}isColumnChecked(t,e){if(e){const n=t.isPivotActive(),o=t.isRowGroupActive(),s=t.isValueActive();return n||o||s}return t.isVisible()}onExpandOrContractClicked(){const t=this.modelItem.isExpanded();this.modelItem.setExpanded(!t)}onExpandChanged(){this.setOpenClosedIcons(),this.refreshAriaExpanded()}setOpenClosedIcons(){const t=this.modelItem.isExpanded();x._setDisplayed(this.eGroupClosedIcon,!t),x._setDisplayed(this.eGroupOpenedIcon,t)}refreshAriaExpanded(){x._setAriaExpanded(this.focusWrapper,this.modelItem.isExpanded())}getDisplayName(){return this.displayName}onSelectAllChanged(t){const e=this.cbSelect.getValue();!this.cbSelect.isReadOnly()&&(t&&!e||!t&&e)&&this.cbSelect.toggle()}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}setSelected(t){this.cbSelect.setValue(t,!0)}},b_=class extends x.BeanStub{constructor(t,e){super(),this.comp=t,this.virtualList=e}wireBeans(t){this.columnMoveService=t.columnMoveService,this.columnModel=t.columnModel}postConstruct(){this.createManagedBean(new Ie.VirtualListDragFeature(this.comp,this.virtualList,{dragSourceType:x.DragSourceType.ToolPanel,listItemDragStartEvent:"columnPanelItemDragStart",listItemDragEndEvent:"columnPanelItemDragEnd",eventSource:this.eventService,getCurrentDragValue:t=>this.getCurrentDragValue(t),isMoveBlocked:t=>this.isMoveBlocked(t),getNumRows:t=>t.getDisplayedColsList().length,moveItem:(t,e)=>this.moveItem(this.getCurrentColumnsBeingMoved(t),e)}))}getCurrentDragValue(t){return t.column}getCurrentColumnsBeingMoved(t){return x.isProvidedColumnGroup(t)?t.getLeafColumns():t?[t]:[]}isMoveBlocked(t){return this.gos.get("suppressMovableColumns")?!0:!!this.getCurrentColumnsBeingMoved(t).find(s=>{const l=s.getColDef();return!!l.suppressMovable||!!l.lockPosition})}moveItem(t,e){if(!e)return;const{component:n}=e;let o=null,s=e.position==="top";if(n instanceof tu?(o=n.getColumns()[0],s=!0):n&&(o=n.getColumn()),!o)return;const l=this.getMoveTargetIndex({currentColumns:t,lastHoveredColumn:o,isBefore:s});l!=null&&this.columnMoveService.moveColumns(t,l,"toolPanelUi")}getMoveTargetIndex(t){const{currentColumns:e,lastHoveredColumn:n,isBefore:o}=t;if(!n||!e)return null;const s=this.columnModel.getCols().indexOf(n),l=o?s:s+1,c=this.getMoveDiff(e,l);return l-c}getMoveDiff(t,e){const n=this.columnModel.getCols();if(!t)return 0;const o=t[0],s=t.length;return n.indexOf(o)<e?s:0}},x_=class extends x.Component{constructor(t,e,n,o){super(),this.allowDragging=e,this.groupsExist=n,this.focusWrapper=o,this.eLabel=x.RefPlaceholder,this.cbSelect=x.RefPlaceholder,this.processingColumnStateChange=!1,this.column=t.getColumn(),this.columnDept=t.getDept(),this.displayName=t.getDisplayName()}wireBeans(t){this.columnModel=t.columnModel,this.dragAndDropService=t.dragAndDropService,this.modelItemUtils=t.modelItemUtils}postConstruct(){this.setTemplate(`<div class="ag-column-select-column">
|
|
36
36
|
<ag-checkbox data-ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>
|
|
37
37
|
<span class="ag-column-select-column-label" data-ref="eLabel"></span>
|
|
38
|
-
</div>`,[x.AgCheckboxSelector]),this.eDragHandle=x._createIconNoSpan("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");const t=this.cbSelect.getGui(),e=this.cbSelect.getInputElement();t.insertAdjacentElement("afterend",this.eDragHandle),e.setAttribute("tabindex","-1");const n=x._escapeString(this.displayName);this.eLabel.innerHTML=n;const o=this.columnDept;this.groupsExist&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass(`ag-column-select-indent-${o}`),this.getGui().style.setProperty("--ag-indentation-level",String(o)),this.setupDragging();const s=this.onColumnStateChanged.bind(this);this.addManagedEventListeners({columnPivotModeChanged:s}),this.addManagedListeners(this.column,{columnValueChanged:s,columnPivotChanged:s,columnRowGroupChanged:s,visibleChanged:s}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip(),x._getToolPanelClassesFromColDef(this.column.getColDef(),this.gos,this.column,null).forEach(c=>this.addOrRemoveCssClass(c,!0))}getColumn(){return this.column}setupTooltip(){const t=this.gos.get("tooltipShowMode")==="whenTruncated";let e;t&&(e=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);const n=()=>{const o=this.column.getColDef().headerTooltip;this.setTooltip({newTooltipText:o,location:"columnToolPanelColumn",shouldDisplayTooltip:e})};n(),this.addManagedEventListeners({newColumnsLoaded:n})}getTooltipParams(){const t=super.getTooltipParams();return t.location="columnToolPanelColumn",t.colDef=this.column.getColDef(),t}onContextMenu(t){const{column:e,gos:n}=this;if(n.get("functionsReadOnly"))return;const o=this.createBean(new Jd(e,t,this.focusWrapper));this.addDestroyFunc(()=>{o.isAlive()&&this.destroyBean(o)})}handleKeyDown(t){t.key===x.KeyCode.SPACE&&(t.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))}onLabelClicked(){if(this.gos.get("functionsReadOnly"))return;const t=!this.cbSelect.getValue();this.onChangeCommon(t)}onCheckboxChanged(t){this.onChangeCommon(t.selected)}onChangeCommon(t){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),!this.processingColumnStateChange&&this.modelItemUtils.setColumn(this.column,t,"toolPanelUi"))}refreshAriaLabel(){const t=this.localeService.getLocaleTextFunc(),e=t("ariaColumn","Column"),n=this.cbSelect.getValue()?t("ariaVisible","visible"):t("ariaHidden","hidden"),o=t("ariaToggleVisibility","Press SPACE to toggle visibility");x._setAriaLabel(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${o} (${n})`),x._setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)}setupDragging(){if(!this.allowDragging){x._setDisplayed(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns");const e={type:x.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>t?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{t=!this.gos.get("suppressDragLeaveHidesColumns"),this.eventService.dispatchEvent({type:"columnPanelItemDragStart",column:this.column})},onDragStopped:()=>{this.eventService.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:n=>{t&&this.modelItemUtils.updateColumns({columns:[this.column],visibleState:n==null?void 0:n.visibleState,pivotState:n==null?void 0:n.pivotState,eventType:"toolPanelUi"})},onGridExit:()=>{t&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(e,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(e))}createDragItem(){const t=this.column.getColId(),e={[t]:this.column.isVisible()},n={[t]:this.modelItemUtils.createPivotState(this.column)};return{columns:[this.column],visibleState:e,pivotState:n}}onColumnStateChanged(){this.processingColumnStateChange=!0;const t=this.columnModel.isPivotMode();if(t){const o=this.column.isAnyFunctionActive();this.cbSelect.setValue(o)}else this.cbSelect.setValue(this.column.isVisible());let e=!0,n=!0;if(t){const o=this.gos.get("functionsReadOnly"),s=!this.column.isAnyFunctionAllowed();e=!o&&!s,n=e}else{const{enableRowGroup:o,enableValue:s,lockPosition:l,suppressMovable:c,lockVisible:u}=this.column.getColDef(),p=!!o||!!s,f=!!l||!!c;e=!u,n=p||!f}this.cbSelect.setReadOnly(!e),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!n),this.addOrRemoveCssClass("ag-column-select-column-readonly",!n&&!e),this.cbSelect.setPassive(!1),this.processingColumnStateChange=!1}getDisplayName(){return this.displayName}onSelectAllChanged(t){t!==this.cbSelect.getValue()&&(this.cbSelect.isReadOnly()||this.cbSelect.toggle())}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}isExpandable(){return!1}setExpanded(t){x._warnOnce("can not expand a column item that does not represent a column group header")}},__=class{constructor(t){this.items=t}getRowCount(){return this.items.length}getRow(t){return this.items[t]}},v_="ag-column-select-list",C_=class extends x.Component{constructor(){super(`<div class="${v_}" role="presentation"></div>`),this.destroyColumnItemFuncs=[],this.hasLoadedInitialState=!1,this.isInitialState=!1}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.colDefService=t.toolPanelColDefService,this.modelItemUtils=t.modelItemUtils}destroy(){this.destroyColumnTree(),super.destroy()}destroyColumnTree(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach(t=>t()),this.destroyColumnItemFuncs=[]}init(t,e,n){this.params=t,this.allowDragging=e,this.eventType=n,this.params.suppressSyncLayoutWithGrid||this.addManagedEventListeners({columnMoved:this.onColumnsChanged.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.onColumnsChanged.bind(this)});const o=this.fireSelectionChangedEvent.bind(this);this.addManagedEventListeners({columnPivotChanged:o,columnPivotModeChanged:o,columnRowGroupChanged:o,columnValueChanged:o,columnVisible:o,newColumnsLoaded:o}),this.expandGroupsByDefault=!this.params.contractColumnSelection,this.virtualList=this.createManagedBean(new Ie.VirtualList({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator((s,l)=>(x._setAriaLevel(l,s.getDept()+1),this.createComponentFromItem(s,l))),this.columnModel.isReady()&&this.onColumnsChanged(),!this.params.suppressColumnMove&&this.createManagedBean(new g_(this,this.virtualList))}createComponentFromItem(t,e){if(t.isGroup()){const o=new Xd(t,this.allowDragging,this.eventType,e);return this.createBean(o),o}const n=new y_(t,this.allowDragging,this.groupsExist,e);return this.createBean(n),n}onColumnsChanged(){this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);const t=this.getExpandedStates(),e=this.columnModel.isPivotMode();!this.params.suppressSyncLayoutWithGrid&&!e?this.buildTreeFromWhatGridIsDisplaying():this.buildTreeFromProvidedColumnDefs(),this.setExpandedStates(t),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1}getDisplayedColsList(){return this.displayedColsList}getExpandedStates(){const t={};if(this.isInitialState){const{expandedGroupIds:e}=this.params.initialState;return e.forEach(n=>{t[n]=!0}),t}return this.allColsTree?(this.forEachItem(e=>{if(!e.isGroup())return;const n=e.getColumnGroup();n&&(t[n.getId()]=e.isExpanded())}),t):{}}setExpandedStates(t){if(!this.allColsTree)return;const{isInitialState:e}=this;this.forEachItem(n=>{if(!n.isGroup())return;const o=n.getColumnGroup();if(o){const s=t[o.getId()];(s!=null||e)&&n.setExpanded(!!s)}})}buildTreeFromWhatGridIsDisplaying(){this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this))}setColumnLayout(t){const e=this.colDefService.createColumnTree(t);this.buildListModel(e),this.groupsExist=t.some(n=>n&&typeof n.children<"u"),this.markFilteredColumns(),this.flattenAndFilterModel()}buildTreeFromProvidedColumnDefs(){this.buildListModel(this.columnModel.getColDefColTree()),this.groupsExist=this.columnModel.isProvidedColGroupsPresent()}buildListModel(t){const e=this.onColumnExpanded.bind(this),n=c=>{c.addEventListener("expandedChanged",e);const u=c.removeEventListener.bind(c,"expandedChanged",e);this.destroyColumnItemFuncs.push(u)},o=(c,u,p)=>{c.forEach(f=>{x.isProvidedColumnGroup(f)?s(f,u,p):l(f,u,p)})},s=(c,u,p)=>{const f=c.getColGroupDef();if(f&&f.suppressColumnsToolPanel)return;if(c.isPadding()){o(c.getChildren(),u,p);return}const y=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,c,"columnToolPanel"),B=new Yd(y,c,u,!0,this.expandGroupsByDefault);p.push(B),n(B),o(c.getChildren(),u+1,B.getChildren())},l=(c,u,p)=>{if(c.getColDef()&&c.getColDef().suppressColumnsToolPanel)return;const m=this.columnNameService.getDisplayNameForColumn(c,"columnToolPanel");p.push(new Yd(m,c,u))};this.destroyColumnTree(),o(t,0,this.allColsTree)}onColumnExpanded(){this.flattenAndFilterModel()}flattenAndFilterModel(){this.displayedColsList=[];const t=n=>{n.isPassesFilter()&&(this.displayedColsList.push(n),n.isGroup()&&n.isExpanded()&&n.getChildren().forEach(t))};this.allColsTree.forEach(t),this.virtualList.setModel(new __(this.displayedColsList));const e=this.virtualList.getLastFocusedRow();this.virtualList.refresh(),e!=null&&this.focusRowIfAlive(e),this.notifyListeners(),this.refreshAriaLabel()}refreshAriaLabel(){const t=this.localeService.getLocaleTextFunc(),e=t("ariaColumnPanelList","Column List"),n=t("columns","Columns"),o=this.displayedColsList.length;x._setAriaLabel(this.virtualList.getAriaElement(),`${e} ${o} ${n}`)}focusRowIfAlive(t){window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(t)},0)}forEachItem(t){const e=n=>{n.forEach(o=>{t(o),o.isGroup()&&e(o.getChildren())})};this.allColsTree&&e(this.allColsTree)}doSetExpandedAll(t){this.forEachItem(e=>{e.isGroup()&&e.setExpanded(t)})}setGroupsExpanded(t,e){if(!e){this.doSetExpandedAll(t);return}const n=[];this.forEachItem(s=>{if(!s.isGroup())return;const l=s.getColumnGroup().getId();e.indexOf(l)>=0&&(s.setExpanded(t),n.push(l))});const o=e.filter(s=>!x._includes(n,s));o.length>0&&x._warnOnce("unable to find group(s) for supplied groupIds:",o)}getExpandState(){let t=0,e=0;return this.forEachItem(n=>{n.isGroup()&&(n.isExpanded()?t++:e++)}),t>0&&e>0?2:e>0?1:0}doSetSelectedAll(t){this.modelItemUtils.selectAllChildren(this.allColsTree,t,this.eventType)}getSelectionState(){let t=0,e=0;const n=this.columnModel.isPivotMode();if(this.forEachItem(o=>{if(o.isGroup()||!o.isPassesFilter())return;const s=o.getColumn(),l=s.getColDef();let c;if(n){if(!s.isAllowPivot()&&!s.isAllowRowGroup()&&!s.isAllowValue())return;c=s.isValueActive()||s.isPivotActive()||s.isRowGroupActive()}else{if(l.lockVisible)return;c=s.isVisible()}c?t++:e++}),!(t>0&&e>0))return!(t===0||e>0)}setFilterText(t){this.filterText=x._exists(t)?t.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){const t=n=>{if(!x._exists(this.filterText))return!0;const o=n.getDisplayName();return o==null||o.toLowerCase().indexOf(this.filterText)!==-1},e=(n,o)=>{let s=!1;if(n.isGroup()){const c=t(n);n.getChildren().forEach(u=>{const p=e(u,c||o);p&&(s=p)})}const l=o||s?!0:t(n);return n.setPassesFilter(l),l};this.allColsTree.forEach(n=>e(n,!1))}notifyListeners(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()}fireGroupExpandedEvent(){const t=this.getExpandState();this.dispatchLocalEvent({type:"groupExpanded",state:t})}fireSelectionChangedEvent(){if(!this.allColsTree)return;const t=this.getSelectionState();this.dispatchLocalEvent({type:"selectionChanged",state:t})}getExpandedGroups(){const t=[];return this.allColsTree&&this.forEachItem(e=>{e.isGroup()&&e.isExpanded()&&t.push(e.getColumnGroup().getId())}),t}},w_={selector:"AG-PRIMARY-COLS-LIST",component:C_},b_=class extends x.Component{constructor(){super(`<div class="ag-column-select">
|
|
38
|
+
</div>`,[x.AgCheckboxSelector]),this.eDragHandle=x._createIconNoSpan("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");const t=this.cbSelect.getGui(),e=this.cbSelect.getInputElement();t.insertAdjacentElement("afterend",this.eDragHandle),e.setAttribute("tabindex","-1");const n=x._escapeString(this.displayName);this.eLabel.innerHTML=n;const o=this.columnDept;this.groupsExist&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass(`ag-column-select-indent-${o}`),this.getGui().style.setProperty("--ag-indentation-level",String(o)),this.setupDragging();const s=this.onColumnStateChanged.bind(this);this.addManagedEventListeners({columnPivotModeChanged:s}),this.addManagedListeners(this.column,{columnValueChanged:s,columnPivotChanged:s,columnRowGroupChanged:s,visibleChanged:s}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip(),x._getToolPanelClassesFromColDef(this.column.getColDef(),this.gos,this.column,null).forEach(c=>this.addOrRemoveCssClass(c,!0))}getColumn(){return this.column}setupTooltip(){const t=this.gos.get("tooltipShowMode")==="whenTruncated";let e;t&&(e=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);const n=()=>{const o=this.column.getColDef().headerTooltip;this.setTooltip({newTooltipText:o,location:"columnToolPanelColumn",shouldDisplayTooltip:e})};n(),this.addManagedEventListeners({newColumnsLoaded:n})}getTooltipParams(){const t=super.getTooltipParams();return t.location="columnToolPanelColumn",t.colDef=this.column.getColDef(),t}onContextMenu(t){const{column:e,gos:n}=this;if(n.get("functionsReadOnly"))return;const o=this.createBean(new eu(e,t,this.focusWrapper));this.addDestroyFunc(()=>{o.isAlive()&&this.destroyBean(o)})}handleKeyDown(t){t.key===x.KeyCode.SPACE&&(t.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))}onLabelClicked(){if(this.gos.get("functionsReadOnly"))return;const t=!this.cbSelect.getValue();this.onChangeCommon(t)}onCheckboxChanged(t){this.onChangeCommon(t.selected)}onChangeCommon(t){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),!this.processingColumnStateChange&&this.modelItemUtils.setColumn(this.column,t,"toolPanelUi"))}refreshAriaLabel(){const t=this.localeService.getLocaleTextFunc(),e=t("ariaColumn","Column"),n=this.cbSelect.getValue()?t("ariaVisible","visible"):t("ariaHidden","hidden"),o=t("ariaToggleVisibility","Press SPACE to toggle visibility");x._setAriaLabel(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${o} (${n})`),x._setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)}setupDragging(){if(!this.allowDragging){x._setDisplayed(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns");const e={type:x.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>t?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{t=!this.gos.get("suppressDragLeaveHidesColumns"),this.eventService.dispatchEvent({type:"columnPanelItemDragStart",column:this.column})},onDragStopped:()=>{this.eventService.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:n=>{t&&this.modelItemUtils.updateColumns({columns:[this.column],visibleState:n==null?void 0:n.visibleState,pivotState:n==null?void 0:n.pivotState,eventType:"toolPanelUi"})},onGridExit:()=>{t&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(e,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(e))}createDragItem(){const t=this.column.getColId(),e={[t]:this.column.isVisible()},n={[t]:this.modelItemUtils.createPivotState(this.column)};return{columns:[this.column],visibleState:e,pivotState:n}}onColumnStateChanged(){this.processingColumnStateChange=!0;const t=this.columnModel.isPivotMode();if(t){const o=this.column.isAnyFunctionActive();this.cbSelect.setValue(o)}else this.cbSelect.setValue(this.column.isVisible());let e=!0,n=!0;if(t){const o=this.gos.get("functionsReadOnly"),s=!this.column.isAnyFunctionAllowed();e=!o&&!s,n=e}else{const{enableRowGroup:o,enableValue:s,lockPosition:l,suppressMovable:c,lockVisible:u}=this.column.getColDef(),p=!!o||!!s,f=!!l||!!c;e=!u,n=p||!f}this.cbSelect.setReadOnly(!e),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!n),this.addOrRemoveCssClass("ag-column-select-column-readonly",!n&&!e),this.cbSelect.setPassive(!1),this.processingColumnStateChange=!1}getDisplayName(){return this.displayName}onSelectAllChanged(t){t!==this.cbSelect.getValue()&&(this.cbSelect.isReadOnly()||this.cbSelect.toggle())}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}isExpandable(){return!1}setExpanded(t){x._warnOnce("can not expand a column item that does not represent a column group header")}},k_=class{constructor(t){this.items=t}getRowCount(){return this.items.length}getRow(t){return this.items[t]}},S_="ag-column-select-list",E_=class extends x.Component{constructor(){super(`<div class="${S_}" role="presentation"></div>`),this.destroyColumnItemFuncs=[],this.hasLoadedInitialState=!1,this.isInitialState=!1}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.colDefService=t.toolPanelColDefService,this.modelItemUtils=t.modelItemUtils}destroy(){this.destroyColumnTree(),super.destroy()}destroyColumnTree(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach(t=>t()),this.destroyColumnItemFuncs=[]}init(t,e,n){this.params=t,this.allowDragging=e,this.eventType=n,this.params.suppressSyncLayoutWithGrid||this.addManagedEventListeners({columnMoved:this.onColumnsChanged.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.onColumnsChanged.bind(this)});const o=this.fireSelectionChangedEvent.bind(this);this.addManagedEventListeners({columnPivotChanged:o,columnPivotModeChanged:o,columnRowGroupChanged:o,columnValueChanged:o,columnVisible:o,newColumnsLoaded:o}),this.expandGroupsByDefault=!this.params.contractColumnSelection,this.virtualList=this.createManagedBean(new Ie.VirtualList({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator((s,l)=>(x._setAriaLevel(l,s.getDept()+1),this.createComponentFromItem(s,l))),this.columnModel.isReady()&&this.onColumnsChanged(),!this.params.suppressColumnMove&&this.createManagedBean(new b_(this,this.virtualList))}createComponentFromItem(t,e){if(t.isGroup()){const o=new tu(t,this.allowDragging,this.eventType,e);return this.createBean(o),o}const n=new x_(t,this.allowDragging,this.groupsExist,e);return this.createBean(n),n}onColumnsChanged(){this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);const t=this.getExpandedStates(),e=this.columnModel.isPivotMode();!this.params.suppressSyncLayoutWithGrid&&!e?this.buildTreeFromWhatGridIsDisplaying():this.buildTreeFromProvidedColumnDefs(),this.setExpandedStates(t),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1}getDisplayedColsList(){return this.displayedColsList}getExpandedStates(){const t={};if(this.isInitialState){const{expandedGroupIds:e}=this.params.initialState;return e.forEach(n=>{t[n]=!0}),t}return this.allColsTree?(this.forEachItem(e=>{if(!e.isGroup())return;const n=e.getColumnGroup();n&&(t[n.getId()]=e.isExpanded())}),t):{}}setExpandedStates(t){if(!this.allColsTree)return;const{isInitialState:e}=this;this.forEachItem(n=>{if(!n.isGroup())return;const o=n.getColumnGroup();if(o){const s=t[o.getId()];(s!=null||e)&&n.setExpanded(!!s)}})}buildTreeFromWhatGridIsDisplaying(){this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this))}setColumnLayout(t){const e=this.colDefService.createColumnTree(t);this.buildListModel(e),this.groupsExist=t.some(n=>n&&typeof n.children<"u"),this.markFilteredColumns(),this.flattenAndFilterModel()}buildTreeFromProvidedColumnDefs(){this.buildListModel(this.columnModel.getColDefColTree()),this.groupsExist=this.columnModel.isProvidedColGroupsPresent()}buildListModel(t){const e=this.onColumnExpanded.bind(this),n=c=>{c.addEventListener("expandedChanged",e);const u=c.removeEventListener.bind(c,"expandedChanged",e);this.destroyColumnItemFuncs.push(u)},o=(c,u,p)=>{c.forEach(f=>{x.isProvidedColumnGroup(f)?s(f,u,p):l(f,u,p)})},s=(c,u,p)=>{const f=c.getColGroupDef();if(f&&f.suppressColumnsToolPanel)return;if(c.isPadding()){o(c.getChildren(),u,p);return}const y=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,c,"columnToolPanel"),T=new Qd(y,c,u,!0,this.expandGroupsByDefault);p.push(T),n(T),o(c.getChildren(),u+1,T.getChildren())},l=(c,u,p)=>{if(c.getColDef()&&c.getColDef().suppressColumnsToolPanel)return;const m=this.columnNameService.getDisplayNameForColumn(c,"columnToolPanel");p.push(new Qd(m,c,u))};this.destroyColumnTree(),o(t,0,this.allColsTree)}onColumnExpanded(){this.flattenAndFilterModel()}flattenAndFilterModel(){this.displayedColsList=[];const t=n=>{n.isPassesFilter()&&(this.displayedColsList.push(n),n.isGroup()&&n.isExpanded()&&n.getChildren().forEach(t))};this.allColsTree.forEach(t),this.virtualList.setModel(new k_(this.displayedColsList));const e=this.virtualList.getLastFocusedRow();this.virtualList.refresh(),e!=null&&this.focusRowIfAlive(e),this.notifyListeners(),this.refreshAriaLabel()}refreshAriaLabel(){const t=this.localeService.getLocaleTextFunc(),e=t("ariaColumnPanelList","Column List"),n=t("columns","Columns"),o=this.displayedColsList.length;x._setAriaLabel(this.virtualList.getAriaElement(),`${e} ${o} ${n}`)}focusRowIfAlive(t){window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(t)},0)}forEachItem(t){const e=n=>{n.forEach(o=>{t(o),o.isGroup()&&e(o.getChildren())})};this.allColsTree&&e(this.allColsTree)}doSetExpandedAll(t){this.forEachItem(e=>{e.isGroup()&&e.setExpanded(t)})}setGroupsExpanded(t,e){if(!e){this.doSetExpandedAll(t);return}const n=[];this.forEachItem(s=>{if(!s.isGroup())return;const l=s.getColumnGroup().getId();e.indexOf(l)>=0&&(s.setExpanded(t),n.push(l))});const o=e.filter(s=>!x._includes(n,s));o.length>0&&x._warnOnce("unable to find group(s) for supplied groupIds:",o)}getExpandState(){let t=0,e=0;return this.forEachItem(n=>{n.isGroup()&&(n.isExpanded()?t++:e++)}),t>0&&e>0?2:e>0?1:0}doSetSelectedAll(t){this.modelItemUtils.selectAllChildren(this.allColsTree,t,this.eventType)}getSelectionState(){let t=0,e=0;const n=this.columnModel.isPivotMode();if(this.forEachItem(o=>{if(o.isGroup()||!o.isPassesFilter())return;const s=o.getColumn(),l=s.getColDef();let c;if(n){if(!s.isAllowPivot()&&!s.isAllowRowGroup()&&!s.isAllowValue())return;c=s.isValueActive()||s.isPivotActive()||s.isRowGroupActive()}else{if(l.lockVisible)return;c=s.isVisible()}c?t++:e++}),!(t>0&&e>0))return!(t===0||e>0)}setFilterText(t){this.filterText=x._exists(t)?t.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){const t=n=>{if(!x._exists(this.filterText))return!0;const o=n.getDisplayName();return o==null||o.toLowerCase().indexOf(this.filterText)!==-1},e=(n,o)=>{let s=!1;if(n.isGroup()){const c=t(n);n.getChildren().forEach(u=>{const p=e(u,c||o);p&&(s=p)})}const l=o||s?!0:t(n);return n.setPassesFilter(l),l};this.allColsTree.forEach(n=>e(n,!1))}notifyListeners(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()}fireGroupExpandedEvent(){const t=this.getExpandState();this.dispatchLocalEvent({type:"groupExpanded",state:t})}fireSelectionChangedEvent(){if(!this.allColsTree)return;const t=this.getSelectionState();this.dispatchLocalEvent({type:"selectionChanged",state:t})}getExpandedGroups(){const t=[];return this.allColsTree&&this.forEachItem(e=>{e.isGroup()&&e.isExpanded()&&t.push(e.getColumnGroup().getId())}),t}},T_={selector:"AG-PRIMARY-COLS-LIST",component:E_},B_=class extends x.Component{constructor(){super(`<div class="ag-column-select">
|
|
39
39
|
<ag-primary-cols-header data-ref="primaryColsHeaderPanel"></ag-primary-cols-header>
|
|
40
40
|
<ag-primary-cols-list data-ref="primaryColsListPanel"></ag-primary-cols-list>
|
|
41
|
-
</div>`,[
|
|
41
|
+
</div>`,[w_,T_]),this.primaryColsHeaderPanel=x.RefPlaceholder,this.primaryColsListPanel=x.RefPlaceholder}init(t,e,n){this.allowDragging=t,this.params=e,this.eventType=n,this.primaryColsHeaderPanel.init(this.params);const o=this.params.suppressColumnFilter,s=this.params.suppressColumnSelectAll;this.params.suppressColumnExpandAll&&o&&s&&this.primaryColsHeaderPanel.setDisplayed(!1),this.addManagedListeners(this.primaryColsListPanel,{groupExpanded:this.onGroupExpanded.bind(this),selectionChanged:this.onSelectionChange.bind(this)}),this.primaryColsListPanel.init(this.params,this.allowDragging,this.eventType),this.addManagedListeners(this.primaryColsHeaderPanel,{expandAll:this.onExpandAll.bind(this),collapseAll:this.onCollapseAll.bind(this),selectAll:this.onSelectAll.bind(this),unselectAll:this.onUnselectAll.bind(this),filterChanged:this.onFilterChanged.bind(this)}),this.positionableFeature=new x.PositionableFeature(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature)}toggleResizable(t){this.positionableFeature.setResizable(t?{bottom:!0}:!1)}onExpandAll(){this.primaryColsListPanel.doSetExpandedAll(!0)}onCollapseAll(){this.primaryColsListPanel.doSetExpandedAll(!1)}expandGroups(t){this.primaryColsListPanel.setGroupsExpanded(!0,t)}collapseGroups(t){this.primaryColsListPanel.setGroupsExpanded(!1,t)}setColumnLayout(t){this.primaryColsListPanel.setColumnLayout(t)}onFilterChanged(t){this.primaryColsListPanel.setFilterText(t.filterText)}syncLayoutWithGrid(){this.primaryColsListPanel.onColumnsChanged()}onSelectAll(){this.primaryColsListPanel.doSetSelectedAll(!0)}onUnselectAll(){this.primaryColsListPanel.doSetSelectedAll(!1)}onGroupExpanded(t){this.primaryColsHeaderPanel.setExpandState(t.state),this.params.onStateUpdated()}onSelectionChange(t){this.primaryColsHeaderPanel.setSelectionState(t.state)}getExpandedGroups(){return this.primaryColsListPanel.getExpandedGroups()}},nu=class extends x.Component{constructor(){super(...arguments),this.cbPivotMode=x.RefPlaceholder}wireBeans(t){this.columnModel=t.columnModel,this.ctrlsService=t.ctrlsService}createTemplate(){return`<div class="ag-pivot-mode-panel">
|
|
42
42
|
<ag-toggle-button data-ref="cbPivotMode" class="ag-pivot-mode-select"></ag-toggle-button>
|
|
43
|
-
</div>`}postConstruct(){this.setTemplate(this.createTemplate(),[x.AgToggleButtonSelector]),this.cbPivotMode.setValue(this.columnModel.isPivotMode());const t=this.localeService.getLocaleTextFunc();this.cbPivotMode.setLabel(t("pivotMode","Pivot Mode")),this.addManagedListeners(this.cbPivotMode,{fieldValueChanged:this.onBtPivotMode.bind(this)});const e=this.onPivotModeChanged.bind(this);this.addManagedEventListeners({newColumnsLoaded:e,columnPivotModeChanged:e})}onBtPivotMode(){const t=!!this.cbPivotMode.getValue();t!==this.columnModel.isPivotMode()&&(this.gos.updateGridOptions({options:{pivotMode:t},source:"toolPanelUi"}),this.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh()))}onPivotModeChanged(){const t=this.columnModel.isPivotMode();this.cbPivotMode.setValue(t)}},
|
|
43
|
+
</div>`}postConstruct(){this.setTemplate(this.createTemplate(),[x.AgToggleButtonSelector]),this.cbPivotMode.setValue(this.columnModel.isPivotMode());const t=this.localeService.getLocaleTextFunc();this.cbPivotMode.setLabel(t("pivotMode","Pivot Mode")),this.addManagedListeners(this.cbPivotMode,{fieldValueChanged:this.onBtPivotMode.bind(this)});const e=this.onPivotModeChanged.bind(this);this.addManagedEventListeners({newColumnsLoaded:e,columnPivotModeChanged:e})}onBtPivotMode(){const t=!!this.cbPivotMode.getValue();t!==this.columnModel.isPivotMode()&&(this.gos.updateGridOptions({options:{pivotMode:t},source:"toolPanelUi"}),this.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh()))}onPivotModeChanged(){const t=this.columnModel.isPivotMode();this.cbPivotMode.setValue(t)}},V_=class extends x.Component{constructor(){super('<div class="ag-column-panel"></div>'),this.initialised=!1,this.childDestroyFuncs=[]}setVisible(t){super.setDisplayed(t),t&&!this.initialised&&this.init(this.params)}init(t){const e=this.gos.addGridCommonParams({suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1});if(this.params={...e,...t},this.isRowGroupingModuleLoaded()&&!this.params.suppressPivotMode&&(this.pivotModePanel=this.createBean(new nu),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel)),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new B_),this.childDestroyFuncs.push(()=>this.destroyBean(this.primaryColsPanel)),this.primaryColsPanel.init(!0,this.params,"toolPanelUi"),this.primaryColsPanel.addCssClass("ag-column-panel-column-select"),this.appendChild(this.primaryColsPanel),this.isRowGroupingModuleLoaded()){this.params.suppressRowGroups||(this.rowGroupDropZonePanel=this.createBean(new el(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.rowGroupDropZonePanel)),this.appendChild(this.rowGroupDropZonePanel)),this.params.suppressValues||(this.valuesDropZonePanel=this.createBean(new Jd(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.valuesDropZonePanel)),this.appendChild(this.valuesDropZonePanel)),this.params.suppressPivots||(this.pivotDropZonePanel=this.createBean(new Qa(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotDropZonePanel)),this.appendChild(this.pivotDropZonePanel)),this.setLastVisible();const[n]=this.addManagedEventListeners({columnPivotModeChanged:()=>{this.resetChildrenHeight(),this.setLastVisible()}});this.childDestroyFuncs.push(()=>n())}this.initialised=!0}setPivotModeSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.pivotModePanel?this.pivotModePanel.setDisplayed(t):t&&(this.pivotModePanel=this.createBean(new nu),this.getGui().insertBefore(this.pivotModePanel.getGui(),this.getGui().firstChild),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel))),this.setLastVisible())}setRowGroupsSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.rowGroupDropZonePanel?this.rowGroupDropZonePanel.setDisplayed(t):t&&(this.rowGroupDropZonePanel=this.createManagedBean(new el(!1)),this.appendChild(this.rowGroupDropZonePanel)),this.setLastVisible())}setValuesSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.valuesDropZonePanel?this.valuesDropZonePanel.setDisplayed(t):t&&(this.valuesDropZonePanel=this.createManagedBean(new Jd(!1)),this.appendChild(this.valuesDropZonePanel)),this.setLastVisible())}setPivotSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.pivotDropZonePanel?this.pivotDropZonePanel.setDisplayed(t):t&&(this.pivotDropZonePanel=this.createManagedBean(new Qa(!1)),this.appendChild(this.pivotDropZonePanel),this.pivotDropZonePanel.setDisplayed(t)),this.setLastVisible())}setResizers(){[this.primaryColsPanel,this.rowGroupDropZonePanel,this.valuesDropZonePanel,this.pivotDropZonePanel].forEach(t=>{if(!t)return;const e=t.getGui();t.toggleResizable(!e.classList.contains("ag-last-column-drop")&&!e.classList.contains("ag-hidden"))})}setLastVisible(){const t=this.getGui();Array.prototype.slice.call(t.querySelectorAll(".ag-column-drop")).forEach(s=>s.classList.remove("ag-last-column-drop"));const n=t.querySelectorAll(".ag-column-drop:not(.ag-hidden)"),o=x._last(n);o&&o.classList.add("ag-last-column-drop"),this.setResizers()}resetChildrenHeight(){const e=this.getGui().children;for(let n=0;n<e.length;n++){const o=e[n];o.style.removeProperty("height"),o.style.removeProperty("flex")}}isRowGroupingModuleLoaded(){return this.gos.assertModuleRegistered(x.ModuleNames.RowGroupingModule,"Row Grouping")}expandColumnGroups(t){this.primaryColsPanel.expandGroups(t)}collapseColumnGroups(t){this.primaryColsPanel.collapseGroups(t)}setColumnLayout(t){this.primaryColsPanel.setColumnLayout(t)}syncLayoutWithGrid(){this.primaryColsPanel.syncLayoutWithGrid()}destroyChildren(){this.childDestroyFuncs.forEach(t=>t()),this.childDestroyFuncs.length=0,x._clearElement(this.getGui())}refresh(t){return this.destroyChildren(),this.init(t),!0}getState(){return{expandedGroupIds:this.primaryColsPanel.getExpandedGroups()}}destroy(){this.destroyChildren(),super.destroy()}},N_=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="modelItemUtils"}wireBeans(t){this.aggFuncService=t.aggFuncService,this.columnModel=t.columnModel,this.columnApplyStateService=t.columnApplyStateService}selectAllChildren(t,e,n){const o=this.extractAllLeafColumns(t);this.setAllColumns(o,e,n)}setColumn(t,e,n){this.setAllColumns([t],e,n)}setAllColumns(t,e,n){this.columnModel.isPivotMode()?this.setAllPivot(t,e,n):this.setAllVisible(t,e,n)}extractAllLeafColumns(t){const e=[],n=o=>{o.forEach(s=>{s.isPassesFilter()&&(s.isGroup()?n(s.getChildren()):e.push(s.getColumn()))})};return n(t),e}setAllVisible(t,e,n){const o=[];t.forEach(s=>{s.getColDef().lockVisible||s.isVisible()!=e&&o.push({colId:s.getId(),hide:!e})}),o.length>0&&this.columnApplyStateService.applyColumnState({state:o},n)}setAllPivot(t,e,n){this.setAllPivotActive(t,e,n)}setAllPivotActive(t,e,n){const o=[],c=e?u=>{var p;if(!u.isAnyFunctionActive())if(u.isAllowValue()){const f=typeof u.getAggFunc()=="string"?u.getAggFunc():(p=this.aggFuncService)==null?void 0:p.getDefaultAggFunc(u);o.push({colId:u.getId(),aggFunc:f})}else u.isAllowRowGroup()?o.push({colId:u.getId(),rowGroup:!0}):u.isAllowPivot()&&o.push({colId:u.getId(),pivot:!0})}:u=>{(u.isPivotActive()||u.isRowGroupActive()||u.isValueActive())&&o.push({colId:u.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};t.forEach(c),o.length>0&&this.columnApplyStateService.applyColumnState({state:o},n)}updateColumns(t){const{columns:e,visibleState:n,pivotState:o,eventType:s}=t,l=e.map(c=>{const u=c.getColId();if(this.columnModel.isPivotMode()){const p=o==null?void 0:o[u];return{colId:u,pivot:p==null?void 0:p.pivot,rowGroup:p==null?void 0:p.rowGroup,aggFunc:p==null?void 0:p.aggFunc}}else return{colId:u,hide:!(n!=null&&n[u])}});this.columnApplyStateService.applyColumnState({state:l},s)}createPivotState(t){return{pivot:t.isPivotActive(),rowGroup:t.isRowGroupActive(),aggFunc:t.isValueActive()?t.getAggFunc():void 0}}},A_="32.3.3",ru=x._defineModule({version:A_,moduleName:x.ModuleNames.ColumnsToolPanelModule,beans:[N_],userComponents:[{name:"agColumnsToolPanel",classImp:V_},{name:"agMenuItem",classImp:Ie.AgMenuItemRenderer}],dependantModules:[Ie.EnterpriseCoreModule,v_,Ja]});const P_=`.ag-header {
|
|
44
44
|
border-bottom: 1px solid var(--border-color-default);
|
|
45
|
-
}`;function tu(){x.ModuleRegistry.registerModules([rs.ClientSideRowModelModule,cm.InfiniteRowModelModule,cd.ServerSideRowModelModule,dm.CsvExportModule,dd.ClipboardModule,ud.RangeSelectionModule,um.RichSelectModule,pm.MenuModule,hm.ExcelExportModule,qa,eu]);const t=Ig("AGGRID_LICENSE");t?(Ie.LicenseManager.setLicenseKey(t),console.log("AG Grid Activated")):console.log("AG Grid License not found")}const T_=pd.createPart("headerBottomBorder").withCSS(E_),nu=pd.themeQuartz.withParams({headerColumnResizeHandleColor:"transparent",accentColor:"#49cc49",borderColor:"#E1E3EB",cellHorizontalPaddingScale:1,checkboxBorderRadius:"3px",checkboxCheckedBackgroundColor:"#110529",checkboxCheckedBorderColor:"#110529",checkboxIndeterminateBackgroundColor:"#110529",checkboxIndeterminateBorderColor:"#110529",checkboxUncheckedBorderColor:"#CFD1DB",columnBorder:!0,columnHoverColor:"#9BABCC16",fontFamily:"inherit",foregroundColor:"#110529",headerBackgroundColor:"#F7F8FA",headerColumnBorder:!0,headerFontWeight:600,headerRowBorder:!0,headerVerticalPaddingScale:.8,iconButtonHoverColor:"#9BABCC32",iconSize:"16px",menuBackgroundColor:"#FFFFFF",menuBorder:!0,menuTextColor:"#110529",rowHoverColor:"#9BABCC16",rowVerticalPaddingScale:1,selectedRowBackgroundColor:"#63E02424",sidePanelBorder:!1,spacing:"8px",tooltipBackgroundColor:"#110529",tooltipTextColor:"#FFFFFF",wrapperBorderRadius:"6px"}).withPart(T_),ru=Symbol("sdk-vue");function el(){return r.inject(ru)}function B_(t,e,n={}){let o;tu();const s=()=>{t.loadBlockState().then(c=>{l.loaded=!0;const u=Bm(c,t,n),p=e(u),f=Object.fromEntries(Object.entries(p.routes).map(([m,y])=>{const B=typeof y=="function"?y():y;return[m,r.markRaw(B)]}));o=Object.assign(u,{...p,getRoute(m){return f[m]}})}).catch(c=>{console.error("load initial state error",c),l.error=c})},l=r.reactive({loaded:!1,error:void 0,useApp(){return mm(o,"App is not loaded")},install(c){c.provide(ru,this),s()}});return l}var V_=Object.defineProperty,N_=(t,e,n)=>e in t?V_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,A_=(t,e,n)=>N_(t,e+"",n);function ou(t,e){if(t==null)throw Error("Empty (null | undefined) value");return t}function P_(t,e,n){const o=Math.min(e,n),s=Math.max(e,n);return t>=o&&t<=s}function D_(t){return new Promise(e=>setTimeout(e,t))}function F_(t){return t()}function fs(t,e,n){return e>t?e:t>n?n:t}function iu(t,e){return e(t)}function $r(t,e){if(t!=null)return e(t)}function R_(t){if(t&&t.ok)return t.value}async function M_(t){return Object.fromEntries(await Promise.all(Object.entries(t).map(async([e,n])=>[e,await n])))}const su=t=>t;function I_(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function L_(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(I_(65,91));return e}function au(){return L_(42)}const tl=Array.isArray;function di(t){return t!==null&&typeof t=="object"}function nl(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null}function O_(t,e){return Object.keys(t).map(n=>e(t[n],n))}function ui(t,e){return di(t)&&di(e)?Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>ui(t[n],e[n])):t===e}function pi(t){if(Array.isArray(t)){const e=[];for(let n=0;n<t.length;n++)e[n]=pi(t[n]);return e}else if(di(t)){const e={};return Object.keys(t).forEach(n=>{e[n]=pi(t[n])}),e}else return t}function G_(t){return Array.isArray(t)?Object.assign([],t):di(t)?Object.assign({},t):t}function z_(t,e){const n={};for(const o in e)e[o]!==t[o]&&(n[o]=t[o]);return n}function $_(t){return Object.entries(t).forEach(([e,n])=>{n instanceof Function&&(t[e]=n.bind(t))}),t}function Z_(t,e,n){return t[e]=n,t}function U_(t,e){return t[e]}function W_(t,e){t={...t};const n=t[e];return delete t[e],[n,t]}function H_(t,...e){return Object.assign({},...e.map(n=>({[n]:t[n]})))}function j_(t,...e){return e.map(n=>t[n])}function q_(t,...e){const n=Object.assign({},t);return e.forEach(o=>delete n[o]),n}function lu(t,e){return new Set([...Object.keys(t),...Object.keys(e)]).forEach(n=>{const o=t[n],s=e[n];nl(o)&&nl(s)||tl(o)&&tl(s)&&o.length===s.length?lu(o,s):t[n]=s}),t}const rl=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:$_,deepClone:pi,deepEqual:ui,deepPatch:lu,getProp:U_,isArray:tl,isObject:di,isPlainObject:nl,map:O_,omit:q_,pick:H_,pickValues:j_,setProp:Z_,shallowClone:G_,shallowDiff:z_,shiftProp:W_},Symbol.toStringTag,{value:"Module"}));function K_(t,e){const n=t.findIndex(e);if(n<0)return[];const o=(()=>{for(let s=n;s<t.length;s++)if(!e(t[s],s))return s;return t.length})();return t.slice(n,o)}function Y_(t,e,n){let o;return function(...s){o&&clearTimeout(o),o=setTimeout(()=>{o=void 0,t.apply(this,s)},e)}}const J_=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],X_=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Q_=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],ev=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],cu=(t,e)=>{let n=String(t);return typeof e=="string"||Array.isArray(e)?n=t.toLocaleString(e):e===!0&&(n=t.toLocaleString(void 0)),n};function ol(t,e){if(t=typeof t=="bigint"?Number(t):t,!Number.isFinite(t))throw new TypeError(`Expected a finite number, got ${typeof t}: ${t}`);Object.assign(e,{bits:!1,binary:!1});const n=e.bits?e.binary?ev:Q_:e.binary?X_:J_;if(e.signed&&t===0)return` 0 ${n[0]}`;const o=t<0,s=o?"-":e.signed?"+":"";if(o&&(t=-t),t<1){const p=cu(t,e.locale);return s+p+" "+n[0]}const l=Math.min(Math.floor(e.binary?Math.log(t)/Math.log(1024):Math.log10(t)/3),n.length-1);t/=(e.binary?1024:1e3)**l,t=Number(t.toPrecision(3));const c=cu(Number(t),e.locale),u=n[l];return s+c+" "+u}const tv={class:"context-menu"},nv=["onClick"],rv=r.defineComponent({__name:"Menu",props:{options:{}},emits:["close"],setup(t,{emit:e}){const n=e,o=s=>{s.cb(),n("close")};return(s,l)=>(r.openBlock(),r.createElementBlock("div",tv,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.options,(c,u)=>(r.openBlock(),r.createElementBlock("div",{key:u,onClick:r.withModifiers(p=>o(c),["stop"])},[r.createElementVNode("span",null,r.toDisplayString(c.text),1)],8,nv))),128))]))}}),Kt=(t,e)=>{const n=t.__vccOpts||t;for(const[o,s]of e)n[o]=s;return n},ov=Kt(rv,[["__scopeId","data-v-12530966"]]);function il(t,e){t.preventDefault();const n=()=>{r.render(null,document.body)},o=r.h(ov,{options:e,onClose:()=>{n()}});r.render(o,document.body);const s=o.el;return s.style.top=t.clientY+"px",s.style.left=t.clientX+"px",document.addEventListener("click",l=>{s.contains(l.target)||n()}),n}const du=Symbol(),ms=()=>r.inject(du),iv=["value"],sv={key:1},av=r.defineComponent({__name:"BaseCellComponent",props:{modelValue:{},valueType:{},editable:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,s=r.reactive({edit:!1}),l=r.computed(()=>o.valueType),c=f=>{var m;let y=(m=f.target)==null?void 0:m.value;const B=r.unref(l),T=F_(()=>B==="integer"?parseInt(y,10):B==="float"?Number(y):y);n("update:modelValue",T),s.edit=!1},u=r.ref(),p=f=>{!f.metaKey&&o.editable&&(s.edit=!0,requestAnimationFrame(()=>{var m,y;(y=(m=u.value)==null?void 0:m.querySelector("input"))==null||y.focus()}))};return(f,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"baseRef",ref:u,class:r.normalizeClass(["base-cell",{"base-cell__edit":s.edit}]),onClick:p},[s.edit?(r.openBlock(),r.createElementBlock("input",{key:0,value:f.modelValue,onFocusout:m[0]||(m[0]=y=>s.edit=!1),onChange:c},null,40,iv)):(r.openBlock(),r.createElementBlock("div",sv,r.toDisplayString(f.modelValue),1))],2))}}),lv=["^data-row-index"],cv={key:0,class:"control-cell"},dv=r.defineComponent({__name:"TdCell",props:{cell:{}},setup(t){const e=t,n=ms(),o=r.computed(()=>e.cell.column.valueType),s=f=>{$r(n.settings.value.onUpdatedRow,m=>{const y=e.cell.row,B={...y.dataRow,[e.cell.id]:f};m({...y,dataRow:B})})},l=f=>{f.metaKey&&n.selectRow(e.cell.row.primaryKey)},c=(f,m)=>{if(f.type==="contextmenu")f.preventDefault();else return;const y=n.settings??{},B=[],{onSelectedRows:T,onSelectedColumns:N}=y.value,M=n.data.selectedRows.has(m.primaryKey);T&&T.length&&(M?B.push({text:"Deselect row",cb(){n.data.selectedRows.delete(e.cell.row.primaryKey)}}):B.push({text:"Select row",cb(){n.selectRow(e.cell.row.primaryKey)}})),N&&N.length&&(B.push({text:"Select column",cb(){n.selectColumn(e.cell.column.id)}}),B.push({text:"Unselect column",cb(){n.unselectColumn(e.cell.column.id)}})),B.length&&il(f,B)},u=r.ref(),p=r.computed(()=>e.cell.column.component?e.cell.column.component():void 0);return(f,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"cellRef",ref:u,class:r.normalizeClass(["td-cell",{[f.cell.class]:!0}]),"^data-row-index":f.cell.row.index,onClick:l,onContextmenu:m[0]||(m[0]=y=>c(y,f.cell.row))},[f.cell.control?(r.openBlock(),r.createElementBlock("div",cv,r.toDisplayString(f.cell.row.index),1)):p.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(p.value),{key:1,"model-value":f.cell.value,"onUpdate:modelValue":s},null,8,["model-value"])):(r.openBlock(),r.createBlock(av,{key:2,"model-value":f.cell.value,"value-type":o.value,editable:f.cell.column.editable,"onUpdate:modelValue":s},null,8,["model-value","value-type","editable"]))],42,lv))}}),uv={},pv={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function hv(t,e){return r.openBlock(),r.createElementBlock("svg",pv,e[0]||(e[0]=[r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M24 41.5H9C7.61929 41.5 6.5 40.3807 6.5 39V24H9.5V38.5H24V41.5Z",fill:"#CFD1DB"},null,-1),r.createTextVNode(),r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M41.5 9C41.5 7.61929 40.3807 6.5 39 6.5H9C7.61929 6.5 6.5 7.61929 6.5 9V19.5H9.5H28.5V38.5V41.5H39C40.3807 41.5 41.5 40.3807 41.5 39V9ZM38.5 9.5V16.5H31.5V9.5H38.5ZM38.5 38.5V19.5H31.5V38.5H38.5ZM9.5 9.5V16.5H28.5V9.5H9.5Z",fill:"#CFD1DB"},null,-1)]))}const fv=Kt(uv,[["render",hv]]),mv={class:"tr-head"},gv=r.defineComponent({__name:"TrHead",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",mv,[r.renderSlot(e.$slots,"default")]))}});function yv(t,e){const n=e.indexOf(t)+1;return e[n>=e.length?0:n]}function _v(t,e){const n=t.findIndex(e);if(n<0)return[];const o=(()=>{for(let s=n;s<t.length;s++)if(!e(t[s],s))return s;return t.length})();return t.slice(n,o)}const vv=["^data-col-id"],Cv=r.defineComponent({__name:"ThCell",props:{col:{}},emits:["delete:column","expand:column","change:sort"],setup(t,{emit:e}){const n=e;function o(l){l.preventDefault();const c=[];c.length&&il(l,c)}function s(l){var c;const u=((c=l.sort)==null?void 0:c.direction)??"DESC";n("change:sort",{colId:l.id,direction:yv(u,["DESC","ASC"])})}return(l,c)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["cell th-cell",{"justify-center":l.col.justify,frozen:l.col.frozen}]),"^data-col-id":l.col.id,onContextmenu:o},[l.col.valueType?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(l.col.valueType)},null,2)):r.createCommentVNode("",!0),r.createTextVNode(" "+r.toDisplayString(l.col.label)+" ",1),l.col.sort?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(["sort",l.col.sort.direction]),onClick:c[0]||(c[0]=r.withModifiers(()=>s(l.col),["stop"]))},null,2)):r.createCommentVNode("",!0)],42,vv))}}),wv=r.defineComponent({__name:"TrBody",props:{row:{}},setup(t){const e=r.ref(),n=()=>{r.nextTick().then(()=>{$r(e.value,o=>o.scrollLeft=0)})};return(o,s)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"trRef",ref:e,class:r.normalizeClass(["tr-body",{selected:o.row.selected}]),scroll:"no",style:r.normalizeStyle(o.row.style),onScroll:n},[r.renderSlot(o.$slots,"default")],38))}}),bv=r.defineComponent({__name:"ColumnCaret",props:{column:{}},setup(t){const e=ms(),n=t,o=r.computed(()=>e.data.selectedColumns.has(n.column.id));return(s,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["column-caret",{selected:o.value,frozen:s.column.frozen}])},null,2))}});function rt(t,e,n,o){r.onMounted(()=>{var s;return(s=r.unref(t))==null?void 0:s.addEventListener(e,n,o)}),r.onUnmounted(()=>{var s;return(s=r.unref(t))==null?void 0:s.removeEventListener(e,n,o)})}function xv(t){r.onMounted(()=>window.addEventListener("mouseup",t)),r.onUnmounted(()=>window.removeEventListener("mouseup",t))}function kv(t){let e=!1;return function(...n){e?console.log("handle pressure"):(requestAnimationFrame(()=>{t(...n),e=!1}),e=!0)}}function Sv(t,e){let n;function o(l){n={...l}}xv(()=>{n=void 0,e()});const s=kv(t);return rt(window,"mousemove",l=>{n&&s({x:n.x,width:n.width,diff:l.x-n.x})}),{start:o}}const mo=1,Ev=10,Tv=30,uu=60;function pu(){const t=r.reactive({x:0,y:0});function e(n){t.x=n.pageX,t.y=n.pageY}return r.onMounted(()=>window.addEventListener("mousemove",e)),r.onUnmounted(()=>window.removeEventListener("mousemove",e)),t}function hu(t,e={}){const{delayEnter:n=0,delayLeave:o=0}=e,s=r.ref(!1);let l;const c=u=>{const p=u?n:o;l&&(clearTimeout(l),l=void 0),p?l=setTimeout(()=>s.value=u,p):s.value=u};return window&&(rt(t,"mouseenter",()=>c(!0)),rt(t,"mouseleave",()=>c(!1))),s}function Bv(t){var e;const n=$r((e=r.unref(t))==null?void 0:e.querySelectorAll(".th-cell"),o=>[...o])??[];return n.map(o=>{const{width:s,x:l}=o.getBoundingClientRect(),c=o.getAttribute("data-col-id");return su({colId:c,width:s,x:l,right:l+s})}).slice(0,n.length-1)}function Vv(t,e){const n=pu(),o=hu(e,{}),{data:s}=t,l=Sv(u=>{$r(s.resizeTh,p=>{const f=s.columns.find(m=>m.id===p.colId);f&&(f.width=fs(u.width+u.diff,Tv,1e4),t.adjustWidth())})},()=>{s.resize=!1,s.resizeTh=void 0,document.body.style.cursor=""}),c=u=>{s.resizeTh&&(s.resize=!0,l.start({x:u.x,width:s.resizeTh.width}))};return r.watchEffect(()=>{if(!o.value){document.body.style.cursor="";return}if(s.resize)return;const u=Bv(e).find(p=>Math.abs(n.x-p.right)<Ev);u?(document.body.style.cursor="col-resize",s.resizeTh=u):(s.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:c}}const Nv={key:0,class:"command-menu"},Av={key:0},Pv=["onClick"],Dv=r.defineComponent({__name:"RowsCommandMenu",setup(t){const e=ms(),n=r.computed(()=>e.getSelectedRows()),o=r.computed(()=>n.value.length>0),s=r.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedRows)??[]}),l=r.computed(()=>s.value.map(c=>({label:c.label,cb:()=>{c.cb(n.value),e.data.selectedRows.clear(),e.data.rows=[]}})));return(c,u)=>o.value?(r.openBlock(),r.createElementBlock("div",Nv,[n.value.length?(r.openBlock(),r.createElementBlock("span",Av,r.toDisplayString(n.value.length)+" rows selected",1)):r.createCommentVNode("",!0),u[0]||(u[0]=r.createTextVNode()),u[1]||(u[1]=r.createElementVNode("hr",null,null,-1)),u[2]||(u[2]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(p,f)=>(r.openBlock(),r.createElementBlock("span",{key:f,class:"command",onClick:r.withModifiers(p.cb,["stop"])},r.toDisplayString(p.label),9,Pv))),128))])):r.createCommentVNode("",!0)}}),Fv={key:0,class:"command-menu"},Rv={key:0},Mv=["onClick"],Iv=r.defineComponent({__name:"ColumnsCommandMenu",setup(t){const e=ms(),n=r.computed(()=>e.getSelectedColumns()),o=r.computed(()=>n.value.length>0),s=r.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedColumns)??[]}),l=r.computed(()=>s.value.map(c=>({label:c.label,cb:()=>{c.cb(n.value),e.data.selectedColumns.clear()}})));return(c,u)=>o.value?(r.openBlock(),r.createElementBlock("div",Fv,[n.value.length?(r.openBlock(),r.createElementBlock("span",Rv,"selected columns "+r.toDisplayString(n.value.length),1)):r.createCommentVNode("",!0),u[0]||(u[0]=r.createTextVNode()),u[1]||(u[1]=r.createElementVNode("hr",null,null,-1)),u[2]||(u[2]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(p,f)=>(r.openBlock(),r.createElementBlock("span",{key:f,class:"command",onClick:r.withModifiers(p.cb,["stop"])},r.toDisplayString(p.label),9,Mv))),128))])):r.createCommentVNode("",!0)}});function dr(t,e){const n={el:void 0,x:0,y:0},o=s=>({x:s.x,y:s.y,dx:s.x-n.x,dy:s.y-n.y});rt(document,"mousedown",s=>{s.target===r.unref(t)&&(s.stopPropagation&&s.stopPropagation(),s.preventDefault&&s.preventDefault(),n.el=r.unref(t),n.x=s.x,n.y=s.y)}),rt(document,"mouseup",s=>{n.el&&(n.el=void 0,e({...o(s),stop:!0},n))}),rt(document,"mousemove",s=>{n.el&&e(o(s),n)})}const Lv=r.defineComponent({__name:"TScroll",props:{offset:{},windowSize:{},dataSize:{}},emits:["change:offset"],setup(t,{emit:e}){const n=e,o=t,s=r.ref(),l=r.computed(()=>o.windowSize-12),c=r.computed(()=>o.windowSize<o.dataSize),u=r.computed(()=>Math.ceil(o.offset*(l.value/o.dataSize))),p=r.computed(()=>Math.ceil(l.value*l.value/o.dataSize)),f=r.computed(()=>({top:`${u.value}px`,height:`${p.value}px`}));return dr(s,(m,y)=>{const B=(u.value+m.dy)*o.dataSize/l.value;n("change:offset",B),y.x=m.x,y.y=m.y}),(m,y)=>(r.openBlock(),r.createElementBlock("div",{class:"t-scroll",style:r.normalizeStyle({height:`${m.windowSize}px`})},[r.createElementVNode("div",null,[c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"handleRef",ref:s,class:"t-scroll__handle",style:r.normalizeStyle(f.value)},null,4)):r.createCommentVNode("",!0)])],4))}});function Ov(t){return r.computed(()=>{const{data:e,settings:n}=t,{bodyWidth:o,scrollLeft:s}=e,l=[...e.columns],c=au();n.value.controlColumn&&l.unshift({id:c,label:"#",width:60,frozen:!0});let u=0;const p=l.map(m=>{const y={...m,offset:u};return u+=m.width+mo,y}),f=p.filter(m=>m.frozen);return K_(p,m=>m.frozen?!1:s<m.offset+m.width&&m.offset<o+s).concat(f).map(m=>({...m,style:{left:m.frozen?`${m.offset}px`:`${m.offset-e.scrollLeft}px`,width:`${m.width}px`},control:m.id===c}))})}function Gv(t,e){const n=r.computed(()=>e.value.reduce((o,s)=>(o[s.id]=s.justify?"justify-"+s.justify:"",o),{}));return r.computed(()=>t.rows.map(o=>{const s=n.value,{primaryKey:l,offset:c,dataRow:u,height:p}=o,f=e.value.map(m=>({id:m.id,column:m,row:o,value:u[m.id],class:s[m.id],editable:m.editable,width:m.width,style:m.style,control:m.control}));return su({style:{top:`${c-t.scrollTop}px`,height:`${o.height}px`},primaryKey:l,offset:c,height:p,cells:f,selected:t.selectedRows.has(l)})}))}const zv=async(t,e)=>{const{scrollTop:n,bodyHeight:o}=t;return await D_(0),M_({rows:e.getRows(n,o),dataWindow:t})};function $v(t){const e=r.reactive({rowIndex:-1,columns:[],pendingLoads:0,currentWindow:void 0,rows:[],resize:!1,resizeTh:void 0,dataHeight:0,bodyHeight:t.settings.height,bodyWidth:0,scrollTop:0,scrollLeft:0,selectedRows:new Set,selectedColumns:new Set});r.watch(()=>t.settings,m=>{e.columns=pi(m.columns),e.currentWindow=void 0,m.dataSource.getHeight().then(y=>{e.dataHeight=y,f.updateBodyHeight()}).catch(y=>e.error=y)},{immediate:!0});const n=r.computed(()=>t.settings),o=r.computed(()=>e.columns.reduce((m,y)=>m+y.width+mo,0)),s=r.computed(()=>iu(f.data.dataHeight-f.data.bodyHeight,m=>m>0?m:0)),l=r.computed(()=>iu(o.value-f.data.bodyWidth,m=>m>0?m:0)),c=r.computed(()=>({bodyHeight:e.bodyHeight,scrollTop:e.scrollTop,current:e.currentWindow})),u=Ov({data:e,settings:n}),p=Gv(e,u),f={data:e,settings:n,tableColumns:u,tableRows:p,adjustWidth:()=>{const m=e.columns.reduce((B,T)=>B+T.width+mo,0),y=e.bodyWidth+e.scrollLeft;if(m<y){const B=e.columns[e.columns.length-1];B.width=B.width+(y-m)}},updateOffsets(m){this.updateScrollTop(e.scrollTop+m.deltaY),this.updateScrollLeft(e.scrollLeft+m.deltaX)},getSelectedRows(){return e.rows.filter(m=>e.selectedRows.has(m.primaryKey))},getSelectedColumns(){return e.columns.filter(m=>e.selectedColumns.has(m.id))},selectRow(m){e.selectedRows.add(m)},unselectRow(m){e.selectedRows.delete(m)},selectColumn(m){e.selectedColumns.add(m)},unselectColumn(m){e.selectedColumns.delete(m)},updateScrollTop(m){e.scrollTop=fs(m,0,s.value)},updateScrollLeft(m){e.scrollLeft=fs(m,0,l.value)},updateBodyHeight(){const{height:m}=t.settings,{dataHeight:y}=e,B=m>y?y:m;e.bodyHeight=B},updateDimensions(m){this.updateBodyHeight(),f.data.bodyWidth=m.width,f.adjustWidth(),e.rows=[],e.currentWindow=void 0}};return r.watch(c,(m,y)=>{const B=m.current;(!B||m.scrollTop<B.scrollTop||m.scrollTop+m.bodyHeight>B.bodyHeight+B.scrollTop)&&(e.currentWindow={scrollTop:m.scrollTop-uu,bodyHeight:m.bodyHeight+uu*2},zv(pi(e.currentWindow),n.value.dataSource).then(({rows:T,dataWindow:N})=>{ui(e.currentWindow,N)&&(e.rows=T)}))},{deep:!0,immediate:!0}),r.provide(du,f),f}const Zv={class:"command-menu__container"},Uv={key:0,class:"table-body__no-data"},Wv={class:"carets"},sl=r.defineComponent({__name:"TableComponent",props:{settings:{}},emits:["update:data","change:sort"],setup(t,{emit:e}){const n=e,o=t,s=$v(o),l=r.computed(()=>s.data.rows.length===0),c=r.computed(()=>({height:l.value?"212px":s.data.bodyHeight+"px"}));r.watch(s.data,M=>n("update:data",M),{deep:!0}),r.watch(o,()=>m);const u=r.ref(),p=r.ref(),f=r.ref(),m=()=>{$r(f.value,M=>{s.updateDimensions(M.getBoundingClientRect())})},y=s.tableColumns,B=s.tableRows,{mouseDown:T}=Vv(s,u);r.onMounted(()=>{r.nextTick(m)}),r.watchPostEffect(()=>{r.unref(o.settings),r.nextTick(m)}),rt(window,"resize",()=>r.nextTick(m));const N=M=>{M.preventDefault(),s.updateOffsets(M)};return(M,G)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"tableRef",ref:u,class:"data-table",onMousedown:G[2]||(G[2]=(...C)=>r.unref(T)&&r.unref(T)(...C))},[r.createElementVNode("div",Zv,[r.createVNode(Dv),G[3]||(G[3]=r.createTextVNode()),r.createVNode(Iv)]),G[7]||(G[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"headRef",ref:p,class:"table-head"},[r.createVNode(gv,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(y),(C,F)=>(r.openBlock(),r.createBlock(Cv,{key:F,col:C,style:r.normalizeStyle(C.style),"onChange:sort":G[0]||(G[0]=O=>M.$emit("change:sort",O))},null,8,["col","style"]))),128))]),_:1})],512),G[8]||(G[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"bodyRef",ref:f,class:"table-body",style:r.normalizeStyle(c.value),onWheel:N},[l.value?(r.openBlock(),r.createElementBlock("div",Uv,[r.createElementVNode("div",null,[r.createVNode(fv),G[4]||(G[4]=r.createTextVNode()),G[5]||(G[5]=r.createElementVNode("div",null,"No Data To Show",-1))])])):r.createCommentVNode("",!0),G[6]||(G[6]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(B),(C,F)=>(r.openBlock(),r.createBlock(wv,{key:F,row:C},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(C.cells,O=>(r.openBlock(),r.createBlock(dv,{key:O.column.id+":"+F,cell:O,style:r.normalizeStyle(O.style)},null,8,["cell","style"]))),128))]),_:2},1032,["row"]))),128))],36),G[9]||(G[9]=r.createTextVNode()),r.createElementVNode("div",Wv,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(y),(C,F)=>(r.openBlock(),r.createBlock(bv,{key:F,column:C,style:r.normalizeStyle(C.style),"onChange:sort":G[1]||(G[1]=O=>M.$emit("change:sort",O))},null,8,["column","style"]))),128))]),G[10]||(G[10]=r.createTextVNode()),r.createVNode(Lv,{offset:r.unref(s).data.scrollTop,"window-size":r.unref(s).data.bodyHeight,"data-size":r.unref(s).data.dataHeight,"onChange:offset":r.unref(s).updateScrollTop},null,8,["offset","window-size","data-size","onChange:offset"])],544))}}),fu=new WeakMap;class Hv{constructor(e,n,o){A_(this,"dataHeight"),this.datum=e,this.resolveHeight=n,this.resolvePrimaryKey=o;const s=e.reduce((c,u,p)=>(c.indices.set(p,c.total),c.total+=this.resolveHeight(u,p)+mo,c),{total:0,indices:new Map});this.dataHeight=s.total;const l=e.map((c,u)=>({dataRow:c,index:u,primaryKey:this.resolvePrimaryKey(c,u),offset:ou(s.indices.get(u)),height:this.resolveHeight(c,u)}));fu.set(this,l)}get rows(){return fu.get(this)}async getHeight(){return this.dataHeight}async getRows(e,n){return _v(this.rows,o=>{const s=o.offset;return e<s+o.height&&s<n+e})}}class jv{constructor(e,n,o){this.api=e,this.rowHeight=n,this.resolvePrimaryKey=o}get height(){return this.rowHeight+mo}async getHeight(){return await this.api.count()*this.height}async getRows(e,n){const o=fs(Math.floor(e/this.height),0,Number.POSITIVE_INFINITY),s=Math.ceil(n+40/this.height);return(await this.api.query({offset:o,limit:s})).map((l,c)=>({dataRow:l,index:o+c,primaryKey:this.resolvePrimaryKey(l,o+c),offset:(o+c)*(this.rowHeight+mo),height:this.rowHeight}))}}function qv(t){return Object.freeze(t)}function Kv(t){return r.h(sl,{settings:Object.freeze(t)})}function al(t,e){const n=new Hv(t,e.resolveRowHeight,e.resolvePrimaryKey);return{...e,dataSource:n}}function Yv(t,e){return r.computed(()=>{const n=r.unref(t);return al(n,r.unref(e))})}function Jv(t,e){const n=r.computed(()=>{const s=r.unref(t);return al(s,r.unref(e))}),o=r.reactive({settings:n});return r.computed(()=>r.h(sl,o))}const Xv=Object.freeze(Object.defineProperty({__proto__:null,AsyncData:jv,Component:sl,factory:Kv,rawDataSettings:al,settings:qv,useRawData:Yv,useRawDataComponent:Jv},Symbol.toStringTag,{value:"Module"}));function*Qv(t,e){for(const n of t)yield e(n)}function eC(t){const e=[];for(const n of t)e.push(n);return e}function mu(t){return t()}function ll(t,e){if(t==null)throw Error(e);return t}function cl(t){let e=!1;return function(...n){e||(requestAnimationFrame(()=>{t(...n),e=!1}),e=!0)}}function gu(t){return new Promise(e=>setTimeout(e,t))}function yu(t,e){const n=setTimeout(t,e);return()=>{clearTimeout(n)}}function _u(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function tC(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(_u(65,91));return e}function vu(t){return function(e){return 1-t(1-e)}}function nC(t){return function(e){return e<.5?t(2*e)/2:(2-t(2*(1-e)))/2}}function Cu(t){const{duration:e,draw:n,timing:o}=t,s=performance.now();let l=!1;return requestAnimationFrame(function c(u){let p=(u-s)/e;(p>1||l)&&(p=1);const f=o(p);n(f),p<1&&requestAnimationFrame(c)}),function(){l=!0}}function rC(t){const{getFraction:e,draw:n,timing:o}=t,s=performance.now();let l=!1;return requestAnimationFrame(function c(u){let p=e(u-s);if(l)return;p>1&&(p=1);const f=o(p);n(f),p<1&&requestAnimationFrame(c)}),function(){l=!0}}function wu(t,e){let n=-1;return(...o)=>{n!==-1&&(clearTimeout(n),n=-1),n=window.setTimeout(()=>t(...o),e)}}function bu(t,e,n=!0){let o=0,s;return function(...l){s=()=>{t.apply(this,l),o=new Date().getTime()+e,s=null,n&&setTimeout(()=>{s&&s()},e)},new Date().getTime()>o&&s()}}function oC(t){return t.map(e=>({text:String(e),value:e}))}function ur(t){return t.map(e=>({label:"label"in e?e.label:e.text,value:e.value,description:e.description}))}const dl=new Map;function iC(t){return dl.has(t)||dl.set(t,r.ref(localStorage.getItem(t))),ll(dl.get(t),"...")}function sC(t,e){e==null?localStorage.removeItem(t):localStorage.setItem(t,e)}function xu(t){const e=iC(t);return r.watch(e,n=>sC(t,n)),e}const ul=new Set;window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{eC(Qv(ul.values(),e=>e(t.matches?"dark":"light")))});const aC=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",ku=r.ref(aC),pl=xu("theme");function Su(t){const e=r.computed(()=>pl.value?pl.value:ku.value),n=s=>{ku.value=s,t&&t(s)};function o(){pl.value=e.value==="light"?"dark":(e.value,"light")}return r.watch(e,s=>{t&&t(r.unref(s))}),r.onMounted(()=>{ul.add(n)}),r.onUnmounted(()=>{ul.delete(n)}),[e,o]}const lC=r.defineComponent({__name:"ThemeSwitcher",setup(t){const[e,n]=Su();return(o,s)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-theme-switcher",r.unref(e)]),onClick:s[0]||(s[0]=(...l)=>r.unref(n)&&r.unref(n)(...l))},s[1]||(s[1]=[r.createElementVNode("div",null,null,-1)]),2))}}),cC={key:0,class:"pl-block-page__title"},dC={class:"pl-block-page__title__default"},uC={class:"pl-block-page__title__append"},pC={key:1},hC={class:"pl-block-page__body"},fC={name:"PlBlockPage"},mC=r.defineComponent({...fC,props:{noBodyGutters:{type:Boolean}},setup(t){const e=r.useSlots();return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-layout-component pl-block-page",{noBodyGutters:n.noBodyGutters}])},[r.unref(e).title?(r.openBlock(),r.createElementBlock("div",cC,[r.createElementVNode("div",dC,[r.renderSlot(n.$slots,"title")]),o[0]||(o[0]=r.createTextVNode()),r.createElementVNode("div",uC,[r.renderSlot(n.$slots,"append")])])):(r.openBlock(),r.createElementBlock("div",pC)),o[1]||(o[1]=r.createTextVNode()),r.createElementVNode("div",hC,[r.renderSlot(n.$slots,"default")])],2))}}),gC={name:"PlContainer"},yC=r.defineComponent({...gC,props:{width:{}},setup(t){const e=t,n=r.computed(()=>({width:e.width}));return(o,s)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-container pl-layout-component",style:r.normalizeStyle(n.value)},[r.renderSlot(o.$slots,"default")],4))}}),_C={name:"PlRow"},vC=r.defineComponent({..._C,props:{wrap:{type:Boolean},alignCenter:{type:Boolean},noGap:{type:Boolean}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-layout-component pl-row",{wrap:e.wrap,"align-center":e.alignCenter}])},[r.renderSlot(e.$slots,"default")],2))}}),CC={class:"pl-layout-component",style:{"flex-grow":"1"}},wC={name:"PlSpacer"},Eu=r.defineComponent({...wC,setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",CC))}}),bC={name:"PlGrid"},xC=r.defineComponent({...bC,props:{columns:{}},setup(t){const e=t,n=r.computed(()=>({gridTemplateColumns:`repeat(${e.columns}, minmax(0, 1fr))`}));return(o,s)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-layout-component pl-grid",style:r.normalizeStyle(n.value)},[r.renderSlot(o.$slots,"default")],4))}}),kC={key:0,class:"pl-alert__icon"},SC={class:"pl-alert__main"},EC={key:0},TC={class:"pl-alert__main__text"},BC={name:"PlAlert"},VC=r.defineComponent({...BC,props:{modelValue:{type:Boolean,default:!0},type:{default:void 0},label:{default:void 0},icon:{type:Boolean,default:void 0},closeable:{type:Boolean,default:void 0},monospace:{type:Boolean,default:void 0},whiteSpacePre:{type:Boolean,default:void 0},maxHeight:{default:void 0}},emits:["update:modelValue"],setup(t){const e={success:"success",warn:"warning",info:"edit",error:"error"};return(n,o)=>n.modelValue?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["pl-alert",[{monospace:n.monospace,whiteSpacePre:n.whiteSpacePre},n.type?`pl-alert__${n.type}`:""]]),style:r.normalizeStyle({maxHeight:n.maxHeight})},[n.icon&&n.type?(r.openBlock(),r.createElementBlock("div",kC,[r.createElementVNode("div",{class:r.normalizeClass(`icon-24 icon-${e[n.type]}`)},null,2)])):r.createCommentVNode("",!0),o[2]||(o[2]=r.createTextVNode()),r.createElementVNode("div",SC,[n.label?(r.openBlock(),r.createElementBlock("label",EC,r.toDisplayString(n.label),1)):r.createCommentVNode("",!0),o[1]||(o[1]=r.createTextVNode()),r.createElementVNode("div",TC,[r.renderSlot(n.$slots,"default")])]),o[3]||(o[3]=r.createTextVNode()),n.closeable?(r.openBlock(),r.createElementBlock("div",{key:1,class:"pl-alert__close-btn","aria-label":"Close alert",role:"button",onClick:o[0]||(o[0]=s=>n.$emit("update:modelValue",!1))})):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)}}),NC=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
45
|
+
}`;function ou(){x.ModuleRegistry.registerModules([is.ClientSideRowModelModule,mm.InfiniteRowModelModule,pd.ServerSideRowModelModule,gm.CsvExportModule,hd.ClipboardModule,fd.RangeSelectionModule,ym.RichSelectModule,_m.MenuModule,vm.ExcelExportModule,Ja,ru]);const t=Ug("AGGRID_LICENSE");t?(Ie.LicenseManager.setLicenseKey(t),console.log("AG Grid Activated")):console.log("AG Grid License not found")}const D_=md.createPart("headerBottomBorder").withCSS(P_),iu=md.themeQuartz.withParams({headerColumnResizeHandleColor:"transparent",accentColor:"#49cc49",borderColor:"#E1E3EB",cellHorizontalPaddingScale:1,checkboxBorderRadius:"3px",checkboxCheckedBackgroundColor:"#110529",checkboxCheckedBorderColor:"#110529",checkboxIndeterminateBackgroundColor:"#110529",checkboxIndeterminateBorderColor:"#110529",checkboxUncheckedBorderColor:"#CFD1DB",columnBorder:!0,columnHoverColor:"#9BABCC16",fontFamily:"inherit",foregroundColor:"#110529",headerBackgroundColor:"#F7F8FA",headerColumnBorder:!0,headerFontWeight:600,headerRowBorder:!0,headerVerticalPaddingScale:.8,iconButtonHoverColor:"#9BABCC32",iconSize:"16px",menuBackgroundColor:"#FFFFFF",menuBorder:!0,menuTextColor:"#110529",rowHoverColor:"#9BABCC16",rowVerticalPaddingScale:1,selectedRowBackgroundColor:"#63E02424",sidePanelBorder:!1,spacing:"8px",tooltipBackgroundColor:"#110529",tooltipTextColor:"#FFFFFF",wrapperBorderRadius:"6px"}).withPart(D_),su=Symbol("sdk-vue");function rl(){return r.inject(su)}function F_(t,e,n={}){let o;ou();const s=()=>{t.loadBlockState().then(c=>{l.loaded=!0;const u=Fm(c,t,n),p=e(u),f=Object.fromEntries(Object.entries(p.routes).map(([m,y])=>{const T=typeof y=="function"?y():y;return[m,r.markRaw(T)]}));o=Object.assign(u,{...p,getRoute(m){return f[m]}})}).catch(c=>{console.error("load initial state error",c),l.error=c})},l=r.reactive({loaded:!1,error:void 0,useApp(){return wm(o,"App is not loaded")},install(c){c.provide(su,this),s()}});return l}var R_=Object.defineProperty,M_=(t,e,n)=>e in t?R_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,I_=(t,e,n)=>M_(t,e+"",n);function gs(t,e){if(t==null)throw Error("Empty (null | undefined) value");return t}function O_(t,e,n){const o=Math.min(e,n),s=Math.max(e,n);return t>=o&&t<=s}function L_(t){return new Promise(e=>setTimeout(e,t))}function G_(t){return t()}function ys(t,e,n){return e>t?e:t>n?n:t}function au(t,e){return e(t)}function $r(t,e){if(t!=null)return e(t)}function z_(t){if(t&&t.ok)return t.value}async function $_(t){return Object.fromEntries(await Promise.all(Object.entries(t).map(async([e,n])=>[e,await n])))}const lu=t=>t;function U_(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function Z_(t,e=[]){for(t=t?String(t):"";e.includes(t.charAt(0));)t=t.substring(1);return t}function W_(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(U_(65,91));return e}function cu(){return W_(42)}const ol=Array.isArray;function pi(t){return t!==null&&typeof t=="object"}function il(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null}function H_(t,e){return Object.keys(t).map(n=>e(t[n],n))}function hi(t,e){return pi(t)&&pi(e)?Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>hi(t[n],e[n])):t===e}function fi(t){if(Array.isArray(t)){const e=[];for(let n=0;n<t.length;n++)e[n]=fi(t[n]);return e}else if(pi(t)){const e={};return Object.keys(t).forEach(n=>{e[n]=fi(t[n])}),e}else return t}function j_(t){return Array.isArray(t)?Object.assign([],t):pi(t)?Object.assign({},t):t}function q_(t,e){const n={};for(const o in e)e[o]!==t[o]&&(n[o]=t[o]);return n}function K_(t){return Object.entries(t).forEach(([e,n])=>{n instanceof Function&&(t[e]=n.bind(t))}),t}function Y_(t,e,n){return t[e]=n,t}function J_(t,e){return t[e]}function X_(t,e){t={...t};const n=t[e];return delete t[e],[n,t]}function Q_(t,...e){return Object.assign({},...e.map(n=>({[n]:t[n]})))}function ev(t,...e){return e.map(n=>t[n])}function tv(t,...e){const n=Object.assign({},t);return e.forEach(o=>delete n[o]),n}function du(t,e){return new Set([...Object.keys(t),...Object.keys(e)]).forEach(n=>{const o=t[n],s=e[n];il(o)&&il(s)||ol(o)&&ol(s)&&o.length===s.length?du(o,s):t[n]=s}),t}const sl=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:K_,deepClone:fi,deepEqual:hi,deepPatch:du,getProp:J_,isArray:ol,isObject:pi,isPlainObject:il,map:H_,omit:tv,pick:Q_,pickValues:ev,setProp:Y_,shallowClone:j_,shallowDiff:q_,shiftProp:X_},Symbol.toStringTag,{value:"Module"}));function nv(t,e){const n=t.findIndex(e);if(n<0)return[];const o=(()=>{for(let s=n;s<t.length;s++)if(!e(t[s],s))return s;return t.length})();return t.slice(n,o)}function rv(t,e,n){let o;return function(...s){o&&clearTimeout(o),o=setTimeout(()=>{o=void 0,t.apply(this,s)},e)}}const ov=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],iv=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],sv=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],av=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],uu=(t,e)=>{let n=String(t);return typeof e=="string"||Array.isArray(e)?n=t.toLocaleString(e):e===!0&&(n=t.toLocaleString(void 0)),n};function al(t,e){if(t=typeof t=="bigint"?Number(t):t,!Number.isFinite(t))throw new TypeError(`Expected a finite number, got ${typeof t}: ${t}`);Object.assign(e,{bits:!1,binary:!1});const n=e.bits?e.binary?av:sv:e.binary?iv:ov;if(e.signed&&t===0)return` 0 ${n[0]}`;const o=t<0,s=o?"-":e.signed?"+":"";if(o&&(t=-t),t<1){const p=uu(t,e.locale);return s+p+" "+n[0]}const l=Math.min(Math.floor(e.binary?Math.log(t)/Math.log(1024):Math.log10(t)/3),n.length-1);t/=(e.binary?1024:1e3)**l,t=Number(t.toPrecision(3));const c=uu(Number(t),e.locale),u=n[l];return s+c+" "+u}const lv={class:"context-menu"},cv=["onClick"],dv=r.defineComponent({__name:"Menu",props:{options:{}},emits:["close"],setup(t,{emit:e}){const n=e,o=s=>{s.cb(),n("close")};return(s,l)=>(r.openBlock(),r.createElementBlock("div",lv,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.options,(c,u)=>(r.openBlock(),r.createElementBlock("div",{key:u,onClick:r.withModifiers(p=>o(c),["stop"])},[r.createElementVNode("span",null,r.toDisplayString(c.text),1)],8,cv))),128))]))}}),Lt=(t,e)=>{const n=t.__vccOpts||t;for(const[o,s]of e)n[o]=s;return n},uv=Lt(dv,[["__scopeId","data-v-12530966"]]);function ll(t,e){t.preventDefault();const n=()=>{r.render(null,document.body)},o=r.h(uv,{options:e,onClose:()=>{n()}});r.render(o,document.body);const s=o.el;return s.style.top=t.clientY+"px",s.style.left=t.clientX+"px",document.addEventListener("click",l=>{s.contains(l.target)||n()}),n}const pu=Symbol(),_s=()=>r.inject(pu),pv=["value"],hv={key:1},fv=r.defineComponent({__name:"BaseCellComponent",props:{modelValue:{},valueType:{},editable:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,s=r.reactive({edit:!1}),l=r.computed(()=>o.valueType),c=f=>{var m;let y=(m=f.target)==null?void 0:m.value;const T=r.unref(l),B=G_(()=>T==="integer"?parseInt(y,10):T==="float"?Number(y):y);n("update:modelValue",B),s.edit=!1},u=r.ref(),p=f=>{!f.metaKey&&o.editable&&(s.edit=!0,requestAnimationFrame(()=>{var m,y;(y=(m=u.value)==null?void 0:m.querySelector("input"))==null||y.focus()}))};return(f,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"baseRef",ref:u,class:r.normalizeClass(["base-cell",{"base-cell__edit":s.edit}]),onClick:p},[s.edit?(r.openBlock(),r.createElementBlock("input",{key:0,value:f.modelValue,onFocusout:m[0]||(m[0]=y=>s.edit=!1),onChange:c},null,40,pv)):(r.openBlock(),r.createElementBlock("div",hv,r.toDisplayString(f.modelValue),1))],2))}}),mv=["^data-row-index"],gv={key:0,class:"control-cell"},yv=r.defineComponent({__name:"TdCell",props:{cell:{}},setup(t){const e=t,n=_s(),o=r.computed(()=>e.cell.column.valueType),s=f=>{$r(n.settings.value.onUpdatedRow,m=>{const y=e.cell.row,T={...y.dataRow,[e.cell.id]:f};m({...y,dataRow:T})})},l=f=>{f.metaKey&&n.selectRow(e.cell.row.primaryKey)},c=(f,m)=>{if(f.type==="contextmenu")f.preventDefault();else return;const y=n.settings??{},T=[],{onSelectedRows:B,onSelectedColumns:A}=y.value,I=n.data.selectedRows.has(m.primaryKey);B&&B.length&&(I?T.push({text:"Deselect row",cb(){n.data.selectedRows.delete(e.cell.row.primaryKey)}}):T.push({text:"Select row",cb(){n.selectRow(e.cell.row.primaryKey)}})),A&&A.length&&(T.push({text:"Select column",cb(){n.selectColumn(e.cell.column.id)}}),T.push({text:"Unselect column",cb(){n.unselectColumn(e.cell.column.id)}})),T.length&&ll(f,T)},u=r.ref(),p=r.computed(()=>e.cell.column.component?e.cell.column.component():void 0);return(f,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"cellRef",ref:u,class:r.normalizeClass(["td-cell",{[f.cell.class]:!0}]),"^data-row-index":f.cell.row.index,onClick:l,onContextmenu:m[0]||(m[0]=y=>c(y,f.cell.row))},[f.cell.control?(r.openBlock(),r.createElementBlock("div",gv,r.toDisplayString(f.cell.row.index),1)):p.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(p.value),{key:1,"model-value":f.cell.value,"onUpdate:modelValue":s},null,8,["model-value"])):(r.openBlock(),r.createBlock(fv,{key:2,"model-value":f.cell.value,"value-type":o.value,editable:f.cell.column.editable,"onUpdate:modelValue":s},null,8,["model-value","value-type","editable"]))],42,mv))}}),_v={},vv={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Cv(t,e){return r.openBlock(),r.createElementBlock("svg",vv,e[0]||(e[0]=[r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M24 41.5H9C7.61929 41.5 6.5 40.3807 6.5 39V24H9.5V38.5H24V41.5Z",fill:"#CFD1DB"},null,-1),r.createTextVNode(),r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M41.5 9C41.5 7.61929 40.3807 6.5 39 6.5H9C7.61929 6.5 6.5 7.61929 6.5 9V19.5H9.5H28.5V38.5V41.5H39C40.3807 41.5 41.5 40.3807 41.5 39V9ZM38.5 9.5V16.5H31.5V9.5H38.5ZM38.5 38.5V19.5H31.5V38.5H38.5ZM9.5 9.5V16.5H28.5V9.5H9.5Z",fill:"#CFD1DB"},null,-1)]))}const wv=Lt(_v,[["render",Cv]]),bv={class:"tr-head"},xv=r.defineComponent({__name:"TrHead",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",bv,[r.renderSlot(e.$slots,"default")]))}});function kv(t,e){const n=e.indexOf(t)+1;return e[n>=e.length?0:n]}function Sv(t,e){const n=t.findIndex(e);if(n<0)return[];const o=(()=>{for(let s=n;s<t.length;s++)if(!e(t[s],s))return s;return t.length})();return t.slice(n,o)}const Ev=["^data-col-id"],Tv=r.defineComponent({__name:"ThCell",props:{col:{}},emits:["delete:column","expand:column","change:sort"],setup(t,{emit:e}){const n=e;function o(l){l.preventDefault();const c=[];c.length&&ll(l,c)}function s(l){var c;const u=((c=l.sort)==null?void 0:c.direction)??"DESC";n("change:sort",{colId:l.id,direction:kv(u,["DESC","ASC"])})}return(l,c)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["cell th-cell",{"justify-center":l.col.justify,frozen:l.col.frozen}]),"^data-col-id":l.col.id,onContextmenu:o},[l.col.valueType?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(l.col.valueType)},null,2)):r.createCommentVNode("",!0),r.createTextVNode(" "+r.toDisplayString(l.col.label)+" ",1),l.col.sort?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(["sort",l.col.sort.direction]),onClick:c[0]||(c[0]=r.withModifiers(()=>s(l.col),["stop"]))},null,2)):r.createCommentVNode("",!0)],42,Ev))}}),Bv=r.defineComponent({__name:"TrBody",props:{row:{}},setup(t){const e=r.ref(),n=()=>{r.nextTick().then(()=>{$r(e.value,o=>o.scrollLeft=0)})};return(o,s)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"trRef",ref:e,class:r.normalizeClass(["tr-body",{selected:o.row.selected}]),scroll:"no",style:r.normalizeStyle(o.row.style),onScroll:n},[r.renderSlot(o.$slots,"default")],38))}}),Vv=r.defineComponent({__name:"ColumnCaret",props:{column:{}},setup(t){const e=_s(),n=t,o=r.computed(()=>e.data.selectedColumns.has(n.column.id));return(s,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["column-caret",{selected:o.value,frozen:s.column.frozen}])},null,2))}});function rt(t,e,n,o){r.onMounted(()=>{var s;return(s=r.unref(t))==null?void 0:s.addEventListener(e,n,o)}),r.onUnmounted(()=>{var s;return(s=r.unref(t))==null?void 0:s.removeEventListener(e,n,o)})}function Nv(t){r.onMounted(()=>window.addEventListener("mouseup",t)),r.onUnmounted(()=>window.removeEventListener("mouseup",t))}function Av(t){let e=!1;return function(...n){e?console.log("handle pressure"):(requestAnimationFrame(()=>{t(...n),e=!1}),e=!0)}}function Pv(t,e){let n;function o(l){n={...l}}Nv(()=>{n=void 0,e()});const s=Av(t);return rt(window,"mousemove",l=>{n&&s({x:n.x,width:n.width,diff:l.x-n.x})}),{start:o}}const go=1,Dv=10,Fv=30,hu=60;function fu(){const t=r.reactive({x:0,y:0});function e(n){t.x=n.pageX,t.y=n.pageY}return r.onMounted(()=>window.addEventListener("mousemove",e)),r.onUnmounted(()=>window.removeEventListener("mousemove",e)),t}function mu(t,e={}){const{delayEnter:n=0,delayLeave:o=0}=e,s=r.ref(!1);let l;const c=u=>{const p=u?n:o;l&&(clearTimeout(l),l=void 0),p?l=setTimeout(()=>s.value=u,p):s.value=u};return window&&(rt(t,"mouseenter",()=>c(!0)),rt(t,"mouseleave",()=>c(!1))),s}function Rv(t){var e;const n=$r((e=r.unref(t))==null?void 0:e.querySelectorAll(".th-cell"),o=>[...o])??[];return n.map(o=>{const{width:s,x:l}=o.getBoundingClientRect(),c=o.getAttribute("data-col-id");return lu({colId:c,width:s,x:l,right:l+s})}).slice(0,n.length-1)}function Mv(t,e){const n=fu(),o=mu(e,{}),{data:s}=t,l=Pv(u=>{$r(s.resizeTh,p=>{const f=s.columns.find(m=>m.id===p.colId);f&&(f.width=ys(u.width+u.diff,Fv,1e4),t.adjustWidth())})},()=>{s.resize=!1,s.resizeTh=void 0,document.body.style.cursor=""}),c=u=>{s.resizeTh&&(s.resize=!0,l.start({x:u.x,width:s.resizeTh.width}))};return r.watchEffect(()=>{if(!o.value){document.body.style.cursor="";return}if(s.resize)return;const u=Rv(e).find(p=>Math.abs(n.x-p.right)<Dv);u?(document.body.style.cursor="col-resize",s.resizeTh=u):(s.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:c}}const Iv={key:0,class:"command-menu"},Ov={key:0},Lv=["onClick"],Gv=r.defineComponent({__name:"RowsCommandMenu",setup(t){const e=_s(),n=r.computed(()=>e.getSelectedRows()),o=r.computed(()=>n.value.length>0),s=r.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedRows)??[]}),l=r.computed(()=>s.value.map(c=>({label:c.label,cb:()=>{c.cb(n.value),e.data.selectedRows.clear(),e.data.rows=[]}})));return(c,u)=>o.value?(r.openBlock(),r.createElementBlock("div",Iv,[n.value.length?(r.openBlock(),r.createElementBlock("span",Ov,r.toDisplayString(n.value.length)+" rows selected",1)):r.createCommentVNode("",!0),u[0]||(u[0]=r.createTextVNode()),u[1]||(u[1]=r.createElementVNode("hr",null,null,-1)),u[2]||(u[2]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(p,f)=>(r.openBlock(),r.createElementBlock("span",{key:f,class:"command",onClick:r.withModifiers(p.cb,["stop"])},r.toDisplayString(p.label),9,Lv))),128))])):r.createCommentVNode("",!0)}}),zv={key:0,class:"command-menu"},$v={key:0},Uv=["onClick"],Zv=r.defineComponent({__name:"ColumnsCommandMenu",setup(t){const e=_s(),n=r.computed(()=>e.getSelectedColumns()),o=r.computed(()=>n.value.length>0),s=r.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedColumns)??[]}),l=r.computed(()=>s.value.map(c=>({label:c.label,cb:()=>{c.cb(n.value),e.data.selectedColumns.clear()}})));return(c,u)=>o.value?(r.openBlock(),r.createElementBlock("div",zv,[n.value.length?(r.openBlock(),r.createElementBlock("span",$v,"selected columns "+r.toDisplayString(n.value.length),1)):r.createCommentVNode("",!0),u[0]||(u[0]=r.createTextVNode()),u[1]||(u[1]=r.createElementVNode("hr",null,null,-1)),u[2]||(u[2]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(p,f)=>(r.openBlock(),r.createElementBlock("span",{key:f,class:"command",onClick:r.withModifiers(p.cb,["stop"])},r.toDisplayString(p.label),9,Uv))),128))])):r.createCommentVNode("",!0)}});function ur(t,e){const n={el:void 0,x:0,y:0},o=s=>({x:s.x,y:s.y,dx:s.x-n.x,dy:s.y-n.y});rt(document,"mousedown",s=>{s.target===r.unref(t)&&(s.stopPropagation&&s.stopPropagation(),s.preventDefault&&s.preventDefault(),n.el=r.unref(t),n.x=s.x,n.y=s.y)}),rt(document,"mouseup",s=>{n.el&&(n.el=void 0,e({...o(s),stop:!0},n))}),rt(document,"mousemove",s=>{n.el&&e(o(s),n)})}const Wv=r.defineComponent({__name:"TScroll",props:{offset:{},windowSize:{},dataSize:{}},emits:["change:offset"],setup(t,{emit:e}){const n=e,o=t,s=r.ref(),l=r.computed(()=>o.windowSize-12),c=r.computed(()=>o.windowSize<o.dataSize),u=r.computed(()=>Math.ceil(o.offset*(l.value/o.dataSize))),p=r.computed(()=>Math.ceil(l.value*l.value/o.dataSize)),f=r.computed(()=>({top:`${u.value}px`,height:`${p.value}px`}));return ur(s,(m,y)=>{const T=(u.value+m.dy)*o.dataSize/l.value;n("change:offset",T),y.x=m.x,y.y=m.y}),(m,y)=>(r.openBlock(),r.createElementBlock("div",{class:"t-scroll",style:r.normalizeStyle({height:`${m.windowSize}px`})},[r.createElementVNode("div",null,[c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"handleRef",ref:s,class:"t-scroll__handle",style:r.normalizeStyle(f.value)},null,4)):r.createCommentVNode("",!0)])],4))}});function Hv(t){return r.computed(()=>{const{data:e,settings:n}=t,{bodyWidth:o,scrollLeft:s}=e,l=[...e.columns],c=cu();n.value.controlColumn&&l.unshift({id:c,label:"#",width:60,frozen:!0});let u=0;const p=l.map(m=>{const y={...m,offset:u};return u+=m.width+go,y}),f=p.filter(m=>m.frozen);return nv(p,m=>m.frozen?!1:s<m.offset+m.width&&m.offset<o+s).concat(f).map(m=>({...m,style:{left:m.frozen?`${m.offset}px`:`${m.offset-e.scrollLeft}px`,width:`${m.width}px`},control:m.id===c}))})}function jv(t,e){const n=r.computed(()=>e.value.reduce((o,s)=>(o[s.id]=s.justify?"justify-"+s.justify:"",o),{}));return r.computed(()=>t.rows.map(o=>{const s=n.value,{primaryKey:l,offset:c,dataRow:u,height:p}=o,f=e.value.map(m=>({id:m.id,column:m,row:o,value:u[m.id],class:s[m.id],editable:m.editable,width:m.width,style:m.style,control:m.control}));return lu({style:{top:`${c-t.scrollTop}px`,height:`${o.height}px`},primaryKey:l,offset:c,height:p,cells:f,selected:t.selectedRows.has(l)})}))}const qv=async(t,e)=>{const{scrollTop:n,bodyHeight:o}=t;return await L_(0),$_({rows:e.getRows(n,o),dataWindow:t})};function Kv(t){const e=r.reactive({rowIndex:-1,columns:[],pendingLoads:0,currentWindow:void 0,rows:[],resize:!1,resizeTh:void 0,dataHeight:0,bodyHeight:t.settings.height,bodyWidth:0,scrollTop:0,scrollLeft:0,selectedRows:new Set,selectedColumns:new Set});r.watch(()=>t.settings,m=>{e.columns=fi(m.columns),e.currentWindow=void 0,m.dataSource.getHeight().then(y=>{e.dataHeight=y,f.updateBodyHeight()}).catch(y=>e.error=y)},{immediate:!0});const n=r.computed(()=>t.settings),o=r.computed(()=>e.columns.reduce((m,y)=>m+y.width+go,0)),s=r.computed(()=>au(f.data.dataHeight-f.data.bodyHeight,m=>m>0?m:0)),l=r.computed(()=>au(o.value-f.data.bodyWidth,m=>m>0?m:0)),c=r.computed(()=>({bodyHeight:e.bodyHeight,scrollTop:e.scrollTop,current:e.currentWindow})),u=Hv({data:e,settings:n}),p=jv(e,u),f={data:e,settings:n,tableColumns:u,tableRows:p,adjustWidth:()=>{const m=e.columns.reduce((T,B)=>T+B.width+go,0),y=e.bodyWidth+e.scrollLeft;if(m<y){const T=e.columns[e.columns.length-1];T.width=T.width+(y-m)}},updateOffsets(m){this.updateScrollTop(e.scrollTop+m.deltaY),this.updateScrollLeft(e.scrollLeft+m.deltaX)},getSelectedRows(){return e.rows.filter(m=>e.selectedRows.has(m.primaryKey))},getSelectedColumns(){return e.columns.filter(m=>e.selectedColumns.has(m.id))},selectRow(m){e.selectedRows.add(m)},unselectRow(m){e.selectedRows.delete(m)},selectColumn(m){e.selectedColumns.add(m)},unselectColumn(m){e.selectedColumns.delete(m)},updateScrollTop(m){e.scrollTop=ys(m,0,s.value)},updateScrollLeft(m){e.scrollLeft=ys(m,0,l.value)},updateBodyHeight(){const{height:m}=t.settings,{dataHeight:y}=e,T=m>y?y:m;e.bodyHeight=T},updateDimensions(m){this.updateBodyHeight(),f.data.bodyWidth=m.width,f.adjustWidth(),e.rows=[],e.currentWindow=void 0}};return r.watch(c,(m,y)=>{const T=m.current;(!T||m.scrollTop<T.scrollTop||m.scrollTop+m.bodyHeight>T.bodyHeight+T.scrollTop)&&(e.currentWindow={scrollTop:m.scrollTop-hu,bodyHeight:m.bodyHeight+hu*2},qv(fi(e.currentWindow),n.value.dataSource).then(({rows:B,dataWindow:A})=>{hi(e.currentWindow,A)&&(e.rows=B)}))},{deep:!0,immediate:!0}),r.provide(pu,f),f}const Yv={class:"command-menu__container"},Jv={key:0,class:"table-body__no-data"},Xv={class:"carets"},cl=r.defineComponent({__name:"TableComponent",props:{settings:{}},emits:["update:data","change:sort"],setup(t,{emit:e}){const n=e,o=t,s=Kv(o),l=r.computed(()=>s.data.rows.length===0),c=r.computed(()=>({height:l.value?"212px":s.data.bodyHeight+"px"}));r.watch(s.data,I=>n("update:data",I),{deep:!0}),r.watch(o,()=>m);const u=r.ref(),p=r.ref(),f=r.ref(),m=()=>{$r(f.value,I=>{s.updateDimensions(I.getBoundingClientRect())})},y=s.tableColumns,T=s.tableRows,{mouseDown:B}=Mv(s,u);r.onMounted(()=>{r.nextTick(m)}),r.watchPostEffect(()=>{r.unref(o.settings),r.nextTick(m)}),rt(window,"resize",()=>r.nextTick(m));const A=I=>{I.preventDefault(),s.updateOffsets(I)};return(I,L)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"tableRef",ref:u,class:"data-table",onMousedown:L[2]||(L[2]=(...C)=>r.unref(B)&&r.unref(B)(...C))},[r.createElementVNode("div",Yv,[r.createVNode(Gv),L[3]||(L[3]=r.createTextVNode()),r.createVNode(Zv)]),L[7]||(L[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"headRef",ref:p,class:"table-head"},[r.createVNode(xv,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(y),(C,R)=>(r.openBlock(),r.createBlock(Tv,{key:R,col:C,style:r.normalizeStyle(C.style),"onChange:sort":L[0]||(L[0]=O=>I.$emit("change:sort",O))},null,8,["col","style"]))),128))]),_:1})],512),L[8]||(L[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"bodyRef",ref:f,class:"table-body",style:r.normalizeStyle(c.value),onWheel:A},[l.value?(r.openBlock(),r.createElementBlock("div",Jv,[r.createElementVNode("div",null,[r.createVNode(wv),L[4]||(L[4]=r.createTextVNode()),L[5]||(L[5]=r.createElementVNode("div",null,"No Data To Show",-1))])])):r.createCommentVNode("",!0),L[6]||(L[6]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(T),(C,R)=>(r.openBlock(),r.createBlock(Bv,{key:R,row:C},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(C.cells,O=>(r.openBlock(),r.createBlock(yv,{key:O.column.id+":"+R,cell:O,style:r.normalizeStyle(O.style)},null,8,["cell","style"]))),128))]),_:2},1032,["row"]))),128))],36),L[9]||(L[9]=r.createTextVNode()),r.createElementVNode("div",Xv,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(y),(C,R)=>(r.openBlock(),r.createBlock(Vv,{key:R,column:C,style:r.normalizeStyle(C.style),"onChange:sort":L[1]||(L[1]=O=>I.$emit("change:sort",O))},null,8,["column","style"]))),128))]),L[10]||(L[10]=r.createTextVNode()),r.createVNode(Wv,{offset:r.unref(s).data.scrollTop,"window-size":r.unref(s).data.bodyHeight,"data-size":r.unref(s).data.dataHeight,"onChange:offset":r.unref(s).updateScrollTop},null,8,["offset","window-size","data-size","onChange:offset"])],544))}}),gu=new WeakMap;class Qv{constructor(e,n,o){I_(this,"dataHeight"),this.datum=e,this.resolveHeight=n,this.resolvePrimaryKey=o;const s=e.reduce((c,u,p)=>(c.indices.set(p,c.total),c.total+=this.resolveHeight(u,p)+go,c),{total:0,indices:new Map});this.dataHeight=s.total;const l=e.map((c,u)=>({dataRow:c,index:u,primaryKey:this.resolvePrimaryKey(c,u),offset:gs(s.indices.get(u)),height:this.resolveHeight(c,u)}));gu.set(this,l)}get rows(){return gu.get(this)}async getHeight(){return this.dataHeight}async getRows(e,n){return Sv(this.rows,o=>{const s=o.offset;return e<s+o.height&&s<n+e})}}class eC{constructor(e,n,o){this.api=e,this.rowHeight=n,this.resolvePrimaryKey=o}get height(){return this.rowHeight+go}async getHeight(){return await this.api.count()*this.height}async getRows(e,n){const o=ys(Math.floor(e/this.height),0,Number.POSITIVE_INFINITY),s=Math.ceil(n+40/this.height);return(await this.api.query({offset:o,limit:s})).map((l,c)=>({dataRow:l,index:o+c,primaryKey:this.resolvePrimaryKey(l,o+c),offset:(o+c)*(this.rowHeight+go),height:this.rowHeight}))}}function tC(t){return Object.freeze(t)}function nC(t){return r.h(cl,{settings:Object.freeze(t)})}function dl(t,e){const n=new Qv(t,e.resolveRowHeight,e.resolvePrimaryKey);return{...e,dataSource:n}}function rC(t,e){return r.computed(()=>{const n=r.unref(t);return dl(n,r.unref(e))})}function oC(t,e){const n=r.computed(()=>{const s=r.unref(t);return dl(s,r.unref(e))}),o=r.reactive({settings:n});return r.computed(()=>r.h(cl,o))}const iC=Object.freeze(Object.defineProperty({__proto__:null,AsyncData:eC,Component:cl,factory:nC,rawDataSettings:dl,settings:tC,useRawData:rC,useRawDataComponent:oC},Symbol.toStringTag,{value:"Module"}));function*sC(t,e){for(const n of t)yield e(n)}function aC(t){const e=[];for(const n of t)e.push(n);return e}function yu(t){return t()}function ul(t,e){if(t==null)throw Error(e);return t}function pl(t){let e=!1;return function(...n){e||(requestAnimationFrame(()=>{t(...n),e=!1}),e=!0)}}function _u(t){return new Promise(e=>setTimeout(e,t))}function vu(t,e){const n=setTimeout(t,e);return()=>{clearTimeout(n)}}function Cu(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function lC(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(Cu(65,91));return e}function wu(t){return function(e){return 1-t(1-e)}}function cC(t){return function(e){return e<.5?t(2*e)/2:(2-t(2*(1-e)))/2}}function bu(t){const{duration:e,draw:n,timing:o}=t,s=performance.now();let l=!1;return requestAnimationFrame(function c(u){let p=(u-s)/e;(p>1||l)&&(p=1);const f=o(p);n(f),p<1&&requestAnimationFrame(c)}),function(){l=!0}}function dC(t){const{getFraction:e,draw:n,timing:o}=t,s=performance.now();let l=!1;return requestAnimationFrame(function c(u){let p=e(u-s);if(l)return;p>1&&(p=1);const f=o(p);n(f),p<1&&requestAnimationFrame(c)}),function(){l=!0}}function xu(t,e){let n=-1;return(...o)=>{n!==-1&&(clearTimeout(n),n=-1),n=window.setTimeout(()=>t(...o),e)}}function ku(t,e,n=!0){let o=0,s;return function(...l){s=()=>{t.apply(this,l),o=new Date().getTime()+e,s=null,n&&setTimeout(()=>{s&&s()},e)},new Date().getTime()>o&&s()}}function uC(t){return t.map(e=>({text:String(e),value:e}))}function pr(t){return t.map(e=>({label:"label"in e?e.label:e.text,value:e.value,description:e.description}))}const hl=new Map;function pC(t){return hl.has(t)||hl.set(t,r.ref(localStorage.getItem(t))),ul(hl.get(t),"...")}function hC(t,e){e==null?localStorage.removeItem(t):localStorage.setItem(t,e)}function Su(t){const e=pC(t);return r.watch(e,n=>hC(t,n)),e}const fl=new Set;window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{aC(sC(fl.values(),e=>e(t.matches?"dark":"light")))});const fC=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",Eu=r.ref(fC),ml=Su("theme");function Tu(t){const e=r.computed(()=>ml.value?ml.value:Eu.value),n=s=>{Eu.value=s,t&&t(s)};function o(){ml.value=e.value==="light"?"dark":(e.value,"light")}return r.watch(e,s=>{t&&t(r.unref(s))}),r.onMounted(()=>{fl.add(n)}),r.onUnmounted(()=>{fl.delete(n)}),[e,o]}const mC=r.defineComponent({__name:"ThemeSwitcher",setup(t){const[e,n]=Tu();return(o,s)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-theme-switcher",r.unref(e)]),onClick:s[0]||(s[0]=(...l)=>r.unref(n)&&r.unref(n)(...l))},s[1]||(s[1]=[r.createElementVNode("div",null,null,-1)]),2))}}),gC={key:0,class:"pl-block-page__title"},yC={class:"pl-block-page__title__default"},_C={class:"pl-block-page__title__append"},vC={key:1},CC={class:"pl-block-page__body"},wC={name:"PlBlockPage"},bC=r.defineComponent({...wC,props:{noBodyGutters:{type:Boolean}},setup(t){const e=r.useSlots();return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-layout-component pl-block-page",{noBodyGutters:n.noBodyGutters}])},[r.unref(e).title?(r.openBlock(),r.createElementBlock("div",gC,[r.createElementVNode("div",yC,[r.renderSlot(n.$slots,"title")]),o[0]||(o[0]=r.createTextVNode()),r.createElementVNode("div",_C,[r.renderSlot(n.$slots,"append")])])):(r.openBlock(),r.createElementBlock("div",vC)),o[1]||(o[1]=r.createTextVNode()),r.createElementVNode("div",CC,[r.renderSlot(n.$slots,"default")])],2))}}),xC={name:"PlContainer"},kC=r.defineComponent({...xC,props:{width:{}},setup(t){const e=t,n=r.computed(()=>({width:e.width}));return(o,s)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-container pl-layout-component",style:r.normalizeStyle(n.value)},[r.renderSlot(o.$slots,"default")],4))}}),SC={name:"PlRow"},EC=r.defineComponent({...SC,props:{wrap:{type:Boolean},alignCenter:{type:Boolean},noGap:{type:Boolean}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-layout-component pl-row",{wrap:e.wrap,"align-center":e.alignCenter}])},[r.renderSlot(e.$slots,"default")],2))}}),TC={class:"pl-layout-component",style:{"flex-grow":"1"}},BC={name:"PlSpacer"},Bu=r.defineComponent({...BC,setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",TC))}}),VC={name:"PlGrid"},NC=r.defineComponent({...VC,props:{columns:{}},setup(t){const e=t,n=r.computed(()=>({gridTemplateColumns:`repeat(${e.columns}, minmax(0, 1fr))`}));return(o,s)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-layout-component pl-grid",style:r.normalizeStyle(n.value)},[r.renderSlot(o.$slots,"default")],4))}}),AC={key:0,class:"pl-alert__icon"},PC={class:"pl-alert__main"},DC={key:0},FC={class:"pl-alert__main__text"},RC={name:"PlAlert"},MC=r.defineComponent({...RC,props:{modelValue:{type:Boolean,default:!0},type:{default:void 0},label:{default:void 0},icon:{type:Boolean,default:void 0},closeable:{type:Boolean,default:void 0},monospace:{type:Boolean,default:void 0},whiteSpacePre:{type:Boolean,default:void 0},maxHeight:{default:void 0}},emits:["update:modelValue"],setup(t){const e={success:"success",warn:"warning",info:"edit",error:"error"};return(n,o)=>n.modelValue?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["pl-alert",[{monospace:n.monospace,whiteSpacePre:n.whiteSpacePre},n.type?`pl-alert__${n.type}`:""]]),style:r.normalizeStyle({maxHeight:n.maxHeight})},[n.icon&&n.type?(r.openBlock(),r.createElementBlock("div",AC,[r.createElementVNode("div",{class:r.normalizeClass(`icon-24 icon-${e[n.type]}`)},null,2)])):r.createCommentVNode("",!0),o[2]||(o[2]=r.createTextVNode()),r.createElementVNode("div",PC,[n.label?(r.openBlock(),r.createElementBlock("label",DC,r.toDisplayString(n.label),1)):r.createCommentVNode("",!0),o[1]||(o[1]=r.createTextVNode()),r.createElementVNode("div",FC,[r.renderSlot(n.$slots,"default")])]),o[3]||(o[3]=r.createTextVNode()),n.closeable?(r.openBlock(),r.createElementBlock("div",{key:1,class:"pl-alert__close-btn","aria-label":"Close alert",role:"button",onClick:o[0]||(o[0]=s=>n.$emit("update:modelValue",!1))})):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)}}),IC=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
46
46
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 4.5H4.5L4.5 19.5H19.5V4.5ZM4.5 3C3.67157 3 3 3.67157 3 4.5V19.5C3 20.3284 3.67157 21 4.5 21H19.5C20.3284 21 21 20.3284 21 19.5V4.5C21 3.67157 20.3284 3 19.5 3H4.5Z" fill="#110529"/>
|
|
47
47
|
</svg>
|
|
48
|
-
`,
|
|
48
|
+
`,OC=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
49
49
|
<rect x="3" y="3" width="18" height="18" rx="2" fill="#110529"/>
|
|
50
50
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5431 8.51724L10.3333 16.0875L6.45691 12.0172L7.54312 10.9828L10.3333 13.9125L16.4569 7.48276L17.5431 8.51724Z" fill="white"/>
|
|
51
51
|
</svg>
|
|
52
|
-
`,PC=["innerHTML"],DC={class:"dropdown-list-item__title-container"},FC={class:"dropdown-list-item__title text-s"},RC={key:0,class:"dropdown-list-item__description text-description"},MC={key:1,class:"dropdown-list-item__icon flex-self-start"},go=r.defineComponent({__name:"DropdownListItem",props:{option:{},isSelected:{type:Boolean,default:!1},size:{default:"small"},isHovered:{type:Boolean,default:!1},useCheckbox:{type:Boolean,default:!1}},setup(t){const e=t,n=r.computed(()=>{const l=[];return e.size==="small"&&l.push("dropdown-list-item__small"),e.isSelected&&l.push("dropdown-list-item__selected"),e.isHovered&&l.push("hovered-item"),l.join(" ")}),o=r.computed(()=>{const l=["dropdown-list-item__checkbox","flex-self-start"];return e.isSelected&&l.push("checked"),l.join(" ")}),s=r.computed(()=>e.isSelected?AC:NC);return(l,c)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([n.value,"dropdown-list-item"])},[e.useCheckbox?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(o.value),innerHTML:s.value},null,10,PC)):r.createCommentVNode("",!0),c[1]||(c[1]=r.createTextVNode()),r.createElementVNode("div",DC,[r.createElementVNode("div",FC,r.toDisplayString(l.option.label),1),c[0]||(c[0]=r.createTextVNode()),l.option.description?(r.openBlock(),r.createElementBlock("div",RC,r.toDisplayString(l.option.description),1)):r.createCommentVNode("",!0)]),c[2]||(c[2]=r.createTextVNode()),!e.useCheckbox&&e.isSelected?(r.openBlock(),r.createElementBlock("div",MC)):r.createCommentVNode("",!0)],2))}});function yo(t,e){const n=cl(()=>{if(t.value){const{scrollTop:o,scrollLeft:s,scrollHeight:l,scrollWidth:c,clientHeight:u,clientWidth:p}=document.documentElement,f=t.value.getBoundingClientRect();e({scrollTop:o,scrollLeft:s,scrollHeight:l,scrollWidth:c,clientHeight:u,clientWidth:p,offsetY:o+f.y,offsetX:s+f.x,top:f.top,right:f.right,bottom:f.bottom,left:f.left,width:f.width,height:f.height,x:f.x,y:f.y})}});r.onMounted(n),rt(window,"scroll",n,{capture:!0,passive:!0}),rt(window,"resize",n,{passive:!0}),rt(window,"adjust",n,!0)}const IC=r.defineComponent({__name:"PlMaskIcon16",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>e.size==="large"?"--mask-size: 24px":""),o=r.computed(()=>`mask-16 mask-${e.name}`);return(s,l)=>(r.openBlock(),r.createElementBlock("i",{style:r.normalizeStyle(n.value),class:r.normalizeClass([o.value,s.$style.icon])},null,6))}}),LC="_icon_1ugxm_2",OC={icon:LC},GC={$style:OC},$n=Kt(IC,[["__cssModules",GC]]),zC=["onKeyup"],$C=r.defineComponent({__name:"PlBtnSplit",props:r.mergeModels({options:{},disabled:{type:Boolean},loading:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:r.mergeModels(["click"],["update:modelValue"]),setup(t,{expose:e,emit:n}){const o=t,s=n,l=r.useModel(t,"modelValue"),c=r.ref(),u=r.ref(),p=r.ref(),f=r.ref(),m=r.reactive({open:!1,optionsHeight:0,activeIndex:-1});e({data:m});const y=r.reactive({top:"0px",left:"0px",width:"0px"});r.watch(u,I=>{if(I){const Y=I.getBoundingClientRect();m.optionsHeight=Y.height,window.dispatchEvent(new CustomEvent("adjust"))}},{immediate:!0});const B=r.computed(()=>m.open?"mask-24 mask-chevron-up":"mask-24 mask-chevron-down"),T=r.computed(()=>(o.options??[]).findIndex(I=>ui(I.value,l.value))),N=r.computed(()=>ur(o.options??[]).map((I,Y)=>({...I,index:Y,isSelected:Y===T.value,isActive:Y===m.activeIndex}))),M=r.computed(()=>o.loading||o.options===void 0),G=r.computed(()=>{var I;return((I=N.value.find(Y=>ui(Y.value,l.value)))==null?void 0:I.label)??(o.options===void 0?"...":"")});yo(c,I=>{const Y=I.top+I.height+3;Y+m.optionsHeight>I.clientHeight?y.top=I.top-m.optionsHeight-3+"px":y.top=Y+"px",y.left=I.left+"px",y.width=I.width+"px",console.log(I.top,y)});const C=I=>{var Y;l.value=I,m.open=!1,(Y=c==null?void 0:c.value)==null||Y.focus()};function F(){s("click")}const O=I=>{var Y,W;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(I.code))I.preventDefault();else return;if(I.target===f.value&&I.code==="Enter"){F();return}const{open:P,activeIndex:j}=m;if(!P&&I.target===p.value){I.code==="Enter"&&(m.open=!0);return}I.code==="Escape"&&(m.open=!1,(Y=c.value)==null||Y.focus());const U=r.unref(N),{length:X}=U;if(!X)return;I.code==="Enter"&&C((W=U.find(k=>k.index===j))==null?void 0:W.value);const L=U.findIndex(k=>k.index===j)??-1,S=I.code==="ArrowDown"?1:I.code==="ArrowUp"?-1:0,w=Math.abs(L+S+X)%X;m.activeIndex=N.value[w].index??-1},Z=I=>{var Y,W;const P=I.relatedTarget;!((Y=c.value)!=null&&Y.contains(P))&&!((W=u.value)!=null&&W.contains(P))&&(m.open=!1)};return(I,Y)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:c,class:r.normalizeClass([{disabled:I.disabled||M.value,loading:M.value},"pl-btn-split d-flex"]),onFocusout:Z,onKeydown:O},[r.createElementVNode("div",{ref_key:"buttonAction",ref:f,class:"pl-btn-split__title flex-grow-1 d-flex align-center text-s-btn",tabindex:"0",onClick:F,onKeyup:r.withKeys(r.withModifiers(F,["stop"]),["enter"])},r.toDisplayString(G.value),41,zC),Y[1]||(Y[1]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"menuActivator",ref:p,class:"pl-btn-split__icon-container d-flex align-center justify-center",tabindex:"0",onClick:Y[0]||(Y[0]=W=>m.open=!m.open)},[M.value?(r.openBlock(),r.createBlock($n,{key:0,name:"loading"})):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass([B.value,"pl-btn-split__icon"])},null,2))],512),Y[2]||(Y[2]=r.createTextVNode()),m.open?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:u,class:"pl-dropdown__options",style:r.normalizeStyle(y),tabindex:"-1"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(N.value,(W,P)=>(r.openBlock(),r.createBlock(go,{key:P,option:W,"is-selected":W.isSelected,"is-hovered":W.isActive,size:"medium",onClick:r.withModifiers(j=>C(W.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128))],4)])):r.createCommentVNode("",!0)],34))}});function Tu(t){function e(n){const o=n.currentTarget,s=document.createElement("span"),l=Math.max(o.clientWidth,o.clientHeight),c=l/2;s.style.width=s.style.height=`${l}px`,s.style.left=`${n.clientX-o.offsetLeft-c}px`,s.style.top=`${n.clientY-o.offsetTop-c}px`,s.classList.add("ripple");const u=o.getElementsByClassName("ripple")[0];u&&u.remove(),o.appendChild(s)}r.onMounted(()=>{var n;(n=t.value)==null||n.addEventListener("click",e)})}const ZC={key:0},UC={inheritAttrs:!1},gs=r.defineComponent({...UC,__name:"BtnBase",props:{loading:{type:Boolean},small:{type:Boolean},large:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t,n=r.ref(),o=r.computed(()=>e.small||e.size==="small"),s=r.computed(()=>e.large||e.size==="large");return Tu(n),(l,c)=>(r.openBlock(),r.createElementBlock("button",r.mergeProps({ref_key:"btn",ref:n,tabindex:"0",class:{loading:l.loading,small:o.value,large:s.value,round:l.round,reverse:l.reverse,justifyCenter:l.justifyCenter,[l.$attrs.class+""]:!0}},{...l.$attrs,disabled:!!l.$attrs.disabled||l.loading}),[l.round?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("span",ZC,[r.renderSlot(l.$slots,"default")])),c[0]||(c[0]=r.createTextVNode()),l.loading?(r.openBlock(),r.createBlock(r.unref($n),{key:1,name:"loading",size:l.size},null,8,["size"])):l.icon?(r.openBlock(),r.createBlock(r.unref($n),{key:2,name:l.icon,size:l.size},null,8,["name","size"])):r.createCommentVNode("",!0)],16))}}),WC={name:"PlBtnPrimary"},hl=r.defineComponent({...WC,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(gs,r.mergeProps({class:"pl-btn-primary"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),HC={name:"PlBtnAccent"},jC=r.defineComponent({...HC,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(gs,r.mergeProps({class:"pl-btn-accent"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),qC={name:"PlBtnDanger"},KC=r.defineComponent({...qC,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(gs,r.mergeProps({class:"pl-btn-danger"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),YC={name:"PlBtnSecondary"},fl=r.defineComponent({...YC,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(gs,r.mergeProps(e,{class:"pl-btn-secondary"}),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),JC={key:0},XC={name:"PlBtnGhost"},ys=r.defineComponent({...XC,props:{loading:{type:Boolean},size:{default:void 0},round:{type:Boolean},icon:{default:void 0},reverse:{type:Boolean},justifyCenter:{type:Boolean,default:!1}},setup(t){const e=t,n=r.computed(()=>e.size==="small"),o=r.computed(()=>e.size==="large"),s=r.ref(),l=r.useSlots();return Tu(s),(c,u)=>(r.openBlock(),r.createElementBlock("button",r.mergeProps({ref_key:"btnRef",ref:s,tabindex:"0",class:["pl-btn-ghost",{loading:c.loading,small:n.value,large:o.value,round:c.round,reverse:c.reverse,justifyCenter:c.justifyCenter,[c.$attrs.class+""]:!0}]},{...c.$attrs,disabled:!!c.$attrs.disabled||c.loading}),[r.unref(l).default&&!c.round?(r.openBlock(),r.createElementBlock("span",JC,[r.renderSlot(c.$slots,"default")])):r.createCommentVNode("",!0),u[0]||(u[0]=r.createTextVNode()),c.loading?(r.openBlock(),r.createBlock(r.unref($n),{key:1,name:"loading",size:c.size},null,8,["size"])):c.icon?(r.openBlock(),r.createBlock(r.unref($n),{key:2,name:c.icon,size:c.size},null,8,["name","size"])):r.createCommentVNode("",!0),u[1]||(u[1]=r.createTextVNode()),r.renderSlot(c.$slots,"append")],16))}}),QC=r.defineComponent({__name:"PlBtnLink",props:{loading:{type:Boolean},size:{},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean},disabled:{type:Boolean}},setup(t){const e=t,n=r.ref(!1);return(o,s)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-btn-link",{disabled:o.disabled,loading:o.loading,hover:n.value}]),onMouseover:s[0]||(s[0]=l=>n.value=!0),onMouseleave:s[1]||(s[1]=l=>n.value=!1)},[r.createVNode(fl,r.mergeProps({round:"",hover:n.value},e),null,16,["hover"]),s[2]||(s[2]=r.createTextVNode()),r.renderSlot(o.$slots,"default")],34))}});function e0(t,e){const n=r.ref();return yo(t,o=>{n.value=o}),r.computed(()=>{const o=r.unref(n),s=r.unref(e),l=s.position??"top",c=s.gap??8;if(!o)return"";const u=o.offsetY+Math.floor(o.height/2),p=o.offsetX+Math.floor(o.width/2);return l==="top-left"?`left: ${o.offsetX}px; top: ${o.offsetY-c}px;`:l==="top"?`left: ${p}px; top: ${o.offsetY-c}px;`:l==="right"?`left: ${o.offsetX+o.width+c}px; top: ${u}px;`:l==="left"?`right: ${o.scrollWidth-o.x+c}px; top: ${u}px;`:""})}function hi(t,e){return e(t)}function lt(t,e){if(t!=null)return e(t)}function t0(t){return Array.isArray(t)?t:[t]}function n0(t,e,...n){n.forEach(o=>{t[o]=e[o]})}function _s(t,e){rt(document,"click",n=>{document.contains(n.target)&&(t0(t).map(o=>o.value).filter(o=>!!o).some(o=>o==null?void 0:o.contains(n.target))||e())})}const r0={},o0={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function i0(t,e){return r.openBlock(),r.createElementBlock("svg",o0,e[0]||(e[0]=[r.createElementVNode("path",{d:"M4.00222 8.00933L0 4.00711L4.00222 0.00488281L4.00222 8.00933Z",fill:"#24223D"},null,-1)]))}const s0=Kt(r0,[["render",i0]]),ml=new Map,a0={name:"PlTooltip"},vt=r.defineComponent({...a0,props:{openDelay:{default:100},closeDelay:{default:1e3},position:{default:"top"},hide:{type:Boolean},gap:{default:8},element:{default:"div"}},emits:["tooltip:close"],setup(t,{emit:e}){const n=e,o=Symbol(),s=t,l=r.reactive({open:!1,over:!1,tooltipOpen:!1,key:Symbol()});ml.set(o,()=>f()),r.watch(()=>l.open,M=>{requestAnimationFrame(()=>{l.tooltipOpen=M})});let c=()=>{};const u=bu(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),p=()=>{l.open=!0;for(let[M,G]of ml.entries())M!==o&&G()},f=()=>{l.open=!1,n("tooltip:close")},m=async()=>{s.hide||(u(),l.over=!0,c(),await gu(100),l.over&&p())},y=()=>{l.over=!1,c=yu(()=>{l.over||f()},s.closeDelay)};r.watch(()=>s.hide,M=>{M&&f()});const B=r.ref(),T=r.ref(),N=e0(B,r.toRef(s));return _s([B,T],()=>f()),r.onUnmounted(()=>{ml.delete(o)}),(M,G)=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(M.element),r.mergeProps(M.$attrs,{ref_key:"rootRef",ref:B,onClick:m,onMouseover:m,onMouseleave:y}),{default:r.withCtx(()=>[r.renderSlot(M.$slots,"default"),G[1]||(G[1]=r.createTextVNode()),M.$slots.tooltip&&l.open?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[r.createVNode(r.Transition,{name:"tooltip-transition"},{default:r.withCtx(()=>[l.tooltipOpen?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-tooltip__container",style:r.normalizeStyle(r.unref(N))},[r.createElementVNode("div",{ref_key:"tooltip",ref:T,class:r.normalizeClass(["pl-tooltip",M.position]),onMouseover:m,onMouseleave:y},[r.createElementVNode("div",null,[r.renderSlot(M.$slots,"tooltip")]),G[0]||(G[0]=r.createTextVNode()),r.createVNode(s0)],34)],4)):r.createCommentVNode("",!0)]),_:3})])):r.createCommentVNode("",!0)]),_:3},16))}}),l0={},c0={class:"inner-border"};function d0(t,e,n,o,s,l){return r.openBlock(),r.createElementBlock("div",c0,[r.renderSlot(t.$slots,"default")])}const u0=Kt(l0,[["render",d0]]),p0={key:0},h0=["tabindex","onKeydown","onClick"],f0={key:1,class:"pl-btn-group__helper"},m0={key:2,class:"pl-btn-group__error"},g0={name:"PlBtnGroup"},y0=r.defineComponent({...g0,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean},compact:{type:Boolean},helper:{},error:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=u=>o("update:modelValue",u),l=t,c=r.computed(()=>l.options.map(u=>({label:"label"in u?u.label:u.text,value:u.value})));return(u,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-btn-group",{disabled:u.disabled,compact:u.compact}])},[u.label?(r.openBlock(),r.createElementBlock("label",p0,[r.createElementVNode("span",null,r.toDisplayString(u.label),1),p[0]||(p[0]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(u.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),p[1]||(p[1]=r.createTextVNode()),r.createVNode(u0,{class:"pl-btn-group__container"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.value,(f,m)=>(r.openBlock(),r.createElementBlock("div",{key:m,class:r.normalizeClass(["pl-btn-group__option text-s",{active:u.modelValue===f.value}]),tabindex:u.modelValue===f.value||u.disabled?void 0:0,onKeydown:r.withKeys(y=>s(f.value),["enter"]),onClick:y=>s(f.value)},r.toDisplayString(f.label),43,h0))),128))]),_:1}),p[2]||(p[2]=r.createTextVNode()),u.helper?(r.openBlock(),r.createElementBlock("div",f0,r.toDisplayString(u.helper),1)):u.error?(r.openBlock(),r.createElementBlock("div",m0,r.toDisplayString(u.error),1)):r.createCommentVNode("",!0)],2))}});function _0(t,e){const n=r.ref(),o=r.ref(),{parse:s,update:l}=e,c=()=>{n.value=void 0,o.value=void 0},u=r.computed({get(){return n.value!==void 0?n.value:t.value},set(p){c();try{const f=s?s(p):p;!l||l(f)?t.value=f:n.value=f}catch(f){n.value=p,o.value=f instanceof Error?f.message:String(f)}}});return r.reactive({value:u,error:o,reset:c})}const v0="_component_1abv8_1",C0="_container_1abv8_15",w0="_error_1abv8_69",gl={component:v0,container:C0,error:w0},b0={key:0},x0=["placeholder"],k0=r.defineComponent({__name:"PlEditableTitle",props:r.mergeModels({placeholder:{default:"Title"},maxWidth:{default:"80%"},prefix:{default:void 0},maxLength:{default:1e3},minLength:{default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,o=_0(e,{update(){return!1},parse:u=>{if(typeof u!="string")throw Error("value should be a string");if(n.maxLength&&u.length>n.maxLength)throw Error(`Max title length is ${n.maxLength} characters`);if(n.minLength&&u.length<n.minLength)throw Error(`Min title length is ${n.minLength} characters`);return u.trim()}}),s=r.computed(()=>({maxWidth:n.maxWidth??"80%"})),l=()=>{e.value=o.value&&!o.error?o.value:e.value,o.reset()},c=r.ref();return(u,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-editable-title",r.unref(gl).component]),style:r.normalizeStyle(s.value)},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(gl).container),onClick:p[3]||(p[3]=()=>{var f;return(f=c.value)==null?void 0:f.focus()})},[u.prefix?(r.openBlock(),r.createElementBlock("span",b0,r.toDisplayString(u.prefix.trim())+" ",1)):r.createCommentVNode("",!0),p[4]||(p[4]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"inputRef",ref:c,"onUpdate:modelValue":p[0]||(p[0]=f=>r.unref(o).value=f),placeholder:u.placeholder,onFocusout:l,onKeydown:[p[1]||(p[1]=r.withKeys((...f)=>r.unref(o).reset&&r.unref(o).reset(...f),["escape"])),p[2]||(p[2]=r.withKeys(f=>{var m;return(m=f.target)==null?void 0:m.blur()},["enter"]))]},null,40,x0),[[r.vModelText,r.unref(o).value]])],2),p[5]||(p[5]=r.createTextVNode()),r.unref(o).error?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(r.unref(gl).error)},r.toDisplayString(r.unref(o).error),3)):r.createCommentVNode("",!0)],6))}}),S0={inheritAttrs:!1},E0={class:"double-contour"};function T0(t,e,n,o,s,l){return r.openBlock(),r.createElementBlock("div",E0,[r.createElementVNode("div",r.normalizeProps(r.guardReactiveProps(t.$attrs)),[r.renderSlot(t.$slots,"default")],16)])}const pr=Kt(S0,[["render",T0]]);function Bu(t){r.onMounted(t),r.onUpdated(t)}const yl=new WeakMap,_l=new ResizeObserver(t=>{for(const e of t)lt(yl.get(e.target),n=>n(e))});function Vu(t,e){yl.set(t,e),_l.unobserve(t),_l.observe(t)}function Nu(t){_l.unobserve(t),yl.delete(t)}const B0=8,Au=4;function Zn(t,e="label"){const n=new Set;Bu(()=>{lt(t==null?void 0:t.value,o=>{const s=o.querySelector(e);s&&(n.add(s),Vu(s,()=>{const l=mu(()=>s.getBoundingClientRect().width+hi(B0,c=>Number.isNaN(c)?Au:c+Au));o.style.getPropertyValue("--label-offset-right-x")!==`${l}px`&&o.style.setProperty("--label-offset-right-x",`${l}px`)}))})}),r.onBeforeUnmount(()=>{Array.from(n.values()).map(o=>Nu(o))})}function V0(t,e){const n=[];return e&&e.length>0&&e.forEach(o=>{const s=o(t);typeof s=="string"&&n.push(s)}),{isValid:n.length===0,errors:n}}function Pu(t,e){return r.computed(()=>V0(t.value,e))}const N0=r.defineComponent({__name:"PlIcon16",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>e.size==="large"?"--icon-size: 24px":""),o=r.computed(()=>`icon-16 icon-${e.name}`);return(s,l)=>(r.openBlock(),r.createElementBlock("i",{style:r.normalizeStyle(n.value),class:r.normalizeClass([o.value,s.$style.icon])},null,6))}}),A0="_icon_1ugxm_2",P0={icon:A0},D0={$style:P0},vs=Kt(N0,[["__cssModules",D0]]),F0=r.defineComponent({__name:"PlIcon24",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>`icon-24 icon-${e.name}`);return(o,s)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass([n.value,o.$style.icon])},null,2))}}),R0="_icon_1ugxm_2",M0={icon:R0},I0={$style:M0},Du=Kt(F0,[["__cssModules",I0]]),L0={class:"pl-text-field__envelope"},O0={key:0,ref:"label"},G0={key:0,class:"required-icon"},z0={key:1,class:"pl-text-field__prefix"},$0=["disabled","placeholder","type"],Z0={class:"pl-text-field__append"},U0={key:0,class:"pl-text-field__error"},W0={key:1,class:"pl-text-field__helper"},H0={name:"PlTextField"},hr=r.defineComponent({...H0,props:r.mergeModels({label:{},clearable:{type:[Boolean,Function]},parse:{type:Function},required:{type:Boolean},error:{},helper:{},placeholder:{},disabled:{type:Boolean},dashed:{type:Boolean},prefix:{},rules:{},type:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useSlots(),n=r.useModel(t,"modelValue"),o=t,s=r.ref(void 0),l=r.ref(),c=r.ref(!1),u=r.reactive({cached:void 0}),p=r.computed({get(){return u.cached?u.cached.value:n.value===void 0||n.value===null?"":String(n.value)},set(Z){if(u.cached=void 0,o.parse)try{n.value=o.parse(Z)}catch(I){u.cached={error:I instanceof Error?I.message:String(I),value:Z}}else n.value=Z}}),f=r.computed(()=>o.type&&o.type==="password"?c.value?"text":o.type:"text"),m=r.computed(()=>c.value?"view-show":"view-hide"),y=()=>{o.clearable&&(u.cached=void 0,n.value=o.clearable===!0?"":o.clearable())},B=Pu(p,o.rules||[]),T=r.computed(()=>o.clearable?o.clearable===!0?n.value==="":n.value===o.clearable():n.value===""),N=r.computed(()=>!T.value),M=r.computed(()=>{const Z=[];return o.error&&Z.push(o.error),u.cached&&Z.push(u.cached.error),B.value.isValid||Z.push(...B.value.errors),Z}),G=r.computed(()=>M.value.length>0),C=r.computed(()=>o.clearable&&N.value&&o.type!=="password"),F=()=>c.value=!c.value,O=()=>{u.cached=void 0};return Zn(s),(Z,I)=>(r.openBlock(),r.createElementBlock("div",L0,[r.createElementVNode("div",{ref_key:"rootRef",ref:s,class:r.normalizeClass(["pl-text-field",{error:G.value,disabled:Z.disabled,dashed:Z.dashed,nonEmpty:N.value}])},[Z.label?(r.openBlock(),r.createElementBlock("label",O0,[Z.required?(r.openBlock(),r.createElementBlock("i",G0)):r.createCommentVNode("",!0),I[1]||(I[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(Z.label),1),I[2]||(I[2]=r.createTextVNode()),r.unref(e).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(Z.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),I[5]||(I[5]=r.createTextVNode()),Z.prefix?(r.openBlock(),r.createElementBlock("div",z0,r.toDisplayString(Z.prefix),1)):r.createCommentVNode("",!0),I[6]||(I[6]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":I[0]||(I[0]=Y=>p.value=Y),disabled:Z.disabled,placeholder:Z.placeholder||"...",type:f.value,spellcheck:"false",onFocusout:O},null,40,$0),[[r.vModelDynamic,p.value]]),I[7]||(I[7]=r.createTextVNode()),r.createElementVNode("div",Z0,[C.value?(r.openBlock(),r.createBlock(r.unref(vs),{key:0,class:"pl-text-field__clearable",name:"delete-clear",onClick:y})):r.createCommentVNode("",!0),I[3]||(I[3]=r.createTextVNode()),Z.type==="password"?(r.openBlock(),r.createBlock(r.unref(Du),{key:1,name:m.value,style:{cursor:"pointer"},onClick:F},null,8,["name"])):r.createCommentVNode("",!0),I[4]||(I[4]=r.createTextVNode()),r.renderSlot(Z.$slots,"append")]),I[8]||(I[8]=r.createTextVNode()),r.createVNode(pr,{class:"pl-text-field__contour"})],2),I[9]||(I[9]=r.createTextVNode()),G.value?(r.openBlock(),r.createElementBlock("div",U0,r.toDisplayString(M.value.join(" ")),1)):Z.helper?(r.openBlock(),r.createElementBlock("div",W0,r.toDisplayString(Z.helper),1)):r.createCommentVNode("",!0)]))}}),j0={class:"ui-text-area__envelope"},q0={key:0,ref:"label"},K0={key:0,class:"required-icon"},Y0=["readonly","rows","disabled","placeholder"],J0={class:"ui-text-area__append"},X0={key:0,class:"ui-text-area__error"},Q0={key:1,class:"ui-text-area__helper"},ew={name:"PlTextArea"},tw=r.defineComponent({...ew,props:{modelValue:{},label:{},required:{type:Boolean},error:{},helper:{},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},dashed:{type:Boolean},rows:{},autogrow:{type:Boolean},rules:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=t,l=r.ref(),c=r.ref(),u=r.computed({get(){return s.modelValue??""},set(T){o("update:modelValue",T)}}),p=r.computed(()=>!!s.modelValue),f=Pu(u,s.rules||[]);Zn(l);const m=r.computed(()=>{const T=[];return s.error&&T.push(s.error),T.push(...f.value.errors),T}),y=r.computed(()=>m.value.length>0),B=()=>{if(!s.autogrow)return;const T=c.value;T&&(T.style.height="auto",T.style.height=`${T.scrollHeight}px`)};return r.onMounted(()=>{B()}),(T,N)=>(r.openBlock(),r.createElementBlock("div",j0,[r.createElementVNode("div",{ref_key:"root",ref:l,class:r.normalizeClass(["ui-text-area",{error:y.value,disabled:T.disabled,dashed:T.dashed,nonEmpty:p.value}])},[T.label?(r.openBlock(),r.createElementBlock("label",q0,[T.required?(r.openBlock(),r.createElementBlock("i",K0)):r.createCommentVNode("",!0),N[1]||(N[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(T.label),1),N[2]||(N[2]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(T.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),N[3]||(N[3]=r.createTextVNode()),r.withDirectives(r.createElementVNode("textarea",{ref_key:"input",ref:c,"onUpdate:modelValue":N[0]||(N[0]=M=>u.value=M),readonly:T.readonly,rows:T.rows,disabled:T.disabled,placeholder:T.placeholder??"...",spellcheck:"false",onInput:B},null,40,Y0),[[r.vModelText,u.value]]),N[4]||(N[4]=r.createTextVNode()),r.createElementVNode("div",J0,[r.renderSlot(T.$slots,"append")]),N[5]||(N[5]=r.createTextVNode()),r.createVNode(pr,{class:"ui-text-area__contour"})],2),N[6]||(N[6]=r.createTextVNode()),y.value?(r.openBlock(),r.createElementBlock("div",X0,r.toDisplayString(m.value.join(" ")),1)):T.helper?(r.openBlock(),r.createElementBlock("div",Q0,r.toDisplayString(T.helper),1)):r.createCommentVNode("",!0)]))}});function Fu(t,e){const n=t.scrollTop,o=t.getBoundingClientRect().height,s=e.offsetTop,l=e.getBoundingClientRect().height;return s+l<o+n&&s>n}function Ru(t,e){const n=t.scrollTop,o=t.getBoundingClientRect().height,s=e.offsetTop,l=e.getBoundingClientRect().height;return s+l<o+n?"ceil":s>n?"floor":"visible"}function fi(t,e,n={}){const o=t.scrollTop,s=t.getBoundingClientRect().height,l=e.getBoundingClientRect().height,c=e.offsetTop,u=Ru(t,e);if(u==="visible")return;const p=f=>{const m=u==="floor"?c-(s-l):c;t.scrollTop=o+f*(m-o)};Fu(t,e)||Cu({duration:n.duration||100,timing:vu(f=>f),draw:p})}function vl(t,e,n,o){return t.addEventListener(e,n,o),function(){t.removeEventListener(e,n)}}function nw(t,e){const n=e.getBoundingClientRect();return t.x<n.x||t.x>n.x+n.width||t.y<n.y||t.y>n.y+n.height}function Mu(t){return t!==null&&typeof t=="object"}function Pt(t,e){return Mu(t)&&Mu(e)?Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>Pt(t[n],e[n])):t===e}function Cl(t,e){return t.some(n=>Pt(n,e))}const wl=r.defineComponent({__name:"LongText",setup(t){r.useCssVars(m=>({"8d68520c":c.value}));const e=r.ref(!1),n=r.ref(),o=r.ref(!1),s=r.computed(()=>o.value&&e.value?"ui-lt-animate":""),l=wu(m=>o.value=m,500),c=r.computed(()=>{var m;return n.value?`${((m=n.value)==null?void 0:m.innerHTML.length)*.4}s`:"5s"});function u(){const m=ll(n.value,"span cannot be empty");e.value=m.clientWidth<m.scrollWidth}function p(){u(),l(!0)}function f(){l(!1)}return(m,y)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps(m.$attrs,{class:"ui-lt-container"}),[r.createElementVNode("span",{onMouseover:p,onMouseleave:f},[r.createElementVNode("span",{ref_key:"span",ref:n,class:r.normalizeClass(s.value)},[r.renderSlot(m.$slots,"default")],2)],32)],16))}}),rw=r.defineComponent({__name:"PlMaskIcon24",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>`mask-24 mask-${e.name}`);return(o,s)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass([n.value,o.$style.icon])},null,2))}}),ow="_icon_1ugxm_2",iw={icon:ow},sw={$style:iw},ln=Kt(rw,[["__cssModules",sw]]),aw={class:"pl-dropdown__envelope"},lw=["tabindex"],cw={class:"pl-dropdown__container"},dw={class:"pl-dropdown__field"},uw=["disabled","placeholder"],pw={class:"pl-dropdown__controls"},hw={key:0},fw={key:0,class:"required-icon"},mw={key:0,class:"nothing-found"},gw={key:0,class:"pl-dropdown__error"},yw={key:1,class:"pl-dropdown__helper"},_w={key:2,class:"pl-dropdown__helper"},vw={name:"PlDropdown"},mi=r.defineComponent({...vw,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},arrowIcon:{default:void 0},arrowIconLarge:{default:void 0},optionSize:{default:"small"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,s=r.useSlots(),l=r.ref(),c=r.ref(),u=r.ref(),p=r.reactive({search:"",activeIndex:-1,open:!1,optionsHeight:0}),f=()=>hi(O.value.findIndex(w=>Pt(w.value,o.modelValue)),w=>w<0?0:w),m=()=>p.activeIndex=f(),y=r.computed(()=>o.options===void 0),B=r.computed(()=>y.value?!0:o.disabled),T=r.computed(()=>(o.options??[]).findIndex(w=>Pt(w.value,o.modelValue))),N=r.computed(()=>{if(!y.value){if(o.error)return o.error;if(o.modelValue!==void 0&&T.value===-1)return"The selected value is not one of the options"}}),M=r.computed(()=>ur(o.options??[]).map((w,k)=>({...w,index:k,isSelected:k===T.value,isActive:k===p.activeIndex}))),G=r.computed(()=>{const w=r.unref(M).find(k=>Pt(k.value,o.modelValue));return(w==null?void 0:w.label)||o.modelValue}),C=r.computed(()=>!p.open&&o.modelValue?"":o.modelValue?String(G.value):o.placeholder),F=r.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),O=r.computed(()=>{const w=M.value;return p.search?w.filter(k=>{const $=p.search.toLowerCase();return k.label.toLowerCase().includes($)||k.description&&k.description.toLowerCase().includes($)?!0:typeof k.value=="string"?k.value.toLowerCase().includes($):k.value===p.search}):w}),Z=r.computed(()=>B.value?void 0:"0"),I=w=>{var k;n("update:modelValue",w),p.search="",p.open=!1,(k=l==null?void 0:l.value)==null||k.focus()},Y=()=>n("update:modelValue",void 0),W=()=>{var w;return(w=u.value)==null?void 0:w.focus()},P=()=>p.open=!p.open,j=()=>p.open=!0,U=w=>{var k,$;const te=w.relatedTarget;!((k=l.value)!=null&&k.contains(te))&&!(($=c.value)!=null&&$.contains(te))&&(p.search="",p.open=!1)},X=()=>{const w=c.value;w&<(w.querySelector(".hovered-item"),k=>{fi(w,k)})},L=w=>{var k,$;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(w.code))w.preventDefault();else return;const{open:te,activeIndex:ne}=p;if(!te){w.code==="Enter"&&(p.open=!0);return}w.code==="Escape"&&(p.open=!1,(k=l.value)==null||k.focus());const be=r.unref(O),{length:$e}=be;if(!$e)return;w.code==="Enter"&&I(($=be.find(xr=>xr.index===ne))==null?void 0:$.value);const ot=be.findIndex(xr=>xr.index===ne)??-1,Cn=w.code==="ArrowDown"?1:w.code==="ArrowUp"?-1:0,Mn=Math.abs(ot+Cn+$e)%$e;p.activeIndex=O.value[Mn].index??-1};Zn(l),r.watch(()=>o.modelValue,m,{immediate:!0}),r.watch(()=>p.open,w=>{var k;return w?(k=u.value)==null?void 0:k.focus():""}),r.watchPostEffect(()=>{p.search,p.activeIndex>=0&&p.open&&X()});const S=r.reactive({top:"0px",left:"0px",width:"0px"});return r.watch(c,w=>{if(w){const k=w.getBoundingClientRect();p.optionsHeight=k.height,window.dispatchEvent(new CustomEvent("adjust"))}}),yo(l,w=>{const k=w.top+w.height+3;k+p.optionsHeight>w.clientHeight?S.top=w.top-p.optionsHeight-3+"px":S.top=k+"px",S.left=w.left+"px",S.width=w.width+"px"}),(w,k)=>(r.openBlock(),r.createElementBlock("div",aw,[r.createElementVNode("div",{ref_key:"root",ref:l,tabindex:Z.value,class:r.normalizeClass(["pl-dropdown",{open:p.open,error:w.error,disabled:B.value}]),onKeydown:L,onFocusout:U},[r.createElementVNode("div",cw,[r.createElementVNode("div",dw,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:u,"onUpdate:modelValue":k[0]||(k[0]=$=>p.search=$),type:"text",tabindex:"-1",disabled:B.value,placeholder:C.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:j},null,40,uw),[[r.vModelText,p.search]]),k[4]||(k[4]=r.createTextVNode()),p.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,onClick:W},[r.createVNode(wl,{class:"input-value"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(G.value),1)]),_:1})])),k[5]||(k[5]=r.createTextVNode()),r.createElementVNode("div",pw,[y.value?(r.openBlock(),r.createBlock(r.unref(ln),{key:0,name:"loading"})):r.createCommentVNode("",!0),k[1]||(k[1]=r.createTextVNode()),w.clearable&&F.value?(r.openBlock(),r.createBlock(r.unref(vs),{key:1,name:"delete-clear",onClick:r.withModifiers(Y,["stop"])})):r.createCommentVNode("",!0),k[2]||(k[2]=r.createTextVNode()),r.renderSlot(w.$slots,"append"),k[3]||(k[3]=r.createTextVNode()),w.arrowIconLarge?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["arrow-icon",[`icon-24 ${w.arrowIconLarge}`]]),onClick:r.withModifiers(P,["stop"])},null,2)):w.arrowIcon?(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["arrow-icon",[`icon-16 ${w.arrowIcon}`]]),onClick:r.withModifiers(P,["stop"])},null,2)):(r.openBlock(),r.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:r.withModifiers(P,["stop"])}))])]),k[9]||(k[9]=r.createTextVNode()),w.label?(r.openBlock(),r.createElementBlock("label",hw,[w.required?(r.openBlock(),r.createElementBlock("i",fw)):r.createCommentVNode("",!0),k[6]||(k[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(w.label),1),k[7]||(k[7]=r.createTextVNode()),r.unref(s).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(w.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),k[10]||(k[10]=r.createTextVNode()),p.open?(r.openBlock(),r.createBlock(r.Teleport,{key:1,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:c,class:"pl-dropdown__options",style:r.normalizeStyle(S),tabindex:"-1"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(O.value,($,te)=>(r.openBlock(),r.createBlock(go,{key:te,option:$,"is-selected":$.isSelected,"is-hovered":$.isActive,size:w.optionSize,onClick:r.withModifiers(ne=>I($.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),k[8]||(k[8]=r.createTextVNode()),O.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",mw,"Nothing found"))],4)])):r.createCommentVNode("",!0),k[11]||(k[11]=r.createTextVNode()),r.createVNode(pr,{class:"pl-dropdown__contour"})])],42,lw),k[12]||(k[12]=r.createTextVNode()),N.value?(r.openBlock(),r.createElementBlock("div",gw,r.toDisplayString(N.value),1)):y.value&&w.loadingOptionsHelper?(r.openBlock(),r.createElementBlock("div",yw,r.toDisplayString(w.loadingOptionsHelper),1)):w.helper?(r.openBlock(),r.createElementBlock("div",_w,r.toDisplayString(w.helper),1)):r.createCommentVNode("",!0)]))}}),Cw={name:"PlDropdownRef"},ww=r.defineComponent({...Cw,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},optionSize:{default:"small"}},emits:["update:modelValue"],setup(t){const e=t,n=r.computed(()=>{var s;return(s=e.options)==null?void 0:s.map(l=>({label:l.label,value:l.ref}))}),o=r.computed(()=>e.disabled?"icon-link-disabled":"icon-link");return(s,l)=>(r.openBlock(),r.createBlock(r.unref(mi),r.mergeProps(e,{options:n.value,"loading-options-helper":s.loadingOptionsHelper,"arrow-icon-large":o.value,"onUpdate:modelValue":l[0]||(l[0]=c=>s.$emit("update:modelValue",c))}),null,16,["options","loading-options-helper","arrow-icon-large"]))}});function bw(t,e){return r.computed(()=>{const n=ur(t.value);return e.value?n.filter(o=>o.label.toLowerCase().includes(e.value.toLowerCase())):n})}const xw={class:"resizable-input"},kw=["placeholder","value","disabled"],Sw=r.defineComponent({__name:"ResizableInput",props:{modelValue:{},placeholder:{},value:{},disabled:{type:Boolean},maxWidth:{},width:{}},emits:["input","update:modelValue"],setup(t,{emit:e}){const n=t,o=e,s=r.computed(()=>{var u;return n.placeholder?n.placeholder:(u=n.modelValue||n.value)==null?void 0:u.replace('"',"")}),l=r.computed(()=>{const u={};return n.width&&(u.width=n.width),n.maxWidth&&(u.maxWidth=n.maxWidth),u});function c(u){const p=u.target.value;o("update:modelValue",p)}return(u,p)=>(r.openBlock(),r.createElementBlock("div",xw,[r.createElementVNode("span",{style:r.normalizeStyle(l.value),class:"resizable-input__size-span"},r.toDisplayString(s.value),5),p[0]||(p[0]=r.createTextVNode()),r.createElementVNode("input",r.mergeProps(u.$attrs,{placeholder:u.placeholder,value:n.modelValue,disabled:n.disabled,style:l.value,onInput:c}),null,16,kw)]))}}),Ew={class:"dropdown-tab-item__title text-caps13"},Tw=r.defineComponent({__name:"TabItem",props:{option:{},isSelected:{type:Boolean,default:!1},isHovered:{type:Boolean,default:!1}},setup(t){const e=t,n=r.computed(()=>e.option.label),o=r.computed(()=>{const s=[];return e.isSelected&&s.push("dropdown-tab-item__selected"),e.isHovered&&s.push("hovered-item"),s.join(" ")});return(s,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([o.value,"dropdown-tab-item"])},[r.createElementVNode("div",Ew,r.toDisplayString(n.value),1)],2))}}),Bw={class:"pl-line-dropdown__prefix"},Vw={class:"pl-line-dropdown__icon-wrapper"},Nw={class:"pl-line-dropdown__icon"},Aw={key:0,class:"pl-line-dropdown__no-item"},Pw={key:0,class:"pl-line-dropdown__no-item"},Iu=r.defineComponent({__name:"PlDropdownLine",props:{modelValue:{},disabled:{type:Boolean},prefix:{default:""},options:{},placeholder:{default:"Select.."},mode:{default:"list"},tabsContainerStyles:{type:[Boolean,null,String,Object,Array],default:void 0},clearable:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,s=r.reactive({isOpen:!1,activeOption:-1,optionsHeight:0}),l=r.ref(),c=r.ref(),u=r.computed(()=>{const U=[];return s.isOpen&&U.push("open"),o.disabled&&U.push("disabled"),U.join(" ")}),p=r.ref(""),f=bw(r.toRef(o,"options"),p),m=r.computed(()=>!!(o.clearable&&s.isOpen&&o.modelValue&&y.value)),y=r.computed(()=>{if(o.modelValue){const U=N();if(U!==-1){const X=ur(o.options)[U];return typeof X.label=="object"?X.label.title:X.label}}return""}),B=r.ref(y.value),T=r.computed(()=>s.isOpen&&p.value&&p.value.length>=y.value.length-1?p.value:y.value??"...");_s(l,()=>{o.mode==="list"&&(s.isOpen=!1)}),r.watch(()=>B.value,U=>{y.value!==U?p.value=U:p.value=""}),r.watch(()=>s.isOpen,U=>{var X;U&&l.value&&((X=l.value.querySelector("input"))==null||X.focus(),r.nextTick(()=>W()))}),r.watch(()=>o.modelValue,()=>M(),{immediate:!0});function N(){return o.options.findIndex(U=>Pt(U.value,o.modelValue))}function M(){s.activeOption=hi(f.value.findIndex(U=>Pt(U.value,o.modelValue)),U=>U<0?0:U),B.value=y.value}function G(){p.value=""}function C(){o.disabled?s.isOpen=!1:r.nextTick(()=>{s.isOpen=!s.isOpen})}function F(){o.mode==="list"&&(s.isOpen=!1)}function O(U){U&&(n("update:modelValue",U.value),F(),G())}function Z(U){return Pt(U.value,o.modelValue)}const I=U=>{var X,L;const S=U.relatedTarget;!((X=l.value)!=null&&X.contains(S))&&!((L=c.value)!=null&&L.contains(S))&&(p.value="",s.isOpen=!1)};function Y(U){const{activeOption:X}=s;if(!s.isOpen&&U.code==="Enter"){s.isOpen=!0;return}const{length:L}=f.value;if(!L)return;["ArrowDown","ArrowUp","Enter"].includes(U.code)&&U.preventDefault(),U.code==="Enter"&&O(f.value[X]);const S=U.code==="ArrowDown"?1:U.code==="ArrowUp"?-1:0;s.activeOption=Math.abs(X+S+L)%L,requestAnimationFrame(W)}function W(){const U=c.value;U&<(U.querySelector(".hovered-item"),X=>{o.mode==="list"?fi(U,X):X.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}function P(){n("update:modelValue",void 0)}const j=r.reactive({top:"0px",left:"0px"});return r.watch(c,U=>{if(U){const X=U.getBoundingClientRect();s.optionsHeight=X.height,window.dispatchEvent(new CustomEvent("adjust"))}}),yo(l,U=>{const X=U.top+U.height+2;X+s.optionsHeight>U.clientHeight?j.top=U.top-s.optionsHeight-2+"px":j.top=X+"px",j.left=U.left+"px"}),(U,X)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"container",ref:l,tabindex:"0",class:r.normalizeClass([u.value,"pl-line-dropdown uc-pointer"]),onKeydown:Y,onFocusout:I,onClick:C},[r.createElementVNode("div",Bw,r.toDisplayString(o==null?void 0:o.prefix),1),X[6]||(X[6]=r.createTextVNode()),r.createVNode(Sw,{modelValue:B.value,"onUpdate:modelValue":X[0]||(X[0]=L=>B.value=L),placeholder:T.value,disabled:o.disabled,class:"pl-line-dropdown__input"},null,8,["modelValue","placeholder","disabled"]),X[7]||(X[7]=r.createTextVNode()),r.createElementVNode("div",Vw,[r.withDirectives(r.createElementVNode("div",Nw,null,512),[[r.vShow,!m.value]]),X[1]||(X[1]=r.createTextVNode()),r.withDirectives(r.createElementVNode("div",{class:"pl-line-dropdown__icon-clear",onClick:P},null,512),[[r.vShow,m.value]])]),X[8]||(X[8]=r.createTextVNode()),s.isOpen?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[o.mode==="list"?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"list",ref:c,style:r.normalizeStyle(j),tabindex:"-1",class:"pl-line-dropdown__items",onFocusout:I},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(f),(L,S)=>r.renderSlot(U.$slots,"item",{key:S,item:L,textItem:"text",isSelected:Z(L),isHovered:s.activeOption==S,onClick:r.withModifiers(w=>O(L),["stop"])},()=>[r.createVNode(go,{option:L,"text-item":"text","is-selected":Z(L),"is-hovered":s.activeOption==S,size:"medium",onClick:r.withModifiers(w=>O(L),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),X[3]||(X[3]=r.createTextVNode()),r.unref(f).length===0?(r.openBlock(),r.createElementBlock("div",Aw,X[2]||(X[2]=[r.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):r.createCommentVNode("",!0)],36)):o.mode==="tabs"?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"list",ref:c,style:r.normalizeStyle(j),tabindex:"-1",class:"pl-line-dropdown__items-tabs",onFocusout:I},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(f),(L,S)=>r.renderSlot(U.$slots,"item",{key:S,item:L,isSelected:Z(L),isHovered:s.activeOption==S,onClick:r.withModifiers(w=>O(L),["stop"])},()=>[r.createVNode(Tw,{option:L,"is-selected":Z(L),"is-hovered":s.activeOption==S,onClick:r.withModifiers(w=>O(L),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),X[5]||(X[5]=r.createTextVNode()),r.unref(f).length===0?(r.openBlock(),r.createElementBlock("div",Pw,X[4]||(X[4]=[r.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):r.createCommentVNode("",!0)],36)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)],34))}}),Dw={class:"ui-dropdown__envelope"},Fw=["tabindex"],Rw={class:"ui-dropdown__container"},Mw={class:"ui-dropdown__field"},Iw=["disabled","placeholder"],Lw={class:"ui-dropdown__controls"},Ow={key:0},Gw={key:0,class:"required-icon"},zw={key:0,class:"nothing-found"},$w={key:0,class:"ui-dropdown__error"},Zw={key:1,class:"ui-dropdown__helper"},Uw={key:2,class:"ui-dropdown__helper"},Ww={name:"PlDropdown"},Hw=r.defineComponent({...Ww,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},arrowIcon:{default:void 0},arrowIconLarge:{default:void 0},optionSize:{default:"small"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,s=r.useSlots(),l=r.ref(),c=r.ref(),u=r.ref(),p=r.reactive({search:"",activeIndex:-1,open:!1}),f=()=>hi(O.value.findIndex(S=>Pt(S.value,o.modelValue)),S=>S<0?0:S),m=()=>p.activeIndex=f(),y=r.computed(()=>o.options===void 0),B=r.computed(()=>y.value?!0:o.disabled),T=r.computed(()=>(o.options??[]).findIndex(S=>Pt(S.value,o.modelValue))),N=r.computed(()=>{if(!y.value){if(o.error)return o.error;if(o.modelValue!==void 0&&T.value===-1)return"The selected value is not one of the options"}}),M=r.computed(()=>ur(o.options??[]).map((S,w)=>({...S,index:w,isSelected:w===T.value,isActive:w===p.activeIndex}))),G=r.computed(()=>{const S=r.unref(M).find(w=>Pt(w.value,o.modelValue));return(S==null?void 0:S.label)||o.modelValue}),C=r.computed(()=>!p.open&&o.modelValue?"":o.modelValue?String(G.value):o.placeholder),F=r.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),O=r.computed(()=>{const S=M.value;return p.search?S.filter(w=>{const k=p.search.toLowerCase();return w.label.toLowerCase().includes(k)||w.description&&w.description.toLowerCase().includes(k)?!0:typeof w.value=="string"?w.value.toLowerCase().includes(k):w.value===p.search}):S}),Z=r.computed(()=>B.value?void 0:"0"),I=S=>{var w;n("update:modelValue",S),p.search="",p.open=!1,(w=l==null?void 0:l.value)==null||w.focus()},Y=()=>n("update:modelValue",void 0),W=()=>{var S;return(S=u.value)==null?void 0:S.focus()},P=()=>p.open=!p.open,j=()=>p.open=!0,U=S=>{var w;(w=l==null?void 0:l.value)!=null&&w.contains(S.relatedTarget)||(p.search="",p.open=!1)},X=()=>{const S=c.value;S&<(S.querySelector(".hovered-item"),w=>{fi(S,w)})},L=S=>{var w,k;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(S.code))S.preventDefault();else return;const{open:$,activeIndex:te}=p;if(!$){S.code==="Enter"&&(p.open=!0);return}S.code==="Escape"&&(p.open=!1,(w=l.value)==null||w.focus());const ne=r.unref(O),{length:be}=ne;if(!be)return;S.code==="Enter"&&I((k=ne.find(Mn=>Mn.index===te))==null?void 0:k.value);const $e=ne.findIndex(Mn=>Mn.index===te)??-1,ot=S.code==="ArrowDown"?1:S.code==="ArrowUp"?-1:0,Cn=Math.abs($e+ot+be)%be;p.activeIndex=O.value[Cn].index??-1};return Zn(l),r.watch(()=>o.modelValue,m,{immediate:!0}),r.watch(()=>p.open,S=>{var w;return S?(w=u.value)==null?void 0:w.focus():""}),r.watchPostEffect(()=>{p.search,p.activeIndex>=0&&p.open&&X()}),(S,w)=>(r.openBlock(),r.createElementBlock("div",Dw,[r.createElementVNode("div",{ref_key:"root",ref:l,tabindex:Z.value,class:r.normalizeClass(["ui-dropdown",{open:p.open,error:S.error,disabled:B.value}]),onKeydown:L,onFocusout:U},[r.createElementVNode("div",Rw,[r.createElementVNode("div",Mw,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:u,"onUpdate:modelValue":w[0]||(w[0]=k=>p.search=k),type:"text",tabindex:"-1",disabled:B.value,placeholder:C.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:j},null,40,Iw),[[r.vModelText,p.search]]),w[4]||(w[4]=r.createTextVNode()),p.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,onClick:W},[r.createVNode(wl,{class:"input-value"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(G.value),1)]),_:1})])),w[5]||(w[5]=r.createTextVNode()),r.createElementVNode("div",Lw,[y.value?(r.openBlock(),r.createBlock(r.unref(ln),{key:0,name:"loading"})):r.createCommentVNode("",!0),w[1]||(w[1]=r.createTextVNode()),S.clearable&&F.value?(r.openBlock(),r.createBlock(r.unref(vs),{key:1,name:"delete-clear",onClick:r.withModifiers(Y,["stop"])})):r.createCommentVNode("",!0),w[2]||(w[2]=r.createTextVNode()),r.renderSlot(S.$slots,"append"),w[3]||(w[3]=r.createTextVNode()),S.arrowIconLarge?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["arrow-icon",[`icon-24 ${S.arrowIconLarge}`]]),onClick:r.withModifiers(P,["stop"])},null,2)):S.arrowIcon?(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["arrow-icon",[`icon-16 ${S.arrowIcon}`]]),onClick:r.withModifiers(P,["stop"])},null,2)):(r.openBlock(),r.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:r.withModifiers(P,["stop"])}))])]),w[9]||(w[9]=r.createTextVNode()),S.label?(r.openBlock(),r.createElementBlock("label",Ow,[S.required?(r.openBlock(),r.createElementBlock("i",Gw)):r.createCommentVNode("",!0),w[6]||(w[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(S.label),1),w[7]||(w[7]=r.createTextVNode()),r.unref(s).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(S.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),w[10]||(w[10]=r.createTextVNode()),p.open?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"list",ref:c,class:"ui-dropdown__options"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(O.value,(k,$)=>(r.openBlock(),r.createBlock(go,{key:$,option:k,"is-selected":k.isSelected,"is-hovered":k.isActive,size:S.optionSize,onClick:r.withModifiers(te=>I(k.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),w[8]||(w[8]=r.createTextVNode()),O.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",zw,"Nothing found"))],512)):r.createCommentVNode("",!0),w[11]||(w[11]=r.createTextVNode()),r.createVNode(pr,{class:"ui-dropdown__contour"})])],42,Fw),w[12]||(w[12]=r.createTextVNode()),N.value?(r.openBlock(),r.createElementBlock("div",$w,r.toDisplayString(N.value),1)):y.value&&S.loadingOptionsHelper?(r.openBlock(),r.createElementBlock("div",Zw,r.toDisplayString(S.loadingOptionsHelper),1)):S.helper?(r.openBlock(),r.createElementBlock("div",Uw,r.toDisplayString(S.helper),1)):r.createCommentVNode("",!0)]))}}),jw={key:0,class:"ui-progress-bar"},qw={class:"ui-progress-bar__messages d-flex align-center pl-6 pr-6"},Kw={class:"ui-progress-bar__message flex-grow-1"},Yw={class:"ui-progress-bar__percent"},Jw=r.defineComponent({__name:"PlProgressBar",props:{loading:{type:Boolean},progress:{default:0},completeMessage:{default:"Completed"}},setup(t){const e=t,n=r.computed(()=>e.progress===100?e.completeMessage:"");return(o,s)=>o.loading?(r.openBlock(),r.createElementBlock("div",jw,[r.createElementVNode("div",{class:"ui-progress-bar__indicator",style:r.normalizeStyle({width:o.progress+"%"})},null,4),s[1]||(s[1]=r.createTextVNode()),r.createElementVNode("div",qw,[r.createElementVNode("div",Kw,r.toDisplayString(n.value),1),s[0]||(s[0]=r.createTextVNode()),r.createElementVNode("div",Yw,r.toDisplayString(o.progress+"%"),1)])])):r.createCommentVNode("",!0)}}),Xw={class:"mi-number-field__main-wrapper d-flex"},Qw={class:"mi-number-field__wrapper flex-grow d-flex flex-align-center"},eb={key:0,class:"text-description"},tb=["disabled","placeholder"],nb={class:"mi-number-field__icons d-flex-column"},rb={key:0,class:"mi-number-field__hint text-description"},ob=r.defineComponent({__name:"PlNumberField",props:{modelValue:{},disabled:{type:Boolean},label:{default:void 0},placeholder:{default:void 0},step:{default:1},minValue:{default:void 0},maxValue:{default:void 0},errorMessage:{default:void 0},validate:{type:Function,default:void 0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,s=r.ref(),l=r.useSlots(),c=r.ref();Zn(s);const u=r.ref(!0),p=r.computed({get(){return u.value&&n.modelValue!==void 0?new Number(n.modelValue).toString():""},set(C){var F;C=C.replace(/,/g,""),B(C)?(o("update:modelValue",+C),C.toString()!==((F=n.modelValue)==null?void 0:F.toString())&&+C===n.modelValue&&C[C.length-1]!=="."&&(u.value=!1,r.nextTick(()=>{u.value=!0}))):(C.trim()===""&&o("update:modelValue",void 0),u.value=!1,r.nextTick(()=>{u.value=!0}))}}),f=r.computed(()=>{let C=[];return n.errorMessage&&C.push(n.errorMessage),B(n.modelValue)?(n.minValue!==void 0&&n.modelValue!==void 0&&n.modelValue<n.minValue&&C.push(`Model value must be higher than ${n.minValue}`),n.maxValue!==void 0&&n.modelValue!==void 0&&n.modelValue>n.maxValue&&C.push(`Model value must be less than ${n.maxValue}`)):C.push("Model value is not a number."),C=[...C],C.join(" ")}),m=r.computed(()=>!!(n.maxValue&&n.modelValue!==void 0&&(n.modelValue||0)+n.step>n.maxValue)),y=r.computed(()=>!!(n.minValue&&n.modelValue!==void 0&&(n.modelValue||0)-n.step<n.minValue));function B(C){return C!==void 0?(C=C==null?void 0:C.toString(),!isNaN(+C)&&!isNaN(parseFloat(C))):!1}function T(){if(!m.value){let C=0;n.modelValue===void 0?C=n.minValue?n.minValue:0:C=+(n.modelValue||0)+n.step,p.value=C.toString()}}function N(){if(!y.value){let C=0;n.modelValue===void 0?C=0:C=+(n.modelValue||0)-n.step,p.value=n.minValue?Math.max(n.minValue,C).toString():C.toString()}}function M(C){["ArrowDown","ArrowUp"].includes(C.code)&&C.preventDefault(),C.code==="ArrowUp"?T():C.code==="ArrowDown"&&N()}const G=C=>{C.detail>1&&C.preventDefault()};return(C,F)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:s,class:r.normalizeClass([{error:!!f.value.trim(),disabled:C.disabled},"mi-number-field d-flex-column"]),onMousedown:G,onKeydown:F[1]||(F[1]=O=>M(O))},[r.createElementVNode("div",Xw,[r.createVNode(pr,{class:"mi-number-field__contour"}),F[6]||(F[6]=r.createTextVNode()),r.createElementVNode("div",Qw,[C.label?(r.openBlock(),r.createElementBlock("label",eb,[r.createTextVNode(r.toDisplayString(C.label)+" ",1),r.unref(l).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(C.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),F[2]||(F[2]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:c,"onUpdate:modelValue":F[0]||(F[0]=O=>p.value=O),disabled:C.disabled,placeholder:C.placeholder,class:"text-s flex-grow"},null,8,tb),[[r.vModelText,p.value]])]),F[7]||(F[7]=r.createTextVNode()),r.createElementVNode("div",nb,[r.createElementVNode("div",{class:r.normalizeClass([{disabled:m.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:T},F[3]||(F[3]=[r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 4.93933L13.5303 10.4697L12.4697 11.5303L8 7.06065L3.53033 11.5303L2.46967 10.4697L8 4.93933Z",fill:"#110529"})],-1)]),2),F[5]||(F[5]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass([{disabled:y.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:N},F[4]||(F[4]=[r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.46967 6.53033L3.53033 5.46967L8 9.93934L12.4697 5.46967L13.5303 6.53033L8 12.0607L2.46967 6.53033Z",fill:"#110529"})],-1)]),2)])]),F[8]||(F[8]=r.createTextVNode()),f.value.trim()?(r.openBlock(),r.createElementBlock("div",rb,r.toDisplayString(f.value),1)):r.createCommentVNode("",!0)],34))}}),ib={class:"pl-chip__text"},bl=r.defineComponent({__name:"PlChip",props:{closeable:{type:Boolean},small:{type:Boolean}},emits:["close"],setup(t){const e=r.ref(),n=r.ref(!1);return r.onMounted(()=>{var o;e.value&&(n.value=((o=e.value)==null?void 0:o.clientWidth)>=256)}),(o,s)=>(r.openBlock(),r.createBlock(r.unref(vt),{position:"top",class:"pl-chip-tooltip",delay:500},r.createSlots({default:r.withCtx(()=>[s[4]||(s[4]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"chip",ref:e,class:r.normalizeClass(["pl-chip",{small:o.small}])},[r.createElementVNode("div",ib,[r.renderSlot(o.$slots,"default")]),s[3]||(s[3]=r.createTextVNode()),o.closeable?(r.openBlock(),r.createElementBlock("div",{key:0,tabindex:"0",class:"pl-chip__close",onKeydown:s[0]||(s[0]=r.withKeys(l=>o.$emit("close"),["enter"])),onClick:s[1]||(s[1]=r.withModifiers(l=>o.$emit("close"),["stop"]))},s[2]||(s[2]=[r.createElementVNode("div",{class:"pl-chip__close--icon"},null,-1)]),32)):r.createCommentVNode("",!0)],2)]),_:2},[n.value?{name:"tooltip",fn:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),key:"0"}:void 0]),1024))}}),sb={class:"pl-multi-dropdown__envelope"},ab=["tabindex"],lb={class:"pl-multi-dropdown__container"},cb={class:"pl-multi-dropdown__field"},db=["disabled","placeholder"],ub={class:"pl-multi-dropdown__append"},pb={key:0},hb={key:0,class:"required-icon"},fb={class:"pl-multi-dropdown__open-chips-container"},mb={key:0,class:"nothing-found"},gb={key:0,class:"pl-multi-dropdown__error"},yb={key:1,class:"pl-multi-dropdown__helper"},_b={name:"PlDropdownMulti"},vb=r.defineComponent({..._b,props:{modelValue:{default:()=>[]},label:{default:void 0},options:{},helper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=P=>n("update:modelValue",P),s=r.useSlots(),l=t,c=r.ref(),u=r.ref(),p=r.ref(),f=r.reactive({search:"",activeOption:-1,open:!1,optionsHeight:0}),m=r.computed(()=>Array.isArray(l.modelValue)?l.modelValue:[]),y=r.computed(()=>f.open&&l.modelValue.length>0?l.placeholder:l.modelValue.length>0?"":l.placeholder),B=r.computed(()=>ur(l.options).filter(P=>Cl(m.value,P.value))),T=r.computed(()=>{const P=r.unref(m),j=ur(l.options);return(f.search?j.filter(U=>{const X=f.search.toLowerCase();return U.label.toLowerCase().includes(X)?!0:typeof U.value=="string"?U.value.toLowerCase().includes(X):U.value===f.search}):[...j]).map(U=>({...U,selected:Cl(P,U.value)}))}),N=r.computed(()=>l.disabled?void 0:"0"),M=()=>{f.activeOption=hi(T.value.findIndex(P=>Pt(P.value,l.modelValue)),P=>P<0?0:P)},G=P=>{var j;const U=r.unref(m);o(Cl(U,P)?U.filter(X=>!Pt(X,P)):[...U,P]),f.search="",(j=c==null?void 0:c.value)==null||j.focus()},C=P=>o(r.unref(m).filter(j=>!Pt(j,P))),F=()=>{var P;return(P=p.value)==null?void 0:P.focus()},O=()=>f.open=!f.open,Z=P=>{var j,U;const X=P.relatedTarget;!((j=c.value)!=null&&j.contains(X))&&!((U=u.value)!=null&&U.contains(X))&&(f.search="",f.open=!1)},I=()=>{const P=u.value;P&<(P.querySelector(".hovered-item"),j=>{fi(P,j)})},Y=P=>{var j;const{open:U,activeOption:X}=f;if(!U){P.code==="Enter"&&(f.open=!0);return}P.code==="Escape"&&(f.open=!1,(j=c.value)==null||j.focus());const L=r.unref(T),{length:S}=L;if(!S)return;["ArrowDown","ArrowUp","Enter"].includes(P.code)&&P.preventDefault(),P.code==="Enter"&&G(L[X].value);const w=P.code==="ArrowDown"?1:P.code==="ArrowUp"?-1:0;f.activeOption=Math.abs(X+w+S)%S,requestAnimationFrame(I)};Zn(c),r.watch(()=>l.modelValue,()=>M(),{immediate:!0}),r.watchPostEffect(()=>{f.search,f.open&&I()});const W=r.reactive({top:"0px",left:"0px",width:"0px"});return r.watch(u,P=>{if(P){const j=P.getBoundingClientRect();f.optionsHeight=j.height,window.dispatchEvent(new CustomEvent("adjust"))}}),yo(c,P=>{const j=P.top+P.height+5;j+f.optionsHeight>P.clientHeight?W.top=P.top-f.optionsHeight-5+"px":W.top=j+"px",W.left=P.left+"px",W.width=P.width+"px"}),(P,j)=>(r.openBlock(),r.createElementBlock("div",sb,[r.createElementVNode("div",{ref_key:"rootRef",ref:c,tabindex:N.value,class:r.normalizeClass(["pl-multi-dropdown",{open:f.open,error:P.error,disabled:P.disabled}]),onKeydown:Y,onFocusout:Z},[r.createElementVNode("div",lb,[r.createElementVNode("div",cb,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:p,"onUpdate:modelValue":j[0]||(j[0]=U=>f.search=U),type:"text",tabindex:"-1",disabled:P.disabled,placeholder:y.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:j[1]||(j[1]=U=>f.open=!0)},null,40,db),[[r.vModelText,f.search]]),j[3]||(j[3]=r.createTextVNode()),f.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:"chips-container",onClick:F},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(B.value,(U,X)=>(r.openBlock(),r.createBlock(r.unref(bl),{key:X,closeable:"",small:"",onClick:j[2]||(j[2]=r.withModifiers(L=>f.open=!0,["stop"])),onClose:L=>C(U.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(U.label||U.value),1)]),_:2},1032,["onClose"]))),128))])),j[4]||(j[4]=r.createTextVNode()),r.createElementVNode("div",{class:"arrow",onClick:r.withModifiers(O,["stop"])}),j[5]||(j[5]=r.createTextVNode()),r.createElementVNode("div",ub,[r.renderSlot(P.$slots,"append")])]),j[10]||(j[10]=r.createTextVNode()),P.label?(r.openBlock(),r.createElementBlock("label",pb,[P.required?(r.openBlock(),r.createElementBlock("i",hb)):r.createCommentVNode("",!0),j[6]||(j[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(P.label),1),j[7]||(j[7]=r.createTextVNode()),r.unref(s).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(P.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),j[11]||(j[11]=r.createTextVNode()),f.open?(r.openBlock(),r.createBlock(r.Teleport,{key:1,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:u,class:"pl-multi-dropdown__options",style:r.normalizeStyle(W),tabindex:"-1",onFocusout:Z},[r.createElementVNode("div",fb,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(B.value,(U,X)=>(r.openBlock(),r.createBlock(r.unref(bl),{key:X,closeable:"",small:"",onClose:L=>C(U.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(U.label||U.value),1)]),_:2},1032,["onClose"]))),128))]),j[8]||(j[8]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(T.value,(U,X)=>(r.openBlock(),r.createBlock(go,{key:X,option:U,"text-item":"text","is-selected":U.selected,"is-hovered":f.activeOption==X,size:"medium","use-checkbox":"",onClick:r.withModifiers(L=>G(U.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128)),j[9]||(j[9]=r.createTextVNode()),T.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",mb,"Nothing found"))],36)])):r.createCommentVNode("",!0),j[12]||(j[12]=r.createTextVNode()),r.createVNode(pr,{class:"pl-multi-dropdown__contour"})])],42,ab),j[13]||(j[13]=r.createTextVNode()),P.error?(r.openBlock(),r.createElementBlock("div",gb,r.toDisplayString(P.error),1)):P.helper?(r.openBlock(),r.createElementBlock("div",yb,r.toDisplayString(P.helper),1)):r.createCommentVNode("",!0)]))}}),xl=r.defineComponent({__name:"PlCheckboxBase",props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t){const e=t,n=r.computed(()=>e.modelValue);return(o,s)=>(r.openBlock(),r.createElementBlock("div",{tabindex:"0",class:r.normalizeClass(["pl-checkbox-base",{checked:n.value,disabled:o.disabled}]),onClick:s[0]||(s[0]=l=>o.$emit("update:modelValue",!o.modelValue)),onKeydown:s[1]||(s[1]=r.withKeys(l=>o.$emit("update:modelValue",!o.modelValue),["enter"]))},null,34))}}),Cb={name:"PlCheckbox"},Lu=r.defineComponent({...Cb,props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t){const e=t,n=r.useSlots();return(o,s)=>r.unref(n).default?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["pl-checkbox",{disabled:o.disabled}])},[r.createVNode(xl,r.mergeProps(e,{"onUpdate:modelValue":s[0]||(s[0]=l=>o.$emit("update:modelValue",l))}),null,16),s[3]||(s[3]=r.createTextVNode()),r.createElementVNode("label",{onClick:s[1]||(s[1]=l=>o.$emit("update:modelValue",!o.$props.modelValue))},[r.renderSlot(o.$slots,"default")])],2)):(r.openBlock(),r.createBlock(xl,r.mergeProps({key:1},e,{"onUpdate:modelValue":s[2]||(s[2]=l=>o.$emit("update:modelValue",l))}),null,16))}}),wb={key:0},bb=["onClick"],xb={name:"PlCheckboxGroup"},kb=r.defineComponent({...xb,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,s=c=>o.modelValue.includes(c),l=c=>{const u=o.modelValue??[];n("update:modelValue",s(c)?u.filter(p=>p!==c):[...u,c])};return(c,u)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-checkbox-group",{disabled:c.disabled}])},[c.label?(r.openBlock(),r.createElementBlock("label",wb,r.toDisplayString(c.label),1)):r.createCommentVNode("",!0),u[1]||(u[1]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.options.map(p=>({label:"label"in p?p.label:p.text,value:p.value})),(p,f)=>(r.openBlock(),r.createElementBlock("div",{key:f},[r.createVNode(xl,{disabled:c.disabled,label:p.label,"model-value":s(p.value),"onUpdate:modelValue":()=>l(p.value)},null,8,["disabled","label","model-value","onUpdate:modelValue"]),u[0]||(u[0]=r.createTextVNode()),r.createElementVNode("label",{onClick:r.withModifiers(()=>l(p.value),["stop"])},r.toDisplayString(p.label),9,bb)]))),128))],2))}}),Sb="_component_tupwt_1",Eb={component:Sb},Tb={};function Bb(t,e){return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(t.$style.component)},e[0]||(e[0]=[r.createElementVNode("div",null,null,-1)]),2)}const Vb={$style:Eb},Nb=Kt(Tb,[["render",Bb],["__cssModules",Vb]]),Ab={key:1,class:"pl-dialog-modal__title"},Pb={inheritAttrs:!1},kl=r.defineComponent({...Pb,__name:"PlDialogModal",props:{modelValue:{type:Boolean},width:{default:"448px"},height:{default:"auto"},minHeight:{default:"auto"},maxHeight:{default:"auto"},closable:{type:Boolean,default:!0},noContentGutters:{type:Boolean,default:!1},noTopContentGutter:{type:Boolean},actionsHasTopBorder:{type:Boolean,default:!0},closeOnOutsideClick:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=t,l=r.ref(),c=r.useAttrs();function u(p){l.value&&s.closeOnOutsideClick&&document.contains(p.target)&&!l.value.contains(p.target)&&o("update:modelValue",!1)}return rt(document.body,"keyup",p=>{s.modelValue&&p.code==="Escape"&&o("update:modelValue",!1)}),(p,f)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"dialog"},{default:r.withCtx(()=>[p.modelValue?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-dialog-modal__shadow",onClick:u},[r.createElementVNode("div",r.mergeProps(r.unref(c),{ref_key:"modal",ref:l,class:["pl-dialog-modal",{"has-title":r.unref(n).title,"has-content":r.unref(n).default}],style:{width:p.width,height:p.height,minHeight:p.minHeight,maxHeight:p.maxHeight}}),[p.closable?(r.openBlock(),r.createBlock(Nb,{key:0,class:"close-modal-btn",onClick:f[0]||(f[0]=r.withModifiers(m=>o("update:modelValue",!1),["stop"]))})):r.createCommentVNode("",!0),f[1]||(f[1]=r.createTextVNode()),r.unref(n).title?(r.openBlock(),r.createElementBlock("div",Ab,[r.renderSlot(p.$slots,"title")])):r.createCommentVNode("",!0),f[2]||(f[2]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(["pl-dialog-modal__content",{"no-content-gutters":p.noContentGutters,"no-top-content-gutter":p.noTopContentGutter}])},[r.renderSlot(p.$slots,"default")],2),f[3]||(f[3]=r.createTextVNode()),r.unref(n).actions?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["pl-dialog-modal__actions",{"has-top-border":p.actionsHasTopBorder}])},[r.renderSlot(p.$slots,"actions")],2)):r.createCommentVNode("",!0)],16)])):r.createCommentVNode("",!0)]),_:3})]))}}),Db=r.defineComponent({__name:"TransitionSlidePanel",setup(t){function e(){window.dispatchEvent(new CustomEvent("adjust"))}function n(){window.dispatchEvent(new CustomEvent("adjust"))}return(o,s)=>(r.openBlock(),r.createBlock(r.Transition,{name:"slide-panel",onAfterEnter:e,onAfterLeave:n},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3}))}}),Fb={key:0,class:"pl-slide-modal__title"},Rb={class:"pl-slide-modal__content"},Mb={key:1,class:"pl-slide-modal__actions"},Ib={name:"PlSlideModal",inheritAttrs:!1},Ou=r.defineComponent({...Ib,props:{modelValue:{type:Boolean,default:!1},width:{default:"368px"},shadow:{type:Boolean,default:!1},closeOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=t,l=r.ref(),c=r.useAttrs();return _s(l,()=>{s.modelValue&&s.closeOnOutsideClick&&o("update:modelValue",!1)}),rt(document,"keydown",u=>{u.key==="Escape"&&o("update:modelValue",!1)}),(u,p)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(Db,null,{default:r.withCtx(()=>[u.modelValue?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref_key:"modal",ref:l,style:{width:u.width}},r.unref(c),{class:["pl-slide-modal",{"has-title":r.unref(n).title,"has-actions":r.unref(n).actions}],onKeyup:p[1]||(p[1]=r.withKeys(f=>o("update:modelValue",!1),["esc"]))}),[r.createElementVNode("div",{class:"close-dialog-btn",onClick:p[0]||(p[0]=f=>o("update:modelValue",!1))}),p[3]||(p[3]=r.createTextVNode()),r.unref(n).title?(r.openBlock(),r.createElementBlock("div",Fb,[r.renderSlot(u.$slots,"title")])):r.createCommentVNode("",!0),p[4]||(p[4]=r.createTextVNode()),r.createElementVNode("div",Rb,[r.renderSlot(u.$slots,"default")]),p[5]||(p[5]=r.createTextVNode()),r.unref(n).actions?(r.openBlock(),r.createElementBlock("div",Mb,[r.renderSlot(u.$slots,"actions")])):r.createCommentVNode("",!0)],16)):r.createCommentVNode("",!0)]),_:3}),p[6]||(p[6]=r.createTextVNode()),u.modelValue&&u.shadow?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-slide-modal__shadow",onKeyup:p[2]||(p[2]=r.withKeys(f=>o("update:modelValue",!1),["esc"]))},null,32)):r.createCommentVNode("",!0)]))}}),Lb={key:0,class:"label"},Ob={name:"PlToggleSwitch"},Cs=r.defineComponent({...Ob,props:{label:{},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{tabindex:"0",class:r.normalizeClass(["ui-toggle-switch",{active:e.modelValue}]),onClick:n[0]||(n[0]=o=>e.$emit("update:modelValue",!e.modelValue)),onKeydown:n[1]||(n[1]=r.withKeys(o=>e.$emit("update:modelValue",!e.modelValue),["enter"]))},[n[2]||(n[2]=r.createElementVNode("div",{class:"ui-toggle-switch__body"},[r.createElementVNode("div",{class:"ui-toggle-switch__handle"})],-1)),n[3]||(n[3]=r.createTextVNode()),e.label?(r.openBlock(),r.createElementBlock("span",Lb,r.toDisplayString(e.label),1)):r.createCommentVNode("",!0)],34))}});function Gu(t){return r.getCurrentScope()?(r.onScopeDispose(t),!0):!1}function Gb(t){return r.unref(t)}const zb=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function $b(t,e,n={}){const{immediate:o=!0}=n,s=r.ref(!1);let l=null;function c(){l&&(clearTimeout(l),l=null)}function u(){s.value=!1,c()}function p(...f){c(),s.value=!0,l=setTimeout(()=>{s.value=!1,l=null,t(...f)},Gb(e))}return o&&(s.value=!0,zb&&p()),Gu(u),{isPending:r.readonly(s),start:p,stop:u}}function Zb(t,e,n){return r.watch(t,(o,s,l)=>{o&&e(o,s,l)},{...n,once:!1})}function Ub(t,e,n){const{start:o}=$b(l,e,{immediate:!1}),s=r.ref(!1);async function l(){s.value&&(await t(),o())}function c(){s.value||(s.value=!0,l())}function u(){s.value=!1}return n!=null&&n.immediate&&c(),Gu(u),{isActive:s,pause:u,resume:c}}const Wb="[==PROGRESS==]";function Hb(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jb(t){const e=r.ref(),n=r.reactive({errorCount:0});async function o(){var l;let c=e.value;if(c===void 0)return;const u=t.mockPlatforma??window.platforma;if(!u){console.warn("Platforma API is not available");return}for(;;){const p=await u.logDriver.readText(c.logHandle,100,c.lastOffset);if(c.error=void 0,n.errorCount=0,p.shouldUpdateHandle||c.logHandle!==((l=e.value)==null?void 0:l.logHandle))return;const f=t.progressPrefix??Wb,m=new TextDecoder().decode(p.data).replace(new RegExp(`${Hb(f)}`,"g"),"");if(c=Object.assign(c,{lines:c.lines+m,lastOffset:p.newOffset,finished:!p.live}),p.newOffset>=p.size)break}}const s=Ub(()=>o().catch(l=>{e.value&&(n.errorCount++,n.errorCount>(t.maxRetries??3)?e.value.error=l:console.warn("skip error:",l,"retry..."))}),1500,{immediate:!1});return Zb(()=>{var l;return(l=e==null?void 0:e.value)==null?void 0:l.finished},()=>s.pause()),r.watch(()=>t.logHandle,l=>{var c;l===void 0?(e.value=void 0,s.pause()):l!==((c=e.value)==null?void 0:c.logHandle)&&(e.value={logHandle:l,lastOffset:0,lines:"",finished:!1,error:void 0},n.errorCount=0,s.resume())},{immediate:!0}),e}const qb={key:0},Kb={class:"pl-log-view__copy"},Yb={key:1,class:"pl-log-view__error"},Jb={name:"PlLogView"},zu=r.defineComponent({...Jb,props:{value:{},logHandle:{},progressPrefix:{},error:{},output:{},maxRetries:{},mockPlatforma:{},label:{}},setup(t){const e=N=>{if(N&&N.ok===!1)return N.errors.join(`
|
|
53
|
-
`)},n=t,o=jb(n),s=r.ref(!0),l=r.ref(),c=r.ref(),u=r.computed(()=>{var N;return((N=o.value)==null?void 0:N.error)??n.error??e(n.output)}),p=r.computed(()=>{var N;return((N=o.value)==null?void 0:N.lines)??n.value??R_(n.output)}),f=r.ref(!1);Zn(c);const m=r.computed(()=>f.value?"clipboard-copied":"clipboard"),y=()=>{f.value=!0,setTimeout(()=>{f.value=!1},1200),p.value&&typeof p.value=="string"&&navigator.clipboard.writeText(p.value)},B=()=>{$r(l.value,N=>{s.value&&N.scrollTo(N.scrollLeft,N.scrollHeight)})};r.watch(p,()=>{requestAnimationFrame(()=>{B()})},{immediate:!0});const T=N=>{const M=N.target;s.value=M.scrollTop+20>=M.scrollHeight-M.offsetHeight};return(N,M)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:c,class:r.normalizeClass(["pl-log-view",{"has-error":u.value}])},[N.label?(r.openBlock(),r.createElementBlock("label",qb,r.toDisplayString(N.label),1)):r.createCommentVNode("",!0),M[1]||(M[1]=r.createTextVNode()),r.createVNode(pr,{class:"pl-log-view__contour"}),M[2]||(M[2]=r.createTextVNode()),r.createElementVNode("div",Kb,[r.createVNode(r.unref(vt),{"close-delay":800,position:"top"},{tooltip:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(f.value?"copied":"copy"),1)]),default:r.withCtx(()=>[r.createVNode(r.unref(ln),{title:"Copy content",name:m.value,onClick:y},null,8,["name"]),M[0]||(M[0]=r.createTextVNode())]),_:1})]),M[3]||(M[3]=r.createTextVNode()),u.value?(r.openBlock(),r.createElementBlock("div",Yb,r.toDisplayString(u.value),1)):(r.openBlock(),r.createElementBlock("div",{key:2,ref_key:"contentRef",ref:l,class:"pl-log-view__content",onScroll:T},r.toDisplayString(p.value),545))],2))}}),Xb="_component_1ukal_1",Qb="_tab_1ukal_14",ex="_disabled_1ukal_27",tx="_active_1ukal_56",nx="_topLine_1ukal_69",_o={component:Xb,tab:Qb,disabled:ex,active:tx,topLine:nx},rx=r.defineComponent({__name:"Tab",props:{option:{}},setup(t){const e=r.ref(),n=r.reactive({isOverflown:!1});return r.onMounted(()=>{const o=r.unref(e);if(!o)return;const s=o.$el.querySelector("span");s&&requestAnimationFrame(()=>{s.offsetWidth<s.scrollWidth&&(n.isOverflown=!0),console.log("el.offsetWidth, el.scrollWidth",s.offsetWidth,s.scrollWidth)})}),(o,s)=>(r.openBlock(),r.createBlock(r.unref(vt),{ref_key:"rootRef",ref:e,element:"div",position:"top",hide:!n.isOverflown,"close-delay":300,"data-is-overflown":n.isOverflown?"true":"false"},{tooltip:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.option.label),1)]),default:r.withCtx(()=>[r.renderSlot(o.$slots,"default"),s[0]||(s[0]=r.createTextVNode())]),_:3},8,["hide","data-is-overflown"]))}}),ox={name:"PlTabs"},ix=r.defineComponent({...ox,props:{modelValue:{},options:{},disabled:{type:Boolean},topLine:{type:Boolean},maxTabWidth:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=s=>n("update:modelValue",s);return(s,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(_o).component,{[r.unref(_o).disabled]:s.disabled,[r.unref(_o).topLine]:s.topLine}])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.options,(c,u)=>(r.openBlock(),r.createBlock(rx,{key:u,tabindex:s.modelValue===c.value||s.disabled||c.disabled?void 0:0,option:c,class:r.normalizeClass([{[r.unref(_o).active]:s.modelValue===c.value,[r.unref(_o).disabled]:c.disabled},r.unref(_o).tab]),style:r.normalizeStyle({"--pl-tabs-item-max-width":c.maxWidth??s.maxTabWidth}),onKeydown:r.withKeys(p=>o(c.value),["enter"]),onClick:p=>o(c.value)},{default:r.withCtx(()=>[r.renderSlot(s.$slots,c.value,{option:c},()=>[r.createElementVNode("span",null,r.toDisplayString(c.label),1)])]),_:2},1032,["tabindex","option","class","style","onKeydown","onClick"]))),128))],2))}}),sx=r.defineComponent({__name:"PlSectionSeparator",props:{compact:{type:Boolean}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-section-separator",{[e.$style.compact]:e.compact}])},[r.createElementVNode("div",{class:r.normalizeClass(e.$style.content)},[r.renderSlot(e.$slots,"default")],2)],2))}}),ax="_compact_rhd5u_16",lx="_content_rhd5u_20",cx={compact:ax,content:lx},dx={$style:cx},$u=Kt(sx,[["__cssModules",dx]]),ux=r.defineComponent({__name:"PlAccordion",props:r.mergeModels({multiple:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t;return r.provide("pl-accordion-model",e),r.provide("pl-accordion-props",r.toRef(n)),(o,s)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.renderSlot(o.$slots,"header"),s[0]||(s[0]=r.createTextVNode()),r.renderSlot(o.$slots,"default")],64))}}),px=r.defineComponent({__name:"ExpandTransition",setup(t){const e=o=>{o.style.setProperty("--component-height",o.scrollHeight+"px"),o.classList.add("expand-collapse-fix")},n=o=>{o.style.removeProperty("--component-height"),o.classList.remove("expand-collapse-fix")};return(o,s)=>(r.openBlock(),r.createBlock(r.Transition,{name:"expand-collapse",onEnter:e,onLeave:e,onAfterEnter:n,onAfterLeave:n},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3}))}}),hx=r.defineComponent({__name:"PlAccordionSection",props:r.mergeModels({label:{},compact:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.inject("pl-accordion-model"),n=r.inject("pl-accordion-props"),o=r.useModel(t,"modelValue"),s=au(),l=r.computed(()=>!n||n.value.multiple),c=r.computed({get(){return l.value?o.value:e?e.value===s:o.value},set(u){l.value?o.value=u:e&&(e.value=e.value===s?"":s)}});return(u,p)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(r.unref($u),{class:r.normalizeClass(u.$style.separator),compact:u.compact,onClick:p[0]||(p[0]=f=>c.value=!c.value)},{default:r.withCtx(()=>[r.createVNode(r.unref($n),{name:"chevron-right",class:r.normalizeClass([{[u.$style.down]:c.value},u.$style.chevron])},null,8,["class"]),r.createTextVNode(" "+r.toDisplayString(u.label),1)]),_:1},8,["class","compact"]),p[1]||(p[1]=r.createTextVNode()),r.createVNode(px,null,{default:r.withCtx(()=>[c.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(u.$style.content)},[r.renderSlot(u.$slots,"default")],2)):r.createCommentVNode("",!0)]),_:3})],64))}}),fx="_content_jmjfk_2",mx="_separator_jmjfk_14",gx="_chevron_jmjfk_19",yx="_down_jmjfk_23",_x={content:fx,separator:mx,chevron:gx,down:yx},vx={$style:_x},Cx=Kt(hx,[["__cssModules",vx]]);function wx(t){const e=t.split("/");e[0]!==""&&e.unshift("");const n=[];for(let o=0;o<e.length;o++)n.push({index:o,name:o===0?"Root":e[o],path:e.slice(0,o+1).filter(s=>s!=="").join("/")});return n}const bx={class:"file-dialog"},xx={class:"file-dialog__search"},kx={class:"ls-container"},Sx={class:"ls-head"},Ex={class:"ls-head__breadcrumbs"},Tx=["title","onClick"],Bx={key:0,class:"icon-16 icon-chevron-right"},Vx={class:"d-flex ml-auto align-center gap-12"},Nx={class:"ls-head__selected"},Ax={key:0,class:"ls-loader"},Px={key:1,class:"ls-empty"},Dx={key:2,class:"ls-error"},Fx={class:"ls-error__message"},Rx={key:3,class:"ls-body"},Mx=["onClick"],Ix=["title"],Lx=["onClick"],Ox=["title"],Zu=r.defineComponent({__name:"PlFileDialog",props:{modelValue:{type:Boolean},extensions:{default:void 0},multi:{type:Boolean},title:{default:void 0},autoSelectStorage:{type:Boolean,default:!0},closeOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue","import:files"],setup(t,{emit:e}){const n=e,o=t,s=()=>({dirPath:"",search:"",storageEntry:void 0,items:[],error:"",storageOptions:[],selected:[],lastSelected:void 0,currentLoadingPath:void 0,showHiddenItems:!1}),l=r.reactive(s()),c=()=>{l.search="",l.error="",l.lastSelected=void 0},u=r.computed(()=>{let W=l.items;if(l.showHiddenItems||(W=W.filter(P=>!P.name.startsWith("."))),l.search){const P=l.search.toLocaleLowerCase();W=W.filter(j=>j.name.toLocaleLowerCase().includes(P))}return W}),p=r.computed(()=>{var W;return{modelValue:o.modelValue,dirPath:l.dirPath,storageHandle:(W=l.storageEntry)==null?void 0:W.handle}}),f=(W,P)=>{window.platforma&&l.currentLoadingPath!==P&&(l.currentLoadingPath=P,window.platforma.lsDriver.listFiles(W,P).then(j=>{P===l.dirPath&&(l.items=ou(j).entries.map(U=>({path:U.fullPath,name:U.name,isDir:U.type==="dir",canBeSelected:U.type==="file"&&(!o.extensions||o.extensions.some(X=>U.fullPath.endsWith(X))),handle:U.type==="file"?U.handle:void 0,selected:!1})).sort((U,X)=>U.isDir&&!X.isDir?-1:!U.isDir&&X.isDir?1:U.name.localeCompare(X.name)).map((U,X)=>({id:X,...U})),l.lastSelected=void 0)}).catch(j=>l.error=String(j)).finally(()=>{l.currentLoadingPath=void 0}))},m=()=>{c();const{storageHandle:W,dirPath:P,modelValue:j}=p.value;W&&j&&f(W,P)},y=r.computed(()=>wx(l.dirPath)),B=r.computed(()=>l.items.filter(W=>W.canBeSelected&&W.selected&&!W.isDir)),T=r.computed(()=>B.value.length>0),N=()=>{n("update:modelValue",!1)},M=()=>{var W;T.value&&(W=l.storageEntry)!=null&&W.handle&&(n("import:files",{storageHandle:l.storageEntry.handle,files:B.value.map(P=>P.handle)}),N())},G=W=>{l.dirPath=W},C=(W,P)=>{const{shiftKey:j,metaKey:U}=W,{lastSelected:X}=l;if(W.preventDefault(),P.canBeSelected){if(o.multi||l.items.forEach(L=>L.selected=!1),P.selected=!0,!o.multi)return;!U&&!j&&l.items.forEach(L=>{L.id!==P.id&&(L.selected=!1)}),j&&X!==void 0&&l.items.forEach(L=>{P_(L.id,X,P.id)&&(L.selected=!0)}),P.selected&&(l.lastSelected=P.id)}},F=W=>{W&&!o.multi||l.items.filter(P=>P.canBeSelected).forEach(P=>{P.selected=W})},O=()=>F(!0),Z=()=>F(!1),I=()=>{if(c(),Z(),!window.platforma){console.warn("platforma API is not found");return}window.platforma.lsDriver.getStorageList().then(W=>{l.storageOptions=W.map(P=>({text:P.name,value:P})),o.autoSelectStorage&&$r(W.find(P=>P.name==="local"||P.name.startsWith("local_disk_")&&P.initialFullPath.length>4),P=>{l.storageEntry=P})}).catch(W=>l.error=String(W))};r.watch(r.toRef(l,"storageEntry"),W=>{c(),l.dirPath=(W==null?void 0:W.initialFullPath)??""},{immediate:!0}),r.watch([()=>l.dirPath,()=>l.storageEntry],()=>{m()}),r.watch(()=>o.modelValue,W=>{W?I():Object.assign(l,s())},{immediate:!0}),rt(document,"keydown",W=>{o.modelValue&&W.target===document.body&&(W.metaKey&&W.code==="KeyA"&&(W.preventDefault(),O()),W.metaKey&&W.shiftKey&&W.code==="Period"&&(W.preventDefault(),l.showHiddenItems=!l.showHiddenItems),W.code==="Enter"&&M())}),r.onUpdated(I);const Y={mounted:W=>{if(W.clientWidth<W.scrollWidth){const P=W.innerText;W.innerText=P.substring(0,57)+"..."+P.substring(P.length-10)}}};return(W,P)=>(r.openBlock(),r.createBlock(r.unref(kl),{"no-content-gutters":!0,"close-on-outside-click":W.closeOnOutsideClick,class:"split","model-value":W.modelValue,width:"688px",height:"720px","onUpdate:modelValue":N,onClick:r.withModifiers(Z,["stop"])},{title:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(W.title??"Select files"),1)]),actions:r.withCtx(()=>[r.createVNode(r.unref(hl),{style:{"min-width":"160px"},disabled:!T.value,onClick:r.withModifiers(M,["stop"])},{default:r.withCtx(()=>P[15]||(P[15]=[r.createTextVNode("Import")])),_:1},8,["disabled"]),P[17]||(P[17]=r.createTextVNode()),r.createVNode(r.unref(ys),{"justify-center":!1,onClick:r.withModifiers(N,["stop"])},{default:r.withCtx(()=>P[16]||(P[16]=[r.createTextVNode("Cancel")])),_:1})]),default:r.withCtx(()=>[P[18]||(P[18]=r.createTextVNode()),r.createElementVNode("div",bx,[r.createElementVNode("div",xx,[r.createVNode(r.unref(mi),{modelValue:l.storageEntry,"onUpdate:modelValue":P[0]||(P[0]=j=>l.storageEntry=j),label:"Select storage",options:l.storageOptions},null,8,["modelValue","options"]),P[2]||(P[2]=r.createTextVNode()),r.createVNode(r.unref(hr),{modelValue:l.search,"onUpdate:modelValue":P[1]||(P[1]=j=>l.search=j),label:"Search in folder",clearable:()=>""},null,8,["modelValue"])]),P[14]||(P[14]=r.createTextVNode()),r.createElementVNode("div",kx,[r.createElementVNode("div",Sx,[r.createElementVNode("div",Ex,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(y.value,(j,U)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:U},[r.createElementVNode("div",{title:j.path,onClick:X=>G(j.path)},r.toDisplayString(j.name),9,Tx),P[3]||(P[3]=r.createTextVNode()),j.index!==y.value.length-1?(r.openBlock(),r.createElementBlock("i",Bx)):r.createCommentVNode("",!0)],64))),128))]),P[4]||(P[4]=r.createTextVNode()),r.createElementVNode("div",Vx,[r.createElementVNode("span",Nx,"Selected: "+r.toDisplayString(B.value.length),1)])]),P[13]||(P[13]=r.createTextVNode()),l.currentLoadingPath!==void 0?(r.openBlock(),r.createElementBlock("div",Ax,P[5]||(P[5]=[r.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"},null,-1)]))):l.storageEntry?l.error?(r.openBlock(),r.createElementBlock("div",Dx,[P[7]||(P[7]=r.createElementVNode("div",{class:"ls-error__cat"},null,-1)),P[8]||(P[8]=r.createTextVNode()),r.createElementVNode("div",Fx,r.toDisplayString(l.error),1)])):(r.openBlock(),r.createElementBlock("div",Rx,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.value,j=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:j.id},[j.isDir?(r.openBlock(),r.createElementBlock("div",{key:0,class:"isDir",onClick:U=>G(j.path)},[P[9]||(P[9]=r.createElementVNode("i",{class:"icon-16 icon-chevron-right"},null,-1)),P[10]||(P[10]=r.createTextVNode()),r.withDirectives((r.openBlock(),r.createElementBlock("span",{title:j.name},[r.createTextVNode(r.toDisplayString(j.name),1)],8,Ix)),[[Y]])],8,Mx)):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass({canBeSelected:j.canBeSelected,selected:j.selected}),onClick:r.withModifiers(U=>C(U,j),["stop"])},[P[11]||(P[11]=r.createElementVNode("i",{class:"mask-16 mask-box isFile"},null,-1)),P[12]||(P[12]=r.createTextVNode()),r.withDirectives((r.openBlock(),r.createElementBlock("span",{title:j.name},[r.createTextVNode(r.toDisplayString(j.name),1)],8,Ox)),[[Y]])],10,Lx))],64))),128))])):(r.openBlock(),r.createElementBlock("div",Px,P[6]||(P[6]=[r.createElementVNode("div",{class:"ls-empty__cat"},null,-1),r.createTextVNode(),r.createElementVNode("div",{class:"ls-empty__message"},"Select storage to preview",-1)])))])]),P[19]||(P[19]=r.createTextVNode())]),_:1},8,["close-on-outside-click","model-value"]))}});var Oe;(function(t){t.assertEqual=s=>s;function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const l={};for(const c of s)l[c]=c;return l},t.getValidEnumValues=s=>{const l=t.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),c={};for(const u of l)c[u]=s[u];return t.objectValues(c)},t.objectValues=s=>t.objectKeys(s).map(function(l){return s[l]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const l=[];for(const c in s)Object.prototype.hasOwnProperty.call(s,c)&&l.push(c);return l},t.find=(s,l)=>{for(const c of s)if(l(c))return c},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function o(s,l=" | "){return s.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}t.joinValues=o,t.jsonStringifyReplacer=(s,l)=>typeof l=="bigint"?l.toString():l})(Oe||(Oe={}));var Sl;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Sl||(Sl={}));const le=Oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fr=t=>{switch(typeof t){case"undefined":return le.undefined;case"string":return le.string;case"number":return isNaN(t)?le.nan:le.number;case"boolean":return le.boolean;case"function":return le.function;case"bigint":return le.bigint;case"symbol":return le.symbol;case"object":return Array.isArray(t)?le.array:t===null?le.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?le.promise:typeof Map<"u"&&t instanceof Map?le.map:typeof Set<"u"&&t instanceof Set?le.set:typeof Date<"u"&&t instanceof Date?le.date:le.object;default:return le.unknown}},ee=Oe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Gx=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Lt extends Error{constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(l){return l.message},o={_errors:[]},s=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(s);else if(c.code==="invalid_return_type")s(c.returnTypeError);else if(c.code==="invalid_arguments")s(c.argumentsError);else if(c.path.length===0)o._errors.push(n(c));else{let u=o,p=0;for(;p<c.path.length;){const f=c.path[p];p===c.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(c))):u[f]=u[f]||{_errors:[]},u=u[f],p++}}};return s(this),o}static assert(e){if(!(e instanceof Lt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Oe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},o=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(e(s))):o.push(e(s));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}Lt.create=t=>new Lt(t);const vo=(t,e)=>{let n;switch(t.code){case ee.invalid_type:t.received===le.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case ee.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Oe.jsonStringifyReplacer)}`;break;case ee.unrecognized_keys:n=`Unrecognized key(s) in object: ${Oe.joinValues(t.keys,", ")}`;break;case ee.invalid_union:n="Invalid input";break;case ee.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Oe.joinValues(t.options)}`;break;case ee.invalid_enum_value:n=`Invalid enum value. Expected ${Oe.joinValues(t.options)}, received '${t.received}'`;break;case ee.invalid_arguments:n="Invalid function arguments";break;case ee.invalid_return_type:n="Invalid function return type";break;case ee.invalid_date:n="Invalid date";break;case ee.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Oe.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case ee.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case ee.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case ee.custom:n="Invalid input";break;case ee.invalid_intersection_types:n="Intersection results could not be merged";break;case ee.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case ee.not_finite:n="Number must be finite";break;default:n=e.defaultError,Oe.assertNever(t)}return{message:n}};let Uu=vo;function zx(t){Uu=t}function ws(){return Uu}const bs=t=>{const{data:e,path:n,errorMaps:o,issueData:s}=t,l=[...n,...s.path||[]],c={...s,path:l};if(s.message!==void 0)return{...s,path:l,message:s.message};let u="";const p=o.filter(f=>!!f).slice().reverse();for(const f of p)u=f(c,{data:e,defaultError:u}).message;return{...s,path:l,message:u}},$x=[];function se(t,e){const n=ws(),o=bs({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===vo?void 0:vo].filter(s=>!!s)});t.common.issues.push(o)}class Ct{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const o=[];for(const s of n){if(s.status==="aborted")return we;s.status==="dirty"&&e.dirty(),o.push(s.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,n){const o=[];for(const s of n){const l=await s.key,c=await s.value;o.push({key:l,value:c})}return Ct.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const s of n){const{key:l,value:c}=s;if(l.status==="aborted"||c.status==="aborted")return we;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||s.alwaysSet)&&(o[l.value]=c.value)}return{status:e.value,value:o}}}const we=Object.freeze({status:"aborted"}),xs=t=>({status:"dirty",value:t}),Et=t=>({status:"valid",value:t}),El=t=>t.status==="aborted",Tl=t=>t.status==="dirty",gi=t=>t.status==="valid",yi=t=>typeof Promise<"u"&&t instanceof Promise;function ks(t,e,n,o){if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Wu(t,e,n,o,s){if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}var he;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(he||(he={}));var _i,vi;class Pn{constructor(e,n,o,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=o,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Hu=(t,e)=>{if(gi(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Lt(t.common.issues);return this._error=n,this._error}}};function Be(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:s}=t;if(e&&(n||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(l,c)=>{var u,p;const{message:f}=t;return l.code==="invalid_enum_value"?{message:f??c.defaultError}:typeof c.data>"u"?{message:(u=f??o)!==null&&u!==void 0?u:c.defaultError}:l.code!=="invalid_type"?{message:c.defaultError}:{message:(p=f??n)!==null&&p!==void 0?p:c.defaultError}},description:s}}class Ae{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return fr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:fr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Ct,ctx:{common:e.parent.common,data:e.data,parsedType:fr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(yi(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const o=this.safeParse(e,n);if(o.success)return o.data;throw o.error}safeParse(e,n){var o;const s={common:{issues:[],async:(o=n==null?void 0:n.async)!==null&&o!==void 0?o:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:fr(e)},l=this._parseSync({data:e,path:s.path,parent:s});return Hu(s,l)}async parseAsync(e,n){const o=await this.safeParseAsync(e,n);if(o.success)return o.data;throw o.error}async safeParseAsync(e,n){const o={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:fr(e)},s=this._parse({data:e,path:o.path,parent:o}),l=await(yi(s)?s:Promise.resolve(s));return Hu(o,l)}refine(e,n){const o=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,l)=>{const c=e(s),u=()=>l.addIssue({code:ee.custom,...o(s)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(u(),!1)):c?!0:(u(),!1)})}refinement(e,n){return this._refinement((o,s)=>e(o)?!0:(s.addIssue(typeof n=="function"?n(o,s):n),!1))}_refinement(e){return new un({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Fn.create(this,this._def)}nullable(){return vr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return dn.create(this,this._def)}promise(){return xo.create(this,this._def)}or(e){return xi.create([this,e],this._def)}and(e){return ki.create(this,e,this._def)}transform(e){return new un({...Be(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new Vi({...Be(this._def),innerType:this,defaultValue:n,typeName:ve.ZodDefault})}brand(){return new Nl({typeName:ve.ZodBranded,type:this,...Be(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Ni({...Be(this._def),innerType:this,catchValue:n,typeName:ve.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Ai.create(this,e)}readonly(){return Pi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Zx=/^c[^\s-]{8,}$/i,Ux=/^[0-9a-z]+$/,Wx=/^[0-9A-HJKMNP-TV-Z]{26}$/,Hx=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,jx=/^[a-z0-9_-]{21}$/i,qx=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Kx=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Yx="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Bl;const Jx=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Xx=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Qx=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ju="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ek=new RegExp(`^${ju}$`);function qu(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function tk(t){return new RegExp(`^${qu(t)}$`)}function Ku(t){let e=`${ju}T${qu(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function nk(t,e){return!!((e==="v4"||!e)&&Jx.test(t)||(e==="v6"||!e)&&Xx.test(t))}class cn extends Ae{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==le.string){const s=this._getOrReturnCtx(e);return se(s,{code:ee.invalid_type,expected:le.string,received:s.parsedType}),we}const n=new Ct;let o;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:ee.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:ee.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const l=e.data.length>s.value,c=e.data.length<s.value;(l||c)&&(o=this._getOrReturnCtx(e,o),l?se(o,{code:ee.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):c&&se(o,{code:ee.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")Kx.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"email",code:ee.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Bl||(Bl=new RegExp(Yx,"u")),Bl.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"emoji",code:ee.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")Hx.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"uuid",code:ee.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")jx.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"nanoid",code:ee.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")Zx.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"cuid",code:ee.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")Ux.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"cuid2",code:ee.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")Wx.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"ulid",code:ee.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),se(o,{validation:"url",code:ee.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"regex",code:ee.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(e,o),se(o,{code:ee.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(o=this._getOrReturnCtx(e,o),se(o,{code:ee.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(o=this._getOrReturnCtx(e,o),se(o,{code:ee.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?Ku(s).test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:ee.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?ek.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:ee.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?tk(s).test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:ee.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?qx.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"duration",code:ee.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?nk(e.data,s.version)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"ip",code:ee.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?Qx.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"base64",code:ee.invalid_string,message:s.message}),n.dirty()):Oe.assertNever(s);return{status:n.value,value:e.data}}_regex(e,n,o){return this.refinement(s=>e.test(s),{validation:n,code:ee.invalid_string,...he.errToObj(o)})}_addCheck(e){return new cn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...he.errToObj(e)})}url(e){return this._addCheck({kind:"url",...he.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...he.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...he.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...he.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...he.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...he.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...he.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...he.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...he.errToObj(e)})}datetime(e){var n,o;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(o=e==null?void 0:e.local)!==null&&o!==void 0?o:!1,...he.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...he.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...he.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...he.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...he.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...he.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...he.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...he.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...he.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...he.errToObj(n)})}nonempty(e){return this.min(1,he.errToObj(e))}trim(){return new cn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new cn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new cn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}cn.create=t=>{var e;return new cn({checks:[],typeName:ve.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Be(t)})};function rk(t,e){const n=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,s=n>o?n:o,l=parseInt(t.toFixed(s).replace(".","")),c=parseInt(e.toFixed(s).replace(".",""));return l%c/Math.pow(10,s)}class mr extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==le.number){const s=this._getOrReturnCtx(e);return se(s,{code:ee.invalid_type,expected:le.number,received:s.parsedType}),we}let n;const o=new Ct;for(const s of this._def.checks)s.kind==="int"?Oe.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:ee.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:ee.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:ee.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?rk(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),se(n,{code:ee.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:ee.not_finite,message:s.message}),o.dirty()):Oe.assertNever(s);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,he.toString(n))}gt(e,n){return this.setLimit("min",e,!1,he.toString(n))}lte(e,n){return this.setLimit("max",e,!0,he.toString(n))}lt(e,n){return this.setLimit("max",e,!1,he.toString(n))}setLimit(e,n,o,s){return new mr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:he.toString(s)}]})}_addCheck(e){return new mr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:he.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:he.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:he.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:he.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:he.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:he.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:he.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:he.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:he.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Oe.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(n)&&Number.isFinite(e)}}mr.create=t=>new mr({checks:[],typeName:ve.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Be(t)});class gr extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==le.bigint){const s=this._getOrReturnCtx(e);return se(s,{code:ee.invalid_type,expected:le.bigint,received:s.parsedType}),we}let n;const o=new Ct;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:ee.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:ee.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),se(n,{code:ee.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Oe.assertNever(s);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,he.toString(n))}gt(e,n){return this.setLimit("min",e,!1,he.toString(n))}lte(e,n){return this.setLimit("max",e,!0,he.toString(n))}lt(e,n){return this.setLimit("max",e,!1,he.toString(n))}setLimit(e,n,o,s){return new gr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:he.toString(s)}]})}_addCheck(e){return new gr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:he.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:he.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:he.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:he.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:he.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}gr.create=t=>{var e;return new gr({checks:[],typeName:ve.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Be(t)})};class Ci extends Ae{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==le.boolean){const n=this._getOrReturnCtx(e);return se(n,{code:ee.invalid_type,expected:le.boolean,received:n.parsedType}),we}return Et(e.data)}}Ci.create=t=>new Ci({typeName:ve.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Be(t)});class Zr extends Ae{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==le.date){const s=this._getOrReturnCtx(e);return se(s,{code:ee.invalid_type,expected:le.date,received:s.parsedType}),we}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return se(s,{code:ee.invalid_date}),we}const n=new Ct;let o;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:ee.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:ee.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Oe.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Zr({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:he.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:he.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Zr.create=t=>new Zr({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ve.ZodDate,...Be(t)});class Ss extends Ae{_parse(e){if(this._getType(e)!==le.symbol){const n=this._getOrReturnCtx(e);return se(n,{code:ee.invalid_type,expected:le.symbol,received:n.parsedType}),we}return Et(e.data)}}Ss.create=t=>new Ss({typeName:ve.ZodSymbol,...Be(t)});class wi extends Ae{_parse(e){if(this._getType(e)!==le.undefined){const n=this._getOrReturnCtx(e);return se(n,{code:ee.invalid_type,expected:le.undefined,received:n.parsedType}),we}return Et(e.data)}}wi.create=t=>new wi({typeName:ve.ZodUndefined,...Be(t)});class bi extends Ae{_parse(e){if(this._getType(e)!==le.null){const n=this._getOrReturnCtx(e);return se(n,{code:ee.invalid_type,expected:le.null,received:n.parsedType}),we}return Et(e.data)}}bi.create=t=>new bi({typeName:ve.ZodNull,...Be(t)});class Co extends Ae{constructor(){super(...arguments),this._any=!0}_parse(e){return Et(e.data)}}Co.create=t=>new Co({typeName:ve.ZodAny,...Be(t)});class Ur extends Ae{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Et(e.data)}}Ur.create=t=>new Ur({typeName:ve.ZodUnknown,...Be(t)});class Un extends Ae{_parse(e){const n=this._getOrReturnCtx(e);return se(n,{code:ee.invalid_type,expected:le.never,received:n.parsedType}),we}}Un.create=t=>new Un({typeName:ve.ZodNever,...Be(t)});class Es extends Ae{_parse(e){if(this._getType(e)!==le.undefined){const n=this._getOrReturnCtx(e);return se(n,{code:ee.invalid_type,expected:le.void,received:n.parsedType}),we}return Et(e.data)}}Es.create=t=>new Es({typeName:ve.ZodVoid,...Be(t)});class dn extends Ae{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),s=this._def;if(n.parsedType!==le.array)return se(n,{code:ee.invalid_type,expected:le.array,received:n.parsedType}),we;if(s.exactLength!==null){const c=n.data.length>s.exactLength.value,u=n.data.length<s.exactLength.value;(c||u)&&(se(n,{code:c?ee.too_big:ee.too_small,minimum:u?s.exactLength.value:void 0,maximum:c?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),o.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(se(n,{code:ee.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),o.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(se(n,{code:ee.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((c,u)=>s.type._parseAsync(new Pn(n,c,n.path,u)))).then(c=>Ct.mergeArray(o,c));const l=[...n.data].map((c,u)=>s.type._parseSync(new Pn(n,c,n.path,u)));return Ct.mergeArray(o,l)}get element(){return this._def.type}min(e,n){return new dn({...this._def,minLength:{value:e,message:he.toString(n)}})}max(e,n){return new dn({...this._def,maxLength:{value:e,message:he.toString(n)}})}length(e,n){return new dn({...this._def,exactLength:{value:e,message:he.toString(n)}})}nonempty(e){return this.min(1,e)}}dn.create=(t,e)=>new dn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...Be(e)});function wo(t){if(t instanceof et){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=Fn.create(wo(o))}return new et({...t._def,shape:()=>e})}else return t instanceof dn?new dn({...t._def,type:wo(t.element)}):t instanceof Fn?Fn.create(wo(t.unwrap())):t instanceof vr?vr.create(wo(t.unwrap())):t instanceof Dn?Dn.create(t.items.map(e=>wo(e))):t}class et extends Ae{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Oe.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==le.object){const p=this._getOrReturnCtx(e);return se(p,{code:ee.invalid_type,expected:le.object,received:p.parsedType}),we}const{status:n,ctx:o}=this._processInputParams(e),{shape:s,keys:l}=this._getCached(),c=[];if(!(this._def.catchall instanceof Un&&this._def.unknownKeys==="strip"))for(const p in o.data)l.includes(p)||c.push(p);const u=[];for(const p of l){const f=s[p],m=o.data[p];u.push({key:{status:"valid",value:p},value:f._parse(new Pn(o,m,o.path,p)),alwaysSet:p in o.data})}if(this._def.catchall instanceof Un){const p=this._def.unknownKeys;if(p==="passthrough")for(const f of c)u.push({key:{status:"valid",value:f},value:{status:"valid",value:o.data[f]}});else if(p==="strict")c.length>0&&(se(o,{code:ee.unrecognized_keys,keys:c}),n.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const f of c){const m=o.data[f];u.push({key:{status:"valid",value:f},value:p._parse(new Pn(o,m,o.path,f)),alwaysSet:f in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const p=[];for(const f of u){const m=await f.key,y=await f.value;p.push({key:m,value:y,alwaysSet:f.alwaysSet})}return p}).then(p=>Ct.mergeObjectSync(n,p)):Ct.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return he.errToObj,new et({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,o)=>{var s,l,c,u;const p=(c=(l=(s=this._def).errorMap)===null||l===void 0?void 0:l.call(s,n,o).message)!==null&&c!==void 0?c:o.defaultError;return n.code==="unrecognized_keys"?{message:(u=he.errToObj(e).message)!==null&&u!==void 0?u:p}:{message:p}}}:{}})}strip(){return new et({...this._def,unknownKeys:"strip"})}passthrough(){return new et({...this._def,unknownKeys:"passthrough"})}extend(e){return new et({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new et({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ve.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new et({...this._def,catchall:e})}pick(e){const n={};return Oe.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(n[o]=this.shape[o])}),new et({...this._def,shape:()=>n})}omit(e){const n={};return Oe.objectKeys(this.shape).forEach(o=>{e[o]||(n[o]=this.shape[o])}),new et({...this._def,shape:()=>n})}deepPartial(){return wo(this)}partial(e){const n={};return Oe.objectKeys(this.shape).forEach(o=>{const s=this.shape[o];e&&!e[o]?n[o]=s:n[o]=s.optional()}),new et({...this._def,shape:()=>n})}required(e){const n={};return Oe.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])n[o]=this.shape[o];else{let s=this.shape[o];for(;s instanceof Fn;)s=s._def.innerType;n[o]=s}}),new et({...this._def,shape:()=>n})}keyof(){return Yu(Oe.objectKeys(this.shape))}}et.create=(t,e)=>new et({shape:()=>t,unknownKeys:"strip",catchall:Un.create(),typeName:ve.ZodObject,...Be(e)}),et.strictCreate=(t,e)=>new et({shape:()=>t,unknownKeys:"strict",catchall:Un.create(),typeName:ve.ZodObject,...Be(e)}),et.lazycreate=(t,e)=>new et({shape:t,unknownKeys:"strip",catchall:Un.create(),typeName:ve.ZodObject,...Be(e)});class xi extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e),o=this._def.options;function s(l){for(const u of l)if(u.result.status==="valid")return u.result;for(const u of l)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const c=l.map(u=>new Lt(u.ctx.common.issues));return se(n,{code:ee.invalid_union,unionErrors:c}),we}if(n.common.async)return Promise.all(o.map(async l=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(s);{let l;const c=[];for(const p of o){const f={...n,common:{...n.common,issues:[]},parent:null},m=p._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!l&&(l={result:m,ctx:f}),f.common.issues.length&&c.push(f.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const u=c.map(p=>new Lt(p));return se(n,{code:ee.invalid_union,unionErrors:u}),we}}get options(){return this._def.options}}xi.create=(t,e)=>new xi({options:t,typeName:ve.ZodUnion,...Be(e)});const yr=t=>t instanceof Ei?yr(t.schema):t instanceof un?yr(t.innerType()):t instanceof Ti?[t.value]:t instanceof _r?t.options:t instanceof Bi?Oe.objectValues(t.enum):t instanceof Vi?yr(t._def.innerType):t instanceof wi?[void 0]:t instanceof bi?[null]:t instanceof Fn?[void 0,...yr(t.unwrap())]:t instanceof vr?[null,...yr(t.unwrap())]:t instanceof Nl||t instanceof Pi?yr(t.unwrap()):t instanceof Ni?yr(t._def.innerType):[];class Ts extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.object)return se(n,{code:ee.invalid_type,expected:le.object,received:n.parsedType}),we;const o=this.discriminator,s=n.data[o],l=this.optionsMap.get(s);return l?n.common.async?l._parseAsync({data:n.data,path:n.path,parent:n}):l._parseSync({data:n.data,path:n.path,parent:n}):(se(n,{code:ee.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),we)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,o){const s=new Map;for(const l of n){const c=yr(l.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const u of c){if(s.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);s.set(u,l)}}return new Ts({typeName:ve.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:s,...Be(o)})}}function Vl(t,e){const n=fr(t),o=fr(e);if(t===e)return{valid:!0,data:t};if(n===le.object&&o===le.object){const s=Oe.objectKeys(e),l=Oe.objectKeys(t).filter(u=>s.indexOf(u)!==-1),c={...t,...e};for(const u of l){const p=Vl(t[u],e[u]);if(!p.valid)return{valid:!1};c[u]=p.data}return{valid:!0,data:c}}else if(n===le.array&&o===le.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let l=0;l<t.length;l++){const c=t[l],u=e[l],p=Vl(c,u);if(!p.valid)return{valid:!1};s.push(p.data)}return{valid:!0,data:s}}else return n===le.date&&o===le.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ki extends Ae{_parse(e){const{status:n,ctx:o}=this._processInputParams(e),s=(l,c)=>{if(El(l)||El(c))return we;const u=Vl(l.value,c.value);return u.valid?((Tl(l)||Tl(c))&&n.dirty(),{status:n.value,value:u.data}):(se(o,{code:ee.invalid_intersection_types}),we)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([l,c])=>s(l,c)):s(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}ki.create=(t,e,n)=>new ki({left:t,right:e,typeName:ve.ZodIntersection,...Be(n)});class Dn extends Ae{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.array)return se(o,{code:ee.invalid_type,expected:le.array,received:o.parsedType}),we;if(o.data.length<this._def.items.length)return se(o,{code:ee.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),we;!this._def.rest&&o.data.length>this._def.items.length&&(se(o,{code:ee.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...o.data].map((l,c)=>{const u=this._def.items[c]||this._def.rest;return u?u._parse(new Pn(o,l,o.path,c)):null}).filter(l=>!!l);return o.common.async?Promise.all(s).then(l=>Ct.mergeArray(n,l)):Ct.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new Dn({...this._def,rest:e})}}Dn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Dn({items:t,typeName:ve.ZodTuple,rest:null,...Be(e)})};class Si extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.object)return se(o,{code:ee.invalid_type,expected:le.object,received:o.parsedType}),we;const s=[],l=this._def.keyType,c=this._def.valueType;for(const u in o.data)s.push({key:l._parse(new Pn(o,u,o.path,u)),value:c._parse(new Pn(o,o.data[u],o.path,u)),alwaysSet:u in o.data});return o.common.async?Ct.mergeObjectAsync(n,s):Ct.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,o){return n instanceof Ae?new Si({keyType:e,valueType:n,typeName:ve.ZodRecord,...Be(o)}):new Si({keyType:cn.create(),valueType:e,typeName:ve.ZodRecord,...Be(n)})}}class Bs extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.map)return se(o,{code:ee.invalid_type,expected:le.map,received:o.parsedType}),we;const s=this._def.keyType,l=this._def.valueType,c=[...o.data.entries()].map(([u,p],f)=>({key:s._parse(new Pn(o,u,o.path,[f,"key"])),value:l._parse(new Pn(o,p,o.path,[f,"value"]))}));if(o.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const p of c){const f=await p.key,m=await p.value;if(f.status==="aborted"||m.status==="aborted")return we;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const p of c){const f=p.key,m=p.value;if(f.status==="aborted"||m.status==="aborted")return we;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}Bs.create=(t,e,n)=>new Bs({valueType:e,keyType:t,typeName:ve.ZodMap,...Be(n)});class Wr extends Ae{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.set)return se(o,{code:ee.invalid_type,expected:le.set,received:o.parsedType}),we;const s=this._def;s.minSize!==null&&o.data.size<s.minSize.value&&(se(o,{code:ee.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&o.data.size>s.maxSize.value&&(se(o,{code:ee.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const l=this._def.valueType;function c(p){const f=new Set;for(const m of p){if(m.status==="aborted")return we;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const u=[...o.data.values()].map((p,f)=>l._parse(new Pn(o,p,o.path,f)));return o.common.async?Promise.all(u).then(p=>c(p)):c(u)}min(e,n){return new Wr({...this._def,minSize:{value:e,message:he.toString(n)}})}max(e,n){return new Wr({...this._def,maxSize:{value:e,message:he.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Wr.create=(t,e)=>new Wr({valueType:t,minSize:null,maxSize:null,typeName:ve.ZodSet,...Be(e)});class bo extends Ae{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.function)return se(n,{code:ee.invalid_type,expected:le.function,received:n.parsedType}),we;function o(u,p){return bs({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ws(),vo].filter(f=>!!f),issueData:{code:ee.invalid_arguments,argumentsError:p}})}function s(u,p){return bs({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ws(),vo].filter(f=>!!f),issueData:{code:ee.invalid_return_type,returnTypeError:p}})}const l={errorMap:n.common.contextualErrorMap},c=n.data;if(this._def.returns instanceof xo){const u=this;return Et(async function(...p){const f=new Lt([]),m=await u._def.args.parseAsync(p,l).catch(B=>{throw f.addIssue(o(p,B)),f}),y=await Reflect.apply(c,this,m);return await u._def.returns._def.type.parseAsync(y,l).catch(B=>{throw f.addIssue(s(y,B)),f})})}else{const u=this;return Et(function(...p){const f=u._def.args.safeParse(p,l);if(!f.success)throw new Lt([o(p,f.error)]);const m=Reflect.apply(c,this,f.data),y=u._def.returns.safeParse(m,l);if(!y.success)throw new Lt([s(m,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new bo({...this._def,args:Dn.create(e).rest(Ur.create())})}returns(e){return new bo({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,o){return new bo({args:e||Dn.create([]).rest(Ur.create()),returns:n||Ur.create(),typeName:ve.ZodFunction,...Be(o)})}}class Ei extends Ae{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Ei.create=(t,e)=>new Ei({getter:t,typeName:ve.ZodLazy,...Be(e)});class Ti extends Ae{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return se(n,{received:n.data,code:ee.invalid_literal,expected:this._def.value}),we}return{status:"valid",value:e.data}}get value(){return this._def.value}}Ti.create=(t,e)=>new Ti({value:t,typeName:ve.ZodLiteral,...Be(e)});function Yu(t,e){return new _r({values:t,typeName:ve.ZodEnum,...Be(e)})}class _r extends Ae{constructor(){super(...arguments),_i.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),o=this._def.values;return se(n,{expected:Oe.joinValues(o),received:n.parsedType,code:ee.invalid_type}),we}if(ks(this,_i)||Wu(this,_i,new Set(this._def.values)),!ks(this,_i).has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return se(n,{received:n.data,code:ee.invalid_enum_value,options:o}),we}return Et(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return _r.create(e,{...this._def,...n})}exclude(e,n=this._def){return _r.create(this.options.filter(o=>!e.includes(o)),{...this._def,...n})}}_i=new WeakMap,_r.create=Yu;class Bi extends Ae{constructor(){super(...arguments),vi.set(this,void 0)}_parse(e){const n=Oe.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==le.string&&o.parsedType!==le.number){const s=Oe.objectValues(n);return se(o,{expected:Oe.joinValues(s),received:o.parsedType,code:ee.invalid_type}),we}if(ks(this,vi)||Wu(this,vi,new Set(Oe.getValidEnumValues(this._def.values))),!ks(this,vi).has(e.data)){const s=Oe.objectValues(n);return se(o,{received:o.data,code:ee.invalid_enum_value,options:s}),we}return Et(e.data)}get enum(){return this._def.values}}vi=new WeakMap,Bi.create=(t,e)=>new Bi({values:t,typeName:ve.ZodNativeEnum,...Be(e)});class xo extends Ae{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.promise&&n.common.async===!1)return se(n,{code:ee.invalid_type,expected:le.promise,received:n.parsedType}),we;const o=n.parsedType===le.promise?n.data:Promise.resolve(n.data);return Et(o.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}xo.create=(t,e)=>new xo({type:t,typeName:ve.ZodPromise,...Be(e)});class un extends Ae{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:o}=this._processInputParams(e),s=this._def.effect||null,l={addIssue:c=>{se(o,c),c.fatal?n.abort():n.dirty()},get path(){return o.path}};if(l.addIssue=l.addIssue.bind(l),s.type==="preprocess"){const c=s.transform(o.data,l);if(o.common.async)return Promise.resolve(c).then(async u=>{if(n.value==="aborted")return we;const p=await this._def.schema._parseAsync({data:u,path:o.path,parent:o});return p.status==="aborted"?we:p.status==="dirty"||n.value==="dirty"?xs(p.value):p});{if(n.value==="aborted")return we;const u=this._def.schema._parseSync({data:c,path:o.path,parent:o});return u.status==="aborted"?we:u.status==="dirty"||n.value==="dirty"?xs(u.value):u}}if(s.type==="refinement"){const c=u=>{const p=s.refinement(u,l);if(o.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(o.common.async===!1){const u=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return u.status==="aborted"?we:(u.status==="dirty"&&n.dirty(),c(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(u=>u.status==="aborted"?we:(u.status==="dirty"&&n.dirty(),c(u.value).then(()=>({status:n.value,value:u.value}))))}if(s.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!gi(c))return c;const u=s.transform(c.value,l);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>gi(c)?Promise.resolve(s.transform(c.value,l)).then(u=>({status:n.value,value:u})):c);Oe.assertNever(s)}}un.create=(t,e,n)=>new un({schema:t,typeName:ve.ZodEffects,effect:e,...Be(n)}),un.createWithPreprocess=(t,e,n)=>new un({schema:e,effect:{type:"preprocess",transform:t},typeName:ve.ZodEffects,...Be(n)});class Fn extends Ae{_parse(e){return this._getType(e)===le.undefined?Et(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Fn.create=(t,e)=>new Fn({innerType:t,typeName:ve.ZodOptional,...Be(e)});class vr extends Ae{_parse(e){return this._getType(e)===le.null?Et(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}vr.create=(t,e)=>new vr({innerType:t,typeName:ve.ZodNullable,...Be(e)});class Vi extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e);let o=n.data;return n.parsedType===le.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Vi.create=(t,e)=>new Vi({innerType:t,typeName:ve.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Be(e)});class Ni extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return yi(s)?s.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Lt(o.common.issues)},input:o.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Lt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}Ni.create=(t,e)=>new Ni({innerType:t,typeName:ve.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Be(e)});class Vs extends Ae{_parse(e){if(this._getType(e)!==le.nan){const n=this._getOrReturnCtx(e);return se(n,{code:ee.invalid_type,expected:le.nan,received:n.parsedType}),we}return{status:"valid",value:e.data}}}Vs.create=t=>new Vs({typeName:ve.ZodNaN,...Be(t)});const ok=Symbol("zod_brand");class Nl extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}}class Ai extends Ae{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?we:s.status==="dirty"?(n.dirty(),xs(s.value)):this._def.out._parseAsync({data:s.value,path:o.path,parent:o})})();{const s=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?we:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:o.path,parent:o})}}static create(e,n){return new Ai({in:e,out:n,typeName:ve.ZodPipeline})}}class Pi extends Ae{_parse(e){const n=this._def.innerType._parse(e),o=s=>(gi(s)&&(s.value=Object.freeze(s.value)),s);return yi(n)?n.then(s=>o(s)):o(n)}unwrap(){return this._def.innerType}}Pi.create=(t,e)=>new Pi({innerType:t,typeName:ve.ZodReadonly,...Be(e)});function Ju(t,e={},n){return t?Co.create().superRefine((o,s)=>{var l,c;if(!t(o)){const u=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,p=(c=(l=u.fatal)!==null&&l!==void 0?l:n)!==null&&c!==void 0?c:!0,f=typeof u=="string"?{message:u}:u;s.addIssue({code:"custom",...f,fatal:p})}}):Co.create()}const ik={object:et.lazycreate};var ve;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ve||(ve={}));const sk=(t,e={message:`Input not instance of ${t.name}`})=>Ju(n=>n instanceof t,e),Xu=cn.create,Qu=mr.create,ak=Vs.create,lk=gr.create,ep=Ci.create,ck=Zr.create,dk=Ss.create,uk=wi.create,pk=bi.create,hk=Co.create,fk=Ur.create,mk=Un.create,gk=Es.create,yk=dn.create,_k=et.create,vk=et.strictCreate,Ck=xi.create,wk=Ts.create,bk=ki.create,xk=Dn.create,kk=Si.create,Sk=Bs.create,Ek=Wr.create,Tk=bo.create,Bk=Ei.create,Vk=Ti.create,Nk=_r.create,Ak=Bi.create,Pk=xo.create,tp=un.create,Dk=Fn.create,Fk=vr.create,Rk=un.createWithPreprocess,Mk=Ai.create;var Rn=Object.freeze({__proto__:null,defaultErrorMap:vo,setErrorMap:zx,getErrorMap:ws,makeIssue:bs,EMPTY_PATH:$x,addIssueToContext:se,ParseStatus:Ct,INVALID:we,DIRTY:xs,OK:Et,isAborted:El,isDirty:Tl,isValid:gi,isAsync:yi,get util(){return Oe},get objectUtil(){return Sl},ZodParsedType:le,getParsedType:fr,ZodType:Ae,datetimeRegex:Ku,ZodString:cn,ZodNumber:mr,ZodBigInt:gr,ZodBoolean:Ci,ZodDate:Zr,ZodSymbol:Ss,ZodUndefined:wi,ZodNull:bi,ZodAny:Co,ZodUnknown:Ur,ZodNever:Un,ZodVoid:Es,ZodArray:dn,ZodObject:et,ZodUnion:xi,ZodDiscriminatedUnion:Ts,ZodIntersection:ki,ZodTuple:Dn,ZodRecord:Si,ZodMap:Bs,ZodSet:Wr,ZodFunction:bo,ZodLazy:Ei,ZodLiteral:Ti,ZodEnum:_r,ZodNativeEnum:Bi,ZodPromise:xo,ZodEffects:un,ZodTransformer:un,ZodOptional:Fn,ZodNullable:vr,ZodDefault:Vi,ZodCatch:Ni,ZodNaN:Vs,BRAND:ok,ZodBranded:Nl,ZodPipeline:Ai,ZodReadonly:Pi,custom:Ju,Schema:Ae,ZodSchema:Ae,late:ik,get ZodFirstPartyTypeKind(){return ve},coerce:{string:t=>cn.create({...t,coerce:!0}),number:t=>mr.create({...t,coerce:!0}),boolean:t=>Ci.create({...t,coerce:!0}),bigint:t=>gr.create({...t,coerce:!0}),date:t=>Zr.create({...t,coerce:!0})},any:hk,array:yk,bigint:lk,boolean:ep,date:ck,discriminatedUnion:wk,effect:tp,enum:Nk,function:Tk,instanceof:sk,intersection:bk,lazy:Bk,literal:Vk,map:Sk,nan:ak,nativeEnum:Ak,never:mk,null:pk,nullable:Fk,number:Qu,object:_k,oboolean:()=>ep().optional(),onumber:()=>Qu().optional(),optional:Dk,ostring:()=>Xu().optional(),pipeline:Mk,preprocess:Rk,promise:Pk,record:kk,set:Ek,strictObject:vk,string:Xu,symbol:dk,transformer:tp,tuple:xk,undefined:uk,union:Ck,unknown:fk,void:gk,NEVER:we,ZodIssueCode:ee,quotelessJson:Gx,ZodError:Lt});function Ik(t){throw new Error("Unexpected object: "+t)}const np="upload://upload/",rp="index://index/";function Lk(t){return t.startsWith(np)}function Ok(t){return t.startsWith(rp)}function op(t){if(Ok(t)){const e=t.slice(rp.length);return JSON.parse(decodeURIComponent(e)).path}else if(Lk(t)){const e=t.slice(np.length);return JSON.parse(decodeURIComponent(e)).localPath}Ik(t)}function Gk(t){return t.replace(/^.*[\\/]/,"")}function zk(t){return Gk(op(t))}Rn.object({__isRef:Rn.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:Rn.string().describe("Upstream block id"),name:Rn.string().describe("Name of the output provided to the upstream block's output context")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").strict().readonly();const $k=Rn.object({type:Rn.string(),importance:Rn.number().optional(),id:Rn.string().optional(),label:Rn.string()});Rn.array($k);const Zk={key:0,ref:"label"},Uk={key:0,class:"required-icon"},Wk=["data-placeholder"],Hk={key:5,class:"pl-file-input__stats"},jk={key:0,class:"pl-file-input__error"},qk={key:1,class:"pl-file-input__helper"},ip=r.defineComponent({__name:"PlFileInput",props:{modelValue:{},label:{default:void 0},required:{type:Boolean},dashed:{type:Boolean},extensions:{default:void 0},placeholder:{default:void 0},progress:{default:void 0},error:{default:void 0},helper:{default:void 0},cellStyle:{type:Boolean,default:!1},fileDialogTitle:{default:void 0},fileDialogCloseOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.reactive({fileDialogOpen:!1,error:""}),o=r.useSlots(),s=e,l=t,c=(O,Z)=>{if(O)try{return Z(O)}catch(I){return n.error=I instanceof Error?I.message:String(I),O}},u=r.computed(()=>c(l.modelValue,zk)),p=r.computed(()=>c(l.modelValue,op)),f=r.computed(()=>l.progress&&!l.progress.done),m=r.computed(()=>l.progress&&l.progress.done),y=r.computed(()=>n.error??l.error),B=r.computed(()=>!!y.value),T=r.computed(()=>{const{status:O,done:Z}=l.progress??{};return!O||!O.bytesTotal?"":O.bytesProcessed&&!Z?ol(O.bytesProcessed,{})+" / "+ol(O.bytesTotal,{}):ol(O.bytesTotal,{})}),N=r.computed(()=>{var O;const{progress:Z}=l;return Z?{width:Z.done?"100%":Math.round((((O=Z.status)==null?void 0:O.progress)??0)*100)+"%"}:{}}),M=()=>{n.fileDialogOpen=!0},G=O=>{O.files.length&&s("update:modelValue",O.files[0])},C=()=>s("update:modelValue",void 0);r.watch(()=>l.modelValue,()=>{n.error=""},{immediate:!0});const F=r.ref();return l.cellStyle||Zn(F),(O,Z)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",{class:r.normalizeClass([{"pl-file-input__cell-style":!!O.cellStyle,"has-file":!!u.value},"pl-file-input__envelope"])},[r.createElementVNode("div",{ref_key:"rootRef",ref:F,class:r.normalizeClass(["pl-file-input",{dashed:O.dashed,error:B.value}]),tabindex:"0",onKeyup:r.withKeys(M,["enter"]),onClick:r.withModifiers(M,["stop"])},[r.createElementVNode("div",{class:"pl-file-input__progress",style:r.normalizeStyle(N.value)},null,4),Z[3]||(Z[3]=r.createTextVNode()),!O.cellStyle&&O.label?(r.openBlock(),r.createElementBlock("label",Zk,[O.required?(r.openBlock(),r.createElementBlock("i",Uk)):r.createCommentVNode("",!0),Z[1]||(Z[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(O.label),1),Z[2]||(Z[2]=r.createTextVNode()),r.unref(o).tooltip||p.value?(r.openBlock(),r.createBlock(r.unref(vt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.unref(o).tooltip?r.renderSlot(O.$slots,"tooltip",{key:0}):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(p.value),1)],64))]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),Z[4]||(Z[4]=r.createTextVNode()),B.value?(r.openBlock(),r.createBlock(r.unref(ln),{key:1,name:"restart"})):f.value?(r.openBlock(),r.createBlock(r.unref(ln),{key:2,name:"cloud-upload"})):m.value?(r.openBlock(),r.createBlock(r.unref(ln),{key:3,name:"success"})):(r.openBlock(),r.createBlock(r.unref(ln),{key:4,name:"paper-clip"})),Z[5]||(Z[5]=r.createTextVNode()),r.createElementVNode("div",{"data-placeholder":O.placeholder??"Choose file",class:"pl-file-input__filename"},r.toDisplayString(u.value),9,Wk),Z[6]||(Z[6]=r.createTextVNode()),T.value?(r.openBlock(),r.createElementBlock("div",Hk,r.toDisplayString(T.value),1)):r.createCommentVNode("",!0),Z[7]||(Z[7]=r.createTextVNode()),O.modelValue?(r.openBlock(),r.createBlock(r.unref(ln),{key:6,name:"close",onClick:r.withModifiers(C,["stop"])})):r.createCommentVNode("",!0),Z[8]||(Z[8]=r.createTextVNode()),r.createVNode(pr,{class:"pl-file-input__contour"})],34),Z[9]||(Z[9]=r.createTextVNode()),B.value?(r.openBlock(),r.createElementBlock("div",jk,r.toDisplayString(y.value),1)):O.helper?(r.openBlock(),r.createElementBlock("div",qk,r.toDisplayString(O.helper),1)):r.createCommentVNode("",!0)],2),Z[10]||(Z[10]=r.createTextVNode()),r.createVNode(r.unref(Zu),{modelValue:n.fileDialogOpen,"onUpdate:modelValue":Z[0]||(Z[0]=I=>n.fileDialogOpen=I),extensions:O.extensions,title:O.fileDialogTitle,"close-on-outside-click":O.fileDialogCloseOnOutsideClick,"onImport:files":G},null,8,["modelValue","extensions","title","close-on-outside-click"])],64))}}),Kk={class:"pl-notification-alert__wrapper d-flex"},Yk={class:"pl-notification-alert__content flex-grow-1"},Jk={key:0,class:"pl-notification-alert__close"},Xk={key:0,class:"pl-notification-alert__actions d-flex"},sp=r.defineComponent({__name:"PlNotificationAlert",props:r.mergeModels({type:{default:"neutral"},width:{default:"256px"},closable:{type:Boolean}},{modelValue:{type:Boolean,default:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=r.useModel(t,"modelValue");function o(){e.closable&&(n.value=!1)}return(s,l)=>n.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([s.type,"pl-notification-alert d-flex flex-column gap-16"]),style:r.normalizeStyle({width:`${s.width}`})},[r.createElementVNode("div",Kk,[r.createElementVNode("div",Yk,[r.renderSlot(s.$slots,"default")]),l[0]||(l[0]=r.createTextVNode()),s.closable?(r.openBlock(),r.createElementBlock("div",Jk,[r.createVNode(r.unref(ys),{icon:"close",onClick:o})])):r.createCommentVNode("",!0)]),l[1]||(l[1]=r.createTextVNode()),s.$slots.actions?(r.openBlock(),r.createElementBlock("div",Xk,[r.renderSlot(s.$slots,"actions")])):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)}}),Qk=r.defineComponent({__name:"ContextProvider",props:{context:{},contextKey:{}},setup(t){const e=t;return r.provide(e.contextKey,r.computed(()=>e.context)),(n,o)=>r.renderSlot(n.$slots,"default")}});function wt(t,e,n){return e>t?e:t>n?n:t}const Al=t=>r.computed(()=>{const e=[100],{min:n,max:o,step:s}=t.value;let l=n;for(;l<o;){l+=s;const c=(1-(wt(l,n,o)-n)/(o-n))*100;e.push(c)}return e}),eS={class:"ui-slider__wrapper"},tS={class:"ui-slider__label-section"},nS={key:0,class:"text-s"},rS={key:1,class:"ui-slider__value-static text-s"},oS={class:"ui-slider__base"},iS={class:"ui-slider__container"},sS={class:"ui-slider__container ui-slider__container-thumb"},aS={class:"ui-slider__input-wrapper d-flex"},lS=["value"],cS={key:0,class:"ui-slider__error"},ap=r.defineComponent({__name:"Slider",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:""},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=t,l=r.reactive({deltaValue:0}),c=r.computed(()=>s.max-s.min),u=r.computed(()=>wt((s.modelValue??0)+l.deltaValue,s.min,s.max)),p=r.ref(s.modelValue),f=r.computed(()=>{const I=s.modelValue;return Number.isFinite(I)?I<s.min?`Min value: ${s.min}`:I>s.max?`Max value: ${s.max}`:s.error:"Not a number"}),m=r.computed(()=>s),y=Al(m),B=r.computed(()=>(u.value-s.min)/c.value),T=r.computed(()=>({right:Math.ceil((1-B.value)*100)+"%"})),N=r.computed(()=>({right:`calc(${Math.ceil((1-B.value)*100)}%) `})),M=r.ref(),G=r.ref();r.watch(()=>s.modelValue,I=>{p.value=I});function C(I){const Y=wt(I,s.min,s.max);return Math.round((Y+Number.EPSILON)*(1/s.step))/(1/s.step)}dr(G,I=>{var Y;lt((Y=r.unref(M))==null?void 0:Y.getBoundingClientRect(),W=>{const{dx:P}=I;l.deltaValue=P/W.width*c.value,p.value=C(wt((s.modelValue??0)+l.deltaValue,s.min,s.max)),I.stop&&(o("update:modelValue",C(u.value)),l.deltaValue=0)})});function F(I){o("update:modelValue",C(I))}function O(I){F(+I.target.value)}function Z(I){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(I.code)&&I.preventDefault();const Y=I.code==="ArrowUp"||I.code==="ArrowRight"?s.step*1:I.code==="ArrowDown"||I.code==="ArrowLeft"?s.step*-1:0;F(s.modelValue+Y)}return(I,Y)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([s.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${s.mode}`,"ui-slider"])},[r.createElementVNode("div",eS,[r.createElementVNode("div",tS,[I.label?(r.openBlock(),r.createElementBlock("label",nS,[r.createElementVNode("span",null,r.toDisplayString(I.label),1),Y[1]||(Y[1]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(I.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),Y[2]||(Y[2]=r.createTextVNode()),s.mode==="text"?(r.openBlock(),r.createElementBlock("div",rS,r.toDisplayString(p.value)+r.toDisplayString(I.measure),1)):r.createCommentVNode("",!0)]),Y[6]||(Y[6]=r.createTextVNode()),r.createElementVNode("div",oS,[r.createElementVNode("div",iS,[r.createElementVNode("div",{ref_key:"barRef",ref:M,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(T.value)},null,4)],512)]),Y[5]||(Y[5]=r.createTextVNode()),r.createElementVNode("div",sS,[s.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(y),(W,P)=>(r.openBlock(),r.createElementBlock("div",{key:P,style:r.normalizeStyle({right:`${W}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),Y[4]||(Y[4]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef",ref:G,tabindex:"0",class:"ui-slider__thumb ui-slider__thumb-active",style:r.normalizeStyle(N.value),onKeydown:Z},Y[3]||(Y[3]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),Y[7]||(Y[7]=r.createTextVNode()),r.createElementVNode("div",aS,[s.mode==="input"?(r.openBlock(),r.createElementBlock("input",{key:0,value:p.value,class:"ui-slider__value text-s",onChange:Y[0]||(Y[0]=W=>O(W))},null,40,lS)):r.createCommentVNode("",!0)])],2),Y[8]||(Y[8]=r.createTextVNode()),f.value?(r.openBlock(),r.createElementBlock("div",cS,r.toDisplayString(f.value),1)):r.createCommentVNode("",!0)],2))}});function dS(t,e=null,n=null){function o(u){const{scrollTop:p,scrollHeight:f,clientHeight:m}=u;if(!(f>m)||!e)return null;const y=f-p-m,B=p>e?e:0,T=y>e?m-e-B:m;return`linear-gradient(
|
|
52
|
+
`,LC=["innerHTML"],GC={class:"dropdown-list-item__title-container"},zC={class:"dropdown-list-item__title text-s"},$C={key:0,class:"dropdown-list-item__description text-description"},UC={key:1,class:"dropdown-list-item__icon flex-self-start"},yo=r.defineComponent({__name:"DropdownListItem",props:{option:{},isSelected:{type:Boolean,default:!1},size:{default:"small"},isHovered:{type:Boolean,default:!1},useCheckbox:{type:Boolean,default:!1}},setup(t){const e=t,n=r.computed(()=>{const l=[];return e.size==="small"&&l.push("dropdown-list-item__small"),e.isSelected&&l.push("dropdown-list-item__selected"),e.isHovered&&l.push("hovered-item"),l.join(" ")}),o=r.computed(()=>{const l=["dropdown-list-item__checkbox","flex-self-start"];return e.isSelected&&l.push("checked"),l.join(" ")}),s=r.computed(()=>e.isSelected?OC:IC);return(l,c)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([n.value,"dropdown-list-item"])},[e.useCheckbox?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(o.value),innerHTML:s.value},null,10,LC)):r.createCommentVNode("",!0),c[1]||(c[1]=r.createTextVNode()),r.createElementVNode("div",GC,[r.createElementVNode("div",zC,r.toDisplayString(l.option.label),1),c[0]||(c[0]=r.createTextVNode()),l.option.description?(r.openBlock(),r.createElementBlock("div",$C,r.toDisplayString(l.option.description),1)):r.createCommentVNode("",!0)]),c[2]||(c[2]=r.createTextVNode()),!e.useCheckbox&&e.isSelected?(r.openBlock(),r.createElementBlock("div",UC)):r.createCommentVNode("",!0)],2))}});function _o(t,e){const n=pl(()=>{if(t.value){const{scrollTop:o,scrollLeft:s,scrollHeight:l,scrollWidth:c,clientHeight:u,clientWidth:p}=document.documentElement,f=t.value.getBoundingClientRect();e({scrollTop:o,scrollLeft:s,scrollHeight:l,scrollWidth:c,clientHeight:u,clientWidth:p,offsetY:o+f.y,offsetX:s+f.x,top:f.top,right:f.right,bottom:f.bottom,left:f.left,width:f.width,height:f.height,x:f.x,y:f.y})}});r.onMounted(n),rt(window,"scroll",n,{capture:!0,passive:!0}),rt(window,"resize",n,{passive:!0}),rt(window,"adjust",n,!0)}const ZC=r.defineComponent({__name:"PlMaskIcon16",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>e.size==="large"?"--mask-size: 24px":""),o=r.computed(()=>`mask-16 mask-${e.name}`);return(s,l)=>(r.openBlock(),r.createElementBlock("i",{style:r.normalizeStyle(n.value),class:r.normalizeClass([o.value,s.$style.icon])},null,6))}}),WC="_icon_1ugxm_2",HC={icon:WC},jC={$style:HC},Un=Lt(ZC,[["__cssModules",jC]]),qC=["onKeyup"],KC=r.defineComponent({__name:"PlBtnSplit",props:r.mergeModels({options:{},disabled:{type:Boolean},loading:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:r.mergeModels(["click"],["update:modelValue"]),setup(t,{expose:e,emit:n}){const o=t,s=n,l=r.useModel(t,"modelValue"),c=r.ref(),u=r.ref(),p=r.ref(),f=r.ref(),m=r.reactive({open:!1,optionsHeight:0,activeIndex:-1});e({data:m});const y=r.reactive({top:"0px",left:"0px",width:"0px"});r.watch(u,N=>{if(N){const U=N.getBoundingClientRect();m.optionsHeight=U.height,window.dispatchEvent(new CustomEvent("adjust"))}},{immediate:!0});const T=r.computed(()=>m.open?"mask-24 mask-chevron-up":"mask-24 mask-chevron-down"),B=r.computed(()=>(o.options??[]).findIndex(N=>hi(N.value,l.value))),A=r.computed(()=>pr(o.options??[]).map((N,U)=>({...N,index:U,isSelected:U===B.value,isActive:U===m.activeIndex}))),I=r.computed(()=>o.loading||o.options===void 0),L=r.computed(()=>{var N;return((N=A.value.find(U=>hi(U.value,l.value)))==null?void 0:N.label)??(o.options===void 0?"...":"")});_o(c,N=>{const U=N.top+N.height+3;U+m.optionsHeight>N.clientHeight?y.top=N.top-m.optionsHeight-3+"px":y.top=U+"px",y.left=N.left+"px",y.width=N.width+"px"});const C=N=>{var U;l.value=N,m.open=!1,(U=c==null?void 0:c.value)==null||U.focus()};function R(){s("click")}const O=N=>{var U,te;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(N.code))N.preventDefault();else return;if(N.target===f.value&&N.code==="Enter"){R();return}const{open:j,activeIndex:Y}=m;if(!j&&N.target===p.value){N.code==="Enter"&&(m.open=!0);return}N.code==="Escape"&&(m.open=!1,(U=c.value)==null||U.focus());const q=r.unref(A),{length:ee}=q;if(!ee)return;N.code==="Enter"&&C((te=q.find(k=>k.index===Y))==null?void 0:te.value);const G=q.findIndex(k=>k.index===Y)??-1,S=N.code==="ArrowDown"?1:N.code==="ArrowUp"?-1:0,w=Math.abs(G+S+ee)%ee;m.activeIndex=A.value[w].index??-1},F=N=>{var U,te;const j=N.relatedTarget;!((U=c.value)!=null&&U.contains(j))&&!((te=u.value)!=null&&te.contains(j))&&(m.open=!1)};return(N,U)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:c,class:r.normalizeClass([{disabled:N.disabled||I.value,loading:I.value},"pl-btn-split d-flex"]),onFocusout:F,onKeydown:O},[r.createElementVNode("div",{ref_key:"buttonAction",ref:f,class:"pl-btn-split__title flex-grow-1 d-flex align-center text-s-btn",tabindex:"0",onClick:R,onKeyup:r.withKeys(r.withModifiers(R,["stop"]),["enter"])},r.toDisplayString(L.value),41,qC),U[1]||(U[1]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"menuActivator",ref:p,class:"pl-btn-split__icon-container d-flex align-center justify-center",tabindex:"0",onClick:U[0]||(U[0]=te=>m.open=!m.open)},[I.value?(r.openBlock(),r.createBlock(Un,{key:0,name:"loading"})):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass([T.value,"pl-btn-split__icon"])},null,2))],512),U[2]||(U[2]=r.createTextVNode()),m.open?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:u,class:"pl-dropdown__options",style:r.normalizeStyle(y),tabindex:"-1"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(A.value,(te,j)=>(r.openBlock(),r.createBlock(yo,{key:j,option:te,"is-selected":te.isSelected,"is-hovered":te.isActive,size:"medium",onClick:r.withModifiers(Y=>C(te.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128))],4)])):r.createCommentVNode("",!0)],34))}});function Vu(t){function e(n){const o=n.currentTarget,s=document.createElement("span"),l=Math.max(o.clientWidth,o.clientHeight),c=l/2;s.style.width=s.style.height=`${l}px`,s.style.left=`${n.clientX-o.offsetLeft-c}px`,s.style.top=`${n.clientY-o.offsetTop-c}px`,s.classList.add("ripple");const u=o.getElementsByClassName("ripple")[0];u&&u.remove(),o.appendChild(s)}r.onMounted(()=>{var n;(n=t.value)==null||n.addEventListener("click",e)})}const YC={key:0},JC={inheritAttrs:!1},vs=r.defineComponent({...JC,__name:"BtnBase",props:{loading:{type:Boolean},small:{type:Boolean},large:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t,n=r.ref(),o=r.computed(()=>e.small||e.size==="small"),s=r.computed(()=>e.large||e.size==="large");return Vu(n),(l,c)=>(r.openBlock(),r.createElementBlock("button",r.mergeProps({ref_key:"btn",ref:n,tabindex:"0",class:{loading:l.loading,small:o.value,large:s.value,round:l.round,reverse:l.reverse,justifyCenter:l.justifyCenter,[l.$attrs.class+""]:!0}},{...l.$attrs,disabled:!!l.$attrs.disabled||l.loading}),[l.round?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("span",YC,[r.renderSlot(l.$slots,"default")])),c[0]||(c[0]=r.createTextVNode()),l.loading?(r.openBlock(),r.createBlock(r.unref(Un),{key:1,name:"loading",size:l.size},null,8,["size"])):l.icon?(r.openBlock(),r.createBlock(r.unref(Un),{key:2,name:l.icon,size:l.size},null,8,["name","size"])):r.createCommentVNode("",!0)],16))}}),XC={name:"PlBtnPrimary"},gl=r.defineComponent({...XC,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(vs,r.mergeProps({class:"pl-btn-primary"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),QC={name:"PlBtnAccent"},e0=r.defineComponent({...QC,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(vs,r.mergeProps({class:"pl-btn-accent"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),t0={name:"PlBtnDanger"},n0=r.defineComponent({...t0,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(vs,r.mergeProps({class:"pl-btn-danger"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),r0={name:"PlBtnSecondary"},yl=r.defineComponent({...r0,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(vs,r.mergeProps(e,{class:"pl-btn-secondary"}),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),o0={key:0},i0={name:"PlBtnGhost"},Cs=r.defineComponent({...i0,props:{loading:{type:Boolean},size:{default:void 0},round:{type:Boolean},icon:{default:void 0},reverse:{type:Boolean},justifyCenter:{type:Boolean,default:!1}},setup(t){const e=t,n=r.computed(()=>e.size==="small"),o=r.computed(()=>e.size==="large"),s=r.ref(),l=r.useSlots();return Vu(s),(c,u)=>(r.openBlock(),r.createElementBlock("button",r.mergeProps({ref_key:"btnRef",ref:s,tabindex:"0",class:["pl-btn-ghost",{loading:c.loading,small:n.value,large:o.value,round:c.round,reverse:c.reverse,justifyCenter:c.justifyCenter,[c.$attrs.class+""]:!0}]},{...c.$attrs,disabled:!!c.$attrs.disabled||c.loading}),[r.unref(l).default&&!c.round?(r.openBlock(),r.createElementBlock("span",o0,[r.renderSlot(c.$slots,"default")])):r.createCommentVNode("",!0),u[0]||(u[0]=r.createTextVNode()),c.loading?(r.openBlock(),r.createBlock(r.unref(Un),{key:1,name:"loading",size:c.size},null,8,["size"])):c.icon?(r.openBlock(),r.createBlock(r.unref(Un),{key:2,name:c.icon,size:c.size},null,8,["name","size"])):r.createCommentVNode("",!0),u[1]||(u[1]=r.createTextVNode()),r.renderSlot(c.$slots,"append")],16))}}),s0=r.defineComponent({__name:"PlBtnLink",props:{loading:{type:Boolean},size:{},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean},disabled:{type:Boolean}},setup(t){const e=t,n=r.ref(!1);return(o,s)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-btn-link",{disabled:o.disabled,loading:o.loading,hover:n.value}]),onMouseover:s[0]||(s[0]=l=>n.value=!0),onMouseleave:s[1]||(s[1]=l=>n.value=!1)},[r.createVNode(yl,r.mergeProps({round:"",hover:n.value},e),null,16,["hover"]),s[2]||(s[2]=r.createTextVNode()),r.renderSlot(o.$slots,"default")],34))}});function a0(t,e){const n=r.ref();return _o(t,o=>{n.value=o}),r.computed(()=>{const o=r.unref(n),s=r.unref(e),l=s.position??"top",c=s.gap??8;if(!o)return"";const u=o.offsetY+Math.floor(o.height/2),p=o.offsetX+Math.floor(o.width/2);return l==="top-left"?`left: ${o.offsetX}px; top: ${o.offsetY-c}px;`:l==="top"?`left: ${p}px; top: ${o.offsetY-c}px;`:l==="right"?`left: ${o.offsetX+o.width+c}px; top: ${u}px;`:l==="left"?`right: ${o.scrollWidth-o.x+c}px; top: ${u}px;`:""})}function mi(t,e){return e(t)}function ct(t,e){if(t!=null)return e(t)}function l0(t){return Array.isArray(t)?t:[t]}function c0(t,e,...n){n.forEach(o=>{t[o]=e[o]})}function ws(t,e){rt(document,"click",n=>{document.contains(n.target)&&(l0(t).map(o=>o.value).filter(o=>!!o).some(o=>o==null?void 0:o.contains(n.target))||e())})}const d0={},u0={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function p0(t,e){return r.openBlock(),r.createElementBlock("svg",u0,e[0]||(e[0]=[r.createElementVNode("path",{d:"M4.00222 8.00933L0 4.00711L4.00222 0.00488281L4.00222 8.00933Z",fill:"#24223D"},null,-1)]))}const h0=Lt(d0,[["render",p0]]),_l=new Map,f0={name:"PlTooltip"},Ct=r.defineComponent({...f0,props:{openDelay:{default:100},closeDelay:{default:1e3},position:{default:"top"},hide:{type:Boolean},gap:{default:8},element:{default:"div"}},emits:["tooltip:close"],setup(t,{emit:e}){const n=e,o=Symbol(),s=t,l=r.reactive({open:!1,over:!1,tooltipOpen:!1,key:Symbol()});_l.set(o,()=>f()),r.watch(()=>l.open,I=>{requestAnimationFrame(()=>{l.tooltipOpen=I})});let c=()=>{};const u=ku(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),p=()=>{l.open=!0;for(let[I,L]of _l.entries())I!==o&&L()},f=()=>{l.open=!1,n("tooltip:close")},m=async()=>{s.hide||(u(),l.over=!0,c(),await _u(100),l.over&&p())},y=()=>{l.over=!1,c=vu(()=>{l.over||f()},s.closeDelay)};r.watch(()=>s.hide,I=>{I&&f()});const T=r.ref(),B=r.ref(),A=a0(T,r.toRef(s));return ws([T,B],()=>f()),r.onUnmounted(()=>{_l.delete(o)}),(I,L)=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(I.element),r.mergeProps(I.$attrs,{ref_key:"rootRef",ref:T,onClick:m,onMouseover:m,onMouseleave:y}),{default:r.withCtx(()=>[r.renderSlot(I.$slots,"default"),L[1]||(L[1]=r.createTextVNode()),I.$slots.tooltip&&l.open?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[r.createVNode(r.Transition,{name:"tooltip-transition"},{default:r.withCtx(()=>[l.tooltipOpen?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-tooltip__container",style:r.normalizeStyle(r.unref(A))},[r.createElementVNode("div",{ref_key:"tooltip",ref:B,class:r.normalizeClass(["pl-tooltip",I.position]),onMouseover:m,onMouseleave:y},[r.createElementVNode("div",null,[r.renderSlot(I.$slots,"tooltip")]),L[0]||(L[0]=r.createTextVNode()),r.createVNode(h0)],34)],4)):r.createCommentVNode("",!0)]),_:3})])):r.createCommentVNode("",!0)]),_:3},16))}}),m0={},g0={class:"inner-border"};function y0(t,e,n,o,s,l){return r.openBlock(),r.createElementBlock("div",g0,[r.renderSlot(t.$slots,"default")])}const _0=Lt(m0,[["render",y0]]),v0={key:0},C0=["tabindex","onKeydown","onClick"],w0={key:1,class:"pl-btn-group__helper"},b0={key:2,class:"pl-btn-group__error"},x0={name:"PlBtnGroup"},Nu=r.defineComponent({...x0,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean},compact:{type:Boolean},helper:{},error:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=u=>o("update:modelValue",u),l=t,c=r.computed(()=>l.options.map(u=>({label:"label"in u?u.label:u.text,value:u.value})));return(u,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-btn-group",{disabled:u.disabled,compact:u.compact}])},[u.label?(r.openBlock(),r.createElementBlock("label",v0,[r.createElementVNode("span",null,r.toDisplayString(u.label),1),p[0]||(p[0]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(u.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),p[1]||(p[1]=r.createTextVNode()),r.createVNode(_0,{class:"pl-btn-group__container"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.value,(f,m)=>(r.openBlock(),r.createElementBlock("div",{key:m,class:r.normalizeClass(["pl-btn-group__option text-s",{active:u.modelValue===f.value}]),tabindex:u.modelValue===f.value||u.disabled?void 0:0,onKeydown:r.withKeys(y=>s(f.value),["enter"]),onClick:y=>s(f.value)},r.toDisplayString(f.label),43,C0))),128))]),_:1}),p[2]||(p[2]=r.createTextVNode()),u.helper?(r.openBlock(),r.createElementBlock("div",w0,r.toDisplayString(u.helper),1)):u.error?(r.openBlock(),r.createElementBlock("div",b0,r.toDisplayString(u.error),1)):r.createCommentVNode("",!0)],2))}});function k0(t,e){const n=r.ref(),o=r.ref(),{parse:s,update:l}=e,c=()=>{n.value=void 0,o.value=void 0},u=r.computed({get(){return n.value!==void 0?n.value:t.value},set(p){c();try{const f=s?s(p):p;!l||l(f)?t.value=f:n.value=f}catch(f){n.value=p,o.value=f instanceof Error?f.message:String(f)}}});return r.reactive({value:u,error:o,reset:c})}const S0="_component_1abv8_1",E0="_container_1abv8_15",T0="_error_1abv8_69",vl={component:S0,container:E0,error:T0},B0={key:0},V0=["placeholder"],N0=r.defineComponent({__name:"PlEditableTitle",props:r.mergeModels({placeholder:{default:"Title"},maxWidth:{default:"80%"},prefix:{default:void 0},maxLength:{default:1e3},minLength:{default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,o=k0(e,{update(){return!1},parse:u=>{if(typeof u!="string")throw Error("value should be a string");if(n.maxLength&&u.length>n.maxLength)throw Error(`Max title length is ${n.maxLength} characters`);if(n.minLength&&u.length<n.minLength)throw Error(`Min title length is ${n.minLength} characters`);return u.trim()}}),s=r.computed(()=>({maxWidth:n.maxWidth??"80%"})),l=()=>{e.value=o.value&&!o.error?o.value:e.value,o.reset()},c=r.ref();return(u,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-editable-title",r.unref(vl).component]),style:r.normalizeStyle(s.value)},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(vl).container),onClick:p[3]||(p[3]=()=>{var f;return(f=c.value)==null?void 0:f.focus()})},[u.prefix?(r.openBlock(),r.createElementBlock("span",B0,r.toDisplayString(u.prefix.trim())+" ",1)):r.createCommentVNode("",!0),p[4]||(p[4]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"inputRef",ref:c,"onUpdate:modelValue":p[0]||(p[0]=f=>r.unref(o).value=f),placeholder:u.placeholder,onFocusout:l,onKeydown:[p[1]||(p[1]=r.withKeys((...f)=>r.unref(o).reset&&r.unref(o).reset(...f),["escape"])),p[2]||(p[2]=r.withKeys(f=>{var m;return(m=f.target)==null?void 0:m.blur()},["enter"]))]},null,40,V0),[[r.vModelText,r.unref(o).value]])],2),p[5]||(p[5]=r.createTextVNode()),r.unref(o).error?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(r.unref(vl).error)},r.toDisplayString(r.unref(o).error),3)):r.createCommentVNode("",!0)],6))}}),A0={inheritAttrs:!1},P0={class:"double-contour"};function D0(t,e,n,o,s,l){return r.openBlock(),r.createElementBlock("div",P0,[r.createElementVNode("div",r.normalizeProps(r.guardReactiveProps(t.$attrs)),[r.renderSlot(t.$slots,"default")],16)])}const hr=Lt(A0,[["render",D0]]);function Au(t){r.onMounted(t),r.onUpdated(t)}const Cl=new WeakMap,wl=new ResizeObserver(t=>{for(const e of t)ct(Cl.get(e.target),n=>n(e))});function Pu(t,e){Cl.set(t,e),wl.unobserve(t),wl.observe(t)}function Du(t){wl.unobserve(t),Cl.delete(t)}const F0=8,Fu=4;function Zn(t,e="label"){const n=new Set;Au(()=>{ct(t==null?void 0:t.value,o=>{const s=o.querySelector(e);s&&(n.add(s),Pu(s,()=>{const l=yu(()=>s.getBoundingClientRect().width+mi(F0,c=>Number.isNaN(c)?Fu:c+Fu));o.style.getPropertyValue("--label-offset-right-x")!==`${l}px`&&o.style.setProperty("--label-offset-right-x",`${l}px`)}))})}),r.onBeforeUnmount(()=>{Array.from(n.values()).map(o=>Du(o))})}function R0(t,e){const n=[];return e&&e.length>0&&e.forEach(o=>{const s=o(t);typeof s=="string"&&n.push(s)}),{isValid:n.length===0,errors:n}}function Ru(t,e){return r.computed(()=>R0(t.value,e))}const M0=r.defineComponent({__name:"PlIcon16",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>e.size==="large"?"--icon-size: 24px":""),o=r.computed(()=>`icon-16 icon-${e.name}`);return(s,l)=>(r.openBlock(),r.createElementBlock("i",{style:r.normalizeStyle(n.value),class:r.normalizeClass([o.value,s.$style.icon])},null,6))}}),I0="_icon_1ugxm_2",O0={icon:I0},L0={$style:O0},vo=Lt(M0,[["__cssModules",L0]]),G0=r.defineComponent({__name:"PlIcon24",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>`icon-24 icon-${e.name}`);return(o,s)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass([n.value,o.$style.icon])},null,2))}}),z0="_icon_1ugxm_2",$0={icon:z0},U0={$style:$0},bs=Lt(G0,[["__cssModules",U0]]),Z0={class:"pl-text-field__envelope"},W0={key:0,ref:"label"},H0={key:0,class:"required-icon"},j0={key:1,class:"pl-text-field__prefix"},q0=["disabled","placeholder","type"],K0={class:"pl-text-field__append"},Y0={key:0,class:"pl-text-field__error"},J0={key:1,class:"pl-text-field__helper"},X0={name:"PlTextField"},Ur=r.defineComponent({...X0,props:r.mergeModels({label:{},clearable:{type:[Boolean,Function]},parse:{type:Function},required:{type:Boolean},error:{},helper:{},placeholder:{},disabled:{type:Boolean},dashed:{type:Boolean},prefix:{},rules:{},type:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useSlots(),n=r.useModel(t,"modelValue"),o=t,s=r.ref(void 0),l=r.ref(),c=r.ref(!1),u=r.reactive({cached:void 0}),p=r.computed({get(){return u.cached?u.cached.value:n.value===void 0||n.value===null?"":String(n.value)},set(F){if(u.cached=void 0,o.parse)try{n.value=o.parse(F)}catch(N){u.cached={error:N instanceof Error?N.message:String(N),value:F}}else n.value=F}}),f=r.computed(()=>o.type&&o.type==="password"?c.value?"text":o.type:"text"),m=r.computed(()=>c.value?"view-show":"view-hide"),y=()=>{o.clearable&&(u.cached=void 0,n.value=o.clearable===!0?"":o.clearable())},T=Ru(p,o.rules||[]),B=r.computed(()=>o.clearable?o.clearable===!0?n.value==="":n.value===o.clearable():n.value===""),A=r.computed(()=>!B.value),I=r.computed(()=>{const F=[];return o.error&&F.push(o.error),u.cached&&F.push(u.cached.error),T.value.isValid||F.push(...T.value.errors),F}),L=r.computed(()=>I.value.length>0),C=r.computed(()=>o.clearable&&A.value&&o.type!=="password"),R=()=>c.value=!c.value,O=()=>{u.cached=void 0};return Zn(s),(F,N)=>(r.openBlock(),r.createElementBlock("div",Z0,[r.createElementVNode("div",{ref_key:"rootRef",ref:s,class:r.normalizeClass(["pl-text-field",{error:L.value,disabled:F.disabled,dashed:F.dashed,nonEmpty:A.value}])},[F.label?(r.openBlock(),r.createElementBlock("label",W0,[F.required?(r.openBlock(),r.createElementBlock("i",H0)):r.createCommentVNode("",!0),N[1]||(N[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(F.label),1),N[2]||(N[2]=r.createTextVNode()),r.unref(e).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(F.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),N[5]||(N[5]=r.createTextVNode()),F.prefix?(r.openBlock(),r.createElementBlock("div",j0,r.toDisplayString(F.prefix),1)):r.createCommentVNode("",!0),N[6]||(N[6]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":N[0]||(N[0]=U=>p.value=U),disabled:F.disabled,placeholder:F.placeholder||"...",type:f.value,spellcheck:"false",onFocusout:O},null,40,q0),[[r.vModelDynamic,p.value]]),N[7]||(N[7]=r.createTextVNode()),r.createElementVNode("div",K0,[C.value?(r.openBlock(),r.createBlock(r.unref(vo),{key:0,class:"pl-text-field__clearable",name:"delete-clear",onClick:y})):r.createCommentVNode("",!0),N[3]||(N[3]=r.createTextVNode()),F.type==="password"?(r.openBlock(),r.createBlock(r.unref(bs),{key:1,name:m.value,style:{cursor:"pointer"},onClick:R},null,8,["name"])):r.createCommentVNode("",!0),N[4]||(N[4]=r.createTextVNode()),r.renderSlot(F.$slots,"append")]),N[8]||(N[8]=r.createTextVNode()),r.createVNode(hr,{class:"pl-text-field__contour"})],2),N[9]||(N[9]=r.createTextVNode()),L.value?(r.openBlock(),r.createElementBlock("div",Y0,r.toDisplayString(I.value.join(" ")),1)):F.helper?(r.openBlock(),r.createElementBlock("div",J0,r.toDisplayString(F.helper),1)):r.createCommentVNode("",!0)]))}}),Q0=["disabled","placeholder"],ew=r.defineComponent({__name:"PlSearchField",props:{modelValue:{},clearable:{type:Boolean},placeholder:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,s=r.ref(void 0),l=r.ref(),c=r.computed({get(){return o.modelValue??""},set(f){n("update:modelValue",f)}}),u=r.computed(()=>!!o.modelValue),p=()=>n("update:modelValue","");return(f,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:s,class:r.normalizeClass(["pl-search-field",[f.$style.component]])},[r.createVNode(r.unref(bs),{name:"search"}),m[1]||(m[1]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:l,"onUpdate:modelValue":m[0]||(m[0]=y=>c.value=y),disabled:f.disabled,type:"text",placeholder:f.placeholder||"Find...",spellcheck:"false"},null,8,Q0),[[r.vModelText,c.value]]),m[2]||(m[2]=r.createTextVNode()),f.clearable&&u.value?(r.openBlock(),r.createBlock(r.unref(vo),{key:0,class:r.normalizeClass(f.$style.clear),name:"delete-clear",onClick:r.withModifiers(p,["stop"])},null,8,["class"])):r.createCommentVNode("",!0)],2))}}),tw="_component_1ng5b_1",nw="_clear_1ng5b_35",rw={component:tw,clear:nw},ow={$style:rw},Mu=Lt(ew,[["__cssModules",ow]]),iw={class:"ui-text-area__envelope"},sw={key:0,ref:"label"},aw={key:0,class:"required-icon"},lw=["readonly","rows","disabled","placeholder"],cw={class:"ui-text-area__append"},dw={key:0,class:"ui-text-area__error"},uw={key:1,class:"ui-text-area__helper"},pw={name:"PlTextArea"},hw=r.defineComponent({...pw,props:{modelValue:{},label:{},required:{type:Boolean},error:{},helper:{},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},dashed:{type:Boolean},rows:{},autogrow:{type:Boolean},rules:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=t,l=r.ref(),c=r.ref(),u=r.computed({get(){return s.modelValue??""},set(B){o("update:modelValue",B)}}),p=r.computed(()=>!!s.modelValue),f=Ru(u,s.rules||[]);Zn(l);const m=r.computed(()=>{const B=[];return s.error&&B.push(s.error),B.push(...f.value.errors),B}),y=r.computed(()=>m.value.length>0),T=()=>{if(!s.autogrow)return;const B=c.value;B&&(B.style.height="auto",B.style.height=`${B.scrollHeight}px`)};return r.onMounted(()=>{T()}),(B,A)=>(r.openBlock(),r.createElementBlock("div",iw,[r.createElementVNode("div",{ref_key:"root",ref:l,class:r.normalizeClass(["ui-text-area",{error:y.value,disabled:B.disabled,dashed:B.dashed,nonEmpty:p.value}])},[B.label?(r.openBlock(),r.createElementBlock("label",sw,[B.required?(r.openBlock(),r.createElementBlock("i",aw)):r.createCommentVNode("",!0),A[1]||(A[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(B.label),1),A[2]||(A[2]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(B.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),A[3]||(A[3]=r.createTextVNode()),r.withDirectives(r.createElementVNode("textarea",{ref_key:"input",ref:c,"onUpdate:modelValue":A[0]||(A[0]=I=>u.value=I),readonly:B.readonly,rows:B.rows,disabled:B.disabled,placeholder:B.placeholder??"...",spellcheck:"false",onInput:T},null,40,lw),[[r.vModelText,u.value]]),A[4]||(A[4]=r.createTextVNode()),r.createElementVNode("div",cw,[r.renderSlot(B.$slots,"append")]),A[5]||(A[5]=r.createTextVNode()),r.createVNode(hr,{class:"ui-text-area__contour"})],2),A[6]||(A[6]=r.createTextVNode()),y.value?(r.openBlock(),r.createElementBlock("div",dw,r.toDisplayString(m.value.join(" ")),1)):B.helper?(r.openBlock(),r.createElementBlock("div",uw,r.toDisplayString(B.helper),1)):r.createCommentVNode("",!0)]))}});function Iu(t,e){const n=t.scrollTop,o=t.getBoundingClientRect().height,s=e.offsetTop,l=e.getBoundingClientRect().height;return s+l<o+n&&s>n}function Ou(t,e){const n=t.scrollTop,o=t.getBoundingClientRect().height,s=e.offsetTop,l=e.getBoundingClientRect().height;return s+l<o+n?"ceil":s>n?"floor":"visible"}function gi(t,e,n={}){const o=t.scrollTop,s=t.getBoundingClientRect().height,l=e.getBoundingClientRect().height,c=e.offsetTop,u=Ou(t,e);if(u==="visible")return;const p=f=>{const m=u==="floor"?c-(s-l):c;t.scrollTop=o+f*(m-o)};Iu(t,e)||bu({duration:n.duration||100,timing:wu(f=>f),draw:p})}function bl(t,e,n,o){return t.addEventListener(e,n,o),function(){t.removeEventListener(e,n)}}function fw(t,e){const n=e.getBoundingClientRect();return t.x<n.x||t.x>n.x+n.width||t.y<n.y||t.y>n.y+n.height}function Lu(t){return t!==null&&typeof t=="object"}function Dt(t,e){return Lu(t)&&Lu(e)?Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>Dt(t[n],e[n])):t===e}function xl(t,e){return t.some(n=>Dt(n,e))}const kl=r.defineComponent({__name:"LongText",setup(t){r.useCssVars(m=>({"8d68520c":c.value}));const e=r.ref(!1),n=r.ref(),o=r.ref(!1),s=r.computed(()=>o.value&&e.value?"ui-lt-animate":""),l=xu(m=>o.value=m,500),c=r.computed(()=>{var m;return n.value?`${((m=n.value)==null?void 0:m.innerHTML.length)*.4}s`:"5s"});function u(){const m=ul(n.value,"span cannot be empty");e.value=m.clientWidth<m.scrollWidth}function p(){u(),l(!0)}function f(){l(!1)}return(m,y)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps(m.$attrs,{class:"ui-lt-container"}),[r.createElementVNode("span",{onMouseover:p,onMouseleave:f},[r.createElementVNode("span",{ref_key:"span",ref:n,class:r.normalizeClass(s.value)},[r.renderSlot(m.$slots,"default")],2)],32)],16))}}),mw=r.defineComponent({__name:"PlMaskIcon24",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>`mask-24 mask-${e.name}`);return(o,s)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass([n.value,o.$style.icon])},null,2))}}),gw="_icon_1ugxm_2",yw={icon:gw},_w={$style:yw},cn=Lt(mw,[["__cssModules",_w]]),vw={class:"pl-dropdown__envelope"},Cw=["tabindex"],ww={class:"pl-dropdown__container"},bw={class:"pl-dropdown__field"},xw=["disabled","placeholder"],kw={class:"pl-dropdown__controls"},Sw={key:0},Ew={key:0,class:"required-icon"},Tw={key:0,class:"nothing-found"},Bw={key:0,class:"pl-dropdown__error"},Vw={key:1,class:"pl-dropdown__helper"},Nw={key:2,class:"pl-dropdown__helper"},Aw={name:"PlDropdown"},yi=r.defineComponent({...Aw,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},arrowIcon:{default:void 0},arrowIconLarge:{default:void 0},optionSize:{default:"small"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,s=r.useSlots(),l=r.ref(),c=r.ref(),u=r.ref(),p=r.reactive({search:"",activeIndex:-1,open:!1,optionsHeight:0}),f=()=>mi(O.value.findIndex(w=>Dt(w.value,o.modelValue)),w=>w<0?0:w),m=()=>p.activeIndex=f(),y=r.computed(()=>o.options===void 0),T=r.computed(()=>y.value?!0:o.disabled),B=r.computed(()=>(o.options??[]).findIndex(w=>Dt(w.value,o.modelValue))),A=r.computed(()=>{if(!y.value){if(o.error)return o.error;if(o.modelValue!==void 0&&B.value===-1)return"The selected value is not one of the options"}}),I=r.computed(()=>pr(o.options??[]).map((w,k)=>({...w,index:k,isSelected:k===B.value,isActive:k===p.activeIndex}))),L=r.computed(()=>{const w=r.unref(I).find(k=>Dt(k.value,o.modelValue));return(w==null?void 0:w.label)||o.modelValue}),C=r.computed(()=>!p.open&&o.modelValue?"":o.modelValue?String(L.value):o.placeholder),R=r.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),O=r.computed(()=>{const w=I.value;return p.search?w.filter(k=>{const $=p.search.toLowerCase();return k.label.toLowerCase().includes($)||k.description&&k.description.toLowerCase().includes($)?!0:typeof k.value=="string"?k.value.toLowerCase().includes($):k.value===p.search}):w}),F=r.computed(()=>T.value?void 0:"0"),N=w=>{var k;n("update:modelValue",w),p.search="",p.open=!1,(k=l==null?void 0:l.value)==null||k.focus()},U=()=>n("update:modelValue",void 0),te=()=>{var w;return(w=u.value)==null?void 0:w.focus()},j=()=>p.open=!p.open,Y=()=>p.open=!0,q=w=>{var k,$;const Q=w.relatedTarget;!((k=l.value)!=null&&k.contains(Q))&&!(($=c.value)!=null&&$.contains(Q))&&(p.search="",p.open=!1)},ee=()=>{const w=c.value;w&&ct(w.querySelector(".hovered-item"),k=>{gi(w,k)})},G=w=>{var k,$;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(w.code))w.preventDefault();else return;const{open:Q,activeIndex:ne}=p;if(!Q){w.code==="Enter"&&(p.open=!0);return}w.code==="Escape"&&(p.open=!1,(k=l.value)==null||k.focus());const be=r.unref(O),{length:$e}=be;if(!$e)return;w.code==="Enter"&&N(($=be.find(xr=>xr.index===ne))==null?void 0:$.value);const ot=be.findIndex(xr=>xr.index===ne)??-1,wn=w.code==="ArrowDown"?1:w.code==="ArrowUp"?-1:0,In=Math.abs(ot+wn+$e)%$e;p.activeIndex=O.value[In].index??-1};Zn(l),r.watch(()=>o.modelValue,m,{immediate:!0}),r.watch(()=>p.open,w=>{var k;return w?(k=u.value)==null?void 0:k.focus():""}),r.watchPostEffect(()=>{p.search,p.activeIndex>=0&&p.open&&ee()});const S=r.reactive({top:"0px",left:"0px",width:"0px"});return r.watch(c,w=>{if(w){const k=w.getBoundingClientRect();p.optionsHeight=k.height,window.dispatchEvent(new CustomEvent("adjust"))}}),_o(l,w=>{const k=w.top+w.height+3;k+p.optionsHeight>w.clientHeight?S.top=w.top-p.optionsHeight-3+"px":S.top=k+"px",S.left=w.left+"px",S.width=w.width+"px"}),(w,k)=>(r.openBlock(),r.createElementBlock("div",vw,[r.createElementVNode("div",{ref_key:"root",ref:l,tabindex:F.value,class:r.normalizeClass(["pl-dropdown",{open:p.open,error:w.error,disabled:T.value}]),onKeydown:G,onFocusout:q},[r.createElementVNode("div",ww,[r.createElementVNode("div",bw,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:u,"onUpdate:modelValue":k[0]||(k[0]=$=>p.search=$),type:"text",tabindex:"-1",disabled:T.value,placeholder:C.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:Y},null,40,xw),[[r.vModelText,p.search]]),k[4]||(k[4]=r.createTextVNode()),p.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,onClick:te},[r.createVNode(kl,{class:"input-value"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(L.value),1)]),_:1})])),k[5]||(k[5]=r.createTextVNode()),r.createElementVNode("div",kw,[y.value?(r.openBlock(),r.createBlock(r.unref(cn),{key:0,name:"loading"})):r.createCommentVNode("",!0),k[1]||(k[1]=r.createTextVNode()),w.clearable&&R.value?(r.openBlock(),r.createBlock(r.unref(vo),{key:1,name:"delete-clear",onClick:r.withModifiers(U,["stop"])})):r.createCommentVNode("",!0),k[2]||(k[2]=r.createTextVNode()),r.renderSlot(w.$slots,"append"),k[3]||(k[3]=r.createTextVNode()),w.arrowIconLarge?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["arrow-icon",[`icon-24 ${w.arrowIconLarge}`]]),onClick:r.withModifiers(j,["stop"])},null,2)):w.arrowIcon?(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["arrow-icon",[`icon-16 ${w.arrowIcon}`]]),onClick:r.withModifiers(j,["stop"])},null,2)):(r.openBlock(),r.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:r.withModifiers(j,["stop"])}))])]),k[9]||(k[9]=r.createTextVNode()),w.label?(r.openBlock(),r.createElementBlock("label",Sw,[w.required?(r.openBlock(),r.createElementBlock("i",Ew)):r.createCommentVNode("",!0),k[6]||(k[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(w.label),1),k[7]||(k[7]=r.createTextVNode()),r.unref(s).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(w.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),k[10]||(k[10]=r.createTextVNode()),p.open?(r.openBlock(),r.createBlock(r.Teleport,{key:1,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:c,class:"pl-dropdown__options",style:r.normalizeStyle(S),tabindex:"-1"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(O.value,($,Q)=>(r.openBlock(),r.createBlock(yo,{key:Q,option:$,"is-selected":$.isSelected,"is-hovered":$.isActive,size:w.optionSize,onClick:r.withModifiers(ne=>N($.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),k[8]||(k[8]=r.createTextVNode()),O.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Tw,"Nothing found"))],4)])):r.createCommentVNode("",!0),k[11]||(k[11]=r.createTextVNode()),r.createVNode(hr,{class:"pl-dropdown__contour"})])],42,Cw),k[12]||(k[12]=r.createTextVNode()),A.value?(r.openBlock(),r.createElementBlock("div",Bw,r.toDisplayString(A.value),1)):y.value&&w.loadingOptionsHelper?(r.openBlock(),r.createElementBlock("div",Vw,r.toDisplayString(w.loadingOptionsHelper),1)):w.helper?(r.openBlock(),r.createElementBlock("div",Nw,r.toDisplayString(w.helper),1)):r.createCommentVNode("",!0)]))}}),Pw={name:"PlDropdownRef"},Dw=r.defineComponent({...Pw,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},optionSize:{default:"small"}},emits:["update:modelValue"],setup(t){const e=t,n=r.computed(()=>{var s;return(s=e.options)==null?void 0:s.map(l=>({label:l.label,value:l.ref}))}),o=r.computed(()=>e.disabled?"icon-link-disabled":"icon-link");return(s,l)=>(r.openBlock(),r.createBlock(r.unref(yi),r.mergeProps(e,{options:n.value,"loading-options-helper":s.loadingOptionsHelper,"arrow-icon-large":o.value,"onUpdate:modelValue":l[0]||(l[0]=c=>s.$emit("update:modelValue",c))}),null,16,["options","loading-options-helper","arrow-icon-large"]))}});function Fw(t,e){return r.computed(()=>{const n=pr(t.value);return e.value?n.filter(o=>o.label.toLowerCase().includes(e.value.toLowerCase())):n})}const Rw={class:"resizable-input"},Mw=["placeholder","value","disabled"],Iw=r.defineComponent({__name:"ResizableInput",props:{modelValue:{},placeholder:{},value:{},disabled:{type:Boolean},maxWidth:{},width:{}},emits:["input","update:modelValue"],setup(t,{emit:e}){const n=t,o=e,s=r.computed(()=>{var u;return n.placeholder?n.placeholder:(u=n.modelValue||n.value)==null?void 0:u.replace('"',"")}),l=r.computed(()=>{const u={};return n.width&&(u.width=n.width),n.maxWidth&&(u.maxWidth=n.maxWidth),u});function c(u){const p=u.target.value;o("update:modelValue",p)}return(u,p)=>(r.openBlock(),r.createElementBlock("div",Rw,[r.createElementVNode("span",{style:r.normalizeStyle(l.value),class:"resizable-input__size-span"},r.toDisplayString(s.value),5),p[0]||(p[0]=r.createTextVNode()),r.createElementVNode("input",r.mergeProps(u.$attrs,{placeholder:u.placeholder,value:n.modelValue,disabled:n.disabled,style:l.value,onInput:c}),null,16,Mw)]))}}),Ow={class:"dropdown-tab-item__title text-caps13"},Lw=r.defineComponent({__name:"TabItem",props:{option:{},isSelected:{type:Boolean,default:!1},isHovered:{type:Boolean,default:!1}},setup(t){const e=t,n=r.computed(()=>e.option.label),o=r.computed(()=>{const s=[];return e.isSelected&&s.push("dropdown-tab-item__selected"),e.isHovered&&s.push("hovered-item"),s.join(" ")});return(s,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([o.value,"dropdown-tab-item"])},[r.createElementVNode("div",Ow,r.toDisplayString(n.value),1)],2))}}),Gw={class:"pl-line-dropdown__prefix"},zw={class:"pl-line-dropdown__icon-wrapper"},$w={class:"pl-line-dropdown__icon"},Uw={key:0,class:"pl-line-dropdown__no-item"},Zw={key:0,class:"pl-line-dropdown__no-item"},Gu=r.defineComponent({__name:"PlDropdownLine",props:{modelValue:{},disabled:{type:Boolean},prefix:{default:""},options:{},placeholder:{default:"Select.."},mode:{default:"list"},tabsContainerStyles:{type:[Boolean,null,String,Object,Array],default:void 0},clearable:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,s=r.reactive({isOpen:!1,activeOption:-1,optionsHeight:0}),l=r.ref(),c=r.ref(),u=r.computed(()=>{const q=[];return s.isOpen&&q.push("open"),o.disabled&&q.push("disabled"),q.join(" ")}),p=r.ref(""),f=Fw(r.toRef(o,"options"),p),m=r.computed(()=>!!(o.clearable&&s.isOpen&&o.modelValue&&y.value)),y=r.computed(()=>{if(o.modelValue){const q=A();if(q!==-1){const ee=pr(o.options)[q];return typeof ee.label=="object"?ee.label.title:ee.label}}return""}),T=r.ref(y.value),B=r.computed(()=>s.isOpen&&p.value&&p.value.length>=y.value.length-1?p.value:y.value??"...");ws(l,()=>{o.mode==="list"&&(s.isOpen=!1)}),r.watch(()=>T.value,q=>{y.value!==q?p.value=q:p.value=""}),r.watch(()=>s.isOpen,q=>{var ee;q&&l.value&&((ee=l.value.querySelector("input"))==null||ee.focus(),r.nextTick(()=>te()))}),r.watch(()=>o.modelValue,()=>I(),{immediate:!0});function A(){return o.options.findIndex(q=>Dt(q.value,o.modelValue))}function I(){s.activeOption=mi(f.value.findIndex(q=>Dt(q.value,o.modelValue)),q=>q<0?0:q),T.value=y.value}function L(){p.value=""}function C(){o.disabled?s.isOpen=!1:r.nextTick(()=>{s.isOpen=!s.isOpen})}function R(){o.mode==="list"&&(s.isOpen=!1)}function O(q){q&&(n("update:modelValue",q.value),R(),L())}function F(q){return Dt(q.value,o.modelValue)}const N=q=>{var ee,G;const S=q.relatedTarget;!((ee=l.value)!=null&&ee.contains(S))&&!((G=c.value)!=null&&G.contains(S))&&(p.value="",s.isOpen=!1)};function U(q){const{activeOption:ee}=s;if(!s.isOpen&&q.code==="Enter"){s.isOpen=!0;return}const{length:G}=f.value;if(!G)return;["ArrowDown","ArrowUp","Enter"].includes(q.code)&&q.preventDefault(),q.code==="Enter"&&O(f.value[ee]);const S=q.code==="ArrowDown"?1:q.code==="ArrowUp"?-1:0;s.activeOption=Math.abs(ee+S+G)%G,requestAnimationFrame(te)}function te(){const q=c.value;q&&ct(q.querySelector(".hovered-item"),ee=>{o.mode==="list"?gi(q,ee):ee.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}function j(){n("update:modelValue",void 0)}const Y=r.reactive({top:"0px",left:"0px"});return r.watch(c,q=>{if(q){const ee=q.getBoundingClientRect();s.optionsHeight=ee.height,window.dispatchEvent(new CustomEvent("adjust"))}}),_o(l,q=>{const ee=q.top+q.height+2;ee+s.optionsHeight>q.clientHeight?Y.top=q.top-s.optionsHeight-2+"px":Y.top=ee+"px",Y.left=q.left+"px"}),(q,ee)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"container",ref:l,tabindex:"0",class:r.normalizeClass([u.value,"pl-line-dropdown uc-pointer"]),onKeydown:U,onFocusout:N,onClick:C},[r.createElementVNode("div",Gw,r.toDisplayString(o==null?void 0:o.prefix),1),ee[6]||(ee[6]=r.createTextVNode()),r.createVNode(Iw,{modelValue:T.value,"onUpdate:modelValue":ee[0]||(ee[0]=G=>T.value=G),placeholder:B.value,disabled:o.disabled,class:"pl-line-dropdown__input"},null,8,["modelValue","placeholder","disabled"]),ee[7]||(ee[7]=r.createTextVNode()),r.createElementVNode("div",zw,[r.withDirectives(r.createElementVNode("div",$w,null,512),[[r.vShow,!m.value]]),ee[1]||(ee[1]=r.createTextVNode()),r.withDirectives(r.createElementVNode("div",{class:"pl-line-dropdown__icon-clear",onClick:j},null,512),[[r.vShow,m.value]])]),ee[8]||(ee[8]=r.createTextVNode()),s.isOpen?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[o.mode==="list"?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"list",ref:c,style:r.normalizeStyle(Y),tabindex:"-1",class:"pl-line-dropdown__items",onFocusout:N},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(f),(G,S)=>r.renderSlot(q.$slots,"item",{key:S,item:G,textItem:"text",isSelected:F(G),isHovered:s.activeOption==S,onClick:r.withModifiers(w=>O(G),["stop"])},()=>[r.createVNode(yo,{option:G,"text-item":"text","is-selected":F(G),"is-hovered":s.activeOption==S,size:"medium",onClick:r.withModifiers(w=>O(G),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),ee[3]||(ee[3]=r.createTextVNode()),r.unref(f).length===0?(r.openBlock(),r.createElementBlock("div",Uw,ee[2]||(ee[2]=[r.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):r.createCommentVNode("",!0)],36)):o.mode==="tabs"?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"list",ref:c,style:r.normalizeStyle(Y),tabindex:"-1",class:"pl-line-dropdown__items-tabs",onFocusout:N},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(f),(G,S)=>r.renderSlot(q.$slots,"item",{key:S,item:G,isSelected:F(G),isHovered:s.activeOption==S,onClick:r.withModifiers(w=>O(G),["stop"])},()=>[r.createVNode(Lw,{option:G,"is-selected":F(G),"is-hovered":s.activeOption==S,onClick:r.withModifiers(w=>O(G),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),ee[5]||(ee[5]=r.createTextVNode()),r.unref(f).length===0?(r.openBlock(),r.createElementBlock("div",Zw,ee[4]||(ee[4]=[r.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):r.createCommentVNode("",!0)],36)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)],34))}}),Ww={class:"ui-dropdown__envelope"},Hw=["tabindex"],jw={class:"ui-dropdown__container"},qw={class:"ui-dropdown__field"},Kw=["disabled","placeholder"],Yw={class:"ui-dropdown__controls"},Jw={key:0},Xw={key:0,class:"required-icon"},Qw={key:0,class:"nothing-found"},eb={key:0,class:"ui-dropdown__error"},tb={key:1,class:"ui-dropdown__helper"},nb={key:2,class:"ui-dropdown__helper"},rb={name:"PlDropdown"},ob=r.defineComponent({...rb,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},arrowIcon:{default:void 0},arrowIconLarge:{default:void 0},optionSize:{default:"small"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,s=r.useSlots(),l=r.ref(),c=r.ref(),u=r.ref(),p=r.reactive({search:"",activeIndex:-1,open:!1}),f=()=>mi(O.value.findIndex(S=>Dt(S.value,o.modelValue)),S=>S<0?0:S),m=()=>p.activeIndex=f(),y=r.computed(()=>o.options===void 0),T=r.computed(()=>y.value?!0:o.disabled),B=r.computed(()=>(o.options??[]).findIndex(S=>Dt(S.value,o.modelValue))),A=r.computed(()=>{if(!y.value){if(o.error)return o.error;if(o.modelValue!==void 0&&B.value===-1)return"The selected value is not one of the options"}}),I=r.computed(()=>pr(o.options??[]).map((S,w)=>({...S,index:w,isSelected:w===B.value,isActive:w===p.activeIndex}))),L=r.computed(()=>{const S=r.unref(I).find(w=>Dt(w.value,o.modelValue));return(S==null?void 0:S.label)||o.modelValue}),C=r.computed(()=>!p.open&&o.modelValue?"":o.modelValue?String(L.value):o.placeholder),R=r.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),O=r.computed(()=>{const S=I.value;return p.search?S.filter(w=>{const k=p.search.toLowerCase();return w.label.toLowerCase().includes(k)||w.description&&w.description.toLowerCase().includes(k)?!0:typeof w.value=="string"?w.value.toLowerCase().includes(k):w.value===p.search}):S}),F=r.computed(()=>T.value?void 0:"0"),N=S=>{var w;n("update:modelValue",S),p.search="",p.open=!1,(w=l==null?void 0:l.value)==null||w.focus()},U=()=>n("update:modelValue",void 0),te=()=>{var S;return(S=u.value)==null?void 0:S.focus()},j=()=>p.open=!p.open,Y=()=>p.open=!0,q=S=>{var w;(w=l==null?void 0:l.value)!=null&&w.contains(S.relatedTarget)||(p.search="",p.open=!1)},ee=()=>{const S=c.value;S&&ct(S.querySelector(".hovered-item"),w=>{gi(S,w)})},G=S=>{var w,k;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(S.code))S.preventDefault();else return;const{open:$,activeIndex:Q}=p;if(!$){S.code==="Enter"&&(p.open=!0);return}S.code==="Escape"&&(p.open=!1,(w=l.value)==null||w.focus());const ne=r.unref(O),{length:be}=ne;if(!be)return;S.code==="Enter"&&N((k=ne.find(In=>In.index===Q))==null?void 0:k.value);const $e=ne.findIndex(In=>In.index===Q)??-1,ot=S.code==="ArrowDown"?1:S.code==="ArrowUp"?-1:0,wn=Math.abs($e+ot+be)%be;p.activeIndex=O.value[wn].index??-1};return Zn(l),r.watch(()=>o.modelValue,m,{immediate:!0}),r.watch(()=>p.open,S=>{var w;return S?(w=u.value)==null?void 0:w.focus():""}),r.watchPostEffect(()=>{p.search,p.activeIndex>=0&&p.open&&ee()}),(S,w)=>(r.openBlock(),r.createElementBlock("div",Ww,[r.createElementVNode("div",{ref_key:"root",ref:l,tabindex:F.value,class:r.normalizeClass(["ui-dropdown",{open:p.open,error:S.error,disabled:T.value}]),onKeydown:G,onFocusout:q},[r.createElementVNode("div",jw,[r.createElementVNode("div",qw,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:u,"onUpdate:modelValue":w[0]||(w[0]=k=>p.search=k),type:"text",tabindex:"-1",disabled:T.value,placeholder:C.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:Y},null,40,Kw),[[r.vModelText,p.search]]),w[4]||(w[4]=r.createTextVNode()),p.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,onClick:te},[r.createVNode(kl,{class:"input-value"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(L.value),1)]),_:1})])),w[5]||(w[5]=r.createTextVNode()),r.createElementVNode("div",Yw,[y.value?(r.openBlock(),r.createBlock(r.unref(cn),{key:0,name:"loading"})):r.createCommentVNode("",!0),w[1]||(w[1]=r.createTextVNode()),S.clearable&&R.value?(r.openBlock(),r.createBlock(r.unref(vo),{key:1,name:"delete-clear",onClick:r.withModifiers(U,["stop"])})):r.createCommentVNode("",!0),w[2]||(w[2]=r.createTextVNode()),r.renderSlot(S.$slots,"append"),w[3]||(w[3]=r.createTextVNode()),S.arrowIconLarge?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["arrow-icon",[`icon-24 ${S.arrowIconLarge}`]]),onClick:r.withModifiers(j,["stop"])},null,2)):S.arrowIcon?(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["arrow-icon",[`icon-16 ${S.arrowIcon}`]]),onClick:r.withModifiers(j,["stop"])},null,2)):(r.openBlock(),r.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:r.withModifiers(j,["stop"])}))])]),w[9]||(w[9]=r.createTextVNode()),S.label?(r.openBlock(),r.createElementBlock("label",Jw,[S.required?(r.openBlock(),r.createElementBlock("i",Xw)):r.createCommentVNode("",!0),w[6]||(w[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(S.label),1),w[7]||(w[7]=r.createTextVNode()),r.unref(s).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(S.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),w[10]||(w[10]=r.createTextVNode()),p.open?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"list",ref:c,class:"ui-dropdown__options"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(O.value,(k,$)=>(r.openBlock(),r.createBlock(yo,{key:$,option:k,"is-selected":k.isSelected,"is-hovered":k.isActive,size:S.optionSize,onClick:r.withModifiers(Q=>N(k.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),w[8]||(w[8]=r.createTextVNode()),O.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Qw,"Nothing found"))],512)):r.createCommentVNode("",!0),w[11]||(w[11]=r.createTextVNode()),r.createVNode(hr,{class:"ui-dropdown__contour"})])],42,Hw),w[12]||(w[12]=r.createTextVNode()),A.value?(r.openBlock(),r.createElementBlock("div",eb,r.toDisplayString(A.value),1)):y.value&&S.loadingOptionsHelper?(r.openBlock(),r.createElementBlock("div",tb,r.toDisplayString(S.loadingOptionsHelper),1)):S.helper?(r.openBlock(),r.createElementBlock("div",nb,r.toDisplayString(S.helper),1)):r.createCommentVNode("",!0)]))}}),ib={key:0,class:"ui-progress-bar"},sb={class:"ui-progress-bar__messages d-flex align-center pl-6 pr-6"},ab={class:"ui-progress-bar__message flex-grow-1"},lb={class:"ui-progress-bar__percent"},cb=r.defineComponent({__name:"PlProgressBar",props:{loading:{type:Boolean},progress:{default:0},completeMessage:{default:"Completed"}},setup(t){const e=t,n=r.computed(()=>e.progress===100?e.completeMessage:"");return(o,s)=>o.loading?(r.openBlock(),r.createElementBlock("div",ib,[r.createElementVNode("div",{class:"ui-progress-bar__indicator",style:r.normalizeStyle({width:o.progress+"%"})},null,4),s[1]||(s[1]=r.createTextVNode()),r.createElementVNode("div",sb,[r.createElementVNode("div",ab,r.toDisplayString(n.value),1),s[0]||(s[0]=r.createTextVNode()),r.createElementVNode("div",lb,r.toDisplayString(o.progress+"%"),1)])])):r.createCommentVNode("",!0)}}),db={class:"mi-number-field__main-wrapper d-flex"},ub={class:"mi-number-field__wrapper flex-grow d-flex flex-align-center"},pb={key:0,class:"text-description"},hb=["disabled","placeholder"],fb={class:"mi-number-field__icons d-flex-column"},mb={key:0,class:"mi-number-field__hint text-description"},gb=r.defineComponent({__name:"PlNumberField",props:{modelValue:{},disabled:{type:Boolean},label:{default:void 0},placeholder:{default:void 0},step:{default:1},minValue:{default:void 0},maxValue:{default:void 0},errorMessage:{default:void 0},validate:{type:Function,default:void 0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,s=r.ref(),l=r.useSlots(),c=r.ref();Zn(s);const u=r.ref(!0),p=r.computed({get(){return u.value&&n.modelValue!==void 0?new Number(n.modelValue).toString():""},set(C){var R;C=C.replace(/,/g,""),T(C)?(o("update:modelValue",+C),C.toString()!==((R=n.modelValue)==null?void 0:R.toString())&&+C===n.modelValue&&C[C.length-1]!=="."&&(u.value=!1,r.nextTick(()=>{u.value=!0}))):(C.trim()===""&&o("update:modelValue",void 0),u.value=!1,r.nextTick(()=>{u.value=!0}))}}),f=r.computed(()=>{let C=[];return n.errorMessage&&C.push(n.errorMessage),T(n.modelValue)?(n.minValue!==void 0&&n.modelValue!==void 0&&n.modelValue<n.minValue&&C.push(`Model value must be higher than ${n.minValue}`),n.maxValue!==void 0&&n.modelValue!==void 0&&n.modelValue>n.maxValue&&C.push(`Model value must be less than ${n.maxValue}`)):C.push("Model value is not a number."),C=[...C],C.join(" ")}),m=r.computed(()=>!!(n.maxValue&&n.modelValue!==void 0&&(n.modelValue||0)+n.step>n.maxValue)),y=r.computed(()=>!!(n.minValue&&n.modelValue!==void 0&&(n.modelValue||0)-n.step<n.minValue));function T(C){return C!==void 0?(C=C==null?void 0:C.toString(),!isNaN(+C)&&!isNaN(parseFloat(C))):!1}function B(){if(!m.value){let C=0;n.modelValue===void 0?C=n.minValue?n.minValue:0:C=+(n.modelValue||0)+n.step,p.value=C.toString()}}function A(){if(!y.value){let C=0;n.modelValue===void 0?C=0:C=+(n.modelValue||0)-n.step,p.value=n.minValue?Math.max(n.minValue,C).toString():C.toString()}}function I(C){["ArrowDown","ArrowUp"].includes(C.code)&&C.preventDefault(),C.code==="ArrowUp"?B():C.code==="ArrowDown"&&A()}const L=C=>{C.detail>1&&C.preventDefault()};return(C,R)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:s,class:r.normalizeClass([{error:!!f.value.trim(),disabled:C.disabled},"mi-number-field d-flex-column"]),onMousedown:L,onKeydown:R[1]||(R[1]=O=>I(O))},[r.createElementVNode("div",db,[r.createVNode(hr,{class:"mi-number-field__contour"}),R[6]||(R[6]=r.createTextVNode()),r.createElementVNode("div",ub,[C.label?(r.openBlock(),r.createElementBlock("label",pb,[r.createTextVNode(r.toDisplayString(C.label)+" ",1),r.unref(l).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(C.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),R[2]||(R[2]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:c,"onUpdate:modelValue":R[0]||(R[0]=O=>p.value=O),disabled:C.disabled,placeholder:C.placeholder,class:"text-s flex-grow"},null,8,hb),[[r.vModelText,p.value]])]),R[7]||(R[7]=r.createTextVNode()),r.createElementVNode("div",fb,[r.createElementVNode("div",{class:r.normalizeClass([{disabled:m.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:B},R[3]||(R[3]=[r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 4.93933L13.5303 10.4697L12.4697 11.5303L8 7.06065L3.53033 11.5303L2.46967 10.4697L8 4.93933Z",fill:"#110529"})],-1)]),2),R[5]||(R[5]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass([{disabled:y.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:A},R[4]||(R[4]=[r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.46967 6.53033L3.53033 5.46967L8 9.93934L12.4697 5.46967L13.5303 6.53033L8 12.0607L2.46967 6.53033Z",fill:"#110529"})],-1)]),2)])]),R[8]||(R[8]=r.createTextVNode()),f.value.trim()?(r.openBlock(),r.createElementBlock("div",mb,r.toDisplayString(f.value),1)):r.createCommentVNode("",!0)],34))}}),yb={class:"pl-chip__text"},Sl=r.defineComponent({__name:"PlChip",props:{closeable:{type:Boolean},small:{type:Boolean}},emits:["close"],setup(t){const e=r.ref(),n=r.ref(!1);return r.onMounted(()=>{var o;e.value&&(n.value=((o=e.value)==null?void 0:o.clientWidth)>=256)}),(o,s)=>(r.openBlock(),r.createBlock(r.unref(Ct),{position:"top",class:"pl-chip-tooltip",delay:500},r.createSlots({default:r.withCtx(()=>[s[4]||(s[4]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"chip",ref:e,class:r.normalizeClass(["pl-chip",{small:o.small}])},[r.createElementVNode("div",yb,[r.renderSlot(o.$slots,"default")]),s[3]||(s[3]=r.createTextVNode()),o.closeable?(r.openBlock(),r.createElementBlock("div",{key:0,tabindex:"0",class:"pl-chip__close",onKeydown:s[0]||(s[0]=r.withKeys(l=>o.$emit("close"),["enter"])),onClick:s[1]||(s[1]=r.withModifiers(l=>o.$emit("close"),["stop"]))},s[2]||(s[2]=[r.createElementVNode("div",{class:"pl-chip__close--icon"},null,-1)]),32)):r.createCommentVNode("",!0)],2)]),_:2},[n.value?{name:"tooltip",fn:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),key:"0"}:void 0]),1024))}}),_b={class:"pl-multi-dropdown__envelope"},vb=["tabindex"],Cb={class:"pl-multi-dropdown__container"},wb={class:"pl-multi-dropdown__field"},bb=["disabled","placeholder"],xb={class:"pl-multi-dropdown__append"},kb={key:0},Sb={key:0,class:"required-icon"},Eb={class:"pl-multi-dropdown__open-chips-container"},Tb={key:0,class:"nothing-found"},Bb={key:0,class:"pl-multi-dropdown__error"},Vb={key:1,class:"pl-multi-dropdown__helper"},Nb={name:"PlDropdownMulti"},Ab=r.defineComponent({...Nb,props:{modelValue:{default:()=>[]},label:{default:void 0},options:{},helper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=j=>n("update:modelValue",j),s=r.useSlots(),l=t,c=r.ref(),u=r.ref(),p=r.ref(),f=r.reactive({search:"",activeOption:-1,open:!1,optionsHeight:0}),m=r.computed(()=>Array.isArray(l.modelValue)?l.modelValue:[]),y=r.computed(()=>f.open&&l.modelValue.length>0?l.placeholder:l.modelValue.length>0?"":l.placeholder),T=r.computed(()=>pr(l.options).filter(j=>xl(m.value,j.value))),B=r.computed(()=>{const j=r.unref(m),Y=pr(l.options);return(f.search?Y.filter(q=>{const ee=f.search.toLowerCase();return q.label.toLowerCase().includes(ee)?!0:typeof q.value=="string"?q.value.toLowerCase().includes(ee):q.value===f.search}):[...Y]).map(q=>({...q,selected:xl(j,q.value)}))}),A=r.computed(()=>l.disabled?void 0:"0"),I=()=>{f.activeOption=mi(B.value.findIndex(j=>Dt(j.value,l.modelValue)),j=>j<0?0:j)},L=j=>{var Y;const q=r.unref(m);o(xl(q,j)?q.filter(ee=>!Dt(ee,j)):[...q,j]),f.search="",(Y=c==null?void 0:c.value)==null||Y.focus()},C=j=>o(r.unref(m).filter(Y=>!Dt(Y,j))),R=()=>{var j;return(j=p.value)==null?void 0:j.focus()},O=()=>f.open=!f.open,F=j=>{var Y,q;const ee=j.relatedTarget;!((Y=c.value)!=null&&Y.contains(ee))&&!((q=u.value)!=null&&q.contains(ee))&&(f.search="",f.open=!1)},N=()=>{const j=u.value;j&&ct(j.querySelector(".hovered-item"),Y=>{gi(j,Y)})},U=j=>{var Y;const{open:q,activeOption:ee}=f;if(!q){j.code==="Enter"&&(f.open=!0);return}j.code==="Escape"&&(f.open=!1,(Y=c.value)==null||Y.focus());const G=r.unref(B),{length:S}=G;if(!S)return;["ArrowDown","ArrowUp","Enter"].includes(j.code)&&j.preventDefault(),j.code==="Enter"&&L(G[ee].value);const w=j.code==="ArrowDown"?1:j.code==="ArrowUp"?-1:0;f.activeOption=Math.abs(ee+w+S)%S,requestAnimationFrame(N)};Zn(c),r.watch(()=>l.modelValue,()=>I(),{immediate:!0}),r.watchPostEffect(()=>{f.search,f.open&&N()});const te=r.reactive({top:"0px",left:"0px",width:"0px"});return r.watch(u,j=>{if(j){const Y=j.getBoundingClientRect();f.optionsHeight=Y.height,window.dispatchEvent(new CustomEvent("adjust"))}}),_o(c,j=>{const Y=j.top+j.height+5;Y+f.optionsHeight>j.clientHeight?te.top=j.top-f.optionsHeight-5+"px":te.top=Y+"px",te.left=j.left+"px",te.width=j.width+"px"}),(j,Y)=>(r.openBlock(),r.createElementBlock("div",_b,[r.createElementVNode("div",{ref_key:"rootRef",ref:c,tabindex:A.value,class:r.normalizeClass(["pl-multi-dropdown",{open:f.open,error:j.error,disabled:j.disabled}]),onKeydown:U,onFocusout:F},[r.createElementVNode("div",Cb,[r.createElementVNode("div",wb,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:p,"onUpdate:modelValue":Y[0]||(Y[0]=q=>f.search=q),type:"text",tabindex:"-1",disabled:j.disabled,placeholder:y.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:Y[1]||(Y[1]=q=>f.open=!0)},null,40,bb),[[r.vModelText,f.search]]),Y[3]||(Y[3]=r.createTextVNode()),f.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:"chips-container",onClick:R},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(T.value,(q,ee)=>(r.openBlock(),r.createBlock(r.unref(Sl),{key:ee,closeable:"",small:"",onClick:Y[2]||(Y[2]=r.withModifiers(G=>f.open=!0,["stop"])),onClose:G=>C(q.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(q.label||q.value),1)]),_:2},1032,["onClose"]))),128))])),Y[4]||(Y[4]=r.createTextVNode()),r.createElementVNode("div",{class:"arrow",onClick:r.withModifiers(O,["stop"])}),Y[5]||(Y[5]=r.createTextVNode()),r.createElementVNode("div",xb,[r.renderSlot(j.$slots,"append")])]),Y[10]||(Y[10]=r.createTextVNode()),j.label?(r.openBlock(),r.createElementBlock("label",kb,[j.required?(r.openBlock(),r.createElementBlock("i",Sb)):r.createCommentVNode("",!0),Y[6]||(Y[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(j.label),1),Y[7]||(Y[7]=r.createTextVNode()),r.unref(s).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(j.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),Y[11]||(Y[11]=r.createTextVNode()),f.open?(r.openBlock(),r.createBlock(r.Teleport,{key:1,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:u,class:"pl-multi-dropdown__options",style:r.normalizeStyle(te),tabindex:"-1",onFocusout:F},[r.createElementVNode("div",Eb,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(T.value,(q,ee)=>(r.openBlock(),r.createBlock(r.unref(Sl),{key:ee,closeable:"",small:"",onClose:G=>C(q.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(q.label||q.value),1)]),_:2},1032,["onClose"]))),128))]),Y[8]||(Y[8]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(B.value,(q,ee)=>(r.openBlock(),r.createBlock(yo,{key:ee,option:q,"text-item":"text","is-selected":q.selected,"is-hovered":f.activeOption==ee,size:"medium","use-checkbox":"",onClick:r.withModifiers(G=>L(q.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128)),Y[9]||(Y[9]=r.createTextVNode()),B.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Tb,"Nothing found"))],36)])):r.createCommentVNode("",!0),Y[12]||(Y[12]=r.createTextVNode()),r.createVNode(hr,{class:"pl-multi-dropdown__contour"})])],42,vb),Y[13]||(Y[13]=r.createTextVNode()),j.error?(r.openBlock(),r.createElementBlock("div",Bb,r.toDisplayString(j.error),1)):j.helper?(r.openBlock(),r.createElementBlock("div",Vb,r.toDisplayString(j.helper),1)):r.createCommentVNode("",!0)]))}}),El=r.defineComponent({__name:"PlCheckboxBase",props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t){const e=t,n=r.computed(()=>e.modelValue);return(o,s)=>(r.openBlock(),r.createElementBlock("div",{tabindex:"0",class:r.normalizeClass(["pl-checkbox-base",{checked:n.value,disabled:o.disabled}]),onClick:s[0]||(s[0]=l=>o.$emit("update:modelValue",!o.modelValue)),onKeydown:s[1]||(s[1]=r.withKeys(l=>o.$emit("update:modelValue",!o.modelValue),["enter"]))},null,34))}}),Pb={name:"PlCheckbox"},zu=r.defineComponent({...Pb,props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t){const e=t,n=r.useSlots();return(o,s)=>r.unref(n).default?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["pl-checkbox",{disabled:o.disabled}])},[r.createVNode(El,r.mergeProps(e,{"onUpdate:modelValue":s[0]||(s[0]=l=>o.$emit("update:modelValue",l))}),null,16),s[3]||(s[3]=r.createTextVNode()),r.createElementVNode("label",{onClick:s[1]||(s[1]=l=>o.$emit("update:modelValue",!o.$props.modelValue))},[r.renderSlot(o.$slots,"default")])],2)):(r.openBlock(),r.createBlock(El,r.mergeProps({key:1},e,{"onUpdate:modelValue":s[2]||(s[2]=l=>o.$emit("update:modelValue",l))}),null,16))}}),Db={key:0},Fb=["onClick"],Rb={name:"PlCheckboxGroup"},Mb=r.defineComponent({...Rb,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,s=c=>o.modelValue.includes(c),l=c=>{const u=o.modelValue??[];n("update:modelValue",s(c)?u.filter(p=>p!==c):[...u,c])};return(c,u)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-checkbox-group",{disabled:c.disabled}])},[c.label?(r.openBlock(),r.createElementBlock("label",Db,r.toDisplayString(c.label),1)):r.createCommentVNode("",!0),u[1]||(u[1]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.options.map(p=>({label:"label"in p?p.label:p.text,value:p.value})),(p,f)=>(r.openBlock(),r.createElementBlock("div",{key:f},[r.createVNode(El,{disabled:c.disabled,label:p.label,"model-value":s(p.value),"onUpdate:modelValue":()=>l(p.value)},null,8,["disabled","label","model-value","onUpdate:modelValue"]),u[0]||(u[0]=r.createTextVNode()),r.createElementVNode("label",{onClick:r.withModifiers(()=>l(p.value),["stop"])},r.toDisplayString(p.label),9,Fb)]))),128))],2))}}),Ib="_component_tupwt_1",Ob={component:Ib},Lb={};function Gb(t,e){return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(t.$style.component)},e[0]||(e[0]=[r.createElementVNode("div",null,null,-1)]),2)}const zb={$style:Ob},$b=Lt(Lb,[["render",Gb],["__cssModules",zb]]),Ub={key:1,class:"pl-dialog-modal__title"},Zb={inheritAttrs:!1},Tl=r.defineComponent({...Zb,__name:"PlDialogModal",props:{modelValue:{type:Boolean},width:{default:"448px"},height:{default:"auto"},minHeight:{default:"auto"},maxHeight:{default:"auto"},closable:{type:Boolean,default:!0},noContentGutters:{type:Boolean,default:!1},noTopContentGutter:{type:Boolean},actionsHasTopBorder:{type:Boolean,default:!0},closeOnOutsideClick:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=t,l=r.ref(),c=r.useAttrs();function u(p){l.value&&s.closeOnOutsideClick&&document.contains(p.target)&&!l.value.contains(p.target)&&o("update:modelValue",!1)}return rt(document.body,"keyup",p=>{s.modelValue&&p.code==="Escape"&&o("update:modelValue",!1)}),(p,f)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"dialog"},{default:r.withCtx(()=>[p.modelValue?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-dialog-modal__shadow",onClick:u},[r.createElementVNode("div",r.mergeProps(r.unref(c),{ref_key:"modal",ref:l,class:["pl-dialog-modal",{"has-title":r.unref(n).title,"has-content":r.unref(n).default}],style:{width:p.width,height:p.height,minHeight:p.minHeight,maxHeight:p.maxHeight}}),[p.closable?(r.openBlock(),r.createBlock($b,{key:0,class:"close-modal-btn",onClick:f[0]||(f[0]=r.withModifiers(m=>o("update:modelValue",!1),["stop"]))})):r.createCommentVNode("",!0),f[1]||(f[1]=r.createTextVNode()),r.unref(n).title?(r.openBlock(),r.createElementBlock("div",Ub,[r.renderSlot(p.$slots,"title")])):r.createCommentVNode("",!0),f[2]||(f[2]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(["pl-dialog-modal__content",{"no-content-gutters":p.noContentGutters,"no-top-content-gutter":p.noTopContentGutter}])},[r.renderSlot(p.$slots,"default")],2),f[3]||(f[3]=r.createTextVNode()),r.unref(n).actions?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["pl-dialog-modal__actions",{"has-top-border":p.actionsHasTopBorder}])},[r.renderSlot(p.$slots,"actions")],2)):r.createCommentVNode("",!0)],16)])):r.createCommentVNode("",!0)]),_:3})]))}}),Wb=r.defineComponent({__name:"TransitionSlidePanel",setup(t){function e(){window.dispatchEvent(new CustomEvent("adjust"))}function n(){window.dispatchEvent(new CustomEvent("adjust"))}return(o,s)=>(r.openBlock(),r.createBlock(r.Transition,{name:"slide-panel",onAfterEnter:e,onAfterLeave:n},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3}))}}),Hb={key:0,class:"pl-slide-modal__title"},jb={class:"pl-slide-modal__content"},qb={key:1,class:"pl-slide-modal__actions"},Kb={name:"PlSlideModal",inheritAttrs:!1},$u=r.defineComponent({...Kb,props:{modelValue:{type:Boolean,default:!1},width:{default:"368px"},shadow:{type:Boolean,default:!1},closeOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=t,l=r.ref(),c=r.useAttrs();return ws(l,()=>{s.modelValue&&s.closeOnOutsideClick&&o("update:modelValue",!1)}),rt(document,"keydown",u=>{u.key==="Escape"&&o("update:modelValue",!1)}),(u,p)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(Wb,null,{default:r.withCtx(()=>[u.modelValue?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref_key:"modal",ref:l,style:{width:u.width}},r.unref(c),{class:["pl-slide-modal",{"has-title":r.unref(n).title,"has-actions":r.unref(n).actions}],onKeyup:p[1]||(p[1]=r.withKeys(f=>o("update:modelValue",!1),["esc"]))}),[r.createElementVNode("div",{class:"close-dialog-btn",onClick:p[0]||(p[0]=f=>o("update:modelValue",!1))}),p[3]||(p[3]=r.createTextVNode()),r.unref(n).title?(r.openBlock(),r.createElementBlock("div",Hb,[r.renderSlot(u.$slots,"title")])):r.createCommentVNode("",!0),p[4]||(p[4]=r.createTextVNode()),r.createElementVNode("div",jb,[r.renderSlot(u.$slots,"default")]),p[5]||(p[5]=r.createTextVNode()),r.unref(n).actions?(r.openBlock(),r.createElementBlock("div",qb,[r.renderSlot(u.$slots,"actions")])):r.createCommentVNode("",!0)],16)):r.createCommentVNode("",!0)]),_:3}),p[6]||(p[6]=r.createTextVNode()),u.modelValue&&u.shadow?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-slide-modal__shadow",onKeyup:p[2]||(p[2]=r.withKeys(f=>o("update:modelValue",!1),["esc"]))},null,32)):r.createCommentVNode("",!0)]))}}),Yb={key:0,class:"label"},Jb={name:"PlToggleSwitch"},xs=r.defineComponent({...Jb,props:{label:{},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{tabindex:"0",class:r.normalizeClass(["ui-toggle-switch",{active:e.modelValue}]),onClick:n[0]||(n[0]=o=>e.$emit("update:modelValue",!e.modelValue)),onKeydown:n[1]||(n[1]=r.withKeys(o=>e.$emit("update:modelValue",!e.modelValue),["enter"]))},[n[2]||(n[2]=r.createElementVNode("div",{class:"ui-toggle-switch__body"},[r.createElementVNode("div",{class:"ui-toggle-switch__handle"})],-1)),n[3]||(n[3]=r.createTextVNode()),e.label?(r.openBlock(),r.createElementBlock("span",Yb,r.toDisplayString(e.label),1)):r.createCommentVNode("",!0)],34))}});function Uu(t){return r.getCurrentScope()?(r.onScopeDispose(t),!0):!1}function Xb(t){return r.unref(t)}const Qb=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function ex(t,e,n={}){const{immediate:o=!0}=n,s=r.ref(!1);let l=null;function c(){l&&(clearTimeout(l),l=null)}function u(){s.value=!1,c()}function p(...f){c(),s.value=!0,l=setTimeout(()=>{s.value=!1,l=null,t(...f)},Xb(e))}return o&&(s.value=!0,Qb&&p()),Uu(u),{isPending:r.readonly(s),start:p,stop:u}}function tx(t,e,n){return r.watch(t,(o,s,l)=>{o&&e(o,s,l)},{...n,once:!1})}function nx(t,e,n){const{start:o}=ex(l,e,{immediate:!1}),s=r.ref(!1);async function l(){s.value&&(await t(),o())}function c(){s.value||(s.value=!0,l())}function u(){s.value=!1}return n!=null&&n.immediate&&c(),Uu(u),{isActive:s,pause:u,resume:c}}const rx="[==PROGRESS==]";function ox(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ix(t){const e=r.ref(),n=r.reactive({errorCount:0});async function o(){var l;let c=e.value;if(c===void 0)return;const u=t.mockPlatforma??window.platforma;if(!u){console.warn("Platforma API is not available");return}for(;;){const p=await u.logDriver.readText(c.logHandle,100,c.lastOffset);if(c.error=void 0,n.errorCount=0,p.shouldUpdateHandle||c.logHandle!==((l=e.value)==null?void 0:l.logHandle))return;const f=t.progressPrefix??rx,m=new TextDecoder().decode(p.data).replace(new RegExp(`${ox(f)}`,"g"),"");if(c=Object.assign(c,{lines:c.lines+m,lastOffset:p.newOffset,finished:!p.live}),p.newOffset>=p.size)break}}const s=nx(()=>o().catch(l=>{e.value&&(n.errorCount++,n.errorCount>(t.maxRetries??3)?e.value.error=l:console.warn("skip error:",l,"retry..."))}),1500,{immediate:!1});return tx(()=>{var l;return(l=e==null?void 0:e.value)==null?void 0:l.finished},()=>s.pause()),r.watch(()=>t.logHandle,l=>{var c;l===void 0?(e.value=void 0,s.pause()):l!==((c=e.value)==null?void 0:c.logHandle)&&(e.value={logHandle:l,lastOffset:0,lines:"",finished:!1,error:void 0},n.errorCount=0,s.resume())},{immediate:!0}),e}const sx={key:0},ax={class:"pl-log-view__copy"},lx={key:1,class:"pl-log-view__error"},cx={name:"PlLogView"},Zu=r.defineComponent({...cx,props:{value:{},logHandle:{},progressPrefix:{},error:{},output:{},maxRetries:{},mockPlatforma:{},label:{}},setup(t){const e=A=>{if(A&&A.ok===!1)return A.errors.join(`
|
|
53
|
+
`)},n=t,o=ix(n),s=r.ref(!0),l=r.ref(),c=r.ref(),u=r.computed(()=>{var A;return((A=o.value)==null?void 0:A.error)??n.error??e(n.output)}),p=r.computed(()=>{var A;return((A=o.value)==null?void 0:A.lines)??n.value??z_(n.output)}),f=r.ref(!1);Zn(c);const m=r.computed(()=>f.value?"clipboard-copied":"clipboard"),y=()=>{f.value=!0,setTimeout(()=>{f.value=!1},1200),p.value&&typeof p.value=="string"&&navigator.clipboard.writeText(p.value)},T=()=>{$r(l.value,A=>{s.value&&A.scrollTo(A.scrollLeft,A.scrollHeight)})};r.watch(p,()=>{requestAnimationFrame(()=>{T()})},{immediate:!0});const B=A=>{const I=A.target;s.value=I.scrollTop+20>=I.scrollHeight-I.offsetHeight};return(A,I)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:c,class:r.normalizeClass(["pl-log-view",{"has-error":u.value}])},[A.label?(r.openBlock(),r.createElementBlock("label",sx,r.toDisplayString(A.label),1)):r.createCommentVNode("",!0),I[1]||(I[1]=r.createTextVNode()),r.createVNode(hr,{class:"pl-log-view__contour"}),I[2]||(I[2]=r.createTextVNode()),r.createElementVNode("div",ax,[r.createVNode(r.unref(Ct),{"close-delay":800,position:"top"},{tooltip:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(f.value?"copied":"copy"),1)]),default:r.withCtx(()=>[r.createVNode(r.unref(cn),{title:"Copy content",name:m.value,onClick:y},null,8,["name"]),I[0]||(I[0]=r.createTextVNode())]),_:1})]),I[3]||(I[3]=r.createTextVNode()),u.value?(r.openBlock(),r.createElementBlock("div",lx,r.toDisplayString(u.value),1)):(r.openBlock(),r.createElementBlock("div",{key:2,ref_key:"contentRef",ref:l,class:"pl-log-view__content",onScroll:B},r.toDisplayString(p.value),545))],2))}}),dx="_component_1ukal_1",ux="_tab_1ukal_14",px="_disabled_1ukal_27",hx="_active_1ukal_56",fx="_topLine_1ukal_69",Co={component:dx,tab:ux,disabled:px,active:hx,topLine:fx},mx=r.defineComponent({__name:"Tab",props:{option:{}},setup(t){const e=r.ref(),n=r.reactive({isOverflown:!1});return r.onMounted(()=>{const o=r.unref(e);if(!o)return;const s=o.$el.querySelector("span");s&&requestAnimationFrame(()=>{s.offsetWidth<s.scrollWidth&&(n.isOverflown=!0)})}),(o,s)=>(r.openBlock(),r.createBlock(r.unref(Ct),{ref_key:"rootRef",ref:e,element:"div",position:"top",hide:!n.isOverflown,"close-delay":300,"data-is-overflown":n.isOverflown?"true":"false"},{tooltip:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.option.label),1)]),default:r.withCtx(()=>[r.renderSlot(o.$slots,"default"),s[0]||(s[0]=r.createTextVNode())]),_:3},8,["hide","data-is-overflown"]))}}),gx={name:"PlTabs"},yx=r.defineComponent({...gx,props:{modelValue:{},options:{},disabled:{type:Boolean},topLine:{type:Boolean},maxTabWidth:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=s=>n("update:modelValue",s);return(s,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(Co).component,{[r.unref(Co).disabled]:s.disabled,[r.unref(Co).topLine]:s.topLine}])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.options,(c,u)=>(r.openBlock(),r.createBlock(mx,{key:u,tabindex:s.modelValue===c.value||s.disabled||c.disabled?void 0:0,option:c,class:r.normalizeClass([{[r.unref(Co).active]:s.modelValue===c.value,[r.unref(Co).disabled]:c.disabled},r.unref(Co).tab]),style:r.normalizeStyle({"--pl-tabs-item-max-width":c.maxWidth??s.maxTabWidth}),onKeydown:r.withKeys(p=>o(c.value),["enter"]),onClick:p=>o(c.value)},{default:r.withCtx(()=>[r.renderSlot(s.$slots,c.value,{option:c},()=>[r.createElementVNode("span",null,r.toDisplayString(c.label),1)])]),_:2},1032,["tabindex","option","class","style","onKeydown","onClick"]))),128))],2))}}),_x=r.defineComponent({__name:"PlSectionSeparator",props:{compact:{type:Boolean}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-section-separator",{[e.$style.compact]:e.compact}])},[r.createElementVNode("div",{class:r.normalizeClass(e.$style.content)},[r.renderSlot(e.$slots,"default")],2)],2))}}),vx="_compact_rhd5u_16",Cx="_content_rhd5u_20",wx={compact:vx,content:Cx},bx={$style:wx},Wu=Lt(_x,[["__cssModules",bx]]),xx=r.defineComponent({__name:"PlAccordion",props:r.mergeModels({multiple:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t;return r.provide("pl-accordion-model",e),r.provide("pl-accordion-props",r.toRef(n)),(o,s)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.renderSlot(o.$slots,"header"),s[0]||(s[0]=r.createTextVNode()),r.renderSlot(o.$slots,"default")],64))}}),kx=r.defineComponent({__name:"ExpandTransition",setup(t){const e=o=>{o.style.setProperty("--component-height",o.scrollHeight+"px"),o.classList.add("expand-collapse-fix")},n=o=>{o.style.removeProperty("--component-height"),o.classList.remove("expand-collapse-fix")};return(o,s)=>(r.openBlock(),r.createBlock(r.Transition,{name:"expand-collapse",onEnter:e,onLeave:e,onAfterEnter:n,onAfterLeave:n},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3}))}}),Sx=r.defineComponent({__name:"PlAccordionSection",props:r.mergeModels({label:{},compact:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.inject("pl-accordion-model"),n=r.inject("pl-accordion-props"),o=r.useModel(t,"modelValue"),s=cu(),l=r.computed(()=>!n||n.value.multiple),c=r.computed({get(){return l.value?o.value:e?e.value===s:o.value},set(u){l.value?o.value=u:e&&(e.value=e.value===s?"":s)}});return(u,p)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(r.unref(Wu),{class:r.normalizeClass(u.$style.separator),compact:u.compact,onClick:p[0]||(p[0]=f=>c.value=!c.value)},{default:r.withCtx(()=>[r.createVNode(r.unref(Un),{name:"chevron-right",class:r.normalizeClass([{[u.$style.down]:c.value},u.$style.chevron])},null,8,["class"]),r.createTextVNode(" "+r.toDisplayString(u.label),1)]),_:1},8,["class","compact"]),p[1]||(p[1]=r.createTextVNode()),r.createVNode(kx,null,{default:r.withCtx(()=>[c.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(u.$style.content)},[r.renderSlot(u.$slots,"default")],2)):r.createCommentVNode("",!0)]),_:3})],64))}}),Ex="_content_jmjfk_2",Tx="_separator_jmjfk_14",Bx="_chevron_jmjfk_19",Vx="_down_jmjfk_23",Nx={content:Ex,separator:Tx,chevron:Bx,down:Vx},Ax={$style:Nx},Px=Lt(Sx,[["__cssModules",Ax]]),Dx="_component_1ietr_1",Fx="_local_1ietr_1",Rx="_supported_1ietr_26",Mx="_remote_1ietr_32",Ix="_search_1ietr_40",Ox="_selected_1ietr_72",Lx="_breadcrumbs_1ietr_86",Gx="_cat_1ietr_116",zx="_message_1ietr_122",$x="_isFile_1ietr_197",Ux="_isDir_1ietr_201",Zx="_canBeSelected_1ietr_207",Wx="_spin_1ietr_1",at={component:Dx,local:Fx,supported:Rx,remote:Mx,search:Ix,"ls-container":"_ls-container_1ietr_50","ls-head":"_ls-head_1ietr_57",selected:Ox,breadcrumbs:Lx,"ls-error":"_ls-error_1ietr_108",cat:Gx,message:zx,"ls-empty":"_ls-empty_1ietr_131","ls-body":"_ls-body_1ietr_152",isFile:$x,isDir:Ux,canBeSelected:Zx,"ls-loader":"_ls-loader_1ietr_213","loader-icon":"_loader-icon_1ietr_221",spin:Wx};function Hu(t){return t?t.map(e=>"."+Z_(e,["."])):void 0}function Hx(t){const e=t.split("/");e[0]!==""&&e.unshift("");const n=[];for(let o=0;o<e.length;o++)n.push({index:o,name:o===0?"Root":e[o],path:e.slice(0,o+1).filter(s=>s!=="").join("/")});return n}const ju=()=>({dirPath:"",search:"",storageEntry:void 0,items:[],error:"",storageOptions:[],selected:[],lastSelected:void 0,currentLoadingPath:void 0,showHiddenItems:!1});function jx(t){return r.computed(()=>{let e=t.items;if(t.showHiddenItems||(e=e.filter(n=>!n.name.startsWith("."))),t.search){const n=t.search.toLocaleLowerCase();e=e.filter(o=>o.name.toLocaleLowerCase().includes(n))}return e})}const qu={mounted:t=>{if(t.clientWidth<t.scrollWidth){const e=t.innerText;t.innerText=e.substring(0,57)+"..."+e.substring(e.length-10)}}},qx=["title","onClick"],Kx={key:0,class:"ls-loader"},Yx=["onClick"],Jx=["title"],Xx=["onClick"],Qx=["title"],ek=r.defineComponent({__name:"Remote",props:{modelValue:{type:Boolean},extensions:{default:void 0},multi:{type:Boolean},title:{default:void 0},autoSelectStorage:{type:Boolean,default:!0},submit:{}},emits:["update:modelValue","import:files"],setup(t,{expose:e}){const n=t,o=r.reactive(ju()),s=()=>{o.search="",o.error="",o.lastSelected=void 0},l=r.computed(()=>Hu(n.extensions)),c=jx(o),u=r.computed(()=>{var F;return{modelValue:n.modelValue,dirPath:o.dirPath,storageHandle:(F=o.storageEntry)==null?void 0:F.handle}}),p=(F,N)=>{window.platforma&&o.currentLoadingPath!==N&&(o.currentLoadingPath=N,window.platforma.lsDriver.listFiles(F,N).then(U=>{N===o.dirPath&&(o.items=gs(U).entries.map(te=>({path:te.fullPath,name:te.name,isDir:te.type==="dir",canBeSelected:te.type==="file"&&(!l.value||l.value.some(j=>te.fullPath.endsWith(j))),handle:te.type==="file"?te.handle:void 0,selected:!1})).sort((te,j)=>te.isDir&&!j.isDir?-1:!te.isDir&&j.isDir?1:te.name.localeCompare(j.name)).map((te,j)=>({id:j,...te})),o.lastSelected=void 0)}).catch(U=>o.error=String(U)).finally(()=>{o.currentLoadingPath=void 0}))},f=()=>{s();const{storageHandle:F,dirPath:N,modelValue:U}=u.value;F&&U&&p(F,N)},m=r.computed(()=>Hx(o.dirPath)),y=r.computed(()=>o.items.filter(F=>F.canBeSelected&&F.selected&&!F.isDir)),T=r.computed(()=>{var F;return y.value.length>0&&((F=o.storageEntry)==null?void 0:F.handle)}),B=()=>{var F;return{storageHandle:gs((F=o.storageEntry)==null?void 0:F.handle),files:y.value.map(N=>N.handle)}},A=F=>{o.dirPath=F},I=(F,N)=>{const{shiftKey:U,metaKey:te}=F,{lastSelected:j}=o;if(F.preventDefault(),N.canBeSelected){if(n.multi||o.items.forEach(Y=>Y.selected=!1),N.selected=!0,!n.multi)return;!te&&!U&&o.items.forEach(Y=>{Y.id!==N.id&&(Y.selected=!1)}),U&&j!==void 0&&o.items.forEach(Y=>{O_(Y.id,j,N.id)&&(Y.selected=!0)}),N.selected&&(o.lastSelected=N.id)}},L=F=>{F&&!n.multi||o.items.filter(N=>N.canBeSelected).forEach(N=>{N.selected=F})},C=()=>L(!0),R=()=>L(!1),O=()=>{if(s(),R(),!window.platforma){console.warn("platforma API is not found");return}window.platforma.lsDriver.getStorageList().then(F=>{o.storageOptions=F.map(N=>({text:N.name,value:N})),n.autoSelectStorage&&$r(F.find(N=>N.name==="local"||N.name.startsWith("local_disk_")&&N.initialFullPath.length>4),N=>{o.storageEntry=N})}).catch(F=>o.error=String(F))};return r.watch(r.toRef(o,"storageEntry"),F=>{s(),o.dirPath=(F==null?void 0:F.initialFullPath)??""},{immediate:!0}),r.watch([()=>o.dirPath,()=>o.storageEntry],()=>{f()}),r.watch(()=>n.modelValue,F=>{F?O():Object.assign(o,ju())},{immediate:!0}),rt(document,"keydown",F=>{n.modelValue&&F.target===document.body&&(F.metaKey&&F.code==="KeyA"&&(F.preventDefault(),C()),F.metaKey&&F.shiftKey&&F.code==="Period"&&(F.preventDefault(),o.showHiddenItems=!o.showHiddenItems),F.code==="Enter"&&n.submit())}),e({isReady:T,getFilesToImport:B}),r.onMounted(O),(F,N)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(at).remote),onClick:r.withModifiers(R,["stop"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(at).search)},[r.createElementVNode("div",null,[r.createVNode(r.unref(yi),{modelValue:o.storageEntry,"onUpdate:modelValue":N[0]||(N[0]=U=>o.storageEntry=U),label:"Select storage",options:o.storageOptions},null,8,["modelValue","options"])]),N[2]||(N[2]=r.createTextVNode()),r.createElementVNode("div",null,[r.createVNode(r.unref(Mu),{modelValue:o.search,"onUpdate:modelValue":N[1]||(N[1]=U=>o.search=U),label:"Search in folder",clearable:""},null,8,["modelValue"])])],2),N[12]||(N[12]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(at)["ls-container"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(at)["ls-head"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(at).breadcrumbs)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.value,(U,te)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:te},[r.createElementVNode("div",{title:U.path,onClick:j=>A(U.path)},r.toDisplayString(U.name),9,qx),N[3]||(N[3]=r.createTextVNode()),U.index!==m.value.length-1?(r.openBlock(),r.createBlock(r.unref(vo),{key:0,name:"chevron-right"})):r.createCommentVNode("",!0)],64))),128))],2),N[4]||(N[4]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(at).selected)},"Selected: "+r.toDisplayString(y.value.length),3)],2),N[11]||(N[11]=r.createTextVNode()),o.currentLoadingPath!==void 0?(r.openBlock(),r.createElementBlock("div",Kx,N[5]||(N[5]=[r.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"},null,-1)]))):o.storageEntry?o.error?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(r.unref(at)["ls-error"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(at).cat)},null,2),N[7]||(N[7]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(at).message)},r.toDisplayString(o.error),3)],2)):(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(r.unref(at)["ls-body"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(c),U=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:U.id},[U.isDir?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(r.unref(at).isDir),onClick:te=>A(U.path)},[N[8]||(N[8]=r.createElementVNode("i",{class:"icon-16 icon-chevron-right"},null,-1)),N[9]||(N[9]=r.createTextVNode()),r.withDirectives((r.openBlock(),r.createElementBlock("span",{title:U.name},[r.createTextVNode(r.toDisplayString(U.name),1)],8,Jx)),[[r.unref(qu)]])],10,Yx)):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass({[r.unref(at).canBeSelected]:U.canBeSelected,[r.unref(at).selected]:U.selected}),onClick:r.withModifiers(te=>I(te,U),["stop"])},[r.createElementVNode("i",{class:r.normalizeClass(["mask-16 mask-box",r.unref(at).isFile])},null,2),N[10]||(N[10]=r.createTextVNode()),r.withDirectives((r.openBlock(),r.createElementBlock("span",{title:U.name},[r.createTextVNode(r.toDisplayString(U.name),1)],8,Qx)),[[r.unref(qu)]])],10,Xx))],64))),128))],2)):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(r.unref(at)["ls-empty"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(at).cat)},null,2),N[6]||(N[6]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(at).message)},"Select storage to preview",2)],2))],2)],2))}}),tk={key:1,class:"alert-error"},nk=r.defineComponent({__name:"Local",props:{importFiles:{type:Function},multi:{type:Boolean},extensions:{}},setup(t){const e=t,n=r.reactive({error:void 0}),o=r.computed(()=>e.multi?"Drag & Drop files here or click to add":"Drag & Drop file here or click to add"),s=async c=>{var u,p,f;const m=(p=(u=window.platforma)==null?void 0:u.lsDriver)==null?void 0:p.fileToImportHandle;if(!m)return console.error("API platforma.lsDriver.fileToImportHandle is not available");const y=Hu(e.extensions),T=await Promise.all([...((f=c.dataTransfer)==null?void 0:f.files)??[]].filter(B=>!!B).filter(B=>y?y.some(A=>B.name.endsWith(A)):!0).map(B=>m(B)));T.length&&e.importFiles({files:T})},l=async()=>{var c,u;const p=e.extensions?[{name:"All Files",extensions:e.extensions}]:[];e.multi?(c=window.platforma)==null||c.lsDriver.showOpenMultipleFilesDialog({title:"Select files to import",filters:p}).then(({files:f})=>{f&&e.importFiles({files:f})}).catch(f=>n.error=f):(u=window.platforma)==null||u.lsDriver.showOpenSingleFileDialog({title:"Select file to import",filters:p}).then(({file:f})=>{f&&e.importFiles({files:[f]})}).catch(f=>n.error=f)};return(c,u)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(at).local),onDrop:s,onDragover:u[0]||(u[0]=r.withModifiers(()=>{},["prevent"])),onClick:l},[r.createVNode(r.unref(bs),{name:"cloud-upload"}),u[1]||(u[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(o.value),1),u[2]||(u[2]=r.createTextVNode()),c.extensions?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(r.unref(at).supported)},"Supported formats: "+r.toDisplayString(c.extensions.join(", ")),3)):r.createCommentVNode("",!0),u[3]||(u[3]=r.createTextVNode()),n.error?(r.openBlock(),r.createElementBlock("span",tk,r.toDisplayString(n.error),1)):r.createCommentVNode("",!0)],34))}}),rk={style:{margin:"0 24px"}},Ku=r.defineComponent({__name:"PlFileDialog",props:{modelValue:{type:Boolean},extensions:{default:void 0},multi:{type:Boolean},title:{default:void 0},autoSelectStorage:{type:Boolean,default:!0},closeOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue","import:files"],setup(t,{emit:e}){const n=e,o=t,s=r.ref("local"),l=r.computed(()=>o.multi?"Select Files to Import":"Select File to Import"),c=[{label:"My Computer",value:"local"},{label:"Remote",value:"remote"}],u=()=>n("update:modelValue",!1),p=r.useTemplateRef("remote"),f=()=>{var y,T;(y=p.value)!=null&&y.isReady&&(n("import:files",gs((T=p.value)==null?void 0:T.getFilesToImport())),u())},m=y=>{n("import:files",y),u()};return(y,T)=>(r.openBlock(),r.createBlock(r.unref(Tl),{"no-content-gutters":!0,"close-on-outside-click":y.closeOnOutsideClick,class:r.normalizeClass(["pl-dialog-modal",r.unref(at).component]),"model-value":y.modelValue,width:"688px",height:"720px","onUpdate:modelValue":u},r.createSlots({title:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(y.title??l.value),1)]),default:r.withCtx(()=>[T[4]||(T[4]=r.createTextVNode()),r.createElementVNode("div",rk,[r.createVNode(r.unref(Nu),{modelValue:s.value,"onUpdate:modelValue":T[0]||(T[0]=B=>s.value=B),options:c},null,8,["modelValue"])]),T[5]||(T[5]=r.createTextVNode()),s.value==="remote"?(r.openBlock(),r.createBlock(ek,r.mergeProps({key:0,ref:"remote"},y.$props,{submit:f}),null,16)):r.createCommentVNode("",!0),T[6]||(T[6]=r.createTextVNode()),s.value==="local"?(r.openBlock(),r.createBlock(nk,r.mergeProps({key:1,"import-files":m},y.$props),null,16)):r.createCommentVNode("",!0),T[7]||(T[7]=r.createTextVNode())]),_:2},[s.value==="remote"?{name:"actions",fn:r.withCtx(()=>{var B;return[r.createVNode(r.unref(gl),{style:{"min-width":"160px"},disabled:!((B=r.unref(p))!=null&&B.isReady),onClick:r.withModifiers(f,["stop"])},{default:r.withCtx(()=>T[1]||(T[1]=[r.createTextVNode("Import")])),_:1},8,["disabled"]),T[3]||(T[3]=r.createTextVNode()),r.createVNode(r.unref(Cs),{"justify-center":!1,onClick:r.withModifiers(u,["stop"])},{default:r.withCtx(()=>T[2]||(T[2]=[r.createTextVNode("Cancel")])),_:1})]}),key:"0"}:void 0]),1032,["close-on-outside-click","class","model-value"]))}});var Le;(function(t){t.assertEqual=s=>s;function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const l={};for(const c of s)l[c]=c;return l},t.getValidEnumValues=s=>{const l=t.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),c={};for(const u of l)c[u]=s[u];return t.objectValues(c)},t.objectValues=s=>t.objectKeys(s).map(function(l){return s[l]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const l=[];for(const c in s)Object.prototype.hasOwnProperty.call(s,c)&&l.push(c);return l},t.find=(s,l)=>{for(const c of s)if(l(c))return c},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function o(s,l=" | "){return s.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}t.joinValues=o,t.jsonStringifyReplacer=(s,l)=>typeof l=="bigint"?l.toString():l})(Le||(Le={}));var Bl;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Bl||(Bl={}));const le=Le.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fr=t=>{switch(typeof t){case"undefined":return le.undefined;case"string":return le.string;case"number":return isNaN(t)?le.nan:le.number;case"boolean":return le.boolean;case"function":return le.function;case"bigint":return le.bigint;case"symbol":return le.symbol;case"object":return Array.isArray(t)?le.array:t===null?le.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?le.promise:typeof Map<"u"&&t instanceof Map?le.map:typeof Set<"u"&&t instanceof Set?le.set:typeof Date<"u"&&t instanceof Date?le.date:le.object;default:return le.unknown}},X=Le.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ok=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Gt extends Error{constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(l){return l.message},o={_errors:[]},s=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(s);else if(c.code==="invalid_return_type")s(c.returnTypeError);else if(c.code==="invalid_arguments")s(c.argumentsError);else if(c.path.length===0)o._errors.push(n(c));else{let u=o,p=0;for(;p<c.path.length;){const f=c.path[p];p===c.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(c))):u[f]=u[f]||{_errors:[]},u=u[f],p++}}};return s(this),o}static assert(e){if(!(e instanceof Gt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Le.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},o=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(e(s))):o.push(e(s));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}Gt.create=t=>new Gt(t);const wo=(t,e)=>{let n;switch(t.code){case X.invalid_type:t.received===le.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case X.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Le.jsonStringifyReplacer)}`;break;case X.unrecognized_keys:n=`Unrecognized key(s) in object: ${Le.joinValues(t.keys,", ")}`;break;case X.invalid_union:n="Invalid input";break;case X.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Le.joinValues(t.options)}`;break;case X.invalid_enum_value:n=`Invalid enum value. Expected ${Le.joinValues(t.options)}, received '${t.received}'`;break;case X.invalid_arguments:n="Invalid function arguments";break;case X.invalid_return_type:n="Invalid function return type";break;case X.invalid_date:n="Invalid date";break;case X.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Le.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case X.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case X.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case X.custom:n="Invalid input";break;case X.invalid_intersection_types:n="Intersection results could not be merged";break;case X.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case X.not_finite:n="Number must be finite";break;default:n=e.defaultError,Le.assertNever(t)}return{message:n}};let Yu=wo;function ik(t){Yu=t}function ks(){return Yu}const Ss=t=>{const{data:e,path:n,errorMaps:o,issueData:s}=t,l=[...n,...s.path||[]],c={...s,path:l};if(s.message!==void 0)return{...s,path:l,message:s.message};let u="";const p=o.filter(f=>!!f).slice().reverse();for(const f of p)u=f(c,{data:e,defaultError:u}).message;return{...s,path:l,message:u}},sk=[];function se(t,e){const n=ks(),o=Ss({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===wo?void 0:wo].filter(s=>!!s)});t.common.issues.push(o)}class wt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const o=[];for(const s of n){if(s.status==="aborted")return we;s.status==="dirty"&&e.dirty(),o.push(s.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,n){const o=[];for(const s of n){const l=await s.key,c=await s.value;o.push({key:l,value:c})}return wt.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const s of n){const{key:l,value:c}=s;if(l.status==="aborted"||c.status==="aborted")return we;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||s.alwaysSet)&&(o[l.value]=c.value)}return{status:e.value,value:o}}}const we=Object.freeze({status:"aborted"}),Es=t=>({status:"dirty",value:t}),Tt=t=>({status:"valid",value:t}),Vl=t=>t.status==="aborted",Nl=t=>t.status==="dirty",_i=t=>t.status==="valid",vi=t=>typeof Promise<"u"&&t instanceof Promise;function Ts(t,e,n,o){if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Ju(t,e,n,o,s){if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}var he;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(he||(he={}));var Ci,wi;class Dn{constructor(e,n,o,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=o,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Xu=(t,e)=>{if(_i(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Gt(t.common.issues);return this._error=n,this._error}}};function Be(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:s}=t;if(e&&(n||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(l,c)=>{var u,p;const{message:f}=t;return l.code==="invalid_enum_value"?{message:f??c.defaultError}:typeof c.data>"u"?{message:(u=f??o)!==null&&u!==void 0?u:c.defaultError}:l.code!=="invalid_type"?{message:c.defaultError}:{message:(p=f??n)!==null&&p!==void 0?p:c.defaultError}},description:s}}class Ae{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return fr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:fr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new wt,ctx:{common:e.parent.common,data:e.data,parsedType:fr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(vi(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const o=this.safeParse(e,n);if(o.success)return o.data;throw o.error}safeParse(e,n){var o;const s={common:{issues:[],async:(o=n==null?void 0:n.async)!==null&&o!==void 0?o:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:fr(e)},l=this._parseSync({data:e,path:s.path,parent:s});return Xu(s,l)}async parseAsync(e,n){const o=await this.safeParseAsync(e,n);if(o.success)return o.data;throw o.error}async safeParseAsync(e,n){const o={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:fr(e)},s=this._parse({data:e,path:o.path,parent:o}),l=await(vi(s)?s:Promise.resolve(s));return Xu(o,l)}refine(e,n){const o=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,l)=>{const c=e(s),u=()=>l.addIssue({code:X.custom,...o(s)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(u(),!1)):c?!0:(u(),!1)})}refinement(e,n){return this._refinement((o,s)=>e(o)?!0:(s.addIssue(typeof n=="function"?n(o,s):n),!1))}_refinement(e){return new pn({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Rn.create(this,this._def)}nullable(){return vr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return un.create(this,this._def)}promise(){return So.create(this,this._def)}or(e){return Si.create([this,e],this._def)}and(e){return Ei.create(this,e,this._def)}transform(e){return new pn({...Be(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new Ai({...Be(this._def),innerType:this,defaultValue:n,typeName:ve.ZodDefault})}brand(){return new Dl({typeName:ve.ZodBranded,type:this,...Be(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Pi({...Be(this._def),innerType:this,catchValue:n,typeName:ve.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Di.create(this,e)}readonly(){return Fi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ak=/^c[^\s-]{8,}$/i,lk=/^[0-9a-z]+$/,ck=/^[0-9A-HJKMNP-TV-Z]{26}$/,dk=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,uk=/^[a-z0-9_-]{21}$/i,pk=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,hk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,fk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Al;const mk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,gk=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,yk=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Qu="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",_k=new RegExp(`^${Qu}$`);function ep(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function vk(t){return new RegExp(`^${ep(t)}$`)}function tp(t){let e=`${Qu}T${ep(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function Ck(t,e){return!!((e==="v4"||!e)&&mk.test(t)||(e==="v6"||!e)&&gk.test(t))}class dn extends Ae{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==le.string){const s=this._getOrReturnCtx(e);return se(s,{code:X.invalid_type,expected:le.string,received:s.parsedType}),we}const n=new wt;let o;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:X.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:X.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const l=e.data.length>s.value,c=e.data.length<s.value;(l||c)&&(o=this._getOrReturnCtx(e,o),l?se(o,{code:X.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):c&&se(o,{code:X.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")hk.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"email",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Al||(Al=new RegExp(fk,"u")),Al.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"emoji",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")dk.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"uuid",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")uk.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"nanoid",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")ak.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"cuid",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")lk.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"cuid2",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")ck.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"ulid",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),se(o,{validation:"url",code:X.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"regex",code:X.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(e,o),se(o,{code:X.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(o=this._getOrReturnCtx(e,o),se(o,{code:X.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(o=this._getOrReturnCtx(e,o),se(o,{code:X.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?tp(s).test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:X.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?_k.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:X.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?vk(s).test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:X.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?pk.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"duration",code:X.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?Ck(e.data,s.version)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"ip",code:X.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?yk.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"base64",code:X.invalid_string,message:s.message}),n.dirty()):Le.assertNever(s);return{status:n.value,value:e.data}}_regex(e,n,o){return this.refinement(s=>e.test(s),{validation:n,code:X.invalid_string,...he.errToObj(o)})}_addCheck(e){return new dn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...he.errToObj(e)})}url(e){return this._addCheck({kind:"url",...he.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...he.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...he.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...he.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...he.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...he.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...he.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...he.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...he.errToObj(e)})}datetime(e){var n,o;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(o=e==null?void 0:e.local)!==null&&o!==void 0?o:!1,...he.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...he.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...he.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...he.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...he.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...he.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...he.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...he.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...he.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...he.errToObj(n)})}nonempty(e){return this.min(1,he.errToObj(e))}trim(){return new dn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new dn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new dn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}dn.create=t=>{var e;return new dn({checks:[],typeName:ve.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Be(t)})};function wk(t,e){const n=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,s=n>o?n:o,l=parseInt(t.toFixed(s).replace(".","")),c=parseInt(e.toFixed(s).replace(".",""));return l%c/Math.pow(10,s)}class mr extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==le.number){const s=this._getOrReturnCtx(e);return se(s,{code:X.invalid_type,expected:le.number,received:s.parsedType}),we}let n;const o=new wt;for(const s of this._def.checks)s.kind==="int"?Le.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:X.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:X.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:X.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?wk(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),se(n,{code:X.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:X.not_finite,message:s.message}),o.dirty()):Le.assertNever(s);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,he.toString(n))}gt(e,n){return this.setLimit("min",e,!1,he.toString(n))}lte(e,n){return this.setLimit("max",e,!0,he.toString(n))}lt(e,n){return this.setLimit("max",e,!1,he.toString(n))}setLimit(e,n,o,s){return new mr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:he.toString(s)}]})}_addCheck(e){return new mr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:he.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:he.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:he.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:he.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:he.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:he.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:he.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:he.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:he.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Le.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(n)&&Number.isFinite(e)}}mr.create=t=>new mr({checks:[],typeName:ve.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Be(t)});class gr extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==le.bigint){const s=this._getOrReturnCtx(e);return se(s,{code:X.invalid_type,expected:le.bigint,received:s.parsedType}),we}let n;const o=new wt;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:X.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:X.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),se(n,{code:X.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Le.assertNever(s);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,he.toString(n))}gt(e,n){return this.setLimit("min",e,!1,he.toString(n))}lte(e,n){return this.setLimit("max",e,!0,he.toString(n))}lt(e,n){return this.setLimit("max",e,!1,he.toString(n))}setLimit(e,n,o,s){return new gr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:he.toString(s)}]})}_addCheck(e){return new gr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:he.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:he.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:he.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:he.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:he.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}gr.create=t=>{var e;return new gr({checks:[],typeName:ve.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Be(t)})};class bi extends Ae{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==le.boolean){const n=this._getOrReturnCtx(e);return se(n,{code:X.invalid_type,expected:le.boolean,received:n.parsedType}),we}return Tt(e.data)}}bi.create=t=>new bi({typeName:ve.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Be(t)});class Zr extends Ae{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==le.date){const s=this._getOrReturnCtx(e);return se(s,{code:X.invalid_type,expected:le.date,received:s.parsedType}),we}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return se(s,{code:X.invalid_date}),we}const n=new wt;let o;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:X.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:X.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Le.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Zr({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:he.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:he.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Zr.create=t=>new Zr({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ve.ZodDate,...Be(t)});class Bs extends Ae{_parse(e){if(this._getType(e)!==le.symbol){const n=this._getOrReturnCtx(e);return se(n,{code:X.invalid_type,expected:le.symbol,received:n.parsedType}),we}return Tt(e.data)}}Bs.create=t=>new Bs({typeName:ve.ZodSymbol,...Be(t)});class xi extends Ae{_parse(e){if(this._getType(e)!==le.undefined){const n=this._getOrReturnCtx(e);return se(n,{code:X.invalid_type,expected:le.undefined,received:n.parsedType}),we}return Tt(e.data)}}xi.create=t=>new xi({typeName:ve.ZodUndefined,...Be(t)});class ki extends Ae{_parse(e){if(this._getType(e)!==le.null){const n=this._getOrReturnCtx(e);return se(n,{code:X.invalid_type,expected:le.null,received:n.parsedType}),we}return Tt(e.data)}}ki.create=t=>new ki({typeName:ve.ZodNull,...Be(t)});class bo extends Ae{constructor(){super(...arguments),this._any=!0}_parse(e){return Tt(e.data)}}bo.create=t=>new bo({typeName:ve.ZodAny,...Be(t)});class Wr extends Ae{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Tt(e.data)}}Wr.create=t=>new Wr({typeName:ve.ZodUnknown,...Be(t)});class Wn extends Ae{_parse(e){const n=this._getOrReturnCtx(e);return se(n,{code:X.invalid_type,expected:le.never,received:n.parsedType}),we}}Wn.create=t=>new Wn({typeName:ve.ZodNever,...Be(t)});class Vs extends Ae{_parse(e){if(this._getType(e)!==le.undefined){const n=this._getOrReturnCtx(e);return se(n,{code:X.invalid_type,expected:le.void,received:n.parsedType}),we}return Tt(e.data)}}Vs.create=t=>new Vs({typeName:ve.ZodVoid,...Be(t)});class un extends Ae{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),s=this._def;if(n.parsedType!==le.array)return se(n,{code:X.invalid_type,expected:le.array,received:n.parsedType}),we;if(s.exactLength!==null){const c=n.data.length>s.exactLength.value,u=n.data.length<s.exactLength.value;(c||u)&&(se(n,{code:c?X.too_big:X.too_small,minimum:u?s.exactLength.value:void 0,maximum:c?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),o.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(se(n,{code:X.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),o.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(se(n,{code:X.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((c,u)=>s.type._parseAsync(new Dn(n,c,n.path,u)))).then(c=>wt.mergeArray(o,c));const l=[...n.data].map((c,u)=>s.type._parseSync(new Dn(n,c,n.path,u)));return wt.mergeArray(o,l)}get element(){return this._def.type}min(e,n){return new un({...this._def,minLength:{value:e,message:he.toString(n)}})}max(e,n){return new un({...this._def,maxLength:{value:e,message:he.toString(n)}})}length(e,n){return new un({...this._def,exactLength:{value:e,message:he.toString(n)}})}nonempty(e){return this.min(1,e)}}un.create=(t,e)=>new un({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...Be(e)});function xo(t){if(t instanceof et){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=Rn.create(xo(o))}return new et({...t._def,shape:()=>e})}else return t instanceof un?new un({...t._def,type:xo(t.element)}):t instanceof Rn?Rn.create(xo(t.unwrap())):t instanceof vr?vr.create(xo(t.unwrap())):t instanceof Fn?Fn.create(t.items.map(e=>xo(e))):t}class et extends Ae{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Le.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==le.object){const p=this._getOrReturnCtx(e);return se(p,{code:X.invalid_type,expected:le.object,received:p.parsedType}),we}const{status:n,ctx:o}=this._processInputParams(e),{shape:s,keys:l}=this._getCached(),c=[];if(!(this._def.catchall instanceof Wn&&this._def.unknownKeys==="strip"))for(const p in o.data)l.includes(p)||c.push(p);const u=[];for(const p of l){const f=s[p],m=o.data[p];u.push({key:{status:"valid",value:p},value:f._parse(new Dn(o,m,o.path,p)),alwaysSet:p in o.data})}if(this._def.catchall instanceof Wn){const p=this._def.unknownKeys;if(p==="passthrough")for(const f of c)u.push({key:{status:"valid",value:f},value:{status:"valid",value:o.data[f]}});else if(p==="strict")c.length>0&&(se(o,{code:X.unrecognized_keys,keys:c}),n.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const f of c){const m=o.data[f];u.push({key:{status:"valid",value:f},value:p._parse(new Dn(o,m,o.path,f)),alwaysSet:f in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const p=[];for(const f of u){const m=await f.key,y=await f.value;p.push({key:m,value:y,alwaysSet:f.alwaysSet})}return p}).then(p=>wt.mergeObjectSync(n,p)):wt.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return he.errToObj,new et({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,o)=>{var s,l,c,u;const p=(c=(l=(s=this._def).errorMap)===null||l===void 0?void 0:l.call(s,n,o).message)!==null&&c!==void 0?c:o.defaultError;return n.code==="unrecognized_keys"?{message:(u=he.errToObj(e).message)!==null&&u!==void 0?u:p}:{message:p}}}:{}})}strip(){return new et({...this._def,unknownKeys:"strip"})}passthrough(){return new et({...this._def,unknownKeys:"passthrough"})}extend(e){return new et({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new et({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ve.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new et({...this._def,catchall:e})}pick(e){const n={};return Le.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(n[o]=this.shape[o])}),new et({...this._def,shape:()=>n})}omit(e){const n={};return Le.objectKeys(this.shape).forEach(o=>{e[o]||(n[o]=this.shape[o])}),new et({...this._def,shape:()=>n})}deepPartial(){return xo(this)}partial(e){const n={};return Le.objectKeys(this.shape).forEach(o=>{const s=this.shape[o];e&&!e[o]?n[o]=s:n[o]=s.optional()}),new et({...this._def,shape:()=>n})}required(e){const n={};return Le.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])n[o]=this.shape[o];else{let s=this.shape[o];for(;s instanceof Rn;)s=s._def.innerType;n[o]=s}}),new et({...this._def,shape:()=>n})}keyof(){return np(Le.objectKeys(this.shape))}}et.create=(t,e)=>new et({shape:()=>t,unknownKeys:"strip",catchall:Wn.create(),typeName:ve.ZodObject,...Be(e)}),et.strictCreate=(t,e)=>new et({shape:()=>t,unknownKeys:"strict",catchall:Wn.create(),typeName:ve.ZodObject,...Be(e)}),et.lazycreate=(t,e)=>new et({shape:t,unknownKeys:"strip",catchall:Wn.create(),typeName:ve.ZodObject,...Be(e)});class Si extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e),o=this._def.options;function s(l){for(const u of l)if(u.result.status==="valid")return u.result;for(const u of l)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const c=l.map(u=>new Gt(u.ctx.common.issues));return se(n,{code:X.invalid_union,unionErrors:c}),we}if(n.common.async)return Promise.all(o.map(async l=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(s);{let l;const c=[];for(const p of o){const f={...n,common:{...n.common,issues:[]},parent:null},m=p._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!l&&(l={result:m,ctx:f}),f.common.issues.length&&c.push(f.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const u=c.map(p=>new Gt(p));return se(n,{code:X.invalid_union,unionErrors:u}),we}}get options(){return this._def.options}}Si.create=(t,e)=>new Si({options:t,typeName:ve.ZodUnion,...Be(e)});const yr=t=>t instanceof Bi?yr(t.schema):t instanceof pn?yr(t.innerType()):t instanceof Vi?[t.value]:t instanceof _r?t.options:t instanceof Ni?Le.objectValues(t.enum):t instanceof Ai?yr(t._def.innerType):t instanceof xi?[void 0]:t instanceof ki?[null]:t instanceof Rn?[void 0,...yr(t.unwrap())]:t instanceof vr?[null,...yr(t.unwrap())]:t instanceof Dl||t instanceof Fi?yr(t.unwrap()):t instanceof Pi?yr(t._def.innerType):[];class Ns extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.object)return se(n,{code:X.invalid_type,expected:le.object,received:n.parsedType}),we;const o=this.discriminator,s=n.data[o],l=this.optionsMap.get(s);return l?n.common.async?l._parseAsync({data:n.data,path:n.path,parent:n}):l._parseSync({data:n.data,path:n.path,parent:n}):(se(n,{code:X.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),we)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,o){const s=new Map;for(const l of n){const c=yr(l.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const u of c){if(s.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);s.set(u,l)}}return new Ns({typeName:ve.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:s,...Be(o)})}}function Pl(t,e){const n=fr(t),o=fr(e);if(t===e)return{valid:!0,data:t};if(n===le.object&&o===le.object){const s=Le.objectKeys(e),l=Le.objectKeys(t).filter(u=>s.indexOf(u)!==-1),c={...t,...e};for(const u of l){const p=Pl(t[u],e[u]);if(!p.valid)return{valid:!1};c[u]=p.data}return{valid:!0,data:c}}else if(n===le.array&&o===le.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let l=0;l<t.length;l++){const c=t[l],u=e[l],p=Pl(c,u);if(!p.valid)return{valid:!1};s.push(p.data)}return{valid:!0,data:s}}else return n===le.date&&o===le.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Ei extends Ae{_parse(e){const{status:n,ctx:o}=this._processInputParams(e),s=(l,c)=>{if(Vl(l)||Vl(c))return we;const u=Pl(l.value,c.value);return u.valid?((Nl(l)||Nl(c))&&n.dirty(),{status:n.value,value:u.data}):(se(o,{code:X.invalid_intersection_types}),we)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([l,c])=>s(l,c)):s(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}Ei.create=(t,e,n)=>new Ei({left:t,right:e,typeName:ve.ZodIntersection,...Be(n)});class Fn extends Ae{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.array)return se(o,{code:X.invalid_type,expected:le.array,received:o.parsedType}),we;if(o.data.length<this._def.items.length)return se(o,{code:X.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),we;!this._def.rest&&o.data.length>this._def.items.length&&(se(o,{code:X.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...o.data].map((l,c)=>{const u=this._def.items[c]||this._def.rest;return u?u._parse(new Dn(o,l,o.path,c)):null}).filter(l=>!!l);return o.common.async?Promise.all(s).then(l=>wt.mergeArray(n,l)):wt.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new Fn({...this._def,rest:e})}}Fn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Fn({items:t,typeName:ve.ZodTuple,rest:null,...Be(e)})};class Ti extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.object)return se(o,{code:X.invalid_type,expected:le.object,received:o.parsedType}),we;const s=[],l=this._def.keyType,c=this._def.valueType;for(const u in o.data)s.push({key:l._parse(new Dn(o,u,o.path,u)),value:c._parse(new Dn(o,o.data[u],o.path,u)),alwaysSet:u in o.data});return o.common.async?wt.mergeObjectAsync(n,s):wt.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,o){return n instanceof Ae?new Ti({keyType:e,valueType:n,typeName:ve.ZodRecord,...Be(o)}):new Ti({keyType:dn.create(),valueType:e,typeName:ve.ZodRecord,...Be(n)})}}class As extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.map)return se(o,{code:X.invalid_type,expected:le.map,received:o.parsedType}),we;const s=this._def.keyType,l=this._def.valueType,c=[...o.data.entries()].map(([u,p],f)=>({key:s._parse(new Dn(o,u,o.path,[f,"key"])),value:l._parse(new Dn(o,p,o.path,[f,"value"]))}));if(o.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const p of c){const f=await p.key,m=await p.value;if(f.status==="aborted"||m.status==="aborted")return we;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const p of c){const f=p.key,m=p.value;if(f.status==="aborted"||m.status==="aborted")return we;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}As.create=(t,e,n)=>new As({valueType:e,keyType:t,typeName:ve.ZodMap,...Be(n)});class Hr extends Ae{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.set)return se(o,{code:X.invalid_type,expected:le.set,received:o.parsedType}),we;const s=this._def;s.minSize!==null&&o.data.size<s.minSize.value&&(se(o,{code:X.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&o.data.size>s.maxSize.value&&(se(o,{code:X.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const l=this._def.valueType;function c(p){const f=new Set;for(const m of p){if(m.status==="aborted")return we;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const u=[...o.data.values()].map((p,f)=>l._parse(new Dn(o,p,o.path,f)));return o.common.async?Promise.all(u).then(p=>c(p)):c(u)}min(e,n){return new Hr({...this._def,minSize:{value:e,message:he.toString(n)}})}max(e,n){return new Hr({...this._def,maxSize:{value:e,message:he.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Hr.create=(t,e)=>new Hr({valueType:t,minSize:null,maxSize:null,typeName:ve.ZodSet,...Be(e)});class ko extends Ae{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.function)return se(n,{code:X.invalid_type,expected:le.function,received:n.parsedType}),we;function o(u,p){return Ss({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ks(),wo].filter(f=>!!f),issueData:{code:X.invalid_arguments,argumentsError:p}})}function s(u,p){return Ss({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ks(),wo].filter(f=>!!f),issueData:{code:X.invalid_return_type,returnTypeError:p}})}const l={errorMap:n.common.contextualErrorMap},c=n.data;if(this._def.returns instanceof So){const u=this;return Tt(async function(...p){const f=new Gt([]),m=await u._def.args.parseAsync(p,l).catch(T=>{throw f.addIssue(o(p,T)),f}),y=await Reflect.apply(c,this,m);return await u._def.returns._def.type.parseAsync(y,l).catch(T=>{throw f.addIssue(s(y,T)),f})})}else{const u=this;return Tt(function(...p){const f=u._def.args.safeParse(p,l);if(!f.success)throw new Gt([o(p,f.error)]);const m=Reflect.apply(c,this,f.data),y=u._def.returns.safeParse(m,l);if(!y.success)throw new Gt([s(m,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ko({...this._def,args:Fn.create(e).rest(Wr.create())})}returns(e){return new ko({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,o){return new ko({args:e||Fn.create([]).rest(Wr.create()),returns:n||Wr.create(),typeName:ve.ZodFunction,...Be(o)})}}class Bi extends Ae{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Bi.create=(t,e)=>new Bi({getter:t,typeName:ve.ZodLazy,...Be(e)});class Vi extends Ae{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return se(n,{received:n.data,code:X.invalid_literal,expected:this._def.value}),we}return{status:"valid",value:e.data}}get value(){return this._def.value}}Vi.create=(t,e)=>new Vi({value:t,typeName:ve.ZodLiteral,...Be(e)});function np(t,e){return new _r({values:t,typeName:ve.ZodEnum,...Be(e)})}class _r extends Ae{constructor(){super(...arguments),Ci.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),o=this._def.values;return se(n,{expected:Le.joinValues(o),received:n.parsedType,code:X.invalid_type}),we}if(Ts(this,Ci)||Ju(this,Ci,new Set(this._def.values)),!Ts(this,Ci).has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return se(n,{received:n.data,code:X.invalid_enum_value,options:o}),we}return Tt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return _r.create(e,{...this._def,...n})}exclude(e,n=this._def){return _r.create(this.options.filter(o=>!e.includes(o)),{...this._def,...n})}}Ci=new WeakMap,_r.create=np;class Ni extends Ae{constructor(){super(...arguments),wi.set(this,void 0)}_parse(e){const n=Le.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==le.string&&o.parsedType!==le.number){const s=Le.objectValues(n);return se(o,{expected:Le.joinValues(s),received:o.parsedType,code:X.invalid_type}),we}if(Ts(this,wi)||Ju(this,wi,new Set(Le.getValidEnumValues(this._def.values))),!Ts(this,wi).has(e.data)){const s=Le.objectValues(n);return se(o,{received:o.data,code:X.invalid_enum_value,options:s}),we}return Tt(e.data)}get enum(){return this._def.values}}wi=new WeakMap,Ni.create=(t,e)=>new Ni({values:t,typeName:ve.ZodNativeEnum,...Be(e)});class So extends Ae{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.promise&&n.common.async===!1)return se(n,{code:X.invalid_type,expected:le.promise,received:n.parsedType}),we;const o=n.parsedType===le.promise?n.data:Promise.resolve(n.data);return Tt(o.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}So.create=(t,e)=>new So({type:t,typeName:ve.ZodPromise,...Be(e)});class pn extends Ae{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:o}=this._processInputParams(e),s=this._def.effect||null,l={addIssue:c=>{se(o,c),c.fatal?n.abort():n.dirty()},get path(){return o.path}};if(l.addIssue=l.addIssue.bind(l),s.type==="preprocess"){const c=s.transform(o.data,l);if(o.common.async)return Promise.resolve(c).then(async u=>{if(n.value==="aborted")return we;const p=await this._def.schema._parseAsync({data:u,path:o.path,parent:o});return p.status==="aborted"?we:p.status==="dirty"||n.value==="dirty"?Es(p.value):p});{if(n.value==="aborted")return we;const u=this._def.schema._parseSync({data:c,path:o.path,parent:o});return u.status==="aborted"?we:u.status==="dirty"||n.value==="dirty"?Es(u.value):u}}if(s.type==="refinement"){const c=u=>{const p=s.refinement(u,l);if(o.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(o.common.async===!1){const u=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return u.status==="aborted"?we:(u.status==="dirty"&&n.dirty(),c(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(u=>u.status==="aborted"?we:(u.status==="dirty"&&n.dirty(),c(u.value).then(()=>({status:n.value,value:u.value}))))}if(s.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!_i(c))return c;const u=s.transform(c.value,l);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>_i(c)?Promise.resolve(s.transform(c.value,l)).then(u=>({status:n.value,value:u})):c);Le.assertNever(s)}}pn.create=(t,e,n)=>new pn({schema:t,typeName:ve.ZodEffects,effect:e,...Be(n)}),pn.createWithPreprocess=(t,e,n)=>new pn({schema:e,effect:{type:"preprocess",transform:t},typeName:ve.ZodEffects,...Be(n)});class Rn extends Ae{_parse(e){return this._getType(e)===le.undefined?Tt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Rn.create=(t,e)=>new Rn({innerType:t,typeName:ve.ZodOptional,...Be(e)});class vr extends Ae{_parse(e){return this._getType(e)===le.null?Tt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}vr.create=(t,e)=>new vr({innerType:t,typeName:ve.ZodNullable,...Be(e)});class Ai extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e);let o=n.data;return n.parsedType===le.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ai.create=(t,e)=>new Ai({innerType:t,typeName:ve.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Be(e)});class Pi extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return vi(s)?s.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Gt(o.common.issues)},input:o.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Gt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}Pi.create=(t,e)=>new Pi({innerType:t,typeName:ve.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Be(e)});class Ps extends Ae{_parse(e){if(this._getType(e)!==le.nan){const n=this._getOrReturnCtx(e);return se(n,{code:X.invalid_type,expected:le.nan,received:n.parsedType}),we}return{status:"valid",value:e.data}}}Ps.create=t=>new Ps({typeName:ve.ZodNaN,...Be(t)});const bk=Symbol("zod_brand");class Dl extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}}class Di extends Ae{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?we:s.status==="dirty"?(n.dirty(),Es(s.value)):this._def.out._parseAsync({data:s.value,path:o.path,parent:o})})();{const s=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?we:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:o.path,parent:o})}}static create(e,n){return new Di({in:e,out:n,typeName:ve.ZodPipeline})}}class Fi extends Ae{_parse(e){const n=this._def.innerType._parse(e),o=s=>(_i(s)&&(s.value=Object.freeze(s.value)),s);return vi(n)?n.then(s=>o(s)):o(n)}unwrap(){return this._def.innerType}}Fi.create=(t,e)=>new Fi({innerType:t,typeName:ve.ZodReadonly,...Be(e)});function rp(t,e={},n){return t?bo.create().superRefine((o,s)=>{var l,c;if(!t(o)){const u=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,p=(c=(l=u.fatal)!==null&&l!==void 0?l:n)!==null&&c!==void 0?c:!0,f=typeof u=="string"?{message:u}:u;s.addIssue({code:"custom",...f,fatal:p})}}):bo.create()}const xk={object:et.lazycreate};var ve;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ve||(ve={}));const kk=(t,e={message:`Input not instance of ${t.name}`})=>rp(n=>n instanceof t,e),op=dn.create,ip=mr.create,Sk=Ps.create,Ek=gr.create,sp=bi.create,Tk=Zr.create,Bk=Bs.create,Vk=xi.create,Nk=ki.create,Ak=bo.create,Pk=Wr.create,Dk=Wn.create,Fk=Vs.create,Rk=un.create,Mk=et.create,Ik=et.strictCreate,Ok=Si.create,Lk=Ns.create,Gk=Ei.create,zk=Fn.create,$k=Ti.create,Uk=As.create,Zk=Hr.create,Wk=ko.create,Hk=Bi.create,jk=Vi.create,qk=_r.create,Kk=Ni.create,Yk=So.create,ap=pn.create,Jk=Rn.create,Xk=vr.create,Qk=pn.createWithPreprocess,eS=Di.create;var Mn=Object.freeze({__proto__:null,defaultErrorMap:wo,setErrorMap:ik,getErrorMap:ks,makeIssue:Ss,EMPTY_PATH:sk,addIssueToContext:se,ParseStatus:wt,INVALID:we,DIRTY:Es,OK:Tt,isAborted:Vl,isDirty:Nl,isValid:_i,isAsync:vi,get util(){return Le},get objectUtil(){return Bl},ZodParsedType:le,getParsedType:fr,ZodType:Ae,datetimeRegex:tp,ZodString:dn,ZodNumber:mr,ZodBigInt:gr,ZodBoolean:bi,ZodDate:Zr,ZodSymbol:Bs,ZodUndefined:xi,ZodNull:ki,ZodAny:bo,ZodUnknown:Wr,ZodNever:Wn,ZodVoid:Vs,ZodArray:un,ZodObject:et,ZodUnion:Si,ZodDiscriminatedUnion:Ns,ZodIntersection:Ei,ZodTuple:Fn,ZodRecord:Ti,ZodMap:As,ZodSet:Hr,ZodFunction:ko,ZodLazy:Bi,ZodLiteral:Vi,ZodEnum:_r,ZodNativeEnum:Ni,ZodPromise:So,ZodEffects:pn,ZodTransformer:pn,ZodOptional:Rn,ZodNullable:vr,ZodDefault:Ai,ZodCatch:Pi,ZodNaN:Ps,BRAND:bk,ZodBranded:Dl,ZodPipeline:Di,ZodReadonly:Fi,custom:rp,Schema:Ae,ZodSchema:Ae,late:xk,get ZodFirstPartyTypeKind(){return ve},coerce:{string:t=>dn.create({...t,coerce:!0}),number:t=>mr.create({...t,coerce:!0}),boolean:t=>bi.create({...t,coerce:!0}),bigint:t=>gr.create({...t,coerce:!0}),date:t=>Zr.create({...t,coerce:!0})},any:Ak,array:Rk,bigint:Ek,boolean:sp,date:Tk,discriminatedUnion:Lk,effect:ap,enum:qk,function:Wk,instanceof:kk,intersection:Gk,lazy:Hk,literal:jk,map:Uk,nan:Sk,nativeEnum:Kk,never:Dk,null:Nk,nullable:Xk,number:ip,object:Mk,oboolean:()=>sp().optional(),onumber:()=>ip().optional(),optional:Jk,ostring:()=>op().optional(),pipeline:eS,preprocess:Qk,promise:Yk,record:$k,set:Zk,strictObject:Ik,string:op,symbol:Bk,transformer:ap,tuple:zk,undefined:Vk,union:Ok,unknown:Pk,void:Fk,NEVER:we,ZodIssueCode:X,quotelessJson:ok,ZodError:Gt});function tS(t){throw new Error("Unexpected object: "+t)}const lp="upload://upload/",cp="index://index/";function nS(t){return t.startsWith(lp)}function rS(t){return t.startsWith(cp)}function dp(t){if(rS(t)){const e=t.slice(cp.length);return JSON.parse(decodeURIComponent(e)).path}else if(nS(t)){const e=t.slice(lp.length);return JSON.parse(decodeURIComponent(e)).localPath}tS(t)}function oS(t){return t.replace(/^.*[\\/]/,"")}function iS(t){return oS(dp(t))}Mn.object({__isRef:Mn.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:Mn.string().describe("Upstream block id"),name:Mn.string().describe("Name of the output provided to the upstream block's output context")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").strict().readonly();const sS=Mn.object({type:Mn.string(),importance:Mn.number().optional(),id:Mn.string().optional(),label:Mn.string()});Mn.array(sS);const aS={key:0,ref:"label"},lS={key:0,class:"required-icon"},cS=["data-placeholder"],dS={key:5,class:"pl-file-input__stats"},uS={key:0,class:"pl-file-input__error"},pS={key:1,class:"pl-file-input__helper"},up=r.defineComponent({__name:"PlFileInput",props:{modelValue:{},label:{default:void 0},required:{type:Boolean},dashed:{type:Boolean},extensions:{default:void 0},placeholder:{default:void 0},progress:{default:void 0},error:{default:void 0},helper:{default:void 0},cellStyle:{type:Boolean,default:!1},fileDialogTitle:{default:void 0},fileDialogCloseOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.reactive({fileDialogOpen:!1,error:""}),o=r.useSlots(),s=e,l=t,c=(O,F)=>{if(O)try{return F(O)}catch(N){return n.error=N instanceof Error?N.message:String(N),O}},u=r.computed(()=>c(l.modelValue,iS)),p=r.computed(()=>c(l.modelValue,dp)),f=r.computed(()=>l.progress&&!l.progress.done),m=r.computed(()=>l.progress&&l.progress.done),y=r.computed(()=>n.error??l.error),T=r.computed(()=>!!y.value),B=r.computed(()=>{const{status:O,done:F}=l.progress??{};return!O||!O.bytesTotal?"":O.bytesProcessed&&!F?al(O.bytesProcessed,{})+" / "+al(O.bytesTotal,{}):al(O.bytesTotal,{})}),A=r.computed(()=>{var O;const{progress:F}=l;return F?{width:F.done?"100%":Math.round((((O=F.status)==null?void 0:O.progress)??0)*100)+"%"}:{}}),I=()=>{n.fileDialogOpen=!0},L=O=>{O.files.length&&s("update:modelValue",O.files[0])},C=()=>s("update:modelValue",void 0);r.watch(()=>l.modelValue,()=>{n.error=""},{immediate:!0});const R=r.ref();return l.cellStyle||Zn(R),(O,F)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",{class:r.normalizeClass([{"pl-file-input__cell-style":!!O.cellStyle,"has-file":!!u.value},"pl-file-input__envelope"])},[r.createElementVNode("div",{ref_key:"rootRef",ref:R,class:r.normalizeClass(["pl-file-input",{dashed:O.dashed,error:T.value}]),tabindex:"0",onKeyup:r.withKeys(I,["enter"]),onClick:r.withModifiers(I,["stop"])},[r.createElementVNode("div",{class:"pl-file-input__progress",style:r.normalizeStyle(A.value)},null,4),F[3]||(F[3]=r.createTextVNode()),!O.cellStyle&&O.label?(r.openBlock(),r.createElementBlock("label",aS,[O.required?(r.openBlock(),r.createElementBlock("i",lS)):r.createCommentVNode("",!0),F[1]||(F[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(O.label),1),F[2]||(F[2]=r.createTextVNode()),r.unref(o).tooltip||p.value?(r.openBlock(),r.createBlock(r.unref(Ct),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.unref(o).tooltip?r.renderSlot(O.$slots,"tooltip",{key:0}):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(p.value),1)],64))]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),F[4]||(F[4]=r.createTextVNode()),T.value?(r.openBlock(),r.createBlock(r.unref(cn),{key:1,name:"restart"})):f.value?(r.openBlock(),r.createBlock(r.unref(cn),{key:2,name:"cloud-upload"})):m.value?(r.openBlock(),r.createBlock(r.unref(cn),{key:3,name:"success"})):(r.openBlock(),r.createBlock(r.unref(cn),{key:4,name:"paper-clip"})),F[5]||(F[5]=r.createTextVNode()),r.createElementVNode("div",{"data-placeholder":O.placeholder??"Choose file",class:"pl-file-input__filename"},r.toDisplayString(u.value),9,cS),F[6]||(F[6]=r.createTextVNode()),B.value?(r.openBlock(),r.createElementBlock("div",dS,r.toDisplayString(B.value),1)):r.createCommentVNode("",!0),F[7]||(F[7]=r.createTextVNode()),O.modelValue?(r.openBlock(),r.createBlock(r.unref(cn),{key:6,name:"close",onClick:r.withModifiers(C,["stop"])})):r.createCommentVNode("",!0),F[8]||(F[8]=r.createTextVNode()),r.createVNode(hr,{class:"pl-file-input__contour"})],34),F[9]||(F[9]=r.createTextVNode()),T.value?(r.openBlock(),r.createElementBlock("div",uS,r.toDisplayString(y.value),1)):O.helper?(r.openBlock(),r.createElementBlock("div",pS,r.toDisplayString(O.helper),1)):r.createCommentVNode("",!0)],2),F[10]||(F[10]=r.createTextVNode()),r.createVNode(r.unref(Ku),{modelValue:n.fileDialogOpen,"onUpdate:modelValue":F[0]||(F[0]=N=>n.fileDialogOpen=N),extensions:O.extensions,title:O.fileDialogTitle,"close-on-outside-click":O.fileDialogCloseOnOutsideClick,"onImport:files":L},null,8,["modelValue","extensions","title","close-on-outside-click"])],64))}}),hS={class:"pl-notification-alert__wrapper d-flex"},fS={class:"pl-notification-alert__content flex-grow-1"},mS={key:0,class:"pl-notification-alert__close"},gS={key:0,class:"pl-notification-alert__actions d-flex"},pp=r.defineComponent({__name:"PlNotificationAlert",props:r.mergeModels({type:{default:"neutral"},width:{default:"256px"},closable:{type:Boolean}},{modelValue:{type:Boolean,default:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=r.useModel(t,"modelValue");function o(){e.closable&&(n.value=!1)}return(s,l)=>n.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([s.type,"pl-notification-alert d-flex flex-column gap-16"]),style:r.normalizeStyle({width:`${s.width}`})},[r.createElementVNode("div",hS,[r.createElementVNode("div",fS,[r.renderSlot(s.$slots,"default")]),l[0]||(l[0]=r.createTextVNode()),s.closable?(r.openBlock(),r.createElementBlock("div",mS,[r.createVNode(r.unref(Cs),{icon:"close",onClick:o})])):r.createCommentVNode("",!0)]),l[1]||(l[1]=r.createTextVNode()),s.$slots.actions?(r.openBlock(),r.createElementBlock("div",gS,[r.renderSlot(s.$slots,"actions")])):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)}}),yS=r.defineComponent({__name:"ContextProvider",props:{context:{},contextKey:{}},setup(t){const e=t;return r.provide(e.contextKey,r.computed(()=>e.context)),(n,o)=>r.renderSlot(n.$slots,"default")}});function bt(t,e,n){return e>t?e:t>n?n:t}const Fl=t=>r.computed(()=>{const e=[100],{min:n,max:o,step:s}=t.value;let l=n;for(;l<o;){l+=s;const c=(1-(bt(l,n,o)-n)/(o-n))*100;e.push(c)}return e}),_S={class:"ui-slider__wrapper"},vS={class:"ui-slider__label-section"},CS={key:0,class:"text-s"},wS={key:1,class:"ui-slider__value-static text-s"},bS={class:"ui-slider__base"},xS={class:"ui-slider__container"},kS={class:"ui-slider__container ui-slider__container-thumb"},SS={class:"ui-slider__input-wrapper d-flex"},ES=["value"],TS={key:0,class:"ui-slider__error"},hp=r.defineComponent({__name:"Slider",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:""},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=t,l=r.reactive({deltaValue:0}),c=r.computed(()=>s.max-s.min),u=r.computed(()=>bt((s.modelValue??0)+l.deltaValue,s.min,s.max)),p=r.ref(s.modelValue),f=r.computed(()=>{const N=s.modelValue;return Number.isFinite(N)?N<s.min?`Min value: ${s.min}`:N>s.max?`Max value: ${s.max}`:s.error:"Not a number"}),m=r.computed(()=>s),y=Fl(m),T=r.computed(()=>(u.value-s.min)/c.value),B=r.computed(()=>({right:Math.ceil((1-T.value)*100)+"%"})),A=r.computed(()=>({right:`calc(${Math.ceil((1-T.value)*100)}%) `})),I=r.ref(),L=r.ref();r.watch(()=>s.modelValue,N=>{p.value=N});function C(N){const U=bt(N,s.min,s.max);return Math.round((U+Number.EPSILON)*(1/s.step))/(1/s.step)}ur(L,N=>{var U;ct((U=r.unref(I))==null?void 0:U.getBoundingClientRect(),te=>{const{dx:j}=N;l.deltaValue=j/te.width*c.value,p.value=C(bt((s.modelValue??0)+l.deltaValue,s.min,s.max)),N.stop&&(o("update:modelValue",C(u.value)),l.deltaValue=0)})});function R(N){o("update:modelValue",C(N))}function O(N){R(+N.target.value)}function F(N){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(N.code)&&N.preventDefault();const U=N.code==="ArrowUp"||N.code==="ArrowRight"?s.step*1:N.code==="ArrowDown"||N.code==="ArrowLeft"?s.step*-1:0;R(s.modelValue+U)}return(N,U)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([s.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${s.mode}`,"ui-slider"])},[r.createElementVNode("div",_S,[r.createElementVNode("div",vS,[N.label?(r.openBlock(),r.createElementBlock("label",CS,[r.createElementVNode("span",null,r.toDisplayString(N.label),1),U[1]||(U[1]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(N.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),U[2]||(U[2]=r.createTextVNode()),s.mode==="text"?(r.openBlock(),r.createElementBlock("div",wS,r.toDisplayString(p.value)+r.toDisplayString(N.measure),1)):r.createCommentVNode("",!0)]),U[6]||(U[6]=r.createTextVNode()),r.createElementVNode("div",bS,[r.createElementVNode("div",xS,[r.createElementVNode("div",{ref_key:"barRef",ref:I,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(B.value)},null,4)],512)]),U[5]||(U[5]=r.createTextVNode()),r.createElementVNode("div",kS,[s.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(y),(te,j)=>(r.openBlock(),r.createElementBlock("div",{key:j,style:r.normalizeStyle({right:`${te}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),U[4]||(U[4]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef",ref:L,tabindex:"0",class:"ui-slider__thumb ui-slider__thumb-active",style:r.normalizeStyle(A.value),onKeydown:F},U[3]||(U[3]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),U[7]||(U[7]=r.createTextVNode()),r.createElementVNode("div",SS,[s.mode==="input"?(r.openBlock(),r.createElementBlock("input",{key:0,value:p.value,class:"ui-slider__value text-s",onChange:U[0]||(U[0]=te=>O(te))},null,40,ES)):r.createCommentVNode("",!0)])],2),U[8]||(U[8]=r.createTextVNode()),f.value?(r.openBlock(),r.createElementBlock("div",TS,r.toDisplayString(f.value),1)):r.createCommentVNode("",!0)],2))}});function BS(t,e=null,n=null){function o(u){const{scrollTop:p,scrollHeight:f,clientHeight:m}=u;if(!(f>m)||!e)return null;const y=f-p-m,T=p>e?e:0,B=y>e?m-e-T:m;return`linear-gradient(
|
|
54
54
|
to bottom,
|
|
55
55
|
transparent,
|
|
56
|
-
black ${B}px,
|
|
57
56
|
black ${T}px,
|
|
57
|
+
black ${B}px,
|
|
58
58
|
transparent 100%
|
|
59
|
-
)`}function s(u){const{scrollLeft:p,scrollWidth:f,clientWidth:m}=u;if(!(f>m)||!n)return null;const y=f-p-m,
|
|
59
|
+
)`}function s(u){const{scrollLeft:p,scrollWidth:f,clientWidth:m}=u;if(!(f>m)||!n)return null;const y=f-p-m,T=p>n?n:0,B=y>n?m-n-T:m;return`linear-gradient(
|
|
60
60
|
to right,
|
|
61
61
|
transparent,
|
|
62
|
-
black ${B}px,
|
|
63
62
|
black ${T}px,
|
|
63
|
+
black ${B}px,
|
|
64
64
|
transparent 100%
|
|
65
|
-
)`}function l(){const u=t.value;if(!u)return;const p=[o(u),s(u)].filter(f=>f!==null);u.style.setProperty("-webkit-mask-image",p.join(",")),u.style.setProperty("mask-image",p.join(",")),p.length>1&&(u.style.setProperty("-webkit-mask-composite","source-in"),u.style.setProperty("mask-composite","source-in"))}const c=cl(l);r.onMounted(l),rt(window,"scroll",c,!0),rt(window,"resize",c,!0)}function lp(t,e){Bu(()=>{lt(r.unref(t),n=>{Vu(n,()=>e(n))})}),r.onUnmounted(()=>{lt(r.unref(t),n=>{Nu(n)})})}const Cr={item:"sortable__item",animate:"sortable__animate"},Di=t=>t.getBoundingClientRect().y,cp=t=>{const{y:e,height:n}=t.getBoundingClientRect();return e+Math.ceil(n/2)},uS=t=>{const{y:e,height:n}=t.getBoundingClientRect();return e+n};function dp(t,e){const n={item:void 0,options(){var T;return[...((T=t.value)==null?void 0:T.children)??[]]}},o=r.computed(()=>n.options()),s=e.shakeBuffer??10,l=e.reorderDelay??100;function c(T){const N=e.handle?this.querySelector(e.handle):null;N&&(N&&!N.contains(T.target)||(this.classList.remove(Cr.animate),this.classList.add(Cr.item),n.item={el:this,y:T.y,dy:0,orderChanged:!1}))}function u(T){const N=n.options();return N.slice(0,N.indexOf(T))}function p(T){const N=n.options();return N.slice(N.indexOf(T)+1)}function f(T,N){const M=n.options().filter(C=>C!==N),G=M.indexOf(T);return M.splice(G,0,N),M}function m(T,N){const M=n.options().filter(C=>C!==N),G=M.indexOf(T);return M.splice(G+1,0,N),M}function y(T,N){T.dy=N-T.y,T.el.style.setProperty("transform",`translateY(${T.dy}px)`)}function B(T){var N;if(!n.item)return;const{el:M}=n.item;if(!M.isConnected){n.item=void 0;return}const G=T.map(Y=>Di(Y)),C=Di(M);(N=t.value)==null||N.replaceChildren(...T);const F=Di(M),O=T.map(Y=>Di(Y)),Z=[];for(let Y=0;Y<O.length;Y++){const W=T[Y];if(W===n.item.el)continue;const P=O[Y],j=G[Y]-P;W.style.transform=`translateY(${j}px)`,Z.push(W)}const I=F-C;n.item.y=n.item.y+I,n.item.dy=n.item.dy-I,n.item.orderChanged=!0,n.item.el.style.setProperty("transform",`translateY(${n.item.dy}px)`),Z.forEach(Y=>Y.classList.remove(Cr.animate)),requestAnimationFrame(function(){Z.forEach(Y=>{Y.classList.add(Cr.animate),Y.style.transform="",Y.addEventListener("transitionend",()=>{Y.classList.remove(Cr.animate)})})})}rt(window,"mousemove",T=>{if(!n.item)return;const{el:N}=n.item;y(n.item,T.y);const M=Di(n.item.el),G=uS(n.item.el),C=u(N),F=p(N);C.forEach(O=>{const Z=cp(O);M+s<Z&&B(f(O,N))}),F.forEach(O=>{const Z=cp(O);G-s>Z&&B(m(O,N))})}),rt(window,"mouseup",()=>{if(!n.item)return;const{el:T,orderChanged:N}=n.item;T.classList.add(Cr.animate),T.style.removeProperty("transform"),T.addEventListener("transitionend",()=>{T.classList.remove(Cr.animate,Cr.item)}),setTimeout(()=>{if(!N)return;const M=n.options().map(C=>Number(C.getAttribute("data-index"))),G=t.value;if(G){for(const C of n.options())G.removeChild(C);o.value.forEach(C=>{G.appendChild(C)})}e.onChange(M)},l),n.item=void 0}),r.watchEffect(()=>{o.value.forEach((T,N)=>{T.removeEventListener("mousedown",c),T.addEventListener("mousedown",c),T.setAttribute("data-index",String(N))})})}function pS(t,e){let n;r.onMounted(()=>{n=setInterval(t,e)}),r.onUnmounted(()=>clearInterval(n))}function hS(t,e,n){const o=r.reactive({data:rl.deepClone(e(t.value)),changed:!1});return r.watch(()=>o.data,s=>{o.changed?n(rl.deepClone(s)):o.changed=!0},{deep:!0}),r.watch(t,s=>{Object.assign(o,{data:rl.deepClone(e(s)),changed:!1})},{deep:!0,immediate:!0}),o}function fS(t){const e=r.reactive({isLoading:!1,result:void 0,error:void 0,async run(...n){this.isLoading=!0,this.error=void 0;try{this.result=await t(...n)}catch(o){this.error=o}finally{this.isLoading=!1}},debounce(n,o=1e3){return Y_(()=>{const s=n();this.run(...s).catch(console.error)},o)}});return e.run=e.run.bind(e),e}function mS(t,e){function n(c,u){const p=r.unref(t);if(!p)return;const f=`translate(${u.x-c.x}px, ${u.y-c.y}px)`;p.style.setProperty("transform",f),e(u)}function o(c){const u=p=>n(c,p);document.addEventListener("mousemove",u),document.addEventListener("mouseup",()=>{const p=r.unref(t);document.removeEventListener("mousemove",u),p&&(p.style.setProperty("transition","all .3s ease-in-out"),p.style.removeProperty("transform"),p.addEventListener("transitionend",()=>{p.style.removeProperty("transition")}))},{once:!0})}function s(){var c;(c=r.unref(t))==null||c.addEventListener("mousedown",o)}function l(){var c;(c=r.unref(t))==null||c.removeEventListener("mousedown",o)}r.onMounted(s),r.onUnmounted(l)}const gS={class:"ui-slider__wrapper"},yS={class:"ui-slider__label-section"},_S={key:0,class:"text-s"},vS={class:"ui-slider__base"},CS={class:"ui-slider__container"},wS={class:"ui-slider__container ui-slider__container-thumb"},bS=["data-percent"],xS=["data-percent"],kS=["data-percent"],SS={key:0,class:"ui-slider__error"},ES=r.defineComponent({__name:"SliderRangeTriple",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:"%"},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=t,l=r.reactive({deltaValue1:0,deltaValue2:0,deltaValue3:0}),c=r.ref(),u=r.ref(),p=r.ref(),f=r.ref(),m=r.computed(()=>s.max-s.min),y=r.computed(()=>s),B=Al(y),T=r.computed(()=>wt((s.modelValue[0]??0)+l.deltaValue1,s.min,s.max)),N=r.computed(()=>wt((s.modelValue[1]??0)+l.deltaValue2,s.min,s.max)),M=r.computed(()=>wt((s.modelValue[2]??0)+l.deltaValue3,s.min,s.max)),G=r.computed(()=>{const k=s.modelValue;if(!(Array.isArray(k)&&k.length===3&&k.every(te=>Number.isFinite(te))))return"Expected model [number, number, number]";const $=[];return[...s.modelValue].forEach(te=>{te>s.max&&$.push(`Max model value must be lower than max props ${s.max}.`),te<s.min&&$.push("Min model value must be greater than max props.")}),$.length>0?$.join(" "):s.error}),C=r.computed(()=>(T.value-s.min)/m.value),F=r.computed(()=>(N.value-s.min)/m.value),O=r.computed(()=>(M.value-s.min)/m.value),Z=r.computed(()=>U()),I=r.computed(()=>({right:Z.value[0]+"%",left:100-Z.value[2]+"%"})),Y=r.computed(()=>({right:Math.ceil((1-C.value)*100)+"%"})),W=r.computed(()=>({right:Math.ceil((1-F.value)*100)+"%"})),P=r.computed(()=>({right:Math.ceil((1-O.value)*100)+"%"}));dr(u,k=>{var $;lt(($=r.unref(c))==null?void 0:$.getBoundingClientRect(),te=>{const{dx:ne}=k;l.deltaValue1=ne/te.width*m.value,u.value&&j(u.value,s.modelValue[0],l.deltaValue1),k.stop&&(L([X(T.value),X(N.value),X(M.value)]),l.deltaValue1=0)})}),dr(p,k=>{var $;lt(($=r.unref(c))==null?void 0:$.getBoundingClientRect(),te=>{const{dx:ne}=k;l.deltaValue2=ne/te.width*m.value,p.value&&j(p.value,s.modelValue[1],l.deltaValue2),k.stop&&(L([X(T.value),X(N.value),X(M.value)]),l.deltaValue2=0)})}),dr(f,k=>{var $;lt(($=r.unref(c))==null?void 0:$.getBoundingClientRect(),te=>{const{dx:ne}=k;l.deltaValue3=ne/te.width*m.value,f.value&&j(f.value,s.modelValue[2],l.deltaValue3),k.stop&&(L([X(T.value),X(N.value),X(M.value)]),l.deltaValue3=0)})});function j(k,$,te){const ne=X(wt(($??0)+te,s.min,s.max));k.dataset.percent=`${ne}${s.measure}`,S()}function U(){const k=Math.ceil((1-C.value)*100),$=Math.ceil((1-F.value)*100),te=Math.ceil((1-O.value)*100);return[k,$,te].sort((ne,be)=>ne-be)}function X(k){const $=wt(k,s.min,s.max);return Math.round(($+Number.EPSILON)*(1/s.step))/(1/s.step)}function L(k){o("update:modelValue",k)}function S(){const k=Number(Y.value.right.substring(0,Y.value.right.length-1)),$=Number(W.value.right.substring(0,W.value.right.length-1)),te=Number(P.value.right.substring(0,P.value.right.length-1)),ne=[{r:k,th:u},{r:$,th:p},{r:te,th:f}].sort((be,$e)=>be.r-$e.r);ne[0].th.value&&(ne[0].th.value.dataset.hint="high"),ne[1].th.value&&(ne[1].th.value.dataset.hint="mid"),ne[2].th.value&&(ne[2].th.value.dataset.hint="low")}function w(k,$){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(k.code)&&k.preventDefault();const te=k.code==="ArrowUp"||k.code==="ArrowRight"?s.step*1:k.code==="ArrowDown"||k.code==="ArrowLeft"?s.step*-1:0,ne=[...s.modelValue];ne[$]=wt(ne[$]+te,s.min,s.max),L(ne),S()}return r.onMounted(()=>{S()}),(k,$)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([s.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope ui-slider__triple"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${s.mode}`,"ui-slider"])},[r.createElementVNode("div",gS,[r.createElementVNode("div",yS,[k.label?(r.openBlock(),r.createElementBlock("label",_S,[r.createElementVNode("span",null,r.toDisplayString(k.label),1),$[3]||($[3]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(k.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)]),$[11]||($[11]=r.createTextVNode()),r.createElementVNode("div",vS,[r.createElementVNode("div",CS,[r.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(I.value)},null,4)],512)]),$[10]||($[10]=r.createTextVNode()),r.createElementVNode("div",wS,[s.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(B),(te,ne)=>(r.openBlock(),r.createElementBlock("div",{key:ne,style:r.normalizeStyle({right:`${te}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),$[7]||($[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef1",ref:u,style:r.normalizeStyle(Y.value),"data-percent":s.modelValue[0]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r1:"",tabindex:"0",onKeydown:$[0]||($[0]=te=>w(te,0))},$[4]||($[4]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,bS),$[8]||($[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:r.normalizeStyle(W.value),"data-percent":s.modelValue[1]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r2:"",tabindex:"0",onKeydown:$[1]||($[1]=te=>w(te,1))},$[5]||($[5]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,xS),$[9]||($[9]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef3",ref:f,style:r.normalizeStyle(P.value),"data-percent":s.modelValue[2]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r3:"",tabindex:"0",onKeydown:$[2]||($[2]=te=>w(te,2))},$[6]||($[6]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,kS)])])]),$[12]||($[12]=r.createTextVNode()),$[13]||($[13]=r.createElementVNode("div",{class:"ui-slider__input-wrapper d-flex"},null,-1))],2),$[14]||($[14]=r.createTextVNode()),G.value?(r.openBlock(),r.createElementBlock("div",SS,r.toDisplayString(G.value),1)):r.createCommentVNode("",!0)],2))}}),TS={class:"ui-input-range__separator"},BS=r.defineComponent({__name:"InputRange",props:{modelValue:{},separator:{default:"-"}},emits:["update:modelValue","change"],setup(t,{emit:e}){const n=t,o=e,s=r.reactive({left:n.modelValue[0],right:n.modelValue[1]}),l=r.ref(!1),c=r.computed(()=>(l.value,"ui-input-range-focused")),u=r.computed({get(){return{left:Math.min(...n.modelValue),right:Math.max(...n.modelValue)}},set(){}});r.watch(()=>u.value,m=>(s.left=m.left)&&(s.right=m.right));function p(){o("update:modelValue",[+s.left,+s.right]),o("change",[+s.left,+s.right])}function f(m,y){const B=y.target.value;/^[0-9]{0,2}$/.test(B)?m?s.left=+B:s.right=+B:m?s.left=+B.slice(0,B.length-1):s.right=+B.slice(0,B.length-1)}return(m,y)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({class:[c.value,"ui-input-range"]},m.$attrs),[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":y[0]||(y[0]=B=>u.value.left=B),class:"text-s",type:"text",onChange:p,onFocus:y[1]||(y[1]=B=>l.value=!0),onFocusout:y[2]||(y[2]=B=>l.value=!1),onInput:y[3]||(y[3]=B=>f(!0,B))},null,544),[[r.vModelText,u.value.left]]),y[8]||(y[8]=r.createTextVNode()),r.createElementVNode("div",TS,r.toDisplayString(n.separator),1),y[9]||(y[9]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":y[4]||(y[4]=B=>u.value.right=B),class:"text-s",type:"text",onChange:p,onFocus:y[5]||(y[5]=B=>l.value=!0),onFocusout:y[6]||(y[6]=B=>l.value=!1),onInput:y[7]||(y[7]=B=>f(!1,B))},null,544),[[r.vModelText,u.value.right]])],16))}}),VS={class:"ui-slider__wrapper"},NS={class:"ui-slider__label-section"},AS={key:0,class:"text-s"},PS={key:1,class:"ui-slider__value-static text-s"},DS={class:"ui-slider__base"},FS={class:"ui-slider__container"},RS={class:"ui-slider__container ui-slider__container-thumb"},MS={class:"ui-slider__input-wrapper d-flex"},IS={key:0,class:"ui-slider__error"},LS=r.defineComponent({__name:"SliderRange",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:""},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=t,l=r.reactive({deltaValue1:0,deltaValue2:0}),c=r.ref(),u=r.ref(),p=r.ref(),f=r.ref(s.modelValue),m=r.ref(s.modelValue[0]),y=r.ref(s.modelValue[1]),B=r.computed(()=>s),T=Al(B),N=r.computed(()=>[m.value,y.value].sort((S,w)=>S-w).join("-")),M=r.computed(()=>s.max-s.min),G=r.computed(()=>wt((s.modelValue[0]??0)+l.deltaValue1,s.min,s.max)),C=r.computed(()=>wt((s.modelValue[1]??0)+l.deltaValue2,s.min,s.max)),F=r.computed(()=>{const S=s.modelValue;return Array.isArray(S)&&S.length===2&&S.every(w=>Number.isFinite(w))?s.error:"Expected model [number, number]"}),O=r.computed(()=>(G.value-s.min)/M.value),Z=r.computed(()=>(C.value-s.min)/M.value),I=r.computed(()=>j()),Y=r.computed(()=>({right:I.value[0]+"%",left:100-I.value[1]+"%"})),W=r.computed(()=>({right:Math.ceil((1-O.value)*100)+"%"})),P=r.computed(()=>({right:Math.ceil((1-Z.value)*100)+"%"}));r.watch(()=>s.modelValue,S=>{f.value=S,m.value=+S[0],y.value=+S[1]},{immediate:!0}),dr(u,S=>{var w;lt((w=r.unref(c))==null?void 0:w.getBoundingClientRect(),k=>{const{dx:$}=S;l.deltaValue1=$/k.width*M.value,m.value=U(wt((s.modelValue[0]??0)+l.deltaValue1,s.min,s.max)),f.value=[m.value,y.value].sort((te,ne)=>te-ne),S.stop&&(X([U(G.value),U(C.value)]),l.deltaValue1=0)})}),dr(p,S=>{var w;lt((w=r.unref(c))==null?void 0:w.getBoundingClientRect(),k=>{const{dx:$}=S;l.deltaValue2=$/k.width*M.value,y.value=U(wt((s.modelValue[1]??0)+l.deltaValue2,s.min,s.max)),f.value=[m.value,y.value].sort((te,ne)=>te-ne),S.stop&&(X([U(G.value),U(C.value)]),l.deltaValue2=0)})});function j(){const S=Math.ceil((1-O.value)*100),w=Math.ceil((1-Z.value)*100);return[S,w].sort((k,$)=>k-$)}function U(S){const w=wt(S,s.min,s.max);return Math.round((w+Number.EPSILON)*(1/s.step))/(1/s.step)}function X(S){o("update:modelValue",S)}function L(S,w){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(S.code)&&S.preventDefault();const k=S.code==="ArrowUp"||S.code==="ArrowRight"?s.step*1:S.code==="ArrowDown"||S.code==="ArrowLeft"?s.step*-1:0,$=[...s.modelValue];$[w]=wt($[w]+k,s.min,s.max),X($)}return(S,w)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([s.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${s.mode}`,"ui-slider"])},[r.createElementVNode("div",VS,[r.createElementVNode("div",NS,[S.label?(r.openBlock(),r.createElementBlock("label",AS,[r.createElementVNode("span",null,r.toDisplayString(S.label),1),w[3]||(w[3]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(vt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(S.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),w[4]||(w[4]=r.createTextVNode()),s.mode==="text"?(r.openBlock(),r.createElementBlock("div",PS,r.toDisplayString(N.value),1)):r.createCommentVNode("",!0)]),w[10]||(w[10]=r.createTextVNode()),r.createElementVNode("div",DS,[r.createElementVNode("div",FS,[r.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(Y.value)},null,4)],512)]),w[9]||(w[9]=r.createTextVNode()),r.createElementVNode("div",RS,[s.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(T),(k,$)=>(r.openBlock(),r.createElementBlock("div",{key:$,style:r.normalizeStyle({right:`${k}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),w[7]||(w[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef1",ref:u,style:r.normalizeStyle(W.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:w[0]||(w[0]=k=>L(k,0))},w[5]||(w[5]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36),w[8]||(w[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:r.normalizeStyle(P.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:w[1]||(w[1]=k=>L(k,1))},w[6]||(w[6]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),w[11]||(w[11]=r.createTextVNode()),r.createElementVNode("div",MS,[s.mode==="input"?(r.openBlock(),r.createBlock(BS,{key:0,modelValue:f.value,"onUpdate:modelValue":w[2]||(w[2]=k=>f.value=k),class:"ui-focused-border",onChange:X},null,8,["modelValue"])):r.createCommentVNode("",!0)])],2),w[12]||(w[12]=r.createTextVNode()),F.value?(r.openBlock(),r.createElementBlock("div",IS,r.toDisplayString(F.value),1)):r.createCommentVNode("",!0)],2))}}),OS=r.defineComponent({__name:"VScroll",props:{scrollTop:{},clientHeight:{},scrollHeight:{}},emits:["update:scrollTop"],setup(t,{emit:e}){const n=e,o=t,s=r.ref(),l=r.computed(()=>o.clientHeight/(o.scrollHeight||1)),c=r.computed(()=>l.value<1),u=r.computed(()=>{const p=r.unref(l);return{top:o.scrollTop*p+"px",height:Math.floor(o.clientHeight*p)+"px"}});return rt(s,"pointerdown",p=>{const f={clientY:p.clientY},m=vl(document,"mousemove",y=>{const B=(y.clientY-f.clientY)/l.value;n("update:scrollTop",o.scrollTop+B),f.clientY=y.clientY});["mouseup","pointercancel"].forEach(y=>{document.addEventListener(y,m,{once:!0})})}),(p,f)=>c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:s,class:"v-scroll"},[r.createElementVNode("div",{class:"v-scroll__scrollbar",style:r.normalizeStyle(u.value)},null,4)],512)):r.createCommentVNode("",!0)}}),GS=r.defineComponent({__name:"HScroll",props:{scrollLeft:{},clientWidth:{},scrollWidth:{}},emits:["update:scrollLeft"],setup(t,{emit:e}){const n=e,o=t,s=r.ref(),l=r.computed(()=>o.clientWidth/(o.scrollWidth||1)),c=r.computed(()=>l.value<1),u=r.computed(()=>{const p=r.unref(l);return{left:o.scrollLeft*p+"px",width:Math.floor(o.clientWidth*p)+"px"}});return rt(s,"pointerdown",p=>{const f={clientX:p.clientX},m=vl(document,"mousemove",y=>{const B=(y.clientX-f.clientX)/l.value;n("update:scrollLeft",o.scrollLeft+B),f.clientX=y.clientX});["mouseup","pointercancel"].forEach(y=>{document.addEventListener(y,m,{once:!0})})}),(p,f)=>c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:s,class:"h-scroll"},[r.createElementVNode("div",{class:"h-scroll__scrollbar",style:r.normalizeStyle(u.value)},null,4)],512)):r.createCommentVNode("",!0)}}),zS={class:"ui-scrollable"},$S=r.defineComponent({__name:"Scrollable",setup(t){const e=r.ref(),n=r.reactive({scrollTop:0,scrollLeft:0,clientHeight:0,clientWidth:0,scrollHeight:0,scrollWidth:0});function o(u){n0(n,u,"scrollTop","scrollLeft","clientHeight","clientWidth","scrollHeight","scrollWidth")}const s=u=>{u.preventDefault();const p=u.currentTarget;p.scrollTop+=u.deltaY,p.scrollLeft+=u.deltaX,o(p)};function l(u){lt(r.unref(e),p=>{p.scrollTop=u,o(p)})}function c(u){lt(r.unref(e),p=>{p.scrollLeft=u,o(p)})}return lp(e,u=>{lt(u,p=>o(p))}),r.onMounted(()=>{lt(r.unref(e),u=>{o(u),u.addEventListener("wheel",s)})}),r.onUnmounted(()=>{lt(r.unref(e),u=>u.removeEventListener("wheel",s))}),(u,p)=>(r.openBlock(),r.createElementBlock("div",zS,[r.createElementVNode("div",{ref_key:"containerRef",ref:e,class:"ui-scrollable__container",onWheel:s},[r.renderSlot(u.$slots,"default")],544),p[2]||(p[2]=r.createTextVNode()),r.createVNode(OS,{"scroll-top":n.scrollTop,"client-height":n.clientHeight,"scroll-height":n.scrollHeight,onWheel:p[0]||(p[0]=r.withModifiers(()=>{},["stop"])),"onUpdate:scrollTop":l},null,8,["scroll-top","client-height","scroll-height"]),p[3]||(p[3]=r.createTextVNode()),r.createVNode(GS,{"scroll-left":n.scrollLeft,"client-width":n.clientWidth,"scroll-width":n.scrollWidth,onWheel:p[1]||(p[1]=r.withModifiers(()=>{},["stop"])),"onUpdate:scrollLeft":c},null,8,["scroll-left","client-width","scroll-width"])]))}}),ZS="add.svg",US="box.svg",WS="calendar.svg",HS="checkmark.svg",jS="clipboard.svg",qS="close.svg",KS="copy.svg",YS="download.svg",JS="duplicate.svg",XS="edit.svg",QS="error.svg",e1="filter.svg",t1="help.svg",n1="info.svg",r1="link.svg",o1="loading.svg",i1="lock.svg",s1="maximize.svg",a1="minimize.svg",l1="minus.svg",c1="more.svg",d1="open.svg",u1="pause.svg",p1="play.svg",h1="renew.svg",f1="restart.svg",m1="reverse.svg",g1="settings.svg",y1="sort.svg",_1="stop.svg",v1="success.svg",C1="time.svg",w1="tune.svg",b1="warning.svg",x1="zip.svg",k1={add:ZS,"arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-link":"arrow-link.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg",box:US,calendar:WS,"caret-down":"caret-down.svg","caret-left":"caret-left.svg","caret-right":"caret-right.svg","caret-up":"caret-up.svg","cell-type-num":"cell-type-num.svg","cell-type-txt":"cell-type-txt.svg",checkmark:HS,"chevron-down":"chevron-down.svg","chevron-first":"chevron-first.svg","chevron-last":"chevron-last.svg","chevron-left":"chevron-left.svg","chevron-right":"chevron-right.svg","chevron-up":"chevron-up.svg","clipboard-copied":"clipboard-copied.svg",clipboard:jS,close:qS,copy:KS,"data-dimentions":"data-dimentions.svg","delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg",download:YS,"drag-dots":"drag-dots.svg",duplicate:JS,edit:XS,error:QS,export:"export.svg","filter-on":"filter-on.svg",filter:e1,"help-outline":"help-outline.svg",help:t1,"info-outline":"info-outline.svg",info:n1,"jump-link":"jump-link.svg",link:r1,loading:o1,lock:i1,maximize:s1,minimize:a1,minus:l1,more:c1,open:d1,"paper-clip":"paper-clip.svg",pause:u1,play:p1,renew:h1,restart:f1,reverse:m1,settings:g1,sort:y1,stop:_1,success:v1,time:C1,tune:w1,warning:b1,"x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:x1},S1="add.svg",E1="annotate.svg",T1="annotation.svg",B1="area.svg",V1="axes.svg",N1="bar.svg",A1="bindot.svg",P1="box.svg",D1="boxplot.svg",F1="bubble.svg",R1="calendar.svg",M1="canvas.svg",I1="checkbox.svg",L1="checkmark.svg",O1="clipboard.svg",G1="close.svg",z1="cluster.svg",$1="code.svg",Z1="color.svg",U1="columns.svg",W1="container.svg",H1="cookie.svg",j1="copy.svg",q1="cpu.svg",K1="debug.svg",Y1="dna.svg",J1="download.svg",X1="duplicate.svg",Q1="edit.svg",eE="error.svg",tE="filter.svg",nE="generate.svg",rE="graph.svg",oE="heatmap.svg",iE="help.svg",sE="info.svg",aE="jitter.svg",lE="lasso.svg",cE="layers.svg",dE="learn.svg",uE="legend.svg",pE="line.svg",hE="link.svg",fE="loading.svg",mE="lock.svg",gE="maximize.svg",yE="menu.svg",_E="minimize.svg",vE="minus.svg",CE="more.svg",wE="pause.svg",bE="pin.svg",xE="play.svg",kE="product.svg",SE="publications.svg",EE="renew.svg",TE="restart.svg",BE="reverse.svg",VE="search.svg",NE="server.svg",AE="settings.svg",PE="sina.svg",DE="skatterplot.svg",FE="slice.svg",RE="sort.svg",ME="statistics.svg",IE="stop.svg",LE="success.svg",OE="table.svg",GE="template.svg",zE="terminal.svg",$E="time.svg",ZE="tune.svg",UE="venn.svg",WE="violin.svg",HE="warning.svg",jE="wetlab.svg",qE="zip.svg",KE={"add-layer":"add-layer.svg",add:S1,"align-center":"align-center.svg","align-left":"align-left.svg","align-right":"align-right.svg",annotate:E1,annotation:T1,area:B1,"arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-link":"arrow-link.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg",axes:V1,"bar-cross":"bar-cross.svg","bar-error":"bar-error.svg","bar-stacked":"bar-stacked.svg","bar-trend":"bar-trend.svg",bar:N1,bindot:A1,box:P1,"boxplot-binned":"boxplot-binned.svg","boxplot-jitter":"boxplot-jitter.svg","boxplot-notched":"boxplot-notched.svg",boxplot:D1,bubble:F1,calendar:R1,canvas:M1,"cell-type-num":"cell-type-num.svg","cell-type-txt":"cell-type-txt.svg","checkbox-checked":"checkbox-checked.svg","checkbox-intermediate":"checkbox-intermediate.svg",checkbox:I1,checkmark:L1,"chevron-down":"chevron-down.svg","chevron-first":"chevron-first.svg","chevron-last":"chevron-last.svg","chevron-left":"chevron-left.svg","chevron-right":"chevron-right.svg","chevron-sort":"chevron-sort.svg","chevron-up":"chevron-up.svg","clipboard-copied":"clipboard-copied.svg",clipboard:O1,close:G1,"cloud-download":"cloud-download.svg","cloud-offline":"cloud-offline.svg","cloud-online":"cloud-online.svg","cloud-upload":"cloud-upload.svg",cluster:z1,code:$1,"color-fill":"color-fill.svg","color-none":"color-none.svg","color-stroke":"color-stroke.svg",color:Z1,columns:U1,"connected-points":"connected-points.svg",container:W1,cookie:H1,copy:j1,cpu:q1,"data-dimentions":"data-dimentions.svg",debug:K1,"delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg","dendrogram-X-line":"dendrogram-X-line.svg","dendrogram-X":"dendrogram-X.svg","dendrogram-Y-line":"dendrogram-Y-line.svg","dendrogram-Y":"dendrogram-Y.svg","dna-add":"dna-add.svg","dna-import":"dna-import.svg",dna:Y1,download:J1,"drag-dots":"drag-dots.svg","drag-horizontal":"drag-horizontal.svg","drag-vertical":"drag-vertical.svg",duplicate:X1,edit:Q1,"error-bar":"error-bar.svg",error:eE,"expand-left":"expand-left.svg","expand-right":"expand-right.svg",export:"export.svg","file-doc-add":"file-doc-add.svg","file-doc-download":"file-doc-download.svg","file-doc-import":"file-doc-import.svg","file-doc":"file-doc.svg","filter-on":"filter-on.svg",filter:tE,"fire-tips":"fire-tips.svg","folder-parent":"folder-parent.svg","frame-type-all":"frame-type-all.svg","frame-type-bottom":"frame-type-bottom.svg","frame-type-left-bottom":"frame-type-left-bottom.svg","frame-type-left":"frame-type-left.svg","frame-type-none":"frame-type-none.svg",generate:nE,graph:rE,heatmap:oE,"help-outline":"help-outline.svg",help:iE,"info-outline":"info-outline.svg",info:sE,jitter:aE,"jump-link":"jump-link.svg",lasso:lE,layers:cE,learn:dE,"legend-box-dot":"legend-box-dot.svg","legend-box":"legend-box.svg",legend:uE,"line-binned":"line-binned.svg","line-error":"line-error.svg","line-jitter":"line-jitter.svg",line:pE,"linetype-dashed":"linetype-dashed.svg","linetype-dotdash":"linetype-dotdash.svg","linetype-dotted":"linetype-dotted.svg","linetype-longdash":"linetype-longdash.svg","linetype-solid":"linetype-solid.svg","linetype-twodash":"linetype-twodash.svg","link-disabled":"link-disabled.svg",link:hE,loading:fE,lock:mE,maximize:gE,menu:yE,minimize:_E,minus:vE,more:CE,"paper-clip":"paper-clip.svg",pause:wE,pin:bE,play:xE,"position-bottom-annotation":"position-bottom-annotation.svg","position-bottom":"position-bottom.svg","position-left-annotation":"position-left-annotation.svg","position-left":"position-left.svg","position-right-annotation":"position-right-annotation.svg","position-right":"position-right.svg","position-top-annotation":"position-top-annotation.svg","position-top":"position-top.svg",product:kE,publications:SE,"radio-button-checked":"radio-button-checked.svg","radio-button":"radio-button.svg",renew:EE,restart:TE,reverse:BE,"rotation-0":"rotation-0.svg","rotation-45":"rotation-45.svg","rotation-90":"rotation-90.svg",search:VE,"server-on":"server-on.svg",server:NE,settings:AE,sina:PE,skatterplot:DE,slice:FE,"social-github":"social-github.svg","social-linkedin":"social-linkedin.svg","social-twitter-X":"social-twitter-X.svg","social-twitter-bird":"social-twitter-bird.svg","social-youtube":"social-youtube.svg","sort-list-down":"sort-list-down.svg","sort-list-up":"sort-list-up.svg",sort:RE,statistics:ME,stop:IE,"strip-plot":"strip-plot.svg",success:LE,"table-add":"table-add.svg","table-alias":"table-alias.svg","table-import":"table-import.svg",table:OE,template:GE,terminal:zE,"text-align-center":"text-align-center.svg","text-align-left":"text-align-left.svg","text-align-right":"text-align-right.svg","theme-dark":"theme-dark.svg","theme-light":"theme-light.svg",time:$E,tune:ZE,venn:UE,"view-hide":"view-hide.svg","view-show":"view-show.svg","violin-binned":"violin-binned.svg","violin-jitter":"violin-jitter.svg",violin:WE,warning:HE,wetlab:jE,"windows-collapse":"windows-collapse.svg","windows-expand":"windows-expand.svg","x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:qE,"zoom-in":"zoom-in.svg","zoom-out":"zoom-out.svg"};function YE(){return{txtSec:{title:"Text",data:{"--txt-00":{light:[!1,!1],value:["#FFFFFF","#FFFFFF"],description:"Text on the colored elements"},"--txt-01":{light:[!0,!1],value:["#110529","#FFFFFF"],description:"Primary text layer"},"--txt-02":{light:[!0,!1],value:["#231842","#ADAEB8"],description:"Secondary text layer - large arrays of text"},"--txt-03":{light:[!0,!0],value:["#9D9EAE","#60616B"],description:"Tetritary text layer - hints and descriptions"},"--txt-mask":{light:[!1,!0],value:["#CFD1DB","#3D3D42"],description:"Text mask in inputs, icons, etc."},"--txt-focus":{light:[!0,!0],value:["#07AD3E","#87E087"],description:"Colored text in active/focus elements"},"--txt-error":{light:[!0,!0],value:["#F1222F","#FF5C5C"],description:"Colored text in error elements"},"--txt-link":{light:[!0,!0],value:["#5F31CC","#9470FF"],description:"Colored text in links"}}},iconSec:{title:"Icon",data:{"--ic-00":{light:[!1,!1],value:["#FFFFFF","#FFFFFF"],description:"Icons on colored elements"},"--ic-01":{light:[!0,!1],value:["#110529","#FFFFFF"],description:"Primary elements"},"--ic-02":{light:[!1,!0],value:["#CFD1DB","#60616B"],description:"Secondary & tetritary elements"},"--ic-accent":{light:[!0,!1],value:["#07AD3E","#87E087"],description:"Focus/active elements"}}},borderSec:{title:"Border",data:{"--border-color-default":{light:[!0,!0],value:["#110529","#60616B"],description:"Main border for components"},"--border-color-hover":{light:[!0,!0],value:["#231842","#ADAEB8"],description:"Hover on main border"},"--border-color-focus":{light:[!1,!1],value:["#49CC49","#49CC49"],description:"Active border for components"},"--border-color-error":{light:[!1,!1],value:["#FF5C5C","#FF5C5C"],description:"Error border for components"},"--border-color-div-grey":{light:[!1,!0],value:["#E1E3EB","#232329"],description:"Divider lines low contrast"},"--border-color-div-bw":{light:[!1,!0],value:["#FFFFFF","#000000"],description:"Divider lines hight contrast"}}},btnSec:{title:"Button",data:{"--btn-accent-default":{light:[!0,!0],value:["#845CFF"," #5F31CC"],description:"Accent coloured button"},"--btn-accent-hover":{light:[!0,!0],value:["#9470FF"," #5F31CC"],description:"Hover on accent coloured button"},"--btn-accent-press":{light:[!0,!0],value:["#6F4DD6","#5F31CC"],description:"Pressed on accent coloured button"},"--btn-primary-default":{light:[!0,!0],value:["#110529","#5F31CC"],description:"Primary button"},"--btn-primary-hover":{light:[!0,!0],value:["#231842","#6D3DDB"],description:"Hover on primary button"},"--btn-primary-press":{light:[!0,!0],value:["#080214","#5328B8"],description:"Hover on primary button"},"--btn-sec-hover-white":{light:[!1,!0],value:["rgba(255, 255, 255, 0.50)","rgba(131, 131, 163, 0.16)"],description:"Hover background on transparent button"},"--btn-sec-hover-grey":{light:[!1,!0],value:["rgba(155, 171, 204, 0.16)","rgba(131, 131, 163, 0.16)"],description:"Hover background on ghost button & icons"},"--btn-sec-press-grey":{light:[!1,!0],value:["rgba(155, 171, 204, 0.24)","rgba(131, 131, 163, 0.24)"],description:"Hover background on ghost button & icons"},"--btn-active-select":{light:[!1,!0],value:["rgba(99, 224, 36, 0.24)","rgba(99, 224, 36, 0.24)"],description:"Fill on selected elements"},"--btn-switcher":{light:[!1,!0],value:["linear-gradient(180deg, #A1E59C 0%, #D0F5B0 100%)","#5E5E70"],description:"Gradient on active controll/switcher element"}}},disSec:{title:"Disable",data:{"--dis-00":{light:[!1,!0],value:["#FFFFFF","#65656B"],description:"Elements on dis-01, labels, texts, icons"},"--dis-01":{light:[!1,!0],value:["#CFD1DB","#3D3D42"],description:"Buttons, borders, labels, texts, icons"}}},bgSec:{title:"Background",data:{"--bg-base-dark":{light:[!0,!0],value:["#110529","#0D0D0F"],description:"Default dark block background"},"--bg-base-light":{light:[!1,!0],value:["#F7F8FA","#0D0D0F"],description:"Default light block background"},"--bg-elevated-01":{light:[!1,!0],value:["#FFFFFF","#1B1B1F"],description:"Default block background"},"--bg-elevated-02":{light:[!1,!0],value:["#E1E3EB","#2D2D33"],description:"Secondary block background"}}},filledSec:{title:"Filled",data:{"--filled-V-BG":{light:[!1,!0],value:["#D0F0C0","rgba(66, 184, 66, 0.40)"],description:"Text background selection on V-read"},"--filled-D-BG":{light:[!1,!0],value:["#FFCECC","rgba(229, 83, 229, 0.40)"],description:"Text background selection on D-read"},"--filled-N-BG":{light:[!1,!0],value:["#FAF5AA","rgba(83, 82, 102, 0.40)"],description:"Text background selection on C/N-read"},"--filled-J-BG":{light:[!1,!0],value:["#DEDBFF","rgba(132, 92, 255, 0.40)"],description:"Text background selection on J-read"}}},notificationSec:{title:"Notification",data:{"--notification-neutral":{light:[!1,!0],value:["linear-gradient(90deg, #D6D9FF 0%, #FFF 100%)","linear-gradient(90deg, #4D4D8F 0%, #292933 100%)"],description:"Background on neutral blocks"},"--notification-success":{light:[!1,!0],value:["linear-gradient(90deg, #C9F0B6 0%, #FFF 100%)","linear-gradient(90deg, #305C3E 0%, #292933 100%)"],description:"Background on success blocks"},"--notification-warning":{light:[!1,!0],value:["linear-gradient(90deg, #FEE0A3 0%, #FFF 100%)","linear-gradient(90deg, #754F2D 0%, #292933 100%)"],description:"Background on warning blocks"},"--notification-error":{light:[!1,!0],value:["linear-gradient(90deg, #FFB8B8 0%, #FFF 100%)","linear-gradient(90deg, #8F3343 0%, #292933 100%)"],description:"Background on error blocks"}}},gradientSec:{title:"Gradient",data:{"--gradient-blue-green":{light:[!0,!0],value:["linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand dark gradient"},"--gradient-green-lime":{light:[!1,!0],value:["linear-gradient(180deg, #A1E59C 0%, #D0F5B0 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand light gradient"},"--gradient-blue-violet":{light:[!1,!0],value:["linear-gradient(180deg, #ADB8FF 0%, #D6E9FF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand light gradient"},"--gradient-blue-clear":{light:[!1,!0],value:["linear-gradient(180deg, #85BEFF 0%, #CEF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-orange":{light:[!1,!0],value:["linear-gradient(180deg, #FFB766 0%, #FFEAA3 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-mint":{light:[!1,!0],value:["linear-gradient(180deg, #7DD1D1 0%, #C8FAE9 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-lime":{light:[!1,!0],value:["linear-gradient(180deg, #BFE062 0%, #E4FFAD 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-rose":{light:[!1,!0],value:["linear-gradient(0deg, #FFDDD6 0%, #FF99C9 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-red":{light:[!1,!0],value:["linear-gradient(0deg, #FFD5CC 0%, #FF9494 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-violet":{light:[!1,!0],value:["linear-gradient(180deg, #BCA3FF 0%, #E5E5FF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"}}}}}const JE=["add","arrow-down","arrow-left","arrow-link","arrow-right","arrow-up","box","calendar","caret-down","caret-left","caret-right","caret-up","cell-type-num","cell-type-txt","checkmark","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-up","clipboard-copied","clipboard","close","copy","data-dimentions","delete-bin","delete-circle","delete-clear","download","drag-dots","duplicate","edit","error","export","filter-on","filter","help-outline","help","info-outline","info","jump-link","link","loading","lock","maximize","minimize","minus","more","open","paper-clip","pause","play","renew","restart","reverse","settings","sort","stop","success","time","tune","warning","x-axis","y-axis","zip"],XE=["add-layer","add","align-center","align-left","align-right","annotate","annotation","area","arrow-down","arrow-left","arrow-link","arrow-right","arrow-up","axes","bar-cross","bar-error","bar-stacked","bar-trend","bar","bindot","box","boxplot-binned","boxplot-jitter","boxplot-notched","boxplot","bubble","calendar","canvas","cell-type-num","cell-type-txt","checkbox-checked","checkbox-intermediate","checkbox","checkmark","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-sort","chevron-up","clipboard-copied","clipboard","close","cloud-download","cloud-offline","cloud-online","cloud-upload","cluster","code","color-fill","color-none","color-stroke","color","columns","connected-points","container","cookie","copy","cpu","data-dimentions","debug","delete-bin","delete-circle","delete-clear","dendrogram-X-line","dendrogram-X","dendrogram-Y-line","dendrogram-Y","dna-add","dna-import","dna","download","drag-dots","drag-horizontal","drag-vertical","duplicate","edit","error-bar","error","expand-left","expand-right","export","file-doc-add","file-doc-download","file-doc-import","file-doc","filter-on","filter","fire-tips","folder-parent","frame-type-all","frame-type-bottom","frame-type-left-bottom","frame-type-left","frame-type-none","generate","graph","heatmap","help-outline","help","info-outline","info","jitter","jump-link","lasso","layers","learn","legend-box-dot","legend-box","legend","line-binned","line-error","line-jitter","line","linetype-dashed","linetype-dotdash","linetype-dotted","linetype-longdash","linetype-solid","linetype-twodash","link-disabled","link","loading","lock","maximize","menu","minimize","minus","more","paper-clip","pause","pin","play","position-bottom-annotation","position-bottom","position-left-annotation","position-left","position-right-annotation","position-right","position-top-annotation","position-top","product","publications","radio-button-checked","radio-button","renew","restart","reverse","rotation-0","rotation-45","rotation-90","search","server-on","server","settings","sina","skatterplot","slice","social-github","social-linkedin","social-twitter-X","social-twitter-bird","social-youtube","sort-list-down","sort-list-up","sort","statistics","stop","strip-plot","success","table-add","table-alias","table-import","table","template","terminal","text-align-center","text-align-left","text-align-right","theme-dark","theme-light","time","tune","venn","view-hide","view-show","violin-binned","violin-jitter","violin","warning","wetlab","windows-collapse","windows-expand","x-axis","y-axis","zip","zoom-in","zoom-out"],QE={allCssVariables:YE(),icons16:k1,icons24:KE},eT={class:"block__not-found"},tT=r.defineComponent({__name:"NotFound",setup(t){const n=el().useApp(),o=()=>{n.updateNavigationState(s=>{s.href="/"})};return(s,l)=>(r.openBlock(),r.createElementBlock("div",eT,[r.createElementVNode("h1",null,"Not found route: "+r.toDisplayString(r.unref(n).snapshot.navigationState.href),1),r.createVNode(r.unref(fl),{onClick:r.withModifiers(o,["stop"])},{default:r.withCtx(()=>l[0]||(l[0]=[r.createTextVNode("Return to main page")])),_:1})]))}}),Ns=(t,e)=>{const n=t.__vccOpts||t;for(const[o,s]of e)n[o]=s;return n},nT={},rT={class:"block__loader-page"};function oT(t,e){return r.openBlock(),r.createElementBlock("div",rT,e[0]||(e[0]=[r.createElementVNode("div",{class:"loader-container"},[r.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"})],-1)]))}const iT=Ns(nT,[["render",oT]]),sT={class:"pl-app-notification-alert"},aT={class:"pl-app-notification-alert__content"},lT={class:"pl-app-notification-alert__title"},cT=r.defineComponent({__name:"PlAppErrorNotificationAlert",props:{errors:{}},setup(t){const e=t,n=r.ref(!1),o=r.ref(!0),s=r.computed(()=>Object.entries(e.errors).filter(c=>!!c[1]));function l(){n.value=!0}return r.watch(()=>e.errors,c=>{o.value=Object.values(c).some(u=>!!u)},{immediate:!0,deep:!0}),(c,u)=>(r.openBlock(),r.createElementBlock("div",sT,[r.createVNode(r.unref(kl),{modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=p=>n.value=p),width:"720px",style:{"max-height":"100vh"}},{title:r.withCtx(()=>u[2]||(u[2]=[r.createTextVNode(" Errors ")])),default:r.withCtx(()=>[r.createElementVNode("div",aT,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,p=>{var f;return r.openBlock(),r.createElementBlock("div",{key:p[0],class:"pl-app-notification-alert__item"},[r.createElementVNode("div",lT,r.toDisplayString(p[0]),1),r.createVNode(r.unref(zu),{value:(f=p[1])==null?void 0:f.message},null,8,["value"])])}),128))])]),_:1},8,["modelValue"]),r.createVNode(r.unref(sp),{modelValue:o.value,"onUpdate:modelValue":u[1]||(u[1]=p=>o.value=p),type:"error",closable:""},{actions:r.withCtx(()=>[r.createVNode(r.unref(hl),{icon:"arrow-right",onClick:l},{default:r.withCtx(()=>u[3]||(u[3]=[r.createTextVNode("See errors")])),_:1}),r.createVNode(r.unref(Eu))]),default:r.withCtx(()=>[u[4]||(u[4]=r.createTextVNode(" Some outputs have errors. "))]),_:1},8,["modelValue"])]))}}),dT={key:0,class:"block__loader"},uT=r.defineComponent({__name:"BlockLoader",props:{value:{type:[Boolean,Number]}},setup(t){const e=t,n=r.computed(()=>typeof e.value=="boolean"&&e.value),o=r.computed(()=>{const s=e.value;if(typeof s=="number")return s>=1?void 0:(s*100).toFixed(2)+"%"});return(s,l)=>n.value?(r.openBlock(),r.createElementBlock("div",dT)):o.value!==void 0?(r.openBlock(),r.createElementBlock("div",{key:1,class:"block__progress",style:r.normalizeStyle({"--progress-width":o.value})},null,4)):r.createCommentVNode("",!0)}}),pT={class:"block block__layout"},hT={key:0},fT=r.defineComponent({__name:"BlockLayout",setup(t){const e=el(),n=f=>{try{return new URL(f,"http://dummy").pathname}catch{console.error("Invalid href",f);return}},o=r.computed(()=>e.loaded?e.useApp().href:void 0),s=r.computed(()=>{if(e.loaded){const f=e.useApp(),m=n(f.snapshot.navigationState.href);return m?f.getRoute(m):void 0}}),l=r.computed(()=>e.loaded?e.useApp():void 0),c=r.computed(()=>l.value?l.value.model.outputErrors:{}),u=r.computed(()=>{var f;return((f=l.value)==null?void 0:f.showErrorsNotification)??!0}),p=r.computed(()=>{var f,m;return(m=(f=l.value)==null?void 0:f.progress)==null?void 0:m.call(f)});return(f,m)=>(r.openBlock(),r.createElementBlock("div",pT,[r.createVNode(uT,{value:p.value},null,8,["value"]),r.unref(e).error?(r.openBlock(),r.createElementBlock("div",hT,r.toDisplayString(r.unref(e).error),1)):r.unref(e).loaded?s.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(s.value),{key:o.value})):(r.openBlock(),r.createBlock(tT,{key:3})):(r.openBlock(),r.createBlock(iT,{key:1},{default:r.withCtx(()=>m[0]||(m[0]=[r.createTextVNode("Loading...")])),_:1})),r.unref(e).loaded&&u.value?(r.openBlock(),r.createBlock(r.unref(cT),{key:4,errors:c.value},null,8,["errors"])):r.createCommentVNode("",!0)]))}});var As={exports:{}};/**
|
|
65
|
+
)`}function l(){const u=t.value;if(!u)return;const p=[o(u),s(u)].filter(f=>f!==null);u.style.setProperty("-webkit-mask-image",p.join(",")),u.style.setProperty("mask-image",p.join(",")),p.length>1&&(u.style.setProperty("-webkit-mask-composite","source-in"),u.style.setProperty("mask-composite","source-in"))}const c=pl(l);r.onMounted(l),rt(window,"scroll",c,!0),rt(window,"resize",c,!0)}function fp(t,e){Au(()=>{ct(r.unref(t),n=>{Pu(n,()=>e(n))})}),r.onUnmounted(()=>{ct(r.unref(t),n=>{Du(n)})})}const Cr={item:"sortable__item",animate:"sortable__animate"},Ri=t=>t.getBoundingClientRect().y,mp=t=>{const{y:e,height:n}=t.getBoundingClientRect();return e+Math.ceil(n/2)},VS=t=>{const{y:e,height:n}=t.getBoundingClientRect();return e+n};function gp(t,e){const n={item:void 0,options(){var B;return[...((B=t.value)==null?void 0:B.children)??[]]}},o=r.computed(()=>n.options()),s=e.shakeBuffer??10,l=e.reorderDelay??100;function c(B){const A=e.handle?this.querySelector(e.handle):null;A&&(A&&!A.contains(B.target)||(this.classList.remove(Cr.animate),this.classList.add(Cr.item),n.item={el:this,y:B.y,dy:0,orderChanged:!1}))}function u(B){const A=n.options();return A.slice(0,A.indexOf(B))}function p(B){const A=n.options();return A.slice(A.indexOf(B)+1)}function f(B,A){const I=n.options().filter(C=>C!==A),L=I.indexOf(B);return I.splice(L,0,A),I}function m(B,A){const I=n.options().filter(C=>C!==A),L=I.indexOf(B);return I.splice(L+1,0,A),I}function y(B,A){B.dy=A-B.y,B.el.style.setProperty("transform",`translateY(${B.dy}px)`)}function T(B){var A;if(!n.item)return;const{el:I}=n.item;if(!I.isConnected){n.item=void 0;return}const L=B.map(U=>Ri(U)),C=Ri(I);(A=t.value)==null||A.replaceChildren(...B);const R=Ri(I),O=B.map(U=>Ri(U)),F=[];for(let U=0;U<O.length;U++){const te=B[U];if(te===n.item.el)continue;const j=O[U],Y=L[U]-j;te.style.transform=`translateY(${Y}px)`,F.push(te)}const N=R-C;n.item.y=n.item.y+N,n.item.dy=n.item.dy-N,n.item.orderChanged=!0,n.item.el.style.setProperty("transform",`translateY(${n.item.dy}px)`),F.forEach(U=>U.classList.remove(Cr.animate)),requestAnimationFrame(function(){F.forEach(U=>{U.classList.add(Cr.animate),U.style.transform="",U.addEventListener("transitionend",()=>{U.classList.remove(Cr.animate)})})})}rt(window,"mousemove",B=>{if(!n.item)return;const{el:A}=n.item;y(n.item,B.y);const I=Ri(n.item.el),L=VS(n.item.el),C=u(A),R=p(A);C.forEach(O=>{const F=mp(O);I+s<F&&T(f(O,A))}),R.forEach(O=>{const F=mp(O);L-s>F&&T(m(O,A))})}),rt(window,"mouseup",()=>{if(!n.item)return;const{el:B,orderChanged:A}=n.item;B.classList.add(Cr.animate),B.style.removeProperty("transform"),B.addEventListener("transitionend",()=>{B.classList.remove(Cr.animate,Cr.item)}),setTimeout(()=>{if(!A)return;const I=n.options().map(C=>Number(C.getAttribute("data-index"))),L=t.value;if(L){for(const C of n.options())L.removeChild(C);o.value.forEach(C=>{L.appendChild(C)})}e.onChange(I)},l),n.item=void 0}),r.watchEffect(()=>{o.value.forEach((B,A)=>{B.removeEventListener("mousedown",c),B.addEventListener("mousedown",c),B.setAttribute("data-index",String(A))})})}function NS(t,e){let n;r.onMounted(()=>{n=setInterval(t,e)}),r.onUnmounted(()=>clearInterval(n))}function AS(t,e,n){const o=r.reactive({data:sl.deepClone(e(t.value)),changed:!1});return r.watch(()=>o.data,s=>{o.changed?n(sl.deepClone(s)):o.changed=!0},{deep:!0}),r.watch(t,s=>{Object.assign(o,{data:sl.deepClone(e(s)),changed:!1})},{deep:!0,immediate:!0}),o}function PS(t){const e=r.reactive({isLoading:!1,result:void 0,error:void 0,async run(...n){this.isLoading=!0,this.error=void 0;try{this.result=await t(...n)}catch(o){this.error=o}finally{this.isLoading=!1}},debounce(n,o=1e3){return rv(()=>{const s=n();this.run(...s).catch(console.error)},o)}});return e.run=e.run.bind(e),e}function DS(t,e){function n(c,u){const p=r.unref(t);if(!p)return;const f=`translate(${u.x-c.x}px, ${u.y-c.y}px)`;p.style.setProperty("transform",f),e(u)}function o(c){const u=p=>n(c,p);document.addEventListener("mousemove",u),document.addEventListener("mouseup",()=>{const p=r.unref(t);document.removeEventListener("mousemove",u),p&&(p.style.setProperty("transition","all .3s ease-in-out"),p.style.removeProperty("transform"),p.addEventListener("transitionend",()=>{p.style.removeProperty("transition")}))},{once:!0})}function s(){var c;(c=r.unref(t))==null||c.addEventListener("mousedown",o)}function l(){var c;(c=r.unref(t))==null||c.removeEventListener("mousedown",o)}r.onMounted(s),r.onUnmounted(l)}const FS={class:"ui-slider__wrapper"},RS={class:"ui-slider__label-section"},MS={key:0,class:"text-s"},IS={class:"ui-slider__base"},OS={class:"ui-slider__container"},LS={class:"ui-slider__container ui-slider__container-thumb"},GS=["data-percent"],zS=["data-percent"],$S=["data-percent"],US={key:0,class:"ui-slider__error"},ZS=r.defineComponent({__name:"SliderRangeTriple",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:"%"},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=t,l=r.reactive({deltaValue1:0,deltaValue2:0,deltaValue3:0}),c=r.ref(),u=r.ref(),p=r.ref(),f=r.ref(),m=r.computed(()=>s.max-s.min),y=r.computed(()=>s),T=Fl(y),B=r.computed(()=>bt((s.modelValue[0]??0)+l.deltaValue1,s.min,s.max)),A=r.computed(()=>bt((s.modelValue[1]??0)+l.deltaValue2,s.min,s.max)),I=r.computed(()=>bt((s.modelValue[2]??0)+l.deltaValue3,s.min,s.max)),L=r.computed(()=>{const k=s.modelValue;if(!(Array.isArray(k)&&k.length===3&&k.every(Q=>Number.isFinite(Q))))return"Expected model [number, number, number]";const $=[];return[...s.modelValue].forEach(Q=>{Q>s.max&&$.push(`Max model value must be lower than max props ${s.max}.`),Q<s.min&&$.push("Min model value must be greater than max props.")}),$.length>0?$.join(" "):s.error}),C=r.computed(()=>(B.value-s.min)/m.value),R=r.computed(()=>(A.value-s.min)/m.value),O=r.computed(()=>(I.value-s.min)/m.value),F=r.computed(()=>q()),N=r.computed(()=>({right:F.value[0]+"%",left:100-F.value[2]+"%"})),U=r.computed(()=>({right:Math.ceil((1-C.value)*100)+"%"})),te=r.computed(()=>({right:Math.ceil((1-R.value)*100)+"%"})),j=r.computed(()=>({right:Math.ceil((1-O.value)*100)+"%"}));ur(u,k=>{var $;ct(($=r.unref(c))==null?void 0:$.getBoundingClientRect(),Q=>{const{dx:ne}=k;l.deltaValue1=ne/Q.width*m.value,u.value&&Y(u.value,s.modelValue[0],l.deltaValue1),k.stop&&(G([ee(B.value),ee(A.value),ee(I.value)]),l.deltaValue1=0)})}),ur(p,k=>{var $;ct(($=r.unref(c))==null?void 0:$.getBoundingClientRect(),Q=>{const{dx:ne}=k;l.deltaValue2=ne/Q.width*m.value,p.value&&Y(p.value,s.modelValue[1],l.deltaValue2),k.stop&&(G([ee(B.value),ee(A.value),ee(I.value)]),l.deltaValue2=0)})}),ur(f,k=>{var $;ct(($=r.unref(c))==null?void 0:$.getBoundingClientRect(),Q=>{const{dx:ne}=k;l.deltaValue3=ne/Q.width*m.value,f.value&&Y(f.value,s.modelValue[2],l.deltaValue3),k.stop&&(G([ee(B.value),ee(A.value),ee(I.value)]),l.deltaValue3=0)})});function Y(k,$,Q){const ne=ee(bt(($??0)+Q,s.min,s.max));k.dataset.percent=`${ne}${s.measure}`,S()}function q(){const k=Math.ceil((1-C.value)*100),$=Math.ceil((1-R.value)*100),Q=Math.ceil((1-O.value)*100);return[k,$,Q].sort((ne,be)=>ne-be)}function ee(k){const $=bt(k,s.min,s.max);return Math.round(($+Number.EPSILON)*(1/s.step))/(1/s.step)}function G(k){o("update:modelValue",k)}function S(){const k=Number(U.value.right.substring(0,U.value.right.length-1)),$=Number(te.value.right.substring(0,te.value.right.length-1)),Q=Number(j.value.right.substring(0,j.value.right.length-1)),ne=[{r:k,th:u},{r:$,th:p},{r:Q,th:f}].sort((be,$e)=>be.r-$e.r);ne[0].th.value&&(ne[0].th.value.dataset.hint="high"),ne[1].th.value&&(ne[1].th.value.dataset.hint="mid"),ne[2].th.value&&(ne[2].th.value.dataset.hint="low")}function w(k,$){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(k.code)&&k.preventDefault();const Q=k.code==="ArrowUp"||k.code==="ArrowRight"?s.step*1:k.code==="ArrowDown"||k.code==="ArrowLeft"?s.step*-1:0,ne=[...s.modelValue];ne[$]=bt(ne[$]+Q,s.min,s.max),G(ne),S()}return r.onMounted(()=>{S()}),(k,$)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([s.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope ui-slider__triple"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${s.mode}`,"ui-slider"])},[r.createElementVNode("div",FS,[r.createElementVNode("div",RS,[k.label?(r.openBlock(),r.createElementBlock("label",MS,[r.createElementVNode("span",null,r.toDisplayString(k.label),1),$[3]||($[3]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(k.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)]),$[11]||($[11]=r.createTextVNode()),r.createElementVNode("div",IS,[r.createElementVNode("div",OS,[r.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(N.value)},null,4)],512)]),$[10]||($[10]=r.createTextVNode()),r.createElementVNode("div",LS,[s.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(T),(Q,ne)=>(r.openBlock(),r.createElementBlock("div",{key:ne,style:r.normalizeStyle({right:`${Q}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),$[7]||($[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef1",ref:u,style:r.normalizeStyle(U.value),"data-percent":s.modelValue[0]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r1:"",tabindex:"0",onKeydown:$[0]||($[0]=Q=>w(Q,0))},$[4]||($[4]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,GS),$[8]||($[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:r.normalizeStyle(te.value),"data-percent":s.modelValue[1]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r2:"",tabindex:"0",onKeydown:$[1]||($[1]=Q=>w(Q,1))},$[5]||($[5]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,zS),$[9]||($[9]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef3",ref:f,style:r.normalizeStyle(j.value),"data-percent":s.modelValue[2]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r3:"",tabindex:"0",onKeydown:$[2]||($[2]=Q=>w(Q,2))},$[6]||($[6]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,$S)])])]),$[12]||($[12]=r.createTextVNode()),$[13]||($[13]=r.createElementVNode("div",{class:"ui-slider__input-wrapper d-flex"},null,-1))],2),$[14]||($[14]=r.createTextVNode()),L.value?(r.openBlock(),r.createElementBlock("div",US,r.toDisplayString(L.value),1)):r.createCommentVNode("",!0)],2))}}),WS={class:"ui-input-range__separator"},HS=r.defineComponent({__name:"InputRange",props:{modelValue:{},separator:{default:"-"}},emits:["update:modelValue","change"],setup(t,{emit:e}){const n=t,o=e,s=r.reactive({left:n.modelValue[0],right:n.modelValue[1]}),l=r.ref(!1),c=r.computed(()=>(l.value,"ui-input-range-focused")),u=r.computed({get(){return{left:Math.min(...n.modelValue),right:Math.max(...n.modelValue)}},set(){}});r.watch(()=>u.value,m=>(s.left=m.left)&&(s.right=m.right));function p(){o("update:modelValue",[+s.left,+s.right]),o("change",[+s.left,+s.right])}function f(m,y){const T=y.target.value;/^[0-9]{0,2}$/.test(T)?m?s.left=+T:s.right=+T:m?s.left=+T.slice(0,T.length-1):s.right=+T.slice(0,T.length-1)}return(m,y)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({class:[c.value,"ui-input-range"]},m.$attrs),[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":y[0]||(y[0]=T=>u.value.left=T),class:"text-s",type:"text",onChange:p,onFocus:y[1]||(y[1]=T=>l.value=!0),onFocusout:y[2]||(y[2]=T=>l.value=!1),onInput:y[3]||(y[3]=T=>f(!0,T))},null,544),[[r.vModelText,u.value.left]]),y[8]||(y[8]=r.createTextVNode()),r.createElementVNode("div",WS,r.toDisplayString(n.separator),1),y[9]||(y[9]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":y[4]||(y[4]=T=>u.value.right=T),class:"text-s",type:"text",onChange:p,onFocus:y[5]||(y[5]=T=>l.value=!0),onFocusout:y[6]||(y[6]=T=>l.value=!1),onInput:y[7]||(y[7]=T=>f(!1,T))},null,544),[[r.vModelText,u.value.right]])],16))}}),jS={class:"ui-slider__wrapper"},qS={class:"ui-slider__label-section"},KS={key:0,class:"text-s"},YS={key:1,class:"ui-slider__value-static text-s"},JS={class:"ui-slider__base"},XS={class:"ui-slider__container"},QS={class:"ui-slider__container ui-slider__container-thumb"},e1={class:"ui-slider__input-wrapper d-flex"},t1={key:0,class:"ui-slider__error"},n1=r.defineComponent({__name:"SliderRange",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:""},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=t,l=r.reactive({deltaValue1:0,deltaValue2:0}),c=r.ref(),u=r.ref(),p=r.ref(),f=r.ref(s.modelValue),m=r.ref(s.modelValue[0]),y=r.ref(s.modelValue[1]),T=r.computed(()=>s),B=Fl(T),A=r.computed(()=>[m.value,y.value].sort((S,w)=>S-w).join("-")),I=r.computed(()=>s.max-s.min),L=r.computed(()=>bt((s.modelValue[0]??0)+l.deltaValue1,s.min,s.max)),C=r.computed(()=>bt((s.modelValue[1]??0)+l.deltaValue2,s.min,s.max)),R=r.computed(()=>{const S=s.modelValue;return Array.isArray(S)&&S.length===2&&S.every(w=>Number.isFinite(w))?s.error:"Expected model [number, number]"}),O=r.computed(()=>(L.value-s.min)/I.value),F=r.computed(()=>(C.value-s.min)/I.value),N=r.computed(()=>Y()),U=r.computed(()=>({right:N.value[0]+"%",left:100-N.value[1]+"%"})),te=r.computed(()=>({right:Math.ceil((1-O.value)*100)+"%"})),j=r.computed(()=>({right:Math.ceil((1-F.value)*100)+"%"}));r.watch(()=>s.modelValue,S=>{f.value=S,m.value=+S[0],y.value=+S[1]},{immediate:!0}),ur(u,S=>{var w;ct((w=r.unref(c))==null?void 0:w.getBoundingClientRect(),k=>{const{dx:$}=S;l.deltaValue1=$/k.width*I.value,m.value=q(bt((s.modelValue[0]??0)+l.deltaValue1,s.min,s.max)),f.value=[m.value,y.value].sort((Q,ne)=>Q-ne),S.stop&&(ee([q(L.value),q(C.value)]),l.deltaValue1=0)})}),ur(p,S=>{var w;ct((w=r.unref(c))==null?void 0:w.getBoundingClientRect(),k=>{const{dx:$}=S;l.deltaValue2=$/k.width*I.value,y.value=q(bt((s.modelValue[1]??0)+l.deltaValue2,s.min,s.max)),f.value=[m.value,y.value].sort((Q,ne)=>Q-ne),S.stop&&(ee([q(L.value),q(C.value)]),l.deltaValue2=0)})});function Y(){const S=Math.ceil((1-O.value)*100),w=Math.ceil((1-F.value)*100);return[S,w].sort((k,$)=>k-$)}function q(S){const w=bt(S,s.min,s.max);return Math.round((w+Number.EPSILON)*(1/s.step))/(1/s.step)}function ee(S){o("update:modelValue",S)}function G(S,w){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(S.code)&&S.preventDefault();const k=S.code==="ArrowUp"||S.code==="ArrowRight"?s.step*1:S.code==="ArrowDown"||S.code==="ArrowLeft"?s.step*-1:0,$=[...s.modelValue];$[w]=bt($[w]+k,s.min,s.max),ee($)}return(S,w)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([s.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${s.mode}`,"ui-slider"])},[r.createElementVNode("div",jS,[r.createElementVNode("div",qS,[S.label?(r.openBlock(),r.createElementBlock("label",KS,[r.createElementVNode("span",null,r.toDisplayString(S.label),1),w[3]||(w[3]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(S.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),w[4]||(w[4]=r.createTextVNode()),s.mode==="text"?(r.openBlock(),r.createElementBlock("div",YS,r.toDisplayString(A.value),1)):r.createCommentVNode("",!0)]),w[10]||(w[10]=r.createTextVNode()),r.createElementVNode("div",JS,[r.createElementVNode("div",XS,[r.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(U.value)},null,4)],512)]),w[9]||(w[9]=r.createTextVNode()),r.createElementVNode("div",QS,[s.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(B),(k,$)=>(r.openBlock(),r.createElementBlock("div",{key:$,style:r.normalizeStyle({right:`${k}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),w[7]||(w[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef1",ref:u,style:r.normalizeStyle(te.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:w[0]||(w[0]=k=>G(k,0))},w[5]||(w[5]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36),w[8]||(w[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:r.normalizeStyle(j.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:w[1]||(w[1]=k=>G(k,1))},w[6]||(w[6]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),w[11]||(w[11]=r.createTextVNode()),r.createElementVNode("div",e1,[s.mode==="input"?(r.openBlock(),r.createBlock(HS,{key:0,modelValue:f.value,"onUpdate:modelValue":w[2]||(w[2]=k=>f.value=k),class:"ui-focused-border",onChange:ee},null,8,["modelValue"])):r.createCommentVNode("",!0)])],2),w[12]||(w[12]=r.createTextVNode()),R.value?(r.openBlock(),r.createElementBlock("div",t1,r.toDisplayString(R.value),1)):r.createCommentVNode("",!0)],2))}}),r1=r.defineComponent({__name:"VScroll",props:{scrollTop:{},clientHeight:{},scrollHeight:{}},emits:["update:scrollTop"],setup(t,{emit:e}){const n=e,o=t,s=r.ref(),l=r.computed(()=>o.clientHeight/(o.scrollHeight||1)),c=r.computed(()=>l.value<1),u=r.computed(()=>{const p=r.unref(l);return{top:o.scrollTop*p+"px",height:Math.floor(o.clientHeight*p)+"px"}});return rt(s,"pointerdown",p=>{const f={clientY:p.clientY},m=bl(document,"mousemove",y=>{const T=(y.clientY-f.clientY)/l.value;n("update:scrollTop",o.scrollTop+T),f.clientY=y.clientY});["mouseup","pointercancel"].forEach(y=>{document.addEventListener(y,m,{once:!0})})}),(p,f)=>c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:s,class:"v-scroll"},[r.createElementVNode("div",{class:"v-scroll__scrollbar",style:r.normalizeStyle(u.value)},null,4)],512)):r.createCommentVNode("",!0)}}),o1=r.defineComponent({__name:"HScroll",props:{scrollLeft:{},clientWidth:{},scrollWidth:{}},emits:["update:scrollLeft"],setup(t,{emit:e}){const n=e,o=t,s=r.ref(),l=r.computed(()=>o.clientWidth/(o.scrollWidth||1)),c=r.computed(()=>l.value<1),u=r.computed(()=>{const p=r.unref(l);return{left:o.scrollLeft*p+"px",width:Math.floor(o.clientWidth*p)+"px"}});return rt(s,"pointerdown",p=>{const f={clientX:p.clientX},m=bl(document,"mousemove",y=>{const T=(y.clientX-f.clientX)/l.value;n("update:scrollLeft",o.scrollLeft+T),f.clientX=y.clientX});["mouseup","pointercancel"].forEach(y=>{document.addEventListener(y,m,{once:!0})})}),(p,f)=>c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:s,class:"h-scroll"},[r.createElementVNode("div",{class:"h-scroll__scrollbar",style:r.normalizeStyle(u.value)},null,4)],512)):r.createCommentVNode("",!0)}}),i1={class:"ui-scrollable"},s1=r.defineComponent({__name:"Scrollable",setup(t){const e=r.ref(),n=r.reactive({scrollTop:0,scrollLeft:0,clientHeight:0,clientWidth:0,scrollHeight:0,scrollWidth:0});function o(u){c0(n,u,"scrollTop","scrollLeft","clientHeight","clientWidth","scrollHeight","scrollWidth")}const s=u=>{u.preventDefault();const p=u.currentTarget;p.scrollTop+=u.deltaY,p.scrollLeft+=u.deltaX,o(p)};function l(u){ct(r.unref(e),p=>{p.scrollTop=u,o(p)})}function c(u){ct(r.unref(e),p=>{p.scrollLeft=u,o(p)})}return fp(e,u=>{ct(u,p=>o(p))}),r.onMounted(()=>{ct(r.unref(e),u=>{o(u),u.addEventListener("wheel",s)})}),r.onUnmounted(()=>{ct(r.unref(e),u=>u.removeEventListener("wheel",s))}),(u,p)=>(r.openBlock(),r.createElementBlock("div",i1,[r.createElementVNode("div",{ref_key:"containerRef",ref:e,class:"ui-scrollable__container",onWheel:s},[r.renderSlot(u.$slots,"default")],544),p[2]||(p[2]=r.createTextVNode()),r.createVNode(r1,{"scroll-top":n.scrollTop,"client-height":n.clientHeight,"scroll-height":n.scrollHeight,onWheel:p[0]||(p[0]=r.withModifiers(()=>{},["stop"])),"onUpdate:scrollTop":l},null,8,["scroll-top","client-height","scroll-height"]),p[3]||(p[3]=r.createTextVNode()),r.createVNode(o1,{"scroll-left":n.scrollLeft,"client-width":n.clientWidth,"scroll-width":n.scrollWidth,onWheel:p[1]||(p[1]=r.withModifiers(()=>{},["stop"])),"onUpdate:scrollLeft":c},null,8,["scroll-left","client-width","scroll-width"])]))}}),a1="add.svg",l1="box.svg",c1="calendar.svg",d1="checkmark.svg",u1="clipboard.svg",p1="close.svg",h1="copy.svg",f1="download.svg",m1="duplicate.svg",g1="edit.svg",y1="error.svg",_1="filter.svg",v1="help.svg",C1="info.svg",w1="link.svg",b1="loading.svg",x1="lock.svg",k1="maximize.svg",S1="minimize.svg",E1="minus.svg",T1="more.svg",B1="open.svg",V1="pause.svg",N1="play.svg",A1="renew.svg",P1="restart.svg",D1="reverse.svg",F1="settings.svg",R1="sort.svg",M1="stop.svg",I1="success.svg",O1="time.svg",L1="tune.svg",G1="warning.svg",z1="zip.svg",$1={add:a1,"arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-link":"arrow-link.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg",box:l1,calendar:c1,"caret-down":"caret-down.svg","caret-left":"caret-left.svg","caret-right":"caret-right.svg","caret-up":"caret-up.svg","cell-type-num":"cell-type-num.svg","cell-type-txt":"cell-type-txt.svg",checkmark:d1,"chevron-down":"chevron-down.svg","chevron-first":"chevron-first.svg","chevron-last":"chevron-last.svg","chevron-left":"chevron-left.svg","chevron-right":"chevron-right.svg","chevron-up":"chevron-up.svg","clipboard-copied":"clipboard-copied.svg",clipboard:u1,close:p1,copy:h1,"data-dimentions":"data-dimentions.svg","delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg",download:f1,"drag-dots":"drag-dots.svg",duplicate:m1,edit:g1,error:y1,export:"export.svg","filter-on":"filter-on.svg",filter:_1,"help-outline":"help-outline.svg",help:v1,"info-outline":"info-outline.svg",info:C1,"jump-link":"jump-link.svg",link:w1,loading:b1,lock:x1,maximize:k1,minimize:S1,minus:E1,more:T1,open:B1,"paper-clip":"paper-clip.svg",pause:V1,play:N1,renew:A1,restart:P1,reverse:D1,settings:F1,sort:R1,stop:M1,success:I1,time:O1,tune:L1,warning:G1,"x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:z1},U1="add.svg",Z1="annotate.svg",W1="annotation.svg",H1="area.svg",j1="axes.svg",q1="bar.svg",K1="bindot.svg",Y1="box.svg",J1="boxplot.svg",X1="bubble.svg",Q1="calendar.svg",eE="canvas.svg",tE="checkbox.svg",nE="checkmark.svg",rE="clipboard.svg",oE="close.svg",iE="cluster.svg",sE="code.svg",aE="color.svg",lE="columns.svg",cE="container.svg",dE="cookie.svg",uE="copy.svg",pE="cpu.svg",hE="debug.svg",fE="dna.svg",mE="download.svg",gE="duplicate.svg",yE="edit.svg",_E="error.svg",vE="filter.svg",CE="generate.svg",wE="graph.svg",bE="heatmap.svg",xE="help.svg",kE="info.svg",SE="jitter.svg",EE="lasso.svg",TE="layers.svg",BE="learn.svg",VE="legend.svg",NE="line.svg",AE="link.svg",PE="loading.svg",DE="lock.svg",FE="maximize.svg",RE="menu.svg",ME="minimize.svg",IE="minus.svg",OE="more.svg",LE="pause.svg",GE="pin.svg",zE="play.svg",$E="product.svg",UE="publications.svg",ZE="renew.svg",WE="restart.svg",HE="reverse.svg",jE="search.svg",qE="server.svg",KE="settings.svg",YE="sina.svg",JE="skatterplot.svg",XE="slice.svg",QE="sort.svg",eT="statistics.svg",tT="stop.svg",nT="success.svg",rT="table.svg",oT="template.svg",iT="terminal.svg",sT="time.svg",aT="tune.svg",lT="venn.svg",cT="violin.svg",dT="warning.svg",uT="wetlab.svg",pT="zip.svg",hT={"add-layer":"add-layer.svg",add:U1,"align-center":"align-center.svg","align-left":"align-left.svg","align-right":"align-right.svg",annotate:Z1,annotation:W1,area:H1,"arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-link":"arrow-link.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg",axes:j1,"bar-cross":"bar-cross.svg","bar-error":"bar-error.svg","bar-stacked":"bar-stacked.svg","bar-trend":"bar-trend.svg",bar:q1,bindot:K1,box:Y1,"boxplot-binned":"boxplot-binned.svg","boxplot-jitter":"boxplot-jitter.svg","boxplot-notched":"boxplot-notched.svg",boxplot:J1,bubble:X1,calendar:Q1,canvas:eE,"cell-type-num":"cell-type-num.svg","cell-type-txt":"cell-type-txt.svg","checkbox-checked":"checkbox-checked.svg","checkbox-intermediate":"checkbox-intermediate.svg",checkbox:tE,checkmark:nE,"chevron-down":"chevron-down.svg","chevron-first":"chevron-first.svg","chevron-last":"chevron-last.svg","chevron-left":"chevron-left.svg","chevron-right":"chevron-right.svg","chevron-sort":"chevron-sort.svg","chevron-up":"chevron-up.svg","clipboard-copied":"clipboard-copied.svg",clipboard:rE,close:oE,"cloud-download":"cloud-download.svg","cloud-offline":"cloud-offline.svg","cloud-online":"cloud-online.svg","cloud-upload":"cloud-upload.svg",cluster:iE,code:sE,"color-fill":"color-fill.svg","color-none":"color-none.svg","color-stroke":"color-stroke.svg",color:aE,columns:lE,"connected-points":"connected-points.svg",container:cE,cookie:dE,copy:uE,cpu:pE,"data-dimentions":"data-dimentions.svg",debug:hE,"delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg","dendrogram-X-line":"dendrogram-X-line.svg","dendrogram-X":"dendrogram-X.svg","dendrogram-Y-line":"dendrogram-Y-line.svg","dendrogram-Y":"dendrogram-Y.svg","dna-add":"dna-add.svg","dna-import":"dna-import.svg",dna:fE,download:mE,"drag-dots":"drag-dots.svg","drag-horizontal":"drag-horizontal.svg","drag-vertical":"drag-vertical.svg",duplicate:gE,edit:yE,"error-bar":"error-bar.svg",error:_E,"expand-left":"expand-left.svg","expand-right":"expand-right.svg",export:"export.svg","file-doc-add":"file-doc-add.svg","file-doc-download":"file-doc-download.svg","file-doc-import":"file-doc-import.svg","file-doc":"file-doc.svg","filter-on":"filter-on.svg",filter:vE,"fire-tips":"fire-tips.svg","folder-parent":"folder-parent.svg","frame-type-all":"frame-type-all.svg","frame-type-bottom":"frame-type-bottom.svg","frame-type-left-bottom":"frame-type-left-bottom.svg","frame-type-left":"frame-type-left.svg","frame-type-none":"frame-type-none.svg",generate:CE,graph:wE,heatmap:bE,"help-outline":"help-outline.svg",help:xE,"info-outline":"info-outline.svg",info:kE,jitter:SE,"jump-link":"jump-link.svg",lasso:EE,layers:TE,learn:BE,"legend-box-dot":"legend-box-dot.svg","legend-box":"legend-box.svg",legend:VE,"line-binned":"line-binned.svg","line-error":"line-error.svg","line-jitter":"line-jitter.svg",line:NE,"linetype-dashed":"linetype-dashed.svg","linetype-dotdash":"linetype-dotdash.svg","linetype-dotted":"linetype-dotted.svg","linetype-longdash":"linetype-longdash.svg","linetype-solid":"linetype-solid.svg","linetype-twodash":"linetype-twodash.svg","link-disabled":"link-disabled.svg",link:AE,loading:PE,lock:DE,maximize:FE,menu:RE,minimize:ME,minus:IE,more:OE,"paper-clip":"paper-clip.svg",pause:LE,pin:GE,play:zE,"position-bottom-annotation":"position-bottom-annotation.svg","position-bottom":"position-bottom.svg","position-left-annotation":"position-left-annotation.svg","position-left":"position-left.svg","position-right-annotation":"position-right-annotation.svg","position-right":"position-right.svg","position-top-annotation":"position-top-annotation.svg","position-top":"position-top.svg",product:$E,publications:UE,"radio-button-checked":"radio-button-checked.svg","radio-button":"radio-button.svg",renew:ZE,restart:WE,reverse:HE,"rotation-0":"rotation-0.svg","rotation-45":"rotation-45.svg","rotation-90":"rotation-90.svg",search:jE,"server-on":"server-on.svg",server:qE,settings:KE,sina:YE,skatterplot:JE,slice:XE,"social-github":"social-github.svg","social-linkedin":"social-linkedin.svg","social-twitter-X":"social-twitter-X.svg","social-twitter-bird":"social-twitter-bird.svg","social-youtube":"social-youtube.svg","sort-list-down":"sort-list-down.svg","sort-list-up":"sort-list-up.svg",sort:QE,statistics:eT,stop:tT,"strip-plot":"strip-plot.svg",success:nT,"table-add":"table-add.svg","table-alias":"table-alias.svg","table-import":"table-import.svg",table:rT,template:oT,terminal:iT,"text-align-center":"text-align-center.svg","text-align-left":"text-align-left.svg","text-align-right":"text-align-right.svg","theme-dark":"theme-dark.svg","theme-light":"theme-light.svg",time:sT,tune:aT,venn:lT,"view-hide":"view-hide.svg","view-show":"view-show.svg","violin-binned":"violin-binned.svg","violin-jitter":"violin-jitter.svg",violin:cT,warning:dT,wetlab:uT,"windows-collapse":"windows-collapse.svg","windows-expand":"windows-expand.svg","x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:pT,"zoom-in":"zoom-in.svg","zoom-out":"zoom-out.svg"};function fT(){return{txtSec:{title:"Text",data:{"--txt-00":{light:[!1,!1],value:["#FFFFFF","#FFFFFF"],description:"Text on the colored elements"},"--txt-01":{light:[!0,!1],value:["#110529","#FFFFFF"],description:"Primary text layer"},"--txt-02":{light:[!0,!1],value:["#231842","#ADAEB8"],description:"Secondary text layer - large arrays of text"},"--txt-03":{light:[!0,!0],value:["#9D9EAE","#60616B"],description:"Tetritary text layer - hints and descriptions"},"--txt-mask":{light:[!1,!0],value:["#CFD1DB","#3D3D42"],description:"Text mask in inputs, icons, etc."},"--txt-focus":{light:[!0,!0],value:["#07AD3E","#87E087"],description:"Colored text in active/focus elements"},"--txt-error":{light:[!0,!0],value:["#F1222F","#FF5C5C"],description:"Colored text in error elements"},"--txt-link":{light:[!0,!0],value:["#5F31CC","#9470FF"],description:"Colored text in links"}}},iconSec:{title:"Icon",data:{"--ic-00":{light:[!1,!1],value:["#FFFFFF","#FFFFFF"],description:"Icons on colored elements"},"--ic-01":{light:[!0,!1],value:["#110529","#FFFFFF"],description:"Primary elements"},"--ic-02":{light:[!1,!0],value:["#CFD1DB","#60616B"],description:"Secondary & tetritary elements"},"--ic-accent":{light:[!0,!1],value:["#07AD3E","#87E087"],description:"Focus/active elements"}}},borderSec:{title:"Border",data:{"--border-color-default":{light:[!0,!0],value:["#110529","#60616B"],description:"Main border for components"},"--border-color-hover":{light:[!0,!0],value:["#231842","#ADAEB8"],description:"Hover on main border"},"--border-color-focus":{light:[!1,!1],value:["#49CC49","#49CC49"],description:"Active border for components"},"--border-color-error":{light:[!1,!1],value:["#FF5C5C","#FF5C5C"],description:"Error border for components"},"--border-color-div-grey":{light:[!1,!0],value:["#E1E3EB","#232329"],description:"Divider lines low contrast"},"--border-color-div-bw":{light:[!1,!0],value:["#FFFFFF","#000000"],description:"Divider lines hight contrast"}}},btnSec:{title:"Button",data:{"--btn-accent-default":{light:[!0,!0],value:["#845CFF"," #5F31CC"],description:"Accent coloured button"},"--btn-accent-hover":{light:[!0,!0],value:["#9470FF"," #5F31CC"],description:"Hover on accent coloured button"},"--btn-accent-press":{light:[!0,!0],value:["#6F4DD6","#5F31CC"],description:"Pressed on accent coloured button"},"--btn-primary-default":{light:[!0,!0],value:["#110529","#5F31CC"],description:"Primary button"},"--btn-primary-hover":{light:[!0,!0],value:["#231842","#6D3DDB"],description:"Hover on primary button"},"--btn-primary-press":{light:[!0,!0],value:["#080214","#5328B8"],description:"Hover on primary button"},"--btn-sec-hover-white":{light:[!1,!0],value:["rgba(255, 255, 255, 0.50)","rgba(131, 131, 163, 0.16)"],description:"Hover background on transparent button"},"--btn-sec-hover-grey":{light:[!1,!0],value:["rgba(155, 171, 204, 0.16)","rgba(131, 131, 163, 0.16)"],description:"Hover background on ghost button & icons"},"--btn-sec-press-grey":{light:[!1,!0],value:["rgba(155, 171, 204, 0.24)","rgba(131, 131, 163, 0.24)"],description:"Hover background on ghost button & icons"},"--btn-active-select":{light:[!1,!0],value:["rgba(99, 224, 36, 0.24)","rgba(99, 224, 36, 0.24)"],description:"Fill on selected elements"},"--btn-switcher":{light:[!1,!0],value:["linear-gradient(180deg, #A1E59C 0%, #D0F5B0 100%)","#5E5E70"],description:"Gradient on active controll/switcher element"}}},disSec:{title:"Disable",data:{"--dis-00":{light:[!1,!0],value:["#FFFFFF","#65656B"],description:"Elements on dis-01, labels, texts, icons"},"--dis-01":{light:[!1,!0],value:["#CFD1DB","#3D3D42"],description:"Buttons, borders, labels, texts, icons"}}},bgSec:{title:"Background",data:{"--bg-base-dark":{light:[!0,!0],value:["#110529","#0D0D0F"],description:"Default dark block background"},"--bg-base-light":{light:[!1,!0],value:["#F7F8FA","#0D0D0F"],description:"Default light block background"},"--bg-elevated-01":{light:[!1,!0],value:["#FFFFFF","#1B1B1F"],description:"Default block background"},"--bg-elevated-02":{light:[!1,!0],value:["#E1E3EB","#2D2D33"],description:"Secondary block background"}}},filledSec:{title:"Filled",data:{"--filled-V-BG":{light:[!1,!0],value:["#D0F0C0","rgba(66, 184, 66, 0.40)"],description:"Text background selection on V-read"},"--filled-D-BG":{light:[!1,!0],value:["#FFCECC","rgba(229, 83, 229, 0.40)"],description:"Text background selection on D-read"},"--filled-N-BG":{light:[!1,!0],value:["#FAF5AA","rgba(83, 82, 102, 0.40)"],description:"Text background selection on C/N-read"},"--filled-J-BG":{light:[!1,!0],value:["#DEDBFF","rgba(132, 92, 255, 0.40)"],description:"Text background selection on J-read"}}},notificationSec:{title:"Notification",data:{"--notification-neutral":{light:[!1,!0],value:["linear-gradient(90deg, #D6D9FF 0%, #FFF 100%)","linear-gradient(90deg, #4D4D8F 0%, #292933 100%)"],description:"Background on neutral blocks"},"--notification-success":{light:[!1,!0],value:["linear-gradient(90deg, #C9F0B6 0%, #FFF 100%)","linear-gradient(90deg, #305C3E 0%, #292933 100%)"],description:"Background on success blocks"},"--notification-warning":{light:[!1,!0],value:["linear-gradient(90deg, #FEE0A3 0%, #FFF 100%)","linear-gradient(90deg, #754F2D 0%, #292933 100%)"],description:"Background on warning blocks"},"--notification-error":{light:[!1,!0],value:["linear-gradient(90deg, #FFB8B8 0%, #FFF 100%)","linear-gradient(90deg, #8F3343 0%, #292933 100%)"],description:"Background on error blocks"}}},gradientSec:{title:"Gradient",data:{"--gradient-blue-green":{light:[!0,!0],value:["linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand dark gradient"},"--gradient-green-lime":{light:[!1,!0],value:["linear-gradient(180deg, #A1E59C 0%, #D0F5B0 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand light gradient"},"--gradient-blue-violet":{light:[!1,!0],value:["linear-gradient(180deg, #ADB8FF 0%, #D6E9FF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand light gradient"},"--gradient-blue-clear":{light:[!1,!0],value:["linear-gradient(180deg, #85BEFF 0%, #CEF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-orange":{light:[!1,!0],value:["linear-gradient(180deg, #FFB766 0%, #FFEAA3 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-mint":{light:[!1,!0],value:["linear-gradient(180deg, #7DD1D1 0%, #C8FAE9 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-lime":{light:[!1,!0],value:["linear-gradient(180deg, #BFE062 0%, #E4FFAD 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-rose":{light:[!1,!0],value:["linear-gradient(0deg, #FFDDD6 0%, #FF99C9 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-red":{light:[!1,!0],value:["linear-gradient(0deg, #FFD5CC 0%, #FF9494 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-violet":{light:[!1,!0],value:["linear-gradient(180deg, #BCA3FF 0%, #E5E5FF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"}}}}}const mT=["add","arrow-down","arrow-left","arrow-link","arrow-right","arrow-up","box","calendar","caret-down","caret-left","caret-right","caret-up","cell-type-num","cell-type-txt","checkmark","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-up","clipboard-copied","clipboard","close","copy","data-dimentions","delete-bin","delete-circle","delete-clear","download","drag-dots","duplicate","edit","error","export","filter-on","filter","help-outline","help","info-outline","info","jump-link","link","loading","lock","maximize","minimize","minus","more","open","paper-clip","pause","play","renew","restart","reverse","settings","sort","stop","success","time","tune","warning","x-axis","y-axis","zip"],gT=["add-layer","add","align-center","align-left","align-right","annotate","annotation","area","arrow-down","arrow-left","arrow-link","arrow-right","arrow-up","axes","bar-cross","bar-error","bar-stacked","bar-trend","bar","bindot","box","boxplot-binned","boxplot-jitter","boxplot-notched","boxplot","bubble","calendar","canvas","cell-type-num","cell-type-txt","checkbox-checked","checkbox-intermediate","checkbox","checkmark","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-sort","chevron-up","clipboard-copied","clipboard","close","cloud-download","cloud-offline","cloud-online","cloud-upload","cluster","code","color-fill","color-none","color-stroke","color","columns","connected-points","container","cookie","copy","cpu","data-dimentions","debug","delete-bin","delete-circle","delete-clear","dendrogram-X-line","dendrogram-X","dendrogram-Y-line","dendrogram-Y","dna-add","dna-import","dna","download","drag-dots","drag-horizontal","drag-vertical","duplicate","edit","error-bar","error","expand-left","expand-right","export","file-doc-add","file-doc-download","file-doc-import","file-doc","filter-on","filter","fire-tips","folder-parent","frame-type-all","frame-type-bottom","frame-type-left-bottom","frame-type-left","frame-type-none","generate","graph","heatmap","help-outline","help","info-outline","info","jitter","jump-link","lasso","layers","learn","legend-box-dot","legend-box","legend","line-binned","line-error","line-jitter","line","linetype-dashed","linetype-dotdash","linetype-dotted","linetype-longdash","linetype-solid","linetype-twodash","link-disabled","link","loading","lock","maximize","menu","minimize","minus","more","paper-clip","pause","pin","play","position-bottom-annotation","position-bottom","position-left-annotation","position-left","position-right-annotation","position-right","position-top-annotation","position-top","product","publications","radio-button-checked","radio-button","renew","restart","reverse","rotation-0","rotation-45","rotation-90","search","server-on","server","settings","sina","skatterplot","slice","social-github","social-linkedin","social-twitter-X","social-twitter-bird","social-youtube","sort-list-down","sort-list-up","sort","statistics","stop","strip-plot","success","table-add","table-alias","table-import","table","template","terminal","text-align-center","text-align-left","text-align-right","theme-dark","theme-light","time","tune","venn","view-hide","view-show","violin-binned","violin-jitter","violin","warning","wetlab","windows-collapse","windows-expand","x-axis","y-axis","zip","zoom-in","zoom-out"],yT={allCssVariables:fT(),icons16:$1,icons24:hT},_T={class:"block__not-found"},vT=r.defineComponent({__name:"NotFound",setup(t){const n=rl().useApp(),o=()=>{n.updateNavigationState(s=>{s.href="/"})};return(s,l)=>(r.openBlock(),r.createElementBlock("div",_T,[r.createElementVNode("h1",null,"Not found route: "+r.toDisplayString(r.unref(n).snapshot.navigationState.href),1),r.createVNode(r.unref(yl),{onClick:r.withModifiers(o,["stop"])},{default:r.withCtx(()=>l[0]||(l[0]=[r.createTextVNode("Return to main page")])),_:1})]))}}),Ds=(t,e)=>{const n=t.__vccOpts||t;for(const[o,s]of e)n[o]=s;return n},CT={},wT={class:"block__loader-page"};function bT(t,e){return r.openBlock(),r.createElementBlock("div",wT,e[0]||(e[0]=[r.createElementVNode("div",{class:"loader-container"},[r.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"})],-1)]))}const xT=Ds(CT,[["render",bT]]),kT={class:"pl-app-notification-alert"},ST={class:"pl-app-notification-alert__content"},ET={class:"pl-app-notification-alert__title"},TT=r.defineComponent({__name:"PlAppErrorNotificationAlert",props:{errors:{}},setup(t){const e=t,n=r.ref(!1),o=r.ref(!0),s=r.computed(()=>Object.entries(e.errors).filter(c=>!!c[1]));function l(){n.value=!0}return r.watch(()=>e.errors,c=>{o.value=Object.values(c).some(u=>!!u)},{immediate:!0,deep:!0}),(c,u)=>(r.openBlock(),r.createElementBlock("div",kT,[r.createVNode(r.unref(Tl),{modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=p=>n.value=p),width:"720px",style:{"max-height":"100vh"}},{title:r.withCtx(()=>u[2]||(u[2]=[r.createTextVNode(" Errors ")])),default:r.withCtx(()=>[r.createElementVNode("div",ST,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,p=>{var f;return r.openBlock(),r.createElementBlock("div",{key:p[0],class:"pl-app-notification-alert__item"},[r.createElementVNode("div",ET,r.toDisplayString(p[0]),1),r.createVNode(r.unref(Zu),{value:(f=p[1])==null?void 0:f.message},null,8,["value"])])}),128))])]),_:1},8,["modelValue"]),r.createVNode(r.unref(pp),{modelValue:o.value,"onUpdate:modelValue":u[1]||(u[1]=p=>o.value=p),type:"error",closable:""},{actions:r.withCtx(()=>[r.createVNode(r.unref(gl),{icon:"arrow-right",onClick:l},{default:r.withCtx(()=>u[3]||(u[3]=[r.createTextVNode("See errors")])),_:1}),r.createVNode(r.unref(Bu))]),default:r.withCtx(()=>[u[4]||(u[4]=r.createTextVNode(" Some outputs have errors. "))]),_:1},8,["modelValue"])]))}}),BT={key:0,class:"block__loader"},VT=r.defineComponent({__name:"BlockLoader",props:{value:{type:[Boolean,Number]}},setup(t){const e=t,n=r.computed(()=>typeof e.value=="boolean"&&e.value),o=r.computed(()=>{const s=e.value;if(typeof s=="number")return s>=1?void 0:(s*100).toFixed(2)+"%"});return(s,l)=>n.value?(r.openBlock(),r.createElementBlock("div",BT)):o.value!==void 0?(r.openBlock(),r.createElementBlock("div",{key:1,class:"block__progress",style:r.normalizeStyle({"--progress-width":o.value})},null,4)):r.createCommentVNode("",!0)}}),NT={class:"block block__layout"},AT={key:0},PT=r.defineComponent({__name:"BlockLayout",setup(t){const e=rl(),n=f=>{try{return new URL(f,"http://dummy").pathname}catch{console.error("Invalid href",f);return}},o=r.computed(()=>e.loaded?e.useApp().href:void 0),s=r.computed(()=>{if(e.loaded){const f=e.useApp(),m=n(f.snapshot.navigationState.href);return m?f.getRoute(m):void 0}}),l=r.computed(()=>e.loaded?e.useApp():void 0),c=r.computed(()=>l.value?l.value.model.outputErrors:{}),u=r.computed(()=>{var f;return((f=l.value)==null?void 0:f.showErrorsNotification)??!0}),p=r.computed(()=>{var f,m;return(m=(f=l.value)==null?void 0:f.progress)==null?void 0:m.call(f)});return(f,m)=>(r.openBlock(),r.createElementBlock("div",NT,[r.createVNode(VT,{value:p.value},null,8,["value"]),r.unref(e).error?(r.openBlock(),r.createElementBlock("div",AT,r.toDisplayString(r.unref(e).error),1)):r.unref(e).loaded?s.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(s.value),{key:o.value})):(r.openBlock(),r.createBlock(vT,{key:3})):(r.openBlock(),r.createBlock(xT,{key:1},{default:r.withCtx(()=>m[0]||(m[0]=[r.createTextVNode("Loading...")])),_:1})),r.unref(e).loaded&&u.value?(r.openBlock(),r.createBlock(r.unref(TT),{key:4,errors:c.value},null,8,["errors"])):r.createCommentVNode("",!0)]))}});var Fs={exports:{}};/**
|
|
66
66
|
* @license
|
|
67
67
|
* Lodash <https://lodash.com/>
|
|
68
68
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
69
69
|
* Released under MIT license <https://lodash.com/license>
|
|
70
70
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
71
71
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
72
|
-
*/As.exports,function(t,e){(function(){var n,o="4.17.21",s=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",f=500,m="__lodash_placeholder__",y=1,B=2,T=4,N=1,M=2,G=1,C=2,F=4,O=8,Z=16,I=32,Y=64,W=128,P=256,j=512,U=30,X="...",L=800,S=16,w=1,k=2,$=3,te=1/0,ne=9007199254740991,be=17976931348623157e292,$e=NaN,ot=4294967295,Cn=ot-1,Mn=ot>>>1,xr=[["ary",W],["bind",G],["bindKey",C],["curry",O],["curryRight",Z],["flip",j],["partial",I],["partialRight",Y],["rearg",P]],Hn="[object Arguments]",Yr="[object Array]",Rs="[object AsyncFunction]",kr="[object Boolean]",Sr="[object Date]",Ms="[object DOMException]",Se="[object Error]",Jr="[object Function]",Bp="[object GeneratorFunction]",wn="[object Map]",Mi="[object Number]",tB="[object Null]",jn="[object Object]",Vp="[object Promise]",nB="[object Proxy]",Ii="[object RegExp]",bn="[object Set]",Li="[object String]",Is="[object Symbol]",rB="[object Undefined]",Oi="[object WeakMap]",oB="[object WeakSet]",Gi="[object ArrayBuffer]",Vo="[object DataView]",Il="[object Float32Array]",Ll="[object Float64Array]",Ol="[object Int8Array]",Gl="[object Int16Array]",zl="[object Int32Array]",$l="[object Uint8Array]",Zl="[object Uint8ClampedArray]",Ul="[object Uint16Array]",Wl="[object Uint32Array]",iB=/\b__p \+= '';/g,sB=/\b(__p \+=) '' \+/g,aB=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Np=/&(?:amp|lt|gt|quot|#39);/g,Ap=/[&<>"']/g,lB=RegExp(Np.source),cB=RegExp(Ap.source),dB=/<%-([\s\S]+?)%>/g,uB=/<%([\s\S]+?)%>/g,Pp=/<%=([\s\S]+?)%>/g,pB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hB=/^\w*$/,fB=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hl=/[\\^$.*+?()[\]{}|]/g,mB=RegExp(Hl.source),jl=/^\s+/,gB=/\s/,yB=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_B=/\{\n\/\* \[wrapped with (.+)\] \*/,vB=/,? & /,CB=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,wB=/[()=,{}\[\]\/\s]/,bB=/\\(\\)?/g,xB=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Dp=/\w*$/,kB=/^[-+]0x[0-9a-f]+$/i,SB=/^0b[01]+$/i,EB=/^\[object .+?Constructor\]$/,TB=/^0o[0-7]+$/i,BB=/^(?:0|[1-9]\d*)$/,VB=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ls=/($^)/,NB=/['\n\r\u2028\u2029\\]/g,Os="\\ud800-\\udfff",AB="\\u0300-\\u036f",PB="\\ufe20-\\ufe2f",DB="\\u20d0-\\u20ff",Fp=AB+PB+DB,Rp="\\u2700-\\u27bf",Mp="a-z\\xdf-\\xf6\\xf8-\\xff",FB="\\xac\\xb1\\xd7\\xf7",RB="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",MB="\\u2000-\\u206f",IB=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ip="A-Z\\xc0-\\xd6\\xd8-\\xde",Lp="\\ufe0e\\ufe0f",Op=FB+RB+MB+IB,ql="['’]",LB="["+Os+"]",Gp="["+Op+"]",Gs="["+Fp+"]",zp="\\d+",OB="["+Rp+"]",$p="["+Mp+"]",Zp="[^"+Os+Op+zp+Rp+Mp+Ip+"]",Kl="\\ud83c[\\udffb-\\udfff]",GB="(?:"+Gs+"|"+Kl+")",Up="[^"+Os+"]",Yl="(?:\\ud83c[\\udde6-\\uddff]){2}",Jl="[\\ud800-\\udbff][\\udc00-\\udfff]",No="["+Ip+"]",Wp="\\u200d",Hp="(?:"+$p+"|"+Zp+")",zB="(?:"+No+"|"+Zp+")",jp="(?:"+ql+"(?:d|ll|m|re|s|t|ve))?",qp="(?:"+ql+"(?:D|LL|M|RE|S|T|VE))?",Kp=GB+"?",Yp="["+Lp+"]?",$B="(?:"+Wp+"(?:"+[Up,Yl,Jl].join("|")+")"+Yp+Kp+")*",ZB="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",UB="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Jp=Yp+Kp+$B,WB="(?:"+[OB,Yl,Jl].join("|")+")"+Jp,HB="(?:"+[Up+Gs+"?",Gs,Yl,Jl,LB].join("|")+")",jB=RegExp(ql,"g"),qB=RegExp(Gs,"g"),Xl=RegExp(Kl+"(?="+Kl+")|"+HB+Jp,"g"),KB=RegExp([No+"?"+$p+"+"+jp+"(?="+[Gp,No,"$"].join("|")+")",zB+"+"+qp+"(?="+[Gp,No+Hp,"$"].join("|")+")",No+"?"+Hp+"+"+jp,No+"+"+qp,UB,ZB,zp,WB].join("|"),"g"),YB=RegExp("["+Wp+Os+Fp+Lp+"]"),JB=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,XB=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],QB=-1,Ye={};Ye[Il]=Ye[Ll]=Ye[Ol]=Ye[Gl]=Ye[zl]=Ye[$l]=Ye[Zl]=Ye[Ul]=Ye[Wl]=!0,Ye[Hn]=Ye[Yr]=Ye[Gi]=Ye[kr]=Ye[Vo]=Ye[Sr]=Ye[Se]=Ye[Jr]=Ye[wn]=Ye[Mi]=Ye[jn]=Ye[Ii]=Ye[bn]=Ye[Li]=Ye[Oi]=!1;var qe={};qe[Hn]=qe[Yr]=qe[Gi]=qe[Vo]=qe[kr]=qe[Sr]=qe[Il]=qe[Ll]=qe[Ol]=qe[Gl]=qe[zl]=qe[wn]=qe[Mi]=qe[jn]=qe[Ii]=qe[bn]=qe[Li]=qe[Is]=qe[$l]=qe[Zl]=qe[Ul]=qe[Wl]=!0,qe[Se]=qe[Jr]=qe[Oi]=!1;var eV={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},tV={"&":"&","<":"<",">":">",'"':""","'":"'"},nV={"&":"&","<":"<",">":">",""":'"',"'":"'"},rV={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},oV=parseFloat,iV=parseInt,Xp=typeof Uo=="object"&&Uo&&Uo.Object===Object&&Uo,sV=typeof self=="object"&&self&&self.Object===Object&&self,gt=Xp||sV||Function("return this")(),Ql=e&&!e.nodeType&&e,Xr=Ql&&!0&&t&&!t.nodeType&&t,Qp=Xr&&Xr.exports===Ql,ec=Qp&&Xp.process,Yt=function(){try{var A=Xr&&Xr.require&&Xr.require("util").types;return A||ec&&ec.binding&&ec.binding("util")}catch{}}(),eh=Yt&&Yt.isArrayBuffer,th=Yt&&Yt.isDate,nh=Yt&&Yt.isMap,rh=Yt&&Yt.isRegExp,oh=Yt&&Yt.isSet,ih=Yt&&Yt.isTypedArray;function Zt(A,H,z){switch(z.length){case 0:return A.call(H);case 1:return A.call(H,z[0]);case 2:return A.call(H,z[0],z[1]);case 3:return A.call(H,z[0],z[1],z[2])}return A.apply(H,z)}function aV(A,H,z,ce){for(var ke=-1,Ze=A==null?0:A.length;++ke<Ze;){var dt=A[ke];H(ce,dt,z(dt),A)}return ce}function Jt(A,H){for(var z=-1,ce=A==null?0:A.length;++z<ce&&H(A[z],z,A)!==!1;);return A}function lV(A,H){for(var z=A==null?0:A.length;z--&&H(A[z],z,A)!==!1;);return A}function sh(A,H){for(var z=-1,ce=A==null?0:A.length;++z<ce;)if(!H(A[z],z,A))return!1;return!0}function Er(A,H){for(var z=-1,ce=A==null?0:A.length,ke=0,Ze=[];++z<ce;){var dt=A[z];H(dt,z,A)&&(Ze[ke++]=dt)}return Ze}function zs(A,H){var z=A==null?0:A.length;return!!z&&Ao(A,H,0)>-1}function tc(A,H,z){for(var ce=-1,ke=A==null?0:A.length;++ce<ke;)if(z(H,A[ce]))return!0;return!1}function Xe(A,H){for(var z=-1,ce=A==null?0:A.length,ke=Array(ce);++z<ce;)ke[z]=H(A[z],z,A);return ke}function Tr(A,H){for(var z=-1,ce=H.length,ke=A.length;++z<ce;)A[ke+z]=H[z];return A}function nc(A,H,z,ce){var ke=-1,Ze=A==null?0:A.length;for(ce&&Ze&&(z=A[++ke]);++ke<Ze;)z=H(z,A[ke],ke,A);return z}function cV(A,H,z,ce){var ke=A==null?0:A.length;for(ce&&ke&&(z=A[--ke]);ke--;)z=H(z,A[ke],ke,A);return z}function rc(A,H){for(var z=-1,ce=A==null?0:A.length;++z<ce;)if(H(A[z],z,A))return!0;return!1}var dV=oc("length");function uV(A){return A.split("")}function pV(A){return A.match(CB)||[]}function ah(A,H,z){var ce;return z(A,function(ke,Ze,dt){if(H(ke,Ze,dt))return ce=Ze,!1}),ce}function $s(A,H,z,ce){for(var ke=A.length,Ze=z+(ce?1:-1);ce?Ze--:++Ze<ke;)if(H(A[Ze],Ze,A))return Ze;return-1}function Ao(A,H,z){return H===H?kV(A,H,z):$s(A,lh,z)}function hV(A,H,z,ce){for(var ke=z-1,Ze=A.length;++ke<Ze;)if(ce(A[ke],H))return ke;return-1}function lh(A){return A!==A}function ch(A,H){var z=A==null?0:A.length;return z?sc(A,H)/z:$e}function oc(A){return function(H){return H==null?n:H[A]}}function ic(A){return function(H){return A==null?n:A[H]}}function dh(A,H,z,ce,ke){return ke(A,function(Ze,dt,je){z=ce?(ce=!1,Ze):H(z,Ze,dt,je)}),z}function fV(A,H){var z=A.length;for(A.sort(H);z--;)A[z]=A[z].value;return A}function sc(A,H){for(var z,ce=-1,ke=A.length;++ce<ke;){var Ze=H(A[ce]);Ze!==n&&(z=z===n?Ze:z+Ze)}return z}function ac(A,H){for(var z=-1,ce=Array(A);++z<A;)ce[z]=H(z);return ce}function mV(A,H){return Xe(H,function(z){return[z,A[z]]})}function uh(A){return A&&A.slice(0,mh(A)+1).replace(jl,"")}function Ut(A){return function(H){return A(H)}}function lc(A,H){return Xe(H,function(z){return A[z]})}function zi(A,H){return A.has(H)}function ph(A,H){for(var z=-1,ce=A.length;++z<ce&&Ao(H,A[z],0)>-1;);return z}function hh(A,H){for(var z=A.length;z--&&Ao(H,A[z],0)>-1;);return z}function gV(A,H){for(var z=A.length,ce=0;z--;)A[z]===H&&++ce;return ce}var yV=ic(eV),_V=ic(tV);function vV(A){return"\\"+rV[A]}function CV(A,H){return A==null?n:A[H]}function Po(A){return YB.test(A)}function wV(A){return JB.test(A)}function bV(A){for(var H,z=[];!(H=A.next()).done;)z.push(H.value);return z}function cc(A){var H=-1,z=Array(A.size);return A.forEach(function(ce,ke){z[++H]=[ke,ce]}),z}function fh(A,H){return function(z){return A(H(z))}}function Br(A,H){for(var z=-1,ce=A.length,ke=0,Ze=[];++z<ce;){var dt=A[z];(dt===H||dt===m)&&(A[z]=m,Ze[ke++]=z)}return Ze}function Zs(A){var H=-1,z=Array(A.size);return A.forEach(function(ce){z[++H]=ce}),z}function xV(A){var H=-1,z=Array(A.size);return A.forEach(function(ce){z[++H]=[ce,ce]}),z}function kV(A,H,z){for(var ce=z-1,ke=A.length;++ce<ke;)if(A[ce]===H)return ce;return-1}function SV(A,H,z){for(var ce=z+1;ce--;)if(A[ce]===H)return ce;return ce}function Do(A){return Po(A)?TV(A):dV(A)}function xn(A){return Po(A)?BV(A):uV(A)}function mh(A){for(var H=A.length;H--&&gB.test(A.charAt(H)););return H}var EV=ic(nV);function TV(A){for(var H=Xl.lastIndex=0;Xl.test(A);)++H;return H}function BV(A){return A.match(Xl)||[]}function VV(A){return A.match(KB)||[]}var NV=function A(H){H=H==null?gt:Fo.defaults(gt.Object(),H,Fo.pick(gt,XB));var z=H.Array,ce=H.Date,ke=H.Error,Ze=H.Function,dt=H.Math,je=H.Object,dc=H.RegExp,AV=H.String,Xt=H.TypeError,Us=z.prototype,PV=Ze.prototype,Ro=je.prototype,Ws=H["__core-js_shared__"],Hs=PV.toString,He=Ro.hasOwnProperty,DV=0,gh=function(){var i=/[^.]+$/.exec(Ws&&Ws.keys&&Ws.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),js=Ro.toString,FV=Hs.call(je),RV=gt._,MV=dc("^"+Hs.call(He).replace(Hl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qs=Qp?H.Buffer:n,Vr=H.Symbol,Ks=H.Uint8Array,yh=qs?qs.allocUnsafe:n,Ys=fh(je.getPrototypeOf,je),_h=je.create,vh=Ro.propertyIsEnumerable,Js=Us.splice,Ch=Vr?Vr.isConcatSpreadable:n,$i=Vr?Vr.iterator:n,Qr=Vr?Vr.toStringTag:n,Xs=function(){try{var i=oo(je,"defineProperty");return i({},"",{}),i}catch{}}(),IV=H.clearTimeout!==gt.clearTimeout&&H.clearTimeout,LV=ce&&ce.now!==gt.Date.now&&ce.now,OV=H.setTimeout!==gt.setTimeout&&H.setTimeout,Qs=dt.ceil,ea=dt.floor,uc=je.getOwnPropertySymbols,GV=qs?qs.isBuffer:n,wh=H.isFinite,zV=Us.join,$V=fh(je.keys,je),ut=dt.max,xt=dt.min,ZV=ce.now,UV=H.parseInt,bh=dt.random,WV=Us.reverse,pc=oo(H,"DataView"),Zi=oo(H,"Map"),hc=oo(H,"Promise"),Mo=oo(H,"Set"),Ui=oo(H,"WeakMap"),Wi=oo(je,"create"),ta=Ui&&new Ui,Io={},HV=io(pc),jV=io(Zi),qV=io(hc),KV=io(Mo),YV=io(Ui),na=Vr?Vr.prototype:n,Hi=na?na.valueOf:n,xh=na?na.toString:n;function _(i){if(nt(i)&&!Ee(i)&&!(i instanceof Re)){if(i instanceof Qt)return i;if(He.call(i,"__wrapped__"))return Sf(i)}return new Qt(i)}var Lo=function(){function i(){}return function(a){if(!tt(a))return{};if(_h)return _h(a);i.prototype=a;var d=new i;return i.prototype=n,d}}();function ra(){}function Qt(i,a){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=n}_.templateSettings={escape:dB,evaluate:uB,interpolate:Pp,variable:"",imports:{_}},_.prototype=ra.prototype,_.prototype.constructor=_,Qt.prototype=Lo(ra.prototype),Qt.prototype.constructor=Qt;function Re(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ot,this.__views__=[]}function JV(){var i=new Re(this.__wrapped__);return i.__actions__=Dt(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Dt(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Dt(this.__views__),i}function XV(){if(this.__filtered__){var i=new Re(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function QV(){var i=this.__wrapped__.value(),a=this.__dir__,d=Ee(i),h=a<0,g=d?i.length:0,v=uA(0,g,this.__views__),E=v.start,V=v.end,D=V-E,q=h?V:E-1,K=this.__iteratees__,J=K.length,oe=0,ue=xt(D,this.__takeCount__);if(!d||!h&&g==D&&ue==D)return jh(i,this.__actions__);var ge=[];e:for(;D--&&oe<ue;){q+=a;for(var Pe=-1,ye=i[q];++Pe<J;){var Fe=K[Pe],Me=Fe.iteratee,jt=Fe.type,At=Me(ye);if(jt==k)ye=At;else if(!At){if(jt==w)continue e;break e}}ge[oe++]=ye}return ge}Re.prototype=Lo(ra.prototype),Re.prototype.constructor=Re;function eo(i){var a=-1,d=i==null?0:i.length;for(this.clear();++a<d;){var h=i[a];this.set(h[0],h[1])}}function eN(){this.__data__=Wi?Wi(null):{},this.size=0}function tN(i){var a=this.has(i)&&delete this.__data__[i];return this.size-=a?1:0,a}function nN(i){var a=this.__data__;if(Wi){var d=a[i];return d===p?n:d}return He.call(a,i)?a[i]:n}function rN(i){var a=this.__data__;return Wi?a[i]!==n:He.call(a,i)}function oN(i,a){var d=this.__data__;return this.size+=this.has(i)?0:1,d[i]=Wi&&a===n?p:a,this}eo.prototype.clear=eN,eo.prototype.delete=tN,eo.prototype.get=nN,eo.prototype.has=rN,eo.prototype.set=oN;function qn(i){var a=-1,d=i==null?0:i.length;for(this.clear();++a<d;){var h=i[a];this.set(h[0],h[1])}}function iN(){this.__data__=[],this.size=0}function sN(i){var a=this.__data__,d=oa(a,i);if(d<0)return!1;var h=a.length-1;return d==h?a.pop():Js.call(a,d,1),--this.size,!0}function aN(i){var a=this.__data__,d=oa(a,i);return d<0?n:a[d][1]}function lN(i){return oa(this.__data__,i)>-1}function cN(i,a){var d=this.__data__,h=oa(d,i);return h<0?(++this.size,d.push([i,a])):d[h][1]=a,this}qn.prototype.clear=iN,qn.prototype.delete=sN,qn.prototype.get=aN,qn.prototype.has=lN,qn.prototype.set=cN;function Kn(i){var a=-1,d=i==null?0:i.length;for(this.clear();++a<d;){var h=i[a];this.set(h[0],h[1])}}function dN(){this.size=0,this.__data__={hash:new eo,map:new(Zi||qn),string:new eo}}function uN(i){var a=ga(this,i).delete(i);return this.size-=a?1:0,a}function pN(i){return ga(this,i).get(i)}function hN(i){return ga(this,i).has(i)}function fN(i,a){var d=ga(this,i),h=d.size;return d.set(i,a),this.size+=d.size==h?0:1,this}Kn.prototype.clear=dN,Kn.prototype.delete=uN,Kn.prototype.get=pN,Kn.prototype.has=hN,Kn.prototype.set=fN;function to(i){var a=-1,d=i==null?0:i.length;for(this.__data__=new Kn;++a<d;)this.add(i[a])}function mN(i){return this.__data__.set(i,p),this}function gN(i){return this.__data__.has(i)}to.prototype.add=to.prototype.push=mN,to.prototype.has=gN;function kn(i){var a=this.__data__=new qn(i);this.size=a.size}function yN(){this.__data__=new qn,this.size=0}function _N(i){var a=this.__data__,d=a.delete(i);return this.size=a.size,d}function vN(i){return this.__data__.get(i)}function CN(i){return this.__data__.has(i)}function wN(i,a){var d=this.__data__;if(d instanceof qn){var h=d.__data__;if(!Zi||h.length<s-1)return h.push([i,a]),this.size=++d.size,this;d=this.__data__=new Kn(h)}return d.set(i,a),this.size=d.size,this}kn.prototype.clear=yN,kn.prototype.delete=_N,kn.prototype.get=vN,kn.prototype.has=CN,kn.prototype.set=wN;function kh(i,a){var d=Ee(i),h=!d&&so(i),g=!d&&!h&&Fr(i),v=!d&&!h&&!g&&$o(i),E=d||h||g||v,V=E?ac(i.length,AV):[],D=V.length;for(var q in i)(a||He.call(i,q))&&!(E&&(q=="length"||g&&(q=="offset"||q=="parent")||v&&(q=="buffer"||q=="byteLength"||q=="byteOffset")||Qn(q,D)))&&V.push(q);return V}function Sh(i){var a=i.length;return a?i[kc(0,a-1)]:n}function bN(i,a){return ya(Dt(i),no(a,0,i.length))}function xN(i){return ya(Dt(i))}function fc(i,a,d){(d!==n&&!Sn(i[a],d)||d===n&&!(a in i))&&Yn(i,a,d)}function ji(i,a,d){var h=i[a];(!(He.call(i,a)&&Sn(h,d))||d===n&&!(a in i))&&Yn(i,a,d)}function oa(i,a){for(var d=i.length;d--;)if(Sn(i[d][0],a))return d;return-1}function kN(i,a,d,h){return Nr(i,function(g,v,E){a(h,g,d(g),E)}),h}function Eh(i,a){return i&&Ln(a,mt(a),i)}function SN(i,a){return i&&Ln(a,Rt(a),i)}function Yn(i,a,d){a=="__proto__"&&Xs?Xs(i,a,{configurable:!0,enumerable:!0,value:d,writable:!0}):i[a]=d}function mc(i,a){for(var d=-1,h=a.length,g=z(h),v=i==null;++d<h;)g[d]=v?n:Kc(i,a[d]);return g}function no(i,a,d){return i===i&&(d!==n&&(i=i<=d?i:d),a!==n&&(i=i>=a?i:a)),i}function en(i,a,d,h,g,v){var E,V=a&y,D=a&B,q=a&T;if(d&&(E=g?d(i,h,g,v):d(i)),E!==n)return E;if(!tt(i))return i;var K=Ee(i);if(K){if(E=hA(i),!V)return Dt(i,E)}else{var J=kt(i),oe=J==Jr||J==Bp;if(Fr(i))return Yh(i,V);if(J==jn||J==Hn||oe&&!g){if(E=D||oe?{}:gf(i),!V)return D?nA(i,SN(E,i)):tA(i,Eh(E,i))}else{if(!qe[J])return g?i:{};E=fA(i,J,V)}}v||(v=new kn);var ue=v.get(i);if(ue)return ue;v.set(i,E),Wf(i)?i.forEach(function(ye){E.add(en(ye,a,d,ye,i,v))}):Zf(i)&&i.forEach(function(ye,Fe){E.set(Fe,en(ye,a,d,Fe,i,v))});var ge=q?D?Rc:Fc:D?Rt:mt,Pe=K?n:ge(i);return Jt(Pe||i,function(ye,Fe){Pe&&(Fe=ye,ye=i[Fe]),ji(E,Fe,en(ye,a,d,Fe,i,v))}),E}function EN(i){var a=mt(i);return function(d){return Th(d,i,a)}}function Th(i,a,d){var h=d.length;if(i==null)return!h;for(i=je(i);h--;){var g=d[h],v=a[g],E=i[g];if(E===n&&!(g in i)||!v(E))return!1}return!0}function Bh(i,a,d){if(typeof i!="function")throw new Xt(c);return es(function(){i.apply(n,d)},a)}function qi(i,a,d,h){var g=-1,v=zs,E=!0,V=i.length,D=[],q=a.length;if(!V)return D;d&&(a=Xe(a,Ut(d))),h?(v=tc,E=!1):a.length>=s&&(v=zi,E=!1,a=new to(a));e:for(;++g<V;){var K=i[g],J=d==null?K:d(K);if(K=h||K!==0?K:0,E&&J===J){for(var oe=q;oe--;)if(a[oe]===J)continue e;D.push(K)}else v(a,J,h)||D.push(K)}return D}var Nr=tf(In),Vh=tf(yc,!0);function TN(i,a){var d=!0;return Nr(i,function(h,g,v){return d=!!a(h,g,v),d}),d}function ia(i,a,d){for(var h=-1,g=i.length;++h<g;){var v=i[h],E=a(v);if(E!=null&&(V===n?E===E&&!Ht(E):d(E,V)))var V=E,D=v}return D}function BN(i,a,d,h){var g=i.length;for(d=Ve(d),d<0&&(d=-d>g?0:g+d),h=h===n||h>g?g:Ve(h),h<0&&(h+=g),h=d>h?0:jf(h);d<h;)i[d++]=a;return i}function Nh(i,a){var d=[];return Nr(i,function(h,g,v){a(h,g,v)&&d.push(h)}),d}function yt(i,a,d,h,g){var v=-1,E=i.length;for(d||(d=gA),g||(g=[]);++v<E;){var V=i[v];a>0&&d(V)?a>1?yt(V,a-1,d,h,g):Tr(g,V):h||(g[g.length]=V)}return g}var gc=nf(),Ah=nf(!0);function In(i,a){return i&&gc(i,a,mt)}function yc(i,a){return i&&Ah(i,a,mt)}function sa(i,a){return Er(a,function(d){return er(i[d])})}function ro(i,a){a=Pr(a,i);for(var d=0,h=a.length;i!=null&&d<h;)i=i[On(a[d++])];return d&&d==h?i:n}function Ph(i,a,d){var h=a(i);return Ee(i)?h:Tr(h,d(i))}function Vt(i){return i==null?i===n?rB:tB:Qr&&Qr in je(i)?dA(i):xA(i)}function _c(i,a){return i>a}function VN(i,a){return i!=null&&He.call(i,a)}function NN(i,a){return i!=null&&a in je(i)}function AN(i,a,d){return i>=xt(a,d)&&i<ut(a,d)}function vc(i,a,d){for(var h=d?tc:zs,g=i[0].length,v=i.length,E=v,V=z(v),D=1/0,q=[];E--;){var K=i[E];E&&a&&(K=Xe(K,Ut(a))),D=xt(K.length,D),V[E]=!d&&(a||g>=120&&K.length>=120)?new to(E&&K):n}K=i[0];var J=-1,oe=V[0];e:for(;++J<g&&q.length<D;){var ue=K[J],ge=a?a(ue):ue;if(ue=d||ue!==0?ue:0,!(oe?zi(oe,ge):h(q,ge,d))){for(E=v;--E;){var Pe=V[E];if(!(Pe?zi(Pe,ge):h(i[E],ge,d)))continue e}oe&&oe.push(ge),q.push(ue)}}return q}function PN(i,a,d,h){return In(i,function(g,v,E){a(h,d(g),v,E)}),h}function Ki(i,a,d){a=Pr(a,i),i=Cf(i,a);var h=i==null?i:i[On(nn(a))];return h==null?n:Zt(h,i,d)}function Dh(i){return nt(i)&&Vt(i)==Hn}function DN(i){return nt(i)&&Vt(i)==Gi}function FN(i){return nt(i)&&Vt(i)==Sr}function Yi(i,a,d,h,g){return i===a?!0:i==null||a==null||!nt(i)&&!nt(a)?i!==i&&a!==a:RN(i,a,d,h,Yi,g)}function RN(i,a,d,h,g,v){var E=Ee(i),V=Ee(a),D=E?Yr:kt(i),q=V?Yr:kt(a);D=D==Hn?jn:D,q=q==Hn?jn:q;var K=D==jn,J=q==jn,oe=D==q;if(oe&&Fr(i)){if(!Fr(a))return!1;E=!0,K=!1}if(oe&&!K)return v||(v=new kn),E||$o(i)?hf(i,a,d,h,g,v):lA(i,a,D,d,h,g,v);if(!(d&N)){var ue=K&&He.call(i,"__wrapped__"),ge=J&&He.call(a,"__wrapped__");if(ue||ge){var Pe=ue?i.value():i,ye=ge?a.value():a;return v||(v=new kn),g(Pe,ye,d,h,v)}}return oe?(v||(v=new kn),cA(i,a,d,h,g,v)):!1}function MN(i){return nt(i)&&kt(i)==wn}function Cc(i,a,d,h){var g=d.length,v=g,E=!h;if(i==null)return!v;for(i=je(i);g--;){var V=d[g];if(E&&V[2]?V[1]!==i[V[0]]:!(V[0]in i))return!1}for(;++g<v;){V=d[g];var D=V[0],q=i[D],K=V[1];if(E&&V[2]){if(q===n&&!(D in i))return!1}else{var J=new kn;if(h)var oe=h(q,K,D,i,a,J);if(!(oe===n?Yi(K,q,N|M,h,J):oe))return!1}}return!0}function Fh(i){if(!tt(i)||_A(i))return!1;var a=er(i)?MV:EB;return a.test(io(i))}function IN(i){return nt(i)&&Vt(i)==Ii}function LN(i){return nt(i)&&kt(i)==bn}function ON(i){return nt(i)&&xa(i.length)&&!!Ye[Vt(i)]}function Rh(i){return typeof i=="function"?i:i==null?Mt:typeof i=="object"?Ee(i)?Lh(i[0],i[1]):Ih(i):om(i)}function wc(i){if(!Qi(i))return $V(i);var a=[];for(var d in je(i))He.call(i,d)&&d!="constructor"&&a.push(d);return a}function GN(i){if(!tt(i))return bA(i);var a=Qi(i),d=[];for(var h in i)h=="constructor"&&(a||!He.call(i,h))||d.push(h);return d}function bc(i,a){return i<a}function Mh(i,a){var d=-1,h=Ft(i)?z(i.length):[];return Nr(i,function(g,v,E){h[++d]=a(g,v,E)}),h}function Ih(i){var a=Ic(i);return a.length==1&&a[0][2]?_f(a[0][0],a[0][1]):function(d){return d===i||Cc(d,i,a)}}function Lh(i,a){return Oc(i)&&yf(a)?_f(On(i),a):function(d){var h=Kc(d,i);return h===n&&h===a?Yc(d,i):Yi(a,h,N|M)}}function aa(i,a,d,h,g){i!==a&&gc(a,function(v,E){if(g||(g=new kn),tt(v))zN(i,a,E,d,aa,h,g);else{var V=h?h(zc(i,E),v,E+"",i,a,g):n;V===n&&(V=v),fc(i,E,V)}},Rt)}function zN(i,a,d,h,g,v,E){var V=zc(i,d),D=zc(a,d),q=E.get(D);if(q){fc(i,d,q);return}var K=v?v(V,D,d+"",i,a,E):n,J=K===n;if(J){var oe=Ee(D),ue=!oe&&Fr(D),ge=!oe&&!ue&&$o(D);K=D,oe||ue||ge?Ee(V)?K=V:it(V)?K=Dt(V):ue?(J=!1,K=Yh(D,!0)):ge?(J=!1,K=Jh(D,!0)):K=[]:ts(D)||so(D)?(K=V,so(V)?K=qf(V):(!tt(V)||er(V))&&(K=gf(D))):J=!1}J&&(E.set(D,K),g(K,D,h,v,E),E.delete(D)),fc(i,d,K)}function Oh(i,a){var d=i.length;if(d)return a+=a<0?d:0,Qn(a,d)?i[a]:n}function Gh(i,a,d){a.length?a=Xe(a,function(v){return Ee(v)?function(E){return ro(E,v.length===1?v[0]:v)}:v}):a=[Mt];var h=-1;a=Xe(a,Ut(fe()));var g=Mh(i,function(v,E,V){var D=Xe(a,function(q){return q(v)});return{criteria:D,index:++h,value:v}});return fV(g,function(v,E){return eA(v,E,d)})}function $N(i,a){return zh(i,a,function(d,h){return Yc(i,h)})}function zh(i,a,d){for(var h=-1,g=a.length,v={};++h<g;){var E=a[h],V=ro(i,E);d(V,E)&&Ji(v,Pr(E,i),V)}return v}function ZN(i){return function(a){return ro(a,i)}}function xc(i,a,d,h){var g=h?hV:Ao,v=-1,E=a.length,V=i;for(i===a&&(a=Dt(a)),d&&(V=Xe(i,Ut(d)));++v<E;)for(var D=0,q=a[v],K=d?d(q):q;(D=g(V,K,D,h))>-1;)V!==i&&Js.call(V,D,1),Js.call(i,D,1);return i}function $h(i,a){for(var d=i?a.length:0,h=d-1;d--;){var g=a[d];if(d==h||g!==v){var v=g;Qn(g)?Js.call(i,g,1):Tc(i,g)}}return i}function kc(i,a){return i+ea(bh()*(a-i+1))}function UN(i,a,d,h){for(var g=-1,v=ut(Qs((a-i)/(d||1)),0),E=z(v);v--;)E[h?v:++g]=i,i+=d;return E}function Sc(i,a){var d="";if(!i||a<1||a>ne)return d;do a%2&&(d+=i),a=ea(a/2),a&&(i+=i);while(a);return d}function De(i,a){return $c(vf(i,a,Mt),i+"")}function WN(i){return Sh(Zo(i))}function HN(i,a){var d=Zo(i);return ya(d,no(a,0,d.length))}function Ji(i,a,d,h){if(!tt(i))return i;a=Pr(a,i);for(var g=-1,v=a.length,E=v-1,V=i;V!=null&&++g<v;){var D=On(a[g]),q=d;if(D==="__proto__"||D==="constructor"||D==="prototype")return i;if(g!=E){var K=V[D];q=h?h(K,D,V):n,q===n&&(q=tt(K)?K:Qn(a[g+1])?[]:{})}ji(V,D,q),V=V[D]}return i}var Zh=ta?function(i,a){return ta.set(i,a),i}:Mt,jN=Xs?function(i,a){return Xs(i,"toString",{configurable:!0,enumerable:!1,value:Xc(a),writable:!0})}:Mt;function qN(i){return ya(Zo(i))}function tn(i,a,d){var h=-1,g=i.length;a<0&&(a=-a>g?0:g+a),d=d>g?g:d,d<0&&(d+=g),g=a>d?0:d-a>>>0,a>>>=0;for(var v=z(g);++h<g;)v[h]=i[h+a];return v}function KN(i,a){var d;return Nr(i,function(h,g,v){return d=a(h,g,v),!d}),!!d}function la(i,a,d){var h=0,g=i==null?h:i.length;if(typeof a=="number"&&a===a&&g<=Mn){for(;h<g;){var v=h+g>>>1,E=i[v];E!==null&&!Ht(E)&&(d?E<=a:E<a)?h=v+1:g=v}return g}return Ec(i,a,Mt,d)}function Ec(i,a,d,h){var g=0,v=i==null?0:i.length;if(v===0)return 0;a=d(a);for(var E=a!==a,V=a===null,D=Ht(a),q=a===n;g<v;){var K=ea((g+v)/2),J=d(i[K]),oe=J!==n,ue=J===null,ge=J===J,Pe=Ht(J);if(E)var ye=h||ge;else q?ye=ge&&(h||oe):V?ye=ge&&oe&&(h||!ue):D?ye=ge&&oe&&!ue&&(h||!Pe):ue||Pe?ye=!1:ye=h?J<=a:J<a;ye?g=K+1:v=K}return xt(v,Cn)}function Uh(i,a){for(var d=-1,h=i.length,g=0,v=[];++d<h;){var E=i[d],V=a?a(E):E;if(!d||!Sn(V,D)){var D=V;v[g++]=E===0?0:E}}return v}function Wh(i){return typeof i=="number"?i:Ht(i)?$e:+i}function Wt(i){if(typeof i=="string")return i;if(Ee(i))return Xe(i,Wt)+"";if(Ht(i))return xh?xh.call(i):"";var a=i+"";return a=="0"&&1/i==-te?"-0":a}function Ar(i,a,d){var h=-1,g=zs,v=i.length,E=!0,V=[],D=V;if(d)E=!1,g=tc;else if(v>=s){var q=a?null:sA(i);if(q)return Zs(q);E=!1,g=zi,D=new to}else D=a?[]:V;e:for(;++h<v;){var K=i[h],J=a?a(K):K;if(K=d||K!==0?K:0,E&&J===J){for(var oe=D.length;oe--;)if(D[oe]===J)continue e;a&&D.push(J),V.push(K)}else g(D,J,d)||(D!==V&&D.push(J),V.push(K))}return V}function Tc(i,a){return a=Pr(a,i),i=Cf(i,a),i==null||delete i[On(nn(a))]}function Hh(i,a,d,h){return Ji(i,a,d(ro(i,a)),h)}function ca(i,a,d,h){for(var g=i.length,v=h?g:-1;(h?v--:++v<g)&&a(i[v],v,i););return d?tn(i,h?0:v,h?v+1:g):tn(i,h?v+1:0,h?g:v)}function jh(i,a){var d=i;return d instanceof Re&&(d=d.value()),nc(a,function(h,g){return g.func.apply(g.thisArg,Tr([h],g.args))},d)}function Bc(i,a,d){var h=i.length;if(h<2)return h?Ar(i[0]):[];for(var g=-1,v=z(h);++g<h;)for(var E=i[g],V=-1;++V<h;)V!=g&&(v[g]=qi(v[g]||E,i[V],a,d));return Ar(yt(v,1),a,d)}function qh(i,a,d){for(var h=-1,g=i.length,v=a.length,E={};++h<g;){var V=h<v?a[h]:n;d(E,i[h],V)}return E}function Vc(i){return it(i)?i:[]}function Nc(i){return typeof i=="function"?i:Mt}function Pr(i,a){return Ee(i)?i:Oc(i,a)?[i]:kf(We(i))}var YN=De;function Dr(i,a,d){var h=i.length;return d=d===n?h:d,!a&&d>=h?i:tn(i,a,d)}var Kh=IV||function(i){return gt.clearTimeout(i)};function Yh(i,a){if(a)return i.slice();var d=i.length,h=yh?yh(d):new i.constructor(d);return i.copy(h),h}function Ac(i){var a=new i.constructor(i.byteLength);return new Ks(a).set(new Ks(i)),a}function JN(i,a){var d=a?Ac(i.buffer):i.buffer;return new i.constructor(d,i.byteOffset,i.byteLength)}function XN(i){var a=new i.constructor(i.source,Dp.exec(i));return a.lastIndex=i.lastIndex,a}function QN(i){return Hi?je(Hi.call(i)):{}}function Jh(i,a){var d=a?Ac(i.buffer):i.buffer;return new i.constructor(d,i.byteOffset,i.length)}function Xh(i,a){if(i!==a){var d=i!==n,h=i===null,g=i===i,v=Ht(i),E=a!==n,V=a===null,D=a===a,q=Ht(a);if(!V&&!q&&!v&&i>a||v&&E&&D&&!V&&!q||h&&E&&D||!d&&D||!g)return 1;if(!h&&!v&&!q&&i<a||q&&d&&g&&!h&&!v||V&&d&&g||!E&&g||!D)return-1}return 0}function eA(i,a,d){for(var h=-1,g=i.criteria,v=a.criteria,E=g.length,V=d.length;++h<E;){var D=Xh(g[h],v[h]);if(D){if(h>=V)return D;var q=d[h];return D*(q=="desc"?-1:1)}}return i.index-a.index}function Qh(i,a,d,h){for(var g=-1,v=i.length,E=d.length,V=-1,D=a.length,q=ut(v-E,0),K=z(D+q),J=!h;++V<D;)K[V]=a[V];for(;++g<E;)(J||g<v)&&(K[d[g]]=i[g]);for(;q--;)K[V++]=i[g++];return K}function ef(i,a,d,h){for(var g=-1,v=i.length,E=-1,V=d.length,D=-1,q=a.length,K=ut(v-V,0),J=z(K+q),oe=!h;++g<K;)J[g]=i[g];for(var ue=g;++D<q;)J[ue+D]=a[D];for(;++E<V;)(oe||g<v)&&(J[ue+d[E]]=i[g++]);return J}function Dt(i,a){var d=-1,h=i.length;for(a||(a=z(h));++d<h;)a[d]=i[d];return a}function Ln(i,a,d,h){var g=!d;d||(d={});for(var v=-1,E=a.length;++v<E;){var V=a[v],D=h?h(d[V],i[V],V,d,i):n;D===n&&(D=i[V]),g?Yn(d,V,D):ji(d,V,D)}return d}function tA(i,a){return Ln(i,Lc(i),a)}function nA(i,a){return Ln(i,ff(i),a)}function da(i,a){return function(d,h){var g=Ee(d)?aV:kN,v=a?a():{};return g(d,i,fe(h,2),v)}}function Oo(i){return De(function(a,d){var h=-1,g=d.length,v=g>1?d[g-1]:n,E=g>2?d[2]:n;for(v=i.length>3&&typeof v=="function"?(g--,v):n,E&&Nt(d[0],d[1],E)&&(v=g<3?n:v,g=1),a=je(a);++h<g;){var V=d[h];V&&i(a,V,h,v)}return a})}function tf(i,a){return function(d,h){if(d==null)return d;if(!Ft(d))return i(d,h);for(var g=d.length,v=a?g:-1,E=je(d);(a?v--:++v<g)&&h(E[v],v,E)!==!1;);return d}}function nf(i){return function(a,d,h){for(var g=-1,v=je(a),E=h(a),V=E.length;V--;){var D=E[i?V:++g];if(d(v[D],D,v)===!1)break}return a}}function rA(i,a,d){var h=a&G,g=Xi(i);function v(){var E=this&&this!==gt&&this instanceof v?g:i;return E.apply(h?d:this,arguments)}return v}function rf(i){return function(a){a=We(a);var d=Po(a)?xn(a):n,h=d?d[0]:a.charAt(0),g=d?Dr(d,1).join(""):a.slice(1);return h[i]()+g}}function Go(i){return function(a){return nc(nm(tm(a).replace(jB,"")),i,"")}}function Xi(i){return function(){var a=arguments;switch(a.length){case 0:return new i;case 1:return new i(a[0]);case 2:return new i(a[0],a[1]);case 3:return new i(a[0],a[1],a[2]);case 4:return new i(a[0],a[1],a[2],a[3]);case 5:return new i(a[0],a[1],a[2],a[3],a[4]);case 6:return new i(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new i(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var d=Lo(i.prototype),h=i.apply(d,a);return tt(h)?h:d}}function oA(i,a,d){var h=Xi(i);function g(){for(var v=arguments.length,E=z(v),V=v,D=zo(g);V--;)E[V]=arguments[V];var q=v<3&&E[0]!==D&&E[v-1]!==D?[]:Br(E,D);if(v-=q.length,v<d)return cf(i,a,ua,g.placeholder,n,E,q,n,n,d-v);var K=this&&this!==gt&&this instanceof g?h:i;return Zt(K,this,E)}return g}function of(i){return function(a,d,h){var g=je(a);if(!Ft(a)){var v=fe(d,3);a=mt(a),d=function(V){return v(g[V],V,g)}}var E=i(a,d,h);return E>-1?g[v?a[E]:E]:n}}function sf(i){return Xn(function(a){var d=a.length,h=d,g=Qt.prototype.thru;for(i&&a.reverse();h--;){var v=a[h];if(typeof v!="function")throw new Xt(c);if(g&&!E&&ma(v)=="wrapper")var E=new Qt([],!0)}for(h=E?h:d;++h<d;){v=a[h];var V=ma(v),D=V=="wrapper"?Mc(v):n;D&&Gc(D[0])&&D[1]==(W|O|I|P)&&!D[4].length&&D[9]==1?E=E[ma(D[0])].apply(E,D[3]):E=v.length==1&&Gc(v)?E[V]():E.thru(v)}return function(){var q=arguments,K=q[0];if(E&&q.length==1&&Ee(K))return E.plant(K).value();for(var J=0,oe=d?a[J].apply(this,q):K;++J<d;)oe=a[J].call(this,oe);return oe}})}function ua(i,a,d,h,g,v,E,V,D,q){var K=a&W,J=a&G,oe=a&C,ue=a&(O|Z),ge=a&j,Pe=oe?n:Xi(i);function ye(){for(var Fe=arguments.length,Me=z(Fe),jt=Fe;jt--;)Me[jt]=arguments[jt];if(ue)var At=zo(ye),qt=gV(Me,At);if(h&&(Me=Qh(Me,h,g,ue)),v&&(Me=ef(Me,v,E,ue)),Fe-=qt,ue&&Fe<q){var st=Br(Me,At);return cf(i,a,ua,ye.placeholder,d,Me,st,V,D,q-Fe)}var En=J?d:this,nr=oe?En[i]:i;return Fe=Me.length,V?Me=kA(Me,V):ge&&Fe>1&&Me.reverse(),K&&D<Fe&&(Me.length=D),this&&this!==gt&&this instanceof ye&&(nr=Pe||Xi(nr)),nr.apply(En,Me)}return ye}function af(i,a){return function(d,h){return PN(d,i,a(h),{})}}function pa(i,a){return function(d,h){var g;if(d===n&&h===n)return a;if(d!==n&&(g=d),h!==n){if(g===n)return h;typeof d=="string"||typeof h=="string"?(d=Wt(d),h=Wt(h)):(d=Wh(d),h=Wh(h)),g=i(d,h)}return g}}function Pc(i){return Xn(function(a){return a=Xe(a,Ut(fe())),De(function(d){var h=this;return i(a,function(g){return Zt(g,h,d)})})})}function ha(i,a){a=a===n?" ":Wt(a);var d=a.length;if(d<2)return d?Sc(a,i):a;var h=Sc(a,Qs(i/Do(a)));return Po(a)?Dr(xn(h),0,i).join(""):h.slice(0,i)}function iA(i,a,d,h){var g=a&G,v=Xi(i);function E(){for(var V=-1,D=arguments.length,q=-1,K=h.length,J=z(K+D),oe=this&&this!==gt&&this instanceof E?v:i;++q<K;)J[q]=h[q];for(;D--;)J[q++]=arguments[++V];return Zt(oe,g?d:this,J)}return E}function lf(i){return function(a,d,h){return h&&typeof h!="number"&&Nt(a,d,h)&&(d=h=n),a=tr(a),d===n?(d=a,a=0):d=tr(d),h=h===n?a<d?1:-1:tr(h),UN(a,d,h,i)}}function fa(i){return function(a,d){return typeof a=="string"&&typeof d=="string"||(a=rn(a),d=rn(d)),i(a,d)}}function cf(i,a,d,h,g,v,E,V,D,q){var K=a&O,J=K?E:n,oe=K?n:E,ue=K?v:n,ge=K?n:v;a|=K?I:Y,a&=~(K?Y:I),a&F||(a&=~(G|C));var Pe=[i,a,g,ue,J,ge,oe,V,D,q],ye=d.apply(n,Pe);return Gc(i)&&wf(ye,Pe),ye.placeholder=h,bf(ye,i,a)}function Dc(i){var a=dt[i];return function(d,h){if(d=rn(d),h=h==null?0:xt(Ve(h),292),h&&wh(d)){var g=(We(d)+"e").split("e"),v=a(g[0]+"e"+(+g[1]+h));return g=(We(v)+"e").split("e"),+(g[0]+"e"+(+g[1]-h))}return a(d)}}var sA=Mo&&1/Zs(new Mo([,-0]))[1]==te?function(i){return new Mo(i)}:td;function df(i){return function(a){var d=kt(a);return d==wn?cc(a):d==bn?xV(a):mV(a,i(a))}}function Jn(i,a,d,h,g,v,E,V){var D=a&C;if(!D&&typeof i!="function")throw new Xt(c);var q=h?h.length:0;if(q||(a&=~(I|Y),h=g=n),E=E===n?E:ut(Ve(E),0),V=V===n?V:Ve(V),q-=g?g.length:0,a&Y){var K=h,J=g;h=g=n}var oe=D?n:Mc(i),ue=[i,a,d,h,g,K,J,v,E,V];if(oe&&wA(ue,oe),i=ue[0],a=ue[1],d=ue[2],h=ue[3],g=ue[4],V=ue[9]=ue[9]===n?D?0:i.length:ut(ue[9]-q,0),!V&&a&(O|Z)&&(a&=~(O|Z)),!a||a==G)var ge=rA(i,a,d);else a==O||a==Z?ge=oA(i,a,V):(a==I||a==(G|I))&&!g.length?ge=iA(i,a,d,h):ge=ua.apply(n,ue);var Pe=oe?Zh:wf;return bf(Pe(ge,ue),i,a)}function uf(i,a,d,h){return i===n||Sn(i,Ro[d])&&!He.call(h,d)?a:i}function pf(i,a,d,h,g,v){return tt(i)&&tt(a)&&(v.set(a,i),aa(i,a,n,pf,v),v.delete(a)),i}function aA(i){return ts(i)?n:i}function hf(i,a,d,h,g,v){var E=d&N,V=i.length,D=a.length;if(V!=D&&!(E&&D>V))return!1;var q=v.get(i),K=v.get(a);if(q&&K)return q==a&&K==i;var J=-1,oe=!0,ue=d&M?new to:n;for(v.set(i,a),v.set(a,i);++J<V;){var ge=i[J],Pe=a[J];if(h)var ye=E?h(Pe,ge,J,a,i,v):h(ge,Pe,J,i,a,v);if(ye!==n){if(ye)continue;oe=!1;break}if(ue){if(!rc(a,function(Fe,Me){if(!zi(ue,Me)&&(ge===Fe||g(ge,Fe,d,h,v)))return ue.push(Me)})){oe=!1;break}}else if(!(ge===Pe||g(ge,Pe,d,h,v))){oe=!1;break}}return v.delete(i),v.delete(a),oe}function lA(i,a,d,h,g,v,E){switch(d){case Vo:if(i.byteLength!=a.byteLength||i.byteOffset!=a.byteOffset)return!1;i=i.buffer,a=a.buffer;case Gi:return!(i.byteLength!=a.byteLength||!v(new Ks(i),new Ks(a)));case kr:case Sr:case Mi:return Sn(+i,+a);case Se:return i.name==a.name&&i.message==a.message;case Ii:case Li:return i==a+"";case wn:var V=cc;case bn:var D=h&N;if(V||(V=Zs),i.size!=a.size&&!D)return!1;var q=E.get(i);if(q)return q==a;h|=M,E.set(i,a);var K=hf(V(i),V(a),h,g,v,E);return E.delete(i),K;case Is:if(Hi)return Hi.call(i)==Hi.call(a)}return!1}function cA(i,a,d,h,g,v){var E=d&N,V=Fc(i),D=V.length,q=Fc(a),K=q.length;if(D!=K&&!E)return!1;for(var J=D;J--;){var oe=V[J];if(!(E?oe in a:He.call(a,oe)))return!1}var ue=v.get(i),ge=v.get(a);if(ue&&ge)return ue==a&&ge==i;var Pe=!0;v.set(i,a),v.set(a,i);for(var ye=E;++J<D;){oe=V[J];var Fe=i[oe],Me=a[oe];if(h)var jt=E?h(Me,Fe,oe,a,i,v):h(Fe,Me,oe,i,a,v);if(!(jt===n?Fe===Me||g(Fe,Me,d,h,v):jt)){Pe=!1;break}ye||(ye=oe=="constructor")}if(Pe&&!ye){var At=i.constructor,qt=a.constructor;At!=qt&&"constructor"in i&&"constructor"in a&&!(typeof At=="function"&&At instanceof At&&typeof qt=="function"&&qt instanceof qt)&&(Pe=!1)}return v.delete(i),v.delete(a),Pe}function Xn(i){return $c(vf(i,n,Bf),i+"")}function Fc(i){return Ph(i,mt,Lc)}function Rc(i){return Ph(i,Rt,ff)}var Mc=ta?function(i){return ta.get(i)}:td;function ma(i){for(var a=i.name+"",d=Io[a],h=He.call(Io,a)?d.length:0;h--;){var g=d[h],v=g.func;if(v==null||v==i)return g.name}return a}function zo(i){var a=He.call(_,"placeholder")?_:i;return a.placeholder}function fe(){var i=_.iteratee||Qc;return i=i===Qc?Rh:i,arguments.length?i(arguments[0],arguments[1]):i}function ga(i,a){var d=i.__data__;return yA(a)?d[typeof a=="string"?"string":"hash"]:d.map}function Ic(i){for(var a=mt(i),d=a.length;d--;){var h=a[d],g=i[h];a[d]=[h,g,yf(g)]}return a}function oo(i,a){var d=CV(i,a);return Fh(d)?d:n}function dA(i){var a=He.call(i,Qr),d=i[Qr];try{i[Qr]=n;var h=!0}catch{}var g=js.call(i);return h&&(a?i[Qr]=d:delete i[Qr]),g}var Lc=uc?function(i){return i==null?[]:(i=je(i),Er(uc(i),function(a){return vh.call(i,a)}))}:nd,ff=uc?function(i){for(var a=[];i;)Tr(a,Lc(i)),i=Ys(i);return a}:nd,kt=Vt;(pc&&kt(new pc(new ArrayBuffer(1)))!=Vo||Zi&&kt(new Zi)!=wn||hc&&kt(hc.resolve())!=Vp||Mo&&kt(new Mo)!=bn||Ui&&kt(new Ui)!=Oi)&&(kt=function(i){var a=Vt(i),d=a==jn?i.constructor:n,h=d?io(d):"";if(h)switch(h){case HV:return Vo;case jV:return wn;case qV:return Vp;case KV:return bn;case YV:return Oi}return a});function uA(i,a,d){for(var h=-1,g=d.length;++h<g;){var v=d[h],E=v.size;switch(v.type){case"drop":i+=E;break;case"dropRight":a-=E;break;case"take":a=xt(a,i+E);break;case"takeRight":i=ut(i,a-E);break}}return{start:i,end:a}}function pA(i){var a=i.match(_B);return a?a[1].split(vB):[]}function mf(i,a,d){a=Pr(a,i);for(var h=-1,g=a.length,v=!1;++h<g;){var E=On(a[h]);if(!(v=i!=null&&d(i,E)))break;i=i[E]}return v||++h!=g?v:(g=i==null?0:i.length,!!g&&xa(g)&&Qn(E,g)&&(Ee(i)||so(i)))}function hA(i){var a=i.length,d=new i.constructor(a);return a&&typeof i[0]=="string"&&He.call(i,"index")&&(d.index=i.index,d.input=i.input),d}function gf(i){return typeof i.constructor=="function"&&!Qi(i)?Lo(Ys(i)):{}}function fA(i,a,d){var h=i.constructor;switch(a){case Gi:return Ac(i);case kr:case Sr:return new h(+i);case Vo:return JN(i,d);case Il:case Ll:case Ol:case Gl:case zl:case $l:case Zl:case Ul:case Wl:return Jh(i,d);case wn:return new h;case Mi:case Li:return new h(i);case Ii:return XN(i);case bn:return new h;case Is:return QN(i)}}function mA(i,a){var d=a.length;if(!d)return i;var h=d-1;return a[h]=(d>1?"& ":"")+a[h],a=a.join(d>2?", ":" "),i.replace(yB,`{
|
|
72
|
+
*/Fs.exports,function(t,e){(function(){var n,o="4.17.21",s=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",f=500,m="__lodash_placeholder__",y=1,T=2,B=4,A=1,I=2,L=1,C=2,R=4,O=8,F=16,N=32,U=64,te=128,j=256,Y=512,q=30,ee="...",G=800,S=16,w=1,k=2,$=3,Q=1/0,ne=9007199254740991,be=17976931348623157e292,$e=NaN,ot=4294967295,wn=ot-1,In=ot>>>1,xr=[["ary",te],["bind",L],["bindKey",C],["curry",O],["curryRight",F],["flip",Y],["partial",N],["partialRight",U],["rearg",j]],jn="[object Arguments]",Jr="[object Array]",Os="[object AsyncFunction]",kr="[object Boolean]",Sr="[object Date]",Ls="[object DOMException]",Se="[object Error]",Xr="[object Function]",Fp="[object GeneratorFunction]",bn="[object Map]",Oi="[object Number]",vB="[object Null]",qn="[object Object]",Rp="[object Promise]",CB="[object Proxy]",Li="[object RegExp]",xn="[object Set]",Gi="[object String]",Gs="[object Symbol]",wB="[object Undefined]",zi="[object WeakMap]",bB="[object WeakSet]",$i="[object ArrayBuffer]",Ao="[object DataView]",Gl="[object Float32Array]",zl="[object Float64Array]",$l="[object Int8Array]",Ul="[object Int16Array]",Zl="[object Int32Array]",Wl="[object Uint8Array]",Hl="[object Uint8ClampedArray]",jl="[object Uint16Array]",ql="[object Uint32Array]",xB=/\b__p \+= '';/g,kB=/\b(__p \+=) '' \+/g,SB=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mp=/&(?:amp|lt|gt|quot|#39);/g,Ip=/[&<>"']/g,EB=RegExp(Mp.source),TB=RegExp(Ip.source),BB=/<%-([\s\S]+?)%>/g,VB=/<%([\s\S]+?)%>/g,Op=/<%=([\s\S]+?)%>/g,NB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,AB=/^\w*$/,PB=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Kl=/[\\^$.*+?()[\]{}|]/g,DB=RegExp(Kl.source),Yl=/^\s+/,FB=/\s/,RB=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,MB=/\{\n\/\* \[wrapped with (.+)\] \*/,IB=/,? & /,OB=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,LB=/[()=,{}\[\]\/\s]/,GB=/\\(\\)?/g,zB=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Lp=/\w*$/,$B=/^[-+]0x[0-9a-f]+$/i,UB=/^0b[01]+$/i,ZB=/^\[object .+?Constructor\]$/,WB=/^0o[0-7]+$/i,HB=/^(?:0|[1-9]\d*)$/,jB=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,zs=/($^)/,qB=/['\n\r\u2028\u2029\\]/g,$s="\\ud800-\\udfff",KB="\\u0300-\\u036f",YB="\\ufe20-\\ufe2f",JB="\\u20d0-\\u20ff",Gp=KB+YB+JB,zp="\\u2700-\\u27bf",$p="a-z\\xdf-\\xf6\\xf8-\\xff",XB="\\xac\\xb1\\xd7\\xf7",QB="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",eV="\\u2000-\\u206f",tV=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Up="A-Z\\xc0-\\xd6\\xd8-\\xde",Zp="\\ufe0e\\ufe0f",Wp=XB+QB+eV+tV,Jl="['’]",nV="["+$s+"]",Hp="["+Wp+"]",Us="["+Gp+"]",jp="\\d+",rV="["+zp+"]",qp="["+$p+"]",Kp="[^"+$s+Wp+jp+zp+$p+Up+"]",Xl="\\ud83c[\\udffb-\\udfff]",oV="(?:"+Us+"|"+Xl+")",Yp="[^"+$s+"]",Ql="(?:\\ud83c[\\udde6-\\uddff]){2}",ec="[\\ud800-\\udbff][\\udc00-\\udfff]",Po="["+Up+"]",Jp="\\u200d",Xp="(?:"+qp+"|"+Kp+")",iV="(?:"+Po+"|"+Kp+")",Qp="(?:"+Jl+"(?:d|ll|m|re|s|t|ve))?",eh="(?:"+Jl+"(?:D|LL|M|RE|S|T|VE))?",th=oV+"?",nh="["+Zp+"]?",sV="(?:"+Jp+"(?:"+[Yp,Ql,ec].join("|")+")"+nh+th+")*",aV="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lV="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",rh=nh+th+sV,cV="(?:"+[rV,Ql,ec].join("|")+")"+rh,dV="(?:"+[Yp+Us+"?",Us,Ql,ec,nV].join("|")+")",uV=RegExp(Jl,"g"),pV=RegExp(Us,"g"),tc=RegExp(Xl+"(?="+Xl+")|"+dV+rh,"g"),hV=RegExp([Po+"?"+qp+"+"+Qp+"(?="+[Hp,Po,"$"].join("|")+")",iV+"+"+eh+"(?="+[Hp,Po+Xp,"$"].join("|")+")",Po+"?"+Xp+"+"+Qp,Po+"+"+eh,lV,aV,jp,cV].join("|"),"g"),fV=RegExp("["+Jp+$s+Gp+Zp+"]"),mV=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,gV=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],yV=-1,Ye={};Ye[Gl]=Ye[zl]=Ye[$l]=Ye[Ul]=Ye[Zl]=Ye[Wl]=Ye[Hl]=Ye[jl]=Ye[ql]=!0,Ye[jn]=Ye[Jr]=Ye[$i]=Ye[kr]=Ye[Ao]=Ye[Sr]=Ye[Se]=Ye[Xr]=Ye[bn]=Ye[Oi]=Ye[qn]=Ye[Li]=Ye[xn]=Ye[Gi]=Ye[zi]=!1;var qe={};qe[jn]=qe[Jr]=qe[$i]=qe[Ao]=qe[kr]=qe[Sr]=qe[Gl]=qe[zl]=qe[$l]=qe[Ul]=qe[Zl]=qe[bn]=qe[Oi]=qe[qn]=qe[Li]=qe[xn]=qe[Gi]=qe[Gs]=qe[Wl]=qe[Hl]=qe[jl]=qe[ql]=!0,qe[Se]=qe[Xr]=qe[zi]=!1;var _V={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},vV={"&":"&","<":"<",">":">",'"':""","'":"'"},CV={"&":"&","<":"<",">":">",""":'"',"'":"'"},wV={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},bV=parseFloat,xV=parseInt,oh=typeof Ho=="object"&&Ho&&Ho.Object===Object&&Ho,kV=typeof self=="object"&&self&&self.Object===Object&&self,yt=oh||kV||Function("return this")(),nc=e&&!e.nodeType&&e,Qr=nc&&!0&&t&&!t.nodeType&&t,ih=Qr&&Qr.exports===nc,rc=ih&&oh.process,Jt=function(){try{var P=Qr&&Qr.require&&Qr.require("util").types;return P||rc&&rc.binding&&rc.binding("util")}catch{}}(),sh=Jt&&Jt.isArrayBuffer,ah=Jt&&Jt.isDate,lh=Jt&&Jt.isMap,ch=Jt&&Jt.isRegExp,dh=Jt&&Jt.isSet,uh=Jt&&Jt.isTypedArray;function Wt(P,Z,z){switch(z.length){case 0:return P.call(Z);case 1:return P.call(Z,z[0]);case 2:return P.call(Z,z[0],z[1]);case 3:return P.call(Z,z[0],z[1],z[2])}return P.apply(Z,z)}function SV(P,Z,z,ce){for(var ke=-1,Ue=P==null?0:P.length;++ke<Ue;){var ut=P[ke];Z(ce,ut,z(ut),P)}return ce}function Xt(P,Z){for(var z=-1,ce=P==null?0:P.length;++z<ce&&Z(P[z],z,P)!==!1;);return P}function EV(P,Z){for(var z=P==null?0:P.length;z--&&Z(P[z],z,P)!==!1;);return P}function ph(P,Z){for(var z=-1,ce=P==null?0:P.length;++z<ce;)if(!Z(P[z],z,P))return!1;return!0}function Er(P,Z){for(var z=-1,ce=P==null?0:P.length,ke=0,Ue=[];++z<ce;){var ut=P[z];Z(ut,z,P)&&(Ue[ke++]=ut)}return Ue}function Zs(P,Z){var z=P==null?0:P.length;return!!z&&Do(P,Z,0)>-1}function oc(P,Z,z){for(var ce=-1,ke=P==null?0:P.length;++ce<ke;)if(z(Z,P[ce]))return!0;return!1}function Xe(P,Z){for(var z=-1,ce=P==null?0:P.length,ke=Array(ce);++z<ce;)ke[z]=Z(P[z],z,P);return ke}function Tr(P,Z){for(var z=-1,ce=Z.length,ke=P.length;++z<ce;)P[ke+z]=Z[z];return P}function ic(P,Z,z,ce){var ke=-1,Ue=P==null?0:P.length;for(ce&&Ue&&(z=P[++ke]);++ke<Ue;)z=Z(z,P[ke],ke,P);return z}function TV(P,Z,z,ce){var ke=P==null?0:P.length;for(ce&&ke&&(z=P[--ke]);ke--;)z=Z(z,P[ke],ke,P);return z}function sc(P,Z){for(var z=-1,ce=P==null?0:P.length;++z<ce;)if(Z(P[z],z,P))return!0;return!1}var BV=ac("length");function VV(P){return P.split("")}function NV(P){return P.match(OB)||[]}function hh(P,Z,z){var ce;return z(P,function(ke,Ue,ut){if(Z(ke,Ue,ut))return ce=Ue,!1}),ce}function Ws(P,Z,z,ce){for(var ke=P.length,Ue=z+(ce?1:-1);ce?Ue--:++Ue<ke;)if(Z(P[Ue],Ue,P))return Ue;return-1}function Do(P,Z,z){return Z===Z?$V(P,Z,z):Ws(P,fh,z)}function AV(P,Z,z,ce){for(var ke=z-1,Ue=P.length;++ke<Ue;)if(ce(P[ke],Z))return ke;return-1}function fh(P){return P!==P}function mh(P,Z){var z=P==null?0:P.length;return z?cc(P,Z)/z:$e}function ac(P){return function(Z){return Z==null?n:Z[P]}}function lc(P){return function(Z){return P==null?n:P[Z]}}function gh(P,Z,z,ce,ke){return ke(P,function(Ue,ut,je){z=ce?(ce=!1,Ue):Z(z,Ue,ut,je)}),z}function PV(P,Z){var z=P.length;for(P.sort(Z);z--;)P[z]=P[z].value;return P}function cc(P,Z){for(var z,ce=-1,ke=P.length;++ce<ke;){var Ue=Z(P[ce]);Ue!==n&&(z=z===n?Ue:z+Ue)}return z}function dc(P,Z){for(var z=-1,ce=Array(P);++z<P;)ce[z]=Z(z);return ce}function DV(P,Z){return Xe(Z,function(z){return[z,P[z]]})}function yh(P){return P&&P.slice(0,wh(P)+1).replace(Yl,"")}function Ht(P){return function(Z){return P(Z)}}function uc(P,Z){return Xe(Z,function(z){return P[z]})}function Ui(P,Z){return P.has(Z)}function _h(P,Z){for(var z=-1,ce=P.length;++z<ce&&Do(Z,P[z],0)>-1;);return z}function vh(P,Z){for(var z=P.length;z--&&Do(Z,P[z],0)>-1;);return z}function FV(P,Z){for(var z=P.length,ce=0;z--;)P[z]===Z&&++ce;return ce}var RV=lc(_V),MV=lc(vV);function IV(P){return"\\"+wV[P]}function OV(P,Z){return P==null?n:P[Z]}function Fo(P){return fV.test(P)}function LV(P){return mV.test(P)}function GV(P){for(var Z,z=[];!(Z=P.next()).done;)z.push(Z.value);return z}function pc(P){var Z=-1,z=Array(P.size);return P.forEach(function(ce,ke){z[++Z]=[ke,ce]}),z}function Ch(P,Z){return function(z){return P(Z(z))}}function Br(P,Z){for(var z=-1,ce=P.length,ke=0,Ue=[];++z<ce;){var ut=P[z];(ut===Z||ut===m)&&(P[z]=m,Ue[ke++]=z)}return Ue}function Hs(P){var Z=-1,z=Array(P.size);return P.forEach(function(ce){z[++Z]=ce}),z}function zV(P){var Z=-1,z=Array(P.size);return P.forEach(function(ce){z[++Z]=[ce,ce]}),z}function $V(P,Z,z){for(var ce=z-1,ke=P.length;++ce<ke;)if(P[ce]===Z)return ce;return-1}function UV(P,Z,z){for(var ce=z+1;ce--;)if(P[ce]===Z)return ce;return ce}function Ro(P){return Fo(P)?WV(P):BV(P)}function kn(P){return Fo(P)?HV(P):VV(P)}function wh(P){for(var Z=P.length;Z--&&FB.test(P.charAt(Z)););return Z}var ZV=lc(CV);function WV(P){for(var Z=tc.lastIndex=0;tc.test(P);)++Z;return Z}function HV(P){return P.match(tc)||[]}function jV(P){return P.match(hV)||[]}var qV=function P(Z){Z=Z==null?yt:Mo.defaults(yt.Object(),Z,Mo.pick(yt,gV));var z=Z.Array,ce=Z.Date,ke=Z.Error,Ue=Z.Function,ut=Z.Math,je=Z.Object,hc=Z.RegExp,KV=Z.String,Qt=Z.TypeError,js=z.prototype,YV=Ue.prototype,Io=je.prototype,qs=Z["__core-js_shared__"],Ks=YV.toString,He=Io.hasOwnProperty,JV=0,bh=function(){var i=/[^.]+$/.exec(qs&&qs.keys&&qs.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),Ys=Io.toString,XV=Ks.call(je),QV=yt._,eN=hc("^"+Ks.call(He).replace(Kl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Js=ih?Z.Buffer:n,Vr=Z.Symbol,Xs=Z.Uint8Array,xh=Js?Js.allocUnsafe:n,Qs=Ch(je.getPrototypeOf,je),kh=je.create,Sh=Io.propertyIsEnumerable,ea=js.splice,Eh=Vr?Vr.isConcatSpreadable:n,Zi=Vr?Vr.iterator:n,eo=Vr?Vr.toStringTag:n,ta=function(){try{var i=io(je,"defineProperty");return i({},"",{}),i}catch{}}(),tN=Z.clearTimeout!==yt.clearTimeout&&Z.clearTimeout,nN=ce&&ce.now!==yt.Date.now&&ce.now,rN=Z.setTimeout!==yt.setTimeout&&Z.setTimeout,na=ut.ceil,ra=ut.floor,fc=je.getOwnPropertySymbols,oN=Js?Js.isBuffer:n,Th=Z.isFinite,iN=js.join,sN=Ch(je.keys,je),pt=ut.max,kt=ut.min,aN=ce.now,lN=Z.parseInt,Bh=ut.random,cN=js.reverse,mc=io(Z,"DataView"),Wi=io(Z,"Map"),gc=io(Z,"Promise"),Oo=io(Z,"Set"),Hi=io(Z,"WeakMap"),ji=io(je,"create"),oa=Hi&&new Hi,Lo={},dN=so(mc),uN=so(Wi),pN=so(gc),hN=so(Oo),fN=so(Hi),ia=Vr?Vr.prototype:n,qi=ia?ia.valueOf:n,Vh=ia?ia.toString:n;function _(i){if(nt(i)&&!Ee(i)&&!(i instanceof Re)){if(i instanceof en)return i;if(He.call(i,"__wrapped__"))return Af(i)}return new en(i)}var Go=function(){function i(){}return function(a){if(!tt(a))return{};if(kh)return kh(a);i.prototype=a;var d=new i;return i.prototype=n,d}}();function sa(){}function en(i,a){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=n}_.templateSettings={escape:BB,evaluate:VB,interpolate:Op,variable:"",imports:{_}},_.prototype=sa.prototype,_.prototype.constructor=_,en.prototype=Go(sa.prototype),en.prototype.constructor=en;function Re(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ot,this.__views__=[]}function mN(){var i=new Re(this.__wrapped__);return i.__actions__=Ft(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Ft(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Ft(this.__views__),i}function gN(){if(this.__filtered__){var i=new Re(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function yN(){var i=this.__wrapped__.value(),a=this.__dir__,d=Ee(i),h=a<0,g=d?i.length:0,v=VA(0,g,this.__views__),E=v.start,V=v.end,D=V-E,W=h?V:E-1,H=this.__iteratees__,K=H.length,oe=0,ue=kt(D,this.__takeCount__);if(!d||!h&&g==D&&ue==D)return Qh(i,this.__actions__);var ge=[];e:for(;D--&&oe<ue;){W+=a;for(var Pe=-1,ye=i[W];++Pe<K;){var Fe=H[Pe],Me=Fe.iteratee,Kt=Fe.type,Pt=Me(ye);if(Kt==k)ye=Pt;else if(!Pt){if(Kt==w)continue e;break e}}ge[oe++]=ye}return ge}Re.prototype=Go(sa.prototype),Re.prototype.constructor=Re;function to(i){var a=-1,d=i==null?0:i.length;for(this.clear();++a<d;){var h=i[a];this.set(h[0],h[1])}}function _N(){this.__data__=ji?ji(null):{},this.size=0}function vN(i){var a=this.has(i)&&delete this.__data__[i];return this.size-=a?1:0,a}function CN(i){var a=this.__data__;if(ji){var d=a[i];return d===p?n:d}return He.call(a,i)?a[i]:n}function wN(i){var a=this.__data__;return ji?a[i]!==n:He.call(a,i)}function bN(i,a){var d=this.__data__;return this.size+=this.has(i)?0:1,d[i]=ji&&a===n?p:a,this}to.prototype.clear=_N,to.prototype.delete=vN,to.prototype.get=CN,to.prototype.has=wN,to.prototype.set=bN;function Kn(i){var a=-1,d=i==null?0:i.length;for(this.clear();++a<d;){var h=i[a];this.set(h[0],h[1])}}function xN(){this.__data__=[],this.size=0}function kN(i){var a=this.__data__,d=aa(a,i);if(d<0)return!1;var h=a.length-1;return d==h?a.pop():ea.call(a,d,1),--this.size,!0}function SN(i){var a=this.__data__,d=aa(a,i);return d<0?n:a[d][1]}function EN(i){return aa(this.__data__,i)>-1}function TN(i,a){var d=this.__data__,h=aa(d,i);return h<0?(++this.size,d.push([i,a])):d[h][1]=a,this}Kn.prototype.clear=xN,Kn.prototype.delete=kN,Kn.prototype.get=SN,Kn.prototype.has=EN,Kn.prototype.set=TN;function Yn(i){var a=-1,d=i==null?0:i.length;for(this.clear();++a<d;){var h=i[a];this.set(h[0],h[1])}}function BN(){this.size=0,this.__data__={hash:new to,map:new(Wi||Kn),string:new to}}function VN(i){var a=va(this,i).delete(i);return this.size-=a?1:0,a}function NN(i){return va(this,i).get(i)}function AN(i){return va(this,i).has(i)}function PN(i,a){var d=va(this,i),h=d.size;return d.set(i,a),this.size+=d.size==h?0:1,this}Yn.prototype.clear=BN,Yn.prototype.delete=VN,Yn.prototype.get=NN,Yn.prototype.has=AN,Yn.prototype.set=PN;function no(i){var a=-1,d=i==null?0:i.length;for(this.__data__=new Yn;++a<d;)this.add(i[a])}function DN(i){return this.__data__.set(i,p),this}function FN(i){return this.__data__.has(i)}no.prototype.add=no.prototype.push=DN,no.prototype.has=FN;function Sn(i){var a=this.__data__=new Kn(i);this.size=a.size}function RN(){this.__data__=new Kn,this.size=0}function MN(i){var a=this.__data__,d=a.delete(i);return this.size=a.size,d}function IN(i){return this.__data__.get(i)}function ON(i){return this.__data__.has(i)}function LN(i,a){var d=this.__data__;if(d instanceof Kn){var h=d.__data__;if(!Wi||h.length<s-1)return h.push([i,a]),this.size=++d.size,this;d=this.__data__=new Yn(h)}return d.set(i,a),this.size=d.size,this}Sn.prototype.clear=RN,Sn.prototype.delete=MN,Sn.prototype.get=IN,Sn.prototype.has=ON,Sn.prototype.set=LN;function Nh(i,a){var d=Ee(i),h=!d&&ao(i),g=!d&&!h&&Fr(i),v=!d&&!h&&!g&&Zo(i),E=d||h||g||v,V=E?dc(i.length,KV):[],D=V.length;for(var W in i)(a||He.call(i,W))&&!(E&&(W=="length"||g&&(W=="offset"||W=="parent")||v&&(W=="buffer"||W=="byteLength"||W=="byteOffset")||er(W,D)))&&V.push(W);return V}function Ah(i){var a=i.length;return a?i[Tc(0,a-1)]:n}function GN(i,a){return Ca(Ft(i),ro(a,0,i.length))}function zN(i){return Ca(Ft(i))}function yc(i,a,d){(d!==n&&!En(i[a],d)||d===n&&!(a in i))&&Jn(i,a,d)}function Ki(i,a,d){var h=i[a];(!(He.call(i,a)&&En(h,d))||d===n&&!(a in i))&&Jn(i,a,d)}function aa(i,a){for(var d=i.length;d--;)if(En(i[d][0],a))return d;return-1}function $N(i,a,d,h){return Nr(i,function(g,v,E){a(h,g,d(g),E)}),h}function Ph(i,a){return i&&Ln(a,gt(a),i)}function UN(i,a){return i&&Ln(a,Mt(a),i)}function Jn(i,a,d){a=="__proto__"&&ta?ta(i,a,{configurable:!0,enumerable:!0,value:d,writable:!0}):i[a]=d}function _c(i,a){for(var d=-1,h=a.length,g=z(h),v=i==null;++d<h;)g[d]=v?n:Xc(i,a[d]);return g}function ro(i,a,d){return i===i&&(d!==n&&(i=i<=d?i:d),a!==n&&(i=i>=a?i:a)),i}function tn(i,a,d,h,g,v){var E,V=a&y,D=a&T,W=a&B;if(d&&(E=g?d(i,h,g,v):d(i)),E!==n)return E;if(!tt(i))return i;var H=Ee(i);if(H){if(E=AA(i),!V)return Ft(i,E)}else{var K=St(i),oe=K==Xr||K==Fp;if(Fr(i))return nf(i,V);if(K==qn||K==jn||oe&&!g){if(E=D||oe?{}:bf(i),!V)return D?CA(i,UN(E,i)):vA(i,Ph(E,i))}else{if(!qe[K])return g?i:{};E=PA(i,K,V)}}v||(v=new Sn);var ue=v.get(i);if(ue)return ue;v.set(i,E),Jf(i)?i.forEach(function(ye){E.add(tn(ye,a,d,ye,i,v))}):Kf(i)&&i.forEach(function(ye,Fe){E.set(Fe,tn(ye,a,d,Fe,i,v))});var ge=W?D?Oc:Ic:D?Mt:gt,Pe=H?n:ge(i);return Xt(Pe||i,function(ye,Fe){Pe&&(Fe=ye,ye=i[Fe]),Ki(E,Fe,tn(ye,a,d,Fe,i,v))}),E}function ZN(i){var a=gt(i);return function(d){return Dh(d,i,a)}}function Dh(i,a,d){var h=d.length;if(i==null)return!h;for(i=je(i);h--;){var g=d[h],v=a[g],E=i[g];if(E===n&&!(g in i)||!v(E))return!1}return!0}function Fh(i,a,d){if(typeof i!="function")throw new Qt(c);return ns(function(){i.apply(n,d)},a)}function Yi(i,a,d,h){var g=-1,v=Zs,E=!0,V=i.length,D=[],W=a.length;if(!V)return D;d&&(a=Xe(a,Ht(d))),h?(v=oc,E=!1):a.length>=s&&(v=Ui,E=!1,a=new no(a));e:for(;++g<V;){var H=i[g],K=d==null?H:d(H);if(H=h||H!==0?H:0,E&&K===K){for(var oe=W;oe--;)if(a[oe]===K)continue e;D.push(H)}else v(a,K,h)||D.push(H)}return D}var Nr=lf(On),Rh=lf(Cc,!0);function WN(i,a){var d=!0;return Nr(i,function(h,g,v){return d=!!a(h,g,v),d}),d}function la(i,a,d){for(var h=-1,g=i.length;++h<g;){var v=i[h],E=a(v);if(E!=null&&(V===n?E===E&&!qt(E):d(E,V)))var V=E,D=v}return D}function HN(i,a,d,h){var g=i.length;for(d=Ve(d),d<0&&(d=-d>g?0:g+d),h=h===n||h>g?g:Ve(h),h<0&&(h+=g),h=d>h?0:Qf(h);d<h;)i[d++]=a;return i}function Mh(i,a){var d=[];return Nr(i,function(h,g,v){a(h,g,v)&&d.push(h)}),d}function _t(i,a,d,h,g){var v=-1,E=i.length;for(d||(d=FA),g||(g=[]);++v<E;){var V=i[v];a>0&&d(V)?a>1?_t(V,a-1,d,h,g):Tr(g,V):h||(g[g.length]=V)}return g}var vc=cf(),Ih=cf(!0);function On(i,a){return i&&vc(i,a,gt)}function Cc(i,a){return i&&Ih(i,a,gt)}function ca(i,a){return Er(a,function(d){return tr(i[d])})}function oo(i,a){a=Pr(a,i);for(var d=0,h=a.length;i!=null&&d<h;)i=i[Gn(a[d++])];return d&&d==h?i:n}function Oh(i,a,d){var h=a(i);return Ee(i)?h:Tr(h,d(i))}function Nt(i){return i==null?i===n?wB:vB:eo&&eo in je(i)?BA(i):zA(i)}function wc(i,a){return i>a}function jN(i,a){return i!=null&&He.call(i,a)}function qN(i,a){return i!=null&&a in je(i)}function KN(i,a,d){return i>=kt(a,d)&&i<pt(a,d)}function bc(i,a,d){for(var h=d?oc:Zs,g=i[0].length,v=i.length,E=v,V=z(v),D=1/0,W=[];E--;){var H=i[E];E&&a&&(H=Xe(H,Ht(a))),D=kt(H.length,D),V[E]=!d&&(a||g>=120&&H.length>=120)?new no(E&&H):n}H=i[0];var K=-1,oe=V[0];e:for(;++K<g&&W.length<D;){var ue=H[K],ge=a?a(ue):ue;if(ue=d||ue!==0?ue:0,!(oe?Ui(oe,ge):h(W,ge,d))){for(E=v;--E;){var Pe=V[E];if(!(Pe?Ui(Pe,ge):h(i[E],ge,d)))continue e}oe&&oe.push(ge),W.push(ue)}}return W}function YN(i,a,d,h){return On(i,function(g,v,E){a(h,d(g),v,E)}),h}function Ji(i,a,d){a=Pr(a,i),i=Ef(i,a);var h=i==null?i:i[Gn(rn(a))];return h==null?n:Wt(h,i,d)}function Lh(i){return nt(i)&&Nt(i)==jn}function JN(i){return nt(i)&&Nt(i)==$i}function XN(i){return nt(i)&&Nt(i)==Sr}function Xi(i,a,d,h,g){return i===a?!0:i==null||a==null||!nt(i)&&!nt(a)?i!==i&&a!==a:QN(i,a,d,h,Xi,g)}function QN(i,a,d,h,g,v){var E=Ee(i),V=Ee(a),D=E?Jr:St(i),W=V?Jr:St(a);D=D==jn?qn:D,W=W==jn?qn:W;var H=D==qn,K=W==qn,oe=D==W;if(oe&&Fr(i)){if(!Fr(a))return!1;E=!0,H=!1}if(oe&&!H)return v||(v=new Sn),E||Zo(i)?vf(i,a,d,h,g,v):EA(i,a,D,d,h,g,v);if(!(d&A)){var ue=H&&He.call(i,"__wrapped__"),ge=K&&He.call(a,"__wrapped__");if(ue||ge){var Pe=ue?i.value():i,ye=ge?a.value():a;return v||(v=new Sn),g(Pe,ye,d,h,v)}}return oe?(v||(v=new Sn),TA(i,a,d,h,g,v)):!1}function eA(i){return nt(i)&&St(i)==bn}function xc(i,a,d,h){var g=d.length,v=g,E=!h;if(i==null)return!v;for(i=je(i);g--;){var V=d[g];if(E&&V[2]?V[1]!==i[V[0]]:!(V[0]in i))return!1}for(;++g<v;){V=d[g];var D=V[0],W=i[D],H=V[1];if(E&&V[2]){if(W===n&&!(D in i))return!1}else{var K=new Sn;if(h)var oe=h(W,H,D,i,a,K);if(!(oe===n?Xi(H,W,A|I,h,K):oe))return!1}}return!0}function Gh(i){if(!tt(i)||MA(i))return!1;var a=tr(i)?eN:ZB;return a.test(so(i))}function tA(i){return nt(i)&&Nt(i)==Li}function nA(i){return nt(i)&&St(i)==xn}function rA(i){return nt(i)&&Ea(i.length)&&!!Ye[Nt(i)]}function zh(i){return typeof i=="function"?i:i==null?It:typeof i=="object"?Ee(i)?Zh(i[0],i[1]):Uh(i):dm(i)}function kc(i){if(!ts(i))return sN(i);var a=[];for(var d in je(i))He.call(i,d)&&d!="constructor"&&a.push(d);return a}function oA(i){if(!tt(i))return GA(i);var a=ts(i),d=[];for(var h in i)h=="constructor"&&(a||!He.call(i,h))||d.push(h);return d}function Sc(i,a){return i<a}function $h(i,a){var d=-1,h=Rt(i)?z(i.length):[];return Nr(i,function(g,v,E){h[++d]=a(g,v,E)}),h}function Uh(i){var a=Gc(i);return a.length==1&&a[0][2]?kf(a[0][0],a[0][1]):function(d){return d===i||xc(d,i,a)}}function Zh(i,a){return $c(i)&&xf(a)?kf(Gn(i),a):function(d){var h=Xc(d,i);return h===n&&h===a?Qc(d,i):Xi(a,h,A|I)}}function da(i,a,d,h,g){i!==a&&vc(a,function(v,E){if(g||(g=new Sn),tt(v))iA(i,a,E,d,da,h,g);else{var V=h?h(Zc(i,E),v,E+"",i,a,g):n;V===n&&(V=v),yc(i,E,V)}},Mt)}function iA(i,a,d,h,g,v,E){var V=Zc(i,d),D=Zc(a,d),W=E.get(D);if(W){yc(i,d,W);return}var H=v?v(V,D,d+"",i,a,E):n,K=H===n;if(K){var oe=Ee(D),ue=!oe&&Fr(D),ge=!oe&&!ue&&Zo(D);H=D,oe||ue||ge?Ee(V)?H=V:it(V)?H=Ft(V):ue?(K=!1,H=nf(D,!0)):ge?(K=!1,H=rf(D,!0)):H=[]:rs(D)||ao(D)?(H=V,ao(V)?H=em(V):(!tt(V)||tr(V))&&(H=bf(D))):K=!1}K&&(E.set(D,H),g(H,D,h,v,E),E.delete(D)),yc(i,d,H)}function Wh(i,a){var d=i.length;if(d)return a+=a<0?d:0,er(a,d)?i[a]:n}function Hh(i,a,d){a.length?a=Xe(a,function(v){return Ee(v)?function(E){return oo(E,v.length===1?v[0]:v)}:v}):a=[It];var h=-1;a=Xe(a,Ht(fe()));var g=$h(i,function(v,E,V){var D=Xe(a,function(W){return W(v)});return{criteria:D,index:++h,value:v}});return PV(g,function(v,E){return _A(v,E,d)})}function sA(i,a){return jh(i,a,function(d,h){return Qc(i,h)})}function jh(i,a,d){for(var h=-1,g=a.length,v={};++h<g;){var E=a[h],V=oo(i,E);d(V,E)&&Qi(v,Pr(E,i),V)}return v}function aA(i){return function(a){return oo(a,i)}}function Ec(i,a,d,h){var g=h?AV:Do,v=-1,E=a.length,V=i;for(i===a&&(a=Ft(a)),d&&(V=Xe(i,Ht(d)));++v<E;)for(var D=0,W=a[v],H=d?d(W):W;(D=g(V,H,D,h))>-1;)V!==i&&ea.call(V,D,1),ea.call(i,D,1);return i}function qh(i,a){for(var d=i?a.length:0,h=d-1;d--;){var g=a[d];if(d==h||g!==v){var v=g;er(g)?ea.call(i,g,1):Nc(i,g)}}return i}function Tc(i,a){return i+ra(Bh()*(a-i+1))}function lA(i,a,d,h){for(var g=-1,v=pt(na((a-i)/(d||1)),0),E=z(v);v--;)E[h?v:++g]=i,i+=d;return E}function Bc(i,a){var d="";if(!i||a<1||a>ne)return d;do a%2&&(d+=i),a=ra(a/2),a&&(i+=i);while(a);return d}function De(i,a){return Wc(Sf(i,a,It),i+"")}function cA(i){return Ah(Wo(i))}function dA(i,a){var d=Wo(i);return Ca(d,ro(a,0,d.length))}function Qi(i,a,d,h){if(!tt(i))return i;a=Pr(a,i);for(var g=-1,v=a.length,E=v-1,V=i;V!=null&&++g<v;){var D=Gn(a[g]),W=d;if(D==="__proto__"||D==="constructor"||D==="prototype")return i;if(g!=E){var H=V[D];W=h?h(H,D,V):n,W===n&&(W=tt(H)?H:er(a[g+1])?[]:{})}Ki(V,D,W),V=V[D]}return i}var Kh=oa?function(i,a){return oa.set(i,a),i}:It,uA=ta?function(i,a){return ta(i,"toString",{configurable:!0,enumerable:!1,value:td(a),writable:!0})}:It;function pA(i){return Ca(Wo(i))}function nn(i,a,d){var h=-1,g=i.length;a<0&&(a=-a>g?0:g+a),d=d>g?g:d,d<0&&(d+=g),g=a>d?0:d-a>>>0,a>>>=0;for(var v=z(g);++h<g;)v[h]=i[h+a];return v}function hA(i,a){var d;return Nr(i,function(h,g,v){return d=a(h,g,v),!d}),!!d}function ua(i,a,d){var h=0,g=i==null?h:i.length;if(typeof a=="number"&&a===a&&g<=In){for(;h<g;){var v=h+g>>>1,E=i[v];E!==null&&!qt(E)&&(d?E<=a:E<a)?h=v+1:g=v}return g}return Vc(i,a,It,d)}function Vc(i,a,d,h){var g=0,v=i==null?0:i.length;if(v===0)return 0;a=d(a);for(var E=a!==a,V=a===null,D=qt(a),W=a===n;g<v;){var H=ra((g+v)/2),K=d(i[H]),oe=K!==n,ue=K===null,ge=K===K,Pe=qt(K);if(E)var ye=h||ge;else W?ye=ge&&(h||oe):V?ye=ge&&oe&&(h||!ue):D?ye=ge&&oe&&!ue&&(h||!Pe):ue||Pe?ye=!1:ye=h?K<=a:K<a;ye?g=H+1:v=H}return kt(v,wn)}function Yh(i,a){for(var d=-1,h=i.length,g=0,v=[];++d<h;){var E=i[d],V=a?a(E):E;if(!d||!En(V,D)){var D=V;v[g++]=E===0?0:E}}return v}function Jh(i){return typeof i=="number"?i:qt(i)?$e:+i}function jt(i){if(typeof i=="string")return i;if(Ee(i))return Xe(i,jt)+"";if(qt(i))return Vh?Vh.call(i):"";var a=i+"";return a=="0"&&1/i==-Q?"-0":a}function Ar(i,a,d){var h=-1,g=Zs,v=i.length,E=!0,V=[],D=V;if(d)E=!1,g=oc;else if(v>=s){var W=a?null:kA(i);if(W)return Hs(W);E=!1,g=Ui,D=new no}else D=a?[]:V;e:for(;++h<v;){var H=i[h],K=a?a(H):H;if(H=d||H!==0?H:0,E&&K===K){for(var oe=D.length;oe--;)if(D[oe]===K)continue e;a&&D.push(K),V.push(H)}else g(D,K,d)||(D!==V&&D.push(K),V.push(H))}return V}function Nc(i,a){return a=Pr(a,i),i=Ef(i,a),i==null||delete i[Gn(rn(a))]}function Xh(i,a,d,h){return Qi(i,a,d(oo(i,a)),h)}function pa(i,a,d,h){for(var g=i.length,v=h?g:-1;(h?v--:++v<g)&&a(i[v],v,i););return d?nn(i,h?0:v,h?v+1:g):nn(i,h?v+1:0,h?g:v)}function Qh(i,a){var d=i;return d instanceof Re&&(d=d.value()),ic(a,function(h,g){return g.func.apply(g.thisArg,Tr([h],g.args))},d)}function Ac(i,a,d){var h=i.length;if(h<2)return h?Ar(i[0]):[];for(var g=-1,v=z(h);++g<h;)for(var E=i[g],V=-1;++V<h;)V!=g&&(v[g]=Yi(v[g]||E,i[V],a,d));return Ar(_t(v,1),a,d)}function ef(i,a,d){for(var h=-1,g=i.length,v=a.length,E={};++h<g;){var V=h<v?a[h]:n;d(E,i[h],V)}return E}function Pc(i){return it(i)?i:[]}function Dc(i){return typeof i=="function"?i:It}function Pr(i,a){return Ee(i)?i:$c(i,a)?[i]:Nf(We(i))}var fA=De;function Dr(i,a,d){var h=i.length;return d=d===n?h:d,!a&&d>=h?i:nn(i,a,d)}var tf=tN||function(i){return yt.clearTimeout(i)};function nf(i,a){if(a)return i.slice();var d=i.length,h=xh?xh(d):new i.constructor(d);return i.copy(h),h}function Fc(i){var a=new i.constructor(i.byteLength);return new Xs(a).set(new Xs(i)),a}function mA(i,a){var d=a?Fc(i.buffer):i.buffer;return new i.constructor(d,i.byteOffset,i.byteLength)}function gA(i){var a=new i.constructor(i.source,Lp.exec(i));return a.lastIndex=i.lastIndex,a}function yA(i){return qi?je(qi.call(i)):{}}function rf(i,a){var d=a?Fc(i.buffer):i.buffer;return new i.constructor(d,i.byteOffset,i.length)}function of(i,a){if(i!==a){var d=i!==n,h=i===null,g=i===i,v=qt(i),E=a!==n,V=a===null,D=a===a,W=qt(a);if(!V&&!W&&!v&&i>a||v&&E&&D&&!V&&!W||h&&E&&D||!d&&D||!g)return 1;if(!h&&!v&&!W&&i<a||W&&d&&g&&!h&&!v||V&&d&&g||!E&&g||!D)return-1}return 0}function _A(i,a,d){for(var h=-1,g=i.criteria,v=a.criteria,E=g.length,V=d.length;++h<E;){var D=of(g[h],v[h]);if(D){if(h>=V)return D;var W=d[h];return D*(W=="desc"?-1:1)}}return i.index-a.index}function sf(i,a,d,h){for(var g=-1,v=i.length,E=d.length,V=-1,D=a.length,W=pt(v-E,0),H=z(D+W),K=!h;++V<D;)H[V]=a[V];for(;++g<E;)(K||g<v)&&(H[d[g]]=i[g]);for(;W--;)H[V++]=i[g++];return H}function af(i,a,d,h){for(var g=-1,v=i.length,E=-1,V=d.length,D=-1,W=a.length,H=pt(v-V,0),K=z(H+W),oe=!h;++g<H;)K[g]=i[g];for(var ue=g;++D<W;)K[ue+D]=a[D];for(;++E<V;)(oe||g<v)&&(K[ue+d[E]]=i[g++]);return K}function Ft(i,a){var d=-1,h=i.length;for(a||(a=z(h));++d<h;)a[d]=i[d];return a}function Ln(i,a,d,h){var g=!d;d||(d={});for(var v=-1,E=a.length;++v<E;){var V=a[v],D=h?h(d[V],i[V],V,d,i):n;D===n&&(D=i[V]),g?Jn(d,V,D):Ki(d,V,D)}return d}function vA(i,a){return Ln(i,zc(i),a)}function CA(i,a){return Ln(i,Cf(i),a)}function ha(i,a){return function(d,h){var g=Ee(d)?SV:$N,v=a?a():{};return g(d,i,fe(h,2),v)}}function zo(i){return De(function(a,d){var h=-1,g=d.length,v=g>1?d[g-1]:n,E=g>2?d[2]:n;for(v=i.length>3&&typeof v=="function"?(g--,v):n,E&&At(d[0],d[1],E)&&(v=g<3?n:v,g=1),a=je(a);++h<g;){var V=d[h];V&&i(a,V,h,v)}return a})}function lf(i,a){return function(d,h){if(d==null)return d;if(!Rt(d))return i(d,h);for(var g=d.length,v=a?g:-1,E=je(d);(a?v--:++v<g)&&h(E[v],v,E)!==!1;);return d}}function cf(i){return function(a,d,h){for(var g=-1,v=je(a),E=h(a),V=E.length;V--;){var D=E[i?V:++g];if(d(v[D],D,v)===!1)break}return a}}function wA(i,a,d){var h=a&L,g=es(i);function v(){var E=this&&this!==yt&&this instanceof v?g:i;return E.apply(h?d:this,arguments)}return v}function df(i){return function(a){a=We(a);var d=Fo(a)?kn(a):n,h=d?d[0]:a.charAt(0),g=d?Dr(d,1).join(""):a.slice(1);return h[i]()+g}}function $o(i){return function(a){return ic(lm(am(a).replace(uV,"")),i,"")}}function es(i){return function(){var a=arguments;switch(a.length){case 0:return new i;case 1:return new i(a[0]);case 2:return new i(a[0],a[1]);case 3:return new i(a[0],a[1],a[2]);case 4:return new i(a[0],a[1],a[2],a[3]);case 5:return new i(a[0],a[1],a[2],a[3],a[4]);case 6:return new i(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new i(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var d=Go(i.prototype),h=i.apply(d,a);return tt(h)?h:d}}function bA(i,a,d){var h=es(i);function g(){for(var v=arguments.length,E=z(v),V=v,D=Uo(g);V--;)E[V]=arguments[V];var W=v<3&&E[0]!==D&&E[v-1]!==D?[]:Br(E,D);if(v-=W.length,v<d)return mf(i,a,fa,g.placeholder,n,E,W,n,n,d-v);var H=this&&this!==yt&&this instanceof g?h:i;return Wt(H,this,E)}return g}function uf(i){return function(a,d,h){var g=je(a);if(!Rt(a)){var v=fe(d,3);a=gt(a),d=function(V){return v(g[V],V,g)}}var E=i(a,d,h);return E>-1?g[v?a[E]:E]:n}}function pf(i){return Qn(function(a){var d=a.length,h=d,g=en.prototype.thru;for(i&&a.reverse();h--;){var v=a[h];if(typeof v!="function")throw new Qt(c);if(g&&!E&&_a(v)=="wrapper")var E=new en([],!0)}for(h=E?h:d;++h<d;){v=a[h];var V=_a(v),D=V=="wrapper"?Lc(v):n;D&&Uc(D[0])&&D[1]==(te|O|N|j)&&!D[4].length&&D[9]==1?E=E[_a(D[0])].apply(E,D[3]):E=v.length==1&&Uc(v)?E[V]():E.thru(v)}return function(){var W=arguments,H=W[0];if(E&&W.length==1&&Ee(H))return E.plant(H).value();for(var K=0,oe=d?a[K].apply(this,W):H;++K<d;)oe=a[K].call(this,oe);return oe}})}function fa(i,a,d,h,g,v,E,V,D,W){var H=a&te,K=a&L,oe=a&C,ue=a&(O|F),ge=a&Y,Pe=oe?n:es(i);function ye(){for(var Fe=arguments.length,Me=z(Fe),Kt=Fe;Kt--;)Me[Kt]=arguments[Kt];if(ue)var Pt=Uo(ye),Yt=FV(Me,Pt);if(h&&(Me=sf(Me,h,g,ue)),v&&(Me=af(Me,v,E,ue)),Fe-=Yt,ue&&Fe<W){var st=Br(Me,Pt);return mf(i,a,fa,ye.placeholder,d,Me,st,V,D,W-Fe)}var Tn=K?d:this,rr=oe?Tn[i]:i;return Fe=Me.length,V?Me=$A(Me,V):ge&&Fe>1&&Me.reverse(),H&&D<Fe&&(Me.length=D),this&&this!==yt&&this instanceof ye&&(rr=Pe||es(rr)),rr.apply(Tn,Me)}return ye}function hf(i,a){return function(d,h){return YN(d,i,a(h),{})}}function ma(i,a){return function(d,h){var g;if(d===n&&h===n)return a;if(d!==n&&(g=d),h!==n){if(g===n)return h;typeof d=="string"||typeof h=="string"?(d=jt(d),h=jt(h)):(d=Jh(d),h=Jh(h)),g=i(d,h)}return g}}function Rc(i){return Qn(function(a){return a=Xe(a,Ht(fe())),De(function(d){var h=this;return i(a,function(g){return Wt(g,h,d)})})})}function ga(i,a){a=a===n?" ":jt(a);var d=a.length;if(d<2)return d?Bc(a,i):a;var h=Bc(a,na(i/Ro(a)));return Fo(a)?Dr(kn(h),0,i).join(""):h.slice(0,i)}function xA(i,a,d,h){var g=a&L,v=es(i);function E(){for(var V=-1,D=arguments.length,W=-1,H=h.length,K=z(H+D),oe=this&&this!==yt&&this instanceof E?v:i;++W<H;)K[W]=h[W];for(;D--;)K[W++]=arguments[++V];return Wt(oe,g?d:this,K)}return E}function ff(i){return function(a,d,h){return h&&typeof h!="number"&&At(a,d,h)&&(d=h=n),a=nr(a),d===n?(d=a,a=0):d=nr(d),h=h===n?a<d?1:-1:nr(h),lA(a,d,h,i)}}function ya(i){return function(a,d){return typeof a=="string"&&typeof d=="string"||(a=on(a),d=on(d)),i(a,d)}}function mf(i,a,d,h,g,v,E,V,D,W){var H=a&O,K=H?E:n,oe=H?n:E,ue=H?v:n,ge=H?n:v;a|=H?N:U,a&=~(H?U:N),a&R||(a&=~(L|C));var Pe=[i,a,g,ue,K,ge,oe,V,D,W],ye=d.apply(n,Pe);return Uc(i)&&Tf(ye,Pe),ye.placeholder=h,Bf(ye,i,a)}function Mc(i){var a=ut[i];return function(d,h){if(d=on(d),h=h==null?0:kt(Ve(h),292),h&&Th(d)){var g=(We(d)+"e").split("e"),v=a(g[0]+"e"+(+g[1]+h));return g=(We(v)+"e").split("e"),+(g[0]+"e"+(+g[1]-h))}return a(d)}}var kA=Oo&&1/Hs(new Oo([,-0]))[1]==Q?function(i){return new Oo(i)}:od;function gf(i){return function(a){var d=St(a);return d==bn?pc(a):d==xn?zV(a):DV(a,i(a))}}function Xn(i,a,d,h,g,v,E,V){var D=a&C;if(!D&&typeof i!="function")throw new Qt(c);var W=h?h.length:0;if(W||(a&=~(N|U),h=g=n),E=E===n?E:pt(Ve(E),0),V=V===n?V:Ve(V),W-=g?g.length:0,a&U){var H=h,K=g;h=g=n}var oe=D?n:Lc(i),ue=[i,a,d,h,g,H,K,v,E,V];if(oe&&LA(ue,oe),i=ue[0],a=ue[1],d=ue[2],h=ue[3],g=ue[4],V=ue[9]=ue[9]===n?D?0:i.length:pt(ue[9]-W,0),!V&&a&(O|F)&&(a&=~(O|F)),!a||a==L)var ge=wA(i,a,d);else a==O||a==F?ge=bA(i,a,V):(a==N||a==(L|N))&&!g.length?ge=xA(i,a,d,h):ge=fa.apply(n,ue);var Pe=oe?Kh:Tf;return Bf(Pe(ge,ue),i,a)}function yf(i,a,d,h){return i===n||En(i,Io[d])&&!He.call(h,d)?a:i}function _f(i,a,d,h,g,v){return tt(i)&&tt(a)&&(v.set(a,i),da(i,a,n,_f,v),v.delete(a)),i}function SA(i){return rs(i)?n:i}function vf(i,a,d,h,g,v){var E=d&A,V=i.length,D=a.length;if(V!=D&&!(E&&D>V))return!1;var W=v.get(i),H=v.get(a);if(W&&H)return W==a&&H==i;var K=-1,oe=!0,ue=d&I?new no:n;for(v.set(i,a),v.set(a,i);++K<V;){var ge=i[K],Pe=a[K];if(h)var ye=E?h(Pe,ge,K,a,i,v):h(ge,Pe,K,i,a,v);if(ye!==n){if(ye)continue;oe=!1;break}if(ue){if(!sc(a,function(Fe,Me){if(!Ui(ue,Me)&&(ge===Fe||g(ge,Fe,d,h,v)))return ue.push(Me)})){oe=!1;break}}else if(!(ge===Pe||g(ge,Pe,d,h,v))){oe=!1;break}}return v.delete(i),v.delete(a),oe}function EA(i,a,d,h,g,v,E){switch(d){case Ao:if(i.byteLength!=a.byteLength||i.byteOffset!=a.byteOffset)return!1;i=i.buffer,a=a.buffer;case $i:return!(i.byteLength!=a.byteLength||!v(new Xs(i),new Xs(a)));case kr:case Sr:case Oi:return En(+i,+a);case Se:return i.name==a.name&&i.message==a.message;case Li:case Gi:return i==a+"";case bn:var V=pc;case xn:var D=h&A;if(V||(V=Hs),i.size!=a.size&&!D)return!1;var W=E.get(i);if(W)return W==a;h|=I,E.set(i,a);var H=vf(V(i),V(a),h,g,v,E);return E.delete(i),H;case Gs:if(qi)return qi.call(i)==qi.call(a)}return!1}function TA(i,a,d,h,g,v){var E=d&A,V=Ic(i),D=V.length,W=Ic(a),H=W.length;if(D!=H&&!E)return!1;for(var K=D;K--;){var oe=V[K];if(!(E?oe in a:He.call(a,oe)))return!1}var ue=v.get(i),ge=v.get(a);if(ue&&ge)return ue==a&&ge==i;var Pe=!0;v.set(i,a),v.set(a,i);for(var ye=E;++K<D;){oe=V[K];var Fe=i[oe],Me=a[oe];if(h)var Kt=E?h(Me,Fe,oe,a,i,v):h(Fe,Me,oe,i,a,v);if(!(Kt===n?Fe===Me||g(Fe,Me,d,h,v):Kt)){Pe=!1;break}ye||(ye=oe=="constructor")}if(Pe&&!ye){var Pt=i.constructor,Yt=a.constructor;Pt!=Yt&&"constructor"in i&&"constructor"in a&&!(typeof Pt=="function"&&Pt instanceof Pt&&typeof Yt=="function"&&Yt instanceof Yt)&&(Pe=!1)}return v.delete(i),v.delete(a),Pe}function Qn(i){return Wc(Sf(i,n,Ff),i+"")}function Ic(i){return Oh(i,gt,zc)}function Oc(i){return Oh(i,Mt,Cf)}var Lc=oa?function(i){return oa.get(i)}:od;function _a(i){for(var a=i.name+"",d=Lo[a],h=He.call(Lo,a)?d.length:0;h--;){var g=d[h],v=g.func;if(v==null||v==i)return g.name}return a}function Uo(i){var a=He.call(_,"placeholder")?_:i;return a.placeholder}function fe(){var i=_.iteratee||nd;return i=i===nd?zh:i,arguments.length?i(arguments[0],arguments[1]):i}function va(i,a){var d=i.__data__;return RA(a)?d[typeof a=="string"?"string":"hash"]:d.map}function Gc(i){for(var a=gt(i),d=a.length;d--;){var h=a[d],g=i[h];a[d]=[h,g,xf(g)]}return a}function io(i,a){var d=OV(i,a);return Gh(d)?d:n}function BA(i){var a=He.call(i,eo),d=i[eo];try{i[eo]=n;var h=!0}catch{}var g=Ys.call(i);return h&&(a?i[eo]=d:delete i[eo]),g}var zc=fc?function(i){return i==null?[]:(i=je(i),Er(fc(i),function(a){return Sh.call(i,a)}))}:id,Cf=fc?function(i){for(var a=[];i;)Tr(a,zc(i)),i=Qs(i);return a}:id,St=Nt;(mc&&St(new mc(new ArrayBuffer(1)))!=Ao||Wi&&St(new Wi)!=bn||gc&&St(gc.resolve())!=Rp||Oo&&St(new Oo)!=xn||Hi&&St(new Hi)!=zi)&&(St=function(i){var a=Nt(i),d=a==qn?i.constructor:n,h=d?so(d):"";if(h)switch(h){case dN:return Ao;case uN:return bn;case pN:return Rp;case hN:return xn;case fN:return zi}return a});function VA(i,a,d){for(var h=-1,g=d.length;++h<g;){var v=d[h],E=v.size;switch(v.type){case"drop":i+=E;break;case"dropRight":a-=E;break;case"take":a=kt(a,i+E);break;case"takeRight":i=pt(i,a-E);break}}return{start:i,end:a}}function NA(i){var a=i.match(MB);return a?a[1].split(IB):[]}function wf(i,a,d){a=Pr(a,i);for(var h=-1,g=a.length,v=!1;++h<g;){var E=Gn(a[h]);if(!(v=i!=null&&d(i,E)))break;i=i[E]}return v||++h!=g?v:(g=i==null?0:i.length,!!g&&Ea(g)&&er(E,g)&&(Ee(i)||ao(i)))}function AA(i){var a=i.length,d=new i.constructor(a);return a&&typeof i[0]=="string"&&He.call(i,"index")&&(d.index=i.index,d.input=i.input),d}function bf(i){return typeof i.constructor=="function"&&!ts(i)?Go(Qs(i)):{}}function PA(i,a,d){var h=i.constructor;switch(a){case $i:return Fc(i);case kr:case Sr:return new h(+i);case Ao:return mA(i,d);case Gl:case zl:case $l:case Ul:case Zl:case Wl:case Hl:case jl:case ql:return rf(i,d);case bn:return new h;case Oi:case Gi:return new h(i);case Li:return gA(i);case xn:return new h;case Gs:return yA(i)}}function DA(i,a){var d=a.length;if(!d)return i;var h=d-1;return a[h]=(d>1?"& ":"")+a[h],a=a.join(d>2?", ":" "),i.replace(RB,`{
|
|
73
73
|
/* [wrapped with `+a+`] */
|
|
74
|
-
`)}function gA(i){return Ee(i)||so(i)||!!(Ch&&i&&i[Ch])}function Qn(i,a){var d=typeof i;return a=a??ne,!!a&&(d=="number"||d!="symbol"&&BB.test(i))&&i>-1&&i%1==0&&i<a}function Nt(i,a,d){if(!tt(d))return!1;var h=typeof a;return(h=="number"?Ft(d)&&Qn(a,d.length):h=="string"&&a in d)?Sn(d[a],i):!1}function Oc(i,a){if(Ee(i))return!1;var d=typeof i;return d=="number"||d=="symbol"||d=="boolean"||i==null||Ht(i)?!0:hB.test(i)||!pB.test(i)||a!=null&&i in je(a)}function yA(i){var a=typeof i;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?i!=="__proto__":i===null}function Gc(i){var a=ma(i),d=_[a];if(typeof d!="function"||!(a in Re.prototype))return!1;if(i===d)return!0;var h=Mc(d);return!!h&&i===h[0]}function _A(i){return!!gh&&gh in i}var vA=Ws?er:rd;function Qi(i){var a=i&&i.constructor,d=typeof a=="function"&&a.prototype||Ro;return i===d}function yf(i){return i===i&&!tt(i)}function _f(i,a){return function(d){return d==null?!1:d[i]===a&&(a!==n||i in je(d))}}function CA(i){var a=wa(i,function(h){return d.size===f&&d.clear(),h}),d=a.cache;return a}function wA(i,a){var d=i[1],h=a[1],g=d|h,v=g<(G|C|W),E=h==W&&d==O||h==W&&d==P&&i[7].length<=a[8]||h==(W|P)&&a[7].length<=a[8]&&d==O;if(!(v||E))return i;h&G&&(i[2]=a[2],g|=d&G?0:F);var V=a[3];if(V){var D=i[3];i[3]=D?Qh(D,V,a[4]):V,i[4]=D?Br(i[3],m):a[4]}return V=a[5],V&&(D=i[5],i[5]=D?ef(D,V,a[6]):V,i[6]=D?Br(i[5],m):a[6]),V=a[7],V&&(i[7]=V),h&W&&(i[8]=i[8]==null?a[8]:xt(i[8],a[8])),i[9]==null&&(i[9]=a[9]),i[0]=a[0],i[1]=g,i}function bA(i){var a=[];if(i!=null)for(var d in je(i))a.push(d);return a}function xA(i){return js.call(i)}function vf(i,a,d){return a=ut(a===n?i.length-1:a,0),function(){for(var h=arguments,g=-1,v=ut(h.length-a,0),E=z(v);++g<v;)E[g]=h[a+g];g=-1;for(var V=z(a+1);++g<a;)V[g]=h[g];return V[a]=d(E),Zt(i,this,V)}}function Cf(i,a){return a.length<2?i:ro(i,tn(a,0,-1))}function kA(i,a){for(var d=i.length,h=xt(a.length,d),g=Dt(i);h--;){var v=a[h];i[h]=Qn(v,d)?g[v]:n}return i}function zc(i,a){if(!(a==="constructor"&&typeof i[a]=="function")&&a!="__proto__")return i[a]}var wf=xf(Zh),es=OV||function(i,a){return gt.setTimeout(i,a)},$c=xf(jN);function bf(i,a,d){var h=a+"";return $c(i,mA(h,SA(pA(h),d)))}function xf(i){var a=0,d=0;return function(){var h=ZV(),g=S-(h-d);if(d=h,g>0){if(++a>=L)return arguments[0]}else a=0;return i.apply(n,arguments)}}function ya(i,a){var d=-1,h=i.length,g=h-1;for(a=a===n?h:a;++d<a;){var v=kc(d,g),E=i[v];i[v]=i[d],i[d]=E}return i.length=a,i}var kf=CA(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(fB,function(d,h,g,v){a.push(g?v.replace(bB,"$1"):h||d)}),a});function On(i){if(typeof i=="string"||Ht(i))return i;var a=i+"";return a=="0"&&1/i==-te?"-0":a}function io(i){if(i!=null){try{return Hs.call(i)}catch{}try{return i+""}catch{}}return""}function SA(i,a){return Jt(xr,function(d){var h="_."+d[0];a&d[1]&&!zs(i,h)&&i.push(h)}),i.sort()}function Sf(i){if(i instanceof Re)return i.clone();var a=new Qt(i.__wrapped__,i.__chain__);return a.__actions__=Dt(i.__actions__),a.__index__=i.__index__,a.__values__=i.__values__,a}function EA(i,a,d){(d?Nt(i,a,d):a===n)?a=1:a=ut(Ve(a),0);var h=i==null?0:i.length;if(!h||a<1)return[];for(var g=0,v=0,E=z(Qs(h/a));g<h;)E[v++]=tn(i,g,g+=a);return E}function TA(i){for(var a=-1,d=i==null?0:i.length,h=0,g=[];++a<d;){var v=i[a];v&&(g[h++]=v)}return g}function BA(){var i=arguments.length;if(!i)return[];for(var a=z(i-1),d=arguments[0],h=i;h--;)a[h-1]=arguments[h];return Tr(Ee(d)?Dt(d):[d],yt(a,1))}var VA=De(function(i,a){return it(i)?qi(i,yt(a,1,it,!0)):[]}),NA=De(function(i,a){var d=nn(a);return it(d)&&(d=n),it(i)?qi(i,yt(a,1,it,!0),fe(d,2)):[]}),AA=De(function(i,a){var d=nn(a);return it(d)&&(d=n),it(i)?qi(i,yt(a,1,it,!0),n,d):[]});function PA(i,a,d){var h=i==null?0:i.length;return h?(a=d||a===n?1:Ve(a),tn(i,a<0?0:a,h)):[]}function DA(i,a,d){var h=i==null?0:i.length;return h?(a=d||a===n?1:Ve(a),a=h-a,tn(i,0,a<0?0:a)):[]}function FA(i,a){return i&&i.length?ca(i,fe(a,3),!0,!0):[]}function RA(i,a){return i&&i.length?ca(i,fe(a,3),!0):[]}function MA(i,a,d,h){var g=i==null?0:i.length;return g?(d&&typeof d!="number"&&Nt(i,a,d)&&(d=0,h=g),BN(i,a,d,h)):[]}function Ef(i,a,d){var h=i==null?0:i.length;if(!h)return-1;var g=d==null?0:Ve(d);return g<0&&(g=ut(h+g,0)),$s(i,fe(a,3),g)}function Tf(i,a,d){var h=i==null?0:i.length;if(!h)return-1;var g=h-1;return d!==n&&(g=Ve(d),g=d<0?ut(h+g,0):xt(g,h-1)),$s(i,fe(a,3),g,!0)}function Bf(i){var a=i==null?0:i.length;return a?yt(i,1):[]}function IA(i){var a=i==null?0:i.length;return a?yt(i,te):[]}function LA(i,a){var d=i==null?0:i.length;return d?(a=a===n?1:Ve(a),yt(i,a)):[]}function OA(i){for(var a=-1,d=i==null?0:i.length,h={};++a<d;){var g=i[a];h[g[0]]=g[1]}return h}function Vf(i){return i&&i.length?i[0]:n}function GA(i,a,d){var h=i==null?0:i.length;if(!h)return-1;var g=d==null?0:Ve(d);return g<0&&(g=ut(h+g,0)),Ao(i,a,g)}function zA(i){var a=i==null?0:i.length;return a?tn(i,0,-1):[]}var $A=De(function(i){var a=Xe(i,Vc);return a.length&&a[0]===i[0]?vc(a):[]}),ZA=De(function(i){var a=nn(i),d=Xe(i,Vc);return a===nn(d)?a=n:d.pop(),d.length&&d[0]===i[0]?vc(d,fe(a,2)):[]}),UA=De(function(i){var a=nn(i),d=Xe(i,Vc);return a=typeof a=="function"?a:n,a&&d.pop(),d.length&&d[0]===i[0]?vc(d,n,a):[]});function WA(i,a){return i==null?"":zV.call(i,a)}function nn(i){var a=i==null?0:i.length;return a?i[a-1]:n}function HA(i,a,d){var h=i==null?0:i.length;if(!h)return-1;var g=h;return d!==n&&(g=Ve(d),g=g<0?ut(h+g,0):xt(g,h-1)),a===a?SV(i,a,g):$s(i,lh,g,!0)}function jA(i,a){return i&&i.length?Oh(i,Ve(a)):n}var qA=De(Nf);function Nf(i,a){return i&&i.length&&a&&a.length?xc(i,a):i}function KA(i,a,d){return i&&i.length&&a&&a.length?xc(i,a,fe(d,2)):i}function YA(i,a,d){return i&&i.length&&a&&a.length?xc(i,a,n,d):i}var JA=Xn(function(i,a){var d=i==null?0:i.length,h=mc(i,a);return $h(i,Xe(a,function(g){return Qn(g,d)?+g:g}).sort(Xh)),h});function XA(i,a){var d=[];if(!(i&&i.length))return d;var h=-1,g=[],v=i.length;for(a=fe(a,3);++h<v;){var E=i[h];a(E,h,i)&&(d.push(E),g.push(h))}return $h(i,g),d}function Zc(i){return i==null?i:WV.call(i)}function QA(i,a,d){var h=i==null?0:i.length;return h?(d&&typeof d!="number"&&Nt(i,a,d)?(a=0,d=h):(a=a==null?0:Ve(a),d=d===n?h:Ve(d)),tn(i,a,d)):[]}function eP(i,a){return la(i,a)}function tP(i,a,d){return Ec(i,a,fe(d,2))}function nP(i,a){var d=i==null?0:i.length;if(d){var h=la(i,a);if(h<d&&Sn(i[h],a))return h}return-1}function rP(i,a){return la(i,a,!0)}function oP(i,a,d){return Ec(i,a,fe(d,2),!0)}function iP(i,a){var d=i==null?0:i.length;if(d){var h=la(i,a,!0)-1;if(Sn(i[h],a))return h}return-1}function sP(i){return i&&i.length?Uh(i):[]}function aP(i,a){return i&&i.length?Uh(i,fe(a,2)):[]}function lP(i){var a=i==null?0:i.length;return a?tn(i,1,a):[]}function cP(i,a,d){return i&&i.length?(a=d||a===n?1:Ve(a),tn(i,0,a<0?0:a)):[]}function dP(i,a,d){var h=i==null?0:i.length;return h?(a=d||a===n?1:Ve(a),a=h-a,tn(i,a<0?0:a,h)):[]}function uP(i,a){return i&&i.length?ca(i,fe(a,3),!1,!0):[]}function pP(i,a){return i&&i.length?ca(i,fe(a,3)):[]}var hP=De(function(i){return Ar(yt(i,1,it,!0))}),fP=De(function(i){var a=nn(i);return it(a)&&(a=n),Ar(yt(i,1,it,!0),fe(a,2))}),mP=De(function(i){var a=nn(i);return a=typeof a=="function"?a:n,Ar(yt(i,1,it,!0),n,a)});function gP(i){return i&&i.length?Ar(i):[]}function yP(i,a){return i&&i.length?Ar(i,fe(a,2)):[]}function _P(i,a){return a=typeof a=="function"?a:n,i&&i.length?Ar(i,n,a):[]}function Uc(i){if(!(i&&i.length))return[];var a=0;return i=Er(i,function(d){if(it(d))return a=ut(d.length,a),!0}),ac(a,function(d){return Xe(i,oc(d))})}function Af(i,a){if(!(i&&i.length))return[];var d=Uc(i);return a==null?d:Xe(d,function(h){return Zt(a,n,h)})}var vP=De(function(i,a){return it(i)?qi(i,a):[]}),CP=De(function(i){return Bc(Er(i,it))}),wP=De(function(i){var a=nn(i);return it(a)&&(a=n),Bc(Er(i,it),fe(a,2))}),bP=De(function(i){var a=nn(i);return a=typeof a=="function"?a:n,Bc(Er(i,it),n,a)}),xP=De(Uc);function kP(i,a){return qh(i||[],a||[],ji)}function SP(i,a){return qh(i||[],a||[],Ji)}var EP=De(function(i){var a=i.length,d=a>1?i[a-1]:n;return d=typeof d=="function"?(i.pop(),d):n,Af(i,d)});function Pf(i){var a=_(i);return a.__chain__=!0,a}function TP(i,a){return a(i),i}function _a(i,a){return a(i)}var BP=Xn(function(i){var a=i.length,d=a?i[0]:0,h=this.__wrapped__,g=function(v){return mc(v,i)};return a>1||this.__actions__.length||!(h instanceof Re)||!Qn(d)?this.thru(g):(h=h.slice(d,+d+(a?1:0)),h.__actions__.push({func:_a,args:[g],thisArg:n}),new Qt(h,this.__chain__).thru(function(v){return a&&!v.length&&v.push(n),v}))});function VP(){return Pf(this)}function NP(){return new Qt(this.value(),this.__chain__)}function AP(){this.__values__===n&&(this.__values__=Hf(this.value()));var i=this.__index__>=this.__values__.length,a=i?n:this.__values__[this.__index__++];return{done:i,value:a}}function PP(){return this}function DP(i){for(var a,d=this;d instanceof ra;){var h=Sf(d);h.__index__=0,h.__values__=n,a?g.__wrapped__=h:a=h;var g=h;d=d.__wrapped__}return g.__wrapped__=i,a}function FP(){var i=this.__wrapped__;if(i instanceof Re){var a=i;return this.__actions__.length&&(a=new Re(this)),a=a.reverse(),a.__actions__.push({func:_a,args:[Zc],thisArg:n}),new Qt(a,this.__chain__)}return this.thru(Zc)}function RP(){return jh(this.__wrapped__,this.__actions__)}var MP=da(function(i,a,d){He.call(i,d)?++i[d]:Yn(i,d,1)});function IP(i,a,d){var h=Ee(i)?sh:TN;return d&&Nt(i,a,d)&&(a=n),h(i,fe(a,3))}function LP(i,a){var d=Ee(i)?Er:Nh;return d(i,fe(a,3))}var OP=of(Ef),GP=of(Tf);function zP(i,a){return yt(va(i,a),1)}function $P(i,a){return yt(va(i,a),te)}function ZP(i,a,d){return d=d===n?1:Ve(d),yt(va(i,a),d)}function Df(i,a){var d=Ee(i)?Jt:Nr;return d(i,fe(a,3))}function Ff(i,a){var d=Ee(i)?lV:Vh;return d(i,fe(a,3))}var UP=da(function(i,a,d){He.call(i,d)?i[d].push(a):Yn(i,d,[a])});function WP(i,a,d,h){i=Ft(i)?i:Zo(i),d=d&&!h?Ve(d):0;var g=i.length;return d<0&&(d=ut(g+d,0)),ka(i)?d<=g&&i.indexOf(a,d)>-1:!!g&&Ao(i,a,d)>-1}var HP=De(function(i,a,d){var h=-1,g=typeof a=="function",v=Ft(i)?z(i.length):[];return Nr(i,function(E){v[++h]=g?Zt(a,E,d):Ki(E,a,d)}),v}),jP=da(function(i,a,d){Yn(i,d,a)});function va(i,a){var d=Ee(i)?Xe:Mh;return d(i,fe(a,3))}function qP(i,a,d,h){return i==null?[]:(Ee(a)||(a=a==null?[]:[a]),d=h?n:d,Ee(d)||(d=d==null?[]:[d]),Gh(i,a,d))}var KP=da(function(i,a,d){i[d?0:1].push(a)},function(){return[[],[]]});function YP(i,a,d){var h=Ee(i)?nc:dh,g=arguments.length<3;return h(i,fe(a,4),d,g,Nr)}function JP(i,a,d){var h=Ee(i)?cV:dh,g=arguments.length<3;return h(i,fe(a,4),d,g,Vh)}function XP(i,a){var d=Ee(i)?Er:Nh;return d(i,ba(fe(a,3)))}function QP(i){var a=Ee(i)?Sh:WN;return a(i)}function eD(i,a,d){(d?Nt(i,a,d):a===n)?a=1:a=Ve(a);var h=Ee(i)?bN:HN;return h(i,a)}function tD(i){var a=Ee(i)?xN:qN;return a(i)}function nD(i){if(i==null)return 0;if(Ft(i))return ka(i)?Do(i):i.length;var a=kt(i);return a==wn||a==bn?i.size:wc(i).length}function rD(i,a,d){var h=Ee(i)?rc:KN;return d&&Nt(i,a,d)&&(a=n),h(i,fe(a,3))}var oD=De(function(i,a){if(i==null)return[];var d=a.length;return d>1&&Nt(i,a[0],a[1])?a=[]:d>2&&Nt(a[0],a[1],a[2])&&(a=[a[0]]),Gh(i,yt(a,1),[])}),Ca=LV||function(){return gt.Date.now()};function iD(i,a){if(typeof a!="function")throw new Xt(c);return i=Ve(i),function(){if(--i<1)return a.apply(this,arguments)}}function Rf(i,a,d){return a=d?n:a,a=i&&a==null?i.length:a,Jn(i,W,n,n,n,n,a)}function Mf(i,a){var d;if(typeof a!="function")throw new Xt(c);return i=Ve(i),function(){return--i>0&&(d=a.apply(this,arguments)),i<=1&&(a=n),d}}var Wc=De(function(i,a,d){var h=G;if(d.length){var g=Br(d,zo(Wc));h|=I}return Jn(i,h,a,d,g)}),If=De(function(i,a,d){var h=G|C;if(d.length){var g=Br(d,zo(If));h|=I}return Jn(a,h,i,d,g)});function Lf(i,a,d){a=d?n:a;var h=Jn(i,O,n,n,n,n,n,a);return h.placeholder=Lf.placeholder,h}function Of(i,a,d){a=d?n:a;var h=Jn(i,Z,n,n,n,n,n,a);return h.placeholder=Of.placeholder,h}function Gf(i,a,d){var h,g,v,E,V,D,q=0,K=!1,J=!1,oe=!0;if(typeof i!="function")throw new Xt(c);a=rn(a)||0,tt(d)&&(K=!!d.leading,J="maxWait"in d,v=J?ut(rn(d.maxWait)||0,a):v,oe="trailing"in d?!!d.trailing:oe);function ue(st){var En=h,nr=g;return h=g=n,q=st,E=i.apply(nr,En),E}function ge(st){return q=st,V=es(Fe,a),K?ue(st):E}function Pe(st){var En=st-D,nr=st-q,im=a-En;return J?xt(im,v-nr):im}function ye(st){var En=st-D,nr=st-q;return D===n||En>=a||En<0||J&&nr>=v}function Fe(){var st=Ca();if(ye(st))return Me(st);V=es(Fe,Pe(st))}function Me(st){return V=n,oe&&h?ue(st):(h=g=n,E)}function jt(){V!==n&&Kh(V),q=0,h=D=g=V=n}function At(){return V===n?E:Me(Ca())}function qt(){var st=Ca(),En=ye(st);if(h=arguments,g=this,D=st,En){if(V===n)return ge(D);if(J)return Kh(V),V=es(Fe,a),ue(D)}return V===n&&(V=es(Fe,a)),E}return qt.cancel=jt,qt.flush=At,qt}var sD=De(function(i,a){return Bh(i,1,a)}),aD=De(function(i,a,d){return Bh(i,rn(a)||0,d)});function lD(i){return Jn(i,j)}function wa(i,a){if(typeof i!="function"||a!=null&&typeof a!="function")throw new Xt(c);var d=function(){var h=arguments,g=a?a.apply(this,h):h[0],v=d.cache;if(v.has(g))return v.get(g);var E=i.apply(this,h);return d.cache=v.set(g,E)||v,E};return d.cache=new(wa.Cache||Kn),d}wa.Cache=Kn;function ba(i){if(typeof i!="function")throw new Xt(c);return function(){var a=arguments;switch(a.length){case 0:return!i.call(this);case 1:return!i.call(this,a[0]);case 2:return!i.call(this,a[0],a[1]);case 3:return!i.call(this,a[0],a[1],a[2])}return!i.apply(this,a)}}function cD(i){return Mf(2,i)}var dD=YN(function(i,a){a=a.length==1&&Ee(a[0])?Xe(a[0],Ut(fe())):Xe(yt(a,1),Ut(fe()));var d=a.length;return De(function(h){for(var g=-1,v=xt(h.length,d);++g<v;)h[g]=a[g].call(this,h[g]);return Zt(i,this,h)})}),Hc=De(function(i,a){var d=Br(a,zo(Hc));return Jn(i,I,n,a,d)}),zf=De(function(i,a){var d=Br(a,zo(zf));return Jn(i,Y,n,a,d)}),uD=Xn(function(i,a){return Jn(i,P,n,n,n,a)});function pD(i,a){if(typeof i!="function")throw new Xt(c);return a=a===n?a:Ve(a),De(i,a)}function hD(i,a){if(typeof i!="function")throw new Xt(c);return a=a==null?0:ut(Ve(a),0),De(function(d){var h=d[a],g=Dr(d,0,a);return h&&Tr(g,h),Zt(i,this,g)})}function fD(i,a,d){var h=!0,g=!0;if(typeof i!="function")throw new Xt(c);return tt(d)&&(h="leading"in d?!!d.leading:h,g="trailing"in d?!!d.trailing:g),Gf(i,a,{leading:h,maxWait:a,trailing:g})}function mD(i){return Rf(i,1)}function gD(i,a){return Hc(Nc(a),i)}function yD(){if(!arguments.length)return[];var i=arguments[0];return Ee(i)?i:[i]}function _D(i){return en(i,T)}function vD(i,a){return a=typeof a=="function"?a:n,en(i,T,a)}function CD(i){return en(i,y|T)}function wD(i,a){return a=typeof a=="function"?a:n,en(i,y|T,a)}function bD(i,a){return a==null||Th(i,a,mt(a))}function Sn(i,a){return i===a||i!==i&&a!==a}var xD=fa(_c),kD=fa(function(i,a){return i>=a}),so=Dh(function(){return arguments}())?Dh:function(i){return nt(i)&&He.call(i,"callee")&&!vh.call(i,"callee")},Ee=z.isArray,SD=eh?Ut(eh):DN;function Ft(i){return i!=null&&xa(i.length)&&!er(i)}function it(i){return nt(i)&&Ft(i)}function ED(i){return i===!0||i===!1||nt(i)&&Vt(i)==kr}var Fr=GV||rd,TD=th?Ut(th):FN;function BD(i){return nt(i)&&i.nodeType===1&&!ts(i)}function VD(i){if(i==null)return!0;if(Ft(i)&&(Ee(i)||typeof i=="string"||typeof i.splice=="function"||Fr(i)||$o(i)||so(i)))return!i.length;var a=kt(i);if(a==wn||a==bn)return!i.size;if(Qi(i))return!wc(i).length;for(var d in i)if(He.call(i,d))return!1;return!0}function ND(i,a){return Yi(i,a)}function AD(i,a,d){d=typeof d=="function"?d:n;var h=d?d(i,a):n;return h===n?Yi(i,a,n,d):!!h}function jc(i){if(!nt(i))return!1;var a=Vt(i);return a==Se||a==Ms||typeof i.message=="string"&&typeof i.name=="string"&&!ts(i)}function PD(i){return typeof i=="number"&&wh(i)}function er(i){if(!tt(i))return!1;var a=Vt(i);return a==Jr||a==Bp||a==Rs||a==nB}function $f(i){return typeof i=="number"&&i==Ve(i)}function xa(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=ne}function tt(i){var a=typeof i;return i!=null&&(a=="object"||a=="function")}function nt(i){return i!=null&&typeof i=="object"}var Zf=nh?Ut(nh):MN;function DD(i,a){return i===a||Cc(i,a,Ic(a))}function FD(i,a,d){return d=typeof d=="function"?d:n,Cc(i,a,Ic(a),d)}function RD(i){return Uf(i)&&i!=+i}function MD(i){if(vA(i))throw new ke(l);return Fh(i)}function ID(i){return i===null}function LD(i){return i==null}function Uf(i){return typeof i=="number"||nt(i)&&Vt(i)==Mi}function ts(i){if(!nt(i)||Vt(i)!=jn)return!1;var a=Ys(i);if(a===null)return!0;var d=He.call(a,"constructor")&&a.constructor;return typeof d=="function"&&d instanceof d&&Hs.call(d)==FV}var qc=rh?Ut(rh):IN;function OD(i){return $f(i)&&i>=-ne&&i<=ne}var Wf=oh?Ut(oh):LN;function ka(i){return typeof i=="string"||!Ee(i)&&nt(i)&&Vt(i)==Li}function Ht(i){return typeof i=="symbol"||nt(i)&&Vt(i)==Is}var $o=ih?Ut(ih):ON;function GD(i){return i===n}function zD(i){return nt(i)&&kt(i)==Oi}function $D(i){return nt(i)&&Vt(i)==oB}var ZD=fa(bc),UD=fa(function(i,a){return i<=a});function Hf(i){if(!i)return[];if(Ft(i))return ka(i)?xn(i):Dt(i);if($i&&i[$i])return bV(i[$i]());var a=kt(i),d=a==wn?cc:a==bn?Zs:Zo;return d(i)}function tr(i){if(!i)return i===0?i:0;if(i=rn(i),i===te||i===-te){var a=i<0?-1:1;return a*be}return i===i?i:0}function Ve(i){var a=tr(i),d=a%1;return a===a?d?a-d:a:0}function jf(i){return i?no(Ve(i),0,ot):0}function rn(i){if(typeof i=="number")return i;if(Ht(i))return $e;if(tt(i)){var a=typeof i.valueOf=="function"?i.valueOf():i;i=tt(a)?a+"":a}if(typeof i!="string")return i===0?i:+i;i=uh(i);var d=SB.test(i);return d||TB.test(i)?iV(i.slice(2),d?2:8):kB.test(i)?$e:+i}function qf(i){return Ln(i,Rt(i))}function WD(i){return i?no(Ve(i),-ne,ne):i===0?i:0}function We(i){return i==null?"":Wt(i)}var HD=Oo(function(i,a){if(Qi(a)||Ft(a)){Ln(a,mt(a),i);return}for(var d in a)He.call(a,d)&&ji(i,d,a[d])}),Kf=Oo(function(i,a){Ln(a,Rt(a),i)}),Sa=Oo(function(i,a,d,h){Ln(a,Rt(a),i,h)}),jD=Oo(function(i,a,d,h){Ln(a,mt(a),i,h)}),qD=Xn(mc);function KD(i,a){var d=Lo(i);return a==null?d:Eh(d,a)}var YD=De(function(i,a){i=je(i);var d=-1,h=a.length,g=h>2?a[2]:n;for(g&&Nt(a[0],a[1],g)&&(h=1);++d<h;)for(var v=a[d],E=Rt(v),V=-1,D=E.length;++V<D;){var q=E[V],K=i[q];(K===n||Sn(K,Ro[q])&&!He.call(i,q))&&(i[q]=v[q])}return i}),JD=De(function(i){return i.push(n,pf),Zt(Yf,n,i)});function XD(i,a){return ah(i,fe(a,3),In)}function QD(i,a){return ah(i,fe(a,3),yc)}function eF(i,a){return i==null?i:gc(i,fe(a,3),Rt)}function tF(i,a){return i==null?i:Ah(i,fe(a,3),Rt)}function nF(i,a){return i&&In(i,fe(a,3))}function rF(i,a){return i&&yc(i,fe(a,3))}function oF(i){return i==null?[]:sa(i,mt(i))}function iF(i){return i==null?[]:sa(i,Rt(i))}function Kc(i,a,d){var h=i==null?n:ro(i,a);return h===n?d:h}function sF(i,a){return i!=null&&mf(i,a,VN)}function Yc(i,a){return i!=null&&mf(i,a,NN)}var aF=af(function(i,a,d){a!=null&&typeof a.toString!="function"&&(a=js.call(a)),i[a]=d},Xc(Mt)),lF=af(function(i,a,d){a!=null&&typeof a.toString!="function"&&(a=js.call(a)),He.call(i,a)?i[a].push(d):i[a]=[d]},fe),cF=De(Ki);function mt(i){return Ft(i)?kh(i):wc(i)}function Rt(i){return Ft(i)?kh(i,!0):GN(i)}function dF(i,a){var d={};return a=fe(a,3),In(i,function(h,g,v){Yn(d,a(h,g,v),h)}),d}function uF(i,a){var d={};return a=fe(a,3),In(i,function(h,g,v){Yn(d,g,a(h,g,v))}),d}var pF=Oo(function(i,a,d){aa(i,a,d)}),Yf=Oo(function(i,a,d,h){aa(i,a,d,h)}),hF=Xn(function(i,a){var d={};if(i==null)return d;var h=!1;a=Xe(a,function(v){return v=Pr(v,i),h||(h=v.length>1),v}),Ln(i,Rc(i),d),h&&(d=en(d,y|B|T,aA));for(var g=a.length;g--;)Tc(d,a[g]);return d});function fF(i,a){return Jf(i,ba(fe(a)))}var mF=Xn(function(i,a){return i==null?{}:$N(i,a)});function Jf(i,a){if(i==null)return{};var d=Xe(Rc(i),function(h){return[h]});return a=fe(a),zh(i,d,function(h,g){return a(h,g[0])})}function gF(i,a,d){a=Pr(a,i);var h=-1,g=a.length;for(g||(g=1,i=n);++h<g;){var v=i==null?n:i[On(a[h])];v===n&&(h=g,v=d),i=er(v)?v.call(i):v}return i}function yF(i,a,d){return i==null?i:Ji(i,a,d)}function _F(i,a,d,h){return h=typeof h=="function"?h:n,i==null?i:Ji(i,a,d,h)}var Xf=df(mt),Qf=df(Rt);function vF(i,a,d){var h=Ee(i),g=h||Fr(i)||$o(i);if(a=fe(a,4),d==null){var v=i&&i.constructor;g?d=h?new v:[]:tt(i)?d=er(v)?Lo(Ys(i)):{}:d={}}return(g?Jt:In)(i,function(E,V,D){return a(d,E,V,D)}),d}function CF(i,a){return i==null?!0:Tc(i,a)}function wF(i,a,d){return i==null?i:Hh(i,a,Nc(d))}function bF(i,a,d,h){return h=typeof h=="function"?h:n,i==null?i:Hh(i,a,Nc(d),h)}function Zo(i){return i==null?[]:lc(i,mt(i))}function xF(i){return i==null?[]:lc(i,Rt(i))}function kF(i,a,d){return d===n&&(d=a,a=n),d!==n&&(d=rn(d),d=d===d?d:0),a!==n&&(a=rn(a),a=a===a?a:0),no(rn(i),a,d)}function SF(i,a,d){return a=tr(a),d===n?(d=a,a=0):d=tr(d),i=rn(i),AN(i,a,d)}function EF(i,a,d){if(d&&typeof d!="boolean"&&Nt(i,a,d)&&(a=d=n),d===n&&(typeof a=="boolean"?(d=a,a=n):typeof i=="boolean"&&(d=i,i=n)),i===n&&a===n?(i=0,a=1):(i=tr(i),a===n?(a=i,i=0):a=tr(a)),i>a){var h=i;i=a,a=h}if(d||i%1||a%1){var g=bh();return xt(i+g*(a-i+oV("1e-"+((g+"").length-1))),a)}return kc(i,a)}var TF=Go(function(i,a,d){return a=a.toLowerCase(),i+(d?em(a):a)});function em(i){return Jc(We(i).toLowerCase())}function tm(i){return i=We(i),i&&i.replace(VB,yV).replace(qB,"")}function BF(i,a,d){i=We(i),a=Wt(a);var h=i.length;d=d===n?h:no(Ve(d),0,h);var g=d;return d-=a.length,d>=0&&i.slice(d,g)==a}function VF(i){return i=We(i),i&&cB.test(i)?i.replace(Ap,_V):i}function NF(i){return i=We(i),i&&mB.test(i)?i.replace(Hl,"\\$&"):i}var AF=Go(function(i,a,d){return i+(d?"-":"")+a.toLowerCase()}),PF=Go(function(i,a,d){return i+(d?" ":"")+a.toLowerCase()}),DF=rf("toLowerCase");function FF(i,a,d){i=We(i),a=Ve(a);var h=a?Do(i):0;if(!a||h>=a)return i;var g=(a-h)/2;return ha(ea(g),d)+i+ha(Qs(g),d)}function RF(i,a,d){i=We(i),a=Ve(a);var h=a?Do(i):0;return a&&h<a?i+ha(a-h,d):i}function MF(i,a,d){i=We(i),a=Ve(a);var h=a?Do(i):0;return a&&h<a?ha(a-h,d)+i:i}function IF(i,a,d){return d||a==null?a=0:a&&(a=+a),UV(We(i).replace(jl,""),a||0)}function LF(i,a,d){return(d?Nt(i,a,d):a===n)?a=1:a=Ve(a),Sc(We(i),a)}function OF(){var i=arguments,a=We(i[0]);return i.length<3?a:a.replace(i[1],i[2])}var GF=Go(function(i,a,d){return i+(d?"_":"")+a.toLowerCase()});function zF(i,a,d){return d&&typeof d!="number"&&Nt(i,a,d)&&(a=d=n),d=d===n?ot:d>>>0,d?(i=We(i),i&&(typeof a=="string"||a!=null&&!qc(a))&&(a=Wt(a),!a&&Po(i))?Dr(xn(i),0,d):i.split(a,d)):[]}var $F=Go(function(i,a,d){return i+(d?" ":"")+Jc(a)});function ZF(i,a,d){return i=We(i),d=d==null?0:no(Ve(d),0,i.length),a=Wt(a),i.slice(d,d+a.length)==a}function UF(i,a,d){var h=_.templateSettings;d&&Nt(i,a,d)&&(a=n),i=We(i),a=Sa({},a,h,uf);var g=Sa({},a.imports,h.imports,uf),v=mt(g),E=lc(g,v),V,D,q=0,K=a.interpolate||Ls,J="__p += '",oe=dc((a.escape||Ls).source+"|"+K.source+"|"+(K===Pp?xB:Ls).source+"|"+(a.evaluate||Ls).source+"|$","g"),ue="//# sourceURL="+(He.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++QB+"]")+`
|
|
75
|
-
`;i.replace(oe,function(ye,Fe,Me,
|
|
74
|
+
`)}function FA(i){return Ee(i)||ao(i)||!!(Eh&&i&&i[Eh])}function er(i,a){var d=typeof i;return a=a??ne,!!a&&(d=="number"||d!="symbol"&&HB.test(i))&&i>-1&&i%1==0&&i<a}function At(i,a,d){if(!tt(d))return!1;var h=typeof a;return(h=="number"?Rt(d)&&er(a,d.length):h=="string"&&a in d)?En(d[a],i):!1}function $c(i,a){if(Ee(i))return!1;var d=typeof i;return d=="number"||d=="symbol"||d=="boolean"||i==null||qt(i)?!0:AB.test(i)||!NB.test(i)||a!=null&&i in je(a)}function RA(i){var a=typeof i;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?i!=="__proto__":i===null}function Uc(i){var a=_a(i),d=_[a];if(typeof d!="function"||!(a in Re.prototype))return!1;if(i===d)return!0;var h=Lc(d);return!!h&&i===h[0]}function MA(i){return!!bh&&bh in i}var IA=qs?tr:sd;function ts(i){var a=i&&i.constructor,d=typeof a=="function"&&a.prototype||Io;return i===d}function xf(i){return i===i&&!tt(i)}function kf(i,a){return function(d){return d==null?!1:d[i]===a&&(a!==n||i in je(d))}}function OA(i){var a=ka(i,function(h){return d.size===f&&d.clear(),h}),d=a.cache;return a}function LA(i,a){var d=i[1],h=a[1],g=d|h,v=g<(L|C|te),E=h==te&&d==O||h==te&&d==j&&i[7].length<=a[8]||h==(te|j)&&a[7].length<=a[8]&&d==O;if(!(v||E))return i;h&L&&(i[2]=a[2],g|=d&L?0:R);var V=a[3];if(V){var D=i[3];i[3]=D?sf(D,V,a[4]):V,i[4]=D?Br(i[3],m):a[4]}return V=a[5],V&&(D=i[5],i[5]=D?af(D,V,a[6]):V,i[6]=D?Br(i[5],m):a[6]),V=a[7],V&&(i[7]=V),h&te&&(i[8]=i[8]==null?a[8]:kt(i[8],a[8])),i[9]==null&&(i[9]=a[9]),i[0]=a[0],i[1]=g,i}function GA(i){var a=[];if(i!=null)for(var d in je(i))a.push(d);return a}function zA(i){return Ys.call(i)}function Sf(i,a,d){return a=pt(a===n?i.length-1:a,0),function(){for(var h=arguments,g=-1,v=pt(h.length-a,0),E=z(v);++g<v;)E[g]=h[a+g];g=-1;for(var V=z(a+1);++g<a;)V[g]=h[g];return V[a]=d(E),Wt(i,this,V)}}function Ef(i,a){return a.length<2?i:oo(i,nn(a,0,-1))}function $A(i,a){for(var d=i.length,h=kt(a.length,d),g=Ft(i);h--;){var v=a[h];i[h]=er(v,d)?g[v]:n}return i}function Zc(i,a){if(!(a==="constructor"&&typeof i[a]=="function")&&a!="__proto__")return i[a]}var Tf=Vf(Kh),ns=rN||function(i,a){return yt.setTimeout(i,a)},Wc=Vf(uA);function Bf(i,a,d){var h=a+"";return Wc(i,DA(h,UA(NA(h),d)))}function Vf(i){var a=0,d=0;return function(){var h=aN(),g=S-(h-d);if(d=h,g>0){if(++a>=G)return arguments[0]}else a=0;return i.apply(n,arguments)}}function Ca(i,a){var d=-1,h=i.length,g=h-1;for(a=a===n?h:a;++d<a;){var v=Tc(d,g),E=i[v];i[v]=i[d],i[d]=E}return i.length=a,i}var Nf=OA(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(PB,function(d,h,g,v){a.push(g?v.replace(GB,"$1"):h||d)}),a});function Gn(i){if(typeof i=="string"||qt(i))return i;var a=i+"";return a=="0"&&1/i==-Q?"-0":a}function so(i){if(i!=null){try{return Ks.call(i)}catch{}try{return i+""}catch{}}return""}function UA(i,a){return Xt(xr,function(d){var h="_."+d[0];a&d[1]&&!Zs(i,h)&&i.push(h)}),i.sort()}function Af(i){if(i instanceof Re)return i.clone();var a=new en(i.__wrapped__,i.__chain__);return a.__actions__=Ft(i.__actions__),a.__index__=i.__index__,a.__values__=i.__values__,a}function ZA(i,a,d){(d?At(i,a,d):a===n)?a=1:a=pt(Ve(a),0);var h=i==null?0:i.length;if(!h||a<1)return[];for(var g=0,v=0,E=z(na(h/a));g<h;)E[v++]=nn(i,g,g+=a);return E}function WA(i){for(var a=-1,d=i==null?0:i.length,h=0,g=[];++a<d;){var v=i[a];v&&(g[h++]=v)}return g}function HA(){var i=arguments.length;if(!i)return[];for(var a=z(i-1),d=arguments[0],h=i;h--;)a[h-1]=arguments[h];return Tr(Ee(d)?Ft(d):[d],_t(a,1))}var jA=De(function(i,a){return it(i)?Yi(i,_t(a,1,it,!0)):[]}),qA=De(function(i,a){var d=rn(a);return it(d)&&(d=n),it(i)?Yi(i,_t(a,1,it,!0),fe(d,2)):[]}),KA=De(function(i,a){var d=rn(a);return it(d)&&(d=n),it(i)?Yi(i,_t(a,1,it,!0),n,d):[]});function YA(i,a,d){var h=i==null?0:i.length;return h?(a=d||a===n?1:Ve(a),nn(i,a<0?0:a,h)):[]}function JA(i,a,d){var h=i==null?0:i.length;return h?(a=d||a===n?1:Ve(a),a=h-a,nn(i,0,a<0?0:a)):[]}function XA(i,a){return i&&i.length?pa(i,fe(a,3),!0,!0):[]}function QA(i,a){return i&&i.length?pa(i,fe(a,3),!0):[]}function eP(i,a,d,h){var g=i==null?0:i.length;return g?(d&&typeof d!="number"&&At(i,a,d)&&(d=0,h=g),HN(i,a,d,h)):[]}function Pf(i,a,d){var h=i==null?0:i.length;if(!h)return-1;var g=d==null?0:Ve(d);return g<0&&(g=pt(h+g,0)),Ws(i,fe(a,3),g)}function Df(i,a,d){var h=i==null?0:i.length;if(!h)return-1;var g=h-1;return d!==n&&(g=Ve(d),g=d<0?pt(h+g,0):kt(g,h-1)),Ws(i,fe(a,3),g,!0)}function Ff(i){var a=i==null?0:i.length;return a?_t(i,1):[]}function tP(i){var a=i==null?0:i.length;return a?_t(i,Q):[]}function nP(i,a){var d=i==null?0:i.length;return d?(a=a===n?1:Ve(a),_t(i,a)):[]}function rP(i){for(var a=-1,d=i==null?0:i.length,h={};++a<d;){var g=i[a];h[g[0]]=g[1]}return h}function Rf(i){return i&&i.length?i[0]:n}function oP(i,a,d){var h=i==null?0:i.length;if(!h)return-1;var g=d==null?0:Ve(d);return g<0&&(g=pt(h+g,0)),Do(i,a,g)}function iP(i){var a=i==null?0:i.length;return a?nn(i,0,-1):[]}var sP=De(function(i){var a=Xe(i,Pc);return a.length&&a[0]===i[0]?bc(a):[]}),aP=De(function(i){var a=rn(i),d=Xe(i,Pc);return a===rn(d)?a=n:d.pop(),d.length&&d[0]===i[0]?bc(d,fe(a,2)):[]}),lP=De(function(i){var a=rn(i),d=Xe(i,Pc);return a=typeof a=="function"?a:n,a&&d.pop(),d.length&&d[0]===i[0]?bc(d,n,a):[]});function cP(i,a){return i==null?"":iN.call(i,a)}function rn(i){var a=i==null?0:i.length;return a?i[a-1]:n}function dP(i,a,d){var h=i==null?0:i.length;if(!h)return-1;var g=h;return d!==n&&(g=Ve(d),g=g<0?pt(h+g,0):kt(g,h-1)),a===a?UV(i,a,g):Ws(i,fh,g,!0)}function uP(i,a){return i&&i.length?Wh(i,Ve(a)):n}var pP=De(Mf);function Mf(i,a){return i&&i.length&&a&&a.length?Ec(i,a):i}function hP(i,a,d){return i&&i.length&&a&&a.length?Ec(i,a,fe(d,2)):i}function fP(i,a,d){return i&&i.length&&a&&a.length?Ec(i,a,n,d):i}var mP=Qn(function(i,a){var d=i==null?0:i.length,h=_c(i,a);return qh(i,Xe(a,function(g){return er(g,d)?+g:g}).sort(of)),h});function gP(i,a){var d=[];if(!(i&&i.length))return d;var h=-1,g=[],v=i.length;for(a=fe(a,3);++h<v;){var E=i[h];a(E,h,i)&&(d.push(E),g.push(h))}return qh(i,g),d}function Hc(i){return i==null?i:cN.call(i)}function yP(i,a,d){var h=i==null?0:i.length;return h?(d&&typeof d!="number"&&At(i,a,d)?(a=0,d=h):(a=a==null?0:Ve(a),d=d===n?h:Ve(d)),nn(i,a,d)):[]}function _P(i,a){return ua(i,a)}function vP(i,a,d){return Vc(i,a,fe(d,2))}function CP(i,a){var d=i==null?0:i.length;if(d){var h=ua(i,a);if(h<d&&En(i[h],a))return h}return-1}function wP(i,a){return ua(i,a,!0)}function bP(i,a,d){return Vc(i,a,fe(d,2),!0)}function xP(i,a){var d=i==null?0:i.length;if(d){var h=ua(i,a,!0)-1;if(En(i[h],a))return h}return-1}function kP(i){return i&&i.length?Yh(i):[]}function SP(i,a){return i&&i.length?Yh(i,fe(a,2)):[]}function EP(i){var a=i==null?0:i.length;return a?nn(i,1,a):[]}function TP(i,a,d){return i&&i.length?(a=d||a===n?1:Ve(a),nn(i,0,a<0?0:a)):[]}function BP(i,a,d){var h=i==null?0:i.length;return h?(a=d||a===n?1:Ve(a),a=h-a,nn(i,a<0?0:a,h)):[]}function VP(i,a){return i&&i.length?pa(i,fe(a,3),!1,!0):[]}function NP(i,a){return i&&i.length?pa(i,fe(a,3)):[]}var AP=De(function(i){return Ar(_t(i,1,it,!0))}),PP=De(function(i){var a=rn(i);return it(a)&&(a=n),Ar(_t(i,1,it,!0),fe(a,2))}),DP=De(function(i){var a=rn(i);return a=typeof a=="function"?a:n,Ar(_t(i,1,it,!0),n,a)});function FP(i){return i&&i.length?Ar(i):[]}function RP(i,a){return i&&i.length?Ar(i,fe(a,2)):[]}function MP(i,a){return a=typeof a=="function"?a:n,i&&i.length?Ar(i,n,a):[]}function jc(i){if(!(i&&i.length))return[];var a=0;return i=Er(i,function(d){if(it(d))return a=pt(d.length,a),!0}),dc(a,function(d){return Xe(i,ac(d))})}function If(i,a){if(!(i&&i.length))return[];var d=jc(i);return a==null?d:Xe(d,function(h){return Wt(a,n,h)})}var IP=De(function(i,a){return it(i)?Yi(i,a):[]}),OP=De(function(i){return Ac(Er(i,it))}),LP=De(function(i){var a=rn(i);return it(a)&&(a=n),Ac(Er(i,it),fe(a,2))}),GP=De(function(i){var a=rn(i);return a=typeof a=="function"?a:n,Ac(Er(i,it),n,a)}),zP=De(jc);function $P(i,a){return ef(i||[],a||[],Ki)}function UP(i,a){return ef(i||[],a||[],Qi)}var ZP=De(function(i){var a=i.length,d=a>1?i[a-1]:n;return d=typeof d=="function"?(i.pop(),d):n,If(i,d)});function Of(i){var a=_(i);return a.__chain__=!0,a}function WP(i,a){return a(i),i}function wa(i,a){return a(i)}var HP=Qn(function(i){var a=i.length,d=a?i[0]:0,h=this.__wrapped__,g=function(v){return _c(v,i)};return a>1||this.__actions__.length||!(h instanceof Re)||!er(d)?this.thru(g):(h=h.slice(d,+d+(a?1:0)),h.__actions__.push({func:wa,args:[g],thisArg:n}),new en(h,this.__chain__).thru(function(v){return a&&!v.length&&v.push(n),v}))});function jP(){return Of(this)}function qP(){return new en(this.value(),this.__chain__)}function KP(){this.__values__===n&&(this.__values__=Xf(this.value()));var i=this.__index__>=this.__values__.length,a=i?n:this.__values__[this.__index__++];return{done:i,value:a}}function YP(){return this}function JP(i){for(var a,d=this;d instanceof sa;){var h=Af(d);h.__index__=0,h.__values__=n,a?g.__wrapped__=h:a=h;var g=h;d=d.__wrapped__}return g.__wrapped__=i,a}function XP(){var i=this.__wrapped__;if(i instanceof Re){var a=i;return this.__actions__.length&&(a=new Re(this)),a=a.reverse(),a.__actions__.push({func:wa,args:[Hc],thisArg:n}),new en(a,this.__chain__)}return this.thru(Hc)}function QP(){return Qh(this.__wrapped__,this.__actions__)}var eD=ha(function(i,a,d){He.call(i,d)?++i[d]:Jn(i,d,1)});function tD(i,a,d){var h=Ee(i)?ph:WN;return d&&At(i,a,d)&&(a=n),h(i,fe(a,3))}function nD(i,a){var d=Ee(i)?Er:Mh;return d(i,fe(a,3))}var rD=uf(Pf),oD=uf(Df);function iD(i,a){return _t(ba(i,a),1)}function sD(i,a){return _t(ba(i,a),Q)}function aD(i,a,d){return d=d===n?1:Ve(d),_t(ba(i,a),d)}function Lf(i,a){var d=Ee(i)?Xt:Nr;return d(i,fe(a,3))}function Gf(i,a){var d=Ee(i)?EV:Rh;return d(i,fe(a,3))}var lD=ha(function(i,a,d){He.call(i,d)?i[d].push(a):Jn(i,d,[a])});function cD(i,a,d,h){i=Rt(i)?i:Wo(i),d=d&&!h?Ve(d):0;var g=i.length;return d<0&&(d=pt(g+d,0)),Ta(i)?d<=g&&i.indexOf(a,d)>-1:!!g&&Do(i,a,d)>-1}var dD=De(function(i,a,d){var h=-1,g=typeof a=="function",v=Rt(i)?z(i.length):[];return Nr(i,function(E){v[++h]=g?Wt(a,E,d):Ji(E,a,d)}),v}),uD=ha(function(i,a,d){Jn(i,d,a)});function ba(i,a){var d=Ee(i)?Xe:$h;return d(i,fe(a,3))}function pD(i,a,d,h){return i==null?[]:(Ee(a)||(a=a==null?[]:[a]),d=h?n:d,Ee(d)||(d=d==null?[]:[d]),Hh(i,a,d))}var hD=ha(function(i,a,d){i[d?0:1].push(a)},function(){return[[],[]]});function fD(i,a,d){var h=Ee(i)?ic:gh,g=arguments.length<3;return h(i,fe(a,4),d,g,Nr)}function mD(i,a,d){var h=Ee(i)?TV:gh,g=arguments.length<3;return h(i,fe(a,4),d,g,Rh)}function gD(i,a){var d=Ee(i)?Er:Mh;return d(i,Sa(fe(a,3)))}function yD(i){var a=Ee(i)?Ah:cA;return a(i)}function _D(i,a,d){(d?At(i,a,d):a===n)?a=1:a=Ve(a);var h=Ee(i)?GN:dA;return h(i,a)}function vD(i){var a=Ee(i)?zN:pA;return a(i)}function CD(i){if(i==null)return 0;if(Rt(i))return Ta(i)?Ro(i):i.length;var a=St(i);return a==bn||a==xn?i.size:kc(i).length}function wD(i,a,d){var h=Ee(i)?sc:hA;return d&&At(i,a,d)&&(a=n),h(i,fe(a,3))}var bD=De(function(i,a){if(i==null)return[];var d=a.length;return d>1&&At(i,a[0],a[1])?a=[]:d>2&&At(a[0],a[1],a[2])&&(a=[a[0]]),Hh(i,_t(a,1),[])}),xa=nN||function(){return yt.Date.now()};function xD(i,a){if(typeof a!="function")throw new Qt(c);return i=Ve(i),function(){if(--i<1)return a.apply(this,arguments)}}function zf(i,a,d){return a=d?n:a,a=i&&a==null?i.length:a,Xn(i,te,n,n,n,n,a)}function $f(i,a){var d;if(typeof a!="function")throw new Qt(c);return i=Ve(i),function(){return--i>0&&(d=a.apply(this,arguments)),i<=1&&(a=n),d}}var qc=De(function(i,a,d){var h=L;if(d.length){var g=Br(d,Uo(qc));h|=N}return Xn(i,h,a,d,g)}),Uf=De(function(i,a,d){var h=L|C;if(d.length){var g=Br(d,Uo(Uf));h|=N}return Xn(a,h,i,d,g)});function Zf(i,a,d){a=d?n:a;var h=Xn(i,O,n,n,n,n,n,a);return h.placeholder=Zf.placeholder,h}function Wf(i,a,d){a=d?n:a;var h=Xn(i,F,n,n,n,n,n,a);return h.placeholder=Wf.placeholder,h}function Hf(i,a,d){var h,g,v,E,V,D,W=0,H=!1,K=!1,oe=!0;if(typeof i!="function")throw new Qt(c);a=on(a)||0,tt(d)&&(H=!!d.leading,K="maxWait"in d,v=K?pt(on(d.maxWait)||0,a):v,oe="trailing"in d?!!d.trailing:oe);function ue(st){var Tn=h,rr=g;return h=g=n,W=st,E=i.apply(rr,Tn),E}function ge(st){return W=st,V=ns(Fe,a),H?ue(st):E}function Pe(st){var Tn=st-D,rr=st-W,um=a-Tn;return K?kt(um,v-rr):um}function ye(st){var Tn=st-D,rr=st-W;return D===n||Tn>=a||Tn<0||K&&rr>=v}function Fe(){var st=xa();if(ye(st))return Me(st);V=ns(Fe,Pe(st))}function Me(st){return V=n,oe&&h?ue(st):(h=g=n,E)}function Kt(){V!==n&&tf(V),W=0,h=D=g=V=n}function Pt(){return V===n?E:Me(xa())}function Yt(){var st=xa(),Tn=ye(st);if(h=arguments,g=this,D=st,Tn){if(V===n)return ge(D);if(K)return tf(V),V=ns(Fe,a),ue(D)}return V===n&&(V=ns(Fe,a)),E}return Yt.cancel=Kt,Yt.flush=Pt,Yt}var kD=De(function(i,a){return Fh(i,1,a)}),SD=De(function(i,a,d){return Fh(i,on(a)||0,d)});function ED(i){return Xn(i,Y)}function ka(i,a){if(typeof i!="function"||a!=null&&typeof a!="function")throw new Qt(c);var d=function(){var h=arguments,g=a?a.apply(this,h):h[0],v=d.cache;if(v.has(g))return v.get(g);var E=i.apply(this,h);return d.cache=v.set(g,E)||v,E};return d.cache=new(ka.Cache||Yn),d}ka.Cache=Yn;function Sa(i){if(typeof i!="function")throw new Qt(c);return function(){var a=arguments;switch(a.length){case 0:return!i.call(this);case 1:return!i.call(this,a[0]);case 2:return!i.call(this,a[0],a[1]);case 3:return!i.call(this,a[0],a[1],a[2])}return!i.apply(this,a)}}function TD(i){return $f(2,i)}var BD=fA(function(i,a){a=a.length==1&&Ee(a[0])?Xe(a[0],Ht(fe())):Xe(_t(a,1),Ht(fe()));var d=a.length;return De(function(h){for(var g=-1,v=kt(h.length,d);++g<v;)h[g]=a[g].call(this,h[g]);return Wt(i,this,h)})}),Kc=De(function(i,a){var d=Br(a,Uo(Kc));return Xn(i,N,n,a,d)}),jf=De(function(i,a){var d=Br(a,Uo(jf));return Xn(i,U,n,a,d)}),VD=Qn(function(i,a){return Xn(i,j,n,n,n,a)});function ND(i,a){if(typeof i!="function")throw new Qt(c);return a=a===n?a:Ve(a),De(i,a)}function AD(i,a){if(typeof i!="function")throw new Qt(c);return a=a==null?0:pt(Ve(a),0),De(function(d){var h=d[a],g=Dr(d,0,a);return h&&Tr(g,h),Wt(i,this,g)})}function PD(i,a,d){var h=!0,g=!0;if(typeof i!="function")throw new Qt(c);return tt(d)&&(h="leading"in d?!!d.leading:h,g="trailing"in d?!!d.trailing:g),Hf(i,a,{leading:h,maxWait:a,trailing:g})}function DD(i){return zf(i,1)}function FD(i,a){return Kc(Dc(a),i)}function RD(){if(!arguments.length)return[];var i=arguments[0];return Ee(i)?i:[i]}function MD(i){return tn(i,B)}function ID(i,a){return a=typeof a=="function"?a:n,tn(i,B,a)}function OD(i){return tn(i,y|B)}function LD(i,a){return a=typeof a=="function"?a:n,tn(i,y|B,a)}function GD(i,a){return a==null||Dh(i,a,gt(a))}function En(i,a){return i===a||i!==i&&a!==a}var zD=ya(wc),$D=ya(function(i,a){return i>=a}),ao=Lh(function(){return arguments}())?Lh:function(i){return nt(i)&&He.call(i,"callee")&&!Sh.call(i,"callee")},Ee=z.isArray,UD=sh?Ht(sh):JN;function Rt(i){return i!=null&&Ea(i.length)&&!tr(i)}function it(i){return nt(i)&&Rt(i)}function ZD(i){return i===!0||i===!1||nt(i)&&Nt(i)==kr}var Fr=oN||sd,WD=ah?Ht(ah):XN;function HD(i){return nt(i)&&i.nodeType===1&&!rs(i)}function jD(i){if(i==null)return!0;if(Rt(i)&&(Ee(i)||typeof i=="string"||typeof i.splice=="function"||Fr(i)||Zo(i)||ao(i)))return!i.length;var a=St(i);if(a==bn||a==xn)return!i.size;if(ts(i))return!kc(i).length;for(var d in i)if(He.call(i,d))return!1;return!0}function qD(i,a){return Xi(i,a)}function KD(i,a,d){d=typeof d=="function"?d:n;var h=d?d(i,a):n;return h===n?Xi(i,a,n,d):!!h}function Yc(i){if(!nt(i))return!1;var a=Nt(i);return a==Se||a==Ls||typeof i.message=="string"&&typeof i.name=="string"&&!rs(i)}function YD(i){return typeof i=="number"&&Th(i)}function tr(i){if(!tt(i))return!1;var a=Nt(i);return a==Xr||a==Fp||a==Os||a==CB}function qf(i){return typeof i=="number"&&i==Ve(i)}function Ea(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=ne}function tt(i){var a=typeof i;return i!=null&&(a=="object"||a=="function")}function nt(i){return i!=null&&typeof i=="object"}var Kf=lh?Ht(lh):eA;function JD(i,a){return i===a||xc(i,a,Gc(a))}function XD(i,a,d){return d=typeof d=="function"?d:n,xc(i,a,Gc(a),d)}function QD(i){return Yf(i)&&i!=+i}function eF(i){if(IA(i))throw new ke(l);return Gh(i)}function tF(i){return i===null}function nF(i){return i==null}function Yf(i){return typeof i=="number"||nt(i)&&Nt(i)==Oi}function rs(i){if(!nt(i)||Nt(i)!=qn)return!1;var a=Qs(i);if(a===null)return!0;var d=He.call(a,"constructor")&&a.constructor;return typeof d=="function"&&d instanceof d&&Ks.call(d)==XV}var Jc=ch?Ht(ch):tA;function rF(i){return qf(i)&&i>=-ne&&i<=ne}var Jf=dh?Ht(dh):nA;function Ta(i){return typeof i=="string"||!Ee(i)&&nt(i)&&Nt(i)==Gi}function qt(i){return typeof i=="symbol"||nt(i)&&Nt(i)==Gs}var Zo=uh?Ht(uh):rA;function oF(i){return i===n}function iF(i){return nt(i)&&St(i)==zi}function sF(i){return nt(i)&&Nt(i)==bB}var aF=ya(Sc),lF=ya(function(i,a){return i<=a});function Xf(i){if(!i)return[];if(Rt(i))return Ta(i)?kn(i):Ft(i);if(Zi&&i[Zi])return GV(i[Zi]());var a=St(i),d=a==bn?pc:a==xn?Hs:Wo;return d(i)}function nr(i){if(!i)return i===0?i:0;if(i=on(i),i===Q||i===-Q){var a=i<0?-1:1;return a*be}return i===i?i:0}function Ve(i){var a=nr(i),d=a%1;return a===a?d?a-d:a:0}function Qf(i){return i?ro(Ve(i),0,ot):0}function on(i){if(typeof i=="number")return i;if(qt(i))return $e;if(tt(i)){var a=typeof i.valueOf=="function"?i.valueOf():i;i=tt(a)?a+"":a}if(typeof i!="string")return i===0?i:+i;i=yh(i);var d=UB.test(i);return d||WB.test(i)?xV(i.slice(2),d?2:8):$B.test(i)?$e:+i}function em(i){return Ln(i,Mt(i))}function cF(i){return i?ro(Ve(i),-ne,ne):i===0?i:0}function We(i){return i==null?"":jt(i)}var dF=zo(function(i,a){if(ts(a)||Rt(a)){Ln(a,gt(a),i);return}for(var d in a)He.call(a,d)&&Ki(i,d,a[d])}),tm=zo(function(i,a){Ln(a,Mt(a),i)}),Ba=zo(function(i,a,d,h){Ln(a,Mt(a),i,h)}),uF=zo(function(i,a,d,h){Ln(a,gt(a),i,h)}),pF=Qn(_c);function hF(i,a){var d=Go(i);return a==null?d:Ph(d,a)}var fF=De(function(i,a){i=je(i);var d=-1,h=a.length,g=h>2?a[2]:n;for(g&&At(a[0],a[1],g)&&(h=1);++d<h;)for(var v=a[d],E=Mt(v),V=-1,D=E.length;++V<D;){var W=E[V],H=i[W];(H===n||En(H,Io[W])&&!He.call(i,W))&&(i[W]=v[W])}return i}),mF=De(function(i){return i.push(n,_f),Wt(nm,n,i)});function gF(i,a){return hh(i,fe(a,3),On)}function yF(i,a){return hh(i,fe(a,3),Cc)}function _F(i,a){return i==null?i:vc(i,fe(a,3),Mt)}function vF(i,a){return i==null?i:Ih(i,fe(a,3),Mt)}function CF(i,a){return i&&On(i,fe(a,3))}function wF(i,a){return i&&Cc(i,fe(a,3))}function bF(i){return i==null?[]:ca(i,gt(i))}function xF(i){return i==null?[]:ca(i,Mt(i))}function Xc(i,a,d){var h=i==null?n:oo(i,a);return h===n?d:h}function kF(i,a){return i!=null&&wf(i,a,jN)}function Qc(i,a){return i!=null&&wf(i,a,qN)}var SF=hf(function(i,a,d){a!=null&&typeof a.toString!="function"&&(a=Ys.call(a)),i[a]=d},td(It)),EF=hf(function(i,a,d){a!=null&&typeof a.toString!="function"&&(a=Ys.call(a)),He.call(i,a)?i[a].push(d):i[a]=[d]},fe),TF=De(Ji);function gt(i){return Rt(i)?Nh(i):kc(i)}function Mt(i){return Rt(i)?Nh(i,!0):oA(i)}function BF(i,a){var d={};return a=fe(a,3),On(i,function(h,g,v){Jn(d,a(h,g,v),h)}),d}function VF(i,a){var d={};return a=fe(a,3),On(i,function(h,g,v){Jn(d,g,a(h,g,v))}),d}var NF=zo(function(i,a,d){da(i,a,d)}),nm=zo(function(i,a,d,h){da(i,a,d,h)}),AF=Qn(function(i,a){var d={};if(i==null)return d;var h=!1;a=Xe(a,function(v){return v=Pr(v,i),h||(h=v.length>1),v}),Ln(i,Oc(i),d),h&&(d=tn(d,y|T|B,SA));for(var g=a.length;g--;)Nc(d,a[g]);return d});function PF(i,a){return rm(i,Sa(fe(a)))}var DF=Qn(function(i,a){return i==null?{}:sA(i,a)});function rm(i,a){if(i==null)return{};var d=Xe(Oc(i),function(h){return[h]});return a=fe(a),jh(i,d,function(h,g){return a(h,g[0])})}function FF(i,a,d){a=Pr(a,i);var h=-1,g=a.length;for(g||(g=1,i=n);++h<g;){var v=i==null?n:i[Gn(a[h])];v===n&&(h=g,v=d),i=tr(v)?v.call(i):v}return i}function RF(i,a,d){return i==null?i:Qi(i,a,d)}function MF(i,a,d,h){return h=typeof h=="function"?h:n,i==null?i:Qi(i,a,d,h)}var om=gf(gt),im=gf(Mt);function IF(i,a,d){var h=Ee(i),g=h||Fr(i)||Zo(i);if(a=fe(a,4),d==null){var v=i&&i.constructor;g?d=h?new v:[]:tt(i)?d=tr(v)?Go(Qs(i)):{}:d={}}return(g?Xt:On)(i,function(E,V,D){return a(d,E,V,D)}),d}function OF(i,a){return i==null?!0:Nc(i,a)}function LF(i,a,d){return i==null?i:Xh(i,a,Dc(d))}function GF(i,a,d,h){return h=typeof h=="function"?h:n,i==null?i:Xh(i,a,Dc(d),h)}function Wo(i){return i==null?[]:uc(i,gt(i))}function zF(i){return i==null?[]:uc(i,Mt(i))}function $F(i,a,d){return d===n&&(d=a,a=n),d!==n&&(d=on(d),d=d===d?d:0),a!==n&&(a=on(a),a=a===a?a:0),ro(on(i),a,d)}function UF(i,a,d){return a=nr(a),d===n?(d=a,a=0):d=nr(d),i=on(i),KN(i,a,d)}function ZF(i,a,d){if(d&&typeof d!="boolean"&&At(i,a,d)&&(a=d=n),d===n&&(typeof a=="boolean"?(d=a,a=n):typeof i=="boolean"&&(d=i,i=n)),i===n&&a===n?(i=0,a=1):(i=nr(i),a===n?(a=i,i=0):a=nr(a)),i>a){var h=i;i=a,a=h}if(d||i%1||a%1){var g=Bh();return kt(i+g*(a-i+bV("1e-"+((g+"").length-1))),a)}return Tc(i,a)}var WF=$o(function(i,a,d){return a=a.toLowerCase(),i+(d?sm(a):a)});function sm(i){return ed(We(i).toLowerCase())}function am(i){return i=We(i),i&&i.replace(jB,RV).replace(pV,"")}function HF(i,a,d){i=We(i),a=jt(a);var h=i.length;d=d===n?h:ro(Ve(d),0,h);var g=d;return d-=a.length,d>=0&&i.slice(d,g)==a}function jF(i){return i=We(i),i&&TB.test(i)?i.replace(Ip,MV):i}function qF(i){return i=We(i),i&&DB.test(i)?i.replace(Kl,"\\$&"):i}var KF=$o(function(i,a,d){return i+(d?"-":"")+a.toLowerCase()}),YF=$o(function(i,a,d){return i+(d?" ":"")+a.toLowerCase()}),JF=df("toLowerCase");function XF(i,a,d){i=We(i),a=Ve(a);var h=a?Ro(i):0;if(!a||h>=a)return i;var g=(a-h)/2;return ga(ra(g),d)+i+ga(na(g),d)}function QF(i,a,d){i=We(i),a=Ve(a);var h=a?Ro(i):0;return a&&h<a?i+ga(a-h,d):i}function eR(i,a,d){i=We(i),a=Ve(a);var h=a?Ro(i):0;return a&&h<a?ga(a-h,d)+i:i}function tR(i,a,d){return d||a==null?a=0:a&&(a=+a),lN(We(i).replace(Yl,""),a||0)}function nR(i,a,d){return(d?At(i,a,d):a===n)?a=1:a=Ve(a),Bc(We(i),a)}function rR(){var i=arguments,a=We(i[0]);return i.length<3?a:a.replace(i[1],i[2])}var oR=$o(function(i,a,d){return i+(d?"_":"")+a.toLowerCase()});function iR(i,a,d){return d&&typeof d!="number"&&At(i,a,d)&&(a=d=n),d=d===n?ot:d>>>0,d?(i=We(i),i&&(typeof a=="string"||a!=null&&!Jc(a))&&(a=jt(a),!a&&Fo(i))?Dr(kn(i),0,d):i.split(a,d)):[]}var sR=$o(function(i,a,d){return i+(d?" ":"")+ed(a)});function aR(i,a,d){return i=We(i),d=d==null?0:ro(Ve(d),0,i.length),a=jt(a),i.slice(d,d+a.length)==a}function lR(i,a,d){var h=_.templateSettings;d&&At(i,a,d)&&(a=n),i=We(i),a=Ba({},a,h,yf);var g=Ba({},a.imports,h.imports,yf),v=gt(g),E=uc(g,v),V,D,W=0,H=a.interpolate||zs,K="__p += '",oe=hc((a.escape||zs).source+"|"+H.source+"|"+(H===Op?zB:zs).source+"|"+(a.evaluate||zs).source+"|$","g"),ue="//# sourceURL="+(He.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++yV+"]")+`
|
|
75
|
+
`;i.replace(oe,function(ye,Fe,Me,Kt,Pt,Yt){return Me||(Me=Kt),K+=i.slice(W,Yt).replace(qB,IV),Fe&&(V=!0,K+=`' +
|
|
76
76
|
__e(`+Fe+`) +
|
|
77
|
-
'`),
|
|
78
|
-
`+
|
|
79
|
-
__p += '`),Me&&(
|
|
77
|
+
'`),Pt&&(D=!0,K+=`';
|
|
78
|
+
`+Pt+`;
|
|
79
|
+
__p += '`),Me&&(K+=`' +
|
|
80
80
|
((__t = (`+Me+`)) == null ? '' : __t) +
|
|
81
|
-
'`),
|
|
82
|
-
`;var ge=He.call(a,"variable")&&a.variable;if(!ge)
|
|
83
|
-
`+
|
|
81
|
+
'`),W=Yt+ye.length,ye}),K+=`';
|
|
82
|
+
`;var ge=He.call(a,"variable")&&a.variable;if(!ge)K=`with (obj) {
|
|
83
|
+
`+K+`
|
|
84
84
|
}
|
|
85
|
-
`;else if(
|
|
85
|
+
`;else if(LB.test(ge))throw new ke(u);K=(D?K.replace(xB,""):K).replace(kB,"$1").replace(SB,"$1;"),K="function("+(ge||"obj")+`) {
|
|
86
86
|
`+(ge?"":`obj || (obj = {});
|
|
87
87
|
`)+"var __t, __p = ''"+(V?", __e = _.escape":"")+(D?`, __j = Array.prototype.join;
|
|
88
88
|
function print() { __p += __j.call(arguments, '') }
|
|
89
89
|
`:`;
|
|
90
|
-
`)+
|
|
91
|
-
}`;var Pe=rm(function(){return Ze(v,ue+"return "+J).apply(n,E)});if(Pe.source=J,jc(Pe))throw Pe;return Pe}function WF(i){return We(i).toLowerCase()}function HF(i){return We(i).toUpperCase()}function jF(i,a,d){if(i=We(i),i&&(d||a===n))return uh(i);if(!i||!(a=Wt(a)))return i;var h=xn(i),g=xn(a),v=ph(h,g),E=hh(h,g)+1;return Dr(h,v,E).join("")}function qF(i,a,d){if(i=We(i),i&&(d||a===n))return i.slice(0,mh(i)+1);if(!i||!(a=Wt(a)))return i;var h=xn(i),g=hh(h,xn(a))+1;return Dr(h,0,g).join("")}function KF(i,a,d){if(i=We(i),i&&(d||a===n))return i.replace(jl,"");if(!i||!(a=Wt(a)))return i;var h=xn(i),g=ph(h,xn(a));return Dr(h,g).join("")}function YF(i,a){var d=U,h=X;if(tt(a)){var g="separator"in a?a.separator:g;d="length"in a?Ve(a.length):d,h="omission"in a?Wt(a.omission):h}i=We(i);var v=i.length;if(Po(i)){var E=xn(i);v=E.length}if(d>=v)return i;var V=d-Do(h);if(V<1)return h;var D=E?Dr(E,0,V).join(""):i.slice(0,V);if(g===n)return D+h;if(E&&(V+=D.length-V),qc(g)){if(i.slice(V).search(g)){var q,K=D;for(g.global||(g=dc(g.source,We(Dp.exec(g))+"g")),g.lastIndex=0;q=g.exec(K);)var J=q.index;D=D.slice(0,J===n?V:J)}}else if(i.indexOf(Wt(g),V)!=V){var oe=D.lastIndexOf(g);oe>-1&&(D=D.slice(0,oe))}return D+h}function JF(i){return i=We(i),i&&lB.test(i)?i.replace(Np,EV):i}var XF=Go(function(i,a,d){return i+(d?" ":"")+a.toUpperCase()}),Jc=rf("toUpperCase");function nm(i,a,d){return i=We(i),a=d?n:a,a===n?wV(i)?VV(i):pV(i):i.match(a)||[]}var rm=De(function(i,a){try{return Zt(i,n,a)}catch(d){return jc(d)?d:new ke(d)}}),QF=Xn(function(i,a){return Jt(a,function(d){d=On(d),Yn(i,d,Wc(i[d],i))}),i});function eR(i){var a=i==null?0:i.length,d=fe();return i=a?Xe(i,function(h){if(typeof h[1]!="function")throw new Xt(c);return[d(h[0]),h[1]]}):[],De(function(h){for(var g=-1;++g<a;){var v=i[g];if(Zt(v[0],this,h))return Zt(v[1],this,h)}})}function tR(i){return EN(en(i,y))}function Xc(i){return function(){return i}}function nR(i,a){return i==null||i!==i?a:i}var rR=sf(),oR=sf(!0);function Mt(i){return i}function Qc(i){return Rh(typeof i=="function"?i:en(i,y))}function iR(i){return Ih(en(i,y))}function sR(i,a){return Lh(i,en(a,y))}var aR=De(function(i,a){return function(d){return Ki(d,i,a)}}),lR=De(function(i,a){return function(d){return Ki(i,d,a)}});function ed(i,a,d){var h=mt(a),g=sa(a,h);d==null&&!(tt(a)&&(g.length||!h.length))&&(d=a,a=i,i=this,g=sa(a,mt(a)));var v=!(tt(d)&&"chain"in d)||!!d.chain,E=er(i);return Jt(g,function(V){var D=a[V];i[V]=D,E&&(i.prototype[V]=function(){var q=this.__chain__;if(v||q){var K=i(this.__wrapped__),J=K.__actions__=Dt(this.__actions__);return J.push({func:D,args:arguments,thisArg:i}),K.__chain__=q,K}return D.apply(i,Tr([this.value()],arguments))})}),i}function cR(){return gt._===this&&(gt._=RV),this}function td(){}function dR(i){return i=Ve(i),De(function(a){return Oh(a,i)})}var uR=Pc(Xe),pR=Pc(sh),hR=Pc(rc);function om(i){return Oc(i)?oc(On(i)):ZN(i)}function fR(i){return function(a){return i==null?n:ro(i,a)}}var mR=lf(),gR=lf(!0);function nd(){return[]}function rd(){return!1}function yR(){return{}}function _R(){return""}function vR(){return!0}function CR(i,a){if(i=Ve(i),i<1||i>ne)return[];var d=ot,h=xt(i,ot);a=fe(a),i-=ot;for(var g=ac(h,a);++d<i;)a(d);return g}function wR(i){return Ee(i)?Xe(i,On):Ht(i)?[i]:Dt(kf(We(i)))}function bR(i){var a=++DV;return We(i)+a}var xR=pa(function(i,a){return i+a},0),kR=Dc("ceil"),SR=pa(function(i,a){return i/a},1),ER=Dc("floor");function TR(i){return i&&i.length?ia(i,Mt,_c):n}function BR(i,a){return i&&i.length?ia(i,fe(a,2),_c):n}function VR(i){return ch(i,Mt)}function NR(i,a){return ch(i,fe(a,2))}function AR(i){return i&&i.length?ia(i,Mt,bc):n}function PR(i,a){return i&&i.length?ia(i,fe(a,2),bc):n}var DR=pa(function(i,a){return i*a},1),FR=Dc("round"),RR=pa(function(i,a){return i-a},0);function MR(i){return i&&i.length?sc(i,Mt):0}function IR(i,a){return i&&i.length?sc(i,fe(a,2)):0}return _.after=iD,_.ary=Rf,_.assign=HD,_.assignIn=Kf,_.assignInWith=Sa,_.assignWith=jD,_.at=qD,_.before=Mf,_.bind=Wc,_.bindAll=QF,_.bindKey=If,_.castArray=yD,_.chain=Pf,_.chunk=EA,_.compact=TA,_.concat=BA,_.cond=eR,_.conforms=tR,_.constant=Xc,_.countBy=MP,_.create=KD,_.curry=Lf,_.curryRight=Of,_.debounce=Gf,_.defaults=YD,_.defaultsDeep=JD,_.defer=sD,_.delay=aD,_.difference=VA,_.differenceBy=NA,_.differenceWith=AA,_.drop=PA,_.dropRight=DA,_.dropRightWhile=FA,_.dropWhile=RA,_.fill=MA,_.filter=LP,_.flatMap=zP,_.flatMapDeep=$P,_.flatMapDepth=ZP,_.flatten=Bf,_.flattenDeep=IA,_.flattenDepth=LA,_.flip=lD,_.flow=rR,_.flowRight=oR,_.fromPairs=OA,_.functions=oF,_.functionsIn=iF,_.groupBy=UP,_.initial=zA,_.intersection=$A,_.intersectionBy=ZA,_.intersectionWith=UA,_.invert=aF,_.invertBy=lF,_.invokeMap=HP,_.iteratee=Qc,_.keyBy=jP,_.keys=mt,_.keysIn=Rt,_.map=va,_.mapKeys=dF,_.mapValues=uF,_.matches=iR,_.matchesProperty=sR,_.memoize=wa,_.merge=pF,_.mergeWith=Yf,_.method=aR,_.methodOf=lR,_.mixin=ed,_.negate=ba,_.nthArg=dR,_.omit=hF,_.omitBy=fF,_.once=cD,_.orderBy=qP,_.over=uR,_.overArgs=dD,_.overEvery=pR,_.overSome=hR,_.partial=Hc,_.partialRight=zf,_.partition=KP,_.pick=mF,_.pickBy=Jf,_.property=om,_.propertyOf=fR,_.pull=qA,_.pullAll=Nf,_.pullAllBy=KA,_.pullAllWith=YA,_.pullAt=JA,_.range=mR,_.rangeRight=gR,_.rearg=uD,_.reject=XP,_.remove=XA,_.rest=pD,_.reverse=Zc,_.sampleSize=eD,_.set=yF,_.setWith=_F,_.shuffle=tD,_.slice=QA,_.sortBy=oD,_.sortedUniq=sP,_.sortedUniqBy=aP,_.split=zF,_.spread=hD,_.tail=lP,_.take=cP,_.takeRight=dP,_.takeRightWhile=uP,_.takeWhile=pP,_.tap=TP,_.throttle=fD,_.thru=_a,_.toArray=Hf,_.toPairs=Xf,_.toPairsIn=Qf,_.toPath=wR,_.toPlainObject=qf,_.transform=vF,_.unary=mD,_.union=hP,_.unionBy=fP,_.unionWith=mP,_.uniq=gP,_.uniqBy=yP,_.uniqWith=_P,_.unset=CF,_.unzip=Uc,_.unzipWith=Af,_.update=wF,_.updateWith=bF,_.values=Zo,_.valuesIn=xF,_.without=vP,_.words=nm,_.wrap=gD,_.xor=CP,_.xorBy=wP,_.xorWith=bP,_.zip=xP,_.zipObject=kP,_.zipObjectDeep=SP,_.zipWith=EP,_.entries=Xf,_.entriesIn=Qf,_.extend=Kf,_.extendWith=Sa,ed(_,_),_.add=xR,_.attempt=rm,_.camelCase=TF,_.capitalize=em,_.ceil=kR,_.clamp=kF,_.clone=_D,_.cloneDeep=CD,_.cloneDeepWith=wD,_.cloneWith=vD,_.conformsTo=bD,_.deburr=tm,_.defaultTo=nR,_.divide=SR,_.endsWith=BF,_.eq=Sn,_.escape=VF,_.escapeRegExp=NF,_.every=IP,_.find=OP,_.findIndex=Ef,_.findKey=XD,_.findLast=GP,_.findLastIndex=Tf,_.findLastKey=QD,_.floor=ER,_.forEach=Df,_.forEachRight=Ff,_.forIn=eF,_.forInRight=tF,_.forOwn=nF,_.forOwnRight=rF,_.get=Kc,_.gt=xD,_.gte=kD,_.has=sF,_.hasIn=Yc,_.head=Vf,_.identity=Mt,_.includes=WP,_.indexOf=GA,_.inRange=SF,_.invoke=cF,_.isArguments=so,_.isArray=Ee,_.isArrayBuffer=SD,_.isArrayLike=Ft,_.isArrayLikeObject=it,_.isBoolean=ED,_.isBuffer=Fr,_.isDate=TD,_.isElement=BD,_.isEmpty=VD,_.isEqual=ND,_.isEqualWith=AD,_.isError=jc,_.isFinite=PD,_.isFunction=er,_.isInteger=$f,_.isLength=xa,_.isMap=Zf,_.isMatch=DD,_.isMatchWith=FD,_.isNaN=RD,_.isNative=MD,_.isNil=LD,_.isNull=ID,_.isNumber=Uf,_.isObject=tt,_.isObjectLike=nt,_.isPlainObject=ts,_.isRegExp=qc,_.isSafeInteger=OD,_.isSet=Wf,_.isString=ka,_.isSymbol=Ht,_.isTypedArray=$o,_.isUndefined=GD,_.isWeakMap=zD,_.isWeakSet=$D,_.join=WA,_.kebabCase=AF,_.last=nn,_.lastIndexOf=HA,_.lowerCase=PF,_.lowerFirst=DF,_.lt=ZD,_.lte=UD,_.max=TR,_.maxBy=BR,_.mean=VR,_.meanBy=NR,_.min=AR,_.minBy=PR,_.stubArray=nd,_.stubFalse=rd,_.stubObject=yR,_.stubString=_R,_.stubTrue=vR,_.multiply=DR,_.nth=jA,_.noConflict=cR,_.noop=td,_.now=Ca,_.pad=FF,_.padEnd=RF,_.padStart=MF,_.parseInt=IF,_.random=EF,_.reduce=YP,_.reduceRight=JP,_.repeat=LF,_.replace=OF,_.result=gF,_.round=FR,_.runInContext=A,_.sample=QP,_.size=nD,_.snakeCase=GF,_.some=rD,_.sortedIndex=eP,_.sortedIndexBy=tP,_.sortedIndexOf=nP,_.sortedLastIndex=rP,_.sortedLastIndexBy=oP,_.sortedLastIndexOf=iP,_.startCase=$F,_.startsWith=ZF,_.subtract=RR,_.sum=MR,_.sumBy=IR,_.template=UF,_.times=CR,_.toFinite=tr,_.toInteger=Ve,_.toLength=jf,_.toLower=WF,_.toNumber=rn,_.toSafeInteger=WD,_.toString=We,_.toUpper=HF,_.trim=jF,_.trimEnd=qF,_.trimStart=KF,_.truncate=YF,_.unescape=JF,_.uniqueId=bR,_.upperCase=XF,_.upperFirst=Jc,_.each=Df,_.eachRight=Ff,_.first=Vf,ed(_,function(){var i={};return In(_,function(a,d){He.call(_.prototype,d)||(i[d]=a)}),i}(),{chain:!1}),_.VERSION=o,Jt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){_[i].placeholder=_}),Jt(["drop","take"],function(i,a){Re.prototype[i]=function(d){d=d===n?1:ut(Ve(d),0);var h=this.__filtered__&&!a?new Re(this):this.clone();return h.__filtered__?h.__takeCount__=xt(d,h.__takeCount__):h.__views__.push({size:xt(d,ot),type:i+(h.__dir__<0?"Right":"")}),h},Re.prototype[i+"Right"]=function(d){return this.reverse()[i](d).reverse()}}),Jt(["filter","map","takeWhile"],function(i,a){var d=a+1,h=d==w||d==$;Re.prototype[i]=function(g){var v=this.clone();return v.__iteratees__.push({iteratee:fe(g,3),type:d}),v.__filtered__=v.__filtered__||h,v}}),Jt(["head","last"],function(i,a){var d="take"+(a?"Right":"");Re.prototype[i]=function(){return this[d](1).value()[0]}}),Jt(["initial","tail"],function(i,a){var d="drop"+(a?"":"Right");Re.prototype[i]=function(){return this.__filtered__?new Re(this):this[d](1)}}),Re.prototype.compact=function(){return this.filter(Mt)},Re.prototype.find=function(i){return this.filter(i).head()},Re.prototype.findLast=function(i){return this.reverse().find(i)},Re.prototype.invokeMap=De(function(i,a){return typeof i=="function"?new Re(this):this.map(function(d){return Ki(d,i,a)})}),Re.prototype.reject=function(i){return this.filter(ba(fe(i)))},Re.prototype.slice=function(i,a){i=Ve(i);var d=this;return d.__filtered__&&(i>0||a<0)?new Re(d):(i<0?d=d.takeRight(-i):i&&(d=d.drop(i)),a!==n&&(a=Ve(a),d=a<0?d.dropRight(-a):d.take(a-i)),d)},Re.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Re.prototype.toArray=function(){return this.take(ot)},In(Re.prototype,function(i,a){var d=/^(?:filter|find|map|reject)|While$/.test(a),h=/^(?:head|last)$/.test(a),g=_[h?"take"+(a=="last"?"Right":""):a],v=h||/^find/.test(a);g&&(_.prototype[a]=function(){var E=this.__wrapped__,V=h?[1]:arguments,D=E instanceof Re,q=V[0],K=D||Ee(E),J=function(Fe){var Me=g.apply(_,Tr([Fe],V));return h&&oe?Me[0]:Me};K&&d&&typeof q=="function"&&q.length!=1&&(D=K=!1);var oe=this.__chain__,ue=!!this.__actions__.length,ge=v&&!oe,Pe=D&&!ue;if(!v&&K){E=Pe?E:new Re(this);var ye=i.apply(E,V);return ye.__actions__.push({func:_a,args:[J],thisArg:n}),new Qt(ye,oe)}return ge&&Pe?i.apply(this,V):(ye=this.thru(J),ge?h?ye.value()[0]:ye.value():ye)})}),Jt(["pop","push","shift","sort","splice","unshift"],function(i){var a=Us[i],d=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",h=/^(?:pop|shift)$/.test(i);_.prototype[i]=function(){var g=arguments;if(h&&!this.__chain__){var v=this.value();return a.apply(Ee(v)?v:[],g)}return this[d](function(E){return a.apply(Ee(E)?E:[],g)})}}),In(Re.prototype,function(i,a){var d=_[a];if(d){var h=d.name+"";He.call(Io,h)||(Io[h]=[]),Io[h].push({name:a,func:d})}}),Io[ua(n,C).name]=[{name:"wrapper",func:n}],Re.prototype.clone=JV,Re.prototype.reverse=XV,Re.prototype.value=QV,_.prototype.at=BP,_.prototype.chain=VP,_.prototype.commit=NP,_.prototype.next=AP,_.prototype.plant=DP,_.prototype.reverse=FP,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=RP,_.prototype.first=_.prototype.head,$i&&(_.prototype[$i]=PP),_},Fo=NV();Xr?((Xr.exports=Fo)._=Fo,Ql._=Fo):gt._=Fo}).call(Uo)}(As,As.exports);var Ge=As.exports;const mT={class:"grid-overlay-container"},up=r.defineComponent({__name:"PlAgOverlayLoading",props:{params:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",mT,[e.params.notReady?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[n[0]||(n[0]=r.createElementVNode("div",{class:"grid-icon-cat-in-bag"},null,-1)),n[1]||(n[1]=r.createElementVNode("span",{class:"text-subtitle-m"},"Not calculated",-1))],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[n[2]||(n[2]=r.createElementVNode("div",{class:"mask-24 mask-loading grid-mask-loading"},null,-1)),n[3]||(n[3]=r.createElementVNode("span",{class:"text-subtitle-m"},"Loading",-1))],64))]))}}),gT={},yT={class:"grid-overlay-container"};function _T(t,e){return r.openBlock(),r.createElementBlock("div",yT,e[0]||(e[0]=[r.createElementVNode("div",{class:"grid-icon-sad-cat"},null,-1),r.createElementVNode("span",{class:"text-subtitle-m"},"Empty",-1)]))}const pp=Ns(gT,[["render",_T]]);async function vT(t,e){throw Error("not implemented")}function CT(t){return t.axesSpec.filter(e=>{var n;return((n=e.annotations)==null?void 0:n["pl7.app/axisNature"])==="heterogeneous"})}function wT(t,e){const n=[];for(const o of e)if(t[o].type==="column"){const s=CT(t[o].spec);for(const l of s){if(l.type!=="String"){console.warn("heterogeneous axis with string type expected, got",l,"skipping");continue}const c=Ua(l),u=t.findIndex(p=>Ge.isEqual(p.id,c));if(u===-1)throw console.error("axis not found",o,c,t),Error("axis not found");n.push({columnIdx:o,axisIdx:u})}}return n}const hp=(t,e)=>(t+e).toString();function bT(t,e,n,o,s,l){if(t.length>1)throw Error("hColumns.length > 1 is not supported");const c=t[0];let u=-1,p=-1;for(let y=0;y<l.length;++y)l[y]===c.axisIdx&&(u=y),l[y]===c.columnIdx&&(p=y);const f=(()=>{const B=o[u].data.filter(T=>T!==null);return Array.from(new Set(B))})();f.sort(),p>u?(n.splice(p,1),n.splice(u,1)):(n.splice(u,1),n.splice(p,1));const m=xT(s,o,u,p,f,e.rows);for(let y=0;y<f.length;++y){const B=f[y],T=Lr(B+"@"+y);n.push({colId:T,field:hp(o.length,y),headerName:B,valueFormatter:mp})}return{rowModelType:"clientSide",columnDefs:n,rowData:m}}function xT(t,e,n,o,s,l){const c=new Map;let u=0;for(let f=0;f<l;f++){const m={};for(let M=0;M<e.length;++M){if(M===n||M===o)continue;const G=t[M].toString();m[G]=e[M].data[f]}let y;const B=Lr(Object.values(m))??"";c.has(B)?y=c.get(B):(c.set(B,m),y=m,y.id=u.toString(),u++);const T=s.indexOf(e[n].data[f]);if(T===-1)throw Error("index not found");const N=hp(e.length,T);y[N]=e[o].data[f]}return Array.from(c.values())}function kT(t){return Lr(t)}function fp(t){return JSON.parse(t)}const mp=t=>t?t.value===void 0?"NULL":t.value===null?"NA":t.value.toString():"ERROR";function ST(t,e,n){var s,l,c;const o=kT(e);return{colId:o,field:t.toString(),headerName:((l=(s=e.spec.annotations)==null?void 0:s["pl7.app/label"])==null?void 0:l.trim())??"Unlabeled "+e.type+" "+t.toString(),lockPosition:e.type==="axis",hide:(n==null?void 0:n.includes(o))??((c=e.spec.annotations)==null?void 0:c["pl7.app/table/visibility"])==="optional",valueFormatter:mp,cellDataType:(u=>{switch(u){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${u}`)}})(e.type==="axis"?e.spec.type:e.spec.valueType)}}function gp(t,e){switch(e){case"Int":return t;case"Long":return typeof t=="bigint"?Number(t):t;case"Float":return t;case"Double":return t;case"String":return t;case"Bytes":return Buffer.from(t).toString("hex");default:throw Error(`unsupported data type: ${e}`)}}function yp(t){const e=[];return ps(t,n=>(e.push(n),n)),e}async function ET(t,e,n){return n.length?(await t.findColumns(e,{columnFilter:{name:["pl7.app/label"]},compatibleWith:Ge.uniqWith(n.map(s=>Pd(s.spec.axesSpec).map(Ge.cloneDeep)).flat(),Ge.isEqual),strictlyCompatible:!0})).hits.filter(s=>s.spec.axesSpec.length===1):[]}async function TT(t,e,n){const o=yp(n),l=(await ET(t,e,o)).filter(c=>!Ge.find(o,u=>c.columnId===u.columnId));return l.length===0?n:{type:"outer",primary:n,secondary:l.map(c=>({type:"column",column:c}))}}async function BT(t,e,n,o){const s=n.filter(m=>m.type!=="Bytes"),l=yp(o),c=s.map(m=>[]),u=s.map(m=>null);for(let m=0;m<l.length;++m){const y=Pd(l[m].spec.axesSpec);for(let B=0;B<y.length;++B){const T=Ge.findIndex(s,N=>Ge.isEqual(N,y[B]));T===-1||u[T]||(y.length===1&&l[m].spec.name==="pl7.app/label"?(c[T]=[[m,B]],u[T]=l[m].columnId):c[T].push([m,B]))}}for(let m=s.length-1;m>=0;--m)c[m].length||(u.splice(m,1),c.splice(m,1),s.splice(m,1));const p=100,f=s.map(m=>new Set);e:for(let m=s.length-1;m>=0;--m){for(const[y,B]of c[m]){const T=await t.getUniqueValues(e,{columnId:l[y].columnId,...!u[m]&&{axis:Ge.cloneDeep(s[m])},filters:[],limit:p});if(T.overflow){u.splice(m,1),c.splice(m,1),s.splice(m,1);continue e}const N=T.values.type;for(const M of T.values.data)if(!(Ad(M,N)||M===null)&&(f[m].add(gp(M,N)),f[m].size===p)){u.splice(m,1),c.splice(m,1),s.splice(m,1);continue e}}if(!f[m].size){u.splice(m,1),c.splice(m,1),s.splice(m,1);continue e}}return s.map((m,y)=>{const B=[...f[y]].map(N=>({value:N,label:N.toString()})),T=B[0].value;return{axis:Ge.cloneDeep(m),...u[y]&&{column:u[y]},options:B,defaultValue:T}})}function VT(t,e,n,o){const s=t.length,l=[];for(let c=0;c<e[0].data.length;++c){const u=[],p=(o++).toString();for(const m of n)u.push(e[m].data[c]);const f={key:u,id:p};for(let m=0;m<s;++m){const y=t[m].toString(),B=e[m].data[c],T=e[m].type;Pg(e[m].absent,c)?f[y]=void 0:Ad(B,T)||B===null?f[y]=null:f[y]=gp(B,T)}l.push(f)}return l}const NT=t=>t.type==="column"&&t.spec.axesSpec.length===1&&t.spec.name==="pl7.app/label";async function AT(t,e,n,o){const s=await t.getSpec(e);let l=s.findIndex(C=>C.type==="column");l===-1&&(l=s.length);const c=[...s.keys()].filter(C=>!Ge.find(n,F=>Ge.isEqual(F.axis,s[C].id)||Ge.isEqual(F.column,s[C].id))).sort((C,F)=>{var I,Y;if(s[C].type!==s[F].type)return s[C].type==="axis"?-1:1;const O=(I=s[C].spec.annotations)==null?void 0:I["pl7.app/table/orderPriority"],Z=(Y=s[F].spec.annotations)==null?void 0:Y["pl7.app/table/orderPriority"];return O===void 0?Z===void 0?0:1:Z===void 0?-1:Number(Z)-Number(O)}),u=Ge.cloneDeep(c),p=wT(s,c);for(let C=c.length-1;C>=0;--C){const F=c[C];if(!NT(s[F]))continue;const O=Ua(s[F].spec.axesSpec[0]),Z=Ge.findIndex(c,I=>Ge.isEqual(s[I].id,O));if(Z===-1&&Ge.findIndex(n,Y=>Ge.isEqual(Y.axis,O))===-1){console.warn(`added label column, but the axis is not in the data; axisId: ${O}`);continue}c[Z]=F;for(const I of p)I.axisIdx===F&&(I.axisIdx=Z);c.splice(C,1),u.splice(C,1)}const f=await t.getShape(e),m=f.rows,y=u.map(C=>ST(C,s[C],o));if(p.length>1&&console.warn("Currently, only one heterogeneous axis is supported in the table, got",p.length," transposition will not be applied."),p.length===1)return bT(p,f,y,await t.getData(e,c),u,c);const B=[...c],T=new Map;for(let C=0;C<l;++C)T.set(C,-1);for(let C=0;C<B.length;++C){const F=B[C];T.has(F)&&T.set(F,C)}for(const[C,F]of T)F===-1&&(T.set(C,B.length),B.push(C));const N=[];for(let C=0;C<l;++C){const F=T.get(C);if(F===void 0||F===-1)throw new Error("assertion exception");N.push(F)}let M;return{rowModelType:"serverSide",columnDefs:y,serverSideDatasource:{getRows:async C=>{try{if(m==0){C.success({rowData:[],rowCount:m}),C.api.setGridOption("loading",!1),C.api.showNoRowsOverlay();return}if(M&&!Ge.isEqual(M.request.sortModel,C.request.sortModel)){M=void 0,C.api.setGridOption("loading",!0),C.success({rowData:[],rowCount:0});return}M=C;let F=0,O=[];if(m>0&&C.request.startRow!==void 0&&C.request.endRow!==void 0&&(F=Math.min(m,C.request.endRow)-C.request.startRow,F>0)){const Z=await t.getData(e,B,{offset:C.request.startRow,length:F});O=VT(u,Z,N,C.request.startRow)}C.success({rowData:O,rowCount:m}),C.api.autoSizeAllColumns(),C.api.setGridOption("loading",!1)}catch(F){C.api.setGridOption("loading",!0),C.fail(),console.trace(F)}}}}}const _p=_m(),PT=["onClick"],vp=r.defineComponent({__name:"PlAgGridColumnManager",props:{api:{}},setup(t){const e=t,{api:n}=r.toRefs(e),o=r.ref([]),s=r.ref(),l=r.ref(!1),c=r.ref(0);dp(s,{handle:".handle",onChange(p){n.value.moveColumns(p.map(f=>o.value[f]),0)}});function u(p){n.value.setColumnsVisible([p],!p.isVisible())}return r.onMounted(()=>{n.value.addEventListener("displayedColumnsChanged",()=>{o.value=[...n.value.getAllGridColumns()??[]],c.value++}),o.value=n.value.getAllGridColumns()??[]}),(p,f)=>(r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(),r.createBlock(r.Teleport,{to:`#${r.unref(_p)}`},[r.createVNode(r.unref(ys),{onClick:f[0]||(f[0]=r.withModifiers(m=>l.value=!l.value,["stop"]))},{append:r.withCtx(()=>[r.createVNode(r.unref(ln),{name:"columns"})]),default:r.withCtx(()=>[f[2]||(f[2]=r.createTextVNode(" Columns "))]),_:1})],8,["to"])),r.createVNode(r.unref(Ou),{modelValue:l.value,"onUpdate:modelValue":f[1]||(f[1]=m=>l.value=m),shadow:!0,width:"368px","close-on-outside-click":""},{title:r.withCtx(()=>f[3]||(f[3]=[r.createTextVNode("Columns")])),default:r.withCtx(()=>[(r.openBlock(),r.createElementBlock("div",{ref_key:"listRef",ref:s,key:c.value,class:"pl-ag-columns"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,m=>(r.openBlock(),r.createElementBlock("div",{key:m.getId(),class:"pl-ag-columns__item"},[r.createElementVNode("div",{class:r.normalizeClass([{handle:!m.getColDef().lockPosition},"pl-ag-columns__drag"])},[r.createVNode(r.unref($n),{name:"drag-dots"})],2),r.createElementVNode("div",{class:r.normalizeClass([{visible:m.isVisible()},"pl-ag-columns__title"])},r.toDisplayString(m.getColDef().headerName),3),r.createElementVNode("div",{class:"pl-ag-columns__visibility",onClick:y=>u(m)},[r.createVNode(r.unref(vt),{"close-delay":500,position:"top"},{tooltip:r.withCtx(()=>f[4]||(f[4]=[r.createTextVNode("Show/Hide")])),default:r.withCtx(()=>[r.createVNode(r.unref(ln),{name:m.isVisible()?"view-show":"view-hide"},null,8,["name"])]),_:2},1024)],8,PT)]))),128))]))]),_:1},8,["modelValue"])]))}}),DT=["id"],FT=r.defineComponent({__name:"PlAgDataTableToolsPanel",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{id:r.unref(_p),class:"d-flex gap-6"},[r.renderSlot(e.$slots,"default")],8,DT))}}),RT={class:"ap-ag-data-table-container"},MT={key:1,class:"ap-ag-data-table-sheets"},IT=Ns(r.defineComponent({__name:"PlAgDataTable",props:r.mergeModels({settings:{},showColumnsPanel:{type:Boolean}},{modelValue:{default:{gridState:{}}},modelModifiers:{}}),emits:r.mergeModels(["onRowDoubleClicked","columnsChanged"],["update:modelValue"]),setup(t,{expose:e,emit:n}){x.ModuleRegistry.registerModules([rs.ClientSideRowModelModule,dd.ClipboardModule,cd.ServerSideRowModelModule,ud.RangeSelectionModule,qa,eu]);const o=r.useModel(t,"modelValue"),s=t,{settings:l}=r.toRefs(s),c=n;r.watch(()=>l.value,async(S,w)=>{if(S.sourceType!=="pframe"||!S.pFrame||!S.join||w&&w.sourceType==="pframe"&&Ge.isEqual(S.pFrame,w.pFrame)&&Ge.isEqual(S.join,w.join))return;const k=window.platforma;if(!k)throw Error("platforma not set");const $=k.pFrameDriver;if(!$)throw Error("platforma.pFrameDriver not set");const te=await TT($,S.pFrame,S.join),ne=o.value;ne.pTableParams||(ne.pTableParams={sorting:[],filters:[]}),ne.pTableParams.join=te,o.value=ne});const u=Cp(()=>l.value.sourceType,async S=>{var k;const w=l.value.sourceType;switch(w){case"pframe":{const $=window.platforma;if(!$)throw Error("platforma not set");const te=$.pFrameDriver;if(!te)throw Error("platforma.pFrameDriver not set");if(!l.value.pFrame)return[];const ne=l.value.pFrame,be=(k=o.value.pTableParams)==null?void 0:k.join;return be?await BT(te,ne,l.value.sheetAxes,be):[]}case"ptable":return l.value.sheets??[];case"xsv":return[];default:throw Error(`unsupported source type: ${w}`)}});function p(S){if(!(l.value.sourceType!=="ptable"&&l.value.sourceType!=="pframe"))return(S==null?void 0:S.sortModel.map(w=>{const{spec:k,...$}=fp(w.colId);return{column:$,ascending:w.sort==="asc",naAndAbsentAreLeastValues:!0}}))??[]}const f=r.computed({get:()=>{const S=o.value;return{columnOrder:S.gridState.columnOrder,sort:S.gridState.sort,columnVisibility:S.gridState.columnVisibility}},set:S=>{const w=o.value,k=N.value.rowModelType==="clientSide"?void 0:p(S.sort);w.gridState={...w.gridState,...S},(l.value.sourceType==="ptable"||l.value.sourceType==="pframe")&&(w.pTableParams||(w.pTableParams={sorting:[],filters:[]}),w.pTableParams.sorting=k),o.value=w}}),m=S=>Lr(S);function y(S){var w;if(!(l.value.sourceType!=="ptable"&&l.value.sourceType!=="pframe"))return((w=u.value)==null?void 0:w.map(k=>({type:"bySingleColumn",column:k.column?{type:"column",id:k.column}:{type:"axis",id:k.axis},predicate:{operator:"Equal",reference:S[m(k.axis)]}})))??[]}const B=r.computed({get:()=>o.value.gridState.sheets??{},set:S=>{const w=y(S),k=o.value;k.gridState.sheets=S,(l.value.sourceType==="ptable"||l.value.sourceType==="pframe")&&(k.pTableParams||(k.pTableParams={sorting:[],filters:[]}),k.pTableParams.filters=w),o.value=k}});r.watch(()=>[l.value,u.value],(S,w)=>{const[k,$]=S;if(!$)return;if(w){const[ne,be]=w;if((k.sourceType==="ptable"||k.sourceType==="pframe")&&k.sourceType===(ne==null?void 0:ne.sourceType)&&Ge.isEqual($,be))return}if(k.sourceType!=="ptable"&&k.sourceType!=="pframe"){B.value={};return}const te=B.value;for(const ne of $){const be=m(ne.axis);te[be]||(te[be]=ne.defaultValue??ne.options[0].value)}B.value=te},{immediate:!0});const T=r.shallowRef(),N=r.shallowRef({animateRows:!1,suppressColumnMoveAnimation:!0,cellSelection:!0,initialState:f.value,autoSizeStrategy:{type:"fitCellContents"},onRowDataUpdated:S=>{S.api.autoSizeAllColumns()},onRowDoubleClicked:S=>{S.data&&c("onRowDoubleClicked",S.data.key)},defaultColDef:{suppressHeaderMenuButton:!0},maintainColumnOrder:!0,localeText:{loadingError:"..."},rowModelType:"clientSide",maxBlocksInCache:1e3,cacheBlockSize:100,blockLoadDebounceMillis:500,serverSideSortAllLevels:!0,suppressServerSideFullWidthLoadingRow:!0,getRowId:S=>S.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0},loadingOverlayComponent:up,noRowsOverlayComponent:pp,sideBar:{},defaultCsvExportParams:{allColumns:!0,suppressQuotes:!0,fileName:"table.csv"}}),M=S=>{const w=S.api;T.value=new Proxy(w,{get(k,$,te){switch($){case"setGridOption":return(ne,be)=>{const $e=N.value;$e[ne]=be,N.value=$e,w.setGridOption(ne,be)};case"updateGridOptions":return ne=>{N.value={...N.value,...ne},w.updateGridOptions(ne)};default:return Reflect.get(k,$,te)}}})},G=S=>({columnOrder:S.columnOrder,sort:S.sort,columnVisibility:S.columnVisibility??(S.columnOrder?{hiddenColIds:[]}:void 0)}),C=S=>{N.value.initialState=f.value=G(S.state),S.api.autoSizeAllColumns()},F=()=>{N.value.initialState=f.value=G(T.value.getState()),T.value=void 0};let O=!1;const Z=()=>{if(!O)return;const S=T.value;S!==void 0&&(S.exportDataAsCsv(),O=!1,S.setGridOption("cacheBlockSize",100))},I=()=>{if(!O)return;const S=T.value;if(S===void 0)return;const w=S.getServerSideGroupLevelState()[0];w.cacheBlockSize===w.rowCount&&S.refreshServerSide({route:w.route,purge:!1})};e({exportCsv:async()=>{const S=T.value;if(S!==void 0){if(N.value.rowModelType==="clientSide"){S.exportDataAsCsv();return}if(N.value.rowModelType==="serverSide"){const w=S.getServerSideGroupLevelState()[0];if(w.rowCount<=w.cacheBlockSize){S.exportDataAsCsv();return}O||(O=!0,S.setGridOption("cacheBlockSize",w.rowCount))}}}});const W=r.ref(0);r.watch(()=>[T.value,f.value],(S,w)=>{if(Ge.isEqual(S,w))return;const[k,$]=S;if(!k)return;const te=G(k.getState());Ge.isEqual($,te)||(N.value.initialState=$,++W.value)}),r.watch(()=>N.value,(S,w)=>{var k;if(w&&(S.rowModelType!=w.rowModelType&&++W.value,!Ge.isEqual(S.columnDefs,w.columnDefs)&&S.columnDefs)){const $=be=>!("children"in be),te=(k=S.columnDefs)==null?void 0:k.filter($),ne=te==null?void 0:te.map(be=>be.colId).filter(be=>be!==void 0).map(be=>fp(be));c("columnsChanged",ne??[])}});const P=(S,w)=>{var $;const k=B.value;k[S]!==w&&(k[S]=w,B.value=k,($=T.value)==null||$.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}}))},j=window.platforma;if(!j)throw Error("platforma not set");const U=j.pFrameDriver;if(!U)throw Error("platforma.pFrameDriver not set");const X=j.blobDriver;if(!X)throw Error("platforma.blobDriver not set");let L;return r.watch(()=>[T.value,l.value,u.value],async S=>{var ne,be;const[w,k,$]=S;if(!w||Ge.isEqual(k,L))return;L=k;const te=k.sourceType;switch(te){case"pframe":case"ptable":{const $e=k.pTable;if(!$e||!$)return w.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const ot=(be=(ne=f.value)==null?void 0:ne.columnVisibility)==null?void 0:be.hiddenColIds,Cn=await AT(U,$e,$,ot);return w.updateGridOptions({loading:Cn.rowModelType!=="clientSide",loadingOverlayComponentParams:{notReady:!1},...Cn})}case"xsv":{const $e=k.xsvFile;if(!($e!=null&&$e.ok)||!$e.value)return w.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const ot=await vT(X,$e.value);return w.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...ot})}default:throw Error(`unsupported source type: ${te}`)}}),(S,w)=>(r.openBlock(),r.createElementBlock("div",RT,[T.value&&S.showColumnsPanel?(r.openBlock(),r.createBlock(r.unref(vp),{key:0,api:T.value},null,8,["api"])):r.createCommentVNode("",!0),r.unref(u).value&&r.unref(u).value.length>0?(r.openBlock(),r.createElementBlock("div",MT,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(u).value,(k,$)=>(r.openBlock(),r.createBlock(r.unref(Iu),{key:$,"model-value":B.value[m(k.axis)],options:k.options,"onUpdate:modelValue":te=>P(m(k.axis),te)},null,8,["model-value","options","onUpdate:modelValue"]))),128))])):r.createCommentVNode("",!0),(r.openBlock(),r.createBlock(r.unref(fm.AgGridVue),{key:W.value,theme:r.unref(nu),class:"ap-ag-data-table-grid","grid-options":N.value,onGridReady:M,onStateUpdated:C,onGridPreDestroyed:F,onStoreRefreshed:Z,onModelUpdated:I},null,8,["theme","grid-options"]))]))}}),[["__scopeId","data-v-330ddc9a"]]),LT={key:0,class:"d-flex gap-10 flex-column"},OT={key:0},GT=Ns(r.defineComponent({__name:"PlTableFilters",props:r.mergeModels({columns:{},restrictions:{},defaults:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,{columns:o,restrictions:s,defaults:l}=r.toRefs(n),c=L=>Lr(L.id),u=r.computed(()=>o.value.filter(L=>{const S=L.type;switch(S){case"axis":return L.spec.type!=="Bytes";case"column":return L.spec.valueType!=="Bytes";default:throw Error(`unsupported data type: ${S}`)}}).map(L=>({column:L,id:c(L)}))),p=r.computed(()=>{const L=s.value??[],S={};for(const{column:w,id:k}of u.value){const $=Ge.find(L,te=>Ge.isEqual(te.column.id,w.id));$!==void 0&&(S[k]=$.allowedFilterTypes)}return S}),f=r.computed(()=>{const L=l.value??[],S={};for(const{column:w,id:k}of u.value){const $=Ge.find(L,te=>Ge.isEqual(te.column.id,w.id));$!==void 0&&(S[k]=$.default)}return S}),m=L=>L!==void 0?L:f.value,y=r.reactive({state:m(e.value.state)});r.watch(()=>e.value,L=>{Ge.isEqual(y.state,L.state)||(y.state=m(L.state))}),r.watch(()=>u.value,L=>{if(y.state!==void 0&&L.length===0)return;const S=y.state??{},w={};for(const{id:k}of L)S[k]!==void 0&&(w[k]=S[k]);y.state=w},{immediate:!0});const B=L=>{switch(L){case"isNotNA":return"Is not NA";case"isNA":return"Is NA";case"number_equals":case"string_equals":return"Equals";case"number_notEquals":case"string_notEquals":return"Not equals";case"number_greaterThan":return"Greater than";case"number_greaterThanOrEqualTo":return"Greater than or equal to";case"number_lessThan":return"Less than";case"number_lessThanOrEqualTo":return"Less than or equal to";case"number_between":return"Between";case"string_contains":return"Contains";case"string_doesNotContain":return"Does not contain";case"string_matches":return"Matches";case"string_doesNotMatch":return"Does not match";case"string_containsFuzzyMatch":return"Contains fuzzy match";default:throw Error(`unsupported filter type: ${L}`)}},T=["isNotNA","isNA","number_equals","number_notEquals","number_greaterThan","number_greaterThanOrEqualTo","number_lessThan","number_lessThanOrEqualTo","number_between"],N=["isNotNA","isNA","string_equals","string_notEquals","string_contains","string_doesNotContain","string_matches","string_doesNotMatch","string_containsFuzzyMatch"],M=r.computed(()=>{const L=p.value,S={};for(const{column:w,id:k}of u.value){let te=(w.type==="column"?w.spec.valueType:w.spec.type)==="String"?N:T;const ne=L[k];ne!==void 0&&(te=te.filter(be=>ne.includes(be))),S[k]=te.map(be=>({value:be,text:B(be)}))}return S}),G=r.computed(()=>Ge.some(Object.values(M.value),L=>L.length>0)),C=L=>{const S=L.type;switch(S){case"isNotNA":case"isNA":return;case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return L.reference;case"number_between":return L.lowerBound;case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":case"string_containsFuzzyMatch":return L.reference;default:throw Error(`unsupported filter type: ${S}`)}},F=(L,S)=>{switch(L){case"isNotNA":case"isNA":return{type:L};case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return{type:L,reference:typeof S=="number"?S:0};case"number_between":return{type:L,lowerBound:typeof S=="number"?S:0,includeLowerBound:!0,upperBound:100,includeUpperBound:!1};case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":return{type:L,reference:typeof S=="string"?S:""};case"string_containsFuzzyMatch":return{type:L,reference:typeof S=="string"?S:"",maxEdits:2,substitutionsOnly:!1,wildcard:void 0};default:throw Error(`unsupported filter type: ${L}`)}},O=(L,S)=>{const w=y.state[L];y.state[L]=F(S,C(w))},Z=L=>{y.state[L]=f.value[L]??F(M.value[L][0].value)},I=(L,S)=>{S?Z(L):delete y.state[L]},Y=(L,S)=>{var ne,be;const w=Number(S);if(!Number.isFinite(w))throw Error("Model value is not a number.");const k=L.type==="column"?L.spec.valueType:L.spec.type;if((k==="Int"||k==="Long")&&!Number.isInteger(w))throw Error("Model value is not an integer.");const $=(ne=L.spec.annotations)==null?void 0:ne["pl7.app/min"];if($!==void 0){const $e=Number($);if(Number.isFinite($e)&&w<Number($))throw Error("Model value is too low.")}const te=(be=L.spec.annotations)==null?void 0:be["pl7.app/max"];if(te!==void 0){const $e=Number(te);if(Number.isFinite($e)&&w>Number(te))throw Error("Model value is too high.")}return w},W=(L,S)=>{var k,$;const w=((k=L.spec.domain)==null?void 0:k["pl7.app/alphabet"])??(($=L.spec.annotations)==null?void 0:$["pl7.app/alphabet"]);if(w==="nucleotide"&&!/^[AaTtGgCcNn]+$/.test(S))throw Error("Model value is not a nucleotide.");if(w==="aminoacid"&&!/^[AaCcDdEeFfGgHhIiKkLlMmNnPpQqRrSsTtVvWwYyXx]+$/.test(S))throw Error("Model value is not an aminoacid.");return S},P=L=>{try{return new RegExp(L),L}catch(S){throw S instanceof SyntaxError?Error("Model value is not a regexp."):S}},j=(L,S)=>{var $,te;const w=(($=L.spec.domain)==null?void 0:$["pl7.app/alphabet"])??((te=L.spec.annotations)==null?void 0:te["pl7.app/alphabet"]);if(w==="nucleotide")return[{value:"N",text:"N"}];if(w==="aminoacid")return[{value:"X",text:"X"}];const k=Ge.uniq(S);return k.sort(),k.map(ne=>({value:ne,text:ne}))},U=L=>{const S=L.type;switch(S){case"isNotNA":return{operator:"Not",operand:{operator:"IsNA"}};case"isNA":return{operator:"IsNA"};case"number_equals":case"string_equals":return{operator:"Equal",reference:L.reference};case"number_notEquals":case"string_notEquals":return{operator:"Not",operand:{operator:"Equal",reference:L.reference}};case"number_greaterThan":return{operator:"Greater",reference:L.reference};case"number_greaterThanOrEqualTo":return{operator:"GreaterOrEqual",reference:L.reference};case"number_lessThan":return{operator:"Less",reference:L.reference};case"number_lessThanOrEqualTo":return{operator:"LessOrEqual",reference:L.reference};case"number_between":return{operator:"And",operands:[{operator:L.includeLowerBound?"GreaterOrEqual":"Greater",reference:L.lowerBound},{operator:L.includeUpperBound?"LessOrEqual":"Less",reference:L.upperBound}]};case"string_contains":return{operator:"StringContains",substring:L.reference};case"string_doesNotContain":return{operator:"Not",operand:{operator:"StringContains",substring:L.reference}};case"string_matches":return{operator:"Matches",regex:L.reference};case"string_doesNotMatch":return{operator:"Not",operand:{operator:"Matches",regex:L.reference}};case"string_containsFuzzyMatch":return{operator:"StringContainsFuzzy",reference:L.reference,maxEdits:L.maxEdits,substitutionsOnly:L.substitutionsOnly,wildcard:L.wildcard};default:throw Error(`unsupported filter type: ${S}`)}},X=L=>u.value.map(({column:S,id:w})=>{if(!(w in L))return;const k=U(L[w]),{spec:$,...te}=S;return{type:"bySingleColumn",column:te,predicate:k}}).filter(S=>S!==void 0);return r.watch(()=>y,L=>{Ge.isEqual(L.state,e.value.state)||(e.value={state:Ge.cloneDeep(L.state),filters:X(L.state)})},{immediate:!0,deep:!0}),(L,S)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.value,({column:w,id:k},$)=>{var te,ne,be,$e,ot,Cn,Mn,xr,Hn,Yr,Rs,kr,Sr,Ms;return r.openBlock(),r.createElementBlock("div",{key:k},[M.value[k].length>0?(r.openBlock(),r.createElementBlock("form",LT,[r.createVNode(r.unref(Lu),{"model-value":!!y.state[k],"onUpdate:modelValue":Se=>I(k,Se)},{default:r.withCtx(()=>{var Se,Jr;return[r.createTextVNode(r.toDisplayString(((Jr=(Se=w.spec.annotations)==null?void 0:Se["pl7.app/label"])==null?void 0:Jr.trim())??"Unlabeled "+w.type+" "+$.toString()),1)]}),_:2},1032,["model-value","onUpdate:modelValue"]),r.createElementVNode("div",{class:r.normalizeClass(["controls d-flex gap-10 flex-column",{open:!!y.state[k]}])},[y.state[k]?(r.openBlock(),r.createBlock(r.unref(mi),{key:0,"model-value":y.state[k].type,options:M.value[k],label:"Predicate","onUpdate:modelValue":Se=>O(k,Se)},null,8,["model-value","options","onUpdate:modelValue"])):r.createCommentVNode("",!0),((te=y.state[k])==null?void 0:te.type)==="number_equals"||((ne=y.state[k])==null?void 0:ne.type)==="number_notEquals"||((be=y.state[k])==null?void 0:be.type)==="number_lessThan"||(($e=y.state[k])==null?void 0:$e.type)==="number_lessThanOrEqualTo"||((ot=y.state[k])==null?void 0:ot.type)==="number_greaterThan"||((Cn=y.state[k])==null?void 0:Cn.type)==="number_greaterThanOrEqualTo"?(r.openBlock(),r.createBlock(r.unref(hr),{key:1,modelValue:y.state[k].reference,"onUpdate:modelValue":Se=>y.state[k].reference=Se,parse:Se=>Y(w,Se),label:"Reference value"},null,8,["modelValue","onUpdate:modelValue","parse"])):r.createCommentVNode("",!0),((Mn=y.state[k])==null?void 0:Mn.type)==="number_between"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[r.createVNode(r.unref(hr),{modelValue:y.state[k].lowerBound,"onUpdate:modelValue":Se=>y.state[k].lowerBound=Se,parse:Se=>Y(w,Se),label:"Lower bound"},null,8,["modelValue","onUpdate:modelValue","parse"]),r.createVNode(r.unref(Cs),{modelValue:y.state[k].includeLowerBound,"onUpdate:modelValue":Se=>y.state[k].includeLowerBound=Se,label:"Include lower bound"},null,8,["modelValue","onUpdate:modelValue"]),r.createVNode(r.unref(hr),{modelValue:y.state[k].upperBound,"onUpdate:modelValue":Se=>y.state[k].upperBound=Se,parse:Se=>Y(w,Se),label:"Upper bound"},null,8,["modelValue","onUpdate:modelValue","parse"]),r.createVNode(r.unref(Cs),{modelValue:y.state[k].includeUpperBound,"onUpdate:modelValue":Se=>y.state[k].includeUpperBound=Se,label:"Include upper bound"},null,8,["modelValue","onUpdate:modelValue"])],64)):r.createCommentVNode("",!0),((xr=y.state[k])==null?void 0:xr.type)==="string_equals"||((Hn=y.state[k])==null?void 0:Hn.type)==="string_notEquals"||((Yr=y.state[k])==null?void 0:Yr.type)==="string_contains"||((Rs=y.state[k])==null?void 0:Rs.type)==="string_doesNotContain"?(r.openBlock(),r.createBlock(r.unref(hr),{key:3,modelValue:y.state[k].reference,"onUpdate:modelValue":Se=>y.state[k].reference=Se,parse:Se=>W(w,Se),label:"Reference value"},null,8,["modelValue","onUpdate:modelValue","parse"])):r.createCommentVNode("",!0),((kr=y.state[k])==null?void 0:kr.type)==="string_matches"||((Sr=y.state[k])==null?void 0:Sr.type)==="string_doesNotMatch"?(r.openBlock(),r.createBlock(r.unref(hr),{key:4,modelValue:y.state[k].reference,"onUpdate:modelValue":Se=>y.state[k].reference=Se,parse:P,label:"Reference value"},null,8,["modelValue","onUpdate:modelValue"])):r.createCommentVNode("",!0),((Ms=y.state[k])==null?void 0:Ms.type)==="string_containsFuzzyMatch"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:5},[r.createVNode(r.unref(hr),{modelValue:y.state[k].reference,"onUpdate:modelValue":Se=>y.state[k].reference=Se,parse:Se=>W(w,Se),label:"Reference value"},null,8,["modelValue","onUpdate:modelValue","parse"]),r.createVNode(r.unref(ap),{modelValue:y.state[k].maxEdits,"onUpdate:modelValue":Se=>y.state[k].maxEdits=Se,max:5,breakpoints:"",label:"Maximum nuber of substitutions and indels"},null,8,["modelValue","onUpdate:modelValue"]),r.createVNode(r.unref(Cs),{modelValue:y.state[k].substitutionsOnly,"onUpdate:modelValue":Se=>y.state[k].substitutionsOnly=Se,label:"Substitutions only"},null,8,["modelValue","onUpdate:modelValue"]),r.createVNode(r.unref(mi),{modelValue:y.state[k].wildcard,"onUpdate:modelValue":Se=>y.state[k].wildcard=Se,options:j(w,y.state[k].reference),clearable:"",label:"Wildcard symbol"},null,8,["modelValue","onUpdate:modelValue","options"])],64)):r.createCommentVNode("",!0)],2)])):r.createCommentVNode("",!0)])}),128)),G.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",OT,"No filters applicable"))],64))}}),[["__scopeId","data-v-6cb52299"]]),zT={key:1,class:"alert-error"},$T={key:2},ZT=r.defineComponent({__name:"ValueOrErrorsComponent",props:{valueOrError:{}},setup(t){const e=t,n=r.computed(()=>e.valueOrError&&e.valueOrError.ok?e.valueOrError.value:void 0),o=r.computed(()=>e.valueOrError&&!e.valueOrError.ok?e.valueOrError.errors:void 0),s=r.computed(()=>n.value===void 0&&o.value===void 0);return(l,c)=>(r.openBlock(),r.createElementBlock("div",null,[n.value!==void 0?r.renderSlot(l.$slots,"default",r.normalizeProps(r.mergeProps({key:0},{value:n.value}))):r.createCommentVNode("",!0),o.value?(r.openBlock(),r.createElementBlock("div",zT,r.toDisplayString(o.value),1)):r.createCommentVNode("",!0),s.value?(r.openBlock(),r.createElementBlock("div",$T,"Unresolved")):r.createCommentVNode("",!0)]))}}),UT={style:{height:"100%"}},WT=r.defineComponent({__name:"PlAgCellFile",props:{params:{}},setup(t){const e=t,n=r.computed(()=>e.params.extensions),o=r.computed(()=>e.params.value);function s(c){e.params.setValue(c)}const l=r.computed(()=>e.params.resolveProgress?e.params.resolveProgress(o.value):void 0);return(c,u)=>(r.openBlock(),r.createElementBlock("div",UT,[r.createVNode(r.unref(ip),{"show-filename-only":"",clearable:"","cell-style":"","file-dialog-title":"Select any file",placeholder:`Choose file ${n.value?n.value[0]:""}`,extensions:n.value,"model-value":o.value,progress:l.value,"onUpdate:modelValue":s},null,8,["placeholder","extensions","model-value","progress"])]))}}),HT={class:"pl-ag-grid-open-cell d-flex"},jT={class:"pl-ag-grid-open-cell__value"},qT=r.defineComponent({__name:"PlAgTextAndButtonCell",props:{params:{}},setup(t){const e=t;function n(){if(e.params.invokeRowsOnDoubleClick){const o=e.params.api,s={rowPinned:e.params.node.rowPinned,api:o,rowIndex:e.params.node.rowIndex,context:o,type:"rowDoubleClicked",node:e.params.node,data:e.params.data,event:null};o.dispatchEvent(s)}else e.params.onClick&&e.params.onClick(e.params)}return(o,s)=>(r.openBlock(),r.createElementBlock("div",HT,[r.createElementVNode("div",jT,r.toDisplayString(o.params.value),1),r.createElementVNode("div",{class:"pl-ag-grid-open-cell__activator text-caps11 align-center",onClick:r.withModifiers(n,["stop"])},[r.createVNode(r.unref($n),{name:o.params.icon??"maximize"},null,8,["name"]),r.createTextVNode(" "+r.toDisplayString(o.params.btnLabel??"Open"),1)])]))}}),Ps=new Map;function KT(t,e){const n=r.getCurrentScope()??r.effectScope(),o=n.run(()=>(r.onScopeDispose(()=>{Ps.delete(t)}),r.reactive(e())));return o[Symbol.dispose]=()=>{n.stop()},o}function YT(t){const e=Symbol();return()=>(Ps.has(e)||Ps.set(e,KT(e,t)),Ps.get(e))}function JT(t){return r.computed(()=>{try{return yd(t())}catch(e){return{errors:[String(e)],value:void 0}}})}function Cp(t,e,n){const o=r.ref(0),s=r.reactive({loading:r.computed(()=>o.value>0),loadingRef:o,value:void 0,error:void 0}),l=Cm(e);return r.watch(t,async c=>{s.error=void 0,o.value++,l(c).then(u=>{u.ok&&(s.value=u.value)}).catch(u=>{s.value=void 0,s.error=u}).finally(()=>{o.value--})},Object.assign({immediate:!0,deep:!0},n??{})),s}const ko=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,wp=new Set,Pl=typeof process=="object"&&process?process:{},bp=(t,e,n,o)=>{typeof Pl.emitWarning=="function"?Pl.emitWarning(t,e,n,o):console.error(`[${n}] ${e}: ${t}`)};let Ds=globalThis.AbortController,xp=globalThis.AbortSignal;if(typeof Ds>"u"){xp=class{constructor(){Ue(this,"onabort");Ue(this,"_onabort",[]);Ue(this,"reason");Ue(this,"aborted",!1)}addEventListener(o,s){this._onabort.push(s)}},Ds=class{constructor(){Ue(this,"signal",new xp);e()}abort(o){var s,l;if(!this.signal.aborted){this.signal.reason=o,this.signal.aborted=!0;for(const c of this.signal._onabort)c(o);(l=(s=this.signal).onabort)==null||l.call(s,o)}}};let t=((Sp=Pl.env)==null?void 0:Sp.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,bp("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const XT=t=>!wp.has(t),wr=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),kp=t=>wr(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Fs:null:null;class Fs extends Array{constructor(e){super(e),this.fill(0)}}const Hr=class Hr{constructor(e,n){Ue(this,"heap");Ue(this,"length");if(!b(Hr,So))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(e),this.length=0}static create(e){const n=kp(e);if(!n)return[];me(Hr,So,!0);const o=new Hr(e,n);return me(Hr,So,!1),o}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};So=new WeakMap,ze(Hr,So,!1);let Dl=Hr;const Ml=class Ml{constructor(e){ze(this,re);ze(this,pn);ze(this,Ot);ze(this,hn);ze(this,fn);ze(this,Eo);ze(this,To);Ue(this,"ttl");Ue(this,"ttlResolution");Ue(this,"ttlAutopurge");Ue(this,"updateAgeOnGet");Ue(this,"updateAgeOnHas");Ue(this,"allowStale");Ue(this,"noDisposeOnSet");Ue(this,"noUpdateTTL");Ue(this,"maxEntrySize");Ue(this,"sizeCalculation");Ue(this,"noDeleteOnFetchRejection");Ue(this,"noDeleteOnStaleGet");Ue(this,"allowStaleOnFetchAbort");Ue(this,"allowStaleOnFetchRejection");Ue(this,"ignoreFetchAbort");ze(this,ct);ze(this,mn);ze(this,at);ze(this,Ke);ze(this,xe);ze(this,Tt);ze(this,Gt);ze(this,bt);ze(this,ht);ze(this,gn);ze(this,ft);ze(this,yn);ze(this,_n);ze(this,zt);ze(this,vn);ze(this,br);ze(this,Bt);ze(this,jr,()=>{});ze(this,Wn,()=>{});ze(this,Fi,()=>{});ze(this,$t,()=>!1);ze(this,qr,e=>{});ze(this,Bo,(e,n,o)=>{});ze(this,Ri,(e,n,o,s)=>{if(o||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Ue(this,Ep,"LRUCache");const{max:n=0,ttl:o,ttlResolution:s=1,ttlAutopurge:l,updateAgeOnGet:c,updateAgeOnHas:u,allowStale:p,dispose:f,disposeAfter:m,noDisposeOnSet:y,noUpdateTTL:B,maxSize:T=0,maxEntrySize:N=0,sizeCalculation:M,fetchMethod:G,memoMethod:C,noDeleteOnFetchRejection:F,noDeleteOnStaleGet:O,allowStaleOnFetchRejection:Z,allowStaleOnFetchAbort:I,ignoreFetchAbort:Y}=e;if(n!==0&&!wr(n))throw new TypeError("max option must be a nonnegative integer");const W=n?kp(n):Array;if(!W)throw new Error("invalid max value: "+n);if(me(this,pn,n),me(this,Ot,T),this.maxEntrySize=N||b(this,Ot),this.sizeCalculation=M,this.sizeCalculation){if(!b(this,Ot)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(C!==void 0&&typeof C!="function")throw new TypeError("memoMethod must be a function if defined");if(me(this,To,C),G!==void 0&&typeof G!="function")throw new TypeError("fetchMethod must be a function if specified");if(me(this,Eo,G),me(this,br,!!G),me(this,at,new Map),me(this,Ke,new Array(n).fill(void 0)),me(this,xe,new Array(n).fill(void 0)),me(this,Tt,new W(n)),me(this,Gt,new W(n)),me(this,bt,0),me(this,ht,0),me(this,gn,Dl.create(n)),me(this,ct,0),me(this,mn,0),typeof f=="function"&&me(this,hn,f),typeof m=="function"?(me(this,fn,m),me(this,ft,[])):(me(this,fn,void 0),me(this,ft,void 0)),me(this,vn,!!b(this,hn)),me(this,Bt,!!b(this,fn)),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!B,this.noDeleteOnFetchRejection=!!F,this.allowStaleOnFetchRejection=!!Z,this.allowStaleOnFetchAbort=!!I,this.ignoreFetchAbort=!!Y,this.maxEntrySize!==0){if(b(this,Ot)!==0&&!wr(b(this,Ot)))throw new TypeError("maxSize must be a positive integer if specified");if(!wr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");de(this,re,lm).call(this)}if(this.allowStale=!!p,this.noDeleteOnStaleGet=!!O,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!u,this.ttlResolution=wr(s)||s===0?s:1,this.ttlAutopurge=!!l,this.ttl=o||0,this.ttl){if(!wr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");de(this,re,id).call(this)}if(b(this,pn)===0&&this.ttl===0&&b(this,Ot)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!b(this,pn)&&!b(this,Ot)){const P="LRU_CACHE_UNBOUNDED";XT(P)&&(wp.add(P),bp("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",P,Ml))}}static unsafeExposeInternals(e){return{starts:b(e,_n),ttls:b(e,zt),sizes:b(e,yn),keyMap:b(e,at),keyList:b(e,Ke),valList:b(e,xe),next:b(e,Tt),prev:b(e,Gt),get head(){return b(e,bt)},get tail(){return b(e,ht)},free:b(e,gn),isBackgroundFetch:n=>{var o;return de(o=e,re,Je).call(o,n)},backgroundFetch:(n,o,s,l)=>{var c;return de(c=e,re,Ba).call(c,n,o,s,l)},moveToTail:n=>{var o;return de(o=e,re,ns).call(o,n)},indexes:n=>{var o;return de(o=e,re,Rr).call(o,n)},rindexes:n=>{var o;return de(o=e,re,Mr).call(o,n)},isStale:n=>{var o;return b(o=e,$t).call(o,n)}}}get max(){return b(this,pn)}get maxSize(){return b(this,Ot)}get calculatedSize(){return b(this,mn)}get size(){return b(this,ct)}get fetchMethod(){return b(this,Eo)}get memoMethod(){return b(this,To)}get dispose(){return b(this,hn)}get disposeAfter(){return b(this,fn)}getRemainingTTL(e){return b(this,at).has(e)?1/0:0}*entries(){for(const e of de(this,re,Rr).call(this))b(this,xe)[e]!==void 0&&b(this,Ke)[e]!==void 0&&!de(this,re,Je).call(this,b(this,xe)[e])&&(yield[b(this,Ke)[e],b(this,xe)[e]])}*rentries(){for(const e of de(this,re,Mr).call(this))b(this,xe)[e]!==void 0&&b(this,Ke)[e]!==void 0&&!de(this,re,Je).call(this,b(this,xe)[e])&&(yield[b(this,Ke)[e],b(this,xe)[e]])}*keys(){for(const e of de(this,re,Rr).call(this)){const n=b(this,Ke)[e];n!==void 0&&!de(this,re,Je).call(this,b(this,xe)[e])&&(yield n)}}*rkeys(){for(const e of de(this,re,Mr).call(this)){const n=b(this,Ke)[e];n!==void 0&&!de(this,re,Je).call(this,b(this,xe)[e])&&(yield n)}}*values(){for(const e of de(this,re,Rr).call(this))b(this,xe)[e]!==void 0&&!de(this,re,Je).call(this,b(this,xe)[e])&&(yield b(this,xe)[e])}*rvalues(){for(const e of de(this,re,Mr).call(this))b(this,xe)[e]!==void 0&&!de(this,re,Je).call(this,b(this,xe)[e])&&(yield b(this,xe)[e])}[(Tp=Symbol.iterator,Ep=Symbol.toStringTag,Tp)](){return this.entries()}find(e,n={}){for(const o of de(this,re,Rr).call(this)){const s=b(this,xe)[o],l=de(this,re,Je).call(this,s)?s.__staleWhileFetching:s;if(l!==void 0&&e(l,b(this,Ke)[o],this))return this.get(b(this,Ke)[o],n)}}forEach(e,n=this){for(const o of de(this,re,Rr).call(this)){const s=b(this,xe)[o],l=de(this,re,Je).call(this,s)?s.__staleWhileFetching:s;l!==void 0&&e.call(n,l,b(this,Ke)[o],this)}}rforEach(e,n=this){for(const o of de(this,re,Mr).call(this)){const s=b(this,xe)[o],l=de(this,re,Je).call(this,s)?s.__staleWhileFetching:s;l!==void 0&&e.call(n,l,b(this,Ke)[o],this)}}purgeStale(){let e=!1;for(const n of de(this,re,Mr).call(this,{allowStale:!0}))b(this,$t).call(this,n)&&(de(this,re,Ir).call(this,b(this,Ke)[n],"expire"),e=!0);return e}info(e){const n=b(this,at).get(e);if(n===void 0)return;const o=b(this,xe)[n],s=de(this,re,Je).call(this,o)?o.__staleWhileFetching:o;if(s===void 0)return;const l={value:s};if(b(this,zt)&&b(this,_n)){const c=b(this,zt)[n],u=b(this,_n)[n];if(c&&u){const p=c-(ko.now()-u);l.ttl=p,l.start=Date.now()}}return b(this,yn)&&(l.size=b(this,yn)[n]),l}dump(){const e=[];for(const n of de(this,re,Rr).call(this,{allowStale:!0})){const o=b(this,Ke)[n],s=b(this,xe)[n],l=de(this,re,Je).call(this,s)?s.__staleWhileFetching:s;if(l===void 0||o===void 0)continue;const c={value:l};if(b(this,zt)&&b(this,_n)){c.ttl=b(this,zt)[n];const u=ko.now()-b(this,_n)[n];c.start=Math.floor(Date.now()-u)}b(this,yn)&&(c.size=b(this,yn)[n]),e.unshift([o,c])}return e}load(e){this.clear();for(const[n,o]of e){if(o.start){const s=Date.now()-o.start;o.start=ko.now()-s}this.set(n,o.value,o)}}set(e,n,o={}){var B,T,N,M,G;if(n===void 0)return this.delete(e),this;const{ttl:s=this.ttl,start:l,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:p}=o;let{noUpdateTTL:f=this.noUpdateTTL}=o;const m=b(this,Ri).call(this,e,n,o.size||0,u);if(this.maxEntrySize&&m>this.maxEntrySize)return p&&(p.set="miss",p.maxEntrySizeExceeded=!0),de(this,re,Ir).call(this,e,"set"),this;let y=b(this,ct)===0?void 0:b(this,at).get(e);if(y===void 0)y=b(this,ct)===0?b(this,ht):b(this,gn).length!==0?b(this,gn).pop():b(this,ct)===b(this,pn)?de(this,re,Ta).call(this,!1):b(this,ct),b(this,Ke)[y]=e,b(this,xe)[y]=n,b(this,at).set(e,y),b(this,Tt)[b(this,ht)]=y,b(this,Gt)[y]=b(this,ht),me(this,ht,y),Ea(this,ct)._++,b(this,Bo).call(this,y,m,p),p&&(p.set="add"),f=!1;else{de(this,re,ns).call(this,y);const C=b(this,xe)[y];if(n!==C){if(b(this,br)&&de(this,re,Je).call(this,C)){C.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:F}=C;F!==void 0&&!c&&(b(this,vn)&&((B=b(this,hn))==null||B.call(this,F,e,"set")),b(this,Bt)&&((T=b(this,ft))==null||T.push([F,e,"set"])))}else c||(b(this,vn)&&((N=b(this,hn))==null||N.call(this,C,e,"set")),b(this,Bt)&&((M=b(this,ft))==null||M.push([C,e,"set"])));if(b(this,qr).call(this,y),b(this,Bo).call(this,y,m,p),b(this,xe)[y]=n,p){p.set="replace";const F=C&&de(this,re,Je).call(this,C)?C.__staleWhileFetching:C;F!==void 0&&(p.oldValue=F)}}else p&&(p.set="update")}if(s!==0&&!b(this,zt)&&de(this,re,id).call(this),b(this,zt)&&(f||b(this,Fi).call(this,y,s,l),p&&b(this,Wn).call(this,p,y)),!c&&b(this,Bt)&&b(this,ft)){const C=b(this,ft);let F;for(;F=C==null?void 0:C.shift();)(G=b(this,fn))==null||G.call(this,...F)}return this}pop(){var e;try{for(;b(this,ct);){const n=b(this,xe)[b(this,bt)];if(de(this,re,Ta).call(this,!0),de(this,re,Je).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(b(this,Bt)&&b(this,ft)){const n=b(this,ft);let o;for(;o=n==null?void 0:n.shift();)(e=b(this,fn))==null||e.call(this,...o)}}}has(e,n={}){const{updateAgeOnHas:o=this.updateAgeOnHas,status:s}=n,l=b(this,at).get(e);if(l!==void 0){const c=b(this,xe)[l];if(de(this,re,Je).call(this,c)&&c.__staleWhileFetching===void 0)return!1;if(b(this,$t).call(this,l))s&&(s.has="stale",b(this,Wn).call(this,s,l));else return o&&b(this,jr).call(this,l),s&&(s.has="hit",b(this,Wn).call(this,s,l)),!0}else s&&(s.has="miss");return!1}peek(e,n={}){const{allowStale:o=this.allowStale}=n,s=b(this,at).get(e);if(s===void 0||!o&&b(this,$t).call(this,s))return;const l=b(this,xe)[s];return de(this,re,Je).call(this,l)?l.__staleWhileFetching:l}async fetch(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:p=0,sizeCalculation:f=this.sizeCalculation,noUpdateTTL:m=this.noUpdateTTL,noDeleteOnFetchRejection:y=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:B=this.allowStaleOnFetchRejection,ignoreFetchAbort:T=this.ignoreFetchAbort,allowStaleOnFetchAbort:N=this.allowStaleOnFetchAbort,context:M,forceRefresh:G=!1,status:C,signal:F}=n;if(!b(this,br))return C&&(C.fetch="get"),this.get(e,{allowStale:o,updateAgeOnGet:s,noDeleteOnStaleGet:l,status:C});const O={allowStale:o,updateAgeOnGet:s,noDeleteOnStaleGet:l,ttl:c,noDisposeOnSet:u,size:p,sizeCalculation:f,noUpdateTTL:m,noDeleteOnFetchRejection:y,allowStaleOnFetchRejection:B,allowStaleOnFetchAbort:N,ignoreFetchAbort:T,status:C,signal:F};let Z=b(this,at).get(e);if(Z===void 0){C&&(C.fetch="miss");const I=de(this,re,Ba).call(this,e,Z,O,M);return I.__returned=I}else{const I=b(this,xe)[Z];if(de(this,re,Je).call(this,I)){const U=o&&I.__staleWhileFetching!==void 0;return C&&(C.fetch="inflight",U&&(C.returnedStale=!0)),U?I.__staleWhileFetching:I.__returned=I}const Y=b(this,$t).call(this,Z);if(!G&&!Y)return C&&(C.fetch="hit"),de(this,re,ns).call(this,Z),s&&b(this,jr).call(this,Z),C&&b(this,Wn).call(this,C,Z),I;const W=de(this,re,Ba).call(this,e,Z,O,M),j=W.__staleWhileFetching!==void 0&&o;return C&&(C.fetch=Y?"stale":"refresh",j&&Y&&(C.returnedStale=!0)),j?W.__staleWhileFetching:W.__returned=W}}async forceFetch(e,n={}){const o=await this.fetch(e,n);if(o===void 0)throw new Error("fetch() returned undefined");return o}memo(e,n={}){const o=b(this,To);if(!o)throw new Error("no memoMethod provided to constructor");const{context:s,forceRefresh:l,...c}=n,u=this.get(e,c);if(!l&&u!==void 0)return u;const p=o(e,u,{options:c,context:s});return this.set(e,p,c),p}get(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,status:c}=n,u=b(this,at).get(e);if(u!==void 0){const p=b(this,xe)[u],f=de(this,re,Je).call(this,p);return c&&b(this,Wn).call(this,c,u),b(this,$t).call(this,u)?(c&&(c.get="stale"),f?(c&&o&&p.__staleWhileFetching!==void 0&&(c.returnedStale=!0),o?p.__staleWhileFetching:void 0):(l||de(this,re,Ir).call(this,e,"expire"),c&&o&&(c.returnedStale=!0),o?p:void 0)):(c&&(c.get="hit"),f?p.__staleWhileFetching:(de(this,re,ns).call(this,u),s&&b(this,jr).call(this,u),p))}else c&&(c.get="miss")}delete(e){return de(this,re,Ir).call(this,e,"delete")}clear(){return de(this,re,ld).call(this,"delete")}};pn=new WeakMap,Ot=new WeakMap,hn=new WeakMap,fn=new WeakMap,Eo=new WeakMap,To=new WeakMap,ct=new WeakMap,mn=new WeakMap,at=new WeakMap,Ke=new WeakMap,xe=new WeakMap,Tt=new WeakMap,Gt=new WeakMap,bt=new WeakMap,ht=new WeakMap,gn=new WeakMap,ft=new WeakMap,yn=new WeakMap,_n=new WeakMap,zt=new WeakMap,vn=new WeakMap,br=new WeakMap,Bt=new WeakMap,re=new WeakSet,id=function(){const e=new Fs(b(this,pn)),n=new Fs(b(this,pn));me(this,zt,e),me(this,_n,n),me(this,Fi,(l,c,u=ko.now())=>{if(n[l]=c!==0?u:0,e[l]=c,c!==0&&this.ttlAutopurge){const p=setTimeout(()=>{b(this,$t).call(this,l)&&de(this,re,Ir).call(this,b(this,Ke)[l],"expire")},c+1);p.unref&&p.unref()}}),me(this,jr,l=>{n[l]=e[l]!==0?ko.now():0}),me(this,Wn,(l,c)=>{if(e[c]){const u=e[c],p=n[c];if(!u||!p)return;l.ttl=u,l.start=p,l.now=o||s();const f=l.now-p;l.remainingTTL=u-f}});let o=0;const s=()=>{const l=ko.now();if(this.ttlResolution>0){o=l;const c=setTimeout(()=>o=0,this.ttlResolution);c.unref&&c.unref()}return l};this.getRemainingTTL=l=>{const c=b(this,at).get(l);if(c===void 0)return 0;const u=e[c],p=n[c];if(!u||!p)return 1/0;const f=(o||s())-p;return u-f},me(this,$t,l=>{const c=n[l],u=e[l];return!!u&&!!c&&(o||s())-c>u})},jr=new WeakMap,Wn=new WeakMap,Fi=new WeakMap,$t=new WeakMap,lm=function(){const e=new Fs(b(this,pn));me(this,mn,0),me(this,yn,e),me(this,qr,n=>{me(this,mn,b(this,mn)-e[n]),e[n]=0}),me(this,Ri,(n,o,s,l)=>{if(de(this,re,Je).call(this,o))return 0;if(!wr(s))if(l){if(typeof l!="function")throw new TypeError("sizeCalculation must be a function");if(s=l(o,n),!wr(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s}),me(this,Bo,(n,o,s)=>{if(e[n]=o,b(this,Ot)){const l=b(this,Ot)-e[n];for(;b(this,mn)>l;)de(this,re,Ta).call(this,!0)}me(this,mn,b(this,mn)+e[n]),s&&(s.entrySize=o,s.totalCalculatedSize=b(this,mn))})},qr=new WeakMap,Bo=new WeakMap,Ri=new WeakMap,Rr=function*({allowStale:e=this.allowStale}={}){if(b(this,ct))for(let n=b(this,ht);!(!de(this,re,sd).call(this,n)||((e||!b(this,$t).call(this,n))&&(yield n),n===b(this,bt)));)n=b(this,Gt)[n]},Mr=function*({allowStale:e=this.allowStale}={}){if(b(this,ct))for(let n=b(this,bt);!(!de(this,re,sd).call(this,n)||((e||!b(this,$t).call(this,n))&&(yield n),n===b(this,ht)));)n=b(this,Tt)[n]},sd=function(e){return e!==void 0&&b(this,at).get(b(this,Ke)[e])===e},Ta=function(e){var l,c;const n=b(this,bt),o=b(this,Ke)[n],s=b(this,xe)[n];return b(this,br)&&de(this,re,Je).call(this,s)?s.__abortController.abort(new Error("evicted")):(b(this,vn)||b(this,Bt))&&(b(this,vn)&&((l=b(this,hn))==null||l.call(this,s,o,"evict")),b(this,Bt)&&((c=b(this,ft))==null||c.push([s,o,"evict"]))),b(this,qr).call(this,n),e&&(b(this,Ke)[n]=void 0,b(this,xe)[n]=void 0,b(this,gn).push(n)),b(this,ct)===1?(me(this,bt,me(this,ht,0)),b(this,gn).length=0):me(this,bt,b(this,Tt)[n]),b(this,at).delete(o),Ea(this,ct)._--,n},Ba=function(e,n,o,s){const l=n===void 0?void 0:b(this,xe)[n];if(de(this,re,Je).call(this,l))return l;const c=new Ds,{signal:u}=o;u==null||u.addEventListener("abort",()=>c.abort(u.reason),{signal:c.signal});const p={signal:c.signal,options:o,context:s},f=(M,G=!1)=>{const{aborted:C}=c.signal,F=o.ignoreFetchAbort&&M!==void 0;if(o.status&&(C&&!G?(o.status.fetchAborted=!0,o.status.fetchError=c.signal.reason,F&&(o.status.fetchAbortIgnored=!0)):o.status.fetchResolved=!0),C&&!F&&!G)return y(c.signal.reason);const O=T;return b(this,xe)[n]===T&&(M===void 0?O.__staleWhileFetching?b(this,xe)[n]=O.__staleWhileFetching:de(this,re,Ir).call(this,e,"fetch"):(o.status&&(o.status.fetchUpdated=!0),this.set(e,M,p.options))),M},m=M=>(o.status&&(o.status.fetchRejected=!0,o.status.fetchError=M),y(M)),y=M=>{const{aborted:G}=c.signal,C=G&&o.allowStaleOnFetchAbort,F=C||o.allowStaleOnFetchRejection,O=F||o.noDeleteOnFetchRejection,Z=T;if(b(this,xe)[n]===T&&(!O||Z.__staleWhileFetching===void 0?de(this,re,Ir).call(this,e,"fetch"):C||(b(this,xe)[n]=Z.__staleWhileFetching)),F)return o.status&&Z.__staleWhileFetching!==void 0&&(o.status.returnedStale=!0),Z.__staleWhileFetching;if(Z.__returned===Z)throw M},B=(M,G)=>{var F;const C=(F=b(this,Eo))==null?void 0:F.call(this,e,l,p);C&&C instanceof Promise&&C.then(O=>M(O===void 0?void 0:O),G),c.signal.addEventListener("abort",()=>{(!o.ignoreFetchAbort||o.allowStaleOnFetchAbort)&&(M(void 0),o.allowStaleOnFetchAbort&&(M=O=>f(O,!0)))})};o.status&&(o.status.fetchDispatched=!0);const T=new Promise(B).then(f,m),N=Object.assign(T,{__abortController:c,__staleWhileFetching:l,__returned:void 0});return n===void 0?(this.set(e,N,{...p.options,status:void 0}),n=b(this,at).get(e)):b(this,xe)[n]=N,N},Je=function(e){if(!b(this,br))return!1;const n=e;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof Ds},ad=function(e,n){b(this,Gt)[n]=e,b(this,Tt)[e]=n},ns=function(e){e!==b(this,ht)&&(e===b(this,bt)?me(this,bt,b(this,Tt)[e]):de(this,re,ad).call(this,b(this,Gt)[e],b(this,Tt)[e]),de(this,re,ad).call(this,b(this,ht),e),me(this,ht,e))},Ir=function(e,n){var s,l,c,u;let o=!1;if(b(this,ct)!==0){const p=b(this,at).get(e);if(p!==void 0)if(o=!0,b(this,ct)===1)de(this,re,ld).call(this,n);else{b(this,qr).call(this,p);const f=b(this,xe)[p];if(de(this,re,Je).call(this,f)?f.__abortController.abort(new Error("deleted")):(b(this,vn)||b(this,Bt))&&(b(this,vn)&&((s=b(this,hn))==null||s.call(this,f,e,n)),b(this,Bt)&&((l=b(this,ft))==null||l.push([f,e,n]))),b(this,at).delete(e),b(this,Ke)[p]=void 0,b(this,xe)[p]=void 0,p===b(this,ht))me(this,ht,b(this,Gt)[p]);else if(p===b(this,bt))me(this,bt,b(this,Tt)[p]);else{const m=b(this,Gt)[p];b(this,Tt)[m]=b(this,Tt)[p];const y=b(this,Tt)[p];b(this,Gt)[y]=b(this,Gt)[p]}Ea(this,ct)._--,b(this,gn).push(p)}}if(b(this,Bt)&&((c=b(this,ft))!=null&&c.length)){const p=b(this,ft);let f;for(;f=p==null?void 0:p.shift();)(u=b(this,fn))==null||u.call(this,...f)}return o},ld=function(e){var n,o,s;for(const l of de(this,re,Mr).call(this,{allowStale:!0})){const c=b(this,xe)[l];if(de(this,re,Je).call(this,c))c.__abortController.abort(new Error("deleted"));else{const u=b(this,Ke)[l];b(this,vn)&&((n=b(this,hn))==null||n.call(this,c,u,e)),b(this,Bt)&&((o=b(this,ft))==null||o.push([c,u,e]))}}if(b(this,at).clear(),b(this,xe).fill(void 0),b(this,Ke).fill(void 0),b(this,zt)&&b(this,_n)&&(b(this,zt).fill(0),b(this,_n).fill(0)),b(this,yn)&&b(this,yn).fill(0),me(this,bt,0),me(this,ht,0),b(this,gn).length=0,me(this,mn,0),me(this,ct,0),b(this,Bt)&&b(this,ft)){const l=b(this,ft);let c;for(;c=l==null?void 0:l.shift();)(s=b(this,fn))==null||s.call(this,...c)}};let Fl=Ml;const QT={cacheSize:15e6};class eB{constructor(e){Ue(this,"_str");Ue(this,"_rawJson");Ue(this,"_zodSchema");Ue(this,"_validatedJson");this.bytes=e}get str(){return this._str===void 0&&(this._str=new TextDecoder().decode(this.bytes)),this._str}get rawJson(){return this._rawJson===void 0&&(this._rawJson=JSON.parse(this.str)),this._rawJson}validatedJson(e){return this._zodSchema!==e&&(this._validatedJson=e.parse(this.rawJson),this._zodSchema=e),this._validatedJson}}const Kr=class Kr{constructor(e){Ue(this,"fileDataCache");Ue(this,"fileDataRefs",new Map);const n={...QT,...e??{}};this.fileDataCache=new Fl({maxSize:n.cacheSize,fetchMethod:async o=>new eB(await Mg().blobDriver.getContent(o)),sizeCalculation:o=>o.bytes.length,dispose:(o,s)=>{this.fileDataRefs.delete(s)}})}getDataRef(e){const n=this.fileDataRefs.get(e);if(n!==void 0)return n;const o=r.shallowRef();return this.fileDataRefs.set(e,o),(async()=>{try{const s=await this.fileDataCache.fetch(e);o.value=s}catch(s){console.error(s)}})(),o}getContentBytes(e){if(e===void 0)return;const n=this.getDataRef(e);return r.computed(()=>{var o;return(o=n.value)==null?void 0:o.bytes})}getContentString(e){if(e===void 0)return;const n=this.getDataRef(e);return r.computed(()=>{var o;return(o=n==null?void 0:n.value)==null?void 0:o.str})}getContentJson(e,n){if(e===void 0)return;const o=this.getDataRef(e);return r.computed(()=>{var s,l;return n===void 0?(s=o==null?void 0:o.value)==null?void 0:s.rawJson:(l=o==null?void 0:o.value)==null?void 0:l.validatedJson(n)})}static getContentBytes(e){return Kr.globalInstance.getContentBytes(e)}static getContentString(e){return Kr.globalInstance.getContentString(e)}static getContentJson(e,n){return Kr.globalInstance.getContentJson(e,n)}};Ue(Kr,"globalInstance",new Kr);let Rl=Kr;R.AgGridTheme=nu,R.BlockLayout=fT,R.ContextProvider=Qk,R.DataTable=Xv,R.DemoData=QE,R.DropdownListItem=go,R.LongText=wl,R.MultiError=Aa,R.PlAccordion=ux,R.PlAccordionSection=Cx,R.PlAgCellFile=WT,R.PlAgDataTable=IT,R.PlAgDataTableToolsPanel=FT,R.PlAgGridColumnManager=vp,R.PlAgOverlayLoading=up,R.PlAgOverlayNoRows=pp,R.PlAgTextAndButtonCell=qT,R.PlAlert=VC,R.PlBlockPage=mC,R.PlBtnAccent=jC,R.PlBtnDanger=KC,R.PlBtnGhost=ys,R.PlBtnGroup=y0,R.PlBtnLink=QC,R.PlBtnPrimary=hl,R.PlBtnSecondary=fl,R.PlBtnSplit=$C,R.PlCheckbox=Lu,R.PlCheckboxGroup=kb,R.PlChip=bl,R.PlContainer=yC,R.PlDialogModal=kl,R.PlDropdown=mi,R.PlDropdownLegacy=Hw,R.PlDropdownLine=Iu,R.PlDropdownMulti=vb,R.PlDropdownRef=ww,R.PlEditableTitle=k0,R.PlFileDialog=Zu,R.PlFileInput=ip,R.PlGrid=xC,R.PlIcon16=vs,R.PlIcon24=Du,R.PlLogView=zu,R.PlMaskIcon16=$n,R.PlMaskIcon24=ln,R.PlNotificationAlert=sp,R.PlNumberField=ob,R.PlProgressBar=Jw,R.PlRow=vC,R.PlSectionSeparator=$u,R.PlSlideModal=Ou,R.PlSpacer=Eu,R.PlTableFilters=GT,R.PlTabs=ix,R.PlTextArea=tw,R.PlTextField=hr,R.PlToggleSwitch=Cs,R.PlTooltip=vt,R.ReactiveFileContent=Rl,R.Scrollable=$S,R.Slider=ap,R.SliderRange=LS,R.SliderRangeTriple=ES,R.ThemeSwitcher=lC,R.UnresolvedError=Na,R.ValueOrErrorsComponent=ZT,R.activateAgGrid=tu,R.animate=Cu,R.animateInfinite=rC,R.call=mu,R.computedResult=JT,R.createModel=Ia,R.debounce=wu,R.defineApp=B_,R.defineStore=YT,R.delay=gu,R.detectOutside=nw,R.ensureError=Fa,R.eventListener=vl,R.formatZodError=Ma,R.getElementScrollPosition=Ru,R.identity=Da,R.isDefined=Sm,R.isElementVisible=Fu,R.isJsonEqual=Pa,R.isZodError=Ra,R.listToOptions=oC,R.makeEaseInOut=nC,R.makeEaseOut=vu,R.maskIcons16=JE,R.maskIcons24=XE,R.normalizeListOptions=ur,R.notEmpty=ll,R.randomInt=_u,R.randomString=tC,R.requestTick=cl,R.scrollIntoView=fi,R.showContextMenu=il,R.throttle=bu,R.timeout=yu,R.unwrapOptionalResult=km,R.unwrapValueOrErrors=gd,R.useClickOutside=_s,R.useDraggable=mS,R.useEventListener=rt,R.useFormState=hS,R.useHover=hu,R.useInterval=pS,R.useLabelNotch=Zn,R.useLocalStorage=xu,R.useMouse=pu,R.useMouseCapture=dr,R.usePosition=yo,R.useQuery=fS,R.useResizeObserver=lp,R.useScroll=dS,R.useSdkPlugin=el,R.useSortable=dp,R.useTheme=Su,R.useWatchFetch=Cp,R.wrapOptionalResult=yd,R.wrapValueOrErrors=xm,Object.defineProperty(R,Symbol.toStringTag,{value:"Module"})});
|
|
90
|
+
`)+K+`return __p
|
|
91
|
+
}`;var Pe=cm(function(){return Ue(v,ue+"return "+K).apply(n,E)});if(Pe.source=K,Yc(Pe))throw Pe;return Pe}function cR(i){return We(i).toLowerCase()}function dR(i){return We(i).toUpperCase()}function uR(i,a,d){if(i=We(i),i&&(d||a===n))return yh(i);if(!i||!(a=jt(a)))return i;var h=kn(i),g=kn(a),v=_h(h,g),E=vh(h,g)+1;return Dr(h,v,E).join("")}function pR(i,a,d){if(i=We(i),i&&(d||a===n))return i.slice(0,wh(i)+1);if(!i||!(a=jt(a)))return i;var h=kn(i),g=vh(h,kn(a))+1;return Dr(h,0,g).join("")}function hR(i,a,d){if(i=We(i),i&&(d||a===n))return i.replace(Yl,"");if(!i||!(a=jt(a)))return i;var h=kn(i),g=_h(h,kn(a));return Dr(h,g).join("")}function fR(i,a){var d=q,h=ee;if(tt(a)){var g="separator"in a?a.separator:g;d="length"in a?Ve(a.length):d,h="omission"in a?jt(a.omission):h}i=We(i);var v=i.length;if(Fo(i)){var E=kn(i);v=E.length}if(d>=v)return i;var V=d-Ro(h);if(V<1)return h;var D=E?Dr(E,0,V).join(""):i.slice(0,V);if(g===n)return D+h;if(E&&(V+=D.length-V),Jc(g)){if(i.slice(V).search(g)){var W,H=D;for(g.global||(g=hc(g.source,We(Lp.exec(g))+"g")),g.lastIndex=0;W=g.exec(H);)var K=W.index;D=D.slice(0,K===n?V:K)}}else if(i.indexOf(jt(g),V)!=V){var oe=D.lastIndexOf(g);oe>-1&&(D=D.slice(0,oe))}return D+h}function mR(i){return i=We(i),i&&EB.test(i)?i.replace(Mp,ZV):i}var gR=$o(function(i,a,d){return i+(d?" ":"")+a.toUpperCase()}),ed=df("toUpperCase");function lm(i,a,d){return i=We(i),a=d?n:a,a===n?LV(i)?jV(i):NV(i):i.match(a)||[]}var cm=De(function(i,a){try{return Wt(i,n,a)}catch(d){return Yc(d)?d:new ke(d)}}),yR=Qn(function(i,a){return Xt(a,function(d){d=Gn(d),Jn(i,d,qc(i[d],i))}),i});function _R(i){var a=i==null?0:i.length,d=fe();return i=a?Xe(i,function(h){if(typeof h[1]!="function")throw new Qt(c);return[d(h[0]),h[1]]}):[],De(function(h){for(var g=-1;++g<a;){var v=i[g];if(Wt(v[0],this,h))return Wt(v[1],this,h)}})}function vR(i){return ZN(tn(i,y))}function td(i){return function(){return i}}function CR(i,a){return i==null||i!==i?a:i}var wR=pf(),bR=pf(!0);function It(i){return i}function nd(i){return zh(typeof i=="function"?i:tn(i,y))}function xR(i){return Uh(tn(i,y))}function kR(i,a){return Zh(i,tn(a,y))}var SR=De(function(i,a){return function(d){return Ji(d,i,a)}}),ER=De(function(i,a){return function(d){return Ji(i,d,a)}});function rd(i,a,d){var h=gt(a),g=ca(a,h);d==null&&!(tt(a)&&(g.length||!h.length))&&(d=a,a=i,i=this,g=ca(a,gt(a)));var v=!(tt(d)&&"chain"in d)||!!d.chain,E=tr(i);return Xt(g,function(V){var D=a[V];i[V]=D,E&&(i.prototype[V]=function(){var W=this.__chain__;if(v||W){var H=i(this.__wrapped__),K=H.__actions__=Ft(this.__actions__);return K.push({func:D,args:arguments,thisArg:i}),H.__chain__=W,H}return D.apply(i,Tr([this.value()],arguments))})}),i}function TR(){return yt._===this&&(yt._=QV),this}function od(){}function BR(i){return i=Ve(i),De(function(a){return Wh(a,i)})}var VR=Rc(Xe),NR=Rc(ph),AR=Rc(sc);function dm(i){return $c(i)?ac(Gn(i)):aA(i)}function PR(i){return function(a){return i==null?n:oo(i,a)}}var DR=ff(),FR=ff(!0);function id(){return[]}function sd(){return!1}function RR(){return{}}function MR(){return""}function IR(){return!0}function OR(i,a){if(i=Ve(i),i<1||i>ne)return[];var d=ot,h=kt(i,ot);a=fe(a),i-=ot;for(var g=dc(h,a);++d<i;)a(d);return g}function LR(i){return Ee(i)?Xe(i,Gn):qt(i)?[i]:Ft(Nf(We(i)))}function GR(i){var a=++JV;return We(i)+a}var zR=ma(function(i,a){return i+a},0),$R=Mc("ceil"),UR=ma(function(i,a){return i/a},1),ZR=Mc("floor");function WR(i){return i&&i.length?la(i,It,wc):n}function HR(i,a){return i&&i.length?la(i,fe(a,2),wc):n}function jR(i){return mh(i,It)}function qR(i,a){return mh(i,fe(a,2))}function KR(i){return i&&i.length?la(i,It,Sc):n}function YR(i,a){return i&&i.length?la(i,fe(a,2),Sc):n}var JR=ma(function(i,a){return i*a},1),XR=Mc("round"),QR=ma(function(i,a){return i-a},0);function eM(i){return i&&i.length?cc(i,It):0}function tM(i,a){return i&&i.length?cc(i,fe(a,2)):0}return _.after=xD,_.ary=zf,_.assign=dF,_.assignIn=tm,_.assignInWith=Ba,_.assignWith=uF,_.at=pF,_.before=$f,_.bind=qc,_.bindAll=yR,_.bindKey=Uf,_.castArray=RD,_.chain=Of,_.chunk=ZA,_.compact=WA,_.concat=HA,_.cond=_R,_.conforms=vR,_.constant=td,_.countBy=eD,_.create=hF,_.curry=Zf,_.curryRight=Wf,_.debounce=Hf,_.defaults=fF,_.defaultsDeep=mF,_.defer=kD,_.delay=SD,_.difference=jA,_.differenceBy=qA,_.differenceWith=KA,_.drop=YA,_.dropRight=JA,_.dropRightWhile=XA,_.dropWhile=QA,_.fill=eP,_.filter=nD,_.flatMap=iD,_.flatMapDeep=sD,_.flatMapDepth=aD,_.flatten=Ff,_.flattenDeep=tP,_.flattenDepth=nP,_.flip=ED,_.flow=wR,_.flowRight=bR,_.fromPairs=rP,_.functions=bF,_.functionsIn=xF,_.groupBy=lD,_.initial=iP,_.intersection=sP,_.intersectionBy=aP,_.intersectionWith=lP,_.invert=SF,_.invertBy=EF,_.invokeMap=dD,_.iteratee=nd,_.keyBy=uD,_.keys=gt,_.keysIn=Mt,_.map=ba,_.mapKeys=BF,_.mapValues=VF,_.matches=xR,_.matchesProperty=kR,_.memoize=ka,_.merge=NF,_.mergeWith=nm,_.method=SR,_.methodOf=ER,_.mixin=rd,_.negate=Sa,_.nthArg=BR,_.omit=AF,_.omitBy=PF,_.once=TD,_.orderBy=pD,_.over=VR,_.overArgs=BD,_.overEvery=NR,_.overSome=AR,_.partial=Kc,_.partialRight=jf,_.partition=hD,_.pick=DF,_.pickBy=rm,_.property=dm,_.propertyOf=PR,_.pull=pP,_.pullAll=Mf,_.pullAllBy=hP,_.pullAllWith=fP,_.pullAt=mP,_.range=DR,_.rangeRight=FR,_.rearg=VD,_.reject=gD,_.remove=gP,_.rest=ND,_.reverse=Hc,_.sampleSize=_D,_.set=RF,_.setWith=MF,_.shuffle=vD,_.slice=yP,_.sortBy=bD,_.sortedUniq=kP,_.sortedUniqBy=SP,_.split=iR,_.spread=AD,_.tail=EP,_.take=TP,_.takeRight=BP,_.takeRightWhile=VP,_.takeWhile=NP,_.tap=WP,_.throttle=PD,_.thru=wa,_.toArray=Xf,_.toPairs=om,_.toPairsIn=im,_.toPath=LR,_.toPlainObject=em,_.transform=IF,_.unary=DD,_.union=AP,_.unionBy=PP,_.unionWith=DP,_.uniq=FP,_.uniqBy=RP,_.uniqWith=MP,_.unset=OF,_.unzip=jc,_.unzipWith=If,_.update=LF,_.updateWith=GF,_.values=Wo,_.valuesIn=zF,_.without=IP,_.words=lm,_.wrap=FD,_.xor=OP,_.xorBy=LP,_.xorWith=GP,_.zip=zP,_.zipObject=$P,_.zipObjectDeep=UP,_.zipWith=ZP,_.entries=om,_.entriesIn=im,_.extend=tm,_.extendWith=Ba,rd(_,_),_.add=zR,_.attempt=cm,_.camelCase=WF,_.capitalize=sm,_.ceil=$R,_.clamp=$F,_.clone=MD,_.cloneDeep=OD,_.cloneDeepWith=LD,_.cloneWith=ID,_.conformsTo=GD,_.deburr=am,_.defaultTo=CR,_.divide=UR,_.endsWith=HF,_.eq=En,_.escape=jF,_.escapeRegExp=qF,_.every=tD,_.find=rD,_.findIndex=Pf,_.findKey=gF,_.findLast=oD,_.findLastIndex=Df,_.findLastKey=yF,_.floor=ZR,_.forEach=Lf,_.forEachRight=Gf,_.forIn=_F,_.forInRight=vF,_.forOwn=CF,_.forOwnRight=wF,_.get=Xc,_.gt=zD,_.gte=$D,_.has=kF,_.hasIn=Qc,_.head=Rf,_.identity=It,_.includes=cD,_.indexOf=oP,_.inRange=UF,_.invoke=TF,_.isArguments=ao,_.isArray=Ee,_.isArrayBuffer=UD,_.isArrayLike=Rt,_.isArrayLikeObject=it,_.isBoolean=ZD,_.isBuffer=Fr,_.isDate=WD,_.isElement=HD,_.isEmpty=jD,_.isEqual=qD,_.isEqualWith=KD,_.isError=Yc,_.isFinite=YD,_.isFunction=tr,_.isInteger=qf,_.isLength=Ea,_.isMap=Kf,_.isMatch=JD,_.isMatchWith=XD,_.isNaN=QD,_.isNative=eF,_.isNil=nF,_.isNull=tF,_.isNumber=Yf,_.isObject=tt,_.isObjectLike=nt,_.isPlainObject=rs,_.isRegExp=Jc,_.isSafeInteger=rF,_.isSet=Jf,_.isString=Ta,_.isSymbol=qt,_.isTypedArray=Zo,_.isUndefined=oF,_.isWeakMap=iF,_.isWeakSet=sF,_.join=cP,_.kebabCase=KF,_.last=rn,_.lastIndexOf=dP,_.lowerCase=YF,_.lowerFirst=JF,_.lt=aF,_.lte=lF,_.max=WR,_.maxBy=HR,_.mean=jR,_.meanBy=qR,_.min=KR,_.minBy=YR,_.stubArray=id,_.stubFalse=sd,_.stubObject=RR,_.stubString=MR,_.stubTrue=IR,_.multiply=JR,_.nth=uP,_.noConflict=TR,_.noop=od,_.now=xa,_.pad=XF,_.padEnd=QF,_.padStart=eR,_.parseInt=tR,_.random=ZF,_.reduce=fD,_.reduceRight=mD,_.repeat=nR,_.replace=rR,_.result=FF,_.round=XR,_.runInContext=P,_.sample=yD,_.size=CD,_.snakeCase=oR,_.some=wD,_.sortedIndex=_P,_.sortedIndexBy=vP,_.sortedIndexOf=CP,_.sortedLastIndex=wP,_.sortedLastIndexBy=bP,_.sortedLastIndexOf=xP,_.startCase=sR,_.startsWith=aR,_.subtract=QR,_.sum=eM,_.sumBy=tM,_.template=lR,_.times=OR,_.toFinite=nr,_.toInteger=Ve,_.toLength=Qf,_.toLower=cR,_.toNumber=on,_.toSafeInteger=cF,_.toString=We,_.toUpper=dR,_.trim=uR,_.trimEnd=pR,_.trimStart=hR,_.truncate=fR,_.unescape=mR,_.uniqueId=GR,_.upperCase=gR,_.upperFirst=ed,_.each=Lf,_.eachRight=Gf,_.first=Rf,rd(_,function(){var i={};return On(_,function(a,d){He.call(_.prototype,d)||(i[d]=a)}),i}(),{chain:!1}),_.VERSION=o,Xt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){_[i].placeholder=_}),Xt(["drop","take"],function(i,a){Re.prototype[i]=function(d){d=d===n?1:pt(Ve(d),0);var h=this.__filtered__&&!a?new Re(this):this.clone();return h.__filtered__?h.__takeCount__=kt(d,h.__takeCount__):h.__views__.push({size:kt(d,ot),type:i+(h.__dir__<0?"Right":"")}),h},Re.prototype[i+"Right"]=function(d){return this.reverse()[i](d).reverse()}}),Xt(["filter","map","takeWhile"],function(i,a){var d=a+1,h=d==w||d==$;Re.prototype[i]=function(g){var v=this.clone();return v.__iteratees__.push({iteratee:fe(g,3),type:d}),v.__filtered__=v.__filtered__||h,v}}),Xt(["head","last"],function(i,a){var d="take"+(a?"Right":"");Re.prototype[i]=function(){return this[d](1).value()[0]}}),Xt(["initial","tail"],function(i,a){var d="drop"+(a?"":"Right");Re.prototype[i]=function(){return this.__filtered__?new Re(this):this[d](1)}}),Re.prototype.compact=function(){return this.filter(It)},Re.prototype.find=function(i){return this.filter(i).head()},Re.prototype.findLast=function(i){return this.reverse().find(i)},Re.prototype.invokeMap=De(function(i,a){return typeof i=="function"?new Re(this):this.map(function(d){return Ji(d,i,a)})}),Re.prototype.reject=function(i){return this.filter(Sa(fe(i)))},Re.prototype.slice=function(i,a){i=Ve(i);var d=this;return d.__filtered__&&(i>0||a<0)?new Re(d):(i<0?d=d.takeRight(-i):i&&(d=d.drop(i)),a!==n&&(a=Ve(a),d=a<0?d.dropRight(-a):d.take(a-i)),d)},Re.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Re.prototype.toArray=function(){return this.take(ot)},On(Re.prototype,function(i,a){var d=/^(?:filter|find|map|reject)|While$/.test(a),h=/^(?:head|last)$/.test(a),g=_[h?"take"+(a=="last"?"Right":""):a],v=h||/^find/.test(a);g&&(_.prototype[a]=function(){var E=this.__wrapped__,V=h?[1]:arguments,D=E instanceof Re,W=V[0],H=D||Ee(E),K=function(Fe){var Me=g.apply(_,Tr([Fe],V));return h&&oe?Me[0]:Me};H&&d&&typeof W=="function"&&W.length!=1&&(D=H=!1);var oe=this.__chain__,ue=!!this.__actions__.length,ge=v&&!oe,Pe=D&&!ue;if(!v&&H){E=Pe?E:new Re(this);var ye=i.apply(E,V);return ye.__actions__.push({func:wa,args:[K],thisArg:n}),new en(ye,oe)}return ge&&Pe?i.apply(this,V):(ye=this.thru(K),ge?h?ye.value()[0]:ye.value():ye)})}),Xt(["pop","push","shift","sort","splice","unshift"],function(i){var a=js[i],d=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",h=/^(?:pop|shift)$/.test(i);_.prototype[i]=function(){var g=arguments;if(h&&!this.__chain__){var v=this.value();return a.apply(Ee(v)?v:[],g)}return this[d](function(E){return a.apply(Ee(E)?E:[],g)})}}),On(Re.prototype,function(i,a){var d=_[a];if(d){var h=d.name+"";He.call(Lo,h)||(Lo[h]=[]),Lo[h].push({name:a,func:d})}}),Lo[fa(n,C).name]=[{name:"wrapper",func:n}],Re.prototype.clone=mN,Re.prototype.reverse=gN,Re.prototype.value=yN,_.prototype.at=HP,_.prototype.chain=jP,_.prototype.commit=qP,_.prototype.next=KP,_.prototype.plant=JP,_.prototype.reverse=XP,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=QP,_.prototype.first=_.prototype.head,Zi&&(_.prototype[Zi]=YP),_},Mo=qV();Qr?((Qr.exports=Mo)._=Mo,nc._=Mo):yt._=Mo}).call(Ho)}(Fs,Fs.exports);var Ge=Fs.exports;const DT={class:"grid-overlay-container"},yp=r.defineComponent({__name:"PlAgOverlayLoading",props:{params:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",DT,[e.params.notReady?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[n[0]||(n[0]=r.createElementVNode("div",{class:"grid-icon-cat-in-bag"},null,-1)),n[1]||(n[1]=r.createElementVNode("span",{class:"text-subtitle-m"},"Not calculated",-1))],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[n[2]||(n[2]=r.createElementVNode("div",{class:"mask-24 mask-loading grid-mask-loading"},null,-1)),n[3]||(n[3]=r.createElementVNode("span",{class:"text-subtitle-m"},"Loading",-1))],64))]))}}),FT={},RT={class:"grid-overlay-container"};function MT(t,e){return r.openBlock(),r.createElementBlock("div",RT,e[0]||(e[0]=[r.createElementVNode("div",{class:"grid-icon-sad-cat"},null,-1),r.createElementVNode("span",{class:"text-subtitle-m"},"Empty",-1)]))}const _p=Ds(FT,[["render",MT]]);async function IT(t,e){throw Error("not implemented")}function OT(t){return t.axesSpec.filter(e=>{var n;return((n=e.annotations)==null?void 0:n["pl7.app/axisNature"])==="heterogeneous"})}function LT(t,e){const n=[];for(const o of e)if(t[o].type==="column"){const s=OT(t[o].spec);for(const l of s){if(l.type!=="String"){console.warn("heterogeneous axis with string type expected, got",l,"skipping");continue}const c=ja(l),u=t.findIndex(p=>Ge.isEqual(p.id,c));if(u===-1)throw console.error("axis not found",o,c,t),Error("axis not found");n.push({columnIdx:o,axisIdx:u})}}return n}const vp=(t,e)=>(t+e).toString();function GT(t,e,n,o,s,l){if(t.length>1)throw Error("hColumns.length > 1 is not supported");const c=t[0];let u=-1,p=-1;for(let y=0;y<l.length;++y)l[y]===c.axisIdx&&(u=y),l[y]===c.columnIdx&&(p=y);const f=(()=>{const T=o[u].data.filter(B=>B!==null);return Array.from(new Set(T))})();f.sort(),p>u?(n.splice(p,1),n.splice(u,1)):(n.splice(u,1),n.splice(p,1));const m=zT(s,o,u,p,f,e.rows);for(let y=0;y<f.length;++y){const T=f[y],B=Or(T+"@"+y);n.push({colId:B,field:vp(o.length,y),headerName:T,valueFormatter:wp})}return{rowModelType:"clientSide",columnDefs:n,rowData:m}}function zT(t,e,n,o,s,l){const c=new Map;let u=0;for(let f=0;f<l;f++){const m={};for(let I=0;I<e.length;++I){if(I===n||I===o)continue;const L=t[I].toString();m[L]=e[I].data[f]}let y;const T=Or(Object.values(m))??"";c.has(T)?y=c.get(T):(c.set(T,m),y=m,y.id=u.toString(),u++);const B=s.indexOf(e[n].data[f]);if(B===-1)throw Error("index not found");const A=vp(e.length,B);y[A]=e[o].data[f]}return Array.from(c.values())}function $T(t){return Or(t)}function Cp(t){return JSON.parse(t)}const wp=t=>t?t.value===void 0?"NULL":t.value===null?"NA":t.value.toString():"ERROR";function UT(t,e,n){var s,l,c;const o=$T(e);return{colId:o,field:t.toString(),headerName:((l=(s=e.spec.annotations)==null?void 0:s["pl7.app/label"])==null?void 0:l.trim())??"Unlabeled "+e.type+" "+t.toString(),lockPosition:e.type==="axis",hide:(n==null?void 0:n.includes(o))??((c=e.spec.annotations)==null?void 0:c["pl7.app/table/visibility"])==="optional",valueFormatter:wp,cellDataType:(u=>{switch(u){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${u}`)}})(e.type==="axis"?e.spec.type:e.spec.valueType)}}function bp(t,e){switch(e){case"Int":return t;case"Long":return typeof t=="bigint"?Number(t):t;case"Float":return t;case"Double":return t;case"String":return t;case"Bytes":return Buffer.from(t).toString("hex");default:throw Error(`unsupported data type: ${e}`)}}function xp(t){const e=[];return fs(t,n=>(e.push(n),n)),e}async function ZT(t,e,n){return n.length?(await t.findColumns(e,{columnFilter:{name:["pl7.app/label"]},compatibleWith:Ge.uniqWith(n.map(s=>Rd(s.spec.axesSpec).map(Ge.cloneDeep)).flat(),Ge.isEqual),strictlyCompatible:!0})).hits.filter(s=>s.spec.axesSpec.length===1):[]}async function WT(t,e,n){const o=xp(n),l=(await ZT(t,e,o)).filter(c=>!Ge.find(o,u=>c.columnId===u.columnId));return l.length===0?n:{type:"outer",primary:n,secondary:l.map(c=>({type:"column",column:c}))}}async function HT(t,e,n,o){const s=n.filter(m=>m.type!=="Bytes"),l=xp(o),c=s.map(m=>[]),u=s.map(m=>null);for(let m=0;m<l.length;++m){const y=Rd(l[m].spec.axesSpec);for(let T=0;T<y.length;++T){const B=Ge.findIndex(s,A=>Ge.isEqual(A,y[T]));B===-1||u[B]||(y.length===1&&l[m].spec.name==="pl7.app/label"?(c[B]=[[m,T]],u[B]=l[m].columnId):c[B].push([m,T]))}}for(let m=s.length-1;m>=0;--m)c[m].length||(u.splice(m,1),c.splice(m,1),s.splice(m,1));const p=100,f=s.map(m=>new Set);e:for(let m=s.length-1;m>=0;--m){for(const[y,T]of c[m]){const B=await t.getUniqueValues(e,{columnId:l[y].columnId,...!u[m]&&{axis:Ge.cloneDeep(s[m])},filters:[],limit:p});if(B.overflow){u.splice(m,1),c.splice(m,1),s.splice(m,1);continue e}const A=B.values.type;for(const I of B.values.data)if(!(Fd(I,A)||I===null)&&(f[m].add(bp(I,A)),f[m].size===p)){u.splice(m,1),c.splice(m,1),s.splice(m,1);continue e}}if(!f[m].size){u.splice(m,1),c.splice(m,1),s.splice(m,1);continue e}}return s.map((m,y)=>{const T=[...f[y]].map(A=>({value:A,label:A.toString()})),B=T[0].value;return{axis:Ge.cloneDeep(m),...u[y]&&{column:u[y]},options:T,defaultValue:B}})}function jT(t,e,n,o){const s=t.length,l=[];for(let c=0;c<e[0].data.length;++c){const u=[],p=(o++).toString();for(const m of n)u.push(e[m].data[c]);const f={key:u,id:p};for(let m=0;m<s;++m){const y=t[m].toString(),T=e[m].data[c],B=e[m].type;Og(e[m].absent,c)?f[y]=void 0:Fd(T,B)||T===null?f[y]=null:f[y]=bp(T,B)}l.push(f)}return l}const qT=t=>t.type==="column"&&t.spec.axesSpec.length===1&&t.spec.name==="pl7.app/label";async function KT(t,e,n,o){const s=await t.getSpec(e);let l=s.findIndex(C=>C.type==="column");l===-1&&(l=s.length);const c=[...s.keys()].filter(C=>!Ge.find(n,R=>Ge.isEqual(R.axis,s[C].id)||Ge.isEqual(R.column,s[C].id))).sort((C,R)=>{var N,U;if(s[C].type!==s[R].type)return s[C].type==="axis"?-1:1;const O=(N=s[C].spec.annotations)==null?void 0:N["pl7.app/table/orderPriority"],F=(U=s[R].spec.annotations)==null?void 0:U["pl7.app/table/orderPriority"];return O===void 0?F===void 0?0:1:F===void 0?-1:Number(F)-Number(O)}),u=Ge.cloneDeep(c),p=LT(s,c);for(let C=c.length-1;C>=0;--C){const R=c[C];if(!qT(s[R]))continue;const O=ja(s[R].spec.axesSpec[0]),F=Ge.findIndex(c,N=>Ge.isEqual(s[N].id,O));if(F===-1&&Ge.findIndex(n,U=>Ge.isEqual(U.axis,O))===-1){console.warn(`added label column, but the axis is not in the data; axisId: ${O}`);continue}c[F]=R;for(const N of p)N.axisIdx===R&&(N.axisIdx=F);c.splice(C,1),u.splice(C,1)}const f=await t.getShape(e),m=f.rows,y=u.map(C=>UT(C,s[C],o));if(p.length>1&&console.warn("Currently, only one heterogeneous axis is supported in the table, got",p.length," transposition will not be applied."),p.length===1)return GT(p,f,y,await t.getData(e,c),u,c);const T=[...c],B=new Map;for(let C=0;C<l;++C)B.set(C,-1);for(let C=0;C<T.length;++C){const R=T[C];B.has(R)&&B.set(R,C)}for(const[C,R]of B)R===-1&&(B.set(C,T.length),T.push(C));const A=[];for(let C=0;C<l;++C){const R=B.get(C);if(R===void 0||R===-1)throw new Error("assertion exception");A.push(R)}let I;return{rowModelType:"serverSide",columnDefs:y,serverSideDatasource:{getRows:async C=>{try{if(m==0){C.success({rowData:[],rowCount:m}),C.api.setGridOption("loading",!1),C.api.showNoRowsOverlay();return}if(I&&!Ge.isEqual(I.request.sortModel,C.request.sortModel)){I=void 0,C.api.setGridOption("loading",!0),C.success({rowData:[],rowCount:0});return}I=C;let R=0,O=[];if(m>0&&C.request.startRow!==void 0&&C.request.endRow!==void 0&&(R=Math.min(m,C.request.endRow)-C.request.startRow,R>0)){const F=await t.getData(e,T,{offset:C.request.startRow,length:R});O=jT(u,F,A,C.request.startRow)}C.success({rowData:O,rowCount:m}),C.api.autoSizeAllColumns(),C.api.setGridOption("loading",!1)}catch(R){C.api.setGridOption("loading",!0),C.fail(),console.trace(R)}}}}}const kp=km(),YT=["onClick"],Sp=r.defineComponent({__name:"PlAgGridColumnManager",props:{api:{}},setup(t){const e=t,{api:n}=r.toRefs(e),o=r.ref([]),s=r.ref(),l=r.ref(!1),c=r.ref(0);gp(s,{handle:".handle",onChange(p){n.value.moveColumns(p.map(f=>o.value[f]),0)}});function u(p){n.value.setColumnsVisible([p],!p.isVisible())}return r.onMounted(()=>{n.value.addEventListener("displayedColumnsChanged",()=>{o.value=[...n.value.getAllGridColumns()??[]],c.value++}),o.value=n.value.getAllGridColumns()??[]}),(p,f)=>(r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(),r.createBlock(r.Teleport,{to:`#${r.unref(kp)}`},[r.createVNode(r.unref(Cs),{onClick:f[0]||(f[0]=r.withModifiers(m=>l.value=!l.value,["stop"]))},{append:r.withCtx(()=>[r.createVNode(r.unref(cn),{name:"columns"})]),default:r.withCtx(()=>[f[2]||(f[2]=r.createTextVNode(" Columns "))]),_:1})],8,["to"])),r.createVNode(r.unref($u),{modelValue:l.value,"onUpdate:modelValue":f[1]||(f[1]=m=>l.value=m),shadow:!0,width:"368px","close-on-outside-click":""},{title:r.withCtx(()=>f[3]||(f[3]=[r.createTextVNode("Columns")])),default:r.withCtx(()=>[(r.openBlock(),r.createElementBlock("div",{ref_key:"listRef",ref:s,key:c.value,class:"pl-ag-columns"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,m=>(r.openBlock(),r.createElementBlock("div",{key:m.getId(),class:"pl-ag-columns__item"},[r.createElementVNode("div",{class:r.normalizeClass([{handle:!m.getColDef().lockPosition},"pl-ag-columns__drag"])},[r.createVNode(r.unref(Un),{name:"drag-dots"})],2),r.createElementVNode("div",{class:r.normalizeClass([{visible:m.isVisible()},"pl-ag-columns__title"])},r.toDisplayString(m.getColDef().headerName),3),r.createElementVNode("div",{class:"pl-ag-columns__visibility",onClick:y=>u(m)},[r.createVNode(r.unref(Ct),{"close-delay":500,position:"top"},{tooltip:r.withCtx(()=>f[4]||(f[4]=[r.createTextVNode("Show/Hide")])),default:r.withCtx(()=>[r.createVNode(r.unref(cn),{name:m.isVisible()?"view-show":"view-hide"},null,8,["name"])]),_:2},1024)],8,YT)]))),128))]))]),_:1},8,["modelValue"])]))}}),JT=["id"],XT=r.defineComponent({__name:"PlAgDataTableToolsPanel",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{id:r.unref(kp),class:"d-flex gap-6"},[r.renderSlot(e.$slots,"default")],8,JT))}}),QT={class:"ap-ag-data-table-container"},eB={key:1,class:"ap-ag-data-table-sheets"},tB=Ds(r.defineComponent({__name:"PlAgDataTable",props:r.mergeModels({settings:{},showColumnsPanel:{type:Boolean}},{modelValue:{default:{gridState:{}}},modelModifiers:{}}),emits:r.mergeModels(["onRowDoubleClicked","columnsChanged"],["update:modelValue"]),setup(t,{expose:e,emit:n}){x.ModuleRegistry.registerModules([is.ClientSideRowModelModule,hd.ClipboardModule,pd.ServerSideRowModelModule,fd.RangeSelectionModule,Ja,ru]);const o=r.useModel(t,"modelValue"),s=t,{settings:l}=r.toRefs(s),c=n;r.watch(()=>l.value,async(S,w)=>{if(S.sourceType!=="pframe"||!S.pFrame||!S.join||w&&w.sourceType==="pframe"&&Ge.isEqual(S.pFrame,w.pFrame)&&Ge.isEqual(S.join,w.join))return;const k=window.platforma;if(!k)throw Error("platforma not set");const $=k.pFrameDriver;if(!$)throw Error("platforma.pFrameDriver not set");const Q=await WT($,S.pFrame,S.join),ne=o.value;ne.pTableParams||(ne.pTableParams={sorting:[],filters:[]}),ne.pTableParams.join=Q,o.value=ne});const u=Ep(()=>l.value.sourceType,async S=>{var k;const w=l.value.sourceType;switch(w){case"pframe":{const $=window.platforma;if(!$)throw Error("platforma not set");const Q=$.pFrameDriver;if(!Q)throw Error("platforma.pFrameDriver not set");if(!l.value.pFrame)return[];const ne=l.value.pFrame,be=(k=o.value.pTableParams)==null?void 0:k.join;return be?await HT(Q,ne,l.value.sheetAxes,be):[]}case"ptable":return l.value.sheets??[];case"xsv":return[];default:throw Error(`unsupported source type: ${w}`)}});function p(S){if(!(l.value.sourceType!=="ptable"&&l.value.sourceType!=="pframe"))return(S==null?void 0:S.sortModel.map(w=>{const{spec:k,...$}=Cp(w.colId);return{column:$,ascending:w.sort==="asc",naAndAbsentAreLeastValues:!0}}))??[]}const f=r.computed({get:()=>{const S=o.value;return{columnOrder:S.gridState.columnOrder,sort:S.gridState.sort,columnVisibility:S.gridState.columnVisibility}},set:S=>{const w=o.value,k=A.value.rowModelType==="clientSide"?void 0:p(S.sort);w.gridState={...w.gridState,...S},(l.value.sourceType==="ptable"||l.value.sourceType==="pframe")&&(w.pTableParams||(w.pTableParams={sorting:[],filters:[]}),w.pTableParams.sorting=k),o.value=w}}),m=S=>Or(S);function y(S){var w;if(!(l.value.sourceType!=="ptable"&&l.value.sourceType!=="pframe"))return((w=u.value)==null?void 0:w.map(k=>({type:"bySingleColumn",column:k.column?{type:"column",id:k.column}:{type:"axis",id:k.axis},predicate:{operator:"Equal",reference:S[m(k.axis)]}})))??[]}const T=r.computed({get:()=>o.value.gridState.sheets??{},set:S=>{const w=y(S),k=o.value;k.gridState.sheets=S,(l.value.sourceType==="ptable"||l.value.sourceType==="pframe")&&(k.pTableParams||(k.pTableParams={sorting:[],filters:[]}),k.pTableParams.filters=w),o.value=k}});r.watch(()=>[l.value,u.value],(S,w)=>{const[k,$]=S;if(!$)return;if(w){const[ne,be]=w;if((k.sourceType==="ptable"||k.sourceType==="pframe")&&k.sourceType===(ne==null?void 0:ne.sourceType)&&Ge.isEqual($,be))return}if(k.sourceType!=="ptable"&&k.sourceType!=="pframe"){T.value={};return}const Q=T.value;for(const ne of $){const be=m(ne.axis);Q[be]||(Q[be]=ne.defaultValue??ne.options[0].value)}T.value=Q},{immediate:!0});const B=r.shallowRef(),A=r.shallowRef({animateRows:!1,suppressColumnMoveAnimation:!0,cellSelection:!0,initialState:f.value,autoSizeStrategy:{type:"fitCellContents"},onRowDataUpdated:S=>{S.api.autoSizeAllColumns()},onRowDoubleClicked:S=>{S.data&&c("onRowDoubleClicked",S.data.key)},defaultColDef:{suppressHeaderMenuButton:!0},maintainColumnOrder:!0,localeText:{loadingError:"..."},rowModelType:"clientSide",maxBlocksInCache:1e3,cacheBlockSize:100,blockLoadDebounceMillis:500,serverSideSortAllLevels:!0,suppressServerSideFullWidthLoadingRow:!0,getRowId:S=>S.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0},loadingOverlayComponent:yp,noRowsOverlayComponent:_p,sideBar:{},defaultCsvExportParams:{allColumns:!0,suppressQuotes:!0,fileName:"table.csv"}}),I=S=>{const w=S.api;B.value=new Proxy(w,{get(k,$,Q){switch($){case"setGridOption":return(ne,be)=>{const $e=A.value;$e[ne]=be,A.value=$e,w.setGridOption(ne,be)};case"updateGridOptions":return ne=>{A.value={...A.value,...ne},w.updateGridOptions(ne)};default:return Reflect.get(k,$,Q)}}})},L=S=>({columnOrder:S.columnOrder,sort:S.sort,columnVisibility:S.columnVisibility??(S.columnOrder?{hiddenColIds:[]}:void 0)}),C=S=>{A.value.initialState=f.value=L(S.state),S.api.autoSizeAllColumns()},R=()=>{A.value.initialState=f.value=L(B.value.getState()),B.value=void 0};let O=!1;const F=()=>{if(!O)return;const S=B.value;S!==void 0&&(S.exportDataAsCsv(),O=!1,S.setGridOption("cacheBlockSize",100))},N=()=>{if(!O)return;const S=B.value;if(S===void 0)return;const w=S.getServerSideGroupLevelState()[0];w.cacheBlockSize===w.rowCount&&S.refreshServerSide({route:w.route,purge:!1})};e({exportCsv:async()=>{const S=B.value;if(S!==void 0){if(A.value.rowModelType==="clientSide"){S.exportDataAsCsv();return}if(A.value.rowModelType==="serverSide"){const w=S.getServerSideGroupLevelState()[0];if(w.rowCount<=w.cacheBlockSize){S.exportDataAsCsv();return}O||(O=!0,S.setGridOption("cacheBlockSize",w.rowCount))}}}});const te=r.ref(0);r.watch(()=>[B.value,f.value],(S,w)=>{if(Ge.isEqual(S,w))return;const[k,$]=S;if(!k)return;const Q=L(k.getState());Ge.isEqual($,Q)||(A.value.initialState=$,++te.value)}),r.watch(()=>A.value,(S,w)=>{var k;if(w&&(S.rowModelType!=w.rowModelType&&++te.value,!Ge.isEqual(S.columnDefs,w.columnDefs)&&S.columnDefs)){const $=be=>!("children"in be),Q=(k=S.columnDefs)==null?void 0:k.filter($),ne=Q==null?void 0:Q.map(be=>be.colId).filter(be=>be!==void 0).map(be=>Cp(be));c("columnsChanged",ne??[])}});const j=(S,w)=>{var $;const k=T.value;k[S]!==w&&(k[S]=w,T.value=k,($=B.value)==null||$.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}}))},Y=window.platforma;if(!Y)throw Error("platforma not set");const q=Y.pFrameDriver;if(!q)throw Error("platforma.pFrameDriver not set");const ee=Y.blobDriver;if(!ee)throw Error("platforma.blobDriver not set");let G;return r.watch(()=>[B.value,l.value,u.value],async S=>{var ne,be;const[w,k,$]=S;if(!w||Ge.isEqual(k,G))return;G=k;const Q=k.sourceType;switch(Q){case"pframe":case"ptable":{const $e=k.pTable;if(!$e||!$)return w.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const ot=(be=(ne=f.value)==null?void 0:ne.columnVisibility)==null?void 0:be.hiddenColIds,wn=await KT(q,$e,$,ot);return w.updateGridOptions({loading:wn.rowModelType!=="clientSide",loadingOverlayComponentParams:{notReady:!1},...wn})}case"xsv":{const $e=k.xsvFile;if(!($e!=null&&$e.ok)||!$e.value)return w.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const ot=await IT(ee,$e.value);return w.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...ot})}default:throw Error(`unsupported source type: ${Q}`)}}),(S,w)=>(r.openBlock(),r.createElementBlock("div",QT,[B.value&&S.showColumnsPanel?(r.openBlock(),r.createBlock(r.unref(Sp),{key:0,api:B.value},null,8,["api"])):r.createCommentVNode("",!0),r.unref(u).value&&r.unref(u).value.length>0?(r.openBlock(),r.createElementBlock("div",eB,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(u).value,(k,$)=>(r.openBlock(),r.createBlock(r.unref(Gu),{key:$,"model-value":T.value[m(k.axis)],options:k.options,"onUpdate:modelValue":Q=>j(m(k.axis),Q)},null,8,["model-value","options","onUpdate:modelValue"]))),128))])):r.createCommentVNode("",!0),(r.openBlock(),r.createBlock(r.unref(Cm.AgGridVue),{key:te.value,theme:r.unref(iu),class:"ap-ag-data-table-grid","grid-options":A.value,onGridReady:I,onStateUpdated:C,onGridPreDestroyed:R,onStoreRefreshed:F,onModelUpdated:N},null,8,["theme","grid-options"]))]))}}),[["__scopeId","data-v-330ddc9a"]]),nB={key:0,class:"d-flex gap-10 flex-column"},rB={key:0},oB=Ds(r.defineComponent({__name:"PlTableFilters",props:r.mergeModels({columns:{},restrictions:{},defaults:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,{columns:o,restrictions:s,defaults:l}=r.toRefs(n),c=G=>Or(G.id),u=r.computed(()=>o.value.filter(G=>{const S=G.type;switch(S){case"axis":return G.spec.type!=="Bytes";case"column":return G.spec.valueType!=="Bytes";default:throw Error(`unsupported data type: ${S}`)}}).map(G=>({column:G,id:c(G)}))),p=r.computed(()=>{const G=s.value??[],S={};for(const{column:w,id:k}of u.value){const $=Ge.find(G,Q=>Ge.isEqual(Q.column.id,w.id));$!==void 0&&(S[k]=$.allowedFilterTypes)}return S}),f=r.computed(()=>{const G=l.value??[],S={};for(const{column:w,id:k}of u.value){const $=Ge.find(G,Q=>Ge.isEqual(Q.column.id,w.id));$!==void 0&&(S[k]=$.default)}return S}),m=G=>G!==void 0?G:f.value,y=r.reactive({state:m(e.value.state)});r.watch(()=>e.value,G=>{Ge.isEqual(y.state,G.state)||(y.state=m(G.state))}),r.watch(()=>u.value,G=>{if(y.state!==void 0&&G.length===0)return;const S=y.state??{},w={};for(const{id:k}of G)S[k]!==void 0&&(w[k]=S[k]);y.state=w},{immediate:!0});const T=G=>{switch(G){case"isNotNA":return"Is not NA";case"isNA":return"Is NA";case"number_equals":case"string_equals":return"Equals";case"number_notEquals":case"string_notEquals":return"Not equals";case"number_greaterThan":return"Greater than";case"number_greaterThanOrEqualTo":return"Greater than or equal to";case"number_lessThan":return"Less than";case"number_lessThanOrEqualTo":return"Less than or equal to";case"number_between":return"Between";case"string_contains":return"Contains";case"string_doesNotContain":return"Does not contain";case"string_matches":return"Matches";case"string_doesNotMatch":return"Does not match";case"string_containsFuzzyMatch":return"Contains fuzzy match";default:throw Error(`unsupported filter type: ${G}`)}},B=["isNotNA","isNA","number_equals","number_notEquals","number_greaterThan","number_greaterThanOrEqualTo","number_lessThan","number_lessThanOrEqualTo","number_between"],A=["isNotNA","isNA","string_equals","string_notEquals","string_contains","string_doesNotContain","string_matches","string_doesNotMatch","string_containsFuzzyMatch"],I=r.computed(()=>{const G=p.value,S={};for(const{column:w,id:k}of u.value){let Q=(w.type==="column"?w.spec.valueType:w.spec.type)==="String"?A:B;const ne=G[k];ne!==void 0&&(Q=Q.filter(be=>ne.includes(be))),S[k]=Q.map(be=>({value:be,text:T(be)}))}return S}),L=r.computed(()=>Ge.some(Object.values(I.value),G=>G.length>0)),C=G=>{const S=G.type;switch(S){case"isNotNA":case"isNA":return;case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return G.reference;case"number_between":return G.lowerBound;case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":case"string_containsFuzzyMatch":return G.reference;default:throw Error(`unsupported filter type: ${S}`)}},R=(G,S)=>{switch(G){case"isNotNA":case"isNA":return{type:G};case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return{type:G,reference:typeof S=="number"?S:0};case"number_between":return{type:G,lowerBound:typeof S=="number"?S:0,includeLowerBound:!0,upperBound:100,includeUpperBound:!1};case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":return{type:G,reference:typeof S=="string"?S:""};case"string_containsFuzzyMatch":return{type:G,reference:typeof S=="string"?S:"",maxEdits:2,substitutionsOnly:!1,wildcard:void 0};default:throw Error(`unsupported filter type: ${G}`)}},O=(G,S)=>{const w=y.state[G];y.state[G]=R(S,C(w))},F=G=>{y.state[G]=f.value[G]??R(I.value[G][0].value)},N=(G,S)=>{S?F(G):delete y.state[G]},U=(G,S)=>{var ne,be;const w=Number(S);if(!Number.isFinite(w))throw Error("Model value is not a number.");const k=G.type==="column"?G.spec.valueType:G.spec.type;if((k==="Int"||k==="Long")&&!Number.isInteger(w))throw Error("Model value is not an integer.");const $=(ne=G.spec.annotations)==null?void 0:ne["pl7.app/min"];if($!==void 0){const $e=Number($);if(Number.isFinite($e)&&w<Number($))throw Error("Model value is too low.")}const Q=(be=G.spec.annotations)==null?void 0:be["pl7.app/max"];if(Q!==void 0){const $e=Number(Q);if(Number.isFinite($e)&&w>Number(Q))throw Error("Model value is too high.")}return w},te=(G,S)=>{var k,$;const w=((k=G.spec.domain)==null?void 0:k["pl7.app/alphabet"])??(($=G.spec.annotations)==null?void 0:$["pl7.app/alphabet"]);if(w==="nucleotide"&&!/^[AaTtGgCcNn]+$/.test(S))throw Error("Model value is not a nucleotide.");if(w==="aminoacid"&&!/^[AaCcDdEeFfGgHhIiKkLlMmNnPpQqRrSsTtVvWwYyXx]+$/.test(S))throw Error("Model value is not an aminoacid.");return S},j=G=>{try{return new RegExp(G),G}catch(S){throw S instanceof SyntaxError?Error("Model value is not a regexp."):S}},Y=(G,S)=>{var $,Q;const w=(($=G.spec.domain)==null?void 0:$["pl7.app/alphabet"])??((Q=G.spec.annotations)==null?void 0:Q["pl7.app/alphabet"]);if(w==="nucleotide")return[{value:"N",text:"N"}];if(w==="aminoacid")return[{value:"X",text:"X"}];const k=Ge.uniq(S);return k.sort(),k.map(ne=>({value:ne,text:ne}))},q=G=>{const S=G.type;switch(S){case"isNotNA":return{operator:"Not",operand:{operator:"IsNA"}};case"isNA":return{operator:"IsNA"};case"number_equals":case"string_equals":return{operator:"Equal",reference:G.reference};case"number_notEquals":case"string_notEquals":return{operator:"Not",operand:{operator:"Equal",reference:G.reference}};case"number_greaterThan":return{operator:"Greater",reference:G.reference};case"number_greaterThanOrEqualTo":return{operator:"GreaterOrEqual",reference:G.reference};case"number_lessThan":return{operator:"Less",reference:G.reference};case"number_lessThanOrEqualTo":return{operator:"LessOrEqual",reference:G.reference};case"number_between":return{operator:"And",operands:[{operator:G.includeLowerBound?"GreaterOrEqual":"Greater",reference:G.lowerBound},{operator:G.includeUpperBound?"LessOrEqual":"Less",reference:G.upperBound}]};case"string_contains":return{operator:"StringContains",substring:G.reference};case"string_doesNotContain":return{operator:"Not",operand:{operator:"StringContains",substring:G.reference}};case"string_matches":return{operator:"Matches",regex:G.reference};case"string_doesNotMatch":return{operator:"Not",operand:{operator:"Matches",regex:G.reference}};case"string_containsFuzzyMatch":return{operator:"StringContainsFuzzy",reference:G.reference,maxEdits:G.maxEdits,substitutionsOnly:G.substitutionsOnly,wildcard:G.wildcard};default:throw Error(`unsupported filter type: ${S}`)}},ee=G=>u.value.map(({column:S,id:w})=>{if(!(w in G))return;const k=q(G[w]),{spec:$,...Q}=S;return{type:"bySingleColumn",column:Q,predicate:k}}).filter(S=>S!==void 0);return r.watch(()=>y,G=>{Ge.isEqual(G.state,e.value.state)||(e.value={state:Ge.cloneDeep(G.state),filters:ee(G.state)})},{immediate:!0,deep:!0}),(G,S)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.value,({column:w,id:k},$)=>{var Q,ne,be,$e,ot,wn,In,xr,jn,Jr,Os,kr,Sr,Ls;return r.openBlock(),r.createElementBlock("div",{key:k},[I.value[k].length>0?(r.openBlock(),r.createElementBlock("form",nB,[r.createVNode(r.unref(zu),{"model-value":!!y.state[k],"onUpdate:modelValue":Se=>N(k,Se)},{default:r.withCtx(()=>{var Se,Xr;return[r.createTextVNode(r.toDisplayString(((Xr=(Se=w.spec.annotations)==null?void 0:Se["pl7.app/label"])==null?void 0:Xr.trim())??"Unlabeled "+w.type+" "+$.toString()),1)]}),_:2},1032,["model-value","onUpdate:modelValue"]),r.createElementVNode("div",{class:r.normalizeClass(["controls d-flex gap-10 flex-column",{open:!!y.state[k]}])},[y.state[k]?(r.openBlock(),r.createBlock(r.unref(yi),{key:0,"model-value":y.state[k].type,options:I.value[k],label:"Predicate","onUpdate:modelValue":Se=>O(k,Se)},null,8,["model-value","options","onUpdate:modelValue"])):r.createCommentVNode("",!0),((Q=y.state[k])==null?void 0:Q.type)==="number_equals"||((ne=y.state[k])==null?void 0:ne.type)==="number_notEquals"||((be=y.state[k])==null?void 0:be.type)==="number_lessThan"||(($e=y.state[k])==null?void 0:$e.type)==="number_lessThanOrEqualTo"||((ot=y.state[k])==null?void 0:ot.type)==="number_greaterThan"||((wn=y.state[k])==null?void 0:wn.type)==="number_greaterThanOrEqualTo"?(r.openBlock(),r.createBlock(r.unref(Ur),{key:1,modelValue:y.state[k].reference,"onUpdate:modelValue":Se=>y.state[k].reference=Se,parse:Se=>U(w,Se),label:"Reference value"},null,8,["modelValue","onUpdate:modelValue","parse"])):r.createCommentVNode("",!0),((In=y.state[k])==null?void 0:In.type)==="number_between"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[r.createVNode(r.unref(Ur),{modelValue:y.state[k].lowerBound,"onUpdate:modelValue":Se=>y.state[k].lowerBound=Se,parse:Se=>U(w,Se),label:"Lower bound"},null,8,["modelValue","onUpdate:modelValue","parse"]),r.createVNode(r.unref(xs),{modelValue:y.state[k].includeLowerBound,"onUpdate:modelValue":Se=>y.state[k].includeLowerBound=Se,label:"Include lower bound"},null,8,["modelValue","onUpdate:modelValue"]),r.createVNode(r.unref(Ur),{modelValue:y.state[k].upperBound,"onUpdate:modelValue":Se=>y.state[k].upperBound=Se,parse:Se=>U(w,Se),label:"Upper bound"},null,8,["modelValue","onUpdate:modelValue","parse"]),r.createVNode(r.unref(xs),{modelValue:y.state[k].includeUpperBound,"onUpdate:modelValue":Se=>y.state[k].includeUpperBound=Se,label:"Include upper bound"},null,8,["modelValue","onUpdate:modelValue"])],64)):r.createCommentVNode("",!0),((xr=y.state[k])==null?void 0:xr.type)==="string_equals"||((jn=y.state[k])==null?void 0:jn.type)==="string_notEquals"||((Jr=y.state[k])==null?void 0:Jr.type)==="string_contains"||((Os=y.state[k])==null?void 0:Os.type)==="string_doesNotContain"?(r.openBlock(),r.createBlock(r.unref(Ur),{key:3,modelValue:y.state[k].reference,"onUpdate:modelValue":Se=>y.state[k].reference=Se,parse:Se=>te(w,Se),label:"Reference value"},null,8,["modelValue","onUpdate:modelValue","parse"])):r.createCommentVNode("",!0),((kr=y.state[k])==null?void 0:kr.type)==="string_matches"||((Sr=y.state[k])==null?void 0:Sr.type)==="string_doesNotMatch"?(r.openBlock(),r.createBlock(r.unref(Ur),{key:4,modelValue:y.state[k].reference,"onUpdate:modelValue":Se=>y.state[k].reference=Se,parse:j,label:"Reference value"},null,8,["modelValue","onUpdate:modelValue"])):r.createCommentVNode("",!0),((Ls=y.state[k])==null?void 0:Ls.type)==="string_containsFuzzyMatch"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:5},[r.createVNode(r.unref(Ur),{modelValue:y.state[k].reference,"onUpdate:modelValue":Se=>y.state[k].reference=Se,parse:Se=>te(w,Se),label:"Reference value"},null,8,["modelValue","onUpdate:modelValue","parse"]),r.createVNode(r.unref(hp),{modelValue:y.state[k].maxEdits,"onUpdate:modelValue":Se=>y.state[k].maxEdits=Se,max:5,breakpoints:"",label:"Maximum nuber of substitutions and indels"},null,8,["modelValue","onUpdate:modelValue"]),r.createVNode(r.unref(xs),{modelValue:y.state[k].substitutionsOnly,"onUpdate:modelValue":Se=>y.state[k].substitutionsOnly=Se,label:"Substitutions only"},null,8,["modelValue","onUpdate:modelValue"]),r.createVNode(r.unref(yi),{modelValue:y.state[k].wildcard,"onUpdate:modelValue":Se=>y.state[k].wildcard=Se,options:Y(w,y.state[k].reference),clearable:"",label:"Wildcard symbol"},null,8,["modelValue","onUpdate:modelValue","options"])],64)):r.createCommentVNode("",!0)],2)])):r.createCommentVNode("",!0)])}),128)),L.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",rB,"No filters applicable"))],64))}}),[["__scopeId","data-v-6cb52299"]]),iB={key:1,class:"alert-error"},sB={key:2},aB=r.defineComponent({__name:"ValueOrErrorsComponent",props:{valueOrError:{}},setup(t){const e=t,n=r.computed(()=>e.valueOrError&&e.valueOrError.ok?e.valueOrError.value:void 0),o=r.computed(()=>e.valueOrError&&!e.valueOrError.ok?e.valueOrError.errors:void 0),s=r.computed(()=>n.value===void 0&&o.value===void 0);return(l,c)=>(r.openBlock(),r.createElementBlock("div",null,[n.value!==void 0?r.renderSlot(l.$slots,"default",r.normalizeProps(r.mergeProps({key:0},{value:n.value}))):r.createCommentVNode("",!0),o.value?(r.openBlock(),r.createElementBlock("div",iB,r.toDisplayString(o.value),1)):r.createCommentVNode("",!0),s.value?(r.openBlock(),r.createElementBlock("div",sB,"Unresolved")):r.createCommentVNode("",!0)]))}}),lB={style:{height:"100%"}},cB=r.defineComponent({__name:"PlAgCellFile",props:{params:{}},setup(t){const e=t,n=r.computed(()=>e.params.extensions),o=r.computed(()=>e.params.value);function s(c){e.params.setValue(c)}const l=r.computed(()=>e.params.resolveProgress?e.params.resolveProgress(o.value):void 0);return(c,u)=>(r.openBlock(),r.createElementBlock("div",lB,[r.createVNode(r.unref(up),{"show-filename-only":"",clearable:"","cell-style":"","file-dialog-title":"Select any file",placeholder:`Choose file ${n.value?n.value[0]:""}`,extensions:n.value,"model-value":o.value,progress:l.value,"onUpdate:modelValue":s},null,8,["placeholder","extensions","model-value","progress"])]))}}),dB={class:"pl-ag-grid-open-cell d-flex"},uB={class:"pl-ag-grid-open-cell__value"},pB=r.defineComponent({__name:"PlAgTextAndButtonCell",props:{params:{}},setup(t){const e=t;function n(){if(e.params.invokeRowsOnDoubleClick){const o=e.params.api,s={rowPinned:e.params.node.rowPinned,api:o,rowIndex:e.params.node.rowIndex,context:o,type:"rowDoubleClicked",node:e.params.node,data:e.params.data,event:null};o.dispatchEvent(s)}else e.params.onClick&&e.params.onClick(e.params)}return(o,s)=>(r.openBlock(),r.createElementBlock("div",dB,[r.createElementVNode("div",uB,r.toDisplayString(o.params.value),1),r.createElementVNode("div",{class:"pl-ag-grid-open-cell__activator text-caps11 align-center",onClick:r.withModifiers(n,["stop"])},[r.createVNode(r.unref(Un),{name:o.params.icon??"maximize"},null,8,["name"]),r.createTextVNode(" "+r.toDisplayString(o.params.btnLabel??"Open"),1)])]))}}),Rs=new Map;function hB(t,e){const n=r.getCurrentScope()??r.effectScope(),o=n.run(()=>(r.onScopeDispose(()=>{Rs.delete(t)}),r.reactive(e())));return o[Symbol.dispose]=()=>{n.stop()},o}function fB(t){const e=Symbol();return()=>(Rs.has(e)||Rs.set(e,hB(e,t)),Rs.get(e))}function mB(t){return r.computed(()=>{try{return Cd(t())}catch(e){return{errors:[String(e)],value:void 0}}})}function Ep(t,e,n){const o=r.ref(0),s=r.reactive({loading:r.computed(()=>o.value>0),loadingRef:o,value:void 0,error:void 0}),l=Em(e);return r.watch(t,async c=>{s.error=void 0,o.value++,l(c).then(u=>{u.ok&&(s.value=u.value)}).catch(u=>{s.value=void 0,s.error=u}).finally(()=>{o.value--})},Object.assign({immediate:!0,deep:!0},n??{})),s}const Eo=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Tp=new Set,Rl=typeof process=="object"&&process?process:{},Bp=(t,e,n,o)=>{typeof Rl.emitWarning=="function"?Rl.emitWarning(t,e,n,o):console.error(`[${n}] ${e}: ${t}`)};let Ms=globalThis.AbortController,Vp=globalThis.AbortSignal;if(typeof Ms>"u"){Vp=class{constructor(){Ze(this,"onabort");Ze(this,"_onabort",[]);Ze(this,"reason");Ze(this,"aborted",!1)}addEventListener(o,s){this._onabort.push(s)}},Ms=class{constructor(){Ze(this,"signal",new Vp);e()}abort(o){var s,l;if(!this.signal.aborted){this.signal.reason=o,this.signal.aborted=!0;for(const c of this.signal._onabort)c(o);(l=(s=this.signal).onabort)==null||l.call(s,o)}}};let t=((Ap=Rl.env)==null?void 0:Ap.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,Bp("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const gB=t=>!Tp.has(t),wr=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Np=t=>wr(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Is:null:null;class Is extends Array{constructor(e){super(e),this.fill(0)}}const jr=class jr{constructor(e,n){Ze(this,"heap");Ze(this,"length");if(!b(jr,To))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(e),this.length=0}static create(e){const n=Np(e);if(!n)return[];me(jr,To,!0);const o=new jr(e,n);return me(jr,To,!1),o}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};To=new WeakMap,ze(jr,To,!1);let Ml=jr;const Ll=class Ll{constructor(e){ze(this,re);ze(this,hn);ze(this,zt);ze(this,fn);ze(this,mn);ze(this,Bo);ze(this,Vo);Ze(this,"ttl");Ze(this,"ttlResolution");Ze(this,"ttlAutopurge");Ze(this,"updateAgeOnGet");Ze(this,"updateAgeOnHas");Ze(this,"allowStale");Ze(this,"noDisposeOnSet");Ze(this,"noUpdateTTL");Ze(this,"maxEntrySize");Ze(this,"sizeCalculation");Ze(this,"noDeleteOnFetchRejection");Ze(this,"noDeleteOnStaleGet");Ze(this,"allowStaleOnFetchAbort");Ze(this,"allowStaleOnFetchRejection");Ze(this,"ignoreFetchAbort");ze(this,dt);ze(this,gn);ze(this,lt);ze(this,Ke);ze(this,xe);ze(this,Bt);ze(this,$t);ze(this,xt);ze(this,ft);ze(this,yn);ze(this,mt);ze(this,_n);ze(this,vn);ze(this,Ut);ze(this,Cn);ze(this,br);ze(this,Vt);ze(this,qr,()=>{});ze(this,Hn,()=>{});ze(this,Mi,()=>{});ze(this,Zt,()=>!1);ze(this,Kr,e=>{});ze(this,No,(e,n,o)=>{});ze(this,Ii,(e,n,o,s)=>{if(o||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Ze(this,Pp,"LRUCache");const{max:n=0,ttl:o,ttlResolution:s=1,ttlAutopurge:l,updateAgeOnGet:c,updateAgeOnHas:u,allowStale:p,dispose:f,disposeAfter:m,noDisposeOnSet:y,noUpdateTTL:T,maxSize:B=0,maxEntrySize:A=0,sizeCalculation:I,fetchMethod:L,memoMethod:C,noDeleteOnFetchRejection:R,noDeleteOnStaleGet:O,allowStaleOnFetchRejection:F,allowStaleOnFetchAbort:N,ignoreFetchAbort:U}=e;if(n!==0&&!wr(n))throw new TypeError("max option must be a nonnegative integer");const te=n?Np(n):Array;if(!te)throw new Error("invalid max value: "+n);if(me(this,hn,n),me(this,zt,B),this.maxEntrySize=A||b(this,zt),this.sizeCalculation=I,this.sizeCalculation){if(!b(this,zt)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(C!==void 0&&typeof C!="function")throw new TypeError("memoMethod must be a function if defined");if(me(this,Vo,C),L!==void 0&&typeof L!="function")throw new TypeError("fetchMethod must be a function if specified");if(me(this,Bo,L),me(this,br,!!L),me(this,lt,new Map),me(this,Ke,new Array(n).fill(void 0)),me(this,xe,new Array(n).fill(void 0)),me(this,Bt,new te(n)),me(this,$t,new te(n)),me(this,xt,0),me(this,ft,0),me(this,yn,Ml.create(n)),me(this,dt,0),me(this,gn,0),typeof f=="function"&&me(this,fn,f),typeof m=="function"?(me(this,mn,m),me(this,mt,[])):(me(this,mn,void 0),me(this,mt,void 0)),me(this,Cn,!!b(this,fn)),me(this,Vt,!!b(this,mn)),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!T,this.noDeleteOnFetchRejection=!!R,this.allowStaleOnFetchRejection=!!F,this.allowStaleOnFetchAbort=!!N,this.ignoreFetchAbort=!!U,this.maxEntrySize!==0){if(b(this,zt)!==0&&!wr(b(this,zt)))throw new TypeError("maxSize must be a positive integer if specified");if(!wr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");de(this,re,fm).call(this)}if(this.allowStale=!!p,this.noDeleteOnStaleGet=!!O,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!u,this.ttlResolution=wr(s)||s===0?s:1,this.ttlAutopurge=!!l,this.ttl=o||0,this.ttl){if(!wr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");de(this,re,ld).call(this)}if(b(this,hn)===0&&this.ttl===0&&b(this,zt)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!b(this,hn)&&!b(this,zt)){const j="LRU_CACHE_UNBOUNDED";gB(j)&&(Tp.add(j),Bp("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",j,Ll))}}static unsafeExposeInternals(e){return{starts:b(e,vn),ttls:b(e,Ut),sizes:b(e,_n),keyMap:b(e,lt),keyList:b(e,Ke),valList:b(e,xe),next:b(e,Bt),prev:b(e,$t),get head(){return b(e,xt)},get tail(){return b(e,ft)},free:b(e,yn),isBackgroundFetch:n=>{var o;return de(o=e,re,Je).call(o,n)},backgroundFetch:(n,o,s,l)=>{var c;return de(c=e,re,Aa).call(c,n,o,s,l)},moveToTail:n=>{var o;return de(o=e,re,os).call(o,n)},indexes:n=>{var o;return de(o=e,re,Rr).call(o,n)},rindexes:n=>{var o;return de(o=e,re,Mr).call(o,n)},isStale:n=>{var o;return b(o=e,Zt).call(o,n)}}}get max(){return b(this,hn)}get maxSize(){return b(this,zt)}get calculatedSize(){return b(this,gn)}get size(){return b(this,dt)}get fetchMethod(){return b(this,Bo)}get memoMethod(){return b(this,Vo)}get dispose(){return b(this,fn)}get disposeAfter(){return b(this,mn)}getRemainingTTL(e){return b(this,lt).has(e)?1/0:0}*entries(){for(const e of de(this,re,Rr).call(this))b(this,xe)[e]!==void 0&&b(this,Ke)[e]!==void 0&&!de(this,re,Je).call(this,b(this,xe)[e])&&(yield[b(this,Ke)[e],b(this,xe)[e]])}*rentries(){for(const e of de(this,re,Mr).call(this))b(this,xe)[e]!==void 0&&b(this,Ke)[e]!==void 0&&!de(this,re,Je).call(this,b(this,xe)[e])&&(yield[b(this,Ke)[e],b(this,xe)[e]])}*keys(){for(const e of de(this,re,Rr).call(this)){const n=b(this,Ke)[e];n!==void 0&&!de(this,re,Je).call(this,b(this,xe)[e])&&(yield n)}}*rkeys(){for(const e of de(this,re,Mr).call(this)){const n=b(this,Ke)[e];n!==void 0&&!de(this,re,Je).call(this,b(this,xe)[e])&&(yield n)}}*values(){for(const e of de(this,re,Rr).call(this))b(this,xe)[e]!==void 0&&!de(this,re,Je).call(this,b(this,xe)[e])&&(yield b(this,xe)[e])}*rvalues(){for(const e of de(this,re,Mr).call(this))b(this,xe)[e]!==void 0&&!de(this,re,Je).call(this,b(this,xe)[e])&&(yield b(this,xe)[e])}[(Dp=Symbol.iterator,Pp=Symbol.toStringTag,Dp)](){return this.entries()}find(e,n={}){for(const o of de(this,re,Rr).call(this)){const s=b(this,xe)[o],l=de(this,re,Je).call(this,s)?s.__staleWhileFetching:s;if(l!==void 0&&e(l,b(this,Ke)[o],this))return this.get(b(this,Ke)[o],n)}}forEach(e,n=this){for(const o of de(this,re,Rr).call(this)){const s=b(this,xe)[o],l=de(this,re,Je).call(this,s)?s.__staleWhileFetching:s;l!==void 0&&e.call(n,l,b(this,Ke)[o],this)}}rforEach(e,n=this){for(const o of de(this,re,Mr).call(this)){const s=b(this,xe)[o],l=de(this,re,Je).call(this,s)?s.__staleWhileFetching:s;l!==void 0&&e.call(n,l,b(this,Ke)[o],this)}}purgeStale(){let e=!1;for(const n of de(this,re,Mr).call(this,{allowStale:!0}))b(this,Zt).call(this,n)&&(de(this,re,Ir).call(this,b(this,Ke)[n],"expire"),e=!0);return e}info(e){const n=b(this,lt).get(e);if(n===void 0)return;const o=b(this,xe)[n],s=de(this,re,Je).call(this,o)?o.__staleWhileFetching:o;if(s===void 0)return;const l={value:s};if(b(this,Ut)&&b(this,vn)){const c=b(this,Ut)[n],u=b(this,vn)[n];if(c&&u){const p=c-(Eo.now()-u);l.ttl=p,l.start=Date.now()}}return b(this,_n)&&(l.size=b(this,_n)[n]),l}dump(){const e=[];for(const n of de(this,re,Rr).call(this,{allowStale:!0})){const o=b(this,Ke)[n],s=b(this,xe)[n],l=de(this,re,Je).call(this,s)?s.__staleWhileFetching:s;if(l===void 0||o===void 0)continue;const c={value:l};if(b(this,Ut)&&b(this,vn)){c.ttl=b(this,Ut)[n];const u=Eo.now()-b(this,vn)[n];c.start=Math.floor(Date.now()-u)}b(this,_n)&&(c.size=b(this,_n)[n]),e.unshift([o,c])}return e}load(e){this.clear();for(const[n,o]of e){if(o.start){const s=Date.now()-o.start;o.start=Eo.now()-s}this.set(n,o.value,o)}}set(e,n,o={}){var T,B,A,I,L;if(n===void 0)return this.delete(e),this;const{ttl:s=this.ttl,start:l,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:p}=o;let{noUpdateTTL:f=this.noUpdateTTL}=o;const m=b(this,Ii).call(this,e,n,o.size||0,u);if(this.maxEntrySize&&m>this.maxEntrySize)return p&&(p.set="miss",p.maxEntrySizeExceeded=!0),de(this,re,Ir).call(this,e,"set"),this;let y=b(this,dt)===0?void 0:b(this,lt).get(e);if(y===void 0)y=b(this,dt)===0?b(this,ft):b(this,yn).length!==0?b(this,yn).pop():b(this,dt)===b(this,hn)?de(this,re,Na).call(this,!1):b(this,dt),b(this,Ke)[y]=e,b(this,xe)[y]=n,b(this,lt).set(e,y),b(this,Bt)[b(this,ft)]=y,b(this,$t)[y]=b(this,ft),me(this,ft,y),Va(this,dt)._++,b(this,No).call(this,y,m,p),p&&(p.set="add"),f=!1;else{de(this,re,os).call(this,y);const C=b(this,xe)[y];if(n!==C){if(b(this,br)&&de(this,re,Je).call(this,C)){C.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:R}=C;R!==void 0&&!c&&(b(this,Cn)&&((T=b(this,fn))==null||T.call(this,R,e,"set")),b(this,Vt)&&((B=b(this,mt))==null||B.push([R,e,"set"])))}else c||(b(this,Cn)&&((A=b(this,fn))==null||A.call(this,C,e,"set")),b(this,Vt)&&((I=b(this,mt))==null||I.push([C,e,"set"])));if(b(this,Kr).call(this,y),b(this,No).call(this,y,m,p),b(this,xe)[y]=n,p){p.set="replace";const R=C&&de(this,re,Je).call(this,C)?C.__staleWhileFetching:C;R!==void 0&&(p.oldValue=R)}}else p&&(p.set="update")}if(s!==0&&!b(this,Ut)&&de(this,re,ld).call(this),b(this,Ut)&&(f||b(this,Mi).call(this,y,s,l),p&&b(this,Hn).call(this,p,y)),!c&&b(this,Vt)&&b(this,mt)){const C=b(this,mt);let R;for(;R=C==null?void 0:C.shift();)(L=b(this,mn))==null||L.call(this,...R)}return this}pop(){var e;try{for(;b(this,dt);){const n=b(this,xe)[b(this,xt)];if(de(this,re,Na).call(this,!0),de(this,re,Je).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(b(this,Vt)&&b(this,mt)){const n=b(this,mt);let o;for(;o=n==null?void 0:n.shift();)(e=b(this,mn))==null||e.call(this,...o)}}}has(e,n={}){const{updateAgeOnHas:o=this.updateAgeOnHas,status:s}=n,l=b(this,lt).get(e);if(l!==void 0){const c=b(this,xe)[l];if(de(this,re,Je).call(this,c)&&c.__staleWhileFetching===void 0)return!1;if(b(this,Zt).call(this,l))s&&(s.has="stale",b(this,Hn).call(this,s,l));else return o&&b(this,qr).call(this,l),s&&(s.has="hit",b(this,Hn).call(this,s,l)),!0}else s&&(s.has="miss");return!1}peek(e,n={}){const{allowStale:o=this.allowStale}=n,s=b(this,lt).get(e);if(s===void 0||!o&&b(this,Zt).call(this,s))return;const l=b(this,xe)[s];return de(this,re,Je).call(this,l)?l.__staleWhileFetching:l}async fetch(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:p=0,sizeCalculation:f=this.sizeCalculation,noUpdateTTL:m=this.noUpdateTTL,noDeleteOnFetchRejection:y=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:T=this.allowStaleOnFetchRejection,ignoreFetchAbort:B=this.ignoreFetchAbort,allowStaleOnFetchAbort:A=this.allowStaleOnFetchAbort,context:I,forceRefresh:L=!1,status:C,signal:R}=n;if(!b(this,br))return C&&(C.fetch="get"),this.get(e,{allowStale:o,updateAgeOnGet:s,noDeleteOnStaleGet:l,status:C});const O={allowStale:o,updateAgeOnGet:s,noDeleteOnStaleGet:l,ttl:c,noDisposeOnSet:u,size:p,sizeCalculation:f,noUpdateTTL:m,noDeleteOnFetchRejection:y,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:A,ignoreFetchAbort:B,status:C,signal:R};let F=b(this,lt).get(e);if(F===void 0){C&&(C.fetch="miss");const N=de(this,re,Aa).call(this,e,F,O,I);return N.__returned=N}else{const N=b(this,xe)[F];if(de(this,re,Je).call(this,N)){const q=o&&N.__staleWhileFetching!==void 0;return C&&(C.fetch="inflight",q&&(C.returnedStale=!0)),q?N.__staleWhileFetching:N.__returned=N}const U=b(this,Zt).call(this,F);if(!L&&!U)return C&&(C.fetch="hit"),de(this,re,os).call(this,F),s&&b(this,qr).call(this,F),C&&b(this,Hn).call(this,C,F),N;const te=de(this,re,Aa).call(this,e,F,O,I),Y=te.__staleWhileFetching!==void 0&&o;return C&&(C.fetch=U?"stale":"refresh",Y&&U&&(C.returnedStale=!0)),Y?te.__staleWhileFetching:te.__returned=te}}async forceFetch(e,n={}){const o=await this.fetch(e,n);if(o===void 0)throw new Error("fetch() returned undefined");return o}memo(e,n={}){const o=b(this,Vo);if(!o)throw new Error("no memoMethod provided to constructor");const{context:s,forceRefresh:l,...c}=n,u=this.get(e,c);if(!l&&u!==void 0)return u;const p=o(e,u,{options:c,context:s});return this.set(e,p,c),p}get(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,status:c}=n,u=b(this,lt).get(e);if(u!==void 0){const p=b(this,xe)[u],f=de(this,re,Je).call(this,p);return c&&b(this,Hn).call(this,c,u),b(this,Zt).call(this,u)?(c&&(c.get="stale"),f?(c&&o&&p.__staleWhileFetching!==void 0&&(c.returnedStale=!0),o?p.__staleWhileFetching:void 0):(l||de(this,re,Ir).call(this,e,"expire"),c&&o&&(c.returnedStale=!0),o?p:void 0)):(c&&(c.get="hit"),f?p.__staleWhileFetching:(de(this,re,os).call(this,u),s&&b(this,qr).call(this,u),p))}else c&&(c.get="miss")}delete(e){return de(this,re,Ir).call(this,e,"delete")}clear(){return de(this,re,ud).call(this,"delete")}};hn=new WeakMap,zt=new WeakMap,fn=new WeakMap,mn=new WeakMap,Bo=new WeakMap,Vo=new WeakMap,dt=new WeakMap,gn=new WeakMap,lt=new WeakMap,Ke=new WeakMap,xe=new WeakMap,Bt=new WeakMap,$t=new WeakMap,xt=new WeakMap,ft=new WeakMap,yn=new WeakMap,mt=new WeakMap,_n=new WeakMap,vn=new WeakMap,Ut=new WeakMap,Cn=new WeakMap,br=new WeakMap,Vt=new WeakMap,re=new WeakSet,ld=function(){const e=new Is(b(this,hn)),n=new Is(b(this,hn));me(this,Ut,e),me(this,vn,n),me(this,Mi,(l,c,u=Eo.now())=>{if(n[l]=c!==0?u:0,e[l]=c,c!==0&&this.ttlAutopurge){const p=setTimeout(()=>{b(this,Zt).call(this,l)&&de(this,re,Ir).call(this,b(this,Ke)[l],"expire")},c+1);p.unref&&p.unref()}}),me(this,qr,l=>{n[l]=e[l]!==0?Eo.now():0}),me(this,Hn,(l,c)=>{if(e[c]){const u=e[c],p=n[c];if(!u||!p)return;l.ttl=u,l.start=p,l.now=o||s();const f=l.now-p;l.remainingTTL=u-f}});let o=0;const s=()=>{const l=Eo.now();if(this.ttlResolution>0){o=l;const c=setTimeout(()=>o=0,this.ttlResolution);c.unref&&c.unref()}return l};this.getRemainingTTL=l=>{const c=b(this,lt).get(l);if(c===void 0)return 0;const u=e[c],p=n[c];if(!u||!p)return 1/0;const f=(o||s())-p;return u-f},me(this,Zt,l=>{const c=n[l],u=e[l];return!!u&&!!c&&(o||s())-c>u})},qr=new WeakMap,Hn=new WeakMap,Mi=new WeakMap,Zt=new WeakMap,fm=function(){const e=new Is(b(this,hn));me(this,gn,0),me(this,_n,e),me(this,Kr,n=>{me(this,gn,b(this,gn)-e[n]),e[n]=0}),me(this,Ii,(n,o,s,l)=>{if(de(this,re,Je).call(this,o))return 0;if(!wr(s))if(l){if(typeof l!="function")throw new TypeError("sizeCalculation must be a function");if(s=l(o,n),!wr(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s}),me(this,No,(n,o,s)=>{if(e[n]=o,b(this,zt)){const l=b(this,zt)-e[n];for(;b(this,gn)>l;)de(this,re,Na).call(this,!0)}me(this,gn,b(this,gn)+e[n]),s&&(s.entrySize=o,s.totalCalculatedSize=b(this,gn))})},Kr=new WeakMap,No=new WeakMap,Ii=new WeakMap,Rr=function*({allowStale:e=this.allowStale}={}){if(b(this,dt))for(let n=b(this,ft);!(!de(this,re,cd).call(this,n)||((e||!b(this,Zt).call(this,n))&&(yield n),n===b(this,xt)));)n=b(this,$t)[n]},Mr=function*({allowStale:e=this.allowStale}={}){if(b(this,dt))for(let n=b(this,xt);!(!de(this,re,cd).call(this,n)||((e||!b(this,Zt).call(this,n))&&(yield n),n===b(this,ft)));)n=b(this,Bt)[n]},cd=function(e){return e!==void 0&&b(this,lt).get(b(this,Ke)[e])===e},Na=function(e){var l,c;const n=b(this,xt),o=b(this,Ke)[n],s=b(this,xe)[n];return b(this,br)&&de(this,re,Je).call(this,s)?s.__abortController.abort(new Error("evicted")):(b(this,Cn)||b(this,Vt))&&(b(this,Cn)&&((l=b(this,fn))==null||l.call(this,s,o,"evict")),b(this,Vt)&&((c=b(this,mt))==null||c.push([s,o,"evict"]))),b(this,Kr).call(this,n),e&&(b(this,Ke)[n]=void 0,b(this,xe)[n]=void 0,b(this,yn).push(n)),b(this,dt)===1?(me(this,xt,me(this,ft,0)),b(this,yn).length=0):me(this,xt,b(this,Bt)[n]),b(this,lt).delete(o),Va(this,dt)._--,n},Aa=function(e,n,o,s){const l=n===void 0?void 0:b(this,xe)[n];if(de(this,re,Je).call(this,l))return l;const c=new Ms,{signal:u}=o;u==null||u.addEventListener("abort",()=>c.abort(u.reason),{signal:c.signal});const p={signal:c.signal,options:o,context:s},f=(I,L=!1)=>{const{aborted:C}=c.signal,R=o.ignoreFetchAbort&&I!==void 0;if(o.status&&(C&&!L?(o.status.fetchAborted=!0,o.status.fetchError=c.signal.reason,R&&(o.status.fetchAbortIgnored=!0)):o.status.fetchResolved=!0),C&&!R&&!L)return y(c.signal.reason);const O=B;return b(this,xe)[n]===B&&(I===void 0?O.__staleWhileFetching?b(this,xe)[n]=O.__staleWhileFetching:de(this,re,Ir).call(this,e,"fetch"):(o.status&&(o.status.fetchUpdated=!0),this.set(e,I,p.options))),I},m=I=>(o.status&&(o.status.fetchRejected=!0,o.status.fetchError=I),y(I)),y=I=>{const{aborted:L}=c.signal,C=L&&o.allowStaleOnFetchAbort,R=C||o.allowStaleOnFetchRejection,O=R||o.noDeleteOnFetchRejection,F=B;if(b(this,xe)[n]===B&&(!O||F.__staleWhileFetching===void 0?de(this,re,Ir).call(this,e,"fetch"):C||(b(this,xe)[n]=F.__staleWhileFetching)),R)return o.status&&F.__staleWhileFetching!==void 0&&(o.status.returnedStale=!0),F.__staleWhileFetching;if(F.__returned===F)throw I},T=(I,L)=>{var R;const C=(R=b(this,Bo))==null?void 0:R.call(this,e,l,p);C&&C instanceof Promise&&C.then(O=>I(O===void 0?void 0:O),L),c.signal.addEventListener("abort",()=>{(!o.ignoreFetchAbort||o.allowStaleOnFetchAbort)&&(I(void 0),o.allowStaleOnFetchAbort&&(I=O=>f(O,!0)))})};o.status&&(o.status.fetchDispatched=!0);const B=new Promise(T).then(f,m),A=Object.assign(B,{__abortController:c,__staleWhileFetching:l,__returned:void 0});return n===void 0?(this.set(e,A,{...p.options,status:void 0}),n=b(this,lt).get(e)):b(this,xe)[n]=A,A},Je=function(e){if(!b(this,br))return!1;const n=e;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof Ms},dd=function(e,n){b(this,$t)[n]=e,b(this,Bt)[e]=n},os=function(e){e!==b(this,ft)&&(e===b(this,xt)?me(this,xt,b(this,Bt)[e]):de(this,re,dd).call(this,b(this,$t)[e],b(this,Bt)[e]),de(this,re,dd).call(this,b(this,ft),e),me(this,ft,e))},Ir=function(e,n){var s,l,c,u;let o=!1;if(b(this,dt)!==0){const p=b(this,lt).get(e);if(p!==void 0)if(o=!0,b(this,dt)===1)de(this,re,ud).call(this,n);else{b(this,Kr).call(this,p);const f=b(this,xe)[p];if(de(this,re,Je).call(this,f)?f.__abortController.abort(new Error("deleted")):(b(this,Cn)||b(this,Vt))&&(b(this,Cn)&&((s=b(this,fn))==null||s.call(this,f,e,n)),b(this,Vt)&&((l=b(this,mt))==null||l.push([f,e,n]))),b(this,lt).delete(e),b(this,Ke)[p]=void 0,b(this,xe)[p]=void 0,p===b(this,ft))me(this,ft,b(this,$t)[p]);else if(p===b(this,xt))me(this,xt,b(this,Bt)[p]);else{const m=b(this,$t)[p];b(this,Bt)[m]=b(this,Bt)[p];const y=b(this,Bt)[p];b(this,$t)[y]=b(this,$t)[p]}Va(this,dt)._--,b(this,yn).push(p)}}if(b(this,Vt)&&((c=b(this,mt))!=null&&c.length)){const p=b(this,mt);let f;for(;f=p==null?void 0:p.shift();)(u=b(this,mn))==null||u.call(this,...f)}return o},ud=function(e){var n,o,s;for(const l of de(this,re,Mr).call(this,{allowStale:!0})){const c=b(this,xe)[l];if(de(this,re,Je).call(this,c))c.__abortController.abort(new Error("deleted"));else{const u=b(this,Ke)[l];b(this,Cn)&&((n=b(this,fn))==null||n.call(this,c,u,e)),b(this,Vt)&&((o=b(this,mt))==null||o.push([c,u,e]))}}if(b(this,lt).clear(),b(this,xe).fill(void 0),b(this,Ke).fill(void 0),b(this,Ut)&&b(this,vn)&&(b(this,Ut).fill(0),b(this,vn).fill(0)),b(this,_n)&&b(this,_n).fill(0),me(this,xt,0),me(this,ft,0),b(this,yn).length=0,me(this,gn,0),me(this,dt,0),b(this,Vt)&&b(this,mt)){const l=b(this,mt);let c;for(;c=l==null?void 0:l.shift();)(s=b(this,mn))==null||s.call(this,...c)}};let Il=Ll;const yB={cacheSize:15e6};class _B{constructor(e){Ze(this,"_str");Ze(this,"_rawJson");Ze(this,"_zodSchema");Ze(this,"_validatedJson");this.bytes=e}get str(){return this._str===void 0&&(this._str=new TextDecoder().decode(this.bytes)),this._str}get rawJson(){return this._rawJson===void 0&&(this._rawJson=JSON.parse(this.str)),this._rawJson}validatedJson(e){return this._zodSchema!==e&&(this._validatedJson=e.parse(this.rawJson),this._zodSchema=e),this._validatedJson}}const Yr=class Yr{constructor(e){Ze(this,"fileDataCache");Ze(this,"fileDataRefs",new Map);const n={...yB,...e??{}};this.fileDataCache=new Il({maxSize:n.cacheSize,fetchMethod:async o=>new _B(await $g().blobDriver.getContent(o)),sizeCalculation:o=>o.bytes.length,dispose:(o,s)=>{this.fileDataRefs.delete(s)}})}getDataRef(e){const n=this.fileDataRefs.get(e);if(n!==void 0)return n;const o=r.shallowRef();return this.fileDataRefs.set(e,o),(async()=>{try{const s=await this.fileDataCache.fetch(e);o.value=s}catch(s){console.error(s)}})(),o}getContentBytes(e){if(e===void 0)return;const n=this.getDataRef(e);return r.computed(()=>{var o;return(o=n.value)==null?void 0:o.bytes})}getContentString(e){if(e===void 0)return;const n=this.getDataRef(e);return r.computed(()=>{var o;return(o=n==null?void 0:n.value)==null?void 0:o.str})}getContentJson(e,n){if(e===void 0)return;const o=this.getDataRef(e);return r.computed(()=>{var s,l;return n===void 0?(s=o==null?void 0:o.value)==null?void 0:s.rawJson:(l=o==null?void 0:o.value)==null?void 0:l.validatedJson(n)})}static getContentBytes(e){return Yr.globalInstance.getContentBytes(e)}static getContentString(e){return Yr.globalInstance.getContentString(e)}static getContentJson(e,n){return Yr.globalInstance.getContentJson(e,n)}};Ze(Yr,"globalInstance",new Yr);let Ol=Yr;M.AgGridTheme=iu,M.BlockLayout=PT,M.ContextProvider=yS,M.DataTable=iC,M.DemoData=yT,M.DropdownListItem=yo,M.LongText=kl,M.MultiError=Fa,M.PlAccordion=xx,M.PlAccordionSection=Px,M.PlAgCellFile=cB,M.PlAgDataTable=tB,M.PlAgDataTableToolsPanel=XT,M.PlAgGridColumnManager=Sp,M.PlAgOverlayLoading=yp,M.PlAgOverlayNoRows=_p,M.PlAgTextAndButtonCell=pB,M.PlAlert=MC,M.PlBlockPage=bC,M.PlBtnAccent=e0,M.PlBtnDanger=n0,M.PlBtnGhost=Cs,M.PlBtnGroup=Nu,M.PlBtnLink=s0,M.PlBtnPrimary=gl,M.PlBtnSecondary=yl,M.PlBtnSplit=KC,M.PlCheckbox=zu,M.PlCheckboxGroup=Mb,M.PlChip=Sl,M.PlContainer=kC,M.PlDialogModal=Tl,M.PlDropdown=yi,M.PlDropdownLegacy=ob,M.PlDropdownLine=Gu,M.PlDropdownMulti=Ab,M.PlDropdownRef=Dw,M.PlEditableTitle=N0,M.PlFileDialog=Ku,M.PlFileInput=up,M.PlGrid=NC,M.PlIcon16=vo,M.PlIcon24=bs,M.PlLogView=Zu,M.PlMaskIcon16=Un,M.PlMaskIcon24=cn,M.PlNotificationAlert=pp,M.PlNumberField=gb,M.PlProgressBar=cb,M.PlRow=EC,M.PlSearchField=Mu,M.PlSectionSeparator=Wu,M.PlSlideModal=$u,M.PlSpacer=Bu,M.PlTableFilters=oB,M.PlTabs=yx,M.PlTextArea=hw,M.PlTextField=Ur,M.PlToggleSwitch=xs,M.PlTooltip=Ct,M.ReactiveFileContent=Ol,M.Scrollable=s1,M.Slider=hp,M.SliderRange=n1,M.SliderRangeTriple=ZS,M.ThemeSwitcher=mC,M.UnresolvedError=Da,M.ValueOrErrorsComponent=aB,M.activateAgGrid=ou,M.animate=bu,M.animateInfinite=dC,M.call=yu,M.computedResult=mB,M.createModel=Ga,M.debounce=xu,M.defineApp=F_,M.defineStore=fB,M.delay=_u,M.detectOutside=fw,M.ensureError=Ia,M.eventListener=bl,M.formatZodError=La,M.getElementScrollPosition=Ou,M.identity=Ma,M.isDefined=Am,M.isElementVisible=Iu,M.isJsonEqual=Ra,M.isZodError=Oa,M.listToOptions=uC,M.makeEaseInOut=cC,M.makeEaseOut=wu,M.maskIcons16=mT,M.maskIcons24=gT,M.normalizeListOptions=pr,M.notEmpty=ul,M.randomInt=Cu,M.randomString=lC,M.requestTick=pl,M.scrollIntoView=gi,M.showContextMenu=ll,M.throttle=ku,M.timeout=vu,M.unwrapOptionalResult=Nm,M.unwrapValueOrErrors=vd,M.useClickOutside=ws,M.useDraggable=DS,M.useEventListener=rt,M.useFormState=AS,M.useHover=mu,M.useInterval=NS,M.useLabelNotch=Zn,M.useLocalStorage=Su,M.useMouse=fu,M.useMouseCapture=ur,M.usePosition=_o,M.useQuery=PS,M.useResizeObserver=fp,M.useScroll=BS,M.useSdkPlugin=rl,M.useSortable=gp,M.useTheme=Tu,M.useWatchFetch=Ep,M.wrapOptionalResult=Cd,M.wrapValueOrErrors=Vm,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})});
|