@questwork/vue-q-widget-vue3 3.1.6 → 3.1.7

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.
@@ -1,35 +1,35 @@
1
1
  /*! For license information please see q-widget.min.js.LICENSE.txt */
2
- ;(function(gt,g){
2
+ ;(function(Ct,p){
3
3
  if (typeof exports == "object" && typeof module < "u") { // for commonjs
4
4
  const returns = {}
5
- g(returns, require("vue"));
5
+ p(returns, require("vue"));
6
6
  module.exports = returns;
7
7
  exports.QWidget = returns.QWidget;
8
8
  }
9
9
  else if (typeof define == "function" && define.amd) { // for amd
10
- define(["exports", "vue"], g);
10
+ define(["exports", "vue"], p);
11
11
  }
12
12
  else { // for browser script tag
13
- gt = (typeof globalThis < "u") ? globalThis : gt || self;
14
- g(gt.QWidget={},gt.Vue);
13
+ Ct = (typeof globalThis < "u") ? globalThis : Ct || self;
14
+ p(Ct.QWidget={},Ct.Vue);
15
15
  }
16
- })(this,function(gt,g){"use strict";const ee=(l,s)=>{const i=l.__vccOpts||l;for(const[m,d]of s)i[m]=d;return i},Il={name:"q-widget-q-modal",props:{modal:{type:Object,default:()=>({})}},data(){return{}},computed:{body(){return this.modal.body},css(){return this.modal.css},countdown(){return this.modal.countdown},label(){return this.modal.label},model(){return this.modal.model},onCancel(){return this.modal.onCancel},onClose(){return this.modal.onClose},onConfirm(){return this.modal.onConfirm},title(){return this.modal.title}},methods:{onFinish(){this.modal.onFinish()},qForm(l){this.modal.qForm(l)},qList(l){this.modal.qList(l)}}},Dl={class:"q-widget-q-modal __modal"};function Pl(l,s,i,m,d,c){const v=g.resolveComponent("q-modal",!0);return g.openBlock(),g.createElementBlock("div",Dl,[g.createVNode(v,{body:c.body,countdown:c.countdown,css:c.css,label:c.label,model:c.model,onCancel:c.onCancel,onClose:c.onClose,onConfirm:c.onConfirm,title:c.title,onOnFinish:c.onFinish,onQForm:c.qForm,onQList:c.qList},null,8,["body","countdown","css","label","model","onCancel","onClose","onConfirm","title","onOnFinish","onQForm","onQList"])])}const Fl=ee(Il,[["render",Pl],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/QModal.vue"]]);function Wl({controller:l,state:s,saveControllerState:i}){const{saveStateKeys:m=[]}=l,d=m.reduce((c,v)=>({...c,...Ki({keys:v.split("."),obj:s})}),{});return i({data:d})}function Ki({keys:l,obj:s}){const i=l.shift();return{[i]:l.length===0?s[i]:Ki({keys:l,obj:s[i]})}}function Ut({component:l,message:s,modalConfig:i={}}){const{countdown:m,label:d,title:c,canClose:v=!0}=i,A={body:[{customComponentName:"q-modal-region-tool-html",html:s}],countdown:m,label:d,onClose:v?()=>{l.modal=null}:null,title:c||"Error"};l.modal=A}class Ul{static exec({config:s,keys:i,permissions:m}){Array.isArray(s)||console.log("can not handle these buttons");const d=i.shift();return i.length!==0&&console.log(`can not handle ${i.join(".")}`),Ml({buttons:s,key:d,permissions:m})}}function Ml({buttons:l,key:s,permissions:i}){return l.map(m=>{if(Ql(s,m)){const d=m.permissions||[];return{...m,permissions:[...d,...i]}}return m})}function Ql(l,s){const{buttonType:i,id:m,label:d}=s;return l===m||l===d||l===i}class Vl{static exec({config:s,keys:i,permissions:m}){return pr({layout:s,keys:i,permissions:m})}}function pr({layout:l,keys:s,permissions:i}){const m=s[0],{children:d,permissions:c}=l;if(Kl(m,l)){if(s.shift(),s.length===0)return{...l,permissions:[...c||[],...i]};if(Array.isArray(d))return{...l,children:d.map(v=>pr({layout:v,keys:[...s],permissions:i}))};console.log(`can not handle ${s.join(".")}`)}return Array.isArray(d)?{...l,children:d.map(v=>pr({layout:v,keys:[...s],permissions:i}))}:l}function Kl(l,s){const{id:i,name:m}=s;return l===i||l===m}class zl{static exec({config:s,keys:i,permissions:m}){const d=i.shift();let c=null;switch(d){case"buttons":{c=Ul;break}case"layout":{c=Vl;break}default:{c=null;break}}return!c||typeof c.exec!="function"?s:{...s,[d]:c.exec({config:s[d],keys:[...i],permissions:m})}}}class Gl{static exec({config:s,keys:i,permissions:m}){Array.isArray(s)||console.log("can not handle these actions");const d=i.shift();return i.length!==0&&console.log(`can not handle ${i.join(".")}`),Yl({actions:s,key:d,permissions:m})}}function Yl({actions:l,key:s,permissions:i}){return l.map(m=>{if(Zl(s,m)){const d=m.permissions||[];return{...m,permissions:[...d,...i]}}return m})}function Zl(l,s){const{id:i,label:m}=s;return l===i||l===m}class Xl{static exec({config:s,keys:i,permissions:m}){const d=i.shift();switch(d){case"actions":return{...s,actions:Jl({actions:s[d],keys:i,permissions:m})};default:return s}}}function Jl({actions:l,keys:s,permissions:i}){Array.isArray(l)||console.log("can not handle these actions");const m=s.shift();return s.length!==0?(console.log(`can not handle ${s.join(".")}`),l):l.map(d=>{if(jl(m,d)){const c=d.permissions||[];return{...d,permissions:[...c,...i]}}return d})}function jl(l,s){const{id:i,label:m}=s;return l===i||l===m}class ea{static exec({config:s,keys:i,permissions:m}){return Array.isArray(s)||console.log("can not handle these actions"),zi({headers:s,keys:i,permissions:m})}}function zi({headers:l,keys:s,permissions:i}){const m=s.shift();return l.map(d=>{if(ta(m,d)){const{permissions:c,children:v}=d;return s.length!==0?Array.isArray(v)&&v.length>0?{...d,children:zi({headers:v,keys:s,permissions:i})}:(console.log(`can not handle ${s.join(".")}`),d):{...d,permissions:[...c||[],...i]}}return d})}function ta(l,s){const{id:i,label:m,key:d}=s;return l===i||l===m||l===d}class na{static exec({config:s,keys:i,permissions:m}){const d=i.shift();let c=null;switch(d){case"actions":{c=Gl;break}case"bulkAction":{c=Xl;break}case"headers":{c=ea;break}default:{c=null;break}}return!c||typeof c.exec!="function"?s:{...s,[d]:c.exec({config:s[d],keys:[...i],permissions:m})}}}const ra={ElementQForm:zl,ElementQList:na};function ia({config:l,configPermissions:s=[],type:i}){return s.reduce((d,c)=>{const v=sa(i);if(!v||typeof v.exec!="function")return console.log("no config handler"),d;const{key:A,value:R}=c;return v.exec({config:d,keys:A.split("."),permissions:R})},l)}function sa(l){return ra[l]||null}function oa(l,s=/\$\{(.+?)\}/g,i,m){if(!l||typeof m!="function")return"";const d=new RegExp(s,"g");return l.replace(d,(c,v)=>{const A=m({keys:v.split("."),obj:i});return A==null?"":typeof A=="object"?JSON.stringify(A):A})}function _r(l,s,i,m){if(!l)return!0;if(typeof i!="function"||typeof m!="function")return!1;const{key:d="",value:c,keyValuePath:v=""}=l,[A]=Object.keys(c);if(!d)switch(A){case"$and":return c.$and.reduce((B,P)=>B&&_r(P,s,i),!0);case"$or":return c.$or.reduce((B,P)=>B||_r(P,s,i),!1);default:return!1}let R=i(d,s);if(v){console.log("keyValuePath",v);const q=m.toObject(R);R=i(v,q)}switch(A){case"$empty":return R==null===c.$empty;case"$eq":return R===c.$eq;case"$gt":return R>c.$gt;case"$gte":return R>=c.$gte;case"$lt":return R<c.$lt;case"$lte":return R<=c.$lte;case"$in":return Array.isArray(R)?!!R.find(q=>c.$in.includes(q)):typeof R!="object"?!!c.$in.includes(R):!1;case"$inValue":{const q=i(c.$inValue,s),B=Array.isArray(q)?q:[];return Array.isArray(R)?!!R.find(P=>B.includes(P)):typeof R=="string"?!!B.includes(R):!1}case"$ne":return R!==c.$ne;case"$notIn":return Array.isArray(R)?!R.find(q=>c.$notIn.includes(q)):typeof R!="object"?!c.$notIn.includes(R):!1;case"$notInValue":{const q=i(c.$notInValue,s),B=Array.isArray(q)?q:[];return Array.isArray(R)?!R.find(P=>B.includes(P)):typeof R!="object"?!B.includes(R):!1}case"$range":{const[q,B]=c.$range;return typeof q=="number"&&typeof B=="number"&&R>=q&&R<=B}default:return!1}}function Gi(l,s){if(l.length===0)return s;const i=l.shift();return s&&Object.prototype.hasOwnProperty.call(s,i)?Gi(l,s[i]):s&&i?s[i]:s}class Ve{constructor(s={}){s=s||{},this.key=s.key||null,this.value=typeof s.value<"u"?s.value:""}static addItem(s,i,m){s.push({key:i,value:m})}static addRecord(s=[],i,m){const d=this;return Ve.hasKeyValue(s,i,m)||s.push(d.init({key:i,value:m})),s}static fromObject(s={}){const i=this;return Object.keys(s).reduce((m,d)=>(m.push(i.init({key:d,value:s[d]})),m),[])}static removeByKey(s,i){return s.reduce((m,d)=>(d.key!==i&&m.push(d),m),[])}static getValuesByKey(s=[],i){return s.reduce((m,d)=>(d.key===i&&m.push(d.value),m),[])}static hasKeyValue(s=[],i,m){return typeof m>"u"?s.filter(d=>d.key===i).length>0:s.filter(d=>d.key===i&&d.value===m).length>0}static init(s={}){if(s instanceof Ve)return s;const i=new Ve(s);return i.isValid?i:null}static initFromArray(s=[]){const i=this;return Array.isArray(s)?s.map(i.init):[]}static initOnlyValidFromArray(s=[]){return this.initFromArray(s).filter(i=>i)}static keys(s=[]){return Array.isArray(s)?s.reduce((i,m)=>(i.push(m.key),i),[]):[]}static toObject(s=[]){return Array.isArray(s)?s.reduce((i,m)=>(i[m.key]=m.value,i),{}):{}}static toString(s=[],i="; "){return Array.isArray(s)?s.reduce((m,d)=>(m.push(`${d.key}: ${d.value}`),m),[]).join(i):""}static updateRecord(s=[],i,m){return s.map(d=>(d.key===i&&(d.value=m),d))}static updateOrInsertRecord(s=[],i,m){const d=this;let c=[...s];return d.hasKeyValue(s,i)?c=d.updateRecord(s,i,m):c.push(d.init({key:i,value:m})),c}static updateRecordsFromArray(s=[],i=[]){if(Array.isArray(s)&&Array.isArray(i)){const m=Ve.toObject(s),d=Ve.toObject(i);return Ve.fromObject(Object.assign({},m,d))}return[]}static values(s=[]){return Array.isArray(s)?s.reduce((i,m)=>(i.push(m.value),i),[]):[]}get isValid(){return!!this.key}get toObject(){const s={};return this.isValid&&(s[this.key]=this.value),s}}function yn({keys:l,obj:s}){return Gi(l,s)}function la(l,s,i){return oa(l,s,i,yn)}function vr({rule:l,data:s}){return _r(l,s,aa,Ve)}function aa(l,s){const i=l.split(".");return yn({keys:i,obj:s})}function yr(l,s){return ua(l,s,yn,vr)}function ua(l,s,i,m){return!Array.isArray(l)||l.length===0?"":l.reduce((d,c)=>{const{type:v,value:A="",restriction:R,template:q}=c;if(m({rule:R,data:s}))switch(v){case"label":{d+=A.toString();break}case"value":{const B=i({keys:A.split("."),obj:s})||"";d+=B.toString();break}case"array":{const B=i({keys:A.split("."),obj:s})||[];d+=B.reduce((P,be)=>P+=yr(q,be),"");break}case"group":{d+=yr(q,s);break}case"ellipsis":{const{maxLength:B}=c,P=i({keys:A.split("."),obj:s})||"";P.length<=B?d+=P.toString():d+=`${P.substr(0,B)}...`;break}default:{d+=A.toString();break}}return d},"")}function Cr(l){return`${l}-${Math.floor(Math.random()*1e9)}`}const ca=Object.freeze(Object.defineProperty({__proto__:null,KeyValueObject:Ve,convertString:la,getStringByArr:yr,getValidation:vr,getValueByKeys:yn,setId:Cr},Symbol.toStringTag,{value:"Module"}));class wr{constructor(s={}){this.css=s.css,this.configType="Config"}get isValid(){return!!this}static init(s){const i=new this(s);return i.isValid?i:null}}function fa(l,s){const{button:i,klass:m}=l,{element:d}=s,c=d.getState()||{},{formData:v={}}=c;class A extends m{constructor(q){super(q),this.hidden=q.hidden||!1,this.permissionResult=q.permissionResult,this.permissionResultHandler(this.permissionResult)}get isValid(){return!this.hidden&&super.isValid}static init(q,B){if(q instanceof A)return q;const P=q.permissions?B.permissionHandler(q.permissions,v):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},be=new A({...q,permissionResult:P});return be.isValid?be:null}permissionResultHandler(q){const{event:B,isAllowCreate:P,isAllowRead:be,isAllowUpdate:$e,isAllowDelete:Fe}=q;B?typeof this[B]=="function"?this[B]({val:!0}):console.log(`do not have the event ${B}`):P&&be&&$e&&Fe||this.setHidden({val:!0})}setDisabled({val:q}){this.disabled=q}setHidden({val:q}){this.hidden=q}}return A.init(i,s)}function da(l,s){const{layout:i,klass:m}=l,{element:d}=s,c=d.getState()||{},{formData:v={}}=c;class A extends m{constructor(B){super(B),this.permissionResult=B.permissions?s.permissionHandler(B.permissions,v):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},this.permissionResultHandler(this.permissionResult)}permissionResultHandler(B){const{event:P,isAllowCreate:be,isAllowRead:$e,isAllowUpdate:Fe,isAllowDelete:Kt}=B;P?typeof this[P]=="function"?this[P]({val:!0}):console.log(`do not have the event ${P}`):$e?Fe||this.setPreview({val:!0}):this.setHidden({val:!0}),Array.isArray(this.children)&&this.children.forEach(pe=>{pe.permissionResultHandler(B)})}setDecoratorDisabled({val:B}){this.setDisabled({val:B})}setDecoratorHidden({val:B}){this.setHidden({val:B})}setDecoratorPreview({val:B}){this.setPreview({val:B})}}return A.init(i)}function ha(l){return s=>{const{type:i}=s;switch(i){case"button":return fa(s,l);case"node":return da(s,l);default:return null}}}class Yi extends wr{constructor(s={}){super(s),this.configType="ElementQFormConfig",this.buttons=s.buttons,this.css=s.css||{},this.disabledForm=s.disabledForm||!1,this.eventName=s.eventName||{},this.formHandler=ha(s.helpers),this.layout=s.layout,this.previewForm=s.previewForm||!1,this.updateLayoutConfigs=s.updateLayoutConfigs||[]}get isValid(){return!!this}static init(s){const i=new this(s);return i.isValid?i:null}}function ga({helpers:l}){const{element:s}=l,{getClasses:i}=s.getHandlers(),{Cell:m}=l.qGrid;class d extends m{constructor(v){super(v),typeof v.hidden=="function"?this.permissionHidden=v.hidden(this.item.item,this):this.permissionHidden=v.hidden||!1,this.permissionResult=v.permissionResult,this.permissionResultHandler(this.permissionResult,v.customComponentName)}get isValid(){return this.permissionHidden===!1}static init(v){const{permissions:A}=v,R=A?l.permissionHandler(A):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},q=new this({...v,permissionResult:R});return q.isValid?q:null}permissionResultHandler(v,A){const{event:R,isAllowCreate:q,isAllowRead:B,isAllowUpdate:P,isAllowDelete:be}=v;if(R){typeof this[R]=="function"?this[R]({val:!0}):console.log(`do not have the event ${R}`);return}(!(A==="q-grid-body-row-cell-button")&&!B||!(q&&B&&P&&be))&&this.setHidden({val:!0})}setHidden({val:v}){this.permissionHidden=v}}return typeof i!="function"?{Cell:d}:i({helpers:{Cell:d,...l}})}class Zi extends wr{constructor(s={}){super(s),this.configType="ElementQGridConfig",this.classes=ga({helpers:s.helpers}),this.converter=ma({helpers:s.helpers}),this.eventName=s.eventName,this.layout=s.layout,this.fillLastRow=s.fillLastRow,this.placeholder=s.placeholder,this.urlDelegate=s.urlDelegate}get isValid(){return!!this}static init(s){const i=new this(s);return i.isValid?i:null}}function ma({helpers:l}){const{element:s}=l,{converter:i}=s.getHandlers();if(typeof i!="function")return d=>d;const{QItem:m}=l.qGrid;return i({helpers:{QItem:m,...l}})}function pa({helpers:l}){const{QListBulkButton:s}=l.qList,{getValidation:i}=l.qUtilities;class m extends s{constructor(c){super(c),this.hidden=c.hidden||!1,this.permissionResult=c.permissionResult,this.permissionResultHandler(this.permissionResult)}get isValid(){return!this.hidden}static init(c,v){if(c instanceof m)return c;const{restriction:A,permissions:R}=c,q=v.controller.getState();if(!i({rule:A,data:q}))return null;const B=R?v.permissionHandler(R):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},P=new m({...c,permissionResult:B});return P.isValid?P:null}static initFromArray(c,v){return Array.isArray(c)?c.map(A=>this.init(A,v)):[]}static initOnlyValidFromArray(c,v){return this.initFromArray(c,v).filter(A=>A)}permissionResultHandler(c){const{event:v,isAllowCreate:A,isAllowRead:R,isAllowUpdate:q,isAllowDelete:B}=c;v?typeof this[v]=="function"?this[v]({val:!0}):console.log(`do not have the event ${v}`):A&&R&&q&&B||this.setHidden({val:!0})}setHidden({val:c}){this.hidden=c}}return m}function _a({helpers:l}){const{QListButton:s}=l.qList;class i extends s{constructor(d){super(d),this.endpoint=Xi(d.endpoint,d.qRow),this.httpMethod=d.httpMethod,this.hidden=d.hidden||!1,this.permissionResult=d.permissionResult,this.permissionResultHandler(this.permissionResult),this.url=Xi(d.url,d.qRow)}get isValid(){return!this.hidden&&super.isValid}static init(d,c){if(d instanceof i)return d;const v=d.permissions?c.permissionHandler(d.permissions,d.qRow.get()):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},A=new i({...d,permissionResult:v});return A.isValid?A:null}static initFromArray(d,c){return Array.isArray(d)?d.map(v=>this.init(v,c)):[]}static initOnlyValidFromArray(d,c){return this.initFromArray(d,c).filter(v=>v)}permissionResultHandler(d){const{event:c,isAllowCreate:v,isAllowRead:A,isAllowUpdate:R,isAllowDelete:q}=d;c?typeof this[c]=="function"?this[c]({val:!0}):console.log(`do not have the event ${c}`):v&&A&&R&&q||this.setHidden({val:!0})}setHidden({val:d}){this.hidden=d}}return i}function Xi(l,s){if(!l)return"";const i=/\$\{(.+?)\}/g;return l.replace(i,(m,d)=>s.get(d.trim()))}function va(){class l{constructor(i){Object.keys(i).forEach(m=>{this[m]=i[m]}),this.hidden=i.hidden||!1,this.permissionResult=i.permissionResult,this.permissionResultHandler(this.permissionResult)}get isValid(){return!this.hidden}static init(i,m){if(i instanceof l)return i;const{children:d,permissions:c}=i,v=c?m.permissionHandler(c):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},A=new l({...i,children:Array.isArray(d)?this.initOnlyValidFromArray(d,m):null,permissionResult:v});return A.isValid?A:null}static initFromArray(i,m){return Array.isArray(i)?i.map(d=>this.init(d,m)):[]}static initOnlyValidFromArray(i,m){return this.initFromArray(i,m).filter(d=>d)}permissionResultHandler(i){const{event:m,isAllowCreate:d,isAllowRead:c,isAllowUpdate:v,isAllowDelete:A}=i;m?typeof this[m]=="function"?this[m]({val:!0}):console.log(`do not have the event ${m}`):c||this.setHidden({val:!0})}setHidden({val:i}){this.hidden=i}}return l}class Ji extends wr{constructor(s={}){super(s),this.configType="ElementQListConfig",this.bulkAction=ya({bulkAction:s.bulkAction,helpers:s.helpers}),this.converter=wa({actions:s.actions,helpers:s.helpers}),this.css=s.css,this.eventName=s.eventName,this.expansion=s.expansion,this.headers=Ca({headers:s.headers,helpers:s.helpers}),this.listStyle=s.listStyle||"q-list-table",this.listShowFooter=s.showFooter||!1,this.listSortBys=s.sortBys,this.noDataMessage=s.noDataMessage}get isValid(){return!!this}static init(s){const i=new this(s);return i.isValid?i:null}}function ya({bulkAction:l={},helpers:s}){const i=pa({helpers:s});return{...l,actions:i.initOnlyValidFromArray(l.actions,s)}}function Ca({headers:l,helpers:s}){return va().initOnlyValidFromArray(l,s)}function wa({actions:l,helpers:s}){const{QRow:i}=s.qList,d={QListButton:_a({helpers:s}),QRow:i,...s},{element:c}=d,{converter:v}=c.getHandlers();return typeof v!="function"?A=>A:v({actions:l,helpers:d})}const Ea=["setHidden","setVisible"];class Er{constructor(s={}){this.id=s.id||Cr("node"),this.css=s.css||"",this.hidden=s.hidden||!1,this.nodeType="Node",this.observers=s.observers||[],this.permissionResult=s.permissionResult,this.permissionResultHandler(this.permissionResult)}get isValid(){return!!this.id}get isVisible(){return!this.hidden}get isCreated(){return!!this}static init(s){const i=new this(s);return i.isValid?i:null}getElementState(){return this}getType(){return this.type}isExist(s){const{name:i}=this;return!!s.find(m=>i&&m.name===i)}handleObservers(s){this.observers.forEach(i=>{const{key:m,value:d,condition:c}=i,v=vr({rule:c,data:s});v&&ba(m)&&typeof this[m]=="function"&&this[m]({value:d,val:v})})}permissionResultHandler(s){const{event:i,isAllowCreate:m,isAllowRead:d,isAllowUpdate:c,isAllowDelete:v}=s;i?typeof this[i]=="function"?this[i]({val:!0}):console.log(`do not have the event ${i}`):m&&d&&c&&v||this.setHidden({val:!0})}resetNode(){this.component=null}setHidden({val:s}){this.hidden=s,s&&this.resetNode()}setVisible(s){this.setHidden({...s,val:!s.val})}updateElementState(s){return this.handleObservers(s),this}}function ba(l){return Ea.includes(l)}let Mt=class extends Er{constructor(s={}){super(s),this.children=s.children||[],this.nodeType="Container"}get isCreated(){return super.isCreated&&!!this.isVisibleChildrenCreated}get isVisibleChildrenCreated(){return this.getVisibleChildren().reduce((s,i)=>s&&i.isCreated,!0)}get validChildren(){return this.children.filter(s=>s)}getElements(){return this.validChildren.reduce((s,i)=>[...s,...i.getElements()],[])}getElementState(){return this.validChildren.reduce((s,i)=>({...s,...i.getElementState()}),{})}getVisibleChildren(){return this.validChildren.filter(s=>s.isVisible)}updateElementState(s){return super.updateElementState(s),this.validChildren.forEach(i=>i.updateElementState(s)),this}};class Aa extends Mt{constructor(s={}){super(s),this.nodeType="ContainerBox"}}class Sa extends Mt{constructor(s={}){super(s),this.nodeType="ContainerColumn"}}class xa extends Mt{constructor(s={}){super(s),this.nodeType="ContainerHeaderSticky"}}class Ra extends Mt{constructor(s={}){super(s),this.nodeType="ContainerRow"}}const ka={ContainerBox:Aa,ContainerColumn:Sa,ContainerHeaderSticky:xa,ContainerRow:Ra};let Oe=class extends Er{constructor(s={}){super(s),this.controllerHelpers=s.controllerHelpers,this.configPermissions=s.configPermissions,this.name=s.name,this.nodeType=s.nodeType||"Element",this.state={},this.configHandler(s.config)}get isCreated(){return super.isCreated&&!!this.component}get isValid(){return super.isValid&&!!this.name}get hasConfigPermissions(){return!!this.configPermissions}get stateName(){return{...this.defaultStateName,...this.config.stateName}}addComponent(s){this.component=s}configHandler(s={}){this.hasConfigPermissions?this.config=ia({config:s,configPermissions:this.configPermissions,type:this.nodeType}):this.config=s}getConfig(){return this.config||{}}getComponent(){return this.component}getElements(){return[this]}getElementName(){return this.name}getHandlers(){const s=this.getElementName(),{elementHandlers:i={}}=this.state;return i[s]||{}}getState(){return this.state}getElementState(){return qa(this.state,this.stateName)}onCreated({component:s,payload:i={}}){return this.addComponent(s),this.updateState(i),this}update(s){this.updateElementState(s)}updateState(s){this.state={...this.state,...s}}updateElementState(s){super.updateElementState(s);const i=Ba(s,this.stateName);return this.updateState(i),this}};function qa(l,s){return Object.keys(s).reduce((i,m)=>{const d=s[m],c=l[m];return{...i,[d]:c}},{})}function Ba(l,s){return Object.keys(s).reduce((i,m)=>{const d=s[m],c=l[d];return delete i[d],{...i,[m]:c}},{...l})}class La extends Oe{constructor(s={}){super(s),this.defaultStateName={qButton:"qButton"}}getConfig(){return{...this.state.qButton||{},...this.config||{},...this.state[this.name]||{}}}}var Qt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Oa(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Cn={exports:{}};Cn.exports,function(l,s){(function(){var i,m="4.17.21",d=200,c="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",v="Expected a function",A="Invalid `variable` option passed into `_.template`",R="__lodash_hash_undefined__",q=500,B="__lodash_placeholder__",P=1,be=2,$e=4,Fe=1,Kt=2,pe=1,At=2,rs=4,Ke=8,zt=16,ze=32,Gt=64,Ge=128,Yt=256,Ar=512,yc=30,Cc="...",wc=800,Ec=16,is=1,bc=2,Ac=3,En=1/0,St=9007199254740991,Sc=17976931348623157e292,bn=NaN,We=4294967295,xc=We-1,Rc=We>>>1,kc=[["ary",Ge],["bind",pe],["bindKey",At],["curry",Ke],["curryRight",zt],["flip",Ar],["partial",ze],["partialRight",Gt],["rearg",Yt]],xt="[object Arguments]",An="[object Array]",qc="[object AsyncFunction]",Zt="[object Boolean]",Xt="[object Date]",Bc="[object DOMException]",Sn="[object Error]",xn="[object Function]",ss="[object GeneratorFunction]",Ne="[object Map]",Jt="[object Number]",Lc="[object Null]",Ye="[object Object]",os="[object Promise]",Oc="[object Proxy]",jt="[object RegExp]",He="[object Set]",en="[object String]",Rn="[object Symbol]",$c="[object Undefined]",tn="[object WeakMap]",Nc="[object WeakSet]",nn="[object ArrayBuffer]",Rt="[object DataView]",Sr="[object Float32Array]",xr="[object Float64Array]",Rr="[object Int8Array]",kr="[object Int16Array]",qr="[object Int32Array]",Br="[object Uint8Array]",Lr="[object Uint8ClampedArray]",Or="[object Uint16Array]",$r="[object Uint32Array]",Hc=/\b__p \+= '';/g,Tc=/\b(__p \+=) '' \+/g,Ic=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ls=/&(?:amp|lt|gt|quot|#39);/g,as=/[&<>"']/g,Dc=RegExp(ls.source),Pc=RegExp(as.source),Fc=/<%-([\s\S]+?)%>/g,Wc=/<%([\s\S]+?)%>/g,us=/<%=([\s\S]+?)%>/g,Uc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mc=/^\w*$/,Qc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Nr=/[\\^$.*+?()[\]{}|]/g,Vc=RegExp(Nr.source),Hr=/^\s+/,Kc=/\s/,zc=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Gc=/\{\n\/\* \[wrapped with (.+)\] \*/,Yc=/,? & /,Zc=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Xc=/[()=,{}\[\]\/\s]/,Jc=/\\(\\)?/g,jc=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,cs=/\w*$/,ef=/^[-+]0x[0-9a-f]+$/i,tf=/^0b[01]+$/i,nf=/^\[object .+?Constructor\]$/,rf=/^0o[0-7]+$/i,sf=/^(?:0|[1-9]\d*)$/,of=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,kn=/($^)/,lf=/['\n\r\u2028\u2029\\]/g,qn="\\ud800-\\udfff",af="\\u0300-\\u036f",uf="\\ufe20-\\ufe2f",cf="\\u20d0-\\u20ff",fs=af+uf+cf,ds="\\u2700-\\u27bf",hs="a-z\\xdf-\\xf6\\xf8-\\xff",ff="\\xac\\xb1\\xd7\\xf7",df="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",hf="\\u2000-\\u206f",gf=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",gs="A-Z\\xc0-\\xd6\\xd8-\\xde",ms="\\ufe0e\\ufe0f",ps=ff+df+hf+gf,Tr="['’]",mf="["+qn+"]",_s="["+ps+"]",Bn="["+fs+"]",vs="\\d+",pf="["+ds+"]",ys="["+hs+"]",Cs="[^"+qn+ps+vs+ds+hs+gs+"]",Ir="\\ud83c[\\udffb-\\udfff]",_f="(?:"+Bn+"|"+Ir+")",ws="[^"+qn+"]",Dr="(?:\\ud83c[\\udde6-\\uddff]){2}",Pr="[\\ud800-\\udbff][\\udc00-\\udfff]",kt="["+gs+"]",Es="\\u200d",bs="(?:"+ys+"|"+Cs+")",vf="(?:"+kt+"|"+Cs+")",As="(?:"+Tr+"(?:d|ll|m|re|s|t|ve))?",Ss="(?:"+Tr+"(?:D|LL|M|RE|S|T|VE))?",xs=_f+"?",Rs="["+ms+"]?",yf="(?:"+Es+"(?:"+[ws,Dr,Pr].join("|")+")"+Rs+xs+")*",Cf="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",wf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ks=Rs+xs+yf,Ef="(?:"+[pf,Dr,Pr].join("|")+")"+ks,bf="(?:"+[ws+Bn+"?",Bn,Dr,Pr,mf].join("|")+")",Af=RegExp(Tr,"g"),Sf=RegExp(Bn,"g"),Fr=RegExp(Ir+"(?="+Ir+")|"+bf+ks,"g"),xf=RegExp([kt+"?"+ys+"+"+As+"(?="+[_s,kt,"$"].join("|")+")",vf+"+"+Ss+"(?="+[_s,kt+bs,"$"].join("|")+")",kt+"?"+bs+"+"+As,kt+"+"+Ss,wf,Cf,vs,Ef].join("|"),"g"),Rf=RegExp("["+Es+qn+fs+ms+"]"),kf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,qf=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bf=-1,G={};G[Sr]=G[xr]=G[Rr]=G[kr]=G[qr]=G[Br]=G[Lr]=G[Or]=G[$r]=!0,G[xt]=G[An]=G[nn]=G[Zt]=G[Rt]=G[Xt]=G[Sn]=G[xn]=G[Ne]=G[Jt]=G[Ye]=G[jt]=G[He]=G[en]=G[tn]=!1;var z={};z[xt]=z[An]=z[nn]=z[Rt]=z[Zt]=z[Xt]=z[Sr]=z[xr]=z[Rr]=z[kr]=z[qr]=z[Ne]=z[Jt]=z[Ye]=z[jt]=z[He]=z[en]=z[Rn]=z[Br]=z[Lr]=z[Or]=z[$r]=!0,z[Sn]=z[xn]=z[tn]=!1;var Lf={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Of={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$f={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Nf={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Hf=parseFloat,Tf=parseInt,qs=typeof Qt=="object"&&Qt&&Qt.Object===Object&&Qt,If=typeof self=="object"&&self&&self.Object===Object&&self,se=qs||If||Function("return this")(),Wr=s&&!s.nodeType&&s,mt=Wr&&!0&&l&&!l.nodeType&&l,Bs=mt&&mt.exports===Wr,Ur=Bs&&qs.process,Ae=function(){try{var p=mt&&mt.require&&mt.require("util").types;return p||Ur&&Ur.binding&&Ur.binding("util")}catch{}}(),Ls=Ae&&Ae.isArrayBuffer,Os=Ae&&Ae.isDate,$s=Ae&&Ae.isMap,Ns=Ae&&Ae.isRegExp,Hs=Ae&&Ae.isSet,Ts=Ae&&Ae.isTypedArray;function _e(p,C,y){switch(y.length){case 0:return p.call(C);case 1:return p.call(C,y[0]);case 2:return p.call(C,y[0],y[1]);case 3:return p.call(C,y[0],y[1],y[2])}return p.apply(C,y)}function Df(p,C,y,x){for(var N=-1,M=p==null?0:p.length;++N<M;){var ne=p[N];C(x,ne,y(ne),p)}return x}function Se(p,C){for(var y=-1,x=p==null?0:p.length;++y<x&&C(p[y],y,p)!==!1;);return p}function Pf(p,C){for(var y=p==null?0:p.length;y--&&C(p[y],y,p)!==!1;);return p}function Is(p,C){for(var y=-1,x=p==null?0:p.length;++y<x;)if(!C(p[y],y,p))return!1;return!0}function st(p,C){for(var y=-1,x=p==null?0:p.length,N=0,M=[];++y<x;){var ne=p[y];C(ne,y,p)&&(M[N++]=ne)}return M}function Ln(p,C){var y=p==null?0:p.length;return!!y&&qt(p,C,0)>-1}function Mr(p,C,y){for(var x=-1,N=p==null?0:p.length;++x<N;)if(y(C,p[x]))return!0;return!1}function Y(p,C){for(var y=-1,x=p==null?0:p.length,N=Array(x);++y<x;)N[y]=C(p[y],y,p);return N}function ot(p,C){for(var y=-1,x=C.length,N=p.length;++y<x;)p[N+y]=C[y];return p}function Qr(p,C,y,x){var N=-1,M=p==null?0:p.length;for(x&&M&&(y=p[++N]);++N<M;)y=C(y,p[N],N,p);return y}function Ff(p,C,y,x){var N=p==null?0:p.length;for(x&&N&&(y=p[--N]);N--;)y=C(y,p[N],N,p);return y}function Vr(p,C){for(var y=-1,x=p==null?0:p.length;++y<x;)if(C(p[y],y,p))return!0;return!1}var Wf=Kr("length");function Uf(p){return p.split("")}function Mf(p){return p.match(Zc)||[]}function Ds(p,C,y){var x;return y(p,function(N,M,ne){if(C(N,M,ne))return x=M,!1}),x}function On(p,C,y,x){for(var N=p.length,M=y+(x?1:-1);x?M--:++M<N;)if(C(p[M],M,p))return M;return-1}function qt(p,C,y){return C===C?td(p,C,y):On(p,Ps,y)}function Qf(p,C,y,x){for(var N=y-1,M=p.length;++N<M;)if(x(p[N],C))return N;return-1}function Ps(p){return p!==p}function Fs(p,C){var y=p==null?0:p.length;return y?Gr(p,C)/y:bn}function Kr(p){return function(C){return C==null?i:C[p]}}function zr(p){return function(C){return p==null?i:p[C]}}function Ws(p,C,y,x,N){return N(p,function(M,ne,K){y=x?(x=!1,M):C(y,M,ne,K)}),y}function Vf(p,C){var y=p.length;for(p.sort(C);y--;)p[y]=p[y].value;return p}function Gr(p,C){for(var y,x=-1,N=p.length;++x<N;){var M=C(p[x]);M!==i&&(y=y===i?M:y+M)}return y}function Yr(p,C){for(var y=-1,x=Array(p);++y<p;)x[y]=C(y);return x}function Kf(p,C){return Y(C,function(y){return[y,p[y]]})}function Us(p){return p&&p.slice(0,Ks(p)+1).replace(Hr,"")}function ve(p){return function(C){return p(C)}}function Zr(p,C){return Y(C,function(y){return p[y]})}function rn(p,C){return p.has(C)}function Ms(p,C){for(var y=-1,x=p.length;++y<x&&qt(C,p[y],0)>-1;);return y}function Qs(p,C){for(var y=p.length;y--&&qt(C,p[y],0)>-1;);return y}function zf(p,C){for(var y=p.length,x=0;y--;)p[y]===C&&++x;return x}var Gf=zr(Lf),Yf=zr(Of);function Zf(p){return"\\"+Nf[p]}function Xf(p,C){return p==null?i:p[C]}function Bt(p){return Rf.test(p)}function Jf(p){return kf.test(p)}function jf(p){for(var C,y=[];!(C=p.next()).done;)y.push(C.value);return y}function Xr(p){var C=-1,y=Array(p.size);return p.forEach(function(x,N){y[++C]=[N,x]}),y}function Vs(p,C){return function(y){return p(C(y))}}function lt(p,C){for(var y=-1,x=p.length,N=0,M=[];++y<x;){var ne=p[y];(ne===C||ne===B)&&(p[y]=B,M[N++]=y)}return M}function $n(p){var C=-1,y=Array(p.size);return p.forEach(function(x){y[++C]=x}),y}function ed(p){var C=-1,y=Array(p.size);return p.forEach(function(x){y[++C]=[x,x]}),y}function td(p,C,y){for(var x=y-1,N=p.length;++x<N;)if(p[x]===C)return x;return-1}function nd(p,C,y){for(var x=y+1;x--;)if(p[x]===C)return x;return x}function Lt(p){return Bt(p)?id(p):Wf(p)}function Te(p){return Bt(p)?sd(p):Uf(p)}function Ks(p){for(var C=p.length;C--&&Kc.test(p.charAt(C)););return C}var rd=zr($f);function id(p){for(var C=Fr.lastIndex=0;Fr.test(p);)++C;return C}function sd(p){return p.match(Fr)||[]}function od(p){return p.match(xf)||[]}var ld=function p(C){C=C==null?se:Ot.defaults(se.Object(),C,Ot.pick(se,qf));var y=C.Array,x=C.Date,N=C.Error,M=C.Function,ne=C.Math,K=C.Object,Jr=C.RegExp,ad=C.String,xe=C.TypeError,Nn=y.prototype,ud=M.prototype,$t=K.prototype,Hn=C["__core-js_shared__"],Tn=ud.toString,V=$t.hasOwnProperty,cd=0,zs=function(){var e=/[^.]+$/.exec(Hn&&Hn.keys&&Hn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),In=$t.toString,fd=Tn.call(K),dd=se._,hd=Jr("^"+Tn.call(V).replace(Nr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Dn=Bs?C.Buffer:i,at=C.Symbol,Pn=C.Uint8Array,Gs=Dn?Dn.allocUnsafe:i,Fn=Vs(K.getPrototypeOf,K),Ys=K.create,Zs=$t.propertyIsEnumerable,Wn=Nn.splice,Xs=at?at.isConcatSpreadable:i,sn=at?at.iterator:i,pt=at?at.toStringTag:i,Un=function(){try{var e=wt(K,"defineProperty");return e({},"",{}),e}catch{}}(),gd=C.clearTimeout!==se.clearTimeout&&C.clearTimeout,md=x&&x.now!==se.Date.now&&x.now,pd=C.setTimeout!==se.setTimeout&&C.setTimeout,Mn=ne.ceil,Qn=ne.floor,jr=K.getOwnPropertySymbols,_d=Dn?Dn.isBuffer:i,Js=C.isFinite,vd=Nn.join,yd=Vs(K.keys,K),re=ne.max,le=ne.min,Cd=x.now,wd=C.parseInt,js=ne.random,Ed=Nn.reverse,ei=wt(C,"DataView"),on=wt(C,"Map"),ti=wt(C,"Promise"),Nt=wt(C,"Set"),ln=wt(C,"WeakMap"),an=wt(K,"create"),Vn=ln&&new ln,Ht={},bd=Et(ei),Ad=Et(on),Sd=Et(ti),xd=Et(Nt),Rd=Et(ln),Kn=at?at.prototype:i,un=Kn?Kn.valueOf:i,eo=Kn?Kn.toString:i;function a(e){if(X(e)&&!H(e)&&!(e instanceof W)){if(e instanceof Re)return e;if(V.call(e,"__wrapped__"))return nl(e)}return new Re(e)}var Tt=function(){function e(){}return function(t){if(!Z(t))return{};if(Ys)return Ys(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function zn(){}function Re(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}a.templateSettings={escape:Fc,evaluate:Wc,interpolate:us,variable:"",imports:{_:a}},a.prototype=zn.prototype,a.prototype.constructor=a,Re.prototype=Tt(zn.prototype),Re.prototype.constructor=Re;function W(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=We,this.__views__=[]}function kd(){var e=new W(this.__wrapped__);return e.__actions__=de(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=de(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=de(this.__views__),e}function qd(){if(this.__filtered__){var e=new W(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function Bd(){var e=this.__wrapped__.value(),t=this.__dir__,n=H(e),r=t<0,o=n?e.length:0,u=Uh(0,o,this.__views__),f=u.start,h=u.end,_=h-f,w=r?h:f-1,E=this.__iteratees__,b=E.length,S=0,k=le(_,this.__takeCount__);if(!n||!r&&o==_&&k==_)return So(e,this.__actions__);var O=[];e:for(;_--&&S<k;){w+=t;for(var I=-1,$=e[w];++I<b;){var F=E[I],U=F.iteratee,we=F.type,fe=U($);if(we==bc)$=fe;else if(!fe){if(we==is)continue e;break e}}O[S++]=$}return O}W.prototype=Tt(zn.prototype),W.prototype.constructor=W;function _t(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ld(){this.__data__=an?an(null):{},this.size=0}function Od(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function $d(e){var t=this.__data__;if(an){var n=t[e];return n===R?i:n}return V.call(t,e)?t[e]:i}function Nd(e){var t=this.__data__;return an?t[e]!==i:V.call(t,e)}function Hd(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=an&&t===i?R:t,this}_t.prototype.clear=Ld,_t.prototype.delete=Od,_t.prototype.get=$d,_t.prototype.has=Nd,_t.prototype.set=Hd;function Ze(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Td(){this.__data__=[],this.size=0}function Id(e){var t=this.__data__,n=Gn(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Wn.call(t,n,1),--this.size,!0}function Dd(e){var t=this.__data__,n=Gn(t,e);return n<0?i:t[n][1]}function Pd(e){return Gn(this.__data__,e)>-1}function Fd(e,t){var n=this.__data__,r=Gn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}Ze.prototype.clear=Td,Ze.prototype.delete=Id,Ze.prototype.get=Dd,Ze.prototype.has=Pd,Ze.prototype.set=Fd;function Xe(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Wd(){this.size=0,this.__data__={hash:new _t,map:new(on||Ze),string:new _t}}function Ud(e){var t=or(this,e).delete(e);return this.size-=t?1:0,t}function Md(e){return or(this,e).get(e)}function Qd(e){return or(this,e).has(e)}function Vd(e,t){var n=or(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}Xe.prototype.clear=Wd,Xe.prototype.delete=Ud,Xe.prototype.get=Md,Xe.prototype.has=Qd,Xe.prototype.set=Vd;function vt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Xe;++t<n;)this.add(e[t])}function Kd(e){return this.__data__.set(e,R),this}function zd(e){return this.__data__.has(e)}vt.prototype.add=vt.prototype.push=Kd,vt.prototype.has=zd;function Ie(e){var t=this.__data__=new Ze(e);this.size=t.size}function Gd(){this.__data__=new Ze,this.size=0}function Yd(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Zd(e){return this.__data__.get(e)}function Xd(e){return this.__data__.has(e)}function Jd(e,t){var n=this.__data__;if(n instanceof Ze){var r=n.__data__;if(!on||r.length<d-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Xe(r)}return n.set(e,t),this.size=n.size,this}Ie.prototype.clear=Gd,Ie.prototype.delete=Yd,Ie.prototype.get=Zd,Ie.prototype.has=Xd,Ie.prototype.set=Jd;function to(e,t){var n=H(e),r=!n&&bt(e),o=!n&&!r&&ht(e),u=!n&&!r&&!o&&Ft(e),f=n||r||o||u,h=f?Yr(e.length,ad):[],_=h.length;for(var w in e)(t||V.call(e,w))&&!(f&&(w=="length"||o&&(w=="offset"||w=="parent")||u&&(w=="buffer"||w=="byteLength"||w=="byteOffset")||tt(w,_)))&&h.push(w);return h}function no(e){var t=e.length;return t?e[di(0,t-1)]:i}function jd(e,t){return lr(de(e),yt(t,0,e.length))}function eh(e){return lr(de(e))}function ni(e,t,n){(n!==i&&!De(e[t],n)||n===i&&!(t in e))&&Je(e,t,n)}function cn(e,t,n){var r=e[t];(!(V.call(e,t)&&De(r,n))||n===i&&!(t in e))&&Je(e,t,n)}function Gn(e,t){for(var n=e.length;n--;)if(De(e[n][0],t))return n;return-1}function th(e,t,n,r){return ut(e,function(o,u,f){t(r,o,n(o),f)}),r}function ro(e,t){return e&&Me(t,ie(t),e)}function nh(e,t){return e&&Me(t,ge(t),e)}function Je(e,t,n){t=="__proto__"&&Un?Un(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ri(e,t){for(var n=-1,r=t.length,o=y(r),u=e==null;++n<r;)o[n]=u?i:Ii(e,t[n]);return o}function yt(e,t,n){return e===e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function ke(e,t,n,r,o,u){var f,h=t&P,_=t&be,w=t&$e;if(n&&(f=o?n(e,r,o,u):n(e)),f!==i)return f;if(!Z(e))return e;var E=H(e);if(E){if(f=Qh(e),!h)return de(e,f)}else{var b=ae(e),S=b==xn||b==ss;if(ht(e))return ko(e,h);if(b==Ye||b==xt||S&&!o){if(f=_||S?{}:zo(e),!h)return _?$h(e,nh(f,e)):Oh(e,ro(f,e))}else{if(!z[b])return o?e:{};f=Vh(e,b,h)}}u||(u=new Ie);var k=u.get(e);if(k)return k;u.set(e,f),El(e)?e.forEach(function($){f.add(ke($,t,n,$,e,u))}):Cl(e)&&e.forEach(function($,F){f.set(F,ke($,t,n,F,e,u))});var O=w?_?bi:Ei:_?ge:ie,I=E?i:O(e);return Se(I||e,function($,F){I&&(F=$,$=e[F]),cn(f,F,ke($,t,n,F,e,u))}),f}function rh(e){var t=ie(e);return function(n){return io(n,e,t)}}function io(e,t,n){var r=n.length;if(e==null)return!r;for(e=K(e);r--;){var o=n[r],u=t[o],f=e[o];if(f===i&&!(o in e)||!u(f))return!1}return!0}function so(e,t,n){if(typeof e!="function")throw new xe(v);return _n(function(){e.apply(i,n)},t)}function fn(e,t,n,r){var o=-1,u=Ln,f=!0,h=e.length,_=[],w=t.length;if(!h)return _;n&&(t=Y(t,ve(n))),r?(u=Mr,f=!1):t.length>=d&&(u=rn,f=!1,t=new vt(t));e:for(;++o<h;){var E=e[o],b=n==null?E:n(E);if(E=r||E!==0?E:0,f&&b===b){for(var S=w;S--;)if(t[S]===b)continue e;_.push(E)}else u(t,b,r)||_.push(E)}return _}var ut=$o(Ue),oo=$o(si,!0);function ih(e,t){var n=!0;return ut(e,function(r,o,u){return n=!!t(r,o,u),n}),n}function Yn(e,t,n){for(var r=-1,o=e.length;++r<o;){var u=e[r],f=t(u);if(f!=null&&(h===i?f===f&&!Ce(f):n(f,h)))var h=f,_=u}return _}function sh(e,t,n,r){var o=e.length;for(n=T(n),n<0&&(n=-n>o?0:o+n),r=r===i||r>o?o:T(r),r<0&&(r+=o),r=n>r?0:Al(r);n<r;)e[n++]=t;return e}function lo(e,t){var n=[];return ut(e,function(r,o,u){t(r,o,u)&&n.push(r)}),n}function oe(e,t,n,r,o){var u=-1,f=e.length;for(n||(n=zh),o||(o=[]);++u<f;){var h=e[u];t>0&&n(h)?t>1?oe(h,t-1,n,r,o):ot(o,h):r||(o[o.length]=h)}return o}var ii=No(),ao=No(!0);function Ue(e,t){return e&&ii(e,t,ie)}function si(e,t){return e&&ao(e,t,ie)}function Zn(e,t){return st(t,function(n){return nt(e[n])})}function Ct(e,t){t=ft(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Qe(t[n++])];return n&&n==r?e:i}function uo(e,t,n){var r=t(e);return H(e)?r:ot(r,n(e))}function ue(e){return e==null?e===i?$c:Lc:pt&&pt in K(e)?Wh(e):eg(e)}function oi(e,t){return e>t}function oh(e,t){return e!=null&&V.call(e,t)}function lh(e,t){return e!=null&&t in K(e)}function ah(e,t,n){return e>=le(t,n)&&e<re(t,n)}function li(e,t,n){for(var r=n?Mr:Ln,o=e[0].length,u=e.length,f=u,h=y(u),_=1/0,w=[];f--;){var E=e[f];f&&t&&(E=Y(E,ve(t))),_=le(E.length,_),h[f]=!n&&(t||o>=120&&E.length>=120)?new vt(f&&E):i}E=e[0];var b=-1,S=h[0];e:for(;++b<o&&w.length<_;){var k=E[b],O=t?t(k):k;if(k=n||k!==0?k:0,!(S?rn(S,O):r(w,O,n))){for(f=u;--f;){var I=h[f];if(!(I?rn(I,O):r(e[f],O,n)))continue e}S&&S.push(O),w.push(k)}}return w}function uh(e,t,n,r){return Ue(e,function(o,u,f){t(r,n(o),u,f)}),r}function dn(e,t,n){t=ft(t,e),e=Xo(e,t);var r=e==null?e:e[Qe(Be(t))];return r==null?i:_e(r,e,n)}function co(e){return X(e)&&ue(e)==xt}function ch(e){return X(e)&&ue(e)==nn}function fh(e){return X(e)&&ue(e)==Xt}function hn(e,t,n,r,o){return e===t?!0:e==null||t==null||!X(e)&&!X(t)?e!==e&&t!==t:dh(e,t,n,r,hn,o)}function dh(e,t,n,r,o,u){var f=H(e),h=H(t),_=f?An:ae(e),w=h?An:ae(t);_=_==xt?Ye:_,w=w==xt?Ye:w;var E=_==Ye,b=w==Ye,S=_==w;if(S&&ht(e)){if(!ht(t))return!1;f=!0,E=!1}if(S&&!E)return u||(u=new Ie),f||Ft(e)?Qo(e,t,n,r,o,u):Ph(e,t,_,n,r,o,u);if(!(n&Fe)){var k=E&&V.call(e,"__wrapped__"),O=b&&V.call(t,"__wrapped__");if(k||O){var I=k?e.value():e,$=O?t.value():t;return u||(u=new Ie),o(I,$,n,r,u)}}return S?(u||(u=new Ie),Fh(e,t,n,r,o,u)):!1}function hh(e){return X(e)&&ae(e)==Ne}function ai(e,t,n,r){var o=n.length,u=o,f=!r;if(e==null)return!u;for(e=K(e);o--;){var h=n[o];if(f&&h[2]?h[1]!==e[h[0]]:!(h[0]in e))return!1}for(;++o<u;){h=n[o];var _=h[0],w=e[_],E=h[1];if(f&&h[2]){if(w===i&&!(_ in e))return!1}else{var b=new Ie;if(r)var S=r(w,E,_,e,t,b);if(!(S===i?hn(E,w,Fe|Kt,r,b):S))return!1}}return!0}function fo(e){if(!Z(e)||Yh(e))return!1;var t=nt(e)?hd:nf;return t.test(Et(e))}function gh(e){return X(e)&&ue(e)==jt}function mh(e){return X(e)&&ae(e)==He}function ph(e){return X(e)&&hr(e.length)&&!!G[ue(e)]}function ho(e){return typeof e=="function"?e:e==null?me:typeof e=="object"?H(e)?po(e[0],e[1]):mo(e):Hl(e)}function ui(e){if(!pn(e))return yd(e);var t=[];for(var n in K(e))V.call(e,n)&&n!="constructor"&&t.push(n);return t}function _h(e){if(!Z(e))return jh(e);var t=pn(e),n=[];for(var r in e)r=="constructor"&&(t||!V.call(e,r))||n.push(r);return n}function ci(e,t){return e<t}function go(e,t){var n=-1,r=he(e)?y(e.length):[];return ut(e,function(o,u,f){r[++n]=t(o,u,f)}),r}function mo(e){var t=Si(e);return t.length==1&&t[0][2]?Yo(t[0][0],t[0][1]):function(n){return n===e||ai(n,e,t)}}function po(e,t){return Ri(e)&&Go(t)?Yo(Qe(e),t):function(n){var r=Ii(n,e);return r===i&&r===t?Di(n,e):hn(t,r,Fe|Kt)}}function Xn(e,t,n,r,o){e!==t&&ii(t,function(u,f){if(o||(o=new Ie),Z(u))vh(e,t,f,n,Xn,r,o);else{var h=r?r(qi(e,f),u,f+"",e,t,o):i;h===i&&(h=u),ni(e,f,h)}},ge)}function vh(e,t,n,r,o,u,f){var h=qi(e,n),_=qi(t,n),w=f.get(_);if(w){ni(e,n,w);return}var E=u?u(h,_,n+"",e,t,f):i,b=E===i;if(b){var S=H(_),k=!S&&ht(_),O=!S&&!k&&Ft(_);E=_,S||k||O?H(h)?E=h:J(h)?E=de(h):k?(b=!1,E=ko(_,!0)):O?(b=!1,E=qo(_,!0)):E=[]:vn(_)||bt(_)?(E=h,bt(h)?E=Sl(h):(!Z(h)||nt(h))&&(E=zo(_))):b=!1}b&&(f.set(_,E),o(E,_,r,u,f),f.delete(_)),ni(e,n,E)}function _o(e,t){var n=e.length;if(n)return t+=t<0?n:0,tt(t,n)?e[t]:i}function vo(e,t,n){t.length?t=Y(t,function(u){return H(u)?function(f){return Ct(f,u.length===1?u[0]:u)}:u}):t=[me];var r=-1;t=Y(t,ve(L()));var o=go(e,function(u,f,h){var _=Y(t,function(w){return w(u)});return{criteria:_,index:++r,value:u}});return Vf(o,function(u,f){return Lh(u,f,n)})}function yh(e,t){return yo(e,t,function(n,r){return Di(e,r)})}function yo(e,t,n){for(var r=-1,o=t.length,u={};++r<o;){var f=t[r],h=Ct(e,f);n(h,f)&&gn(u,ft(f,e),h)}return u}function Ch(e){return function(t){return Ct(t,e)}}function fi(e,t,n,r){var o=r?Qf:qt,u=-1,f=t.length,h=e;for(e===t&&(t=de(t)),n&&(h=Y(e,ve(n)));++u<f;)for(var _=0,w=t[u],E=n?n(w):w;(_=o(h,E,_,r))>-1;)h!==e&&Wn.call(h,_,1),Wn.call(e,_,1);return e}function Co(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==u){var u=o;tt(o)?Wn.call(e,o,1):mi(e,o)}}return e}function di(e,t){return e+Qn(js()*(t-e+1))}function wh(e,t,n,r){for(var o=-1,u=re(Mn((t-e)/(n||1)),0),f=y(u);u--;)f[r?u:++o]=e,e+=n;return f}function hi(e,t){var n="";if(!e||t<1||t>St)return n;do t%2&&(n+=e),t=Qn(t/2),t&&(e+=e);while(t);return n}function D(e,t){return Bi(Zo(e,t,me),e+"")}function Eh(e){return no(Wt(e))}function bh(e,t){var n=Wt(e);return lr(n,yt(t,0,n.length))}function gn(e,t,n,r){if(!Z(e))return e;t=ft(t,e);for(var o=-1,u=t.length,f=u-1,h=e;h!=null&&++o<u;){var _=Qe(t[o]),w=n;if(_==="__proto__"||_==="constructor"||_==="prototype")return e;if(o!=f){var E=h[_];w=r?r(E,_,h):i,w===i&&(w=Z(E)?E:tt(t[o+1])?[]:{})}cn(h,_,w),h=h[_]}return e}var wo=Vn?function(e,t){return Vn.set(e,t),e}:me,Ah=Un?function(e,t){return Un(e,"toString",{configurable:!0,enumerable:!1,value:Fi(t),writable:!0})}:me;function Sh(e){return lr(Wt(e))}function qe(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var u=y(o);++r<o;)u[r]=e[r+t];return u}function xh(e,t){var n;return ut(e,function(r,o,u){return n=t(r,o,u),!n}),!!n}function Jn(e,t,n){var r=0,o=e==null?r:e.length;if(typeof t=="number"&&t===t&&o<=Rc){for(;r<o;){var u=r+o>>>1,f=e[u];f!==null&&!Ce(f)&&(n?f<=t:f<t)?r=u+1:o=u}return o}return gi(e,t,me,n)}function gi(e,t,n,r){var o=0,u=e==null?0:e.length;if(u===0)return 0;t=n(t);for(var f=t!==t,h=t===null,_=Ce(t),w=t===i;o<u;){var E=Qn((o+u)/2),b=n(e[E]),S=b!==i,k=b===null,O=b===b,I=Ce(b);if(f)var $=r||O;else w?$=O&&(r||S):h?$=O&&S&&(r||!k):_?$=O&&S&&!k&&(r||!I):k||I?$=!1:$=r?b<=t:b<t;$?o=E+1:u=E}return le(u,xc)}function Eo(e,t){for(var n=-1,r=e.length,o=0,u=[];++n<r;){var f=e[n],h=t?t(f):f;if(!n||!De(h,_)){var _=h;u[o++]=f===0?0:f}}return u}function bo(e){return typeof e=="number"?e:Ce(e)?bn:+e}function ye(e){if(typeof e=="string")return e;if(H(e))return Y(e,ye)+"";if(Ce(e))return eo?eo.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function ct(e,t,n){var r=-1,o=Ln,u=e.length,f=!0,h=[],_=h;if(n)f=!1,o=Mr;else if(u>=d){var w=t?null:Ih(e);if(w)return $n(w);f=!1,o=rn,_=new vt}else _=t?[]:h;e:for(;++r<u;){var E=e[r],b=t?t(E):E;if(E=n||E!==0?E:0,f&&b===b){for(var S=_.length;S--;)if(_[S]===b)continue e;t&&_.push(b),h.push(E)}else o(_,b,n)||(_!==h&&_.push(b),h.push(E))}return h}function mi(e,t){return t=ft(t,e),e=Xo(e,t),e==null||delete e[Qe(Be(t))]}function Ao(e,t,n,r){return gn(e,t,n(Ct(e,t)),r)}function jn(e,t,n,r){for(var o=e.length,u=r?o:-1;(r?u--:++u<o)&&t(e[u],u,e););return n?qe(e,r?0:u,r?u+1:o):qe(e,r?u+1:0,r?o:u)}function So(e,t){var n=e;return n instanceof W&&(n=n.value()),Qr(t,function(r,o){return o.func.apply(o.thisArg,ot([r],o.args))},n)}function pi(e,t,n){var r=e.length;if(r<2)return r?ct(e[0]):[];for(var o=-1,u=y(r);++o<r;)for(var f=e[o],h=-1;++h<r;)h!=o&&(u[o]=fn(u[o]||f,e[h],t,n));return ct(oe(u,1),t,n)}function xo(e,t,n){for(var r=-1,o=e.length,u=t.length,f={};++r<o;){var h=r<u?t[r]:i;n(f,e[r],h)}return f}function _i(e){return J(e)?e:[]}function vi(e){return typeof e=="function"?e:me}function ft(e,t){return H(e)?e:Ri(e,t)?[e]:tl(Q(e))}var Rh=D;function dt(e,t,n){var r=e.length;return n=n===i?r:n,!t&&n>=r?e:qe(e,t,n)}var Ro=gd||function(e){return se.clearTimeout(e)};function ko(e,t){if(t)return e.slice();var n=e.length,r=Gs?Gs(n):new e.constructor(n);return e.copy(r),r}function yi(e){var t=new e.constructor(e.byteLength);return new Pn(t).set(new Pn(e)),t}function kh(e,t){var n=t?yi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function qh(e){var t=new e.constructor(e.source,cs.exec(e));return t.lastIndex=e.lastIndex,t}function Bh(e){return un?K(un.call(e)):{}}function qo(e,t){var n=t?yi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Bo(e,t){if(e!==t){var n=e!==i,r=e===null,o=e===e,u=Ce(e),f=t!==i,h=t===null,_=t===t,w=Ce(t);if(!h&&!w&&!u&&e>t||u&&f&&_&&!h&&!w||r&&f&&_||!n&&_||!o)return 1;if(!r&&!u&&!w&&e<t||w&&n&&o&&!r&&!u||h&&n&&o||!f&&o||!_)return-1}return 0}function Lh(e,t,n){for(var r=-1,o=e.criteria,u=t.criteria,f=o.length,h=n.length;++r<f;){var _=Bo(o[r],u[r]);if(_){if(r>=h)return _;var w=n[r];return _*(w=="desc"?-1:1)}}return e.index-t.index}function Lo(e,t,n,r){for(var o=-1,u=e.length,f=n.length,h=-1,_=t.length,w=re(u-f,0),E=y(_+w),b=!r;++h<_;)E[h]=t[h];for(;++o<f;)(b||o<u)&&(E[n[o]]=e[o]);for(;w--;)E[h++]=e[o++];return E}function Oo(e,t,n,r){for(var o=-1,u=e.length,f=-1,h=n.length,_=-1,w=t.length,E=re(u-h,0),b=y(E+w),S=!r;++o<E;)b[o]=e[o];for(var k=o;++_<w;)b[k+_]=t[_];for(;++f<h;)(S||o<u)&&(b[k+n[f]]=e[o++]);return b}function de(e,t){var n=-1,r=e.length;for(t||(t=y(r));++n<r;)t[n]=e[n];return t}function Me(e,t,n,r){var o=!n;n||(n={});for(var u=-1,f=t.length;++u<f;){var h=t[u],_=r?r(n[h],e[h],h,n,e):i;_===i&&(_=e[h]),o?Je(n,h,_):cn(n,h,_)}return n}function Oh(e,t){return Me(e,xi(e),t)}function $h(e,t){return Me(e,Vo(e),t)}function er(e,t){return function(n,r){var o=H(n)?Df:th,u=t?t():{};return o(n,e,L(r,2),u)}}function It(e){return D(function(t,n){var r=-1,o=n.length,u=o>1?n[o-1]:i,f=o>2?n[2]:i;for(u=e.length>3&&typeof u=="function"?(o--,u):i,f&&ce(n[0],n[1],f)&&(u=o<3?i:u,o=1),t=K(t);++r<o;){var h=n[r];h&&e(t,h,r,u)}return t})}function $o(e,t){return function(n,r){if(n==null)return n;if(!he(n))return e(n,r);for(var o=n.length,u=t?o:-1,f=K(n);(t?u--:++u<o)&&r(f[u],u,f)!==!1;);return n}}function No(e){return function(t,n,r){for(var o=-1,u=K(t),f=r(t),h=f.length;h--;){var _=f[e?h:++o];if(n(u[_],_,u)===!1)break}return t}}function Nh(e,t,n){var r=t&pe,o=mn(e);function u(){var f=this&&this!==se&&this instanceof u?o:e;return f.apply(r?n:this,arguments)}return u}function Ho(e){return function(t){t=Q(t);var n=Bt(t)?Te(t):i,r=n?n[0]:t.charAt(0),o=n?dt(n,1).join(""):t.slice(1);return r[e]()+o}}function Dt(e){return function(t){return Qr($l(Ol(t).replace(Af,"")),e,"")}}function mn(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Tt(e.prototype),r=e.apply(n,t);return Z(r)?r:n}}function Hh(e,t,n){var r=mn(e);function o(){for(var u=arguments.length,f=y(u),h=u,_=Pt(o);h--;)f[h]=arguments[h];var w=u<3&&f[0]!==_&&f[u-1]!==_?[]:lt(f,_);if(u-=w.length,u<n)return Fo(e,t,tr,o.placeholder,i,f,w,i,i,n-u);var E=this&&this!==se&&this instanceof o?r:e;return _e(E,this,f)}return o}function To(e){return function(t,n,r){var o=K(t);if(!he(t)){var u=L(n,3);t=ie(t),n=function(h){return u(o[h],h,o)}}var f=e(t,n,r);return f>-1?o[u?t[f]:f]:i}}function Io(e){return et(function(t){var n=t.length,r=n,o=Re.prototype.thru;for(e&&t.reverse();r--;){var u=t[r];if(typeof u!="function")throw new xe(v);if(o&&!f&&sr(u)=="wrapper")var f=new Re([],!0)}for(r=f?r:n;++r<n;){u=t[r];var h=sr(u),_=h=="wrapper"?Ai(u):i;_&&ki(_[0])&&_[1]==(Ge|Ke|ze|Yt)&&!_[4].length&&_[9]==1?f=f[sr(_[0])].apply(f,_[3]):f=u.length==1&&ki(u)?f[h]():f.thru(u)}return function(){var w=arguments,E=w[0];if(f&&w.length==1&&H(E))return f.plant(E).value();for(var b=0,S=n?t[b].apply(this,w):E;++b<n;)S=t[b].call(this,S);return S}})}function tr(e,t,n,r,o,u,f,h,_,w){var E=t&Ge,b=t&pe,S=t&At,k=t&(Ke|zt),O=t&Ar,I=S?i:mn(e);function $(){for(var F=arguments.length,U=y(F),we=F;we--;)U[we]=arguments[we];if(k)var fe=Pt($),Ee=zf(U,fe);if(r&&(U=Lo(U,r,o,k)),u&&(U=Oo(U,u,f,k)),F-=Ee,k&&F<w){var j=lt(U,fe);return Fo(e,t,tr,$.placeholder,n,U,j,h,_,w-F)}var Pe=b?n:this,it=S?Pe[e]:e;return F=U.length,h?U=tg(U,h):O&&F>1&&U.reverse(),E&&_<F&&(U.length=_),this&&this!==se&&this instanceof $&&(it=I||mn(it)),it.apply(Pe,U)}return $}function Do(e,t){return function(n,r){return uh(n,e,t(r),{})}}function nr(e,t){return function(n,r){var o;if(n===i&&r===i)return t;if(n!==i&&(o=n),r!==i){if(o===i)return r;typeof n=="string"||typeof r=="string"?(n=ye(n),r=ye(r)):(n=bo(n),r=bo(r)),o=e(n,r)}return o}}function Ci(e){return et(function(t){return t=Y(t,ve(L())),D(function(n){var r=this;return e(t,function(o){return _e(o,r,n)})})})}function rr(e,t){t=t===i?" ":ye(t);var n=t.length;if(n<2)return n?hi(t,e):t;var r=hi(t,Mn(e/Lt(t)));return Bt(t)?dt(Te(r),0,e).join(""):r.slice(0,e)}function Th(e,t,n,r){var o=t&pe,u=mn(e);function f(){for(var h=-1,_=arguments.length,w=-1,E=r.length,b=y(E+_),S=this&&this!==se&&this instanceof f?u:e;++w<E;)b[w]=r[w];for(;_--;)b[w++]=arguments[++h];return _e(S,o?n:this,b)}return f}function Po(e){return function(t,n,r){return r&&typeof r!="number"&&ce(t,n,r)&&(n=r=i),t=rt(t),n===i?(n=t,t=0):n=rt(n),r=r===i?t<n?1:-1:rt(r),wh(t,n,r,e)}}function ir(e){return function(t,n){return typeof t=="string"&&typeof n=="string"||(t=Le(t),n=Le(n)),e(t,n)}}function Fo(e,t,n,r,o,u,f,h,_,w){var E=t&Ke,b=E?f:i,S=E?i:f,k=E?u:i,O=E?i:u;t|=E?ze:Gt,t&=~(E?Gt:ze),t&rs||(t&=-4);var I=[e,t,o,k,b,O,S,h,_,w],$=n.apply(i,I);return ki(e)&&Jo($,I),$.placeholder=r,jo($,e,t)}function wi(e){var t=ne[e];return function(n,r){if(n=Le(n),r=r==null?0:le(T(r),292),r&&Js(n)){var o=(Q(n)+"e").split("e"),u=t(o[0]+"e"+(+o[1]+r));return o=(Q(u)+"e").split("e"),+(o[0]+"e"+(+o[1]-r))}return t(n)}}var Ih=Nt&&1/$n(new Nt([,-0]))[1]==En?function(e){return new Nt(e)}:Mi;function Wo(e){return function(t){var n=ae(t);return n==Ne?Xr(t):n==He?ed(t):Kf(t,e(t))}}function je(e,t,n,r,o,u,f,h){var _=t&At;if(!_&&typeof e!="function")throw new xe(v);var w=r?r.length:0;if(w||(t&=-97,r=o=i),f=f===i?f:re(T(f),0),h=h===i?h:T(h),w-=o?o.length:0,t&Gt){var E=r,b=o;r=o=i}var S=_?i:Ai(e),k=[e,t,n,r,o,E,b,u,f,h];if(S&&Jh(k,S),e=k[0],t=k[1],n=k[2],r=k[3],o=k[4],h=k[9]=k[9]===i?_?0:e.length:re(k[9]-w,0),!h&&t&(Ke|zt)&&(t&=-25),!t||t==pe)var O=Nh(e,t,n);else t==Ke||t==zt?O=Hh(e,t,h):(t==ze||t==(pe|ze))&&!o.length?O=Th(e,t,n,r):O=tr.apply(i,k);var I=S?wo:Jo;return jo(I(O,k),e,t)}function Uo(e,t,n,r){return e===i||De(e,$t[n])&&!V.call(r,n)?t:e}function Mo(e,t,n,r,o,u){return Z(e)&&Z(t)&&(u.set(t,e),Xn(e,t,i,Mo,u),u.delete(t)),e}function Dh(e){return vn(e)?i:e}function Qo(e,t,n,r,o,u){var f=n&Fe,h=e.length,_=t.length;if(h!=_&&!(f&&_>h))return!1;var w=u.get(e),E=u.get(t);if(w&&E)return w==t&&E==e;var b=-1,S=!0,k=n&Kt?new vt:i;for(u.set(e,t),u.set(t,e);++b<h;){var O=e[b],I=t[b];if(r)var $=f?r(I,O,b,t,e,u):r(O,I,b,e,t,u);if($!==i){if($)continue;S=!1;break}if(k){if(!Vr(t,function(F,U){if(!rn(k,U)&&(O===F||o(O,F,n,r,u)))return k.push(U)})){S=!1;break}}else if(!(O===I||o(O,I,n,r,u))){S=!1;break}}return u.delete(e),u.delete(t),S}function Ph(e,t,n,r,o,u,f){switch(n){case Rt:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case nn:return!(e.byteLength!=t.byteLength||!u(new Pn(e),new Pn(t)));case Zt:case Xt:case Jt:return De(+e,+t);case Sn:return e.name==t.name&&e.message==t.message;case jt:case en:return e==t+"";case Ne:var h=Xr;case He:var _=r&Fe;if(h||(h=$n),e.size!=t.size&&!_)return!1;var w=f.get(e);if(w)return w==t;r|=Kt,f.set(e,t);var E=Qo(h(e),h(t),r,o,u,f);return f.delete(e),E;case Rn:if(un)return un.call(e)==un.call(t)}return!1}function Fh(e,t,n,r,o,u){var f=n&Fe,h=Ei(e),_=h.length,w=Ei(t),E=w.length;if(_!=E&&!f)return!1;for(var b=_;b--;){var S=h[b];if(!(f?S in t:V.call(t,S)))return!1}var k=u.get(e),O=u.get(t);if(k&&O)return k==t&&O==e;var I=!0;u.set(e,t),u.set(t,e);for(var $=f;++b<_;){S=h[b];var F=e[S],U=t[S];if(r)var we=f?r(U,F,S,t,e,u):r(F,U,S,e,t,u);if(!(we===i?F===U||o(F,U,n,r,u):we)){I=!1;break}$||($=S=="constructor")}if(I&&!$){var fe=e.constructor,Ee=t.constructor;fe!=Ee&&"constructor"in e&&"constructor"in t&&!(typeof fe=="function"&&fe instanceof fe&&typeof Ee=="function"&&Ee instanceof Ee)&&(I=!1)}return u.delete(e),u.delete(t),I}function et(e){return Bi(Zo(e,i,sl),e+"")}function Ei(e){return uo(e,ie,xi)}function bi(e){return uo(e,ge,Vo)}var Ai=Vn?function(e){return Vn.get(e)}:Mi;function sr(e){for(var t=e.name+"",n=Ht[t],r=V.call(Ht,t)?n.length:0;r--;){var o=n[r],u=o.func;if(u==null||u==e)return o.name}return t}function Pt(e){var t=V.call(a,"placeholder")?a:e;return t.placeholder}function L(){var e=a.iteratee||Wi;return e=e===Wi?ho:e,arguments.length?e(arguments[0],arguments[1]):e}function or(e,t){var n=e.__data__;return Gh(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Si(e){for(var t=ie(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Go(o)]}return t}function wt(e,t){var n=Xf(e,t);return fo(n)?n:i}function Wh(e){var t=V.call(e,pt),n=e[pt];try{e[pt]=i;var r=!0}catch{}var o=In.call(e);return r&&(t?e[pt]=n:delete e[pt]),o}var xi=jr?function(e){return e==null?[]:(e=K(e),st(jr(e),function(t){return Zs.call(e,t)}))}:Qi,Vo=jr?function(e){for(var t=[];e;)ot(t,xi(e)),e=Fn(e);return t}:Qi,ae=ue;(ei&&ae(new ei(new ArrayBuffer(1)))!=Rt||on&&ae(new on)!=Ne||ti&&ae(ti.resolve())!=os||Nt&&ae(new Nt)!=He||ln&&ae(new ln)!=tn)&&(ae=function(e){var t=ue(e),n=t==Ye?e.constructor:i,r=n?Et(n):"";if(r)switch(r){case bd:return Rt;case Ad:return Ne;case Sd:return os;case xd:return He;case Rd:return tn}return t});function Uh(e,t,n){for(var r=-1,o=n.length;++r<o;){var u=n[r],f=u.size;switch(u.type){case"drop":e+=f;break;case"dropRight":t-=f;break;case"take":t=le(t,e+f);break;case"takeRight":e=re(e,t-f);break}}return{start:e,end:t}}function Mh(e){var t=e.match(Gc);return t?t[1].split(Yc):[]}function Ko(e,t,n){t=ft(t,e);for(var r=-1,o=t.length,u=!1;++r<o;){var f=Qe(t[r]);if(!(u=e!=null&&n(e,f)))break;e=e[f]}return u||++r!=o?u:(o=e==null?0:e.length,!!o&&hr(o)&&tt(f,o)&&(H(e)||bt(e)))}function Qh(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&V.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function zo(e){return typeof e.constructor=="function"&&!pn(e)?Tt(Fn(e)):{}}function Vh(e,t,n){var r=e.constructor;switch(t){case nn:return yi(e);case Zt:case Xt:return new r(+e);case Rt:return kh(e,n);case Sr:case xr:case Rr:case kr:case qr:case Br:case Lr:case Or:case $r:return qo(e,n);case Ne:return new r;case Jt:case en:return new r(e);case jt:return qh(e);case He:return new r;case Rn:return Bh(e)}}function Kh(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(zc,`{
16
+ })(this,function(Ct,p){"use strict";const ie=(s,r)=>{const i=s.__vccOpts||s;for(const[a,f]of r)i[a]=f;return i},Ha={name:"q-widget-q-modal",props:{modal:{type:Object,default:()=>({})}},data(){return{}},computed:{body(){return this.modal.body},css(){return this.modal.css},countdown(){return this.modal.countdown},label(){return this.modal.label},model(){return this.modal.model},onCancel(){return this.modal.onCancel},onClose(){return this.modal.onClose},onConfirm(){return this.modal.onConfirm},title(){return this.modal.title}},methods:{onFinish(){this.modal.onFinish()},qForm(s){this.modal.qForm(s)},qList(s){this.modal.qList(s)}}},Ia={class:"q-widget-q-modal __modal"};function Fa(s,r,i,a,f,u){const g=p.resolveComponent("q-modal",!0);return p.openBlock(),p.createElementBlock("div",Ia,[p.createVNode(g,{body:u.body,countdown:u.countdown,css:u.css,label:u.label,model:u.model,onCancel:u.onCancel,onClose:u.onClose,onConfirm:u.onConfirm,title:u.title,onOnFinish:u.onFinish,onQForm:u.qForm,onQList:u.qList},null,8,["body","countdown","css","label","model","onCancel","onClose","onConfirm","title","onOnFinish","onQForm","onQList"])])}const Da=ie(Ha,[["render",Fa],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/QModal.vue"]]);function Pa({controller:s,state:r,saveControllerState:i}){const{saveStateKeys:a=[]}=s,f=a.reduce((u,g)=>({...u,...fs({keys:g.split("."),obj:r})}),{});return i({data:f})}function fs({keys:s,obj:r}){const i=s.shift();return{[i]:s.length===0?r[i]:fs({keys:s,obj:r[i]})}}function Yt({component:s,message:r,modalConfig:i={}}){const{countdown:a,label:f,title:u,canClose:g=!0}=i,w={body:[{customComponentName:"q-modal-region-tool-html",html:r}],countdown:a,label:f,onClose:g?()=>{s.modal=null}:null,title:u||"Error"};s.modal=w}class Ma{static exec({config:r,keys:i,permissions:a}){Array.isArray(r)||console.log("can not handle these buttons");const f=i.shift();return i.length!==0&&console.log(`can not handle ${i.join(".")}`),Wa({buttons:r,key:f,permissions:a})}}function Wa({buttons:s,key:r,permissions:i}){return s.map(a=>{if(Ua(r,a)){const f=a.permissions||[];return{...a,permissions:[...f,...i]}}return a})}function Ua(s,r){const{buttonType:i,id:a,label:f}=r;return s===a||s===f||s===i}class Va{static exec({config:r,keys:i,permissions:a}){return $r({layout:r,keys:i,permissions:a})}}function $r({layout:s,keys:r,permissions:i}){const a=r[0],{children:f,permissions:u}=s;if(Ka(a,s)){if(r.shift(),r.length===0)return{...s,permissions:[...u||[],...i]};if(Array.isArray(f))return{...s,children:f.map(g=>$r({layout:g,keys:[...r],permissions:i}))};console.log(`can not handle ${r.join(".")}`)}return Array.isArray(f)?{...s,children:f.map(g=>$r({layout:g,keys:[...r],permissions:i}))}:s}function Ka(s,r){const{id:i,name:a}=r;return s===i||s===a}class Qa{static exec({config:r,keys:i,permissions:a}){const f=i.shift();let u=null;switch(f){case"buttons":{u=Ma;break}case"layout":{u=Va;break}default:{u=null;break}}return!u||typeof u.exec!="function"?r:{...r,[f]:u.exec({config:r[f],keys:[...i],permissions:a})}}}class Ga{static exec({config:r,keys:i,permissions:a}){Array.isArray(r)||console.log("can not handle these actions");const f=i.shift();return i.length!==0&&console.log(`can not handle ${i.join(".")}`),za({actions:r,key:f,permissions:a})}}function za({actions:s,key:r,permissions:i}){return s.map(a=>{if(Ya(r,a)){const f=a.permissions||[];return{...a,permissions:[...f,...i]}}return a})}function Ya(s,r){const{id:i,label:a}=r;return s===i||s===a}class Za{static exec({config:r,keys:i,permissions:a}){const f=i.shift();switch(f){case"actions":return{...r,actions:Xa({actions:r[f],keys:i,permissions:a})};default:return r}}}function Xa({actions:s,keys:r,permissions:i}){Array.isArray(s)||console.log("can not handle these actions");const a=r.shift();return r.length!==0?(console.log(`can not handle ${r.join(".")}`),s):s.map(f=>{if(Ja(a,f)){const u=f.permissions||[];return{...f,permissions:[...u,...i]}}return f})}function Ja(s,r){const{id:i,label:a}=r;return s===i||s===a}class ja{static exec({config:r,keys:i,permissions:a}){return Array.isArray(r)||console.log("can not handle these actions"),ds({headers:r,keys:i,permissions:a})}}function ds({headers:s,keys:r,permissions:i}){const a=r.shift();return s.map(f=>{if(eu(a,f)){const{permissions:u,children:g}=f;return r.length!==0?Array.isArray(g)&&g.length>0?{...f,children:ds({headers:g,keys:r,permissions:i})}:(console.log(`can not handle ${r.join(".")}`),f):{...f,permissions:[...u||[],...i]}}return f})}function eu(s,r){const{id:i,label:a,key:f}=r;return s===i||s===a||s===f}class tu{static exec({config:r,keys:i,permissions:a}){const f=i.shift();let u=null;switch(f){case"actions":{u=Ga;break}case"bulkAction":{u=Za;break}case"headers":{u=ja;break}default:{u=null;break}}return!u||typeof u.exec!="function"?r:{...r,[f]:u.exec({config:r[f],keys:[...i],permissions:a})}}}const nu={ElementQForm:Qa,ElementQList:tu};function ru({config:s,configPermissions:r=[],type:i}){return r.reduce((f,u)=>{const g=iu(i);if(!g||typeof g.exec!="function")return console.log("no config handler"),f;const{key:w,value:x}=u;return g.exec({config:f,keys:w.split("."),permissions:x})},s)}function iu(s){return nu[s]||null}var Zt={};Zt.d=(s,r)=>{for(var i in r)Zt.o(r,i)&&!Zt.o(s,i)&&Object.defineProperty(s,i,{enumerable:!0,get:r[i]})},Zt.o=(s,r)=>Object.prototype.hasOwnProperty.call(s,r);var j={};Zt.d(j,{sh:()=>Ds,Yc:()=>Jt,OS:()=>yu,Z8:()=>qn,lc:()=>Hr,kl:()=>Ws,Mg:()=>Ns,_x:()=>wu,yl:()=>Fs,l0:()=>_u,Yq:()=>hs,zn:()=>Cu,G8:()=>Je,pY:()=>_e,su:()=>Xt,Q6:()=>Us,UI:()=>kn,d:()=>Nr,Lv:()=>Ks,Qy:()=>$n,yO:()=>Qs});function Je(s,r,i,a){if(!s)return!0;if(typeof i!="function"||a&&typeof a!="function")return!1;const{key:f="",value:u,keyValuePath:g=""}=s,[w]=Object.keys(u);if(!f)switch(w){case"$and":return u.$and.reduce((S,R)=>S&&Je(R,r,i,a),!0);case"$or":return u.$or.reduce((S,R)=>S||Je(R,r,i,a),!1);default:return!1}let x=i(f,r);if(g){console.log("keyValuePath",g);const S=a.toObject(x);x=i(g,S)}switch(w){case"$empty":return x==null===u.$empty;case"$eq":return x===u.$eq;case"$gt":return x>u.$gt;case"$gte":return x>=u.$gte;case"$lt":return x<u.$lt;case"$lte":return x<=u.$lte;case"$in":return Array.isArray(x)?!!x.find(S=>u.$in.includes(S)):typeof x!="object"?!!u.$in.includes(x):!1;case"$inValue":{const S=i(u.$inValue,r),R=Array.isArray(S)?S:[];return Array.isArray(x)?!!x.find(B=>R.includes(B)):typeof x=="string"?!!R.includes(x):!1}case"$ne":return x!==u.$ne;case"$notIn":return Array.isArray(x)?!x.find(S=>u.$notIn.includes(S)):typeof x!="object"?!u.$notIn.includes(x):!1;case"$intervalTimeGt":{const S=new Date().getTime(),R=new Date(x).getTime();return S-R>u.$intervalTimeGt}case"$intervalTimeLt":{const S=new Date().getTime(),R=new Date(x).getTime();return S-R<u.$intervalTimeLt}case"$isToday":{const S=new Date,R=S.setHours(0,0,0,0),B=S.setHours(23,59,59,59),G=new Date(x).getTime();return(R<=G&&B>=G)===u.$isToday}case"$notInValue":{const S=i(u.$notInValue,r),R=Array.isArray(S)?S:[];return Array.isArray(x)?!x.find(B=>R.includes(B)):typeof x!="object"?!R.includes(x):!1}case"$range":{const[S,R]=u.$range;return typeof S=="number"&&typeof R=="number"&&x>=S&&x<=R}default:return!1}}function hs(s,r){const i=s&&s instanceof Date?s:new Date(s),a=["日","一","二","三","四","五","六"],f=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],u=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],g=r||"YYYY/MM/DD hh:mm",w=i.getDay(),x=u[w],S=a[w],R=f[w],B=i.getFullYear(),G=i.getMonth()+1,de=i.getDate(),he=i.getHours(),Pe=i.getMinutes(),ge=i.getSeconds();return g.replace("YYYY",B).replace("MM",Ge(G)).replace("MM",Ge(G)).replace("DD",Ge(de)).replace("hh",Ge(he)).replace("mm",Ge(Pe)).replace("ss",Ge(ge)).replace("M",G).replace("D",de).replace("h",he).replace("m",Pe).replace("s",ge).replace("EEEE",Ge(R)).replace("EEE",Ge(S)).replace("EE",Ge(x)).replace("E",Ge(w))}function Ge(s){return s<10?`0${s}`:s}function _e(s,r){let i=s,a=r;if(typeof s=="string"&&(i=i.split(".")),!Array.isArray(s)&&typeof s=="object"){const{keys:u,obj:g}=s;i=u,a=g}if(i.length===0)return a;const f=i.shift();return a&&Object.prototype.hasOwnProperty.call(a,f)?_e(i,a[f]):a&&f?a[f]:a}const ee={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 Z extends Error{constructor(r){super(r),this.message=r}}const su="_EMPTY",gs=["get","map","join","concatIf","exec","filterOne","filterAll","formatDate","eq","neq","gt","lt","gte","lte","isEmpty","isNotEmpty","toLowerCase","toUpperCase"],ms="_HIDE",ou="_NOT_EMPTY",fe="_SELF",lu=["<%=","%>"],au=["{{","}}"];function ps(s,r){if(typeof s!="string")throw new Z(`_concatIf: ${ee.argumentFormatException}: the data must be string :${s.join(", ")}`);if(r.length!==3)throw new Z(`_concatIf: ${ee.argumentFormatException}: ${r.join(", ")}`);if(s===null||typeof s>"u")return null;const[i,a,f]=r;if([su,ou].includes(i)||a.length!==2)throw new Z(`concatIf: ${ee.argumentEmptyException}: ${i}, ${a}`);return s===""&&f.includes(ms)?"":s!==""&&(s!==null||s!==void 0)&&f.includes(ms)?`${a[0]}${s}${a[a.length-1]}`:f}function _s(s,r){if(r.length!==3)throw new Z(`eq: ${ee.argumentFormatException}: ${r.join(", ")}`);if(s===null||typeof s>"u")return null;r.includes(fe)&&(r=r.map(a=>a===fe?s:a));const i=r[0];return s===i?r[1]:r[2]}function uu(s,r){try{const[i,...a]=r;return s[i](...a)}catch(i){throw i}}function qr(s,r){try{if(!Array.isArray(r)||r.length===0)throw new Z(ee.argumentEmptyException);return!Array.isArray(s)||s.length===0?[]:typeof s[0]=="object"?ys(s,r):typeof s[0]=="string"||typeof s[0]=="number"?cu(s,r):[]}catch(i){throw i}}function cu(s,r){const i=r.flat();return s.filter(a=>i.some(f=>vs(f,a)))}function ys(s,r){if(r.length===1){const u=r[0];return s.filter(g=>u.includes(".")?_e(u.split("."),g):Object.prototype.hasOwnProperty.call(g,u))}if(r.length>2){let u=s;for(let g=0;g<r.length;g+=2){const w=[r[g],r[g+1]];u=ys(u,w)}return u}const[i,...a]=r,f=a.flat();return s.filter(u=>{const g=i.includes(".")?_e(i.split("."),u):u[i];return f.some(w=>vs(w,g))})}function vs(s,r){if(s===void 0&&r===void 0||s===null&&r===null)return!0;if(typeof s=="boolean")return s===r;if(s===""||s==="*")return r==null?!1:typeof r=="string"?s===""?r==="":r!=="":Array.isArray(r)?s===""?r.length===0:r.length!==0:s!=="";if(fu(s))return s===r;if(s.startsWith("[")&&s.endsWith("]"))return s==="[]"?Array.isArray(r)&&r.length===0:s==="[*]"?Array.isArray(r)&&r.length!==0:!1;const{operator:i,value:a}=du(s);if(!i||a!==0&&!a)return!1;switch(i){case">":return r>a;case"<":return r<a;case"!=":return r!==a;case">=":return r>=a;case"<=":return r<=a;default:return!1}}function fu(s){return typeof s=="string"?!(s.startsWith("[")&&s.endsWith("]")||/!=|>=|<=|>|</.test(s)):!Number.isNaN(s)}function du(s){const i=["!=",">=","<=",">","<"].find(u=>s.startsWith(u));if(!i)return{operator:null,value:null};const a=s.slice(i.length);if(/^[a-zA-Z]*$/.test(a)&&i!=="!=")return{operator:null,value:null};const f=!Number.isNaN(parseFloat(a))&&!Number.isNaN(a)?Number(a):a;return{operator:i,value:f}}function hu(s,r){try{const i=qr(s,r);if(i.length===1)return i[0];if(i.length===0)return null;throw new Z(ee.resultMoreThanOneException)}catch(i){throw i}}function ws(s,r){if(r.length===0)throw new Z(`_formateDate: ${ee.argumentFormatException}: format parts must be not empty array`);if(s==null)return null;const i=new Date(s),a={yyyy:String(i.getFullYear()),mm:String(i.getMonth()+1).padStart(2,"0"),dd:String(i.getDate()).padStart(2,"0")},f=["yyyy","mm","dd"];if(r.filter(g=>g.length>1&&!f.includes(g)).length>0)throw new Z(`_formateDate: ${ee.argumentFormatException}: the format type is not valid: ${r.join(", ")}`);return r.reduce((g,w)=>g+(a[w]||w),"")}function On(s,r,i=null){try{if(r===null||typeof r>"u"||r==="")throw new Z(ee.argumentEmptyException);if(s===null)return null;if(r.includes(".")){const a=r.split(".");if(a.length>1){const f=a.shift(),u=a.join(".");return typeof s[f]<"u"?On(s[f],u,i):Cs(r,i)}}return typeof s[r]<"u"?s[r]:Cs(r,i)}catch(a){throw a}}function Cs(s,r){return r!==null?r:null}function Es(s,r){if(r.length!==3)throw new Z(`_gt: ${ee.argumentFormatException}: ${r.join(", ")}`);if(s===null||typeof s>"u")return null;r.includes(fe)&&(r=r.map(a=>a===fe?s:a));const i=r[0];return s>i?r[1]:r[2]}function bs(s,r){if(r.length!==3)throw new Z(`_gte: ${ee.argumentFormatException}: ${r.join(", ")}`);if(s===null||typeof s>"u")return null;r.includes(fe)&&(r=r.map(a=>a===fe?s:a));const i=r[0];return s>=i?r[1]:r[2]}function As(s,r){if(r.length!==2)throw new Z(`_isEmpty: ${ee.argumentFormatException}: ${r.join(", ")}`);return r.includes(fe)&&(r=r.map(i=>i===fe?s:i)),s!==null&&typeof s=="object"&&Object.keys(s).length===0||s===""||s===null||s===void 0||s.length===0?r[0]:r[1]}function xs(s,r){if(r.length!==2)throw new Z(`_isNotEmpty: ${ee.argumentFormatException}: ${r.join(", ")}`);return r.includes(fe)&&(r=r.map(i=>i===fe?s:i)),s!==null&&typeof s=="object"&&Object.keys(s).length===0||Array.isArray(s)&&s.length===0||typeof s=="string"&&s===""||s==null?r[1]:r[0]}function Ss(s,r){try{return s.length===0?"":s.length===1?Rs(s[0]):s.map(i=>Rs(i)).join(r)}catch(i){throw i}}function Rs(s){return JSON.stringify(s).replace(/"([^"]+)":/g,"$1: ").replace(/"([^"]+)"/g,"$1").replace(/,/g,", ")}function Os(s,r){if(r.length!==3)throw new Z(`_lt: ${ee.argumentFormatException}: ${r.join(", ")}`);if(s===null||typeof s>"u")return null;r.includes(fe)&&(r=r.map(a=>a===fe?s:a));const i=r[0];return s<i?r[1]:r[2]}function ks(s,r){if(r.length!==3)throw new Z(`_lte: ${ee.argumentFormatException}: ${r.join(", ")}`);if(s===null||typeof s>"u")return null;r.includes(fe)&&(r=r.map(a=>a===fe?s:a));const i=r[0];return s<=i?r[1]:r[2]}function $s(s,r){try{if(r.length===0)throw new Z(ee.argumentEmptyException);return s===null||typeof s>"u"?null:s.reduce((a,f)=>{r.length===1&&Array.isArray(r[0])&&(r=r[0],a.hasFormat=!0);const u=r.map(g=>{if(g.includes(".")){const w=g.split("."),x=w[0];w.shift();const S=w.join(".");return On(f[x],S)}return typeof f[g]<"u"?f[g]:null});return a.hasFormat?a.content.push(u):a.content=a.content.concat(u),a},{content:[],hasFormat:!1}).content}catch(i){throw i}}function qs(s,r){if(r.length!==3)throw new Z(`_neq: ${ee.argumentFormatException}: ${r.join(", ")}`);if(s===null||typeof s>"u")return null;r.includes(fe)&&(r=r.map(a=>a===fe?s:a));const i=r[0];return s!==i?r[1]:r[2]}function Bs(s,r){if(r!==void 0)throw new Z(`_toLowerCase: ${ee.argumentFormatException}: ${r.join(", ")}`);return s===null||typeof s>"u"||typeof s!="string"?null:String(s).toLowerCase()}function Ls(s,r){if(typeof s!="string")throw new Z(`_toUpperCase: ${ee.argumentFormatException}: the data must be string: ${s}`);if(r!==void 0)throw new Z(`_toUpperCase: ${ee.argumentFormatException}: the argument must be empty: ${r.join(", ")}`);return s===null||typeof s>"u"||typeof s!="string"?null:String(s).toUpperCase()}class Ns{constructor(r){this.data=r}static init(r){return new this(r)}static initFromArray(r=[]){return Array.isArray(r)?r.map(i=>this.init(i)):[]}static initOnlyValidFromArray(r=[]){return this.initFromArray(r).filter(i=>i)}static concatIf(r,i){return ps(r,i)}static eq(r,i){return _s(r,i)}static filterAll(r,i){return qr(r,i)}static formatDate(r,i){return ws(r,i)}static get(r,i,a=null){return On(r,i,a)}static gt(r,i){return Es(r,i)}static gte(r,i){return bs(r,i)}static isEmpty(r,i){return As(r,i)}static isNotEmpty(r,i){return xs(r,i)}static join(r,i=""){return Ss(r,i)}static lt(r,i){return Os(r,i)}static lte(r,i){return ks(r,i)}static map(r,i=[]){return $s(r,i)}static neq(r,i){return qs(r,i)}static toLowerCase(r,i){return Bs(r,i)}static toUpperCase(r,i){return Ls(r,i)}static parseFunction(r){return Ts(r,gs)}pipe(r=""){this.delimiters=r.substring(0,2)==="{{"?au:lu;const i=new RegExp(`${this.delimiters[0]}\\s(.*?)\\s${this.delimiters[1]}`),a=r.match(i);if(a!==null)try{return Ts(a[1],gs).reduce((u,g)=>pu(u,g.name,g.args),this.data)}catch(f){throw new Z(`TemplateCompiler engine error: ${f.message}`)}throw new Z(`TemplateCompiler engine error: ${ee.invalidRegExpException}`)}}function Ts(s,r){const i=new RegExp(/(\w+)\(([^)]*)\)/);let a;return s.includes("|")?a=s.split("|"):a=[s],a.reduce((f,u)=>{const g=u.match(i);if(g!==null){const w=g[1],x=g[2],S=gu(x);if(r.includes(w))f.push({name:w,args:S});else throw new Z(`${w} is not a valid function`)}return f},[])}function gu(s){const r=s.trim(),i=new RegExp(/^[^\w\d\s]+$/);return r.match(i)!==null?[r.substring(1,r.length-1)]:r.includes(",")?mu(r).map(u=>Hs(u)):[Hs(r)]}function mu(s){const r=new RegExp(/^\d+(\.\d+)?$/),i=new RegExp(/(?![^\[]*\])\s*,\s*/);return s.split(i).map(f=>{const u=f.trim();return u!==""&&u.match(r)?Number.isNaN(u)?u:parseInt(u,10):u})}function Hs(s){if(typeof s=="string"){if(s.startsWith('"')&&s.endsWith('"'))return s.substring(1,s.length-1);const r=Is(s);if(typeof r!="string")return r;if(r.startsWith("[")&&r.endsWith("]")){const i=r.substring(1,r.length-1).trim();return i!==""?i.split(",").map(a=>Is(a.trim())):[]}return s}return s}function Is(s){if(s.startsWith('"')&&s.endsWith('"'))return s.substring(1,s.length-1);if(s==="true")return!0;if(s==="false")return!1;if(s!=="undefined")return s==="null"?null:!Number.isNaN(s)&&!Number.isNaN(Number.parseFloat(s))?Number(s):s}function pu(s,r,i){try{let a;switch(r){case"exec":return uu(s,i);case"get":if(i.length>2)throw new Z(ee.argumentFormatException);return i.length===2&&(a=i[i.length-1]),On(s,i[0],a);case"join":return Ss(s,i[0]);case"map":return $s(s,i);case"concatIf":return ps(s,i);case"filterOne":return hu(s,i);case"filterAll":return qr(s,i);case"formatDate":return ws(s,i);case"eq":return _s(s,i);case"neq":return qs(s,i);case"gt":return Es(s,i);case"gte":return bs(s,i);case"lt":return Os(s,i);case"lte":return ks(s,i);case"isEmpty":return As(s,i);case"isNotEmpty":return xs(s,i);case"toLowerCase":return Bs(s);case"toUpperCase":return Ls(s);default:throw new Error(`${r} is not a valid function`)}}catch(a){throw a}}function Fs(s,r){return s.reduce((i,a)=>{const{type:f,value:u="",restriction:g,template:w,format:x,showMinutes:S}=a;switch(f){case"label":{Je(g,r,_e)&&(i+=u.toString());break}case"value":{if(Je(g,r,_e)){const R=_e(u.split("."),r)||"";i+=R.toString()}break}case"array":{if(Je(g,r,_e)){const R=_e(u.split("."),r)||[];i+=R.reduce((B,G)=>B+=Fs(w,G),"")}break}case"ellipsis":{if(Je(g,r,_e)){const{maxLength:R}=a,B=_e(u.split("."),r)||"";B.length<=R?i+=B.toString():i+=`${B.substr(0,R)}...`}break}case"date":{if(Je(g,r,_e)){const R=_e(u.split("."),r)||"";i+=hs(R,x).toString()}break}case"templateCompiler":{if(Je(g,r,_e)){const R=new Ns({data:r});i+=R.pipe(u)}break}}return i},"")}function _u(s,r=/\$\{(.+?)\}/g,i,a){if(!s)return"";let f=typeof a!="function"?a:_e;const u=new RegExp(r,"g");return s.replace(u,(g,w)=>{const x=f({keys:w.split("."),obj:i});return x==null?"":typeof x=="object"?JSON.stringify(x):x})}const kn={get(s,r){return r.split(".").reduce((a,f)=>{if(f.endsWith("[]")){const u=f.slice(0,-2);return Array.isArray(a[u])?a[u]:[]}if(f.includes("[")&&f.includes("]")){const u=f.match(/(\w+)\[(\d+)\]/);if(u){const g=u[1],w=u[2];return a&&a[g]&&a[g][w]}}else return a&&Array.isArray(a)?a.map(u=>u[f]):a&&a[f]},s)},merge:Br,set(s,r,i){const a=r.split(".");let f=s;for(let g=0;g<a.length-1;g++){const w=a[g];if(w.endsWith("[]")){const x=w.slice(0,-2);Array.isArray(f[x])&&f[x].forEach(S=>set(S,a.slice(g+1).join("."),i));return}if(w.includes("[")&&w.includes("]")){const x=w.match(/(\w+)\[(\d+)\]/);if(x){const S=x[1],R=x[2];if(Array.isArray(f[S])&&f[S][R])f=f[S][R];else return}}else f[w]||(f[w]={}),f=f[w]}const u=a[a.length-1];f[u]=i}};function Br(s,...r){if(!r.length)return s;const i=r.shift();if(Lr(s)&&Lr(i))for(const a in i)Lr(i[a])?(s[a]||(s[a]={}),Br(s[a],i[a])):s[a]=i[a];return Br(s,...r)}function Lr(s){return s&&typeof s=="object"&&!Array.isArray(s)}async function Nr(s,r,i){return new Promise((a,f)=>{const u=s[Symbol.iterator]();let g=0;const w=async x=>{const S=u.next();if(S.done){a(x);return}try{const[R,B]=await Promise.all([x,S.value]);w(r(R,B,g++))}catch(R){f(R)}};w(i)})}class Ds{constructor(r={}){r=r||{},this._data=r.data||r._data||[],this.err=r.err,this.isNew=r.isNew||!1,this.message=r.message,this.total=r.total||0,this._instanceBuilder=r._instanceBuilder}static init(r={}){return r instanceof this?r:new this(r)}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 Xt({repo:s,result:r}){return Ds.init({...r,_instanceBuilder:i=>s.init(i)})}class Jt{constructor(r={}){r=r||{},this.key=r.key||null,this.value=typeof r.value<"u"?r.value:""}static init(r={}){if(r instanceof this)return r;const i=new this(r);return i.isValid?i:null}static initFromArray(r=[]){return Array.isArray(r)?r.map(i=>this.init(i)):[]}static initOnlyValidFromArray(r=[]){return this.initFromArray(r).filter(i=>i)}static get _classname(){return"KeyValueObject"}static get _superclass(){return"KeyValueObject"}static addItem(r,i,a){r.push(this.init({key:i,value:a}))}static addRecord(r=[],i,a){return this.hasKeyValue(r,i,a)||r.push(this.init({key:i,value:a})),r}static appendRecord(r=[],i,a){return r.map(f=>(this.sameKey(f,i)&&(f.value=[...f.value,...a]),f))}static appendValueArray(r=[],i,a){return r.map(f=>(this.sameKey(f,i)&&(f.value=[...f.value,...a]),f))}static foundByKey(r=[],i){return r.find(f=>this.sameKey(f,i))||null}static foundValueByKey(r=[],i){const a=this.foundByKey(r,i);return a?a.value:null}static fromObject(r={}){return Object.keys(r).reduce((i,a)=>(i.push(this.init({key:a,value:r[a]})),i),[])}static getValueByKey(r=[],i){return this.foundValueByKey(r,i)}static getValueByKeyFromArray(r=[],i){if(r.length===0)return null;const f=r.shift().find(u=>this.sameKey(u,i));return f&&f.value?f.value:this.getValueByKeyFromArray(r,i)}static getValuesByKey(r=[],i){return r.reduce((a,f)=>(this.sameKey(f,i)&&a.push(f.value),a),[])}static hasKeyValue(r=[],i,a){return typeof a>"u"?r.filter(f=>this.sameKey(f,i)).length>0:r.filter(f=>this.sameKey(f,i)&&Ps(f.value,a)).length>0}static insertOrUpdateRecord(r=[],i,a){let f=[...r];return this.hasKeyValue(r,i)?f=this.updateRecord(r,i,a):f.push(this.init({key:i,value:a})),f}static keys(r=[]){return Array.isArray(r)?r.reduce((i,a)=>(i.push(a.key),i),[]):[]}static merge(r,i){return(i||[]).map(a=>{const f=r.find(u=>u.key===a.key);f?f.value=(f.value||[]).concat(a.value):r.push(a)}),r}static removeByKey(r,i){return r.reduce((a,f)=>(this.sameKey(f,i)||a.push(f),a),[])}static sameKey(r,i){return Ps(r.key,i)}static toObject(r=[]){return Array.isArray(r)?r.reduce((i,a)=>(i[a.key]=a.value,i),{}):{}}static toString(r=[],i="; "){return Array.isArray(r)?r.reduce((a,f)=>(a.push(`${f.key}: ${f.value}`),a),[]).join(i):""}static updateRecord(r=[],i,a){return r.map(f=>this.sameKey(f,i)?{...f,value:a}:f)}static updateOrInsertRecord(r=[],i,a){return this.insertOrUpdateRecord(r,i,a)}static updateRecordsFromArray(r=[],i=[]){if(Array.isArray(r)&&Array.isArray(i)){const a=this.toObject(r),f=this.toObject(i);return this.fromObject({...a,...f})}return[]}static values(r=[]){return Array.isArray(r)?r.reduce((i,a)=>(i.push(a.value),i),[]):[]}get isValid(){return!!this.key}get toObject(){const r={};return this.isValid&&(r[this.key]=this.value),r}}function Ps(s,r){return s===r}function $n(s,r="_"){return s===null||typeof s>"u"||typeof s.toString>"u"?null:s.toString().trim().toUpperCase().replace("-",r).replace(" ",r)}const Tr="_";class yu extends Jt{static init(r={}){if(r instanceof this)return r;const i=new this({...r,key:$n(r.key,Tr)});return i.isValid?i:null}static get _classname(){return"Metadata"}static merge(r,i){return(i||[]).map(a=>{const f=r.find(u=>Ms(u.key,a.key));f?f.value=(f.value||[]).concat(a.value):r.push(a)}),r}static sameKey(r,i){return Ms(r.key,i)}}function Ms(s,r){return $n(s,Tr)===$n(r,Tr)}const vu=["attributes","ref"];class qn{constructor(r={}){r=r||{},this.attributes=Jt.initOnlyValidFromArray(r.attributes),this.ref=r.ref||{}}static get _classname(){return"QMeta"}static get _superclass(){return"QMeta"}static init(r={}){return r instanceof qn?r:new qn(r)}addAttribute(r){const i=Jt.init(r);if(!i)throw new Error("invalid meta attribute");return this.attributes.push(i),this}update(r){return Object.keys(r).forEach(i=>{vu.includes(i)&&(i==="attributes"?this[i]=Jt.initOnlyValidFromArray(r[i]):this[i]=r[i])}),this}}class Hr{constructor(r){r=r||{},this.model=r.model,this._sharedOptions=r._sharedOptions,this._queryOptions=r._queryOptions,this._saveOptions=r._saveOptions,this._Class=r._constructor&&r._constructor._Class?r._constructor._Class:null}static init(r={}){if(r instanceof this)return r;const i=new this(r);return i.isValid?i:null}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(r){return this._Class&&typeof this._Class.init=="function"?this._Class.init(r):r}async deleteOne({id:r}){try{return{...await this.model.deleteOne({_id:r}),isNew:!1,data:[]}}catch(i){throw i}}findAll({query:r,systemLog:i}){const a=Bn({systemLog:i,label:"REPO_READ",message:`fn ${this._classname}.prototype.findAll`,input:[{query:{...r},systemLog:{...i}}]});return new Promise((f,u)=>{this.model.findAll(r,this.queryOptions,(g,w,x)=>{if(g)a({level:"warn",output:g.toString()}),u(g);else{const S={isNew:!1,data:w,total:x||w.length};a({level:"info",output:{...S}}),f(S)}})})}findOne({query:r,systemLog:i}){const a=Bn({systemLog:i,label:"REPO_READ",message:`fn ${this._classname}.prototype.findOne`,input:[{query:{...r},systemLog:{...i}}]});return new Promise((f,u)=>{this.model.findAll(r,this.queryOptions,(g,w)=>{if(g)u(g);else if(w.length===1){const x={isNew:!1,data:w,total:1};a({level:"info",output:{...x}}),f(x)}else w.length===0?u(new Error("record not found")):u(new Error("more than one is found"))})}).catch(f=>{throw a({level:"warn",output:f.toString()}),f})}saveAll({docs:r,systemLog:i}){let a;const f=Bn({systemLog:i,label:"REPO_WRITE",message:`fn ${this._classname}.prototype.saveAll`,input:[{docs:[...r],systemLog:{...i}}]});return(typeof this.model.saveAll=="function"?this.model.saveAll({docs:r}):Promise.all(r.map(async g=>{if(g){const w=await this.saveOne({doc:g});return a=w.isNew,(w._data||w.data)[0]}return null}))).then(g=>{g.length!==1&&(a=null);const w={data:g,isNew:a,total:g.length};return f({level:"info",output:{...w}}),w}).catch(g=>{throw f({level:"warn",output:g.toString()}),g})}saveOne({doc:r,systemLog:i}){const a=Bn({systemLog:i,label:"REPO_WRITE",message:`fn ${this._classname}.prototype.saveOne`,input:[{doc:{...r},systemLog:{...i}}]});return new Promise((f,u)=>{this.model.saveOne(r,this.saveOptions,(g,w)=>{g?(a({level:"warn",output:g.toString()}),u(g)):(a({level:"info",output:{...w}}),f(w))})})}}function Bn({systemLog:s,label:r,message:i,input:a}={}){return({level:f,messgae:u,output:g}={})=>{s&&s.systemLogHelper&&s.systemLogHelper.log({batchId:s.batchId,label:r,level:f,message:u||i,data:{payload:{input:a,output:g}}})}}class Ws{constructor({repo:r}){this.repo=r}static get _classname(){return"Service"}static get _superclass(){return"Service"}deleteOne({id:r}){return this.repo.deleteOne({id:r}).catch(()=>{throw new Error(`Not found for query: ${r}`)})}async findAll({query:r={},systemLog:i}={}){const a=await this.repo.findAll({query:r,systemLog:i});return Xt({repo:this.repo,result:a})}async findOne({query:r={},systemLog:i}={}){const a=await this.repo.findOne({query:r,systemLog:i});return Xt({repo:this.repo,result:a})}init(r){return this.repo.init(r)}initFromArray(r=[]){return Array.isArray(r)?r.map(i=>this.init(i)):[]}initOnlyValidFromArray(r=[]){return this.initFromArray(r).filter(i=>i)}async saveAll({docs:r=[],systemLog:i}={}){const a=r.map(u=>this.init(u)),f=await this.repo.saveAll({docs:a,systemLog:i});return Xt({repo:this.repo,result:f})}async saveOne({doc:r={},systemLog:i}={}){const a=this.init(r);if(a){const f=await this.repo.saveOne({doc:a,systemLog:i});return Xt({repo:this.repo,result:f})}return{isNew:null,data:[],err:new Error("doc is not a valid instance")}}}function Us({repo:s}){if(s===void 0)throw new Error("repo is required.");if(s._superclass!==Hr._superclass)throw new Error("repo is not an instance of Repo.");return new Ws({repo:s})}class wu{static get _classname(){return"UniqueKeyGenerator"}static get _superclass(){return"UniqueKeyGenerator"}static makeFormatter({fieldName:r,format:i,options:a}){switch(i){case"set_code":return Vs(r);default:return Vs(r)}}static makeGenerator(r){const i=r.map(a=>this.makeFormatter(a));return async a=>await Nr(i,async(u,g)=>{const w=await g(a);return Object.assign(u,w)},a)}}function Vs(s,r){return async(i={})=>i[s]?{}:{[s]:Qs.setCode()}}async function Cu({body:s={},GeneralModel:r,UniqueKeyGenerator:i,resourceInfo:a}){const{resources:f,data:u,globalShared:g={},shared:w={},relationship:x={}}=s,S=a||s.resourceInfo;return Eu(u,g,w),await Nr(f,async(B,G)=>{const de=Au(G,S,i,r);bu(u,x[G],B);const he=u[G],Pe=await de.saveAll({docs:[].concat(he)});return B[G]=Array.isArray(he)?Pe._data:Pe._data[0],B},{})}function Eu(s,r={},i={}){Object.keys(i).forEach(a=>{const f=s[a];s[a]=kn.merge({},f,r,i[a]||{})})}function bu(s,r={},i){Object.keys(r).forEach(a=>{const f=r[a],u=kn.get(i,f);kn.set(s,a,u)})}function Au(s,r,i,a){const{collectionName:f,fields:u}=r[s],g=i.makeGenerator(u),w=new a({collectionName:f,uniqueKeyGenerator:g});return Us({repo:new Hr({model:w})})}function Ks(s,r=6){return s=s.toString(),s.length<r?Ks("0"+s,r):s}function xu(s,r=34){const i=Ru(r);return Su(s,i)}function Su(s,r){let i=r.byCode;if(s===0)return i[0];for(var a="",f=r.length;s>0;)a=i[s%f]+a,s=Math.floor(s/f);return a}function Ru(s){let r="9876543210ABCDEFGHJKLMNPQRSTUVWXYZ";return s===58&&(r="9876543210ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz"),Ou(r)}function Ou(s){var r={},i={},a=s.length,f,u;for(f=0;f<a;f++)u=s[f],r[f]=u,i[u]=f;return{byCode:r,byChar:i,length:a}}function ku({len:s=16,pattern:r="a1"}={}){const i="ABCDEFGHIJKLMNOPQRSTUVWXYZ",a="abcdefghijklmnopqrstuvwxyz",f="1234567890",u="~!@#$%^&*_+-=";let g="";r.includes("A")&&(g+=i),r.includes("a")&&(g+=a),r.includes("1")&&(g+=f),r.includes("#")&&(g+=u);const w=[...g];return[...Array(s)].map(x=>w[Math.random()*w.length|0]).join``}function $u(s){return typeof s!="string"&&(s=s.toString()),s.split("").reverse().join("")}function qu(s=34){const r=new Date().valueOf(),i=ku({len:8,pattern:"1"}),a=$u(`${r}${i}`);return xu(a,s)}const Qs={setCode:qu};j.sh;var Gs=j.Yc;j.OS,j.Z8,j.lc,j.kl,j.Mg,j._x,j.yl;var Bu=j.l0;j.Yq,j.zn;var Lu=j.G8,Nu=j.pY;j.su,j.Q6,j.UI,j.d,j.Lv,j.Qy,j.yO;function Ln({keys:s,obj:r}){return Nu(s,r)}function Tu(s,r,i){return Bu(s,r,i,Ln)}function Ir({rule:s,data:r}){return Lu(s,r,Hu,Gs)}function Hu(s,r){const i=s.split(".");return Ln({keys:i,obj:r})}function Fr(s,r){return Iu(s,r,Ln,Ir)}function Iu(s,r,i,a){return!Array.isArray(s)||s.length===0?"":s.reduce((f,u)=>{const{type:g,value:w="",restriction:x,template:S}=u;if(a({rule:x,data:r}))switch(g){case"label":{f+=w.toString();break}case"value":{const R=i({keys:w.split("."),obj:r})||"";f+=R.toString();break}case"array":{const R=i({keys:w.split("."),obj:r})||[];f+=R.reduce((B,G)=>B+=Fr(S,G),"");break}case"group":{f+=Fr(S,r);break}case"ellipsis":{const{maxLength:R}=u,B=i({keys:w.split("."),obj:r})||"";B.length<=R?f+=B.toString():f+=`${B.substr(0,R)}...`;break}default:{f+=w.toString();break}}return f},"")}function Dr(s){return`${s}-${Math.floor(Math.random()*1e9)}`}const Fu=Object.freeze(Object.defineProperty({__proto__:null,KeyValueObject:Gs,convertString:Tu,getStringByArr:Fr,getValidation:Ir,getValueByKeys:Ln,setId:Dr},Symbol.toStringTag,{value:"Module"}));class Pr{constructor(r={}){this.css=r.css,this.configType="Config"}get isValid(){return!!this}static init(r){const i=new this(r);return i.isValid?i:null}}function Du(s,r){const{button:i,klass:a}=s,{element:f}=r,u=f.getState()||{},{formData:g={}}=u;class w extends a{constructor(S){super(S),this.hidden=S.hidden||!1,this.permissionResult=S.permissionResult,this.permissionResultHandler(this.permissionResult)}get isValid(){return!this.hidden&&super.isValid}static init(S,R){if(S instanceof w)return S;const B=S.permissions?R.permissionHandler(S.permissions,g):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},G=new w({...S,permissionResult:B});return G.isValid?G:null}permissionResultHandler(S){const{event:R,isAllowCreate:B,isAllowRead:G,isAllowUpdate:de,isAllowDelete:he}=S;R?typeof this[R]=="function"?this[R]({val:!0}):console.log(`do not have the event ${R}`):B&&G&&de&&he||this.setHidden({val:!0})}setDisabled({val:S}){this.disabled=S}setHidden({val:S}){this.hidden=S}}return w.init(i,r)}function Pu(s,r){const{layout:i,klass:a}=s,{element:f}=r,u=f.getState()||{},{formData:g={}}=u;class w extends a{constructor(R){super(R),this.permissionResult=R.permissions?r.permissionHandler(R.permissions,g):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},this.permissionResultHandler(this.permissionResult)}permissionResultHandler(R){const{event:B,isAllowCreate:G,isAllowRead:de,isAllowUpdate:he,isAllowDelete:Pe}=R;B?typeof this[B]=="function"?this[B]({val:!0}):console.log(`do not have the event ${B}`):de?he||this.setPreview({val:!0}):this.setHidden({val:!0}),Array.isArray(this.children)&&this.children.forEach(ge=>{ge.permissionResultHandler(R)})}setDecoratorDisabled({val:R}){this.setDisabled({val:R})}setDecoratorHidden({val:R}){this.setHidden({val:R})}setDecoratorPreview({val:R}){this.setPreview({val:R})}}return w.init(i)}function Mu(s){return r=>{const{type:i}=r;switch(i){case"button":return Du(r,s);case"node":return Pu(r,s);default:return null}}}class zs extends Pr{constructor(r={}){super(r),this.configType="ElementQFormConfig",this.buttons=r.buttons,this.css=r.css||{},this.disabledForm=r.disabledForm||!1,this.eventName=r.eventName||{},this.formHandler=Mu(r.helpers),this.layout=r.layout,this.previewForm=r.previewForm||!1,this.updateLayoutConfigs=r.updateLayoutConfigs||[]}get isValid(){return!!this}static init(r){const i=new this(r);return i.isValid?i:null}}function Wu({helpers:s}){const{element:r}=s,{getClasses:i}=r.getHandlers(),{Cell:a}=s.qGrid;class f extends a{constructor(g){super(g),typeof g.hidden=="function"?this.permissionHidden=g.hidden(this.item.item,this):this.permissionHidden=g.hidden||!1,this.permissionResult=g.permissionResult,this.permissionResultHandler(this.permissionResult,g.customComponentName)}get isValid(){return this.permissionHidden===!1}static init(g){const{permissions:w}=g,x=w?s.permissionHandler(w):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},S=new this({...g,permissionResult:x});return S.isValid?S:null}permissionResultHandler(g,w){const{event:x,isAllowCreate:S,isAllowRead:R,isAllowUpdate:B,isAllowDelete:G}=g;if(x){typeof this[x]=="function"?this[x]({val:!0}):console.log(`do not have the event ${x}`);return}(!(w==="q-grid-body-row-cell-button")&&!R||!(S&&R&&B&&G))&&this.setHidden({val:!0})}setHidden({val:g}){this.permissionHidden=g}}return typeof i!="function"?{Cell:f}:i({helpers:{Cell:f,...s}})}class Ys extends Pr{constructor(r={}){super(r),this.configType="ElementQGridConfig",this.classes=Wu({helpers:r.helpers}),this.converter=Uu({helpers:r.helpers}),this.eventName=r.eventName,this.layout=r.layout,this.fillLastRow=r.fillLastRow,this.placeholder=r.placeholder,this.urlDelegate=r.urlDelegate}get isValid(){return!!this}static init(r){const i=new this(r);return i.isValid?i:null}}function Uu({helpers:s}){const{element:r}=s,{converter:i}=r.getHandlers();if(typeof i!="function")return f=>f;const{QItem:a}=s.qGrid;return i({helpers:{QItem:a,...s}})}function Vu({helpers:s}){const{QListBulkButton:r}=s.qList,{getValidation:i}=s.qUtilities;class a extends r{constructor(u){super(u),this.hidden=u.hidden||!1,this.permissionResult=u.permissionResult,this.permissionResultHandler(this.permissionResult)}get isValid(){return!this.hidden}static init(u,g){if(u instanceof a)return u;const{restriction:w,permissions:x}=u,S=g.controller.getState();if(!i({rule:w,data:S}))return null;const R=x?g.permissionHandler(x):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},B=new a({...u,permissionResult:R});return B.isValid?B:null}static initFromArray(u,g){return Array.isArray(u)?u.map(w=>this.init(w,g)):[]}static initOnlyValidFromArray(u,g){return this.initFromArray(u,g).filter(w=>w)}permissionResultHandler(u){const{event:g,isAllowCreate:w,isAllowRead:x,isAllowUpdate:S,isAllowDelete:R}=u;g?typeof this[g]=="function"?this[g]({val:!0}):console.log(`do not have the event ${g}`):w&&x&&S&&R||this.setHidden({val:!0})}setHidden({val:u}){this.hidden=u}}return a}function Ku({helpers:s}){const{QListButton:r}=s.qList;class i extends r{constructor(f){super(f),this.endpoint=Zs(f.endpoint,f.qRow),this.httpMethod=f.httpMethod,this.hidden=f.hidden||!1,this.permissionResult=f.permissionResult,this.permissionResultHandler(this.permissionResult),this.url=Zs(f.url,f.qRow)}get isValid(){return!this.hidden&&super.isValid}static init(f,u){if(f instanceof i)return f;const g=f.permissions?u.permissionHandler(f.permissions,f.qRow.get()):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},w=new i({...f,permissionResult:g});return w.isValid?w:null}static initFromArray(f,u){return Array.isArray(f)?f.map(g=>this.init(g,u)):[]}static initOnlyValidFromArray(f,u){return this.initFromArray(f,u).filter(g=>g)}permissionResultHandler(f){const{event:u,isAllowCreate:g,isAllowRead:w,isAllowUpdate:x,isAllowDelete:S}=f;u?typeof this[u]=="function"?this[u]({val:!0}):console.log(`do not have the event ${u}`):g&&w&&x&&S||this.setHidden({val:!0})}setHidden({val:f}){this.hidden=f}}return i}function Zs(s,r){if(!s)return"";const i=/\$\{(.+?)\}/g;return s.replace(i,(a,f)=>r.get(f.trim()))}function Qu(){class s{constructor(i){Object.keys(i).forEach(a=>{this[a]=i[a]}),this.hidden=i.hidden||!1,this.permissionResult=i.permissionResult,this.permissionResultHandler(this.permissionResult)}get isValid(){return!this.hidden}static init(i,a){if(i instanceof s)return i;const{children:f,permissions:u}=i,g=u?a.permissionHandler(u):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},w=new s({...i,children:Array.isArray(f)?this.initOnlyValidFromArray(f,a):null,permissionResult:g});return w.isValid?w:null}static initFromArray(i,a){return Array.isArray(i)?i.map(f=>this.init(f,a)):[]}static initOnlyValidFromArray(i,a){return this.initFromArray(i,a).filter(f=>f)}permissionResultHandler(i){const{event:a,isAllowCreate:f,isAllowRead:u,isAllowUpdate:g,isAllowDelete:w}=i;a?typeof this[a]=="function"?this[a]({val:!0}):console.log(`do not have the event ${a}`):u||this.setHidden({val:!0})}setHidden({val:i}){this.hidden=i}}return s}class Xs extends Pr{constructor(r={}){super(r),this.configType="ElementQListConfig",this.bulkAction=Gu({bulkAction:r.bulkAction,helpers:r.helpers}),this.converter=Yu({actions:r.actions,helpers:r.helpers}),this.css=r.css,this.eventName=r.eventName,this.expansion=r.expansion,this.headers=zu({headers:r.headers,helpers:r.helpers}),this.listStyle=r.listStyle||"q-list-table",this.listShowFooter=r.showFooter||!1,this.listSortBys=r.sortBys,this.noDataMessage=r.noDataMessage}get isValid(){return!!this}static init(r){const i=new this(r);return i.isValid?i:null}}function Gu({bulkAction:s={},helpers:r}){const i=Vu({helpers:r});return{...s,actions:i.initOnlyValidFromArray(s.actions,r)}}function zu({headers:s,helpers:r}){return Qu().initOnlyValidFromArray(s,r)}function Yu({actions:s,helpers:r}){const{QRow:i}=r.qList,f={QListButton:Ku({helpers:r}),QRow:i,...r},{element:u}=f,{converter:g}=u.getHandlers();return typeof g!="function"?w=>w:g({actions:s,helpers:f})}const Zu=["setHidden","setVisible"];class Mr{constructor(r={}){this.id=r.id||Dr("node"),this.css=r.css||"",this.hidden=r.hidden||!1,this.nodeType="Node",this.observers=r.observers||[],this.permissionResult=r.permissionResult,this.permissionResultHandler(this.permissionResult)}get isValid(){return!!this.id}get isVisible(){return!this.hidden}get isCreated(){return!!this}static init(r){const i=new this(r);return i.isValid?i:null}getElementState(){return this}getType(){return this.type}isExist(r){const{name:i}=this;return!!r.find(a=>i&&a.name===i)}handleObservers(r){this.observers.forEach(i=>{const{key:a,value:f,condition:u}=i,g=Ir({rule:u,data:r});g&&Xu(a)&&typeof this[a]=="function"&&this[a]({value:f,val:g})})}permissionResultHandler(r){const{event:i,isAllowCreate:a,isAllowRead:f,isAllowUpdate:u,isAllowDelete:g}=r;i?typeof this[i]=="function"?this[i]({val:!0}):console.log(`do not have the event ${i}`):a&&f&&u&&g||this.setHidden({val:!0})}resetNode(){this.component=null}setHidden({val:r}){this.hidden=r,r&&this.resetNode()}setVisible(r){this.setHidden({...r,val:!r.val})}updateElementState(r){return this.handleObservers(r),this}}function Xu(s){return Zu.includes(s)}let jt=class extends Mr{constructor(r={}){super(r),this.children=r.children||[],this.nodeType="Container"}get isCreated(){return super.isCreated&&!!this.isVisibleChildrenCreated}get isVisibleChildrenCreated(){return this.getVisibleChildren().reduce((r,i)=>r&&i.isCreated,!0)}get validChildren(){return this.children.filter(r=>r)}getElements(){return this.validChildren.reduce((r,i)=>[...r,...i.getElements()],[])}getElementState(){return this.validChildren.reduce((r,i)=>({...r,...i.getElementState()}),{})}getVisibleChildren(){return this.validChildren.filter(r=>r.isVisible)}updateElementState(r){return super.updateElementState(r),this.validChildren.forEach(i=>i.updateElementState(r)),this}};class Ju extends jt{constructor(r={}){super(r),this.nodeType="ContainerBox"}}class ju extends jt{constructor(r={}){super(r),this.nodeType="ContainerColumn"}}class ec extends jt{constructor(r={}){super(r),this.nodeType="ContainerHeaderSticky"}}class tc extends jt{constructor(r={}){super(r),this.nodeType="ContainerRow"}}const nc={ContainerBox:Ju,ContainerColumn:ju,ContainerHeaderSticky:ec,ContainerRow:tc};let De=class extends Mr{constructor(r={}){super(r),this.controllerHelpers=r.controllerHelpers,this.configPermissions=r.configPermissions,this.name=r.name,this.nodeType=r.nodeType||"Element",this.state={},this.configHandler(r.config)}get isCreated(){return super.isCreated&&!!this.component}get isValid(){return super.isValid&&!!this.name}get hasConfigPermissions(){return!!this.configPermissions}get stateName(){return{...this.defaultStateName,...this.config.stateName}}addComponent(r){this.component=r}configHandler(r={}){this.hasConfigPermissions?this.config=ru({config:r,configPermissions:this.configPermissions,type:this.nodeType}):this.config=r}getConfig(){return this.config||{}}getComponent(){return this.component}getElements(){return[this]}getElementName(){return this.name}getHandlers(){const r=this.getElementName(),{elementHandlers:i={}}=this.state;return i[r]||{}}getState(){return this.state}getElementState(){return rc(this.state,this.stateName)}onCreated({component:r,payload:i={}}){return this.addComponent(r),this.updateState(i),this}update(r){this.updateElementState(r)}updateState(r){this.state={...this.state,...r}}updateElementState(r){super.updateElementState(r);const i=ic(r,this.stateName);return this.updateState(i),this}};function rc(s,r){return Object.keys(r).reduce((i,a)=>{const f=r[a],u=s[a];return{...i,[f]:u}},{})}function ic(s,r){return Object.keys(r).reduce((i,a)=>{const f=r[a],u=s[f];return delete i[f],{...i,[a]:u}},{...s})}class sc extends De{constructor(r={}){super(r),this.defaultStateName={qButton:"qButton"}}getConfig(){return{...this.state.qButton||{},...this.config||{},...this.state[this.name]||{}}}}var en=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function oc(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Nn={exports:{}};Nn.exports,function(s,r){(function(){var i,a="4.17.21",f=200,u="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",g="Expected a function",w="Invalid `variable` option passed into `_.template`",x="__lodash_hash_undefined__",S=500,R="__lodash_placeholder__",B=1,G=2,de=4,he=1,Pe=2,ge=1,qt=2,no=4,je=8,nn=16,et=32,rn=64,tt=128,sn=256,Ur=512,zf=30,Yf="...",Zf=800,Xf=16,ro=1,Jf=2,jf=3,Hn=1/0,Bt=9007199254740991,ed=17976931348623157e292,In=NaN,ze=4294967295,td=ze-1,nd=ze>>>1,rd=[["ary",tt],["bind",ge],["bindKey",qt],["curry",je],["curryRight",nn],["flip",Ur],["partial",et],["partialRight",rn],["rearg",sn]],Lt="[object Arguments]",Fn="[object Array]",id="[object AsyncFunction]",on="[object Boolean]",ln="[object Date]",sd="[object DOMException]",Dn="[object Error]",Pn="[object Function]",io="[object GeneratorFunction]",Me="[object Map]",an="[object Number]",od="[object Null]",nt="[object Object]",so="[object Promise]",ld="[object Proxy]",un="[object RegExp]",We="[object Set]",cn="[object String]",Mn="[object Symbol]",ad="[object Undefined]",fn="[object WeakMap]",ud="[object WeakSet]",dn="[object ArrayBuffer]",Nt="[object DataView]",Vr="[object Float32Array]",Kr="[object Float64Array]",Qr="[object Int8Array]",Gr="[object Int16Array]",zr="[object Int32Array]",Yr="[object Uint8Array]",Zr="[object Uint8ClampedArray]",Xr="[object Uint16Array]",Jr="[object Uint32Array]",cd=/\b__p \+= '';/g,fd=/\b(__p \+=) '' \+/g,dd=/(__e\(.*?\)|\b__t\)) \+\n'';/g,oo=/&(?:amp|lt|gt|quot|#39);/g,lo=/[&<>"']/g,hd=RegExp(oo.source),gd=RegExp(lo.source),md=/<%-([\s\S]+?)%>/g,pd=/<%([\s\S]+?)%>/g,ao=/<%=([\s\S]+?)%>/g,_d=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yd=/^\w*$/,vd=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jr=/[\\^$.*+?()[\]{}|]/g,wd=RegExp(jr.source),ei=/^\s+/,Cd=/\s/,Ed=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,bd=/\{\n\/\* \[wrapped with (.+)\] \*/,Ad=/,? & /,xd=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Sd=/[()=,{}\[\]\/\s]/,Rd=/\\(\\)?/g,Od=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,uo=/\w*$/,kd=/^[-+]0x[0-9a-f]+$/i,$d=/^0b[01]+$/i,qd=/^\[object .+?Constructor\]$/,Bd=/^0o[0-7]+$/i,Ld=/^(?:0|[1-9]\d*)$/,Nd=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Wn=/($^)/,Td=/['\n\r\u2028\u2029\\]/g,Un="\\ud800-\\udfff",Hd="\\u0300-\\u036f",Id="\\ufe20-\\ufe2f",Fd="\\u20d0-\\u20ff",co=Hd+Id+Fd,fo="\\u2700-\\u27bf",ho="a-z\\xdf-\\xf6\\xf8-\\xff",Dd="\\xac\\xb1\\xd7\\xf7",Pd="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Md="\\u2000-\\u206f",Wd=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",go="A-Z\\xc0-\\xd6\\xd8-\\xde",mo="\\ufe0e\\ufe0f",po=Dd+Pd+Md+Wd,ti="['’]",Ud="["+Un+"]",_o="["+po+"]",Vn="["+co+"]",yo="\\d+",Vd="["+fo+"]",vo="["+ho+"]",wo="[^"+Un+po+yo+fo+ho+go+"]",ni="\\ud83c[\\udffb-\\udfff]",Kd="(?:"+Vn+"|"+ni+")",Co="[^"+Un+"]",ri="(?:\\ud83c[\\udde6-\\uddff]){2}",ii="[\\ud800-\\udbff][\\udc00-\\udfff]",Tt="["+go+"]",Eo="\\u200d",bo="(?:"+vo+"|"+wo+")",Qd="(?:"+Tt+"|"+wo+")",Ao="(?:"+ti+"(?:d|ll|m|re|s|t|ve))?",xo="(?:"+ti+"(?:D|LL|M|RE|S|T|VE))?",So=Kd+"?",Ro="["+mo+"]?",Gd="(?:"+Eo+"(?:"+[Co,ri,ii].join("|")+")"+Ro+So+")*",zd="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Yd="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Oo=Ro+So+Gd,Zd="(?:"+[Vd,ri,ii].join("|")+")"+Oo,Xd="(?:"+[Co+Vn+"?",Vn,ri,ii,Ud].join("|")+")",Jd=RegExp(ti,"g"),jd=RegExp(Vn,"g"),si=RegExp(ni+"(?="+ni+")|"+Xd+Oo,"g"),eh=RegExp([Tt+"?"+vo+"+"+Ao+"(?="+[_o,Tt,"$"].join("|")+")",Qd+"+"+xo+"(?="+[_o,Tt+bo,"$"].join("|")+")",Tt+"?"+bo+"+"+Ao,Tt+"+"+xo,Yd,zd,yo,Zd].join("|"),"g"),th=RegExp("["+Eo+Un+co+mo+"]"),nh=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,rh=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ih=-1,Y={};Y[Vr]=Y[Kr]=Y[Qr]=Y[Gr]=Y[zr]=Y[Yr]=Y[Zr]=Y[Xr]=Y[Jr]=!0,Y[Lt]=Y[Fn]=Y[dn]=Y[on]=Y[Nt]=Y[ln]=Y[Dn]=Y[Pn]=Y[Me]=Y[an]=Y[nt]=Y[un]=Y[We]=Y[cn]=Y[fn]=!1;var z={};z[Lt]=z[Fn]=z[dn]=z[Nt]=z[on]=z[ln]=z[Vr]=z[Kr]=z[Qr]=z[Gr]=z[zr]=z[Me]=z[an]=z[nt]=z[un]=z[We]=z[cn]=z[Mn]=z[Yr]=z[Zr]=z[Xr]=z[Jr]=!0,z[Dn]=z[Pn]=z[fn]=!1;var sh={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},oh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},lh={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},ah={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},uh=parseFloat,ch=parseInt,ko=typeof en=="object"&&en&&en.Object===Object&&en,fh=typeof self=="object"&&self&&self.Object===Object&&self,ue=ko||fh||Function("return this")(),oi=r&&!r.nodeType&&r,Et=oi&&!0&&s&&!s.nodeType&&s,$o=Et&&Et.exports===oi,li=$o&&ko.process,qe=function(){try{var _=Et&&Et.require&&Et.require("util").types;return _||li&&li.binding&&li.binding("util")}catch{}}(),qo=qe&&qe.isArrayBuffer,Bo=qe&&qe.isDate,Lo=qe&&qe.isMap,No=qe&&qe.isRegExp,To=qe&&qe.isSet,Ho=qe&&qe.isTypedArray;function xe(_,C,v){switch(v.length){case 0:return _.call(C);case 1:return _.call(C,v[0]);case 2:return _.call(C,v[0],v[1]);case 3:return _.call(C,v[0],v[1],v[2])}return _.apply(C,v)}function dh(_,C,v,k){for(var T=-1,U=_==null?0:_.length;++T<U;){var oe=_[T];C(k,oe,v(oe),_)}return k}function Be(_,C){for(var v=-1,k=_==null?0:_.length;++v<k&&C(_[v],v,_)!==!1;);return _}function hh(_,C){for(var v=_==null?0:_.length;v--&&C(_[v],v,_)!==!1;);return _}function Io(_,C){for(var v=-1,k=_==null?0:_.length;++v<k;)if(!C(_[v],v,_))return!1;return!0}function dt(_,C){for(var v=-1,k=_==null?0:_.length,T=0,U=[];++v<k;){var oe=_[v];C(oe,v,_)&&(U[T++]=oe)}return U}function Kn(_,C){var v=_==null?0:_.length;return!!v&&Ht(_,C,0)>-1}function ai(_,C,v){for(var k=-1,T=_==null?0:_.length;++k<T;)if(v(C,_[k]))return!0;return!1}function X(_,C){for(var v=-1,k=_==null?0:_.length,T=Array(k);++v<k;)T[v]=C(_[v],v,_);return T}function ht(_,C){for(var v=-1,k=C.length,T=_.length;++v<k;)_[T+v]=C[v];return _}function ui(_,C,v,k){var T=-1,U=_==null?0:_.length;for(k&&U&&(v=_[++T]);++T<U;)v=C(v,_[T],T,_);return v}function gh(_,C,v,k){var T=_==null?0:_.length;for(k&&T&&(v=_[--T]);T--;)v=C(v,_[T],T,_);return v}function ci(_,C){for(var v=-1,k=_==null?0:_.length;++v<k;)if(C(_[v],v,_))return!0;return!1}var mh=fi("length");function ph(_){return _.split("")}function _h(_){return _.match(xd)||[]}function Fo(_,C,v){var k;return v(_,function(T,U,oe){if(C(T,U,oe))return k=U,!1}),k}function Qn(_,C,v,k){for(var T=_.length,U=v+(k?1:-1);k?U--:++U<T;)if(C(_[U],U,_))return U;return-1}function Ht(_,C,v){return C===C?kh(_,C,v):Qn(_,Do,v)}function yh(_,C,v,k){for(var T=v-1,U=_.length;++T<U;)if(k(_[T],C))return T;return-1}function Do(_){return _!==_}function Po(_,C){var v=_==null?0:_.length;return v?hi(_,C)/v:In}function fi(_){return function(C){return C==null?i:C[_]}}function di(_){return function(C){return _==null?i:_[C]}}function Mo(_,C,v,k,T){return T(_,function(U,oe,Q){v=k?(k=!1,U):C(v,U,oe,Q)}),v}function vh(_,C){var v=_.length;for(_.sort(C);v--;)_[v]=_[v].value;return _}function hi(_,C){for(var v,k=-1,T=_.length;++k<T;){var U=C(_[k]);U!==i&&(v=v===i?U:v+U)}return v}function gi(_,C){for(var v=-1,k=Array(_);++v<_;)k[v]=C(v);return k}function wh(_,C){return X(C,function(v){return[v,_[v]]})}function Wo(_){return _&&_.slice(0,Qo(_)+1).replace(ei,"")}function Se(_){return function(C){return _(C)}}function mi(_,C){return X(C,function(v){return _[v]})}function hn(_,C){return _.has(C)}function Uo(_,C){for(var v=-1,k=_.length;++v<k&&Ht(C,_[v],0)>-1;);return v}function Vo(_,C){for(var v=_.length;v--&&Ht(C,_[v],0)>-1;);return v}function Ch(_,C){for(var v=_.length,k=0;v--;)_[v]===C&&++k;return k}var Eh=di(sh),bh=di(oh);function Ah(_){return"\\"+ah[_]}function xh(_,C){return _==null?i:_[C]}function It(_){return th.test(_)}function Sh(_){return nh.test(_)}function Rh(_){for(var C,v=[];!(C=_.next()).done;)v.push(C.value);return v}function pi(_){var C=-1,v=Array(_.size);return _.forEach(function(k,T){v[++C]=[T,k]}),v}function Ko(_,C){return function(v){return _(C(v))}}function gt(_,C){for(var v=-1,k=_.length,T=0,U=[];++v<k;){var oe=_[v];(oe===C||oe===R)&&(_[v]=R,U[T++]=v)}return U}function Gn(_){var C=-1,v=Array(_.size);return _.forEach(function(k){v[++C]=k}),v}function Oh(_){var C=-1,v=Array(_.size);return _.forEach(function(k){v[++C]=[k,k]}),v}function kh(_,C,v){for(var k=v-1,T=_.length;++k<T;)if(_[k]===C)return k;return-1}function $h(_,C,v){for(var k=v+1;k--;)if(_[k]===C)return k;return k}function Ft(_){return It(_)?Bh(_):mh(_)}function Ue(_){return It(_)?Lh(_):ph(_)}function Qo(_){for(var C=_.length;C--&&Cd.test(_.charAt(C)););return C}var qh=di(lh);function Bh(_){for(var C=si.lastIndex=0;si.test(_);)++C;return C}function Lh(_){return _.match(si)||[]}function Nh(_){return _.match(eh)||[]}var Th=function _(C){C=C==null?ue:Dt.defaults(ue.Object(),C,Dt.pick(ue,rh));var v=C.Array,k=C.Date,T=C.Error,U=C.Function,oe=C.Math,Q=C.Object,_i=C.RegExp,Hh=C.String,Le=C.TypeError,zn=v.prototype,Ih=U.prototype,Pt=Q.prototype,Yn=C["__core-js_shared__"],Zn=Ih.toString,K=Pt.hasOwnProperty,Fh=0,Go=function(){var e=/[^.]+$/.exec(Yn&&Yn.keys&&Yn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Xn=Pt.toString,Dh=Zn.call(Q),Ph=ue._,Mh=_i("^"+Zn.call(K).replace(jr,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Jn=$o?C.Buffer:i,mt=C.Symbol,jn=C.Uint8Array,zo=Jn?Jn.allocUnsafe:i,er=Ko(Q.getPrototypeOf,Q),Yo=Q.create,Zo=Pt.propertyIsEnumerable,tr=zn.splice,Xo=mt?mt.isConcatSpreadable:i,gn=mt?mt.iterator:i,bt=mt?mt.toStringTag:i,nr=function(){try{var e=Ot(Q,"defineProperty");return e({},"",{}),e}catch{}}(),Wh=C.clearTimeout!==ue.clearTimeout&&C.clearTimeout,Uh=k&&k.now!==ue.Date.now&&k.now,Vh=C.setTimeout!==ue.setTimeout&&C.setTimeout,rr=oe.ceil,ir=oe.floor,yi=Q.getOwnPropertySymbols,Kh=Jn?Jn.isBuffer:i,Jo=C.isFinite,Qh=zn.join,Gh=Ko(Q.keys,Q),le=oe.max,me=oe.min,zh=k.now,Yh=C.parseInt,jo=oe.random,Zh=zn.reverse,vi=Ot(C,"DataView"),mn=Ot(C,"Map"),wi=Ot(C,"Promise"),Mt=Ot(C,"Set"),pn=Ot(C,"WeakMap"),_n=Ot(Q,"create"),sr=pn&&new pn,Wt={},Xh=kt(vi),Jh=kt(mn),jh=kt(wi),eg=kt(Mt),tg=kt(pn),or=mt?mt.prototype:i,yn=or?or.valueOf:i,el=or?or.toString:i;function c(e){if(te(e)&&!H(e)&&!(e instanceof M)){if(e instanceof Ne)return e;if(K.call(e,"__wrapped__"))return ta(e)}return new Ne(e)}var Ut=function(){function e(){}return function(t){if(!J(t))return{};if(Yo)return Yo(t);e.prototype=t;var n=new e;return e.prototype=i,n}}();function lr(){}function Ne(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}c.templateSettings={escape:md,evaluate:pd,interpolate:ao,variable:"",imports:{_:c}},c.prototype=lr.prototype,c.prototype.constructor=c,Ne.prototype=Ut(lr.prototype),Ne.prototype.constructor=Ne;function M(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ze,this.__views__=[]}function ng(){var e=new M(this.__wrapped__);return e.__actions__=Ce(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ce(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ce(this.__views__),e}function rg(){if(this.__filtered__){var e=new M(this);e.__dir__=-1,e.__filtered__=!0}else e=this.clone(),e.__dir__*=-1;return e}function ig(){var e=this.__wrapped__.value(),t=this.__dir__,n=H(e),o=t<0,l=n?e.length:0,d=pm(0,l,this.__views__),h=d.start,m=d.end,y=m-h,E=o?m:h-1,b=this.__iteratees__,A=b.length,O=0,$=me(y,this.__takeCount__);if(!n||!o&&l==y&&$==y)return Al(e,this.__actions__);var L=[];e:for(;y--&&O<$;){E+=t;for(var F=-1,N=e[E];++F<A;){var P=b[F],W=P.iteratee,ke=P.type,we=W(N);if(ke==Jf)N=we;else if(!we){if(ke==ro)continue e;break e}}L[O++]=N}return L}M.prototype=Ut(lr.prototype),M.prototype.constructor=M;function At(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function sg(){this.__data__=_n?_n(null):{},this.size=0}function og(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}function lg(e){var t=this.__data__;if(_n){var n=t[e];return n===x?i:n}return K.call(t,e)?t[e]:i}function ag(e){var t=this.__data__;return _n?t[e]!==i:K.call(t,e)}function ug(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=_n&&t===i?x:t,this}At.prototype.clear=sg,At.prototype.delete=og,At.prototype.get=lg,At.prototype.has=ag,At.prototype.set=ug;function rt(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function cg(){this.__data__=[],this.size=0}function fg(e){var t=this.__data__,n=ar(t,e);if(n<0)return!1;var o=t.length-1;return n==o?t.pop():tr.call(t,n,1),--this.size,!0}function dg(e){var t=this.__data__,n=ar(t,e);return n<0?i:t[n][1]}function hg(e){return ar(this.__data__,e)>-1}function gg(e,t){var n=this.__data__,o=ar(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}rt.prototype.clear=cg,rt.prototype.delete=fg,rt.prototype.get=dg,rt.prototype.has=hg,rt.prototype.set=gg;function it(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var o=e[t];this.set(o[0],o[1])}}function mg(){this.size=0,this.__data__={hash:new At,map:new(mn||rt),string:new At}}function pg(e){var t=wr(this,e).delete(e);return this.size-=t?1:0,t}function _g(e){return wr(this,e).get(e)}function yg(e){return wr(this,e).has(e)}function vg(e,t){var n=wr(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}it.prototype.clear=mg,it.prototype.delete=pg,it.prototype.get=_g,it.prototype.has=yg,it.prototype.set=vg;function xt(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new it;++t<n;)this.add(e[t])}function wg(e){return this.__data__.set(e,x),this}function Cg(e){return this.__data__.has(e)}xt.prototype.add=xt.prototype.push=wg,xt.prototype.has=Cg;function Ve(e){var t=this.__data__=new rt(e);this.size=t.size}function Eg(){this.__data__=new rt,this.size=0}function bg(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Ag(e){return this.__data__.get(e)}function xg(e){return this.__data__.has(e)}function Sg(e,t){var n=this.__data__;if(n instanceof rt){var o=n.__data__;if(!mn||o.length<f-1)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new it(o)}return n.set(e,t),this.size=n.size,this}Ve.prototype.clear=Eg,Ve.prototype.delete=bg,Ve.prototype.get=Ag,Ve.prototype.has=xg,Ve.prototype.set=Sg;function tl(e,t){var n=H(e),o=!n&&$t(e),l=!n&&!o&&wt(e),d=!n&&!o&&!l&&Gt(e),h=n||o||l||d,m=h?gi(e.length,Hh):[],y=m.length;for(var E in e)(t||K.call(e,E))&&!(h&&(E=="length"||l&&(E=="offset"||E=="parent")||d&&(E=="buffer"||E=="byteLength"||E=="byteOffset")||at(E,y)))&&m.push(E);return m}function nl(e){var t=e.length;return t?e[qi(0,t-1)]:i}function Rg(e,t){return Cr(Ce(e),St(t,0,e.length))}function Og(e){return Cr(Ce(e))}function Ci(e,t,n){(n!==i&&!Ke(e[t],n)||n===i&&!(t in e))&&st(e,t,n)}function vn(e,t,n){var o=e[t];(!(K.call(e,t)&&Ke(o,n))||n===i&&!(t in e))&&st(e,t,n)}function ar(e,t){for(var n=e.length;n--;)if(Ke(e[n][0],t))return n;return-1}function kg(e,t,n,o){return pt(e,function(l,d,h){t(o,l,n(l),h)}),o}function rl(e,t){return e&&Ze(t,ae(t),e)}function $g(e,t){return e&&Ze(t,be(t),e)}function st(e,t,n){t=="__proto__"&&nr?nr(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Ei(e,t){for(var n=-1,o=t.length,l=v(o),d=e==null;++n<o;)l[n]=d?i:ns(e,t[n]);return l}function St(e,t,n){return e===e&&(n!==i&&(e=e<=n?e:n),t!==i&&(e=e>=t?e:t)),e}function Te(e,t,n,o,l,d){var h,m=t&B,y=t&G,E=t&de;if(n&&(h=l?n(e,o,l,d):n(e)),h!==i)return h;if(!J(e))return e;var b=H(e);if(b){if(h=ym(e),!m)return Ce(e,h)}else{var A=pe(e),O=A==Pn||A==io;if(wt(e))return Rl(e,m);if(A==nt||A==Lt||O&&!l){if(h=y||O?{}:Ql(e),!m)return y?lm(e,$g(h,e)):om(e,rl(h,e))}else{if(!z[A])return l?e:{};h=vm(e,A,m)}}d||(d=new Ve);var $=d.get(e);if($)return $;d.set(e,h),Ca(e)?e.forEach(function(N){h.add(Te(N,t,n,N,e,d))}):va(e)&&e.forEach(function(N,P){h.set(P,Te(N,t,n,P,e,d))});var L=E?y?Wi:Mi:y?be:ae,F=b?i:L(e);return Be(F||e,function(N,P){F&&(P=N,N=e[P]),vn(h,P,Te(N,t,n,P,e,d))}),h}function qg(e){var t=ae(e);return function(n){return il(n,e,t)}}function il(e,t,n){var o=n.length;if(e==null)return!o;for(e=Q(e);o--;){var l=n[o],d=t[l],h=e[l];if(h===i&&!(l in e)||!d(h))return!1}return!0}function sl(e,t,n){if(typeof e!="function")throw new Le(g);return Sn(function(){e.apply(i,n)},t)}function wn(e,t,n,o){var l=-1,d=Kn,h=!0,m=e.length,y=[],E=t.length;if(!m)return y;n&&(t=X(t,Se(n))),o?(d=ai,h=!1):t.length>=f&&(d=hn,h=!1,t=new xt(t));e:for(;++l<m;){var b=e[l],A=n==null?b:n(b);if(b=o||b!==0?b:0,h&&A===A){for(var O=E;O--;)if(t[O]===A)continue e;y.push(b)}else d(t,A,o)||y.push(b)}return y}var pt=Bl(Ye),ol=Bl(Ai,!0);function Bg(e,t){var n=!0;return pt(e,function(o,l,d){return n=!!t(o,l,d),n}),n}function ur(e,t,n){for(var o=-1,l=e.length;++o<l;){var d=e[o],h=t(d);if(h!=null&&(m===i?h===h&&!Oe(h):n(h,m)))var m=h,y=d}return y}function Lg(e,t,n,o){var l=e.length;for(n=I(n),n<0&&(n=-n>l?0:l+n),o=o===i||o>l?l:I(o),o<0&&(o+=l),o=n>o?0:ba(o);n<o;)e[n++]=t;return e}function ll(e,t){var n=[];return pt(e,function(o,l,d){t(o,l,d)&&n.push(o)}),n}function ce(e,t,n,o,l){var d=-1,h=e.length;for(n||(n=Cm),l||(l=[]);++d<h;){var m=e[d];t>0&&n(m)?t>1?ce(m,t-1,n,o,l):ht(l,m):o||(l[l.length]=m)}return l}var bi=Ll(),al=Ll(!0);function Ye(e,t){return e&&bi(e,t,ae)}function Ai(e,t){return e&&al(e,t,ae)}function cr(e,t){return dt(t,function(n){return ut(e[n])})}function Rt(e,t){t=yt(t,e);for(var n=0,o=t.length;e!=null&&n<o;)e=e[Xe(t[n++])];return n&&n==o?e:i}function ul(e,t,n){var o=t(e);return H(e)?o:ht(o,n(e))}function ye(e){return e==null?e===i?ad:od:bt&&bt in Q(e)?mm(e):Om(e)}function xi(e,t){return e>t}function Ng(e,t){return e!=null&&K.call(e,t)}function Tg(e,t){return e!=null&&t in Q(e)}function Hg(e,t,n){return e>=me(t,n)&&e<le(t,n)}function Si(e,t,n){for(var o=n?ai:Kn,l=e[0].length,d=e.length,h=d,m=v(d),y=1/0,E=[];h--;){var b=e[h];h&&t&&(b=X(b,Se(t))),y=me(b.length,y),m[h]=!n&&(t||l>=120&&b.length>=120)?new xt(h&&b):i}b=e[0];var A=-1,O=m[0];e:for(;++A<l&&E.length<y;){var $=b[A],L=t?t($):$;if($=n||$!==0?$:0,!(O?hn(O,L):o(E,L,n))){for(h=d;--h;){var F=m[h];if(!(F?hn(F,L):o(e[h],L,n)))continue e}O&&O.push(L),E.push($)}}return E}function Ig(e,t,n,o){return Ye(e,function(l,d,h){t(o,n(l),d,h)}),o}function Cn(e,t,n){t=yt(t,e),e=Zl(e,t);var o=e==null?e:e[Xe(Ie(t))];return o==null?i:xe(o,e,n)}function cl(e){return te(e)&&ye(e)==Lt}function Fg(e){return te(e)&&ye(e)==dn}function Dg(e){return te(e)&&ye(e)==ln}function En(e,t,n,o,l){return e===t?!0:e==null||t==null||!te(e)&&!te(t)?e!==e&&t!==t:Pg(e,t,n,o,En,l)}function Pg(e,t,n,o,l,d){var h=H(e),m=H(t),y=h?Fn:pe(e),E=m?Fn:pe(t);y=y==Lt?nt:y,E=E==Lt?nt:E;var b=y==nt,A=E==nt,O=y==E;if(O&&wt(e)){if(!wt(t))return!1;h=!0,b=!1}if(O&&!b)return d||(d=new Ve),h||Gt(e)?Ul(e,t,n,o,l,d):hm(e,t,y,n,o,l,d);if(!(n&he)){var $=b&&K.call(e,"__wrapped__"),L=A&&K.call(t,"__wrapped__");if($||L){var F=$?e.value():e,N=L?t.value():t;return d||(d=new Ve),l(F,N,n,o,d)}}return O?(d||(d=new Ve),gm(e,t,n,o,l,d)):!1}function Mg(e){return te(e)&&pe(e)==Me}function Ri(e,t,n,o){var l=n.length,d=l,h=!o;if(e==null)return!d;for(e=Q(e);l--;){var m=n[l];if(h&&m[2]?m[1]!==e[m[0]]:!(m[0]in e))return!1}for(;++l<d;){m=n[l];var y=m[0],E=e[y],b=m[1];if(h&&m[2]){if(E===i&&!(y in e))return!1}else{var A=new Ve;if(o)var O=o(E,b,y,e,t,A);if(!(O===i?En(b,E,he|Pe,o,A):O))return!1}}return!0}function fl(e){if(!J(e)||bm(e))return!1;var t=ut(e)?Mh:qd;return t.test(kt(e))}function Wg(e){return te(e)&&ye(e)==un}function Ug(e){return te(e)&&pe(e)==We}function Vg(e){return te(e)&&Rr(e.length)&&!!Y[ye(e)]}function dl(e){return typeof e=="function"?e:e==null?Ae:typeof e=="object"?H(e)?ml(e[0],e[1]):gl(e):Na(e)}function Oi(e){if(!xn(e))return Gh(e);var t=[];for(var n in Q(e))K.call(e,n)&&n!="constructor"&&t.push(n);return t}function Kg(e){if(!J(e))return Rm(e);var t=xn(e),n=[];for(var o in e)o=="constructor"&&(t||!K.call(e,o))||n.push(o);return n}function ki(e,t){return e<t}function hl(e,t){var n=-1,o=Ee(e)?v(e.length):[];return pt(e,function(l,d,h){o[++n]=t(l,d,h)}),o}function gl(e){var t=Vi(e);return t.length==1&&t[0][2]?zl(t[0][0],t[0][1]):function(n){return n===e||Ri(n,e,t)}}function ml(e,t){return Qi(e)&&Gl(t)?zl(Xe(e),t):function(n){var o=ns(n,e);return o===i&&o===t?rs(n,e):En(t,o,he|Pe)}}function fr(e,t,n,o,l){e!==t&&bi(t,function(d,h){if(l||(l=new Ve),J(d))Qg(e,t,h,n,fr,o,l);else{var m=o?o(zi(e,h),d,h+"",e,t,l):i;m===i&&(m=d),Ci(e,h,m)}},be)}function Qg(e,t,n,o,l,d,h){var m=zi(e,n),y=zi(t,n),E=h.get(y);if(E){Ci(e,n,E);return}var b=d?d(m,y,n+"",e,t,h):i,A=b===i;if(A){var O=H(y),$=!O&&wt(y),L=!O&&!$&&Gt(y);b=y,O||$||L?H(m)?b=m:ne(m)?b=Ce(m):$?(A=!1,b=Rl(y,!0)):L?(A=!1,b=Ol(y,!0)):b=[]:Rn(y)||$t(y)?(b=m,$t(m)?b=Aa(m):(!J(m)||ut(m))&&(b=Ql(y))):A=!1}A&&(h.set(y,b),l(b,y,o,d,h),h.delete(y)),Ci(e,n,b)}function pl(e,t){var n=e.length;if(n)return t+=t<0?n:0,at(t,n)?e[t]:i}function _l(e,t,n){t.length?t=X(t,function(d){return H(d)?function(h){return Rt(h,d.length===1?d[0]:d)}:d}):t=[Ae];var o=-1;t=X(t,Se(q()));var l=hl(e,function(d,h,m){var y=X(t,function(E){return E(d)});return{criteria:y,index:++o,value:d}});return vh(l,function(d,h){return sm(d,h,n)})}function Gg(e,t){return yl(e,t,function(n,o){return rs(e,o)})}function yl(e,t,n){for(var o=-1,l=t.length,d={};++o<l;){var h=t[o],m=Rt(e,h);n(m,h)&&bn(d,yt(h,e),m)}return d}function zg(e){return function(t){return Rt(t,e)}}function $i(e,t,n,o){var l=o?yh:Ht,d=-1,h=t.length,m=e;for(e===t&&(t=Ce(t)),n&&(m=X(e,Se(n)));++d<h;)for(var y=0,E=t[d],b=n?n(E):E;(y=l(m,b,y,o))>-1;)m!==e&&tr.call(m,y,1),tr.call(e,y,1);return e}function vl(e,t){for(var n=e?t.length:0,o=n-1;n--;){var l=t[n];if(n==o||l!==d){var d=l;at(l)?tr.call(e,l,1):Ni(e,l)}}return e}function qi(e,t){return e+ir(jo()*(t-e+1))}function Yg(e,t,n,o){for(var l=-1,d=le(rr((t-e)/(n||1)),0),h=v(d);d--;)h[o?d:++l]=e,e+=n;return h}function Bi(e,t){var n="";if(!e||t<1||t>Bt)return n;do t%2&&(n+=e),t=ir(t/2),t&&(e+=e);while(t);return n}function D(e,t){return Yi(Yl(e,t,Ae),e+"")}function Zg(e){return nl(zt(e))}function Xg(e,t){var n=zt(e);return Cr(n,St(t,0,n.length))}function bn(e,t,n,o){if(!J(e))return e;t=yt(t,e);for(var l=-1,d=t.length,h=d-1,m=e;m!=null&&++l<d;){var y=Xe(t[l]),E=n;if(y==="__proto__"||y==="constructor"||y==="prototype")return e;if(l!=h){var b=m[y];E=o?o(b,y,m):i,E===i&&(E=J(b)?b:at(t[l+1])?[]:{})}vn(m,y,E),m=m[y]}return e}var wl=sr?function(e,t){return sr.set(e,t),e}:Ae,Jg=nr?function(e,t){return nr(e,"toString",{configurable:!0,enumerable:!1,value:ss(t),writable:!0})}:Ae;function jg(e){return Cr(zt(e))}function He(e,t,n){var o=-1,l=e.length;t<0&&(t=-t>l?0:l+t),n=n>l?l:n,n<0&&(n+=l),l=t>n?0:n-t>>>0,t>>>=0;for(var d=v(l);++o<l;)d[o]=e[o+t];return d}function em(e,t){var n;return pt(e,function(o,l,d){return n=t(o,l,d),!n}),!!n}function dr(e,t,n){var o=0,l=e==null?o:e.length;if(typeof t=="number"&&t===t&&l<=nd){for(;o<l;){var d=o+l>>>1,h=e[d];h!==null&&!Oe(h)&&(n?h<=t:h<t)?o=d+1:l=d}return l}return Li(e,t,Ae,n)}function Li(e,t,n,o){var l=0,d=e==null?0:e.length;if(d===0)return 0;t=n(t);for(var h=t!==t,m=t===null,y=Oe(t),E=t===i;l<d;){var b=ir((l+d)/2),A=n(e[b]),O=A!==i,$=A===null,L=A===A,F=Oe(A);if(h)var N=o||L;else E?N=L&&(o||O):m?N=L&&O&&(o||!$):y?N=L&&O&&!$&&(o||!F):$||F?N=!1:N=o?A<=t:A<t;N?l=b+1:d=b}return me(d,td)}function Cl(e,t){for(var n=-1,o=e.length,l=0,d=[];++n<o;){var h=e[n],m=t?t(h):h;if(!n||!Ke(m,y)){var y=m;d[l++]=h===0?0:h}}return d}function El(e){return typeof e=="number"?e:Oe(e)?In:+e}function Re(e){if(typeof e=="string")return e;if(H(e))return X(e,Re)+"";if(Oe(e))return el?el.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function _t(e,t,n){var o=-1,l=Kn,d=e.length,h=!0,m=[],y=m;if(n)h=!1,l=ai;else if(d>=f){var E=t?null:fm(e);if(E)return Gn(E);h=!1,l=hn,y=new xt}else y=t?[]:m;e:for(;++o<d;){var b=e[o],A=t?t(b):b;if(b=n||b!==0?b:0,h&&A===A){for(var O=y.length;O--;)if(y[O]===A)continue e;t&&y.push(A),m.push(b)}else l(y,A,n)||(y!==m&&y.push(A),m.push(b))}return m}function Ni(e,t){return t=yt(t,e),e=Zl(e,t),e==null||delete e[Xe(Ie(t))]}function bl(e,t,n,o){return bn(e,t,n(Rt(e,t)),o)}function hr(e,t,n,o){for(var l=e.length,d=o?l:-1;(o?d--:++d<l)&&t(e[d],d,e););return n?He(e,o?0:d,o?d+1:l):He(e,o?d+1:0,o?l:d)}function Al(e,t){var n=e;return n instanceof M&&(n=n.value()),ui(t,function(o,l){return l.func.apply(l.thisArg,ht([o],l.args))},n)}function Ti(e,t,n){var o=e.length;if(o<2)return o?_t(e[0]):[];for(var l=-1,d=v(o);++l<o;)for(var h=e[l],m=-1;++m<o;)m!=l&&(d[l]=wn(d[l]||h,e[m],t,n));return _t(ce(d,1),t,n)}function xl(e,t,n){for(var o=-1,l=e.length,d=t.length,h={};++o<l;){var m=o<d?t[o]:i;n(h,e[o],m)}return h}function Hi(e){return ne(e)?e:[]}function Ii(e){return typeof e=="function"?e:Ae}function yt(e,t){return H(e)?e:Qi(e,t)?[e]:ea(V(e))}var tm=D;function vt(e,t,n){var o=e.length;return n=n===i?o:n,!t&&n>=o?e:He(e,t,n)}var Sl=Wh||function(e){return ue.clearTimeout(e)};function Rl(e,t){if(t)return e.slice();var n=e.length,o=zo?zo(n):new e.constructor(n);return e.copy(o),o}function Fi(e){var t=new e.constructor(e.byteLength);return new jn(t).set(new jn(e)),t}function nm(e,t){var n=t?Fi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function rm(e){var t=new e.constructor(e.source,uo.exec(e));return t.lastIndex=e.lastIndex,t}function im(e){return yn?Q(yn.call(e)):{}}function Ol(e,t){var n=t?Fi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function kl(e,t){if(e!==t){var n=e!==i,o=e===null,l=e===e,d=Oe(e),h=t!==i,m=t===null,y=t===t,E=Oe(t);if(!m&&!E&&!d&&e>t||d&&h&&y&&!m&&!E||o&&h&&y||!n&&y||!l)return 1;if(!o&&!d&&!E&&e<t||E&&n&&l&&!o&&!d||m&&n&&l||!h&&l||!y)return-1}return 0}function sm(e,t,n){for(var o=-1,l=e.criteria,d=t.criteria,h=l.length,m=n.length;++o<h;){var y=kl(l[o],d[o]);if(y){if(o>=m)return y;var E=n[o];return y*(E=="desc"?-1:1)}}return e.index-t.index}function $l(e,t,n,o){for(var l=-1,d=e.length,h=n.length,m=-1,y=t.length,E=le(d-h,0),b=v(y+E),A=!o;++m<y;)b[m]=t[m];for(;++l<h;)(A||l<d)&&(b[n[l]]=e[l]);for(;E--;)b[m++]=e[l++];return b}function ql(e,t,n,o){for(var l=-1,d=e.length,h=-1,m=n.length,y=-1,E=t.length,b=le(d-m,0),A=v(b+E),O=!o;++l<b;)A[l]=e[l];for(var $=l;++y<E;)A[$+y]=t[y];for(;++h<m;)(O||l<d)&&(A[$+n[h]]=e[l++]);return A}function Ce(e,t){var n=-1,o=e.length;for(t||(t=v(o));++n<o;)t[n]=e[n];return t}function Ze(e,t,n,o){var l=!n;n||(n={});for(var d=-1,h=t.length;++d<h;){var m=t[d],y=o?o(n[m],e[m],m,n,e):i;y===i&&(y=e[m]),l?st(n,m,y):vn(n,m,y)}return n}function om(e,t){return Ze(e,Ki(e),t)}function lm(e,t){return Ze(e,Vl(e),t)}function gr(e,t){return function(n,o){var l=H(n)?dh:kg,d=t?t():{};return l(n,e,q(o,2),d)}}function Vt(e){return D(function(t,n){var o=-1,l=n.length,d=l>1?n[l-1]:i,h=l>2?n[2]:i;for(d=e.length>3&&typeof d=="function"?(l--,d):i,h&&ve(n[0],n[1],h)&&(d=l<3?i:d,l=1),t=Q(t);++o<l;){var m=n[o];m&&e(t,m,o,d)}return t})}function Bl(e,t){return function(n,o){if(n==null)return n;if(!Ee(n))return e(n,o);for(var l=n.length,d=t?l:-1,h=Q(n);(t?d--:++d<l)&&o(h[d],d,h)!==!1;);return n}}function Ll(e){return function(t,n,o){for(var l=-1,d=Q(t),h=o(t),m=h.length;m--;){var y=h[e?m:++l];if(n(d[y],y,d)===!1)break}return t}}function am(e,t,n){var o=t&ge,l=An(e);function d(){var h=this&&this!==ue&&this instanceof d?l:e;return h.apply(o?n:this,arguments)}return d}function Nl(e){return function(t){t=V(t);var n=It(t)?Ue(t):i,o=n?n[0]:t.charAt(0),l=n?vt(n,1).join(""):t.slice(1);return o[e]()+l}}function Kt(e){return function(t){return ui(Ba(qa(t).replace(Jd,"")),e,"")}}function An(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Ut(e.prototype),o=e.apply(n,t);return J(o)?o:n}}function um(e,t,n){var o=An(e);function l(){for(var d=arguments.length,h=v(d),m=d,y=Qt(l);m--;)h[m]=arguments[m];var E=d<3&&h[0]!==y&&h[d-1]!==y?[]:gt(h,y);if(d-=E.length,d<n)return Dl(e,t,mr,l.placeholder,i,h,E,i,i,n-d);var b=this&&this!==ue&&this instanceof l?o:e;return xe(b,this,h)}return l}function Tl(e){return function(t,n,o){var l=Q(t);if(!Ee(t)){var d=q(n,3);t=ae(t),n=function(m){return d(l[m],m,l)}}var h=e(t,n,o);return h>-1?l[d?t[h]:h]:i}}function Hl(e){return lt(function(t){var n=t.length,o=n,l=Ne.prototype.thru;for(e&&t.reverse();o--;){var d=t[o];if(typeof d!="function")throw new Le(g);if(l&&!h&&vr(d)=="wrapper")var h=new Ne([],!0)}for(o=h?o:n;++o<n;){d=t[o];var m=vr(d),y=m=="wrapper"?Ui(d):i;y&&Gi(y[0])&&y[1]==(tt|je|et|sn)&&!y[4].length&&y[9]==1?h=h[vr(y[0])].apply(h,y[3]):h=d.length==1&&Gi(d)?h[m]():h.thru(d)}return function(){var E=arguments,b=E[0];if(h&&E.length==1&&H(b))return h.plant(b).value();for(var A=0,O=n?t[A].apply(this,E):b;++A<n;)O=t[A].call(this,O);return O}})}function mr(e,t,n,o,l,d,h,m,y,E){var b=t&tt,A=t&ge,O=t&qt,$=t&(je|nn),L=t&Ur,F=O?i:An(e);function N(){for(var P=arguments.length,W=v(P),ke=P;ke--;)W[ke]=arguments[ke];if($)var we=Qt(N),$e=Ch(W,we);if(o&&(W=$l(W,o,l,$)),d&&(W=ql(W,d,h,$)),P-=$e,$&&P<E){var re=gt(W,we);return Dl(e,t,mr,N.placeholder,n,W,re,m,y,E-P)}var Qe=A?n:this,ft=O?Qe[e]:e;return P=W.length,m?W=km(W,m):L&&P>1&&W.reverse(),b&&y<P&&(W.length=y),this&&this!==ue&&this instanceof N&&(ft=F||An(ft)),ft.apply(Qe,W)}return N}function Il(e,t){return function(n,o){return Ig(n,e,t(o),{})}}function pr(e,t){return function(n,o){var l;if(n===i&&o===i)return t;if(n!==i&&(l=n),o!==i){if(l===i)return o;typeof n=="string"||typeof o=="string"?(n=Re(n),o=Re(o)):(n=El(n),o=El(o)),l=e(n,o)}return l}}function Di(e){return lt(function(t){return t=X(t,Se(q())),D(function(n){var o=this;return e(t,function(l){return xe(l,o,n)})})})}function _r(e,t){t=t===i?" ":Re(t);var n=t.length;if(n<2)return n?Bi(t,e):t;var o=Bi(t,rr(e/Ft(t)));return It(t)?vt(Ue(o),0,e).join(""):o.slice(0,e)}function cm(e,t,n,o){var l=t&ge,d=An(e);function h(){for(var m=-1,y=arguments.length,E=-1,b=o.length,A=v(b+y),O=this&&this!==ue&&this instanceof h?d:e;++E<b;)A[E]=o[E];for(;y--;)A[E++]=arguments[++m];return xe(O,l?n:this,A)}return h}function Fl(e){return function(t,n,o){return o&&typeof o!="number"&&ve(t,n,o)&&(n=o=i),t=ct(t),n===i?(n=t,t=0):n=ct(n),o=o===i?t<n?1:-1:ct(o),Yg(t,n,o,e)}}function yr(e){return function(t,n){return typeof t=="string"&&typeof n=="string"||(t=Fe(t),n=Fe(n)),e(t,n)}}function Dl(e,t,n,o,l,d,h,m,y,E){var b=t&je,A=b?h:i,O=b?i:h,$=b?d:i,L=b?i:d;t|=b?et:rn,t&=~(b?rn:et),t&no||(t&=-4);var F=[e,t,l,$,A,L,O,m,y,E],N=n.apply(i,F);return Gi(e)&&Xl(N,F),N.placeholder=o,Jl(N,e,t)}function Pi(e){var t=oe[e];return function(n,o){if(n=Fe(n),o=o==null?0:me(I(o),292),o&&Jo(n)){var l=(V(n)+"e").split("e"),d=t(l[0]+"e"+(+l[1]+o));return l=(V(d)+"e").split("e"),+(l[0]+"e"+(+l[1]-o))}return t(n)}}var fm=Mt&&1/Gn(new Mt([,-0]))[1]==Hn?function(e){return new Mt(e)}:as;function Pl(e){return function(t){var n=pe(t);return n==Me?pi(t):n==We?Oh(t):wh(t,e(t))}}function ot(e,t,n,o,l,d,h,m){var y=t&qt;if(!y&&typeof e!="function")throw new Le(g);var E=o?o.length:0;if(E||(t&=-97,o=l=i),h=h===i?h:le(I(h),0),m=m===i?m:I(m),E-=l?l.length:0,t&rn){var b=o,A=l;o=l=i}var O=y?i:Ui(e),$=[e,t,n,o,l,b,A,d,h,m];if(O&&Sm($,O),e=$[0],t=$[1],n=$[2],o=$[3],l=$[4],m=$[9]=$[9]===i?y?0:e.length:le($[9]-E,0),!m&&t&(je|nn)&&(t&=-25),!t||t==ge)var L=am(e,t,n);else t==je||t==nn?L=um(e,t,m):(t==et||t==(ge|et))&&!l.length?L=cm(e,t,n,o):L=mr.apply(i,$);var F=O?wl:Xl;return Jl(F(L,$),e,t)}function Ml(e,t,n,o){return e===i||Ke(e,Pt[n])&&!K.call(o,n)?t:e}function Wl(e,t,n,o,l,d){return J(e)&&J(t)&&(d.set(t,e),fr(e,t,i,Wl,d),d.delete(t)),e}function dm(e){return Rn(e)?i:e}function Ul(e,t,n,o,l,d){var h=n&he,m=e.length,y=t.length;if(m!=y&&!(h&&y>m))return!1;var E=d.get(e),b=d.get(t);if(E&&b)return E==t&&b==e;var A=-1,O=!0,$=n&Pe?new xt:i;for(d.set(e,t),d.set(t,e);++A<m;){var L=e[A],F=t[A];if(o)var N=h?o(F,L,A,t,e,d):o(L,F,A,e,t,d);if(N!==i){if(N)continue;O=!1;break}if($){if(!ci(t,function(P,W){if(!hn($,W)&&(L===P||l(L,P,n,o,d)))return $.push(W)})){O=!1;break}}else if(!(L===F||l(L,F,n,o,d))){O=!1;break}}return d.delete(e),d.delete(t),O}function hm(e,t,n,o,l,d,h){switch(n){case Nt:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case dn:return!(e.byteLength!=t.byteLength||!d(new jn(e),new jn(t)));case on:case ln:case an:return Ke(+e,+t);case Dn:return e.name==t.name&&e.message==t.message;case un:case cn:return e==t+"";case Me:var m=pi;case We:var y=o&he;if(m||(m=Gn),e.size!=t.size&&!y)return!1;var E=h.get(e);if(E)return E==t;o|=Pe,h.set(e,t);var b=Ul(m(e),m(t),o,l,d,h);return h.delete(e),b;case Mn:if(yn)return yn.call(e)==yn.call(t)}return!1}function gm(e,t,n,o,l,d){var h=n&he,m=Mi(e),y=m.length,E=Mi(t),b=E.length;if(y!=b&&!h)return!1;for(var A=y;A--;){var O=m[A];if(!(h?O in t:K.call(t,O)))return!1}var $=d.get(e),L=d.get(t);if($&&L)return $==t&&L==e;var F=!0;d.set(e,t),d.set(t,e);for(var N=h;++A<y;){O=m[A];var P=e[O],W=t[O];if(o)var ke=h?o(W,P,O,t,e,d):o(P,W,O,e,t,d);if(!(ke===i?P===W||l(P,W,n,o,d):ke)){F=!1;break}N||(N=O=="constructor")}if(F&&!N){var we=e.constructor,$e=t.constructor;we!=$e&&"constructor"in e&&"constructor"in t&&!(typeof we=="function"&&we instanceof we&&typeof $e=="function"&&$e instanceof $e)&&(F=!1)}return d.delete(e),d.delete(t),F}function lt(e){return Yi(Yl(e,i,ia),e+"")}function Mi(e){return ul(e,ae,Ki)}function Wi(e){return ul(e,be,Vl)}var Ui=sr?function(e){return sr.get(e)}:as;function vr(e){for(var t=e.name+"",n=Wt[t],o=K.call(Wt,t)?n.length:0;o--;){var l=n[o],d=l.func;if(d==null||d==e)return l.name}return t}function Qt(e){var t=K.call(c,"placeholder")?c:e;return t.placeholder}function q(){var e=c.iteratee||os;return e=e===os?dl:e,arguments.length?e(arguments[0],arguments[1]):e}function wr(e,t){var n=e.__data__;return Em(t)?n[typeof t=="string"?"string":"hash"]:n.map}function Vi(e){for(var t=ae(e),n=t.length;n--;){var o=t[n],l=e[o];t[n]=[o,l,Gl(l)]}return t}function Ot(e,t){var n=xh(e,t);return fl(n)?n:i}function mm(e){var t=K.call(e,bt),n=e[bt];try{e[bt]=i;var o=!0}catch{}var l=Xn.call(e);return o&&(t?e[bt]=n:delete e[bt]),l}var Ki=yi?function(e){return e==null?[]:(e=Q(e),dt(yi(e),function(t){return Zo.call(e,t)}))}:us,Vl=yi?function(e){for(var t=[];e;)ht(t,Ki(e)),e=er(e);return t}:us,pe=ye;(vi&&pe(new vi(new ArrayBuffer(1)))!=Nt||mn&&pe(new mn)!=Me||wi&&pe(wi.resolve())!=so||Mt&&pe(new Mt)!=We||pn&&pe(new pn)!=fn)&&(pe=function(e){var t=ye(e),n=t==nt?e.constructor:i,o=n?kt(n):"";if(o)switch(o){case Xh:return Nt;case Jh:return Me;case jh:return so;case eg:return We;case tg:return fn}return t});function pm(e,t,n){for(var o=-1,l=n.length;++o<l;){var d=n[o],h=d.size;switch(d.type){case"drop":e+=h;break;case"dropRight":t-=h;break;case"take":t=me(t,e+h);break;case"takeRight":e=le(e,t-h);break}}return{start:e,end:t}}function _m(e){var t=e.match(bd);return t?t[1].split(Ad):[]}function Kl(e,t,n){t=yt(t,e);for(var o=-1,l=t.length,d=!1;++o<l;){var h=Xe(t[o]);if(!(d=e!=null&&n(e,h)))break;e=e[h]}return d||++o!=l?d:(l=e==null?0:e.length,!!l&&Rr(l)&&at(h,l)&&(H(e)||$t(e)))}function ym(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&K.call(e,"index")&&(n.index=e.index,n.input=e.input),n}function Ql(e){return typeof e.constructor=="function"&&!xn(e)?Ut(er(e)):{}}function vm(e,t,n){var o=e.constructor;switch(t){case dn:return Fi(e);case on:case ln:return new o(+e);case Nt:return nm(e,n);case Vr:case Kr:case Qr:case Gr:case zr:case Yr:case Zr:case Xr:case Jr:return Ol(e,n);case Me:return new o;case an:case cn:return new o(e);case un:return rm(e);case We:return new o;case Mn:return im(e)}}function wm(e,t){var n=t.length;if(!n)return e;var o=n-1;return t[o]=(n>1?"& ":"")+t[o],t=t.join(n>2?", ":" "),e.replace(Ed,`{
17
17
  /* [wrapped with `+t+`] */
18
- `)}function zh(e){return H(e)||bt(e)||!!(Xs&&e&&e[Xs])}function tt(e,t){var n=typeof e;return t=t??St,!!t&&(n=="number"||n!="symbol"&&sf.test(e))&&e>-1&&e%1==0&&e<t}function ce(e,t,n){if(!Z(n))return!1;var r=typeof t;return(r=="number"?he(n)&&tt(t,n.length):r=="string"&&t in n)?De(n[t],e):!1}function Ri(e,t){if(H(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Ce(e)?!0:Mc.test(e)||!Uc.test(e)||t!=null&&e in K(t)}function Gh(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ki(e){var t=sr(e),n=a[t];if(typeof n!="function"||!(t in W.prototype))return!1;if(e===n)return!0;var r=Ai(n);return!!r&&e===r[0]}function Yh(e){return!!zs&&zs in e}var Zh=Hn?nt:Vi;function pn(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||$t;return e===n}function Go(e){return e===e&&!Z(e)}function Yo(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==i||e in K(n))}}function Xh(e){var t=fr(e,function(r){return n.size===q&&n.clear(),r}),n=t.cache;return t}function Jh(e,t){var n=e[1],r=t[1],o=n|r,u=o<(pe|At|Ge),f=r==Ge&&n==Ke||r==Ge&&n==Yt&&e[7].length<=t[8]||r==(Ge|Yt)&&t[7].length<=t[8]&&n==Ke;if(!(u||f))return e;r&pe&&(e[2]=t[2],o|=n&pe?0:rs);var h=t[3];if(h){var _=e[3];e[3]=_?Lo(_,h,t[4]):h,e[4]=_?lt(e[3],B):t[4]}return h=t[5],h&&(_=e[5],e[5]=_?Oo(_,h,t[6]):h,e[6]=_?lt(e[5],B):t[6]),h=t[7],h&&(e[7]=h),r&Ge&&(e[8]=e[8]==null?t[8]:le(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=o,e}function jh(e){var t=[];if(e!=null)for(var n in K(e))t.push(n);return t}function eg(e){return In.call(e)}function Zo(e,t,n){return t=re(t===i?e.length-1:t,0),function(){for(var r=arguments,o=-1,u=re(r.length-t,0),f=y(u);++o<u;)f[o]=r[t+o];o=-1;for(var h=y(t+1);++o<t;)h[o]=r[o];return h[t]=n(f),_e(e,this,h)}}function Xo(e,t){return t.length<2?e:Ct(e,qe(t,0,-1))}function tg(e,t){for(var n=e.length,r=le(t.length,n),o=de(e);r--;){var u=t[r];e[r]=tt(u,n)?o[u]:i}return e}function qi(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Jo=el(wo),_n=pd||function(e,t){return se.setTimeout(e,t)},Bi=el(Ah);function jo(e,t,n){var r=t+"";return Bi(e,Kh(r,ng(Mh(r),n)))}function el(e){var t=0,n=0;return function(){var r=Cd(),o=Ec-(r-n);if(n=r,o>0){if(++t>=wc)return arguments[0]}else t=0;return e.apply(i,arguments)}}function lr(e,t){var n=-1,r=e.length,o=r-1;for(t=t===i?r:t;++n<t;){var u=di(n,o),f=e[u];e[u]=e[n],e[n]=f}return e.length=t,e}var tl=Xh(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Qc,function(n,r,o,u){t.push(o?u.replace(Jc,"$1"):r||n)}),t});function Qe(e){if(typeof e=="string"||Ce(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function Et(e){if(e!=null){try{return Tn.call(e)}catch{}try{return e+""}catch{}}return""}function ng(e,t){return Se(kc,function(n){var r="_."+n[0];t&n[1]&&!Ln(e,r)&&e.push(r)}),e.sort()}function nl(e){if(e instanceof W)return e.clone();var t=new Re(e.__wrapped__,e.__chain__);return t.__actions__=de(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function rg(e,t,n){(n?ce(e,t,n):t===i)?t=1:t=re(T(t),0);var r=e==null?0:e.length;if(!r||t<1)return[];for(var o=0,u=0,f=y(Mn(r/t));o<r;)f[u++]=qe(e,o,o+=t);return f}function ig(e){for(var t=-1,n=e==null?0:e.length,r=0,o=[];++t<n;){var u=e[t];u&&(o[r++]=u)}return o}function sg(){var e=arguments.length;if(!e)return[];for(var t=y(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return ot(H(n)?de(n):[n],oe(t,1))}var og=D(function(e,t){return J(e)?fn(e,oe(t,1,J,!0)):[]}),lg=D(function(e,t){var n=Be(t);return J(n)&&(n=i),J(e)?fn(e,oe(t,1,J,!0),L(n,2)):[]}),ag=D(function(e,t){var n=Be(t);return J(n)&&(n=i),J(e)?fn(e,oe(t,1,J,!0),i,n):[]});function ug(e,t,n){var r=e==null?0:e.length;return r?(t=n||t===i?1:T(t),qe(e,t<0?0:t,r)):[]}function cg(e,t,n){var r=e==null?0:e.length;return r?(t=n||t===i?1:T(t),t=r-t,qe(e,0,t<0?0:t)):[]}function fg(e,t){return e&&e.length?jn(e,L(t,3),!0,!0):[]}function dg(e,t){return e&&e.length?jn(e,L(t,3),!0):[]}function hg(e,t,n,r){var o=e==null?0:e.length;return o?(n&&typeof n!="number"&&ce(e,t,n)&&(n=0,r=o),sh(e,t,n,r)):[]}function rl(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var o=n==null?0:T(n);return o<0&&(o=re(r+o,0)),On(e,L(t,3),o)}function il(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var o=r-1;return n!==i&&(o=T(n),o=n<0?re(r+o,0):le(o,r-1)),On(e,L(t,3),o,!0)}function sl(e){var t=e==null?0:e.length;return t?oe(e,1):[]}function gg(e){var t=e==null?0:e.length;return t?oe(e,En):[]}function mg(e,t){var n=e==null?0:e.length;return n?(t=t===i?1:T(t),oe(e,t)):[]}function pg(e){for(var t=-1,n=e==null?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r}function ol(e){return e&&e.length?e[0]:i}function _g(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var o=n==null?0:T(n);return o<0&&(o=re(r+o,0)),qt(e,t,o)}function vg(e){var t=e==null?0:e.length;return t?qe(e,0,-1):[]}var yg=D(function(e){var t=Y(e,_i);return t.length&&t[0]===e[0]?li(t):[]}),Cg=D(function(e){var t=Be(e),n=Y(e,_i);return t===Be(n)?t=i:n.pop(),n.length&&n[0]===e[0]?li(n,L(t,2)):[]}),wg=D(function(e){var t=Be(e),n=Y(e,_i);return t=typeof t=="function"?t:i,t&&n.pop(),n.length&&n[0]===e[0]?li(n,i,t):[]});function Eg(e,t){return e==null?"":vd.call(e,t)}function Be(e){var t=e==null?0:e.length;return t?e[t-1]:i}function bg(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var o=r;return n!==i&&(o=T(n),o=o<0?re(r+o,0):le(o,r-1)),t===t?nd(e,t,o):On(e,Ps,o,!0)}function Ag(e,t){return e&&e.length?_o(e,T(t)):i}var Sg=D(ll);function ll(e,t){return e&&e.length&&t&&t.length?fi(e,t):e}function xg(e,t,n){return e&&e.length&&t&&t.length?fi(e,t,L(n,2)):e}function Rg(e,t,n){return e&&e.length&&t&&t.length?fi(e,t,i,n):e}var kg=et(function(e,t){var n=e==null?0:e.length,r=ri(e,t);return Co(e,Y(t,function(o){return tt(o,n)?+o:o}).sort(Bo)),r});function qg(e,t){var n=[];if(!(e&&e.length))return n;var r=-1,o=[],u=e.length;for(t=L(t,3);++r<u;){var f=e[r];t(f,r,e)&&(n.push(f),o.push(r))}return Co(e,o),n}function Li(e){return e==null?e:Ed.call(e)}function Bg(e,t,n){var r=e==null?0:e.length;return r?(n&&typeof n!="number"&&ce(e,t,n)?(t=0,n=r):(t=t==null?0:T(t),n=n===i?r:T(n)),qe(e,t,n)):[]}function Lg(e,t){return Jn(e,t)}function Og(e,t,n){return gi(e,t,L(n,2))}function $g(e,t){var n=e==null?0:e.length;if(n){var r=Jn(e,t);if(r<n&&De(e[r],t))return r}return-1}function Ng(e,t){return Jn(e,t,!0)}function Hg(e,t,n){return gi(e,t,L(n,2),!0)}function Tg(e,t){var n=e==null?0:e.length;if(n){var r=Jn(e,t,!0)-1;if(De(e[r],t))return r}return-1}function Ig(e){return e&&e.length?Eo(e):[]}function Dg(e,t){return e&&e.length?Eo(e,L(t,2)):[]}function Pg(e){var t=e==null?0:e.length;return t?qe(e,1,t):[]}function Fg(e,t,n){return e&&e.length?(t=n||t===i?1:T(t),qe(e,0,t<0?0:t)):[]}function Wg(e,t,n){var r=e==null?0:e.length;return r?(t=n||t===i?1:T(t),t=r-t,qe(e,t<0?0:t,r)):[]}function Ug(e,t){return e&&e.length?jn(e,L(t,3),!1,!0):[]}function Mg(e,t){return e&&e.length?jn(e,L(t,3)):[]}var Qg=D(function(e){return ct(oe(e,1,J,!0))}),Vg=D(function(e){var t=Be(e);return J(t)&&(t=i),ct(oe(e,1,J,!0),L(t,2))}),Kg=D(function(e){var t=Be(e);return t=typeof t=="function"?t:i,ct(oe(e,1,J,!0),i,t)});function zg(e){return e&&e.length?ct(e):[]}function Gg(e,t){return e&&e.length?ct(e,L(t,2)):[]}function Yg(e,t){return t=typeof t=="function"?t:i,e&&e.length?ct(e,i,t):[]}function Oi(e){if(!(e&&e.length))return[];var t=0;return e=st(e,function(n){if(J(n))return t=re(n.length,t),!0}),Yr(t,function(n){return Y(e,Kr(n))})}function al(e,t){if(!(e&&e.length))return[];var n=Oi(e);return t==null?n:Y(n,function(r){return _e(t,i,r)})}var Zg=D(function(e,t){return J(e)?fn(e,t):[]}),Xg=D(function(e){return pi(st(e,J))}),Jg=D(function(e){var t=Be(e);return J(t)&&(t=i),pi(st(e,J),L(t,2))}),jg=D(function(e){var t=Be(e);return t=typeof t=="function"?t:i,pi(st(e,J),i,t)}),em=D(Oi);function tm(e,t){return xo(e||[],t||[],cn)}function nm(e,t){return xo(e||[],t||[],gn)}var rm=D(function(e){var t=e.length,n=t>1?e[t-1]:i;return n=typeof n=="function"?(e.pop(),n):i,al(e,n)});function ul(e){var t=a(e);return t.__chain__=!0,t}function im(e,t){return t(e),e}function ar(e,t){return t(e)}var sm=et(function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,o=function(u){return ri(u,e)};return t>1||this.__actions__.length||!(r instanceof W)||!tt(n)?this.thru(o):(r=r.slice(n,+n+(t?1:0)),r.__actions__.push({func:ar,args:[o],thisArg:i}),new Re(r,this.__chain__).thru(function(u){return t&&!u.length&&u.push(i),u}))});function om(){return ul(this)}function lm(){return new Re(this.value(),this.__chain__)}function am(){this.__values__===i&&(this.__values__=bl(this.value()));var e=this.__index__>=this.__values__.length,t=e?i:this.__values__[this.__index__++];return{done:e,value:t}}function um(){return this}function cm(e){for(var t,n=this;n instanceof zn;){var r=nl(n);r.__index__=0,r.__values__=i,t?o.__wrapped__=r:t=r;var o=r;n=n.__wrapped__}return o.__wrapped__=e,t}function fm(){var e=this.__wrapped__;if(e instanceof W){var t=e;return this.__actions__.length&&(t=new W(this)),t=t.reverse(),t.__actions__.push({func:ar,args:[Li],thisArg:i}),new Re(t,this.__chain__)}return this.thru(Li)}function dm(){return So(this.__wrapped__,this.__actions__)}var hm=er(function(e,t,n){V.call(e,n)?++e[n]:Je(e,n,1)});function gm(e,t,n){var r=H(e)?Is:ih;return n&&ce(e,t,n)&&(t=i),r(e,L(t,3))}function mm(e,t){var n=H(e)?st:lo;return n(e,L(t,3))}var pm=To(rl),_m=To(il);function vm(e,t){return oe(ur(e,t),1)}function ym(e,t){return oe(ur(e,t),En)}function Cm(e,t,n){return n=n===i?1:T(n),oe(ur(e,t),n)}function cl(e,t){var n=H(e)?Se:ut;return n(e,L(t,3))}function fl(e,t){var n=H(e)?Pf:oo;return n(e,L(t,3))}var wm=er(function(e,t,n){V.call(e,n)?e[n].push(t):Je(e,n,[t])});function Em(e,t,n,r){e=he(e)?e:Wt(e),n=n&&!r?T(n):0;var o=e.length;return n<0&&(n=re(o+n,0)),gr(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&qt(e,t,n)>-1}var bm=D(function(e,t,n){var r=-1,o=typeof t=="function",u=he(e)?y(e.length):[];return ut(e,function(f){u[++r]=o?_e(t,f,n):dn(f,t,n)}),u}),Am=er(function(e,t,n){Je(e,n,t)});function ur(e,t){var n=H(e)?Y:go;return n(e,L(t,3))}function Sm(e,t,n,r){return e==null?[]:(H(t)||(t=t==null?[]:[t]),n=r?i:n,H(n)||(n=n==null?[]:[n]),vo(e,t,n))}var xm=er(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function Rm(e,t,n){var r=H(e)?Qr:Ws,o=arguments.length<3;return r(e,L(t,4),n,o,ut)}function km(e,t,n){var r=H(e)?Ff:Ws,o=arguments.length<3;return r(e,L(t,4),n,o,oo)}function qm(e,t){var n=H(e)?st:lo;return n(e,dr(L(t,3)))}function Bm(e){var t=H(e)?no:Eh;return t(e)}function Lm(e,t,n){(n?ce(e,t,n):t===i)?t=1:t=T(t);var r=H(e)?jd:bh;return r(e,t)}function Om(e){var t=H(e)?eh:Sh;return t(e)}function $m(e){if(e==null)return 0;if(he(e))return gr(e)?Lt(e):e.length;var t=ae(e);return t==Ne||t==He?e.size:ui(e).length}function Nm(e,t,n){var r=H(e)?Vr:xh;return n&&ce(e,t,n)&&(t=i),r(e,L(t,3))}var Hm=D(function(e,t){if(e==null)return[];var n=t.length;return n>1&&ce(e,t[0],t[1])?t=[]:n>2&&ce(t[0],t[1],t[2])&&(t=[t[0]]),vo(e,oe(t,1),[])}),cr=md||function(){return se.Date.now()};function Tm(e,t){if(typeof t!="function")throw new xe(v);return e=T(e),function(){if(--e<1)return t.apply(this,arguments)}}function dl(e,t,n){return t=n?i:t,t=e&&t==null?e.length:t,je(e,Ge,i,i,i,i,t)}function hl(e,t){var n;if(typeof t!="function")throw new xe(v);return e=T(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var $i=D(function(e,t,n){var r=pe;if(n.length){var o=lt(n,Pt($i));r|=ze}return je(e,r,t,n,o)}),gl=D(function(e,t,n){var r=pe|At;if(n.length){var o=lt(n,Pt(gl));r|=ze}return je(t,r,e,n,o)});function ml(e,t,n){t=n?i:t;var r=je(e,Ke,i,i,i,i,i,t);return r.placeholder=ml.placeholder,r}function pl(e,t,n){t=n?i:t;var r=je(e,zt,i,i,i,i,i,t);return r.placeholder=pl.placeholder,r}function _l(e,t,n){var r,o,u,f,h,_,w=0,E=!1,b=!1,S=!0;if(typeof e!="function")throw new xe(v);t=Le(t)||0,Z(n)&&(E=!!n.leading,b="maxWait"in n,u=b?re(Le(n.maxWait)||0,t):u,S="trailing"in n?!!n.trailing:S);function k(j){var Pe=r,it=o;return r=o=i,w=j,f=e.apply(it,Pe),f}function O(j){return w=j,h=_n(F,t),E?k(j):f}function I(j){var Pe=j-_,it=j-w,Tl=t-Pe;return b?le(Tl,u-it):Tl}function $(j){var Pe=j-_,it=j-w;return _===i||Pe>=t||Pe<0||b&&it>=u}function F(){var j=cr();if($(j))return U(j);h=_n(F,I(j))}function U(j){return h=i,S&&r?k(j):(r=o=i,f)}function we(){h!==i&&Ro(h),w=0,r=_=o=h=i}function fe(){return h===i?f:U(cr())}function Ee(){var j=cr(),Pe=$(j);if(r=arguments,o=this,_=j,Pe){if(h===i)return O(_);if(b)return Ro(h),h=_n(F,t),k(_)}return h===i&&(h=_n(F,t)),f}return Ee.cancel=we,Ee.flush=fe,Ee}var Im=D(function(e,t){return so(e,1,t)}),Dm=D(function(e,t,n){return so(e,Le(t)||0,n)});function Pm(e){return je(e,Ar)}function fr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new xe(v);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],u=n.cache;if(u.has(o))return u.get(o);var f=e.apply(this,r);return n.cache=u.set(o,f)||u,f};return n.cache=new(fr.Cache||Xe),n}fr.Cache=Xe;function dr(e){if(typeof e!="function")throw new xe(v);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function Fm(e){return hl(2,e)}var Wm=Rh(function(e,t){t=t.length==1&&H(t[0])?Y(t[0],ve(L())):Y(oe(t,1),ve(L()));var n=t.length;return D(function(r){for(var o=-1,u=le(r.length,n);++o<u;)r[o]=t[o].call(this,r[o]);return _e(e,this,r)})}),Ni=D(function(e,t){var n=lt(t,Pt(Ni));return je(e,ze,i,t,n)}),vl=D(function(e,t){var n=lt(t,Pt(vl));return je(e,Gt,i,t,n)}),Um=et(function(e,t){return je(e,Yt,i,i,i,t)});function Mm(e,t){if(typeof e!="function")throw new xe(v);return t=t===i?t:T(t),D(e,t)}function Qm(e,t){if(typeof e!="function")throw new xe(v);return t=t==null?0:re(T(t),0),D(function(n){var r=n[t],o=dt(n,0,t);return r&&ot(o,r),_e(e,this,o)})}function Vm(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new xe(v);return Z(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),_l(e,t,{leading:r,maxWait:t,trailing:o})}function Km(e){return dl(e,1)}function zm(e,t){return Ni(vi(t),e)}function Gm(){if(!arguments.length)return[];var e=arguments[0];return H(e)?e:[e]}function Ym(e){return ke(e,$e)}function Zm(e,t){return t=typeof t=="function"?t:i,ke(e,$e,t)}function Xm(e){return ke(e,P|$e)}function Jm(e,t){return t=typeof t=="function"?t:i,ke(e,P|$e,t)}function jm(e,t){return t==null||io(e,t,ie(t))}function De(e,t){return e===t||e!==e&&t!==t}var ep=ir(oi),tp=ir(function(e,t){return e>=t}),bt=co(function(){return arguments}())?co:function(e){return X(e)&&V.call(e,"callee")&&!Zs.call(e,"callee")},H=y.isArray,np=Ls?ve(Ls):ch;function he(e){return e!=null&&hr(e.length)&&!nt(e)}function J(e){return X(e)&&he(e)}function rp(e){return e===!0||e===!1||X(e)&&ue(e)==Zt}var ht=_d||Vi,ip=Os?ve(Os):fh;function sp(e){return X(e)&&e.nodeType===1&&!vn(e)}function op(e){if(e==null)return!0;if(he(e)&&(H(e)||typeof e=="string"||typeof e.splice=="function"||ht(e)||Ft(e)||bt(e)))return!e.length;var t=ae(e);if(t==Ne||t==He)return!e.size;if(pn(e))return!ui(e).length;for(var n in e)if(V.call(e,n))return!1;return!0}function lp(e,t){return hn(e,t)}function ap(e,t,n){n=typeof n=="function"?n:i;var r=n?n(e,t):i;return r===i?hn(e,t,i,n):!!r}function Hi(e){if(!X(e))return!1;var t=ue(e);return t==Sn||t==Bc||typeof e.message=="string"&&typeof e.name=="string"&&!vn(e)}function up(e){return typeof e=="number"&&Js(e)}function nt(e){if(!Z(e))return!1;var t=ue(e);return t==xn||t==ss||t==qc||t==Oc}function yl(e){return typeof e=="number"&&e==T(e)}function hr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=St}function Z(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function X(e){return e!=null&&typeof e=="object"}var Cl=$s?ve($s):hh;function cp(e,t){return e===t||ai(e,t,Si(t))}function fp(e,t,n){return n=typeof n=="function"?n:i,ai(e,t,Si(t),n)}function dp(e){return wl(e)&&e!=+e}function hp(e){if(Zh(e))throw new N(c);return fo(e)}function gp(e){return e===null}function mp(e){return e==null}function wl(e){return typeof e=="number"||X(e)&&ue(e)==Jt}function vn(e){if(!X(e)||ue(e)!=Ye)return!1;var t=Fn(e);if(t===null)return!0;var n=V.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Tn.call(n)==fd}var Ti=Ns?ve(Ns):gh;function pp(e){return yl(e)&&e>=-9007199254740991&&e<=St}var El=Hs?ve(Hs):mh;function gr(e){return typeof e=="string"||!H(e)&&X(e)&&ue(e)==en}function Ce(e){return typeof e=="symbol"||X(e)&&ue(e)==Rn}var Ft=Ts?ve(Ts):ph;function _p(e){return e===i}function vp(e){return X(e)&&ae(e)==tn}function yp(e){return X(e)&&ue(e)==Nc}var Cp=ir(ci),wp=ir(function(e,t){return e<=t});function bl(e){if(!e)return[];if(he(e))return gr(e)?Te(e):de(e);if(sn&&e[sn])return jf(e[sn]());var t=ae(e),n=t==Ne?Xr:t==He?$n:Wt;return n(e)}function rt(e){if(!e)return e===0?e:0;if(e=Le(e),e===En||e===-1/0){var t=e<0?-1:1;return t*Sc}return e===e?e:0}function T(e){var t=rt(e),n=t%1;return t===t?n?t-n:t:0}function Al(e){return e?yt(T(e),0,We):0}function Le(e){if(typeof e=="number")return e;if(Ce(e))return bn;if(Z(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Z(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Us(e);var n=tf.test(e);return n||rf.test(e)?Tf(e.slice(2),n?2:8):ef.test(e)?bn:+e}function Sl(e){return Me(e,ge(e))}function Ep(e){return e?yt(T(e),-9007199254740991,St):e===0?e:0}function Q(e){return e==null?"":ye(e)}var bp=It(function(e,t){if(pn(t)||he(t)){Me(t,ie(t),e);return}for(var n in t)V.call(t,n)&&cn(e,n,t[n])}),xl=It(function(e,t){Me(t,ge(t),e)}),mr=It(function(e,t,n,r){Me(t,ge(t),e,r)}),Ap=It(function(e,t,n,r){Me(t,ie(t),e,r)}),Sp=et(ri);function xp(e,t){var n=Tt(e);return t==null?n:ro(n,t)}var Rp=D(function(e,t){e=K(e);var n=-1,r=t.length,o=r>2?t[2]:i;for(o&&ce(t[0],t[1],o)&&(r=1);++n<r;)for(var u=t[n],f=ge(u),h=-1,_=f.length;++h<_;){var w=f[h],E=e[w];(E===i||De(E,$t[w])&&!V.call(e,w))&&(e[w]=u[w])}return e}),kp=D(function(e){return e.push(i,Mo),_e(Rl,i,e)});function qp(e,t){return Ds(e,L(t,3),Ue)}function Bp(e,t){return Ds(e,L(t,3),si)}function Lp(e,t){return e==null?e:ii(e,L(t,3),ge)}function Op(e,t){return e==null?e:ao(e,L(t,3),ge)}function $p(e,t){return e&&Ue(e,L(t,3))}function Np(e,t){return e&&si(e,L(t,3))}function Hp(e){return e==null?[]:Zn(e,ie(e))}function Tp(e){return e==null?[]:Zn(e,ge(e))}function Ii(e,t,n){var r=e==null?i:Ct(e,t);return r===i?n:r}function Ip(e,t){return e!=null&&Ko(e,t,oh)}function Di(e,t){return e!=null&&Ko(e,t,lh)}var Dp=Do(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=In.call(t)),e[t]=n},Fi(me)),Pp=Do(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=In.call(t)),V.call(e,t)?e[t].push(n):e[t]=[n]},L),Fp=D(dn);function ie(e){return he(e)?to(e):ui(e)}function ge(e){return he(e)?to(e,!0):_h(e)}function Wp(e,t){var n={};return t=L(t,3),Ue(e,function(r,o,u){Je(n,t(r,o,u),r)}),n}function Up(e,t){var n={};return t=L(t,3),Ue(e,function(r,o,u){Je(n,o,t(r,o,u))}),n}var Mp=It(function(e,t,n){Xn(e,t,n)}),Rl=It(function(e,t,n,r){Xn(e,t,n,r)}),Qp=et(function(e,t){var n={};if(e==null)return n;var r=!1;t=Y(t,function(u){return u=ft(u,e),r||(r=u.length>1),u}),Me(e,bi(e),n),r&&(n=ke(n,P|be|$e,Dh));for(var o=t.length;o--;)mi(n,t[o]);return n});function Vp(e,t){return kl(e,dr(L(t)))}var Kp=et(function(e,t){return e==null?{}:yh(e,t)});function kl(e,t){if(e==null)return{};var n=Y(bi(e),function(r){return[r]});return t=L(t),yo(e,n,function(r,o){return t(r,o[0])})}function zp(e,t,n){t=ft(t,e);var r=-1,o=t.length;for(o||(o=1,e=i);++r<o;){var u=e==null?i:e[Qe(t[r])];u===i&&(r=o,u=n),e=nt(u)?u.call(e):u}return e}function Gp(e,t,n){return e==null?e:gn(e,t,n)}function Yp(e,t,n,r){return r=typeof r=="function"?r:i,e==null?e:gn(e,t,n,r)}var ql=Wo(ie),Bl=Wo(ge);function Zp(e,t,n){var r=H(e),o=r||ht(e)||Ft(e);if(t=L(t,4),n==null){var u=e&&e.constructor;o?n=r?new u:[]:Z(e)?n=nt(u)?Tt(Fn(e)):{}:n={}}return(o?Se:Ue)(e,function(f,h,_){return t(n,f,h,_)}),n}function Xp(e,t){return e==null?!0:mi(e,t)}function Jp(e,t,n){return e==null?e:Ao(e,t,vi(n))}function jp(e,t,n,r){return r=typeof r=="function"?r:i,e==null?e:Ao(e,t,vi(n),r)}function Wt(e){return e==null?[]:Zr(e,ie(e))}function e_(e){return e==null?[]:Zr(e,ge(e))}function t_(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=Le(n),n=n===n?n:0),t!==i&&(t=Le(t),t=t===t?t:0),yt(Le(e),t,n)}function n_(e,t,n){return t=rt(t),n===i?(n=t,t=0):n=rt(n),e=Le(e),ah(e,t,n)}function r_(e,t,n){if(n&&typeof n!="boolean"&&ce(e,t,n)&&(t=n=i),n===i&&(typeof t=="boolean"?(n=t,t=i):typeof e=="boolean"&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=rt(e),t===i?(t=e,e=0):t=rt(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var o=js();return le(e+o*(t-e+Hf("1e-"+((o+"").length-1))),t)}return di(e,t)}var i_=Dt(function(e,t,n){return t=t.toLowerCase(),e+(n?Ll(t):t)});function Ll(e){return Pi(Q(e).toLowerCase())}function Ol(e){return e=Q(e),e&&e.replace(of,Gf).replace(Sf,"")}function s_(e,t,n){e=Q(e),t=ye(t);var r=e.length;n=n===i?r:yt(T(n),0,r);var o=n;return n-=t.length,n>=0&&e.slice(n,o)==t}function o_(e){return e=Q(e),e&&Pc.test(e)?e.replace(as,Yf):e}function l_(e){return e=Q(e),e&&Vc.test(e)?e.replace(Nr,"\\$&"):e}var a_=Dt(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),u_=Dt(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),c_=Ho("toLowerCase");function f_(e,t,n){e=Q(e),t=T(t);var r=t?Lt(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return rr(Qn(o),n)+e+rr(Mn(o),n)}function d_(e,t,n){e=Q(e),t=T(t);var r=t?Lt(e):0;return t&&r<t?e+rr(t-r,n):e}function h_(e,t,n){e=Q(e),t=T(t);var r=t?Lt(e):0;return t&&r<t?rr(t-r,n)+e:e}function g_(e,t,n){return n||t==null?t=0:t&&(t=+t),wd(Q(e).replace(Hr,""),t||0)}function m_(e,t,n){return(n?ce(e,t,n):t===i)?t=1:t=T(t),hi(Q(e),t)}function p_(){var e=arguments,t=Q(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var __=Dt(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});function v_(e,t,n){return n&&typeof n!="number"&&ce(e,t,n)&&(t=n=i),n=n===i?We:n>>>0,n?(e=Q(e),e&&(typeof t=="string"||t!=null&&!Ti(t))&&(t=ye(t),!t&&Bt(e))?dt(Te(e),0,n):e.split(t,n)):[]}var y_=Dt(function(e,t,n){return e+(n?" ":"")+Pi(t)});function C_(e,t,n){return e=Q(e),n=n==null?0:yt(T(n),0,e.length),t=ye(t),e.slice(n,n+t.length)==t}function w_(e,t,n){var r=a.templateSettings;n&&ce(e,t,n)&&(t=i),e=Q(e),t=mr({},t,r,Uo);var o=mr({},t.imports,r.imports,Uo),u=ie(o),f=Zr(o,u),h,_,w=0,E=t.interpolate||kn,b="__p += '",S=Jr((t.escape||kn).source+"|"+E.source+"|"+(E===us?jc:kn).source+"|"+(t.evaluate||kn).source+"|$","g"),k="//# sourceURL="+(V.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bf+"]")+`
19
- `;e.replace(S,function($,F,U,we,fe,Ee){return U||(U=we),b+=e.slice(w,Ee).replace(lf,Zf),F&&(h=!0,b+=`' +
20
- __e(`+F+`) +
21
- '`),fe&&(_=!0,b+=`';
22
- `+fe+`;
23
- __p += '`),U&&(b+=`' +
24
- ((__t = (`+U+`)) == null ? '' : __t) +
25
- '`),w=Ee+$.length,$}),b+=`';
26
- `;var O=V.call(t,"variable")&&t.variable;if(!O)b=`with (obj) {
27
- `+b+`
18
+ `)}function Cm(e){return H(e)||$t(e)||!!(Xo&&e&&e[Xo])}function at(e,t){var n=typeof e;return t=t??Bt,!!t&&(n=="number"||n!="symbol"&&Ld.test(e))&&e>-1&&e%1==0&&e<t}function ve(e,t,n){if(!J(n))return!1;var o=typeof t;return(o=="number"?Ee(n)&&at(t,n.length):o=="string"&&t in n)?Ke(n[t],e):!1}function Qi(e,t){if(H(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Oe(e)?!0:yd.test(e)||!_d.test(e)||t!=null&&e in Q(t)}function Em(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Gi(e){var t=vr(e),n=c[t];if(typeof n!="function"||!(t in M.prototype))return!1;if(e===n)return!0;var o=Ui(n);return!!o&&e===o[0]}function bm(e){return!!Go&&Go in e}var Am=Yn?ut:cs;function xn(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Pt;return e===n}function Gl(e){return e===e&&!J(e)}function zl(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==i||e in Q(n))}}function xm(e){var t=xr(e,function(o){return n.size===S&&n.clear(),o}),n=t.cache;return t}function Sm(e,t){var n=e[1],o=t[1],l=n|o,d=l<(ge|qt|tt),h=o==tt&&n==je||o==tt&&n==sn&&e[7].length<=t[8]||o==(tt|sn)&&t[7].length<=t[8]&&n==je;if(!(d||h))return e;o&ge&&(e[2]=t[2],l|=n&ge?0:no);var m=t[3];if(m){var y=e[3];e[3]=y?$l(y,m,t[4]):m,e[4]=y?gt(e[3],R):t[4]}return m=t[5],m&&(y=e[5],e[5]=y?ql(y,m,t[6]):m,e[6]=y?gt(e[5],R):t[6]),m=t[7],m&&(e[7]=m),o&tt&&(e[8]=e[8]==null?t[8]:me(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=l,e}function Rm(e){var t=[];if(e!=null)for(var n in Q(e))t.push(n);return t}function Om(e){return Xn.call(e)}function Yl(e,t,n){return t=le(t===i?e.length-1:t,0),function(){for(var o=arguments,l=-1,d=le(o.length-t,0),h=v(d);++l<d;)h[l]=o[t+l];l=-1;for(var m=v(t+1);++l<t;)m[l]=o[l];return m[t]=n(h),xe(e,this,m)}}function Zl(e,t){return t.length<2?e:Rt(e,He(t,0,-1))}function km(e,t){for(var n=e.length,o=me(t.length,n),l=Ce(e);o--;){var d=t[o];e[o]=at(d,n)?l[d]:i}return e}function zi(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}var Xl=jl(wl),Sn=Vh||function(e,t){return ue.setTimeout(e,t)},Yi=jl(Jg);function Jl(e,t,n){var o=t+"";return Yi(e,wm(o,$m(_m(o),n)))}function jl(e){var t=0,n=0;return function(){var o=zh(),l=Xf-(o-n);if(n=o,l>0){if(++t>=Zf)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Cr(e,t){var n=-1,o=e.length,l=o-1;for(t=t===i?o:t;++n<t;){var d=qi(n,l),h=e[d];e[d]=e[n],e[n]=h}return e.length=t,e}var ea=xm(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(vd,function(n,o,l,d){t.push(l?d.replace(Rd,"$1"):o||n)}),t});function Xe(e){if(typeof e=="string"||Oe(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function kt(e){if(e!=null){try{return Zn.call(e)}catch{}try{return e+""}catch{}}return""}function $m(e,t){return Be(rd,function(n){var o="_."+n[0];t&n[1]&&!Kn(e,o)&&e.push(o)}),e.sort()}function ta(e){if(e instanceof M)return e.clone();var t=new Ne(e.__wrapped__,e.__chain__);return t.__actions__=Ce(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}function qm(e,t,n){(n?ve(e,t,n):t===i)?t=1:t=le(I(t),0);var o=e==null?0:e.length;if(!o||t<1)return[];for(var l=0,d=0,h=v(rr(o/t));l<o;)h[d++]=He(e,l,l+=t);return h}function Bm(e){for(var t=-1,n=e==null?0:e.length,o=0,l=[];++t<n;){var d=e[t];d&&(l[o++]=d)}return l}function Lm(){var e=arguments.length;if(!e)return[];for(var t=v(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return ht(H(n)?Ce(n):[n],ce(t,1))}var Nm=D(function(e,t){return ne(e)?wn(e,ce(t,1,ne,!0)):[]}),Tm=D(function(e,t){var n=Ie(t);return ne(n)&&(n=i),ne(e)?wn(e,ce(t,1,ne,!0),q(n,2)):[]}),Hm=D(function(e,t){var n=Ie(t);return ne(n)&&(n=i),ne(e)?wn(e,ce(t,1,ne,!0),i,n):[]});function Im(e,t,n){var o=e==null?0:e.length;return o?(t=n||t===i?1:I(t),He(e,t<0?0:t,o)):[]}function Fm(e,t,n){var o=e==null?0:e.length;return o?(t=n||t===i?1:I(t),t=o-t,He(e,0,t<0?0:t)):[]}function Dm(e,t){return e&&e.length?hr(e,q(t,3),!0,!0):[]}function Pm(e,t){return e&&e.length?hr(e,q(t,3),!0):[]}function Mm(e,t,n,o){var l=e==null?0:e.length;return l?(n&&typeof n!="number"&&ve(e,t,n)&&(n=0,o=l),Lg(e,t,n,o)):[]}function na(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var l=n==null?0:I(n);return l<0&&(l=le(o+l,0)),Qn(e,q(t,3),l)}function ra(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var l=o-1;return n!==i&&(l=I(n),l=n<0?le(o+l,0):me(l,o-1)),Qn(e,q(t,3),l,!0)}function ia(e){var t=e==null?0:e.length;return t?ce(e,1):[]}function Wm(e){var t=e==null?0:e.length;return t?ce(e,Hn):[]}function Um(e,t){var n=e==null?0:e.length;return n?(t=t===i?1:I(t),ce(e,t)):[]}function Vm(e){for(var t=-1,n=e==null?0:e.length,o={};++t<n;){var l=e[t];o[l[0]]=l[1]}return o}function sa(e){return e&&e.length?e[0]:i}function Km(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var l=n==null?0:I(n);return l<0&&(l=le(o+l,0)),Ht(e,t,l)}function Qm(e){var t=e==null?0:e.length;return t?He(e,0,-1):[]}var Gm=D(function(e){var t=X(e,Hi);return t.length&&t[0]===e[0]?Si(t):[]}),zm=D(function(e){var t=Ie(e),n=X(e,Hi);return t===Ie(n)?t=i:n.pop(),n.length&&n[0]===e[0]?Si(n,q(t,2)):[]}),Ym=D(function(e){var t=Ie(e),n=X(e,Hi);return t=typeof t=="function"?t:i,t&&n.pop(),n.length&&n[0]===e[0]?Si(n,i,t):[]});function Zm(e,t){return e==null?"":Qh.call(e,t)}function Ie(e){var t=e==null?0:e.length;return t?e[t-1]:i}function Xm(e,t,n){var o=e==null?0:e.length;if(!o)return-1;var l=o;return n!==i&&(l=I(n),l=l<0?le(o+l,0):me(l,o-1)),t===t?$h(e,t,l):Qn(e,Do,l,!0)}function Jm(e,t){return e&&e.length?pl(e,I(t)):i}var jm=D(oa);function oa(e,t){return e&&e.length&&t&&t.length?$i(e,t):e}function ep(e,t,n){return e&&e.length&&t&&t.length?$i(e,t,q(n,2)):e}function tp(e,t,n){return e&&e.length&&t&&t.length?$i(e,t,i,n):e}var np=lt(function(e,t){var n=e==null?0:e.length,o=Ei(e,t);return vl(e,X(t,function(l){return at(l,n)?+l:l}).sort(kl)),o});function rp(e,t){var n=[];if(!(e&&e.length))return n;var o=-1,l=[],d=e.length;for(t=q(t,3);++o<d;){var h=e[o];t(h,o,e)&&(n.push(h),l.push(o))}return vl(e,l),n}function Zi(e){return e==null?e:Zh.call(e)}function ip(e,t,n){var o=e==null?0:e.length;return o?(n&&typeof n!="number"&&ve(e,t,n)?(t=0,n=o):(t=t==null?0:I(t),n=n===i?o:I(n)),He(e,t,n)):[]}function sp(e,t){return dr(e,t)}function op(e,t,n){return Li(e,t,q(n,2))}function lp(e,t){var n=e==null?0:e.length;if(n){var o=dr(e,t);if(o<n&&Ke(e[o],t))return o}return-1}function ap(e,t){return dr(e,t,!0)}function up(e,t,n){return Li(e,t,q(n,2),!0)}function cp(e,t){var n=e==null?0:e.length;if(n){var o=dr(e,t,!0)-1;if(Ke(e[o],t))return o}return-1}function fp(e){return e&&e.length?Cl(e):[]}function dp(e,t){return e&&e.length?Cl(e,q(t,2)):[]}function hp(e){var t=e==null?0:e.length;return t?He(e,1,t):[]}function gp(e,t,n){return e&&e.length?(t=n||t===i?1:I(t),He(e,0,t<0?0:t)):[]}function mp(e,t,n){var o=e==null?0:e.length;return o?(t=n||t===i?1:I(t),t=o-t,He(e,t<0?0:t,o)):[]}function pp(e,t){return e&&e.length?hr(e,q(t,3),!1,!0):[]}function _p(e,t){return e&&e.length?hr(e,q(t,3)):[]}var yp=D(function(e){return _t(ce(e,1,ne,!0))}),vp=D(function(e){var t=Ie(e);return ne(t)&&(t=i),_t(ce(e,1,ne,!0),q(t,2))}),wp=D(function(e){var t=Ie(e);return t=typeof t=="function"?t:i,_t(ce(e,1,ne,!0),i,t)});function Cp(e){return e&&e.length?_t(e):[]}function Ep(e,t){return e&&e.length?_t(e,q(t,2)):[]}function bp(e,t){return t=typeof t=="function"?t:i,e&&e.length?_t(e,i,t):[]}function Xi(e){if(!(e&&e.length))return[];var t=0;return e=dt(e,function(n){if(ne(n))return t=le(n.length,t),!0}),gi(t,function(n){return X(e,fi(n))})}function la(e,t){if(!(e&&e.length))return[];var n=Xi(e);return t==null?n:X(n,function(o){return xe(t,i,o)})}var Ap=D(function(e,t){return ne(e)?wn(e,t):[]}),xp=D(function(e){return Ti(dt(e,ne))}),Sp=D(function(e){var t=Ie(e);return ne(t)&&(t=i),Ti(dt(e,ne),q(t,2))}),Rp=D(function(e){var t=Ie(e);return t=typeof t=="function"?t:i,Ti(dt(e,ne),i,t)}),Op=D(Xi);function kp(e,t){return xl(e||[],t||[],vn)}function $p(e,t){return xl(e||[],t||[],bn)}var qp=D(function(e){var t=e.length,n=t>1?e[t-1]:i;return n=typeof n=="function"?(e.pop(),n):i,la(e,n)});function aa(e){var t=c(e);return t.__chain__=!0,t}function Bp(e,t){return t(e),e}function Er(e,t){return t(e)}var Lp=lt(function(e){var t=e.length,n=t?e[0]:0,o=this.__wrapped__,l=function(d){return Ei(d,e)};return t>1||this.__actions__.length||!(o instanceof M)||!at(n)?this.thru(l):(o=o.slice(n,+n+(t?1:0)),o.__actions__.push({func:Er,args:[l],thisArg:i}),new Ne(o,this.__chain__).thru(function(d){return t&&!d.length&&d.push(i),d}))});function Np(){return aa(this)}function Tp(){return new Ne(this.value(),this.__chain__)}function Hp(){this.__values__===i&&(this.__values__=Ea(this.value()));var e=this.__index__>=this.__values__.length,t=e?i:this.__values__[this.__index__++];return{done:e,value:t}}function Ip(){return this}function Fp(e){for(var t,n=this;n instanceof lr;){var o=ta(n);o.__index__=0,o.__values__=i,t?l.__wrapped__=o:t=o;var l=o;n=n.__wrapped__}return l.__wrapped__=e,t}function Dp(){var e=this.__wrapped__;if(e instanceof M){var t=e;return this.__actions__.length&&(t=new M(this)),t=t.reverse(),t.__actions__.push({func:Er,args:[Zi],thisArg:i}),new Ne(t,this.__chain__)}return this.thru(Zi)}function Pp(){return Al(this.__wrapped__,this.__actions__)}var Mp=gr(function(e,t,n){K.call(e,n)?++e[n]:st(e,n,1)});function Wp(e,t,n){var o=H(e)?Io:Bg;return n&&ve(e,t,n)&&(t=i),o(e,q(t,3))}function Up(e,t){var n=H(e)?dt:ll;return n(e,q(t,3))}var Vp=Tl(na),Kp=Tl(ra);function Qp(e,t){return ce(br(e,t),1)}function Gp(e,t){return ce(br(e,t),Hn)}function zp(e,t,n){return n=n===i?1:I(n),ce(br(e,t),n)}function ua(e,t){var n=H(e)?Be:pt;return n(e,q(t,3))}function ca(e,t){var n=H(e)?hh:ol;return n(e,q(t,3))}var Yp=gr(function(e,t,n){K.call(e,n)?e[n].push(t):st(e,n,[t])});function Zp(e,t,n,o){e=Ee(e)?e:zt(e),n=n&&!o?I(n):0;var l=e.length;return n<0&&(n=le(l+n,0)),Or(e)?n<=l&&e.indexOf(t,n)>-1:!!l&&Ht(e,t,n)>-1}var Xp=D(function(e,t,n){var o=-1,l=typeof t=="function",d=Ee(e)?v(e.length):[];return pt(e,function(h){d[++o]=l?xe(t,h,n):Cn(h,t,n)}),d}),Jp=gr(function(e,t,n){st(e,n,t)});function br(e,t){var n=H(e)?X:hl;return n(e,q(t,3))}function jp(e,t,n,o){return e==null?[]:(H(t)||(t=t==null?[]:[t]),n=o?i:n,H(n)||(n=n==null?[]:[n]),_l(e,t,n))}var e_=gr(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});function t_(e,t,n){var o=H(e)?ui:Mo,l=arguments.length<3;return o(e,q(t,4),n,l,pt)}function n_(e,t,n){var o=H(e)?gh:Mo,l=arguments.length<3;return o(e,q(t,4),n,l,ol)}function r_(e,t){var n=H(e)?dt:ll;return n(e,Sr(q(t,3)))}function i_(e){var t=H(e)?nl:Zg;return t(e)}function s_(e,t,n){(n?ve(e,t,n):t===i)?t=1:t=I(t);var o=H(e)?Rg:Xg;return o(e,t)}function o_(e){var t=H(e)?Og:jg;return t(e)}function l_(e){if(e==null)return 0;if(Ee(e))return Or(e)?Ft(e):e.length;var t=pe(e);return t==Me||t==We?e.size:Oi(e).length}function a_(e,t,n){var o=H(e)?ci:em;return n&&ve(e,t,n)&&(t=i),o(e,q(t,3))}var u_=D(function(e,t){if(e==null)return[];var n=t.length;return n>1&&ve(e,t[0],t[1])?t=[]:n>2&&ve(t[0],t[1],t[2])&&(t=[t[0]]),_l(e,ce(t,1),[])}),Ar=Uh||function(){return ue.Date.now()};function c_(e,t){if(typeof t!="function")throw new Le(g);return e=I(e),function(){if(--e<1)return t.apply(this,arguments)}}function fa(e,t,n){return t=n?i:t,t=e&&t==null?e.length:t,ot(e,tt,i,i,i,i,t)}function da(e,t){var n;if(typeof t!="function")throw new Le(g);return e=I(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=i),n}}var Ji=D(function(e,t,n){var o=ge;if(n.length){var l=gt(n,Qt(Ji));o|=et}return ot(e,o,t,n,l)}),ha=D(function(e,t,n){var o=ge|qt;if(n.length){var l=gt(n,Qt(ha));o|=et}return ot(t,o,e,n,l)});function ga(e,t,n){t=n?i:t;var o=ot(e,je,i,i,i,i,i,t);return o.placeholder=ga.placeholder,o}function ma(e,t,n){t=n?i:t;var o=ot(e,nn,i,i,i,i,i,t);return o.placeholder=ma.placeholder,o}function pa(e,t,n){var o,l,d,h,m,y,E=0,b=!1,A=!1,O=!0;if(typeof e!="function")throw new Le(g);t=Fe(t)||0,J(n)&&(b=!!n.leading,A="maxWait"in n,d=A?le(Fe(n.maxWait)||0,t):d,O="trailing"in n?!!n.trailing:O);function $(re){var Qe=o,ft=l;return o=l=i,E=re,h=e.apply(ft,Qe),h}function L(re){return E=re,m=Sn(P,t),b?$(re):h}function F(re){var Qe=re-y,ft=re-E,Ta=t-Qe;return A?me(Ta,d-ft):Ta}function N(re){var Qe=re-y,ft=re-E;return y===i||Qe>=t||Qe<0||A&&ft>=d}function P(){var re=Ar();if(N(re))return W(re);m=Sn(P,F(re))}function W(re){return m=i,O&&o?$(re):(o=l=i,h)}function ke(){m!==i&&Sl(m),E=0,o=y=l=m=i}function we(){return m===i?h:W(Ar())}function $e(){var re=Ar(),Qe=N(re);if(o=arguments,l=this,y=re,Qe){if(m===i)return L(y);if(A)return Sl(m),m=Sn(P,t),$(y)}return m===i&&(m=Sn(P,t)),h}return $e.cancel=ke,$e.flush=we,$e}var f_=D(function(e,t){return sl(e,1,t)}),d_=D(function(e,t,n){return sl(e,Fe(t)||0,n)});function h_(e){return ot(e,Ur)}function xr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new Le(g);var n=function(){var o=arguments,l=t?t.apply(this,o):o[0],d=n.cache;if(d.has(l))return d.get(l);var h=e.apply(this,o);return n.cache=d.set(l,h)||d,h};return n.cache=new(xr.Cache||it),n}xr.Cache=it;function Sr(e){if(typeof e!="function")throw new Le(g);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function g_(e){return da(2,e)}var m_=tm(function(e,t){t=t.length==1&&H(t[0])?X(t[0],Se(q())):X(ce(t,1),Se(q()));var n=t.length;return D(function(o){for(var l=-1,d=me(o.length,n);++l<d;)o[l]=t[l].call(this,o[l]);return xe(e,this,o)})}),ji=D(function(e,t){var n=gt(t,Qt(ji));return ot(e,et,i,t,n)}),_a=D(function(e,t){var n=gt(t,Qt(_a));return ot(e,rn,i,t,n)}),p_=lt(function(e,t){return ot(e,sn,i,i,i,t)});function __(e,t){if(typeof e!="function")throw new Le(g);return t=t===i?t:I(t),D(e,t)}function y_(e,t){if(typeof e!="function")throw new Le(g);return t=t==null?0:le(I(t),0),D(function(n){var o=n[t],l=vt(n,0,t);return o&&ht(l,o),xe(e,this,l)})}function v_(e,t,n){var o=!0,l=!0;if(typeof e!="function")throw new Le(g);return J(n)&&(o="leading"in n?!!n.leading:o,l="trailing"in n?!!n.trailing:l),pa(e,t,{leading:o,maxWait:t,trailing:l})}function w_(e){return fa(e,1)}function C_(e,t){return ji(Ii(t),e)}function E_(){if(!arguments.length)return[];var e=arguments[0];return H(e)?e:[e]}function b_(e){return Te(e,de)}function A_(e,t){return t=typeof t=="function"?t:i,Te(e,de,t)}function x_(e){return Te(e,B|de)}function S_(e,t){return t=typeof t=="function"?t:i,Te(e,B|de,t)}function R_(e,t){return t==null||il(e,t,ae(t))}function Ke(e,t){return e===t||e!==e&&t!==t}var O_=yr(xi),k_=yr(function(e,t){return e>=t}),$t=cl(function(){return arguments}())?cl:function(e){return te(e)&&K.call(e,"callee")&&!Zo.call(e,"callee")},H=v.isArray,$_=qo?Se(qo):Fg;function Ee(e){return e!=null&&Rr(e.length)&&!ut(e)}function ne(e){return te(e)&&Ee(e)}function q_(e){return e===!0||e===!1||te(e)&&ye(e)==on}var wt=Kh||cs,B_=Bo?Se(Bo):Dg;function L_(e){return te(e)&&e.nodeType===1&&!Rn(e)}function N_(e){if(e==null)return!0;if(Ee(e)&&(H(e)||typeof e=="string"||typeof e.splice=="function"||wt(e)||Gt(e)||$t(e)))return!e.length;var t=pe(e);if(t==Me||t==We)return!e.size;if(xn(e))return!Oi(e).length;for(var n in e)if(K.call(e,n))return!1;return!0}function T_(e,t){return En(e,t)}function H_(e,t,n){n=typeof n=="function"?n:i;var o=n?n(e,t):i;return o===i?En(e,t,i,n):!!o}function es(e){if(!te(e))return!1;var t=ye(e);return t==Dn||t==sd||typeof e.message=="string"&&typeof e.name=="string"&&!Rn(e)}function I_(e){return typeof e=="number"&&Jo(e)}function ut(e){if(!J(e))return!1;var t=ye(e);return t==Pn||t==io||t==id||t==ld}function ya(e){return typeof e=="number"&&e==I(e)}function Rr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Bt}function J(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function te(e){return e!=null&&typeof e=="object"}var va=Lo?Se(Lo):Mg;function F_(e,t){return e===t||Ri(e,t,Vi(t))}function D_(e,t,n){return n=typeof n=="function"?n:i,Ri(e,t,Vi(t),n)}function P_(e){return wa(e)&&e!=+e}function M_(e){if(Am(e))throw new T(u);return fl(e)}function W_(e){return e===null}function U_(e){return e==null}function wa(e){return typeof e=="number"||te(e)&&ye(e)==an}function Rn(e){if(!te(e)||ye(e)!=nt)return!1;var t=er(e);if(t===null)return!0;var n=K.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Zn.call(n)==Dh}var ts=No?Se(No):Wg;function V_(e){return ya(e)&&e>=-9007199254740991&&e<=Bt}var Ca=To?Se(To):Ug;function Or(e){return typeof e=="string"||!H(e)&&te(e)&&ye(e)==cn}function Oe(e){return typeof e=="symbol"||te(e)&&ye(e)==Mn}var Gt=Ho?Se(Ho):Vg;function K_(e){return e===i}function Q_(e){return te(e)&&pe(e)==fn}function G_(e){return te(e)&&ye(e)==ud}var z_=yr(ki),Y_=yr(function(e,t){return e<=t});function Ea(e){if(!e)return[];if(Ee(e))return Or(e)?Ue(e):Ce(e);if(gn&&e[gn])return Rh(e[gn]());var t=pe(e),n=t==Me?pi:t==We?Gn:zt;return n(e)}function ct(e){if(!e)return e===0?e:0;if(e=Fe(e),e===Hn||e===-1/0){var t=e<0?-1:1;return t*ed}return e===e?e:0}function I(e){var t=ct(e),n=t%1;return t===t?n?t-n:t:0}function ba(e){return e?St(I(e),0,ze):0}function Fe(e){if(typeof e=="number")return e;if(Oe(e))return In;if(J(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=J(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Wo(e);var n=$d.test(e);return n||Bd.test(e)?ch(e.slice(2),n?2:8):kd.test(e)?In:+e}function Aa(e){return Ze(e,be(e))}function Z_(e){return e?St(I(e),-9007199254740991,Bt):e===0?e:0}function V(e){return e==null?"":Re(e)}var X_=Vt(function(e,t){if(xn(t)||Ee(t)){Ze(t,ae(t),e);return}for(var n in t)K.call(t,n)&&vn(e,n,t[n])}),xa=Vt(function(e,t){Ze(t,be(t),e)}),kr=Vt(function(e,t,n,o){Ze(t,be(t),e,o)}),J_=Vt(function(e,t,n,o){Ze(t,ae(t),e,o)}),j_=lt(Ei);function ey(e,t){var n=Ut(e);return t==null?n:rl(n,t)}var ty=D(function(e,t){e=Q(e);var n=-1,o=t.length,l=o>2?t[2]:i;for(l&&ve(t[0],t[1],l)&&(o=1);++n<o;)for(var d=t[n],h=be(d),m=-1,y=h.length;++m<y;){var E=h[m],b=e[E];(b===i||Ke(b,Pt[E])&&!K.call(e,E))&&(e[E]=d[E])}return e}),ny=D(function(e){return e.push(i,Wl),xe(Sa,i,e)});function ry(e,t){return Fo(e,q(t,3),Ye)}function iy(e,t){return Fo(e,q(t,3),Ai)}function sy(e,t){return e==null?e:bi(e,q(t,3),be)}function oy(e,t){return e==null?e:al(e,q(t,3),be)}function ly(e,t){return e&&Ye(e,q(t,3))}function ay(e,t){return e&&Ai(e,q(t,3))}function uy(e){return e==null?[]:cr(e,ae(e))}function cy(e){return e==null?[]:cr(e,be(e))}function ns(e,t,n){var o=e==null?i:Rt(e,t);return o===i?n:o}function fy(e,t){return e!=null&&Kl(e,t,Ng)}function rs(e,t){return e!=null&&Kl(e,t,Tg)}var dy=Il(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=Xn.call(t)),e[t]=n},ss(Ae)),hy=Il(function(e,t,n){t!=null&&typeof t.toString!="function"&&(t=Xn.call(t)),K.call(e,t)?e[t].push(n):e[t]=[n]},q),gy=D(Cn);function ae(e){return Ee(e)?tl(e):Oi(e)}function be(e){return Ee(e)?tl(e,!0):Kg(e)}function my(e,t){var n={};return t=q(t,3),Ye(e,function(o,l,d){st(n,t(o,l,d),o)}),n}function py(e,t){var n={};return t=q(t,3),Ye(e,function(o,l,d){st(n,l,t(o,l,d))}),n}var _y=Vt(function(e,t,n){fr(e,t,n)}),Sa=Vt(function(e,t,n,o){fr(e,t,n,o)}),yy=lt(function(e,t){var n={};if(e==null)return n;var o=!1;t=X(t,function(d){return d=yt(d,e),o||(o=d.length>1),d}),Ze(e,Wi(e),n),o&&(n=Te(n,B|G|de,dm));for(var l=t.length;l--;)Ni(n,t[l]);return n});function vy(e,t){return Ra(e,Sr(q(t)))}var wy=lt(function(e,t){return e==null?{}:Gg(e,t)});function Ra(e,t){if(e==null)return{};var n=X(Wi(e),function(o){return[o]});return t=q(t),yl(e,n,function(o,l){return t(o,l[0])})}function Cy(e,t,n){t=yt(t,e);var o=-1,l=t.length;for(l||(l=1,e=i);++o<l;){var d=e==null?i:e[Xe(t[o])];d===i&&(o=l,d=n),e=ut(d)?d.call(e):d}return e}function Ey(e,t,n){return e==null?e:bn(e,t,n)}function by(e,t,n,o){return o=typeof o=="function"?o:i,e==null?e:bn(e,t,n,o)}var Oa=Pl(ae),ka=Pl(be);function Ay(e,t,n){var o=H(e),l=o||wt(e)||Gt(e);if(t=q(t,4),n==null){var d=e&&e.constructor;l?n=o?new d:[]:J(e)?n=ut(d)?Ut(er(e)):{}:n={}}return(l?Be:Ye)(e,function(h,m,y){return t(n,h,m,y)}),n}function xy(e,t){return e==null?!0:Ni(e,t)}function Sy(e,t,n){return e==null?e:bl(e,t,Ii(n))}function Ry(e,t,n,o){return o=typeof o=="function"?o:i,e==null?e:bl(e,t,Ii(n),o)}function zt(e){return e==null?[]:mi(e,ae(e))}function Oy(e){return e==null?[]:mi(e,be(e))}function ky(e,t,n){return n===i&&(n=t,t=i),n!==i&&(n=Fe(n),n=n===n?n:0),t!==i&&(t=Fe(t),t=t===t?t:0),St(Fe(e),t,n)}function $y(e,t,n){return t=ct(t),n===i?(n=t,t=0):n=ct(n),e=Fe(e),Hg(e,t,n)}function qy(e,t,n){if(n&&typeof n!="boolean"&&ve(e,t,n)&&(t=n=i),n===i&&(typeof t=="boolean"?(n=t,t=i):typeof e=="boolean"&&(n=e,e=i)),e===i&&t===i?(e=0,t=1):(e=ct(e),t===i?(t=e,e=0):t=ct(t)),e>t){var o=e;e=t,t=o}if(n||e%1||t%1){var l=jo();return me(e+l*(t-e+uh("1e-"+((l+"").length-1))),t)}return qi(e,t)}var By=Kt(function(e,t,n){return t=t.toLowerCase(),e+(n?$a(t):t)});function $a(e){return is(V(e).toLowerCase())}function qa(e){return e=V(e),e&&e.replace(Nd,Eh).replace(jd,"")}function Ly(e,t,n){e=V(e),t=Re(t);var o=e.length;n=n===i?o:St(I(n),0,o);var l=n;return n-=t.length,n>=0&&e.slice(n,l)==t}function Ny(e){return e=V(e),e&&gd.test(e)?e.replace(lo,bh):e}function Ty(e){return e=V(e),e&&wd.test(e)?e.replace(jr,"\\$&"):e}var Hy=Kt(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),Iy=Kt(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Fy=Nl("toLowerCase");function Dy(e,t,n){e=V(e),t=I(t);var o=t?Ft(e):0;if(!t||o>=t)return e;var l=(t-o)/2;return _r(ir(l),n)+e+_r(rr(l),n)}function Py(e,t,n){e=V(e),t=I(t);var o=t?Ft(e):0;return t&&o<t?e+_r(t-o,n):e}function My(e,t,n){e=V(e),t=I(t);var o=t?Ft(e):0;return t&&o<t?_r(t-o,n)+e:e}function Wy(e,t,n){return n||t==null?t=0:t&&(t=+t),Yh(V(e).replace(ei,""),t||0)}function Uy(e,t,n){return(n?ve(e,t,n):t===i)?t=1:t=I(t),Bi(V(e),t)}function Vy(){var e=arguments,t=V(e[0]);return e.length<3?t:t.replace(e[1],e[2])}var Ky=Kt(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});function Qy(e,t,n){return n&&typeof n!="number"&&ve(e,t,n)&&(t=n=i),n=n===i?ze:n>>>0,n?(e=V(e),e&&(typeof t=="string"||t!=null&&!ts(t))&&(t=Re(t),!t&&It(e))?vt(Ue(e),0,n):e.split(t,n)):[]}var Gy=Kt(function(e,t,n){return e+(n?" ":"")+is(t)});function zy(e,t,n){return e=V(e),n=n==null?0:St(I(n),0,e.length),t=Re(t),e.slice(n,n+t.length)==t}function Yy(e,t,n){var o=c.templateSettings;n&&ve(e,t,n)&&(t=i),e=V(e),t=kr({},t,o,Ml);var l=kr({},t.imports,o.imports,Ml),d=ae(l),h=mi(l,d),m,y,E=0,b=t.interpolate||Wn,A="__p += '",O=_i((t.escape||Wn).source+"|"+b.source+"|"+(b===ao?Od:Wn).source+"|"+(t.evaluate||Wn).source+"|$","g"),$="//# sourceURL="+(K.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ih+"]")+`
19
+ `;e.replace(O,function(N,P,W,ke,we,$e){return W||(W=ke),A+=e.slice(E,$e).replace(Td,Ah),P&&(m=!0,A+=`' +
20
+ __e(`+P+`) +
21
+ '`),we&&(y=!0,A+=`';
22
+ `+we+`;
23
+ __p += '`),W&&(A+=`' +
24
+ ((__t = (`+W+`)) == null ? '' : __t) +
25
+ '`),E=$e+N.length,N}),A+=`';
26
+ `;var L=K.call(t,"variable")&&t.variable;if(!L)A=`with (obj) {
27
+ `+A+`
28
28
  }
29
- `;else if(Xc.test(O))throw new N(A);b=(_?b.replace(Hc,""):b).replace(Tc,"$1").replace(Ic,"$1;"),b="function("+(O||"obj")+`) {
30
- `+(O?"":`obj || (obj = {});
31
- `)+"var __t, __p = ''"+(h?", __e = _.escape":"")+(_?`, __j = Array.prototype.join;
29
+ `;else if(Sd.test(L))throw new T(w);A=(y?A.replace(cd,""):A).replace(fd,"$1").replace(dd,"$1;"),A="function("+(L||"obj")+`) {
30
+ `+(L?"":`obj || (obj = {});
31
+ `)+"var __t, __p = ''"+(m?", __e = _.escape":"")+(y?`, __j = Array.prototype.join;
32
32
  function print() { __p += __j.call(arguments, '') }
33
33
  `:`;
34
- `)+b+`return __p
35
- }`;var I=Nl(function(){return M(u,k+"return "+b).apply(i,f)});if(I.source=b,Hi(I))throw I;return I}function E_(e){return Q(e).toLowerCase()}function b_(e){return Q(e).toUpperCase()}function A_(e,t,n){if(e=Q(e),e&&(n||t===i))return Us(e);if(!e||!(t=ye(t)))return e;var r=Te(e),o=Te(t),u=Ms(r,o),f=Qs(r,o)+1;return dt(r,u,f).join("")}function S_(e,t,n){if(e=Q(e),e&&(n||t===i))return e.slice(0,Ks(e)+1);if(!e||!(t=ye(t)))return e;var r=Te(e),o=Qs(r,Te(t))+1;return dt(r,0,o).join("")}function x_(e,t,n){if(e=Q(e),e&&(n||t===i))return e.replace(Hr,"");if(!e||!(t=ye(t)))return e;var r=Te(e),o=Ms(r,Te(t));return dt(r,o).join("")}function R_(e,t){var n=yc,r=Cc;if(Z(t)){var o="separator"in t?t.separator:o;n="length"in t?T(t.length):n,r="omission"in t?ye(t.omission):r}e=Q(e);var u=e.length;if(Bt(e)){var f=Te(e);u=f.length}if(n>=u)return e;var h=n-Lt(r);if(h<1)return r;var _=f?dt(f,0,h).join(""):e.slice(0,h);if(o===i)return _+r;if(f&&(h+=_.length-h),Ti(o)){if(e.slice(h).search(o)){var w,E=_;for(o.global||(o=Jr(o.source,Q(cs.exec(o))+"g")),o.lastIndex=0;w=o.exec(E);)var b=w.index;_=_.slice(0,b===i?h:b)}}else if(e.indexOf(ye(o),h)!=h){var S=_.lastIndexOf(o);S>-1&&(_=_.slice(0,S))}return _+r}function k_(e){return e=Q(e),e&&Dc.test(e)?e.replace(ls,rd):e}var q_=Dt(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),Pi=Ho("toUpperCase");function $l(e,t,n){return e=Q(e),t=n?i:t,t===i?Jf(e)?od(e):Mf(e):e.match(t)||[]}var Nl=D(function(e,t){try{return _e(e,i,t)}catch(n){return Hi(n)?n:new N(n)}}),B_=et(function(e,t){return Se(t,function(n){n=Qe(n),Je(e,n,$i(e[n],e))}),e});function L_(e){var t=e==null?0:e.length,n=L();return e=t?Y(e,function(r){if(typeof r[1]!="function")throw new xe(v);return[n(r[0]),r[1]]}):[],D(function(r){for(var o=-1;++o<t;){var u=e[o];if(_e(u[0],this,r))return _e(u[1],this,r)}})}function O_(e){return rh(ke(e,P))}function Fi(e){return function(){return e}}function $_(e,t){return e==null||e!==e?t:e}var N_=Io(),H_=Io(!0);function me(e){return e}function Wi(e){return ho(typeof e=="function"?e:ke(e,P))}function T_(e){return mo(ke(e,P))}function I_(e,t){return po(e,ke(t,P))}var D_=D(function(e,t){return function(n){return dn(n,e,t)}}),P_=D(function(e,t){return function(n){return dn(e,n,t)}});function Ui(e,t,n){var r=ie(t),o=Zn(t,r);n==null&&!(Z(t)&&(o.length||!r.length))&&(n=t,t=e,e=this,o=Zn(t,ie(t)));var u=!(Z(n)&&"chain"in n)||!!n.chain,f=nt(e);return Se(o,function(h){var _=t[h];e[h]=_,f&&(e.prototype[h]=function(){var w=this.__chain__;if(u||w){var E=e(this.__wrapped__),b=E.__actions__=de(this.__actions__);return b.push({func:_,args:arguments,thisArg:e}),E.__chain__=w,E}return _.apply(e,ot([this.value()],arguments))})}),e}function F_(){return se._===this&&(se._=dd),this}function Mi(){}function W_(e){return e=T(e),D(function(t){return _o(t,e)})}var U_=Ci(Y),M_=Ci(Is),Q_=Ci(Vr);function Hl(e){return Ri(e)?Kr(Qe(e)):Ch(e)}function V_(e){return function(t){return e==null?i:Ct(e,t)}}var K_=Po(),z_=Po(!0);function Qi(){return[]}function Vi(){return!1}function G_(){return{}}function Y_(){return""}function Z_(){return!0}function X_(e,t){if(e=T(e),e<1||e>St)return[];var n=We,r=le(e,We);t=L(t),e-=We;for(var o=Yr(r,t);++n<e;)t(n);return o}function J_(e){return H(e)?Y(e,Qe):Ce(e)?[e]:de(tl(Q(e)))}function j_(e){var t=++cd;return Q(e)+t}var ev=nr(function(e,t){return e+t},0),tv=wi("ceil"),nv=nr(function(e,t){return e/t},1),rv=wi("floor");function iv(e){return e&&e.length?Yn(e,me,oi):i}function sv(e,t){return e&&e.length?Yn(e,L(t,2),oi):i}function ov(e){return Fs(e,me)}function lv(e,t){return Fs(e,L(t,2))}function av(e){return e&&e.length?Yn(e,me,ci):i}function uv(e,t){return e&&e.length?Yn(e,L(t,2),ci):i}var cv=nr(function(e,t){return e*t},1),fv=wi("round"),dv=nr(function(e,t){return e-t},0);function hv(e){return e&&e.length?Gr(e,me):0}function gv(e,t){return e&&e.length?Gr(e,L(t,2)):0}return a.after=Tm,a.ary=dl,a.assign=bp,a.assignIn=xl,a.assignInWith=mr,a.assignWith=Ap,a.at=Sp,a.before=hl,a.bind=$i,a.bindAll=B_,a.bindKey=gl,a.castArray=Gm,a.chain=ul,a.chunk=rg,a.compact=ig,a.concat=sg,a.cond=L_,a.conforms=O_,a.constant=Fi,a.countBy=hm,a.create=xp,a.curry=ml,a.curryRight=pl,a.debounce=_l,a.defaults=Rp,a.defaultsDeep=kp,a.defer=Im,a.delay=Dm,a.difference=og,a.differenceBy=lg,a.differenceWith=ag,a.drop=ug,a.dropRight=cg,a.dropRightWhile=fg,a.dropWhile=dg,a.fill=hg,a.filter=mm,a.flatMap=vm,a.flatMapDeep=ym,a.flatMapDepth=Cm,a.flatten=sl,a.flattenDeep=gg,a.flattenDepth=mg,a.flip=Pm,a.flow=N_,a.flowRight=H_,a.fromPairs=pg,a.functions=Hp,a.functionsIn=Tp,a.groupBy=wm,a.initial=vg,a.intersection=yg,a.intersectionBy=Cg,a.intersectionWith=wg,a.invert=Dp,a.invertBy=Pp,a.invokeMap=bm,a.iteratee=Wi,a.keyBy=Am,a.keys=ie,a.keysIn=ge,a.map=ur,a.mapKeys=Wp,a.mapValues=Up,a.matches=T_,a.matchesProperty=I_,a.memoize=fr,a.merge=Mp,a.mergeWith=Rl,a.method=D_,a.methodOf=P_,a.mixin=Ui,a.negate=dr,a.nthArg=W_,a.omit=Qp,a.omitBy=Vp,a.once=Fm,a.orderBy=Sm,a.over=U_,a.overArgs=Wm,a.overEvery=M_,a.overSome=Q_,a.partial=Ni,a.partialRight=vl,a.partition=xm,a.pick=Kp,a.pickBy=kl,a.property=Hl,a.propertyOf=V_,a.pull=Sg,a.pullAll=ll,a.pullAllBy=xg,a.pullAllWith=Rg,a.pullAt=kg,a.range=K_,a.rangeRight=z_,a.rearg=Um,a.reject=qm,a.remove=qg,a.rest=Mm,a.reverse=Li,a.sampleSize=Lm,a.set=Gp,a.setWith=Yp,a.shuffle=Om,a.slice=Bg,a.sortBy=Hm,a.sortedUniq=Ig,a.sortedUniqBy=Dg,a.split=v_,a.spread=Qm,a.tail=Pg,a.take=Fg,a.takeRight=Wg,a.takeRightWhile=Ug,a.takeWhile=Mg,a.tap=im,a.throttle=Vm,a.thru=ar,a.toArray=bl,a.toPairs=ql,a.toPairsIn=Bl,a.toPath=J_,a.toPlainObject=Sl,a.transform=Zp,a.unary=Km,a.union=Qg,a.unionBy=Vg,a.unionWith=Kg,a.uniq=zg,a.uniqBy=Gg,a.uniqWith=Yg,a.unset=Xp,a.unzip=Oi,a.unzipWith=al,a.update=Jp,a.updateWith=jp,a.values=Wt,a.valuesIn=e_,a.without=Zg,a.words=$l,a.wrap=zm,a.xor=Xg,a.xorBy=Jg,a.xorWith=jg,a.zip=em,a.zipObject=tm,a.zipObjectDeep=nm,a.zipWith=rm,a.entries=ql,a.entriesIn=Bl,a.extend=xl,a.extendWith=mr,Ui(a,a),a.add=ev,a.attempt=Nl,a.camelCase=i_,a.capitalize=Ll,a.ceil=tv,a.clamp=t_,a.clone=Ym,a.cloneDeep=Xm,a.cloneDeepWith=Jm,a.cloneWith=Zm,a.conformsTo=jm,a.deburr=Ol,a.defaultTo=$_,a.divide=nv,a.endsWith=s_,a.eq=De,a.escape=o_,a.escapeRegExp=l_,a.every=gm,a.find=pm,a.findIndex=rl,a.findKey=qp,a.findLast=_m,a.findLastIndex=il,a.findLastKey=Bp,a.floor=rv,a.forEach=cl,a.forEachRight=fl,a.forIn=Lp,a.forInRight=Op,a.forOwn=$p,a.forOwnRight=Np,a.get=Ii,a.gt=ep,a.gte=tp,a.has=Ip,a.hasIn=Di,a.head=ol,a.identity=me,a.includes=Em,a.indexOf=_g,a.inRange=n_,a.invoke=Fp,a.isArguments=bt,a.isArray=H,a.isArrayBuffer=np,a.isArrayLike=he,a.isArrayLikeObject=J,a.isBoolean=rp,a.isBuffer=ht,a.isDate=ip,a.isElement=sp,a.isEmpty=op,a.isEqual=lp,a.isEqualWith=ap,a.isError=Hi,a.isFinite=up,a.isFunction=nt,a.isInteger=yl,a.isLength=hr,a.isMap=Cl,a.isMatch=cp,a.isMatchWith=fp,a.isNaN=dp,a.isNative=hp,a.isNil=mp,a.isNull=gp,a.isNumber=wl,a.isObject=Z,a.isObjectLike=X,a.isPlainObject=vn,a.isRegExp=Ti,a.isSafeInteger=pp,a.isSet=El,a.isString=gr,a.isSymbol=Ce,a.isTypedArray=Ft,a.isUndefined=_p,a.isWeakMap=vp,a.isWeakSet=yp,a.join=Eg,a.kebabCase=a_,a.last=Be,a.lastIndexOf=bg,a.lowerCase=u_,a.lowerFirst=c_,a.lt=Cp,a.lte=wp,a.max=iv,a.maxBy=sv,a.mean=ov,a.meanBy=lv,a.min=av,a.minBy=uv,a.stubArray=Qi,a.stubFalse=Vi,a.stubObject=G_,a.stubString=Y_,a.stubTrue=Z_,a.multiply=cv,a.nth=Ag,a.noConflict=F_,a.noop=Mi,a.now=cr,a.pad=f_,a.padEnd=d_,a.padStart=h_,a.parseInt=g_,a.random=r_,a.reduce=Rm,a.reduceRight=km,a.repeat=m_,a.replace=p_,a.result=zp,a.round=fv,a.runInContext=p,a.sample=Bm,a.size=$m,a.snakeCase=__,a.some=Nm,a.sortedIndex=Lg,a.sortedIndexBy=Og,a.sortedIndexOf=$g,a.sortedLastIndex=Ng,a.sortedLastIndexBy=Hg,a.sortedLastIndexOf=Tg,a.startCase=y_,a.startsWith=C_,a.subtract=dv,a.sum=hv,a.sumBy=gv,a.template=w_,a.times=X_,a.toFinite=rt,a.toInteger=T,a.toLength=Al,a.toLower=E_,a.toNumber=Le,a.toSafeInteger=Ep,a.toString=Q,a.toUpper=b_,a.trim=A_,a.trimEnd=S_,a.trimStart=x_,a.truncate=R_,a.unescape=k_,a.uniqueId=j_,a.upperCase=q_,a.upperFirst=Pi,a.each=cl,a.eachRight=fl,a.first=ol,Ui(a,function(){var e={};return Ue(a,function(t,n){V.call(a.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),a.VERSION=m,Se(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){a[e].placeholder=a}),Se(["drop","take"],function(e,t){W.prototype[e]=function(n){n=n===i?1:re(T(n),0);var r=this.__filtered__&&!t?new W(this):this.clone();return r.__filtered__?r.__takeCount__=le(n,r.__takeCount__):r.__views__.push({size:le(n,We),type:e+(r.__dir__<0?"Right":"")}),r},W.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Se(["filter","map","takeWhile"],function(e,t){var n=t+1,r=n==is||n==Ac;W.prototype[e]=function(o){var u=this.clone();return u.__iteratees__.push({iteratee:L(o,3),type:n}),u.__filtered__=u.__filtered__||r,u}}),Se(["head","last"],function(e,t){var n="take"+(t?"Right":"");W.prototype[e]=function(){return this[n](1).value()[0]}}),Se(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");W.prototype[e]=function(){return this.__filtered__?new W(this):this[n](1)}}),W.prototype.compact=function(){return this.filter(me)},W.prototype.find=function(e){return this.filter(e).head()},W.prototype.findLast=function(e){return this.reverse().find(e)},W.prototype.invokeMap=D(function(e,t){return typeof e=="function"?new W(this):this.map(function(n){return dn(n,e,t)})}),W.prototype.reject=function(e){return this.filter(dr(L(e)))},W.prototype.slice=function(e,t){e=T(e);var n=this;return n.__filtered__&&(e>0||t<0)?new W(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(t=T(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},W.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},W.prototype.toArray=function(){return this.take(We)},Ue(W.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),o=a[r?"take"+(t=="last"?"Right":""):t],u=r||/^find/.test(t);o&&(a.prototype[t]=function(){var f=this.__wrapped__,h=r?[1]:arguments,_=f instanceof W,w=h[0],E=_||H(f),b=function(F){var U=o.apply(a,ot([F],h));return r&&S?U[0]:U};E&&n&&typeof w=="function"&&w.length!=1&&(_=E=!1);var S=this.__chain__,k=!!this.__actions__.length,O=u&&!S,I=_&&!k;if(!u&&E){f=I?f:new W(this);var $=e.apply(f,h);return $.__actions__.push({func:ar,args:[b],thisArg:i}),new Re($,S)}return O&&I?e.apply(this,h):($=this.thru(b),O?r?$.value()[0]:$.value():$)})}),Se(["pop","push","shift","sort","splice","unshift"],function(e){var t=Nn[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);a.prototype[e]=function(){var o=arguments;if(r&&!this.__chain__){var u=this.value();return t.apply(H(u)?u:[],o)}return this[n](function(f){return t.apply(H(f)?f:[],o)})}}),Ue(W.prototype,function(e,t){var n=a[t];if(n){var r=n.name+"";V.call(Ht,r)||(Ht[r]=[]),Ht[r].push({name:t,func:n})}}),Ht[tr(i,At).name]=[{name:"wrapper",func:i}],W.prototype.clone=kd,W.prototype.reverse=qd,W.prototype.value=Bd,a.prototype.at=sm,a.prototype.chain=om,a.prototype.commit=lm,a.prototype.next=am,a.prototype.plant=cm,a.prototype.reverse=fm,a.prototype.toJSON=a.prototype.valueOf=a.prototype.value=dm,a.prototype.first=a.prototype.head,sn&&(a.prototype[sn]=um),a},Ot=ld();mt?((mt.exports=Ot)._=Ot,Wr._=Ot):se._=Ot}).call(Qt)}(Cn,Cn.exports);var $a=Cn.exports;const br=Oa($a);class Na extends Oe{constructor(s={}){super(s),this.defaultStateName={axios:"axios",formData:"formData",formErrors:"formErrors",formNode:"formNode",pageKey:"pageKey",qForm:"qForm"}}get isValid(){return super.isValid&&this.isValidHelpers}get isValidHelpers(){const{qForm:s}=this.controllerHelpers||{},{NodeHelper:i}=s||{};return typeof i!="function"?(console.log("invalid form helpers"),!1):!0}getConfig(){const s={...this.state.qForm||{},...this.config||{},...this.state[this.name]||{}};return typeof Yi=="function"?Yi.init({...s,helpers:{...this.controllerHelpers,element:this}}):{}}getFormCustomizer(){const{formCustomizer:s}=this.getHandlers();return typeof s=="function"?s:Ha}}function Ha(l,s){if(Array.isArray(l))return s||null;if(typeof s=="number"||typeof s=="boolean")return s;if(!s)return null}class Ta extends Oe{constructor(s={}){super(s),this.defaultStateName={gridItems:"gridItems"}}get isValid(){return super.isValid&&this.isValidHelpers}get isValidHelpers(){const{qGrid:s}=this.controllerHelpers||{},{QItem:i,Cell:m}=s||{};return typeof i!="function"||typeof m!="function"?(console.log("invalid grid helpers"),!1):!0}getConfig(){const s={...this.state.qGrid||{},...this.config||{},...this.state[this.name]||{}};return typeof Zi=="function"?Zi.init({...s,helpers:{...this.controllerHelpers,element:this}}):{}}}class Ia extends Oe{constructor(s={}){super(s),this.defaultStateName={qHtml:"qHtml"}}getConfig(){return{...this.state.qHtml||{},...this.config||{},...this.state[this.name]||{}}}}class Da extends Oe{constructor(s={}){super(s)}}class Pa extends Oe{constructor(s={}){super(s),this.defaultStateName={qLabel:"qLabel"}}getConfig(){return{...this.state.qLabel||{},...this.config||{},...this.state[this.name]||{}}}}class Fa extends Oe{constructor(s={}){super(s),this.defaultStateName={qList:"qList",qSorterKeys:"qSorterKeys",rows:"rows"}}get isValid(){return super.isValid&&this.isValidHelpers}get isValidHelpers(){const{qList:s}=this.controllerHelpers||{},{QListBulkButton:i,QListButton:m,QRow:d}=s||{};return typeof i!="function"||typeof m!="function"||typeof d!="function"?(console.log("invalid list helpers"),!1):!0}getConfig(){const s={...this.state.qList||{},...this.config||{},...this.state[this.name]||{}};return typeof Ji=="function"?Ji.init({...s,helpers:{...this.controllerHelpers,element:this}}):{}}}class Wa extends Oe{constructor(s={}){super(s),this.defaultStateName={currentPage:"currentPage",currentPageSize:"currentPageSize",qPaginator:"qPaginator",totalRecords:"totalRecords"}}getConfig(){return{...this.state.qPaginator||{},...this.config||{},...this.state[this.name]||{}}}}class Ua extends Oe{constructor(s={}){super(s),this.defaultStateName={qScheduler:"qScheduler"}}getConfig(){return{...this.state.qScheduler||{},...this.config||{},...this.state[this.name]||{}}}}class Ma extends Oe{constructor(s={}){super(s),this.defaultStateName={active:"active",qTab:"qTab",tabLayout:"tabLayout"}}getConfig(){return{...this.state.qTab||{},...this.config||{},...this.state[this.name]||{}}}}const te={...ka,...{ElementQButton:La,ElementQForm:Na,ElementQGrid:Ta,ElementQHtml:Ia,ElementQImport:Da,ElementQLabel:Pa,ElementQList:Fa,ElementQPaginator:Wa,ElementQScheduler:Ua,ElementQTab:Ma},Container:Mt,Element:Oe,Node:Er};class Qa{static init({layout:s={},controllerHelpers:i={}}={}){return ji({layout:s,nodes:[],controllerHelpers:i})}}function ji({layout:l,nodes:s,controllerHelpers:i}){if(l instanceof te.Node)return l;const m={...l};return Array.isArray(m.children)&&(m.children=m.children.map(d=>ji({layout:d,nodes:s,controllerHelpers:i}))),Va(m,s,i)}function Va(l,s,i){const{nodeType:m,permissions:d}=l||{};if(typeof te[m]=="function"){const{permissionHandler:c}=i,v=d?c(d):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},A=te[m].init({...l,controllerHelpers:i,permissionResult:v});return A?A.isExist(s)?null:(s.push(A),A):null}return null}class Ka{constructor(s={}){this.css=s.css||"",this.controllerHelpers=s.controllerHelpers,this.eventHandlers=s.eventHandlers||{},this.id=s.id||Cr("controller"),this.initialState=s.initialState,this.name=s.name,this.saveStateKeys=s.saveStateKeys||[],this.setLayout(s.layout)}get createdElement(){return this.elements.filter(s=>s.isCreated)}get elements(){return this.layout.getElements()}get isValid(){return!!this.id&&this.isValidControllerHelpers}get isValidControllerHelpers(){const{qUtilities:s}=this.controllerHelpers;return s&&es(s.convertString)&&es(s.getValidation)}static init(s){const i=new this(s);return i.isValid?i:null}getElementByElementName(s){return this.elements.find(i=>i.getElementName()===s)}getState(){return{...this.getControllerState(),...this.layout.getElementState()}}getControllerState(){return this.state}setLayout(s){const i={...this.controllerHelpers,controller:this};this.layout=Qa.init({layout:s,controllerHelpers:i})}updateState(s={}){this.state={...this.state,...s},this.layout&&this.layout.updateElementState(this.state)}}function es(l){return typeof l=="function"}const Vt={beforeCreate(){this.$options.components={...this.$options.components,QWidgetContainersContainer:g.defineAsyncComponent(()=>Promise.resolve().then(()=>Cu)),QWidgetElementsElement:g.defineAsyncComponent(()=>Promise.resolve().then(()=>vc))}},methods:{currentContainer(l){return l.isVisible?l instanceof te.Container?"q-widget-containers-container":l instanceof te.Element?"q-widget-elements-element":null:null}}},za={name:"q-widget-controller",components:{QModal:Fl},mixins:[Vt],props:{controller:{type:Object,default:()=>({})}},data(){return{isReady:!1,loadingCount:0,modal:null,renderKey:0}},computed:{controllerCss(){return this.controller.css||""},controllerHelpers(){return this.controller.controllerHelpers},eventHandlers(){return this.controller.eventHandlers||{}},initControllerState(){return this.controller.initialState},node(){return this.controller.layout}},created(){this.init()},methods:{async init(){try{const{getControllerState:l}=this.controllerHelpers;let s=this.initControllerState;typeof l=="function"&&(s=await l({state:s}));const{onCreated:i}=this.eventHandlers;i&&(s=await this.eventHandler({state:s,event:i})),this.updateState(s)}catch(l){Ut({component:this,message:l.message})}finally{this.isReady=!0,this.reRenderElements()}},async callbackEmit({event:l,payload:s}){console.log("callbackEmit",l,s)},async callbackSubscribe(l,{event:s,payload:i,cb:m}){const{getControllerUniqueKey:d}=this.controllerHelpers;if(typeof d=="function"&&l===d())try{const{key:c}=s,{controllerSubscribed:v}=this.eventHandlers,A=v[c];let R=this.controller.getState();A&&(R=await this.eventHandler({state:{...R,eventPayload:i},event:A})),typeof m=="function"&&await m({event:s,payload:R})}catch(c){Ut({component:this,message:c.message})}},async eventHandler({event:l,state:s}){const{eventHandler:i}=this.controllerHelpers;if(typeof i!="function")return console.log("no eventHandler"),s;let m=s;const d=Ga({event:l}),c=this.getLoadingFunctions({scope:d});try{if(ts({loadingFunctions:c,action:"start"}),l){const v={body:{...s},controller:this.controller,component:this,controllerHelpers:{...this.controllerHelpers,callbackEmit:this.callbackEmit,callbackSubscribe:this.callbackSubscribe,eventHandler:this.eventHandler,reRenderElements:this.reRenderElements,runEventChains:this.eventHandler,showError:Ut,updateState:this.updateState,updateLayout:this.updateLayout}},A=await i({event:l,payload:v});m={...m,...A}}return console.log(m),m}catch(v){throw new Error(v.message)}finally{ts({loadingFunctions:c,action:"stop"})}},getKey(l,s){return`${this.renderKey}-${l}-${s} `},getLoadingFunctions({scope:l=""}){const{startLoading:s,stopLoading:i}=this.controllerHelpers;switch(l){case"full":return typeof s!="function"||typeof i!="function"?null:{startLoading:s,stopLoading:i};case"none":return null;case"self":return{startLoading:this.startSelfLoading,stopLoading:this.stopSelfLoading};default:return{startLoading:this.startSelfLoading,stopLoading:this.stopSelfLoading}}},async onEvent(l){try{const{eventName:s,element:i,payload:m}=l,{elementEvents:d={}}=this.eventHandlers,c=d[s];c?await this.eventHandler({state:{...this.controller.getState(),eventPayload:m,eventElement:i},event:c}):console.log(`can not find the event ${s}`)}catch(s){Ut({component:this,message:s.message,modalConfig:{title:"提示"}})}},async onElementCreated(){try{console.log("onElementCreated",this.controller.elements,this.controller.createdElement);const l=this.eventHandlers.onElementCreated;l&&await this.eventHandler({state:this.controller.getState(),event:l})}catch(l){Ut({component:this,message:l.message})}},reRenderElements(){this.renderKey+=1},startSelfLoading(){this.loadingCount+=1},stopSelfLoading(){this.loadingCount-=1},updateState(l){this.controller.updateState(l);const{saveControllerState:s}=this.controllerHelpers;typeof s=="function"&&Wl({controller:this.controller,state:l,saveControllerState:s})},updateLayout(l,s){l||console.log("no layout"),s||console.log("use controller state"),this.controller.setLayout(l),this.controller.updateState(s),this.reRenderElements()}}};function Ga({event:l={}}={}){return l.scope||"full"}function ts({loadingFunctions:l,action:s}){if(l){const{startLoading:i,stopLoading:m}=l;switch(s){case"start":{i();break}case"stop":{m();break}}}}function Ya(l,s,i,m,d,c){const v=g.resolveComponent("q-modal");return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-controller __controller",c.controllerCss])},[c.node?(g.openBlock(),g.createBlock(g.resolveDynamicComponent(l.currentContainer(c.node)),{key:d.renderKey,controllerReady:d.isReady,node:c.node,loadingCount:d.loadingCount,onOnEvent:c.onEvent,onOnElementCreated:c.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"])):g.createCommentVNode("v-if",!0),d.modal?(g.openBlock(),g.createBlock(v,{key:c.getKey("modal",d.modal),modal:d.modal},null,8,["modal"])):g.createCommentVNode("v-if",!0)],2)}const Za={name:"q-widget",components:{QWidgetController:ee(za,[["render",Ya],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Controller.vue"]])},props:{content:{type:Object,default:()=>({})},contentHelpers:{type:Object,default:()=>({})},controller:{type:Object,default:()=>null},controllerHelpers:{type:Object,default:()=>null}},data(){return{controllerInstence:null,error:null}},computed:{hasError(){return this.error}},created(){this.init()},methods:{init(){try{const l=this.controllerHelpers||this.contentHelpers||{},s=l.qUtilities||{},i=this.controller||this.content;if(this.controllerInstence=Ka.init({...i,controllerHelpers:{permissionHandler:Xa,...l,qUtilities:{...ca,...s}}}),!this.controllerInstence)throw new Error("invalid controller")}catch(l){this.error=l.message||"invalid controller"}}}};function Xa(){return{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0}}const Ja={class:"q-widget"},ja={key:1,class:"__error"};function eu(l,s,i,m,d,c){const v=g.resolveComponent("q-widget-controller");return g.openBlock(),g.createElementBlock("div",Ja,[c.hasError?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createBlock(v,{key:0,controller:d.controllerInstence},null,8,["controller"])),c.hasError?(g.openBlock(),g.createElementBlock("div",ja,g.toDisplayString(d.error),1)):g.createCommentVNode("v-if",!0)])}const wn=ee(Za,[["render",eu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/QWidget.vue"]]);function tu(l){l.component(wn.name,wn)}wn.install=tu;const nu={name:"q-widget-containers-box",mixins:[Vt],props:{controllerReady:{type:Boolean,default:!1},getKey:{type:Function,default:()=>null},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.children||[]}},methods:{onEvent(l){this.$emit("onEvent",l)},onElementCreated(l){this.$emit("onElementCreated",l)}}},ru={class:"q-widget-containers-box __outer-box"},iu={class:"__inner-box"};function su(l,s,i,m,d,c){return g.openBlock(),g.createElementBlock("div",ru,[g.createElementVNode("div",iu,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(c.children,(v,A)=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(l.currentContainer(v)),{key:i.getKey("box",A),controllerReady:i.controllerReady,node:v,loadingCount:i.loadingCount,onOnEvent:c.onEvent,onOnElementCreated:c.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"]))),128))])])}const ou=ee(nu,[["render",su],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/Box.vue"]]),lu={name:"q-widget-containers-column",mixins:[Vt],props:{controllerReady:{type:Boolean,default:!1},getKey:{type:Function,default:()=>null},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.children||[]}},methods:{onEvent(l){this.$emit("onEvent",l)},onElementCreated(l){this.$emit("onElementCreated",l)}}},au={class:"q-widget-containers-column __column"};function uu(l,s,i,m,d,c){return g.openBlock(),g.createElementBlock("div",au,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(c.children,(v,A)=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(l.currentContainer(v)),{key:i.getKey("cloumn",A),controllerReady:i.controllerReady,node:v,loadingCount:i.loadingCount,onOnEvent:c.onEvent,onOnElementCreated:c.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"]))),128))])}const cu=ee(lu,[["render",uu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/Column.vue"]]),fu={name:"q-widget-containers-header-sticky",mixins:[Vt],props:{controllerReady:{type:Boolean,default:!1},getKey:{type:Function,default:()=>null},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.children||[]}},methods:{onEvent(l){this.$emit("onEvent",l)},onElementCreated(l){this.$emit("onElementCreated",l)}}},du={class:"q-widget-containers-header-sticky __header __sticky --sticky-top"};function hu(l,s,i,m,d,c){return g.openBlock(),g.createElementBlock("div",du,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(c.children,(v,A)=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(l.currentContainer(v)),{key:i.getKey("header-sticky",A),controllerReady:i.controllerReady,node:v,loadingCount:i.loadingCount,onOnEvent:c.onEvent,onOnElementCreated:c.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"]))),128))])}const gu=ee(fu,[["render",hu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/HeaderSticky.vue"]]),mu={name:"q-widget-containers-row",mixins:[Vt],props:{controllerReady:{type:Boolean,default:!1},getKey:{type:Function,default:()=>null},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.children||[]}},methods:{onEvent(l){this.$emit("onEvent",l)},onElementCreated(l){this.$emit("onElementCreated",l)}}},pu={class:"q-widget-containers-row __row"};function _u(l,s,i,m,d,c){return g.openBlock(),g.createElementBlock("div",pu,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(c.children,(v,A)=>(g.openBlock(),g.createBlock(g.resolveDynamicComponent(l.currentContainer(v)),{key:i.getKey("row",A),controllerReady:i.controllerReady,node:v,loadingCount:i.loadingCount,onOnEvent:c.onEvent,onOnElementCreated:c.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"]))),128))])}const vu={name:"q-widget-containers-container",components:{QWidgetBoxContainer:ou,QWidgetColumnContainer:cu,QWidgetHeaderStickyContainer:gu,QWidgetRowContainer:ee(mu,[["render",_u],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/Row.vue"]])},props:{controllerReady:{type:Boolean,default:!1},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.getVisibleChildren()||[]}},methods:{factoryInit(l){return l instanceof te.ContainerBox?"q-widget-box-container":l instanceof te.ContainerColumn?"q-widget-column-container":l instanceof te.ContainerHeaderSticky?"q-widget-header-sticky-container":l instanceof te.ContainerRow?"q-widget-row-container":""},getClass(l){return l.css||""},getKey(l,s){return`${l}-${s}`},onEvent(l){this.$emit("onEvent",l)},onElementCreated(){this.node.isCreated&&this.$emit("onElementCreated")}}};function yu(l,s,i,m,d,c){return g.openBlock(),g.createBlock(g.resolveDynamicComponent(c.factoryInit(i.node)),{class:g.normalizeClass(c.getClass(i.node)),controllerReady:i.controllerReady,getKey:c.getKey,node:i.node,loadingCount:i.loadingCount,onOnEvent:c.onEvent,onOnElementCreated:c.onElementCreated},null,40,["class","controllerReady","getKey","node","loadingCount","onOnEvent","onOnElementCreated"])}const Cu=Object.freeze(Object.defineProperty({__proto__:null,default:ee(vu,[["render",yu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/Container.vue"]])},Symbol.toStringTag,{value:"Module"})),wu={name:"q-widget-elements-adapters-q-button",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],computed:{$button(){return this.$config.button||{}},$config(){return this.element.getConfig()},$event(){return this.$button.event||"onButtonClick"},$url(){return this.$button.url||""},button(){return{...this.$button,url:this.url}},helpers(){return this.element.controllerHelpers||{}},url(){const l=this.$config.patternMatch||/\$\{(.+?)\}/g,{convertString:s}=this.helpers.qUtilities;return s(this.$url,l,this.state)},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(l){return l.css||""},onClick(l){const s={eventName:this.$event,payload:l};this.$emit("onEvent",s)}}},Eu={key:1};function bu(l,s,i,m,d,c){const v=g.resolveComponent("q-button",!0);return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-button q-widget-adapters-q-button __element __adapter __button __flex",c.getClass(i.element)])},[c.isReady?(g.openBlock(),g.createBlock(v,{key:0,class:"q-button",button:c.button,onClick:c.onClick,onOnChange:c.onClick,onUpload:c.onClick},null,8,["button","onClick","onOnChange","onUpload"])):g.createCommentVNode("v-if",!0),c.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",Eu,s[0]||(s[0]=[g.createElementVNode("div",{class:"button __loading-box"},[g.createElementVNode("div",{class:"skeleton"},[g.createElementVNode("div",{class:"skeleton__tr"},[g.createElementVNode("div",{class:"skeleton__td"})])])],-1)])))],2)}const Au=ee(wu,[["render",bu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QButton.vue"]]),Su={name:"q-widget-elements-adapters-q-form",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{formErrors:[],formValue:null,initPageKey:"",isFormReady:!1}},computed:{$buttons(){return this.$config.buttons||[]},$config(){return this.element.getConfig()},$disabledForm(){return this.$config.disabledForm||!1},$eventName(){return this.$config.eventName||{}},$formCss(){return this.$config.css||{}},$formHandler(){return this.$config.formHandler},$layout(){return this.$config.layout},$previewForm(){return this.$config.previewForm||!1},axios(){return this.state.axios},elementHandlers(){return this.element.getHandlers()},customizer(){return this.element.getFormCustomizer()},displayLayout(){return this.getLayout()},formData(){return this.state.formData},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady},pageKey(){return this.state.pageKey||this.initPageKey||""}},created(){this.controllerReady&&this.init()},methods:{init(){this.formValue=br.cloneDeep(this.formData),this.isFormReady=!0},getClass(l){return l.css||""},getLayout(){if(!this.$layout)return null;const{NodeHelper:l}=this.helpers.qForm,{convertString:s,getValidation:i}=this.helpers.qUtilities;return Ru({config:this.$config,convertString:s,getValidation:i,layout:this.$layout,NodeHelper:l,state:this.state})},onChange(l){const{node:s}=l;this.formErrors=[];const i=s.save({errors:this.formErrors}),m=br.mergeWith(this.formValue,i,this.customizer),c={eventName:this.$eventName.onFormChange||"onFormChange",payload:{...l,formData:m,errors:this.formErrors}};this.$emit("onEvent",c)},onClick(l){const{value:s,event:i}=l,m=br.mergeWith(this.formValue,s,this.customizer),d={eventName:i,payload:{...l,errors:this.formErrors,formData:m}};this.$emit("onEvent",d)},onCreated(l){const{pageKey:s,node:i}=l;this.initPageKey=s;const{afterSave:m}=this.elementHandlers;typeof m=="function"&&i.subscribe("afterSave",m({node:i,state:this.state})),this.formErrors=[],i.save({errors:this.formErrors}),this.element.onCreated({component:this,payload:{...l,formErrors:this.formErrors,formNode:i,pageKey:s}}),this.$emit("onCreated")}}};function xu(l,s,i,m){const d=/['"]\$\{(.+?)\}['"]/g;return JSON.parse(m(JSON.stringify(l),d,i))}function Ru({config:l={},convertString:s,getValidation:i,layout:m,NodeHelper:d,state:c}){const v=ku({config:l,getValidation:i,layout:m,NodeHelper:d,state:c});return xu(v,l,c,s)}function ku({config:l={},getValidation:s,layout:i,NodeHelper:m,state:d}){let c=i;const{updateLayoutConfigs:v=[]}=l;return typeof m.updateNode=="function"&&v.forEach(A=>{const{key:R,value:q,type:B,restriction:P}=A;s({rule:P,data:d})&&(c=m.updateNode({keys:R.split("."),value:q,layout:c,type:B}))}),c}const qu={key:1};function Bu(l,s,i,m,d,c){const v=g.resolveComponent("q-form",!0);return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-form q-widget-adapters-q-form __element __adapter __form",c.getClass(i.element)])},[c.isReady&&d.isFormReady&&c.displayLayout?(g.openBlock(),g.createBlock(v,{key:0,axios:c.axios,buttons:c.$buttons,css:c.$formCss,disabledForm:c.$disabledForm,formHandler:c.$formHandler,layout:c.displayLayout,pageKey:c.pageKey,previewForm:c.$previewForm,value:d.formValue,onOnClick:c.onClick,onOnChange:c.onChange,onOnCreated:c.onCreated},null,8,["axios","buttons","css","disabledForm","formHandler","layout","pageKey","previewForm","value","onOnClick","onOnChange","onOnCreated"])):g.createCommentVNode("v-if",!0),c.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",qu,s[0]||(s[0]=[g.createStaticVNode('<div class="__loading-box"><div class="skeleton"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div></div></div></div>',1)])))],2)}const Lu=ee(Su,[["render",Bu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QForm.vue"]]),Ou={name:"q-widget-elements-adapters-q-grid",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{itemsData:[]}},computed:{$cellHandler(){return this.$config.cellHandler},$classes(){return this.$config.classes},$config(){return this.element.getConfig()},$converter(){return this.$config.converter},$eventName(){return this.$config.eventName||{}},$fillLastRow(){return this.$config.fillLastRow||!1},$gridCss(){return this.$config.css||""},$placeholder(){return this.$config.placeholder||null},$urlDelegate(){return this.$config.urlDelegate||""},gridItems(){return this.state.gridItems},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady},layout(){return this.$config.layout}},created(){this.controllerReady&&this.init()},methods:{init(){this.itemsData=this.gridItems.map(this.$converter),this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(l){return l.css||""},onClickGridItem(l){const i={eventName:this.$eventName.onClickGridItem||"onClickGridItem",payload:l};this.$emit("onEvent",i)},onButtonClick(l){const i={eventName:this.$eventName.onClick||"onClick",payload:l};this.$emit("onEvent",i)}}},$u={key:1};function Nu(l,s,i,m,d,c){const v=g.resolveComponent("q-grid",!0);return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-grid q-widget-adapters-q-grid __element __adapter __grid",c.getClass(i.element)])},[c.isReady?(g.openBlock(),g.createBlock(v,{key:0,cellHandler:c.$cellHandler,classes:c.$classes,css:c.$gridCss,fillLastRow:c.$fillLastRow,items:d.itemsData,layout:c.layout,placeholder:c.$placeholder,urlDelegate:c.$urlDelegate,onOnClick:c.onButtonClick,onOnClickGridItem:c.onClickGridItem},null,8,["cellHandler","classes","css","fillLastRow","items","layout","placeholder","urlDelegate","onOnClick","onOnClickGridItem"])):g.createCommentVNode("v-if",!0),c.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",$u," Loading "))],2)}const Hu=ee(Ou,[["render",Nu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QGrid.vue"]]),Tu={name:"q-widget-elements-adapters-q-html",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated"],computed:{$config(){return this.element.getConfig()||{}},$html(){const l=this.$config.patternMatch||/\$\{(.+?)\}/g,{convertString:s}=this.helpers.qUtilities;return s(this.$config.html,l,this.state)},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(l){return l.css||""}}},Iu=["innerHTML"],Du={key:1};function Pu(l,s,i,m,d,c){return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-html q-widget-adapters-q-html __element __adapter __html",c.getClass(i.element)])},[c.$html&&c.isReady?(g.openBlock(),g.createElementBlock("div",{key:0,class:"__html",innerHTML:c.$html},null,8,Iu)):g.createCommentVNode("v-if",!0),c.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",Du,[g.createCommentVNode(" loading ")]))],2)}const Fu=ee(Tu,[["render",Pu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QHtml.vue"]]),Wu={name:"q-widget-elements-adapters-q-import",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated"],data(){return{elementState:{}}},computed:{$additionalListHeaders(){return this.$config.additionalListHeaders||[]},$config(){return this.element.getConfig()},$label(){return this.$config.label},$templateUrl(){return this.$config.templateUrl},elementHandlers(){return this.element.getHandlers()},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},formatRowData(l){return this.elementHandlers.formatRowData(l)},getClass(l){return l.css||""},setElementState(l){this.elementState={...this.elementState,...l}},showError(l={}){const{payload:s}=l;return this.elementHandlers.showError({payload:s,state:{...this.state,...this.elementState}})},showSuccess({payload:l}){return this.elementHandlers.showSuccess({payload:l,state:{...this.state,...this.elementState}})},validationHandler({payload:l}){return this.elementHandlers.validationHandler({payload:l,state:this.state,setElementState:this.setElementState})}}},Uu={key:1};function Mu(l,s,i,m,d,c){const v=g.resolveComponent("q-import",!0);return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-import q-widget-adapters-q-import __element __adapter",c.getClass(i.element)])},[c.isReady?(g.openBlock(),g.createBlock(v,{key:0,additionalListHeaders:c.$additionalListHeaders,formatRowData:c.formatRowData,label:c.$label,showError:c.showError,showSuccess:c.showSuccess,templateUrl:c.$templateUrl,validationHandler:c.validationHandler},null,8,["additionalListHeaders","formatRowData","label","showError","showSuccess","templateUrl","validationHandler"])):g.createCommentVNode("v-if",!0),c.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",Uu,s[0]||(s[0]=[g.createElementVNode("div",{class:"import __loading-box"},[g.createElementVNode("div",{class:"skeleton"},[g.createElementVNode("div",{class:"skeleton__tr"},[g.createElementVNode("div",{class:"skeleton__td"})])])],-1)])))],2)}const Qu=ee(Wu,[["render",Mu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QImport.vue"]]),Vu={name:"q-widget-elements-adapters-q-label",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated"],computed:{$config(){return this.element.getConfig()},$label(){return this.$config.label||""},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(l){return l.css||""}}},Ku={key:0},zu={key:1};function Gu(l,s,i,m,d,c){return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-label q-widget-adapters-q-label __element __label",c.getClass(i.element)])},[c.$label&&c.isReady?(g.openBlock(),g.createElementBlock("h2",Ku,g.toDisplayString(c.$label),1)):g.createCommentVNode("v-if",!0),c.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",zu))],2)}const Yu=ee(Vu,[["render",Gu],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QLabel.vue"]]),Zu={name:"q-widget-elements-adapters-q-list",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{listRows:[],paginatorLayout:null,ready:!1}},computed:{$config(){return this.element.getConfig()},$converter(){return this.$config.converter},$css(){return this.$config.css},$eventName(){return this.$config.eventName||{}},$expansion(){return this.$config.expansion||[]},$listBulkAction(){return this.$config.bulkAction||{}},$listHeaders(){return this.$config.headers||[]},$listSortBys(){return this.$config.listSortBys||[]},$listShowFooter(){return this.$config.listShowFooter||!1},$listStyle(){return this.$config.listStyle||"q-list-table"},$noDataMessage(){return this.$config.noDataMessage||""},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady},listSortKeys(){return this.state.qSorterKeys||[]},rows(){return this.state.rows||[]}},created(){this.controllerReady&&this.init()},methods:{init(){this.listRows=this.rows.map(this.$converter),this.element.onCreated({component:this}),this.$emit("onCreated"),this.ready=!0},converter(l){return l},getClass(l){return l.css||""},onClickList(l){const{action:s={},qRow:i,row:m}=l,{qListButtonType:d=""}=s,c={eventName:d||"onListClick",payload:l};this.$emit("onEvent",c)},onClickListBulk(l){const{action:s,qRows:i,rows:m}=l,{qListButtonType:d}=s,c={eventName:d||"onListClickBulk",payload:l};this.$emit("onEvent",c)},onListHeaderClick(l){const{key:s}=l.header;if(ns(s,this.$listSortBys)){const m=Xu(this.listSortKeys,s),d=Ju(this.$listSortBys,m),c={eventName:this.$eventName.onListClickHeader||"onListClickHeader",payload:{qSorterKeys:m,qSorter:d}};this.$emit("onEvent",c)}}}};function ns(l,s){return l?s.find(i=>{const{key:m}=i;return l===m}):null}function Xu(l,s){let i=!1;const m=l.map(d=>{const{by:c,direction:v}=d;if(s===c){i=!0;const A=typeof v<"u"?Number(v)===1?-1:Number(v)===-1?0:1:1;return{...d,direction:A}}return d});return i?m.filter(d=>d.direction!==0):[...l,{by:s,direction:1}]}function Ju(l,s){return s.reduce((i,m)=>{const{by:d,direction:c}=m,v=ns(d,l),{value:A=[]}=v;if(!v)return i;const R=A.map(q=>({...q,direction:c}));return i.push(...R),i},[])}const ju={key:1};function ec(l,s,i,m,d,c){const v=g.resolveComponent("q-list",!0);return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-list q-widget-adapters-q-list __element __adapter __list",c.getClass(i.element)])},[c.isReady&&d.ready?(g.openBlock(),g.createBlock(v,{key:0,bulkAction:c.$listBulkAction,css:c.$css,expansion:c.$expansion,headers:c.$listHeaders,listStyle:c.$listStyle,noDataMessage:c.$noDataMessage,rows:d.listRows,showFooter:c.$listShowFooter,sortBys:c.$listSortBys,sortStatus:c.listSortKeys,onClick:c.onClickList,onOnClickBulk:c.onClickListBulk,onOnListHeaderClick:c.onListHeaderClick},null,8,["bulkAction","css","expansion","headers","listStyle","noDataMessage","rows","showFooter","sortBys","sortStatus","onClick","onOnClickBulk","onOnListHeaderClick"])):g.createCommentVNode("v-if",!0),c.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",ju,s[0]||(s[0]=[g.createStaticVNode('<div class="__loading-box"><div class="skeleton"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__hr"></div><div class="skeleton__section skeleton__section--table"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div></div></div></div>',1)])))],2)}const tc=ee(Zu,[["render",ec],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QList.vue"]]),nc={name:"q-widget-elements-adapters-q-paginator",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{isPaginator:!1,paginatorLayout:null}},computed:{$config(){return this.element.getConfig()},$controlLabel(){return this.$config.controlLabel},$eventName(){return this.$config.eventName||{}},$paginatorLayout(){return this.$config.layout},$paginatorSizeOptions(){return this.$paginatorLayout.pageSizeOptions||[]},currentPage(){return this.state.currentPage},currentPageSize(){return this.state.currentPageSize},currentPageSizeOptionsIndex(){return this.$paginatorSizeOptions.indexOf(this.currentPageSize)},initPage(){return this.currentPage>=0?this.currentPage:this.$paginatorLayout.initPage},isReady(){return this.loadingCount<=0&&this.controllerReady},pageSizeOptionsIndex(){return this.currentPageSizeOptionsIndex>=0?this.currentPageSizeOptionsIndex:(this.onChangeRecPerPage(this.$paginatorSizeOptions[this.$paginatorLayout.pageSizeOptionsIdx],this.initPage),this.$paginatorLayout.pageSizeOptionsIndex)},totalRecords(){return this.state.totalRecords}},created(){this.controllerReady&&this.init()},mounted(){},methods:{init(){this.paginatorLayout={...this.$paginatorLayout,initPage:this.initPage,pageSizeOptionsIndex:this.pageSizeOptionsIndex},this.isPaginator=!0,this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(l){return l.css||""},onChangePageIdx(l){if(l!==this.currentPage){const i={eventName:this.$eventName.onChangePageIdx||"onChangePageIdx",payload:{currentPage:l}};this.$emit("onEvent",i)}},onChangeRecPerPage(l,s){const m={eventName:this.$eventName.onChangeRecPerPage||"onChangeRecPerPage",payload:{currentPageSize:l,currentPage:s}};this.$emit("onEvent",m)}}},rc={key:1};function ic(l,s,i,m,d,c){const v=g.resolveComponent("q-paginator",!0);return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-paginator q-widget-adapters-q-paginator __element __adapter __paginator",c.getClass(i.element)])},[d.isPaginator&&c.isReady?(g.openBlock(),g.createBlock(v,{key:0,controlLabel:c.$controlLabel,layout:d.paginatorLayout,total:c.totalRecords,onChangeCurrentPage:c.onChangePageIdx,onChangePageSize:c.onChangeRecPerPage},null,8,["controlLabel","layout","total","onChangeCurrentPage","onChangePageSize"])):g.createCommentVNode("v-if",!0),c.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",rc,s[0]||(s[0]=[g.createStaticVNode('<div class="paginator __loading-box"><div class="skeleton"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div></div></div>',1)])))],2)}const sc=ee(nc,[["render",ic],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QPaginator.vue"]]),oc={name:"q-widget-elements-adapters-q-scheduler",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],computed:{$allCellSelectable(){return this.$config.allCellSelectable},$bookings(){return this.state.bookings},$canSelectMoreThanOne(){return this.$config.canSelectMoreThanOne},$config(){return this.element.getConfig()},$eventBlockTemplate(){return this.$config.eventBlockTemplate},$labelTemplate(){return this.$config.labelTemplate},$layoutConfig(){return this.$config.layoutConfig},$showActions(){return this.$config.showActions},$showSelectWhloeDayAction(){return this.$config.showSelectWhloeDayAction},$tempEvents(){return this.state.tempEvents},$timeSlotsByDay(){return this.state.timeSlotsByDay},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(l){return l.css||""},onChangeDate(l){const s={eventName:"onSchedulerChangeDate",payload:l};this.$emit("onEvent",s)},onClickBooking(l){const s={eventName:"onSchedulerClickBooking",payload:l};this.$emit("onEvent",s)},onClickNextPage(l){const s={eventName:"onSchedulerClickNextPage",payload:l};this.$emit("onEvent",s)},onClickPreviousPage(l){const s={eventName:"onSchedulerClickPreviousPage",payload:l};this.$emit("onEvent",s)},onDeleteTempEvent(l){const s={eventName:"onSchedulerDeleteTempEvent",payload:l};this.$emit("onEvent",s)},selectTime(l){const s={eventName:"onSchedulerSelectTime",payload:l};this.$emit("onEvent",s)}}},lc={key:1};function ac(l,s,i,m,d,c){const v=g.resolveComponent("q-scheduler",!0);return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-scheduler q-widget-adapters-q-scheduler __element __adapter __flex",c.getClass(i.element)])},[c.isReady?(g.openBlock(),g.createBlock(v,{key:0,class:"q-scheduler",allCellSelectable:c.$allCellSelectable,bookings:c.$bookings,canSelectMoreThanOne:c.$canSelectMoreThanOne,eventBlockTemplate:c.$eventBlockTemplate,labelTemplate:c.$labelTemplate,layoutConfig:c.$layoutConfig,showActions:c.$showActions,showSelectWhloeDayAction:c.$showSelectWhloeDayAction,tempEvents:c.$tempEvents,timeSlotsByDay:c.$timeSlotsByDay,onOnDeleteTempEvent:c.onDeleteTempEvent,onSelectTime:c.selectTime,onOnClickBooking:c.onClickBooking,onOnChangeDate:c.onChangeDate,onOnClickPreviousPage:c.onClickPreviousPage,onOnClickNextPage:c.onClickNextPage},null,8,["allCellSelectable","bookings","canSelectMoreThanOne","eventBlockTemplate","labelTemplate","layoutConfig","showActions","showSelectWhloeDayAction","tempEvents","timeSlotsByDay","onOnDeleteTempEvent","onSelectTime","onOnClickBooking","onOnChangeDate","onOnClickPreviousPage","onOnClickNextPage"])):g.createCommentVNode("v-if",!0),c.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",lc,s[0]||(s[0]=[g.createElementVNode("div",{class:"__loading-box"},[g.createElementVNode("div",{class:"skeleton"},[g.createElementVNode("div",{class:"skeleton__tr"},[g.createElementVNode("div",{class:"skeleton__td"})])])],-1)])))],2)}const uc=ee(oc,[["render",ac],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QScheduler.vue"]]),cc={name:"q-widget-elements-adapters-q-tab",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{active:{},renderKey:0,tabLayout:[]}},computed:{$config(){return this.element.getConfig()},$eventName(){return this.$config.eventName||{}},$tabLayout(){return this.$config.layout||[]},activeKey(){return this.active.key},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.tabLayout=[...this.$tabLayout],this.active=this.state.active||this.tabLayout[0]||{},this.element.onCreated({component:this,payload:{tabLayout:this.tabLayout}}),this.$emit("onCreated")},getClass(l){return l.css||""},onChangeTab(l){const i={eventName:this.$eventName.onChangeTab||"onTabChange",payload:{active:l}};this.$emit("onEvent",i)}}},fc={key:0,class:"__tabs __flex"},dc=["href"],hc=["onClick"],gc={key:1};function mc(l,s,i,m,d,c){return g.openBlock(),g.createElementBlock("div",{class:g.normalizeClass(["q-widget-elements-adapters-q-tab q-widget-adapters-q-tab __element __adapter",c.getClass(i.element)])},[c.isReady?(g.openBlock(),g.createElementBlock("div",fc,[(g.openBlock(!0),g.createElementBlock(g.Fragment,null,g.renderList(d.tabLayout,(v,A)=>(g.openBlock(),g.createElementBlock("div",{key:A,class:g.normalizeClass(["__pointer __tab",c.activeKey===v.key?"__active":""])},[v.url?(g.openBlock(),g.createElementBlock("a",{key:0,href:v.url},g.toDisplayString(v.label)+g.toDisplayString(Number.isNaN(Number(v.total))?"":`(${Number(v.total)})`),9,dc)):g.createCommentVNode("v-if",!0),v.url?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",{key:1,onClick:R=>c.onChangeTab(v)},g.toDisplayString(v.label)+g.toDisplayString(Number.isNaN(Number(v.total))?"":`(${Number(v.total)})`),9,hc))],2))),128))])):g.createCommentVNode("v-if",!0),c.isReady?g.createCommentVNode("v-if",!0):(g.openBlock(),g.createElementBlock("div",gc,s[0]||(s[0]=[g.createStaticVNode('<div class="__loading-box"><div class="skeleton"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div></div></div>',1)])))],2)}const pc={name:"q-widget-elements-element",components:{QWidgetQButtonElement:Au,QWidgetQFormElement:Lu,QWidgetQGridElement:Hu,QWidgetQHtmlElement:Fu,QWidgetQImportElement:Qu,QWidgetQLabelElement:Yu,QWidgetQListElement:tc,QWidgetQPaginatorElement:sc,QWidgetQSchedulerElement:uc,QWidgetQTabElement:ee(cc,[["render",mc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QTab.vue"]])},props:{controllerReady:{type:Boolean,default:!1},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{elementName(){return this.element.getElementName()},element(){return this.node},state(){return this.element.getState()}},methods:{factoryInit(l){return l instanceof te.ElementQButton?"q-widget-q-button-element":l instanceof te.ElementQForm?"q-widget-q-form-element":l instanceof te.ElementQGrid?"q-widget-q-grid-element":l instanceof te.ElementQHtml?"q-widget-q-html-element":l instanceof te.ElementQImport?"q-widget-q-import-element":l instanceof te.ElementQLabel?"q-widget-q-label-element":l instanceof te.ElementQList?"q-widget-q-list-element":l instanceof te.ElementQPaginator?"q-widget-q-paginator-element":l instanceof te.ElementQScheduler?"q-widget-q-scheduler-element":l instanceof te.ElementQTab?"q-widget-q-tab-element":""},onEvent(l){this.$emit("onEvent",{...l,element:this.element})},onElementCreated(){this.element.isCreated&&this.$emit("onElementCreated")}}};function _c(l,s,i,m,d,c){return g.openBlock(),g.createBlock(g.resolveDynamicComponent(c.factoryInit(i.node)),{controllerReady:i.controllerReady,element:i.node,elementName:c.elementName,loadingCount:i.loadingCount,state:c.state,onOnCreated:c.onElementCreated,onOnEvent:c.onEvent},null,40,["controllerReady","element","elementName","loadingCount","state","onOnCreated","onOnEvent"])}const vc=Object.freeze(Object.defineProperty({__proto__:null,default:ee(pc,[["render",_c],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Element.vue"]])},Symbol.toStringTag,{value:"Module"}));gt.QWidget=wn,Object.defineProperty(gt,Symbol.toStringTag,{value:"Module"}); return gt; });
34
+ `)+A+`return __p
35
+ }`;var F=La(function(){return U(d,$+"return "+A).apply(i,h)});if(F.source=A,es(F))throw F;return F}function Zy(e){return V(e).toLowerCase()}function Xy(e){return V(e).toUpperCase()}function Jy(e,t,n){if(e=V(e),e&&(n||t===i))return Wo(e);if(!e||!(t=Re(t)))return e;var o=Ue(e),l=Ue(t),d=Uo(o,l),h=Vo(o,l)+1;return vt(o,d,h).join("")}function jy(e,t,n){if(e=V(e),e&&(n||t===i))return e.slice(0,Qo(e)+1);if(!e||!(t=Re(t)))return e;var o=Ue(e),l=Vo(o,Ue(t))+1;return vt(o,0,l).join("")}function ev(e,t,n){if(e=V(e),e&&(n||t===i))return e.replace(ei,"");if(!e||!(t=Re(t)))return e;var o=Ue(e),l=Uo(o,Ue(t));return vt(o,l).join("")}function tv(e,t){var n=zf,o=Yf;if(J(t)){var l="separator"in t?t.separator:l;n="length"in t?I(t.length):n,o="omission"in t?Re(t.omission):o}e=V(e);var d=e.length;if(It(e)){var h=Ue(e);d=h.length}if(n>=d)return e;var m=n-Ft(o);if(m<1)return o;var y=h?vt(h,0,m).join(""):e.slice(0,m);if(l===i)return y+o;if(h&&(m+=y.length-m),ts(l)){if(e.slice(m).search(l)){var E,b=y;for(l.global||(l=_i(l.source,V(uo.exec(l))+"g")),l.lastIndex=0;E=l.exec(b);)var A=E.index;y=y.slice(0,A===i?m:A)}}else if(e.indexOf(Re(l),m)!=m){var O=y.lastIndexOf(l);O>-1&&(y=y.slice(0,O))}return y+o}function nv(e){return e=V(e),e&&hd.test(e)?e.replace(oo,qh):e}var rv=Kt(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),is=Nl("toUpperCase");function Ba(e,t,n){return e=V(e),t=n?i:t,t===i?Sh(e)?Nh(e):_h(e):e.match(t)||[]}var La=D(function(e,t){try{return xe(e,i,t)}catch(n){return es(n)?n:new T(n)}}),iv=lt(function(e,t){return Be(t,function(n){n=Xe(n),st(e,n,Ji(e[n],e))}),e});function sv(e){var t=e==null?0:e.length,n=q();return e=t?X(e,function(o){if(typeof o[1]!="function")throw new Le(g);return[n(o[0]),o[1]]}):[],D(function(o){for(var l=-1;++l<t;){var d=e[l];if(xe(d[0],this,o))return xe(d[1],this,o)}})}function ov(e){return qg(Te(e,B))}function ss(e){return function(){return e}}function lv(e,t){return e==null||e!==e?t:e}var av=Hl(),uv=Hl(!0);function Ae(e){return e}function os(e){return dl(typeof e=="function"?e:Te(e,B))}function cv(e){return gl(Te(e,B))}function fv(e,t){return ml(e,Te(t,B))}var dv=D(function(e,t){return function(n){return Cn(n,e,t)}}),hv=D(function(e,t){return function(n){return Cn(e,n,t)}});function ls(e,t,n){var o=ae(t),l=cr(t,o);n==null&&!(J(t)&&(l.length||!o.length))&&(n=t,t=e,e=this,l=cr(t,ae(t)));var d=!(J(n)&&"chain"in n)||!!n.chain,h=ut(e);return Be(l,function(m){var y=t[m];e[m]=y,h&&(e.prototype[m]=function(){var E=this.__chain__;if(d||E){var b=e(this.__wrapped__),A=b.__actions__=Ce(this.__actions__);return A.push({func:y,args:arguments,thisArg:e}),b.__chain__=E,b}return y.apply(e,ht([this.value()],arguments))})}),e}function gv(){return ue._===this&&(ue._=Ph),this}function as(){}function mv(e){return e=I(e),D(function(t){return pl(t,e)})}var pv=Di(X),_v=Di(Io),yv=Di(ci);function Na(e){return Qi(e)?fi(Xe(e)):zg(e)}function vv(e){return function(t){return e==null?i:Rt(e,t)}}var wv=Fl(),Cv=Fl(!0);function us(){return[]}function cs(){return!1}function Ev(){return{}}function bv(){return""}function Av(){return!0}function xv(e,t){if(e=I(e),e<1||e>Bt)return[];var n=ze,o=me(e,ze);t=q(t),e-=ze;for(var l=gi(o,t);++n<e;)t(n);return l}function Sv(e){return H(e)?X(e,Xe):Oe(e)?[e]:Ce(ea(V(e)))}function Rv(e){var t=++Fh;return V(e)+t}var Ov=pr(function(e,t){return e+t},0),kv=Pi("ceil"),$v=pr(function(e,t){return e/t},1),qv=Pi("floor");function Bv(e){return e&&e.length?ur(e,Ae,xi):i}function Lv(e,t){return e&&e.length?ur(e,q(t,2),xi):i}function Nv(e){return Po(e,Ae)}function Tv(e,t){return Po(e,q(t,2))}function Hv(e){return e&&e.length?ur(e,Ae,ki):i}function Iv(e,t){return e&&e.length?ur(e,q(t,2),ki):i}var Fv=pr(function(e,t){return e*t},1),Dv=Pi("round"),Pv=pr(function(e,t){return e-t},0);function Mv(e){return e&&e.length?hi(e,Ae):0}function Wv(e,t){return e&&e.length?hi(e,q(t,2)):0}return c.after=c_,c.ary=fa,c.assign=X_,c.assignIn=xa,c.assignInWith=kr,c.assignWith=J_,c.at=j_,c.before=da,c.bind=Ji,c.bindAll=iv,c.bindKey=ha,c.castArray=E_,c.chain=aa,c.chunk=qm,c.compact=Bm,c.concat=Lm,c.cond=sv,c.conforms=ov,c.constant=ss,c.countBy=Mp,c.create=ey,c.curry=ga,c.curryRight=ma,c.debounce=pa,c.defaults=ty,c.defaultsDeep=ny,c.defer=f_,c.delay=d_,c.difference=Nm,c.differenceBy=Tm,c.differenceWith=Hm,c.drop=Im,c.dropRight=Fm,c.dropRightWhile=Dm,c.dropWhile=Pm,c.fill=Mm,c.filter=Up,c.flatMap=Qp,c.flatMapDeep=Gp,c.flatMapDepth=zp,c.flatten=ia,c.flattenDeep=Wm,c.flattenDepth=Um,c.flip=h_,c.flow=av,c.flowRight=uv,c.fromPairs=Vm,c.functions=uy,c.functionsIn=cy,c.groupBy=Yp,c.initial=Qm,c.intersection=Gm,c.intersectionBy=zm,c.intersectionWith=Ym,c.invert=dy,c.invertBy=hy,c.invokeMap=Xp,c.iteratee=os,c.keyBy=Jp,c.keys=ae,c.keysIn=be,c.map=br,c.mapKeys=my,c.mapValues=py,c.matches=cv,c.matchesProperty=fv,c.memoize=xr,c.merge=_y,c.mergeWith=Sa,c.method=dv,c.methodOf=hv,c.mixin=ls,c.negate=Sr,c.nthArg=mv,c.omit=yy,c.omitBy=vy,c.once=g_,c.orderBy=jp,c.over=pv,c.overArgs=m_,c.overEvery=_v,c.overSome=yv,c.partial=ji,c.partialRight=_a,c.partition=e_,c.pick=wy,c.pickBy=Ra,c.property=Na,c.propertyOf=vv,c.pull=jm,c.pullAll=oa,c.pullAllBy=ep,c.pullAllWith=tp,c.pullAt=np,c.range=wv,c.rangeRight=Cv,c.rearg=p_,c.reject=r_,c.remove=rp,c.rest=__,c.reverse=Zi,c.sampleSize=s_,c.set=Ey,c.setWith=by,c.shuffle=o_,c.slice=ip,c.sortBy=u_,c.sortedUniq=fp,c.sortedUniqBy=dp,c.split=Qy,c.spread=y_,c.tail=hp,c.take=gp,c.takeRight=mp,c.takeRightWhile=pp,c.takeWhile=_p,c.tap=Bp,c.throttle=v_,c.thru=Er,c.toArray=Ea,c.toPairs=Oa,c.toPairsIn=ka,c.toPath=Sv,c.toPlainObject=Aa,c.transform=Ay,c.unary=w_,c.union=yp,c.unionBy=vp,c.unionWith=wp,c.uniq=Cp,c.uniqBy=Ep,c.uniqWith=bp,c.unset=xy,c.unzip=Xi,c.unzipWith=la,c.update=Sy,c.updateWith=Ry,c.values=zt,c.valuesIn=Oy,c.without=Ap,c.words=Ba,c.wrap=C_,c.xor=xp,c.xorBy=Sp,c.xorWith=Rp,c.zip=Op,c.zipObject=kp,c.zipObjectDeep=$p,c.zipWith=qp,c.entries=Oa,c.entriesIn=ka,c.extend=xa,c.extendWith=kr,ls(c,c),c.add=Ov,c.attempt=La,c.camelCase=By,c.capitalize=$a,c.ceil=kv,c.clamp=ky,c.clone=b_,c.cloneDeep=x_,c.cloneDeepWith=S_,c.cloneWith=A_,c.conformsTo=R_,c.deburr=qa,c.defaultTo=lv,c.divide=$v,c.endsWith=Ly,c.eq=Ke,c.escape=Ny,c.escapeRegExp=Ty,c.every=Wp,c.find=Vp,c.findIndex=na,c.findKey=ry,c.findLast=Kp,c.findLastIndex=ra,c.findLastKey=iy,c.floor=qv,c.forEach=ua,c.forEachRight=ca,c.forIn=sy,c.forInRight=oy,c.forOwn=ly,c.forOwnRight=ay,c.get=ns,c.gt=O_,c.gte=k_,c.has=fy,c.hasIn=rs,c.head=sa,c.identity=Ae,c.includes=Zp,c.indexOf=Km,c.inRange=$y,c.invoke=gy,c.isArguments=$t,c.isArray=H,c.isArrayBuffer=$_,c.isArrayLike=Ee,c.isArrayLikeObject=ne,c.isBoolean=q_,c.isBuffer=wt,c.isDate=B_,c.isElement=L_,c.isEmpty=N_,c.isEqual=T_,c.isEqualWith=H_,c.isError=es,c.isFinite=I_,c.isFunction=ut,c.isInteger=ya,c.isLength=Rr,c.isMap=va,c.isMatch=F_,c.isMatchWith=D_,c.isNaN=P_,c.isNative=M_,c.isNil=U_,c.isNull=W_,c.isNumber=wa,c.isObject=J,c.isObjectLike=te,c.isPlainObject=Rn,c.isRegExp=ts,c.isSafeInteger=V_,c.isSet=Ca,c.isString=Or,c.isSymbol=Oe,c.isTypedArray=Gt,c.isUndefined=K_,c.isWeakMap=Q_,c.isWeakSet=G_,c.join=Zm,c.kebabCase=Hy,c.last=Ie,c.lastIndexOf=Xm,c.lowerCase=Iy,c.lowerFirst=Fy,c.lt=z_,c.lte=Y_,c.max=Bv,c.maxBy=Lv,c.mean=Nv,c.meanBy=Tv,c.min=Hv,c.minBy=Iv,c.stubArray=us,c.stubFalse=cs,c.stubObject=Ev,c.stubString=bv,c.stubTrue=Av,c.multiply=Fv,c.nth=Jm,c.noConflict=gv,c.noop=as,c.now=Ar,c.pad=Dy,c.padEnd=Py,c.padStart=My,c.parseInt=Wy,c.random=qy,c.reduce=t_,c.reduceRight=n_,c.repeat=Uy,c.replace=Vy,c.result=Cy,c.round=Dv,c.runInContext=_,c.sample=i_,c.size=l_,c.snakeCase=Ky,c.some=a_,c.sortedIndex=sp,c.sortedIndexBy=op,c.sortedIndexOf=lp,c.sortedLastIndex=ap,c.sortedLastIndexBy=up,c.sortedLastIndexOf=cp,c.startCase=Gy,c.startsWith=zy,c.subtract=Pv,c.sum=Mv,c.sumBy=Wv,c.template=Yy,c.times=xv,c.toFinite=ct,c.toInteger=I,c.toLength=ba,c.toLower=Zy,c.toNumber=Fe,c.toSafeInteger=Z_,c.toString=V,c.toUpper=Xy,c.trim=Jy,c.trimEnd=jy,c.trimStart=ev,c.truncate=tv,c.unescape=nv,c.uniqueId=Rv,c.upperCase=rv,c.upperFirst=is,c.each=ua,c.eachRight=ca,c.first=sa,ls(c,function(){var e={};return Ye(c,function(t,n){K.call(c.prototype,n)||(e[n]=t)}),e}(),{chain:!1}),c.VERSION=a,Be(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){c[e].placeholder=c}),Be(["drop","take"],function(e,t){M.prototype[e]=function(n){n=n===i?1:le(I(n),0);var o=this.__filtered__&&!t?new M(this):this.clone();return o.__filtered__?o.__takeCount__=me(n,o.__takeCount__):o.__views__.push({size:me(n,ze),type:e+(o.__dir__<0?"Right":"")}),o},M.prototype[e+"Right"]=function(n){return this.reverse()[e](n).reverse()}}),Be(["filter","map","takeWhile"],function(e,t){var n=t+1,o=n==ro||n==jf;M.prototype[e]=function(l){var d=this.clone();return d.__iteratees__.push({iteratee:q(l,3),type:n}),d.__filtered__=d.__filtered__||o,d}}),Be(["head","last"],function(e,t){var n="take"+(t?"Right":"");M.prototype[e]=function(){return this[n](1).value()[0]}}),Be(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");M.prototype[e]=function(){return this.__filtered__?new M(this):this[n](1)}}),M.prototype.compact=function(){return this.filter(Ae)},M.prototype.find=function(e){return this.filter(e).head()},M.prototype.findLast=function(e){return this.reverse().find(e)},M.prototype.invokeMap=D(function(e,t){return typeof e=="function"?new M(this):this.map(function(n){return Cn(n,e,t)})}),M.prototype.reject=function(e){return this.filter(Sr(q(e)))},M.prototype.slice=function(e,t){e=I(e);var n=this;return n.__filtered__&&(e>0||t<0)?new M(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==i&&(t=I(t),n=t<0?n.dropRight(-t):n.take(t-e)),n)},M.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},M.prototype.toArray=function(){return this.take(ze)},Ye(M.prototype,function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),o=/^(?:head|last)$/.test(t),l=c[o?"take"+(t=="last"?"Right":""):t],d=o||/^find/.test(t);l&&(c.prototype[t]=function(){var h=this.__wrapped__,m=o?[1]:arguments,y=h instanceof M,E=m[0],b=y||H(h),A=function(P){var W=l.apply(c,ht([P],m));return o&&O?W[0]:W};b&&n&&typeof E=="function"&&E.length!=1&&(y=b=!1);var O=this.__chain__,$=!!this.__actions__.length,L=d&&!O,F=y&&!$;if(!d&&b){h=F?h:new M(this);var N=e.apply(h,m);return N.__actions__.push({func:Er,args:[A],thisArg:i}),new Ne(N,O)}return L&&F?e.apply(this,m):(N=this.thru(A),L?o?N.value()[0]:N.value():N)})}),Be(["pop","push","shift","sort","splice","unshift"],function(e){var t=zn[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);c.prototype[e]=function(){var l=arguments;if(o&&!this.__chain__){var d=this.value();return t.apply(H(d)?d:[],l)}return this[n](function(h){return t.apply(H(h)?h:[],l)})}}),Ye(M.prototype,function(e,t){var n=c[t];if(n){var o=n.name+"";K.call(Wt,o)||(Wt[o]=[]),Wt[o].push({name:t,func:n})}}),Wt[mr(i,qt).name]=[{name:"wrapper",func:i}],M.prototype.clone=ng,M.prototype.reverse=rg,M.prototype.value=ig,c.prototype.at=Lp,c.prototype.chain=Np,c.prototype.commit=Tp,c.prototype.next=Hp,c.prototype.plant=Fp,c.prototype.reverse=Dp,c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=Pp,c.prototype.first=c.prototype.head,gn&&(c.prototype[gn]=Ip),c},Dt=Th();Et?((Et.exports=Dt)._=Dt,oi._=Dt):ue._=Dt}).call(en)}(Nn,Nn.exports);var lc=Nn.exports;const Wr=oc(lc);class ac extends De{constructor(r={}){super(r),this.defaultStateName={axios:"axios",formData:"formData",formErrors:"formErrors",formNode:"formNode",pageKey:"pageKey",qForm:"qForm"}}get isValid(){return super.isValid&&this.isValidHelpers}get isValidHelpers(){const{qForm:r}=this.controllerHelpers||{},{NodeHelper:i}=r||{};return typeof i!="function"?(console.log("invalid form helpers"),!1):!0}getConfig(){const r={...this.state.qForm||{},...this.config||{},...this.state[this.name]||{}};return typeof zs=="function"?zs.init({...r,helpers:{...this.controllerHelpers,element:this}}):{}}getFormCustomizer(){const{formCustomizer:r}=this.getHandlers();return typeof r=="function"?r:uc}}function uc(s,r){if(Array.isArray(s))return r||null;if(typeof r=="number"||typeof r=="boolean")return r;if(!r)return null}class cc extends De{constructor(r={}){super(r),this.defaultStateName={gridItems:"gridItems"}}get isValid(){return super.isValid&&this.isValidHelpers}get isValidHelpers(){const{qGrid:r}=this.controllerHelpers||{},{QItem:i,Cell:a}=r||{};return typeof i!="function"||typeof a!="function"?(console.log("invalid grid helpers"),!1):!0}getConfig(){const r={...this.state.qGrid||{},...this.config||{},...this.state[this.name]||{}};return typeof Ys=="function"?Ys.init({...r,helpers:{...this.controllerHelpers,element:this}}):{}}}class fc extends De{constructor(r={}){super(r),this.defaultStateName={qHtml:"qHtml"}}getConfig(){return{...this.state.qHtml||{},...this.config||{},...this.state[this.name]||{}}}}class dc extends De{constructor(r={}){super(r)}}class hc extends De{constructor(r={}){super(r),this.defaultStateName={qLabel:"qLabel"}}getConfig(){return{...this.state.qLabel||{},...this.config||{},...this.state[this.name]||{}}}}class gc extends De{constructor(r={}){super(r),this.defaultStateName={qList:"qList",qSorterKeys:"qSorterKeys",rows:"rows"}}get isValid(){return super.isValid&&this.isValidHelpers}get isValidHelpers(){const{qList:r}=this.controllerHelpers||{},{QListBulkButton:i,QListButton:a,QRow:f}=r||{};return typeof i!="function"||typeof a!="function"||typeof f!="function"?(console.log("invalid list helpers"),!1):!0}getConfig(){const r={...this.state.qList||{},...this.config||{},...this.state[this.name]||{}};return typeof Xs=="function"?Xs.init({...r,helpers:{...this.controllerHelpers,element:this}}):{}}}class mc extends De{constructor(r={}){super(r),this.defaultStateName={currentPage:"currentPage",currentPageSize:"currentPageSize",qPaginator:"qPaginator",totalRecords:"totalRecords"}}getConfig(){return{...this.state.qPaginator||{},...this.config||{},...this.state[this.name]||{}}}}class pc extends De{constructor(r={}){super(r),this.defaultStateName={qScheduler:"qScheduler"}}getConfig(){return{...this.state.qScheduler||{},...this.config||{},...this.state[this.name]||{}}}}class _c extends De{constructor(r={}){super(r),this.defaultStateName={active:"active",qTab:"qTab",tabLayout:"tabLayout"}}getConfig(){return{...this.state.qTab||{},...this.config||{},...this.state[this.name]||{}}}}const se={...nc,...{ElementQButton:sc,ElementQForm:ac,ElementQGrid:cc,ElementQHtml:fc,ElementQImport:dc,ElementQLabel:hc,ElementQList:gc,ElementQPaginator:mc,ElementQScheduler:pc,ElementQTab:_c},Container:jt,Element:De,Node:Mr};class yc{static init({layout:r={},controllerHelpers:i={}}={}){return Js({layout:r,nodes:[],controllerHelpers:i})}}function Js({layout:s,nodes:r,controllerHelpers:i}){if(s instanceof se.Node)return s;const a={...s};return Array.isArray(a.children)&&(a.children=a.children.map(f=>Js({layout:f,nodes:r,controllerHelpers:i}))),vc(a,r,i)}function vc(s,r,i){const{nodeType:a,permissions:f}=s||{};if(typeof se[a]=="function"){const{permissionHandler:u}=i,g=f?u(f):{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0},w=se[a].init({...s,controllerHelpers:i,permissionResult:g});return w?w.isExist(r)?null:(r.push(w),w):null}return null}class wc{constructor(r={}){this.css=r.css||"",this.controllerHelpers=r.controllerHelpers,this.eventHandlers=r.eventHandlers||{},this.id=r.id||Dr("controller"),this.initialState=r.initialState,this.name=r.name,this.saveStateKeys=r.saveStateKeys||[],this.setLayout(r.layout)}get createdElement(){return this.elements.filter(r=>r.isCreated)}get elements(){return this.layout.getElements()}get isValid(){return!!this.id&&this.isValidControllerHelpers}get isValidControllerHelpers(){const{qUtilities:r}=this.controllerHelpers;return r&&js(r.convertString)&&js(r.getValidation)}static init(r){const i=new this(r);return i.isValid?i:null}getElementByElementName(r){return this.elements.find(i=>i.getElementName()===r)}getState(){return{...this.getControllerState(),...this.layout.getElementState()}}getControllerState(){return this.state}setLayout(r){const i={...this.controllerHelpers,controller:this};this.layout=yc.init({layout:r,controllerHelpers:i})}updateState(r={}){this.state={...this.state,...r},this.layout&&this.layout.updateElementState(this.state)}}function js(s){return typeof s=="function"}const tn={beforeCreate(){this.$options.components={...this.$options.components,QWidgetContainersContainer:p.defineAsyncComponent(()=>Promise.resolve().then(()=>zc)),QWidgetElementsElement:p.defineAsyncComponent(()=>Promise.resolve().then(()=>Gf))}},methods:{currentContainer(s){return s.isVisible?s instanceof se.Container?"q-widget-containers-container":s instanceof se.Element?"q-widget-elements-element":null:null}}},Cc={name:"q-widget-controller",components:{QModal:Da},mixins:[tn],props:{controller:{type:Object,default:()=>({})}},data(){return{isReady:!1,loadingCount:0,modal:null,renderKey:0}},computed:{controllerCss(){return this.controller.css||""},controllerHelpers(){return this.controller.controllerHelpers},eventHandlers(){return this.controller.eventHandlers||{}},initControllerState(){return this.controller.initialState},node(){return this.controller.layout}},created(){this.init()},methods:{async init(){try{const{getControllerState:s}=this.controllerHelpers;let r=this.initControllerState;typeof s=="function"&&(r=await s({state:r}));const{onCreated:i}=this.eventHandlers;i&&(r=await this.eventHandler({state:r,event:i})),this.updateState(r)}catch(s){Yt({component:this,message:s.message})}finally{this.isReady=!0,this.reRenderElements()}},async callbackEmit({event:s,payload:r}){console.log("callbackEmit",s,r)},async callbackSubscribe(s,{event:r,payload:i,cb:a}){const{getControllerUniqueKey:f}=this.controllerHelpers;if(typeof f=="function"&&s===f())try{const{key:u}=r,{controllerSubscribed:g}=this.eventHandlers,w=g[u];let x=this.controller.getState();w&&(x=await this.eventHandler({state:{...x,eventPayload:i},event:w})),typeof a=="function"&&await a({event:r,payload:x})}catch(u){Yt({component:this,message:u.message})}},async eventHandler({event:s,state:r}){const{eventHandler:i}=this.controllerHelpers;if(typeof i!="function")return console.log("no eventHandler"),r;let a=r;const f=Ec({event:s}),u=this.getLoadingFunctions({scope:f});try{if(eo({loadingFunctions:u,action:"start"}),s){const g={body:{...r},controller:this.controller,component:this,controllerHelpers:{...this.controllerHelpers,callbackEmit:this.callbackEmit,callbackSubscribe:this.callbackSubscribe,eventHandler:this.eventHandler,reRenderElements:this.reRenderElements,runEventChains:this.eventHandler,showError:Yt,updateState:this.updateState,updateLayout:this.updateLayout}},w=await i({event:s,payload:g});a={...a,...w}}return console.log(a),a}catch(g){throw new Error(g.message)}finally{eo({loadingFunctions:u,action:"stop"})}},getKey(s,r){return`${this.renderKey}-${s}-${r} `},getLoadingFunctions({scope:s=""}){const{startLoading:r,stopLoading:i}=this.controllerHelpers;switch(s){case"full":return typeof r!="function"||typeof i!="function"?null:{startLoading:r,stopLoading:i};case"none":return null;case"self":return{startLoading:this.startSelfLoading,stopLoading:this.stopSelfLoading};default:return{startLoading:this.startSelfLoading,stopLoading:this.stopSelfLoading}}},async onEvent(s){try{const{eventName:r,element:i,payload:a}=s,{elementEvents:f={}}=this.eventHandlers,u=f[r];u?await this.eventHandler({state:{...this.controller.getState(),eventPayload:a,eventElement:i},event:u}):console.log(`can not find the event ${r}`)}catch(r){Yt({component:this,message:r.message,modalConfig:{title:"提示"}})}},async onElementCreated(){try{console.log("onElementCreated",this.controller.elements,this.controller.createdElement);const s=this.eventHandlers.onElementCreated;s&&await this.eventHandler({state:this.controller.getState(),event:s})}catch(s){Yt({component:this,message:s.message})}},reRenderElements(){this.renderKey+=1},startSelfLoading(){this.loadingCount+=1},stopSelfLoading(){this.loadingCount-=1},updateState(s){this.controller.updateState(s);const{saveControllerState:r}=this.controllerHelpers;typeof r=="function"&&Pa({controller:this.controller,state:s,saveControllerState:r})},updateLayout(s,r){s||console.log("no layout"),r||console.log("use controller state"),this.controller.setLayout(s),this.controller.updateState(r),this.reRenderElements()}}};function Ec({event:s={}}={}){return s.scope||"full"}function eo({loadingFunctions:s,action:r}){if(s){const{startLoading:i,stopLoading:a}=s;switch(r){case"start":{i();break}case"stop":{a();break}}}}function bc(s,r,i,a,f,u){const g=p.resolveComponent("q-modal");return p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["q-widget-controller __controller",u.controllerCss])},[u.node?(p.openBlock(),p.createBlock(p.resolveDynamicComponent(s.currentContainer(u.node)),{key:f.renderKey,controllerReady:f.isReady,node:u.node,loadingCount:f.loadingCount,onOnEvent:u.onEvent,onOnElementCreated:u.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"])):p.createCommentVNode("v-if",!0),f.modal?(p.openBlock(),p.createBlock(g,{key:u.getKey("modal",f.modal),modal:f.modal},null,8,["modal"])):p.createCommentVNode("v-if",!0)],2)}const Ac={name:"q-widget",components:{QWidgetController:ie(Cc,[["render",bc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Controller.vue"]])},props:{content:{type:Object,default:()=>({})},contentHelpers:{type:Object,default:()=>({})},controller:{type:Object,default:()=>null},controllerHelpers:{type:Object,default:()=>null}},data(){return{controllerInstence:null,error:null}},computed:{hasError(){return this.error}},created(){this.init()},methods:{init(){try{const s=this.controllerHelpers||this.contentHelpers||{},r=s.qUtilities||{},i=this.controller||this.content;if(this.controllerInstence=wc.init({...i,controllerHelpers:{permissionHandler:xc,...s,qUtilities:{...Fu,...r}}}),!this.controllerInstence)throw new Error("invalid controller")}catch(s){this.error=s.message||"invalid controller"}}}};function xc(){return{isAllowCreate:!0,isAllowRead:!0,isAllowUpdate:!0,isAllowDelete:!0}}const Sc={class:"q-widget"},Rc={key:1,class:"__error"};function Oc(s,r,i,a,f,u){const g=p.resolveComponent("q-widget-controller");return p.openBlock(),p.createElementBlock("div",Sc,[u.hasError?p.createCommentVNode("v-if",!0):(p.openBlock(),p.createBlock(g,{key:0,controller:f.controllerInstence},null,8,["controller"])),u.hasError?(p.openBlock(),p.createElementBlock("div",Rc,p.toDisplayString(f.error),1)):p.createCommentVNode("v-if",!0)])}const Tn=ie(Ac,[["render",Oc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/QWidget.vue"]]);function kc(s){s.component(Tn.name,Tn)}Tn.install=kc;const $c={name:"q-widget-containers-box",mixins:[tn],props:{controllerReady:{type:Boolean,default:!1},getKey:{type:Function,default:()=>null},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.children||[]}},methods:{onEvent(s){this.$emit("onEvent",s)},onElementCreated(s){this.$emit("onElementCreated",s)}}},qc={class:"q-widget-containers-box __outer-box"},Bc={class:"__inner-box"};function Lc(s,r,i,a,f,u){return p.openBlock(),p.createElementBlock("div",qc,[p.createElementVNode("div",Bc,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(u.children,(g,w)=>(p.openBlock(),p.createBlock(p.resolveDynamicComponent(s.currentContainer(g)),{key:i.getKey("box",w),controllerReady:i.controllerReady,node:g,loadingCount:i.loadingCount,onOnEvent:u.onEvent,onOnElementCreated:u.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"]))),128))])])}const Nc=ie($c,[["render",Lc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/Box.vue"]]),Tc={name:"q-widget-containers-column",mixins:[tn],props:{controllerReady:{type:Boolean,default:!1},getKey:{type:Function,default:()=>null},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.children||[]}},methods:{onEvent(s){this.$emit("onEvent",s)},onElementCreated(s){this.$emit("onElementCreated",s)}}},Hc={class:"q-widget-containers-column __column"};function Ic(s,r,i,a,f,u){return p.openBlock(),p.createElementBlock("div",Hc,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(u.children,(g,w)=>(p.openBlock(),p.createBlock(p.resolveDynamicComponent(s.currentContainer(g)),{key:i.getKey("cloumn",w),controllerReady:i.controllerReady,node:g,loadingCount:i.loadingCount,onOnEvent:u.onEvent,onOnElementCreated:u.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"]))),128))])}const Fc=ie(Tc,[["render",Ic],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/Column.vue"]]),Dc={name:"q-widget-containers-header-sticky",mixins:[tn],props:{controllerReady:{type:Boolean,default:!1},getKey:{type:Function,default:()=>null},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.children||[]}},methods:{onEvent(s){this.$emit("onEvent",s)},onElementCreated(s){this.$emit("onElementCreated",s)}}},Pc={class:"q-widget-containers-header-sticky __header __sticky --sticky-top"};function Mc(s,r,i,a,f,u){return p.openBlock(),p.createElementBlock("div",Pc,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(u.children,(g,w)=>(p.openBlock(),p.createBlock(p.resolveDynamicComponent(s.currentContainer(g)),{key:i.getKey("header-sticky",w),controllerReady:i.controllerReady,node:g,loadingCount:i.loadingCount,onOnEvent:u.onEvent,onOnElementCreated:u.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"]))),128))])}const Wc=ie(Dc,[["render",Mc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/HeaderSticky.vue"]]),Uc={name:"q-widget-containers-row",mixins:[tn],props:{controllerReady:{type:Boolean,default:!1},getKey:{type:Function,default:()=>null},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.children||[]}},methods:{onEvent(s){this.$emit("onEvent",s)},onElementCreated(s){this.$emit("onElementCreated",s)}}},Vc={class:"q-widget-containers-row __row"};function Kc(s,r,i,a,f,u){return p.openBlock(),p.createElementBlock("div",Vc,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(u.children,(g,w)=>(p.openBlock(),p.createBlock(p.resolveDynamicComponent(s.currentContainer(g)),{key:i.getKey("row",w),controllerReady:i.controllerReady,node:g,loadingCount:i.loadingCount,onOnEvent:u.onEvent,onOnElementCreated:u.onElementCreated},null,40,["controllerReady","node","loadingCount","onOnEvent","onOnElementCreated"]))),128))])}const Qc={name:"q-widget-containers-container",components:{QWidgetBoxContainer:Nc,QWidgetColumnContainer:Fc,QWidgetHeaderStickyContainer:Wc,QWidgetRowContainer:ie(Uc,[["render",Kc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/Row.vue"]])},props:{controllerReady:{type:Boolean,default:!1},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{children(){return this.node.getVisibleChildren()||[]}},methods:{factoryInit(s){return s instanceof se.ContainerBox?"q-widget-box-container":s instanceof se.ContainerColumn?"q-widget-column-container":s instanceof se.ContainerHeaderSticky?"q-widget-header-sticky-container":s instanceof se.ContainerRow?"q-widget-row-container":""},getClass(s){return s.css||""},getKey(s,r){return`${s}-${r}`},onEvent(s){this.$emit("onEvent",s)},onElementCreated(){this.node.isCreated&&this.$emit("onElementCreated")}}};function Gc(s,r,i,a,f,u){return p.openBlock(),p.createBlock(p.resolveDynamicComponent(u.factoryInit(i.node)),{class:p.normalizeClass(u.getClass(i.node)),controllerReady:i.controllerReady,getKey:u.getKey,node:i.node,loadingCount:i.loadingCount,onOnEvent:u.onEvent,onOnElementCreated:u.onElementCreated},null,40,["class","controllerReady","getKey","node","loadingCount","onOnEvent","onOnElementCreated"])}const zc=Object.freeze(Object.defineProperty({__proto__:null,default:ie(Qc,[["render",Gc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Containers/Container.vue"]])},Symbol.toStringTag,{value:"Module"})),Yc={name:"q-widget-elements-adapters-q-button",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],computed:{$button(){return this.$config.button||{}},$config(){return this.element.getConfig()},$event(){return this.$button.event||"onButtonClick"},$url(){return this.$button.url||""},button(){return{...this.$button,url:this.url}},helpers(){return this.element.controllerHelpers||{}},url(){const s=this.$config.patternMatch||/\$\{(.+?)\}/g,{convertString:r}=this.helpers.qUtilities;return r(this.$url,s,this.state)},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(s){return s.css||""},onClick(s){const r={eventName:this.$event,payload:s};this.$emit("onEvent",r)}}},Zc={key:1};function Xc(s,r,i,a,f,u){const g=p.resolveComponent("q-button",!0);return p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["q-widget-elements-adapters-q-button q-widget-adapters-q-button __element __adapter __button __flex",u.getClass(i.element)])},[u.isReady?(p.openBlock(),p.createBlock(g,{key:0,class:"q-button",button:u.button,onClick:u.onClick,onOnChange:u.onClick,onUpload:u.onClick},null,8,["button","onClick","onOnChange","onUpload"])):p.createCommentVNode("v-if",!0),u.isReady?p.createCommentVNode("v-if",!0):(p.openBlock(),p.createElementBlock("div",Zc,r[0]||(r[0]=[p.createElementVNode("div",{class:"button __loading-box"},[p.createElementVNode("div",{class:"skeleton"},[p.createElementVNode("div",{class:"skeleton__tr"},[p.createElementVNode("div",{class:"skeleton__td"})])])],-1)])))],2)}const Jc=ie(Yc,[["render",Xc],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QButton.vue"]]),jc={name:"q-widget-elements-adapters-q-form",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{formErrors:[],formValue:null,initPageKey:"",isFormReady:!1}},computed:{$buttons(){return this.$config.buttons||[]},$config(){return this.element.getConfig()},$disabledForm(){return this.$config.disabledForm||!1},$eventName(){return this.$config.eventName||{}},$formCss(){return this.$config.css||{}},$formHandler(){return this.$config.formHandler},$layout(){return this.$config.layout},$previewForm(){return this.$config.previewForm||!1},axios(){return this.state.axios},elementHandlers(){return this.element.getHandlers()},customizer(){return this.element.getFormCustomizer()},displayLayout(){return this.getLayout()},formData(){return this.state.formData},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady},pageKey(){return this.state.pageKey||this.initPageKey||""}},created(){this.controllerReady&&this.init()},methods:{init(){this.formValue=Wr.cloneDeep(this.formData),this.isFormReady=!0},getClass(s){return s.css||""},getLayout(){if(!this.$layout)return null;const{NodeHelper:s}=this.helpers.qForm,{convertString:r,getValidation:i}=this.helpers.qUtilities;return tf({config:this.$config,convertString:r,getValidation:i,layout:this.$layout,NodeHelper:s,state:this.state})},onChange(s){const{node:r}=s;this.formErrors=[];const i=r.save({errors:this.formErrors}),a=Wr.mergeWith(this.formValue,i,this.customizer),u={eventName:this.$eventName.onFormChange||"onFormChange",payload:{...s,formData:a,errors:this.formErrors}};this.$emit("onEvent",u)},onClick(s){const{value:r,event:i}=s,a=Wr.mergeWith(this.formValue,r,this.customizer),f={eventName:i,payload:{...s,errors:this.formErrors,formData:a}};this.$emit("onEvent",f)},onCreated(s){const{pageKey:r,node:i}=s;this.initPageKey=r;const{afterSave:a}=this.elementHandlers;typeof a=="function"&&i.subscribe("afterSave",a({node:i,state:this.state})),this.formErrors=[],i.save({errors:this.formErrors}),this.element.onCreated({component:this,payload:{...s,formErrors:this.formErrors,formNode:i,pageKey:r}}),this.$emit("onCreated")}}};function ef(s,r,i,a){const f=/['"]\$\{(.+?)\}['"]/g;return JSON.parse(a(JSON.stringify(s),f,i))}function tf({config:s={},convertString:r,getValidation:i,layout:a,NodeHelper:f,state:u}){const g=nf({config:s,getValidation:i,layout:a,NodeHelper:f,state:u});return ef(g,s,u,r)}function nf({config:s={},getValidation:r,layout:i,NodeHelper:a,state:f}){let u=i;const{updateLayoutConfigs:g=[]}=s;return typeof a.updateNode=="function"&&g.forEach(w=>{const{key:x,value:S,type:R,restriction:B}=w;r({rule:B,data:f})&&(u=a.updateNode({keys:x.split("."),value:S,layout:u,type:R}))}),u}const rf={key:1};function sf(s,r,i,a,f,u){const g=p.resolveComponent("q-form",!0);return p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["q-widget-elements-adapters-q-form q-widget-adapters-q-form __element __adapter __form",u.getClass(i.element)])},[u.isReady&&f.isFormReady&&u.displayLayout?(p.openBlock(),p.createBlock(g,{key:0,axios:u.axios,buttons:u.$buttons,css:u.$formCss,disabledForm:u.$disabledForm,formHandler:u.$formHandler,layout:u.displayLayout,pageKey:u.pageKey,previewForm:u.$previewForm,value:f.formValue,onOnClick:u.onClick,onOnChange:u.onChange,onOnCreated:u.onCreated},null,8,["axios","buttons","css","disabledForm","formHandler","layout","pageKey","previewForm","value","onOnClick","onOnChange","onOnCreated"])):p.createCommentVNode("v-if",!0),u.isReady?p.createCommentVNode("v-if",!0):(p.openBlock(),p.createElementBlock("div",rf,r[0]||(r[0]=[p.createStaticVNode('<div class="__loading-box"><div class="skeleton"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div></div></div></div>',1)])))],2)}const of=ie(jc,[["render",sf],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QForm.vue"]]),lf={name:"q-widget-elements-adapters-q-grid",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{itemsData:[]}},computed:{$cellHandler(){return this.$config.cellHandler},$classes(){return this.$config.classes},$config(){return this.element.getConfig()},$converter(){return this.$config.converter},$eventName(){return this.$config.eventName||{}},$fillLastRow(){return this.$config.fillLastRow||!1},$gridCss(){return this.$config.css||""},$placeholder(){return this.$config.placeholder||null},$urlDelegate(){return this.$config.urlDelegate||""},gridItems(){return this.state.gridItems},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady},layout(){return this.$config.layout}},created(){this.controllerReady&&this.init()},methods:{init(){this.itemsData=this.gridItems.map(this.$converter),this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(s){return s.css||""},onClickGridItem(s){const i={eventName:this.$eventName.onClickGridItem||"onClickGridItem",payload:s};this.$emit("onEvent",i)},onButtonClick(s){const i={eventName:this.$eventName.onClick||"onClick",payload:s};this.$emit("onEvent",i)}}},af={key:1};function uf(s,r,i,a,f,u){const g=p.resolveComponent("q-grid",!0);return p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["q-widget-elements-adapters-q-grid q-widget-adapters-q-grid __element __adapter __grid",u.getClass(i.element)])},[u.isReady?(p.openBlock(),p.createBlock(g,{key:0,cellHandler:u.$cellHandler,classes:u.$classes,css:u.$gridCss,fillLastRow:u.$fillLastRow,items:f.itemsData,layout:u.layout,placeholder:u.$placeholder,urlDelegate:u.$urlDelegate,onOnClick:u.onButtonClick,onOnClickGridItem:u.onClickGridItem},null,8,["cellHandler","classes","css","fillLastRow","items","layout","placeholder","urlDelegate","onOnClick","onOnClickGridItem"])):p.createCommentVNode("v-if",!0),u.isReady?p.createCommentVNode("v-if",!0):(p.openBlock(),p.createElementBlock("div",af," Loading "))],2)}const cf=ie(lf,[["render",uf],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QGrid.vue"]]),ff={name:"q-widget-elements-adapters-q-html",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated"],computed:{$config(){return this.element.getConfig()||{}},$html(){const s=this.$config.patternMatch||/\$\{(.+?)\}/g,{convertString:r}=this.helpers.qUtilities;return r(this.$config.html,s,this.state)},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(s){return s.css||""}}},df=["innerHTML"],hf={key:1};function gf(s,r,i,a,f,u){return p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["q-widget-elements-adapters-q-html q-widget-adapters-q-html __element __adapter __html",u.getClass(i.element)])},[u.$html&&u.isReady?(p.openBlock(),p.createElementBlock("div",{key:0,class:"__html",innerHTML:u.$html},null,8,df)):p.createCommentVNode("v-if",!0),u.isReady?p.createCommentVNode("v-if",!0):(p.openBlock(),p.createElementBlock("div",hf,[p.createCommentVNode(" loading ")]))],2)}const mf=ie(ff,[["render",gf],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QHtml.vue"]]),pf={name:"q-widget-elements-adapters-q-import",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated"],data(){return{elementState:{}}},computed:{$additionalListHeaders(){return this.$config.additionalListHeaders||[]},$config(){return this.element.getConfig()},$label(){return this.$config.label},$templateUrl(){return this.$config.templateUrl},elementHandlers(){return this.element.getHandlers()},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},formatRowData(s){return this.elementHandlers.formatRowData(s)},getClass(s){return s.css||""},setElementState(s){this.elementState={...this.elementState,...s}},showError(s={}){const{payload:r}=s;return this.elementHandlers.showError({payload:r,state:{...this.state,...this.elementState}})},showSuccess({payload:s}){return this.elementHandlers.showSuccess({payload:s,state:{...this.state,...this.elementState}})},validationHandler({payload:s}){return this.elementHandlers.validationHandler({payload:s,state:this.state,setElementState:this.setElementState})}}},_f={key:1};function yf(s,r,i,a,f,u){const g=p.resolveComponent("q-import",!0);return p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["q-widget-elements-adapters-q-import q-widget-adapters-q-import __element __adapter",u.getClass(i.element)])},[u.isReady?(p.openBlock(),p.createBlock(g,{key:0,additionalListHeaders:u.$additionalListHeaders,formatRowData:u.formatRowData,label:u.$label,showError:u.showError,showSuccess:u.showSuccess,templateUrl:u.$templateUrl,validationHandler:u.validationHandler},null,8,["additionalListHeaders","formatRowData","label","showError","showSuccess","templateUrl","validationHandler"])):p.createCommentVNode("v-if",!0),u.isReady?p.createCommentVNode("v-if",!0):(p.openBlock(),p.createElementBlock("div",_f,r[0]||(r[0]=[p.createElementVNode("div",{class:"import __loading-box"},[p.createElementVNode("div",{class:"skeleton"},[p.createElementVNode("div",{class:"skeleton__tr"},[p.createElementVNode("div",{class:"skeleton__td"})])])],-1)])))],2)}const vf=ie(pf,[["render",yf],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QImport.vue"]]),wf={name:"q-widget-elements-adapters-q-label",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated"],computed:{$config(){return this.element.getConfig()},$label(){return this.$config.label||""},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(s){return s.css||""}}},Cf={key:0},Ef={key:1};function bf(s,r,i,a,f,u){return p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["q-widget-elements-adapters-q-label q-widget-adapters-q-label __element __label",u.getClass(i.element)])},[u.$label&&u.isReady?(p.openBlock(),p.createElementBlock("h2",Cf,p.toDisplayString(u.$label),1)):p.createCommentVNode("v-if",!0),u.isReady?p.createCommentVNode("v-if",!0):(p.openBlock(),p.createElementBlock("div",Ef))],2)}const Af=ie(wf,[["render",bf],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QLabel.vue"]]),xf={name:"q-widget-elements-adapters-q-list",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{listRows:[],paginatorLayout:null,ready:!1}},computed:{$config(){return this.element.getConfig()},$converter(){return this.$config.converter},$css(){return this.$config.css},$eventName(){return this.$config.eventName||{}},$expansion(){return this.$config.expansion||[]},$listBulkAction(){return this.$config.bulkAction||{}},$listHeaders(){return this.$config.headers||[]},$listSortBys(){return this.$config.listSortBys||[]},$listShowFooter(){return this.$config.listShowFooter||!1},$listStyle(){return this.$config.listStyle||"q-list-table"},$noDataMessage(){return this.$config.noDataMessage||""},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady},listSortKeys(){return this.state.qSorterKeys||[]},rows(){return this.state.rows||[]}},created(){this.controllerReady&&this.init()},methods:{init(){this.listRows=this.rows.map(this.$converter),this.element.onCreated({component:this}),this.$emit("onCreated"),this.ready=!0},converter(s){return s},getClass(s){return s.css||""},onClickList(s){const{action:r={},qRow:i,row:a}=s,{qListButtonType:f=""}=r,u={eventName:f||"onListClick",payload:s};this.$emit("onEvent",u)},onClickListBulk(s){const{action:r,qRows:i,rows:a}=s,{qListButtonType:f}=r,u={eventName:f||"onListClickBulk",payload:s};this.$emit("onEvent",u)},onListHeaderClick(s){const{key:r}=s.header;if(to(r,this.$listSortBys)){const a=Sf(this.listSortKeys,r),f=Rf(this.$listSortBys,a),u={eventName:this.$eventName.onListClickHeader||"onListClickHeader",payload:{qSorterKeys:a,qSorter:f}};this.$emit("onEvent",u)}}}};function to(s,r){return s?r.find(i=>{const{key:a}=i;return s===a}):null}function Sf(s,r){let i=!1;const a=s.map(f=>{const{by:u,direction:g}=f;if(r===u){i=!0;const w=typeof g<"u"?Number(g)===1?-1:Number(g)===-1?0:1:1;return{...f,direction:w}}return f});return i?a.filter(f=>f.direction!==0):[...s,{by:r,direction:1}]}function Rf(s,r){return r.reduce((i,a)=>{const{by:f,direction:u}=a,g=to(f,s),{value:w=[]}=g;if(!g)return i;const x=w.map(S=>({...S,direction:u}));return i.push(...x),i},[])}const Of={key:1};function kf(s,r,i,a,f,u){const g=p.resolveComponent("q-list",!0);return p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["q-widget-elements-adapters-q-list q-widget-adapters-q-list __element __adapter __list",u.getClass(i.element)])},[u.isReady&&f.ready?(p.openBlock(),p.createBlock(g,{key:0,bulkAction:u.$listBulkAction,css:u.$css,expansion:u.$expansion,headers:u.$listHeaders,listStyle:u.$listStyle,noDataMessage:u.$noDataMessage,rows:f.listRows,showFooter:u.$listShowFooter,sortBys:u.$listSortBys,sortStatus:u.listSortKeys,onClick:u.onClickList,onOnClickBulk:u.onClickListBulk,onOnListHeaderClick:u.onListHeaderClick},null,8,["bulkAction","css","expansion","headers","listStyle","noDataMessage","rows","showFooter","sortBys","sortStatus","onClick","onOnClickBulk","onOnListHeaderClick"])):p.createCommentVNode("v-if",!0),u.isReady?p.createCommentVNode("v-if",!0):(p.openBlock(),p.createElementBlock("div",Of,r[0]||(r[0]=[p.createStaticVNode('<div class="__loading-box"><div class="skeleton"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__hr"></div><div class="skeleton__section skeleton__section--table"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div></div></div></div>',1)])))],2)}const $f=ie(xf,[["render",kf],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QList.vue"]]),qf={name:"q-widget-elements-adapters-q-paginator",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{isPaginator:!1,paginatorLayout:null}},computed:{$config(){return this.element.getConfig()},$controlLabel(){return this.$config.controlLabel},$eventName(){return this.$config.eventName||{}},$paginatorLayout(){return this.$config.layout},$paginatorSizeOptions(){return this.$paginatorLayout.pageSizeOptions||[]},currentPage(){return this.state.currentPage},currentPageSize(){return this.state.currentPageSize},currentPageSizeOptionsIndex(){return this.$paginatorSizeOptions.indexOf(this.currentPageSize)},initPage(){return this.currentPage>=0?this.currentPage:this.$paginatorLayout.initPage},isReady(){return this.loadingCount<=0&&this.controllerReady},pageSizeOptionsIndex(){return this.currentPageSizeOptionsIndex>=0?this.currentPageSizeOptionsIndex:(this.onChangeRecPerPage(this.$paginatorSizeOptions[this.$paginatorLayout.pageSizeOptionsIdx],this.initPage),this.$paginatorLayout.pageSizeOptionsIndex)},totalRecords(){return this.state.totalRecords}},created(){this.controllerReady&&this.init()},mounted(){},methods:{init(){this.paginatorLayout={...this.$paginatorLayout,initPage:this.initPage,pageSizeOptionsIndex:this.pageSizeOptionsIndex},this.isPaginator=!0,this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(s){return s.css||""},onChangePageIdx(s){if(s!==this.currentPage){const i={eventName:this.$eventName.onChangePageIdx||"onChangePageIdx",payload:{currentPage:s}};this.$emit("onEvent",i)}},onChangeRecPerPage(s,r){const a={eventName:this.$eventName.onChangeRecPerPage||"onChangeRecPerPage",payload:{currentPageSize:s,currentPage:r}};this.$emit("onEvent",a)}}},Bf={key:1};function Lf(s,r,i,a,f,u){const g=p.resolveComponent("q-paginator",!0);return p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["q-widget-elements-adapters-q-paginator q-widget-adapters-q-paginator __element __adapter __paginator",u.getClass(i.element)])},[f.isPaginator&&u.isReady?(p.openBlock(),p.createBlock(g,{key:0,controlLabel:u.$controlLabel,layout:f.paginatorLayout,total:u.totalRecords,onChangeCurrentPage:u.onChangePageIdx,onChangePageSize:u.onChangeRecPerPage},null,8,["controlLabel","layout","total","onChangeCurrentPage","onChangePageSize"])):p.createCommentVNode("v-if",!0),u.isReady?p.createCommentVNode("v-if",!0):(p.openBlock(),p.createElementBlock("div",Bf,r[0]||(r[0]=[p.createStaticVNode('<div class="paginator __loading-box"><div class="skeleton"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div></div></div>',1)])))],2)}const Nf=ie(qf,[["render",Lf],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QPaginator.vue"]]),Tf={name:"q-widget-elements-adapters-q-scheduler",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],computed:{$allCellSelectable(){return this.$config.allCellSelectable},$bookings(){return this.state.bookings},$canSelectMoreThanOne(){return this.$config.canSelectMoreThanOne},$config(){return this.element.getConfig()},$emptyMessage(){return this.$config.emptyMessage},$eventBlockTemplate(){return this.$config.eventBlockTemplate},$eventsObj(){return this.state.schedulerEventsObj},$headerActions(){return this.$config.headerActions},$headers(){return this.state.schedulerHeaders},$labelTemplates(){return this.$config.labelTemplates},$layoutConfig(){return this.$config.layoutConfig},$showActions(){return this.$config.showActions},$showSelectWhloeDayAction(){return this.$config.showSelectWhloeDayAction},$tempEventConfig(){return this.$config.tempEventConfig},$tempEvents(){return this.state.tempEvents},$timeSlotsByDay(){return this.state.timeSlotsByDay},helpers(){return this.element.controllerHelpers||{}},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.element.onCreated({component:this}),this.$emit("onCreated")},getClass(s){return s.css||""},onChangeDate(s){const r={eventName:"onSchedulerChangeDate",payload:s};this.$emit("onEvent",r)},onClickBooking(s){const r={eventName:"onSchedulerClickBooking",payload:s};this.$emit("onEvent",r)},onClickHeaderAction(s){const r={eventName:"onSchedulerClickHeaderAction",payload:s};this.$emit("onEvent",r)},onClickNextPage(s){const r={eventName:"onSchedulerClickNextPage",payload:s};this.$emit("onEvent",r)},onClickPreviousPage(s){const r={eventName:"onSchedulerClickPreviousPage",payload:s};this.$emit("onEvent",r)},onDeleteTempEvent(s){const r={eventName:"onSchedulerDeleteTempEvent",payload:s};this.$emit("onEvent",r)},selectTime(s){const r={eventName:"onSchedulerSelectTime",payload:s};this.$emit("onEvent",r)}}},Hf={key:1};function If(s,r,i,a,f,u){const g=p.resolveComponent("q-scheduler",!0);return p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["q-widget-elements-adapters-q-scheduler q-widget-adapters-q-scheduler __element __adapter __flex",u.getClass(i.element)])},[u.isReady?(p.openBlock(),p.createBlock(g,{key:0,class:"q-scheduler",allCellSelectable:u.$allCellSelectable,bookings:u.$bookings,canSelectMoreThanOne:u.$canSelectMoreThanOne,emptyMessage:u.$emptyMessage,eventBlockTemplate:u.$eventBlockTemplate,eventsObj:u.$eventsObj,headerActions:u.$headerActions,headers:u.$headers,labelTemplates:u.$labelTemplates,layoutConfig:u.$layoutConfig,showActions:u.$showActions,showSelectWhloeDayAction:u.$showSelectWhloeDayAction,tempEventConfig:u.$tempEventConfig,tempEvents:u.$tempEvents,timeSlotsByDay:u.$timeSlotsByDay,onOnDeleteTempEvent:u.onDeleteTempEvent,onSelectTime:u.selectTime,onOnClickBooking:u.onClickBooking,onOnClickHeaderAction:u.onClickHeaderAction,onOnChangeDate:u.onChangeDate,onOnClickPreviousPage:u.onClickPreviousPage,onOnClickNextPage:u.onClickNextPage},null,8,["allCellSelectable","bookings","canSelectMoreThanOne","emptyMessage","eventBlockTemplate","eventsObj","headerActions","headers","labelTemplates","layoutConfig","showActions","showSelectWhloeDayAction","tempEventConfig","tempEvents","timeSlotsByDay","onOnDeleteTempEvent","onSelectTime","onOnClickBooking","onOnClickHeaderAction","onOnChangeDate","onOnClickPreviousPage","onOnClickNextPage"])):p.createCommentVNode("v-if",!0),u.isReady?p.createCommentVNode("v-if",!0):(p.openBlock(),p.createElementBlock("div",Hf,r[0]||(r[0]=[p.createElementVNode("div",{class:"__loading-box"},[p.createElementVNode("div",{class:"skeleton"},[p.createElementVNode("div",{class:"skeleton__tr"},[p.createElementVNode("div",{class:"skeleton__td"})])])],-1)])))],2)}const Ff=ie(Tf,[["render",If],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QScheduler.vue"]]),Df={name:"q-widget-elements-adapters-q-tab",props:{controllerReady:{type:Boolean,default:!1},element:{type:Object,default:()=>({})},elementName:{type:String,default:""},loadingCount:{type:Number,default:0},state:{type:Object,default:()=>({})}},emits:["onCreated","onEvent"],data(){return{active:{},renderKey:0,tabLayout:[]}},computed:{$config(){return this.element.getConfig()},$eventName(){return this.$config.eventName||{}},$tabLayout(){return this.$config.layout||[]},activeKey(){return this.active.key},isReady(){return this.loadingCount<=0&&this.controllerReady}},created(){this.controllerReady&&this.init()},methods:{init(){this.tabLayout=[...this.$tabLayout],this.active=this.state.active||this.tabLayout[0]||{},this.element.onCreated({component:this,payload:{tabLayout:this.tabLayout}}),this.$emit("onCreated")},getClass(s){return s.css||""},onChangeTab(s){const i={eventName:this.$eventName.onChangeTab||"onTabChange",payload:{active:s}};this.$emit("onEvent",i)}}},Pf={key:0,class:"__tabs __flex"},Mf=["href"],Wf=["onClick"],Uf={key:1};function Vf(s,r,i,a,f,u){return p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["q-widget-elements-adapters-q-tab q-widget-adapters-q-tab __element __adapter",u.getClass(i.element)])},[u.isReady?(p.openBlock(),p.createElementBlock("div",Pf,[(p.openBlock(!0),p.createElementBlock(p.Fragment,null,p.renderList(f.tabLayout,(g,w)=>(p.openBlock(),p.createElementBlock("div",{key:w,class:p.normalizeClass(["__pointer __tab",u.activeKey===g.key?"__active":""])},[g.url?(p.openBlock(),p.createElementBlock("a",{key:0,href:g.url},p.toDisplayString(g.label)+p.toDisplayString(Number.isNaN(Number(g.total))?"":`(${Number(g.total)})`),9,Mf)):p.createCommentVNode("v-if",!0),g.url?p.createCommentVNode("v-if",!0):(p.openBlock(),p.createElementBlock("div",{key:1,onClick:x=>u.onChangeTab(g)},p.toDisplayString(g.label)+p.toDisplayString(Number.isNaN(Number(g.total))?"":`(${Number(g.total)})`),9,Wf))],2))),128))])):p.createCommentVNode("v-if",!0),u.isReady?p.createCommentVNode("v-if",!0):(p.openBlock(),p.createElementBlock("div",Uf,r[0]||(r[0]=[p.createStaticVNode('<div class="__loading-box"><div class="skeleton"><div class="skeleton__tr"><div class="skeleton__td"></div><div class="skeleton__td"></div><div class="skeleton__td"></div></div></div></div>',1)])))],2)}const Kf={name:"q-widget-elements-element",components:{QWidgetQButtonElement:Jc,QWidgetQFormElement:of,QWidgetQGridElement:cf,QWidgetQHtmlElement:mf,QWidgetQImportElement:vf,QWidgetQLabelElement:Af,QWidgetQListElement:$f,QWidgetQPaginatorElement:Nf,QWidgetQSchedulerElement:Ff,QWidgetQTabElement:ie(Df,[["render",Vf],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Adapters/QTab.vue"]])},props:{controllerReady:{type:Boolean,default:!1},node:{type:Object,default:()=>({})},loadingCount:{type:Number,default:0}},emits:["onEvent","onElementCreated"],computed:{elementName(){return this.element.getElementName()},element(){return this.node},state(){return this.element.getState()}},methods:{factoryInit(s){return s instanceof se.ElementQButton?"q-widget-q-button-element":s instanceof se.ElementQForm?"q-widget-q-form-element":s instanceof se.ElementQGrid?"q-widget-q-grid-element":s instanceof se.ElementQHtml?"q-widget-q-html-element":s instanceof se.ElementQImport?"q-widget-q-import-element":s instanceof se.ElementQLabel?"q-widget-q-label-element":s instanceof se.ElementQList?"q-widget-q-list-element":s instanceof se.ElementQPaginator?"q-widget-q-paginator-element":s instanceof se.ElementQScheduler?"q-widget-q-scheduler-element":s instanceof se.ElementQTab?"q-widget-q-tab-element":""},onEvent(s){this.$emit("onEvent",{...s,element:this.element})},onElementCreated(){this.element.isCreated&&this.$emit("onElementCreated")}}};function Qf(s,r,i,a,f,u){return p.openBlock(),p.createBlock(p.resolveDynamicComponent(u.factoryInit(i.node)),{controllerReady:i.controllerReady,element:i.node,elementName:u.elementName,loadingCount:i.loadingCount,state:u.state,onOnCreated:u.onElementCreated,onOnEvent:u.onEvent},null,40,["controllerReady","element","elementName","loadingCount","state","onOnCreated","onOnEvent"])}const Gf=Object.freeze(Object.defineProperty({__proto__:null,default:ie(Kf,[["render",Qf],["__file","/Users/questwork/Developer/qw.vue.q.widget/src/components/Elements/Element.vue"]])},Symbol.toStringTag,{value:"Module"}));Ct.QWidget=Tn,Object.defineProperty(Ct,Symbol.toStringTag,{value:"Module"}); return Ct; });
@@ -1,5 +1,5 @@
1
1
  Name: @questwork/q-utilities
2
- Version: 0.1.0
2
+ Version: 0.1.12
3
3
  License: MIT
4
4
  Private: false
5
5
  Description: Questwork QUtilities
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@questwork/vue-q-widget-vue3",
3
- "version": "3.1.6",
3
+ "version": "3.1.7",
4
4
  "description": "Questwork vue component Sample",
5
5
  "exports": {
6
6
  ".": {
@@ -25,7 +25,7 @@
25
25
  "@questwork/vue-q-list-vue3": "^3.1.1",
26
26
  "@questwork/vue-q-modal-vue3": "^3.1.0",
27
27
  "@questwork/vue-q-paginator-vue3": "^3.1.0",
28
- "@questwork/vue-q-scheduler": "3.1.4",
28
+ "@questwork/vue-q-scheduler": "^3.1.5",
29
29
  "@storybook/addon-essentials": "^8.5.3",
30
30
  "@storybook/addon-links": "^8.4.7",
31
31
  "@storybook/vue3": "^8.4.7",
@@ -48,7 +48,7 @@
48
48
  "node": ">=10.0.0"
49
49
  },
50
50
  "dependencies": {
51
- "@questwork/q-utilities": "^0.1.0",
51
+ "@questwork/q-utilities": "^0.1.12",
52
52
  "lodash": "^4.17.21"
53
53
  },
54
54
  "scripts": {