@questwork/q-inventory 0.1.0

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.
Files changed (67) hide show
  1. package/.storybook/main.js +23 -0
  2. package/.storybook/preview.js +17 -0
  3. package/README.md +16 -0
  4. package/app/qInventory/App.vue +164 -0
  5. package/app/qInventory/index.html +12 -0
  6. package/app/qInventory/main.ts +4 -0
  7. package/app/qInventory/styles.scss +59 -0
  8. package/dist/components/InventoryAssetDetail.vue.d.ts +8 -0
  9. package/dist/components/InventoryAssetDetail.vue.d.ts.map +1 -0
  10. package/dist/components/InventoryLocationAdmin.vue.d.ts +10 -0
  11. package/dist/components/InventoryLocationAdmin.vue.d.ts.map +1 -0
  12. package/dist/components/InventoryLocationDetail.vue.d.ts +8 -0
  13. package/dist/components/InventoryLocationDetail.vue.d.ts.map +1 -0
  14. package/dist/components/InventoryOverview.vue.d.ts +15 -0
  15. package/dist/components/InventoryOverview.vue.d.ts.map +1 -0
  16. package/dist/components/InventoryScanner.vue.d.ts +21 -0
  17. package/dist/components/InventoryScanner.vue.d.ts.map +1 -0
  18. package/dist/components/QInventory.vue.d.ts +24 -0
  19. package/dist/components/QInventory.vue.d.ts.map +1 -0
  20. package/dist/index.d.ts +16 -0
  21. package/dist/index.d.ts.map +1 -0
  22. package/dist/mixins/CSSMixin.d.ts +7 -0
  23. package/dist/mixins/CSSMixin.d.ts.map +1 -0
  24. package/dist/models/index.d.ts +62 -0
  25. package/dist/models/index.d.ts.map +1 -0
  26. package/dist/models/inventoryAssetRepoAxios.d.ts +18 -0
  27. package/dist/models/inventoryAssetRepoAxios.d.ts.map +1 -0
  28. package/dist/models/inventoryAuthRepoAxios.d.ts +26 -0
  29. package/dist/models/inventoryAuthRepoAxios.d.ts.map +1 -0
  30. package/dist/models/inventoryAxiosBase.d.ts +41 -0
  31. package/dist/models/inventoryAxiosBase.d.ts.map +1 -0
  32. package/dist/models/inventoryLocationRepoAxios.d.ts +13 -0
  33. package/dist/models/inventoryLocationRepoAxios.d.ts.map +1 -0
  34. package/dist/models/inventoryMovementRepoAxios.d.ts +13 -0
  35. package/dist/models/inventoryMovementRepoAxios.d.ts.map +1 -0
  36. package/dist/q-inventory.esm.js +961 -0
  37. package/dist/q-inventory.esm.js.map +1 -0
  38. package/dist/q-inventory.min.cjs +2 -0
  39. package/dist/q-inventory.min.cjs.map +1 -0
  40. package/dist/q-inventory.min.css +1 -0
  41. package/dist/q-inventory.min.js +2 -0
  42. package/dist/q-inventory.min.js.map +1 -0
  43. package/dist-app/qInventory/assets/q-inventory-app.css +1 -0
  44. package/dist-app/qInventory/assets/q-inventory-app.js +18 -0
  45. package/dist-app/qInventory/index.html +13 -0
  46. package/package.json +58 -0
  47. package/src/components/InventoryAssetDetail.vue +55 -0
  48. package/src/components/InventoryLocationAdmin.vue +56 -0
  49. package/src/components/InventoryLocationDetail.vue +51 -0
  50. package/src/components/InventoryOverview.vue +81 -0
  51. package/src/components/InventoryScanner.vue +315 -0
  52. package/src/components/QInventory.vue +117 -0
  53. package/src/index.ts +36 -0
  54. package/src/mixins/CSSMixin.ts +14 -0
  55. package/src/models/index.ts +114 -0
  56. package/src/models/inventoryAssetRepoAxios.ts +38 -0
  57. package/src/models/inventoryAuthRepoAxios.ts +48 -0
  58. package/src/models/inventoryAxiosBase.ts +149 -0
  59. package/src/models/inventoryLocationRepoAxios.ts +25 -0
  60. package/src/models/inventoryMovementRepoAxios.ts +24 -0
  61. package/src/styles/index.scss +148 -0
  62. package/stories/stories.scss +9 -0
  63. package/stories/stories.ts +362 -0
  64. package/tsconfig.json +29 -0
  65. package/vite.app.config.js +37 -0
  66. package/vite.config.js +68 -0
  67. package/vitest.config.js +11 -0
@@ -0,0 +1,18 @@
1
+ (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function gt(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const ne=Object.freeze({}),zt=Object.freeze([]),we=()=>{},to=()=>!1,Pn=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),On=t=>t.startsWith("onUpdate:"),ue=Object.assign,Ts=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},ul=Object.prototype.hasOwnProperty,Y=(t,e)=>ul.call(t,e),$=Array.isArray,xt=t=>Mn(t)==="[object Map]",no=t=>Mn(t)==="[object Set]",ni=t=>Mn(t)==="[object Date]",M=t=>typeof t=="function",ae=t=>typeof t=="string",Ue=t=>typeof t=="symbol",Q=t=>t!==null&&typeof t=="object",Rs=t=>(Q(t)||M(t))&&M(t.then)&&M(t.catch),ro=Object.prototype.toString,Mn=t=>ro.call(t),xs=t=>Mn(t).slice(8,-1),so=t=>Mn(t)==="[object Object]",Is=t=>ae(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,_n=gt(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),fl=gt("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),br=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},dl=/-\w/g,De=br(t=>t.replace(dl,e=>e.slice(1).toUpperCase())),hl=/\B([A-Z])/g,mt=br(t=>t.replace(hl,"-$1").toLowerCase()),wr=br(t=>t.charAt(0).toUpperCase()+t.slice(1)),Tt=br(t=>t?`on${wr(t)}`:""),nt=(t,e)=>!Object.is(t,e),qt=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},sr=(t,e,n,r=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:r,value:n})},Ds=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let ri;const kn=()=>ri||(ri=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function $s(t){if($(t)){const e={};for(let n=0;n<t.length;n++){const r=t[n],s=ae(r)?yl(r):$s(r);if(s)for(const i in s)e[i]=s[i]}return e}else if(ae(t)||Q(t))return t}const pl=/;(?![^(]*\))/g,ml=/:([^]+)/,gl=/\/\*[^]*?\*\//g;function yl(t){const e={};return t.replace(gl,"").split(pl).forEach(n=>{if(n){const r=n.split(ml);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function It(t){let e="";if(ae(t))e=t;else if($(t))for(let n=0;n<t.length;n++){const r=It(t[n]);r&&(e+=r+" ")}else if(Q(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}const _l="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",vl="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",bl="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",wl=gt(_l),Cl=gt(vl),El=gt(bl),Al="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Sl=gt(Al);function io(t){return!!t||t===""}function Ol(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=Ls(t[r],e[r]);return n}function Ls(t,e){if(t===e)return!0;let n=ni(t),r=ni(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Ue(t),r=Ue(e),n||r)return t===e;if(n=$(t),r=$(e),n||r)return n&&r?Ol(t,e):!1;if(n=Q(t),r=Q(e),n||r){if(!n||!r)return!1;const s=Object.keys(t).length,i=Object.keys(e).length;if(s!==i)return!1;for(const o in t){const a=t.hasOwnProperty(o),l=e.hasOwnProperty(o);if(a&&!l||!a&&l||!Ls(t[o],e[o]))return!1}}return String(t)===String(e)}const oo=t=>!!(t&&t.__v_isRef===!0),oe=t=>ae(t)?t:t==null?"":$(t)||Q(t)&&(t.toString===ro||!M(t.toString))?oo(t)?oe(t.value):JSON.stringify(t,ao,2):String(t),ao=(t,e)=>oo(e)?ao(t,e.value):xt(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,s],i)=>(n[jr(r,i)+" =>"]=s,n),{})}:no(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>jr(n))}:Ue(e)?jr(e):Q(e)&&!$(e)&&!so(e)?String(e):e,jr=(t,e="")=>{var n;return Ue(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};function Ve(t,...e){console.warn(`[Vue warn] ${t}`,...e)}let _e;class Tl{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&_e&&(_e.active?(this.parent=_e,this.index=(_e.scopes||(_e.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].pause();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].resume();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].resume()}}run(e){if(this._active){const n=_e;try{return _e=this,e()}finally{_e=n}}else this._warnOnRun&&Ve("cannot run an inactive effect scope.")}on(){++this._on===1&&(this.prevScope=_e,_e=this)}off(){if(this._on>0&&--this._on===0){if(_e===this)_e=this.prevScope;else{let e=_e;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let n,r;for(n=0,r=this.effects.length;n<r;n++)this.effects[n].stop();for(this.effects.length=0,n=0,r=this.cleanups.length;n<r;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,r=this.scopes.length;n<r;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0}}}function Rl(){return _e}let te;const Ur=new WeakSet;class lo{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,_e&&(_e.active?_e.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Ur.has(this)&&(Ur.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||uo(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,si(this),fo(this);const e=te,n=ke;te=this,ke=!0;try{return this.fn()}finally{te!==this&&Ve("Active effect was not restored correctly - this is likely a Vue internal bug."),ho(this),te=e,ke=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)Ms(e);this.deps=this.depsTail=void 0,si(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Ur.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){rs(this)&&this.run()}get dirty(){return rs(this)}}let co=0,vn,bn;function uo(t,e=!1){if(t.flags|=8,e){t.next=bn,bn=t;return}t.next=vn,vn=t}function Ns(){co++}function Ps(){if(--co>0)return;if(bn){let e=bn;for(bn=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;vn;){let e=vn;for(vn=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(r){t||(t=r)}e=n}}if(t)throw t}function fo(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function ho(t){let e,n=t.depsTail,r=n;for(;r;){const s=r.prevDep;r.version===-1?(r===n&&(n=s),Ms(r),xl(r)):e=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=s}t.deps=e,t.depsTail=n}function rs(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(po(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function po(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Tn)||(t.globalVersion=Tn,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!rs(t))))return;t.flags|=2;const e=t.dep,n=te,r=ke;te=t,ke=!0;try{fo(t);const s=t.fn(t._value);(e.version===0||nt(s,t._value))&&(t.flags|=128,t._value=s,e.version++)}catch(s){throw e.version++,s}finally{te=n,ke=r,ho(t),t.flags&=-3}}function Ms(t,e=!1){const{dep:n,prevSub:r,nextSub:s}=t;if(r&&(r.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=r,t.nextSub=void 0),n.subsHead===t&&(n.subsHead=s),n.subs===t&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)Ms(i,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function xl(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}let ke=!0;const mo=[];function Ke(){mo.push(ke),ke=!1}function He(){const t=mo.pop();ke=t===void 0?!0:t}function si(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=te;te=void 0;try{e()}finally{te=n}}}let Tn=0;class Il{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ks{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0,this.subsHead=void 0}track(e){if(!te||!ke||te===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==te)n=this.activeLink=new Il(te,this),te.deps?(n.prevDep=te.depsTail,te.depsTail.nextDep=n,te.depsTail=n):te.deps=te.depsTail=n,go(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const r=n.nextDep;r.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=r),n.prevDep=te.depsTail,n.nextDep=void 0,te.depsTail.nextDep=n,te.depsTail=n,te.deps===n&&(te.deps=r)}return te.onTrack&&te.onTrack(ue({effect:te},e)),n}trigger(e){this.version++,Tn++,this.notify(e)}notify(e){Ns();try{for(let n=this.subsHead;n;n=n.nextSub)n.sub.onTrigger&&!(n.sub.flags&8)&&n.sub.onTrigger(ue({effect:n.sub},e));for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Ps()}}}function go(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let r=e.deps;r;r=r.nextDep)go(r)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subsHead===void 0&&(t.dep.subsHead=t),t.dep.subs=t}}const ss=new WeakMap,Dt=Symbol("Object iterate"),is=Symbol("Map keys iterate"),Rn=Symbol("Array iterate");function ge(t,e,n){if(ke&&te){let r=ss.get(t);r||ss.set(t,r=new Map);let s=r.get(n);s||(r.set(n,s=new ks),s.map=r,s.key=n),s.track({target:t,type:e,key:n})}}function rt(t,e,n,r,s,i){const o=ss.get(t);if(!o){Tn++;return}const a=l=>{l&&l.trigger({target:t,type:e,key:n,newValue:r,oldValue:s,oldTarget:i})};if(Ns(),e==="clear")o.forEach(a);else{const l=$(t),u=l&&Is(n);if(l&&n==="length"){const c=Number(r);o.forEach((f,p)=>{(p==="length"||p===Rn||!Ue(p)&&p>=c)&&a(f)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),u&&a(o.get(Rn)),e){case"add":l?u&&a(o.get("length")):(a(o.get(Dt)),xt(t)&&a(o.get(is)));break;case"delete":l||(a(o.get(Dt)),xt(t)&&a(o.get(is)));break;case"set":xt(t)&&a(o.get(Dt));break}}Ps()}function Kt(t){const e=V(t);return e===t?e:(ge(e,"iterate",Rn),Re(t)?e:e.map(qe))}function Cr(t){return ge(t=V(t),"iterate",Rn),t}function tt(t,e){return Be(t)?Zt(Et(t)?qe(e):e):qe(e)}const Dl={__proto__:null,[Symbol.iterator](){return Vr(this,Symbol.iterator,t=>tt(this,t))},concat(...t){return Kt(this).concat(...t.map(e=>$(e)?Kt(e):e))},entries(){return Vr(this,"entries",t=>(t[1]=tt(this,t[1]),t))},every(t,e){return ct(this,"every",t,e,void 0,arguments)},filter(t,e){return ct(this,"filter",t,e,n=>n.map(r=>tt(this,r)),arguments)},find(t,e){return ct(this,"find",t,e,n=>tt(this,n),arguments)},findIndex(t,e){return ct(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return ct(this,"findLast",t,e,n=>tt(this,n),arguments)},findLastIndex(t,e){return ct(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return ct(this,"forEach",t,e,void 0,arguments)},includes(...t){return Kr(this,"includes",t)},indexOf(...t){return Kr(this,"indexOf",t)},join(t){return Kt(this).join(t)},lastIndexOf(...t){return Kr(this,"lastIndexOf",t)},map(t,e){return ct(this,"map",t,e,void 0,arguments)},pop(){return cn(this,"pop")},push(...t){return cn(this,"push",t)},reduce(t,...e){return ii(this,"reduce",t,e)},reduceRight(t,...e){return ii(this,"reduceRight",t,e)},shift(){return cn(this,"shift")},some(t,e){return ct(this,"some",t,e,void 0,arguments)},splice(...t){return cn(this,"splice",t)},toReversed(){return Kt(this).toReversed()},toSorted(t){return Kt(this).toSorted(t)},toSpliced(...t){return Kt(this).toSpliced(...t)},unshift(...t){return cn(this,"unshift",t)},values(){return Vr(this,"values",t=>tt(this,t))}};function Vr(t,e,n){const r=Cr(t),s=r[e]();return r!==t&&!Re(t)&&(s._next=s.next,s.next=()=>{const i=s._next();return i.done||(i.value=n(i.value)),i}),s}const $l=Array.prototype;function ct(t,e,n,r,s,i){const o=Cr(t),a=o!==t&&!Re(t),l=o[e];if(l!==$l[e]){const f=l.apply(t,i);return a?qe(f):f}let u=n;o!==t&&(a?u=function(f,p){return n.call(this,tt(t,f),p,t)}:n.length>2&&(u=function(f,p){return n.call(this,f,p,t)}));const c=l.call(o,u,r);return a&&s?s(c):c}function ii(t,e,n,r){const s=Cr(t),i=s!==t&&!Re(t);let o=n,a=!1;s!==t&&(i?(a=r.length===0,o=function(u,c,f){return a&&(a=!1,u=tt(t,u)),n.call(this,u,tt(t,c),f,t)}):n.length>3&&(o=function(u,c,f){return n.call(this,u,c,f,t)}));const l=s[e](o,...r);return a?tt(t,l):l}function Kr(t,e,n){const r=V(t);ge(r,"iterate",Rn);const s=r[e](...n);return(s===-1||s===!1)&&ir(n[0])?(n[0]=V(n[0]),r[e](...n)):s}function cn(t,e,n=[]){Ke(),Ns();const r=V(t)[e].apply(t,n);return Ps(),He(),r}const Ll=gt("__proto__,__v_isRef,__isVue"),yo=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Ue));function Nl(t){Ue(t)||(t=String(t));const e=V(this);return ge(e,"has",t),e.hasOwnProperty(t)}class _o{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,r){if(n==="__v_skip")return e.__v_skip;const s=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return i;if(n==="__v_raw")return r===(s?i?Ao:Eo:i?Co:wo).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(r)?e:void 0;const o=$(e);if(!s){let l;if(o&&(l=Dl[n]))return l;if(n==="hasOwnProperty")return Nl}const a=Reflect.get(e,n,de(e)?e:r);if((Ue(n)?yo.has(n):Ll(n))||(s||ge(e,"get",n),i))return a;if(de(a)){const l=o&&Is(n)?a:a.value;return s&&Q(l)?as(l):l}return Q(a)?s?as(a):Ar(a):a}}class vo extends _o{constructor(e=!1){super(!1,e)}set(e,n,r,s){let i=e[n];const o=$(e)&&Is(n);if(!this._isShallow){const u=Be(i);if(!Re(r)&&!Be(r)&&(i=V(i),r=V(r)),!o&&de(i)&&!de(r))return u?(Ve(`Set operation on key "${String(n)}" failed: target is readonly.`,e[n]),!0):(i.value=r,!0)}const a=o?Number(n)<e.length:Y(e,n),l=Reflect.set(e,n,r,de(e)?e:s);return e===V(s)&&(a?nt(r,i)&&rt(e,"set",n,r,i):rt(e,"add",n,r)),l}deleteProperty(e,n){const r=Y(e,n),s=e[n],i=Reflect.deleteProperty(e,n);return i&&r&&rt(e,"delete",n,void 0,s),i}has(e,n){const r=Reflect.has(e,n);return(!Ue(n)||!yo.has(n))&&ge(e,"has",n),r}ownKeys(e){return ge(e,"iterate",$(e)?"length":Dt),Reflect.ownKeys(e)}}class bo extends _o{constructor(e=!1){super(!0,e)}set(e,n){return Ve(`Set operation on key "${String(n)}" failed: target is readonly.`,e),!0}deleteProperty(e,n){return Ve(`Delete operation on key "${String(n)}" failed: target is readonly.`,e),!0}}const Pl=new vo,Ml=new bo,kl=new vo(!0),Fl=new bo(!0),os=t=>t,Yn=t=>Reflect.getPrototypeOf(t);function jl(t,e,n){return function(...r){const s=this.__v_raw,i=V(s),o=xt(i),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,u=s[t](...r),c=n?os:e?Zt:qe;return!e&&ge(i,"iterate",l?is:Dt),ue(Object.create(u),{next(){const{value:f,done:p}=u.next();return p?{value:f,done:p}:{value:a?[c(f[0]),c(f[1])]:c(f),done:p}}})}}function Gn(t){return function(...e){{const n=e[0]?`on key "${e[0]}" `:"";Ve(`${wr(t)} operation ${n}failed: target is readonly.`,V(this))}return t==="delete"?!1:t==="clear"?void 0:this}}function Ul(t,e){const n={get(s){const i=this.__v_raw,o=V(i),a=V(s);t||(nt(s,a)&&ge(o,"get",s),ge(o,"get",a));const{has:l}=Yn(o),u=e?os:t?Zt:qe;if(l.call(o,s))return u(i.get(s));if(l.call(o,a))return u(i.get(a));i!==o&&i.get(s)},get size(){const s=this.__v_raw;return!t&&ge(V(s),"iterate",Dt),s.size},has(s){const i=this.__v_raw,o=V(i),a=V(s);return t||(nt(s,a)&&ge(o,"has",s),ge(o,"has",a)),s===a?i.has(s):i.has(s)||i.has(a)},forEach(s,i){const o=this,a=o.__v_raw,l=V(a),u=e?os:t?Zt:qe;return!t&&ge(l,"iterate",Dt),a.forEach((c,f)=>s.call(i,u(c),u(f),o))}};return ue(n,t?{add:Gn("add"),set:Gn("set"),delete:Gn("delete"),clear:Gn("clear")}:{add(s){const i=V(this),o=Yn(i),a=V(s),l=!e&&!Re(s)&&!Be(s)?a:s;return o.has.call(i,l)||nt(s,l)&&o.has.call(i,s)||nt(a,l)&&o.has.call(i,a)||(i.add(l),rt(i,"add",l,l)),this},set(s,i){!e&&!Re(i)&&!Be(i)&&(i=V(i));const o=V(this),{has:a,get:l}=Yn(o);let u=a.call(o,s);u?oi(o,a,s):(s=V(s),u=a.call(o,s));const c=l.call(o,s);return o.set(s,i),u?nt(i,c)&&rt(o,"set",s,i,c):rt(o,"add",s,i),this},delete(s){const i=V(this),{has:o,get:a}=Yn(i);let l=o.call(i,s);l?oi(i,o,s):(s=V(s),l=o.call(i,s));const u=a?a.call(i,s):void 0,c=i.delete(s);return l&&rt(i,"delete",s,void 0,u),c},clear(){const s=V(this),i=s.size!==0,o=xt(s)?new Map(s):new Set(s),a=s.clear();return i&&rt(s,"clear",void 0,void 0,o),a}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=jl(s,t,e)}),n}function Er(t,e){const n=Ul(t,e);return(r,s,i)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?r:Reflect.get(Y(n,s)&&s in r?n:r,s,i)}const Vl={get:Er(!1,!1)},Kl={get:Er(!1,!0)},Hl={get:Er(!0,!1)},Bl={get:Er(!0,!0)};function oi(t,e,n){const r=V(n);if(r!==n&&e.call(t,r)){const s=xs(t);Ve(`Reactive ${s} contains both the raw and reactive versions of the same object${s==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}const wo=new WeakMap,Co=new WeakMap,Eo=new WeakMap,Ao=new WeakMap;function ql(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Ar(t){return Be(t)?t:Sr(t,!1,Pl,Vl,wo)}function Wl(t){return Sr(t,!1,kl,Kl,Co)}function as(t){return Sr(t,!0,Ml,Hl,Eo)}function it(t){return Sr(t,!0,Fl,Bl,Ao)}function Sr(t,e,n,r,s){if(!Q(t))return Ve(`value cannot be made ${e?"readonly":"reactive"}: ${String(t)}`),t;if(t.__v_raw&&!(e&&t.__v_isReactive)||t.__v_skip||!Object.isExtensible(t))return t;const i=s.get(t);if(i)return i;const o=ql(xs(t));if(o===0)return t;const a=new Proxy(t,o===2?r:n);return s.set(t,a),a}function Et(t){return Be(t)?Et(t.__v_raw):!!(t&&t.__v_isReactive)}function Be(t){return!!(t&&t.__v_isReadonly)}function Re(t){return!!(t&&t.__v_isShallow)}function ir(t){return t?!!t.__v_raw:!1}function V(t){const e=t&&t.__v_raw;return e?V(e):t}function Yl(t){return!Y(t,"__v_skip")&&Object.isExtensible(t)&&sr(t,"__v_skip",!0),t}const qe=t=>Q(t)?Ar(t):t,Zt=t=>Q(t)?as(t):t;function de(t){return t?t.__v_isRef===!0:!1}function be(t){return Gl(t,!1)}function Gl(t,e){return de(t)?t:new Jl(t,e)}class Jl{constructor(e,n){this.dep=new ks,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:V(e),this._value=n?e:qe(e),this.__v_isShallow=n}get value(){return this.dep.track({target:this,type:"get",key:"value"}),this._value}set value(e){const n=this._rawValue,r=this.__v_isShallow||Re(e)||Be(e);e=r?e:V(e),nt(e,n)&&(this._rawValue=e,this._value=r?e:qe(e),this.dep.trigger({target:this,type:"set",key:"value",newValue:e,oldValue:n}))}}function zl(t){return de(t)?t.value:t}const Ql={get:(t,e,n)=>e==="__v_raw"?t:zl(Reflect.get(t,e,n)),set:(t,e,n,r)=>{const s=t[e];return de(s)&&!de(n)?(s.value=n,!0):Reflect.set(t,e,n,r)}};function So(t){return Et(t)?t:new Proxy(t,Ql)}class Xl{constructor(e,n,r){this.fn=e,this.setter=n,this._value=void 0,this.dep=new ks(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Tn-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&te!==this)return uo(this,!0),!0}get value(){const e=this.dep.track({target:this,type:"get",key:"value"});return po(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter?this.setter(e):Ve("Write operation failed: computed value is readonly")}}function Zl(t,e,n=!1){let r,s;return M(t)?r=t:(r=t.get,s=t.set),new Xl(r,s,n)}const Jn={},or=new WeakMap;let Rt;function ec(t,e=!1,n=Rt){if(n){let r=or.get(n);r||or.set(n,r=[]),r.push(t)}else e||Ve("onWatcherCleanup() was called when there was no active watcher to associate with.")}function tc(t,e,n=ne){const{immediate:r,deep:s,once:i,scheduler:o,augmentJob:a,call:l}=n,u=R=>{(n.onWarn||Ve)("Invalid watch source: ",R,"A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.")},c=R=>s?R:Re(R)||s===!1||s===0?ht(R,1):ht(R);let f,p,g,O,E=!1,D=!1;if(de(t)?(p=()=>t.value,E=Re(t)):Et(t)?(p=()=>c(t),E=!0):$(t)?(D=!0,E=t.some(R=>Et(R)||Re(R)),p=()=>t.map(R=>{if(de(R))return R.value;if(Et(R))return c(R);if(M(R))return l?l(R,2):R();u(R)})):M(t)?e?p=l?()=>l(t,2):t:p=()=>{if(g){Ke();try{g()}finally{He()}}const R=Rt;Rt=f;try{return l?l(t,3,[O]):t(O)}finally{Rt=R}}:(p=we,u(t)),e&&s){const R=p,x=s===!0?1/0:s;p=()=>ht(R(),x)}const B=Rl(),U=()=>{f.stop(),B&&B.active&&Ts(B.effects,f)};if(i&&e){const R=e;e=(...x)=>{R(...x),U()}}let P=D?new Array(t.length).fill(Jn):Jn;const q=R=>{if(!(!(f.flags&1)||!f.dirty&&!R))if(e){const x=f.run();if(s||E||(D?x.some((K,j)=>nt(K,P[j])):nt(x,P))){g&&g();const K=Rt;Rt=f;try{const j=[x,P===Jn?void 0:D&&P[0]===Jn?[]:P,O];P=x,l?l(e,3,j):e(...j)}finally{Rt=K}}}else f.run()};return a&&a(q),f=new lo(p),f.scheduler=o?()=>o(q,!1):q,O=R=>ec(R,!1,f),g=f.onStop=()=>{const R=or.get(f);if(R){if(l)l(R,4);else for(const x of R)x();or.delete(f)}},f.onTrack=n.onTrack,f.onTrigger=n.onTrigger,e?r?q(!0):P=f.run():o?o(q.bind(null,!0),!0):f.run(),U.pause=f.pause.bind(f),U.resume=f.resume.bind(f),U.stop=U,U}function ht(t,e=1/0,n){if(e<=0||!Q(t)||t.__v_skip||(n=n||new Map,(n.get(t)||0)>=e))return t;if(n.set(t,e),e--,de(t))ht(t.value,e,n);else if($(t))for(let r=0;r<t.length;r++)ht(t[r],e,n);else if(no(t)||xt(t))t.forEach(r=>{ht(r,e,n)});else if(so(t)){for(const r in t)ht(t[r],e,n);for(const r of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,r)&&ht(t[r],e,n)}return t}const $t=[];function zn(t){$t.push(t)}function Qn(){$t.pop()}let Hr=!1;function A(t,...e){if(Hr)return;Hr=!0,Ke();const n=$t.length?$t[$t.length-1].component:null,r=n&&n.appContext.config.warnHandler,s=nc();if(r)en(r,n,11,[t+e.map(i=>{var o,a;return(a=(o=i.toString)==null?void 0:o.call(i))!=null?a:JSON.stringify(i)}).join(""),n&&n.proxy,s.map(({vnode:i})=>`at <${Kn(n,i.type)}>`).join(`
2
+ `),s]);else{const i=[`[Vue warn]: ${t}`,...e];s.length&&i.push(`
3
+ `,...rc(s)),console.warn(...i)}He(),Hr=!1}function nc(){let t=$t[$t.length-1];if(!t)return[];const e=[];for(;t;){const n=e[0];n&&n.vnode===t?n.recurseCount++:e.push({vnode:t,recurseCount:0});const r=t.component&&t.component.parent;t=r&&r.vnode}return e}function rc(t){const e=[];return t.forEach((n,r)=>{e.push(...r===0?[]:[`
4
+ `],...sc(n))}),e}function sc({vnode:t,recurseCount:e}){const n=e>0?`... (${e} recursive calls)`:"",r=t.component?t.component.parent==null:!1,s=` at <${Kn(t.component,t.type,r)}`,i=">"+n;return t.props?[s,...ic(t.props),i]:[s+i]}function ic(t){const e=[],n=Object.keys(t);return n.slice(0,3).forEach(r=>{e.push(...Oo(r,t[r]))}),n.length>3&&e.push(" ..."),e}function Oo(t,e,n){return ae(e)?(e=JSON.stringify(e),n?e:[`${t}=${e}`]):typeof e=="number"||typeof e=="boolean"||e==null?n?e:[`${t}=${e}`]:de(e)?(e=Oo(t,V(e.value),!0),n?e:[`${t}=Ref<`,e,">"]):M(e)?[`${t}=fn${e.name?`<${e.name}>`:""}`]:(e=V(e),n?e:[`${t}=`,e])}const Fs={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"};function en(t,e,n,r){try{return r?t(...r):t()}catch(s){Fn(s,e,n)}}function We(t,e,n,r){if(M(t)){const s=en(t,e,n,r);return s&&Rs(s)&&s.catch(i=>{Fn(i,e,n)}),s}if($(t)){const s=[];for(let i=0;i<t.length;i++)s.push(We(t[i],e,n,r));return s}else A(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof t}`)}function Fn(t,e,n,r=!0){const s=e?e.vnode:null,{errorHandler:i,throwUnhandledErrorInProduction:o}=e&&e.appContext.config||ne;if(e){let a=e.parent;const l=e.proxy,u=Fs[n];for(;a;){const c=a.ec;if(c){for(let f=0;f<c.length;f++)if(c[f](t,l,u)===!1)return}a=a.parent}if(i){Ke(),en(i,null,10,[t,l,u]),He();return}}oc(t,n,s,r,o)}function oc(t,e,n,r=!0,s=!1){{const i=Fs[e];if(n&&zn(n),A(`Unhandled error${i?` during execution of ${i}`:""}`),n&&Qn(),r)throw t;console.error(t)}}const Oe=[];let Ze=-1;const Qt=[];let vt=null,Wt=0;const To=Promise.resolve();let ar=null;const ac=100;function lc(t){const e=ar||To;return t?e.then(this?t.bind(this):t):e}function cc(t){let e=Ze+1,n=Oe.length;for(;e<n;){const r=e+n>>>1,s=Oe[r],i=xn(s);i<t||i===t&&s.flags&2?e=r+1:n=r}return e}function Or(t){if(!(t.flags&1)){const e=xn(t),n=Oe[Oe.length-1];!n||!(t.flags&2)&&e>=xn(n)?Oe.push(t):Oe.splice(cc(e),0,t),t.flags|=1,Ro()}}function Ro(){ar||(ar=To.then(Do))}function xo(t){$(t)?Qt.push(...t):vt&&t.id===-1?vt.splice(Wt+1,0,t):t.flags&1||(Qt.push(t),t.flags|=1),Ro()}function ai(t,e,n=Ze+1){for(e=e||new Map;n<Oe.length;n++){const r=Oe[n];if(r&&r.flags&2){if(t&&r.id!==t.uid||js(e,r))continue;Oe.splice(n,1),n--,r.flags&4&&(r.flags&=-2),r(),r.flags&4||(r.flags&=-2)}}}function Io(t){if(Qt.length){const e=[...new Set(Qt)].sort((n,r)=>xn(n)-xn(r));if(Qt.length=0,vt){vt.push(...e);return}for(vt=e,t=t||new Map,Wt=0;Wt<vt.length;Wt++){const n=vt[Wt];js(t,n)||(n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2)}vt=null,Wt=0}}const xn=t=>t.id==null?t.flags&2?-1:1/0:t.id;function Do(t){t=t||new Map;const e=n=>js(t,n);try{for(Ze=0;Ze<Oe.length;Ze++){const n=Oe[Ze];if(n&&!(n.flags&8)){if(e(n))continue;n.flags&4&&(n.flags&=-2),en(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2)}}}finally{for(;Ze<Oe.length;Ze++){const n=Oe[Ze];n&&(n.flags&=-2)}Ze=-1,Oe.length=0,Io(t),ar=null,(Oe.length||Qt.length)&&Do(t)}}function js(t,e){const n=t.get(e)||0;if(n>ac){const r=e.i,s=r&&pa(r.type);return Fn(`Maximum recursive updates exceeded${s?` in component <${s}>`:""}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,null,10),!0}return t.set(e,n+1),!1}let $e=!1;const li=t=>{try{return $e}finally{$e=t}},Xn=new Map;kn().__VUE_HMR_RUNTIME__={createRecord:Br($o),rerender:Br(dc),reload:Br(hc)};const Nt=new Map;function uc(t){const e=t.type.__hmrId;let n=Nt.get(e);n||($o(e,t.type),n=Nt.get(e)),n.instances.add(t)}function fc(t){Nt.get(t.type.__hmrId).instances.delete(t)}function $o(t,e){return Nt.has(t)?!1:(Nt.set(t,{initialDef:lr(e),instances:new Set}),!0)}function lr(t){return ma(t)?t.__vccOpts:t}function dc(t,e){const n=Nt.get(t);n&&(n.initialDef.render=e,[...n.instances].forEach(r=>{e&&(r.render=e,lr(r.type).render=e),r.renderCache=[],$e=!0,r.job.flags&8||r.update(),$e=!1}))}function hc(t,e){const n=Nt.get(t);if(!n)return;e=lr(e),ci(n.initialDef,e);const r=[...n.instances];for(let s=0;s<r.length;s++){const i=r[s],o=lr(i.type);let a=Xn.get(o);a||(o!==n.initialDef&&ci(o,e),Xn.set(o,a=new Set)),a.add(i),i.appContext.propsCache.delete(i.type),i.appContext.emitsCache.delete(i.type),i.appContext.optionsCache.delete(i.type),i.ceReload?(a.add(i),i.ceReload(e.styles),a.delete(i)):i.parent?Or(()=>{i.job.flags&8||($e=!0,i.parent.update(),$e=!1,a.delete(i))}):i.appContext.reload?i.appContext.reload():typeof window<"u"?window.location.reload():console.warn("[HMR] Root or manually mounted instance modified. Full reload required."),i.root.ce&&i!==i.root&&i.root.ce._removeChildStyle(o)}xo(()=>{Xn.clear()})}function ci(t,e){ue(t,e);for(const n in t)n!=="__file"&&!(n in e)&&delete t[n]}function Br(t){return(e,n)=>{try{return t(e,n)}catch(r){console.error(r),console.warn("[HMR] Something went wrong during Vue component hot-reload. Full reload required.")}}}let st,pn=[],ls=!1;function jn(t,...e){st?st.emit(t,...e):ls||pn.push({event:t,args:e})}function Lo(t,e){var n,r;st=t,st?(st.enabled=!0,pn.forEach(({event:s,args:i})=>st.emit(s,...i)),pn=[]):typeof window<"u"&&window.HTMLElement&&!((r=(n=window.navigator)==null?void 0:n.userAgent)!=null&&r.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{Lo(i,e)}),setTimeout(()=>{st||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,ls=!0,pn=[])},3e3)):(ls=!0,pn=[])}function pc(t,e){jn("app:init",t,e,{Fragment:ve,Text:Un,Comment:Ne,Static:tr})}function mc(t){jn("app:unmount",t)}const gc=Us("component:added"),No=Us("component:updated"),yc=Us("component:removed"),_c=t=>{st&&typeof st.cleanupBuffer=="function"&&!st.cleanupBuffer(t)&&yc(t)};function Us(t){return e=>{jn(t,e.appContext.app,e.uid,e.parent?e.parent.uid:void 0,e)}}const vc=Po("perf:start"),bc=Po("perf:end");function Po(t){return(e,n,r)=>{jn(t,e.appContext.app,e.uid,e,n,r)}}function wc(t,e,n){jn("component:emit",t.appContext.app,t,e,n)}let Te=null,Mo=null;function cr(t){const e=Te;return Te=t,Mo=t&&t.type.__scopeId||null,e}function Cc(t,e=Te,n){if(!e||t._n)return t;const r=(...s)=>{r._d&&Ai(-1);const i=cr(e);let o;try{o=t(...s)}finally{cr(i),r._d&&Ai(1)}return No(e),o};return r._n=!0,r._c=!0,r._d=!0,r}function ko(t){fl(t)&&A("Do not use built-in directive ids as custom directive id: "+t)}function wn(t,e){if(Te===null)return A("withDirectives can only be used inside render functions."),t;const n=Ir(Te),r=t.dirs||(t.dirs=[]);for(let s=0;s<e.length;s++){let[i,o,a,l=ne]=e[s];i&&(M(i)&&(i={mounted:i,updated:i}),i.deep&&ht(o),r.push({dir:i,instance:n,value:o,oldValue:void 0,arg:a,modifiers:l}))}return t}function St(t,e,n,r){const s=t.dirs,i=e&&e.dirs;for(let o=0;o<s.length;o++){const a=s[o];i&&(a.oldValue=i[o].value);let l=a.dir[r];l&&(Ke(),We(l,n,8,[t.el,a,t,e]),He())}}function Ec(t,e){if((!pe||pe.isMounted)&&A("provide() can only be used inside setup()."),pe){let n=pe.provides;const r=pe.parent&&pe.parent.provides;r===n&&(n=pe.provides=Object.create(r)),n[t]=e}}function Zn(t,e,n=!1){const r=fa();if(r||Xt){let s=Xt?Xt._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(s&&t in s)return s[t];if(arguments.length>1)return n&&M(e)?e.call(r&&r.proxy):e;A(`injection "${String(t)}" not found.`)}else A("inject() can only be used inside setup() or functional components.")}const Ac=Symbol.for("v-scx"),Sc=()=>{{const t=Zn(Ac);return t||A("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),t}};function er(t,e,n){return M(e)||A("`watch(fn, options?)` signature has been moved to a separate API. Use `watchEffect(fn, options?)` instead. `watch` now only supports `watch(source, cb, options?) signature."),Fo(t,e,n)}function Fo(t,e,n=ne){const{immediate:r,deep:s,flush:i,once:o}=n;e||(r!==void 0&&A('watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.'),s!==void 0&&A('watch() "deep" option is only respected when using the watch(source, callback, options?) signature.'),o!==void 0&&A('watch() "once" option is only respected when using the watch(source, callback, options?) signature.'));const a=ue({},n);a.onWarn=A;const l=e&&r||!e&&i!=="post";let u;if(Dn){if(i==="sync"){const g=Sc();u=g.__watcherHandles||(g.__watcherHandles=[])}else if(!l){const g=()=>{};return g.stop=we,g.resume=we,g.pause=we,g}}const c=pe;a.call=(g,O,E)=>We(g,c,O,E);let f=!1;i==="post"?a.scheduler=g=>{Ie(g,c&&c.suspense)}:i!=="sync"&&(f=!0,a.scheduler=(g,O)=>{O?g():Or(g)}),a.augmentJob=g=>{e&&(g.flags|=4),f&&(g.flags|=2,c&&(g.id=c.uid,g.i=c))};const p=tc(t,e,a);return Dn&&(u?u.push(p):l&&p()),p}function Oc(t,e,n){const r=this.proxy,s=ae(t)?t.includes(".")?jo(r,t):()=>r[t]:t.bind(r,r);let i;M(e)?i=e:(i=e.handler,n=e);const o=Vn(this),a=Fo(s,i.bind(r),n);return o(),a}function jo(t,e){const n=e.split(".");return()=>{let r=t;for(let s=0;s<n.length&&r;s++)r=r[n[s]];return r}}const Tc=Symbol("_vte"),Rc=t=>t.__isTeleport,qr=Symbol("_leaveCb");function Vs(t,e){t.shapeFlag&6&&t.component?(t.transition=e,Vs(t.component.subTree,e)):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function kt(t,e){return M(t)?ue({name:t.name},e,{setup:t}):t}function Uo(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}const ui=new WeakSet;function fi(t,e){let n;return!!((n=Object.getOwnPropertyDescriptor(t,e))&&!n.configurable)}const ur=new WeakMap;function Cn(t,e,n,r,s=!1){if($(t)){t.forEach((E,D)=>Cn(E,e&&($(e)?e[D]:e),n,r,s));return}if(En(r)&&!s){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Cn(t,e,n,r.component.subTree);return}const i=r.shapeFlag&4?Ir(r.component):r.el,o=s?null:i,{i:a,r:l}=t;if(!a){A("Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.");return}const u=e&&e.r,c=a.refs===ne?a.refs={}:a.refs,f=a.setupState,p=V(f),g=f===ne?to:E=>(Y(p,E)&&!de(p[E])&&A(`Template ref "${E}" used on a non-ref value. It will not work in the production build.`),ui.has(p[E])||fi(c,E)?!1:Y(p,E)),O=(E,D)=>!(ui.has(E)||D&&fi(c,D));if(u!=null&&u!==l){if(di(e),ae(u))c[u]=null,g(u)&&(f[u]=null);else if(de(u)){const E=e;O(u,E.k)&&(u.value=null),E.k&&(c[E.k]=null)}}if(M(l))en(l,a,12,[o,c]);else{const E=ae(l),D=de(l);if(E||D){const B=()=>{if(t.f){const U=E?g(l)?f[l]:c[l]:O(l)||!t.k?l.value:c[t.k];if(s)$(U)&&Ts(U,i);else if($(U))U.includes(i)||U.push(i);else if(E)c[l]=[i],g(l)&&(f[l]=c[l]);else{const P=[i];O(l,t.k)&&(l.value=P),t.k&&(c[t.k]=P)}}else E?(c[l]=o,g(l)&&(f[l]=o)):D?(O(l,t.k)&&(l.value=o),t.k&&(c[t.k]=o)):A("Invalid template ref type:",l,`(${typeof l})`)};if(o){const U=()=>{B(),ur.delete(t)};U.id=-1,ur.set(t,U),Ie(U,n)}else di(t),B()}else A("Invalid template ref type:",l,`(${typeof l})`)}}function di(t){const e=ur.get(t);e&&(e.flags|=8,ur.delete(t))}kn().requestIdleCallback;kn().cancelIdleCallback;const En=t=>!!t.type.__asyncLoader,Ks=t=>t.type.__isKeepAlive;function xc(t,e){Vo(t,"a",e)}function Ic(t,e){Vo(t,"da",e)}function Vo(t,e,n=pe){const r=t.__wdc||(t.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(Tr(e,r,n),n){let s=n.parent;for(;s&&s.parent;)Ks(s.parent.vnode)&&Dc(r,e,n,s),s=s.parent}}function Dc(t,e,n,r){const s=Tr(e,t,r,!0);Ho(()=>{Ts(r[e],s)},n)}function Tr(t,e,n=pe,r=!1){if(n){const s=n[t]||(n[t]=[]),i=e.__weh||(e.__weh=(...o)=>{Ke();const a=Vn(n),l=We(e,n,t,o);return a(),He(),l});return r?s.unshift(i):s.push(i),i}else{const s=Tt(Fs[t].replace(/ hook$/,""));A(`${s} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`)}}const yt=t=>(e,n=pe)=>{(!Dn||t==="sp")&&Tr(t,(...r)=>e(...r),n)},$c=yt("bm"),Ko=yt("m"),Lc=yt("bu"),Nc=yt("u"),Pc=yt("bum"),Ho=yt("um"),Mc=yt("sp"),kc=yt("rtg"),Fc=yt("rtc");function jc(t,e=pe){Tr("ec",t,e)}const Uc=Symbol.for("v-ndc");function Pt(t,e,n,r){let s;const i=n,o=$(t);if(o||ae(t)){const a=o&&Et(t);let l=!1,u=!1;a&&(l=!Re(t),u=Be(t),t=Cr(t)),s=new Array(t.length);for(let c=0,f=t.length;c<f;c++)s[c]=e(l?u?Zt(qe(t[c])):qe(t[c]):t[c],c,void 0,i)}else if(typeof t=="number")if(!Number.isInteger(t)||t<0)A(`The v-for range expects a positive integer value but got ${t}.`),s=[];else{s=new Array(t);for(let a=0;a<t;a++)s[a]=e(a+1,a,void 0,i)}else if(Q(t))if(t[Symbol.iterator])s=Array.from(t,(a,l)=>e(a,l,void 0,i));else{const a=Object.keys(t);s=new Array(a.length);for(let l=0,u=a.length;l<u;l++){const c=a[l];s[l]=e(t[c],c,l,i)}}else s=[];return s}const cs=t=>t?da(t)?Ir(t):cs(t.parent):null,Lt=ue(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>it(t.props),$attrs:t=>it(t.attrs),$slots:t=>it(t.slots),$refs:t=>it(t.refs),$parent:t=>cs(t.parent),$root:t=>cs(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>Wo(t),$forceUpdate:t=>t.f||(t.f=()=>{Or(t.update)}),$nextTick:t=>t.n||(t.n=lc.bind(t.proxy)),$watch:t=>Oc.bind(t)}),Hs=t=>t==="_"||t==="$",Wr=(t,e)=>t!==ne&&!t.__isScriptSetup&&Y(t,e),Bo={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:r,data:s,props:i,accessCache:o,type:a,appContext:l}=t;if(e==="__isVue")return!0;if(e[0]!=="$"){const p=o[e];if(p!==void 0)switch(p){case 1:return r[e];case 2:return s[e];case 4:return n[e];case 3:return i[e]}else{if(Wr(r,e))return o[e]=1,r[e];if(s!==ne&&Y(s,e))return o[e]=2,s[e];if(Y(i,e))return o[e]=3,i[e];if(n!==ne&&Y(n,e))return o[e]=4,n[e];us&&(o[e]=0)}}const u=Lt[e];let c,f;if(u)return e==="$attrs"?(ge(t.attrs,"get",""),dr()):e==="$slots"&&ge(t,"get",e),u(t);if((c=a.__cssModules)&&(c=c[e]))return c;if(n!==ne&&Y(n,e))return o[e]=4,n[e];if(f=l.config.globalProperties,Y(f,e))return f[e];Te&&(!ae(e)||e.indexOf("__v")!==0)&&(s!==ne&&Hs(e[0])&&Y(s,e)?A(`Property ${JSON.stringify(e)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`):t===Te&&A(`Property ${JSON.stringify(e)} was accessed during render but is not defined on instance.`))},set({_:t},e,n){const{data:r,setupState:s,ctx:i}=t;return Wr(s,e)?(s[e]=n,!0):s.__isScriptSetup&&Y(s,e)?(A(`Cannot mutate <script setup> binding "${e}" from Options API.`),!1):r!==ne&&Y(r,e)?(r[e]=n,!0):Y(t.props,e)?(A(`Attempting to mutate prop "${e}". Props are readonly.`),!1):e[0]==="$"&&e.slice(1)in t?(A(`Attempting to mutate public property "${e}". Properties starting with $ are reserved and readonly.`),!1):(e in t.appContext.config.globalProperties?Object.defineProperty(i,e,{enumerable:!0,configurable:!0,value:n}):i[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:r,appContext:s,props:i,type:o}},a){let l;return!!(n[a]||t!==ne&&a[0]!=="$"&&Y(t,a)||Wr(e,a)||Y(i,a)||Y(r,a)||Y(Lt,a)||Y(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:Y(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};Bo.ownKeys=t=>(A("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead."),Reflect.ownKeys(t));function Vc(t){const e={};return Object.defineProperty(e,"_",{configurable:!0,enumerable:!1,get:()=>t}),Object.keys(Lt).forEach(n=>{Object.defineProperty(e,n,{configurable:!0,enumerable:!1,get:()=>Lt[n](t),set:we})}),e}function Kc(t){const{ctx:e,propsOptions:[n]}=t;n&&Object.keys(n).forEach(r=>{Object.defineProperty(e,r,{enumerable:!0,configurable:!0,get:()=>t.props[r],set:we})})}function Hc(t){const{ctx:e,setupState:n}=t;Object.keys(V(n)).forEach(r=>{if(!n.__isScriptSetup){if(Hs(r[0])){A(`setup() return property ${JSON.stringify(r)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`);return}Object.defineProperty(e,r,{enumerable:!0,configurable:!0,get:()=>n[r],set:we})}})}function hi(t){return $(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function Bc(){const t=Object.create(null);return(e,n)=>{t[n]?A(`${e} property "${n}" is already defined in ${t[n]}.`):t[n]=e}}let us=!0;function qc(t){const e=Wo(t),n=t.proxy,r=t.ctx;us=!1,e.beforeCreate&&pi(e.beforeCreate,t,"bc");const{data:s,computed:i,methods:o,watch:a,provide:l,inject:u,created:c,beforeMount:f,mounted:p,beforeUpdate:g,updated:O,activated:E,deactivated:D,beforeDestroy:B,beforeUnmount:U,destroyed:P,unmounted:q,render:R,renderTracked:x,renderTriggered:K,errorCaptured:j,serverPrefetch:se,expose:le,inheritAttrs:k,components:H,directives:he,filters:Ut}=e,Pe=Bc();{const[G]=t.propsOptions;if(G)for(const W in G)Pe("Props",W)}if(u&&Wc(u,r,Pe),o)for(const G in o){const W=o[G];M(W)?(Object.defineProperty(r,G,{value:W.bind(n),configurable:!0,enumerable:!0,writable:!0}),Pe("Methods",G)):A(`Method "${G}" has type "${typeof W}" in the component definition. Did you reference the function correctly?`)}if(s){M(s)||A("The data option must be a function. Plain object usage is no longer supported.");const G=s.call(n,n);if(Rs(G)&&A("data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>."),!Q(G))A("data() should return an object.");else{t.data=Ar(G);for(const W in G)Pe("Data",W),Hs(W[0])||Object.defineProperty(r,W,{configurable:!0,enumerable:!0,get:()=>G[W],set:we})}}if(us=!0,i)for(const G in i){const W=i[G],Ye=M(W)?W.bind(n,n):M(W.get)?W.get.bind(n,n):we;Ye===we&&A(`Computed property "${G}" has no getter.`);const Mr=!M(W)&&M(W.set)?W.set.bind(n):()=>{A(`Write operation failed: computed property "${G}" is readonly.`)},sn=Mt({get:Ye,set:Mr});Object.defineProperty(r,G,{enumerable:!0,configurable:!0,get:()=>sn.value,set:Vt=>sn.value=Vt}),Pe("Computed",G)}if(a)for(const G in a)qo(a[G],r,n,G);if(l){const G=M(l)?l.call(n):l;Reflect.ownKeys(G).forEach(W=>{Ec(W,G[W])})}c&&pi(c,t,"c");function xe(G,W){$(W)?W.forEach(Ye=>G(Ye.bind(n))):W&&G(W.bind(n))}if(xe($c,f),xe(Ko,p),xe(Lc,g),xe(Nc,O),xe(xc,E),xe(Ic,D),xe(jc,j),xe(Fc,x),xe(kc,K),xe(Pc,U),xe(Ho,q),xe(Mc,se),$(le))if(le.length){const G=t.exposed||(t.exposed={});le.forEach(W=>{Object.defineProperty(G,W,{get:()=>n[W],set:Ye=>n[W]=Ye,enumerable:!0})})}else t.exposed||(t.exposed={});R&&t.render===we&&(t.render=R),k!=null&&(t.inheritAttrs=k),H&&(t.components=H),he&&(t.directives=he),se&&Uo(t)}function Wc(t,e,n=we){$(t)&&(t=fs(t));for(const r in t){const s=t[r];let i;Q(s)?"default"in s?i=Zn(s.from||r,s.default,!0):i=Zn(s.from||r):i=Zn(s),de(i)?Object.defineProperty(e,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):e[r]=i,n("Inject",r)}}function pi(t,e,n){We($(t)?t.map(r=>r.bind(e.proxy)):t.bind(e.proxy),e,n)}function qo(t,e,n,r){let s=r.includes(".")?jo(n,r):()=>n[r];if(ae(t)){const i=e[t];M(i)?er(s,i):A(`Invalid watch handler specified by key "${t}"`,i)}else if(M(t))er(s,t.bind(n));else if(Q(t))if($(t))t.forEach(i=>qo(i,e,n,r));else{const i=M(t.handler)?t.handler.bind(n):e[t.handler];M(i)?er(s,i,t):A(`Invalid watch handler specified by key "${t.handler}"`,i)}else A(`Invalid watch option: "${r}"`,t)}function Wo(t){const e=t.type,{mixins:n,extends:r}=e,{mixins:s,optionsCache:i,config:{optionMergeStrategies:o}}=t.appContext,a=i.get(e);let l;return a?l=a:!s.length&&!n&&!r?l=e:(l={},s.length&&s.forEach(u=>fr(l,u,o,!0)),fr(l,e,o)),Q(e)&&i.set(e,l),l}function fr(t,e,n,r=!1){const{mixins:s,extends:i}=e;i&&fr(t,i,n,!0),s&&s.forEach(o=>fr(t,o,n,!0));for(const o in e)if(r&&o==="expose")A('"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.');else{const a=Yc[o]||n&&n[o];t[o]=a?a(t[o],e[o]):e[o]}return t}const Yc={data:mi,props:gi,emits:gi,methods:mn,computed:mn,beforeCreate:Ae,created:Ae,beforeMount:Ae,mounted:Ae,beforeUpdate:Ae,updated:Ae,beforeDestroy:Ae,beforeUnmount:Ae,destroyed:Ae,unmounted:Ae,activated:Ae,deactivated:Ae,errorCaptured:Ae,serverPrefetch:Ae,components:mn,directives:mn,watch:Jc,provide:mi,inject:Gc};function mi(t,e){return e?t?function(){return ue(M(t)?t.call(this,this):t,M(e)?e.call(this,this):e)}:e:t}function Gc(t,e){return mn(fs(t),fs(e))}function fs(t){if($(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function Ae(t,e){return t?[...new Set([].concat(t,e))]:e}function mn(t,e){return t?ue(Object.create(null),t,e):e}function gi(t,e){return t?$(t)&&$(e)?[...new Set([...t,...e])]:ue(Object.create(null),hi(t),hi(e??{})):e}function Jc(t,e){if(!t)return e;if(!e)return t;const n=ue(Object.create(null),t);for(const r in e)n[r]=Ae(t[r],e[r]);return n}function Yo(){return{app:null,config:{isNativeTag:to,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let zc=0;function Qc(t,e){return function(r,s=null){M(r)||(r=ue({},r)),s!=null&&!Q(s)&&(A("root props passed to app.mount() must be an object."),s=null);const i=Yo(),o=new WeakSet,a=[];let l=!1;const u=i.app={_uid:zc++,_component:r,_props:s,_container:null,_context:i,_instance:null,version:Ti,get config(){return i.config},set config(c){A("app.config cannot be replaced. Modify individual options instead.")},use(c,...f){return o.has(c)?A("Plugin has already been applied to target app."):c&&M(c.install)?(o.add(c),c.install(u,...f)):M(c)?(o.add(c),c(u,...f)):A('A plugin must either be a function or an object with an "install" function.'),u},mixin(c){return i.mixins.includes(c)?A("Mixin has already been applied to target app"+(c.name?`: ${c.name}`:"")):i.mixins.push(c),u},component(c,f){return ys(c,i.config),f?(i.components[c]&&A(`Component "${c}" has already been registered in target app.`),i.components[c]=f,u):i.components[c]},directive(c,f){return ko(c),f?(i.directives[c]&&A(`Directive "${c}" has already been registered in target app.`),i.directives[c]=f,u):i.directives[c]},mount(c,f,p){if(l)A("App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. `const createMyApp = () => createApp(App)`");else{c.__vue_app__&&A("There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling `app.unmount()` first.");const g=u._ceVNode||Fe(r,s);return g.appContext=i,p===!0?p="svg":p===!1&&(p=void 0),i.reload=()=>{const O=At(g);O.el=null,t(O,c,p)},t(g,c,p),l=!0,u._container=c,c.__vue_app__=u,u._instance=g.component,pc(u,Ti),Ir(g.component)}},onUnmount(c){typeof c!="function"&&A(`Expected function as first argument to app.onUnmount(), but got ${typeof c}`),a.push(c)},unmount(){l?(We(a,u._instance,16),t(null,u._container),u._instance=null,mc(u),delete u._container.__vue_app__):A("Cannot unmount an app that is not mounted.")},provide(c,f){return c in i.provides&&(Y(i.provides,c)?A(`App already provides property with key "${String(c)}". It will be overwritten with the new value.`):A(`App already provides property with key "${String(c)}" inherited from its parent element. It will be overwritten with the new value.`)),i.provides[c]=f,u},runWithContext(c){const f=Xt;Xt=u;try{return c()}finally{Xt=f}}};return u}}let Xt=null;const Xc=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${De(e)}Modifiers`]||t[`${mt(e)}Modifiers`];function Zc(t,e,...n){if(t.isUnmounted)return;const r=t.vnode.props||ne;{const{emitsOptions:c,propsOptions:[f]}=t;if(c)if(!(e in c))(!f||!(Tt(De(e))in f))&&A(`Component emitted event "${e}" but it is neither declared in the emits option nor as an "${Tt(De(e))}" prop.`);else{const p=c[e];M(p)&&(p(...n)||A(`Invalid event arguments: event validation failed for event "${e}".`))}}let s=n;const i=e.startsWith("update:"),o=i&&Xc(r,e.slice(7));o&&(o.trim&&(s=n.map(c=>ae(c)?c.trim():c)),o.number&&(s=n.map(Ds))),wc(t,e,s);{const c=e.toLowerCase();c!==e&&r[Tt(c)]&&A(`Event "${c}" is emitted in component ${Kn(t,t.type)} but the handler is registered for "${e}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${mt(e)}" instead of "${e}".`)}let a,l=r[a=Tt(e)]||r[a=Tt(De(e))];!l&&i&&(l=r[a=Tt(mt(e))]),l&&We(l,t,6,s);const u=r[a+"Once"];if(u){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,We(u,t,6,s)}}const eu=new WeakMap;function Go(t,e,n=!1){const r=n?eu:e.emitsCache,s=r.get(t);if(s!==void 0)return s;const i=t.emits;let o={},a=!1;if(!M(t)){const l=u=>{const c=Go(u,e,!0);c&&(a=!0,ue(o,c))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!i&&!a?(Q(t)&&r.set(t,null),null):($(i)?i.forEach(l=>o[l]=null):ue(o,i),Q(t)&&r.set(t,o),o)}function Rr(t,e){return!t||!Pn(e)?!1:(e=e.slice(2).replace(/Once$/,""),Y(t,e[0].toLowerCase()+e.slice(1))||Y(t,mt(e))||Y(t,e))}let ds=!1;function dr(){ds=!0}function yi(t){const{type:e,vnode:n,proxy:r,withProxy:s,propsOptions:[i],slots:o,attrs:a,emit:l,render:u,renderCache:c,props:f,data:p,setupState:g,ctx:O,inheritAttrs:E}=t,D=cr(t);let B,U;ds=!1;try{if(n.shapeFlag&4){const R=s||r,x=g.__isScriptSetup?new Proxy(R,{get(K,j,se){return A(`Property '${String(j)}' was accessed via 'this'. Avoid using 'this' in templates.`),Reflect.get(K,j,se)}}):R;B=Me(u.call(x,R,c,it(f),g,p,O)),U=a}else{const R=e;a===f&&dr(),B=Me(R.length>1?R(it(f),{get attrs(){return dr(),it(a)},slots:o,emit:l}):R(it(f),null)),U=e.props?a:tu(a)}}catch(R){An.length=0,Fn(R,t,1),B=Fe(Ne)}let P=B,q;if(B.patchFlag>0&&B.patchFlag&2048&&([P,q]=Jo(B)),U&&E!==!1){const R=Object.keys(U),{shapeFlag:x}=P;if(R.length){if(x&7)i&&R.some(On)&&(U=nu(U,i)),P=At(P,U,!1,!0);else if(!ds&&P.type!==Ne){const K=Object.keys(a),j=[],se=[];for(let le=0,k=K.length;le<k;le++){const H=K[le];Pn(H)?On(H)||j.push(H[2].toLowerCase()+H.slice(3)):se.push(H)}se.length&&A(`Extraneous non-props attributes (${se.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`),j.length&&A(`Extraneous non-emits event listeners (${j.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`)}}}return n.dirs&&(_i(P)||A("Runtime directive used on component with non-element root node. The directives will not function as intended."),P=At(P,null,!1,!0),P.dirs=P.dirs?P.dirs.concat(n.dirs):n.dirs),n.transition&&(_i(P)||A("Component inside <Transition> renders non-element root node that cannot be animated."),Vs(P,n.transition)),q?q(P):B=P,cr(D),B}const Jo=t=>{const e=t.children,n=t.dynamicChildren,r=Bs(e,!1);if(r){if(r.patchFlag>0&&r.patchFlag&2048)return Jo(r)}else return[t,void 0];const s=e.indexOf(r),i=n?n.indexOf(r):-1,o=a=>{e[s]=a,n&&(i>-1?n[i]=a:a.patchFlag>0&&(t.dynamicChildren=[...n,a]))};return[Me(r),o]};function Bs(t,e=!0){let n;for(let r=0;r<t.length;r++){const s=t[r];if(xr(s)){if(s.type!==Ne||s.children==="v-if"){if(n)return;if(n=s,e&&n.patchFlag>0&&n.patchFlag&2048)return Bs(n.children)}}else return}return n}const tu=t=>{let e;for(const n in t)(n==="class"||n==="style"||Pn(n))&&((e||(e={}))[n]=t[n]);return e},nu=(t,e)=>{const n={};for(const r in t)(!On(r)||!(r.slice(9)in e))&&(n[r]=t[r]);return n},_i=t=>t.shapeFlag&7||t.type===Ne;function ru(t,e,n){const{props:r,children:s,component:i}=t,{props:o,children:a,patchFlag:l}=e,u=i.emitsOptions;if((s||a)&&$e||e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return r?vi(r,o,u):!!o;if(l&8){const c=e.dynamicProps;for(let f=0;f<c.length;f++){const p=c[f];if(zo(o,r,p)&&!Rr(u,p))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:r===o?!1:r?o?vi(r,o,u):!0:!!o;return!1}function vi(t,e,n){const r=Object.keys(e);if(r.length!==Object.keys(t).length)return!0;for(let s=0;s<r.length;s++){const i=r[s];if(zo(e,t,i)&&!Rr(n,i))return!0}return!1}function zo(t,e,n){const r=t[n],s=e[n];return n==="style"&&Q(r)&&Q(s)?!Ls(r,s):r!==s}function su({vnode:t,parent:e,suspense:n},r){for(;e;){const s=e.subTree;if(s.suspense&&s.suspense.activeBranch===t&&(s.suspense.vnode.el=s.el=r,t=s),s===t)(t=e.vnode).el=r,e=e.parent;else break}n&&n.activeBranch===t&&(n.vnode.el=r)}const Qo={},Xo=()=>Object.create(Qo),Zo=t=>Object.getPrototypeOf(t)===Qo;function iu(t,e,n,r=!1){const s={},i=Xo();t.propsDefaults=Object.create(null),ea(t,e,s,i);for(const o in t.propsOptions[0])o in s||(s[o]=void 0);na(e||{},s,t),n?t.props=r?s:Wl(s):t.type.props?t.props=s:t.props=i,t.attrs=i}function ou(t){for(;t;){if(t.type.__hmrId)return!0;t=t.parent}}function au(t,e,n,r){const{props:s,attrs:i,vnode:{patchFlag:o}}=t,a=V(s),[l]=t.propsOptions;let u=!1;if(!ou(t)&&(r||o>0)&&!(o&16)){if(o&8){const c=t.vnode.dynamicProps;for(let f=0;f<c.length;f++){let p=c[f];if(Rr(t.emitsOptions,p))continue;const g=e[p];if(l)if(Y(i,p))g!==i[p]&&(i[p]=g,u=!0);else{const O=De(p);s[O]=hs(l,a,O,g,t,!1)}else g!==i[p]&&(i[p]=g,u=!0)}}}else{ea(t,e,s,i)&&(u=!0);let c;for(const f in a)(!e||!Y(e,f)&&((c=mt(f))===f||!Y(e,c)))&&(l?n&&(n[f]!==void 0||n[c]!==void 0)&&(s[f]=hs(l,a,f,void 0,t,!0)):delete s[f]);if(i!==a)for(const f in i)(!e||!Y(e,f))&&(delete i[f],u=!0)}u&&rt(t.attrs,"set",""),na(e||{},s,t)}function ea(t,e,n,r){const[s,i]=t.propsOptions;let o=!1,a;if(e)for(let l in e){if(_n(l))continue;const u=e[l];let c;s&&Y(s,c=De(l))?!i||!i.includes(c)?n[c]=u:(a||(a={}))[c]=u:Rr(t.emitsOptions,l)||(!(l in r)||u!==r[l])&&(r[l]=u,o=!0)}if(i){const l=V(n),u=a||ne;for(let c=0;c<i.length;c++){const f=i[c];n[f]=hs(s,l,f,u[f],t,!Y(u,f))}}return o}function hs(t,e,n,r,s,i){const o=t[n];if(o!=null){const a=Y(o,"default");if(a&&r===void 0){const l=o.default;if(o.type!==Function&&!o.skipFactory&&M(l)){const{propsDefaults:u}=s;if(n in u)r=u[n];else{const c=Vn(s);r=u[n]=l.call(null,e),c()}}else r=l;s.ce&&s.ce._setProp(n,r)}o[0]&&(i&&!a?r=!1:o[1]&&(r===""||r===mt(n))&&(r=!0))}return r}const lu=new WeakMap;function ta(t,e,n=!1){const r=n?lu:e.propsCache,s=r.get(t);if(s)return s;const i=t.props,o={},a=[];let l=!1;if(!M(t)){const c=f=>{l=!0;const[p,g]=ta(f,e,!0);ue(o,p),g&&a.push(...g)};!n&&e.mixins.length&&e.mixins.forEach(c),t.extends&&c(t.extends),t.mixins&&t.mixins.forEach(c)}if(!i&&!l)return Q(t)&&r.set(t,zt),zt;if($(i))for(let c=0;c<i.length;c++){ae(i[c])||A("props must be strings when using array syntax.",i[c]);const f=De(i[c]);bi(f)&&(o[f]=ne)}else if(i){Q(i)||A("invalid props options",i);for(const c in i){const f=De(c);if(bi(f)){const p=i[c],g=o[f]=$(p)||M(p)?{type:p}:ue({},p),O=g.type;let E=!1,D=!0;if($(O))for(let B=0;B<O.length;++B){const U=O[B],P=M(U)&&U.name;if(P==="Boolean"){E=!0;break}else P==="String"&&(D=!1)}else E=M(O)&&O.name==="Boolean";g[0]=E,g[1]=D,(E||Y(g,"default"))&&a.push(f)}}}const u=[o,a];return Q(t)&&r.set(t,u),u}function bi(t){return t[0]!=="$"&&!_n(t)?!0:(A(`Invalid prop name: "${t}" is a reserved property.`),!1)}function cu(t){return t===null?"null":typeof t=="function"?t.name||"":typeof t=="object"&&t.constructor&&t.constructor.name||""}function na(t,e,n){const r=V(e),s=n.propsOptions[0],i=Object.keys(t).map(o=>De(o));for(const o in s){let a=s[o];a!=null&&uu(o,r[o],a,it(r),!i.includes(o))}}function uu(t,e,n,r,s){const{type:i,required:o,validator:a,skipCheck:l}=n;if(o&&s){A('Missing required prop: "'+t+'"');return}if(!(e==null&&!o)){if(i!=null&&i!==!0&&!l){let u=!1;const c=$(i)?i:[i],f=[];for(let p=0;p<c.length&&!u;p++){const{valid:g,expectedType:O}=du(e,c[p]);f.push(O||""),u=g}if(!u){A(hu(t,e,f));return}}a&&!a(e,r)&&A('Invalid prop: custom validator check failed for prop "'+t+'".')}}const fu=gt("String,Number,Boolean,Function,Symbol,BigInt");function du(t,e){let n;const r=cu(e);if(r==="null")n=t===null;else if(fu(r)){const s=typeof t;n=s===r.toLowerCase(),!n&&s==="object"&&(n=t instanceof e)}else r==="Object"?n=Q(t):r==="Array"?n=$(t):n=t instanceof e;return{valid:n,expectedType:r}}function hu(t,e,n){if(n.length===0)return`Prop type [] for prop "${t}" won't match anything. Did you mean to use type Array instead?`;let r=`Invalid prop: type check failed for prop "${t}". Expected ${n.map(wr).join(" | ")}`;const s=n[0],i=xs(e),o=wi(e,s),a=wi(e,i);return n.length===1&&Ci(s)&&pu(s,i)&&(r+=` with value ${o}`),r+=`, got ${i} `,Ci(i)&&(r+=`with value ${a}.`),r}function wi(t,e){return Ue(t)?t.toString():e==="String"?`"${t}"`:e==="Number"?`${Number(t)}`:`${t}`}function Ci(t){return["string","number","boolean"].some(n=>t.toLowerCase()===n)}function pu(...t){return t.every(e=>{const n=e.toLowerCase();return n!=="boolean"&&n!=="symbol"})}const qs=t=>t==="_"||t==="_ctx"||t==="$stable",Ws=t=>$(t)?t.map(Me):[Me(t)],mu=(t,e,n)=>{if(e._n)return e;const r=Cc((...s)=>(pe&&!(n===null&&Te)&&!(n&&n.root!==pe.root)&&A(`Slot "${t}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`),Ws(e(...s))),n);return r._c=!1,r},ra=(t,e,n)=>{const r=t._ctx;for(const s in t){if(qs(s))continue;const i=t[s];if(M(i))e[s]=mu(s,i,r);else if(i!=null){A(`Non-function value encountered for slot "${s}". Prefer function slots for better performance.`);const o=Ws(i);e[s]=()=>o}}},sa=(t,e)=>{Ks(t.vnode)||A("Non-function value encountered for default slot. Prefer function slots for better performance.");const n=Ws(e);t.slots.default=()=>n},ps=(t,e,n)=>{for(const r in e)(n||!qs(r))&&(t[r]=e[r])},gu=(t,e,n)=>{const r=t.slots=Xo();if(t.vnode.shapeFlag&32){const s=e._;s?(ps(r,e,n),n&&sr(r,"_",s,!0)):ra(e,r)}else e&&sa(t,e)},yu=(t,e,n)=>{const{vnode:r,slots:s}=t;let i=!0,o=ne;if(r.shapeFlag&32){const a=e._;a?$e?(ps(s,e,n),rt(t,"set","$slots")):n&&a===1?i=!1:ps(s,e,n):(i=!e.$stable,ra(e,s)),o=e}else e&&(sa(t,e),o={default:1});if(i)for(const a in s)!qs(a)&&o[a]==null&&delete s[a]};let un,ft;function Ht(t,e){t.appContext.config.performance&&hr()&&ft.mark(`vue-${e}-${t.uid}`),vc(t,e,hr()?ft.now():Date.now())}function Bt(t,e){if(t.appContext.config.performance&&hr()){const n=`vue-${e}-${t.uid}`,r=n+":end",s=`<${Kn(t,t.type)}> ${e}`;ft.mark(r),ft.measure(s,n,r),ft.clearMeasures(s),ft.clearMarks(n),ft.clearMarks(r)}bc(t,e,hr()?ft.now():Date.now())}function hr(){return un!==void 0||(typeof window<"u"&&window.performance?(un=!0,ft=window.performance):un=!1),un}function _u(){const t=[];if(t.length){const e=t.length>1;console.warn(`Feature flag${e?"s":""} ${t.join(", ")} ${e?"are":"is"} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.
5
+
6
+ For more details, see https://link.vuejs.org/feature-flags.`)}}const Ie=Eu;function vu(t){return bu(t)}function bu(t,e){_u();const n=kn();n.__VUE__=!0,Lo(n.__VUE_DEVTOOLS_GLOBAL_HOOK__,n);const{insert:r,remove:s,patchProp:i,createElement:o,createText:a,createComment:l,setText:u,setElementText:c,parentNode:f,nextSibling:p,setScopeId:g=we,insertStaticContent:O}=t,E=(d,h,m,b=null,_=null,y=null,S=void 0,C=null,w=$e?!1:!!h.dynamicChildren)=>{if(d===h)return;d&&!fn(d,h)&&(b=Wn(d),_t(d,_,y,!0),d=null),h.patchFlag===-2&&(w=!1,h.dynamicChildren=null);const{type:v,ref:L,shapeFlag:T}=h;switch(v){case Un:D(d,h,m,b);break;case Ne:B(d,h,m,b);break;case tr:d==null?U(h,m,b,S):P(d,h,m,S);break;case ve:he(d,h,m,b,_,y,S,C,w);break;default:T&1?x(d,h,m,b,_,y,S,C,w):T&6?Ut(d,h,m,b,_,y,S,C,w):T&64||T&128?v.process(d,h,m,b,_,y,S,C,w,an):A("Invalid VNode type:",v,`(${typeof v})`)}L!=null&&_?Cn(L,d&&d.ref,y,h||d,!h):L==null&&d&&d.ref!=null&&Cn(d.ref,null,y,d,!0)},D=(d,h,m,b)=>{if(d==null)r(h.el=a(h.children),m,b);else{const _=h.el=d.el;h.children!==d.children&&u(_,h.children)}},B=(d,h,m,b)=>{d==null?r(h.el=l(h.children||""),m,b):h.el=d.el},U=(d,h,m,b)=>{[d.el,d.anchor]=O(d.children,h,m,b,d.el,d.anchor)},P=(d,h,m,b)=>{if(h.children!==d.children){const _=p(d.anchor);R(d),[h.el,h.anchor]=O(h.children,m,_,b)}else h.el=d.el,h.anchor=d.anchor},q=({el:d,anchor:h},m,b)=>{let _;for(;d&&d!==h;)_=p(d),r(d,m,b),d=_;r(h,m,b)},R=({el:d,anchor:h})=>{let m;for(;d&&d!==h;)m=p(d),s(d),d=m;s(h)},x=(d,h,m,b,_,y,S,C,w)=>{if(h.type==="svg"?S="svg":h.type==="math"&&(S="mathml"),d==null)K(h,m,b,_,y,S,C,w);else{const v=d.el&&d.el._isVueCE?d.el:null;try{v&&v._beginPatch(),le(d,h,_,y,S,C,w)}finally{v&&v._endPatch()}}},K=(d,h,m,b,_,y,S,C)=>{let w,v;const{props:L,shapeFlag:T,transition:I,dirs:F}=d;if(w=d.el=o(d.type,y,L&&L.is,L),T&8?c(w,d.children):T&16&&se(d.children,w,null,b,_,Yr(d,y),S,C),F&&St(d,null,b,"created"),j(w,d,d.scopeId,S,b),L){for(const ee in L)ee!=="value"&&!_n(ee)&&i(w,ee,null,L[ee],y,b);"value"in L&&i(w,"value",null,L.value,y),(v=L.onVnodeBeforeMount)&&Qe(v,b,d)}sr(w,"__vnode",d,!0),sr(w,"__vueParentComponent",b,!0),F&&St(d,null,b,"beforeMount");const J=wu(_,I);if(J&&I.beforeEnter(w),r(w,h,m),(v=L&&L.onVnodeMounted)||J||F){const ee=$e;Ie(()=>{let Z;Z=li(ee);try{v&&Qe(v,b,d),J&&I.enter(w),F&&St(d,null,b,"mounted")}finally{li(Z)}},_)}},j=(d,h,m,b,_)=>{if(m&&g(d,m),b)for(let y=0;y<b.length;y++)g(d,b[y]);if(_){let y=_.subTree;if(y.patchFlag>0&&y.patchFlag&2048&&(y=Bs(y.children)||y),h===y||aa(y.type)&&(y.ssContent===h||y.ssFallback===h)){const S=_.vnode;j(d,S,S.scopeId,S.slotScopeIds,_.parent)}}},se=(d,h,m,b,_,y,S,C,w=0)=>{for(let v=w;v<d.length;v++){const L=d[v]=C?dt(d[v]):Me(d[v]);E(null,L,h,m,b,_,y,S,C)}},le=(d,h,m,b,_,y,S)=>{const C=h.el=d.el;C.__vnode=h;let{patchFlag:w,dynamicChildren:v,dirs:L}=h;w|=d.patchFlag&16;const T=d.props||ne,I=h.props||ne;let F;if(m&&Ot(m,!1),(F=I.onVnodeBeforeUpdate)&&Qe(F,m,h,d),L&&St(h,d,m,"beforeUpdate"),m&&Ot(m,!0),$e&&(w=0,S=!1,v=null),(T.innerHTML&&I.innerHTML==null||T.textContent&&I.textContent==null)&&c(C,""),v?(k(d.dynamicChildren,v,C,m,b,Yr(h,_),y),ms(d,h)):S||Ye(d,h,C,null,m,b,Yr(h,_),y,!1),w>0){if(w&16)H(C,T,I,m,_);else if(w&2&&T.class!==I.class&&i(C,"class",null,I.class,_),w&4&&i(C,"style",T.style,I.style,_),w&8){const J=h.dynamicProps;for(let ee=0;ee<J.length;ee++){const Z=J[ee],fe=T[Z],ye=I[Z];(ye!==fe||Z==="value")&&i(C,Z,fe,ye,_,m)}}w&1&&d.children!==h.children&&c(C,h.children)}else!S&&v==null&&H(C,T,I,m,_);((F=I.onVnodeUpdated)||L)&&Ie(()=>{F&&Qe(F,m,h,d),L&&St(h,d,m,"updated")},b)},k=(d,h,m,b,_,y,S)=>{for(let C=0;C<h.length;C++){const w=d[C],v=h[C],L=w.el&&(w.type===ve||!fn(w,v)||w.shapeFlag&198)?f(w.el):m;E(w,v,L,null,b,_,y,S,!0)}},H=(d,h,m,b,_)=>{if(h!==m){if(h!==ne)for(const y in h)!_n(y)&&!(y in m)&&i(d,y,h[y],null,_,b);for(const y in m){if(_n(y))continue;const S=m[y],C=h[y];S!==C&&y!=="value"&&i(d,y,C,S,_,b)}"value"in m&&i(d,"value",h.value,m.value,_)}},he=(d,h,m,b,_,y,S,C,w)=>{const v=h.el=d?d.el:a(""),L=h.anchor=d?d.anchor:a("");let{patchFlag:T,dynamicChildren:I,slotScopeIds:F}=h;($e||T&2048)&&(T=0,w=!1,I=null),F&&(C=C?C.concat(F):F),d==null?(r(v,m,b),r(L,m,b),se(h.children||[],m,L,_,y,S,C,w)):T>0&&T&64&&I&&d.dynamicChildren&&d.dynamicChildren.length===I.length?(k(d.dynamicChildren,I,m,_,y,S,C),ms(d,h)):Ye(d,h,m,L,_,y,S,C,w)},Ut=(d,h,m,b,_,y,S,C,w)=>{h.slotScopeIds=C,d==null?h.shapeFlag&512?_.ctx.activate(h,m,b,S,w):Pe(h,m,b,_,y,S,w):xe(d,h,w)},Pe=(d,h,m,b,_,y,S)=>{const C=d.component=$u(d,b,_);if(C.type.__hmrId&&uc(C),zn(d),Ht(C,"mount"),Ks(d)&&(C.ctx.renderer=an),Ht(C,"init"),Nu(C,!1,S),Bt(C,"init"),$e&&(d.el=null),C.asyncDep){if(_&&_.registerDep(C,G,S),!d.el){const w=C.subTree=Fe(Ne);B(null,w,h,m),d.placeholder=w.el}}else G(C,d,h,m,_,y,S);Qn(),Bt(C,"mount")},xe=(d,h,m)=>{const b=h.component=d.component;if(ru(d,h,m))if(b.asyncDep&&!b.asyncResolved){zn(h),W(b,h,m),Qn();return}else b.next=h,b.update();else h.el=d.el,b.vnode=h},G=(d,h,m,b,_,y,S)=>{const C=()=>{if(d.isMounted){let{next:T,bu:I,u:F,parent:J,vnode:ee}=d;{const Je=ia(d);if(Je){T&&(T.el=ee.el,W(d,T,S)),Je.asyncDep.then(()=>{Ie(()=>{d.isUnmounted||v()},_)});return}}let Z=T,fe;zn(T||d.vnode),Ot(d,!1),T?(T.el=ee.el,W(d,T,S)):T=ee,I&&qt(I),(fe=T.props&&T.props.onVnodeBeforeUpdate)&&Qe(fe,J,T,ee),Ot(d,!0),Ht(d,"render");const ye=yi(d);Bt(d,"render");const Ge=d.subTree;d.subTree=ye,Ht(d,"patch"),E(Ge,ye,f(Ge.el),Wn(Ge),d,_,y),Bt(d,"patch"),T.el=ye.el,Z===null&&su(d,ye.el),F&&Ie(F,_),(fe=T.props&&T.props.onVnodeUpdated)&&Ie(()=>Qe(fe,J,T,ee),_),No(d),Qn()}else{let T;const{el:I,props:F}=h,{bm:J,m:ee,parent:Z,root:fe,type:ye}=d,Ge=En(h);Ot(d,!1),J&&qt(J),!Ge&&(T=F&&F.onVnodeBeforeMount)&&Qe(T,Z,h),Ot(d,!0);{fe.ce&&fe.ce._hasShadowRoot()&&fe.ce._injectChildStyle(ye,d.parent?d.parent.type:void 0),Ht(d,"render");const Je=d.subTree=yi(d);Bt(d,"render"),Ht(d,"patch"),E(null,Je,m,b,d,_,y),Bt(d,"patch"),h.el=Je.el}if(ee&&Ie(ee,_),!Ge&&(T=F&&F.onVnodeMounted)){const Je=h;Ie(()=>Qe(T,Z,Je),_)}(h.shapeFlag&256||Z&&En(Z.vnode)&&Z.vnode.shapeFlag&256)&&d.a&&Ie(d.a,_),d.isMounted=!0,gc(d),h=m=b=null}};d.scope.on();const w=d.effect=new lo(C);d.scope.off();const v=d.update=w.run.bind(w),L=d.job=w.runIfDirty.bind(w);L.i=d,L.id=d.uid,w.scheduler=()=>Or(L),Ot(d,!0),w.onTrack=d.rtc?T=>qt(d.rtc,T):void 0,w.onTrigger=d.rtg?T=>qt(d.rtg,T):void 0,v()},W=(d,h,m)=>{h.component=d;const b=d.vnode.props;d.vnode=h,d.next=null,au(d,h.props,b,m),yu(d,h.children,m),Ke(),ai(d),He()},Ye=(d,h,m,b,_,y,S,C,w=!1)=>{const v=d&&d.children,L=d?d.shapeFlag:0,T=h.children,{patchFlag:I,shapeFlag:F}=h;if(I>0){if(I&128){sn(v,T,m,b,_,y,S,C,w);return}else if(I&256){Mr(v,T,m,b,_,y,S,C,w);return}}F&8?(L&16&&on(v,_,y),T!==v&&c(m,T)):L&16?F&16?sn(v,T,m,b,_,y,S,C,w):on(v,_,y,!0):(L&8&&c(m,""),F&16&&se(T,m,b,_,y,S,C,w))},Mr=(d,h,m,b,_,y,S,C,w)=>{d=d||zt,h=h||zt;const v=d.length,L=h.length,T=Math.min(v,L);let I;for(I=0;I<T;I++){const F=h[I]=w?dt(h[I]):Me(h[I]);E(d[I],F,m,null,_,y,S,C,w)}v>L?on(d,_,y,!0,!1,T):se(h,m,b,_,y,S,C,w,T)},sn=(d,h,m,b,_,y,S,C,w)=>{let v=0;const L=h.length;let T=d.length-1,I=L-1;for(;v<=T&&v<=I;){const F=d[v],J=h[v]=w?dt(h[v]):Me(h[v]);if(fn(F,J))E(F,J,m,null,_,y,S,C,w);else break;v++}for(;v<=T&&v<=I;){const F=d[T],J=h[I]=w?dt(h[I]):Me(h[I]);if(fn(F,J))E(F,J,m,null,_,y,S,C,w);else break;T--,I--}if(v>T){if(v<=I){const F=I+1,J=F<L?h[F].el:b;for(;v<=I;)E(null,h[v]=w?dt(h[v]):Me(h[v]),m,J,_,y,S,C,w),v++}}else if(v>I)for(;v<=T;)_t(d[v],_,y,!0),v++;else{const F=v,J=v,ee=new Map;for(v=J;v<=I;v++){const Ee=h[v]=w?dt(h[v]):Me(h[v]);Ee.key!=null&&(ee.has(Ee.key)&&A("Duplicate keys found during update:",JSON.stringify(Ee.key),"Make sure keys are unique."),ee.set(Ee.key,v))}let Z,fe=0;const ye=I-J+1;let Ge=!1,Je=0;const ln=new Array(ye);for(v=0;v<ye;v++)ln[v]=0;for(v=F;v<=T;v++){const Ee=d[v];if(fe>=ye){_t(Ee,_,y,!0);continue}let ze;if(Ee.key!=null)ze=ee.get(Ee.key);else for(Z=J;Z<=I;Z++)if(ln[Z-J]===0&&fn(Ee,h[Z])){ze=Z;break}ze===void 0?_t(Ee,_,y,!0):(ln[ze-J]=v+1,ze>=Je?Je=ze:Ge=!0,E(Ee,h[ze],m,null,_,y,S,C,w),fe++)}const Zs=Ge?Cu(ln):zt;for(Z=Zs.length-1,v=ye-1;v>=0;v--){const Ee=J+v,ze=h[Ee],ei=h[Ee+1],ti=Ee+1<L?ei.el||oa(ei):b;ln[v]===0?E(null,ze,m,ti,_,y,S,C,w):Ge&&(Z<0||v!==Zs[Z]?Vt(ze,m,ti,2):Z--)}}},Vt=(d,h,m,b,_=null)=>{const{el:y,type:S,transition:C,children:w,shapeFlag:v}=d;if(v&6){Vt(d.component.subTree,h,m,b);return}if(v&128){d.suspense.move(h,m,b);return}if(v&64){S.move(d,h,m,an);return}if(S===ve){r(y,h,m);for(let T=0;T<w.length;T++)Vt(w[T],h,m,b);r(d.anchor,h,m);return}if(S===tr){q(d,h,m);return}if(b!==2&&v&1&&C)if(b===0)C.persisted&&!y[qr]?r(y,h,m):(C.beforeEnter(y),r(y,h,m),Ie(()=>C.enter(y),_));else{const{leave:T,delayLeave:I,afterLeave:F}=C,J=()=>{d.ctx.isUnmounted?s(y):r(y,h,m)},ee=()=>{const Z=y._isLeaving||!!y[qr];y._isLeaving&&y[qr](!0),C.persisted&&!Z?J():T(y,()=>{J(),F&&F()})};I?I(y,J,ee):ee()}else r(y,h,m)},_t=(d,h,m,b=!1,_=!1)=>{const{type:y,props:S,ref:C,children:w,dynamicChildren:v,shapeFlag:L,patchFlag:T,dirs:I,cacheIndex:F,memo:J}=d;if(T===-2&&(_=!1),C!=null&&(Ke(),Cn(C,null,m,d,!0),He()),F!=null&&(h.renderCache[F]=void 0),L&256){h.ctx.deactivate(d);return}const ee=L&1&&I,Z=!En(d);let fe;if(Z&&(fe=S&&S.onVnodeBeforeUnmount)&&Qe(fe,h,d),L&6)cl(d.component,m,b);else{if(L&128){d.suspense.unmount(m,b);return}ee&&St(d,null,h,"beforeUnmount"),L&64?d.type.remove(d,h,m,an,b):v&&!v.hasOnce&&(y!==ve||T>0&&T&64)?on(v,h,m,!1,!0):(y===ve&&T&384||!_&&L&16)&&on(w,h,m),b&&kr(d)}const ye=J!=null&&F==null;(Z&&(fe=S&&S.onVnodeUnmounted)||ee||ye)&&Ie(()=>{fe&&Qe(fe,h,d),ee&&St(d,null,h,"unmounted"),ye&&(d.el=null)},m)},kr=d=>{const{type:h,el:m,anchor:b,transition:_}=d;if(h===ve){d.patchFlag>0&&d.patchFlag&2048&&_&&!_.persisted?d.children.forEach(S=>{S.type===Ne?s(S.el):kr(S)}):ll(m,b);return}if(h===tr){R(d);return}const y=()=>{s(m),_&&!_.persisted&&_.afterLeave&&_.afterLeave()};if(d.shapeFlag&1&&_&&!_.persisted){const{leave:S,delayLeave:C}=_,w=()=>S(m,y);C?C(d.el,y,w):w()}else y()},ll=(d,h)=>{let m;for(;d!==h;)m=p(d),s(d),d=m;s(h)},cl=(d,h,m)=>{d.type.__hmrId&&fc(d);const{bum:b,scope:_,job:y,subTree:S,um:C,m:w,a:v}=d;Ei(w),Ei(v),b&&qt(b),_.stop(),y&&(y.flags|=8,_t(S,d,h,m)),C&&Ie(C,h),Ie(()=>{d.isUnmounted=!0},h),_c(d)},on=(d,h,m,b=!1,_=!1,y=0)=>{for(let S=y;S<d.length;S++)_t(d[S],h,m,b,_)},Wn=d=>{if(d.shapeFlag&6)return Wn(d.component.subTree);if(d.shapeFlag&128)return d.suspense.next();const h=p(d.anchor||d.el),m=h&&h[Tc];return m?p(m):h};let Fr=!1;const Xs=(d,h,m)=>{let b;d==null?h._vnode&&(_t(h._vnode,null,null,!0),b=h._vnode.component):E(h._vnode||null,d,h,null,null,null,m),h._vnode=d,Fr||(Fr=!0,ai(b),Io(),Fr=!1)},an={p:E,um:_t,m:Vt,r:kr,mt:Pe,mc:se,pc:Ye,pbc:k,n:Wn,o:t};return{render:Xs,hydrate:void 0,createApp:Qc(Xs)}}function Yr({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function Ot({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function wu(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function ms(t,e,n=!1){const r=t.children,s=e.children;if($(r)&&$(s))for(let i=0;i<r.length;i++){const o=r[i];let a=s[i];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[i]=dt(s[i]),a.el=o.el),!n&&a.patchFlag!==-2&&ms(o,a)),a.type===Un&&(a.patchFlag===-1&&(a=s[i]=dt(a)),a.el=o.el),a.type===Ne&&!a.el&&(a.el=o.el),a.el&&(a.el.__vnode=a)}}function Cu(t){const e=t.slice(),n=[0];let r,s,i,o,a;const l=t.length;for(r=0;r<l;r++){const u=t[r];if(u!==0){if(s=n[n.length-1],t[s]<u){e[r]=s,n.push(r);continue}for(i=0,o=n.length-1;i<o;)a=i+o>>1,t[n[a]]<u?i=a+1:o=a;u<t[n[i]]&&(i>0&&(e[r]=n[i-1]),n[i]=r)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=e[o];return n}function ia(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:ia(e)}function Ei(t){if(t)for(let e=0;e<t.length;e++)t[e].flags|=8}function oa(t){if(t.placeholder)return t.placeholder;const e=t.component;return e?oa(e.subTree):null}const aa=t=>t.__isSuspense;function Eu(t,e){e&&e.pendingBranch?$(t)?e.effects.push(...t):e.effects.push(t):xo(t)}const ve=Symbol.for("v-fgt"),Un=Symbol.for("v-txt"),Ne=Symbol.for("v-cmt"),tr=Symbol.for("v-stc"),An=[];let Le=null;function X(t=!1){An.push(Le=t?null:[])}function Au(){An.pop(),Le=An[An.length-1]||null}let In=1;function Ai(t,e=!1){In+=t,t<0&&Le&&e&&(Le.hasOnce=!0)}function la(t){return t.dynamicChildren=In>0?Le||zt:null,Au(),In>0&&Le&&Le.push(t),t}function re(t,e,n,r,s,i){return la(N(t,e,n,r,s,i,!0))}function gn(t,e,n,r,s){return la(Fe(t,e,n,r,s,!0))}function xr(t){return t?t.__v_isVNode===!0:!1}function fn(t,e){if(e.shapeFlag&6&&t.component){const n=Xn.get(e.type);if(n&&n.has(t.component))return t.shapeFlag&=-257,e.shapeFlag&=-513,!1}return t.type===e.type&&t.key===e.key}const Su=(...t)=>Ou(...t),ca=({key:t})=>t??null,nr=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?ae(t)||de(t)||M(t)?{i:Te,r:t,k:e,f:!!n}:t:null);function N(t,e=null,n=null,r=0,s=null,i=t===ve?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&ca(e),ref:e&&nr(e),scopeId:Mo,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:r,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Te};return a?(Ys(l,n),i&128&&t.normalize(l)):n&&(l.shapeFlag|=ae(n)?8:16),l.key!==l.key&&A("VNode created with invalid key (NaN). VNode type:",l.type),In>0&&!o&&Le&&(l.patchFlag>0||i&6)&&l.patchFlag!==32&&Le.push(l),l}const Fe=Su;function Ou(t,e=null,n=null,r=0,s=null,i=!1){if((!t||t===Uc)&&(t||A(`Invalid vnode type when creating vnode: ${t}.`),t=Ne),xr(t)){const a=At(t,e,!0);return n&&Ys(a,n),In>0&&!i&&Le&&(a.shapeFlag&6?Le[Le.indexOf(t)]=a:Le.push(a)),a.patchFlag=-2,a}if(ma(t)&&(t=t.__vccOpts),e){e=Tu(e);let{class:a,style:l}=e;a&&!ae(a)&&(e.class=It(a)),Q(l)&&(ir(l)&&!$(l)&&(l=ue({},l)),e.style=$s(l))}const o=ae(t)?1:aa(t)?128:Rc(t)?64:Q(t)?4:M(t)?2:0;return o&4&&ir(t)&&(t=V(t),A("Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with `markRaw` or using `shallowRef` instead of `ref`.",`
7
+ Component that was made reactive: `,t)),N(t,e,n,r,s,o,i,!0)}function Tu(t){return t?ir(t)||Zo(t)?ue({},t):t:null}function At(t,e,n=!1,r=!1){const{props:s,ref:i,patchFlag:o,children:a,transition:l}=t,u=e?xu(s||{},e):s,c={__v_isVNode:!0,__v_skip:!0,type:t.type,props:u,key:u&&ca(u),ref:e&&e.ref?n&&i?$(i)?i.concat(nr(e)):[i,nr(e)]:nr(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:o===-1&&$(a)?a.map(ua):a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==ve?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&At(t.ssContent),ssFallback:t.ssFallback&&At(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&r&&Vs(c,l.clone(c)),c}function ua(t){const e=At(t);return $(t.children)&&(e.children=t.children.map(ua)),e}function Ru(t=" ",e=0){return Fe(Un,null,t,e)}function Ct(t="",e=!1){return e?(X(),gn(Ne,null,t)):Fe(Ne,null,t)}function Me(t){return t==null||typeof t=="boolean"?Fe(Ne):$(t)?Fe(ve,null,t.slice()):xr(t)?dt(t):Fe(Un,null,String(t))}function dt(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:At(t)}function Ys(t,e){let n=0;const{shapeFlag:r}=t;if(e==null)e=null;else if($(e))n=16;else if(typeof e=="object")if(r&65){const s=e.default;s&&(s._c&&(s._d=!1),Ys(t,s()),s._c&&(s._d=!0));return}else{n=32;const s=e._;!s&&!Zo(e)?e._ctx=Te:s===3&&Te&&(Te.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else M(e)?(e={default:e,_ctx:Te},n=32):(e=String(e),r&64?(n=16,e=[Ru(e)]):n=8);t.children=e,t.shapeFlag|=n}function xu(...t){const e={};for(let n=0;n<t.length;n++){const r=t[n];for(const s in r)if(s==="class")e.class!==r.class&&(e.class=It([e.class,r.class]));else if(s==="style")e.style=$s([e.style,r.style]);else if(Pn(s)){const i=e[s],o=r[s];o&&i!==o&&!($(i)&&i.includes(o))?e[s]=i?[].concat(i,o):o:o==null&&i==null&&!On(s)&&(e[s]=o)}else s!==""&&(e[s]=r[s])}return e}function Qe(t,e,n,r=null){We(t,e,7,[n,r])}const Iu=Yo();let Du=0;function $u(t,e,n){const r=t.type,s=(e?e.appContext:t.appContext)||Iu,i={uid:Du++,vnode:t,type:r,parent:e,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Tl(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(s.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ta(r,s),emitsOptions:Go(r,s),emit:null,emitted:null,propsDefaults:ne,inheritAttrs:r.inheritAttrs,ctx:ne,data:ne,props:ne,attrs:ne,slots:ne,refs:ne,setupState:ne,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx=Vc(i),i.root=e?e.root:i,i.emit=Zc.bind(null,i),t.ce&&t.ce(i),i}let pe=null;const fa=()=>pe||Te;let pr,gs;{const t=kn(),e=(n,r)=>{let s;return(s=t[n])||(s=t[n]=[]),s.push(r),i=>{s.length>1?s.forEach(o=>o(i)):s[0](i)}};pr=e("__VUE_INSTANCE_SETTERS__",n=>pe=n),gs=e("__VUE_SSR_SETTERS__",n=>Dn=n)}const Vn=t=>{const e=pe;return pr(t),t.scope.on(),()=>{t.scope.off(),pr(e)}},Si=()=>{pe&&pe.scope.off(),pr(null)},Lu=gt("slot,component");function ys(t,{isNativeTag:e}){(Lu(t)||e(t))&&A("Do not use built-in or reserved HTML elements as component id: "+t)}function da(t){return t.vnode.shapeFlag&4}let Dn=!1;function Nu(t,e=!1,n=!1){e&&gs(e);const{props:r,children:s}=t.vnode,i=da(t);iu(t,r,i,e),gu(t,s,n||e);const o=i?Pu(t,e):void 0;return e&&gs(!1),o}function Pu(t,e){const n=t.type;{if(n.name&&ys(n.name,t.appContext.config),n.components){const s=Object.keys(n.components);for(let i=0;i<s.length;i++)ys(s[i],t.appContext.config)}if(n.directives){const s=Object.keys(n.directives);for(let i=0;i<s.length;i++)ko(s[i])}n.compilerOptions&&Mu()&&A('"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.')}t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,Bo),Kc(t);const{setup:r}=n;if(r){Ke();const s=t.setupContext=r.length>1?ju(t):null,i=Vn(t),o=en(r,t,0,[it(t.props),s]),a=Rs(o);if(He(),i(),(a||t.sp)&&!En(t)&&Uo(t),a){if(o.then(Si,Si),e)return o.then(l=>{Oi(t,l,e)}).catch(l=>{Fn(l,t,0)});if(t.asyncDep=o,!t.suspense){const l=Kn(t,n);A(`Component <${l}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`)}}else Oi(t,o,e)}else ha(t,e)}function Oi(t,e,n){M(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Q(e)?(xr(e)&&A("setup() should not return VNodes directly - return a render function instead."),t.devtoolsRawSetupState=e,t.setupState=So(e),Hc(t)):e!==void 0&&A(`setup() should return an object. Received: ${e===null?"null":typeof e}`),ha(t,n)}const Mu=()=>!0;function ha(t,e,n){const r=t.type;t.render||(t.render=r.render||we);{const s=Vn(t);Ke();try{qc(t)}finally{He(),s()}}!r.render&&t.render===we&&!e&&(r.template?A('Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".'):A("Component is missing template or render function: ",r))}const ku={get(t,e){return dr(),ge(t,"get",""),t[e]},set(){return A("setupContext.attrs is readonly."),!1},deleteProperty(){return A("setupContext.attrs is readonly."),!1}};function Fu(t){return new Proxy(t.slots,{get(e,n){return ge(t,"get","$slots"),e[n]}})}function ju(t){const e=n=>{if(t.exposed&&A("expose() should be called only once per setup()."),n!=null){let r=typeof n;r==="object"&&($(n)?r="array":de(n)&&(r="ref")),r!=="object"&&A(`expose() should be passed a plain object, received ${r}.`)}t.exposed=n||{}};{let n,r;return Object.freeze({get attrs(){return n||(n=new Proxy(t.attrs,ku))},get slots(){return r||(r=Fu(t))},get emit(){return(s,...i)=>t.emit(s,...i)},expose:e})}}function Ir(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(So(Yl(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in Lt)return Lt[n](t)},has(e,n){return n in e||n in Lt}})):t.proxy}const Uu=/(?:^|[-_])\w/g,Vu=t=>t.replace(Uu,e=>e.toUpperCase()).replace(/[-_]/g,"");function pa(t,e=!0){return M(t)?t.displayName||t.name:t.name||e&&t.__name}function Kn(t,e,n=!1){let r=pa(e);if(!r&&e.__file){const s=e.__file.match(/([^/\\]+)\.\w+$/);s&&(r=s[1])}if(!r&&t){const s=i=>{for(const o in i)if(i[o]===e)return o};r=s(t.components)||t.parent&&s(t.parent.type.components)||s(t.appContext.components)}return r?Vu(r):n?"App":"Anonymous"}function ma(t){return M(t)&&"__vccOpts"in t}const Mt=(t,e)=>{const n=Zl(t,e,Dn);{const r=fa();r&&r.appContext.config.warnRecursiveComputed&&(n._warnRecursive=!0)}return n};function Ku(){if(typeof window>"u")return;const t={style:"color:#3ba776"},e={style:"color:#1677ff"},n={style:"color:#f5222d"},r={style:"color:#eb2f96"},s={__vue_custom_formatter:!0,header(f){if(!Q(f))return null;if(f.__isVue)return["div",t,"VueInstance"];if(de(f)){Ke();const p=f.value;return He(),["div",{},["span",t,c(f)],"<",a(p),">"]}else{if(Et(f))return["div",{},["span",t,Re(f)?"ShallowReactive":"Reactive"],"<",a(f),`>${Be(f)?" (readonly)":""}`];if(Be(f))return["div",{},["span",t,Re(f)?"ShallowReadonly":"Readonly"],"<",a(f),">"]}return null},hasBody(f){return f&&f.__isVue},body(f){if(f&&f.__isVue)return["div",{},...i(f.$)]}};function i(f){const p=[];f.type.props&&f.props&&p.push(o("props",V(f.props))),f.setupState!==ne&&p.push(o("setup",f.setupState)),f.data!==ne&&p.push(o("data",V(f.data)));const g=l(f,"computed");g&&p.push(o("computed",g));const O=l(f,"inject");return O&&p.push(o("injected",O)),p.push(["div",{},["span",{style:r.style+";opacity:0.66"},"$ (internal): "],["object",{object:f}]]),p}function o(f,p){return p=ue({},p),Object.keys(p).length?["div",{style:"line-height:1.25em;margin-bottom:0.6em"},["div",{style:"color:#476582"},f],["div",{style:"padding-left:1.25em"},...Object.keys(p).map(g=>["div",{},["span",r,g+": "],a(p[g],!1)])]]:["span",{}]}function a(f,p=!0){return typeof f=="number"?["span",e,f]:typeof f=="string"?["span",n,JSON.stringify(f)]:typeof f=="boolean"?["span",r,f]:Q(f)?["object",{object:p?V(f):f}]:["span",n,String(f)]}function l(f,p){const g=f.type;if(M(g))return;const O={};for(const E in f.ctx)u(g,E,p)&&(O[E]=f.ctx[E]);return O}function u(f,p,g){const O=f[g];if($(O)&&O.includes(p)||Q(O)&&p in O||f.extends&&u(f.extends,p,g)||f.mixins&&f.mixins.some(E=>u(E,p,g)))return!0}function c(f){return Re(f)?"ShallowRef":f.effect?"ComputedRef":"Ref"}window.devtoolsFormatters?window.devtoolsFormatters.push(s):window.devtoolsFormatters=[s]}const Ti="3.5.35",pt=A;let _s;const Ri=typeof window<"u"&&window.trustedTypes;if(Ri)try{_s=Ri.createPolicy("vue",{createHTML:t=>t})}catch(t){pt(`Error creating trusted types policy: ${t}`)}const ga=_s?t=>_s.createHTML(t):t=>t,Hu="http://www.w3.org/2000/svg",Bu="http://www.w3.org/1998/Math/MathML",ut=typeof document<"u"?document:null,xi=ut&&ut.createElement("template"),qu={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,r)=>{const s=e==="svg"?ut.createElementNS(Hu,t):e==="mathml"?ut.createElementNS(Bu,t):n?ut.createElement(t,{is:n}):ut.createElement(t);return t==="select"&&r&&r.multiple!=null&&s.setAttribute("multiple",r.multiple),s},createText:t=>ut.createTextNode(t),createComment:t=>ut.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>ut.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,r,s,i){const o=n?n.previousSibling:e.lastChild;if(s&&(s===i||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),n),!(s===i||!(s=s.nextSibling)););else{xi.innerHTML=ga(r==="svg"?`<svg>${t}</svg>`:r==="mathml"?`<math>${t}</math>`:t);const a=xi.content;if(r==="svg"||r==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[o?o.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},Wu=Symbol("_vtc");function Yu(t,e,n){const r=t[Wu];r&&(e=(e?[e,...r]:[...r]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const mr=Symbol("_vod"),ya=Symbol("_vsh"),Gu={name:"show",beforeMount(t,{value:e},{transition:n}){t[mr]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):dn(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:r}){!e!=!n&&(r?e?(r.beforeEnter(t),dn(t,!0),r.enter(t)):r.leave(t,()=>{dn(t,!1)}):dn(t,e))},beforeUnmount(t,{value:e}){dn(t,e)}};function dn(t,e){t.style.display=e?t[mr]:"none",t[ya]=!e}const Ju=Symbol("CSS_VAR_TEXT"),zu=/(?:^|;)\s*display\s*:/;function Qu(t,e,n){const r=t.style,s=ae(n);let i=!1;if(n&&!s){if(e)if(ae(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&yn(r,a,"")}else for(const o in e)n[o]==null&&yn(r,o,"");for(const o in n){o==="display"&&(i=!0);const a=n[o];a!=null?ef(t,o,!ae(e)&&e?e[o]:void 0,a)||yn(r,o,a):yn(r,o,"")}}else if(s){if(e!==n){const o=r[Ju];o&&(n+=";"+o),r.cssText=n,i=zu.test(n)}}else e&&t.removeAttribute("style");mr in t&&(t[mr]=i?r.display:"",t[ya]&&(r.display="none"))}const Xu=/[^\\];\s*$/,Ii=/\s*!important$/;function yn(t,e,n){if($(n))n.forEach(r=>yn(t,e,r));else if(n==null&&(n=""),Xu.test(n)&&pt(`Unexpected semicolon at the end of '${e}' style value: '${n}'`),e.startsWith("--"))t.setProperty(e,n);else{const r=Zu(t,e);Ii.test(n)?t.setProperty(mt(r),n.replace(Ii,""),"important"):t[r]=n}}const Di=["Webkit","Moz","ms"],Gr={};function Zu(t,e){const n=Gr[e];if(n)return n;let r=De(e);if(r!=="filter"&&r in t)return Gr[e]=r;r=wr(r);for(let s=0;s<Di.length;s++){const i=Di[s]+r;if(i in t)return Gr[e]=i}return e}function ef(t,e,n,r){return t.tagName==="TEXTAREA"&&(e==="width"||e==="height")&&ae(r)&&n===r}const $i="http://www.w3.org/1999/xlink";function Li(t,e,n,r,s,i=Sl(e)){r&&e.startsWith("xlink:")?n==null?t.removeAttributeNS($i,e.slice(6,e.length)):t.setAttributeNS($i,e,n):n==null||i&&!io(n)?t.removeAttribute(e):t.setAttribute(e,i?"":Ue(n)?String(n):n)}function Ni(t,e,n,r,s){if(e==="innerHTML"||e==="textContent"){n!=null&&(t[e]=e==="innerHTML"?ga(n):n);return}const i=t.tagName;if(e==="value"&&i!=="PROGRESS"&&!i.includes("-")){const a=i==="OPTION"?t.getAttribute("value")||"":t.value,l=n==null?t.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in t))&&(t.value=l),n==null&&t.removeAttribute(e),t._value=n;return}let o=!1;if(n===""||n==null){const a=typeof t[e];a==="boolean"?n=io(n):n==null&&a==="string"?(n="",o=!0):a==="number"&&(n=0,o=!0)}try{t[e]=n}catch(a){o||pt(`Failed setting prop "${e}" on <${i.toLowerCase()}>: value ${n} is invalid.`,a)}o&&t.removeAttribute(s||e)}function Yt(t,e,n,r){t.addEventListener(e,n,r)}function tf(t,e,n,r){t.removeEventListener(e,n,r)}const Pi=Symbol("_vei");function nf(t,e,n,r,s=null){const i=t[Pi]||(t[Pi]={}),o=i[e];if(r&&o)o.value=ki(r,e);else{const[a,l]=rf(e);if(r){const u=i[e]=af(ki(r,e),s);Yt(t,a,u,l)}else o&&(tf(t,a,o,l),i[e]=void 0)}}const Mi=/(?:Once|Passive|Capture)$/;function rf(t){let e;if(Mi.test(t)){e={};let r;for(;r=t.match(Mi);)t=t.slice(0,t.length-r[0].length),e[r[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):mt(t.slice(2)),e]}let Jr=0;const sf=Promise.resolve(),of=()=>Jr||(sf.then(()=>Jr=0),Jr=Date.now());function af(t,e){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;const s=n.value;if($(s)){const i=r.stopImmediatePropagation;r.stopImmediatePropagation=()=>{i.call(r),r._stopped=!0};const o=s.slice(),a=[r];for(let l=0;l<o.length&&!r._stopped;l++){const u=o[l];u&&We(u,e,5,a)}}else We(s,e,5,[r])};return n.value=t,n.attached=of(),n}function ki(t,e){return M(t)||$(t)?t:(pt(`Wrong type passed as event handler to ${e} - did you forget @ or : in front of your prop?
8
+ Expected function or array of functions, received type ${typeof t}.`),we)}const Fi=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,lf=(t,e,n,r,s,i)=>{const o=s==="svg";e==="class"?Yu(t,r,o):e==="style"?Qu(t,n,r):Pn(e)?On(e)||nf(t,e,n,r,i):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):cf(t,e,r,o))?(Ni(t,e,r),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&Li(t,e,r,o,i,e!=="value")):t._isVueCE&&(uf(t,e)||t._def.__asyncLoader&&(/[A-Z]/.test(e)||!ae(r)))?Ni(t,De(e),r,i,e):(e==="true-value"?t._trueValue=r:e==="false-value"&&(t._falseValue=r),Li(t,e,r,o))};function cf(t,e,n,r){if(r)return!!(e==="innerHTML"||e==="textContent"||e in t&&Fi(e)&&M(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="sandbox"&&t.tagName==="IFRAME"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const s=t.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return Fi(e)&&ae(n)?!1:e in t}function uf(t,e){const n=t._def.props;if(!n)return!1;const r=De(e);return Array.isArray(n)?n.some(s=>De(s)===r):Object.keys(n).some(s=>De(s)===r)}const ji=t=>{const e=t.props["onUpdate:modelValue"]||!1;return $(e)?n=>qt(e,n):e};function ff(t){t.target.composing=!0}function Ui(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const zr=Symbol("_assign");function Vi(t,e,n){return e&&(t=t.trim()),n&&(t=Ds(t)),t}const rr={created(t,{modifiers:{lazy:e,trim:n,number:r}},s){t[zr]=ji(s);const i=r||s.props&&s.props.type==="number";Yt(t,e?"change":"input",o=>{o.target.composing||t[zr](Vi(t.value,n,i))}),(n||i)&&Yt(t,"change",()=>{t.value=Vi(t.value,n,i)}),e||(Yt(t,"compositionstart",ff),Yt(t,"compositionend",Ui),Yt(t,"change",Ui))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:r,trim:s,number:i}},o){if(t[zr]=ji(o),t.composing)return;const a=(i||t.type==="number")&&!/^0\d/.test(t.value)?Ds(t.value):t.value,l=e??"";if(a===l)return;const u=t.getRootNode();(u instanceof Document||u instanceof ShadowRoot)&&u.activeElement===t&&t.type!=="range"&&(r&&e===n||s&&t.value.trim()===l)||(t.value=l)}},df=["ctrl","shift","alt","meta"],hf={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>df.some(n=>t[`${n}Key`]&&!e.includes(n))},_a=(t,e)=>{if(!t)return t;const n=t._withMods||(t._withMods={}),r=e.join(".");return n[r]||(n[r]=(s,...i)=>{for(let o=0;o<e.length;o++){const a=hf[e[o]];if(a&&a(s,e))return}return t(s,...i)})},pf={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},mf=(t,e)=>{const n=t._withKeys||(t._withKeys={}),r=e.join(".");return n[r]||(n[r]=s=>{if(!("key"in s))return;const i=mt(s.key);if(e.some(o=>o===i||pf[o]===i))return t(s)})},gf=ue({patchProp:lf},qu);let Ki;function yf(){return Ki||(Ki=vu(gf))}const _f=(...t)=>{const e=yf().createApp(...t);bf(e),wf(e);const{mount:n}=e;return e.mount=r=>{const s=Cf(r);if(!s)return;const i=e._component;!M(i)&&!i.render&&!i.template&&(i.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,vf(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},e};function vf(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function bf(t){Object.defineProperty(t.config,"isNativeTag",{value:e=>wl(e)||Cl(e)||El(e),writable:!1})}function wf(t){{const e=t.config.isCustomElement;Object.defineProperty(t.config,"isCustomElement",{get(){return e},set(){pt("The `isCustomElement` config option is deprecated. Use `compilerOptions.isCustomElement` instead.")}});const n=t.config.compilerOptions,r='The `compilerOptions` config option is only respected when using a build of Vue.js that includes the runtime compiler (aka "full build"). Since you are using the runtime-only build, `compilerOptions` must be passed to `@vue/compiler-dom` in the build setup instead.\n- For vue-loader: pass it via vue-loader\'s `compilerOptions` loader option.\n- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-sfc';Object.defineProperty(t.config,"compilerOptions",{get(){return pt(r),n},set(){pt(r)}})}}function Cf(t){if(ae(t)){const e=document.querySelector(t);return e||pt(`Failed to mount app: mount target selector "${t}" returned null.`),e}return window.ShadowRoot&&t instanceof window.ShadowRoot&&t.mode==="closed"&&pt('mounting on a ShadowRoot with `{mode: "closed"}` may lead to unpredictable bugs'),t}function Ef(){Ku()}Ef();var Af=Object.defineProperty,Sf=(t,e,n)=>e in t?Af(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Of=(t,e,n)=>Sf(t,e+"",n);function Tf({allowCoordinator:t,allowOwner:e,query:n={},required:r,user:s}){if(!s)throw new Error("Require login.");s.permission;const i=s.permission.getScopes(r||{})||[];!i||i.length,i.includes("*")||(n.tenantCode=s.tenantCode),i.includes("TENANT")||(n.eventShortCode=s.eventShortCode),t&&n.registrationGroupCode&&s.myManagedRegistrationGroupCodes.includes(n.registrationGroupCode)?n.__ALLOW_COORDINATOR=!0:i.includes("EVENT")||(n.eventRegistrationCode=s.eventRegistrationCode),e&&(n.__ALLOW_OWNER=!0);const o=s.getExcludedFields(r);return o.length>0&&(n.__EXCLUDED_FIELDS=o),n.__LOGIN_SUBJECT_CODE=s.loginSubjectCode,n}function Rf(t,e){const n=new Date(t),r=e?new Date(e):new Date;if(isNaN(n.getTime())||isNaN(r.getTime())||n>r)return null;let s=r.getFullYear()-n.getFullYear();const i=r.getMonth()-n.getMonth();return(i<0||i===0&&r.getDate()<n.getDate())&&s--,s}function va(t,{source:e,target:n}){return t.meta?((!t.meta.creator||t.meta.creator===e.getId())&&(t.meta.creator=n.getId()),(!t.meta.owner||t.meta.owner===e.getId())&&(t.meta.owner=n.getId())):((!t.creator||t.creator===e.getId())&&(t.creator=n.getId()),(!t.owner||t.owner===e.getId())&&(t.owner=n.getId())),t}function vs(t){return t!=null&&typeof t!="boolean"&&String(t).trim()!==""&&!isNaN(Number(t))}function me(t,e){let n=t,r=e;if(typeof t=="string"&&(n=n.split(".")),!Array.isArray(t)&&typeof t=="object"){const{keys:i,obj:o}=t;n=i,r=o}if(n.length===0)return r;const s=n.shift();return r&&Object.prototype.hasOwnProperty.call(r,s)?me(n,r[s]):r&&s?n.length>0?me(n,r[s]):r[s]:r}function xf(t){const e={};for(const[n,r]of Object.entries(t)){const s=n.match(/^(.*?)\|(boolean|date|html|number|string)$/);let i=n,o=null;s&&(i=s[1],o=s[2]);const a=i.split(".");let l=e;for(let c=0;c<a.length-1;c++){const f=a[c];(!l[f]||typeof l[f]!="object")&&(l[f]={}),l=l[f]}const u=a[a.length-1];if(o==="boolean")r===1||r==="1"||r===!0||r==="true"||r==="TRUE"?l[u]=!0:r===0||r==="0"||r===!1||r==="false"||r==="FALSE"?l[u]=!1:l[u]=!!r;else if(o==="number")l[u]=Number(r)||0;else if(o==="date")l[u]=new Date(r);else if(o==="html")if(r&&typeof r=="string"){let c=[];r.includes(`
9
+
10
+ `)||r.includes(`\r
11
+ \r
12
+ `)?c=r.split(/\r?\n\s*\r?\n/).filter(f=>f.trim()!==""):c=r.split(/\r?\n/).filter(f=>f.trim()!==""),c.length>0?l[u]=c.map(f=>`<div>${f.trim()}</div>`).join(""):l[u]=r?`<div>${r}</div>`:""}else l[u]=r?`<div>${r.toString()}</div>`:"";else if(r==null)l[u]="";else if(typeof r=="number")l[u]=r;else if(typeof r=="string"&&r.trim()!==""){const c=r.trim();/^-?\d+$/.test(c)?l[u]=Number.parseInt(c,10):/^-?\d+\.\d+$/.test(c)?l[u]=Number.parseFloat(c):l[u]=r}else l[u]=r?.toString()||""}return e}function If(t,e){return e.split(".").reduce((r,s)=>{if(s.endsWith("[]")){const i=s.slice(0,-2);return Array.isArray(r[i])?r[i]:[]}if(s.includes("[")&&s.includes("]")){const i=s.match(/(\w+)\[(\d+)\]/);if(i){const o=i[1],a=i[2];return r&&r[o]&&r[o][a]}}else return r&&Array.isArray(r)?r.map(i=>i[s]):r&&r[s]},t)}function Df(t,e){return e.split(".").reduce((n,r)=>n&&n[r]!==void 0?n[r]:void 0,t)}function $f(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&!(t instanceof Date)&&!(t instanceof RegExp)&&Object.prototype.toString.call(t)==="[object Object]"}function bs(t,...e){if(!e.length)return t;const n=e.shift();if(Qr(t)&&Qr(n))for(const r in n)Qr(n[r])?(t[r]||(t[r]={}),bs(t[r],n[r])):t[r]=n[r];return bs(t,...e)}function Lf(t,e,n){const r=e.split(".");let s=t;for(let a=0;a<r.length-1;a++){const l=r[a];let u,c;const f=l.match(/^(\w+)\[(\d+)\]$/);if(f){for(u=f[1],c=Number.parseInt(f[2],10),(!s[u]||!Array.isArray(s[u]))&&(s[u]=[]);s[u].length<=c;)s[u].push(void 0);s[u][c]==null&&(s[u][c]={}),s=s[u][c]}else s[l]||(s[l]={}),s=s[l]}const i=r[r.length-1],o=i.match(/^(\w+)\[(\d+)\]$/);if(o){const a=o[1],l=Number.parseInt(o[2],10);for((!s[a]||!Array.isArray(s[a]))&&(s[a]=[]);s[a].length<=l;)s[a].push(void 0);s[a][l]=n}else s[i]=n}function Qr(t){return t&&typeof t=="object"&&!Array.isArray(t)}const at={expandDotNotation:xf,get:If,getNestedValue:Df,isPlainObject:$f,merge:bs,set:Lf};class je{constructor(e={}){e=e||{},this.key=e.key||null,this.value=typeof e.value<"u"?e.value:""}static init(e={}){if(e instanceof this)return e;const n=new this(e);return n.isValid?n:null}static initFromArray(e=[]){return Array.isArray(e)?e.map(n=>this.init(n)):[]}static initOnlyValidFromArray(e=[]){return this.initFromArray(e).filter(n=>n)}static get _classname(){return"KeyValueObject"}static get _superclass(){return"KeyValueObject"}static addItem(e,n,r){e.push(this.init({key:n,value:r}))}static addRecord(e=[],n,r){return this.hasKeyValue(e,n,r)||e.push(this.init({key:n,value:r})),e}static appendRecord(e=[],n,r){return e.map(s=>(this.sameKey(s,n)&&(s.value=[...s.value,...r]),s))}static appendValueArray(e=[],n,r){return e.map(s=>(this.sameKey(s,n)&&(s.value=[...s.value,...r]),s))}static foundByKey(e=[],n){return e.find(s=>this.sameKey(s,n))||null}static foundValueByKey(e=[],n){const r=this.foundByKey(e,n);return r?r.value:null}static fromObject(e={}){return Object.keys(e).reduce((n,r)=>(n.push(this.init({key:r,value:e[r]})),n),[])}static getValueByKey(e=[],n){return this.foundValueByKey(e,n)}static getMetadataValueByKeyAsArray(e=[],n){const r=this.getValueByKey(e,n);return r?at.isPlainObject(r)?Object.keys(r).reduce((s,i)=>(s.push({key:i,value:r[i]}),s),[]):r:[]}static getValueByKeyFromArray(e=[],n){if(e.length===0)return null;const s=e.shift().find(i=>this.sameKey(i,n));return s&&s.value?s.value:this.getValueByKeyFromArray(e,n)}static getValuesByKey(e=[],n){return e.reduce((r,s)=>(this.sameKey(s,n)&&r.push(s.value),r),[])}static hasKeyValue(e=[],n,r){return typeof r>"u"?e.filter(s=>this.sameKey(s,n)).length>0:e.filter(s=>this.sameKey(s,n)&&Hi(s.value,r)).length>0}static insertOrUpdateRecord(e=[],n,r){let s=[...e];return this.hasKeyValue(e,n)?s=this.updateRecord(e,n,r):s.push(this.init({key:n,value:r})),s}static keys(e=[]){return Array.isArray(e)?e.reduce((n,r)=>(n.push(r.key),n),[]):[]}static mapToKeyValue(e=[],n="key",r="value"){return Array.isArray(e)?e.reduce((s,i)=>{if(i&&typeof i=="object"){const o=at.get(i,n),a=at.get(i,r);o!=null&&s.push(this.init({key:o,value:a!==void 0?a:""}))}return s},[]):[]}static merge(e,n){return(n||[]).map(r=>{const s=e.find(i=>i.key===r.key);s?s.value=Nf(r.value,s.value):e.push(r)}),e}static removeByKey(e,n){return e.reduce((r,s)=>(this.sameKey(s,n)||r.push(s),r),[])}static removeByKeys(e,n){return e.reduce((r,s)=>(n.includes(s.key)||r.push(s),r),[])}static sameKey(e,n){return e?Hi(e.key,n):!1}static toObject(e=[]){return Array.isArray(e)?e.reduce((n,r)=>(n[r.key]=r.value,n),{}):{}}static toString(e=[],n="; "){return Array.isArray(e)?e.reduce((r,s)=>(r.push(`${s.key}: ${s.value}`),r),[]).join(n):""}static updateRecord(e=[],n,r){return e.map(s=>this.sameKey(s,n)?{...s,value:r}:s)}static updateOrInsertRecord(e=[],n,r){return this.insertOrUpdateRecord(e,n,r)}static updateRecordsFromArray(e=[],n=[]){if(Array.isArray(e)&&Array.isArray(n)){const r=this.toObject(e),s=this.toObject(n);return this.fromObject({...r,...s})}return[]}static values(e=[]){return Array.isArray(e)?e.reduce((n,r)=>(n.push(r.value),n),[]):[]}get isValid(){return!!this.key}get toObject(){const e={};return this.isValid&&(e[this.key]=this.value),e}}function Nf(t,e){return t===void 0?e:Array.isArray(t)&&Array.isArray(e)?[...new Set([...t,...e])]:typeof t=="object"&&typeof e=="object"&&!Array.isArray(t)&&!Array.isArray(e)?{...t,...e}:e}function Hi(t,e){return t===e}function et(t,e,n=Pf,r=je){if(!t)return!0;if(typeof n!="function"||r&&typeof r!="function")return!1;const{key:s="",value:i,placeholder:o,keyValuePath:a=""}=t,[l]=Object.keys(i);if(!s&&typeof o>"u")switch(l){case"$and":return i.$and.reduce((c,f)=>c&&et(f,e,n,r),!0);case"$or":return i.$or.reduce((c,f)=>c||et(f,e,n,r),!1);default:return!1}let u=typeof o>"u"?n(s,e):o;if(a){const c=r.toObject(u);u=n(a,c)}switch(l){case"$after":{if(vs(i?.$after)){const c=Number(String(i?.$after));return Date.now()>c}return!1}case"$before":{if(vs(i?.$before)){const c=Number(String(i?.$before));return Date.now()<c}return!1}case"$empty":return u==null===i.$empty;case"$eq":return u===i.$eq;case"$gt":return u>i.$gt;case"$gte":return u>=i.$gte;case"$hasOverlap":return Mf(u,i.$hasOverlap);case"$lt":return u<i.$lt;case"$lte":return u<=i.$lte;case"$in":return Array.isArray(u)?!!u.find(c=>i.$in.includes(c)):typeof u!="object"?!!i.$in.includes(u):!1;case"$includes":return Array.isArray(u)?u.includes(i.$includes):!1;case"$intervalTimeGt":{const c=new Date().getTime(),f=new Date(u).getTime();return c-f>i.$intervalTimeGt}case"$intervalTimeLt":{const c=new Date().getTime(),f=new Date(u).getTime();return c-f<i.$intervalTimeLt}case"$inValue":{const c=n(i.$inValue,e),f=Array.isArray(c)?c:[];return Array.isArray(u)?!!u.find(p=>f.includes(p)):typeof u=="string"?!!f.includes(u):!1}case"$isToday":{const c=new Date,f=c.setHours(0,0,0,0),p=c.setHours(23,59,59,59),g=new Date(u).getTime();return(f<=g&&p>=g)===i.$isToday}case"$ne":return u!==i.$ne;case"$notIn":return Array.isArray(u)?!u.find(c=>i.$notIn.includes(c)):typeof u!="object"?!i.$notIn.includes(u):!1;case"$notInValue":{const c=n(i.$notInValue,e),f=Array.isArray(c)?c:[];return Array.isArray(u)?!u.find(p=>f.includes(p)):typeof u!="object"?!f.includes(u):!1}case"$range":{const[c,f]=i.$range;return typeof c=="number"&&typeof f=="number"&&u>=c&&u<=f}default:return!1}}function Pf(t,e){return me(t.split("."),e)}function Mf(t,e){let n=t,r=e;typeof n=="string"&&(n=n.split(",")),typeof r=="string"&&(r=r.split(","));const s=new Set(n);return r.find(i=>s.has(i))}function ba(t,e){const n=t&&t instanceof Date?t:new Date(t),r=["日","一","二","三","四","五","六"],s=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],i=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],o=e||"YYYY/MM/DD hh:mm",a=n.getDay(),l=i[a],u=r[a],c=s[a],f=n.getFullYear(),p=n.getMonth()+1,g=n.getDate(),O=n.getHours(),E=n.getMinutes(),D=n.getSeconds();return o.replace("YYYY",f).replace("MM",Xe(p)).replace("MM",Xe(p)).replace("DD",Xe(g)).replace("hh",Xe(O)).replace("mm",Xe(E)).replace("ss",Xe(D)).replace("M",p).replace("D",g).replace("h",O).replace("m",E).replace("s",D).replace("EEEE",Xe(c)).replace("EEE",Xe(u)).replace("EE",Xe(l)).replace("E",Xe(a))}function Xe(t){return t<10?`0${t}`:t}const ce={argumentEmptyException:"Argument is empty",argumentFormatException:"Incorrect number or format of argument",invalidFuntionException:"Function Name is invalid",invalidRegExpException:"Invalid regular expression",isNotAFunctionException:"Is not a function",notExistException:"Key does not exist",resultEmptyException:"Result is empty",resultMoreThanOneException:"More than one result"};class ie extends Error{constructor(e){super(e),this.message=e}}const kf="_EMPTY",Bi=["concatIf","divide","eq","exec","filterAll","filterOne","formatDate","get","gt","gte","isEmpty","isNotEmpty","join","lt","lte","map","neq","removeHtml","replaceChar","sum","toLowerCase","toUpperCase"],qi="_HIDE",Ff="_NOT_EMPTY",Ce="_SELF",jf=["<%=","%>"],Uf=["{{","}}"];function wa(t,e){if(typeof t!="string")throw new ie(`_concatIf: ${ce.argumentFormatException}: the data must be string :${t.join(", ")}`);if(e.length!==3)throw new ie(`_concatIf: ${ce.argumentFormatException}: ${e.join(", ")}`);if(t===null||typeof t>"u")return null;const[n,r,s]=e;if([kf,Ff].includes(n)||r.length!==2)throw new ie(`concatIf: ${ce.argumentEmptyException}: ${n}, ${r}`);return t===""&&s.includes(qi)?"":t!==""&&(t!==null||t!==void 0)&&s.includes(qi)?`${r[0]}${t}${r[r.length-1]}`:s}function Ca(t,e){try{return Number.isNaN(t)?t:t/e}catch(n){throw n}}function Ea(t,e){if(e.length!==3)throw new ie(`eq: ${ce.argumentFormatException}: ${e.join(", ")}`);if(t===null||typeof t>"u")return null;e.includes(Ce)&&(e=e.map(r=>r===Ce?t:r));const n=e[0];return t===n?e[1]:e[2]}function Vf(t,e){try{const[n,...r]=e;return t[n](...r)}catch(n){throw n}}function Gs(t,e){try{if(!Array.isArray(e)||e.length===0)throw new ie(ce.argumentEmptyException);return!Array.isArray(t)||t.length===0?[]:typeof t[0]=="object"?Aa(t,e):typeof t[0]=="string"||typeof t[0]=="number"?Kf(t,e):[]}catch(n){throw n}}function Kf(t,e){const n=e.flat();return t.filter(r=>n.some(s=>Sa(s,r)))}function Aa(t,e){if(e.length===1){const i=e[0];return t.filter(o=>i.includes(".")?me(i.split("."),o):Object.prototype.hasOwnProperty.call(o,i))}if(e.length>2){let i=t;for(let o=0;o<e.length;o+=2){const a=[e[o],e[o+1]];i=Aa(i,a)}return i}const[n,...r]=e,s=r.flat();return t.filter(i=>{const o=n.includes(".")?me(n.split("."),i):i[n];return s.some(a=>Sa(a,o))})}function Sa(t,e){if(t===void 0&&e===void 0||t===null&&e===null)return!0;if(typeof t=="boolean")return t===e;if(t===""||t==="*")return e==null?!1:typeof e=="string"?t===""?e==="":e!=="":Array.isArray(e)?t===""?e.length===0:e.length!==0:t!=="";if(Hf(t))return t===e;if(t.startsWith("[")&&t.endsWith("]"))return t==="[]"?Array.isArray(e)&&e.length===0:t==="[*]"?Array.isArray(e)&&e.length!==0:!1;const{operator:n,value:r}=Bf(t);if(!n||r!==0&&!r)return!1;switch(n){case">":return e>r;case"<":return e<r;case"!=":return e!==r;case">=":return e>=r;case"<=":return e<=r;default:return!1}}function Hf(t){return typeof t=="string"?!(t.startsWith("[")&&t.endsWith("]")||/!=|>=|<=|>|</.test(t)):!Number.isNaN(t)}function Bf(t){const n=["!=",">=","<=",">","<"].find(i=>t.startsWith(i));if(!n)return{operator:null,value:null};const r=t.slice(n.length);if(/^[a-z]*$/i.test(r)&&n!=="!=")return{operator:null,value:null};const s=!Number.isNaN(Number.parseFloat(r))&&!Number.isNaN(r)?Number(r):r;return{operator:n,value:s}}function qf(t,e){try{const n=Gs(t,e);if(n.length===1)return n[0];if(n.length===0)return null;throw new ie(ce.resultMoreThanOneException)}catch(n){throw n}}function Oa(t,e){if(e.length===0)throw new ie(`_formateDate: ${ce.argumentFormatException}: format parts must be not empty array`);if(t==null)return null;const n=new Date(t),r={yyyy:String(n.getFullYear()),mm:String(n.getMonth()+1).padStart(2,"0"),dd:String(n.getDate()).padStart(2,"0")},s=["yyyy","mm","dd"];if(e.filter(o=>o.length>1&&!s.includes(o)).length>0)throw new ie(`_formateDate: ${ce.argumentFormatException}: the format type is not valid: ${e.join(", ")}`);return e.reduce((o,a)=>o+(r[a]||a),"")}function Dr(t,e,n=null){try{if(e===null||typeof e>"u"||e==="")throw new ie(ce.argumentEmptyException);if(t===null)return null;if(e.includes(".")){const r=e.split(".");if(r.length>1){const s=r.shift(),i=r.join(".");return typeof t[s]<"u"?Dr(t[s],i,n):Wi(e,n)}}return typeof t[e]<"u"?t[e]:Wi(e,n)}catch(r){throw r}}function Wi(t,e){return e!==null?e:null}function Ta(t,e){if(e.length!==3)throw new ie(`_gt: ${ce.argumentFormatException}: ${e.join(", ")}`);if(t===null||typeof t>"u")return null;e.includes(Ce)&&(e=e.map(r=>r===Ce?t:r));const n=e[0];return t>n?e[1]:e[2]}function Ra(t,e){if(e.length!==3)throw new ie(`_gte: ${ce.argumentFormatException}: ${e.join(", ")}`);if(t===null||typeof t>"u")return null;e.includes(Ce)&&(e=e.map(r=>r===Ce?t:r));const n=e[0];return t>=n?e[1]:e[2]}function xa(t,e){if(e.length!==2)throw new ie(`_isEmpty: ${ce.argumentFormatException}: ${e.join(", ")}`);return e.includes(Ce)&&(e=e.map(n=>n===Ce?t:n)),t!==null&&typeof t=="object"&&Object.keys(t).length===0||t===""||t===null||t===void 0||t.length===0?e[0]:e[1]}function Ia(t,e){if(e.length!==2)throw new ie(`_isNotEmpty: ${ce.argumentFormatException}: ${e.join(", ")}`);return e.includes(Ce)&&(e=e.map(n=>n===Ce?t:n)),t!==null&&typeof t=="object"&&Object.keys(t).length===0||Array.isArray(t)&&t.length===0||typeof t=="string"&&t===""||t==null?e[1]:e[0]}function Da(t,e){try{return t.length===0?"":t.length===1?Yi(t[0]):t.map(n=>Yi(n)).join(e)}catch(n){throw n}}function Yi(t){return JSON.stringify(t).replace(/"([^"]+)":/g,"$1: ").replace(/"([^"]+)"/g,"$1").replace(/,/g,", ")}function $a(t,e){if(e.length!==3)throw new ie(`_lt: ${ce.argumentFormatException}: ${e.join(", ")}`);if(t===null||typeof t>"u")return null;e.includes(Ce)&&(e=e.map(r=>r===Ce?t:r));const n=e[0];return t<n?e[1]:e[2]}function La(t,e){if(e.length!==3)throw new ie(`_lte: ${ce.argumentFormatException}: ${e.join(", ")}`);if(t===null||typeof t>"u")return null;e.includes(Ce)&&(e=e.map(r=>r===Ce?t:r));const n=e[0];return t<=n?e[1]:e[2]}function Na(t,e){try{if(e.length===0)throw new ie(ce.argumentEmptyException);return t===null||typeof t>"u"?null:t.reduce((r,s)=>{e.length===1&&Array.isArray(e[0])&&(e=e[0],r.hasFormat=!0);const i=e.map(o=>{if(o.includes(".")){const a=o.split("."),l=a[0];a.shift();const u=a.join(".");return Dr(s[l],u)}return typeof s[o]<"u"?s[o]:null});return r.hasFormat?r.content.push(i):r.content=r.content.concat(i),r},{content:[],hasFormat:!1}).content}catch(n){throw n}}function Pa(t,e){if(e.length!==3)throw new ie(`_neq: ${ce.argumentFormatException}: ${e.join(", ")}`);if(t===null||typeof t>"u")return null;e.includes(Ce)&&(e=e.map(r=>r===Ce?t:r));const n=e[0];return t!==n?e[1]:e[2]}function Ma(t,e){if(t==null)return null;if(!Array.isArray(e))throw new ie(`_removeHtml: ${ce.argumentFormatException}: args parts must be array`);return Wf(t,e[0])}function Wf(t,e=`
13
+ `){typeof e!="string"&&(e=`
14
+ `);let r=t.replace(/&nbsp;/g," ").replace(/\s+/g," ").replace(/<\/?(p|div|h[1-6]|ul|ol|li|pre|section|article|table|tr|td|th)(\s[^>]*)?>/gi,"~~~").replace(/<br\s*\/?>/gi,"~~~").replace(/<[^>]+>/g,"").replace(/~{3,}/g,e).trim();return e===""?r=r.replace(/\s+/g," "):(r=r.replace(new RegExp(`${Xr(e)}+`,"g"),e),r=r.replace(new RegExp(`^${Xr(e)}|${Xr(e)}$`,"g"),"")),r}function Xr(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ka(t,e){if(t==null)return null;if(!Array.isArray(e))throw new ie(`_replaceChar: ${ce.argumentFormatException}: args parts must be array`);return Yf(t,e[0],e[1])}function Yf(t,e,n){return!t||!e?t:t.replace(new RegExp(e,"g"),n)}function Fa(t,e){return Number.isNaN(t)||t===null||typeof t>"u"||t===""?t:e.reduce((n,r)=>n+r,t)}function ja(t,e){if(e!==void 0)throw new ie(`_toLowerCase: ${ce.argumentFormatException}: ${e.join(", ")}`);return t===null||typeof t>"u"||typeof t!="string"?null:String(t).toLowerCase()}function Ua(t,e){if(typeof t!="string")throw new ie(`_toUpperCase: ${ce.argumentFormatException}: the data must be string: ${t}`);if(e!==void 0)throw new ie(`_toUpperCase: ${ce.argumentFormatException}: the argument must be empty: ${e.join(", ")}`);return t===null||typeof t>"u"||typeof t!="string"?null:String(t).toUpperCase()}class Va{constructor(e){this.data=e}static init(e){return new this(e)}static initFromArray(e=[]){return Array.isArray(e)?e.map(n=>this.init(n)):[]}static initOnlyValidFromArray(e=[]){return this.initFromArray(e).filter(n=>n)}static concatIf(e,n){return wa(e,n)}static divide(e,n){return Ca(e,n)}static eq(e,n){return Ea(e,n)}static filterAll(e,n){return Gs(e,n)}static formatDate(e,n){return Oa(e,n)}static get(e,n,r=null){return Dr(e,n,r)}static gt(e,n){return Ta(e,n)}static gte(e,n){return Ra(e,n)}static isEmpty(e,n){return xa(e,n)}static isNotEmpty(e,n){return Ia(e,n)}static join(e,n=""){return Da(e,n)}static lt(e,n){return $a(e,n)}static lte(e,n){return La(e,n)}static map(e,n=[]){return Na(e,n)}static neq(e,n){return Pa(e,n)}static removeHtml(e,n){return Ma(e,n)}static replaceChar(e,n){return ka(e,n)}static sum(e,n){return Fa(e,n)}static toLowerCase(e,n){return ja(e,n)}static toUpperCase(e,n){return Ua(e,n)}static parseFunction(e){return Gi(e,Bi)}static parseParams(e){return Ka(e)}pipe(e=""){this.delimiters=e.substring(0,2)==="{{"?Uf:jf;const n=new RegExp(`${this.delimiters[0]}\\s(.*?)\\s${this.delimiters[1]}`),r=e.match(n);if(r!==null)try{return Gi(r[1],Bi).reduce((i,o)=>Qf(i,o.name,o.args),this.data)}catch(s){throw new ie(`TemplateCompiler engine error: ${s.message}`)}throw new ie(`TemplateCompiler engine error: ${ce.invalidRegExpException}`)}}function Gi(t,e){const n=/(\w+)\(((?:[^()]|\((?:[^()]|\([^()]*\))*\))*)\)/;let r;if(t.includes("|")){r=[];let s="",i=0,o=null;for(let a=0;a<t.length;a++){const l=t[a];if((l==='"'||l==="'")&&(a===0||t[a-1]!=="\\")){o===l?o=null:o===null&&(o=l),s+=l;continue}o===null&&(l==="("?i++:l===")"&&i--),l==="|"&&i===0&&o===null?(r.push(s),s=""):s+=l}s&&r.push(s)}else r=[t];return r.reduce((s,i)=>{const o=i.match(n);if(o!==null){const a=o[1],l=o[2],u=Ka(l);if(e.includes(a))s.push({name:a,args:u});else throw new ie(`${a} is not a valid function`)}return s},[])}function Ka(t){const e=t.trim();return e?e.includes(",")?Gf(e).map(r=>ws(r.trim())):[ws(e)]:[]}function Gf(t){const e=[];let n="",r=0,s=0,i=null;for(let o=0;o<t.length;o++){const a=t[o];if((a==='"'||a==="'")&&(o===0||t[o-1]!=="\\")){i===a?i=null:i===null&&(i=a),n+=a;continue}if(i!==null){n+=a;continue}a==="["?r++:a==="]"?r--:a==="("?s++:a===")"&&s--,a===","&&i===null&&r===0&&s===0?(e.push(n),n=""):n+=a}return n&&e.push(n),e}function ws(t){if(typeof t!="string")return t;const e=t.trim();if(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))return e.substring(1,e.length-1);const n=zf(e);return typeof n!="string"?n:e.startsWith("[")&&e.endsWith("]")?Jf(e):t}function Jf(t){const e=t.substring(1,t.length-1).trim();if(!e)return[];const n=[];let r="",s=null;for(let i=0;i<e.length;i++){const o=e[i];if((o==='"'||o==="'")&&(i===0||e[i-1]!=="\\")){s===o?s=null:s===null&&(s=o),r+=o;continue}o===","&&s===null?(r.trim()&&n.push(r.trim()),r=""):r+=o}return r.trim()&&n.push(r.trim()),n.map(i=>ws(i))}function zf(t){if(t.startsWith('"')&&t.endsWith('"')||t.startsWith("'")&&t.endsWith("'"))return t.substring(1,t.length-1);if(t==="true")return!0;if(t==="false")return!1;if(t!=="undefined")return t==="null"?null:!Number.isNaN(t)&&!Number.isNaN(Number.parseFloat(t))?Number(t):t}function Qf(t,e,n){try{let r;switch(e){case"concatIf":return wa(t,n);case"divide":return Ca(t,n);case"eq":return Ea(t,n);case"exec":return Vf(t,n);case"filterAll":return Gs(t,n);case"filterOne":return qf(t,n);case"formatDate":return Oa(t,n);case"get":if(n.length>2)throw new ie(ce.argumentFormatException);return n.length===2&&(r=n[n.length-1]),Dr(t,n[0],r);case"gt":return Ta(t,n);case"gte":return Ra(t,n);case"isEmpty":return xa(t,n);case"isNotEmpty":return Ia(t,n);case"join":return Da(t,n[0]);case"lt":return $a(t,n);case"lte":return La(t,n);case"map":return Na(t,n);case"neq":return Pa(t,n);case"removeHtml":return Ma(t,n);case"replaceChar":return ka(t,n);case"sum":return Fa(t,n);case"toLowerCase":return ja(t);case"toUpperCase":return Ua(t);default:throw new Error(`${e} is not a valid function`)}}catch(r){throw r}}function Cs(t,e){return t.reduce((n,r)=>{const{type:s,value:i="",restriction:o,template:a,format:l,showMinutes:u}=r;switch(s){case"array":{if(et(o,e,me)){const c=me(i.split("."),e)||[];n+=c.reduce((f,p)=>f+=Cs(a,p),"")}break}case"date":{if(et(o,e,me)){const c=me(i.split("."),e)||"";n+=ba(c,l).toString()}break}case"ellipsis":{if(et(o,e,me)){const{maxLength:c}=r,f=me(i.split("."),e)||"";f.length<=c?n+=f.toString():n+=`${f.substr(0,c)}...`}break}case"group":{if(et(o,e,me))return Cs(i,e);break}case"label":{et(o,e,me)&&(n+=i.toString());break}case"templateCompiler":{if(et(o,e,me)){const c=new Va({data:e});n+=c.pipe(i)}break}case"value":{if(et(o,e,me)){const c=me(i.split("."),e)||"";n+=c.toString()}break}}return n},"")}function Xf(t,e=/\$\{(.+?)\}/g,n,r){if(!t)return"";const s=typeof r=="function"?r:me,i=new RegExp(e,"g");return t.replace(i,(o,a)=>{const l=s({keys:a.split("."),obj:n});return l==null?"":typeof l=="object"?JSON.stringify(l):l})}function Zf(t,e=0){try{if(typeof t=="number")return t.toString().length===10&&(t=t*1e3),new Date(t);if(typeof t=="string"&&t.length===8){const n=Number.parseInt(t.slice(0,4),10),r=Number.parseInt(t.slice(4,6),10)-1,s=Number.parseInt(t.slice(6,8),10);return new Date(n,r,s)}return new Date(t)}catch{throw new Error("input does not meet the requirements")}}class Hn{constructor({date:e,isUTC:n,is24Hour:r,timezoneOffset:s=0}={}){this.date=e,this.isUTC=n,this.is24Hour=r,this.timezoneOffset=s}getDateComponent(e){if(this.timezoneOffset!==0){const n=this.timezoneOffset*60*1e3;return new Date(this.date.getTime()+n)[`getUTC${e}`]()}else return this.isUTC?this.date[`getUTC${e}`]():this.date[`get${e}`]()}process(e){return e}}function Jt(t,e="0"){if(typeof t!="number")throw new TypeError("Parameter must be of number");return t<10?`${e}${t}`:t}class ed extends Hn{process(e){const n=this.getDateComponent("Date");return e=e.replace("DD",Jt(n)),e}}const td=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];class nd extends Hn{process(e){const n=this.getDateComponent("Month");return e=e.replace("MMM",td[n]),e=e.replace("MM",Jt(n+1)),e}}class rd extends Hn{process(e){const n=this.getDateComponent("FullYear");return e=e.replace("yyyy",n),e=e.replace("YYYY",n),e=e.replace("yy",n.toString().slice(-2)),e=e.replace("YY",n.toString().slice(-2)),e}}class sd extends Hn{process(e){let n=this.getDateComponent("Hours");const r=!this.is24Hour;if(r&&n>12&&(n-=12),r&&n===0&&(n=12),e=e.replace("HH",Jt(this.getDateComponent("Hours"))),e=e.replace("hh",Jt(n)),this.is24Hour)e=e.replace(/\s*\bA\b\s*/g," "),e=e.replace(/\s*\ba\b\s*/g," "),e=e.replace(/\s+/g," ").trim();else{if(e.includes("A")){const s=this.getDateComponent("Hours")>=12?"PM":"AM";e=e.replace(/\bA\b/g,s)}if(e.includes("a")){const s=this.getDateComponent("Hours")>=12?"pm":"am";e=e.replace(/\ba\b/g,s)}}return e=e.replace("mm",Jt(this.getDateComponent("Minutes"))),e=e.replace("ss",Jt(this.getDateComponent("Seconds"))),e}}class id extends Hn{process(e){if(e.includes("Z"))if(this.isUTC)e=e.replace("Z","+0000");else{const n=this.date.getTimezoneOffset(),r=n>0?"-":"+",s=Math.abs(n),i=Math.floor(s/60),o=s%60,a=`${r}${i.toString().padStart(2,"0")}${o.toString().padStart(2,"0")}`;e=e.replace("Z",a)}if(e.includes("ddd")){const n=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],r=this.getDateComponent("Day");e=e.replace("ddd",n[r])}if(e.includes("dd")){const n=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],r=this.getDateComponent("Day");e=e.replace("dd",n[r])}return e}}function od({date:t,format:e,isUTC:n,is24Hour:r,timezoneOffset:s=0}){return[id,ed,nd,rd,sd].reduce((i,o)=>new o({date:t,isUTC:n,is24Hour:r,timezoneOffset:s}).process(i),e)}function ad(t,e){const n=e||"YYYY/MM/DD hh:mm",r=n.includes("HH");let s=null;if(n.includes("Z"))s=0;else if(n.includes("+")){const o=n.match(/[+-]\d{2}:?\d{2}/);if(o){const a=o[0],l=a[0]==="+"?1:-1,u=parseInt(a.slice(1,3),10),c=a.includes(":")?parseInt(a.slice(4,6),10):parseInt(a.slice(3,5),10);s=l*(u*60+c)}}const i=Zf(t,s===null?0:s);return od({date:i,format:n,isUTC:s!==null,is24Hour:r,timezoneOffset:s===null?0:s})}function ld(t,e={}){const{preserveBasicWhitespace:n=!0,removeNewlines:r=!1}=e;if(typeof t!="string")return{hasControlChars:!1,matches:[],inputType:typeof t,message:"Input is not a string"};const s=[];let i;return n&&!r?i=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x9F\u200B-\u200D\uFEFF\u202A-\u202E]/g:i=/[\x00-\x1F\x7F-\x9F\u200B-\u200D\uFEFF\u202A-\u202E]/g,t.replace(i,(o,a)=>(s.push({character:o,code:o.charCodeAt(0),hex:"0x"+o.charCodeAt(0).toString(16).toUpperCase().padStart(4,"0"),position:a,context:cd(t,a,10)}),"")),{hasControlChars:s.length>0,matches:s,totalFound:s.length,inputPreview:t.length>50?t.substring(0,50)+"...":t,inputLength:t.length,optionsUsed:{preserveBasicWhitespace:n},regexPattern:i.toString()}}function cd(t,e,n=10){const r=Math.max(0,e-n),s=Math.min(t.length,e+n+1);let i=t.substring(r,s);return i=i.replace(/[\x00-\x1F\x7F-\x9F]/g,o=>"\\u"+o.charCodeAt(0).toString(16).toUpperCase().padStart(4,"0")),i}function ud(t){console.log("=== Control Character Detection Report ==="),console.log(`Input: "${t.inputPreview}" (${t.inputLength} chars)`),console.log(`Options: preserveBasicWhitespace = ${t.optionsUsed.preserveBasicWhitespace}`),console.log(`Regex pattern: ${t.regexPattern}`),console.log(`Control characters found: ${t.totalFound}`),t.hasControlChars?(console.log(`
15
+ 📋 Matches found:`),t.matches.forEach((e,n)=>{console.log(`
16
+ ${n+1}. Character: ${JSON.stringify(e.character)}`),console.log(` Code: ${e.code} (${e.hex})`),console.log(` Position: ${e.position}`),console.log(` Context: "...${e.context}..."`)})):console.log("✅ No control characters detected in Phase 1 range"),console.log("=== End Report ===")}function fd(t,e){t=t||{},e=e||{};const{firstName:n,middleName:r,noFirstName:s,prefix:i,title:o,upperCaseLastName:a=!0}=e;e.hasAsianCharacters=!1;let l=[];if((i||o)&&t.prefix){const c=Zr(e);l=c(l,t.prefix),l=c(l,t.title)}if(n!==!1&&!s){const c=Zr(e);l=c(l,t.firstName),l=c(l,t.givenName)}r===!0&&t.middleName&&(e.hasAsianCharacters=e.hasAsianCharacters||Ha(t.middleName.toString()),l.push(t.middleName.toString()));const u=Zr(e,a);return l=u(l,t.lastName),l=u(l,t.familyName),l=u(l,t.surname),e.hasAsianCharacters?l.reverse().join(""):l.join(" ")}function Zr(t={},e=!1){let n=!1;return(r,s)=>{if(!n&&s){n=!0,t.hasAsianCharacters=t.hasAsianCharacters||Ha(s.toString());const i=e?s.toString().toUpperCase():s.toString();r.push(i)}return r}}function Ha(t){return/[\u3400-\u9FBF]/.test(t)}function dd({dataUrl:t="",filename:e=""}={}){const n=document.createElement("a");n.download=e,n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}function hd(t){return String(t).replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function lt(t,e){if(e instanceof t)return e;try{const n=new t(e);return n.isValid!==!1?n:null}catch(n){return console.log(`init failed for class: ${t._classname||"no _classname"}`,n),null}}function Ft(t,e){return Array.isArray(e)?e.map(n=>lt(t,n)):[]}function tn(t,e){return Ft(t,e).filter(n=>n)}const pd={ORPHAN_DELETED:"orphanDeleted",EXISTED:"existed",FAILED:"failed",INSERTED:"inserted",SKIPPED:"skipped",UPDATED:"updated"},z={IGNORE:"IGNORE",DUPLICATED:"DUPLICATED",REQUIRED_ERROR:"REQUIRED_ERROR",TRANSFORM_ERROR:"TRANSFORM_ERROR",CONVERT_ERROR:"CONVERT_ERROR",ORPHAN_DELETE_ERROR:"ORPHAN_DELETE_ERROR",INSERT_ERROR:"INSERT_ERROR",UPDATE_ERROR:"UPDATE_ERROR",SKIPPED:"SKIPPED",INSERTED:"INSERTED",UPDATED:"UPDATED",ORPHAN_DELETED:"ORPHAN_DELETED"};class Sn{constructor(e){this.data=e.data||{},this.logs=e.logs||[],this.rawData=e.rawData||{},this.rowIndex=e.rowIndex||0,this.status=e.status||{orphanDeleted:null,existed:null,failed:null,inserted:null,updated:null},this.transformedData=e.transformedData||{}}static init(e){return lt(this,e)}static initFromArray(e=[]){return Ft(this,e)}static initOnlyValidFromArray(e=[]){return tn(this,e)}get errorLogs(){const e=[z.IGNORE,z.SKIPPED,z.DUPLICATED];return this.logs.filter(n=>!e.includes(n.type))}get ignoreLog(){return this.logs.find(e=>e.type===z.IGNORE)}addLog(e){return this.logs.push({...e,rowIndex:this.rowIndex}),this}addError(e){return this.addLog(e).setFailed()}addOrphanDeleteError(e){return this.addError({column:"",message:e||"Delete failed.",type:z.ORPHAN_DELETE_ERROR}),this}addInsertError(e){return this.addError({column:"",message:e||"Insert failed.",type:z.INSERT_ERROR}),this}addUpdateError(e){return this.addError({column:"",message:e||"Update failed.",type:z.UPDATE_ERROR}),this}addDuplicatedLog(e){return this.addLog({column:"",message:e||"Duplicated.",type:z.DUPLICATED})}addSkippedLog(e){return this.addLog({column:"",message:e||"Skipped.",type:z.SKIPPED}).setSkipped()}addIgnoreLog(e){return this.logs=this.logs.filter(n=>n.type!==z.IGNORE),this.addLog({column:"",message:e||"Ignored.",type:z.IGNORE})}addInsertedLog(e){return this.addLog({column:"",message:e||"Inserted.",type:z.INSERTED}).setInserted()}addUpdatedLog(e){return this.addLog({column:"",message:e||"Updated.",type:z.UPDATED}).setUpdated()}addOrphanDeletedLog(e){return this.addLog({column:"",message:e||"Orphan deleted.",type:z.ORPHAN_DELETED}).setOrphanDeleted()}isCheckValid(){return this.errorLogs.length===0&&!this.ignoreLog&&!this.logs.some(e=>e.type===z.DUPLICATED)}isIgnored(){return!!this.ignoreLog}isDuplicated(){return this.logs.some(e=>e.type===z.DUPLICATED)}hasErrors(){return this.errorLogs.length>0}setStatus(e){return this.status[pd[e]]=Date.now(),this}setExisted(){return this.setStatus("EXISTED"),this}setFailed(){return this.setStatus("FAILED"),this}setInserted(){return this.setStatus("INSERTED"),this}setSkipped(){return this.setStatus("SKIPPED"),this}setUpdated(){return this.setStatus("UPDATED"),this}setOrphanDeleted(){return this.setStatus("ORPHAN_DELETED"),this}setData(e){return this.data=e,this}setRawData(e){return this.rawData=e,this}setTransformedData(e){return this.transformedData=e,this}}class Ba{constructor(e){e=e||{},this.name=e.name||"",this.data=Sn.initOnlyValidFromArray(e.data||[]),this.orphanData=Sn.initOnlyValidFromArray(e.orphanData||[]),this.checkResultConfig=e.checkResultConfig?{...e.checkResultConfig}:{},this.checkResultConfig.hidden=this.checkResultConfig.hidden??!1,this.saveResultConfig=e.saveResultConfig?{...e.saveResultConfig}:{},this.saveResultConfig.hidden=this.saveResultConfig.hidden??!1,this.orphanBehavior=e.orphanBehavior??null,this.notExistBehavior=e.notExistBehavior,this.existBehavior=e.existBehavior}static init(e){return lt(this,e)}static initFromArray(e=[]){return Ft(this,e)}static initOnlyValidFromArray(e=[]){return tn(this,e)}add(e){return this.data.push(e),this}getExistedData(){return this.data.filter(e=>{var n;return e.isCheckValid()&&((n=e.status)==null?void 0:n.existed)})}getInvalidData(){return this.data.filter(e=>!e.isCheckValid())}getNotExistedData(){return this.data.filter(e=>{var n;return e.isCheckValid()&&!((n=e.status)!=null&&n.existed)})}getSkipData(){return this.data.filter(e=>e.isIgnored()||e.isDuplicated())}addOrphan(e){const n=new Sn({data:e,rowIndex:-1});return this.orphanData.push(n),this}getOrphanData(){return this.orphanData}}class qa{constructor(e){this.dataSets=[],this.dataSets=Ba.initOnlyValidFromArray(e?.dataSets||[])}static init(e){return lt(this,e)}static initFromArray(e=[]){return Ft(this,e)}static initOnlyValidFromArray(e=[]){return tn(this,e)}addDataSet(e){this.dataSets.push(e)}getDataSetByName(e){return this.dataSets.find(n=>n.name===e)}getAllSummary(){return{summary:this.getSummary()}}getSummary(){return this.dataSets.map(e=>({name:e.name,hidden:e.checkResultConfig.hidden,summary:{total:e.data.length,ignored:e.data.filter(n=>n.isIgnored()).length,duplicated:e.data.filter(n=>!n.isIgnored()&&n.isDuplicated()).length,invalid:e.data.filter(n=>!n.isIgnored()&&!n.isDuplicated()&&n.hasErrors()).length,valid:e.data.filter(n=>n.isCheckValid()).length}}))}getDuplicatedDetails(){return this.dataSets.map(e=>({name:e.name,hidden:e.checkResultConfig.hidden,logs:e.data.filter(n=>n.logs.some(r=>r.type===z.DUPLICATED)).reduce((n,r)=>[...n,...r.logs.filter(s=>s.type===z.DUPLICATED)],[])}))}getIgnoredDetails(){return this.dataSets.map(e=>({name:e.name,hidden:e.checkResultConfig.hidden,logs:e.data.filter(n=>n.ignoreLog).reduce((n,r)=>[...n,r.ignoreLog],[])}))}getInvalidDetails(){return this.dataSets.map(e=>({name:e.name,hidden:e.checkResultConfig.hidden,logs:e.data.filter(n=>n.errorLogs.length>0).reduce((n,r)=>[...n,...r.errorLogs],[])}))}getValidDetails(){return this.dataSets.reduce((e,n)=>(e[n.name]=n.data.filter(r=>r.isCheckValid()).reduce((r,s)=>[...r,s],[]),e),{})}getAllDetails(){return{details:this.getDetails()}}getDetails(){return{ignoredDetails:this.getIgnoredDetails(),invalidDetails:this.getInvalidDetails(),duplicatedDetails:this.getDuplicatedDetails()}}hasInvalidData(){return this.dataSets.some(e=>e.data.some(n=>n.errorLogs.length>0))}}class md{constructor(e){this.dataSets=[],e=e||{},this.dataSets=e.dataSets||[]}addDataSet(e){return this.dataSets.push(e),this}getAllDetails(){return{details:this.getDetails(),orphanDetails:this.getOrphanDetails()}}getDetails(){return{failed:this.getFailedDetails(),skipped:this.getSkippedDetails(),inserted:this.getInsertedDetails(),updated:this.getUpdatedDetails()}}getFailedDetails(){const e=[z.INSERT_ERROR,z.UPDATE_ERROR];return this.dataSets.map(n=>({name:n.name,hidden:n.saveResultConfig.hidden,logs:n.data.filter(r=>r.logs.some(s=>e.includes(s.type))).reduce((r,s)=>r.concat(s.logs.filter(i=>e.includes(i.type))),[])}))}getSkippedDetails(){const e=[z.SKIPPED,z.IGNORE,z.DUPLICATED];return this.dataSets.map(n=>({name:n.name,hidden:n.saveResultConfig.hidden,logs:n.data.reduce((r,s)=>{const i=s.logs.filter(o=>e.includes(o.type));return r.concat(i)},[])}))}getInsertedDetails(){return this.dataSets.map(e=>({name:e.name,hidden:e.saveResultConfig.hidden,logs:e.data.reduce((n,r)=>{const s=r.logs.filter(i=>i.type===z.INSERTED);return n.concat(s)},[])}))}getUpdatedDetails(){return this.dataSets.map(e=>({name:e.name,hidden:e.saveResultConfig.hidden,logs:e.data.reduce((n,r)=>{const s=r.logs.filter(i=>i.type===z.UPDATED);return n.concat(s)},[])}))}getOrphanDetails(){return{deleted:this.getOrphanDeletedDetails(),failed:this.getOrphanFailedDetails()}}getOrphanFailedDetails(){return this.dataSets.reduce((e,n)=>(n.orphanBehavior&&e.push({name:n.name,hidden:n.saveResultConfig.hidden,logs:n.orphanData.filter(r=>{var s;return(s=r.errorLogs)==null?void 0:s.some(i=>i.type===z.ORPHAN_DELETE_ERROR)}).reduce((r,s)=>r.concat(s.errorLogs),[])}),e),[])}getOrphanDeletedDetails(){return this.dataSets.reduce((e,n)=>(n.orphanBehavior&&e.push({name:n.name,hidden:n.saveResultConfig.hidden,logs:n.orphanData.filter(r=>r.status.orphanDeleted).reduce((r,s)=>r.concat(s.errorLogs),[])}),e),[])}getSaveDetails(){return this.dataSets.map(e=>{var n;const r=(n=e.saveResultConfig)==null?void 0:n.returnDetail,s={name:e.name,hidden:e.saveResultConfig.hidden,details:{failed:r?.failed?e.data.filter(i=>i.status.failed):null,inserted:r?.inserted?e.data.filter(i=>i.status.inserted):null,skipped:r?.skipped?e.data.filter(i=>i.status.skipped):null,updated:r?.updated?e.data.filter(i=>i.status.updated):null},orphanDetails:null};return e.orphanBehavior&&(s.orphanDetails={deleted:r?.orphanDeleted?e.orphanData.filter(i=>i.status.orphanDeleted):[],failed:e.orphanData.filter(i=>{var o;return(o=i.errorLogs)==null?void 0:o.some(a=>a.type===z.ORPHAN_DELETE_ERROR)})}),s})}getSaveSummary(){return this.dataSets.map(e=>{const n={name:e.name,hidden:e.saveResultConfig.hidden,summary:{total:e.data.length,failed:e.data.filter(r=>r.status.failed).length,inserted:e.data.filter(r=>r.status.inserted).length,skipped:e.data.filter(r=>r.status.skipped).length,updated:e.data.filter(r=>r.status.updated).length},orphanSummary:null};return e.orphanBehavior&&(n.orphanSummary={total:e.orphanData.length,deleted:e.orphanData.filter(r=>r.status.orphanDeleted).length,failed:e.orphanData.filter(r=>{var s;return(s=r.errorLogs)==null?void 0:s.some(i=>i.type===z.ORPHAN_DELETE_ERROR)}).length}),n})}getAllSummary(){return{summary:this.getSummary(),orphanSummary:this.getOrphanSummary()}}getSummary(){return this.dataSets.map(e=>({name:e.name,hidden:e.saveResultConfig.hidden,summary:{total:e.data.length,failed:e.data.filter(r=>r.status.failed).length,inserted:e.data.filter(r=>r.status.inserted).length,skipped:e.data.filter(r=>r.status.skipped).length,updated:e.data.filter(r=>r.status.updated).length}}))}getOrphanSummary(){return this.dataSets.reduce((e,n)=>(n.orphanBehavior&&e.push({name:n.name,hidden:n.saveResultConfig.hidden,summary:{total:n.orphanData.length,deleted:n.orphanData.filter(r=>r.status.orphanDeleted).length,failed:n.orphanData.filter(r=>{var s;return(s=r.errorLogs)==null?void 0:s.some(i=>i.type===z.ORPHAN_DELETE_ERROR)}).length}}),e),[])}}class gd{static async check(e){const n=new qa,{config:r,excelData:s,context:i}=e,o=i||{};typeof r.beforeCheck=="function"&&await r.beforeCheck({context:o,excelData:s,result:n});for(const a of s){const{headers:l,worksheetName:u,data:c}=a;if(!c)continue;const f=r.worksheets.find(D=>D.name===u),p=f?.dataSources||[],{headerRow:g=1,dataStartRow:O=2,rowIndexKey:E}=f||{};for(const D of p){if(!D.headerConfigs||!D.name)continue;const B=new Map,U=new Ba({name:D.name,data:[],checkResultConfig:D.checkResultConfig,saveResultConfig:D.saveResultConfig,orphanBehavior:D.orphanBehavior,notExistBehavior:D.notExistBehavior,existBehavior:D.existBehavior});for(let P=0;P<c.length;P++){const q=c[P],R=this.getRawDataFromHeaders(q,D.headerConfigs);let x=this.createExcelRow(R,yd(q,E));const K=Object.assign({dataSets:n.dataSets},o),j=[le=>this.checkRequired(le,D.headerConfigs,l),le=>this.checkDuplicated(le,D,B),le=>this.isIgnore(le,K,D.isIgnore),le=>this.transform(le,D.headerConfigs,l),le=>this.convert(le,K,D.converter)];for(const le of j)if(x=le(x),x.errorLogs.length>0||x.ignoreLog||x.isDuplicated())break;const se=new Sn(x);U.add(se)}n.addDataSet(U)}}return n}static createExcelRow(e,n){return new Sn({rawData:e,rowIndex:n,logs:[]})}static getRawDataFromHeaders(e,n=[]){const r={};for(const s of n)r[s.name]=e[s.name];return r}static isIgnore(e,n,r){if(!r)return e;const{ignore:s,reason:i}=r({rawData:e.rawData,rowIndex:e.rowIndex,ctx:n});return s&&e.addIgnoreLog(i||""),e}static checkRequired(e,n=[],r=[]){const s={...e.rawData};for(const i of n){const o=s[i.name];i.required&&(o==null||o==="")&&e.addError({column:Ji(r.indexOf(i.name)),message:`${i.name} is required.`,type:z.REQUIRED_ERROR})}return e}static checkDuplicated(e,n,r){const s=n.primaryKeys.map(i=>e.rawData[i]).join("-");return r.has(s)?e.addDuplicatedLog(`Duplicated with row ${r.get(s)||0}.`):r.set(s,e.rowIndex),e}static transform(e,n=[],r=[]){const s={...e.rawData},i={};for(const o of n)try{i[o.name]=typeof o.transform=="function"?o.transform(s[o.name]):s[o.name]}catch(a){e.addError({column:Ji(r.indexOf(o.name)),message:`Transform ${o.name} failed: ${a.message}`,type:z.TRANSFORM_ERROR})}return e.setTransformedData(i)}static convert(e,n,r){if(e.errorLogs.length>0)return e;if(!r)return e.setData(e.transformedData);try{const s=r({transformedData:e.transformedData,rowIndex:e.rowIndex,ctx:n});return e.setData(s)}catch(s){e.addError({column:"",message:`Convert failed: ${s.message}`,type:z.CONVERT_ERROR})}return e}static async save(e){const n=new md,{result:r,config:s,context:i}=e;if(!r||!s)return n;const o=i||{};typeof s.beforeSave=="function"&&await s.beforeSave({context:o,checkResult:r,result:n});for(const a of s.worksheets)for(const l of a.dataSources){const{checkExisted:u,handleData:c}=l;let f=r.getDataSetByName(l.name||"");if(!f)continue;const p=Object.assign({dataSets:r.dataSets},o);u&&typeof u=="function"&&(f=await u({dataSet:f,ctx:p})),l.orphanBehavior==="DELETE"&&l.checkOrphans&&typeof l.checkOrphans=="function"&&await l.checkOrphans({dataSet:f,ctx:p}),c&&typeof c=="function"?f=await c({dataSet:f,dataSource:l,ctx:p}):f.data.forEach(g=>{g.setStatus("FAILED")}),n.addDataSet(f)}return n}}function Ji(t){let e="",n=t;for(;n>=0;)e=String.fromCharCode(65+n%26)+e,n=Math.floor(n/26)-1;return e}function yd(t,e){return t[e||"__rowNum"]||0}function _d({responseHelper:t,handler:e,ignoreError:n=!1}){return async(r,s,i)=>{const o=typeof s=="function"&&!i,a=o?r:null,l=o?r.request:r,u=o?r.response:s,c=o?s:i;try{return await e({req:l,res:u}),o?await c():c()}catch(f){if(n)return o?await c():c();if(!t){if(o)throw f;return c(f)}const p=f.status||400,g=f.message||"An error occurred",O=t.standardizeResponse({err:f,message:g});o?(a.status=p,a.body=O):u.status(p).json(O)}}}function vd({responseHelper:t,service:e}){return async(n,r,s)=>{try{const{query:i}=n,o=await e.findAll({query:i});r.locals.findAllResult=o,await s()}catch(i){r.status(400).json(t.standardizeResponse({err:i,message:i.message||i}))}}}function bd({responseHelper:t,service:e}){return async(n,r,s)=>{try{const{params:i,query:o}=n,{id:a}=i,l=await e.findOne({query:{...o,id:a}});r.locals.findOneResult=l,await s()}catch(i){r.status(400).json(t.standardizeResponse({err:i,message:i.message||i}))}}}function wd(t,{query:e={}}={}){!e.__EXCLUDED_FIELDS||Array.isArray(e.__EXCLUDED_FIELDS)&&e.__EXCLUDED_FIELDS.length===0||(t.push({$set:{__originalEmail:"$_eventRegistration.email",__originalPhone:"$_eventRegistration.phone",__queryArr:{$ifNull:[e.__EXCLUDED_FIELDS||[],[]]},__isMyself:{$eq:["$_eventRegistration.loginSubjectCode",e.__LOGIN_SUBJECT_CODE]},__isGroupCoordinator:!!e.__ALLOW_COORDINATOR,__hasEventRegistration:{$ne:["$_eventRegistration",null]}}}),t.push({$set:{__shouldShowEmail:{$and:["$__hasEventRegistration",{$or:["$__isMyself","$__isGroupCoordinator",{$not:{$in:["email","$__queryArr"]}}]}]},__shouldShowPhone:{$and:["$__hasEventRegistration",{$or:["$__isMyself","$__isGroupCoordinator",{$not:{$in:["phone","$__queryArr"]}}]}]}}}),t.push({$set:{"_eventRegistration.email":{$cond:["$__shouldShowEmail","$__originalEmail","$$REMOVE"]},"_eventRegistration.phone":{$cond:["$__shouldShowPhone","$__originalPhone","$$REMOVE"]}}}),t.push({$unset:["__originalEmail","__originalPhone","__isMyself","__isGroupCoordinator","__queryArr","__hasEventRegistration","__shouldShowEmail","__shouldShowPhone"]}))}function Cd({responseHelper:t,service:e}){return async(n,r,s)=>{try{const{body:i}=n;let o;Array.isArray(i)?o=await e.saveAll({docs:i}):o=await e.saveOne({doc:i}),r.locals.postResult=o,await s()}catch(i){r.status(400).json(t.standardizeResponse({err:i,message:i.message||i}))}}}function Ed({responseHelper:t,service:e}){return async(n,r,s)=>{try{const{body:i,params:o}=n,{id:a}=o;if(a!==i.id)throw new Error("id in params and body must be same");const{data:l}=await e.findOne({query:{id:a}}),u=l[0];u.update(i);const c=await e.saveOne({doc:u});r.locals.updateOneResult=c,await s()}catch(i){r.status(400).json(t.standardizeResponse({err:i,message:i.message||i}))}}}const Ad={customHandler:_d,findAllResult:vd,findOneResult:bd,hideSensitiveFields:wd,postResult:Cd,updateOneResult:Ed};function Sd(t){const e=/[\w.%+-]+@[a-z0-9.-]+\.[a-z]{2,}/gi,n=new Set;return t?(t.forEach(r=>{if(!(!r||typeof r!="string"||!r.trim()))try{const i=r.replace(/[\u200B-\u200D\uFEFF\u202A-\u202E]/g,"").replace(/[<>]/g," ").replace(/\s+/g," ").trim().match(e);i&&i.forEach(o=>n.add(o.toLowerCase()))}catch(s){console.warn("Failed to process entry:",r,s)}}),Array.from(n).sort((r,s)=>r.localeCompare(s))):[]}async function Js(t,e,n){return new Promise((r,s)=>{const i=t[Symbol.iterator]();let o=0;const a=async l=>{const u=i.next();if(u.done){r(l);return}try{const[c,f]=await Promise.all([l,u.value]);a(e(c,f,o++))}catch(c){s(c)}};a(n)})}class $r{constructor(e){e=e||{},this.model=e.model,this._sharedOptions=e._sharedOptions,this._queryOptions=e._queryOptions,this._saveOptions=e._saveOptions,this._Class=e._constructor&&e._constructor._Class?e._constructor._Class:null}static init(e={}){return lt(this,e)}static get _classname(){return"Repo"}static get _superclass(){return"Repo"}get _classname(){return"Repo"}get _superclass(){return"Repo"}get isValid(){return this.model&&typeof this.model.deleteOne=="function"&&typeof this.model.findAll=="function"&&typeof this.model.saveOne=="function"}get queryOptions(){return{...this._sharedOptions,...this._queryOptions}}get saveOptions(){return{...this._sharedOptions,...this._saveOptions}}init(e){return this._Class&&typeof this._Class.init=="function"?this._Class.init(e):e}async bulkWriteDocs({operations:e,config:n,systemLog:r}){const s=hn({systemLog:r,label:"REPO_BULK_WRITE",message:`fn ${this._classname}.prototype.bulkWriteDocs`,input:[{operations:{...e},config:{...n},systemLog:{...r}}]}),i={...this._sharedOptions,...n};try{const o=await this.model.bulkWriteDocs(e,i);return s({level:"info",output:{...o}}),o}catch(o){throw s({level:"warn",output:o.toString()}),o}}async deleteOne({id:e}){try{return{...await this.model.deleteOne({_id:e}),isNew:!1,data:[]}}catch(n){throw n}}findAll({config:e={},query:n,systemLog:r}){const s=hn({systemLog:r,label:"REPO_READ",message:`fn ${this._classname}.prototype.findAll`,input:[{query:{...n},systemLog:{...r}}]}),i={...this.queryOptions,...e};return new Promise((o,a)=>{this.model.findAll(n,i,(l,u,c)=>{if(l)s({level:"warn",output:l.toString()}),a(l);else{const f={isNew:!1,data:u,total:c||u.length};s({level:"info",output:{...f}}),o(f)}})})}findOne({config:e={},query:n,systemLog:r}){const s=hn({systemLog:r,label:"REPO_READ",message:`fn ${this._classname}.prototype.findOne`,input:[{query:{...n},systemLog:{...r}}]}),i={...this.queryOptions,...e};return new Promise((o,a)=>{this.model.findAll(n,i,(l,u)=>{if(l)a(l);else if(u.length===1){const c={isNew:!1,data:u,total:1};s({level:"info",output:{...c}}),o(c)}else u.length===0?a(new Error("record not found")):a(new Error("more than one is found"))})}).catch(o=>{throw s({level:"warn",output:o.toString()}),o})}saveAll({config:e={},docs:n,systemLog:r}){let s;const i=hn({systemLog:r,label:"REPO_WRITE",message:`fn ${this._classname}.prototype.saveAll`,input:[{config:e,docs:[...n],systemLog:{...r}}]});return(typeof this.model.saveAll=="function"?this.model.saveAll({config:e,docs:n}):Od({config:e,docs:n,service:this})).then(a=>{a.length!==1&&(s=null);const l={data:a,isNew:s,total:a.length};return i({level:"info",output:{...l}}),l}).catch(a=>{throw i({level:"warn",output:a.toString()}),a})}saveOne({config:e={},doc:n,systemLog:r}){const s=hn({systemLog:r,label:"REPO_WRITE",message:`fn ${this._classname}.prototype.saveOne`,input:[{config:e,doc:{...n},systemLog:{...r}}]}),i={...this.saveOptions,...e};return new Promise((o,a)=>{this.model.saveOne(n,i,(l,u)=>{l?(s({level:"warn",output:l.toString()}),a(l)):(s({level:"info",output:{...u}}),o(u))})})}}function hn({systemLog:t,label:e,message:n,input:r}={}){return({level:s,messgae:i,output:o}={})=>{t&&t.systemLogHelper&&t.systemLogHelper.log({batchId:t.batchId,label:e,level:s,message:i||n,data:{payload:{input:r,output:o}}})}}async function Od({config:t={},docs:e,service:n}){let r=null;return t.session||n.saveOptions.session?r=await Qa(e,async s=>{if(s){const i=await n.saveOne({config:t,doc:s});return(i._data||i.data)[0]}return null},{concurrency:1}):r=await Promise.all(e.map(async s=>{if(s){const i=await n.saveOne({config:t,doc:s});return(i._data||i.data)[0]}return null})),r}class Wa{constructor(e={}){e=e||{},this._data=e.data||e._data||[],this.err=e.err,this.isNew=e.isNew||!1,this.message=e.message,this.total=e.total||0,this._instanceBuilder=e._instanceBuilder}static init(e={}){return e instanceof this?e:new this(e)}static get _classname(){return"ApiResponse"}static get _superclass(){return"ApiResponse"}get data(){return this._instanceBuilder&&typeof this._instanceBuilder=="function"?this._data.map(this._instanceBuilder):this._data}}function Gt({repo:t,result:e}){return Wa.init({...e,_instanceBuilder:n=>t.init(n)})}class zs{constructor({repo:e}){this.repo=e}static get _classname(){return"Service"}static get _superclass(){return"Service"}async deleteOne({id:e}){const n=await this.repo.deleteOne({id:e});return Gt({repo:this.repo,result:n})}async findAll({config:e={},query:n={},systemLog:r}={}){const s=await this.repo.findAll({config:e,query:n,systemLog:r});return Gt({repo:this.repo,result:s})}async findOne({config:e={},query:n={},systemLog:r}={}){const s=await this.repo.findOne({config:e,query:n,systemLog:r});return Gt({repo:this.repo,result:s})}init(e){return this.repo.init(e)}initFromArray(e=[]){return Array.isArray(e)?e.map(n=>this.init(n)):[]}initOnlyValidFromArray(e=[]){return this.initFromArray(e).filter(n=>n)}async saveAll({config:e={},docs:n=[],systemLog:r}={}){const s=n.map(o=>e.skipInit?o:this.init(o)),i=await this.repo.saveAll({config:e,docs:s,systemLog:r});return Gt({repo:this.repo,result:i})}async saveOne({config:e={},doc:n={},systemLog:r}={}){const s=e.skipInit?n:this.init(n);if(s){const i=await this.repo.saveOne({config:e,doc:s,systemLog:r});return Gt({repo:this.repo,result:i})}return{isNew:null,data:[],err:new Error("doc is not a valid instance")}}}function Ya({repo:t}){if(t===void 0)throw new Error("repo is required.");if(t._superclass!==$r._superclass)throw new Error("repo is not an instance of Repo.");return new zs({repo:t})}class Ga extends zs{constructor({repo:e}){super({repo:e})}static get _classname(){return"ServiceBulkWrite"}async bulkWriteDocs({operations:e,config:n}){return await this.repo.bulkWriteDocs({operations:e,config:n})}}function Td({repo:t}){if(t===void 0)throw new Error("repo is required.");if(t._superclass!==$r._superclass)throw new Error("repo is not an instance of Repo.");return new Ga({repo:t})}async function Rd({body:t={},GeneralModel:e,UniqueKeyGenerator:n,resourceInfo:r}){const{resources:s,data:i,globalShared:o={},shared:a={},relationship:l={}}=t,u=r||t.resourceInfo;return xd(i,o,a),await Js(s,async(f,p)=>{const g=Dd(p,u,n,e);Id(i,l[p],f);const O=i[p],E=await g.saveAll({docs:[].concat(O)});return f[p]=Array.isArray(O)?E._data:E._data[0],f},{})}function xd(t,e={},n={}){Object.keys(n).forEach(r=>{const s=t[r];Array.isArray(s)?t[r]=s.map(i=>at.merge({},i,e,n[r]||{})):t[r]=at.merge({},s,e,n[r]||{})})}function Id(t,e={},n){Object.keys(e).forEach(r=>{const s=e[r],i=at.get(n,s);at.set(t,r,i)})}function Dd(t,e,n,r){const{collectionName:s,fields:i}=e[t],o=n.makeGenerator(i),a=new r({collectionName:s,uniqueKeyGenerator:o});return Ya({repo:new $r({model:a})})}function Ja(t,e,n,r,s){const i=s||je;return!Array.isArray(t)||t.length===0?null:t.reduce((o,a)=>{const{key:l,type:u,value:c,restriction:f}=a;if(r&&typeof r=="function"?r({rule:f,data:e}):!0){let g=c;switch(u){case"array":{g=c.map(O=>n({keys:O.value.split("."),obj:e}));break}case"fromKeyValue":{const{dataPath:O,key:E}=c,D=n({keys:O.split("."),obj:e});g=i.getValuesByKey(D,E)[0];break}case"toKeyValue":{const O=n({keys:c.split("."),obj:e});g=i.fromObject(O);break}case"nested":{g=Ja(c,e,n,r);break}case"path":{g=n({keys:c.split("."),obj:e});break}case"orgin":{g=c;break}case"origin":{g=c;break}default:{g=c;break}}return l?{...o,[l]:g}:typeof g=="string"?g:{...o,...g}}return o},{})}function $d(t,e){return!e||typeof e!="string"?{}:t.reduce((n,r)=>(n[r[e]]||(n[r[e]]=0),n[r[e]]++,n),{})}function Ld(t,e){const n=Array.isArray(t)?t:[],r=Array.isArray(e)?e:[],s=new Map,i=(o,a)=>o===void 0?a:Array.isArray(o)&&Array.isArray(a)?[...new Set([...o,...a])]:typeof o=="object"&&typeof a=="object"&&!Array.isArray(o)&&!Array.isArray(a)?{...o,...a}:a;return n.forEach(o=>{s.set(o.key,o.value)}),r.forEach(o=>{const a=s.get(o.key);s.set(o.key,i(a,o.value))}),Array.from(s.entries()).map(([o,a])=>({key:o,value:a}))}function za(t,e=6){return t=t.toString(),t.length<e?za(`0${t}`,e):t}async function Qa(t,e,{concurrency:n=Number.POSITIVE_INFINITY,stopOnError:r=!0,signal:s}={}){return new Promise((i,o)=>{if(t[Symbol.iterator]===void 0&&t[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof t})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!(Number.isSafeInteger(n)&&n>=1||n===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${n}\` (${typeof n})`);const a=[],l=[],u=new Map;let c=!1,f=!1,p=!1,g=0,O=0;const E=t[Symbol.iterator]===void 0?t[Symbol.asyncIterator]():t[Symbol.iterator](),D=()=>{P(s.reason)},B=()=>{s?.removeEventListener("abort",D)},U=R=>{i(R),B()},P=R=>{c=!0,f=!0,o(R),B()};s&&(s.aborted&&P(s.reason),s.addEventListener("abort",D,{once:!0}));const q=async()=>{if(f)return;const R=await E.next(),x=O;if(O++,R.done){if(p=!0,g===0&&!f){if(!r&&l.length>0){P(new AggregateError(l));return}if(f=!0,u.size===0){U(a);return}const K=[];for(const[j,se]of a.entries())u.get(j)!==$n&&K.push(se);U(K)}return}g++,(async()=>{try{const K=await R.value;if(f)return;const j=await e(K,x);j===$n&&u.set(x,j),a[x]=j,g--,await q()}catch(K){if(r)P(K);else{l.push(K),g--;try{await q()}catch(j){P(j)}}}})()};(async()=>{for(let R=0;R<n;R++){try{await q()}catch(x){P(x);break}if(p||c)break}})()})}function Nd(t,e,{concurrency:n=Number.POSITIVE_INFINITY,backpressure:r=n}={}){if(t[Symbol.iterator]===void 0&&t[Symbol.asyncIterator]===void 0)throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof t})`);if(typeof e!="function")throw new TypeError("Mapper function is required");if(!(Number.isSafeInteger(n)&&n>=1||n===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${n}\` (${typeof n})`);if(!(Number.isSafeInteger(r)&&r>=n||r===Number.POSITIVE_INFINITY))throw new TypeError(`Expected \`backpressure\` to be an integer from \`concurrency\` (${n}) and up or \`Infinity\`, got \`${r}\` (${typeof r})`);return{async*[Symbol.asyncIterator](){const s=t[Symbol.asyncIterator]===void 0?t[Symbol.iterator]():t[Symbol.asyncIterator](),i=[];let o=0,a=!1,l=0;function u(){if(a||!(o<n&&i.length<r))return;o++;const c=(async()=>{const{done:f,value:p}=await s.next();if(f)return o--,{done:!0};u();try{const g=await e(await p,l++);if(o--,g===$n){const O=i.indexOf(c);O>0&&i.splice(O,1)}return u(),{done:!1,value:g}}catch(g){return o--,a=!0,{error:g}}})();i.push(c)}for(u();i.length>0;){const{error:c,done:f,value:p}=await i[0];if(i.shift(),c)throw c;if(f)return;u(),p!==$n&&(yield p)}}}}const $n=Symbol("skip");function Pd({engine:t,template:e,value:n}={}){if(!e)return"";const r=t.init(n),s=/\{\{\s(.*?)\s\}\}/g;return e.replace(s,i=>{const o=r.pipe(i);return o==null?"":typeof o=="object"?JSON.stringify(o):o})}function Md({content:t,mapping:e}){let n=!1;typeof t=="object"&&t!==null&&(t=JSON.stringify(t),n=!0);const r=/\[\[\s*([^[\]]+?)\s*\]\]/g,s=t.replace(r,(i,o)=>{const a=o.trim();if(/^[\w.\-]+$/.test(a)){const l=a.split(".");let u=e;for(const c of l)if(c&&(u=u?.[c],u===void 0))break;if(u!==void 0)return u}return`<%= ${a} %>`});return n?JSON.parse(s):s}function kd(t,e={}){const{normalizeWhitespace:n=!0,removeNewlines:r=!1,trim:s=!0,preserveBasicWhitespace:i=!0,debug:o=!1}=e;if(typeof t!="string")return t;let a=t;if(o&&(console.log("Original input:",JSON.stringify(t)),console.log("Options:",{normalizeWhitespace:n,removeNewlines:r,trim:s,preserveBasicWhitespace:i})),i&&!r)if(o){const l=[];a=a.replace(/[\x00-\x08\v\f\x0E-\x1F\x7F-\x9F\u200B-\u200D\uFEFF\u202A-\u202E]/g,u=>(l.push({char:u,code:u.charCodeAt(0),hex:`0x${u.charCodeAt(0).toString(16).toUpperCase().padStart(4,"0")}`}),"")),l.length>0?(console.log("Phase 1 (preserve mode) - Removed characters:"),l.forEach(u=>{console.log(` - Character: ${JSON.stringify(u.char)}, Code: ${u.code}, Hex: ${u.hex}`)}),console.log(`Removed ${l.length} control character(s)`)):console.log("Phase 1 (preserve mode) - No control characters found")}else a=a.replace(/[\x00-\x08\v\f\x0E-\x1F\x7F-\x9F\u200B-\u200D\uFEFF\u202A-\u202E]/g,"");else if(o){const l=[];a=a.replace(/[\x00-\x1F\x7F-\x9F\u200B-\u200D\uFEFF\u202A-\u202E]/g,u=>(l.push({char:u,code:u.charCodeAt(0),hex:`0x${u.charCodeAt(0).toString(16).toUpperCase().padStart(4,"0")}`}),"")),l.length>0?(console.log("Phase 1 (full removal mode) - Removed characters:"),l.forEach(u=>{console.log(` - Character: ${JSON.stringify(u.char)}, Code: ${u.code}, Hex: ${u.hex}`)}),console.log(`Removed ${l.length} control character(s)`)):console.log("Phase 1 (full removal mode) - No control characters found")}else a=a.replace(/[\x00-\x1F\x7F-\x9F\u200B-\u200D\uFEFF\u202A-\u202E]/g,"");return o&&console.log("After Phase 1:",JSON.stringify(a)),r&&(o?(a=a.replace(/[\r\n]+/g," "),console.log("Phase 2 - Converted newlines to spaces")):a=a.replace(/[\r\n]+/g," ")),n&&(o?(a=a.replace(/[ \t]+/g," "),console.log("Phase 2 - Normalized whitespace")):a=a.replace(/[ \t]+/g," ")),o&&console.log("After Phase 2:",JSON.stringify(a)),s&&(o?(a=a.trim(),console.log("Phase 3 - Trimmed leading/trailing whitespace")):a=a.trim()),o&&(console.log("Final result:",JSON.stringify(a)),console.log("--- Sanitization complete ---")),a}function Xa(t){return t&&typeof t.toString=="function"?t.toString():t}function Fd(t){const e=[...t];for(let n=e.length-1;n>=0;n--){const r=Math.floor(Math.random()*(n+1));[e[n],e[r]]=[e[r],e[n]]}return e}function gr(t,e="_"){return t===null||typeof t>"u"||typeof t.toString>"u"?null:t.toString().trim().toUpperCase().replace("-",e).replace(" ",e)}function jd(t,e=34){const n=Vd(e);return Ud(t,n)}function Ud(t,e){const{byCode:n}=e;if(t===0)return n[0];let r="";const s=e.length;for(;t>0;)r=n[t%s]+r,t=Math.floor(t/s);return r}function Vd(t){let e="9876543210ABCDEFGHJKLMNPQRSTUVWXYZ";return t===58&&(e="9876543210ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz"),Hd(e)}function Kd(t){return Za(`${t}`).toLowerCase().split(" ").join("-")}function Hd(t){const e={},n={},{length:r}=t;let s;for(let i=0;i<r;i++)s=t[i],e[i]=s,n[s]=i;return{byCode:e,byChar:n,length:r}}function Bd(t,e){return typeof t!="string"||typeof e!="string"?!1:t.trim().toUpperCase()===e.trim().toUpperCase()}function Za(t){return t.replace(/\s+/g,"-").replace(/[.,\/#!$%\^&\*;:{}=\_`~()]/g,"")}function qd({len:t=16,pattern:e="a1"}={}){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZ",r="abcdefghijklmnopqrstuvwxyz",s="1234567890",i="~!@#$%^&*_+-=";let o="";e.includes("A")&&(o+=n),e.includes("a")&&(o+=r),e.includes("1")&&(o+=s),e.includes("#")&&(o+=i);const a=[...o];return[...new Array(t)].map(l=>a[Math.random()*a.length|0]).join``}function Wd(t){return(typeof t!="string"?t.toString():t).split("").reverse().join("")}function Yd(t){return typeof t?.toUpperCase=="function"?t.toUpperCase():""}function Gd(t){let e=34,n=8;t===void 0||(typeof t=="number"?e=t:typeof t=="object"&&t!==null&&(e=t.base??e,n=t.len??n));const r=new Date().valueOf(),s=qd({len:n,pattern:"1"}),i=Wd(`${r}${s}`);return jd(i,e)}function Jd(t){return t?t.trim().split(/\s+/).map((e,n)=>e?n===0?e.toLowerCase():e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():"").join(""):""}function zd(t){return t?t.trim().toLowerCase():""}function Qd(t){return/[^\w\s]|_/g.test(t.replace(/_/g,""))?null:t.replace(/([a-z])([A-Z])/g,"$1_$2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/[\s\-\.]+/g,"_").toUpperCase().replace(/^_+|_+$/g,"").replace(/_{2,}/g,"_")}const nn={getCssClass:Kd,isSame:Bd,punctuationless:Za,safeToUpperCase:Yd,setCode:Gd,toCamelCase:Jd,toLowerCase:zd,toScreamingSnakeCase:Qd};function el(t,e){t.add({meta:{active:{type:Boolean,default:!0},created:{type:Number},creator:{type:String},deleted:{type:Boolean,default:!1},modified:{type:Number},owner:{type:String}}}),t.pre("save",function(n){this.meta.modified=Date.now(),n()}),t.index({"meta.active":1,"meta.deleted":1},{name:"tracking_status_index",background:!0,partialFilterExpression:{"meta.active":!0,"meta.deleted":!1}})}function Xd(t,e){t.path("meta")||el(t),t.add({metadata:[{type:Object}],remarks:[{type:Object}],tenantCode:{type:String,required:!0}}),t.index({tenantCode:1},{name:"tenant_core_index",background:!0}),t.indexes().some(s=>s.name==="tenant_status_index")||t.index({tenantCode:1,_type:1},{name:"tenant_status_index",background:!0,partialFilterExpression:{_type:"Tenant","meta.active":!0,"meta.deleted":!1}})}const Zd=Object.freeze(Object.defineProperty({__proto__:null,CheckResult:qa,ExcelImportHelper:gd,LOG_TYPE:z,authorize:Tf,calculateAge:Rf,changeCreatorOwner:va,concatStringByArray:Cs,convertString:Xf,convertTimestampToString:ad,detectControlCharacters:ld,displayName:fd,downloadFileByUrl:dd,escapeRegex:hd,expressHelper:Ad,extractEmails:Sd,formatDate:ba,generalPost:Rd,getObjectByArr:Ja,getValidation:et,getValueByKeys:me,groupArrayByKey:$d,init:lt,initFromArray:Ft,initOnlyValidFromArray:tn,isConvertibleToNumber:vs,mergeArraysByKey:Ld,objectHelper:at,pMap:Qa,pMapIterable:Nd,pMapSkip:$n,pReduce:Js,padZeros:za,printControlCharReport:ud,renderByTemplate:Pd,replacePlaceholders:Md,sanitizeText:kd,setId:Xa,shuffleArray:Fd,stringFormatter:gr,stringHelper:nn,tenantPlugin:Xd,trackingPlugin:el},Symbol.toStringTag,{value:"Module"}));class eh{constructor(e){e=e||{},this.expiration=e.expiration||null,this.s3Client=e.s3Client||null,this.getIdToken=e.getIdToken,this.region=e.region||"ap-east-1",this.roleArn=e.roleArn,this.roleSessionName=e.roleSessionName||"web-identity-session",this.durationSession=e.durationSession||3600,this.awsClientSts=e.awsClientSts,this.awsClientS3=e.awsClientS3}static dummyData(){return{getIdToken:()=>"mock-web-identity-token",roleArn:"arn:aws:iam::846252828949:role/oidcS3Jccpa",awsClientSts:{STSClient:class{},AssumeRoleWithWebIdentityCommand:class{}},awsClientS3:{S3Client:class{},PutObjectCommand:class{},GetObjectCommand:class{},DeleteObjectCommand:class{}}}}static init(e={}){if(e instanceof this)return e;try{const n=new this(e);return n.isValid?n:null}catch{return null}}get isExpired(){if(!this.expiration)return!0;const e=new Date,n=1*60*1e3;return e>=new Date(this.expiration.getTime()-n)}get isValid(){if(!this.getIdToken)throw new Error("Missing required configuration: getIdToken function");if(!this.roleArn)throw new Error("Missing required configuration: roleArn");if(!this.awsClientSts)throw new Error("Missing required AWS awsClientSts client configuration");if(!this.awsClientSts.STSClient)throw new Error("Missing STSClient in AWS awsClientSts client configuration");if(!this.awsClientSts.AssumeRoleWithWebIdentityCommand)throw new Error("Missing AssumeRoleWithWebIdentityCommand in AWS awsClientSts client configuration");if(!this.awsClientS3)throw new Error("Missing required AWS awsClientS3 client configuration");const e=["S3Client","PutObjectCommand","GetObjectCommand","DeleteObjectCommand"];for(const n of e)if(!this.awsClientS3[n])throw new Error(`Missing ${n} in AWS awsClientS3 client configuration`);return!0}async refreshCredentials(){try{if(!await this.getIdToken())throw new Error("getIdToken function returned empty or invalid token");const s=(await new this.awsClientSts.STSClient({region:this.region}).send(new this.awsClientSts.AssumeRoleWithWebIdentityCommand({RoleArn:this.roleArn,RoleSessionName:this.roleSessionName,WebIdentityToken:await this.getIdToken(),DurationSeconds:this.durationSession}))).Credentials;if(!s)throw new Error("No credentials returned from awsClientSts");return this.expiration=s.Expiration,this.s3Client=new this.awsClientS3.S3Client({region:this.region,credentials:{accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,sessionToken:s.SessionToken}}),this}catch(e){throw new Error(`Failed to refresh credentials: ${e.message}`)}}async getS3Client(){return(this.isExpired||!this.s3Client)&&await this.refreshCredentials(),this.s3Client}async putObject(e){try{const n=await this.getS3Client(),r=new this.awsClientS3.PutObjectCommand(e);await n.send(r);const s=e.Key.split("/");return{url:`https://s3.${this.region}.amazonaws.com/${e.Bucket}/${e.Key}`,filename:s.pop(),folder:e.Bucket,subFolders:s}}catch(n){throw new Error(`Failed to put object: ${n.message}`)}}async getObject(e){try{const n=await this.getS3Client(),r=new this.awsClientS3.GetObjectCommand(e),s=await n.send(r);return{body:s.Body,contentType:s.ContentType,lastModified:s.LastModified,contentLength:s.ContentLength}}catch(n){throw new Error(`Failed to get object: ${n.message}`)}}async deleteObject(e){try{const n=await this.getS3Client(),r=new this.awsClientS3.DeleteObjectCommand(e);return await n.send(r),!0}catch(n){throw new Error(`Failed to delete object: ${n.message}`)}}}const Es="_";class bt extends je{static init(e={}){if(e instanceof this)return e;const n=new this({...e,key:gr(e.key,Es)});return n.isValid?n:null}static get _classname(){return"Metadata"}static mapToKeyValue(e=[],n="key",r="value"){return Array.isArray(e)?e.reduce((s,i)=>{if(i&&typeof i=="object"){const o=at.get(i,n),a=at.get(i,r);if(o!=null){const l=a!==void 0?nn.toScreamingSnakeCase(String(a)):"";s.push(this.init({key:o,value:l}))}}return s},[]):[]}static merge(e,n){return(n||[]).map(r=>{const s=e.find(i=>zi(i.key,r.key));return s?s.value=th(r.value,s.value):e.push(r),r}),e}static sameKey(e,n){return zi(e.key,n)}}function zi(t,e){return gr(t,Es)===gr(e,Es)}function th(t,e){return t===void 0?e:Array.isArray(t)&&Array.isArray(e)?[...new Set([...t,...e])]:typeof t=="object"&&typeof e=="object"&&!Array.isArray(t)&&!Array.isArray(e)?{...t,...e}:e}class Lr{constructor(e={}){var n,r,s,i,o,a;e=e||{};const l=e._id||e.id;this.id=Xa(l),this._type=e._type||"TrackedEntity";const u=Date.now();this.meta={active:((n=e.meta)==null?void 0:n.active)??e.active??!0,created:((r=e.meta)==null?void 0:r.created)??(e.created?new Date(e.created).getTime():u),creator:((s=e.meta)==null?void 0:s.creator)??e.creator??"",deleted:((i=e.meta)==null?void 0:i.deleted)??e.deleted??!1,modified:((o=e.meta)==null?void 0:o.modified)??(e.modified?new Date(e.modified).getTime():u),owner:((a=e.meta)==null?void 0:a.owner)??e.owner??""}}static dummyData(){const e=Date.now();return{meta:{active:!0,deleted:!1,created:e,creator:"creator",modified:e,owner:"owner"}}}static get _classname(){return"TrackedEntity"}static get _superclass(){return"TrackedEntity"}static init(e={}){return lt(this,e)}static initFromArray(e=[]){return Ft(this,e)}static initOnlyValidFromArray(e=[]){return tn(this,e)}get __valid(){return{}}get isValid(){return!!this}get active(){var e;return((e=this.meta)==null?void 0:e.active)??this.active}get created(){var e;return((e=this.meta)==null?void 0:e.created)??this.created}get creator(){var e;return((e=this.meta)==null?void 0:e.creator)??this.creator}get deleted(){var e;return((e=this.meta)==null?void 0:e.deleted)??this.deleted}get modified(){var e;return((e=this.meta)==null?void 0:e.modified)??this.modified}get owner(){var e;return((e=this.meta)==null?void 0:e.owner)??this.owner}changeCreatorOwner({source:e,target:n}){return va(this,{source:e,target:n}).setModified()}delete(){return this.setDeleted()}setActive(){return this.meta?this.meta.active=!0:this.active=!0,this}setDeleted(){return this.meta?this.meta.deleted=!0:this.deleted=!0,this}setModified(){const e=Date.now();return this.meta?this.meta.modified=e:this.modified=e,this}setOwner(e){return e?(this.meta?this.meta.owner=e:this.owner=e,this):this}unsetActive(){return this.meta?this.meta.active=!1:this.active=!1,this}unsetDeleted(){return this.meta?this.meta.deleted=!1:this.deleted=!1,this}update(e){const n=this.constructor.ALLOWED_META_PROPS,r={...this.meta};return e.meta&&n.forEach(s=>{e.meta.hasOwnProperty(s)&&(r[s]=e.meta[s])}),n.forEach(s=>{e.hasOwnProperty(s)&&(r[s]=e[s])}),JSON.stringify(this.meta)!==JSON.stringify(r)&&(this.meta=r),this.setModified()}}Of(Lr,"ALLOWED_META_PROPS",["active","deleted","owner"]);class nh extends Lr{constructor(e){e=e||{},super(e),this.id=e.id,this.body=e.body,this.data=e.data,this.dirty=e.dirty,this.metadata=bt.initOnlyValidFromArray(e.metadata),this.remarks=je.initOnlyValidFromArray(e.remarks),this.threadID=e.threadID,this.title=e.title}static get _classname(){return"PushEnvelope"}static get _superclass(){return"PushEnvelope"}static init(e={}){return lt(this,e)}get _classname(){return"PushEnvelope"}get _superclass(){return"PushEnvelope"}get isValid(){return super.isValid&&this.data}}const Se={trace:{weight:10,name:"TRACE"},debug:{weight:20,name:"DEBUG"},info:{weight:30,name:"INFO"},warn:{weight:40,name:"WARN"},error:{weight:50,name:"ERROR"},critical:{weight:60,name:"CRITICAL"},alert:{weight:70,name:"ALERT"},emergency:{weight:80,name:"EMERGENCY"}};class tl{constructor(e={}){e=e||{},this.data=e.data,this.level=e.level,this.timestamp=e.timestamp,this.stackTrace=rh(e),this.name=e.name??"",this.zone=e.zone}toString(){return`[${this.logName(this)}] ${this.serialize(this)}
17
+ ${this.stackTrace||""}
18
+ ${this.zone||""}`}logName(){let e=`${this.timestamp}`;return this.level.name&&(e+=`>${this.level.name}`),this.name&&(e+=`>${this.name}`),e}serialize(){var e;return this.data instanceof Error||typeof((e=this.data)==null?void 0:e.message)<"u"?this.data.message:this.data===null?"null":this.data===void 0?"undefined":typeof this.data=="object"?JSON.stringify(this.data):this.data.toString()}}function rh(t){var e;return t.stackTrace?t.stackTrace:t.data instanceof Error||typeof((e=t.data)==null?void 0:e.stack)<"u"?t.data.stack:null}let es;class Ln{constructor(e={}){const{level:n}=e;this._level=n??Se.debug,this._handlers=new Map}static getInstance(e){return es||(es=new Ln(e)),es}setLevel(e){return this._level=e,this}addHandler(e){return e instanceof Ln&&this._handlers.set(e.constructor,e),this}removeHandler(e){return this._handlers.delete(e),this}receive({record:e}){var n,r;((n=e.level)==null?void 0:n.weight)<((r=this._level)==null?void 0:r.weight)||(this._handlers.forEach(s=>{s.receive({record:e})}),this.logBody(e))}logBody(e){}trace(e,n){return this._log({level:Se.trace,object:n,options:e})}debug(e,n){return this._log({level:Se.debug,object:n,options:e})}info(e,n){return this._log({level:Se.info,object:n,options:e})}warn(e,n){return this._log({level:Se.warn,object:n,options:e})}error(e,n){return this._log({level:Se.error,object:n,options:e})}critical(e,n){return this._log({level:Se.critical,object:n,options:e})}_log({level:e,object:n,options:r}){typeof n>"u"&&(n=r,r="");const s=Date.now(),i=new tl({data:n,level:e,timestamp:s,stackTrace:n?.stack??r?.stack??null,name:r??""});return this.receive({record:i})}}class sh extends Ln{constructor(e={}){const{format:n}=e;super(e),this.format=n}logBody(e){const n=e.logName(),r=this.format?this.format(e):e.serialize();switch(e.level){case Se.error:case Se.critical:case Se.alert:case Se.emergency:console.error(`[${n}] ${r}`,e.stackTrace||"");break;case Se.warn:console.warn(`[${n}] ${r}`,e.stackTrace||"");break;case Se.info:console.error(`[${n}] ${r}`,e.stackTrace||"");break;case Se.debug:console.error(`[${n}] ${r}`,e.stackTrace||"");break;default:console.error(`[${n}] ${r}`,e.stackTrace||"")}}}const As={debug:{name:"DEBUG"},production:{name:"PRODUCTION"}};function ih(t){const e=t.toLowerCase();return As[e]?As[e]:null}const oh=["attributes","ref"];class yr{constructor(e={}){e=e||{},this.attributes=je.initOnlyValidFromArray(e.attributes),this.ref=e.ref||{}}static get _classname(){return"QMeta"}static get _superclass(){return"QMeta"}static init(e={}){return e instanceof yr?e:new yr(e)}addAttribute(e){const n=je.init(e);if(!n)throw new Error("invalid meta attribute");return this.attributes.push(n),this}update(e){return Object.keys(e).forEach(n=>{oh.includes(n)&&(n==="attributes"?this[n]=je.initOnlyValidFromArray(e[n]):this[n]=e[n])}),this}}class Ss{constructor(e){e=e||{};const{_Actor:n}=e._constructor||{};this._Actor=n,this._actor=e._actor,this.actorCode=typeof e=="number"?null:e.actorCode||null,this.timestamp=typeof e=="number"?e:e.timestamp||null}static get _classname(){return"ActionRecord"}static get _superclass(){return"ActionRecord"}static dummyData(){return{timestamp:new Date().valueOf()}}static init(e={}){return lt(this,e)}get _classname(){return"ActionRecord"}get _superclass(){return"ActionRecord"}get actor(){return this._Actor&&typeof this._Actor.init=="function"?this._Actor.init(this._actor):this._actor}get isValid(){return!!this.timestamp}update(e){return typeof e=="number"?(this.timestamp=e,this):(Object.keys(e).forEach(n=>{this[n]=e[n]}),this)}}const ah=["_ActionRecord","created"];class Bn{constructor(e){e=e||{};const{_ActionRecord:n}=e._constructor||{};this._ActionRecord=n&&n._superclass===Ss._superclass?n:Ss,this.created=this._ActionRecord.init(e.created||{timestamp:new Date().valueOf()})}static get _classname(){return"Status"}static get _superclass(){return"Status"}static dummyData(){return{}}static init(e={}){return lt(this,e)}static initFromArray(e=[]){return Ft(this,e)}static initOnlyValidFromArray(e=[]){return tn(this,e)}get _classname(){return"Status"}get _superclass(){return"Status"}get isCreated(){var e;return((e=this.created)==null?void 0:e.timestamp)!==null}get isValid(){return!!this}setValue(e,n,r){const s=e||Date.now();return this[r]=this[r]instanceof this._ActionRecord?this[r].update({actorCode:n,timestamp:s}):this._ActionRecord.init({actorCode:n,timestamp:s}),this}update(e){return Object.keys(e).forEach(n=>{ah.includes(n)||(this[n]=this[n]instanceof this._ActionRecord?this[n].update(e[n]):this._ActionRecord.init(e[n]))}),this}}class lh extends Bn{constructor(e){e=e||{},super(e),this.archived=this._ActionRecord.init(e.archived),this.completed=this._ActionRecord.init(e.completed),this.discarded=this._ActionRecord.init(e.discarded),this.drafted=this._ActionRecord.init(e.drafted)}static get _classname(){return"StatusDocument"}get _classname(){return"StatusDocument"}get isArchived(){var e;return((e=this.created)==null?void 0:e.timestamp)!==null}get isCompleted(){var e;return((e=this.completed)==null?void 0:e.timestamp)!==null}get isDiscarded(){var e;return((e=this.discarded)==null?void 0:e.timestamp)!==null}get isDrafted(){var e;return((e=this.drafted)==null?void 0:e.timestamp)!==null}get isValid(){return super.isValid}setArchived(e,n){return this.setValue(e,n,"archived")}setCompleted(e,n){return this.setValue(e,n,"completed")}setDiscarded(e,n){return this.setValue(e,n,"discarded")}setDrafted(e,n){return this.setValue(e,n,"drafted")}}class Nr extends Lr{constructor(e={}){e=e||{},super(e),this._type=e._type||"TenantAwareEntity",this._tenant=e._tenant,this.metadata=bt.initOnlyValidFromArray(e.metadata),this.remarks=je.initOnlyValidFromArray(e.remarks),this.tenantCode=e.tenantCode}static dummyData(){return{...super.dummyData(),metadata:[],remarks:[],tenantCode:"tenantCode"}}static get _classname(){return"TenantAwareEntity"}static get _superclass(){return"TenantAwareEntity"}get __valid(){return{...super.__valid,tenantCode:this.tenantCode}}get isValid(){return super.isValid&&!!this.tenantCode}insertOrUpdateMetadata(e,n){return this.metadata=bt.insertOrUpdateRecord(this.metadata,e,n),this}getMetadata(){return this.metadata}getMetadataByKey(e){return bt.foundByKey(this.metadata,e)}getMetadataValueByKey(e){const n=this.getMetadataByKey(e);return n?n.value:null}getMetadataValueByKeys(e,n){if(!Array.isArray(e))return null;if(n=n||this.metadata,e.length===0)return n;const r=e.shift(),s=bt.getMetadataValueByKeyAsArray(n,r);return this.getMetadataValueByKeys(e,s)}getMetadataValueByKeyAsArray(e){return bt.getMetadataValueByKeyAsArray(this.metadata,e)}getRemarks(){return this.remarks}getRemarkByKey(e){return je.foundByKey(this.remarks,e)}getRemarksValueByKey(e){const n=this.getRemarkByKey(e);return n?n.value:null}getTenantCode(){return this.tenantCode}update(e){return e.metadata&&Array.isArray(e.metadata)&&(this.metadata=bt.initOnlyValidFromArray(e.metadata)),e.remarks&&Array.isArray(e.remarks)&&(this.remarks=je.initOnlyValidFromArray(e.remarks)),super.update(e)}}class ch{static get _classname(){return"UniqueKeyGenerator"}static get _superclass(){return"UniqueKeyGenerator"}static makeFormatter({fieldName:e,format:n,options:r}){switch(n){case"set_code":return Qi(e);default:return Qi(e)}}static makeGenerator(e){const n=e.map(r=>this.makeFormatter(r));return async r=>await Js(n,async(i,o)=>{const a=await o(r);return Object.assign(i,a)},r)}}function Qi(t,e){return async(n={})=>n[t]?{}:{[t]:nn.setCode()}}class _r{constructor(e={}){this.blockUI=e.blockUI??!1,this.callback=e.callback??null,this.data=e.data??null,this.event=e.event??null,this.reloadPage=e.reloadPage??!1,this.sessionId=e.sessionId??null,this.timeout=e.timeout??3e4}static get _classname(){return"WebAppRequest"}static get _superclass(){return"WebAppRequest"}static init(e){if(e instanceof _r)return e;const n=new _r(e);return n.isValid?n:null}static dummyData(){return{data:null,sessionId:"sessionId"}}get isValid(){return!!this.sessionId}getId(){try{return this.sessionId}catch{return null}}}const uh={EXCUTE_EVENT_ERROR:"EXCUTE_EVENT_ERROR",NOT_FOUND:"NOT_FOUND",SERVER_ERROR:"SERVER_ERROR",TIMEOUT:"TIMEOUT",UNAUTHORIZED:"UNAUTHORIZED",VALIDATION_ERROR:"VALIDATION_ERROR"};class Nn{constructor(e={}){this.code=e.code??null,this.message=e.message??"",this.timestamp=e.timestamp??null}static init(e){if(e instanceof Nn)return e;const n=new Nn(e);return n.isValid?n:null}get isValid(){return!!this.code}}class vr{constructor(e={}){this.data=e.data??null,this.errorDetail=Nn.init(e.errorDetail),this.sessionId=e.sessionId??null,this.success=e.success??!1}static get _classname(){return"WebAppResponse"}static get _superclass(){return"WebAppResponse"}static init(e){if(e instanceof vr)return e;const n=new vr(e);return n.isValid?n:null}static dummyData(){return{data:null,errorDetail:null,sessionId:"sessionId",success:!1}}get isValid(){return!!this.sessionId}getId(){try{return this.sessionId}catch{return null}}}const fh=Object.freeze(Object.defineProperty({__proto__:null,ActionRecord:Ss,ApiResponse:Wa,AwsStsS3Client:eh,ConsoleLog:sh,ERROR_CODES:uh,ErrorDetail:Nn,KeyValueObject:je,LogRecord:tl,Metadata:bt,PushEnvelope:nh,QLog:Ln,QLogEnv:As,QLogLevel:Se,QMeta:yr,Repo:$r,Service:zs,ServiceBulkWrite:Ga,Status:Bn,StatusDocument:lh,TemplateCompiler:Va,TenantAwareEntity:Nr,TrackedEntity:Lr,UniqueKeyGenerator:ch,WebAppRequest:_r,WebAppResponse:vr,getQLogEnv:ih,makeApiResponse:Gt,makeService:Ya,makeServiceBulkWrite:Td},Symbol.toStringTag,{value:"Module"}));({...Zd,...fh});const nl={ASSET:"ITEM",LOCATION:"LOC",USER:"USER",HOLDER:"HOLDER"},rl={WAREHOUSE:"WAREHOUSE",RACK:"RACK",VENUE:"VENUE",CART:"CART",TRUCK:"TRUCK",OFFICE:"OFFICE",DOCK:"DOCK",VIRTUAL_USER:"VIRTUAL_USER"},ot={REGISTERED:"REGISTERED",VIRTUAL:"VIRTUAL"},wt={PICKUP:"PICKUP",DROPOFF:"DROPOFF",TRANSFER:"TRANSFER",ADJUST:"ADJUST"},sl={SCANNER:"SCANNER",ADMIN:"ADMIN",IMPORT:"IMPORT"},dh=Object.freeze(Object.defineProperty({__proto__:null,INVENTORY_LOCATION_KIND:ot,INVENTORY_LOCATION_TYPE:rl,INVENTORY_MOVEMENT_TYPE:wt,INVENTORY_QR_PREFIX:nl,INVENTORY_SOURCE:sl},Symbol.toStringTag,{value:"Module"})),Xi={ASSET:"ASSET",ITEM:"ASSET",LOC:"LOCATION",LOCATION:"LOCATION",USER:"USER",HOLDER:"USER"};function rn(t){const e=String(t||"").trim();if(!e)return{code:"",raw:e,type:"UNKNOWN"};const n=e.indexOf(":");if(n>0){const r=e.slice(0,n).trim().toUpperCase();return{code:e.slice(n+1).trim(),locationKind:ph(Xi[r]),raw:e,type:Xi[r]||"UNKNOWN"}}return{code:e,raw:e,type:"ASSET"}}function hh(t){return rn(t).type==="ASSET"}function il(t){return rn(t).type==="LOCATION"}function ol(t){const e=String(t||"").trim();return e?`${nl.USER}:${e}`:""}function Qs(t){return rn(t).type==="USER"}function qn(t={}){return t.locationKind?t.locationKind===ot.VIRTUAL:Qs(t.locationCode)}function al(t){const e=rn(t);return e.type==="USER"?e.code:""}function ph(t){if(t==="LOCATION")return ot.REGISTERED;if(t==="USER")return ot.VIRTUAL}const mh=Object.freeze(Object.defineProperty({__proto__:null,getVirtualUserCode:al,getVirtualUserLocationCode:ol,isAssetQr:hh,isLocationQr:il,isVirtualInventoryLocation:qn,isVirtualUserLocationCode:Qs,parseInventoryQr:rn},Symbol.toStringTag,{value:"Module"})),gh=["active","brand","category","currentLocationCode","currentLocationKind","currentLocationType","deleted","description","lastMovedAt","lastMovedBy","model","name","owner","remarks","serialNo"];class yh extends Nr{constructor(e={}){super(e),this._type=e._type||"InventoryAsset",this.assetTag=e.assetTag,this.brand=e.brand,this.category=e.category,this.currentLocationCode=e.currentLocationCode,this.currentLocationKind=e.currentLocationKind||ts(e.currentLocationCode),this.currentLocationType=e.currentLocationType||ns(e.currentLocationCode),this.description=e.description,this.inventoryAssetCode=_h(e,"inventoryAssetCode"),this.lastMovedAt=e.lastMovedAt,this.lastMovedBy=e.lastMovedBy,this.model=e.model,this.name=e.name,this.serialNo=e.serialNo,this.status=Bn.init(e.status||{})}static dummyData(){return{...super.dummyData(),assetTag:"QR-0001",name:"Scanner",tenantCode:"tenantCode"}}static get _classname(){return"InventoryAsset"}get isValid(){return super.isValid&&!!this.assetTag}get isInTransit(){return qn({locationCode:this.currentLocationCode,locationKind:this.currentLocationKind})}getCode(){return this.inventoryAssetCode}moveTo({locationCode:e,locationKind:n,movedAt:r,movedBy:s}){return this.currentLocationCode=e,this.currentLocationKind=n||ts(e),this.currentLocationType=ns(e),this.lastMovedAt=r||Date.now(),this.lastMovedBy=s,this.setModified()}update(e={}){return Object.keys(e).forEach(n=>{gh.includes(n)&&(this[n]=e[n])}),this.currentLocationKind=this.currentLocationKind||ts(this.currentLocationCode),this.currentLocationType=this.currentLocationType||ns(this.currentLocationCode),super.update(e)}}function ts(t){return qn({locationCode:t})?ot.VIRTUAL:ot.REGISTERED}function ns(t){return qn({locationCode:t})?rl.VIRTUAL_USER:void 0}function _h(t,e){const n=t||{};return n[e]?String(n[e]):nn.setCode()}const vh=["active","deleted","description","locationType","name","owner","parentLocationCode","remarks"];class bh extends Nr{constructor(e={}){super(e),this._type=e._type||"InventoryLocation",this.description=e.description,this.inventoryLocationCode=wh(e,"inventoryLocationCode"),this.locationCode=e.locationCode,this.locationType=e.locationType,this.name=e.name||e.locationCode,this.parentLocationCode=e.parentLocationCode,this.status=Bn.init(e.status||{})}static dummyData(){return{...super.dummyData(),locationCode:"RACK-A12",name:"Rack A12",tenantCode:"tenantCode"}}static get _classname(){return"InventoryLocation"}get isValid(){return super.isValid&&!!this.locationCode}getCode(){return this.inventoryLocationCode}update(e={}){return Object.keys(e).forEach(n=>{vh.includes(n)&&(this[n]=e[n])}),super.update(e)}}function wh(t,e){const n=t||{};return n[e]?String(n[e]):nn.setCode()}const Ch=["metadata","notes"];class Eh extends Nr{constructor(e={}){super(e),this._type=e._type||"InventoryMovement",this.assetTag=e.assetTag,this.fromLocationCode=e.fromLocationCode,this.inventoryAssetCode=e.inventoryAssetCode,this.inventoryMovementCode=Ah(e,"inventoryMovementCode"),this.movedAt=e.movedAt||Date.now(),this.movedBy=e.movedBy,this.movementType=e.movementType||wt.TRANSFER,this.notes=e.notes,this.source=e.source||sl.SCANNER,this.status=Bn.init(e.status||{}),this.toLocationCode=e.toLocationCode}static dummyData(){return{...super.dummyData(),assetTag:"QR-0001",fromLocationCode:"RACK-A12",movedBy:"userCode",tenantCode:"tenantCode",toLocationCode:"USER:userCode"}}static get _classname(){return"InventoryMovement"}get isValid(){return super.isValid&&!!this.assetTag&&!!this.movedBy&&!!this.toLocationCode}getCode(){return this.inventoryMovementCode}update(e={}){return Object.keys(e).forEach(n=>{Ch.includes(n)&&(this[n]=e[n])}),this}}function Ah(t,e){const n=t||{};return n[e]?String(n[e]):nn.setCode()}const Sh=Object.freeze(Object.defineProperty({__proto__:null,InventoryAsset:yh,InventoryLocation:bh,InventoryMovement:Eh},Symbol.toStringTag,{value:"Module"}));({...dh,...mh,...Sh});const Oh=kt({name:"inventory-scanner",__name:"InventoryScanner",props:{assetApiClient:{type:Object,required:!1},assets:{type:Array,required:!1},currentUserCode:{type:String,required:!1}},emits:["moved","scan"],setup(t,{expose:e,emit:n}){e();const r=t,s=n,i=be(""),o=be([]),a=be(""),l=be(wt.PICKUP),u=be([]),c=Mt(()=>ol(r.currentUserCode||"currentUser")),f=Mt(()=>l.value===wt.PICKUP?"Source":"Destination");er(()=>[r.assets,c.value],U,{deep:!0,immediate:!0});function p(k){l.value=k,i.value="",q({message:`Mode changed to ${k}`,status:"INFO",title:"Mode"})}async function g(){const k=a.value.trim();k&&(a.value="",await O(k))}async function O(k){const H=rn(k);if(s("scan",{raw:k,parsed:H}),il(k)){i.value=H.code,q({message:`${f.value} set to ${H.code}`,status:"INFO",title:"Location"});return}if(!i.value){q({message:`Scan ${f.value.toLowerCase()} location first`,status:"FAILED",title:H.code});return}const he=E(H.code);try{if(r.assetApiClient?.move){const Ut=await r.assetApiClient.move(he),Pe=K(Ut);if(s("moved",he),D(he),Pe.length){q({message:j(Pe),status:"WARNING",title:H.code});return}}else s("moved",he),D(he);q({message:`${he.fromLocationCode||"-"} -> ${he.toLocationCode}`,status:"OK",title:H.code})}catch(Ut){q({message:x(Ut),status:"FAILED",title:H.code})}}function E(k){return l.value===wt.PICKUP?{assetTag:k,fromLocationCode:i.value,fromLocationKind:ot.REGISTERED,movementType:wt.PICKUP,toLocationCode:c.value,toLocationKind:ot.VIRTUAL}:{assetTag:k,fromLocationCode:c.value,fromLocationKind:ot.VIRTUAL,movementType:wt.DROPOFF,toLocationCode:i.value,toLocationKind:ot.REGISTERED}}function D(k){if(k.toLocationCode===c.value){B({assetTag:k.assetTag,currentLocationCode:c.value});return}o.value=o.value.filter(H=>H.assetTag!==k.assetTag)}function B(k){const H=o.value.findIndex(he=>he.assetTag===k.assetTag);if(H>=0){o.value[H]={...o.value[H],...k};return}o.value.unshift(k)}function U(){o.value=(r.assets||[]).map(P).filter(k=>!!k&&k.currentLocationCode===c.value)}function P(k){const H=k,he=R(H.assetTag);return he?{assetTag:he,category:R(H.category),currentLocationCode:R(H.currentLocationCode),name:R(H.name)}:null}function q({message:k,status:H,title:he}){u.value.unshift({key:`${Date.now()}-${Math.random()}`,message:k,status:H,title:he}),u.value=u.value.slice(0,30)}function R(k){return typeof k=="string"?k:""}function x(k){return k instanceof Error?k.message:String(k)}function K(k){return k?.data?.[0]?.warnings||[]}function j(k){return k.map(H=>`${H.code}: ${H.message}`).join("; ")}function se(){u.value=[]}const le={props:r,emit:s,activeLocationCode:i,basketItems:o,manualQr:a,mode:l,scanLog:u,holderLocationCode:c,locationLabel:f,setMode:p,submitManualQr:g,handleQr:O,getMovePayload:E,applyBasketMove:D,upsertBasketItem:B,syncBasketFromAssets:U,toBasketItem:P,addLog:q,getString:R,getErrorMessage:x,getMoveWarnings:K,formatWarnings:j,clearScanLog:se,get INVENTORY_MOVEMENT_TYPE(){return wt}};return Object.defineProperty(le,"__isScriptSetup",{enumerable:!1,value:!0}),le}}),jt=(t,e)=>{const n=t.__vccOpts||t;for(const[r,s]of e)n[r]=s;return n},Th={class:"inventory-scanner"},Rh={class:"inventory-scanner__mode"},xh={class:"inventory-scanner__state"},Ih={class:"inventory-scanner__manual"},Dh={class:"inventory-scanner__basket-header"},$h=["disabled"],Lh={class:"inventory-scanner__basket"},Nh={key:0,class:"inventory-scanner__empty"},Ph={class:"inventory-scanner__log"},Mh={key:0,class:"inventory-scanner__log-empty"};function kh(t,e,n,r,s,i){return X(),re("div",Th,[N("div",Rh,[N("button",{class:It(["inventory-scanner__mode-button",{"inventory-scanner__mode-button--active":r.mode===r.INVENTORY_MOVEMENT_TYPE.PICKUP}]),type:"button",onClick:e[0]||(e[0]=o=>r.setMode(r.INVENTORY_MOVEMENT_TYPE.PICKUP))}," Pickup ",2),N("button",{class:It(["inventory-scanner__mode-button",{"inventory-scanner__mode-button--active":r.mode===r.INVENTORY_MOVEMENT_TYPE.DROPOFF}]),type:"button",onClick:e[1]||(e[1]=o=>r.setMode(r.INVENTORY_MOVEMENT_TYPE.DROPOFF))}," Drop-off ",2)]),N("div",xh,[N("div",null,"Mode: "+oe(r.mode),1),N("div",null,oe(r.locationLabel)+": "+oe(r.activeLocationCode||"-"),1),N("div",null,"Holder: "+oe(r.holderLocationCode||"-"),1)]),N("div",Ih,[wn(N("input",{"onUpdate:modelValue":e[2]||(e[2]=o=>r.manualQr=o),class:"inventory-scanner__input",placeholder:"Scan or enter QR text",onKeyup:mf(r.submitManualQr,["enter"])},null,544),[[rr,r.manualQr]]),N("button",{type:"button",onClick:r.submitManualQr},"Submit")]),N("div",Dh,[N("div",null,[e[3]||(e[3]=N("strong",null,"My Basket",-1)),N("span",null,oe(r.basketItems.length)+" on hand",1)]),N("button",{type:"button",disabled:r.scanLog.length===0,onClick:r.clearScanLog}," Clear log ",8,$h)]),N("div",Lh,[r.basketItems.length===0?(X(),re("div",Nh," No items on hand ")):Ct("v-if",!0),(X(!0),re(ve,null,Pt(r.basketItems,o=>(X(),re("div",{key:o.assetTag,class:"inventory-scanner__basket-item"},[N("strong",null,oe(o.assetTag),1),N("small",null,oe(o.name||o.category||o.currentLocationCode),1)]))),128))]),N("div",Ph,[(X(!0),re(ve,null,Pt(r.scanLog,o=>(X(),re("div",{key:o.key,class:It(["inventory-scanner__log-item",{"inventory-scanner__log-item--failed":o.status==="FAILED","inventory-scanner__log-item--warning":o.status==="WARNING"}])},[N("div",null,[N("strong",null,oe(o.title),1),N("span",null,oe(o.status),1)]),N("small",null,oe(o.message),1)],2))),128))]),r.scanLog.length===0?(X(),re("div",Mh," Scan log will appear here ")):Ct("v-if",!0)])}const Fh=jt(Oh,[["render",kh],["__file","/Users/donlee/Developer/qw.q.inventory/src/components/InventoryScanner.vue"]]),jh=kt({name:"inventory-overview",__name:"InventoryOverview",props:{assetApiClient:{type:Object,required:!1},assets:{type:Array,required:!1},locations:{type:Array,required:!1}},emits:["selectAsset","selectLocation"],setup(t,{expose:e}){e();const n=t,r=be([]),s=Mt(()=>r.value.length>0?r.value:n.assets||[]);async function i(){n.assetApiClient?.findAll&&(r.value=await n.assetApiClient.findAll())}function o(c){return a(c,"id")||a(c,"assetTag")||JSON.stringify(c)}function a(c,f){return String(c?.[f]||"")}function l(c){const f=a(c,"currentLocationCode"),p=a(c,"currentLocationKind");if(!f)return"Never scanned";if(qn({locationCode:f,locationKind:p})||Qs(f))return`In transit - ${al(f)}`;const g=(n.locations||[]).find(O=>O.locationCode===f);return String(g?.name||f)}const u={props:n,loadedAssets:r,displayAssets:s,reload:i,getAssetKey:o,getAssetText:a,getDisplayLocation:l};return Object.defineProperty(u,"__isScriptSetup",{enumerable:!1,value:!0}),u}}),Uh={class:"inventory-overview"},Vh={class:"inventory-overview__rows"},Kh=["onClick"],Hh=["onClick"];function Bh(t,e,n,r,s,i){return X(),re("div",Uh,[N("div",{class:"inventory-overview__header"},[e[0]||(e[0]=N("div",null,"Assets",-1)),N("button",{type:"button",onClick:r.reload},"Reload")]),N("div",Vh,[(X(!0),re(ve,null,Pt(r.displayAssets,o=>(X(),re("button",{key:r.getAssetKey(o),class:"inventory-overview__row",type:"button",onClick:a=>t.$emit("selectAsset",o)},[N("span",null,oe(r.getAssetText(o,"assetTag")),1),N("span",null,oe(r.getAssetText(o,"name")),1),N("span",{class:"inventory-overview__location",onClick:_a(a=>t.$emit("selectLocation",r.getAssetText(o,"currentLocationCode")),["stop"])},oe(r.getDisplayLocation(o)),9,Hh)],8,Kh))),128))])])}const qh=jt(jh,[["render",Bh],["__file","/Users/donlee/Developer/qw.q.inventory/src/components/InventoryOverview.vue"]]),Wh=kt({name:"inventory-asset-detail",__name:"InventoryAssetDetail",props:{movementApiClient:{type:Object,required:!1},asset:{type:null,required:!1}},setup(t,{expose:e}){e();const n=t,r=be([]);async function s(){const u=i("assetTag");u&&n.movementApiClient?.findAll&&(r.value=await n.movementApiClient.findAll({assetTag:u}))}function i(u){return String(n.asset?.[u]||"")}function o(u){const c=u;return String(c.id||c.inventoryMovementCode||c.movedAt||JSON.stringify(u))}function a(u){const c=u;return`${c.fromLocationCode||"-"} -> ${c.toLocationCode||"-"}`}const l={props:n,history:r,loadHistory:s,getValue:i,getHistoryKey:o,getHistoryText:a};return Object.defineProperty(l,"__isScriptSetup",{enumerable:!1,value:!0}),l}}),Yh={class:"inventory-asset-detail"},Gh={key:0,class:"inventory-asset-detail__body"},Jh={key:1,class:"inventory-asset-detail__empty"};function zh(t,e,n,r,s,i){return X(),re("div",Yh,[n.asset?(X(),re("div",Gh,[N("h3",null,oe(r.getValue("assetTag")),1),N("div",null,oe(r.getValue("name")),1),N("div",null,oe(r.getValue("currentLocationCode")),1),N("button",{type:"button",onClick:r.loadHistory},"Load History"),(X(!0),re(ve,null,Pt(r.history,o=>(X(),re("div",{key:r.getHistoryKey(o),class:"inventory-asset-detail__history"},oe(r.getHistoryText(o)),1))),128))])):(X(),re("div",Jh,"No asset selected"))])}const Qh=jt(Wh,[["render",zh],["__file","/Users/donlee/Developer/qw.q.inventory/src/components/InventoryAssetDetail.vue"]]),Xh=kt({name:"inventory-location-detail",__name:"InventoryLocationDetail",props:{assetApiClient:{type:Object,required:!1},location:{type:null,required:!1}},setup(t,{expose:e}){e();const n=t,r=be([]),s=Mt(()=>typeof n.location=="string"?n.location:String(n.location?.locationCode||""));async function i(){s.value&&n.assetApiClient?.findAll&&(r.value=await n.assetApiClient.findAll({currentLocationCode:s.value}))}function o(u){const c=u;return String(c.id||c.assetTag||JSON.stringify(u))}function a(u){const c=u;return`${c.assetTag||""} ${c.name||""}`.trim()}const l={props:n,assets:r,locationCode:s,loadAssets:i,getAssetKey:o,getAssetText:a};return Object.defineProperty(l,"__isScriptSetup",{enumerable:!1,value:!0}),l}}),Zh={class:"inventory-location-detail"},ep={class:"inventory-location-detail__header"},tp=["disabled"];function np(t,e,n,r,s,i){return X(),re("div",Zh,[N("div",ep,[N("div",null,oe(r.locationCode||"No location selected"),1),N("button",{type:"button",disabled:!r.locationCode,onClick:r.loadAssets},"Load Assets",8,tp)]),(X(!0),re(ve,null,Pt(r.assets,o=>(X(),re("div",{key:r.getAssetKey(o),class:"inventory-location-detail__asset"},oe(r.getAssetText(o)),1))),128))])}const rp=jt(Xh,[["render",np],["__file","/Users/donlee/Developer/qw.q.inventory/src/components/InventoryLocationDetail.vue"]]),sp=kt({name:"inventory-location-admin",__name:"InventoryLocationAdmin",props:{locations:{type:Array,required:!1}},emits:["saveLocation"],setup(t,{expose:e,emit:n}){e();const r=n,s=Ar({locationCode:"",locationType:"",name:""});function i(){r("saveLocation",{...s}),s.locationCode="",s.locationType="",s.name=""}function o(u){const c=u;return String(c.id||c.locationCode||JSON.stringify(u))}function a(u){const c=u;return`${c.locationCode||""} ${c.name||""}`.trim()}const l={emit:r,form:s,submit:i,getLocationKey:o,getLocationText:a};return Object.defineProperty(l,"__isScriptSetup",{enumerable:!1,value:!0}),l}}),ip={class:"inventory-location-admin"};function op(t,e,n,r,s,i){return X(),re("div",ip,[N("form",{class:"inventory-location-admin__form",onSubmit:_a(r.submit,["prevent"])},[wn(N("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>r.form.locationCode=o),placeholder:"Location code"},null,512),[[rr,r.form.locationCode]]),wn(N("input",{"onUpdate:modelValue":e[1]||(e[1]=o=>r.form.name=o),placeholder:"Name"},null,512),[[rr,r.form.name]]),wn(N("input",{"onUpdate:modelValue":e[2]||(e[2]=o=>r.form.locationType=o),placeholder:"Type"},null,512),[[rr,r.form.locationType]]),e[3]||(e[3]=N("button",{type:"submit"},"Save",-1))],32),(X(!0),re(ve,null,Pt(n.locations,o=>(X(),re("div",{key:r.getLocationKey(o),class:"inventory-location-admin__row"},oe(r.getLocationText(o)),1))),128))])}const ap=jt(sp,[["render",op],["__file","/Users/donlee/Developer/qw.q.inventory/src/components/InventoryLocationAdmin.vue"]]),lp=kt({name:"q-inventory",__name:"QInventory",props:{assetApiClient:{type:Object,required:!1},locationApiClient:{type:Object,required:!1},movementApiClient:{type:Object,required:!1},assets:{type:Array,required:!1},currentUserCode:{type:String,required:!1},locations:{type:Array,required:!1}},emits:["moved","saveLocation","scan","selectAsset","selectLocation"],setup(t,{expose:e,emit:n}){e();const r=t,s=n,i=be("scanner"),o=be(null),a=be(null),l=Mt(()=>[{key:"scanner",label:"Scan"},{key:"overview",label:"Overview"},{key:"asset",label:"Asset"},{key:"location",label:"Location"},{key:"locations",label:"Locations"}]);function u(E){s("moved",E)}function c(E){s("scan",E)}function f(E){s("saveLocation",E)}function p(E){o.value=E,i.value="asset",s("selectAsset",E)}function g(E){a.value=E,i.value="location",s("selectLocation",E)}const O={props:r,emit:s,activeTab:i,selectedAsset:o,selectedLocation:a,tabs:l,onMoved:u,onScan:c,onSaveLocation:f,onSelectAsset:p,onSelectLocation:g,InventoryScanner:Fh,InventoryOverview:qh,InventoryAssetDetail:Qh,InventoryLocationDetail:rp,InventoryLocationAdmin:ap};return Object.defineProperty(O,"__isScriptSetup",{enumerable:!1,value:!0}),O}}),cp={class:"q-inventory"},up={class:"q-inventory__toolbar"},fp=["onClick"];function dp(t,e,n,r,s,i){return X(),re("div",cp,[N("div",up,[(X(!0),re(ve,null,Pt(r.tabs,o=>(X(),re("button",{key:o.key,class:It(["q-inventory__tab",{"q-inventory__tab--active":r.activeTab===o.key}]),type:"button",onClick:a=>r.activeTab=o.key},oe(o.label),11,fp))),128))]),wn(Fe(r.InventoryScanner,{"asset-api-client":n.assetApiClient,assets:n.assets,"current-user-code":n.currentUserCode,onMoved:r.onMoved,onScan:r.onScan},null,8,["asset-api-client","assets","current-user-code"]),[[Gu,r.activeTab==="scanner"]]),r.activeTab==="overview"?(X(),gn(r.InventoryOverview,{key:0,"asset-api-client":n.assetApiClient,assets:n.assets,locations:n.locations,onSelectAsset:r.onSelectAsset,onSelectLocation:r.onSelectLocation},null,8,["asset-api-client","assets","locations"])):Ct("v-if",!0),r.activeTab==="asset"?(X(),gn(r.InventoryAssetDetail,{key:1,"movement-api-client":n.movementApiClient,asset:r.selectedAsset},null,8,["movement-api-client","asset"])):Ct("v-if",!0),r.activeTab==="location"?(X(),gn(r.InventoryLocationDetail,{key:2,"asset-api-client":n.assetApiClient,location:r.selectedLocation},null,8,["asset-api-client","location"])):Ct("v-if",!0),r.activeTab==="locations"?(X(),gn(r.InventoryLocationAdmin,{key:3,locations:n.locations,onSaveLocation:r.onSaveLocation},null,8,["locations"])):Ct("v-if",!0)])}const hp=jt(lp,[["render",dp],["__file","/Users/donlee/Developer/qw.q.inventory/src/components/QInventory.vue"]]);class Pr{constructor(e={}){this.axios=e.axios,this.authenticatorTokenProvider=e.authenticatorTokenProvider,this.baseURL=(e.baseURL||"").replace(/\/$/,""),this.movedBy=e.movedBy||"currentUser",this.qRepo=e.qRepo,this.tenantCode=e.tenantCode||"tenantCode",this.userTokenProvider=e.userTokenProvider}async get(e,n={}){const r=await this.getAuthHeaders();if(this.axios){const o=await this.axios.get(this.getUrl(e),{headers:r,params:n});return eo(o.data)}const s=new URL(this.getUrl(e),pp());Object.entries(n).forEach(([o,a])=>{typeof a<"u"&&a!==null&&a!==""&&s.searchParams.set(o,String(a))});const i=await fetch(this.getFetchUrl(s),{headers:r});return eo(await i.json(),i)}async post(e,n={}){const r={"Content-Type":"application/json",...await this.getAuthHeaders()};if(this.axios){const i=await this.axios.post(this.getUrl(e),n,{headers:r});return Os(i.data)}const s=await fetch(this.getUrl(e),{body:JSON.stringify(n),headers:r,method:"POST"});return Os(await s.json(),s)}getUrl(e){return`${this.baseURL}/api/v1${e}`}getFetchUrl(e){return this.baseURL?e.toString():`${e.pathname}${e.search}`}withDefaults(e={}){return yp({...e,qRepo:e.qRepo||this.qRepo,tenantCode:e.tenantCode||this.tenantCode})}async getAuthHeaders(){const e={},n=await Zi(this.authenticatorTokenProvider),r=await Zi(this.userTokenProvider);return n&&(e["X-Q-Authenticator"]=n),r&&(e["X-Q-Inventory-User-Token"]=r),e}}async function Zi(t){return t?t():""}function Os(t,e){const n=t,r=n?.err,s=n?.errors;if(e&&!e.ok||r?.hasError||s)throw new Error(mp({data:n,err:r,errors:s,response:e}));return n}function eo(t,e){const n=Os(t,e);return Array.isArray(n?.data)?n.data:[]}function pp(){return typeof window<"u"?window.location.origin:"http://localhost"}function mp({data:t,err:e,errors:n,response:r}){const s=String(r?.status||e?.statusCode||e?.code||n?.name||t?.code||"REQUEST_ERROR"),i=gp(e?.message||n?.message||t?.message||"QInventory request failed");return`${s}: ${i}`}function gp(t){return Array.isArray(t)?t.join("; "):String(t)}function yp(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>typeof e<"u"&&e!==null&&e!==""))}class _p extends Pr{constructor(e={}){super(e)}async findAll(e={}){return this.get("/qInventoryAsset",this.withDefaults(e))}async findOne(e){return this.get(`/qInventoryAsset/${encodeURIComponent(e)}`,this.withDefaults())}async saveOne(e){return this.post("/qInventoryAsset",this.withDefaults(e))}async move(e){const n=String(e.assetTag||""),r=e.movedBy||this.movedBy;return this.post(`/qInventoryAsset/${encodeURIComponent(n)}/move`,this.withDefaults({...e,movedBy:r}))}}class vp extends Pr{constructor(e={}){super(e)}async findAll(e={}){return this.get("/qInventoryLocation",this.withDefaults(e))}async findOne(e){return this.get(`/qInventoryLocation/${encodeURIComponent(e)}`,this.withDefaults())}async saveOne(e){return this.post("/qInventoryLocation",this.withDefaults(e))}}class bp extends Pr{constructor(e={}){super(e)}async findAll(e={}){const n=String(e.assetTag||"");if(!n)throw new Error("assetTag is required for movement findAll");const{assetTag:r,...s}=e;return this.get(`/qInventoryAsset/${encodeURIComponent(n)}/movements`,this.withDefaults(s))}}class wp extends Pr{constructor(e={}){super(e)}async getBrowserToken(){return(await this.post("/qInventory/token",{clientAppId:"qInventoryBrowser",clientAppName:"qInventoryBrowser"})).data?.[0]}async requestLoginLink({email:e,tenantCode:n=this.tenantCode}){return(await this.post("/qInventory/login-link",{email:e,tenantCode:n})).data?.[0]}async verifyLoginToken(e){return(await this.post("/qInventory/login-token/verify",{loginToken:e})).data?.[0]}}const Cp=kt({__name:"App",setup(t,{expose:e}){e();const n=P(),r=be([]),s=be(""),i=be([]),o=be(""),a=be(n.currentUserCode);let l=null;const u={authenticatorTokenProvider:B,baseURL:n.baseURL,movedBy:a.value,qRepo:n.qRepo,tenantCode:n.tenantCode,userTokenProvider:U},c=new wp({baseURL:n.baseURL,tenantCode:n.tenantCode}),f=new _p(u),p=new vp(u),g=new bp(u),O=Mt(()=>{const x=n.qRepo?`repo=${n.qRepo}`:"repo=mongo";return`${n.baseURL||"same-origin"} / ${n.tenantCode} / ${x}`});async function E(){try{s.value="";const[x,K]=await Promise.all([f.findAll(),p.findAll()]);r.value=x,i.value=K}catch(x){s.value=x instanceof Error?x.message:String(x)}}async function D(){const K=new URLSearchParams(window.location.search).get("loginToken");if(!K)return;const j=await c.verifyLoginToken(K);if(!j)throw new Error("Unable to verify qInventory login token");window.localStorage.setItem("qInventoryUserToken",j.userToken),window.localStorage.setItem("currentUserCode",j.userCode),window.localStorage.setItem("tenantCode",j.tenantCode),a.value=j.userCode,f.movedBy=j.userCode,f.tenantCode=j.tenantCode,p.tenantCode=j.tenantCode,g.tenantCode=j.tenantCode,o.value=`Signed in as ${j.email}`}async function B(){if(n.qRepo==="mockup")return"";const x=Math.floor(Date.now()/1e3);if(l&&l.tokenExpiry>x+30)return l.token;const K=window.localStorage.getItem("qInventoryAuthenticatorToken"),j=Number(window.localStorage.getItem("qInventoryAuthenticatorTokenExpiry")||0);if(K&&j>x+30)return l={token:K,tokenExpiry:j},K;const se=await c.getBrowserToken();if(!se?.token)throw new Error("Unable to get qInventory browser token");return l=se,window.localStorage.setItem("qInventoryAuthenticatorToken",se.token),window.localStorage.setItem("qInventoryAuthenticatorTokenExpiry",String(se.tokenExpiry)),se.token}function U(){return window.localStorage.getItem("qInventoryUserToken")||""}function P(){const x=new URLSearchParams(window.location.search);return{baseURL:q(x,"qInventoryBaseURL",""),currentUserCode:q(x,"currentUserCode","currentUser"),qRepo:q(x,"qRepo",""),tenantCode:q(x,"tenantCode","tenantCode")}}function q(x,K,j){return x.get(K)||window.localStorage.getItem(K)||j}Ko(async()=>{try{await D(),await E()}catch(x){s.value=x instanceof Error?x.message:String(x)}});const R={appConfig:n,assets:r,errorMessage:s,locations:i,loginMessage:o,currentUserCode:a,get browserTokenCache(){return l},set browserTokenCache(x){l=x},repoOptions:u,authApiClient:c,assetApiClient:f,locationApiClient:p,movementApiClient:g,backendLabel:O,reload:E,initializeUserLogin:D,getBrowserToken:B,getUserToken:U,getAppConfig:P,getConfigValue:q,QInventory:hp};return Object.defineProperty(R,"__isScriptSetup",{enumerable:!1,value:!0}),R}}),Ep={class:"q-inventory-app"},Ap={class:"q-inventory-app__header"},Sp={key:0,class:"q-inventory-app__error"},Op={key:1,class:"q-inventory-app__notice"};function Tp(t,e,n,r,s,i){return X(),re("main",Ep,[N("header",Ap,[N("div",null,[e[0]||(e[0]=N("h1",null,"Q Inventory",-1)),N("p",null,oe(r.backendLabel),1)]),N("button",{type:"button",onClick:r.reload},"Reload")]),r.errorMessage?(X(),re("div",Sp,oe(r.errorMessage),1)):Ct("v-if",!0),r.loginMessage?(X(),re("div",Op,oe(r.loginMessage),1)):Ct("v-if",!0),Fe(r.QInventory,{"asset-api-client":r.assetApiClient,"location-api-client":r.locationApiClient,"movement-api-client":r.movementApiClient,assets:r.assets,"current-user-code":r.currentUserCode,locations:r.locations,onMoved:r.reload,onSaveLocation:r.reload},null,8,["asset-api-client","location-api-client","movement-api-client","assets","current-user-code","locations"])])}const Rp=jt(Cp,[["render",Tp],["__file","/Users/donlee/Developer/qw.q.inventory/app/qInventory/App.vue"]]);_f(Rp).mount("#app");
@@ -0,0 +1,13 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
6
+ <title>Q Inventory</title>
7
+ <script type="module" crossorigin src="/qInventory/assets/q-inventory-app.js"></script>
8
+ <link rel="stylesheet" crossorigin href="/qInventory/assets/q-inventory-app.css">
9
+ </head>
10
+ <body>
11
+ <div id="app"></div>
12
+ </body>
13
+ </html>