@platforma-sdk/ui-vue 1.14.2 → 1.14.8
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 +15 -0
- package/dist/lib.js +4030 -3996
- package/dist/lib.umd.cjs +28 -28
- package/dist/src/components/PlTableFilters/PlTableFilterEntry.vue.d.ts +1 -0
- package/dist/src/components/PlTableFilters/PlTableFilterEntry.vue.d.ts.map +1 -1
- package/dist/src/components/PlTableFilters/PlTableFilters.vue.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/components/PlTableFilters/PlTableFilterEntry.vue +44 -11
- package/src/components/PlTableFilters/PlTableFilters.vue +50 -10
- package/src/components/PlTableFilters/pl-table-filters.scss +53 -3
package/dist/lib.umd.cjs
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
(function(L,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):(L=typeof globalThis<"u"?globalThis:L||self,r(L.SdkVueLib={},L.Vue,L.core$1,L.core,L.clientSideRowModel,L.infiniteRowModel,L.serverSideRowModel,L.csvExport,L.clipboard,L.rangeSelection,L.richSelect,L.menu,L.excelExport,L.theming,L.vue3))})(this,function(L,r,Me,T,hs,
|
|
1
|
+
(function(L,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):(L=typeof globalThis<"u"?globalThis:L||self,r(L.SdkVueLib={},L.Vue,L.core$1,L.core,L.clientSideRowModel,L.infiniteRowModel,L.serverSideRowModel,L.csvExport,L.clipboard,L.rangeSelection,L.richSelect,L.menu,L.excelExport,L.theming,L.vue3))})(this,function(L,r,Me,T,hs,Sg,Zd,Eg,Wd,jd,Tg,Ng,Ag,Hd,Vg){"use strict";var VM=Object.defineProperty;var bg=L=>{throw TypeError(L)};var BM=(L,r,Me)=>r in L?VM(L,r,{enumerable:!0,configurable:!0,writable:!0,value:Me}):L[r]=Me;var je=(L,r,Me)=>BM(L,typeof r!="symbol"?r+"":r,Me),Md=(L,r,Me)=>r.has(L)||bg("Cannot "+Me);var S=(L,r,Me)=>(Md(L,r,"read from private field"),Me?Me.call(L):r.get(L)),Ue=(L,r,Me)=>r.has(L)?bg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(L):r.set(L,Me),ye=(L,r,Me,T)=>(Md(L,r,"write to private field"),T?T.call(L,Me):r.set(L,Me),Me),pe=(L,r,Me)=>(Md(L,r,"access private method"),Me);var Wa=(L,r,Me,T)=>({set _(hs){ye(L,r,hs,Me)},get _(){return S(L,r,T)}});var $h,Bo,zh,Uh,Cn,jt,wn,bn,Po,Ro,pt,xn,dt,Je,Ee,Pt,Ht,Et,yt,kn,vt,Sn,En,qt,Tn,Tr,Rt,oe,Gd,Xr,Jn,zi,Kt,kg,Yr,Do,Ui,Or,Lr,$d,ja,Ha,et,zd,ps,Mr,Ud;function Bg(t,e){if(t==null)throw Error(e??"Empty (null | undefined) value");return t}function Pg(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function Rg(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(Pg(65,91));return e}function Dg(){return Rg(42)}const qd=Array.isArray;function Ig(t){return t!==null&&typeof t=="object"}function Kd(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 Dn(t){if(Array.isArray(t)){const e=[];for(let n=0;n<t.length;n++)e[n]=Dn(t[n]);return e}else if(Ig(t)){const e={};return Object.keys(t).forEach(n=>{e[n]=Dn(t[n])}),e}else return t}function Xd(t,e){return new Set([...Object.keys(t),...Object.keys(e)]).forEach(n=>{const o=t[n],i=e[n];Kd(o)&&Kd(i)||qd(o)&&qd(i)&&o.length===i.length?Xd(o,i):t[n]=i}),t}function qa(t,e,n=!0){let o=0,i;return function(...l){i=()=>{t.apply(this,l),o=new Date().getTime()+e,i=null,n&&setTimeout(()=>{i&&i()},e)},new Date().getTime()>o&&i()}}function Fg(t){let e=0n,n;return async function(...o){const i=++e;try{await n}catch{}if(e!==i)return{ok:!1};const l=t(...o);return n=l,{ok:!0,value:await l}}}var Xo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yd(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Og=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((i,l,c)=>`${i}${c===0?"":","}${t(l===void 0||typeof l=="symbol"?null:l)}`,"")}]`:`{${Object.keys(e).sort().reduce((o,i)=>{if(e[i]===void 0||typeof e[i]=="symbol")return o;const l=o.length===0?"":",";return`${o}${l}${t(i)}:${t(e[i])}`},"")}}`};const Gr=Yd(Og);class Ka extends Error{}class Xa extends Error{constructor(e){super(e.join(`
|
|
2
2
|
`)),this.errors=e}toString(){return this.errors.join(`
|
|
3
|
-
`)}}function Og(t){return{ok:!0,value:t}}function Jd(t){if(!t)throw new Ka;if(!t.ok)throw Error(t.errors.join(";"));return t.value}function Qd(t){return{value:t,errors:void 0}}function Lg(t){if(t.errors)throw new Xa(t.errors);if(!t.value)throw new Ka;return t.value}function Mg(t){return t!==void 0}function Ya(t,e){return Gr(t)===Gr(e)}const Ja=t=>t,Qa=t=>t instanceof Error?t:Error(String(t)),el=t=>t.name==="ZodError",tl=t=>{const{formErrors:e,fieldErrors:n}=t.flatten(),o=Object.entries(n).map(([i,l])=>i+":"+(l==null?void 0:l.join(",")));return e.concat(o).join("; ")};function nl(t){const e=t.validate??Ja,{autoSave:n}=t,o=r.ref(),i=r.ref(),l=S=>{i.value={model:Dn(S)}};r.watch(()=>t.get(),S=>l(S),{immediate:!0});const c=()=>{var S;t.onSave(e(Dn((S=i.value)==null?void 0:S.model)))},d=()=>{l(t.get()),o.value=void 0},p=S=>{const O=Qa(S);el(O)?o.value=Error(tl(O)):o.value=O},h=S=>{o.value=void 0;try{e(S),n&&c()}catch(O){p(O)}},m=r.computed({get:()=>{var S;return(S=i.value)==null?void 0:S.model},set(S){l(S),h(S)}});r.watch(i,(S,O)=>{S&&S===O&&h(S.model)},{deep:!0});const y=r.computed(()=>!o.value),x=r.computed(()=>!Ya(t.get(),r.unref(i))),w=r.computed(()=>o.value?o.value.message:"");return r.reactive({model:m,valid:y,isChanged:x,error:o,errorString:w,save:c,revert:d,setError:p})}function Gg(t,e,n){const o=t.validate??Ja,{autoSave:i}=t,l=r.ref(),c=r.ref(),d=G=>{var b;if(n.deepPatchModel){const R=(b=c.value)==null?void 0:b.model,F=Object.assign(Dn(G),e??{});c.value={model:R?Xd(R,F):F,stage:Symbol()}}else c.value={model:Object.assign(Dn(G),e??{}),stage:Symbol()}};r.watch(()=>t.get(),G=>d(G),{immediate:!0});const p=()=>{var G;t.onSave(o(Dn((G=c.value)==null?void 0:G.model)))},h=()=>{d(t.get()),l.value=void 0},m=G=>{const b=Qa(G);el(b)?l.value=Error(tl(b)):l.value=b},y=G=>{l.value=void 0;try{o(G),i&&p()}catch(b){m(b)}},x=r.computed({get:()=>{var G;return(G=c.value)==null?void 0:G.model},set(){throw Error("Cannot replace base model")}});r.watch([()=>({args:x.value.args,ui:x.value.ui}),()=>{var G;return(G=c.value)==null?void 0:G.stage}],([G,b],[R,F])=>{b===F&&y(G)},{deep:!0});const w=r.computed(()=>!l.value),S=r.computed(()=>{var R;const{args:G,ui:b}=((R=r.unref(c))==null?void 0:R.model)??{};return!Ya(t.get(),{args:G,ui:b})}),O=r.computed(()=>l.value?l.value.message:"");return r.reactive({model:x,valid:w,isChanged:S,error:l,errorString:O,save:p,revert:h,setError:m})}const $g=t=>Object.fromEntries(new URL(t,"http://dummy").searchParams);function zg(t,e,n){const o=(b,...R)=>{n.debug&&console.log(`%c>>> %c${b}`,"color: orange; font-weight: bold","color: orange",...R)},l=qa(e.setBlockArgs,100),c=qa(e.setBlockUiState,100),d=qa(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 b=>{b.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 h=()=>Dn(p.args),m=()=>Dn(p.ui),y=()=>Dn(p.navigationState),x={createArgsModel(b={}){return nl({get(){return b.transform?b.transform(p.args):p.args},validate:b.validate,autoSave:!0,onSave(R){l(R)}})},createUiModel(b={},R){return nl({get(){return b.transform?b.transform(p.ui):p.ui??R()},validate:b.validate,autoSave:!0,onSave(F){c(F)}})},useOutputs(...b){const R=r.reactive({errors:void 0,value:void 0});return r.watch(()=>p.outputs,()=>{try{Object.assign(R,{value:this.unwrapOutputs(...b),errors:void 0})}catch(F){Object.assign(R,{value:void 0,errors:[String(F)]})}},{immediate:!0,deep:!0}),R},unwrapOutputs(...b){const R=p.outputs,F=b.map(D=>[D,Jd(R[D])]);return Object.fromEntries(F)},getOutputField(b){return p.outputs[b]},getOutputFieldOkOptional(b){console.warn("use reactive app.outputValues.fieldName instead instead of getOutputFieldOkOptional(fieldName)");const R=this.getOutputField(b);if(R&&R.ok)return R.value},getOutputFieldErrorsOptional(b){console.warn("use reactive app.outputErrors.fieldName instead instead of getOutputFieldErrorsOptional(fieldName)");const R=this.getOutputField(b);if(R&&!R.ok)return R.errors},updateArgs(b){const R=h();return b(R),e.setBlockArgs(R)},updateUiState(b){const R=m();return e.setBlockUiState(b(R))},updateNavigationState(b){const R=y();return b(R),e.setNavigationState(R)},navigateTo(b){const R=y();return R.href=b,e.setNavigationState(R)}},w=r.computed(()=>{const b=Object.entries(p.outputs).map(([R,F])=>[R,F.ok&&F.value!==void 0?F.value:void 0]);return Object.fromEntries(b)}),S=r.computed(()=>{const b=Object.entries(p.outputs).map(([R,F])=>[R,F&&!F.ok?new Xa(F.errors):void 0]);return Object.fromEntries(b)}),O={snapshot:p,queryParams:r.computed(()=>$g(p.navigationState.href)),href:r.computed(()=>p.navigationState.href),hasErrors:r.computed(()=>Object.values(p.outputs).some(b=>!(b!=null&&b.ok))),outputValues:r.computed(()=>(console.warn("Change app.outputValues to app.model.outputs"),w.value)),outputErrors:r.computed(()=>(console.warn("Change app.outputErrors to app.model.outputErrors"),S.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=Gg({get(){return{args:p.args,ui:p.ui}},autoSave:!0,onSave(b){d(b.args,b.ui)}},{outputs:w,outputErrors:S},n);return r.reactive(Object.assign(G,x,O))}var Ge;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const l={};for(const c of i)l[c]=c;return l},t.getValidEnumValues=i=>{const l=t.objectKeys(i).filter(d=>typeof i[i[d]]!="number"),c={};for(const d of l)c[d]=i[d];return t.objectValues(c)},t.objectValues=i=>t.objectKeys(i).map(function(l){return i[l]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const l=[];for(const c in i)Object.prototype.hasOwnProperty.call(i,c)&&l.push(c);return l},t.find=(i,l)=>{for(const c of i)if(l(c))return c},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function o(i,l=" | "){return i.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}t.joinValues=o,t.jsonStringifyReplacer=(i,l)=>typeof l=="bigint"?l.toString():l})(Ge||(Ge={}));var rl;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(rl||(rl={}));const ae=Ge.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),cr=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}},ee=Ge.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"]),Ug=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Ut 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:[]},i=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(i);else if(c.code==="invalid_return_type")i(c.returnTypeError);else if(c.code==="invalid_arguments")i(c.argumentsError);else if(c.path.length===0)o._errors.push(n(c));else{let d=o,p=0;for(;p<c.path.length;){const h=c.path[p];p===c.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(c))):d[h]=d[h]||{_errors:[]},d=d[h],p++}}};return i(this),o}static assert(e){if(!(e instanceof Ut))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ge.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},o=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):o.push(e(i));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}Ut.create=t=>new Ut(t);const lo=(t,e)=>{let n;switch(t.code){case ee.invalid_type:t.received===ae.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case ee.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Ge.jsonStringifyReplacer)}`;break;case ee.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ge.joinValues(t.keys,", ")}`;break;case ee.invalid_union:n="Invalid input";break;case ee.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ge.joinValues(t.options)}`;break;case ee.invalid_enum_value:n=`Invalid enum value. Expected ${Ge.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}"`:Ge.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,Ge.assertNever(t)}return{message:n}};let eu=lo;function Zg(t){eu=t}function fs(){return eu}const ms=t=>{const{data:e,path:n,errorMaps:o,issueData:i}=t,l=[...n,...i.path||[]],c={...i,path:l};if(i.message!==void 0)return{...i,path:l,message:i.message};let d="";const p=o.filter(h=>!!h).slice().reverse();for(const h of p)d=h(c,{data:e,defaultError:d}).message;return{...i,path:l,message:d}},jg=[];function ie(t,e){const n=fs(),o=ms({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===lo?void 0:lo].filter(i=>!!i)});t.common.issues.push(o)}class bt{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 i of n){if(i.status==="aborted")return be;i.status==="dirty"&&e.dirty(),o.push(i.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,n){const o=[];for(const i of n){const l=await i.key,c=await i.value;o.push({key:l,value:c})}return bt.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const i of n){const{key:l,value:c}=i;if(l.status==="aborted"||c.status==="aborted")return be;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||i.alwaysSet)&&(o[l.value]=c.value)}return{status:e.value,value:o}}}const be=Object.freeze({status:"aborted"}),co=t=>({status:"dirty",value:t}),At=t=>({status:"valid",value:t}),ol=t=>t.status==="aborted",il=t=>t.status==="dirty",Yo=t=>t.status==="valid",Jo=t=>typeof Promise<"u"&&t instanceof Promise;function gs(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 tu(t,e,n,o,i){if(typeof e=="function"?t!==e||!i:!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 fe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(fe||(fe={}));var Qo,ei;class In{constructor(e,n,o,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=o,this._key=i}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 nu=(t,e)=>{if(Yo(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 Ut(t.common.issues);return this._error=n,this._error}}};function Ae(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:i}=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:i}:{errorMap:(c,d)=>{var p,h;const{message:m}=t;return c.code==="invalid_enum_value"?{message:m??d.defaultError}:typeof d.data>"u"?{message:(p=m??o)!==null&&p!==void 0?p:d.defaultError}:c.code!=="invalid_type"?{message:d.defaultError}:{message:(h=m??n)!==null&&h!==void 0?h:d.defaultError}},description:i}}class Pe{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 cr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:cr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new bt,ctx:{common:e.parent.common,data:e.data,parsedType:cr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Jo(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 i={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:cr(e)},l=this._parseSync({data:e,path:i.path,parent:i});return nu(i,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:cr(e)},i=this._parse({data:e,path:o.path,parent:o}),l=await(Jo(i)?i:Promise.resolve(i));return nu(o,l)}refine(e,n){const o=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,l)=>{const c=e(i),d=()=>l.addIssue({code:ee.custom,...o(i)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(d(),!1)):c?!0:(d(),!1)})}refinement(e,n){return this._refinement((o,i)=>e(o)?!0:(i.addIssue(typeof n=="function"?n(o,i):n),!1))}_refinement(e){return new hn({schema:this,typeName:Ce.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return On.create(this,this._def)}nullable(){return hr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pn.create(this,this._def)}promise(){return fo.create(this,this._def)}or(e){return oi.create([this,e],this._def)}and(e){return ii.create(this,e,this._def)}transform(e){return new hn({...Ae(this._def),schema:this,typeName:Ce.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new di({...Ae(this._def),innerType:this,defaultValue:n,typeName:Ce.ZodDefault})}brand(){return new ll({typeName:Ce.ZodBranded,type:this,...Ae(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new ui({...Ae(this._def),innerType:this,catchValue:n,typeName:Ce.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return pi.create(this,e)}readonly(){return hi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Wg=/^c[^\s-]{8,}$/i,Hg=/^[0-9a-z]+$/,qg=/^[0-9A-HJKMNP-TV-Z]{26}$/,Kg=/^[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,Xg=/^[a-z0-9_-]{21}$/i,Yg=/^[-+]?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)?)??$/,Jg=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Qg="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let sl;const ey=/^(?:(?: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])$/,ty=/^(([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})))$/,ny=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ru="((\\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])))",ry=new RegExp(`^${ru}$`);function ou(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 oy(t){return new RegExp(`^${ou(t)}$`)}function iu(t){let e=`${ru}T${ou(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 iy(t,e){return!!((e==="v4"||!e)&&ey.test(t)||(e==="v6"||!e)&&ty.test(t))}class un extends Pe{_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:ee.invalid_type,expected:ae.string,received:l.parsedType}),be}const o=new bt;let i;for(const l of this._def.checks)if(l.kind==="min")e.data.length<l.value&&(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.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&&(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.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,d=e.data.length<l.value;(c||d)&&(i=this._getOrReturnCtx(e,i),c?ie(i,{code:ee.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):d&&ie(i,{code:ee.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),o.dirty())}else if(l.kind==="email")Jg.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"email",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="emoji")sl||(sl=new RegExp(Qg,"u")),sl.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"emoji",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="uuid")Kg.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"uuid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="nanoid")Xg.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"nanoid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="cuid")Wg.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"cuid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="cuid2")Hg.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"cuid2",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="ulid")qg.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"ulid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),ie(i,{validation:"url",code:ee.invalid_string,message:l.message}),o.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"regex",code:ee.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)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.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)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:{startsWith:l.value},message:l.message}),o.dirty()):l.kind==="endsWith"?e.data.endsWith(l.value)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:{endsWith:l.value},message:l.message}),o.dirty()):l.kind==="datetime"?iu(l).test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:"datetime",message:l.message}),o.dirty()):l.kind==="date"?ry.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:"date",message:l.message}),o.dirty()):l.kind==="time"?oy(l).test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:"time",message:l.message}),o.dirty()):l.kind==="duration"?Yg.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"duration",code:ee.invalid_string,message:l.message}),o.dirty()):l.kind==="ip"?iy(e.data,l.version)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"ip",code:ee.invalid_string,message:l.message}),o.dirty()):l.kind==="base64"?ny.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"base64",code:ee.invalid_string,message:l.message}),o.dirty()):Ge.assertNever(l);return{status:o.value,value:e.data}}_regex(e,n,o){return this.refinement(i=>e.test(i),{validation:n,code:ee.invalid_string,...fe.errToObj(o)})}_addCheck(e){return new un({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...fe.errToObj(e)})}url(e){return this._addCheck({kind:"url",...fe.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...fe.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...fe.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...fe.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...fe.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...fe.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...fe.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...fe.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...fe.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,...fe.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,...fe.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...fe.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...fe.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...fe.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...fe.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...fe.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...fe.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...fe.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...fe.errToObj(n)})}nonempty(e){return this.min(1,fe.errToObj(e))}trim(){return new un({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new un({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new un({...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}}un.create=t=>{var e;return new un({checks:[],typeName:Ce.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ae(t)})};function sy(t,e){const n=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,i=n>o?n:o,l=parseInt(t.toFixed(i).replace(".","")),c=parseInt(e.toFixed(i).replace(".",""));return l%c/Math.pow(10,i)}class dr extends Pe{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:ee.invalid_type,expected:ae.number,received:l.parsedType}),be}let o;const i=new bt;for(const l of this._def.checks)l.kind==="int"?Ge.isInteger(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.invalid_type,expected:"integer",received:"float",message:l.message}),i.dirty()):l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),i.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),i.dirty()):l.kind==="multipleOf"?sy(e.data,l.value)!==0&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.not_multiple_of,multipleOf:l.value,message:l.message}),i.dirty()):l.kind==="finite"?Number.isFinite(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.not_finite,message:l.message}),i.dirty()):Ge.assertNever(l);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,fe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,fe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,fe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,fe.toString(n))}setLimit(e,n,o,i){return new dr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:fe.toString(i)}]})}_addCheck(e){return new dr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:fe.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:fe.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:fe.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.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"&&Ge.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)}}dr.create=t=>new dr({checks:[],typeName:Ce.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ae(t)});class ur extends Pe{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:ee.invalid_type,expected:ae.bigint,received:l.parsedType}),be}let o;const i=new bt;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:ee.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),i.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),i.dirty()):l.kind==="multipleOf"?e.data%l.value!==BigInt(0)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.not_multiple_of,multipleOf:l.value,message:l.message}),i.dirty()):Ge.assertNever(l);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,fe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,fe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,fe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,fe.toString(n))}setLimit(e,n,o,i){return new ur({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:fe.toString(i)}]})}_addCheck(e){return new ur({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:fe.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}}ur.create=t=>{var e;return new ur({checks:[],typeName:Ce.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ae(t)})};class ti extends Pe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ae.boolean){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.boolean,received:o.parsedType}),be}return At(e.data)}}ti.create=t=>new ti({typeName:Ce.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ae(t)});class $r extends Pe{_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:ee.invalid_type,expected:ae.date,received:l.parsedType}),be}if(isNaN(e.data.getTime())){const l=this._getOrReturnCtx(e);return ie(l,{code:ee.invalid_date}),be}const o=new bt;let i;for(const l of this._def.checks)l.kind==="min"?e.data.getTime()<l.value&&(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),o.dirty()):l.kind==="max"?e.data.getTime()>l.value&&(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),o.dirty()):Ge.assertNever(l);return{status:o.value,value:new Date(e.data.getTime())}}_addCheck(e){return new $r({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:fe.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:fe.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}}$r.create=t=>new $r({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Ce.ZodDate,...Ae(t)});class ys extends Pe{_parse(e){if(this._getType(e)!==ae.symbol){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.symbol,received:o.parsedType}),be}return At(e.data)}}ys.create=t=>new ys({typeName:Ce.ZodSymbol,...Ae(t)});class ni extends Pe{_parse(e){if(this._getType(e)!==ae.undefined){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.undefined,received:o.parsedType}),be}return At(e.data)}}ni.create=t=>new ni({typeName:Ce.ZodUndefined,...Ae(t)});class ri extends Pe{_parse(e){if(this._getType(e)!==ae.null){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.null,received:o.parsedType}),be}return At(e.data)}}ri.create=t=>new ri({typeName:Ce.ZodNull,...Ae(t)});class uo extends Pe{constructor(){super(...arguments),this._any=!0}_parse(e){return At(e.data)}}uo.create=t=>new uo({typeName:Ce.ZodAny,...Ae(t)});class zr extends Pe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return At(e.data)}}zr.create=t=>new zr({typeName:Ce.ZodUnknown,...Ae(t)});class qn extends Pe{_parse(e){const n=this._getOrReturnCtx(e);return ie(n,{code:ee.invalid_type,expected:ae.never,received:n.parsedType}),be}}qn.create=t=>new qn({typeName:Ce.ZodNever,...Ae(t)});class vs extends Pe{_parse(e){if(this._getType(e)!==ae.undefined){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.void,received:o.parsedType}),be}return At(e.data)}}vs.create=t=>new vs({typeName:Ce.ZodVoid,...Ae(t)});class pn extends Pe{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),i=this._def;if(n.parsedType!==ae.array)return ie(n,{code:ee.invalid_type,expected:ae.array,received:n.parsedType}),be;if(i.exactLength!==null){const c=n.data.length>i.exactLength.value,d=n.data.length<i.exactLength.value;(c||d)&&(ie(n,{code:c?ee.too_big:ee.too_small,minimum:d?i.exactLength.value:void 0,maximum:c?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),o.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(ie(n,{code:ee.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),o.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(ie(n,{code:ee.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((c,d)=>i.type._parseAsync(new In(n,c,n.path,d)))).then(c=>bt.mergeArray(o,c));const l=[...n.data].map((c,d)=>i.type._parseSync(new In(n,c,n.path,d)));return bt.mergeArray(o,l)}get element(){return this._def.type}min(e,n){return new pn({...this._def,minLength:{value:e,message:fe.toString(n)}})}max(e,n){return new pn({...this._def,maxLength:{value:e,message:fe.toString(n)}})}length(e,n){return new pn({...this._def,exactLength:{value:e,message:fe.toString(n)}})}nonempty(e){return this.min(1,e)}}pn.create=(t,e)=>new pn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ce.ZodArray,...Ae(e)});function po(t){if(t instanceof nt){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=On.create(po(o))}return new nt({...t._def,shape:()=>e})}else return t instanceof pn?new pn({...t._def,type:po(t.element)}):t instanceof On?On.create(po(t.unwrap())):t instanceof hr?hr.create(po(t.unwrap())):t instanceof Fn?Fn.create(t.items.map(e=>po(e))):t}class nt extends Pe{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=Ge.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==ae.object){const h=this._getOrReturnCtx(e);return ie(h,{code:ee.invalid_type,expected:ae.object,received:h.parsedType}),be}const{status:o,ctx:i}=this._processInputParams(e),{shape:l,keys:c}=this._getCached(),d=[];if(!(this._def.catchall instanceof qn&&this._def.unknownKeys==="strip"))for(const h in i.data)c.includes(h)||d.push(h);const p=[];for(const h of c){const m=l[h],y=i.data[h];p.push({key:{status:"valid",value:h},value:m._parse(new In(i,y,i.path,h)),alwaysSet:h in i.data})}if(this._def.catchall instanceof qn){const h=this._def.unknownKeys;if(h==="passthrough")for(const m of d)p.push({key:{status:"valid",value:m},value:{status:"valid",value:i.data[m]}});else if(h==="strict")d.length>0&&(ie(i,{code:ee.unrecognized_keys,keys:d}),o.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const m of d){const y=i.data[m];p.push({key:{status:"valid",value:m},value:h._parse(new In(i,y,i.path,m)),alwaysSet:m in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const h=[];for(const m of p){const y=await m.key,x=await m.value;h.push({key:y,value:x,alwaysSet:m.alwaysSet})}return h}).then(h=>bt.mergeObjectSync(o,h)):bt.mergeObjectSync(o,p)}get shape(){return this._def.shape()}strict(e){return fe.errToObj,new nt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,o)=>{var i,l,c,d;const p=(c=(l=(i=this._def).errorMap)===null||l===void 0?void 0:l.call(i,n,o).message)!==null&&c!==void 0?c:o.defaultError;return n.code==="unrecognized_keys"?{message:(d=fe.errToObj(e).message)!==null&&d!==void 0?d:p}:{message:p}}}:{}})}strip(){return new nt({...this._def,unknownKeys:"strip"})}passthrough(){return new nt({...this._def,unknownKeys:"passthrough"})}extend(e){return new nt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new nt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ce.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new nt({...this._def,catchall:e})}pick(e){const n={};return Ge.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(n[o]=this.shape[o])}),new nt({...this._def,shape:()=>n})}omit(e){const n={};return Ge.objectKeys(this.shape).forEach(o=>{e[o]||(n[o]=this.shape[o])}),new nt({...this._def,shape:()=>n})}deepPartial(){return po(this)}partial(e){const n={};return Ge.objectKeys(this.shape).forEach(o=>{const i=this.shape[o];e&&!e[o]?n[o]=i:n[o]=i.optional()}),new nt({...this._def,shape:()=>n})}required(e){const n={};return Ge.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])n[o]=this.shape[o];else{let l=this.shape[o];for(;l instanceof On;)l=l._def.innerType;n[o]=l}}),new nt({...this._def,shape:()=>n})}keyof(){return su(Ge.objectKeys(this.shape))}}nt.create=(t,e)=>new nt({shape:()=>t,unknownKeys:"strip",catchall:qn.create(),typeName:Ce.ZodObject,...Ae(e)}),nt.strictCreate=(t,e)=>new nt({shape:()=>t,unknownKeys:"strict",catchall:qn.create(),typeName:Ce.ZodObject,...Ae(e)}),nt.lazycreate=(t,e)=>new nt({shape:t,unknownKeys:"strip",catchall:qn.create(),typeName:Ce.ZodObject,...Ae(e)});class oi extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e),o=this._def.options;function i(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const c=l.map(d=>new Ut(d.ctx.common.issues));return ie(n,{code:ee.invalid_union,unionErrors:c}),be}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(i);{let l;const c=[];for(const p of o){const h={...n,common:{...n.common,issues:[]},parent:null},m=p._parseSync({data:n.data,path:n.path,parent:h});if(m.status==="valid")return m;m.status==="dirty"&&!l&&(l={result:m,ctx:h}),h.common.issues.length&&c.push(h.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const d=c.map(p=>new Ut(p));return ie(n,{code:ee.invalid_union,unionErrors:d}),be}}get options(){return this._def.options}}oi.create=(t,e)=>new oi({options:t,typeName:Ce.ZodUnion,...Ae(e)});const Kn=t=>t instanceof ai?Kn(t.schema):t instanceof hn?Kn(t.innerType()):t instanceof li?[t.value]:t instanceof pr?t.options:t instanceof ci?Ge.objectValues(t.enum):t instanceof di?Kn(t._def.innerType):t instanceof ni?[void 0]:t instanceof ri?[null]:t instanceof On?[void 0,...Kn(t.unwrap())]:t instanceof hr?[null,...Kn(t.unwrap())]:t instanceof ll||t instanceof hi?Kn(t.unwrap()):t instanceof ui?Kn(t._def.innerType):[];class _s extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.object)return ie(n,{code:ee.invalid_type,expected:ae.object,received:n.parsedType}),be;const o=this.discriminator,i=n.data[o],l=this.optionsMap.get(i);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:ee.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,o){const i=new Map;for(const l of n){const c=Kn(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 d of c){if(i.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);i.set(d,l)}}return new _s({typeName:Ce.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Ae(o)})}}function al(t,e){const n=cr(t),o=cr(e);if(t===e)return{valid:!0,data:t};if(n===ae.object&&o===ae.object){const i=Ge.objectKeys(e),l=Ge.objectKeys(t).filter(d=>i.indexOf(d)!==-1),c={...t,...e};for(const d of l){const p=al(t[d],e[d]);if(!p.valid)return{valid:!1};c[d]=p.data}return{valid:!0,data:c}}else if(n===ae.array&&o===ae.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let l=0;l<t.length;l++){const c=t[l],d=e[l],p=al(c,d);if(!p.valid)return{valid:!1};i.push(p.data)}return{valid:!0,data:i}}else return n===ae.date&&o===ae.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ii extends Pe{_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=(l,c)=>{if(ol(l)||ol(c))return be;const d=al(l.value,c.value);return d.valid?((il(l)||il(c))&&n.dirty(),{status:n.value,value:d.data}):(ie(o,{code:ee.invalid_intersection_types}),be)};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])=>i(l,c)):i(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}ii.create=(t,e,n)=>new ii({left:t,right:e,typeName:Ce.ZodIntersection,...Ae(n)});class Fn extends Pe{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.array)return ie(o,{code:ee.invalid_type,expected:ae.array,received:o.parsedType}),be;if(o.data.length<this._def.items.length)return ie(o,{code:ee.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),be;!this._def.rest&&o.data.length>this._def.items.length&&(ie(o,{code:ee.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const l=[...o.data].map((c,d)=>{const p=this._def.items[d]||this._def.rest;return p?p._parse(new In(o,c,o.path,d)):null}).filter(c=>!!c);return o.common.async?Promise.all(l).then(c=>bt.mergeArray(n,c)):bt.mergeArray(n,l)}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:Ce.ZodTuple,rest:null,...Ae(e)})};class si extends Pe{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:ee.invalid_type,expected:ae.object,received:o.parsedType}),be;const i=[],l=this._def.keyType,c=this._def.valueType;for(const d in o.data)i.push({key:l._parse(new In(o,d,o.path,d)),value:c._parse(new In(o,o.data[d],o.path,d)),alwaysSet:d in o.data});return o.common.async?bt.mergeObjectAsync(n,i):bt.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,o){return n instanceof Pe?new si({keyType:e,valueType:n,typeName:Ce.ZodRecord,...Ae(o)}):new si({keyType:un.create(),valueType:e,typeName:Ce.ZodRecord,...Ae(n)})}}class Cs extends Pe{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:ee.invalid_type,expected:ae.map,received:o.parsedType}),be;const i=this._def.keyType,l=this._def.valueType,c=[...o.data.entries()].map(([d,p],h)=>({key:i._parse(new In(o,d,o.path,[h,"key"])),value:l._parse(new In(o,p,o.path,[h,"value"]))}));if(o.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const p of c){const h=await p.key,m=await p.value;if(h.status==="aborted"||m.status==="aborted")return be;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const p of c){const h=p.key,m=p.value;if(h.status==="aborted"||m.status==="aborted")return be;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}}}}Cs.create=(t,e,n)=>new Cs({valueType:e,keyType:t,typeName:Ce.ZodMap,...Ae(n)});class Ur extends Pe{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.set)return ie(o,{code:ee.invalid_type,expected:ae.set,received:o.parsedType}),be;const i=this._def;i.minSize!==null&&o.data.size<i.minSize.value&&(ie(o,{code:ee.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&o.data.size>i.maxSize.value&&(ie(o,{code:ee.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const l=this._def.valueType;function c(p){const h=new Set;for(const m of p){if(m.status==="aborted")return be;m.status==="dirty"&&n.dirty(),h.add(m.value)}return{status:n.value,value:h}}const d=[...o.data.values()].map((p,h)=>l._parse(new In(o,p,o.path,h)));return o.common.async?Promise.all(d).then(p=>c(p)):c(d)}min(e,n){return new Ur({...this._def,minSize:{value:e,message:fe.toString(n)}})}max(e,n){return new Ur({...this._def,maxSize:{value:e,message:fe.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Ur.create=(t,e)=>new Ur({valueType:t,minSize:null,maxSize:null,typeName:Ce.ZodSet,...Ae(e)});class ho extends Pe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.function)return ie(n,{code:ee.invalid_type,expected:ae.function,received:n.parsedType}),be;function o(d,p){return ms({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,fs(),lo].filter(h=>!!h),issueData:{code:ee.invalid_arguments,argumentsError:p}})}function i(d,p){return ms({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,fs(),lo].filter(h=>!!h),issueData:{code:ee.invalid_return_type,returnTypeError:p}})}const l={errorMap:n.common.contextualErrorMap},c=n.data;if(this._def.returns instanceof fo){const d=this;return At(async function(...p){const h=new Ut([]),m=await d._def.args.parseAsync(p,l).catch(w=>{throw h.addIssue(o(p,w)),h}),y=await Reflect.apply(c,this,m);return await d._def.returns._def.type.parseAsync(y,l).catch(w=>{throw h.addIssue(i(y,w)),h})})}else{const d=this;return At(function(...p){const h=d._def.args.safeParse(p,l);if(!h.success)throw new Ut([o(p,h.error)]);const m=Reflect.apply(c,this,h.data),y=d._def.returns.safeParse(m,l);if(!y.success)throw new Ut([i(m,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ho({...this._def,args:Fn.create(e).rest(zr.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||Fn.create([]).rest(zr.create()),returns:n||zr.create(),typeName:Ce.ZodFunction,...Ae(o)})}}class ai extends Pe{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})}}ai.create=(t,e)=>new ai({getter:t,typeName:Ce.ZodLazy,...Ae(e)});class li extends Pe{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return ie(n,{received:n.data,code:ee.invalid_literal,expected:this._def.value}),be}return{status:"valid",value:e.data}}get value(){return this._def.value}}li.create=(t,e)=>new li({value:t,typeName:Ce.ZodLiteral,...Ae(e)});function su(t,e){return new pr({values:t,typeName:Ce.ZodEnum,...Ae(e)})}class pr extends Pe{constructor(){super(...arguments),Qo.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),o=this._def.values;return ie(n,{expected:Ge.joinValues(o),received:n.parsedType,code:ee.invalid_type}),be}if(gs(this,Qo)||tu(this,Qo,new Set(this._def.values)),!gs(this,Qo).has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return ie(n,{received:n.data,code:ee.invalid_enum_value,options:o}),be}return At(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 pr.create(e,{...this._def,...n})}exclude(e,n=this._def){return pr.create(this.options.filter(o=>!e.includes(o)),{...this._def,...n})}}Qo=new WeakMap,pr.create=su;class ci extends Pe{constructor(){super(...arguments),ei.set(this,void 0)}_parse(e){const n=Ge.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==ae.string&&o.parsedType!==ae.number){const i=Ge.objectValues(n);return ie(o,{expected:Ge.joinValues(i),received:o.parsedType,code:ee.invalid_type}),be}if(gs(this,ei)||tu(this,ei,new Set(Ge.getValidEnumValues(this._def.values))),!gs(this,ei).has(e.data)){const i=Ge.objectValues(n);return ie(o,{received:o.data,code:ee.invalid_enum_value,options:i}),be}return At(e.data)}get enum(){return this._def.values}}ei=new WeakMap,ci.create=(t,e)=>new ci({values:t,typeName:Ce.ZodNativeEnum,...Ae(e)});class fo extends Pe{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:ee.invalid_type,expected:ae.promise,received:n.parsedType}),be;const o=n.parsedType===ae.promise?n.data:Promise.resolve(n.data);return At(o.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}fo.create=(t,e)=>new fo({type:t,typeName:Ce.ZodPromise,...Ae(e)});class hn extends Pe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ce.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=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),i.type==="preprocess"){const c=i.transform(o.data,l);if(o.common.async)return Promise.resolve(c).then(async d=>{if(n.value==="aborted")return be;const p=await this._def.schema._parseAsync({data:d,path:o.path,parent:o});return p.status==="aborted"?be:p.status==="dirty"||n.value==="dirty"?co(p.value):p});{if(n.value==="aborted")return be;const d=this._def.schema._parseSync({data:c,path:o.path,parent:o});return d.status==="aborted"?be:d.status==="dirty"||n.value==="dirty"?co(d.value):d}}if(i.type==="refinement"){const c=d=>{const p=i.refinement(d,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 d};if(o.common.async===!1){const d=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return d.status==="aborted"?be:(d.status==="dirty"&&n.dirty(),c(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(d=>d.status==="aborted"?be:(d.status==="dirty"&&n.dirty(),c(d.value).then(()=>({status:n.value,value:d.value}))))}if(i.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Yo(c))return c;const d=i.transform(c.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>Yo(c)?Promise.resolve(i.transform(c.value,l)).then(d=>({status:n.value,value:d})):c);Ge.assertNever(i)}}hn.create=(t,e,n)=>new hn({schema:t,typeName:Ce.ZodEffects,effect:e,...Ae(n)}),hn.createWithPreprocess=(t,e,n)=>new hn({schema:e,effect:{type:"preprocess",transform:t},typeName:Ce.ZodEffects,...Ae(n)});class On extends Pe{_parse(e){return this._getType(e)===ae.undefined?At(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}On.create=(t,e)=>new On({innerType:t,typeName:Ce.ZodOptional,...Ae(e)});class hr extends Pe{_parse(e){return this._getType(e)===ae.null?At(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}hr.create=(t,e)=>new hr({innerType:t,typeName:Ce.ZodNullable,...Ae(e)});class di extends Pe{_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}}di.create=(t,e)=>new di({innerType:t,typeName:Ce.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ae(e)});class ui extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Jo(i)?i.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Ut(o.common.issues)},input:o.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ut(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}ui.create=(t,e)=>new ui({innerType:t,typeName:Ce.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ae(e)});class ws extends Pe{_parse(e){if(this._getType(e)!==ae.nan){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.nan,received:o.parsedType}),be}return{status:"valid",value:e.data}}}ws.create=t=>new ws({typeName:Ce.ZodNaN,...Ae(t)});const ay=Symbol("zod_brand");class ll extends Pe{_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 pi extends Pe{_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"?be:l.status==="dirty"?(n.dirty(),co(l.value)):this._def.out._parseAsync({data:l.value,path:o.path,parent:o})})();{const i=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?be:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:o.path,parent:o})}}static create(e,n){return new pi({in:e,out:n,typeName:Ce.ZodPipeline})}}class hi extends Pe{_parse(e){const n=this._def.innerType._parse(e),o=i=>(Yo(i)&&(i.value=Object.freeze(i.value)),i);return Jo(n)?n.then(i=>o(i)):o(n)}unwrap(){return this._def.innerType}}hi.create=(t,e)=>new hi({innerType:t,typeName:Ce.ZodReadonly,...Ae(e)});function au(t,e={},n){return t?uo.create().superRefine((o,i)=>{var l,c;if(!t(o)){const d=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,p=(c=(l=d.fatal)!==null&&l!==void 0?l:n)!==null&&c!==void 0?c:!0,h=typeof d=="string"?{message:d}:d;i.addIssue({code:"custom",...h,fatal:p})}}):uo.create()}const ly={object:nt.lazycreate};var Ce;(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"})(Ce||(Ce={}));const cy=(t,e={message:`Input not instance of ${t.name}`})=>au(n=>n instanceof t,e),lu=un.create,cu=dr.create,dy=ws.create,uy=ur.create,du=ti.create,py=$r.create,hy=ys.create,fy=ni.create,my=ri.create,gy=uo.create,yy=zr.create,vy=qn.create,_y=vs.create,Cy=pn.create,wy=nt.create,by=nt.strictCreate,xy=oi.create,ky=_s.create,Sy=ii.create,Ey=Fn.create,Ty=si.create,Ny=Cs.create,Ay=Ur.create,Vy=ho.create,By=ai.create,Py=li.create,Ry=pr.create,Dy=ci.create,Iy=fo.create,uu=hn.create,Fy=On.create,Oy=hr.create,Ly=hn.createWithPreprocess,My=pi.create;var Ln=Object.freeze({__proto__:null,defaultErrorMap:lo,setErrorMap:Zg,getErrorMap:fs,makeIssue:ms,EMPTY_PATH:jg,addIssueToContext:ie,ParseStatus:bt,INVALID:be,DIRTY:co,OK:At,isAborted:ol,isDirty:il,isValid:Yo,isAsync:Jo,get util(){return Ge},get objectUtil(){return rl},ZodParsedType:ae,getParsedType:cr,ZodType:Pe,datetimeRegex:iu,ZodString:un,ZodNumber:dr,ZodBigInt:ur,ZodBoolean:ti,ZodDate:$r,ZodSymbol:ys,ZodUndefined:ni,ZodNull:ri,ZodAny:uo,ZodUnknown:zr,ZodNever:qn,ZodVoid:vs,ZodArray:pn,ZodObject:nt,ZodUnion:oi,ZodDiscriminatedUnion:_s,ZodIntersection:ii,ZodTuple:Fn,ZodRecord:si,ZodMap:Cs,ZodSet:Ur,ZodFunction:ho,ZodLazy:ai,ZodLiteral:li,ZodEnum:pr,ZodNativeEnum:ci,ZodPromise:fo,ZodEffects:hn,ZodTransformer:hn,ZodOptional:On,ZodNullable:hr,ZodDefault:di,ZodCatch:ui,ZodNaN:ws,BRAND:ay,ZodBranded:ll,ZodPipeline:pi,ZodReadonly:hi,custom:au,Schema:Pe,ZodSchema:Pe,late:ly,get ZodFirstPartyTypeKind(){return Ce},coerce:{string:t=>un.create({...t,coerce:!0}),number:t=>dr.create({...t,coerce:!0}),boolean:t=>ti.create({...t,coerce:!0}),bigint:t=>ur.create({...t,coerce:!0}),date:t=>$r.create({...t,coerce:!0})},any:gy,array:Cy,bigint:uy,boolean:du,date:py,discriminatedUnion:ky,effect:uu,enum:Ry,function:Vy,instanceof:cy,intersection:Sy,lazy:By,literal:Py,map:Ny,nan:dy,nativeEnum:Dy,never:vy,null:my,nullable:Oy,number:cu,object:wy,oboolean:()=>du().optional(),onumber:()=>cu().optional(),optional:Fy,ostring:()=>lu().optional(),pipeline:My,preprocess:Ly,promise:Iy,record:Ty,set:Ay,strictObject:by,string:lu,symbol:hy,transformer:uu,tuple:Ey,undefined:fy,union:xy,unknown:yy,void:_y,NEVER:be,ZodIssueCode:ee,quotelessJson:Ug,ZodError:Ut});function Gy(t){throw new Error("Unexpected object: "+t)}const $y=-2147483648,pu=-9007199254740991n,zy=NaN,Uy=NaN,Zy=null,jy=null;function hu(t,e){switch(e){case"Int":return t===$y;case"Long":return t===Number(pu)||t===pu;case"Float":return t===zy;case"Double":return t===Uy;case"String":return t===Zy;case"Bytes":return t===jy;default:throw Error(`unsupported data type: ${e}`)}}function Wy(t,e){const n=Math.floor(e/8),o=1<<7-e%8;return(t[n]&o)>0}function cl(t){const{type:e,name:n,domain:o}=t;return{type:e,name:n,...o&&{domain:o}}}function fu(t){return t.map(cl)}function bs(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=>bs(n,e))};case"outer":return{type:"outer",primary:bs(t.primary,e),secondary:t.secondary.map(n=>bs(n,e))};default:Gy(t)}}Ln.object({__isRef:Ln.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:Ln.string().describe("Upstream block id"),name:Ln.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 Hy(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 qy=Ln.object({type:Ln.string(),importance:Ln.number().optional(),id:Ln.string().optional(),label:Ln.string()});Ln.array(qy);const Ky="1.14.1";function mu(){return Hy({sdkVersion:Ky})}function Xy(t){if(typeof globalThis.getEnvironmentValue=="function")return globalThis.getEnvironmentValue(t)}function mo(t){return!!t&&typeof t.children<"u"}function fr(t){return mo(t)?t.groupId:t.colId}function gu(t,e,n){const o=(c,d)=>{const p=c.children.map(fr),h=T._includes(p,fr(d)),m=T._last(c.children),y=m&&fr(m)!==fr(d);return h&&y};if(!mo(t))return!0;const i=t,l=n;if(o(i,l))return i.children.push(l),!0;if(i.groupId===e){const c=i.children.map(fr);if(!T._includes(c,fr(l)))return i.children.push(l),!0}for(let c=i.children.length-1;c>=0&&!gu(i.children[c],e,n);c--);return!1}function Yy(t){const e=(i,l)=>mo(i)&&mo(l)&&fr(i)===fr(l),n=(i,l)=>{if(!mo(l))return i;const c=i,d=l;return d.children&&d.groupId&&gu(c,d.groupId,d.children[0])||d.children.forEach(p=>n(c,p)),c},o=[];for(let i=1;i<=t.length;i++){const l=t[i-1],c=t[i];e(l,c)?t[i]=n(l,c):o.push(l)}return o}var Jy=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="toolPanelColDefService"}wireBeans(t){this.columnModel=t.columnModel}createColumnTree(t){const e=[],n=(i,l)=>{if(mo(i)){const c=i,d=typeof c.groupId<"u"?c.groupId:c.headerName,p=new T.AgProvidedColumnGroup(c,d,!1,l),h=[];return c.children.forEach(m=>{const y=n(m,l+1);y&&h.push(y)}),p.setChildren(h),p}else{const c=i,d=c.colId?c.colId:c.field,p=this.columnModel.getColDefCol(d);return p||e.push(c),p}},o=[];return t.forEach(i=>{const l=n(i,0);l&&o.push(l)}),e.length>0&&T._warnOnce("unable to find grid columns for the supplied colDef(s):",e),o}syncLayoutWithGrid(t){const e=this.getLeafPathTrees(),n=Yy(e);t(n)}getLeafPathTrees(){const t=(o,i)=>{let l;if(T.isProvidedColumnGroup(o))if(o.isPadding())l=i;else{const d=Object.assign({},o.getColGroupDef());d.groupId=o.getGroupId(),d.children=[i],l=d}else{const d=Object.assign({},o.getColDef());d.colId=o.getColId(),l=d}const c=o.getOriginalParent();return c?t(c,l):l};return this.columnModel.getCols().filter(o=>{const i=o.getColDef();return o.isPrimary()&&!i.showRowGroup}).map(o=>t(o,o.getColDef()))}};function Qy(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isDisplayed())??!1}function ev(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().setDisplayed(e)}function tv(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().setSideBarPosition(e)}function nv(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().openToolPanel(e,"api")}function rv(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().close("api")}function ov(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().openedItem())??null}function iv(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().refresh()}function sv(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isToolPanelShowing())??!1}function av(t,e){var o;const n=(o=t.sideBarService)==null?void 0:o.getSideBarComp().getToolPanelInstance(e);return T._unwrapUserComp(n)}function lv(t){var e;return(e=t.sideBarService)==null?void 0:e.getSideBarComp().getDef()}var cv=class extends T.Component{constructor(t){super(),this.eToggleButton=T.RefPlaceholder,this.eIconWrapper=T.RefPlaceholder,this.eLabel=T.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 Lg(t){return{ok:!0,value:t}}function Jd(t){if(!t)throw new Ka;if(!t.ok)throw Error(t.errors.join(";"));return t.value}function Qd(t){return{value:t,errors:void 0}}function Mg(t){if(t.errors)throw new Xa(t.errors);if(!t.value)throw new Ka;return t.value}function Gg(t){return t!==void 0}function Ya(t,e){return Gr(t)===Gr(e)}const Ja=t=>t,Qa=t=>t instanceof Error?t:Error(String(t)),el=t=>t.name==="ZodError",tl=t=>{const{formErrors:e,fieldErrors:n}=t.flatten(),o=Object.entries(n).map(([i,l])=>i+":"+(l==null?void 0:l.join(",")));return e.concat(o).join("; ")};function nl(t){const e=t.validate??Ja,{autoSave:n}=t,o=r.ref(),i=r.ref(),l=E=>{i.value={model:Dn(E)}};r.watch(()=>t.get(),E=>l(E),{immediate:!0});const c=()=>{var E;t.onSave(e(Dn((E=i.value)==null?void 0:E.model)))},d=()=>{l(t.get()),o.value=void 0},p=E=>{const O=Qa(E);el(O)?o.value=Error(tl(O)):o.value=O},h=E=>{o.value=void 0;try{e(E),n&&c()}catch(O){p(O)}},m=r.computed({get:()=>{var E;return(E=i.value)==null?void 0:E.model},set(E){l(E),h(E)}});r.watch(i,(E,O)=>{E&&E===O&&h(E.model)},{deep:!0});const y=r.computed(()=>!o.value),x=r.computed(()=>!Ya(t.get(),r.unref(i))),w=r.computed(()=>o.value?o.value.message:"");return r.reactive({model:m,valid:y,isChanged:x,error:o,errorString:w,save:c,revert:d,setError:p})}function $g(t,e,n){const o=t.validate??Ja,{autoSave:i}=t,l=r.ref(),c=r.ref(),d=$=>{var b;if(n.deepPatchModel){const R=(b=c.value)==null?void 0:b.model,F=Object.assign(Dn($),e??{});c.value={model:R?Xd(R,F):F,stage:Symbol()}}else c.value={model:Object.assign(Dn($),e??{}),stage:Symbol()}};r.watch(()=>t.get(),$=>d($),{immediate:!0});const p=()=>{var $;t.onSave(o(Dn(($=c.value)==null?void 0:$.model)))},h=()=>{d(t.get()),l.value=void 0},m=$=>{const b=Qa($);el(b)?l.value=Error(tl(b)):l.value=b},y=$=>{l.value=void 0;try{o($),i&&p()}catch(b){m(b)}},x=r.computed({get:()=>{var $;return($=c.value)==null?void 0:$.model},set(){throw Error("Cannot replace base model")}});r.watch([()=>({args:x.value.args,ui:x.value.ui}),()=>{var $;return($=c.value)==null?void 0:$.stage}],([$,b],[R,F])=>{b===F&&y($)},{deep:!0});const w=r.computed(()=>!l.value),E=r.computed(()=>{var R;const{args:$,ui:b}=((R=r.unref(c))==null?void 0:R.model)??{};return!Ya(t.get(),{args:$,ui:b})}),O=r.computed(()=>l.value?l.value.message:"");return r.reactive({model:x,valid:w,isChanged:E,error:l,errorString:O,save:p,revert:h,setError:m})}const zg=t=>Object.fromEntries(new URL(t,"http://dummy").searchParams);function Ug(t,e,n){const o=(b,...R)=>{n.debug&&console.log(`%c>>> %c${b}`,"color: orange; font-weight: bold","color: orange",...R)},l=qa(e.setBlockArgs,100),c=qa(e.setBlockUiState,100),d=qa(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 b=>{b.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 h=()=>Dn(p.args),m=()=>Dn(p.ui),y=()=>Dn(p.navigationState),x={createArgsModel(b={}){return nl({get(){return b.transform?b.transform(p.args):p.args},validate:b.validate,autoSave:!0,onSave(R){l(R)}})},createUiModel(b={},R){return nl({get(){return b.transform?b.transform(p.ui):p.ui??R()},validate:b.validate,autoSave:!0,onSave(F){c(F)}})},useOutputs(...b){const R=r.reactive({errors:void 0,value:void 0});return r.watch(()=>p.outputs,()=>{try{Object.assign(R,{value:this.unwrapOutputs(...b),errors:void 0})}catch(F){Object.assign(R,{value:void 0,errors:[String(F)]})}},{immediate:!0,deep:!0}),R},unwrapOutputs(...b){const R=p.outputs,F=b.map(D=>[D,Jd(R[D])]);return Object.fromEntries(F)},getOutputField(b){return p.outputs[b]},getOutputFieldOkOptional(b){console.warn("use reactive app.outputValues.fieldName instead instead of getOutputFieldOkOptional(fieldName)");const R=this.getOutputField(b);if(R&&R.ok)return R.value},getOutputFieldErrorsOptional(b){console.warn("use reactive app.outputErrors.fieldName instead instead of getOutputFieldErrorsOptional(fieldName)");const R=this.getOutputField(b);if(R&&!R.ok)return R.errors},updateArgs(b){const R=h();return b(R),e.setBlockArgs(R)},updateUiState(b){const R=m();return e.setBlockUiState(b(R))},updateNavigationState(b){const R=y();return b(R),e.setNavigationState(R)},navigateTo(b){const R=y();return R.href=b,e.setNavigationState(R)}},w=r.computed(()=>{const b=Object.entries(p.outputs).map(([R,F])=>[R,F.ok&&F.value!==void 0?F.value:void 0]);return Object.fromEntries(b)}),E=r.computed(()=>{const b=Object.entries(p.outputs).map(([R,F])=>[R,F&&!F.ok?new Xa(F.errors):void 0]);return Object.fromEntries(b)}),O={snapshot:p,queryParams:r.computed(()=>zg(p.navigationState.href)),href:r.computed(()=>p.navigationState.href),hasErrors:r.computed(()=>Object.values(p.outputs).some(b=>!(b!=null&&b.ok))),outputValues:r.computed(()=>(console.warn("Change app.outputValues to app.model.outputs"),w.value)),outputErrors:r.computed(()=>(console.warn("Change app.outputErrors to app.model.outputErrors"),E.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({get(){return{args:p.args,ui:p.ui}},autoSave:!0,onSave(b){d(b.args,b.ui)}},{outputs:w,outputErrors:E},n);return r.reactive(Object.assign($,x,O))}var Ge;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const l={};for(const c of i)l[c]=c;return l},t.getValidEnumValues=i=>{const l=t.objectKeys(i).filter(d=>typeof i[i[d]]!="number"),c={};for(const d of l)c[d]=i[d];return t.objectValues(c)},t.objectValues=i=>t.objectKeys(i).map(function(l){return i[l]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const l=[];for(const c in i)Object.prototype.hasOwnProperty.call(i,c)&&l.push(c);return l},t.find=(i,l)=>{for(const c of i)if(l(c))return c},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function o(i,l=" | "){return i.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}t.joinValues=o,t.jsonStringifyReplacer=(i,l)=>typeof l=="bigint"?l.toString():l})(Ge||(Ge={}));var rl;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(rl||(rl={}));const le=Ge.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),cr=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=Ge.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"]),Zg=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Ut 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:[]},i=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(i);else if(c.code==="invalid_return_type")i(c.returnTypeError);else if(c.code==="invalid_arguments")i(c.argumentsError);else if(c.path.length===0)o._errors.push(n(c));else{let d=o,p=0;for(;p<c.path.length;){const h=c.path[p];p===c.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(c))):d[h]=d[h]||{_errors:[]},d=d[h],p++}}};return i(this),o}static assert(e){if(!(e instanceof Ut))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ge.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},o=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):o.push(e(i));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}Ut.create=t=>new Ut(t);const lo=(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,Ge.jsonStringifyReplacer)}`;break;case ee.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ge.joinValues(t.keys,", ")}`;break;case ee.invalid_union:n="Invalid input";break;case ee.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ge.joinValues(t.options)}`;break;case ee.invalid_enum_value:n=`Invalid enum value. Expected ${Ge.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}"`:Ge.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,Ge.assertNever(t)}return{message:n}};let eu=lo;function Wg(t){eu=t}function fs(){return eu}const ms=t=>{const{data:e,path:n,errorMaps:o,issueData:i}=t,l=[...n,...i.path||[]],c={...i,path:l};if(i.message!==void 0)return{...i,path:l,message:i.message};let d="";const p=o.filter(h=>!!h).slice().reverse();for(const h of p)d=h(c,{data:e,defaultError:d}).message;return{...i,path:l,message:d}},jg=[];function se(t,e){const n=fs(),o=ms({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===lo?void 0:lo].filter(i=>!!i)});t.common.issues.push(o)}class bt{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 i of n){if(i.status==="aborted")return be;i.status==="dirty"&&e.dirty(),o.push(i.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,n){const o=[];for(const i of n){const l=await i.key,c=await i.value;o.push({key:l,value:c})}return bt.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const i of n){const{key:l,value:c}=i;if(l.status==="aborted"||c.status==="aborted")return be;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||i.alwaysSet)&&(o[l.value]=c.value)}return{status:e.value,value:o}}}const be=Object.freeze({status:"aborted"}),co=t=>({status:"dirty",value:t}),At=t=>({status:"valid",value:t}),ol=t=>t.status==="aborted",il=t=>t.status==="dirty",Yo=t=>t.status==="valid",Jo=t=>typeof Promise<"u"&&t instanceof Promise;function gs(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 tu(t,e,n,o,i){if(typeof e=="function"?t!==e||!i:!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 fe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(fe||(fe={}));var Qo,ei;class In{constructor(e,n,o,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=o,this._key=i}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 nu=(t,e)=>{if(Yo(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 Ut(t.common.issues);return this._error=n,this._error}}};function Ae(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:i}=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:i}:{errorMap:(c,d)=>{var p,h;const{message:m}=t;return c.code==="invalid_enum_value"?{message:m??d.defaultError}:typeof d.data>"u"?{message:(p=m??o)!==null&&p!==void 0?p:d.defaultError}:c.code!=="invalid_type"?{message:d.defaultError}:{message:(h=m??n)!==null&&h!==void 0?h:d.defaultError}},description:i}}class Pe{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 cr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:cr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new bt,ctx:{common:e.parent.common,data:e.data,parsedType:cr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Jo(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 i={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:cr(e)},l=this._parseSync({data:e,path:i.path,parent:i});return nu(i,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:cr(e)},i=this._parse({data:e,path:o.path,parent:o}),l=await(Jo(i)?i:Promise.resolve(i));return nu(o,l)}refine(e,n){const o=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,l)=>{const c=e(i),d=()=>l.addIssue({code:ee.custom,...o(i)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(d(),!1)):c?!0:(d(),!1)})}refinement(e,n){return this._refinement((o,i)=>e(o)?!0:(i.addIssue(typeof n=="function"?n(o,i):n),!1))}_refinement(e){return new hn({schema:this,typeName:Ce.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return On.create(this,this._def)}nullable(){return hr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pn.create(this,this._def)}promise(){return fo.create(this,this._def)}or(e){return oi.create([this,e],this._def)}and(e){return ii.create(this,e,this._def)}transform(e){return new hn({...Ae(this._def),schema:this,typeName:Ce.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new di({...Ae(this._def),innerType:this,defaultValue:n,typeName:Ce.ZodDefault})}brand(){return new ll({typeName:Ce.ZodBranded,type:this,...Ae(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new ui({...Ae(this._def),innerType:this,catchValue:n,typeName:Ce.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return pi.create(this,e)}readonly(){return hi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Hg=/^c[^\s-]{8,}$/i,qg=/^[0-9a-z]+$/,Kg=/^[0-9A-HJKMNP-TV-Z]{26}$/,Xg=/^[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,Yg=/^[a-z0-9_-]{21}$/i,Jg=/^[-+]?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)?)??$/,Qg=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ey="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let sl;const ty=/^(?:(?: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])$/,ny=/^(([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})))$/,ry=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ru="((\\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])))",oy=new RegExp(`^${ru}$`);function ou(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 iy(t){return new RegExp(`^${ou(t)}$`)}function iu(t){let e=`${ru}T${ou(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 sy(t,e){return!!((e==="v4"||!e)&&ty.test(t)||(e==="v6"||!e)&&ny.test(t))}class un extends Pe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==le.string){const l=this._getOrReturnCtx(e);return se(l,{code:ee.invalid_type,expected:le.string,received:l.parsedType}),be}const o=new bt;let i;for(const l of this._def.checks)if(l.kind==="min")e.data.length<l.value&&(i=this._getOrReturnCtx(e,i),se(i,{code:ee.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&&(i=this._getOrReturnCtx(e,i),se(i,{code:ee.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,d=e.data.length<l.value;(c||d)&&(i=this._getOrReturnCtx(e,i),c?se(i,{code:ee.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):d&&se(i,{code:ee.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),o.dirty())}else if(l.kind==="email")Qg.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"email",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="emoji")sl||(sl=new RegExp(ey,"u")),sl.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"emoji",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="uuid")Xg.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"uuid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="nanoid")Yg.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"nanoid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="cuid")Hg.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"cuid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="cuid2")qg.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"cuid2",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="ulid")Kg.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"ulid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),se(i,{validation:"url",code:ee.invalid_string,message:l.message}),o.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"regex",code:ee.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)||(i=this._getOrReturnCtx(e,i),se(i,{code:ee.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)||(i=this._getOrReturnCtx(e,i),se(i,{code:ee.invalid_string,validation:{startsWith:l.value},message:l.message}),o.dirty()):l.kind==="endsWith"?e.data.endsWith(l.value)||(i=this._getOrReturnCtx(e,i),se(i,{code:ee.invalid_string,validation:{endsWith:l.value},message:l.message}),o.dirty()):l.kind==="datetime"?iu(l).test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{code:ee.invalid_string,validation:"datetime",message:l.message}),o.dirty()):l.kind==="date"?oy.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{code:ee.invalid_string,validation:"date",message:l.message}),o.dirty()):l.kind==="time"?iy(l).test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{code:ee.invalid_string,validation:"time",message:l.message}),o.dirty()):l.kind==="duration"?Jg.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"duration",code:ee.invalid_string,message:l.message}),o.dirty()):l.kind==="ip"?sy(e.data,l.version)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"ip",code:ee.invalid_string,message:l.message}),o.dirty()):l.kind==="base64"?ry.test(e.data)||(i=this._getOrReturnCtx(e,i),se(i,{validation:"base64",code:ee.invalid_string,message:l.message}),o.dirty()):Ge.assertNever(l);return{status:o.value,value:e.data}}_regex(e,n,o){return this.refinement(i=>e.test(i),{validation:n,code:ee.invalid_string,...fe.errToObj(o)})}_addCheck(e){return new un({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...fe.errToObj(e)})}url(e){return this._addCheck({kind:"url",...fe.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...fe.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...fe.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...fe.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...fe.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...fe.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...fe.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...fe.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...fe.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,...fe.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,...fe.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...fe.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...fe.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...fe.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...fe.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...fe.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...fe.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...fe.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...fe.errToObj(n)})}nonempty(e){return this.min(1,fe.errToObj(e))}trim(){return new un({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new un({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new un({...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}}un.create=t=>{var e;return new un({checks:[],typeName:Ce.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ae(t)})};function ay(t,e){const n=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,i=n>o?n:o,l=parseInt(t.toFixed(i).replace(".","")),c=parseInt(e.toFixed(i).replace(".",""));return l%c/Math.pow(10,i)}class dr extends Pe{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 l=this._getOrReturnCtx(e);return se(l,{code:ee.invalid_type,expected:le.number,received:l.parsedType}),be}let o;const i=new bt;for(const l of this._def.checks)l.kind==="int"?Ge.isInteger(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:ee.invalid_type,expected:"integer",received:"float",message:l.message}),i.dirty()):l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(o=this._getOrReturnCtx(e,o),se(o,{code:ee.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),i.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(o=this._getOrReturnCtx(e,o),se(o,{code:ee.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),i.dirty()):l.kind==="multipleOf"?ay(e.data,l.value)!==0&&(o=this._getOrReturnCtx(e,o),se(o,{code:ee.not_multiple_of,multipleOf:l.value,message:l.message}),i.dirty()):l.kind==="finite"?Number.isFinite(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:ee.not_finite,message:l.message}),i.dirty()):Ge.assertNever(l);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,fe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,fe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,fe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,fe.toString(n))}setLimit(e,n,o,i){return new dr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:fe.toString(i)}]})}_addCheck(e){return new dr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:fe.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:fe.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:fe.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.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"&&Ge.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)}}dr.create=t=>new dr({checks:[],typeName:Ce.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ae(t)});class ur extends Pe{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 l=this._getOrReturnCtx(e);return se(l,{code:ee.invalid_type,expected:le.bigint,received:l.parsedType}),be}let o;const i=new bt;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),se(o,{code:ee.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),i.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(o=this._getOrReturnCtx(e,o),se(o,{code:ee.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),i.dirty()):l.kind==="multipleOf"?e.data%l.value!==BigInt(0)&&(o=this._getOrReturnCtx(e,o),se(o,{code:ee.not_multiple_of,multipleOf:l.value,message:l.message}),i.dirty()):Ge.assertNever(l);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,fe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,fe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,fe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,fe.toString(n))}setLimit(e,n,o,i){return new ur({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:fe.toString(i)}]})}_addCheck(e){return new ur({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:fe.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}}ur.create=t=>{var e;return new ur({checks:[],typeName:Ce.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ae(t)})};class ti extends Pe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==le.boolean){const o=this._getOrReturnCtx(e);return se(o,{code:ee.invalid_type,expected:le.boolean,received:o.parsedType}),be}return At(e.data)}}ti.create=t=>new ti({typeName:Ce.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ae(t)});class $r extends Pe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==le.date){const l=this._getOrReturnCtx(e);return se(l,{code:ee.invalid_type,expected:le.date,received:l.parsedType}),be}if(isNaN(e.data.getTime())){const l=this._getOrReturnCtx(e);return se(l,{code:ee.invalid_date}),be}const o=new bt;let i;for(const l of this._def.checks)l.kind==="min"?e.data.getTime()<l.value&&(i=this._getOrReturnCtx(e,i),se(i,{code:ee.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),o.dirty()):l.kind==="max"?e.data.getTime()>l.value&&(i=this._getOrReturnCtx(e,i),se(i,{code:ee.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),o.dirty()):Ge.assertNever(l);return{status:o.value,value:new Date(e.data.getTime())}}_addCheck(e){return new $r({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:fe.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:fe.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}}$r.create=t=>new $r({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Ce.ZodDate,...Ae(t)});class ys extends Pe{_parse(e){if(this._getType(e)!==le.symbol){const o=this._getOrReturnCtx(e);return se(o,{code:ee.invalid_type,expected:le.symbol,received:o.parsedType}),be}return At(e.data)}}ys.create=t=>new ys({typeName:Ce.ZodSymbol,...Ae(t)});class ni extends Pe{_parse(e){if(this._getType(e)!==le.undefined){const o=this._getOrReturnCtx(e);return se(o,{code:ee.invalid_type,expected:le.undefined,received:o.parsedType}),be}return At(e.data)}}ni.create=t=>new ni({typeName:Ce.ZodUndefined,...Ae(t)});class ri extends Pe{_parse(e){if(this._getType(e)!==le.null){const o=this._getOrReturnCtx(e);return se(o,{code:ee.invalid_type,expected:le.null,received:o.parsedType}),be}return At(e.data)}}ri.create=t=>new ri({typeName:Ce.ZodNull,...Ae(t)});class uo extends Pe{constructor(){super(...arguments),this._any=!0}_parse(e){return At(e.data)}}uo.create=t=>new uo({typeName:Ce.ZodAny,...Ae(t)});class zr extends Pe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return At(e.data)}}zr.create=t=>new zr({typeName:Ce.ZodUnknown,...Ae(t)});class qn extends Pe{_parse(e){const n=this._getOrReturnCtx(e);return se(n,{code:ee.invalid_type,expected:le.never,received:n.parsedType}),be}}qn.create=t=>new qn({typeName:Ce.ZodNever,...Ae(t)});class vs extends Pe{_parse(e){if(this._getType(e)!==le.undefined){const o=this._getOrReturnCtx(e);return se(o,{code:ee.invalid_type,expected:le.void,received:o.parsedType}),be}return At(e.data)}}vs.create=t=>new vs({typeName:Ce.ZodVoid,...Ae(t)});class pn extends Pe{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),i=this._def;if(n.parsedType!==le.array)return se(n,{code:ee.invalid_type,expected:le.array,received:n.parsedType}),be;if(i.exactLength!==null){const c=n.data.length>i.exactLength.value,d=n.data.length<i.exactLength.value;(c||d)&&(se(n,{code:c?ee.too_big:ee.too_small,minimum:d?i.exactLength.value:void 0,maximum:c?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),o.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(se(n,{code:ee.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),o.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(se(n,{code:ee.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((c,d)=>i.type._parseAsync(new In(n,c,n.path,d)))).then(c=>bt.mergeArray(o,c));const l=[...n.data].map((c,d)=>i.type._parseSync(new In(n,c,n.path,d)));return bt.mergeArray(o,l)}get element(){return this._def.type}min(e,n){return new pn({...this._def,minLength:{value:e,message:fe.toString(n)}})}max(e,n){return new pn({...this._def,maxLength:{value:e,message:fe.toString(n)}})}length(e,n){return new pn({...this._def,exactLength:{value:e,message:fe.toString(n)}})}nonempty(e){return this.min(1,e)}}pn.create=(t,e)=>new pn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ce.ZodArray,...Ae(e)});function po(t){if(t instanceof nt){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=On.create(po(o))}return new nt({...t._def,shape:()=>e})}else return t instanceof pn?new pn({...t._def,type:po(t.element)}):t instanceof On?On.create(po(t.unwrap())):t instanceof hr?hr.create(po(t.unwrap())):t instanceof Fn?Fn.create(t.items.map(e=>po(e))):t}class nt extends Pe{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=Ge.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==le.object){const h=this._getOrReturnCtx(e);return se(h,{code:ee.invalid_type,expected:le.object,received:h.parsedType}),be}const{status:o,ctx:i}=this._processInputParams(e),{shape:l,keys:c}=this._getCached(),d=[];if(!(this._def.catchall instanceof qn&&this._def.unknownKeys==="strip"))for(const h in i.data)c.includes(h)||d.push(h);const p=[];for(const h of c){const m=l[h],y=i.data[h];p.push({key:{status:"valid",value:h},value:m._parse(new In(i,y,i.path,h)),alwaysSet:h in i.data})}if(this._def.catchall instanceof qn){const h=this._def.unknownKeys;if(h==="passthrough")for(const m of d)p.push({key:{status:"valid",value:m},value:{status:"valid",value:i.data[m]}});else if(h==="strict")d.length>0&&(se(i,{code:ee.unrecognized_keys,keys:d}),o.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const m of d){const y=i.data[m];p.push({key:{status:"valid",value:m},value:h._parse(new In(i,y,i.path,m)),alwaysSet:m in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const h=[];for(const m of p){const y=await m.key,x=await m.value;h.push({key:y,value:x,alwaysSet:m.alwaysSet})}return h}).then(h=>bt.mergeObjectSync(o,h)):bt.mergeObjectSync(o,p)}get shape(){return this._def.shape()}strict(e){return fe.errToObj,new nt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,o)=>{var i,l,c,d;const p=(c=(l=(i=this._def).errorMap)===null||l===void 0?void 0:l.call(i,n,o).message)!==null&&c!==void 0?c:o.defaultError;return n.code==="unrecognized_keys"?{message:(d=fe.errToObj(e).message)!==null&&d!==void 0?d:p}:{message:p}}}:{}})}strip(){return new nt({...this._def,unknownKeys:"strip"})}passthrough(){return new nt({...this._def,unknownKeys:"passthrough"})}extend(e){return new nt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new nt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ce.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new nt({...this._def,catchall:e})}pick(e){const n={};return Ge.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(n[o]=this.shape[o])}),new nt({...this._def,shape:()=>n})}omit(e){const n={};return Ge.objectKeys(this.shape).forEach(o=>{e[o]||(n[o]=this.shape[o])}),new nt({...this._def,shape:()=>n})}deepPartial(){return po(this)}partial(e){const n={};return Ge.objectKeys(this.shape).forEach(o=>{const i=this.shape[o];e&&!e[o]?n[o]=i:n[o]=i.optional()}),new nt({...this._def,shape:()=>n})}required(e){const n={};return Ge.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])n[o]=this.shape[o];else{let l=this.shape[o];for(;l instanceof On;)l=l._def.innerType;n[o]=l}}),new nt({...this._def,shape:()=>n})}keyof(){return su(Ge.objectKeys(this.shape))}}nt.create=(t,e)=>new nt({shape:()=>t,unknownKeys:"strip",catchall:qn.create(),typeName:Ce.ZodObject,...Ae(e)}),nt.strictCreate=(t,e)=>new nt({shape:()=>t,unknownKeys:"strict",catchall:qn.create(),typeName:Ce.ZodObject,...Ae(e)}),nt.lazycreate=(t,e)=>new nt({shape:t,unknownKeys:"strip",catchall:qn.create(),typeName:Ce.ZodObject,...Ae(e)});class oi extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e),o=this._def.options;function i(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const c=l.map(d=>new Ut(d.ctx.common.issues));return se(n,{code:ee.invalid_union,unionErrors:c}),be}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(i);{let l;const c=[];for(const p of o){const h={...n,common:{...n.common,issues:[]},parent:null},m=p._parseSync({data:n.data,path:n.path,parent:h});if(m.status==="valid")return m;m.status==="dirty"&&!l&&(l={result:m,ctx:h}),h.common.issues.length&&c.push(h.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const d=c.map(p=>new Ut(p));return se(n,{code:ee.invalid_union,unionErrors:d}),be}}get options(){return this._def.options}}oi.create=(t,e)=>new oi({options:t,typeName:Ce.ZodUnion,...Ae(e)});const Kn=t=>t instanceof ai?Kn(t.schema):t instanceof hn?Kn(t.innerType()):t instanceof li?[t.value]:t instanceof pr?t.options:t instanceof ci?Ge.objectValues(t.enum):t instanceof di?Kn(t._def.innerType):t instanceof ni?[void 0]:t instanceof ri?[null]:t instanceof On?[void 0,...Kn(t.unwrap())]:t instanceof hr?[null,...Kn(t.unwrap())]:t instanceof ll||t instanceof hi?Kn(t.unwrap()):t instanceof ui?Kn(t._def.innerType):[];class _s extends Pe{_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}),be;const o=this.discriminator,i=n.data[o],l=this.optionsMap.get(i);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]}),be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,o){const i=new Map;for(const l of n){const c=Kn(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 d of c){if(i.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);i.set(d,l)}}return new _s({typeName:Ce.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Ae(o)})}}function al(t,e){const n=cr(t),o=cr(e);if(t===e)return{valid:!0,data:t};if(n===le.object&&o===le.object){const i=Ge.objectKeys(e),l=Ge.objectKeys(t).filter(d=>i.indexOf(d)!==-1),c={...t,...e};for(const d of l){const p=al(t[d],e[d]);if(!p.valid)return{valid:!1};c[d]=p.data}return{valid:!0,data:c}}else if(n===le.array&&o===le.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let l=0;l<t.length;l++){const c=t[l],d=e[l],p=al(c,d);if(!p.valid)return{valid:!1};i.push(p.data)}return{valid:!0,data:i}}else return n===le.date&&o===le.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ii extends Pe{_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=(l,c)=>{if(ol(l)||ol(c))return be;const d=al(l.value,c.value);return d.valid?((il(l)||il(c))&&n.dirty(),{status:n.value,value:d.data}):(se(o,{code:ee.invalid_intersection_types}),be)};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])=>i(l,c)):i(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}ii.create=(t,e,n)=>new ii({left:t,right:e,typeName:Ce.ZodIntersection,...Ae(n)});class Fn extends Pe{_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}),be;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"}),be;!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 l=[...o.data].map((c,d)=>{const p=this._def.items[d]||this._def.rest;return p?p._parse(new In(o,c,o.path,d)):null}).filter(c=>!!c);return o.common.async?Promise.all(l).then(c=>bt.mergeArray(n,c)):bt.mergeArray(n,l)}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:Ce.ZodTuple,rest:null,...Ae(e)})};class si extends Pe{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}),be;const i=[],l=this._def.keyType,c=this._def.valueType;for(const d in o.data)i.push({key:l._parse(new In(o,d,o.path,d)),value:c._parse(new In(o,o.data[d],o.path,d)),alwaysSet:d in o.data});return o.common.async?bt.mergeObjectAsync(n,i):bt.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,o){return n instanceof Pe?new si({keyType:e,valueType:n,typeName:Ce.ZodRecord,...Ae(o)}):new si({keyType:un.create(),valueType:e,typeName:Ce.ZodRecord,...Ae(n)})}}class Cs extends Pe{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}),be;const i=this._def.keyType,l=this._def.valueType,c=[...o.data.entries()].map(([d,p],h)=>({key:i._parse(new In(o,d,o.path,[h,"key"])),value:l._parse(new In(o,p,o.path,[h,"value"]))}));if(o.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const p of c){const h=await p.key,m=await p.value;if(h.status==="aborted"||m.status==="aborted")return be;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const p of c){const h=p.key,m=p.value;if(h.status==="aborted"||m.status==="aborted")return be;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}}}}Cs.create=(t,e,n)=>new Cs({valueType:e,keyType:t,typeName:Ce.ZodMap,...Ae(n)});class Ur extends Pe{_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}),be;const i=this._def;i.minSize!==null&&o.data.size<i.minSize.value&&(se(o,{code:ee.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&o.data.size>i.maxSize.value&&(se(o,{code:ee.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const l=this._def.valueType;function c(p){const h=new Set;for(const m of p){if(m.status==="aborted")return be;m.status==="dirty"&&n.dirty(),h.add(m.value)}return{status:n.value,value:h}}const d=[...o.data.values()].map((p,h)=>l._parse(new In(o,p,o.path,h)));return o.common.async?Promise.all(d).then(p=>c(p)):c(d)}min(e,n){return new Ur({...this._def,minSize:{value:e,message:fe.toString(n)}})}max(e,n){return new Ur({...this._def,maxSize:{value:e,message:fe.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Ur.create=(t,e)=>new Ur({valueType:t,minSize:null,maxSize:null,typeName:Ce.ZodSet,...Ae(e)});class ho extends Pe{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}),be;function o(d,p){return ms({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,fs(),lo].filter(h=>!!h),issueData:{code:ee.invalid_arguments,argumentsError:p}})}function i(d,p){return ms({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,fs(),lo].filter(h=>!!h),issueData:{code:ee.invalid_return_type,returnTypeError:p}})}const l={errorMap:n.common.contextualErrorMap},c=n.data;if(this._def.returns instanceof fo){const d=this;return At(async function(...p){const h=new Ut([]),m=await d._def.args.parseAsync(p,l).catch(w=>{throw h.addIssue(o(p,w)),h}),y=await Reflect.apply(c,this,m);return await d._def.returns._def.type.parseAsync(y,l).catch(w=>{throw h.addIssue(i(y,w)),h})})}else{const d=this;return At(function(...p){const h=d._def.args.safeParse(p,l);if(!h.success)throw new Ut([o(p,h.error)]);const m=Reflect.apply(c,this,h.data),y=d._def.returns.safeParse(m,l);if(!y.success)throw new Ut([i(m,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ho({...this._def,args:Fn.create(e).rest(zr.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||Fn.create([]).rest(zr.create()),returns:n||zr.create(),typeName:Ce.ZodFunction,...Ae(o)})}}class ai extends Pe{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})}}ai.create=(t,e)=>new ai({getter:t,typeName:Ce.ZodLazy,...Ae(e)});class li extends Pe{_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}),be}return{status:"valid",value:e.data}}get value(){return this._def.value}}li.create=(t,e)=>new li({value:t,typeName:Ce.ZodLiteral,...Ae(e)});function su(t,e){return new pr({values:t,typeName:Ce.ZodEnum,...Ae(e)})}class pr extends Pe{constructor(){super(...arguments),Qo.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),o=this._def.values;return se(n,{expected:Ge.joinValues(o),received:n.parsedType,code:ee.invalid_type}),be}if(gs(this,Qo)||tu(this,Qo,new Set(this._def.values)),!gs(this,Qo).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}),be}return At(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 pr.create(e,{...this._def,...n})}exclude(e,n=this._def){return pr.create(this.options.filter(o=>!e.includes(o)),{...this._def,...n})}}Qo=new WeakMap,pr.create=su;class ci extends Pe{constructor(){super(...arguments),ei.set(this,void 0)}_parse(e){const n=Ge.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==le.string&&o.parsedType!==le.number){const i=Ge.objectValues(n);return se(o,{expected:Ge.joinValues(i),received:o.parsedType,code:ee.invalid_type}),be}if(gs(this,ei)||tu(this,ei,new Set(Ge.getValidEnumValues(this._def.values))),!gs(this,ei).has(e.data)){const i=Ge.objectValues(n);return se(o,{received:o.data,code:ee.invalid_enum_value,options:i}),be}return At(e.data)}get enum(){return this._def.values}}ei=new WeakMap,ci.create=(t,e)=>new ci({values:t,typeName:Ce.ZodNativeEnum,...Ae(e)});class fo extends Pe{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}),be;const o=n.parsedType===le.promise?n.data:Promise.resolve(n.data);return At(o.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}fo.create=(t,e)=>new fo({type:t,typeName:Ce.ZodPromise,...Ae(e)});class hn extends Pe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ce.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=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),i.type==="preprocess"){const c=i.transform(o.data,l);if(o.common.async)return Promise.resolve(c).then(async d=>{if(n.value==="aborted")return be;const p=await this._def.schema._parseAsync({data:d,path:o.path,parent:o});return p.status==="aborted"?be:p.status==="dirty"||n.value==="dirty"?co(p.value):p});{if(n.value==="aborted")return be;const d=this._def.schema._parseSync({data:c,path:o.path,parent:o});return d.status==="aborted"?be:d.status==="dirty"||n.value==="dirty"?co(d.value):d}}if(i.type==="refinement"){const c=d=>{const p=i.refinement(d,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 d};if(o.common.async===!1){const d=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return d.status==="aborted"?be:(d.status==="dirty"&&n.dirty(),c(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(d=>d.status==="aborted"?be:(d.status==="dirty"&&n.dirty(),c(d.value).then(()=>({status:n.value,value:d.value}))))}if(i.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Yo(c))return c;const d=i.transform(c.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>Yo(c)?Promise.resolve(i.transform(c.value,l)).then(d=>({status:n.value,value:d})):c);Ge.assertNever(i)}}hn.create=(t,e,n)=>new hn({schema:t,typeName:Ce.ZodEffects,effect:e,...Ae(n)}),hn.createWithPreprocess=(t,e,n)=>new hn({schema:e,effect:{type:"preprocess",transform:t},typeName:Ce.ZodEffects,...Ae(n)});class On extends Pe{_parse(e){return this._getType(e)===le.undefined?At(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}On.create=(t,e)=>new On({innerType:t,typeName:Ce.ZodOptional,...Ae(e)});class hr extends Pe{_parse(e){return this._getType(e)===le.null?At(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}hr.create=(t,e)=>new hr({innerType:t,typeName:Ce.ZodNullable,...Ae(e)});class di extends Pe{_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}}di.create=(t,e)=>new di({innerType:t,typeName:Ce.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ae(e)});class ui extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Jo(i)?i.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Ut(o.common.issues)},input:o.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ut(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}ui.create=(t,e)=>new ui({innerType:t,typeName:Ce.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ae(e)});class ws extends Pe{_parse(e){if(this._getType(e)!==le.nan){const o=this._getOrReturnCtx(e);return se(o,{code:ee.invalid_type,expected:le.nan,received:o.parsedType}),be}return{status:"valid",value:e.data}}}ws.create=t=>new ws({typeName:Ce.ZodNaN,...Ae(t)});const ly=Symbol("zod_brand");class ll extends Pe{_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 pi extends Pe{_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"?be:l.status==="dirty"?(n.dirty(),co(l.value)):this._def.out._parseAsync({data:l.value,path:o.path,parent:o})})();{const i=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?be:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:o.path,parent:o})}}static create(e,n){return new pi({in:e,out:n,typeName:Ce.ZodPipeline})}}class hi extends Pe{_parse(e){const n=this._def.innerType._parse(e),o=i=>(Yo(i)&&(i.value=Object.freeze(i.value)),i);return Jo(n)?n.then(i=>o(i)):o(n)}unwrap(){return this._def.innerType}}hi.create=(t,e)=>new hi({innerType:t,typeName:Ce.ZodReadonly,...Ae(e)});function au(t,e={},n){return t?uo.create().superRefine((o,i)=>{var l,c;if(!t(o)){const d=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,p=(c=(l=d.fatal)!==null&&l!==void 0?l:n)!==null&&c!==void 0?c:!0,h=typeof d=="string"?{message:d}:d;i.addIssue({code:"custom",...h,fatal:p})}}):uo.create()}const cy={object:nt.lazycreate};var Ce;(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"})(Ce||(Ce={}));const dy=(t,e={message:`Input not instance of ${t.name}`})=>au(n=>n instanceof t,e),lu=un.create,cu=dr.create,uy=ws.create,py=ur.create,du=ti.create,hy=$r.create,fy=ys.create,my=ni.create,gy=ri.create,yy=uo.create,vy=zr.create,_y=qn.create,Cy=vs.create,wy=pn.create,by=nt.create,xy=nt.strictCreate,ky=oi.create,Sy=_s.create,Ey=ii.create,Ty=Fn.create,Ny=si.create,Ay=Cs.create,Vy=Ur.create,By=ho.create,Py=ai.create,Ry=li.create,Dy=pr.create,Iy=ci.create,Fy=fo.create,uu=hn.create,Oy=On.create,Ly=hr.create,My=hn.createWithPreprocess,Gy=pi.create;var Ln=Object.freeze({__proto__:null,defaultErrorMap:lo,setErrorMap:Wg,getErrorMap:fs,makeIssue:ms,EMPTY_PATH:jg,addIssueToContext:se,ParseStatus:bt,INVALID:be,DIRTY:co,OK:At,isAborted:ol,isDirty:il,isValid:Yo,isAsync:Jo,get util(){return Ge},get objectUtil(){return rl},ZodParsedType:le,getParsedType:cr,ZodType:Pe,datetimeRegex:iu,ZodString:un,ZodNumber:dr,ZodBigInt:ur,ZodBoolean:ti,ZodDate:$r,ZodSymbol:ys,ZodUndefined:ni,ZodNull:ri,ZodAny:uo,ZodUnknown:zr,ZodNever:qn,ZodVoid:vs,ZodArray:pn,ZodObject:nt,ZodUnion:oi,ZodDiscriminatedUnion:_s,ZodIntersection:ii,ZodTuple:Fn,ZodRecord:si,ZodMap:Cs,ZodSet:Ur,ZodFunction:ho,ZodLazy:ai,ZodLiteral:li,ZodEnum:pr,ZodNativeEnum:ci,ZodPromise:fo,ZodEffects:hn,ZodTransformer:hn,ZodOptional:On,ZodNullable:hr,ZodDefault:di,ZodCatch:ui,ZodNaN:ws,BRAND:ly,ZodBranded:ll,ZodPipeline:pi,ZodReadonly:hi,custom:au,Schema:Pe,ZodSchema:Pe,late:cy,get ZodFirstPartyTypeKind(){return Ce},coerce:{string:t=>un.create({...t,coerce:!0}),number:t=>dr.create({...t,coerce:!0}),boolean:t=>ti.create({...t,coerce:!0}),bigint:t=>ur.create({...t,coerce:!0}),date:t=>$r.create({...t,coerce:!0})},any:yy,array:wy,bigint:py,boolean:du,date:hy,discriminatedUnion:Sy,effect:uu,enum:Dy,function:By,instanceof:dy,intersection:Ey,lazy:Py,literal:Ry,map:Ay,nan:uy,nativeEnum:Iy,never:_y,null:gy,nullable:Ly,number:cu,object:by,oboolean:()=>du().optional(),onumber:()=>cu().optional(),optional:Oy,ostring:()=>lu().optional(),pipeline:Gy,preprocess:My,promise:Fy,record:Ny,set:Vy,strictObject:xy,string:lu,symbol:fy,transformer:uu,tuple:Ty,undefined:my,union:ky,unknown:vy,void:Cy,NEVER:be,ZodIssueCode:ee,quotelessJson:Zg,ZodError:Ut});function $y(t){throw new Error("Unexpected object: "+t)}const zy=-2147483648,pu=-9007199254740991n,Uy=NaN,Zy=NaN,Wy=null,jy=null;function hu(t,e){switch(e){case"Int":return t===zy;case"Long":return t===Number(pu)||t===pu;case"Float":return t===Uy;case"Double":return t===Zy;case"String":return t===Wy;case"Bytes":return t===jy;default:throw Error(`unsupported data type: ${e}`)}}function Hy(t,e){const n=Math.floor(e/8),o=1<<7-e%8;return(t[n]&o)>0}function cl(t){const{type:e,name:n,domain:o}=t;return{type:e,name:n,...o&&{domain:o}}}function fu(t){return t.map(cl)}function bs(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=>bs(n,e))};case"outer":return{type:"outer",primary:bs(t.primary,e),secondary:t.secondary.map(n=>bs(n,e))};default:$y(t)}}Ln.object({__isRef:Ln.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:Ln.string().describe("Upstream block id"),name:Ln.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 qy(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 Ky=Ln.object({type:Ln.string(),importance:Ln.number().optional(),id:Ln.string().optional(),label:Ln.string()});Ln.array(Ky);const Xy="1.14.1";function mu(){return qy({sdkVersion:Xy})}function Yy(t){if(typeof globalThis.getEnvironmentValue=="function")return globalThis.getEnvironmentValue(t)}function mo(t){return!!t&&typeof t.children<"u"}function fr(t){return mo(t)?t.groupId:t.colId}function gu(t,e,n){const o=(c,d)=>{const p=c.children.map(fr),h=T._includes(p,fr(d)),m=T._last(c.children),y=m&&fr(m)!==fr(d);return h&&y};if(!mo(t))return!0;const i=t,l=n;if(o(i,l))return i.children.push(l),!0;if(i.groupId===e){const c=i.children.map(fr);if(!T._includes(c,fr(l)))return i.children.push(l),!0}for(let c=i.children.length-1;c>=0&&!gu(i.children[c],e,n);c--);return!1}function Jy(t){const e=(i,l)=>mo(i)&&mo(l)&&fr(i)===fr(l),n=(i,l)=>{if(!mo(l))return i;const c=i,d=l;return d.children&&d.groupId&&gu(c,d.groupId,d.children[0])||d.children.forEach(p=>n(c,p)),c},o=[];for(let i=1;i<=t.length;i++){const l=t[i-1],c=t[i];e(l,c)?t[i]=n(l,c):o.push(l)}return o}var Qy=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="toolPanelColDefService"}wireBeans(t){this.columnModel=t.columnModel}createColumnTree(t){const e=[],n=(i,l)=>{if(mo(i)){const c=i,d=typeof c.groupId<"u"?c.groupId:c.headerName,p=new T.AgProvidedColumnGroup(c,d,!1,l),h=[];return c.children.forEach(m=>{const y=n(m,l+1);y&&h.push(y)}),p.setChildren(h),p}else{const c=i,d=c.colId?c.colId:c.field,p=this.columnModel.getColDefCol(d);return p||e.push(c),p}},o=[];return t.forEach(i=>{const l=n(i,0);l&&o.push(l)}),e.length>0&&T._warnOnce("unable to find grid columns for the supplied colDef(s):",e),o}syncLayoutWithGrid(t){const e=this.getLeafPathTrees(),n=Jy(e);t(n)}getLeafPathTrees(){const t=(o,i)=>{let l;if(T.isProvidedColumnGroup(o))if(o.isPadding())l=i;else{const d=Object.assign({},o.getColGroupDef());d.groupId=o.getGroupId(),d.children=[i],l=d}else{const d=Object.assign({},o.getColDef());d.colId=o.getColId(),l=d}const c=o.getOriginalParent();return c?t(c,l):l};return this.columnModel.getCols().filter(o=>{const i=o.getColDef();return o.isPrimary()&&!i.showRowGroup}).map(o=>t(o,o.getColDef()))}};function ev(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isDisplayed())??!1}function tv(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().setDisplayed(e)}function nv(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().setSideBarPosition(e)}function rv(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().openToolPanel(e,"api")}function ov(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().close("api")}function iv(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().openedItem())??null}function sv(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().refresh()}function av(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isToolPanelShowing())??!1}function lv(t,e){var o;const n=(o=t.sideBarService)==null?void 0:o.getSideBarComp().getToolPanelInstance(e);return T._unwrapUserComp(n)}function cv(t){var e;return(e=t.sideBarService)==null?void 0:e.getSideBarComp().getDef()}var dv=class extends T.Component{constructor(t){super(),this.eToggleButton=T.RefPlaceholder,this.eIconWrapper=T.RefPlaceholder,this.eLabel=T.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",T._createIconNoSpan(this.toolPanelDef.iconKey,this.gos))}onButtonPressed(){this.dispatchLocalEvent({type:"toggleButtonClicked"})}setSelected(t){this.addOrRemoveCssClass("ag-selected",t),T._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",T._createIconNoSpan(this.toolPanelDef.iconKey,this.gos))}onButtonPressed(){this.dispatchLocalEvent({type:"toggleButtonClicked"})}setSelected(t){this.addOrRemoveCssClass("ag-selected",t),T._setAriaExpanded(this.eToggleButton,t)}getButtonElement(){return this.eToggleButton}},uv=class extends T.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!==T.KeyCode.TAB||!t.shiftKey)){if(this.focusService.focusNextGridCoreContainer(!0)){t.preventDefault();return}T._stopPropagationForAgGrid(t)}}setActiveButton(t){this.buttonComps.forEach(e=>{e.setSelected(t===e.getToolPanelId())})}addButtonComp(t){const e=this.createBean(new dv(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),T._clearElement(this.getGui()),super.destroy()}destroy(){this.clearButtons(),super.destroy()}},pv={selector:"AG-SIDE-BAR-BUTTONS",component:uv},yu={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},vu={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},dl={columns:yu,filters:vu};function ul(t){if(!t)return;if(t===!0)return{toolPanels:[yu,vu],defaultToolPanel:"columns"};if(typeof t=="string")return ul([t]);if(Array.isArray(t)){const n=[];return t.forEach(o=>{const i=dl[o];if(!i){_u(o);return}n.push(i)}),n.length===0?void 0:{toolPanels:n,defaultToolPanel:n[0].id}}return{toolPanels:hv(t.toolPanels),defaultToolPanel:t.defaultToolPanel,hiddenByDefault:t.hiddenByDefault,position:t.position}}function _u(t){T._warnOnce(`the key ${t} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(dl).join(",")}`)}function hv(t){const e=[];return t&&t.forEach(n=>{let o=null;if(typeof n=="string"){const i=dl[n];if(!i){_u(n);return}o=i}else o=n;e.push(o)}),e}var fv=class extends T.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}},mv=class extends T.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 fv);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:i,width:l}=t;this.toolPanelId=n,this.width=l;const c=this.userComponentFactory.getToolPanelCompDetails(t,e),d=c.newAgStackInstance();if(this.params=c.params,d==null){T._warnOnce(`error processing tool panel component ${n}. You need to specify 'toolPanel'`);return}d.then(this.setToolPanelComponent.bind(this)),o!=null&&this.resizeBar.setMinWidth(o),i!=null&&this.resizeBar.setMaxWidth(i)}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)}},gv=class extends T.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>`,[uv]),this.sideBarButtons=T.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:ul(this.gos.get("sideBar")),sideBarState:t}),this.addManagedPropertyListener("sideBar",this.onSideBarUpdated.bind(this)),this.sideBarService.registerSideBarComp(this);const e=this.getFocusableElement();this.createManagedBean(new T.ManagedFocusFeature(e,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)})),T._addFocusableContainerListener(this,e,this.focusService)}onTabKeyDown(t){if(t.defaultPrevented)return;const{focusService:e,sideBarButtons:n}=this,o=this.getGui(),i=n.getGui(),l=T._getActiveDomElement(this.gos),c=o.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),d=t.target;if(!c)return e.focusNextGridCoreContainer(t.shiftKey,!0);if(i.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,d)&&t.shiftKey&&(p=this.focusService.findFocusableElementBeforeTabGuard(c,d)),p||(p=i.querySelector(".ag-selected button")),p&&p!==t.target&&(t.preventDefault(),p.focus())}handleKeyDown(t){const e=T._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")),i=o.findIndex(d=>d.contains(e));let l=null;switch(t.key){case T.KeyCode.LEFT:case T.KeyCode.UP:l=Math.max(0,i-1);break;case T.KeyCode.RIGHT:case T.KeyCode.DOWN:l=Math.min(i+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 i=e?e.visible:!this.sideBar.hiddenByDefault;if(this.setDisplayed(i),this.setSideBarPosition(e?e.position:this.sideBar.position),i)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 i of t)this.createToolPanelAndSideButton(i,(o=e==null?void 0:e.toolPanels)==null?void 0:o[i.id],n==null?void 0:n[i.id])}validateDef(t){var e;if(t.id==null)return T._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(T.ModuleNames.ColumnsToolPanelModule,"Column Tool Panel"))return!1;if(t.toolPanel==="agFiltersToolPanel"){if(!this.gos.assertModuleRegistered(T.ModuleNames.FiltersToolPanelModule,"Filters Tool Panel"))return!1;if((e=this.filterManager)!=null&&e.isAdvancedFilterEnabled())return T._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 i;n?i=n:(i=this.createBean(new fv),i.setToolPanelDef(t,{initialState:e,onStateUpdated:()=>this.dispatchSideBarUpdated()})),i.setDisplayed(!1);const l=i.getGui();this.appendChild(l),this.toolPanelWrappers.push(i),T._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){T._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=ul(this.gos.get("sideBar")),e={};t&&this.sideBar&&((n=t.toolPanels)==null||n.forEach(o=>{var h,m;const{id:i}=o;if(!i)return;const l=(h=this.sideBar.toolPanels)==null?void 0:h.find(y=>y.id===i);if(!l||o.toolPanel!==l.toolPanel)return;const c=this.toolPanelWrappers.find(y=>y.getToolPanelId()===i);if(!c)return;const d=this.gos.addGridCommonParams({...o.toolPanelParams??{},onStateUpdated:()=>this.dispatchSideBarUpdated()});((m=c.getToolPanelInstance())==null?void 0:m.refresh(d))===!0&&(this.toolPanelWrappers=this.toolPanelWrappers.filter(y=>y!==c),T._removeFromParent(c.getGui()),e[i]=c)})),this.clearDownUi(),this.setSideBarDef({sideBarDef:t,existingToolPanelWrappers:e})}dispatchSideBarUpdated(){this.eventService.dispatchEvent({type:"sideBarUpdated"})}destroyToolPanelWrappers(){this.toolPanelWrappers.forEach(t=>{T._removeFromParent(t.getGui()),this.destroyBean(t)}),this.toolPanelWrappers.length=0}destroy(){this.destroyToolPanelWrappers(),super.destroy()}},gv={selector:"AG-SIDE-BAR",component:mv},yv=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="sideBarService"}registerSideBarComp(t){this.sideBarComp=t}getSideBarComp(){return this.sideBarComp}getSideBarSelector(){return gv}},pl="32.3.3",Cu=T._defineModule({version:pl,moduleName:`${T.ModuleNames.SideBarModule}-core`,beans:[Jy,yv],dependantModules:[Me.EnterpriseCoreModule]}),vv=T._defineModule({version:pl,moduleName:`${T.ModuleNames.SideBarModule}-api`,apiFunctions:{isSideBarVisible:Qy,setSideBarVisible:ev,setSideBarPosition:tv,openToolPanel:nv,closeToolPanel:rv,getOpenedToolPanel:ov,refreshToolPanel:iv,isToolPanelShowing:sv,getToolPanelInstance:av,getSideBar:lv},dependantModules:[Cu]}),hl=T._defineModule({version:pl,moduleName:T.ModuleNames.SideBarModule,dependantModules:[Cu,vv]}),_v={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},Cv=class extends T.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=wv,t.first=bv,t.last=xv,t.min=kv,t.max=Sv,t.count=Ev,t.avg=Tv,this.initialised=!0}isAggFuncPossible(t,e){const n=this.getFuncNames(t),o=T._includes(n,e),i=T._exists(this.aggFuncsMap[e]);return o&&i}getDefaultFuncLabel(t){return _v[t]??t}getDefaultAggFunc(t){const e=t.getColDef().defaultAggFunc;if(T._exists(e)&&this.isAggFuncPossible(t,e))return e;if(this.isAggFuncPossible(t,"sum"))return"sum";const n=this.getFuncNames(t);return T._existsAndNotEmpty(n)?n[0]:null}addAggFuncs(t){this.init(),T._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 wv(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const i=e[o];typeof i=="number"?n===null?n=i:n+=typeof n=="number"?i:BigInt(i):typeof i=="bigint"&&(n===null?n=i:n=(typeof n=="bigint"?n:BigInt(n))+i)}return n}function bv(t){return t.values.length>0?t.values[0]:null}function xv(t){return t.values.length>0?T._last(t.values):null}function kv(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const i=e[o];(typeof i=="number"||typeof i=="bigint")&&(n===null||n>i)&&(n=i)}return n}function Sv(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const i=e[o];(typeof i=="number"||typeof i=="bigint")&&(n===null||n<i)&&(n=i)}return n}function Ev(t){var i,l;const{values:e}=t;let n=0;for(let c=0;c<e.length;c++){const d=e[c];n+=d!=null&&typeof d.value=="number"?d.value:1}const o=(l=(i=t.rowNode)==null?void 0:i.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 Tv(t){var c,d,p;const{values:e}=t;let n=0,o=0;for(let h=0;h<e.length;h++){const m=e[h];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 i=null;o>0&&(i=n/(typeof n=="number"?o:BigInt(o)));const l=(p=(c=t.rowNode)==null?void 0:c.aggData)==null?void 0:p[(d=t.column)==null?void 0:d.getColId()];return l&&l.count===o&&l.value===i?l:{count:o,value:i,toString:function(){return typeof this.value=="number"||typeof this.value=="bigint"?this.value.toString():""},toNumber:function(){return this.value}}}var Nv=class extends T.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=T._missingOrEmpty(this.funcColsService.getValueColumns()),n=!this.gos.getCallback("getGroupRowAgg"),o=t.changedPath&&t.changedPath.isActive();if(e&&n&&o)return;const i=this.createAggDetails(t);this.recursivelyCreateAggData(i)}createAggDetails(t){const e=this.columnModel.isPivotActive(),n=this.funcColsService.getValueColumns(),o=e?this.funcColsService.getPivotColumns():[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!T._getGrandTotalRow(this.gos),changedPath:t.changedPath,valueColumns:n,pivotColumns:o,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return T._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 i;e.userAggFunc?i=e.userAggFunc({nodes:t.childrenAfterFilter}):n?i=null:o?i=this.aggregateRowNodeUsingValuesOnly(t,e):i=this.aggregateRowNodeUsingValuesAndPivot(t),t.setAggData(i),t.sibling&&t.sibling.setAggData(i)}aggregateRowNodeUsingValuesAndPivot(t){var i;const e={},n=((i=this.pivotResultColsService.getPivotResultCols())==null?void 0:i.list)??[];let o=!0;for(let l=0;l<n.length;l++){const c=n[l],d=c.getColDef();if(d.pivotTotalColumnIds!=null){o=!1;continue}const p=d.pivotKeys??[];let h;t.leafGroup?h=this.getValuesFromMappedSet(t.childrenMapped,p,d.pivotValueColumn):h=this.getValuesPivotNonLeaf(t,d.colId),e[d.colId]=this.aggregateValues(h,d.pivotValueColumn.getAggFunc(),d.pivotValueColumn,t,c)}if(!o)for(let l=0;l<n.length;l++){const c=n[l],d=c.getColDef();if(d.pivotTotalColumnIds==null||!d.pivotTotalColumnIds.length)continue;const p=d.pivotTotalColumnIds.map(h=>e[h]);e[d.colId]=this.aggregateValues(p,d.pivotValueColumn.getAggFunc(),d.pivotValueColumn,t,c)}return e}aggregateRowNodeUsingValuesOnly(t,e){const n={},o=e.changedPath.isActive()?e.changedPath.getValueColumnsForNode(t,e.valueColumns):e.valueColumns,i=e.changedPath.isActive()?e.changedPath.getNotValueColumnsForNode(t,e.valueColumns):null,l=this.getValuesNormal(t,o,e.filteredOnly),c=t.aggData;return o.forEach((d,p)=>{n[d.getId()]=this.aggregateValues(l[p],d.getAggFunc(),d,t)}),i&&c&&i.forEach(d=>{n[d.getId()]=c[d.getId()]}),n}getValuesPivotNonLeaf(t,e){return t.childrenAfterFilter.map(n=>n.aggData[e])}getValuesFromMappedSet(t,e,n){let o=t;for(let i=0;i<e.length;i++){const l=e[i];o=o?o[l]:null}return o?o.map(i=>this.valueService.getValue(n,i)):[]}getValuesNormal(t,e,n){const o=[];e.forEach(()=>o.push([]));const i=e.length,l=n?t.childrenAfterFilter:t.childrenAfterGroup,c=l.length;for(let d=0;d<c;d++){const p=l[d];for(let h=0;h<i;h++){const m=e[h],y=this.valueService.getValue(m,p);o[h].push(y)}}return o}aggregateValues(t,e,n,o,i){const l=typeof e=="string"?this.aggFuncService.getAggFunc(e):e;if(typeof l!="function")return T._errorOnce(`unrecognised aggregation function ${e}`),null;const c=l,d=this.gos.addGridCommonParams({values:t,column:n,colDef:n?n.getColDef():void 0,pivotResultColumn:i,rowNode:o,data:o?o.data:void 0});return c(d)}},Av=class extends T.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=T._isGroupMultiAutoColumn(this.gos);return n&&o&&(T._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((i,l)=>{e.push(this.createOneAutoCol(i,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=`${T.GROUP_AUTO_COLUMN_ID}-${t.getId()}`:n=T.GROUP_AUTO_COLUMN_ID;const o=this.createAutoColDef(n,t,e);o.colId=n;const i=new T.AgColumn(o,null,n,!0);return this.createBean(i),i}updateOneAutoCol(t,e,n){const o=t.getColDef(),i=typeof o.showRowGroup=="string"?o.showRowGroup:void 0,l=i!=null?this.columnModel.getColDefCol(i):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 i=this.gos.get("autoGroupColumnDef");T._mergeDeep(o,i),o=this.columnFactory.addColumnDefaultAndTypes(o,t),this.gos.get("treeData")||T._missing(o.field)&&T._missing(o.valueGetter)&&T._missing(o.filterValueGetter)&&o.filter!=="agGroupColumnFilter"&&(o.filter=!1),n&&n>0&&(o.headerCheckboxSelection=!1);const l=T._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}},Vv=class extends Me.PillDragComp{constructor(t,e,n,o,i){super(e,n,i,`
|
|
10
|
+
</div>`,[pv]),this.sideBarButtons=T.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:ul(this.gos.get("sideBar")),sideBarState:t}),this.addManagedPropertyListener("sideBar",this.onSideBarUpdated.bind(this)),this.sideBarService.registerSideBarComp(this);const e=this.getFocusableElement();this.createManagedBean(new T.ManagedFocusFeature(e,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)})),T._addFocusableContainerListener(this,e,this.focusService)}onTabKeyDown(t){if(t.defaultPrevented)return;const{focusService:e,sideBarButtons:n}=this,o=this.getGui(),i=n.getGui(),l=T._getActiveDomElement(this.gos),c=o.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),d=t.target;if(!c)return e.focusNextGridCoreContainer(t.shiftKey,!0);if(i.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,d)&&t.shiftKey&&(p=this.focusService.findFocusableElementBeforeTabGuard(c,d)),p||(p=i.querySelector(".ag-selected button")),p&&p!==t.target&&(t.preventDefault(),p.focus())}handleKeyDown(t){const e=T._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")),i=o.findIndex(d=>d.contains(e));let l=null;switch(t.key){case T.KeyCode.LEFT:case T.KeyCode.UP:l=Math.max(0,i-1);break;case T.KeyCode.RIGHT:case T.KeyCode.DOWN:l=Math.min(i+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 i=e?e.visible:!this.sideBar.hiddenByDefault;if(this.setDisplayed(i),this.setSideBarPosition(e?e.position:this.sideBar.position),i)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 i of t)this.createToolPanelAndSideButton(i,(o=e==null?void 0:e.toolPanels)==null?void 0:o[i.id],n==null?void 0:n[i.id])}validateDef(t){var e;if(t.id==null)return T._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(T.ModuleNames.ColumnsToolPanelModule,"Column Tool Panel"))return!1;if(t.toolPanel==="agFiltersToolPanel"){if(!this.gos.assertModuleRegistered(T.ModuleNames.FiltersToolPanelModule,"Filters Tool Panel"))return!1;if((e=this.filterManager)!=null&&e.isAdvancedFilterEnabled())return T._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 i;n?i=n:(i=this.createBean(new mv),i.setToolPanelDef(t,{initialState:e,onStateUpdated:()=>this.dispatchSideBarUpdated()})),i.setDisplayed(!1);const l=i.getGui();this.appendChild(l),this.toolPanelWrappers.push(i),T._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){T._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=ul(this.gos.get("sideBar")),e={};t&&this.sideBar&&((n=t.toolPanels)==null||n.forEach(o=>{var h,m;const{id:i}=o;if(!i)return;const l=(h=this.sideBar.toolPanels)==null?void 0:h.find(y=>y.id===i);if(!l||o.toolPanel!==l.toolPanel)return;const c=this.toolPanelWrappers.find(y=>y.getToolPanelId()===i);if(!c)return;const d=this.gos.addGridCommonParams({...o.toolPanelParams??{},onStateUpdated:()=>this.dispatchSideBarUpdated()});((m=c.getToolPanelInstance())==null?void 0:m.refresh(d))===!0&&(this.toolPanelWrappers=this.toolPanelWrappers.filter(y=>y!==c),T._removeFromParent(c.getGui()),e[i]=c)})),this.clearDownUi(),this.setSideBarDef({sideBarDef:t,existingToolPanelWrappers:e})}dispatchSideBarUpdated(){this.eventService.dispatchEvent({type:"sideBarUpdated"})}destroyToolPanelWrappers(){this.toolPanelWrappers.forEach(t=>{T._removeFromParent(t.getGui()),this.destroyBean(t)}),this.toolPanelWrappers.length=0}destroy(){this.destroyToolPanelWrappers(),super.destroy()}},yv={selector:"AG-SIDE-BAR",component:gv},vv=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="sideBarService"}registerSideBarComp(t){this.sideBarComp=t}getSideBarComp(){return this.sideBarComp}getSideBarSelector(){return yv}},pl="32.3.3",Cu=T._defineModule({version:pl,moduleName:`${T.ModuleNames.SideBarModule}-core`,beans:[Qy,vv],dependantModules:[Me.EnterpriseCoreModule]}),_v=T._defineModule({version:pl,moduleName:`${T.ModuleNames.SideBarModule}-api`,apiFunctions:{isSideBarVisible:ev,setSideBarVisible:tv,setSideBarPosition:nv,openToolPanel:rv,closeToolPanel:ov,getOpenedToolPanel:iv,refreshToolPanel:sv,isToolPanelShowing:av,getToolPanelInstance:lv,getSideBar:cv},dependantModules:[Cu]}),hl=T._defineModule({version:pl,moduleName:T.ModuleNames.SideBarModule,dependantModules:[Cu,_v]}),Cv={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},wv=class extends T.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=bv,t.first=xv,t.last=kv,t.min=Sv,t.max=Ev,t.count=Tv,t.avg=Nv,this.initialised=!0}isAggFuncPossible(t,e){const n=this.getFuncNames(t),o=T._includes(n,e),i=T._exists(this.aggFuncsMap[e]);return o&&i}getDefaultFuncLabel(t){return Cv[t]??t}getDefaultAggFunc(t){const e=t.getColDef().defaultAggFunc;if(T._exists(e)&&this.isAggFuncPossible(t,e))return e;if(this.isAggFuncPossible(t,"sum"))return"sum";const n=this.getFuncNames(t);return T._existsAndNotEmpty(n)?n[0]:null}addAggFuncs(t){this.init(),T._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 bv(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const i=e[o];typeof i=="number"?n===null?n=i:n+=typeof n=="number"?i:BigInt(i):typeof i=="bigint"&&(n===null?n=i:n=(typeof n=="bigint"?n:BigInt(n))+i)}return n}function xv(t){return t.values.length>0?t.values[0]:null}function kv(t){return t.values.length>0?T._last(t.values):null}function Sv(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const i=e[o];(typeof i=="number"||typeof i=="bigint")&&(n===null||n>i)&&(n=i)}return n}function Ev(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const i=e[o];(typeof i=="number"||typeof i=="bigint")&&(n===null||n<i)&&(n=i)}return n}function Tv(t){var i,l;const{values:e}=t;let n=0;for(let c=0;c<e.length;c++){const d=e[c];n+=d!=null&&typeof d.value=="number"?d.value:1}const o=(l=(i=t.rowNode)==null?void 0:i.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 Nv(t){var c,d,p;const{values:e}=t;let n=0,o=0;for(let h=0;h<e.length;h++){const m=e[h];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 i=null;o>0&&(i=n/(typeof n=="number"?o:BigInt(o)));const l=(p=(c=t.rowNode)==null?void 0:c.aggData)==null?void 0:p[(d=t.column)==null?void 0:d.getColId()];return l&&l.count===o&&l.value===i?l:{count:o,value:i,toString:function(){return typeof this.value=="number"||typeof this.value=="bigint"?this.value.toString():""},toNumber:function(){return this.value}}}var Av=class extends T.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=T._missingOrEmpty(this.funcColsService.getValueColumns()),n=!this.gos.getCallback("getGroupRowAgg"),o=t.changedPath&&t.changedPath.isActive();if(e&&n&&o)return;const i=this.createAggDetails(t);this.recursivelyCreateAggData(i)}createAggDetails(t){const e=this.columnModel.isPivotActive(),n=this.funcColsService.getValueColumns(),o=e?this.funcColsService.getPivotColumns():[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!T._getGrandTotalRow(this.gos),changedPath:t.changedPath,valueColumns:n,pivotColumns:o,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return T._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 i;e.userAggFunc?i=e.userAggFunc({nodes:t.childrenAfterFilter}):n?i=null:o?i=this.aggregateRowNodeUsingValuesOnly(t,e):i=this.aggregateRowNodeUsingValuesAndPivot(t),t.setAggData(i),t.sibling&&t.sibling.setAggData(i)}aggregateRowNodeUsingValuesAndPivot(t){var i;const e={},n=((i=this.pivotResultColsService.getPivotResultCols())==null?void 0:i.list)??[];let o=!0;for(let l=0;l<n.length;l++){const c=n[l],d=c.getColDef();if(d.pivotTotalColumnIds!=null){o=!1;continue}const p=d.pivotKeys??[];let h;t.leafGroup?h=this.getValuesFromMappedSet(t.childrenMapped,p,d.pivotValueColumn):h=this.getValuesPivotNonLeaf(t,d.colId),e[d.colId]=this.aggregateValues(h,d.pivotValueColumn.getAggFunc(),d.pivotValueColumn,t,c)}if(!o)for(let l=0;l<n.length;l++){const c=n[l],d=c.getColDef();if(d.pivotTotalColumnIds==null||!d.pivotTotalColumnIds.length)continue;const p=d.pivotTotalColumnIds.map(h=>e[h]);e[d.colId]=this.aggregateValues(p,d.pivotValueColumn.getAggFunc(),d.pivotValueColumn,t,c)}return e}aggregateRowNodeUsingValuesOnly(t,e){const n={},o=e.changedPath.isActive()?e.changedPath.getValueColumnsForNode(t,e.valueColumns):e.valueColumns,i=e.changedPath.isActive()?e.changedPath.getNotValueColumnsForNode(t,e.valueColumns):null,l=this.getValuesNormal(t,o,e.filteredOnly),c=t.aggData;return o.forEach((d,p)=>{n[d.getId()]=this.aggregateValues(l[p],d.getAggFunc(),d,t)}),i&&c&&i.forEach(d=>{n[d.getId()]=c[d.getId()]}),n}getValuesPivotNonLeaf(t,e){return t.childrenAfterFilter.map(n=>n.aggData[e])}getValuesFromMappedSet(t,e,n){let o=t;for(let i=0;i<e.length;i++){const l=e[i];o=o?o[l]:null}return o?o.map(i=>this.valueService.getValue(n,i)):[]}getValuesNormal(t,e,n){const o=[];e.forEach(()=>o.push([]));const i=e.length,l=n?t.childrenAfterFilter:t.childrenAfterGroup,c=l.length;for(let d=0;d<c;d++){const p=l[d];for(let h=0;h<i;h++){const m=e[h],y=this.valueService.getValue(m,p);o[h].push(y)}}return o}aggregateValues(t,e,n,o,i){const l=typeof e=="string"?this.aggFuncService.getAggFunc(e):e;if(typeof l!="function")return T._errorOnce(`unrecognised aggregation function ${e}`),null;const c=l,d=this.gos.addGridCommonParams({values:t,column:n,colDef:n?n.getColDef():void 0,pivotResultColumn:i,rowNode:o,data:o?o.data:void 0});return c(d)}},Vv=class extends T.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=T._isGroupMultiAutoColumn(this.gos);return n&&o&&(T._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((i,l)=>{e.push(this.createOneAutoCol(i,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=`${T.GROUP_AUTO_COLUMN_ID}-${t.getId()}`:n=T.GROUP_AUTO_COLUMN_ID;const o=this.createAutoColDef(n,t,e);o.colId=n;const i=new T.AgColumn(o,null,n,!0);return this.createBean(i),i}updateOneAutoCol(t,e,n){const o=t.getColDef(),i=typeof o.showRowGroup=="string"?o.showRowGroup:void 0,l=i!=null?this.columnModel.getColDefCol(i):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 i=this.gos.get("autoGroupColumnDef");T._mergeDeep(o,i),o=this.columnFactory.addColumnDefaultAndTypes(o,t),this.gos.get("treeData")||T._missing(o.field)&&T._missing(o.valueGetter)&&T._missing(o.filterValueGetter)&&o.filter!=="agGroupColumnFilter"&&(o.filter=!1),n&&n>0&&(o.headerCheckboxSelection=!1);const l=T._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}},Bv=class extends Me.PillDragComp{constructor(t,e,n,o,i){super(e,n,i,`
|
|
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
|
-
`,[T.SortIndicatorSelector]),this.column=t,this.dropZonePurpose=o,this.eSortIndicator=T.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 i=e("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");t.push(i)}if(this.isGroupingZone()&&this.column.isSortable()&&!n){const i=e("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");t.push(i)}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 "),i={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&&`, ${i[l]}`].filter(d=>!!d).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===T.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===T.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 Me.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 i=T._loadTemplate('<div class="ag-select-agg-func-popup"></div>');i.style.top="0px",i.style.left="0px",i.appendChild(o),i.style.width=`${n.clientWidth}px`;const[l]=this.addManagedElementListeners(i,{focusout:m=>{!i.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()},d=this.localeService.getLocaleTextFunc(),p=this.popupService.addPopup({modal:!0,eChild:i,closeOnEsc:!0,closedCallback:c,ariaLabel:d("ariaLabelAggregationFunction","Aggregation Function")});p&&t.setComponentCreator(this.createAggSelect.bind(this,p.hideFunc)),t.addGuiEventListener("keydown",m=>{if(m.key===T.KeyCode.ENTER||m.key===T.KeyCode.SPACE){const y=t.getLastFocusedRow();if(y==null)return;const x=t.getComponentAt(y);x&&x.selectItem()}}),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:n,ePopup:i,keepWithinBounds:!0,column:this.column,position:"under"}),t.refresh();let h=e.findIndex(m=>m===this.column.getAggFunc());h===-1&&(h=0),t.focusRow(h)}createAggSelect(t,e){const n=()=>{t(),this.getGui().focus(),this.funcColsService.setColumnAggFunc(this.column,e,"toolPanelDragAndDrop")},o=this.localeService.getLocaleTextFunc(),i=e.toString(),l=o(i,i);return new Bv(n,l)}isGroupingAndLocked(){return this.isGroupingZone()&&this.columnModel.isColGroupLocked(this.column)}isAggregationZone(){return this.dropZonePurpose==="aggregation"}isGroupingZone(){return this.dropZonePurpose==="rowGroup"}getDragSourceType(){return T.DragSourceType.ToolPanel}destroy(){super.destroy(),this.column=null}},Bv=class extends T.Component{constructor(t,e){super('<div class="ag-select-agg-func-item"/>'),this.selectItem=t,this.getGui().innerText=e,this.addGuiEventListener("click",this.selectItem)}},fl=class extends Me.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===T.DragSourceType.HeaderCell||t===T.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(i=>!i.getColDef().lockVisible);this.columnModel.setColsVisible(o,e,n)}}isRowGroupPanel(){return this.dropZonePurpose==="rowGroup"}createPillComponent(t,e,n,o){return new Vv(t,e,n,this.dropZonePurpose,o)}},ml=class extends fl{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:T._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()}},gl=class extends fl{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:T._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()}},Pv=class extends T.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"),T._setAriaRole(t,"presentation"),this.rowGroupComp=new gl(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new ml(!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)}},Rv={selector:"AG-GRID-HEADER-DROP-ZONES",component:Pv},Dv=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="columnDropZonesService"}getDropZoneSelector(){return Rv}},Iv=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="filterAggregatesStage"}wireBeans(t){this.filterManager=t.filterManager,this.columnModel=t.columnModel}execute(t){var h,m;const e=this.columnModel.isPivotMode(),n=((h=this.filterManager)==null?void 0:h.isAggregateFilterPresent())||((m=this.filterManager)==null?void 0:m.isAggregateQuickFilterPresent()),o=y=>!y.node.group,i=y=>y.node.leafGroup,l=T._getGroupAggFiltering(this.gos)||(e?i:o),{changedPath:c}=t,d=(y,x=!1)=>{y.childrenAfterFilter&&(y.childrenAfterAggFilter=y.childrenAfterFilter,x&&y.childrenAfterAggFilter.forEach(w=>d(w,x)),this.setAllChildrenCount(y)),y.sibling&&(y.sibling.childrenAfterAggFilter=y.childrenAfterAggFilter)},p=y=>{var x;y.childrenAfterAggFilter=((x=y.childrenAfterFilter)==null?void 0:x.filter(w=>{var G;return l({node:w})&&this.filterManager.doesRowPassAggregateFilters({rowNode:w})?(d(w,!0),!0):(G=w.childrenAfterAggFilter)==null?void 0:G.length}))||null,this.setAllChildrenCount(y),y.sibling&&(y.sibling.childrenAfterAggFilter=y.childrenAfterAggFilter)};c.forEachChangedNodeDepthFirst(n?p:d,!0)}setAllChildrenCountTreeData(t){const e=t.childrenAfterAggFilter;let n=0;if(e){const o=e.length;n=o;for(let i=0;i<o;++i)n+=e[i].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)}},Fv=class extends T.TabGuardComp{constructor(){super(`
|
|
17
|
+
`,[T.SortIndicatorSelector]),this.column=t,this.dropZonePurpose=o,this.eSortIndicator=T.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 i=e("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");t.push(i)}if(this.isGroupingZone()&&this.column.isSortable()&&!n){const i=e("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");t.push(i)}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 "),i={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&&`, ${i[l]}`].filter(d=>!!d).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===T.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===T.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 Me.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 i=T._loadTemplate('<div class="ag-select-agg-func-popup"></div>');i.style.top="0px",i.style.left="0px",i.appendChild(o),i.style.width=`${n.clientWidth}px`;const[l]=this.addManagedElementListeners(i,{focusout:m=>{!i.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()},d=this.localeService.getLocaleTextFunc(),p=this.popupService.addPopup({modal:!0,eChild:i,closeOnEsc:!0,closedCallback:c,ariaLabel:d("ariaLabelAggregationFunction","Aggregation Function")});p&&t.setComponentCreator(this.createAggSelect.bind(this,p.hideFunc)),t.addGuiEventListener("keydown",m=>{if(m.key===T.KeyCode.ENTER||m.key===T.KeyCode.SPACE){const y=t.getLastFocusedRow();if(y==null)return;const x=t.getComponentAt(y);x&&x.selectItem()}}),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:n,ePopup:i,keepWithinBounds:!0,column:this.column,position:"under"}),t.refresh();let h=e.findIndex(m=>m===this.column.getAggFunc());h===-1&&(h=0),t.focusRow(h)}createAggSelect(t,e){const n=()=>{t(),this.getGui().focus(),this.funcColsService.setColumnAggFunc(this.column,e,"toolPanelDragAndDrop")},o=this.localeService.getLocaleTextFunc(),i=e.toString(),l=o(i,i);return new Pv(n,l)}isGroupingAndLocked(){return this.isGroupingZone()&&this.columnModel.isColGroupLocked(this.column)}isAggregationZone(){return this.dropZonePurpose==="aggregation"}isGroupingZone(){return this.dropZonePurpose==="rowGroup"}getDragSourceType(){return T.DragSourceType.ToolPanel}destroy(){super.destroy(),this.column=null}},Pv=class extends T.Component{constructor(t,e){super('<div class="ag-select-agg-func-item"/>'),this.selectItem=t,this.getGui().innerText=e,this.addGuiEventListener("click",this.selectItem)}},fl=class extends Me.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===T.DragSourceType.HeaderCell||t===T.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(i=>!i.getColDef().lockVisible);this.columnModel.setColsVisible(o,e,n)}}isRowGroupPanel(){return this.dropZonePurpose==="rowGroup"}createPillComponent(t,e,n,o){return new Bv(t,e,n,this.dropZonePurpose,o)}},ml=class extends fl{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:T._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()}},gl=class extends fl{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:T._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()}},Rv=class extends T.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"),T._setAriaRole(t,"presentation"),this.rowGroupComp=new gl(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new ml(!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)}},Dv={selector:"AG-GRID-HEADER-DROP-ZONES",component:Rv},Iv=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="columnDropZonesService"}getDropZoneSelector(){return Dv}},Fv=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="filterAggregatesStage"}wireBeans(t){this.filterManager=t.filterManager,this.columnModel=t.columnModel}execute(t){var h,m;const e=this.columnModel.isPivotMode(),n=((h=this.filterManager)==null?void 0:h.isAggregateFilterPresent())||((m=this.filterManager)==null?void 0:m.isAggregateQuickFilterPresent()),o=y=>!y.node.group,i=y=>y.node.leafGroup,l=T._getGroupAggFiltering(this.gos)||(e?i:o),{changedPath:c}=t,d=(y,x=!1)=>{y.childrenAfterFilter&&(y.childrenAfterAggFilter=y.childrenAfterFilter,x&&y.childrenAfterAggFilter.forEach(w=>d(w,x)),this.setAllChildrenCount(y)),y.sibling&&(y.sibling.childrenAfterAggFilter=y.childrenAfterAggFilter)},p=y=>{var x;y.childrenAfterAggFilter=((x=y.childrenAfterFilter)==null?void 0:x.filter(w=>{var $;return l({node:w})&&this.filterManager.doesRowPassAggregateFilters({rowNode:w})?(d(w,!0),!0):($=w.childrenAfterAggFilter)==null?void 0:$.length}))||null,this.setAllChildrenCount(y),y.sibling&&(y.sibling.childrenAfterAggFilter=y.childrenAfterAggFilter)};c.forEachChangedNodeDepthFirst(n?p:d,!0)}setAllChildrenCountTreeData(t){const e=t.childrenAfterAggFilter;let n=0;if(e){const o=e.length;n=o;for(let i=0;i<o;++i)n+=e[i].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)}},Ov=class extends T.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=T.RefPlaceholder,this.eUnderlyingFilter=T.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&&T._warnOnce('Group Column Filter does not work with the colDef property "field". This property will be ignored.'),t.filterValueGetter&&T._warnOnce('Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.'),t.filterParams&&T._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 T._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||(T._warnOnce("Group Column Filter only works on group columns. Please use a different filter."),[])}updateGroupField(){T._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],T._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(T._loadTemplate('<div class="ag-filter-separator"></div>')),T._setDisplayed(this.eGroupField,!0)),e):(this.selectedColumn=void 0,T._setDisplayed(this.eGroupField,!1),null)}createGroupFieldSelectElement(t){this.eGroupFieldSelect=this.createManagedBean(new T.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"),T.AgPromise.resolve();const e=[],n=[];return t.forEach(o=>{const i=this.filterManager.getOrCreateFilterWrapper(o);i!=null&&i.filterPromise&&e.push(i.filterPromise.then(l=>(l&&n.push({filter:l,column:o}),o.getId()===this.selectedColumn.getId()&&(this.selectedFilter=l??void 0),l)))}),T.AgPromise.all(e).then(()=>{this.filterColumnPairs=n,this.groupColumn.setFilterActive(this.isFilterActive(),"columnRowGroupChanged")})}addUnderlyingFilterElement(){var e;if(T._clearElement(this.eUnderlyingFilter),!this.selectedColumn)return T.AgPromise.resolve();const t=this.createManagedBean(new T.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()}))??T.AgPromise.resolve()):T.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 T.AgPromise.resolve()}afterGuiAttached(t){this.afterGuiAttachedParams=t,this.addUnderlyingFilterElement()}afterGuiDetached(){var t,e;T._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:i})=>i.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=T.RefPlaceholder,this.eUnderlyingFilter=T.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&&T._warnOnce('Group Column Filter does not work with the colDef property "field". This property will be ignored.'),t.filterValueGetter&&T._warnOnce('Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.'),t.filterParams&&T._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 T._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||(T._warnOnce("Group Column Filter only works on group columns. Please use a different filter."),[])}updateGroupField(){T._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],T._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(T._loadTemplate('<div class="ag-filter-separator"></div>')),T._setDisplayed(this.eGroupField,!0)),e):(this.selectedColumn=void 0,T._setDisplayed(this.eGroupField,!1),null)}createGroupFieldSelectElement(t){this.eGroupFieldSelect=this.createManagedBean(new T.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"),T.AgPromise.resolve();const e=[],n=[];return t.forEach(o=>{const i=this.filterManager.getOrCreateFilterWrapper(o);i!=null&&i.filterPromise&&e.push(i.filterPromise.then(l=>(l&&n.push({filter:l,column:o}),o.getId()===this.selectedColumn.getId()&&(this.selectedFilter=l??void 0),l)))}),T.AgPromise.all(e).then(()=>{this.filterColumnPairs=n,this.groupColumn.setFilterActive(this.isFilterActive(),"columnRowGroupChanged")})}addUnderlyingFilterElement(){var e;if(T._clearElement(this.eUnderlyingFilter),!this.selectedColumn)return T.AgPromise.resolve();const t=this.createManagedBean(new T.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()}))??T.AgPromise.resolve()):T.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 T.AgPromise.resolve()}afterGuiAttached(t){this.afterGuiAttachedParams=t,this.addUnderlyingFilterElement()}afterGuiDetached(){var t,e;T._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:i})=>i.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()}},Lv=class extends T.Component{constructor(){super(`
|
|
23
23
|
<div data-ref="eFloatingFilter" class="ag-group-floating-filter ag-floating-filter-input" role="presentation"></div>
|
|
24
|
-
`),this.eFloatingFilter=T.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 T.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 T.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,T._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,i;this.underlyingFloatingFilter=n,(i=this.underlyingFloatingFilter)==null||i.onParentModelChanged((o=this.parentFilterInstance.getSelectedFilter())==null?void 0:o.getModel()),this.appendChild(n.getGui()),this.showingUnderlyingFloatingFilter=!0})}return this.setupReadOnlyFloatingFilterElement(),T.AgPromise.resolve()}onColumnVisibleChanged(){this.setupUnderlyingFloatingFilterElement()}onColDefChanged(t){var n,o,i;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):(i=(o=this.underlyingFloatingFilter)==null?void 0:o.onParamsUpdated)==null||i.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()}},yl=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(i=>!e.removeFromChildrenAfterGroup[i.id]),t.allLeafChildren=((o=t.allLeafChildren)==null?void 0:o.filter(i=>!e.removeFromAllLeafChildren[i.id]))??null,t.updateHasChildren();const n=t.sibling;n&&(n.childrenAfterGroup=t.childrenAfterGroup,n.allLeafChildren=t.allLeafChildren)}),this.allSets={},this.allParents.length=0}};function Lv(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(wu(t[o-1],t[o])>0){n=!0;break}return n?(t.sort(wu),!0):!1}function wu(t,e){const n=t.sourceRowIndex,o=e.sourceRowIndex,i=n>=0,l=o>=0,c=i&&l,d=!i&&!l;return c?n-o:d?t.__objectId-e.__objectId:i?1:-1}var Mv=class extends T.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 i;e.childrenAfterGroup.forEach(l=>{var c;(c=l.childrenAfterGroup)!=null&&c.length?l.key===""&&!i?i=l:o.push(l):n.push(l)}),i&&o.push(i),e.childrenAfterGroup=[...n,...o]}},!1)}createGroupingDetails(t){const{rowNode:e,changedPath:n,rowNodeTransactions:o,rowNodesOrderChanged:i}=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:!!i,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(d=>d.getColDef().keyCreator))??[]}}handleTransaction(t){t.transactions.forEach(e=>{const n=new yl;T._existsAndNotEmpty(e.remove)&&this.removeNodes(e.remove,t,n),T._existsAndNotEmpty(e.update)&&this.moveNodesInWrongPath(e.update,t,n),T._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=>{Lv(e.childrenAfterGroup)&&t.changedPath.addParentNode(e)},!1,!0)}orderGroups(t){const e=t.initialGroupOrderComparator;T._exists(e)&&n(t.rootNode);function n(o){T._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 i=p=>p.key,l=this.getExistingPathForNode(o,e).map(i),c=this.getGroupInfo(o,e).map(i);T._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,i=n||new yl;t.forEach(l=>{this.removeFromParent(l,i),this.forEachParentGroup(e,l.parent,c=>{i.removeFromAllLeafChildren(c,l)})}),o&&i.flush()}removeEmptyGroups(t,e){let n=!0;const o=i=>{var p;const l=this.getChildrenMappedKey(i.key,i.rowGroupColumn),c=i.parent;return(c!=null&&c.childrenMapped?!c.childrenMapped[l]:!0)?!1:!!i.group&&(((p=i.childrenAfterGroup)==null?void 0:p.length)??0)===0};for(;n;){n=!1;const i=new yl;t.forEach(l=>{this.forEachParentGroup(e,l,c=>{o(c)&&(n=!0,this.removeFromParent(c,i),c.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))})}),i.flush()}}removeFromParent(t,e){var o;t.parent&&(e?e.removeFromChildrenAfterGroup(t.parent,t):(T._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:T._areEqual(t.groupedCols,e.groupedCols)&&T._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 i=o.sibling;i&&(i.childrenAfterGroup=o.childrenAfterGroup,i.childrenMapped=o.childrenMapped),this.insertNodes(o.allLeafChildren,t)}noChangeInGroupingColumns(t,e){let n=!1;const o=this.showRowGroupColsService.getShowRowGroupCols(),i=o?o.map(l=>l.getId()).join("-"):"";return e&&(n=this.areGroupColsEqual(t,this.oldGroupingDetails),this.oldGroupDisplayColIds!==i&&this.checkAllGroupDataAfterColsChanged(t)),this.oldGroupingDetails=t,this.oldGroupDisplayColIds=i,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),i=this.findParentForNode(t,o,e,n);i.group||T._warnOnce("duplicate group keys for row data, keys should be unique",[i.data,t.data]),t.parent=i,t.level=o.length,i.childrenAfterGroup.push(t),i.updateHasChildren()}findParentForNode(t,e,n,o){let i=n.rootNode;return e.forEach((l,c)=>{i=this.getOrCreateNextNode(i,l,c,n),o!=null&&o.isRemoveFromAllLeafChildren(i,t)?o==null||o.preventRemoveFromAllLeafChildren(i,t):i.allLeafChildren.push(t)}),i}getOrCreateNextNode(t,e,n,o){var c;const i=this.getChildrenMappedKey(e.key,e.rowGroupColumn);let l=(c=t==null?void 0:t.childrenMapped)==null?void 0:c[i];return l||(l=this.createGroup(e,t,n,o),this.addToParent(l,t)),l}createGroup(t,e,n,o){const i=new T.RowNode(this.beans);return i.group=!0,i.field=t.field,i.rowGroupColumn=t.rowGroupColumn,this.setGroupData(i,t,o),i.key=t.key,i.id=this.createGroupId(i,e,n),i.level=n,i.leafGroup=n===o.groupedColCount-1,i.allLeafChildren=[],i.setAllChildrenCount(0),i.rowGroupIndex=n,i.childrenAfterGroup=[],i.childrenMapped={},i.updateHasChildren(),i.parent=e,this.setExpandedInitialValue(o,i),i}createGroupId(t,e,n){const o=(i,l)=>{if(!i.rowGroupColumn)return null;const c=l?o(l,l.parent):null;return`${c==null?"":c+"-"}${i.rowGroupColumn.getColId()}-${i.key}`};return T.RowNode.ID_PREFIX_ROW_GROUP+o(t,e)}setGroupData(t,e,n){t.groupData={},this.showRowGroupColsService.getShowRowGroupCols().forEach(i=>{const l=t.rowGroupColumn;l!==null&&i.isRowGroupDisplayed(l.getId())&&(n.suppressGroupMaintainValueType?t.groupData[i.getColId()]=e.key:t.groupData[i.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 i=this.valueService.getKeyForNode(o,t),l=i!=null&&i!=="";if((e.pivotMode||!e.groupAllowUnbalanced)&&!l&&(i="",l=!0),l){const d={key:i,field:o.getColDef().field,rowGroupColumn:o,leafNode:t};n.push(d)}}),n}},Gv=(t,e)=>t.treeNode.oldSourceRowIndex-e.treeNode.oldSourceRowIndex,gt=Object.freeze([]),$v=gt.values(),xs=(t,e)=>{t.parent=null,t.treeNode=null,e?t.childrenAfterGroup=[]:(t.level=0,t.childrenAfterGroup=null,t.allLeafChildren=null)},zv=class bg{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=gt,this.allLeafChildren=gt,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())??$v}upsertKey(e){var o,i;typeof e!="string"&&(e=String(e));let n=(o=this.children)==null?void 0:o.get(e);return n||(n=new bg(this,e,this.level+1),(i=this.children??(this.children=new Map))==null||i.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&&xs(e,!0),this.parent=null)}setRow(e){const{level:n,row:o,childrenAfterGroup:i}=this;if(n<0)o!==null&&o!==e&&xs(o,!0);else{if(o===e)return!1;o!==null?(e.allLeafChildren=o.allLeafChildren??this.allLeafChildren??gt,xs(o,!1)):e.allLeafChildren=this.allLeafChildren??gt}return e.level=n,e.childrenAfterGroup=i,e.treeNode=this,this.row=e,!0}removeRow(e){const{level:n,row:o,duplicateRows:i,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??gt)):this.row=null}else{if(!(i!=null&&i.delete(e)))return!1;i.size===0&&(this.duplicateRows=null)}return xs(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=gt),e.childrenAfterGroup=gt,!0}sortFirstDuplicateRow(){const e=this.duplicateRows,n=this.row;if(!n||!e)return n;let o=n;for(const i of e)i.sourceRowIndex<o.sourceRowIndex&&(o=i);return o!==n&&(o.childrenAfterGroup=this.childrenAfterGroup,o.allLeafChildren=n.allLeafChildren??this.allLeafChildren??gt,n.childrenAfterGroup=gt,n.allLeafChildren=gt,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 d;this.childrenChanged=!1;const e=((d=this.children)==null?void 0:d.size)??0;if(e===0)return this.childrenAfterGroup.length===0?!1:(this.leafChildrenChanged=!0,this.childrenAfterGroup=gt,this.row.childrenAfterGroup=gt,!0);let n=!1,o=this.childrenAfterGroup;o===gt?(o=new Array(e),this.childrenAfterGroup=o,this.row.childrenAfterGroup=o,n=!0):o.length!==e&&(o.length=e,n=!0);let i=0,l=-1,c=!1;for(const p of this.enumChildren()){const h=p.getRowPosition();h<l&&(c=!0),l=h,p.oldSourceRowIndex=h;const m=p.row;o[i]!==m&&(o[i]=m,n=!0),++i}return n&&(this.leafChildrenChanged=!0),c&&this.reorderChildrenList(o),n||c}reorderChildrenList(e){const n=e.length,o=this.children;e.sort(Gv),o.clear();for(let i=0;i<n;++i){const l=e[i].treeNode;o.set(l.key,l)}}updateAllLeafChildren(){var c,d;const{parent:e,row:n,childrenAfterGroup:o}=this;this.leafChildrenChanged=!1;let i=!1;const l=o.length;if(l===0)i=((c=n.allLeafChildren)==null?void 0:c.length)!==0,n.allLeafChildren=gt,this.allLeafChildren=gt;else if(l===1&&((d=o[0].allLeafChildren)!=null&&d.length))n.allLeafChildren=o[0].allLeafChildren,this.allLeafChildren=null,i=!0;else{let p=this.allLeafChildren;(p===gt||p===null)&&(p=[],this.allLeafChildren=p);const h=p.length;let m=0;for(let y=0;y<l;++y){const x=o[y],w=x.allLeafChildren,S=w.length;if(S)for(let O=0;O<S;++O){const G=w[O];(m>=h||p[m]!==G)&&(p[m]=G,i=!0),++m}else(m>=h||p[m]!==x)&&x&&(p[m]=x,i=!0),++m}h!==m&&(p.length=m,i=!0),n.allLeafChildren!==p&&(n.allLeafChildren=p,i=!0)}i&&e&&(e.leafChildrenChanged=!0)}},bu=t=>(t.treeNodeFlags&1)!==0,xu=t=>(t.treeNodeFlags&2)!==0,ku=t=>(t.treeNodeFlags&4)!==0,Uv=t=>(t.treeNodeFlags&8)!==0,Su=t=>(t.treeNodeFlags&16)!==0,Eu=(t,e)=>{e?t.treeNodeFlags|=2:t.treeNodeFlags&=-3},Zv=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|4)},jv=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|12)},mr=t=>{t.treeNodeFlags|=16},Tu=t=>{t.treeNodeFlags=1|t.treeNodeFlags&-29},fi=t=>{t.treeNodeFlags=0},Wv=class extends T.BeanStub{constructor(){super(...arguments),this.rowsPendingDestruction=null,this.root=new zv(null,"",-1)}wireBeans(t){this.beans=t,this.showRowGroupColsService=t.showRowGroupColsService}destroy(){const t=this.root.row;t!==null&&(this.root.removeRow(t),fi(t)),this.destroyTree(this.root),this.commitDestroyedRows(),super.destroy()}execute(t){const{rowNodeTransactions:e,rowNodesOrderChanged:n,changedPath:o}=t,i=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(i),i.leafGroup=!1;const p=i.sibling;p&&(p.childrenAfterGroup=i.childrenAfterGroup,p.childrenMapped=i.childrenMapped),e?this.handleTransaction(c,e,n):this.handleRowData(c,i,t.afterColumnsChanged===!0)}handleRowData(t,e,n){var i,l,c;const o=this.root;if(n||this.oldGroupDisplayColIds===void 0){const d=((l=(i=this.showRowGroupColsService)==null?void 0:i.getShowRowGroupCols())==null?void 0:l.map(p=>p.getId()).join("-"))??"";if(n){this.oldGroupDisplayColIds!==d&&this.checkAllGroupDataAfterColsChanged((c=o.row)==null?void 0:c.childrenAfterGroup);return}this.oldGroupDisplayColIds=d}this.clearTree(o),this.addOrUpdateRows(t,e.allLeafChildren,!1),this.commitTree(t)}handleTransaction(t,e,n){for(const{remove:o,update:i,add:l}of e)this.removeRows(o),this.addOrUpdateRows(t,i,!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 i=t[n].treeNode;i&&i.oldSourceRowIndex!==n&&i.invalidateOrder()}}checkAllGroupDataAfterColsChanged(t){var e;for(let n=0,o=(t==null?void 0:t.length)??0;n<o;++n){const i=t[n];this.setGroupData(i,((e=i.treeNode)==null?void 0:e.key)??i.key),this.checkAllGroupDataAfterColsChanged(i.childrenAfterGroup)}}addOrUpdateRows(t,e,n){for(let o=0,i=(e==null?void 0:e.length)??0;o<i;++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],i=o.treeNode;i!==null&&this.removeRow(i,o)}}getDataPath({getDataPath:t},{data:e}){const n=(t==null?void 0:t(e))||gt;return n.length||T._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 i=e.upsertKey(t[o]);if(o>=n)return i.invalidate(),i;e=i}return null}addOrUpdateRow(t,e,n){var c;const{level:o,row:i}=t;if(o<0)return;let l=!1;if(i!==e){const d=e.treeNode;d!==null&&d!==t&&(d.removeRow(e),d.invalidate()),i===null?(t.setRow(e),l=!0):i.data?t.addDuplicateRow(e)&&(l=!0):(t.setRow(e),this.destroyRow(i,!0),l=!0)}n&&!ku(e)&&(Zv(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 i=!1;t.removeRow(e)&&(i=!0,n&&(n.childrenChanged=!0),this.destroyRow(e,!e.data)),i&&t.invalidate()}commitTree(t){var o;const e=this.root;this.commitInvalidatedChildren(t,e);const n=e.row;e.childrenChanged&&e.updateChildrenAfterGroup()&&mr(n),n.updateHasChildren(),Su(n)&&(o=t.changedPath)!=null&&o.isActive()&&t.changedPath.addParentNode(n),Tu(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 i of e.enumChildren()){const l=i.row;l!==null&&(l.parent=n)}const o=e.key;n.key!==o?(n.key=o,jv(n),this.setGroupData(n,o)):n.groupData||this.setGroupData(n,o)}commitNodePostOrder(t,e,n){var h,m,y;const o=n.row,i=n.oldRow;if(n.isEmptyFillerNode()){this.clearTree(n);return}n.childrenChanged&&n.updateChildrenAfterGroup()&&mr(o),n.leafChildrenChanged&&n.updateAllLeafChildren();const l=n.getRowPosition();n.oldSourceRowIndex!==l&&(n.oldSourceRowIndex=l,e.childrenChanged=!0);const c=!!((h=o.childrenAfterGroup)!=null&&h.length),d=c||!o.data,p=o.group;p!==d?(mr(o),o.setGroup(d),!d&&!o.expanded&&Eu(o,!1)):o.hasChildren()!==c&&(mr(o),o.updateHasChildren()),o.group&&!xu(o)&&(i!==o&&i!==null&&i.group&&xu(i)&&!t.isGroupOpenByDefault?o.expanded=i.expanded:o.expanded=this.getExpandedInitialValue(t,o),Eu(o,!0)),ku(o)&&(mr(e.row),Uv(o)&&o.setData(o.data)),i!==o&&(n.oldRow=o,i!==null&&(p||n.hasChildren())&&mr(o),e.childrenChanged=!0,mr(e.row)),Su(o)?(m=t.changedPath)!=null&&m.isActive()&&t.changedPath.addParentNode(o):bu(o)||(o.childrenAfterFilter||(o.childrenAfterFilter=o.childrenAfterGroup.slice()),o.childrenAfterAggFilter||(o.childrenAfterAggFilter=o.childrenAfterFilter.slice()),o.childrenAfterSort||(o.childrenAfterSort=o.childrenAfterAggFilter.slice())),Tu(o),(y=n.duplicateRows)!=null&&y.size&&!n.duplicateRowsWarned&&(n.duplicateRowsWarned=!0,T._warnOnce("duplicate group keys for row data, keys should be unique",[o.id,o.data,...Array.from(n.duplicateRows).map(x=>x.data)]))}createFillerRow(t){const e=new T.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 i=o.parent;if(i===null)break;n=`${o.level}-${o.key}-${n}`,o=i}return e.id=T.RowNode.ID_PREFIX_ROW_GROUP+n,e}setGroupData(t,e){var i;const n={};t.groupData=n;const o=(i=this.showRowGroupColsService)==null?void 0:i.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:i}=t;if(e!==null&&n!==null&&(e.childrenChanged=!0,e.row!==null&&mr(e.row)),o!==null&&i>=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):fi(e)),o)for(const i of o)n>=0&&!i.data?this.destroyRow(i,!0):fi(i);for(const i of t.enumChildren())this.destroyTree(i);t.destroy()}destroyRow(t,e){if(!bu(t)){fi(t);return}if(!e){(this.rowsPendingDestruction??(this.rowsPendingDestruction=new Set)).add(t);return}fi(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)}}},Hv=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="groupStage"}wireBeans(t){this.selectableService=t.selectableService}execute(t){const e=this.gos.get("treeData")?Wv:Mv;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()}},Nu="PivotRowTotal_",qv=class extends T.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(d=>{d.children!==void 0?n(d.children,c):c.push(d)}),c}const o=n(e);this.addRowGroupTotals(e,o),this.addExpandablePivotGroups(e,o),this.addPivotTotalsToGroups(e,o);const i=o.map(l=>T._cloneObject(l));return{pivotColumnGroupDefs:e,pivotColumnDefs:i}}createPivotColumnsFromUniqueValues(t){const e=this.funcColsService.getPivotColumns(),n=e.length;return this.recursivelyBuildGroup(0,t,[],n,e)}recursivelyBuildGroup(t,e,n,o,i){const l=this.funcColsService.getValueColumns();if(t>=o)return this.buildMeasureCols(n);const c=i[t].getColDef(),d=this.headerNameComparator.bind(this,c.pivotComparator);if(l.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&t===o-1){const h=[];return T._iterateObject(e,m=>{const y=[...n,m],x=this.createColDef(l[0],m,y);x.columnGroupShow="open",h.push(x)}),h.sort(d),h}const p=[];return T._iterateObject(e,(h,m)=>{const y=this.pivotDefaultExpanded===-1||t<this.pivotDefaultExpanded,x=[...n,h];p.push({children:this.recursivelyBuildGroup(t+1,m,x,o,i),headerName:h,pivotKeys:x,columnGroupShow:"open",openByDefault:y,groupId:this.generateColumnGroupId(x)})}),p.sort(d),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=(i,l,c)=>{if("children"in i){const h=new Map;i.children.forEach(y=>{o(y,l,h)});const m=!i.children.some(y=>y.children);this.funcColsService.getValueColumns().forEach(y=>{const x=this.columnNameService.getDisplayNameForColumn(y,"header"),w=this.createColDef(y,x,i.pivotKeys);w.pivotTotalColumnIds=h.get(y.getColId()),w.columnGroupShow=n?"open":"closed",w.aggFunc=y.getAggFunc(),m||(i.children.push(w),l.push(w))}),this.merge(c,h);return}if(!i.pivotValueColumn)return;const d=i.pivotValueColumn.getColId();c.has(d)?c.get(d).push(i.colId):c.set(d,[i.colId])};t.forEach(i=>{o(i,e,new Map)})}addPivotTotalsToGroups(t,e){if(!this.gos.get("pivotColumnGroupTotals"))return;const n=this.gos.get("pivotColumnGroupTotals")==="after",o=this.funcColsService.getValueColumns(),i=o.map(c=>c.getAggFunc());if(!i||i.length<1||!this.sameAggFuncs(i))return;const l=o[0];t.forEach(c=>{this.recursivelyAddPivotTotal(c,e,l,n)})}recursivelyAddPivotTotal(t,e,n,o){const i=t;if(!i.children){const c=t;return c.colId?[c.colId]:null}let l=[];if(i.children.forEach(c=>{const d=this.recursivelyAddPivotTotal(c,e,n,o);d&&(l=l.concat(d))}),i.children.length>1){const d=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),p=this.createColDef(n,d,t.pivotKeys,!0);p.pivotTotalColumnIds=l,p.aggFunc=n.getAggFunc(),p.columnGroupShow=this.gos.get("suppressExpandablePivotGroups")?"open":void 0;const h=t.children;o?h.push(p):h.unshift(p),e.push(p)}return l}addRowGroupTotals(t,e){if(!this.gos.get("pivotRowTotals"))return;const n=this.gos.get("pivotRowTotals")==="after",i=this.funcColsService.getValueColumns().slice();n||i.reverse();const l=i.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let c=0;c<i.length;c++){const d=i[c],p=this.columnNameService.getDisplayNameForColumn(d,"header"),h=this.createColDef(d,p,[]),m=[];for(let x=0;x<e.length;x++){const w=e[x];w.pivotValueColumn===d&&m.push(w.colId)}h.pivotTotalColumnIds=m,h.colId=Nu+h.colId;const y=l?{children:[h],pivotKeys:[],groupId:`${Nu}_pivotGroup_${d.getColId()}`}:h;e.push(h),n?t.push(y):t.unshift(y)}}createColDef(t,e,n,o=!1){const i={};if(t){const l=t.getColDef();Object.assign(i,l),i.hide=!1}return i.headerName=e,i.colId=this.generateColumnId(n||[],t&&!o?t.getColId():""),i.field=i.colId,i.valueGetter=l=>{var c;return(c=l.data)==null?void 0:c[l.colDef.field]},i.pivotKeys=n,i.pivotValueColumn=t,i.filter===!0&&(i.filter="agNumberColumnFilter"),i}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 i=0;i<t.length;i++){const c=t[i].split(this.fieldSeparator);let d=e;for(let p=0;p<c.length;p++){const h=c[p];d[h]==null&&(d[h]={}),d=d[h]}}const n=(i,l,c,d)=>{const p=[];for(const y in c){const x=c[y],w=n(`${i}${this.fieldSeparator}${y}`,y,x,d+1);p.push(w)}if(p.length===0){const y=this.columnModel.getColDefCol(l);if(y){const w=this.columnNameService.getDisplayNameForColumn(y,"header")??l,S=this.createColDef(y,w,void 0,!1);return S.colId=i,S.aggFunc=y.getAggFunc(),S.valueGetter=O=>{var G;return(G=O.data)==null?void 0:G[i]},S}return{colId:i,headerName:l,valueGetter:w=>{var S;return(S=w.data)==null?void 0:S[i]}}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&p.length===1&&"colId"in p[0]?(p[0].headerName=l,p[0]):{openByDefault:this.pivotDefaultExpanded===-1||d<this.pivotDefaultExpanded,groupId:i,headerName:l,children:p}},o=[];for(const i in e){const l=e[i],c=n(i,i,l,0);o.push(c)}return o}},Au="Exceeded maximum allowed pivot column count.",Kv=class extends T.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(b){if(b.message===Au){this.pivotResultColsService.setPivotResultCols([],"rowModelUpdated"),this.eventService.dispatchEvent({type:"pivotMaxColumnsExceeded",message:b.message}),this.lastTimeFailed=!0;return}throw b}const i=this.setUniqueValues(o),l=this.funcColsService.getValueColumns(),c=l.map(b=>`${b.getId()}-${b.getColDef().headerName}`).join("#"),d=l.map(b=>b.getAggFunc().toString()).join("#"),p=this.aggregationColumnsHashLastTime!==c,h=this.aggregationFuncsHashLastTime!==d;this.aggregationColumnsHashLastTime=c,this.aggregationFuncsHashLastTime=d;const m=this.funcColsService.getRowGroupColumns().map(b=>b.getId()).join("#"),y=m!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=m;const x=this.gos.get("pivotRowTotals"),w=this.gos.get("pivotColumnGroupTotals"),S=this.gos.get("suppressExpandablePivotGroups"),O=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),G=x!==this.pivotRowTotalsLastTime||w!==this.pivotColumnGroupTotalsLastTime||S!==this.suppressExpandablePivotGroupsLastTime||O!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=x,this.pivotColumnGroupTotalsLastTime=w,this.suppressExpandablePivotGroupsLastTime=S,this.removePivotHeaderRowWhenSingleValueColumnLastTime=O,this.lastTimeFailed||i||p||y||h||G){const{pivotColumnGroupDefs:b,pivotColumnDefs:R}=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);this.pivotColumnDefs=R,this.pivotResultColsService.setPivotResultCols(b,"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 i;o.leafGroup?this.bucketRowNode(o,e):(i=o.childrenAfterFilter)==null||i.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 i={},l=e[n];if(t.forEach(c=>{let d=this.valueService.getKeyForNode(l,c);if(T._missing(d)&&(d=""),!o[d]){this.currentUniqueCount+=1,o[d]={};const p=this.maxUniqueValues!==-1,h=this.currentUniqueCount>this.maxUniqueValues;if(p&&h)throw Error(Au)}i[d]||(i[d]=[]),i[d].push(c)}),n===e.length-1)return i;{const c={};return T._iterateObject(i,(d,p)=>{c[d]=this.bucketChildren(p,e,n+1,o[d])}),c}}getPivotColumnDefs(){return this.pivotColumnDefs}};function Xv(t,e,n){t.aggFuncService&&t.aggFuncService.addAggFuncs({key:n})}function Yv(t,e){t.aggFuncService&&t.aggFuncService.addAggFuncs(e)}function Jv(t){t.aggFuncService&&t.aggFuncService.clear()}function Qv(t,e,n){t.funcColsService.setColumnAggFunc(e,n,"api")}function e_(t){return t.columnModel.isPivotMode()}function t_(t,e,n){return t.pivotResultColsService.lookupPivotResultCol(e,n)}function n_(t,e){t.funcColsService.setValueColumns(e,"api")}function r_(t){return t.funcColsService.getValueColumns()}function o_(t,e){t.funcColsService.removeValueColumns([e],"api")}function i_(t,e){t.funcColsService.removeValueColumns(e,"api")}function s_(t,e){t.funcColsService.addValueColumns([e],"api")}function a_(t,e){t.funcColsService.addValueColumns(e,"api")}function l_(t,e){t.funcColsService.setRowGroupColumns(e,"api")}function c_(t,e){t.funcColsService.removeRowGroupColumns([e],"api")}function d_(t,e){t.funcColsService.removeRowGroupColumns(e,"api")}function u_(t,e){t.funcColsService.addRowGroupColumns([e],"api")}function p_(t,e){t.funcColsService.addRowGroupColumns(e,"api")}function h_(t,e,n){t.funcColsService.moveRowGroupColumn(e,n,"api")}function f_(t){return t.funcColsService.getRowGroupColumns()}function m_(t,e){t.funcColsService.setPivotColumns(e,"api")}function g_(t,e){t.funcColsService.removePivotColumns([e],"api")}function y_(t,e){t.funcColsService.removePivotColumns(e,"api")}function v_(t,e){t.funcColsService.addPivotColumns([e],"api")}function __(t,e){t.funcColsService.addPivotColumns(e,"api")}function C_(t){return t.funcColsService.getPivotColumns()}function w_(t,e){t.pivotResultColsService.setPivotResultCols(e,"api")}function b_(t){const e=t.pivotResultColsService.getPivotResultCols();return e?e.list:null}var x_=class extends T.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]}},mi="32.3.3",vl=T._defineModule({version:mi,moduleName:`${T.ModuleNames.RowGroupingModule}-core`,beans:[Nv,Iv,Hv,qv,Kv,Cv,Av,x_,Dv],userComponents:[{name:"agGroupRowRenderer",classImp:Me.GroupCellRenderer},{name:"agGroupCellRenderer",classImp:Me.GroupCellRenderer}],controllers:[{name:"groupCellRendererCtrl",classImp:Me.GroupCellRendererCtrl}],dependantModules:[Me.EnterpriseCoreModule]}),k_=T._defineModule({version:mi,moduleName:`${T.ModuleNames.RowGroupingModule}-api`,apiFunctions:{addAggFunc:Xv,addAggFuncs:Yv,clearAggFuncs:Jv,setColumnAggFunc:Qv,isPivotMode:e_,getPivotResultColumn:t_,setValueColumns:n_,getValueColumns:r_,removeValueColumn:o_,removeValueColumns:i_,addValueColumn:s_,addValueColumns:a_,setRowGroupColumns:l_,removeRowGroupColumn:c_,removeRowGroupColumns:d_,addRowGroupColumn:u_,addRowGroupColumns:p_,getRowGroupColumns:f_,moveRowGroupColumn:h_,setPivotColumns:m_,removePivotColumn:g_,removePivotColumns:y_,addPivotColumn:v_,addPivotColumns:__,getPivotColumns:C_,setPivotResultColumns:w_,getPivotResultColumns:b_},dependantModules:[vl]}),Vu=T._defineModule({version:mi,moduleName:"@ag-grid-enterprise/group-filter",userComponents:[{name:"agGroupColumnFilter",classImp:Fv}],dependantModules:[vl,T._ColumnFilterModule]}),S_=T._defineModule({version:mi,moduleName:"@ag-grid-enterprise/group-floating-filter",userComponents:[{name:"agGroupColumnFloatingFilter",classImp:Ov}],dependantModules:[Vu,T._FloatingFilterModule]}),E_=T._defineModule({version:mi,moduleName:T.ModuleNames.RowGroupingModule,dependantModules:[vl,k_,Vu,S_]}),Bu=class extends fl{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:T._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()}},Pu=300,T_=class extends T.Component{constructor(){super(`<div class="ag-column-select-header" role="presentation">
|
|
24
|
+
`),this.eFloatingFilter=T.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 T.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 T.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,T._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,i;this.underlyingFloatingFilter=n,(i=this.underlyingFloatingFilter)==null||i.onParentModelChanged((o=this.parentFilterInstance.getSelectedFilter())==null?void 0:o.getModel()),this.appendChild(n.getGui()),this.showingUnderlyingFloatingFilter=!0})}return this.setupReadOnlyFloatingFilterElement(),T.AgPromise.resolve()}onColumnVisibleChanged(){this.setupUnderlyingFloatingFilterElement()}onColDefChanged(t){var n,o,i;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):(i=(o=this.underlyingFloatingFilter)==null?void 0:o.onParamsUpdated)==null||i.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()}},yl=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(i=>!e.removeFromChildrenAfterGroup[i.id]),t.allLeafChildren=((o=t.allLeafChildren)==null?void 0:o.filter(i=>!e.removeFromAllLeafChildren[i.id]))??null,t.updateHasChildren();const n=t.sibling;n&&(n.childrenAfterGroup=t.childrenAfterGroup,n.allLeafChildren=t.allLeafChildren)}),this.allSets={},this.allParents.length=0}};function Mv(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(wu(t[o-1],t[o])>0){n=!0;break}return n?(t.sort(wu),!0):!1}function wu(t,e){const n=t.sourceRowIndex,o=e.sourceRowIndex,i=n>=0,l=o>=0,c=i&&l,d=!i&&!l;return c?n-o:d?t.__objectId-e.__objectId:i?1:-1}var Gv=class extends T.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 i;e.childrenAfterGroup.forEach(l=>{var c;(c=l.childrenAfterGroup)!=null&&c.length?l.key===""&&!i?i=l:o.push(l):n.push(l)}),i&&o.push(i),e.childrenAfterGroup=[...n,...o]}},!1)}createGroupingDetails(t){const{rowNode:e,changedPath:n,rowNodeTransactions:o,rowNodesOrderChanged:i}=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:!!i,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(d=>d.getColDef().keyCreator))??[]}}handleTransaction(t){t.transactions.forEach(e=>{const n=new yl;T._existsAndNotEmpty(e.remove)&&this.removeNodes(e.remove,t,n),T._existsAndNotEmpty(e.update)&&this.moveNodesInWrongPath(e.update,t,n),T._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=>{Mv(e.childrenAfterGroup)&&t.changedPath.addParentNode(e)},!1,!0)}orderGroups(t){const e=t.initialGroupOrderComparator;T._exists(e)&&n(t.rootNode);function n(o){T._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 i=p=>p.key,l=this.getExistingPathForNode(o,e).map(i),c=this.getGroupInfo(o,e).map(i);T._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,i=n||new yl;t.forEach(l=>{this.removeFromParent(l,i),this.forEachParentGroup(e,l.parent,c=>{i.removeFromAllLeafChildren(c,l)})}),o&&i.flush()}removeEmptyGroups(t,e){let n=!0;const o=i=>{var p;const l=this.getChildrenMappedKey(i.key,i.rowGroupColumn),c=i.parent;return(c!=null&&c.childrenMapped?!c.childrenMapped[l]:!0)?!1:!!i.group&&(((p=i.childrenAfterGroup)==null?void 0:p.length)??0)===0};for(;n;){n=!1;const i=new yl;t.forEach(l=>{this.forEachParentGroup(e,l,c=>{o(c)&&(n=!0,this.removeFromParent(c,i),c.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))})}),i.flush()}}removeFromParent(t,e){var o;t.parent&&(e?e.removeFromChildrenAfterGroup(t.parent,t):(T._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:T._areEqual(t.groupedCols,e.groupedCols)&&T._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 i=o.sibling;i&&(i.childrenAfterGroup=o.childrenAfterGroup,i.childrenMapped=o.childrenMapped),this.insertNodes(o.allLeafChildren,t)}noChangeInGroupingColumns(t,e){let n=!1;const o=this.showRowGroupColsService.getShowRowGroupCols(),i=o?o.map(l=>l.getId()).join("-"):"";return e&&(n=this.areGroupColsEqual(t,this.oldGroupingDetails),this.oldGroupDisplayColIds!==i&&this.checkAllGroupDataAfterColsChanged(t)),this.oldGroupingDetails=t,this.oldGroupDisplayColIds=i,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),i=this.findParentForNode(t,o,e,n);i.group||T._warnOnce("duplicate group keys for row data, keys should be unique",[i.data,t.data]),t.parent=i,t.level=o.length,i.childrenAfterGroup.push(t),i.updateHasChildren()}findParentForNode(t,e,n,o){let i=n.rootNode;return e.forEach((l,c)=>{i=this.getOrCreateNextNode(i,l,c,n),o!=null&&o.isRemoveFromAllLeafChildren(i,t)?o==null||o.preventRemoveFromAllLeafChildren(i,t):i.allLeafChildren.push(t)}),i}getOrCreateNextNode(t,e,n,o){var c;const i=this.getChildrenMappedKey(e.key,e.rowGroupColumn);let l=(c=t==null?void 0:t.childrenMapped)==null?void 0:c[i];return l||(l=this.createGroup(e,t,n,o),this.addToParent(l,t)),l}createGroup(t,e,n,o){const i=new T.RowNode(this.beans);return i.group=!0,i.field=t.field,i.rowGroupColumn=t.rowGroupColumn,this.setGroupData(i,t,o),i.key=t.key,i.id=this.createGroupId(i,e,n),i.level=n,i.leafGroup=n===o.groupedColCount-1,i.allLeafChildren=[],i.setAllChildrenCount(0),i.rowGroupIndex=n,i.childrenAfterGroup=[],i.childrenMapped={},i.updateHasChildren(),i.parent=e,this.setExpandedInitialValue(o,i),i}createGroupId(t,e,n){const o=(i,l)=>{if(!i.rowGroupColumn)return null;const c=l?o(l,l.parent):null;return`${c==null?"":c+"-"}${i.rowGroupColumn.getColId()}-${i.key}`};return T.RowNode.ID_PREFIX_ROW_GROUP+o(t,e)}setGroupData(t,e,n){t.groupData={},this.showRowGroupColsService.getShowRowGroupCols().forEach(i=>{const l=t.rowGroupColumn;l!==null&&i.isRowGroupDisplayed(l.getId())&&(n.suppressGroupMaintainValueType?t.groupData[i.getColId()]=e.key:t.groupData[i.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 i=this.valueService.getKeyForNode(o,t),l=i!=null&&i!=="";if((e.pivotMode||!e.groupAllowUnbalanced)&&!l&&(i="",l=!0),l){const d={key:i,field:o.getColDef().field,rowGroupColumn:o,leafNode:t};n.push(d)}}),n}},$v=(t,e)=>t.treeNode.oldSourceRowIndex-e.treeNode.oldSourceRowIndex,gt=Object.freeze([]),zv=gt.values(),xs=(t,e)=>{t.parent=null,t.treeNode=null,e?t.childrenAfterGroup=[]:(t.level=0,t.childrenAfterGroup=null,t.allLeafChildren=null)},Uv=class xg{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=gt,this.allLeafChildren=gt,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())??zv}upsertKey(e){var o,i;typeof e!="string"&&(e=String(e));let n=(o=this.children)==null?void 0:o.get(e);return n||(n=new xg(this,e,this.level+1),(i=this.children??(this.children=new Map))==null||i.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&&xs(e,!0),this.parent=null)}setRow(e){const{level:n,row:o,childrenAfterGroup:i}=this;if(n<0)o!==null&&o!==e&&xs(o,!0);else{if(o===e)return!1;o!==null?(e.allLeafChildren=o.allLeafChildren??this.allLeafChildren??gt,xs(o,!1)):e.allLeafChildren=this.allLeafChildren??gt}return e.level=n,e.childrenAfterGroup=i,e.treeNode=this,this.row=e,!0}removeRow(e){const{level:n,row:o,duplicateRows:i,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??gt)):this.row=null}else{if(!(i!=null&&i.delete(e)))return!1;i.size===0&&(this.duplicateRows=null)}return xs(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=gt),e.childrenAfterGroup=gt,!0}sortFirstDuplicateRow(){const e=this.duplicateRows,n=this.row;if(!n||!e)return n;let o=n;for(const i of e)i.sourceRowIndex<o.sourceRowIndex&&(o=i);return o!==n&&(o.childrenAfterGroup=this.childrenAfterGroup,o.allLeafChildren=n.allLeafChildren??this.allLeafChildren??gt,n.childrenAfterGroup=gt,n.allLeafChildren=gt,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 d;this.childrenChanged=!1;const e=((d=this.children)==null?void 0:d.size)??0;if(e===0)return this.childrenAfterGroup.length===0?!1:(this.leafChildrenChanged=!0,this.childrenAfterGroup=gt,this.row.childrenAfterGroup=gt,!0);let n=!1,o=this.childrenAfterGroup;o===gt?(o=new Array(e),this.childrenAfterGroup=o,this.row.childrenAfterGroup=o,n=!0):o.length!==e&&(o.length=e,n=!0);let i=0,l=-1,c=!1;for(const p of this.enumChildren()){const h=p.getRowPosition();h<l&&(c=!0),l=h,p.oldSourceRowIndex=h;const m=p.row;o[i]!==m&&(o[i]=m,n=!0),++i}return n&&(this.leafChildrenChanged=!0),c&&this.reorderChildrenList(o),n||c}reorderChildrenList(e){const n=e.length,o=this.children;e.sort($v),o.clear();for(let i=0;i<n;++i){const l=e[i].treeNode;o.set(l.key,l)}}updateAllLeafChildren(){var c,d;const{parent:e,row:n,childrenAfterGroup:o}=this;this.leafChildrenChanged=!1;let i=!1;const l=o.length;if(l===0)i=((c=n.allLeafChildren)==null?void 0:c.length)!==0,n.allLeafChildren=gt,this.allLeafChildren=gt;else if(l===1&&((d=o[0].allLeafChildren)!=null&&d.length))n.allLeafChildren=o[0].allLeafChildren,this.allLeafChildren=null,i=!0;else{let p=this.allLeafChildren;(p===gt||p===null)&&(p=[],this.allLeafChildren=p);const h=p.length;let m=0;for(let y=0;y<l;++y){const x=o[y],w=x.allLeafChildren,E=w.length;if(E)for(let O=0;O<E;++O){const $=w[O];(m>=h||p[m]!==$)&&(p[m]=$,i=!0),++m}else(m>=h||p[m]!==x)&&x&&(p[m]=x,i=!0),++m}h!==m&&(p.length=m,i=!0),n.allLeafChildren!==p&&(n.allLeafChildren=p,i=!0)}i&&e&&(e.leafChildrenChanged=!0)}},bu=t=>(t.treeNodeFlags&1)!==0,xu=t=>(t.treeNodeFlags&2)!==0,ku=t=>(t.treeNodeFlags&4)!==0,Zv=t=>(t.treeNodeFlags&8)!==0,Su=t=>(t.treeNodeFlags&16)!==0,Eu=(t,e)=>{e?t.treeNodeFlags|=2:t.treeNodeFlags&=-3},Wv=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|4)},jv=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|12)},mr=t=>{t.treeNodeFlags|=16},Tu=t=>{t.treeNodeFlags=1|t.treeNodeFlags&-29},fi=t=>{t.treeNodeFlags=0},Hv=class extends T.BeanStub{constructor(){super(...arguments),this.rowsPendingDestruction=null,this.root=new Uv(null,"",-1)}wireBeans(t){this.beans=t,this.showRowGroupColsService=t.showRowGroupColsService}destroy(){const t=this.root.row;t!==null&&(this.root.removeRow(t),fi(t)),this.destroyTree(this.root),this.commitDestroyedRows(),super.destroy()}execute(t){const{rowNodeTransactions:e,rowNodesOrderChanged:n,changedPath:o}=t,i=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(i),i.leafGroup=!1;const p=i.sibling;p&&(p.childrenAfterGroup=i.childrenAfterGroup,p.childrenMapped=i.childrenMapped),e?this.handleTransaction(c,e,n):this.handleRowData(c,i,t.afterColumnsChanged===!0)}handleRowData(t,e,n){var i,l,c;const o=this.root;if(n||this.oldGroupDisplayColIds===void 0){const d=((l=(i=this.showRowGroupColsService)==null?void 0:i.getShowRowGroupCols())==null?void 0:l.map(p=>p.getId()).join("-"))??"";if(n){this.oldGroupDisplayColIds!==d&&this.checkAllGroupDataAfterColsChanged((c=o.row)==null?void 0:c.childrenAfterGroup);return}this.oldGroupDisplayColIds=d}this.clearTree(o),this.addOrUpdateRows(t,e.allLeafChildren,!1),this.commitTree(t)}handleTransaction(t,e,n){for(const{remove:o,update:i,add:l}of e)this.removeRows(o),this.addOrUpdateRows(t,i,!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 i=t[n].treeNode;i&&i.oldSourceRowIndex!==n&&i.invalidateOrder()}}checkAllGroupDataAfterColsChanged(t){var e;for(let n=0,o=(t==null?void 0:t.length)??0;n<o;++n){const i=t[n];this.setGroupData(i,((e=i.treeNode)==null?void 0:e.key)??i.key),this.checkAllGroupDataAfterColsChanged(i.childrenAfterGroup)}}addOrUpdateRows(t,e,n){for(let o=0,i=(e==null?void 0:e.length)??0;o<i;++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],i=o.treeNode;i!==null&&this.removeRow(i,o)}}getDataPath({getDataPath:t},{data:e}){const n=(t==null?void 0:t(e))||gt;return n.length||T._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 i=e.upsertKey(t[o]);if(o>=n)return i.invalidate(),i;e=i}return null}addOrUpdateRow(t,e,n){var c;const{level:o,row:i}=t;if(o<0)return;let l=!1;if(i!==e){const d=e.treeNode;d!==null&&d!==t&&(d.removeRow(e),d.invalidate()),i===null?(t.setRow(e),l=!0):i.data?t.addDuplicateRow(e)&&(l=!0):(t.setRow(e),this.destroyRow(i,!0),l=!0)}n&&!ku(e)&&(Wv(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 i=!1;t.removeRow(e)&&(i=!0,n&&(n.childrenChanged=!0),this.destroyRow(e,!e.data)),i&&t.invalidate()}commitTree(t){var o;const e=this.root;this.commitInvalidatedChildren(t,e);const n=e.row;e.childrenChanged&&e.updateChildrenAfterGroup()&&mr(n),n.updateHasChildren(),Su(n)&&(o=t.changedPath)!=null&&o.isActive()&&t.changedPath.addParentNode(n),Tu(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 i of e.enumChildren()){const l=i.row;l!==null&&(l.parent=n)}const o=e.key;n.key!==o?(n.key=o,jv(n),this.setGroupData(n,o)):n.groupData||this.setGroupData(n,o)}commitNodePostOrder(t,e,n){var h,m,y;const o=n.row,i=n.oldRow;if(n.isEmptyFillerNode()){this.clearTree(n);return}n.childrenChanged&&n.updateChildrenAfterGroup()&&mr(o),n.leafChildrenChanged&&n.updateAllLeafChildren();const l=n.getRowPosition();n.oldSourceRowIndex!==l&&(n.oldSourceRowIndex=l,e.childrenChanged=!0);const c=!!((h=o.childrenAfterGroup)!=null&&h.length),d=c||!o.data,p=o.group;p!==d?(mr(o),o.setGroup(d),!d&&!o.expanded&&Eu(o,!1)):o.hasChildren()!==c&&(mr(o),o.updateHasChildren()),o.group&&!xu(o)&&(i!==o&&i!==null&&i.group&&xu(i)&&!t.isGroupOpenByDefault?o.expanded=i.expanded:o.expanded=this.getExpandedInitialValue(t,o),Eu(o,!0)),ku(o)&&(mr(e.row),Zv(o)&&o.setData(o.data)),i!==o&&(n.oldRow=o,i!==null&&(p||n.hasChildren())&&mr(o),e.childrenChanged=!0,mr(e.row)),Su(o)?(m=t.changedPath)!=null&&m.isActive()&&t.changedPath.addParentNode(o):bu(o)||(o.childrenAfterFilter||(o.childrenAfterFilter=o.childrenAfterGroup.slice()),o.childrenAfterAggFilter||(o.childrenAfterAggFilter=o.childrenAfterFilter.slice()),o.childrenAfterSort||(o.childrenAfterSort=o.childrenAfterAggFilter.slice())),Tu(o),(y=n.duplicateRows)!=null&&y.size&&!n.duplicateRowsWarned&&(n.duplicateRowsWarned=!0,T._warnOnce("duplicate group keys for row data, keys should be unique",[o.id,o.data,...Array.from(n.duplicateRows).map(x=>x.data)]))}createFillerRow(t){const e=new T.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 i=o.parent;if(i===null)break;n=`${o.level}-${o.key}-${n}`,o=i}return e.id=T.RowNode.ID_PREFIX_ROW_GROUP+n,e}setGroupData(t,e){var i;const n={};t.groupData=n;const o=(i=this.showRowGroupColsService)==null?void 0:i.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:i}=t;if(e!==null&&n!==null&&(e.childrenChanged=!0,e.row!==null&&mr(e.row)),o!==null&&i>=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):fi(e)),o)for(const i of o)n>=0&&!i.data?this.destroyRow(i,!0):fi(i);for(const i of t.enumChildren())this.destroyTree(i);t.destroy()}destroyRow(t,e){if(!bu(t)){fi(t);return}if(!e){(this.rowsPendingDestruction??(this.rowsPendingDestruction=new Set)).add(t);return}fi(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)}}},qv=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="groupStage"}wireBeans(t){this.selectableService=t.selectableService}execute(t){const e=this.gos.get("treeData")?Hv:Gv;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()}},Nu="PivotRowTotal_",Kv=class extends T.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(d=>{d.children!==void 0?n(d.children,c):c.push(d)}),c}const o=n(e);this.addRowGroupTotals(e,o),this.addExpandablePivotGroups(e,o),this.addPivotTotalsToGroups(e,o);const i=o.map(l=>T._cloneObject(l));return{pivotColumnGroupDefs:e,pivotColumnDefs:i}}createPivotColumnsFromUniqueValues(t){const e=this.funcColsService.getPivotColumns(),n=e.length;return this.recursivelyBuildGroup(0,t,[],n,e)}recursivelyBuildGroup(t,e,n,o,i){const l=this.funcColsService.getValueColumns();if(t>=o)return this.buildMeasureCols(n);const c=i[t].getColDef(),d=this.headerNameComparator.bind(this,c.pivotComparator);if(l.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&t===o-1){const h=[];return T._iterateObject(e,m=>{const y=[...n,m],x=this.createColDef(l[0],m,y);x.columnGroupShow="open",h.push(x)}),h.sort(d),h}const p=[];return T._iterateObject(e,(h,m)=>{const y=this.pivotDefaultExpanded===-1||t<this.pivotDefaultExpanded,x=[...n,h];p.push({children:this.recursivelyBuildGroup(t+1,m,x,o,i),headerName:h,pivotKeys:x,columnGroupShow:"open",openByDefault:y,groupId:this.generateColumnGroupId(x)})}),p.sort(d),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=(i,l,c)=>{if("children"in i){const h=new Map;i.children.forEach(y=>{o(y,l,h)});const m=!i.children.some(y=>y.children);this.funcColsService.getValueColumns().forEach(y=>{const x=this.columnNameService.getDisplayNameForColumn(y,"header"),w=this.createColDef(y,x,i.pivotKeys);w.pivotTotalColumnIds=h.get(y.getColId()),w.columnGroupShow=n?"open":"closed",w.aggFunc=y.getAggFunc(),m||(i.children.push(w),l.push(w))}),this.merge(c,h);return}if(!i.pivotValueColumn)return;const d=i.pivotValueColumn.getColId();c.has(d)?c.get(d).push(i.colId):c.set(d,[i.colId])};t.forEach(i=>{o(i,e,new Map)})}addPivotTotalsToGroups(t,e){if(!this.gos.get("pivotColumnGroupTotals"))return;const n=this.gos.get("pivotColumnGroupTotals")==="after",o=this.funcColsService.getValueColumns(),i=o.map(c=>c.getAggFunc());if(!i||i.length<1||!this.sameAggFuncs(i))return;const l=o[0];t.forEach(c=>{this.recursivelyAddPivotTotal(c,e,l,n)})}recursivelyAddPivotTotal(t,e,n,o){const i=t;if(!i.children){const c=t;return c.colId?[c.colId]:null}let l=[];if(i.children.forEach(c=>{const d=this.recursivelyAddPivotTotal(c,e,n,o);d&&(l=l.concat(d))}),i.children.length>1){const d=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),p=this.createColDef(n,d,t.pivotKeys,!0);p.pivotTotalColumnIds=l,p.aggFunc=n.getAggFunc(),p.columnGroupShow=this.gos.get("suppressExpandablePivotGroups")?"open":void 0;const h=t.children;o?h.push(p):h.unshift(p),e.push(p)}return l}addRowGroupTotals(t,e){if(!this.gos.get("pivotRowTotals"))return;const n=this.gos.get("pivotRowTotals")==="after",i=this.funcColsService.getValueColumns().slice();n||i.reverse();const l=i.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let c=0;c<i.length;c++){const d=i[c],p=this.columnNameService.getDisplayNameForColumn(d,"header"),h=this.createColDef(d,p,[]),m=[];for(let x=0;x<e.length;x++){const w=e[x];w.pivotValueColumn===d&&m.push(w.colId)}h.pivotTotalColumnIds=m,h.colId=Nu+h.colId;const y=l?{children:[h],pivotKeys:[],groupId:`${Nu}_pivotGroup_${d.getColId()}`}:h;e.push(h),n?t.push(y):t.unshift(y)}}createColDef(t,e,n,o=!1){const i={};if(t){const l=t.getColDef();Object.assign(i,l),i.hide=!1}return i.headerName=e,i.colId=this.generateColumnId(n||[],t&&!o?t.getColId():""),i.field=i.colId,i.valueGetter=l=>{var c;return(c=l.data)==null?void 0:c[l.colDef.field]},i.pivotKeys=n,i.pivotValueColumn=t,i.filter===!0&&(i.filter="agNumberColumnFilter"),i}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 i=0;i<t.length;i++){const c=t[i].split(this.fieldSeparator);let d=e;for(let p=0;p<c.length;p++){const h=c[p];d[h]==null&&(d[h]={}),d=d[h]}}const n=(i,l,c,d)=>{const p=[];for(const y in c){const x=c[y],w=n(`${i}${this.fieldSeparator}${y}`,y,x,d+1);p.push(w)}if(p.length===0){const y=this.columnModel.getColDefCol(l);if(y){const w=this.columnNameService.getDisplayNameForColumn(y,"header")??l,E=this.createColDef(y,w,void 0,!1);return E.colId=i,E.aggFunc=y.getAggFunc(),E.valueGetter=O=>{var $;return($=O.data)==null?void 0:$[i]},E}return{colId:i,headerName:l,valueGetter:w=>{var E;return(E=w.data)==null?void 0:E[i]}}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&p.length===1&&"colId"in p[0]?(p[0].headerName=l,p[0]):{openByDefault:this.pivotDefaultExpanded===-1||d<this.pivotDefaultExpanded,groupId:i,headerName:l,children:p}},o=[];for(const i in e){const l=e[i],c=n(i,i,l,0);o.push(c)}return o}},Au="Exceeded maximum allowed pivot column count.",Xv=class extends T.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(b){if(b.message===Au){this.pivotResultColsService.setPivotResultCols([],"rowModelUpdated"),this.eventService.dispatchEvent({type:"pivotMaxColumnsExceeded",message:b.message}),this.lastTimeFailed=!0;return}throw b}const i=this.setUniqueValues(o),l=this.funcColsService.getValueColumns(),c=l.map(b=>`${b.getId()}-${b.getColDef().headerName}`).join("#"),d=l.map(b=>b.getAggFunc().toString()).join("#"),p=this.aggregationColumnsHashLastTime!==c,h=this.aggregationFuncsHashLastTime!==d;this.aggregationColumnsHashLastTime=c,this.aggregationFuncsHashLastTime=d;const m=this.funcColsService.getRowGroupColumns().map(b=>b.getId()).join("#"),y=m!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=m;const x=this.gos.get("pivotRowTotals"),w=this.gos.get("pivotColumnGroupTotals"),E=this.gos.get("suppressExpandablePivotGroups"),O=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),$=x!==this.pivotRowTotalsLastTime||w!==this.pivotColumnGroupTotalsLastTime||E!==this.suppressExpandablePivotGroupsLastTime||O!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=x,this.pivotColumnGroupTotalsLastTime=w,this.suppressExpandablePivotGroupsLastTime=E,this.removePivotHeaderRowWhenSingleValueColumnLastTime=O,this.lastTimeFailed||i||p||y||h||$){const{pivotColumnGroupDefs:b,pivotColumnDefs:R}=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);this.pivotColumnDefs=R,this.pivotResultColsService.setPivotResultCols(b,"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 i;o.leafGroup?this.bucketRowNode(o,e):(i=o.childrenAfterFilter)==null||i.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 i={},l=e[n];if(t.forEach(c=>{let d=this.valueService.getKeyForNode(l,c);if(T._missing(d)&&(d=""),!o[d]){this.currentUniqueCount+=1,o[d]={};const p=this.maxUniqueValues!==-1,h=this.currentUniqueCount>this.maxUniqueValues;if(p&&h)throw Error(Au)}i[d]||(i[d]=[]),i[d].push(c)}),n===e.length-1)return i;{const c={};return T._iterateObject(i,(d,p)=>{c[d]=this.bucketChildren(p,e,n+1,o[d])}),c}}getPivotColumnDefs(){return this.pivotColumnDefs}};function Yv(t,e,n){t.aggFuncService&&t.aggFuncService.addAggFuncs({key:n})}function Jv(t,e){t.aggFuncService&&t.aggFuncService.addAggFuncs(e)}function Qv(t){t.aggFuncService&&t.aggFuncService.clear()}function e_(t,e,n){t.funcColsService.setColumnAggFunc(e,n,"api")}function t_(t){return t.columnModel.isPivotMode()}function n_(t,e,n){return t.pivotResultColsService.lookupPivotResultCol(e,n)}function r_(t,e){t.funcColsService.setValueColumns(e,"api")}function o_(t){return t.funcColsService.getValueColumns()}function i_(t,e){t.funcColsService.removeValueColumns([e],"api")}function s_(t,e){t.funcColsService.removeValueColumns(e,"api")}function a_(t,e){t.funcColsService.addValueColumns([e],"api")}function l_(t,e){t.funcColsService.addValueColumns(e,"api")}function c_(t,e){t.funcColsService.setRowGroupColumns(e,"api")}function d_(t,e){t.funcColsService.removeRowGroupColumns([e],"api")}function u_(t,e){t.funcColsService.removeRowGroupColumns(e,"api")}function p_(t,e){t.funcColsService.addRowGroupColumns([e],"api")}function h_(t,e){t.funcColsService.addRowGroupColumns(e,"api")}function f_(t,e,n){t.funcColsService.moveRowGroupColumn(e,n,"api")}function m_(t){return t.funcColsService.getRowGroupColumns()}function g_(t,e){t.funcColsService.setPivotColumns(e,"api")}function y_(t,e){t.funcColsService.removePivotColumns([e],"api")}function v_(t,e){t.funcColsService.removePivotColumns(e,"api")}function __(t,e){t.funcColsService.addPivotColumns([e],"api")}function C_(t,e){t.funcColsService.addPivotColumns(e,"api")}function w_(t){return t.funcColsService.getPivotColumns()}function b_(t,e){t.pivotResultColsService.setPivotResultCols(e,"api")}function x_(t){const e=t.pivotResultColsService.getPivotResultCols();return e?e.list:null}var k_=class extends T.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]}},mi="32.3.3",vl=T._defineModule({version:mi,moduleName:`${T.ModuleNames.RowGroupingModule}-core`,beans:[Av,Fv,qv,Kv,Xv,wv,Vv,k_,Iv],userComponents:[{name:"agGroupRowRenderer",classImp:Me.GroupCellRenderer},{name:"agGroupCellRenderer",classImp:Me.GroupCellRenderer}],controllers:[{name:"groupCellRendererCtrl",classImp:Me.GroupCellRendererCtrl}],dependantModules:[Me.EnterpriseCoreModule]}),S_=T._defineModule({version:mi,moduleName:`${T.ModuleNames.RowGroupingModule}-api`,apiFunctions:{addAggFunc:Yv,addAggFuncs:Jv,clearAggFuncs:Qv,setColumnAggFunc:e_,isPivotMode:t_,getPivotResultColumn:n_,setValueColumns:r_,getValueColumns:o_,removeValueColumn:i_,removeValueColumns:s_,addValueColumn:a_,addValueColumns:l_,setRowGroupColumns:c_,removeRowGroupColumn:d_,removeRowGroupColumns:u_,addRowGroupColumn:p_,addRowGroupColumns:h_,getRowGroupColumns:m_,moveRowGroupColumn:f_,setPivotColumns:g_,removePivotColumn:y_,removePivotColumns:v_,addPivotColumn:__,addPivotColumns:C_,getPivotColumns:w_,setPivotResultColumns:b_,getPivotResultColumns:x_},dependantModules:[vl]}),Vu=T._defineModule({version:mi,moduleName:"@ag-grid-enterprise/group-filter",userComponents:[{name:"agGroupColumnFilter",classImp:Ov}],dependantModules:[vl,T._ColumnFilterModule]}),E_=T._defineModule({version:mi,moduleName:"@ag-grid-enterprise/group-floating-filter",userComponents:[{name:"agGroupColumnFloatingFilter",classImp:Lv}],dependantModules:[Vu,T._FloatingFilterModule]}),T_=T._defineModule({version:mi,moduleName:T.ModuleNames.RowGroupingModule,dependantModules:[vl,S_,Vu,E_]}),Bu=class extends fl{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:T._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()}},Pu=300,N_=class extends T.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>`,[T.AgCheckboxSelector,T.AgInputTextFieldSelector]),this.eExpand=T.RefPlaceholder,this.eSelect=T.RefPlaceholder,this.eFilterTextField=T.RefPlaceholder}wireBeans(t){this.columnModel=t.columnModel}postConstruct(){this.createExpandIcons(),this.addManagedListeners(this.eExpand,{click:this.onExpandClicked.bind(this),keydown:e=>{e.key===T.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=T._createIconNoSpan("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=T._createIconNoSpan("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=T._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(),i=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(i("searchOoo","Search...")),T._setDisplayed(this.eFilterTextField.getGui(),t),T._setDisplayed(this.eSelect.getGui(),e),T._setDisplayed(this.eExpand,n&&o)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=T._debounce(()=>{const t=this.eFilterTextField.getValue();this.dispatchLocalEvent({type:"filterChanged",filterText:t})},Pu)),this.onFilterTextChangedDebounced()}onMiniFilterKeyDown(t){t.key===T.KeyCode.ENTER&&setTimeout(()=>this.onSelectClicked(),Pu)}onSelectClicked(){this.dispatchLocalEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchLocalEvent({type:this.expandState===0?"collapseAll":"expandAll"})}setExpandState(t){this.expandState=t,T._setDisplayed(this.eExpandChecked,this.expandState===0),T._setDisplayed(this.eExpandUnchecked,this.expandState===1),T._setDisplayed(this.eExpandIndeterminate,this.expandState===2)}setSelectionState(t){this.selectState=t,this.eSelect.setValue(this.selectState)}},
|
|
28
|
+
</div>`,[T.AgCheckboxSelector,T.AgInputTextFieldSelector]),this.eExpand=T.RefPlaceholder,this.eSelect=T.RefPlaceholder,this.eFilterTextField=T.RefPlaceholder}wireBeans(t){this.columnModel=t.columnModel}postConstruct(){this.createExpandIcons(),this.addManagedListeners(this.eExpand,{click:this.onExpandClicked.bind(this),keydown:e=>{e.key===T.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=T._createIconNoSpan("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=T._createIconNoSpan("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=T._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(),i=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(i("searchOoo","Search...")),T._setDisplayed(this.eFilterTextField.getGui(),t),T._setDisplayed(this.eSelect.getGui(),e),T._setDisplayed(this.eExpand,n&&o)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=T._debounce(()=>{const t=this.eFilterTextField.getValue();this.dispatchLocalEvent({type:"filterChanged",filterText:t})},Pu)),this.onFilterTextChangedDebounced()}onMiniFilterKeyDown(t){t.key===T.KeyCode.ENTER&&setTimeout(()=>this.onSelectClicked(),Pu)}onSelectClicked(){this.dispatchLocalEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchLocalEvent({type:this.expandState===0?"collapseAll":"expandAll"})}setExpandState(t){this.expandState=t,T._setDisplayed(this.eExpandChecked,this.expandState===0),T._setDisplayed(this.eExpandUnchecked,this.expandState===1),T._setDisplayed(this.eExpandIndeterminate,this.expandState===2)}setSelectionState(t){this.selectState=t,this.eSelect.setValue(this.selectState)}},A_={selector:"AG-PRIMARY-COLS-HEADER",component:N_},Ru=class{constructor(t,e,n,o=!1,i){this.localEventService=new T.LocalEventService,this.displayName=t,this.dept=n,this.group=o,o?(this.columnGroup=e,this.expanded=i,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)}},Du=class extends T.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(),T.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){T.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 Me.AgMenuList),o=this.localeService.getLocaleTextFunc();let i=()=>{};e.appendChild(n.getGui()),n.addMenuItems(t),n.addManagedListeners(n,{closeMenu:()=>{this.parentEl.focus(),i()}});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&&(i=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(i=>e.allowedFunction(i)&&!e.activeFunction(i)),o=this.columns.some(i=>e.allowedFunction(i)&&e.activeFunction(i));n&&t.push({name:e.activateLabel(this.displayName),icon:T._createIconNoSpan(e.addIcon,this.gos,null),action:()=>e.activateFunction()}),o&&t.push({name:e.deactivateLabel(this.displayName),icon:T._createIconNoSpan(e.removeIcon,this.gos,null),action:()=>e.deActivateFunction()})}return t}},Iu=class extends T.Component{constructor(t,e,n,o){super(),this.modelItem=t,this.allowDragging=e,this.eventType=n,this.focusWrapper=o,this.cbSelect=T.RefPlaceholder,this.eLabel=T.RefPlaceholder,this.eGroupOpenedIcon=T.RefPlaceholder,this.eGroupClosedIcon=T.RefPlaceholder,this.eColumnGroupIcons=T.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>`,[T.AgCheckboxSelector]),this.eDragHandle=T._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(),T._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 i=t.headerTooltip;this.setTooltip({newTooltipText:i,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 T.KeyCode.LEFT:t.preventDefault(),this.modelItem.setExpanded(!1);break;case T.KeyCode.RIGHT:t.preventDefault(),this.modelItem.setExpanded(!0);break;case T.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 Du(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){T._setDisplayed(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns");const e={type:T.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 i=o.getId();e[i]=o.isVisible(),n[i]=this.modelItemUtils.createPivotState(o)}),{columns:t,visibleState:e,pivotState:n}}setupExpandContract(){this.eGroupClosedIcon.appendChild(T._createIcon("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(T._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 T.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"),i=t("ariaToggleVisibility","Press SPACE to toggle visibility");T._setAriaLabel(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${i} (${o})`),T._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(i=>{!t&&i.getColDef().lockVisible||(this.isColumnChecked(i,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(),i=t.isValueActive();return n||o||i}return t.isVisible()}onExpandOrContractClicked(){const t=this.modelItem.isExpanded();this.modelItem.setExpanded(!t)}onExpandChanged(){this.setOpenClosedIcons(),this.refreshAriaExpanded()}setOpenClosedIcons(){const t=this.modelItem.isExpanded();T._setDisplayed(this.eGroupClosedIcon,!t),T._setDisplayed(this.eGroupOpenedIcon,t)}refreshAriaExpanded(){T._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)}},
|
|
35
|
+
</div>`,[T.AgCheckboxSelector]),this.eDragHandle=T._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(),T._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 i=t.headerTooltip;this.setTooltip({newTooltipText:i,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 T.KeyCode.LEFT:t.preventDefault(),this.modelItem.setExpanded(!1);break;case T.KeyCode.RIGHT:t.preventDefault(),this.modelItem.setExpanded(!0);break;case T.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 Du(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){T._setDisplayed(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns");const e={type:T.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 i=o.getId();e[i]=o.isVisible(),n[i]=this.modelItemUtils.createPivotState(o)}),{columns:t,visibleState:e,pivotState:n}}setupExpandContract(){this.eGroupClosedIcon.appendChild(T._createIcon("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(T._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 T.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"),i=t("ariaToggleVisibility","Press SPACE to toggle visibility");T._setAriaLabel(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${i} (${o})`),T._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(i=>{!t&&i.getColDef().lockVisible||(this.isColumnChecked(i,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(),i=t.isValueActive();return n||o||i}return t.isVisible()}onExpandOrContractClicked(){const t=this.modelItem.isExpanded();this.modelItem.setExpanded(!t)}onExpandChanged(){this.setOpenClosedIcons(),this.refreshAriaExpanded()}setOpenClosedIcons(){const t=this.modelItem.isExpanded();T._setDisplayed(this.eGroupClosedIcon,!t),T._setDisplayed(this.eGroupOpenedIcon,t)}refreshAriaExpanded(){T._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)}},V_=class extends T.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 Me.VirtualListDragFeature(this.comp,this.virtualList,{dragSourceType:T.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 T.isProvidedColumnGroup(t)?t.getLeafColumns():t?[t]:[]}isMoveBlocked(t){return this.gos.get("suppressMovableColumns")?!0:!!this.getCurrentColumnsBeingMoved(t).find(i=>{const l=i.getColDef();return!!l.suppressMovable||!!l.lockPosition})}moveItem(t,e){if(!e)return;const{component:n}=e;let o=null,i=e.position==="top";if(n instanceof Iu?(o=n.getColumns()[0],i=!0):n&&(o=n.getColumn()),!o)return;const l=this.getMoveTargetIndex({currentColumns:t,lastHoveredColumn:o,isBefore:i});l!=null&&this.columnMoveService.moveColumns(t,l,"toolPanelUi")}getMoveTargetIndex(t){const{currentColumns:e,lastHoveredColumn:n,isBefore:o}=t;if(!n||!e)return null;const i=this.columnModel.getCols().indexOf(n),l=o?i:i+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],i=t.length;return n.indexOf(o)<e?i:0}},B_=class extends T.Component{constructor(t,e,n,o){super(),this.allowDragging=e,this.groupsExist=n,this.focusWrapper=o,this.eLabel=T.RefPlaceholder,this.cbSelect=T.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>`,[T.AgCheckboxSelector]),this.eDragHandle=T._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=T._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 i=this.onColumnStateChanged.bind(this);this.addManagedEventListeners({columnPivotModeChanged:i}),this.addManagedListeners(this.column,{columnValueChanged:i,columnPivotChanged:i,columnRowGroupChanged:i,visibleChanged:i}),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(),T._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 Du(e,t,this.focusWrapper));this.addDestroyFunc(()=>{o.isAlive()&&this.destroyBean(o)})}handleKeyDown(t){t.key===T.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");T._setAriaLabel(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${o} (${n})`),T._setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)}setupDragging(){if(!this.allowDragging){T._setDisplayed(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns");const e={type:T.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"),i=!this.column.isAnyFunctionAllowed();e=!o&&!i,n=e}else{const{enableRowGroup:o,enableValue:i,lockPosition:l,suppressMovable:c,lockVisible:d}=this.column.getColDef(),p=!!o||!!i,h=!!l||!!c;e=!d,n=p||!h}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){T._warnOnce("can not expand a column item that does not represent a column group header")}},B_=class{constructor(t){this.items=t}getRowCount(){return this.items.length}getRow(t){return this.items[t]}},P_="ag-column-select-list",R_=class extends T.Component{constructor(){super(`<div class="${P_}" 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 Me.VirtualList({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator((i,l)=>(T._setAriaLevel(l,i.getDept()+1),this.createComponentFromItem(i,l))),this.columnModel.isReady()&&this.onColumnsChanged(),!this.params.suppressColumnMove&&this.createManagedBean(new A_(this,this.virtualList))}createComponentFromItem(t,e){if(t.isGroup()){const o=new Iu(t,this.allowDragging,this.eventType,e);return this.createBean(o),o}const n=new V_(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 i=t[o.getId()];(i!=null||e)&&n.setExpanded(!!i)}})}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 d=c.removeEventListener.bind(c,"expandedChanged",e);this.destroyColumnItemFuncs.push(d)},o=(c,d,p)=>{c.forEach(h=>{T.isProvidedColumnGroup(h)?i(h,d,p):l(h,d,p)})},i=(c,d,p)=>{const h=c.getColGroupDef();if(h&&h.suppressColumnsToolPanel)return;if(c.isPadding()){o(c.getChildren(),d,p);return}const y=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,c,"columnToolPanel"),x=new Ru(y,c,d,!0,this.expandGroupsByDefault);p.push(x),n(x),o(c.getChildren(),d+1,x.getChildren())},l=(c,d,p)=>{if(c.getColDef()&&c.getColDef().suppressColumnsToolPanel)return;const m=this.columnNameService.getDisplayNameForColumn(c,"columnToolPanel");p.push(new Ru(m,c,d))};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 B_(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;T._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(i=>{if(!i.isGroup())return;const l=i.getColumnGroup().getId();e.indexOf(l)>=0&&(i.setExpanded(t),n.push(l))});const o=e.filter(i=>!T._includes(n,i));o.length>0&&T._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 i=o.getColumn(),l=i.getColDef();let c;if(n){if(!i.isAllowPivot()&&!i.isAllowRowGroup()&&!i.isAllowValue())return;c=i.isValueActive()||i.isPivotActive()||i.isRowGroupActive()}else{if(l.lockVisible)return;c=i.isVisible()}c?t++:e++}),!(t>0&&e>0))return!(t===0||e>0)}setFilterText(t){this.filterText=T._exists(t)?t.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){const t=n=>{if(!T._exists(this.filterText))return!0;const o=n.getDisplayName();return o==null||o.toLowerCase().indexOf(this.filterText)!==-1},e=(n,o)=>{let i=!1;if(n.isGroup()){const c=t(n);n.getChildren().forEach(d=>{const p=e(d,c||o);p&&(i=p)})}const l=o||i?!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}},D_={selector:"AG-PRIMARY-COLS-LIST",component:R_},I_=class extends T.Component{constructor(){super(`<div class="ag-column-select">
|
|
38
|
+
</div>`,[T.AgCheckboxSelector]),this.eDragHandle=T._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=T._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 i=this.onColumnStateChanged.bind(this);this.addManagedEventListeners({columnPivotModeChanged:i}),this.addManagedListeners(this.column,{columnValueChanged:i,columnPivotChanged:i,columnRowGroupChanged:i,visibleChanged:i}),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(),T._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 Du(e,t,this.focusWrapper));this.addDestroyFunc(()=>{o.isAlive()&&this.destroyBean(o)})}handleKeyDown(t){t.key===T.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");T._setAriaLabel(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${o} (${n})`),T._setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)}setupDragging(){if(!this.allowDragging){T._setDisplayed(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns");const e={type:T.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"),i=!this.column.isAnyFunctionAllowed();e=!o&&!i,n=e}else{const{enableRowGroup:o,enableValue:i,lockPosition:l,suppressMovable:c,lockVisible:d}=this.column.getColDef(),p=!!o||!!i,h=!!l||!!c;e=!d,n=p||!h}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){T._warnOnce("can not expand a column item that does not represent a column group header")}},P_=class{constructor(t){this.items=t}getRowCount(){return this.items.length}getRow(t){return this.items[t]}},R_="ag-column-select-list",D_=class extends T.Component{constructor(){super(`<div class="${R_}" 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 Me.VirtualList({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator((i,l)=>(T._setAriaLevel(l,i.getDept()+1),this.createComponentFromItem(i,l))),this.columnModel.isReady()&&this.onColumnsChanged(),!this.params.suppressColumnMove&&this.createManagedBean(new V_(this,this.virtualList))}createComponentFromItem(t,e){if(t.isGroup()){const o=new Iu(t,this.allowDragging,this.eventType,e);return this.createBean(o),o}const n=new B_(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 i=t[o.getId()];(i!=null||e)&&n.setExpanded(!!i)}})}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 d=c.removeEventListener.bind(c,"expandedChanged",e);this.destroyColumnItemFuncs.push(d)},o=(c,d,p)=>{c.forEach(h=>{T.isProvidedColumnGroup(h)?i(h,d,p):l(h,d,p)})},i=(c,d,p)=>{const h=c.getColGroupDef();if(h&&h.suppressColumnsToolPanel)return;if(c.isPadding()){o(c.getChildren(),d,p);return}const y=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,c,"columnToolPanel"),x=new Ru(y,c,d,!0,this.expandGroupsByDefault);p.push(x),n(x),o(c.getChildren(),d+1,x.getChildren())},l=(c,d,p)=>{if(c.getColDef()&&c.getColDef().suppressColumnsToolPanel)return;const m=this.columnNameService.getDisplayNameForColumn(c,"columnToolPanel");p.push(new Ru(m,c,d))};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 P_(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;T._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(i=>{if(!i.isGroup())return;const l=i.getColumnGroup().getId();e.indexOf(l)>=0&&(i.setExpanded(t),n.push(l))});const o=e.filter(i=>!T._includes(n,i));o.length>0&&T._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 i=o.getColumn(),l=i.getColDef();let c;if(n){if(!i.isAllowPivot()&&!i.isAllowRowGroup()&&!i.isAllowValue())return;c=i.isValueActive()||i.isPivotActive()||i.isRowGroupActive()}else{if(l.lockVisible)return;c=i.isVisible()}c?t++:e++}),!(t>0&&e>0))return!(t===0||e>0)}setFilterText(t){this.filterText=T._exists(t)?t.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){const t=n=>{if(!T._exists(this.filterText))return!0;const o=n.getDisplayName();return o==null||o.toLowerCase().indexOf(this.filterText)!==-1},e=(n,o)=>{let i=!1;if(n.isGroup()){const c=t(n);n.getChildren().forEach(d=>{const p=e(d,c||o);p&&(i=p)})}const l=o||i?!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}},I_={selector:"AG-PRIMARY-COLS-LIST",component:D_},F_=class extends T.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>`,[A_,I_]),this.primaryColsHeaderPanel=T.RefPlaceholder,this.primaryColsListPanel=T.RefPlaceholder}init(t,e,n){this.allowDragging=t,this.params=e,this.eventType=n,this.primaryColsHeaderPanel.init(this.params);const o=this.params.suppressColumnFilter,i=this.params.suppressColumnSelectAll;this.params.suppressColumnExpandAll&&o&&i&&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 T.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()}},Fu=class extends T.Component{constructor(){super(...arguments),this.cbPivotMode=T.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(),[T.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(),[T.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)}},O_=class extends T.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 Fu),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel)),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new F_),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 gl(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.rowGroupDropZonePanel)),this.appendChild(this.rowGroupDropZonePanel)),this.params.suppressValues||(this.valuesDropZonePanel=this.createBean(new Bu(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.valuesDropZonePanel)),this.appendChild(this.valuesDropZonePanel)),this.params.suppressPivots||(this.pivotDropZonePanel=this.createBean(new ml(!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 Fu),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 gl(!1)),this.appendChild(this.rowGroupDropZonePanel)),this.setLastVisible())}setValuesSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.valuesDropZonePanel?this.valuesDropZonePanel.setDisplayed(t):t&&(this.valuesDropZonePanel=this.createManagedBean(new Bu(!1)),this.appendChild(this.valuesDropZonePanel)),this.setLastVisible())}setPivotSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.pivotDropZonePanel?this.pivotDropZonePanel.setDisplayed(t):t&&(this.pivotDropZonePanel=this.createManagedBean(new ml(!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(i=>i.classList.remove("ag-last-column-drop"));const n=t.querySelectorAll(".ag-column-drop:not(.ag-hidden)"),o=T._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(T.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,T._clearElement(this.getGui())}refresh(t){return this.destroyChildren(),this.init(t),!0}getState(){return{expandedGroupIds:this.primaryColsPanel.getExpandedGroups()}}destroy(){this.destroyChildren(),super.destroy()}},L_=class extends T.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(i=>{i.isPassesFilter()&&(i.isGroup()?n(i.getChildren()):e.push(i.getColumn()))})};return n(t),e}setAllVisible(t,e,n){const o=[];t.forEach(i=>{i.getColDef().lockVisible||i.isVisible()!=e&&o.push({colId:i.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?d=>{var p;if(!d.isAnyFunctionActive())if(d.isAllowValue()){const h=typeof d.getAggFunc()=="string"?d.getAggFunc():(p=this.aggFuncService)==null?void 0:p.getDefaultAggFunc(d);o.push({colId:d.getId(),aggFunc:h})}else d.isAllowRowGroup()?o.push({colId:d.getId(),rowGroup:!0}):d.isAllowPivot()&&o.push({colId:d.getId(),pivot:!0})}:d=>{(d.isPivotActive()||d.isRowGroupActive()||d.isValueActive())&&o.push({colId:d.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:i}=t,l=e.map(c=>{const d=c.getColId();if(this.columnModel.isPivotMode()){const p=o==null?void 0:o[d];return{colId:d,pivot:p==null?void 0:p.pivot,rowGroup:p==null?void 0:p.rowGroup,aggFunc:p==null?void 0:p.aggFunc}}else return{colId:d,hide:!(n!=null&&n[d])}});this.columnApplyStateService.applyColumnState({state:l},i)}createPivotState(t){return{pivot:t.isPivotActive(),rowGroup:t.isRowGroupActive(),aggFunc:t.isValueActive()?t.getAggFunc():void 0}}},M_="32.3.3",Ou=T._defineModule({version:M_,moduleName:T.ModuleNames.ColumnsToolPanelModule,beans:[L_],userComponents:[{name:"agColumnsToolPanel",classImp:O_},{name:"agMenuItem",classImp:Me.AgMenuItemRenderer}],dependantModules:[Me.EnterpriseCoreModule,T_,hl]});const G_=`.ag-header {
|
|
44
44
|
border-bottom: 1px solid var(--border-color-default);
|
|
45
|
-
}`;function Lu(){T.ModuleRegistry.registerModules([hs.ClientSideRowModelModule,kg.InfiniteRowModelModule,Zd.ServerSideRowModelModule,Sg.CsvExportModule,jd.ClipboardModule,Wd.RangeSelectionModule,Eg.RichSelectModule,Tg.MenuModule,Ng.ExcelExportModule,hl,Ou]);const t=Xy("AGGRID_LICENSE");t?(Me.LicenseManager.setLicenseKey(t),console.log("AG Grid Activated")):console.log("AG Grid License not found")}const G_=Hd.createPart("headerBottomBorder").withCSS(M_),Mu=Hd.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(G_),Gu=Symbol("sdk-vue");function _l(){return r.inject(Gu)}function $_(t,e,n={}){let o;Lu();const i=()=>{t.loadBlockState().then(c=>{l.loaded=!0;const d=zg(c,t,n),p=e(d),h=Object.fromEntries(Object.entries(p.routes).map(([m,y])=>{const x=typeof y=="function"?y():y;return[m,r.markRaw(x)]}));o=Object.assign(d,{...p,getRoute(m){return h[m]}})}).catch(c=>{console.error("load initial state error",c),l.error=c})},l=r.reactive({loaded:!1,error:void 0,useApp(){return Vg(o,"App is not loaded")},install(c){c.provide(Gu,this),i()}});return l}var z_=Object.defineProperty,U_=(t,e,n)=>e in t?z_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Z_=(t,e,n)=>U_(t,e+"",n);function ks(t,e){if(t==null)throw Error("Empty (null | undefined) value");return t}function j_(t,e,n){const o=Math.min(e,n),i=Math.max(e,n);return t>=o&&t<=i}function W_(t){return new Promise(e=>setTimeout(e,t))}function H_(t){return t()}function Ss(t,e,n){return e>t?e:t>n?n:t}function $u(t,e){return e(t)}function Zr(t,e){if(t!=null)return e(t)}function q_(t){if(t&&t.ok)return t.value}async function K_(t){return Object.fromEntries(await Promise.all(Object.entries(t).map(async([e,n])=>[e,await n])))}const zu=t=>t;function X_(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function Y_(t,e=[]){for(t=t?String(t):"";e.includes(t.charAt(0));)t=t.substring(1);return t}function J_(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(X_(65,91));return e}function Uu(){return J_(42)}const Cl=Array.isArray;function gi(t){return t!==null&&typeof t=="object"}function wl(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 Q_(t,e){return Object.keys(t).map(n=>e(t[n],n))}function yi(t,e){return gi(t)&&gi(e)?Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>yi(t[n],e[n])):t===e}function vi(t){if(Array.isArray(t)){const e=[];for(let n=0;n<t.length;n++)e[n]=vi(t[n]);return e}else if(gi(t)){const e={};return Object.keys(t).forEach(n=>{e[n]=vi(t[n])}),e}else return t}function eC(t){return Array.isArray(t)?Object.assign([],t):gi(t)?Object.assign({},t):t}function tC(t,e){const n={};for(const o in e)e[o]!==t[o]&&(n[o]=t[o]);return n}function nC(t){return Object.entries(t).forEach(([e,n])=>{n instanceof Function&&(t[e]=n.bind(t))}),t}function rC(t,e,n){return t[e]=n,t}function oC(t,e){return t[e]}function iC(t,e){t={...t};const n=t[e];return delete t[e],[n,t]}function sC(t,...e){return Object.assign({},...e.map(n=>({[n]:t[n]})))}function aC(t,...e){return e.map(n=>t[n])}function lC(t,...e){const n=Object.assign({},t);return e.forEach(o=>delete n[o]),n}function Zu(t,e){return new Set([...Object.keys(t),...Object.keys(e)]).forEach(n=>{const o=t[n],i=e[n];wl(o)&&wl(i)||Cl(o)&&Cl(i)&&o.length===i.length?Zu(o,i):t[n]=i}),t}const bl=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:nC,deepClone:vi,deepEqual:yi,deepPatch:Zu,getProp:oC,isArray:Cl,isObject:gi,isPlainObject:wl,map:Q_,omit:lC,pick:sC,pickValues:aC,setProp:rC,shallowClone:eC,shallowDiff:tC,shiftProp:iC},Symbol.toStringTag,{value:"Module"}));function cC(t,e){const n=t.findIndex(e);if(n<0)return[];const o=(()=>{for(let i=n;i<t.length;i++)if(!e(t[i],i))return i;return t.length})();return t.slice(n,o)}function dC(t,e,n){let o;return function(...i){o&&clearTimeout(o),o=setTimeout(()=>{o=void 0,t.apply(this,i)},e)}}const uC=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],pC=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],hC=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],fC=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],ju=(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 xl(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?fC:hC:e.binary?pC:uC;if(e.signed&&t===0)return` 0 ${n[0]}`;const o=t<0,i=o?"-":e.signed?"+":"";if(o&&(t=-t),t<1){const p=ju(t,e.locale);return i+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=ju(Number(t),e.locale),d=n[l];return i+c+" "+d}const mC={class:"context-menu"},gC=["onClick"],yC=r.defineComponent({__name:"Menu",props:{options:{}},emits:["close"],setup(t,{emit:e}){const n=e,o=i=>{i.cb(),n("close")};return(i,l)=>(r.openBlock(),r.createElementBlock("div",mC,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.options,(c,d)=>(r.openBlock(),r.createElementBlock("div",{key:d,onClick:r.withModifiers(p=>o(c),["stop"])},[r.createElementVNode("span",null,r.toDisplayString(c.text),1)],8,gC))),128))]))}}),Zt=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},vC=Zt(yC,[["__scopeId","data-v-12530966"]]);function kl(t,e){t.preventDefault();const n=()=>{r.render(null,document.body)},o=r.h(vC,{options:e,onClose:()=>{n()}});r.render(o,document.body);const i=o.el;return i.style.top=t.clientY+"px",i.style.left=t.clientX+"px",document.addEventListener("click",l=>{i.contains(l.target)||n()}),n}const Wu=Symbol(),Es=()=>r.inject(Wu),_C=["value"],CC={key:1},wC=r.defineComponent({__name:"BaseCellComponent",props:{modelValue:{},valueType:{},editable:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,i=r.reactive({edit:!1}),l=r.computed(()=>o.valueType),c=h=>{var m;let y=(m=h.target)==null?void 0:m.value;const x=r.unref(l),w=H_(()=>x==="integer"?parseInt(y,10):x==="float"?Number(y):y);n("update:modelValue",w),i.edit=!1},d=r.ref(),p=h=>{!h.metaKey&&o.editable&&(i.edit=!0,requestAnimationFrame(()=>{var m,y;(y=(m=d.value)==null?void 0:m.querySelector("input"))==null||y.focus()}))};return(h,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"baseRef",ref:d,class:r.normalizeClass(["base-cell",{"base-cell__edit":i.edit}]),onClick:p},[i.edit?(r.openBlock(),r.createElementBlock("input",{key:0,value:h.modelValue,onFocusout:m[0]||(m[0]=y=>i.edit=!1),onChange:c},null,40,_C)):(r.openBlock(),r.createElementBlock("div",CC,r.toDisplayString(h.modelValue),1))],2))}}),bC=["^data-row-index"],xC={key:0,class:"control-cell"},kC=r.defineComponent({__name:"TdCell",props:{cell:{}},setup(t){const e=t,n=Es(),o=r.computed(()=>e.cell.column.valueType),i=h=>{Zr(n.settings.value.onUpdatedRow,m=>{const y=e.cell.row,x={...y.dataRow,[e.cell.id]:h};m({...y,dataRow:x})})},l=h=>{h.metaKey&&n.selectRow(e.cell.row.primaryKey)},c=(h,m)=>{if(h.type==="contextmenu")h.preventDefault();else return;const y=n.settings??{},x=[],{onSelectedRows:w,onSelectedColumns:S}=y.value,O=n.data.selectedRows.has(m.primaryKey);w&&w.length&&(O?x.push({text:"Deselect row",cb(){n.data.selectedRows.delete(e.cell.row.primaryKey)}}):x.push({text:"Select row",cb(){n.selectRow(e.cell.row.primaryKey)}})),S&&S.length&&(x.push({text:"Select column",cb(){n.selectColumn(e.cell.column.id)}}),x.push({text:"Unselect column",cb(){n.unselectColumn(e.cell.column.id)}})),x.length&&kl(h,x)},d=r.ref(),p=r.computed(()=>e.cell.column.component?e.cell.column.component():void 0);return(h,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"cellRef",ref:d,class:r.normalizeClass(["td-cell",{[h.cell.class]:!0}]),"^data-row-index":h.cell.row.index,onClick:l,onContextmenu:m[0]||(m[0]=y=>c(y,h.cell.row))},[h.cell.control?(r.openBlock(),r.createElementBlock("div",xC,r.toDisplayString(h.cell.row.index),1)):p.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(p.value),{key:1,"model-value":h.cell.value,"onUpdate:modelValue":i},null,8,["model-value"])):(r.openBlock(),r.createBlock(wC,{key:2,"model-value":h.cell.value,"value-type":o.value,editable:h.cell.column.editable,"onUpdate:modelValue":i},null,8,["model-value","value-type","editable"]))],42,bC))}}),SC={},EC={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function TC(t,e){return r.openBlock(),r.createElementBlock("svg",EC,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 NC=Zt(SC,[["render",TC]]),AC={class:"tr-head"},VC=r.defineComponent({__name:"TrHead",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",AC,[r.renderSlot(e.$slots,"default")]))}});function BC(t,e){const n=e.indexOf(t)+1;return e[n>=e.length?0:n]}function PC(t,e){const n=t.findIndex(e);if(n<0)return[];const o=(()=>{for(let i=n;i<t.length;i++)if(!e(t[i],i))return i;return t.length})();return t.slice(n,o)}const RC=["^data-col-id"],DC=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&&kl(l,c)}function i(l){var c;const d=((c=l.sort)==null?void 0:c.direction)??"DESC";n("change:sort",{colId:l.id,direction:BC(d,["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(()=>i(l.col),["stop"]))},null,2)):r.createCommentVNode("",!0)],42,RC))}}),IC=r.defineComponent({__name:"TrBody",props:{row:{}},setup(t){const e=r.ref(),n=()=>{r.nextTick().then(()=>{Zr(e.value,o=>o.scrollLeft=0)})};return(o,i)=>(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))}}),FC=r.defineComponent({__name:"ColumnCaret",props:{column:{}},setup(t){const e=Es(),n=t,o=r.computed(()=>e.data.selectedColumns.has(n.column.id));return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["column-caret",{selected:o.value,frozen:i.column.frozen}])},null,2))}});function st(t,e,n,o){r.onMounted(()=>{var i;return(i=r.unref(t))==null?void 0:i.addEventListener(e,n,o)}),r.onUnmounted(()=>{var i;return(i=r.unref(t))==null?void 0:i.removeEventListener(e,n,o)})}function OC(t){r.onMounted(()=>window.addEventListener("mouseup",t)),r.onUnmounted(()=>window.removeEventListener("mouseup",t))}function LC(t){let e=!1;return function(...n){e?console.log("handle pressure"):(requestAnimationFrame(()=>{t(...n),e=!1}),e=!0)}}function MC(t,e){let n;function o(l){n={...l}}OC(()=>{n=void 0,e()});const i=LC(t);return st(window,"mousemove",l=>{n&&i({x:n.x,width:n.width,diff:l.x-n.x})}),{start:o}}const go=1,GC=10,$C=30,Hu=60;function qu(){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 Ku(t,e={}){const{delayEnter:n=0,delayLeave:o=0}=e,i=r.ref(!1);let l;const c=d=>{const p=d?n:o;l&&(clearTimeout(l),l=void 0),p?l=setTimeout(()=>i.value=d,p):i.value=d};return window&&(st(t,"mouseenter",()=>c(!0)),st(t,"mouseleave",()=>c(!1))),i}function zC(t){var e;const n=Zr((e=r.unref(t))==null?void 0:e.querySelectorAll(".th-cell"),o=>[...o])??[];return n.map(o=>{const{width:i,x:l}=o.getBoundingClientRect(),c=o.getAttribute("data-col-id");return zu({colId:c,width:i,x:l,right:l+i})}).slice(0,n.length-1)}function UC(t,e){const n=qu(),o=Ku(e,{}),{data:i}=t,l=MC(d=>{Zr(i.resizeTh,p=>{const h=i.columns.find(m=>m.id===p.colId);h&&(h.width=Ss(d.width+d.diff,$C,1e4),t.adjustWidth())})},()=>{i.resize=!1,i.resizeTh=void 0,document.body.style.cursor=""}),c=d=>{i.resizeTh&&(i.resize=!0,l.start({x:d.x,width:i.resizeTh.width}))};return r.watchEffect(()=>{if(!o.value){document.body.style.cursor="";return}if(i.resize)return;const d=zC(e).find(p=>Math.abs(n.x-p.right)<GC);d?(document.body.style.cursor="col-resize",i.resizeTh=d):(i.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:c}}const ZC={key:0,class:"command-menu"},jC={key:0},WC=["onClick"],HC=r.defineComponent({__name:"RowsCommandMenu",setup(t){const e=Es(),n=r.computed(()=>e.getSelectedRows()),o=r.computed(()=>n.value.length>0),i=r.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedRows)??[]}),l=r.computed(()=>i.value.map(c=>({label:c.label,cb:()=>{c.cb(n.value),e.data.selectedRows.clear(),e.data.rows=[]}})));return(c,d)=>o.value?(r.openBlock(),r.createElementBlock("div",ZC,[n.value.length?(r.openBlock(),r.createElementBlock("span",jC,r.toDisplayString(n.value.length)+" rows selected",1)):r.createCommentVNode("",!0),d[0]||(d[0]=r.createTextVNode()),d[1]||(d[1]=r.createElementVNode("hr",null,null,-1)),d[2]||(d[2]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(p,h)=>(r.openBlock(),r.createElementBlock("span",{key:h,class:"command",onClick:r.withModifiers(p.cb,["stop"])},r.toDisplayString(p.label),9,WC))),128))])):r.createCommentVNode("",!0)}}),qC={key:0,class:"command-menu"},KC={key:0},XC=["onClick"],YC=r.defineComponent({__name:"ColumnsCommandMenu",setup(t){const e=Es(),n=r.computed(()=>e.getSelectedColumns()),o=r.computed(()=>n.value.length>0),i=r.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedColumns)??[]}),l=r.computed(()=>i.value.map(c=>({label:c.label,cb:()=>{c.cb(n.value),e.data.selectedColumns.clear()}})));return(c,d)=>o.value?(r.openBlock(),r.createElementBlock("div",qC,[n.value.length?(r.openBlock(),r.createElementBlock("span",KC,"selected columns "+r.toDisplayString(n.value.length),1)):r.createCommentVNode("",!0),d[0]||(d[0]=r.createTextVNode()),d[1]||(d[1]=r.createElementVNode("hr",null,null,-1)),d[2]||(d[2]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(p,h)=>(r.openBlock(),r.createElementBlock("span",{key:h,class:"command",onClick:r.withModifiers(p.cb,["stop"])},r.toDisplayString(p.label),9,XC))),128))])):r.createCommentVNode("",!0)}});function gr(t,e){const n={el:void 0,x:0,y:0},o=i=>({x:i.x,y:i.y,dx:i.x-n.x,dy:i.y-n.y});st(document,"mousedown",i=>{i.target===r.unref(t)&&(i.stopPropagation&&i.stopPropagation(),i.preventDefault&&i.preventDefault(),n.el=r.unref(t),n.x=i.x,n.y=i.y)}),st(document,"mouseup",i=>{n.el&&(n.el=void 0,e({...o(i),stop:!0},n))}),st(document,"mousemove",i=>{n.el&&e(o(i),n)})}const JC=r.defineComponent({__name:"TScroll",props:{offset:{},windowSize:{},dataSize:{}},emits:["change:offset"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(),l=r.computed(()=>o.windowSize-12),c=r.computed(()=>o.windowSize<o.dataSize),d=r.computed(()=>Math.ceil(o.offset*(l.value/o.dataSize))),p=r.computed(()=>Math.ceil(l.value*l.value/o.dataSize)),h=r.computed(()=>({top:`${d.value}px`,height:`${p.value}px`}));return gr(i,(m,y)=>{const x=(d.value+m.dy)*o.dataSize/l.value;n("change:offset",x),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:i,class:"t-scroll__handle",style:r.normalizeStyle(h.value)},null,4)):r.createCommentVNode("",!0)])],4))}});function QC(t){return r.computed(()=>{const{data:e,settings:n}=t,{bodyWidth:o,scrollLeft:i}=e,l=[...e.columns],c=Uu();n.value.controlColumn&&l.unshift({id:c,label:"#",width:60,frozen:!0});let d=0;const p=l.map(m=>{const y={...m,offset:d};return d+=m.width+go,y}),h=p.filter(m=>m.frozen);return cC(p,m=>m.frozen?!1:i<m.offset+m.width&&m.offset<o+i).concat(h).map(m=>({...m,style:{left:m.frozen?`${m.offset}px`:`${m.offset-e.scrollLeft}px`,width:`${m.width}px`},control:m.id===c}))})}function e0(t,e){const n=r.computed(()=>e.value.reduce((o,i)=>(o[i.id]=i.justify?"justify-"+i.justify:"",o),{}));return r.computed(()=>t.rows.map(o=>{const i=n.value,{primaryKey:l,offset:c,dataRow:d,height:p}=o,h=e.value.map(m=>({id:m.id,column:m,row:o,value:d[m.id],class:i[m.id],editable:m.editable,width:m.width,style:m.style,control:m.control}));return zu({style:{top:`${c-t.scrollTop}px`,height:`${o.height}px`},primaryKey:l,offset:c,height:p,cells:h,selected:t.selectedRows.has(l)})}))}const t0=async(t,e)=>{const{scrollTop:n,bodyHeight:o}=t;return await W_(0),K_({rows:e.getRows(n,o),dataWindow:t})};function n0(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=vi(m.columns),e.currentWindow=void 0,m.dataSource.getHeight().then(y=>{e.dataHeight=y,h.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)),i=r.computed(()=>$u(h.data.dataHeight-h.data.bodyHeight,m=>m>0?m:0)),l=r.computed(()=>$u(o.value-h.data.bodyWidth,m=>m>0?m:0)),c=r.computed(()=>({bodyHeight:e.bodyHeight,scrollTop:e.scrollTop,current:e.currentWindow})),d=QC({data:e,settings:n}),p=e0(e,d),h={data:e,settings:n,tableColumns:d,tableRows:p,adjustWidth:()=>{const m=e.columns.reduce((x,w)=>x+w.width+go,0),y=e.bodyWidth+e.scrollLeft;if(m<y){const x=e.columns[e.columns.length-1];x.width=x.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=Ss(m,0,i.value)},updateScrollLeft(m){e.scrollLeft=Ss(m,0,l.value)},updateBodyHeight(){const{height:m}=t.settings,{dataHeight:y}=e,x=m>y?y:m;e.bodyHeight=x},updateDimensions(m){this.updateBodyHeight(),h.data.bodyWidth=m.width,h.adjustWidth(),e.rows=[],e.currentWindow=void 0}};return r.watch(c,(m,y)=>{const x=m.current;(!x||m.scrollTop<x.scrollTop||m.scrollTop+m.bodyHeight>x.bodyHeight+x.scrollTop)&&(e.currentWindow={scrollTop:m.scrollTop-Hu,bodyHeight:m.bodyHeight+Hu*2},t0(vi(e.currentWindow),n.value.dataSource).then(({rows:w,dataWindow:S})=>{yi(e.currentWindow,S)&&(e.rows=w)}))},{deep:!0,immediate:!0}),r.provide(Wu,h),h}const r0={class:"command-menu__container"},o0={key:0,class:"table-body__no-data"},i0={class:"carets"},Sl=r.defineComponent({__name:"TableComponent",props:{settings:{}},emits:["update:data","change:sort"],setup(t,{emit:e}){const n=e,o=t,i=n0(o),l=r.computed(()=>i.data.rows.length===0),c=r.computed(()=>({height:l.value?"212px":i.data.bodyHeight+"px"}));r.watch(i.data,O=>n("update:data",O),{deep:!0}),r.watch(o,()=>m);const d=r.ref(),p=r.ref(),h=r.ref(),m=()=>{Zr(h.value,O=>{i.updateDimensions(O.getBoundingClientRect())})},y=i.tableColumns,x=i.tableRows,{mouseDown:w}=UC(i,d);r.onMounted(()=>{r.nextTick(m)}),r.watchPostEffect(()=>{r.unref(o.settings),r.nextTick(m)}),st(window,"resize",()=>r.nextTick(m));const S=O=>{O.preventDefault(),i.updateOffsets(O)};return(O,G)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"tableRef",ref:d,class:"data-table",onMousedown:G[2]||(G[2]=(...b)=>r.unref(w)&&r.unref(w)(...b))},[r.createElementVNode("div",r0,[r.createVNode(HC),G[3]||(G[3]=r.createTextVNode()),r.createVNode(YC)]),G[7]||(G[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"headRef",ref:p,class:"table-head"},[r.createVNode(VC,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(y),(b,R)=>(r.openBlock(),r.createBlock(DC,{key:R,col:b,style:r.normalizeStyle(b.style),"onChange:sort":G[0]||(G[0]=F=>O.$emit("change:sort",F))},null,8,["col","style"]))),128))]),_:1})],512),G[8]||(G[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"bodyRef",ref:h,class:"table-body",style:r.normalizeStyle(c.value),onWheel:S},[l.value?(r.openBlock(),r.createElementBlock("div",o0,[r.createElementVNode("div",null,[r.createVNode(NC),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(x),(b,R)=>(r.openBlock(),r.createBlock(IC,{key:R,row:b},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(b.cells,F=>(r.openBlock(),r.createBlock(kC,{key:F.column.id+":"+R,cell:F,style:r.normalizeStyle(F.style)},null,8,["cell","style"]))),128))]),_:2},1032,["row"]))),128))],36),G[9]||(G[9]=r.createTextVNode()),r.createElementVNode("div",i0,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(y),(b,R)=>(r.openBlock(),r.createBlock(FC,{key:R,column:b,style:r.normalizeStyle(b.style),"onChange:sort":G[1]||(G[1]=F=>O.$emit("change:sort",F))},null,8,["column","style"]))),128))]),G[10]||(G[10]=r.createTextVNode()),r.createVNode(JC,{offset:r.unref(i).data.scrollTop,"window-size":r.unref(i).data.bodyHeight,"data-size":r.unref(i).data.dataHeight,"onChange:offset":r.unref(i).updateScrollTop},null,8,["offset","window-size","data-size","onChange:offset"])],544))}}),Xu=new WeakMap;class s0{constructor(e,n,o){Z_(this,"dataHeight"),this.datum=e,this.resolveHeight=n,this.resolvePrimaryKey=o;const i=e.reduce((c,d,p)=>(c.indices.set(p,c.total),c.total+=this.resolveHeight(d,p)+go,c),{total:0,indices:new Map});this.dataHeight=i.total;const l=e.map((c,d)=>({dataRow:c,index:d,primaryKey:this.resolvePrimaryKey(c,d),offset:ks(i.indices.get(d)),height:this.resolveHeight(c,d)}));Xu.set(this,l)}get rows(){return Xu.get(this)}async getHeight(){return this.dataHeight}async getRows(e,n){return PC(this.rows,o=>{const i=o.offset;return e<i+o.height&&i<n+e})}}class a0{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=Ss(Math.floor(e/this.height),0,Number.POSITIVE_INFINITY),i=Math.ceil(n+40/this.height);return(await this.api.query({offset:o,limit:i})).map((l,c)=>({dataRow:l,index:o+c,primaryKey:this.resolvePrimaryKey(l,o+c),offset:(o+c)*(this.rowHeight+go),height:this.rowHeight}))}}function l0(t){return Object.freeze(t)}function c0(t){return r.h(Sl,{settings:Object.freeze(t)})}function El(t,e){const n=new s0(t,e.resolveRowHeight,e.resolvePrimaryKey);return{...e,dataSource:n}}function d0(t,e){return r.computed(()=>{const n=r.unref(t);return El(n,r.unref(e))})}function u0(t,e){const n=r.computed(()=>{const i=r.unref(t);return El(i,r.unref(e))}),o=r.reactive({settings:n});return r.computed(()=>r.h(Sl,o))}const p0=Object.freeze(Object.defineProperty({__proto__:null,AsyncData:a0,Component:Sl,factory:c0,rawDataSettings:El,settings:l0,useRawData:d0,useRawDataComponent:u0},Symbol.toStringTag,{value:"Module"}));function*h0(t,e){for(const n of t)yield e(n)}function f0(t){const e=[];for(const n of t)e.push(n);return e}function Yu(t){return t()}function Tl(t,e){if(t==null)throw Error(e);return t}function Nl(t){let e=!1;return function(...n){e||(requestAnimationFrame(()=>{t(...n),e=!1}),e=!0)}}function Ju(t){return new Promise(e=>setTimeout(e,t))}function Qu(t,e){const n=setTimeout(t,e);return()=>{clearTimeout(n)}}function ep(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function m0(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(ep(65,91));return e}function tp(t){return function(e){return 1-t(1-e)}}function g0(t){return function(e){return e<.5?t(2*e)/2:(2-t(2*(1-e)))/2}}function np(t){const{duration:e,draw:n,timing:o}=t,i=performance.now();let l=!1;return requestAnimationFrame(function c(d){let p=(d-i)/e;(p>1||l)&&(p=1);const h=o(p);n(h),p<1&&requestAnimationFrame(c)}),function(){l=!0}}function y0(t){const{getFraction:e,draw:n,timing:o}=t,i=performance.now();let l=!1;return requestAnimationFrame(function c(d){let p=e(d-i);if(l)return;p>1&&(p=1);const h=o(p);n(h),p<1&&requestAnimationFrame(c)}),function(){l=!0}}function rp(t,e){let n=-1;return(...o)=>{n!==-1&&(clearTimeout(n),n=-1),n=window.setTimeout(()=>t(...o),e)}}function op(t,e,n=!0){let o=0,i;return function(...l){i=()=>{t.apply(this,l),o=new Date().getTime()+e,i=null,n&&setTimeout(()=>{i&&i()},e)},new Date().getTime()>o&&i()}}function v0(t){return t.map(e=>({text:String(e),value:e}))}function yr(t){return t.map(e=>({label:"label"in e?e.label:e.text,value:e.value,description:e.description}))}const Al=new Map;function _0(t){return Al.has(t)||Al.set(t,r.ref(localStorage.getItem(t))),Tl(Al.get(t),"...")}function C0(t,e){e==null?localStorage.removeItem(t):localStorage.setItem(t,e)}function ip(t){const e=_0(t);return r.watch(e,n=>C0(t,n)),e}const Vl=new Set;window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{f0(h0(Vl.values(),e=>e(t.matches?"dark":"light")))});const w0=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",sp=r.ref(w0),Bl=ip("theme");function ap(t){const e=r.computed(()=>Bl.value?Bl.value:sp.value),n=i=>{sp.value=i,t&&t(i)};function o(){Bl.value=e.value==="light"?"dark":(e.value,"light")}return r.watch(e,i=>{t&&t(r.unref(i))}),r.onMounted(()=>{Vl.add(n)}),r.onUnmounted(()=>{Vl.delete(n)}),[e,o]}const b0=r.defineComponent({__name:"ThemeSwitcher",setup(t){const[e,n]=ap();return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-theme-switcher",r.unref(e)]),onClick:i[0]||(i[0]=(...l)=>r.unref(n)&&r.unref(n)(...l))},i[1]||(i[1]=[r.createElementVNode("div",null,null,-1)]),2))}}),x0={key:0,class:"pl-block-page__title"},k0={class:"pl-block-page__title__default"},S0={class:"pl-block-page__title__append"},E0={key:1},T0={class:"pl-block-page__body"},N0={name:"PlBlockPage"},A0=r.defineComponent({...N0,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",x0,[r.createElementVNode("div",k0,[r.renderSlot(n.$slots,"title")]),o[0]||(o[0]=r.createTextVNode()),r.createElementVNode("div",S0,[r.renderSlot(n.$slots,"append")])])):(r.openBlock(),r.createElementBlock("div",E0)),o[1]||(o[1]=r.createTextVNode()),r.createElementVNode("div",T0,[r.renderSlot(n.$slots,"default")])],2))}}),V0={name:"PlContainer"},B0=r.defineComponent({...V0,props:{width:{}},setup(t){const e=t,n=r.computed(()=>({width:e.width}));return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-container pl-layout-component",style:r.normalizeStyle(n.value)},[r.renderSlot(o.$slots,"default")],4))}}),P0={name:"PlRow"},R0=r.defineComponent({...P0,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))}}),D0={class:"pl-layout-component",style:{"flex-grow":"1"}},I0={name:"PlSpacer"},lp=r.defineComponent({...I0,setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",D0))}}),F0={name:"PlGrid"},O0=r.defineComponent({...F0,props:{columns:{}},setup(t){const e=t,n=r.computed(()=>({gridTemplateColumns:`repeat(${e.columns}, minmax(0, 1fr))`}));return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-layout-component pl-grid",style:r.normalizeStyle(n.value)},[r.renderSlot(o.$slots,"default")],4))}}),L0={key:0,class:"pl-alert__icon"},M0={class:"pl-alert__main"},G0={key:0},$0={class:"pl-alert__main__text"},z0={name:"PlAlert"},U0=r.defineComponent({...z0,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",L0,[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",M0,[n.label?(r.openBlock(),r.createElementBlock("label",G0,r.toDisplayString(n.label),1)):r.createCommentVNode("",!0),o[1]||(o[1]=r.createTextVNode()),r.createElementVNode("div",$0,[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]=i=>n.$emit("update:modelValue",!1))})):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)}}),Z0=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
45
|
+
}`;function Lu(){T.ModuleRegistry.registerModules([hs.ClientSideRowModelModule,Sg.InfiniteRowModelModule,Zd.ServerSideRowModelModule,Eg.CsvExportModule,Wd.ClipboardModule,jd.RangeSelectionModule,Tg.RichSelectModule,Ng.MenuModule,Ag.ExcelExportModule,hl,Ou]);const t=Yy("AGGRID_LICENSE");t?(Me.LicenseManager.setLicenseKey(t),console.log("AG Grid Activated")):console.log("AG Grid License not found")}const $_=Hd.createPart("headerBottomBorder").withCSS(G_),Mu=Hd.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($_),Gu=Symbol("sdk-vue");function _l(){return r.inject(Gu)}function z_(t,e,n={}){let o;Lu();const i=()=>{t.loadBlockState().then(c=>{l.loaded=!0;const d=Ug(c,t,n),p=e(d),h=Object.fromEntries(Object.entries(p.routes).map(([m,y])=>{const x=typeof y=="function"?y():y;return[m,r.markRaw(x)]}));o=Object.assign(d,{...p,getRoute(m){return h[m]}})}).catch(c=>{console.error("load initial state error",c),l.error=c})},l=r.reactive({loaded:!1,error:void 0,useApp(){return Bg(o,"App is not loaded")},install(c){c.provide(Gu,this),i()}});return l}var U_=Object.defineProperty,Z_=(t,e,n)=>e in t?U_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,W_=(t,e,n)=>Z_(t,e+"",n);function ks(t,e){if(t==null)throw Error("Empty (null | undefined) value");return t}function j_(t,e,n){const o=Math.min(e,n),i=Math.max(e,n);return t>=o&&t<=i}function H_(t){return new Promise(e=>setTimeout(e,t))}function q_(t){return t()}function Ss(t,e,n){return e>t?e:t>n?n:t}function $u(t,e){return e(t)}function Zr(t,e){if(t!=null)return e(t)}function K_(t){if(t&&t.ok)return t.value}async function X_(t){return Object.fromEntries(await Promise.all(Object.entries(t).map(async([e,n])=>[e,await n])))}const zu=t=>t;function Y_(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function J_(t,e=[]){for(t=t?String(t):"";e.includes(t.charAt(0));)t=t.substring(1);return t}function Q_(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(Y_(65,91));return e}function Uu(){return Q_(42)}const Cl=Array.isArray;function gi(t){return t!==null&&typeof t=="object"}function wl(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 eC(t,e){return Object.keys(t).map(n=>e(t[n],n))}function yi(t,e){return gi(t)&&gi(e)?Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>yi(t[n],e[n])):t===e}function vi(t){if(Array.isArray(t)){const e=[];for(let n=0;n<t.length;n++)e[n]=vi(t[n]);return e}else if(gi(t)){const e={};return Object.keys(t).forEach(n=>{e[n]=vi(t[n])}),e}else return t}function tC(t){return Array.isArray(t)?Object.assign([],t):gi(t)?Object.assign({},t):t}function nC(t,e){const n={};for(const o in e)e[o]!==t[o]&&(n[o]=t[o]);return n}function rC(t){return Object.entries(t).forEach(([e,n])=>{n instanceof Function&&(t[e]=n.bind(t))}),t}function oC(t,e,n){return t[e]=n,t}function iC(t,e){return t[e]}function sC(t,e){t={...t};const n=t[e];return delete t[e],[n,t]}function aC(t,...e){return Object.assign({},...e.map(n=>({[n]:t[n]})))}function lC(t,...e){return e.map(n=>t[n])}function cC(t,...e){const n=Object.assign({},t);return e.forEach(o=>delete n[o]),n}function Zu(t,e){return new Set([...Object.keys(t),...Object.keys(e)]).forEach(n=>{const o=t[n],i=e[n];wl(o)&&wl(i)||Cl(o)&&Cl(i)&&o.length===i.length?Zu(o,i):t[n]=i}),t}const bl=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:rC,deepClone:vi,deepEqual:yi,deepPatch:Zu,getProp:iC,isArray:Cl,isObject:gi,isPlainObject:wl,map:eC,omit:cC,pick:aC,pickValues:lC,setProp:oC,shallowClone:tC,shallowDiff:nC,shiftProp:sC},Symbol.toStringTag,{value:"Module"}));function dC(t,e){const n=t.findIndex(e);if(n<0)return[];const o=(()=>{for(let i=n;i<t.length;i++)if(!e(t[i],i))return i;return t.length})();return t.slice(n,o)}function uC(t,e,n){let o;return function(...i){o&&clearTimeout(o),o=setTimeout(()=>{o=void 0,t.apply(this,i)},e)}}const pC=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],hC=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],fC=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],mC=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Wu=(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 xl(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?mC:fC:e.binary?hC:pC;if(e.signed&&t===0)return` 0 ${n[0]}`;const o=t<0,i=o?"-":e.signed?"+":"";if(o&&(t=-t),t<1){const p=Wu(t,e.locale);return i+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=Wu(Number(t),e.locale),d=n[l];return i+c+" "+d}const gC={class:"context-menu"},yC=["onClick"],vC=r.defineComponent({__name:"Menu",props:{options:{}},emits:["close"],setup(t,{emit:e}){const n=e,o=i=>{i.cb(),n("close")};return(i,l)=>(r.openBlock(),r.createElementBlock("div",gC,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.options,(c,d)=>(r.openBlock(),r.createElementBlock("div",{key:d,onClick:r.withModifiers(p=>o(c),["stop"])},[r.createElementVNode("span",null,r.toDisplayString(c.text),1)],8,yC))),128))]))}}),Zt=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},_C=Zt(vC,[["__scopeId","data-v-12530966"]]);function kl(t,e){t.preventDefault();const n=()=>{r.render(null,document.body)},o=r.h(_C,{options:e,onClose:()=>{n()}});r.render(o,document.body);const i=o.el;return i.style.top=t.clientY+"px",i.style.left=t.clientX+"px",document.addEventListener("click",l=>{i.contains(l.target)||n()}),n}const ju=Symbol(),Es=()=>r.inject(ju),CC=["value"],wC={key:1},bC=r.defineComponent({__name:"BaseCellComponent",props:{modelValue:{},valueType:{},editable:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,i=r.reactive({edit:!1}),l=r.computed(()=>o.valueType),c=h=>{var m;let y=(m=h.target)==null?void 0:m.value;const x=r.unref(l),w=q_(()=>x==="integer"?parseInt(y,10):x==="float"?Number(y):y);n("update:modelValue",w),i.edit=!1},d=r.ref(),p=h=>{!h.metaKey&&o.editable&&(i.edit=!0,requestAnimationFrame(()=>{var m,y;(y=(m=d.value)==null?void 0:m.querySelector("input"))==null||y.focus()}))};return(h,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"baseRef",ref:d,class:r.normalizeClass(["base-cell",{"base-cell__edit":i.edit}]),onClick:p},[i.edit?(r.openBlock(),r.createElementBlock("input",{key:0,value:h.modelValue,onFocusout:m[0]||(m[0]=y=>i.edit=!1),onChange:c},null,40,CC)):(r.openBlock(),r.createElementBlock("div",wC,r.toDisplayString(h.modelValue),1))],2))}}),xC=["^data-row-index"],kC={key:0,class:"control-cell"},SC=r.defineComponent({__name:"TdCell",props:{cell:{}},setup(t){const e=t,n=Es(),o=r.computed(()=>e.cell.column.valueType),i=h=>{Zr(n.settings.value.onUpdatedRow,m=>{const y=e.cell.row,x={...y.dataRow,[e.cell.id]:h};m({...y,dataRow:x})})},l=h=>{h.metaKey&&n.selectRow(e.cell.row.primaryKey)},c=(h,m)=>{if(h.type==="contextmenu")h.preventDefault();else return;const y=n.settings??{},x=[],{onSelectedRows:w,onSelectedColumns:E}=y.value,O=n.data.selectedRows.has(m.primaryKey);w&&w.length&&(O?x.push({text:"Deselect row",cb(){n.data.selectedRows.delete(e.cell.row.primaryKey)}}):x.push({text:"Select row",cb(){n.selectRow(e.cell.row.primaryKey)}})),E&&E.length&&(x.push({text:"Select column",cb(){n.selectColumn(e.cell.column.id)}}),x.push({text:"Unselect column",cb(){n.unselectColumn(e.cell.column.id)}})),x.length&&kl(h,x)},d=r.ref(),p=r.computed(()=>e.cell.column.component?e.cell.column.component():void 0);return(h,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"cellRef",ref:d,class:r.normalizeClass(["td-cell",{[h.cell.class]:!0}]),"^data-row-index":h.cell.row.index,onClick:l,onContextmenu:m[0]||(m[0]=y=>c(y,h.cell.row))},[h.cell.control?(r.openBlock(),r.createElementBlock("div",kC,r.toDisplayString(h.cell.row.index),1)):p.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(p.value),{key:1,"model-value":h.cell.value,"onUpdate:modelValue":i},null,8,["model-value"])):(r.openBlock(),r.createBlock(bC,{key:2,"model-value":h.cell.value,"value-type":o.value,editable:h.cell.column.editable,"onUpdate:modelValue":i},null,8,["model-value","value-type","editable"]))],42,xC))}}),EC={},TC={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function NC(t,e){return r.openBlock(),r.createElementBlock("svg",TC,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 AC=Zt(EC,[["render",NC]]),VC={class:"tr-head"},BC=r.defineComponent({__name:"TrHead",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",VC,[r.renderSlot(e.$slots,"default")]))}});function PC(t,e){const n=e.indexOf(t)+1;return e[n>=e.length?0:n]}function RC(t,e){const n=t.findIndex(e);if(n<0)return[];const o=(()=>{for(let i=n;i<t.length;i++)if(!e(t[i],i))return i;return t.length})();return t.slice(n,o)}const DC=["^data-col-id"],IC=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&&kl(l,c)}function i(l){var c;const d=((c=l.sort)==null?void 0:c.direction)??"DESC";n("change:sort",{colId:l.id,direction:PC(d,["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(()=>i(l.col),["stop"]))},null,2)):r.createCommentVNode("",!0)],42,DC))}}),FC=r.defineComponent({__name:"TrBody",props:{row:{}},setup(t){const e=r.ref(),n=()=>{r.nextTick().then(()=>{Zr(e.value,o=>o.scrollLeft=0)})};return(o,i)=>(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))}}),OC=r.defineComponent({__name:"ColumnCaret",props:{column:{}},setup(t){const e=Es(),n=t,o=r.computed(()=>e.data.selectedColumns.has(n.column.id));return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["column-caret",{selected:o.value,frozen:i.column.frozen}])},null,2))}});function st(t,e,n,o){r.onMounted(()=>{var i;return(i=r.unref(t))==null?void 0:i.addEventListener(e,n,o)}),r.onUnmounted(()=>{var i;return(i=r.unref(t))==null?void 0:i.removeEventListener(e,n,o)})}function LC(t){r.onMounted(()=>window.addEventListener("mouseup",t)),r.onUnmounted(()=>window.removeEventListener("mouseup",t))}function MC(t){let e=!1;return function(...n){e?console.log("handle pressure"):(requestAnimationFrame(()=>{t(...n),e=!1}),e=!0)}}function GC(t,e){let n;function o(l){n={...l}}LC(()=>{n=void 0,e()});const i=MC(t);return st(window,"mousemove",l=>{n&&i({x:n.x,width:n.width,diff:l.x-n.x})}),{start:o}}const go=1,$C=10,zC=30,Hu=60;function qu(){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 Ku(t,e={}){const{delayEnter:n=0,delayLeave:o=0}=e,i=r.ref(!1);let l;const c=d=>{const p=d?n:o;l&&(clearTimeout(l),l=void 0),p?l=setTimeout(()=>i.value=d,p):i.value=d};return window&&(st(t,"mouseenter",()=>c(!0)),st(t,"mouseleave",()=>c(!1))),i}function UC(t){var e;const n=Zr((e=r.unref(t))==null?void 0:e.querySelectorAll(".th-cell"),o=>[...o])??[];return n.map(o=>{const{width:i,x:l}=o.getBoundingClientRect(),c=o.getAttribute("data-col-id");return zu({colId:c,width:i,x:l,right:l+i})}).slice(0,n.length-1)}function ZC(t,e){const n=qu(),o=Ku(e,{}),{data:i}=t,l=GC(d=>{Zr(i.resizeTh,p=>{const h=i.columns.find(m=>m.id===p.colId);h&&(h.width=Ss(d.width+d.diff,zC,1e4),t.adjustWidth())})},()=>{i.resize=!1,i.resizeTh=void 0,document.body.style.cursor=""}),c=d=>{i.resizeTh&&(i.resize=!0,l.start({x:d.x,width:i.resizeTh.width}))};return r.watchEffect(()=>{if(!o.value){document.body.style.cursor="";return}if(i.resize)return;const d=UC(e).find(p=>Math.abs(n.x-p.right)<$C);d?(document.body.style.cursor="col-resize",i.resizeTh=d):(i.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:c}}const WC={key:0,class:"command-menu"},jC={key:0},HC=["onClick"],qC=r.defineComponent({__name:"RowsCommandMenu",setup(t){const e=Es(),n=r.computed(()=>e.getSelectedRows()),o=r.computed(()=>n.value.length>0),i=r.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedRows)??[]}),l=r.computed(()=>i.value.map(c=>({label:c.label,cb:()=>{c.cb(n.value),e.data.selectedRows.clear(),e.data.rows=[]}})));return(c,d)=>o.value?(r.openBlock(),r.createElementBlock("div",WC,[n.value.length?(r.openBlock(),r.createElementBlock("span",jC,r.toDisplayString(n.value.length)+" rows selected",1)):r.createCommentVNode("",!0),d[0]||(d[0]=r.createTextVNode()),d[1]||(d[1]=r.createElementVNode("hr",null,null,-1)),d[2]||(d[2]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(p,h)=>(r.openBlock(),r.createElementBlock("span",{key:h,class:"command",onClick:r.withModifiers(p.cb,["stop"])},r.toDisplayString(p.label),9,HC))),128))])):r.createCommentVNode("",!0)}}),KC={key:0,class:"command-menu"},XC={key:0},YC=["onClick"],JC=r.defineComponent({__name:"ColumnsCommandMenu",setup(t){const e=Es(),n=r.computed(()=>e.getSelectedColumns()),o=r.computed(()=>n.value.length>0),i=r.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedColumns)??[]}),l=r.computed(()=>i.value.map(c=>({label:c.label,cb:()=>{c.cb(n.value),e.data.selectedColumns.clear()}})));return(c,d)=>o.value?(r.openBlock(),r.createElementBlock("div",KC,[n.value.length?(r.openBlock(),r.createElementBlock("span",XC,"selected columns "+r.toDisplayString(n.value.length),1)):r.createCommentVNode("",!0),d[0]||(d[0]=r.createTextVNode()),d[1]||(d[1]=r.createElementVNode("hr",null,null,-1)),d[2]||(d[2]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(p,h)=>(r.openBlock(),r.createElementBlock("span",{key:h,class:"command",onClick:r.withModifiers(p.cb,["stop"])},r.toDisplayString(p.label),9,YC))),128))])):r.createCommentVNode("",!0)}});function gr(t,e){const n={el:void 0,x:0,y:0},o=i=>({x:i.x,y:i.y,dx:i.x-n.x,dy:i.y-n.y});st(document,"mousedown",i=>{i.target===r.unref(t)&&(i.stopPropagation&&i.stopPropagation(),i.preventDefault&&i.preventDefault(),n.el=r.unref(t),n.x=i.x,n.y=i.y)}),st(document,"mouseup",i=>{n.el&&(n.el=void 0,e({...o(i),stop:!0},n))}),st(document,"mousemove",i=>{n.el&&e(o(i),n)})}const QC=r.defineComponent({__name:"TScroll",props:{offset:{},windowSize:{},dataSize:{}},emits:["change:offset"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(),l=r.computed(()=>o.windowSize-12),c=r.computed(()=>o.windowSize<o.dataSize),d=r.computed(()=>Math.ceil(o.offset*(l.value/o.dataSize))),p=r.computed(()=>Math.ceil(l.value*l.value/o.dataSize)),h=r.computed(()=>({top:`${d.value}px`,height:`${p.value}px`}));return gr(i,(m,y)=>{const x=(d.value+m.dy)*o.dataSize/l.value;n("change:offset",x),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:i,class:"t-scroll__handle",style:r.normalizeStyle(h.value)},null,4)):r.createCommentVNode("",!0)])],4))}});function e0(t){return r.computed(()=>{const{data:e,settings:n}=t,{bodyWidth:o,scrollLeft:i}=e,l=[...e.columns],c=Uu();n.value.controlColumn&&l.unshift({id:c,label:"#",width:60,frozen:!0});let d=0;const p=l.map(m=>{const y={...m,offset:d};return d+=m.width+go,y}),h=p.filter(m=>m.frozen);return dC(p,m=>m.frozen?!1:i<m.offset+m.width&&m.offset<o+i).concat(h).map(m=>({...m,style:{left:m.frozen?`${m.offset}px`:`${m.offset-e.scrollLeft}px`,width:`${m.width}px`},control:m.id===c}))})}function t0(t,e){const n=r.computed(()=>e.value.reduce((o,i)=>(o[i.id]=i.justify?"justify-"+i.justify:"",o),{}));return r.computed(()=>t.rows.map(o=>{const i=n.value,{primaryKey:l,offset:c,dataRow:d,height:p}=o,h=e.value.map(m=>({id:m.id,column:m,row:o,value:d[m.id],class:i[m.id],editable:m.editable,width:m.width,style:m.style,control:m.control}));return zu({style:{top:`${c-t.scrollTop}px`,height:`${o.height}px`},primaryKey:l,offset:c,height:p,cells:h,selected:t.selectedRows.has(l)})}))}const n0=async(t,e)=>{const{scrollTop:n,bodyHeight:o}=t;return await H_(0),X_({rows:e.getRows(n,o),dataWindow:t})};function r0(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=vi(m.columns),e.currentWindow=void 0,m.dataSource.getHeight().then(y=>{e.dataHeight=y,h.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)),i=r.computed(()=>$u(h.data.dataHeight-h.data.bodyHeight,m=>m>0?m:0)),l=r.computed(()=>$u(o.value-h.data.bodyWidth,m=>m>0?m:0)),c=r.computed(()=>({bodyHeight:e.bodyHeight,scrollTop:e.scrollTop,current:e.currentWindow})),d=e0({data:e,settings:n}),p=t0(e,d),h={data:e,settings:n,tableColumns:d,tableRows:p,adjustWidth:()=>{const m=e.columns.reduce((x,w)=>x+w.width+go,0),y=e.bodyWidth+e.scrollLeft;if(m<y){const x=e.columns[e.columns.length-1];x.width=x.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=Ss(m,0,i.value)},updateScrollLeft(m){e.scrollLeft=Ss(m,0,l.value)},updateBodyHeight(){const{height:m}=t.settings,{dataHeight:y}=e,x=m>y?y:m;e.bodyHeight=x},updateDimensions(m){this.updateBodyHeight(),h.data.bodyWidth=m.width,h.adjustWidth(),e.rows=[],e.currentWindow=void 0}};return r.watch(c,(m,y)=>{const x=m.current;(!x||m.scrollTop<x.scrollTop||m.scrollTop+m.bodyHeight>x.bodyHeight+x.scrollTop)&&(e.currentWindow={scrollTop:m.scrollTop-Hu,bodyHeight:m.bodyHeight+Hu*2},n0(vi(e.currentWindow),n.value.dataSource).then(({rows:w,dataWindow:E})=>{yi(e.currentWindow,E)&&(e.rows=w)}))},{deep:!0,immediate:!0}),r.provide(ju,h),h}const o0={class:"command-menu__container"},i0={key:0,class:"table-body__no-data"},s0={class:"carets"},Sl=r.defineComponent({__name:"TableComponent",props:{settings:{}},emits:["update:data","change:sort"],setup(t,{emit:e}){const n=e,o=t,i=r0(o),l=r.computed(()=>i.data.rows.length===0),c=r.computed(()=>({height:l.value?"212px":i.data.bodyHeight+"px"}));r.watch(i.data,O=>n("update:data",O),{deep:!0}),r.watch(o,()=>m);const d=r.ref(),p=r.ref(),h=r.ref(),m=()=>{Zr(h.value,O=>{i.updateDimensions(O.getBoundingClientRect())})},y=i.tableColumns,x=i.tableRows,{mouseDown:w}=ZC(i,d);r.onMounted(()=>{r.nextTick(m)}),r.watchPostEffect(()=>{r.unref(o.settings),r.nextTick(m)}),st(window,"resize",()=>r.nextTick(m));const E=O=>{O.preventDefault(),i.updateOffsets(O)};return(O,$)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"tableRef",ref:d,class:"data-table",onMousedown:$[2]||($[2]=(...b)=>r.unref(w)&&r.unref(w)(...b))},[r.createElementVNode("div",o0,[r.createVNode(qC),$[3]||($[3]=r.createTextVNode()),r.createVNode(JC)]),$[7]||($[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"headRef",ref:p,class:"table-head"},[r.createVNode(BC,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(y),(b,R)=>(r.openBlock(),r.createBlock(IC,{key:R,col:b,style:r.normalizeStyle(b.style),"onChange:sort":$[0]||($[0]=F=>O.$emit("change:sort",F))},null,8,["col","style"]))),128))]),_:1})],512),$[8]||($[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"bodyRef",ref:h,class:"table-body",style:r.normalizeStyle(c.value),onWheel:E},[l.value?(r.openBlock(),r.createElementBlock("div",i0,[r.createElementVNode("div",null,[r.createVNode(AC),$[4]||($[4]=r.createTextVNode()),$[5]||($[5]=r.createElementVNode("div",null,"No Data To Show",-1))])])):r.createCommentVNode("",!0),$[6]||($[6]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(x),(b,R)=>(r.openBlock(),r.createBlock(FC,{key:R,row:b},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(b.cells,F=>(r.openBlock(),r.createBlock(SC,{key:F.column.id+":"+R,cell:F,style:r.normalizeStyle(F.style)},null,8,["cell","style"]))),128))]),_:2},1032,["row"]))),128))],36),$[9]||($[9]=r.createTextVNode()),r.createElementVNode("div",s0,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(y),(b,R)=>(r.openBlock(),r.createBlock(OC,{key:R,column:b,style:r.normalizeStyle(b.style),"onChange:sort":$[1]||($[1]=F=>O.$emit("change:sort",F))},null,8,["column","style"]))),128))]),$[10]||($[10]=r.createTextVNode()),r.createVNode(QC,{offset:r.unref(i).data.scrollTop,"window-size":r.unref(i).data.bodyHeight,"data-size":r.unref(i).data.dataHeight,"onChange:offset":r.unref(i).updateScrollTop},null,8,["offset","window-size","data-size","onChange:offset"])],544))}}),Xu=new WeakMap;class a0{constructor(e,n,o){W_(this,"dataHeight"),this.datum=e,this.resolveHeight=n,this.resolvePrimaryKey=o;const i=e.reduce((c,d,p)=>(c.indices.set(p,c.total),c.total+=this.resolveHeight(d,p)+go,c),{total:0,indices:new Map});this.dataHeight=i.total;const l=e.map((c,d)=>({dataRow:c,index:d,primaryKey:this.resolvePrimaryKey(c,d),offset:ks(i.indices.get(d)),height:this.resolveHeight(c,d)}));Xu.set(this,l)}get rows(){return Xu.get(this)}async getHeight(){return this.dataHeight}async getRows(e,n){return RC(this.rows,o=>{const i=o.offset;return e<i+o.height&&i<n+e})}}class l0{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=Ss(Math.floor(e/this.height),0,Number.POSITIVE_INFINITY),i=Math.ceil(n+40/this.height);return(await this.api.query({offset:o,limit:i})).map((l,c)=>({dataRow:l,index:o+c,primaryKey:this.resolvePrimaryKey(l,o+c),offset:(o+c)*(this.rowHeight+go),height:this.rowHeight}))}}function c0(t){return Object.freeze(t)}function d0(t){return r.h(Sl,{settings:Object.freeze(t)})}function El(t,e){const n=new a0(t,e.resolveRowHeight,e.resolvePrimaryKey);return{...e,dataSource:n}}function u0(t,e){return r.computed(()=>{const n=r.unref(t);return El(n,r.unref(e))})}function p0(t,e){const n=r.computed(()=>{const i=r.unref(t);return El(i,r.unref(e))}),o=r.reactive({settings:n});return r.computed(()=>r.h(Sl,o))}const h0=Object.freeze(Object.defineProperty({__proto__:null,AsyncData:l0,Component:Sl,factory:d0,rawDataSettings:El,settings:c0,useRawData:u0,useRawDataComponent:p0},Symbol.toStringTag,{value:"Module"}));function*f0(t,e){for(const n of t)yield e(n)}function m0(t){const e=[];for(const n of t)e.push(n);return e}function Yu(t){return t()}function Tl(t,e){if(t==null)throw Error(e);return t}function Nl(t){let e=!1;return function(...n){e||(requestAnimationFrame(()=>{t(...n),e=!1}),e=!0)}}function Ju(t){return new Promise(e=>setTimeout(e,t))}function Qu(t,e){const n=setTimeout(t,e);return()=>{clearTimeout(n)}}function ep(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function g0(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(ep(65,91));return e}function tp(t){return function(e){return 1-t(1-e)}}function y0(t){return function(e){return e<.5?t(2*e)/2:(2-t(2*(1-e)))/2}}function np(t){const{duration:e,draw:n,timing:o}=t,i=performance.now();let l=!1;return requestAnimationFrame(function c(d){let p=(d-i)/e;(p>1||l)&&(p=1);const h=o(p);n(h),p<1&&requestAnimationFrame(c)}),function(){l=!0}}function v0(t){const{getFraction:e,draw:n,timing:o}=t,i=performance.now();let l=!1;return requestAnimationFrame(function c(d){let p=e(d-i);if(l)return;p>1&&(p=1);const h=o(p);n(h),p<1&&requestAnimationFrame(c)}),function(){l=!0}}function rp(t,e){let n=-1;return(...o)=>{n!==-1&&(clearTimeout(n),n=-1),n=window.setTimeout(()=>t(...o),e)}}function op(t,e,n=!0){let o=0,i;return function(...l){i=()=>{t.apply(this,l),o=new Date().getTime()+e,i=null,n&&setTimeout(()=>{i&&i()},e)},new Date().getTime()>o&&i()}}function _0(t){return t.map(e=>({text:String(e),value:e}))}function yr(t){return t.map(e=>({label:"label"in e?e.label:e.text,value:e.value,description:e.description}))}const Al=new Map;function C0(t){return Al.has(t)||Al.set(t,r.ref(localStorage.getItem(t))),Tl(Al.get(t),"...")}function w0(t,e){e==null?localStorage.removeItem(t):localStorage.setItem(t,e)}function ip(t){const e=C0(t);return r.watch(e,n=>w0(t,n)),e}const Vl=new Set;window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{m0(f0(Vl.values(),e=>e(t.matches?"dark":"light")))});const b0=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",sp=r.ref(b0),Bl=ip("theme");function ap(t){const e=r.computed(()=>Bl.value?Bl.value:sp.value),n=i=>{sp.value=i,t&&t(i)};function o(){Bl.value=e.value==="light"?"dark":(e.value,"light")}return r.watch(e,i=>{t&&t(r.unref(i))}),r.onMounted(()=>{Vl.add(n)}),r.onUnmounted(()=>{Vl.delete(n)}),[e,o]}const x0=r.defineComponent({__name:"ThemeSwitcher",setup(t){const[e,n]=ap();return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-theme-switcher",r.unref(e)]),onClick:i[0]||(i[0]=(...l)=>r.unref(n)&&r.unref(n)(...l))},i[1]||(i[1]=[r.createElementVNode("div",null,null,-1)]),2))}}),k0={key:0,class:"pl-block-page__title"},S0={class:"pl-block-page__title__default"},E0={class:"pl-block-page__title__append"},T0={key:1},N0={class:"pl-block-page__body"},A0={name:"PlBlockPage"},V0=r.defineComponent({...A0,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",k0,[r.createElementVNode("div",S0,[r.renderSlot(n.$slots,"title")]),o[0]||(o[0]=r.createTextVNode()),r.createElementVNode("div",E0,[r.renderSlot(n.$slots,"append")])])):(r.openBlock(),r.createElementBlock("div",T0)),o[1]||(o[1]=r.createTextVNode()),r.createElementVNode("div",N0,[r.renderSlot(n.$slots,"default")])],2))}}),B0={name:"PlContainer"},P0=r.defineComponent({...B0,props:{width:{}},setup(t){const e=t,n=r.computed(()=>({width:e.width}));return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-container pl-layout-component",style:r.normalizeStyle(n.value)},[r.renderSlot(o.$slots,"default")],4))}}),R0={name:"PlRow"},D0=r.defineComponent({...R0,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))}}),I0={class:"pl-layout-component",style:{"flex-grow":"1"}},F0={name:"PlSpacer"},lp=r.defineComponent({...F0,setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",I0))}}),O0={name:"PlGrid"},L0=r.defineComponent({...O0,props:{columns:{}},setup(t){const e=t,n=r.computed(()=>({gridTemplateColumns:`repeat(${e.columns}, minmax(0, 1fr))`}));return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-layout-component pl-grid",style:r.normalizeStyle(n.value)},[r.renderSlot(o.$slots,"default")],4))}}),M0={key:0,class:"pl-alert__icon"},G0={class:"pl-alert__main"},$0={key:0},z0={class:"pl-alert__main__text"},U0={name:"PlAlert"},Z0=r.defineComponent({...U0,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",M0,[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",G0,[n.label?(r.openBlock(),r.createElementBlock("label",$0,r.toDisplayString(n.label),1)):r.createCommentVNode("",!0),o[1]||(o[1]=r.createTextVNode()),r.createElementVNode("div",z0,[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]=i=>n.$emit("update:modelValue",!1))})):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)}}),W0=`<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
|
`,j0=`<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
|
-
`,W0=["innerHTML"],H0={class:"dropdown-list-item__title-container"},q0={class:"dropdown-list-item__title text-s"},K0={key:0,class:"dropdown-list-item__description text-description"},X0={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(" ")}),i=r.computed(()=>e.isSelected?j0:Z0);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:i.value},null,10,W0)):r.createCommentVNode("",!0),c[1]||(c[1]=r.createTextVNode()),r.createElementVNode("div",H0,[r.createElementVNode("div",q0,r.toDisplayString(l.option.label),1),c[0]||(c[0]=r.createTextVNode()),l.option.description?(r.openBlock(),r.createElementBlock("div",K0,r.toDisplayString(l.option.description),1)):r.createCommentVNode("",!0)]),c[2]||(c[2]=r.createTextVNode()),!e.useCheckbox&&e.isSelected?(r.openBlock(),r.createElementBlock("div",X0)):r.createCommentVNode("",!0)],2))}});function vo(t,e){const n=Nl(()=>{if(t.value){const{scrollTop:o,scrollLeft:i,scrollHeight:l,scrollWidth:c,clientHeight:d,clientWidth:p}=document.documentElement,h=t.value.getBoundingClientRect();e({scrollTop:o,scrollLeft:i,scrollHeight:l,scrollWidth:c,clientHeight:d,clientWidth:p,offsetY:o+h.y,offsetX:i+h.x,top:h.top,right:h.right,bottom:h.bottom,left:h.left,width:h.width,height:h.height,x:h.x,y:h.y})}});r.onMounted(n),st(window,"scroll",n,{capture:!0,passive:!0}),st(window,"resize",n,{passive:!0}),st(window,"adjust",n,!0)}const Y0=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(i,l)=>(r.openBlock(),r.createElementBlock("i",{style:r.normalizeStyle(n.value),class:r.normalizeClass([o.value,i.$style.icon])},null,6))}}),J0="_icon_1ugxm_2",Q0={icon:J0},ew={$style:Q0},fn=Zt(Y0,[["__cssModules",ew]]),tw=["onKeyup"],nw=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,i=n,l=r.useModel(t,"modelValue"),c=r.ref(),d=r.ref(),p=r.ref(),h=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(d,A=>{if(A){const U=A.getBoundingClientRect();m.optionsHeight=U.height,window.dispatchEvent(new CustomEvent("adjust"))}},{immediate:!0});const x=r.computed(()=>m.open?"mask-24 mask-chevron-up":"mask-24 mask-chevron-down"),w=r.computed(()=>(o.options??[]).findIndex(A=>yi(A.value,l.value))),S=r.computed(()=>yr(o.options??[]).map((A,U)=>({...A,index:U,isSelected:U===w.value,isActive:U===m.activeIndex}))),O=r.computed(()=>o.loading||o.options===void 0),G=r.computed(()=>{var A;return((A=S.value.find(U=>yi(U.value,l.value)))==null?void 0:A.label)??(o.options===void 0?"...":"")});vo(c,A=>{const U=A.top+A.height+3;U+m.optionsHeight>A.clientHeight?y.top=A.top-m.optionsHeight-3+"px":y.top=U+"px",y.left=A.left+"px",y.width=A.width+"px"});const b=A=>{var U;l.value=A,m.open=!1,(U=c==null?void 0:c.value)==null||U.focus()};function R(){i("click")}const F=A=>{var U,j;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(A.code))A.preventDefault();else return;if(A.target===h.value&&A.code==="Enter"){R();return}const{open:$,activeIndex:Z}=m;if(!$&&A.target===p.value){A.code==="Enter"&&(m.open=!0);return}A.code==="Escape"&&(m.open=!1,(U=c.value)==null||U.focus());const W=r.unref(S),{length:J}=W;if(!J)return;A.code==="Enter"&&b((j=W.find(E=>E.index===Z))==null?void 0:j.value);const he=W.findIndex(E=>E.index===Z)??-1,B=A.code==="ArrowDown"?1:A.code==="ArrowUp"?-1:0,C=Math.abs(he+B+J)%J;m.activeIndex=S.value[C].index??-1},D=A=>{var U,j;const $=A.relatedTarget;!((U=c.value)!=null&&U.contains($))&&!((j=d.value)!=null&&j.contains($))&&(m.open=!1)};return(A,U)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:c,class:r.normalizeClass([{disabled:A.disabled||O.value,loading:O.value},"pl-btn-split d-flex"]),onFocusout:D,onKeydown:F},[r.createElementVNode("div",{ref_key:"buttonAction",ref:h,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(G.value),41,tw),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]=j=>m.open=!m.open)},[O.value?(r.openBlock(),r.createBlock(fn,{key:0,name:"loading"})):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass([x.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:d,class:"pl-dropdown__options",style:r.normalizeStyle(y),tabindex:"-1"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(S.value,(j,$)=>(r.openBlock(),r.createBlock(yo,{key:$,option:j,"is-selected":j.isSelected,"is-hovered":j.isActive,size:"medium",onClick:r.withModifiers(Z=>b(j.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128))],4)])):r.createCommentVNode("",!0)],34))}});function cp(t){function e(n){const o=n.currentTarget,i=document.createElement("span"),l=Math.max(o.clientWidth,o.clientHeight),c=l/2;i.style.width=i.style.height=`${l}px`,i.style.left=`${n.clientX-o.offsetLeft-c}px`,i.style.top=`${n.clientY-o.offsetTop-c}px`,i.classList.add("ripple");const d=o.getElementsByClassName("ripple")[0];d&&d.remove(),o.appendChild(i)}r.onMounted(()=>{var n;(n=t.value)==null||n.addEventListener("click",e)})}const rw={key:0},ow={inheritAttrs:!1},Ts=r.defineComponent({...ow,__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"),i=r.computed(()=>e.large||e.size==="large");return cp(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:i.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",rw,[r.renderSlot(l.$slots,"default")])),c[0]||(c[0]=r.createTextVNode()),l.loading?(r.openBlock(),r.createBlock(r.unref(fn),{key:1,name:"loading",size:l.size},null,8,["size"])):l.icon?(r.openBlock(),r.createBlock(r.unref(fn),{key:2,name:l.icon,size:l.size},null,8,["name","size"])):r.createCommentVNode("",!0)],16))}}),iw={name:"PlBtnPrimary"},Ns=r.defineComponent({...iw,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(Ts,r.mergeProps({class:"pl-btn-primary"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),sw={name:"PlBtnAccent"},aw=r.defineComponent({...sw,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(Ts,r.mergeProps({class:"pl-btn-accent"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),lw={name:"PlBtnDanger"},cw=r.defineComponent({...lw,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(Ts,r.mergeProps({class:"pl-btn-danger"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),dw={name:"PlBtnSecondary"},Pl=r.defineComponent({...dw,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(Ts,r.mergeProps(e,{class:"pl-btn-secondary"}),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),uw={key:0},pw={name:"PlBtnGhost"},_o=r.defineComponent({...pw,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"),i=r.ref(),l=r.useSlots();return cp(i),(c,d)=>(r.openBlock(),r.createElementBlock("button",r.mergeProps({ref_key:"btnRef",ref:i,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",uw,[r.renderSlot(c.$slots,"default")])):r.createCommentVNode("",!0),d[0]||(d[0]=r.createTextVNode()),c.loading?(r.openBlock(),r.createBlock(r.unref(fn),{key:1,name:"loading",size:c.size},null,8,["size"])):c.icon?(r.openBlock(),r.createBlock(r.unref(fn),{key:2,name:c.icon,size:c.size},null,8,["name","size"])):r.createCommentVNode("",!0),d[1]||(d[1]=r.createTextVNode()),r.renderSlot(c.$slots,"append")],16))}}),hw=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,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-btn-link",{disabled:o.disabled,loading:o.loading,hover:n.value}]),onMouseover:i[0]||(i[0]=l=>n.value=!0),onMouseleave:i[1]||(i[1]=l=>n.value=!1)},[r.createVNode(Pl,r.mergeProps({round:"",hover:n.value},e),null,16,["hover"]),i[2]||(i[2]=r.createTextVNode()),r.renderSlot(o.$slots,"default")],34))}});function fw(t,e){const n=r.ref();return vo(t,o=>{n.value=o}),r.computed(()=>{const o=r.unref(n),i=r.unref(e),l=i.position??"top",c=i.gap??8;if(!o)return"";const d=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: ${d}px;`:l==="left"?`right: ${o.scrollWidth-o.x+c}px; top: ${d}px;`:""})}function _i(t,e){return e(t)}function ut(t,e){if(t!=null)return e(t)}function mw(t){return Array.isArray(t)?t:[t]}function gw(t,e,...n){n.forEach(o=>{t[o]=e[o]})}function As(t,e){st(document,"click",n=>{document.contains(n.target)&&(mw(t).map(o=>o.value).filter(o=>!!o).some(o=>o==null?void 0:o.contains(n.target))||e())})}const yw={},vw={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function _w(t,e){return r.openBlock(),r.createElementBlock("svg",vw,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 Cw=Zt(yw,[["render",_w]]),Rl=new Map,ww={name:"PlTooltip"},xt=r.defineComponent({...ww,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(),i=t,l=r.reactive({open:!1,over:!1,tooltipOpen:!1,key:Symbol()});Rl.set(o,()=>h()),r.watch(()=>l.open,O=>{requestAnimationFrame(()=>{l.tooltipOpen=O})});let c=()=>{};const d=op(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),p=()=>{l.open=!0;for(let[O,G]of Rl.entries())O!==o&&G()},h=()=>{l.open=!1,n("tooltip:close")},m=async()=>{i.hide||(d(),l.over=!0,c(),await Ju(100),l.over&&p())},y=()=>{l.over=!1,c=Qu(()=>{l.over||h()},i.closeDelay)};r.watch(()=>i.hide,O=>{O&&h()});const x=r.ref(),w=r.ref(),S=fw(x,r.toRef(i));return As([x,w],()=>h()),r.onUnmounted(()=>{Rl.delete(o)}),(O,G)=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(O.element),r.mergeProps(O.$attrs,{ref_key:"rootRef",ref:x,onClick:m,onMouseover:m,onMouseleave:y}),{default:r.withCtx(()=>[r.renderSlot(O.$slots,"default"),G[1]||(G[1]=r.createTextVNode()),O.$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(S))},[r.createElementVNode("div",{ref_key:"tooltip",ref:w,class:r.normalizeClass(["pl-tooltip",O.position]),onMouseover:m,onMouseleave:y},[r.createElementVNode("div",null,[r.renderSlot(O.$slots,"tooltip")]),G[0]||(G[0]=r.createTextVNode()),r.createVNode(Cw)],34)],4)):r.createCommentVNode("",!0)]),_:3})])):r.createCommentVNode("",!0)]),_:3},16))}}),bw={},xw={class:"inner-border"};function kw(t,e,n,o,i,l){return r.openBlock(),r.createElementBlock("div",xw,[r.renderSlot(t.$slots,"default")])}const Sw=Zt(bw,[["render",kw]]),Ew={key:0},Tw=["tabindex","onKeydown","onClick"],Nw={key:1,class:"pl-btn-group__helper"},Aw={key:2,class:"pl-btn-group__error"},Vw={name:"PlBtnGroup"},dp=r.defineComponent({...Vw,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,i=d=>o("update:modelValue",d),l=t,c=r.computed(()=>l.options.map(d=>({label:"label"in d?d.label:d.text,value:d.value})));return(d,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-btn-group",{disabled:d.disabled,compact:d.compact}])},[d.label?(r.openBlock(),r.createElementBlock("label",Ew,[r.createElementVNode("span",null,r.toDisplayString(d.label),1),p[0]||(p[0]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(d.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),p[1]||(p[1]=r.createTextVNode()),r.createVNode(Sw,{class:"pl-btn-group__container"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.value,(h,m)=>(r.openBlock(),r.createElementBlock("div",{key:m,class:r.normalizeClass(["pl-btn-group__option text-s",{active:d.modelValue===h.value}]),tabindex:d.modelValue===h.value||d.disabled?void 0:0,onKeydown:r.withKeys(y=>i(h.value),["enter"]),onClick:y=>i(h.value)},r.toDisplayString(h.label),43,Tw))),128))]),_:1}),p[2]||(p[2]=r.createTextVNode()),d.helper?(r.openBlock(),r.createElementBlock("div",Nw,r.toDisplayString(d.helper),1)):d.error?(r.openBlock(),r.createElementBlock("div",Aw,r.toDisplayString(d.error),1)):r.createCommentVNode("",!0)],2))}});function Bw(t,e){const n=r.ref(),o=r.ref(),{parse:i,update:l}=e,c=()=>{n.value=void 0,o.value=void 0},d=r.computed({get(){return n.value!==void 0?n.value:t.value},set(p){c();try{const h=i?i(p):p;!l||l(h)?t.value=h:n.value=h}catch(h){n.value=p,o.value=h instanceof Error?h.message:String(h)}}});return r.reactive({value:d,error:o,reset:c})}const Pw="_component_1abv8_1",Rw="_container_1abv8_15",Dw="_error_1abv8_69",Dl={component:Pw,container:Rw,error:Dw},Iw={key:0},Fw=["placeholder"],Ow=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=Bw(e,{update(){return!1},parse:d=>{if(typeof d!="string")throw Error("value should be a string");if(n.maxLength&&d.length>n.maxLength)throw Error(`Max title length is ${n.maxLength} characters`);if(n.minLength&&d.length<n.minLength)throw Error(`Min title length is ${n.minLength} characters`);return d.trim()}}),i=r.computed(()=>({maxWidth:n.maxWidth??"80%"})),l=()=>{e.value=o.value&&!o.error?o.value:e.value,o.reset()},c=r.ref();return(d,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-editable-title",r.unref(Dl).component]),style:r.normalizeStyle(i.value)},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(Dl).container),onClick:p[3]||(p[3]=()=>{var h;return(h=c.value)==null?void 0:h.focus()})},[d.prefix?(r.openBlock(),r.createElementBlock("span",Iw,r.toDisplayString(d.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]=h=>r.unref(o).value=h),placeholder:d.placeholder,onFocusout:l,onKeydown:[p[1]||(p[1]=r.withKeys((...h)=>r.unref(o).reset&&r.unref(o).reset(...h),["escape"])),p[2]||(p[2]=r.withKeys(h=>{var m;return(m=h.target)==null?void 0:m.blur()},["enter"]))]},null,40,Fw),[[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(Dl).error)},r.toDisplayString(r.unref(o).error),3)):r.createCommentVNode("",!0)],6))}}),Lw={inheritAttrs:!1},Mw={class:"double-contour"};function Gw(t,e,n,o,i,l){return r.openBlock(),r.createElementBlock("div",Mw,[r.createElementVNode("div",r.normalizeProps(r.guardReactiveProps(t.$attrs)),[r.renderSlot(t.$slots,"default")],16)])}const vr=Zt(Lw,[["render",Gw]]);function up(t){r.onMounted(t),r.onUpdated(t)}const Il=new WeakMap,Fl=new ResizeObserver(t=>{for(const e of t)ut(Il.get(e.target),n=>n(e))});function pp(t,e){Il.set(t,e),Fl.unobserve(t),Fl.observe(t)}function hp(t){Fl.unobserve(t),Il.delete(t)}const $w=8,fp=4;function Xn(t,e="label"){const n=new Set;up(()=>{ut(t==null?void 0:t.value,o=>{const i=o.querySelector(e);i&&(n.add(i),pp(i,()=>{const l=Yu(()=>i.getBoundingClientRect().width+_i($w,c=>Number.isNaN(c)?fp:c+fp));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=>hp(o))})}function zw(t,e){const n=[];return e&&e.length>0&&e.forEach(o=>{const i=o(t);typeof i=="string"&&n.push(i)}),{isValid:n.length===0,errors:n}}function mp(t,e){return r.computed(()=>zw(t.value,e))}const Uw=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(i,l)=>(r.openBlock(),r.createElementBlock("i",{style:r.normalizeStyle(n.value),class:r.normalizeClass([o.value,i.$style.icon])},null,6))}}),Zw="_icon_1ugxm_2",jw={icon:Zw},Ww={$style:jw},Co=Zt(Uw,[["__cssModules",Ww]]),Hw=r.defineComponent({__name:"PlIcon24",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>`icon-24 icon-${e.name}`);return(o,i)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass([n.value,o.$style.icon])},null,2))}}),qw="_icon_1ugxm_2",Kw={icon:qw},Xw={$style:Kw},Ci=Zt(Hw,[["__cssModules",Xw]]),Yw={class:"pl-text-field__envelope"},Jw={key:0,ref:"label"},Qw={key:0,class:"required-icon"},eb={key:1,class:"pl-text-field__prefix"},tb=["disabled","placeholder","type"],nb={class:"pl-text-field__append"},rb={key:0,class:"pl-text-field__error"},ob={key:1,class:"pl-text-field__helper"},ib={name:"PlTextField"},jr=r.defineComponent({...ib,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,i=r.ref(void 0),l=r.ref(),c=r.ref(!1),d=r.reactive({cached:void 0}),p=r.computed({get(){return d.cached?d.cached.value:n.value===void 0||n.value===null?"":String(n.value)},set(D){if(d.cached=void 0,o.parse)try{n.value=o.parse(D)}catch(A){d.cached={error:A instanceof Error?A.message:String(A),value:D}}else n.value=D}}),h=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&&(d.cached=void 0,n.value=o.clearable===!0?"":o.clearable())},x=mp(p,o.rules||[]),w=r.computed(()=>o.clearable?o.clearable===!0?n.value==="":n.value===o.clearable():n.value===""),S=r.computed(()=>!w.value),O=r.computed(()=>{const D=[];return o.error&&D.push(o.error),d.cached&&D.push(d.cached.error),x.value.isValid||D.push(...x.value.errors),D}),G=r.computed(()=>O.value.length>0),b=r.computed(()=>o.clearable&&S.value&&o.type!=="password"),R=()=>c.value=!c.value,F=()=>{d.cached=void 0};return Xn(i),(D,A)=>(r.openBlock(),r.createElementBlock("div",Yw,[r.createElementVNode("div",{ref_key:"rootRef",ref:i,class:r.normalizeClass(["pl-text-field",{error:G.value,disabled:D.disabled,dashed:D.dashed,nonEmpty:S.value}])},[D.label?(r.openBlock(),r.createElementBlock("label",Jw,[D.required?(r.openBlock(),r.createElementBlock("i",Qw)):r.createCommentVNode("",!0),A[1]||(A[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(D.label),1),A[2]||(A[2]=r.createTextVNode()),r.unref(e).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(D.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),A[5]||(A[5]=r.createTextVNode()),D.prefix?(r.openBlock(),r.createElementBlock("div",eb,r.toDisplayString(D.prefix),1)):r.createCommentVNode("",!0),A[6]||(A[6]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":A[0]||(A[0]=U=>p.value=U),disabled:D.disabled,placeholder:D.placeholder||"...",type:h.value,spellcheck:"false",onFocusout:F},null,40,tb),[[r.vModelDynamic,p.value]]),A[7]||(A[7]=r.createTextVNode()),r.createElementVNode("div",nb,[b.value?(r.openBlock(),r.createBlock(r.unref(Co),{key:0,class:"pl-text-field__clearable",name:"delete-clear",onClick:y})):r.createCommentVNode("",!0),A[3]||(A[3]=r.createTextVNode()),D.type==="password"?(r.openBlock(),r.createBlock(r.unref(Ci),{key:1,name:m.value,style:{cursor:"pointer"},onClick:R},null,8,["name"])):r.createCommentVNode("",!0),A[4]||(A[4]=r.createTextVNode()),r.renderSlot(D.$slots,"append")]),A[8]||(A[8]=r.createTextVNode()),r.createVNode(vr,{class:"pl-text-field__contour"})],2),A[9]||(A[9]=r.createTextVNode()),G.value?(r.openBlock(),r.createElementBlock("div",rb,r.toDisplayString(O.value.join(" ")),1)):D.helper?(r.openBlock(),r.createElementBlock("div",ob,r.toDisplayString(D.helper),1)):r.createCommentVNode("",!0)]))}}),sb=["disabled","placeholder"],ab=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,i=r.ref(void 0),l=r.ref(),c=r.computed({get(){return o.modelValue??""},set(h){n("update:modelValue",h)}}),d=r.computed(()=>!!o.modelValue),p=()=>n("update:modelValue","");return(h,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:i,class:r.normalizeClass(["pl-search-field",[h.$style.component]])},[r.createVNode(r.unref(Ci),{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:h.disabled,type:"text",placeholder:h.placeholder||"Find...",spellcheck:"false"},null,8,sb),[[r.vModelText,c.value]]),m[2]||(m[2]=r.createTextVNode()),h.clearable&&d.value?(r.openBlock(),r.createBlock(r.unref(Co),{key:0,class:r.normalizeClass(h.$style.clear),name:"delete-clear",onClick:r.withModifiers(p,["stop"])},null,8,["class"])):r.createCommentVNode("",!0)],2))}}),lb="_component_1ng5b_1",cb="_clear_1ng5b_35",db={component:lb,clear:cb},ub={$style:db},gp=Zt(ab,[["__cssModules",ub]]),pb={class:"ui-text-area__envelope"},hb={key:0,ref:"label"},fb={key:0,class:"required-icon"},mb=["readonly","rows","disabled","placeholder"],gb={class:"ui-text-area__append"},yb={key:0,class:"ui-text-area__error"},vb={key:1,class:"ui-text-area__helper"},_b={name:"PlTextArea"},Cb=r.defineComponent({..._b,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,i=t,l=r.ref(),c=r.ref(),d=r.computed({get(){return i.modelValue??""},set(w){o("update:modelValue",w)}}),p=r.computed(()=>!!i.modelValue),h=mp(d,i.rules||[]);Xn(l);const m=r.computed(()=>{const w=[];return i.error&&w.push(i.error),w.push(...h.value.errors),w}),y=r.computed(()=>m.value.length>0),x=()=>{if(!i.autogrow)return;const w=c.value;w&&(w.style.height="auto",w.style.height=`${w.scrollHeight}px`)};return r.onMounted(()=>{x()}),(w,S)=>(r.openBlock(),r.createElementBlock("div",pb,[r.createElementVNode("div",{ref_key:"root",ref:l,class:r.normalizeClass(["ui-text-area",{error:y.value,disabled:w.disabled,dashed:w.dashed,nonEmpty:p.value}])},[w.label?(r.openBlock(),r.createElementBlock("label",hb,[w.required?(r.openBlock(),r.createElementBlock("i",fb)):r.createCommentVNode("",!0),S[1]||(S[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(w.label),1),S[2]||(S[2]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(w.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),S[3]||(S[3]=r.createTextVNode()),r.withDirectives(r.createElementVNode("textarea",{ref_key:"input",ref:c,"onUpdate:modelValue":S[0]||(S[0]=O=>d.value=O),readonly:w.readonly,rows:w.rows,disabled:w.disabled,placeholder:w.placeholder??"...",spellcheck:"false",onInput:x},null,40,mb),[[r.vModelText,d.value]]),S[4]||(S[4]=r.createTextVNode()),r.createElementVNode("div",gb,[r.renderSlot(w.$slots,"append")]),S[5]||(S[5]=r.createTextVNode()),r.createVNode(vr,{class:"ui-text-area__contour"})],2),S[6]||(S[6]=r.createTextVNode()),y.value?(r.openBlock(),r.createElementBlock("div",yb,r.toDisplayString(m.value.join(" ")),1)):w.helper?(r.openBlock(),r.createElementBlock("div",vb,r.toDisplayString(w.helper),1)):r.createCommentVNode("",!0)]))}});function yp(t,e){const n=t.scrollTop,o=t.getBoundingClientRect().height,i=e.offsetTop,l=e.getBoundingClientRect().height;return i+l<o+n&&i>n}function vp(t,e){const n=t.scrollTop,o=t.getBoundingClientRect().height,i=e.offsetTop,l=e.getBoundingClientRect().height;return i+l<o+n?"ceil":i>n?"floor":"visible"}function wi(t,e,n={}){const o=t.scrollTop,i=t.getBoundingClientRect().height,l=e.getBoundingClientRect().height,c=e.offsetTop,d=vp(t,e);if(d==="visible")return;const p=h=>{const m=d==="floor"?c-(i-l):c;t.scrollTop=o+h*(m-o)};yp(t,e)||np({duration:n.duration||100,timing:tp(h=>h),draw:p})}function Ol(t,e,n,o){return t.addEventListener(e,n,o),function(){t.removeEventListener(e,n)}}function wb(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 _p(t){return t!==null&&typeof t=="object"}function Ot(t,e){return _p(t)&&_p(e)?Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>Ot(t[n],e[n])):t===e}function Ll(t,e){return t.some(n=>Ot(n,e))}const Ml=r.defineComponent({__name:"LongText",setup(t){r.useCssVars(m=>({"8d68520c":c.value}));const e=r.ref(!1),n=r.ref(),o=r.ref(!1),i=r.computed(()=>o.value&&e.value?"ui-lt-animate":""),l=rp(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 d(){const m=Tl(n.value,"span cannot be empty");e.value=m.clientWidth<m.scrollWidth}function p(){d(),l(!0)}function h(){l(!1)}return(m,y)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps(m.$attrs,{class:"ui-lt-container"}),[r.createElementVNode("span",{onMouseover:p,onMouseleave:h},[r.createElementVNode("span",{ref_key:"span",ref:n,class:r.normalizeClass(i.value)},[r.renderSlot(m.$slots,"default")],2)],32)],16))}}),bb=r.defineComponent({__name:"PlMaskIcon24",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>`mask-24 mask-${e.name}`);return(o,i)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass([n.value,o.$style.icon])},null,2))}}),xb="_icon_1ugxm_2",kb={icon:xb},Sb={$style:kb},Lt=Zt(bb,[["__cssModules",Sb]]),Eb={class:"pl-dropdown__envelope"},Tb=["tabindex"],Nb={class:"pl-dropdown__container"},Ab={class:"pl-dropdown__field"},Vb=["disabled","placeholder"],Bb={class:"pl-dropdown__controls"},Pb={key:0},Rb={key:0,class:"required-icon"},Db={key:0,class:"nothing-found"},Ib={key:0,class:"pl-dropdown__error"},Fb={key:1,class:"pl-dropdown__helper"},Ob={key:2,class:"pl-dropdown__helper"},Lb={name:"PlDropdown"},wo=r.defineComponent({...Lb,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,i=r.useSlots(),l=r.ref(),c=r.ref(),d=r.ref(),p=r.reactive({search:"",activeIndex:-1,open:!1,optionsHeight:0}),h=()=>_i(F.value.findIndex(C=>Ot(C.value,o.modelValue)),C=>C<0?0:C),m=()=>p.activeIndex=h(),y=r.computed(()=>o.options===void 0),x=r.computed(()=>y.value?!0:o.disabled),w=r.computed(()=>(o.options??[]).findIndex(C=>Ot(C.value,o.modelValue))),S=r.computed(()=>{if(!y.value){if(o.error)return o.error;if(o.modelValue!==void 0&&w.value===-1)return"The selected value is not one of the options"}}),O=r.computed(()=>yr(o.options??[]).map((C,E)=>({...C,index:E,isSelected:E===w.value,isActive:E===p.activeIndex}))),G=r.computed(()=>{const C=r.unref(O).find(E=>Ot(E.value,o.modelValue));return(C==null?void 0:C.label)||o.modelValue}),b=r.computed(()=>!p.open&&o.modelValue?"":o.modelValue?String(G.value):o.placeholder),R=r.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),F=r.computed(()=>{const C=O.value;return p.search?C.filter(E=>{const M=p.search.toLowerCase();return E.label.toLowerCase().includes(M)||E.description&&E.description.toLowerCase().includes(M)?!0:typeof E.value=="string"?E.value.toLowerCase().includes(M):E.value===p.search}):C}),D=r.computed(()=>x.value?void 0:"0"),A=C=>{var E;n("update:modelValue",C),p.search="",p.open=!1,(E=l==null?void 0:l.value)==null||E.focus()},U=()=>n("update:modelValue",void 0),j=()=>{var C;return(C=d.value)==null?void 0:C.focus()},$=()=>p.open=!p.open,Z=()=>p.open=!0,W=C=>{var E,M;const H=C.relatedTarget;!((E=l.value)!=null&&E.contains(H))&&!((M=c.value)!=null&&M.contains(H))&&(p.search="",p.open=!1)},J=()=>{const C=c.value;C&&ut(C.querySelector(".hovered-item"),E=>{wi(C,E)})},he=C=>{var E,M;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(C.code))C.preventDefault();else return;const{open:H,activeIndex:K}=p;if(!H){C.code==="Enter"&&(p.open=!0);return}C.code==="Escape"&&(p.open=!1,(E=l.value)==null||E.focus());const ne=r.unref(F),{length:de}=ne;if(!de)return;C.code==="Enter"&&A((M=ne.find(ht=>ht.index===K))==null?void 0:M.value);const ke=ne.findIndex(ht=>ht.index===K)??-1,Se=C.code==="ArrowDown"?1:C.code==="ArrowUp"?-1:0,Ze=Math.abs(ke+Se+de)%de;p.activeIndex=F.value[Ze].index??-1};Xn(l),r.watch(()=>o.modelValue,m,{immediate:!0}),r.watch(()=>p.open,C=>{var E;return C?(E=d.value)==null?void 0:E.focus():""}),r.watchPostEffect(()=>{p.search,p.activeIndex>=0&&p.open&&J()});const B=r.reactive({top:"0px",left:"0px",width:"0px"});return r.watch(c,C=>{if(C){const E=C.getBoundingClientRect();p.optionsHeight=E.height,window.dispatchEvent(new CustomEvent("adjust"))}}),vo(l,C=>{const E=C.top+C.height+3;E+p.optionsHeight>C.clientHeight?B.top=C.top-p.optionsHeight-3+"px":B.top=E+"px",B.left=C.left+"px",B.width=C.width+"px"}),(C,E)=>(r.openBlock(),r.createElementBlock("div",Eb,[r.createElementVNode("div",{ref_key:"root",ref:l,tabindex:D.value,class:r.normalizeClass(["pl-dropdown",{open:p.open,error:C.error,disabled:x.value}]),onKeydown:he,onFocusout:W},[r.createElementVNode("div",Nb,[r.createElementVNode("div",Ab,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:d,"onUpdate:modelValue":E[0]||(E[0]=M=>p.search=M),type:"text",tabindex:"-1",disabled:x.value,placeholder:b.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:Z},null,40,Vb),[[r.vModelText,p.search]]),E[4]||(E[4]=r.createTextVNode()),p.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,onClick:j},[r.createVNode(Ml,{class:"input-value"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(G.value),1)]),_:1})])),E[5]||(E[5]=r.createTextVNode()),r.createElementVNode("div",Bb,[y.value?(r.openBlock(),r.createBlock(r.unref(Lt),{key:0,name:"loading"})):r.createCommentVNode("",!0),E[1]||(E[1]=r.createTextVNode()),C.clearable&&R.value?(r.openBlock(),r.createBlock(r.unref(Co),{key:1,name:"delete-clear",onClick:r.withModifiers(U,["stop"])})):r.createCommentVNode("",!0),E[2]||(E[2]=r.createTextVNode()),r.renderSlot(C.$slots,"append"),E[3]||(E[3]=r.createTextVNode()),C.arrowIconLarge?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["arrow-icon",[`icon-24 ${C.arrowIconLarge}`]]),onClick:r.withModifiers($,["stop"])},null,2)):C.arrowIcon?(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["arrow-icon",[`icon-16 ${C.arrowIcon}`]]),onClick:r.withModifiers($,["stop"])},null,2)):(r.openBlock(),r.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:r.withModifiers($,["stop"])}))])]),E[9]||(E[9]=r.createTextVNode()),C.label?(r.openBlock(),r.createElementBlock("label",Pb,[C.required?(r.openBlock(),r.createElementBlock("i",Rb)):r.createCommentVNode("",!0),E[6]||(E[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(C.label),1),E[7]||(E[7]=r.createTextVNode()),r.unref(i).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(C.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),E[10]||(E[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(B),tabindex:"-1"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(F.value,(M,H)=>(r.openBlock(),r.createBlock(yo,{key:H,option:M,"is-selected":M.isSelected,"is-hovered":M.isActive,size:C.optionSize,onClick:r.withModifiers(K=>A(M.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),E[8]||(E[8]=r.createTextVNode()),F.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Db,"Nothing found"))],4)])):r.createCommentVNode("",!0),E[11]||(E[11]=r.createTextVNode()),r.createVNode(vr,{class:"pl-dropdown__contour"})])],42,Tb),E[12]||(E[12]=r.createTextVNode()),S.value?(r.openBlock(),r.createElementBlock("div",Ib,r.toDisplayString(S.value),1)):y.value&&C.loadingOptionsHelper?(r.openBlock(),r.createElementBlock("div",Fb,r.toDisplayString(C.loadingOptionsHelper),1)):C.helper?(r.openBlock(),r.createElementBlock("div",Ob,r.toDisplayString(C.helper),1)):r.createCommentVNode("",!0)]))}}),Mb={name:"PlDropdownRef"},Gb=r.defineComponent({...Mb,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 i;return(i=e.options)==null?void 0:i.map(l=>({label:l.label,value:l.ref}))}),o=r.computed(()=>e.disabled?"icon-link-disabled":"icon-link");return(i,l)=>(r.openBlock(),r.createBlock(r.unref(wo),r.mergeProps(e,{options:n.value,"loading-options-helper":i.loadingOptionsHelper,"arrow-icon-large":o.value,"onUpdate:modelValue":l[0]||(l[0]=c=>i.$emit("update:modelValue",c))}),null,16,["options","loading-options-helper","arrow-icon-large"]))}});function $b(t,e){return r.computed(()=>{const n=yr(t.value);return e.value?n.filter(o=>o.label.toLowerCase().includes(e.value.toLowerCase())):n})}const zb={class:"resizable-input"},Ub=["placeholder","value","disabled"],Zb=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,i=r.computed(()=>{var d;return n.placeholder?n.placeholder:(d=n.modelValue||n.value)==null?void 0:d.replace('"',"")}),l=r.computed(()=>{const d={};return n.width&&(d.width=n.width),n.maxWidth&&(d.maxWidth=n.maxWidth),d});function c(d){const p=d.target.value;o("update:modelValue",p)}return(d,p)=>(r.openBlock(),r.createElementBlock("div",zb,[r.createElementVNode("span",{style:r.normalizeStyle(l.value),class:"resizable-input__size-span"},r.toDisplayString(i.value),5),p[0]||(p[0]=r.createTextVNode()),r.createElementVNode("input",r.mergeProps(d.$attrs,{placeholder:d.placeholder,value:n.modelValue,disabled:n.disabled,style:l.value,onInput:c}),null,16,Ub)]))}}),jb={class:"dropdown-tab-item__title text-caps13"},Wb=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 i=[];return e.isSelected&&i.push("dropdown-tab-item__selected"),e.isHovered&&i.push("hovered-item"),i.join(" ")});return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([o.value,"dropdown-tab-item"])},[r.createElementVNode("div",jb,r.toDisplayString(n.value),1)],2))}}),Hb={class:"pl-line-dropdown__prefix"},qb={class:"pl-line-dropdown__icon-wrapper"},Kb={class:"pl-line-dropdown__icon"},Xb={key:0,class:"pl-line-dropdown__no-item"},Yb={key:0,class:"pl-line-dropdown__no-item"},Cp=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,i=r.reactive({isOpen:!1,activeOption:-1,optionsHeight:0}),l=r.ref(),c=r.ref(),d=r.computed(()=>{const W=[];return i.isOpen&&W.push("open"),o.disabled&&W.push("disabled"),W.join(" ")}),p=r.ref(""),h=$b(r.toRef(o,"options"),p),m=r.computed(()=>!!(o.clearable&&i.isOpen&&o.modelValue&&y.value)),y=r.computed(()=>{if(o.modelValue){const W=S();if(W!==-1){const J=yr(o.options)[W];return typeof J.label=="object"?J.label.title:J.label}}return""}),x=r.ref(y.value),w=r.computed(()=>i.isOpen&&p.value&&p.value.length>=y.value.length-1?p.value:y.value??"...");As(l,()=>{o.mode==="list"&&(i.isOpen=!1)}),r.watch(()=>x.value,W=>{y.value!==W?p.value=W:p.value=""}),r.watch(()=>i.isOpen,W=>{var J;W&&l.value&&((J=l.value.querySelector("input"))==null||J.focus(),r.nextTick(()=>j()))}),r.watch(()=>o.modelValue,()=>O(),{immediate:!0});function S(){return o.options.findIndex(W=>Ot(W.value,o.modelValue))}function O(){i.activeOption=_i(h.value.findIndex(W=>Ot(W.value,o.modelValue)),W=>W<0?0:W),x.value=y.value}function G(){p.value=""}function b(){o.disabled?i.isOpen=!1:r.nextTick(()=>{i.isOpen=!i.isOpen})}function R(){o.mode==="list"&&(i.isOpen=!1)}function F(W){W&&(n("update:modelValue",W.value),R(),G())}function D(W){return Ot(W.value,o.modelValue)}const A=W=>{var J,he;const B=W.relatedTarget;!((J=l.value)!=null&&J.contains(B))&&!((he=c.value)!=null&&he.contains(B))&&(p.value="",i.isOpen=!1)};function U(W){const{activeOption:J}=i;if(!i.isOpen&&W.code==="Enter"){i.isOpen=!0;return}const{length:he}=h.value;if(!he)return;["ArrowDown","ArrowUp","Enter"].includes(W.code)&&W.preventDefault(),W.code==="Enter"&&F(h.value[J]);const B=W.code==="ArrowDown"?1:W.code==="ArrowUp"?-1:0;i.activeOption=Math.abs(J+B+he)%he,requestAnimationFrame(j)}function j(){const W=c.value;W&&ut(W.querySelector(".hovered-item"),J=>{o.mode==="list"?wi(W,J):J.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}function $(){n("update:modelValue",void 0)}const Z=r.reactive({top:"0px",left:"0px"});return r.watch(c,W=>{if(W){const J=W.getBoundingClientRect();i.optionsHeight=J.height,window.dispatchEvent(new CustomEvent("adjust"))}}),vo(l,W=>{const J=W.top+W.height+2;J+i.optionsHeight>W.clientHeight?Z.top=W.top-i.optionsHeight-2+"px":Z.top=J+"px",Z.left=W.left+"px"}),(W,J)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"container",ref:l,tabindex:"0",class:r.normalizeClass([d.value,"pl-line-dropdown uc-pointer"]),onKeydown:U,onFocusout:A,onClick:b},[r.createElementVNode("div",Hb,r.toDisplayString(o==null?void 0:o.prefix),1),J[6]||(J[6]=r.createTextVNode()),r.createVNode(Zb,{modelValue:x.value,"onUpdate:modelValue":J[0]||(J[0]=he=>x.value=he),placeholder:w.value,disabled:o.disabled,class:"pl-line-dropdown__input"},null,8,["modelValue","placeholder","disabled"]),J[7]||(J[7]=r.createTextVNode()),r.createElementVNode("div",qb,[r.withDirectives(r.createElementVNode("div",Kb,null,512),[[r.vShow,!m.value]]),J[1]||(J[1]=r.createTextVNode()),r.withDirectives(r.createElementVNode("div",{class:"pl-line-dropdown__icon-clear",onClick:$},null,512),[[r.vShow,m.value]])]),J[8]||(J[8]=r.createTextVNode()),i.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(Z),tabindex:"-1",class:"pl-line-dropdown__items",onFocusout:A},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(h),(he,B)=>r.renderSlot(W.$slots,"item",{key:B,item:he,textItem:"text",isSelected:D(he),isHovered:i.activeOption==B,onClick:r.withModifiers(C=>F(he),["stop"])},()=>[r.createVNode(yo,{option:he,"text-item":"text","is-selected":D(he),"is-hovered":i.activeOption==B,size:"medium",onClick:r.withModifiers(C=>F(he),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),J[3]||(J[3]=r.createTextVNode()),r.unref(h).length===0?(r.openBlock(),r.createElementBlock("div",Xb,J[2]||(J[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(Z),tabindex:"-1",class:"pl-line-dropdown__items-tabs",onFocusout:A},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(h),(he,B)=>r.renderSlot(W.$slots,"item",{key:B,item:he,isSelected:D(he),isHovered:i.activeOption==B,onClick:r.withModifiers(C=>F(he),["stop"])},()=>[r.createVNode(Wb,{option:he,"is-selected":D(he),"is-hovered":i.activeOption==B,onClick:r.withModifiers(C=>F(he),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),J[5]||(J[5]=r.createTextVNode()),r.unref(h).length===0?(r.openBlock(),r.createElementBlock("div",Yb,J[4]||(J[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))}}),Jb={class:"ui-dropdown__envelope"},Qb=["tabindex"],ex={class:"ui-dropdown__container"},tx={class:"ui-dropdown__field"},nx=["disabled","placeholder"],rx={class:"ui-dropdown__controls"},ox={key:0},ix={key:0,class:"required-icon"},sx={key:0,class:"nothing-found"},ax={key:0,class:"ui-dropdown__error"},lx={key:1,class:"ui-dropdown__helper"},cx={key:2,class:"ui-dropdown__helper"},dx={name:"PlDropdown"},ux=r.defineComponent({...dx,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,i=r.useSlots(),l=r.ref(),c=r.ref(),d=r.ref(),p=r.reactive({search:"",activeIndex:-1,open:!1}),h=()=>_i(F.value.findIndex(B=>Ot(B.value,o.modelValue)),B=>B<0?0:B),m=()=>p.activeIndex=h(),y=r.computed(()=>o.options===void 0),x=r.computed(()=>y.value?!0:o.disabled),w=r.computed(()=>(o.options??[]).findIndex(B=>Ot(B.value,o.modelValue))),S=r.computed(()=>{if(!y.value){if(o.error)return o.error;if(o.modelValue!==void 0&&w.value===-1)return"The selected value is not one of the options"}}),O=r.computed(()=>yr(o.options??[]).map((B,C)=>({...B,index:C,isSelected:C===w.value,isActive:C===p.activeIndex}))),G=r.computed(()=>{const B=r.unref(O).find(C=>Ot(C.value,o.modelValue));return(B==null?void 0:B.label)||o.modelValue}),b=r.computed(()=>!p.open&&o.modelValue?"":o.modelValue?String(G.value):o.placeholder),R=r.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),F=r.computed(()=>{const B=O.value;return p.search?B.filter(C=>{const E=p.search.toLowerCase();return C.label.toLowerCase().includes(E)||C.description&&C.description.toLowerCase().includes(E)?!0:typeof C.value=="string"?C.value.toLowerCase().includes(E):C.value===p.search}):B}),D=r.computed(()=>x.value?void 0:"0"),A=B=>{var C;n("update:modelValue",B),p.search="",p.open=!1,(C=l==null?void 0:l.value)==null||C.focus()},U=()=>n("update:modelValue",void 0),j=()=>{var B;return(B=d.value)==null?void 0:B.focus()},$=()=>p.open=!p.open,Z=()=>p.open=!0,W=B=>{var C;(C=l==null?void 0:l.value)!=null&&C.contains(B.relatedTarget)||(p.search="",p.open=!1)},J=()=>{const B=c.value;B&&ut(B.querySelector(".hovered-item"),C=>{wi(B,C)})},he=B=>{var C,E;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(B.code))B.preventDefault();else return;const{open:M,activeIndex:H}=p;if(!M){B.code==="Enter"&&(p.open=!0);return}B.code==="Escape"&&(p.open=!1,(C=l.value)==null||C.focus());const K=r.unref(F),{length:ne}=K;if(!ne)return;B.code==="Enter"&&A((E=K.find(Ze=>Ze.index===H))==null?void 0:E.value);const de=K.findIndex(Ze=>Ze.index===H)??-1,ke=B.code==="ArrowDown"?1:B.code==="ArrowUp"?-1:0,Se=Math.abs(de+ke+ne)%ne;p.activeIndex=F.value[Se].index??-1};return Xn(l),r.watch(()=>o.modelValue,m,{immediate:!0}),r.watch(()=>p.open,B=>{var C;return B?(C=d.value)==null?void 0:C.focus():""}),r.watchPostEffect(()=>{p.search,p.activeIndex>=0&&p.open&&J()}),(B,C)=>(r.openBlock(),r.createElementBlock("div",Jb,[r.createElementVNode("div",{ref_key:"root",ref:l,tabindex:D.value,class:r.normalizeClass(["ui-dropdown",{open:p.open,error:B.error,disabled:x.value}]),onKeydown:he,onFocusout:W},[r.createElementVNode("div",ex,[r.createElementVNode("div",tx,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:d,"onUpdate:modelValue":C[0]||(C[0]=E=>p.search=E),type:"text",tabindex:"-1",disabled:x.value,placeholder:b.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:Z},null,40,nx),[[r.vModelText,p.search]]),C[4]||(C[4]=r.createTextVNode()),p.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,onClick:j},[r.createVNode(Ml,{class:"input-value"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(G.value),1)]),_:1})])),C[5]||(C[5]=r.createTextVNode()),r.createElementVNode("div",rx,[y.value?(r.openBlock(),r.createBlock(r.unref(Lt),{key:0,name:"loading"})):r.createCommentVNode("",!0),C[1]||(C[1]=r.createTextVNode()),B.clearable&&R.value?(r.openBlock(),r.createBlock(r.unref(Co),{key:1,name:"delete-clear",onClick:r.withModifiers(U,["stop"])})):r.createCommentVNode("",!0),C[2]||(C[2]=r.createTextVNode()),r.renderSlot(B.$slots,"append"),C[3]||(C[3]=r.createTextVNode()),B.arrowIconLarge?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["arrow-icon",[`icon-24 ${B.arrowIconLarge}`]]),onClick:r.withModifiers($,["stop"])},null,2)):B.arrowIcon?(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["arrow-icon",[`icon-16 ${B.arrowIcon}`]]),onClick:r.withModifiers($,["stop"])},null,2)):(r.openBlock(),r.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:r.withModifiers($,["stop"])}))])]),C[9]||(C[9]=r.createTextVNode()),B.label?(r.openBlock(),r.createElementBlock("label",ox,[B.required?(r.openBlock(),r.createElementBlock("i",ix)):r.createCommentVNode("",!0),C[6]||(C[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(B.label),1),C[7]||(C[7]=r.createTextVNode()),r.unref(i).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(B.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),C[10]||(C[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(F.value,(E,M)=>(r.openBlock(),r.createBlock(yo,{key:M,option:E,"is-selected":E.isSelected,"is-hovered":E.isActive,size:B.optionSize,onClick:r.withModifiers(H=>A(E.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),C[8]||(C[8]=r.createTextVNode()),F.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",sx,"Nothing found"))],512)):r.createCommentVNode("",!0),C[11]||(C[11]=r.createTextVNode()),r.createVNode(vr,{class:"ui-dropdown__contour"})])],42,Qb),C[12]||(C[12]=r.createTextVNode()),S.value?(r.openBlock(),r.createElementBlock("div",ax,r.toDisplayString(S.value),1)):y.value&&B.loadingOptionsHelper?(r.openBlock(),r.createElementBlock("div",lx,r.toDisplayString(B.loadingOptionsHelper),1)):B.helper?(r.openBlock(),r.createElementBlock("div",cx,r.toDisplayString(B.helper),1)):r.createCommentVNode("",!0)]))}}),px={key:0,class:"ui-progress-bar"},hx={class:"ui-progress-bar__messages d-flex align-center pl-6 pr-6"},fx={class:"ui-progress-bar__message flex-grow-1"},mx={class:"ui-progress-bar__percent"},gx=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,i)=>o.loading?(r.openBlock(),r.createElementBlock("div",px,[r.createElementVNode("div",{class:"ui-progress-bar__indicator",style:r.normalizeStyle({width:o.progress+"%"})},null,4),i[1]||(i[1]=r.createTextVNode()),r.createElementVNode("div",hx,[r.createElementVNode("div",fx,r.toDisplayString(n.value),1),i[0]||(i[0]=r.createTextVNode()),r.createElementVNode("div",mx,r.toDisplayString(o.progress+"%"),1)])])):r.createCommentVNode("",!0)}}),yx={class:"mi-number-field__main-wrapper d-flex"},vx={class:"mi-number-field__wrapper flex-grow d-flex flex-align-center"},_x={key:0,class:"text-description"},Cx=["disabled","placeholder"],wx={class:"mi-number-field__icons d-flex-column"},bx={key:0,class:"mi-number-field__hint text-description"},xx=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,i=r.ref(),l=r.useSlots(),c=r.ref();Xn(i);const d=r.ref(!0),p=r.computed({get(){return d.value&&n.modelValue!==void 0?new Number(n.modelValue).toString():""},set(b){var R;b=b.replace(/,/g,""),x(b)?(o("update:modelValue",+b),b.toString()!==((R=n.modelValue)==null?void 0:R.toString())&&+b===n.modelValue&&b[b.length-1]!=="."&&(d.value=!1,r.nextTick(()=>{d.value=!0}))):(b.trim()===""&&o("update:modelValue",void 0),d.value=!1,r.nextTick(()=>{d.value=!0}))}}),h=r.computed(()=>{let b=[];return n.errorMessage&&b.push(n.errorMessage),x(n.modelValue)?(n.minValue!==void 0&&n.modelValue!==void 0&&n.modelValue<n.minValue&&b.push(`Model value must be higher than ${n.minValue}`),n.maxValue!==void 0&&n.modelValue!==void 0&&n.modelValue>n.maxValue&&b.push(`Model value must be less than ${n.maxValue}`)):b.push("Model value is not a number."),b=[...b],b.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 x(b){return b!==void 0?(b=b==null?void 0:b.toString(),!isNaN(+b)&&!isNaN(parseFloat(b))):!1}function w(){if(!m.value){let b=0;n.modelValue===void 0?b=n.minValue?n.minValue:0:b=+(n.modelValue||0)+n.step,p.value=b.toString()}}function S(){if(!y.value){let b=0;n.modelValue===void 0?b=0:b=+(n.modelValue||0)-n.step,p.value=n.minValue?Math.max(n.minValue,b).toString():b.toString()}}function O(b){["ArrowDown","ArrowUp"].includes(b.code)&&b.preventDefault(),b.code==="ArrowUp"?w():b.code==="ArrowDown"&&S()}const G=b=>{b.detail>1&&b.preventDefault()};return(b,R)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:i,class:r.normalizeClass([{error:!!h.value.trim(),disabled:b.disabled},"mi-number-field d-flex-column"]),onMousedown:G,onKeydown:R[1]||(R[1]=F=>O(F))},[r.createElementVNode("div",yx,[r.createVNode(vr,{class:"mi-number-field__contour"}),R[6]||(R[6]=r.createTextVNode()),r.createElementVNode("div",vx,[b.label?(r.openBlock(),r.createElementBlock("label",_x,[r.createTextVNode(r.toDisplayString(b.label)+" ",1),r.unref(l).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(b.$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]=F=>p.value=F),disabled:b.disabled,placeholder:b.placeholder,class:"text-s flex-grow"},null,8,Cx),[[r.vModelText,p.value]])]),R[7]||(R[7]=r.createTextVNode()),r.createElementVNode("div",wx,[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:w},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:S},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()),h.value.trim()?(r.openBlock(),r.createElementBlock("div",bx,r.toDisplayString(h.value),1)):r.createCommentVNode("",!0)],34))}}),kx={class:"pl-chip__text"},Gl=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,i)=>(r.openBlock(),r.createBlock(r.unref(xt),{position:"top",class:"pl-chip-tooltip",delay:500},r.createSlots({default:r.withCtx(()=>[i[4]||(i[4]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"chip",ref:e,class:r.normalizeClass(["pl-chip",{small:o.small}])},[r.createElementVNode("div",kx,[r.renderSlot(o.$slots,"default")]),i[3]||(i[3]=r.createTextVNode()),o.closeable?(r.openBlock(),r.createElementBlock("div",{key:0,tabindex:"0",class:"pl-chip__close",onKeydown:i[0]||(i[0]=r.withKeys(l=>o.$emit("close"),["enter"])),onClick:i[1]||(i[1]=r.withModifiers(l=>o.$emit("close"),["stop"]))},i[2]||(i[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))}}),Sx={class:"pl-multi-dropdown__envelope"},Ex=["tabindex"],Tx={class:"pl-multi-dropdown__container"},Nx={class:"pl-multi-dropdown__field"},Ax=["disabled","placeholder"],Vx={class:"pl-multi-dropdown__append"},Bx={key:0},Px={key:0,class:"required-icon"},Rx={class:"pl-multi-dropdown__open-chips-container"},Dx={key:0,class:"nothing-found"},Ix={key:0,class:"pl-multi-dropdown__error"},Fx={key:1,class:"pl-multi-dropdown__helper"},Ox={name:"PlDropdownMulti"},Lx=r.defineComponent({...Ox,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=$=>n("update:modelValue",$),i=r.useSlots(),l=t,c=r.ref(),d=r.ref(),p=r.ref(),h=r.reactive({search:"",activeOption:-1,open:!1,optionsHeight:0}),m=r.computed(()=>Array.isArray(l.modelValue)?l.modelValue:[]),y=r.computed(()=>h.open&&l.modelValue.length>0?l.placeholder:l.modelValue.length>0?"":l.placeholder),x=r.computed(()=>yr(l.options).filter($=>Ll(m.value,$.value))),w=r.computed(()=>{const $=r.unref(m),Z=yr(l.options);return(h.search?Z.filter(W=>{const J=h.search.toLowerCase();return W.label.toLowerCase().includes(J)?!0:typeof W.value=="string"?W.value.toLowerCase().includes(J):W.value===h.search}):[...Z]).map(W=>({...W,selected:Ll($,W.value)}))}),S=r.computed(()=>l.disabled?void 0:"0"),O=()=>{h.activeOption=_i(w.value.findIndex($=>Ot($.value,l.modelValue)),$=>$<0?0:$)},G=$=>{var Z;const W=r.unref(m);o(Ll(W,$)?W.filter(J=>!Ot(J,$)):[...W,$]),h.search="",(Z=c==null?void 0:c.value)==null||Z.focus()},b=$=>o(r.unref(m).filter(Z=>!Ot(Z,$))),R=()=>{var $;return($=p.value)==null?void 0:$.focus()},F=()=>h.open=!h.open,D=$=>{var Z,W;const J=$.relatedTarget;!((Z=c.value)!=null&&Z.contains(J))&&!((W=d.value)!=null&&W.contains(J))&&(h.search="",h.open=!1)},A=()=>{const $=d.value;$&&ut($.querySelector(".hovered-item"),Z=>{wi($,Z)})},U=$=>{var Z;const{open:W,activeOption:J}=h;if(!W){$.code==="Enter"&&(h.open=!0);return}$.code==="Escape"&&(h.open=!1,(Z=c.value)==null||Z.focus());const he=r.unref(w),{length:B}=he;if(!B)return;["ArrowDown","ArrowUp","Enter"].includes($.code)&&$.preventDefault(),$.code==="Enter"&&G(he[J].value);const C=$.code==="ArrowDown"?1:$.code==="ArrowUp"?-1:0;h.activeOption=Math.abs(J+C+B)%B,requestAnimationFrame(A)};Xn(c),r.watch(()=>l.modelValue,()=>O(),{immediate:!0}),r.watchPostEffect(()=>{h.search,h.open&&A()});const j=r.reactive({top:"0px",left:"0px",width:"0px"});return r.watch(d,$=>{if($){const Z=$.getBoundingClientRect();h.optionsHeight=Z.height,window.dispatchEvent(new CustomEvent("adjust"))}}),vo(c,$=>{const Z=$.top+$.height+5;Z+h.optionsHeight>$.clientHeight?j.top=$.top-h.optionsHeight-5+"px":j.top=Z+"px",j.left=$.left+"px",j.width=$.width+"px"}),($,Z)=>(r.openBlock(),r.createElementBlock("div",Sx,[r.createElementVNode("div",{ref_key:"rootRef",ref:c,tabindex:S.value,class:r.normalizeClass(["pl-multi-dropdown",{open:h.open,error:$.error,disabled:$.disabled}]),onKeydown:U,onFocusout:D},[r.createElementVNode("div",Tx,[r.createElementVNode("div",Nx,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:p,"onUpdate:modelValue":Z[0]||(Z[0]=W=>h.search=W),type:"text",tabindex:"-1",disabled:$.disabled,placeholder:y.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:Z[1]||(Z[1]=W=>h.open=!0)},null,40,Ax),[[r.vModelText,h.search]]),Z[3]||(Z[3]=r.createTextVNode()),h.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(x.value,(W,J)=>(r.openBlock(),r.createBlock(r.unref(Gl),{key:J,closeable:"",small:"",onClick:Z[2]||(Z[2]=r.withModifiers(he=>h.open=!0,["stop"])),onClose:he=>b(W.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(W.label||W.value),1)]),_:2},1032,["onClose"]))),128))])),Z[4]||(Z[4]=r.createTextVNode()),r.createElementVNode("div",{class:"arrow",onClick:r.withModifiers(F,["stop"])}),Z[5]||(Z[5]=r.createTextVNode()),r.createElementVNode("div",Vx,[r.renderSlot($.$slots,"append")])]),Z[10]||(Z[10]=r.createTextVNode()),$.label?(r.openBlock(),r.createElementBlock("label",Bx,[$.required?(r.openBlock(),r.createElementBlock("i",Px)):r.createCommentVNode("",!0),Z[6]||(Z[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString($.label),1),Z[7]||(Z[7]=r.createTextVNode()),r.unref(i).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot($.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),Z[11]||(Z[11]=r.createTextVNode()),h.open?(r.openBlock(),r.createBlock(r.Teleport,{key:1,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:d,class:"pl-multi-dropdown__options",style:r.normalizeStyle(j),tabindex:"-1",onFocusout:D},[r.createElementVNode("div",Rx,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(x.value,(W,J)=>(r.openBlock(),r.createBlock(r.unref(Gl),{key:J,closeable:"",small:"",onClose:he=>b(W.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(W.label||W.value),1)]),_:2},1032,["onClose"]))),128))]),Z[8]||(Z[8]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w.value,(W,J)=>(r.openBlock(),r.createBlock(yo,{key:J,option:W,"text-item":"text","is-selected":W.selected,"is-hovered":h.activeOption==J,size:"medium","use-checkbox":"",onClick:r.withModifiers(he=>G(W.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128)),Z[9]||(Z[9]=r.createTextVNode()),w.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Dx,"Nothing found"))],36)])):r.createCommentVNode("",!0),Z[12]||(Z[12]=r.createTextVNode()),r.createVNode(vr,{class:"pl-multi-dropdown__contour"})])],42,Ex),Z[13]||(Z[13]=r.createTextVNode()),$.error?(r.openBlock(),r.createElementBlock("div",Ix,r.toDisplayString($.error),1)):$.helper?(r.openBlock(),r.createElementBlock("div",Fx,r.toDisplayString($.helper),1)):r.createCommentVNode("",!0)]))}}),$l=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,i)=>(r.openBlock(),r.createElementBlock("div",{tabindex:"0",class:r.normalizeClass(["pl-checkbox-base",{checked:n.value,disabled:o.disabled}]),onClick:i[0]||(i[0]=l=>o.$emit("update:modelValue",!o.modelValue)),onKeydown:i[1]||(i[1]=r.withKeys(l=>o.$emit("update:modelValue",!o.modelValue),["enter"]))},null,34))}}),Mx={name:"PlCheckbox"},Gx=r.defineComponent({...Mx,props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t){const e=t,n=r.useSlots();return(o,i)=>r.unref(n).default?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["pl-checkbox",{disabled:o.disabled}])},[r.createVNode($l,r.mergeProps(e,{"onUpdate:modelValue":i[0]||(i[0]=l=>o.$emit("update:modelValue",l))}),null,16),i[3]||(i[3]=r.createTextVNode()),r.createElementVNode("label",{onClick:i[1]||(i[1]=l=>o.$emit("update:modelValue",!o.$props.modelValue))},[r.renderSlot(o.$slots,"default")])],2)):(r.openBlock(),r.createBlock($l,r.mergeProps({key:1},e,{"onUpdate:modelValue":i[2]||(i[2]=l=>o.$emit("update:modelValue",l))}),null,16))}}),$x={key:0},zx=["onClick"],Ux={name:"PlCheckboxGroup"},Zx=r.defineComponent({...Ux,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,i=c=>o.modelValue.includes(c),l=c=>{const d=o.modelValue??[];n("update:modelValue",i(c)?d.filter(p=>p!==c):[...d,c])};return(c,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-checkbox-group",{disabled:c.disabled}])},[c.label?(r.openBlock(),r.createElementBlock("label",$x,r.toDisplayString(c.label),1)):r.createCommentVNode("",!0),d[1]||(d[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,h)=>(r.openBlock(),r.createElementBlock("div",{key:h},[r.createVNode($l,{disabled:c.disabled,label:p.label,"model-value":i(p.value),"onUpdate:modelValue":()=>l(p.value)},null,8,["disabled","label","model-value","onUpdate:modelValue"]),d[0]||(d[0]=r.createTextVNode()),r.createElementVNode("label",{onClick:r.withModifiers(()=>l(p.value),["stop"])},r.toDisplayString(p.label),9,zx)]))),128))],2))}}),jx="_component_tupwt_1",Wx={component:jx},Hx={};function qx(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 Kx={$style:Wx},Xx=Zt(Hx,[["render",qx],["__cssModules",Kx]]),Yx={key:1,class:"pl-dialog-modal__title"},Jx={inheritAttrs:!1},zl=r.defineComponent({...Jx,__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,i=t,l=r.ref(),c=r.useAttrs();function d(p){l.value&&i.closeOnOutsideClick&&document.contains(p.target)&&!l.value.contains(p.target)&&o("update:modelValue",!1)}return st(document.body,"keyup",p=>{i.modelValue&&p.code==="Escape"&&o("update:modelValue",!1)}),(p,h)=>(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:d},[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(Xx,{key:0,class:"close-modal-btn",onClick:h[0]||(h[0]=r.withModifiers(m=>o("update:modelValue",!1),["stop"]))})):r.createCommentVNode("",!0),h[1]||(h[1]=r.createTextVNode()),r.unref(n).title?(r.openBlock(),r.createElementBlock("div",Yx,[r.renderSlot(p.$slots,"title")])):r.createCommentVNode("",!0),h[2]||(h[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),h[3]||(h[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})]))}}),Qx=r.defineComponent({__name:"TransitionSlidePanel",setup(t){function e(){window.dispatchEvent(new CustomEvent("adjust"))}function n(){window.dispatchEvent(new CustomEvent("adjust"))}return(o,i)=>(r.openBlock(),r.createBlock(r.Transition,{name:"slide-panel",onAfterEnter:e,onAfterLeave:n},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3}))}}),ek={key:0,class:"pl-slide-modal__title"},tk={class:"pl-slide-modal__content"},nk={key:1,class:"pl-slide-modal__actions"},rk={name:"PlSlideModal",inheritAttrs:!1},Vs=r.defineComponent({...rk,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,i=t,l=r.ref(),c=r.useAttrs();return As(l,()=>{i.modelValue&&i.closeOnOutsideClick&&o("update:modelValue",!1)}),st(document,"keydown",d=>{d.key==="Escape"&&o("update:modelValue",!1)}),(d,p)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(Qx,null,{default:r.withCtx(()=>[d.modelValue?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref_key:"modal",ref:l,style:{width:d.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(h=>o("update:modelValue",!1),["esc"]))}),[r.createElementVNode("div",{class:"close-dialog-btn",onClick:p[0]||(p[0]=h=>o("update:modelValue",!1))}),p[3]||(p[3]=r.createTextVNode()),r.unref(n).title?(r.openBlock(),r.createElementBlock("div",ek,[r.renderSlot(d.$slots,"title")])):r.createCommentVNode("",!0),p[4]||(p[4]=r.createTextVNode()),r.createElementVNode("div",tk,[r.renderSlot(d.$slots,"default")]),p[5]||(p[5]=r.createTextVNode()),r.unref(n).actions?(r.openBlock(),r.createElementBlock("div",nk,[r.renderSlot(d.$slots,"actions")])):r.createCommentVNode("",!0)],16)):r.createCommentVNode("",!0)]),_:3}),p[6]||(p[6]=r.createTextVNode()),d.modelValue&&d.shadow?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-slide-modal__shadow",onKeyup:p[2]||(p[2]=r.withKeys(h=>o("update:modelValue",!1),["esc"]))},null,32)):r.createCommentVNode("",!0)]))}}),ok={key:0,class:"label"},ik={name:"PlToggleSwitch"},Bs=r.defineComponent({...ik,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",ok,r.toDisplayString(e.label),1)):r.createCommentVNode("",!0)],34))}});function wp(t){return r.getCurrentScope()?(r.onScopeDispose(t),!0):!1}function sk(t){return r.unref(t)}const ak=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function lk(t,e,n={}){const{immediate:o=!0}=n,i=r.ref(!1);let l=null;function c(){l&&(clearTimeout(l),l=null)}function d(){i.value=!1,c()}function p(...h){c(),i.value=!0,l=setTimeout(()=>{i.value=!1,l=null,t(...h)},sk(e))}return o&&(i.value=!0,ak&&p()),wp(d),{isPending:r.readonly(i),start:p,stop:d}}function ck(t,e,n){return r.watch(t,(o,i,l)=>{o&&e(o,i,l)},{...n,once:!1})}function dk(t,e,n){const{start:o}=lk(l,e,{immediate:!1}),i=r.ref(!1);async function l(){i.value&&(await t(),o())}function c(){i.value||(i.value=!0,l())}function d(){i.value=!1}return n!=null&&n.immediate&&c(),wp(d),{isActive:i,pause:d,resume:c}}const uk="[==PROGRESS==]";function pk(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function hk(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 d=t.mockPlatforma??window.platforma;if(!d){console.warn("Platforma API is not available");return}for(;;){const p=await d.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 h=t.progressPrefix??uk,m=new TextDecoder().decode(p.data).replace(new RegExp(`${pk(h)}`,"g"),"");if(c=Object.assign(c,{lines:c.lines+m,lastOffset:p.newOffset,finished:!p.live}),p.newOffset>=p.size)break}}const i=dk(()=>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 ck(()=>{var l;return(l=e==null?void 0:e.value)==null?void 0:l.finished},()=>i.pause()),r.watch(()=>t.logHandle,l=>{var c;l===void 0?(e.value=void 0,i.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,i.resume())},{immediate:!0}),e}const fk={key:0},mk={class:"pl-log-view__copy"},gk={key:1,class:"pl-log-view__error"},yk={name:"PlLogView"},bp=r.defineComponent({...yk,props:{value:{},logHandle:{},progressPrefix:{},error:{},output:{},maxRetries:{},mockPlatforma:{},label:{}},setup(t){const e=S=>{if(S&&S.ok===!1)return S.errors.join(`
|
|
53
|
-
`)},n=t,o=hk(n),i=r.ref(!0),l=r.ref(),c=r.ref(),d=r.computed(()=>{var S;return((S=o.value)==null?void 0:S.error)??n.error??e(n.output)}),p=r.computed(()=>{var S;return((S=o.value)==null?void 0:S.lines)??n.value??q_(n.output)}),h=r.ref(!1);Xn(c);const m=r.computed(()=>h.value?"clipboard-copied":"clipboard"),y=()=>{h.value=!0,setTimeout(()=>{h.value=!1},1200),p.value&&typeof p.value=="string"&&navigator.clipboard.writeText(p.value)},x=()=>{Zr(l.value,S=>{i.value&&S.scrollTo(S.scrollLeft,S.scrollHeight)})};r.watch(p,()=>{requestAnimationFrame(()=>{x()})},{immediate:!0});const w=S=>{const O=S.target;i.value=O.scrollTop+20>=O.scrollHeight-O.offsetHeight};return(S,O)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:c,class:r.normalizeClass(["pl-log-view",{"has-error":d.value}])},[S.label?(r.openBlock(),r.createElementBlock("label",fk,r.toDisplayString(S.label),1)):r.createCommentVNode("",!0),O[1]||(O[1]=r.createTextVNode()),r.createVNode(vr,{class:"pl-log-view__contour"}),O[2]||(O[2]=r.createTextVNode()),r.createElementVNode("div",mk,[r.createVNode(r.unref(xt),{"close-delay":800,position:"top"},{tooltip:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(h.value?"copied":"copy"),1)]),default:r.withCtx(()=>[r.createVNode(r.unref(Lt),{title:"Copy content",name:m.value,onClick:y},null,8,["name"]),O[0]||(O[0]=r.createTextVNode())]),_:1})]),O[3]||(O[3]=r.createTextVNode()),d.value?(r.openBlock(),r.createElementBlock("div",gk,r.toDisplayString(d.value),1)):(r.openBlock(),r.createElementBlock("div",{key:2,ref_key:"contentRef",ref:l,class:"pl-log-view__content",onScroll:w},r.toDisplayString(p.value),545))],2))}}),vk="_component_1ukal_1",_k="_tab_1ukal_14",Ck="_disabled_1ukal_27",wk="_active_1ukal_56",bk="_topLine_1ukal_69",bo={component:vk,tab:_k,disabled:Ck,active:wk,topLine:bk},xk=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 i=o.$el.querySelector("span");i&&requestAnimationFrame(()=>{i.offsetWidth<i.scrollWidth&&(n.isOverflown=!0)})}),(o,i)=>(r.openBlock(),r.createBlock(r.unref(xt),{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"),i[0]||(i[0]=r.createTextVNode())]),_:3},8,["hide","data-is-overflown"]))}}),kk={name:"PlTabs"},Sk=r.defineComponent({...kk,props:{modelValue:{},options:{},disabled:{type:Boolean},topLine:{type:Boolean},maxTabWidth:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=i=>n("update:modelValue",i);return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(bo).component,{[r.unref(bo).disabled]:i.disabled,[r.unref(bo).topLine]:i.topLine}])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.options,(c,d)=>(r.openBlock(),r.createBlock(xk,{key:d,tabindex:i.modelValue===c.value||i.disabled||c.disabled?void 0:0,option:c,class:r.normalizeClass([{[r.unref(bo).active]:i.modelValue===c.value,[r.unref(bo).disabled]:c.disabled},r.unref(bo).tab]),style:r.normalizeStyle({"--pl-tabs-item-max-width":c.maxWidth??i.maxTabWidth}),onKeydown:r.withKeys(p=>o(c.value),["enter"]),onClick:p=>o(c.value)},{default:r.withCtx(()=>[r.renderSlot(i.$slots,c.value,{option:c},()=>[r.createElementVNode("span",null,r.toDisplayString(c.label),1)])]),_:2},1032,["tabindex","option","class","style","onKeydown","onClick"]))),128))],2))}}),Ek=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))}}),Tk="_compact_rhd5u_16",Nk="_content_rhd5u_20",Ak={compact:Tk,content:Nk},Vk={$style:Ak},xp=Zt(Ek,[["__cssModules",Vk]]),Bk=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,i)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.renderSlot(o.$slots,"header"),i[0]||(i[0]=r.createTextVNode()),r.renderSlot(o.$slots,"default")],64))}}),Pk=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,i)=>(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}))}}),Rk=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"),i=Uu(),l=r.computed(()=>!n||n.value.multiple),c=r.computed({get(){return l.value?o.value:e?e.value===i:o.value},set(d){l.value?o.value=d:e&&(e.value=e.value===i?"":i)}});return(d,p)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(r.unref(xp),{class:r.normalizeClass(d.$style.separator),compact:d.compact,onClick:p[0]||(p[0]=h=>c.value=!c.value)},{default:r.withCtx(()=>[r.createVNode(r.unref(fn),{name:"chevron-right",class:r.normalizeClass([{[d.$style.down]:c.value},d.$style.chevron])},null,8,["class"]),r.createTextVNode(" "+r.toDisplayString(d.label),1)]),_:1},8,["class","compact"]),p[1]||(p[1]=r.createTextVNode()),r.createVNode(Pk,null,{default:r.withCtx(()=>[c.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(d.$style.content)},[r.renderSlot(d.$slots,"default")],2)):r.createCommentVNode("",!0)]),_:3})],64))}}),Dk="_content_jmjfk_2",Ik="_separator_jmjfk_14",Fk="_chevron_jmjfk_19",Ok="_down_jmjfk_23",Lk={content:Dk,separator:Ik,chevron:Fk,down:Ok},Mk={$style:Lk},Gk=Zt(Rk,[["__cssModules",Mk]]),$k="_component_1ietr_1",zk="_local_1ietr_1",Uk="_supported_1ietr_26",Zk="_remote_1ietr_32",jk="_search_1ietr_40",Wk="_selected_1ietr_72",Hk="_breadcrumbs_1ietr_86",qk="_cat_1ietr_116",Kk="_message_1ietr_122",Xk="_isFile_1ietr_197",Yk="_isDir_1ietr_201",Jk="_canBeSelected_1ietr_207",Qk="_spin_1ietr_1",ct={component:$k,local:zk,supported:Uk,remote:Zk,search:jk,"ls-container":"_ls-container_1ietr_50","ls-head":"_ls-head_1ietr_57",selected:Wk,breadcrumbs:Hk,"ls-error":"_ls-error_1ietr_108",cat:qk,message:Kk,"ls-empty":"_ls-empty_1ietr_131","ls-body":"_ls-body_1ietr_152",isFile:Xk,isDir:Yk,canBeSelected:Jk,"ls-loader":"_ls-loader_1ietr_213","loader-icon":"_loader-icon_1ietr_221",spin:Qk};function kp(t){return t?t.map(e=>"."+Y_(e,["."])):void 0}function eS(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(i=>i!=="").join("/")});return n}const Sp=()=>({dirPath:"",search:"",storageEntry:void 0,items:[],error:"",storageOptions:[],selected:[],lastSelected:void 0,currentLoadingPath:void 0,showHiddenItems:!1});function tS(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 Ep={mounted:t=>{if(t.clientWidth<t.scrollWidth){const e=t.innerText;t.innerText=e.substring(0,57)+"..."+e.substring(e.length-10)}}},nS=["title","onClick"],rS={key:0,class:"ls-loader"},oS=["onClick"],iS=["title"],sS=["onClick"],aS=["title"],lS=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(Sp()),i=()=>{o.search="",o.error="",o.lastSelected=void 0},l=r.computed(()=>kp(n.extensions)),c=tS(o),d=r.computed(()=>{var D;return{modelValue:n.modelValue,dirPath:o.dirPath,storageHandle:(D=o.storageEntry)==null?void 0:D.handle}}),p=(D,A)=>{window.platforma&&o.currentLoadingPath!==A&&(o.currentLoadingPath=A,window.platforma.lsDriver.listFiles(D,A).then(U=>{A===o.dirPath&&(o.items=ks(U).entries.map(j=>({path:j.fullPath,name:j.name,isDir:j.type==="dir",canBeSelected:j.type==="file"&&(!l.value||l.value.some($=>j.fullPath.endsWith($))),handle:j.type==="file"?j.handle:void 0,selected:!1})).sort((j,$)=>j.isDir&&!$.isDir?-1:!j.isDir&&$.isDir?1:j.name.localeCompare($.name)).map((j,$)=>({id:$,...j})),o.lastSelected=void 0)}).catch(U=>o.error=String(U)).finally(()=>{o.currentLoadingPath=void 0}))},h=()=>{i();const{storageHandle:D,dirPath:A,modelValue:U}=d.value;D&&U&&p(D,A)},m=r.computed(()=>eS(o.dirPath)),y=r.computed(()=>o.items.filter(D=>D.canBeSelected&&D.selected&&!D.isDir)),x=r.computed(()=>{var D;return y.value.length>0&&((D=o.storageEntry)==null?void 0:D.handle)}),w=()=>{var D;return{storageHandle:ks((D=o.storageEntry)==null?void 0:D.handle),files:y.value.map(A=>A.handle)}},S=D=>{o.dirPath=D},O=(D,A)=>{const{shiftKey:U,metaKey:j}=D,{lastSelected:$}=o;if(D.preventDefault(),A.canBeSelected){if(n.multi||o.items.forEach(Z=>Z.selected=!1),A.selected=!0,!n.multi)return;!j&&!U&&o.items.forEach(Z=>{Z.id!==A.id&&(Z.selected=!1)}),U&&$!==void 0&&o.items.forEach(Z=>{j_(Z.id,$,A.id)&&(Z.selected=!0)}),A.selected&&(o.lastSelected=A.id)}},G=D=>{D&&!n.multi||o.items.filter(A=>A.canBeSelected).forEach(A=>{A.selected=D})},b=()=>G(!0),R=()=>G(!1),F=()=>{if(i(),R(),!window.platforma){console.warn("platforma API is not found");return}window.platforma.lsDriver.getStorageList().then(D=>{o.storageOptions=D.map(A=>({text:A.name,value:A})),n.autoSelectStorage&&Zr(D.find(A=>A.name==="local"||A.name.startsWith("local_disk_")&&A.initialFullPath.length>4),A=>{o.storageEntry=A})}).catch(D=>o.error=String(D))};return r.watch(r.toRef(o,"storageEntry"),D=>{i(),o.dirPath=(D==null?void 0:D.initialFullPath)??""},{immediate:!0}),r.watch([()=>o.dirPath,()=>o.storageEntry],()=>{h()}),r.watch(()=>n.modelValue,D=>{D?F():Object.assign(o,Sp())},{immediate:!0}),st(document,"keydown",D=>{n.modelValue&&D.target===document.body&&(D.metaKey&&D.code==="KeyA"&&(D.preventDefault(),b()),D.metaKey&&D.shiftKey&&D.code==="Period"&&(D.preventDefault(),o.showHiddenItems=!o.showHiddenItems),D.code==="Enter"&&n.submit())}),e({isReady:x,getFilesToImport:w}),r.onMounted(F),(D,A)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(ct).remote),onClick:r.withModifiers(R,["stop"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).search)},[r.createElementVNode("div",null,[r.createVNode(r.unref(wo),{modelValue:o.storageEntry,"onUpdate:modelValue":A[0]||(A[0]=U=>o.storageEntry=U),label:"Select storage",options:o.storageOptions},null,8,["modelValue","options"])]),A[2]||(A[2]=r.createTextVNode()),r.createElementVNode("div",null,[r.createVNode(r.unref(gp),{modelValue:o.search,"onUpdate:modelValue":A[1]||(A[1]=U=>o.search=U),label:"Search in folder",clearable:""},null,8,["modelValue"])])],2),A[12]||(A[12]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct)["ls-container"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct)["ls-head"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).breadcrumbs)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.value,(U,j)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:j},[r.createElementVNode("div",{title:U.path,onClick:$=>S(U.path)},r.toDisplayString(U.name),9,nS),A[3]||(A[3]=r.createTextVNode()),U.index!==m.value.length-1?(r.openBlock(),r.createBlock(r.unref(Co),{key:0,name:"chevron-right"})):r.createCommentVNode("",!0)],64))),128))],2),A[4]||(A[4]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).selected)},"Selected: "+r.toDisplayString(y.value.length),3)],2),A[11]||(A[11]=r.createTextVNode()),o.currentLoadingPath!==void 0?(r.openBlock(),r.createElementBlock("div",rS,A[5]||(A[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(ct)["ls-error"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).cat)},null,2),A[7]||(A[7]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).message)},r.toDisplayString(o.error),3)],2)):(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(r.unref(ct)["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(ct).isDir),onClick:j=>S(U.path)},[A[8]||(A[8]=r.createElementVNode("i",{class:"icon-16 icon-chevron-right"},null,-1)),A[9]||(A[9]=r.createTextVNode()),r.withDirectives((r.openBlock(),r.createElementBlock("span",{title:U.name},[r.createTextVNode(r.toDisplayString(U.name),1)],8,iS)),[[r.unref(Ep)]])],10,oS)):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass({[r.unref(ct).canBeSelected]:U.canBeSelected,[r.unref(ct).selected]:U.selected}),onClick:r.withModifiers(j=>O(j,U),["stop"])},[r.createElementVNode("i",{class:r.normalizeClass(["mask-16 mask-box",r.unref(ct).isFile])},null,2),A[10]||(A[10]=r.createTextVNode()),r.withDirectives((r.openBlock(),r.createElementBlock("span",{title:U.name},[r.createTextVNode(r.toDisplayString(U.name),1)],8,aS)),[[r.unref(Ep)]])],10,sS))],64))),128))],2)):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(r.unref(ct)["ls-empty"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).cat)},null,2),A[6]||(A[6]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).message)},"Select storage to preview",2)],2))],2)],2))}}),cS={key:1,class:"alert-error"},dS=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"),i=async c=>{var d,p,h;const m=(p=(d=window.platforma)==null?void 0:d.lsDriver)==null?void 0:p.fileToImportHandle;if(!m)return console.error("API platforma.lsDriver.fileToImportHandle is not available");const y=kp(e.extensions),x=await Promise.all([...((h=c.dataTransfer)==null?void 0:h.files)??[]].filter(w=>!!w).filter(w=>y?y.some(S=>w.name.endsWith(S)):!0).map(w=>m(w)));x.length&&e.importFiles({files:x})},l=async()=>{var c,d;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:h})=>{h&&e.importFiles({files:h})}).catch(h=>n.error=h):(d=window.platforma)==null||d.lsDriver.showOpenSingleFileDialog({title:"Select file to import",filters:p}).then(({file:h})=>{h&&e.importFiles({files:[h]})}).catch(h=>n.error=h)};return(c,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(ct).local),onDrop:i,onDragover:d[0]||(d[0]=r.withModifiers(()=>{},["prevent"])),onClick:l},[r.createVNode(r.unref(Ci),{name:"cloud-upload"}),d[1]||(d[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(o.value),1),d[2]||(d[2]=r.createTextVNode()),c.extensions?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(r.unref(ct).supported)},"Supported formats: "+r.toDisplayString(c.extensions.join(", ")),3)):r.createCommentVNode("",!0),d[3]||(d[3]=r.createTextVNode()),n.error?(r.openBlock(),r.createElementBlock("span",cS,r.toDisplayString(n.error),1)):r.createCommentVNode("",!0)],34))}}),uS={style:{margin:"0 24px"}},Tp=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,i=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"}],d=()=>n("update:modelValue",!1),p=r.useTemplateRef("remote"),h=()=>{var y,x;(y=p.value)!=null&&y.isReady&&(n("import:files",ks((x=p.value)==null?void 0:x.getFilesToImport())),d())},m=y=>{n("import:files",y),d()};return(y,x)=>(r.openBlock(),r.createBlock(r.unref(zl),{"no-content-gutters":!0,"close-on-outside-click":y.closeOnOutsideClick,class:r.normalizeClass(["pl-dialog-modal",r.unref(ct).component]),"model-value":y.modelValue,width:"688px",height:"720px","onUpdate:modelValue":d},r.createSlots({title:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(y.title??l.value),1)]),default:r.withCtx(()=>[x[4]||(x[4]=r.createTextVNode()),r.createElementVNode("div",uS,[r.createVNode(r.unref(dp),{modelValue:i.value,"onUpdate:modelValue":x[0]||(x[0]=w=>i.value=w),options:c},null,8,["modelValue"])]),x[5]||(x[5]=r.createTextVNode()),i.value==="remote"?(r.openBlock(),r.createBlock(lS,r.mergeProps({key:0,ref:"remote"},y.$props,{submit:h}),null,16)):r.createCommentVNode("",!0),x[6]||(x[6]=r.createTextVNode()),i.value==="local"?(r.openBlock(),r.createBlock(dS,r.mergeProps({key:1,"import-files":m},y.$props),null,16)):r.createCommentVNode("",!0),x[7]||(x[7]=r.createTextVNode())]),_:2},[i.value==="remote"?{name:"actions",fn:r.withCtx(()=>{var w;return[r.createVNode(r.unref(Ns),{style:{"min-width":"160px"},disabled:!((w=r.unref(p))!=null&&w.isReady),onClick:r.withModifiers(h,["stop"])},{default:r.withCtx(()=>x[1]||(x[1]=[r.createTextVNode("Import")])),_:1},8,["disabled"]),x[3]||(x[3]=r.createTextVNode()),r.createVNode(r.unref(_o),{"justify-center":!1,onClick:r.withModifiers(d,["stop"])},{default:r.withCtx(()=>x[2]||(x[2]=[r.createTextVNode("Cancel")])),_:1})]}),key:"0"}:void 0]),1032,["close-on-outside-click","class","model-value"]))}});var $e;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const l={};for(const c of i)l[c]=c;return l},t.getValidEnumValues=i=>{const l=t.objectKeys(i).filter(d=>typeof i[i[d]]!="number"),c={};for(const d of l)c[d]=i[d];return t.objectValues(c)},t.objectValues=i=>t.objectKeys(i).map(function(l){return i[l]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const l=[];for(const c in i)Object.prototype.hasOwnProperty.call(i,c)&&l.push(c);return l},t.find=(i,l)=>{for(const c of i)if(l(c))return c},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function o(i,l=" | "){return i.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}t.joinValues=o,t.jsonStringifyReplacer=(i,l)=>typeof l=="bigint"?l.toString():l})($e||($e={}));var Ul;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Ul||(Ul={}));const le=$e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),_r=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}},te=$e.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"]),pS=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class jt 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:[]},i=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(i);else if(c.code==="invalid_return_type")i(c.returnTypeError);else if(c.code==="invalid_arguments")i(c.argumentsError);else if(c.path.length===0)o._errors.push(n(c));else{let d=o,p=0;for(;p<c.path.length;){const h=c.path[p];p===c.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(c))):d[h]=d[h]||{_errors:[]},d=d[h],p++}}};return i(this),o}static assert(e){if(!(e instanceof jt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,$e.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},o=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):o.push(e(i));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}jt.create=t=>new jt(t);const xo=(t,e)=>{let n;switch(t.code){case te.invalid_type:t.received===le.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case te.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,$e.jsonStringifyReplacer)}`;break;case te.unrecognized_keys:n=`Unrecognized key(s) in object: ${$e.joinValues(t.keys,", ")}`;break;case te.invalid_union:n="Invalid input";break;case te.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${$e.joinValues(t.options)}`;break;case te.invalid_enum_value:n=`Invalid enum value. Expected ${$e.joinValues(t.options)}, received '${t.received}'`;break;case te.invalid_arguments:n="Invalid function arguments";break;case te.invalid_return_type:n="Invalid function return type";break;case te.invalid_date:n="Invalid date";break;case te.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}"`:$e.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case te.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 te.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 te.custom:n="Invalid input";break;case te.invalid_intersection_types:n="Intersection results could not be merged";break;case te.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case te.not_finite:n="Number must be finite";break;default:n=e.defaultError,$e.assertNever(t)}return{message:n}};let Np=xo;function hS(t){Np=t}function Ps(){return Np}const Rs=t=>{const{data:e,path:n,errorMaps:o,issueData:i}=t,l=[...n,...i.path||[]],c={...i,path:l};if(i.message!==void 0)return{...i,path:l,message:i.message};let d="";const p=o.filter(h=>!!h).slice().reverse();for(const h of p)d=h(c,{data:e,defaultError:d}).message;return{...i,path:l,message:d}},fS=[];function se(t,e){const n=Ps(),o=Rs({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===xo?void 0:xo].filter(i=>!!i)});t.common.issues.push(o)}class kt{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 i of n){if(i.status==="aborted")return xe;i.status==="dirty"&&e.dirty(),o.push(i.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,n){const o=[];for(const i of n){const l=await i.key,c=await i.value;o.push({key:l,value:c})}return kt.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const i of n){const{key:l,value:c}=i;if(l.status==="aborted"||c.status==="aborted")return xe;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||i.alwaysSet)&&(o[l.value]=c.value)}return{status:e.value,value:o}}}const xe=Object.freeze({status:"aborted"}),Ds=t=>({status:"dirty",value:t}),Vt=t=>({status:"valid",value:t}),Zl=t=>t.status==="aborted",jl=t=>t.status==="dirty",bi=t=>t.status==="valid",xi=t=>typeof Promise<"u"&&t instanceof Promise;function Is(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 Ap(t,e,n,o,i){if(typeof e=="function"?t!==e||!i:!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 me;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(me||(me={}));var ki,Si;class Mn{constructor(e,n,o,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=o,this._key=i}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 Vp=(t,e)=>{if(bi(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 jt(t.common.issues);return this._error=n,this._error}}};function Ve(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:i}=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:i}:{errorMap:(l,c)=>{var d,p;const{message:h}=t;return l.code==="invalid_enum_value"?{message:h??c.defaultError}:typeof c.data>"u"?{message:(d=h??o)!==null&&d!==void 0?d:c.defaultError}:l.code!=="invalid_type"?{message:c.defaultError}:{message:(p=h??n)!==null&&p!==void 0?p:c.defaultError}},description:i}}class Re{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 _r(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:_r(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new kt,ctx:{common:e.parent.common,data:e.data,parsedType:_r(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(xi(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 i={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:_r(e)},l=this._parseSync({data:e,path:i.path,parent:i});return Vp(i,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:_r(e)},i=this._parse({data:e,path:o.path,parent:o}),l=await(xi(i)?i:Promise.resolve(i));return Vp(o,l)}refine(e,n){const o=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,l)=>{const c=e(i),d=()=>l.addIssue({code:te.custom,...o(i)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(d(),!1)):c?!0:(d(),!1)})}refinement(e,n){return this._refinement((o,i)=>e(o)?!0:(i.addIssue(typeof n=="function"?n(o,i):n),!1))}_refinement(e){return new yn({schema:this,typeName:we.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return $n.create(this,this._def)}nullable(){return kr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return gn.create(this,this._def)}promise(){return To.create(this,this._def)}or(e){return Ai.create([this,e],this._def)}and(e){return Vi.create(this,e,this._def)}transform(e){return new yn({...Ve(this._def),schema:this,typeName:we.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new Ii({...Ve(this._def),innerType:this,defaultValue:n,typeName:we.ZodDefault})}brand(){return new ql({typeName:we.ZodBranded,type:this,...Ve(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Fi({...Ve(this._def),innerType:this,catchValue:n,typeName:we.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Oi.create(this,e)}readonly(){return Li.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const mS=/^c[^\s-]{8,}$/i,gS=/^[0-9a-z]+$/,yS=/^[0-9A-HJKMNP-TV-Z]{26}$/,vS=/^[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,_S=/^[a-z0-9_-]{21}$/i,CS=/^[-+]?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)?)??$/,wS=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,bS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Wl;const xS=/^(?:(?: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])$/,kS=/^(([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})))$/,SS=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Bp="((\\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])))",ES=new RegExp(`^${Bp}$`);function Pp(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 TS(t){return new RegExp(`^${Pp(t)}$`)}function Rp(t){let e=`${Bp}T${Pp(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 NS(t,e){return!!((e==="v4"||!e)&&xS.test(t)||(e==="v6"||!e)&&kS.test(t))}class mn extends Re{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==le.string){const i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_type,expected:le.string,received:i.parsedType}),xe}const n=new kt;let o;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:te.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:te.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const l=e.data.length>i.value,c=e.data.length<i.value;(l||c)&&(o=this._getOrReturnCtx(e,o),l?se(o,{code:te.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&se(o,{code:te.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")wS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"email",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Wl||(Wl=new RegExp(bS,"u")),Wl.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"emoji",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")vS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"uuid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")_S.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"nanoid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")mS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"cuid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")gS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"cuid2",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")yS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"ulid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),se(o,{validation:"url",code:te.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"regex",code:te.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Rp(i).test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?ES.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?TS(i).test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?CS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"duration",code:te.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?NS(e.data,i.version)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"ip",code:te.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?SS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"base64",code:te.invalid_string,message:i.message}),n.dirty()):$e.assertNever(i);return{status:n.value,value:e.data}}_regex(e,n,o){return this.refinement(i=>e.test(i),{validation:n,code:te.invalid_string,...me.errToObj(o)})}_addCheck(e){return new mn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...me.errToObj(e)})}url(e){return this._addCheck({kind:"url",...me.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...me.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...me.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...me.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...me.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...me.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...me.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...me.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...me.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,...me.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,...me.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...me.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...me.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...me.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...me.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...me.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...me.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...me.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...me.errToObj(n)})}nonempty(e){return this.min(1,me.errToObj(e))}trim(){return new mn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new mn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new mn({...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}}mn.create=t=>{var e;return new mn({checks:[],typeName:we.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ve(t)})};function AS(t,e){const n=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,i=n>o?n:o,l=parseInt(t.toFixed(i).replace(".","")),c=parseInt(e.toFixed(i).replace(".",""));return l%c/Math.pow(10,i)}class Cr extends Re{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 i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_type,expected:le.number,received:i.parsedType}),xe}let n;const o=new kt;for(const i of this._def.checks)i.kind==="int"?$e.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:te.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?AS(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:te.not_finite,message:i.message}),o.dirty()):$e.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,me.toString(n))}gt(e,n){return this.setLimit("min",e,!1,me.toString(n))}lte(e,n){return this.setLimit("max",e,!0,me.toString(n))}lt(e,n){return this.setLimit("max",e,!1,me.toString(n))}setLimit(e,n,o,i){return new Cr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:me.toString(i)}]})}_addCheck(e){return new Cr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:me.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:me.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:me.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:me.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:me.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:me.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:me.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:me.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:me.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"&&$e.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)}}Cr.create=t=>new Cr({checks:[],typeName:we.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ve(t)});class wr extends Re{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 i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_type,expected:le.bigint,received:i.parsedType}),xe}let n;const o=new kt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):$e.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,me.toString(n))}gt(e,n){return this.setLimit("min",e,!1,me.toString(n))}lte(e,n){return this.setLimit("max",e,!0,me.toString(n))}lt(e,n){return this.setLimit("max",e,!1,me.toString(n))}setLimit(e,n,o,i){return new wr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:me.toString(i)}]})}_addCheck(e){return new wr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:me.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:me.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:me.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:me.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:me.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}}wr.create=t=>{var e;return new wr({checks:[],typeName:we.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ve(t)})};class Ei extends Re{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==le.boolean){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.boolean,received:n.parsedType}),xe}return Vt(e.data)}}Ei.create=t=>new Ei({typeName:we.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ve(t)});class Wr extends Re{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==le.date){const i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_type,expected:le.date,received:i.parsedType}),xe}if(isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_date}),xe}const n=new kt;let o;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:te.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:te.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):$e.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Wr({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:me.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:me.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}}Wr.create=t=>new Wr({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:we.ZodDate,...Ve(t)});class Fs extends Re{_parse(e){if(this._getType(e)!==le.symbol){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.symbol,received:n.parsedType}),xe}return Vt(e.data)}}Fs.create=t=>new Fs({typeName:we.ZodSymbol,...Ve(t)});class Ti extends Re{_parse(e){if(this._getType(e)!==le.undefined){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.undefined,received:n.parsedType}),xe}return Vt(e.data)}}Ti.create=t=>new Ti({typeName:we.ZodUndefined,...Ve(t)});class Ni extends Re{_parse(e){if(this._getType(e)!==le.null){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.null,received:n.parsedType}),xe}return Vt(e.data)}}Ni.create=t=>new Ni({typeName:we.ZodNull,...Ve(t)});class ko extends Re{constructor(){super(...arguments),this._any=!0}_parse(e){return Vt(e.data)}}ko.create=t=>new ko({typeName:we.ZodAny,...Ve(t)});class Hr extends Re{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Vt(e.data)}}Hr.create=t=>new Hr({typeName:we.ZodUnknown,...Ve(t)});class Yn extends Re{_parse(e){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.never,received:n.parsedType}),xe}}Yn.create=t=>new Yn({typeName:we.ZodNever,...Ve(t)});class Os extends Re{_parse(e){if(this._getType(e)!==le.undefined){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.void,received:n.parsedType}),xe}return Vt(e.data)}}Os.create=t=>new Os({typeName:we.ZodVoid,...Ve(t)});class gn extends Re{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),i=this._def;if(n.parsedType!==le.array)return se(n,{code:te.invalid_type,expected:le.array,received:n.parsedType}),xe;if(i.exactLength!==null){const c=n.data.length>i.exactLength.value,d=n.data.length<i.exactLength.value;(c||d)&&(se(n,{code:c?te.too_big:te.too_small,minimum:d?i.exactLength.value:void 0,maximum:c?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),o.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(se(n,{code:te.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),o.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(se(n,{code:te.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((c,d)=>i.type._parseAsync(new Mn(n,c,n.path,d)))).then(c=>kt.mergeArray(o,c));const l=[...n.data].map((c,d)=>i.type._parseSync(new Mn(n,c,n.path,d)));return kt.mergeArray(o,l)}get element(){return this._def.type}min(e,n){return new gn({...this._def,minLength:{value:e,message:me.toString(n)}})}max(e,n){return new gn({...this._def,maxLength:{value:e,message:me.toString(n)}})}length(e,n){return new gn({...this._def,exactLength:{value:e,message:me.toString(n)}})}nonempty(e){return this.min(1,e)}}gn.create=(t,e)=>new gn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:we.ZodArray,...Ve(e)});function So(t){if(t instanceof rt){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=$n.create(So(o))}return new rt({...t._def,shape:()=>e})}else return t instanceof gn?new gn({...t._def,type:So(t.element)}):t instanceof $n?$n.create(So(t.unwrap())):t instanceof kr?kr.create(So(t.unwrap())):t instanceof Gn?Gn.create(t.items.map(e=>So(e))):t}class rt extends Re{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=$e.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:te.invalid_type,expected:le.object,received:p.parsedType}),xe}const{status:n,ctx:o}=this._processInputParams(e),{shape:i,keys:l}=this._getCached(),c=[];if(!(this._def.catchall instanceof Yn&&this._def.unknownKeys==="strip"))for(const p in o.data)l.includes(p)||c.push(p);const d=[];for(const p of l){const h=i[p],m=o.data[p];d.push({key:{status:"valid",value:p},value:h._parse(new Mn(o,m,o.path,p)),alwaysSet:p in o.data})}if(this._def.catchall instanceof Yn){const p=this._def.unknownKeys;if(p==="passthrough")for(const h of c)d.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(p==="strict")c.length>0&&(se(o,{code:te.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 h of c){const m=o.data[h];d.push({key:{status:"valid",value:h},value:p._parse(new Mn(o,m,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const p=[];for(const h of d){const m=await h.key,y=await h.value;p.push({key:m,value:y,alwaysSet:h.alwaysSet})}return p}).then(p=>kt.mergeObjectSync(n,p)):kt.mergeObjectSync(n,d)}get shape(){return this._def.shape()}strict(e){return me.errToObj,new rt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,o)=>{var i,l,c,d;const p=(c=(l=(i=this._def).errorMap)===null||l===void 0?void 0:l.call(i,n,o).message)!==null&&c!==void 0?c:o.defaultError;return n.code==="unrecognized_keys"?{message:(d=me.errToObj(e).message)!==null&&d!==void 0?d:p}:{message:p}}}:{}})}strip(){return new rt({...this._def,unknownKeys:"strip"})}passthrough(){return new rt({...this._def,unknownKeys:"passthrough"})}extend(e){return new rt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new rt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:we.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new rt({...this._def,catchall:e})}pick(e){const n={};return $e.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(n[o]=this.shape[o])}),new rt({...this._def,shape:()=>n})}omit(e){const n={};return $e.objectKeys(this.shape).forEach(o=>{e[o]||(n[o]=this.shape[o])}),new rt({...this._def,shape:()=>n})}deepPartial(){return So(this)}partial(e){const n={};return $e.objectKeys(this.shape).forEach(o=>{const i=this.shape[o];e&&!e[o]?n[o]=i:n[o]=i.optional()}),new rt({...this._def,shape:()=>n})}required(e){const n={};return $e.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])n[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof $n;)i=i._def.innerType;n[o]=i}}),new rt({...this._def,shape:()=>n})}keyof(){return Dp($e.objectKeys(this.shape))}}rt.create=(t,e)=>new rt({shape:()=>t,unknownKeys:"strip",catchall:Yn.create(),typeName:we.ZodObject,...Ve(e)}),rt.strictCreate=(t,e)=>new rt({shape:()=>t,unknownKeys:"strict",catchall:Yn.create(),typeName:we.ZodObject,...Ve(e)}),rt.lazycreate=(t,e)=>new rt({shape:t,unknownKeys:"strip",catchall:Yn.create(),typeName:we.ZodObject,...Ve(e)});class Ai extends Re{_parse(e){const{ctx:n}=this._processInputParams(e),o=this._def.options;function i(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const c=l.map(d=>new jt(d.ctx.common.issues));return se(n,{code:te.invalid_union,unionErrors:c}),xe}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(i);{let l;const c=[];for(const p of o){const h={...n,common:{...n.common,issues:[]},parent:null},m=p._parseSync({data:n.data,path:n.path,parent:h});if(m.status==="valid")return m;m.status==="dirty"&&!l&&(l={result:m,ctx:h}),h.common.issues.length&&c.push(h.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const d=c.map(p=>new jt(p));return se(n,{code:te.invalid_union,unionErrors:d}),xe}}get options(){return this._def.options}}Ai.create=(t,e)=>new Ai({options:t,typeName:we.ZodUnion,...Ve(e)});const br=t=>t instanceof Pi?br(t.schema):t instanceof yn?br(t.innerType()):t instanceof Ri?[t.value]:t instanceof xr?t.options:t instanceof Di?$e.objectValues(t.enum):t instanceof Ii?br(t._def.innerType):t instanceof Ti?[void 0]:t instanceof Ni?[null]:t instanceof $n?[void 0,...br(t.unwrap())]:t instanceof kr?[null,...br(t.unwrap())]:t instanceof ql||t instanceof Li?br(t.unwrap()):t instanceof Fi?br(t._def.innerType):[];class Ls extends Re{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.object)return se(n,{code:te.invalid_type,expected:le.object,received:n.parsedType}),xe;const o=this.discriminator,i=n.data[o],l=this.optionsMap.get(i);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:te.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),xe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,o){const i=new Map;for(const l of n){const c=br(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 d of c){if(i.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);i.set(d,l)}}return new Ls({typeName:we.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Ve(o)})}}function Hl(t,e){const n=_r(t),o=_r(e);if(t===e)return{valid:!0,data:t};if(n===le.object&&o===le.object){const i=$e.objectKeys(e),l=$e.objectKeys(t).filter(d=>i.indexOf(d)!==-1),c={...t,...e};for(const d of l){const p=Hl(t[d],e[d]);if(!p.valid)return{valid:!1};c[d]=p.data}return{valid:!0,data:c}}else if(n===le.array&&o===le.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let l=0;l<t.length;l++){const c=t[l],d=e[l],p=Hl(c,d);if(!p.valid)return{valid:!1};i.push(p.data)}return{valid:!0,data:i}}else return n===le.date&&o===le.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Vi extends Re{_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=(l,c)=>{if(Zl(l)||Zl(c))return xe;const d=Hl(l.value,c.value);return d.valid?((jl(l)||jl(c))&&n.dirty(),{status:n.value,value:d.data}):(se(o,{code:te.invalid_intersection_types}),xe)};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])=>i(l,c)):i(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}Vi.create=(t,e,n)=>new Vi({left:t,right:e,typeName:we.ZodIntersection,...Ve(n)});class Gn extends Re{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.array)return se(o,{code:te.invalid_type,expected:le.array,received:o.parsedType}),xe;if(o.data.length<this._def.items.length)return se(o,{code:te.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xe;!this._def.rest&&o.data.length>this._def.items.length&&(se(o,{code:te.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...o.data].map((l,c)=>{const d=this._def.items[c]||this._def.rest;return d?d._parse(new Mn(o,l,o.path,c)):null}).filter(l=>!!l);return o.common.async?Promise.all(i).then(l=>kt.mergeArray(n,l)):kt.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new Gn({...this._def,rest:e})}}Gn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gn({items:t,typeName:we.ZodTuple,rest:null,...Ve(e)})};class Bi extends Re{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:te.invalid_type,expected:le.object,received:o.parsedType}),xe;const i=[],l=this._def.keyType,c=this._def.valueType;for(const d in o.data)i.push({key:l._parse(new Mn(o,d,o.path,d)),value:c._parse(new Mn(o,o.data[d],o.path,d)),alwaysSet:d in o.data});return o.common.async?kt.mergeObjectAsync(n,i):kt.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,o){return n instanceof Re?new Bi({keyType:e,valueType:n,typeName:we.ZodRecord,...Ve(o)}):new Bi({keyType:mn.create(),valueType:e,typeName:we.ZodRecord,...Ve(n)})}}class Ms extends Re{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:te.invalid_type,expected:le.map,received:o.parsedType}),xe;const i=this._def.keyType,l=this._def.valueType,c=[...o.data.entries()].map(([d,p],h)=>({key:i._parse(new Mn(o,d,o.path,[h,"key"])),value:l._parse(new Mn(o,p,o.path,[h,"value"]))}));if(o.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const p of c){const h=await p.key,m=await p.value;if(h.status==="aborted"||m.status==="aborted")return xe;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const p of c){const h=p.key,m=p.value;if(h.status==="aborted"||m.status==="aborted")return xe;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}}}}Ms.create=(t,e,n)=>new Ms({valueType:e,keyType:t,typeName:we.ZodMap,...Ve(n)});class qr extends Re{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.set)return se(o,{code:te.invalid_type,expected:le.set,received:o.parsedType}),xe;const i=this._def;i.minSize!==null&&o.data.size<i.minSize.value&&(se(o,{code:te.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&o.data.size>i.maxSize.value&&(se(o,{code:te.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const l=this._def.valueType;function c(p){const h=new Set;for(const m of p){if(m.status==="aborted")return xe;m.status==="dirty"&&n.dirty(),h.add(m.value)}return{status:n.value,value:h}}const d=[...o.data.values()].map((p,h)=>l._parse(new Mn(o,p,o.path,h)));return o.common.async?Promise.all(d).then(p=>c(p)):c(d)}min(e,n){return new qr({...this._def,minSize:{value:e,message:me.toString(n)}})}max(e,n){return new qr({...this._def,maxSize:{value:e,message:me.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}qr.create=(t,e)=>new qr({valueType:t,minSize:null,maxSize:null,typeName:we.ZodSet,...Ve(e)});class Eo extends Re{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.function)return se(n,{code:te.invalid_type,expected:le.function,received:n.parsedType}),xe;function o(d,p){return Rs({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ps(),xo].filter(h=>!!h),issueData:{code:te.invalid_arguments,argumentsError:p}})}function i(d,p){return Rs({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ps(),xo].filter(h=>!!h),issueData:{code:te.invalid_return_type,returnTypeError:p}})}const l={errorMap:n.common.contextualErrorMap},c=n.data;if(this._def.returns instanceof To){const d=this;return Vt(async function(...p){const h=new jt([]),m=await d._def.args.parseAsync(p,l).catch(x=>{throw h.addIssue(o(p,x)),h}),y=await Reflect.apply(c,this,m);return await d._def.returns._def.type.parseAsync(y,l).catch(x=>{throw h.addIssue(i(y,x)),h})})}else{const d=this;return Vt(function(...p){const h=d._def.args.safeParse(p,l);if(!h.success)throw new jt([o(p,h.error)]);const m=Reflect.apply(c,this,h.data),y=d._def.returns.safeParse(m,l);if(!y.success)throw new jt([i(m,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Eo({...this._def,args:Gn.create(e).rest(Hr.create())})}returns(e){return new Eo({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,o){return new Eo({args:e||Gn.create([]).rest(Hr.create()),returns:n||Hr.create(),typeName:we.ZodFunction,...Ve(o)})}}class Pi extends Re{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})}}Pi.create=(t,e)=>new Pi({getter:t,typeName:we.ZodLazy,...Ve(e)});class Ri extends Re{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return se(n,{received:n.data,code:te.invalid_literal,expected:this._def.value}),xe}return{status:"valid",value:e.data}}get value(){return this._def.value}}Ri.create=(t,e)=>new Ri({value:t,typeName:we.ZodLiteral,...Ve(e)});function Dp(t,e){return new xr({values:t,typeName:we.ZodEnum,...Ve(e)})}class xr extends Re{constructor(){super(...arguments),ki.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),o=this._def.values;return se(n,{expected:$e.joinValues(o),received:n.parsedType,code:te.invalid_type}),xe}if(Is(this,ki)||Ap(this,ki,new Set(this._def.values)),!Is(this,ki).has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return se(n,{received:n.data,code:te.invalid_enum_value,options:o}),xe}return Vt(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 xr.create(e,{...this._def,...n})}exclude(e,n=this._def){return xr.create(this.options.filter(o=>!e.includes(o)),{...this._def,...n})}}ki=new WeakMap,xr.create=Dp;class Di extends Re{constructor(){super(...arguments),Si.set(this,void 0)}_parse(e){const n=$e.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==le.string&&o.parsedType!==le.number){const i=$e.objectValues(n);return se(o,{expected:$e.joinValues(i),received:o.parsedType,code:te.invalid_type}),xe}if(Is(this,Si)||Ap(this,Si,new Set($e.getValidEnumValues(this._def.values))),!Is(this,Si).has(e.data)){const i=$e.objectValues(n);return se(o,{received:o.data,code:te.invalid_enum_value,options:i}),xe}return Vt(e.data)}get enum(){return this._def.values}}Si=new WeakMap,Di.create=(t,e)=>new Di({values:t,typeName:we.ZodNativeEnum,...Ve(e)});class To extends Re{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:te.invalid_type,expected:le.promise,received:n.parsedType}),xe;const o=n.parsedType===le.promise?n.data:Promise.resolve(n.data);return Vt(o.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}To.create=(t,e)=>new To({type:t,typeName:we.ZodPromise,...Ve(e)});class yn extends Re{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===we.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=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),i.type==="preprocess"){const c=i.transform(o.data,l);if(o.common.async)return Promise.resolve(c).then(async d=>{if(n.value==="aborted")return xe;const p=await this._def.schema._parseAsync({data:d,path:o.path,parent:o});return p.status==="aborted"?xe:p.status==="dirty"||n.value==="dirty"?Ds(p.value):p});{if(n.value==="aborted")return xe;const d=this._def.schema._parseSync({data:c,path:o.path,parent:o});return d.status==="aborted"?xe:d.status==="dirty"||n.value==="dirty"?Ds(d.value):d}}if(i.type==="refinement"){const c=d=>{const p=i.refinement(d,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 d};if(o.common.async===!1){const d=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return d.status==="aborted"?xe:(d.status==="dirty"&&n.dirty(),c(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(d=>d.status==="aborted"?xe:(d.status==="dirty"&&n.dirty(),c(d.value).then(()=>({status:n.value,value:d.value}))))}if(i.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!bi(c))return c;const d=i.transform(c.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>bi(c)?Promise.resolve(i.transform(c.value,l)).then(d=>({status:n.value,value:d})):c);$e.assertNever(i)}}yn.create=(t,e,n)=>new yn({schema:t,typeName:we.ZodEffects,effect:e,...Ve(n)}),yn.createWithPreprocess=(t,e,n)=>new yn({schema:e,effect:{type:"preprocess",transform:t},typeName:we.ZodEffects,...Ve(n)});class $n extends Re{_parse(e){return this._getType(e)===le.undefined?Vt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}$n.create=(t,e)=>new $n({innerType:t,typeName:we.ZodOptional,...Ve(e)});class kr extends Re{_parse(e){return this._getType(e)===le.null?Vt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}kr.create=(t,e)=>new kr({innerType:t,typeName:we.ZodNullable,...Ve(e)});class Ii extends Re{_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}}Ii.create=(t,e)=>new Ii({innerType:t,typeName:we.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ve(e)});class Fi extends Re{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return xi(i)?i.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new jt(o.common.issues)},input:o.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new jt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}Fi.create=(t,e)=>new Fi({innerType:t,typeName:we.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ve(e)});class Gs extends Re{_parse(e){if(this._getType(e)!==le.nan){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.nan,received:n.parsedType}),xe}return{status:"valid",value:e.data}}}Gs.create=t=>new Gs({typeName:we.ZodNaN,...Ve(t)});const VS=Symbol("zod_brand");class ql extends Re{_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 Oi extends Re{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?xe:i.status==="dirty"?(n.dirty(),Ds(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{const i=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?xe:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:o.path,parent:o})}}static create(e,n){return new Oi({in:e,out:n,typeName:we.ZodPipeline})}}class Li extends Re{_parse(e){const n=this._def.innerType._parse(e),o=i=>(bi(i)&&(i.value=Object.freeze(i.value)),i);return xi(n)?n.then(i=>o(i)):o(n)}unwrap(){return this._def.innerType}}Li.create=(t,e)=>new Li({innerType:t,typeName:we.ZodReadonly,...Ve(e)});function Ip(t,e={},n){return t?ko.create().superRefine((o,i)=>{var l,c;if(!t(o)){const d=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,p=(c=(l=d.fatal)!==null&&l!==void 0?l:n)!==null&&c!==void 0?c:!0,h=typeof d=="string"?{message:d}:d;i.addIssue({code:"custom",...h,fatal:p})}}):ko.create()}const BS={object:rt.lazycreate};var we;(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"})(we||(we={}));const PS=(t,e={message:`Input not instance of ${t.name}`})=>Ip(n=>n instanceof t,e),Fp=mn.create,Op=Cr.create,RS=Gs.create,DS=wr.create,Lp=Ei.create,IS=Wr.create,FS=Fs.create,OS=Ti.create,LS=Ni.create,MS=ko.create,GS=Hr.create,$S=Yn.create,zS=Os.create,US=gn.create,ZS=rt.create,jS=rt.strictCreate,WS=Ai.create,HS=Ls.create,qS=Vi.create,KS=Gn.create,XS=Bi.create,YS=Ms.create,JS=qr.create,QS=Eo.create,eE=Pi.create,tE=Ri.create,nE=xr.create,rE=Di.create,oE=To.create,Mp=yn.create,iE=$n.create,sE=kr.create,aE=yn.createWithPreprocess,lE=Oi.create;var zn=Object.freeze({__proto__:null,defaultErrorMap:xo,setErrorMap:hS,getErrorMap:Ps,makeIssue:Rs,EMPTY_PATH:fS,addIssueToContext:se,ParseStatus:kt,INVALID:xe,DIRTY:Ds,OK:Vt,isAborted:Zl,isDirty:jl,isValid:bi,isAsync:xi,get util(){return $e},get objectUtil(){return Ul},ZodParsedType:le,getParsedType:_r,ZodType:Re,datetimeRegex:Rp,ZodString:mn,ZodNumber:Cr,ZodBigInt:wr,ZodBoolean:Ei,ZodDate:Wr,ZodSymbol:Fs,ZodUndefined:Ti,ZodNull:Ni,ZodAny:ko,ZodUnknown:Hr,ZodNever:Yn,ZodVoid:Os,ZodArray:gn,ZodObject:rt,ZodUnion:Ai,ZodDiscriminatedUnion:Ls,ZodIntersection:Vi,ZodTuple:Gn,ZodRecord:Bi,ZodMap:Ms,ZodSet:qr,ZodFunction:Eo,ZodLazy:Pi,ZodLiteral:Ri,ZodEnum:xr,ZodNativeEnum:Di,ZodPromise:To,ZodEffects:yn,ZodTransformer:yn,ZodOptional:$n,ZodNullable:kr,ZodDefault:Ii,ZodCatch:Fi,ZodNaN:Gs,BRAND:VS,ZodBranded:ql,ZodPipeline:Oi,ZodReadonly:Li,custom:Ip,Schema:Re,ZodSchema:Re,late:BS,get ZodFirstPartyTypeKind(){return we},coerce:{string:t=>mn.create({...t,coerce:!0}),number:t=>Cr.create({...t,coerce:!0}),boolean:t=>Ei.create({...t,coerce:!0}),bigint:t=>wr.create({...t,coerce:!0}),date:t=>Wr.create({...t,coerce:!0})},any:MS,array:US,bigint:DS,boolean:Lp,date:IS,discriminatedUnion:HS,effect:Mp,enum:nE,function:QS,instanceof:PS,intersection:qS,lazy:eE,literal:tE,map:YS,nan:RS,nativeEnum:rE,never:$S,null:LS,nullable:sE,number:Op,object:ZS,oboolean:()=>Lp().optional(),onumber:()=>Op().optional(),optional:iE,ostring:()=>Fp().optional(),pipeline:lE,preprocess:aE,promise:oE,record:XS,set:JS,strictObject:jS,string:Fp,symbol:FS,transformer:Mp,tuple:KS,undefined:OS,union:WS,unknown:GS,void:zS,NEVER:xe,ZodIssueCode:te,quotelessJson:pS,ZodError:jt});function cE(t){throw new Error("Unexpected object: "+t)}const Gp="upload://upload/",$p="index://index/";function dE(t){return t.startsWith(Gp)}function uE(t){return t.startsWith($p)}function zp(t){if(uE(t)){const e=t.slice($p.length);return JSON.parse(decodeURIComponent(e)).path}else if(dE(t)){const e=t.slice(Gp.length);return JSON.parse(decodeURIComponent(e)).localPath}cE(t)}function pE(t){return t.replace(/^.*[\\/]/,"")}function hE(t){return pE(zp(t))}zn.object({__isRef:zn.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:zn.string().describe("Upstream block id"),name:zn.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 fE=zn.object({type:zn.string(),importance:zn.number().optional(),id:zn.string().optional(),label:zn.string()});zn.array(fE);const mE={key:0,ref:"label"},gE={key:0,class:"required-icon"},yE=["data-placeholder"],vE={key:5,class:"pl-file-input__stats"},_E={key:0,class:"pl-file-input__error"},CE={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(),i=e,l=t,c=(F,D)=>{if(F)try{return D(F)}catch(A){return n.error=A instanceof Error?A.message:String(A),F}},d=r.computed(()=>c(l.modelValue,hE)),p=r.computed(()=>c(l.modelValue,zp)),h=r.computed(()=>l.progress&&!l.progress.done),m=r.computed(()=>l.progress&&l.progress.done),y=r.computed(()=>n.error??l.error),x=r.computed(()=>!!y.value),w=r.computed(()=>{const{status:F,done:D}=l.progress??{};return!F||!F.bytesTotal?"":F.bytesProcessed&&!D?xl(F.bytesProcessed,{})+" / "+xl(F.bytesTotal,{}):xl(F.bytesTotal,{})}),S=r.computed(()=>{var F;const{progress:D}=l;return D?{width:D.done?"100%":Math.round((((F=D.status)==null?void 0:F.progress)??0)*100)+"%"}:{}}),O=()=>{n.fileDialogOpen=!0},G=F=>{F.files.length&&i("update:modelValue",F.files[0])},b=()=>i("update:modelValue",void 0);r.watch(()=>l.modelValue,()=>{n.error=""},{immediate:!0});const R=r.ref();return l.cellStyle||Xn(R),(F,D)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",{class:r.normalizeClass([{"pl-file-input__cell-style":!!F.cellStyle,"has-file":!!d.value},"pl-file-input__envelope"])},[r.createElementVNode("div",{ref_key:"rootRef",ref:R,class:r.normalizeClass(["pl-file-input",{dashed:F.dashed,error:x.value}]),tabindex:"0",onKeyup:r.withKeys(O,["enter"]),onClick:r.withModifiers(O,["stop"])},[r.createElementVNode("div",{class:"pl-file-input__progress",style:r.normalizeStyle(S.value)},null,4),D[3]||(D[3]=r.createTextVNode()),!F.cellStyle&&F.label?(r.openBlock(),r.createElementBlock("label",mE,[F.required?(r.openBlock(),r.createElementBlock("i",gE)):r.createCommentVNode("",!0),D[1]||(D[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(F.label),1),D[2]||(D[2]=r.createTextVNode()),r.unref(o).tooltip||p.value?(r.openBlock(),r.createBlock(r.unref(xt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.unref(o).tooltip?r.renderSlot(F.$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),D[4]||(D[4]=r.createTextVNode()),x.value?(r.openBlock(),r.createBlock(r.unref(Lt),{key:1,name:"restart"})):h.value?(r.openBlock(),r.createBlock(r.unref(Lt),{key:2,name:"cloud-upload"})):m.value?(r.openBlock(),r.createBlock(r.unref(Lt),{key:3,name:"success"})):(r.openBlock(),r.createBlock(r.unref(Lt),{key:4,name:"paper-clip"})),D[5]||(D[5]=r.createTextVNode()),r.createElementVNode("div",{"data-placeholder":F.placeholder??"Choose file",class:"pl-file-input__filename"},r.toDisplayString(d.value),9,yE),D[6]||(D[6]=r.createTextVNode()),w.value?(r.openBlock(),r.createElementBlock("div",vE,r.toDisplayString(w.value),1)):r.createCommentVNode("",!0),D[7]||(D[7]=r.createTextVNode()),F.modelValue?(r.openBlock(),r.createBlock(r.unref(Lt),{key:6,name:"close",onClick:r.withModifiers(b,["stop"])})):r.createCommentVNode("",!0),D[8]||(D[8]=r.createTextVNode()),r.createVNode(vr,{class:"pl-file-input__contour"})],34),D[9]||(D[9]=r.createTextVNode()),x.value?(r.openBlock(),r.createElementBlock("div",_E,r.toDisplayString(y.value),1)):F.helper?(r.openBlock(),r.createElementBlock("div",CE,r.toDisplayString(F.helper),1)):r.createCommentVNode("",!0)],2),D[10]||(D[10]=r.createTextVNode()),r.createVNode(r.unref(Tp),{modelValue:n.fileDialogOpen,"onUpdate:modelValue":D[0]||(D[0]=A=>n.fileDialogOpen=A),extensions:F.extensions,title:F.fileDialogTitle,"close-on-outside-click":F.fileDialogCloseOnOutsideClick,"onImport:files":G},null,8,["modelValue","extensions","title","close-on-outside-click"])],64))}}),wE={class:"pl-notification-alert__wrapper d-flex"},bE={class:"pl-notification-alert__content flex-grow-1"},xE={key:0,class:"pl-notification-alert__close"},kE={key:0,class:"pl-notification-alert__actions d-flex"},Zp=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(i,l)=>n.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([i.type,"pl-notification-alert d-flex flex-column gap-16"]),style:r.normalizeStyle({width:`${i.width}`})},[r.createElementVNode("div",wE,[r.createElementVNode("div",bE,[r.renderSlot(i.$slots,"default")]),l[0]||(l[0]=r.createTextVNode()),i.closable?(r.openBlock(),r.createElementBlock("div",xE,[r.createVNode(r.unref(_o),{icon:"close",onClick:o})])):r.createCommentVNode("",!0)]),l[1]||(l[1]=r.createTextVNode()),i.$slots.actions?(r.openBlock(),r.createElementBlock("div",kE,[r.renderSlot(i.$slots,"actions")])):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)}}),SE=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 St(t,e,n){return e>t?e:t>n?n:t}const Kl=t=>r.computed(()=>{const e=[100],{min:n,max:o,step:i}=t.value;let l=n;for(;l<o;){l+=i;const c=(1-(St(l,n,o)-n)/(o-n))*100;e.push(c)}return e}),EE={class:"ui-slider__wrapper"},TE={class:"ui-slider__label-section"},NE={key:0,class:"text-s"},AE={key:1,class:"ui-slider__value-static text-s"},VE={class:"ui-slider__base"},BE={class:"ui-slider__container"},PE={class:"ui-slider__container ui-slider__container-thumb"},RE={class:"ui-slider__input-wrapper d-flex"},DE=["value"],IE={key:0,class:"ui-slider__error"},jp=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,i=t,l=r.reactive({deltaValue:0}),c=r.computed(()=>i.max-i.min),d=r.computed(()=>St((i.modelValue??0)+l.deltaValue,i.min,i.max)),p=r.ref(i.modelValue),h=r.computed(()=>{const A=i.modelValue;return Number.isFinite(A)?A<i.min?`Min value: ${i.min}`:A>i.max?`Max value: ${i.max}`:i.error:"Not a number"}),m=r.computed(()=>i),y=Kl(m),x=r.computed(()=>(d.value-i.min)/c.value),w=r.computed(()=>({right:Math.ceil((1-x.value)*100)+"%"})),S=r.computed(()=>({right:`calc(${Math.ceil((1-x.value)*100)}%) `})),O=r.ref(),G=r.ref();r.watch(()=>i.modelValue,A=>{p.value=A});function b(A){const U=St(A,i.min,i.max);return Math.round((U+Number.EPSILON)*(1/i.step))/(1/i.step)}gr(G,A=>{var U;ut((U=r.unref(O))==null?void 0:U.getBoundingClientRect(),j=>{const{dx:$}=A;l.deltaValue=$/j.width*c.value,p.value=b(St((i.modelValue??0)+l.deltaValue,i.min,i.max)),A.stop&&(o("update:modelValue",b(d.value)),l.deltaValue=0)})});function R(A){o("update:modelValue",b(A))}function F(A){R(+A.target.value)}function D(A){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(A.code)&&A.preventDefault();const U=A.code==="ArrowUp"||A.code==="ArrowRight"?i.step*1:A.code==="ArrowDown"||A.code==="ArrowLeft"?i.step*-1:0;R(i.modelValue+U)}return(A,U)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([i.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${i.mode}`,"ui-slider"])},[r.createElementVNode("div",EE,[r.createElementVNode("div",TE,[A.label?(r.openBlock(),r.createElementBlock("label",NE,[r.createElementVNode("span",null,r.toDisplayString(A.label),1),U[1]||(U[1]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(A.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),U[2]||(U[2]=r.createTextVNode()),i.mode==="text"?(r.openBlock(),r.createElementBlock("div",AE,r.toDisplayString(p.value)+r.toDisplayString(A.measure),1)):r.createCommentVNode("",!0)]),U[6]||(U[6]=r.createTextVNode()),r.createElementVNode("div",VE,[r.createElementVNode("div",BE,[r.createElementVNode("div",{ref_key:"barRef",ref:O,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(w.value)},null,4)],512)]),U[5]||(U[5]=r.createTextVNode()),r.createElementVNode("div",PE,[i.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(y),(j,$)=>(r.openBlock(),r.createElementBlock("div",{key:$,style:r.normalizeStyle({right:`${j}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),U[4]||(U[4]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef",ref:G,tabindex:"0",class:"ui-slider__thumb ui-slider__thumb-active",style:r.normalizeStyle(S.value),onKeydown:D},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",RE,[i.mode==="input"?(r.openBlock(),r.createElementBlock("input",{key:0,value:p.value,class:"ui-slider__value text-s",onChange:U[0]||(U[0]=j=>F(j))},null,40,DE)):r.createCommentVNode("",!0)])],2),U[8]||(U[8]=r.createTextVNode()),h.value?(r.openBlock(),r.createElementBlock("div",IE,r.toDisplayString(h.value),1)):r.createCommentVNode("",!0)],2))}});function FE(t,e=null,n=null){function o(d){const{scrollTop:p,scrollHeight:h,clientHeight:m}=d;if(!(h>m)||!e)return null;const y=h-p-m,x=p>e?e:0,w=y>e?m-e-x:m;return`linear-gradient(
|
|
52
|
+
`,H0=["innerHTML"],q0={class:"dropdown-list-item__title-container"},K0={class:"dropdown-list-item__title text-s"},X0={key:0,class:"dropdown-list-item__description text-description"},Y0={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(" ")}),i=r.computed(()=>e.isSelected?j0:W0);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:i.value},null,10,H0)):r.createCommentVNode("",!0),c[1]||(c[1]=r.createTextVNode()),r.createElementVNode("div",q0,[r.createElementVNode("div",K0,r.toDisplayString(l.option.label),1),c[0]||(c[0]=r.createTextVNode()),l.option.description?(r.openBlock(),r.createElementBlock("div",X0,r.toDisplayString(l.option.description),1)):r.createCommentVNode("",!0)]),c[2]||(c[2]=r.createTextVNode()),!e.useCheckbox&&e.isSelected?(r.openBlock(),r.createElementBlock("div",Y0)):r.createCommentVNode("",!0)],2))}});function vo(t,e){const n=Nl(()=>{if(t.value){const{scrollTop:o,scrollLeft:i,scrollHeight:l,scrollWidth:c,clientHeight:d,clientWidth:p}=document.documentElement,h=t.value.getBoundingClientRect();e({scrollTop:o,scrollLeft:i,scrollHeight:l,scrollWidth:c,clientHeight:d,clientWidth:p,offsetY:o+h.y,offsetX:i+h.x,top:h.top,right:h.right,bottom:h.bottom,left:h.left,width:h.width,height:h.height,x:h.x,y:h.y})}});r.onMounted(n),st(window,"scroll",n,{capture:!0,passive:!0}),st(window,"resize",n,{passive:!0}),st(window,"adjust",n,!0)}const J0=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(i,l)=>(r.openBlock(),r.createElementBlock("i",{style:r.normalizeStyle(n.value),class:r.normalizeClass([o.value,i.$style.icon])},null,6))}}),Q0="_icon_1ugxm_2",ew={icon:Q0},tw={$style:ew},fn=Zt(J0,[["__cssModules",tw]]),nw=["onKeyup"],rw=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,i=n,l=r.useModel(t,"modelValue"),c=r.ref(),d=r.ref(),p=r.ref(),h=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(d,V=>{if(V){const Z=V.getBoundingClientRect();m.optionsHeight=Z.height,window.dispatchEvent(new CustomEvent("adjust"))}},{immediate:!0});const x=r.computed(()=>m.open?"mask-24 mask-chevron-up":"mask-24 mask-chevron-down"),w=r.computed(()=>(o.options??[]).findIndex(V=>yi(V.value,l.value))),E=r.computed(()=>yr(o.options??[]).map((V,Z)=>({...V,index:Z,isSelected:Z===w.value,isActive:Z===m.activeIndex}))),O=r.computed(()=>o.loading||o.options===void 0),$=r.computed(()=>{var V;return((V=E.value.find(Z=>yi(Z.value,l.value)))==null?void 0:V.label)??(o.options===void 0?"...":"")});vo(c,V=>{const Z=V.top+V.height+3;Z+m.optionsHeight>V.clientHeight?y.top=V.top-m.optionsHeight-3+"px":y.top=Z+"px",y.left=V.left+"px",y.width=V.width+"px"});const b=V=>{var Z;l.value=V,m.open=!1,(Z=c==null?void 0:c.value)==null||Z.focus()};function R(){i("click")}const F=V=>{var Z,ne;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(V.code))V.preventDefault();else return;if(V.target===h.value&&V.code==="Enter"){R();return}const{open:H,activeIndex:J}=m;if(!H&&V.target===p.value){V.code==="Enter"&&(m.open=!0);return}V.code==="Escape"&&(m.open=!1,(Z=c.value)==null||Z.focus());const G=r.unref(E),{length:z}=G;if(!z)return;V.code==="Enter"&&b((ne=G.find(k=>k.index===J))==null?void 0:ne.value);const Q=G.findIndex(k=>k.index===J)??-1,A=V.code==="ArrowDown"?1:V.code==="ArrowUp"?-1:0,C=Math.abs(Q+A+z)%z;m.activeIndex=E.value[C].index??-1},D=V=>{var Z,ne;const H=V.relatedTarget;!((Z=c.value)!=null&&Z.contains(H))&&!((ne=d.value)!=null&&ne.contains(H))&&(m.open=!1)};return(V,Z)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:c,class:r.normalizeClass([{disabled:V.disabled||O.value,loading:O.value},"pl-btn-split d-flex"]),onFocusout:D,onKeydown:F},[r.createElementVNode("div",{ref_key:"buttonAction",ref:h,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($.value),41,nw),Z[1]||(Z[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:Z[0]||(Z[0]=ne=>m.open=!m.open)},[O.value?(r.openBlock(),r.createBlock(fn,{key:0,name:"loading"})):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass([x.value,"pl-btn-split__icon"])},null,2))],512),Z[2]||(Z[2]=r.createTextVNode()),m.open?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:d,class:"pl-dropdown__options",style:r.normalizeStyle(y),tabindex:"-1"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(E.value,(ne,H)=>(r.openBlock(),r.createBlock(yo,{key:H,option:ne,"is-selected":ne.isSelected,"is-hovered":ne.isActive,size:"medium",onClick:r.withModifiers(J=>b(ne.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128))],4)])):r.createCommentVNode("",!0)],34))}});function cp(t){function e(n){const o=n.currentTarget,i=document.createElement("span"),l=Math.max(o.clientWidth,o.clientHeight),c=l/2;i.style.width=i.style.height=`${l}px`,i.style.left=`${n.clientX-o.offsetLeft-c}px`,i.style.top=`${n.clientY-o.offsetTop-c}px`,i.classList.add("ripple");const d=o.getElementsByClassName("ripple")[0];d&&d.remove(),o.appendChild(i)}r.onMounted(()=>{var n;(n=t.value)==null||n.addEventListener("click",e)})}const ow={key:0},iw={inheritAttrs:!1},Ts=r.defineComponent({...iw,__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"),i=r.computed(()=>e.large||e.size==="large");return cp(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:i.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",ow,[r.renderSlot(l.$slots,"default")])),c[0]||(c[0]=r.createTextVNode()),l.loading?(r.openBlock(),r.createBlock(r.unref(fn),{key:1,name:"loading",size:l.size},null,8,["size"])):l.icon?(r.openBlock(),r.createBlock(r.unref(fn),{key:2,name:l.icon,size:l.size},null,8,["name","size"])):r.createCommentVNode("",!0)],16))}}),sw={name:"PlBtnPrimary"},Ns=r.defineComponent({...sw,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(Ts,r.mergeProps({class:"pl-btn-primary"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),aw={name:"PlBtnAccent"},lw=r.defineComponent({...aw,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(Ts,r.mergeProps({class:"pl-btn-accent"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),cw={name:"PlBtnDanger"},dw=r.defineComponent({...cw,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(Ts,r.mergeProps({class:"pl-btn-danger"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),uw={name:"PlBtnSecondary"},Pl=r.defineComponent({...uw,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(Ts,r.mergeProps(e,{class:"pl-btn-secondary"}),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),pw={key:0},hw={name:"PlBtnGhost"},_o=r.defineComponent({...hw,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"),i=r.ref(),l=r.useSlots();return cp(i),(c,d)=>(r.openBlock(),r.createElementBlock("button",r.mergeProps({ref_key:"btnRef",ref:i,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",pw,[r.renderSlot(c.$slots,"default")])):r.createCommentVNode("",!0),d[0]||(d[0]=r.createTextVNode()),c.loading?(r.openBlock(),r.createBlock(r.unref(fn),{key:1,name:"loading",size:c.size},null,8,["size"])):c.icon?(r.openBlock(),r.createBlock(r.unref(fn),{key:2,name:c.icon,size:c.size},null,8,["name","size"])):r.createCommentVNode("",!0),d[1]||(d[1]=r.createTextVNode()),r.renderSlot(c.$slots,"append")],16))}}),fw=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,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-btn-link",{disabled:o.disabled,loading:o.loading,hover:n.value}]),onMouseover:i[0]||(i[0]=l=>n.value=!0),onMouseleave:i[1]||(i[1]=l=>n.value=!1)},[r.createVNode(Pl,r.mergeProps({round:"",hover:n.value},e),null,16,["hover"]),i[2]||(i[2]=r.createTextVNode()),r.renderSlot(o.$slots,"default")],34))}});function mw(t,e){const n=r.ref();return vo(t,o=>{n.value=o}),r.computed(()=>{const o=r.unref(n),i=r.unref(e),l=i.position??"top",c=i.gap??8;if(!o)return"";const d=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: ${d}px;`:l==="left"?`right: ${o.scrollWidth-o.x+c}px; top: ${d}px;`:""})}function _i(t,e){return e(t)}function ut(t,e){if(t!=null)return e(t)}function gw(t){return Array.isArray(t)?t:[t]}function yw(t,e,...n){n.forEach(o=>{t[o]=e[o]})}function As(t,e){st(document,"click",n=>{document.contains(n.target)&&(gw(t).map(o=>o.value).filter(o=>!!o).some(o=>o==null?void 0:o.contains(n.target))||e())})}const vw={},_w={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Cw(t,e){return r.openBlock(),r.createElementBlock("svg",_w,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 ww=Zt(vw,[["render",Cw]]),Rl=new Map,bw={name:"PlTooltip"},xt=r.defineComponent({...bw,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(),i=t,l=r.reactive({open:!1,over:!1,tooltipOpen:!1,key:Symbol()});Rl.set(o,()=>h()),r.watch(()=>l.open,O=>{requestAnimationFrame(()=>{l.tooltipOpen=O})});let c=()=>{};const d=op(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),p=()=>{l.open=!0;for(let[O,$]of Rl.entries())O!==o&&$()},h=()=>{l.open=!1,n("tooltip:close")},m=async()=>{i.hide||(d(),l.over=!0,c(),await Ju(100),l.over&&p())},y=()=>{l.over=!1,c=Qu(()=>{l.over||h()},i.closeDelay)};r.watch(()=>i.hide,O=>{O&&h()});const x=r.ref(),w=r.ref(),E=mw(x,r.toRef(i));return As([x,w],()=>h()),r.onUnmounted(()=>{Rl.delete(o)}),(O,$)=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(O.element),r.mergeProps(O.$attrs,{ref_key:"rootRef",ref:x,onClick:m,onMouseover:m,onMouseleave:y}),{default:r.withCtx(()=>[r.renderSlot(O.$slots,"default"),$[1]||($[1]=r.createTextVNode()),O.$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(E))},[r.createElementVNode("div",{ref_key:"tooltip",ref:w,class:r.normalizeClass(["pl-tooltip",O.position]),onMouseover:m,onMouseleave:y},[r.createElementVNode("div",null,[r.renderSlot(O.$slots,"tooltip")]),$[0]||($[0]=r.createTextVNode()),r.createVNode(ww)],34)],4)):r.createCommentVNode("",!0)]),_:3})])):r.createCommentVNode("",!0)]),_:3},16))}}),xw={},kw={class:"inner-border"};function Sw(t,e,n,o,i,l){return r.openBlock(),r.createElementBlock("div",kw,[r.renderSlot(t.$slots,"default")])}const Ew=Zt(xw,[["render",Sw]]),Tw={key:0},Nw=["tabindex","onKeydown","onClick"],Aw={key:1,class:"pl-btn-group__helper"},Vw={key:2,class:"pl-btn-group__error"},Bw={name:"PlBtnGroup"},dp=r.defineComponent({...Bw,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,i=d=>o("update:modelValue",d),l=t,c=r.computed(()=>l.options.map(d=>({label:"label"in d?d.label:d.text,value:d.value})));return(d,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-btn-group",{disabled:d.disabled,compact:d.compact}])},[d.label?(r.openBlock(),r.createElementBlock("label",Tw,[r.createElementVNode("span",null,r.toDisplayString(d.label),1),p[0]||(p[0]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(d.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),p[1]||(p[1]=r.createTextVNode()),r.createVNode(Ew,{class:"pl-btn-group__container"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.value,(h,m)=>(r.openBlock(),r.createElementBlock("div",{key:m,class:r.normalizeClass(["pl-btn-group__option text-s",{active:d.modelValue===h.value}]),tabindex:d.modelValue===h.value||d.disabled?void 0:0,onKeydown:r.withKeys(y=>i(h.value),["enter"]),onClick:y=>i(h.value)},r.toDisplayString(h.label),43,Nw))),128))]),_:1}),p[2]||(p[2]=r.createTextVNode()),d.helper?(r.openBlock(),r.createElementBlock("div",Aw,r.toDisplayString(d.helper),1)):d.error?(r.openBlock(),r.createElementBlock("div",Vw,r.toDisplayString(d.error),1)):r.createCommentVNode("",!0)],2))}});function Pw(t,e){const n=r.ref(),o=r.ref(),{parse:i,update:l}=e,c=()=>{n.value=void 0,o.value=void 0},d=r.computed({get(){return n.value!==void 0?n.value:t.value},set(p){c();try{const h=i?i(p):p;!l||l(h)?t.value=h:n.value=h}catch(h){n.value=p,o.value=h instanceof Error?h.message:String(h)}}});return r.reactive({value:d,error:o,reset:c})}const Rw="_component_1abv8_1",Dw="_container_1abv8_15",Iw="_error_1abv8_69",Dl={component:Rw,container:Dw,error:Iw},Fw={key:0},Ow=["placeholder"],Lw=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=Pw(e,{update(){return!1},parse:d=>{if(typeof d!="string")throw Error("value should be a string");if(n.maxLength&&d.length>n.maxLength)throw Error(`Max title length is ${n.maxLength} characters`);if(n.minLength&&d.length<n.minLength)throw Error(`Min title length is ${n.minLength} characters`);return d.trim()}}),i=r.computed(()=>({maxWidth:n.maxWidth??"80%"})),l=()=>{e.value=o.value&&!o.error?o.value:e.value,o.reset()},c=r.ref();return(d,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-editable-title",r.unref(Dl).component]),style:r.normalizeStyle(i.value)},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(Dl).container),onClick:p[3]||(p[3]=()=>{var h;return(h=c.value)==null?void 0:h.focus()})},[d.prefix?(r.openBlock(),r.createElementBlock("span",Fw,r.toDisplayString(d.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]=h=>r.unref(o).value=h),placeholder:d.placeholder,onFocusout:l,onKeydown:[p[1]||(p[1]=r.withKeys((...h)=>r.unref(o).reset&&r.unref(o).reset(...h),["escape"])),p[2]||(p[2]=r.withKeys(h=>{var m;return(m=h.target)==null?void 0:m.blur()},["enter"]))]},null,40,Ow),[[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(Dl).error)},r.toDisplayString(r.unref(o).error),3)):r.createCommentVNode("",!0)],6))}}),Mw={inheritAttrs:!1},Gw={class:"double-contour"};function $w(t,e,n,o,i,l){return r.openBlock(),r.createElementBlock("div",Gw,[r.createElementVNode("div",r.normalizeProps(r.guardReactiveProps(t.$attrs)),[r.renderSlot(t.$slots,"default")],16)])}const vr=Zt(Mw,[["render",$w]]);function up(t){r.onMounted(t),r.onUpdated(t)}const Il=new WeakMap,Fl=new ResizeObserver(t=>{for(const e of t)ut(Il.get(e.target),n=>n(e))});function pp(t,e){Il.set(t,e),Fl.unobserve(t),Fl.observe(t)}function hp(t){Fl.unobserve(t),Il.delete(t)}const zw=8,fp=4;function Xn(t,e="label"){const n=new Set;up(()=>{ut(t==null?void 0:t.value,o=>{const i=o.querySelector(e);i&&(n.add(i),pp(i,()=>{const l=Yu(()=>i.getBoundingClientRect().width+_i(zw,c=>Number.isNaN(c)?fp:c+fp));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=>hp(o))})}function Uw(t,e){const n=[];return e&&e.length>0&&e.forEach(o=>{const i=o(t);typeof i=="string"&&n.push(i)}),{isValid:n.length===0,errors:n}}function mp(t,e){return r.computed(()=>Uw(t.value,e))}const Zw=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(i,l)=>(r.openBlock(),r.createElementBlock("i",{style:r.normalizeStyle(n.value),class:r.normalizeClass([o.value,i.$style.icon])},null,6))}}),Ww="_icon_1ugxm_2",jw={icon:Ww},Hw={$style:jw},Co=Zt(Zw,[["__cssModules",Hw]]),qw=r.defineComponent({__name:"PlIcon24",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>`icon-24 icon-${e.name}`);return(o,i)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass([n.value,o.$style.icon])},null,2))}}),Kw="_icon_1ugxm_2",Xw={icon:Kw},Yw={$style:Xw},Ci=Zt(qw,[["__cssModules",Yw]]),Jw={class:"pl-text-field__envelope"},Qw={key:0,ref:"label"},eb={key:0,class:"required-icon"},tb={key:1,class:"pl-text-field__prefix"},nb=["disabled","placeholder","type"],rb={class:"pl-text-field__append"},ob={key:0,class:"pl-text-field__error"},ib={key:1,class:"pl-text-field__helper"},sb={name:"PlTextField"},Wr=r.defineComponent({...sb,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,i=r.ref(void 0),l=r.ref(),c=r.ref(!1),d=r.reactive({cached:void 0}),p=r.computed({get(){return d.cached?d.cached.value:n.value===void 0||n.value===null?"":String(n.value)},set(D){if(d.cached=void 0,o.parse)try{n.value=o.parse(D)}catch(V){d.cached={error:V instanceof Error?V.message:String(V),value:D}}else n.value=D}}),h=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&&(d.cached=void 0,n.value=o.clearable===!0?"":o.clearable())},x=mp(p,o.rules||[]),w=r.computed(()=>o.clearable?o.clearable===!0?n.value==="":n.value===o.clearable():n.value===""),E=r.computed(()=>!w.value),O=r.computed(()=>{const D=[];return o.error&&D.push(o.error),d.cached&&D.push(d.cached.error),x.value.isValid||D.push(...x.value.errors),D}),$=r.computed(()=>O.value.length>0),b=r.computed(()=>o.clearable&&E.value&&o.type!=="password"),R=()=>c.value=!c.value,F=()=>{d.cached=void 0};return Xn(i),(D,V)=>(r.openBlock(),r.createElementBlock("div",Jw,[r.createElementVNode("div",{ref_key:"rootRef",ref:i,class:r.normalizeClass(["pl-text-field",{error:$.value,disabled:D.disabled,dashed:D.dashed,nonEmpty:E.value}])},[D.label?(r.openBlock(),r.createElementBlock("label",Qw,[D.required?(r.openBlock(),r.createElementBlock("i",eb)):r.createCommentVNode("",!0),V[1]||(V[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(D.label),1),V[2]||(V[2]=r.createTextVNode()),r.unref(e).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(D.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),V[5]||(V[5]=r.createTextVNode()),D.prefix?(r.openBlock(),r.createElementBlock("div",tb,r.toDisplayString(D.prefix),1)):r.createCommentVNode("",!0),V[6]||(V[6]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":V[0]||(V[0]=Z=>p.value=Z),disabled:D.disabled,placeholder:D.placeholder||"...",type:h.value,spellcheck:"false",onFocusout:F},null,40,nb),[[r.vModelDynamic,p.value]]),V[7]||(V[7]=r.createTextVNode()),r.createElementVNode("div",rb,[b.value?(r.openBlock(),r.createBlock(r.unref(Co),{key:0,class:"pl-text-field__clearable",name:"delete-clear",onClick:y})):r.createCommentVNode("",!0),V[3]||(V[3]=r.createTextVNode()),D.type==="password"?(r.openBlock(),r.createBlock(r.unref(Ci),{key:1,name:m.value,style:{cursor:"pointer"},onClick:R},null,8,["name"])):r.createCommentVNode("",!0),V[4]||(V[4]=r.createTextVNode()),r.renderSlot(D.$slots,"append")]),V[8]||(V[8]=r.createTextVNode()),r.createVNode(vr,{class:"pl-text-field__contour"})],2),V[9]||(V[9]=r.createTextVNode()),$.value?(r.openBlock(),r.createElementBlock("div",ob,r.toDisplayString(O.value.join(" ")),1)):D.helper?(r.openBlock(),r.createElementBlock("div",ib,r.toDisplayString(D.helper),1)):r.createCommentVNode("",!0)]))}}),ab=["disabled","placeholder"],lb=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,i=r.ref(void 0),l=r.ref(),c=r.computed({get(){return o.modelValue??""},set(h){n("update:modelValue",h)}}),d=r.computed(()=>!!o.modelValue),p=()=>n("update:modelValue","");return(h,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:i,class:r.normalizeClass(["pl-search-field",[h.$style.component]])},[r.createVNode(r.unref(Ci),{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:h.disabled,type:"text",placeholder:h.placeholder||"Find...",spellcheck:"false"},null,8,ab),[[r.vModelText,c.value]]),m[2]||(m[2]=r.createTextVNode()),h.clearable&&d.value?(r.openBlock(),r.createBlock(r.unref(Co),{key:0,class:r.normalizeClass(h.$style.clear),name:"delete-clear",onClick:r.withModifiers(p,["stop"])},null,8,["class"])):r.createCommentVNode("",!0)],2))}}),cb="_component_1ng5b_1",db="_clear_1ng5b_35",ub={component:cb,clear:db},pb={$style:ub},gp=Zt(lb,[["__cssModules",pb]]),hb={class:"ui-text-area__envelope"},fb={key:0,ref:"label"},mb={key:0,class:"required-icon"},gb=["readonly","rows","disabled","placeholder"],yb={class:"ui-text-area__append"},vb={key:0,class:"ui-text-area__error"},_b={key:1,class:"ui-text-area__helper"},Cb={name:"PlTextArea"},wb=r.defineComponent({...Cb,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,i=t,l=r.ref(),c=r.ref(),d=r.computed({get(){return i.modelValue??""},set(w){o("update:modelValue",w)}}),p=r.computed(()=>!!i.modelValue),h=mp(d,i.rules||[]);Xn(l);const m=r.computed(()=>{const w=[];return i.error&&w.push(i.error),w.push(...h.value.errors),w}),y=r.computed(()=>m.value.length>0),x=()=>{if(!i.autogrow)return;const w=c.value;w&&(w.style.height="auto",w.style.height=`${w.scrollHeight}px`)};return r.onMounted(()=>{x()}),(w,E)=>(r.openBlock(),r.createElementBlock("div",hb,[r.createElementVNode("div",{ref_key:"root",ref:l,class:r.normalizeClass(["ui-text-area",{error:y.value,disabled:w.disabled,dashed:w.dashed,nonEmpty:p.value}])},[w.label?(r.openBlock(),r.createElementBlock("label",fb,[w.required?(r.openBlock(),r.createElementBlock("i",mb)):r.createCommentVNode("",!0),E[1]||(E[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(w.label),1),E[2]||(E[2]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(w.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),E[3]||(E[3]=r.createTextVNode()),r.withDirectives(r.createElementVNode("textarea",{ref_key:"input",ref:c,"onUpdate:modelValue":E[0]||(E[0]=O=>d.value=O),readonly:w.readonly,rows:w.rows,disabled:w.disabled,placeholder:w.placeholder??"...",spellcheck:"false",onInput:x},null,40,gb),[[r.vModelText,d.value]]),E[4]||(E[4]=r.createTextVNode()),r.createElementVNode("div",yb,[r.renderSlot(w.$slots,"append")]),E[5]||(E[5]=r.createTextVNode()),r.createVNode(vr,{class:"ui-text-area__contour"})],2),E[6]||(E[6]=r.createTextVNode()),y.value?(r.openBlock(),r.createElementBlock("div",vb,r.toDisplayString(m.value.join(" ")),1)):w.helper?(r.openBlock(),r.createElementBlock("div",_b,r.toDisplayString(w.helper),1)):r.createCommentVNode("",!0)]))}});function yp(t,e){const n=t.scrollTop,o=t.getBoundingClientRect().height,i=e.offsetTop,l=e.getBoundingClientRect().height;return i+l<o+n&&i>n}function vp(t,e){const n=t.scrollTop,o=t.getBoundingClientRect().height,i=e.offsetTop,l=e.getBoundingClientRect().height;return i+l<o+n?"ceil":i>n?"floor":"visible"}function wi(t,e,n={}){const o=t.scrollTop,i=t.getBoundingClientRect().height,l=e.getBoundingClientRect().height,c=e.offsetTop,d=vp(t,e);if(d==="visible")return;const p=h=>{const m=d==="floor"?c-(i-l):c;t.scrollTop=o+h*(m-o)};yp(t,e)||np({duration:n.duration||100,timing:tp(h=>h),draw:p})}function Ol(t,e,n,o){return t.addEventListener(e,n,o),function(){t.removeEventListener(e,n)}}function bb(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 _p(t){return t!==null&&typeof t=="object"}function Ot(t,e){return _p(t)&&_p(e)?Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>Ot(t[n],e[n])):t===e}function Ll(t,e){return t.some(n=>Ot(n,e))}const Ml=r.defineComponent({__name:"LongText",setup(t){r.useCssVars(m=>({"8d68520c":c.value}));const e=r.ref(!1),n=r.ref(),o=r.ref(!1),i=r.computed(()=>o.value&&e.value?"ui-lt-animate":""),l=rp(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 d(){const m=Tl(n.value,"span cannot be empty");e.value=m.clientWidth<m.scrollWidth}function p(){d(),l(!0)}function h(){l(!1)}return(m,y)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps(m.$attrs,{class:"ui-lt-container"}),[r.createElementVNode("span",{onMouseover:p,onMouseleave:h},[r.createElementVNode("span",{ref_key:"span",ref:n,class:r.normalizeClass(i.value)},[r.renderSlot(m.$slots,"default")],2)],32)],16))}}),xb=r.defineComponent({__name:"PlMaskIcon24",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>`mask-24 mask-${e.name}`);return(o,i)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass([n.value,o.$style.icon])},null,2))}}),kb="_icon_1ugxm_2",Sb={icon:kb},Eb={$style:Sb},Lt=Zt(xb,[["__cssModules",Eb]]),Tb={class:"pl-dropdown__envelope"},Nb=["tabindex"],Ab={class:"pl-dropdown__container"},Vb={class:"pl-dropdown__field"},Bb=["disabled","placeholder"],Pb={class:"pl-dropdown__controls"},Rb={key:0},Db={key:0,class:"required-icon"},Ib={key:0,class:"nothing-found"},Fb={key:0,class:"pl-dropdown__error"},Ob={key:1,class:"pl-dropdown__helper"},Lb={key:2,class:"pl-dropdown__helper"},Mb={name:"PlDropdown"},wo=r.defineComponent({...Mb,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,i=r.useSlots(),l=r.ref(),c=r.ref(),d=r.ref(),p=r.reactive({search:"",activeIndex:-1,open:!1,optionsHeight:0}),h=()=>_i(F.value.findIndex(C=>Ot(C.value,o.modelValue)),C=>C<0?0:C),m=()=>p.activeIndex=h(),y=r.computed(()=>o.options===void 0),x=r.computed(()=>y.value?!0:o.disabled),w=r.computed(()=>(o.options??[]).findIndex(C=>Ot(C.value,o.modelValue))),E=r.computed(()=>{if(!y.value){if(o.error)return o.error;if(o.modelValue!==void 0&&w.value===-1)return"The selected value is not one of the options"}}),O=r.computed(()=>yr(o.options??[]).map((C,k)=>({...C,index:k,isSelected:k===w.value,isActive:k===p.activeIndex}))),$=r.computed(()=>{const C=r.unref(O).find(k=>Ot(k.value,o.modelValue));return(C==null?void 0:C.label)||o.modelValue}),b=r.computed(()=>!p.open&&o.modelValue?"":o.modelValue?String($.value):o.placeholder),R=r.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),F=r.computed(()=>{const C=O.value;return p.search?C.filter(k=>{const M=p.search.toLowerCase();return k.label.toLowerCase().includes(M)||k.description&&k.description.toLowerCase().includes(M)?!0:typeof k.value=="string"?k.value.toLowerCase().includes(M):k.value===p.search}):C}),D=r.computed(()=>x.value?void 0:"0"),V=C=>{var k;n("update:modelValue",C),p.search="",p.open=!1,(k=l==null?void 0:l.value)==null||k.focus()},Z=()=>n("update:modelValue",void 0),ne=()=>{var C;return(C=d.value)==null?void 0:C.focus()},H=()=>p.open=!p.open,J=()=>p.open=!0,G=C=>{var k,M;const W=C.relatedTarget;!((k=l.value)!=null&&k.contains(W))&&!((M=c.value)!=null&&M.contains(W))&&(p.search="",p.open=!1)},z=()=>{const C=c.value;C&&ut(C.querySelector(".hovered-item"),k=>{wi(C,k)})},Q=C=>{var k,M;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(C.code))C.preventDefault();else return;const{open:W,activeIndex:q}=p;if(!W){C.code==="Enter"&&(p.open=!0);return}C.code==="Escape"&&(p.open=!1,(k=l.value)==null||k.focus());const re=r.unref(F),{length:ue}=re;if(!ue)return;C.code==="Enter"&&V((M=re.find(ht=>ht.index===q))==null?void 0:M.value);const ke=re.findIndex(ht=>ht.index===q)??-1,Se=C.code==="ArrowDown"?1:C.code==="ArrowUp"?-1:0,Ze=Math.abs(ke+Se+ue)%ue;p.activeIndex=F.value[Ze].index??-1};Xn(l),r.watch(()=>o.modelValue,m,{immediate:!0}),r.watch(()=>p.open,C=>{var k;return C?(k=d.value)==null?void 0:k.focus():""}),r.watchPostEffect(()=>{p.search,p.activeIndex>=0&&p.open&&z()});const A=r.reactive({top:"0px",left:"0px",width:"0px"});return r.watch(c,C=>{if(C){const k=C.getBoundingClientRect();p.optionsHeight=k.height,window.dispatchEvent(new CustomEvent("adjust"))}}),vo(l,C=>{const k=C.top+C.height+3;k+p.optionsHeight>C.clientHeight?A.top=C.top-p.optionsHeight-3+"px":A.top=k+"px",A.left=C.left+"px",A.width=C.width+"px"}),(C,k)=>(r.openBlock(),r.createElementBlock("div",Tb,[r.createElementVNode("div",{ref_key:"root",ref:l,tabindex:D.value,class:r.normalizeClass(["pl-dropdown",{open:p.open,error:C.error,disabled:x.value}]),onKeydown:Q,onFocusout:G},[r.createElementVNode("div",Ab,[r.createElementVNode("div",Vb,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:d,"onUpdate:modelValue":k[0]||(k[0]=M=>p.search=M),type:"text",tabindex:"-1",disabled:x.value,placeholder:b.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:J},null,40,Bb),[[r.vModelText,p.search]]),k[4]||(k[4]=r.createTextVNode()),p.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,onClick:ne},[r.createVNode(Ml,{class:"input-value"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString($.value),1)]),_:1})])),k[5]||(k[5]=r.createTextVNode()),r.createElementVNode("div",Pb,[y.value?(r.openBlock(),r.createBlock(r.unref(Lt),{key:0,name:"loading"})):r.createCommentVNode("",!0),k[1]||(k[1]=r.createTextVNode()),C.clearable&&R.value?(r.openBlock(),r.createBlock(r.unref(Co),{key:1,name:"delete-clear",onClick:r.withModifiers(Z,["stop"])})):r.createCommentVNode("",!0),k[2]||(k[2]=r.createTextVNode()),r.renderSlot(C.$slots,"append"),k[3]||(k[3]=r.createTextVNode()),C.arrowIconLarge?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["arrow-icon",[`icon-24 ${C.arrowIconLarge}`]]),onClick:r.withModifiers(H,["stop"])},null,2)):C.arrowIcon?(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["arrow-icon",[`icon-16 ${C.arrowIcon}`]]),onClick:r.withModifiers(H,["stop"])},null,2)):(r.openBlock(),r.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:r.withModifiers(H,["stop"])}))])]),k[9]||(k[9]=r.createTextVNode()),C.label?(r.openBlock(),r.createElementBlock("label",Rb,[C.required?(r.openBlock(),r.createElementBlock("i",Db)):r.createCommentVNode("",!0),k[6]||(k[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(C.label),1),k[7]||(k[7]=r.createTextVNode()),r.unref(i).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(C.$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(A),tabindex:"-1"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(F.value,(M,W)=>(r.openBlock(),r.createBlock(yo,{key:W,option:M,"is-selected":M.isSelected,"is-hovered":M.isActive,size:C.optionSize,onClick:r.withModifiers(q=>V(M.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),k[8]||(k[8]=r.createTextVNode()),F.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Ib,"Nothing found"))],4)])):r.createCommentVNode("",!0),k[11]||(k[11]=r.createTextVNode()),r.createVNode(vr,{class:"pl-dropdown__contour"})])],42,Nb),k[12]||(k[12]=r.createTextVNode()),E.value?(r.openBlock(),r.createElementBlock("div",Fb,r.toDisplayString(E.value),1)):y.value&&C.loadingOptionsHelper?(r.openBlock(),r.createElementBlock("div",Ob,r.toDisplayString(C.loadingOptionsHelper),1)):C.helper?(r.openBlock(),r.createElementBlock("div",Lb,r.toDisplayString(C.helper),1)):r.createCommentVNode("",!0)]))}}),Gb={name:"PlDropdownRef"},$b=r.defineComponent({...Gb,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 i;return(i=e.options)==null?void 0:i.map(l=>({label:l.label,value:l.ref}))}),o=r.computed(()=>e.disabled?"icon-link-disabled":"icon-link");return(i,l)=>(r.openBlock(),r.createBlock(r.unref(wo),r.mergeProps(e,{options:n.value,"loading-options-helper":i.loadingOptionsHelper,"arrow-icon-large":o.value,"onUpdate:modelValue":l[0]||(l[0]=c=>i.$emit("update:modelValue",c))}),null,16,["options","loading-options-helper","arrow-icon-large"]))}});function zb(t,e){return r.computed(()=>{const n=yr(t.value);return e.value?n.filter(o=>o.label.toLowerCase().includes(e.value.toLowerCase())):n})}const Ub={class:"resizable-input"},Zb=["placeholder","value","disabled"],Wb=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,i=r.computed(()=>{var d;return n.placeholder?n.placeholder:(d=n.modelValue||n.value)==null?void 0:d.replace('"',"")}),l=r.computed(()=>{const d={};return n.width&&(d.width=n.width),n.maxWidth&&(d.maxWidth=n.maxWidth),d});function c(d){const p=d.target.value;o("update:modelValue",p)}return(d,p)=>(r.openBlock(),r.createElementBlock("div",Ub,[r.createElementVNode("span",{style:r.normalizeStyle(l.value),class:"resizable-input__size-span"},r.toDisplayString(i.value),5),p[0]||(p[0]=r.createTextVNode()),r.createElementVNode("input",r.mergeProps(d.$attrs,{placeholder:d.placeholder,value:n.modelValue,disabled:n.disabled,style:l.value,onInput:c}),null,16,Zb)]))}}),jb={class:"dropdown-tab-item__title text-caps13"},Hb=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 i=[];return e.isSelected&&i.push("dropdown-tab-item__selected"),e.isHovered&&i.push("hovered-item"),i.join(" ")});return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([o.value,"dropdown-tab-item"])},[r.createElementVNode("div",jb,r.toDisplayString(n.value),1)],2))}}),qb={class:"pl-line-dropdown__prefix"},Kb={class:"pl-line-dropdown__icon-wrapper"},Xb={class:"pl-line-dropdown__icon"},Yb={key:0,class:"pl-line-dropdown__no-item"},Jb={key:0,class:"pl-line-dropdown__no-item"},Cp=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,i=r.reactive({isOpen:!1,activeOption:-1,optionsHeight:0}),l=r.ref(),c=r.ref(),d=r.computed(()=>{const G=[];return i.isOpen&&G.push("open"),o.disabled&&G.push("disabled"),G.join(" ")}),p=r.ref(""),h=zb(r.toRef(o,"options"),p),m=r.computed(()=>!!(o.clearable&&i.isOpen&&o.modelValue&&y.value)),y=r.computed(()=>{if(o.modelValue){const G=E();if(G!==-1){const z=yr(o.options)[G];return typeof z.label=="object"?z.label.title:z.label}}return""}),x=r.ref(y.value),w=r.computed(()=>i.isOpen&&p.value&&p.value.length>=y.value.length-1?p.value:y.value??"...");As(l,()=>{o.mode==="list"&&(i.isOpen=!1)}),r.watch(()=>x.value,G=>{y.value!==G?p.value=G:p.value=""}),r.watch(()=>i.isOpen,G=>{var z;G&&l.value&&((z=l.value.querySelector("input"))==null||z.focus(),r.nextTick(()=>ne()))}),r.watch(()=>o.modelValue,()=>O(),{immediate:!0});function E(){return o.options.findIndex(G=>Ot(G.value,o.modelValue))}function O(){i.activeOption=_i(h.value.findIndex(G=>Ot(G.value,o.modelValue)),G=>G<0?0:G),x.value=y.value}function $(){p.value=""}function b(){o.disabled?i.isOpen=!1:r.nextTick(()=>{i.isOpen=!i.isOpen})}function R(){o.mode==="list"&&(i.isOpen=!1)}function F(G){G&&(n("update:modelValue",G.value),R(),$())}function D(G){return Ot(G.value,o.modelValue)}const V=G=>{var z,Q;const A=G.relatedTarget;!((z=l.value)!=null&&z.contains(A))&&!((Q=c.value)!=null&&Q.contains(A))&&(p.value="",i.isOpen=!1)};function Z(G){const{activeOption:z}=i;if(!i.isOpen&&G.code==="Enter"){i.isOpen=!0;return}const{length:Q}=h.value;if(!Q)return;["ArrowDown","ArrowUp","Enter"].includes(G.code)&&G.preventDefault(),G.code==="Enter"&&F(h.value[z]);const A=G.code==="ArrowDown"?1:G.code==="ArrowUp"?-1:0;i.activeOption=Math.abs(z+A+Q)%Q,requestAnimationFrame(ne)}function ne(){const G=c.value;G&&ut(G.querySelector(".hovered-item"),z=>{o.mode==="list"?wi(G,z):z.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}function H(){n("update:modelValue",void 0)}const J=r.reactive({top:"0px",left:"0px"});return r.watch(c,G=>{if(G){const z=G.getBoundingClientRect();i.optionsHeight=z.height,window.dispatchEvent(new CustomEvent("adjust"))}}),vo(l,G=>{const z=G.top+G.height+2;z+i.optionsHeight>G.clientHeight?J.top=G.top-i.optionsHeight-2+"px":J.top=z+"px",J.left=G.left+"px"}),(G,z)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"container",ref:l,tabindex:"0",class:r.normalizeClass([d.value,"pl-line-dropdown uc-pointer"]),onKeydown:Z,onFocusout:V,onClick:b},[r.createElementVNode("div",qb,r.toDisplayString(o==null?void 0:o.prefix),1),z[6]||(z[6]=r.createTextVNode()),r.createVNode(Wb,{modelValue:x.value,"onUpdate:modelValue":z[0]||(z[0]=Q=>x.value=Q),placeholder:w.value,disabled:o.disabled,class:"pl-line-dropdown__input"},null,8,["modelValue","placeholder","disabled"]),z[7]||(z[7]=r.createTextVNode()),r.createElementVNode("div",Kb,[r.withDirectives(r.createElementVNode("div",Xb,null,512),[[r.vShow,!m.value]]),z[1]||(z[1]=r.createTextVNode()),r.withDirectives(r.createElementVNode("div",{class:"pl-line-dropdown__icon-clear",onClick:H},null,512),[[r.vShow,m.value]])]),z[8]||(z[8]=r.createTextVNode()),i.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:V},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(h),(Q,A)=>r.renderSlot(G.$slots,"item",{key:A,item:Q,textItem:"text",isSelected:D(Q),isHovered:i.activeOption==A,onClick:r.withModifiers(C=>F(Q),["stop"])},()=>[r.createVNode(yo,{option:Q,"text-item":"text","is-selected":D(Q),"is-hovered":i.activeOption==A,size:"medium",onClick:r.withModifiers(C=>F(Q),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),z[3]||(z[3]=r.createTextVNode()),r.unref(h).length===0?(r.openBlock(),r.createElementBlock("div",Yb,z[2]||(z[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:V},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(h),(Q,A)=>r.renderSlot(G.$slots,"item",{key:A,item:Q,isSelected:D(Q),isHovered:i.activeOption==A,onClick:r.withModifiers(C=>F(Q),["stop"])},()=>[r.createVNode(Hb,{option:Q,"is-selected":D(Q),"is-hovered":i.activeOption==A,onClick:r.withModifiers(C=>F(Q),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),z[5]||(z[5]=r.createTextVNode()),r.unref(h).length===0?(r.openBlock(),r.createElementBlock("div",Jb,z[4]||(z[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))}}),Qb={class:"ui-dropdown__envelope"},ex=["tabindex"],tx={class:"ui-dropdown__container"},nx={class:"ui-dropdown__field"},rx=["disabled","placeholder"],ox={class:"ui-dropdown__controls"},ix={key:0},sx={key:0,class:"required-icon"},ax={key:0,class:"nothing-found"},lx={key:0,class:"ui-dropdown__error"},cx={key:1,class:"ui-dropdown__helper"},dx={key:2,class:"ui-dropdown__helper"},ux={name:"PlDropdown"},px=r.defineComponent({...ux,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,i=r.useSlots(),l=r.ref(),c=r.ref(),d=r.ref(),p=r.reactive({search:"",activeIndex:-1,open:!1}),h=()=>_i(F.value.findIndex(A=>Ot(A.value,o.modelValue)),A=>A<0?0:A),m=()=>p.activeIndex=h(),y=r.computed(()=>o.options===void 0),x=r.computed(()=>y.value?!0:o.disabled),w=r.computed(()=>(o.options??[]).findIndex(A=>Ot(A.value,o.modelValue))),E=r.computed(()=>{if(!y.value){if(o.error)return o.error;if(o.modelValue!==void 0&&w.value===-1)return"The selected value is not one of the options"}}),O=r.computed(()=>yr(o.options??[]).map((A,C)=>({...A,index:C,isSelected:C===w.value,isActive:C===p.activeIndex}))),$=r.computed(()=>{const A=r.unref(O).find(C=>Ot(C.value,o.modelValue));return(A==null?void 0:A.label)||o.modelValue}),b=r.computed(()=>!p.open&&o.modelValue?"":o.modelValue?String($.value):o.placeholder),R=r.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),F=r.computed(()=>{const A=O.value;return p.search?A.filter(C=>{const k=p.search.toLowerCase();return C.label.toLowerCase().includes(k)||C.description&&C.description.toLowerCase().includes(k)?!0:typeof C.value=="string"?C.value.toLowerCase().includes(k):C.value===p.search}):A}),D=r.computed(()=>x.value?void 0:"0"),V=A=>{var C;n("update:modelValue",A),p.search="",p.open=!1,(C=l==null?void 0:l.value)==null||C.focus()},Z=()=>n("update:modelValue",void 0),ne=()=>{var A;return(A=d.value)==null?void 0:A.focus()},H=()=>p.open=!p.open,J=()=>p.open=!0,G=A=>{var C;(C=l==null?void 0:l.value)!=null&&C.contains(A.relatedTarget)||(p.search="",p.open=!1)},z=()=>{const A=c.value;A&&ut(A.querySelector(".hovered-item"),C=>{wi(A,C)})},Q=A=>{var C,k;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(A.code))A.preventDefault();else return;const{open:M,activeIndex:W}=p;if(!M){A.code==="Enter"&&(p.open=!0);return}A.code==="Escape"&&(p.open=!1,(C=l.value)==null||C.focus());const q=r.unref(F),{length:re}=q;if(!re)return;A.code==="Enter"&&V((k=q.find(Ze=>Ze.index===W))==null?void 0:k.value);const ue=q.findIndex(Ze=>Ze.index===W)??-1,ke=A.code==="ArrowDown"?1:A.code==="ArrowUp"?-1:0,Se=Math.abs(ue+ke+re)%re;p.activeIndex=F.value[Se].index??-1};return Xn(l),r.watch(()=>o.modelValue,m,{immediate:!0}),r.watch(()=>p.open,A=>{var C;return A?(C=d.value)==null?void 0:C.focus():""}),r.watchPostEffect(()=>{p.search,p.activeIndex>=0&&p.open&&z()}),(A,C)=>(r.openBlock(),r.createElementBlock("div",Qb,[r.createElementVNode("div",{ref_key:"root",ref:l,tabindex:D.value,class:r.normalizeClass(["ui-dropdown",{open:p.open,error:A.error,disabled:x.value}]),onKeydown:Q,onFocusout:G},[r.createElementVNode("div",tx,[r.createElementVNode("div",nx,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:d,"onUpdate:modelValue":C[0]||(C[0]=k=>p.search=k),type:"text",tabindex:"-1",disabled:x.value,placeholder:b.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:J},null,40,rx),[[r.vModelText,p.search]]),C[4]||(C[4]=r.createTextVNode()),p.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,onClick:ne},[r.createVNode(Ml,{class:"input-value"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString($.value),1)]),_:1})])),C[5]||(C[5]=r.createTextVNode()),r.createElementVNode("div",ox,[y.value?(r.openBlock(),r.createBlock(r.unref(Lt),{key:0,name:"loading"})):r.createCommentVNode("",!0),C[1]||(C[1]=r.createTextVNode()),A.clearable&&R.value?(r.openBlock(),r.createBlock(r.unref(Co),{key:1,name:"delete-clear",onClick:r.withModifiers(Z,["stop"])})):r.createCommentVNode("",!0),C[2]||(C[2]=r.createTextVNode()),r.renderSlot(A.$slots,"append"),C[3]||(C[3]=r.createTextVNode()),A.arrowIconLarge?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["arrow-icon",[`icon-24 ${A.arrowIconLarge}`]]),onClick:r.withModifiers(H,["stop"])},null,2)):A.arrowIcon?(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["arrow-icon",[`icon-16 ${A.arrowIcon}`]]),onClick:r.withModifiers(H,["stop"])},null,2)):(r.openBlock(),r.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:r.withModifiers(H,["stop"])}))])]),C[9]||(C[9]=r.createTextVNode()),A.label?(r.openBlock(),r.createElementBlock("label",ix,[A.required?(r.openBlock(),r.createElementBlock("i",sx)):r.createCommentVNode("",!0),C[6]||(C[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(A.label),1),C[7]||(C[7]=r.createTextVNode()),r.unref(i).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(A.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),C[10]||(C[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(F.value,(k,M)=>(r.openBlock(),r.createBlock(yo,{key:M,option:k,"is-selected":k.isSelected,"is-hovered":k.isActive,size:A.optionSize,onClick:r.withModifiers(W=>V(k.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),C[8]||(C[8]=r.createTextVNode()),F.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",ax,"Nothing found"))],512)):r.createCommentVNode("",!0),C[11]||(C[11]=r.createTextVNode()),r.createVNode(vr,{class:"ui-dropdown__contour"})])],42,ex),C[12]||(C[12]=r.createTextVNode()),E.value?(r.openBlock(),r.createElementBlock("div",lx,r.toDisplayString(E.value),1)):y.value&&A.loadingOptionsHelper?(r.openBlock(),r.createElementBlock("div",cx,r.toDisplayString(A.loadingOptionsHelper),1)):A.helper?(r.openBlock(),r.createElementBlock("div",dx,r.toDisplayString(A.helper),1)):r.createCommentVNode("",!0)]))}}),hx={key:0,class:"ui-progress-bar"},fx={class:"ui-progress-bar__messages d-flex align-center pl-6 pr-6"},mx={class:"ui-progress-bar__message flex-grow-1"},gx={class:"ui-progress-bar__percent"},yx=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,i)=>o.loading?(r.openBlock(),r.createElementBlock("div",hx,[r.createElementVNode("div",{class:"ui-progress-bar__indicator",style:r.normalizeStyle({width:o.progress+"%"})},null,4),i[1]||(i[1]=r.createTextVNode()),r.createElementVNode("div",fx,[r.createElementVNode("div",mx,r.toDisplayString(n.value),1),i[0]||(i[0]=r.createTextVNode()),r.createElementVNode("div",gx,r.toDisplayString(o.progress+"%"),1)])])):r.createCommentVNode("",!0)}}),vx={class:"mi-number-field__main-wrapper d-flex"},_x={class:"mi-number-field__wrapper flex-grow d-flex flex-align-center"},Cx={key:0,class:"text-description"},wx=["disabled","placeholder"],bx={class:"mi-number-field__icons d-flex-column"},xx={key:0,class:"mi-number-field__hint text-description"},kx=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,i=r.ref(),l=r.useSlots(),c=r.ref();Xn(i);const d=r.ref(!0),p=r.computed({get(){return d.value&&n.modelValue!==void 0?new Number(n.modelValue).toString():""},set(b){var R;b=b.replace(/,/g,""),x(b)?(o("update:modelValue",+b),b.toString()!==((R=n.modelValue)==null?void 0:R.toString())&&+b===n.modelValue&&b[b.length-1]!=="."&&(d.value=!1,r.nextTick(()=>{d.value=!0}))):(b.trim()===""&&o("update:modelValue",void 0),d.value=!1,r.nextTick(()=>{d.value=!0}))}}),h=r.computed(()=>{let b=[];return n.errorMessage&&b.push(n.errorMessage),x(n.modelValue)?(n.minValue!==void 0&&n.modelValue!==void 0&&n.modelValue<n.minValue&&b.push(`Model value must be higher than ${n.minValue}`),n.maxValue!==void 0&&n.modelValue!==void 0&&n.modelValue>n.maxValue&&b.push(`Model value must be less than ${n.maxValue}`)):b.push("Model value is not a number."),b=[...b],b.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 x(b){return b!==void 0?(b=b==null?void 0:b.toString(),!isNaN(+b)&&!isNaN(parseFloat(b))):!1}function w(){if(!m.value){let b=0;n.modelValue===void 0?b=n.minValue?n.minValue:0:b=+(n.modelValue||0)+n.step,p.value=b.toString()}}function E(){if(!y.value){let b=0;n.modelValue===void 0?b=0:b=+(n.modelValue||0)-n.step,p.value=n.minValue?Math.max(n.minValue,b).toString():b.toString()}}function O(b){["ArrowDown","ArrowUp"].includes(b.code)&&b.preventDefault(),b.code==="ArrowUp"?w():b.code==="ArrowDown"&&E()}const $=b=>{b.detail>1&&b.preventDefault()};return(b,R)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:i,class:r.normalizeClass([{error:!!h.value.trim(),disabled:b.disabled},"mi-number-field d-flex-column"]),onMousedown:$,onKeydown:R[1]||(R[1]=F=>O(F))},[r.createElementVNode("div",vx,[r.createVNode(vr,{class:"mi-number-field__contour"}),R[6]||(R[6]=r.createTextVNode()),r.createElementVNode("div",_x,[b.label?(r.openBlock(),r.createElementBlock("label",Cx,[r.createTextVNode(r.toDisplayString(b.label)+" ",1),r.unref(l).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(b.$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]=F=>p.value=F),disabled:b.disabled,placeholder:b.placeholder,class:"text-s flex-grow"},null,8,wx),[[r.vModelText,p.value]])]),R[7]||(R[7]=r.createTextVNode()),r.createElementVNode("div",bx,[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:w},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:E},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()),h.value.trim()?(r.openBlock(),r.createElementBlock("div",xx,r.toDisplayString(h.value),1)):r.createCommentVNode("",!0)],34))}}),Sx={class:"pl-chip__text"},Gl=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,i)=>(r.openBlock(),r.createBlock(r.unref(xt),{position:"top",class:"pl-chip-tooltip",delay:500},r.createSlots({default:r.withCtx(()=>[i[4]||(i[4]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"chip",ref:e,class:r.normalizeClass(["pl-chip",{small:o.small}])},[r.createElementVNode("div",Sx,[r.renderSlot(o.$slots,"default")]),i[3]||(i[3]=r.createTextVNode()),o.closeable?(r.openBlock(),r.createElementBlock("div",{key:0,tabindex:"0",class:"pl-chip__close",onKeydown:i[0]||(i[0]=r.withKeys(l=>o.$emit("close"),["enter"])),onClick:i[1]||(i[1]=r.withModifiers(l=>o.$emit("close"),["stop"]))},i[2]||(i[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))}}),Ex={class:"pl-multi-dropdown__envelope"},Tx=["tabindex"],Nx={class:"pl-multi-dropdown__container"},Ax={class:"pl-multi-dropdown__field"},Vx=["disabled","placeholder"],Bx={class:"pl-multi-dropdown__append"},Px={key:0},Rx={key:0,class:"required-icon"},Dx={class:"pl-multi-dropdown__open-chips-container"},Ix={key:0,class:"nothing-found"},Fx={key:0,class:"pl-multi-dropdown__error"},Ox={key:1,class:"pl-multi-dropdown__helper"},Lx={name:"PlDropdownMulti"},Mx=r.defineComponent({...Lx,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=H=>n("update:modelValue",H),i=r.useSlots(),l=t,c=r.ref(),d=r.ref(),p=r.ref(),h=r.reactive({search:"",activeOption:-1,open:!1,optionsHeight:0}),m=r.computed(()=>Array.isArray(l.modelValue)?l.modelValue:[]),y=r.computed(()=>h.open&&l.modelValue.length>0?l.placeholder:l.modelValue.length>0?"":l.placeholder),x=r.computed(()=>yr(l.options).filter(H=>Ll(m.value,H.value))),w=r.computed(()=>{const H=r.unref(m),J=yr(l.options);return(h.search?J.filter(G=>{const z=h.search.toLowerCase();return G.label.toLowerCase().includes(z)?!0:typeof G.value=="string"?G.value.toLowerCase().includes(z):G.value===h.search}):[...J]).map(G=>({...G,selected:Ll(H,G.value)}))}),E=r.computed(()=>l.disabled?void 0:"0"),O=()=>{h.activeOption=_i(w.value.findIndex(H=>Ot(H.value,l.modelValue)),H=>H<0?0:H)},$=H=>{var J;const G=r.unref(m);o(Ll(G,H)?G.filter(z=>!Ot(z,H)):[...G,H]),h.search="",(J=c==null?void 0:c.value)==null||J.focus()},b=H=>o(r.unref(m).filter(J=>!Ot(J,H))),R=()=>{var H;return(H=p.value)==null?void 0:H.focus()},F=()=>h.open=!h.open,D=H=>{var J,G;const z=H.relatedTarget;!((J=c.value)!=null&&J.contains(z))&&!((G=d.value)!=null&&G.contains(z))&&(h.search="",h.open=!1)},V=()=>{const H=d.value;H&&ut(H.querySelector(".hovered-item"),J=>{wi(H,J)})},Z=H=>{var J;const{open:G,activeOption:z}=h;if(!G){H.code==="Enter"&&(h.open=!0);return}H.code==="Escape"&&(h.open=!1,(J=c.value)==null||J.focus());const Q=r.unref(w),{length:A}=Q;if(!A)return;["ArrowDown","ArrowUp","Enter"].includes(H.code)&&H.preventDefault(),H.code==="Enter"&&$(Q[z].value);const C=H.code==="ArrowDown"?1:H.code==="ArrowUp"?-1:0;h.activeOption=Math.abs(z+C+A)%A,requestAnimationFrame(V)};Xn(c),r.watch(()=>l.modelValue,()=>O(),{immediate:!0}),r.watchPostEffect(()=>{h.search,h.open&&V()});const ne=r.reactive({top:"0px",left:"0px",width:"0px"});return r.watch(d,H=>{if(H){const J=H.getBoundingClientRect();h.optionsHeight=J.height,window.dispatchEvent(new CustomEvent("adjust"))}}),vo(c,H=>{const J=H.top+H.height+5;J+h.optionsHeight>H.clientHeight?ne.top=H.top-h.optionsHeight-5+"px":ne.top=J+"px",ne.left=H.left+"px",ne.width=H.width+"px"}),(H,J)=>(r.openBlock(),r.createElementBlock("div",Ex,[r.createElementVNode("div",{ref_key:"rootRef",ref:c,tabindex:E.value,class:r.normalizeClass(["pl-multi-dropdown",{open:h.open,error:H.error,disabled:H.disabled}]),onKeydown:Z,onFocusout:D},[r.createElementVNode("div",Nx,[r.createElementVNode("div",Ax,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:p,"onUpdate:modelValue":J[0]||(J[0]=G=>h.search=G),type:"text",tabindex:"-1",disabled:H.disabled,placeholder:y.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:J[1]||(J[1]=G=>h.open=!0)},null,40,Vx),[[r.vModelText,h.search]]),J[3]||(J[3]=r.createTextVNode()),h.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(x.value,(G,z)=>(r.openBlock(),r.createBlock(r.unref(Gl),{key:z,closeable:"",small:"",onClick:J[2]||(J[2]=r.withModifiers(Q=>h.open=!0,["stop"])),onClose:Q=>b(G.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(G.label||G.value),1)]),_:2},1032,["onClose"]))),128))])),J[4]||(J[4]=r.createTextVNode()),r.createElementVNode("div",{class:"arrow",onClick:r.withModifiers(F,["stop"])}),J[5]||(J[5]=r.createTextVNode()),r.createElementVNode("div",Bx,[r.renderSlot(H.$slots,"append")])]),J[10]||(J[10]=r.createTextVNode()),H.label?(r.openBlock(),r.createElementBlock("label",Px,[H.required?(r.openBlock(),r.createElementBlock("i",Rx)):r.createCommentVNode("",!0),J[6]||(J[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(H.label),1),J[7]||(J[7]=r.createTextVNode()),r.unref(i).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(H.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),J[11]||(J[11]=r.createTextVNode()),h.open?(r.openBlock(),r.createBlock(r.Teleport,{key:1,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:d,class:"pl-multi-dropdown__options",style:r.normalizeStyle(ne),tabindex:"-1",onFocusout:D},[r.createElementVNode("div",Dx,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(x.value,(G,z)=>(r.openBlock(),r.createBlock(r.unref(Gl),{key:z,closeable:"",small:"",onClose:Q=>b(G.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(G.label||G.value),1)]),_:2},1032,["onClose"]))),128))]),J[8]||(J[8]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w.value,(G,z)=>(r.openBlock(),r.createBlock(yo,{key:z,option:G,"text-item":"text","is-selected":G.selected,"is-hovered":h.activeOption==z,size:"medium","use-checkbox":"",onClick:r.withModifiers(Q=>$(G.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128)),J[9]||(J[9]=r.createTextVNode()),w.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Ix,"Nothing found"))],36)])):r.createCommentVNode("",!0),J[12]||(J[12]=r.createTextVNode()),r.createVNode(vr,{class:"pl-multi-dropdown__contour"})])],42,Tx),J[13]||(J[13]=r.createTextVNode()),H.error?(r.openBlock(),r.createElementBlock("div",Fx,r.toDisplayString(H.error),1)):H.helper?(r.openBlock(),r.createElementBlock("div",Ox,r.toDisplayString(H.helper),1)):r.createCommentVNode("",!0)]))}}),$l=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,i)=>(r.openBlock(),r.createElementBlock("div",{tabindex:"0",class:r.normalizeClass(["pl-checkbox-base",{checked:n.value,disabled:o.disabled}]),onClick:i[0]||(i[0]=l=>o.$emit("update:modelValue",!o.modelValue)),onKeydown:i[1]||(i[1]=r.withKeys(l=>o.$emit("update:modelValue",!o.modelValue),["enter"]))},null,34))}}),Gx={name:"PlCheckbox"},$x=r.defineComponent({...Gx,props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t){const e=t,n=r.useSlots();return(o,i)=>r.unref(n).default?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["pl-checkbox",{disabled:o.disabled}])},[r.createVNode($l,r.mergeProps(e,{"onUpdate:modelValue":i[0]||(i[0]=l=>o.$emit("update:modelValue",l))}),null,16),i[3]||(i[3]=r.createTextVNode()),r.createElementVNode("label",{onClick:i[1]||(i[1]=l=>o.$emit("update:modelValue",!o.$props.modelValue))},[r.renderSlot(o.$slots,"default")])],2)):(r.openBlock(),r.createBlock($l,r.mergeProps({key:1},e,{"onUpdate:modelValue":i[2]||(i[2]=l=>o.$emit("update:modelValue",l))}),null,16))}}),zx={key:0},Ux=["onClick"],Zx={name:"PlCheckboxGroup"},Wx=r.defineComponent({...Zx,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,i=c=>o.modelValue.includes(c),l=c=>{const d=o.modelValue??[];n("update:modelValue",i(c)?d.filter(p=>p!==c):[...d,c])};return(c,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-checkbox-group",{disabled:c.disabled}])},[c.label?(r.openBlock(),r.createElementBlock("label",zx,r.toDisplayString(c.label),1)):r.createCommentVNode("",!0),d[1]||(d[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,h)=>(r.openBlock(),r.createElementBlock("div",{key:h},[r.createVNode($l,{disabled:c.disabled,label:p.label,"model-value":i(p.value),"onUpdate:modelValue":()=>l(p.value)},null,8,["disabled","label","model-value","onUpdate:modelValue"]),d[0]||(d[0]=r.createTextVNode()),r.createElementVNode("label",{onClick:r.withModifiers(()=>l(p.value),["stop"])},r.toDisplayString(p.label),9,Ux)]))),128))],2))}}),jx="_component_tupwt_1",Hx={component:jx},qx={};function Kx(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 Xx={$style:Hx},wp=Zt(qx,[["render",Kx],["__cssModules",Xx]]),Yx={key:1,class:"pl-dialog-modal__title"},Jx={inheritAttrs:!1},zl=r.defineComponent({...Jx,__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,i=t,l=r.ref(),c=r.useAttrs();function d(p){l.value&&i.closeOnOutsideClick&&document.contains(p.target)&&!l.value.contains(p.target)&&o("update:modelValue",!1)}return st(document.body,"keyup",p=>{i.modelValue&&p.code==="Escape"&&o("update:modelValue",!1)}),(p,h)=>(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:d},[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(wp,{key:0,class:"close-modal-btn",onClick:h[0]||(h[0]=r.withModifiers(m=>o("update:modelValue",!1),["stop"]))})):r.createCommentVNode("",!0),h[1]||(h[1]=r.createTextVNode()),r.unref(n).title?(r.openBlock(),r.createElementBlock("div",Yx,[r.renderSlot(p.$slots,"title")])):r.createCommentVNode("",!0),h[2]||(h[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),h[3]||(h[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})]))}}),Qx=r.defineComponent({__name:"TransitionSlidePanel",setup(t){function e(){window.dispatchEvent(new CustomEvent("adjust"))}function n(){window.dispatchEvent(new CustomEvent("adjust"))}return(o,i)=>(r.openBlock(),r.createBlock(r.Transition,{name:"slide-panel",onAfterEnter:e,onAfterLeave:n},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3}))}}),ek={key:0,class:"pl-slide-modal__title"},tk={class:"pl-slide-modal__content"},nk={key:1,class:"pl-slide-modal__actions"},rk={name:"PlSlideModal",inheritAttrs:!1},Vs=r.defineComponent({...rk,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,i=t,l=r.ref(),c=r.useAttrs();return As(l,()=>{i.modelValue&&i.closeOnOutsideClick&&o("update:modelValue",!1)}),st(document,"keydown",d=>{d.key==="Escape"&&o("update:modelValue",!1)}),(d,p)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(Qx,null,{default:r.withCtx(()=>[d.modelValue?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref_key:"modal",ref:l,style:{width:d.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(h=>o("update:modelValue",!1),["esc"]))}),[r.createElementVNode("div",{class:"close-dialog-btn",onClick:p[0]||(p[0]=h=>o("update:modelValue",!1))}),p[3]||(p[3]=r.createTextVNode()),r.unref(n).title?(r.openBlock(),r.createElementBlock("div",ek,[r.renderSlot(d.$slots,"title")])):r.createCommentVNode("",!0),p[4]||(p[4]=r.createTextVNode()),r.createElementVNode("div",tk,[r.renderSlot(d.$slots,"default")]),p[5]||(p[5]=r.createTextVNode()),r.unref(n).actions?(r.openBlock(),r.createElementBlock("div",nk,[r.renderSlot(d.$slots,"actions")])):r.createCommentVNode("",!0)],16)):r.createCommentVNode("",!0)]),_:3}),p[6]||(p[6]=r.createTextVNode()),d.modelValue&&d.shadow?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-slide-modal__shadow",onKeyup:p[2]||(p[2]=r.withKeys(h=>o("update:modelValue",!1),["esc"]))},null,32)):r.createCommentVNode("",!0)]))}}),ok={key:0,class:"label"},ik={name:"PlToggleSwitch"},Bs=r.defineComponent({...ik,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",ok,r.toDisplayString(e.label),1)):r.createCommentVNode("",!0)],34))}});function bp(t){return r.getCurrentScope()?(r.onScopeDispose(t),!0):!1}function sk(t){return r.unref(t)}const ak=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function lk(t,e,n={}){const{immediate:o=!0}=n,i=r.ref(!1);let l=null;function c(){l&&(clearTimeout(l),l=null)}function d(){i.value=!1,c()}function p(...h){c(),i.value=!0,l=setTimeout(()=>{i.value=!1,l=null,t(...h)},sk(e))}return o&&(i.value=!0,ak&&p()),bp(d),{isPending:r.readonly(i),start:p,stop:d}}function ck(t,e,n){return r.watch(t,(o,i,l)=>{o&&e(o,i,l)},{...n,once:!1})}function dk(t,e,n){const{start:o}=lk(l,e,{immediate:!1}),i=r.ref(!1);async function l(){i.value&&(await t(),o())}function c(){i.value||(i.value=!0,l())}function d(){i.value=!1}return n!=null&&n.immediate&&c(),bp(d),{isActive:i,pause:d,resume:c}}const uk="[==PROGRESS==]";function pk(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function hk(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 d=t.mockPlatforma??window.platforma;if(!d){console.warn("Platforma API is not available");return}for(;;){const p=await d.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 h=t.progressPrefix??uk,m=new TextDecoder().decode(p.data).replace(new RegExp(`${pk(h)}`,"g"),"");if(c=Object.assign(c,{lines:c.lines+m,lastOffset:p.newOffset,finished:!p.live}),p.newOffset>=p.size)break}}const i=dk(()=>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 ck(()=>{var l;return(l=e==null?void 0:e.value)==null?void 0:l.finished},()=>i.pause()),r.watch(()=>t.logHandle,l=>{var c;l===void 0?(e.value=void 0,i.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,i.resume())},{immediate:!0}),e}const fk={key:0},mk={class:"pl-log-view__copy"},gk={key:1,class:"pl-log-view__error"},yk={name:"PlLogView"},xp=r.defineComponent({...yk,props:{value:{},logHandle:{},progressPrefix:{},error:{},output:{},maxRetries:{},mockPlatforma:{},label:{}},setup(t){const e=E=>{if(E&&E.ok===!1)return E.errors.join(`
|
|
53
|
+
`)},n=t,o=hk(n),i=r.ref(!0),l=r.ref(),c=r.ref(),d=r.computed(()=>{var E;return((E=o.value)==null?void 0:E.error)??n.error??e(n.output)}),p=r.computed(()=>{var E;return((E=o.value)==null?void 0:E.lines)??n.value??K_(n.output)}),h=r.ref(!1);Xn(c);const m=r.computed(()=>h.value?"clipboard-copied":"clipboard"),y=()=>{h.value=!0,setTimeout(()=>{h.value=!1},1200),p.value&&typeof p.value=="string"&&navigator.clipboard.writeText(p.value)},x=()=>{Zr(l.value,E=>{i.value&&E.scrollTo(E.scrollLeft,E.scrollHeight)})};r.watch(p,()=>{requestAnimationFrame(()=>{x()})},{immediate:!0});const w=E=>{const O=E.target;i.value=O.scrollTop+20>=O.scrollHeight-O.offsetHeight};return(E,O)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:c,class:r.normalizeClass(["pl-log-view",{"has-error":d.value}])},[E.label?(r.openBlock(),r.createElementBlock("label",fk,r.toDisplayString(E.label),1)):r.createCommentVNode("",!0),O[1]||(O[1]=r.createTextVNode()),r.createVNode(vr,{class:"pl-log-view__contour"}),O[2]||(O[2]=r.createTextVNode()),r.createElementVNode("div",mk,[r.createVNode(r.unref(xt),{"close-delay":800,position:"top"},{tooltip:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(h.value?"copied":"copy"),1)]),default:r.withCtx(()=>[r.createVNode(r.unref(Lt),{title:"Copy content",name:m.value,onClick:y},null,8,["name"]),O[0]||(O[0]=r.createTextVNode())]),_:1})]),O[3]||(O[3]=r.createTextVNode()),d.value?(r.openBlock(),r.createElementBlock("div",gk,r.toDisplayString(d.value),1)):(r.openBlock(),r.createElementBlock("div",{key:2,ref_key:"contentRef",ref:l,class:"pl-log-view__content",onScroll:w},r.toDisplayString(p.value),545))],2))}}),vk="_component_1ukal_1",_k="_tab_1ukal_14",Ck="_disabled_1ukal_27",wk="_active_1ukal_56",bk="_topLine_1ukal_69",bo={component:vk,tab:_k,disabled:Ck,active:wk,topLine:bk},xk=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 i=o.$el.querySelector("span");i&&requestAnimationFrame(()=>{i.offsetWidth<i.scrollWidth&&(n.isOverflown=!0)})}),(o,i)=>(r.openBlock(),r.createBlock(r.unref(xt),{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"),i[0]||(i[0]=r.createTextVNode())]),_:3},8,["hide","data-is-overflown"]))}}),kk={name:"PlTabs"},Sk=r.defineComponent({...kk,props:{modelValue:{},options:{},disabled:{type:Boolean},topLine:{type:Boolean},maxTabWidth:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=i=>n("update:modelValue",i);return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(bo).component,{[r.unref(bo).disabled]:i.disabled,[r.unref(bo).topLine]:i.topLine}])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.options,(c,d)=>(r.openBlock(),r.createBlock(xk,{key:d,tabindex:i.modelValue===c.value||i.disabled||c.disabled?void 0:0,option:c,class:r.normalizeClass([{[r.unref(bo).active]:i.modelValue===c.value,[r.unref(bo).disabled]:c.disabled},r.unref(bo).tab]),style:r.normalizeStyle({"--pl-tabs-item-max-width":c.maxWidth??i.maxTabWidth}),onKeydown:r.withKeys(p=>o(c.value),["enter"]),onClick:p=>o(c.value)},{default:r.withCtx(()=>[r.renderSlot(i.$slots,c.value,{option:c},()=>[r.createElementVNode("span",null,r.toDisplayString(c.label),1)])]),_:2},1032,["tabindex","option","class","style","onKeydown","onClick"]))),128))],2))}}),Ek=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))}}),Tk="_compact_rhd5u_16",Nk="_content_rhd5u_20",Ak={compact:Tk,content:Nk},Vk={$style:Ak},kp=Zt(Ek,[["__cssModules",Vk]]),Bk=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,i)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.renderSlot(o.$slots,"header"),i[0]||(i[0]=r.createTextVNode()),r.renderSlot(o.$slots,"default")],64))}}),Pk=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,i)=>(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}))}}),Rk=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"),i=Uu(),l=r.computed(()=>!n||n.value.multiple),c=r.computed({get(){return l.value?o.value:e?e.value===i:o.value},set(d){l.value?o.value=d:e&&(e.value=e.value===i?"":i)}});return(d,p)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(r.unref(kp),{class:r.normalizeClass(d.$style.separator),compact:d.compact,onClick:p[0]||(p[0]=h=>c.value=!c.value)},{default:r.withCtx(()=>[r.createVNode(r.unref(fn),{name:"chevron-right",class:r.normalizeClass([{[d.$style.down]:c.value},d.$style.chevron])},null,8,["class"]),r.createTextVNode(" "+r.toDisplayString(d.label),1)]),_:1},8,["class","compact"]),p[1]||(p[1]=r.createTextVNode()),r.createVNode(Pk,null,{default:r.withCtx(()=>[c.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(d.$style.content)},[r.renderSlot(d.$slots,"default")],2)):r.createCommentVNode("",!0)]),_:3})],64))}}),Dk="_content_jmjfk_2",Ik="_separator_jmjfk_14",Fk="_chevron_jmjfk_19",Ok="_down_jmjfk_23",Lk={content:Dk,separator:Ik,chevron:Fk,down:Ok},Mk={$style:Lk},Gk=Zt(Rk,[["__cssModules",Mk]]),$k="_component_1ietr_1",zk="_local_1ietr_1",Uk="_supported_1ietr_26",Zk="_remote_1ietr_32",Wk="_search_1ietr_40",jk="_selected_1ietr_72",Hk="_breadcrumbs_1ietr_86",qk="_cat_1ietr_116",Kk="_message_1ietr_122",Xk="_isFile_1ietr_197",Yk="_isDir_1ietr_201",Jk="_canBeSelected_1ietr_207",Qk="_spin_1ietr_1",ct={component:$k,local:zk,supported:Uk,remote:Zk,search:Wk,"ls-container":"_ls-container_1ietr_50","ls-head":"_ls-head_1ietr_57",selected:jk,breadcrumbs:Hk,"ls-error":"_ls-error_1ietr_108",cat:qk,message:Kk,"ls-empty":"_ls-empty_1ietr_131","ls-body":"_ls-body_1ietr_152",isFile:Xk,isDir:Yk,canBeSelected:Jk,"ls-loader":"_ls-loader_1ietr_213","loader-icon":"_loader-icon_1ietr_221",spin:Qk};function Sp(t){return t?t.map(e=>"."+J_(e,["."])):void 0}function eS(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(i=>i!=="").join("/")});return n}const Ep=()=>({dirPath:"",search:"",storageEntry:void 0,items:[],error:"",storageOptions:[],selected:[],lastSelected:void 0,currentLoadingPath:void 0,showHiddenItems:!1});function tS(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 Tp={mounted:t=>{if(t.clientWidth<t.scrollWidth){const e=t.innerText;t.innerText=e.substring(0,57)+"..."+e.substring(e.length-10)}}},nS=["title","onClick"],rS={key:0,class:"ls-loader"},oS=["onClick"],iS=["title"],sS=["onClick"],aS=["title"],lS=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(Ep()),i=()=>{o.search="",o.error="",o.lastSelected=void 0},l=r.computed(()=>Sp(n.extensions)),c=tS(o),d=r.computed(()=>{var D;return{modelValue:n.modelValue,dirPath:o.dirPath,storageHandle:(D=o.storageEntry)==null?void 0:D.handle}}),p=(D,V)=>{window.platforma&&o.currentLoadingPath!==V&&(o.currentLoadingPath=V,window.platforma.lsDriver.listFiles(D,V).then(Z=>{V===o.dirPath&&(o.items=ks(Z).entries.map(ne=>({path:ne.fullPath,name:ne.name,isDir:ne.type==="dir",canBeSelected:ne.type==="file"&&(!l.value||l.value.some(H=>ne.fullPath.endsWith(H))),handle:ne.type==="file"?ne.handle:void 0,selected:!1})).sort((ne,H)=>ne.isDir&&!H.isDir?-1:!ne.isDir&&H.isDir?1:ne.name.localeCompare(H.name)).map((ne,H)=>({id:H,...ne})),o.lastSelected=void 0)}).catch(Z=>o.error=String(Z)).finally(()=>{o.currentLoadingPath=void 0}))},h=()=>{i();const{storageHandle:D,dirPath:V,modelValue:Z}=d.value;D&&Z&&p(D,V)},m=r.computed(()=>eS(o.dirPath)),y=r.computed(()=>o.items.filter(D=>D.canBeSelected&&D.selected&&!D.isDir)),x=r.computed(()=>{var D;return y.value.length>0&&((D=o.storageEntry)==null?void 0:D.handle)}),w=()=>{var D;return{storageHandle:ks((D=o.storageEntry)==null?void 0:D.handle),files:y.value.map(V=>V.handle)}},E=D=>{o.dirPath=D},O=(D,V)=>{const{shiftKey:Z,metaKey:ne}=D,{lastSelected:H}=o;if(D.preventDefault(),V.canBeSelected){if(n.multi||o.items.forEach(J=>J.selected=!1),V.selected=!0,!n.multi)return;!ne&&!Z&&o.items.forEach(J=>{J.id!==V.id&&(J.selected=!1)}),Z&&H!==void 0&&o.items.forEach(J=>{j_(J.id,H,V.id)&&(J.selected=!0)}),V.selected&&(o.lastSelected=V.id)}},$=D=>{D&&!n.multi||o.items.filter(V=>V.canBeSelected).forEach(V=>{V.selected=D})},b=()=>$(!0),R=()=>$(!1),F=()=>{if(i(),R(),!window.platforma){console.warn("platforma API is not found");return}window.platforma.lsDriver.getStorageList().then(D=>{o.storageOptions=D.map(V=>({text:V.name,value:V})),n.autoSelectStorage&&Zr(D.find(V=>V.name==="local"||V.name.startsWith("local_disk_")&&V.initialFullPath.length>4),V=>{o.storageEntry=V})}).catch(D=>o.error=String(D))};return r.watch(r.toRef(o,"storageEntry"),D=>{i(),o.dirPath=(D==null?void 0:D.initialFullPath)??""},{immediate:!0}),r.watch([()=>o.dirPath,()=>o.storageEntry],()=>{h()}),r.watch(()=>n.modelValue,D=>{D?F():Object.assign(o,Ep())},{immediate:!0}),st(document,"keydown",D=>{n.modelValue&&D.target===document.body&&(D.metaKey&&D.code==="KeyA"&&(D.preventDefault(),b()),D.metaKey&&D.shiftKey&&D.code==="Period"&&(D.preventDefault(),o.showHiddenItems=!o.showHiddenItems),D.code==="Enter"&&n.submit())}),e({isReady:x,getFilesToImport:w}),r.onMounted(F),(D,V)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(ct).remote),onClick:r.withModifiers(R,["stop"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).search)},[r.createElementVNode("div",null,[r.createVNode(r.unref(wo),{modelValue:o.storageEntry,"onUpdate:modelValue":V[0]||(V[0]=Z=>o.storageEntry=Z),label:"Select storage",options:o.storageOptions},null,8,["modelValue","options"])]),V[2]||(V[2]=r.createTextVNode()),r.createElementVNode("div",null,[r.createVNode(r.unref(gp),{modelValue:o.search,"onUpdate:modelValue":V[1]||(V[1]=Z=>o.search=Z),label:"Search in folder",clearable:""},null,8,["modelValue"])])],2),V[12]||(V[12]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct)["ls-container"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct)["ls-head"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).breadcrumbs)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.value,(Z,ne)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:ne},[r.createElementVNode("div",{title:Z.path,onClick:H=>E(Z.path)},r.toDisplayString(Z.name),9,nS),V[3]||(V[3]=r.createTextVNode()),Z.index!==m.value.length-1?(r.openBlock(),r.createBlock(r.unref(Co),{key:0,name:"chevron-right"})):r.createCommentVNode("",!0)],64))),128))],2),V[4]||(V[4]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).selected)},"Selected: "+r.toDisplayString(y.value.length),3)],2),V[11]||(V[11]=r.createTextVNode()),o.currentLoadingPath!==void 0?(r.openBlock(),r.createElementBlock("div",rS,V[5]||(V[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(ct)["ls-error"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).cat)},null,2),V[7]||(V[7]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).message)},r.toDisplayString(o.error),3)],2)):(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(r.unref(ct)["ls-body"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(c),Z=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:Z.id},[Z.isDir?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(r.unref(ct).isDir),onClick:ne=>E(Z.path)},[V[8]||(V[8]=r.createElementVNode("i",{class:"icon-16 icon-chevron-right"},null,-1)),V[9]||(V[9]=r.createTextVNode()),r.withDirectives((r.openBlock(),r.createElementBlock("span",{title:Z.name},[r.createTextVNode(r.toDisplayString(Z.name),1)],8,iS)),[[r.unref(Tp)]])],10,oS)):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass({[r.unref(ct).canBeSelected]:Z.canBeSelected,[r.unref(ct).selected]:Z.selected}),onClick:r.withModifiers(ne=>O(ne,Z),["stop"])},[r.createElementVNode("i",{class:r.normalizeClass(["mask-16 mask-box",r.unref(ct).isFile])},null,2),V[10]||(V[10]=r.createTextVNode()),r.withDirectives((r.openBlock(),r.createElementBlock("span",{title:Z.name},[r.createTextVNode(r.toDisplayString(Z.name),1)],8,aS)),[[r.unref(Tp)]])],10,sS))],64))),128))],2)):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(r.unref(ct)["ls-empty"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).cat)},null,2),V[6]||(V[6]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).message)},"Select storage to preview",2)],2))],2)],2))}}),cS={key:1,class:"alert-error"},dS=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"),i=async c=>{var d,p,h;const m=(p=(d=window.platforma)==null?void 0:d.lsDriver)==null?void 0:p.fileToImportHandle;if(!m)return console.error("API platforma.lsDriver.fileToImportHandle is not available");const y=Sp(e.extensions),x=await Promise.all([...((h=c.dataTransfer)==null?void 0:h.files)??[]].filter(w=>!!w).filter(w=>y?y.some(E=>w.name.endsWith(E)):!0).map(w=>m(w)));x.length&&e.importFiles({files:x})},l=async()=>{var c,d;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:h})=>{h&&e.importFiles({files:h})}).catch(h=>n.error=h):(d=window.platforma)==null||d.lsDriver.showOpenSingleFileDialog({title:"Select file to import",filters:p}).then(({file:h})=>{h&&e.importFiles({files:[h]})}).catch(h=>n.error=h)};return(c,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(ct).local),onDrop:i,onDragover:d[0]||(d[0]=r.withModifiers(()=>{},["prevent"])),onClick:l},[r.createVNode(r.unref(Ci),{name:"cloud-upload"}),d[1]||(d[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(o.value),1),d[2]||(d[2]=r.createTextVNode()),c.extensions?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(r.unref(ct).supported)},"Supported formats: "+r.toDisplayString(c.extensions.join(", ")),3)):r.createCommentVNode("",!0),d[3]||(d[3]=r.createTextVNode()),n.error?(r.openBlock(),r.createElementBlock("span",cS,r.toDisplayString(n.error),1)):r.createCommentVNode("",!0)],34))}}),uS={style:{margin:"0 24px"}},Np=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,i=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"}],d=()=>n("update:modelValue",!1),p=r.useTemplateRef("remote"),h=()=>{var y,x;(y=p.value)!=null&&y.isReady&&(n("import:files",ks((x=p.value)==null?void 0:x.getFilesToImport())),d())},m=y=>{n("import:files",y),d()};return(y,x)=>(r.openBlock(),r.createBlock(r.unref(zl),{"no-content-gutters":!0,"close-on-outside-click":y.closeOnOutsideClick,class:r.normalizeClass(["pl-dialog-modal",r.unref(ct).component]),"model-value":y.modelValue,width:"688px",height:"720px","onUpdate:modelValue":d},r.createSlots({title:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(y.title??l.value),1)]),default:r.withCtx(()=>[x[4]||(x[4]=r.createTextVNode()),r.createElementVNode("div",uS,[r.createVNode(r.unref(dp),{modelValue:i.value,"onUpdate:modelValue":x[0]||(x[0]=w=>i.value=w),options:c},null,8,["modelValue"])]),x[5]||(x[5]=r.createTextVNode()),i.value==="remote"?(r.openBlock(),r.createBlock(lS,r.mergeProps({key:0,ref:"remote"},y.$props,{submit:h}),null,16)):r.createCommentVNode("",!0),x[6]||(x[6]=r.createTextVNode()),i.value==="local"?(r.openBlock(),r.createBlock(dS,r.mergeProps({key:1,"import-files":m},y.$props),null,16)):r.createCommentVNode("",!0),x[7]||(x[7]=r.createTextVNode())]),_:2},[i.value==="remote"?{name:"actions",fn:r.withCtx(()=>{var w;return[r.createVNode(r.unref(Ns),{style:{"min-width":"160px"},disabled:!((w=r.unref(p))!=null&&w.isReady),onClick:r.withModifiers(h,["stop"])},{default:r.withCtx(()=>x[1]||(x[1]=[r.createTextVNode("Import")])),_:1},8,["disabled"]),x[3]||(x[3]=r.createTextVNode()),r.createVNode(r.unref(_o),{"justify-center":!1,onClick:r.withModifiers(d,["stop"])},{default:r.withCtx(()=>x[2]||(x[2]=[r.createTextVNode("Cancel")])),_:1})]}),key:"0"}:void 0]),1032,["close-on-outside-click","class","model-value"]))}});var $e;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const l={};for(const c of i)l[c]=c;return l},t.getValidEnumValues=i=>{const l=t.objectKeys(i).filter(d=>typeof i[i[d]]!="number"),c={};for(const d of l)c[d]=i[d];return t.objectValues(c)},t.objectValues=i=>t.objectKeys(i).map(function(l){return i[l]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const l=[];for(const c in i)Object.prototype.hasOwnProperty.call(i,c)&&l.push(c);return l},t.find=(i,l)=>{for(const c of i)if(l(c))return c},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function o(i,l=" | "){return i.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}t.joinValues=o,t.jsonStringifyReplacer=(i,l)=>typeof l=="bigint"?l.toString():l})($e||($e={}));var Ul;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Ul||(Ul={}));const ce=$e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),_r=t=>{switch(typeof t){case"undefined":return ce.undefined;case"string":return ce.string;case"number":return isNaN(t)?ce.nan:ce.number;case"boolean":return ce.boolean;case"function":return ce.function;case"bigint":return ce.bigint;case"symbol":return ce.symbol;case"object":return Array.isArray(t)?ce.array:t===null?ce.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ce.promise:typeof Map<"u"&&t instanceof Map?ce.map:typeof Set<"u"&&t instanceof Set?ce.set:typeof Date<"u"&&t instanceof Date?ce.date:ce.object;default:return ce.unknown}},te=$e.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"]),pS=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Wt 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:[]},i=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(i);else if(c.code==="invalid_return_type")i(c.returnTypeError);else if(c.code==="invalid_arguments")i(c.argumentsError);else if(c.path.length===0)o._errors.push(n(c));else{let d=o,p=0;for(;p<c.path.length;){const h=c.path[p];p===c.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(c))):d[h]=d[h]||{_errors:[]},d=d[h],p++}}};return i(this),o}static assert(e){if(!(e instanceof Wt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,$e.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},o=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):o.push(e(i));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}Wt.create=t=>new Wt(t);const xo=(t,e)=>{let n;switch(t.code){case te.invalid_type:t.received===ce.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case te.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,$e.jsonStringifyReplacer)}`;break;case te.unrecognized_keys:n=`Unrecognized key(s) in object: ${$e.joinValues(t.keys,", ")}`;break;case te.invalid_union:n="Invalid input";break;case te.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${$e.joinValues(t.options)}`;break;case te.invalid_enum_value:n=`Invalid enum value. Expected ${$e.joinValues(t.options)}, received '${t.received}'`;break;case te.invalid_arguments:n="Invalid function arguments";break;case te.invalid_return_type:n="Invalid function return type";break;case te.invalid_date:n="Invalid date";break;case te.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}"`:$e.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case te.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 te.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 te.custom:n="Invalid input";break;case te.invalid_intersection_types:n="Intersection results could not be merged";break;case te.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case te.not_finite:n="Number must be finite";break;default:n=e.defaultError,$e.assertNever(t)}return{message:n}};let Ap=xo;function hS(t){Ap=t}function Ps(){return Ap}const Rs=t=>{const{data:e,path:n,errorMaps:o,issueData:i}=t,l=[...n,...i.path||[]],c={...i,path:l};if(i.message!==void 0)return{...i,path:l,message:i.message};let d="";const p=o.filter(h=>!!h).slice().reverse();for(const h of p)d=h(c,{data:e,defaultError:d}).message;return{...i,path:l,message:d}},fS=[];function ae(t,e){const n=Ps(),o=Rs({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===xo?void 0:xo].filter(i=>!!i)});t.common.issues.push(o)}class kt{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 i of n){if(i.status==="aborted")return xe;i.status==="dirty"&&e.dirty(),o.push(i.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,n){const o=[];for(const i of n){const l=await i.key,c=await i.value;o.push({key:l,value:c})}return kt.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const i of n){const{key:l,value:c}=i;if(l.status==="aborted"||c.status==="aborted")return xe;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||i.alwaysSet)&&(o[l.value]=c.value)}return{status:e.value,value:o}}}const xe=Object.freeze({status:"aborted"}),Ds=t=>({status:"dirty",value:t}),Vt=t=>({status:"valid",value:t}),Zl=t=>t.status==="aborted",Wl=t=>t.status==="dirty",bi=t=>t.status==="valid",xi=t=>typeof Promise<"u"&&t instanceof Promise;function Is(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 Vp(t,e,n,o,i){if(typeof e=="function"?t!==e||!i:!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 me;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(me||(me={}));var ki,Si;class Mn{constructor(e,n,o,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=o,this._key=i}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 Bp=(t,e)=>{if(bi(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 Wt(t.common.issues);return this._error=n,this._error}}};function Ve(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:i}=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:i}:{errorMap:(l,c)=>{var d,p;const{message:h}=t;return l.code==="invalid_enum_value"?{message:h??c.defaultError}:typeof c.data>"u"?{message:(d=h??o)!==null&&d!==void 0?d:c.defaultError}:l.code!=="invalid_type"?{message:c.defaultError}:{message:(p=h??n)!==null&&p!==void 0?p:c.defaultError}},description:i}}class Re{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 _r(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:_r(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new kt,ctx:{common:e.parent.common,data:e.data,parsedType:_r(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(xi(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 i={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:_r(e)},l=this._parseSync({data:e,path:i.path,parent:i});return Bp(i,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:_r(e)},i=this._parse({data:e,path:o.path,parent:o}),l=await(xi(i)?i:Promise.resolve(i));return Bp(o,l)}refine(e,n){const o=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,l)=>{const c=e(i),d=()=>l.addIssue({code:te.custom,...o(i)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(d(),!1)):c?!0:(d(),!1)})}refinement(e,n){return this._refinement((o,i)=>e(o)?!0:(i.addIssue(typeof n=="function"?n(o,i):n),!1))}_refinement(e){return new yn({schema:this,typeName:we.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return $n.create(this,this._def)}nullable(){return kr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return gn.create(this,this._def)}promise(){return To.create(this,this._def)}or(e){return Ai.create([this,e],this._def)}and(e){return Vi.create(this,e,this._def)}transform(e){return new yn({...Ve(this._def),schema:this,typeName:we.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new Ii({...Ve(this._def),innerType:this,defaultValue:n,typeName:we.ZodDefault})}brand(){return new ql({typeName:we.ZodBranded,type:this,...Ve(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Fi({...Ve(this._def),innerType:this,catchValue:n,typeName:we.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Oi.create(this,e)}readonly(){return Li.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const mS=/^c[^\s-]{8,}$/i,gS=/^[0-9a-z]+$/,yS=/^[0-9A-HJKMNP-TV-Z]{26}$/,vS=/^[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,_S=/^[a-z0-9_-]{21}$/i,CS=/^[-+]?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)?)??$/,wS=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,bS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let jl;const xS=/^(?:(?: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])$/,kS=/^(([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})))$/,SS=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Pp="((\\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])))",ES=new RegExp(`^${Pp}$`);function Rp(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 TS(t){return new RegExp(`^${Rp(t)}$`)}function Dp(t){let e=`${Pp}T${Rp(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 NS(t,e){return!!((e==="v4"||!e)&&xS.test(t)||(e==="v6"||!e)&&kS.test(t))}class mn extends Re{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ce.string){const i=this._getOrReturnCtx(e);return ae(i,{code:te.invalid_type,expected:ce.string,received:i.parsedType}),xe}const n=new kt;let o;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),ae(o,{code:te.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(o=this._getOrReturnCtx(e,o),ae(o,{code:te.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const l=e.data.length>i.value,c=e.data.length<i.value;(l||c)&&(o=this._getOrReturnCtx(e,o),l?ae(o,{code:te.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&ae(o,{code:te.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")wS.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"email",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")jl||(jl=new RegExp(bS,"u")),jl.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"emoji",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")vS.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"uuid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")_S.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"nanoid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")mS.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"cuid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")gS.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"cuid2",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")yS.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"ulid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),ae(o,{validation:"url",code:te.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"regex",code:te.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),ae(o,{code:te.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(o=this._getOrReturnCtx(e,o),ae(o,{code:te.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),ae(o,{code:te.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Dp(i).test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{code:te.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?ES.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{code:te.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?TS(i).test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{code:te.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?CS.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"duration",code:te.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?NS(e.data,i.version)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"ip",code:te.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?SS.test(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{validation:"base64",code:te.invalid_string,message:i.message}),n.dirty()):$e.assertNever(i);return{status:n.value,value:e.data}}_regex(e,n,o){return this.refinement(i=>e.test(i),{validation:n,code:te.invalid_string,...me.errToObj(o)})}_addCheck(e){return new mn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...me.errToObj(e)})}url(e){return this._addCheck({kind:"url",...me.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...me.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...me.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...me.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...me.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...me.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...me.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...me.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...me.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,...me.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,...me.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...me.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...me.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...me.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...me.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...me.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...me.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...me.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...me.errToObj(n)})}nonempty(e){return this.min(1,me.errToObj(e))}trim(){return new mn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new mn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new mn({...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}}mn.create=t=>{var e;return new mn({checks:[],typeName:we.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ve(t)})};function AS(t,e){const n=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,i=n>o?n:o,l=parseInt(t.toFixed(i).replace(".","")),c=parseInt(e.toFixed(i).replace(".",""));return l%c/Math.pow(10,i)}class Cr extends Re{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)!==ce.number){const i=this._getOrReturnCtx(e);return ae(i,{code:te.invalid_type,expected:ce.number,received:i.parsedType}),xe}let n;const o=new kt;for(const i of this._def.checks)i.kind==="int"?$e.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),ae(n,{code:te.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),ae(n,{code:te.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),ae(n,{code:te.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?AS(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),ae(n,{code:te.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),ae(n,{code:te.not_finite,message:i.message}),o.dirty()):$e.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,me.toString(n))}gt(e,n){return this.setLimit("min",e,!1,me.toString(n))}lte(e,n){return this.setLimit("max",e,!0,me.toString(n))}lt(e,n){return this.setLimit("max",e,!1,me.toString(n))}setLimit(e,n,o,i){return new Cr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:me.toString(i)}]})}_addCheck(e){return new Cr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:me.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:me.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:me.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:me.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:me.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:me.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:me.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:me.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:me.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"&&$e.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)}}Cr.create=t=>new Cr({checks:[],typeName:we.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ve(t)});class wr extends Re{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)!==ce.bigint){const i=this._getOrReturnCtx(e);return ae(i,{code:te.invalid_type,expected:ce.bigint,received:i.parsedType}),xe}let n;const o=new kt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),ae(n,{code:te.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),ae(n,{code:te.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),ae(n,{code:te.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):$e.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,me.toString(n))}gt(e,n){return this.setLimit("min",e,!1,me.toString(n))}lte(e,n){return this.setLimit("max",e,!0,me.toString(n))}lt(e,n){return this.setLimit("max",e,!1,me.toString(n))}setLimit(e,n,o,i){return new wr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:me.toString(i)}]})}_addCheck(e){return new wr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:me.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:me.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:me.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:me.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:me.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}}wr.create=t=>{var e;return new wr({checks:[],typeName:we.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ve(t)})};class Ei extends Re{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ce.boolean){const n=this._getOrReturnCtx(e);return ae(n,{code:te.invalid_type,expected:ce.boolean,received:n.parsedType}),xe}return Vt(e.data)}}Ei.create=t=>new Ei({typeName:we.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ve(t)});class jr extends Re{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ce.date){const i=this._getOrReturnCtx(e);return ae(i,{code:te.invalid_type,expected:ce.date,received:i.parsedType}),xe}if(isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return ae(i,{code:te.invalid_date}),xe}const n=new kt;let o;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),ae(o,{code:te.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(o=this._getOrReturnCtx(e,o),ae(o,{code:te.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):$e.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new jr({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:me.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:me.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}}jr.create=t=>new jr({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:we.ZodDate,...Ve(t)});class Fs extends Re{_parse(e){if(this._getType(e)!==ce.symbol){const n=this._getOrReturnCtx(e);return ae(n,{code:te.invalid_type,expected:ce.symbol,received:n.parsedType}),xe}return Vt(e.data)}}Fs.create=t=>new Fs({typeName:we.ZodSymbol,...Ve(t)});class Ti extends Re{_parse(e){if(this._getType(e)!==ce.undefined){const n=this._getOrReturnCtx(e);return ae(n,{code:te.invalid_type,expected:ce.undefined,received:n.parsedType}),xe}return Vt(e.data)}}Ti.create=t=>new Ti({typeName:we.ZodUndefined,...Ve(t)});class Ni extends Re{_parse(e){if(this._getType(e)!==ce.null){const n=this._getOrReturnCtx(e);return ae(n,{code:te.invalid_type,expected:ce.null,received:n.parsedType}),xe}return Vt(e.data)}}Ni.create=t=>new Ni({typeName:we.ZodNull,...Ve(t)});class ko extends Re{constructor(){super(...arguments),this._any=!0}_parse(e){return Vt(e.data)}}ko.create=t=>new ko({typeName:we.ZodAny,...Ve(t)});class Hr extends Re{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Vt(e.data)}}Hr.create=t=>new Hr({typeName:we.ZodUnknown,...Ve(t)});class Yn extends Re{_parse(e){const n=this._getOrReturnCtx(e);return ae(n,{code:te.invalid_type,expected:ce.never,received:n.parsedType}),xe}}Yn.create=t=>new Yn({typeName:we.ZodNever,...Ve(t)});class Os extends Re{_parse(e){if(this._getType(e)!==ce.undefined){const n=this._getOrReturnCtx(e);return ae(n,{code:te.invalid_type,expected:ce.void,received:n.parsedType}),xe}return Vt(e.data)}}Os.create=t=>new Os({typeName:we.ZodVoid,...Ve(t)});class gn extends Re{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),i=this._def;if(n.parsedType!==ce.array)return ae(n,{code:te.invalid_type,expected:ce.array,received:n.parsedType}),xe;if(i.exactLength!==null){const c=n.data.length>i.exactLength.value,d=n.data.length<i.exactLength.value;(c||d)&&(ae(n,{code:c?te.too_big:te.too_small,minimum:d?i.exactLength.value:void 0,maximum:c?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),o.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(ae(n,{code:te.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),o.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(ae(n,{code:te.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((c,d)=>i.type._parseAsync(new Mn(n,c,n.path,d)))).then(c=>kt.mergeArray(o,c));const l=[...n.data].map((c,d)=>i.type._parseSync(new Mn(n,c,n.path,d)));return kt.mergeArray(o,l)}get element(){return this._def.type}min(e,n){return new gn({...this._def,minLength:{value:e,message:me.toString(n)}})}max(e,n){return new gn({...this._def,maxLength:{value:e,message:me.toString(n)}})}length(e,n){return new gn({...this._def,exactLength:{value:e,message:me.toString(n)}})}nonempty(e){return this.min(1,e)}}gn.create=(t,e)=>new gn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:we.ZodArray,...Ve(e)});function So(t){if(t instanceof rt){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=$n.create(So(o))}return new rt({...t._def,shape:()=>e})}else return t instanceof gn?new gn({...t._def,type:So(t.element)}):t instanceof $n?$n.create(So(t.unwrap())):t instanceof kr?kr.create(So(t.unwrap())):t instanceof Gn?Gn.create(t.items.map(e=>So(e))):t}class rt extends Re{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=$e.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==ce.object){const p=this._getOrReturnCtx(e);return ae(p,{code:te.invalid_type,expected:ce.object,received:p.parsedType}),xe}const{status:n,ctx:o}=this._processInputParams(e),{shape:i,keys:l}=this._getCached(),c=[];if(!(this._def.catchall instanceof Yn&&this._def.unknownKeys==="strip"))for(const p in o.data)l.includes(p)||c.push(p);const d=[];for(const p of l){const h=i[p],m=o.data[p];d.push({key:{status:"valid",value:p},value:h._parse(new Mn(o,m,o.path,p)),alwaysSet:p in o.data})}if(this._def.catchall instanceof Yn){const p=this._def.unknownKeys;if(p==="passthrough")for(const h of c)d.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(p==="strict")c.length>0&&(ae(o,{code:te.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 h of c){const m=o.data[h];d.push({key:{status:"valid",value:h},value:p._parse(new Mn(o,m,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const p=[];for(const h of d){const m=await h.key,y=await h.value;p.push({key:m,value:y,alwaysSet:h.alwaysSet})}return p}).then(p=>kt.mergeObjectSync(n,p)):kt.mergeObjectSync(n,d)}get shape(){return this._def.shape()}strict(e){return me.errToObj,new rt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,o)=>{var i,l,c,d;const p=(c=(l=(i=this._def).errorMap)===null||l===void 0?void 0:l.call(i,n,o).message)!==null&&c!==void 0?c:o.defaultError;return n.code==="unrecognized_keys"?{message:(d=me.errToObj(e).message)!==null&&d!==void 0?d:p}:{message:p}}}:{}})}strip(){return new rt({...this._def,unknownKeys:"strip"})}passthrough(){return new rt({...this._def,unknownKeys:"passthrough"})}extend(e){return new rt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new rt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:we.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new rt({...this._def,catchall:e})}pick(e){const n={};return $e.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(n[o]=this.shape[o])}),new rt({...this._def,shape:()=>n})}omit(e){const n={};return $e.objectKeys(this.shape).forEach(o=>{e[o]||(n[o]=this.shape[o])}),new rt({...this._def,shape:()=>n})}deepPartial(){return So(this)}partial(e){const n={};return $e.objectKeys(this.shape).forEach(o=>{const i=this.shape[o];e&&!e[o]?n[o]=i:n[o]=i.optional()}),new rt({...this._def,shape:()=>n})}required(e){const n={};return $e.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])n[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof $n;)i=i._def.innerType;n[o]=i}}),new rt({...this._def,shape:()=>n})}keyof(){return Ip($e.objectKeys(this.shape))}}rt.create=(t,e)=>new rt({shape:()=>t,unknownKeys:"strip",catchall:Yn.create(),typeName:we.ZodObject,...Ve(e)}),rt.strictCreate=(t,e)=>new rt({shape:()=>t,unknownKeys:"strict",catchall:Yn.create(),typeName:we.ZodObject,...Ve(e)}),rt.lazycreate=(t,e)=>new rt({shape:t,unknownKeys:"strip",catchall:Yn.create(),typeName:we.ZodObject,...Ve(e)});class Ai extends Re{_parse(e){const{ctx:n}=this._processInputParams(e),o=this._def.options;function i(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const c=l.map(d=>new Wt(d.ctx.common.issues));return ae(n,{code:te.invalid_union,unionErrors:c}),xe}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(i);{let l;const c=[];for(const p of o){const h={...n,common:{...n.common,issues:[]},parent:null},m=p._parseSync({data:n.data,path:n.path,parent:h});if(m.status==="valid")return m;m.status==="dirty"&&!l&&(l={result:m,ctx:h}),h.common.issues.length&&c.push(h.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const d=c.map(p=>new Wt(p));return ae(n,{code:te.invalid_union,unionErrors:d}),xe}}get options(){return this._def.options}}Ai.create=(t,e)=>new Ai({options:t,typeName:we.ZodUnion,...Ve(e)});const br=t=>t instanceof Pi?br(t.schema):t instanceof yn?br(t.innerType()):t instanceof Ri?[t.value]:t instanceof xr?t.options:t instanceof Di?$e.objectValues(t.enum):t instanceof Ii?br(t._def.innerType):t instanceof Ti?[void 0]:t instanceof Ni?[null]:t instanceof $n?[void 0,...br(t.unwrap())]:t instanceof kr?[null,...br(t.unwrap())]:t instanceof ql||t instanceof Li?br(t.unwrap()):t instanceof Fi?br(t._def.innerType):[];class Ls extends Re{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ce.object)return ae(n,{code:te.invalid_type,expected:ce.object,received:n.parsedType}),xe;const o=this.discriminator,i=n.data[o],l=this.optionsMap.get(i);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}):(ae(n,{code:te.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),xe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,o){const i=new Map;for(const l of n){const c=br(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 d of c){if(i.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);i.set(d,l)}}return new Ls({typeName:we.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Ve(o)})}}function Hl(t,e){const n=_r(t),o=_r(e);if(t===e)return{valid:!0,data:t};if(n===ce.object&&o===ce.object){const i=$e.objectKeys(e),l=$e.objectKeys(t).filter(d=>i.indexOf(d)!==-1),c={...t,...e};for(const d of l){const p=Hl(t[d],e[d]);if(!p.valid)return{valid:!1};c[d]=p.data}return{valid:!0,data:c}}else if(n===ce.array&&o===ce.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let l=0;l<t.length;l++){const c=t[l],d=e[l],p=Hl(c,d);if(!p.valid)return{valid:!1};i.push(p.data)}return{valid:!0,data:i}}else return n===ce.date&&o===ce.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Vi extends Re{_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=(l,c)=>{if(Zl(l)||Zl(c))return xe;const d=Hl(l.value,c.value);return d.valid?((Wl(l)||Wl(c))&&n.dirty(),{status:n.value,value:d.data}):(ae(o,{code:te.invalid_intersection_types}),xe)};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])=>i(l,c)):i(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}Vi.create=(t,e,n)=>new Vi({left:t,right:e,typeName:we.ZodIntersection,...Ve(n)});class Gn extends Re{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ce.array)return ae(o,{code:te.invalid_type,expected:ce.array,received:o.parsedType}),xe;if(o.data.length<this._def.items.length)return ae(o,{code:te.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xe;!this._def.rest&&o.data.length>this._def.items.length&&(ae(o,{code:te.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...o.data].map((l,c)=>{const d=this._def.items[c]||this._def.rest;return d?d._parse(new Mn(o,l,o.path,c)):null}).filter(l=>!!l);return o.common.async?Promise.all(i).then(l=>kt.mergeArray(n,l)):kt.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new Gn({...this._def,rest:e})}}Gn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gn({items:t,typeName:we.ZodTuple,rest:null,...Ve(e)})};class Bi extends Re{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!==ce.object)return ae(o,{code:te.invalid_type,expected:ce.object,received:o.parsedType}),xe;const i=[],l=this._def.keyType,c=this._def.valueType;for(const d in o.data)i.push({key:l._parse(new Mn(o,d,o.path,d)),value:c._parse(new Mn(o,o.data[d],o.path,d)),alwaysSet:d in o.data});return o.common.async?kt.mergeObjectAsync(n,i):kt.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,o){return n instanceof Re?new Bi({keyType:e,valueType:n,typeName:we.ZodRecord,...Ve(o)}):new Bi({keyType:mn.create(),valueType:e,typeName:we.ZodRecord,...Ve(n)})}}class Ms extends Re{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!==ce.map)return ae(o,{code:te.invalid_type,expected:ce.map,received:o.parsedType}),xe;const i=this._def.keyType,l=this._def.valueType,c=[...o.data.entries()].map(([d,p],h)=>({key:i._parse(new Mn(o,d,o.path,[h,"key"])),value:l._parse(new Mn(o,p,o.path,[h,"value"]))}));if(o.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const p of c){const h=await p.key,m=await p.value;if(h.status==="aborted"||m.status==="aborted")return xe;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const p of c){const h=p.key,m=p.value;if(h.status==="aborted"||m.status==="aborted")return xe;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}}}}Ms.create=(t,e,n)=>new Ms({valueType:e,keyType:t,typeName:we.ZodMap,...Ve(n)});class qr extends Re{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ce.set)return ae(o,{code:te.invalid_type,expected:ce.set,received:o.parsedType}),xe;const i=this._def;i.minSize!==null&&o.data.size<i.minSize.value&&(ae(o,{code:te.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&o.data.size>i.maxSize.value&&(ae(o,{code:te.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const l=this._def.valueType;function c(p){const h=new Set;for(const m of p){if(m.status==="aborted")return xe;m.status==="dirty"&&n.dirty(),h.add(m.value)}return{status:n.value,value:h}}const d=[...o.data.values()].map((p,h)=>l._parse(new Mn(o,p,o.path,h)));return o.common.async?Promise.all(d).then(p=>c(p)):c(d)}min(e,n){return new qr({...this._def,minSize:{value:e,message:me.toString(n)}})}max(e,n){return new qr({...this._def,maxSize:{value:e,message:me.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}qr.create=(t,e)=>new qr({valueType:t,minSize:null,maxSize:null,typeName:we.ZodSet,...Ve(e)});class Eo extends Re{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ce.function)return ae(n,{code:te.invalid_type,expected:ce.function,received:n.parsedType}),xe;function o(d,p){return Rs({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ps(),xo].filter(h=>!!h),issueData:{code:te.invalid_arguments,argumentsError:p}})}function i(d,p){return Rs({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ps(),xo].filter(h=>!!h),issueData:{code:te.invalid_return_type,returnTypeError:p}})}const l={errorMap:n.common.contextualErrorMap},c=n.data;if(this._def.returns instanceof To){const d=this;return Vt(async function(...p){const h=new Wt([]),m=await d._def.args.parseAsync(p,l).catch(x=>{throw h.addIssue(o(p,x)),h}),y=await Reflect.apply(c,this,m);return await d._def.returns._def.type.parseAsync(y,l).catch(x=>{throw h.addIssue(i(y,x)),h})})}else{const d=this;return Vt(function(...p){const h=d._def.args.safeParse(p,l);if(!h.success)throw new Wt([o(p,h.error)]);const m=Reflect.apply(c,this,h.data),y=d._def.returns.safeParse(m,l);if(!y.success)throw new Wt([i(m,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Eo({...this._def,args:Gn.create(e).rest(Hr.create())})}returns(e){return new Eo({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,o){return new Eo({args:e||Gn.create([]).rest(Hr.create()),returns:n||Hr.create(),typeName:we.ZodFunction,...Ve(o)})}}class Pi extends Re{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})}}Pi.create=(t,e)=>new Pi({getter:t,typeName:we.ZodLazy,...Ve(e)});class Ri extends Re{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return ae(n,{received:n.data,code:te.invalid_literal,expected:this._def.value}),xe}return{status:"valid",value:e.data}}get value(){return this._def.value}}Ri.create=(t,e)=>new Ri({value:t,typeName:we.ZodLiteral,...Ve(e)});function Ip(t,e){return new xr({values:t,typeName:we.ZodEnum,...Ve(e)})}class xr extends Re{constructor(){super(...arguments),ki.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),o=this._def.values;return ae(n,{expected:$e.joinValues(o),received:n.parsedType,code:te.invalid_type}),xe}if(Is(this,ki)||Vp(this,ki,new Set(this._def.values)),!Is(this,ki).has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return ae(n,{received:n.data,code:te.invalid_enum_value,options:o}),xe}return Vt(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 xr.create(e,{...this._def,...n})}exclude(e,n=this._def){return xr.create(this.options.filter(o=>!e.includes(o)),{...this._def,...n})}}ki=new WeakMap,xr.create=Ip;class Di extends Re{constructor(){super(...arguments),Si.set(this,void 0)}_parse(e){const n=$e.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==ce.string&&o.parsedType!==ce.number){const i=$e.objectValues(n);return ae(o,{expected:$e.joinValues(i),received:o.parsedType,code:te.invalid_type}),xe}if(Is(this,Si)||Vp(this,Si,new Set($e.getValidEnumValues(this._def.values))),!Is(this,Si).has(e.data)){const i=$e.objectValues(n);return ae(o,{received:o.data,code:te.invalid_enum_value,options:i}),xe}return Vt(e.data)}get enum(){return this._def.values}}Si=new WeakMap,Di.create=(t,e)=>new Di({values:t,typeName:we.ZodNativeEnum,...Ve(e)});class To extends Re{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ce.promise&&n.common.async===!1)return ae(n,{code:te.invalid_type,expected:ce.promise,received:n.parsedType}),xe;const o=n.parsedType===ce.promise?n.data:Promise.resolve(n.data);return Vt(o.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}To.create=(t,e)=>new To({type:t,typeName:we.ZodPromise,...Ve(e)});class yn extends Re{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===we.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=this._def.effect||null,l={addIssue:c=>{ae(o,c),c.fatal?n.abort():n.dirty()},get path(){return o.path}};if(l.addIssue=l.addIssue.bind(l),i.type==="preprocess"){const c=i.transform(o.data,l);if(o.common.async)return Promise.resolve(c).then(async d=>{if(n.value==="aborted")return xe;const p=await this._def.schema._parseAsync({data:d,path:o.path,parent:o});return p.status==="aborted"?xe:p.status==="dirty"||n.value==="dirty"?Ds(p.value):p});{if(n.value==="aborted")return xe;const d=this._def.schema._parseSync({data:c,path:o.path,parent:o});return d.status==="aborted"?xe:d.status==="dirty"||n.value==="dirty"?Ds(d.value):d}}if(i.type==="refinement"){const c=d=>{const p=i.refinement(d,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 d};if(o.common.async===!1){const d=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return d.status==="aborted"?xe:(d.status==="dirty"&&n.dirty(),c(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(d=>d.status==="aborted"?xe:(d.status==="dirty"&&n.dirty(),c(d.value).then(()=>({status:n.value,value:d.value}))))}if(i.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!bi(c))return c;const d=i.transform(c.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>bi(c)?Promise.resolve(i.transform(c.value,l)).then(d=>({status:n.value,value:d})):c);$e.assertNever(i)}}yn.create=(t,e,n)=>new yn({schema:t,typeName:we.ZodEffects,effect:e,...Ve(n)}),yn.createWithPreprocess=(t,e,n)=>new yn({schema:e,effect:{type:"preprocess",transform:t},typeName:we.ZodEffects,...Ve(n)});class $n extends Re{_parse(e){return this._getType(e)===ce.undefined?Vt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}$n.create=(t,e)=>new $n({innerType:t,typeName:we.ZodOptional,...Ve(e)});class kr extends Re{_parse(e){return this._getType(e)===ce.null?Vt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}kr.create=(t,e)=>new kr({innerType:t,typeName:we.ZodNullable,...Ve(e)});class Ii extends Re{_parse(e){const{ctx:n}=this._processInputParams(e);let o=n.data;return n.parsedType===ce.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ii.create=(t,e)=>new Ii({innerType:t,typeName:we.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ve(e)});class Fi extends Re{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return xi(i)?i.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Wt(o.common.issues)},input:o.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Wt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}Fi.create=(t,e)=>new Fi({innerType:t,typeName:we.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ve(e)});class Gs extends Re{_parse(e){if(this._getType(e)!==ce.nan){const n=this._getOrReturnCtx(e);return ae(n,{code:te.invalid_type,expected:ce.nan,received:n.parsedType}),xe}return{status:"valid",value:e.data}}}Gs.create=t=>new Gs({typeName:we.ZodNaN,...Ve(t)});const VS=Symbol("zod_brand");class ql extends Re{_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 Oi extends Re{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?xe:i.status==="dirty"?(n.dirty(),Ds(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{const i=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?xe:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:o.path,parent:o})}}static create(e,n){return new Oi({in:e,out:n,typeName:we.ZodPipeline})}}class Li extends Re{_parse(e){const n=this._def.innerType._parse(e),o=i=>(bi(i)&&(i.value=Object.freeze(i.value)),i);return xi(n)?n.then(i=>o(i)):o(n)}unwrap(){return this._def.innerType}}Li.create=(t,e)=>new Li({innerType:t,typeName:we.ZodReadonly,...Ve(e)});function Fp(t,e={},n){return t?ko.create().superRefine((o,i)=>{var l,c;if(!t(o)){const d=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,p=(c=(l=d.fatal)!==null&&l!==void 0?l:n)!==null&&c!==void 0?c:!0,h=typeof d=="string"?{message:d}:d;i.addIssue({code:"custom",...h,fatal:p})}}):ko.create()}const BS={object:rt.lazycreate};var we;(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"})(we||(we={}));const PS=(t,e={message:`Input not instance of ${t.name}`})=>Fp(n=>n instanceof t,e),Op=mn.create,Lp=Cr.create,RS=Gs.create,DS=wr.create,Mp=Ei.create,IS=jr.create,FS=Fs.create,OS=Ti.create,LS=Ni.create,MS=ko.create,GS=Hr.create,$S=Yn.create,zS=Os.create,US=gn.create,ZS=rt.create,WS=rt.strictCreate,jS=Ai.create,HS=Ls.create,qS=Vi.create,KS=Gn.create,XS=Bi.create,YS=Ms.create,JS=qr.create,QS=Eo.create,eE=Pi.create,tE=Ri.create,nE=xr.create,rE=Di.create,oE=To.create,Gp=yn.create,iE=$n.create,sE=kr.create,aE=yn.createWithPreprocess,lE=Oi.create;var zn=Object.freeze({__proto__:null,defaultErrorMap:xo,setErrorMap:hS,getErrorMap:Ps,makeIssue:Rs,EMPTY_PATH:fS,addIssueToContext:ae,ParseStatus:kt,INVALID:xe,DIRTY:Ds,OK:Vt,isAborted:Zl,isDirty:Wl,isValid:bi,isAsync:xi,get util(){return $e},get objectUtil(){return Ul},ZodParsedType:ce,getParsedType:_r,ZodType:Re,datetimeRegex:Dp,ZodString:mn,ZodNumber:Cr,ZodBigInt:wr,ZodBoolean:Ei,ZodDate:jr,ZodSymbol:Fs,ZodUndefined:Ti,ZodNull:Ni,ZodAny:ko,ZodUnknown:Hr,ZodNever:Yn,ZodVoid:Os,ZodArray:gn,ZodObject:rt,ZodUnion:Ai,ZodDiscriminatedUnion:Ls,ZodIntersection:Vi,ZodTuple:Gn,ZodRecord:Bi,ZodMap:Ms,ZodSet:qr,ZodFunction:Eo,ZodLazy:Pi,ZodLiteral:Ri,ZodEnum:xr,ZodNativeEnum:Di,ZodPromise:To,ZodEffects:yn,ZodTransformer:yn,ZodOptional:$n,ZodNullable:kr,ZodDefault:Ii,ZodCatch:Fi,ZodNaN:Gs,BRAND:VS,ZodBranded:ql,ZodPipeline:Oi,ZodReadonly:Li,custom:Fp,Schema:Re,ZodSchema:Re,late:BS,get ZodFirstPartyTypeKind(){return we},coerce:{string:t=>mn.create({...t,coerce:!0}),number:t=>Cr.create({...t,coerce:!0}),boolean:t=>Ei.create({...t,coerce:!0}),bigint:t=>wr.create({...t,coerce:!0}),date:t=>jr.create({...t,coerce:!0})},any:MS,array:US,bigint:DS,boolean:Mp,date:IS,discriminatedUnion:HS,effect:Gp,enum:nE,function:QS,instanceof:PS,intersection:qS,lazy:eE,literal:tE,map:YS,nan:RS,nativeEnum:rE,never:$S,null:LS,nullable:sE,number:Lp,object:ZS,oboolean:()=>Mp().optional(),onumber:()=>Lp().optional(),optional:iE,ostring:()=>Op().optional(),pipeline:lE,preprocess:aE,promise:oE,record:XS,set:JS,strictObject:WS,string:Op,symbol:FS,transformer:Gp,tuple:KS,undefined:OS,union:jS,unknown:GS,void:zS,NEVER:xe,ZodIssueCode:te,quotelessJson:pS,ZodError:Wt});function cE(t){throw new Error("Unexpected object: "+t)}const $p="upload://upload/",zp="index://index/";function dE(t){return t.startsWith($p)}function uE(t){return t.startsWith(zp)}function Up(t){if(uE(t)){const e=t.slice(zp.length);return JSON.parse(decodeURIComponent(e)).path}else if(dE(t)){const e=t.slice($p.length);return JSON.parse(decodeURIComponent(e)).localPath}cE(t)}function pE(t){return t.replace(/^.*[\\/]/,"")}function hE(t){return pE(Up(t))}zn.object({__isRef:zn.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:zn.string().describe("Upstream block id"),name:zn.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 fE=zn.object({type:zn.string(),importance:zn.number().optional(),id:zn.string().optional(),label:zn.string()});zn.array(fE);const mE={key:0,ref:"label"},gE={key:0,class:"required-icon"},yE=["data-placeholder"],vE={key:5,class:"pl-file-input__stats"},_E={key:0,class:"pl-file-input__error"},CE={key:1,class:"pl-file-input__helper"},Zp=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(),i=e,l=t,c=(F,D)=>{if(F)try{return D(F)}catch(V){return n.error=V instanceof Error?V.message:String(V),F}},d=r.computed(()=>c(l.modelValue,hE)),p=r.computed(()=>c(l.modelValue,Up)),h=r.computed(()=>l.progress&&!l.progress.done),m=r.computed(()=>l.progress&&l.progress.done),y=r.computed(()=>n.error??l.error),x=r.computed(()=>!!y.value),w=r.computed(()=>{const{status:F,done:D}=l.progress??{};return!F||!F.bytesTotal?"":F.bytesProcessed&&!D?xl(F.bytesProcessed,{})+" / "+xl(F.bytesTotal,{}):xl(F.bytesTotal,{})}),E=r.computed(()=>{var F;const{progress:D}=l;return D?{width:D.done?"100%":Math.round((((F=D.status)==null?void 0:F.progress)??0)*100)+"%"}:{}}),O=()=>{n.fileDialogOpen=!0},$=F=>{F.files.length&&i("update:modelValue",F.files[0])},b=()=>i("update:modelValue",void 0);r.watch(()=>l.modelValue,()=>{n.error=""},{immediate:!0});const R=r.ref();return l.cellStyle||Xn(R),(F,D)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",{class:r.normalizeClass([{"pl-file-input__cell-style":!!F.cellStyle,"has-file":!!d.value},"pl-file-input__envelope"])},[r.createElementVNode("div",{ref_key:"rootRef",ref:R,class:r.normalizeClass(["pl-file-input",{dashed:F.dashed,error:x.value}]),tabindex:"0",onKeyup:r.withKeys(O,["enter"]),onClick:r.withModifiers(O,["stop"])},[r.createElementVNode("div",{class:"pl-file-input__progress",style:r.normalizeStyle(E.value)},null,4),D[3]||(D[3]=r.createTextVNode()),!F.cellStyle&&F.label?(r.openBlock(),r.createElementBlock("label",mE,[F.required?(r.openBlock(),r.createElementBlock("i",gE)):r.createCommentVNode("",!0),D[1]||(D[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(F.label),1),D[2]||(D[2]=r.createTextVNode()),r.unref(o).tooltip||p.value?(r.openBlock(),r.createBlock(r.unref(xt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.unref(o).tooltip?r.renderSlot(F.$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),D[4]||(D[4]=r.createTextVNode()),x.value?(r.openBlock(),r.createBlock(r.unref(Lt),{key:1,name:"restart"})):h.value?(r.openBlock(),r.createBlock(r.unref(Lt),{key:2,name:"cloud-upload"})):m.value?(r.openBlock(),r.createBlock(r.unref(Lt),{key:3,name:"success"})):(r.openBlock(),r.createBlock(r.unref(Lt),{key:4,name:"paper-clip"})),D[5]||(D[5]=r.createTextVNode()),r.createElementVNode("div",{"data-placeholder":F.placeholder??"Choose file",class:"pl-file-input__filename"},r.toDisplayString(d.value),9,yE),D[6]||(D[6]=r.createTextVNode()),w.value?(r.openBlock(),r.createElementBlock("div",vE,r.toDisplayString(w.value),1)):r.createCommentVNode("",!0),D[7]||(D[7]=r.createTextVNode()),F.modelValue?(r.openBlock(),r.createBlock(r.unref(Lt),{key:6,name:"close",onClick:r.withModifiers(b,["stop"])})):r.createCommentVNode("",!0),D[8]||(D[8]=r.createTextVNode()),r.createVNode(vr,{class:"pl-file-input__contour"})],34),D[9]||(D[9]=r.createTextVNode()),x.value?(r.openBlock(),r.createElementBlock("div",_E,r.toDisplayString(y.value),1)):F.helper?(r.openBlock(),r.createElementBlock("div",CE,r.toDisplayString(F.helper),1)):r.createCommentVNode("",!0)],2),D[10]||(D[10]=r.createTextVNode()),r.createVNode(r.unref(Np),{modelValue:n.fileDialogOpen,"onUpdate:modelValue":D[0]||(D[0]=V=>n.fileDialogOpen=V),extensions:F.extensions,title:F.fileDialogTitle,"close-on-outside-click":F.fileDialogCloseOnOutsideClick,"onImport:files":$},null,8,["modelValue","extensions","title","close-on-outside-click"])],64))}}),wE={class:"pl-notification-alert__wrapper d-flex"},bE={class:"pl-notification-alert__content flex-grow-1"},xE={key:0,class:"pl-notification-alert__close"},kE={key:0,class:"pl-notification-alert__actions d-flex"},Wp=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(i,l)=>n.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([i.type,"pl-notification-alert d-flex flex-column gap-16"]),style:r.normalizeStyle({width:`${i.width}`})},[r.createElementVNode("div",wE,[r.createElementVNode("div",bE,[r.renderSlot(i.$slots,"default")]),l[0]||(l[0]=r.createTextVNode()),i.closable?(r.openBlock(),r.createElementBlock("div",xE,[r.createVNode(r.unref(_o),{icon:"close",onClick:o})])):r.createCommentVNode("",!0)]),l[1]||(l[1]=r.createTextVNode()),i.$slots.actions?(r.openBlock(),r.createElementBlock("div",kE,[r.renderSlot(i.$slots,"actions")])):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)}}),SE=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 St(t,e,n){return e>t?e:t>n?n:t}const Kl=t=>r.computed(()=>{const e=[100],{min:n,max:o,step:i}=t.value;let l=n;for(;l<o;){l+=i;const c=(1-(St(l,n,o)-n)/(o-n))*100;e.push(c)}return e}),EE={class:"ui-slider__wrapper"},TE={class:"ui-slider__label-section"},NE={key:0,class:"text-s"},AE={key:1,class:"ui-slider__value-static text-s"},VE={class:"ui-slider__base"},BE={class:"ui-slider__container"},PE={class:"ui-slider__container ui-slider__container-thumb"},RE={class:"ui-slider__input-wrapper d-flex"},DE=["value"],IE={key:0,class:"ui-slider__error"},jp=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,i=t,l=r.reactive({deltaValue:0}),c=r.computed(()=>i.max-i.min),d=r.computed(()=>St((i.modelValue??0)+l.deltaValue,i.min,i.max)),p=r.ref(i.modelValue),h=r.computed(()=>{const V=i.modelValue;return Number.isFinite(V)?V<i.min?`Min value: ${i.min}`:V>i.max?`Max value: ${i.max}`:i.error:"Not a number"}),m=r.computed(()=>i),y=Kl(m),x=r.computed(()=>(d.value-i.min)/c.value),w=r.computed(()=>({right:Math.ceil((1-x.value)*100)+"%"})),E=r.computed(()=>({right:`calc(${Math.ceil((1-x.value)*100)}%) `})),O=r.ref(),$=r.ref();r.watch(()=>i.modelValue,V=>{p.value=V});function b(V){const Z=St(V,i.min,i.max);return Math.round((Z+Number.EPSILON)*(1/i.step))/(1/i.step)}gr($,V=>{var Z;ut((Z=r.unref(O))==null?void 0:Z.getBoundingClientRect(),ne=>{const{dx:H}=V;l.deltaValue=H/ne.width*c.value,p.value=b(St((i.modelValue??0)+l.deltaValue,i.min,i.max)),V.stop&&(o("update:modelValue",b(d.value)),l.deltaValue=0)})});function R(V){o("update:modelValue",b(V))}function F(V){R(+V.target.value)}function D(V){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(V.code)&&V.preventDefault();const Z=V.code==="ArrowUp"||V.code==="ArrowRight"?i.step*1:V.code==="ArrowDown"||V.code==="ArrowLeft"?i.step*-1:0;R(i.modelValue+Z)}return(V,Z)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([i.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${i.mode}`,"ui-slider"])},[r.createElementVNode("div",EE,[r.createElementVNode("div",TE,[V.label?(r.openBlock(),r.createElementBlock("label",NE,[r.createElementVNode("span",null,r.toDisplayString(V.label),1),Z[1]||(Z[1]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(V.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),Z[2]||(Z[2]=r.createTextVNode()),i.mode==="text"?(r.openBlock(),r.createElementBlock("div",AE,r.toDisplayString(p.value)+r.toDisplayString(V.measure),1)):r.createCommentVNode("",!0)]),Z[6]||(Z[6]=r.createTextVNode()),r.createElementVNode("div",VE,[r.createElementVNode("div",BE,[r.createElementVNode("div",{ref_key:"barRef",ref:O,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(w.value)},null,4)],512)]),Z[5]||(Z[5]=r.createTextVNode()),r.createElementVNode("div",PE,[i.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(y),(ne,H)=>(r.openBlock(),r.createElementBlock("div",{key:H,style:r.normalizeStyle({right:`${ne}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),Z[4]||(Z[4]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef",ref:$,tabindex:"0",class:"ui-slider__thumb ui-slider__thumb-active",style:r.normalizeStyle(E.value),onKeydown:D},Z[3]||(Z[3]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),Z[7]||(Z[7]=r.createTextVNode()),r.createElementVNode("div",RE,[i.mode==="input"?(r.openBlock(),r.createElementBlock("input",{key:0,value:p.value,class:"ui-slider__value text-s",onChange:Z[0]||(Z[0]=ne=>F(ne))},null,40,DE)):r.createCommentVNode("",!0)])],2),Z[8]||(Z[8]=r.createTextVNode()),h.value?(r.openBlock(),r.createElementBlock("div",IE,r.toDisplayString(h.value),1)):r.createCommentVNode("",!0)],2))}});function FE(t,e=null,n=null){function o(d){const{scrollTop:p,scrollHeight:h,clientHeight:m}=d;if(!(h>m)||!e)return null;const y=h-p-m,x=p>e?e:0,w=y>e?m-e-x:m;return`linear-gradient(
|
|
54
54
|
to bottom,
|
|
55
55
|
transparent,
|
|
56
56
|
black ${x}px,
|
|
@@ -62,30 +62,30 @@
|
|
|
62
62
|
black ${x}px,
|
|
63
63
|
black ${w}px,
|
|
64
64
|
transparent 100%
|
|
65
|
-
)`}function l(){const d=t.value;if(!d)return;const p=[o(d),i(d)].filter(h=>h!==null);d.style.setProperty("-webkit-mask-image",p.join(",")),d.style.setProperty("mask-image",p.join(",")),p.length>1&&(d.style.setProperty("-webkit-mask-composite","source-in"),d.style.setProperty("mask-composite","source-in"))}const c=Nl(l);r.onMounted(l),st(window,"scroll",c,!0),st(window,"resize",c,!0)}function Wp(t,e){up(()=>{ut(r.unref(t),n=>{pp(n,()=>e(n))})}),r.onUnmounted(()=>{ut(r.unref(t),n=>{hp(n)})})}const Sr={item:"sortable__item",animate:"sortable__animate"},Mi=t=>t.getBoundingClientRect().y,Hp=t=>{const{y:e,height:n}=t.getBoundingClientRect();return e+Math.ceil(n/2)},OE=t=>{const{y:e,height:n}=t.getBoundingClientRect();return e+n};function qp(t,e){const n={item:void 0,options(){var w;return[...((w=t.value)==null?void 0:w.children)??[]]}},o=r.computed(()=>n.options()),i=e.shakeBuffer??10,l=e.reorderDelay??100;function c(w){const S=e.handle?this.querySelector(e.handle):null;S&&(S&&!S.contains(w.target)||(this.classList.remove(Sr.animate),this.classList.add(Sr.item),n.item={el:this,y:w.y,dy:0,orderChanged:!1}))}function d(w){const S=n.options();return S.slice(0,S.indexOf(w))}function p(w){const S=n.options();return S.slice(S.indexOf(w)+1)}function h(w,S){const O=n.options().filter(b=>b!==S),G=O.indexOf(w);return O.splice(G,0,S),O}function m(w,S){const O=n.options().filter(b=>b!==S),G=O.indexOf(w);return O.splice(G+1,0,S),O}function y(w,S){w.dy=S-w.y,w.el.style.setProperty("transform",`translateY(${w.dy}px)`)}function x(w){var S;if(!n.item)return;const{el:O}=n.item;if(!O.isConnected){n.item=void 0;return}const G=w.map(U=>Mi(U)),b=Mi(O);(S=t.value)==null||S.replaceChildren(...w);const R=Mi(O),F=w.map(U=>Mi(U)),D=[];for(let U=0;U<F.length;U++){const j=w[U];if(j===n.item.el)continue;const $=F[U],Z=G[U]-$;j.style.transform=`translateY(${Z}px)`,D.push(j)}const A=R-b;n.item.y=n.item.y+A,n.item.dy=n.item.dy-A,n.item.orderChanged=!0,n.item.el.style.setProperty("transform",`translateY(${n.item.dy}px)`),D.forEach(U=>U.classList.remove(Sr.animate)),requestAnimationFrame(function(){D.forEach(U=>{U.classList.add(Sr.animate),U.style.transform="",U.addEventListener("transitionend",()=>{U.classList.remove(Sr.animate)})})})}st(window,"mousemove",w=>{if(!n.item)return;const{el:S}=n.item;y(n.item,w.y);const O=Mi(n.item.el),G=OE(n.item.el),b=d(S),R=p(S);b.forEach(F=>{const D=Hp(F);O+i<D&&x(h(F,S))}),R.forEach(F=>{const D=Hp(F);G-i>D&&x(m(F,S))})}),st(window,"mouseup",()=>{if(!n.item)return;const{el:w,orderChanged:S}=n.item;w.classList.add(Sr.animate),w.style.removeProperty("transform"),w.addEventListener("transitionend",()=>{w.classList.remove(Sr.animate,Sr.item)}),setTimeout(()=>{if(!S)return;const O=n.options().map(b=>Number(b.getAttribute("data-index"))),G=t.value;if(G){for(const b of n.options())G.removeChild(b);o.value.forEach(b=>{G.appendChild(b)})}e.onChange(O)},l),n.item=void 0}),r.watchEffect(()=>{o.value.forEach((w,S)=>{w.removeEventListener("mousedown",c),w.addEventListener("mousedown",c),w.setAttribute("data-index",String(S))})})}function LE(t,e){let n;r.onMounted(()=>{n=setInterval(t,e)}),r.onUnmounted(()=>clearInterval(n))}function ME(t,e,n){const o=r.reactive({data:bl.deepClone(e(t.value)),changed:!1});return r.watch(()=>o.data,i=>{o.changed?n(bl.deepClone(i)):o.changed=!0},{deep:!0}),r.watch(t,i=>{Object.assign(o,{data:bl.deepClone(e(i)),changed:!1})},{deep:!0,immediate:!0}),o}function GE(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 dC(()=>{const i=n();this.run(...i).catch(console.error)},o)}});return e.run=e.run.bind(e),e}function $E(t,e){function n(c,d){const p=r.unref(t);if(!p)return;const h=`translate(${d.x-c.x}px, ${d.y-c.y}px)`;p.style.setProperty("transform",h),e(d)}function o(c){const d=p=>n(c,p);document.addEventListener("mousemove",d),document.addEventListener("mouseup",()=>{const p=r.unref(t);document.removeEventListener("mousemove",d),p&&(p.style.setProperty("transition","all .3s ease-in-out"),p.style.removeProperty("transform"),p.addEventListener("transitionend",()=>{p.style.removeProperty("transition")}))},{once:!0})}function i(){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(i),r.onUnmounted(l)}const zE={class:"ui-slider__wrapper"},UE={class:"ui-slider__label-section"},ZE={key:0,class:"text-s"},jE={class:"ui-slider__base"},WE={class:"ui-slider__container"},HE={class:"ui-slider__container ui-slider__container-thumb"},qE=["data-percent"],KE=["data-percent"],XE=["data-percent"],YE={key:0,class:"ui-slider__error"},JE=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,i=t,l=r.reactive({deltaValue1:0,deltaValue2:0,deltaValue3:0}),c=r.ref(),d=r.ref(),p=r.ref(),h=r.ref(),m=r.computed(()=>i.max-i.min),y=r.computed(()=>i),x=Kl(y),w=r.computed(()=>St((i.modelValue[0]??0)+l.deltaValue1,i.min,i.max)),S=r.computed(()=>St((i.modelValue[1]??0)+l.deltaValue2,i.min,i.max)),O=r.computed(()=>St((i.modelValue[2]??0)+l.deltaValue3,i.min,i.max)),G=r.computed(()=>{const E=i.modelValue;if(!(Array.isArray(E)&&E.length===3&&E.every(H=>Number.isFinite(H))))return"Expected model [number, number, number]";const M=[];return[...i.modelValue].forEach(H=>{H>i.max&&M.push(`Max model value must be lower than max props ${i.max}.`),H<i.min&&M.push("Min model value must be greater than max props.")}),M.length>0?M.join(" "):i.error}),b=r.computed(()=>(w.value-i.min)/m.value),R=r.computed(()=>(S.value-i.min)/m.value),F=r.computed(()=>(O.value-i.min)/m.value),D=r.computed(()=>W()),A=r.computed(()=>({right:D.value[0]+"%",left:100-D.value[2]+"%"})),U=r.computed(()=>({right:Math.ceil((1-b.value)*100)+"%"})),j=r.computed(()=>({right:Math.ceil((1-R.value)*100)+"%"})),$=r.computed(()=>({right:Math.ceil((1-F.value)*100)+"%"}));gr(d,E=>{var M;ut((M=r.unref(c))==null?void 0:M.getBoundingClientRect(),H=>{const{dx:K}=E;l.deltaValue1=K/H.width*m.value,d.value&&Z(d.value,i.modelValue[0],l.deltaValue1),E.stop&&(he([J(w.value),J(S.value),J(O.value)]),l.deltaValue1=0)})}),gr(p,E=>{var M;ut((M=r.unref(c))==null?void 0:M.getBoundingClientRect(),H=>{const{dx:K}=E;l.deltaValue2=K/H.width*m.value,p.value&&Z(p.value,i.modelValue[1],l.deltaValue2),E.stop&&(he([J(w.value),J(S.value),J(O.value)]),l.deltaValue2=0)})}),gr(h,E=>{var M;ut((M=r.unref(c))==null?void 0:M.getBoundingClientRect(),H=>{const{dx:K}=E;l.deltaValue3=K/H.width*m.value,h.value&&Z(h.value,i.modelValue[2],l.deltaValue3),E.stop&&(he([J(w.value),J(S.value),J(O.value)]),l.deltaValue3=0)})});function Z(E,M,H){const K=J(St((M??0)+H,i.min,i.max));E.dataset.percent=`${K}${i.measure}`,B()}function W(){const E=Math.ceil((1-b.value)*100),M=Math.ceil((1-R.value)*100),H=Math.ceil((1-F.value)*100);return[E,M,H].sort((K,ne)=>K-ne)}function J(E){const M=St(E,i.min,i.max);return Math.round((M+Number.EPSILON)*(1/i.step))/(1/i.step)}function he(E){o("update:modelValue",E)}function B(){const E=Number(U.value.right.substring(0,U.value.right.length-1)),M=Number(j.value.right.substring(0,j.value.right.length-1)),H=Number($.value.right.substring(0,$.value.right.length-1)),K=[{r:E,th:d},{r:M,th:p},{r:H,th:h}].sort((ne,de)=>ne.r-de.r);K[0].th.value&&(K[0].th.value.dataset.hint="high"),K[1].th.value&&(K[1].th.value.dataset.hint="mid"),K[2].th.value&&(K[2].th.value.dataset.hint="low")}function C(E,M){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(E.code)&&E.preventDefault();const H=E.code==="ArrowUp"||E.code==="ArrowRight"?i.step*1:E.code==="ArrowDown"||E.code==="ArrowLeft"?i.step*-1:0,K=[...i.modelValue];K[M]=St(K[M]+H,i.min,i.max),he(K),B()}return r.onMounted(()=>{B()}),(E,M)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([i.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope ui-slider__triple"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${i.mode}`,"ui-slider"])},[r.createElementVNode("div",zE,[r.createElementVNode("div",UE,[E.label?(r.openBlock(),r.createElementBlock("label",ZE,[r.createElementVNode("span",null,r.toDisplayString(E.label),1),M[3]||(M[3]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(E.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)]),M[11]||(M[11]=r.createTextVNode()),r.createElementVNode("div",jE,[r.createElementVNode("div",WE,[r.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(A.value)},null,4)],512)]),M[10]||(M[10]=r.createTextVNode()),r.createElementVNode("div",HE,[i.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(x),(H,K)=>(r.openBlock(),r.createElementBlock("div",{key:K,style:r.normalizeStyle({right:`${H}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),M[7]||(M[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef1",ref:d,style:r.normalizeStyle(U.value),"data-percent":i.modelValue[0]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r1:"",tabindex:"0",onKeydown:M[0]||(M[0]=H=>C(H,0))},M[4]||(M[4]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,qE),M[8]||(M[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:r.normalizeStyle(j.value),"data-percent":i.modelValue[1]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r2:"",tabindex:"0",onKeydown:M[1]||(M[1]=H=>C(H,1))},M[5]||(M[5]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,KE),M[9]||(M[9]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef3",ref:h,style:r.normalizeStyle($.value),"data-percent":i.modelValue[2]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r3:"",tabindex:"0",onKeydown:M[2]||(M[2]=H=>C(H,2))},M[6]||(M[6]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,XE)])])]),M[12]||(M[12]=r.createTextVNode()),M[13]||(M[13]=r.createElementVNode("div",{class:"ui-slider__input-wrapper d-flex"},null,-1))],2),M[14]||(M[14]=r.createTextVNode()),G.value?(r.openBlock(),r.createElementBlock("div",YE,r.toDisplayString(G.value),1)):r.createCommentVNode("",!0)],2))}}),QE={class:"ui-input-range__separator"},e1=r.defineComponent({__name:"InputRange",props:{modelValue:{},separator:{default:"-"}},emits:["update:modelValue","change"],setup(t,{emit:e}){const n=t,o=e,i=r.reactive({left:n.modelValue[0],right:n.modelValue[1]}),l=r.ref(!1),c=r.computed(()=>(l.value,"ui-input-range-focused")),d=r.computed({get(){return{left:Math.min(...n.modelValue),right:Math.max(...n.modelValue)}},set(){}});r.watch(()=>d.value,m=>(i.left=m.left)&&(i.right=m.right));function p(){o("update:modelValue",[+i.left,+i.right]),o("change",[+i.left,+i.right])}function h(m,y){const x=y.target.value;/^[0-9]{0,2}$/.test(x)?m?i.left=+x:i.right=+x:m?i.left=+x.slice(0,x.length-1):i.right=+x.slice(0,x.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]=x=>d.value.left=x),class:"text-s",type:"text",onChange:p,onFocus:y[1]||(y[1]=x=>l.value=!0),onFocusout:y[2]||(y[2]=x=>l.value=!1),onInput:y[3]||(y[3]=x=>h(!0,x))},null,544),[[r.vModelText,d.value.left]]),y[8]||(y[8]=r.createTextVNode()),r.createElementVNode("div",QE,r.toDisplayString(n.separator),1),y[9]||(y[9]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":y[4]||(y[4]=x=>d.value.right=x),class:"text-s",type:"text",onChange:p,onFocus:y[5]||(y[5]=x=>l.value=!0),onFocusout:y[6]||(y[6]=x=>l.value=!1),onInput:y[7]||(y[7]=x=>h(!1,x))},null,544),[[r.vModelText,d.value.right]])],16))}}),t1={class:"ui-slider__wrapper"},n1={class:"ui-slider__label-section"},r1={key:0,class:"text-s"},o1={key:1,class:"ui-slider__value-static text-s"},i1={class:"ui-slider__base"},s1={class:"ui-slider__container"},a1={class:"ui-slider__container ui-slider__container-thumb"},l1={class:"ui-slider__input-wrapper d-flex"},c1={key:0,class:"ui-slider__error"},d1=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,i=t,l=r.reactive({deltaValue1:0,deltaValue2:0}),c=r.ref(),d=r.ref(),p=r.ref(),h=r.ref(i.modelValue),m=r.ref(i.modelValue[0]),y=r.ref(i.modelValue[1]),x=r.computed(()=>i),w=Kl(x),S=r.computed(()=>[m.value,y.value].sort((B,C)=>B-C).join("-")),O=r.computed(()=>i.max-i.min),G=r.computed(()=>St((i.modelValue[0]??0)+l.deltaValue1,i.min,i.max)),b=r.computed(()=>St((i.modelValue[1]??0)+l.deltaValue2,i.min,i.max)),R=r.computed(()=>{const B=i.modelValue;return Array.isArray(B)&&B.length===2&&B.every(C=>Number.isFinite(C))?i.error:"Expected model [number, number]"}),F=r.computed(()=>(G.value-i.min)/O.value),D=r.computed(()=>(b.value-i.min)/O.value),A=r.computed(()=>Z()),U=r.computed(()=>({right:A.value[0]+"%",left:100-A.value[1]+"%"})),j=r.computed(()=>({right:Math.ceil((1-F.value)*100)+"%"})),$=r.computed(()=>({right:Math.ceil((1-D.value)*100)+"%"}));r.watch(()=>i.modelValue,B=>{h.value=B,m.value=+B[0],y.value=+B[1]},{immediate:!0}),gr(d,B=>{var C;ut((C=r.unref(c))==null?void 0:C.getBoundingClientRect(),E=>{const{dx:M}=B;l.deltaValue1=M/E.width*O.value,m.value=W(St((i.modelValue[0]??0)+l.deltaValue1,i.min,i.max)),h.value=[m.value,y.value].sort((H,K)=>H-K),B.stop&&(J([W(G.value),W(b.value)]),l.deltaValue1=0)})}),gr(p,B=>{var C;ut((C=r.unref(c))==null?void 0:C.getBoundingClientRect(),E=>{const{dx:M}=B;l.deltaValue2=M/E.width*O.value,y.value=W(St((i.modelValue[1]??0)+l.deltaValue2,i.min,i.max)),h.value=[m.value,y.value].sort((H,K)=>H-K),B.stop&&(J([W(G.value),W(b.value)]),l.deltaValue2=0)})});function Z(){const B=Math.ceil((1-F.value)*100),C=Math.ceil((1-D.value)*100);return[B,C].sort((E,M)=>E-M)}function W(B){const C=St(B,i.min,i.max);return Math.round((C+Number.EPSILON)*(1/i.step))/(1/i.step)}function J(B){o("update:modelValue",B)}function he(B,C){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(B.code)&&B.preventDefault();const E=B.code==="ArrowUp"||B.code==="ArrowRight"?i.step*1:B.code==="ArrowDown"||B.code==="ArrowLeft"?i.step*-1:0,M=[...i.modelValue];M[C]=St(M[C]+E,i.min,i.max),J(M)}return(B,C)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([i.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${i.mode}`,"ui-slider"])},[r.createElementVNode("div",t1,[r.createElementVNode("div",n1,[B.label?(r.openBlock(),r.createElementBlock("label",r1,[r.createElementVNode("span",null,r.toDisplayString(B.label),1),C[3]||(C[3]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(B.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),C[4]||(C[4]=r.createTextVNode()),i.mode==="text"?(r.openBlock(),r.createElementBlock("div",o1,r.toDisplayString(S.value),1)):r.createCommentVNode("",!0)]),C[10]||(C[10]=r.createTextVNode()),r.createElementVNode("div",i1,[r.createElementVNode("div",s1,[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)]),C[9]||(C[9]=r.createTextVNode()),r.createElementVNode("div",a1,[i.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(w),(E,M)=>(r.openBlock(),r.createElementBlock("div",{key:M,style:r.normalizeStyle({right:`${E}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),C[7]||(C[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef1",ref:d,style:r.normalizeStyle(j.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:C[0]||(C[0]=E=>he(E,0))},C[5]||(C[5]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36),C[8]||(C[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:r.normalizeStyle($.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:C[1]||(C[1]=E=>he(E,1))},C[6]||(C[6]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),C[11]||(C[11]=r.createTextVNode()),r.createElementVNode("div",l1,[i.mode==="input"?(r.openBlock(),r.createBlock(e1,{key:0,modelValue:h.value,"onUpdate:modelValue":C[2]||(C[2]=E=>h.value=E),class:"ui-focused-border",onChange:J},null,8,["modelValue"])):r.createCommentVNode("",!0)])],2),C[12]||(C[12]=r.createTextVNode()),R.value?(r.openBlock(),r.createElementBlock("div",c1,r.toDisplayString(R.value),1)):r.createCommentVNode("",!0)],2))}}),u1=r.defineComponent({__name:"VScroll",props:{scrollTop:{},clientHeight:{},scrollHeight:{}},emits:["update:scrollTop"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(),l=r.computed(()=>o.clientHeight/(o.scrollHeight||1)),c=r.computed(()=>l.value<1),d=r.computed(()=>{const p=r.unref(l);return{top:o.scrollTop*p+"px",height:Math.floor(o.clientHeight*p)+"px"}});return st(i,"pointerdown",p=>{const h={clientY:p.clientY},m=Ol(document,"mousemove",y=>{const x=(y.clientY-h.clientY)/l.value;n("update:scrollTop",o.scrollTop+x),h.clientY=y.clientY});["mouseup","pointercancel"].forEach(y=>{document.addEventListener(y,m,{once:!0})})}),(p,h)=>c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:i,class:"v-scroll"},[r.createElementVNode("div",{class:"v-scroll__scrollbar",style:r.normalizeStyle(d.value)},null,4)],512)):r.createCommentVNode("",!0)}}),p1=r.defineComponent({__name:"HScroll",props:{scrollLeft:{},clientWidth:{},scrollWidth:{}},emits:["update:scrollLeft"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(),l=r.computed(()=>o.clientWidth/(o.scrollWidth||1)),c=r.computed(()=>l.value<1),d=r.computed(()=>{const p=r.unref(l);return{left:o.scrollLeft*p+"px",width:Math.floor(o.clientWidth*p)+"px"}});return st(i,"pointerdown",p=>{const h={clientX:p.clientX},m=Ol(document,"mousemove",y=>{const x=(y.clientX-h.clientX)/l.value;n("update:scrollLeft",o.scrollLeft+x),h.clientX=y.clientX});["mouseup","pointercancel"].forEach(y=>{document.addEventListener(y,m,{once:!0})})}),(p,h)=>c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:i,class:"h-scroll"},[r.createElementVNode("div",{class:"h-scroll__scrollbar",style:r.normalizeStyle(d.value)},null,4)],512)):r.createCommentVNode("",!0)}}),h1={class:"ui-scrollable"},f1=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(d){gw(n,d,"scrollTop","scrollLeft","clientHeight","clientWidth","scrollHeight","scrollWidth")}const i=d=>{d.preventDefault();const p=d.currentTarget;p.scrollTop+=d.deltaY,p.scrollLeft+=d.deltaX,o(p)};function l(d){ut(r.unref(e),p=>{p.scrollTop=d,o(p)})}function c(d){ut(r.unref(e),p=>{p.scrollLeft=d,o(p)})}return Wp(e,d=>{ut(d,p=>o(p))}),r.onMounted(()=>{ut(r.unref(e),d=>{o(d),d.addEventListener("wheel",i)})}),r.onUnmounted(()=>{ut(r.unref(e),d=>d.removeEventListener("wheel",i))}),(d,p)=>(r.openBlock(),r.createElementBlock("div",h1,[r.createElementVNode("div",{ref_key:"containerRef",ref:e,class:"ui-scrollable__container",onWheel:i},[r.renderSlot(d.$slots,"default")],544),p[2]||(p[2]=r.createTextVNode()),r.createVNode(u1,{"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(p1,{"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"])]))}}),m1="add.svg",g1="box.svg",y1="calendar.svg",v1="checkmark.svg",_1="clipboard.svg",C1="close.svg",w1="copy.svg",b1="download.svg",x1="duplicate.svg",k1="edit.svg",S1="error.svg",E1="filter.svg",T1="help.svg",N1="info.svg",A1="link.svg",V1="loading.svg",B1="lock.svg",P1="maximize.svg",R1="minimize.svg",D1="minus.svg",I1="more.svg",F1="open.svg",O1="pause.svg",L1="play.svg",M1="renew.svg",G1="restart.svg",$1="reverse.svg",z1="settings.svg",U1="sort.svg",Z1="stop.svg",j1="success.svg",W1="time.svg",H1="tune.svg",q1="warning.svg",K1="zip.svg",X1={add:m1,"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:g1,calendar:y1,"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:v1,"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:_1,close:C1,copy:w1,"data-dimentions":"data-dimentions.svg","delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg",download:b1,"drag-dots":"drag-dots.svg",duplicate:x1,edit:k1,error:S1,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:A1,loading:V1,lock:B1,maximize:P1,minimize:R1,minus:D1,more:I1,open:F1,"paper-clip":"paper-clip.svg",pause:O1,play:L1,renew:M1,restart:G1,reverse:$1,settings:z1,sort:U1,stop:Z1,success:j1,time:W1,tune:H1,warning:q1,"x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:K1},Y1="add.svg",J1="annotate.svg",Q1="annotation.svg",eT="area.svg",tT="axes.svg",nT="bar.svg",rT="bindot.svg",oT="box.svg",iT="boxplot.svg",sT="bubble.svg",aT="calendar.svg",lT="canvas.svg",cT="checkbox.svg",dT="checkmark.svg",uT="clipboard.svg",pT="close.svg",hT="cluster.svg",fT="code.svg",mT="color.svg",gT="columns.svg",yT="container.svg",vT="cookie.svg",_T="copy.svg",CT="cpu.svg",wT="debug.svg",bT="dna.svg",xT="download.svg",kT="duplicate.svg",ST="edit.svg",ET="error.svg",TT="filter.svg",NT="generate.svg",AT="graph.svg",VT="heatmap.svg",BT="help.svg",PT="info.svg",RT="jitter.svg",DT="lasso.svg",IT="layers.svg",FT="learn.svg",OT="legend.svg",LT="line.svg",MT="link.svg",GT="loading.svg",$T="lock.svg",zT="maximize.svg",UT="menu.svg",ZT="minimize.svg",jT="minus.svg",WT="more.svg",HT="pause.svg",qT="pin.svg",KT="play.svg",XT="product.svg",YT="publications.svg",JT="renew.svg",QT="restart.svg",eN="reverse.svg",tN="search.svg",nN="server.svg",rN="settings.svg",oN="sina.svg",iN="skatterplot.svg",sN="slice.svg",aN="sort.svg",lN="statistics.svg",cN="stop.svg",dN="success.svg",uN="table.svg",pN="template.svg",hN="terminal.svg",fN="time.svg",mN="tune.svg",gN="venn.svg",yN="violin.svg",vN="warning.svg",_N="wetlab.svg",CN="zip.svg",wN={"add-layer":"add-layer.svg",add:Y1,"align-center":"align-center.svg","align-left":"align-left.svg","align-right":"align-right.svg",annotate:J1,annotation:Q1,area:eT,"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:tT,"bar-cross":"bar-cross.svg","bar-error":"bar-error.svg","bar-stacked":"bar-stacked.svg","bar-trend":"bar-trend.svg",bar:nT,bindot:rT,box:oT,"boxplot-binned":"boxplot-binned.svg","boxplot-jitter":"boxplot-jitter.svg","boxplot-notched":"boxplot-notched.svg",boxplot:iT,bubble:sT,calendar:aT,canvas:lT,"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:cT,checkmark:dT,"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:uT,close:pT,"cloud-download":"cloud-download.svg","cloud-offline":"cloud-offline.svg","cloud-online":"cloud-online.svg","cloud-upload":"cloud-upload.svg",cluster:hT,code:fT,"color-fill":"color-fill.svg","color-none":"color-none.svg","color-stroke":"color-stroke.svg",color:mT,columns:gT,"connected-points":"connected-points.svg",container:yT,cookie:vT,copy:_T,cpu:CT,"data-dimentions":"data-dimentions.svg",debug:wT,"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:bT,download:xT,"drag-dots":"drag-dots.svg","drag-horizontal":"drag-horizontal.svg","drag-vertical":"drag-vertical.svg",duplicate:kT,edit:ST,"error-bar":"error-bar.svg",error:ET,"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:TT,"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:NT,graph:AT,heatmap:VT,"help-outline":"help-outline.svg",help:BT,"info-outline":"info-outline.svg",info:PT,jitter:RT,"jump-link":"jump-link.svg",lasso:DT,layers:IT,learn:FT,"legend-box-dot":"legend-box-dot.svg","legend-box":"legend-box.svg",legend:OT,"line-binned":"line-binned.svg","line-error":"line-error.svg","line-jitter":"line-jitter.svg",line:LT,"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:MT,loading:GT,lock:$T,maximize:zT,menu:UT,minimize:ZT,minus:jT,more:WT,"paper-clip":"paper-clip.svg",pause:HT,pin:qT,play:KT,"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:XT,publications:YT,"radio-button-checked":"radio-button-checked.svg","radio-button":"radio-button.svg",renew:JT,restart:QT,reverse:eN,"rotation-0":"rotation-0.svg","rotation-45":"rotation-45.svg","rotation-90":"rotation-90.svg",search:tN,"server-on":"server-on.svg",server:nN,settings:rN,sina:oN,skatterplot:iN,slice:sN,"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:aN,statistics:lN,stop:cN,"strip-plot":"strip-plot.svg",success:dN,"table-add":"table-add.svg","table-alias":"table-alias.svg","table-import":"table-import.svg",table:uN,template:pN,terminal:hN,"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:fN,tune:mN,venn:gN,"view-hide":"view-hide.svg","view-show":"view-show.svg","violin-binned":"violin-binned.svg","violin-jitter":"violin-jitter.svg",violin:yN,warning:vN,wetlab:_N,"windows-collapse":"windows-collapse.svg","windows-expand":"windows-expand.svg","x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:CN,"zoom-in":"zoom-in.svg","zoom-out":"zoom-out.svg"};function bN(){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 xN=["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"],kN=["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"],SN={allCssVariables:bN(),icons16:X1,icons24:wN},EN={class:"block__not-found"},TN=r.defineComponent({__name:"NotFound",setup(t){const n=_l().useApp(),o=()=>{n.updateNavigationState(i=>{i.href="/"})};return(i,l)=>(r.openBlock(),r.createElementBlock("div",EN,[r.createElementVNode("h1",null,"Not found route: "+r.toDisplayString(r.unref(n).snapshot.navigationState.href),1),r.createVNode(r.unref(Pl),{onClick:r.withModifiers(o,["stop"])},{default:r.withCtx(()=>l[0]||(l[0]=[r.createTextVNode("Return to main page")])),_:1})]))}}),Xl=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},NN={},AN={class:"block__loader-page"};function VN(t,e){return r.openBlock(),r.createElementBlock("div",AN,e[0]||(e[0]=[r.createElementVNode("div",{class:"loader-container"},[r.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"})],-1)]))}const BN=Xl(NN,[["render",VN]]),PN={class:"pl-app-notification-alert"},RN={class:"pl-app-notification-alert__content"},DN={class:"pl-app-notification-alert__title"},IN=r.defineComponent({__name:"PlAppErrorNotificationAlert",props:{errors:{}},setup(t){const e=t,n=r.ref(!1),o=r.ref(!0),i=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(d=>!!d)},{immediate:!0,deep:!0}),(c,d)=>(r.openBlock(),r.createElementBlock("div",PN,[r.createVNode(r.unref(zl),{modelValue:n.value,"onUpdate:modelValue":d[0]||(d[0]=p=>n.value=p),width:"720px",style:{"max-height":"100vh"}},{title:r.withCtx(()=>d[2]||(d[2]=[r.createTextVNode(" Errors ")])),default:r.withCtx(()=>[r.createElementVNode("div",RN,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,p=>{var h;return r.openBlock(),r.createElementBlock("div",{key:p[0],class:"pl-app-notification-alert__item"},[r.createElementVNode("div",DN,r.toDisplayString(p[0]),1),r.createVNode(r.unref(bp),{value:(h=p[1])==null?void 0:h.message},null,8,["value"])])}),128))])]),_:1},8,["modelValue"]),r.createVNode(r.unref(Zp),{modelValue:o.value,"onUpdate:modelValue":d[1]||(d[1]=p=>o.value=p),type:"error",closable:""},{actions:r.withCtx(()=>[r.createVNode(r.unref(Ns),{icon:"arrow-right",onClick:l},{default:r.withCtx(()=>d[3]||(d[3]=[r.createTextVNode("See errors")])),_:1}),r.createVNode(r.unref(lp))]),default:r.withCtx(()=>[d[4]||(d[4]=r.createTextVNode(" Some outputs have errors. "))]),_:1},8,["modelValue"])]))}}),FN={key:0,class:"block__loader"},ON=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 i=e.value;if(typeof i=="number")return i>=1?void 0:(i*100).toFixed(2)+"%"});return(i,l)=>n.value?(r.openBlock(),r.createElementBlock("div",FN)):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)}}),LN={class:"block block__layout"},MN={key:0},GN=r.defineComponent({__name:"BlockLayout",setup(t){const e=_l(),n=h=>{try{return new URL(h,"http://dummy").pathname}catch{console.error("Invalid href",h);return}},o=r.computed(()=>e.loaded?e.useApp().href:void 0),i=r.computed(()=>{if(e.loaded){const h=e.useApp(),m=n(h.snapshot.navigationState.href);return m?h.getRoute(m):void 0}}),l=r.computed(()=>e.loaded?e.useApp():void 0),c=r.computed(()=>l.value?l.value.model.outputErrors:{}),d=r.computed(()=>{var h;return((h=l.value)==null?void 0:h.showErrorsNotification)??!0}),p=r.computed(()=>{var h,m;return(m=(h=l.value)==null?void 0:h.progress)==null?void 0:m.call(h)});return(h,m)=>(r.openBlock(),r.createElementBlock("div",LN,[r.createVNode(ON,{value:p.value},null,8,["value"]),r.unref(e).error?(r.openBlock(),r.createElementBlock("div",MN,r.toDisplayString(r.unref(e).error),1)):r.unref(e).loaded?i.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.value),{key:o.value})):(r.openBlock(),r.createBlock(TN,{key:3})):(r.openBlock(),r.createBlock(BN,{key:1},{default:r.withCtx(()=>m[0]||(m[0]=[r.createTextVNode("Loading...")])),_:1})),r.unref(e).loaded&&d.value?(r.openBlock(),r.createBlock(r.unref(IN),{key:4,errors:c.value},null,8,["errors"])):r.createCommentVNode("",!0)]))}});var $s={exports:{}};/**
|
|
65
|
+
)`}function l(){const d=t.value;if(!d)return;const p=[o(d),i(d)].filter(h=>h!==null);d.style.setProperty("-webkit-mask-image",p.join(",")),d.style.setProperty("mask-image",p.join(",")),p.length>1&&(d.style.setProperty("-webkit-mask-composite","source-in"),d.style.setProperty("mask-composite","source-in"))}const c=Nl(l);r.onMounted(l),st(window,"scroll",c,!0),st(window,"resize",c,!0)}function Hp(t,e){up(()=>{ut(r.unref(t),n=>{pp(n,()=>e(n))})}),r.onUnmounted(()=>{ut(r.unref(t),n=>{hp(n)})})}const Sr={item:"sortable__item",animate:"sortable__animate"},Mi=t=>t.getBoundingClientRect().y,qp=t=>{const{y:e,height:n}=t.getBoundingClientRect();return e+Math.ceil(n/2)},OE=t=>{const{y:e,height:n}=t.getBoundingClientRect();return e+n};function Kp(t,e){const n={item:void 0,options(){var w;return[...((w=t.value)==null?void 0:w.children)??[]]}},o=r.computed(()=>n.options()),i=e.shakeBuffer??10,l=e.reorderDelay??100;function c(w){const E=e.handle?this.querySelector(e.handle):null;E&&(E&&!E.contains(w.target)||(this.classList.remove(Sr.animate),this.classList.add(Sr.item),n.item={el:this,y:w.y,dy:0,orderChanged:!1}))}function d(w){const E=n.options();return E.slice(0,E.indexOf(w))}function p(w){const E=n.options();return E.slice(E.indexOf(w)+1)}function h(w,E){const O=n.options().filter(b=>b!==E),$=O.indexOf(w);return O.splice($,0,E),O}function m(w,E){const O=n.options().filter(b=>b!==E),$=O.indexOf(w);return O.splice($+1,0,E),O}function y(w,E){w.dy=E-w.y,w.el.style.setProperty("transform",`translateY(${w.dy}px)`)}function x(w){var E;if(!n.item)return;const{el:O}=n.item;if(!O.isConnected){n.item=void 0;return}const $=w.map(Z=>Mi(Z)),b=Mi(O);(E=t.value)==null||E.replaceChildren(...w);const R=Mi(O),F=w.map(Z=>Mi(Z)),D=[];for(let Z=0;Z<F.length;Z++){const ne=w[Z];if(ne===n.item.el)continue;const H=F[Z],J=$[Z]-H;ne.style.transform=`translateY(${J}px)`,D.push(ne)}const V=R-b;n.item.y=n.item.y+V,n.item.dy=n.item.dy-V,n.item.orderChanged=!0,n.item.el.style.setProperty("transform",`translateY(${n.item.dy}px)`),D.forEach(Z=>Z.classList.remove(Sr.animate)),requestAnimationFrame(function(){D.forEach(Z=>{Z.classList.add(Sr.animate),Z.style.transform="",Z.addEventListener("transitionend",()=>{Z.classList.remove(Sr.animate)})})})}st(window,"mousemove",w=>{if(!n.item)return;const{el:E}=n.item;y(n.item,w.y);const O=Mi(n.item.el),$=OE(n.item.el),b=d(E),R=p(E);b.forEach(F=>{const D=qp(F);O+i<D&&x(h(F,E))}),R.forEach(F=>{const D=qp(F);$-i>D&&x(m(F,E))})}),st(window,"mouseup",()=>{if(!n.item)return;const{el:w,orderChanged:E}=n.item;w.classList.add(Sr.animate),w.style.removeProperty("transform"),w.addEventListener("transitionend",()=>{w.classList.remove(Sr.animate,Sr.item)}),setTimeout(()=>{if(!E)return;const O=n.options().map(b=>Number(b.getAttribute("data-index"))),$=t.value;if($){for(const b of n.options())$.removeChild(b);o.value.forEach(b=>{$.appendChild(b)})}e.onChange(O)},l),n.item=void 0}),r.watchEffect(()=>{o.value.forEach((w,E)=>{w.removeEventListener("mousedown",c),w.addEventListener("mousedown",c),w.setAttribute("data-index",String(E))})})}function LE(t,e){let n;r.onMounted(()=>{n=setInterval(t,e)}),r.onUnmounted(()=>clearInterval(n))}function ME(t,e,n){const o=r.reactive({data:bl.deepClone(e(t.value)),changed:!1});return r.watch(()=>o.data,i=>{o.changed?n(bl.deepClone(i)):o.changed=!0},{deep:!0}),r.watch(t,i=>{Object.assign(o,{data:bl.deepClone(e(i)),changed:!1})},{deep:!0,immediate:!0}),o}function GE(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 uC(()=>{const i=n();this.run(...i).catch(console.error)},o)}});return e.run=e.run.bind(e),e}function $E(t,e){function n(c,d){const p=r.unref(t);if(!p)return;const h=`translate(${d.x-c.x}px, ${d.y-c.y}px)`;p.style.setProperty("transform",h),e(d)}function o(c){const d=p=>n(c,p);document.addEventListener("mousemove",d),document.addEventListener("mouseup",()=>{const p=r.unref(t);document.removeEventListener("mousemove",d),p&&(p.style.setProperty("transition","all .3s ease-in-out"),p.style.removeProperty("transform"),p.addEventListener("transitionend",()=>{p.style.removeProperty("transition")}))},{once:!0})}function i(){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(i),r.onUnmounted(l)}const zE={class:"ui-slider__wrapper"},UE={class:"ui-slider__label-section"},ZE={key:0,class:"text-s"},WE={class:"ui-slider__base"},jE={class:"ui-slider__container"},HE={class:"ui-slider__container ui-slider__container-thumb"},qE=["data-percent"],KE=["data-percent"],XE=["data-percent"],YE={key:0,class:"ui-slider__error"},JE=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,i=t,l=r.reactive({deltaValue1:0,deltaValue2:0,deltaValue3:0}),c=r.ref(),d=r.ref(),p=r.ref(),h=r.ref(),m=r.computed(()=>i.max-i.min),y=r.computed(()=>i),x=Kl(y),w=r.computed(()=>St((i.modelValue[0]??0)+l.deltaValue1,i.min,i.max)),E=r.computed(()=>St((i.modelValue[1]??0)+l.deltaValue2,i.min,i.max)),O=r.computed(()=>St((i.modelValue[2]??0)+l.deltaValue3,i.min,i.max)),$=r.computed(()=>{const k=i.modelValue;if(!(Array.isArray(k)&&k.length===3&&k.every(W=>Number.isFinite(W))))return"Expected model [number, number, number]";const M=[];return[...i.modelValue].forEach(W=>{W>i.max&&M.push(`Max model value must be lower than max props ${i.max}.`),W<i.min&&M.push("Min model value must be greater than max props.")}),M.length>0?M.join(" "):i.error}),b=r.computed(()=>(w.value-i.min)/m.value),R=r.computed(()=>(E.value-i.min)/m.value),F=r.computed(()=>(O.value-i.min)/m.value),D=r.computed(()=>G()),V=r.computed(()=>({right:D.value[0]+"%",left:100-D.value[2]+"%"})),Z=r.computed(()=>({right:Math.ceil((1-b.value)*100)+"%"})),ne=r.computed(()=>({right:Math.ceil((1-R.value)*100)+"%"})),H=r.computed(()=>({right:Math.ceil((1-F.value)*100)+"%"}));gr(d,k=>{var M;ut((M=r.unref(c))==null?void 0:M.getBoundingClientRect(),W=>{const{dx:q}=k;l.deltaValue1=q/W.width*m.value,d.value&&J(d.value,i.modelValue[0],l.deltaValue1),k.stop&&(Q([z(w.value),z(E.value),z(O.value)]),l.deltaValue1=0)})}),gr(p,k=>{var M;ut((M=r.unref(c))==null?void 0:M.getBoundingClientRect(),W=>{const{dx:q}=k;l.deltaValue2=q/W.width*m.value,p.value&&J(p.value,i.modelValue[1],l.deltaValue2),k.stop&&(Q([z(w.value),z(E.value),z(O.value)]),l.deltaValue2=0)})}),gr(h,k=>{var M;ut((M=r.unref(c))==null?void 0:M.getBoundingClientRect(),W=>{const{dx:q}=k;l.deltaValue3=q/W.width*m.value,h.value&&J(h.value,i.modelValue[2],l.deltaValue3),k.stop&&(Q([z(w.value),z(E.value),z(O.value)]),l.deltaValue3=0)})});function J(k,M,W){const q=z(St((M??0)+W,i.min,i.max));k.dataset.percent=`${q}${i.measure}`,A()}function G(){const k=Math.ceil((1-b.value)*100),M=Math.ceil((1-R.value)*100),W=Math.ceil((1-F.value)*100);return[k,M,W].sort((q,re)=>q-re)}function z(k){const M=St(k,i.min,i.max);return Math.round((M+Number.EPSILON)*(1/i.step))/(1/i.step)}function Q(k){o("update:modelValue",k)}function A(){const k=Number(Z.value.right.substring(0,Z.value.right.length-1)),M=Number(ne.value.right.substring(0,ne.value.right.length-1)),W=Number(H.value.right.substring(0,H.value.right.length-1)),q=[{r:k,th:d},{r:M,th:p},{r:W,th:h}].sort((re,ue)=>re.r-ue.r);q[0].th.value&&(q[0].th.value.dataset.hint="high"),q[1].th.value&&(q[1].th.value.dataset.hint="mid"),q[2].th.value&&(q[2].th.value.dataset.hint="low")}function C(k,M){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(k.code)&&k.preventDefault();const W=k.code==="ArrowUp"||k.code==="ArrowRight"?i.step*1:k.code==="ArrowDown"||k.code==="ArrowLeft"?i.step*-1:0,q=[...i.modelValue];q[M]=St(q[M]+W,i.min,i.max),Q(q),A()}return r.onMounted(()=>{A()}),(k,M)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([i.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope ui-slider__triple"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${i.mode}`,"ui-slider"])},[r.createElementVNode("div",zE,[r.createElementVNode("div",UE,[k.label?(r.openBlock(),r.createElementBlock("label",ZE,[r.createElementVNode("span",null,r.toDisplayString(k.label),1),M[3]||(M[3]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(k.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)]),M[11]||(M[11]=r.createTextVNode()),r.createElementVNode("div",WE,[r.createElementVNode("div",jE,[r.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(V.value)},null,4)],512)]),M[10]||(M[10]=r.createTextVNode()),r.createElementVNode("div",HE,[i.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(x),(W,q)=>(r.openBlock(),r.createElementBlock("div",{key:q,style:r.normalizeStyle({right:`${W}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),M[7]||(M[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef1",ref:d,style:r.normalizeStyle(Z.value),"data-percent":i.modelValue[0]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r1:"",tabindex:"0",onKeydown:M[0]||(M[0]=W=>C(W,0))},M[4]||(M[4]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,qE),M[8]||(M[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:r.normalizeStyle(ne.value),"data-percent":i.modelValue[1]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r2:"",tabindex:"0",onKeydown:M[1]||(M[1]=W=>C(W,1))},M[5]||(M[5]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,KE),M[9]||(M[9]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef3",ref:h,style:r.normalizeStyle(H.value),"data-percent":i.modelValue[2]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r3:"",tabindex:"0",onKeydown:M[2]||(M[2]=W=>C(W,2))},M[6]||(M[6]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,XE)])])]),M[12]||(M[12]=r.createTextVNode()),M[13]||(M[13]=r.createElementVNode("div",{class:"ui-slider__input-wrapper d-flex"},null,-1))],2),M[14]||(M[14]=r.createTextVNode()),$.value?(r.openBlock(),r.createElementBlock("div",YE,r.toDisplayString($.value),1)):r.createCommentVNode("",!0)],2))}}),QE={class:"ui-input-range__separator"},e1=r.defineComponent({__name:"InputRange",props:{modelValue:{},separator:{default:"-"}},emits:["update:modelValue","change"],setup(t,{emit:e}){const n=t,o=e,i=r.reactive({left:n.modelValue[0],right:n.modelValue[1]}),l=r.ref(!1),c=r.computed(()=>(l.value,"ui-input-range-focused")),d=r.computed({get(){return{left:Math.min(...n.modelValue),right:Math.max(...n.modelValue)}},set(){}});r.watch(()=>d.value,m=>(i.left=m.left)&&(i.right=m.right));function p(){o("update:modelValue",[+i.left,+i.right]),o("change",[+i.left,+i.right])}function h(m,y){const x=y.target.value;/^[0-9]{0,2}$/.test(x)?m?i.left=+x:i.right=+x:m?i.left=+x.slice(0,x.length-1):i.right=+x.slice(0,x.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]=x=>d.value.left=x),class:"text-s",type:"text",onChange:p,onFocus:y[1]||(y[1]=x=>l.value=!0),onFocusout:y[2]||(y[2]=x=>l.value=!1),onInput:y[3]||(y[3]=x=>h(!0,x))},null,544),[[r.vModelText,d.value.left]]),y[8]||(y[8]=r.createTextVNode()),r.createElementVNode("div",QE,r.toDisplayString(n.separator),1),y[9]||(y[9]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":y[4]||(y[4]=x=>d.value.right=x),class:"text-s",type:"text",onChange:p,onFocus:y[5]||(y[5]=x=>l.value=!0),onFocusout:y[6]||(y[6]=x=>l.value=!1),onInput:y[7]||(y[7]=x=>h(!1,x))},null,544),[[r.vModelText,d.value.right]])],16))}}),t1={class:"ui-slider__wrapper"},n1={class:"ui-slider__label-section"},r1={key:0,class:"text-s"},o1={key:1,class:"ui-slider__value-static text-s"},i1={class:"ui-slider__base"},s1={class:"ui-slider__container"},a1={class:"ui-slider__container ui-slider__container-thumb"},l1={class:"ui-slider__input-wrapper d-flex"},c1={key:0,class:"ui-slider__error"},d1=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,i=t,l=r.reactive({deltaValue1:0,deltaValue2:0}),c=r.ref(),d=r.ref(),p=r.ref(),h=r.ref(i.modelValue),m=r.ref(i.modelValue[0]),y=r.ref(i.modelValue[1]),x=r.computed(()=>i),w=Kl(x),E=r.computed(()=>[m.value,y.value].sort((A,C)=>A-C).join("-")),O=r.computed(()=>i.max-i.min),$=r.computed(()=>St((i.modelValue[0]??0)+l.deltaValue1,i.min,i.max)),b=r.computed(()=>St((i.modelValue[1]??0)+l.deltaValue2,i.min,i.max)),R=r.computed(()=>{const A=i.modelValue;return Array.isArray(A)&&A.length===2&&A.every(C=>Number.isFinite(C))?i.error:"Expected model [number, number]"}),F=r.computed(()=>($.value-i.min)/O.value),D=r.computed(()=>(b.value-i.min)/O.value),V=r.computed(()=>J()),Z=r.computed(()=>({right:V.value[0]+"%",left:100-V.value[1]+"%"})),ne=r.computed(()=>({right:Math.ceil((1-F.value)*100)+"%"})),H=r.computed(()=>({right:Math.ceil((1-D.value)*100)+"%"}));r.watch(()=>i.modelValue,A=>{h.value=A,m.value=+A[0],y.value=+A[1]},{immediate:!0}),gr(d,A=>{var C;ut((C=r.unref(c))==null?void 0:C.getBoundingClientRect(),k=>{const{dx:M}=A;l.deltaValue1=M/k.width*O.value,m.value=G(St((i.modelValue[0]??0)+l.deltaValue1,i.min,i.max)),h.value=[m.value,y.value].sort((W,q)=>W-q),A.stop&&(z([G($.value),G(b.value)]),l.deltaValue1=0)})}),gr(p,A=>{var C;ut((C=r.unref(c))==null?void 0:C.getBoundingClientRect(),k=>{const{dx:M}=A;l.deltaValue2=M/k.width*O.value,y.value=G(St((i.modelValue[1]??0)+l.deltaValue2,i.min,i.max)),h.value=[m.value,y.value].sort((W,q)=>W-q),A.stop&&(z([G($.value),G(b.value)]),l.deltaValue2=0)})});function J(){const A=Math.ceil((1-F.value)*100),C=Math.ceil((1-D.value)*100);return[A,C].sort((k,M)=>k-M)}function G(A){const C=St(A,i.min,i.max);return Math.round((C+Number.EPSILON)*(1/i.step))/(1/i.step)}function z(A){o("update:modelValue",A)}function Q(A,C){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(A.code)&&A.preventDefault();const k=A.code==="ArrowUp"||A.code==="ArrowRight"?i.step*1:A.code==="ArrowDown"||A.code==="ArrowLeft"?i.step*-1:0,M=[...i.modelValue];M[C]=St(M[C]+k,i.min,i.max),z(M)}return(A,C)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([i.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${i.mode}`,"ui-slider"])},[r.createElementVNode("div",t1,[r.createElementVNode("div",n1,[A.label?(r.openBlock(),r.createElementBlock("label",r1,[r.createElementVNode("span",null,r.toDisplayString(A.label),1),C[3]||(C[3]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(A.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),C[4]||(C[4]=r.createTextVNode()),i.mode==="text"?(r.openBlock(),r.createElementBlock("div",o1,r.toDisplayString(E.value),1)):r.createCommentVNode("",!0)]),C[10]||(C[10]=r.createTextVNode()),r.createElementVNode("div",i1,[r.createElementVNode("div",s1,[r.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(Z.value)},null,4)],512)]),C[9]||(C[9]=r.createTextVNode()),r.createElementVNode("div",a1,[i.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(w),(k,M)=>(r.openBlock(),r.createElementBlock("div",{key:M,style:r.normalizeStyle({right:`${k}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),C[7]||(C[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef1",ref:d,style:r.normalizeStyle(ne.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:C[0]||(C[0]=k=>Q(k,0))},C[5]||(C[5]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36),C[8]||(C[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:r.normalizeStyle(H.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:C[1]||(C[1]=k=>Q(k,1))},C[6]||(C[6]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),C[11]||(C[11]=r.createTextVNode()),r.createElementVNode("div",l1,[i.mode==="input"?(r.openBlock(),r.createBlock(e1,{key:0,modelValue:h.value,"onUpdate:modelValue":C[2]||(C[2]=k=>h.value=k),class:"ui-focused-border",onChange:z},null,8,["modelValue"])):r.createCommentVNode("",!0)])],2),C[12]||(C[12]=r.createTextVNode()),R.value?(r.openBlock(),r.createElementBlock("div",c1,r.toDisplayString(R.value),1)):r.createCommentVNode("",!0)],2))}}),u1=r.defineComponent({__name:"VScroll",props:{scrollTop:{},clientHeight:{},scrollHeight:{}},emits:["update:scrollTop"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(),l=r.computed(()=>o.clientHeight/(o.scrollHeight||1)),c=r.computed(()=>l.value<1),d=r.computed(()=>{const p=r.unref(l);return{top:o.scrollTop*p+"px",height:Math.floor(o.clientHeight*p)+"px"}});return st(i,"pointerdown",p=>{const h={clientY:p.clientY},m=Ol(document,"mousemove",y=>{const x=(y.clientY-h.clientY)/l.value;n("update:scrollTop",o.scrollTop+x),h.clientY=y.clientY});["mouseup","pointercancel"].forEach(y=>{document.addEventListener(y,m,{once:!0})})}),(p,h)=>c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:i,class:"v-scroll"},[r.createElementVNode("div",{class:"v-scroll__scrollbar",style:r.normalizeStyle(d.value)},null,4)],512)):r.createCommentVNode("",!0)}}),p1=r.defineComponent({__name:"HScroll",props:{scrollLeft:{},clientWidth:{},scrollWidth:{}},emits:["update:scrollLeft"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(),l=r.computed(()=>o.clientWidth/(o.scrollWidth||1)),c=r.computed(()=>l.value<1),d=r.computed(()=>{const p=r.unref(l);return{left:o.scrollLeft*p+"px",width:Math.floor(o.clientWidth*p)+"px"}});return st(i,"pointerdown",p=>{const h={clientX:p.clientX},m=Ol(document,"mousemove",y=>{const x=(y.clientX-h.clientX)/l.value;n("update:scrollLeft",o.scrollLeft+x),h.clientX=y.clientX});["mouseup","pointercancel"].forEach(y=>{document.addEventListener(y,m,{once:!0})})}),(p,h)=>c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:i,class:"h-scroll"},[r.createElementVNode("div",{class:"h-scroll__scrollbar",style:r.normalizeStyle(d.value)},null,4)],512)):r.createCommentVNode("",!0)}}),h1={class:"ui-scrollable"},f1=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(d){yw(n,d,"scrollTop","scrollLeft","clientHeight","clientWidth","scrollHeight","scrollWidth")}const i=d=>{d.preventDefault();const p=d.currentTarget;p.scrollTop+=d.deltaY,p.scrollLeft+=d.deltaX,o(p)};function l(d){ut(r.unref(e),p=>{p.scrollTop=d,o(p)})}function c(d){ut(r.unref(e),p=>{p.scrollLeft=d,o(p)})}return Hp(e,d=>{ut(d,p=>o(p))}),r.onMounted(()=>{ut(r.unref(e),d=>{o(d),d.addEventListener("wheel",i)})}),r.onUnmounted(()=>{ut(r.unref(e),d=>d.removeEventListener("wheel",i))}),(d,p)=>(r.openBlock(),r.createElementBlock("div",h1,[r.createElementVNode("div",{ref_key:"containerRef",ref:e,class:"ui-scrollable__container",onWheel:i},[r.renderSlot(d.$slots,"default")],544),p[2]||(p[2]=r.createTextVNode()),r.createVNode(u1,{"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(p1,{"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"])]))}}),m1="add.svg",g1="box.svg",y1="calendar.svg",v1="checkmark.svg",_1="clipboard.svg",C1="close.svg",w1="copy.svg",b1="download.svg",x1="duplicate.svg",k1="edit.svg",S1="error.svg",E1="filter.svg",T1="help.svg",N1="info.svg",A1="link.svg",V1="loading.svg",B1="lock.svg",P1="maximize.svg",R1="minimize.svg",D1="minus.svg",I1="more.svg",F1="open.svg",O1="pause.svg",L1="play.svg",M1="renew.svg",G1="restart.svg",$1="reverse.svg",z1="settings.svg",U1="sort.svg",Z1="stop.svg",W1="success.svg",j1="time.svg",H1="tune.svg",q1="warning.svg",K1="zip.svg",X1={add:m1,"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:g1,calendar:y1,"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:v1,"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:_1,close:C1,copy:w1,"data-dimentions":"data-dimentions.svg","delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg",download:b1,"drag-dots":"drag-dots.svg",duplicate:x1,edit:k1,error:S1,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:A1,loading:V1,lock:B1,maximize:P1,minimize:R1,minus:D1,more:I1,open:F1,"paper-clip":"paper-clip.svg",pause:O1,play:L1,renew:M1,restart:G1,reverse:$1,settings:z1,sort:U1,stop:Z1,success:W1,time:j1,tune:H1,warning:q1,"x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:K1},Y1="add.svg",J1="annotate.svg",Q1="annotation.svg",eT="area.svg",tT="axes.svg",nT="bar.svg",rT="bindot.svg",oT="box.svg",iT="boxplot.svg",sT="bubble.svg",aT="calendar.svg",lT="canvas.svg",cT="checkbox.svg",dT="checkmark.svg",uT="clipboard.svg",pT="close.svg",hT="cluster.svg",fT="code.svg",mT="color.svg",gT="columns.svg",yT="container.svg",vT="cookie.svg",_T="copy.svg",CT="cpu.svg",wT="debug.svg",bT="dna.svg",xT="download.svg",kT="duplicate.svg",ST="edit.svg",ET="error.svg",TT="filter.svg",NT="generate.svg",AT="graph.svg",VT="heatmap.svg",BT="help.svg",PT="info.svg",RT="jitter.svg",DT="lasso.svg",IT="layers.svg",FT="learn.svg",OT="legend.svg",LT="line.svg",MT="link.svg",GT="loading.svg",$T="lock.svg",zT="maximize.svg",UT="menu.svg",ZT="minimize.svg",WT="minus.svg",jT="more.svg",HT="pause.svg",qT="pin.svg",KT="play.svg",XT="product.svg",YT="publications.svg",JT="renew.svg",QT="restart.svg",eN="reverse.svg",tN="search.svg",nN="server.svg",rN="settings.svg",oN="sina.svg",iN="skatterplot.svg",sN="slice.svg",aN="sort.svg",lN="statistics.svg",cN="stop.svg",dN="success.svg",uN="table.svg",pN="template.svg",hN="terminal.svg",fN="time.svg",mN="tune.svg",gN="venn.svg",yN="violin.svg",vN="warning.svg",_N="wetlab.svg",CN="zip.svg",wN={"add-layer":"add-layer.svg",add:Y1,"align-center":"align-center.svg","align-left":"align-left.svg","align-right":"align-right.svg",annotate:J1,annotation:Q1,area:eT,"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:tT,"bar-cross":"bar-cross.svg","bar-error":"bar-error.svg","bar-stacked":"bar-stacked.svg","bar-trend":"bar-trend.svg",bar:nT,bindot:rT,box:oT,"boxplot-binned":"boxplot-binned.svg","boxplot-jitter":"boxplot-jitter.svg","boxplot-notched":"boxplot-notched.svg",boxplot:iT,bubble:sT,calendar:aT,canvas:lT,"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:cT,checkmark:dT,"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:uT,close:pT,"cloud-download":"cloud-download.svg","cloud-offline":"cloud-offline.svg","cloud-online":"cloud-online.svg","cloud-upload":"cloud-upload.svg",cluster:hT,code:fT,"color-fill":"color-fill.svg","color-none":"color-none.svg","color-stroke":"color-stroke.svg",color:mT,columns:gT,"connected-points":"connected-points.svg",container:yT,cookie:vT,copy:_T,cpu:CT,"data-dimentions":"data-dimentions.svg",debug:wT,"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:bT,download:xT,"drag-dots":"drag-dots.svg","drag-horizontal":"drag-horizontal.svg","drag-vertical":"drag-vertical.svg",duplicate:kT,edit:ST,"error-bar":"error-bar.svg",error:ET,"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:TT,"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:NT,graph:AT,heatmap:VT,"help-outline":"help-outline.svg",help:BT,"info-outline":"info-outline.svg",info:PT,jitter:RT,"jump-link":"jump-link.svg",lasso:DT,layers:IT,learn:FT,"legend-box-dot":"legend-box-dot.svg","legend-box":"legend-box.svg",legend:OT,"line-binned":"line-binned.svg","line-error":"line-error.svg","line-jitter":"line-jitter.svg",line:LT,"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:MT,loading:GT,lock:$T,maximize:zT,menu:UT,minimize:ZT,minus:WT,more:jT,"paper-clip":"paper-clip.svg",pause:HT,pin:qT,play:KT,"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:XT,publications:YT,"radio-button-checked":"radio-button-checked.svg","radio-button":"radio-button.svg",renew:JT,restart:QT,reverse:eN,"rotation-0":"rotation-0.svg","rotation-45":"rotation-45.svg","rotation-90":"rotation-90.svg",search:tN,"server-on":"server-on.svg",server:nN,settings:rN,sina:oN,skatterplot:iN,slice:sN,"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:aN,statistics:lN,stop:cN,"strip-plot":"strip-plot.svg",success:dN,"table-add":"table-add.svg","table-alias":"table-alias.svg","table-import":"table-import.svg",table:uN,template:pN,terminal:hN,"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:fN,tune:mN,venn:gN,"view-hide":"view-hide.svg","view-show":"view-show.svg","violin-binned":"violin-binned.svg","violin-jitter":"violin-jitter.svg",violin:yN,warning:vN,wetlab:_N,"windows-collapse":"windows-collapse.svg","windows-expand":"windows-expand.svg","x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:CN,"zoom-in":"zoom-in.svg","zoom-out":"zoom-out.svg"};function bN(){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 xN=["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"],kN=["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"],SN={allCssVariables:bN(),icons16:X1,icons24:wN},EN={class:"block__not-found"},TN=r.defineComponent({__name:"NotFound",setup(t){const n=_l().useApp(),o=()=>{n.updateNavigationState(i=>{i.href="/"})};return(i,l)=>(r.openBlock(),r.createElementBlock("div",EN,[r.createElementVNode("h1",null,"Not found route: "+r.toDisplayString(r.unref(n).snapshot.navigationState.href),1),r.createVNode(r.unref(Pl),{onClick:r.withModifiers(o,["stop"])},{default:r.withCtx(()=>l[0]||(l[0]=[r.createTextVNode("Return to main page")])),_:1})]))}}),Xl=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},NN={},AN={class:"block__loader-page"};function VN(t,e){return r.openBlock(),r.createElementBlock("div",AN,e[0]||(e[0]=[r.createElementVNode("div",{class:"loader-container"},[r.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"})],-1)]))}const BN=Xl(NN,[["render",VN]]),PN={class:"pl-app-notification-alert"},RN={class:"pl-app-notification-alert__content"},DN={class:"pl-app-notification-alert__title"},IN=r.defineComponent({__name:"PlAppErrorNotificationAlert",props:{errors:{}},setup(t){const e=t,n=r.ref(!1),o=r.ref(!0),i=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(d=>!!d)},{immediate:!0,deep:!0}),(c,d)=>(r.openBlock(),r.createElementBlock("div",PN,[r.createVNode(r.unref(zl),{modelValue:n.value,"onUpdate:modelValue":d[0]||(d[0]=p=>n.value=p),width:"720px",style:{"max-height":"100vh"}},{title:r.withCtx(()=>d[2]||(d[2]=[r.createTextVNode(" Errors ")])),default:r.withCtx(()=>[r.createElementVNode("div",RN,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,p=>{var h;return r.openBlock(),r.createElementBlock("div",{key:p[0],class:"pl-app-notification-alert__item"},[r.createElementVNode("div",DN,r.toDisplayString(p[0]),1),r.createVNode(r.unref(xp),{value:(h=p[1])==null?void 0:h.message},null,8,["value"])])}),128))])]),_:1},8,["modelValue"]),r.createVNode(r.unref(Wp),{modelValue:o.value,"onUpdate:modelValue":d[1]||(d[1]=p=>o.value=p),type:"error",closable:""},{actions:r.withCtx(()=>[r.createVNode(r.unref(Ns),{icon:"arrow-right",onClick:l},{default:r.withCtx(()=>d[3]||(d[3]=[r.createTextVNode("See errors")])),_:1}),r.createVNode(r.unref(lp))]),default:r.withCtx(()=>[d[4]||(d[4]=r.createTextVNode(" Some outputs have errors. "))]),_:1},8,["modelValue"])]))}}),FN={key:0,class:"block__loader"},ON=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 i=e.value;if(typeof i=="number")return i>=1?void 0:(i*100).toFixed(2)+"%"});return(i,l)=>n.value?(r.openBlock(),r.createElementBlock("div",FN)):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)}}),LN={class:"block block__layout"},MN={key:0},GN=r.defineComponent({__name:"BlockLayout",setup(t){const e=_l(),n=h=>{try{return new URL(h,"http://dummy").pathname}catch{console.error("Invalid href",h);return}},o=r.computed(()=>e.loaded?e.useApp().href:void 0),i=r.computed(()=>{if(e.loaded){const h=e.useApp(),m=n(h.snapshot.navigationState.href);return m?h.getRoute(m):void 0}}),l=r.computed(()=>e.loaded?e.useApp():void 0),c=r.computed(()=>l.value?l.value.model.outputErrors:{}),d=r.computed(()=>{var h;return((h=l.value)==null?void 0:h.showErrorsNotification)??!0}),p=r.computed(()=>{var h,m;return(m=(h=l.value)==null?void 0:h.progress)==null?void 0:m.call(h)});return(h,m)=>(r.openBlock(),r.createElementBlock("div",LN,[r.createVNode(ON,{value:p.value},null,8,["value"]),r.unref(e).error?(r.openBlock(),r.createElementBlock("div",MN,r.toDisplayString(r.unref(e).error),1)):r.unref(e).loaded?i.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.value),{key:o.value})):(r.openBlock(),r.createBlock(TN,{key:3})):(r.openBlock(),r.createBlock(BN,{key:1},{default:r.withCtx(()=>m[0]||(m[0]=[r.createTextVNode("Loading...")])),_:1})),r.unref(e).loaded&&d.value?(r.openBlock(),r.createBlock(r.unref(IN),{key:4,errors:c.value},null,8,["errors"])):r.createCommentVNode("",!0)]))}});var $s={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
|
-
*/$s.exports,function(t,e){(function(){var n,o="4.17.21",i=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",d="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",h=500,m="__lodash_placeholder__",y=1,x=2,w=4,S=1,O=2,G=1,b=2,R=4,F=8,D=16,A=32,U=64,j=128,$=256,Z=512,W=30,J="...",he=800,B=16,C=1,E=2,M=3,H=1/0,K=9007199254740991,ne=17976931348623157e292,de=NaN,ke=4294967295,Se=ke-1,Ze=ke>>>1,ht=[["ary",j],["bind",G],["bindKey",b],["curry",F],["curryRight",D],["flip",Z],["partial",A],["partialRight",U],["rearg",$]],Ke="[object Arguments]",Un="[object Array]",WB="[object AsyncFunction]",Zi="[object Boolean]",ji="[object Date]",HB="[object DOMException]",ea="[object Error]",ta="[object Function]",Uh="[object GeneratorFunction]",Nn="[object Map]",Wi="[object Number]",qB="[object Null]",Qn="[object Object]",Zh="[object Promise]",KB="[object Proxy]",Hi="[object RegExp]",An="[object Set]",qi="[object String]",na="[object Symbol]",XB="[object Undefined]",Ki="[object WeakMap]",YB="[object WeakSet]",Xi="[object ArrayBuffer]",Io="[object DataView]",vc="[object Float32Array]",_c="[object Float64Array]",Cc="[object Int8Array]",wc="[object Int16Array]",bc="[object Int32Array]",xc="[object Uint8Array]",kc="[object Uint8ClampedArray]",Sc="[object Uint16Array]",Ec="[object Uint32Array]",JB=/\b__p \+= '';/g,QB=/\b(__p \+=) '' \+/g,eP=/(__e\(.*?\)|\b__t\)) \+\n'';/g,jh=/&(?:amp|lt|gt|quot|#39);/g,Wh=/[&<>"']/g,tP=RegExp(jh.source),nP=RegExp(Wh.source),rP=/<%-([\s\S]+?)%>/g,oP=/<%([\s\S]+?)%>/g,Hh=/<%=([\s\S]+?)%>/g,iP=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sP=/^\w*$/,aP=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Tc=/[\\^$.*+?()[\]{}|]/g,lP=RegExp(Tc.source),Nc=/^\s+/,cP=/\s/,dP=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,uP=/\{\n\/\* \[wrapped with (.+)\] \*/,pP=/,? & /,hP=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fP=/[()=,{}\[\]\/\s]/,mP=/\\(\\)?/g,gP=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qh=/\w*$/,yP=/^[-+]0x[0-9a-f]+$/i,vP=/^0b[01]+$/i,_P=/^\[object .+?Constructor\]$/,CP=/^0o[0-7]+$/i,wP=/^(?:0|[1-9]\d*)$/,bP=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ra=/($^)/,xP=/['\n\r\u2028\u2029\\]/g,oa="\\ud800-\\udfff",kP="\\u0300-\\u036f",SP="\\ufe20-\\ufe2f",EP="\\u20d0-\\u20ff",Kh=kP+SP+EP,Xh="\\u2700-\\u27bf",Yh="a-z\\xdf-\\xf6\\xf8-\\xff",TP="\\xac\\xb1\\xd7\\xf7",NP="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",AP="\\u2000-\\u206f",VP=" \\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",Jh="A-Z\\xc0-\\xd6\\xd8-\\xde",Qh="\\ufe0e\\ufe0f",ef=TP+NP+AP+VP,Ac="['’]",BP="["+oa+"]",tf="["+ef+"]",ia="["+Kh+"]",nf="\\d+",PP="["+Xh+"]",rf="["+Yh+"]",of="[^"+oa+ef+nf+Xh+Yh+Jh+"]",Vc="\\ud83c[\\udffb-\\udfff]",RP="(?:"+ia+"|"+Vc+")",sf="[^"+oa+"]",Bc="(?:\\ud83c[\\udde6-\\uddff]){2}",Pc="[\\ud800-\\udbff][\\udc00-\\udfff]",Fo="["+Jh+"]",af="\\u200d",lf="(?:"+rf+"|"+of+")",DP="(?:"+Fo+"|"+of+")",cf="(?:"+Ac+"(?:d|ll|m|re|s|t|ve))?",df="(?:"+Ac+"(?:D|LL|M|RE|S|T|VE))?",uf=RP+"?",pf="["+Qh+"]?",IP="(?:"+af+"(?:"+[sf,Bc,Pc].join("|")+")"+pf+uf+")*",FP="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",OP="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",hf=pf+uf+IP,LP="(?:"+[PP,Bc,Pc].join("|")+")"+hf,MP="(?:"+[sf+ia+"?",ia,Bc,Pc,BP].join("|")+")",GP=RegExp(Ac,"g"),$P=RegExp(ia,"g"),Rc=RegExp(Vc+"(?="+Vc+")|"+MP+hf,"g"),zP=RegExp([Fo+"?"+rf+"+"+cf+"(?="+[tf,Fo,"$"].join("|")+")",DP+"+"+df+"(?="+[tf,Fo+lf,"$"].join("|")+")",Fo+"?"+lf+"+"+cf,Fo+"+"+df,OP,FP,nf,LP].join("|"),"g"),UP=RegExp("["+af+oa+Kh+Qh+"]"),ZP=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jP=["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"],WP=-1,Qe={};Qe[vc]=Qe[_c]=Qe[Cc]=Qe[wc]=Qe[bc]=Qe[xc]=Qe[kc]=Qe[Sc]=Qe[Ec]=!0,Qe[Ke]=Qe[Un]=Qe[Xi]=Qe[Zi]=Qe[Io]=Qe[ji]=Qe[ea]=Qe[ta]=Qe[Nn]=Qe[Wi]=Qe[Qn]=Qe[Hi]=Qe[An]=Qe[qi]=Qe[Ki]=!1;var Ye={};Ye[Ke]=Ye[Un]=Ye[Xi]=Ye[Io]=Ye[Zi]=Ye[ji]=Ye[vc]=Ye[_c]=Ye[Cc]=Ye[wc]=Ye[bc]=Ye[Nn]=Ye[Wi]=Ye[Qn]=Ye[Hi]=Ye[An]=Ye[qi]=Ye[na]=Ye[xc]=Ye[kc]=Ye[Sc]=Ye[Ec]=!0,Ye[ea]=Ye[ta]=Ye[Ki]=!1;var HP={À:"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"},qP={"&":"&","<":"<",">":">",'"':""","'":"'"},KP={"&":"&","<":"<",">":">",""":'"',"'":"'"},XP={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},YP=parseFloat,JP=parseInt,ff=typeof Xo=="object"&&Xo&&Xo.Object===Object&&Xo,QP=typeof self=="object"&&self&&self.Object===Object&&self,Ct=ff||QP||Function("return this")(),Dc=e&&!e.nodeType&&e,Qr=Dc&&!0&&t&&!t.nodeType&&t,mf=Qr&&Qr.exports===Dc,Ic=mf&&ff.process,nn=function(){try{var P=Qr&&Qr.require&&Qr.require("util").types;return P||Ic&&Ic.binding&&Ic.binding("util")}catch{}}(),gf=nn&&nn.isArrayBuffer,yf=nn&&nn.isDate,vf=nn&&nn.isMap,_f=nn&&nn.isRegExp,Cf=nn&&nn.isSet,wf=nn&&nn.isTypedArray;function Xt(P,q,z){switch(z.length){case 0:return P.call(q);case 1:return P.call(q,z[0]);case 2:return P.call(q,z[0],z[1]);case 3:return P.call(q,z[0],z[1],z[2])}return P.apply(q,z)}function eR(P,q,z,ce){for(var Te=-1,je=P==null?0:P.length;++Te<je;){var ft=P[Te];q(ce,ft,z(ft),P)}return ce}function rn(P,q){for(var z=-1,ce=P==null?0:P.length;++z<ce&&q(P[z],z,P)!==!1;);return P}function tR(P,q){for(var z=P==null?0:P.length;z--&&q(P[z],z,P)!==!1;);return P}function bf(P,q){for(var z=-1,ce=P==null?0:P.length;++z<ce;)if(!q(P[z],z,P))return!1;return!0}function Nr(P,q){for(var z=-1,ce=P==null?0:P.length,Te=0,je=[];++z<ce;){var ft=P[z];q(ft,z,P)&&(je[Te++]=ft)}return je}function sa(P,q){var z=P==null?0:P.length;return!!z&&Oo(P,q,0)>-1}function Fc(P,q,z){for(var ce=-1,Te=P==null?0:P.length;++ce<Te;)if(z(q,P[ce]))return!0;return!1}function tt(P,q){for(var z=-1,ce=P==null?0:P.length,Te=Array(ce);++z<ce;)Te[z]=q(P[z],z,P);return Te}function Ar(P,q){for(var z=-1,ce=q.length,Te=P.length;++z<ce;)P[Te+z]=q[z];return P}function Oc(P,q,z,ce){var Te=-1,je=P==null?0:P.length;for(ce&&je&&(z=P[++Te]);++Te<je;)z=q(z,P[Te],Te,P);return z}function nR(P,q,z,ce){var Te=P==null?0:P.length;for(ce&&Te&&(z=P[--Te]);Te--;)z=q(z,P[Te],Te,P);return z}function Lc(P,q){for(var z=-1,ce=P==null?0:P.length;++z<ce;)if(q(P[z],z,P))return!0;return!1}var rR=Mc("length");function oR(P){return P.split("")}function iR(P){return P.match(hP)||[]}function xf(P,q,z){var ce;return z(P,function(Te,je,ft){if(q(Te,je,ft))return ce=je,!1}),ce}function aa(P,q,z,ce){for(var Te=P.length,je=z+(ce?1:-1);ce?je--:++je<Te;)if(q(P[je],je,P))return je;return-1}function Oo(P,q,z){return q===q?yR(P,q,z):aa(P,kf,z)}function sR(P,q,z,ce){for(var Te=z-1,je=P.length;++Te<je;)if(ce(P[Te],q))return Te;return-1}function kf(P){return P!==P}function Sf(P,q){var z=P==null?0:P.length;return z?$c(P,q)/z:de}function Mc(P){return function(q){return q==null?n:q[P]}}function Gc(P){return function(q){return P==null?n:P[q]}}function Ef(P,q,z,ce,Te){return Te(P,function(je,ft,Xe){z=ce?(ce=!1,je):q(z,je,ft,Xe)}),z}function aR(P,q){var z=P.length;for(P.sort(q);z--;)P[z]=P[z].value;return P}function $c(P,q){for(var z,ce=-1,Te=P.length;++ce<Te;){var je=q(P[ce]);je!==n&&(z=z===n?je:z+je)}return z}function zc(P,q){for(var z=-1,ce=Array(P);++z<P;)ce[z]=q(z);return ce}function lR(P,q){return tt(q,function(z){return[z,P[z]]})}function Tf(P){return P&&P.slice(0,Bf(P)+1).replace(Nc,"")}function Yt(P){return function(q){return P(q)}}function Uc(P,q){return tt(q,function(z){return P[z]})}function Yi(P,q){return P.has(q)}function Nf(P,q){for(var z=-1,ce=P.length;++z<ce&&Oo(q,P[z],0)>-1;);return z}function Af(P,q){for(var z=P.length;z--&&Oo(q,P[z],0)>-1;);return z}function cR(P,q){for(var z=P.length,ce=0;z--;)P[z]===q&&++ce;return ce}var dR=Gc(HP),uR=Gc(qP);function pR(P){return"\\"+XP[P]}function hR(P,q){return P==null?n:P[q]}function Lo(P){return UP.test(P)}function fR(P){return ZP.test(P)}function mR(P){for(var q,z=[];!(q=P.next()).done;)z.push(q.value);return z}function Zc(P){var q=-1,z=Array(P.size);return P.forEach(function(ce,Te){z[++q]=[Te,ce]}),z}function Vf(P,q){return function(z){return P(q(z))}}function Vr(P,q){for(var z=-1,ce=P.length,Te=0,je=[];++z<ce;){var ft=P[z];(ft===q||ft===m)&&(P[z]=m,je[Te++]=z)}return je}function la(P){var q=-1,z=Array(P.size);return P.forEach(function(ce){z[++q]=ce}),z}function gR(P){var q=-1,z=Array(P.size);return P.forEach(function(ce){z[++q]=[ce,ce]}),z}function yR(P,q,z){for(var ce=z-1,Te=P.length;++ce<Te;)if(P[ce]===q)return ce;return-1}function vR(P,q,z){for(var ce=z+1;ce--;)if(P[ce]===q)return ce;return ce}function Mo(P){return Lo(P)?CR(P):rR(P)}function Vn(P){return Lo(P)?wR(P):oR(P)}function Bf(P){for(var q=P.length;q--&&cP.test(P.charAt(q)););return q}var _R=Gc(KP);function CR(P){for(var q=Rc.lastIndex=0;Rc.test(P);)++q;return q}function wR(P){return P.match(Rc)||[]}function bR(P){return P.match(zP)||[]}var xR=function P(q){q=q==null?Ct:Go.defaults(Ct.Object(),q,Go.pick(Ct,jP));var z=q.Array,ce=q.Date,Te=q.Error,je=q.Function,ft=q.Math,Xe=q.Object,jc=q.RegExp,kR=q.String,on=q.TypeError,ca=z.prototype,SR=je.prototype,$o=Xe.prototype,da=q["__core-js_shared__"],ua=SR.toString,qe=$o.hasOwnProperty,ER=0,Pf=function(){var s=/[^.]+$/.exec(da&&da.keys&&da.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),pa=$o.toString,TR=ua.call(Xe),NR=Ct._,AR=jc("^"+ua.call(qe).replace(Tc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ha=mf?q.Buffer:n,Br=q.Symbol,fa=q.Uint8Array,Rf=ha?ha.allocUnsafe:n,ma=Vf(Xe.getPrototypeOf,Xe),Df=Xe.create,If=$o.propertyIsEnumerable,ga=ca.splice,Ff=Br?Br.isConcatSpreadable:n,Ji=Br?Br.iterator:n,eo=Br?Br.toStringTag:n,ya=function(){try{var s=io(Xe,"defineProperty");return s({},"",{}),s}catch{}}(),VR=q.clearTimeout!==Ct.clearTimeout&&q.clearTimeout,BR=ce&&ce.now!==Ct.Date.now&&ce.now,PR=q.setTimeout!==Ct.setTimeout&&q.setTimeout,va=ft.ceil,_a=ft.floor,Wc=Xe.getOwnPropertySymbols,RR=ha?ha.isBuffer:n,Of=q.isFinite,DR=ca.join,IR=Vf(Xe.keys,Xe),mt=ft.max,Tt=ft.min,FR=ce.now,OR=q.parseInt,Lf=ft.random,LR=ca.reverse,Hc=io(q,"DataView"),Qi=io(q,"Map"),qc=io(q,"Promise"),zo=io(q,"Set"),es=io(q,"WeakMap"),ts=io(Xe,"create"),Ca=es&&new es,Uo={},MR=so(Hc),GR=so(Qi),$R=so(qc),zR=so(zo),UR=so(es),wa=Br?Br.prototype:n,ns=wa?wa.valueOf:n,Mf=wa?wa.toString:n;function v(s){if(it(s)&&!Ne(s)&&!(s instanceof Oe)){if(s instanceof sn)return s;if(qe.call(s,"__wrapped__"))return Gm(s)}return new sn(s)}var Zo=function(){function s(){}return function(a){if(!ot(a))return{};if(Df)return Df(a);s.prototype=a;var u=new s;return s.prototype=n,u}}();function ba(){}function sn(s,a){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=n}v.templateSettings={escape:rP,evaluate:oP,interpolate:Hh,variable:"",imports:{_:v}},v.prototype=ba.prototype,v.prototype.constructor=v,sn.prototype=Zo(ba.prototype),sn.prototype.constructor=sn;function Oe(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ke,this.__views__=[]}function ZR(){var s=new Oe(this.__wrapped__);return s.__actions__=Mt(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Mt(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Mt(this.__views__),s}function jR(){if(this.__filtered__){var s=new Oe(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function WR(){var s=this.__wrapped__.value(),a=this.__dir__,u=Ne(s),f=a<0,g=u?s.length:0,_=oI(0,g,this.__views__),N=_.start,V=_.end,I=V-N,X=f?V:N-1,Y=this.__iteratees__,Q=Y.length,oe=0,pe=Tt(I,this.__takeCount__);if(!u||!f&&g==I&&pe==I)return cm(s,this.__actions__);var ve=[];e:for(;I--&&oe<pe;){X+=a;for(var De=-1,_e=s[X];++De<Q;){var Fe=Y[De],Le=Fe.iteratee,en=Fe.type,Ft=Le(_e);if(en==E)_e=Ft;else if(!Ft){if(en==C)continue e;break e}}ve[oe++]=_e}return ve}Oe.prototype=Zo(ba.prototype),Oe.prototype.constructor=Oe;function to(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var f=s[a];this.set(f[0],f[1])}}function HR(){this.__data__=ts?ts(null):{},this.size=0}function qR(s){var a=this.has(s)&&delete this.__data__[s];return this.size-=a?1:0,a}function KR(s){var a=this.__data__;if(ts){var u=a[s];return u===p?n:u}return qe.call(a,s)?a[s]:n}function XR(s){var a=this.__data__;return ts?a[s]!==n:qe.call(a,s)}function YR(s,a){var u=this.__data__;return this.size+=this.has(s)?0:1,u[s]=ts&&a===n?p:a,this}to.prototype.clear=HR,to.prototype.delete=qR,to.prototype.get=KR,to.prototype.has=XR,to.prototype.set=YR;function er(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var f=s[a];this.set(f[0],f[1])}}function JR(){this.__data__=[],this.size=0}function QR(s){var a=this.__data__,u=xa(a,s);if(u<0)return!1;var f=a.length-1;return u==f?a.pop():ga.call(a,u,1),--this.size,!0}function eD(s){var a=this.__data__,u=xa(a,s);return u<0?n:a[u][1]}function tD(s){return xa(this.__data__,s)>-1}function nD(s,a){var u=this.__data__,f=xa(u,s);return f<0?(++this.size,u.push([s,a])):u[f][1]=a,this}er.prototype.clear=JR,er.prototype.delete=QR,er.prototype.get=eD,er.prototype.has=tD,er.prototype.set=nD;function tr(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var f=s[a];this.set(f[0],f[1])}}function rD(){this.size=0,this.__data__={hash:new to,map:new(Qi||er),string:new to}}function oD(s){var a=Ia(this,s).delete(s);return this.size-=a?1:0,a}function iD(s){return Ia(this,s).get(s)}function sD(s){return Ia(this,s).has(s)}function aD(s,a){var u=Ia(this,s),f=u.size;return u.set(s,a),this.size+=u.size==f?0:1,this}tr.prototype.clear=rD,tr.prototype.delete=oD,tr.prototype.get=iD,tr.prototype.has=sD,tr.prototype.set=aD;function no(s){var a=-1,u=s==null?0:s.length;for(this.__data__=new tr;++a<u;)this.add(s[a])}function lD(s){return this.__data__.set(s,p),this}function cD(s){return this.__data__.has(s)}no.prototype.add=no.prototype.push=lD,no.prototype.has=cD;function Bn(s){var a=this.__data__=new er(s);this.size=a.size}function dD(){this.__data__=new er,this.size=0}function uD(s){var a=this.__data__,u=a.delete(s);return this.size=a.size,u}function pD(s){return this.__data__.get(s)}function hD(s){return this.__data__.has(s)}function fD(s,a){var u=this.__data__;if(u instanceof er){var f=u.__data__;if(!Qi||f.length<i-1)return f.push([s,a]),this.size=++u.size,this;u=this.__data__=new tr(f)}return u.set(s,a),this.size=u.size,this}Bn.prototype.clear=dD,Bn.prototype.delete=uD,Bn.prototype.get=pD,Bn.prototype.has=hD,Bn.prototype.set=fD;function Gf(s,a){var u=Ne(s),f=!u&&ao(s),g=!u&&!f&&Fr(s),_=!u&&!f&&!g&&qo(s),N=u||f||g||_,V=N?zc(s.length,kR):[],I=V.length;for(var X in s)(a||qe.call(s,X))&&!(N&&(X=="length"||g&&(X=="offset"||X=="parent")||_&&(X=="buffer"||X=="byteLength"||X=="byteOffset")||ir(X,I)))&&V.push(X);return V}function $f(s){var a=s.length;return a?s[id(0,a-1)]:n}function mD(s,a){return Fa(Mt(s),ro(a,0,s.length))}function gD(s){return Fa(Mt(s))}function Kc(s,a,u){(u!==n&&!Pn(s[a],u)||u===n&&!(a in s))&&nr(s,a,u)}function rs(s,a,u){var f=s[a];(!(qe.call(s,a)&&Pn(f,u))||u===n&&!(a in s))&&nr(s,a,u)}function xa(s,a){for(var u=s.length;u--;)if(Pn(s[u][0],a))return u;return-1}function yD(s,a,u,f){return Pr(s,function(g,_,N){a(f,g,u(g),N)}),f}function zf(s,a){return s&&jn(a,_t(a),s)}function vD(s,a){return s&&jn(a,$t(a),s)}function nr(s,a,u){a=="__proto__"&&ya?ya(s,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):s[a]=u}function Xc(s,a){for(var u=-1,f=a.length,g=z(f),_=s==null;++u<f;)g[u]=_?n:Vd(s,a[u]);return g}function ro(s,a,u){return s===s&&(u!==n&&(s=s<=u?s:u),a!==n&&(s=s>=a?s:a)),s}function an(s,a,u,f,g,_){var N,V=a&y,I=a&x,X=a&w;if(u&&(N=g?u(s,f,g,_):u(s)),N!==n)return N;if(!ot(s))return s;var Y=Ne(s);if(Y){if(N=sI(s),!V)return Mt(s,N)}else{var Q=Nt(s),oe=Q==ta||Q==Uh;if(Fr(s))return pm(s,V);if(Q==Qn||Q==Ke||oe&&!g){if(N=I||oe?{}:Bm(s),!V)return I?KD(s,vD(N,s)):qD(s,zf(N,s))}else{if(!Ye[Q])return g?s:{};N=aI(s,Q,V)}}_||(_=new Bn);var pe=_.get(s);if(pe)return pe;_.set(s,N),sg(s)?s.forEach(function(_e){N.add(an(_e,a,u,_e,s,_))}):og(s)&&s.forEach(function(_e,Fe){N.set(Fe,an(_e,a,u,Fe,s,_))});var ve=X?I?gd:md:I?$t:_t,De=Y?n:ve(s);return rn(De||s,function(_e,Fe){De&&(Fe=_e,_e=s[Fe]),rs(N,Fe,an(_e,a,u,Fe,s,_))}),N}function _D(s){var a=_t(s);return function(u){return Uf(u,s,a)}}function Uf(s,a,u){var f=u.length;if(s==null)return!f;for(s=Xe(s);f--;){var g=u[f],_=a[g],N=s[g];if(N===n&&!(g in s)||!_(N))return!1}return!0}function Zf(s,a,u){if(typeof s!="function")throw new on(c);return ds(function(){s.apply(n,u)},a)}function os(s,a,u,f){var g=-1,_=sa,N=!0,V=s.length,I=[],X=a.length;if(!V)return I;u&&(a=tt(a,Yt(u))),f?(_=Fc,N=!1):a.length>=i&&(_=Yi,N=!1,a=new no(a));e:for(;++g<V;){var Y=s[g],Q=u==null?Y:u(Y);if(Y=f||Y!==0?Y:0,N&&Q===Q){for(var oe=X;oe--;)if(a[oe]===Q)continue e;I.push(Y)}else _(a,Q,f)||I.push(Y)}return I}var Pr=ym(Zn),jf=ym(Jc,!0);function CD(s,a){var u=!0;return Pr(s,function(f,g,_){return u=!!a(f,g,_),u}),u}function ka(s,a,u){for(var f=-1,g=s.length;++f<g;){var _=s[f],N=a(_);if(N!=null&&(V===n?N===N&&!Qt(N):u(N,V)))var V=N,I=_}return I}function wD(s,a,u,f){var g=s.length;for(u=Be(u),u<0&&(u=-u>g?0:g+u),f=f===n||f>g?g:Be(f),f<0&&(f+=g),f=u>f?0:lg(f);u<f;)s[u++]=a;return s}function Wf(s,a){var u=[];return Pr(s,function(f,g,_){a(f,g,_)&&u.push(f)}),u}function wt(s,a,u,f,g){var _=-1,N=s.length;for(u||(u=cI),g||(g=[]);++_<N;){var V=s[_];a>0&&u(V)?a>1?wt(V,a-1,u,f,g):Ar(g,V):f||(g[g.length]=V)}return g}var Yc=vm(),Hf=vm(!0);function Zn(s,a){return s&&Yc(s,a,_t)}function Jc(s,a){return s&&Hf(s,a,_t)}function Sa(s,a){return Nr(a,function(u){return sr(s[u])})}function oo(s,a){a=Dr(a,s);for(var u=0,f=a.length;s!=null&&u<f;)s=s[Wn(a[u++])];return u&&u==f?s:n}function qf(s,a,u){var f=a(s);return Ne(s)?f:Ar(f,u(s))}function Dt(s){return s==null?s===n?XB:qB:eo&&eo in Xe(s)?rI(s):gI(s)}function Qc(s,a){return s>a}function bD(s,a){return s!=null&&qe.call(s,a)}function xD(s,a){return s!=null&&a in Xe(s)}function kD(s,a,u){return s>=Tt(a,u)&&s<mt(a,u)}function ed(s,a,u){for(var f=u?Fc:sa,g=s[0].length,_=s.length,N=_,V=z(_),I=1/0,X=[];N--;){var Y=s[N];N&&a&&(Y=tt(Y,Yt(a))),I=Tt(Y.length,I),V[N]=!u&&(a||g>=120&&Y.length>=120)?new no(N&&Y):n}Y=s[0];var Q=-1,oe=V[0];e:for(;++Q<g&&X.length<I;){var pe=Y[Q],ve=a?a(pe):pe;if(pe=u||pe!==0?pe:0,!(oe?Yi(oe,ve):f(X,ve,u))){for(N=_;--N;){var De=V[N];if(!(De?Yi(De,ve):f(s[N],ve,u)))continue e}oe&&oe.push(ve),X.push(pe)}}return X}function SD(s,a,u,f){return Zn(s,function(g,_,N){a(f,u(g),_,N)}),f}function is(s,a,u){a=Dr(a,s),s=Im(s,a);var f=s==null?s:s[Wn(cn(a))];return f==null?n:Xt(f,s,u)}function Kf(s){return it(s)&&Dt(s)==Ke}function ED(s){return it(s)&&Dt(s)==Xi}function TD(s){return it(s)&&Dt(s)==ji}function ss(s,a,u,f,g){return s===a?!0:s==null||a==null||!it(s)&&!it(a)?s!==s&&a!==a:ND(s,a,u,f,ss,g)}function ND(s,a,u,f,g,_){var N=Ne(s),V=Ne(a),I=N?Un:Nt(s),X=V?Un:Nt(a);I=I==Ke?Qn:I,X=X==Ke?Qn:X;var Y=I==Qn,Q=X==Qn,oe=I==X;if(oe&&Fr(s)){if(!Fr(a))return!1;N=!0,Y=!1}if(oe&&!Y)return _||(_=new Bn),N||qo(s)?Nm(s,a,u,f,g,_):tI(s,a,I,u,f,g,_);if(!(u&S)){var pe=Y&&qe.call(s,"__wrapped__"),ve=Q&&qe.call(a,"__wrapped__");if(pe||ve){var De=pe?s.value():s,_e=ve?a.value():a;return _||(_=new Bn),g(De,_e,u,f,_)}}return oe?(_||(_=new Bn),nI(s,a,u,f,g,_)):!1}function AD(s){return it(s)&&Nt(s)==Nn}function td(s,a,u,f){var g=u.length,_=g,N=!f;if(s==null)return!_;for(s=Xe(s);g--;){var V=u[g];if(N&&V[2]?V[1]!==s[V[0]]:!(V[0]in s))return!1}for(;++g<_;){V=u[g];var I=V[0],X=s[I],Y=V[1];if(N&&V[2]){if(X===n&&!(I in s))return!1}else{var Q=new Bn;if(f)var oe=f(X,Y,I,s,a,Q);if(!(oe===n?ss(Y,X,S|O,f,Q):oe))return!1}}return!0}function Xf(s){if(!ot(s)||uI(s))return!1;var a=sr(s)?AR:_P;return a.test(so(s))}function VD(s){return it(s)&&Dt(s)==Hi}function BD(s){return it(s)&&Nt(s)==An}function PD(s){return it(s)&&za(s.length)&&!!Qe[Dt(s)]}function Yf(s){return typeof s=="function"?s:s==null?zt:typeof s=="object"?Ne(s)?em(s[0],s[1]):Qf(s):_g(s)}function nd(s){if(!cs(s))return IR(s);var a=[];for(var u in Xe(s))qe.call(s,u)&&u!="constructor"&&a.push(u);return a}function RD(s){if(!ot(s))return mI(s);var a=cs(s),u=[];for(var f in s)f=="constructor"&&(a||!qe.call(s,f))||u.push(f);return u}function rd(s,a){return s<a}function Jf(s,a){var u=-1,f=Gt(s)?z(s.length):[];return Pr(s,function(g,_,N){f[++u]=a(g,_,N)}),f}function Qf(s){var a=vd(s);return a.length==1&&a[0][2]?Rm(a[0][0],a[0][1]):function(u){return u===s||td(u,s,a)}}function em(s,a){return Cd(s)&&Pm(a)?Rm(Wn(s),a):function(u){var f=Vd(u,s);return f===n&&f===a?Bd(u,s):ss(a,f,S|O)}}function Ea(s,a,u,f,g){s!==a&&Yc(a,function(_,N){if(g||(g=new Bn),ot(_))DD(s,a,N,u,Ea,f,g);else{var V=f?f(bd(s,N),_,N+"",s,a,g):n;V===n&&(V=_),Kc(s,N,V)}},$t)}function DD(s,a,u,f,g,_,N){var V=bd(s,u),I=bd(a,u),X=N.get(I);if(X){Kc(s,u,X);return}var Y=_?_(V,I,u+"",s,a,N):n,Q=Y===n;if(Q){var oe=Ne(I),pe=!oe&&Fr(I),ve=!oe&&!pe&&qo(I);Y=I,oe||pe||ve?Ne(V)?Y=V:at(V)?Y=Mt(V):pe?(Q=!1,Y=pm(I,!0)):ve?(Q=!1,Y=hm(I,!0)):Y=[]:us(I)||ao(I)?(Y=V,ao(V)?Y=cg(V):(!ot(V)||sr(V))&&(Y=Bm(I))):Q=!1}Q&&(N.set(I,Y),g(Y,I,f,_,N),N.delete(I)),Kc(s,u,Y)}function tm(s,a){var u=s.length;if(u)return a+=a<0?u:0,ir(a,u)?s[a]:n}function nm(s,a,u){a.length?a=tt(a,function(_){return Ne(_)?function(N){return oo(N,_.length===1?_[0]:_)}:_}):a=[zt];var f=-1;a=tt(a,Yt(ge()));var g=Jf(s,function(_,N,V){var I=tt(a,function(X){return X(_)});return{criteria:I,index:++f,value:_}});return aR(g,function(_,N){return HD(_,N,u)})}function ID(s,a){return rm(s,a,function(u,f){return Bd(s,f)})}function rm(s,a,u){for(var f=-1,g=a.length,_={};++f<g;){var N=a[f],V=oo(s,N);u(V,N)&&as(_,Dr(N,s),V)}return _}function FD(s){return function(a){return oo(a,s)}}function od(s,a,u,f){var g=f?sR:Oo,_=-1,N=a.length,V=s;for(s===a&&(a=Mt(a)),u&&(V=tt(s,Yt(u)));++_<N;)for(var I=0,X=a[_],Y=u?u(X):X;(I=g(V,Y,I,f))>-1;)V!==s&&ga.call(V,I,1),ga.call(s,I,1);return s}function om(s,a){for(var u=s?a.length:0,f=u-1;u--;){var g=a[u];if(u==f||g!==_){var _=g;ir(g)?ga.call(s,g,1):ld(s,g)}}return s}function id(s,a){return s+_a(Lf()*(a-s+1))}function OD(s,a,u,f){for(var g=-1,_=mt(va((a-s)/(u||1)),0),N=z(_);_--;)N[f?_:++g]=s,s+=u;return N}function sd(s,a){var u="";if(!s||a<1||a>K)return u;do a%2&&(u+=s),a=_a(a/2),a&&(s+=s);while(a);return u}function Ie(s,a){return xd(Dm(s,a,zt),s+"")}function LD(s){return $f(Ko(s))}function MD(s,a){var u=Ko(s);return Fa(u,ro(a,0,u.length))}function as(s,a,u,f){if(!ot(s))return s;a=Dr(a,s);for(var g=-1,_=a.length,N=_-1,V=s;V!=null&&++g<_;){var I=Wn(a[g]),X=u;if(I==="__proto__"||I==="constructor"||I==="prototype")return s;if(g!=N){var Y=V[I];X=f?f(Y,I,V):n,X===n&&(X=ot(Y)?Y:ir(a[g+1])?[]:{})}rs(V,I,X),V=V[I]}return s}var im=Ca?function(s,a){return Ca.set(s,a),s}:zt,GD=ya?function(s,a){return ya(s,"toString",{configurable:!0,enumerable:!1,value:Rd(a),writable:!0})}:zt;function $D(s){return Fa(Ko(s))}function ln(s,a,u){var f=-1,g=s.length;a<0&&(a=-a>g?0:g+a),u=u>g?g:u,u<0&&(u+=g),g=a>u?0:u-a>>>0,a>>>=0;for(var _=z(g);++f<g;)_[f]=s[f+a];return _}function zD(s,a){var u;return Pr(s,function(f,g,_){return u=a(f,g,_),!u}),!!u}function Ta(s,a,u){var f=0,g=s==null?f:s.length;if(typeof a=="number"&&a===a&&g<=Ze){for(;f<g;){var _=f+g>>>1,N=s[_];N!==null&&!Qt(N)&&(u?N<=a:N<a)?f=_+1:g=_}return g}return ad(s,a,zt,u)}function ad(s,a,u,f){var g=0,_=s==null?0:s.length;if(_===0)return 0;a=u(a);for(var N=a!==a,V=a===null,I=Qt(a),X=a===n;g<_;){var Y=_a((g+_)/2),Q=u(s[Y]),oe=Q!==n,pe=Q===null,ve=Q===Q,De=Qt(Q);if(N)var _e=f||ve;else X?_e=ve&&(f||oe):V?_e=ve&&oe&&(f||!pe):I?_e=ve&&oe&&!pe&&(f||!De):pe||De?_e=!1:_e=f?Q<=a:Q<a;_e?g=Y+1:_=Y}return Tt(_,Se)}function sm(s,a){for(var u=-1,f=s.length,g=0,_=[];++u<f;){var N=s[u],V=a?a(N):N;if(!u||!Pn(V,I)){var I=V;_[g++]=N===0?0:N}}return _}function am(s){return typeof s=="number"?s:Qt(s)?de:+s}function Jt(s){if(typeof s=="string")return s;if(Ne(s))return tt(s,Jt)+"";if(Qt(s))return Mf?Mf.call(s):"";var a=s+"";return a=="0"&&1/s==-H?"-0":a}function Rr(s,a,u){var f=-1,g=sa,_=s.length,N=!0,V=[],I=V;if(u)N=!1,g=Fc;else if(_>=i){var X=a?null:QD(s);if(X)return la(X);N=!1,g=Yi,I=new no}else I=a?[]:V;e:for(;++f<_;){var Y=s[f],Q=a?a(Y):Y;if(Y=u||Y!==0?Y:0,N&&Q===Q){for(var oe=I.length;oe--;)if(I[oe]===Q)continue e;a&&I.push(Q),V.push(Y)}else g(I,Q,u)||(I!==V&&I.push(Q),V.push(Y))}return V}function ld(s,a){return a=Dr(a,s),s=Im(s,a),s==null||delete s[Wn(cn(a))]}function lm(s,a,u,f){return as(s,a,u(oo(s,a)),f)}function Na(s,a,u,f){for(var g=s.length,_=f?g:-1;(f?_--:++_<g)&&a(s[_],_,s););return u?ln(s,f?0:_,f?_+1:g):ln(s,f?_+1:0,f?g:_)}function cm(s,a){var u=s;return u instanceof Oe&&(u=u.value()),Oc(a,function(f,g){return g.func.apply(g.thisArg,Ar([f],g.args))},u)}function cd(s,a,u){var f=s.length;if(f<2)return f?Rr(s[0]):[];for(var g=-1,_=z(f);++g<f;)for(var N=s[g],V=-1;++V<f;)V!=g&&(_[g]=os(_[g]||N,s[V],a,u));return Rr(wt(_,1),a,u)}function dm(s,a,u){for(var f=-1,g=s.length,_=a.length,N={};++f<g;){var V=f<_?a[f]:n;u(N,s[f],V)}return N}function dd(s){return at(s)?s:[]}function ud(s){return typeof s=="function"?s:zt}function Dr(s,a){return Ne(s)?s:Cd(s,a)?[s]:Mm(He(s))}var UD=Ie;function Ir(s,a,u){var f=s.length;return u=u===n?f:u,!a&&u>=f?s:ln(s,a,u)}var um=VR||function(s){return Ct.clearTimeout(s)};function pm(s,a){if(a)return s.slice();var u=s.length,f=Rf?Rf(u):new s.constructor(u);return s.copy(f),f}function pd(s){var a=new s.constructor(s.byteLength);return new fa(a).set(new fa(s)),a}function ZD(s,a){var u=a?pd(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.byteLength)}function jD(s){var a=new s.constructor(s.source,qh.exec(s));return a.lastIndex=s.lastIndex,a}function WD(s){return ns?Xe(ns.call(s)):{}}function hm(s,a){var u=a?pd(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.length)}function fm(s,a){if(s!==a){var u=s!==n,f=s===null,g=s===s,_=Qt(s),N=a!==n,V=a===null,I=a===a,X=Qt(a);if(!V&&!X&&!_&&s>a||_&&N&&I&&!V&&!X||f&&N&&I||!u&&I||!g)return 1;if(!f&&!_&&!X&&s<a||X&&u&&g&&!f&&!_||V&&u&&g||!N&&g||!I)return-1}return 0}function HD(s,a,u){for(var f=-1,g=s.criteria,_=a.criteria,N=g.length,V=u.length;++f<N;){var I=fm(g[f],_[f]);if(I){if(f>=V)return I;var X=u[f];return I*(X=="desc"?-1:1)}}return s.index-a.index}function mm(s,a,u,f){for(var g=-1,_=s.length,N=u.length,V=-1,I=a.length,X=mt(_-N,0),Y=z(I+X),Q=!f;++V<I;)Y[V]=a[V];for(;++g<N;)(Q||g<_)&&(Y[u[g]]=s[g]);for(;X--;)Y[V++]=s[g++];return Y}function gm(s,a,u,f){for(var g=-1,_=s.length,N=-1,V=u.length,I=-1,X=a.length,Y=mt(_-V,0),Q=z(Y+X),oe=!f;++g<Y;)Q[g]=s[g];for(var pe=g;++I<X;)Q[pe+I]=a[I];for(;++N<V;)(oe||g<_)&&(Q[pe+u[N]]=s[g++]);return Q}function Mt(s,a){var u=-1,f=s.length;for(a||(a=z(f));++u<f;)a[u]=s[u];return a}function jn(s,a,u,f){var g=!u;u||(u={});for(var _=-1,N=a.length;++_<N;){var V=a[_],I=f?f(u[V],s[V],V,u,s):n;I===n&&(I=s[V]),g?nr(u,V,I):rs(u,V,I)}return u}function qD(s,a){return jn(s,_d(s),a)}function KD(s,a){return jn(s,Am(s),a)}function Aa(s,a){return function(u,f){var g=Ne(u)?eR:yD,_=a?a():{};return g(u,s,ge(f,2),_)}}function jo(s){return Ie(function(a,u){var f=-1,g=u.length,_=g>1?u[g-1]:n,N=g>2?u[2]:n;for(_=s.length>3&&typeof _=="function"?(g--,_):n,N&&It(u[0],u[1],N)&&(_=g<3?n:_,g=1),a=Xe(a);++f<g;){var V=u[f];V&&s(a,V,f,_)}return a})}function ym(s,a){return function(u,f){if(u==null)return u;if(!Gt(u))return s(u,f);for(var g=u.length,_=a?g:-1,N=Xe(u);(a?_--:++_<g)&&f(N[_],_,N)!==!1;);return u}}function vm(s){return function(a,u,f){for(var g=-1,_=Xe(a),N=f(a),V=N.length;V--;){var I=N[s?V:++g];if(u(_[I],I,_)===!1)break}return a}}function XD(s,a,u){var f=a&G,g=ls(s);function _(){var N=this&&this!==Ct&&this instanceof _?g:s;return N.apply(f?u:this,arguments)}return _}function _m(s){return function(a){a=He(a);var u=Lo(a)?Vn(a):n,f=u?u[0]:a.charAt(0),g=u?Ir(u,1).join(""):a.slice(1);return f[s]()+g}}function Wo(s){return function(a){return Oc(yg(gg(a).replace(GP,"")),s,"")}}function ls(s){return function(){var a=arguments;switch(a.length){case 0:return new s;case 1:return new s(a[0]);case 2:return new s(a[0],a[1]);case 3:return new s(a[0],a[1],a[2]);case 4:return new s(a[0],a[1],a[2],a[3]);case 5:return new s(a[0],a[1],a[2],a[3],a[4]);case 6:return new s(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new s(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var u=Zo(s.prototype),f=s.apply(u,a);return ot(f)?f:u}}function YD(s,a,u){var f=ls(s);function g(){for(var _=arguments.length,N=z(_),V=_,I=Ho(g);V--;)N[V]=arguments[V];var X=_<3&&N[0]!==I&&N[_-1]!==I?[]:Vr(N,I);if(_-=X.length,_<u)return km(s,a,Va,g.placeholder,n,N,X,n,n,u-_);var Y=this&&this!==Ct&&this instanceof g?f:s;return Xt(Y,this,N)}return g}function Cm(s){return function(a,u,f){var g=Xe(a);if(!Gt(a)){var _=ge(u,3);a=_t(a),u=function(V){return _(g[V],V,g)}}var N=s(a,u,f);return N>-1?g[_?a[N]:N]:n}}function wm(s){return or(function(a){var u=a.length,f=u,g=sn.prototype.thru;for(s&&a.reverse();f--;){var _=a[f];if(typeof _!="function")throw new on(c);if(g&&!N&&Da(_)=="wrapper")var N=new sn([],!0)}for(f=N?f:u;++f<u;){_=a[f];var V=Da(_),I=V=="wrapper"?yd(_):n;I&&wd(I[0])&&I[1]==(j|F|A|$)&&!I[4].length&&I[9]==1?N=N[Da(I[0])].apply(N,I[3]):N=_.length==1&&wd(_)?N[V]():N.thru(_)}return function(){var X=arguments,Y=X[0];if(N&&X.length==1&&Ne(Y))return N.plant(Y).value();for(var Q=0,oe=u?a[Q].apply(this,X):Y;++Q<u;)oe=a[Q].call(this,oe);return oe}})}function Va(s,a,u,f,g,_,N,V,I,X){var Y=a&j,Q=a&G,oe=a&b,pe=a&(F|D),ve=a&Z,De=oe?n:ls(s);function _e(){for(var Fe=arguments.length,Le=z(Fe),en=Fe;en--;)Le[en]=arguments[en];if(pe)var Ft=Ho(_e),tn=cR(Le,Ft);if(f&&(Le=mm(Le,f,g,pe)),_&&(Le=gm(Le,_,N,pe)),Fe-=tn,pe&&Fe<X){var lt=Vr(Le,Ft);return km(s,a,Va,_e.placeholder,u,Le,lt,V,I,X-Fe)}var Rn=Q?u:this,lr=oe?Rn[s]:s;return Fe=Le.length,V?Le=yI(Le,V):ve&&Fe>1&&Le.reverse(),Y&&I<Fe&&(Le.length=I),this&&this!==Ct&&this instanceof _e&&(lr=De||ls(lr)),lr.apply(Rn,Le)}return _e}function bm(s,a){return function(u,f){return SD(u,s,a(f),{})}}function Ba(s,a){return function(u,f){var g;if(u===n&&f===n)return a;if(u!==n&&(g=u),f!==n){if(g===n)return f;typeof u=="string"||typeof f=="string"?(u=Jt(u),f=Jt(f)):(u=am(u),f=am(f)),g=s(u,f)}return g}}function hd(s){return or(function(a){return a=tt(a,Yt(ge())),Ie(function(u){var f=this;return s(a,function(g){return Xt(g,f,u)})})})}function Pa(s,a){a=a===n?" ":Jt(a);var u=a.length;if(u<2)return u?sd(a,s):a;var f=sd(a,va(s/Mo(a)));return Lo(a)?Ir(Vn(f),0,s).join(""):f.slice(0,s)}function JD(s,a,u,f){var g=a&G,_=ls(s);function N(){for(var V=-1,I=arguments.length,X=-1,Y=f.length,Q=z(Y+I),oe=this&&this!==Ct&&this instanceof N?_:s;++X<Y;)Q[X]=f[X];for(;I--;)Q[X++]=arguments[++V];return Xt(oe,g?u:this,Q)}return N}function xm(s){return function(a,u,f){return f&&typeof f!="number"&&It(a,u,f)&&(u=f=n),a=ar(a),u===n?(u=a,a=0):u=ar(u),f=f===n?a<u?1:-1:ar(f),OD(a,u,f,s)}}function Ra(s){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=dn(a),u=dn(u)),s(a,u)}}function km(s,a,u,f,g,_,N,V,I,X){var Y=a&F,Q=Y?N:n,oe=Y?n:N,pe=Y?_:n,ve=Y?n:_;a|=Y?A:U,a&=~(Y?U:A),a&R||(a&=~(G|b));var De=[s,a,g,pe,Q,ve,oe,V,I,X],_e=u.apply(n,De);return wd(s)&&Fm(_e,De),_e.placeholder=f,Om(_e,s,a)}function fd(s){var a=ft[s];return function(u,f){if(u=dn(u),f=f==null?0:Tt(Be(f),292),f&&Of(u)){var g=(He(u)+"e").split("e"),_=a(g[0]+"e"+(+g[1]+f));return g=(He(_)+"e").split("e"),+(g[0]+"e"+(+g[1]-f))}return a(u)}}var QD=zo&&1/la(new zo([,-0]))[1]==H?function(s){return new zo(s)}:Fd;function Sm(s){return function(a){var u=Nt(a);return u==Nn?Zc(a):u==An?gR(a):lR(a,s(a))}}function rr(s,a,u,f,g,_,N,V){var I=a&b;if(!I&&typeof s!="function")throw new on(c);var X=f?f.length:0;if(X||(a&=~(A|U),f=g=n),N=N===n?N:mt(Be(N),0),V=V===n?V:Be(V),X-=g?g.length:0,a&U){var Y=f,Q=g;f=g=n}var oe=I?n:yd(s),pe=[s,a,u,f,g,Y,Q,_,N,V];if(oe&&fI(pe,oe),s=pe[0],a=pe[1],u=pe[2],f=pe[3],g=pe[4],V=pe[9]=pe[9]===n?I?0:s.length:mt(pe[9]-X,0),!V&&a&(F|D)&&(a&=~(F|D)),!a||a==G)var ve=XD(s,a,u);else a==F||a==D?ve=YD(s,a,V):(a==A||a==(G|A))&&!g.length?ve=JD(s,a,u,f):ve=Va.apply(n,pe);var De=oe?im:Fm;return Om(De(ve,pe),s,a)}function Em(s,a,u,f){return s===n||Pn(s,$o[u])&&!qe.call(f,u)?a:s}function Tm(s,a,u,f,g,_){return ot(s)&&ot(a)&&(_.set(a,s),Ea(s,a,n,Tm,_),_.delete(a)),s}function eI(s){return us(s)?n:s}function Nm(s,a,u,f,g,_){var N=u&S,V=s.length,I=a.length;if(V!=I&&!(N&&I>V))return!1;var X=_.get(s),Y=_.get(a);if(X&&Y)return X==a&&Y==s;var Q=-1,oe=!0,pe=u&O?new no:n;for(_.set(s,a),_.set(a,s);++Q<V;){var ve=s[Q],De=a[Q];if(f)var _e=N?f(De,ve,Q,a,s,_):f(ve,De,Q,s,a,_);if(_e!==n){if(_e)continue;oe=!1;break}if(pe){if(!Lc(a,function(Fe,Le){if(!Yi(pe,Le)&&(ve===Fe||g(ve,Fe,u,f,_)))return pe.push(Le)})){oe=!1;break}}else if(!(ve===De||g(ve,De,u,f,_))){oe=!1;break}}return _.delete(s),_.delete(a),oe}function tI(s,a,u,f,g,_,N){switch(u){case Io:if(s.byteLength!=a.byteLength||s.byteOffset!=a.byteOffset)return!1;s=s.buffer,a=a.buffer;case Xi:return!(s.byteLength!=a.byteLength||!_(new fa(s),new fa(a)));case Zi:case ji:case Wi:return Pn(+s,+a);case ea:return s.name==a.name&&s.message==a.message;case Hi:case qi:return s==a+"";case Nn:var V=Zc;case An:var I=f&S;if(V||(V=la),s.size!=a.size&&!I)return!1;var X=N.get(s);if(X)return X==a;f|=O,N.set(s,a);var Y=Nm(V(s),V(a),f,g,_,N);return N.delete(s),Y;case na:if(ns)return ns.call(s)==ns.call(a)}return!1}function nI(s,a,u,f,g,_){var N=u&S,V=md(s),I=V.length,X=md(a),Y=X.length;if(I!=Y&&!N)return!1;for(var Q=I;Q--;){var oe=V[Q];if(!(N?oe in a:qe.call(a,oe)))return!1}var pe=_.get(s),ve=_.get(a);if(pe&&ve)return pe==a&&ve==s;var De=!0;_.set(s,a),_.set(a,s);for(var _e=N;++Q<I;){oe=V[Q];var Fe=s[oe],Le=a[oe];if(f)var en=N?f(Le,Fe,oe,a,s,_):f(Fe,Le,oe,s,a,_);if(!(en===n?Fe===Le||g(Fe,Le,u,f,_):en)){De=!1;break}_e||(_e=oe=="constructor")}if(De&&!_e){var Ft=s.constructor,tn=a.constructor;Ft!=tn&&"constructor"in s&&"constructor"in a&&!(typeof Ft=="function"&&Ft instanceof Ft&&typeof tn=="function"&&tn instanceof tn)&&(De=!1)}return _.delete(s),_.delete(a),De}function or(s){return xd(Dm(s,n,Um),s+"")}function md(s){return qf(s,_t,_d)}function gd(s){return qf(s,$t,Am)}var yd=Ca?function(s){return Ca.get(s)}:Fd;function Da(s){for(var a=s.name+"",u=Uo[a],f=qe.call(Uo,a)?u.length:0;f--;){var g=u[f],_=g.func;if(_==null||_==s)return g.name}return a}function Ho(s){var a=qe.call(v,"placeholder")?v:s;return a.placeholder}function ge(){var s=v.iteratee||Dd;return s=s===Dd?Yf:s,arguments.length?s(arguments[0],arguments[1]):s}function Ia(s,a){var u=s.__data__;return dI(a)?u[typeof a=="string"?"string":"hash"]:u.map}function vd(s){for(var a=_t(s),u=a.length;u--;){var f=a[u],g=s[f];a[u]=[f,g,Pm(g)]}return a}function io(s,a){var u=hR(s,a);return Xf(u)?u:n}function rI(s){var a=qe.call(s,eo),u=s[eo];try{s[eo]=n;var f=!0}catch{}var g=pa.call(s);return f&&(a?s[eo]=u:delete s[eo]),g}var _d=Wc?function(s){return s==null?[]:(s=Xe(s),Nr(Wc(s),function(a){return If.call(s,a)}))}:Od,Am=Wc?function(s){for(var a=[];s;)Ar(a,_d(s)),s=ma(s);return a}:Od,Nt=Dt;(Hc&&Nt(new Hc(new ArrayBuffer(1)))!=Io||Qi&&Nt(new Qi)!=Nn||qc&&Nt(qc.resolve())!=Zh||zo&&Nt(new zo)!=An||es&&Nt(new es)!=Ki)&&(Nt=function(s){var a=Dt(s),u=a==Qn?s.constructor:n,f=u?so(u):"";if(f)switch(f){case MR:return Io;case GR:return Nn;case $R:return Zh;case zR:return An;case UR:return Ki}return a});function oI(s,a,u){for(var f=-1,g=u.length;++f<g;){var _=u[f],N=_.size;switch(_.type){case"drop":s+=N;break;case"dropRight":a-=N;break;case"take":a=Tt(a,s+N);break;case"takeRight":s=mt(s,a-N);break}}return{start:s,end:a}}function iI(s){var a=s.match(uP);return a?a[1].split(pP):[]}function Vm(s,a,u){a=Dr(a,s);for(var f=-1,g=a.length,_=!1;++f<g;){var N=Wn(a[f]);if(!(_=s!=null&&u(s,N)))break;s=s[N]}return _||++f!=g?_:(g=s==null?0:s.length,!!g&&za(g)&&ir(N,g)&&(Ne(s)||ao(s)))}function sI(s){var a=s.length,u=new s.constructor(a);return a&&typeof s[0]=="string"&&qe.call(s,"index")&&(u.index=s.index,u.input=s.input),u}function Bm(s){return typeof s.constructor=="function"&&!cs(s)?Zo(ma(s)):{}}function aI(s,a,u){var f=s.constructor;switch(a){case Xi:return pd(s);case Zi:case ji:return new f(+s);case Io:return ZD(s,u);case vc:case _c:case Cc:case wc:case bc:case xc:case kc:case Sc:case Ec:return hm(s,u);case Nn:return new f;case Wi:case qi:return new f(s);case Hi:return jD(s);case An:return new f;case na:return WD(s)}}function lI(s,a){var u=a.length;if(!u)return s;var f=u-1;return a[f]=(u>1?"& ":"")+a[f],a=a.join(u>2?", ":" "),s.replace(dP,`{
|
|
72
|
+
*/$s.exports,function(t,e){(function(){var n,o="4.17.21",i=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",d="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",h=500,m="__lodash_placeholder__",y=1,x=2,w=4,E=1,O=2,$=1,b=2,R=4,F=8,D=16,V=32,Z=64,ne=128,H=256,J=512,G=30,z="...",Q=800,A=16,C=1,k=2,M=3,W=1/0,q=9007199254740991,re=17976931348623157e292,ue=NaN,ke=4294967295,Se=ke-1,Ze=ke>>>1,ht=[["ary",ne],["bind",$],["bindKey",b],["curry",F],["curryRight",D],["flip",J],["partial",V],["partialRight",Z],["rearg",H]],Ke="[object Arguments]",Un="[object Array]",WB="[object AsyncFunction]",Zi="[object Boolean]",Wi="[object Date]",jB="[object DOMException]",ea="[object Error]",ta="[object Function]",Zh="[object GeneratorFunction]",Nn="[object Map]",ji="[object Number]",HB="[object Null]",Qn="[object Object]",Wh="[object Promise]",qB="[object Proxy]",Hi="[object RegExp]",An="[object Set]",qi="[object String]",na="[object Symbol]",KB="[object Undefined]",Ki="[object WeakMap]",XB="[object WeakSet]",Xi="[object ArrayBuffer]",Io="[object DataView]",vc="[object Float32Array]",_c="[object Float64Array]",Cc="[object Int8Array]",wc="[object Int16Array]",bc="[object Int32Array]",xc="[object Uint8Array]",kc="[object Uint8ClampedArray]",Sc="[object Uint16Array]",Ec="[object Uint32Array]",YB=/\b__p \+= '';/g,JB=/\b(__p \+=) '' \+/g,QB=/(__e\(.*?\)|\b__t\)) \+\n'';/g,jh=/&(?:amp|lt|gt|quot|#39);/g,Hh=/[&<>"']/g,eP=RegExp(jh.source),tP=RegExp(Hh.source),nP=/<%-([\s\S]+?)%>/g,rP=/<%([\s\S]+?)%>/g,qh=/<%=([\s\S]+?)%>/g,oP=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,iP=/^\w*$/,sP=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Tc=/[\\^$.*+?()[\]{}|]/g,aP=RegExp(Tc.source),Nc=/^\s+/,lP=/\s/,cP=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,dP=/\{\n\/\* \[wrapped with (.+)\] \*/,uP=/,? & /,pP=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hP=/[()=,{}\[\]\/\s]/,fP=/\\(\\)?/g,mP=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Kh=/\w*$/,gP=/^[-+]0x[0-9a-f]+$/i,yP=/^0b[01]+$/i,vP=/^\[object .+?Constructor\]$/,_P=/^0o[0-7]+$/i,CP=/^(?:0|[1-9]\d*)$/,wP=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ra=/($^)/,bP=/['\n\r\u2028\u2029\\]/g,oa="\\ud800-\\udfff",xP="\\u0300-\\u036f",kP="\\ufe20-\\ufe2f",SP="\\u20d0-\\u20ff",Xh=xP+kP+SP,Yh="\\u2700-\\u27bf",Jh="a-z\\xdf-\\xf6\\xf8-\\xff",EP="\\xac\\xb1\\xd7\\xf7",TP="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",NP="\\u2000-\\u206f",AP=" \\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",Qh="A-Z\\xc0-\\xd6\\xd8-\\xde",ef="\\ufe0e\\ufe0f",tf=EP+TP+NP+AP,Ac="['’]",VP="["+oa+"]",nf="["+tf+"]",ia="["+Xh+"]",rf="\\d+",BP="["+Yh+"]",of="["+Jh+"]",sf="[^"+oa+tf+rf+Yh+Jh+Qh+"]",Vc="\\ud83c[\\udffb-\\udfff]",PP="(?:"+ia+"|"+Vc+")",af="[^"+oa+"]",Bc="(?:\\ud83c[\\udde6-\\uddff]){2}",Pc="[\\ud800-\\udbff][\\udc00-\\udfff]",Fo="["+Qh+"]",lf="\\u200d",cf="(?:"+of+"|"+sf+")",RP="(?:"+Fo+"|"+sf+")",df="(?:"+Ac+"(?:d|ll|m|re|s|t|ve))?",uf="(?:"+Ac+"(?:D|LL|M|RE|S|T|VE))?",pf=PP+"?",hf="["+ef+"]?",DP="(?:"+lf+"(?:"+[af,Bc,Pc].join("|")+")"+hf+pf+")*",IP="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",FP="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ff=hf+pf+DP,OP="(?:"+[BP,Bc,Pc].join("|")+")"+ff,LP="(?:"+[af+ia+"?",ia,Bc,Pc,VP].join("|")+")",MP=RegExp(Ac,"g"),GP=RegExp(ia,"g"),Rc=RegExp(Vc+"(?="+Vc+")|"+LP+ff,"g"),$P=RegExp([Fo+"?"+of+"+"+df+"(?="+[nf,Fo,"$"].join("|")+")",RP+"+"+uf+"(?="+[nf,Fo+cf,"$"].join("|")+")",Fo+"?"+cf+"+"+df,Fo+"+"+uf,FP,IP,rf,OP].join("|"),"g"),zP=RegExp("["+lf+oa+Xh+ef+"]"),UP=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ZP=["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"],WP=-1,Qe={};Qe[vc]=Qe[_c]=Qe[Cc]=Qe[wc]=Qe[bc]=Qe[xc]=Qe[kc]=Qe[Sc]=Qe[Ec]=!0,Qe[Ke]=Qe[Un]=Qe[Xi]=Qe[Zi]=Qe[Io]=Qe[Wi]=Qe[ea]=Qe[ta]=Qe[Nn]=Qe[ji]=Qe[Qn]=Qe[Hi]=Qe[An]=Qe[qi]=Qe[Ki]=!1;var Ye={};Ye[Ke]=Ye[Un]=Ye[Xi]=Ye[Io]=Ye[Zi]=Ye[Wi]=Ye[vc]=Ye[_c]=Ye[Cc]=Ye[wc]=Ye[bc]=Ye[Nn]=Ye[ji]=Ye[Qn]=Ye[Hi]=Ye[An]=Ye[qi]=Ye[na]=Ye[xc]=Ye[kc]=Ye[Sc]=Ye[Ec]=!0,Ye[ea]=Ye[ta]=Ye[Ki]=!1;var jP={À:"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"},HP={"&":"&","<":"<",">":">",'"':""","'":"'"},qP={"&":"&","<":"<",">":">",""":'"',"'":"'"},KP={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},XP=parseFloat,YP=parseInt,mf=typeof Xo=="object"&&Xo&&Xo.Object===Object&&Xo,JP=typeof self=="object"&&self&&self.Object===Object&&self,Ct=mf||JP||Function("return this")(),Dc=e&&!e.nodeType&&e,Qr=Dc&&!0&&t&&!t.nodeType&&t,gf=Qr&&Qr.exports===Dc,Ic=gf&&mf.process,nn=function(){try{var P=Qr&&Qr.require&&Qr.require("util").types;return P||Ic&&Ic.binding&&Ic.binding("util")}catch{}}(),yf=nn&&nn.isArrayBuffer,vf=nn&&nn.isDate,_f=nn&&nn.isMap,Cf=nn&&nn.isRegExp,wf=nn&&nn.isSet,bf=nn&&nn.isTypedArray;function Xt(P,j,U){switch(U.length){case 0:return P.call(j);case 1:return P.call(j,U[0]);case 2:return P.call(j,U[0],U[1]);case 3:return P.call(j,U[0],U[1],U[2])}return P.apply(j,U)}function QP(P,j,U,de){for(var Te=-1,We=P==null?0:P.length;++Te<We;){var ft=P[Te];j(de,ft,U(ft),P)}return de}function rn(P,j){for(var U=-1,de=P==null?0:P.length;++U<de&&j(P[U],U,P)!==!1;);return P}function eR(P,j){for(var U=P==null?0:P.length;U--&&j(P[U],U,P)!==!1;);return P}function xf(P,j){for(var U=-1,de=P==null?0:P.length;++U<de;)if(!j(P[U],U,P))return!1;return!0}function Nr(P,j){for(var U=-1,de=P==null?0:P.length,Te=0,We=[];++U<de;){var ft=P[U];j(ft,U,P)&&(We[Te++]=ft)}return We}function sa(P,j){var U=P==null?0:P.length;return!!U&&Oo(P,j,0)>-1}function Fc(P,j,U){for(var de=-1,Te=P==null?0:P.length;++de<Te;)if(U(j,P[de]))return!0;return!1}function tt(P,j){for(var U=-1,de=P==null?0:P.length,Te=Array(de);++U<de;)Te[U]=j(P[U],U,P);return Te}function Ar(P,j){for(var U=-1,de=j.length,Te=P.length;++U<de;)P[Te+U]=j[U];return P}function Oc(P,j,U,de){var Te=-1,We=P==null?0:P.length;for(de&&We&&(U=P[++Te]);++Te<We;)U=j(U,P[Te],Te,P);return U}function tR(P,j,U,de){var Te=P==null?0:P.length;for(de&&Te&&(U=P[--Te]);Te--;)U=j(U,P[Te],Te,P);return U}function Lc(P,j){for(var U=-1,de=P==null?0:P.length;++U<de;)if(j(P[U],U,P))return!0;return!1}var nR=Mc("length");function rR(P){return P.split("")}function oR(P){return P.match(pP)||[]}function kf(P,j,U){var de;return U(P,function(Te,We,ft){if(j(Te,We,ft))return de=We,!1}),de}function aa(P,j,U,de){for(var Te=P.length,We=U+(de?1:-1);de?We--:++We<Te;)if(j(P[We],We,P))return We;return-1}function Oo(P,j,U){return j===j?gR(P,j,U):aa(P,Sf,U)}function iR(P,j,U,de){for(var Te=U-1,We=P.length;++Te<We;)if(de(P[Te],j))return Te;return-1}function Sf(P){return P!==P}function Ef(P,j){var U=P==null?0:P.length;return U?$c(P,j)/U:ue}function Mc(P){return function(j){return j==null?n:j[P]}}function Gc(P){return function(j){return P==null?n:P[j]}}function Tf(P,j,U,de,Te){return Te(P,function(We,ft,Xe){U=de?(de=!1,We):j(U,We,ft,Xe)}),U}function sR(P,j){var U=P.length;for(P.sort(j);U--;)P[U]=P[U].value;return P}function $c(P,j){for(var U,de=-1,Te=P.length;++de<Te;){var We=j(P[de]);We!==n&&(U=U===n?We:U+We)}return U}function zc(P,j){for(var U=-1,de=Array(P);++U<P;)de[U]=j(U);return de}function aR(P,j){return tt(j,function(U){return[U,P[U]]})}function Nf(P){return P&&P.slice(0,Pf(P)+1).replace(Nc,"")}function Yt(P){return function(j){return P(j)}}function Uc(P,j){return tt(j,function(U){return P[U]})}function Yi(P,j){return P.has(j)}function Af(P,j){for(var U=-1,de=P.length;++U<de&&Oo(j,P[U],0)>-1;);return U}function Vf(P,j){for(var U=P.length;U--&&Oo(j,P[U],0)>-1;);return U}function lR(P,j){for(var U=P.length,de=0;U--;)P[U]===j&&++de;return de}var cR=Gc(jP),dR=Gc(HP);function uR(P){return"\\"+KP[P]}function pR(P,j){return P==null?n:P[j]}function Lo(P){return zP.test(P)}function hR(P){return UP.test(P)}function fR(P){for(var j,U=[];!(j=P.next()).done;)U.push(j.value);return U}function Zc(P){var j=-1,U=Array(P.size);return P.forEach(function(de,Te){U[++j]=[Te,de]}),U}function Bf(P,j){return function(U){return P(j(U))}}function Vr(P,j){for(var U=-1,de=P.length,Te=0,We=[];++U<de;){var ft=P[U];(ft===j||ft===m)&&(P[U]=m,We[Te++]=U)}return We}function la(P){var j=-1,U=Array(P.size);return P.forEach(function(de){U[++j]=de}),U}function mR(P){var j=-1,U=Array(P.size);return P.forEach(function(de){U[++j]=[de,de]}),U}function gR(P,j,U){for(var de=U-1,Te=P.length;++de<Te;)if(P[de]===j)return de;return-1}function yR(P,j,U){for(var de=U+1;de--;)if(P[de]===j)return de;return de}function Mo(P){return Lo(P)?_R(P):nR(P)}function Vn(P){return Lo(P)?CR(P):rR(P)}function Pf(P){for(var j=P.length;j--&&lP.test(P.charAt(j)););return j}var vR=Gc(qP);function _R(P){for(var j=Rc.lastIndex=0;Rc.test(P);)++j;return j}function CR(P){return P.match(Rc)||[]}function wR(P){return P.match($P)||[]}var bR=function P(j){j=j==null?Ct:Go.defaults(Ct.Object(),j,Go.pick(Ct,ZP));var U=j.Array,de=j.Date,Te=j.Error,We=j.Function,ft=j.Math,Xe=j.Object,Wc=j.RegExp,xR=j.String,on=j.TypeError,ca=U.prototype,kR=We.prototype,$o=Xe.prototype,da=j["__core-js_shared__"],ua=kR.toString,qe=$o.hasOwnProperty,SR=0,Rf=function(){var s=/[^.]+$/.exec(da&&da.keys&&da.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),pa=$o.toString,ER=ua.call(Xe),TR=Ct._,NR=Wc("^"+ua.call(qe).replace(Tc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ha=gf?j.Buffer:n,Br=j.Symbol,fa=j.Uint8Array,Df=ha?ha.allocUnsafe:n,ma=Bf(Xe.getPrototypeOf,Xe),If=Xe.create,Ff=$o.propertyIsEnumerable,ga=ca.splice,Of=Br?Br.isConcatSpreadable:n,Ji=Br?Br.iterator:n,eo=Br?Br.toStringTag:n,ya=function(){try{var s=io(Xe,"defineProperty");return s({},"",{}),s}catch{}}(),AR=j.clearTimeout!==Ct.clearTimeout&&j.clearTimeout,VR=de&&de.now!==Ct.Date.now&&de.now,BR=j.setTimeout!==Ct.setTimeout&&j.setTimeout,va=ft.ceil,_a=ft.floor,jc=Xe.getOwnPropertySymbols,PR=ha?ha.isBuffer:n,Lf=j.isFinite,RR=ca.join,DR=Bf(Xe.keys,Xe),mt=ft.max,Tt=ft.min,IR=de.now,FR=j.parseInt,Mf=ft.random,OR=ca.reverse,Hc=io(j,"DataView"),Qi=io(j,"Map"),qc=io(j,"Promise"),zo=io(j,"Set"),es=io(j,"WeakMap"),ts=io(Xe,"create"),Ca=es&&new es,Uo={},LR=so(Hc),MR=so(Qi),GR=so(qc),$R=so(zo),zR=so(es),wa=Br?Br.prototype:n,ns=wa?wa.valueOf:n,Gf=wa?wa.toString:n;function v(s){if(it(s)&&!Ne(s)&&!(s instanceof Oe)){if(s instanceof sn)return s;if(qe.call(s,"__wrapped__"))return $m(s)}return new sn(s)}var Zo=function(){function s(){}return function(a){if(!ot(a))return{};if(If)return If(a);s.prototype=a;var u=new s;return s.prototype=n,u}}();function ba(){}function sn(s,a){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=n}v.templateSettings={escape:nP,evaluate:rP,interpolate:qh,variable:"",imports:{_:v}},v.prototype=ba.prototype,v.prototype.constructor=v,sn.prototype=Zo(ba.prototype),sn.prototype.constructor=sn;function Oe(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ke,this.__views__=[]}function UR(){var s=new Oe(this.__wrapped__);return s.__actions__=Mt(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Mt(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Mt(this.__views__),s}function ZR(){if(this.__filtered__){var s=new Oe(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function WR(){var s=this.__wrapped__.value(),a=this.__dir__,u=Ne(s),f=a<0,g=u?s.length:0,_=rI(0,g,this.__views__),N=_.start,B=_.end,I=B-N,K=f?B:N-1,X=this.__iteratees__,Y=X.length,ie=0,he=Tt(I,this.__takeCount__);if(!u||!f&&g==I&&he==I)return dm(s,this.__actions__);var ve=[];e:for(;I--&&ie<he;){K+=a;for(var De=-1,_e=s[K];++De<Y;){var Fe=X[De],Le=Fe.iteratee,en=Fe.type,Ft=Le(_e);if(en==k)_e=Ft;else if(!Ft){if(en==C)continue e;break e}}ve[ie++]=_e}return ve}Oe.prototype=Zo(ba.prototype),Oe.prototype.constructor=Oe;function to(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var f=s[a];this.set(f[0],f[1])}}function jR(){this.__data__=ts?ts(null):{},this.size=0}function HR(s){var a=this.has(s)&&delete this.__data__[s];return this.size-=a?1:0,a}function qR(s){var a=this.__data__;if(ts){var u=a[s];return u===p?n:u}return qe.call(a,s)?a[s]:n}function KR(s){var a=this.__data__;return ts?a[s]!==n:qe.call(a,s)}function XR(s,a){var u=this.__data__;return this.size+=this.has(s)?0:1,u[s]=ts&&a===n?p:a,this}to.prototype.clear=jR,to.prototype.delete=HR,to.prototype.get=qR,to.prototype.has=KR,to.prototype.set=XR;function er(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var f=s[a];this.set(f[0],f[1])}}function YR(){this.__data__=[],this.size=0}function JR(s){var a=this.__data__,u=xa(a,s);if(u<0)return!1;var f=a.length-1;return u==f?a.pop():ga.call(a,u,1),--this.size,!0}function QR(s){var a=this.__data__,u=xa(a,s);return u<0?n:a[u][1]}function eD(s){return xa(this.__data__,s)>-1}function tD(s,a){var u=this.__data__,f=xa(u,s);return f<0?(++this.size,u.push([s,a])):u[f][1]=a,this}er.prototype.clear=YR,er.prototype.delete=JR,er.prototype.get=QR,er.prototype.has=eD,er.prototype.set=tD;function tr(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var f=s[a];this.set(f[0],f[1])}}function nD(){this.size=0,this.__data__={hash:new to,map:new(Qi||er),string:new to}}function rD(s){var a=Ia(this,s).delete(s);return this.size-=a?1:0,a}function oD(s){return Ia(this,s).get(s)}function iD(s){return Ia(this,s).has(s)}function sD(s,a){var u=Ia(this,s),f=u.size;return u.set(s,a),this.size+=u.size==f?0:1,this}tr.prototype.clear=nD,tr.prototype.delete=rD,tr.prototype.get=oD,tr.prototype.has=iD,tr.prototype.set=sD;function no(s){var a=-1,u=s==null?0:s.length;for(this.__data__=new tr;++a<u;)this.add(s[a])}function aD(s){return this.__data__.set(s,p),this}function lD(s){return this.__data__.has(s)}no.prototype.add=no.prototype.push=aD,no.prototype.has=lD;function Bn(s){var a=this.__data__=new er(s);this.size=a.size}function cD(){this.__data__=new er,this.size=0}function dD(s){var a=this.__data__,u=a.delete(s);return this.size=a.size,u}function uD(s){return this.__data__.get(s)}function pD(s){return this.__data__.has(s)}function hD(s,a){var u=this.__data__;if(u instanceof er){var f=u.__data__;if(!Qi||f.length<i-1)return f.push([s,a]),this.size=++u.size,this;u=this.__data__=new tr(f)}return u.set(s,a),this.size=u.size,this}Bn.prototype.clear=cD,Bn.prototype.delete=dD,Bn.prototype.get=uD,Bn.prototype.has=pD,Bn.prototype.set=hD;function $f(s,a){var u=Ne(s),f=!u&&ao(s),g=!u&&!f&&Fr(s),_=!u&&!f&&!g&&qo(s),N=u||f||g||_,B=N?zc(s.length,xR):[],I=B.length;for(var K in s)(a||qe.call(s,K))&&!(N&&(K=="length"||g&&(K=="offset"||K=="parent")||_&&(K=="buffer"||K=="byteLength"||K=="byteOffset")||ir(K,I)))&&B.push(K);return B}function zf(s){var a=s.length;return a?s[id(0,a-1)]:n}function fD(s,a){return Fa(Mt(s),ro(a,0,s.length))}function mD(s){return Fa(Mt(s))}function Kc(s,a,u){(u!==n&&!Pn(s[a],u)||u===n&&!(a in s))&&nr(s,a,u)}function rs(s,a,u){var f=s[a];(!(qe.call(s,a)&&Pn(f,u))||u===n&&!(a in s))&&nr(s,a,u)}function xa(s,a){for(var u=s.length;u--;)if(Pn(s[u][0],a))return u;return-1}function gD(s,a,u,f){return Pr(s,function(g,_,N){a(f,g,u(g),N)}),f}function Uf(s,a){return s&&Wn(a,_t(a),s)}function yD(s,a){return s&&Wn(a,$t(a),s)}function nr(s,a,u){a=="__proto__"&&ya?ya(s,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):s[a]=u}function Xc(s,a){for(var u=-1,f=a.length,g=U(f),_=s==null;++u<f;)g[u]=_?n:Vd(s,a[u]);return g}function ro(s,a,u){return s===s&&(u!==n&&(s=s<=u?s:u),a!==n&&(s=s>=a?s:a)),s}function an(s,a,u,f,g,_){var N,B=a&y,I=a&x,K=a&w;if(u&&(N=g?u(s,f,g,_):u(s)),N!==n)return N;if(!ot(s))return s;var X=Ne(s);if(X){if(N=iI(s),!B)return Mt(s,N)}else{var Y=Nt(s),ie=Y==ta||Y==Zh;if(Fr(s))return hm(s,B);if(Y==Qn||Y==Ke||ie&&!g){if(N=I||ie?{}:Pm(s),!B)return I?qD(s,yD(N,s)):HD(s,Uf(N,s))}else{if(!Ye[Y])return g?s:{};N=sI(s,Y,B)}}_||(_=new Bn);var he=_.get(s);if(he)return he;_.set(s,N),ag(s)?s.forEach(function(_e){N.add(an(_e,a,u,_e,s,_))}):ig(s)&&s.forEach(function(_e,Fe){N.set(Fe,an(_e,a,u,Fe,s,_))});var ve=K?I?gd:md:I?$t:_t,De=X?n:ve(s);return rn(De||s,function(_e,Fe){De&&(Fe=_e,_e=s[Fe]),rs(N,Fe,an(_e,a,u,Fe,s,_))}),N}function vD(s){var a=_t(s);return function(u){return Zf(u,s,a)}}function Zf(s,a,u){var f=u.length;if(s==null)return!f;for(s=Xe(s);f--;){var g=u[f],_=a[g],N=s[g];if(N===n&&!(g in s)||!_(N))return!1}return!0}function Wf(s,a,u){if(typeof s!="function")throw new on(c);return ds(function(){s.apply(n,u)},a)}function os(s,a,u,f){var g=-1,_=sa,N=!0,B=s.length,I=[],K=a.length;if(!B)return I;u&&(a=tt(a,Yt(u))),f?(_=Fc,N=!1):a.length>=i&&(_=Yi,N=!1,a=new no(a));e:for(;++g<B;){var X=s[g],Y=u==null?X:u(X);if(X=f||X!==0?X:0,N&&Y===Y){for(var ie=K;ie--;)if(a[ie]===Y)continue e;I.push(X)}else _(a,Y,f)||I.push(X)}return I}var Pr=vm(Zn),jf=vm(Jc,!0);function _D(s,a){var u=!0;return Pr(s,function(f,g,_){return u=!!a(f,g,_),u}),u}function ka(s,a,u){for(var f=-1,g=s.length;++f<g;){var _=s[f],N=a(_);if(N!=null&&(B===n?N===N&&!Qt(N):u(N,B)))var B=N,I=_}return I}function CD(s,a,u,f){var g=s.length;for(u=Be(u),u<0&&(u=-u>g?0:g+u),f=f===n||f>g?g:Be(f),f<0&&(f+=g),f=u>f?0:cg(f);u<f;)s[u++]=a;return s}function Hf(s,a){var u=[];return Pr(s,function(f,g,_){a(f,g,_)&&u.push(f)}),u}function wt(s,a,u,f,g){var _=-1,N=s.length;for(u||(u=lI),g||(g=[]);++_<N;){var B=s[_];a>0&&u(B)?a>1?wt(B,a-1,u,f,g):Ar(g,B):f||(g[g.length]=B)}return g}var Yc=_m(),qf=_m(!0);function Zn(s,a){return s&&Yc(s,a,_t)}function Jc(s,a){return s&&qf(s,a,_t)}function Sa(s,a){return Nr(a,function(u){return sr(s[u])})}function oo(s,a){a=Dr(a,s);for(var u=0,f=a.length;s!=null&&u<f;)s=s[jn(a[u++])];return u&&u==f?s:n}function Kf(s,a,u){var f=a(s);return Ne(s)?f:Ar(f,u(s))}function Dt(s){return s==null?s===n?KB:HB:eo&&eo in Xe(s)?nI(s):mI(s)}function Qc(s,a){return s>a}function wD(s,a){return s!=null&&qe.call(s,a)}function bD(s,a){return s!=null&&a in Xe(s)}function xD(s,a,u){return s>=Tt(a,u)&&s<mt(a,u)}function ed(s,a,u){for(var f=u?Fc:sa,g=s[0].length,_=s.length,N=_,B=U(_),I=1/0,K=[];N--;){var X=s[N];N&&a&&(X=tt(X,Yt(a))),I=Tt(X.length,I),B[N]=!u&&(a||g>=120&&X.length>=120)?new no(N&&X):n}X=s[0];var Y=-1,ie=B[0];e:for(;++Y<g&&K.length<I;){var he=X[Y],ve=a?a(he):he;if(he=u||he!==0?he:0,!(ie?Yi(ie,ve):f(K,ve,u))){for(N=_;--N;){var De=B[N];if(!(De?Yi(De,ve):f(s[N],ve,u)))continue e}ie&&ie.push(ve),K.push(he)}}return K}function kD(s,a,u,f){return Zn(s,function(g,_,N){a(f,u(g),_,N)}),f}function is(s,a,u){a=Dr(a,s),s=Fm(s,a);var f=s==null?s:s[jn(cn(a))];return f==null?n:Xt(f,s,u)}function Xf(s){return it(s)&&Dt(s)==Ke}function SD(s){return it(s)&&Dt(s)==Xi}function ED(s){return it(s)&&Dt(s)==Wi}function ss(s,a,u,f,g){return s===a?!0:s==null||a==null||!it(s)&&!it(a)?s!==s&&a!==a:TD(s,a,u,f,ss,g)}function TD(s,a,u,f,g,_){var N=Ne(s),B=Ne(a),I=N?Un:Nt(s),K=B?Un:Nt(a);I=I==Ke?Qn:I,K=K==Ke?Qn:K;var X=I==Qn,Y=K==Qn,ie=I==K;if(ie&&Fr(s)){if(!Fr(a))return!1;N=!0,X=!1}if(ie&&!X)return _||(_=new Bn),N||qo(s)?Am(s,a,u,f,g,_):eI(s,a,I,u,f,g,_);if(!(u&E)){var he=X&&qe.call(s,"__wrapped__"),ve=Y&&qe.call(a,"__wrapped__");if(he||ve){var De=he?s.value():s,_e=ve?a.value():a;return _||(_=new Bn),g(De,_e,u,f,_)}}return ie?(_||(_=new Bn),tI(s,a,u,f,g,_)):!1}function ND(s){return it(s)&&Nt(s)==Nn}function td(s,a,u,f){var g=u.length,_=g,N=!f;if(s==null)return!_;for(s=Xe(s);g--;){var B=u[g];if(N&&B[2]?B[1]!==s[B[0]]:!(B[0]in s))return!1}for(;++g<_;){B=u[g];var I=B[0],K=s[I],X=B[1];if(N&&B[2]){if(K===n&&!(I in s))return!1}else{var Y=new Bn;if(f)var ie=f(K,X,I,s,a,Y);if(!(ie===n?ss(X,K,E|O,f,Y):ie))return!1}}return!0}function Yf(s){if(!ot(s)||dI(s))return!1;var a=sr(s)?NR:vP;return a.test(so(s))}function AD(s){return it(s)&&Dt(s)==Hi}function VD(s){return it(s)&&Nt(s)==An}function BD(s){return it(s)&&za(s.length)&&!!Qe[Dt(s)]}function Jf(s){return typeof s=="function"?s:s==null?zt:typeof s=="object"?Ne(s)?tm(s[0],s[1]):em(s):Cg(s)}function nd(s){if(!cs(s))return DR(s);var a=[];for(var u in Xe(s))qe.call(s,u)&&u!="constructor"&&a.push(u);return a}function PD(s){if(!ot(s))return fI(s);var a=cs(s),u=[];for(var f in s)f=="constructor"&&(a||!qe.call(s,f))||u.push(f);return u}function rd(s,a){return s<a}function Qf(s,a){var u=-1,f=Gt(s)?U(s.length):[];return Pr(s,function(g,_,N){f[++u]=a(g,_,N)}),f}function em(s){var a=vd(s);return a.length==1&&a[0][2]?Dm(a[0][0],a[0][1]):function(u){return u===s||td(u,s,a)}}function tm(s,a){return Cd(s)&&Rm(a)?Dm(jn(s),a):function(u){var f=Vd(u,s);return f===n&&f===a?Bd(u,s):ss(a,f,E|O)}}function Ea(s,a,u,f,g){s!==a&&Yc(a,function(_,N){if(g||(g=new Bn),ot(_))RD(s,a,N,u,Ea,f,g);else{var B=f?f(bd(s,N),_,N+"",s,a,g):n;B===n&&(B=_),Kc(s,N,B)}},$t)}function RD(s,a,u,f,g,_,N){var B=bd(s,u),I=bd(a,u),K=N.get(I);if(K){Kc(s,u,K);return}var X=_?_(B,I,u+"",s,a,N):n,Y=X===n;if(Y){var ie=Ne(I),he=!ie&&Fr(I),ve=!ie&&!he&&qo(I);X=I,ie||he||ve?Ne(B)?X=B:at(B)?X=Mt(B):he?(Y=!1,X=hm(I,!0)):ve?(Y=!1,X=fm(I,!0)):X=[]:us(I)||ao(I)?(X=B,ao(B)?X=dg(B):(!ot(B)||sr(B))&&(X=Pm(I))):Y=!1}Y&&(N.set(I,X),g(X,I,f,_,N),N.delete(I)),Kc(s,u,X)}function nm(s,a){var u=s.length;if(u)return a+=a<0?u:0,ir(a,u)?s[a]:n}function rm(s,a,u){a.length?a=tt(a,function(_){return Ne(_)?function(N){return oo(N,_.length===1?_[0]:_)}:_}):a=[zt];var f=-1;a=tt(a,Yt(ge()));var g=Qf(s,function(_,N,B){var I=tt(a,function(K){return K(_)});return{criteria:I,index:++f,value:_}});return sR(g,function(_,N){return jD(_,N,u)})}function DD(s,a){return om(s,a,function(u,f){return Bd(s,f)})}function om(s,a,u){for(var f=-1,g=a.length,_={};++f<g;){var N=a[f],B=oo(s,N);u(B,N)&&as(_,Dr(N,s),B)}return _}function ID(s){return function(a){return oo(a,s)}}function od(s,a,u,f){var g=f?iR:Oo,_=-1,N=a.length,B=s;for(s===a&&(a=Mt(a)),u&&(B=tt(s,Yt(u)));++_<N;)for(var I=0,K=a[_],X=u?u(K):K;(I=g(B,X,I,f))>-1;)B!==s&&ga.call(B,I,1),ga.call(s,I,1);return s}function im(s,a){for(var u=s?a.length:0,f=u-1;u--;){var g=a[u];if(u==f||g!==_){var _=g;ir(g)?ga.call(s,g,1):ld(s,g)}}return s}function id(s,a){return s+_a(Mf()*(a-s+1))}function FD(s,a,u,f){for(var g=-1,_=mt(va((a-s)/(u||1)),0),N=U(_);_--;)N[f?_:++g]=s,s+=u;return N}function sd(s,a){var u="";if(!s||a<1||a>q)return u;do a%2&&(u+=s),a=_a(a/2),a&&(s+=s);while(a);return u}function Ie(s,a){return xd(Im(s,a,zt),s+"")}function OD(s){return zf(Ko(s))}function LD(s,a){var u=Ko(s);return Fa(u,ro(a,0,u.length))}function as(s,a,u,f){if(!ot(s))return s;a=Dr(a,s);for(var g=-1,_=a.length,N=_-1,B=s;B!=null&&++g<_;){var I=jn(a[g]),K=u;if(I==="__proto__"||I==="constructor"||I==="prototype")return s;if(g!=N){var X=B[I];K=f?f(X,I,B):n,K===n&&(K=ot(X)?X:ir(a[g+1])?[]:{})}rs(B,I,K),B=B[I]}return s}var sm=Ca?function(s,a){return Ca.set(s,a),s}:zt,MD=ya?function(s,a){return ya(s,"toString",{configurable:!0,enumerable:!1,value:Rd(a),writable:!0})}:zt;function GD(s){return Fa(Ko(s))}function ln(s,a,u){var f=-1,g=s.length;a<0&&(a=-a>g?0:g+a),u=u>g?g:u,u<0&&(u+=g),g=a>u?0:u-a>>>0,a>>>=0;for(var _=U(g);++f<g;)_[f]=s[f+a];return _}function $D(s,a){var u;return Pr(s,function(f,g,_){return u=a(f,g,_),!u}),!!u}function Ta(s,a,u){var f=0,g=s==null?f:s.length;if(typeof a=="number"&&a===a&&g<=Ze){for(;f<g;){var _=f+g>>>1,N=s[_];N!==null&&!Qt(N)&&(u?N<=a:N<a)?f=_+1:g=_}return g}return ad(s,a,zt,u)}function ad(s,a,u,f){var g=0,_=s==null?0:s.length;if(_===0)return 0;a=u(a);for(var N=a!==a,B=a===null,I=Qt(a),K=a===n;g<_;){var X=_a((g+_)/2),Y=u(s[X]),ie=Y!==n,he=Y===null,ve=Y===Y,De=Qt(Y);if(N)var _e=f||ve;else K?_e=ve&&(f||ie):B?_e=ve&&ie&&(f||!he):I?_e=ve&&ie&&!he&&(f||!De):he||De?_e=!1:_e=f?Y<=a:Y<a;_e?g=X+1:_=X}return Tt(_,Se)}function am(s,a){for(var u=-1,f=s.length,g=0,_=[];++u<f;){var N=s[u],B=a?a(N):N;if(!u||!Pn(B,I)){var I=B;_[g++]=N===0?0:N}}return _}function lm(s){return typeof s=="number"?s:Qt(s)?ue:+s}function Jt(s){if(typeof s=="string")return s;if(Ne(s))return tt(s,Jt)+"";if(Qt(s))return Gf?Gf.call(s):"";var a=s+"";return a=="0"&&1/s==-W?"-0":a}function Rr(s,a,u){var f=-1,g=sa,_=s.length,N=!0,B=[],I=B;if(u)N=!1,g=Fc;else if(_>=i){var K=a?null:JD(s);if(K)return la(K);N=!1,g=Yi,I=new no}else I=a?[]:B;e:for(;++f<_;){var X=s[f],Y=a?a(X):X;if(X=u||X!==0?X:0,N&&Y===Y){for(var ie=I.length;ie--;)if(I[ie]===Y)continue e;a&&I.push(Y),B.push(X)}else g(I,Y,u)||(I!==B&&I.push(Y),B.push(X))}return B}function ld(s,a){return a=Dr(a,s),s=Fm(s,a),s==null||delete s[jn(cn(a))]}function cm(s,a,u,f){return as(s,a,u(oo(s,a)),f)}function Na(s,a,u,f){for(var g=s.length,_=f?g:-1;(f?_--:++_<g)&&a(s[_],_,s););return u?ln(s,f?0:_,f?_+1:g):ln(s,f?_+1:0,f?g:_)}function dm(s,a){var u=s;return u instanceof Oe&&(u=u.value()),Oc(a,function(f,g){return g.func.apply(g.thisArg,Ar([f],g.args))},u)}function cd(s,a,u){var f=s.length;if(f<2)return f?Rr(s[0]):[];for(var g=-1,_=U(f);++g<f;)for(var N=s[g],B=-1;++B<f;)B!=g&&(_[g]=os(_[g]||N,s[B],a,u));return Rr(wt(_,1),a,u)}function um(s,a,u){for(var f=-1,g=s.length,_=a.length,N={};++f<g;){var B=f<_?a[f]:n;u(N,s[f],B)}return N}function dd(s){return at(s)?s:[]}function ud(s){return typeof s=="function"?s:zt}function Dr(s,a){return Ne(s)?s:Cd(s,a)?[s]:Gm(He(s))}var zD=Ie;function Ir(s,a,u){var f=s.length;return u=u===n?f:u,!a&&u>=f?s:ln(s,a,u)}var pm=AR||function(s){return Ct.clearTimeout(s)};function hm(s,a){if(a)return s.slice();var u=s.length,f=Df?Df(u):new s.constructor(u);return s.copy(f),f}function pd(s){var a=new s.constructor(s.byteLength);return new fa(a).set(new fa(s)),a}function UD(s,a){var u=a?pd(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.byteLength)}function ZD(s){var a=new s.constructor(s.source,Kh.exec(s));return a.lastIndex=s.lastIndex,a}function WD(s){return ns?Xe(ns.call(s)):{}}function fm(s,a){var u=a?pd(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.length)}function mm(s,a){if(s!==a){var u=s!==n,f=s===null,g=s===s,_=Qt(s),N=a!==n,B=a===null,I=a===a,K=Qt(a);if(!B&&!K&&!_&&s>a||_&&N&&I&&!B&&!K||f&&N&&I||!u&&I||!g)return 1;if(!f&&!_&&!K&&s<a||K&&u&&g&&!f&&!_||B&&u&&g||!N&&g||!I)return-1}return 0}function jD(s,a,u){for(var f=-1,g=s.criteria,_=a.criteria,N=g.length,B=u.length;++f<N;){var I=mm(g[f],_[f]);if(I){if(f>=B)return I;var K=u[f];return I*(K=="desc"?-1:1)}}return s.index-a.index}function gm(s,a,u,f){for(var g=-1,_=s.length,N=u.length,B=-1,I=a.length,K=mt(_-N,0),X=U(I+K),Y=!f;++B<I;)X[B]=a[B];for(;++g<N;)(Y||g<_)&&(X[u[g]]=s[g]);for(;K--;)X[B++]=s[g++];return X}function ym(s,a,u,f){for(var g=-1,_=s.length,N=-1,B=u.length,I=-1,K=a.length,X=mt(_-B,0),Y=U(X+K),ie=!f;++g<X;)Y[g]=s[g];for(var he=g;++I<K;)Y[he+I]=a[I];for(;++N<B;)(ie||g<_)&&(Y[he+u[N]]=s[g++]);return Y}function Mt(s,a){var u=-1,f=s.length;for(a||(a=U(f));++u<f;)a[u]=s[u];return a}function Wn(s,a,u,f){var g=!u;u||(u={});for(var _=-1,N=a.length;++_<N;){var B=a[_],I=f?f(u[B],s[B],B,u,s):n;I===n&&(I=s[B]),g?nr(u,B,I):rs(u,B,I)}return u}function HD(s,a){return Wn(s,_d(s),a)}function qD(s,a){return Wn(s,Vm(s),a)}function Aa(s,a){return function(u,f){var g=Ne(u)?QP:gD,_=a?a():{};return g(u,s,ge(f,2),_)}}function Wo(s){return Ie(function(a,u){var f=-1,g=u.length,_=g>1?u[g-1]:n,N=g>2?u[2]:n;for(_=s.length>3&&typeof _=="function"?(g--,_):n,N&&It(u[0],u[1],N)&&(_=g<3?n:_,g=1),a=Xe(a);++f<g;){var B=u[f];B&&s(a,B,f,_)}return a})}function vm(s,a){return function(u,f){if(u==null)return u;if(!Gt(u))return s(u,f);for(var g=u.length,_=a?g:-1,N=Xe(u);(a?_--:++_<g)&&f(N[_],_,N)!==!1;);return u}}function _m(s){return function(a,u,f){for(var g=-1,_=Xe(a),N=f(a),B=N.length;B--;){var I=N[s?B:++g];if(u(_[I],I,_)===!1)break}return a}}function KD(s,a,u){var f=a&$,g=ls(s);function _(){var N=this&&this!==Ct&&this instanceof _?g:s;return N.apply(f?u:this,arguments)}return _}function Cm(s){return function(a){a=He(a);var u=Lo(a)?Vn(a):n,f=u?u[0]:a.charAt(0),g=u?Ir(u,1).join(""):a.slice(1);return f[s]()+g}}function jo(s){return function(a){return Oc(vg(yg(a).replace(MP,"")),s,"")}}function ls(s){return function(){var a=arguments;switch(a.length){case 0:return new s;case 1:return new s(a[0]);case 2:return new s(a[0],a[1]);case 3:return new s(a[0],a[1],a[2]);case 4:return new s(a[0],a[1],a[2],a[3]);case 5:return new s(a[0],a[1],a[2],a[3],a[4]);case 6:return new s(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new s(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var u=Zo(s.prototype),f=s.apply(u,a);return ot(f)?f:u}}function XD(s,a,u){var f=ls(s);function g(){for(var _=arguments.length,N=U(_),B=_,I=Ho(g);B--;)N[B]=arguments[B];var K=_<3&&N[0]!==I&&N[_-1]!==I?[]:Vr(N,I);if(_-=K.length,_<u)return Sm(s,a,Va,g.placeholder,n,N,K,n,n,u-_);var X=this&&this!==Ct&&this instanceof g?f:s;return Xt(X,this,N)}return g}function wm(s){return function(a,u,f){var g=Xe(a);if(!Gt(a)){var _=ge(u,3);a=_t(a),u=function(B){return _(g[B],B,g)}}var N=s(a,u,f);return N>-1?g[_?a[N]:N]:n}}function bm(s){return or(function(a){var u=a.length,f=u,g=sn.prototype.thru;for(s&&a.reverse();f--;){var _=a[f];if(typeof _!="function")throw new on(c);if(g&&!N&&Da(_)=="wrapper")var N=new sn([],!0)}for(f=N?f:u;++f<u;){_=a[f];var B=Da(_),I=B=="wrapper"?yd(_):n;I&&wd(I[0])&&I[1]==(ne|F|V|H)&&!I[4].length&&I[9]==1?N=N[Da(I[0])].apply(N,I[3]):N=_.length==1&&wd(_)?N[B]():N.thru(_)}return function(){var K=arguments,X=K[0];if(N&&K.length==1&&Ne(X))return N.plant(X).value();for(var Y=0,ie=u?a[Y].apply(this,K):X;++Y<u;)ie=a[Y].call(this,ie);return ie}})}function Va(s,a,u,f,g,_,N,B,I,K){var X=a&ne,Y=a&$,ie=a&b,he=a&(F|D),ve=a&J,De=ie?n:ls(s);function _e(){for(var Fe=arguments.length,Le=U(Fe),en=Fe;en--;)Le[en]=arguments[en];if(he)var Ft=Ho(_e),tn=lR(Le,Ft);if(f&&(Le=gm(Le,f,g,he)),_&&(Le=ym(Le,_,N,he)),Fe-=tn,he&&Fe<K){var lt=Vr(Le,Ft);return Sm(s,a,Va,_e.placeholder,u,Le,lt,B,I,K-Fe)}var Rn=Y?u:this,lr=ie?Rn[s]:s;return Fe=Le.length,B?Le=gI(Le,B):ve&&Fe>1&&Le.reverse(),X&&I<Fe&&(Le.length=I),this&&this!==Ct&&this instanceof _e&&(lr=De||ls(lr)),lr.apply(Rn,Le)}return _e}function xm(s,a){return function(u,f){return kD(u,s,a(f),{})}}function Ba(s,a){return function(u,f){var g;if(u===n&&f===n)return a;if(u!==n&&(g=u),f!==n){if(g===n)return f;typeof u=="string"||typeof f=="string"?(u=Jt(u),f=Jt(f)):(u=lm(u),f=lm(f)),g=s(u,f)}return g}}function hd(s){return or(function(a){return a=tt(a,Yt(ge())),Ie(function(u){var f=this;return s(a,function(g){return Xt(g,f,u)})})})}function Pa(s,a){a=a===n?" ":Jt(a);var u=a.length;if(u<2)return u?sd(a,s):a;var f=sd(a,va(s/Mo(a)));return Lo(a)?Ir(Vn(f),0,s).join(""):f.slice(0,s)}function YD(s,a,u,f){var g=a&$,_=ls(s);function N(){for(var B=-1,I=arguments.length,K=-1,X=f.length,Y=U(X+I),ie=this&&this!==Ct&&this instanceof N?_:s;++K<X;)Y[K]=f[K];for(;I--;)Y[K++]=arguments[++B];return Xt(ie,g?u:this,Y)}return N}function km(s){return function(a,u,f){return f&&typeof f!="number"&&It(a,u,f)&&(u=f=n),a=ar(a),u===n?(u=a,a=0):u=ar(u),f=f===n?a<u?1:-1:ar(f),FD(a,u,f,s)}}function Ra(s){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=dn(a),u=dn(u)),s(a,u)}}function Sm(s,a,u,f,g,_,N,B,I,K){var X=a&F,Y=X?N:n,ie=X?n:N,he=X?_:n,ve=X?n:_;a|=X?V:Z,a&=~(X?Z:V),a&R||(a&=~($|b));var De=[s,a,g,he,Y,ve,ie,B,I,K],_e=u.apply(n,De);return wd(s)&&Om(_e,De),_e.placeholder=f,Lm(_e,s,a)}function fd(s){var a=ft[s];return function(u,f){if(u=dn(u),f=f==null?0:Tt(Be(f),292),f&&Lf(u)){var g=(He(u)+"e").split("e"),_=a(g[0]+"e"+(+g[1]+f));return g=(He(_)+"e").split("e"),+(g[0]+"e"+(+g[1]-f))}return a(u)}}var JD=zo&&1/la(new zo([,-0]))[1]==W?function(s){return new zo(s)}:Fd;function Em(s){return function(a){var u=Nt(a);return u==Nn?Zc(a):u==An?mR(a):aR(a,s(a))}}function rr(s,a,u,f,g,_,N,B){var I=a&b;if(!I&&typeof s!="function")throw new on(c);var K=f?f.length:0;if(K||(a&=~(V|Z),f=g=n),N=N===n?N:mt(Be(N),0),B=B===n?B:Be(B),K-=g?g.length:0,a&Z){var X=f,Y=g;f=g=n}var ie=I?n:yd(s),he=[s,a,u,f,g,X,Y,_,N,B];if(ie&&hI(he,ie),s=he[0],a=he[1],u=he[2],f=he[3],g=he[4],B=he[9]=he[9]===n?I?0:s.length:mt(he[9]-K,0),!B&&a&(F|D)&&(a&=~(F|D)),!a||a==$)var ve=KD(s,a,u);else a==F||a==D?ve=XD(s,a,B):(a==V||a==($|V))&&!g.length?ve=YD(s,a,u,f):ve=Va.apply(n,he);var De=ie?sm:Om;return Lm(De(ve,he),s,a)}function Tm(s,a,u,f){return s===n||Pn(s,$o[u])&&!qe.call(f,u)?a:s}function Nm(s,a,u,f,g,_){return ot(s)&&ot(a)&&(_.set(a,s),Ea(s,a,n,Nm,_),_.delete(a)),s}function QD(s){return us(s)?n:s}function Am(s,a,u,f,g,_){var N=u&E,B=s.length,I=a.length;if(B!=I&&!(N&&I>B))return!1;var K=_.get(s),X=_.get(a);if(K&&X)return K==a&&X==s;var Y=-1,ie=!0,he=u&O?new no:n;for(_.set(s,a),_.set(a,s);++Y<B;){var ve=s[Y],De=a[Y];if(f)var _e=N?f(De,ve,Y,a,s,_):f(ve,De,Y,s,a,_);if(_e!==n){if(_e)continue;ie=!1;break}if(he){if(!Lc(a,function(Fe,Le){if(!Yi(he,Le)&&(ve===Fe||g(ve,Fe,u,f,_)))return he.push(Le)})){ie=!1;break}}else if(!(ve===De||g(ve,De,u,f,_))){ie=!1;break}}return _.delete(s),_.delete(a),ie}function eI(s,a,u,f,g,_,N){switch(u){case Io:if(s.byteLength!=a.byteLength||s.byteOffset!=a.byteOffset)return!1;s=s.buffer,a=a.buffer;case Xi:return!(s.byteLength!=a.byteLength||!_(new fa(s),new fa(a)));case Zi:case Wi:case ji:return Pn(+s,+a);case ea:return s.name==a.name&&s.message==a.message;case Hi:case qi:return s==a+"";case Nn:var B=Zc;case An:var I=f&E;if(B||(B=la),s.size!=a.size&&!I)return!1;var K=N.get(s);if(K)return K==a;f|=O,N.set(s,a);var X=Am(B(s),B(a),f,g,_,N);return N.delete(s),X;case na:if(ns)return ns.call(s)==ns.call(a)}return!1}function tI(s,a,u,f,g,_){var N=u&E,B=md(s),I=B.length,K=md(a),X=K.length;if(I!=X&&!N)return!1;for(var Y=I;Y--;){var ie=B[Y];if(!(N?ie in a:qe.call(a,ie)))return!1}var he=_.get(s),ve=_.get(a);if(he&&ve)return he==a&&ve==s;var De=!0;_.set(s,a),_.set(a,s);for(var _e=N;++Y<I;){ie=B[Y];var Fe=s[ie],Le=a[ie];if(f)var en=N?f(Le,Fe,ie,a,s,_):f(Fe,Le,ie,s,a,_);if(!(en===n?Fe===Le||g(Fe,Le,u,f,_):en)){De=!1;break}_e||(_e=ie=="constructor")}if(De&&!_e){var Ft=s.constructor,tn=a.constructor;Ft!=tn&&"constructor"in s&&"constructor"in a&&!(typeof Ft=="function"&&Ft instanceof Ft&&typeof tn=="function"&&tn instanceof tn)&&(De=!1)}return _.delete(s),_.delete(a),De}function or(s){return xd(Im(s,n,Zm),s+"")}function md(s){return Kf(s,_t,_d)}function gd(s){return Kf(s,$t,Vm)}var yd=Ca?function(s){return Ca.get(s)}:Fd;function Da(s){for(var a=s.name+"",u=Uo[a],f=qe.call(Uo,a)?u.length:0;f--;){var g=u[f],_=g.func;if(_==null||_==s)return g.name}return a}function Ho(s){var a=qe.call(v,"placeholder")?v:s;return a.placeholder}function ge(){var s=v.iteratee||Dd;return s=s===Dd?Jf:s,arguments.length?s(arguments[0],arguments[1]):s}function Ia(s,a){var u=s.__data__;return cI(a)?u[typeof a=="string"?"string":"hash"]:u.map}function vd(s){for(var a=_t(s),u=a.length;u--;){var f=a[u],g=s[f];a[u]=[f,g,Rm(g)]}return a}function io(s,a){var u=pR(s,a);return Yf(u)?u:n}function nI(s){var a=qe.call(s,eo),u=s[eo];try{s[eo]=n;var f=!0}catch{}var g=pa.call(s);return f&&(a?s[eo]=u:delete s[eo]),g}var _d=jc?function(s){return s==null?[]:(s=Xe(s),Nr(jc(s),function(a){return Ff.call(s,a)}))}:Od,Vm=jc?function(s){for(var a=[];s;)Ar(a,_d(s)),s=ma(s);return a}:Od,Nt=Dt;(Hc&&Nt(new Hc(new ArrayBuffer(1)))!=Io||Qi&&Nt(new Qi)!=Nn||qc&&Nt(qc.resolve())!=Wh||zo&&Nt(new zo)!=An||es&&Nt(new es)!=Ki)&&(Nt=function(s){var a=Dt(s),u=a==Qn?s.constructor:n,f=u?so(u):"";if(f)switch(f){case LR:return Io;case MR:return Nn;case GR:return Wh;case $R:return An;case zR:return Ki}return a});function rI(s,a,u){for(var f=-1,g=u.length;++f<g;){var _=u[f],N=_.size;switch(_.type){case"drop":s+=N;break;case"dropRight":a-=N;break;case"take":a=Tt(a,s+N);break;case"takeRight":s=mt(s,a-N);break}}return{start:s,end:a}}function oI(s){var a=s.match(dP);return a?a[1].split(uP):[]}function Bm(s,a,u){a=Dr(a,s);for(var f=-1,g=a.length,_=!1;++f<g;){var N=jn(a[f]);if(!(_=s!=null&&u(s,N)))break;s=s[N]}return _||++f!=g?_:(g=s==null?0:s.length,!!g&&za(g)&&ir(N,g)&&(Ne(s)||ao(s)))}function iI(s){var a=s.length,u=new s.constructor(a);return a&&typeof s[0]=="string"&&qe.call(s,"index")&&(u.index=s.index,u.input=s.input),u}function Pm(s){return typeof s.constructor=="function"&&!cs(s)?Zo(ma(s)):{}}function sI(s,a,u){var f=s.constructor;switch(a){case Xi:return pd(s);case Zi:case Wi:return new f(+s);case Io:return UD(s,u);case vc:case _c:case Cc:case wc:case bc:case xc:case kc:case Sc:case Ec:return fm(s,u);case Nn:return new f;case ji:case qi:return new f(s);case Hi:return ZD(s);case An:return new f;case na:return WD(s)}}function aI(s,a){var u=a.length;if(!u)return s;var f=u-1;return a[f]=(u>1?"& ":"")+a[f],a=a.join(u>2?", ":" "),s.replace(cP,`{
|
|
73
73
|
/* [wrapped with `+a+`] */
|
|
74
|
-
`)}function cI(s){return Ne(s)||ao(s)||!!(Ff&&s&&s[Ff])}function ir(s,a){var u=typeof s;return a=a??K,!!a&&(u=="number"||u!="symbol"&&wP.test(s))&&s>-1&&s%1==0&&s<a}function It(s,a,u){if(!ot(u))return!1;var f=typeof a;return(f=="number"?Gt(u)&&ir(a,u.length):f=="string"&&a in u)?Pn(u[a],s):!1}function Cd(s,a){if(Ne(s))return!1;var u=typeof s;return u=="number"||u=="symbol"||u=="boolean"||s==null||Qt(s)?!0:sP.test(s)||!iP.test(s)||a!=null&&s in Xe(a)}function dI(s){var a=typeof s;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?s!=="__proto__":s===null}function wd(s){var a=Da(s),u=v[a];if(typeof u!="function"||!(a in Oe.prototype))return!1;if(s===u)return!0;var f=yd(u);return!!f&&s===f[0]}function uI(s){return!!Pf&&Pf in s}var pI=da?sr:Ld;function cs(s){var a=s&&s.constructor,u=typeof a=="function"&&a.prototype||$o;return s===u}function Pm(s){return s===s&&!ot(s)}function Rm(s,a){return function(u){return u==null?!1:u[s]===a&&(a!==n||s in Xe(u))}}function hI(s){var a=Ga(s,function(f){return u.size===h&&u.clear(),f}),u=a.cache;return a}function fI(s,a){var u=s[1],f=a[1],g=u|f,_=g<(G|b|j),N=f==j&&u==F||f==j&&u==$&&s[7].length<=a[8]||f==(j|$)&&a[7].length<=a[8]&&u==F;if(!(_||N))return s;f&G&&(s[2]=a[2],g|=u&G?0:R);var V=a[3];if(V){var I=s[3];s[3]=I?mm(I,V,a[4]):V,s[4]=I?Vr(s[3],m):a[4]}return V=a[5],V&&(I=s[5],s[5]=I?gm(I,V,a[6]):V,s[6]=I?Vr(s[5],m):a[6]),V=a[7],V&&(s[7]=V),f&j&&(s[8]=s[8]==null?a[8]:Tt(s[8],a[8])),s[9]==null&&(s[9]=a[9]),s[0]=a[0],s[1]=g,s}function mI(s){var a=[];if(s!=null)for(var u in Xe(s))a.push(u);return a}function gI(s){return pa.call(s)}function Dm(s,a,u){return a=mt(a===n?s.length-1:a,0),function(){for(var f=arguments,g=-1,_=mt(f.length-a,0),N=z(_);++g<_;)N[g]=f[a+g];g=-1;for(var V=z(a+1);++g<a;)V[g]=f[g];return V[a]=u(N),Xt(s,this,V)}}function Im(s,a){return a.length<2?s:oo(s,ln(a,0,-1))}function yI(s,a){for(var u=s.length,f=Tt(a.length,u),g=Mt(s);f--;){var _=a[f];s[f]=ir(_,u)?g[_]:n}return s}function bd(s,a){if(!(a==="constructor"&&typeof s[a]=="function")&&a!="__proto__")return s[a]}var Fm=Lm(im),ds=PR||function(s,a){return Ct.setTimeout(s,a)},xd=Lm(GD);function Om(s,a,u){var f=a+"";return xd(s,lI(f,vI(iI(f),u)))}function Lm(s){var a=0,u=0;return function(){var f=FR(),g=B-(f-u);if(u=f,g>0){if(++a>=he)return arguments[0]}else a=0;return s.apply(n,arguments)}}function Fa(s,a){var u=-1,f=s.length,g=f-1;for(a=a===n?f:a;++u<a;){var _=id(u,g),N=s[_];s[_]=s[u],s[u]=N}return s.length=a,s}var Mm=hI(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace(aP,function(u,f,g,_){a.push(g?_.replace(mP,"$1"):f||u)}),a});function Wn(s){if(typeof s=="string"||Qt(s))return s;var a=s+"";return a=="0"&&1/s==-H?"-0":a}function so(s){if(s!=null){try{return ua.call(s)}catch{}try{return s+""}catch{}}return""}function vI(s,a){return rn(ht,function(u){var f="_."+u[0];a&u[1]&&!sa(s,f)&&s.push(f)}),s.sort()}function Gm(s){if(s instanceof Oe)return s.clone();var a=new sn(s.__wrapped__,s.__chain__);return a.__actions__=Mt(s.__actions__),a.__index__=s.__index__,a.__values__=s.__values__,a}function _I(s,a,u){(u?It(s,a,u):a===n)?a=1:a=mt(Be(a),0);var f=s==null?0:s.length;if(!f||a<1)return[];for(var g=0,_=0,N=z(va(f/a));g<f;)N[_++]=ln(s,g,g+=a);return N}function CI(s){for(var a=-1,u=s==null?0:s.length,f=0,g=[];++a<u;){var _=s[a];_&&(g[f++]=_)}return g}function wI(){var s=arguments.length;if(!s)return[];for(var a=z(s-1),u=arguments[0],f=s;f--;)a[f-1]=arguments[f];return Ar(Ne(u)?Mt(u):[u],wt(a,1))}var bI=Ie(function(s,a){return at(s)?os(s,wt(a,1,at,!0)):[]}),xI=Ie(function(s,a){var u=cn(a);return at(u)&&(u=n),at(s)?os(s,wt(a,1,at,!0),ge(u,2)):[]}),kI=Ie(function(s,a){var u=cn(a);return at(u)&&(u=n),at(s)?os(s,wt(a,1,at,!0),n,u):[]});function SI(s,a,u){var f=s==null?0:s.length;return f?(a=u||a===n?1:Be(a),ln(s,a<0?0:a,f)):[]}function EI(s,a,u){var f=s==null?0:s.length;return f?(a=u||a===n?1:Be(a),a=f-a,ln(s,0,a<0?0:a)):[]}function TI(s,a){return s&&s.length?Na(s,ge(a,3),!0,!0):[]}function NI(s,a){return s&&s.length?Na(s,ge(a,3),!0):[]}function AI(s,a,u,f){var g=s==null?0:s.length;return g?(u&&typeof u!="number"&&It(s,a,u)&&(u=0,f=g),wD(s,a,u,f)):[]}function $m(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=u==null?0:Be(u);return g<0&&(g=mt(f+g,0)),aa(s,ge(a,3),g)}function zm(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=f-1;return u!==n&&(g=Be(u),g=u<0?mt(f+g,0):Tt(g,f-1)),aa(s,ge(a,3),g,!0)}function Um(s){var a=s==null?0:s.length;return a?wt(s,1):[]}function VI(s){var a=s==null?0:s.length;return a?wt(s,H):[]}function BI(s,a){var u=s==null?0:s.length;return u?(a=a===n?1:Be(a),wt(s,a)):[]}function PI(s){for(var a=-1,u=s==null?0:s.length,f={};++a<u;){var g=s[a];f[g[0]]=g[1]}return f}function Zm(s){return s&&s.length?s[0]:n}function RI(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=u==null?0:Be(u);return g<0&&(g=mt(f+g,0)),Oo(s,a,g)}function DI(s){var a=s==null?0:s.length;return a?ln(s,0,-1):[]}var II=Ie(function(s){var a=tt(s,dd);return a.length&&a[0]===s[0]?ed(a):[]}),FI=Ie(function(s){var a=cn(s),u=tt(s,dd);return a===cn(u)?a=n:u.pop(),u.length&&u[0]===s[0]?ed(u,ge(a,2)):[]}),OI=Ie(function(s){var a=cn(s),u=tt(s,dd);return a=typeof a=="function"?a:n,a&&u.pop(),u.length&&u[0]===s[0]?ed(u,n,a):[]});function LI(s,a){return s==null?"":DR.call(s,a)}function cn(s){var a=s==null?0:s.length;return a?s[a-1]:n}function MI(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=f;return u!==n&&(g=Be(u),g=g<0?mt(f+g,0):Tt(g,f-1)),a===a?vR(s,a,g):aa(s,kf,g,!0)}function GI(s,a){return s&&s.length?tm(s,Be(a)):n}var $I=Ie(jm);function jm(s,a){return s&&s.length&&a&&a.length?od(s,a):s}function zI(s,a,u){return s&&s.length&&a&&a.length?od(s,a,ge(u,2)):s}function UI(s,a,u){return s&&s.length&&a&&a.length?od(s,a,n,u):s}var ZI=or(function(s,a){var u=s==null?0:s.length,f=Xc(s,a);return om(s,tt(a,function(g){return ir(g,u)?+g:g}).sort(fm)),f});function jI(s,a){var u=[];if(!(s&&s.length))return u;var f=-1,g=[],_=s.length;for(a=ge(a,3);++f<_;){var N=s[f];a(N,f,s)&&(u.push(N),g.push(f))}return om(s,g),u}function kd(s){return s==null?s:LR.call(s)}function WI(s,a,u){var f=s==null?0:s.length;return f?(u&&typeof u!="number"&&It(s,a,u)?(a=0,u=f):(a=a==null?0:Be(a),u=u===n?f:Be(u)),ln(s,a,u)):[]}function HI(s,a){return Ta(s,a)}function qI(s,a,u){return ad(s,a,ge(u,2))}function KI(s,a){var u=s==null?0:s.length;if(u){var f=Ta(s,a);if(f<u&&Pn(s[f],a))return f}return-1}function XI(s,a){return Ta(s,a,!0)}function YI(s,a,u){return ad(s,a,ge(u,2),!0)}function JI(s,a){var u=s==null?0:s.length;if(u){var f=Ta(s,a,!0)-1;if(Pn(s[f],a))return f}return-1}function QI(s){return s&&s.length?sm(s):[]}function eF(s,a){return s&&s.length?sm(s,ge(a,2)):[]}function tF(s){var a=s==null?0:s.length;return a?ln(s,1,a):[]}function nF(s,a,u){return s&&s.length?(a=u||a===n?1:Be(a),ln(s,0,a<0?0:a)):[]}function rF(s,a,u){var f=s==null?0:s.length;return f?(a=u||a===n?1:Be(a),a=f-a,ln(s,a<0?0:a,f)):[]}function oF(s,a){return s&&s.length?Na(s,ge(a,3),!1,!0):[]}function iF(s,a){return s&&s.length?Na(s,ge(a,3)):[]}var sF=Ie(function(s){return Rr(wt(s,1,at,!0))}),aF=Ie(function(s){var a=cn(s);return at(a)&&(a=n),Rr(wt(s,1,at,!0),ge(a,2))}),lF=Ie(function(s){var a=cn(s);return a=typeof a=="function"?a:n,Rr(wt(s,1,at,!0),n,a)});function cF(s){return s&&s.length?Rr(s):[]}function dF(s,a){return s&&s.length?Rr(s,ge(a,2)):[]}function uF(s,a){return a=typeof a=="function"?a:n,s&&s.length?Rr(s,n,a):[]}function Sd(s){if(!(s&&s.length))return[];var a=0;return s=Nr(s,function(u){if(at(u))return a=mt(u.length,a),!0}),zc(a,function(u){return tt(s,Mc(u))})}function Wm(s,a){if(!(s&&s.length))return[];var u=Sd(s);return a==null?u:tt(u,function(f){return Xt(a,n,f)})}var pF=Ie(function(s,a){return at(s)?os(s,a):[]}),hF=Ie(function(s){return cd(Nr(s,at))}),fF=Ie(function(s){var a=cn(s);return at(a)&&(a=n),cd(Nr(s,at),ge(a,2))}),mF=Ie(function(s){var a=cn(s);return a=typeof a=="function"?a:n,cd(Nr(s,at),n,a)}),gF=Ie(Sd);function yF(s,a){return dm(s||[],a||[],rs)}function vF(s,a){return dm(s||[],a||[],as)}var _F=Ie(function(s){var a=s.length,u=a>1?s[a-1]:n;return u=typeof u=="function"?(s.pop(),u):n,Wm(s,u)});function Hm(s){var a=v(s);return a.__chain__=!0,a}function CF(s,a){return a(s),s}function Oa(s,a){return a(s)}var wF=or(function(s){var a=s.length,u=a?s[0]:0,f=this.__wrapped__,g=function(_){return Xc(_,s)};return a>1||this.__actions__.length||!(f instanceof Oe)||!ir(u)?this.thru(g):(f=f.slice(u,+u+(a?1:0)),f.__actions__.push({func:Oa,args:[g],thisArg:n}),new sn(f,this.__chain__).thru(function(_){return a&&!_.length&&_.push(n),_}))});function bF(){return Hm(this)}function xF(){return new sn(this.value(),this.__chain__)}function kF(){this.__values__===n&&(this.__values__=ag(this.value()));var s=this.__index__>=this.__values__.length,a=s?n:this.__values__[this.__index__++];return{done:s,value:a}}function SF(){return this}function EF(s){for(var a,u=this;u instanceof ba;){var f=Gm(u);f.__index__=0,f.__values__=n,a?g.__wrapped__=f:a=f;var g=f;u=u.__wrapped__}return g.__wrapped__=s,a}function TF(){var s=this.__wrapped__;if(s instanceof Oe){var a=s;return this.__actions__.length&&(a=new Oe(this)),a=a.reverse(),a.__actions__.push({func:Oa,args:[kd],thisArg:n}),new sn(a,this.__chain__)}return this.thru(kd)}function NF(){return cm(this.__wrapped__,this.__actions__)}var AF=Aa(function(s,a,u){qe.call(s,u)?++s[u]:nr(s,u,1)});function VF(s,a,u){var f=Ne(s)?bf:CD;return u&&It(s,a,u)&&(a=n),f(s,ge(a,3))}function BF(s,a){var u=Ne(s)?Nr:Wf;return u(s,ge(a,3))}var PF=Cm($m),RF=Cm(zm);function DF(s,a){return wt(La(s,a),1)}function IF(s,a){return wt(La(s,a),H)}function FF(s,a,u){return u=u===n?1:Be(u),wt(La(s,a),u)}function qm(s,a){var u=Ne(s)?rn:Pr;return u(s,ge(a,3))}function Km(s,a){var u=Ne(s)?tR:jf;return u(s,ge(a,3))}var OF=Aa(function(s,a,u){qe.call(s,u)?s[u].push(a):nr(s,u,[a])});function LF(s,a,u,f){s=Gt(s)?s:Ko(s),u=u&&!f?Be(u):0;var g=s.length;return u<0&&(u=mt(g+u,0)),Ua(s)?u<=g&&s.indexOf(a,u)>-1:!!g&&Oo(s,a,u)>-1}var MF=Ie(function(s,a,u){var f=-1,g=typeof a=="function",_=Gt(s)?z(s.length):[];return Pr(s,function(N){_[++f]=g?Xt(a,N,u):is(N,a,u)}),_}),GF=Aa(function(s,a,u){nr(s,u,a)});function La(s,a){var u=Ne(s)?tt:Jf;return u(s,ge(a,3))}function $F(s,a,u,f){return s==null?[]:(Ne(a)||(a=a==null?[]:[a]),u=f?n:u,Ne(u)||(u=u==null?[]:[u]),nm(s,a,u))}var zF=Aa(function(s,a,u){s[u?0:1].push(a)},function(){return[[],[]]});function UF(s,a,u){var f=Ne(s)?Oc:Ef,g=arguments.length<3;return f(s,ge(a,4),u,g,Pr)}function ZF(s,a,u){var f=Ne(s)?nR:Ef,g=arguments.length<3;return f(s,ge(a,4),u,g,jf)}function jF(s,a){var u=Ne(s)?Nr:Wf;return u(s,$a(ge(a,3)))}function WF(s){var a=Ne(s)?$f:LD;return a(s)}function HF(s,a,u){(u?It(s,a,u):a===n)?a=1:a=Be(a);var f=Ne(s)?mD:MD;return f(s,a)}function qF(s){var a=Ne(s)?gD:$D;return a(s)}function KF(s){if(s==null)return 0;if(Gt(s))return Ua(s)?Mo(s):s.length;var a=Nt(s);return a==Nn||a==An?s.size:nd(s).length}function XF(s,a,u){var f=Ne(s)?Lc:zD;return u&&It(s,a,u)&&(a=n),f(s,ge(a,3))}var YF=Ie(function(s,a){if(s==null)return[];var u=a.length;return u>1&&It(s,a[0],a[1])?a=[]:u>2&&It(a[0],a[1],a[2])&&(a=[a[0]]),nm(s,wt(a,1),[])}),Ma=BR||function(){return Ct.Date.now()};function JF(s,a){if(typeof a!="function")throw new on(c);return s=Be(s),function(){if(--s<1)return a.apply(this,arguments)}}function Xm(s,a,u){return a=u?n:a,a=s&&a==null?s.length:a,rr(s,j,n,n,n,n,a)}function Ym(s,a){var u;if(typeof a!="function")throw new on(c);return s=Be(s),function(){return--s>0&&(u=a.apply(this,arguments)),s<=1&&(a=n),u}}var Ed=Ie(function(s,a,u){var f=G;if(u.length){var g=Vr(u,Ho(Ed));f|=A}return rr(s,f,a,u,g)}),Jm=Ie(function(s,a,u){var f=G|b;if(u.length){var g=Vr(u,Ho(Jm));f|=A}return rr(a,f,s,u,g)});function Qm(s,a,u){a=u?n:a;var f=rr(s,F,n,n,n,n,n,a);return f.placeholder=Qm.placeholder,f}function eg(s,a,u){a=u?n:a;var f=rr(s,D,n,n,n,n,n,a);return f.placeholder=eg.placeholder,f}function tg(s,a,u){var f,g,_,N,V,I,X=0,Y=!1,Q=!1,oe=!0;if(typeof s!="function")throw new on(c);a=dn(a)||0,ot(u)&&(Y=!!u.leading,Q="maxWait"in u,_=Q?mt(dn(u.maxWait)||0,a):_,oe="trailing"in u?!!u.trailing:oe);function pe(lt){var Rn=f,lr=g;return f=g=n,X=lt,N=s.apply(lr,Rn),N}function ve(lt){return X=lt,V=ds(Fe,a),Y?pe(lt):N}function De(lt){var Rn=lt-I,lr=lt-X,Cg=a-Rn;return Q?Tt(Cg,_-lr):Cg}function _e(lt){var Rn=lt-I,lr=lt-X;return I===n||Rn>=a||Rn<0||Q&&lr>=_}function Fe(){var lt=Ma();if(_e(lt))return Le(lt);V=ds(Fe,De(lt))}function Le(lt){return V=n,oe&&f?pe(lt):(f=g=n,N)}function en(){V!==n&&um(V),X=0,f=I=g=V=n}function Ft(){return V===n?N:Le(Ma())}function tn(){var lt=Ma(),Rn=_e(lt);if(f=arguments,g=this,I=lt,Rn){if(V===n)return ve(I);if(Q)return um(V),V=ds(Fe,a),pe(I)}return V===n&&(V=ds(Fe,a)),N}return tn.cancel=en,tn.flush=Ft,tn}var QF=Ie(function(s,a){return Zf(s,1,a)}),eO=Ie(function(s,a,u){return Zf(s,dn(a)||0,u)});function tO(s){return rr(s,Z)}function Ga(s,a){if(typeof s!="function"||a!=null&&typeof a!="function")throw new on(c);var u=function(){var f=arguments,g=a?a.apply(this,f):f[0],_=u.cache;if(_.has(g))return _.get(g);var N=s.apply(this,f);return u.cache=_.set(g,N)||_,N};return u.cache=new(Ga.Cache||tr),u}Ga.Cache=tr;function $a(s){if(typeof s!="function")throw new on(c);return function(){var a=arguments;switch(a.length){case 0:return!s.call(this);case 1:return!s.call(this,a[0]);case 2:return!s.call(this,a[0],a[1]);case 3:return!s.call(this,a[0],a[1],a[2])}return!s.apply(this,a)}}function nO(s){return Ym(2,s)}var rO=UD(function(s,a){a=a.length==1&&Ne(a[0])?tt(a[0],Yt(ge())):tt(wt(a,1),Yt(ge()));var u=a.length;return Ie(function(f){for(var g=-1,_=Tt(f.length,u);++g<_;)f[g]=a[g].call(this,f[g]);return Xt(s,this,f)})}),Td=Ie(function(s,a){var u=Vr(a,Ho(Td));return rr(s,A,n,a,u)}),ng=Ie(function(s,a){var u=Vr(a,Ho(ng));return rr(s,U,n,a,u)}),oO=or(function(s,a){return rr(s,$,n,n,n,a)});function iO(s,a){if(typeof s!="function")throw new on(c);return a=a===n?a:Be(a),Ie(s,a)}function sO(s,a){if(typeof s!="function")throw new on(c);return a=a==null?0:mt(Be(a),0),Ie(function(u){var f=u[a],g=Ir(u,0,a);return f&&Ar(g,f),Xt(s,this,g)})}function aO(s,a,u){var f=!0,g=!0;if(typeof s!="function")throw new on(c);return ot(u)&&(f="leading"in u?!!u.leading:f,g="trailing"in u?!!u.trailing:g),tg(s,a,{leading:f,maxWait:a,trailing:g})}function lO(s){return Xm(s,1)}function cO(s,a){return Td(ud(a),s)}function dO(){if(!arguments.length)return[];var s=arguments[0];return Ne(s)?s:[s]}function uO(s){return an(s,w)}function pO(s,a){return a=typeof a=="function"?a:n,an(s,w,a)}function hO(s){return an(s,y|w)}function fO(s,a){return a=typeof a=="function"?a:n,an(s,y|w,a)}function mO(s,a){return a==null||Uf(s,a,_t(a))}function Pn(s,a){return s===a||s!==s&&a!==a}var gO=Ra(Qc),yO=Ra(function(s,a){return s>=a}),ao=Kf(function(){return arguments}())?Kf:function(s){return it(s)&&qe.call(s,"callee")&&!If.call(s,"callee")},Ne=z.isArray,vO=gf?Yt(gf):ED;function Gt(s){return s!=null&&za(s.length)&&!sr(s)}function at(s){return it(s)&&Gt(s)}function _O(s){return s===!0||s===!1||it(s)&&Dt(s)==Zi}var Fr=RR||Ld,CO=yf?Yt(yf):TD;function wO(s){return it(s)&&s.nodeType===1&&!us(s)}function bO(s){if(s==null)return!0;if(Gt(s)&&(Ne(s)||typeof s=="string"||typeof s.splice=="function"||Fr(s)||qo(s)||ao(s)))return!s.length;var a=Nt(s);if(a==Nn||a==An)return!s.size;if(cs(s))return!nd(s).length;for(var u in s)if(qe.call(s,u))return!1;return!0}function xO(s,a){return ss(s,a)}function kO(s,a,u){u=typeof u=="function"?u:n;var f=u?u(s,a):n;return f===n?ss(s,a,n,u):!!f}function Nd(s){if(!it(s))return!1;var a=Dt(s);return a==ea||a==HB||typeof s.message=="string"&&typeof s.name=="string"&&!us(s)}function SO(s){return typeof s=="number"&&Of(s)}function sr(s){if(!ot(s))return!1;var a=Dt(s);return a==ta||a==Uh||a==WB||a==KB}function rg(s){return typeof s=="number"&&s==Be(s)}function za(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=K}function ot(s){var a=typeof s;return s!=null&&(a=="object"||a=="function")}function it(s){return s!=null&&typeof s=="object"}var og=vf?Yt(vf):AD;function EO(s,a){return s===a||td(s,a,vd(a))}function TO(s,a,u){return u=typeof u=="function"?u:n,td(s,a,vd(a),u)}function NO(s){return ig(s)&&s!=+s}function AO(s){if(pI(s))throw new Te(l);return Xf(s)}function VO(s){return s===null}function BO(s){return s==null}function ig(s){return typeof s=="number"||it(s)&&Dt(s)==Wi}function us(s){if(!it(s)||Dt(s)!=Qn)return!1;var a=ma(s);if(a===null)return!0;var u=qe.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&ua.call(u)==TR}var Ad=_f?Yt(_f):VD;function PO(s){return rg(s)&&s>=-K&&s<=K}var sg=Cf?Yt(Cf):BD;function Ua(s){return typeof s=="string"||!Ne(s)&&it(s)&&Dt(s)==qi}function Qt(s){return typeof s=="symbol"||it(s)&&Dt(s)==na}var qo=wf?Yt(wf):PD;function RO(s){return s===n}function DO(s){return it(s)&&Nt(s)==Ki}function IO(s){return it(s)&&Dt(s)==YB}var FO=Ra(rd),OO=Ra(function(s,a){return s<=a});function ag(s){if(!s)return[];if(Gt(s))return Ua(s)?Vn(s):Mt(s);if(Ji&&s[Ji])return mR(s[Ji]());var a=Nt(s),u=a==Nn?Zc:a==An?la:Ko;return u(s)}function ar(s){if(!s)return s===0?s:0;if(s=dn(s),s===H||s===-H){var a=s<0?-1:1;return a*ne}return s===s?s:0}function Be(s){var a=ar(s),u=a%1;return a===a?u?a-u:a:0}function lg(s){return s?ro(Be(s),0,ke):0}function dn(s){if(typeof s=="number")return s;if(Qt(s))return de;if(ot(s)){var a=typeof s.valueOf=="function"?s.valueOf():s;s=ot(a)?a+"":a}if(typeof s!="string")return s===0?s:+s;s=Tf(s);var u=vP.test(s);return u||CP.test(s)?JP(s.slice(2),u?2:8):yP.test(s)?de:+s}function cg(s){return jn(s,$t(s))}function LO(s){return s?ro(Be(s),-K,K):s===0?s:0}function He(s){return s==null?"":Jt(s)}var MO=jo(function(s,a){if(cs(a)||Gt(a)){jn(a,_t(a),s);return}for(var u in a)qe.call(a,u)&&rs(s,u,a[u])}),dg=jo(function(s,a){jn(a,$t(a),s)}),Za=jo(function(s,a,u,f){jn(a,$t(a),s,f)}),GO=jo(function(s,a,u,f){jn(a,_t(a),s,f)}),$O=or(Xc);function zO(s,a){var u=Zo(s);return a==null?u:zf(u,a)}var UO=Ie(function(s,a){s=Xe(s);var u=-1,f=a.length,g=f>2?a[2]:n;for(g&&It(a[0],a[1],g)&&(f=1);++u<f;)for(var _=a[u],N=$t(_),V=-1,I=N.length;++V<I;){var X=N[V],Y=s[X];(Y===n||Pn(Y,$o[X])&&!qe.call(s,X))&&(s[X]=_[X])}return s}),ZO=Ie(function(s){return s.push(n,Tm),Xt(ug,n,s)});function jO(s,a){return xf(s,ge(a,3),Zn)}function WO(s,a){return xf(s,ge(a,3),Jc)}function HO(s,a){return s==null?s:Yc(s,ge(a,3),$t)}function qO(s,a){return s==null?s:Hf(s,ge(a,3),$t)}function KO(s,a){return s&&Zn(s,ge(a,3))}function XO(s,a){return s&&Jc(s,ge(a,3))}function YO(s){return s==null?[]:Sa(s,_t(s))}function JO(s){return s==null?[]:Sa(s,$t(s))}function Vd(s,a,u){var f=s==null?n:oo(s,a);return f===n?u:f}function QO(s,a){return s!=null&&Vm(s,a,bD)}function Bd(s,a){return s!=null&&Vm(s,a,xD)}var eL=bm(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=pa.call(a)),s[a]=u},Rd(zt)),tL=bm(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=pa.call(a)),qe.call(s,a)?s[a].push(u):s[a]=[u]},ge),nL=Ie(is);function _t(s){return Gt(s)?Gf(s):nd(s)}function $t(s){return Gt(s)?Gf(s,!0):RD(s)}function rL(s,a){var u={};return a=ge(a,3),Zn(s,function(f,g,_){nr(u,a(f,g,_),f)}),u}function oL(s,a){var u={};return a=ge(a,3),Zn(s,function(f,g,_){nr(u,g,a(f,g,_))}),u}var iL=jo(function(s,a,u){Ea(s,a,u)}),ug=jo(function(s,a,u,f){Ea(s,a,u,f)}),sL=or(function(s,a){var u={};if(s==null)return u;var f=!1;a=tt(a,function(_){return _=Dr(_,s),f||(f=_.length>1),_}),jn(s,gd(s),u),f&&(u=an(u,y|x|w,eI));for(var g=a.length;g--;)ld(u,a[g]);return u});function aL(s,a){return pg(s,$a(ge(a)))}var lL=or(function(s,a){return s==null?{}:ID(s,a)});function pg(s,a){if(s==null)return{};var u=tt(gd(s),function(f){return[f]});return a=ge(a),rm(s,u,function(f,g){return a(f,g[0])})}function cL(s,a,u){a=Dr(a,s);var f=-1,g=a.length;for(g||(g=1,s=n);++f<g;){var _=s==null?n:s[Wn(a[f])];_===n&&(f=g,_=u),s=sr(_)?_.call(s):_}return s}function dL(s,a,u){return s==null?s:as(s,a,u)}function uL(s,a,u,f){return f=typeof f=="function"?f:n,s==null?s:as(s,a,u,f)}var hg=Sm(_t),fg=Sm($t);function pL(s,a,u){var f=Ne(s),g=f||Fr(s)||qo(s);if(a=ge(a,4),u==null){var _=s&&s.constructor;g?u=f?new _:[]:ot(s)?u=sr(_)?Zo(ma(s)):{}:u={}}return(g?rn:Zn)(s,function(N,V,I){return a(u,N,V,I)}),u}function hL(s,a){return s==null?!0:ld(s,a)}function fL(s,a,u){return s==null?s:lm(s,a,ud(u))}function mL(s,a,u,f){return f=typeof f=="function"?f:n,s==null?s:lm(s,a,ud(u),f)}function Ko(s){return s==null?[]:Uc(s,_t(s))}function gL(s){return s==null?[]:Uc(s,$t(s))}function yL(s,a,u){return u===n&&(u=a,a=n),u!==n&&(u=dn(u),u=u===u?u:0),a!==n&&(a=dn(a),a=a===a?a:0),ro(dn(s),a,u)}function vL(s,a,u){return a=ar(a),u===n?(u=a,a=0):u=ar(u),s=dn(s),kD(s,a,u)}function _L(s,a,u){if(u&&typeof u!="boolean"&&It(s,a,u)&&(a=u=n),u===n&&(typeof a=="boolean"?(u=a,a=n):typeof s=="boolean"&&(u=s,s=n)),s===n&&a===n?(s=0,a=1):(s=ar(s),a===n?(a=s,s=0):a=ar(a)),s>a){var f=s;s=a,a=f}if(u||s%1||a%1){var g=Lf();return Tt(s+g*(a-s+YP("1e-"+((g+"").length-1))),a)}return id(s,a)}var CL=Wo(function(s,a,u){return a=a.toLowerCase(),s+(u?mg(a):a)});function mg(s){return Pd(He(s).toLowerCase())}function gg(s){return s=He(s),s&&s.replace(bP,dR).replace($P,"")}function wL(s,a,u){s=He(s),a=Jt(a);var f=s.length;u=u===n?f:ro(Be(u),0,f);var g=u;return u-=a.length,u>=0&&s.slice(u,g)==a}function bL(s){return s=He(s),s&&nP.test(s)?s.replace(Wh,uR):s}function xL(s){return s=He(s),s&&lP.test(s)?s.replace(Tc,"\\$&"):s}var kL=Wo(function(s,a,u){return s+(u?"-":"")+a.toLowerCase()}),SL=Wo(function(s,a,u){return s+(u?" ":"")+a.toLowerCase()}),EL=_m("toLowerCase");function TL(s,a,u){s=He(s),a=Be(a);var f=a?Mo(s):0;if(!a||f>=a)return s;var g=(a-f)/2;return Pa(_a(g),u)+s+Pa(va(g),u)}function NL(s,a,u){s=He(s),a=Be(a);var f=a?Mo(s):0;return a&&f<a?s+Pa(a-f,u):s}function AL(s,a,u){s=He(s),a=Be(a);var f=a?Mo(s):0;return a&&f<a?Pa(a-f,u)+s:s}function VL(s,a,u){return u||a==null?a=0:a&&(a=+a),OR(He(s).replace(Nc,""),a||0)}function BL(s,a,u){return(u?It(s,a,u):a===n)?a=1:a=Be(a),sd(He(s),a)}function PL(){var s=arguments,a=He(s[0]);return s.length<3?a:a.replace(s[1],s[2])}var RL=Wo(function(s,a,u){return s+(u?"_":"")+a.toLowerCase()});function DL(s,a,u){return u&&typeof u!="number"&&It(s,a,u)&&(a=u=n),u=u===n?ke:u>>>0,u?(s=He(s),s&&(typeof a=="string"||a!=null&&!Ad(a))&&(a=Jt(a),!a&&Lo(s))?Ir(Vn(s),0,u):s.split(a,u)):[]}var IL=Wo(function(s,a,u){return s+(u?" ":"")+Pd(a)});function FL(s,a,u){return s=He(s),u=u==null?0:ro(Be(u),0,s.length),a=Jt(a),s.slice(u,u+a.length)==a}function OL(s,a,u){var f=v.templateSettings;u&&It(s,a,u)&&(a=n),s=He(s),a=Za({},a,f,Em);var g=Za({},a.imports,f.imports,Em),_=_t(g),N=Uc(g,_),V,I,X=0,Y=a.interpolate||ra,Q="__p += '",oe=jc((a.escape||ra).source+"|"+Y.source+"|"+(Y===Hh?gP:ra).source+"|"+(a.evaluate||ra).source+"|$","g"),pe="//# sourceURL="+(qe.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++WP+"]")+`
|
|
75
|
-
`;s.replace(
|
|
74
|
+
`)}function lI(s){return Ne(s)||ao(s)||!!(Of&&s&&s[Of])}function ir(s,a){var u=typeof s;return a=a??q,!!a&&(u=="number"||u!="symbol"&&CP.test(s))&&s>-1&&s%1==0&&s<a}function It(s,a,u){if(!ot(u))return!1;var f=typeof a;return(f=="number"?Gt(u)&&ir(a,u.length):f=="string"&&a in u)?Pn(u[a],s):!1}function Cd(s,a){if(Ne(s))return!1;var u=typeof s;return u=="number"||u=="symbol"||u=="boolean"||s==null||Qt(s)?!0:iP.test(s)||!oP.test(s)||a!=null&&s in Xe(a)}function cI(s){var a=typeof s;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?s!=="__proto__":s===null}function wd(s){var a=Da(s),u=v[a];if(typeof u!="function"||!(a in Oe.prototype))return!1;if(s===u)return!0;var f=yd(u);return!!f&&s===f[0]}function dI(s){return!!Rf&&Rf in s}var uI=da?sr:Ld;function cs(s){var a=s&&s.constructor,u=typeof a=="function"&&a.prototype||$o;return s===u}function Rm(s){return s===s&&!ot(s)}function Dm(s,a){return function(u){return u==null?!1:u[s]===a&&(a!==n||s in Xe(u))}}function pI(s){var a=Ga(s,function(f){return u.size===h&&u.clear(),f}),u=a.cache;return a}function hI(s,a){var u=s[1],f=a[1],g=u|f,_=g<($|b|ne),N=f==ne&&u==F||f==ne&&u==H&&s[7].length<=a[8]||f==(ne|H)&&a[7].length<=a[8]&&u==F;if(!(_||N))return s;f&$&&(s[2]=a[2],g|=u&$?0:R);var B=a[3];if(B){var I=s[3];s[3]=I?gm(I,B,a[4]):B,s[4]=I?Vr(s[3],m):a[4]}return B=a[5],B&&(I=s[5],s[5]=I?ym(I,B,a[6]):B,s[6]=I?Vr(s[5],m):a[6]),B=a[7],B&&(s[7]=B),f&ne&&(s[8]=s[8]==null?a[8]:Tt(s[8],a[8])),s[9]==null&&(s[9]=a[9]),s[0]=a[0],s[1]=g,s}function fI(s){var a=[];if(s!=null)for(var u in Xe(s))a.push(u);return a}function mI(s){return pa.call(s)}function Im(s,a,u){return a=mt(a===n?s.length-1:a,0),function(){for(var f=arguments,g=-1,_=mt(f.length-a,0),N=U(_);++g<_;)N[g]=f[a+g];g=-1;for(var B=U(a+1);++g<a;)B[g]=f[g];return B[a]=u(N),Xt(s,this,B)}}function Fm(s,a){return a.length<2?s:oo(s,ln(a,0,-1))}function gI(s,a){for(var u=s.length,f=Tt(a.length,u),g=Mt(s);f--;){var _=a[f];s[f]=ir(_,u)?g[_]:n}return s}function bd(s,a){if(!(a==="constructor"&&typeof s[a]=="function")&&a!="__proto__")return s[a]}var Om=Mm(sm),ds=BR||function(s,a){return Ct.setTimeout(s,a)},xd=Mm(MD);function Lm(s,a,u){var f=a+"";return xd(s,aI(f,yI(oI(f),u)))}function Mm(s){var a=0,u=0;return function(){var f=IR(),g=A-(f-u);if(u=f,g>0){if(++a>=Q)return arguments[0]}else a=0;return s.apply(n,arguments)}}function Fa(s,a){var u=-1,f=s.length,g=f-1;for(a=a===n?f:a;++u<a;){var _=id(u,g),N=s[_];s[_]=s[u],s[u]=N}return s.length=a,s}var Gm=pI(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace(sP,function(u,f,g,_){a.push(g?_.replace(fP,"$1"):f||u)}),a});function jn(s){if(typeof s=="string"||Qt(s))return s;var a=s+"";return a=="0"&&1/s==-W?"-0":a}function so(s){if(s!=null){try{return ua.call(s)}catch{}try{return s+""}catch{}}return""}function yI(s,a){return rn(ht,function(u){var f="_."+u[0];a&u[1]&&!sa(s,f)&&s.push(f)}),s.sort()}function $m(s){if(s instanceof Oe)return s.clone();var a=new sn(s.__wrapped__,s.__chain__);return a.__actions__=Mt(s.__actions__),a.__index__=s.__index__,a.__values__=s.__values__,a}function vI(s,a,u){(u?It(s,a,u):a===n)?a=1:a=mt(Be(a),0);var f=s==null?0:s.length;if(!f||a<1)return[];for(var g=0,_=0,N=U(va(f/a));g<f;)N[_++]=ln(s,g,g+=a);return N}function _I(s){for(var a=-1,u=s==null?0:s.length,f=0,g=[];++a<u;){var _=s[a];_&&(g[f++]=_)}return g}function CI(){var s=arguments.length;if(!s)return[];for(var a=U(s-1),u=arguments[0],f=s;f--;)a[f-1]=arguments[f];return Ar(Ne(u)?Mt(u):[u],wt(a,1))}var wI=Ie(function(s,a){return at(s)?os(s,wt(a,1,at,!0)):[]}),bI=Ie(function(s,a){var u=cn(a);return at(u)&&(u=n),at(s)?os(s,wt(a,1,at,!0),ge(u,2)):[]}),xI=Ie(function(s,a){var u=cn(a);return at(u)&&(u=n),at(s)?os(s,wt(a,1,at,!0),n,u):[]});function kI(s,a,u){var f=s==null?0:s.length;return f?(a=u||a===n?1:Be(a),ln(s,a<0?0:a,f)):[]}function SI(s,a,u){var f=s==null?0:s.length;return f?(a=u||a===n?1:Be(a),a=f-a,ln(s,0,a<0?0:a)):[]}function EI(s,a){return s&&s.length?Na(s,ge(a,3),!0,!0):[]}function TI(s,a){return s&&s.length?Na(s,ge(a,3),!0):[]}function NI(s,a,u,f){var g=s==null?0:s.length;return g?(u&&typeof u!="number"&&It(s,a,u)&&(u=0,f=g),CD(s,a,u,f)):[]}function zm(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=u==null?0:Be(u);return g<0&&(g=mt(f+g,0)),aa(s,ge(a,3),g)}function Um(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=f-1;return u!==n&&(g=Be(u),g=u<0?mt(f+g,0):Tt(g,f-1)),aa(s,ge(a,3),g,!0)}function Zm(s){var a=s==null?0:s.length;return a?wt(s,1):[]}function AI(s){var a=s==null?0:s.length;return a?wt(s,W):[]}function VI(s,a){var u=s==null?0:s.length;return u?(a=a===n?1:Be(a),wt(s,a)):[]}function BI(s){for(var a=-1,u=s==null?0:s.length,f={};++a<u;){var g=s[a];f[g[0]]=g[1]}return f}function Wm(s){return s&&s.length?s[0]:n}function PI(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=u==null?0:Be(u);return g<0&&(g=mt(f+g,0)),Oo(s,a,g)}function RI(s){var a=s==null?0:s.length;return a?ln(s,0,-1):[]}var DI=Ie(function(s){var a=tt(s,dd);return a.length&&a[0]===s[0]?ed(a):[]}),II=Ie(function(s){var a=cn(s),u=tt(s,dd);return a===cn(u)?a=n:u.pop(),u.length&&u[0]===s[0]?ed(u,ge(a,2)):[]}),FI=Ie(function(s){var a=cn(s),u=tt(s,dd);return a=typeof a=="function"?a:n,a&&u.pop(),u.length&&u[0]===s[0]?ed(u,n,a):[]});function OI(s,a){return s==null?"":RR.call(s,a)}function cn(s){var a=s==null?0:s.length;return a?s[a-1]:n}function LI(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=f;return u!==n&&(g=Be(u),g=g<0?mt(f+g,0):Tt(g,f-1)),a===a?yR(s,a,g):aa(s,Sf,g,!0)}function MI(s,a){return s&&s.length?nm(s,Be(a)):n}var GI=Ie(jm);function jm(s,a){return s&&s.length&&a&&a.length?od(s,a):s}function $I(s,a,u){return s&&s.length&&a&&a.length?od(s,a,ge(u,2)):s}function zI(s,a,u){return s&&s.length&&a&&a.length?od(s,a,n,u):s}var UI=or(function(s,a){var u=s==null?0:s.length,f=Xc(s,a);return im(s,tt(a,function(g){return ir(g,u)?+g:g}).sort(mm)),f});function ZI(s,a){var u=[];if(!(s&&s.length))return u;var f=-1,g=[],_=s.length;for(a=ge(a,3);++f<_;){var N=s[f];a(N,f,s)&&(u.push(N),g.push(f))}return im(s,g),u}function kd(s){return s==null?s:OR.call(s)}function WI(s,a,u){var f=s==null?0:s.length;return f?(u&&typeof u!="number"&&It(s,a,u)?(a=0,u=f):(a=a==null?0:Be(a),u=u===n?f:Be(u)),ln(s,a,u)):[]}function jI(s,a){return Ta(s,a)}function HI(s,a,u){return ad(s,a,ge(u,2))}function qI(s,a){var u=s==null?0:s.length;if(u){var f=Ta(s,a);if(f<u&&Pn(s[f],a))return f}return-1}function KI(s,a){return Ta(s,a,!0)}function XI(s,a,u){return ad(s,a,ge(u,2),!0)}function YI(s,a){var u=s==null?0:s.length;if(u){var f=Ta(s,a,!0)-1;if(Pn(s[f],a))return f}return-1}function JI(s){return s&&s.length?am(s):[]}function QI(s,a){return s&&s.length?am(s,ge(a,2)):[]}function eF(s){var a=s==null?0:s.length;return a?ln(s,1,a):[]}function tF(s,a,u){return s&&s.length?(a=u||a===n?1:Be(a),ln(s,0,a<0?0:a)):[]}function nF(s,a,u){var f=s==null?0:s.length;return f?(a=u||a===n?1:Be(a),a=f-a,ln(s,a<0?0:a,f)):[]}function rF(s,a){return s&&s.length?Na(s,ge(a,3),!1,!0):[]}function oF(s,a){return s&&s.length?Na(s,ge(a,3)):[]}var iF=Ie(function(s){return Rr(wt(s,1,at,!0))}),sF=Ie(function(s){var a=cn(s);return at(a)&&(a=n),Rr(wt(s,1,at,!0),ge(a,2))}),aF=Ie(function(s){var a=cn(s);return a=typeof a=="function"?a:n,Rr(wt(s,1,at,!0),n,a)});function lF(s){return s&&s.length?Rr(s):[]}function cF(s,a){return s&&s.length?Rr(s,ge(a,2)):[]}function dF(s,a){return a=typeof a=="function"?a:n,s&&s.length?Rr(s,n,a):[]}function Sd(s){if(!(s&&s.length))return[];var a=0;return s=Nr(s,function(u){if(at(u))return a=mt(u.length,a),!0}),zc(a,function(u){return tt(s,Mc(u))})}function Hm(s,a){if(!(s&&s.length))return[];var u=Sd(s);return a==null?u:tt(u,function(f){return Xt(a,n,f)})}var uF=Ie(function(s,a){return at(s)?os(s,a):[]}),pF=Ie(function(s){return cd(Nr(s,at))}),hF=Ie(function(s){var a=cn(s);return at(a)&&(a=n),cd(Nr(s,at),ge(a,2))}),fF=Ie(function(s){var a=cn(s);return a=typeof a=="function"?a:n,cd(Nr(s,at),n,a)}),mF=Ie(Sd);function gF(s,a){return um(s||[],a||[],rs)}function yF(s,a){return um(s||[],a||[],as)}var vF=Ie(function(s){var a=s.length,u=a>1?s[a-1]:n;return u=typeof u=="function"?(s.pop(),u):n,Hm(s,u)});function qm(s){var a=v(s);return a.__chain__=!0,a}function _F(s,a){return a(s),s}function Oa(s,a){return a(s)}var CF=or(function(s){var a=s.length,u=a?s[0]:0,f=this.__wrapped__,g=function(_){return Xc(_,s)};return a>1||this.__actions__.length||!(f instanceof Oe)||!ir(u)?this.thru(g):(f=f.slice(u,+u+(a?1:0)),f.__actions__.push({func:Oa,args:[g],thisArg:n}),new sn(f,this.__chain__).thru(function(_){return a&&!_.length&&_.push(n),_}))});function wF(){return qm(this)}function bF(){return new sn(this.value(),this.__chain__)}function xF(){this.__values__===n&&(this.__values__=lg(this.value()));var s=this.__index__>=this.__values__.length,a=s?n:this.__values__[this.__index__++];return{done:s,value:a}}function kF(){return this}function SF(s){for(var a,u=this;u instanceof ba;){var f=$m(u);f.__index__=0,f.__values__=n,a?g.__wrapped__=f:a=f;var g=f;u=u.__wrapped__}return g.__wrapped__=s,a}function EF(){var s=this.__wrapped__;if(s instanceof Oe){var a=s;return this.__actions__.length&&(a=new Oe(this)),a=a.reverse(),a.__actions__.push({func:Oa,args:[kd],thisArg:n}),new sn(a,this.__chain__)}return this.thru(kd)}function TF(){return dm(this.__wrapped__,this.__actions__)}var NF=Aa(function(s,a,u){qe.call(s,u)?++s[u]:nr(s,u,1)});function AF(s,a,u){var f=Ne(s)?xf:_D;return u&&It(s,a,u)&&(a=n),f(s,ge(a,3))}function VF(s,a){var u=Ne(s)?Nr:Hf;return u(s,ge(a,3))}var BF=wm(zm),PF=wm(Um);function RF(s,a){return wt(La(s,a),1)}function DF(s,a){return wt(La(s,a),W)}function IF(s,a,u){return u=u===n?1:Be(u),wt(La(s,a),u)}function Km(s,a){var u=Ne(s)?rn:Pr;return u(s,ge(a,3))}function Xm(s,a){var u=Ne(s)?eR:jf;return u(s,ge(a,3))}var FF=Aa(function(s,a,u){qe.call(s,u)?s[u].push(a):nr(s,u,[a])});function OF(s,a,u,f){s=Gt(s)?s:Ko(s),u=u&&!f?Be(u):0;var g=s.length;return u<0&&(u=mt(g+u,0)),Ua(s)?u<=g&&s.indexOf(a,u)>-1:!!g&&Oo(s,a,u)>-1}var LF=Ie(function(s,a,u){var f=-1,g=typeof a=="function",_=Gt(s)?U(s.length):[];return Pr(s,function(N){_[++f]=g?Xt(a,N,u):is(N,a,u)}),_}),MF=Aa(function(s,a,u){nr(s,u,a)});function La(s,a){var u=Ne(s)?tt:Qf;return u(s,ge(a,3))}function GF(s,a,u,f){return s==null?[]:(Ne(a)||(a=a==null?[]:[a]),u=f?n:u,Ne(u)||(u=u==null?[]:[u]),rm(s,a,u))}var $F=Aa(function(s,a,u){s[u?0:1].push(a)},function(){return[[],[]]});function zF(s,a,u){var f=Ne(s)?Oc:Tf,g=arguments.length<3;return f(s,ge(a,4),u,g,Pr)}function UF(s,a,u){var f=Ne(s)?tR:Tf,g=arguments.length<3;return f(s,ge(a,4),u,g,jf)}function ZF(s,a){var u=Ne(s)?Nr:Hf;return u(s,$a(ge(a,3)))}function WF(s){var a=Ne(s)?zf:OD;return a(s)}function jF(s,a,u){(u?It(s,a,u):a===n)?a=1:a=Be(a);var f=Ne(s)?fD:LD;return f(s,a)}function HF(s){var a=Ne(s)?mD:GD;return a(s)}function qF(s){if(s==null)return 0;if(Gt(s))return Ua(s)?Mo(s):s.length;var a=Nt(s);return a==Nn||a==An?s.size:nd(s).length}function KF(s,a,u){var f=Ne(s)?Lc:$D;return u&&It(s,a,u)&&(a=n),f(s,ge(a,3))}var XF=Ie(function(s,a){if(s==null)return[];var u=a.length;return u>1&&It(s,a[0],a[1])?a=[]:u>2&&It(a[0],a[1],a[2])&&(a=[a[0]]),rm(s,wt(a,1),[])}),Ma=VR||function(){return Ct.Date.now()};function YF(s,a){if(typeof a!="function")throw new on(c);return s=Be(s),function(){if(--s<1)return a.apply(this,arguments)}}function Ym(s,a,u){return a=u?n:a,a=s&&a==null?s.length:a,rr(s,ne,n,n,n,n,a)}function Jm(s,a){var u;if(typeof a!="function")throw new on(c);return s=Be(s),function(){return--s>0&&(u=a.apply(this,arguments)),s<=1&&(a=n),u}}var Ed=Ie(function(s,a,u){var f=$;if(u.length){var g=Vr(u,Ho(Ed));f|=V}return rr(s,f,a,u,g)}),Qm=Ie(function(s,a,u){var f=$|b;if(u.length){var g=Vr(u,Ho(Qm));f|=V}return rr(a,f,s,u,g)});function eg(s,a,u){a=u?n:a;var f=rr(s,F,n,n,n,n,n,a);return f.placeholder=eg.placeholder,f}function tg(s,a,u){a=u?n:a;var f=rr(s,D,n,n,n,n,n,a);return f.placeholder=tg.placeholder,f}function ng(s,a,u){var f,g,_,N,B,I,K=0,X=!1,Y=!1,ie=!0;if(typeof s!="function")throw new on(c);a=dn(a)||0,ot(u)&&(X=!!u.leading,Y="maxWait"in u,_=Y?mt(dn(u.maxWait)||0,a):_,ie="trailing"in u?!!u.trailing:ie);function he(lt){var Rn=f,lr=g;return f=g=n,K=lt,N=s.apply(lr,Rn),N}function ve(lt){return K=lt,B=ds(Fe,a),X?he(lt):N}function De(lt){var Rn=lt-I,lr=lt-K,wg=a-Rn;return Y?Tt(wg,_-lr):wg}function _e(lt){var Rn=lt-I,lr=lt-K;return I===n||Rn>=a||Rn<0||Y&&lr>=_}function Fe(){var lt=Ma();if(_e(lt))return Le(lt);B=ds(Fe,De(lt))}function Le(lt){return B=n,ie&&f?he(lt):(f=g=n,N)}function en(){B!==n&&pm(B),K=0,f=I=g=B=n}function Ft(){return B===n?N:Le(Ma())}function tn(){var lt=Ma(),Rn=_e(lt);if(f=arguments,g=this,I=lt,Rn){if(B===n)return ve(I);if(Y)return pm(B),B=ds(Fe,a),he(I)}return B===n&&(B=ds(Fe,a)),N}return tn.cancel=en,tn.flush=Ft,tn}var JF=Ie(function(s,a){return Wf(s,1,a)}),QF=Ie(function(s,a,u){return Wf(s,dn(a)||0,u)});function eO(s){return rr(s,J)}function Ga(s,a){if(typeof s!="function"||a!=null&&typeof a!="function")throw new on(c);var u=function(){var f=arguments,g=a?a.apply(this,f):f[0],_=u.cache;if(_.has(g))return _.get(g);var N=s.apply(this,f);return u.cache=_.set(g,N)||_,N};return u.cache=new(Ga.Cache||tr),u}Ga.Cache=tr;function $a(s){if(typeof s!="function")throw new on(c);return function(){var a=arguments;switch(a.length){case 0:return!s.call(this);case 1:return!s.call(this,a[0]);case 2:return!s.call(this,a[0],a[1]);case 3:return!s.call(this,a[0],a[1],a[2])}return!s.apply(this,a)}}function tO(s){return Jm(2,s)}var nO=zD(function(s,a){a=a.length==1&&Ne(a[0])?tt(a[0],Yt(ge())):tt(wt(a,1),Yt(ge()));var u=a.length;return Ie(function(f){for(var g=-1,_=Tt(f.length,u);++g<_;)f[g]=a[g].call(this,f[g]);return Xt(s,this,f)})}),Td=Ie(function(s,a){var u=Vr(a,Ho(Td));return rr(s,V,n,a,u)}),rg=Ie(function(s,a){var u=Vr(a,Ho(rg));return rr(s,Z,n,a,u)}),rO=or(function(s,a){return rr(s,H,n,n,n,a)});function oO(s,a){if(typeof s!="function")throw new on(c);return a=a===n?a:Be(a),Ie(s,a)}function iO(s,a){if(typeof s!="function")throw new on(c);return a=a==null?0:mt(Be(a),0),Ie(function(u){var f=u[a],g=Ir(u,0,a);return f&&Ar(g,f),Xt(s,this,g)})}function sO(s,a,u){var f=!0,g=!0;if(typeof s!="function")throw new on(c);return ot(u)&&(f="leading"in u?!!u.leading:f,g="trailing"in u?!!u.trailing:g),ng(s,a,{leading:f,maxWait:a,trailing:g})}function aO(s){return Ym(s,1)}function lO(s,a){return Td(ud(a),s)}function cO(){if(!arguments.length)return[];var s=arguments[0];return Ne(s)?s:[s]}function dO(s){return an(s,w)}function uO(s,a){return a=typeof a=="function"?a:n,an(s,w,a)}function pO(s){return an(s,y|w)}function hO(s,a){return a=typeof a=="function"?a:n,an(s,y|w,a)}function fO(s,a){return a==null||Zf(s,a,_t(a))}function Pn(s,a){return s===a||s!==s&&a!==a}var mO=Ra(Qc),gO=Ra(function(s,a){return s>=a}),ao=Xf(function(){return arguments}())?Xf:function(s){return it(s)&&qe.call(s,"callee")&&!Ff.call(s,"callee")},Ne=U.isArray,yO=yf?Yt(yf):SD;function Gt(s){return s!=null&&za(s.length)&&!sr(s)}function at(s){return it(s)&&Gt(s)}function vO(s){return s===!0||s===!1||it(s)&&Dt(s)==Zi}var Fr=PR||Ld,_O=vf?Yt(vf):ED;function CO(s){return it(s)&&s.nodeType===1&&!us(s)}function wO(s){if(s==null)return!0;if(Gt(s)&&(Ne(s)||typeof s=="string"||typeof s.splice=="function"||Fr(s)||qo(s)||ao(s)))return!s.length;var a=Nt(s);if(a==Nn||a==An)return!s.size;if(cs(s))return!nd(s).length;for(var u in s)if(qe.call(s,u))return!1;return!0}function bO(s,a){return ss(s,a)}function xO(s,a,u){u=typeof u=="function"?u:n;var f=u?u(s,a):n;return f===n?ss(s,a,n,u):!!f}function Nd(s){if(!it(s))return!1;var a=Dt(s);return a==ea||a==jB||typeof s.message=="string"&&typeof s.name=="string"&&!us(s)}function kO(s){return typeof s=="number"&&Lf(s)}function sr(s){if(!ot(s))return!1;var a=Dt(s);return a==ta||a==Zh||a==WB||a==qB}function og(s){return typeof s=="number"&&s==Be(s)}function za(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=q}function ot(s){var a=typeof s;return s!=null&&(a=="object"||a=="function")}function it(s){return s!=null&&typeof s=="object"}var ig=_f?Yt(_f):ND;function SO(s,a){return s===a||td(s,a,vd(a))}function EO(s,a,u){return u=typeof u=="function"?u:n,td(s,a,vd(a),u)}function TO(s){return sg(s)&&s!=+s}function NO(s){if(uI(s))throw new Te(l);return Yf(s)}function AO(s){return s===null}function VO(s){return s==null}function sg(s){return typeof s=="number"||it(s)&&Dt(s)==ji}function us(s){if(!it(s)||Dt(s)!=Qn)return!1;var a=ma(s);if(a===null)return!0;var u=qe.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&ua.call(u)==ER}var Ad=Cf?Yt(Cf):AD;function BO(s){return og(s)&&s>=-q&&s<=q}var ag=wf?Yt(wf):VD;function Ua(s){return typeof s=="string"||!Ne(s)&&it(s)&&Dt(s)==qi}function Qt(s){return typeof s=="symbol"||it(s)&&Dt(s)==na}var qo=bf?Yt(bf):BD;function PO(s){return s===n}function RO(s){return it(s)&&Nt(s)==Ki}function DO(s){return it(s)&&Dt(s)==XB}var IO=Ra(rd),FO=Ra(function(s,a){return s<=a});function lg(s){if(!s)return[];if(Gt(s))return Ua(s)?Vn(s):Mt(s);if(Ji&&s[Ji])return fR(s[Ji]());var a=Nt(s),u=a==Nn?Zc:a==An?la:Ko;return u(s)}function ar(s){if(!s)return s===0?s:0;if(s=dn(s),s===W||s===-W){var a=s<0?-1:1;return a*re}return s===s?s:0}function Be(s){var a=ar(s),u=a%1;return a===a?u?a-u:a:0}function cg(s){return s?ro(Be(s),0,ke):0}function dn(s){if(typeof s=="number")return s;if(Qt(s))return ue;if(ot(s)){var a=typeof s.valueOf=="function"?s.valueOf():s;s=ot(a)?a+"":a}if(typeof s!="string")return s===0?s:+s;s=Nf(s);var u=yP.test(s);return u||_P.test(s)?YP(s.slice(2),u?2:8):gP.test(s)?ue:+s}function dg(s){return Wn(s,$t(s))}function OO(s){return s?ro(Be(s),-q,q):s===0?s:0}function He(s){return s==null?"":Jt(s)}var LO=Wo(function(s,a){if(cs(a)||Gt(a)){Wn(a,_t(a),s);return}for(var u in a)qe.call(a,u)&&rs(s,u,a[u])}),ug=Wo(function(s,a){Wn(a,$t(a),s)}),Za=Wo(function(s,a,u,f){Wn(a,$t(a),s,f)}),MO=Wo(function(s,a,u,f){Wn(a,_t(a),s,f)}),GO=or(Xc);function $O(s,a){var u=Zo(s);return a==null?u:Uf(u,a)}var zO=Ie(function(s,a){s=Xe(s);var u=-1,f=a.length,g=f>2?a[2]:n;for(g&&It(a[0],a[1],g)&&(f=1);++u<f;)for(var _=a[u],N=$t(_),B=-1,I=N.length;++B<I;){var K=N[B],X=s[K];(X===n||Pn(X,$o[K])&&!qe.call(s,K))&&(s[K]=_[K])}return s}),UO=Ie(function(s){return s.push(n,Nm),Xt(pg,n,s)});function ZO(s,a){return kf(s,ge(a,3),Zn)}function WO(s,a){return kf(s,ge(a,3),Jc)}function jO(s,a){return s==null?s:Yc(s,ge(a,3),$t)}function HO(s,a){return s==null?s:qf(s,ge(a,3),$t)}function qO(s,a){return s&&Zn(s,ge(a,3))}function KO(s,a){return s&&Jc(s,ge(a,3))}function XO(s){return s==null?[]:Sa(s,_t(s))}function YO(s){return s==null?[]:Sa(s,$t(s))}function Vd(s,a,u){var f=s==null?n:oo(s,a);return f===n?u:f}function JO(s,a){return s!=null&&Bm(s,a,wD)}function Bd(s,a){return s!=null&&Bm(s,a,bD)}var QO=xm(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=pa.call(a)),s[a]=u},Rd(zt)),eL=xm(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=pa.call(a)),qe.call(s,a)?s[a].push(u):s[a]=[u]},ge),tL=Ie(is);function _t(s){return Gt(s)?$f(s):nd(s)}function $t(s){return Gt(s)?$f(s,!0):PD(s)}function nL(s,a){var u={};return a=ge(a,3),Zn(s,function(f,g,_){nr(u,a(f,g,_),f)}),u}function rL(s,a){var u={};return a=ge(a,3),Zn(s,function(f,g,_){nr(u,g,a(f,g,_))}),u}var oL=Wo(function(s,a,u){Ea(s,a,u)}),pg=Wo(function(s,a,u,f){Ea(s,a,u,f)}),iL=or(function(s,a){var u={};if(s==null)return u;var f=!1;a=tt(a,function(_){return _=Dr(_,s),f||(f=_.length>1),_}),Wn(s,gd(s),u),f&&(u=an(u,y|x|w,QD));for(var g=a.length;g--;)ld(u,a[g]);return u});function sL(s,a){return hg(s,$a(ge(a)))}var aL=or(function(s,a){return s==null?{}:DD(s,a)});function hg(s,a){if(s==null)return{};var u=tt(gd(s),function(f){return[f]});return a=ge(a),om(s,u,function(f,g){return a(f,g[0])})}function lL(s,a,u){a=Dr(a,s);var f=-1,g=a.length;for(g||(g=1,s=n);++f<g;){var _=s==null?n:s[jn(a[f])];_===n&&(f=g,_=u),s=sr(_)?_.call(s):_}return s}function cL(s,a,u){return s==null?s:as(s,a,u)}function dL(s,a,u,f){return f=typeof f=="function"?f:n,s==null?s:as(s,a,u,f)}var fg=Em(_t),mg=Em($t);function uL(s,a,u){var f=Ne(s),g=f||Fr(s)||qo(s);if(a=ge(a,4),u==null){var _=s&&s.constructor;g?u=f?new _:[]:ot(s)?u=sr(_)?Zo(ma(s)):{}:u={}}return(g?rn:Zn)(s,function(N,B,I){return a(u,N,B,I)}),u}function pL(s,a){return s==null?!0:ld(s,a)}function hL(s,a,u){return s==null?s:cm(s,a,ud(u))}function fL(s,a,u,f){return f=typeof f=="function"?f:n,s==null?s:cm(s,a,ud(u),f)}function Ko(s){return s==null?[]:Uc(s,_t(s))}function mL(s){return s==null?[]:Uc(s,$t(s))}function gL(s,a,u){return u===n&&(u=a,a=n),u!==n&&(u=dn(u),u=u===u?u:0),a!==n&&(a=dn(a),a=a===a?a:0),ro(dn(s),a,u)}function yL(s,a,u){return a=ar(a),u===n?(u=a,a=0):u=ar(u),s=dn(s),xD(s,a,u)}function vL(s,a,u){if(u&&typeof u!="boolean"&&It(s,a,u)&&(a=u=n),u===n&&(typeof a=="boolean"?(u=a,a=n):typeof s=="boolean"&&(u=s,s=n)),s===n&&a===n?(s=0,a=1):(s=ar(s),a===n?(a=s,s=0):a=ar(a)),s>a){var f=s;s=a,a=f}if(u||s%1||a%1){var g=Mf();return Tt(s+g*(a-s+XP("1e-"+((g+"").length-1))),a)}return id(s,a)}var _L=jo(function(s,a,u){return a=a.toLowerCase(),s+(u?gg(a):a)});function gg(s){return Pd(He(s).toLowerCase())}function yg(s){return s=He(s),s&&s.replace(wP,cR).replace(GP,"")}function CL(s,a,u){s=He(s),a=Jt(a);var f=s.length;u=u===n?f:ro(Be(u),0,f);var g=u;return u-=a.length,u>=0&&s.slice(u,g)==a}function wL(s){return s=He(s),s&&tP.test(s)?s.replace(Hh,dR):s}function bL(s){return s=He(s),s&&aP.test(s)?s.replace(Tc,"\\$&"):s}var xL=jo(function(s,a,u){return s+(u?"-":"")+a.toLowerCase()}),kL=jo(function(s,a,u){return s+(u?" ":"")+a.toLowerCase()}),SL=Cm("toLowerCase");function EL(s,a,u){s=He(s),a=Be(a);var f=a?Mo(s):0;if(!a||f>=a)return s;var g=(a-f)/2;return Pa(_a(g),u)+s+Pa(va(g),u)}function TL(s,a,u){s=He(s),a=Be(a);var f=a?Mo(s):0;return a&&f<a?s+Pa(a-f,u):s}function NL(s,a,u){s=He(s),a=Be(a);var f=a?Mo(s):0;return a&&f<a?Pa(a-f,u)+s:s}function AL(s,a,u){return u||a==null?a=0:a&&(a=+a),FR(He(s).replace(Nc,""),a||0)}function VL(s,a,u){return(u?It(s,a,u):a===n)?a=1:a=Be(a),sd(He(s),a)}function BL(){var s=arguments,a=He(s[0]);return s.length<3?a:a.replace(s[1],s[2])}var PL=jo(function(s,a,u){return s+(u?"_":"")+a.toLowerCase()});function RL(s,a,u){return u&&typeof u!="number"&&It(s,a,u)&&(a=u=n),u=u===n?ke:u>>>0,u?(s=He(s),s&&(typeof a=="string"||a!=null&&!Ad(a))&&(a=Jt(a),!a&&Lo(s))?Ir(Vn(s),0,u):s.split(a,u)):[]}var DL=jo(function(s,a,u){return s+(u?" ":"")+Pd(a)});function IL(s,a,u){return s=He(s),u=u==null?0:ro(Be(u),0,s.length),a=Jt(a),s.slice(u,u+a.length)==a}function FL(s,a,u){var f=v.templateSettings;u&&It(s,a,u)&&(a=n),s=He(s),a=Za({},a,f,Tm);var g=Za({},a.imports,f.imports,Tm),_=_t(g),N=Uc(g,_),B,I,K=0,X=a.interpolate||ra,Y="__p += '",ie=Wc((a.escape||ra).source+"|"+X.source+"|"+(X===qh?mP:ra).source+"|"+(a.evaluate||ra).source+"|$","g"),he="//# sourceURL="+(qe.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++WP+"]")+`
|
|
75
|
+
`;s.replace(ie,function(_e,Fe,Le,en,Ft,tn){return Le||(Le=en),Y+=s.slice(K,tn).replace(bP,uR),Fe&&(B=!0,Y+=`' +
|
|
76
76
|
__e(`+Fe+`) +
|
|
77
|
-
'`),Ft&&(I=!0,
|
|
77
|
+
'`),Ft&&(I=!0,Y+=`';
|
|
78
78
|
`+Ft+`;
|
|
79
|
-
__p += '`),Le&&(
|
|
79
|
+
__p += '`),Le&&(Y+=`' +
|
|
80
80
|
((__t = (`+Le+`)) == null ? '' : __t) +
|
|
81
|
-
'`),
|
|
82
|
-
`;var ve=qe.call(a,"variable")&&a.variable;if(!ve)
|
|
83
|
-
`+
|
|
81
|
+
'`),K=tn+_e.length,_e}),Y+=`';
|
|
82
|
+
`;var ve=qe.call(a,"variable")&&a.variable;if(!ve)Y=`with (obj) {
|
|
83
|
+
`+Y+`
|
|
84
84
|
}
|
|
85
|
-
`;else if(
|
|
85
|
+
`;else if(hP.test(ve))throw new Te(d);Y=(I?Y.replace(YB,""):Y).replace(JB,"$1").replace(QB,"$1;"),Y="function("+(ve||"obj")+`) {
|
|
86
86
|
`+(ve?"":`obj || (obj = {});
|
|
87
|
-
`)+"var __t, __p = ''"+(
|
|
87
|
+
`)+"var __t, __p = ''"+(B?", __e = _.escape":"")+(I?`, __j = Array.prototype.join;
|
|
88
88
|
function print() { __p += __j.call(arguments, '') }
|
|
89
89
|
`:`;
|
|
90
|
-
`)+
|
|
91
|
-
}`;var De=vg(function(){return je(_,pe+"return "+Q).apply(n,N)});if(De.source=Q,Nd(De))throw De;return De}function LL(s){return He(s).toLowerCase()}function ML(s){return He(s).toUpperCase()}function GL(s,a,u){if(s=He(s),s&&(u||a===n))return Tf(s);if(!s||!(a=Jt(a)))return s;var f=Vn(s),g=Vn(a),_=Nf(f,g),N=Af(f,g)+1;return Ir(f,_,N).join("")}function $L(s,a,u){if(s=He(s),s&&(u||a===n))return s.slice(0,Bf(s)+1);if(!s||!(a=Jt(a)))return s;var f=Vn(s),g=Af(f,Vn(a))+1;return Ir(f,0,g).join("")}function zL(s,a,u){if(s=He(s),s&&(u||a===n))return s.replace(Nc,"");if(!s||!(a=Jt(a)))return s;var f=Vn(s),g=Nf(f,Vn(a));return Ir(f,g).join("")}function UL(s,a){var u=W,f=J;if(ot(a)){var g="separator"in a?a.separator:g;u="length"in a?Be(a.length):u,f="omission"in a?Jt(a.omission):f}s=He(s);var _=s.length;if(Lo(s)){var N=Vn(s);_=N.length}if(u>=_)return s;var V=u-Mo(f);if(V<1)return f;var I=N?Ir(N,0,V).join(""):s.slice(0,V);if(g===n)return I+f;if(N&&(V+=I.length-V),Ad(g)){if(s.slice(V).search(g)){var X,Y=I;for(g.global||(g=jc(g.source,He(qh.exec(g))+"g")),g.lastIndex=0;X=g.exec(Y);)var Q=X.index;I=I.slice(0,Q===n?V:Q)}}else if(s.indexOf(Jt(g),V)!=V){var oe=I.lastIndexOf(g);oe>-1&&(I=I.slice(0,oe))}return I+f}function ZL(s){return s=He(s),s&&tP.test(s)?s.replace(jh,_R):s}var jL=Wo(function(s,a,u){return s+(u?" ":"")+a.toUpperCase()}),Pd=_m("toUpperCase");function yg(s,a,u){return s=He(s),a=u?n:a,a===n?fR(s)?bR(s):iR(s):s.match(a)||[]}var vg=Ie(function(s,a){try{return Xt(s,n,a)}catch(u){return Nd(u)?u:new Te(u)}}),WL=or(function(s,a){return rn(a,function(u){u=Wn(u),nr(s,u,Ed(s[u],s))}),s});function HL(s){var a=s==null?0:s.length,u=ge();return s=a?tt(s,function(f){if(typeof f[1]!="function")throw new on(c);return[u(f[0]),f[1]]}):[],Ie(function(f){for(var g=-1;++g<a;){var _=s[g];if(Xt(_[0],this,f))return Xt(_[1],this,f)}})}function qL(s){return _D(an(s,y))}function Rd(s){return function(){return s}}function KL(s,a){return s==null||s!==s?a:s}var XL=wm(),YL=wm(!0);function zt(s){return s}function Dd(s){return Yf(typeof s=="function"?s:an(s,y))}function JL(s){return Qf(an(s,y))}function QL(s,a){return em(s,an(a,y))}var eM=Ie(function(s,a){return function(u){return is(u,s,a)}}),tM=Ie(function(s,a){return function(u){return is(s,u,a)}});function Id(s,a,u){var f=_t(a),g=Sa(a,f);u==null&&!(ot(a)&&(g.length||!f.length))&&(u=a,a=s,s=this,g=Sa(a,_t(a)));var _=!(ot(u)&&"chain"in u)||!!u.chain,N=sr(s);return rn(g,function(V){var I=a[V];s[V]=I,N&&(s.prototype[V]=function(){var X=this.__chain__;if(_||X){var Y=s(this.__wrapped__),Q=Y.__actions__=Mt(this.__actions__);return Q.push({func:I,args:arguments,thisArg:s}),Y.__chain__=X,Y}return I.apply(s,Ar([this.value()],arguments))})}),s}function nM(){return Ct._===this&&(Ct._=NR),this}function Fd(){}function rM(s){return s=Be(s),Ie(function(a){return tm(a,s)})}var oM=hd(tt),iM=hd(bf),sM=hd(Lc);function _g(s){return Cd(s)?Mc(Wn(s)):FD(s)}function aM(s){return function(a){return s==null?n:oo(s,a)}}var lM=xm(),cM=xm(!0);function Od(){return[]}function Ld(){return!1}function dM(){return{}}function uM(){return""}function pM(){return!0}function hM(s,a){if(s=Be(s),s<1||s>K)return[];var u=ke,f=Tt(s,ke);a=ge(a),s-=ke;for(var g=zc(f,a);++u<s;)a(u);return g}function fM(s){return Ne(s)?tt(s,Wn):Qt(s)?[s]:Mt(Mm(He(s)))}function mM(s){var a=++ER;return He(s)+a}var gM=Ba(function(s,a){return s+a},0),yM=fd("ceil"),vM=Ba(function(s,a){return s/a},1),_M=fd("floor");function CM(s){return s&&s.length?ka(s,zt,Qc):n}function wM(s,a){return s&&s.length?ka(s,ge(a,2),Qc):n}function bM(s){return Sf(s,zt)}function xM(s,a){return Sf(s,ge(a,2))}function kM(s){return s&&s.length?ka(s,zt,rd):n}function SM(s,a){return s&&s.length?ka(s,ge(a,2),rd):n}var EM=Ba(function(s,a){return s*a},1),TM=fd("round"),NM=Ba(function(s,a){return s-a},0);function AM(s){return s&&s.length?$c(s,zt):0}function VM(s,a){return s&&s.length?$c(s,ge(a,2)):0}return v.after=JF,v.ary=Xm,v.assign=MO,v.assignIn=dg,v.assignInWith=Za,v.assignWith=GO,v.at=$O,v.before=Ym,v.bind=Ed,v.bindAll=WL,v.bindKey=Jm,v.castArray=dO,v.chain=Hm,v.chunk=_I,v.compact=CI,v.concat=wI,v.cond=HL,v.conforms=qL,v.constant=Rd,v.countBy=AF,v.create=zO,v.curry=Qm,v.curryRight=eg,v.debounce=tg,v.defaults=UO,v.defaultsDeep=ZO,v.defer=QF,v.delay=eO,v.difference=bI,v.differenceBy=xI,v.differenceWith=kI,v.drop=SI,v.dropRight=EI,v.dropRightWhile=TI,v.dropWhile=NI,v.fill=AI,v.filter=BF,v.flatMap=DF,v.flatMapDeep=IF,v.flatMapDepth=FF,v.flatten=Um,v.flattenDeep=VI,v.flattenDepth=BI,v.flip=tO,v.flow=XL,v.flowRight=YL,v.fromPairs=PI,v.functions=YO,v.functionsIn=JO,v.groupBy=OF,v.initial=DI,v.intersection=II,v.intersectionBy=FI,v.intersectionWith=OI,v.invert=eL,v.invertBy=tL,v.invokeMap=MF,v.iteratee=Dd,v.keyBy=GF,v.keys=_t,v.keysIn=$t,v.map=La,v.mapKeys=rL,v.mapValues=oL,v.matches=JL,v.matchesProperty=QL,v.memoize=Ga,v.merge=iL,v.mergeWith=ug,v.method=eM,v.methodOf=tM,v.mixin=Id,v.negate=$a,v.nthArg=rM,v.omit=sL,v.omitBy=aL,v.once=nO,v.orderBy=$F,v.over=oM,v.overArgs=rO,v.overEvery=iM,v.overSome=sM,v.partial=Td,v.partialRight=ng,v.partition=zF,v.pick=lL,v.pickBy=pg,v.property=_g,v.propertyOf=aM,v.pull=$I,v.pullAll=jm,v.pullAllBy=zI,v.pullAllWith=UI,v.pullAt=ZI,v.range=lM,v.rangeRight=cM,v.rearg=oO,v.reject=jF,v.remove=jI,v.rest=iO,v.reverse=kd,v.sampleSize=HF,v.set=dL,v.setWith=uL,v.shuffle=qF,v.slice=WI,v.sortBy=YF,v.sortedUniq=QI,v.sortedUniqBy=eF,v.split=DL,v.spread=sO,v.tail=tF,v.take=nF,v.takeRight=rF,v.takeRightWhile=oF,v.takeWhile=iF,v.tap=CF,v.throttle=aO,v.thru=Oa,v.toArray=ag,v.toPairs=hg,v.toPairsIn=fg,v.toPath=fM,v.toPlainObject=cg,v.transform=pL,v.unary=lO,v.union=sF,v.unionBy=aF,v.unionWith=lF,v.uniq=cF,v.uniqBy=dF,v.uniqWith=uF,v.unset=hL,v.unzip=Sd,v.unzipWith=Wm,v.update=fL,v.updateWith=mL,v.values=Ko,v.valuesIn=gL,v.without=pF,v.words=yg,v.wrap=cO,v.xor=hF,v.xorBy=fF,v.xorWith=mF,v.zip=gF,v.zipObject=yF,v.zipObjectDeep=vF,v.zipWith=_F,v.entries=hg,v.entriesIn=fg,v.extend=dg,v.extendWith=Za,Id(v,v),v.add=gM,v.attempt=vg,v.camelCase=CL,v.capitalize=mg,v.ceil=yM,v.clamp=yL,v.clone=uO,v.cloneDeep=hO,v.cloneDeepWith=fO,v.cloneWith=pO,v.conformsTo=mO,v.deburr=gg,v.defaultTo=KL,v.divide=vM,v.endsWith=wL,v.eq=Pn,v.escape=bL,v.escapeRegExp=xL,v.every=VF,v.find=PF,v.findIndex=$m,v.findKey=jO,v.findLast=RF,v.findLastIndex=zm,v.findLastKey=WO,v.floor=_M,v.forEach=qm,v.forEachRight=Km,v.forIn=HO,v.forInRight=qO,v.forOwn=KO,v.forOwnRight=XO,v.get=Vd,v.gt=gO,v.gte=yO,v.has=QO,v.hasIn=Bd,v.head=Zm,v.identity=zt,v.includes=LF,v.indexOf=RI,v.inRange=vL,v.invoke=nL,v.isArguments=ao,v.isArray=Ne,v.isArrayBuffer=vO,v.isArrayLike=Gt,v.isArrayLikeObject=at,v.isBoolean=_O,v.isBuffer=Fr,v.isDate=CO,v.isElement=wO,v.isEmpty=bO,v.isEqual=xO,v.isEqualWith=kO,v.isError=Nd,v.isFinite=SO,v.isFunction=sr,v.isInteger=rg,v.isLength=za,v.isMap=og,v.isMatch=EO,v.isMatchWith=TO,v.isNaN=NO,v.isNative=AO,v.isNil=BO,v.isNull=VO,v.isNumber=ig,v.isObject=ot,v.isObjectLike=it,v.isPlainObject=us,v.isRegExp=Ad,v.isSafeInteger=PO,v.isSet=sg,v.isString=Ua,v.isSymbol=Qt,v.isTypedArray=qo,v.isUndefined=RO,v.isWeakMap=DO,v.isWeakSet=IO,v.join=LI,v.kebabCase=kL,v.last=cn,v.lastIndexOf=MI,v.lowerCase=SL,v.lowerFirst=EL,v.lt=FO,v.lte=OO,v.max=CM,v.maxBy=wM,v.mean=bM,v.meanBy=xM,v.min=kM,v.minBy=SM,v.stubArray=Od,v.stubFalse=Ld,v.stubObject=dM,v.stubString=uM,v.stubTrue=pM,v.multiply=EM,v.nth=GI,v.noConflict=nM,v.noop=Fd,v.now=Ma,v.pad=TL,v.padEnd=NL,v.padStart=AL,v.parseInt=VL,v.random=_L,v.reduce=UF,v.reduceRight=ZF,v.repeat=BL,v.replace=PL,v.result=cL,v.round=TM,v.runInContext=P,v.sample=WF,v.size=KF,v.snakeCase=RL,v.some=XF,v.sortedIndex=HI,v.sortedIndexBy=qI,v.sortedIndexOf=KI,v.sortedLastIndex=XI,v.sortedLastIndexBy=YI,v.sortedLastIndexOf=JI,v.startCase=IL,v.startsWith=FL,v.subtract=NM,v.sum=AM,v.sumBy=VM,v.template=OL,v.times=hM,v.toFinite=ar,v.toInteger=Be,v.toLength=lg,v.toLower=LL,v.toNumber=dn,v.toSafeInteger=LO,v.toString=He,v.toUpper=ML,v.trim=GL,v.trimEnd=$L,v.trimStart=zL,v.truncate=UL,v.unescape=ZL,v.uniqueId=mM,v.upperCase=jL,v.upperFirst=Pd,v.each=qm,v.eachRight=Km,v.first=Zm,Id(v,function(){var s={};return Zn(v,function(a,u){qe.call(v.prototype,u)||(s[u]=a)}),s}(),{chain:!1}),v.VERSION=o,rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){v[s].placeholder=v}),rn(["drop","take"],function(s,a){Oe.prototype[s]=function(u){u=u===n?1:mt(Be(u),0);var f=this.__filtered__&&!a?new Oe(this):this.clone();return f.__filtered__?f.__takeCount__=Tt(u,f.__takeCount__):f.__views__.push({size:Tt(u,ke),type:s+(f.__dir__<0?"Right":"")}),f},Oe.prototype[s+"Right"]=function(u){return this.reverse()[s](u).reverse()}}),rn(["filter","map","takeWhile"],function(s,a){var u=a+1,f=u==C||u==M;Oe.prototype[s]=function(g){var _=this.clone();return _.__iteratees__.push({iteratee:ge(g,3),type:u}),_.__filtered__=_.__filtered__||f,_}}),rn(["head","last"],function(s,a){var u="take"+(a?"Right":"");Oe.prototype[s]=function(){return this[u](1).value()[0]}}),rn(["initial","tail"],function(s,a){var u="drop"+(a?"":"Right");Oe.prototype[s]=function(){return this.__filtered__?new Oe(this):this[u](1)}}),Oe.prototype.compact=function(){return this.filter(zt)},Oe.prototype.find=function(s){return this.filter(s).head()},Oe.prototype.findLast=function(s){return this.reverse().find(s)},Oe.prototype.invokeMap=Ie(function(s,a){return typeof s=="function"?new Oe(this):this.map(function(u){return is(u,s,a)})}),Oe.prototype.reject=function(s){return this.filter($a(ge(s)))},Oe.prototype.slice=function(s,a){s=Be(s);var u=this;return u.__filtered__&&(s>0||a<0)?new Oe(u):(s<0?u=u.takeRight(-s):s&&(u=u.drop(s)),a!==n&&(a=Be(a),u=a<0?u.dropRight(-a):u.take(a-s)),u)},Oe.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Oe.prototype.toArray=function(){return this.take(ke)},Zn(Oe.prototype,function(s,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),f=/^(?:head|last)$/.test(a),g=v[f?"take"+(a=="last"?"Right":""):a],_=f||/^find/.test(a);g&&(v.prototype[a]=function(){var N=this.__wrapped__,V=f?[1]:arguments,I=N instanceof Oe,X=V[0],Y=I||Ne(N),Q=function(Fe){var Le=g.apply(v,Ar([Fe],V));return f&&oe?Le[0]:Le};Y&&u&&typeof X=="function"&&X.length!=1&&(I=Y=!1);var oe=this.__chain__,pe=!!this.__actions__.length,ve=_&&!oe,De=I&&!pe;if(!_&&Y){N=De?N:new Oe(this);var _e=s.apply(N,V);return _e.__actions__.push({func:Oa,args:[Q],thisArg:n}),new sn(_e,oe)}return ve&&De?s.apply(this,V):(_e=this.thru(Q),ve?f?_e.value()[0]:_e.value():_e)})}),rn(["pop","push","shift","sort","splice","unshift"],function(s){var a=ca[s],u=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",f=/^(?:pop|shift)$/.test(s);v.prototype[s]=function(){var g=arguments;if(f&&!this.__chain__){var _=this.value();return a.apply(Ne(_)?_:[],g)}return this[u](function(N){return a.apply(Ne(N)?N:[],g)})}}),Zn(Oe.prototype,function(s,a){var u=v[a];if(u){var f=u.name+"";qe.call(Uo,f)||(Uo[f]=[]),Uo[f].push({name:a,func:u})}}),Uo[Va(n,b).name]=[{name:"wrapper",func:n}],Oe.prototype.clone=ZR,Oe.prototype.reverse=jR,Oe.prototype.value=WR,v.prototype.at=wF,v.prototype.chain=bF,v.prototype.commit=xF,v.prototype.next=kF,v.prototype.plant=EF,v.prototype.reverse=TF,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=NF,v.prototype.first=v.prototype.head,Ji&&(v.prototype[Ji]=SF),v},Go=xR();Qr?((Qr.exports=Go)._=Go,Dc._=Go):Ct._=Go}).call(Xo)}($s,$s.exports);var ze=$s.exports;const $N={class:"grid-overlay-container"},Kp=r.defineComponent({__name:"PlAgOverlayLoading",props:{params:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",$N,[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))]))}}),zN={},UN={class:"grid-overlay-container"};function ZN(t,e){return r.openBlock(),r.createElementBlock("div",UN,e[0]||(e[0]=[r.createElementVNode("div",{class:"grid-icon-sad-cat"},null,-1),r.createElementVNode("span",{class:"text-subtitle-m"},"Empty",-1)]))}const Xp=Xl(zN,[["render",ZN]]);async function jN(t,e){throw Error("not implemented")}function WN(t){return t.axesSpec.filter(e=>{var n;return((n=e.annotations)==null?void 0:n["pl7.app/axisNature"])==="heterogeneous"})}function HN(t,e){const n=[];for(const o of e)if(t[o].type==="column"){const i=WN(t[o].spec);for(const l of i){if(l.type!=="String"){console.warn("heterogeneous axis with string type expected, got",l,"skipping");continue}const c=cl(l),d=t.findIndex(p=>ze.isEqual(p.id,c));if(d===-1)throw console.error("axis not found",o,c,t),Error("axis not found");n.push({columnIdx:o,axisIdx:d})}}return n}const Yp=(t,e)=>(t+e).toString();function qN(t,e,n,o,i,l){if(t.length>1)throw Error("hColumns.length > 1 is not supported");const c=t[0];let d=-1,p=-1;for(let y=0;y<l.length;++y)l[y]===c.axisIdx&&(d=y),l[y]===c.columnIdx&&(p=y);const h=(()=>{const x=o[d].data.filter(w=>w!==null);return Array.from(new Set(x))})();h.sort(),p>d?(n.splice(p,1),n.splice(d,1)):(n.splice(d,1),n.splice(p,1));const m=KN(i,o,d,p,h,e.rows);for(let y=0;y<h.length;++y){const x=h[y],w=Gr(x+"@"+y);n.push({colId:w,field:Yp(o.length,y),headerName:x,valueFormatter:Qp})}return{rowModelType:"clientSide",columnDefs:n,rowData:m}}function KN(t,e,n,o,i,l){const c=new Map;let d=0;for(let h=0;h<l;h++){const m={};for(let O=0;O<e.length;++O){if(O===n||O===o)continue;const G=t[O].toString();m[G]=e[O].data[h]}let y;const x=Gr(Object.values(m))??"";c.has(x)?y=c.get(x):(c.set(x,m),y=m,y.id=d.toString(),d++);const w=i.indexOf(e[n].data[h]);if(w===-1)throw Error("index not found");const S=Yp(e.length,w);y[S]=e[o].data[h]}return Array.from(c.values())}function XN(t){return Gr(t)}function Jp(t){return JSON.parse(t)}const Qp=t=>t?t.value===void 0?"NULL":t.value===null?"NA":t.value.toString():"ERROR";function YN(t,e,n){var i,l,c;const o=XN(e);return{colId:o,field:t.toString(),headerName:((l=(i=e.spec.annotations)==null?void 0:i["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:Qp,cellDataType:(d=>{switch(d){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${d}`)}})(e.type==="axis"?e.spec.type:e.spec.valueType)}}function eh(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 th(t){const e=[];return bs(t,n=>(e.push(n),n)),e}async function JN(t,e,n){return n.length?(await t.findColumns(e,{columnFilter:{name:["pl7.app/label"]},compatibleWith:ze.uniqWith(n.map(i=>fu(i.spec.axesSpec).map(ze.cloneDeep)).flat(),ze.isEqual),strictlyCompatible:!0})).hits.filter(i=>i.spec.axesSpec.length===1):[]}async function QN(t,e,n){const o=th(n),l=(await JN(t,e,o)).filter(c=>!ze.find(o,d=>c.columnId===d.columnId));return l.length===0?n:{type:"outer",primary:n,secondary:l.map(c=>({type:"column",column:c}))}}async function eA(t,e,n,o){const i=n.filter(m=>m.type!=="Bytes"),l=th(o),c=i.map(m=>[]),d=i.map(m=>null);for(let m=0;m<l.length;++m){const y=fu(l[m].spec.axesSpec);for(let x=0;x<y.length;++x){const w=ze.findIndex(i,S=>ze.isEqual(S,y[x]));w===-1||d[w]||(y.length===1&&l[m].spec.name==="pl7.app/label"?(c[w]=[[m,x]],d[w]=l[m].columnId):c[w].push([m,x]))}}for(let m=i.length-1;m>=0;--m)c[m].length||(d.splice(m,1),c.splice(m,1),i.splice(m,1));const p=100,h=i.map(m=>new Set);e:for(let m=i.length-1;m>=0;--m){for(const[y,x]of c[m]){const w=await t.getUniqueValues(e,{columnId:l[y].columnId,...!d[m]&&{axis:ze.cloneDeep(i[m])},filters:[],limit:p});if(w.overflow){d.splice(m,1),c.splice(m,1),i.splice(m,1);continue e}const S=w.values.type;for(const O of w.values.data)if(!(hu(O,S)||O===null)&&(h[m].add(eh(O,S)),h[m].size===p)){d.splice(m,1),c.splice(m,1),i.splice(m,1);continue e}}if(!h[m].size){d.splice(m,1),c.splice(m,1),i.splice(m,1);continue e}}return i.map((m,y)=>{const x=[...h[y]].map(S=>({value:S,label:S.toString()})),w=x[0].value;return{axis:ze.cloneDeep(m),...d[y]&&{column:d[y]},options:x,defaultValue:w}})}function tA(t,e,n,o){const i=t.length,l=[];for(let c=0;c<e[0].data.length;++c){const d=[],p=(o++).toString();for(const m of n)d.push(e[m].data[c]);const h={key:d,id:p};for(let m=0;m<i;++m){const y=t[m].toString(),x=e[m].data[c],w=e[m].type;Wy(e[m].absent,c)?h[y]=void 0:hu(x,w)||x===null?h[y]=null:h[y]=eh(x,w)}l.push(h)}return l}const nA=t=>t.type==="column"&&t.spec.axesSpec.length===1&&t.spec.name==="pl7.app/label";async function rA(t,e,n,o){const i=await t.getSpec(e);let l=i.findIndex(b=>b.type==="column");l===-1&&(l=i.length);const c=[...i.keys()].filter(b=>!ze.find(n,R=>ze.isEqual(R.axis,i[b].id)||ze.isEqual(R.column,i[b].id))).sort((b,R)=>{var A,U;if(i[b].type!==i[R].type)return i[b].type==="axis"?-1:1;const F=(A=i[b].spec.annotations)==null?void 0:A["pl7.app/table/orderPriority"],D=(U=i[R].spec.annotations)==null?void 0:U["pl7.app/table/orderPriority"];return F===void 0?D===void 0?0:1:D===void 0?-1:Number(D)-Number(F)}),d=ze.cloneDeep(c),p=HN(i,c);for(let b=c.length-1;b>=0;--b){const R=c[b];if(!nA(i[R]))continue;const F=cl(i[R].spec.axesSpec[0]),D=ze.findIndex(c,A=>ze.isEqual(i[A].id,F));if(D===-1&&ze.findIndex(n,U=>ze.isEqual(U.axis,F))===-1){console.warn(`added label column, but the axis is not in the data; axisId: ${F}`);continue}c[D]=R;for(const A of p)A.axisIdx===R&&(A.axisIdx=D);c.splice(b,1),d.splice(b,1)}const h=await t.getShape(e),m=h.rows,y=d.map(b=>YN(b,i[b],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 qN(p,h,y,await t.getData(e,c),d,c);const x=[...c],w=new Map;for(let b=0;b<l;++b)w.set(b,-1);for(let b=0;b<x.length;++b){const R=x[b];w.has(R)&&w.set(R,b)}for(const[b,R]of w)R===-1&&(w.set(b,x.length),x.push(b));const S=[];for(let b=0;b<l;++b){const R=w.get(b);if(R===void 0||R===-1)throw new Error("assertion exception");S.push(R)}let O;return{rowModelType:"serverSide",columnDefs:y,serverSideDatasource:{getRows:async b=>{try{if(m==0){b.success({rowData:[],rowCount:m}),b.api.setGridOption("loading",!1),b.api.showNoRowsOverlay();return}if(O&&!ze.isEqual(O.request.sortModel,b.request.sortModel)){O=void 0,b.api.setGridOption("loading",!0),b.success({rowData:[],rowCount:0});return}O=b;let R=0,F=[];if(m>0&&b.request.startRow!==void 0&&b.request.endRow!==void 0&&(R=Math.min(m,b.request.endRow)-b.request.startRow,R>0)){const D=await t.getData(e,x,{offset:b.request.startRow,length:R});F=tA(d,D,S,b.request.startRow)}b.success({rowData:F,rowCount:m}),b.api.autoSizeAllColumns(),b.api.setGridOption("loading",!1)}catch(R){b.api.setGridOption("loading",!0),b.fail(),console.trace(R)}}}}}const Yl=Rg(),oA=["onClick"],nh=r.defineComponent({__name:"PlAgGridColumnManager",props:{api:{}},setup(t){const e=t,{api:n}=r.toRefs(e),o=r.ref([]),i=r.ref(),l=r.ref(!1),c=r.ref(0);qp(i,{handle:".handle",onChange(p){n.value.moveColumns(p.map(h=>o.value[h]),0)}});function d(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,h)=>(r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(),r.createBlock(r.Teleport,{to:`#${r.unref(Yl)}`},[r.createVNode(r.unref(_o),{onClick:h[0]||(h[0]=r.withModifiers(m=>l.value=!l.value,["stop"]))},{append:r.withCtx(()=>[r.createVNode(r.unref(Lt),{name:"columns"})]),default:r.withCtx(()=>[h[2]||(h[2]=r.createTextVNode(" Columns "))]),_:1})],8,["to"])),r.createVNode(r.unref(Vs),{modelValue:l.value,"onUpdate:modelValue":h[1]||(h[1]=m=>l.value=m),width:"368px","close-on-outside-click":""},{title:r.withCtx(()=>h[3]||(h[3]=[r.createTextVNode("Columns")])),default:r.withCtx(()=>[(r.openBlock(),r.createElementBlock("div",{ref_key:"listRef",ref:i,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(fn),{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=>d(m)},[r.createVNode(r.unref(xt),{"close-delay":500,position:"top"},{tooltip:r.withCtx(()=>h[4]||(h[4]=[r.createTextVNode("Show/Hide")])),default:r.withCtx(()=>[r.createVNode(r.unref(Lt),{name:m.isVisible()?"view-show":"view-hide"},null,8,["name"])]),_:2},1024)],8,oA)]))),128))]))]),_:1},8,["modelValue"])]))}}),iA=["id"],sA=r.defineComponent({__name:"PlAgDataTableToolsPanel",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{id:r.unref(Yl),class:"d-flex gap-6"},[r.renderSlot(e.$slots,"default")],8,iA))}}),aA={class:"ap-ag-data-table-container"},lA={key:1,class:"ap-ag-data-table-sheets"},cA=Xl(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}){T.ModuleRegistry.registerModules([hs.ClientSideRowModelModule,jd.ClipboardModule,Zd.ServerSideRowModelModule,Wd.RangeSelectionModule,hl,Ou]);const o=r.useModel(t,"modelValue"),i=t,{settings:l}=r.toRefs(i),c=n;r.watch(()=>l.value,async(B,C)=>{if(B.sourceType!=="pframe"||!B.pFrame||!B.join||C&&C.sourceType==="pframe"&&ze.isEqual(B.pFrame,C.pFrame)&&ze.isEqual(B.join,C.join))return;const E=window.platforma;if(!E)throw Error("platforma not set");const M=E.pFrameDriver;if(!M)throw Error("platforma.pFrameDriver not set");const H=await QN(M,B.pFrame,B.join),K=o.value;K.pTableParams||(K.pTableParams={sorting:[],filters:[]}),K.pTableParams.join=H,o.value=K});const d=Ih(()=>l.value.sourceType,async B=>{var E;const C=l.value.sourceType;switch(C){case"pframe":{const M=window.platforma;if(!M)throw Error("platforma not set");const H=M.pFrameDriver;if(!H)throw Error("platforma.pFrameDriver not set");if(!l.value.pFrame)return[];const K=l.value.pFrame,ne=(E=o.value.pTableParams)==null?void 0:E.join;return ne?await eA(H,K,l.value.sheetAxes,ne):[]}case"ptable":return l.value.sheets??[];case"xsv":return[];default:throw Error(`unsupported source type: ${C}`)}});function p(B){if(!(l.value.sourceType!=="ptable"&&l.value.sourceType!=="pframe"))return(B==null?void 0:B.sortModel.map(C=>{const{spec:E,...M}=Jp(C.colId);return{column:M,ascending:C.sort==="asc",naAndAbsentAreLeastValues:!0}}))??[]}const h=r.computed({get:()=>{const B=o.value;return{columnOrder:B.gridState.columnOrder,sort:B.gridState.sort,columnVisibility:B.gridState.columnVisibility}},set:B=>{const C=o.value,E=S.value.rowModelType==="clientSide"?void 0:p(B.sort);C.gridState={...C.gridState,...B},(l.value.sourceType==="ptable"||l.value.sourceType==="pframe")&&(C.pTableParams||(C.pTableParams={sorting:[],filters:[]}),C.pTableParams.sorting=E),o.value=C}}),m=B=>Gr(B);function y(B){var C;if(!(l.value.sourceType!=="ptable"&&l.value.sourceType!=="pframe"))return((C=d.value)==null?void 0:C.map(E=>({type:"bySingleColumnV2",column:E.column?{type:"column",id:E.column}:{type:"axis",id:E.axis},predicate:{operator:"Equal",reference:B[m(E.axis)]}})))??[]}const x=r.computed({get:()=>o.value.gridState.sheets??{},set:B=>{const C=y(B),E=o.value;E.gridState.sheets=B,(l.value.sourceType==="ptable"||l.value.sourceType==="pframe")&&(E.pTableParams||(E.pTableParams={sorting:[],filters:[]}),E.pTableParams.filters=C),o.value=E}});r.watch(()=>[l.value,d.value],(B,C)=>{const[E,M]=B;if(!M)return;if(C){const[K,ne]=C;if((E.sourceType==="ptable"||E.sourceType==="pframe")&&E.sourceType===(K==null?void 0:K.sourceType)&&ze.isEqual(M,ne))return}if(E.sourceType!=="ptable"&&E.sourceType!=="pframe"){x.value={};return}const H=x.value;for(const K of M){const ne=m(K.axis);H[ne]||(H[ne]=K.defaultValue??K.options[0].value)}x.value=H},{immediate:!0});const w=r.shallowRef(),S=r.shallowRef({animateRows:!1,suppressColumnMoveAnimation:!0,cellSelection:!0,initialState:h.value,autoSizeStrategy:{type:"fitCellContents"},onRowDataUpdated:B=>{B.api.autoSizeAllColumns()},onRowDoubleClicked:B=>{B.data&&c("onRowDoubleClicked",B.data.key)},defaultColDef:{suppressHeaderMenuButton:!0},maintainColumnOrder:!0,localeText:{loadingError:"..."},rowModelType:"clientSide",maxBlocksInCache:1e3,cacheBlockSize:100,blockLoadDebounceMillis:500,serverSideSortAllLevels:!0,suppressServerSideFullWidthLoadingRow:!0,getRowId:B=>B.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0},loadingOverlayComponent:Kp,noRowsOverlayComponent:Xp,sideBar:{},defaultCsvExportParams:{allColumns:!0,suppressQuotes:!0,fileName:"table.csv"}}),O=B=>{const C=B.api;w.value=new Proxy(C,{get(E,M,H){switch(M){case"setGridOption":return(K,ne)=>{const de=S.value;de[K]=ne,S.value=de,C.setGridOption(K,ne)};case"updateGridOptions":return K=>{S.value={...S.value,...K},C.updateGridOptions(K)};default:return Reflect.get(E,M,H)}}})},G=B=>({columnOrder:B.columnOrder,sort:B.sort,columnVisibility:B.columnVisibility??(B.columnOrder?{hiddenColIds:[]}:void 0)}),b=B=>{S.value.initialState=h.value=G(B.state),B.api.autoSizeAllColumns()},R=()=>{S.value.initialState=h.value=G(w.value.getState()),w.value=void 0};let F=!1;const D=()=>{if(!F)return;const B=w.value;B!==void 0&&(B.exportDataAsCsv(),F=!1,B.setGridOption("cacheBlockSize",100))},A=()=>{if(!F)return;const B=w.value;if(B===void 0)return;const C=B.getServerSideGroupLevelState()[0];C.cacheBlockSize===C.rowCount&&B.refreshServerSide({route:C.route,purge:!1})};e({exportCsv:async()=>{const B=w.value;if(B!==void 0){if(S.value.rowModelType==="clientSide"){B.exportDataAsCsv();return}if(S.value.rowModelType==="serverSide"){const C=B.getServerSideGroupLevelState()[0];if(C.rowCount<=C.cacheBlockSize){B.exportDataAsCsv();return}F||(F=!0,B.setGridOption("cacheBlockSize",C.rowCount))}}}});const j=r.ref(0);r.watch(()=>[w.value,h.value],(B,C)=>{if(ze.isEqual(B,C))return;const[E,M]=B;if(!E)return;const H=G(E.getState());ze.isEqual(M,H)||(S.value.initialState=M,++j.value)}),r.watch(()=>S.value,(B,C)=>{var E;if(C&&(B.rowModelType!=C.rowModelType&&++j.value,!ze.isEqual(B.columnDefs,C.columnDefs)&&B.columnDefs)){const M=ne=>!("children"in ne),H=(E=B.columnDefs)==null?void 0:E.filter(M),K=H==null?void 0:H.map(ne=>ne.colId).filter(ne=>ne!==void 0).map(ne=>Jp(ne));c("columnsChanged",K??[])}});const $=(B,C)=>{var M;const E=x.value;E[B]!==C&&(E[B]=C,x.value=E,(M=w.value)==null||M.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}}))},Z=window.platforma;if(!Z)throw Error("platforma not set");const W=Z.pFrameDriver;if(!W)throw Error("platforma.pFrameDriver not set");const J=Z.blobDriver;if(!J)throw Error("platforma.blobDriver not set");let he;return r.watch(()=>[w.value,l.value,d.value],async B=>{var K,ne;const[C,E,M]=B;if(!C||ze.isEqual(E,he))return;he=E;const H=E.sourceType;switch(H){case"pframe":case"ptable":{const de=E.pTable;if(!de||!M)return C.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const ke=(ne=(K=h.value)==null?void 0:K.columnVisibility)==null?void 0:ne.hiddenColIds,Se=await rA(W,de,M,ke);return C.updateGridOptions({loading:Se.rowModelType!=="clientSide",loadingOverlayComponentParams:{notReady:!1},...Se})}case"xsv":{const de=E.xsvFile;if(!(de!=null&&de.ok)||!de.value)return C.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const ke=await jN(J,de.value);return C.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...ke})}default:throw Error(`unsupported source type: ${H}`)}}),(B,C)=>(r.openBlock(),r.createElementBlock("div",aA,[w.value&&B.showColumnsPanel?(r.openBlock(),r.createBlock(r.unref(nh),{key:0,api:w.value},null,8,["api"])):r.createCommentVNode("",!0),r.unref(d).value&&r.unref(d).value.length>0?(r.openBlock(),r.createElementBlock("div",lA,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(d).value,(E,M)=>(r.openBlock(),r.createBlock(r.unref(Cp),{key:M,"model-value":x.value[m(E.axis)],options:E.options,"onUpdate:modelValue":H=>$(m(E.axis),H)},null,8,["model-value","options","onUpdate:modelValue"]))),128))])):r.createCommentVNode("",!0),(r.openBlock(),r.createBlock(r.unref(Ag.AgGridVue),{key:j.value,theme:r.unref(Mu),class:"ap-ag-data-table-grid","grid-options":S.value,onGridReady:O,onStateUpdated:b,onGridPreDestroyed:R,onStoreRefreshed:D,onModelUpdated:A},null,8,["theme","grid-options"]))]))}}),[["__scopeId","data-v-ea0278e4"]]),dA={key:1,class:"alert-error"},uA={key:2},pA=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),i=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",dA,r.toDisplayString(o.value),1)):r.createCommentVNode("",!0),i.value?(r.openBlock(),r.createElementBlock("div",uA,"Unresolved")):r.createCommentVNode("",!0)]))}}),hA={style:{height:"100%"}},fA=r.defineComponent({__name:"PlAgCellFile",props:{params:{}},setup(t){const e=t,n=r.computed(()=>e.params.extensions),o=r.computed(()=>e.params.value);function i(c){e.params.setValue(c)}const l=r.computed(()=>e.params.resolveProgress?e.params.resolveProgress(o.value):void 0);return(c,d)=>(r.openBlock(),r.createElementBlock("div",hA,[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":i},null,8,["placeholder","extensions","model-value","progress"])]))}}),mA={class:"pl-ag-grid-open-cell d-flex"},gA={class:"pl-ag-grid-open-cell__value"},yA=r.defineComponent({__name:"PlAgTextAndButtonCell",props:{params:{}},setup(t){const e=t;function n(){if(e.params.invokeRowsOnDoubleClick){const o=e.params.api,i={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(i)}else e.params.onClick&&e.params.onClick(e.params)}return(o,i)=>(r.openBlock(),r.createElementBlock("div",mA,[r.createElementVNode("div",gA,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(fn),{name:o.params.icon??"maximize"},null,8,["name"]),r.createTextVNode(" "+r.toDisplayString(o.params.btnLabel??"Open"),1)])]))}});var Jl={exports:{}};const vA="2.0.0",rh=256,_A=Number.MAX_SAFE_INTEGER||9007199254740991,CA=16,wA=rh-6;var zs={MAX_LENGTH:rh,MAX_SAFE_COMPONENT_LENGTH:CA,MAX_SAFE_BUILD_LENGTH:wA,MAX_SAFE_INTEGER:_A,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:vA,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Us=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:i}=zs,l=Us;e=t.exports={};const c=e.re=[],d=e.safeRe=[],p=e.src=[],h=e.t={};let m=0;const y="[a-zA-Z0-9-]",x=[["\\s",1],["\\d",i],[y,o]],w=O=>{for(const[G,b]of x)O=O.split(`${G}*`).join(`${G}{0,${b}}`).split(`${G}+`).join(`${G}{1,${b}}`);return O},S=(O,G,b)=>{const R=w(G),F=m++;l(O,F,G),h[O]=F,p[F]=G,c[F]=new RegExp(G,b?"g":void 0),d[F]=new RegExp(R,b?"g":void 0)};S("NUMERICIDENTIFIER","0|[1-9]\\d*"),S("NUMERICIDENTIFIERLOOSE","\\d+"),S("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${y}*`),S("MAINVERSION",`(${p[h.NUMERICIDENTIFIER]})\\.(${p[h.NUMERICIDENTIFIER]})\\.(${p[h.NUMERICIDENTIFIER]})`),S("MAINVERSIONLOOSE",`(${p[h.NUMERICIDENTIFIERLOOSE]})\\.(${p[h.NUMERICIDENTIFIERLOOSE]})\\.(${p[h.NUMERICIDENTIFIERLOOSE]})`),S("PRERELEASEIDENTIFIER",`(?:${p[h.NUMERICIDENTIFIER]}|${p[h.NONNUMERICIDENTIFIER]})`),S("PRERELEASEIDENTIFIERLOOSE",`(?:${p[h.NUMERICIDENTIFIERLOOSE]}|${p[h.NONNUMERICIDENTIFIER]})`),S("PRERELEASE",`(?:-(${p[h.PRERELEASEIDENTIFIER]}(?:\\.${p[h.PRERELEASEIDENTIFIER]})*))`),S("PRERELEASELOOSE",`(?:-?(${p[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${p[h.PRERELEASEIDENTIFIERLOOSE]})*))`),S("BUILDIDENTIFIER",`${y}+`),S("BUILD",`(?:\\+(${p[h.BUILDIDENTIFIER]}(?:\\.${p[h.BUILDIDENTIFIER]})*))`),S("FULLPLAIN",`v?${p[h.MAINVERSION]}${p[h.PRERELEASE]}?${p[h.BUILD]}?`),S("FULL",`^${p[h.FULLPLAIN]}$`),S("LOOSEPLAIN",`[v=\\s]*${p[h.MAINVERSIONLOOSE]}${p[h.PRERELEASELOOSE]}?${p[h.BUILD]}?`),S("LOOSE",`^${p[h.LOOSEPLAIN]}$`),S("GTLT","((?:<|>)?=?)"),S("XRANGEIDENTIFIERLOOSE",`${p[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),S("XRANGEIDENTIFIER",`${p[h.NUMERICIDENTIFIER]}|x|X|\\*`),S("XRANGEPLAIN",`[v=\\s]*(${p[h.XRANGEIDENTIFIER]})(?:\\.(${p[h.XRANGEIDENTIFIER]})(?:\\.(${p[h.XRANGEIDENTIFIER]})(?:${p[h.PRERELEASE]})?${p[h.BUILD]}?)?)?`),S("XRANGEPLAINLOOSE",`[v=\\s]*(${p[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[h.XRANGEIDENTIFIERLOOSE]})(?:${p[h.PRERELEASELOOSE]})?${p[h.BUILD]}?)?)?`),S("XRANGE",`^${p[h.GTLT]}\\s*${p[h.XRANGEPLAIN]}$`),S("XRANGELOOSE",`^${p[h.GTLT]}\\s*${p[h.XRANGEPLAINLOOSE]}$`),S("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),S("COERCE",`${p[h.COERCEPLAIN]}(?:$|[^\\d])`),S("COERCEFULL",p[h.COERCEPLAIN]+`(?:${p[h.PRERELEASE]})?(?:${p[h.BUILD]})?(?:$|[^\\d])`),S("COERCERTL",p[h.COERCE],!0),S("COERCERTLFULL",p[h.COERCEFULL],!0),S("LONETILDE","(?:~>?)"),S("TILDETRIM",`(\\s*)${p[h.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",S("TILDE",`^${p[h.LONETILDE]}${p[h.XRANGEPLAIN]}$`),S("TILDELOOSE",`^${p[h.LONETILDE]}${p[h.XRANGEPLAINLOOSE]}$`),S("LONECARET","(?:\\^)"),S("CARETTRIM",`(\\s*)${p[h.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",S("CARET",`^${p[h.LONECARET]}${p[h.XRANGEPLAIN]}$`),S("CARETLOOSE",`^${p[h.LONECARET]}${p[h.XRANGEPLAINLOOSE]}$`),S("COMPARATORLOOSE",`^${p[h.GTLT]}\\s*(${p[h.LOOSEPLAIN]})$|^$`),S("COMPARATOR",`^${p[h.GTLT]}\\s*(${p[h.FULLPLAIN]})$|^$`),S("COMPARATORTRIM",`(\\s*)${p[h.GTLT]}\\s*(${p[h.LOOSEPLAIN]}|${p[h.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",S("HYPHENRANGE",`^\\s*(${p[h.XRANGEPLAIN]})\\s+-\\s+(${p[h.XRANGEPLAIN]})\\s*$`),S("HYPHENRANGELOOSE",`^\\s*(${p[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${p[h.XRANGEPLAINLOOSE]})\\s*$`),S("STAR","(<|>)?=?\\s*\\*"),S("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),S("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Jl,Jl.exports);var Gi=Jl.exports;const bA=Object.freeze({loose:!0}),xA=Object.freeze({});var Ql=t=>t?typeof t!="object"?bA:t:xA;const oh=/^[0-9]+$/,ih=(t,e)=>{const n=oh.test(t),o=oh.test(e);return n&&o&&(t=+t,e=+e),t===e?0:n&&!o?-1:o&&!n?1:t<e?-1:1};var sh={compareIdentifiers:ih,rcompareIdentifiers:(t,e)=>ih(e,t)};const Zs=Us,{MAX_LENGTH:ah,MAX_SAFE_INTEGER:js}=zs,{safeRe:lh,t:ch}=Gi,kA=Ql,{compareIdentifiers:No}=sh;var Bt=class Hn{constructor(e,n){if(n=kA(n),e instanceof Hn){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>ah)throw new TypeError(`version is longer than ${ah} characters`);Zs("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const o=e.trim().match(n.loose?lh[ch.LOOSE]:lh[ch.FULL]);if(!o)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>js||this.major<0)throw new TypeError("Invalid major version");if(this.minor>js||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>js||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const l=+i;if(l>=0&&l<js)return l}return i}):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Zs("SemVer.compare",this.version,this.options,e),!(e instanceof Hn)){if(typeof e=="string"&&e===this.version)return 0;e=new Hn(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof Hn||(e=new Hn(e,this.options)),No(this.major,e.major)||No(this.minor,e.minor)||No(this.patch,e.patch)}comparePre(e){if(e instanceof Hn||(e=new Hn(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{const o=this.prerelease[n],i=e.prerelease[n];if(Zs("prerelease compare",n,o,i),o===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(o===void 0)return-1;if(o===i)continue;return No(o,i)}while(++n)}compareBuild(e){e instanceof Hn||(e=new Hn(e,this.options));let n=0;do{const o=this.build[n],i=e.build[n];if(Zs("build compare",n,o,i),o===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(o===void 0)return-1;if(o===i)continue;return No(o,i)}while(++n)}inc(e,n,o){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,o),this.inc("pre",n,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,o),this.inc("pre",n,o);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const i=Number(o)?1:0;if(!n&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[i];else{let l=this.prerelease.length;for(;--l>=0;)typeof this.prerelease[l]=="number"&&(this.prerelease[l]++,l=-2);if(l===-1){if(n===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(n){let l=[n,i];o===!1&&(l=[n]),No(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=l):this.prerelease=l}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const dh=Bt;var Ao=(t,e,n=!1)=>{if(t instanceof dh)return t;try{return new dh(t,e)}catch(o){if(!n)return null;throw o}};const SA=Ao;var EA=(t,e)=>{const n=SA(t,e);return n?n.version:null};const TA=Ao;var NA=(t,e)=>{const n=TA(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};const uh=Bt;var AA=(t,e,n,o,i)=>{typeof n=="string"&&(i=o,o=n,n=void 0);try{return new uh(t instanceof uh?t.version:t,n).inc(e,o,i).version}catch{return null}};const ph=Ao;var VA=(t,e)=>{const n=ph(t,null,!0),o=ph(e,null,!0),i=n.compare(o);if(i===0)return null;const l=i>0,c=l?n:o,d=l?o:n,p=!!c.prerelease.length;if(!!d.prerelease.length&&!p)return!d.patch&&!d.minor?"major":c.patch?"patch":c.minor?"minor":"major";const m=p?"pre":"";return n.major!==o.major?m+"major":n.minor!==o.minor?m+"minor":n.patch!==o.patch?m+"patch":"prerelease"};const BA=Bt;var PA=(t,e)=>new BA(t,e).major;const RA=Bt;var DA=(t,e)=>new RA(t,e).minor;const IA=Bt;var FA=(t,e)=>new IA(t,e).patch;const OA=Ao;var LA=(t,e)=>{const n=OA(t,e);return n&&n.prerelease.length?n.prerelease:null};const hh=Bt;var vn=(t,e,n)=>new hh(t,n).compare(new hh(e,n));const MA=vn;var GA=(t,e,n)=>MA(e,t,n);const $A=vn;var zA=(t,e)=>$A(t,e,!0);const fh=Bt;var ec=(t,e,n)=>{const o=new fh(t,n),i=new fh(e,n);return o.compare(i)||o.compareBuild(i)};const UA=ec;var ZA=(t,e)=>t.sort((n,o)=>UA(n,o,e));const jA=ec;var WA=(t,e)=>t.sort((n,o)=>jA(o,n,e));const HA=vn;var Ws=(t,e,n)=>HA(t,e,n)>0;const qA=vn;var tc=(t,e,n)=>qA(t,e,n)<0;const KA=vn;var mh=(t,e,n)=>KA(t,e,n)===0;const XA=vn;var gh=(t,e,n)=>XA(t,e,n)!==0;const YA=vn;var nc=(t,e,n)=>YA(t,e,n)>=0;const JA=vn;var rc=(t,e,n)=>JA(t,e,n)<=0;const QA=mh,eV=gh,tV=Ws,nV=nc,rV=tc,oV=rc;var yh=(t,e,n,o)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return QA(t,n,o);case"!=":return eV(t,n,o);case">":return tV(t,n,o);case">=":return nV(t,n,o);case"<":return rV(t,n,o);case"<=":return oV(t,n,o);default:throw new TypeError(`Invalid operator: ${e}`)}};const iV=Bt,sV=Ao,{safeRe:Hs,t:qs}=Gi;var aV=(t,e)=>{if(t instanceof iV)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?Hs[qs.COERCEFULL]:Hs[qs.COERCE]);else{const p=e.includePrerelease?Hs[qs.COERCERTLFULL]:Hs[qs.COERCERTL];let h;for(;(h=p.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||h.index+h[0].length!==n.index+n[0].length)&&(n=h),p.lastIndex=h.index+h[1].length+h[2].length;p.lastIndex=-1}if(n===null)return null;const o=n[2],i=n[3]||"0",l=n[4]||"0",c=e.includePrerelease&&n[5]?`-${n[5]}`:"",d=e.includePrerelease&&n[6]?`+${n[6]}`:"";return sV(`${o}.${i}.${l}${c}${d}`,e)},lV=class{constructor(){this.max=1e3,this.map=new Map}get(e){const n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(e,n)}return this}},oc,vh;function _n(){if(vh)return oc;vh=1;const t=/\s+/g;class e{constructor(E,M){if(M=i(M),E instanceof e)return E.loose===!!M.loose&&E.includePrerelease===!!M.includePrerelease?E:new e(E.raw,M);if(E instanceof l)return this.raw=E.value,this.set=[[E]],this.formatted=void 0,this;if(this.options=M,this.loose=!!M.loose,this.includePrerelease=!!M.includePrerelease,this.raw=E.trim().replace(t," "),this.set=this.raw.split("||").map(H=>this.parseRange(H.trim())).filter(H=>H.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const H=this.set[0];if(this.set=this.set.filter(K=>!O(K[0])),this.set.length===0)this.set=[H];else if(this.set.length>1){for(const K of this.set)if(K.length===1&&G(K[0])){this.set=[K];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let E=0;E<this.set.length;E++){E>0&&(this.formatted+="||");const M=this.set[E];for(let H=0;H<M.length;H++)H>0&&(this.formatted+=" "),this.formatted+=M[H].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(E){const H=((this.options.includePrerelease&&w)|(this.options.loose&&S))+":"+E,K=o.get(H);if(K)return K;const ne=this.options.loose,de=ne?p[h.HYPHENRANGELOOSE]:p[h.HYPHENRANGE];E=E.replace(de,he(this.options.includePrerelease)),c("hyphen replace",E),E=E.replace(p[h.COMPARATORTRIM],m),c("comparator trim",E),E=E.replace(p[h.TILDETRIM],y),c("tilde trim",E),E=E.replace(p[h.CARETTRIM],x),c("caret trim",E);let ke=E.split(" ").map(Ke=>R(Ke,this.options)).join(" ").split(/\s+/).map(Ke=>J(Ke,this.options));ne&&(ke=ke.filter(Ke=>(c("loose invalid filter",Ke,this.options),!!Ke.match(p[h.COMPARATORLOOSE])))),c("range list",ke);const Se=new Map,Ze=ke.map(Ke=>new l(Ke,this.options));for(const Ke of Ze){if(O(Ke))return[Ke];Se.set(Ke.value,Ke)}Se.size>1&&Se.has("")&&Se.delete("");const ht=[...Se.values()];return o.set(H,ht),ht}intersects(E,M){if(!(E instanceof e))throw new TypeError("a Range is required");return this.set.some(H=>b(H,M)&&E.set.some(K=>b(K,M)&&H.every(ne=>K.every(de=>ne.intersects(de,M)))))}test(E){if(!E)return!1;if(typeof E=="string")try{E=new d(E,this.options)}catch{return!1}for(let M=0;M<this.set.length;M++)if(B(this.set[M],E,this.options))return!0;return!1}}oc=e;const n=lV,o=new n,i=Ql,l=Ks(),c=Us,d=Bt,{safeRe:p,t:h,comparatorTrimReplace:m,tildeTrimReplace:y,caretTrimReplace:x}=Gi,{FLAG_INCLUDE_PRERELEASE:w,FLAG_LOOSE:S}=zs,O=C=>C.value==="<0.0.0-0",G=C=>C.value==="",b=(C,E)=>{let M=!0;const H=C.slice();let K=H.pop();for(;M&&H.length;)M=H.every(ne=>K.intersects(ne,E)),K=H.pop();return M},R=(C,E)=>(c("comp",C,E),C=U(C,E),c("caret",C),C=D(C,E),c("tildes",C),C=$(C,E),c("xrange",C),C=W(C,E),c("stars",C),C),F=C=>!C||C.toLowerCase()==="x"||C==="*",D=(C,E)=>C.trim().split(/\s+/).map(M=>A(M,E)).join(" "),A=(C,E)=>{const M=E.loose?p[h.TILDELOOSE]:p[h.TILDE];return C.replace(M,(H,K,ne,de,ke)=>{c("tilde",C,H,K,ne,de,ke);let Se;return F(K)?Se="":F(ne)?Se=`>=${K}.0.0 <${+K+1}.0.0-0`:F(de)?Se=`>=${K}.${ne}.0 <${K}.${+ne+1}.0-0`:ke?(c("replaceTilde pr",ke),Se=`>=${K}.${ne}.${de}-${ke} <${K}.${+ne+1}.0-0`):Se=`>=${K}.${ne}.${de} <${K}.${+ne+1}.0-0`,c("tilde return",Se),Se})},U=(C,E)=>C.trim().split(/\s+/).map(M=>j(M,E)).join(" "),j=(C,E)=>{c("caret",C,E);const M=E.loose?p[h.CARETLOOSE]:p[h.CARET],H=E.includePrerelease?"-0":"";return C.replace(M,(K,ne,de,ke,Se)=>{c("caret",C,K,ne,de,ke,Se);let Ze;return F(ne)?Ze="":F(de)?Ze=`>=${ne}.0.0${H} <${+ne+1}.0.0-0`:F(ke)?ne==="0"?Ze=`>=${ne}.${de}.0${H} <${ne}.${+de+1}.0-0`:Ze=`>=${ne}.${de}.0${H} <${+ne+1}.0.0-0`:Se?(c("replaceCaret pr",Se),ne==="0"?de==="0"?Ze=`>=${ne}.${de}.${ke}-${Se} <${ne}.${de}.${+ke+1}-0`:Ze=`>=${ne}.${de}.${ke}-${Se} <${ne}.${+de+1}.0-0`:Ze=`>=${ne}.${de}.${ke}-${Se} <${+ne+1}.0.0-0`):(c("no pr"),ne==="0"?de==="0"?Ze=`>=${ne}.${de}.${ke}${H} <${ne}.${de}.${+ke+1}-0`:Ze=`>=${ne}.${de}.${ke}${H} <${ne}.${+de+1}.0-0`:Ze=`>=${ne}.${de}.${ke} <${+ne+1}.0.0-0`),c("caret return",Ze),Ze})},$=(C,E)=>(c("replaceXRanges",C,E),C.split(/\s+/).map(M=>Z(M,E)).join(" ")),Z=(C,E)=>{C=C.trim();const M=E.loose?p[h.XRANGELOOSE]:p[h.XRANGE];return C.replace(M,(H,K,ne,de,ke,Se)=>{c("xRange",C,H,K,ne,de,ke,Se);const Ze=F(ne),ht=Ze||F(de),Ke=ht||F(ke),Un=Ke;return K==="="&&Un&&(K=""),Se=E.includePrerelease?"-0":"",Ze?K===">"||K==="<"?H="<0.0.0-0":H="*":K&&Un?(ht&&(de=0),ke=0,K===">"?(K=">=",ht?(ne=+ne+1,de=0,ke=0):(de=+de+1,ke=0)):K==="<="&&(K="<",ht?ne=+ne+1:de=+de+1),K==="<"&&(Se="-0"),H=`${K+ne}.${de}.${ke}${Se}`):ht?H=`>=${ne}.0.0${Se} <${+ne+1}.0.0-0`:Ke&&(H=`>=${ne}.${de}.0${Se} <${ne}.${+de+1}.0-0`),c("xRange return",H),H})},W=(C,E)=>(c("replaceStars",C,E),C.trim().replace(p[h.STAR],"")),J=(C,E)=>(c("replaceGTE0",C,E),C.trim().replace(p[E.includePrerelease?h.GTE0PRE:h.GTE0],"")),he=C=>(E,M,H,K,ne,de,ke,Se,Ze,ht,Ke,Un)=>(F(H)?M="":F(K)?M=`>=${H}.0.0${C?"-0":""}`:F(ne)?M=`>=${H}.${K}.0${C?"-0":""}`:de?M=`>=${M}`:M=`>=${M}${C?"-0":""}`,F(Ze)?Se="":F(ht)?Se=`<${+Ze+1}.0.0-0`:F(Ke)?Se=`<${Ze}.${+ht+1}.0-0`:Un?Se=`<=${Ze}.${ht}.${Ke}-${Un}`:C?Se=`<${Ze}.${ht}.${+Ke+1}-0`:Se=`<=${Se}`,`${M} ${Se}`.trim()),B=(C,E,M)=>{for(let H=0;H<C.length;H++)if(!C[H].test(E))return!1;if(E.prerelease.length&&!M.includePrerelease){for(let H=0;H<C.length;H++)if(c(C[H].semver),C[H].semver!==l.ANY&&C[H].semver.prerelease.length>0){const K=C[H].semver;if(K.major===E.major&&K.minor===E.minor&&K.patch===E.patch)return!0}return!1}return!0};return oc}var ic,_h;function Ks(){if(_h)return ic;_h=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(m,y){if(y=n(y),m instanceof e){if(m.loose===!!y.loose)return m;m=m.value}m=m.trim().split(/\s+/).join(" "),c("comparator",m,y),this.options=y,this.loose=!!y.loose,this.parse(m),this.semver===t?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(m){const y=this.options.loose?o[i.COMPARATORLOOSE]:o[i.COMPARATOR],x=m.match(y);if(!x)throw new TypeError(`Invalid comparator: ${m}`);this.operator=x[1]!==void 0?x[1]:"",this.operator==="="&&(this.operator=""),x[2]?this.semver=new d(x[2],this.options.loose):this.semver=t}toString(){return this.value}test(m){if(c("Comparator.test",m,this.options.loose),this.semver===t||m===t)return!0;if(typeof m=="string")try{m=new d(m,this.options)}catch{return!1}return l(m,this.operator,this.semver,this.options)}intersects(m,y){if(!(m instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new p(m.value,y).test(this.value):m.operator===""?m.value===""?!0:new p(this.value,y).test(m.semver):(y=n(y),y.includePrerelease&&(this.value==="<0.0.0-0"||m.value==="<0.0.0-0")||!y.includePrerelease&&(this.value.startsWith("<0.0.0")||m.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&m.operator.startsWith(">")||this.operator.startsWith("<")&&m.operator.startsWith("<")||this.semver.version===m.semver.version&&this.operator.includes("=")&&m.operator.includes("=")||l(this.semver,"<",m.semver,y)&&this.operator.startsWith(">")&&m.operator.startsWith("<")||l(this.semver,">",m.semver,y)&&this.operator.startsWith("<")&&m.operator.startsWith(">")))}}ic=e;const n=Ql,{safeRe:o,t:i}=Gi,l=yh,c=Us,d=Bt,p=_n();return ic}const cV=_n();var Xs=(t,e,n)=>{try{e=new cV(e,n)}catch{return!1}return e.test(t)};const dV=_n();var uV=(t,e)=>new dV(t,e).set.map(n=>n.map(o=>o.value).join(" ").trim().split(" "));const pV=Bt,hV=_n();var fV=(t,e,n)=>{let o=null,i=null,l=null;try{l=new hV(e,n)}catch{return null}return t.forEach(c=>{l.test(c)&&(!o||i.compare(c)===-1)&&(o=c,i=new pV(o,n))}),o};const mV=Bt,gV=_n();var yV=(t,e,n)=>{let o=null,i=null,l=null;try{l=new gV(e,n)}catch{return null}return t.forEach(c=>{l.test(c)&&(!o||i.compare(c)===1)&&(o=c,i=new mV(o,n))}),o};const sc=Bt,vV=_n(),Ch=Ws;var _V=(t,e)=>{t=new vV(t,e);let n=new sc("0.0.0");if(t.test(n)||(n=new sc("0.0.0-0"),t.test(n)))return n;n=null;for(let o=0;o<t.set.length;++o){const i=t.set[o];let l=null;i.forEach(c=>{const d=new sc(c.semver.version);switch(c.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!l||Ch(d,l))&&(l=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),l&&(!n||Ch(n,l))&&(n=l)}return n&&t.test(n)?n:null};const CV=_n();var wV=(t,e)=>{try{return new CV(t,e).range||"*"}catch{return null}};const bV=Bt,wh=Ks(),{ANY:xV}=wh,kV=_n(),SV=Xs,bh=Ws,xh=tc,EV=rc,TV=nc;var ac=(t,e,n,o)=>{t=new bV(t,o),e=new kV(e,o);let i,l,c,d,p;switch(n){case">":i=bh,l=EV,c=xh,d=">",p=">=";break;case"<":i=xh,l=TV,c=bh,d="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(SV(t,e,o))return!1;for(let h=0;h<e.set.length;++h){const m=e.set[h];let y=null,x=null;if(m.forEach(w=>{w.semver===xV&&(w=new wh(">=0.0.0")),y=y||w,x=x||w,i(w.semver,y.semver,o)?y=w:c(w.semver,x.semver,o)&&(x=w)}),y.operator===d||y.operator===p||(!x.operator||x.operator===d)&&l(t,x.semver))return!1;if(x.operator===p&&c(t,x.semver))return!1}return!0};const NV=ac;var AV=(t,e,n)=>NV(t,e,">",n);const VV=ac;var BV=(t,e,n)=>VV(t,e,"<",n);const kh=_n();var PV=(t,e,n)=>(t=new kh(t,n),e=new kh(e,n),t.intersects(e,n));const RV=Xs,DV=vn;var IV=(t,e,n)=>{const o=[];let i=null,l=null;const c=t.sort((m,y)=>DV(m,y,n));for(const m of c)RV(m,e,n)?(l=m,i||(i=m)):(l&&o.push([i,l]),l=null,i=null);i&&o.push([i,null]);const d=[];for(const[m,y]of o)m===y?d.push(m):!y&&m===c[0]?d.push("*"):y?m===c[0]?d.push(`<=${y}`):d.push(`${m} - ${y}`):d.push(`>=${m}`);const p=d.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return p.length<h.length?p:e};const Sh=_n(),lc=Ks(),{ANY:cc}=lc,$i=Xs,dc=vn,FV=(t,e,n={})=>{if(t===e)return!0;t=new Sh(t,n),e=new Sh(e,n);let o=!1;e:for(const i of t.set){for(const l of e.set){const c=LV(i,l,n);if(o=o||c!==null,c)continue e}if(o)return!1}return!0},OV=[new lc(">=0.0.0-0")],Eh=[new lc(">=0.0.0")],LV=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===cc){if(e.length===1&&e[0].semver===cc)return!0;n.includePrerelease?t=OV:t=Eh}if(e.length===1&&e[0].semver===cc){if(n.includePrerelease)return!0;e=Eh}const o=new Set;let i,l;for(const w of t)w.operator===">"||w.operator===">="?i=Th(i,w,n):w.operator==="<"||w.operator==="<="?l=Nh(l,w,n):o.add(w.semver);if(o.size>1)return null;let c;if(i&&l){if(c=dc(i.semver,l.semver,n),c>0)return null;if(c===0&&(i.operator!==">="||l.operator!=="<="))return null}for(const w of o){if(i&&!$i(w,String(i),n)||l&&!$i(w,String(l),n))return null;for(const S of e)if(!$i(w,String(S),n))return!1;return!0}let d,p,h,m,y=l&&!n.includePrerelease&&l.semver.prerelease.length?l.semver:!1,x=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1;y&&y.prerelease.length===1&&l.operator==="<"&&y.prerelease[0]===0&&(y=!1);for(const w of e){if(m=m||w.operator===">"||w.operator===">=",h=h||w.operator==="<"||w.operator==="<=",i){if(x&&w.semver.prerelease&&w.semver.prerelease.length&&w.semver.major===x.major&&w.semver.minor===x.minor&&w.semver.patch===x.patch&&(x=!1),w.operator===">"||w.operator===">="){if(d=Th(i,w,n),d===w&&d!==i)return!1}else if(i.operator===">="&&!$i(i.semver,String(w),n))return!1}if(l){if(y&&w.semver.prerelease&&w.semver.prerelease.length&&w.semver.major===y.major&&w.semver.minor===y.minor&&w.semver.patch===y.patch&&(y=!1),w.operator==="<"||w.operator==="<="){if(p=Nh(l,w,n),p===w&&p!==l)return!1}else if(l.operator==="<="&&!$i(l.semver,String(w),n))return!1}if(!w.operator&&(l||i)&&c!==0)return!1}return!(i&&h&&!l&&c!==0||l&&m&&!i&&c!==0||x||y)},Th=(t,e,n)=>{if(!t)return e;const o=dc(t.semver,e.semver,n);return o>0?t:o<0||e.operator===">"&&t.operator===">="?e:t},Nh=(t,e,n)=>{if(!t)return e;const o=dc(t.semver,e.semver,n);return o<0?t:o>0||e.operator==="<"&&t.operator==="<="?e:t};var MV=FV;const uc=Gi,Ah=zs,GV=Bt,Vh=sh,$V=Ao,zV=EA,UV=NA,ZV=AA,jV=VA,WV=PA,HV=DA,qV=FA,KV=LA,XV=vn,YV=GA,JV=zA,QV=ec,eB=ZA,tB=WA,nB=Ws,rB=tc,oB=mh,iB=gh,sB=nc,aB=rc,lB=yh,cB=aV,dB=Ks(),uB=_n();var pB={parse:$V,valid:zV,clean:UV,inc:ZV,diff:jV,major:WV,minor:HV,patch:qV,prerelease:KV,compare:XV,rcompare:YV,compareLoose:JV,compareBuild:QV,sort:eB,rsort:tB,gt:nB,lt:rB,eq:oB,neq:iB,gte:sB,lte:aB,cmp:lB,coerce:cB,Comparator:dB,Range:uB,satisfies:Xs,toComparators:uV,maxSatisfying:fV,minSatisfying:yV,minVersion:_V,validRange:wV,outside:ac,gtr:AV,ltr:BV,intersects:PV,simplifyRange:IV,subset:MV,SemVer:GV,re:uc.re,src:uc.src,tokens:uc.t,SEMVER_SPEC_VERSION:Ah.SEMVER_SPEC_VERSION,RELEASE_TYPES:Ah.RELEASE_TYPES,compareIdentifiers:Vh.compareIdentifiers,rcompareIdentifiers:Vh.rcompareIdentifiers};const hB=Yd(pB);function fB(t){return Gr(t.id)}function mB(t){switch(t){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: ${t}`)}}const gB=["isNotNA","isNA","number_equals","number_notEquals","number_greaterThan","number_greaterThanOrEqualTo","number_lessThan","number_lessThanOrEqualTo","number_between"],yB=["isNotNA","isNA","string_equals","string_notEquals","string_contains","string_doesNotContain","string_matches","string_doesNotMatch","string_containsFuzzyMatch"];function Bh(t,e){var n,o;return((o=(n=t.spec.annotations)==null?void 0:n["pl7.app/label"])==null?void 0:o.trim())??"Unlabeled "+t.type+" "+e.toString()}function vB(t){const e=t.type;switch(e){case"isNotNA":case"isNA":return;case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return t.reference;case"number_between":return t.lowerBound;case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":case"string_containsFuzzyMatch":return t.reference;default:throw Error(`unsupported filter type: ${e}`)}}function Ph(t,e){switch(t){case"isNotNA":case"isNA":return{type:t};case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return{type:t,reference:typeof e=="number"?e:0};case"number_between":return{type:t,lowerBound:typeof e=="number"?e: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:t,reference:typeof e=="string"?e:""};case"string_containsFuzzyMatch":return{type:t,reference:typeof e=="string"?e:"",maxEdits:2,substitutionsOnly:!1,wildcard:void 0};default:throw Error(`unsupported filter type: ${t}`)}}function _B(t,e){return{columnId:t.columnId,filter:Ph(e,vB(t.filter)),disabled:t.disabled}}function pc(t,e){var c,d;const n=Number(e);if(!Number.isFinite(n))throw Error("Model value is not a number.");const o=t.type==="column"?t.spec.valueType:t.spec.type;if((o==="Int"||o==="Long")&&!Number.isInteger(n))throw Error("Model value is not an integer.");const i=(c=t.spec.annotations)==null?void 0:c["pl7.app/min"];if(i!==void 0){const p=Number(i);if(Number.isFinite(p)&&n<Number(i))throw Error("Model value is too low.")}const l=(d=t.spec.annotations)==null?void 0:d["pl7.app/max"];if(l!==void 0){const p=Number(l);if(Number.isFinite(p)&&n>Number(l))throw Error("Model value is too high.")}return n}function Rh(t,e){var o,i;const n=((o=t.spec.domain)==null?void 0:o["pl7.app/alphabet"])??((i=t.spec.annotations)==null?void 0:i["pl7.app/alphabet"]);if(n==="nucleotide"&&!/^[AaTtGgCcNn]+$/.test(e))throw Error("Model value is not a nucleotide.");if(n==="aminoacid"&&!/^[AaCcDdEeFfGgHhIiKkLlMmNnPpQqRrSsTtVvWwYyXx]+$/.test(e))throw Error("Model value is not an aminoacid.");return e}function CB(t){try{return new RegExp(t),t}catch(e){throw e instanceof SyntaxError?Error("Model value is not a regexp."):e}}function wB(t,e){var i,l;const n=((i=t.spec.domain)==null?void 0:i["pl7.app/alphabet"])??((l=t.spec.annotations)==null?void 0:l["pl7.app/alphabet"]);if(n==="nucleotide")return[{value:"N",text:"N"}];if(n==="aminoacid")return[{value:"X",text:"X"}];const o=ze.uniq(e);return o.sort(),o.map(c=>({value:c,text:c}))}function bB(t,e){var i,l;const n=hB.gt(mu().sdkInfo.sdkVersion,"1.14.0")&&(t.type==="column"?t.spec.valueType:t.spec.type)==="String"&&(((i=t.spec.domain)==null?void 0:i["pl7.app/alphabet"])??((l=t.spec.annotations)==null?void 0:l["pl7.app/alphabet"]))!==void 0,o=e.type;switch(o){case"isNotNA":return{operator:"Not",operand:{operator:"IsNA"}};case"isNA":return{operator:"IsNA"};case"number_equals":return{operator:"Equal",reference:e.reference};case"string_equals":return{operator:n?"IEqual":"Equal",reference:e.reference};case"number_notEquals":return{operator:"Not",operand:{operator:"Equal",reference:e.reference}};case"string_notEquals":return{operator:"Not",operand:{operator:n?"IEqual":"Equal",reference:e.reference}};case"number_greaterThan":return{operator:"Greater",reference:e.reference};case"number_greaterThanOrEqualTo":return{operator:"GreaterOrEqual",reference:e.reference};case"number_lessThan":return{operator:"Less",reference:e.reference};case"number_lessThanOrEqualTo":return{operator:"LessOrEqual",reference:e.reference};case"number_between":return{operator:"And",operands:[{operator:e.includeLowerBound?"GreaterOrEqual":"Greater",reference:e.lowerBound},{operator:e.includeUpperBound?"LessOrEqual":"Less",reference:e.upperBound}]};case"string_contains":return{operator:n?"StringIContains":"StringContains",substring:e.reference};case"string_doesNotContain":return{operator:"Not",operand:{operator:n?"StringIContains":"StringContains",substring:e.reference}};case"string_matches":return{operator:"Matches",regex:e.reference};case"string_doesNotMatch":return{operator:"Not",operand:{operator:"Matches",regex:e.reference}};case"string_containsFuzzyMatch":return{operator:n?"StringIContainsFuzzy":"StringContainsFuzzy",reference:e.reference,maxEdits:e.maxEdits,substitutionsOnly:e.substitutionsOnly,wildcard:e.wildcard};default:throw Error(`unsupported filter type: ${o}`)}}const xB={class:"d-flex flex-column gap-24"},Dh=r.defineComponent({__name:"PlTableFilterEntry",props:r.mergeModels({column:{},options:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,{column:o,options:i}=r.toRefs(n);return(l,c)=>(r.openBlock(),r.createElementBlock("div",xB,[r.createVNode(r.unref(wo),{"model-value":e.value.filter.type,options:r.unref(i),label:"Predicate","onUpdate:modelValue":c[0]||(c[0]=d=>e.value=r.unref(_B)(e.value,d))},null,8,["model-value","options"]),e.value.filter.type==="number_equals"||e.value.filter.type==="number_notEquals"||e.value.filter.type==="number_lessThan"||e.value.filter.type==="number_lessThanOrEqualTo"||e.value.filter.type==="number_greaterThan"||e.value.filter.type==="number_greaterThanOrEqualTo"?(r.openBlock(),r.createBlock(r.unref(jr),{key:0,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[1]||(c[1]=d=>e.value.filter.reference=d),parse:d=>r.unref(pc)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="number_between"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(r.unref(jr),{modelValue:e.value.filter.lowerBound,"onUpdate:modelValue":c[2]||(c[2]=d=>e.value.filter.lowerBound=d),parse:d=>r.unref(pc)(r.unref(o),d),label:"Lower bound"},null,8,["modelValue","parse"]),r.createVNode(r.unref(Bs),{modelValue:e.value.filter.includeLowerBound,"onUpdate:modelValue":c[3]||(c[3]=d=>e.value.filter.includeLowerBound=d),label:"Include lower bound"},null,8,["modelValue"]),r.createVNode(r.unref(jr),{modelValue:e.value.filter.upperBound,"onUpdate:modelValue":c[4]||(c[4]=d=>e.value.filter.upperBound=d),parse:d=>r.unref(pc)(r.unref(o),d),label:"Upper bound"},null,8,["modelValue","parse"]),r.createVNode(r.unref(Bs),{modelValue:e.value.filter.includeUpperBound,"onUpdate:modelValue":c[5]||(c[5]=d=>e.value.filter.includeUpperBound=d),label:"Include upper bound"},null,8,["modelValue"])],64)):r.createCommentVNode("",!0),e.value.filter.type==="string_equals"||e.value.filter.type==="string_notEquals"||e.value.filter.type==="string_contains"||e.value.filter.type==="string_doesNotContain"?(r.openBlock(),r.createBlock(r.unref(jr),{key:2,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[6]||(c[6]=d=>e.value.filter.reference=d),parse:d=>r.unref(Rh)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="string_matches"||e.value.filter.type==="string_doesNotMatch"?(r.openBlock(),r.createBlock(r.unref(jr),{key:3,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[7]||(c[7]=d=>e.value.filter.reference=d),parse:r.unref(CB),label:"Reference value"},null,8,["modelValue","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="string_containsFuzzyMatch"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:4},[r.createVNode(r.unref(jr),{modelValue:e.value.filter.reference,"onUpdate:modelValue":c[8]||(c[8]=d=>e.value.filter.reference=d),parse:d=>r.unref(Rh)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","parse"]),r.createVNode(r.unref(jp),{modelValue:e.value.filter.maxEdits,"onUpdate:modelValue":c[9]||(c[9]=d=>e.value.filter.maxEdits=d),max:5,breakpoints:"",label:"Maximum nuber of substitutions and indels"},null,8,["modelValue"]),r.createVNode(r.unref(Bs),{modelValue:e.value.filter.substitutionsOnly,"onUpdate:modelValue":c[10]||(c[10]=d=>e.value.filter.substitutionsOnly=d),label:"Substitutions only"},null,8,["modelValue"]),r.createVNode(r.unref(wo),{modelValue:e.value.filter.wildcard,"onUpdate:modelValue":c[11]||(c[11]=d=>e.value.filter.wildcard=d),options:r.unref(wB)(r.unref(o),e.value.filter.reference),clearable:"",label:"Wildcard symbol"},null,8,["modelValue","options"])],64)):r.createCommentVNode("",!0)]))}}),kB={class:"d-flex flex-column gap-24"},SB={key:0,class:"text-subtitle-m",style:{color:"var(--txt-mask)"}},EB=r.defineComponent({__name:"PlTableAddFilter",props:r.mergeModels({columnsById:{},columnOptions:{},filterOptions:{},makeFilter:{type:Function}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:r.mergeModels(["addFilter"],["update:modelValue"]),setup(t,{emit:e}){const n=r.useModel(t,"modelValue"),o=t,{columnsById:i,columnOptions:l,filterOptions:c}=r.toRefs(o),d=e,p=r.ref(),h=r.ref();r.watch(()=>p.value,x=>{x?h.value=o.makeFilter(x):h.value=void 0});const m=()=>{p.value=void 0,n.value=!1},y=()=>{h.value&&(d("addFilter",h.value),m())};return(x,w)=>(r.openBlock(),r.createBlock(r.unref(Vs),{modelValue:n.value,"onUpdate:modelValue":w[2]||(w[2]=S=>n.value=S),"close-on-outside-click":!1},{title:r.withCtx(()=>w[3]||(w[3]=[r.createTextVNode("Add Filter")])),actions:r.withCtx(()=>[r.createVNode(r.unref(Ns),{disabled:!h.value,onClick:y},{default:r.withCtx(()=>w[4]||(w[4]=[r.createTextVNode("Add Filter")])),_:1},8,["disabled"]),r.createVNode(r.unref(_o),{"justify-center":!1,onClick:m},{default:r.withCtx(()=>w[5]||(w[5]=[r.createTextVNode("Cancel")])),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",kB,[r.createVNode(r.unref(wo),{modelValue:p.value,"onUpdate:modelValue":w[0]||(w[0]=S=>p.value=S),options:r.unref(l),label:"Column",placeholder:"Choose..."},null,8,["modelValue","options"]),h.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",SB,"Choose a column to view and adjust its options")),h.value?(r.openBlock(),r.createBlock(Dh,{key:1,modelValue:h.value,"onUpdate:modelValue":w[1]||(w[1]=S=>h.value=S),column:r.unref(i)[h.value.columnId],options:r.unref(c)[h.value.columnId]},null,8,["modelValue","column","options"])):r.createCommentVNode("",!0)])]),_:1},8,["modelValue"]))}}),TB={class:"pl-filter-manager d-flex flex-column gap-6"},NB=["onClick"],AB={class:"pl-filter-manager__expand-icon"},VB={class:"pl-filter-manager__title flex-grow-1 text-s"},BB={class:"pl-filter-manager__actions d-flex gap-12"},PB=["onClick"],RB=["onClick"],DB={class:"pl-filter-manager__content d-flex gap-24 p-24 flex-column"},IB={class:"d-flex justify-center"},FB=["onClick"],OB={class:"pl-filter-manager__add-btn-icon"},LB={key:1},MB=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:i,defaults:l}=r.toRefs(n),c=r.computed(()=>{const j=o.value.filter(Z=>{const W=Z.type;switch(W){case"axis":return Z.spec.type!=="Bytes";case"column":return Z.spec.valueType!=="Bytes";default:throw Error(`unsupported data type: ${W}`)}}),$={};for(const Z of j)$[fB(Z)]=Z;return $}),d=r.computed(()=>{const j=i.value??[],$={};for(const[Z,W]of Object.entries(c.value)){const J=ze.find(j,he=>ze.isEqual(he.column.id,W.id));J&&($[Z]=J.allowedFilterTypes)}return $}),p=r.computed(()=>{const j=l.value??[],$={};for(const[Z,W]of Object.entries(c.value)){const J=ze.find(j,he=>ze.isEqual(he.column.id,W.id));J&&($[Z]={columnId:Z,filter:J.default,disabled:!1})}return $});(()=>{let j=e.value.state;typeof j=="object"&&!Array.isArray(j)&&(e.value.state=Object.entries(j).map(([$,Z])=>({columnId:$,filter:Z,disabled:!1})))})();const h=j=>j??Object.values(p.value),m=r.reactive({state:h(e.value.state)});r.watch(()=>e.value,j=>{ze.isEqual(m.state,j.state)||(m.state=h(j.state))}),r.watch(()=>m,j=>{ze.isEqual(j.state,e.value.state)||(e.value={state:ze.cloneDeep(j.state),filters:j.state.filter($=>!$.disabled).map($=>{const Z=c.value[$.columnId],{spec:W,...J}=Z;return{type:"bySingleColumnV2",column:J,predicate:bB(Z,$.filter)}})})},{immediate:!0,deep:!0}),r.watch(()=>c.value,j=>{Object.keys(j).length===0&&m.state!==void 0||(m.state=m.state.filter($=>!!j[$.columnId]))},{immediate:!0});const y=r.computed(()=>Object.keys(c).length>0&&m.state.length>0),x=r.computed(()=>{const j=d.value,$={};for(const[Z,W]of Object.entries(c.value)){let he=(W.type==="column"?W.spec.valueType:W.spec.type)==="String"?yB:gB;const B=j[Z];B&&(he=he.filter(C=>B.includes(C))),$[Z]=he.map(C=>({value:C,text:mB(C)}))}return $}),w=r.computed(()=>ze.some(Object.values(x.value),j=>j.length>0)),S=r.computed(()=>Object.entries(Object.entries(c.value)).filter(([j,[$,Z]])=>x.value[$].length>0).filter(([j,[$,Z]])=>!m.state.some(W=>W.columnId===$)).map(([j,[$,Z]])=>({label:Bh(Z,j),value:$}))),O=j=>p.value[j]??{columnId:j,filter:Ph(x.value[j][0].value),disabled:!1},G=j=>{m.state[j]=O(m.state[j].columnId)},b=j=>m.state.splice(j,1),R=r.ref(!1),F=r.ref(!1),D=r.ref(!1);r.onMounted(()=>{D.value=!0});const A=r.reactive({}),U=j=>{A[j]?delete A[j]:A[j]=!0};return(j,$)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[D.value?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:`#${r.unref(Yl)}`},[r.createVNode(r.unref(_o),{onClick:$[0]||($[0]=r.withModifiers(Z=>R.value=!0,["stop"]))},{append:r.withCtx(()=>[r.createVNode(r.unref(Ci),{name:y.value?"filter-on":"filter"},null,8,["name"])]),default:r.withCtx(()=>[$[5]||($[5]=r.createTextVNode(" Filters "))]),_:1})],8,["to"])):r.createCommentVNode("",!0),r.createVNode(r.unref(Vs),{modelValue:R.value,"onUpdate:modelValue":$[2]||($[2]=Z=>R.value=Z),"close-on-outside-click":!1},{title:r.withCtx(()=>$[6]||($[6]=[r.createTextVNode("Manage Filters")])),default:r.withCtx(()=>[r.createElementVNode("div",TB,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.state,(Z,W)=>(r.openBlock(),r.createElementBlock("div",{key:Z.columnId,class:r.normalizeClass([{open:A[Z.columnId]},"pl-filter-manager__filter"])},[r.createElementVNode("div",{class:"pl-filter-manager__header d-flex align-center gap-8",onClick:J=>U(Z.columnId)},[r.createElementVNode("div",AB,[r.createVNode(r.unref(fn),{name:"chevron-right"})]),r.createElementVNode("div",VB,r.toDisplayString(r.unref(Bh)(c.value[Z.columnId],W)),1),r.createElementVNode("div",BB,[r.createElementVNode("div",{class:"pl-filter-manager__toggle",onClick:r.withModifiers(J=>Z.disabled=!Z.disabled,["stop"])},[r.createVNode(r.unref(Lt),{name:Z.disabled?"view-hide":"view-show"},null,8,["name"])],8,PB),r.createElementVNode("div",{class:"pl-filter-manager__delete",onClick:r.withModifiers(J=>b(W),["stop"])},[r.createVNode(r.unref(Lt),{name:"close"})],8,RB)])],8,NB),r.createElementVNode("div",DB,[r.createVNode(Dh,{modelValue:m.state[W],"onUpdate:modelValue":J=>m.state[W]=J,column:c.value[Z.columnId],options:x.value[Z.columnId]},null,8,["modelValue","onUpdate:modelValue","column","options"]),r.createElementVNode("div",IB,[r.createElementVNode("div",{class:"pl-filter-manager__revert-btn text-s d-flex align-center gap-8",onClick:J=>G(W)},[$[7]||($[7]=r.createTextVNode(" Revert Settings to Default ")),r.createVNode(r.unref(Lt),{name:"reverse"})],8,FB)])])],2))),128)),S.value.length>0?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-filter-manager__add-btn",onClick:$[1]||($[1]=Z=>F.value=!0)},[r.createElementVNode("div",OB,[r.createVNode(r.unref(fn),{name:"add"})]),$[8]||($[8]=r.createElementVNode("div",{class:"pl-filter-manager__add-btn-title"},"Add Filter",-1))])):r.createCommentVNode("",!0),w.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",LB,"No filters applicable"))])]),_:1},8,["modelValue"]),r.createVNode(EB,{modelValue:F.value,"onUpdate:modelValue":$[3]||($[3]=Z=>F.value=Z),"columns-by-id":c.value,"column-options":S.value,"filter-options":x.value,"make-filter":O,onAddFilter:$[4]||($[4]=Z=>m.state.push(Z))},null,8,["modelValue","columns-by-id","column-options","filter-options"])],64))}}),Ys=new Map;function GB(t,e){const n=r.getCurrentScope()??r.effectScope(),o=n.run(()=>(r.onScopeDispose(()=>{Ys.delete(t)}),r.reactive(e())));return o[Symbol.dispose]=()=>{n.stop()},o}function $B(t){const e=Symbol();return()=>(Ys.has(e)||Ys.set(e,GB(e,t)),Ys.get(e))}function zB(t){return r.computed(()=>{try{return Qd(t())}catch(e){return{errors:[String(e)],value:void 0}}})}function Ih(t,e,n){const o=r.ref(0),i=r.reactive({loading:r.computed(()=>o.value>0),loadingRef:o,value:void 0,error:void 0}),l=Ig(e);return r.watch(t,async c=>{i.error=void 0,o.value++,l(c).then(d=>{d.ok&&(i.value=d.value)}).catch(d=>{i.value=void 0,i.error=d}).finally(()=>{o.value--})},Object.assign({immediate:!0,deep:!0},n??{})),i}const Vo=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Fh=new Set,hc=typeof process=="object"&&process?process:{},Oh=(t,e,n,o)=>{typeof hc.emitWarning=="function"?hc.emitWarning(t,e,n,o):console.error(`[${n}] ${e}: ${t}`)};let Js=globalThis.AbortController,Lh=globalThis.AbortSignal;if(typeof Js>"u"){Lh=class{constructor(){We(this,"onabort");We(this,"_onabort",[]);We(this,"reason");We(this,"aborted",!1)}addEventListener(o,i){this._onabort.push(i)}},Js=class{constructor(){We(this,"signal",new Lh);e()}abort(o){var i,l;if(!this.signal.aborted){this.signal.reason=o,this.signal.aborted=!0;for(const c of this.signal._onabort)c(o);(l=(i=this.signal).onabort)==null||l.call(i,o)}}};let t=((Gh=hc.env)==null?void 0:Gh.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,Oh("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 UB=t=>!Fh.has(t),Er=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Mh=t=>Er(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Qs:null:null;class Qs extends Array{constructor(e){super(e),this.fill(0)}}const Kr=class Kr{constructor(e,n){We(this,"heap");We(this,"length");if(!k(Kr,Bo))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(e),this.length=0}static create(e){const n=Mh(e);if(!n)return[];ye(Kr,Bo,!0);const o=new Kr(e,n);return ye(Kr,Bo,!1),o}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};Bo=new WeakMap,Ue(Kr,Bo,!1);let fc=Kr;const yc=class yc{constructor(e){Ue(this,re);Ue(this,Cn);Ue(this,Wt);Ue(this,wn);Ue(this,bn);Ue(this,Po);Ue(this,Ro);We(this,"ttl");We(this,"ttlResolution");We(this,"ttlAutopurge");We(this,"updateAgeOnGet");We(this,"updateAgeOnHas");We(this,"allowStale");We(this,"noDisposeOnSet");We(this,"noUpdateTTL");We(this,"maxEntrySize");We(this,"sizeCalculation");We(this,"noDeleteOnFetchRejection");We(this,"noDeleteOnStaleGet");We(this,"allowStaleOnFetchAbort");We(this,"allowStaleOnFetchRejection");We(this,"ignoreFetchAbort");Ue(this,pt);Ue(this,xn);Ue(this,dt);Ue(this,Je);Ue(this,Ee);Ue(this,Pt);Ue(this,Ht);Ue(this,Et);Ue(this,yt);Ue(this,kn);Ue(this,vt);Ue(this,Sn);Ue(this,En);Ue(this,qt);Ue(this,Tn);Ue(this,Tr);Ue(this,Rt);Ue(this,Xr,()=>{});Ue(this,Jn,()=>{});Ue(this,zi,()=>{});Ue(this,Kt,()=>!1);Ue(this,Yr,e=>{});Ue(this,Do,(e,n,o)=>{});Ue(this,Ui,(e,n,o,i)=>{if(o||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});We(this,$h,"LRUCache");const{max:n=0,ttl:o,ttlResolution:i=1,ttlAutopurge:l,updateAgeOnGet:c,updateAgeOnHas:d,allowStale:p,dispose:h,disposeAfter:m,noDisposeOnSet:y,noUpdateTTL:x,maxSize:w=0,maxEntrySize:S=0,sizeCalculation:O,fetchMethod:G,memoMethod:b,noDeleteOnFetchRejection:R,noDeleteOnStaleGet:F,allowStaleOnFetchRejection:D,allowStaleOnFetchAbort:A,ignoreFetchAbort:U}=e;if(n!==0&&!Er(n))throw new TypeError("max option must be a nonnegative integer");const j=n?Mh(n):Array;if(!j)throw new Error("invalid max value: "+n);if(ye(this,Cn,n),ye(this,Wt,w),this.maxEntrySize=S||k(this,Wt),this.sizeCalculation=O,this.sizeCalculation){if(!k(this,Wt)&&!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(b!==void 0&&typeof b!="function")throw new TypeError("memoMethod must be a function if defined");if(ye(this,Ro,b),G!==void 0&&typeof G!="function")throw new TypeError("fetchMethod must be a function if specified");if(ye(this,Po,G),ye(this,Tr,!!G),ye(this,dt,new Map),ye(this,Je,new Array(n).fill(void 0)),ye(this,Ee,new Array(n).fill(void 0)),ye(this,Pt,new j(n)),ye(this,Ht,new j(n)),ye(this,Et,0),ye(this,yt,0),ye(this,kn,fc.create(n)),ye(this,pt,0),ye(this,xn,0),typeof h=="function"&&ye(this,wn,h),typeof m=="function"?(ye(this,bn,m),ye(this,vt,[])):(ye(this,bn,void 0),ye(this,vt,void 0)),ye(this,Tn,!!k(this,wn)),ye(this,Rt,!!k(this,bn)),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!x,this.noDeleteOnFetchRejection=!!R,this.allowStaleOnFetchRejection=!!D,this.allowStaleOnFetchAbort=!!A,this.ignoreFetchAbort=!!U,this.maxEntrySize!==0){if(k(this,Wt)!==0&&!Er(k(this,Wt)))throw new TypeError("maxSize must be a positive integer if specified");if(!Er(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");ue(this,re,xg).call(this)}if(this.allowStale=!!p,this.noDeleteOnStaleGet=!!F,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!d,this.ttlResolution=Er(i)||i===0?i:1,this.ttlAutopurge=!!l,this.ttl=o||0,this.ttl){if(!Er(this.ttl))throw new TypeError("ttl must be a positive integer if specified");ue(this,re,Gd).call(this)}if(k(this,Cn)===0&&this.ttl===0&&k(this,Wt)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!k(this,Cn)&&!k(this,Wt)){const $="LRU_CACHE_UNBOUNDED";UB($)&&(Fh.add($),Oh("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",$,yc))}}static unsafeExposeInternals(e){return{starts:k(e,En),ttls:k(e,qt),sizes:k(e,Sn),keyMap:k(e,dt),keyList:k(e,Je),valList:k(e,Ee),next:k(e,Pt),prev:k(e,Ht),get head(){return k(e,Et)},get tail(){return k(e,yt)},free:k(e,kn),isBackgroundFetch:n=>{var o;return ue(o=e,re,et).call(o,n)},backgroundFetch:(n,o,i,l)=>{var c;return ue(c=e,re,Ha).call(c,n,o,i,l)},moveToTail:n=>{var o;return ue(o=e,re,ps).call(o,n)},indexes:n=>{var o;return ue(o=e,re,Or).call(o,n)},rindexes:n=>{var o;return ue(o=e,re,Lr).call(o,n)},isStale:n=>{var o;return k(o=e,Kt).call(o,n)}}}get max(){return k(this,Cn)}get maxSize(){return k(this,Wt)}get calculatedSize(){return k(this,xn)}get size(){return k(this,pt)}get fetchMethod(){return k(this,Po)}get memoMethod(){return k(this,Ro)}get dispose(){return k(this,wn)}get disposeAfter(){return k(this,bn)}getRemainingTTL(e){return k(this,dt).has(e)?1/0:0}*entries(){for(const e of ue(this,re,Or).call(this))k(this,Ee)[e]!==void 0&&k(this,Je)[e]!==void 0&&!ue(this,re,et).call(this,k(this,Ee)[e])&&(yield[k(this,Je)[e],k(this,Ee)[e]])}*rentries(){for(const e of ue(this,re,Lr).call(this))k(this,Ee)[e]!==void 0&&k(this,Je)[e]!==void 0&&!ue(this,re,et).call(this,k(this,Ee)[e])&&(yield[k(this,Je)[e],k(this,Ee)[e]])}*keys(){for(const e of ue(this,re,Or).call(this)){const n=k(this,Je)[e];n!==void 0&&!ue(this,re,et).call(this,k(this,Ee)[e])&&(yield n)}}*rkeys(){for(const e of ue(this,re,Lr).call(this)){const n=k(this,Je)[e];n!==void 0&&!ue(this,re,et).call(this,k(this,Ee)[e])&&(yield n)}}*values(){for(const e of ue(this,re,Or).call(this))k(this,Ee)[e]!==void 0&&!ue(this,re,et).call(this,k(this,Ee)[e])&&(yield k(this,Ee)[e])}*rvalues(){for(const e of ue(this,re,Lr).call(this))k(this,Ee)[e]!==void 0&&!ue(this,re,et).call(this,k(this,Ee)[e])&&(yield k(this,Ee)[e])}[(zh=Symbol.iterator,$h=Symbol.toStringTag,zh)](){return this.entries()}find(e,n={}){for(const o of ue(this,re,Or).call(this)){const i=k(this,Ee)[o],l=ue(this,re,et).call(this,i)?i.__staleWhileFetching:i;if(l!==void 0&&e(l,k(this,Je)[o],this))return this.get(k(this,Je)[o],n)}}forEach(e,n=this){for(const o of ue(this,re,Or).call(this)){const i=k(this,Ee)[o],l=ue(this,re,et).call(this,i)?i.__staleWhileFetching:i;l!==void 0&&e.call(n,l,k(this,Je)[o],this)}}rforEach(e,n=this){for(const o of ue(this,re,Lr).call(this)){const i=k(this,Ee)[o],l=ue(this,re,et).call(this,i)?i.__staleWhileFetching:i;l!==void 0&&e.call(n,l,k(this,Je)[o],this)}}purgeStale(){let e=!1;for(const n of ue(this,re,Lr).call(this,{allowStale:!0}))k(this,Kt).call(this,n)&&(ue(this,re,Mr).call(this,k(this,Je)[n],"expire"),e=!0);return e}info(e){const n=k(this,dt).get(e);if(n===void 0)return;const o=k(this,Ee)[n],i=ue(this,re,et).call(this,o)?o.__staleWhileFetching:o;if(i===void 0)return;const l={value:i};if(k(this,qt)&&k(this,En)){const c=k(this,qt)[n],d=k(this,En)[n];if(c&&d){const p=c-(Vo.now()-d);l.ttl=p,l.start=Date.now()}}return k(this,Sn)&&(l.size=k(this,Sn)[n]),l}dump(){const e=[];for(const n of ue(this,re,Or).call(this,{allowStale:!0})){const o=k(this,Je)[n],i=k(this,Ee)[n],l=ue(this,re,et).call(this,i)?i.__staleWhileFetching:i;if(l===void 0||o===void 0)continue;const c={value:l};if(k(this,qt)&&k(this,En)){c.ttl=k(this,qt)[n];const d=Vo.now()-k(this,En)[n];c.start=Math.floor(Date.now()-d)}k(this,Sn)&&(c.size=k(this,Sn)[n]),e.unshift([o,c])}return e}load(e){this.clear();for(const[n,o]of e){if(o.start){const i=Date.now()-o.start;o.start=Vo.now()-i}this.set(n,o.value,o)}}set(e,n,o={}){var x,w,S,O,G;if(n===void 0)return this.delete(e),this;const{ttl:i=this.ttl,start:l,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:d=this.sizeCalculation,status:p}=o;let{noUpdateTTL:h=this.noUpdateTTL}=o;const m=k(this,Ui).call(this,e,n,o.size||0,d);if(this.maxEntrySize&&m>this.maxEntrySize)return p&&(p.set="miss",p.maxEntrySizeExceeded=!0),ue(this,re,Mr).call(this,e,"set"),this;let y=k(this,pt)===0?void 0:k(this,dt).get(e);if(y===void 0)y=k(this,pt)===0?k(this,yt):k(this,kn).length!==0?k(this,kn).pop():k(this,pt)===k(this,Cn)?ue(this,re,Wa).call(this,!1):k(this,pt),k(this,Je)[y]=e,k(this,Ee)[y]=n,k(this,dt).set(e,y),k(this,Pt)[k(this,yt)]=y,k(this,Ht)[y]=k(this,yt),ye(this,yt,y),ja(this,pt)._++,k(this,Do).call(this,y,m,p),p&&(p.set="add"),h=!1;else{ue(this,re,ps).call(this,y);const b=k(this,Ee)[y];if(n!==b){if(k(this,Tr)&&ue(this,re,et).call(this,b)){b.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:R}=b;R!==void 0&&!c&&(k(this,Tn)&&((x=k(this,wn))==null||x.call(this,R,e,"set")),k(this,Rt)&&((w=k(this,vt))==null||w.push([R,e,"set"])))}else c||(k(this,Tn)&&((S=k(this,wn))==null||S.call(this,b,e,"set")),k(this,Rt)&&((O=k(this,vt))==null||O.push([b,e,"set"])));if(k(this,Yr).call(this,y),k(this,Do).call(this,y,m,p),k(this,Ee)[y]=n,p){p.set="replace";const R=b&&ue(this,re,et).call(this,b)?b.__staleWhileFetching:b;R!==void 0&&(p.oldValue=R)}}else p&&(p.set="update")}if(i!==0&&!k(this,qt)&&ue(this,re,Gd).call(this),k(this,qt)&&(h||k(this,zi).call(this,y,i,l),p&&k(this,Jn).call(this,p,y)),!c&&k(this,Rt)&&k(this,vt)){const b=k(this,vt);let R;for(;R=b==null?void 0:b.shift();)(G=k(this,bn))==null||G.call(this,...R)}return this}pop(){var e;try{for(;k(this,pt);){const n=k(this,Ee)[k(this,Et)];if(ue(this,re,Wa).call(this,!0),ue(this,re,et).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(k(this,Rt)&&k(this,vt)){const n=k(this,vt);let o;for(;o=n==null?void 0:n.shift();)(e=k(this,bn))==null||e.call(this,...o)}}}has(e,n={}){const{updateAgeOnHas:o=this.updateAgeOnHas,status:i}=n,l=k(this,dt).get(e);if(l!==void 0){const c=k(this,Ee)[l];if(ue(this,re,et).call(this,c)&&c.__staleWhileFetching===void 0)return!1;if(k(this,Kt).call(this,l))i&&(i.has="stale",k(this,Jn).call(this,i,l));else return o&&k(this,Xr).call(this,l),i&&(i.has="hit",k(this,Jn).call(this,i,l)),!0}else i&&(i.has="miss");return!1}peek(e,n={}){const{allowStale:o=this.allowStale}=n,i=k(this,dt).get(e);if(i===void 0||!o&&k(this,Kt).call(this,i))return;const l=k(this,Ee)[i];return ue(this,re,et).call(this,l)?l.__staleWhileFetching:l}async fetch(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:d=this.noDisposeOnSet,size:p=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:m=this.noUpdateTTL,noDeleteOnFetchRejection:y=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:x=this.allowStaleOnFetchRejection,ignoreFetchAbort:w=this.ignoreFetchAbort,allowStaleOnFetchAbort:S=this.allowStaleOnFetchAbort,context:O,forceRefresh:G=!1,status:b,signal:R}=n;if(!k(this,Tr))return b&&(b.fetch="get"),this.get(e,{allowStale:o,updateAgeOnGet:i,noDeleteOnStaleGet:l,status:b});const F={allowStale:o,updateAgeOnGet:i,noDeleteOnStaleGet:l,ttl:c,noDisposeOnSet:d,size:p,sizeCalculation:h,noUpdateTTL:m,noDeleteOnFetchRejection:y,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:S,ignoreFetchAbort:w,status:b,signal:R};let D=k(this,dt).get(e);if(D===void 0){b&&(b.fetch="miss");const A=ue(this,re,Ha).call(this,e,D,F,O);return A.__returned=A}else{const A=k(this,Ee)[D];if(ue(this,re,et).call(this,A)){const W=o&&A.__staleWhileFetching!==void 0;return b&&(b.fetch="inflight",W&&(b.returnedStale=!0)),W?A.__staleWhileFetching:A.__returned=A}const U=k(this,Kt).call(this,D);if(!G&&!U)return b&&(b.fetch="hit"),ue(this,re,ps).call(this,D),i&&k(this,Xr).call(this,D),b&&k(this,Jn).call(this,b,D),A;const j=ue(this,re,Ha).call(this,e,D,F,O),Z=j.__staleWhileFetching!==void 0&&o;return b&&(b.fetch=U?"stale":"refresh",Z&&U&&(b.returnedStale=!0)),Z?j.__staleWhileFetching:j.__returned=j}}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=k(this,Ro);if(!o)throw new Error("no memoMethod provided to constructor");const{context:i,forceRefresh:l,...c}=n,d=this.get(e,c);if(!l&&d!==void 0)return d;const p=o(e,d,{options:c,context:i});return this.set(e,p,c),p}get(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,status:c}=n,d=k(this,dt).get(e);if(d!==void 0){const p=k(this,Ee)[d],h=ue(this,re,et).call(this,p);return c&&k(this,Jn).call(this,c,d),k(this,Kt).call(this,d)?(c&&(c.get="stale"),h?(c&&o&&p.__staleWhileFetching!==void 0&&(c.returnedStale=!0),o?p.__staleWhileFetching:void 0):(l||ue(this,re,Mr).call(this,e,"expire"),c&&o&&(c.returnedStale=!0),o?p:void 0)):(c&&(c.get="hit"),h?p.__staleWhileFetching:(ue(this,re,ps).call(this,d),i&&k(this,Xr).call(this,d),p))}else c&&(c.get="miss")}delete(e){return ue(this,re,Mr).call(this,e,"delete")}clear(){return ue(this,re,Ud).call(this,"delete")}};Cn=new WeakMap,Wt=new WeakMap,wn=new WeakMap,bn=new WeakMap,Po=new WeakMap,Ro=new WeakMap,pt=new WeakMap,xn=new WeakMap,dt=new WeakMap,Je=new WeakMap,Ee=new WeakMap,Pt=new WeakMap,Ht=new WeakMap,Et=new WeakMap,yt=new WeakMap,kn=new WeakMap,vt=new WeakMap,Sn=new WeakMap,En=new WeakMap,qt=new WeakMap,Tn=new WeakMap,Tr=new WeakMap,Rt=new WeakMap,re=new WeakSet,Gd=function(){const e=new Qs(k(this,Cn)),n=new Qs(k(this,Cn));ye(this,qt,e),ye(this,En,n),ye(this,zi,(l,c,d=Vo.now())=>{if(n[l]=c!==0?d:0,e[l]=c,c!==0&&this.ttlAutopurge){const p=setTimeout(()=>{k(this,Kt).call(this,l)&&ue(this,re,Mr).call(this,k(this,Je)[l],"expire")},c+1);p.unref&&p.unref()}}),ye(this,Xr,l=>{n[l]=e[l]!==0?Vo.now():0}),ye(this,Jn,(l,c)=>{if(e[c]){const d=e[c],p=n[c];if(!d||!p)return;l.ttl=d,l.start=p,l.now=o||i();const h=l.now-p;l.remainingTTL=d-h}});let o=0;const i=()=>{const l=Vo.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=k(this,dt).get(l);if(c===void 0)return 0;const d=e[c],p=n[c];if(!d||!p)return 1/0;const h=(o||i())-p;return d-h},ye(this,Kt,l=>{const c=n[l],d=e[l];return!!d&&!!c&&(o||i())-c>d})},Xr=new WeakMap,Jn=new WeakMap,zi=new WeakMap,Kt=new WeakMap,xg=function(){const e=new Qs(k(this,Cn));ye(this,xn,0),ye(this,Sn,e),ye(this,Yr,n=>{ye(this,xn,k(this,xn)-e[n]),e[n]=0}),ye(this,Ui,(n,o,i,l)=>{if(ue(this,re,et).call(this,o))return 0;if(!Er(i))if(l){if(typeof l!="function")throw new TypeError("sizeCalculation must be a function");if(i=l(o,n),!Er(i))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 i}),ye(this,Do,(n,o,i)=>{if(e[n]=o,k(this,Wt)){const l=k(this,Wt)-e[n];for(;k(this,xn)>l;)ue(this,re,Wa).call(this,!0)}ye(this,xn,k(this,xn)+e[n]),i&&(i.entrySize=o,i.totalCalculatedSize=k(this,xn))})},Yr=new WeakMap,Do=new WeakMap,Ui=new WeakMap,Or=function*({allowStale:e=this.allowStale}={}){if(k(this,pt))for(let n=k(this,yt);!(!ue(this,re,$d).call(this,n)||((e||!k(this,Kt).call(this,n))&&(yield n),n===k(this,Et)));)n=k(this,Ht)[n]},Lr=function*({allowStale:e=this.allowStale}={}){if(k(this,pt))for(let n=k(this,Et);!(!ue(this,re,$d).call(this,n)||((e||!k(this,Kt).call(this,n))&&(yield n),n===k(this,yt)));)n=k(this,Pt)[n]},$d=function(e){return e!==void 0&&k(this,dt).get(k(this,Je)[e])===e},Wa=function(e){var l,c;const n=k(this,Et),o=k(this,Je)[n],i=k(this,Ee)[n];return k(this,Tr)&&ue(this,re,et).call(this,i)?i.__abortController.abort(new Error("evicted")):(k(this,Tn)||k(this,Rt))&&(k(this,Tn)&&((l=k(this,wn))==null||l.call(this,i,o,"evict")),k(this,Rt)&&((c=k(this,vt))==null||c.push([i,o,"evict"]))),k(this,Yr).call(this,n),e&&(k(this,Je)[n]=void 0,k(this,Ee)[n]=void 0,k(this,kn).push(n)),k(this,pt)===1?(ye(this,Et,ye(this,yt,0)),k(this,kn).length=0):ye(this,Et,k(this,Pt)[n]),k(this,dt).delete(o),ja(this,pt)._--,n},Ha=function(e,n,o,i){const l=n===void 0?void 0:k(this,Ee)[n];if(ue(this,re,et).call(this,l))return l;const c=new Js,{signal:d}=o;d==null||d.addEventListener("abort",()=>c.abort(d.reason),{signal:c.signal});const p={signal:c.signal,options:o,context:i},h=(O,G=!1)=>{const{aborted:b}=c.signal,R=o.ignoreFetchAbort&&O!==void 0;if(o.status&&(b&&!G?(o.status.fetchAborted=!0,o.status.fetchError=c.signal.reason,R&&(o.status.fetchAbortIgnored=!0)):o.status.fetchResolved=!0),b&&!R&&!G)return y(c.signal.reason);const F=w;return k(this,Ee)[n]===w&&(O===void 0?F.__staleWhileFetching?k(this,Ee)[n]=F.__staleWhileFetching:ue(this,re,Mr).call(this,e,"fetch"):(o.status&&(o.status.fetchUpdated=!0),this.set(e,O,p.options))),O},m=O=>(o.status&&(o.status.fetchRejected=!0,o.status.fetchError=O),y(O)),y=O=>{const{aborted:G}=c.signal,b=G&&o.allowStaleOnFetchAbort,R=b||o.allowStaleOnFetchRejection,F=R||o.noDeleteOnFetchRejection,D=w;if(k(this,Ee)[n]===w&&(!F||D.__staleWhileFetching===void 0?ue(this,re,Mr).call(this,e,"fetch"):b||(k(this,Ee)[n]=D.__staleWhileFetching)),R)return o.status&&D.__staleWhileFetching!==void 0&&(o.status.returnedStale=!0),D.__staleWhileFetching;if(D.__returned===D)throw O},x=(O,G)=>{var R;const b=(R=k(this,Po))==null?void 0:R.call(this,e,l,p);b&&b instanceof Promise&&b.then(F=>O(F===void 0?void 0:F),G),c.signal.addEventListener("abort",()=>{(!o.ignoreFetchAbort||o.allowStaleOnFetchAbort)&&(O(void 0),o.allowStaleOnFetchAbort&&(O=F=>h(F,!0)))})};o.status&&(o.status.fetchDispatched=!0);const w=new Promise(x).then(h,m),S=Object.assign(w,{__abortController:c,__staleWhileFetching:l,__returned:void 0});return n===void 0?(this.set(e,S,{...p.options,status:void 0}),n=k(this,dt).get(e)):k(this,Ee)[n]=S,S},et=function(e){if(!k(this,Tr))return!1;const n=e;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof Js},zd=function(e,n){k(this,Ht)[n]=e,k(this,Pt)[e]=n},ps=function(e){e!==k(this,yt)&&(e===k(this,Et)?ye(this,Et,k(this,Pt)[e]):ue(this,re,zd).call(this,k(this,Ht)[e],k(this,Pt)[e]),ue(this,re,zd).call(this,k(this,yt),e),ye(this,yt,e))},Mr=function(e,n){var i,l,c,d;let o=!1;if(k(this,pt)!==0){const p=k(this,dt).get(e);if(p!==void 0)if(o=!0,k(this,pt)===1)ue(this,re,Ud).call(this,n);else{k(this,Yr).call(this,p);const h=k(this,Ee)[p];if(ue(this,re,et).call(this,h)?h.__abortController.abort(new Error("deleted")):(k(this,Tn)||k(this,Rt))&&(k(this,Tn)&&((i=k(this,wn))==null||i.call(this,h,e,n)),k(this,Rt)&&((l=k(this,vt))==null||l.push([h,e,n]))),k(this,dt).delete(e),k(this,Je)[p]=void 0,k(this,Ee)[p]=void 0,p===k(this,yt))ye(this,yt,k(this,Ht)[p]);else if(p===k(this,Et))ye(this,Et,k(this,Pt)[p]);else{const m=k(this,Ht)[p];k(this,Pt)[m]=k(this,Pt)[p];const y=k(this,Pt)[p];k(this,Ht)[y]=k(this,Ht)[p]}ja(this,pt)._--,k(this,kn).push(p)}}if(k(this,Rt)&&((c=k(this,vt))!=null&&c.length)){const p=k(this,vt);let h;for(;h=p==null?void 0:p.shift();)(d=k(this,bn))==null||d.call(this,...h)}return o},Ud=function(e){var n,o,i;for(const l of ue(this,re,Lr).call(this,{allowStale:!0})){const c=k(this,Ee)[l];if(ue(this,re,et).call(this,c))c.__abortController.abort(new Error("deleted"));else{const d=k(this,Je)[l];k(this,Tn)&&((n=k(this,wn))==null||n.call(this,c,d,e)),k(this,Rt)&&((o=k(this,vt))==null||o.push([c,d,e]))}}if(k(this,dt).clear(),k(this,Ee).fill(void 0),k(this,Je).fill(void 0),k(this,qt)&&k(this,En)&&(k(this,qt).fill(0),k(this,En).fill(0)),k(this,Sn)&&k(this,Sn).fill(0),ye(this,Et,0),ye(this,yt,0),k(this,kn).length=0,ye(this,xn,0),ye(this,pt,0),k(this,Rt)&&k(this,vt)){const l=k(this,vt);let c;for(;c=l==null?void 0:l.shift();)(i=k(this,bn))==null||i.call(this,...c)}};let mc=yc;const ZB={cacheSize:15e6};class jB{constructor(e){We(this,"_str");We(this,"_rawJson");We(this,"_zodSchema");We(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 Jr=class Jr{constructor(e){We(this,"fileDataCache");We(this,"fileDataRefs",new Map);const n={...ZB,...e??{}};this.fileDataCache=new mc({maxSize:n.cacheSize,fetchMethod:async o=>new jB(await mu().blobDriver.getContent(o)),sizeCalculation:o=>o.bytes.length,dispose:(o,i)=>{this.fileDataRefs.delete(i)}})}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 i=await this.fileDataCache.fetch(e);o.value=i}catch(i){console.error(i)}})(),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 i,l;return n===void 0?(i=o==null?void 0:o.value)==null?void 0:i.rawJson:(l=o==null?void 0:o.value)==null?void 0:l.validatedJson(n)})}static getContentBytes(e){return Jr.globalInstance.getContentBytes(e)}static getContentString(e){return Jr.globalInstance.getContentString(e)}static getContentJson(e,n){return Jr.globalInstance.getContentJson(e,n)}};We(Jr,"globalInstance",new Jr);let gc=Jr;L.AgGridTheme=Mu,L.BlockLayout=GN,L.ContextProvider=SE,L.DataTable=p0,L.DemoData=SN,L.DropdownListItem=yo,L.LongText=Ml,L.MultiError=Xa,L.PlAccordion=Bk,L.PlAccordionSection=Gk,L.PlAgCellFile=fA,L.PlAgDataTable=cA,L.PlAgDataTableToolsPanel=sA,L.PlAgGridColumnManager=nh,L.PlAgOverlayLoading=Kp,L.PlAgOverlayNoRows=Xp,L.PlAgTextAndButtonCell=yA,L.PlAlert=U0,L.PlBlockPage=A0,L.PlBtnAccent=aw,L.PlBtnDanger=cw,L.PlBtnGhost=_o,L.PlBtnGroup=dp,L.PlBtnLink=hw,L.PlBtnPrimary=Ns,L.PlBtnSecondary=Pl,L.PlBtnSplit=nw,L.PlCheckbox=Gx,L.PlCheckboxGroup=Zx,L.PlChip=Gl,L.PlContainer=B0,L.PlDialogModal=zl,L.PlDropdown=wo,L.PlDropdownLegacy=ux,L.PlDropdownLine=Cp,L.PlDropdownMulti=Lx,L.PlDropdownRef=Gb,L.PlEditableTitle=Ow,L.PlFileDialog=Tp,L.PlFileInput=Up,L.PlGrid=O0,L.PlIcon16=Co,L.PlIcon24=Ci,L.PlLogView=bp,L.PlMaskIcon16=fn,L.PlMaskIcon24=Lt,L.PlNotificationAlert=Zp,L.PlNumberField=xx,L.PlProgressBar=gx,L.PlRow=R0,L.PlSearchField=gp,L.PlSectionSeparator=xp,L.PlSlideModal=Vs,L.PlSpacer=lp,L.PlTableFilters=MB,L.PlTabs=Sk,L.PlTextArea=Cb,L.PlTextField=jr,L.PlToggleSwitch=Bs,L.PlTooltip=xt,L.ReactiveFileContent=gc,L.Scrollable=f1,L.Slider=jp,L.SliderRange=d1,L.SliderRangeTriple=JE,L.ThemeSwitcher=b0,L.UnresolvedError=Ka,L.ValueOrErrorsComponent=pA,L.activateAgGrid=Lu,L.animate=np,L.animateInfinite=y0,L.call=Yu,L.computedResult=zB,L.createModel=nl,L.debounce=rp,L.defineApp=$_,L.defineStore=$B,L.delay=Ju,L.detectOutside=wb,L.ensureError=Qa,L.eventListener=Ol,L.formatZodError=tl,L.getElementScrollPosition=vp,L.identity=Ja,L.isDefined=Mg,L.isElementVisible=yp,L.isJsonEqual=Ya,L.isZodError=el,L.listToOptions=v0,L.makeEaseInOut=g0,L.makeEaseOut=tp,L.maskIcons16=xN,L.maskIcons24=kN,L.normalizeListOptions=yr,L.notEmpty=Tl,L.randomInt=ep,L.randomString=m0,L.requestTick=Nl,L.scrollIntoView=wi,L.showContextMenu=kl,L.throttle=op,L.timeout=Qu,L.unwrapOptionalResult=Lg,L.unwrapValueOrErrors=Jd,L.useClickOutside=As,L.useDraggable=$E,L.useEventListener=st,L.useFormState=ME,L.useHover=Ku,L.useInterval=LE,L.useLabelNotch=Xn,L.useLocalStorage=ip,L.useMouse=qu,L.useMouseCapture=gr,L.usePosition=vo,L.useQuery=GE,L.useResizeObserver=Wp,L.useScroll=FE,L.useSdkPlugin=_l,L.useSortable=qp,L.useTheme=ap,L.useWatchFetch=Ih,L.wrapOptionalResult=Qd,L.wrapValueOrErrors=Og,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|
|
90
|
+
`)+Y+`return __p
|
|
91
|
+
}`;var De=_g(function(){return We(_,he+"return "+Y).apply(n,N)});if(De.source=Y,Nd(De))throw De;return De}function OL(s){return He(s).toLowerCase()}function LL(s){return He(s).toUpperCase()}function ML(s,a,u){if(s=He(s),s&&(u||a===n))return Nf(s);if(!s||!(a=Jt(a)))return s;var f=Vn(s),g=Vn(a),_=Af(f,g),N=Vf(f,g)+1;return Ir(f,_,N).join("")}function GL(s,a,u){if(s=He(s),s&&(u||a===n))return s.slice(0,Pf(s)+1);if(!s||!(a=Jt(a)))return s;var f=Vn(s),g=Vf(f,Vn(a))+1;return Ir(f,0,g).join("")}function $L(s,a,u){if(s=He(s),s&&(u||a===n))return s.replace(Nc,"");if(!s||!(a=Jt(a)))return s;var f=Vn(s),g=Af(f,Vn(a));return Ir(f,g).join("")}function zL(s,a){var u=G,f=z;if(ot(a)){var g="separator"in a?a.separator:g;u="length"in a?Be(a.length):u,f="omission"in a?Jt(a.omission):f}s=He(s);var _=s.length;if(Lo(s)){var N=Vn(s);_=N.length}if(u>=_)return s;var B=u-Mo(f);if(B<1)return f;var I=N?Ir(N,0,B).join(""):s.slice(0,B);if(g===n)return I+f;if(N&&(B+=I.length-B),Ad(g)){if(s.slice(B).search(g)){var K,X=I;for(g.global||(g=Wc(g.source,He(Kh.exec(g))+"g")),g.lastIndex=0;K=g.exec(X);)var Y=K.index;I=I.slice(0,Y===n?B:Y)}}else if(s.indexOf(Jt(g),B)!=B){var ie=I.lastIndexOf(g);ie>-1&&(I=I.slice(0,ie))}return I+f}function UL(s){return s=He(s),s&&eP.test(s)?s.replace(jh,vR):s}var ZL=jo(function(s,a,u){return s+(u?" ":"")+a.toUpperCase()}),Pd=Cm("toUpperCase");function vg(s,a,u){return s=He(s),a=u?n:a,a===n?hR(s)?wR(s):oR(s):s.match(a)||[]}var _g=Ie(function(s,a){try{return Xt(s,n,a)}catch(u){return Nd(u)?u:new Te(u)}}),WL=or(function(s,a){return rn(a,function(u){u=jn(u),nr(s,u,Ed(s[u],s))}),s});function jL(s){var a=s==null?0:s.length,u=ge();return s=a?tt(s,function(f){if(typeof f[1]!="function")throw new on(c);return[u(f[0]),f[1]]}):[],Ie(function(f){for(var g=-1;++g<a;){var _=s[g];if(Xt(_[0],this,f))return Xt(_[1],this,f)}})}function HL(s){return vD(an(s,y))}function Rd(s){return function(){return s}}function qL(s,a){return s==null||s!==s?a:s}var KL=bm(),XL=bm(!0);function zt(s){return s}function Dd(s){return Jf(typeof s=="function"?s:an(s,y))}function YL(s){return em(an(s,y))}function JL(s,a){return tm(s,an(a,y))}var QL=Ie(function(s,a){return function(u){return is(u,s,a)}}),eM=Ie(function(s,a){return function(u){return is(s,u,a)}});function Id(s,a,u){var f=_t(a),g=Sa(a,f);u==null&&!(ot(a)&&(g.length||!f.length))&&(u=a,a=s,s=this,g=Sa(a,_t(a)));var _=!(ot(u)&&"chain"in u)||!!u.chain,N=sr(s);return rn(g,function(B){var I=a[B];s[B]=I,N&&(s.prototype[B]=function(){var K=this.__chain__;if(_||K){var X=s(this.__wrapped__),Y=X.__actions__=Mt(this.__actions__);return Y.push({func:I,args:arguments,thisArg:s}),X.__chain__=K,X}return I.apply(s,Ar([this.value()],arguments))})}),s}function tM(){return Ct._===this&&(Ct._=TR),this}function Fd(){}function nM(s){return s=Be(s),Ie(function(a){return nm(a,s)})}var rM=hd(tt),oM=hd(xf),iM=hd(Lc);function Cg(s){return Cd(s)?Mc(jn(s)):ID(s)}function sM(s){return function(a){return s==null?n:oo(s,a)}}var aM=km(),lM=km(!0);function Od(){return[]}function Ld(){return!1}function cM(){return{}}function dM(){return""}function uM(){return!0}function pM(s,a){if(s=Be(s),s<1||s>q)return[];var u=ke,f=Tt(s,ke);a=ge(a),s-=ke;for(var g=zc(f,a);++u<s;)a(u);return g}function hM(s){return Ne(s)?tt(s,jn):Qt(s)?[s]:Mt(Gm(He(s)))}function fM(s){var a=++SR;return He(s)+a}var mM=Ba(function(s,a){return s+a},0),gM=fd("ceil"),yM=Ba(function(s,a){return s/a},1),vM=fd("floor");function _M(s){return s&&s.length?ka(s,zt,Qc):n}function CM(s,a){return s&&s.length?ka(s,ge(a,2),Qc):n}function wM(s){return Ef(s,zt)}function bM(s,a){return Ef(s,ge(a,2))}function xM(s){return s&&s.length?ka(s,zt,rd):n}function kM(s,a){return s&&s.length?ka(s,ge(a,2),rd):n}var SM=Ba(function(s,a){return s*a},1),EM=fd("round"),TM=Ba(function(s,a){return s-a},0);function NM(s){return s&&s.length?$c(s,zt):0}function AM(s,a){return s&&s.length?$c(s,ge(a,2)):0}return v.after=YF,v.ary=Ym,v.assign=LO,v.assignIn=ug,v.assignInWith=Za,v.assignWith=MO,v.at=GO,v.before=Jm,v.bind=Ed,v.bindAll=WL,v.bindKey=Qm,v.castArray=cO,v.chain=qm,v.chunk=vI,v.compact=_I,v.concat=CI,v.cond=jL,v.conforms=HL,v.constant=Rd,v.countBy=NF,v.create=$O,v.curry=eg,v.curryRight=tg,v.debounce=ng,v.defaults=zO,v.defaultsDeep=UO,v.defer=JF,v.delay=QF,v.difference=wI,v.differenceBy=bI,v.differenceWith=xI,v.drop=kI,v.dropRight=SI,v.dropRightWhile=EI,v.dropWhile=TI,v.fill=NI,v.filter=VF,v.flatMap=RF,v.flatMapDeep=DF,v.flatMapDepth=IF,v.flatten=Zm,v.flattenDeep=AI,v.flattenDepth=VI,v.flip=eO,v.flow=KL,v.flowRight=XL,v.fromPairs=BI,v.functions=XO,v.functionsIn=YO,v.groupBy=FF,v.initial=RI,v.intersection=DI,v.intersectionBy=II,v.intersectionWith=FI,v.invert=QO,v.invertBy=eL,v.invokeMap=LF,v.iteratee=Dd,v.keyBy=MF,v.keys=_t,v.keysIn=$t,v.map=La,v.mapKeys=nL,v.mapValues=rL,v.matches=YL,v.matchesProperty=JL,v.memoize=Ga,v.merge=oL,v.mergeWith=pg,v.method=QL,v.methodOf=eM,v.mixin=Id,v.negate=$a,v.nthArg=nM,v.omit=iL,v.omitBy=sL,v.once=tO,v.orderBy=GF,v.over=rM,v.overArgs=nO,v.overEvery=oM,v.overSome=iM,v.partial=Td,v.partialRight=rg,v.partition=$F,v.pick=aL,v.pickBy=hg,v.property=Cg,v.propertyOf=sM,v.pull=GI,v.pullAll=jm,v.pullAllBy=$I,v.pullAllWith=zI,v.pullAt=UI,v.range=aM,v.rangeRight=lM,v.rearg=rO,v.reject=ZF,v.remove=ZI,v.rest=oO,v.reverse=kd,v.sampleSize=jF,v.set=cL,v.setWith=dL,v.shuffle=HF,v.slice=WI,v.sortBy=XF,v.sortedUniq=JI,v.sortedUniqBy=QI,v.split=RL,v.spread=iO,v.tail=eF,v.take=tF,v.takeRight=nF,v.takeRightWhile=rF,v.takeWhile=oF,v.tap=_F,v.throttle=sO,v.thru=Oa,v.toArray=lg,v.toPairs=fg,v.toPairsIn=mg,v.toPath=hM,v.toPlainObject=dg,v.transform=uL,v.unary=aO,v.union=iF,v.unionBy=sF,v.unionWith=aF,v.uniq=lF,v.uniqBy=cF,v.uniqWith=dF,v.unset=pL,v.unzip=Sd,v.unzipWith=Hm,v.update=hL,v.updateWith=fL,v.values=Ko,v.valuesIn=mL,v.without=uF,v.words=vg,v.wrap=lO,v.xor=pF,v.xorBy=hF,v.xorWith=fF,v.zip=mF,v.zipObject=gF,v.zipObjectDeep=yF,v.zipWith=vF,v.entries=fg,v.entriesIn=mg,v.extend=ug,v.extendWith=Za,Id(v,v),v.add=mM,v.attempt=_g,v.camelCase=_L,v.capitalize=gg,v.ceil=gM,v.clamp=gL,v.clone=dO,v.cloneDeep=pO,v.cloneDeepWith=hO,v.cloneWith=uO,v.conformsTo=fO,v.deburr=yg,v.defaultTo=qL,v.divide=yM,v.endsWith=CL,v.eq=Pn,v.escape=wL,v.escapeRegExp=bL,v.every=AF,v.find=BF,v.findIndex=zm,v.findKey=ZO,v.findLast=PF,v.findLastIndex=Um,v.findLastKey=WO,v.floor=vM,v.forEach=Km,v.forEachRight=Xm,v.forIn=jO,v.forInRight=HO,v.forOwn=qO,v.forOwnRight=KO,v.get=Vd,v.gt=mO,v.gte=gO,v.has=JO,v.hasIn=Bd,v.head=Wm,v.identity=zt,v.includes=OF,v.indexOf=PI,v.inRange=yL,v.invoke=tL,v.isArguments=ao,v.isArray=Ne,v.isArrayBuffer=yO,v.isArrayLike=Gt,v.isArrayLikeObject=at,v.isBoolean=vO,v.isBuffer=Fr,v.isDate=_O,v.isElement=CO,v.isEmpty=wO,v.isEqual=bO,v.isEqualWith=xO,v.isError=Nd,v.isFinite=kO,v.isFunction=sr,v.isInteger=og,v.isLength=za,v.isMap=ig,v.isMatch=SO,v.isMatchWith=EO,v.isNaN=TO,v.isNative=NO,v.isNil=VO,v.isNull=AO,v.isNumber=sg,v.isObject=ot,v.isObjectLike=it,v.isPlainObject=us,v.isRegExp=Ad,v.isSafeInteger=BO,v.isSet=ag,v.isString=Ua,v.isSymbol=Qt,v.isTypedArray=qo,v.isUndefined=PO,v.isWeakMap=RO,v.isWeakSet=DO,v.join=OI,v.kebabCase=xL,v.last=cn,v.lastIndexOf=LI,v.lowerCase=kL,v.lowerFirst=SL,v.lt=IO,v.lte=FO,v.max=_M,v.maxBy=CM,v.mean=wM,v.meanBy=bM,v.min=xM,v.minBy=kM,v.stubArray=Od,v.stubFalse=Ld,v.stubObject=cM,v.stubString=dM,v.stubTrue=uM,v.multiply=SM,v.nth=MI,v.noConflict=tM,v.noop=Fd,v.now=Ma,v.pad=EL,v.padEnd=TL,v.padStart=NL,v.parseInt=AL,v.random=vL,v.reduce=zF,v.reduceRight=UF,v.repeat=VL,v.replace=BL,v.result=lL,v.round=EM,v.runInContext=P,v.sample=WF,v.size=qF,v.snakeCase=PL,v.some=KF,v.sortedIndex=jI,v.sortedIndexBy=HI,v.sortedIndexOf=qI,v.sortedLastIndex=KI,v.sortedLastIndexBy=XI,v.sortedLastIndexOf=YI,v.startCase=DL,v.startsWith=IL,v.subtract=TM,v.sum=NM,v.sumBy=AM,v.template=FL,v.times=pM,v.toFinite=ar,v.toInteger=Be,v.toLength=cg,v.toLower=OL,v.toNumber=dn,v.toSafeInteger=OO,v.toString=He,v.toUpper=LL,v.trim=ML,v.trimEnd=GL,v.trimStart=$L,v.truncate=zL,v.unescape=UL,v.uniqueId=fM,v.upperCase=ZL,v.upperFirst=Pd,v.each=Km,v.eachRight=Xm,v.first=Wm,Id(v,function(){var s={};return Zn(v,function(a,u){qe.call(v.prototype,u)||(s[u]=a)}),s}(),{chain:!1}),v.VERSION=o,rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){v[s].placeholder=v}),rn(["drop","take"],function(s,a){Oe.prototype[s]=function(u){u=u===n?1:mt(Be(u),0);var f=this.__filtered__&&!a?new Oe(this):this.clone();return f.__filtered__?f.__takeCount__=Tt(u,f.__takeCount__):f.__views__.push({size:Tt(u,ke),type:s+(f.__dir__<0?"Right":"")}),f},Oe.prototype[s+"Right"]=function(u){return this.reverse()[s](u).reverse()}}),rn(["filter","map","takeWhile"],function(s,a){var u=a+1,f=u==C||u==M;Oe.prototype[s]=function(g){var _=this.clone();return _.__iteratees__.push({iteratee:ge(g,3),type:u}),_.__filtered__=_.__filtered__||f,_}}),rn(["head","last"],function(s,a){var u="take"+(a?"Right":"");Oe.prototype[s]=function(){return this[u](1).value()[0]}}),rn(["initial","tail"],function(s,a){var u="drop"+(a?"":"Right");Oe.prototype[s]=function(){return this.__filtered__?new Oe(this):this[u](1)}}),Oe.prototype.compact=function(){return this.filter(zt)},Oe.prototype.find=function(s){return this.filter(s).head()},Oe.prototype.findLast=function(s){return this.reverse().find(s)},Oe.prototype.invokeMap=Ie(function(s,a){return typeof s=="function"?new Oe(this):this.map(function(u){return is(u,s,a)})}),Oe.prototype.reject=function(s){return this.filter($a(ge(s)))},Oe.prototype.slice=function(s,a){s=Be(s);var u=this;return u.__filtered__&&(s>0||a<0)?new Oe(u):(s<0?u=u.takeRight(-s):s&&(u=u.drop(s)),a!==n&&(a=Be(a),u=a<0?u.dropRight(-a):u.take(a-s)),u)},Oe.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Oe.prototype.toArray=function(){return this.take(ke)},Zn(Oe.prototype,function(s,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),f=/^(?:head|last)$/.test(a),g=v[f?"take"+(a=="last"?"Right":""):a],_=f||/^find/.test(a);g&&(v.prototype[a]=function(){var N=this.__wrapped__,B=f?[1]:arguments,I=N instanceof Oe,K=B[0],X=I||Ne(N),Y=function(Fe){var Le=g.apply(v,Ar([Fe],B));return f&&ie?Le[0]:Le};X&&u&&typeof K=="function"&&K.length!=1&&(I=X=!1);var ie=this.__chain__,he=!!this.__actions__.length,ve=_&&!ie,De=I&&!he;if(!_&&X){N=De?N:new Oe(this);var _e=s.apply(N,B);return _e.__actions__.push({func:Oa,args:[Y],thisArg:n}),new sn(_e,ie)}return ve&&De?s.apply(this,B):(_e=this.thru(Y),ve?f?_e.value()[0]:_e.value():_e)})}),rn(["pop","push","shift","sort","splice","unshift"],function(s){var a=ca[s],u=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",f=/^(?:pop|shift)$/.test(s);v.prototype[s]=function(){var g=arguments;if(f&&!this.__chain__){var _=this.value();return a.apply(Ne(_)?_:[],g)}return this[u](function(N){return a.apply(Ne(N)?N:[],g)})}}),Zn(Oe.prototype,function(s,a){var u=v[a];if(u){var f=u.name+"";qe.call(Uo,f)||(Uo[f]=[]),Uo[f].push({name:a,func:u})}}),Uo[Va(n,b).name]=[{name:"wrapper",func:n}],Oe.prototype.clone=UR,Oe.prototype.reverse=ZR,Oe.prototype.value=WR,v.prototype.at=CF,v.prototype.chain=wF,v.prototype.commit=bF,v.prototype.next=xF,v.prototype.plant=SF,v.prototype.reverse=EF,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=TF,v.prototype.first=v.prototype.head,Ji&&(v.prototype[Ji]=kF),v},Go=bR();Qr?((Qr.exports=Go)._=Go,Dc._=Go):Ct._=Go}).call(Xo)}($s,$s.exports);var ze=$s.exports;const $N={class:"grid-overlay-container"},Xp=r.defineComponent({__name:"PlAgOverlayLoading",props:{params:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",$N,[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))]))}}),zN={},UN={class:"grid-overlay-container"};function ZN(t,e){return r.openBlock(),r.createElementBlock("div",UN,e[0]||(e[0]=[r.createElementVNode("div",{class:"grid-icon-sad-cat"},null,-1),r.createElementVNode("span",{class:"text-subtitle-m"},"Empty",-1)]))}const Yp=Xl(zN,[["render",ZN]]);async function WN(t,e){throw Error("not implemented")}function jN(t){return t.axesSpec.filter(e=>{var n;return((n=e.annotations)==null?void 0:n["pl7.app/axisNature"])==="heterogeneous"})}function HN(t,e){const n=[];for(const o of e)if(t[o].type==="column"){const i=jN(t[o].spec);for(const l of i){if(l.type!=="String"){console.warn("heterogeneous axis with string type expected, got",l,"skipping");continue}const c=cl(l),d=t.findIndex(p=>ze.isEqual(p.id,c));if(d===-1)throw console.error("axis not found",o,c,t),Error("axis not found");n.push({columnIdx:o,axisIdx:d})}}return n}const Jp=(t,e)=>(t+e).toString();function qN(t,e,n,o,i,l){if(t.length>1)throw Error("hColumns.length > 1 is not supported");const c=t[0];let d=-1,p=-1;for(let y=0;y<l.length;++y)l[y]===c.axisIdx&&(d=y),l[y]===c.columnIdx&&(p=y);const h=(()=>{const x=o[d].data.filter(w=>w!==null);return Array.from(new Set(x))})();h.sort(),p>d?(n.splice(p,1),n.splice(d,1)):(n.splice(d,1),n.splice(p,1));const m=KN(i,o,d,p,h,e.rows);for(let y=0;y<h.length;++y){const x=h[y],w=Gr(x+"@"+y);n.push({colId:w,field:Jp(o.length,y),headerName:x,valueFormatter:eh})}return{rowModelType:"clientSide",columnDefs:n,rowData:m}}function KN(t,e,n,o,i,l){const c=new Map;let d=0;for(let h=0;h<l;h++){const m={};for(let O=0;O<e.length;++O){if(O===n||O===o)continue;const $=t[O].toString();m[$]=e[O].data[h]}let y;const x=Gr(Object.values(m))??"";c.has(x)?y=c.get(x):(c.set(x,m),y=m,y.id=d.toString(),d++);const w=i.indexOf(e[n].data[h]);if(w===-1)throw Error("index not found");const E=Jp(e.length,w);y[E]=e[o].data[h]}return Array.from(c.values())}function XN(t){return Gr(t)}function Qp(t){return JSON.parse(t)}const eh=t=>t?t.value===void 0?"NULL":t.value===null?"NA":t.value.toString():"ERROR";function YN(t,e,n){var i,l,c;const o=XN(e);return{colId:o,field:t.toString(),headerName:((l=(i=e.spec.annotations)==null?void 0:i["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:eh,cellDataType:(d=>{switch(d){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${d}`)}})(e.type==="axis"?e.spec.type:e.spec.valueType)}}function th(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 nh(t){const e=[];return bs(t,n=>(e.push(n),n)),e}async function JN(t,e,n){return n.length?(await t.findColumns(e,{columnFilter:{name:["pl7.app/label"]},compatibleWith:ze.uniqWith(n.map(i=>fu(i.spec.axesSpec).map(ze.cloneDeep)).flat(),ze.isEqual),strictlyCompatible:!0})).hits.filter(i=>i.spec.axesSpec.length===1):[]}async function QN(t,e,n){const o=nh(n),l=(await JN(t,e,o)).filter(c=>!ze.find(o,d=>c.columnId===d.columnId));return l.length===0?n:{type:"outer",primary:n,secondary:l.map(c=>({type:"column",column:c}))}}async function eA(t,e,n,o){const i=n.filter(m=>m.type!=="Bytes"),l=nh(o),c=i.map(m=>[]),d=i.map(m=>null);for(let m=0;m<l.length;++m){const y=fu(l[m].spec.axesSpec);for(let x=0;x<y.length;++x){const w=ze.findIndex(i,E=>ze.isEqual(E,y[x]));w===-1||d[w]||(y.length===1&&l[m].spec.name==="pl7.app/label"?(c[w]=[[m,x]],d[w]=l[m].columnId):c[w].push([m,x]))}}for(let m=i.length-1;m>=0;--m)c[m].length||(d.splice(m,1),c.splice(m,1),i.splice(m,1));const p=100,h=i.map(m=>new Set);e:for(let m=i.length-1;m>=0;--m){for(const[y,x]of c[m]){const w=await t.getUniqueValues(e,{columnId:l[y].columnId,...!d[m]&&{axis:ze.cloneDeep(i[m])},filters:[],limit:p});if(w.overflow){d.splice(m,1),c.splice(m,1),i.splice(m,1);continue e}const E=w.values.type;for(const O of w.values.data)if(!(hu(O,E)||O===null)&&(h[m].add(th(O,E)),h[m].size===p)){d.splice(m,1),c.splice(m,1),i.splice(m,1);continue e}}if(!h[m].size){d.splice(m,1),c.splice(m,1),i.splice(m,1);continue e}}return i.map((m,y)=>{const x=[...h[y]].map(E=>({value:E,label:E.toString()})),w=x[0].value;return{axis:ze.cloneDeep(m),...d[y]&&{column:d[y]},options:x,defaultValue:w}})}function tA(t,e,n,o){const i=t.length,l=[];for(let c=0;c<e[0].data.length;++c){const d=[],p=(o++).toString();for(const m of n)d.push(e[m].data[c]);const h={key:d,id:p};for(let m=0;m<i;++m){const y=t[m].toString(),x=e[m].data[c],w=e[m].type;Hy(e[m].absent,c)?h[y]=void 0:hu(x,w)||x===null?h[y]=null:h[y]=th(x,w)}l.push(h)}return l}const nA=t=>t.type==="column"&&t.spec.axesSpec.length===1&&t.spec.name==="pl7.app/label";async function rA(t,e,n,o){const i=await t.getSpec(e);let l=i.findIndex(b=>b.type==="column");l===-1&&(l=i.length);const c=[...i.keys()].filter(b=>!ze.find(n,R=>ze.isEqual(R.axis,i[b].id)||ze.isEqual(R.column,i[b].id))).sort((b,R)=>{var V,Z;if(i[b].type!==i[R].type)return i[b].type==="axis"?-1:1;const F=(V=i[b].spec.annotations)==null?void 0:V["pl7.app/table/orderPriority"],D=(Z=i[R].spec.annotations)==null?void 0:Z["pl7.app/table/orderPriority"];return F===void 0?D===void 0?0:1:D===void 0?-1:Number(D)-Number(F)}),d=ze.cloneDeep(c),p=HN(i,c);for(let b=c.length-1;b>=0;--b){const R=c[b];if(!nA(i[R]))continue;const F=cl(i[R].spec.axesSpec[0]),D=ze.findIndex(c,V=>ze.isEqual(i[V].id,F));if(D===-1&&ze.findIndex(n,Z=>ze.isEqual(Z.axis,F))===-1){console.warn(`added label column, but the axis is not in the data; axisId: ${F}`);continue}c[D]=R;for(const V of p)V.axisIdx===R&&(V.axisIdx=D);c.splice(b,1),d.splice(b,1)}const h=await t.getShape(e),m=h.rows,y=d.map(b=>YN(b,i[b],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 qN(p,h,y,await t.getData(e,c),d,c);const x=[...c],w=new Map;for(let b=0;b<l;++b)w.set(b,-1);for(let b=0;b<x.length;++b){const R=x[b];w.has(R)&&w.set(R,b)}for(const[b,R]of w)R===-1&&(w.set(b,x.length),x.push(b));const E=[];for(let b=0;b<l;++b){const R=w.get(b);if(R===void 0||R===-1)throw new Error("assertion exception");E.push(R)}let O;return{rowModelType:"serverSide",columnDefs:y,serverSideDatasource:{getRows:async b=>{try{if(m==0){b.success({rowData:[],rowCount:m}),b.api.setGridOption("loading",!1),b.api.showNoRowsOverlay();return}if(O&&!ze.isEqual(O.request.sortModel,b.request.sortModel)){O=void 0,b.api.setGridOption("loading",!0),b.success({rowData:[],rowCount:0});return}O=b;let R=0,F=[];if(m>0&&b.request.startRow!==void 0&&b.request.endRow!==void 0&&(R=Math.min(m,b.request.endRow)-b.request.startRow,R>0)){const D=await t.getData(e,x,{offset:b.request.startRow,length:R});F=tA(d,D,E,b.request.startRow)}b.success({rowData:F,rowCount:m}),b.api.autoSizeAllColumns(),b.api.setGridOption("loading",!1)}catch(R){b.api.setGridOption("loading",!0),b.fail(),console.trace(R)}}}}}const Yl=Dg(),oA=["onClick"],rh=r.defineComponent({__name:"PlAgGridColumnManager",props:{api:{}},setup(t){const e=t,{api:n}=r.toRefs(e),o=r.ref([]),i=r.ref(),l=r.ref(!1),c=r.ref(0);Kp(i,{handle:".handle",onChange(p){n.value.moveColumns(p.map(h=>o.value[h]),0)}});function d(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,h)=>(r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(),r.createBlock(r.Teleport,{to:`#${r.unref(Yl)}`},[r.createVNode(r.unref(_o),{onClick:h[0]||(h[0]=r.withModifiers(m=>l.value=!l.value,["stop"]))},{append:r.withCtx(()=>[r.createVNode(r.unref(Lt),{name:"columns"})]),default:r.withCtx(()=>[h[2]||(h[2]=r.createTextVNode(" Columns "))]),_:1})],8,["to"])),r.createVNode(r.unref(Vs),{modelValue:l.value,"onUpdate:modelValue":h[1]||(h[1]=m=>l.value=m),width:"368px","close-on-outside-click":""},{title:r.withCtx(()=>h[3]||(h[3]=[r.createTextVNode("Columns")])),default:r.withCtx(()=>[(r.openBlock(),r.createElementBlock("div",{ref_key:"listRef",ref:i,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(fn),{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=>d(m)},[r.createVNode(r.unref(xt),{"close-delay":500,position:"top"},{tooltip:r.withCtx(()=>h[4]||(h[4]=[r.createTextVNode("Show/Hide")])),default:r.withCtx(()=>[r.createVNode(r.unref(Lt),{name:m.isVisible()?"view-show":"view-hide"},null,8,["name"])]),_:2},1024)],8,oA)]))),128))]))]),_:1},8,["modelValue"])]))}}),iA=["id"],sA=r.defineComponent({__name:"PlAgDataTableToolsPanel",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{id:r.unref(Yl),class:"d-flex gap-6"},[r.renderSlot(e.$slots,"default")],8,iA))}}),aA={class:"ap-ag-data-table-container"},lA={key:1,class:"ap-ag-data-table-sheets"},cA=Xl(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}){T.ModuleRegistry.registerModules([hs.ClientSideRowModelModule,Wd.ClipboardModule,Zd.ServerSideRowModelModule,jd.RangeSelectionModule,hl,Ou]);const o=r.useModel(t,"modelValue"),i=t,{settings:l}=r.toRefs(i),c=n;r.watch(()=>l.value,async(A,C)=>{if(A.sourceType!=="pframe"||!A.pFrame||!A.join||C&&C.sourceType==="pframe"&&ze.isEqual(A.pFrame,C.pFrame)&&ze.isEqual(A.join,C.join))return;const k=window.platforma;if(!k)throw Error("platforma not set");const M=k.pFrameDriver;if(!M)throw Error("platforma.pFrameDriver not set");const W=await QN(M,A.pFrame,A.join),q=o.value;q.pTableParams||(q.pTableParams={sorting:[],filters:[]}),q.pTableParams.join=W,o.value=q});const d=Fh(()=>l.value.sourceType,async A=>{var k;const C=l.value.sourceType;switch(C){case"pframe":{const M=window.platforma;if(!M)throw Error("platforma not set");const W=M.pFrameDriver;if(!W)throw Error("platforma.pFrameDriver not set");if(!l.value.pFrame)return[];const q=l.value.pFrame,re=(k=o.value.pTableParams)==null?void 0:k.join;return re?await eA(W,q,l.value.sheetAxes,re):[]}case"ptable":return l.value.sheets??[];case"xsv":return[];default:throw Error(`unsupported source type: ${C}`)}});function p(A){if(!(l.value.sourceType!=="ptable"&&l.value.sourceType!=="pframe"))return(A==null?void 0:A.sortModel.map(C=>{const{spec:k,...M}=Qp(C.colId);return{column:M,ascending:C.sort==="asc",naAndAbsentAreLeastValues:!0}}))??[]}const h=r.computed({get:()=>{const A=o.value;return{columnOrder:A.gridState.columnOrder,sort:A.gridState.sort,columnVisibility:A.gridState.columnVisibility}},set:A=>{const C=o.value,k=E.value.rowModelType==="clientSide"?void 0:p(A.sort);C.gridState={...C.gridState,...A},(l.value.sourceType==="ptable"||l.value.sourceType==="pframe")&&(C.pTableParams||(C.pTableParams={sorting:[],filters:[]}),C.pTableParams.sorting=k),o.value=C}}),m=A=>Gr(A);function y(A){var C;if(!(l.value.sourceType!=="ptable"&&l.value.sourceType!=="pframe"))return((C=d.value)==null?void 0:C.map(k=>({type:"bySingleColumnV2",column:k.column?{type:"column",id:k.column}:{type:"axis",id:k.axis},predicate:{operator:"Equal",reference:A[m(k.axis)]}})))??[]}const x=r.computed({get:()=>o.value.gridState.sheets??{},set:A=>{const C=y(A),k=o.value;k.gridState.sheets=A,(l.value.sourceType==="ptable"||l.value.sourceType==="pframe")&&(k.pTableParams||(k.pTableParams={sorting:[],filters:[]}),k.pTableParams.filters=C),o.value=k}});r.watch(()=>[l.value,d.value],(A,C)=>{const[k,M]=A;if(!M)return;if(C){const[q,re]=C;if((k.sourceType==="ptable"||k.sourceType==="pframe")&&k.sourceType===(q==null?void 0:q.sourceType)&&ze.isEqual(M,re))return}if(k.sourceType!=="ptable"&&k.sourceType!=="pframe"){x.value={};return}const W=x.value;for(const q of M){const re=m(q.axis);W[re]||(W[re]=q.defaultValue??q.options[0].value)}x.value=W},{immediate:!0});const w=r.shallowRef(),E=r.shallowRef({animateRows:!1,suppressColumnMoveAnimation:!0,cellSelection:!0,initialState:h.value,autoSizeStrategy:{type:"fitCellContents"},onRowDataUpdated:A=>{A.api.autoSizeAllColumns()},onRowDoubleClicked:A=>{A.data&&c("onRowDoubleClicked",A.data.key)},defaultColDef:{suppressHeaderMenuButton:!0},maintainColumnOrder:!0,localeText:{loadingError:"..."},rowModelType:"clientSide",maxBlocksInCache:1e3,cacheBlockSize:100,blockLoadDebounceMillis:500,serverSideSortAllLevels:!0,suppressServerSideFullWidthLoadingRow:!0,getRowId:A=>A.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0},loadingOverlayComponent:Xp,noRowsOverlayComponent:Yp,sideBar:{},defaultCsvExportParams:{allColumns:!0,suppressQuotes:!0,fileName:"table.csv"}}),O=A=>{const C=A.api;w.value=new Proxy(C,{get(k,M,W){switch(M){case"setGridOption":return(q,re)=>{const ue=E.value;ue[q]=re,E.value=ue,C.setGridOption(q,re)};case"updateGridOptions":return q=>{E.value={...E.value,...q},C.updateGridOptions(q)};default:return Reflect.get(k,M,W)}}})},$=A=>({columnOrder:A.columnOrder,sort:A.sort,columnVisibility:A.columnVisibility??(A.columnOrder?{hiddenColIds:[]}:void 0)}),b=A=>{E.value.initialState=h.value=$(A.state),A.api.autoSizeAllColumns()},R=()=>{E.value.initialState=h.value=$(w.value.getState()),w.value=void 0};let F=!1;const D=()=>{if(!F)return;const A=w.value;A!==void 0&&(A.exportDataAsCsv(),F=!1,A.setGridOption("cacheBlockSize",100))},V=()=>{if(!F)return;const A=w.value;if(A===void 0)return;const C=A.getServerSideGroupLevelState()[0];C.cacheBlockSize===C.rowCount&&A.refreshServerSide({route:C.route,purge:!1})};e({exportCsv:async()=>{const A=w.value;if(A!==void 0){if(E.value.rowModelType==="clientSide"){A.exportDataAsCsv();return}if(E.value.rowModelType==="serverSide"){const C=A.getServerSideGroupLevelState()[0];if(C.rowCount<=C.cacheBlockSize){A.exportDataAsCsv();return}F||(F=!0,A.setGridOption("cacheBlockSize",C.rowCount))}}}});const ne=r.ref(0);r.watch(()=>[w.value,h.value],(A,C)=>{if(ze.isEqual(A,C))return;const[k,M]=A;if(!k)return;const W=$(k.getState());ze.isEqual(M,W)||(E.value.initialState=M,++ne.value)}),r.watch(()=>E.value,(A,C)=>{var k;if(C&&(A.rowModelType!=C.rowModelType&&++ne.value,!ze.isEqual(A.columnDefs,C.columnDefs)&&A.columnDefs)){const M=re=>!("children"in re),W=(k=A.columnDefs)==null?void 0:k.filter(M),q=W==null?void 0:W.map(re=>re.colId).filter(re=>re!==void 0).map(re=>Qp(re));c("columnsChanged",q??[])}});const H=(A,C)=>{var M;const k=x.value;k[A]!==C&&(k[A]=C,x.value=k,(M=w.value)==null||M.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}}))},J=window.platforma;if(!J)throw Error("platforma not set");const G=J.pFrameDriver;if(!G)throw Error("platforma.pFrameDriver not set");const z=J.blobDriver;if(!z)throw Error("platforma.blobDriver not set");let Q;return r.watch(()=>[w.value,l.value,d.value],async A=>{var q,re;const[C,k,M]=A;if(!C||ze.isEqual(k,Q))return;Q=k;const W=k.sourceType;switch(W){case"pframe":case"ptable":{const ue=k.pTable;if(!ue||!M)return C.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const ke=(re=(q=h.value)==null?void 0:q.columnVisibility)==null?void 0:re.hiddenColIds,Se=await rA(G,ue,M,ke);return C.updateGridOptions({loading:Se.rowModelType!=="clientSide",loadingOverlayComponentParams:{notReady:!1},...Se})}case"xsv":{const ue=k.xsvFile;if(!(ue!=null&&ue.ok)||!ue.value)return C.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const ke=await WN(z,ue.value);return C.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...ke})}default:throw Error(`unsupported source type: ${W}`)}}),(A,C)=>(r.openBlock(),r.createElementBlock("div",aA,[w.value&&A.showColumnsPanel?(r.openBlock(),r.createBlock(r.unref(rh),{key:0,api:w.value},null,8,["api"])):r.createCommentVNode("",!0),r.unref(d).value&&r.unref(d).value.length>0?(r.openBlock(),r.createElementBlock("div",lA,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(d).value,(k,M)=>(r.openBlock(),r.createBlock(r.unref(Cp),{key:M,"model-value":x.value[m(k.axis)],options:k.options,"onUpdate:modelValue":W=>H(m(k.axis),W)},null,8,["model-value","options","onUpdate:modelValue"]))),128))])):r.createCommentVNode("",!0),(r.openBlock(),r.createBlock(r.unref(Vg.AgGridVue),{key:ne.value,theme:r.unref(Mu),class:"ap-ag-data-table-grid","grid-options":E.value,onGridReady:O,onStateUpdated:b,onGridPreDestroyed:R,onStoreRefreshed:D,onModelUpdated:V},null,8,["theme","grid-options"]))]))}}),[["__scopeId","data-v-ea0278e4"]]),dA={key:1,class:"alert-error"},uA={key:2},pA=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),i=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",dA,r.toDisplayString(o.value),1)):r.createCommentVNode("",!0),i.value?(r.openBlock(),r.createElementBlock("div",uA,"Unresolved")):r.createCommentVNode("",!0)]))}}),hA={style:{height:"100%"}},fA=r.defineComponent({__name:"PlAgCellFile",props:{params:{}},setup(t){const e=t,n=r.computed(()=>e.params.extensions),o=r.computed(()=>e.params.value);function i(c){e.params.setValue(c)}const l=r.computed(()=>e.params.resolveProgress?e.params.resolveProgress(o.value):void 0);return(c,d)=>(r.openBlock(),r.createElementBlock("div",hA,[r.createVNode(r.unref(Zp),{"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":i},null,8,["placeholder","extensions","model-value","progress"])]))}}),mA={class:"pl-ag-grid-open-cell d-flex"},gA={class:"pl-ag-grid-open-cell__value"},yA=r.defineComponent({__name:"PlAgTextAndButtonCell",props:{params:{}},setup(t){const e=t;function n(){if(e.params.invokeRowsOnDoubleClick){const o=e.params.api,i={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(i)}else e.params.onClick&&e.params.onClick(e.params)}return(o,i)=>(r.openBlock(),r.createElementBlock("div",mA,[r.createElementVNode("div",gA,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(fn),{name:o.params.icon??"maximize"},null,8,["name"]),r.createTextVNode(" "+r.toDisplayString(o.params.btnLabel??"Open"),1)])]))}});var Jl={exports:{}};const vA="2.0.0",oh=256,_A=Number.MAX_SAFE_INTEGER||9007199254740991,CA=16,wA=oh-6;var zs={MAX_LENGTH:oh,MAX_SAFE_COMPONENT_LENGTH:CA,MAX_SAFE_BUILD_LENGTH:wA,MAX_SAFE_INTEGER:_A,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:vA,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Us=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:i}=zs,l=Us;e=t.exports={};const c=e.re=[],d=e.safeRe=[],p=e.src=[],h=e.t={};let m=0;const y="[a-zA-Z0-9-]",x=[["\\s",1],["\\d",i],[y,o]],w=O=>{for(const[$,b]of x)O=O.split(`${$}*`).join(`${$}{0,${b}}`).split(`${$}+`).join(`${$}{1,${b}}`);return O},E=(O,$,b)=>{const R=w($),F=m++;l(O,F,$),h[O]=F,p[F]=$,c[F]=new RegExp($,b?"g":void 0),d[F]=new RegExp(R,b?"g":void 0)};E("NUMERICIDENTIFIER","0|[1-9]\\d*"),E("NUMERICIDENTIFIERLOOSE","\\d+"),E("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${y}*`),E("MAINVERSION",`(${p[h.NUMERICIDENTIFIER]})\\.(${p[h.NUMERICIDENTIFIER]})\\.(${p[h.NUMERICIDENTIFIER]})`),E("MAINVERSIONLOOSE",`(${p[h.NUMERICIDENTIFIERLOOSE]})\\.(${p[h.NUMERICIDENTIFIERLOOSE]})\\.(${p[h.NUMERICIDENTIFIERLOOSE]})`),E("PRERELEASEIDENTIFIER",`(?:${p[h.NUMERICIDENTIFIER]}|${p[h.NONNUMERICIDENTIFIER]})`),E("PRERELEASEIDENTIFIERLOOSE",`(?:${p[h.NUMERICIDENTIFIERLOOSE]}|${p[h.NONNUMERICIDENTIFIER]})`),E("PRERELEASE",`(?:-(${p[h.PRERELEASEIDENTIFIER]}(?:\\.${p[h.PRERELEASEIDENTIFIER]})*))`),E("PRERELEASELOOSE",`(?:-?(${p[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${p[h.PRERELEASEIDENTIFIERLOOSE]})*))`),E("BUILDIDENTIFIER",`${y}+`),E("BUILD",`(?:\\+(${p[h.BUILDIDENTIFIER]}(?:\\.${p[h.BUILDIDENTIFIER]})*))`),E("FULLPLAIN",`v?${p[h.MAINVERSION]}${p[h.PRERELEASE]}?${p[h.BUILD]}?`),E("FULL",`^${p[h.FULLPLAIN]}$`),E("LOOSEPLAIN",`[v=\\s]*${p[h.MAINVERSIONLOOSE]}${p[h.PRERELEASELOOSE]}?${p[h.BUILD]}?`),E("LOOSE",`^${p[h.LOOSEPLAIN]}$`),E("GTLT","((?:<|>)?=?)"),E("XRANGEIDENTIFIERLOOSE",`${p[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),E("XRANGEIDENTIFIER",`${p[h.NUMERICIDENTIFIER]}|x|X|\\*`),E("XRANGEPLAIN",`[v=\\s]*(${p[h.XRANGEIDENTIFIER]})(?:\\.(${p[h.XRANGEIDENTIFIER]})(?:\\.(${p[h.XRANGEIDENTIFIER]})(?:${p[h.PRERELEASE]})?${p[h.BUILD]}?)?)?`),E("XRANGEPLAINLOOSE",`[v=\\s]*(${p[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[h.XRANGEIDENTIFIERLOOSE]})(?:${p[h.PRERELEASELOOSE]})?${p[h.BUILD]}?)?)?`),E("XRANGE",`^${p[h.GTLT]}\\s*${p[h.XRANGEPLAIN]}$`),E("XRANGELOOSE",`^${p[h.GTLT]}\\s*${p[h.XRANGEPLAINLOOSE]}$`),E("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),E("COERCE",`${p[h.COERCEPLAIN]}(?:$|[^\\d])`),E("COERCEFULL",p[h.COERCEPLAIN]+`(?:${p[h.PRERELEASE]})?(?:${p[h.BUILD]})?(?:$|[^\\d])`),E("COERCERTL",p[h.COERCE],!0),E("COERCERTLFULL",p[h.COERCEFULL],!0),E("LONETILDE","(?:~>?)"),E("TILDETRIM",`(\\s*)${p[h.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",E("TILDE",`^${p[h.LONETILDE]}${p[h.XRANGEPLAIN]}$`),E("TILDELOOSE",`^${p[h.LONETILDE]}${p[h.XRANGEPLAINLOOSE]}$`),E("LONECARET","(?:\\^)"),E("CARETTRIM",`(\\s*)${p[h.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",E("CARET",`^${p[h.LONECARET]}${p[h.XRANGEPLAIN]}$`),E("CARETLOOSE",`^${p[h.LONECARET]}${p[h.XRANGEPLAINLOOSE]}$`),E("COMPARATORLOOSE",`^${p[h.GTLT]}\\s*(${p[h.LOOSEPLAIN]})$|^$`),E("COMPARATOR",`^${p[h.GTLT]}\\s*(${p[h.FULLPLAIN]})$|^$`),E("COMPARATORTRIM",`(\\s*)${p[h.GTLT]}\\s*(${p[h.LOOSEPLAIN]}|${p[h.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",E("HYPHENRANGE",`^\\s*(${p[h.XRANGEPLAIN]})\\s+-\\s+(${p[h.XRANGEPLAIN]})\\s*$`),E("HYPHENRANGELOOSE",`^\\s*(${p[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${p[h.XRANGEPLAINLOOSE]})\\s*$`),E("STAR","(<|>)?=?\\s*\\*"),E("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),E("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Jl,Jl.exports);var Gi=Jl.exports;const bA=Object.freeze({loose:!0}),xA=Object.freeze({});var Ql=t=>t?typeof t!="object"?bA:t:xA;const ih=/^[0-9]+$/,sh=(t,e)=>{const n=ih.test(t),o=ih.test(e);return n&&o&&(t=+t,e=+e),t===e?0:n&&!o?-1:o&&!n?1:t<e?-1:1};var ah={compareIdentifiers:sh,rcompareIdentifiers:(t,e)=>sh(e,t)};const Zs=Us,{MAX_LENGTH:lh,MAX_SAFE_INTEGER:Ws}=zs,{safeRe:ch,t:dh}=Gi,kA=Ql,{compareIdentifiers:No}=ah;var Bt=class Hn{constructor(e,n){if(n=kA(n),e instanceof Hn){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>lh)throw new TypeError(`version is longer than ${lh} characters`);Zs("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const o=e.trim().match(n.loose?ch[dh.LOOSE]:ch[dh.FULL]);if(!o)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>Ws||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ws||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ws||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const l=+i;if(l>=0&&l<Ws)return l}return i}):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Zs("SemVer.compare",this.version,this.options,e),!(e instanceof Hn)){if(typeof e=="string"&&e===this.version)return 0;e=new Hn(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof Hn||(e=new Hn(e,this.options)),No(this.major,e.major)||No(this.minor,e.minor)||No(this.patch,e.patch)}comparePre(e){if(e instanceof Hn||(e=new Hn(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{const o=this.prerelease[n],i=e.prerelease[n];if(Zs("prerelease compare",n,o,i),o===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(o===void 0)return-1;if(o===i)continue;return No(o,i)}while(++n)}compareBuild(e){e instanceof Hn||(e=new Hn(e,this.options));let n=0;do{const o=this.build[n],i=e.build[n];if(Zs("build compare",n,o,i),o===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(o===void 0)return-1;if(o===i)continue;return No(o,i)}while(++n)}inc(e,n,o){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,o),this.inc("pre",n,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,o),this.inc("pre",n,o);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const i=Number(o)?1:0;if(!n&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[i];else{let l=this.prerelease.length;for(;--l>=0;)typeof this.prerelease[l]=="number"&&(this.prerelease[l]++,l=-2);if(l===-1){if(n===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(n){let l=[n,i];o===!1&&(l=[n]),No(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=l):this.prerelease=l}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const uh=Bt;var Ao=(t,e,n=!1)=>{if(t instanceof uh)return t;try{return new uh(t,e)}catch(o){if(!n)return null;throw o}};const SA=Ao;var EA=(t,e)=>{const n=SA(t,e);return n?n.version:null};const TA=Ao;var NA=(t,e)=>{const n=TA(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};const ph=Bt;var AA=(t,e,n,o,i)=>{typeof n=="string"&&(i=o,o=n,n=void 0);try{return new ph(t instanceof ph?t.version:t,n).inc(e,o,i).version}catch{return null}};const hh=Ao;var VA=(t,e)=>{const n=hh(t,null,!0),o=hh(e,null,!0),i=n.compare(o);if(i===0)return null;const l=i>0,c=l?n:o,d=l?o:n,p=!!c.prerelease.length;if(!!d.prerelease.length&&!p)return!d.patch&&!d.minor?"major":c.patch?"patch":c.minor?"minor":"major";const m=p?"pre":"";return n.major!==o.major?m+"major":n.minor!==o.minor?m+"minor":n.patch!==o.patch?m+"patch":"prerelease"};const BA=Bt;var PA=(t,e)=>new BA(t,e).major;const RA=Bt;var DA=(t,e)=>new RA(t,e).minor;const IA=Bt;var FA=(t,e)=>new IA(t,e).patch;const OA=Ao;var LA=(t,e)=>{const n=OA(t,e);return n&&n.prerelease.length?n.prerelease:null};const fh=Bt;var vn=(t,e,n)=>new fh(t,n).compare(new fh(e,n));const MA=vn;var GA=(t,e,n)=>MA(e,t,n);const $A=vn;var zA=(t,e)=>$A(t,e,!0);const mh=Bt;var ec=(t,e,n)=>{const o=new mh(t,n),i=new mh(e,n);return o.compare(i)||o.compareBuild(i)};const UA=ec;var ZA=(t,e)=>t.sort((n,o)=>UA(n,o,e));const WA=ec;var jA=(t,e)=>t.sort((n,o)=>WA(o,n,e));const HA=vn;var js=(t,e,n)=>HA(t,e,n)>0;const qA=vn;var tc=(t,e,n)=>qA(t,e,n)<0;const KA=vn;var gh=(t,e,n)=>KA(t,e,n)===0;const XA=vn;var yh=(t,e,n)=>XA(t,e,n)!==0;const YA=vn;var nc=(t,e,n)=>YA(t,e,n)>=0;const JA=vn;var rc=(t,e,n)=>JA(t,e,n)<=0;const QA=gh,eV=yh,tV=js,nV=nc,rV=tc,oV=rc;var vh=(t,e,n,o)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return QA(t,n,o);case"!=":return eV(t,n,o);case">":return tV(t,n,o);case">=":return nV(t,n,o);case"<":return rV(t,n,o);case"<=":return oV(t,n,o);default:throw new TypeError(`Invalid operator: ${e}`)}};const iV=Bt,sV=Ao,{safeRe:Hs,t:qs}=Gi;var aV=(t,e)=>{if(t instanceof iV)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?Hs[qs.COERCEFULL]:Hs[qs.COERCE]);else{const p=e.includePrerelease?Hs[qs.COERCERTLFULL]:Hs[qs.COERCERTL];let h;for(;(h=p.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||h.index+h[0].length!==n.index+n[0].length)&&(n=h),p.lastIndex=h.index+h[1].length+h[2].length;p.lastIndex=-1}if(n===null)return null;const o=n[2],i=n[3]||"0",l=n[4]||"0",c=e.includePrerelease&&n[5]?`-${n[5]}`:"",d=e.includePrerelease&&n[6]?`+${n[6]}`:"";return sV(`${o}.${i}.${l}${c}${d}`,e)},lV=class{constructor(){this.max=1e3,this.map=new Map}get(e){const n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(e,n)}return this}},oc,_h;function _n(){if(_h)return oc;_h=1;const t=/\s+/g;class e{constructor(k,M){if(M=i(M),k instanceof e)return k.loose===!!M.loose&&k.includePrerelease===!!M.includePrerelease?k:new e(k.raw,M);if(k instanceof l)return this.raw=k.value,this.set=[[k]],this.formatted=void 0,this;if(this.options=M,this.loose=!!M.loose,this.includePrerelease=!!M.includePrerelease,this.raw=k.trim().replace(t," "),this.set=this.raw.split("||").map(W=>this.parseRange(W.trim())).filter(W=>W.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const W=this.set[0];if(this.set=this.set.filter(q=>!O(q[0])),this.set.length===0)this.set=[W];else if(this.set.length>1){for(const q of this.set)if(q.length===1&&$(q[0])){this.set=[q];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let k=0;k<this.set.length;k++){k>0&&(this.formatted+="||");const M=this.set[k];for(let W=0;W<M.length;W++)W>0&&(this.formatted+=" "),this.formatted+=M[W].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(k){const W=((this.options.includePrerelease&&w)|(this.options.loose&&E))+":"+k,q=o.get(W);if(q)return q;const re=this.options.loose,ue=re?p[h.HYPHENRANGELOOSE]:p[h.HYPHENRANGE];k=k.replace(ue,Q(this.options.includePrerelease)),c("hyphen replace",k),k=k.replace(p[h.COMPARATORTRIM],m),c("comparator trim",k),k=k.replace(p[h.TILDETRIM],y),c("tilde trim",k),k=k.replace(p[h.CARETTRIM],x),c("caret trim",k);let ke=k.split(" ").map(Ke=>R(Ke,this.options)).join(" ").split(/\s+/).map(Ke=>z(Ke,this.options));re&&(ke=ke.filter(Ke=>(c("loose invalid filter",Ke,this.options),!!Ke.match(p[h.COMPARATORLOOSE])))),c("range list",ke);const Se=new Map,Ze=ke.map(Ke=>new l(Ke,this.options));for(const Ke of Ze){if(O(Ke))return[Ke];Se.set(Ke.value,Ke)}Se.size>1&&Se.has("")&&Se.delete("");const ht=[...Se.values()];return o.set(W,ht),ht}intersects(k,M){if(!(k instanceof e))throw new TypeError("a Range is required");return this.set.some(W=>b(W,M)&&k.set.some(q=>b(q,M)&&W.every(re=>q.every(ue=>re.intersects(ue,M)))))}test(k){if(!k)return!1;if(typeof k=="string")try{k=new d(k,this.options)}catch{return!1}for(let M=0;M<this.set.length;M++)if(A(this.set[M],k,this.options))return!0;return!1}}oc=e;const n=lV,o=new n,i=Ql,l=Ks(),c=Us,d=Bt,{safeRe:p,t:h,comparatorTrimReplace:m,tildeTrimReplace:y,caretTrimReplace:x}=Gi,{FLAG_INCLUDE_PRERELEASE:w,FLAG_LOOSE:E}=zs,O=C=>C.value==="<0.0.0-0",$=C=>C.value==="",b=(C,k)=>{let M=!0;const W=C.slice();let q=W.pop();for(;M&&W.length;)M=W.every(re=>q.intersects(re,k)),q=W.pop();return M},R=(C,k)=>(c("comp",C,k),C=Z(C,k),c("caret",C),C=D(C,k),c("tildes",C),C=H(C,k),c("xrange",C),C=G(C,k),c("stars",C),C),F=C=>!C||C.toLowerCase()==="x"||C==="*",D=(C,k)=>C.trim().split(/\s+/).map(M=>V(M,k)).join(" "),V=(C,k)=>{const M=k.loose?p[h.TILDELOOSE]:p[h.TILDE];return C.replace(M,(W,q,re,ue,ke)=>{c("tilde",C,W,q,re,ue,ke);let Se;return F(q)?Se="":F(re)?Se=`>=${q}.0.0 <${+q+1}.0.0-0`:F(ue)?Se=`>=${q}.${re}.0 <${q}.${+re+1}.0-0`:ke?(c("replaceTilde pr",ke),Se=`>=${q}.${re}.${ue}-${ke} <${q}.${+re+1}.0-0`):Se=`>=${q}.${re}.${ue} <${q}.${+re+1}.0-0`,c("tilde return",Se),Se})},Z=(C,k)=>C.trim().split(/\s+/).map(M=>ne(M,k)).join(" "),ne=(C,k)=>{c("caret",C,k);const M=k.loose?p[h.CARETLOOSE]:p[h.CARET],W=k.includePrerelease?"-0":"";return C.replace(M,(q,re,ue,ke,Se)=>{c("caret",C,q,re,ue,ke,Se);let Ze;return F(re)?Ze="":F(ue)?Ze=`>=${re}.0.0${W} <${+re+1}.0.0-0`:F(ke)?re==="0"?Ze=`>=${re}.${ue}.0${W} <${re}.${+ue+1}.0-0`:Ze=`>=${re}.${ue}.0${W} <${+re+1}.0.0-0`:Se?(c("replaceCaret pr",Se),re==="0"?ue==="0"?Ze=`>=${re}.${ue}.${ke}-${Se} <${re}.${ue}.${+ke+1}-0`:Ze=`>=${re}.${ue}.${ke}-${Se} <${re}.${+ue+1}.0-0`:Ze=`>=${re}.${ue}.${ke}-${Se} <${+re+1}.0.0-0`):(c("no pr"),re==="0"?ue==="0"?Ze=`>=${re}.${ue}.${ke}${W} <${re}.${ue}.${+ke+1}-0`:Ze=`>=${re}.${ue}.${ke}${W} <${re}.${+ue+1}.0-0`:Ze=`>=${re}.${ue}.${ke} <${+re+1}.0.0-0`),c("caret return",Ze),Ze})},H=(C,k)=>(c("replaceXRanges",C,k),C.split(/\s+/).map(M=>J(M,k)).join(" ")),J=(C,k)=>{C=C.trim();const M=k.loose?p[h.XRANGELOOSE]:p[h.XRANGE];return C.replace(M,(W,q,re,ue,ke,Se)=>{c("xRange",C,W,q,re,ue,ke,Se);const Ze=F(re),ht=Ze||F(ue),Ke=ht||F(ke),Un=Ke;return q==="="&&Un&&(q=""),Se=k.includePrerelease?"-0":"",Ze?q===">"||q==="<"?W="<0.0.0-0":W="*":q&&Un?(ht&&(ue=0),ke=0,q===">"?(q=">=",ht?(re=+re+1,ue=0,ke=0):(ue=+ue+1,ke=0)):q==="<="&&(q="<",ht?re=+re+1:ue=+ue+1),q==="<"&&(Se="-0"),W=`${q+re}.${ue}.${ke}${Se}`):ht?W=`>=${re}.0.0${Se} <${+re+1}.0.0-0`:Ke&&(W=`>=${re}.${ue}.0${Se} <${re}.${+ue+1}.0-0`),c("xRange return",W),W})},G=(C,k)=>(c("replaceStars",C,k),C.trim().replace(p[h.STAR],"")),z=(C,k)=>(c("replaceGTE0",C,k),C.trim().replace(p[k.includePrerelease?h.GTE0PRE:h.GTE0],"")),Q=C=>(k,M,W,q,re,ue,ke,Se,Ze,ht,Ke,Un)=>(F(W)?M="":F(q)?M=`>=${W}.0.0${C?"-0":""}`:F(re)?M=`>=${W}.${q}.0${C?"-0":""}`:ue?M=`>=${M}`:M=`>=${M}${C?"-0":""}`,F(Ze)?Se="":F(ht)?Se=`<${+Ze+1}.0.0-0`:F(Ke)?Se=`<${Ze}.${+ht+1}.0-0`:Un?Se=`<=${Ze}.${ht}.${Ke}-${Un}`:C?Se=`<${Ze}.${ht}.${+Ke+1}-0`:Se=`<=${Se}`,`${M} ${Se}`.trim()),A=(C,k,M)=>{for(let W=0;W<C.length;W++)if(!C[W].test(k))return!1;if(k.prerelease.length&&!M.includePrerelease){for(let W=0;W<C.length;W++)if(c(C[W].semver),C[W].semver!==l.ANY&&C[W].semver.prerelease.length>0){const q=C[W].semver;if(q.major===k.major&&q.minor===k.minor&&q.patch===k.patch)return!0}return!1}return!0};return oc}var ic,Ch;function Ks(){if(Ch)return ic;Ch=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(m,y){if(y=n(y),m instanceof e){if(m.loose===!!y.loose)return m;m=m.value}m=m.trim().split(/\s+/).join(" "),c("comparator",m,y),this.options=y,this.loose=!!y.loose,this.parse(m),this.semver===t?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(m){const y=this.options.loose?o[i.COMPARATORLOOSE]:o[i.COMPARATOR],x=m.match(y);if(!x)throw new TypeError(`Invalid comparator: ${m}`);this.operator=x[1]!==void 0?x[1]:"",this.operator==="="&&(this.operator=""),x[2]?this.semver=new d(x[2],this.options.loose):this.semver=t}toString(){return this.value}test(m){if(c("Comparator.test",m,this.options.loose),this.semver===t||m===t)return!0;if(typeof m=="string")try{m=new d(m,this.options)}catch{return!1}return l(m,this.operator,this.semver,this.options)}intersects(m,y){if(!(m instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new p(m.value,y).test(this.value):m.operator===""?m.value===""?!0:new p(this.value,y).test(m.semver):(y=n(y),y.includePrerelease&&(this.value==="<0.0.0-0"||m.value==="<0.0.0-0")||!y.includePrerelease&&(this.value.startsWith("<0.0.0")||m.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&m.operator.startsWith(">")||this.operator.startsWith("<")&&m.operator.startsWith("<")||this.semver.version===m.semver.version&&this.operator.includes("=")&&m.operator.includes("=")||l(this.semver,"<",m.semver,y)&&this.operator.startsWith(">")&&m.operator.startsWith("<")||l(this.semver,">",m.semver,y)&&this.operator.startsWith("<")&&m.operator.startsWith(">")))}}ic=e;const n=Ql,{safeRe:o,t:i}=Gi,l=vh,c=Us,d=Bt,p=_n();return ic}const cV=_n();var Xs=(t,e,n)=>{try{e=new cV(e,n)}catch{return!1}return e.test(t)};const dV=_n();var uV=(t,e)=>new dV(t,e).set.map(n=>n.map(o=>o.value).join(" ").trim().split(" "));const pV=Bt,hV=_n();var fV=(t,e,n)=>{let o=null,i=null,l=null;try{l=new hV(e,n)}catch{return null}return t.forEach(c=>{l.test(c)&&(!o||i.compare(c)===-1)&&(o=c,i=new pV(o,n))}),o};const mV=Bt,gV=_n();var yV=(t,e,n)=>{let o=null,i=null,l=null;try{l=new gV(e,n)}catch{return null}return t.forEach(c=>{l.test(c)&&(!o||i.compare(c)===1)&&(o=c,i=new mV(o,n))}),o};const sc=Bt,vV=_n(),wh=js;var _V=(t,e)=>{t=new vV(t,e);let n=new sc("0.0.0");if(t.test(n)||(n=new sc("0.0.0-0"),t.test(n)))return n;n=null;for(let o=0;o<t.set.length;++o){const i=t.set[o];let l=null;i.forEach(c=>{const d=new sc(c.semver.version);switch(c.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!l||wh(d,l))&&(l=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),l&&(!n||wh(n,l))&&(n=l)}return n&&t.test(n)?n:null};const CV=_n();var wV=(t,e)=>{try{return new CV(t,e).range||"*"}catch{return null}};const bV=Bt,bh=Ks(),{ANY:xV}=bh,kV=_n(),SV=Xs,xh=js,kh=tc,EV=rc,TV=nc;var ac=(t,e,n,o)=>{t=new bV(t,o),e=new kV(e,o);let i,l,c,d,p;switch(n){case">":i=xh,l=EV,c=kh,d=">",p=">=";break;case"<":i=kh,l=TV,c=xh,d="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(SV(t,e,o))return!1;for(let h=0;h<e.set.length;++h){const m=e.set[h];let y=null,x=null;if(m.forEach(w=>{w.semver===xV&&(w=new bh(">=0.0.0")),y=y||w,x=x||w,i(w.semver,y.semver,o)?y=w:c(w.semver,x.semver,o)&&(x=w)}),y.operator===d||y.operator===p||(!x.operator||x.operator===d)&&l(t,x.semver))return!1;if(x.operator===p&&c(t,x.semver))return!1}return!0};const NV=ac;var AV=(t,e,n)=>NV(t,e,">",n);const VV=ac;var BV=(t,e,n)=>VV(t,e,"<",n);const Sh=_n();var PV=(t,e,n)=>(t=new Sh(t,n),e=new Sh(e,n),t.intersects(e,n));const RV=Xs,DV=vn;var IV=(t,e,n)=>{const o=[];let i=null,l=null;const c=t.sort((m,y)=>DV(m,y,n));for(const m of c)RV(m,e,n)?(l=m,i||(i=m)):(l&&o.push([i,l]),l=null,i=null);i&&o.push([i,null]);const d=[];for(const[m,y]of o)m===y?d.push(m):!y&&m===c[0]?d.push("*"):y?m===c[0]?d.push(`<=${y}`):d.push(`${m} - ${y}`):d.push(`>=${m}`);const p=d.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return p.length<h.length?p:e};const Eh=_n(),lc=Ks(),{ANY:cc}=lc,$i=Xs,dc=vn,FV=(t,e,n={})=>{if(t===e)return!0;t=new Eh(t,n),e=new Eh(e,n);let o=!1;e:for(const i of t.set){for(const l of e.set){const c=LV(i,l,n);if(o=o||c!==null,c)continue e}if(o)return!1}return!0},OV=[new lc(">=0.0.0-0")],Th=[new lc(">=0.0.0")],LV=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===cc){if(e.length===1&&e[0].semver===cc)return!0;n.includePrerelease?t=OV:t=Th}if(e.length===1&&e[0].semver===cc){if(n.includePrerelease)return!0;e=Th}const o=new Set;let i,l;for(const w of t)w.operator===">"||w.operator===">="?i=Nh(i,w,n):w.operator==="<"||w.operator==="<="?l=Ah(l,w,n):o.add(w.semver);if(o.size>1)return null;let c;if(i&&l){if(c=dc(i.semver,l.semver,n),c>0)return null;if(c===0&&(i.operator!==">="||l.operator!=="<="))return null}for(const w of o){if(i&&!$i(w,String(i),n)||l&&!$i(w,String(l),n))return null;for(const E of e)if(!$i(w,String(E),n))return!1;return!0}let d,p,h,m,y=l&&!n.includePrerelease&&l.semver.prerelease.length?l.semver:!1,x=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1;y&&y.prerelease.length===1&&l.operator==="<"&&y.prerelease[0]===0&&(y=!1);for(const w of e){if(m=m||w.operator===">"||w.operator===">=",h=h||w.operator==="<"||w.operator==="<=",i){if(x&&w.semver.prerelease&&w.semver.prerelease.length&&w.semver.major===x.major&&w.semver.minor===x.minor&&w.semver.patch===x.patch&&(x=!1),w.operator===">"||w.operator===">="){if(d=Nh(i,w,n),d===w&&d!==i)return!1}else if(i.operator===">="&&!$i(i.semver,String(w),n))return!1}if(l){if(y&&w.semver.prerelease&&w.semver.prerelease.length&&w.semver.major===y.major&&w.semver.minor===y.minor&&w.semver.patch===y.patch&&(y=!1),w.operator==="<"||w.operator==="<="){if(p=Ah(l,w,n),p===w&&p!==l)return!1}else if(l.operator==="<="&&!$i(l.semver,String(w),n))return!1}if(!w.operator&&(l||i)&&c!==0)return!1}return!(i&&h&&!l&&c!==0||l&&m&&!i&&c!==0||x||y)},Nh=(t,e,n)=>{if(!t)return e;const o=dc(t.semver,e.semver,n);return o>0?t:o<0||e.operator===">"&&t.operator===">="?e:t},Ah=(t,e,n)=>{if(!t)return e;const o=dc(t.semver,e.semver,n);return o<0?t:o>0||e.operator==="<"&&t.operator==="<="?e:t};var MV=FV;const uc=Gi,Vh=zs,GV=Bt,Bh=ah,$V=Ao,zV=EA,UV=NA,ZV=AA,WV=VA,jV=PA,HV=DA,qV=FA,KV=LA,XV=vn,YV=GA,JV=zA,QV=ec,eB=ZA,tB=jA,nB=js,rB=tc,oB=gh,iB=yh,sB=nc,aB=rc,lB=vh,cB=aV,dB=Ks(),uB=_n();var pB={parse:$V,valid:zV,clean:UV,inc:ZV,diff:WV,major:jV,minor:HV,patch:qV,prerelease:KV,compare:XV,rcompare:YV,compareLoose:JV,compareBuild:QV,sort:eB,rsort:tB,gt:nB,lt:rB,eq:oB,neq:iB,gte:sB,lte:aB,cmp:lB,coerce:cB,Comparator:dB,Range:uB,satisfies:Xs,toComparators:uV,maxSatisfying:fV,minSatisfying:yV,minVersion:_V,validRange:wV,outside:ac,gtr:AV,ltr:BV,intersects:PV,simplifyRange:IV,subset:MV,SemVer:GV,re:uc.re,src:uc.src,tokens:uc.t,SEMVER_SPEC_VERSION:Vh.SEMVER_SPEC_VERSION,RELEASE_TYPES:Vh.RELEASE_TYPES,compareIdentifiers:Bh.compareIdentifiers,rcompareIdentifiers:Bh.rcompareIdentifiers};const hB=Yd(pB);function fB(t){return Gr(t.id)}function mB(t){switch(t){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: ${t}`)}}const gB=["isNotNA","isNA","number_equals","number_notEquals","number_greaterThan","number_greaterThanOrEqualTo","number_lessThan","number_lessThanOrEqualTo","number_between"],yB=["isNotNA","isNA","string_equals","string_notEquals","string_contains","string_doesNotContain","string_matches","string_doesNotMatch","string_containsFuzzyMatch"];function Ph(t,e){var n,o;return((o=(n=t.spec.annotations)==null?void 0:n["pl7.app/label"])==null?void 0:o.trim())??"Unlabeled "+t.type+" "+e.toString()}function vB(t){const e=t.type;switch(e){case"isNotNA":case"isNA":return;case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return t.reference;case"number_between":return t.lowerBound;case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":case"string_containsFuzzyMatch":return t.reference;default:throw Error(`unsupported filter type: ${e}`)}}function Rh(t,e){switch(t){case"isNotNA":case"isNA":return{type:t};case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return{type:t,reference:typeof e=="number"?e:0};case"number_between":return{type:t,lowerBound:typeof e=="number"?e: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:t,reference:typeof e=="string"?e:""};case"string_containsFuzzyMatch":return{type:t,reference:typeof e=="string"?e:"",maxEdits:2,substitutionsOnly:!1,wildcard:void 0};default:throw Error(`unsupported filter type: ${t}`)}}function _B(t,e){return{columnId:t.columnId,filter:Rh(e,vB(t.filter)),disabled:t.disabled}}function pc(t,e){var c,d;const n=Number(e);if(!Number.isFinite(n))throw Error("Model value is not a number.");const o=t.type==="column"?t.spec.valueType:t.spec.type;if((o==="Int"||o==="Long")&&!Number.isInteger(n))throw Error("Model value is not an integer.");const i=(c=t.spec.annotations)==null?void 0:c["pl7.app/min"];if(i!==void 0){const p=Number(i);if(Number.isFinite(p)&&n<Number(i))throw Error("Model value is too low.")}const l=(d=t.spec.annotations)==null?void 0:d["pl7.app/max"];if(l!==void 0){const p=Number(l);if(Number.isFinite(p)&&n>Number(l))throw Error("Model value is too high.")}return n}function Dh(t,e){var o,i;const n=((o=t.spec.domain)==null?void 0:o["pl7.app/alphabet"])??((i=t.spec.annotations)==null?void 0:i["pl7.app/alphabet"]);if(n==="nucleotide"&&!/^[AaTtGgCcNn]+$/.test(e))throw Error("Model value is not a nucleotide.");if(n==="aminoacid"&&!/^[AaCcDdEeFfGgHhIiKkLlMmNnPpQqRrSsTtVvWwYyXx]+$/.test(e))throw Error("Model value is not an aminoacid.");return e}function CB(t){try{return new RegExp(t),t}catch(e){throw e instanceof SyntaxError?Error("Model value is not a regexp."):e}}function wB(t,e){var i,l;const n=((i=t.spec.domain)==null?void 0:i["pl7.app/alphabet"])??((l=t.spec.annotations)==null?void 0:l["pl7.app/alphabet"]);if(n==="nucleotide")return[{value:"N",text:"N"}];if(n==="aminoacid")return[{value:"X",text:"X"}];const o=ze.uniq(e);return o.sort(),o.map(c=>({value:c,text:c}))}function bB(t,e){var i,l;const n=hB.gt(mu().sdkInfo.sdkVersion,"1.14.0")&&(t.type==="column"?t.spec.valueType:t.spec.type)==="String"&&(((i=t.spec.domain)==null?void 0:i["pl7.app/alphabet"])??((l=t.spec.annotations)==null?void 0:l["pl7.app/alphabet"]))!==void 0,o=e.type;switch(o){case"isNotNA":return{operator:"Not",operand:{operator:"IsNA"}};case"isNA":return{operator:"IsNA"};case"number_equals":return{operator:"Equal",reference:e.reference};case"string_equals":return{operator:n?"IEqual":"Equal",reference:e.reference};case"number_notEquals":return{operator:"Not",operand:{operator:"Equal",reference:e.reference}};case"string_notEquals":return{operator:"Not",operand:{operator:n?"IEqual":"Equal",reference:e.reference}};case"number_greaterThan":return{operator:"Greater",reference:e.reference};case"number_greaterThanOrEqualTo":return{operator:"GreaterOrEqual",reference:e.reference};case"number_lessThan":return{operator:"Less",reference:e.reference};case"number_lessThanOrEqualTo":return{operator:"LessOrEqual",reference:e.reference};case"number_between":return{operator:"And",operands:[{operator:e.includeLowerBound?"GreaterOrEqual":"Greater",reference:e.lowerBound},{operator:e.includeUpperBound?"LessOrEqual":"Less",reference:e.upperBound}]};case"string_contains":return{operator:n?"StringIContains":"StringContains",substring:e.reference};case"string_doesNotContain":return{operator:"Not",operand:{operator:n?"StringIContains":"StringContains",substring:e.reference}};case"string_matches":return{operator:"Matches",regex:e.reference};case"string_doesNotMatch":return{operator:"Not",operand:{operator:"Matches",regex:e.reference}};case"string_containsFuzzyMatch":return{operator:n?"StringIContainsFuzzy":"StringContainsFuzzy",reference:e.reference,maxEdits:e.maxEdits,substitutionsOnly:e.substitutionsOnly,wildcard:e.wildcard};default:throw Error(`unsupported filter type: ${o}`)}}const xB={class:"d-flex flex-column gap-24"},Ih=r.defineComponent({__name:"PlTableFilterEntry",props:r.mergeModels({column:{},options:{},disabled:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,{column:o,options:i}=r.toRefs(n);return(l,c)=>(r.openBlock(),r.createElementBlock("div",xB,[r.createVNode(r.unref(wo),{"model-value":e.value.filter.type,options:r.unref(i),disabled:l.disabled,label:"Predicate","onUpdate:modelValue":c[0]||(c[0]=d=>e.value=r.unref(_B)(e.value,d))},null,8,["model-value","options","disabled"]),e.value.filter.type==="number_equals"||e.value.filter.type==="number_notEquals"||e.value.filter.type==="number_lessThan"||e.value.filter.type==="number_lessThanOrEqualTo"||e.value.filter.type==="number_greaterThan"||e.value.filter.type==="number_greaterThanOrEqualTo"?(r.openBlock(),r.createBlock(r.unref(Wr),{key:0,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[1]||(c[1]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:d=>r.unref(pc)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","disabled","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="number_between"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(r.unref(Wr),{modelValue:e.value.filter.lowerBound,"onUpdate:modelValue":c[2]||(c[2]=d=>e.value.filter.lowerBound=d),disabled:l.disabled,parse:d=>r.unref(pc)(r.unref(o),d),label:"Lower bound"},null,8,["modelValue","disabled","parse"]),r.createVNode(r.unref(Bs),{modelValue:e.value.filter.includeLowerBound,"onUpdate:modelValue":c[3]||(c[3]=d=>e.value.filter.includeLowerBound=d),disabled:l.disabled,label:"Include lower bound"},null,8,["modelValue","disabled"]),r.createVNode(r.unref(Wr),{modelValue:e.value.filter.upperBound,"onUpdate:modelValue":c[4]||(c[4]=d=>e.value.filter.upperBound=d),disabled:l.disabled,parse:d=>r.unref(pc)(r.unref(o),d),label:"Upper bound"},null,8,["modelValue","disabled","parse"]),r.createVNode(r.unref(Bs),{modelValue:e.value.filter.includeUpperBound,"onUpdate:modelValue":c[5]||(c[5]=d=>e.value.filter.includeUpperBound=d),disabled:l.disabled,label:"Include upper bound"},null,8,["modelValue","disabled"])],64)):r.createCommentVNode("",!0),e.value.filter.type==="string_equals"||e.value.filter.type==="string_notEquals"||e.value.filter.type==="string_contains"||e.value.filter.type==="string_doesNotContain"?(r.openBlock(),r.createBlock(r.unref(Wr),{key:2,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[6]||(c[6]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:d=>r.unref(Dh)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","disabled","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="string_matches"||e.value.filter.type==="string_doesNotMatch"?(r.openBlock(),r.createBlock(r.unref(Wr),{key:3,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[7]||(c[7]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:r.unref(CB),label:"Reference value"},null,8,["modelValue","disabled","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="string_containsFuzzyMatch"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:4},[r.createVNode(r.unref(Wr),{modelValue:e.value.filter.reference,"onUpdate:modelValue":c[8]||(c[8]=d=>e.value.filter.reference=d),disabled:l.disabled,parse:d=>r.unref(Dh)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","disabled","parse"]),r.createVNode(r.unref(jp),{modelValue:e.value.filter.maxEdits,"onUpdate:modelValue":c[9]||(c[9]=d=>e.value.filter.maxEdits=d),max:5,disabled:l.disabled,breakpoints:"",label:"Maximum nuber of substitutions and indels"},null,8,["modelValue","disabled"]),r.createVNode(r.unref(Bs),{modelValue:e.value.filter.substitutionsOnly,"onUpdate:modelValue":c[10]||(c[10]=d=>e.value.filter.substitutionsOnly=d),disabled:l.disabled,label:"Substitutions only"},null,8,["modelValue","disabled"]),r.createVNode(r.unref(wo),{modelValue:e.value.filter.wildcard,"onUpdate:modelValue":c[11]||(c[11]=d=>e.value.filter.wildcard=d),disabled:l.disabled,options:r.unref(wB)(r.unref(o),e.value.filter.reference),clearable:"",label:"Wildcard symbol"},null,8,["modelValue","disabled","options"])],64)):r.createCommentVNode("",!0)]))}}),kB={class:"d-flex flex-column gap-24"},SB={key:0,class:"text-subtitle-m",style:{color:"var(--txt-mask)"}},EB=r.defineComponent({__name:"PlTableAddFilter",props:r.mergeModels({columnsById:{},columnOptions:{},filterOptions:{},makeFilter:{type:Function}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:r.mergeModels(["addFilter"],["update:modelValue"]),setup(t,{emit:e}){const n=r.useModel(t,"modelValue"),o=t,{columnsById:i,columnOptions:l,filterOptions:c}=r.toRefs(o),d=e,p=r.ref(),h=r.ref();r.watch(()=>p.value,x=>{x?h.value=o.makeFilter(x):h.value=void 0});const m=()=>{p.value=void 0,n.value=!1},y=()=>{h.value&&(d("addFilter",h.value),m())};return(x,w)=>(r.openBlock(),r.createBlock(r.unref(Vs),{modelValue:n.value,"onUpdate:modelValue":w[2]||(w[2]=E=>n.value=E),"close-on-outside-click":!1},{title:r.withCtx(()=>w[3]||(w[3]=[r.createTextVNode("Add Filter")])),actions:r.withCtx(()=>[r.createVNode(r.unref(Ns),{disabled:!h.value,onClick:y},{default:r.withCtx(()=>w[4]||(w[4]=[r.createTextVNode("Add Filter")])),_:1},8,["disabled"]),r.createVNode(r.unref(_o),{"justify-center":!1,onClick:m},{default:r.withCtx(()=>w[5]||(w[5]=[r.createTextVNode("Cancel")])),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",kB,[r.createVNode(r.unref(wo),{modelValue:p.value,"onUpdate:modelValue":w[0]||(w[0]=E=>p.value=E),options:r.unref(l),label:"Column",placeholder:"Choose..."},null,8,["modelValue","options"]),h.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",SB,"Choose a column to view and adjust its options")),h.value?(r.openBlock(),r.createBlock(Ih,{key:1,modelValue:h.value,"onUpdate:modelValue":w[1]||(w[1]=E=>h.value=E),column:r.unref(i)[h.value.columnId],options:r.unref(c)[h.value.columnId]},null,8,["modelValue","column","options"])):r.createCommentVNode("",!0)])]),_:1},8,["modelValue"]))}}),TB=["onClick"],NB={class:"pl-filter-manager__expand-icon"},AB={class:"pl-filter-manager__title flex-grow-1 text-s-btn"},VB={class:"pl-filter-manager__actions d-flex gap-12"},BB=["onClick"],PB=["onClick"],RB={class:"pl-filter-manager__content d-flex gap-24 p-24 flex-column"},DB={class:"d-flex justify-center"},IB=["onClick"],FB={class:"pl-filter-manager__add-btn-icon"},OB={key:0},LB=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:i,defaults:l}=r.toRefs(n),c=r.computed(()=>{const G=o.value.filter(Q=>{const A=Q.type;switch(A){case"axis":return Q.spec.type!=="Bytes";case"column":return Q.spec.valueType!=="Bytes";default:throw Error(`unsupported data type: ${A}`)}}),z={};for(const Q of G)z[fB(Q)]=Q;return z}),d=r.computed(()=>{const G=i.value??[],z={};for(const[Q,A]of Object.entries(c.value)){const C=ze.find(G,k=>ze.isEqual(k.column.id,A.id));C&&(z[Q]=C.allowedFilterTypes)}return z}),p=r.computed(()=>{const G=l.value??[],z={};for(const[Q,A]of Object.entries(c.value)){const C=ze.find(G,k=>ze.isEqual(k.column.id,A.id));C&&(z[Q]={columnId:Q,filter:C.default,disabled:!1})}return z});(()=>{let G=e.value.state;typeof G=="object"&&!Array.isArray(G)&&(e.value.state=Object.entries(G).map(([z,Q])=>({columnId:z,filter:Q,disabled:!1})))})();const h=G=>G??Object.values(p.value),m=r.reactive({state:h(e.value.state)});r.watch(()=>e.value,G=>{ze.isEqual(m.state,G.state)||(m.state=h(G.state))}),r.watch(()=>m,G=>{ze.isEqual(G.state,e.value.state)||(e.value={state:ze.cloneDeep(G.state),filters:G.state.filter(z=>!z.disabled).map(z=>{const Q=c.value[z.columnId],{spec:A,...C}=Q;return{type:"bySingleColumnV2",column:C,predicate:bB(Q,z.filter)}})})},{immediate:!0,deep:!0}),r.watch(()=>c.value,G=>{Object.keys(G).length===0&&m.state!==void 0||(m.state=m.state.filter(z=>!!G[z.columnId]))},{immediate:!0});const y=r.computed(()=>Object.keys(c).length>0&&m.state.length>0),x=r.computed(()=>{const G=d.value,z={};for(const[Q,A]of Object.entries(c.value)){let k=(A.type==="column"?A.spec.valueType:A.spec.type)==="String"?yB:gB;const M=G[Q];M&&(k=k.filter(W=>M.includes(W))),z[Q]=k.map(W=>({value:W,text:mB(W)}))}return z}),w=r.computed(()=>ze.some(Object.values(x.value),G=>G.length>0)),E=r.computed(()=>Object.entries(Object.entries(c.value)).filter(([G,[z,Q]])=>x.value[z].length>0).filter(([G,[z,Q]])=>!m.state.some(A=>A.columnId===z)).map(([G,[z,Q]])=>({label:Ph(Q,G),value:z}))),O=G=>p.value[G]??{columnId:G,filter:Rh(x.value[G][0].value),disabled:!1},$=G=>{m.state[G]=O(m.state[G].columnId)},b=G=>m.state.splice(G,1),R=r.ref(!1),F=r.ref(!1),D=r.ref(!1);r.onMounted(()=>{D.value=!0});const V=r.reactive({}),Z=G=>{V[G]?delete V[G]:V[G]=!0},ne=r.ref(!1),H=r.ref();let J;return r.onMounted(()=>{J=new ResizeObserver(()=>{var z;const G=(z=H.value)==null?void 0:z.parentElement;G&&(ne.value=G.scrollHeight>G.clientHeight||G.scrollWidth>G.clientWidth)}),H.value&&H.value.parentElement&&J.observe(H.value.parentElement)}),r.watch(H,(G,z)=>{z!=null&&z.parentElement&&J.unobserve(z.parentElement),G!=null&&G.parentElement&&J.observe(G.parentElement)}),r.onBeforeUnmount(()=>{J!==void 0&&J.disconnect()}),(G,z)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[D.value?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:`#${r.unref(Yl)}`},[r.createVNode(r.unref(_o),{onClick:z[0]||(z[0]=r.withModifiers(Q=>R.value=!0,["stop"]))},{append:r.withCtx(()=>[r.createVNode(r.unref(Ci),{name:y.value?"filter-on":"filter"},null,8,["name"])]),default:r.withCtx(()=>[z[5]||(z[5]=r.createTextVNode(" Filters "))]),_:1})],8,["to"])):r.createCommentVNode("",!0),r.createVNode(r.unref(Vs),{modelValue:R.value,"onUpdate:modelValue":z[2]||(z[2]=Q=>R.value=Q),"close-on-outside-click":!1},{title:r.withCtx(()=>z[6]||(z[6]=[r.createTextVNode("Manage Filters")])),default:r.withCtx(()=>[r.createElementVNode("div",{ref_key:"filterManager",ref:H,class:"pl-filter-manager d-flex flex-column gap-6"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.state,(Q,A)=>(r.openBlock(),r.createElementBlock("div",{key:Q.columnId,class:r.normalizeClass([{open:V[Q.columnId],disabled:Q.disabled},"pl-filter-manager__filter"])},[r.createElementVNode("div",{class:"pl-filter-manager__header d-flex align-center gap-8",onClick:C=>Z(Q.columnId)},[r.createElementVNode("div",NB,[r.createVNode(r.unref(fn),{name:"chevron-right"})]),r.createElementVNode("div",AB,r.toDisplayString(r.unref(Ph)(c.value[Q.columnId],A)),1),r.createElementVNode("div",VB,[r.createElementVNode("div",{class:"pl-filter-manager__toggle",onClick:r.withModifiers(C=>Q.disabled=!Q.disabled,["stop"])},[r.createVNode(r.unref(Lt),{name:Q.disabled?"view-hide":"view-show"},null,8,["name"])],8,BB),r.createElementVNode("div",{class:"pl-filter-manager__delete",onClick:r.withModifiers(C=>b(A),["stop"])},[r.createVNode(r.unref(Lt),{name:"close"})],8,PB)])],8,TB),r.createElementVNode("div",RB,[r.createVNode(Ih,{modelValue:m.state[A],"onUpdate:modelValue":C=>m.state[A]=C,disabled:Q.disabled,column:c.value[Q.columnId],options:x.value[Q.columnId]},null,8,["modelValue","onUpdate:modelValue","disabled","column","options"]),r.createElementVNode("div",DB,[r.createElementVNode("div",{class:r.normalizeClass([{disabled:Q.disabled},"pl-filter-manager__revert-btn text-s-btn d-flex align-center gap-8"]),onClick:C=>$(A)},[z[7]||(z[7]=r.createTextVNode(" Revert Settings to Default ")),r.createVNode(r.unref(Lt),{name:"reverse"})],10,IB)])])],2))),128)),r.createElementVNode("div",{class:r.normalizeClass([{"pt-24":ne.value},"pl-filter-manager__add-action-wrapper"])},[E.value.length>0?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-filter-manager__add-btn",onClick:z[1]||(z[1]=Q=>F.value=!0)},[r.createElementVNode("div",FB,[r.createVNode(r.unref(fn),{name:"add"})]),z[8]||(z[8]=r.createElementVNode("div",{class:"pl-filter-manager__add-btn-title text-s-btn"},"Add Filter",-1))])):r.createCommentVNode("",!0)],2),w.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",OB,"No filters applicable"))],512)]),_:1},8,["modelValue"]),r.createVNode(EB,{modelValue:F.value,"onUpdate:modelValue":z[3]||(z[3]=Q=>F.value=Q),"columns-by-id":c.value,"column-options":E.value,"filter-options":x.value,"make-filter":O,onAddFilter:z[4]||(z[4]=Q=>m.state.push(Q))},null,8,["modelValue","columns-by-id","column-options","filter-options"])],64))}}),Ys=new Map;function MB(t,e){const n=r.getCurrentScope()??r.effectScope(),o=n.run(()=>(r.onScopeDispose(()=>{Ys.delete(t)}),r.reactive(e())));return o[Symbol.dispose]=()=>{n.stop()},o}function GB(t){const e=Symbol();return()=>(Ys.has(e)||Ys.set(e,MB(e,t)),Ys.get(e))}function $B(t){return r.computed(()=>{try{return Qd(t())}catch(e){return{errors:[String(e)],value:void 0}}})}function Fh(t,e,n){const o=r.ref(0),i=r.reactive({loading:r.computed(()=>o.value>0),loadingRef:o,value:void 0,error:void 0}),l=Fg(e);return r.watch(t,async c=>{i.error=void 0,o.value++,l(c).then(d=>{d.ok&&(i.value=d.value)}).catch(d=>{i.value=void 0,i.error=d}).finally(()=>{o.value--})},Object.assign({immediate:!0,deep:!0},n??{})),i}const Vo=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Oh=new Set,hc=typeof process=="object"&&process?process:{},Lh=(t,e,n,o)=>{typeof hc.emitWarning=="function"?hc.emitWarning(t,e,n,o):console.error(`[${n}] ${e}: ${t}`)};let Js=globalThis.AbortController,Mh=globalThis.AbortSignal;if(typeof Js>"u"){Mh=class{constructor(){je(this,"onabort");je(this,"_onabort",[]);je(this,"reason");je(this,"aborted",!1)}addEventListener(o,i){this._onabort.push(i)}},Js=class{constructor(){je(this,"signal",new Mh);e()}abort(o){var i,l;if(!this.signal.aborted){this.signal.reason=o,this.signal.aborted=!0;for(const c of this.signal._onabort)c(o);(l=(i=this.signal).onabort)==null||l.call(i,o)}}};let t=(($h=hc.env)==null?void 0:$h.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,Lh("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 zB=t=>!Oh.has(t),Er=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Gh=t=>Er(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Qs:null:null;class Qs extends Array{constructor(e){super(e),this.fill(0)}}const Kr=class Kr{constructor(e,n){je(this,"heap");je(this,"length");if(!S(Kr,Bo))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(e),this.length=0}static create(e){const n=Gh(e);if(!n)return[];ye(Kr,Bo,!0);const o=new Kr(e,n);return ye(Kr,Bo,!1),o}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};Bo=new WeakMap,Ue(Kr,Bo,!1);let fc=Kr;const yc=class yc{constructor(e){Ue(this,oe);Ue(this,Cn);Ue(this,jt);Ue(this,wn);Ue(this,bn);Ue(this,Po);Ue(this,Ro);je(this,"ttl");je(this,"ttlResolution");je(this,"ttlAutopurge");je(this,"updateAgeOnGet");je(this,"updateAgeOnHas");je(this,"allowStale");je(this,"noDisposeOnSet");je(this,"noUpdateTTL");je(this,"maxEntrySize");je(this,"sizeCalculation");je(this,"noDeleteOnFetchRejection");je(this,"noDeleteOnStaleGet");je(this,"allowStaleOnFetchAbort");je(this,"allowStaleOnFetchRejection");je(this,"ignoreFetchAbort");Ue(this,pt);Ue(this,xn);Ue(this,dt);Ue(this,Je);Ue(this,Ee);Ue(this,Pt);Ue(this,Ht);Ue(this,Et);Ue(this,yt);Ue(this,kn);Ue(this,vt);Ue(this,Sn);Ue(this,En);Ue(this,qt);Ue(this,Tn);Ue(this,Tr);Ue(this,Rt);Ue(this,Xr,()=>{});Ue(this,Jn,()=>{});Ue(this,zi,()=>{});Ue(this,Kt,()=>!1);Ue(this,Yr,e=>{});Ue(this,Do,(e,n,o)=>{});Ue(this,Ui,(e,n,o,i)=>{if(o||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});je(this,zh,"LRUCache");const{max:n=0,ttl:o,ttlResolution:i=1,ttlAutopurge:l,updateAgeOnGet:c,updateAgeOnHas:d,allowStale:p,dispose:h,disposeAfter:m,noDisposeOnSet:y,noUpdateTTL:x,maxSize:w=0,maxEntrySize:E=0,sizeCalculation:O,fetchMethod:$,memoMethod:b,noDeleteOnFetchRejection:R,noDeleteOnStaleGet:F,allowStaleOnFetchRejection:D,allowStaleOnFetchAbort:V,ignoreFetchAbort:Z}=e;if(n!==0&&!Er(n))throw new TypeError("max option must be a nonnegative integer");const ne=n?Gh(n):Array;if(!ne)throw new Error("invalid max value: "+n);if(ye(this,Cn,n),ye(this,jt,w),this.maxEntrySize=E||S(this,jt),this.sizeCalculation=O,this.sizeCalculation){if(!S(this,jt)&&!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(b!==void 0&&typeof b!="function")throw new TypeError("memoMethod must be a function if defined");if(ye(this,Ro,b),$!==void 0&&typeof $!="function")throw new TypeError("fetchMethod must be a function if specified");if(ye(this,Po,$),ye(this,Tr,!!$),ye(this,dt,new Map),ye(this,Je,new Array(n).fill(void 0)),ye(this,Ee,new Array(n).fill(void 0)),ye(this,Pt,new ne(n)),ye(this,Ht,new ne(n)),ye(this,Et,0),ye(this,yt,0),ye(this,kn,fc.create(n)),ye(this,pt,0),ye(this,xn,0),typeof h=="function"&&ye(this,wn,h),typeof m=="function"?(ye(this,bn,m),ye(this,vt,[])):(ye(this,bn,void 0),ye(this,vt,void 0)),ye(this,Tn,!!S(this,wn)),ye(this,Rt,!!S(this,bn)),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!x,this.noDeleteOnFetchRejection=!!R,this.allowStaleOnFetchRejection=!!D,this.allowStaleOnFetchAbort=!!V,this.ignoreFetchAbort=!!Z,this.maxEntrySize!==0){if(S(this,jt)!==0&&!Er(S(this,jt)))throw new TypeError("maxSize must be a positive integer if specified");if(!Er(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");pe(this,oe,kg).call(this)}if(this.allowStale=!!p,this.noDeleteOnStaleGet=!!F,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!d,this.ttlResolution=Er(i)||i===0?i:1,this.ttlAutopurge=!!l,this.ttl=o||0,this.ttl){if(!Er(this.ttl))throw new TypeError("ttl must be a positive integer if specified");pe(this,oe,Gd).call(this)}if(S(this,Cn)===0&&this.ttl===0&&S(this,jt)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!S(this,Cn)&&!S(this,jt)){const H="LRU_CACHE_UNBOUNDED";zB(H)&&(Oh.add(H),Lh("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",H,yc))}}static unsafeExposeInternals(e){return{starts:S(e,En),ttls:S(e,qt),sizes:S(e,Sn),keyMap:S(e,dt),keyList:S(e,Je),valList:S(e,Ee),next:S(e,Pt),prev:S(e,Ht),get head(){return S(e,Et)},get tail(){return S(e,yt)},free:S(e,kn),isBackgroundFetch:n=>{var o;return pe(o=e,oe,et).call(o,n)},backgroundFetch:(n,o,i,l)=>{var c;return pe(c=e,oe,Ha).call(c,n,o,i,l)},moveToTail:n=>{var o;return pe(o=e,oe,ps).call(o,n)},indexes:n=>{var o;return pe(o=e,oe,Or).call(o,n)},rindexes:n=>{var o;return pe(o=e,oe,Lr).call(o,n)},isStale:n=>{var o;return S(o=e,Kt).call(o,n)}}}get max(){return S(this,Cn)}get maxSize(){return S(this,jt)}get calculatedSize(){return S(this,xn)}get size(){return S(this,pt)}get fetchMethod(){return S(this,Po)}get memoMethod(){return S(this,Ro)}get dispose(){return S(this,wn)}get disposeAfter(){return S(this,bn)}getRemainingTTL(e){return S(this,dt).has(e)?1/0:0}*entries(){for(const e of pe(this,oe,Or).call(this))S(this,Ee)[e]!==void 0&&S(this,Je)[e]!==void 0&&!pe(this,oe,et).call(this,S(this,Ee)[e])&&(yield[S(this,Je)[e],S(this,Ee)[e]])}*rentries(){for(const e of pe(this,oe,Lr).call(this))S(this,Ee)[e]!==void 0&&S(this,Je)[e]!==void 0&&!pe(this,oe,et).call(this,S(this,Ee)[e])&&(yield[S(this,Je)[e],S(this,Ee)[e]])}*keys(){for(const e of pe(this,oe,Or).call(this)){const n=S(this,Je)[e];n!==void 0&&!pe(this,oe,et).call(this,S(this,Ee)[e])&&(yield n)}}*rkeys(){for(const e of pe(this,oe,Lr).call(this)){const n=S(this,Je)[e];n!==void 0&&!pe(this,oe,et).call(this,S(this,Ee)[e])&&(yield n)}}*values(){for(const e of pe(this,oe,Or).call(this))S(this,Ee)[e]!==void 0&&!pe(this,oe,et).call(this,S(this,Ee)[e])&&(yield S(this,Ee)[e])}*rvalues(){for(const e of pe(this,oe,Lr).call(this))S(this,Ee)[e]!==void 0&&!pe(this,oe,et).call(this,S(this,Ee)[e])&&(yield S(this,Ee)[e])}[(Uh=Symbol.iterator,zh=Symbol.toStringTag,Uh)](){return this.entries()}find(e,n={}){for(const o of pe(this,oe,Or).call(this)){const i=S(this,Ee)[o],l=pe(this,oe,et).call(this,i)?i.__staleWhileFetching:i;if(l!==void 0&&e(l,S(this,Je)[o],this))return this.get(S(this,Je)[o],n)}}forEach(e,n=this){for(const o of pe(this,oe,Or).call(this)){const i=S(this,Ee)[o],l=pe(this,oe,et).call(this,i)?i.__staleWhileFetching:i;l!==void 0&&e.call(n,l,S(this,Je)[o],this)}}rforEach(e,n=this){for(const o of pe(this,oe,Lr).call(this)){const i=S(this,Ee)[o],l=pe(this,oe,et).call(this,i)?i.__staleWhileFetching:i;l!==void 0&&e.call(n,l,S(this,Je)[o],this)}}purgeStale(){let e=!1;for(const n of pe(this,oe,Lr).call(this,{allowStale:!0}))S(this,Kt).call(this,n)&&(pe(this,oe,Mr).call(this,S(this,Je)[n],"expire"),e=!0);return e}info(e){const n=S(this,dt).get(e);if(n===void 0)return;const o=S(this,Ee)[n],i=pe(this,oe,et).call(this,o)?o.__staleWhileFetching:o;if(i===void 0)return;const l={value:i};if(S(this,qt)&&S(this,En)){const c=S(this,qt)[n],d=S(this,En)[n];if(c&&d){const p=c-(Vo.now()-d);l.ttl=p,l.start=Date.now()}}return S(this,Sn)&&(l.size=S(this,Sn)[n]),l}dump(){const e=[];for(const n of pe(this,oe,Or).call(this,{allowStale:!0})){const o=S(this,Je)[n],i=S(this,Ee)[n],l=pe(this,oe,et).call(this,i)?i.__staleWhileFetching:i;if(l===void 0||o===void 0)continue;const c={value:l};if(S(this,qt)&&S(this,En)){c.ttl=S(this,qt)[n];const d=Vo.now()-S(this,En)[n];c.start=Math.floor(Date.now()-d)}S(this,Sn)&&(c.size=S(this,Sn)[n]),e.unshift([o,c])}return e}load(e){this.clear();for(const[n,o]of e){if(o.start){const i=Date.now()-o.start;o.start=Vo.now()-i}this.set(n,o.value,o)}}set(e,n,o={}){var x,w,E,O,$;if(n===void 0)return this.delete(e),this;const{ttl:i=this.ttl,start:l,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:d=this.sizeCalculation,status:p}=o;let{noUpdateTTL:h=this.noUpdateTTL}=o;const m=S(this,Ui).call(this,e,n,o.size||0,d);if(this.maxEntrySize&&m>this.maxEntrySize)return p&&(p.set="miss",p.maxEntrySizeExceeded=!0),pe(this,oe,Mr).call(this,e,"set"),this;let y=S(this,pt)===0?void 0:S(this,dt).get(e);if(y===void 0)y=S(this,pt)===0?S(this,yt):S(this,kn).length!==0?S(this,kn).pop():S(this,pt)===S(this,Cn)?pe(this,oe,ja).call(this,!1):S(this,pt),S(this,Je)[y]=e,S(this,Ee)[y]=n,S(this,dt).set(e,y),S(this,Pt)[S(this,yt)]=y,S(this,Ht)[y]=S(this,yt),ye(this,yt,y),Wa(this,pt)._++,S(this,Do).call(this,y,m,p),p&&(p.set="add"),h=!1;else{pe(this,oe,ps).call(this,y);const b=S(this,Ee)[y];if(n!==b){if(S(this,Tr)&&pe(this,oe,et).call(this,b)){b.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:R}=b;R!==void 0&&!c&&(S(this,Tn)&&((x=S(this,wn))==null||x.call(this,R,e,"set")),S(this,Rt)&&((w=S(this,vt))==null||w.push([R,e,"set"])))}else c||(S(this,Tn)&&((E=S(this,wn))==null||E.call(this,b,e,"set")),S(this,Rt)&&((O=S(this,vt))==null||O.push([b,e,"set"])));if(S(this,Yr).call(this,y),S(this,Do).call(this,y,m,p),S(this,Ee)[y]=n,p){p.set="replace";const R=b&&pe(this,oe,et).call(this,b)?b.__staleWhileFetching:b;R!==void 0&&(p.oldValue=R)}}else p&&(p.set="update")}if(i!==0&&!S(this,qt)&&pe(this,oe,Gd).call(this),S(this,qt)&&(h||S(this,zi).call(this,y,i,l),p&&S(this,Jn).call(this,p,y)),!c&&S(this,Rt)&&S(this,vt)){const b=S(this,vt);let R;for(;R=b==null?void 0:b.shift();)($=S(this,bn))==null||$.call(this,...R)}return this}pop(){var e;try{for(;S(this,pt);){const n=S(this,Ee)[S(this,Et)];if(pe(this,oe,ja).call(this,!0),pe(this,oe,et).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(S(this,Rt)&&S(this,vt)){const n=S(this,vt);let o;for(;o=n==null?void 0:n.shift();)(e=S(this,bn))==null||e.call(this,...o)}}}has(e,n={}){const{updateAgeOnHas:o=this.updateAgeOnHas,status:i}=n,l=S(this,dt).get(e);if(l!==void 0){const c=S(this,Ee)[l];if(pe(this,oe,et).call(this,c)&&c.__staleWhileFetching===void 0)return!1;if(S(this,Kt).call(this,l))i&&(i.has="stale",S(this,Jn).call(this,i,l));else return o&&S(this,Xr).call(this,l),i&&(i.has="hit",S(this,Jn).call(this,i,l)),!0}else i&&(i.has="miss");return!1}peek(e,n={}){const{allowStale:o=this.allowStale}=n,i=S(this,dt).get(e);if(i===void 0||!o&&S(this,Kt).call(this,i))return;const l=S(this,Ee)[i];return pe(this,oe,et).call(this,l)?l.__staleWhileFetching:l}async fetch(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:d=this.noDisposeOnSet,size:p=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:m=this.noUpdateTTL,noDeleteOnFetchRejection:y=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:x=this.allowStaleOnFetchRejection,ignoreFetchAbort:w=this.ignoreFetchAbort,allowStaleOnFetchAbort:E=this.allowStaleOnFetchAbort,context:O,forceRefresh:$=!1,status:b,signal:R}=n;if(!S(this,Tr))return b&&(b.fetch="get"),this.get(e,{allowStale:o,updateAgeOnGet:i,noDeleteOnStaleGet:l,status:b});const F={allowStale:o,updateAgeOnGet:i,noDeleteOnStaleGet:l,ttl:c,noDisposeOnSet:d,size:p,sizeCalculation:h,noUpdateTTL:m,noDeleteOnFetchRejection:y,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:E,ignoreFetchAbort:w,status:b,signal:R};let D=S(this,dt).get(e);if(D===void 0){b&&(b.fetch="miss");const V=pe(this,oe,Ha).call(this,e,D,F,O);return V.__returned=V}else{const V=S(this,Ee)[D];if(pe(this,oe,et).call(this,V)){const G=o&&V.__staleWhileFetching!==void 0;return b&&(b.fetch="inflight",G&&(b.returnedStale=!0)),G?V.__staleWhileFetching:V.__returned=V}const Z=S(this,Kt).call(this,D);if(!$&&!Z)return b&&(b.fetch="hit"),pe(this,oe,ps).call(this,D),i&&S(this,Xr).call(this,D),b&&S(this,Jn).call(this,b,D),V;const ne=pe(this,oe,Ha).call(this,e,D,F,O),J=ne.__staleWhileFetching!==void 0&&o;return b&&(b.fetch=Z?"stale":"refresh",J&&Z&&(b.returnedStale=!0)),J?ne.__staleWhileFetching:ne.__returned=ne}}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=S(this,Ro);if(!o)throw new Error("no memoMethod provided to constructor");const{context:i,forceRefresh:l,...c}=n,d=this.get(e,c);if(!l&&d!==void 0)return d;const p=o(e,d,{options:c,context:i});return this.set(e,p,c),p}get(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,status:c}=n,d=S(this,dt).get(e);if(d!==void 0){const p=S(this,Ee)[d],h=pe(this,oe,et).call(this,p);return c&&S(this,Jn).call(this,c,d),S(this,Kt).call(this,d)?(c&&(c.get="stale"),h?(c&&o&&p.__staleWhileFetching!==void 0&&(c.returnedStale=!0),o?p.__staleWhileFetching:void 0):(l||pe(this,oe,Mr).call(this,e,"expire"),c&&o&&(c.returnedStale=!0),o?p:void 0)):(c&&(c.get="hit"),h?p.__staleWhileFetching:(pe(this,oe,ps).call(this,d),i&&S(this,Xr).call(this,d),p))}else c&&(c.get="miss")}delete(e){return pe(this,oe,Mr).call(this,e,"delete")}clear(){return pe(this,oe,Ud).call(this,"delete")}};Cn=new WeakMap,jt=new WeakMap,wn=new WeakMap,bn=new WeakMap,Po=new WeakMap,Ro=new WeakMap,pt=new WeakMap,xn=new WeakMap,dt=new WeakMap,Je=new WeakMap,Ee=new WeakMap,Pt=new WeakMap,Ht=new WeakMap,Et=new WeakMap,yt=new WeakMap,kn=new WeakMap,vt=new WeakMap,Sn=new WeakMap,En=new WeakMap,qt=new WeakMap,Tn=new WeakMap,Tr=new WeakMap,Rt=new WeakMap,oe=new WeakSet,Gd=function(){const e=new Qs(S(this,Cn)),n=new Qs(S(this,Cn));ye(this,qt,e),ye(this,En,n),ye(this,zi,(l,c,d=Vo.now())=>{if(n[l]=c!==0?d:0,e[l]=c,c!==0&&this.ttlAutopurge){const p=setTimeout(()=>{S(this,Kt).call(this,l)&&pe(this,oe,Mr).call(this,S(this,Je)[l],"expire")},c+1);p.unref&&p.unref()}}),ye(this,Xr,l=>{n[l]=e[l]!==0?Vo.now():0}),ye(this,Jn,(l,c)=>{if(e[c]){const d=e[c],p=n[c];if(!d||!p)return;l.ttl=d,l.start=p,l.now=o||i();const h=l.now-p;l.remainingTTL=d-h}});let o=0;const i=()=>{const l=Vo.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=S(this,dt).get(l);if(c===void 0)return 0;const d=e[c],p=n[c];if(!d||!p)return 1/0;const h=(o||i())-p;return d-h},ye(this,Kt,l=>{const c=n[l],d=e[l];return!!d&&!!c&&(o||i())-c>d})},Xr=new WeakMap,Jn=new WeakMap,zi=new WeakMap,Kt=new WeakMap,kg=function(){const e=new Qs(S(this,Cn));ye(this,xn,0),ye(this,Sn,e),ye(this,Yr,n=>{ye(this,xn,S(this,xn)-e[n]),e[n]=0}),ye(this,Ui,(n,o,i,l)=>{if(pe(this,oe,et).call(this,o))return 0;if(!Er(i))if(l){if(typeof l!="function")throw new TypeError("sizeCalculation must be a function");if(i=l(o,n),!Er(i))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 i}),ye(this,Do,(n,o,i)=>{if(e[n]=o,S(this,jt)){const l=S(this,jt)-e[n];for(;S(this,xn)>l;)pe(this,oe,ja).call(this,!0)}ye(this,xn,S(this,xn)+e[n]),i&&(i.entrySize=o,i.totalCalculatedSize=S(this,xn))})},Yr=new WeakMap,Do=new WeakMap,Ui=new WeakMap,Or=function*({allowStale:e=this.allowStale}={}){if(S(this,pt))for(let n=S(this,yt);!(!pe(this,oe,$d).call(this,n)||((e||!S(this,Kt).call(this,n))&&(yield n),n===S(this,Et)));)n=S(this,Ht)[n]},Lr=function*({allowStale:e=this.allowStale}={}){if(S(this,pt))for(let n=S(this,Et);!(!pe(this,oe,$d).call(this,n)||((e||!S(this,Kt).call(this,n))&&(yield n),n===S(this,yt)));)n=S(this,Pt)[n]},$d=function(e){return e!==void 0&&S(this,dt).get(S(this,Je)[e])===e},ja=function(e){var l,c;const n=S(this,Et),o=S(this,Je)[n],i=S(this,Ee)[n];return S(this,Tr)&&pe(this,oe,et).call(this,i)?i.__abortController.abort(new Error("evicted")):(S(this,Tn)||S(this,Rt))&&(S(this,Tn)&&((l=S(this,wn))==null||l.call(this,i,o,"evict")),S(this,Rt)&&((c=S(this,vt))==null||c.push([i,o,"evict"]))),S(this,Yr).call(this,n),e&&(S(this,Je)[n]=void 0,S(this,Ee)[n]=void 0,S(this,kn).push(n)),S(this,pt)===1?(ye(this,Et,ye(this,yt,0)),S(this,kn).length=0):ye(this,Et,S(this,Pt)[n]),S(this,dt).delete(o),Wa(this,pt)._--,n},Ha=function(e,n,o,i){const l=n===void 0?void 0:S(this,Ee)[n];if(pe(this,oe,et).call(this,l))return l;const c=new Js,{signal:d}=o;d==null||d.addEventListener("abort",()=>c.abort(d.reason),{signal:c.signal});const p={signal:c.signal,options:o,context:i},h=(O,$=!1)=>{const{aborted:b}=c.signal,R=o.ignoreFetchAbort&&O!==void 0;if(o.status&&(b&&!$?(o.status.fetchAborted=!0,o.status.fetchError=c.signal.reason,R&&(o.status.fetchAbortIgnored=!0)):o.status.fetchResolved=!0),b&&!R&&!$)return y(c.signal.reason);const F=w;return S(this,Ee)[n]===w&&(O===void 0?F.__staleWhileFetching?S(this,Ee)[n]=F.__staleWhileFetching:pe(this,oe,Mr).call(this,e,"fetch"):(o.status&&(o.status.fetchUpdated=!0),this.set(e,O,p.options))),O},m=O=>(o.status&&(o.status.fetchRejected=!0,o.status.fetchError=O),y(O)),y=O=>{const{aborted:$}=c.signal,b=$&&o.allowStaleOnFetchAbort,R=b||o.allowStaleOnFetchRejection,F=R||o.noDeleteOnFetchRejection,D=w;if(S(this,Ee)[n]===w&&(!F||D.__staleWhileFetching===void 0?pe(this,oe,Mr).call(this,e,"fetch"):b||(S(this,Ee)[n]=D.__staleWhileFetching)),R)return o.status&&D.__staleWhileFetching!==void 0&&(o.status.returnedStale=!0),D.__staleWhileFetching;if(D.__returned===D)throw O},x=(O,$)=>{var R;const b=(R=S(this,Po))==null?void 0:R.call(this,e,l,p);b&&b instanceof Promise&&b.then(F=>O(F===void 0?void 0:F),$),c.signal.addEventListener("abort",()=>{(!o.ignoreFetchAbort||o.allowStaleOnFetchAbort)&&(O(void 0),o.allowStaleOnFetchAbort&&(O=F=>h(F,!0)))})};o.status&&(o.status.fetchDispatched=!0);const w=new Promise(x).then(h,m),E=Object.assign(w,{__abortController:c,__staleWhileFetching:l,__returned:void 0});return n===void 0?(this.set(e,E,{...p.options,status:void 0}),n=S(this,dt).get(e)):S(this,Ee)[n]=E,E},et=function(e){if(!S(this,Tr))return!1;const n=e;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof Js},zd=function(e,n){S(this,Ht)[n]=e,S(this,Pt)[e]=n},ps=function(e){e!==S(this,yt)&&(e===S(this,Et)?ye(this,Et,S(this,Pt)[e]):pe(this,oe,zd).call(this,S(this,Ht)[e],S(this,Pt)[e]),pe(this,oe,zd).call(this,S(this,yt),e),ye(this,yt,e))},Mr=function(e,n){var i,l,c,d;let o=!1;if(S(this,pt)!==0){const p=S(this,dt).get(e);if(p!==void 0)if(o=!0,S(this,pt)===1)pe(this,oe,Ud).call(this,n);else{S(this,Yr).call(this,p);const h=S(this,Ee)[p];if(pe(this,oe,et).call(this,h)?h.__abortController.abort(new Error("deleted")):(S(this,Tn)||S(this,Rt))&&(S(this,Tn)&&((i=S(this,wn))==null||i.call(this,h,e,n)),S(this,Rt)&&((l=S(this,vt))==null||l.push([h,e,n]))),S(this,dt).delete(e),S(this,Je)[p]=void 0,S(this,Ee)[p]=void 0,p===S(this,yt))ye(this,yt,S(this,Ht)[p]);else if(p===S(this,Et))ye(this,Et,S(this,Pt)[p]);else{const m=S(this,Ht)[p];S(this,Pt)[m]=S(this,Pt)[p];const y=S(this,Pt)[p];S(this,Ht)[y]=S(this,Ht)[p]}Wa(this,pt)._--,S(this,kn).push(p)}}if(S(this,Rt)&&((c=S(this,vt))!=null&&c.length)){const p=S(this,vt);let h;for(;h=p==null?void 0:p.shift();)(d=S(this,bn))==null||d.call(this,...h)}return o},Ud=function(e){var n,o,i;for(const l of pe(this,oe,Lr).call(this,{allowStale:!0})){const c=S(this,Ee)[l];if(pe(this,oe,et).call(this,c))c.__abortController.abort(new Error("deleted"));else{const d=S(this,Je)[l];S(this,Tn)&&((n=S(this,wn))==null||n.call(this,c,d,e)),S(this,Rt)&&((o=S(this,vt))==null||o.push([c,d,e]))}}if(S(this,dt).clear(),S(this,Ee).fill(void 0),S(this,Je).fill(void 0),S(this,qt)&&S(this,En)&&(S(this,qt).fill(0),S(this,En).fill(0)),S(this,Sn)&&S(this,Sn).fill(0),ye(this,Et,0),ye(this,yt,0),S(this,kn).length=0,ye(this,xn,0),ye(this,pt,0),S(this,Rt)&&S(this,vt)){const l=S(this,vt);let c;for(;c=l==null?void 0:l.shift();)(i=S(this,bn))==null||i.call(this,...c)}};let mc=yc;const UB={cacheSize:15e6};class ZB{constructor(e){je(this,"_str");je(this,"_rawJson");je(this,"_zodSchema");je(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 Jr=class Jr{constructor(e){je(this,"fileDataCache");je(this,"fileDataRefs",new Map);const n={...UB,...e??{}};this.fileDataCache=new mc({maxSize:n.cacheSize,fetchMethod:async o=>new ZB(await mu().blobDriver.getContent(o)),sizeCalculation:o=>o.bytes.length,dispose:(o,i)=>{this.fileDataRefs.delete(i)}})}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 i=await this.fileDataCache.fetch(e);o.value=i}catch(i){console.error(i)}})(),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 i,l;return n===void 0?(i=o==null?void 0:o.value)==null?void 0:i.rawJson:(l=o==null?void 0:o.value)==null?void 0:l.validatedJson(n)})}static getContentBytes(e){return Jr.globalInstance.getContentBytes(e)}static getContentString(e){return Jr.globalInstance.getContentString(e)}static getContentJson(e,n){return Jr.globalInstance.getContentJson(e,n)}};je(Jr,"globalInstance",new Jr);let gc=Jr;L.AgGridTheme=Mu,L.BlockLayout=GN,L.ContextProvider=SE,L.DataTable=h0,L.DemoData=SN,L.DropdownListItem=yo,L.LongText=Ml,L.MultiError=Xa,L.PlAccordion=Bk,L.PlAccordionSection=Gk,L.PlAgCellFile=fA,L.PlAgDataTable=cA,L.PlAgDataTableToolsPanel=sA,L.PlAgGridColumnManager=rh,L.PlAgOverlayLoading=Xp,L.PlAgOverlayNoRows=Yp,L.PlAgTextAndButtonCell=yA,L.PlAlert=Z0,L.PlBlockPage=V0,L.PlBtnAccent=lw,L.PlBtnDanger=dw,L.PlBtnGhost=_o,L.PlBtnGroup=dp,L.PlBtnLink=fw,L.PlBtnPrimary=Ns,L.PlBtnSecondary=Pl,L.PlBtnSplit=rw,L.PlCheckbox=$x,L.PlCheckboxGroup=Wx,L.PlChip=Gl,L.PlCloseModalBtn=wp,L.PlContainer=P0,L.PlDialogModal=zl,L.PlDropdown=wo,L.PlDropdownLegacy=px,L.PlDropdownLine=Cp,L.PlDropdownMulti=Mx,L.PlDropdownRef=$b,L.PlEditableTitle=Lw,L.PlFileDialog=Np,L.PlFileInput=Zp,L.PlGrid=L0,L.PlIcon16=Co,L.PlIcon24=Ci,L.PlLogView=xp,L.PlMaskIcon16=fn,L.PlMaskIcon24=Lt,L.PlNotificationAlert=Wp,L.PlNumberField=kx,L.PlProgressBar=yx,L.PlRow=D0,L.PlSearchField=gp,L.PlSectionSeparator=kp,L.PlSlideModal=Vs,L.PlSpacer=lp,L.PlTableFilters=LB,L.PlTabs=Sk,L.PlTextArea=wb,L.PlTextField=Wr,L.PlToggleSwitch=Bs,L.PlTooltip=xt,L.ReactiveFileContent=gc,L.Scrollable=f1,L.Slider=jp,L.SliderRange=d1,L.SliderRangeTriple=JE,L.ThemeSwitcher=x0,L.UnresolvedError=Ka,L.ValueOrErrorsComponent=pA,L.activateAgGrid=Lu,L.animate=np,L.animateInfinite=v0,L.call=Yu,L.computedResult=$B,L.createModel=nl,L.debounce=rp,L.defineApp=z_,L.defineStore=GB,L.delay=Ju,L.detectOutside=bb,L.ensureError=Qa,L.eventListener=Ol,L.formatZodError=tl,L.getElementScrollPosition=vp,L.identity=Ja,L.isDefined=Gg,L.isElementVisible=yp,L.isJsonEqual=Ya,L.isZodError=el,L.listToOptions=_0,L.makeEaseInOut=y0,L.makeEaseOut=tp,L.maskIcons16=xN,L.maskIcons24=kN,L.normalizeListOptions=yr,L.notEmpty=Tl,L.randomInt=ep,L.randomString=g0,L.requestTick=Nl,L.scrollIntoView=wi,L.showContextMenu=kl,L.throttle=op,L.timeout=Qu,L.unwrapOptionalResult=Mg,L.unwrapValueOrErrors=Jd,L.useClickOutside=As,L.useDraggable=$E,L.useEventListener=st,L.useFormState=ME,L.useHover=Ku,L.useInterval=LE,L.useLabelNotch=Xn,L.useLocalStorage=ip,L.useMouse=qu,L.useMouseCapture=gr,L.usePosition=vo,L.useQuery=GE,L.useResizeObserver=Hp,L.useScroll=FE,L.useSdkPlugin=_l,L.useSortable=Kp,L.useTheme=ap,L.useWatchFetch=Fh,L.wrapOptionalResult=Qd,L.wrapValueOrErrors=Lg,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|