@qikdev/vue-ui 0.2.39 → 0.2.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib.es.js +17 -7
- package/dist/lib.es.js.map +1 -1
- package/dist/lib.umd.js +2 -2
- package/dist/lib.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/lib.umd.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var NB=Object.defineProperty,TB=Object.defineProperties;var OB=Object.getOwnPropertyDescriptors;var lr=Object.getOwnPropertySymbols;var ws=Object.prototype.hasOwnProperty,Vs=Object.prototype.propertyIsEnumerable;var Cs=(x,t,de)=>t in x?NB(x,t,{enumerable:!0,configurable:!0,writable:!0,value:de}):x[t]=de,B=(x,t)=>{for(var de in t||(t={}))ws.call(t,de)&&Cs(x,de,t[de]);if(lr)for(var de of lr(t))Vs.call(t,de)&&Cs(x,de,t[de]);return x},ke=(x,t)=>TB(x,OB(t));var ko=(x,t)=>{var de={};for(var Ae in x)ws.call(x,Ae)&&t.indexOf(Ae)<0&&(de[Ae]=x[Ae]);if(x!=null&&lr)for(var Ae of lr(x))t.indexOf(Ae)<0&&Vs.call(x,Ae)&&(de[Ae]=x[Ae]);return de};(function(x,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue"),require("@qikdev/sdk")):typeof define=="function"&&define.amd?define(["exports","vue","@qikdev/sdk"],t):(x=typeof globalThis!="undefined"?globalThis:x||self,t(x["@qikdev/vue-ui"]={},x.Vue,x["@qikdev/sdk"]))})(this,function(x,t,de){"use strict";const Ae="0.2.39";var DB="",_=(e,n)=>{const r=e.__vccOpts||e;for(const[i,l]of n)r[i]=l;return r};const Es={},Bs={class:"flex-column"};function Ss(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",Bs,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var bo=_(Es,[["render",Ss],["__scopeId","data-v-203ea86f"]]),AB="";const Ns={},Ts={class:"flex-column-body"};function Os(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",Ts,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var xo=_(Ns,[["render",Os],["__scopeId","data-v-64850355"]]),MB="";const Ds={},As={class:"flex-column-header"};function Ms(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",As,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var Co=_(Ds,[["render",Ms],["__scopeId","data-v-10b28f00"]]),FB="";const Fs={},Is={class:"flex-column-footer"};function $s(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",Is,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var wo=_(Fs,[["render",$s],["__scopeId","data-v-68216a72"]]),IB="";const Ls={},Us={class:"flex-cell"};function Ps(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",Us,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var Vo=_(Ls,[["render",Ps],["__scopeId","data-v-644bb279"]]),$B="";const js={},Rs={class:"flex-row"};function zs(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",Rs,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var Eo=_(js,[["render",zs],["__scopeId","data-v-5b76ad1f"]]),LB="";const qs={},Hs={class:"flex-spacer"};function Gs(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",Hs)}var Bo=_(qs,[["render",Gs],["__scopeId","data-v-35b15579"]]),UB="";const Ws={},Ks={class:"panel"};function Zs(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",Ks,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var So=_(Ws,[["render",Zs],["__scopeId","data-v-50ae77fc"]]),PB="";const Ys={},Xs={class:"panel-body"};function Js(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",Xs,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var No=_(Ys,[["render",Js],["__scopeId","data-v-c82dca76"]]),jB="";const Qs={},vs={class:"panel-header"};function ec(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",vs,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var To=_(Qs,[["render",ec],["__scopeId","data-v-13bf11da"]]),RB="";const tc={},nc={class:"panel-footer"};function rc(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",nc,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var Oo=_(tc,[["render",rc],["__scopeId","data-v-b4f4786a"]]),zB="";const oc={props:{vertical:{type:Boolean}},data(){return{activeIndex:0}},methods:{select(e){this.activeIndex=e}},computed:{tabs(){return this.$slots.default().map(function(r){if(r.props.enabled!==!1)return r}).filter(Boolean)}}},ic=["onClick"],lc=["onClick"];function ac(e,n,r,i,l,o){const a=t.resolveComponent("flex-body"),s=t.resolveComponent("flex-column"),c=t.resolveComponent("flex-row"),d=t.resolveComponent("flex-header");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-tabset",{vertical:r.vertical,horizontal:!r.vertical}])},[r.vertical?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(s,{class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.tabs,(u,m)=>(t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass({active:m===l.activeIndex}),key:`tab-link-${u.props.heading}`,onClick:f=>o.select(m)},t.toDisplayString(u.props.heading),11,ic))),128))]),_:1})]),_:1}),t.createVNode(s,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.tabs,(u,m)=>t.withDirectives((t.openBlock(),t.createBlock(s,{key:`tab-panel-${u.props.heading}`},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u)))]),_:2},1024)),[[t.vShow,m===l.activeIndex]])),128))]),_:1})],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(d,{class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.tabs,(u,m)=>(t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass({active:m===l.activeIndex}),key:`tab-link-${u.props.heading}`,onClick:f=>o.select(m)},t.toDisplayString(u.props.heading),11,lc))),128))]),_:1})]),_:1}),t.createVNode(s,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.tabs,(u,m)=>t.withDirectives((t.openBlock(),t.createBlock(s,{key:`tab-panel-${u.props.heading}`},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u)))]),_:2},1024)),[[t.vShow,m===l.activeIndex]])),128))]),_:1})],64))],2)}var Do=_(oc,[["render",ac],["__scopeId","data-v-2a0551fe"]]);const sc={props:{heading:{type:String,required:!0},enabled:{type:Boolean,default:!0}},data(){return{isActive:!1}},computed:{active:{get(){return this.isActive},set(e){this.isActive=e}}}};function cc(e,n,r,i,l,o){const a=t.resolveComponent("flex-column");return t.openBlock(),t.createBlock(a,null,{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3})}var Ao=_(sc,[["render",cc]]),yn=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},dc=Array.isArray,Rt=dc,uc=typeof yn=="object"&&yn&&yn.Object===Object&&yn,Mo=uc,mc=Mo,fc=typeof self=="object"&&self&&self.Object===Object&&self,pc=mc||fc||Function("return this")(),zt=pc,hc=zt,yc=hc.Symbol,ar=yc,Fo=ar,Io=Object.prototype,gc=Io.hasOwnProperty,_c=Io.toString,qt=Fo?Fo.toStringTag:void 0;function kc(e){var n=gc.call(e,qt),r=e[qt];try{e[qt]=void 0;var i=!0}catch{}var l=_c.call(e);return i&&(n?e[qt]=r:delete e[qt]),l}var bc=kc,xc=Object.prototype,Cc=xc.toString;function wc(e){return Cc.call(e)}var Vc=wc,$o=ar,Ec=bc,Bc=Vc,Sc="[object Null]",Nc="[object Undefined]",Lo=$o?$o.toStringTag:void 0;function Tc(e){return e==null?e===void 0?Nc:Sc:Lo&&Lo in Object(e)?Ec(e):Bc(e)}var Ht=Tc;function Oc(e){return e!=null&&typeof e=="object"}var Gt=Oc,Dc=Ht,Ac=Gt,Mc="[object Symbol]";function Fc(e){return typeof e=="symbol"||Ac(e)&&Dc(e)==Mc}var gn=Fc,Ic=Rt,$c=gn,Lc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Uc=/^\w*$/;function Pc(e,n){if(Ic(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||$c(e)?!0:Uc.test(e)||!Lc.test(e)||n!=null&&e in Object(n)}var jc=Pc;function Rc(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var _n=Rc,zc=Ht,qc=_n,Hc="[object AsyncFunction]",Gc="[object Function]",Wc="[object GeneratorFunction]",Kc="[object Proxy]";function Zc(e){if(!qc(e))return!1;var n=zc(e);return n==Gc||n==Wc||n==Hc||n==Kc}var Uo=Zc,Yc=zt,Xc=Yc["__core-js_shared__"],Jc=Xc,sr=Jc,Po=function(){var e=/[^.]+$/.exec(sr&&sr.keys&&sr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Qc(e){return!!Po&&Po in e}var vc=Qc,ed=Function.prototype,td=ed.toString;function nd(e){if(e!=null){try{return td.call(e)}catch{}try{return e+""}catch{}}return""}var rd=nd,od=Uo,id=vc,ld=_n,ad=rd,sd=/[\\^$.*+?()[\]{}|]/g,cd=/^\[object .+?Constructor\]$/,dd=Function.prototype,ud=Object.prototype,md=dd.toString,fd=ud.hasOwnProperty,pd=RegExp("^"+md.call(fd).replace(sd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function hd(e){if(!ld(e)||id(e))return!1;var n=od(e)?pd:cd;return n.test(ad(e))}var yd=hd;function gd(e,n){return e==null?void 0:e[n]}var _d=gd,kd=yd,bd=_d;function xd(e,n){var r=bd(e,n);return kd(r)?r:void 0}var jo=xd,Cd=jo,wd=Cd(Object,"create"),kn=wd,Ro=kn;function Vd(){this.__data__=Ro?Ro(null):{},this.size=0}var Ed=Vd;function Bd(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var Sd=Bd,Nd=kn,Td="__lodash_hash_undefined__",Od=Object.prototype,Dd=Od.hasOwnProperty;function Ad(e){var n=this.__data__;if(Nd){var r=n[e];return r===Td?void 0:r}return Dd.call(n,e)?n[e]:void 0}var Md=Ad,Fd=kn,Id=Object.prototype,$d=Id.hasOwnProperty;function Ld(e){var n=this.__data__;return Fd?n[e]!==void 0:$d.call(n,e)}var Ud=Ld,Pd=kn,jd="__lodash_hash_undefined__";function Rd(e,n){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Pd&&n===void 0?jd:n,this}var zd=Rd,qd=Ed,Hd=Sd,Gd=Md,Wd=Ud,Kd=zd;function kt(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var i=e[n];this.set(i[0],i[1])}}kt.prototype.clear=qd,kt.prototype.delete=Hd,kt.prototype.get=Gd,kt.prototype.has=Wd,kt.prototype.set=Kd;var Zd=kt;function Yd(){this.__data__=[],this.size=0}var Xd=Yd;function Jd(e,n){return e===n||e!==e&&n!==n}var Qd=Jd,vd=Qd;function eu(e,n){for(var r=e.length;r--;)if(vd(e[r][0],n))return r;return-1}var bn=eu,tu=bn,nu=Array.prototype,ru=nu.splice;function ou(e){var n=this.__data__,r=tu(n,e);if(r<0)return!1;var i=n.length-1;return r==i?n.pop():ru.call(n,r,1),--this.size,!0}var iu=ou,lu=bn;function au(e){var n=this.__data__,r=lu(n,e);return r<0?void 0:n[r][1]}var su=au,cu=bn;function du(e){return cu(this.__data__,e)>-1}var uu=du,mu=bn;function fu(e,n){var r=this.__data__,i=mu(r,e);return i<0?(++this.size,r.push([e,n])):r[i][1]=n,this}var pu=fu,hu=Xd,yu=iu,gu=su,_u=uu,ku=pu;function bt(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var i=e[n];this.set(i[0],i[1])}}bt.prototype.clear=hu,bt.prototype.delete=yu,bt.prototype.get=gu,bt.prototype.has=_u,bt.prototype.set=ku;var bu=bt,xu=jo,Cu=zt,wu=xu(Cu,"Map"),Vu=wu,zo=Zd,Eu=bu,Bu=Vu;function Su(){this.size=0,this.__data__={hash:new zo,map:new(Bu||Eu),string:new zo}}var Nu=Su;function Tu(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}var Ou=Tu,Du=Ou;function Au(e,n){var r=e.__data__;return Du(n)?r[typeof n=="string"?"string":"hash"]:r.map}var xn=Au,Mu=xn;function Fu(e){var n=Mu(this,e).delete(e);return this.size-=n?1:0,n}var Iu=Fu,$u=xn;function Lu(e){return $u(this,e).get(e)}var Uu=Lu,Pu=xn;function ju(e){return Pu(this,e).has(e)}var Ru=ju,zu=xn;function qu(e,n){var r=zu(this,e),i=r.size;return r.set(e,n),this.size+=r.size==i?0:1,this}var Hu=qu,Gu=Nu,Wu=Iu,Ku=Uu,Zu=Ru,Yu=Hu;function xt(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var i=e[n];this.set(i[0],i[1])}}xt.prototype.clear=Gu,xt.prototype.delete=Wu,xt.prototype.get=Ku,xt.prototype.has=Zu,xt.prototype.set=Yu;var Xu=xt,qo=Xu,Ju="Expected a function";function cr(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new TypeError(Ju);var r=function(){var i=arguments,l=n?n.apply(this,i):i[0],o=r.cache;if(o.has(l))return o.get(l);var a=e.apply(this,i);return r.cache=o.set(l,a)||o,a};return r.cache=new(cr.Cache||qo),r}cr.Cache=qo;var Qu=cr,vu=Qu,em=500;function tm(e){var n=vu(e,function(i){return r.size===em&&r.clear(),i}),r=n.cache;return n}var nm=tm,rm=nm,om=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,im=/\\(\\)?/g,lm=rm(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(om,function(r,i,l,o){n.push(l?o.replace(im,"$1"):i||r)}),n}),am=lm;function sm(e,n){for(var r=-1,i=e==null?0:e.length,l=Array(i);++r<i;)l[r]=n(e[r],r,e);return l}var Ho=sm,Go=ar,cm=Ho,dm=Rt,um=gn,mm=1/0,Wo=Go?Go.prototype:void 0,Ko=Wo?Wo.toString:void 0;function Zo(e){if(typeof e=="string")return e;if(dm(e))return cm(e,Zo)+"";if(um(e))return Ko?Ko.call(e):"";var n=e+"";return n=="0"&&1/e==-mm?"-0":n}var fm=Zo,pm=fm;function hm(e){return e==null?"":pm(e)}var dr=hm,ym=Rt,gm=jc,_m=am,km=dr;function bm(e,n){return ym(e)?e:gm(e,n)?[e]:_m(km(e))}var xm=bm,Cm=gn,wm=1/0;function Vm(e){if(typeof e=="string"||Cm(e))return e;var n=e+"";return n=="0"&&1/e==-wm?"-0":n}var Em=Vm,Bm=xm,Sm=Em;function Nm(e,n){n=Bm(n,e);for(var r=0,i=n.length;e!=null&&r<i;)e=e[Sm(n[r++])];return r&&r==i?e:void 0}var Tm=Nm,Om=Tm;function Dm(e,n,r){var i=e==null?void 0:Om(e,n);return i===void 0?r:i}var Cn=Dm,at={props:{column:{type:Object,required:!0},row:{type:Object,required:!0},value:{}}},qB="";const Am={mixins:[at],computed:{imageSource(){return this.value&&this.value._id?this.value:this.row},type(){var e,n;return(n=(e=this.imageSource)==null?void 0:e.meta)==null?void 0:n.type}},methods:{clicked(e){this.$sdk.dispatch("item:view",this.imageSource)}}},Mm={class:"table-image-cell"};function Fm(e,n,r,i,l,o){const a=t.resolveComponent("ux-image"),s=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",Mm,[o.type=="image"||o.type=="video"?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:n[0]||(n[0]=t.withModifiers(c=>o.clicked(e.value),["stop","prevent"])),class:"image-wrapper"},[t.createVNode(a,{item:o.imageSource,type:o.type,width:100,height:100},null,8,["item","type"])])):(t.openBlock(),t.createBlock(s,{key:1,icon:"fa-file"}))])}var Im=_(Am,[["render",Fm],["__scopeId","data-v-246a2688"]]),HB="";const $m={mixins:[at],computed:{string(){return this.amount.toFixed(2)},amount(){return Number(parseInt(this.value)/100)},credit(){return this.amount>0},debit(){return this.amount<0},empty(){return parseInt(this.value)===0},currency(){return this.column.currency||this.row.currency}}};function Lm(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-currency-cell",{credit:o.credit,empty:o.empty,debit:o.debit}])},t.toDisplayString(o.string),3)}var Um=_($m,[["render",Lm],["__scopeId","data-v-33a0b926"]]),GB="";const Pm={data(){return{processing:!1}},mixins:[at],computed:{button(){return this.column.button},type(){var e,n;return(n=(e=this.row)==null?void 0:e.meta)==null?void 0:n.type}},methods:{async clicked(){this.processing=!0,await this.button.action(this.row,this.column),this.processing=!1}}},jm={class:"table-button-cell"};function Rm(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon"),s=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("td",jm,[t.createVNode(s,{color:o.button.color,size:o.button.size,loading:l.processing,onClick:t.withModifiers(o.clicked,["stop","prevent"])},{default:t.withCtx(()=>[o.button.text?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.button.text),1)],64)):t.createCommentVNode("",!0),o.button.icon?(t.openBlock(),t.createBlock(a,{key:1,icon:o.button.icon,right:""},null,8,["icon"])):t.createCommentVNode("",!0)]),_:1},8,["color","size","loading","onClick"])])}var zm=_(Pm,[["render",Rm],["__scopeId","data-v-36768853"]]);class st extends Error{}class qm extends st{constructor(n){super(`Invalid DateTime: ${n.toMessage()}`)}}class Hm extends st{constructor(n){super(`Invalid Interval: ${n.toMessage()}`)}}class Gm extends st{constructor(n){super(`Invalid Duration: ${n.toMessage()}`)}}class Wt extends st{}class Yo extends st{constructor(n){super(`Invalid unit ${n}`)}}class Ne extends st{}class Je extends st{constructor(){super("Zone is an abstract class")}}const C="numeric",Me="short",Ve="long",ur={year:C,month:C,day:C},Xo={year:C,month:Me,day:C},Wm={year:C,month:Me,day:C,weekday:Me},Jo={year:C,month:Ve,day:C},Qo={year:C,month:Ve,day:C,weekday:Ve},vo={hour:C,minute:C},ei={hour:C,minute:C,second:C},ti={hour:C,minute:C,second:C,timeZoneName:Me},ni={hour:C,minute:C,second:C,timeZoneName:Ve},ri={hour:C,minute:C,hourCycle:"h23"},oi={hour:C,minute:C,second:C,hourCycle:"h23"},ii={hour:C,minute:C,second:C,hourCycle:"h23",timeZoneName:Me},li={hour:C,minute:C,second:C,hourCycle:"h23",timeZoneName:Ve},ai={year:C,month:C,day:C,hour:C,minute:C},si={year:C,month:C,day:C,hour:C,minute:C,second:C},ci={year:C,month:Me,day:C,hour:C,minute:C},di={year:C,month:Me,day:C,hour:C,minute:C,second:C},Km={year:C,month:Me,day:C,weekday:Me,hour:C,minute:C},ui={year:C,month:Ve,day:C,hour:C,minute:C,timeZoneName:Me},mi={year:C,month:Ve,day:C,hour:C,minute:C,second:C,timeZoneName:Me},fi={year:C,month:Ve,day:C,weekday:Ve,hour:C,minute:C,timeZoneName:Ve},pi={year:C,month:Ve,day:C,weekday:Ve,hour:C,minute:C,second:C,timeZoneName:Ve};function $(e){return typeof e=="undefined"}function ct(e){return typeof e=="number"}function wn(e){return typeof e=="number"&&e%1===0}function Zm(e){return typeof e=="string"}function Ym(e){return Object.prototype.toString.call(e)==="[object Date]"}function hi(){try{return typeof Intl!="undefined"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Xm(e){return Array.isArray(e)?e:[e]}function yi(e,n,r){if(e.length!==0)return e.reduce((i,l)=>{const o=[n(l),l];return i&&r(i[0],o[0])===i[0]?i:o},null)[1]}function Jm(e,n){return n.reduce((r,i)=>(r[i]=e[i],r),{})}function Ct(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function Ge(e,n,r){return wn(e)&&e>=n&&e<=r}function Qm(e,n){return e-n*Math.floor(e/n)}function ne(e,n=2){const r=e<0;let i;return r?i="-"+(""+-e).padStart(n,"0"):i=(""+e).padStart(n,"0"),i}function Qe(e){if(!($(e)||e===null||e===""))return parseInt(e,10)}function dt(e){if(!($(e)||e===null||e===""))return parseFloat(e)}function mr(e){if(!($(e)||e===null||e==="")){const n=parseFloat("0."+e)*1e3;return Math.floor(n)}}function fr(e,n,r=!1){const i=10**n;return(r?Math.trunc:Math.round)(e*i)/i}function Kt(e){return e%4===0&&(e%100!==0||e%400===0)}function Zt(e){return Kt(e)?366:365}function Vn(e,n){const r=Qm(n-1,12)+1,i=e+(n-r)/12;return r===2?Kt(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function pr(e){let n=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(n=new Date(n),n.setUTCFullYear(n.getUTCFullYear()-1900)),+n}function En(e){const n=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,r=e-1,i=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7;return n===4||i===3?53:52}function hr(e){return e>99?e:e>60?1900+e:2e3+e}function gi(e,n,r,i=null){const l=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(o.timeZone=i);const a=B({timeZoneName:n},o),s=new Intl.DateTimeFormat(r,a).formatToParts(l).find(c=>c.type.toLowerCase()==="timezonename");return s?s.value:null}function Bn(e,n){let r=parseInt(e,10);Number.isNaN(r)&&(r=0);const i=parseInt(n,10)||0,l=r<0||Object.is(r,-0)?-i:i;return r*60+l}function _i(e){const n=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(n))throw new Ne(`Invalid unit value ${e}`);return n}function Sn(e,n){const r={};for(const i in e)if(Ct(e,i)){const l=e[i];if(l==null)continue;r[n(i)]=_i(l)}return r}function Nn(e,n){const r=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),l=e>=0?"+":"-";switch(n){case"short":return`${l}${ne(r,2)}:${ne(i,2)}`;case"narrow":return`${l}${r}${i>0?`:${i}`:""}`;case"techie":return`${l}${ne(r,2)}${ne(i,2)}`;default:throw new RangeError(`Value format ${n} is out of range for property format`)}}function Tn(e){return Jm(e,["hour","minute","second","millisecond"])}const vm=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z0-9_+-]{1,256}(\/[A-Za-z0-9_+-]{1,256})?)?/,ef=["January","February","March","April","May","June","July","August","September","October","November","December"],ki=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tf=["J","F","M","A","M","J","J","A","S","O","N","D"];function bi(e){switch(e){case"narrow":return[...tf];case"short":return[...ki];case"long":return[...ef];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const xi=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ci=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],nf=["M","T","W","T","F","S","S"];function wi(e){switch(e){case"narrow":return[...nf];case"short":return[...Ci];case"long":return[...xi];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Vi=["AM","PM"],rf=["Before Christ","Anno Domini"],of=["BC","AD"],lf=["B","A"];function Ei(e){switch(e){case"narrow":return[...lf];case"short":return[...of];case"long":return[...rf];default:return null}}function af(e){return Vi[e.hour<12?0:1]}function sf(e,n){return wi(n)[e.weekday-1]}function cf(e,n){return bi(n)[e.month-1]}function df(e,n){return Ei(n)[e.year<0?0:1]}function uf(e,n,r="always",i=!1){const l={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(e)===-1;if(r==="auto"&&o){const m=e==="days";switch(n){case 1:return m?"tomorrow":`next ${l[e][0]}`;case-1:return m?"yesterday":`last ${l[e][0]}`;case 0:return m?"today":`this ${l[e][0]}`}}const a=Object.is(n,-0)||n<0,s=Math.abs(n),c=s===1,d=l[e],u=i?c?d[1]:d[2]||d[1]:c?l[e][0]:e;return a?`${s} ${u} ago`:`in ${s} ${u}`}function Bi(e,n){let r="";for(const i of e)i.literal?r+=i.val:r+=n(i.val);return r}const mf={D:ur,DD:Xo,DDD:Jo,DDDD:Qo,t:vo,tt:ei,ttt:ti,tttt:ni,T:ri,TT:oi,TTT:ii,TTTT:li,f:ai,ff:ci,fff:ui,ffff:fi,F:si,FF:di,FFF:mi,FFFF:pi};class be{static create(n,r={}){return new be(n,r)}static parseFormat(n){let r=null,i="",l=!1;const o=[];for(let a=0;a<n.length;a++){const s=n.charAt(a);s==="'"?(i.length>0&&o.push({literal:l,val:i}),r=null,i="",l=!l):l||s===r?i+=s:(i.length>0&&o.push({literal:!1,val:i}),i=s,r=s)}return i.length>0&&o.push({literal:l,val:i}),o}static macroTokenToFormatOpts(n){return mf[n]}constructor(n,r){this.opts=r,this.loc=n,this.systemLoc=null}formatWithSystemDefault(n,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(n,B(B({},this.opts),r)).format()}formatDateTime(n,r={}){return this.loc.dtFormatter(n,B(B({},this.opts),r)).format()}formatDateTimeParts(n,r={}){return this.loc.dtFormatter(n,B(B({},this.opts),r)).formatToParts()}resolvedOptions(n,r={}){return this.loc.dtFormatter(n,B(B({},this.opts),r)).resolvedOptions()}num(n,r=0){if(this.opts.forceSimple)return ne(n,r);const i=B({},this.opts);return r>0&&(i.padTo=r),this.loc.numberFormatter(i).format(n)}formatDateTimeFromString(n,r){const i=this.loc.listingMode()==="en",l=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(p,y)=>this.loc.extract(n,p,y),a=p=>n.isOffsetFixed&&n.offset===0&&p.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,p.format):"",s=()=>i?af(n):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(p,y)=>i?cf(n,p):o(y?{month:p}:{month:p,day:"numeric"},"month"),d=(p,y)=>i?sf(n,p):o(y?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),u=p=>{const y=be.macroTokenToFormatOpts(p);return y?this.formatWithSystemDefault(n,y):p},m=p=>i?df(n,p):o({era:p},"era"),f=p=>{switch(p){case"S":return this.num(n.millisecond);case"u":case"SSS":return this.num(n.millisecond,3);case"s":return this.num(n.second);case"ss":return this.num(n.second,2);case"uu":return this.num(Math.floor(n.millisecond/10),2);case"uuu":return this.num(Math.floor(n.millisecond/100));case"m":return this.num(n.minute);case"mm":return this.num(n.minute,2);case"h":return this.num(n.hour%12===0?12:n.hour%12);case"hh":return this.num(n.hour%12===0?12:n.hour%12,2);case"H":return this.num(n.hour);case"HH":return this.num(n.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return n.zone.offsetName(n.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return n.zone.offsetName(n.ts,{format:"long",locale:this.loc.locale});case"z":return n.zoneName;case"a":return s();case"d":return l?o({day:"numeric"},"day"):this.num(n.day);case"dd":return l?o({day:"2-digit"},"day"):this.num(n.day,2);case"c":return this.num(n.weekday);case"ccc":return d("short",!0);case"cccc":return d("long",!0);case"ccccc":return d("narrow",!0);case"E":return this.num(n.weekday);case"EEE":return d("short",!1);case"EEEE":return d("long",!1);case"EEEEE":return d("narrow",!1);case"L":return l?o({month:"numeric",day:"numeric"},"month"):this.num(n.month);case"LL":return l?o({month:"2-digit",day:"numeric"},"month"):this.num(n.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return l?o({month:"numeric"},"month"):this.num(n.month);case"MM":return l?o({month:"2-digit"},"month"):this.num(n.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return l?o({year:"numeric"},"year"):this.num(n.year);case"yy":return l?o({year:"2-digit"},"year"):this.num(n.year.toString().slice(-2),2);case"yyyy":return l?o({year:"numeric"},"year"):this.num(n.year,4);case"yyyyyy":return l?o({year:"numeric"},"year"):this.num(n.year,6);case"G":return m("short");case"GG":return m("long");case"GGGGG":return m("narrow");case"kk":return this.num(n.weekYear.toString().slice(-2),2);case"kkkk":return this.num(n.weekYear,4);case"W":return this.num(n.weekNumber);case"WW":return this.num(n.weekNumber,2);case"o":return this.num(n.ordinal);case"ooo":return this.num(n.ordinal,3);case"q":return this.num(n.quarter);case"qq":return this.num(n.quarter,2);case"X":return this.num(Math.floor(n.ts/1e3));case"x":return this.num(n.ts);default:return u(p)}};return Bi(be.parseFormat(r),f)}formatDurationFromString(n,r){const i=c=>{switch(c[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},l=c=>d=>{const u=i(d);return u?this.num(c.get(u),d.length):d},o=be.parseFormat(r),a=o.reduce((c,{literal:d,val:u})=>d?c:c.concat(u),[]),s=n.shiftTo(...a.map(i).filter(c=>c));return Bi(o,l(s))}}class Fe{constructor(n,r){this.reason=n,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Yt{get type(){throw new Je}get name(){throw new Je}get isUniversal(){throw new Je}offsetName(n,r){throw new Je}formatOffset(n,r){throw new Je}offset(n){throw new Je}equals(n){throw new Je}get isValid(){throw new Je}}let yr=null;class gr extends Yt{static get instance(){return yr===null&&(yr=new gr),yr}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(n,{format:r,locale:i}){return gi(n,r,i)}formatOffset(n,r){return Nn(this.offset(n),r)}offset(n){return-new Date(n).getTimezoneOffset()}equals(n){return n.type==="system"}get isValid(){return!0}}let On={};function ff(e){return On[e]||(On[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),On[e]}const pf={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function hf(e,n){const r=e.format(n).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,l,o,a,s,c,d,u]=i;return[a,l,o,s,c,d,u]}function yf(e,n){const r=e.formatToParts(n),i=[];for(let l=0;l<r.length;l++){const{type:o,value:a}=r[l],s=pf[o];o==="era"?i[s]=a:$(s)||(i[s]=parseInt(a,10))}return i}let Dn={};class We extends Yt{static create(n){return Dn[n]||(Dn[n]=new We(n)),Dn[n]}static resetCache(){Dn={},On={}}static isValidSpecifier(n){return this.isValidZone(n)}static isValidZone(n){if(!n)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:n}).format(),!0}catch{return!1}}constructor(n){super(),this.zoneName=n,this.valid=We.isValidZone(n)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(n,{format:r,locale:i}){return gi(n,r,i,this.name)}formatOffset(n,r){return Nn(this.offset(n),r)}offset(n){const r=new Date(n);if(isNaN(r))return NaN;const i=ff(this.name);let[l,o,a,s,c,d,u]=i.formatToParts?yf(i,r):hf(i,r);s==="BC"&&(l=-Math.abs(l)+1);const f=pr({year:l,month:o,day:a,hour:c===24?0:c,minute:d,second:u,millisecond:0});let p=+r;const y=p%1e3;return p-=y>=0?y:1e3+y,(f-p)/(60*1e3)}equals(n){return n.type==="iana"&&n.name===this.name}get isValid(){return this.valid}}let _r=null;class he extends Yt{static get utcInstance(){return _r===null&&(_r=new he(0)),_r}static instance(n){return n===0?he.utcInstance:new he(n)}static parseSpecifier(n){if(n){const r=n.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new he(Bn(r[1],r[2]))}return null}constructor(n){super(),this.fixed=n}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Nn(this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(n,r){return Nn(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(n){return n.type==="fixed"&&n.fixed===this.fixed}get isValid(){return!0}}class gf extends Yt{constructor(n){super(),this.zoneName=n}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function ve(e,n){if($(e)||e===null)return n;if(e instanceof Yt)return e;if(Zm(e)){const r=e.toLowerCase();return r==="local"||r==="system"?n:r==="utc"||r==="gmt"?he.utcInstance:he.parseSpecifier(r)||We.create(e)}else return ct(e)?he.instance(e):typeof e=="object"&&e.offset&&typeof e.offset=="number"?e:new gf(e)}let Si=()=>Date.now(),Ni="system",Ti=null,Oi=null,Di=null,Ai;class oe{static get now(){return Si}static set now(n){Si=n}static set defaultZone(n){Ni=n}static get defaultZone(){return ve(Ni,gr.instance)}static get defaultLocale(){return Ti}static set defaultLocale(n){Ti=n}static get defaultNumberingSystem(){return Oi}static set defaultNumberingSystem(n){Oi=n}static get defaultOutputCalendar(){return Di}static set defaultOutputCalendar(n){Di=n}static get throwOnInvalid(){return Ai}static set throwOnInvalid(n){Ai=n}static resetCaches(){Q.resetCache(),We.resetCache()}}let Mi={};function _f(e,n={}){const r=JSON.stringify([e,n]);let i=Mi[r];return i||(i=new Intl.ListFormat(e,n),Mi[r]=i),i}let kr={};function br(e,n={}){const r=JSON.stringify([e,n]);let i=kr[r];return i||(i=new Intl.DateTimeFormat(e,n),kr[r]=i),i}let xr={};function kf(e,n={}){const r=JSON.stringify([e,n]);let i=xr[r];return i||(i=new Intl.NumberFormat(e,n),xr[r]=i),i}let Cr={};function bf(e,n={}){const a=n,{base:r}=a,i=ko(a,["base"]),l=JSON.stringify([e,i]);let o=Cr[l];return o||(o=new Intl.RelativeTimeFormat(e,n),Cr[l]=o),o}let Xt=null;function xf(){return Xt||(Xt=new Intl.DateTimeFormat().resolvedOptions().locale,Xt)}function Cf(e){const n=e.indexOf("-u-");if(n===-1)return[e];{let r;const i=e.substring(0,n);try{r=br(e).resolvedOptions()}catch{r=br(i).resolvedOptions()}const{numberingSystem:l,calendar:o}=r;return[i,l,o]}}function wf(e,n,r){return(r||n)&&(e+="-u",r&&(e+=`-ca-${r}`),n&&(e+=`-nu-${n}`)),e}function Vf(e){const n=[];for(let r=1;r<=12;r++){const i=N.utc(2016,r,1);n.push(e(i))}return n}function Ef(e){const n=[];for(let r=1;r<=7;r++){const i=N.utc(2016,11,13+r);n.push(e(i))}return n}function An(e,n,r,i,l){const o=e.listingMode(r);return o==="error"?null:o==="en"?i(n):l(n)}function Bf(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class Sf{constructor(n,r,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const s=i,{padTo:l,floor:o}=s,a=ko(s,["padTo","floor"]);if(!r||Object.keys(a).length>0){const c=B({useGrouping:!1},i);i.padTo>0&&(c.minimumIntegerDigits=i.padTo),this.inf=kf(n,c)}}format(n){if(this.inf){const r=this.floor?Math.floor(n):n;return this.inf.format(r)}else{const r=this.floor?Math.floor(n):fr(n,3);return ne(r,this.padTo)}}}class Nf{constructor(n,r,i){this.opts=i;let l;if(n.zone.isUniversal){const a=-1*(n.offset/60),s=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;n.offset!==0&&We.create(s).valid?(l=s,this.dt=n):(l="UTC",i.timeZoneName?this.dt=n:this.dt=n.offset===0?n:N.fromMillis(n.ts+n.offset*60*1e3))}else n.zone.type==="system"?this.dt=n:(this.dt=n,l=n.zone.name);const o=B({},this.opts);l&&(o.timeZone=l),this.dtf=br(r,o)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class Tf{constructor(n,r,i){this.opts=B({style:"long"},i),!r&&hi()&&(this.rtf=bf(n,i))}format(n,r){return this.rtf?this.rtf.format(n,r):uf(r,n,this.opts.numeric,this.opts.style!=="long")}formatToParts(n,r){return this.rtf?this.rtf.formatToParts(n,r):[]}}class Q{static fromOpts(n){return Q.create(n.locale,n.numberingSystem,n.outputCalendar,n.defaultToEN)}static create(n,r,i,l=!1){const o=n||oe.defaultLocale,a=o||(l?"en-US":xf()),s=r||oe.defaultNumberingSystem,c=i||oe.defaultOutputCalendar;return new Q(a,s,c,o)}static resetCache(){Xt=null,kr={},xr={},Cr={}}static fromObject({locale:n,numberingSystem:r,outputCalendar:i}={}){return Q.create(n,r,i)}constructor(n,r,i,l){const[o,a,s]=Cf(n);this.locale=o,this.numberingSystem=r||a||null,this.outputCalendar=i||s||null,this.intl=wf(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=l,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Bf(this)),this.fastNumbersCached}listingMode(){const n=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return n&&r?"en":"intl"}clone(n){return!n||Object.getOwnPropertyNames(n).length===0?this:Q.create(n.locale||this.specifiedLocale,n.numberingSystem||this.numberingSystem,n.outputCalendar||this.outputCalendar,n.defaultToEN||!1)}redefaultToEN(n={}){return this.clone(ke(B({},n),{defaultToEN:!0}))}redefaultToSystem(n={}){return this.clone(ke(B({},n),{defaultToEN:!1}))}months(n,r=!1,i=!0){return An(this,n,i,bi,()=>{const l=r?{month:n,day:"numeric"}:{month:n},o=r?"format":"standalone";return this.monthsCache[o][n]||(this.monthsCache[o][n]=Vf(a=>this.extract(a,l,"month"))),this.monthsCache[o][n]})}weekdays(n,r=!1,i=!0){return An(this,n,i,wi,()=>{const l=r?{weekday:n,year:"numeric",month:"long",day:"numeric"}:{weekday:n},o=r?"format":"standalone";return this.weekdaysCache[o][n]||(this.weekdaysCache[o][n]=Ef(a=>this.extract(a,l,"weekday"))),this.weekdaysCache[o][n]})}meridiems(n=!0){return An(this,void 0,n,()=>Vi,()=>{if(!this.meridiemCache){const r={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[N.utc(2016,11,13,9),N.utc(2016,11,13,19)].map(i=>this.extract(i,r,"dayperiod"))}return this.meridiemCache})}eras(n,r=!0){return An(this,n,r,Ei,()=>{const i={era:n};return this.eraCache[n]||(this.eraCache[n]=[N.utc(-40,1,1),N.utc(2017,1,1)].map(l=>this.extract(l,i,"era"))),this.eraCache[n]})}extract(n,r,i){const l=this.dtFormatter(n,r),o=l.formatToParts(),a=o.find(s=>s.type.toLowerCase()===i);return a?a.value:null}numberFormatter(n={}){return new Sf(this.intl,n.forceSimple||this.fastNumbers,n)}dtFormatter(n,r={}){return new Nf(n,this.intl,r)}relFormatter(n={}){return new Tf(this.intl,this.isEnglish(),n)}listFormatter(n={}){return _f(this.intl,n)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(n){return this.locale===n.locale&&this.numberingSystem===n.numberingSystem&&this.outputCalendar===n.outputCalendar}}function wt(...e){const n=e.reduce((r,i)=>r+i.source,"");return RegExp(`^${n}$`)}function ut(...e){return n=>e.reduce(([r,i,l],o)=>{const[a,s,c]=o(n,l);return[B(B({},r),a),i||s,c]},[{},null,1]).slice(0,2)}function Vt(e,...n){if(e==null)return[null,null];for(const[r,i]of n){const l=r.exec(e);if(l)return i(l)}return[null,null]}function Fi(...e){return(n,r)=>{const i={};let l;for(l=0;l<e.length;l++)i[e[l]]=Qe(n[r+l]);return[i,null,r+l]}}const Ii=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,wr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,$i=RegExp(`${wr.source}${Ii.source}?`),Vr=RegExp(`(?:T${$i.source})?`),Of=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Df=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Af=/(\d{4})-?(\d{3})/,Mf=Fi("weekYear","weekNumber","weekDay"),Ff=Fi("year","ordinal"),If=/(\d{4})-(\d\d)-(\d\d)/,Li=RegExp(`${wr.source} ?(?:${Ii.source}|(${vm.source}))?`),$f=RegExp(`(?: ${Li.source})?`);function Et(e,n,r){const i=e[n];return $(i)?r:Qe(i)}function Ui(e,n){return[{year:Et(e,n),month:Et(e,n+1,1),day:Et(e,n+2,1)},null,n+3]}function mt(e,n){return[{hours:Et(e,n,0),minutes:Et(e,n+1,0),seconds:Et(e,n+2,0),milliseconds:mr(e[n+3])},null,n+4]}function Bt(e,n){const r=!e[n]&&!e[n+1],i=Bn(e[n+1],e[n+2]),l=r?null:he.instance(i);return[{},l,n+3]}function Pi(e,n){const r=e[n]?We.create(e[n]):null;return[{},r,n+1]}const Lf=RegExp(`^T?${wr.source}$`),Uf=/^-?P(?:(?:(-?\d{1,9}(?:\.\d{1,9})?)Y)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,9}(?:\.\d{1,9})?)W)?(?:(-?\d{1,9}(?:\.\d{1,9})?)D)?(?:T(?:(-?\d{1,9}(?:\.\d{1,9})?)H)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function Pf(e){const[n,r,i,l,o,a,s,c,d]=e,u=n[0]==="-",m=c&&c[0]==="-",f=(p,y=!1)=>p!==void 0&&(y||p&&u)?-p:p;return[{years:f(dt(r)),months:f(dt(i)),weeks:f(dt(l)),days:f(dt(o)),hours:f(dt(a)),minutes:f(dt(s)),seconds:f(dt(c),c==="-0"),milliseconds:f(mr(d),m)}]}const jf={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Er(e,n,r,i,l,o,a){const s={year:n.length===2?hr(Qe(n)):Qe(n),month:ki.indexOf(r)+1,day:Qe(i),hour:Qe(l),minute:Qe(o)};return a&&(s.second=Qe(a)),e&&(s.weekday=e.length>3?xi.indexOf(e)+1:Ci.indexOf(e)+1),s}const Rf=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function zf(e){const[,n,r,i,l,o,a,s,c,d,u,m]=e,f=Er(n,l,i,r,o,a,s);let p;return c?p=jf[c]:d?p=0:p=Bn(u,m),[f,new he(p)]}function qf(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Hf=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Gf=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Wf=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function ji(e){const[,n,r,i,l,o,a,s]=e;return[Er(n,l,i,r,o,a,s),he.utcInstance]}function Kf(e){const[,n,r,i,l,o,a,s]=e;return[Er(n,s,r,i,l,o,a),he.utcInstance]}const Zf=wt(Of,Vr),Yf=wt(Df,Vr),Xf=wt(Af,Vr),Jf=wt($i),Qf=ut(Ui,mt,Bt),vf=ut(Mf,mt,Bt),ep=ut(Ff,mt,Bt),tp=ut(mt,Bt);function np(e){return Vt(e,[Zf,Qf],[Yf,vf],[Xf,ep],[Jf,tp])}function rp(e){return Vt(qf(e),[Rf,zf])}function op(e){return Vt(e,[Hf,ji],[Gf,ji],[Wf,Kf])}function ip(e){return Vt(e,[Uf,Pf])}const lp=ut(mt);function ap(e){return Vt(e,[Lf,lp])}const sp=wt(If,$f),cp=wt(Li),dp=ut(Ui,mt,Bt,Pi),up=ut(mt,Bt,Pi);function mp(e){return Vt(e,[sp,dp],[cp,up])}const fp="Invalid Duration",Ri={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},pp=B({years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3}},Ri),Te=146097/400,St=146097/4800,hp=B({years:{quarters:4,months:12,weeks:Te/7,days:Te,hours:Te*24,minutes:Te*24*60,seconds:Te*24*60*60,milliseconds:Te*24*60*60*1e3},quarters:{months:3,weeks:Te/28,days:Te/4,hours:Te*24/4,minutes:Te*24*60/4,seconds:Te*24*60*60/4,milliseconds:Te*24*60*60*1e3/4},months:{weeks:St/7,days:St,hours:St*24,minutes:St*24*60,seconds:St*24*60*60,milliseconds:St*24*60*60*1e3}},Ri),ft=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],yp=ft.slice(0).reverse();function pt(e,n,r=!1){const i={values:r?n.values:B(B({},e.values),n.values||{}),loc:e.loc.clone(n.loc),conversionAccuracy:n.conversionAccuracy||e.conversionAccuracy};return new U(i)}function gp(e){return e<0?Math.floor(e):Math.ceil(e)}function zi(e,n,r,i,l){const o=e[l][r],a=n[r]/o,s=Math.sign(a)===Math.sign(i[l]),c=!s&&i[l]!==0&&Math.abs(a)<=1?gp(a):Math.trunc(a);i[l]+=c,n[r]-=c*o}function _p(e,n){yp.reduce((r,i)=>$(n[i])?r:(r&&zi(e,n,r,n,i),i),null)}class U{constructor(n){const r=n.conversionAccuracy==="longterm"||!1;this.values=n.values,this.loc=n.loc||Q.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=n.invalid||null,this.matrix=r?hp:pp,this.isLuxonDuration=!0}static fromMillis(n,r){return U.fromObject({milliseconds:n},r)}static fromObject(n,r={}){if(n==null||typeof n!="object")throw new Ne(`Duration.fromObject: argument expected to be an object, got ${n===null?"null":typeof n}`);return new U({values:Sn(n,U.normalizeUnit),loc:Q.fromObject(r),conversionAccuracy:r.conversionAccuracy})}static fromDurationLike(n){if(ct(n))return U.fromMillis(n);if(U.isDuration(n))return n;if(typeof n=="object")return U.fromObject(n);throw new Ne(`Unknown duration argument ${n} of type ${typeof n}`)}static fromISO(n,r){const[i]=ip(n);return i?U.fromObject(i,r):U.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static fromISOTime(n,r){const[i]=ap(n);return i?U.fromObject(i,r):U.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static invalid(n,r=null){if(!n)throw new Ne("need to specify a reason the Duration is invalid");const i=n instanceof Fe?n:new Fe(n,r);if(oe.throwOnInvalid)throw new Gm(i);return new U({invalid:i})}static normalizeUnit(n){const r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[n&&n.toLowerCase()];if(!r)throw new Yo(n);return r}static isDuration(n){return n&&n.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(n,r={}){const i=ke(B({},r),{floor:r.round!==!1&&r.floor!==!1});return this.isValid?be.create(this.loc,i).formatDurationFromString(this,n):fp}toHuman(n={}){const r=ft.map(i=>{const l=this.values[i];return $(l)?null:this.loc.numberFormatter(ke(B({style:"unit",unitDisplay:"long"},n),{unit:i.slice(0,-1)})).format(l)}).filter(i=>i);return this.loc.listFormatter(B({type:"conjunction",style:n.listStyle||"narrow"},n)).format(r)}toObject(){return this.isValid?B({},this.values):{}}toISO(){if(!this.isValid)return null;let n="P";return this.years!==0&&(n+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(n+=this.months+this.quarters*3+"M"),this.weeks!==0&&(n+=this.weeks+"W"),this.days!==0&&(n+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(n+="T"),this.hours!==0&&(n+=this.hours+"H"),this.minutes!==0&&(n+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(n+=fr(this.seconds+this.milliseconds/1e3,3)+"S"),n==="P"&&(n+="T0S"),n}toISOTime(n={}){if(!this.isValid)return null;const r=this.toMillis();if(r<0||r>=864e5)return null;n=B({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},n);const i=this.shiftTo("hours","minutes","seconds","milliseconds");let l=n.format==="basic"?"hhmm":"hh:mm";(!n.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(l+=n.format==="basic"?"ss":":ss",(!n.suppressMilliseconds||i.milliseconds!==0)&&(l+=".SSS"));let o=i.toFormat(l);return n.includePrefix&&(o="T"+o),o}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(n){if(!this.isValid)return this;const r=U.fromDurationLike(n),i={};for(const l of ft)(Ct(r.values,l)||Ct(this.values,l))&&(i[l]=r.get(l)+this.get(l));return pt(this,{values:i},!0)}minus(n){if(!this.isValid)return this;const r=U.fromDurationLike(n);return this.plus(r.negate())}mapUnits(n){if(!this.isValid)return this;const r={};for(const i of Object.keys(this.values))r[i]=_i(n(this.values[i],i));return pt(this,{values:r},!0)}get(n){return this[U.normalizeUnit(n)]}set(n){if(!this.isValid)return this;const r=B(B({},this.values),Sn(n,U.normalizeUnit));return pt(this,{values:r})}reconfigure({locale:n,numberingSystem:r,conversionAccuracy:i}={}){const l=this.loc.clone({locale:n,numberingSystem:r}),o={loc:l};return i&&(o.conversionAccuracy=i),pt(this,o)}as(n){return this.isValid?this.shiftTo(n).get(n):NaN}normalize(){if(!this.isValid)return this;const n=this.toObject();return _p(this.matrix,n),pt(this,{values:n},!0)}shiftTo(...n){if(!this.isValid)return this;if(n.length===0)return this;n=n.map(a=>U.normalizeUnit(a));const r={},i={},l=this.toObject();let o;for(const a of ft)if(n.indexOf(a)>=0){o=a;let s=0;for(const d in i)s+=this.matrix[d][a]*i[d],i[d]=0;ct(l[a])&&(s+=l[a]);const c=Math.trunc(s);r[a]=c,i[a]=(s*1e3-c*1e3)/1e3;for(const d in l)ft.indexOf(d)>ft.indexOf(a)&&zi(this.matrix,l,d,r,a)}else ct(l[a])&&(i[a]=l[a]);for(const a in i)i[a]!==0&&(r[o]+=a===o?i[a]:i[a]/this.matrix[o][a]);return pt(this,{values:r},!0).normalize()}negate(){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=this.values[r]===0?0:-this.values[r];return pt(this,{values:n},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(n){if(!this.isValid||!n.isValid||!this.loc.equals(n.loc))return!1;function r(i,l){return i===void 0||i===0?l===void 0||l===0:i===l}for(const i of ft)if(!r(this.values[i],n.values[i]))return!1;return!0}}const Jt="Invalid Interval";function kp(e,n){return!e||!e.isValid?v.invalid("missing or invalid start"):!n||!n.isValid?v.invalid("missing or invalid end"):n<e?v.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${n.toISO()}`):null}class v{constructor(n){this.s=n.start,this.e=n.end,this.invalid=n.invalid||null,this.isLuxonInterval=!0}static invalid(n,r=null){if(!n)throw new Ne("need to specify a reason the Interval is invalid");const i=n instanceof Fe?n:new Fe(n,r);if(oe.throwOnInvalid)throw new Hm(i);return new v({invalid:i})}static fromDateTimes(n,r){const i=en(n),l=en(r),o=kp(i,l);return o==null?new v({start:i,end:l}):o}static after(n,r){const i=U.fromDurationLike(r),l=en(n);return v.fromDateTimes(l,l.plus(i))}static before(n,r){const i=U.fromDurationLike(r),l=en(n);return v.fromDateTimes(l.minus(i),l)}static fromISO(n,r){const[i,l]=(n||"").split("/",2);if(i&&l){let o,a;try{o=N.fromISO(i,r),a=o.isValid}catch{a=!1}let s,c;try{s=N.fromISO(l,r),c=s.isValid}catch{c=!1}if(a&&c)return v.fromDateTimes(o,s);if(a){const d=U.fromISO(l,r);if(d.isValid)return v.after(o,d)}else if(c){const d=U.fromISO(i,r);if(d.isValid)return v.before(s,d)}}return v.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static isInterval(n){return n&&n.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(n="milliseconds"){return this.isValid?this.toDuration(n).get(n):NaN}count(n="milliseconds"){if(!this.isValid)return NaN;const r=this.start.startOf(n),i=this.end.startOf(n);return Math.floor(i.diff(r,n).get(n))+1}hasSame(n){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,n):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(n){return this.isValid?this.s>n:!1}isBefore(n){return this.isValid?this.e<=n:!1}contains(n){return this.isValid?this.s<=n&&this.e>n:!1}set({start:n,end:r}={}){return this.isValid?v.fromDateTimes(n||this.s,r||this.e):this}splitAt(...n){if(!this.isValid)return[];const r=n.map(en).filter(a=>this.contains(a)).sort(),i=[];let{s:l}=this,o=0;for(;l<this.e;){const a=r[o]||this.e,s=+a>+this.e?this.e:a;i.push(v.fromDateTimes(l,s)),l=s,o+=1}return i}splitBy(n){const r=U.fromDurationLike(n);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:i}=this,l=1,o;const a=[];for(;i<this.e;){const s=this.start.plus(r.mapUnits(c=>c*l));o=+s>+this.e?this.e:s,a.push(v.fromDateTimes(i,o)),i=o,l+=1}return a}divideEqually(n){return this.isValid?this.splitBy(this.length()/n).slice(0,n):[]}overlaps(n){return this.e>n.s&&this.s<n.e}abutsStart(n){return this.isValid?+this.e==+n.s:!1}abutsEnd(n){return this.isValid?+n.e==+this.s:!1}engulfs(n){return this.isValid?this.s<=n.s&&this.e>=n.e:!1}equals(n){return!this.isValid||!n.isValid?!1:this.s.equals(n.s)&&this.e.equals(n.e)}intersection(n){if(!this.isValid)return this;const r=this.s>n.s?this.s:n.s,i=this.e<n.e?this.e:n.e;return r>=i?null:v.fromDateTimes(r,i)}union(n){if(!this.isValid)return this;const r=this.s<n.s?this.s:n.s,i=this.e>n.e?this.e:n.e;return v.fromDateTimes(r,i)}static merge(n){const[r,i]=n.sort((l,o)=>l.s-o.s).reduce(([l,o],a)=>o?o.overlaps(a)||o.abutsStart(a)?[l,o.union(a)]:[l.concat([o]),a]:[l,a],[[],null]);return i&&r.push(i),r}static xor(n){let r=null,i=0;const l=[],o=n.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),a=Array.prototype.concat(...o),s=a.sort((c,d)=>c.time-d.time);for(const c of s)i+=c.type==="s"?1:-1,i===1?r=c.time:(r&&+r!=+c.time&&l.push(v.fromDateTimes(r,c.time)),r=null);return v.merge(l)}difference(...n){return v.xor([this].concat(n)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:Jt}toISO(n){return this.isValid?`${this.s.toISO(n)}/${this.e.toISO(n)}`:Jt}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Jt}toISOTime(n){return this.isValid?`${this.s.toISOTime(n)}/${this.e.toISOTime(n)}`:Jt}toFormat(n,{separator:r=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(n)}${r}${this.e.toFormat(n)}`:Jt}toDuration(n,r){return this.isValid?this.e.diff(this.s,n,r):U.invalid(this.invalidReason)}mapEndpoints(n){return v.fromDateTimes(n(this.s),n(this.e))}}class Mn{static hasDST(n=oe.defaultZone){const r=N.now().setZone(n).set({month:12});return!n.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(n){return We.isValidZone(n)}static normalizeZone(n){return ve(n,oe.defaultZone)}static months(n="long",{locale:r=null,numberingSystem:i=null,locObj:l=null,outputCalendar:o="gregory"}={}){return(l||Q.create(r,i,o)).months(n)}static monthsFormat(n="long",{locale:r=null,numberingSystem:i=null,locObj:l=null,outputCalendar:o="gregory"}={}){return(l||Q.create(r,i,o)).months(n,!0)}static weekdays(n="long",{locale:r=null,numberingSystem:i=null,locObj:l=null}={}){return(l||Q.create(r,i,null)).weekdays(n)}static weekdaysFormat(n="long",{locale:r=null,numberingSystem:i=null,locObj:l=null}={}){return(l||Q.create(r,i,null)).weekdays(n,!0)}static meridiems({locale:n=null}={}){return Q.create(n).meridiems()}static eras(n="short",{locale:r=null}={}){return Q.create(r,null,"gregory").eras(n)}static features(){return{relative:hi()}}}function qi(e,n){const r=l=>l.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=r(n)-r(e);return Math.floor(U.fromMillis(i).as("days"))}function bp(e,n,r){const i=[["years",(s,c)=>c.year-s.year],["quarters",(s,c)=>c.quarter-s.quarter],["months",(s,c)=>c.month-s.month+(c.year-s.year)*12],["weeks",(s,c)=>{const d=qi(s,c);return(d-d%7)/7}],["days",qi]],l={};let o,a;for(const[s,c]of i)if(r.indexOf(s)>=0){o=s;let d=c(e,n);a=e.plus({[s]:d}),a>n?(e=e.plus({[s]:d-1}),d-=1):e=a,l[s]=d}return[e,l,a,o]}function xp(e,n,r,i){let[l,o,a,s]=bp(e,n,r);const c=n-l,d=r.filter(m=>["hours","minutes","seconds","milliseconds"].indexOf(m)>=0);d.length===0&&(a<n&&(a=l.plus({[s]:1})),a!==l&&(o[s]=(o[s]||0)+c/(a-l)));const u=U.fromObject(o,i);return d.length>0?U.fromMillis(c,i).shiftTo(...d).plus(u):u}const Br={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},Hi={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Cp=Br.hanidec.replace(/[\[|\]]/g,"").split("");function wp(e){let n=parseInt(e,10);if(isNaN(n)){n="";for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);if(e[r].search(Br.hanidec)!==-1)n+=Cp.indexOf(e[r]);else for(const l in Hi){const[o,a]=Hi[l];i>=o&&i<=a&&(n+=i-o)}}return parseInt(n,10)}else return n}function Ie({numberingSystem:e},n=""){return new RegExp(`${Br[e||"latn"]}${n}`)}const Vp="missing Intl.DateTimeFormat.formatToParts support";function j(e,n=r=>r){return{regex:e,deser:([r])=>n(wp(r))}}const Gi=`( |${String.fromCharCode(160)})`,Wi=new RegExp(Gi,"g");function Ep(e){return e.replace(/\./g,"\\.?").replace(Wi,Gi)}function Ki(e){return e.replace(/\./g,"").replace(Wi," ").toLowerCase()}function $e(e,n){return e===null?null:{regex:RegExp(e.map(Ep).join("|")),deser:([r])=>e.findIndex(i=>Ki(r)===Ki(i))+n}}function Zi(e,n){return{regex:e,deser:([,r,i])=>Bn(r,i),groups:n}}function Sr(e){return{regex:e,deser:([n])=>n}}function Bp(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Sp(e,n){const r=Ie(n),i=Ie(n,"{2}"),l=Ie(n,"{3}"),o=Ie(n,"{4}"),a=Ie(n,"{6}"),s=Ie(n,"{1,2}"),c=Ie(n,"{1,3}"),d=Ie(n,"{1,6}"),u=Ie(n,"{1,9}"),m=Ie(n,"{2,4}"),f=Ie(n,"{4,6}"),p=A=>({regex:RegExp(Bp(A.val)),deser:([I])=>I,literal:!0}),h=(A=>{if(e.literal)return p(A);switch(A.val){case"G":return $e(n.eras("short",!1),0);case"GG":return $e(n.eras("long",!1),0);case"y":return j(d);case"yy":return j(m,hr);case"yyyy":return j(o);case"yyyyy":return j(f);case"yyyyyy":return j(a);case"M":return j(s);case"MM":return j(i);case"MMM":return $e(n.months("short",!0,!1),1);case"MMMM":return $e(n.months("long",!0,!1),1);case"L":return j(s);case"LL":return j(i);case"LLL":return $e(n.months("short",!1,!1),1);case"LLLL":return $e(n.months("long",!1,!1),1);case"d":return j(s);case"dd":return j(i);case"o":return j(c);case"ooo":return j(l);case"HH":return j(i);case"H":return j(s);case"hh":return j(i);case"h":return j(s);case"mm":return j(i);case"m":return j(s);case"q":return j(s);case"qq":return j(i);case"s":return j(s);case"ss":return j(i);case"S":return j(c);case"SSS":return j(l);case"u":return Sr(u);case"uu":return Sr(s);case"uuu":return j(r);case"a":return $e(n.meridiems(),0);case"kkkk":return j(o);case"kk":return j(m,hr);case"W":return j(s);case"WW":return j(i);case"E":case"c":return j(r);case"EEE":return $e(n.weekdays("short",!1,!1),1);case"EEEE":return $e(n.weekdays("long",!1,!1),1);case"ccc":return $e(n.weekdays("short",!0,!1),1);case"cccc":return $e(n.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Zi(new RegExp(`([+-]${s.source})(?::(${i.source}))?`),2);case"ZZZ":return Zi(new RegExp(`([+-]${s.source})(${i.source})?`),2);case"z":return Sr(/[a-z_+-/]{1,256}?/i);default:return p(A)}})(e)||{invalidReason:Vp};return h.token=e,h}const Np={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function Tp(e,n,r){const{type:i,value:l}=e;if(i==="literal")return{literal:!0,val:l};const o=r[i];let a=Np[i];if(typeof a=="object"&&(a=a[o]),a)return{literal:!1,val:a}}function Op(e){return[`^${e.map(r=>r.regex).reduce((r,i)=>`${r}(${i.source})`,"")}$`,e]}function Dp(e,n,r){const i=e.match(n);if(i){const l={};let o=1;for(const a in r)if(Ct(r,a)){const s=r[a],c=s.groups?s.groups+1:1;!s.literal&&s.token&&(l[s.token.val[0]]=s.deser(i.slice(o,o+c))),o+=c}return[i,l]}else return[i,{}]}function Ap(e){const n=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let r=null,i;return $(e.z)||(r=We.create(e.z)),$(e.Z)||(r||(r=new he(e.Z)),i=e.Z),$(e.q)||(e.M=(e.q-1)*3+1),$(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),$(e.u)||(e.S=mr(e.u)),[Object.keys(e).reduce((o,a)=>{const s=n(a);return s&&(o[s]=e[a]),o},{}),r,i]}let Nr=null;function Mp(){return Nr||(Nr=N.fromMillis(1555555555555)),Nr}function Fp(e,n){if(e.literal)return e;const r=be.macroTokenToFormatOpts(e.val);if(!r)return e;const o=be.create(n,r).formatDateTimeParts(Mp()).map(a=>Tp(a,n,r));return o.includes(void 0)?e:o}function Ip(e,n){return Array.prototype.concat(...e.map(r=>Fp(r,n)))}function Yi(e,n,r){const i=Ip(be.parseFormat(r),e),l=i.map(a=>Sp(a,e)),o=l.find(a=>a.invalidReason);if(o)return{input:n,tokens:i,invalidReason:o.invalidReason};{const[a,s]=Op(l),c=RegExp(a,"i"),[d,u]=Dp(n,c,s),[m,f,p]=u?Ap(u):[null,null,void 0];if(Ct(u,"a")&&Ct(u,"H"))throw new Wt("Can't include meridiem when specifying 24-hour format");return{input:n,tokens:i,regex:c,rawMatches:d,matches:u,result:m,zone:f,specificOffset:p}}}function $p(e,n,r){const{result:i,zone:l,specificOffset:o,invalidReason:a}=Yi(e,n,r);return[i,l,o,a]}const Xi=[0,31,59,90,120,151,181,212,243,273,304,334],Ji=[0,31,60,91,121,152,182,213,244,274,305,335];function Oe(e,n){return new Fe("unit out of range",`you specified ${n} (of type ${typeof n}) as a ${e}, which is invalid`)}function Qi(e,n,r){const i=new Date(Date.UTC(e,n-1,r));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const l=i.getUTCDay();return l===0?7:l}function vi(e,n,r){return r+(Kt(e)?Ji:Xi)[n-1]}function el(e,n){const r=Kt(e)?Ji:Xi,i=r.findIndex(o=>o<n),l=n-r[i];return{month:i+1,day:l}}function Tr(e){const{year:n,month:r,day:i}=e,l=vi(n,r,i),o=Qi(n,r,i);let a=Math.floor((l-o+10)/7),s;return a<1?(s=n-1,a=En(s)):a>En(n)?(s=n+1,a=1):s=n,B({weekYear:s,weekNumber:a,weekday:o},Tn(e))}function tl(e){const{weekYear:n,weekNumber:r,weekday:i}=e,l=Qi(n,1,4),o=Zt(n);let a=r*7+i-l-3,s;a<1?(s=n-1,a+=Zt(s)):a>o?(s=n+1,a-=Zt(n)):s=n;const{month:c,day:d}=el(s,a);return B({year:s,month:c,day:d},Tn(e))}function Or(e){const{year:n,month:r,day:i}=e,l=vi(n,r,i);return B({year:n,ordinal:l},Tn(e))}function nl(e){const{year:n,ordinal:r}=e,{month:i,day:l}=el(n,r);return B({year:n,month:i,day:l},Tn(e))}function Lp(e){const n=wn(e.weekYear),r=Ge(e.weekNumber,1,En(e.weekYear)),i=Ge(e.weekday,1,7);return n?r?i?!1:Oe("weekday",e.weekday):Oe("week",e.week):Oe("weekYear",e.weekYear)}function Up(e){const n=wn(e.year),r=Ge(e.ordinal,1,Zt(e.year));return n?r?!1:Oe("ordinal",e.ordinal):Oe("year",e.year)}function rl(e){const n=wn(e.year),r=Ge(e.month,1,12),i=Ge(e.day,1,Vn(e.year,e.month));return n?r?i?!1:Oe("day",e.day):Oe("month",e.month):Oe("year",e.year)}function ol(e){const{hour:n,minute:r,second:i,millisecond:l}=e,o=Ge(n,0,23)||n===24&&r===0&&i===0&&l===0,a=Ge(r,0,59),s=Ge(i,0,59),c=Ge(l,0,999);return o?a?s?c?!1:Oe("millisecond",l):Oe("second",i):Oe("minute",r):Oe("hour",n)}const Dr="Invalid DateTime",il=864e13;function Fn(e){return new Fe("unsupported zone",`the zone "${e.name}" is not supported`)}function Ar(e){return e.weekData===null&&(e.weekData=Tr(e.c)),e.weekData}function Qt(e,n){const r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new N(ke(B(B({},r),n),{old:r}))}function ll(e,n,r){let i=e-n*60*1e3;const l=r.offset(i);if(n===l)return[i,n];i-=(l-n)*60*1e3;const o=r.offset(i);return l===o?[i,l]:[e-Math.min(l,o)*60*1e3,Math.max(l,o)]}function al(e,n){e+=n*60*1e3;const r=new Date(e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function In(e,n,r){return ll(pr(e),n,r)}function sl(e,n){const r=e.o,i=e.c.year+Math.trunc(n.years),l=e.c.month+Math.trunc(n.months)+Math.trunc(n.quarters)*3,o=ke(B({},e.c),{year:i,month:l,day:Math.min(e.c.day,Vn(i,l))+Math.trunc(n.days)+Math.trunc(n.weeks)*7}),a=U.fromObject({years:n.years-Math.trunc(n.years),quarters:n.quarters-Math.trunc(n.quarters),months:n.months-Math.trunc(n.months),weeks:n.weeks-Math.trunc(n.weeks),days:n.days-Math.trunc(n.days),hours:n.hours,minutes:n.minutes,seconds:n.seconds,milliseconds:n.milliseconds}).as("milliseconds"),s=pr(o);let[c,d]=ll(s,r,e.zone);return a!==0&&(c+=a,d=e.zone.offset(c)),{ts:c,o:d}}function vt(e,n,r,i,l,o){const{setZone:a,zone:s}=r;if(e&&Object.keys(e).length!==0){const c=n||s,d=N.fromObject(e,ke(B({},r),{zone:c,specificOffset:o}));return a?d:d.setZone(s)}else return N.invalid(new Fe("unparsable",`the input "${l}" can't be parsed as ${i}`))}function $n(e,n,r=!0){return e.isValid?be.create(Q.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,n):null}function Mr(e,n){const r=e.c.year>9999||e.c.year<0;let i="";return r&&e.c.year>=0&&(i+="+"),i+=ne(e.c.year,r?6:4),n?(i+="-",i+=ne(e.c.month),i+="-",i+=ne(e.c.day)):(i+=ne(e.c.month),i+=ne(e.c.day)),i}function cl(e,n,r,i,l){let o=ne(e.c.hour);return n?(o+=":",o+=ne(e.c.minute),(e.c.second!==0||!r)&&(o+=":")):o+=ne(e.c.minute),(e.c.second!==0||!r)&&(o+=ne(e.c.second),(e.c.millisecond!==0||!i)&&(o+=".",o+=ne(e.c.millisecond,3))),l&&(e.isOffsetFixed&&e.offset===0?o+="Z":e.o<0?(o+="-",o+=ne(Math.trunc(-e.o/60)),o+=":",o+=ne(Math.trunc(-e.o%60))):(o+="+",o+=ne(Math.trunc(e.o/60)),o+=":",o+=ne(Math.trunc(e.o%60)))),o}const dl={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Pp={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},jp={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ul=["year","month","day","hour","minute","second","millisecond"],Rp=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],zp=["year","ordinal","hour","minute","second","millisecond"];function ml(e){const n={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!n)throw new Yo(e);return n}function fl(e,n){const r=ve(n.zone,oe.defaultZone),i=Q.fromObject(n),l=oe.now();let o,a;if($(e.year))o=l;else{for(const d of ul)$(e[d])&&(e[d]=dl[d]);const s=rl(e)||ol(e);if(s)return N.invalid(s);const c=r.offset(l);[o,a]=In(e,c,r)}return new N({ts:o,zone:r,loc:i,o:a})}function pl(e,n,r){const i=$(r.round)?!0:r.round,l=(a,s)=>(a=fr(a,i||r.calendary?0:2,!0),n.loc.clone(r).relFormatter(r).format(a,s)),o=a=>r.calendary?n.hasSame(e,a)?0:n.startOf(a).diff(e.startOf(a),a).get(a):n.diff(e,a).get(a);if(r.unit)return l(o(r.unit),r.unit);for(const a of r.units){const s=o(a);if(Math.abs(s)>=1)return l(s,a)}return l(e>n?-0:0,r.units[r.units.length-1])}function hl(e){let n={},r;return e.length>0&&typeof e[e.length-1]=="object"?(n=e[e.length-1],r=Array.from(e).slice(0,e.length-1)):r=Array.from(e),[n,r]}class N{constructor(n){const r=n.zone||oe.defaultZone;let i=n.invalid||(Number.isNaN(n.ts)?new Fe("invalid input"):null)||(r.isValid?null:Fn(r));this.ts=$(n.ts)?oe.now():n.ts;let l=null,o=null;if(!i)if(n.old&&n.old.ts===this.ts&&n.old.zone.equals(r))[l,o]=[n.old.c,n.old.o];else{const s=r.offset(this.ts);l=al(this.ts,s),i=Number.isNaN(l.year)?new Fe("invalid input"):null,l=i?null:l,o=i?null:s}this._zone=r,this.loc=n.loc||Q.create(),this.invalid=i,this.weekData=null,this.c=l,this.o=o,this.isLuxonDateTime=!0}static now(){return new N({})}static local(){const[n,r]=hl(arguments),[i,l,o,a,s,c,d]=r;return fl({year:i,month:l,day:o,hour:a,minute:s,second:c,millisecond:d},n)}static utc(){const[n,r]=hl(arguments),[i,l,o,a,s,c,d]=r;return n.zone=he.utcInstance,fl({year:i,month:l,day:o,hour:a,minute:s,second:c,millisecond:d},n)}static fromJSDate(n,r={}){const i=Ym(n)?n.valueOf():NaN;if(Number.isNaN(i))return N.invalid("invalid input");const l=ve(r.zone,oe.defaultZone);return l.isValid?new N({ts:i,zone:l,loc:Q.fromObject(r)}):N.invalid(Fn(l))}static fromMillis(n,r={}){if(ct(n))return n<-il||n>il?N.invalid("Timestamp out of range"):new N({ts:n,zone:ve(r.zone,oe.defaultZone),loc:Q.fromObject(r)});throw new Ne(`fromMillis requires a numerical input, but received a ${typeof n} with value ${n}`)}static fromSeconds(n,r={}){if(ct(n))return new N({ts:n*1e3,zone:ve(r.zone,oe.defaultZone),loc:Q.fromObject(r)});throw new Ne("fromSeconds requires a numerical input")}static fromObject(n,r={}){n=n||{};const i=ve(r.zone,oe.defaultZone);if(!i.isValid)return N.invalid(Fn(i));const l=oe.now(),o=$(r.specificOffset)?i.offset(l):r.specificOffset,a=Sn(n,ml),s=!$(a.ordinal),c=!$(a.year),d=!$(a.month)||!$(a.day),u=c||d,m=a.weekYear||a.weekNumber,f=Q.fromObject(r);if((u||s)&&m)throw new Wt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&s)throw new Wt("Can't mix ordinal dates with month/day");const p=m||a.weekday&&!u;let y,h,A=al(l,o);p?(y=Rp,h=Pp,A=Tr(A)):s?(y=zp,h=jp,A=Or(A)):(y=ul,h=dl);let I=!1;for(const K of y){const F=a[K];$(F)?I?a[K]=h[K]:a[K]=A[K]:I=!0}const z=p?Lp(a):s?Up(a):rl(a),q=z||ol(a);if(q)return N.invalid(q);const Y=p?tl(a):s?nl(a):a,[X,M]=In(Y,o,i),V=new N({ts:X,zone:i,o:M,loc:f});return a.weekday&&u&&n.weekday!==V.weekday?N.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${V.toISO()}`):V}static fromISO(n,r={}){const[i,l]=np(n);return vt(i,l,r,"ISO 8601",n)}static fromRFC2822(n,r={}){const[i,l]=rp(n);return vt(i,l,r,"RFC 2822",n)}static fromHTTP(n,r={}){const[i,l]=op(n);return vt(i,l,r,"HTTP",r)}static fromFormat(n,r,i={}){if($(n)||$(r))throw new Ne("fromFormat requires an input string and a format");const{locale:l=null,numberingSystem:o=null}=i,a=Q.fromOpts({locale:l,numberingSystem:o,defaultToEN:!0}),[s,c,d,u]=$p(a,n,r);return u?N.invalid(u):vt(s,c,i,`format ${r}`,n,d)}static fromString(n,r,i={}){return N.fromFormat(n,r,i)}static fromSQL(n,r={}){const[i,l]=mp(n);return vt(i,l,r,"SQL",n)}static invalid(n,r=null){if(!n)throw new Ne("need to specify a reason the DateTime is invalid");const i=n instanceof Fe?n:new Fe(n,r);if(oe.throwOnInvalid)throw new qm(i);return new N({invalid:i})}static isDateTime(n){return n&&n.isLuxonDateTime||!1}get(n){return this[n]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ar(this).weekYear:NaN}get weekNumber(){return this.isValid?Ar(this).weekNumber:NaN}get weekday(){return this.isValid?Ar(this).weekday:NaN}get ordinal(){return this.isValid?Or(this.c).ordinal:NaN}get monthShort(){return this.isValid?Mn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Mn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Mn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Mn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return Kt(this.year)}get daysInMonth(){return Vn(this.year,this.month)}get daysInYear(){return this.isValid?Zt(this.year):NaN}get weeksInWeekYear(){return this.isValid?En(this.weekYear):NaN}resolvedLocaleOptions(n={}){const{locale:r,numberingSystem:i,calendar:l}=be.create(this.loc.clone(n),n).resolvedOptions(this);return{locale:r,numberingSystem:i,outputCalendar:l}}toUTC(n=0,r={}){return this.setZone(he.instance(n),r)}toLocal(){return this.setZone(oe.defaultZone)}setZone(n,{keepLocalTime:r=!1,keepCalendarTime:i=!1}={}){if(n=ve(n,oe.defaultZone),n.equals(this.zone))return this;if(n.isValid){let l=this.ts;if(r||i){const o=n.offset(this.ts),a=this.toObject();[l]=In(a,o,n)}return Qt(this,{ts:l,zone:n})}else return N.invalid(Fn(n))}reconfigure({locale:n,numberingSystem:r,outputCalendar:i}={}){const l=this.loc.clone({locale:n,numberingSystem:r,outputCalendar:i});return Qt(this,{loc:l})}setLocale(n){return this.reconfigure({locale:n})}set(n){if(!this.isValid)return this;const r=Sn(n,ml),i=!$(r.weekYear)||!$(r.weekNumber)||!$(r.weekday),l=!$(r.ordinal),o=!$(r.year),a=!$(r.month)||!$(r.day),s=o||a,c=r.weekYear||r.weekNumber;if((s||l)&&c)throw new Wt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&l)throw new Wt("Can't mix ordinal dates with month/day");let d;i?d=tl(B(B({},Tr(this.c)),r)):$(r.ordinal)?(d=B(B({},this.toObject()),r),$(r.day)&&(d.day=Math.min(Vn(d.year,d.month),d.day))):d=nl(B(B({},Or(this.c)),r));const[u,m]=In(d,this.o,this.zone);return Qt(this,{ts:u,o:m})}plus(n){if(!this.isValid)return this;const r=U.fromDurationLike(n);return Qt(this,sl(this,r))}minus(n){if(!this.isValid)return this;const r=U.fromDurationLike(n).negate();return Qt(this,sl(this,r))}startOf(n){if(!this.isValid)return this;const r={},i=U.normalizeUnit(n);switch(i){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(i==="weeks"&&(r.weekday=1),i==="quarters"){const l=Math.ceil(this.month/3);r.month=(l-1)*3+1}return this.set(r)}endOf(n){return this.isValid?this.plus({[n]:1}).startOf(n).minus(1):this}toFormat(n,r={}){return this.isValid?be.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,n):Dr}toLocaleString(n=ur,r={}){return this.isValid?be.create(this.loc.clone(r),n).formatDateTime(this):Dr}toLocaleParts(n={}){return this.isValid?be.create(this.loc.clone(n),n).formatDateTimeParts(this):[]}toISO({format:n="extended",suppressSeconds:r=!1,suppressMilliseconds:i=!1,includeOffset:l=!0}={}){if(!this.isValid)return null;const o=n==="extended";let a=Mr(this,o);return a+="T",a+=cl(this,o,r,i,l),a}toISODate({format:n="extended"}={}){return this.isValid?Mr(this,n==="extended"):null}toISOWeekDate(){return $n(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:n=!1,suppressSeconds:r=!1,includeOffset:i=!0,includePrefix:l=!1,format:o="extended"}={}){return this.isValid?(l?"T":"")+cl(this,o==="extended",r,n,i):null}toRFC2822(){return $n(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return $n(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Mr(this,!0):null}toSQLTime({includeOffset:n=!0,includeZone:r=!1,includeOffsetSpace:i=!0}={}){let l="HH:mm:ss.SSS";return(r||n)&&(i&&(l+=" "),r?l+="z":n&&(l+="ZZ")),$n(this,l,!0)}toSQL(n={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(n)}`:null}toString(){return this.isValid?this.toISO():Dr}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(n={}){if(!this.isValid)return{};const r=B({},this.c);return n.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(n,r="milliseconds",i={}){if(!this.isValid||!n.isValid)return U.invalid("created by diffing an invalid DateTime");const l=B({locale:this.locale,numberingSystem:this.numberingSystem},i),o=Xm(r).map(U.normalizeUnit),a=n.valueOf()>this.valueOf(),s=a?this:n,c=a?n:this,d=xp(s,c,o,l);return a?d.negate():d}diffNow(n="milliseconds",r={}){return this.diff(N.now(),n,r)}until(n){return this.isValid?v.fromDateTimes(this,n):this}hasSame(n,r){if(!this.isValid)return!1;const i=n.valueOf(),l=this.setZone(n.zone,{keepLocalTime:!0});return l.startOf(r)<=i&&i<=l.endOf(r)}equals(n){return this.isValid&&n.isValid&&this.valueOf()===n.valueOf()&&this.zone.equals(n.zone)&&this.loc.equals(n.loc)}toRelative(n={}){if(!this.isValid)return null;const r=n.base||N.fromObject({},{zone:this.zone}),i=n.padding?this<r?-n.padding:n.padding:0;let l=["years","months","days","hours","minutes","seconds"],o=n.unit;return Array.isArray(n.unit)&&(l=n.unit,o=void 0),pl(r,this.plus(i),ke(B({},n),{numeric:"always",units:l,unit:o}))}toRelativeCalendar(n={}){return this.isValid?pl(n.base||N.fromObject({},{zone:this.zone}),this,ke(B({},n),{numeric:"auto",units:["years","months","days"],calendary:!0})):null}static min(...n){if(!n.every(N.isDateTime))throw new Ne("min requires all arguments be DateTimes");return yi(n,r=>r.valueOf(),Math.min)}static max(...n){if(!n.every(N.isDateTime))throw new Ne("max requires all arguments be DateTimes");return yi(n,r=>r.valueOf(),Math.max)}static fromFormatExplain(n,r,i={}){const{locale:l=null,numberingSystem:o=null}=i,a=Q.fromOpts({locale:l,numberingSystem:o,defaultToEN:!0});return Yi(a,n,r)}static fromStringExplain(n,r,i={}){return N.fromFormatExplain(n,r,i)}static get DATE_SHORT(){return ur}static get DATE_MED(){return Xo}static get DATE_MED_WITH_WEEKDAY(){return Wm}static get DATE_FULL(){return Jo}static get DATE_HUGE(){return Qo}static get TIME_SIMPLE(){return vo}static get TIME_WITH_SECONDS(){return ei}static get TIME_WITH_SHORT_OFFSET(){return ti}static get TIME_WITH_LONG_OFFSET(){return ni}static get TIME_24_SIMPLE(){return ri}static get TIME_24_WITH_SECONDS(){return oi}static get TIME_24_WITH_SHORT_OFFSET(){return ii}static get TIME_24_WITH_LONG_OFFSET(){return li}static get DATETIME_SHORT(){return ai}static get DATETIME_SHORT_WITH_SECONDS(){return si}static get DATETIME_MED(){return ci}static get DATETIME_MED_WITH_SECONDS(){return di}static get DATETIME_MED_WITH_WEEKDAY(){return Km}static get DATETIME_FULL(){return ui}static get DATETIME_FULL_WITH_SECONDS(){return mi}static get DATETIME_HUGE(){return fi}static get DATETIME_HUGE_WITH_SECONDS(){return pi}}function en(e){if(N.isDateTime(e))return e;if(e&&e.valueOf&&ct(e.valueOf()))return N.fromJSDate(e);if(e&&typeof e=="object")return N.fromObject(e);throw new Ne(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var KB="";const qp={mixins:[at],computed:{hasValue(){return this.value!==void 0&&this.value!==null},timeago(){return N.fromISO(this.value).toRelative()},readable(){let e=N.fromISO(this.value),n=N.now(),r=n.toFormat("yyyy");return n.toFormat("MMM yyyy"),e.toFormat("yyyy")===r?N.fromISO(this.value).toFormat("h:mm a - dd MMM"):N.fromISO(this.value).toFormat("h:mm a - dd MMM yyyy")}}},Hp={class:"table-date-cell"},Gp={key:0},Wp={class:"off"},Kp={class:"on"},Zp={class:"spacer"};function Yp(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("td",Hp,[o.hasValue?(t.openBlock(),t.createElementBlock("div",Gp,[t.createElementVNode("span",Wp,t.toDisplayString(o.readable),1),t.createElementVNode("span",Kp,t.toDisplayString(o.timeago),1),t.createElementVNode("span",Zp,t.toDisplayString(o.readable),1)])):t.createCommentVNode("",!0)])}var yl=_(qp,[["render",Yp],["__scopeId","data-v-3687693f"]]),ZB="";const Xp={mixins:[at],computed:{boolean(){return!!this.value}}};function Jp(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-boolean-cell",{true:o.boolean,false:!o.boolean}])},[t.createVNode(a,{icon:o.boolean?"fa-check":"fa-times"},null,8,["icon"])],2)}var gl=_(Xp,[["render",Jp],["__scopeId","data-v-27f127ae"]]),YB="";const Qp={mixins:[at],computed:{public(){return this.security==="public"},security(){return this.value||"secure"}}};function vp(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-security-cell",o.security])},[t.createVNode(a,{icon:o.public?"fa-lock-open":"fa-lock"},null,8,["icon"])],2)}var eh=_(Qp,[["render",vp],["__scopeId","data-v-51f8608e"]]),XB="";const th={mixins:[at],methods:{open(){window.open(this.href)}},computed:{href(){return`http://${this.value}`}}},nh={class:"table-url-cell"},rh=["href"];function oh(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",nh,[t.createElementVNode("a",{href:o.href,onClick:n[0]||(n[0]=t.withModifiers((...s)=>o.open&&o.open(...s),["stop","prevent"])),target:"_blank"},[t.createTextVNode(t.toDisplayString(e.value)+" ",1),t.createVNode(a,{right:"",icon:"fa-external-link"})],8,rh)])}var _l=_(th,[["render",oh],["__scopeId","data-v-17cf3a86"]]),JB="";const ih={props:{multi:{type:Boolean},last:{type:Boolean},value:{required:!0},type:{type:String},widget:{type:String}},computed:{reference(){return!!(this.value&&this.value._id)},renderValue(){return this.value?this.value.title||this.value.name||this.value:void 0},date(){return N.fromISO(this.value).toFormat("dd MMM yyyy")},actualWidget(){var e;if(this.widget)e=this.widget;else switch(this.type){case"date":e="datetime";break}return e}},methods:{clicked(e){this.$sdk.dispatch("item:view",e)}}};function lh(e,n,r,i,l,o){return o.reference?(t.openBlock(),t.createElementBlock("a",{key:0,onClick:n[0]||(n[0]=t.withModifiers(a=>o.clicked(r.value),["stop","prevent"]))},t.toDisplayString(o.renderValue),1)):r.type=="date"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(o.date),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(t.toDisplayString(o.renderValue),1),r.multi&&!r.last?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",\xA0")],64)):t.createCommentVNode("",!0)],64))}var ah=_(ih,[["render",lh],["__scopeId","data-v-255b9ec8"]]),QB="";function Fr(e,n){if(!e||!n)return;var r=Cn(e,n);if(r)return r;const i=n.split("."),l=i.shift(),o=i.join("."),a=Cn(e,l);return Array.isArray(a)?a.map(function(s){return Fr(s,o)}).flat().filter(Boolean):Fr(a,o)}const sh={data(){return{component:null}},components:{ValueRenderer:ah},async created(){const e=this;let n,r=e.column.type,i=e.column.renderer||e.column.widget;switch(r=="reference"&&e.column.referenceType==="image"&&(i="thumbnail"),i){case"button":n=zm;break;case"security":n=eh;break;case"boolean":n=gl;break;case"date":case"datetime":n=yl;break;case"url":n=_l;break;case"currency":n=Um;break;case"thumbnail":n=Im;break;default:switch(r){case"date":n=yl;break;case"boolean":n=gl;break;case"url":n=_l;break}break}e.component=n},props:{column:{type:Object,required:!0},row:{type:Object,required:!0}},computed:{multiValue(){return Array.isArray(this.value)},complex(){this.multiValue},renderer(){return this.column.renderer},renderValue(){var e=this.value;if(e!=null)return e.title||e.name||e},value(){var e=Fr(this.row,this.column.key);return e}}},ch={key:1,class:"table-cell"},dh={class:"value"},uh={class:"value"};function mh(e,n,r,i,l,o){const a=t.resolveComponent("value-renderer");return l.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.component),{key:0,column:r.column,row:r.row,value:o.value},null,8,["column","row","value"])):(t.openBlock(),t.createElementBlock("td",ch,[o.multiValue?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o.complex?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.value,(s,c)=>(t.openBlock(),t.createElementBlock("span",dh,[t.createVNode(a,{type:r.column.type,multi:"",last:c===o.value.length-1,value:s},null,8,["type","last","value"])]))),256)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(o.value,(s,c)=>(t.openBlock(),t.createElementBlock("span",uh,[t.createVNode(a,{type:r.column.type,multi:"",last:c===o.value.length-1,value:s},null,8,["type","last","value"])]))),256))],64)):(t.openBlock(),t.createBlock(a,{key:1,type:r.column.type,value:o.value},null,8,["type","value"]))]))}var kl=_(sh,[["render",mh],["__scopeId","data-v-44c51175"]]);const fh={components:{TableCell:kl},props:{selected:{type:Boolean},index:{type:Number},row:{type:Object,required:!0},columns:{type:Array,required:!0},enableActions:{type:Boolean,default(){return!1}},enableSelection:{type:Boolean,default(){return!0}}},methods:{clickCell(e){this.$emit("click:cell",{row:this.row,column:e}),this.$emit("click:row",this.row)},clickActions(e){this.$emit("click:actions",e)},clickSelect(e){const n=this.index;this.$emit("click:select",e,n)}},computed:{classes(){var e=[];return this.selected&&e.push("selected"),e}}};function ph(e,n,r,i,l,o){const a=t.resolveComponent("ux-checkbox"),s=t.resolveComponent("table-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("tr",{class:t.normalizeClass([o.classes,"table-row"])},[t.renderSlot(e.$slots,"default",{},()=>[r.enableSelection?(t.openBlock(),t.createElementBlock("th",{key:0,class:"table-cell table-select first shrink",onClick:n[0]||(n[0]=t.withModifiers(u=>o.clickSelect(r.row),["stop","prevent"]))},[t.createVNode(a,{value:r.selected},null,8,["value"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.columns,(u,m)=>(t.openBlock(),t.createBlock(s,{key:`${u.path||u.key}-${m}`,onClick:t.withModifiers(f=>o.clickCell(u),["stop","prevent"]),column:u,row:r.row},null,8,["onClick","column","row"]))),128)),r.enableActions?(t.openBlock(),t.createElementBlock("th",{key:1,class:"table-cell last shrink",onClick:n[1]||(n[1]=t.withModifiers(u=>o.clickActions(r.row),["stop","prevent"]))},[t.createVNode(d,{size:"xs",icon:""},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-ellipsis"})]),_:1})])):t.createCommentVNode("",!0)])],2)}var hh=_(fh,[["render",ph]]),bl={data(){return{scrollTop:0}},methods:{updateScroll(e){var n=this.$refs.scroll;n=n.$el||n,this.scrollTop=n.scrollTop}},mounted(){var e=this.$refs.scroll;e=e.$el||e,e.addEventListener("scroll",this.updateScroll)},beforeUnmount(){var e=this.$refs.scroll;e=e.$el||e,e.removeEventListener("scroll",this.updateScroll)},activated(){var e=this.$refs.scroll;e=e.$el||e,e.scrollTop=this.scrollTop}},vB="";const yh={mixins:[bl],components:{TableRow:hh,TableCell:kl},watch:{rows(){this.$refs.scroll.scroll({top:0,left:0})},sort(e){this.sorting=e},sorting(e){this.$emit("update:sort",e)}},props:{total:{type:Number},columns:{type:Array,default(){return[]}},rows:{type:Array,default(){return[]}},scrollable:{type:Boolean,default(){return!0}},enableActions:{type:Boolean,default(){return!1}},enableSelection:{type:Boolean,default(){return!0}},sort:{type:Object,default(){return{key:"meta.created",type:"date",direction:"desc"}}},selection:{type:Array,default(){return[]}},selectAll:{type:Function},deselectAll:{type:Function}},data(){return{sorting:this.sort,lastSelectedIndex:null,shift:!1,keyListenersAdded:!1}},mounted(){this.addKeyListeners()},activated(){this.addKeyListeners()},beforeUnmount(){this.removeKeyListeners()},deactivated(){this.removeKeyListeners()},computed:{currentSortDirection(){var e;return((e=this.sorting)==null?void 0:e.direction)||"asc"},selectionHash(){var e=this;return e.selection.reduce(function(n,r){var i=r._id||r.id;return n[i]=r,n},{})},pageSelected(){var e=this;if(!(!e.rows||!e.rows.length))return!e.rows.some(function(n){return!e.selectionHash[n._id||n.id]})},renderColumns(){return this.columns.map(function(e){var n=Object.assign({},e);return n.class=[],n.shrink&&n.class.push("shrink"),n})},renderRows(){return this.rows},someSelectedOnPage(){return this.rows.some(this.isSelected)}},methods:{keyDown(e){e.keyCode==16&&(this.shift=!0)},keyUp(e){e.keyCode==16&&(this.shift=!1)},addKeyListeners(){this.keyListenersAdded||(window.addEventListener("keydown",this.keyDown,!0),window.addEventListener("keyup",this.keyUp,!0),this.keyListenersAdded=!0)},removeKeyListeners(){!this.keyListenersAdded||(window.removeEventListener("keydown",this.keyDown,!0),window.removeEventListener("keyup",this.keyUp,!0),this.keyListenersAdded=!1)},togglePage(){var e=this;e.pageSelected?e.deselectPage():e.selectPage()},selectPage(){var e=this;e.$emit("select:multiple",e.rows)},deselectPage(){var e=this;e.$emit("deselect:multiple",e.rows)},isSelected(e){var n=this,r=e._id||e.id;return n.selection.some(function(i){var l=i._id||i.id;return i==e||l==r})},classes(e){let n=[];return this.isSelected(e)&&n.push("selected"),n},selectRange(e,n){const r=this,i=Math.min(e,n),l=Math.max(e,n)+1;var o=r.renderRows.slice(i,l);r.$emit("select:multiple",o)},toggleSort(e){var o,a;const n=(o=this.sorting)==null?void 0:o.key,r=((a=this.sorting)==null?void 0:a.direction)||"asc";let{key:i,direction:l}=e;i===n&&(l=r==="dsc"?"asc":"dsc"),this.sorting={key:i,direction:l,type:e.type},this.$emit("")},clickRow(e){this.$emit("click:row",e)},clickCell({row:e,column:n}){this.$emit("click:cell",{row:e,column:n})},clickActions(e){this.$emit("click:actions",e)},clickSelect(e,n){const r=this.lastSelectedIndex;if(this.shift&&r!=n)return console.log("FROM",r,"-",n),this.selectRange(r,n);this.lastSelectedIndex=n,this.$emit("select:row:toggle",e)}}},gh={class:"table-wrapper"},_h={class:"table-scroll",ref:"scroll"},kh={key:0,class:"first table-select shrink"},bh=["onClick"],xh={key:1,class:"last shrink"};function Ch(e,n,r,i,l,o){const a=t.resolveComponent("ux-checkbox"),s=t.resolveComponent("ux-list-item"),c=t.resolveComponent("ux-list"),d=t.resolveComponent("ux-menu"),u=t.resolveComponent("flex-cell"),m=t.resolveComponent("flex-row"),f=t.resolveComponent("table-row");return t.openBlock(),t.createElementBlock("div",gh,[t.createElementVNode("div",_h,[t.createElementVNode("table",null,[t.createElementVNode("thead",null,[t.createElementVNode("tr",null,[r.enableSelection?(t.openBlock(),t.createElementBlock("th",kh,[t.createVNode(d,null,{activator:t.withCtx(({on:p})=>[t.createVNode(a,t.mergeProps(t.toHandlers(p),{value:o.pageSelected}),null,16,["value"])]),default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s,{onClick:n[0]||(n[0]=p=>o.selectPage())},{default:t.withCtx(()=>[t.createTextVNode(" Select Page ")]),_:1}),o.someSelectedOnPage?(t.openBlock(),t.createBlock(s,{key:0,onClick:n[1]||(n[1]=p=>o.deselectPage())},{default:t.withCtx(()=>[t.createTextVNode(" Deselect Page ")]),_:1})):t.createCommentVNode("",!0),r.selectAll?(t.openBlock(),t.createBlock(s,{key:1,onClick:n[2]||(n[2]=p=>r.selectAll())},{default:t.withCtx(()=>[t.createTextVNode(" Select All ("+t.toDisplayString(r.total)+") ",1)]),_:1})):t.createCommentVNode("",!0),r.deselectAll?(t.openBlock(),t.createBlock(s,{key:2,onClick:n[3]||(n[3]=p=>r.deselectAll())},{default:t.withCtx(()=>[t.createTextVNode(" Deselect All ")]),_:1})):t.createCommentVNode("",!0)]),_:1})]),_:1})])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.renderColumns,p=>{var y;return t.openBlock(),t.createElementBlock("th",{onClick:h=>o.toggleSort(p),class:t.normalizeClass([{sortable:p.sortable!==!1,active:p.key===((y=l.sorting)==null?void 0:y.key)},p.class])},[t.createVNode(m,{gap:"",vcenter:""},{default:t.withCtx(()=>{var h;return[t.createVNode(u,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(p.title),1)]),_:2},1024),p.key===((h=l.sorting)==null?void 0:h.key)?(t.openBlock(),t.createBlock(u,{key:0,class:"caret",shrink:""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.currentSortDirection==="asc"?"\u25B2":"\u25BC"),1)]),_:1})):t.createCommentVNode("",!0)]}),_:2},1024)],10,bh)}),256)),r.enableActions?(t.openBlock(),t.createElementBlock("th",xh,[t.renderSlot(e.$slots,"corner",{},void 0,!0)])):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.renderRows,(p,y)=>(t.openBlock(),t.createBlock(f,{enableSelection:r.enableSelection,enableActions:r.enableActions,key:p._id,"onClick:cell":o.clickCell,"onClick:row":o.clickRow,"onClick:select":o.clickSelect,"onClick:actions":o.clickActions,selected:o.isSelected(p),row:p,index:y,columns:r.columns},null,8,["enableSelection","enableActions","onClick:cell","onClick:row","onClick:select","onClick:actions","selected","row","index","columns"]))),128))])])],512)])}var xl=_(yh,[["render",Ch],["__scopeId","data-v-03eb874f"]]),Ir={exports:{}},wh=Object.prototype.hasOwnProperty;function Cl(e){return"[Throws: "+(e?e.message:"?")+"]"}function Vh(e,n){if(wh.call(e,n))try{return e[n]}catch(r){return Cl(r)}return e[n]}function wl(e){var n=[];function r(i){if(i===null||typeof i!="object")return i;if(n.indexOf(i)!==-1)return"[Circular]";if(n.push(i),typeof i.toJSON=="function")try{var l=r(i.toJSON());return n.pop(),l}catch(s){return Cl(s)}if(Array.isArray(i)){var o=i.map(r);return n.pop(),o}var a=Object.keys(i).reduce(function(s,c){return s[c]=r(Vh(i,c)),s},{});return n.pop(),a}return r(e)}Ir.exports=function(e,n,r){return JSON.stringify(wl(e),n,r)},Ir.exports.ensureProperties=wl;var $r=Ir.exports;function Eh(e,n){return e==null||n=="date"&&e.toString&&e.toString()==="Invalid Date"}function Vl(e){return e!=null}var H={props:{field:{type:Object,default(){return{}}},parentModel:{type:Object}},data(){return{value:this.modelValue}},watch:{modelValue(e,n){var r=this.cleanInput(e),i=this.cleanInput(this.model);$r(r)!=$r(i)&&(this.model=r)}},mounted(){this.checkAutofocus()},inject:["form","fieldPath"],computed:{optionLookup(){var e=this;return e.options.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{})},selectableOptions(){return this.options},required(){return this.minimum},model:{get(){var e=this.cleanOutput(this.value);return e},set(e){this.value=this.cleanInput(e),this.checkAutofocus(),this.dispatch()}},options(){var e=this;return(this.field.options||[]).reduce(function(n,r){if(!r)return n;const i=e.getValue(r);var o={title:r.title||r.name||r.label||i,value:i,source:r};return e.field.type=="reference"&&(o._id=i),n.push(o),n},[])},prefix(){return this.field.suffix},suffix(){return this.field.suffix},type(){return this.field.type||"string"},key(){return this.field.key},isGroup(){return this.type==="group"},asObject(){return this.isGroup&&!!this.field.asObject},layoutGroup(){return this.isGroup&&!this.field.asObject},canAddValue(){if(!this.singleValue)return this.maximum===0||this.numValues<this.maximum},canRemoveValue(){return this.numValues>this.minimum},widget(){return this.field.widget},singleValue(){if(this.asObject){var e=this.minimum===1&&this.maximum===1;return e}else return this.maximum===1},multiValue(){return!this.singleValue},label(){return this.field.title},title(){return this.label},plural(){return this.field.plural},description(){return this.field.description},placeholder(){return this.field.placeholder||this.field.hint},addLabel(){return this.numValues?`Add another ${this.label}`:`Add ${this.label}`},removeLabel(){return"Remove"},numValues(){return this.singleValue?1:(this.value||[]).length||0},showLabel(){return this.field.title},showDescription(){return this.description},fields(){var e=this.field.fields;if(e&&e.length)return e},minimum(){if(this.layoutGroup)return 1;var e=parseInt(this.field.minimum||0);return isNaN(e)&&(e=0),e=Math.max(e,0),e=this.maximum?Math.min(e,this.maximum):e,parseInt(e)},maximum(){if(this.layoutGroup)return 1;var e=parseInt(this.field.maximum||0);return isNaN(e)&&(e=0),e=Math.max(e,0),parseInt(e)},ask(){var e=parseInt(this.field.ask);return e=Math.max(e,this.minimum),this.maximum&&(e=Math.min(e,this.maximum)),e}},methods:{cleanTextInput(e,n,r){switch(n){case"url":e=r.$sdk.utils.parseURL(e);break;case"key":e=String(r.$sdk.utils.machineName(e||"")||"").trim();break;case"integer":e=parseInt(String(e).replace(/[^0-9-]/g,"")),isNaN(e)&&(e=void 0);break;case"number":case"decimal":case"float":e=Number(String(e).replace(/[^0-9.-]/g,"")),isNaN(e)&&(e=void 0);break}return e},checkAutofocus(){if(this.field.autofocus){if(this.value)return;this.$nextTick(function(){this.refocus()})}},getValue(e){if(!e)return this.cleanTextInput(e);var n=this.cleanTextInput(e._id||e.value),r=Vl(n);return!r&&e.title&&!this.returnObject&&(n=e.title),n=this.cleanTextInput(n),Vl(n)?n:e},getLabel(e){if(!!e){var n=e.title||e.name||e.label;return typeof n=="object"?"(no title)":n}},touch(){this.$emit("touched")},getNewDefaultEntry(){},add(){if(!!this.canAddValue){var e=this.cleanInputValue(this.getNewDefaultEntry());(!this.value||!Array.isArray(this.value))&&(this.value=[]),this.value.push(e),this.dispatch(),this.$nextTick(function(){this.refocus()}),this.touch()}},remove(e){var n=this.model.indexOf(e);this.value.splice(n,1),this.dispatch(),this.touch()},dispatch(){this.$emit("update:modelValue",this.value)},cleanInputValue(e){return e},cleanOutputValue(e){return e},cleanOutput(e){var n=this;return Eh(e,n.field.type)?n.multiValue?e=[]:e=void 0:n.multiValue?(Array.isArray(e)||(e=[]),e.forEach(function(r,i){e[i]=n.cleanOutputValue(r)})):e=n.cleanOutputValue(e),e},cleanInput(e){var n=this;if(n.multiValue){for(e||(e=[]),Array.isArray(e)||(e=[e]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum);e.length<n.minimum;)e.push(n.cleanInputValue(n.getNewDefaultEntry()));e=e.map(function(r){var i=n.cleanInputValue(r);return i})}else e&&(e=n.cleanInputValue(e));return e},refocus(){var e=this.$refs.input;if(!!e){var n;Array.isArray(e)?n=e[e.length-1]:n=e,n&&n.focus()}}}},eS="";function Bh(e){return e===void 0||typeof e=="undefined"||e===null||String(e)==="null"||String(e)==="undefined"}const Sh={props:{title:{type:String},modelValue:{}},mixins:[H],created(){this.model=this.model},methods:{cleanOutput(e){var n=this;return Bh(e)?n.multiValue?e=[]:e=void 0:n.multiValue?e=(e||[]).filter(function(r){return r!=null}).map(function(r){return n.getValue(r)}):e=n.getValue(e),e},cleanInput(e){var n=this;if(n.multiValue)e||(e=[]),Array.isArray(e)||(e=[e]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum),e=e.filter(function(i){return i!=null}).map(function(i){var l=n.getValue(i);return n.returnObject?n.optionLookup[l]:l});else{var r=n.getValue(e);switch(e=n.returnObject?n.optionLookup[r]:r,e){case"":switch(n.type){case"decimal":case"float":case"number":case"integer":e=void 0;break}break}}return e}},computed:{returnObject(){return this.type=="reference"},classes(){var e=[];return this.multiValue?e.push("multiple"):e.push("single"),e},optionLookup(){var e=this;return e.options.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{})},summary(){return this.model?this.getLabel(this.optionLookup[this.model]):this.title||"Click to select"},selectableOptions(){return this.options}}},Nh={key:0,class:"ux-field-title"},Th={key:0,class:"ux-required-marker"},Oh={key:1,class:"ux-field-description"},Dh={key:2,class:"ui-select-button"},Ah=["multiple"],Mh={key:0,value:""},Fh=["value"];function Ih(e,n,r,i,l,o){const a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["native-select",o.classes])},[e.showLabel?(t.openBlock(),t.createElementBlock("label",Nh,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Th,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Oh,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.singleValue?(t.openBlock(),t.createElementBlock("div",Dh,[t.renderSlot(e.$slots,"default",{},()=>[t.createVNode(a,{tag:"div"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1})],!0)])):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("select",{onFocus:n[0]||(n[0]=(...s)=>e.touch&&e.touch(...s)),multiple:e.multiValue,"onUpdate:modelValue":n[1]||(n[1]=s=>e.model=s)},[e.singleValue&&!e.minimum?(t.openBlock(),t.createElementBlock("option",Mh,"None")):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.selectableOptions,s=>(t.openBlock(),t.createElementBlock("option",{value:s.value},t.toDisplayString(s.title),9,Fh))),256))],40,Ah),[[t.vModelSelect,e.model]])],2)}var et=_(Sh,[["render",Ih],["__scopeId","data-v-a06c20f2"]]),tS="";const $h={props:{total:{type:Number,default(){return 0}},page:{type:Object,default(){return{size:50,index:1}}}},components:{NativeSelect:et},watch:{totalPages(){this.currentPage=0}},computed:{perPage:{get(){return this.pageModel.size},set(e){e=Math.max(e,1),this.pageModel.size=e,this.dispatch()}},pageField(){return{type:"integer",maximum:1,minimum:1,options:Array(this.totalPages).fill(1).map((e,n)=>e+n)}},totalPages(){return Math.ceil(this.total/this.perPage)},startIndex(){return(this.currentPage-1)*this.pageModel.size},displayStartIndex(){return this.total?this.startIndex+1:0},endIndex(){return Math.min(this.startIndex+this.pageModel.size,this.total)},currentPage:{get(){return this.pageModel.index},set(e){this.totalPages&&(e=Math.min(this.totalPages,e)),e=Math.max(e,1),this.pageModel.index=e,this.dispatch()}}},methods:{dispatch(){return this.$emit("update:page",this.pageModel)},previousPage(){this.currentPage--},nextPage(){this.currentPage++}},data(){return{pageModel:this.page,perPageField:{minimum:1,maximum:1,options:[{title:"50 per page",value:50},{title:"100 per page",value:100},{title:"250 per page",value:250},{title:"500 per page",value:500}]}}}};function Lh(e,n,r,i,l,o){const a=t.resolveComponent("native-select"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button"),u=t.resolveComponent("flex-row");return t.openBlock(),t.createBlock(u,{center:"",gap:""},{default:t.withCtx(()=>[t.createVNode(s,{shrink:"",class:"text"},{default:t.withCtx(()=>[t.createVNode(a,{modelValue:o.perPage,"onUpdate:modelValue":n[0]||(n[0]=m=>o.perPage=m),field:l.perPageField},{default:t.withCtx(()=>[e.$device.breakpoint.xs?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.displayStartIndex)+"-"+t.toDisplayString(o.endIndex)+" of "+t.toDisplayString(r.total),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Showing "+t.toDisplayString(o.displayStartIndex)+" to "+t.toDisplayString(o.endIndex)+" of "+t.toDisplayString(r.total)+" total",1)],64))]),_:1},8,["modelValue","field"])]),_:1}),t.createVNode(s),o.totalPages>1?(t.openBlock(),t.createBlock(s,{key:0,shrink:""},{default:t.withCtx(()=>[t.createVNode(u,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(s,{shrink:"",class:"text"},{default:t.withCtx(()=>[t.createVNode(a,{modelValue:o.currentPage,"onUpdate:modelValue":n[1]||(n[1]=m=>o.currentPage=m),field:o.pageField},{default:t.withCtx(()=>[e.$device.breakpoint.xs?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.currentPage)+"/"+t.toDisplayString(o.totalPages),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Page "+t.toDisplayString(o.currentPage)+" of "+t.toDisplayString(o.totalPages),1)],64))]),_:1},8,["modelValue","field"])]),_:1}),t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{icon:"",onClick:n[2]||(n[2]=m=>o.previousPage())},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-arrow-left"})]),_:1})]),_:1}),t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{icon:"",onClick:n[3]||(n[3]=m=>o.nextPage())},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-arrow-right"})]),_:1})]),_:1})]),_:1})]),_:1})):t.createCommentVNode("",!0)]),_:1})}var Uh=_($h,[["render",Lh],["__scopeId","data-v-93d2aed8"]]),nS="";const Ph={props:{id:{type:[Object,String]}},computed:{stringID(){return this.$sdk.utils.id(this.id)},url(){}}},jh={class:"avatar"};function Rh(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",jh)}var El=_(Ph,[["render",Rh]]),rS="";const zh={props:{large:{type:Boolean}}},qh=[(e=>(t.pushScopeId("data-v-27f20370"),e=e(),t.popScopeId(),e))(()=>t.createElementVNode("i",{class:"fa fa-spin fa-spinner"},null,-1))];function Hh(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-spinner",{large:r.large}])},qh,2)}var Lr=_(zh,[["render",Hh],["__scopeId","data-v-27f20370"]]),lS="";const Gh={components:{Spinner:Lr},props:{to:{type:[Object,String]},icon:{type:Boolean},color:{type:String,default:"default"},bgColor:{type:String},fgColor:{type:String},tag:{type:String},href:{type:String},target:{type:String},loading:{type:Boolean},active:{type:Boolean},disabled:{type:Boolean},block:{type:Boolean},size:{type:String,default:"md"}},computed:{style(){var e={};return this.bgColor&&(e.backgroundColor=this.bgColor),this.fgColor&&(e.color=this.fgColor),e},classes(){var e=[];return e.push(`ux-btn-${this.size}`),this.block&&e.push("ux-btn-block"),this.loading&&e.push("ux-btn-loading"),this.active&&e.push("ux-btn-active"),this.icon&&e.push("ux-btn-icon"),e.push(`ux-btn-color-${this.color}`),this.disabled&&e.push("ux-btn-disabled"),e},element(){switch(this.tag){case"span":return this.tag;case"submit":return"button";default:return this.to||this.href?"ux-link":this.tag||"button"}}}},Wh={class:"ux-btn-text"};function Kh(e,n,r,i,l,o){const a=t.resolveComponent("spinner");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.element),{active:r.active,loading:r.loading,to:r.to,href:r.href,target:r.target,style:t.normalizeStyle(o.style),class:t.normalizeClass([o.classes,"ux-btn"]),disabled:r.disabled},{default:t.withCtx(()=>[r.loading?(t.openBlock(),t.createBlock(a,{key:0})):t.createCommentVNode("",!0),t.createElementVNode("span",Wh,[t.renderSlot(e.$slots,"default",{},void 0,!0)])]),_:3},8,["active","loading","to","href","target","style","class","disabled"])}var Bl=_(Gh,[["render",Kh],["__scopeId","data-v-56c95efc"]]),aS="";const Zh={props:{value:{type:Boolean,default(){return!1}}},computed:{classes(){var e=[];return this.value?e.push("ux-checkbox-true"):e.push("ux-checkbox-false"),e}}};function Yh(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["ux-checkbox",o.classes])},[t.createVNode(a,{class:"icon",icon:"fa-check"})],2)}var Ur=_(Zh,[["render",Yh],["__scopeId","data-v-6b7b7539"]]),sS="";const Xh={props:{value:{type:Boolean,default(){return!1}},loading:{type:Boolean,default(){return!1}}},computed:{classes(){var e=[];return this.value?e.push("ux-switch-true"):e.push("ux-switch-false"),this.loading&&e.push("ux-switch-loading"),e}}};function Jh(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass(["ux-switch",o.classes])},[t.createElementVNode("span",null,[t.createVNode(a,{spin:"",icon:"fa-spinner"})])],2)}var Sl=_(Xh,[["render",Jh],["__scopeId","data-v-57a418e1"]]),cS="";const Qh={props:{to:{type:[Object,String]},href:{type:String},target:{type:String},disabled:{type:Boolean}},methods:{clicked(e){var n=this;if(n.to&&(n.buildMode||n.nuxtMode))return e.preventDefault(),e.stopImmediatePropagation(),n.$sdk.app.to(n.to);if(n.href&&(n.buildMode||n.nuxtMode)){e.preventDefault(),e.stopImmediatePropagation();return}}},computed:{actualHref(){if(this.href)return this.href;if(this.nuxtMode)return this.$sdk.app.createHref(this.to)},nuxtMode(){return this.to&&this.$sdk.nuxt&&this.$sdk.app&&this.$sdk.app.createHref},buildMode(){return!!this.$sdk&&this.$sdk.app&&this.$sdk.app.builder},class(){var e=[];return this.disabled&&e.push("disabled"),(this.href||this.to)&&e.push("haslink"),e},element(){return this.nuxtMode||this.buildMode?"a":this.to?"router-link":"a"}}};function vh(e,n,r,i,l,o){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.element),{onClick:o.clicked,to:r.to,href:o.actualHref,target:r.target,class:t.normalizeClass([o.class,"ux-link"])},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["onClick","to","href","target","class"])}var Nl=_(Qh,[["render",vh],["__scopeId","data-v-8b82829a"]]),dS="";const ey={props:{icon:{type:[Object,String]},spin:{type:Boolean},left:{type:Boolean},right:{type:Boolean}},computed:{classes(){var e=[];return e.push(this.icon),this.spin&&e.push("fa-spin"),this.left&&e.push("ux-icon-left"),this.right&&e.push("ux-icon-right"),e},element(){return"i"}}};function ty(e,n,r,i,l,o){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.element),{class:t.normalizeClass(["ux-icon fa",o.classes])},null,8,["class"])}var Tl=_(ey,[["render",ty],["__scopeId","data-v-1764a3d0"]]),Ln={cache:{}},uS="";const ny={props:{group:{type:String},right:{type:Boolean,default:!1},bottom:{type:Boolean,default:!1},stop:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default(){return!0}},modelValue:{type:Boolean,default(){return!1}}},data(){return{outerStyle:{},innerStyle:{},isExpanded:this.modelValue,triggerEvent:null,refMenu:null,mounted:!1}},watch:{modelValue(e){this.expanded=e}},mounted(){this.refMenu=this.$refs.menu,this.mounted=!0},beforeUnmount(){this.removeListeners(),this.refMenu=null,this.mounted=!1,Ln.cache[this.group]===this&&(Ln.cache[this.group]=null)},methods:{removeListeners(){document.removeEventListener("click",this.globalClick),this.refMenu&&this.refMenu.removeEventListener("click",this.immediateClick)},addEventListeners(){document.addEventListener("click",this.globalClick),this.refMenu&&this.refMenu.addEventListener("click",this.immediateClick)},immediateClick(e){this.expanded&&this.closeOnClick&&(e.stopImmediatePropagation(),this.expanded=!1)},globalClick(e){if(this.triggerEvent!==e){var n=this.$refs.menu,r=e.srcElement;n&&n.contains(r)?this.closeOnClick&&(this.expanded=!1):this.expanded=!1}},position(){const e=this.$el.getBoundingClientRect();this.outerStyle.left=`${e.left+window.scrollX}px`,this.outerStyle.top=`${e.bottom+window.scrollY}px`,this.right&&(this.innerStyle.right=`-${e.width}px`),this.bottom&&(this.innerStyle.bottom=`${e.height}px`);var n=this.getMaxZIndex();this.outerStyle.zIndex=n},getMaxZIndex(){return Math.max(...Array.from(document.querySelectorAll("body *"),e=>parseFloat(window.getComputedStyle(e).zIndex)).filter(e=>!Number.isNaN(e)),0)},close(){this.expanded=!1}},computed:{expanded:{get(){return this.isExpanded},set(e){var n;this.group&&(n=Ln.cache[this.group]),this.isExpanded!=e&&(this.isExpanded=e,e?(this.position(),this.addEventListeners(),Ln.cache[this.group]=this,n&&n!=this&&(n.expanded=!1)):this.removeListeners(),this.$emit("update:modelValue",e))}},on(){var e=this;return{click(n){e.stop&&n.stopImmediatePropagation(),e.triggerEvent=n,e.expanded=!e.expanded}}}}};function ry(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-menu",{right:r.right}])},[t.createElementVNode("span",null,[t.renderSlot(e.$slots,"activator",{on:o.on},void 0,!0)]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[l.isExpanded?(t.openBlock(),t.createElementBlock("div",{key:0,class:"ux-menu-outer",style:t.normalizeStyle(l.outerStyle)},[t.createElementVNode("div",{class:"ux-menu-panel",ref:"menu",style:t.normalizeStyle(l.innerStyle)},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4)],4)):t.createCommentVNode("",!0)]))],2)}var Ol=_(ny,[["render",ry],["__scopeId","data-v-29d476a2"]]);const oy={name:"menulist",props:{items:{type:Array,default(){return[]}},expandOn:{type:String,default:"none"}},computed:{filteredItems(){return this.items.filter(function(e){return!e.disabled})}},methods:{toggle(e){e.expanded=!e.expanded,e.collapsed=!e.expanded}},data(){return{}}};function iy(e,n,r,i,l,o){const a=t.resolveComponent("ux-link"),s=t.resolveComponent("menulist",!0);return t.openBlock(),t.createElementBlock("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.filteredItems,c=>{var d;return t.openBlock(),t.createElementBlock("li",{class:t.normalizeClass({expanded:c.expanded,collapsed:c.collapsed})},[r.expandOn==="click"&&((d=c.items)==null?void 0:d.length)?(t.openBlock(),t.createBlock(a,{key:0,onClick:t.withModifiers(u=>o.toggle(c),["stop","prevent"]),class:t.normalizeClass(c.class)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.title),1)]),_:2},1032,["onClick","class"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[c.type==="url"?(t.openBlock(),t.createBlock(a,{key:0,class:t.normalizeClass(c.class),target:c.target,href:c.href||c.url},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.title),1)]),_:2},1032,["class","target","href"])):c.type==="route"?(t.openBlock(),t.createBlock(a,{key:1,class:t.normalizeClass(c.class),to:{name:c.route}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.title),1)]),_:2},1032,["class","to"])):t.createCommentVNode("",!0)],64)),c.items&&c.items.length?(t.openBlock(),t.createBlock(s,{key:2,items:c.items},null,8,["items"])):t.createCommentVNode("",!0)],2)}),256))])}var Dl=_(oy,[["render",iy]]),mS="";const ly={props:{item:{type:[Object,String]},alt:{type:String},width:{type:[Number,String]},height:{type:[Number,String]},inline:{type:Boolean},quality:{type:[Number,String]},contain:{type:Boolean,default:!0},preview:{type:Boolean,default:!1},crop:{type:Boolean},format:{type:String},upscale:{type:Boolean,default:!0},type:{type:String,default:"image"},svg:{type:Boolean}},data(){return{model:this.item}},computed:{altText(){return this.alt||this.model.title},className(){var e=[];return this.portrait&&e.push("img-portrait"),e.join(" ")},isSvg(){var e;if(this.svg)return!0;switch((e=this.item)==null?void 0:e.fileMime){case"image/svg+xml":case"image/svg":return!0}},portrait(){return this.crop?this.dimensionHeight>this.dimensionWidth:this.modelHeight>this.modelWidth},imageWidth(){return parseInt(this.width)},imageHeight(){return parseInt(this.height)},modelWidth(){var e;return parseInt((e=this.model)==null?void 0:e.width)},modelHeight(){var e;return parseInt((e=this.model)==null?void 0:e.height)},id(){return this.$sdk.utils.id(this.model)},params(){var e={};return e.access_token=this.$sdk.auth.getCurrentToken(),this.imageWidth&&(e.w=this.imageWidth?this.imageWidth:null),this.imageHeight&&(e.h=this.imageHeight?this.imageHeight:null),this.crop?e.c=!0:this.contain||(e.c=this.imageWidth&&this.imageHeight),this.quality&&(e.q=parseInt(this.quality)),this.upscale&&(e.u=!0),this.format&&(e.f=this.format),e},src(){return this.$sdk.api.generateEndpointURL(`/${this.type}/${this.id}`,this.params,{file:!0})},previewSrc(){var e=Object.assign({},this.params);return e.w=50,delete e.h,this.$sdk.api.generateEndpointURL(`/${this.type}/${this.id}`,e,{file:!0})},imageStyle(){var e={};return this.crop||(e["object-fit"]="contain"),this.inline?e.maxWidth="100%":(e.width="100%",e.height="100%",e.top="0",e.left="0",e.position="absolute"),e},dimensionWidth(){return this.imageWidth&&this.imageHeight?this.imageWidth:this.modelWidth},dimensionHeight(){return this.imageWidth&&this.imageHeight?this.imageHeight:this.modelHeight},style(){var r,i,l;var e={};this.inline?e.display="inline-block":this.dimensionHeight&&this.dimensionWidth&&(e.height=0,e.overflow="hidden",e.paddingBottom=`${this.dimensionHeight/this.dimensionWidth*100}%`,e.position="relative");var n=(l=(i=(r=this.model)==null?void 0:r.fileMeta)==null?void 0:i.colors)==null?void 0:l.colors;return n&&n.length&&(e.backgroundColor=n[0]),this.isSvg||this.preview&&(e.backgroundImage=`url(${this.previewSrc})`),e}}},ay=["alt","data"],sy=["alt","src"];function cy(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-image",o.className]),style:t.normalizeStyle(o.style)},[r.svg?(t.openBlock(),t.createElementBlock("object",{key:0,alt:o.altText,type:"image/svg+xml",data:o.src},null,8,ay)):(t.openBlock(),t.createElementBlock("img",{key:1,alt:o.altText,style:t.normalizeStyle(o.imageStyle),src:o.src},null,12,sy))],6)}var Al=_(ly,[["render",cy],["__scopeId","data-v-1fa4f40e"]]),fS="";const dy={props:{value:{type:Number}},computed:{classes(){var e=[];return e.push(this.icon),this.spin&&e.push("fa-spin"),this.left&&e.push("ux-icon-left"),this.right&&e.push("ux-icon-right"),e},percent(){return this.value},barStyle(){return{width:`${this.percent}%`}},element(){return"i"}}},uy=e=>(t.pushScopeId("data-v-317a7690"),e=e(),t.popScopeId(),e),my={class:"ux-progress"},fy=uy(()=>t.createElementVNode("div",{class:"ux-progress-bg"},null,-1));function py(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",my,[fy,t.createElementVNode("div",{class:"ux-progress-fg",style:t.normalizeStyle(o.barStyle)},null,4)])}var Ml=_(dy,[["render",py],["__scopeId","data-v-317a7690"]]),pS="";const hy={},yy={class:"ux-list"};function gy(e,n){return t.openBlock(),t.createElementBlock("ul",yy,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var Fl=_(hy,[["render",gy],["__scopeId","data-v-98e1e4e2"]]),hS="";const _y={},ky={class:"ux-list-item"};function by(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",ky,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var Il=_(_y,[["render",by],["__scopeId","data-v-0e73c260"]]),yS="";function tn(e){var n=new Date(e);if(n instanceof Date&&!isNaN(n))return n}const xy={props:{modelValue:{type:Object}},data(){return{model:this.modelValue}},computed:{startDate:{get(){var e;return(e=tn(this.model.startDate))==null?void 0:e.toISOString().slice(0,10)},set(e){e=tn(e),e?this.model.startDate=e:this.model.startDate=void 0}},endDate:{get(){var e;return(e=tn(this.model.endDate))==null?void 0:e.toISOString().slice(0,10)},set(e){e=tn(e),tn(e)?this.model.endDate=e:this.model.endDate=void 0}}},watch:{model(e){this.$emit("updated:modelValue",e)},modelValue(e){this.model=e}}},$l=e=>(t.pushScopeId("data-v-61cbf45e"),e=e(),t.popScopeId(),e),Cy=$l(()=>t.createElementVNode("label",null,"From Date",-1)),wy=$l(()=>t.createElementVNode("label",null,"To Date",-1));function Vy(e,n,r,i,l,o){const a=t.resolveComponent("flex-cell"),s=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(s,{wrap:"",gap:"",vcenter:""},{default:t.withCtx(()=>[t.createVNode(a,{class:"cell"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[Cy,t.withDirectives(t.createElementVNode("input",{type:"date",class:"ux-field-focus ux-text-input-multiple",ref:"input","onUpdate:modelValue":n[0]||(n[0]=c=>o.startDate=c)},null,512),[[t.vModelText,o.startDate]])])]),_:1}),t.createVNode(a,{class:"cell"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[wy,t.withDirectives(t.createElementVNode("input",{type:"date",class:"ux-field-focus ux-text-input-multiple",ref:"input","onUpdate:modelValue":n[1]||(n[1]=c=>o.endDate=c)},null,512),[[t.vModelText,o.endDate]])])]),_:1})]),_:1})])}var Ll=_(xy,[["render",Vy],["__scopeId","data-v-61cbf45e"]]),gS="";const Ey={props:{modelValue:{type:[Object,Array]}},components:{NativeSelect:et},mixins:[H],async created(){var e=await this.$sdk.system.countries(),n=e.reduce(function(r,i){if(!i.countryCallingCodes||!i.countryCallingCodes.length)return r;var l=`${i.name} (${i.countryCallingCodes.join(", ")})`,o=l;return r.values[o]||(r.values[o]=!0,r.lookup[i.alpha2]=i,r.value.push({title:`${l} - ${i.emoji}`,value:i.alpha2,emoji:i.emoji})),r},{value:[],values:{},lookup:{}});this.countryCodes=n.value,this.lookup=n.lookup},data(){return{countryCodes:[],lookup:{}}},computed:{actualPlaceholder(){return"+61 000 000 000"},countryCodeField(){return{minimum:0,maximum:1,type:"string",options:this.countryCodes}},defaultCountryCode(){var e=this.user?this.user.countryCode:"",n=this.user&&this.user.organisation?this.user.organisation.countryCode:"";return e||n}},methods:{getNewDefaultEntry(){return{label:"",countryCode:this.defaultCountryCode,number:""}}}},By=e=>(t.pushScopeId("data-v-32219a94"),e=e(),t.popScopeId(),e),Sy={key:0,class:"ux-field-title"},Ny={key:0,class:"ux-required-marker"},Ty={key:1,class:"ux-field-description"},Oy={key:2},Dy={key:0},Ay={key:1},My={class:"ux-text-wrap"},Fy=["placeholder","onUpdate:modelValue"],Iy=By(()=>t.createElementVNode("option",{value:""},"None",-1)),$y=["value"],Ly={class:"ux-text-wrap"},Uy=["placeholder"];function Py(e,n,r,i,l,o){const a=t.resolveComponent("ux-button"),s=t.resolveComponent("native-select"),c=t.resolveComponent("flex-cell"),d=t.resolveComponent("ux-icon"),u=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.showLabel?(t.openBlock(),t.createElementBlock("label",Sy,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Ny,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Ty,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",Oy,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.model,(m,f)=>(t.openBlock(),t.createBlock(u,{gap:"",vcenter:"",wrap:"",class:"ux-text-row",key:f},{default:t.withCtx(()=>[t.createVNode(c,{shrink:""},{default:t.withCtx(()=>[t.createVNode(s,{modelValue:m.countryCode,"onUpdate:modelValue":p=>m.countryCode=p,field:o.countryCodeField},{default:t.withCtx(()=>[t.createVNode(a,{tag:"a"},{default:t.withCtx(()=>[m.countryCode?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[l.lookup[m.countryCode]?(t.openBlock(),t.createElementBlock("div",Dy,t.toDisplayString(l.lookup[m.countryCode].emoji)+" - "+t.toDisplayString(l.lookup[m.countryCode].alpha2),1)):(t.openBlock(),t.createElementBlock("div",Ay,"Loading"))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(" Country Code ")],64))]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue","field"])]),_:2},1024),t.createVNode(c,null,{default:t.withCtx(()=>[t.createElementVNode("div",My,[t.withDirectives(t.createElementVNode("input",{class:"ux-field-focus ux-text-input-multiple",placeholder:o.actualPlaceholder,onFocus:n[0]||(n[0]=(...p)=>e.touch&&e.touch(...p)),ref_for:!0,ref:"input",onKeydown:n[1]||(n[1]=t.withKeys(t.withModifiers(p=>e.add(),["stop","prevent"]),["enter"])),"onUpdate:modelValue":p=>m.number=p},null,40,Fy),[[t.vModelText,m.number]])])]),_:2},1024),t.createVNode(c,{shrink:"",vcenter:""},{default:t.withCtx(()=>[e.canRemoveValue?(t.openBlock(),t.createBlock(a,{key:0,tag:"a",icon:"",onClick:p=>e.remove(m)},{default:t.withCtx(()=>[t.createVNode(d,{icon:"fa-times"})]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),128)),e.canAddValue?(t.openBlock(),t.createBlock(a,{key:0,onClick:n[2]||(n[2]=m=>e.add())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.addLabel)+" ",1),t.createVNode(d,{icon:"fa-plus",right:""})]),_:1})):t.createCommentVNode("",!0)])):(t.openBlock(),t.createBlock(u,{wrap:"",class:"ux-text-row",key:e.index},{default:t.withCtx(()=>[t.createVNode(c,{shrink:""},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("select",{class:"ux-country-code-select","onUpdate:modelValue":n[3]||(n[3]=m=>e.model.countryCode=m)},[Iy,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.countryCodes,m=>(t.openBlock(),t.createElementBlock("option",{value:m.value},t.toDisplayString(m.title),9,$y))),256))],512),[[t.vModelSelect,e.model.countryCode]])]),_:1}),t.createVNode(c,null,{default:t.withCtx(()=>[t.createElementVNode("div",Ly,[t.withDirectives(t.createElementVNode("input",{class:"ux-field-focus ux-text-input-multiple",placeholder:o.actualPlaceholder,onFocus:n[4]||(n[4]=(...m)=>e.touch&&e.touch(...m)),ref:"input",onKeydown:n[5]||(n[5]=t.withKeys(t.withModifiers(m=>e.add(),["stop","prevent"]),["enter"])),"onUpdate:modelValue":n[6]||(n[6]=m=>e.model.number=m)},null,40,Uy),[[t.vModelText,e.model.number]])])]),_:1})]),_:1}))],64)}var jy=_(Ey,[["render",Py],["__scopeId","data-v-32219a94"]]),_S="";function Ry(e){return e===void 0||typeof e=="undefined"||e===null||String(e)==="null"||String(e)==="undefined"}const zy={props:{modelValue:{}},mixins:[H],created(){this.model=this.model},methods:{cleanOutput(e){var n=this;return Ry(e)?n.multiValue?e=[]:e=void 0:n.multiValue?e=(e||[]).filter(Boolean).map(function(r){return n.getValue(r)}):e=n.getValue(e),e},cleanInput(e){var n=this;if(n.multiValue)e||(e=[]),Array.isArray(e)||(e=[e]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum),e=e.filter(Boolean).map(function(i){var l=n.getValue(i);return n.returnObject?n.optionLookup[l]:l});else{var r=n.getValue(e);e=n.returnObject?n.optionLookup[r]:r}return e}},computed:{returnObject(){return this.type=="reference"},classes(){var e=[];return this.multiValue?e.push("multiple"):e.push("single"),e},optionLookup(){var e=this;return e.options.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{})},summary(){return this.getLabel(this.optionLookup[this.model])||"Click to select"},options(){return["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Mexico_City","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kathmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Hobart","Australia/Lindeman","Australia/Melbourne","Australia/Perth","Australia/Sydney","CST6CDT","EST5EDT","Etc/GMT","Etc/GMT+1","Etc/GMT+10","Etc/GMT+11","Etc/GMT+12","Etc/GMT+2","Etc/GMT+3","Etc/GMT+4","Etc/GMT+5","Etc/GMT+6","Etc/GMT+7","Etc/GMT-1","Etc/GMT-10","Etc/GMT-11","Etc/GMT-12","Etc/GMT-13","Etc/GMT-2","Etc/GMT-3","Etc/GMT-4","Etc/GMT-5","Etc/GMT-6","Etc/GMT-7","Etc/GMT-8","Etc/GMT-9","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Nicosia","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","MST7MDT","PST8PDT","Pacific/Apia","Pacific/Auckland","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis"].map(function(e){return{title:e,value:e}})},selectableOptions(){return this.options}}},qy={key:0,class:"ux-field-title"},Hy={key:0,class:"ux-required-marker"},Gy={key:1,class:"ux-field-description"},Wy={key:2,class:"ui-select-button"},Ky=["multiple"],Zy={key:0,value:""},Yy=["value"];function Xy(e,n,r,i,l,o){const a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["native-select",o.classes])},[e.showLabel?(t.openBlock(),t.createElementBlock("label",qy,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Hy,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Gy,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.singleValue?(t.openBlock(),t.createElementBlock("div",Wy,[t.renderSlot(e.$slots,"default",{},()=>[t.createVNode(a,{tag:"div"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1})],!0)])):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("select",{onFocus:n[0]||(n[0]=(...s)=>e.touch&&e.touch(...s)),multiple:e.multiValue,"onUpdate:modelValue":n[1]||(n[1]=s=>e.model=s)},[e.singleValue&&!e.minimum?(t.openBlock(),t.createElementBlock("option",Zy,"None")):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.selectableOptions,s=>(t.openBlock(),t.createElementBlock("option",{value:s.value},t.toDisplayString(s.title),9,Yy))),256))],40,Ky),[[t.vModelSelect,e.model]])],2)}var Jy=_(zy,[["render",Xy],["__scopeId","data-v-a15362c8"]]),kS="";const Qy={props:{item:{type:Object,required:!0}},computed:{basicType(){var e,n;return(n=(e=this.item)==null?void 0:e.meta)==null?void 0:n.type},hasImage(){switch(this.basicType){case"image":case"video":case"profile":return!0}},title(){return this.item.title||this.item.name||this.item.label||(this.item.firstName?`${this.item.firstName} ${this.item.lastName}`:"(Title unknown)")}},methods:{clicked(){this.$sdk.dispatch("item:view",this.item)}}};function vy(e,n,r,i,l,o){const a=t.resolveComponent("ux-image"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock("div",{class:"content-item",onClick:n[0]||(n[0]=(...d)=>o.clicked&&o.clicked(...d))},[t.createVNode(c,{gap:"",vcenter:""},{default:t.withCtx(()=>[o.hasImage?(t.openBlock(),t.createBlock(s,{key:0,shrink:""},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["image-wrapper",o.basicType])},[t.createVNode(a,{item:r.item,width:100,height:100},null,8,["item"])],2)]),_:1})):t.createCommentVNode("",!0),t.createVNode(s,{vcenter:""},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.renderSlot(e.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(o.title),1)],!0)])]),_:3}),t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"actions",{},void 0,!0)]),_:3})]),_:3})])}var Ul=_(Qy,[["render",vy],["__scopeId","data-v-055fac6a"]]);/**!
|
|
1
|
+
var NB=Object.defineProperty,TB=Object.defineProperties;var OB=Object.getOwnPropertyDescriptors;var lr=Object.getOwnPropertySymbols;var ws=Object.prototype.hasOwnProperty,Vs=Object.prototype.propertyIsEnumerable;var Cs=(x,t,de)=>t in x?NB(x,t,{enumerable:!0,configurable:!0,writable:!0,value:de}):x[t]=de,B=(x,t)=>{for(var de in t||(t={}))ws.call(t,de)&&Cs(x,de,t[de]);if(lr)for(var de of lr(t))Vs.call(t,de)&&Cs(x,de,t[de]);return x},ke=(x,t)=>TB(x,OB(t));var ko=(x,t)=>{var de={};for(var Ae in x)ws.call(x,Ae)&&t.indexOf(Ae)<0&&(de[Ae]=x[Ae]);if(x!=null&&lr)for(var Ae of lr(x))t.indexOf(Ae)<0&&Vs.call(x,Ae)&&(de[Ae]=x[Ae]);return de};(function(x,t){typeof exports=="object"&&typeof module!="undefined"?t(exports,require("vue"),require("@qikdev/sdk")):typeof define=="function"&&define.amd?define(["exports","vue","@qikdev/sdk"],t):(x=typeof globalThis!="undefined"?globalThis:x||self,t(x["@qikdev/vue-ui"]={},x.Vue,x["@qikdev/sdk"]))})(this,function(x,t,de){"use strict";const Ae="0.2.41";var DB="",_=(e,n)=>{const r=e.__vccOpts||e;for(const[i,l]of n)r[i]=l;return r};const Es={},Bs={class:"flex-column"};function Ss(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",Bs,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var bo=_(Es,[["render",Ss],["__scopeId","data-v-203ea86f"]]),AB="";const Ns={},Ts={class:"flex-column-body"};function Os(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",Ts,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var xo=_(Ns,[["render",Os],["__scopeId","data-v-64850355"]]),MB="";const Ds={},As={class:"flex-column-header"};function Ms(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",As,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var Co=_(Ds,[["render",Ms],["__scopeId","data-v-10b28f00"]]),FB="";const Fs={},Is={class:"flex-column-footer"};function $s(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",Is,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var wo=_(Fs,[["render",$s],["__scopeId","data-v-68216a72"]]),IB="";const Ls={},Us={class:"flex-cell"};function Ps(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",Us,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var Vo=_(Ls,[["render",Ps],["__scopeId","data-v-644bb279"]]),$B="";const js={},Rs={class:"flex-row"};function zs(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",Rs,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var Eo=_(js,[["render",zs],["__scopeId","data-v-5b76ad1f"]]),LB="";const qs={},Hs={class:"flex-spacer"};function Gs(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",Hs)}var Bo=_(qs,[["render",Gs],["__scopeId","data-v-35b15579"]]),UB="";const Ws={},Ks={class:"panel"};function Zs(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",Ks,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var So=_(Ws,[["render",Zs],["__scopeId","data-v-50ae77fc"]]),PB="";const Ys={},Xs={class:"panel-body"};function Js(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",Xs,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var No=_(Ys,[["render",Js],["__scopeId","data-v-c82dca76"]]),jB="";const Qs={},vs={class:"panel-header"};function ec(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",vs,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var To=_(Qs,[["render",ec],["__scopeId","data-v-13bf11da"]]),RB="";const tc={},nc={class:"panel-footer"};function rc(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",nc,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var Oo=_(tc,[["render",rc],["__scopeId","data-v-b4f4786a"]]),zB="";const oc={props:{vertical:{type:Boolean}},data(){return{activeIndex:0}},methods:{select(e){this.activeIndex=e}},computed:{tabs(){return this.$slots.default().map(function(r){var i;if(!!r.props&&((i=r.props)==null?void 0:i.enabled)!==!1)return r}).filter(Boolean)}}},ic=["onClick"],lc=["onClick"];function ac(e,n,r,i,l,o){const a=t.resolveComponent("flex-body"),s=t.resolveComponent("flex-column"),c=t.resolveComponent("flex-row"),d=t.resolveComponent("flex-header");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-tabset",{vertical:r.vertical,horizontal:!r.vertical}])},[r.vertical?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(s,{class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.tabs,(u,m)=>(t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass({active:m===l.activeIndex}),key:`tab-link-${u.props.heading}`,onClick:f=>o.select(m)},t.toDisplayString(u.props.heading),11,ic))),128))]),_:1})]),_:1}),t.createVNode(s,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.tabs,(u,m)=>t.withDirectives((t.openBlock(),t.createBlock(s,{key:`tab-panel-${u.props.heading}`},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u)))]),_:2},1024)),[[t.vShow,m===l.activeIndex]])),128))]),_:1})],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(d,{class:"tabset-menu"},{default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.tabs,(u,m)=>(t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass({active:m===l.activeIndex}),key:`tab-link-${u.props.heading}`,onClick:f=>o.select(m)},t.toDisplayString(u.props.heading),11,lc))),128))]),_:1})]),_:1}),t.createVNode(s,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.tabs,(u,m)=>t.withDirectives((t.openBlock(),t.createBlock(s,{key:`tab-panel-${u.props.heading}`},{default:t.withCtx(()=>[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u)))]),_:2},1024)),[[t.vShow,m===l.activeIndex]])),128))]),_:1})],64))],2)}var Do=_(oc,[["render",ac],["__scopeId","data-v-621f2a2f"]]);const sc={props:{heading:{type:String,required:!0},enabled:{type:Boolean,default:!0}},data(){return{isActive:!1}},computed:{active:{get(){return this.isActive},set(e){this.isActive=e}}}};function cc(e,n,r,i,l,o){const a=t.resolveComponent("flex-column");return t.openBlock(),t.createBlock(a,null,{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3})}var Ao=_(sc,[["render",cc]]),yn=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},dc=Array.isArray,Rt=dc,uc=typeof yn=="object"&&yn&&yn.Object===Object&&yn,Mo=uc,mc=Mo,fc=typeof self=="object"&&self&&self.Object===Object&&self,pc=mc||fc||Function("return this")(),zt=pc,hc=zt,yc=hc.Symbol,ar=yc,Fo=ar,Io=Object.prototype,gc=Io.hasOwnProperty,_c=Io.toString,qt=Fo?Fo.toStringTag:void 0;function kc(e){var n=gc.call(e,qt),r=e[qt];try{e[qt]=void 0;var i=!0}catch{}var l=_c.call(e);return i&&(n?e[qt]=r:delete e[qt]),l}var bc=kc,xc=Object.prototype,Cc=xc.toString;function wc(e){return Cc.call(e)}var Vc=wc,$o=ar,Ec=bc,Bc=Vc,Sc="[object Null]",Nc="[object Undefined]",Lo=$o?$o.toStringTag:void 0;function Tc(e){return e==null?e===void 0?Nc:Sc:Lo&&Lo in Object(e)?Ec(e):Bc(e)}var Ht=Tc;function Oc(e){return e!=null&&typeof e=="object"}var Gt=Oc,Dc=Ht,Ac=Gt,Mc="[object Symbol]";function Fc(e){return typeof e=="symbol"||Ac(e)&&Dc(e)==Mc}var gn=Fc,Ic=Rt,$c=gn,Lc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Uc=/^\w*$/;function Pc(e,n){if(Ic(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||$c(e)?!0:Uc.test(e)||!Lc.test(e)||n!=null&&e in Object(n)}var jc=Pc;function Rc(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}var _n=Rc,zc=Ht,qc=_n,Hc="[object AsyncFunction]",Gc="[object Function]",Wc="[object GeneratorFunction]",Kc="[object Proxy]";function Zc(e){if(!qc(e))return!1;var n=zc(e);return n==Gc||n==Wc||n==Hc||n==Kc}var Uo=Zc,Yc=zt,Xc=Yc["__core-js_shared__"],Jc=Xc,sr=Jc,Po=function(){var e=/[^.]+$/.exec(sr&&sr.keys&&sr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Qc(e){return!!Po&&Po in e}var vc=Qc,ed=Function.prototype,td=ed.toString;function nd(e){if(e!=null){try{return td.call(e)}catch{}try{return e+""}catch{}}return""}var rd=nd,od=Uo,id=vc,ld=_n,ad=rd,sd=/[\\^$.*+?()[\]{}|]/g,cd=/^\[object .+?Constructor\]$/,dd=Function.prototype,ud=Object.prototype,md=dd.toString,fd=ud.hasOwnProperty,pd=RegExp("^"+md.call(fd).replace(sd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function hd(e){if(!ld(e)||id(e))return!1;var n=od(e)?pd:cd;return n.test(ad(e))}var yd=hd;function gd(e,n){return e==null?void 0:e[n]}var _d=gd,kd=yd,bd=_d;function xd(e,n){var r=bd(e,n);return kd(r)?r:void 0}var jo=xd,Cd=jo,wd=Cd(Object,"create"),kn=wd,Ro=kn;function Vd(){this.__data__=Ro?Ro(null):{},this.size=0}var Ed=Vd;function Bd(e){var n=this.has(e)&&delete this.__data__[e];return this.size-=n?1:0,n}var Sd=Bd,Nd=kn,Td="__lodash_hash_undefined__",Od=Object.prototype,Dd=Od.hasOwnProperty;function Ad(e){var n=this.__data__;if(Nd){var r=n[e];return r===Td?void 0:r}return Dd.call(n,e)?n[e]:void 0}var Md=Ad,Fd=kn,Id=Object.prototype,$d=Id.hasOwnProperty;function Ld(e){var n=this.__data__;return Fd?n[e]!==void 0:$d.call(n,e)}var Ud=Ld,Pd=kn,jd="__lodash_hash_undefined__";function Rd(e,n){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Pd&&n===void 0?jd:n,this}var zd=Rd,qd=Ed,Hd=Sd,Gd=Md,Wd=Ud,Kd=zd;function kt(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var i=e[n];this.set(i[0],i[1])}}kt.prototype.clear=qd,kt.prototype.delete=Hd,kt.prototype.get=Gd,kt.prototype.has=Wd,kt.prototype.set=Kd;var Zd=kt;function Yd(){this.__data__=[],this.size=0}var Xd=Yd;function Jd(e,n){return e===n||e!==e&&n!==n}var Qd=Jd,vd=Qd;function eu(e,n){for(var r=e.length;r--;)if(vd(e[r][0],n))return r;return-1}var bn=eu,tu=bn,nu=Array.prototype,ru=nu.splice;function ou(e){var n=this.__data__,r=tu(n,e);if(r<0)return!1;var i=n.length-1;return r==i?n.pop():ru.call(n,r,1),--this.size,!0}var iu=ou,lu=bn;function au(e){var n=this.__data__,r=lu(n,e);return r<0?void 0:n[r][1]}var su=au,cu=bn;function du(e){return cu(this.__data__,e)>-1}var uu=du,mu=bn;function fu(e,n){var r=this.__data__,i=mu(r,e);return i<0?(++this.size,r.push([e,n])):r[i][1]=n,this}var pu=fu,hu=Xd,yu=iu,gu=su,_u=uu,ku=pu;function bt(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var i=e[n];this.set(i[0],i[1])}}bt.prototype.clear=hu,bt.prototype.delete=yu,bt.prototype.get=gu,bt.prototype.has=_u,bt.prototype.set=ku;var bu=bt,xu=jo,Cu=zt,wu=xu(Cu,"Map"),Vu=wu,zo=Zd,Eu=bu,Bu=Vu;function Su(){this.size=0,this.__data__={hash:new zo,map:new(Bu||Eu),string:new zo}}var Nu=Su;function Tu(e){var n=typeof e;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?e!=="__proto__":e===null}var Ou=Tu,Du=Ou;function Au(e,n){var r=e.__data__;return Du(n)?r[typeof n=="string"?"string":"hash"]:r.map}var xn=Au,Mu=xn;function Fu(e){var n=Mu(this,e).delete(e);return this.size-=n?1:0,n}var Iu=Fu,$u=xn;function Lu(e){return $u(this,e).get(e)}var Uu=Lu,Pu=xn;function ju(e){return Pu(this,e).has(e)}var Ru=ju,zu=xn;function qu(e,n){var r=zu(this,e),i=r.size;return r.set(e,n),this.size+=r.size==i?0:1,this}var Hu=qu,Gu=Nu,Wu=Iu,Ku=Uu,Zu=Ru,Yu=Hu;function xt(e){var n=-1,r=e==null?0:e.length;for(this.clear();++n<r;){var i=e[n];this.set(i[0],i[1])}}xt.prototype.clear=Gu,xt.prototype.delete=Wu,xt.prototype.get=Ku,xt.prototype.has=Zu,xt.prototype.set=Yu;var Xu=xt,qo=Xu,Ju="Expected a function";function cr(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new TypeError(Ju);var r=function(){var i=arguments,l=n?n.apply(this,i):i[0],o=r.cache;if(o.has(l))return o.get(l);var a=e.apply(this,i);return r.cache=o.set(l,a)||o,a};return r.cache=new(cr.Cache||qo),r}cr.Cache=qo;var Qu=cr,vu=Qu,em=500;function tm(e){var n=vu(e,function(i){return r.size===em&&r.clear(),i}),r=n.cache;return n}var nm=tm,rm=nm,om=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,im=/\\(\\)?/g,lm=rm(function(e){var n=[];return e.charCodeAt(0)===46&&n.push(""),e.replace(om,function(r,i,l,o){n.push(l?o.replace(im,"$1"):i||r)}),n}),am=lm;function sm(e,n){for(var r=-1,i=e==null?0:e.length,l=Array(i);++r<i;)l[r]=n(e[r],r,e);return l}var Ho=sm,Go=ar,cm=Ho,dm=Rt,um=gn,mm=1/0,Wo=Go?Go.prototype:void 0,Ko=Wo?Wo.toString:void 0;function Zo(e){if(typeof e=="string")return e;if(dm(e))return cm(e,Zo)+"";if(um(e))return Ko?Ko.call(e):"";var n=e+"";return n=="0"&&1/e==-mm?"-0":n}var fm=Zo,pm=fm;function hm(e){return e==null?"":pm(e)}var dr=hm,ym=Rt,gm=jc,_m=am,km=dr;function bm(e,n){return ym(e)?e:gm(e,n)?[e]:_m(km(e))}var xm=bm,Cm=gn,wm=1/0;function Vm(e){if(typeof e=="string"||Cm(e))return e;var n=e+"";return n=="0"&&1/e==-wm?"-0":n}var Em=Vm,Bm=xm,Sm=Em;function Nm(e,n){n=Bm(n,e);for(var r=0,i=n.length;e!=null&&r<i;)e=e[Sm(n[r++])];return r&&r==i?e:void 0}var Tm=Nm,Om=Tm;function Dm(e,n,r){var i=e==null?void 0:Om(e,n);return i===void 0?r:i}var Cn=Dm,at={props:{column:{type:Object,required:!0},row:{type:Object,required:!0},value:{}}},qB="";const Am={mixins:[at],computed:{imageSource(){return this.value&&this.value._id?this.value:this.row},type(){var e,n;return(n=(e=this.imageSource)==null?void 0:e.meta)==null?void 0:n.type}},methods:{clicked(e){this.$sdk.dispatch("item:view",this.imageSource)}}},Mm={class:"table-image-cell"};function Fm(e,n,r,i,l,o){const a=t.resolveComponent("ux-image"),s=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",Mm,[o.type=="image"||o.type=="video"?(t.openBlock(),t.createElementBlock("div",{key:0,onClick:n[0]||(n[0]=t.withModifiers(c=>o.clicked(e.value),["stop","prevent"])),class:"image-wrapper"},[t.createVNode(a,{item:o.imageSource,type:o.type,width:100,height:100},null,8,["item","type"])])):(t.openBlock(),t.createBlock(s,{key:1,icon:"fa-file"}))])}var Im=_(Am,[["render",Fm],["__scopeId","data-v-246a2688"]]),HB="";const $m={mixins:[at],computed:{string(){return this.amount.toFixed(2)},amount(){return Number(parseInt(this.value)/100)},credit(){return this.amount>0},debit(){return this.amount<0},empty(){return parseInt(this.value)===0},currency(){return this.column.currency||this.row.currency}}};function Lm(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-currency-cell",{credit:o.credit,empty:o.empty,debit:o.debit}])},t.toDisplayString(o.string),3)}var Um=_($m,[["render",Lm],["__scopeId","data-v-33a0b926"]]),GB="";const Pm={data(){return{processing:!1}},mixins:[at],computed:{button(){return this.column.button},type(){var e,n;return(n=(e=this.row)==null?void 0:e.meta)==null?void 0:n.type}},methods:{async clicked(){this.processing=!0,await this.button.action(this.row,this.column),this.processing=!1}}},jm={class:"table-button-cell"};function Rm(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon"),s=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("td",jm,[t.createVNode(s,{color:o.button.color,size:o.button.size,loading:l.processing,onClick:t.withModifiers(o.clicked,["stop","prevent"])},{default:t.withCtx(()=>[o.button.text?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.button.text),1)],64)):t.createCommentVNode("",!0),o.button.icon?(t.openBlock(),t.createBlock(a,{key:1,icon:o.button.icon,right:""},null,8,["icon"])):t.createCommentVNode("",!0)]),_:1},8,["color","size","loading","onClick"])])}var zm=_(Pm,[["render",Rm],["__scopeId","data-v-36768853"]]);class st extends Error{}class qm extends st{constructor(n){super(`Invalid DateTime: ${n.toMessage()}`)}}class Hm extends st{constructor(n){super(`Invalid Interval: ${n.toMessage()}`)}}class Gm extends st{constructor(n){super(`Invalid Duration: ${n.toMessage()}`)}}class Wt extends st{}class Yo extends st{constructor(n){super(`Invalid unit ${n}`)}}class Ne extends st{}class Je extends st{constructor(){super("Zone is an abstract class")}}const C="numeric",Me="short",Ve="long",ur={year:C,month:C,day:C},Xo={year:C,month:Me,day:C},Wm={year:C,month:Me,day:C,weekday:Me},Jo={year:C,month:Ve,day:C},Qo={year:C,month:Ve,day:C,weekday:Ve},vo={hour:C,minute:C},ei={hour:C,minute:C,second:C},ti={hour:C,minute:C,second:C,timeZoneName:Me},ni={hour:C,minute:C,second:C,timeZoneName:Ve},ri={hour:C,minute:C,hourCycle:"h23"},oi={hour:C,minute:C,second:C,hourCycle:"h23"},ii={hour:C,minute:C,second:C,hourCycle:"h23",timeZoneName:Me},li={hour:C,minute:C,second:C,hourCycle:"h23",timeZoneName:Ve},ai={year:C,month:C,day:C,hour:C,minute:C},si={year:C,month:C,day:C,hour:C,minute:C,second:C},ci={year:C,month:Me,day:C,hour:C,minute:C},di={year:C,month:Me,day:C,hour:C,minute:C,second:C},Km={year:C,month:Me,day:C,weekday:Me,hour:C,minute:C},ui={year:C,month:Ve,day:C,hour:C,minute:C,timeZoneName:Me},mi={year:C,month:Ve,day:C,hour:C,minute:C,second:C,timeZoneName:Me},fi={year:C,month:Ve,day:C,weekday:Ve,hour:C,minute:C,timeZoneName:Ve},pi={year:C,month:Ve,day:C,weekday:Ve,hour:C,minute:C,second:C,timeZoneName:Ve};function $(e){return typeof e=="undefined"}function ct(e){return typeof e=="number"}function wn(e){return typeof e=="number"&&e%1===0}function Zm(e){return typeof e=="string"}function Ym(e){return Object.prototype.toString.call(e)==="[object Date]"}function hi(){try{return typeof Intl!="undefined"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Xm(e){return Array.isArray(e)?e:[e]}function yi(e,n,r){if(e.length!==0)return e.reduce((i,l)=>{const o=[n(l),l];return i&&r(i[0],o[0])===i[0]?i:o},null)[1]}function Jm(e,n){return n.reduce((r,i)=>(r[i]=e[i],r),{})}function Ct(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function Ge(e,n,r){return wn(e)&&e>=n&&e<=r}function Qm(e,n){return e-n*Math.floor(e/n)}function ne(e,n=2){const r=e<0;let i;return r?i="-"+(""+-e).padStart(n,"0"):i=(""+e).padStart(n,"0"),i}function Qe(e){if(!($(e)||e===null||e===""))return parseInt(e,10)}function dt(e){if(!($(e)||e===null||e===""))return parseFloat(e)}function mr(e){if(!($(e)||e===null||e==="")){const n=parseFloat("0."+e)*1e3;return Math.floor(n)}}function fr(e,n,r=!1){const i=10**n;return(r?Math.trunc:Math.round)(e*i)/i}function Kt(e){return e%4===0&&(e%100!==0||e%400===0)}function Zt(e){return Kt(e)?366:365}function Vn(e,n){const r=Qm(n-1,12)+1,i=e+(n-r)/12;return r===2?Kt(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function pr(e){let n=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(n=new Date(n),n.setUTCFullYear(n.getUTCFullYear()-1900)),+n}function En(e){const n=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,r=e-1,i=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7;return n===4||i===3?53:52}function hr(e){return e>99?e:e>60?1900+e:2e3+e}function gi(e,n,r,i=null){const l=new Date(e),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(o.timeZone=i);const a=B({timeZoneName:n},o),s=new Intl.DateTimeFormat(r,a).formatToParts(l).find(c=>c.type.toLowerCase()==="timezonename");return s?s.value:null}function Bn(e,n){let r=parseInt(e,10);Number.isNaN(r)&&(r=0);const i=parseInt(n,10)||0,l=r<0||Object.is(r,-0)?-i:i;return r*60+l}function _i(e){const n=Number(e);if(typeof e=="boolean"||e===""||Number.isNaN(n))throw new Ne(`Invalid unit value ${e}`);return n}function Sn(e,n){const r={};for(const i in e)if(Ct(e,i)){const l=e[i];if(l==null)continue;r[n(i)]=_i(l)}return r}function Nn(e,n){const r=Math.trunc(Math.abs(e/60)),i=Math.trunc(Math.abs(e%60)),l=e>=0?"+":"-";switch(n){case"short":return`${l}${ne(r,2)}:${ne(i,2)}`;case"narrow":return`${l}${r}${i>0?`:${i}`:""}`;case"techie":return`${l}${ne(r,2)}${ne(i,2)}`;default:throw new RangeError(`Value format ${n} is out of range for property format`)}}function Tn(e){return Jm(e,["hour","minute","second","millisecond"])}const vm=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z0-9_+-]{1,256}(\/[A-Za-z0-9_+-]{1,256})?)?/,ef=["January","February","March","April","May","June","July","August","September","October","November","December"],ki=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tf=["J","F","M","A","M","J","J","A","S","O","N","D"];function bi(e){switch(e){case"narrow":return[...tf];case"short":return[...ki];case"long":return[...ef];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const xi=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ci=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],nf=["M","T","W","T","F","S","S"];function wi(e){switch(e){case"narrow":return[...nf];case"short":return[...Ci];case"long":return[...xi];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const Vi=["AM","PM"],rf=["Before Christ","Anno Domini"],of=["BC","AD"],lf=["B","A"];function Ei(e){switch(e){case"narrow":return[...lf];case"short":return[...of];case"long":return[...rf];default:return null}}function af(e){return Vi[e.hour<12?0:1]}function sf(e,n){return wi(n)[e.weekday-1]}function cf(e,n){return bi(n)[e.month-1]}function df(e,n){return Ei(n)[e.year<0?0:1]}function uf(e,n,r="always",i=!1){const l={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},o=["hours","minutes","seconds"].indexOf(e)===-1;if(r==="auto"&&o){const m=e==="days";switch(n){case 1:return m?"tomorrow":`next ${l[e][0]}`;case-1:return m?"yesterday":`last ${l[e][0]}`;case 0:return m?"today":`this ${l[e][0]}`}}const a=Object.is(n,-0)||n<0,s=Math.abs(n),c=s===1,d=l[e],u=i?c?d[1]:d[2]||d[1]:c?l[e][0]:e;return a?`${s} ${u} ago`:`in ${s} ${u}`}function Bi(e,n){let r="";for(const i of e)i.literal?r+=i.val:r+=n(i.val);return r}const mf={D:ur,DD:Xo,DDD:Jo,DDDD:Qo,t:vo,tt:ei,ttt:ti,tttt:ni,T:ri,TT:oi,TTT:ii,TTTT:li,f:ai,ff:ci,fff:ui,ffff:fi,F:si,FF:di,FFF:mi,FFFF:pi};class be{static create(n,r={}){return new be(n,r)}static parseFormat(n){let r=null,i="",l=!1;const o=[];for(let a=0;a<n.length;a++){const s=n.charAt(a);s==="'"?(i.length>0&&o.push({literal:l,val:i}),r=null,i="",l=!l):l||s===r?i+=s:(i.length>0&&o.push({literal:!1,val:i}),i=s,r=s)}return i.length>0&&o.push({literal:l,val:i}),o}static macroTokenToFormatOpts(n){return mf[n]}constructor(n,r){this.opts=r,this.loc=n,this.systemLoc=null}formatWithSystemDefault(n,r){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(n,B(B({},this.opts),r)).format()}formatDateTime(n,r={}){return this.loc.dtFormatter(n,B(B({},this.opts),r)).format()}formatDateTimeParts(n,r={}){return this.loc.dtFormatter(n,B(B({},this.opts),r)).formatToParts()}resolvedOptions(n,r={}){return this.loc.dtFormatter(n,B(B({},this.opts),r)).resolvedOptions()}num(n,r=0){if(this.opts.forceSimple)return ne(n,r);const i=B({},this.opts);return r>0&&(i.padTo=r),this.loc.numberFormatter(i).format(n)}formatDateTimeFromString(n,r){const i=this.loc.listingMode()==="en",l=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(p,y)=>this.loc.extract(n,p,y),a=p=>n.isOffsetFixed&&n.offset===0&&p.allowZ?"Z":n.isValid?n.zone.formatOffset(n.ts,p.format):"",s=()=>i?af(n):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),c=(p,y)=>i?cf(n,p):o(y?{month:p}:{month:p,day:"numeric"},"month"),d=(p,y)=>i?sf(n,p):o(y?{weekday:p}:{weekday:p,month:"long",day:"numeric"},"weekday"),u=p=>{const y=be.macroTokenToFormatOpts(p);return y?this.formatWithSystemDefault(n,y):p},m=p=>i?df(n,p):o({era:p},"era"),f=p=>{switch(p){case"S":return this.num(n.millisecond);case"u":case"SSS":return this.num(n.millisecond,3);case"s":return this.num(n.second);case"ss":return this.num(n.second,2);case"uu":return this.num(Math.floor(n.millisecond/10),2);case"uuu":return this.num(Math.floor(n.millisecond/100));case"m":return this.num(n.minute);case"mm":return this.num(n.minute,2);case"h":return this.num(n.hour%12===0?12:n.hour%12);case"hh":return this.num(n.hour%12===0?12:n.hour%12,2);case"H":return this.num(n.hour);case"HH":return this.num(n.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return n.zone.offsetName(n.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return n.zone.offsetName(n.ts,{format:"long",locale:this.loc.locale});case"z":return n.zoneName;case"a":return s();case"d":return l?o({day:"numeric"},"day"):this.num(n.day);case"dd":return l?o({day:"2-digit"},"day"):this.num(n.day,2);case"c":return this.num(n.weekday);case"ccc":return d("short",!0);case"cccc":return d("long",!0);case"ccccc":return d("narrow",!0);case"E":return this.num(n.weekday);case"EEE":return d("short",!1);case"EEEE":return d("long",!1);case"EEEEE":return d("narrow",!1);case"L":return l?o({month:"numeric",day:"numeric"},"month"):this.num(n.month);case"LL":return l?o({month:"2-digit",day:"numeric"},"month"):this.num(n.month,2);case"LLL":return c("short",!0);case"LLLL":return c("long",!0);case"LLLLL":return c("narrow",!0);case"M":return l?o({month:"numeric"},"month"):this.num(n.month);case"MM":return l?o({month:"2-digit"},"month"):this.num(n.month,2);case"MMM":return c("short",!1);case"MMMM":return c("long",!1);case"MMMMM":return c("narrow",!1);case"y":return l?o({year:"numeric"},"year"):this.num(n.year);case"yy":return l?o({year:"2-digit"},"year"):this.num(n.year.toString().slice(-2),2);case"yyyy":return l?o({year:"numeric"},"year"):this.num(n.year,4);case"yyyyyy":return l?o({year:"numeric"},"year"):this.num(n.year,6);case"G":return m("short");case"GG":return m("long");case"GGGGG":return m("narrow");case"kk":return this.num(n.weekYear.toString().slice(-2),2);case"kkkk":return this.num(n.weekYear,4);case"W":return this.num(n.weekNumber);case"WW":return this.num(n.weekNumber,2);case"o":return this.num(n.ordinal);case"ooo":return this.num(n.ordinal,3);case"q":return this.num(n.quarter);case"qq":return this.num(n.quarter,2);case"X":return this.num(Math.floor(n.ts/1e3));case"x":return this.num(n.ts);default:return u(p)}};return Bi(be.parseFormat(r),f)}formatDurationFromString(n,r){const i=c=>{switch(c[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},l=c=>d=>{const u=i(d);return u?this.num(c.get(u),d.length):d},o=be.parseFormat(r),a=o.reduce((c,{literal:d,val:u})=>d?c:c.concat(u),[]),s=n.shiftTo(...a.map(i).filter(c=>c));return Bi(o,l(s))}}class Fe{constructor(n,r){this.reason=n,this.explanation=r}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Yt{get type(){throw new Je}get name(){throw new Je}get isUniversal(){throw new Je}offsetName(n,r){throw new Je}formatOffset(n,r){throw new Je}offset(n){throw new Je}equals(n){throw new Je}get isValid(){throw new Je}}let yr=null;class gr extends Yt{static get instance(){return yr===null&&(yr=new gr),yr}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(n,{format:r,locale:i}){return gi(n,r,i)}formatOffset(n,r){return Nn(this.offset(n),r)}offset(n){return-new Date(n).getTimezoneOffset()}equals(n){return n.type==="system"}get isValid(){return!0}}let On={};function ff(e){return On[e]||(On[e]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),On[e]}const pf={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function hf(e,n){const r=e.format(n).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(r),[,l,o,a,s,c,d,u]=i;return[a,l,o,s,c,d,u]}function yf(e,n){const r=e.formatToParts(n),i=[];for(let l=0;l<r.length;l++){const{type:o,value:a}=r[l],s=pf[o];o==="era"?i[s]=a:$(s)||(i[s]=parseInt(a,10))}return i}let Dn={};class We extends Yt{static create(n){return Dn[n]||(Dn[n]=new We(n)),Dn[n]}static resetCache(){Dn={},On={}}static isValidSpecifier(n){return this.isValidZone(n)}static isValidZone(n){if(!n)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:n}).format(),!0}catch{return!1}}constructor(n){super(),this.zoneName=n,this.valid=We.isValidZone(n)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(n,{format:r,locale:i}){return gi(n,r,i,this.name)}formatOffset(n,r){return Nn(this.offset(n),r)}offset(n){const r=new Date(n);if(isNaN(r))return NaN;const i=ff(this.name);let[l,o,a,s,c,d,u]=i.formatToParts?yf(i,r):hf(i,r);s==="BC"&&(l=-Math.abs(l)+1);const f=pr({year:l,month:o,day:a,hour:c===24?0:c,minute:d,second:u,millisecond:0});let p=+r;const y=p%1e3;return p-=y>=0?y:1e3+y,(f-p)/(60*1e3)}equals(n){return n.type==="iana"&&n.name===this.name}get isValid(){return this.valid}}let _r=null;class he extends Yt{static get utcInstance(){return _r===null&&(_r=new he(0)),_r}static instance(n){return n===0?he.utcInstance:new he(n)}static parseSpecifier(n){if(n){const r=n.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new he(Bn(r[1],r[2]))}return null}constructor(n){super(),this.fixed=n}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Nn(this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(n,r){return Nn(this.fixed,r)}get isUniversal(){return!0}offset(){return this.fixed}equals(n){return n.type==="fixed"&&n.fixed===this.fixed}get isValid(){return!0}}class gf extends Yt{constructor(n){super(),this.zoneName=n}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function ve(e,n){if($(e)||e===null)return n;if(e instanceof Yt)return e;if(Zm(e)){const r=e.toLowerCase();return r==="local"||r==="system"?n:r==="utc"||r==="gmt"?he.utcInstance:he.parseSpecifier(r)||We.create(e)}else return ct(e)?he.instance(e):typeof e=="object"&&e.offset&&typeof e.offset=="number"?e:new gf(e)}let Si=()=>Date.now(),Ni="system",Ti=null,Oi=null,Di=null,Ai;class oe{static get now(){return Si}static set now(n){Si=n}static set defaultZone(n){Ni=n}static get defaultZone(){return ve(Ni,gr.instance)}static get defaultLocale(){return Ti}static set defaultLocale(n){Ti=n}static get defaultNumberingSystem(){return Oi}static set defaultNumberingSystem(n){Oi=n}static get defaultOutputCalendar(){return Di}static set defaultOutputCalendar(n){Di=n}static get throwOnInvalid(){return Ai}static set throwOnInvalid(n){Ai=n}static resetCaches(){Q.resetCache(),We.resetCache()}}let Mi={};function _f(e,n={}){const r=JSON.stringify([e,n]);let i=Mi[r];return i||(i=new Intl.ListFormat(e,n),Mi[r]=i),i}let kr={};function br(e,n={}){const r=JSON.stringify([e,n]);let i=kr[r];return i||(i=new Intl.DateTimeFormat(e,n),kr[r]=i),i}let xr={};function kf(e,n={}){const r=JSON.stringify([e,n]);let i=xr[r];return i||(i=new Intl.NumberFormat(e,n),xr[r]=i),i}let Cr={};function bf(e,n={}){const a=n,{base:r}=a,i=ko(a,["base"]),l=JSON.stringify([e,i]);let o=Cr[l];return o||(o=new Intl.RelativeTimeFormat(e,n),Cr[l]=o),o}let Xt=null;function xf(){return Xt||(Xt=new Intl.DateTimeFormat().resolvedOptions().locale,Xt)}function Cf(e){const n=e.indexOf("-u-");if(n===-1)return[e];{let r;const i=e.substring(0,n);try{r=br(e).resolvedOptions()}catch{r=br(i).resolvedOptions()}const{numberingSystem:l,calendar:o}=r;return[i,l,o]}}function wf(e,n,r){return(r||n)&&(e+="-u",r&&(e+=`-ca-${r}`),n&&(e+=`-nu-${n}`)),e}function Vf(e){const n=[];for(let r=1;r<=12;r++){const i=N.utc(2016,r,1);n.push(e(i))}return n}function Ef(e){const n=[];for(let r=1;r<=7;r++){const i=N.utc(2016,11,13+r);n.push(e(i))}return n}function An(e,n,r,i,l){const o=e.listingMode(r);return o==="error"?null:o==="en"?i(n):l(n)}function Bf(e){return e.numberingSystem&&e.numberingSystem!=="latn"?!1:e.numberingSystem==="latn"||!e.locale||e.locale.startsWith("en")||new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem==="latn"}class Sf{constructor(n,r,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const s=i,{padTo:l,floor:o}=s,a=ko(s,["padTo","floor"]);if(!r||Object.keys(a).length>0){const c=B({useGrouping:!1},i);i.padTo>0&&(c.minimumIntegerDigits=i.padTo),this.inf=kf(n,c)}}format(n){if(this.inf){const r=this.floor?Math.floor(n):n;return this.inf.format(r)}else{const r=this.floor?Math.floor(n):fr(n,3);return ne(r,this.padTo)}}}class Nf{constructor(n,r,i){this.opts=i;let l;if(n.zone.isUniversal){const a=-1*(n.offset/60),s=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;n.offset!==0&&We.create(s).valid?(l=s,this.dt=n):(l="UTC",i.timeZoneName?this.dt=n:this.dt=n.offset===0?n:N.fromMillis(n.ts+n.offset*60*1e3))}else n.zone.type==="system"?this.dt=n:(this.dt=n,l=n.zone.name);const o=B({},this.opts);l&&(o.timeZone=l),this.dtf=br(r,o)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class Tf{constructor(n,r,i){this.opts=B({style:"long"},i),!r&&hi()&&(this.rtf=bf(n,i))}format(n,r){return this.rtf?this.rtf.format(n,r):uf(r,n,this.opts.numeric,this.opts.style!=="long")}formatToParts(n,r){return this.rtf?this.rtf.formatToParts(n,r):[]}}class Q{static fromOpts(n){return Q.create(n.locale,n.numberingSystem,n.outputCalendar,n.defaultToEN)}static create(n,r,i,l=!1){const o=n||oe.defaultLocale,a=o||(l?"en-US":xf()),s=r||oe.defaultNumberingSystem,c=i||oe.defaultOutputCalendar;return new Q(a,s,c,o)}static resetCache(){Xt=null,kr={},xr={},Cr={}}static fromObject({locale:n,numberingSystem:r,outputCalendar:i}={}){return Q.create(n,r,i)}constructor(n,r,i,l){const[o,a,s]=Cf(n);this.locale=o,this.numberingSystem=r||a||null,this.outputCalendar=i||s||null,this.intl=wf(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=l,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Bf(this)),this.fastNumbersCached}listingMode(){const n=this.isEnglish(),r=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return n&&r?"en":"intl"}clone(n){return!n||Object.getOwnPropertyNames(n).length===0?this:Q.create(n.locale||this.specifiedLocale,n.numberingSystem||this.numberingSystem,n.outputCalendar||this.outputCalendar,n.defaultToEN||!1)}redefaultToEN(n={}){return this.clone(ke(B({},n),{defaultToEN:!0}))}redefaultToSystem(n={}){return this.clone(ke(B({},n),{defaultToEN:!1}))}months(n,r=!1,i=!0){return An(this,n,i,bi,()=>{const l=r?{month:n,day:"numeric"}:{month:n},o=r?"format":"standalone";return this.monthsCache[o][n]||(this.monthsCache[o][n]=Vf(a=>this.extract(a,l,"month"))),this.monthsCache[o][n]})}weekdays(n,r=!1,i=!0){return An(this,n,i,wi,()=>{const l=r?{weekday:n,year:"numeric",month:"long",day:"numeric"}:{weekday:n},o=r?"format":"standalone";return this.weekdaysCache[o][n]||(this.weekdaysCache[o][n]=Ef(a=>this.extract(a,l,"weekday"))),this.weekdaysCache[o][n]})}meridiems(n=!0){return An(this,void 0,n,()=>Vi,()=>{if(!this.meridiemCache){const r={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[N.utc(2016,11,13,9),N.utc(2016,11,13,19)].map(i=>this.extract(i,r,"dayperiod"))}return this.meridiemCache})}eras(n,r=!0){return An(this,n,r,Ei,()=>{const i={era:n};return this.eraCache[n]||(this.eraCache[n]=[N.utc(-40,1,1),N.utc(2017,1,1)].map(l=>this.extract(l,i,"era"))),this.eraCache[n]})}extract(n,r,i){const l=this.dtFormatter(n,r),o=l.formatToParts(),a=o.find(s=>s.type.toLowerCase()===i);return a?a.value:null}numberFormatter(n={}){return new Sf(this.intl,n.forceSimple||this.fastNumbers,n)}dtFormatter(n,r={}){return new Nf(n,this.intl,r)}relFormatter(n={}){return new Tf(this.intl,this.isEnglish(),n)}listFormatter(n={}){return _f(this.intl,n)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(n){return this.locale===n.locale&&this.numberingSystem===n.numberingSystem&&this.outputCalendar===n.outputCalendar}}function wt(...e){const n=e.reduce((r,i)=>r+i.source,"");return RegExp(`^${n}$`)}function ut(...e){return n=>e.reduce(([r,i,l],o)=>{const[a,s,c]=o(n,l);return[B(B({},r),a),i||s,c]},[{},null,1]).slice(0,2)}function Vt(e,...n){if(e==null)return[null,null];for(const[r,i]of n){const l=r.exec(e);if(l)return i(l)}return[null,null]}function Fi(...e){return(n,r)=>{const i={};let l;for(l=0;l<e.length;l++)i[e[l]]=Qe(n[r+l]);return[i,null,r+l]}}const Ii=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,wr=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,$i=RegExp(`${wr.source}${Ii.source}?`),Vr=RegExp(`(?:T${$i.source})?`),Of=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Df=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Af=/(\d{4})-?(\d{3})/,Mf=Fi("weekYear","weekNumber","weekDay"),Ff=Fi("year","ordinal"),If=/(\d{4})-(\d\d)-(\d\d)/,Li=RegExp(`${wr.source} ?(?:${Ii.source}|(${vm.source}))?`),$f=RegExp(`(?: ${Li.source})?`);function Et(e,n,r){const i=e[n];return $(i)?r:Qe(i)}function Ui(e,n){return[{year:Et(e,n),month:Et(e,n+1,1),day:Et(e,n+2,1)},null,n+3]}function mt(e,n){return[{hours:Et(e,n,0),minutes:Et(e,n+1,0),seconds:Et(e,n+2,0),milliseconds:mr(e[n+3])},null,n+4]}function Bt(e,n){const r=!e[n]&&!e[n+1],i=Bn(e[n+1],e[n+2]),l=r?null:he.instance(i);return[{},l,n+3]}function Pi(e,n){const r=e[n]?We.create(e[n]):null;return[{},r,n+1]}const Lf=RegExp(`^T?${wr.source}$`),Uf=/^-?P(?:(?:(-?\d{1,9}(?:\.\d{1,9})?)Y)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,9}(?:\.\d{1,9})?)W)?(?:(-?\d{1,9}(?:\.\d{1,9})?)D)?(?:T(?:(-?\d{1,9}(?:\.\d{1,9})?)H)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function Pf(e){const[n,r,i,l,o,a,s,c,d]=e,u=n[0]==="-",m=c&&c[0]==="-",f=(p,y=!1)=>p!==void 0&&(y||p&&u)?-p:p;return[{years:f(dt(r)),months:f(dt(i)),weeks:f(dt(l)),days:f(dt(o)),hours:f(dt(a)),minutes:f(dt(s)),seconds:f(dt(c),c==="-0"),milliseconds:f(mr(d),m)}]}const jf={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Er(e,n,r,i,l,o,a){const s={year:n.length===2?hr(Qe(n)):Qe(n),month:ki.indexOf(r)+1,day:Qe(i),hour:Qe(l),minute:Qe(o)};return a&&(s.second=Qe(a)),e&&(s.weekday=e.length>3?xi.indexOf(e)+1:Ci.indexOf(e)+1),s}const Rf=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function zf(e){const[,n,r,i,l,o,a,s,c,d,u,m]=e,f=Er(n,l,i,r,o,a,s);let p;return c?p=jf[c]:d?p=0:p=Bn(u,m),[f,new he(p)]}function qf(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Hf=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Gf=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Wf=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function ji(e){const[,n,r,i,l,o,a,s]=e;return[Er(n,l,i,r,o,a,s),he.utcInstance]}function Kf(e){const[,n,r,i,l,o,a,s]=e;return[Er(n,s,r,i,l,o,a),he.utcInstance]}const Zf=wt(Of,Vr),Yf=wt(Df,Vr),Xf=wt(Af,Vr),Jf=wt($i),Qf=ut(Ui,mt,Bt),vf=ut(Mf,mt,Bt),ep=ut(Ff,mt,Bt),tp=ut(mt,Bt);function np(e){return Vt(e,[Zf,Qf],[Yf,vf],[Xf,ep],[Jf,tp])}function rp(e){return Vt(qf(e),[Rf,zf])}function op(e){return Vt(e,[Hf,ji],[Gf,ji],[Wf,Kf])}function ip(e){return Vt(e,[Uf,Pf])}const lp=ut(mt);function ap(e){return Vt(e,[Lf,lp])}const sp=wt(If,$f),cp=wt(Li),dp=ut(Ui,mt,Bt,Pi),up=ut(mt,Bt,Pi);function mp(e){return Vt(e,[sp,dp],[cp,up])}const fp="Invalid Duration",Ri={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},pp=B({years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3}},Ri),Te=146097/400,St=146097/4800,hp=B({years:{quarters:4,months:12,weeks:Te/7,days:Te,hours:Te*24,minutes:Te*24*60,seconds:Te*24*60*60,milliseconds:Te*24*60*60*1e3},quarters:{months:3,weeks:Te/28,days:Te/4,hours:Te*24/4,minutes:Te*24*60/4,seconds:Te*24*60*60/4,milliseconds:Te*24*60*60*1e3/4},months:{weeks:St/7,days:St,hours:St*24,minutes:St*24*60,seconds:St*24*60*60,milliseconds:St*24*60*60*1e3}},Ri),ft=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],yp=ft.slice(0).reverse();function pt(e,n,r=!1){const i={values:r?n.values:B(B({},e.values),n.values||{}),loc:e.loc.clone(n.loc),conversionAccuracy:n.conversionAccuracy||e.conversionAccuracy};return new U(i)}function gp(e){return e<0?Math.floor(e):Math.ceil(e)}function zi(e,n,r,i,l){const o=e[l][r],a=n[r]/o,s=Math.sign(a)===Math.sign(i[l]),c=!s&&i[l]!==0&&Math.abs(a)<=1?gp(a):Math.trunc(a);i[l]+=c,n[r]-=c*o}function _p(e,n){yp.reduce((r,i)=>$(n[i])?r:(r&&zi(e,n,r,n,i),i),null)}class U{constructor(n){const r=n.conversionAccuracy==="longterm"||!1;this.values=n.values,this.loc=n.loc||Q.create(),this.conversionAccuracy=r?"longterm":"casual",this.invalid=n.invalid||null,this.matrix=r?hp:pp,this.isLuxonDuration=!0}static fromMillis(n,r){return U.fromObject({milliseconds:n},r)}static fromObject(n,r={}){if(n==null||typeof n!="object")throw new Ne(`Duration.fromObject: argument expected to be an object, got ${n===null?"null":typeof n}`);return new U({values:Sn(n,U.normalizeUnit),loc:Q.fromObject(r),conversionAccuracy:r.conversionAccuracy})}static fromDurationLike(n){if(ct(n))return U.fromMillis(n);if(U.isDuration(n))return n;if(typeof n=="object")return U.fromObject(n);throw new Ne(`Unknown duration argument ${n} of type ${typeof n}`)}static fromISO(n,r){const[i]=ip(n);return i?U.fromObject(i,r):U.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static fromISOTime(n,r){const[i]=ap(n);return i?U.fromObject(i,r):U.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static invalid(n,r=null){if(!n)throw new Ne("need to specify a reason the Duration is invalid");const i=n instanceof Fe?n:new Fe(n,r);if(oe.throwOnInvalid)throw new Gm(i);return new U({invalid:i})}static normalizeUnit(n){const r={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[n&&n.toLowerCase()];if(!r)throw new Yo(n);return r}static isDuration(n){return n&&n.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(n,r={}){const i=ke(B({},r),{floor:r.round!==!1&&r.floor!==!1});return this.isValid?be.create(this.loc,i).formatDurationFromString(this,n):fp}toHuman(n={}){const r=ft.map(i=>{const l=this.values[i];return $(l)?null:this.loc.numberFormatter(ke(B({style:"unit",unitDisplay:"long"},n),{unit:i.slice(0,-1)})).format(l)}).filter(i=>i);return this.loc.listFormatter(B({type:"conjunction",style:n.listStyle||"narrow"},n)).format(r)}toObject(){return this.isValid?B({},this.values):{}}toISO(){if(!this.isValid)return null;let n="P";return this.years!==0&&(n+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(n+=this.months+this.quarters*3+"M"),this.weeks!==0&&(n+=this.weeks+"W"),this.days!==0&&(n+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(n+="T"),this.hours!==0&&(n+=this.hours+"H"),this.minutes!==0&&(n+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(n+=fr(this.seconds+this.milliseconds/1e3,3)+"S"),n==="P"&&(n+="T0S"),n}toISOTime(n={}){if(!this.isValid)return null;const r=this.toMillis();if(r<0||r>=864e5)return null;n=B({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},n);const i=this.shiftTo("hours","minutes","seconds","milliseconds");let l=n.format==="basic"?"hhmm":"hh:mm";(!n.suppressSeconds||i.seconds!==0||i.milliseconds!==0)&&(l+=n.format==="basic"?"ss":":ss",(!n.suppressMilliseconds||i.milliseconds!==0)&&(l+=".SSS"));let o=i.toFormat(l);return n.includePrefix&&(o="T"+o),o}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(n){if(!this.isValid)return this;const r=U.fromDurationLike(n),i={};for(const l of ft)(Ct(r.values,l)||Ct(this.values,l))&&(i[l]=r.get(l)+this.get(l));return pt(this,{values:i},!0)}minus(n){if(!this.isValid)return this;const r=U.fromDurationLike(n);return this.plus(r.negate())}mapUnits(n){if(!this.isValid)return this;const r={};for(const i of Object.keys(this.values))r[i]=_i(n(this.values[i],i));return pt(this,{values:r},!0)}get(n){return this[U.normalizeUnit(n)]}set(n){if(!this.isValid)return this;const r=B(B({},this.values),Sn(n,U.normalizeUnit));return pt(this,{values:r})}reconfigure({locale:n,numberingSystem:r,conversionAccuracy:i}={}){const l=this.loc.clone({locale:n,numberingSystem:r}),o={loc:l};return i&&(o.conversionAccuracy=i),pt(this,o)}as(n){return this.isValid?this.shiftTo(n).get(n):NaN}normalize(){if(!this.isValid)return this;const n=this.toObject();return _p(this.matrix,n),pt(this,{values:n},!0)}shiftTo(...n){if(!this.isValid)return this;if(n.length===0)return this;n=n.map(a=>U.normalizeUnit(a));const r={},i={},l=this.toObject();let o;for(const a of ft)if(n.indexOf(a)>=0){o=a;let s=0;for(const d in i)s+=this.matrix[d][a]*i[d],i[d]=0;ct(l[a])&&(s+=l[a]);const c=Math.trunc(s);r[a]=c,i[a]=(s*1e3-c*1e3)/1e3;for(const d in l)ft.indexOf(d)>ft.indexOf(a)&&zi(this.matrix,l,d,r,a)}else ct(l[a])&&(i[a]=l[a]);for(const a in i)i[a]!==0&&(r[o]+=a===o?i[a]:i[a]/this.matrix[o][a]);return pt(this,{values:r},!0).normalize()}negate(){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=this.values[r]===0?0:-this.values[r];return pt(this,{values:n},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(n){if(!this.isValid||!n.isValid||!this.loc.equals(n.loc))return!1;function r(i,l){return i===void 0||i===0?l===void 0||l===0:i===l}for(const i of ft)if(!r(this.values[i],n.values[i]))return!1;return!0}}const Jt="Invalid Interval";function kp(e,n){return!e||!e.isValid?v.invalid("missing or invalid start"):!n||!n.isValid?v.invalid("missing or invalid end"):n<e?v.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${n.toISO()}`):null}class v{constructor(n){this.s=n.start,this.e=n.end,this.invalid=n.invalid||null,this.isLuxonInterval=!0}static invalid(n,r=null){if(!n)throw new Ne("need to specify a reason the Interval is invalid");const i=n instanceof Fe?n:new Fe(n,r);if(oe.throwOnInvalid)throw new Hm(i);return new v({invalid:i})}static fromDateTimes(n,r){const i=en(n),l=en(r),o=kp(i,l);return o==null?new v({start:i,end:l}):o}static after(n,r){const i=U.fromDurationLike(r),l=en(n);return v.fromDateTimes(l,l.plus(i))}static before(n,r){const i=U.fromDurationLike(r),l=en(n);return v.fromDateTimes(l.minus(i),l)}static fromISO(n,r){const[i,l]=(n||"").split("/",2);if(i&&l){let o,a;try{o=N.fromISO(i,r),a=o.isValid}catch{a=!1}let s,c;try{s=N.fromISO(l,r),c=s.isValid}catch{c=!1}if(a&&c)return v.fromDateTimes(o,s);if(a){const d=U.fromISO(l,r);if(d.isValid)return v.after(o,d)}else if(c){const d=U.fromISO(i,r);if(d.isValid)return v.before(s,d)}}return v.invalid("unparsable",`the input "${n}" can't be parsed as ISO 8601`)}static isInterval(n){return n&&n.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(n="milliseconds"){return this.isValid?this.toDuration(n).get(n):NaN}count(n="milliseconds"){if(!this.isValid)return NaN;const r=this.start.startOf(n),i=this.end.startOf(n);return Math.floor(i.diff(r,n).get(n))+1}hasSame(n){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,n):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(n){return this.isValid?this.s>n:!1}isBefore(n){return this.isValid?this.e<=n:!1}contains(n){return this.isValid?this.s<=n&&this.e>n:!1}set({start:n,end:r}={}){return this.isValid?v.fromDateTimes(n||this.s,r||this.e):this}splitAt(...n){if(!this.isValid)return[];const r=n.map(en).filter(a=>this.contains(a)).sort(),i=[];let{s:l}=this,o=0;for(;l<this.e;){const a=r[o]||this.e,s=+a>+this.e?this.e:a;i.push(v.fromDateTimes(l,s)),l=s,o+=1}return i}splitBy(n){const r=U.fromDurationLike(n);if(!this.isValid||!r.isValid||r.as("milliseconds")===0)return[];let{s:i}=this,l=1,o;const a=[];for(;i<this.e;){const s=this.start.plus(r.mapUnits(c=>c*l));o=+s>+this.e?this.e:s,a.push(v.fromDateTimes(i,o)),i=o,l+=1}return a}divideEqually(n){return this.isValid?this.splitBy(this.length()/n).slice(0,n):[]}overlaps(n){return this.e>n.s&&this.s<n.e}abutsStart(n){return this.isValid?+this.e==+n.s:!1}abutsEnd(n){return this.isValid?+n.e==+this.s:!1}engulfs(n){return this.isValid?this.s<=n.s&&this.e>=n.e:!1}equals(n){return!this.isValid||!n.isValid?!1:this.s.equals(n.s)&&this.e.equals(n.e)}intersection(n){if(!this.isValid)return this;const r=this.s>n.s?this.s:n.s,i=this.e<n.e?this.e:n.e;return r>=i?null:v.fromDateTimes(r,i)}union(n){if(!this.isValid)return this;const r=this.s<n.s?this.s:n.s,i=this.e>n.e?this.e:n.e;return v.fromDateTimes(r,i)}static merge(n){const[r,i]=n.sort((l,o)=>l.s-o.s).reduce(([l,o],a)=>o?o.overlaps(a)||o.abutsStart(a)?[l,o.union(a)]:[l.concat([o]),a]:[l,a],[[],null]);return i&&r.push(i),r}static xor(n){let r=null,i=0;const l=[],o=n.map(c=>[{time:c.s,type:"s"},{time:c.e,type:"e"}]),a=Array.prototype.concat(...o),s=a.sort((c,d)=>c.time-d.time);for(const c of s)i+=c.type==="s"?1:-1,i===1?r=c.time:(r&&+r!=+c.time&&l.push(v.fromDateTimes(r,c.time)),r=null);return v.merge(l)}difference(...n){return v.xor([this].concat(n)).map(r=>this.intersection(r)).filter(r=>r&&!r.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:Jt}toISO(n){return this.isValid?`${this.s.toISO(n)}/${this.e.toISO(n)}`:Jt}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Jt}toISOTime(n){return this.isValid?`${this.s.toISOTime(n)}/${this.e.toISOTime(n)}`:Jt}toFormat(n,{separator:r=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(n)}${r}${this.e.toFormat(n)}`:Jt}toDuration(n,r){return this.isValid?this.e.diff(this.s,n,r):U.invalid(this.invalidReason)}mapEndpoints(n){return v.fromDateTimes(n(this.s),n(this.e))}}class Mn{static hasDST(n=oe.defaultZone){const r=N.now().setZone(n).set({month:12});return!n.isUniversal&&r.offset!==r.set({month:6}).offset}static isValidIANAZone(n){return We.isValidZone(n)}static normalizeZone(n){return ve(n,oe.defaultZone)}static months(n="long",{locale:r=null,numberingSystem:i=null,locObj:l=null,outputCalendar:o="gregory"}={}){return(l||Q.create(r,i,o)).months(n)}static monthsFormat(n="long",{locale:r=null,numberingSystem:i=null,locObj:l=null,outputCalendar:o="gregory"}={}){return(l||Q.create(r,i,o)).months(n,!0)}static weekdays(n="long",{locale:r=null,numberingSystem:i=null,locObj:l=null}={}){return(l||Q.create(r,i,null)).weekdays(n)}static weekdaysFormat(n="long",{locale:r=null,numberingSystem:i=null,locObj:l=null}={}){return(l||Q.create(r,i,null)).weekdays(n,!0)}static meridiems({locale:n=null}={}){return Q.create(n).meridiems()}static eras(n="short",{locale:r=null}={}){return Q.create(r,null,"gregory").eras(n)}static features(){return{relative:hi()}}}function qi(e,n){const r=l=>l.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=r(n)-r(e);return Math.floor(U.fromMillis(i).as("days"))}function bp(e,n,r){const i=[["years",(s,c)=>c.year-s.year],["quarters",(s,c)=>c.quarter-s.quarter],["months",(s,c)=>c.month-s.month+(c.year-s.year)*12],["weeks",(s,c)=>{const d=qi(s,c);return(d-d%7)/7}],["days",qi]],l={};let o,a;for(const[s,c]of i)if(r.indexOf(s)>=0){o=s;let d=c(e,n);a=e.plus({[s]:d}),a>n?(e=e.plus({[s]:d-1}),d-=1):e=a,l[s]=d}return[e,l,a,o]}function xp(e,n,r,i){let[l,o,a,s]=bp(e,n,r);const c=n-l,d=r.filter(m=>["hours","minutes","seconds","milliseconds"].indexOf(m)>=0);d.length===0&&(a<n&&(a=l.plus({[s]:1})),a!==l&&(o[s]=(o[s]||0)+c/(a-l)));const u=U.fromObject(o,i);return d.length>0?U.fromMillis(c,i).shiftTo(...d).plus(u):u}const Br={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},Hi={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Cp=Br.hanidec.replace(/[\[|\]]/g,"").split("");function wp(e){let n=parseInt(e,10);if(isNaN(n)){n="";for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);if(e[r].search(Br.hanidec)!==-1)n+=Cp.indexOf(e[r]);else for(const l in Hi){const[o,a]=Hi[l];i>=o&&i<=a&&(n+=i-o)}}return parseInt(n,10)}else return n}function Ie({numberingSystem:e},n=""){return new RegExp(`${Br[e||"latn"]}${n}`)}const Vp="missing Intl.DateTimeFormat.formatToParts support";function j(e,n=r=>r){return{regex:e,deser:([r])=>n(wp(r))}}const Gi=`( |${String.fromCharCode(160)})`,Wi=new RegExp(Gi,"g");function Ep(e){return e.replace(/\./g,"\\.?").replace(Wi,Gi)}function Ki(e){return e.replace(/\./g,"").replace(Wi," ").toLowerCase()}function $e(e,n){return e===null?null:{regex:RegExp(e.map(Ep).join("|")),deser:([r])=>e.findIndex(i=>Ki(r)===Ki(i))+n}}function Zi(e,n){return{regex:e,deser:([,r,i])=>Bn(r,i),groups:n}}function Sr(e){return{regex:e,deser:([n])=>n}}function Bp(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Sp(e,n){const r=Ie(n),i=Ie(n,"{2}"),l=Ie(n,"{3}"),o=Ie(n,"{4}"),a=Ie(n,"{6}"),s=Ie(n,"{1,2}"),c=Ie(n,"{1,3}"),d=Ie(n,"{1,6}"),u=Ie(n,"{1,9}"),m=Ie(n,"{2,4}"),f=Ie(n,"{4,6}"),p=A=>({regex:RegExp(Bp(A.val)),deser:([I])=>I,literal:!0}),h=(A=>{if(e.literal)return p(A);switch(A.val){case"G":return $e(n.eras("short",!1),0);case"GG":return $e(n.eras("long",!1),0);case"y":return j(d);case"yy":return j(m,hr);case"yyyy":return j(o);case"yyyyy":return j(f);case"yyyyyy":return j(a);case"M":return j(s);case"MM":return j(i);case"MMM":return $e(n.months("short",!0,!1),1);case"MMMM":return $e(n.months("long",!0,!1),1);case"L":return j(s);case"LL":return j(i);case"LLL":return $e(n.months("short",!1,!1),1);case"LLLL":return $e(n.months("long",!1,!1),1);case"d":return j(s);case"dd":return j(i);case"o":return j(c);case"ooo":return j(l);case"HH":return j(i);case"H":return j(s);case"hh":return j(i);case"h":return j(s);case"mm":return j(i);case"m":return j(s);case"q":return j(s);case"qq":return j(i);case"s":return j(s);case"ss":return j(i);case"S":return j(c);case"SSS":return j(l);case"u":return Sr(u);case"uu":return Sr(s);case"uuu":return j(r);case"a":return $e(n.meridiems(),0);case"kkkk":return j(o);case"kk":return j(m,hr);case"W":return j(s);case"WW":return j(i);case"E":case"c":return j(r);case"EEE":return $e(n.weekdays("short",!1,!1),1);case"EEEE":return $e(n.weekdays("long",!1,!1),1);case"ccc":return $e(n.weekdays("short",!0,!1),1);case"cccc":return $e(n.weekdays("long",!0,!1),1);case"Z":case"ZZ":return Zi(new RegExp(`([+-]${s.source})(?::(${i.source}))?`),2);case"ZZZ":return Zi(new RegExp(`([+-]${s.source})(${i.source})?`),2);case"z":return Sr(/[a-z_+-/]{1,256}?/i);default:return p(A)}})(e)||{invalidReason:Vp};return h.token=e,h}const Np={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function Tp(e,n,r){const{type:i,value:l}=e;if(i==="literal")return{literal:!0,val:l};const o=r[i];let a=Np[i];if(typeof a=="object"&&(a=a[o]),a)return{literal:!1,val:a}}function Op(e){return[`^${e.map(r=>r.regex).reduce((r,i)=>`${r}(${i.source})`,"")}$`,e]}function Dp(e,n,r){const i=e.match(n);if(i){const l={};let o=1;for(const a in r)if(Ct(r,a)){const s=r[a],c=s.groups?s.groups+1:1;!s.literal&&s.token&&(l[s.token.val[0]]=s.deser(i.slice(o,o+c))),o+=c}return[i,l]}else return[i,{}]}function Ap(e){const n=o=>{switch(o){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let r=null,i;return $(e.z)||(r=We.create(e.z)),$(e.Z)||(r||(r=new he(e.Z)),i=e.Z),$(e.q)||(e.M=(e.q-1)*3+1),$(e.h)||(e.h<12&&e.a===1?e.h+=12:e.h===12&&e.a===0&&(e.h=0)),e.G===0&&e.y&&(e.y=-e.y),$(e.u)||(e.S=mr(e.u)),[Object.keys(e).reduce((o,a)=>{const s=n(a);return s&&(o[s]=e[a]),o},{}),r,i]}let Nr=null;function Mp(){return Nr||(Nr=N.fromMillis(1555555555555)),Nr}function Fp(e,n){if(e.literal)return e;const r=be.macroTokenToFormatOpts(e.val);if(!r)return e;const o=be.create(n,r).formatDateTimeParts(Mp()).map(a=>Tp(a,n,r));return o.includes(void 0)?e:o}function Ip(e,n){return Array.prototype.concat(...e.map(r=>Fp(r,n)))}function Yi(e,n,r){const i=Ip(be.parseFormat(r),e),l=i.map(a=>Sp(a,e)),o=l.find(a=>a.invalidReason);if(o)return{input:n,tokens:i,invalidReason:o.invalidReason};{const[a,s]=Op(l),c=RegExp(a,"i"),[d,u]=Dp(n,c,s),[m,f,p]=u?Ap(u):[null,null,void 0];if(Ct(u,"a")&&Ct(u,"H"))throw new Wt("Can't include meridiem when specifying 24-hour format");return{input:n,tokens:i,regex:c,rawMatches:d,matches:u,result:m,zone:f,specificOffset:p}}}function $p(e,n,r){const{result:i,zone:l,specificOffset:o,invalidReason:a}=Yi(e,n,r);return[i,l,o,a]}const Xi=[0,31,59,90,120,151,181,212,243,273,304,334],Ji=[0,31,60,91,121,152,182,213,244,274,305,335];function Oe(e,n){return new Fe("unit out of range",`you specified ${n} (of type ${typeof n}) as a ${e}, which is invalid`)}function Qi(e,n,r){const i=new Date(Date.UTC(e,n-1,r));e<100&&e>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const l=i.getUTCDay();return l===0?7:l}function vi(e,n,r){return r+(Kt(e)?Ji:Xi)[n-1]}function el(e,n){const r=Kt(e)?Ji:Xi,i=r.findIndex(o=>o<n),l=n-r[i];return{month:i+1,day:l}}function Tr(e){const{year:n,month:r,day:i}=e,l=vi(n,r,i),o=Qi(n,r,i);let a=Math.floor((l-o+10)/7),s;return a<1?(s=n-1,a=En(s)):a>En(n)?(s=n+1,a=1):s=n,B({weekYear:s,weekNumber:a,weekday:o},Tn(e))}function tl(e){const{weekYear:n,weekNumber:r,weekday:i}=e,l=Qi(n,1,4),o=Zt(n);let a=r*7+i-l-3,s;a<1?(s=n-1,a+=Zt(s)):a>o?(s=n+1,a-=Zt(n)):s=n;const{month:c,day:d}=el(s,a);return B({year:s,month:c,day:d},Tn(e))}function Or(e){const{year:n,month:r,day:i}=e,l=vi(n,r,i);return B({year:n,ordinal:l},Tn(e))}function nl(e){const{year:n,ordinal:r}=e,{month:i,day:l}=el(n,r);return B({year:n,month:i,day:l},Tn(e))}function Lp(e){const n=wn(e.weekYear),r=Ge(e.weekNumber,1,En(e.weekYear)),i=Ge(e.weekday,1,7);return n?r?i?!1:Oe("weekday",e.weekday):Oe("week",e.week):Oe("weekYear",e.weekYear)}function Up(e){const n=wn(e.year),r=Ge(e.ordinal,1,Zt(e.year));return n?r?!1:Oe("ordinal",e.ordinal):Oe("year",e.year)}function rl(e){const n=wn(e.year),r=Ge(e.month,1,12),i=Ge(e.day,1,Vn(e.year,e.month));return n?r?i?!1:Oe("day",e.day):Oe("month",e.month):Oe("year",e.year)}function ol(e){const{hour:n,minute:r,second:i,millisecond:l}=e,o=Ge(n,0,23)||n===24&&r===0&&i===0&&l===0,a=Ge(r,0,59),s=Ge(i,0,59),c=Ge(l,0,999);return o?a?s?c?!1:Oe("millisecond",l):Oe("second",i):Oe("minute",r):Oe("hour",n)}const Dr="Invalid DateTime",il=864e13;function Fn(e){return new Fe("unsupported zone",`the zone "${e.name}" is not supported`)}function Ar(e){return e.weekData===null&&(e.weekData=Tr(e.c)),e.weekData}function Qt(e,n){const r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new N(ke(B(B({},r),n),{old:r}))}function ll(e,n,r){let i=e-n*60*1e3;const l=r.offset(i);if(n===l)return[i,n];i-=(l-n)*60*1e3;const o=r.offset(i);return l===o?[i,l]:[e-Math.min(l,o)*60*1e3,Math.max(l,o)]}function al(e,n){e+=n*60*1e3;const r=new Date(e);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function In(e,n,r){return ll(pr(e),n,r)}function sl(e,n){const r=e.o,i=e.c.year+Math.trunc(n.years),l=e.c.month+Math.trunc(n.months)+Math.trunc(n.quarters)*3,o=ke(B({},e.c),{year:i,month:l,day:Math.min(e.c.day,Vn(i,l))+Math.trunc(n.days)+Math.trunc(n.weeks)*7}),a=U.fromObject({years:n.years-Math.trunc(n.years),quarters:n.quarters-Math.trunc(n.quarters),months:n.months-Math.trunc(n.months),weeks:n.weeks-Math.trunc(n.weeks),days:n.days-Math.trunc(n.days),hours:n.hours,minutes:n.minutes,seconds:n.seconds,milliseconds:n.milliseconds}).as("milliseconds"),s=pr(o);let[c,d]=ll(s,r,e.zone);return a!==0&&(c+=a,d=e.zone.offset(c)),{ts:c,o:d}}function vt(e,n,r,i,l,o){const{setZone:a,zone:s}=r;if(e&&Object.keys(e).length!==0){const c=n||s,d=N.fromObject(e,ke(B({},r),{zone:c,specificOffset:o}));return a?d:d.setZone(s)}else return N.invalid(new Fe("unparsable",`the input "${l}" can't be parsed as ${i}`))}function $n(e,n,r=!0){return e.isValid?be.create(Q.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,n):null}function Mr(e,n){const r=e.c.year>9999||e.c.year<0;let i="";return r&&e.c.year>=0&&(i+="+"),i+=ne(e.c.year,r?6:4),n?(i+="-",i+=ne(e.c.month),i+="-",i+=ne(e.c.day)):(i+=ne(e.c.month),i+=ne(e.c.day)),i}function cl(e,n,r,i,l){let o=ne(e.c.hour);return n?(o+=":",o+=ne(e.c.minute),(e.c.second!==0||!r)&&(o+=":")):o+=ne(e.c.minute),(e.c.second!==0||!r)&&(o+=ne(e.c.second),(e.c.millisecond!==0||!i)&&(o+=".",o+=ne(e.c.millisecond,3))),l&&(e.isOffsetFixed&&e.offset===0?o+="Z":e.o<0?(o+="-",o+=ne(Math.trunc(-e.o/60)),o+=":",o+=ne(Math.trunc(-e.o%60))):(o+="+",o+=ne(Math.trunc(e.o/60)),o+=":",o+=ne(Math.trunc(e.o%60)))),o}const dl={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Pp={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},jp={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ul=["year","month","day","hour","minute","second","millisecond"],Rp=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],zp=["year","ordinal","hour","minute","second","millisecond"];function ml(e){const n={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!n)throw new Yo(e);return n}function fl(e,n){const r=ve(n.zone,oe.defaultZone),i=Q.fromObject(n),l=oe.now();let o,a;if($(e.year))o=l;else{for(const d of ul)$(e[d])&&(e[d]=dl[d]);const s=rl(e)||ol(e);if(s)return N.invalid(s);const c=r.offset(l);[o,a]=In(e,c,r)}return new N({ts:o,zone:r,loc:i,o:a})}function pl(e,n,r){const i=$(r.round)?!0:r.round,l=(a,s)=>(a=fr(a,i||r.calendary?0:2,!0),n.loc.clone(r).relFormatter(r).format(a,s)),o=a=>r.calendary?n.hasSame(e,a)?0:n.startOf(a).diff(e.startOf(a),a).get(a):n.diff(e,a).get(a);if(r.unit)return l(o(r.unit),r.unit);for(const a of r.units){const s=o(a);if(Math.abs(s)>=1)return l(s,a)}return l(e>n?-0:0,r.units[r.units.length-1])}function hl(e){let n={},r;return e.length>0&&typeof e[e.length-1]=="object"?(n=e[e.length-1],r=Array.from(e).slice(0,e.length-1)):r=Array.from(e),[n,r]}class N{constructor(n){const r=n.zone||oe.defaultZone;let i=n.invalid||(Number.isNaN(n.ts)?new Fe("invalid input"):null)||(r.isValid?null:Fn(r));this.ts=$(n.ts)?oe.now():n.ts;let l=null,o=null;if(!i)if(n.old&&n.old.ts===this.ts&&n.old.zone.equals(r))[l,o]=[n.old.c,n.old.o];else{const s=r.offset(this.ts);l=al(this.ts,s),i=Number.isNaN(l.year)?new Fe("invalid input"):null,l=i?null:l,o=i?null:s}this._zone=r,this.loc=n.loc||Q.create(),this.invalid=i,this.weekData=null,this.c=l,this.o=o,this.isLuxonDateTime=!0}static now(){return new N({})}static local(){const[n,r]=hl(arguments),[i,l,o,a,s,c,d]=r;return fl({year:i,month:l,day:o,hour:a,minute:s,second:c,millisecond:d},n)}static utc(){const[n,r]=hl(arguments),[i,l,o,a,s,c,d]=r;return n.zone=he.utcInstance,fl({year:i,month:l,day:o,hour:a,minute:s,second:c,millisecond:d},n)}static fromJSDate(n,r={}){const i=Ym(n)?n.valueOf():NaN;if(Number.isNaN(i))return N.invalid("invalid input");const l=ve(r.zone,oe.defaultZone);return l.isValid?new N({ts:i,zone:l,loc:Q.fromObject(r)}):N.invalid(Fn(l))}static fromMillis(n,r={}){if(ct(n))return n<-il||n>il?N.invalid("Timestamp out of range"):new N({ts:n,zone:ve(r.zone,oe.defaultZone),loc:Q.fromObject(r)});throw new Ne(`fromMillis requires a numerical input, but received a ${typeof n} with value ${n}`)}static fromSeconds(n,r={}){if(ct(n))return new N({ts:n*1e3,zone:ve(r.zone,oe.defaultZone),loc:Q.fromObject(r)});throw new Ne("fromSeconds requires a numerical input")}static fromObject(n,r={}){n=n||{};const i=ve(r.zone,oe.defaultZone);if(!i.isValid)return N.invalid(Fn(i));const l=oe.now(),o=$(r.specificOffset)?i.offset(l):r.specificOffset,a=Sn(n,ml),s=!$(a.ordinal),c=!$(a.year),d=!$(a.month)||!$(a.day),u=c||d,m=a.weekYear||a.weekNumber,f=Q.fromObject(r);if((u||s)&&m)throw new Wt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&s)throw new Wt("Can't mix ordinal dates with month/day");const p=m||a.weekday&&!u;let y,h,A=al(l,o);p?(y=Rp,h=Pp,A=Tr(A)):s?(y=zp,h=jp,A=Or(A)):(y=ul,h=dl);let I=!1;for(const K of y){const F=a[K];$(F)?I?a[K]=h[K]:a[K]=A[K]:I=!0}const z=p?Lp(a):s?Up(a):rl(a),q=z||ol(a);if(q)return N.invalid(q);const Y=p?tl(a):s?nl(a):a,[X,M]=In(Y,o,i),V=new N({ts:X,zone:i,o:M,loc:f});return a.weekday&&u&&n.weekday!==V.weekday?N.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${V.toISO()}`):V}static fromISO(n,r={}){const[i,l]=np(n);return vt(i,l,r,"ISO 8601",n)}static fromRFC2822(n,r={}){const[i,l]=rp(n);return vt(i,l,r,"RFC 2822",n)}static fromHTTP(n,r={}){const[i,l]=op(n);return vt(i,l,r,"HTTP",r)}static fromFormat(n,r,i={}){if($(n)||$(r))throw new Ne("fromFormat requires an input string and a format");const{locale:l=null,numberingSystem:o=null}=i,a=Q.fromOpts({locale:l,numberingSystem:o,defaultToEN:!0}),[s,c,d,u]=$p(a,n,r);return u?N.invalid(u):vt(s,c,i,`format ${r}`,n,d)}static fromString(n,r,i={}){return N.fromFormat(n,r,i)}static fromSQL(n,r={}){const[i,l]=mp(n);return vt(i,l,r,"SQL",n)}static invalid(n,r=null){if(!n)throw new Ne("need to specify a reason the DateTime is invalid");const i=n instanceof Fe?n:new Fe(n,r);if(oe.throwOnInvalid)throw new qm(i);return new N({invalid:i})}static isDateTime(n){return n&&n.isLuxonDateTime||!1}get(n){return this[n]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ar(this).weekYear:NaN}get weekNumber(){return this.isValid?Ar(this).weekNumber:NaN}get weekday(){return this.isValid?Ar(this).weekday:NaN}get ordinal(){return this.isValid?Or(this.c).ordinal:NaN}get monthShort(){return this.isValid?Mn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Mn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Mn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Mn.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset}get isInLeapYear(){return Kt(this.year)}get daysInMonth(){return Vn(this.year,this.month)}get daysInYear(){return this.isValid?Zt(this.year):NaN}get weeksInWeekYear(){return this.isValid?En(this.weekYear):NaN}resolvedLocaleOptions(n={}){const{locale:r,numberingSystem:i,calendar:l}=be.create(this.loc.clone(n),n).resolvedOptions(this);return{locale:r,numberingSystem:i,outputCalendar:l}}toUTC(n=0,r={}){return this.setZone(he.instance(n),r)}toLocal(){return this.setZone(oe.defaultZone)}setZone(n,{keepLocalTime:r=!1,keepCalendarTime:i=!1}={}){if(n=ve(n,oe.defaultZone),n.equals(this.zone))return this;if(n.isValid){let l=this.ts;if(r||i){const o=n.offset(this.ts),a=this.toObject();[l]=In(a,o,n)}return Qt(this,{ts:l,zone:n})}else return N.invalid(Fn(n))}reconfigure({locale:n,numberingSystem:r,outputCalendar:i}={}){const l=this.loc.clone({locale:n,numberingSystem:r,outputCalendar:i});return Qt(this,{loc:l})}setLocale(n){return this.reconfigure({locale:n})}set(n){if(!this.isValid)return this;const r=Sn(n,ml),i=!$(r.weekYear)||!$(r.weekNumber)||!$(r.weekday),l=!$(r.ordinal),o=!$(r.year),a=!$(r.month)||!$(r.day),s=o||a,c=r.weekYear||r.weekNumber;if((s||l)&&c)throw new Wt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&l)throw new Wt("Can't mix ordinal dates with month/day");let d;i?d=tl(B(B({},Tr(this.c)),r)):$(r.ordinal)?(d=B(B({},this.toObject()),r),$(r.day)&&(d.day=Math.min(Vn(d.year,d.month),d.day))):d=nl(B(B({},Or(this.c)),r));const[u,m]=In(d,this.o,this.zone);return Qt(this,{ts:u,o:m})}plus(n){if(!this.isValid)return this;const r=U.fromDurationLike(n);return Qt(this,sl(this,r))}minus(n){if(!this.isValid)return this;const r=U.fromDurationLike(n).negate();return Qt(this,sl(this,r))}startOf(n){if(!this.isValid)return this;const r={},i=U.normalizeUnit(n);switch(i){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(i==="weeks"&&(r.weekday=1),i==="quarters"){const l=Math.ceil(this.month/3);r.month=(l-1)*3+1}return this.set(r)}endOf(n){return this.isValid?this.plus({[n]:1}).startOf(n).minus(1):this}toFormat(n,r={}){return this.isValid?be.create(this.loc.redefaultToEN(r)).formatDateTimeFromString(this,n):Dr}toLocaleString(n=ur,r={}){return this.isValid?be.create(this.loc.clone(r),n).formatDateTime(this):Dr}toLocaleParts(n={}){return this.isValid?be.create(this.loc.clone(n),n).formatDateTimeParts(this):[]}toISO({format:n="extended",suppressSeconds:r=!1,suppressMilliseconds:i=!1,includeOffset:l=!0}={}){if(!this.isValid)return null;const o=n==="extended";let a=Mr(this,o);return a+="T",a+=cl(this,o,r,i,l),a}toISODate({format:n="extended"}={}){return this.isValid?Mr(this,n==="extended"):null}toISOWeekDate(){return $n(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:n=!1,suppressSeconds:r=!1,includeOffset:i=!0,includePrefix:l=!1,format:o="extended"}={}){return this.isValid?(l?"T":"")+cl(this,o==="extended",r,n,i):null}toRFC2822(){return $n(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return $n(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Mr(this,!0):null}toSQLTime({includeOffset:n=!0,includeZone:r=!1,includeOffsetSpace:i=!0}={}){let l="HH:mm:ss.SSS";return(r||n)&&(i&&(l+=" "),r?l+="z":n&&(l+="ZZ")),$n(this,l,!0)}toSQL(n={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(n)}`:null}toString(){return this.isValid?this.toISO():Dr}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(n={}){if(!this.isValid)return{};const r=B({},this.c);return n.includeConfig&&(r.outputCalendar=this.outputCalendar,r.numberingSystem=this.loc.numberingSystem,r.locale=this.loc.locale),r}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(n,r="milliseconds",i={}){if(!this.isValid||!n.isValid)return U.invalid("created by diffing an invalid DateTime");const l=B({locale:this.locale,numberingSystem:this.numberingSystem},i),o=Xm(r).map(U.normalizeUnit),a=n.valueOf()>this.valueOf(),s=a?this:n,c=a?n:this,d=xp(s,c,o,l);return a?d.negate():d}diffNow(n="milliseconds",r={}){return this.diff(N.now(),n,r)}until(n){return this.isValid?v.fromDateTimes(this,n):this}hasSame(n,r){if(!this.isValid)return!1;const i=n.valueOf(),l=this.setZone(n.zone,{keepLocalTime:!0});return l.startOf(r)<=i&&i<=l.endOf(r)}equals(n){return this.isValid&&n.isValid&&this.valueOf()===n.valueOf()&&this.zone.equals(n.zone)&&this.loc.equals(n.loc)}toRelative(n={}){if(!this.isValid)return null;const r=n.base||N.fromObject({},{zone:this.zone}),i=n.padding?this<r?-n.padding:n.padding:0;let l=["years","months","days","hours","minutes","seconds"],o=n.unit;return Array.isArray(n.unit)&&(l=n.unit,o=void 0),pl(r,this.plus(i),ke(B({},n),{numeric:"always",units:l,unit:o}))}toRelativeCalendar(n={}){return this.isValid?pl(n.base||N.fromObject({},{zone:this.zone}),this,ke(B({},n),{numeric:"auto",units:["years","months","days"],calendary:!0})):null}static min(...n){if(!n.every(N.isDateTime))throw new Ne("min requires all arguments be DateTimes");return yi(n,r=>r.valueOf(),Math.min)}static max(...n){if(!n.every(N.isDateTime))throw new Ne("max requires all arguments be DateTimes");return yi(n,r=>r.valueOf(),Math.max)}static fromFormatExplain(n,r,i={}){const{locale:l=null,numberingSystem:o=null}=i,a=Q.fromOpts({locale:l,numberingSystem:o,defaultToEN:!0});return Yi(a,n,r)}static fromStringExplain(n,r,i={}){return N.fromFormatExplain(n,r,i)}static get DATE_SHORT(){return ur}static get DATE_MED(){return Xo}static get DATE_MED_WITH_WEEKDAY(){return Wm}static get DATE_FULL(){return Jo}static get DATE_HUGE(){return Qo}static get TIME_SIMPLE(){return vo}static get TIME_WITH_SECONDS(){return ei}static get TIME_WITH_SHORT_OFFSET(){return ti}static get TIME_WITH_LONG_OFFSET(){return ni}static get TIME_24_SIMPLE(){return ri}static get TIME_24_WITH_SECONDS(){return oi}static get TIME_24_WITH_SHORT_OFFSET(){return ii}static get TIME_24_WITH_LONG_OFFSET(){return li}static get DATETIME_SHORT(){return ai}static get DATETIME_SHORT_WITH_SECONDS(){return si}static get DATETIME_MED(){return ci}static get DATETIME_MED_WITH_SECONDS(){return di}static get DATETIME_MED_WITH_WEEKDAY(){return Km}static get DATETIME_FULL(){return ui}static get DATETIME_FULL_WITH_SECONDS(){return mi}static get DATETIME_HUGE(){return fi}static get DATETIME_HUGE_WITH_SECONDS(){return pi}}function en(e){if(N.isDateTime(e))return e;if(e&&e.valueOf&&ct(e.valueOf()))return N.fromJSDate(e);if(e&&typeof e=="object")return N.fromObject(e);throw new Ne(`Unknown datetime argument: ${e}, of type ${typeof e}`)}var KB="";const qp={mixins:[at],computed:{hasValue(){return this.value!==void 0&&this.value!==null},timeago(){return N.fromISO(this.value).toRelative()},readable(){let e=N.fromISO(this.value),n=N.now(),r=n.toFormat("yyyy");return n.toFormat("MMM yyyy"),e.toFormat("yyyy")===r?N.fromISO(this.value).toFormat("h:mm a - dd MMM"):N.fromISO(this.value).toFormat("h:mm a - dd MMM yyyy")}}},Hp={class:"table-date-cell"},Gp={key:0},Wp={class:"off"},Kp={class:"on"},Zp={class:"spacer"};function Yp(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("td",Hp,[o.hasValue?(t.openBlock(),t.createElementBlock("div",Gp,[t.createElementVNode("span",Wp,t.toDisplayString(o.readable),1),t.createElementVNode("span",Kp,t.toDisplayString(o.timeago),1),t.createElementVNode("span",Zp,t.toDisplayString(o.readable),1)])):t.createCommentVNode("",!0)])}var yl=_(qp,[["render",Yp],["__scopeId","data-v-3687693f"]]),ZB="";const Xp={mixins:[at],computed:{boolean(){return!!this.value}}};function Jp(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-boolean-cell",{true:o.boolean,false:!o.boolean}])},[t.createVNode(a,{icon:o.boolean?"fa-check":"fa-times"},null,8,["icon"])],2)}var gl=_(Xp,[["render",Jp],["__scopeId","data-v-27f127ae"]]),YB="";const Qp={mixins:[at],computed:{public(){return this.security==="public"},security(){return this.value||"secure"}}};function vp(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["table-security-cell",o.security])},[t.createVNode(a,{icon:o.public?"fa-lock-open":"fa-lock"},null,8,["icon"])],2)}var eh=_(Qp,[["render",vp],["__scopeId","data-v-51f8608e"]]),XB="";const th={mixins:[at],methods:{open(){window.open(this.href)}},computed:{href(){return`http://${this.value}`}}},nh={class:"table-url-cell"},rh=["href"];function oh(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("td",nh,[t.createElementVNode("a",{href:o.href,onClick:n[0]||(n[0]=t.withModifiers((...s)=>o.open&&o.open(...s),["stop","prevent"])),target:"_blank"},[t.createTextVNode(t.toDisplayString(e.value)+" ",1),t.createVNode(a,{right:"",icon:"fa-external-link"})],8,rh)])}var _l=_(th,[["render",oh],["__scopeId","data-v-17cf3a86"]]),JB="";const ih={props:{multi:{type:Boolean},last:{type:Boolean},value:{required:!0},type:{type:String},widget:{type:String}},computed:{reference(){return!!(this.value&&this.value._id)},renderValue(){return this.value?this.value.title||this.value.name||this.value:void 0},date(){return N.fromISO(this.value).toFormat("dd MMM yyyy")},actualWidget(){var e;if(this.widget)e=this.widget;else switch(this.type){case"date":e="datetime";break}return e}},methods:{clicked(e){this.$sdk.dispatch("item:view",e)}}};function lh(e,n,r,i,l,o){return o.reference?(t.openBlock(),t.createElementBlock("a",{key:0,onClick:n[0]||(n[0]=t.withModifiers(a=>o.clicked(r.value),["stop","prevent"]))},t.toDisplayString(o.renderValue),1)):r.type=="date"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(o.date),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createTextVNode(t.toDisplayString(o.renderValue),1),r.multi&&!r.last?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(",\xA0")],64)):t.createCommentVNode("",!0)],64))}var ah=_(ih,[["render",lh],["__scopeId","data-v-255b9ec8"]]),QB="";function Fr(e,n){if(!e||!n)return;var r=Cn(e,n);if(r)return r;const i=n.split("."),l=i.shift(),o=i.join("."),a=Cn(e,l);return Array.isArray(a)?a.map(function(s){return Fr(s,o)}).flat().filter(Boolean):Fr(a,o)}const sh={data(){return{component:null}},components:{ValueRenderer:ah},async created(){const e=this;let n,r=e.column.type,i=e.column.renderer||e.column.widget;switch(r=="reference"&&e.column.referenceType==="image"&&(i="thumbnail"),i){case"button":n=zm;break;case"security":n=eh;break;case"boolean":n=gl;break;case"date":case"datetime":n=yl;break;case"url":n=_l;break;case"currency":n=Um;break;case"thumbnail":n=Im;break;default:switch(r){case"date":n=yl;break;case"boolean":n=gl;break;case"url":n=_l;break}break}e.component=n},props:{column:{type:Object,required:!0},row:{type:Object,required:!0}},computed:{multiValue(){return Array.isArray(this.value)},complex(){this.multiValue},renderer(){return this.column.renderer},renderValue(){var e=this.value;if(e!=null)return e.title||e.name||e},value(){var e=Fr(this.row,this.column.key);return e}}},ch={key:1,class:"table-cell"},dh={class:"value"},uh={class:"value"};function mh(e,n,r,i,l,o){const a=t.resolveComponent("value-renderer");return l.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.component),{key:0,column:r.column,row:r.row,value:o.value},null,8,["column","row","value"])):(t.openBlock(),t.createElementBlock("td",ch,[o.multiValue?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o.complex?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.value,(s,c)=>(t.openBlock(),t.createElementBlock("span",dh,[t.createVNode(a,{type:r.column.type,multi:"",last:c===o.value.length-1,value:s},null,8,["type","last","value"])]))),256)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(o.value,(s,c)=>(t.openBlock(),t.createElementBlock("span",uh,[t.createVNode(a,{type:r.column.type,multi:"",last:c===o.value.length-1,value:s},null,8,["type","last","value"])]))),256))],64)):(t.openBlock(),t.createBlock(a,{key:1,type:r.column.type,value:o.value},null,8,["type","value"]))]))}var kl=_(sh,[["render",mh],["__scopeId","data-v-44c51175"]]);const fh={components:{TableCell:kl},props:{selected:{type:Boolean},index:{type:Number},row:{type:Object,required:!0},columns:{type:Array,required:!0},enableActions:{type:Boolean,default(){return!1}},enableSelection:{type:Boolean,default(){return!0}}},methods:{clickCell(e){this.$emit("click:cell",{row:this.row,column:e}),this.$emit("click:row",this.row)},clickActions(e){this.$emit("click:actions",e)},clickSelect(e){const n=this.index;this.$emit("click:select",e,n)}},computed:{classes(){var e=[];return this.selected&&e.push("selected"),e}}};function ph(e,n,r,i,l,o){const a=t.resolveComponent("ux-checkbox"),s=t.resolveComponent("table-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("tr",{class:t.normalizeClass([o.classes,"table-row"])},[t.renderSlot(e.$slots,"default",{},()=>[r.enableSelection?(t.openBlock(),t.createElementBlock("th",{key:0,class:"table-cell table-select first shrink",onClick:n[0]||(n[0]=t.withModifiers(u=>o.clickSelect(r.row),["stop","prevent"]))},[t.createVNode(a,{value:r.selected},null,8,["value"])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.columns,(u,m)=>(t.openBlock(),t.createBlock(s,{key:`${u.path||u.key}-${m}`,onClick:t.withModifiers(f=>o.clickCell(u),["stop","prevent"]),column:u,row:r.row},null,8,["onClick","column","row"]))),128)),r.enableActions?(t.openBlock(),t.createElementBlock("th",{key:1,class:"table-cell last shrink",onClick:n[1]||(n[1]=t.withModifiers(u=>o.clickActions(r.row),["stop","prevent"]))},[t.createVNode(d,{size:"xs",icon:""},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-ellipsis"})]),_:1})])):t.createCommentVNode("",!0)])],2)}var hh=_(fh,[["render",ph]]),bl={data(){return{scrollTop:0}},methods:{updateScroll(e){var n=this.$refs.scroll;n=n.$el||n,this.scrollTop=n.scrollTop}},mounted(){var e=this.$refs.scroll;e=e.$el||e,e.addEventListener("scroll",this.updateScroll)},beforeUnmount(){var e=this.$refs.scroll;e=e.$el||e,e.removeEventListener("scroll",this.updateScroll)},activated(){var e=this.$refs.scroll;e=e.$el||e,e.scrollTop=this.scrollTop}},vB="";const yh={mixins:[bl],components:{TableRow:hh,TableCell:kl},watch:{rows(){this.$refs.scroll.scroll({top:0,left:0})},sort(e){this.sorting=e},sorting(e){this.$emit("update:sort",e)}},props:{total:{type:Number},columns:{type:Array,default(){return[]}},rows:{type:Array,default(){return[]}},scrollable:{type:Boolean,default(){return!0}},enableActions:{type:Boolean,default(){return!1}},enableSelection:{type:Boolean,default(){return!0}},sort:{type:Object,default(){return{key:"meta.created",type:"date",direction:"desc"}}},selection:{type:Array,default(){return[]}},selectAll:{type:Function},deselectAll:{type:Function}},data(){return{sorting:this.sort,lastSelectedIndex:null,shift:!1,keyListenersAdded:!1}},mounted(){this.addKeyListeners()},activated(){this.addKeyListeners()},beforeUnmount(){this.removeKeyListeners()},deactivated(){this.removeKeyListeners()},computed:{currentSortDirection(){var e;return((e=this.sorting)==null?void 0:e.direction)||"asc"},selectionHash(){var e=this;return e.selection.reduce(function(n,r){var i=r._id||r.id;return n[i]=r,n},{})},pageSelected(){var e=this;if(!(!e.rows||!e.rows.length))return!e.rows.some(function(n){return!e.selectionHash[n._id||n.id]})},renderColumns(){return this.columns.map(function(e){var n=Object.assign({},e);return n.class=[],n.shrink&&n.class.push("shrink"),n})},renderRows(){return this.rows},someSelectedOnPage(){return this.rows.some(this.isSelected)}},methods:{keyDown(e){e.keyCode==16&&(this.shift=!0)},keyUp(e){e.keyCode==16&&(this.shift=!1)},addKeyListeners(){this.keyListenersAdded||(window.addEventListener("keydown",this.keyDown,!0),window.addEventListener("keyup",this.keyUp,!0),this.keyListenersAdded=!0)},removeKeyListeners(){!this.keyListenersAdded||(window.removeEventListener("keydown",this.keyDown,!0),window.removeEventListener("keyup",this.keyUp,!0),this.keyListenersAdded=!1)},togglePage(){var e=this;e.pageSelected?e.deselectPage():e.selectPage()},selectPage(){var e=this;e.$emit("select:multiple",e.rows)},deselectPage(){var e=this;e.$emit("deselect:multiple",e.rows)},isSelected(e){var n=this,r=e._id||e.id;return n.selection.some(function(i){var l=i._id||i.id;return i==e||l==r})},classes(e){let n=[];return this.isSelected(e)&&n.push("selected"),n},selectRange(e,n){const r=this,i=Math.min(e,n),l=Math.max(e,n)+1;var o=r.renderRows.slice(i,l);r.$emit("select:multiple",o)},toggleSort(e){var o,a;const n=(o=this.sorting)==null?void 0:o.key,r=((a=this.sorting)==null?void 0:a.direction)||"asc";let{key:i,direction:l}=e;i===n&&(l=r==="dsc"?"asc":"dsc"),this.sorting={key:i,direction:l,type:e.type},this.$emit("")},clickRow(e){this.$emit("click:row",e)},clickCell({row:e,column:n}){this.$emit("click:cell",{row:e,column:n})},clickActions(e){this.$emit("click:actions",e)},clickSelect(e,n){const r=this.lastSelectedIndex;if(this.shift&&r!=n)return console.log("FROM",r,"-",n),this.selectRange(r,n);this.lastSelectedIndex=n,this.$emit("select:row:toggle",e)}}},gh={class:"table-wrapper"},_h={class:"table-scroll",ref:"scroll"},kh={key:0,class:"first table-select shrink"},bh=["onClick"],xh={key:1,class:"last shrink"};function Ch(e,n,r,i,l,o){const a=t.resolveComponent("ux-checkbox"),s=t.resolveComponent("ux-list-item"),c=t.resolveComponent("ux-list"),d=t.resolveComponent("ux-menu"),u=t.resolveComponent("flex-cell"),m=t.resolveComponent("flex-row"),f=t.resolveComponent("table-row");return t.openBlock(),t.createElementBlock("div",gh,[t.createElementVNode("div",_h,[t.createElementVNode("table",null,[t.createElementVNode("thead",null,[t.createElementVNode("tr",null,[r.enableSelection?(t.openBlock(),t.createElementBlock("th",kh,[t.createVNode(d,null,{activator:t.withCtx(({on:p})=>[t.createVNode(a,t.mergeProps(t.toHandlers(p),{value:o.pageSelected}),null,16,["value"])]),default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s,{onClick:n[0]||(n[0]=p=>o.selectPage())},{default:t.withCtx(()=>[t.createTextVNode(" Select Page ")]),_:1}),o.someSelectedOnPage?(t.openBlock(),t.createBlock(s,{key:0,onClick:n[1]||(n[1]=p=>o.deselectPage())},{default:t.withCtx(()=>[t.createTextVNode(" Deselect Page ")]),_:1})):t.createCommentVNode("",!0),r.selectAll?(t.openBlock(),t.createBlock(s,{key:1,onClick:n[2]||(n[2]=p=>r.selectAll())},{default:t.withCtx(()=>[t.createTextVNode(" Select All ("+t.toDisplayString(r.total)+") ",1)]),_:1})):t.createCommentVNode("",!0),r.deselectAll?(t.openBlock(),t.createBlock(s,{key:2,onClick:n[3]||(n[3]=p=>r.deselectAll())},{default:t.withCtx(()=>[t.createTextVNode(" Deselect All ")]),_:1})):t.createCommentVNode("",!0)]),_:1})]),_:1})])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.renderColumns,p=>{var y;return t.openBlock(),t.createElementBlock("th",{onClick:h=>o.toggleSort(p),class:t.normalizeClass([{sortable:p.sortable!==!1,active:p.key===((y=l.sorting)==null?void 0:y.key)},p.class])},[t.createVNode(m,{gap:"",vcenter:""},{default:t.withCtx(()=>{var h;return[t.createVNode(u,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(p.title),1)]),_:2},1024),p.key===((h=l.sorting)==null?void 0:h.key)?(t.openBlock(),t.createBlock(u,{key:0,class:"caret",shrink:""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.currentSortDirection==="asc"?"\u25B2":"\u25BC"),1)]),_:1})):t.createCommentVNode("",!0)]}),_:2},1024)],10,bh)}),256)),r.enableActions?(t.openBlock(),t.createElementBlock("th",xh,[t.renderSlot(e.$slots,"corner",{},void 0,!0)])):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.renderRows,(p,y)=>(t.openBlock(),t.createBlock(f,{enableSelection:r.enableSelection,enableActions:r.enableActions,key:p._id,"onClick:cell":o.clickCell,"onClick:row":o.clickRow,"onClick:select":o.clickSelect,"onClick:actions":o.clickActions,selected:o.isSelected(p),row:p,index:y,columns:r.columns},null,8,["enableSelection","enableActions","onClick:cell","onClick:row","onClick:select","onClick:actions","selected","row","index","columns"]))),128))])])],512)])}var xl=_(yh,[["render",Ch],["__scopeId","data-v-03eb874f"]]),Ir={exports:{}},wh=Object.prototype.hasOwnProperty;function Cl(e){return"[Throws: "+(e?e.message:"?")+"]"}function Vh(e,n){if(wh.call(e,n))try{return e[n]}catch(r){return Cl(r)}return e[n]}function wl(e){var n=[];function r(i){if(i===null||typeof i!="object")return i;if(n.indexOf(i)!==-1)return"[Circular]";if(n.push(i),typeof i.toJSON=="function")try{var l=r(i.toJSON());return n.pop(),l}catch(s){return Cl(s)}if(Array.isArray(i)){var o=i.map(r);return n.pop(),o}var a=Object.keys(i).reduce(function(s,c){return s[c]=r(Vh(i,c)),s},{});return n.pop(),a}return r(e)}Ir.exports=function(e,n,r){return JSON.stringify(wl(e),n,r)},Ir.exports.ensureProperties=wl;var $r=Ir.exports;function Eh(e,n){return e==null||n=="date"&&e.toString&&e.toString()==="Invalid Date"}function Vl(e){return e!=null}var H={props:{field:{type:Object,default(){return{}}},parentModel:{type:Object}},data(){return{value:this.modelValue}},watch:{modelValue(e,n){var r=this.cleanInput(e),i=this.cleanInput(this.model);$r(r)!=$r(i)&&(this.model=r)}},mounted(){this.checkAutofocus()},inject:["form","fieldPath"],computed:{optionLookup(){var e=this;return e.options.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{})},selectableOptions(){return this.options},required(){return this.minimum},model:{get(){var e=this.cleanOutput(this.value);return e},set(e){this.value=this.cleanInput(e),this.checkAutofocus(),this.dispatch()}},options(){var e=this;return(this.field.options||[]).reduce(function(n,r){if(!r)return n;const i=e.getValue(r);var o={title:r.title||r.name||r.label||i,value:i,source:r};return e.field.type=="reference"&&(o._id=i),n.push(o),n},[])},prefix(){return this.field.suffix},suffix(){return this.field.suffix},type(){return this.field.type||"string"},key(){return this.field.key},isGroup(){return this.type==="group"},asObject(){return this.isGroup&&!!this.field.asObject},layoutGroup(){return this.isGroup&&!this.field.asObject},canAddValue(){if(!this.singleValue)return this.maximum===0||this.numValues<this.maximum},canRemoveValue(){return this.numValues>this.minimum},widget(){return this.field.widget},singleValue(){if(this.asObject){var e=this.minimum===1&&this.maximum===1;return e}else return this.maximum===1},multiValue(){return!this.singleValue},label(){return this.field.title},title(){return this.label},plural(){return this.field.plural},description(){return this.field.description},placeholder(){return this.field.placeholder||this.field.hint},addLabel(){return this.numValues?`Add another ${this.label}`:`Add ${this.label}`},removeLabel(){return"Remove"},numValues(){return this.singleValue?1:(this.value||[]).length||0},showLabel(){return this.field.title},showDescription(){return this.description},fields(){var e=this.field.fields;if(e&&e.length)return e},minimum(){if(this.layoutGroup)return 1;var e=parseInt(this.field.minimum||0);return isNaN(e)&&(e=0),e=Math.max(e,0),e=this.maximum?Math.min(e,this.maximum):e,parseInt(e)},maximum(){if(this.layoutGroup)return 1;var e=parseInt(this.field.maximum||0);return isNaN(e)&&(e=0),e=Math.max(e,0),parseInt(e)},ask(){var e=parseInt(this.field.ask);return e=Math.max(e,this.minimum),this.maximum&&(e=Math.min(e,this.maximum)),e}},methods:{cleanTextInput(e,n,r){switch(n){case"url":e=r.$sdk.utils.parseURL(e);break;case"key":e=String(r.$sdk.utils.machineName(e||"")||"").trim();break;case"integer":e=parseInt(String(e).replace(/[^0-9-]/g,"")),isNaN(e)&&(e=void 0);break;case"number":case"decimal":case"float":e=Number(String(e).replace(/[^0-9.-]/g,"")),isNaN(e)&&(e=void 0);break}return e},checkAutofocus(){if(this.field.autofocus){if(this.value)return;this.$nextTick(function(){this.refocus()})}},getValue(e){if(!e)return this.cleanTextInput(e);var n=this.cleanTextInput(e._id||e.value),r=Vl(n);return!r&&e.title&&!this.returnObject&&(n=e.title),n=this.cleanTextInput(n),Vl(n)?n:e},getLabel(e){if(!!e){var n=e.title||e.name||e.label;return typeof n=="object"?"(no title)":n}},touch(){this.$emit("touched")},getNewDefaultEntry(){},add(){if(!!this.canAddValue){var e=this.cleanInputValue(this.getNewDefaultEntry());(!this.value||!Array.isArray(this.value))&&(this.value=[]),this.value.push(e),this.dispatch(),this.$nextTick(function(){this.refocus()}),this.touch()}},remove(e){var n=this.model.indexOf(e);this.value.splice(n,1),this.dispatch(),this.touch()},dispatch(){this.$emit("update:modelValue",this.value)},cleanInputValue(e){return e},cleanOutputValue(e){return e},cleanOutput(e){var n=this;return Eh(e,n.field.type)?n.multiValue?e=[]:e=void 0:n.multiValue?(Array.isArray(e)||(e=[]),e.forEach(function(r,i){e[i]=n.cleanOutputValue(r)})):e=n.cleanOutputValue(e),e},cleanInput(e){var n=this;if(n.multiValue){for(e||(e=[]),Array.isArray(e)||(e=[e]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum);e.length<n.minimum;)e.push(n.cleanInputValue(n.getNewDefaultEntry()));e=e.map(function(r){var i=n.cleanInputValue(r);return i})}else e&&(e=n.cleanInputValue(e));return e},refocus(){var e=this.$refs.input;if(!!e){var n;Array.isArray(e)?n=e[e.length-1]:n=e,n&&n.focus()}}}},eS="";function Bh(e){return e===void 0||typeof e=="undefined"||e===null||String(e)==="null"||String(e)==="undefined"}const Sh={props:{title:{type:String},modelValue:{}},mixins:[H],created(){this.model=this.model},methods:{cleanOutput(e){var n=this;return Bh(e)?n.multiValue?e=[]:e=void 0:n.multiValue?e=(e||[]).filter(function(r){return r!=null}).map(function(r){return n.getValue(r)}):e=n.getValue(e),e},cleanInput(e){var n=this;if(n.multiValue)e||(e=[]),Array.isArray(e)||(e=[e]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum),e=e.filter(function(i){return i!=null}).map(function(i){var l=n.getValue(i);return n.returnObject?n.optionLookup[l]:l});else{var r=n.getValue(e);switch(e=n.returnObject?n.optionLookup[r]:r,e){case"":switch(n.type){case"decimal":case"float":case"number":case"integer":e=void 0;break}break}}return e}},computed:{returnObject(){return this.type=="reference"},classes(){var e=[];return this.multiValue?e.push("multiple"):e.push("single"),e},optionLookup(){var e=this;return e.options.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{})},summary(){return this.model?this.getLabel(this.optionLookup[this.model]):this.title||"Click to select"},selectableOptions(){return this.options}}},Nh={key:0,class:"ux-field-title"},Th={key:0,class:"ux-required-marker"},Oh={key:1,class:"ux-field-description"},Dh={key:2,class:"ui-select-button"},Ah=["multiple"],Mh={key:0,value:""},Fh=["value"];function Ih(e,n,r,i,l,o){const a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["native-select",o.classes])},[e.showLabel?(t.openBlock(),t.createElementBlock("label",Nh,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Th,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Oh,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.singleValue?(t.openBlock(),t.createElementBlock("div",Dh,[t.renderSlot(e.$slots,"default",{},()=>[t.createVNode(a,{tag:"div"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1})],!0)])):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("select",{onFocus:n[0]||(n[0]=(...s)=>e.touch&&e.touch(...s)),multiple:e.multiValue,"onUpdate:modelValue":n[1]||(n[1]=s=>e.model=s)},[e.singleValue&&!e.minimum?(t.openBlock(),t.createElementBlock("option",Mh,"None")):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.selectableOptions,s=>(t.openBlock(),t.createElementBlock("option",{value:s.value},t.toDisplayString(s.title),9,Fh))),256))],40,Ah),[[t.vModelSelect,e.model]])],2)}var et=_(Sh,[["render",Ih],["__scopeId","data-v-a06c20f2"]]),tS="";const $h={props:{total:{type:Number,default(){return 0}},page:{type:Object,default(){return{size:50,index:1}}}},components:{NativeSelect:et},watch:{totalPages(){this.currentPage=0}},computed:{perPage:{get(){return this.pageModel.size},set(e){e=Math.max(e,1),this.pageModel.size=e,this.dispatch()}},pageField(){return{type:"integer",maximum:1,minimum:1,options:Array(this.totalPages).fill(1).map((e,n)=>e+n)}},totalPages(){return Math.ceil(this.total/this.perPage)},startIndex(){return(this.currentPage-1)*this.pageModel.size},displayStartIndex(){return this.total?this.startIndex+1:0},endIndex(){return Math.min(this.startIndex+this.pageModel.size,this.total)},currentPage:{get(){return this.pageModel.index},set(e){this.totalPages&&(e=Math.min(this.totalPages,e)),e=Math.max(e,1),this.pageModel.index=e,this.dispatch()}}},methods:{dispatch(){return this.$emit("update:page",this.pageModel)},previousPage(){this.currentPage--},nextPage(){this.currentPage++}},data(){return{pageModel:this.page,perPageField:{minimum:1,maximum:1,options:[{title:"50 per page",value:50},{title:"100 per page",value:100},{title:"250 per page",value:250},{title:"500 per page",value:500}]}}}};function Lh(e,n,r,i,l,o){const a=t.resolveComponent("native-select"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button"),u=t.resolveComponent("flex-row");return t.openBlock(),t.createBlock(u,{center:"",gap:""},{default:t.withCtx(()=>[t.createVNode(s,{shrink:"",class:"text"},{default:t.withCtx(()=>[t.createVNode(a,{modelValue:o.perPage,"onUpdate:modelValue":n[0]||(n[0]=m=>o.perPage=m),field:l.perPageField},{default:t.withCtx(()=>[e.$device.breakpoint.xs?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.displayStartIndex)+"-"+t.toDisplayString(o.endIndex)+" of "+t.toDisplayString(r.total),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Showing "+t.toDisplayString(o.displayStartIndex)+" to "+t.toDisplayString(o.endIndex)+" of "+t.toDisplayString(r.total)+" total",1)],64))]),_:1},8,["modelValue","field"])]),_:1}),t.createVNode(s),o.totalPages>1?(t.openBlock(),t.createBlock(s,{key:0,shrink:""},{default:t.withCtx(()=>[t.createVNode(u,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(s,{shrink:"",class:"text"},{default:t.withCtx(()=>[t.createVNode(a,{modelValue:o.currentPage,"onUpdate:modelValue":n[1]||(n[1]=m=>o.currentPage=m),field:o.pageField},{default:t.withCtx(()=>[e.$device.breakpoint.xs?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.currentPage)+"/"+t.toDisplayString(o.totalPages),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Page "+t.toDisplayString(o.currentPage)+" of "+t.toDisplayString(o.totalPages),1)],64))]),_:1},8,["modelValue","field"])]),_:1}),t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{icon:"",onClick:n[2]||(n[2]=m=>o.previousPage())},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-arrow-left"})]),_:1})]),_:1}),t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{icon:"",onClick:n[3]||(n[3]=m=>o.nextPage())},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-arrow-right"})]),_:1})]),_:1})]),_:1})]),_:1})):t.createCommentVNode("",!0)]),_:1})}var Uh=_($h,[["render",Lh],["__scopeId","data-v-93d2aed8"]]),nS="";const Ph={props:{id:{type:[Object,String]}},computed:{stringID(){return this.$sdk.utils.id(this.id)},url(){}}},jh={class:"avatar"};function Rh(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",jh)}var El=_(Ph,[["render",Rh]]),rS="";const zh={props:{large:{type:Boolean}}},qh=[(e=>(t.pushScopeId("data-v-27f20370"),e=e(),t.popScopeId(),e))(()=>t.createElementVNode("i",{class:"fa fa-spin fa-spinner"},null,-1))];function Hh(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-spinner",{large:r.large}])},qh,2)}var Lr=_(zh,[["render",Hh],["__scopeId","data-v-27f20370"]]),lS="";const Gh={components:{Spinner:Lr},props:{to:{type:[Object,String]},icon:{type:Boolean},color:{type:String,default:"default"},bgColor:{type:String},fgColor:{type:String},tag:{type:String},href:{type:String},target:{type:String},loading:{type:Boolean},active:{type:Boolean},disabled:{type:Boolean},block:{type:Boolean},size:{type:String,default:"md"}},computed:{style(){var e={};return this.bgColor&&(e.backgroundColor=this.bgColor),this.fgColor&&(e.color=this.fgColor),e},classes(){var e=[];return e.push(`ux-btn-${this.size}`),this.block&&e.push("ux-btn-block"),this.loading&&e.push("ux-btn-loading"),this.active&&e.push("ux-btn-active"),this.icon&&e.push("ux-btn-icon"),e.push(`ux-btn-color-${this.color}`),this.disabled&&e.push("ux-btn-disabled"),e},element(){switch(this.tag){case"span":return this.tag;case"submit":return"button";default:return this.to||this.href?"ux-link":this.tag||"button"}}}},Wh={class:"ux-btn-text"};function Kh(e,n,r,i,l,o){const a=t.resolveComponent("spinner");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.element),{active:r.active,loading:r.loading,to:r.to,href:r.href,target:r.target,style:t.normalizeStyle(o.style),class:t.normalizeClass([o.classes,"ux-btn"]),disabled:r.disabled},{default:t.withCtx(()=>[r.loading?(t.openBlock(),t.createBlock(a,{key:0})):t.createCommentVNode("",!0),t.createElementVNode("span",Wh,[t.renderSlot(e.$slots,"default",{},void 0,!0)])]),_:3},8,["active","loading","to","href","target","style","class","disabled"])}var Bl=_(Gh,[["render",Kh],["__scopeId","data-v-56c95efc"]]),aS="";const Zh={props:{value:{type:Boolean,default(){return!1}}},computed:{classes(){var e=[];return this.value?e.push("ux-checkbox-true"):e.push("ux-checkbox-false"),e}}};function Yh(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["ux-checkbox",o.classes])},[t.createVNode(a,{class:"icon",icon:"fa-check"})],2)}var Ur=_(Zh,[["render",Yh],["__scopeId","data-v-6b7b7539"]]),sS="";const Xh={props:{value:{type:Boolean,default(){return!1}},loading:{type:Boolean,default(){return!1}}},computed:{classes(){var e=[];return this.value?e.push("ux-switch-true"):e.push("ux-switch-false"),this.loading&&e.push("ux-switch-loading"),e}}};function Jh(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("a",{class:t.normalizeClass(["ux-switch",o.classes])},[t.createElementVNode("span",null,[t.createVNode(a,{spin:"",icon:"fa-spinner"})])],2)}var Sl=_(Xh,[["render",Jh],["__scopeId","data-v-57a418e1"]]),cS="";const Qh={props:{to:{type:[Object,String]},href:{type:String},target:{type:String},disabled:{type:Boolean}},methods:{clicked(e){var n=this;if(n.to&&(n.buildMode||n.nuxtMode))return e.preventDefault(),e.stopImmediatePropagation(),n.$sdk.app.to(n.to);if(n.href&&(n.buildMode||n.nuxtMode)){e.preventDefault(),e.stopImmediatePropagation();return}}},computed:{actualHref(){if(this.href)return this.href;if(this.nuxtMode)return this.$sdk.app.createHref(this.to)},nuxtMode(){return this.to&&this.$sdk.nuxt&&this.$sdk.app&&this.$sdk.app.createHref},buildMode(){return!!this.$sdk&&this.$sdk.app&&this.$sdk.app.builder},class(){var e=[];return this.disabled&&e.push("disabled"),(this.href||this.to)&&e.push("haslink"),e},element(){return this.nuxtMode||this.buildMode?"a":this.to?"router-link":"a"}}};function vh(e,n,r,i,l,o){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.element),{onClick:o.clicked,to:r.to,href:o.actualHref,target:r.target,class:t.normalizeClass([o.class,"ux-link"])},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",{},void 0,!0)]),_:3},8,["onClick","to","href","target","class"])}var Nl=_(Qh,[["render",vh],["__scopeId","data-v-8b82829a"]]),dS="";const ey={props:{icon:{type:[Object,String]},spin:{type:Boolean},left:{type:Boolean},right:{type:Boolean}},computed:{classes(){var e=[];return e.push(this.icon),this.spin&&e.push("fa-spin"),this.left&&e.push("ux-icon-left"),this.right&&e.push("ux-icon-right"),e},element(){return"i"}}};function ty(e,n,r,i,l,o){return t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.element),{class:t.normalizeClass(["ux-icon fa",o.classes])},null,8,["class"])}var Tl=_(ey,[["render",ty],["__scopeId","data-v-1764a3d0"]]),Ln={cache:{}},uS="";const ny={props:{group:{type:String},right:{type:Boolean,default:!1},bottom:{type:Boolean,default:!1},stop:{type:Boolean,default:!1},closeOnClick:{type:Boolean,default(){return!0}},modelValue:{type:Boolean,default(){return!1}}},data(){return{outerStyle:{},innerStyle:{},isExpanded:this.modelValue,triggerEvent:null,refMenu:null,mounted:!1}},watch:{modelValue(e){this.expanded=e}},mounted(){this.refMenu=this.$refs.menu,this.mounted=!0},beforeUnmount(){this.removeListeners(),this.refMenu=null,this.mounted=!1,Ln.cache[this.group]===this&&(Ln.cache[this.group]=null)},methods:{removeListeners(){document.removeEventListener("click",this.globalClick),this.refMenu&&this.refMenu.removeEventListener("click",this.immediateClick)},addEventListeners(){document.addEventListener("click",this.globalClick),this.refMenu&&this.refMenu.addEventListener("click",this.immediateClick)},immediateClick(e){this.expanded&&this.closeOnClick&&(e.stopImmediatePropagation(),this.expanded=!1)},globalClick(e){if(this.triggerEvent!==e){var n=this.$refs.menu,r=e.srcElement;n&&n.contains(r)?this.closeOnClick&&(this.expanded=!1):this.expanded=!1}},position(){const e=this.$el.getBoundingClientRect();this.outerStyle.left=`${e.left+window.scrollX}px`,this.outerStyle.top=`${e.bottom+window.scrollY}px`,this.right&&(this.innerStyle.right=`-${e.width}px`),this.bottom&&(this.innerStyle.bottom=`${e.height}px`);var n=this.getMaxZIndex();this.outerStyle.zIndex=n},getMaxZIndex(){return Math.max(...Array.from(document.querySelectorAll("body *"),e=>parseFloat(window.getComputedStyle(e).zIndex)).filter(e=>!Number.isNaN(e)),0)},close(){this.expanded=!1}},computed:{expanded:{get(){return this.isExpanded},set(e){var n;this.group&&(n=Ln.cache[this.group]),this.isExpanded!=e&&(this.isExpanded=e,e?(this.position(),this.addEventListeners(),Ln.cache[this.group]=this,n&&n!=this&&(n.expanded=!1)):this.removeListeners(),this.$emit("update:modelValue",e))}},on(){var e=this;return{click(n){e.stop&&n.stopImmediatePropagation(),e.triggerEvent=n,e.expanded=!e.expanded}}}}};function ry(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-menu",{right:r.right}])},[t.createElementVNode("span",null,[t.renderSlot(e.$slots,"activator",{on:o.on},void 0,!0)]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[l.isExpanded?(t.openBlock(),t.createElementBlock("div",{key:0,class:"ux-menu-outer",style:t.normalizeStyle(l.outerStyle)},[t.createElementVNode("div",{class:"ux-menu-panel",ref:"menu",style:t.normalizeStyle(l.innerStyle)},[t.renderSlot(e.$slots,"default",{},void 0,!0)],4)],4)):t.createCommentVNode("",!0)]))],2)}var Ol=_(ny,[["render",ry],["__scopeId","data-v-29d476a2"]]);const oy={name:"menulist",props:{items:{type:Array,default(){return[]}},expandOn:{type:String,default:"none"}},computed:{filteredItems(){return this.items.filter(function(e){return!e.disabled})}},methods:{toggle(e){e.expanded=!e.expanded,e.collapsed=!e.expanded}},data(){return{}}};function iy(e,n,r,i,l,o){const a=t.resolveComponent("ux-link"),s=t.resolveComponent("menulist",!0);return t.openBlock(),t.createElementBlock("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.filteredItems,c=>{var d;return t.openBlock(),t.createElementBlock("li",{class:t.normalizeClass({expanded:c.expanded,collapsed:c.collapsed})},[r.expandOn==="click"&&((d=c.items)==null?void 0:d.length)?(t.openBlock(),t.createBlock(a,{key:0,onClick:t.withModifiers(u=>o.toggle(c),["stop","prevent"]),class:t.normalizeClass(c.class)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.title),1)]),_:2},1032,["onClick","class"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[c.type==="url"?(t.openBlock(),t.createBlock(a,{key:0,class:t.normalizeClass(c.class),target:c.target,href:c.href||c.url},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.title),1)]),_:2},1032,["class","target","href"])):c.type==="route"?(t.openBlock(),t.createBlock(a,{key:1,class:t.normalizeClass(c.class),to:{name:c.route}},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.title),1)]),_:2},1032,["class","to"])):t.createCommentVNode("",!0)],64)),c.items&&c.items.length?(t.openBlock(),t.createBlock(s,{key:2,items:c.items},null,8,["items"])):t.createCommentVNode("",!0)],2)}),256))])}var Dl=_(oy,[["render",iy]]),mS="";const ly={props:{item:{type:[Object,String]},alt:{type:String},width:{type:[Number,String]},height:{type:[Number,String]},inline:{type:Boolean},quality:{type:[Number,String]},contain:{type:Boolean,default:!0},preview:{type:Boolean,default:!1},crop:{type:Boolean},format:{type:String},upscale:{type:Boolean,default:!0},type:{type:String,default:"image"},svg:{type:Boolean}},data(){return{model:this.item}},computed:{altText(){return this.alt||this.model.title},className(){var e=[];return this.portrait&&e.push("img-portrait"),e.join(" ")},isSvg(){var e;if(this.svg)return!0;switch((e=this.item)==null?void 0:e.fileMime){case"image/svg+xml":case"image/svg":return!0}},portrait(){return this.crop?this.dimensionHeight>this.dimensionWidth:this.modelHeight>this.modelWidth},imageWidth(){return parseInt(this.width)},imageHeight(){return parseInt(this.height)},modelWidth(){var e;return parseInt((e=this.model)==null?void 0:e.width)},modelHeight(){var e;return parseInt((e=this.model)==null?void 0:e.height)},id(){return this.$sdk.utils.id(this.model)},params(){var e={};return e.access_token=this.$sdk.auth.getCurrentToken(),this.imageWidth&&(e.w=this.imageWidth?this.imageWidth:null),this.imageHeight&&(e.h=this.imageHeight?this.imageHeight:null),this.crop?e.c=!0:this.contain||(e.c=this.imageWidth&&this.imageHeight),this.quality&&(e.q=parseInt(this.quality)),this.upscale&&(e.u=!0),this.format&&(e.f=this.format),e},src(){return this.$sdk.api.generateEndpointURL(`/${this.type}/${this.id}`,this.params,{file:!0})},previewSrc(){var e=Object.assign({},this.params);return e.w=50,delete e.h,this.$sdk.api.generateEndpointURL(`/${this.type}/${this.id}`,e,{file:!0})},imageStyle(){var e={};return this.crop||(e["object-fit"]="contain"),this.inline?e.maxWidth="100%":(e.width="100%",e.height="100%",e.top="0",e.left="0",e.position="absolute"),e},dimensionWidth(){return this.imageWidth&&this.imageHeight?this.imageWidth:this.modelWidth},dimensionHeight(){return this.imageWidth&&this.imageHeight?this.imageHeight:this.modelHeight},style(){var r,i,l;var e={};this.inline?e.display="inline-block":this.dimensionHeight&&this.dimensionWidth&&(e.height=0,e.overflow="hidden",e.paddingBottom=`${this.dimensionHeight/this.dimensionWidth*100}%`,e.position="relative");var n=(l=(i=(r=this.model)==null?void 0:r.fileMeta)==null?void 0:i.colors)==null?void 0:l.colors;return n&&n.length&&(e.backgroundColor=n[0]),this.isSvg||this.preview&&(e.backgroundImage=`url(${this.previewSrc})`),e}}},ay=["alt","data"],sy=["alt","src"];function cy(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-image",o.className]),style:t.normalizeStyle(o.style)},[r.svg?(t.openBlock(),t.createElementBlock("object",{key:0,alt:o.altText,type:"image/svg+xml",data:o.src},null,8,ay)):(t.openBlock(),t.createElementBlock("img",{key:1,alt:o.altText,style:t.normalizeStyle(o.imageStyle),src:o.src},null,12,sy))],6)}var Al=_(ly,[["render",cy],["__scopeId","data-v-1fa4f40e"]]),fS="";const dy={props:{value:{type:Number}},computed:{classes(){var e=[];return e.push(this.icon),this.spin&&e.push("fa-spin"),this.left&&e.push("ux-icon-left"),this.right&&e.push("ux-icon-right"),e},percent(){return this.value},barStyle(){return{width:`${this.percent}%`}},element(){return"i"}}},uy=e=>(t.pushScopeId("data-v-317a7690"),e=e(),t.popScopeId(),e),my={class:"ux-progress"},fy=uy(()=>t.createElementVNode("div",{class:"ux-progress-bg"},null,-1));function py(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",my,[fy,t.createElementVNode("div",{class:"ux-progress-fg",style:t.normalizeStyle(o.barStyle)},null,4)])}var Ml=_(dy,[["render",py],["__scopeId","data-v-317a7690"]]),pS="";const hy={},yy={class:"ux-list"};function gy(e,n){return t.openBlock(),t.createElementBlock("ul",yy,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var Fl=_(hy,[["render",gy],["__scopeId","data-v-98e1e4e2"]]),hS="";const _y={},ky={class:"ux-list-item"};function by(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",ky,[t.renderSlot(e.$slots,"default",{},void 0,!0)])}var Il=_(_y,[["render",by],["__scopeId","data-v-0e73c260"]]),yS="";function tn(e){var n=new Date(e);if(n instanceof Date&&!isNaN(n))return n}const xy={props:{modelValue:{type:Object}},data(){return{model:this.modelValue}},computed:{startDate:{get(){var e;return(e=tn(this.model.startDate))==null?void 0:e.toISOString().slice(0,10)},set(e){e=tn(e),e?this.model.startDate=e:this.model.startDate=void 0}},endDate:{get(){var e;return(e=tn(this.model.endDate))==null?void 0:e.toISOString().slice(0,10)},set(e){e=tn(e),tn(e)?this.model.endDate=e:this.model.endDate=void 0}}},watch:{model(e){this.$emit("updated:modelValue",e)},modelValue(e){this.model=e}}},$l=e=>(t.pushScopeId("data-v-61cbf45e"),e=e(),t.popScopeId(),e),Cy=$l(()=>t.createElementVNode("label",null,"From Date",-1)),wy=$l(()=>t.createElementVNode("label",null,"To Date",-1));function Vy(e,n,r,i,l,o){const a=t.resolveComponent("flex-cell"),s=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(s,{wrap:"",gap:"",vcenter:""},{default:t.withCtx(()=>[t.createVNode(a,{class:"cell"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[Cy,t.withDirectives(t.createElementVNode("input",{type:"date",class:"ux-field-focus ux-text-input-multiple",ref:"input","onUpdate:modelValue":n[0]||(n[0]=c=>o.startDate=c)},null,512),[[t.vModelText,o.startDate]])])]),_:1}),t.createVNode(a,{class:"cell"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[wy,t.withDirectives(t.createElementVNode("input",{type:"date",class:"ux-field-focus ux-text-input-multiple",ref:"input","onUpdate:modelValue":n[1]||(n[1]=c=>o.endDate=c)},null,512),[[t.vModelText,o.endDate]])])]),_:1})]),_:1})])}var Ll=_(xy,[["render",Vy],["__scopeId","data-v-61cbf45e"]]),gS="";const Ey={props:{modelValue:{type:[Object,Array]}},components:{NativeSelect:et},mixins:[H],async created(){var e=await this.$sdk.system.countries(),n=e.reduce(function(r,i){if(!i.countryCallingCodes||!i.countryCallingCodes.length)return r;var l=`${i.name} (${i.countryCallingCodes.join(", ")})`,o=l;return r.values[o]||(r.values[o]=!0,r.lookup[i.alpha2]=i,r.value.push({title:`${l} - ${i.emoji}`,value:i.alpha2,emoji:i.emoji})),r},{value:[],values:{},lookup:{}});this.countryCodes=n.value,this.lookup=n.lookup},data(){return{countryCodes:[],lookup:{}}},computed:{actualPlaceholder(){return"+61 000 000 000"},countryCodeField(){return{minimum:0,maximum:1,type:"string",options:this.countryCodes}},defaultCountryCode(){var e=this.user?this.user.countryCode:"",n=this.user&&this.user.organisation?this.user.organisation.countryCode:"";return e||n}},methods:{getNewDefaultEntry(){return{label:"",countryCode:this.defaultCountryCode,number:""}}}},By=e=>(t.pushScopeId("data-v-32219a94"),e=e(),t.popScopeId(),e),Sy={key:0,class:"ux-field-title"},Ny={key:0,class:"ux-required-marker"},Ty={key:1,class:"ux-field-description"},Oy={key:2},Dy={key:0},Ay={key:1},My={class:"ux-text-wrap"},Fy=["placeholder","onUpdate:modelValue"],Iy=By(()=>t.createElementVNode("option",{value:""},"None",-1)),$y=["value"],Ly={class:"ux-text-wrap"},Uy=["placeholder"];function Py(e,n,r,i,l,o){const a=t.resolveComponent("ux-button"),s=t.resolveComponent("native-select"),c=t.resolveComponent("flex-cell"),d=t.resolveComponent("ux-icon"),u=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.showLabel?(t.openBlock(),t.createElementBlock("label",Sy,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Ny,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Ty,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",Oy,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.model,(m,f)=>(t.openBlock(),t.createBlock(u,{gap:"",vcenter:"",wrap:"",class:"ux-text-row",key:f},{default:t.withCtx(()=>[t.createVNode(c,{shrink:""},{default:t.withCtx(()=>[t.createVNode(s,{modelValue:m.countryCode,"onUpdate:modelValue":p=>m.countryCode=p,field:o.countryCodeField},{default:t.withCtx(()=>[t.createVNode(a,{tag:"a"},{default:t.withCtx(()=>[m.countryCode?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[l.lookup[m.countryCode]?(t.openBlock(),t.createElementBlock("div",Dy,t.toDisplayString(l.lookup[m.countryCode].emoji)+" - "+t.toDisplayString(l.lookup[m.countryCode].alpha2),1)):(t.openBlock(),t.createElementBlock("div",Ay,"Loading"))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(" Country Code ")],64))]),_:2},1024)]),_:2},1032,["modelValue","onUpdate:modelValue","field"])]),_:2},1024),t.createVNode(c,null,{default:t.withCtx(()=>[t.createElementVNode("div",My,[t.withDirectives(t.createElementVNode("input",{class:"ux-field-focus ux-text-input-multiple",placeholder:o.actualPlaceholder,onFocus:n[0]||(n[0]=(...p)=>e.touch&&e.touch(...p)),ref_for:!0,ref:"input",onKeydown:n[1]||(n[1]=t.withKeys(t.withModifiers(p=>e.add(),["stop","prevent"]),["enter"])),"onUpdate:modelValue":p=>m.number=p},null,40,Fy),[[t.vModelText,m.number]])])]),_:2},1024),t.createVNode(c,{shrink:"",vcenter:""},{default:t.withCtx(()=>[e.canRemoveValue?(t.openBlock(),t.createBlock(a,{key:0,tag:"a",icon:"",onClick:p=>e.remove(m)},{default:t.withCtx(()=>[t.createVNode(d,{icon:"fa-times"})]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),128)),e.canAddValue?(t.openBlock(),t.createBlock(a,{key:0,onClick:n[2]||(n[2]=m=>e.add())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.addLabel)+" ",1),t.createVNode(d,{icon:"fa-plus",right:""})]),_:1})):t.createCommentVNode("",!0)])):(t.openBlock(),t.createBlock(u,{wrap:"",class:"ux-text-row",key:e.index},{default:t.withCtx(()=>[t.createVNode(c,{shrink:""},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("select",{class:"ux-country-code-select","onUpdate:modelValue":n[3]||(n[3]=m=>e.model.countryCode=m)},[Iy,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.countryCodes,m=>(t.openBlock(),t.createElementBlock("option",{value:m.value},t.toDisplayString(m.title),9,$y))),256))],512),[[t.vModelSelect,e.model.countryCode]])]),_:1}),t.createVNode(c,null,{default:t.withCtx(()=>[t.createElementVNode("div",Ly,[t.withDirectives(t.createElementVNode("input",{class:"ux-field-focus ux-text-input-multiple",placeholder:o.actualPlaceholder,onFocus:n[4]||(n[4]=(...m)=>e.touch&&e.touch(...m)),ref:"input",onKeydown:n[5]||(n[5]=t.withKeys(t.withModifiers(m=>e.add(),["stop","prevent"]),["enter"])),"onUpdate:modelValue":n[6]||(n[6]=m=>e.model.number=m)},null,40,Uy),[[t.vModelText,e.model.number]])])]),_:1})]),_:1}))],64)}var jy=_(Ey,[["render",Py],["__scopeId","data-v-32219a94"]]),_S="";function Ry(e){return e===void 0||typeof e=="undefined"||e===null||String(e)==="null"||String(e)==="undefined"}const zy={props:{modelValue:{}},mixins:[H],created(){this.model=this.model},methods:{cleanOutput(e){var n=this;return Ry(e)?n.multiValue?e=[]:e=void 0:n.multiValue?e=(e||[]).filter(Boolean).map(function(r){return n.getValue(r)}):e=n.getValue(e),e},cleanInput(e){var n=this;if(n.multiValue)e||(e=[]),Array.isArray(e)||(e=[e]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum),e=e.filter(Boolean).map(function(i){var l=n.getValue(i);return n.returnObject?n.optionLookup[l]:l});else{var r=n.getValue(e);e=n.returnObject?n.optionLookup[r]:r}return e}},computed:{returnObject(){return this.type=="reference"},classes(){var e=[];return this.multiValue?e.push("multiple"):e.push("single"),e},optionLookup(){var e=this;return e.options.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{})},summary(){return this.getLabel(this.optionLookup[this.model])||"Click to select"},options(){return["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/La_Rioja","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Mexico_City","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Velho","America/Puerto_Rico","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/McMurdo","Antarctica/Palmer","Antarctica/Rothera","Antarctica/Syowa","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Colombo","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kathmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Thimphu","Asia/Tokyo","Asia/Ulaanbaatar","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Currie","Australia/Darwin","Australia/Hobart","Australia/Lindeman","Australia/Melbourne","Australia/Perth","Australia/Sydney","CST6CDT","EST5EDT","Etc/GMT","Etc/GMT+1","Etc/GMT+10","Etc/GMT+11","Etc/GMT+12","Etc/GMT+2","Etc/GMT+3","Etc/GMT+4","Etc/GMT+5","Etc/GMT+6","Etc/GMT+7","Etc/GMT-1","Etc/GMT-10","Etc/GMT-11","Etc/GMT-12","Etc/GMT-13","Etc/GMT-2","Etc/GMT-3","Etc/GMT-4","Etc/GMT-5","Etc/GMT-6","Etc/GMT-7","Etc/GMT-8","Etc/GMT-9","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Nicosia","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","MST7MDT","PST8PDT","Pacific/Apia","Pacific/Auckland","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis"].map(function(e){return{title:e,value:e}})},selectableOptions(){return this.options}}},qy={key:0,class:"ux-field-title"},Hy={key:0,class:"ux-required-marker"},Gy={key:1,class:"ux-field-description"},Wy={key:2,class:"ui-select-button"},Ky=["multiple"],Zy={key:0,value:""},Yy=["value"];function Xy(e,n,r,i,l,o){const a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["native-select",o.classes])},[e.showLabel?(t.openBlock(),t.createElementBlock("label",qy,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Hy,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Gy,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.singleValue?(t.openBlock(),t.createElementBlock("div",Wy,[t.renderSlot(e.$slots,"default",{},()=>[t.createVNode(a,{tag:"div"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1})],!0)])):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("select",{onFocus:n[0]||(n[0]=(...s)=>e.touch&&e.touch(...s)),multiple:e.multiValue,"onUpdate:modelValue":n[1]||(n[1]=s=>e.model=s)},[e.singleValue&&!e.minimum?(t.openBlock(),t.createElementBlock("option",Zy,"None")):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.selectableOptions,s=>(t.openBlock(),t.createElementBlock("option",{value:s.value},t.toDisplayString(s.title),9,Yy))),256))],40,Ky),[[t.vModelSelect,e.model]])],2)}var Jy=_(zy,[["render",Xy],["__scopeId","data-v-a15362c8"]]),kS="";const Qy={props:{item:{type:Object,required:!0}},computed:{basicType(){var e,n;return(n=(e=this.item)==null?void 0:e.meta)==null?void 0:n.type},hasImage(){switch(this.basicType){case"image":case"video":case"profile":return!0}},title(){return this.item.title||this.item.name||this.item.label||(this.item.firstName?`${this.item.firstName} ${this.item.lastName}`:"(Title unknown)")}},methods:{clicked(){this.$sdk.dispatch("item:view",this.item)}}};function vy(e,n,r,i,l,o){const a=t.resolveComponent("ux-image"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock("div",{class:"content-item",onClick:n[0]||(n[0]=(...d)=>o.clicked&&o.clicked(...d))},[t.createVNode(c,{gap:"",vcenter:""},{default:t.withCtx(()=>[o.hasImage?(t.openBlock(),t.createBlock(s,{key:0,shrink:""},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["image-wrapper",o.basicType])},[t.createVNode(a,{item:r.item,width:100,height:100},null,8,["item"])],2)]),_:1})):t.createCommentVNode("",!0),t.createVNode(s,{vcenter:""},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.renderSlot(e.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(o.title),1)],!0)])]),_:3}),t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"actions",{},void 0,!0)]),_:3})]),_:3})])}var Ul=_(Qy,[["render",vy],["__scopeId","data-v-055fac6a"]]);/**!
|
|
2
2
|
* Sortable 1.14.0
|
|
3
3
|
* @author RubaXa <trash@rubaxa.org>
|
|
4
4
|
* @author owenm <owen23355@gmail.com>
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/function Pl(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(e,l).enumerable})),r.push.apply(r,i)}return r}function Pe(e){for(var n=1;n<arguments.length;n++){var r=arguments[n]!=null?arguments[n]:{};n%2?Pl(Object(r),!0).forEach(function(i){eg(e,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pl(Object(r)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(r,i))})}return e}function Un(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Un=function(n){return typeof n}:Un=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Un(e)}function eg(e,n,r){return n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function Ke(){return Ke=Object.assign||function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},Ke.apply(this,arguments)}function tg(e,n){if(e==null)return{};var r={},i=Object.keys(e),l,o;for(o=0;o<i.length;o++)l=i[o],!(n.indexOf(l)>=0)&&(r[l]=e[l]);return r}function ng(e,n){if(e==null)return{};var r=tg(e,n),i,l;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(l=0;l<o.length;l++)i=o[l],!(n.indexOf(i)>=0)&&(!Object.prototype.propertyIsEnumerable.call(e,i)||(r[i]=e[i]))}return r}var rg="1.14.0";function Ze(e){if(typeof window!="undefined"&&window.navigator)return!!navigator.userAgent.match(e)}var Ye=Ze(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),nn=Ze(/Edge/i),jl=Ze(/firefox/i),rn=Ze(/safari/i)&&!Ze(/chrome/i)&&!Ze(/android/i),Rl=Ze(/iP(ad|od|hone)/i),og=Ze(/chrome/i)&&Ze(/android/i),zl={capture:!1,passive:!1};function R(e,n,r){e.addEventListener(n,r,!Ye&&zl)}function P(e,n,r){e.removeEventListener(n,r,!Ye&&zl)}function Pn(e,n){if(!!n){if(n[0]===">"&&(n=n.substring(1)),e)try{if(e.matches)return e.matches(n);if(e.msMatchesSelector)return e.msMatchesSelector(n);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(n)}catch{return!1}return!1}}function ig(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function je(e,n,r,i){if(e){r=r||document;do{if(n!=null&&(n[0]===">"?e.parentNode===r&&Pn(e,n):Pn(e,n))||i&&e===r)return e;if(e===r)break}while(e=ig(e))}return null}var ql=/\s+/g;function Ee(e,n,r){if(e&&n)if(e.classList)e.classList[r?"add":"remove"](n);else{var i=(" "+e.className+" ").replace(ql," ").replace(" "+n+" "," ");e.className=(i+(r?" "+n:"")).replace(ql," ")}}function T(e,n,r){var i=e&&e.style;if(i){if(r===void 0)return document.defaultView&&document.defaultView.getComputedStyle?r=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(r=e.currentStyle),n===void 0?r:r[n];!(n in i)&&n.indexOf("webkit")===-1&&(n="-webkit-"+n),i[n]=r+(typeof r=="string"?"":"px")}}function Nt(e,n){var r="";if(typeof e=="string")r=e;else do{var i=T(e,"transform");i&&i!=="none"&&(r=i+" "+r)}while(!n&&(e=e.parentNode));var l=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return l&&new l(r)}function Hl(e,n,r){if(e){var i=e.getElementsByTagName(n),l=0,o=i.length;if(r)for(;l<o;l++)r(i[l],l);return i}return[]}function Re(){var e=document.scrollingElement;return e||document.documentElement}function ie(e,n,r,i,l){if(!(!e.getBoundingClientRect&&e!==window)){var o,a,s,c,d,u,m;if(e!==window&&e.parentNode&&e!==Re()?(o=e.getBoundingClientRect(),a=o.top,s=o.left,c=o.bottom,d=o.right,u=o.height,m=o.width):(a=0,s=0,c=window.innerHeight,d=window.innerWidth,u=window.innerHeight,m=window.innerWidth),(n||r)&&e!==window&&(l=l||e.parentNode,!Ye))do if(l&&l.getBoundingClientRect&&(T(l,"transform")!=="none"||r&&T(l,"position")!=="static")){var f=l.getBoundingClientRect();a-=f.top+parseInt(T(l,"border-top-width")),s-=f.left+parseInt(T(l,"border-left-width")),c=a+o.height,d=s+o.width;break}while(l=l.parentNode);if(i&&e!==window){var p=Nt(l||e),y=p&&p.a,h=p&&p.d;p&&(a/=h,s/=y,m/=y,u/=h,c=a+u,d=s+m)}return{top:a,left:s,bottom:c,right:d,width:m,height:u}}}function Gl(e,n,r){for(var i=tt(e,!0),l=ie(e)[n];i;){var o=ie(i)[r],a=void 0;if(r==="top"||r==="left"?a=l>=o:a=l<=o,!a)return i;if(i===Re())break;i=tt(i,!1)}return!1}function Tt(e,n,r,i){for(var l=0,o=0,a=e.children;o<a.length;){if(a[o].style.display!=="none"&&a[o]!==O.ghost&&(i||a[o]!==O.dragged)&&je(a[o],r.draggable,e,!1)){if(l===n)return a[o];l++}o++}return null}function Pr(e,n){for(var r=e.lastElementChild;r&&(r===O.ghost||T(r,"display")==="none"||n&&!Pn(r,n));)r=r.previousElementSibling;return r||null}function De(e,n){var r=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==O.clone&&(!n||Pn(e,n))&&r++;return r}function Wl(e){var n=0,r=0,i=Re();if(e)do{var l=Nt(e),o=l.a,a=l.d;n+=e.scrollLeft*o,r+=e.scrollTop*a}while(e!==i&&(e=e.parentNode));return[n,r]}function lg(e,n){for(var r in e)if(!!e.hasOwnProperty(r)){for(var i in n)if(n.hasOwnProperty(i)&&n[i]===e[r][i])return Number(r)}return-1}function tt(e,n){if(!e||!e.getBoundingClientRect)return Re();var r=e,i=!1;do if(r.clientWidth<r.scrollWidth||r.clientHeight<r.scrollHeight){var l=T(r);if(r.clientWidth<r.scrollWidth&&(l.overflowX=="auto"||l.overflowX=="scroll")||r.clientHeight<r.scrollHeight&&(l.overflowY=="auto"||l.overflowY=="scroll")){if(!r.getBoundingClientRect||r===document.body)return Re();if(i||n)return r;i=!0}}while(r=r.parentNode);return Re()}function ag(e,n){if(e&&n)for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r]);return e}function jr(e,n){return Math.round(e.top)===Math.round(n.top)&&Math.round(e.left)===Math.round(n.left)&&Math.round(e.height)===Math.round(n.height)&&Math.round(e.width)===Math.round(n.width)}var on;function Kl(e,n){return function(){if(!on){var r=arguments,i=this;r.length===1?e.call(i,r[0]):e.apply(i,r),on=setTimeout(function(){on=void 0},n)}}}function sg(){clearTimeout(on),on=void 0}function Zl(e,n,r){e.scrollLeft+=n,e.scrollTop+=r}function Yl(e){var n=window.Polymer,r=window.jQuery||window.Zepto;return n&&n.dom?n.dom(e).cloneNode(!0):r?r(e).clone(!0)[0]:e.cloneNode(!0)}var Be="Sortable"+new Date().getTime();function cg(){var e=[],n;return{captureAnimationState:function(){if(e=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(l){if(!(T(l,"display")==="none"||l===O.ghost)){e.push({target:l,rect:ie(l)});var o=Pe({},e[e.length-1].rect);if(l.thisAnimationDuration){var a=Nt(l,!0);a&&(o.top-=a.f,o.left-=a.e)}l.fromRect=o}})}},addAnimationState:function(i){e.push(i)},removeAnimationState:function(i){e.splice(lg(e,{target:i}),1)},animateAll:function(i){var l=this;if(!this.options.animation){clearTimeout(n),typeof i=="function"&&i();return}var o=!1,a=0;e.forEach(function(s){var c=0,d=s.target,u=d.fromRect,m=ie(d),f=d.prevFromRect,p=d.prevToRect,y=s.rect,h=Nt(d,!0);h&&(m.top-=h.f,m.left-=h.e),d.toRect=m,d.thisAnimationDuration&&jr(f,m)&&!jr(u,m)&&(y.top-m.top)/(y.left-m.left)===(u.top-m.top)/(u.left-m.left)&&(c=ug(y,f,p,l.options)),jr(m,u)||(d.prevFromRect=u,d.prevToRect=m,c||(c=l.options.animation),l.animate(d,y,m,c)),c&&(o=!0,a=Math.max(a,c),clearTimeout(d.animationResetTimer),d.animationResetTimer=setTimeout(function(){d.animationTime=0,d.prevFromRect=null,d.fromRect=null,d.prevToRect=null,d.thisAnimationDuration=null},c),d.thisAnimationDuration=c)}),clearTimeout(n),o?n=setTimeout(function(){typeof i=="function"&&i()},a):typeof i=="function"&&i(),e=[]},animate:function(i,l,o,a){if(a){T(i,"transition",""),T(i,"transform","");var s=Nt(this.el),c=s&&s.a,d=s&&s.d,u=(l.left-o.left)/(c||1),m=(l.top-o.top)/(d||1);i.animatingX=!!u,i.animatingY=!!m,T(i,"transform","translate3d("+u+"px,"+m+"px,0)"),this.forRepaintDummy=dg(i),T(i,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),T(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){T(i,"transition",""),T(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},a)}}}}function dg(e){return e.offsetWidth}function ug(e,n,r,i){return Math.sqrt(Math.pow(n.top-e.top,2)+Math.pow(n.left-e.left,2))/Math.sqrt(Math.pow(n.top-r.top,2)+Math.pow(n.left-r.left,2))*i.animation}var Ot=[],Rr={initializeByDefault:!0},ln={mount:function(n){for(var r in Rr)Rr.hasOwnProperty(r)&&!(r in n)&&(n[r]=Rr[r]);Ot.forEach(function(i){if(i.pluginName===n.pluginName)throw"Sortable: Cannot mount plugin ".concat(n.pluginName," more than once")}),Ot.push(n)},pluginEvent:function(n,r,i){var l=this;this.eventCanceled=!1,i.cancel=function(){l.eventCanceled=!0};var o=n+"Global";Ot.forEach(function(a){!r[a.pluginName]||(r[a.pluginName][o]&&r[a.pluginName][o](Pe({sortable:r},i)),r.options[a.pluginName]&&r[a.pluginName][n]&&r[a.pluginName][n](Pe({sortable:r},i)))})},initializePlugins:function(n,r,i,l){Ot.forEach(function(s){var c=s.pluginName;if(!(!n.options[c]&&!s.initializeByDefault)){var d=new s(n,r,n.options);d.sortable=n,d.options=n.options,n[c]=d,Ke(i,d.defaults)}});for(var o in n.options)if(!!n.options.hasOwnProperty(o)){var a=this.modifyOption(n,o,n.options[o]);typeof a!="undefined"&&(n.options[o]=a)}},getEventProperties:function(n,r){var i={};return Ot.forEach(function(l){typeof l.eventProperties=="function"&&Ke(i,l.eventProperties.call(r[l.pluginName],n))}),i},modifyOption:function(n,r,i){var l;return Ot.forEach(function(o){!n[o.pluginName]||o.optionListeners&&typeof o.optionListeners[r]=="function"&&(l=o.optionListeners[r].call(n[o.pluginName],i))}),l}};function mg(e){var n=e.sortable,r=e.rootEl,i=e.name,l=e.targetEl,o=e.cloneEl,a=e.toEl,s=e.fromEl,c=e.oldIndex,d=e.newIndex,u=e.oldDraggableIndex,m=e.newDraggableIndex,f=e.originalEvent,p=e.putSortable,y=e.extraEventProperties;if(n=n||r&&r[Be],!!n){var h,A=n.options,I="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!Ye&&!nn?h=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(h=document.createEvent("Event"),h.initEvent(i,!0,!0)),h.to=a||r,h.from=s||r,h.item=l||r,h.clone=o,h.oldIndex=c,h.newIndex=d,h.oldDraggableIndex=u,h.newDraggableIndex=m,h.originalEvent=f,h.pullMode=p?p.lastPutMode:void 0;var z=Pe(Pe({},y),ln.getEventProperties(i,n));for(var q in z)h[q]=z[q];r&&r.dispatchEvent(h),A[I]&&A[I].call(n,h)}}var fg=["evt"],xe=function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=i.evt,o=ng(i,fg);ln.pluginEvent.bind(O)(n,r,Pe({dragEl:b,parentEl:ee,ghostEl:D,rootEl:Z,nextEl:ht,lastDownEl:jn,cloneEl:te,cloneHidden:nt,dragStarted:sn,putSortable:le,activeSortable:O.active,originalEvent:l,oldIndex:Dt,oldDraggableIndex:an,newIndex:Se,newDraggableIndex:rt,hideGhostForTarget:na,unhideGhostForTarget:ra,cloneNowHidden:function(){nt=!0},cloneNowShown:function(){nt=!1},dispatchSortableEvent:function(s){ye({sortable:r,name:s,originalEvent:l})}},o))};function ye(e){mg(Pe({putSortable:le,cloneEl:te,targetEl:b,rootEl:Z,oldIndex:Dt,oldDraggableIndex:an,newIndex:Se,newDraggableIndex:rt},e))}var b,ee,D,Z,ht,jn,te,nt,Dt,Se,an,rt,Rn,le,At=!1,zn=!1,qn=[],yt,Le,zr,qr,Xl,Jl,sn,Mt,cn,dn=!1,Hn=!1,Gn,ue,Hr=[],Gr=!1,Wn=[],Kn=typeof document!="undefined",Zn=Rl,Ql=nn||Ye?"cssFloat":"float",pg=Kn&&!og&&!Rl&&"draggable"in document.createElement("div"),vl=function(){if(!!Kn){if(Ye)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto",e.style.pointerEvents==="auto"}}(),ea=function(n,r){var i=T(n),l=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),o=Tt(n,0,r),a=Tt(n,1,r),s=o&&T(o),c=a&&T(a),d=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+ie(o).width,u=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+ie(a).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&s.float&&s.float!=="none"){var m=s.float==="left"?"left":"right";return a&&(c.clear==="both"||c.clear===m)?"vertical":"horizontal"}return o&&(s.display==="block"||s.display==="flex"||s.display==="table"||s.display==="grid"||d>=l&&i[Ql]==="none"||a&&i[Ql]==="none"&&d+u>l)?"vertical":"horizontal"},hg=function(n,r,i){var l=i?n.left:n.top,o=i?n.right:n.bottom,a=i?n.width:n.height,s=i?r.left:r.top,c=i?r.right:r.bottom,d=i?r.width:r.height;return l===s||o===c||l+a/2===s+d/2},yg=function(n,r){var i;return qn.some(function(l){var o=l[Be].options.emptyInsertThreshold;if(!(!o||Pr(l))){var a=ie(l),s=n>=a.left-o&&n<=a.right+o,c=r>=a.top-o&&r<=a.bottom+o;if(s&&c)return i=l}}),i},ta=function(n){function r(o,a){return function(s,c,d,u){var m=s.options.group.name&&c.options.group.name&&s.options.group.name===c.options.group.name;if(o==null&&(a||m))return!0;if(o==null||o===!1)return!1;if(a&&o==="clone")return o;if(typeof o=="function")return r(o(s,c,d,u),a)(s,c,d,u);var f=(a?s:c).options.group.name;return o===!0||typeof o=="string"&&o===f||o.join&&o.indexOf(f)>-1}}var i={},l=n.group;(!l||Un(l)!="object")&&(l={name:l}),i.name=l.name,i.checkPull=r(l.pull,!0),i.checkPut=r(l.put),i.revertClone=l.revertClone,n.group=i},na=function(){!vl&&D&&T(D,"display","none")},ra=function(){!vl&&D&&T(D,"display","")};Kn&&document.addEventListener("click",function(e){if(zn)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),zn=!1,!1},!0);var gt=function(n){if(b){n=n.touches?n.touches[0]:n;var r=yg(n.clientX,n.clientY);if(r){var i={};for(var l in n)n.hasOwnProperty(l)&&(i[l]=n[l]);i.target=i.rootEl=r,i.preventDefault=void 0,i.stopPropagation=void 0,r[Be]._onDragOver(i)}}},gg=function(n){b&&b.parentNode[Be]._isOutsideThisEl(n.target)};function O(e,n){if(!(e&&e.nodeType&&e.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=n=Ke({},n),e[Be]=this;var r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return ea(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,s){a.setData("Text",s.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:O.supportPointer!==!1&&"PointerEvent"in window&&!rn,emptyInsertThreshold:5};ln.initializePlugins(this,e,r);for(var i in r)!(i in n)&&(n[i]=r[i]);ta(n);for(var l in this)l.charAt(0)==="_"&&typeof this[l]=="function"&&(this[l]=this[l].bind(this));this.nativeDraggable=n.forceFallback?!1:pg,this.nativeDraggable&&(this.options.touchStartThreshold=1),n.supportPointer?R(e,"pointerdown",this._onTapStart):(R(e,"mousedown",this._onTapStart),R(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(R(e,"dragover",this),R(e,"dragenter",this)),qn.push(this.el),n.store&&n.store.get&&this.sort(n.store.get(this)||[]),Ke(this,cg())}O.prototype={constructor:O,_isOutsideThisEl:function(n){!this.el.contains(n)&&n!==this.el&&(Mt=null)},_getDirection:function(n,r){return typeof this.options.direction=="function"?this.options.direction.call(this,n,r,b):this.options.direction},_onTapStart:function(n){if(!!n.cancelable){var r=this,i=this.el,l=this.options,o=l.preventOnFilter,a=n.type,s=n.touches&&n.touches[0]||n.pointerType&&n.pointerType==="touch"&&n,c=(s||n).target,d=n.target.shadowRoot&&(n.path&&n.path[0]||n.composedPath&&n.composedPath()[0])||c,u=l.filter;if(Eg(i),!b&&!(/mousedown|pointerdown/.test(a)&&n.button!==0||l.disabled)&&!d.isContentEditable&&!(!this.nativeDraggable&&rn&&c&&c.tagName.toUpperCase()==="SELECT")&&(c=je(c,l.draggable,i,!1),!(c&&c.animated)&&jn!==c)){if(Dt=De(c),an=De(c,l.draggable),typeof u=="function"){if(u.call(this,n,c,this)){ye({sortable:r,rootEl:d,name:"filter",targetEl:c,toEl:i,fromEl:i}),xe("filter",r,{evt:n}),o&&n.cancelable&&n.preventDefault();return}}else if(u&&(u=u.split(",").some(function(m){if(m=je(d,m.trim(),i,!1),m)return ye({sortable:r,rootEl:m,name:"filter",targetEl:c,fromEl:i,toEl:i}),xe("filter",r,{evt:n}),!0}),u)){o&&n.cancelable&&n.preventDefault();return}l.handle&&!je(d,l.handle,i,!1)||this._prepareDragStart(n,s,c)}}},_prepareDragStart:function(n,r,i){var l=this,o=l.el,a=l.options,s=o.ownerDocument,c;if(i&&!b&&i.parentNode===o){var d=ie(i);if(Z=o,b=i,ee=b.parentNode,ht=b.nextSibling,jn=i,Rn=a.group,O.dragged=b,yt={target:b,clientX:(r||n).clientX,clientY:(r||n).clientY},Xl=yt.clientX-d.left,Jl=yt.clientY-d.top,this._lastX=(r||n).clientX,this._lastY=(r||n).clientY,b.style["will-change"]="all",c=function(){if(xe("delayEnded",l,{evt:n}),O.eventCanceled){l._onDrop();return}l._disableDelayedDragEvents(),!jl&&l.nativeDraggable&&(b.draggable=!0),l._triggerDragStart(n,r),ye({sortable:l,name:"choose",originalEvent:n}),Ee(b,a.chosenClass,!0)},a.ignore.split(",").forEach(function(u){Hl(b,u.trim(),Wr)}),R(s,"dragover",gt),R(s,"mousemove",gt),R(s,"touchmove",gt),R(s,"mouseup",l._onDrop),R(s,"touchend",l._onDrop),R(s,"touchcancel",l._onDrop),jl&&this.nativeDraggable&&(this.options.touchStartThreshold=4,b.draggable=!0),xe("delayStart",this,{evt:n}),a.delay&&(!a.delayOnTouchOnly||r)&&(!this.nativeDraggable||!(nn||Ye))){if(O.eventCanceled){this._onDrop();return}R(s,"mouseup",l._disableDelayedDrag),R(s,"touchend",l._disableDelayedDrag),R(s,"touchcancel",l._disableDelayedDrag),R(s,"mousemove",l._delayedDragTouchMoveHandler),R(s,"touchmove",l._delayedDragTouchMoveHandler),a.supportPointer&&R(s,"pointermove",l._delayedDragTouchMoveHandler),l._dragStartTimer=setTimeout(c,a.delay)}else c()}},_delayedDragTouchMoveHandler:function(n){var r=n.touches?n.touches[0]:n;Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){b&&Wr(b),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var n=this.el.ownerDocument;P(n,"mouseup",this._disableDelayedDrag),P(n,"touchend",this._disableDelayedDrag),P(n,"touchcancel",this._disableDelayedDrag),P(n,"mousemove",this._delayedDragTouchMoveHandler),P(n,"touchmove",this._delayedDragTouchMoveHandler),P(n,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(n,r){r=r||n.pointerType=="touch"&&n,!this.nativeDraggable||r?this.options.supportPointer?R(document,"pointermove",this._onTouchMove):r?R(document,"touchmove",this._onTouchMove):R(document,"mousemove",this._onTouchMove):(R(b,"dragend",this),R(Z,"dragstart",this._onDragStart));try{document.selection?Xn(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(n,r){if(At=!1,Z&&b){xe("dragStarted",this,{evt:r}),this.nativeDraggable&&R(document,"dragover",gg);var i=this.options;!n&&Ee(b,i.dragClass,!1),Ee(b,i.ghostClass,!0),O.active=this,n&&this._appendGhost(),ye({sortable:this,name:"start",originalEvent:r})}else this._nulling()},_emulateDragOver:function(){if(Le){this._lastX=Le.clientX,this._lastY=Le.clientY,na();for(var n=document.elementFromPoint(Le.clientX,Le.clientY),r=n;n&&n.shadowRoot&&(n=n.shadowRoot.elementFromPoint(Le.clientX,Le.clientY),n!==r);)r=n;if(b.parentNode[Be]._isOutsideThisEl(n),r)do{if(r[Be]){var i=void 0;if(i=r[Be]._onDragOver({clientX:Le.clientX,clientY:Le.clientY,target:n,rootEl:r}),i&&!this.options.dragoverBubble)break}n=r}while(r=r.parentNode);ra()}},_onTouchMove:function(n){if(yt){var r=this.options,i=r.fallbackTolerance,l=r.fallbackOffset,o=n.touches?n.touches[0]:n,a=D&&Nt(D,!0),s=D&&a&&a.a,c=D&&a&&a.d,d=Zn&&ue&&Wl(ue),u=(o.clientX-yt.clientX+l.x)/(s||1)+(d?d[0]-Hr[0]:0)/(s||1),m=(o.clientY-yt.clientY+l.y)/(c||1)+(d?d[1]-Hr[1]:0)/(c||1);if(!O.active&&!At){if(i&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<i)return;this._onDragStart(n,!0)}if(D){a?(a.e+=u-(zr||0),a.f+=m-(qr||0)):a={a:1,b:0,c:0,d:1,e:u,f:m};var f="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");T(D,"webkitTransform",f),T(D,"mozTransform",f),T(D,"msTransform",f),T(D,"transform",f),zr=u,qr=m,Le=o}n.cancelable&&n.preventDefault()}},_appendGhost:function(){if(!D){var n=this.options.fallbackOnBody?document.body:Z,r=ie(b,!0,Zn,!0,n),i=this.options;if(Zn){for(ue=n;T(ue,"position")==="static"&&T(ue,"transform")==="none"&&ue!==document;)ue=ue.parentNode;ue!==document.body&&ue!==document.documentElement?(ue===document&&(ue=Re()),r.top+=ue.scrollTop,r.left+=ue.scrollLeft):ue=Re(),Hr=Wl(ue)}D=b.cloneNode(!0),Ee(D,i.ghostClass,!1),Ee(D,i.fallbackClass,!0),Ee(D,i.dragClass,!0),T(D,"transition",""),T(D,"transform",""),T(D,"box-sizing","border-box"),T(D,"margin",0),T(D,"top",r.top),T(D,"left",r.left),T(D,"width",r.width),T(D,"height",r.height),T(D,"opacity","0.8"),T(D,"position",Zn?"absolute":"fixed"),T(D,"zIndex","100000"),T(D,"pointerEvents","none"),O.ghost=D,n.appendChild(D),T(D,"transform-origin",Xl/parseInt(D.style.width)*100+"% "+Jl/parseInt(D.style.height)*100+"%")}},_onDragStart:function(n,r){var i=this,l=n.dataTransfer,o=i.options;if(xe("dragStart",this,{evt:n}),O.eventCanceled){this._onDrop();return}xe("setupClone",this),O.eventCanceled||(te=Yl(b),te.draggable=!1,te.style["will-change"]="",this._hideClone(),Ee(te,this.options.chosenClass,!1),O.clone=te),i.cloneId=Xn(function(){xe("clone",i),!O.eventCanceled&&(i.options.removeCloneOnHide||Z.insertBefore(te,b),i._hideClone(),ye({sortable:i,name:"clone"}))}),!r&&Ee(b,o.dragClass,!0),r?(zn=!0,i._loopId=setInterval(i._emulateDragOver,50)):(P(document,"mouseup",i._onDrop),P(document,"touchend",i._onDrop),P(document,"touchcancel",i._onDrop),l&&(l.effectAllowed="move",o.setData&&o.setData.call(i,l,b)),R(document,"drop",i),T(b,"transform","translateZ(0)")),At=!0,i._dragStartId=Xn(i._dragStarted.bind(i,r,n)),R(document,"selectstart",i),sn=!0,rn&&T(document.body,"user-select","none")},_onDragOver:function(n){var r=this.el,i=n.target,l,o,a,s=this.options,c=s.group,d=O.active,u=Rn===c,m=s.sort,f=le||d,p,y=this,h=!1;if(Gr)return;function A(ot,rr){xe(ot,y,Pe({evt:n,isOwner:u,axis:p?"vertical":"horizontal",revert:a,dragRect:l,targetRect:o,canSort:m,fromSortable:f,target:i,completed:z,onMove:function(it,pn){return Yn(Z,r,b,l,it,ie(it),n,pn)},changed:q},rr))}function I(){A("dragOverAnimationCapture"),y.captureAnimationState(),y!==f&&f.captureAnimationState()}function z(ot){return A("dragOverCompleted",{insertion:ot}),ot&&(u?d._hideClone():d._showClone(y),y!==f&&(Ee(b,le?le.options.ghostClass:d.options.ghostClass,!1),Ee(b,s.ghostClass,!0)),le!==y&&y!==O.active?le=y:y===O.active&&le&&(le=null),f===y&&(y._ignoreWhileAnimating=i),y.animateAll(function(){A("dragOverAnimationComplete"),y._ignoreWhileAnimating=null}),y!==f&&(f.animateAll(),f._ignoreWhileAnimating=null)),(i===b&&!b.animated||i===r&&!i.animated)&&(Mt=null),!s.dragoverBubble&&!n.rootEl&&i!==document&&(b.parentNode[Be]._isOutsideThisEl(n.target),!ot&>(n)),!s.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),h=!0}function q(){Se=De(b),rt=De(b,s.draggable),ye({sortable:y,name:"change",toEl:r,newIndex:Se,newDraggableIndex:rt,originalEvent:n})}if(n.preventDefault!==void 0&&n.cancelable&&n.preventDefault(),i=je(i,s.draggable,r,!0),A("dragOver"),O.eventCanceled)return h;if(b.contains(n.target)||i.animated&&i.animatingX&&i.animatingY||y._ignoreWhileAnimating===i)return z(!1);if(zn=!1,d&&!s.disabled&&(u?m||(a=ee!==Z):le===this||(this.lastPutMode=Rn.checkPull(this,d,b,n))&&c.checkPut(this,d,b,n))){if(p=this._getDirection(n,i)==="vertical",l=ie(b),A("dragOverValid"),O.eventCanceled)return h;if(a)return ee=Z,I(),this._hideClone(),A("revert"),O.eventCanceled||(ht?Z.insertBefore(b,ht):Z.appendChild(b)),z(!0);var Y=Pr(r,s.draggable);if(!Y||xg(n,p,this)&&!Y.animated){if(Y===b)return z(!1);if(Y&&r===n.target&&(i=Y),i&&(o=ie(i)),Yn(Z,r,b,l,i,o,n,!!i)!==!1)return I(),r.appendChild(b),ee=r,q(),z(!0)}else if(Y&&bg(n,p,this)){var X=Tt(r,0,s,!0);if(X===b)return z(!1);if(i=X,o=ie(i),Yn(Z,r,b,l,i,o,n,!1)!==!1)return I(),r.insertBefore(b,X),ee=r,q(),z(!0)}else if(i.parentNode===r){o=ie(i);var M=0,V,K=b.parentNode!==r,F=!hg(b.animated&&b.toRect||l,i.animated&&i.toRect||o,p),ge=p?"top":"left",se=Gl(i,"top","top")||Gl(b,"top","top"),ce=se?se.scrollTop:void 0;Mt!==i&&(V=o[ge],dn=!1,Hn=!F&&s.invertSwap||K),M=Cg(n,i,o,p,F?1:s.swapThreshold,s.invertedSwapThreshold==null?s.swapThreshold:s.invertedSwapThreshold,Hn,Mt===i);var me;if(M!==0){var fe=De(b);do fe-=M,me=ee.children[fe];while(me&&(T(me,"display")==="none"||me===D))}if(M===0||me===i)return z(!1);Mt=i,cn=M;var Ce=i.nextElementSibling,pe=!1;pe=M===1;var w=Yn(Z,r,b,l,i,o,n,pe);if(w!==!1)return(w===1||w===-1)&&(pe=w===1),Gr=!0,setTimeout(kg,30),I(),pe&&!Ce?r.appendChild(b):i.parentNode.insertBefore(b,pe?Ce:i),se&&Zl(se,0,ce-se.scrollTop),ee=b.parentNode,V!==void 0&&!Hn&&(Gn=Math.abs(V-ie(i)[ge])),q(),z(!0)}if(r.contains(b))return z(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){P(document,"mousemove",this._onTouchMove),P(document,"touchmove",this._onTouchMove),P(document,"pointermove",this._onTouchMove),P(document,"dragover",gt),P(document,"mousemove",gt),P(document,"touchmove",gt)},_offUpEvents:function(){var n=this.el.ownerDocument;P(n,"mouseup",this._onDrop),P(n,"touchend",this._onDrop),P(n,"pointerup",this._onDrop),P(n,"touchcancel",this._onDrop),P(document,"selectstart",this)},_onDrop:function(n){var r=this.el,i=this.options;if(Se=De(b),rt=De(b,i.draggable),xe("drop",this,{evt:n}),ee=b&&b.parentNode,Se=De(b),rt=De(b,i.draggable),O.eventCanceled){this._nulling();return}At=!1,Hn=!1,dn=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Kr(this.cloneId),Kr(this._dragStartId),this.nativeDraggable&&(P(document,"drop",this),P(r,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),rn&&T(document.body,"user-select",""),T(b,"transform",""),n&&(sn&&(n.cancelable&&n.preventDefault(),!i.dropBubble&&n.stopPropagation()),D&&D.parentNode&&D.parentNode.removeChild(D),(Z===ee||le&&le.lastPutMode!=="clone")&&te&&te.parentNode&&te.parentNode.removeChild(te),b&&(this.nativeDraggable&&P(b,"dragend",this),Wr(b),b.style["will-change"]="",sn&&!At&&Ee(b,le?le.options.ghostClass:this.options.ghostClass,!1),Ee(b,this.options.chosenClass,!1),ye({sortable:this,name:"unchoose",toEl:ee,newIndex:null,newDraggableIndex:null,originalEvent:n}),Z!==ee?(Se>=0&&(ye({rootEl:ee,name:"add",toEl:ee,fromEl:Z,originalEvent:n}),ye({sortable:this,name:"remove",toEl:ee,originalEvent:n}),ye({rootEl:ee,name:"sort",toEl:ee,fromEl:Z,originalEvent:n}),ye({sortable:this,name:"sort",toEl:ee,originalEvent:n})),le&&le.save()):Se!==Dt&&Se>=0&&(ye({sortable:this,name:"update",toEl:ee,originalEvent:n}),ye({sortable:this,name:"sort",toEl:ee,originalEvent:n})),O.active&&((Se==null||Se===-1)&&(Se=Dt,rt=an),ye({sortable:this,name:"end",toEl:ee,originalEvent:n}),this.save()))),this._nulling()},_nulling:function(){xe("nulling",this),Z=b=ee=D=ht=te=jn=nt=yt=Le=sn=Se=rt=Dt=an=Mt=cn=le=Rn=O.dragged=O.ghost=O.clone=O.active=null,Wn.forEach(function(n){n.checked=!0}),Wn.length=zr=qr=0},handleEvent:function(n){switch(n.type){case"drop":case"dragend":this._onDrop(n);break;case"dragenter":case"dragover":b&&(this._onDragOver(n),_g(n));break;case"selectstart":n.preventDefault();break}},toArray:function(){for(var n=[],r,i=this.el.children,l=0,o=i.length,a=this.options;l<o;l++)r=i[l],je(r,a.draggable,this.el,!1)&&n.push(r.getAttribute(a.dataIdAttr)||Vg(r));return n},sort:function(n,r){var i={},l=this.el;this.toArray().forEach(function(o,a){var s=l.children[a];je(s,this.options.draggable,l,!1)&&(i[o]=s)},this),r&&this.captureAnimationState(),n.forEach(function(o){i[o]&&(l.removeChild(i[o]),l.appendChild(i[o]))}),r&&this.animateAll()},save:function(){var n=this.options.store;n&&n.set&&n.set(this)},closest:function(n,r){return je(n,r||this.options.draggable,this.el,!1)},option:function(n,r){var i=this.options;if(r===void 0)return i[n];var l=ln.modifyOption(this,n,r);typeof l!="undefined"?i[n]=l:i[n]=r,n==="group"&&ta(i)},destroy:function(){xe("destroy",this);var n=this.el;n[Be]=null,P(n,"mousedown",this._onTapStart),P(n,"touchstart",this._onTapStart),P(n,"pointerdown",this._onTapStart),this.nativeDraggable&&(P(n,"dragover",this),P(n,"dragenter",this)),Array.prototype.forEach.call(n.querySelectorAll("[draggable]"),function(r){r.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),qn.splice(qn.indexOf(this.el),1),this.el=n=null},_hideClone:function(){if(!nt){if(xe("hideClone",this),O.eventCanceled)return;T(te,"display","none"),this.options.removeCloneOnHide&&te.parentNode&&te.parentNode.removeChild(te),nt=!0}},_showClone:function(n){if(n.lastPutMode!=="clone"){this._hideClone();return}if(nt){if(xe("showClone",this),O.eventCanceled)return;b.parentNode==Z&&!this.options.group.revertClone?Z.insertBefore(te,b):ht?Z.insertBefore(te,ht):Z.appendChild(te),this.options.group.revertClone&&this.animate(b,te),T(te,"display",""),nt=!1}}};function _g(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}function Yn(e,n,r,i,l,o,a,s){var c,d=e[Be],u=d.options.onMove,m;return window.CustomEvent&&!Ye&&!nn?c=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(c=document.createEvent("Event"),c.initEvent("move",!0,!0)),c.to=n,c.from=e,c.dragged=r,c.draggedRect=i,c.related=l||n,c.relatedRect=o||ie(n),c.willInsertAfter=s,c.originalEvent=a,e.dispatchEvent(c),u&&(m=u.call(d,c,a)),m}function Wr(e){e.draggable=!1}function kg(){Gr=!1}function bg(e,n,r){var i=ie(Tt(r.el,0,r.options,!0)),l=10;return n?e.clientX<i.left-l||e.clientY<i.top&&e.clientX<i.right:e.clientY<i.top-l||e.clientY<i.bottom&&e.clientX<i.left}function xg(e,n,r){var i=ie(Pr(r.el,r.options.draggable)),l=10;return n?e.clientX>i.right+l||e.clientX<=i.right&&e.clientY>i.bottom&&e.clientX>=i.left:e.clientX>i.right&&e.clientY>i.top||e.clientX<=i.right&&e.clientY>i.bottom+l}function Cg(e,n,r,i,l,o,a,s){var c=i?e.clientY:e.clientX,d=i?r.height:r.width,u=i?r.top:r.left,m=i?r.bottom:r.right,f=!1;if(!a){if(s&&Gn<d*l){if(!dn&&(cn===1?c>u+d*o/2:c<m-d*o/2)&&(dn=!0),dn)f=!0;else if(cn===1?c<u+Gn:c>m-Gn)return-cn}else if(c>u+d*(1-l)/2&&c<m-d*(1-l)/2)return wg(n)}return f=f||a,f&&(c<u+d*o/2||c>m-d*o/2)?c>u+d/2?1:-1:0}function wg(e){return De(b)<De(e)?1:-1}function Vg(e){for(var n=e.tagName+e.className+e.src+e.href+e.textContent,r=n.length,i=0;r--;)i+=n.charCodeAt(r);return i.toString(36)}function Eg(e){Wn.length=0;for(var n=e.getElementsByTagName("input"),r=n.length;r--;){var i=n[r];i.checked&&Wn.push(i)}}function Xn(e){return setTimeout(e,0)}function Kr(e){return clearTimeout(e)}Kn&&R(document,"touchmove",function(e){(O.active||At)&&e.cancelable&&e.preventDefault()}),O.utils={on:R,off:P,css:T,find:Hl,is:function(n,r){return!!je(n,r,n,!1)},extend:ag,throttle:Kl,closest:je,toggleClass:Ee,clone:Yl,index:De,nextTick:Xn,cancelNextTick:Kr,detectDirection:ea,getChild:Tt},O.get=function(e){return e[Be]},O.mount=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n[0].constructor===Array&&(n=n[0]),n.forEach(function(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(O.utils=Pe(Pe({},O.utils),i.utils)),ln.mount(i)})},O.create=function(e,n){return new O(e,n)},O.version=rg;var re=[],un,Zr,Yr=!1,Xr,Jr,Jn,mn;function Bg(){function e(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this))}return e.prototype={dragStarted:function(r){var i=r.originalEvent;this.sortable.nativeDraggable?R(document,"dragover",this._handleAutoScroll):this.options.supportPointer?R(document,"pointermove",this._handleFallbackAutoScroll):i.touches?R(document,"touchmove",this._handleFallbackAutoScroll):R(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(r){var i=r.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?P(document,"dragover",this._handleAutoScroll):(P(document,"pointermove",this._handleFallbackAutoScroll),P(document,"touchmove",this._handleFallbackAutoScroll),P(document,"mousemove",this._handleFallbackAutoScroll)),oa(),Qn(),sg()},nulling:function(){Jn=Zr=un=Yr=mn=Xr=Jr=null,re.length=0},_handleFallbackAutoScroll:function(r){this._handleAutoScroll(r,!0)},_handleAutoScroll:function(r,i){var l=this,o=(r.touches?r.touches[0]:r).clientX,a=(r.touches?r.touches[0]:r).clientY,s=document.elementFromPoint(o,a);if(Jn=r,i||this.options.forceAutoScrollFallback||nn||Ye||rn){Qr(r,this.options,s,i);var c=tt(s,!0);Yr&&(!mn||o!==Xr||a!==Jr)&&(mn&&oa(),mn=setInterval(function(){var d=tt(document.elementFromPoint(o,a),!0);d!==c&&(c=d,Qn()),Qr(r,l.options,d,i)},10),Xr=o,Jr=a)}else{if(!this.options.bubbleScroll||tt(s,!0)===Re()){Qn();return}Qr(r,this.options,tt(s,!1),!1)}}},Ke(e,{pluginName:"scroll",initializeByDefault:!0})}function Qn(){re.forEach(function(e){clearInterval(e.pid)}),re=[]}function oa(){clearInterval(mn)}var Qr=Kl(function(e,n,r,i){if(!!n.scroll){var l=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,a=n.scrollSensitivity,s=n.scrollSpeed,c=Re(),d=!1,u;Zr!==r&&(Zr=r,Qn(),un=n.scroll,u=n.scrollFn,un===!0&&(un=tt(r,!0)));var m=0,f=un;do{var p=f,y=ie(p),h=y.top,A=y.bottom,I=y.left,z=y.right,q=y.width,Y=y.height,X=void 0,M=void 0,V=p.scrollWidth,K=p.scrollHeight,F=T(p),ge=p.scrollLeft,se=p.scrollTop;p===c?(X=q<V&&(F.overflowX==="auto"||F.overflowX==="scroll"||F.overflowX==="visible"),M=Y<K&&(F.overflowY==="auto"||F.overflowY==="scroll"||F.overflowY==="visible")):(X=q<V&&(F.overflowX==="auto"||F.overflowX==="scroll"),M=Y<K&&(F.overflowY==="auto"||F.overflowY==="scroll"));var ce=X&&(Math.abs(z-l)<=a&&ge+q<V)-(Math.abs(I-l)<=a&&!!ge),me=M&&(Math.abs(A-o)<=a&&se+Y<K)-(Math.abs(h-o)<=a&&!!se);if(!re[m])for(var fe=0;fe<=m;fe++)re[fe]||(re[fe]={});(re[m].vx!=ce||re[m].vy!=me||re[m].el!==p)&&(re[m].el=p,re[m].vx=ce,re[m].vy=me,clearInterval(re[m].pid),(ce!=0||me!=0)&&(d=!0,re[m].pid=setInterval(function(){i&&this.layer===0&&O.active._onTouchMove(Jn);var Ce=re[this.layer].vy?re[this.layer].vy*s:0,pe=re[this.layer].vx?re[this.layer].vx*s:0;typeof u=="function"&&u.call(O.dragged.parentNode[Be],pe,Ce,e,Jn,re[this.layer].el)!=="continue"||Zl(re[this.layer].el,pe,Ce)}.bind({layer:m}),24))),m++}while(n.bubbleScroll&&f!==c&&(f=tt(f,!1)));Yr=d}},30),ia=function(n){var r=n.originalEvent,i=n.putSortable,l=n.dragEl,o=n.activeSortable,a=n.dispatchSortableEvent,s=n.hideGhostForTarget,c=n.unhideGhostForTarget;if(!!r){var d=i||o;s();var u=r.changedTouches&&r.changedTouches.length?r.changedTouches[0]:r,m=document.elementFromPoint(u.clientX,u.clientY);c(),d&&!d.el.contains(m)&&(a("spill"),this.onSpill({dragEl:l,putSortable:i}))}};function vr(){}vr.prototype={startIndex:null,dragStart:function(n){var r=n.oldDraggableIndex;this.startIndex=r},onSpill:function(n){var r=n.dragEl,i=n.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var l=Tt(this.sortable.el,this.startIndex,this.options);l?this.sortable.el.insertBefore(r,l):this.sortable.el.appendChild(r),this.sortable.animateAll(),i&&i.animateAll()},drop:ia},Ke(vr,{pluginName:"revertOnSpill"});function eo(){}eo.prototype={onSpill:function(n){var r=n.dragEl,i=n.putSortable,l=i||this.sortable;l.captureAnimationState(),r.parentNode&&r.parentNode.removeChild(r),l.animateAll()},drop:ia},Ke(eo,{pluginName:"removeOnSpill"}),O.mount(new Bg),O.mount(eo,vr);function to(e){e.parentElement!==null&&e.parentElement.removeChild(e)}function la(e,n,r){const i=r===0?e.children[0]:e.children[r-1].nextSibling;e.insertBefore(n,i)}function Sg(){return typeof window!="undefined"?window.console:global.console}const Ng=Sg();function Tg(e){const n=Object.create(null);return function(i){return n[i]||(n[i]=e(i))}}const Og=/-(\w)/g,Dg=Tg(e=>e.replace(Og,(n,r)=>r.toUpperCase())),aa=["Start","Add","Remove","Update","End"],sa=["Choose","Unchoose","Sort","Filter","Clone"],ca=["Move"],Ag=[ca,aa,sa].flatMap(e=>e).map(e=>`on${e}`),no={manage:ca,manageAndEmit:aa,emit:sa};function Mg(e){return Ag.indexOf(e)!==-1}const Fg=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];function Ig(e){return Fg.includes(e)}function $g(e){return["transition-group","TransitionGroup"].includes(e)}function da(e){return["id","class","role","style"].includes(e)||e.startsWith("data-")||e.startsWith("aria-")||e.startsWith("on")}function ua(e){return e.reduce((n,[r,i])=>(n[r]=i,n),{})}function Lg({$attrs:e,componentData:n={}}){const r=ua(Object.entries(e).filter(([i,l])=>da(i)));return B(B({},r),n)}function Ug({$attrs:e,callBackBuilder:n}){const r=ua(ma(e));Object.entries(n).forEach(([l,o])=>{no[l].forEach(a=>{r[`on${a}`]=o(a)})});const i=`[data-draggable]${r.draggable||""}`;return ke(B({},r),{draggable:i})}function ma(e){return Object.entries(e).filter(([n,r])=>!da(n)).map(([n,r])=>[Dg(n),r]).filter(([n,r])=>!Mg(n))}const fa=({el:e})=>e,Pg=(e,n)=>e.__draggable_context=n,pa=e=>e.__draggable_context;class jg{constructor({nodes:{header:n,default:r,footer:i},root:l,realList:o}){this.defaultNodes=r,this.children=[...n,...r,...i],this.externalComponent=l.externalComponent,this.rootTransition=l.transition,this.tag=l.tag,this.realList=o}get _isRootComponent(){return this.externalComponent||this.rootTransition}render(n,r){const{tag:i,children:l,_isRootComponent:o}=this;return n(i,r,o?{default:()=>l}:l)}updated(){const{defaultNodes:n,realList:r}=this;n.forEach((i,l)=>{Pg(fa(i),{element:r[l],index:l})})}getUnderlyingVm(n){return pa(n)}getVmIndexFromDomIndex(n,r){const{defaultNodes:i}=this,{length:l}=i,o=r.children,a=o.item(n);if(a===null)return l;const s=pa(a);if(s)return s.index;if(l===0)return 0;const c=fa(i[0]),d=[...o].findIndex(u=>u===c);return n<d?0:l}}function Rg(e,n){const r=e[n];return r?r():[]}function zg({$slots:e,realList:n,getKey:r}){const i=n||[],[l,o]=["header","footer"].map(c=>Rg(e,c)),{item:a}=e;if(!a)throw new Error("draggable element must have an item slot");const s=i.flatMap((c,d)=>a({element:c,index:d}).map(u=>(u.key=r(c),u.props=ke(B({},u.props||{}),{"data-draggable":!0}),u)));if(s.length!==i.length)throw new Error("Item slot must have only one child");return{header:l,footer:o,default:s}}function qg(e){const n=$g(e),r=!Ig(e)&&!n;return{transition:n,externalComponent:r,tag:r?t.resolveComponent(e):n?t.TransitionGroup:e}}function Hg({$slots:e,tag:n,realList:r,getKey:i}){const l=zg({$slots:e,realList:r,getKey:i}),o=qg(n);return new jg({nodes:l,root:o,realList:r})}function ha(e,n){t.nextTick(()=>this.$emit(e.toLowerCase(),n))}function ya(e){return(n,r)=>{if(this.realList!==null)return this[`onDrag${e}`](n,r)}}function Gg(e){const n=ya.call(this,e);return(r,i)=>{n.call(this,r,i),ha.call(this,e,r)}}let ro=null;const Wg={list:{type:Array,required:!1,default:null},modelValue:{type:Array,required:!1,default:null},itemKey:{type:[String,Function],required:!0},clone:{type:Function,default:e=>e},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null}},Kg=["update:modelValue","change",...[...no.manageAndEmit,...no.emit].map(e=>e.toLowerCase())],ga=t.defineComponent({name:"draggable",inheritAttrs:!1,props:Wg,emits:Kg,data(){return{error:!1}},render(){try{this.error=!1;const{$slots:e,$attrs:n,tag:r,componentData:i,realList:l,getKey:o}=this,a=Hg({$slots:e,tag:r,realList:l,getKey:o});this.componentStructure=a;const s=Lg({$attrs:n,componentData:i});return a.render(t.h,s)}catch(e){return this.error=!0,t.h("pre",{style:{color:"red"}},e.stack)}},created(){this.list!==null&&this.modelValue!==null&&Ng.error("modelValue and list props are mutually exclusive! Please set one or another.")},mounted(){if(this.error)return;const{$attrs:e,$el:n,componentStructure:r}=this;r.updated();const i=Ug({$attrs:e,callBackBuilder:{manageAndEmit:o=>Gg.call(this,o),emit:o=>ha.bind(this,o),manage:o=>ya.call(this,o)}}),l=n.nodeType===1?n:n.parentElement;this._sortable=new O(l,i),this.targetDomElement=l,l.__draggable_component__=this},updated(){this.componentStructure.updated()},beforeUnmount(){this._sortable!==void 0&&this._sortable.destroy()},computed:{realList(){const{list:e}=this;return e||this.modelValue},getKey(){const{itemKey:e}=this;return typeof e=="function"?e:n=>n[e]}},watch:{$attrs:{handler(e){const{_sortable:n}=this;!n||ma(e).forEach(([r,i])=>{n.option(r,i)})},deep:!0}},methods:{getUnderlyingVm(e){return this.componentStructure.getUnderlyingVm(e)||null},getUnderlyingPotencialDraggableComponent(e){return e.__draggable_component__},emitChanges(e){t.nextTick(()=>this.$emit("change",e))},alterList(e){if(this.list){e(this.list);return}const n=[...this.modelValue];e(n),this.$emit("update:modelValue",n)},spliceList(){const e=n=>n.splice(...arguments);this.alterList(e)},updatePosition(e,n){const r=i=>i.splice(n,0,i.splice(e,1)[0]);this.alterList(r)},getRelatedContextFromMoveEvent({to:e,related:n}){const r=this.getUnderlyingPotencialDraggableComponent(e);if(!r)return{component:r};const i=r.realList,l={list:i,component:r};if(e!==n&&i){const o=r.getUnderlyingVm(n)||{};return B(B({},o),l)}return l},getVmIndexFromDomIndex(e){return this.componentStructure.getVmIndexFromDomIndex(e,this.targetDomElement)},onDragStart(e){this.context=this.getUnderlyingVm(e.item),e.item._underlying_vm_=this.clone(this.context.element),ro=e.item},onDragAdd(e){const n=e.item._underlying_vm_;if(n===void 0)return;to(e.item);const r=this.getVmIndexFromDomIndex(e.newIndex);this.spliceList(r,0,n);const i={element:n,newIndex:r};this.emitChanges({added:i})},onDragRemove(e){if(la(this.$el,e.item,e.oldIndex),e.pullMode==="clone"){to(e.clone);return}const{index:n,element:r}=this.context;this.spliceList(n,1);const i={element:r,oldIndex:n};this.emitChanges({removed:i})},onDragUpdate(e){to(e.item),la(e.from,e.item,e.oldIndex);const n=this.context.index,r=this.getVmIndexFromDomIndex(e.newIndex);this.updatePosition(n,r);const i={element:this.context.element,oldIndex:n,newIndex:r};this.emitChanges({moved:i})},computeFutureIndex(e,n){if(!e.element)return 0;const r=[...n.to.children].filter(a=>a.style.display!=="none"),i=r.indexOf(n.related),l=e.component.getVmIndexFromDomIndex(i);return r.indexOf(ro)!==-1||!n.willInsertAfter?l:l+1},onDragMove(e,n){const{move:r,realList:i}=this;if(!r||!i)return!0;const l=this.getRelatedContextFromMoveEvent(e),o=this.computeFutureIndex(l,e),a=ke(B({},this.context),{futureIndex:o}),s=ke(B({},e),{relatedContext:l,draggedContext:a});return r(s,n)},onDragEnd(){ro=null}}});var bS="";const Zg={components:{Item:Ul,draggable:ga},props:{modelValue:{type:[Object,Array]}},mixins:[H],async created(){this.glossary=await this.$sdk.content.glossary({hash:!0}),this.value=this.cleanInput(this.value,!0),this.dispatch()},data(){return{glossary:{}}},methods:{async create(){var r;const e=this;if(!((r=e.$sdk.global)!=null&&r.create))return;const n=await e.$sdk.global.create(e.field.referenceType);e.multiValue?(e.model||(e.model=[]),e.model.push(n)):e.model=n},clear(){this.model=void 0,this.touch()},canEdit(e){var n=this.user;return n?this.$sdk.access.canEditItem(n,e):!1},async edit(e){var n=await this.$sdk.global.edit(e,!0).catch(function(i){});for(var r in n)e[r]=n[r]},open(){var e=this;e.touch();var n={field:e.field,model:e.multiValue?e.value:[e.value].filter(Boolean),maximum:e.field.maximum,browserOptions:{columns:e.field.columns,select:e.field.select,lockFilter:e.field.lockFilter}};e.$sdk.browse(this.field.referenceType,n).then(function(r){e.model=e.multiValue?r:r[0]}).catch(function(r){console.log("Error",r)})},cleanInput(e){var n=this;return n.multiValue?(e||(e=[]),Array.isArray(e)||(e=[]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum)):Array.isArray(e)&&(e=e[0]),e}},computed:{showList(){return this.field.list!==!1},canAdd(){const e=this;return!e.showList||!e.maximum?!0:e.multiValue?e.model.length<e.maximum:!e.model},canCreate(){var i;if(this.field.create!==!1&&!!((i=this.$sdk.global)!=null&&i.create)){var e=this.field.referenceType,n=e,r=this.glossary[this.field.referenceType];return r&&(e=r.definesType||r.key,n=r.key||r.definesType),this.user&&this.$sdk.access.canCreate(this.user,n,e)}},summary(){if(this.multiValue)if(this.model&&this.model.length){var e=this.model.length;if(!this.showList)return e===1?this.model[0].title||this.model[0].name||this.model[0].firstName:`${e} selected`;var n=Math.max(e-3,0),r,i=this.model.slice(0,3);return r=i.map(function(l){return l.firstName||l.name||l.title}).join(", "),n&&(r=`${r}... +${n} more...`),r||"Click to select"}else return"Click to select";else return this.model?this.showList?"Click to select":this.model.title||this.model.name||this.model.firstName:"Click to select"}}},Yg={key:0,class:"ux-field-title"},Xg={key:0,class:"ux-required-marker"},Jg={key:1,class:"ux-field-description"},Qg={key:1,class:"items"};function vg(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon"),s=t.resolveComponent("ux-button"),c=t.resolveComponent("item"),d=t.resolveComponent("draggable"),u=t.resolveComponent("flex-cell"),m=t.resolveComponent("flex-spacer"),f=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.showLabel?(t.openBlock(),t.createElementBlock("label",Yg,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Xg,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Jg,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),o.showList?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[e.multiValue?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.model&&e.model.length?(t.openBlock(),t.createBlock(d,{key:0,class:"items",modelValue:e.model,"onUpdate:modelValue":n[0]||(n[0]=p=>e.model=p)},{item:t.withCtx(({element:p,index:y})=>[(t.openBlock(),t.createBlock(c,{key:p._id,item:p},{actions:t.withCtx(()=>[o.canEdit(p)?(t.openBlock(),t.createBlock(s,{key:0,icon:"",onClick:t.withModifiers(h=>o.edit(p),["stop","prevent"])},{default:t.withCtx(()=>[t.createVNode(a,{icon:"fa-pencil"})]),_:2},1032,["onClick"])):t.createCommentVNode("",!0),t.createVNode(s,{icon:"",onClick:t.withModifiers(h=>e.remove(p),["stop","prevent"])},{default:t.withCtx(()=>[t.createVNode(a,{icon:"fa-times"})]),_:2},1032,["onClick"])]),_:2},1032,["item"]))]),_:1},8,["modelValue"])):t.createCommentVNode("",!0)],64)):e.model?(t.openBlock(),t.createElementBlock("div",Qg,[t.createVNode(c,{item:e.model},{actions:t.withCtx(()=>[o.canEdit(e.model)?(t.openBlock(),t.createBlock(s,{key:0,icon:"",onClick:n[1]||(n[1]=t.withModifiers(p=>o.edit(e.model),["stop","prevent"]))},{default:t.withCtx(()=>[t.createVNode(a,{icon:"fa-pencil"})]),_:1})):t.createCommentVNode("",!0),t.createVNode(s,{icon:"",onClick:t.withModifiers(o.clear,["stop","prevent"])},{default:t.withCtx(()=>[t.createVNode(a,{icon:"fa-times"})]),_:1},8,["onClick"])]),_:1},8,["item"])])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),o.canAdd?(t.openBlock(),t.createBlock(f,{key:3,gap:""},{default:t.withCtx(()=>[t.createVNode(u,{shrink:""},{default:t.withCtx(()=>[t.createVNode(s,{onClick:o.open},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1},8,["onClick"])]),_:1}),o.canCreate?(t.openBlock(),t.createBlock(u,{key:0,shrink:""},{default:t.withCtx(()=>[t.createVNode(s,{color:"primary",onClick:o.create},{default:t.withCtx(()=>[t.createTextVNode(" Create "),t.createVNode(a,{right:"",icon:"fa-plus"})]),_:1},8,["onClick"])]),_:1})):t.createCommentVNode("",!0),t.createVNode(m)]),_:1})):t.createCommentVNode("",!0)],64)}var _a=_(Zg,[["render",vg],["__scopeId","data-v-236b5d48"]]),xS="";function e_(e){return e===void 0||typeof e=="undefined"||e===null||String(e)==="null"||String(e)==="undefined"}const t_={props:{title:{type:String},modelValue:{}},mixins:[H],async created(){this.model=this.model;var e=await this.$sdk.content.glossary(),n=e;this.field.basicTypes===!1&&(n=n.filter(function(r){return!!r.definesType})),this.field.definedTypes===!1&&(n=n.filter(function(r){return!r.definesType})),n=n.map(function(r){return{title:r.title,value:r.key}}).sort((r,i)=>r.title>i.title?1:-1),this.types=n},data(){return{types:[]}},methods:{cleanOutput(e){var n=this;return e_(e)?n.multiValue?e=[]:e=void 0:n.multiValue?e=(e||[]).filter(Boolean).map(function(r){return n.getValue(r)}):e=n.getValue(e),e},cleanInput(e){var n=this;if(n.multiValue)e||(e=[]),Array.isArray(e)||(e=[e]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum),e=e.filter(Boolean).map(function(i){var l=n.getValue(i);return n.returnObject?n.optionLookup[l]:l});else{var r=n.getValue(e);e=n.returnObject?n.optionLookup[r]:r}return e}},computed:{returnObject(){return!1},classes(){var e=[];return this.multiValue?e.push("multiple"):e.push("single"),e},optionLookup(){var e=this;return e.types.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{})},summary(){return this.model?this.getLabel(this.optionLookup[this.model]):this.title||"Click to select"},selectableOptions(){return this.types}}},n_={key:0,class:"ux-field-title"},r_={key:0,class:"ux-required-marker"},o_={key:1,class:"ux-field-description"},i_={key:2,class:"ui-select-button"},l_=["multiple"],a_={key:0,value:""},s_=["value"];function c_(e,n,r,i,l,o){const a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["native-select",o.classes])},[e.showLabel?(t.openBlock(),t.createElementBlock("label",n_,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",r_,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",o_,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.singleValue?(t.openBlock(),t.createElementBlock("div",i_,[t.renderSlot(e.$slots,"default",{},()=>[t.createVNode(a,{tag:"div"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1})],!0)])):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("select",{onFocus:n[0]||(n[0]=(...s)=>e.touch&&e.touch(...s)),multiple:e.multiValue,"onUpdate:modelValue":n[1]||(n[1]=s=>e.model=s)},[e.singleValue&&!e.minimum?(t.openBlock(),t.createElementBlock("option",a_,"None")):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.selectableOptions,s=>(t.openBlock(),t.createElementBlock("option",{value:s.value},t.toDisplayString(s.title),9,s_))),256))],40,l_),[[t.vModelSelect,e.model]])],2)}var d_=_(t_,[["render",c_],["__scopeId","data-v-49a55ef8"]]),CS="";const u_={props:{item:{type:Object},click:{type:Function}},methods:{clicked(){this.click(this.item)},toggleCollapse(){return this.item.collapsed=!this.collapsed}},inject:["isSelected"],computed:{selected(){return this.isSelected(this.item)},hasChildren(){var e;return(e=this.item.children)==null?void 0:e.length},expanded(){return!this.collapsed},collapsed(){return!this.hasChildren||this.item.collapsed}}},m_={class:"outer"},f_={key:0,class:"children"};function p_(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-button"),d=t.resolveComponent("flex-row"),u=t.resolveComponent("scope-item",!0);return t.openBlock(),t.createElementBlock("div",m_,[t.createElementVNode("div",{class:t.normalizeClass(["scope-item",{selected:o.selected}]),onClick:n[1]||(n[1]=(...m)=>o.clicked&&o.clicked(...m))},[t.createVNode(d,{gap:"",vcenter:""},{default:t.withCtx(()=>[t.createVNode(s,{class:"select-mark",shrink:""},{default:t.withCtx(()=>[t.createVNode(a,{icon:o.selected?"fa-check":"fa-regular fa-circle"},null,8,["icon"])]),_:1}),t.createVNode(s,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.item.title),1)]),_:1}),t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass({hide:!o.hasChildren})},[t.createVNode(c,{onClick:n[0]||(n[0]=t.withModifiers(m=>o.toggleCollapse(),["stop","prevent"])),size:"xs",icon:""},{default:t.withCtx(()=>[t.createVNode(a,{icon:o.expanded?"fa-angle-up":"fa-angle-down"},null,8,["icon"])]),_:1})],2)]),_:1})]),_:1})],2),o.expanded?(t.openBlock(),t.createElementBlock("div",f_,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.item.children,m=>(t.openBlock(),t.createBlock(u,{click:r.click,item:m},null,8,["click","item"]))),256))])):t.createCommentVNode("",!0)])}var h_=_(u_,[["render",p_],["__scopeId","data-v-5f67b500"]]),wS="";let oo;const y_={components:{ScopeItem:h_},async created(){this.glossary=await this.$sdk.content.glossary({hash:!0})},props:{action:{type:String},type:{type:String,required:!0},modelValue:{type:Array,default(){return[]}}},data(){return{loading:!0,glossary:{},model:this.modelValue,scopes:[]}},methods:{select(e){this.isSelected(e)||this.model.push(e)},deselect(e){const n=this,r=n.$sdk.utils.id(e);n.isSelected(e)&&(n.model=n.model.filter(function(i){return n.$sdk.utils.id(i)!=r}))},isSelected(e){const n=this.$sdk.utils.id(e);return this.hash[n]},toggle(e){this.isSelected(e)?this.deselect(e):this.select(e)},click(e){this.toggle(e)},async checkLoad(){oo||(oo=!0,this.action&&this.type?this.scopes=await this.loadScopes():console.log("missing action or type",this.action,this.type),oo=!1)},async loadScopes(){this.loading=!0;const{data:e}=await this.$sdk.api.post("/scope/actionable",{action:this.action,type:this.type});return this.loading=!1,e},async showModal(){const e=this,n={};await e.$sdk.modal({component:ScopeSelectModal,options:n})}},provide(){return{isSelected:this.isSelected}},computed:{hasSelection(){return this.model.length},hash(){return this.model.reduce(function(e,n){return e[n._id||n]=!0,e},{})},empty(){return!this.model.length},summary(){const e=this;return e.model.length?e.model.map(function(n){return n.title}).join(", "):"Select Scopes"}},watch:{type:{handler(){this.checkLoad()},immediate:!0},action:{handler(){this.checkLoad()},immediate:!0},modelValue(e){this.model=e},model(e){this.$emit("update:modelValue",e)}}};function g_(e,n,r,i,l,o){const a=t.resolveComponent("spinner"),s=t.resolveComponent("scope-item");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass({has:o.hasSelection})},[l.loading?(t.openBlock(),t.createBlock(a,{key:0})):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(l.scopes,c=>(t.openBlock(),t.createBlock(s,{click:o.click,item:c},null,8,["click","item"]))),256))],2)}var ka=_(y_,[["render",g_],["__scopeId","data-v-243a360c"]]),VS="";const __={async created(){this.scopeGlossary=await this.$sdk.content.scopeGlossary({hash:!0})},props:{action:{type:String},type:{type:String},modelValue:{type:Array,default(){return[]}}},data(){return{scopeGlossary:{},loading:!0,model:this.modelValue,definition:null}},methods:{async openSelection(){const e=this,n=await e.$sdk.selectScopes({action:e.action,type:e.type,model:e.model});e.model=n}},computed:{cacheKey(){return this.user.cacheKey},empty(){return!this.model.length},summary(){const e=this;return e.model.length?e.model.map(function(n){const r=n._id||n;return(e.scopeGlossary[r]||n).title||"(redacted)"}).join(", "):"Select Scopes"},definitionDefaultScopes(){var e;return((e=this.definition)==null?void 0:e.defaultScopes)||[]},definitionRestrictScopes(){var e;return((e=this.definition)==null?void 0:e.restrictScopes)||[]},restrictedLookup(){return this.definitionRestrictScopes.reduce(function(e,n){if(!n)return e;var r=n._id||n;return e[r]=r,e},{})},availableDefaultScopes(){const e=this;let n;return e.definitionRestrictScopes.length?(n=e.definitionDefaultScopes.filter(function(r){if(!r)return!1;var i=r._id||r;return e.restrictedLookup[i]}),!n.length&&e.definitionRestrictScopes.length===1&&(n=e.definitionRestrictScopes),n):e.definitionDefaultScopes}},watch:{availableDefaultScopes:{handler(e){!this.model.length&&e.length&&(this.model=[...e])},immediate:!0},modelValue(e){this.model=e},model(e){this.$emit("update:modelValue",e)},type:{async handler(e){const n=this,r=await this.$sdk.content.glossary({hash:!0});n.definition=r[e]},immediate:!0}}};function k_(e,n,r,i,l,o){const a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(a,{onClick:o.openSelection},{default:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass({"empty-text":o.empty})},t.toDisplayString(o.summary),3)]),_:1},8,["onClick"])])}var ba=_(__,[["render",k_],["__scopeId","data-v-66408f08"]]),ES="";function b_(e){return e===void 0||typeof e=="undefined"||e===null||String(e)==="null"||String(e)==="undefined"}const x_={components:{ScopeSelectButton:ba},props:{title:{type:String},modelValue:{}},mixins:[H],async created(){this.model=this.model;var e=await this.$sdk.content.glossary(),n=e;this.field.basicTypes===!1&&(n=n.filter(function(r){return!!r.definesType})),this.field.definedTypes===!1&&(n=n.filter(function(r){return!r.definesType})),n=n.map(function(r){return{title:r.title,value:r.key}}).sort((r,i)=>r.title>i.title?1:-1),this.types=n},data(){return{types:[]}},methods:{cleanOutput(e){var n=this;return b_(e)?n.multiValue?e=[]:e=void 0:n.multiValue?e=(e||[]).filter(Boolean).map(function(r){return n.getValue(r)}):e=n.getValue(e),e},cleanInput(e){var n=this;if(n.multiValue)e||(e=[]),Array.isArray(e)||(e=[e]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum),e=e.filter(Boolean).map(function(i){var l=n.getValue(i);return n.returnObject?n.optionLookup[l]:l});else{var r=n.getValue(e);e=n.returnObject?n.optionLookup[r]:r}return e}},computed:{returnObject(){return!1},classes(){var e=[];return this.multiValue?e.push("multiple"):e.push("single"),e},optionLookup(){var e=this;return e.types.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{})},summary(){return this.model?this.getLabel(this.optionLookup[this.model]):this.title||"Click to select"},contextReferenceType(){return this.field.contextReferenceType},contextReferenceAction(){return this.field.contextReferenceAction},selectableOptions(){return this.types}}},C_={key:0,class:"ux-field-title"},w_={key:0,class:"ux-required-marker"},V_={key:1,class:"ux-field-description"};function E_(e,n,r,i,l,o){const a=t.resolveComponent("scope-select-button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["scope-select",o.classes])},[e.showLabel?(t.openBlock(),t.createElementBlock("label",C_,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",w_,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",V_,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),t.createVNode(a,{type:o.contextReferenceType,action:o.contextReferenceAction,modelValue:e.model,"onUpdate:modelValue":n[0]||(n[0]=s=>e.model=s)},null,8,["type","action","modelValue"])],2)}var B_=_(x_,[["render",E_],["__scopeId","data-v-c629a544"]]),BS="";function S_(e){return e===void 0||typeof e=="undefined"||e===null||String(e)==="null"||String(e)==="undefined"}const N_={props:{title:{type:String},modelValue:{}},mixins:[H],async created(){this.model=this.model},watch:{referenceType:{async handler(e){const n=this,r=await this.$sdk.content.glossary({hash:!0});n.definition=r[e]},immediate:!0}},data(){return{types:[],definition:null}},methods:{cleanOutput(e){var n=this;return S_(e)?n.multiValue?e=[]:e=void 0:n.multiValue?e=(e||[]).filter(Boolean).map(function(r){return n.getValue(r)}):e=n.getValue(e),e},cleanInput(e){var n=this;if(n.multiValue)e||(e=[]),Array.isArray(e)||(e=[e]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum),e=e.filter(Boolean).map(function(i){var l=n.getValue(i);return n.returnObject?n.optionLookup[l]:l});else{var r=n.getValue(e);e=n.returnObject?n.optionLookup[r]:r}return e}},computed:{fields(){const e=this;if(!e.definition)return[];const n=e.definition.definesType==="submission";var r=[...e.definition.fields],i=e.definition.definedFields||[];if(i.length)if(n){var l={title:"Form Data",minimum:1,maximum:1,key:"formData",asObject:!0,type:"group",fields:i};r.push(l);const s=i.map(function(c){return c.type==="reference"&&(c=JSON.parse(JSON.stringify(c)),delete c.fields),c});var o={title:"Data",minimum:1,maximum:1,key:"data",asObject:!0,type:"group",fields:s};r.push(o)}else{var o={title:`${e.definition.title}`,minimum:1,maximum:1,key:"data",asObject:!0,type:"group",fields:i};r.push(o)}var a=e.$sdk.utils.mapFields(r).filter(function(s){var c=s.type=="group"&&s.asObject&&s.minimum==1&&s.maximum==1;return!c}).map(function(s){return s.title=s.titles.join(" > "),s}).sort(function(s,c){return s.title<c.title?-1:1});return a},fieldOptions(){return this.fields.map(function(n){return{title:n.title,value:n.path}})},referenceType(){return this.field.referenceType},returnObject(){return!1},classes(){var e=[];return this.multiValue?e.push("multiple"):e.push("single"),e},optionLookup(){var e=this;return e.fieldOptions.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{})},summary(){return this.model?this.getLabel(this.optionLookup[this.model]):this.title||"Click to select"},selectableOptions(){return this.fieldOptions}}},T_={key:0,class:"ux-field-title"},O_={key:0,class:"ux-required-marker"},D_={key:1,class:"ux-field-description"},A_={key:2,class:"ui-select-button"},M_=["multiple"],F_={key:0,value:""},I_=["value"];function $_(e,n,r,i,l,o){const a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["native-select",o.classes])},[e.showLabel?(t.openBlock(),t.createElementBlock("label",T_,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",O_,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",D_,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.singleValue?(t.openBlock(),t.createElementBlock("div",A_,[t.renderSlot(e.$slots,"default",{},()=>[t.createVNode(a,{tag:"div"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1})],!0)])):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("select",{onFocus:n[0]||(n[0]=(...s)=>e.touch&&e.touch(...s)),multiple:e.multiValue,"onUpdate:modelValue":n[1]||(n[1]=s=>e.model=s)},[e.singleValue&&!e.minimum?(t.openBlock(),t.createElementBlock("option",F_,"None")):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.selectableOptions,s=>(t.openBlock(),t.createElementBlock("option",{value:s.value},t.toDisplayString(s.title),9,I_))),256))],40,M_),[[t.vModelSelect,e.model]])],2)}var L_=_(N_,[["render",$_],["__scopeId","data-v-3cff6dc8"]]),SS="";const U_={props:{modelValue:{type:[String,Array]}},mixins:[H],methods:{update(e,n){var r=this.format(e.target.value);this.model[n]=r},format(n){n=String(n).replace(/[^0-9.-]/g,"");var n=parseFloat(n)*100;return isNaN(n)?"":(n=Math.round(n),n)},unformat(n){n=String(n).replace(/[^0-9.-]/g,"");var n=parseFloat(n)/100;return isNaN(n)?"":(n=n.toFixed(2),n)},getNewDefaultEntry(){return""},unfocus(){this.$refs.input.blur(),this.touch()}},computed:{model:{get(){return this.cleanOutput(this.value)},set(e){this.value=this.cleanInput(e),this.dispatch()}},proxy:{get(){var e=this;return e.multiValue?e.model.map(e.unformat):e.unformat(e.model)},set(e){var n=this;n.multiValue?n.model=e.map(n.format):n.model=n.format(e)}},currency(){return String(this.field.currency||"usd").toLowerCase()},prefix(){return this.$sdk.utils.currencySymbol(this.currency)},suffix(){return String(this.currency).toUpperCase()}}},P_={key:0,class:"ux-field-title"},j_={key:0,class:"ux-required-marker"},R_={key:1,class:"ux-field-description"},z_={key:2},q_={key:0,class:"ux-text-prefix"},H_=["onBlur","onUpdate:modelValue"],G_={key:1,class:"ux-text-suffix"},W_={key:0,class:"ux-text-prefix"},K_={key:1,class:"ux-text-suffix"};function Z_(e,n,r,i,l,o){const a=t.resolveComponent("flex-cell"),s=t.resolveComponent("ux-icon"),c=t.resolveComponent("ux-button"),d=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.showLabel?(t.openBlock(),t.createElementBlock("label",P_,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",j_,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",R_,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",z_,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.model,(u,m)=>(t.openBlock(),t.createBlock(d,{class:"ux-text-row",key:m},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["ux-text-wrap",{prefixed:o.prefix,suffixed:o.suffix}])},[o.prefix?(t.openBlock(),t.createElementBlock("span",q_,t.toDisplayString(o.prefix),1)):t.createCommentVNode("",!0),t.withDirectives((t.openBlock(),t.createElementBlock("input",{class:"ux-field-focus ux-text-input-multiple",ref_for:!0,ref:"input",placeholder:"0.00",key:`proxy-index-${m}`,onKeydown:n[0]||(n[0]=t.withKeys(t.withModifiers(f=>e.add(),["stop","prevent"]),["enter"])),onBlur:f=>o.update(f,m),"onUpdate:modelValue":f=>o.proxy[m]=f,onFocus:n[1]||(n[1]=(...f)=>e.touch&&e.touch(...f))},null,40,H_)),[[t.vModelText,o.proxy[m],void 0,{lazy:!0}]]),o.suffix?(t.openBlock(),t.createElementBlock("span",G_,t.toDisplayString(o.suffix),1)):t.createCommentVNode("",!0)],2)]),_:2},1024),t.createVNode(a,{shrink:"",vcenter:""},{default:t.withCtx(()=>[e.canRemoveValue?(t.openBlock(),t.createBlock(c,{key:0,tag:"a",icon:"",onClick:f=>e.remove(u)},{default:t.withCtx(()=>[t.createVNode(s,{icon:"fa-times"})]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),128)),e.canAddValue?(t.openBlock(),t.createBlock(c,{key:0,onClick:n[2]||(n[2]=u=>e.add())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.addLabel)+" ",1),t.createVNode(s,{icon:"fa-plus",right:""})]),_:1})):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(["ux-text-wrap",{prefixed:o.prefix,suffixed:o.suffix}])},[o.prefix?(t.openBlock(),t.createElementBlock("span",W_,t.toDisplayString(o.prefix),1)):t.createCommentVNode("",!0),t.withDirectives((t.openBlock(),t.createElementBlock("input",{class:"ux-field-focus ux-text-input-single",ref:"input",key:o.proxy,placeholder:"0.00",onKeyup:n[3]||(n[3]=t.withKeys(t.withModifiers((...u)=>o.unfocus&&o.unfocus(...u),["stop","prevent"]),["enter"])),onFocus:n[4]||(n[4]=(...u)=>e.touch&&e.touch(...u)),"onUpdate:modelValue":n[5]||(n[5]=u=>o.proxy=u)},null,32)),[[t.vModelText,o.proxy,void 0,{lazy:!0}]]),o.suffix?(t.openBlock(),t.createElementBlock("span",K_,t.toDisplayString(o.suffix),1)):t.createCommentVNode("",!0)],2))],64)}var Y_=_(U_,[["render",Z_],["__scopeId","data-v-5dd6344d"]]),NS="";const X_={props:{modelValue:{type:[String,Array]}},mixins:[H],computed:{inputType(){switch(this.field.widget){case"password":case"email":return this.field.widget;default:switch(this.field.type){case"email":return"email";default:return"text"}}},lazy(){switch(this.type){case"integer":case"number":case"decimal":case"float":case"url":case"key":return!0}},actualPlaceholder(){if(this.field.placeholder)return this.field.placeholder;switch(this.type){case"integer":case"number":case"decimal":case"float":return"0";case"url":return"https://www.website.com";case"email":return"you@youremail.com"}}},methods:{cleanOutputValue(e){var n=this.cleanTextInput(e,this.type,this);return n?String(n):""},cleanInputValue(e){return this.cleanTextInput(e,this.type,this)},getNewDefaultEntry(){return""}}},J_={key:0,class:"ux-field-title"},Q_={key:0,class:"ux-required-marker"},v_={key:1,class:"ux-field-description"},ek={key:2},tk={class:"ux-text-wrap"},nk={key:0,class:"ux-text-prefix"},rk=["type","placeholder","onUpdate:modelValue"],ok=["type","placeholder","onUpdate:modelValue"],ik={key:3,class:"ux-text-suffix"},lk={key:3,class:"ux-text-wrap"},ak={key:0,class:"ux-text-prefix"},sk=["type","placeholder"],ck=["type","placeholder"],dk={key:3,class:"ux-text-suffix"};function uk(e,n,r,i,l,o){const a=t.resolveComponent("flex-cell"),s=t.resolveComponent("ux-icon"),c=t.resolveComponent("ux-button"),d=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.showLabel?(t.openBlock(),t.createElementBlock("label",J_,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Q_,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",v_,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",ek,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.model,(u,m)=>(t.openBlock(),t.createBlock(d,{class:"ux-text-row",key:m},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createElementVNode("div",tk,[e.prefix?(t.openBlock(),t.createElementBlock("span",nk,t.toDisplayString(e.prefix),1)):t.createCommentVNode("",!0),o.lazy?t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:1,type:o.inputType,class:"ux-field-focus ux-text-input-multiple",placeholder:o.actualPlaceholder,onFocus:n[0]||(n[0]=(...f)=>e.touch&&e.touch(...f)),ref_for:!0,ref:"input",onKeydown:n[1]||(n[1]=t.withKeys(t.withModifiers(f=>e.add(),["stop","prevent"]),["enter"])),"onUpdate:modelValue":f=>e.model[m]=f},null,40,rk)),[[t.vModelDynamic,e.model[m],void 0,{lazy:!0}]]):t.createCommentVNode("",!0),o.lazy?t.createCommentVNode("",!0):t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:2,type:o.inputType,class:"ux-field-focus ux-text-input-multiple",placeholder:o.actualPlaceholder,onFocus:n[2]||(n[2]=(...f)=>e.touch&&e.touch(...f)),ref_for:!0,ref:"input",onKeydown:n[3]||(n[3]=t.withKeys(t.withModifiers(f=>e.add(),["stop","prevent"]),["enter"])),"onUpdate:modelValue":f=>e.model[m]=f},null,40,ok)),[[t.vModelDynamic,e.model[m]]]),e.suffix?(t.openBlock(),t.createElementBlock("span",ik,t.toDisplayString(e.suffix),1)):t.createCommentVNode("",!0)])]),_:2},1024),t.createVNode(a,{shrink:"",vcenter:""},{default:t.withCtx(()=>[e.canRemoveValue?(t.openBlock(),t.createBlock(c,{key:0,tag:"a",icon:"",onClick:f=>e.remove(u)},{default:t.withCtx(()=>[t.createVNode(s,{icon:"fa-times"})]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),128)),e.canAddValue?(t.openBlock(),t.createBlock(c,{key:0,onClick:n[4]||(n[4]=u=>e.add())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.addLabel)+" ",1),t.createVNode(s,{icon:"fa-plus",right:""})]),_:1})):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",lk,[e.prefix?(t.openBlock(),t.createElementBlock("span",ak,t.toDisplayString(e.prefix),1)):t.createCommentVNode("",!0),o.lazy?t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:1,type:o.inputType,ref:"input",class:"ux-field-focus ux-text-input-single",placeholder:o.actualPlaceholder,onFocus:n[5]||(n[5]=(...u)=>e.touch&&e.touch(...u)),"onUpdate:modelValue":n[6]||(n[6]=u=>e.model=u)},null,40,sk)),[[t.vModelDynamic,e.model,void 0,{lazy:!0}]]):t.createCommentVNode("",!0),o.lazy?t.createCommentVNode("",!0):t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:2,type:o.inputType,ref:"input",class:"ux-field-focus ux-text-input-single",placeholder:o.actualPlaceholder,onFocus:n[7]||(n[7]=(...u)=>e.touch&&e.touch(...u)),"onUpdate:modelValue":n[8]||(n[8]=u=>e.model=u)},null,40,ck)),[[t.vModelDynamic,e.model]]),e.suffix?(t.openBlock(),t.createElementBlock("span",dk,t.toDisplayString(e.suffix),1)):t.createCommentVNode("",!0)]))],64)}var xa=_(X_,[["render",uk],["__scopeId","data-v-d9e8503e"]]),TS="";const mk={props:{modelValue:{type:[String,Array]}},mixins:[H],methods:{getNewDefaultEntry(){return""}}},fk={key:0,class:"ux-field-title"},pk={key:0,class:"ux-required-marker"},hk={key:1,class:"ux-field-description"},yk={key:2},gk=["onUpdate:modelValue"];function _k(e,n,r,i,l,o){const a=t.resolveComponent("flex-cell"),s=t.resolveComponent("ux-icon"),c=t.resolveComponent("ux-button"),d=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.showLabel?(t.openBlock(),t.createElementBlock("label",fk,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",pk,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",hk,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",yk,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.model,(u,m)=>(t.openBlock(),t.createBlock(d,{class:"ux-text-row",key:m},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("textarea",{contenteditable:"",onFocus:n[0]||(n[0]=(...f)=>e.touch&&e.touch(...f)),ref_for:!0,ref:"input","onUpdate:modelValue":f=>e.model[m]=f,class:"ux-textarea ux-field-focus ux-text-area-multiple"},null,40,gk),[[t.vModelText,e.model[m]]])]),_:2},1024),t.createVNode(a,{shrink:"",vcenter:""},{default:t.withCtx(()=>[e.canRemoveValue?(t.openBlock(),t.createBlock(c,{key:0,tag:"a",icon:"",onClick:f=>e.remove(u)},{default:t.withCtx(()=>[t.createVNode(s,{icon:"fa-times"})]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),128)),e.canAddValue?(t.openBlock(),t.createBlock(c,{key:0,onClick:n[1]||(n[1]=u=>e.add())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.addLabel),1)]),_:1})):t.createCommentVNode("",!0)])):t.withDirectives((t.openBlock(),t.createElementBlock("textarea",{key:3,class:"ux-textarea ux-field-focus ux-text-area-single",onFocus:n[2]||(n[2]=(...u)=>e.touch&&e.touch(...u)),"onUpdate:modelValue":n[3]||(n[3]=u=>e.model=u),role:"textbox",contenteditable:""},null,544)),[[t.vModelText,e.model]])],64)}var kk=_(mk,[["render",_k],["__scopeId","data-v-777c0703"]]),OS="";function vn(e){return String(e).length<2&&(e=`0${e}`),e}const bk={props:{modelValue:{type:[Date,String,Array]}},mixins:[H],computed:{model:{get(){return this.cleanOutput(this.value)},set(e){if(!e){this.value=void 0,this.dispatch();return}if(e!=="invalid"){var n=this.cleanOutput(e),r=this.cleanOutput(this.value);n!=r&&(e=this.cleanInput(n),this.value=e,this.dispatch())}}}},methods:{cleanOutputValue(e){return e=e?new Date(e):new Date,`${e.getFullYear()}-${vn(e.getMonth()+1)}-${vn(e.getDate())}T${vn(e.getHours())}:${vn(e.getMinutes())}`},cleanInputValue(e){let n=new Date(e);return n.toString()=="Invalid Date"?"invalid":n.toISOString()},getNewDefaultEntry(){return new Date}}},xk={key:0,class:"ux-field-title"},Ck={key:0,class:"ux-required-marker"},wk={key:1,class:"ux-field-description"},Vk={key:2},Ek=["onUpdate:modelValue"];function Bk(e,n,r,i,l,o){const a=t.resolveComponent("flex-cell"),s=t.resolveComponent("ux-icon"),c=t.resolveComponent("ux-button"),d=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.showLabel?(t.openBlock(),t.createElementBlock("label",xk,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Ck,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",wk,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",Vk,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.model,(u,m)=>(t.openBlock(),t.createBlock(d,{class:"ux-text-row",key:m},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("input",{type:"datetime-local",class:"ux-field-focus ux-text-input-multiple",onFocus:n[0]||(n[0]=(...f)=>e.touch&&e.touch(...f)),ref_for:!0,ref:"input",onKeydown:n[1]||(n[1]=t.withKeys(t.withModifiers(f=>e.add(),["stop","prevent"]),["enter"])),"onUpdate:modelValue":f=>o.model[m]=f},null,40,Ek),[[t.vModelText,o.model[m]]])]),_:2},1024),t.createVNode(a,{shrink:"",vcenter:""},{default:t.withCtx(()=>[e.canRemoveValue?(t.openBlock(),t.createBlock(c,{key:0,tag:"a",icon:"",onClick:f=>e.remove(u)},{default:t.withCtx(()=>[t.createVNode(s,{icon:"fa-times"})]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),128)),e.canAddValue?(t.openBlock(),t.createBlock(c,{key:0,onClick:n[2]||(n[2]=u=>e.add())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.addLabel),1)]),_:1})):t.createCommentVNode("",!0)])):t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:3,type:"datetime-local",class:"ux-field-focus ux-text-input-single",onFocus:n[3]||(n[3]=(...u)=>e.touch&&e.touch(...u)),"onUpdate:modelValue":n[4]||(n[4]=u=>o.model=u)},null,544)),[[t.vModelText,o.model]])],64)}var Ca=_(bk,[["render",Bk],["__scopeId","data-v-1c86b484"]]),DS="";const Sk={components:{Daterange:Ll},props:{modelValue:{type:[Object,Array]}},mixins:[H],computed:{model:{get(){return this.cleanOutput(this.value)},set(e){if(!e){this.value=void 0,this.dispatch();return}var n=this.cleanOutput(e),r=this.cleanOutput(this.value);n!=r&&(e=this.cleanInput(n),this.value=e,this.dispatch())}}},methods:{cleanOutputValue(e){return e},cleanInputValue(e){return e},getNewDefaultEntry(){return{}}}},Nk={key:0,class:"ux-field-title"},Tk={key:0,class:"ux-required-marker"},Ok={key:1,class:"ux-field-description"},Dk={key:2};function Ak(e,n,r,i,l,o){const a=t.resolveComponent("daterange",!0),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button"),u=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.showLabel?(t.openBlock(),t.createElementBlock("label",Nk,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Tk,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Ok,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",Dk,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.model,(m,f)=>(t.openBlock(),t.createBlock(u,{class:"ux-text-row",key:f},{default:t.withCtx(()=>[t.createVNode(s,null,{default:t.withCtx(()=>[t.createVNode(a,{onFocus:e.touch,modelValue:o.model[f],"onUpdate:modelValue":p=>o.model[f]=p},null,8,["onFocus","modelValue","onUpdate:modelValue"])]),_:2},1024),t.createVNode(s,{shrink:"",vcenter:""},{default:t.withCtx(()=>[e.canRemoveValue?(t.openBlock(),t.createBlock(d,{key:0,tag:"a",icon:"",onClick:p=>e.remove(m)},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-times"})]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),128)),e.canAddValue?(t.openBlock(),t.createBlock(d,{key:0,onClick:n[0]||(n[0]=m=>e.add())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.addLabel),1)]),_:1})):t.createCommentVNode("",!0)])):(t.openBlock(),t.createBlock(a,{key:3,onFocus:e.touch,modelValue:o.model,"onUpdate:modelValue":n[1]||(n[1]=m=>o.model=m)},null,8,["onFocus","modelValue"]))],64)}var Mk=_(Sk,[["render",Ak],["__scopeId","data-v-24228367"]]),AS="";const Fk={computed:{NativeCheckbox:Ur},mixins:[H],props:{modelValue:{type:Boolean,default(){return!1}}},data(){return{value:this.modelValue}},watch:{modelValue(e,n){this.value=e,this.model=e}},computed:{longDescription(){return String(this.description).length>2},defaultValue(){return!1},model:{get(){return!!this.value},set(e){this.value=!!e,this.$emit("update:modelValue",this.value)}}}},Ik={key:0,class:"ux-field-title"},$k={key:0,class:"ux-required-marker"},Lk={key:1,class:"ux-field-description"};function Uk(e,n,r,i,l,o){const a=t.resolveComponent("ux-checkbox"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("flex-row");return t.openBlock(),t.createBlock(c,{onClick:n[1]||(n[1]=d=>e.touch()),gap:""},{default:t.withCtx(()=>[t.createVNode(s,{vcenter:"",shrink:""},{default:t.withCtx(()=>[t.createVNode(a,{value:o.model,onClick:n[0]||(n[0]=d=>o.model=!o.model)},null,8,["value"])]),_:1}),t.createVNode(s,{vcenter:""},{default:t.withCtx(()=>[t.createElementVNode("div",null,[e.showLabel?(t.openBlock(),t.createElementBlock("label",Ik,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",$k,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Lk,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0)])]),_:1})]),_:1})}var Pk=_(Fk,[["render",Uk],["__scopeId","data-v-046b9e38"]]);const jk={props:{modelValue:{type:[String,Array]}},mixins:[H],methods:{getNewDefaultEntry(){return""}}},Rk={key:0},zk=["innerHTML"],qk=["innerHTML"];function Hk(e,n,r,i,l,o){const a=t.resolveComponent("flex-cell"),s=t.resolveComponent("ux-icon"),c=t.resolveComponent("ux-button"),d=t.resolveComponent("flex-row");return e.multiValue?(t.openBlock(),t.createElementBlock("div",Rk,[t.createVNode(d,{class:"ux-text-row"},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.model,(u,m)=>(t.openBlock(),t.createElementBlock("div",{innerHTML:e.field.template,key:m},null,8,zk))),128))]),_:1}),t.createVNode(a,{shrink:"",vcenter:""},{default:t.withCtx(()=>[e.canRemoveValue?(t.openBlock(),t.createBlock(c,{key:0,tag:"a",icon:"",onClick:n[0]||(n[0]=u=>e.remove(e.entry))},{default:t.withCtx(()=>[t.createVNode(s,{icon:"fa-times"})]),_:1})):t.createCommentVNode("",!0)]),_:1})]),_:1}),e.canAddValue?(t.openBlock(),t.createBlock(c,{key:0,onClick:n[1]||(n[1]=u=>e.add())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.addLabel),1)]),_:1})):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",{key:1,innerHTML:e.field.template},null,8,qk))}var Gk=_(jk,[["render",Hk]]),MS="";const Wk={props:{fields:{type:Array,default(){return[]}},enableRemove:{type:Boolean},modelValue:{type:Object,default(){return{key:"",comparator:"",value:null,value2:null,values:[]}}}},watch:{modelValue(e){e!=this.model&&(this.model=e)}},async created(){this.comparators=await this.$sdk.content.comparators()},data(){return{comparators:null,model:this.modelValue}},computed:{hasOptions(){return!!(this.field.options&&this.field.options.length)},fieldHash(){return this.fields.reduce(function(e,n){return e[n.path]=n,e},{})},keyOptions(){return this.fields.reduce(function(e,n){switch(n.type){case"object":case"group":break;default:e.push({title:n.titles.join(" \u2192 "),value:n.path||n.key});break}return e},[])},keyField(){return{minimum:1,maximum:1,options:this.keyOptions}},field(){return this.fieldHash[this.model.key]},fieldType(){if(!!this.field)return this.field.type},inputType(){if(!!this.comparator){var e=this.comparator.inputType;switch(e){case"none":case"range":case"daterange":case"daterelative":case"integer":case"decimal":case"float":case"number":break;case"array":switch(this.fieldType){case"reference":e="multireference";break}break;default:switch(e="normal",this.fieldType){case"reference":case"boolean":case"date":e=this.fieldType;break;case"integer":case"decimal":case"float":case"number":e="number";break}break}return e}},comparator(){return this.comparatorLookup[this.model.comparator]},comparatorLookup(){return this.comparators.hash},comparatorOptions(){if(!this.fieldType)return[];var e=this.comparators.available[this.fieldType]||[],n=e.map(function(r){return{title:r.title,value:r.operator}});return n},comparatorField(){return{minimum:1,maximum:1,options:this.comparatorOptions}},referenceType(){if(!!this.field)return this.field.referenceType},relativeNumberField(){return{type:"integer",maximum:1,minimum:1,placeholder:"0"}},relativePeriodField(){return{type:"string",maximum:1,minimum:1,widget:"select",options:[{title:"Minutes",value:"minutes"},{title:"Hours",value:"hours"},{title:"Days",value:"days"},{title:"Weeks",value:"weeks"},{title:"Months",value:"months"},{title:"Years",value:"years"}]}},inputPlaceholder(){switch(this.model.comparator){case"valuesgreater":case"valuesgreaterequal":case"valueslesser":case"valueslesserequal":return"0"}return this.field.title},dateField(){return{type:this.fieldType,maximum:1,minimum:1,placeholder:this.inputPlaceholder}},multiOptionsField(){return{options:this.field.options,widget:"select",type:this.fieldType,maximum:0,minimum:1,placeholder:this.inputPlaceholder}},singleOptionsField(){return{title:`Select ${this.field.title}`,options:this.field.options,widget:"select",type:this.fieldType,maximum:1,minimum:0,placeholder:this.inputPlaceholder}},normalField(){return{type:this.fieldType,maximum:1,minimum:1,placeholder:this.inputPlaceholder}},arrayField(){return{title:this.field.title,type:this.fieldType,maximum:0,minimum:1}},singleReferenceField(){return{type:"reference",referenceType:this.referenceType,maximum:1,minimum:1,create:!1,list:!1}},multiReferenceField(){return{type:"reference",referenceType:this.referenceType,maximum:0,minimum:1,create:!1,list:!1}}},methods:{},components:{TextField:xa,DateField:Ca,NativeSelect:et,ContentSelect:_a}},Kk={key:0,class:"filter-condition"},Zk={key:0},Yk={key:1},Xk={key:2},Jk={key:3},Qk={key:4},vk={key:5},e1={key:6},t1={key:7},n1={key:8},r1={key:9},o1={key:10};function i1(e,n,r,i,l,o){const a=t.resolveComponent("native-select"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("text-field"),d=t.resolveComponent("flex-row"),u=t.resolveComponent("date-field"),m=t.resolveComponent("content-select"),f=t.resolveComponent("ux-switch"),p=t.resolveComponent("ux-icon"),y=t.resolveComponent("ux-button");return l.comparators?(t.openBlock(),t.createElementBlock("div",Kk,[t.createVNode(d,{gap:"",vcenter:""},{default:t.withCtx(()=>[t.createVNode(s,null,{default:t.withCtx(()=>[t.createVNode(a,{title:"Select field",modelValue:l.model.key,"onUpdate:modelValue":n[0]||(n[0]=h=>l.model.key=h),field:o.keyField},null,8,["modelValue","field"])]),_:1}),l.model.key?(t.openBlock(),t.createBlock(s,{key:0},{default:t.withCtx(()=>[t.createVNode(a,{title:"Select comparator",modelValue:l.model.comparator,"onUpdate:modelValue":n[1]||(n[1]=h=>l.model.comparator=h),field:o.comparatorField},null,8,["modelValue","field"])]),_:1})):t.createCommentVNode("",!0),l.model.comparator?(t.openBlock(),t.createBlock(s,{key:1},{default:t.withCtx(()=>[o.inputType=="array"?(t.openBlock(),t.createElementBlock("div",Zk,[o.hasOptions?(t.openBlock(),t.createBlock(a,{key:0,modelValue:l.model.values,"onUpdate:modelValue":n[2]||(n[2]=h=>l.model.values=h),field:o.multiOptionsField},null,8,["modelValue","field"])):(t.openBlock(),t.createBlock(c,{key:1,field:o.arrayField,modelValue:l.model.values,"onUpdate:modelValue":n[3]||(n[3]=h=>l.model.values=h)},null,8,["field","modelValue"]))])):t.createCommentVNode("",!0),o.inputType=="range"?(t.openBlock(),t.createElementBlock("div",Yk,[t.createVNode(c,{field:o.normalField,modelValue:l.model.value,"onUpdate:modelValue":n[4]||(n[4]=h=>l.model.value=h)},null,8,["field","modelValue"]),t.createTextVNode(" And "),t.createVNode(c,{field:o.normalField,modelValue:l.model.value2,"onUpdate:modelValue":n[5]||(n[5]=h=>l.model.value2=h)},null,8,["field","modelValue"])])):t.createCommentVNode("",!0),o.inputType=="daterelative"?(t.openBlock(),t.createElementBlock("div",Xk,[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(s,{style:{width:"80px"}},{default:t.withCtx(()=>[t.createVNode(c,{field:o.relativeNumberField,modelValue:l.model.value,"onUpdate:modelValue":n[6]||(n[6]=h=>l.model.value=h)},null,8,["field","modelValue"])]),_:1}),t.createVNode(s,null,{default:t.withCtx(()=>[t.createVNode(a,{modelValue:l.model.value2,"onUpdate:modelValue":n[7]||(n[7]=h=>l.model.value2=h),field:o.relativePeriodField},null,8,["modelValue","field"])]),_:1})]),_:1})])):t.createCommentVNode("",!0),o.inputType=="daterange"?(t.openBlock(),t.createElementBlock("div",Jk,[t.createVNode(u,{field:o.dateField,modelValue:l.model.value,"onUpdate:modelValue":n[8]||(n[8]=h=>l.model.value=h)},null,8,["field","modelValue"]),t.createTextVNode(" And "),t.createVNode(u,{field:o.dateField,modelValue:l.model.value2,"onUpdate:modelValue":n[9]||(n[9]=h=>l.model.value2=h)},null,8,["field","modelValue"])])):t.createCommentVNode("",!0),o.inputType=="date"?(t.openBlock(),t.createElementBlock("div",Qk,[t.createVNode(u,{field:o.dateField,modelValue:l.model.value,"onUpdate:modelValue":n[10]||(n[10]=h=>l.model.value=h)},null,8,["field","modelValue"])])):t.createCommentVNode("",!0),o.inputType=="reference"?(t.openBlock(),t.createElementBlock("div",vk,[t.createVNode(m,{field:o.singleReferenceField,modelValue:l.model.value,"onUpdate:modelValue":n[11]||(n[11]=h=>l.model.value=h)},null,8,["field","modelValue"])])):t.createCommentVNode("",!0),o.inputType=="multireference"?(t.openBlock(),t.createElementBlock("div",e1,[t.createVNode(m,{field:o.multiReferenceField,modelValue:l.model.values,"onUpdate:modelValue":n[12]||(n[12]=h=>l.model.values=h)},null,8,["field","modelValue"])])):t.createCommentVNode("",!0),o.inputType=="boolean"?(t.openBlock(),t.createElementBlock("div",t1,[t.createVNode(d,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.createVNode(f,{onClick:n[13]||(n[13]=h=>l.model.value=!l.model.value),value:l.model.value},null,8,["value"])]),_:1}),t.createVNode(s,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(l.model.value?"True":"False"),1)]),_:1})]),_:1})])):t.createCommentVNode("",!0),o.inputType=="none"?(t.openBlock(),t.createElementBlock("div",n1)):t.createCommentVNode("",!0),o.inputType=="number"?(t.openBlock(),t.createElementBlock("div",r1,[t.createVNode(c,{field:o.normalField,modelValue:l.model.value,"onUpdate:modelValue":n[14]||(n[14]=h=>l.model.value=h)},null,8,["field","modelValue"])])):t.createCommentVNode("",!0),o.inputType=="normal"?(t.openBlock(),t.createElementBlock("div",o1,[o.hasOptions?(t.openBlock(),t.createBlock(a,{key:0,modelValue:l.model.value,"onUpdate:modelValue":n[15]||(n[15]=h=>l.model.value=h),field:o.singleOptionsField},null,8,["modelValue","field"])):(t.openBlock(),t.createBlock(c,{key:1,field:o.normalField,modelValue:l.model.value,"onUpdate:modelValue":n[16]||(n[16]=h=>l.model.value=h)},null,8,["field","modelValue"]))])):t.createCommentVNode("",!0)]),_:1})):t.createCommentVNode("",!0),r.enableRemove?(t.openBlock(),t.createBlock(s,{key:2,shrink:""},{default:t.withCtx(()=>[t.createVNode(y,{size:"sm",icon:"",onClick:n[17]||(n[17]=h=>e.$emit("remove"))},{default:t.withCtx(()=>[t.createVNode(p,{icon:"fa-times"})]),_:1})]),_:1})):t.createCommentVNode("",!0)]),_:1})])):t.createCommentVNode("",!0)}var l1=_(Wk,[["render",i1]]),a1=zt,s1=function(){return a1.Date.now()},c1=s1,d1=/\s/;function u1(e){for(var n=e.length;n--&&d1.test(e.charAt(n)););return n}var m1=u1,f1=m1,p1=/^\s+/;function h1(e){return e&&e.slice(0,f1(e)+1).replace(p1,"")}var y1=h1,g1=y1,wa=_n,_1=gn,Va=0/0,k1=/^[-+]0x[0-9a-f]+$/i,b1=/^0b[01]+$/i,x1=/^0o[0-7]+$/i,C1=parseInt;function w1(e){if(typeof e=="number")return e;if(_1(e))return Va;if(wa(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=wa(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=g1(e);var r=b1.test(e);return r||x1.test(e)?C1(e.slice(2),r?2:8):k1.test(e)?Va:+e}var Ea=w1,V1=_n,io=c1,Ba=Ea,E1="Expected a function",B1=Math.max,S1=Math.min;function N1(e,n,r){var i,l,o,a,s,c,d=0,u=!1,m=!1,f=!0;if(typeof e!="function")throw new TypeError(E1);n=Ba(n)||0,V1(r)&&(u=!!r.leading,m="maxWait"in r,o=m?B1(Ba(r.maxWait)||0,n):o,f="trailing"in r?!!r.trailing:f);function p(M){var V=i,K=l;return i=l=void 0,d=M,a=e.apply(K,V),a}function y(M){return d=M,s=setTimeout(I,n),u?p(M):a}function h(M){var V=M-c,K=M-d,F=n-V;return m?S1(F,o-K):F}function A(M){var V=M-c,K=M-d;return c===void 0||V>=n||V<0||m&&K>=o}function I(){var M=io();if(A(M))return z(M);s=setTimeout(I,h(M))}function z(M){return s=void 0,f&&i?p(M):(i=l=void 0,a)}function q(){s!==void 0&&clearTimeout(s),d=0,i=c=l=s=void 0}function Y(){return s===void 0?a:z(io())}function X(){var M=io(),V=A(M);if(i=arguments,l=this,c=M,V){if(s===void 0)return y(c);if(m)return clearTimeout(s),s=setTimeout(I,n),p(c)}return s===void 0&&(s=setTimeout(I,n)),a}return X.cancel=q,X.flush=Y,X}var er=N1,FS="";const T1={props:{enableRemove:{type:Boolean},definition:{type:Object,required:!0,default(){return{}}},modelValue:{type:Object,default(){return{operator:"and",filters:[]}}}},methods:{addCondition(){this.model.filters.push({})},removeCondition(e){this.model.filters.splice(e,1)}},data(){return this.modelValue.operator||(this.modelValue.operator="and"),this.modelValue.filters||(this.modelValue.filters=[]),{model:JSON.parse(JSON.stringify(this.modelValue))}},watch:{modelValue(e){e!=this.model&&(this.model=e)},model:{handler:er(function(e){this.$emit("update:modelValue",e)},200),deep:!0}},computed:{summary(){switch(this.model.operator){case"or":return"any";case"nor":return"none";default:return"all"}},fields(){const e=this;var n=e.definition&&e.definition.fields?[...e.definition.fields]:[],r=e.definition&&e.definition.definedFields?e.definition.definedFields:[];const i=e.definition.definesType==="submission";if(r.length)if(i){var l={title:"Form Data",minimum:1,maximum:1,key:"formData",asObject:!0,type:"group",fields:r};n.push(l);const s=r.map(function(c){return c.type==="reference"&&(c=JSON.parse(JSON.stringify(c)),delete c.fields),c});var o={title:"Data",minimum:1,maximum:1,key:"data",asObject:!0,type:"group",fields:s};n.push(o)}else{var o={title:`${e.definition.title}`,minimum:1,maximum:1,key:"data",asObject:!0,type:"group",fields:r};n.push(o)}var a=e.$sdk.utils.mapFields(n,{includeArrayDelimeter:!0});return a},operatorField(){return{minimum:1,maximum:1,options:[{title:"All",value:"and"},{title:"Any",value:"or"},{title:"None",value:"nor"}]}}},components:{FilterCondition:l1,NativeSelect:et}},O1={key:0,class:"filter-rule"},D1={class:"top"},A1={class:"summary"},M1=t.createElementVNode("span",{class:"line"},null,-1),F1={class:"operator"};function I1(e,n,r,i,l,o){const a=t.resolveComponent("native-select"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button"),u=t.resolveComponent("flex-row"),m=t.resolveComponent("filter-condition");return r.definition?(t.openBlock(),t.createElementBlock("div",O1,[t.createElementVNode("div",D1,[t.createVNode(u,null,{default:t.withCtx(()=>[t.createVNode(s,null,{default:t.withCtx(()=>[t.createElementVNode("div",A1,[t.createTextVNode(" Match "),t.createVNode(a,{modelValue:l.model.operator,"onUpdate:modelValue":n[0]||(n[0]=f=>l.model.operator=f),field:o.operatorField},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1},8,["modelValue","field"]),t.createTextVNode(" of the following conditions ")])]),_:1}),r.enableRemove?(t.openBlock(),t.createBlock(s,{key:0,onClick:n[1]||(n[1]=f=>e.$emit("remove")),shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{size:"sm",icon:""},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-trash"})]),_:1})]),_:1})):t.createCommentVNode("",!0)]),_:1})]),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.model.filters,(f,p)=>(t.openBlock(),t.createBlock(u,{key:`condition-${p}`},{default:t.withCtx(()=>[p!=0?(t.openBlock(),t.createBlock(s,{key:0,class:t.normalizeClass(["operator-cell",[l.model.operator,{last:p==l.model.filters.length}]]),vcenter:"",shrink:""},{default:t.withCtx(()=>[M1,t.createElementVNode("div",F1,t.toDisplayString(l.model.operator),1)]),_:2},1032,["class"])):t.createCommentVNode("",!0),t.createVNode(s,null,{default:t.withCtx(()=>[t.createVNode(m,{enableRemove:l.model.filters.length>1,fields:o.fields,onRemove:y=>o.removeCondition(p),modelValue:l.model.filters[p],"onUpdate:modelValue":y=>l.model.filters[p]=y},null,8,["enableRemove","fields","onRemove","modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024))),128)),t.createVNode(d,{size:"sm",onClick:o.addCondition},{default:t.withCtx(()=>[t.createTextVNode(" Add Condition "),t.createVNode(c,{icon:"fa-plus",right:""})]),_:1},8,["onClick"])])):t.createCommentVNode("",!0)}var $1=_(T1,[["render",I1]]),IS="";const L1={components:{FilterRule:$1,NativeSelect:et},methods:{removeRule(e){!this.model.filters||this.model.filters.splice(e,1)},addRule(){this.model.filters||(this.model.filters=[]),this.model.operator||(this.model.operator="and"),this.model.filters.push({operator:"and",filters:[{}]})}},computed:{summary(){switch(this.model.operator){case"or":return"any";case"nor":return"none";default:return"all"}},operatorField(){return{minimum:1,maximum:1,options:[{title:"All",value:"and"},{title:"Any",value:"or"},{title:"None",value:"nor"}]}}},watch:{modelValue:{handler(e){var n=JSON.stringify(this.model),r=JSON.stringify(e);if(n!=r){var i=JSON.parse(r);this.model=i}},immediate:!0},model:{handler:er(function(e){this.$emit("update:modelValue",e)},300),deep:!0,immediate:!0}},props:{definition:{type:Object,required:!0},modelValue:{type:Object,default(){return{operator:"and",filters:[{operator:"and",filters:[]}]}}}},data(){return{model:JSON.parse(JSON.stringify(this.modelValue))}}},U1={class:"filters"},P1={key:0,class:"top"},j1={class:"summary"};function R1(e,n,r,i,l,o){const a=t.resolveComponent("native-select"),s=t.resolveComponent("filter-rule"),c=t.resolveComponent("ux-button"),d=t.resolveComponent("flex-body"),u=t.resolveComponent("flex-column");return t.openBlock(),t.createBlock(u,{class:"filter-builder"},{default:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createElementVNode("div",U1,[l.model&&l.model.filters&&l.model.filters.length?(t.openBlock(),t.createElementBlock("div",P1,[t.createElementVNode("div",j1,[t.createTextVNode(" Match "),t.createVNode(a,{modelValue:l.model.operator,"onUpdate:modelValue":n[0]||(n[0]=m=>l.model.operator=m),field:o.operatorField},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1},8,["modelValue","field"]),t.createTextVNode(" of the following rules ")])])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.model.filters,(m,f)=>(t.openBlock(),t.createBlock(s,{enableRemove:"",key:`rule-${f}`,onRemove:p=>o.removeRule(f),definition:r.definition,modelValue:l.model.filters[f],"onUpdate:modelValue":p=>l.model.filters[f]=p,index:f},null,8,["onRemove","definition","modelValue","onUpdate:modelValue","index"]))),128)),t.createVNode(c,{size:"sm",onClick:n[1]||(n[1]=m=>o.addRule())},{default:t.withCtx(()=>[t.createTextVNode("Add Filter Rule")]),_:1})])]),_:1})]),_:1})}var Sa=_(L1,[["render",R1],["__scopeId","data-v-7933a5ee"]]),$S="";const z1={mixins:[H],components:{FilterBuilder:Sa},props:{modelValue:{type:Object}},data(){return{definition:null}},watch:{"field.referenceType":{handler:async function(e){if(!e)return this.definition=null;var n=await this.$sdk.content.glossary({hash:!0});this.definition=n[e]},immediate:!0}},computed:{definitionTitle(){const e=this.definition?this.definition.title:"";return(this.definition?this.definition.plural:"")||e}},methods:{getNewDefaultEntry(){return{operator:"and",filters:[]}}}},q1={key:0,class:"ux-field-title"},H1={key:0,class:"ux-required-marker"},G1={key:1,class:"ux-field-description"},W1={key:2};function K1(e,n,r,i,l,o){const a=t.resolveComponent("filter-builder"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button"),u=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.showLabel?(t.openBlock(),t.createElementBlock("label",q1,[t.createTextVNode(t.toDisplayString(e.label)+" ("+t.toDisplayString(o.definitionTitle)+") ",1),e.required?(t.openBlock(),t.createElementBlock("span",H1,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",G1,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",W1,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.model,(m,f)=>(t.openBlock(),t.createBlock(u,{class:"ux-text-row",key:f},{default:t.withCtx(()=>[t.createVNode(s,null,{default:t.withCtx(()=>[t.createVNode(a,{definition:l.definition,modelValue:e.model[f],"onUpdate:modelValue":p=>e.model[f]=p},null,8,["definition","modelValue","onUpdate:modelValue"])]),_:2},1024),t.createVNode(s,{shrink:"",vcenter:""},{default:t.withCtx(()=>[e.canRemoveValue?(t.openBlock(),t.createBlock(d,{key:0,tag:"a",icon:"",onClick:p=>e.remove(m)},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-times"})]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),128)),e.canAddValue?(t.openBlock(),t.createBlock(d,{key:0,size:"sm",onClick:n[0]||(n[0]=m=>e.add())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.addLabel),1)]),_:1})):t.createCommentVNode("",!0)])):(t.openBlock(),t.createBlock(a,{key:3,definition:l.definition,modelValue:e.model,"onUpdate:modelValue":n[1]||(n[1]=m=>e.model=m)},null,8,["definition","modelValue"]))],64)}var Z1=_(z1,[["render",K1],["__scopeId","data-v-a43e06e8"]]),LS="";const Y1={mixins:[H],props:{modelValue:{type:Boolean,default(){return!1}}},data(){return{value:this.modelValue}},watch:{modelValue(e,n){this.value=e,this.model=e}},computed:{longDescription(){return String(this.description).length>2},defaultValue(){return!1},model:{get(){return!!this.value},set(e){this.value=!!e,this.$emit("update:modelValue",this.value)}}}},X1={key:0,class:"ux-field-title"},J1={key:0,class:"ux-required-marker"},Q1={key:1,class:"ux-field-description"};function v1(e,n,r,i,l,o){const a=t.resolveComponent("ux-switch"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("flex-row");return t.openBlock(),t.createBlock(c,{onClick:n[1]||(n[1]=d=>e.touch()),gap:""},{default:t.withCtx(()=>[t.createVNode(s,{vcenter:"",shrink:""},{default:t.withCtx(()=>[t.createVNode(a,{value:o.model,onClick:n[0]||(n[0]=d=>o.model=!o.model)},null,8,["value"])]),_:1}),t.createVNode(s,{vcenter:""},{default:t.withCtx(()=>[t.createElementVNode("div",null,[e.showLabel?(t.openBlock(),t.createElementBlock("label",X1,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",J1,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Q1,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0)])]),_:1})]),_:1})}var eb=_(Y1,[["render",v1],["__scopeId","data-v-5994d322"]]),US="";const tb={props:{multiple:{type:Boolean},accept:{type:String}},data(){return{over:!1}},methods:{clicked(){this.multiple||(this.$refs.file.value=null),this.$refs.file.click()},fileout(e){this.over=!0},fileover(e){this.over=!0},filedrop(e){const n=this;e.dataTransfer&&e.dataTransfer.files&&e.dataTransfer.files.length&&(e.preventDefault(),e.stopPropagation(),n.filesSelected(e.dataTransfer.files))},filesSelected(e){console.log("FILES SELECTED",e);var n=[];for(var r in[...e]){var i=e[r];n.push({file:i,data:{},name:i.name,size:i.size,state:""})}this.$emit("files",n)}}},nb=["accept","multiple"];function rb(e,n,r,i,l,o){const a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("label",{class:t.normalizeClass(["file-drop",{over:l.over}]),onDragover:n[2]||(n[2]=t.withModifiers((...s)=>o.fileover&&o.fileover(...s),["prevent","stop"])),onDragleave:n[3]||(n[3]=t.withModifiers((...s)=>o.fileout&&o.fileout(...s),["prevent","stop"])),onDrop:n[4]||(n[4]=t.withModifiers((...s)=>o.filedrop&&o.filedrop(...s),["prevent","stop"]))},[t.createElementVNode("input",{ref:"file",accept:r.accept,type:"file",multiple:r.multiple,onChange:n[0]||(n[0]=s=>o.filesSelected(s.target.files))},null,40,nb),t.createElementVNode("div",{class:"file-drop-ux",onClick:n[1]||(n[1]=(...s)=>o.clicked&&o.clicked(...s))},[t.renderSlot(e.$slots,"default",{},()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createTextVNode("Select Files")]),_:1})],!0)])],34)}var Na=_(tb,[["render",rb],["__scopeId","data-v-1960a794"]]),PS="";const ob={mixins:[H],components:{FileDrop:Na},props:{},data(){return{files:[],bytesUploaded:0,state:"ready"}},methods:{filesize(e){return this.$sdk.files.filesize(e)},remove(e){var n=this,r=n.files[e];r.cancelToken&&r.cancelToken.cancel("Operation canceled by the user."),n.files.splice(e,1),console.log("Map to values",n.files),n.mapFilesToValues()},upload(e){var n=this;switch(e.state){case"complete":case"processing":return}e.state="processing";var r=new FormData,i={};i.attachment=!0,i.form=n.$sdk.utils.id(n.form),i.fieldPath=n.fieldPath,r.append("json",JSON.stringify(i)),r.append("file",e.file,e.name);var l={headers:{"Content-Type":"multipart/form-data"},onUploadProgress:c=>{let d=Math.floor(c.loaded*100/c.total);e.progress=d,e.bytesUploaded=c.loaded,e.bytesTotal=c.total,n.bytesUploaded=n.files.reduce(function(u,m){return m.state=="complete"?u+=m.size||m.bytesTotal||0:u+=m.bytesUploaded||0,u},0)}};const a=n.$sdk.api.CancelToken.source();l.cancelToken=a.token,e.cancelToken=a,l.headers={"Content-Type":void 0};let s="/file/upload";return n.$sdk.fileAPI&&(s=`${n.$sdk.fileAPI}${s}`),n.$sdk.api.post(s,r,l).then(function(c){e.state="complete",e.result=c.data,e.cancelToken=null,n.uploadNextFile()}).catch(function(c){e.state="error",e.cancelToken=null,n.uploadNextFile()})},uploadNextFile(){var e=this;e.state="uploading";var n=e.files.find(function(r){switch(r.state){case"complete":case"error":return;default:return!0}});n?e.upload(n):e.state="ready",e.mapFilesToValues()},mapFilesToValues(){var e=this;if(e.multiValue)e.model=e.files.map(function(r){return r.result});else{var n=e.files[0];if(!n)return e.model=void 0;e.model=n.result}console.log("NEW MODEL",e.model)},fileover(e){},filedrop(e){},filesSelected(e){return this.touch(),console.log("FILES SELECTED",e),this.multiValue?this.files=[...this.files,...e]:this.files=e,this.uploadNextFile()}},computed:{}},ib={key:0,class:"ux-field-title"},lb={key:0,class:"ux-required-marker"},ab={key:1,class:"ux-field-description"},sb={key:2,class:"files"},cb={class:"size"};function db(e,n,r,i,l,o){const a=t.resolveComponent("progress-bar"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button"),u=t.resolveComponent("flex-row"),m=t.resolveComponent("file-drop");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.showLabel?(t.openBlock(),t.createElementBlock("label",ib,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",lb,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",ab,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),l.files&&l.files.length?(t.openBlock(),t.createElementBlock("div",sb,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.files,(f,p)=>(t.openBlock(),t.createElementBlock("div",{class:"file-item",key:p},[t.createVNode(u,null,{default:t.withCtx(()=>[t.createVNode(s,null,{default:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(f.name),1),t.createElementVNode("div",cb,t.toDisplayString(o.filesize(f.size)),1),t.createVNode(a,{value:f.progress},null,8,["value"])]),_:2},1024),t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{icon:"",onClick:y=>o.remove(p)},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-times"})]),_:2},1032,["onClick"])]),_:2},1024)]),_:2},1024)]))),128))])):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[e.canAddValue?(t.openBlock(),t.createBlock(m,{key:0,multiple:e.multiValue,onFiles:o.filesSelected},{default:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createTextVNode("Select Files")]),_:1})]),_:1},8,["multiple","onFiles"])):t.createCommentVNode("",!0)],64)):(t.openBlock(),t.createBlock(m,{key:4,onFiles:o.filesSelected},{default:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createTextVNode("Select File")]),_:1})]),_:1},8,["onFiles"]))],64)}var ub=_(ob,[["render",db],["__scopeId","data-v-397fdaa7"]]),jS="";const mb={mixins:[H],components:{draggable:ga},props:{submission:{type:Boolean,default:!1},includeOfficeOnly:{type:Boolean,default:!1},modelValue:{type:[Object,Array]},trail:{type:Array,default(){return[]}}},data(){return{drag:!1}},created(){},computed:{groupKey(){return`${this.field.key}-order`},collapsible(){return this.field.collapsible},showLabel(){return this.field.showLabel},reorderable(){return this.multiValue&&this.field.reorderable},sameLine(){return this.field.sameLine}},methods:{createSingleObject(){this.model={}},stateChange(e){this.$emit("form:state",e)},multiLabel(e,n){return e.title?e.title:e.name?e.name:e.firstName?e.firstName:`${this.label} ${n+1}`},enterPress(e){this.canAddValue&&(e.stopImmediatePropagation(),e.preventDefault(),this.add())},refocus(){this.$nextTick(function(){var e=this.$refs.row,n=e[e.length-1];if(!!n){var r=n.$el.querySelector(".ux-field-focus");!r||r.focus()}})},getNewDefaultEntry(){return{}}}},fb={key:0,class:"ux-multi-group"},pb={key:0,class:"ux-group-title"},hb={key:0,class:"ux-field-title"},yb={key:0,class:"ux-required-marker"},gb={key:1,class:"ux-field-description"},_b={key:0,class:"ux-single-group"},kb={class:"ux-group-title"},bb={key:0,class:"ux-field-title"},xb={key:1,class:"ux-field-description"};function Cb(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-button"),d=t.resolveComponent("flex-row"),u=t.resolveComponent("ux-panel-header"),m=t.resolveComponent("ux-form"),f=t.resolveComponent("ux-panel-body"),p=t.resolveComponent("ux-panel"),y=t.resolveComponent("draggable");return e.multiValue?(t.openBlock(),t.createElementBlock("div",fb,[o.showLabel?(t.openBlock(),t.createElementBlock("div",pb,[o.showLabel?(t.openBlock(),t.createElementBlock("label",hb,[t.createTextVNode(t.toDisplayString(e.plural||e.title)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",yb,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",gb,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),o.reorderable?(t.openBlock(),t.createBlock(y,{key:1,modelValue:e.model,"onUpdate:modelValue":n[1]||(n[1]=h=>e.model=h),group:o.groupKey,onStart:n[2]||(n[2]=h=>l.drag=!0),onEnd:n[3]||(n[3]=h=>l.drag=!1)},{item:t.withCtx(({element:h,index:A})=>[t.createVNode(p,{ref:"row"},{default:t.withCtx(()=>[t.createVNode(u,null,{default:t.withCtx(()=>[t.createVNode(d,{vcenter:"",gap:""},{default:t.withCtx(()=>[o.reorderable?(t.openBlock(),t.createBlock(s,{key:0,class:"arrows",shrink:""},{default:t.withCtx(()=>[t.createVNode(a,{left:"",icon:"fa-arrows"})]),_:1})):t.createCommentVNode("",!0),t.createVNode(s,{vcenter:""},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createElementVNode("strong",null,t.toDisplayString(o.multiLabel(h,A)),1)])]),_:2},1024),o.collapsible?(t.openBlock(),t.createBlock(s,{key:1,shrink:""},{default:t.withCtx(()=>[t.createVNode(c,{size:"xs",tag:"a",onClick:I=>h.collapsed=!h.collapsed},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h.collapsed?"More":"Less")+" ",1),t.createVNode(a,{right:"",icon:h.collapsed?"fa-angle-down":"fa-angle-up"},null,8,["icon"])]),_:2},1032,["onClick"])]),_:2},1024)):t.createCommentVNode("",!0),t.createVNode(s,{vcenter:"",shrink:""},{default:t.withCtx(()=>[e.canRemoveValue?(t.openBlock(),t.createBlock(c,{key:0,icon:"",tag:"a",onClick:I=>e.remove(h)},{default:t.withCtx(()=>[t.createVNode(a,{icon:"fa-times"})]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024)]),_:2},1024),t.withDirectives(t.createVNode(f,{onKeydown:n[0]||(n[0]=t.withKeys(I=>o.enterPress(I),["enter"]))},{default:t.withCtx(()=>[t.createVNode(m,{trail:r.trail,ref:"form",includeOfficeOnly:r.includeOfficeOnly,submission:r.submission,"onForm:state":o.stateChange,parentModel:e.parentModel,modelValue:e.model[A],"onUpdate:modelValue":I=>e.model[A]=I,flex:o.sameLine,fields:e.field.fields},null,8,["trail","includeOfficeOnly","submission","onForm:state","parentModel","modelValue","onUpdate:modelValue","flex","fields"])]),_:2},1536),[[t.vShow,!o.collapsible||!h.collapsed]])]),_:2},1536)]),_:1},8,["modelValue","group"])):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:2},t.renderList(e.model,(h,A)=>(t.openBlock(),t.createBlock(p,{ref_for:!0,ref:"row"},{default:t.withCtx(()=>[t.createVNode(u,null,{default:t.withCtx(()=>[t.createVNode(d,{vcenter:"",gap:""},{default:t.withCtx(()=>[o.reorderable?(t.openBlock(),t.createBlock(s,{key:0,shrink:""},{default:t.withCtx(()=>[t.createVNode(a,{icon:"fa-arrows"})]),_:1})):t.createCommentVNode("",!0),t.createVNode(s,{vcenter:""},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createElementVNode("strong",null,t.toDisplayString(o.multiLabel(h,A)),1)])]),_:2},1024),o.collapsible?(t.openBlock(),t.createBlock(s,{key:1,shrink:""},{default:t.withCtx(()=>[t.createVNode(c,{size:"xs",tag:"a",onClick:I=>h.collapsed=!h.collapsed},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h.collapsed?"More":"Less")+" ",1),t.createVNode(a,{right:"",icon:h.collapsed?"fa-angle-down":"fa-angle-up"},null,8,["icon"])]),_:2},1032,["onClick"])]),_:2},1024)):t.createCommentVNode("",!0),t.createVNode(s,{vcenter:"",shrink:""},{default:t.withCtx(()=>[e.canRemoveValue?(t.openBlock(),t.createBlock(c,{key:0,icon:"",tag:"a",onClick:I=>e.remove(h)},{default:t.withCtx(()=>[t.createVNode(a,{icon:"fa-times"})]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024)]),_:2},1024),t.withDirectives(t.createVNode(f,{onKeydown:n[4]||(n[4]=t.withKeys(I=>o.enterPress(I),["enter"]))},{default:t.withCtx(()=>[t.createVNode(m,{ref_for:!0,ref:"form",trail:r.trail,includeOfficeOnly:r.includeOfficeOnly,submission:r.submission,"onForm:state":o.stateChange,parentModel:e.parentModel,modelValue:e.model[A],"onUpdate:modelValue":I=>e.model[A]=I,flex:o.sameLine,fields:e.field.fields},null,8,["trail","includeOfficeOnly","submission","onForm:state","parentModel","modelValue","onUpdate:modelValue","flex","fields"])]),_:2},1536),[[t.vShow,!h.collapsed]])]),_:2},1536))),256)),e.canAddValue?(t.openBlock(),t.createBlock(c,{key:3,onClick:n[5]||(n[5]=h=>e.add())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.addLabel)+" ",1),t.createVNode(a,{icon:"fa-plus",right:""})]),_:1})):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.widget==="form"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.model?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.minimum===0?(t.openBlock(),t.createBlock(p,{key:0},{default:t.withCtx(()=>[t.createVNode(u,null,{default:t.withCtx(()=>[t.createVNode(d,{vcenter:"",gap:""},{default:t.withCtx(()=>[t.createVNode(s,{vcenter:""},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createElementVNode("strong",null,t.toDisplayString(e.label),1)])]),_:1}),t.createVNode(s,{vcenter:"",shrink:""},{default:t.withCtx(()=>[t.createVNode(c,{icon:"",tag:"a",onClick:n[6]||(n[6]=h=>e.model=void 0)},{default:t.withCtx(()=>[t.createVNode(a,{icon:"fa-times"})]),_:1})]),_:1})]),_:1})]),_:1}),t.createVNode(f,null,{default:t.withCtx(()=>[t.createVNode(m,{ref:"form",trail:r.trail,includeOfficeOnly:r.includeOfficeOnly,submission:r.submission,"onForm:state":o.stateChange,parentModel:e.parentModel,modelValue:e.model,"onUpdate:modelValue":n[7]||(n[7]=h=>e.model=h),flex:o.sameLine,fields:e.field.fields},null,8,["trail","includeOfficeOnly","submission","onForm:state","parentModel","modelValue","flex","fields"])]),_:1})]),_:1})):(t.openBlock(),t.createBlock(m,{key:1,ref:"form",trail:r.trail,includeOfficeOnly:r.includeOfficeOnly,submission:r.submission,"onForm:state":o.stateChange,parentModel:e.parentModel,modelValue:e.model,"onUpdate:modelValue":n[8]||(n[8]=h=>e.model=h),flex:o.sameLine,fields:e.field.fields},null,8,["trail","includeOfficeOnly","submission","onForm:state","parentModel","modelValue","flex","fields"]))],64)):(t.openBlock(),t.createBlock(c,{key:1,onClick:n[9]||(n[9]=h=>o.createSingleObject())},{default:t.withCtx(()=>[t.createTextVNode("Add "+t.toDisplayString(e.label)+" ",1),t.createVNode(a,{icon:"fa-plus",right:""})]),_:1}))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[o.showLabel?(t.openBlock(),t.createElementBlock("div",_b,[t.createElementVNode("div",kb,[o.showLabel?(t.openBlock(),t.createElementBlock("label",bb,t.toDisplayString(e.title),1)):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",xb,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0)]),t.createVNode(p,null,{default:t.withCtx(()=>[t.createVNode(f,null,{default:t.withCtx(()=>[t.createVNode(m,{ref:"form",trail:r.trail,includeOfficeOnly:r.includeOfficeOnly,submission:r.submission,"onForm:state":o.stateChange,parentModel:e.parentModel,modelValue:e.model,"onUpdate:modelValue":n[10]||(n[10]=h=>e.model=h),flex:o.sameLine,fields:e.field.fields},null,8,["trail","includeOfficeOnly","submission","onForm:state","parentModel","modelValue","flex","fields"])]),_:1})]),_:1})])):(t.openBlock(),t.createBlock(m,{key:1,ref:"form",trail:r.trail,includeOfficeOnly:r.includeOfficeOnly,submission:r.submission,"onForm:state":o.stateChange,parentModel:e.parentModel,modelValue:e.model,"onUpdate:modelValue":n[11]||(n[11]=h=>e.model=h),flex:o.sameLine,fields:e.field.fields},null,8,["trail","includeOfficeOnly","submission","onForm:state","parentModel","modelValue","flex","fields"]))],64))],64))}var wb=_(mb,[["render",Cb],["__scopeId","data-v-66c6137b"]]);const Vb={props:{option:{required:!0}},computed:{plainValue(){return this.option._id||this.option.value||this.option}}};function Eb(e,n,r,i,l,o){return t.renderSlot(e.$slots,"default",{plainValue:o.plainValue},()=>[t.createElementVNode("pre",null,t.toDisplayString(r.option),1)])}var Bb=_(Vb,[["render",Eb]]),RS="";function Sb(e){return e===void 0||typeof e=="undefined"||e===null||String(e)==="null"||String(e)==="undefined"}const Nb={components:{OptionSlot:Bb},props:{modelValue:{}},mixins:[H],created(){this.model=this.model},methods:{select(e){var n=this;n.multiValue?n.model=[...n.model,e]:n.model=e},deselect(e){var n=this;if(this.multiValue){var r=this.model.slice(),i=r.indexOf(e);i!=-1&&(r.splice(i,1),this.model=r)}else n.getValue(this.model)==e?this.model=void 0:this.model=e},toggle(e){this.selectionHash[e]?this.deselect(e):this.select(e),this.touch()},model:{get(){return this.cleanOutput(this.value)},set(e){this.value=this.cleanInput(e),this.dispatch()}},cleanOutput(e){var n=this;return Sb(e)?n.multiValue?e=[]:e=void 0:n.multiValue?e=(e||[]).map(function(r){return n.getValue(r)}):e=n.getValue(e),e},cleanInput(e){var n=this;if(n.multiValue)e||(e=[]),Array.isArray(e)||(e=[e]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum),e=e.map(function(i){var l=n.getValue(i);return n.returnObject?n.optionLookup[l]:l});else{var r=n.getValue(e);e=n.returnObject?n.optionLookup[r]:r}return e}},computed:{selectionHash(){var e={};return this.model&&(this.multiValue?this.model.forEach(function(n){e[n]=!0}):e[this.model]=!0),console.log("change hash"),e},returnObject(){return this.type=="reference"},summary(){return this.getLabel(this.optionLookup[this.model])||"Click to select"}}},Tb={key:0,class:"ux-field-title"},Ob={key:0,class:"ux-required-marker"},Db={key:1,class:"ux-field-description"},Ab={class:"buttons"};function Mb(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon"),s=t.resolveComponent("ux-button"),c=t.resolveComponent("option-slot");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.showLabel?(t.openBlock(),t.createElementBlock("label",Tb,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Ob,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Db,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),t.createElementVNode("div",Ab,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.selectableOptions,d=>(t.openBlock(),t.createBlock(c,{option:d},{default:t.withCtx(({plainValue:u})=>[t.createVNode(s,{class:t.normalizeClass({active:o.selectionHash[u]}),onClick:m=>o.toggle(u)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.getLabel(d))+" ",1),t.createVNode(a,{icon:"fa-check",right:""})]),_:2},1032,["class","onClick"])]),_:2},1032,["option"]))),256))])],64)}var Fb=_(Nb,[["render",Mb],["__scopeId","data-v-f0acfde4"]]),zS="";const Ib={props:{modelValue:{type:Object}},mixins:[H],computed:{},methods:{getNewDefaultEntry(){return{}}}},$b={key:0,class:"ux-field-title"},Lb={key:0,class:"ux-required-marker"},Ub={key:1,class:"ux-field-description"},Pb={key:2},jb={key:3};function Rb(e,n,r,i,l,o){const a=t.resolveComponent("flex-cell"),s=t.resolveComponent("ux-icon"),c=t.resolveComponent("ux-button"),d=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.showLabel?(t.openBlock(),t.createElementBlock("label",$b,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Lb,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Ub,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",Pb,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.model,(u,m)=>(t.openBlock(),t.createBlock(d,{class:"ux-text-row",key:m},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createElementVNode("pre",null,t.toDisplayString(u),1)]),_:2},1024),t.createVNode(a,{shrink:"",vcenter:""},{default:t.withCtx(()=>[e.canRemoveValue?(t.openBlock(),t.createBlock(c,{key:0,tag:"a",icon:"",onClick:f=>e.remove(u)},{default:t.withCtx(()=>[t.createVNode(s,{icon:"fa-times"})]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),128)),e.canAddValue?(t.openBlock(),t.createBlock(c,{key:0,onClick:n[0]||(n[0]=u=>e.add())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.addLabel)+" ",1),t.createVNode(s,{icon:"fa-plus",right:""})]),_:1})):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("pre",jb,t.toDisplayString(e.model),1))],64)}var zb=_(Ib,[["render",Rb],["__scopeId","data-v-6b3fc2f2"]]),qS="";const qb={props:{modelValue:{type:[String,Array]}},mixins:[H],computed:{lazy(){switch(this.type){case"integer":case"number":case"decimal":case"float":case"url":case"key":return!0}},actualPlaceholder(){if(this.field.placeholder)return this.field.placeholder;switch(this.type){case"integer":case"number":case"decimal":case"float":return"0";case"url":return"https://www.website.com";case"email":return"you@youremail.com"}},addLabel(){return this.numValues?"Add another option":"Add options"}},methods:{titleBlurred(e){var n;this.multiValue?n=this.model[e]:n=this.model,n.title!==n.value&&delete n.pristine},valueTouched(e){var n;this.multiValue?n=this.model[e]:n=this.model,delete n.pristine,this.touch()},entryTitleChanged(e){this.$nextTick(function(){var n;this.multiValue?n=this.model[e]:n=this.model,n.pristine&&(n.value=n.title)})},cleanOutputValue(e){return e.value=this.cleanTextInput(e.value,this.type,this),e},cleanInputValue(e){return e.value=this.cleanTextInput(e.value,this.type,this),e},getNewDefaultEntry(){return{pristine:!0}}}},tr=e=>(t.pushScopeId("data-v-076c3da8"),e=e(),t.popScopeId(),e),Hb={key:0,class:"ux-field-title"},Gb={key:0,class:"ux-required-marker"},Wb={key:1,class:"ux-field-description"},Kb={key:2},Zb={class:"ux-text-wrap prefixed"},Yb=tr(()=>t.createElementVNode("span",{class:"ux-text-prefix"},"Label",-1)),Xb=["onBlur","on:update:modelValue","onUpdate:modelValue"],Jb=["onBlur","on:update:modelValue","onUpdate:modelValue"],Qb={class:"ux-text-wrap prefixed"},vb=tr(()=>t.createElementVNode("span",{class:"ux-text-prefix"},"Value",-1)),ex=["onFocus","onUpdate:modelValue"],tx=["onFocus","onUpdate:modelValue"],nx={class:"ux-text-wrap prefixed"},rx=tr(()=>t.createElementVNode("span",{class:"ux-text-prefix"},"Label",-1)),ox={class:"ux-text-wrap prefixed"},ix=tr(()=>t.createElementVNode("span",{class:"ux-text-prefix"},"Value",-1));function lx(e,n,r,i,l,o){const a=t.resolveComponent("flex-cell"),s=t.resolveComponent("ux-icon"),c=t.resolveComponent("ux-button"),d=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock(t.Fragment,null,[e.showLabel?(t.openBlock(),t.createElementBlock("label",Hb,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Gb,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Wb,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",Kb,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.model,(u,m)=>(t.openBlock(),t.createBlock(d,{class:"ux-text-row",key:m},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createElementVNode("div",Zb,[Yb,o.lazy?t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:0,class:"ux-field-focus ux-text-input-multiple",placeholder:"Label",onFocus:n[0]||(n[0]=(...f)=>e.touch&&e.touch(...f)),ref_for:!0,ref:"input",onKeydown:n[1]||(n[1]=t.withKeys(t.withModifiers(f=>e.add(),["stop","prevent"]),["enter"])),onBlur:f=>o.titleBlurred(m),"on:update:modelValue":f=>o.entryTitleChanged(m),"onUpdate:modelValue":f=>e.model[m].title=f},null,40,Xb)),[[t.vModelText,e.model[m].title,void 0,{lazy:!0}]]):t.createCommentVNode("",!0),o.lazy?t.createCommentVNode("",!0):t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:1,class:"ux-field-focus ux-text-input-multiple",placeholder:"Label",onFocus:n[2]||(n[2]=(...f)=>e.touch&&e.touch(...f)),ref_for:!0,ref:"input",onKeydown:n[3]||(n[3]=t.withKeys(t.withModifiers(f=>e.add(),["stop","prevent"]),["enter"])),onBlur:f=>o.titleBlurred(m),"on:update:modelValue":f=>o.entryTitleChanged(m),"onUpdate:modelValue":f=>e.model[m].title=f},null,40,Jb)),[[t.vModelText,e.model[m].title]])])]),_:2},1024),t.createVNode(a,null,{default:t.withCtx(()=>[t.createElementVNode("div",Qb,[vb,o.lazy?t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:0,class:"ux-field-focus ux-text-input-multiple",placeholder:"Value",onFocus:f=>o.valueTouched(m),ref_for:!0,ref:"valueInput",onKeydown:n[4]||(n[4]=t.withKeys(t.withModifiers(f=>e.add(),["stop","prevent"]),["enter"])),"onUpdate:modelValue":f=>e.model[m].value=f},null,40,ex)),[[t.vModelText,e.model[m].value,void 0,{lazy:!0}]]):t.createCommentVNode("",!0),o.lazy?t.createCommentVNode("",!0):t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:1,class:"ux-field-focus ux-text-input-multiple",placeholder:"Value",onFocus:f=>o.valueTouched(m),ref_for:!0,ref:"valueInput",onKeydown:n[5]||(n[5]=t.withKeys(t.withModifiers(f=>e.add(),["stop","prevent"]),["enter"])),"onUpdate:modelValue":f=>e.model[m].value=f},null,40,tx)),[[t.vModelText,e.model[m].value]])])]),_:2},1024),t.createVNode(a,{shrink:"",vcenter:""},{default:t.withCtx(()=>[e.canRemoveValue?(t.openBlock(),t.createBlock(c,{key:0,tag:"a",icon:"",onClick:f=>e.remove(u)},{default:t.withCtx(()=>[t.createVNode(s,{icon:"fa-times"})]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),128)),e.canAddValue?(t.openBlock(),t.createBlock(c,{key:0,onClick:n[6]||(n[6]=u=>e.add())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.addLabel)+" ",1),t.createVNode(s,{icon:"fa-plus",right:""})]),_:1})):t.createCommentVNode("",!0)])):(t.openBlock(),t.createBlock(d,{key:3,class:"ux-text-row"},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createElementVNode("div",nx,[rx,o.lazy?t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:0,class:"ux-field-focus ux-text-input-multiple",placeholder:"Label",onFocus:n[7]||(n[7]=(...u)=>e.touch&&e.touch(...u)),ref:"input",onKeydown:n[8]||(n[8]=t.withKeys(t.withModifiers(u=>e.add(),["stop","prevent"]),["enter"])),onBlur:n[9]||(n[9]=u=>o.titleBlurred(e.index)),"on:update:modelValue":n[10]||(n[10]=(...u)=>o.entryTitleChanged&&o.entryTitleChanged(...u)),"onUpdate:modelValue":n[11]||(n[11]=u=>e.model.title=u)},null,544)),[[t.vModelText,e.model.title,void 0,{lazy:!0}]]):t.createCommentVNode("",!0),o.lazy?t.createCommentVNode("",!0):t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:1,class:"ux-field-focus ux-text-input-multiple",placeholder:"Label",onFocus:n[12]||(n[12]=(...u)=>e.touch&&e.touch(...u)),ref:"input",onKeydown:n[13]||(n[13]=t.withKeys(t.withModifiers(u=>e.add(),["stop","prevent"]),["enter"])),onBlur:n[14]||(n[14]=u=>o.titleBlurred(e.index)),"on:update:modelValue":n[15]||(n[15]=(...u)=>o.entryTitleChanged&&o.entryTitleChanged(...u)),"onUpdate:modelValue":n[16]||(n[16]=u=>e.model.title=u)},null,544)),[[t.vModelText,e.model.title]])])]),_:1}),t.createVNode(a,null,{default:t.withCtx(()=>[t.createElementVNode("div",ox,[ix,o.lazy?t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:0,class:"ux-field-focus ux-text-input-multiple",placeholder:"Value",onFocus:n[17]||(n[17]=(...u)=>o.valueTouched&&o.valueTouched(...u)),ref:"valueInput",onKeydown:n[18]||(n[18]=t.withKeys(t.withModifiers(u=>e.add(),["stop","prevent"]),["enter"])),"onUpdate:modelValue":n[19]||(n[19]=u=>e.model.value=u)},null,544)),[[t.vModelText,e.model.value,void 0,{lazy:!0}]]):t.createCommentVNode("",!0),o.lazy?t.createCommentVNode("",!0):t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:1,class:"ux-field-focus ux-text-input-multiple",placeholder:"Value",onFocus:n[20]||(n[20]=(...u)=>o.valueTouched&&o.valueTouched(...u)),ref:"valueInput",onKeydown:n[21]||(n[21]=t.withKeys(t.withModifiers(u=>e.add(),["stop","prevent"]),["enter"])),"onUpdate:modelValue":n[22]||(n[22]=u=>e.model.value=u)},null,544)),[[t.vModelText,e.model.value]])])]),_:1})]),_:1}))],64)}var ax=_(qb,[["render",lx],["__scopeId","data-v-076c3da8"]]),HS="";const sx={components:{},methods:{editorInit(){},format(){if(typeof window!==void 0){var e=this.model;if(!!e){switch(this.lang){case"js":case"javascript":window.js_beautify&&(e=window.js_beautify(e));break;case"css":case"scss":window.css_beautify&&(e=window.css_beautify(e));break;case"html":window.html_beautify&&(e=window.html_beautify(e));break;default:return}console.log("Formatted"),this.model=e}}}},props:{modelValue:{type:String,default(){return""}},lang:{type:String},readonly:{type:Boolean}},watch:{modelValue(e){this.model=e},model(e){this.$emit("update:modelValue",e)}},async mounted(){this.mounted=!0,this.$sdk.global&&this.$sdk.global.injectScript&&(this.$sdk.global.injectScript("https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.5/beautify.min.js"),this.$sdk.global.injectScript("https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.5/beautify-css.min.js"),this.$sdk.global.injectScript("https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.5/beautify-html.min.js"))},data(){return{mounted:!1,model:this.modelValue}}};function cx(e,n,r,i,l,o){const a=t.resolveComponent("v-ace-editor"),s=t.resolveComponent("flex-column");return l.mounted?(t.openBlock(),t.createBlock(s,{key:0},{default:t.withCtx(()=>[t.createVNode(a,{onBlur:o.format,readonly:r.readonly,class:"editor-wrap",value:l.model,"onUpdate:value":n[0]||(n[0]=c=>l.model=c),options:{useWorker:!0},onInit:o.editorInit,lang:r.lang,theme:"tomorrow_night_eighties",style:{height:"300px"}},null,8,["onBlur","readonly","value","onInit","lang"])]),_:1})):t.createCommentVNode("",!0)}var Ta=_(sx,[["render",cx],["__scopeId","data-v-edf89936"]]),GS="";const dx={components:{CodeEditor:Ta},props:{modelValue:{type:[String,Array]}},computed:{syntax(){return this.field?this.field.syntax:"json"}},mixins:[H],methods:{enterPress(){},getNewDefaultEntry(){return""}}},ux={key:0,class:"ux-field-title"},mx={key:0,class:"ux-required-marker"},fx={key:1,class:"ux-field-description"},px={key:2},hx={class:"code-editor-field-wrap"},yx={key:3,class:"code-editor-field-wrap"};function gx(e,n,r,i,l,o){const a=t.resolveComponent("code-editor"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button"),u=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock("div",{onKeydown:n[2]||(n[2]=t.withKeys(t.withModifiers(m=>o.enterPress(m),["stop"]),["enter"]))},[e.showLabel?(t.openBlock(),t.createElementBlock("label",ux,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",mx,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",fx,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",px,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.model,(m,f)=>(t.openBlock(),t.createBlock(u,{class:"ux-text-row",key:f},{default:t.withCtx(()=>[t.createVNode(s,null,{default:t.withCtx(()=>[t.createElementVNode("div",hx,[t.createVNode(a,{lang:o.syntax,onFocus:e.touch,ref_for:!0,ref:"input",modelValue:e.model[f],"onUpdate:modelValue":p=>e.model[f]=p,class:"ux-code-editor ux-field-focus ux-text-area-multiple"},null,8,["lang","onFocus","modelValue","onUpdate:modelValue"])])]),_:2},1024),t.createVNode(s,{shrink:"",vcenter:""},{default:t.withCtx(()=>[e.canRemoveValue?(t.openBlock(),t.createBlock(d,{key:0,tag:"a",icon:"",onClick:p=>e.remove(m)},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-times"})]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),128)),e.canAddValue?(t.openBlock(),t.createBlock(d,{key:0,onClick:n[0]||(n[0]=m=>e.add())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.addLabel),1)]),_:1})):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",yx,[t.createVNode(a,{lang:o.syntax,class:"ux-code-editor ux-field-focus ux-text-area-single",onFocus:e.touch,modelValue:e.model,"onUpdate:modelValue":n[1]||(n[1]=m=>e.model=m)},null,8,["lang","onFocus","modelValue"])]))],32)}var _x=_(dx,[["render",gx],["__scopeId","data-v-67761240"]]),WS="";const kx={props:{modelValue:{type:[String,Array]}},mixins:[H],methods:{enterPress(){},getNewDefaultEntry(){return""}}},bx={key:0,class:"ux-field-title"},xx={key:0,class:"ux-required-marker"},Cx={key:1,class:"ux-field-description"},wx={key:2},Vx={class:"expression-field-wrap"},Ex={key:3,class:"expression-field-wrap"};function Bx(e,n,r,i,l,o){const a=t.resolveComponent("expression-editor"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button"),u=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock("div",{onKeydown:n[2]||(n[2]=t.withKeys(t.withModifiers(m=>o.enterPress(m),["stop"]),["enter"]))},[e.showLabel?(t.openBlock(),t.createElementBlock("label",bx,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",xx,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Cx,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",wx,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.model,(m,f)=>(t.openBlock(),t.createBlock(u,{class:"ux-text-row",key:f},{default:t.withCtx(()=>[t.createVNode(s,null,{default:t.withCtx(()=>[t.createElementVNode("div",Vx,[t.createVNode(a,{field:e.field,onFocus:e.touch,ref_for:!0,ref:"input",modelValue:e.model[f],"onUpdate:modelValue":p=>e.model[f]=p,class:"ux-expression ux-field-focus ux-text-area-multiple"},null,8,["field","onFocus","modelValue","onUpdate:modelValue"])])]),_:2},1024),t.createVNode(s,{shrink:"",vcenter:""},{default:t.withCtx(()=>[e.canRemoveValue?(t.openBlock(),t.createBlock(d,{key:0,tag:"a",icon:"",onClick:p=>e.remove(m)},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-times"})]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),128)),e.canAddValue?(t.openBlock(),t.createBlock(d,{key:0,onClick:n[0]||(n[0]=m=>e.add())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.addLabel),1)]),_:1})):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",Ex,[t.createVNode(a,{field:e.field,class:"ux-expression ux-field-focus ux-text-area-single",onFocus:e.touch,modelValue:e.model,"onUpdate:modelValue":n[1]||(n[1]=m=>e.model=m)},null,8,["field","onFocus","modelValue"])]))],32)}var Sx=_(kx,[["render",Bx],["__scopeId","data-v-0e6b676c"]]),KS="";const Nx={components:{},methods:{},props:{modelValue:{type:String,default(){return""}},lang:{type:String}},watch:{modelValue(e){this.model=e},model(e){this.$emit("update:modelValue",e)}},mounted(){this.mounted=!0},beforeUnmount(){this.mounted=!1},data(){return{mounted:!1,model:this.modelValue}}};function Tx(e,n,r,i,l,o){const a=t.resolveComponent("tiptap"),s=t.resolveComponent("flex-column");return l.mounted?(t.openBlock(),t.createBlock(s,{key:0},{default:t.withCtx(()=>[t.createVNode(a,{modelValue:l.model,"onUpdate:modelValue":n[0]||(n[0]=c=>l.model=c),style:{height:"250px"}},null,8,["modelValue"])]),_:1})):t.createCommentVNode("",!0)}var Ox=_(Nx,[["render",Tx],["__scopeId","data-v-f1bfd246"]]),ZS="";const Dx={components:{richtext:Ox},props:{modelValue:{type:[String,Array]}},computed:{},mixins:[H],methods:{getNewDefaultEntry(){return""}}},Ax={key:0,class:"ux-field-title"},Mx={key:0,class:"ux-required-marker"},Fx={key:1,class:"ux-field-description"},Ix={key:2},$x={class:"richtext-field-wrap"},Lx={key:3,class:"richtext-field-wrap"};function Ux(e,n,r,i,l,o){const a=t.resolveComponent("richtext"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button"),u=t.resolveComponent("flex-row");return t.openBlock(),t.createElementBlock("div",null,[e.showLabel?(t.openBlock(),t.createElementBlock("label",Ax,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",Mx,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Fx,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.multiValue?(t.openBlock(),t.createElementBlock("div",Ix,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.model,(m,f)=>(t.openBlock(),t.createBlock(u,{class:"ux-text-row",key:f},{default:t.withCtx(()=>[t.createVNode(s,null,{default:t.withCtx(()=>[t.createElementVNode("div",$x,[t.createVNode(a,{onFocus:e.touch,ref_for:!0,ref:"input",modelValue:e.model[f],"onUpdate:modelValue":p=>e.model[f]=p,class:"ux-richtext ux-field-focus ux-text-area-multiple"},null,8,["onFocus","modelValue","onUpdate:modelValue"])])]),_:2},1024),t.createVNode(s,{shrink:"",vcenter:""},{default:t.withCtx(()=>[e.canRemoveValue?(t.openBlock(),t.createBlock(d,{key:0,tag:"a",icon:"",onClick:p=>e.remove(m)},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-times"})]),_:2},1032,["onClick"])):t.createCommentVNode("",!0)]),_:2},1024)]),_:2},1024))),128)),e.canAddValue?(t.openBlock(),t.createBlock(d,{key:0,onClick:n[0]||(n[0]=m=>e.add())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.addLabel),1)]),_:1})):t.createCommentVNode("",!0)])):(t.openBlock(),t.createElementBlock("div",Lx,[t.createVNode(a,{class:"ux-richtext ux-field-focus ux-text-area-single",onFocus:e.touch,modelValue:e.model,"onUpdate:modelValue":n[1]||(n[1]=m=>e.model=m)},null,8,["onFocus","modelValue"])]))])}var Px=_(Dx,[["render",Ux],["__scopeId","data-v-46ce3b2b"]]),YS="";function jx(e){return e===void 0||typeof e=="undefined"||e===null||String(e)==="null"||String(e)==="undefined"}const Rx={props:{title:{type:String},modelValue:{}},mixins:[H],created(){this.model=this.model},methods:{cleanOutput(e){var n=this;return jx(e)?n.multiValue?e=[]:e=void 0:n.multiValue?e=(e||[]).filter(Boolean).map(function(r){return n.getValue(r)}):e=n.getValue(e),e},cleanInput(e){var n=this;if(n.multiValue)e||(e=[]),Array.isArray(e)||(e=[e]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum),e=e.filter(Boolean).map(function(i){var l=n.getValue(i);return n.returnObject?n.optionLookup[l]:l});else{var r=n.getValue(e);e=n.returnObject?n.optionLookup[r]:r}return e}},computed:{interface(){var e=this.$sdk.global.editor;if(!!e)return e.model},returnObject(){return!1},classes(){var e=[];return this.multiValue?e.push("multiple"):e.push("single"),e},optionLookup(){var e=this;return e.actualOptions.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{})},summary(){return this.model?this.getLabel(this.optionLookup[this.model]):this.title||"Click to select"},actualOptions(){if(!this.interface)return[];var e=[];n(this.interface.routes);function n(r,i){i||(i=0),r.forEach(function(l){l.type!="folder"&&e.push({route:l,depth:i}),l.routes&&l.routes.length&&n(l.routes,i+1)})}return e.map(function({route:r,depth:i}){var l="-".repeat(i);return{title:`${l}${r.title}`,value:r.name}})},selectableOptions(){return this.actualOptions}}},zx={key:0,class:"ux-field-title"},qx={key:0,class:"ux-required-marker"},Hx={key:1,class:"ux-field-description"},Gx={key:2,class:"ui-select-button"},Wx=["multiple"],Kx={key:0,value:""},Zx=["value"];function Yx(e,n,r,i,l,o){const a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["native-select",o.classes])},[e.showLabel?(t.openBlock(),t.createElementBlock("label",zx,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",qx,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",Hx,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.singleValue?(t.openBlock(),t.createElementBlock("div",Gx,[t.renderSlot(e.$slots,"default",{},()=>[t.createVNode(a,{tag:"div"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1})],!0)])):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("select",{onFocus:n[0]||(n[0]=(...s)=>e.touch&&e.touch(...s)),multiple:e.multiValue,"onUpdate:modelValue":n[1]||(n[1]=s=>e.model=s)},[e.singleValue&&!e.minimum?(t.openBlock(),t.createElementBlock("option",Kx,"None")):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.selectableOptions,s=>(t.openBlock(),t.createElementBlock("option",{value:s.value},t.toDisplayString(s.title),9,Zx))),256))],40,Wx),[[t.vModelSelect,e.model]])],2)}var Xx=_(Rx,[["render",Yx],["__scopeId","data-v-7b06d646"]]),XS="";function Jx(e){return e===void 0||typeof e=="undefined"||e===null||String(e)==="null"||String(e)==="undefined"}const Qx={props:{title:{type:String},modelValue:{}},mixins:[H],created(){this.model=this.model},methods:{cleanOutput(e){var n=this;return Jx(e)?n.multiValue?e=[]:e=void 0:n.multiValue?e=(e||[]).filter(Boolean).map(function(r){return n.getValue(r)}):e=n.getValue(e),e},cleanInput(e){var n=this;if(n.multiValue)e||(e=[]),Array.isArray(e)||(e=[e]),n.maximum&&e.length>n.maximum&&(e.length=n.maximum),e=e.filter(Boolean).map(function(i){var l=n.getValue(i);return n.returnObject?n.optionLookup[l]:l});else{var r=n.getValue(e);e=n.returnObject?n.optionLookup[r]:r}return e}},computed:{interface(){var e=this.$sdk.global.editor;if(!!e)return e.model},returnObject(){return!1},classes(){var e=[];return this.multiValue?e.push("multiple"):e.push("single"),e},optionLookup(){var e=this;return e.actualOptions.reduce(function(n,r){const i=e.getValue(r);return n[i]=r,n},{})},summary(){return this.model?this.getLabel(this.optionLookup[this.model]):this.title||"Click to select"},actualOptions(){return this.interface?this.interface.menus.map(function(e){return{title:e.title,value:e.name}}):[]},selectableOptions(){return this.actualOptions}}},vx={key:0,class:"ux-field-title"},eC={key:0,class:"ux-required-marker"},tC={key:1,class:"ux-field-description"},nC={key:2,class:"ui-select-button"},rC=["multiple"],oC={key:0,value:""},iC=["value"];function lC(e,n,r,i,l,o){const a=t.resolveComponent("ux-button");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["native-select",o.classes])},[e.showLabel?(t.openBlock(),t.createElementBlock("label",vx,[t.createTextVNode(t.toDisplayString(e.label)+" ",1),e.required?(t.openBlock(),t.createElementBlock("span",eC,"*")):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),e.showDescription?(t.openBlock(),t.createElementBlock("div",tC,t.toDisplayString(e.description),1)):t.createCommentVNode("",!0),e.singleValue?(t.openBlock(),t.createElementBlock("div",nC,[t.renderSlot(e.$slots,"default",{},()=>[t.createVNode(a,{tag:"div"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.summary),1)]),_:1})],!0)])):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("select",{onFocus:n[0]||(n[0]=(...s)=>e.touch&&e.touch(...s)),multiple:e.multiValue,"onUpdate:modelValue":n[1]||(n[1]=s=>e.model=s)},[e.singleValue&&!e.minimum?(t.openBlock(),t.createElementBlock("option",oC,"None")):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.selectableOptions,s=>(t.openBlock(),t.createElementBlock("option",{value:s.value},t.toDisplayString(s.title),9,iC))),256))],40,rC),[[t.vModelSelect,e.model]])],2)}var aC=_(Qx,[["render",lC],["__scopeId","data-v-a04e9882"]]),lo={exports:{}};(function(e,n){(function(r){var i="Compound",l="Identifier",o="MemberExpression",a="Literal",s="ThisExpression",c="CallExpression",d="UnaryExpression",u="BinaryExpression",m="LogicalExpression",f="ConditionalExpression",p="ArrayExpression",y=46,h=44,A=39,I=34,z=40,q=41,Y=91,X=93,M=63,V=59,K=58,F=function(E,g){var qe=new Error(E+" at character "+g);throw qe.index=g,qe.description=E,qe},ge=!0,se={"-":ge,"!":ge,"~":ge,"+":ge},ce={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},me=function(E){var g=0,qe;for(var Ut in E)(qe=Ut.length)>g&&E.hasOwnProperty(Ut)&&(g=qe);return g},fe=me(se),Ce=me(ce),pe={true:!0,false:!1,null:null},w="this",ot=function(E){return ce[E]||0},rr=function(E,g,qe){var Ut=E==="||"||E==="&&"?m:u;return{type:Ut,operator:E,left:g,right:qe}},Lt=function(E){return E>=48&&E<=57},it=function(E){return E===36||E===95||E>=65&&E<=90||E>=97&&E<=122||E>=128&&!ce[String.fromCharCode(E)]},pn=function(E){return E===36||E===95||E>=65&&E<=90||E>=97&&E<=122||E>=48&&E<=57||E>=128&&!ce[String.fromCharCode(E)]},we=function(E){for(var g=0,qe=E.charAt,Ut=E.charCodeAt,_e=function(k){return qe.call(E,k)},J=function(k){return Ut.call(E,k)},hn=E.length,He=function(){for(var k=J(g);k===32||k===9||k===10||k===13;)k=J(++g)},Pt=function(){var k=CB(),S,L;if(He(),J(g)===M){if(g++,S=Pt(),S||F("Expected expression",g),He(),J(g)===K)return g++,L=Pt(),L||F("Expected expression",g),{type:f,test:k,consequent:S,alternate:L};F("Expected :",g)}else return k},gs=function(){He();for(var k=E.substr(g,Ce),S=k.length;S>0;){if(ce.hasOwnProperty(k)&&(!it(J(g))||g+k.length<E.length&&!pn(J(g+k.length))))return g+=S,k;k=k.substr(0,--S)}return!1},CB=function(){var k,S,L,G,_t,Ue,lt,jt,xs;if(Ue=or(),S=gs(),!S)return Ue;for(_t={value:S,prec:ot(S)},lt=or(),lt||F("Expected expression after "+S,g),G=[Ue,_t,lt];(S=gs())&&(L=ot(S),L!==0);){for(_t={value:S,prec:L},xs=S;G.length>2&&L<=G[G.length-2].prec;)lt=G.pop(),S=G.pop().value,Ue=G.pop(),k=rr(S,Ue,lt),G.push(k);k=or(),k||F("Expected expression after "+xs,g),G.push(_t,k)}for(jt=G.length-1,k=G[jt];jt>1;)k=rr(G[jt-1].value,G[jt-2],k),jt-=2;return k},or=function(){var k,S,L;if(He(),k=J(g),Lt(k)||k===y)return wB();if(k===A||k===I)return VB();if(k===Y)return SB();for(S=E.substr(g,fe),L=S.length;L>0;){if(se.hasOwnProperty(S)&&(!it(J(g))||g+S.length<E.length&&!pn(J(g+S.length))))return g+=L,{type:d,operator:S,argument:or(),prefix:!0};S=S.substr(0,--L)}return it(k)||k===z?EB():!1},wB=function(){for(var k="",S,L;Lt(J(g));)k+=_e(g++);if(J(g)===y)for(k+=_e(g++);Lt(J(g));)k+=_e(g++);if(S=_e(g),S==="e"||S==="E"){for(k+=_e(g++),S=_e(g),(S==="+"||S==="-")&&(k+=_e(g++));Lt(J(g));)k+=_e(g++);Lt(J(g-1))||F("Expected exponent ("+k+_e(g)+")",g)}return L=J(g),it(L)?F("Variable names cannot start with a number ("+k+_e(g)+")",g):L===y&&F("Unexpected period",g),{type:a,value:parseFloat(k),raw:k}},VB=function(){for(var k="",S=_e(g++),L=!1,G;g<hn;)if(G=_e(g++),G===S){L=!0;break}else if(G==="\\")switch(G=_e(g++),G){case"n":k+=`
|
|
7
|
-
`;break;case"r":k+="\r";break;case"t":k+=" ";break;case"b":k+="\b";break;case"f":k+="\f";break;case"v":k+="\v";break;default:k+=G}else k+=G;return L||F('Unclosed quote after "'+k+'"',g),{type:a,value:k,raw:S+k+S}},_s=function(){var k=J(g),S=g,L;for(it(k)?g++:F("Unexpected "+_e(g),g);g<hn&&(k=J(g),pn(k));)g++;return L=E.slice(S,g),pe.hasOwnProperty(L)?{type:a,value:pe[L],raw:L}:L===w?{type:s}:{type:l,name:L}},ks=function(k){for(var S,L=[],G,_t=!1,Ue=0;g<hn;)if(He(),S=J(g),S===k){_t=!0,g++,k===q&&Ue&&Ue>=L.length&&F("Unexpected token "+String.fromCharCode(k),g);break}else if(S===h){if(g++,Ue++,Ue!==L.length){if(k===q)F("Unexpected token ,",g);else if(k===X)for(var lt=L.length;lt<Ue;lt++)L.push(null)}}else G=Pt(),(!G||G.type===i)&&F("Expected comma",g),L.push(G);return _t||F("Expected "+String.fromCharCode(k),g),L},EB=function(){var k,S;for(k=J(g),k===z?S=BB():S=_s(),He(),k=J(g);k===y||k===Y||k===z;)g++,k===y?(He(),S={type:o,computed:!1,object:S,property:_s()}):k===Y?(S={type:o,computed:!0,object:S,property:Pt()},He(),k=J(g),k!==X&&F("Unclosed [",g),g++):k===z&&(S={type:c,arguments:ks(q),callee:S}),He(),k=J(g);return S},BB=function(){g++;var k=Pt();if(He(),J(g)===q)return g++,k;F("Unclosed (",g)},SB=function(){return g++,{type:p,elements:ks(X)}},ir=[],_o,bs;g<hn;)_o=J(g),_o===V||_o===h?g++:(bs=Pt())?ir.push(bs):g<hn&&F('Unexpected "'+_e(g)+'"',g);return ir.length===1?ir[0]:{type:i,body:ir}};we.version="0.3.5",we.toString=function(){return"JavaScript Expression Parser (JSEP) v"+we.version},we.addUnaryOp=function(E){return fe=Math.max(E.length,fe),se[E]=ge,this},we.addBinaryOp=function(E,g){return Ce=Math.max(E.length,Ce),ce[E]=g,this},we.addLiteral=function(E,g){return pe[E]=g,this},we.removeUnaryOp=function(E){return delete se[E],E.length===fe&&(fe=me(se)),this},we.removeAllUnaryOps=function(){return se={},fe=0,this},we.removeBinaryOp=function(E){return delete ce[E],E.length===Ce&&(Ce=me(ce)),this},we.removeAllBinaryOps=function(){return ce={},Ce=0,this},we.removeLiteral=function(E){return delete pe[E],this},we.removeAllLiterals=function(){return pe={},this},e.exports?n=e.exports=we:n.parse=we})()})(lo,lo.exports);var sC=lo.exports,Oa={"||":function(e,n){return e||n},"&&":function(e,n){return e&&n},"|":function(e,n){return e|n},"^":function(e,n){return e^n},"&":function(e,n){return e&n},"==":function(e,n){return e==n},"!=":function(e,n){return e!=n},"===":function(e,n){return e===n},"!==":function(e,n){return e!==n},"<":function(e,n){return e<n},">":function(e,n){return e>n},"<=":function(e,n){return e<=n},">=":function(e,n){return e>=n},"<<":function(e,n){return e<<n},">>":function(e,n){return e>>n},">>>":function(e,n){return e>>>n},"+":function(e,n){return e+n},"-":function(e,n){return e-n},"*":function(e,n){return e*n},"/":function(e,n){return e/n},"%":function(e,n){return e%n}},cC={"-":function(e){return-e},"+":function(e){return+e},"~":function(e){return~e},"!":function(e){return!e}};function Da(e,n){return e.map(function(r){return ae(r,n)})}function Aa(e,n){var r,i=ae(e.object,n);if(r=e.computed?ae(e.property,n):e.property.name,/^__proto__|prototype|constructor$/.test(r))throw Error('Access to member "'+r+'" disallowed.');return[i,i[r]]}function ae(e,n){var r=e;switch(r.type){case"ArrayExpression":return Da(r.elements,n);case"BinaryExpression":return Oa[r.operator](ae(r.left,n),ae(r.right,n));case"CallExpression":var i,l,o;return r.callee.type==="MemberExpression"?(i=(o=Aa(r.callee,n))[0],l=o[1]):l=ae(r.callee,n),typeof l!="function"?void 0:l.apply(i,Da(r.arguments,n));case"ConditionalExpression":return ae(r.test,n)?ae(r.consequent,n):ae(r.alternate,n);case"Identifier":return n[r.name];case"Literal":return r.value;case"LogicalExpression":return r.operator==="||"?ae(r.left,n)||ae(r.right,n):r.operator==="&&"?ae(r.left,n)&&ae(r.right,n):Oa[r.operator](ae(r.left,n),ae(r.right,n));case"MemberExpression":return Aa(r,n)[1];case"ThisExpression":return n;case"UnaryExpression":return cC[r.operator](ae(r.argument,n));default:return}}function dC(e,n,r,i){for(var l=e.length,o=r+(i?1:-1);i?o--:++o<l;)if(n(e[o],o,e))return o;return-1}var uC=dC;function mC(e){return e!==e}var fC=mC;function pC(e,n,r){for(var i=r-1,l=e.length;++i<l;)if(e[i]===n)return i;return-1}var hC=pC,yC=uC,gC=fC,_C=hC;function kC(e,n,r){return n===n?_C(e,n,r):yC(e,gC,r)}var bC=kC,xC=9007199254740991;function CC(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=xC}var Ma=CC,wC=Uo,VC=Ma;function EC(e){return e!=null&&VC(e.length)&&!wC(e)}var Fa=EC,BC=Ht,SC=Rt,NC=Gt,TC="[object String]";function OC(e){return typeof e=="string"||!SC(e)&&NC(e)&&BC(e)==TC}var DC=OC,AC=Ea,Ia=1/0,MC=17976931348623157e292;function FC(e){if(!e)return e===0?e:0;if(e=AC(e),e===Ia||e===-Ia){var n=e<0?-1:1;return n*MC}return e===e?e:0}var IC=FC,$C=IC;function LC(e){var n=$C(e),r=n%1;return n===n?r?n-r:n:0}var UC=LC,PC=Ho;function jC(e,n){return PC(n,function(r){return e[r]})}var RC=jC;function zC(e,n){for(var r=-1,i=Array(e);++r<e;)i[r]=n(r);return i}var qC=zC,HC=Ht,GC=Gt,WC="[object Arguments]";function KC(e){return GC(e)&&HC(e)==WC}var ZC=KC,$a=ZC,YC=Gt,La=Object.prototype,XC=La.hasOwnProperty,JC=La.propertyIsEnumerable,QC=$a(function(){return arguments}())?$a:function(e){return YC(e)&&XC.call(e,"callee")&&!JC.call(e,"callee")},vC=QC,ao={exports:{}};function e0(){return!1}var t0=e0;(function(e,n){var r=zt,i=t0,l=n&&!n.nodeType&&n,o=l&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===l,s=a?r.Buffer:void 0,c=s?s.isBuffer:void 0,d=c||i;e.exports=d})(ao,ao.exports);var n0=9007199254740991,r0=/^(?:0|[1-9]\d*)$/;function o0(e,n){var r=typeof e;return n=n==null?n0:n,!!n&&(r=="number"||r!="symbol"&&r0.test(e))&&e>-1&&e%1==0&&e<n}var i0=o0,l0=Ht,a0=Ma,s0=Gt,c0="[object Arguments]",d0="[object Array]",u0="[object Boolean]",m0="[object Date]",f0="[object Error]",p0="[object Function]",h0="[object Map]",y0="[object Number]",g0="[object Object]",_0="[object RegExp]",k0="[object Set]",b0="[object String]",x0="[object WeakMap]",C0="[object ArrayBuffer]",w0="[object DataView]",V0="[object Float32Array]",E0="[object Float64Array]",B0="[object Int8Array]",S0="[object Int16Array]",N0="[object Int32Array]",T0="[object Uint8Array]",O0="[object Uint8ClampedArray]",D0="[object Uint16Array]",A0="[object Uint32Array]",W={};W[V0]=W[E0]=W[B0]=W[S0]=W[N0]=W[T0]=W[O0]=W[D0]=W[A0]=!0,W[c0]=W[d0]=W[C0]=W[u0]=W[w0]=W[m0]=W[f0]=W[p0]=W[h0]=W[y0]=W[g0]=W[_0]=W[k0]=W[b0]=W[x0]=!1;function M0(e){return s0(e)&&a0(e.length)&&!!W[l0(e)]}var F0=M0;function I0(e){return function(n){return e(n)}}var $0=I0,so={exports:{}};(function(e,n){var r=Mo,i=n&&!n.nodeType&&n,l=i&&!0&&e&&!e.nodeType&&e,o=l&&l.exports===i,a=o&&r.process,s=function(){try{var c=l&&l.require&&l.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(so,so.exports);var L0=F0,U0=$0,Ua=so.exports,Pa=Ua&&Ua.isTypedArray,P0=Pa?U0(Pa):L0,j0=P0,R0=qC,z0=vC,q0=Rt,H0=ao.exports,G0=i0,W0=j0,K0=Object.prototype,Z0=K0.hasOwnProperty;function Y0(e,n){var r=q0(e),i=!r&&z0(e),l=!r&&!i&&H0(e),o=!r&&!i&&!l&&W0(e),a=r||i||l||o,s=a?R0(e.length,String):[],c=s.length;for(var d in e)(n||Z0.call(e,d))&&!(a&&(d=="length"||l&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||G0(d,c)))&&s.push(d);return s}var X0=Y0,J0=Object.prototype;function Q0(e){var n=e&&e.constructor,r=typeof n=="function"&&n.prototype||J0;return e===r}var v0=Q0;function ew(e,n){return function(r){return e(n(r))}}var tw=ew,nw=tw,rw=nw(Object.keys,Object),ow=rw,iw=v0,lw=ow,aw=Object.prototype,sw=aw.hasOwnProperty;function cw(e){if(!iw(e))return lw(e);var n=[];for(var r in Object(e))sw.call(e,r)&&r!="constructor"&&n.push(r);return n}var dw=cw,uw=X0,mw=dw,fw=Fa;function pw(e){return fw(e)?uw(e):mw(e)}var hw=pw,yw=RC,gw=hw;function _w(e){return e==null?[]:yw(e,gw(e))}var kw=_w,bw=bC,xw=Fa,Cw=DC,ww=UC,Vw=kw,Ew=Math.max;function Bw(e,n,r,i){e=xw(e)?e:Vw(e),r=r&&!i?ww(r):0;var l=e.length;return r<0&&(r=Ew(l+r,0)),Cw(e)?r<=l&&e.indexOf(n,r)>-1:!!l&&bw(e,n,r)>-1}var Sw=Bw;const Ft={};function Nw(e,n,r,i){return e?Array.isArray(e)?e.filter(function(l){const o=Cn(l,n);let a;switch(i){case">":a=o>r;break;case"<":a=o<r;break;case">=":a=o>=r;break;case"<=":a=o<=r;break;case"in":a=Sw(o,r);break;default:r===void 0?a=o:a=o==r;break}return a}):(console.error("array.filter value was not provided as array",{input:e}),[]):[]}function Tw(e){return e.reduce(function(n,r){return n+r},0)}function Ow(e,n,r,i,l){if(!e)return[];if(l=l||{},l.flat=r,l.unique=i,!Array.isArray(e))return console.error("array.filter value was not provided as array",{input:e}),[];let o=e.reduce(function(a,s){const c=Cn(s,n),d=!c&&c!==!1&&c!==0;return l.excludeNull&&d||a.push(c),a},[]);return l.unique&&(o=[...new Set(o)]),l.flat&&(o=o.flat()),o}Ft.evaluateExpression=function(e,n){if(typeof e=="function")return e(n);n=Object.assign({},{Math,String,Array,Date,Boolean,parseInt,parseFloat,array:{filter:Nw,extract:Ow,sum:Tw},create(o,...a){return new o(...a)}},n);var i,l;try{i=sC(e),l=ae(i,n)}catch(o){console.log("There was an error evaluating your expression",{expression:e,error:o})}finally{}return l};function co(e){switch(String(e).toLowerCase()){case"true":case"y":case"yes":case"1":case"t":e=!0;break;case"false":case"n":case"no":case"0":case"f":case"undefined":case"null":case"":case"-1":e=!1;break}return!!e}function fn(e,n,r,i,l,o){n=n||[],r=Math.max(r,i);var a=n.length,s=a>=r;if(!s){var c=r-a,d=Array(c).fill().map(o);return[...n,...d]}return n}function Dw(e,n){if(n)return n;function r(f){return f===void 0||typeof f=="undefined"||f===null}var i=parseInt(e.minimum),l=parseInt(e.maximum),o=parseInt(e.ask||0);o=Math.max(o,i),o=l?Math.min(o,l):o;var a=l===1;e.asObject&&e.type==="group"&&(l===1&&i===1?a=!0:a=!1);var s=!a,c=(e.type==="reference"?e.defaultReferences:e.defaultValues)||[],d=c[0],u;switch(e.type){case"date":let f=function(p){switch(String(p).toLowerCase()){case"now":return new Date}return new Date(p)};s?(c.length&&(l?u=c.slice(0,l).map(function(p){return f(p)}):u=c.slice().map(function(p){return f(p)})),u=fn(e,u,i,o,l,function(){return f(new Date)})):u=r(d)?void 0:f(d);break;case"integer":case"decimal":case"number":case"float":s?(c.length&&(l?u=c.slice(0,l).map(function(p){return Number(p)}):u=c.slice().map(function(p){return Number(p)})),u=fn(e,u,i,o,l,function(){return""})):u=r(d)?void 0:Number(d);break;case"group":if(e.asObject){var m=o;s?m>0?u=Array(m).fill().map(function(){return{}}):u=[]:u=r(d)?{}:d}break;case"object":var m=o;s?m>0?u=Array(m).fill().map(function(){return{}}):u=[]:u=r(d)?{}:d;break;case"boolean":s?(c.length&&(l?u=c.slice(0,l).map(function(p){return co(p)}):u=c.slice().map(function(p){return co(p)})),u=fn(e,u,i,o,l,function(){})):u=r(d)?!1:co(d);break;case"reference":if(e.widget==="form"){var m=o;s?m>0?u=Array(m).fill().map(function(){return{}}):u=[]:i?u=r(d)?{}:d:u=void 0}else s?c.length?u=c.slice(0,l):u=[]:u=r(d)?void 0:d;break;case"string":s?(c.length&&(u=c.slice(0,l)),u=fn(e,u,i,o,l,function(){return""})):u=r(d)?"":d;break;default:s?(c.length&&(u=c.slice(0,l)),u=fn(e,u,i,o,l,function(){})):u=r(d)?"":d;break}return u}var JS="";function ze(e){return function(){var n=this;if(!n.expressions)return;let r=n.expressions[e];if(!r)return;let i=n.expressionsContext;return Ft.evaluateExpression(r,i)}}const Aw={components:{InternalRouteSelect:Xx,InternalMenuSelect:aC,ButtonSelect:Fb,NativeSelect:et,DateField:Ca,DateRange:Mk,TextField:xa,CurrencyField:Y_,TextArea:kk,Checkbox:Pk,FilterInput:Z1,CustomHtml:Gk,BooleanSwitch:eb,FieldGroup:wb,ContentSelect:_a,TypeSelect:d_,ScopeSelect:B_,FieldSelect:L_,TimezoneSelect:Jy,PhoneNumberInput:jy,Upload:ub,ObjectField:zb,OptionsManager:ax,CodeEditorField:_x,ExpressionField:Sx,RichTextField:Px},props:{trail:{type:Array,default(){return[]}},submission:{type:Boolean,default:!1},field:{type:Object,required:!0},parentModel:{type:Object},modelValue:{type:Object,required:!0},includeOfficeOnly:{type:Boolean,default:!1}},data(){return{watching:!0,defaultValue:null,model:this.modelValue,touched:!1,focussed:!1,validateResults:{valid:!0},mounted:!1,subFormState:{},isDirty:!1,isDirtyBeforeInput:!1}},inject:["parentFormElement","additionalContext"],provide(){return{fieldPath:this.fieldPath}},created(){this.checkDirtyState()},mounted(){const e=this;e.mounted=!0,e.parentFormElement&&e.parentFormElement.childFormElements&&e.parentFormElement.childFormElements.push(e)},beforeUnmount(){const e=this;if(e.mounted=!1,e.parentFormElement){var n=e.parentFormElement.childFormElements.indexOf(e);e.parentFormElement.childFormElements.splice(n,1)}},methods:{fieldDefaultValue(){var e=this.expressions&&this.expressions.defaultValue?this.getExpressionDefaultValue:void 0,n=Dw(this.actualField),r=this.cleanInput(e||n);return r},checkDirtyState(){var e=this.fieldModel,n=e||e===!1||e===0,r=this.fieldDefaultValue(),i=JSON.stringify(this.cleanOutput(e)),l=JSON.stringify(this.cleanOutput(r));n&&i!=l?(this.isDirty=!0,this.isDirtyBeforeInput=!0,this.fieldModel=e):(this.isDirty=!1,this.isDirtyBeforeInput=!1,this.fieldModel=r)},groupStateAltered(e){this.subFormState=e},focus(){this.focussed=!0},blur(){this.focussed=!1,this.expressions&&this.expressions.value&&(this.fieldModel=this.getExpressionValue)},touch(){this.touched=!0},untouch(){this.touched=!1},reset(){this.untouch(),this.watching=!1;var e=this.fieldDefaultValue();Array.isArray(e)&&(e=[]),this.model[this.key]=e,this.$nextTick(function(){this.watching=!0})},cleanInput(e){return this.fieldCleanInput(e)},cleanOutput(e){return this.fieldCleanOutput(e)},fieldCleanInput(e){var i;var n=this,r=(i=n.expressions)==null?void 0:i.transform;return r&&typeof r.set=="function"&&(e=r.set(e)),e},fieldCleanOutput(e){var i;var n=this,r=(i=n.expressions)==null?void 0:i.transform;return r&&typeof r.get=="function"&&(e=r.get(e)),e}},watch:{mounted(e){e?this.$emit("field:mount",this):this.$emit("field:unmount",this)},visible(e){e?this.untouch():(this.touched=!1,this.expressions&&this.expressions.value?this.fieldModel=this.getExpressionValue:this.fieldModel=void 0)},focussed(e){e?this.$emit("field:focus",this):this.$emit("field:blur",this)},invalid(e){this.$emit("field:invalid",this)},valid(e){this.$emit("field:valid",this)},error(e){this.$emit("field:error",this)},touched(e){this.$emit("field:touched",this)},dirty(e){this.$emit("field:dirty",this)},changeString(e){this.validateResults=this.$sdk.content.validateField(this.fieldModel,this.actualField)},modelValue(e,n){this.watching&&(this.model=e,this.touched=!1,this.checkDirtyState())},getExpressionHide(e){},getExpressionDefaultValue(e){this.isDirtyBeforeInput||this.touched&&this.dirty||(this.fieldModel=e)},getExpressionValue(e){this.fieldModel=e}},computed:{fieldPath(){return this.currentTrail.join(".")},currentTrail(){var e=this.trail.slice();return e.push(this.field.key),e},title(){return this.field.title},actualField(){var e=this.field,n=e;return this.getExpressionRequired&&(n=Object.assign({},n,{minimum:1})),this.getExpressionReferenceType&&(n=Object.assign({},n,{referenceType:this.getExpressionReferenceType})),this.getExpressionVisualHide&&(n=Object.assign({},n,{visualHide:this.getExpressionVisualHide})),this.getExpressionWidgetType&&(n=Object.assign({},n,{widget:this.getExpressionWidgetType})),this.getExpressionDataType&&(n=Object.assign({},n,{type:this.getExpressionDataType})),this.getExpressionOptions&&(n=Object.assign({},n,{options:this.getExpressionOptions})),this.getExpressionSyntax&&(n=Object.assign({},n,{syntax:this.getExpressionSyntax})),this.getExpressionCurrency&&(n=Object.assign({},n,{currency:this.getExpressionCurrency})),n},changeString(){const e=this.fieldModel;return`${$r(e)}-${this.actualField.minimum}-${this.actualField.referenceType}`},valid(){return!this.invalid},error(){return!this.focussed&&this.touched&&this.invalid},invalid(){var e=this.subFormState&&this.subFormState.invalid;if(e)return{invalidSubForm:this.subFormState,mounted:this.mounted};var n=!this.validateResults.valid;return this.hidden?!1:n},dirty(){return this.isDirty},getExpressionHide(){if(!this.expressions)return;let e=this.expressions.show,n=this.expressions.hide,r=this.expressionsContext;if(e)return!Ft.evaluateExpression(e,r);if(n)return Ft.evaluateExpression(n,r)},getExpressionRequired:ze("required"),getExpressionDefaultValue:ze("defaultValue"),getExpressionValue:ze("value"),getExpressionReferenceType:ze("referenceType"),getExpressionWidgetType:ze("widget"),getExpressionDataType:ze("type"),getExpressionOptions:ze("options"),getExpressionSyntax:ze("syntax"),getExpressionCurrency:ze("currency"),getExpressionVisualHide:ze("visualHide"),expressions(){return this.field.expressions},expressionsContext(){var r;var e=((r=this.additionalContext)==null?void 0:r.value)||{};return{this:this.model,self:this.model,model:this.model,data:this.parentModel||this.model,additional:B({},e)}},officeOnly(){return this.submission&&this.field.officeOnly},hidden(){return this.officeOnly&&!this.includeOfficeOnly||this.actualField.readOnly?!0:this.getExpressionHide},visible(){return this.mounted&&!this.hidden},type(){return this.actualField.type||"string"},key(){return this.actualField.key},isGroup(){return this.type==="group"},asObject(){return this.widget==="form"||this.isGroup&&this.actualField.asObject},visualHide(){return this.actualField.visualHide},layoutGroup(){return this.isGroup&&!this.actualField.asObject},fieldModel:{get(){return this.cleanOutput(this.model[this.key])},set(e){var n=this.cleanInput(e);this.model[this.key]!=n&&(this.model[this.key]=n,this.isDirty=!0,this.$emit("update:modelValue",this.model))}},sourceModel:{get(){return this.model},set(e){this.model=e,this.$emit("update:modelValue",this.model)}},classes(){var e=[];return e.push(`ux-field-${this.type}`),this.layoutGroup&&e.push("ux-layout-only"),this.touched&&e.push("ux-field-touched"),this.dirty&&e.push("ux-field-dirty"),this.valid&&e.push("ux-field-valid"),this.invalid&&e.push("ux-field-invalid"),this.error&&e.push("ux-field-error"),this.visualHide&&e.push("ux-field-hide"),e},widget(){if(this.type=="group")return this.type;var e=this.actualField.widget;switch(e){case"form":e=this.submission?"form":"content-select";break;case"internal-menu":case"internal-route":case"content-select":case"select":case"checkbox":case"daterange":case"datefield":case"richtext":case"textarea":case"switch":case"email":case"url":case"currency":case"timezone":case"country":case"upload":case"code":case"expression":case"options":case"button":case"type-select":case"scope-select":case"field-select":case"html":case"filter":case"value":break;case"password":return"textfield";case"phone":case"phonenumber":return"phone";default:switch(this.type){case"date":e="datefield";break;case"reference":e="content-select";break;case"boolean":e="checkbox";break;default:case"string":e="textfield";break;case"object":e="object";break}break}return e}}},Mw={key:29,class:"ux-field-message"};function Fw(e,n,r,i,l,o){const a=t.resolveComponent("internal-route-select"),s=t.resolveComponent("internal-menu-select"),c=t.resolveComponent("custom-html"),d=t.resolveComponent("filter-input"),u=t.resolveComponent("checkbox"),m=t.resolveComponent("boolean-switch"),f=t.resolveComponent("upload"),p=t.resolveComponent("field-group"),y=t.resolveComponent("field-select"),h=t.resolveComponent("native-select"),A=t.resolveComponent("button-select"),I=t.resolveComponent("text-field"),z=t.resolveComponent("currency-field"),q=t.resolveComponent("date-field"),Y=t.resolveComponent("date-range"),X=t.resolveComponent("content-select"),M=t.resolveComponent("type-select"),V=t.resolveComponent("scope-select"),K=t.resolveComponent("rich-text-field"),F=t.resolveComponent("text-area"),ge=t.resolveComponent("timezone-select"),se=t.resolveComponent("phone-number-input"),ce=t.resolveComponent("object-field"),me=t.resolveComponent("options-manager"),fe=t.resolveComponent("code-editor-field"),Ce=t.resolveComponent("flex-column"),pe=t.resolveComponent("expression-field");return o.visible?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["ux-field",o.classes]),onFocusin:n[28]||(n[28]=(...w)=>o.focus&&o.focus(...w)),onFocusout:n[29]||(n[29]=(...w)=>o.blur&&o.blur(...w))},[o.widget=="internal-route"?(t.openBlock(),t.createBlock(a,{key:0,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[0]||(n[0]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="internal-menu"?(t.openBlock(),t.createBlock(s,{key:1,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[1]||(n[1]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="html"?(t.openBlock(),t.createBlock(c,{key:2,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[2]||(n[2]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="value"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[],64)):t.createCommentVNode("",!0),o.widget=="filter"?(t.openBlock(),t.createBlock(d,{key:4,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[3]||(n[3]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="checkbox"?(t.openBlock(),t.createBlock(u,{key:5,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[4]||(n[4]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="switch"?(t.openBlock(),t.createBlock(m,{key:6,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[5]||(n[5]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="upload"?(t.openBlock(),t.createBlock(f,{key:7,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[6]||(n[6]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="group"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:8},[o.asObject?(t.openBlock(),t.createBlock(p,{key:0,trail:o.currentTrail,includeOfficeOnly:r.includeOfficeOnly,submission:r.submission,"onForm:state":o.groupStateAltered,ref:"group",onTouched:o.touch,field:o.actualField,parentModel:r.parentModel,modelValue:o.fieldModel,"onUpdate:modelValue":n[7]||(n[7]=w=>o.fieldModel=w)},null,8,["trail","includeOfficeOnly","submission","onForm:state","onTouched","field","parentModel","modelValue"])):(t.openBlock(),t.createBlock(p,{key:1,trail:r.trail,includeOfficeOnly:r.includeOfficeOnly,submission:r.submission,"onForm:state":o.groupStateAltered,ref:"group",onTouched:o.touch,field:o.actualField,parentModel:r.parentModel,modelValue:o.sourceModel,"onUpdate:modelValue":n[8]||(n[8]=w=>o.sourceModel=w)},null,8,["trail","includeOfficeOnly","submission","onForm:state","onTouched","field","parentModel","modelValue"]))],64)):t.createCommentVNode("",!0),o.widget=="form"?(t.openBlock(),t.createBlock(p,{key:9,trail:o.currentTrail,includeOfficeOnly:r.includeOfficeOnly,submission:r.submission,"onForm:state":o.groupStateAltered,ref:"group",onTouched:o.touch,field:o.actualField,parentModel:r.parentModel,modelValue:o.fieldModel,"onUpdate:modelValue":n[9]||(n[9]=w=>o.fieldModel=w)},null,8,["trail","includeOfficeOnly","submission","onForm:state","onTouched","field","parentModel","modelValue"])):t.createCommentVNode("",!0),o.widget=="field-select"?(t.openBlock(),t.createBlock(y,{key:10,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[10]||(n[10]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="select"?(t.openBlock(),t.createBlock(h,{key:11,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[11]||(n[11]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="button"?(t.openBlock(),t.createBlock(A,{key:12,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[12]||(n[12]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="textfield"?(t.openBlock(),t.createBlock(I,{key:13,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[13]||(n[13]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="currency"?(t.openBlock(),t.createBlock(z,{key:14,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[14]||(n[14]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="datefield"?(t.openBlock(),t.createBlock(q,{key:15,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[15]||(n[15]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="daterange"?(t.openBlock(),t.createBlock(Y,{key:16,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[16]||(n[16]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="content-select"?(t.openBlock(),t.createBlock(X,{key:17,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[17]||(n[17]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="type-select"?(t.openBlock(),t.createBlock(M,{key:18,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[18]||(n[18]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="scope-select"?(t.openBlock(),t.createBlock(V,{key:19,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[19]||(n[19]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="richtext"?(t.openBlock(),t.createBlock(K,{key:20,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[20]||(n[20]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="textarea"?(t.openBlock(),t.createBlock(F,{key:21,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[21]||(n[21]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="timezone"?(t.openBlock(),t.createBlock(ge,{key:22,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[22]||(n[22]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="phone"?(t.openBlock(),t.createBlock(se,{key:23,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[23]||(n[23]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="value"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:24},[],64)):t.createCommentVNode("",!0),o.widget=="object"?(t.openBlock(),t.createBlock(ce,{key:25,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[24]||(n[24]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="options"?(t.openBlock(),t.createBlock(me,{key:26,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[25]||(n[25]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="code"?(t.openBlock(),t.createBlock(Ce,{key:27,style:{"min-height":"300px"}},{default:t.withCtx(()=>[t.createVNode(fe,{onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[26]||(n[26]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])]),_:1})):t.createCommentVNode("",!0),o.widget=="expression"?(t.openBlock(),t.createBlock(pe,{key:28,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[27]||(n[27]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.error&&l.validateResults.message?(t.openBlock(),t.createElementBlock("div",Mw,t.toDisplayString(l.validateResults.message),1)):t.createCommentVNode("",!0)],34)):t.createCommentVNode("",!0)}var nr=_(Aw,[["render",Fw],["__scopeId","data-v-eabe4bcc"]]);function Iw(e,n,r,i){var l=-1,o=e==null?0:e.length;for(i&&o&&(r=e[++l]);++l<o;)r=n(r,e[l],l,e);return r}var $w=Iw;function Lw(e){return function(n){return e==null?void 0:e[n]}}var Uw=Lw,Pw=Uw,jw={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Rw=Pw(jw),zw=Rw,qw=zw,Hw=dr,Gw=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ww="\\u0300-\\u036f",Kw="\\ufe20-\\ufe2f",Zw="\\u20d0-\\u20ff",Yw=Ww+Kw+Zw,Xw="["+Yw+"]",Jw=RegExp(Xw,"g");function Qw(e){return e=Hw(e),e&&e.replace(Gw,qw).replace(Jw,"")}var vw=Qw,eV=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function tV(e){return e.match(eV)||[]}var nV=tV,rV=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function oV(e){return rV.test(e)}var iV=oV,ja="\\ud800-\\udfff",lV="\\u0300-\\u036f",aV="\\ufe20-\\ufe2f",sV="\\u20d0-\\u20ff",cV=lV+aV+sV,Ra="\\u2700-\\u27bf",za="a-z\\xdf-\\xf6\\xf8-\\xff",dV="\\xac\\xb1\\xd7\\xf7",uV="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",mV="\\u2000-\\u206f",fV=" \\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",qa="A-Z\\xc0-\\xd6\\xd8-\\xde",pV="\\ufe0e\\ufe0f",Ha=dV+uV+mV+fV,Ga="['\u2019]",Wa="["+Ha+"]",hV="["+cV+"]",Ka="\\d+",yV="["+Ra+"]",Za="["+za+"]",Ya="[^"+ja+Ha+Ka+Ra+za+qa+"]",gV="\\ud83c[\\udffb-\\udfff]",_V="(?:"+hV+"|"+gV+")",kV="[^"+ja+"]",Xa="(?:\\ud83c[\\udde6-\\uddff]){2}",Ja="[\\ud800-\\udbff][\\udc00-\\udfff]",It="["+qa+"]",bV="\\u200d",Qa="(?:"+Za+"|"+Ya+")",xV="(?:"+It+"|"+Ya+")",va="(?:"+Ga+"(?:d|ll|m|re|s|t|ve))?",es="(?:"+Ga+"(?:D|LL|M|RE|S|T|VE))?",ts=_V+"?",ns="["+pV+"]?",CV="(?:"+bV+"(?:"+[kV,Xa,Ja].join("|")+")"+ns+ts+")*",wV="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",VV="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",EV=ns+ts+CV,BV="(?:"+[yV,Xa,Ja].join("|")+")"+EV,SV=RegExp([It+"?"+Za+"+"+va+"(?="+[Wa,It,"$"].join("|")+")",xV+"+"+es+"(?="+[Wa,It+Qa,"$"].join("|")+")",It+"?"+Qa+"+"+va,It+"+"+es,VV,wV,Ka,BV].join("|"),"g");function NV(e){return e.match(SV)||[]}var TV=NV,OV=nV,DV=iV,AV=dr,MV=TV;function FV(e,n,r){return e=AV(e),n=r?void 0:n,n===void 0?DV(e)?MV(e):OV(e):e.match(n)||[]}var IV=FV,$V=$w,LV=vw,UV=IV,PV="['\u2019]",jV=RegExp(PV,"g");function RV(e){return function(n){return $V(UV(LV(n).replace(jV,"")),e,"")}}var zV=RV,qV=zV,HV=qV(function(e,n,r){return e+(r?"-":"")+n.toLowerCase()}),GV=HV,QS="";const WV={props:{parentModel:{type:Object},parentForm:{type:Object},trail:{type:Array,default(){return[]}},fields:{type:Array,default(){return[]}},modelValue:{type:Object,default(){return{}}},flex:{type:Boolean,default:!1},submission:{type:Boolean,default:!1},includeOfficeOnly:{type:Boolean,default:!1}},inject:["form","parentFormElement"],watch:{modelValue(e,n){this.model=e}},data(){return{mounted:!1,model:this.modelValue,touched:!1,invalid:!1,error:!1,dirty:!1,focussed:!1,childFormElements:[]}},provide(){return{parentFormElement:this.parentFormElement||this}},mounted(){const e=this;e.mounted=!0},beforeUnmount(){const e=this;e.mounted=!1},methods:{getFieldKey(e){let n=GV(`${e.title}-${e.key}`);return e.incrementor&&(n=`${n}-${e.incrementor}`),n},touch(){(this.childFormElements||[]).forEach(function(e){e.touch()}),this.touched=!0},untouch(){(this.childFormElements||[]).forEach(function(e){e.untouch()}),this.touched=!1},reset(){this.untouch(),(this.childFormElements||[]).forEach(function(e){e.reset()}),this.model={}},fieldUnmounted(e){this.fieldStateChange(e,"unmount"),this.$emit("field:unmount",this)},fieldMounted(e){this.fieldStateChange(e,"unmount"),this.$emit("field:mount",this)},fieldDirty(e){this.fieldStateChange(e,"dirty"),this.$emit("field:dirty",this)},fieldInvalid(e){this.fieldStateChange(e,"invalid"),this.$emit("field:invalid",this)},fieldValid(e){this.fieldStateChange(e,"valid"),this.$emit("field:valid",this)},fieldError(e){this.fieldStateChange(e,"error"),this.$emit("field:error",this)},fieldFocus(e){this.fieldStateChange(e,"focus"),this.$emit("field:focus",this)},fieldBlur(e){this.fieldStateChange(e,"blur"),this.$emit("field:blur",this)},fieldTouch(e){this.fieldStateChange(e,"touch"),this.$emit("field:touch",this)},fieldStateChange(e,n){var r=this;r.$nextTick(function(){var i=!1,l=!1,o=!1,a=!1,s=!1,c=[];r.childFormElements.forEach(function(d){d.dirty&&(i=!0),d.invalid&&(l=!0,c.push({title:d.field.title,key:d.field.key,message:d.invalidMessage})),d.error&&(o=!0),d.touched&&(a=!0),d.focussed&&(s=!0)}),r.dirty=i,r.error=o,r.touched=a,r.focussed=s,r.invalid=l,r.$emit("form:state",{dirty:i,error:o,focussed:s,touched:a,invalid:l,valid:!l,invalidFields:c})})}},components:{UxField:nr},computed:{currentTrail(){return this.trail},fieldHash(){return this.renderFields.reduce(function(e,n){return n&&(e[n.key]=n),e},{})},valid(){return!this.invalid},formClass(){var e=[];return this.flex&&e.push("ux-form-flex"),e},fieldClass(){var e=[];return this.flex&&e.push("ux-field-flex"),e},formModel:{get(){return this.model},set(e){this.model=e,this.$emit("update:modelValue",this.model)}},renderFields(){return this.fields.filter(function(e){if(!!e)return e.includeIf&&typeof e.includeIf=="function"?e.includeIf(e):e.excludeIf&&typeof e.excludeIf=="function"?!e.excludeIf(e):!0})}}};function KV(e,n,r,i,l,o){const a=t.resolveComponent("ux-field");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-form",o.formClass])},[t.renderSlot(e.$slots,"fields",{fields:o.renderFields,hash:o.fieldHash},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.renderFields,(s,c)=>(t.openBlock(),t.createBlock(a,{ref_for:!0,ref:"field",trail:o.currentTrail,submission:r.submission,includeOfficeOnly:r.includeOfficeOnly,"onField:mount":o.fieldMounted,"onField:unmount":o.fieldUnmounted,"onField:dirty":o.fieldDirty,"onField:invalid":o.fieldInvalid,"onField:valid":o.fieldValid,"onField:error":o.fieldError,"onField:focus":o.fieldFocus,"onField:blur":o.fieldBlur,"onField:touched":o.fieldTouch,field:s,modelValue:o.formModel,"onUpdate:modelValue":n[0]||(n[0]=d=>o.formModel=d),parentModel:r.parentModel||o.formModel,class:t.normalizeClass(o.fieldClass),key:`ux-form-field-${o.getFieldKey(s)}-${c}`},null,8,["trail","submission","includeOfficeOnly","onField:mount","onField:unmount","onField:dirty","onField:invalid","onField:valid","onField:error","onField:focus","onField:blur","onField:touched","field","modelValue","parentModel","class"]))),128))],!0)],2)}var uo=_(WV,[["render",KV],["__scopeId","data-v-09c6d713"]]),vS="";const mo="form.ready",ZV="form.processing",YV="form.complete",XV="form.error",JV={methods:{formStateUpdated(e){this.formState=e},softReset(){this.state=mo},touch(){this.$refs.form&&this.$refs.form.touch()},untouch(){this.$refs.form&&this.$refs.form.untouch()},reset(){this.model={},this.$refs.form&&this.$refs.form.reset(),this.state=mo,this.error=null,this.submitAttempted=!1,this.$emit("reset")},async submit(){const e=this;if(e.touch(),e.submitAttempted||(e.submitAttempted=!0,e.touch()),e.buttonDisabled){console.log("Form is invalid",this.formState);return}e.state=ZV,e.$emit("processing"),await e.preSubmit();const n=JSON.parse(JSON.stringify(e.model));e.$sdk.api.post(`/form/${e.formID}`,n).then(r,i);async function r(l){await e.postSubmit(),e.state=YV,e.$emit("success",l.data)}async function i(l){var o;l=((o=l.response)==null?void 0:o.data)||l,e.error=l,e.state=XV,e.$emit("error",l)}},async preSubmit(){},async postSubmit(){}},components:{UxForm:uo},provide(){return{form:this.form}},props:{modelValue:{type:Object,default(){return{}}},form:{type:Object,required:!0}},watch:{modelValue(e,n){this.model=e},model(e){this.$emit("update:modelValue",e)}},data(){return{submitAttempted:!1,formState:null,state:mo,mounted:!1,model:this.modelValue,error:null}},mounted(){this.mounted=!0},beforeUnmount(){this.mounted=!1},computed:{tooltip(){return this.buttonDisabled?"Please check the errors in your form":void 0},buttonDisabled(){return this.submitAttempted&&this.invalid},invalid(){var e;return(e=this.formState)==null?void 0:e.invalid},formID(){return this.$sdk.utils.id(this.form)},fields(){return this.form.fields||[]}}},QV=e=>(t.pushScopeId("data-v-670d0b78"),e=e(),t.popScopeId(),e),vV={class:"ux-submission-form"},eE=QV(()=>t.createElementVNode("h3",null,"An error occurred",-1)),tE={key:0},nE={key:1},rE={key:2},oE=["tooltip"];function iE(e,n,r,i,l,o){var d;const a=t.resolveComponent("ux-icon"),s=t.resolveComponent("ux-button"),c=t.resolveComponent("ux-form");return t.openBlock(),t.createElementBlock("div",vV,[l.state==="form.error"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[eE,l.error.message?(t.openBlock(),t.createElementBlock("pre",tE,t.toDisplayString(l.error.message),1)):t.createCommentVNode("",!0),(d=l.error.data)!=null&&d.errors?(t.openBlock(),t.createElementBlock("div",nE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.error.data.errors,u=>(t.openBlock(),t.createElementBlock("pre",{key:u.path},t.toDisplayString(u.message),1))),128))])):(t.openBlock(),t.createElementBlock("pre",rE,t.toDisplayString(l.error),1)),t.createVNode(s,{color:"primary",onClick:o.softReset},{default:t.withCtx(()=>[t.createTextVNode(" Try again "),t.createVNode(a,{right:"",icon:"fa-undo"})]),_:1},8,["onClick"])],64)):l.state==="form.complete"?t.renderSlot(e.$slots,"default",{key:1,reset:o.reset},()=>[t.createTextVNode(" Thank you "),t.createVNode(s,{onClick:o.reset},{default:t.withCtx(()=>[t.createTextVNode(" Back to form ")]),_:1},8,["onClick"])],!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createVNode(c,{submission:"",ref:"form",modelValue:l.model,"onUpdate:modelValue":n[0]||(n[0]=u=>l.model=u),"onForm:state":o.formStateUpdated,fields:o.fields},null,8,["modelValue","onForm:state","fields"]),t.createElementVNode("span",{tooltip:o.tooltip},[t.createVNode(s,{disabled:o.buttonDisabled,color:"primary",onClick:o.submit,loading:l.state==="form.processing"},{default:t.withCtx(()=>[t.createTextVNode(" Submit ")]),_:1},8,["disabled","onClick","loading"])],8,oE)],64))])}var fo=_(JV,[["render",iE],["__scopeId","data-v-670d0b78"]]),eN="";const lE={props:{modelValue:{type:String},placeholder:{type:String},debounce:{type:Number,default(){return 500}},loading:{type:Boolean}},mounted(){var e=this;e.dispatch=er(()=>{e.$emit("update:modelValue",e.value)},e.debounce)},data(){return{value:String(this.modelValue)}},methods:{clear(){this.value="",this.$emit("update:modelValue",this.value)}},watch:{modelValue(e,n){this.value=e}},computed:{icon(){return this.loading?"fa-spinner fa-spin":this.value?"fa-times":"fa-search"},selectableOptions(){return this.options.map(function(e){const n=e.value||e;return{label:e.title||e.name||e.label||n,value:n}})},model:{get(){return this.value},set(e){this.value=e,this.dispatch()}}}},aE={class:"search"},sE=["placeholder"];function cE(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("div",aE,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=s=>o.model=s),placeholder:r.placeholder},null,8,sE),[[t.vModelText,o.model]]),t.createElementVNode("div",{onClick:n[1]||(n[1]=s=>o.clear()),class:"icon"},[t.createVNode(a,{icon:o.icon},null,8,["icon"])])])}var po=_(lE,[["render",cE],["__scopeId","data-v-17abf7d1"]]),rs=function(e,n,r){if(!n.hasOwnProperty(r)){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i)}},os={props:{template:String,parent:Object,templateProps:{type:Object,default:function(){return{}}}},render:function(){if(this.template){var e=this.parent||this.$parent,n=e.$data;n===void 0&&(n={});var r=e.$props;r===void 0&&(r={});var i=e.$options;i===void 0&&(i={});var l=i.components;l===void 0&&(l={});var o=i.computed;o===void 0&&(o={});var a=i.methods;a===void 0&&(a={});var s=this.$data;s===void 0&&(s={});var c=this.$props;c===void 0&&(c={});var d=this.$options;d===void 0&&(d={});var u=d.methods;u===void 0&&(u={});var m=d.computed;m===void 0&&(m={});var f=d.components;f===void 0&&(f={});var p={$data:{},$props:{},$options:{},components:{},computed:{},methods:{}};Object.keys(n).forEach(function(V){s[V]===void 0&&(p.$data[V]=n[V])}),Object.keys(r).forEach(function(V){c[V]===void 0&&(p.$props[V]=r[V])}),Object.keys(a).forEach(function(V){u[V]===void 0&&(p.methods[V]=a[V])}),Object.keys(o).forEach(function(V){m[V]===void 0&&(p.computed[V]=o[V])}),Object.keys(l).forEach(function(V){f[V]===void 0&&(p.components[V]=l[V])});var y=Object.keys(p.methods||{}),h=Object.keys(p.$data||{}),A=Object.keys(p.$props||{}),I=Object.keys(this.templateProps),z=h.concat(A).concat(y).concat(I),q=(X=e,M={},y.forEach(function(V){return rs(X,M,V)}),M),Y=function(V){var K={};return V.forEach(function(F){F&&Object.getOwnPropertyNames(F).forEach(function(ge){return rs(F,K,ge)})}),K}([p.$data,p.$props,q,this.templateProps]);return t.h({template:this.template||"<div></div>",props:z,computed:p.computed,components:p.components,provide:this.$parent.$.provides?this.$parent.$.provides:{}},Object.assign({},Y))}var X,M}},dE={props:{field:{type:Object,default(){return{}}},parentModel:{type:Object}},data(){return{model:this.modelValue}},methods:{getValue(e){if(!!e)return e._id||e.value||e},getLabel(e){if(!!e)return e.title||e.name||e.label||e}},computed:{label(){return this.field.title},description(){return this.field.description},singleValue(){if(this.asObject){var e=this.minimum===1&&this.maximum===1;return e}else return this.maximum===1},type(){return this.field.type||"string"},multiValue(){return!this.singleValue},key(){return this.field.key},isGroup(){return this.type==="group"},asObject(){return this.isGroup&&!!this.field.asObject},layoutGroup(){return this.isGroup&&!this.field.asObject},numValues(){return this.multiValue?(this.model||[]).length:1},fields(){var e=this.field.fields;if(e&&e.length)return e},minimum(){if(this.layoutGroup)return 1;var e=parseInt(this.field.minimum||0);return isNaN(e)&&(e=0),e=Math.max(e,0),e=this.maximum?Math.min(e,this.maximum):e,parseInt(e)},maximum(){if(this.layoutGroup)return 1;var e=parseInt(this.field.maximum||0);return isNaN(e)&&(e=0),e=Math.max(e,0),parseInt(e)}}},tN="";const uE={mixins:[dE],props:{modelValue:{type:[Object,Array]},submission:{type:Boolean,default:!1}},computed:{sameLine(){return this.field.sameLine}},methods:{multiLabel(e,n){return`${this.label} ${n+1}`}}},mE={key:0,class:"ux-multi-group"};function fE(e,n,r,i,l,o){const a=t.resolveComponent("flex-cell"),s=t.resolveComponent("flex-row"),c=t.resolveComponent("ux-panel-header"),d=t.resolveComponent("ux-render"),u=t.resolveComponent("ux-panel-body"),m=t.resolveComponent("ux-panel");return e.multiValue?(t.openBlock(),t.createElementBlock("div",mE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.model,(f,p)=>(t.openBlock(),t.createBlock(m,{ref_for:!0,ref:"row",key:f},{default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s,null,{default:t.withCtx(()=>[t.createVNode(a,{vcenter:""},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createElementVNode("strong",null,t.toDisplayString(o.multiLabel(f,p)),1)])]),_:2},1024)]),_:2},1024)]),_:2},1024),t.createVNode(u,null,{default:t.withCtx(()=>[t.createVNode(d,{submission:r.submission,fields:e.fields,flex:o.sameLine,parentModel:e.parentModel,modelValue:e.model[p],"onUpdate:modelValue":y=>e.model[p]=y},null,8,["submission","fields","flex","parentModel","modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024))),128))])):(t.openBlock(),t.createBlock(d,{key:1,submission:r.submission,fields:e.fields,flex:o.sameLine,parentModel:e.parentModel,modelValue:e.model,"onUpdate:modelValue":n[0]||(n[0]=f=>e.model=f)},null,8,["submission","fields","flex","parentModel","modelValue"]))}var pE=_(uE,[["render",fE],["__scopeId","data-v-32d789d7"]]),nN="";const hE={components:{Item:Ul,FieldGroup:pE,Compile:os},props:{field:{type:Object,required:!0},parentModel:{type:Object},modelValue:{type:Object,required:!0},submission:{type:Boolean,default:!1}},data(){return{model:this.modelValue}},methods:{renderDate(e){return N.fromJSDate(new Date(e)).toFormat("h:mma - ccc, DD")},formatCurrency(e){return`${this.$sdk.utils.formatCurrency(e,this.field.currency)}`.toUpperCase()},cleanInput(e){return e},cleanOutput(e){return this.type=="reference"&&!this.multiValue&&Array.isArray(e)&&e.length?e[0]:e}},watch:{modelValue(e,n){this.model=e}},computed:{type(){return this.field.type||"string"},isEmbedded(){return this.submission&&this.field.widget==="form"&&this.field.type==="reference"},isGroup(){return this.isEmbedded||this.type==="group"},asObject(){return this.isEmbedded||this.isGroup&&this.field.asObject},isNumber(){switch(this.type){case"integer":case"number":case"float":case"decimal":return!0}},multiValue(){return this.field.maximum!=1},title(){return this.field.title},getExpressionHide(){if(!this.expressions)return;let e=this.expressions.show,n=this.expressions.hide,r=this.expressionsContext;if(e)return!Ft.evaluateExpression(e,r);if(n)return Ft.evaluateExpression(n,r)},expressions(){return this.field.expressions},expressionsContext(){return{this:this.model,model:this.model,data:this.parentModel}},hidden(){return this.getExpressionHide},visible(){var e=!this.hidden,n=this.layoutGroup||this.fieldModel;return e&&n},type(){return this.field.type||"string"},key(){return this.field.key},isGroup(){return this.type==="group"},asObject(){return this.isGroup&&this.field.asObject},layoutGroup(){return this.isGroup&&!this.field.asObject},fieldModel:{get(){return this.cleanOutput(this.model[this.key])},set(e){}},sourceModel:{get(){return this.model},set(e){}},classes(){var e=[];return e.push(`ux-field-render-${this.type}`),this.layoutGroup?e.push("ux-layout-only"):(!this.fieldModel||Array.isArray(this.fieldModel)&&!this.fieldModel.length)&&e.push("ux-empty"),e},widget(){if(this.type=="group")return this.type;var e=this.field.widget;switch(e){case"form":e=this.submission?"form":"content-select";break;case"content-select":case"select":case"checkbox":case"datefield":case"richtext":case"longtext":case"buttons":case"switch":case"email":case"url":case"currency":case"timezone":case"country":case"typeselect":case"upload":case"code":break;default:switch(this.type){case"date":e="datefield";break;case"reference":e="content-select";break;case"boolean":e="checkbox";break;default:case"string":e="textfield";break}break}return e}}},yE={class:"ux-field-title"},gE={class:"currency"},_E={key:1},kE={class:"currency"},bE={key:1},xE={key:1},CE={key:1},wE=["href"],VE={key:1},EE=["href"],BE=["href"],SE={key:1},NE=["href"],TE={key:1};function OE(e,n,r,i,l,o){const a=t.resolveComponent("field-group"),s=t.resolveComponent("v-ace-editor"),c=t.resolveComponent("item"),d=t.resolveComponent("compile");return o.visible?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["ux-field-render",o.classes])},[t.createElementVNode("label",yE,t.toDisplayString(o.title),1),o.widget==="group"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o.asObject?(t.openBlock(),t.createBlock(a,{key:0,submission:r.submission,field:r.field,parentModel:r.parentModel,modelValue:o.fieldModel,"onUpdate:modelValue":n[0]||(n[0]=u=>o.fieldModel=u)},null,8,["submission","field","parentModel","modelValue"])):(t.openBlock(),t.createBlock(a,{key:1,submission:r.submission,field:r.field,parentModel:r.parentModel,modelValue:o.sourceModel,"onUpdate:modelValue":n[1]||(n[1]=u=>o.sourceModel=u)},null,8,["submission","field","parentModel","modelValue"]))],64)):o.widget==="form"?(t.openBlock(),t.createBlock(a,{key:1,submission:r.submission,field:r.field,parentModel:r.parentModel,modelValue:o.fieldModel,"onUpdate:modelValue":n[2]||(n[2]=u=>o.fieldModel=u)},null,8,["submission","field","parentModel","modelValue"])):o.widget==="currency"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.fieldModel,(u,m)=>(t.openBlock(),t.createElementBlock("div",null,[t.createTextVNode(t.toDisplayString(o.formatCurrency(u))+" ",1),t.createElementVNode("span",gE,t.toDisplayString(r.field.currency),1)]))),256)):(t.openBlock(),t.createElementBlock("div",_E,[t.createTextVNode(t.toDisplayString(o.formatCurrency(o.fieldModel))+" ",1),t.createElementVNode("span",kE,t.toDisplayString(r.field.currency),1)]))],64)):o.widget==="code"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.fieldModel,(u,m)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(s,{readonly:!0,class:"editor-wrap",value:u,options:{useWorker:!0},lang:r.field.syntax,theme:"tomorrow_night_eighties",style:{"min-height":"300px"}},null,8,["value","lang"])]))),256)):(t.openBlock(),t.createElementBlock("div",bE,[t.createVNode(s,{readonly:!0,class:"editor-wrap",value:o.fieldModel,options:{useWorker:!0},lang:r.field.syntax,theme:"tomorrow_night_eighties",style:{"min-height":"300px"}},null,8,["value","lang"])]))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[o.type==="reference"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.fieldModel,(u,m)=>(t.openBlock(),t.createBlock(c,{submission:r.submission,key:u._id,item:u},null,8,["submission","item"]))),128)):(t.openBlock(),t.createBlock(c,{key:1,submission:r.submission,item:o.fieldModel},null,8,["submission","item"]))],64)):t.createCommentVNode("",!0),o.type=="string"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.fieldModel,(u,m)=>(t.openBlock(),t.createBlock(d,{template:u},null,8,["template"]))),256)):(t.openBlock(),t.createBlock(d,{key:1,template:o.fieldModel},null,8,["template"]))],64)):t.createCommentVNode("",!0),o.type=="boolean"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.fieldModel,(u,m)=>(t.openBlock(),t.createElementBlock("div",null,t.toDisplayString(!!u),1))),256)):(t.openBlock(),t.createElementBlock("div",xE,t.toDisplayString(!!o.fieldModel),1))],64)):t.createCommentVNode("",!0),o.type=="date"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.fieldModel,(u,m)=>(t.openBlock(),t.createElementBlock("div",null,t.toDisplayString(o.renderDate(u)),1))),256)):(t.openBlock(),t.createElementBlock("div",CE,t.toDisplayString(o.renderDate(o.fieldModel)),1))],64)):t.createCommentVNode("",!0),o.type=="email"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.fieldModel,(u,m)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("a",{href:`mailto:${u}`},t.toDisplayString(u),9,wE)]))),256)):(t.openBlock(),t.createElementBlock("div",VE,[t.createElementVNode("a",{href:`mailto:${o.fieldModel}`},t.toDisplayString(o.fieldModel),9,EE)]))],64)):t.createCommentVNode("",!0),o.type=="url"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:5},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.fieldModel,(u,m)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("a",{href:u},t.toDisplayString(u),9,BE)]))),256)):(t.openBlock(),t.createElementBlock("div",SE,[t.createElementVNode("a",{href:o.fieldModel},t.toDisplayString(o.fieldModel),9,NE)]))],64)):t.createCommentVNode("",!0),o.isNumber?(t.openBlock(),t.createElementBlock(t.Fragment,{key:6},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.fieldModel,(u,m)=>(t.openBlock(),t.createElementBlock("div",null,t.toDisplayString(u),1))),256)):(t.openBlock(),t.createElementBlock("div",TE,t.toDisplayString(o.fieldModel),1))],64)):t.createCommentVNode("",!0)],64))],2)):t.createCommentVNode("",!0)}var ho=_(hE,[["render",OE],["__scopeId","data-v-8e25371a"]]),rN="";const DE={props:{parentModel:{type:Object},fields:{type:Array,default(){return[]}},modelValue:{type:Object,default(){return{}}},flex:{type:Boolean,default:!1},submission:{type:Boolean,default:!1}},watch:{modelValue(e,n){this.model=e}},data(){return{model:this.modelValue}},components:{UxFieldRender:ho},computed:{renderClass(){var e=[];return this.flex&&e.push("ux-render-flex"),e},fieldClass(){var e=[];return this.flex&&e.push("ux-field-render-flex"),e},renderFields(){return this.fields}}};function AE(e,n,r,i,l,o){const a=t.resolveComponent("ux-field-render");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-render",o.renderClass])},[t.renderSlot(e.$slots,"render",{fields:r.fields},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.renderFields,(s,c)=>(t.openBlock(),t.createBlock(a,{submission:r.submission,field:s,modelValue:l.model,"onUpdate:modelValue":n[0]||(n[0]=d=>l.model=d),parentModel:r.parentModel||l.model,key:`ux-render-field-${s.key}-${c}`,class:t.normalizeClass(o.fieldClass)},null,8,["submission","field","modelValue","parentModel","class"]))),128))],!0)],2)}var is=_(DE,[["render",AE],["__scopeId","data-v-4d848e06"]]);function ls(e){e=e||{},Math.max(parseInt(e.minimum||0),0);let n=Math.max(parseInt(e.maximum||0),0);const r=de.EventDispatcher({}),i=t.reactive([]);let l={};t.watch(i,function(){o()});function o(){l=i.reduce(function(a,s){var c=s._id||s.id;if(!!c)return a[c]=s,a},{})}return r.isSelected=function(a){return l[a._id||a.id]},r.select=function(a,s){r.isSelected(a)||(n&&i.length>=n&&n===1&&(i.length=0),i.push(a),n&&i.length>n&&(i.length=n,r.dispatch("limit",n)),s||r.dispatch("change",i))},r.deselect=function(a,s){if(n===1){i.length=0;return}var c=i.findIndex(function(d){return d._id&&d._id==a._id||d.id&&d.id==a.id});c!=-1&&(i.splice(c,1),s||r.dispatch("change",i))},r.toggle=function(a,s){r.isSelected(a)?r.deselect(a,s):r.select(a,s)},r.selectMultiple=function(a){a.forEach(function(s){r.select(s,!0)}),r.dispatch("change",i)},r.deselectMultiple=function(a){a.forEach(function(s){r.deselect(s,!0)}),r.dispatch("change",i)},r.setSelection=function(a){i.length=0,setTimeout(function(){r.selectMultiple(a)})},r.deselectAll=function(){i.length=0,r.dispatch("change",i)},Object.defineProperty(r,"items",{value:i,writable:!1}),Object.defineProperty(r,"hash",{get(){return l}}),r}var oN="";const ME={props:{total:{type:Number,default(){return 0}},page:{type:Object,default(){return{size:50,index:1}}}},components:{NativeSelect:et},watch:{totalPages(){this.currentPage=0}},computed:{perPage:{get(){return this.pageModel.size},set(e){e=Math.max(e,1),this.pageModel.size=e,this.dispatch()}},pageField(){return{type:"integer",maximum:1,minimum:1,options:Array(this.totalPages).fill(1).map((e,n)=>e+n)}},totalPages(){return Math.ceil(this.total/this.perPage)},startIndex(){return(this.currentPage-1)*this.pageModel.size},displayStartIndex(){return this.total?this.startIndex+1:0},endIndex(){return Math.min(this.startIndex+this.pageModel.size,this.total)},currentPage:{get(){return this.pageModel.index},set(e){this.totalPages&&(e=Math.min(this.totalPages,e)),e=Math.max(e,1),this.pageModel.index=e,this.dispatch()}}},methods:{dispatch(){return this.$emit("update:page",this.pageModel)},previousPage(){this.currentPage--},nextPage(){this.currentPage++}},data(){return{pageModel:this.page,perPageField:{minimum:1,maximum:1,options:[{title:"50 per page",value:50},{title:"100 per page",value:100},{title:"250 per page",value:250},{title:"500 per page",value:500}]}}}};function FE(e,n,r,i,l,o){const a=t.resolveComponent("native-select"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button"),u=t.resolveComponent("flex-row");return t.openBlock(),t.createBlock(u,{center:"",gap:""},{default:t.withCtx(()=>[t.createVNode(s,{shrink:"",class:"text"},{default:t.withCtx(()=>[t.createVNode(a,{modelValue:o.perPage,"onUpdate:modelValue":n[0]||(n[0]=m=>o.perPage=m),field:l.perPageField},{default:t.withCtx(()=>[e.$device.breakpoint.xs?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.displayStartIndex)+"-"+t.toDisplayString(o.endIndex)+" of "+t.toDisplayString(r.total),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Showing "+t.toDisplayString(o.displayStartIndex)+" to "+t.toDisplayString(o.endIndex)+" of "+t.toDisplayString(r.total)+" total",1)],64))]),_:1},8,["modelValue","field"])]),_:1}),t.createVNode(s),o.totalPages>1?(t.openBlock(),t.createBlock(s,{key:0,shrink:""},{default:t.withCtx(()=>[t.createVNode(u,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(s,{shrink:"",class:"text"},{default:t.withCtx(()=>[t.createVNode(a,{modelValue:o.currentPage,"onUpdate:modelValue":n[1]||(n[1]=m=>o.currentPage=m),field:o.pageField},{default:t.withCtx(()=>[e.$device.breakpoint.xs?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.currentPage)+"/"+t.toDisplayString(o.totalPages),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Page "+t.toDisplayString(o.currentPage)+" of "+t.toDisplayString(o.totalPages),1)],64))]),_:1},8,["modelValue","field"])]),_:1}),t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{icon:"",onClick:n[2]||(n[2]=m=>o.previousPage())},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-arrow-left"})]),_:1})]),_:1}),t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{icon:"",onClick:n[3]||(n[3]=m=>o.nextPage())},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-arrow-right"})]),_:1})]),_:1})]),_:1})]),_:1})):t.createCommentVNode("",!0)]),_:1})}var IE=_(ME,[["render",FE],["__scopeId","data-v-492058b4"]]),iN="";function $E(e,n){var r=[],i;switch(n){case"image":case"video":r.push({title:"",key:"_id",renderer:"thumbnail",shrink:!0,fields:["width","height","fileMeta.colors.colors[0]"]});break}switch(n){case"profile":i=!0,r.push({title:"First Name",key:"firstName",shrink:!0}),r.push({title:"Last Name",key:"lastName",shrink:!0}),r.push({title:"Email",key:"emails"}),r.push({title:"Phone Number",key:"phoneNumbersInternational"});break;case"definition":r.push({title:"Plural",key:"plural"}),r.push({title:"Defines Type",key:"definesType"}),r.push({title:"Database Key",key:"key"}),r.push({title:"Category",key:"category"});break;case"file":case"audio":case"image":case"video":switch(i=!0,r.push({title:"Title",key:"title"}),n){case"image":case"video":r.push({title:"Width",key:"width",shrink:!0}),r.push({title:"Height",key:"height",shrink:!0});break}switch(r.push({title:"Ext",key:"fileExtension",shrink:!0}),r.push({title:"Mime Type",key:"fileMime",shrink:!0}),n){case"image":case"video":r.push({title:"Media Type",key:"mediaIntegrationType",shrink:!0});break}break}switch(i||r.unshift({title:"Title",key:"title"}),n){case"file":case"audio":case"image":case"video":r.push({title:"",key:"meta.security",renderer:"security",shrink:!0}),r.push({title:"",key:"_id",renderer:"button",shrink:!0,button:{size:"sm",text:"Download",icon:"fa-download",action(l){return new Promise(async function(o,a){await e.$sdk.auth.ensureValidToken();var s=e.$sdk.files.downloadUrl(e.basicType,l);window.open(s),o()})}}});break}return r}function as(){return{operator:"and",filters:[]}}let Xe,yo,go;const LE={props:{view:{type:Object,default(){return{title:"List",key:"table"}}},filter:{type:Object,default(){return as()}},type:{type:String,required:!0},showFilters:{type:Boolean},search:{type:String,default:""},dateRange:{type:Object,default:{}},options:{type:Object,default(){return{}}},cacheKey:{type:[String,Number]},modelValue:{type:Array,default(){return[]}},maximum:{type:Number,default(){return 0}},dateFilterEnabled:{type:Boolean},selectionManager:{type:Object},enableActions:{type:Boolean,default:!1},enableSelection:{type:Boolean,default:!0},trash:{type:Boolean,default:!1}},components:{Pager:IE,NativeTable:xl,FilterBuilder:Sa,Search:po,UxField:nr},deactivated(){go=this.$sdk.global.cacheKeys[this.type],Xe&&(Xe(),Xe=null,yo=!0)},async activated(){var e=this,n=e.$sdk.global.cacheKeys[e.type];go!=n&&(go=n,e.dataSource=await e.load()),yo&&(yo=!1,e.dataSource=await e.load())},async created(){var e=this;await new Promise(async function(n,r){var i=await e.$sdk.content.glossary({hash:!0}),l=i[e.type];if(e.definition=l,!l)return r();n()}),e.sort=e.defaultSort},watch:{keywords(e){this.$emit("update:search",e)},dateRangeFilter(e){this.$emit("update:dateRange",e)},search(e){this.keywords=e},change:{handler:er(async function(){this.dataSource=await this.load()}),immediate:!0},loading(){this.$emit("loading",this.loading)},selectedItems(e){this.$emit("update:modelValue",e)},loadKey(){this.$emit("loaded")},options(e){this.actualOptions=e},filter(e){e?this.actualFilter=e:this.actualFilter=as()}},computed:{viewModeCacheKey(){return`${this.cacheKey}-${this.loadKey}`},dateRangeField(){return{type:"object",widget:"daterange",key:"dateRange",minimum:0,maximum:1}},combinedFilter(){const e=this;let n=e.actualFilter,r=e.actualOptions.lockFilter;if(!r)return n;n=JSON.parse(JSON.stringify(n)),r=JSON.parse(JSON.stringify(r));let i;return n.operator==="and"?(i=n,i.filters.push(r)):(i=r,r.filters.push(n)),i},viewMode(){var e=this.view;switch(e.key){case"list":case"table":return}return e},defaultSort(){var n;var e=(n=this.definition)==null?void 0:n.defaultSort;if(e)return e;switch(e={key:"title",direction:"asc",type:"string"},this.basicType){case"profile":case"persona":case"user":e={key:"lastName",direction:"asc",type:"string"};break;case"email":case"notification":case"transaction":case"campaign":case"transaction":case"componentsnapshot":case"interfacesnapshot":case"image":case"video":case"audio":case"file":case"submission":case"log":e={key:"meta.created",direction:"dsc",type:"date"};break}return e},fields(){const e=this,n=e.definition.definesType==="submission";var r=[...e.definition.fields],i=e.definition.definedFields||[];if(i.length)if(n){var l={title:"Form Data",minimum:1,maximum:1,key:"formData",asObject:!0,type:"group",fields:i};r.push(l);const s=i.map(function(c){return c.type==="reference"&&(c=JSON.parse(JSON.stringify(c)),delete c.fields),c});var o={title:"Data",minimum:1,maximum:1,key:"data",asObject:!0,type:"group",fields:s};r.push(o)}else{var o={title:`${e.definition.title}`,minimum:1,maximum:1,key:"data",asObject:!0,type:"group",fields:i};r.push(o)}var a=e.$sdk.utils.mapFields(r).filter(function(s){var c=s.type=="group"&&s.asObject&&s.minimum==1&&s.maximum==1;return!c}).map(function(s){return s.title=s.titles.join(" > "),s}).sort(function(s,c){return s.title<c.title?-1:1});return a},deselectAllFunction(){return this.manager.items.length?this.deselectAll:null},selectedItems(){return this.manager.items.slice()},activeFilters(){const e=this;var n=this.$sdk.filter.activeFilters(e.actualFilter).reduce(function(r,i){return i.key&&(i=B({},i),i.title=`Filter ${r.length+1}`,i.key=i.key.split("[]").join(""),i.class="active-filter",i.shrink=!0,r.push(i)),r},[]);return n},searching(){return this.loading&&this.keywords.length},title(){return this.definition.title},plural(){return this.definition.plural},selectFields(){const e=this;var n=e.columns.map(function(r){return[r.path||r.key,...r.select||[]]}).flat().filter(Boolean).map(function(r){return r.split("[]").join("")});return e.actualOptions.select&&(n=[...n,...e.actualOptions.select]),n},columns(){let e=[],n={};function r(d){return function(u){var m=n[u.path||u.key];(d||!m)&&(n[u.path||u.key]=1,e.push(ke(B({},u),{key:u.path||u.key})))}}var i=this.actualOptions.prefixColumns||[];i.forEach(r(!0));var l=this.actualOptions.columns,o=l&&l.length?l:$E(this,this.basicType);o.length||o.push({title:"Title",key:"title"}),o.forEach(r(!0));var a=this.additionalFields;a.forEach(r());var s=this.actualOptions.suffixColumns||[];s.forEach(r(!0));var c=this.activeFilters;return c.forEach(r()),e},filterChangeString(){const e=this;var n=this.$sdk.filter.filterChangeString(e.actualFilter);return n},change(){return`${JSON.stringify([this.page,this.dateRangeFilter,this.sort,this.keywords,this.selectFields,this.type,this.filterChangeString])}-${this.cacheKey}-${this.$sdk.global.cacheKeys[this.type]}`},items(){return this.dataSource.items},totalItems(){return this.dataSource.total},basicType(){return this.definition?this.definition.definesType||this.definition.key:this.type},loadCriteria(){var e=this,n=e.sort||e.defaultSort,r=e.keywords,i=e.selectFields,l=e.page,o=e.combinedFilter;return{sort:n,search:r,select:i,page:l,filter:o}},fieldEnabled(){var e=this;return e.columns.reduce(function(n,r){return n[r.key]=!0,n},{})}},methods:{toggleField(e){var n=e.path||e.key,r=this.additionalFields.findIndex(function(i){return i.path===n||i.key===n});r===-1?this.additionalFields.push(e):this.additionalFields.splice(r,1)},ensureMeta(e){return e.meta||(e.meta={}),e.meta.type||(e.meta.type=this.basicType),e.meta.definition||(e.meta.definition=this.definition.key),this.trash&&(e.meta.deleted=!0),e},deselectAll(){this.manager.deselectAll()},async selectAll(){var e=this;e.dataSource=await e.load(!0);var n=this.dataSource.all.map(function(r){var i=e.ensureMeta({_id:r});return i});e.manager.setSelection(n)},selectMultiple(e){e=e.map(this.ensureMeta),this.manager.selectMultiple(e)},deselectMultiple(e){e=e.map(this.ensureMeta),this.manager.deselectMultiple(e)},rowToggled(e){this.toggle(e)},rowClicked(e){this.$emit("click:row",e)},actionsClicked(e){this.$emit("click:actions",e)},select(e){this.ensureMeta(e),this.manager.select(e)},deselect(e){this.manager.deselect(e)},isSelected(e){return this.manager.isSelected(e)},toggle(e){this.ensureMeta(e),this.manager.toggle(e)},async load(e){var a,s,c,d;var n=this;n.loading=!0,Xe&&(Xe(),Xe=null);var r=Object.assign({},n.loadCriteria);if(r.includeAll=e,n.trash&&(r.trash=!0),n.dateFilterEnabled&&!r.search){let u=(s=(a=n.dateRangeFilter)==null?void 0:a.dateRange)==null?void 0:s.startDate,m=(d=(c=n.dateRangeFilter)==null?void 0:c.dateRange)==null?void 0:d.endDate;if(u||m){let f=Intl.DateTimeFormat().resolvedOptions().timeZone;u.toISOString()==m.toISOString()?(u=new Date(u),u.setHours(0,0,0,0),m=new Date(u),m.setHours(23,59,59,999)):(m=new Date(m),m.setHours(23,59,59,999)),r.date={startDate:u,endDate:m,timezone:f}}}const{promise:i,cancel:l}=await n.$sdk.content.list(n.type,r,{cancellable:!0});Xe=l,i.then(function(u){Xe=null,n.loading=!1,n.loadKey++}),i.catch(function(u){Xe=null});const{data:o}=await i;return o.items.forEach(n.ensureMeta),o}},data(){var e=this.selectionManager;return e||(e=new ls({minimum:this.minimum,maximum:this.maximum})),this.modelValue&&e.setSelection(this.modelValue),{definition:null,manager:e,loading:!0,additionalFields:[],loadKey:1,page:{size:50,index:1},actualFilter:this.filter,sort:this.defaultSort,keywords:this.search,dateRangeFilter:{dateRange:this.dateRange},dataSource:null,actualOptions:this.options}}},ss=e=>(t.pushScopeId("data-v-d8907020"),e=e(),t.popScopeId(),e),UE=ss(()=>t.createElementVNode("p",null,null,-1)),PE={key:0},jE=ss(()=>t.createElementVNode("p",null,null,-1)),RE={class:"footer"};function zE(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon"),s=t.resolveComponent("ux-button"),c=t.resolveComponent("ux-list-item"),d=t.resolveComponent("ux-list"),u=t.resolveComponent("ux-menu"),m=t.resolveComponent("native-table"),f=t.resolveComponent("flex-column"),p=t.resolveComponent("ux-panel-body"),y=t.resolveComponent("ux-panel"),h=t.resolveComponent("search"),A=t.resolveComponent("ux-field"),I=t.resolveComponent("filter-builder"),z=t.resolveComponent("flex-body"),q=t.resolveComponent("flex-row"),Y=t.resolveComponent("pager"),X=t.resolveComponent("flex-footer"),M=t.resolveComponent("spinner");return l.definition?(t.openBlock(),t.createBlock(f,{key:0,class:"content-browser"},{default:t.withCtx(()=>[l.dataSource?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(f,{class:t.normalizeClass(["browser-body",{loading:l.loading}])},{default:t.withCtx(()=>[t.createVNode(q,null,{default:t.withCtx(()=>[o.items.length?(t.openBlock(),t.createBlock(f,{key:0},{default:t.withCtx(()=>[o.viewMode&&o.viewMode.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.viewMode.component),{key:0,cacheKey:o.viewModeCacheKey,selection:l.manager.items,items:o.items,"onClick:actions":o.actionsClicked,"onSelect:item:toggle":o.rowToggled,"onClick:item":o.rowClicked},null,40,["cacheKey","selection","items","onClick:actions","onSelect:item:toggle","onClick:item"])):(t.openBlock(),t.createBlock(m,{key:1,sort:l.sort,"onUpdate:sort":n[0]||(n[0]=V=>l.sort=V),enableSelection:r.enableSelection,enableActions:r.enableActions,total:o.totalItems,selectAll:o.selectAll,deselectAll:o.deselectAllFunction,selection:l.manager.items,"onClick:row":o.rowClicked,"onClick:actions":o.actionsClicked,"onSelect:row:toggle":o.rowToggled,"onSelect:multiple":o.selectMultiple,"onDeselect:multiple":o.deselectMultiple,rows:o.items,columns:o.columns},{corner:t.withCtx(()=>[t.createVNode(u,{right:""},{activator:t.withCtx(({on:V})=>[t.createVNode(s,t.mergeProps({icon:""},t.toHandlers(V)),{default:t.withCtx(()=>[t.createVNode(a,{icon:"fa-cog"})]),_:2},1040)]),default:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.fields,V=>(t.openBlock(),t.createBlock(c,{onClick:K=>o.toggleField(V),key:V.path},{default:t.withCtx(()=>[t.createVNode(a,{icon:o.fieldEnabled[V.path]?"fa-check-square":"fa-regular fa-square",left:""},null,8,["icon"]),t.createTextVNode(" "+t.toDisplayString(V.title),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1})]),_:1},8,["sort","enableSelection","enableActions","total","selectAll","deselectAll","selection","onClick:row","onClick:actions","onSelect:row:toggle","onSelect:multiple","onDeselect:multiple","rows","columns"]))]),_:1})):l.loading?(t.openBlock(),t.createBlock(f,{key:2,class:"empty",center:""})):(t.openBlock(),t.createBlock(f,{key:1,class:"empty",center:""},{default:t.withCtx(()=>[t.createVNode(y,null,{default:t.withCtx(()=>[t.createVNode(p,null,{default:t.withCtx(()=>[t.createElementVNode("div",null,"No "+t.toDisplayString(l.definition.plural)+" found.",1)]),_:1})]),_:1})]),_:1})),r.showFilters?(t.openBlock(),t.createBlock(f,{key:3,class:"filter-column"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"abovefilter",{},void 0,!0),t.createVNode(z,null,{default:t.withCtx(()=>[t.createVNode(h,{modelValue:l.keywords,"onUpdate:modelValue":n[1]||(n[1]=V=>l.keywords=V),loading:o.searching,debounce:500,placeholder:"Keyword Search"},null,8,["modelValue","loading"]),UE,r.dateFilterEnabled?(t.openBlock(),t.createElementBlock("div",PE,[t.createVNode(A,{field:o.dateRangeField,modelValue:l.dateRangeFilter,"onUpdate:modelValue":n[2]||(n[2]=V=>l.dateRangeFilter=V)},null,8,["field","modelValue"])])):t.createCommentVNode("",!0),jE,t.createVNode(I,{definition:l.definition,modelValue:l.actualFilter,"onUpdate:modelValue":n[3]||(n[3]=V=>l.actualFilter=V)},null,8,["definition","modelValue"])]),_:1}),t.renderSlot(e.$slots,"belowfilter",{},void 0,!0)]),_:3})):t.createCommentVNode("",!0)]),_:3})]),_:3},8,["class"]),t.createVNode(X,null,{default:t.withCtx(()=>[t.renderSlot(e.$slots,"footera",{},void 0,!0),t.createElementVNode("div",RE,[t.createVNode(Y,{page:l.page,"onUpdate:page":n[4]||(n[4]=V=>l.page=V),total:o.totalItems},null,8,["page","total"])]),t.renderSlot(e.$slots,"footerb",{},void 0,!0)]),_:3})],64)):t.createCommentVNode("",!0),l.loading?(t.openBlock(),t.createBlock(M,{key:1,large:""})):t.createCommentVNode("",!0)]),_:3})):t.createCommentVNode("",!0)}var cs=_(LE,[["render",zE],["__scopeId","data-v-d8907020"]]),$t={props:{options:{type:Object,default(){return{}}}},data(){return{}},methods:{dismiss(e){this.$emit("dismiss",e)},close(e){this.$emit("close",e)}}},lN="";const qE={props:{modal:{type:Object,required:!0}},data(){return{}},methods:{blanketClick(){this.dismiss()},dismiss(e){this.$sdk.closeModal(this.modal.id),this.modal.reject(e)},close(e){this.$sdk.closeModal(this.modal.id),this.modal.resolve(e)}},computed:{componentProps(){return this.modal.componentProps||{}},style(){var e={};return this.modal.style&&(e=Object.assign(e,this.modal.style)),e}}},HE={class:"modal-wrapper"};function GE(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",HE,[t.createElementVNode("div",{class:"modal-blanket",onClick:n[0]||(n[0]=(...a)=>o.blanketClick&&o.blanketClick(...a))}),t.createElementVNode("div",{class:"modal-content",style:t.normalizeStyle(o.style)},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.modal.component),t.mergeProps({options:r.modal.options},o.componentProps,{onClose:o.close,onDismiss:o.dismiss}),null,16,["options","onClose","onDismiss"]))],4)])}var ds=_(qE,[["render",GE],["__scopeId","data-v-53027fe5"]]),aN="";const WE={mixins:[$t]},KE={class:"padder"},ZE=["innerHTML"],YE={class:"padder"};function XE(e,n,r,i,l,o){const a=t.resolveComponent("flex-body"),s=t.resolveComponent("ux-button"),c=t.resolveComponent("flex-cell"),d=t.resolveComponent("flex-row"),u=t.resolveComponent("flex-footer"),m=t.resolveComponent("flex-column");return t.openBlock(),t.createBlock(m,{class:"wrapper"},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createElementVNode("div",KE,[t.createElementVNode("h5",null,t.toDisplayString(e.options.title),1),t.createElementVNode("div",{innerHTML:e.options.description},null,8,ZE)])]),_:1}),t.createVNode(u,null,{default:t.withCtx(()=>[t.createElementVNode("div",YE,[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s,{onClick:e.dismiss},{default:t.withCtx(()=>[t.createTextVNode("Cancel")]),_:1},8,["onClick"])]),_:1}),t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s,{onClick:e.close},{default:t.withCtx(()=>[t.createTextVNode("Confirm")]),_:1},8,["onClick"])]),_:1})]),_:1})])]),_:1})]),_:1})}var us=_(WE,[["render",XE],["__scopeId","data-v-f9a36fea"]]),sN="";const JE={data(){return{selected:null}},mixins:[$t],methods:{select(e){this.selected=e,this.close(e)}}},QE={class:"header"},vE={class:"padder"},eB=["onClick"],tB={key:0,class:"title"},nB={key:1,class:"description"},rB={class:"padder"};function oB(e,n,r,i,l,o){const a=t.resolveComponent("flex-header"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("flex-row"),u=t.resolveComponent("flex-body"),m=t.resolveComponent("ux-button"),f=t.resolveComponent("flex-footer"),p=t.resolveComponent("flex-column");return t.openBlock(),t.createBlock(p,{class:"wrapper"},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createElementVNode("div",QE,[t.createElementVNode("h5",null,t.toDisplayString(e.options.title),1),t.createElementVNode("div",null,t.toDisplayString(e.options.description),1)])]),_:1}),t.createVNode(u,{class:"body"},{default:t.withCtx(()=>[t.createElementVNode("div",vE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options.choices,y=>(t.openBlock(),t.createElementBlock("div",{class:"choice",onClick:h=>o.select(y)},[t.createVNode(d,{vcenter:""},{default:t.withCtx(()=>[t.createVNode(s,null,{default:t.withCtx(()=>[y.title?(t.openBlock(),t.createElementBlock("div",tB,t.toDisplayString(y.title),1)):t.createCommentVNode("",!0),y.description?(t.openBlock(),t.createElementBlock("div",nB,t.toDisplayString(y.description),1)):t.createCommentVNode("",!0)]),_:2},1024),t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-angle-right"})]),_:1})]),_:2},1024)],8,eB))),256))])]),_:1}),t.createVNode(f,null,{default:t.withCtx(()=>[t.createElementVNode("div",rB,[t.createVNode(m,{onClick:e.dismiss},{default:t.withCtx(()=>[t.createTextVNode("Cancel")]),_:1},8,["onClick"])])]),_:1})]),_:1})}var ms=_(JE,[["render",oB],["__scopeId","data-v-09008c8a"]]),cN="";const iB={mixins:[$t],data(){return{model:{}}},methods:{},computed:{fields(){return this.options.fields||[]}},created(){this.options.model&&(this.model=this.options.model)}},lB={class:"padder"},aB={class:"padder"};function sB(e,n,r,i,l,o){const a=t.resolveComponent("ux-form"),s=t.resolveComponent("flex-body"),c=t.resolveComponent("ux-button"),d=t.resolveComponent("flex-cell"),u=t.resolveComponent("flex-spacer"),m=t.resolveComponent("flex-row"),f=t.resolveComponent("flex-footer"),p=t.resolveComponent("flex-column");return t.openBlock(),t.createElementBlock("form",{class:"wrapper",onSubmit:n[2]||(n[2]=t.withModifiers((...y)=>e.submit&&e.submit(...y),["prevent","stop"]))},[t.createVNode(p,null,{default:t.withCtx(()=>[t.createVNode(s,null,{default:t.withCtx(()=>[t.createElementVNode("div",lB,[t.createElementVNode("h5",null,t.toDisplayString(e.options.title),1),t.createElementVNode("div",null,t.toDisplayString(e.options.description),1),t.createVNode(a,{ref:"form",modelValue:l.model,"onUpdate:modelValue":n[0]||(n[0]=y=>l.model=y),fields:o.fields},null,8,["modelValue","fields"])])]),_:1}),t.createVNode(f,null,{default:t.withCtx(()=>[t.createElementVNode("div",aB,[t.createVNode(m,null,{default:t.withCtx(()=>[t.createVNode(d,{shrink:""},{default:t.withCtx(()=>[t.createVNode(c,{tag:"a",onClick:e.dismiss},{default:t.withCtx(()=>[t.createTextVNode("Cancel")]),_:1},8,["onClick"])]),_:1}),t.createVNode(u),t.createVNode(d,{shrink:""},{default:t.withCtx(()=>[t.createVNode(c,{color:"primary",type:"submit",onClick:n[1]||(n[1]=y=>e.close(l.model))},{default:t.withCtx(()=>[t.createTextVNode("Confirm")]),_:1})]),_:1})]),_:1})])]),_:1})]),_:1})],32)}var fs=_(iB,[["render",sB],["__scopeId","data-v-3880d6f0"]]),dN="";const cB={components:{ContentBrowser:cs,Search:po},mixins:[$t],async created(){var e=this,n=await e.$sdk.content.glossary({hash:!0});e.loading=!1;var r=n[e.type];if(!r){e.$sdk.notify("You do not have the required permissions to list content of this type"),e.dismiss();return}e.definition=r},computed:{type(){return this.options.type},title(){return this.definition.title},plural(){return this.definition.plural},maximum(){return this.options.maximum||0},browserOptions(){return this.options.browserOptions||{}}},data(){return{search:"",searching:!1,definition:null,loading:!0,model:this.options.model.slice()}},methods:{rowClicked(e){this.$refs.browser.toggle(e)},selectionComplete(e){this.close(this.model)}}},dB={class:"header"},uB={class:"font-muted font-sm"};function mB(e,n,r,i,l,o){const a=t.resolveComponent("flex-column"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("search"),d=t.resolveComponent("ux-button"),u=t.resolveComponent("flex-row"),m=t.resolveComponent("flex-header"),f=t.resolveComponent("content-browser");return t.openBlock(),t.createBlock(a,{class:"wrapper"},{default:t.withCtx(()=>[l.loading?(t.openBlock(),t.createBlock(a,{key:0},{default:t.withCtx(()=>[t.createTextVNode(" Loading ")]),_:1})):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[l.definition?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(m,null,{default:t.withCtx(()=>[t.createElementVNode("div",dB,[t.createVNode(u,{vcenter:"",gap:""},{default:t.withCtx(()=>[t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.createElementVNode("h3",null,"Select "+t.toDisplayString(o.maximum==1?o.title:o.plural),1)]),_:1}),o.maximum?(t.openBlock(),t.createBlock(s,{key:0},{default:t.withCtx(()=>[t.createElementVNode("span",uB,"("+t.toDisplayString(l.model.length)+" of "+t.toDisplayString(o.maximum)+")",1)]),_:1})):t.createCommentVNode("",!0),t.createVNode(s,null,{default:t.withCtx(()=>[t.createVNode(c,{modelValue:l.search,"onUpdate:modelValue":n[0]||(n[0]=p=>l.search=p),loading:l.searching,debounce:500,placeholder:"Search"},null,8,["modelValue","loading"])]),_:1}),t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{color:"primary",onClick:o.selectionComplete},{default:t.withCtx(()=>[t.createTextVNode("Done")]),_:1},8,["onClick"])]),_:1})]),_:1})])]),_:1}),t.createVNode(f,{ref:"browser",search:l.search,"onClick:row":o.rowClicked,maximum:e.options.maximum,modelValue:l.model,"onUpdate:modelValue":n[1]||(n[1]=p=>l.model=p),type:e.options.type,options:o.browserOptions},null,8,["search","onClick:row","maximum","modelValue","type","options"])],64)):t.createCommentVNode("",!0)],64))]),_:1})}var ps=_(cB,[["render",mB],["__scopeId","data-v-7a6efddc"]]),uN="";const fB={components:{ScopeSelect:ka},mixins:[$t],computed:{type(){return this.options.type},action(){return this.options.action}},data(){return{model:this.options.model.slice()}},methods:{selectionComplete(e){this.close(this.model)}}},pB=e=>(t.pushScopeId("data-v-17b3e792"),e=e(),t.popScopeId(),e),hB={class:"header"},yB=pB(()=>t.createElementVNode("h3",null,"Select Scopes",-1)),gB={class:"padder"};function _B(e,n,r,i,l,o){const a=t.resolveComponent("flex-cell"),s=t.resolveComponent("ux-button"),c=t.resolveComponent("flex-row"),d=t.resolveComponent("flex-header"),u=t.resolveComponent("scope-select"),m=t.resolveComponent("flex-body"),f=t.resolveComponent("flex-column");return t.openBlock(),t.createBlock(f,{class:"wrapper"},{default:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createElementVNode("div",hB,[t.createVNode(c,{vcenter:"",gap:""},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[yB]),_:1}),t.createVNode(a,{shrink:""},{default:t.withCtx(()=>[t.createVNode(s,{color:"primary",onClick:o.selectionComplete},{default:t.withCtx(()=>[t.createTextVNode("Done")]),_:1},8,["onClick"])]),_:1})]),_:1})])]),_:1}),t.createVNode(m,{class:"scroll-body"},{default:t.withCtx(()=>[t.createElementVNode("div",gB,[t.createVNode(u,{action:o.action,type:o.type,modelValue:l.model,"onUpdate:modelValue":n[0]||(n[0]=p=>l.model=p)},null,8,["action","type","modelValue"])])]),_:1})]),_:1})}var hs=_(fB,[["render",_B],["__scopeId","data-v-17b3e792"]]);function kB(){var e=t.reactive({mounted:!1,screen:{width:1024,height:768},limits:{xs:600,sm:960,md:1264,lg:1904},breakpoint:{mobile:!1,tablet:!1,desktop:!1,xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xsOnly:!1,smOnly:!1,smAndDown:!1,smAndUp:!1,mdOnly:!1,mdAndDown:!1,mdAndUp:!1,lgOnly:!1,lgAndDown:!1,lgAndUp:!1,xlOnly:!1,point:0}}),n;let r;return e.resize=function(){var i=Math.max(r.innerWidth||0),l=Math.max(r.innerHeight||0);e.screen={width:i,height:l};var o={mobile:!1,tablet:!1,desktop:!1,xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xsOnly:!1,smOnly:!1,smAndDown:!1,smAndUp:!1,mdOnly:!1,mdAndDown:!1,mdAndUp:!1,lgOnly:!1,lgAndDown:!1,lgAndUp:!1,xlOnly:!1,point:0},a=0;i>e.limits.xs&&a++,i>e.limits.sm&&a++,i>e.limits.md&&a++,i>e.limits.lg&&a++,a<1&&(o.mobile=!0,o.xs=!0,o.xsOnly=!0,o.smAndDown=!0,o.mdAndDown=!0,o.lgAndDown=!0),a==1&&(o.tablet=!0,o.sm=!0,o.smOnly=!0,o.smAndDown=!0,o.mdAndDown=!0,o.lgAndDown=!0,o.smAndUp=!0),a==2&&(o.desktop=!0,o.md=!0,o.mdOnly=!0,o.mdAndDown=!0,o.lgAndDown=!0,o.smAndUp=!0,o.mdAndUp=!0),a==3&&(o.desktop=!0,o.lg=!0,o.lgOnly=!0,o.lgAndDown=!0,o.smAndUp=!0,o.mdAndUp=!0,o.lgAndUp=!0),a>3&&(o.desktop=!0,o.xl=!0,o.xlOnly=!0,o.smAndUp=!0,o.mdAndUp=!0,o.lgAndUp=!0),e.point=a,e.breakpoint=o},e.mount=function(i){n||(r=i,e.resize(),n=!0,e.mounted=!0,r.addEventListener("resize",e.resize))},e.unmount=function(){r.removeEventListener("resize",e.resize),r=!1,n=!1,e.mounted=!1},e}const bB=`qik vue ui ${Ae}`,ys={FlexColumn:bo,FlexBody:xo,FlexHeader:Co,FlexFooter:wo,FlexCell:Vo,FlexSpacer:Bo,FlexRow:Eo,UxPanel:So,UxPanelBody:No,UxPanelHeader:To,UxPanelFooter:Oo,UxList:Fl,UxListItem:Il,UxForm:uo,UxSubmissionForm:fo,UxFormField:nr,UxSubmissionForm:fo,UxRender:is,UxRenderField:ho,UxIcon:Tl,UxMenu:Ol,UxMenuList:Dl,UxImage:Al,UxButton:Bl,UxCheckbox:Ur,UxSwitch:Sl,UxLink:Nl,UxTabset:Do,UxTab:Ao,Avatar:El,Spinner:Lr,ProgressBar:Ml,UxModal:ds,Compile:os},xB={install(e,n){console.log(bB),n.modals=t.reactive([]),n.modal=function(r){return new Promise(function(i,l){r.id=n.modals.length,r.resolve=i,r.reject=l,n.modals.splice(r.id,0,r)})},n.browse=function(r,i){return i=i||{},i.type=r,i.model=i.model||[],n.modal({component:ps,options:i})},n.selectScopes=function(r){return r=r||{},r.model=r.model||[],n.modal({component:hs,options:r})},n.options=function(r,i,l){return n.modal({component:ms,options:{title:i,description:l,choices:r}})},n.prompt=function(r,i){return i=i||{},i.model=i.model||{},i.fields=r,n.modal({component:fs,options:i})},n.confirm=function(r,i){return i=i||{},i.title=r,n.modal({component:us,options:i})},n.closeModal=function(r){var i=n.modals.find(function(o){return o.id==r}),l=n.modals.indexOf(i);n.modals.splice(l,1)};for(const r in ys){const i=ys[r];e.component(r,i)}}};x.Avatar=El,x.CodeEditor=Ta,x.ContentBrowser=cs,x.DateRange=Ll,x.Device=kB,x.FileDrop=Na,x.FlexBody=xo,x.FlexCell=Vo,x.FlexColumn=bo,x.FlexFooter=wo,x.FlexHeader=Co,x.FlexRow=Eo,x.FlexSpacer=Bo,x.ModalMixin=$t,x.NativeSelect=et,x.Pager=Uh,x.Panel=So,x.PanelBody=No,x.PanelFooter=Oo,x.PanelHeader=To,x.ProgressBar=Ml,x.QikUI=xB,x.RememberScrollMixin=bl,x.ScopeSelect=ka,x.ScopeSelectButton=ba,x.Search=po,x.Selection=ls,x.Spinner=Lr,x.UXButton=Bl,x.UXCheckbox=Ur,x.UXForm=uo,x.UXFormField=nr,x.UXIcon=Tl,x.UXImage=Al,x.UXLink=Nl,x.UXList=Fl,x.UXListItem=Il,x.UXMenu=Ol,x.UXMenuList=Dl,x.UXRender=is,x.UXRenderField=ho,x.UXSubmissionForm=fo,x.UXSwitch=Sl,x.UXTab=Ao,x.UXTable=xl,x.UXTabset=Do,x.UxConfirmModal=us,x.UxContentModal=ps,x.UxModal=ds,x.UxOptionsModal=ms,x.UxPromptModal=fs,x.UxScopeModal=hs,Object.defineProperties(x,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
7
|
+
`;break;case"r":k+="\r";break;case"t":k+=" ";break;case"b":k+="\b";break;case"f":k+="\f";break;case"v":k+="\v";break;default:k+=G}else k+=G;return L||F('Unclosed quote after "'+k+'"',g),{type:a,value:k,raw:S+k+S}},_s=function(){var k=J(g),S=g,L;for(it(k)?g++:F("Unexpected "+_e(g),g);g<hn&&(k=J(g),pn(k));)g++;return L=E.slice(S,g),pe.hasOwnProperty(L)?{type:a,value:pe[L],raw:L}:L===w?{type:s}:{type:l,name:L}},ks=function(k){for(var S,L=[],G,_t=!1,Ue=0;g<hn;)if(He(),S=J(g),S===k){_t=!0,g++,k===q&&Ue&&Ue>=L.length&&F("Unexpected token "+String.fromCharCode(k),g);break}else if(S===h){if(g++,Ue++,Ue!==L.length){if(k===q)F("Unexpected token ,",g);else if(k===X)for(var lt=L.length;lt<Ue;lt++)L.push(null)}}else G=Pt(),(!G||G.type===i)&&F("Expected comma",g),L.push(G);return _t||F("Expected "+String.fromCharCode(k),g),L},EB=function(){var k,S;for(k=J(g),k===z?S=BB():S=_s(),He(),k=J(g);k===y||k===Y||k===z;)g++,k===y?(He(),S={type:o,computed:!1,object:S,property:_s()}):k===Y?(S={type:o,computed:!0,object:S,property:Pt()},He(),k=J(g),k!==X&&F("Unclosed [",g),g++):k===z&&(S={type:c,arguments:ks(q),callee:S}),He(),k=J(g);return S},BB=function(){g++;var k=Pt();if(He(),J(g)===q)return g++,k;F("Unclosed (",g)},SB=function(){return g++,{type:p,elements:ks(X)}},ir=[],_o,bs;g<hn;)_o=J(g),_o===V||_o===h?g++:(bs=Pt())?ir.push(bs):g<hn&&F('Unexpected "'+_e(g)+'"',g);return ir.length===1?ir[0]:{type:i,body:ir}};we.version="0.3.5",we.toString=function(){return"JavaScript Expression Parser (JSEP) v"+we.version},we.addUnaryOp=function(E){return fe=Math.max(E.length,fe),se[E]=ge,this},we.addBinaryOp=function(E,g){return Ce=Math.max(E.length,Ce),ce[E]=g,this},we.addLiteral=function(E,g){return pe[E]=g,this},we.removeUnaryOp=function(E){return delete se[E],E.length===fe&&(fe=me(se)),this},we.removeAllUnaryOps=function(){return se={},fe=0,this},we.removeBinaryOp=function(E){return delete ce[E],E.length===Ce&&(Ce=me(ce)),this},we.removeAllBinaryOps=function(){return ce={},Ce=0,this},we.removeLiteral=function(E){return delete pe[E],this},we.removeAllLiterals=function(){return pe={},this},e.exports?n=e.exports=we:n.parse=we})()})(lo,lo.exports);var sC=lo.exports,Oa={"||":function(e,n){return e||n},"&&":function(e,n){return e&&n},"|":function(e,n){return e|n},"^":function(e,n){return e^n},"&":function(e,n){return e&n},"==":function(e,n){return e==n},"!=":function(e,n){return e!=n},"===":function(e,n){return e===n},"!==":function(e,n){return e!==n},"<":function(e,n){return e<n},">":function(e,n){return e>n},"<=":function(e,n){return e<=n},">=":function(e,n){return e>=n},"<<":function(e,n){return e<<n},">>":function(e,n){return e>>n},">>>":function(e,n){return e>>>n},"+":function(e,n){return e+n},"-":function(e,n){return e-n},"*":function(e,n){return e*n},"/":function(e,n){return e/n},"%":function(e,n){return e%n}},cC={"-":function(e){return-e},"+":function(e){return+e},"~":function(e){return~e},"!":function(e){return!e}};function Da(e,n){return e.map(function(r){return ae(r,n)})}function Aa(e,n){var r,i=ae(e.object,n);if(r=e.computed?ae(e.property,n):e.property.name,/^__proto__|prototype|constructor$/.test(r))throw Error('Access to member "'+r+'" disallowed.');return[i,i[r]]}function ae(e,n){var r=e;switch(r.type){case"ArrayExpression":return Da(r.elements,n);case"BinaryExpression":return Oa[r.operator](ae(r.left,n),ae(r.right,n));case"CallExpression":var i,l,o;return r.callee.type==="MemberExpression"?(i=(o=Aa(r.callee,n))[0],l=o[1]):l=ae(r.callee,n),typeof l!="function"?void 0:l.apply(i,Da(r.arguments,n));case"ConditionalExpression":return ae(r.test,n)?ae(r.consequent,n):ae(r.alternate,n);case"Identifier":return n[r.name];case"Literal":return r.value;case"LogicalExpression":return r.operator==="||"?ae(r.left,n)||ae(r.right,n):r.operator==="&&"?ae(r.left,n)&&ae(r.right,n):Oa[r.operator](ae(r.left,n),ae(r.right,n));case"MemberExpression":return Aa(r,n)[1];case"ThisExpression":return n;case"UnaryExpression":return cC[r.operator](ae(r.argument,n));default:return}}function dC(e,n,r,i){for(var l=e.length,o=r+(i?1:-1);i?o--:++o<l;)if(n(e[o],o,e))return o;return-1}var uC=dC;function mC(e){return e!==e}var fC=mC;function pC(e,n,r){for(var i=r-1,l=e.length;++i<l;)if(e[i]===n)return i;return-1}var hC=pC,yC=uC,gC=fC,_C=hC;function kC(e,n,r){return n===n?_C(e,n,r):yC(e,gC,r)}var bC=kC,xC=9007199254740991;function CC(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=xC}var Ma=CC,wC=Uo,VC=Ma;function EC(e){return e!=null&&VC(e.length)&&!wC(e)}var Fa=EC,BC=Ht,SC=Rt,NC=Gt,TC="[object String]";function OC(e){return typeof e=="string"||!SC(e)&&NC(e)&&BC(e)==TC}var DC=OC,AC=Ea,Ia=1/0,MC=17976931348623157e292;function FC(e){if(!e)return e===0?e:0;if(e=AC(e),e===Ia||e===-Ia){var n=e<0?-1:1;return n*MC}return e===e?e:0}var IC=FC,$C=IC;function LC(e){var n=$C(e),r=n%1;return n===n?r?n-r:n:0}var UC=LC,PC=Ho;function jC(e,n){return PC(n,function(r){return e[r]})}var RC=jC;function zC(e,n){for(var r=-1,i=Array(e);++r<e;)i[r]=n(r);return i}var qC=zC,HC=Ht,GC=Gt,WC="[object Arguments]";function KC(e){return GC(e)&&HC(e)==WC}var ZC=KC,$a=ZC,YC=Gt,La=Object.prototype,XC=La.hasOwnProperty,JC=La.propertyIsEnumerable,QC=$a(function(){return arguments}())?$a:function(e){return YC(e)&&XC.call(e,"callee")&&!JC.call(e,"callee")},vC=QC,ao={exports:{}};function e0(){return!1}var t0=e0;(function(e,n){var r=zt,i=t0,l=n&&!n.nodeType&&n,o=l&&!0&&e&&!e.nodeType&&e,a=o&&o.exports===l,s=a?r.Buffer:void 0,c=s?s.isBuffer:void 0,d=c||i;e.exports=d})(ao,ao.exports);var n0=9007199254740991,r0=/^(?:0|[1-9]\d*)$/;function o0(e,n){var r=typeof e;return n=n==null?n0:n,!!n&&(r=="number"||r!="symbol"&&r0.test(e))&&e>-1&&e%1==0&&e<n}var i0=o0,l0=Ht,a0=Ma,s0=Gt,c0="[object Arguments]",d0="[object Array]",u0="[object Boolean]",m0="[object Date]",f0="[object Error]",p0="[object Function]",h0="[object Map]",y0="[object Number]",g0="[object Object]",_0="[object RegExp]",k0="[object Set]",b0="[object String]",x0="[object WeakMap]",C0="[object ArrayBuffer]",w0="[object DataView]",V0="[object Float32Array]",E0="[object Float64Array]",B0="[object Int8Array]",S0="[object Int16Array]",N0="[object Int32Array]",T0="[object Uint8Array]",O0="[object Uint8ClampedArray]",D0="[object Uint16Array]",A0="[object Uint32Array]",W={};W[V0]=W[E0]=W[B0]=W[S0]=W[N0]=W[T0]=W[O0]=W[D0]=W[A0]=!0,W[c0]=W[d0]=W[C0]=W[u0]=W[w0]=W[m0]=W[f0]=W[p0]=W[h0]=W[y0]=W[g0]=W[_0]=W[k0]=W[b0]=W[x0]=!1;function M0(e){return s0(e)&&a0(e.length)&&!!W[l0(e)]}var F0=M0;function I0(e){return function(n){return e(n)}}var $0=I0,so={exports:{}};(function(e,n){var r=Mo,i=n&&!n.nodeType&&n,l=i&&!0&&e&&!e.nodeType&&e,o=l&&l.exports===i,a=o&&r.process,s=function(){try{var c=l&&l.require&&l.require("util").types;return c||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(so,so.exports);var L0=F0,U0=$0,Ua=so.exports,Pa=Ua&&Ua.isTypedArray,P0=Pa?U0(Pa):L0,j0=P0,R0=qC,z0=vC,q0=Rt,H0=ao.exports,G0=i0,W0=j0,K0=Object.prototype,Z0=K0.hasOwnProperty;function Y0(e,n){var r=q0(e),i=!r&&z0(e),l=!r&&!i&&H0(e),o=!r&&!i&&!l&&W0(e),a=r||i||l||o,s=a?R0(e.length,String):[],c=s.length;for(var d in e)(n||Z0.call(e,d))&&!(a&&(d=="length"||l&&(d=="offset"||d=="parent")||o&&(d=="buffer"||d=="byteLength"||d=="byteOffset")||G0(d,c)))&&s.push(d);return s}var X0=Y0,J0=Object.prototype;function Q0(e){var n=e&&e.constructor,r=typeof n=="function"&&n.prototype||J0;return e===r}var v0=Q0;function ew(e,n){return function(r){return e(n(r))}}var tw=ew,nw=tw,rw=nw(Object.keys,Object),ow=rw,iw=v0,lw=ow,aw=Object.prototype,sw=aw.hasOwnProperty;function cw(e){if(!iw(e))return lw(e);var n=[];for(var r in Object(e))sw.call(e,r)&&r!="constructor"&&n.push(r);return n}var dw=cw,uw=X0,mw=dw,fw=Fa;function pw(e){return fw(e)?uw(e):mw(e)}var hw=pw,yw=RC,gw=hw;function _w(e){return e==null?[]:yw(e,gw(e))}var kw=_w,bw=bC,xw=Fa,Cw=DC,ww=UC,Vw=kw,Ew=Math.max;function Bw(e,n,r,i){e=xw(e)?e:Vw(e),r=r&&!i?ww(r):0;var l=e.length;return r<0&&(r=Ew(l+r,0)),Cw(e)?r<=l&&e.indexOf(n,r)>-1:!!l&&bw(e,n,r)>-1}var Sw=Bw;const Ft={};function Nw(e,n,r,i){return e?Array.isArray(e)?e.filter(function(l){const o=Cn(l,n);let a;switch(i){case">":a=o>r;break;case"<":a=o<r;break;case">=":a=o>=r;break;case"<=":a=o<=r;break;case"in":a=Sw(o,r);break;default:r===void 0?a=o:a=o==r;break}return a}):(console.error("array.filter value was not provided as array",{input:e}),[]):[]}function Tw(e){return e.reduce(function(n,r){return n+r},0)}function Ow(e,n,r,i,l){if(!e)return[];if(l=l||{},l.flat=r,l.unique=i,!Array.isArray(e))return console.error("array.filter value was not provided as array",{input:e}),[];let o=e.reduce(function(a,s){const c=Cn(s,n),d=!c&&c!==!1&&c!==0;return l.excludeNull&&d||a.push(c),a},[]);return l.unique&&(o=[...new Set(o)]),l.flat&&(o=o.flat()),o}Ft.evaluateExpression=function(e,n){if(typeof e=="function")return e(n);n=Object.assign({},{Math,String,Array,Date,Boolean,parseInt,parseFloat,array:{filter:Nw,extract:Ow,sum:Tw},create(o,...a){return new o(...a)}},n);var i,l;try{i=sC(e),l=ae(i,n)}catch(o){console.log("There was an error evaluating your expression",{expression:e,error:o})}finally{}return l};function co(e){switch(String(e).toLowerCase()){case"true":case"y":case"yes":case"1":case"t":e=!0;break;case"false":case"n":case"no":case"0":case"f":case"undefined":case"null":case"":case"-1":e=!1;break}return!!e}function fn(e,n,r,i,l,o){n=n||[],r=Math.max(r,i);var a=n.length,s=a>=r;if(!s){var c=r-a,d=Array(c).fill().map(o);return[...n,...d]}return n}function Dw(e,n){if(n)return n;function r(f){return f===void 0||typeof f=="undefined"||f===null}var i=parseInt(e.minimum),l=parseInt(e.maximum),o=parseInt(e.ask||0);o=Math.max(o,i),o=l?Math.min(o,l):o;var a=l===1;e.asObject&&e.type==="group"&&(l===1&&i===1?a=!0:a=!1);var s=!a,c=(e.type==="reference"?e.defaultReferences:e.defaultValues)||[],d=c[0],u;switch(e.type){case"date":let f=function(p){switch(String(p).toLowerCase()){case"now":return new Date}return new Date(p)};s?(c.length&&(l?u=c.slice(0,l).map(function(p){return f(p)}):u=c.slice().map(function(p){return f(p)})),u=fn(e,u,i,o,l,function(){return f(new Date)})):u=r(d)?void 0:f(d);break;case"integer":case"decimal":case"number":case"float":s?(c.length&&(l?u=c.slice(0,l).map(function(p){return Number(p)}):u=c.slice().map(function(p){return Number(p)})),u=fn(e,u,i,o,l,function(){return""})):u=r(d)?void 0:Number(d);break;case"group":if(e.asObject){var m=o;s?m>0?u=Array(m).fill().map(function(){return{}}):u=[]:u=r(d)?{}:d}break;case"object":var m=o;s?m>0?u=Array(m).fill().map(function(){return{}}):u=[]:u=r(d)?{}:d;break;case"boolean":s?(c.length&&(l?u=c.slice(0,l).map(function(p){return co(p)}):u=c.slice().map(function(p){return co(p)})),u=fn(e,u,i,o,l,function(){})):u=r(d)?!1:co(d);break;case"reference":if(e.widget==="form"){var m=o;s?m>0?u=Array(m).fill().map(function(){return{}}):u=[]:i?u=r(d)?{}:d:u=void 0}else s?c.length?u=c.slice(0,l):u=[]:u=r(d)?void 0:d;break;case"string":s?(c.length&&(u=c.slice(0,l)),u=fn(e,u,i,o,l,function(){return""})):u=r(d)?"":d;break;default:s?(c.length&&(u=c.slice(0,l)),u=fn(e,u,i,o,l,function(){})):u=r(d)?"":d;break}return u}var JS="";function ze(e){return function(){var n=this;if(!n.expressions)return;let r=n.expressions[e];if(!r)return;let i=n.expressionsContext;return Ft.evaluateExpression(r,i)}}const Aw={components:{InternalRouteSelect:Xx,InternalMenuSelect:aC,ButtonSelect:Fb,NativeSelect:et,DateField:Ca,DateRange:Mk,TextField:xa,CurrencyField:Y_,TextArea:kk,Checkbox:Pk,FilterInput:Z1,CustomHtml:Gk,BooleanSwitch:eb,FieldGroup:wb,ContentSelect:_a,TypeSelect:d_,ScopeSelect:B_,FieldSelect:L_,TimezoneSelect:Jy,PhoneNumberInput:jy,Upload:ub,ObjectField:zb,OptionsManager:ax,CodeEditorField:_x,ExpressionField:Sx,RichTextField:Px},props:{trail:{type:Array,default(){return[]}},submission:{type:Boolean,default:!1},field:{type:Object,required:!0},parentModel:{type:Object},modelValue:{type:Object,required:!0},includeOfficeOnly:{type:Boolean,default:!1}},data(){return{watching:!0,defaultValue:null,model:this.modelValue,touched:!1,focussed:!1,validateResults:{valid:!0},mounted:!1,subFormState:{},isDirty:!1,isDirtyBeforeInput:!1}},inject:["parentFormElement","additionalContext"],provide(){return{fieldPath:this.fieldPath}},created(){this.checkDirtyState()},mounted(){const e=this;e.mounted=!0,e.parentFormElement&&e.parentFormElement.childFormElements&&e.parentFormElement.childFormElements.push(e)},beforeUnmount(){const e=this;if(e.mounted=!1,e.parentFormElement){var n=e.parentFormElement.childFormElements.indexOf(e);e.parentFormElement.childFormElements.splice(n,1)}},methods:{fieldDefaultValue(){var e=this.expressions&&this.expressions.defaultValue?this.getExpressionDefaultValue:void 0,n=Dw(this.actualField),r=this.cleanInput(e||n);return r},checkDirtyState(){var e=this.fieldModel,n=e||e===!1||e===0,r=this.fieldDefaultValue(),i=JSON.stringify(this.cleanOutput(e)),l=JSON.stringify(this.cleanOutput(r));n&&i!=l?(this.isDirty=!0,this.isDirtyBeforeInput=!0,this.fieldModel=e):(this.isDirty=!1,this.isDirtyBeforeInput=!1,this.fieldModel=r)},groupStateAltered(e){this.subFormState=e},focus(){this.focussed=!0},blur(){this.focussed=!1,this.expressions&&this.expressions.value&&(this.fieldModel=this.getExpressionValue)},touch(){this.touched=!0},untouch(){this.touched=!1},reset(){this.untouch(),this.watching=!1;var e=this.fieldDefaultValue();Array.isArray(e)&&(e=[]),this.model[this.key]=e,this.$nextTick(function(){this.watching=!0})},cleanInput(e){return this.fieldCleanInput(e)},cleanOutput(e){return this.fieldCleanOutput(e)},fieldCleanInput(e){var i;var n=this,r=(i=n.expressions)==null?void 0:i.transform;return r&&typeof r.set=="function"&&(e=r.set(e)),e},fieldCleanOutput(e){var i;var n=this,r=(i=n.expressions)==null?void 0:i.transform;return r&&typeof r.get=="function"&&(e=r.get(e)),e}},watch:{mounted(e){e?this.$emit("field:mount",this):this.$emit("field:unmount",this)},visible(e){e?this.untouch():(this.touched=!1,this.expressions&&this.expressions.value?this.fieldModel=this.getExpressionValue:this.fieldModel=void 0)},focussed(e){e?this.$emit("field:focus",this):this.$emit("field:blur",this)},invalid(e){this.$emit("field:invalid",this)},valid(e){this.$emit("field:valid",this)},error(e){this.$emit("field:error",this)},touched(e){this.$emit("field:touched",this)},dirty(e){this.$emit("field:dirty",this)},changeString(e){this.validateResults=this.$sdk.content.validateField(this.fieldModel,this.actualField)},modelValue(e,n){this.watching&&(this.model=e,this.touched=!1,this.checkDirtyState())},getExpressionHide(e){},getExpressionDefaultValue(e){this.isDirtyBeforeInput||this.touched&&this.dirty||(this.fieldModel=e)},getExpressionValue(e){this.fieldModel=e}},computed:{fieldPath(){return this.currentTrail.join(".")},currentTrail(){var e=this.trail.slice();return e.push(this.field.key),e},title(){return this.field.title},actualField(){var e=this.field,n=e;return this.getExpressionRequired&&(n=Object.assign({},n,{minimum:1})),this.getExpressionReferenceType&&(n=Object.assign({},n,{referenceType:this.getExpressionReferenceType})),this.getExpressionVisualHide&&(n=Object.assign({},n,{visualHide:this.getExpressionVisualHide})),this.getExpressionWidgetType&&(n=Object.assign({},n,{widget:this.getExpressionWidgetType})),this.getExpressionDataType&&(n=Object.assign({},n,{type:this.getExpressionDataType})),this.getExpressionOptions&&(n=Object.assign({},n,{options:this.getExpressionOptions})),this.getExpressionSyntax&&(n=Object.assign({},n,{syntax:this.getExpressionSyntax})),this.getExpressionCurrency&&(n=Object.assign({},n,{currency:this.getExpressionCurrency})),n},changeString(){const e=this.fieldModel;return`${$r(e)}-${this.actualField.minimum}-${this.actualField.referenceType}`},valid(){return!this.invalid},error(){return!this.focussed&&this.touched&&this.invalid},invalid(){var e=this.subFormState&&this.subFormState.invalid;if(e)return{invalidSubForm:this.subFormState,mounted:this.mounted};var n=!this.validateResults.valid;return this.hidden?!1:n},dirty(){return this.isDirty},getExpressionHide(){if(!this.expressions)return;let e=this.expressions.show,n=this.expressions.hide,r=this.expressionsContext;if(e)return!Ft.evaluateExpression(e,r);if(n)return Ft.evaluateExpression(n,r)},getExpressionRequired:ze("required"),getExpressionDefaultValue:ze("defaultValue"),getExpressionValue:ze("value"),getExpressionReferenceType:ze("referenceType"),getExpressionWidgetType:ze("widget"),getExpressionDataType:ze("type"),getExpressionOptions:ze("options"),getExpressionSyntax:ze("syntax"),getExpressionCurrency:ze("currency"),getExpressionVisualHide:ze("visualHide"),expressions(){return this.field.expressions},expressionsContext(){var r;var e=((r=this.additionalContext)==null?void 0:r.value)||{};return{this:this.model,self:this.model,model:this.model,data:this.parentModel||this.model,additional:B({},e)}},officeOnly(){return this.submission&&this.field.officeOnly},hidden(){return this.officeOnly&&!this.includeOfficeOnly||this.actualField.readOnly?!0:this.getExpressionHide},visible(){return this.mounted&&!this.hidden},type(){return this.actualField.type||"string"},key(){return this.actualField.key},isGroup(){return this.type==="group"},asObject(){return this.widget==="form"||this.isGroup&&this.actualField.asObject},visualHide(){return this.actualField.visualHide},layoutGroup(){return this.isGroup&&!this.actualField.asObject},fieldModel:{get(){return this.cleanOutput(this.model[this.key])},set(e){var n=this.cleanInput(e);this.model[this.key]!=n&&(this.model[this.key]=n,this.isDirty=!0,this.$emit("update:modelValue",this.model))}},sourceModel:{get(){return this.model},set(e){this.model=e,this.$emit("update:modelValue",this.model)}},classes(){var e=[];return e.push(`ux-field-${this.type}`),this.layoutGroup&&e.push("ux-layout-only"),this.touched&&e.push("ux-field-touched"),this.dirty&&e.push("ux-field-dirty"),this.valid&&e.push("ux-field-valid"),this.invalid&&e.push("ux-field-invalid"),this.error&&e.push("ux-field-error"),this.visualHide&&e.push("ux-field-hide"),e},widget(){if(this.type=="group")return this.type;var e=this.actualField.widget;switch(e){case"form":e=this.submission?"form":"content-select";break;case"internal-menu":case"internal-route":case"content-select":case"select":case"checkbox":case"daterange":case"datefield":case"richtext":case"textarea":case"switch":case"email":case"url":case"currency":case"timezone":case"country":case"upload":case"code":case"expression":case"options":case"button":case"type-select":case"scope-select":case"field-select":case"html":case"filter":case"value":break;case"password":return"textfield";case"phone":case"phonenumber":return"phone";default:switch(this.type){case"date":e="datefield";break;case"reference":e="content-select";break;case"boolean":e="checkbox";break;default:case"string":e="textfield";break;case"object":e="object";break}break}return e}}},Mw={key:29,class:"ux-field-message"};function Fw(e,n,r,i,l,o){const a=t.resolveComponent("internal-route-select"),s=t.resolveComponent("internal-menu-select"),c=t.resolveComponent("custom-html"),d=t.resolveComponent("filter-input"),u=t.resolveComponent("checkbox"),m=t.resolveComponent("boolean-switch"),f=t.resolveComponent("upload"),p=t.resolveComponent("field-group"),y=t.resolveComponent("field-select"),h=t.resolveComponent("native-select"),A=t.resolveComponent("button-select"),I=t.resolveComponent("text-field"),z=t.resolveComponent("currency-field"),q=t.resolveComponent("date-field"),Y=t.resolveComponent("date-range"),X=t.resolveComponent("content-select"),M=t.resolveComponent("type-select"),V=t.resolveComponent("scope-select"),K=t.resolveComponent("rich-text-field"),F=t.resolveComponent("text-area"),ge=t.resolveComponent("timezone-select"),se=t.resolveComponent("phone-number-input"),ce=t.resolveComponent("object-field"),me=t.resolveComponent("options-manager"),fe=t.resolveComponent("code-editor-field"),Ce=t.resolveComponent("flex-column"),pe=t.resolveComponent("expression-field");return o.visible?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["ux-field",o.classes]),onFocusin:n[28]||(n[28]=(...w)=>o.focus&&o.focus(...w)),onFocusout:n[29]||(n[29]=(...w)=>o.blur&&o.blur(...w))},[o.widget=="internal-route"?(t.openBlock(),t.createBlock(a,{key:0,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[0]||(n[0]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="internal-menu"?(t.openBlock(),t.createBlock(s,{key:1,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[1]||(n[1]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="html"?(t.openBlock(),t.createBlock(c,{key:2,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[2]||(n[2]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="value"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[],64)):t.createCommentVNode("",!0),o.widget=="filter"?(t.openBlock(),t.createBlock(d,{key:4,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[3]||(n[3]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="checkbox"?(t.openBlock(),t.createBlock(u,{key:5,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[4]||(n[4]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="switch"?(t.openBlock(),t.createBlock(m,{key:6,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[5]||(n[5]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="upload"?(t.openBlock(),t.createBlock(f,{key:7,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[6]||(n[6]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="group"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:8},[o.asObject?(t.openBlock(),t.createBlock(p,{key:0,trail:o.currentTrail,includeOfficeOnly:r.includeOfficeOnly,submission:r.submission,"onForm:state":o.groupStateAltered,ref:"group",onTouched:o.touch,field:o.actualField,parentModel:r.parentModel,modelValue:o.fieldModel,"onUpdate:modelValue":n[7]||(n[7]=w=>o.fieldModel=w)},null,8,["trail","includeOfficeOnly","submission","onForm:state","onTouched","field","parentModel","modelValue"])):(t.openBlock(),t.createBlock(p,{key:1,trail:r.trail,includeOfficeOnly:r.includeOfficeOnly,submission:r.submission,"onForm:state":o.groupStateAltered,ref:"group",onTouched:o.touch,field:o.actualField,parentModel:r.parentModel,modelValue:o.sourceModel,"onUpdate:modelValue":n[8]||(n[8]=w=>o.sourceModel=w)},null,8,["trail","includeOfficeOnly","submission","onForm:state","onTouched","field","parentModel","modelValue"]))],64)):t.createCommentVNode("",!0),o.widget=="form"?(t.openBlock(),t.createBlock(p,{key:9,trail:o.currentTrail,includeOfficeOnly:r.includeOfficeOnly,submission:r.submission,"onForm:state":o.groupStateAltered,ref:"group",onTouched:o.touch,field:o.actualField,parentModel:r.parentModel,modelValue:o.fieldModel,"onUpdate:modelValue":n[9]||(n[9]=w=>o.fieldModel=w)},null,8,["trail","includeOfficeOnly","submission","onForm:state","onTouched","field","parentModel","modelValue"])):t.createCommentVNode("",!0),o.widget=="field-select"?(t.openBlock(),t.createBlock(y,{key:10,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[10]||(n[10]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="select"?(t.openBlock(),t.createBlock(h,{key:11,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[11]||(n[11]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="button"?(t.openBlock(),t.createBlock(A,{key:12,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[12]||(n[12]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="textfield"?(t.openBlock(),t.createBlock(I,{key:13,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[13]||(n[13]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="currency"?(t.openBlock(),t.createBlock(z,{key:14,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[14]||(n[14]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="datefield"?(t.openBlock(),t.createBlock(q,{key:15,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[15]||(n[15]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="daterange"?(t.openBlock(),t.createBlock(Y,{key:16,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[16]||(n[16]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="content-select"?(t.openBlock(),t.createBlock(X,{key:17,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[17]||(n[17]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="type-select"?(t.openBlock(),t.createBlock(M,{key:18,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[18]||(n[18]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="scope-select"?(t.openBlock(),t.createBlock(V,{key:19,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[19]||(n[19]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="richtext"?(t.openBlock(),t.createBlock(K,{key:20,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[20]||(n[20]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="textarea"?(t.openBlock(),t.createBlock(F,{key:21,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[21]||(n[21]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="timezone"?(t.openBlock(),t.createBlock(ge,{key:22,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[22]||(n[22]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="phone"?(t.openBlock(),t.createBlock(se,{key:23,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[23]||(n[23]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="value"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:24},[],64)):t.createCommentVNode("",!0),o.widget=="object"?(t.openBlock(),t.createBlock(ce,{key:25,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[24]||(n[24]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="options"?(t.openBlock(),t.createBlock(me,{key:26,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[25]||(n[25]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.widget=="code"?(t.openBlock(),t.createBlock(Ce,{key:27,style:{"min-height":"300px"}},{default:t.withCtx(()=>[t.createVNode(fe,{onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[26]||(n[26]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])]),_:1})):t.createCommentVNode("",!0),o.widget=="expression"?(t.openBlock(),t.createBlock(pe,{key:28,onTouched:o.touch,field:o.actualField,modelValue:o.fieldModel,"onUpdate:modelValue":n[27]||(n[27]=w=>o.fieldModel=w)},null,8,["onTouched","field","modelValue"])):t.createCommentVNode("",!0),o.error&&l.validateResults.message?(t.openBlock(),t.createElementBlock("div",Mw,t.toDisplayString(l.validateResults.message),1)):t.createCommentVNode("",!0)],34)):t.createCommentVNode("",!0)}var nr=_(Aw,[["render",Fw],["__scopeId","data-v-791755b4"]]);function Iw(e,n,r,i){var l=-1,o=e==null?0:e.length;for(i&&o&&(r=e[++l]);++l<o;)r=n(r,e[l],l,e);return r}var $w=Iw;function Lw(e){return function(n){return e==null?void 0:e[n]}}var Uw=Lw,Pw=Uw,jw={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Rw=Pw(jw),zw=Rw,qw=zw,Hw=dr,Gw=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ww="\\u0300-\\u036f",Kw="\\ufe20-\\ufe2f",Zw="\\u20d0-\\u20ff",Yw=Ww+Kw+Zw,Xw="["+Yw+"]",Jw=RegExp(Xw,"g");function Qw(e){return e=Hw(e),e&&e.replace(Gw,qw).replace(Jw,"")}var vw=Qw,eV=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function tV(e){return e.match(eV)||[]}var nV=tV,rV=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function oV(e){return rV.test(e)}var iV=oV,ja="\\ud800-\\udfff",lV="\\u0300-\\u036f",aV="\\ufe20-\\ufe2f",sV="\\u20d0-\\u20ff",cV=lV+aV+sV,Ra="\\u2700-\\u27bf",za="a-z\\xdf-\\xf6\\xf8-\\xff",dV="\\xac\\xb1\\xd7\\xf7",uV="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",mV="\\u2000-\\u206f",fV=" \\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",qa="A-Z\\xc0-\\xd6\\xd8-\\xde",pV="\\ufe0e\\ufe0f",Ha=dV+uV+mV+fV,Ga="['\u2019]",Wa="["+Ha+"]",hV="["+cV+"]",Ka="\\d+",yV="["+Ra+"]",Za="["+za+"]",Ya="[^"+ja+Ha+Ka+Ra+za+qa+"]",gV="\\ud83c[\\udffb-\\udfff]",_V="(?:"+hV+"|"+gV+")",kV="[^"+ja+"]",Xa="(?:\\ud83c[\\udde6-\\uddff]){2}",Ja="[\\ud800-\\udbff][\\udc00-\\udfff]",It="["+qa+"]",bV="\\u200d",Qa="(?:"+Za+"|"+Ya+")",xV="(?:"+It+"|"+Ya+")",va="(?:"+Ga+"(?:d|ll|m|re|s|t|ve))?",es="(?:"+Ga+"(?:D|LL|M|RE|S|T|VE))?",ts=_V+"?",ns="["+pV+"]?",CV="(?:"+bV+"(?:"+[kV,Xa,Ja].join("|")+")"+ns+ts+")*",wV="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",VV="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",EV=ns+ts+CV,BV="(?:"+[yV,Xa,Ja].join("|")+")"+EV,SV=RegExp([It+"?"+Za+"+"+va+"(?="+[Wa,It,"$"].join("|")+")",xV+"+"+es+"(?="+[Wa,It+Qa,"$"].join("|")+")",It+"?"+Qa+"+"+va,It+"+"+es,VV,wV,Ka,BV].join("|"),"g");function NV(e){return e.match(SV)||[]}var TV=NV,OV=nV,DV=iV,AV=dr,MV=TV;function FV(e,n,r){return e=AV(e),n=r?void 0:n,n===void 0?DV(e)?MV(e):OV(e):e.match(n)||[]}var IV=FV,$V=$w,LV=vw,UV=IV,PV="['\u2019]",jV=RegExp(PV,"g");function RV(e){return function(n){return $V(UV(LV(n).replace(jV,"")),e,"")}}var zV=RV,qV=zV,HV=qV(function(e,n,r){return e+(r?"-":"")+n.toLowerCase()}),GV=HV,QS="";const WV={props:{parentModel:{type:Object},parentForm:{type:Object},trail:{type:Array,default(){return[]}},fields:{type:Array,default(){return[]}},modelValue:{type:Object,default(){return{}}},flex:{type:Boolean,default:!1},submission:{type:Boolean,default:!1},includeOfficeOnly:{type:Boolean,default:!1}},inject:["form","parentFormElement"],watch:{modelValue(e,n){this.model=e}},data(){return{mounted:!1,model:this.modelValue,touched:!1,invalid:!1,error:!1,dirty:!1,focussed:!1,childFormElements:[]}},provide(){return{parentFormElement:this.parentFormElement||this}},mounted(){const e=this;e.mounted=!0},beforeUnmount(){const e=this;e.mounted=!1},methods:{getFieldKey(e){let n=GV(`${e.title}-${e.key}`);return e.incrementor&&(n=`${n}-${e.incrementor}`),n},touch(){(this.childFormElements||[]).forEach(function(e){e.touch()}),this.touched=!0},untouch(){(this.childFormElements||[]).forEach(function(e){e.untouch()}),this.touched=!1},reset(){this.untouch(),(this.childFormElements||[]).forEach(function(e){e.reset()}),this.model={}},fieldUnmounted(e){this.fieldStateChange(e,"unmount"),this.$emit("field:unmount",this)},fieldMounted(e){this.fieldStateChange(e,"unmount"),this.$emit("field:mount",this)},fieldDirty(e){this.fieldStateChange(e,"dirty"),this.$emit("field:dirty",this)},fieldInvalid(e){this.fieldStateChange(e,"invalid"),this.$emit("field:invalid",this)},fieldValid(e){this.fieldStateChange(e,"valid"),this.$emit("field:valid",this)},fieldError(e){this.fieldStateChange(e,"error"),this.$emit("field:error",this)},fieldFocus(e){this.fieldStateChange(e,"focus"),this.$emit("field:focus",this)},fieldBlur(e){this.fieldStateChange(e,"blur"),this.$emit("field:blur",this)},fieldTouch(e){this.fieldStateChange(e,"touch"),this.$emit("field:touch",this)},fieldStateChange(e,n){var r=this;r.$nextTick(function(){var i=!1,l=!1,o=!1,a=!1,s=!1,c=[];r.childFormElements.forEach(function(d){d.dirty&&(i=!0),d.invalid&&(l=!0,c.push({title:d.field.title,key:d.field.key,message:d.invalidMessage})),d.error&&(o=!0),d.touched&&(a=!0),d.focussed&&(s=!0)}),r.dirty=i,r.error=o,r.touched=a,r.focussed=s,r.invalid=l,r.$emit("form:state",{dirty:i,error:o,focussed:s,touched:a,invalid:l,valid:!l,invalidFields:c})})}},components:{UxField:nr},computed:{currentTrail(){return this.trail},fieldHash(){return this.renderFields.reduce(function(e,n){return n&&(e[n.key]=n),e},{})},valid(){return!this.invalid},formClass(){var e=[];return this.flex&&e.push("ux-form-flex"),e},fieldClass(){var e=[];return this.flex&&e.push("ux-field-flex"),e},formModel:{get(){return this.model},set(e){this.model=e,this.$emit("update:modelValue",this.model)}},renderFields(){return this.fields.filter(function(e){if(!!e)return e.includeIf&&typeof e.includeIf=="function"?e.includeIf(e):e.excludeIf&&typeof e.excludeIf=="function"?!e.excludeIf(e):!0})}}};function KV(e,n,r,i,l,o){const a=t.resolveComponent("ux-field");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-form",o.formClass])},[t.renderSlot(e.$slots,"fields",{fields:o.renderFields,hash:o.fieldHash},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.renderFields,(s,c)=>(t.openBlock(),t.createBlock(a,{ref_for:!0,ref:"field",trail:o.currentTrail,submission:r.submission,includeOfficeOnly:r.includeOfficeOnly,"onField:mount":o.fieldMounted,"onField:unmount":o.fieldUnmounted,"onField:dirty":o.fieldDirty,"onField:invalid":o.fieldInvalid,"onField:valid":o.fieldValid,"onField:error":o.fieldError,"onField:focus":o.fieldFocus,"onField:blur":o.fieldBlur,"onField:touched":o.fieldTouch,field:s,modelValue:o.formModel,"onUpdate:modelValue":n[0]||(n[0]=d=>o.formModel=d),parentModel:r.parentModel||o.formModel,class:t.normalizeClass(o.fieldClass),key:`ux-form-field-${o.getFieldKey(s)}-${c}`},null,8,["trail","submission","includeOfficeOnly","onField:mount","onField:unmount","onField:dirty","onField:invalid","onField:valid","onField:error","onField:focus","onField:blur","onField:touched","field","modelValue","parentModel","class"]))),128))],!0)],2)}var uo=_(WV,[["render",KV],["__scopeId","data-v-09c6d713"]]),vS="";const mo="form.ready",ZV="form.processing",YV="form.complete",XV="form.error",JV={methods:{formStateUpdated(e){this.formState=e},softReset(){this.state=mo},touch(){this.$refs.form&&this.$refs.form.touch()},untouch(){this.$refs.form&&this.$refs.form.untouch()},reset(){this.model={},this.$refs.form&&this.$refs.form.reset(),this.state=mo,this.error=null,this.submitAttempted=!1,this.$emit("reset")},async submit(){const e=this;if(e.touch(),e.submitAttempted||(e.submitAttempted=!0,e.touch()),e.buttonDisabled){console.log("Form is invalid",this.formState);return}e.state=ZV,e.$emit("processing"),await e.preSubmit();const n=JSON.parse(JSON.stringify(e.model));e.$sdk.api.post(`/form/${e.formID}`,n).then(r,i);async function r(l){await e.postSubmit(),e.state=YV,e.$emit("success",l.data)}async function i(l){var o;l=((o=l.response)==null?void 0:o.data)||l,e.error=l,e.state=XV,e.$emit("error",l)}},async preSubmit(){},async postSubmit(){}},components:{UxForm:uo},provide(){return{form:this.form}},props:{submitText:{type:String,default(){return"Submit"}},modelValue:{type:Object,default(){return{}}},form:{type:Object,required:!0}},watch:{modelValue(e,n){this.model=e},model(e){this.$emit("update:modelValue",e)}},data(){return{submitAttempted:!1,formState:null,state:mo,mounted:!1,model:this.modelValue,error:null}},mounted(){this.mounted=!0},beforeUnmount(){this.mounted=!1},computed:{tooltip(){return this.buttonDisabled?"Please check the errors in your form":void 0},buttonDisabled(){return this.submitAttempted&&this.invalid},invalid(){var e;return(e=this.formState)==null?void 0:e.invalid},formID(){return this.$sdk.utils.id(this.form)},fields(){return this.form.fields||[]}}},QV=e=>(t.pushScopeId("data-v-e1425590"),e=e(),t.popScopeId(),e),vV={class:"ux-submission-form"},eE=QV(()=>t.createElementVNode("h3",null,"An error occurred",-1)),tE={key:0},nE={key:1},rE={key:2},oE=["tooltip"];function iE(e,n,r,i,l,o){var d;const a=t.resolveComponent("ux-icon"),s=t.resolveComponent("ux-button"),c=t.resolveComponent("ux-form");return t.openBlock(),t.createElementBlock("div",vV,[l.state==="form.error"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[eE,l.error.message?(t.openBlock(),t.createElementBlock("pre",tE,t.toDisplayString(l.error.message),1)):t.createCommentVNode("",!0),(d=l.error.data)!=null&&d.errors?(t.openBlock(),t.createElementBlock("div",nE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.error.data.errors,u=>(t.openBlock(),t.createElementBlock("pre",{key:u.path},t.toDisplayString(u.message),1))),128))])):(t.openBlock(),t.createElementBlock("pre",rE,t.toDisplayString(l.error),1)),t.createVNode(s,{color:"primary",onClick:o.softReset},{default:t.withCtx(()=>[t.createTextVNode(" Try again "),t.createVNode(a,{right:"",icon:"fa-undo"})]),_:1},8,["onClick"])],64)):l.state==="form.complete"?t.renderSlot(e.$slots,"default",{key:1,reset:o.reset},()=>[t.createTextVNode(" Thank you "),t.createVNode(s,{onClick:o.reset},{default:t.withCtx(()=>[t.createTextVNode(" Back to form ")]),_:1},8,["onClick"])],!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createVNode(c,{submission:"",ref:"form",modelValue:l.model,"onUpdate:modelValue":n[0]||(n[0]=u=>l.model=u),"onForm:state":o.formStateUpdated,fields:o.fields},null,8,["modelValue","onForm:state","fields"]),t.createElementVNode("span",{tooltip:o.tooltip},[t.createVNode(s,{disabled:o.buttonDisabled,color:"primary",onClick:o.submit,loading:l.state==="form.processing"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.submitText),1)]),_:1},8,["disabled","onClick","loading"])],8,oE)],64))])}var fo=_(JV,[["render",iE],["__scopeId","data-v-e1425590"]]),eN="";const lE={props:{modelValue:{type:String},placeholder:{type:String},debounce:{type:Number,default(){return 500}},loading:{type:Boolean}},mounted(){var e=this;e.dispatch=er(()=>{e.$emit("update:modelValue",e.value)},e.debounce)},data(){return{value:String(this.modelValue)}},methods:{clear(){this.value="",this.$emit("update:modelValue",this.value)}},watch:{modelValue(e,n){this.value=e}},computed:{icon(){return this.loading?"fa-spinner fa-spin":this.value?"fa-times":"fa-search"},selectableOptions(){return this.options.map(function(e){const n=e.value||e;return{label:e.title||e.name||e.label||n,value:n}})},model:{get(){return this.value},set(e){this.value=e,this.dispatch()}}}},aE={class:"search"},sE=["placeholder"];function cE(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon");return t.openBlock(),t.createElementBlock("div",aE,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=s=>o.model=s),placeholder:r.placeholder},null,8,sE),[[t.vModelText,o.model]]),t.createElementVNode("div",{onClick:n[1]||(n[1]=s=>o.clear()),class:"icon"},[t.createVNode(a,{icon:o.icon},null,8,["icon"])])])}var po=_(lE,[["render",cE],["__scopeId","data-v-17abf7d1"]]),rs=function(e,n,r){if(!n.hasOwnProperty(r)){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i)}},os={props:{template:String,parent:Object,templateProps:{type:Object,default:function(){return{}}}},render:function(){if(this.template){var e=this.parent||this.$parent,n=e.$data;n===void 0&&(n={});var r=e.$props;r===void 0&&(r={});var i=e.$options;i===void 0&&(i={});var l=i.components;l===void 0&&(l={});var o=i.computed;o===void 0&&(o={});var a=i.methods;a===void 0&&(a={});var s=this.$data;s===void 0&&(s={});var c=this.$props;c===void 0&&(c={});var d=this.$options;d===void 0&&(d={});var u=d.methods;u===void 0&&(u={});var m=d.computed;m===void 0&&(m={});var f=d.components;f===void 0&&(f={});var p={$data:{},$props:{},$options:{},components:{},computed:{},methods:{}};Object.keys(n).forEach(function(V){s[V]===void 0&&(p.$data[V]=n[V])}),Object.keys(r).forEach(function(V){c[V]===void 0&&(p.$props[V]=r[V])}),Object.keys(a).forEach(function(V){u[V]===void 0&&(p.methods[V]=a[V])}),Object.keys(o).forEach(function(V){m[V]===void 0&&(p.computed[V]=o[V])}),Object.keys(l).forEach(function(V){f[V]===void 0&&(p.components[V]=l[V])});var y=Object.keys(p.methods||{}),h=Object.keys(p.$data||{}),A=Object.keys(p.$props||{}),I=Object.keys(this.templateProps),z=h.concat(A).concat(y).concat(I),q=(X=e,M={},y.forEach(function(V){return rs(X,M,V)}),M),Y=function(V){var K={};return V.forEach(function(F){F&&Object.getOwnPropertyNames(F).forEach(function(ge){return rs(F,K,ge)})}),K}([p.$data,p.$props,q,this.templateProps]);return t.h({template:this.template||"<div></div>",props:z,computed:p.computed,components:p.components,provide:this.$parent.$.provides?this.$parent.$.provides:{}},Object.assign({},Y))}var X,M}},dE={props:{field:{type:Object,default(){return{}}},parentModel:{type:Object}},data(){return{model:this.modelValue}},methods:{getValue(e){if(!!e)return e._id||e.value||e},getLabel(e){if(!!e)return e.title||e.name||e.label||e}},computed:{label(){return this.field.title},description(){return this.field.description},singleValue(){if(this.asObject){var e=this.minimum===1&&this.maximum===1;return e}else return this.maximum===1},type(){return this.field.type||"string"},multiValue(){return!this.singleValue},key(){return this.field.key},isGroup(){return this.type==="group"},asObject(){return this.isGroup&&!!this.field.asObject},layoutGroup(){return this.isGroup&&!this.field.asObject},numValues(){return this.multiValue?(this.model||[]).length:1},fields(){var e=this.field.fields;if(e&&e.length)return e},minimum(){if(this.layoutGroup)return 1;var e=parseInt(this.field.minimum||0);return isNaN(e)&&(e=0),e=Math.max(e,0),e=this.maximum?Math.min(e,this.maximum):e,parseInt(e)},maximum(){if(this.layoutGroup)return 1;var e=parseInt(this.field.maximum||0);return isNaN(e)&&(e=0),e=Math.max(e,0),parseInt(e)}}},tN="";const uE={mixins:[dE],props:{modelValue:{type:[Object,Array]},submission:{type:Boolean,default:!1}},computed:{sameLine(){return this.field.sameLine}},methods:{multiLabel(e,n){return`${this.label} ${n+1}`}}},mE={key:0,class:"ux-multi-group"};function fE(e,n,r,i,l,o){const a=t.resolveComponent("flex-cell"),s=t.resolveComponent("flex-row"),c=t.resolveComponent("ux-panel-header"),d=t.resolveComponent("ux-render"),u=t.resolveComponent("ux-panel-body"),m=t.resolveComponent("ux-panel");return e.multiValue?(t.openBlock(),t.createElementBlock("div",mE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.model,(f,p)=>(t.openBlock(),t.createBlock(m,{ref_for:!0,ref:"row",key:f},{default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s,null,{default:t.withCtx(()=>[t.createVNode(a,{vcenter:""},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createElementVNode("strong",null,t.toDisplayString(o.multiLabel(f,p)),1)])]),_:2},1024)]),_:2},1024)]),_:2},1024),t.createVNode(u,null,{default:t.withCtx(()=>[t.createVNode(d,{submission:r.submission,fields:e.fields,flex:o.sameLine,parentModel:e.parentModel,modelValue:e.model[p],"onUpdate:modelValue":y=>e.model[p]=y},null,8,["submission","fields","flex","parentModel","modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024))),128))])):(t.openBlock(),t.createBlock(d,{key:1,submission:r.submission,fields:e.fields,flex:o.sameLine,parentModel:e.parentModel,modelValue:e.model,"onUpdate:modelValue":n[0]||(n[0]=f=>e.model=f)},null,8,["submission","fields","flex","parentModel","modelValue"]))}var pE=_(uE,[["render",fE],["__scopeId","data-v-32d789d7"]]),nN="";const hE={components:{Item:Ul,FieldGroup:pE,Compile:os},props:{field:{type:Object,required:!0},parentModel:{type:Object},modelValue:{type:Object,required:!0},submission:{type:Boolean,default:!1}},data(){return{model:this.modelValue}},methods:{renderDate(e){return N.fromJSDate(new Date(e)).toFormat("h:mma - ccc, DD")},formatCurrency(e){return`${this.$sdk.utils.formatCurrency(e,this.field.currency)}`.toUpperCase()},cleanInput(e){return e},cleanOutput(e){return this.type=="reference"&&!this.multiValue&&Array.isArray(e)&&e.length?e[0]:e}},watch:{modelValue(e,n){this.model=e}},computed:{type(){return this.field.type||"string"},isEmbedded(){return this.submission&&this.field.widget==="form"&&this.field.type==="reference"},isGroup(){return this.isEmbedded||this.type==="group"},asObject(){return this.isEmbedded||this.isGroup&&this.field.asObject},isNumber(){switch(this.type){case"integer":case"number":case"float":case"decimal":return!0}},multiValue(){return this.field.maximum!=1},title(){return this.field.title},getExpressionHide(){if(!this.expressions)return;let e=this.expressions.show,n=this.expressions.hide,r=this.expressionsContext;if(e)return!Ft.evaluateExpression(e,r);if(n)return Ft.evaluateExpression(n,r)},expressions(){return this.field.expressions},expressionsContext(){return{this:this.model,model:this.model,data:this.parentModel}},hidden(){return this.getExpressionHide},visible(){var e=!this.hidden,n=this.layoutGroup||this.fieldModel;return e&&n},type(){return this.field.type||"string"},key(){return this.field.key},isGroup(){return this.type==="group"},asObject(){return this.isGroup&&this.field.asObject},layoutGroup(){return this.isGroup&&!this.field.asObject},fieldModel:{get(){return this.cleanOutput(this.model[this.key])},set(e){}},sourceModel:{get(){return this.model},set(e){}},classes(){var e=[];return e.push(`ux-field-render-${this.type}`),this.layoutGroup?e.push("ux-layout-only"):(!this.fieldModel||Array.isArray(this.fieldModel)&&!this.fieldModel.length)&&e.push("ux-empty"),e},widget(){if(this.type=="group")return this.type;var e=this.field.widget;switch(e){case"form":e=this.submission?"form":"content-select";break;case"content-select":case"select":case"checkbox":case"datefield":case"richtext":case"longtext":case"buttons":case"switch":case"email":case"url":case"currency":case"timezone":case"country":case"typeselect":case"upload":case"code":break;default:switch(this.type){case"date":e="datefield";break;case"reference":e="content-select";break;case"boolean":e="checkbox";break;default:case"string":e="textfield";break}break}return e}}},yE={class:"ux-field-title"},gE={class:"currency"},_E={key:1},kE={class:"currency"},bE={key:1},xE={key:1},CE={key:1},wE=["href"],VE={key:1},EE=["href"],BE=["href"],SE={key:1},NE=["href"],TE={key:1};function OE(e,n,r,i,l,o){const a=t.resolveComponent("field-group"),s=t.resolveComponent("v-ace-editor"),c=t.resolveComponent("item"),d=t.resolveComponent("compile");return o.visible?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["ux-field-render",o.classes])},[t.createElementVNode("label",yE,t.toDisplayString(o.title),1),o.widget==="group"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o.asObject?(t.openBlock(),t.createBlock(a,{key:0,submission:r.submission,field:r.field,parentModel:r.parentModel,modelValue:o.fieldModel,"onUpdate:modelValue":n[0]||(n[0]=u=>o.fieldModel=u)},null,8,["submission","field","parentModel","modelValue"])):(t.openBlock(),t.createBlock(a,{key:1,submission:r.submission,field:r.field,parentModel:r.parentModel,modelValue:o.sourceModel,"onUpdate:modelValue":n[1]||(n[1]=u=>o.sourceModel=u)},null,8,["submission","field","parentModel","modelValue"]))],64)):o.widget==="form"?(t.openBlock(),t.createBlock(a,{key:1,submission:r.submission,field:r.field,parentModel:r.parentModel,modelValue:o.fieldModel,"onUpdate:modelValue":n[2]||(n[2]=u=>o.fieldModel=u)},null,8,["submission","field","parentModel","modelValue"])):o.widget==="currency"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.fieldModel,(u,m)=>(t.openBlock(),t.createElementBlock("div",null,[t.createTextVNode(t.toDisplayString(o.formatCurrency(u))+" ",1),t.createElementVNode("span",gE,t.toDisplayString(r.field.currency),1)]))),256)):(t.openBlock(),t.createElementBlock("div",_E,[t.createTextVNode(t.toDisplayString(o.formatCurrency(o.fieldModel))+" ",1),t.createElementVNode("span",kE,t.toDisplayString(r.field.currency),1)]))],64)):o.widget==="code"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.fieldModel,(u,m)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(s,{readonly:!0,class:"editor-wrap",value:u,options:{useWorker:!0},lang:r.field.syntax,theme:"tomorrow_night_eighties",style:{"min-height":"300px"}},null,8,["value","lang"])]))),256)):(t.openBlock(),t.createElementBlock("div",bE,[t.createVNode(s,{readonly:!0,class:"editor-wrap",value:o.fieldModel,options:{useWorker:!0},lang:r.field.syntax,theme:"tomorrow_night_eighties",style:{"min-height":"300px"}},null,8,["value","lang"])]))],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[o.type==="reference"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.fieldModel,(u,m)=>(t.openBlock(),t.createBlock(c,{submission:r.submission,key:u._id,item:u},null,8,["submission","item"]))),128)):(t.openBlock(),t.createBlock(c,{key:1,submission:r.submission,item:o.fieldModel},null,8,["submission","item"]))],64)):t.createCommentVNode("",!0),o.type=="string"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.fieldModel,(u,m)=>(t.openBlock(),t.createBlock(d,{template:u},null,8,["template"]))),256)):(t.openBlock(),t.createBlock(d,{key:1,template:o.fieldModel},null,8,["template"]))],64)):t.createCommentVNode("",!0),o.type=="boolean"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.fieldModel,(u,m)=>(t.openBlock(),t.createElementBlock("div",null,t.toDisplayString(!!u),1))),256)):(t.openBlock(),t.createElementBlock("div",xE,t.toDisplayString(!!o.fieldModel),1))],64)):t.createCommentVNode("",!0),o.type=="date"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:3},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.fieldModel,(u,m)=>(t.openBlock(),t.createElementBlock("div",null,t.toDisplayString(o.renderDate(u)),1))),256)):(t.openBlock(),t.createElementBlock("div",CE,t.toDisplayString(o.renderDate(o.fieldModel)),1))],64)):t.createCommentVNode("",!0),o.type=="email"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.fieldModel,(u,m)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("a",{href:`mailto:${u}`},t.toDisplayString(u),9,wE)]))),256)):(t.openBlock(),t.createElementBlock("div",VE,[t.createElementVNode("a",{href:`mailto:${o.fieldModel}`},t.toDisplayString(o.fieldModel),9,EE)]))],64)):t.createCommentVNode("",!0),o.type=="url"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:5},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.fieldModel,(u,m)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("a",{href:u},t.toDisplayString(u),9,BE)]))),256)):(t.openBlock(),t.createElementBlock("div",SE,[t.createElementVNode("a",{href:o.fieldModel},t.toDisplayString(o.fieldModel),9,NE)]))],64)):t.createCommentVNode("",!0),o.isNumber?(t.openBlock(),t.createElementBlock(t.Fragment,{key:6},[o.multiValue?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(o.fieldModel,(u,m)=>(t.openBlock(),t.createElementBlock("div",null,t.toDisplayString(u),1))),256)):(t.openBlock(),t.createElementBlock("div",TE,t.toDisplayString(o.fieldModel),1))],64)):t.createCommentVNode("",!0)],64))],2)):t.createCommentVNode("",!0)}var ho=_(hE,[["render",OE],["__scopeId","data-v-8e25371a"]]),rN="";const DE={props:{parentModel:{type:Object},fields:{type:Array,default(){return[]}},modelValue:{type:Object,default(){return{}}},flex:{type:Boolean,default:!1},submission:{type:Boolean,default:!1}},watch:{modelValue(e,n){this.model=e}},data(){return{model:this.modelValue}},components:{UxFieldRender:ho},computed:{renderClass(){var e=[];return this.flex&&e.push("ux-render-flex"),e},fieldClass(){var e=[];return this.flex&&e.push("ux-field-render-flex"),e},renderFields(){return this.fields}}};function AE(e,n,r,i,l,o){const a=t.resolveComponent("ux-field-render");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ux-render",o.renderClass])},[t.renderSlot(e.$slots,"render",{fields:r.fields},()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.renderFields,(s,c)=>(t.openBlock(),t.createBlock(a,{submission:r.submission,field:s,modelValue:l.model,"onUpdate:modelValue":n[0]||(n[0]=d=>l.model=d),parentModel:r.parentModel||l.model,key:`ux-render-field-${s.key}-${c}`,class:t.normalizeClass(o.fieldClass)},null,8,["submission","field","modelValue","parentModel","class"]))),128))],!0)],2)}var is=_(DE,[["render",AE],["__scopeId","data-v-4d848e06"]]);function ls(e){e=e||{},Math.max(parseInt(e.minimum||0),0);let n=Math.max(parseInt(e.maximum||0),0);const r=de.EventDispatcher({}),i=t.reactive([]);let l={};t.watch(i,function(){o()});function o(){l=i.reduce(function(a,s){var c=s._id||s.id;if(!!c)return a[c]=s,a},{})}return r.isSelected=function(a){return l[a._id||a.id]},r.select=function(a,s){r.isSelected(a)||(n&&i.length>=n&&n===1&&(i.length=0),i.push(a),n&&i.length>n&&(i.length=n,r.dispatch("limit",n)),s||r.dispatch("change",i))},r.deselect=function(a,s){if(n===1){i.length=0;return}var c=i.findIndex(function(d){return d._id&&d._id==a._id||d.id&&d.id==a.id});c!=-1&&(i.splice(c,1),s||r.dispatch("change",i))},r.toggle=function(a,s){r.isSelected(a)?r.deselect(a,s):r.select(a,s)},r.selectMultiple=function(a){a.forEach(function(s){r.select(s,!0)}),r.dispatch("change",i)},r.deselectMultiple=function(a){a.forEach(function(s){r.deselect(s,!0)}),r.dispatch("change",i)},r.setSelection=function(a){i.length=0,setTimeout(function(){r.selectMultiple(a)})},r.deselectAll=function(){i.length=0,r.dispatch("change",i)},Object.defineProperty(r,"items",{value:i,writable:!1}),Object.defineProperty(r,"hash",{get(){return l}}),r}var oN="";const ME={props:{total:{type:Number,default(){return 0}},page:{type:Object,default(){return{size:50,index:1}}}},components:{NativeSelect:et},watch:{totalPages(){this.currentPage=0}},computed:{perPage:{get(){return this.pageModel.size},set(e){e=Math.max(e,1),this.pageModel.size=e,this.dispatch()}},pageField(){return{type:"integer",maximum:1,minimum:1,options:Array(this.totalPages).fill(1).map((e,n)=>e+n)}},totalPages(){return Math.ceil(this.total/this.perPage)},startIndex(){return(this.currentPage-1)*this.pageModel.size},displayStartIndex(){return this.total?this.startIndex+1:0},endIndex(){return Math.min(this.startIndex+this.pageModel.size,this.total)},currentPage:{get(){return this.pageModel.index},set(e){this.totalPages&&(e=Math.min(this.totalPages,e)),e=Math.max(e,1),this.pageModel.index=e,this.dispatch()}}},methods:{dispatch(){return this.$emit("update:page",this.pageModel)},previousPage(){this.currentPage--},nextPage(){this.currentPage++}},data(){return{pageModel:this.page,perPageField:{minimum:1,maximum:1,options:[{title:"50 per page",value:50},{title:"100 per page",value:100},{title:"250 per page",value:250},{title:"500 per page",value:500}]}}}};function FE(e,n,r,i,l,o){const a=t.resolveComponent("native-select"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("ux-button"),u=t.resolveComponent("flex-row");return t.openBlock(),t.createBlock(u,{center:"",gap:""},{default:t.withCtx(()=>[t.createVNode(s,{shrink:"",class:"text"},{default:t.withCtx(()=>[t.createVNode(a,{modelValue:o.perPage,"onUpdate:modelValue":n[0]||(n[0]=m=>o.perPage=m),field:l.perPageField},{default:t.withCtx(()=>[e.$device.breakpoint.xs?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.displayStartIndex)+"-"+t.toDisplayString(o.endIndex)+" of "+t.toDisplayString(r.total),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Showing "+t.toDisplayString(o.displayStartIndex)+" to "+t.toDisplayString(o.endIndex)+" of "+t.toDisplayString(r.total)+" total",1)],64))]),_:1},8,["modelValue","field"])]),_:1}),t.createVNode(s),o.totalPages>1?(t.openBlock(),t.createBlock(s,{key:0,shrink:""},{default:t.withCtx(()=>[t.createVNode(u,{gap:"",center:""},{default:t.withCtx(()=>[t.createVNode(s,{shrink:"",class:"text"},{default:t.withCtx(()=>[t.createVNode(a,{modelValue:o.currentPage,"onUpdate:modelValue":n[1]||(n[1]=m=>o.currentPage=m),field:o.pageField},{default:t.withCtx(()=>[e.$device.breakpoint.xs?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createTextVNode(t.toDisplayString(o.currentPage)+"/"+t.toDisplayString(o.totalPages),1)],64)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode("Page "+t.toDisplayString(o.currentPage)+" of "+t.toDisplayString(o.totalPages),1)],64))]),_:1},8,["modelValue","field"])]),_:1}),t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{icon:"",onClick:n[2]||(n[2]=m=>o.previousPage())},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-arrow-left"})]),_:1})]),_:1}),t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{icon:"",onClick:n[3]||(n[3]=m=>o.nextPage())},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-arrow-right"})]),_:1})]),_:1})]),_:1})]),_:1})):t.createCommentVNode("",!0)]),_:1})}var IE=_(ME,[["render",FE],["__scopeId","data-v-492058b4"]]),iN="";function $E(e,n){var r=[],i;switch(n){case"image":case"video":r.push({title:"",key:"_id",renderer:"thumbnail",shrink:!0,fields:["width","height","fileMeta.colors.colors[0]"]});break}switch(n){case"profile":i=!0,r.push({title:"First Name",key:"firstName",shrink:!0}),r.push({title:"Last Name",key:"lastName",shrink:!0}),r.push({title:"Email",key:"emails"}),r.push({title:"Phone Number",key:"phoneNumbersInternational"});break;case"definition":r.push({title:"Plural",key:"plural"}),r.push({title:"Defines Type",key:"definesType"}),r.push({title:"Database Key",key:"key"}),r.push({title:"Category",key:"category"});break;case"file":case"audio":case"image":case"video":switch(i=!0,r.push({title:"Title",key:"title"}),n){case"image":case"video":r.push({title:"Width",key:"width",shrink:!0}),r.push({title:"Height",key:"height",shrink:!0});break}switch(r.push({title:"Ext",key:"fileExtension",shrink:!0}),r.push({title:"Mime Type",key:"fileMime",shrink:!0}),n){case"image":case"video":r.push({title:"Media Type",key:"mediaIntegrationType",shrink:!0});break}break}switch(i||r.unshift({title:"Title",key:"title"}),n){case"file":case"audio":case"image":case"video":r.push({title:"",key:"meta.security",renderer:"security",shrink:!0}),r.push({title:"",key:"_id",renderer:"button",shrink:!0,button:{size:"sm",text:"Download",icon:"fa-download",action(l){return new Promise(async function(o,a){await e.$sdk.auth.ensureValidToken();var s=e.$sdk.files.downloadUrl(e.basicType,l);window.open(s),o()})}}});break}return r}function as(){return{operator:"and",filters:[]}}let Xe,yo,go;const LE={props:{view:{type:Object,default(){return{title:"List",key:"table"}}},filter:{type:Object,default(){return as()}},type:{type:String,required:!0},showFilters:{type:Boolean},search:{type:String,default:""},dateRange:{type:Object,default:{}},options:{type:Object,default(){return{}}},cacheKey:{type:[String,Number]},modelValue:{type:Array,default(){return[]}},maximum:{type:Number,default(){return 0}},dateFilterEnabled:{type:Boolean},selectionManager:{type:Object},enableActions:{type:Boolean,default:!1},enableSelection:{type:Boolean,default:!0},trash:{type:Boolean,default:!1}},components:{Pager:IE,NativeTable:xl,FilterBuilder:Sa,Search:po,UxField:nr},deactivated(){go=this.$sdk.global.cacheKeys[this.type],Xe&&(Xe(),Xe=null,yo=!0)},async activated(){var e=this,n=e.$sdk.global.cacheKeys[e.type];go!=n&&(go=n,e.dataSource=await e.load()),yo&&(yo=!1,e.dataSource=await e.load())},async created(){var e=this;await new Promise(async function(n,r){var i=await e.$sdk.content.glossary({hash:!0}),l=i[e.type];if(e.definition=l,!l)return r();n()}),e.sort=e.defaultSort},watch:{keywords(e){this.$emit("update:search",e)},dateRangeFilter(e){this.$emit("update:dateRange",e)},search(e){this.keywords=e},change:{handler:er(async function(){this.dataSource=await this.load()}),immediate:!0},loading(){this.$emit("loading",this.loading)},selectedItems(e){this.$emit("update:modelValue",e)},loadKey(){this.$emit("loaded")},options(e){this.actualOptions=e},filter(e){e?this.actualFilter=e:this.actualFilter=as()}},computed:{viewModeCacheKey(){return`${this.cacheKey}-${this.loadKey}`},dateRangeField(){return{type:"object",widget:"daterange",key:"dateRange",minimum:0,maximum:1}},combinedFilter(){const e=this;let n=e.actualFilter,r=e.actualOptions.lockFilter;if(!r)return n;n=JSON.parse(JSON.stringify(n)),r=JSON.parse(JSON.stringify(r));let i;return n.operator==="and"?(i=n,i.filters.push(r)):(i=r,r.filters.push(n)),i},viewMode(){var e=this.view;switch(e.key){case"list":case"table":return}return e},defaultSort(){var n;var e=(n=this.definition)==null?void 0:n.defaultSort;if(e)return e;switch(e={key:"title",direction:"asc",type:"string"},this.basicType){case"profile":case"persona":case"user":e={key:"lastName",direction:"asc",type:"string"};break;case"email":case"notification":case"transaction":case"campaign":case"transaction":case"componentsnapshot":case"interfacesnapshot":case"image":case"video":case"audio":case"file":case"submission":case"log":e={key:"meta.created",direction:"dsc",type:"date"};break}return e},fields(){const e=this,n=e.definition.definesType==="submission";var r=[...e.definition.fields],i=e.definition.definedFields||[];if(i.length)if(n){var l={title:"Form Data",minimum:1,maximum:1,key:"formData",asObject:!0,type:"group",fields:i};r.push(l);const s=i.map(function(c){return c.type==="reference"&&(c=JSON.parse(JSON.stringify(c)),delete c.fields),c});var o={title:"Data",minimum:1,maximum:1,key:"data",asObject:!0,type:"group",fields:s};r.push(o)}else{var o={title:`${e.definition.title}`,minimum:1,maximum:1,key:"data",asObject:!0,type:"group",fields:i};r.push(o)}var a=e.$sdk.utils.mapFields(r).filter(function(s){var c=s.type=="group"&&s.asObject&&s.minimum==1&&s.maximum==1;return!c}).map(function(s){return s.title=s.titles.join(" > "),s}).sort(function(s,c){return s.title<c.title?-1:1});return a},deselectAllFunction(){return this.manager.items.length?this.deselectAll:null},selectedItems(){return this.manager.items.slice()},activeFilters(){const e=this;var n=this.$sdk.filter.activeFilters(e.actualFilter).reduce(function(r,i){return i.key&&(i=B({},i),i.title=`Filter ${r.length+1}`,i.key=i.key.split("[]").join(""),i.class="active-filter",i.shrink=!0,r.push(i)),r},[]);return n},searching(){return this.loading&&this.keywords.length},title(){return this.definition.title},plural(){return this.definition.plural},selectFields(){const e=this;var n=e.columns.map(function(r){return[r.path||r.key,...r.select||[]]}).flat().filter(Boolean).map(function(r){return r.split("[]").join("")});return e.actualOptions.select&&(n=[...n,...e.actualOptions.select]),n},columns(){let e=[],n={};function r(d){return function(u){var m=n[u.path||u.key];(d||!m)&&(n[u.path||u.key]=1,e.push(ke(B({},u),{key:u.path||u.key})))}}var i=this.actualOptions.prefixColumns||[];i.forEach(r(!0));var l=this.actualOptions.columns,o=l&&l.length?l:$E(this,this.basicType);o.length||o.push({title:"Title",key:"title"}),o.forEach(r(!0));var a=this.additionalFields;a.forEach(r());var s=this.actualOptions.suffixColumns||[];s.forEach(r(!0));var c=this.activeFilters;return c.forEach(r()),e},filterChangeString(){const e=this;var n=this.$sdk.filter.filterChangeString(e.actualFilter);return n},change(){return`${JSON.stringify([this.page,this.dateRangeFilter,this.sort,this.keywords,this.selectFields,this.type,this.filterChangeString])}-${this.cacheKey}-${this.$sdk.global.cacheKeys[this.type]}`},items(){return this.dataSource.items},totalItems(){return this.dataSource.total},basicType(){return this.definition?this.definition.definesType||this.definition.key:this.type},loadCriteria(){var e=this,n=e.sort||e.defaultSort,r=e.keywords,i=e.selectFields,l=e.page,o=e.combinedFilter;return{sort:n,search:r,select:i,page:l,filter:o}},fieldEnabled(){var e=this;return e.columns.reduce(function(n,r){return n[r.key]=!0,n},{})}},methods:{toggleField(e){var n=e.path||e.key,r=this.additionalFields.findIndex(function(i){return i.path===n||i.key===n});r===-1?this.additionalFields.push(e):this.additionalFields.splice(r,1)},ensureMeta(e){return e.meta||(e.meta={}),e.meta.type||(e.meta.type=this.basicType),e.meta.definition||(e.meta.definition=this.definition.key),this.trash&&(e.meta.deleted=!0),e},deselectAll(){this.manager.deselectAll()},async selectAll(){var e=this;e.dataSource=await e.load(!0);var n=this.dataSource.all.map(function(r){var i=e.ensureMeta({_id:r});return i});e.manager.setSelection(n)},selectMultiple(e){e=e.map(this.ensureMeta),this.manager.selectMultiple(e)},deselectMultiple(e){e=e.map(this.ensureMeta),this.manager.deselectMultiple(e)},rowToggled(e){this.toggle(e)},rowClicked(e){this.$emit("click:row",e)},actionsClicked(e){this.$emit("click:actions",e)},select(e){this.ensureMeta(e),this.manager.select(e)},deselect(e){this.manager.deselect(e)},isSelected(e){return this.manager.isSelected(e)},toggle(e){this.ensureMeta(e),this.manager.toggle(e)},async load(e){var a,s,c,d;var n=this;n.loading=!0,Xe&&(Xe(),Xe=null);var r=Object.assign({},n.loadCriteria);if(r.includeAll=e,n.trash&&(r.trash=!0),n.dateFilterEnabled&&!r.search){let u=(s=(a=n.dateRangeFilter)==null?void 0:a.dateRange)==null?void 0:s.startDate,m=(d=(c=n.dateRangeFilter)==null?void 0:c.dateRange)==null?void 0:d.endDate;if(u||m){let f=Intl.DateTimeFormat().resolvedOptions().timeZone;u.toISOString()==m.toISOString()?(u=new Date(u),u.setHours(0,0,0,0),m=new Date(u),m.setHours(23,59,59,999)):(m=new Date(m),m.setHours(23,59,59,999)),r.date={startDate:u,endDate:m,timezone:f}}}const{promise:i,cancel:l}=await n.$sdk.content.list(n.type,r,{cancellable:!0});Xe=l,i.then(function(u){Xe=null,n.loading=!1,n.loadKey++}),i.catch(function(u){Xe=null});const{data:o}=await i;return o.items.forEach(n.ensureMeta),o}},data(){var e=this.selectionManager;return e||(e=new ls({minimum:this.minimum,maximum:this.maximum})),this.modelValue&&e.setSelection(this.modelValue),{definition:null,manager:e,loading:!0,additionalFields:[],loadKey:1,page:{size:50,index:1},actualFilter:this.filter,sort:this.defaultSort,keywords:this.search,dateRangeFilter:{dateRange:this.dateRange},dataSource:null,actualOptions:this.options}}},ss=e=>(t.pushScopeId("data-v-d8907020"),e=e(),t.popScopeId(),e),UE=ss(()=>t.createElementVNode("p",null,null,-1)),PE={key:0},jE=ss(()=>t.createElementVNode("p",null,null,-1)),RE={class:"footer"};function zE(e,n,r,i,l,o){const a=t.resolveComponent("ux-icon"),s=t.resolveComponent("ux-button"),c=t.resolveComponent("ux-list-item"),d=t.resolveComponent("ux-list"),u=t.resolveComponent("ux-menu"),m=t.resolveComponent("native-table"),f=t.resolveComponent("flex-column"),p=t.resolveComponent("ux-panel-body"),y=t.resolveComponent("ux-panel"),h=t.resolveComponent("search"),A=t.resolveComponent("ux-field"),I=t.resolveComponent("filter-builder"),z=t.resolveComponent("flex-body"),q=t.resolveComponent("flex-row"),Y=t.resolveComponent("pager"),X=t.resolveComponent("flex-footer"),M=t.resolveComponent("spinner");return l.definition?(t.openBlock(),t.createBlock(f,{key:0,class:"content-browser"},{default:t.withCtx(()=>[l.dataSource?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(f,{class:t.normalizeClass(["browser-body",{loading:l.loading}])},{default:t.withCtx(()=>[t.createVNode(q,null,{default:t.withCtx(()=>[o.items.length?(t.openBlock(),t.createBlock(f,{key:0},{default:t.withCtx(()=>[o.viewMode&&o.viewMode.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.viewMode.component),{key:0,cacheKey:o.viewModeCacheKey,selection:l.manager.items,items:o.items,"onClick:actions":o.actionsClicked,"onSelect:item:toggle":o.rowToggled,"onClick:item":o.rowClicked},null,40,["cacheKey","selection","items","onClick:actions","onSelect:item:toggle","onClick:item"])):(t.openBlock(),t.createBlock(m,{key:1,sort:l.sort,"onUpdate:sort":n[0]||(n[0]=V=>l.sort=V),enableSelection:r.enableSelection,enableActions:r.enableActions,total:o.totalItems,selectAll:o.selectAll,deselectAll:o.deselectAllFunction,selection:l.manager.items,"onClick:row":o.rowClicked,"onClick:actions":o.actionsClicked,"onSelect:row:toggle":o.rowToggled,"onSelect:multiple":o.selectMultiple,"onDeselect:multiple":o.deselectMultiple,rows:o.items,columns:o.columns},{corner:t.withCtx(()=>[t.createVNode(u,{right:""},{activator:t.withCtx(({on:V})=>[t.createVNode(s,t.mergeProps({icon:""},t.toHandlers(V)),{default:t.withCtx(()=>[t.createVNode(a,{icon:"fa-cog"})]),_:2},1040)]),default:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.fields,V=>(t.openBlock(),t.createBlock(c,{onClick:K=>o.toggleField(V),key:V.path},{default:t.withCtx(()=>[t.createVNode(a,{icon:o.fieldEnabled[V.path]?"fa-check-square":"fa-regular fa-square",left:""},null,8,["icon"]),t.createTextVNode(" "+t.toDisplayString(V.title),1)]),_:2},1032,["onClick"]))),128))]),_:1})]),_:1})]),_:1},8,["sort","enableSelection","enableActions","total","selectAll","deselectAll","selection","onClick:row","onClick:actions","onSelect:row:toggle","onSelect:multiple","onDeselect:multiple","rows","columns"]))]),_:1})):l.loading?(t.openBlock(),t.createBlock(f,{key:2,class:"empty",center:""})):(t.openBlock(),t.createBlock(f,{key:1,class:"empty",center:""},{default:t.withCtx(()=>[t.createVNode(y,null,{default:t.withCtx(()=>[t.createVNode(p,null,{default:t.withCtx(()=>[t.createElementVNode("div",null,"No "+t.toDisplayString(l.definition.plural)+" found.",1)]),_:1})]),_:1})]),_:1})),r.showFilters?(t.openBlock(),t.createBlock(f,{key:3,class:"filter-column"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"abovefilter",{},void 0,!0),t.createVNode(z,null,{default:t.withCtx(()=>[t.createVNode(h,{modelValue:l.keywords,"onUpdate:modelValue":n[1]||(n[1]=V=>l.keywords=V),loading:o.searching,debounce:500,placeholder:"Keyword Search"},null,8,["modelValue","loading"]),UE,r.dateFilterEnabled?(t.openBlock(),t.createElementBlock("div",PE,[t.createVNode(A,{field:o.dateRangeField,modelValue:l.dateRangeFilter,"onUpdate:modelValue":n[2]||(n[2]=V=>l.dateRangeFilter=V)},null,8,["field","modelValue"])])):t.createCommentVNode("",!0),jE,t.createVNode(I,{definition:l.definition,modelValue:l.actualFilter,"onUpdate:modelValue":n[3]||(n[3]=V=>l.actualFilter=V)},null,8,["definition","modelValue"])]),_:1}),t.renderSlot(e.$slots,"belowfilter",{},void 0,!0)]),_:3})):t.createCommentVNode("",!0)]),_:3})]),_:3},8,["class"]),t.createVNode(X,null,{default:t.withCtx(()=>[t.renderSlot(e.$slots,"footera",{},void 0,!0),t.createElementVNode("div",RE,[t.createVNode(Y,{page:l.page,"onUpdate:page":n[4]||(n[4]=V=>l.page=V),total:o.totalItems},null,8,["page","total"])]),t.renderSlot(e.$slots,"footerb",{},void 0,!0)]),_:3})],64)):t.createCommentVNode("",!0),l.loading?(t.openBlock(),t.createBlock(M,{key:1,large:""})):t.createCommentVNode("",!0)]),_:3})):t.createCommentVNode("",!0)}var cs=_(LE,[["render",zE],["__scopeId","data-v-d8907020"]]),$t={props:{options:{type:Object,default(){return{}}}},data(){return{}},methods:{dismiss(e){this.$emit("dismiss",e)},close(e){this.$emit("close",e)}}},lN="";const qE={props:{modal:{type:Object,required:!0}},data(){return{}},methods:{blanketClick(){this.dismiss()},dismiss(e){this.$sdk.closeModal(this.modal.id),this.modal.reject(e)},close(e){this.$sdk.closeModal(this.modal.id),this.modal.resolve(e)}},computed:{componentProps(){return this.modal.componentProps||{}},style(){var e={};return this.modal.style&&(e=Object.assign(e,this.modal.style)),e}}},HE={class:"modal-wrapper"};function GE(e,n,r,i,l,o){return t.openBlock(),t.createElementBlock("div",HE,[t.createElementVNode("div",{class:"modal-blanket",onClick:n[0]||(n[0]=(...a)=>o.blanketClick&&o.blanketClick(...a))}),t.createElementVNode("div",{class:"modal-content",style:t.normalizeStyle(o.style)},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(r.modal.component),t.mergeProps({options:r.modal.options},o.componentProps,{onClose:o.close,onDismiss:o.dismiss}),null,16,["options","onClose","onDismiss"]))],4)])}var ds=_(qE,[["render",GE],["__scopeId","data-v-53027fe5"]]),aN="";const WE={mixins:[$t]},KE={class:"padder"},ZE=["innerHTML"],YE={class:"padder"};function XE(e,n,r,i,l,o){const a=t.resolveComponent("flex-body"),s=t.resolveComponent("ux-button"),c=t.resolveComponent("flex-cell"),d=t.resolveComponent("flex-row"),u=t.resolveComponent("flex-footer"),m=t.resolveComponent("flex-column");return t.openBlock(),t.createBlock(m,{class:"wrapper"},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createElementVNode("div",KE,[t.createElementVNode("h5",null,t.toDisplayString(e.options.title),1),t.createElementVNode("div",{innerHTML:e.options.description},null,8,ZE)])]),_:1}),t.createVNode(u,null,{default:t.withCtx(()=>[t.createElementVNode("div",YE,[t.createVNode(d,null,{default:t.withCtx(()=>[t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s,{onClick:e.dismiss},{default:t.withCtx(()=>[t.createTextVNode("Cancel")]),_:1},8,["onClick"])]),_:1}),t.createVNode(c,null,{default:t.withCtx(()=>[t.createVNode(s,{onClick:e.close},{default:t.withCtx(()=>[t.createTextVNode("Confirm")]),_:1},8,["onClick"])]),_:1})]),_:1})])]),_:1})]),_:1})}var us=_(WE,[["render",XE],["__scopeId","data-v-f9a36fea"]]),sN="";const JE={data(){return{selected:null}},mixins:[$t],methods:{select(e){this.selected=e,this.close(e)}}},QE={class:"header"},vE={class:"padder"},eB=["onClick"],tB={key:0,class:"title"},nB={key:1,class:"description"},rB={class:"padder"};function oB(e,n,r,i,l,o){const a=t.resolveComponent("flex-header"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("ux-icon"),d=t.resolveComponent("flex-row"),u=t.resolveComponent("flex-body"),m=t.resolveComponent("ux-button"),f=t.resolveComponent("flex-footer"),p=t.resolveComponent("flex-column");return t.openBlock(),t.createBlock(p,{class:"wrapper"},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[t.createElementVNode("div",QE,[t.createElementVNode("h5",null,t.toDisplayString(e.options.title),1),t.createElementVNode("div",null,t.toDisplayString(e.options.description),1)])]),_:1}),t.createVNode(u,{class:"body"},{default:t.withCtx(()=>[t.createElementVNode("div",vE,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.options.choices,y=>(t.openBlock(),t.createElementBlock("div",{class:"choice",onClick:h=>o.select(y)},[t.createVNode(d,{vcenter:""},{default:t.withCtx(()=>[t.createVNode(s,null,{default:t.withCtx(()=>[y.title?(t.openBlock(),t.createElementBlock("div",tB,t.toDisplayString(y.title),1)):t.createCommentVNode("",!0),y.description?(t.openBlock(),t.createElementBlock("div",nB,t.toDisplayString(y.description),1)):t.createCommentVNode("",!0)]),_:2},1024),t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.createVNode(c,{icon:"fa-angle-right"})]),_:1})]),_:2},1024)],8,eB))),256))])]),_:1}),t.createVNode(f,null,{default:t.withCtx(()=>[t.createElementVNode("div",rB,[t.createVNode(m,{onClick:e.dismiss},{default:t.withCtx(()=>[t.createTextVNode("Cancel")]),_:1},8,["onClick"])])]),_:1})]),_:1})}var ms=_(JE,[["render",oB],["__scopeId","data-v-09008c8a"]]),cN="";const iB={mixins:[$t],data(){return{model:{}}},methods:{},computed:{fields(){return this.options.fields||[]}},created(){this.options.model&&(this.model=this.options.model)}},lB={class:"padder"},aB={class:"padder"};function sB(e,n,r,i,l,o){const a=t.resolveComponent("ux-form"),s=t.resolveComponent("flex-body"),c=t.resolveComponent("ux-button"),d=t.resolveComponent("flex-cell"),u=t.resolveComponent("flex-spacer"),m=t.resolveComponent("flex-row"),f=t.resolveComponent("flex-footer"),p=t.resolveComponent("flex-column");return t.openBlock(),t.createElementBlock("form",{class:"wrapper",onSubmit:n[2]||(n[2]=t.withModifiers((...y)=>e.submit&&e.submit(...y),["prevent","stop"]))},[t.createVNode(p,null,{default:t.withCtx(()=>[t.createVNode(s,null,{default:t.withCtx(()=>[t.createElementVNode("div",lB,[t.createElementVNode("h5",null,t.toDisplayString(e.options.title),1),t.createElementVNode("div",null,t.toDisplayString(e.options.description),1),t.createVNode(a,{ref:"form",modelValue:l.model,"onUpdate:modelValue":n[0]||(n[0]=y=>l.model=y),fields:o.fields},null,8,["modelValue","fields"])])]),_:1}),t.createVNode(f,null,{default:t.withCtx(()=>[t.createElementVNode("div",aB,[t.createVNode(m,null,{default:t.withCtx(()=>[t.createVNode(d,{shrink:""},{default:t.withCtx(()=>[t.createVNode(c,{tag:"a",onClick:e.dismiss},{default:t.withCtx(()=>[t.createTextVNode("Cancel")]),_:1},8,["onClick"])]),_:1}),t.createVNode(u),t.createVNode(d,{shrink:""},{default:t.withCtx(()=>[t.createVNode(c,{color:"primary",type:"submit",onClick:n[1]||(n[1]=y=>e.close(l.model))},{default:t.withCtx(()=>[t.createTextVNode("Confirm")]),_:1})]),_:1})]),_:1})])]),_:1})]),_:1})],32)}var fs=_(iB,[["render",sB],["__scopeId","data-v-3880d6f0"]]),dN="";const cB={components:{ContentBrowser:cs,Search:po},mixins:[$t],async created(){var e=this,n=await e.$sdk.content.glossary({hash:!0});e.loading=!1;var r=n[e.type];if(!r){e.$sdk.notify("You do not have the required permissions to list content of this type"),e.dismiss();return}e.definition=r},computed:{type(){return this.options.type},title(){return this.definition.title},plural(){return this.definition.plural},maximum(){return this.options.maximum||0},browserOptions(){return this.options.browserOptions||{}}},data(){return{search:"",searching:!1,definition:null,loading:!0,model:this.options.model.slice()}},methods:{rowClicked(e){this.$refs.browser.toggle(e)},selectionComplete(e){this.close(this.model)}}},dB={class:"header"},uB={class:"font-muted font-sm"};function mB(e,n,r,i,l,o){const a=t.resolveComponent("flex-column"),s=t.resolveComponent("flex-cell"),c=t.resolveComponent("search"),d=t.resolveComponent("ux-button"),u=t.resolveComponent("flex-row"),m=t.resolveComponent("flex-header"),f=t.resolveComponent("content-browser");return t.openBlock(),t.createBlock(a,{class:"wrapper"},{default:t.withCtx(()=>[l.loading?(t.openBlock(),t.createBlock(a,{key:0},{default:t.withCtx(()=>[t.createTextVNode(" Loading ")]),_:1})):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[l.definition?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(m,null,{default:t.withCtx(()=>[t.createElementVNode("div",dB,[t.createVNode(u,{vcenter:"",gap:""},{default:t.withCtx(()=>[t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.createElementVNode("h3",null,"Select "+t.toDisplayString(o.maximum==1?o.title:o.plural),1)]),_:1}),o.maximum?(t.openBlock(),t.createBlock(s,{key:0},{default:t.withCtx(()=>[t.createElementVNode("span",uB,"("+t.toDisplayString(l.model.length)+" of "+t.toDisplayString(o.maximum)+")",1)]),_:1})):t.createCommentVNode("",!0),t.createVNode(s,null,{default:t.withCtx(()=>[t.createVNode(c,{modelValue:l.search,"onUpdate:modelValue":n[0]||(n[0]=p=>l.search=p),loading:l.searching,debounce:500,placeholder:"Search"},null,8,["modelValue","loading"])]),_:1}),t.createVNode(s,{shrink:""},{default:t.withCtx(()=>[t.createVNode(d,{color:"primary",onClick:o.selectionComplete},{default:t.withCtx(()=>[t.createTextVNode("Done")]),_:1},8,["onClick"])]),_:1})]),_:1})])]),_:1}),t.createVNode(f,{ref:"browser",search:l.search,"onClick:row":o.rowClicked,maximum:e.options.maximum,modelValue:l.model,"onUpdate:modelValue":n[1]||(n[1]=p=>l.model=p),type:e.options.type,options:o.browserOptions},null,8,["search","onClick:row","maximum","modelValue","type","options"])],64)):t.createCommentVNode("",!0)],64))]),_:1})}var ps=_(cB,[["render",mB],["__scopeId","data-v-7a6efddc"]]),uN="";const fB={components:{ScopeSelect:ka},mixins:[$t],computed:{type(){return this.options.type},action(){return this.options.action}},data(){return{model:this.options.model.slice()}},methods:{selectionComplete(e){this.close(this.model)}}},pB=e=>(t.pushScopeId("data-v-17b3e792"),e=e(),t.popScopeId(),e),hB={class:"header"},yB=pB(()=>t.createElementVNode("h3",null,"Select Scopes",-1)),gB={class:"padder"};function _B(e,n,r,i,l,o){const a=t.resolveComponent("flex-cell"),s=t.resolveComponent("ux-button"),c=t.resolveComponent("flex-row"),d=t.resolveComponent("flex-header"),u=t.resolveComponent("scope-select"),m=t.resolveComponent("flex-body"),f=t.resolveComponent("flex-column");return t.openBlock(),t.createBlock(f,{class:"wrapper"},{default:t.withCtx(()=>[t.createVNode(d,null,{default:t.withCtx(()=>[t.createElementVNode("div",hB,[t.createVNode(c,{vcenter:"",gap:""},{default:t.withCtx(()=>[t.createVNode(a,null,{default:t.withCtx(()=>[yB]),_:1}),t.createVNode(a,{shrink:""},{default:t.withCtx(()=>[t.createVNode(s,{color:"primary",onClick:o.selectionComplete},{default:t.withCtx(()=>[t.createTextVNode("Done")]),_:1},8,["onClick"])]),_:1})]),_:1})])]),_:1}),t.createVNode(m,{class:"scroll-body"},{default:t.withCtx(()=>[t.createElementVNode("div",gB,[t.createVNode(u,{action:o.action,type:o.type,modelValue:l.model,"onUpdate:modelValue":n[0]||(n[0]=p=>l.model=p)},null,8,["action","type","modelValue"])])]),_:1})]),_:1})}var hs=_(fB,[["render",_B],["__scopeId","data-v-17b3e792"]]);function kB(){var e=t.reactive({mounted:!1,screen:{width:1024,height:768},limits:{xs:600,sm:960,md:1264,lg:1904},breakpoint:{mobile:!1,tablet:!1,desktop:!1,xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xsOnly:!1,smOnly:!1,smAndDown:!1,smAndUp:!1,mdOnly:!1,mdAndDown:!1,mdAndUp:!1,lgOnly:!1,lgAndDown:!1,lgAndUp:!1,xlOnly:!1,point:0}}),n;let r;return e.resize=function(){var i=Math.max(r.innerWidth||0),l=Math.max(r.innerHeight||0);e.screen={width:i,height:l};var o={mobile:!1,tablet:!1,desktop:!1,xs:!1,sm:!1,md:!1,lg:!1,xl:!1,xsOnly:!1,smOnly:!1,smAndDown:!1,smAndUp:!1,mdOnly:!1,mdAndDown:!1,mdAndUp:!1,lgOnly:!1,lgAndDown:!1,lgAndUp:!1,xlOnly:!1,point:0},a=0;i>e.limits.xs&&a++,i>e.limits.sm&&a++,i>e.limits.md&&a++,i>e.limits.lg&&a++,a<1&&(o.mobile=!0,o.xs=!0,o.xsOnly=!0,o.smAndDown=!0,o.mdAndDown=!0,o.lgAndDown=!0),a==1&&(o.tablet=!0,o.sm=!0,o.smOnly=!0,o.smAndDown=!0,o.mdAndDown=!0,o.lgAndDown=!0,o.smAndUp=!0),a==2&&(o.desktop=!0,o.md=!0,o.mdOnly=!0,o.mdAndDown=!0,o.lgAndDown=!0,o.smAndUp=!0,o.mdAndUp=!0),a==3&&(o.desktop=!0,o.lg=!0,o.lgOnly=!0,o.lgAndDown=!0,o.smAndUp=!0,o.mdAndUp=!0,o.lgAndUp=!0),a>3&&(o.desktop=!0,o.xl=!0,o.xlOnly=!0,o.smAndUp=!0,o.mdAndUp=!0,o.lgAndUp=!0),e.point=a,e.breakpoint=o},e.mount=function(i){n||(r=i,e.resize(),n=!0,e.mounted=!0,r.addEventListener("resize",e.resize))},e.unmount=function(){r.removeEventListener("resize",e.resize),r=!1,n=!1,e.mounted=!1},e}const bB=`qik vue ui ${Ae}`,ys={FlexColumn:bo,FlexBody:xo,FlexHeader:Co,FlexFooter:wo,FlexCell:Vo,FlexSpacer:Bo,FlexRow:Eo,UxPanel:So,UxPanelBody:No,UxPanelHeader:To,UxPanelFooter:Oo,UxList:Fl,UxListItem:Il,UxForm:uo,UxSubmissionForm:fo,UxFormField:nr,UxSubmissionForm:fo,UxRender:is,UxRenderField:ho,UxIcon:Tl,UxMenu:Ol,UxMenuList:Dl,UxImage:Al,UxButton:Bl,UxCheckbox:Ur,UxSwitch:Sl,UxLink:Nl,UxTabset:Do,UxTab:Ao,Avatar:El,Spinner:Lr,ProgressBar:Ml,UxModal:ds,Compile:os},xB={install(e,n){console.log(bB),n.modals=t.reactive([]),n.modal=function(r){return new Promise(function(i,l){r.id=n.modals.length,r.resolve=i,r.reject=l,n.modals.splice(r.id,0,r)})},n.browse=function(r,i){return i=i||{},i.type=r,i.model=i.model||[],n.modal({component:ps,options:i})},n.selectScopes=function(r){return r=r||{},r.model=r.model||[],n.modal({component:hs,options:r})},n.options=function(r,i,l){return n.modal({component:ms,options:{title:i,description:l,choices:r}})},n.prompt=function(r,i){return i=i||{},i.model=i.model||{},i.fields=r,n.modal({component:fs,options:i})},n.confirm=function(r,i){return i=i||{},i.title=r,n.modal({component:us,options:i})},n.closeModal=function(r){var i=n.modals.find(function(o){return o.id==r}),l=n.modals.indexOf(i);n.modals.splice(l,1)};for(const r in ys){const i=ys[r];e.component(r,i)}}};x.Avatar=El,x.CodeEditor=Ta,x.ContentBrowser=cs,x.DateRange=Ll,x.Device=kB,x.FileDrop=Na,x.FlexBody=xo,x.FlexCell=Vo,x.FlexColumn=bo,x.FlexFooter=wo,x.FlexHeader=Co,x.FlexRow=Eo,x.FlexSpacer=Bo,x.ModalMixin=$t,x.NativeSelect=et,x.Pager=Uh,x.Panel=So,x.PanelBody=No,x.PanelFooter=Oo,x.PanelHeader=To,x.ProgressBar=Ml,x.QikUI=xB,x.RememberScrollMixin=bl,x.ScopeSelect=ka,x.ScopeSelectButton=ba,x.Search=po,x.Selection=ls,x.Spinner=Lr,x.UXButton=Bl,x.UXCheckbox=Ur,x.UXForm=uo,x.UXFormField=nr,x.UXIcon=Tl,x.UXImage=Al,x.UXLink=Nl,x.UXList=Fl,x.UXListItem=Il,x.UXMenu=Ol,x.UXMenuList=Dl,x.UXRender=is,x.UXRenderField=ho,x.UXSubmissionForm=fo,x.UXSwitch=Sl,x.UXTab=Ao,x.UXTable=xl,x.UXTabset=Do,x.UxConfirmModal=us,x.UxContentModal=ps,x.UxModal=ds,x.UxOptionsModal=ms,x.UxPromptModal=fs,x.UxScopeModal=hs,Object.defineProperties(x,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
8
8
|
//# sourceMappingURL=lib.umd.js.map
|