@processmaker/screen-builder 2.99.0 → 2.99.2

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.
@@ -282,7 +282,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
282
282
  `):" "+Lg(n[0]):"as no adapter specified";throw new De("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i},adapters:vd};function gd(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Vn(null,t)}function Bg(t){return gd(t),t.headers=Vr.from(t.headers),t.data=md.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Fg.getAdapter(t.adapter||pd.adapter)(t).then(function(i){return gd(t),i.data=md.call(t,t.transformResponse,i),i.headers=Vr.from(i.headers),i},function(i){return jg(i)||(gd(t),i&&i.response&&(i.response.data=md.call(t,t.transformResponse,i.response),i.response.headers=Vr.from(i.response.headers))),Promise.reject(i)})}const Hg=t=>t instanceof Vr?t.toJSON():t;function Pa(t,e){e=e||{};const r={};function i(l,c,d){return $.isPlainObject(l)&&$.isPlainObject(c)?$.merge.call({caseless:d},l,c):$.isPlainObject(c)?$.merge({},c):$.isArray(c)?c.slice():c}function a(l,c,d){if($.isUndefined(c)){if(!$.isUndefined(l))return i(void 0,l,d)}else return i(l,c,d)}function n(l,c){if(!$.isUndefined(c))return i(void 0,c)}function s(l,c){if($.isUndefined(c)){if(!$.isUndefined(l))return i(void 0,l)}else return i(void 0,c)}function o(l,c,d){if(d in e)return i(l,c);if(d in t)return i(void 0,l)}const u={url:n,method:n,data:n,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(l,c)=>a(Hg(l),Hg(c),!0)};return $.forEach(Object.keys(Object.assign({},t,e)),function(c){const d=u[c]||a,f=d(t[c],e[c],c);$.isUndefined(f)&&d!==o||(r[c]=f)}),r}const Rg="1.6.7",bd={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{bd[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}});const qg={};bd.transitional=function(e,r,i){function a(n,s){return"[Axios v"+Rg+"] Transitional option '"+n+"'"+s+(i?". "+i:"")}return(n,s,o)=>{if(e===!1)throw new De(a(s," has been removed"+(r?" in "+r:"")),De.ERR_DEPRECATED);return r&&!qg[s]&&(qg[s]=!0,console.warn(a(s," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(n,s,o):!0}};function yB(t,e,r){if(typeof t!="object")throw new De("options must be an object",De.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let a=i.length;for(;a-- >0;){const n=i[a],s=e[n];if(s){const o=t[n],u=o===void 0||s(o,n,t);if(u!==!0)throw new De("option "+n+" must be "+u,De.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new De("Unknown option "+n,De.ERR_BAD_OPTION)}}const yd={assertOptions:yB,validators:bd},ci=yd.validators;class vl{constructor(e){this.defaults=e,this.interceptors={request:new Dg,response:new Dg}}async request(e,r){try{return await this._request(e,r)}catch(i){if(i instanceof Error){let a;Error.captureStackTrace?Error.captureStackTrace(a={}):a=new Error;const n=a.stack?a.stack.replace(/^.+\n/,""):"";i.stack?n&&!String(i.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(i.stack+=`
283
283
  `+n):i.stack=n}throw i}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Pa(this.defaults,r);const{transitional:i,paramsSerializer:a,headers:n}=r;i!==void 0&&yd.assertOptions(i,{silentJSONParsing:ci.transitional(ci.boolean),forcedJSONParsing:ci.transitional(ci.boolean),clarifyTimeoutError:ci.transitional(ci.boolean)},!1),a!=null&&($.isFunction(a)?r.paramsSerializer={serialize:a}:yd.assertOptions(a,{encode:ci.function,serialize:ci.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let s=n&&$.merge(n.common,n[r.method]);n&&$.forEach(["delete","get","head","post","put","patch","common"],S=>{delete n[S]}),r.headers=Vr.concat(s,n);const o=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(u=u&&h.synchronous,o.unshift(h.fulfilled,h.rejected))});const l=[];this.interceptors.response.forEach(function(h){l.push(h.fulfilled,h.rejected)});let c,d=0,f;if(!u){const S=[Bg.bind(this),void 0];for(S.unshift.apply(S,o),S.push.apply(S,l),f=S.length,c=Promise.resolve(r);d<f;)c=c.then(S[d++],S[d++]);return c}f=o.length;let g=r;for(d=0;d<f;){const S=o[d++],h=o[d++];try{g=S(g)}catch(y){h.call(this,y);break}}try{c=Bg.call(this,g)}catch(S){return Promise.reject(S)}for(d=0,f=l.length;d<f;)c=c.then(l[d++],l[d++]);return c}getUri(e){e=Pa(this.defaults,e);const r=Ng(e.baseURL,e.url);return dd(r,e.params,e.paramsSerializer)}}$.forEach(["delete","get","head","options"],function(e){vl.prototype[e]=function(r,i){return this.request(Pa(i||{},{method:e,url:r,data:(i||{}).data}))}}),$.forEach(["post","put","patch"],function(e){function r(i){return function(n,s,o){return this.request(Pa(o||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:n,data:s}))}}vl.prototype[e]=r(),vl.prototype[e+"Form"]=r(!0)});const gl=vl;class xd{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(n){r=n});const i=this;this.promise.then(a=>{if(!i._listeners)return;let n=i._listeners.length;for(;n-- >0;)i._listeners[n](a);i._listeners=null}),this.promise.then=a=>{let n;const s=new Promise(o=>{i.subscribe(o),n=o}).then(a);return s.cancel=function(){i.unsubscribe(n)},s},e(function(n,s,o){i.reason||(i.reason=new Vn(n,s,o),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}static source(){let e;return{token:new xd(function(a){e=a}),cancel:e}}}const xB=xd;function wB(t){return function(r){return t.apply(null,r)}}function PB(t){return $.isObject(t)&&t.isAxiosError===!0}const wd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(wd).forEach(([t,e])=>{wd[e]=t});const SB=wd;function Wg(t){const e=new gl(t),r=fg(gl.prototype.request,e);return $.extend(r,gl.prototype,e,{allOwnKeys:!0}),$.extend(r,e,null,{allOwnKeys:!0}),r.create=function(a){return Wg(Pa(t,a))},r}const tt=Wg(pd);tt.Axios=gl,tt.CanceledError=Vn,tt.CancelToken=xB,tt.isCancel=jg,tt.VERSION=Rg,tt.toFormData=pl,tt.AxiosError=De,tt.Cancel=tt.CanceledError,tt.all=function(e){return Promise.all(e)},tt.spread=wB,tt.isAxiosError=PB,tt.mergeConfig=Pa,tt.AxiosHeaders=Vr,tt.formToJSON=t=>Og($.isHTMLForm(t)?new FormData(t):t),tt.getAdapter=Fg.getAdapter,tt.HttpStatusCode=SB,tt.default=tt;const Xn=tt,Jn=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,bl=typeof AbortController=="function"?AbortController:class{constructor(){this.signal=new Vg}abort(e=new Error("This operation was aborted")){this.signal.reason=this.signal.reason||e,this.signal.aborted=!0,this.signal.dispatchEvent({type:"abort",target:this.signal})}},kB=typeof AbortSignal=="function",TB=typeof bl.AbortSignal=="function",Vg=kB?AbortSignal:TB?bl.AbortController:class{constructor(){this.reason=void 0,this.aborted=!1,this._listeners=[]}dispatchEvent(e){e.type==="abort"&&(this.aborted=!0,this.onabort(e),this._listeners.forEach(r=>r(e),this))}onabort(){}addEventListener(e,r){e==="abort"&&this._listeners.push(r)}removeEventListener(e,r){e==="abort"&&(this._listeners=this._listeners.filter(i=>i!==r))}},Pd=new Set,Sd=(t,e)=>{const r=`LRU_CACHE_OPTION_${t}`;yl(r)&&Td(r,`${t} option`,`options.${e}`,wl)},kd=(t,e)=>{const r=`LRU_CACHE_METHOD_${t}`;if(yl(r)){const{prototype:i}=wl,{get:a}=Object.getOwnPropertyDescriptor(i,t);Td(r,`${t} method`,`cache.${e}()`,a)}},CB=(t,e)=>{const r=`LRU_CACHE_PROPERTY_${t}`;if(yl(r)){const{prototype:i}=wl,{get:a}=Object.getOwnPropertyDescriptor(i,t);Td(r,`${t} property`,`cache.${e}`,a)}},Xg=(...t)=>{typeof process=="object"&&process&&typeof process.emitWarning=="function"?process.emitWarning(...t):console.error(...t)},yl=t=>!Pd.has(t),Td=(t,e,r,i)=>{Pd.add(t);const a=`The ${e} is deprecated. Please use ${r} instead.`;Xg(a,"DeprecationWarning",t,i)},di=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Jg=t=>di(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?xl:null:null;let xl=class extends Array{constructor(e){super(e),this.fill(0)}},MB=class{constructor(e){if(e===0)return[];const r=Jg(e);this.heap=new r(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},wl=class mp{constructor(e={}){const{max:r=0,ttl:i,ttlResolution:a=1,ttlAutopurge:n,updateAgeOnGet:s,updateAgeOnHas:o,allowStale:u,dispose:l,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:f,maxSize:g=0,maxEntrySize:S=0,sizeCalculation:h,fetchMethod:y,fetchContext:x,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:b,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:P,ignoreFetchAbort:v}=e,{length:m,maxAge:k,stale:D}=e instanceof mp?{}:e;if(r!==0&&!di(r))throw new TypeError("max option must be a nonnegative integer");const T=r?Jg(r):Array;if(!T)throw new Error("invalid max value: "+r);if(this.max=r,this.maxSize=g,this.maxEntrySize=S||this.maxSize,this.sizeCalculation=h||m,this.sizeCalculation){if(!this.maxSize&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(this.fetchMethod=y||null,this.fetchMethod&&typeof this.fetchMethod!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.fetchContext=x,!this.fetchMethod&&x!==void 0)throw new TypeError("cannot set fetchContext without fetchMethod");if(this.keyMap=new Map,this.keyList=new Array(r).fill(null),this.valList=new Array(r).fill(null),this.next=new T(r),this.prev=new T(r),this.head=0,this.tail=0,this.free=new MB(r),this.initialFill=1,this.size=0,typeof l=="function"&&(this.dispose=l),typeof c=="function"?(this.disposeAfter=c,this.disposed=[]):(this.disposeAfter=null,this.disposed=null),this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!w,this.allowStaleOnFetchRejection=!!p,this.allowStaleOnFetchAbort=!!P,this.ignoreFetchAbort=!!v,this.maxEntrySize!==0){if(this.maxSize!==0&&!di(this.maxSize))throw new TypeError("maxSize must be a positive integer if specified");if(!di(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.initializeSizeTracking()}if(this.allowStale=!!u||!!D,this.noDeleteOnStaleGet=!!b,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!o,this.ttlResolution=di(a)||a===0?a:1,this.ttlAutopurge=!!n,this.ttl=i||k||0,this.ttl){if(!di(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.initializeTTLTracking()}if(this.max===0&&this.ttl===0&&this.maxSize===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.max&&!this.maxSize){const z="LRU_CACHE_UNBOUNDED";yl(z)&&(Pd.add(z),Xg("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",z,mp))}D&&Sd("stale","allowStale"),k&&Sd("maxAge","ttl"),m&&Sd("length","sizeCalculation")}getRemainingTTL(e){return this.has(e,{updateAgeOnHas:!1})?1/0:0}initializeTTLTracking(){this.ttls=new xl(this.max),this.starts=new xl(this.max),this.setItemTTL=(i,a,n=Jn.now())=>{if(this.starts[i]=a!==0?n:0,this.ttls[i]=a,a!==0&&this.ttlAutopurge){const s=setTimeout(()=>{this.isStale(i)&&this.delete(this.keyList[i])},a+1);s.unref&&s.unref()}},this.updateItemAge=i=>{this.starts[i]=this.ttls[i]!==0?Jn.now():0},this.statusTTL=(i,a)=>{i&&(i.ttl=this.ttls[a],i.start=this.starts[a],i.now=e||r(),i.remainingTTL=i.now+i.ttl-i.start)};let e=0;const r=()=>{const i=Jn.now();if(this.ttlResolution>0){e=i;const a=setTimeout(()=>e=0,this.ttlResolution);a.unref&&a.unref()}return i};this.getRemainingTTL=i=>{const a=this.keyMap.get(i);return a===void 0?0:this.ttls[a]===0||this.starts[a]===0?1/0:this.starts[a]+this.ttls[a]-(e||r())},this.isStale=i=>this.ttls[i]!==0&&this.starts[i]!==0&&(e||r())-this.starts[i]>this.ttls[i]}updateItemAge(e){}statusTTL(e,r){}setItemTTL(e,r,i){}isStale(e){return!1}initializeSizeTracking(){this.calculatedSize=0,this.sizes=new xl(this.max),this.removeItemSize=e=>{this.calculatedSize-=this.sizes[e],this.sizes[e]=0},this.requireSize=(e,r,i,a)=>{if(this.isBackgroundFetch(r))return 0;if(!di(i))if(a){if(typeof a!="function")throw new TypeError("sizeCalculation must be a function");if(i=a(r,e),!di(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.addItemSize=(e,r,i)=>{if(this.sizes[e]=r,this.maxSize){const a=this.maxSize-this.sizes[e];for(;this.calculatedSize>a;)this.evict(!0)}this.calculatedSize+=this.sizes[e],i&&(i.entrySize=r,i.totalCalculatedSize=this.calculatedSize)}}removeItemSize(e){}addItemSize(e,r){}requireSize(e,r,i,a){if(i||a)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache")}*indexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.tail;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.head));)r=this.prev[r]}*rindexes({allowStale:e=this.allowStale}={}){if(this.size)for(let r=this.head;!(!this.isValidIndex(r)||((e||!this.isStale(r))&&(yield r),r===this.tail));)r=this.next[r]}isValidIndex(e){return e!==void 0&&this.keyMap.get(this.keyList[e])===e}*entries(){for(const e of this.indexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*rentries(){for(const e of this.rindexes())this.valList[e]!==void 0&&this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield[this.keyList[e],this.valList[e]])}*keys(){for(const e of this.indexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*rkeys(){for(const e of this.rindexes())this.keyList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.keyList[e])}*values(){for(const e of this.indexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}*rvalues(){for(const e of this.rindexes())this.valList[e]!==void 0&&!this.isBackgroundFetch(this.valList[e])&&(yield this.valList[e])}[Symbol.iterator](){return this.entries()}find(e,r){for(const i of this.indexes()){const a=this.valList[i],n=this.isBackgroundFetch(a)?a.__staleWhileFetching:a;if(n!==void 0&&e(n,this.keyList[i],this))return this.get(this.keyList[i],r)}}forEach(e,r=this){for(const i of this.indexes()){const a=this.valList[i],n=this.isBackgroundFetch(a)?a.__staleWhileFetching:a;n!==void 0&&e.call(r,n,this.keyList[i],this)}}rforEach(e,r=this){for(const i of this.rindexes()){const a=this.valList[i],n=this.isBackgroundFetch(a)?a.__staleWhileFetching:a;n!==void 0&&e.call(r,n,this.keyList[i],this)}}get prune(){return kd("prune","purgeStale"),this.purgeStale}purgeStale(){let e=!1;for(const r of this.rindexes({allowStale:!0}))this.isStale(r)&&(this.delete(this.keyList[r]),e=!0);return e}dump(){const e=[];for(const r of this.indexes({allowStale:!0})){const i=this.keyList[r],a=this.valList[r],n=this.isBackgroundFetch(a)?a.__staleWhileFetching:a;if(n===void 0)continue;const s={value:n};if(this.ttls){s.ttl=this.ttls[r];const o=Jn.now()-this.starts[r];s.start=Math.floor(Date.now()-o)}this.sizes&&(s.size=this.sizes[r]),e.unshift([i,s])}return e}load(e){this.clear();for(const[r,i]of e){if(i.start){const a=Date.now()-i.start;i.start=Jn.now()-a}this.set(r,i.value,i)}}dispose(e,r,i){}set(e,r,{ttl:i=this.ttl,start:a,noDisposeOnSet:n=this.noDisposeOnSet,size:s=0,sizeCalculation:o=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,status:l}={}){if(s=this.requireSize(e,r,s,o),this.maxEntrySize&&s>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.delete(e),this;let c=this.size===0?void 0:this.keyMap.get(e);if(c===void 0)c=this.newIndex(),this.keyList[c]=e,this.valList[c]=r,this.keyMap.set(e,c),this.next[this.tail]=c,this.prev[c]=this.tail,this.tail=c,this.size++,this.addItemSize(c,s,l),l&&(l.set="add"),u=!1;else{this.moveToTail(c);const d=this.valList[c];if(r!==d){if(this.isBackgroundFetch(d)?d.__abortController.abort(new Error("replaced")):n||(this.dispose(d,e,"set"),this.disposeAfter&&this.disposed.push([d,e,"set"])),this.removeItemSize(c),this.valList[c]=r,this.addItemSize(c,s,l),l){l.set="replace";const f=d&&this.isBackgroundFetch(d)?d.__staleWhileFetching:d;f!==void 0&&(l.oldValue=f)}}else l&&(l.set="update")}if(i!==0&&this.ttl===0&&!this.ttls&&this.initializeTTLTracking(),u||this.setItemTTL(c,i,a),this.statusTTL(l,c),this.disposeAfter)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return this}newIndex(){return this.size===0?this.tail:this.size===this.max&&this.max!==0?this.evict(!1):this.free.length!==0?this.free.pop():this.initialFill++}pop(){if(this.size){const e=this.valList[this.head];return this.evict(!0),e}}evict(e){const r=this.head,i=this.keyList[r],a=this.valList[r];return this.isBackgroundFetch(a)?a.__abortController.abort(new Error("evicted")):(this.dispose(a,i,"evict"),this.disposeAfter&&this.disposed.push([a,i,"evict"])),this.removeItemSize(r),e&&(this.keyList[r]=null,this.valList[r]=null,this.free.push(r)),this.head=this.next[r],this.keyMap.delete(i),this.size--,r}has(e,{updateAgeOnHas:r=this.updateAgeOnHas,status:i}={}){const a=this.keyMap.get(e);if(a!==void 0)if(this.isStale(a))i&&(i.has="stale",this.statusTTL(i,a));else return r&&this.updateItemAge(a),i&&(i.has="hit"),this.statusTTL(i,a),!0;else i&&(i.has="miss");return!1}peek(e,{allowStale:r=this.allowStale}={}){const i=this.keyMap.get(e);if(i!==void 0&&(r||!this.isStale(i))){const a=this.valList[i];return this.isBackgroundFetch(a)?a.__staleWhileFetching:a}}backgroundFetch(e,r,i,a){const n=r===void 0?void 0:this.valList[r];if(this.isBackgroundFetch(n))return n;const s=new bl;i.signal&&i.signal.addEventListener("abort",()=>s.abort(i.signal.reason));const o={signal:s.signal,options:i,context:a},u=(g,S=!1)=>{const{aborted:h}=s.signal,y=i.ignoreFetchAbort&&g!==void 0;return i.status&&(h&&!S?(i.status.fetchAborted=!0,i.status.fetchError=s.signal.reason,y&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),h&&!y&&!S?c(s.signal.reason):(this.valList[r]===f&&(g===void 0?f.__staleWhileFetching?this.valList[r]=f.__staleWhileFetching:this.delete(e):(i.status&&(i.status.fetchUpdated=!0),this.set(e,g,o.options))),g)},l=g=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=g),c(g)),c=g=>{const{aborted:S}=s.signal,h=S&&i.allowStaleOnFetchAbort,y=h||i.allowStaleOnFetchRejection,x=y||i.noDeleteOnFetchRejection;if(this.valList[r]===f&&(!x||f.__staleWhileFetching===void 0?this.delete(e):h||(this.valList[r]=f.__staleWhileFetching)),y)return i.status&&f.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),f.__staleWhileFetching;if(f.__returned===f)throw g},d=(g,S)=>{this.fetchMethod(e,n,o).then(h=>g(h),S),s.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(g(),i.allowStaleOnFetchAbort&&(g=h=>u(h,!0)))})};i.status&&(i.status.fetchDispatched=!0);const f=new Promise(d).then(u,l);return f.__abortController=s,f.__staleWhileFetching=n,f.__returned=null,r===void 0?(this.set(e,f,{...o.options,status:void 0}),r=this.keyMap.get(e)):this.valList[r]=f,f}isBackgroundFetch(e){return e&&typeof e=="object"&&typeof e.then=="function"&&Object.prototype.hasOwnProperty.call(e,"__staleWhileFetching")&&Object.prototype.hasOwnProperty.call(e,"__returned")&&(e.__returned===e||e.__returned===null)}async fetch(e,{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,ttl:n=this.ttl,noDisposeOnSet:s=this.noDisposeOnSet,size:o=0,sizeCalculation:u=this.sizeCalculation,noUpdateTTL:l=this.noUpdateTTL,noDeleteOnFetchRejection:c=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:f=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,fetchContext:S=this.fetchContext,forceRefresh:h=!1,status:y,signal:x}={}){if(!this.fetchMethod)return y&&(y.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:a,status:y});const w={allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:a,ttl:n,noDisposeOnSet:s,size:o,sizeCalculation:u,noUpdateTTL:l,noDeleteOnFetchRejection:c,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:g,ignoreFetchAbort:f,status:y,signal:x};let b=this.keyMap.get(e);if(b===void 0){y&&(y.fetch="miss");const p=this.backgroundFetch(e,b,w,S);return p.__returned=p}else{const p=this.valList[b];if(this.isBackgroundFetch(p)){const D=r&&p.__staleWhileFetching!==void 0;return y&&(y.fetch="inflight",D&&(y.returnedStale=!0)),D?p.__staleWhileFetching:p.__returned=p}const P=this.isStale(b);if(!h&&!P)return y&&(y.fetch="hit"),this.moveToTail(b),i&&this.updateItemAge(b),this.statusTTL(y,b),p;const v=this.backgroundFetch(e,b,w,S),m=v.__staleWhileFetching!==void 0,k=m&&r;return y&&(y.fetch=m&&P?"stale":"refresh",k&&P&&(y.returnedStale=!0)),k?v.__staleWhileFetching:v.__returned=v}}get(e,{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:a=this.noDeleteOnStaleGet,status:n}={}){const s=this.keyMap.get(e);if(s!==void 0){const o=this.valList[s],u=this.isBackgroundFetch(o);return this.statusTTL(n,s),this.isStale(s)?(n&&(n.get="stale"),u?(n&&(n.returnedStale=r&&o.__staleWhileFetching!==void 0),r?o.__staleWhileFetching:void 0):(a||this.delete(e),n&&(n.returnedStale=r),r?o:void 0)):(n&&(n.get="hit"),u?o.__staleWhileFetching:(this.moveToTail(s),i&&this.updateItemAge(s),o))}else n&&(n.get="miss")}connect(e,r){this.prev[r]=e,this.next[e]=r}moveToTail(e){e!==this.tail&&(e===this.head?this.head=this.next[e]:this.connect(this.prev[e],this.next[e]),this.connect(this.tail,e),this.tail=e)}get del(){return kd("del","delete"),this.delete}delete(e){let r=!1;if(this.size!==0){const i=this.keyMap.get(e);if(i!==void 0)if(r=!0,this.size===1)this.clear();else{this.removeItemSize(i);const a=this.valList[i];this.isBackgroundFetch(a)?a.__abortController.abort(new Error("deleted")):(this.dispose(a,e,"delete"),this.disposeAfter&&this.disposed.push([a,e,"delete"])),this.keyMap.delete(e),this.keyList[i]=null,this.valList[i]=null,i===this.tail?this.tail=this.prev[i]:i===this.head?this.head=this.next[i]:(this.next[this.prev[i]]=this.next[i],this.prev[this.next[i]]=this.prev[i]),this.size--,this.free.push(i)}}if(this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift());return r}clear(){for(const e of this.rindexes({allowStale:!0})){const r=this.valList[e];if(this.isBackgroundFetch(r))r.__abortController.abort(new Error("deleted"));else{const i=this.keyList[e];this.dispose(r,i,"delete"),this.disposeAfter&&this.disposed.push([r,i,"delete"])}}if(this.keyMap.clear(),this.valList.fill(null),this.keyList.fill(null),this.ttls&&(this.ttls.fill(0),this.starts.fill(0)),this.sizes&&this.sizes.fill(0),this.head=0,this.tail=0,this.initialFill=1,this.free.length=0,this.calculatedSize=0,this.size=0,this.disposed)for(;this.disposed.length;)this.disposeAfter(...this.disposed.shift())}get reset(){return kd("reset","clear"),this.clear}get length(){return CB("length","size"),this.size}static get AbortController(){return bl}static get AbortSignal(){return Vg}};const DB=wl;function AB(t,e,r,i){function a(n){return n instanceof r?n:new r(function(s){s(n)})}return new(r||(r=Promise))(function(n,s){function o(c){try{l(i.next(c))}catch(d){s(d)}}function u(c){try{l(i.throw(c))}catch(d){s(d)}}function l(c){c.done?n(c.value):a(c.value).then(o,u)}l((i=i.apply(t,e||[])).next())})}function zB(t,e){var r={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},i,a,n,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(l){return function(c){return u([l,c])}}function u(l){if(i)throw new TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(r=0)),r;)try{if(i=1,a&&(n=l[0]&2?a.return:l[0]?a.throw||((n=a.return)&&n.call(a),0):a.next)&&!(n=n.call(a,l[1])).done)return n;switch(a=0,n&&(l=[l[0]&2,n.value]),l[0]){case 0:case 1:n=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,a=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(n=r.trys,!(n=n.length>0&&n[n.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!n||l[1]>n[0]&&l[1]<n[3])){r.label=l[1];break}if(l[0]===6&&r.label<n[1]){r.label=n[1],n=l;break}if(n&&r.label<n[2]){r.label=n[2],r.ops.push(l);break}n[2]&&r.ops.pop(),r.trys.pop();continue}l=e.call(t,r)}catch(c){l=[6,c],a=0}finally{i=n=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}typeof SuppressedError=="function"&&SuppressedError;function OB(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=dd.apply(void 0,t),i=r.split("?"),a=i[0],n=i[1];if(n){var s=n.split("&");return"".concat(a,"?").concat(s.sort().join("&"))}return r}function EB(t){return typeof t.get=="function"&&typeof t.set=="function"&&(typeof t.delete=="function"||typeof t.del=="function")}var jB=1e3*60*5,NB=100;function Ug(t,e){var r=this;e===void 0&&(e={});var i=e.enabledByDefault,a=i===void 0?!0:i,n=e.cacheFlag,s=n===void 0?"cache":n,o=e.defaultCache,u=o===void 0?new DB({ttl:jB,max:NB}):o;return function(l){var c=l.url,d=l.method,f=l.params,g=l.paramsSerializer,S=l.forceUpdate,h=l[s]!==void 0&&l[s]!==null?l[s]:a;if(d==="get"&&h){var y=EB(h)?h:u,x=OB(c,f,g),w=y.get(x);return!w||S?(w=function(){return AB(r,void 0,void 0,function(){var b;return zB(this,function(p){switch(p.label){case 0:return p.trys.push([0,2,,3]),[4,t(l)];case 1:return[2,p.sent()];case 2:throw b=p.sent(),"delete"in y?y.delete(x):y.del(x),b;case 3:return[2]}})})}(),y.set(x,w),w):({}.LOGGER_LEVEL==="info"&&console.info("[axios-extensions] request cached by cache adapter --> url: ".concat(x)),w)}return t(l)}}const Sa=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Gg=new Set,Cd=typeof process=="object"&&process?process:{},Qg=(t,e,r,i)=>{typeof Cd.emitWarning=="function"?Cd.emitWarning(t,e,r,i):console.error(`[${r}] ${e}: ${t}`)};let Pl=globalThis.AbortController,Yg=globalThis.AbortSignal;if(typeof Pl>"u"){Yg=class{constructor(){se(this,"onabort");se(this,"_onabort",[]);se(this,"reason");se(this,"aborted",!1)}addEventListener(i,a){this._onabort.push(a)}},Pl=class{constructor(){se(this,"signal",new Yg);e()}abort(i){var a,n;if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(const s of this.signal._onabort)s(i);(n=(a=this.signal).onabort)==null||n.call(a,i)}}};let t=((CP=Cd.env)==null?void 0:CP.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,Qg("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const IB=t=>!Gg.has(t),fi=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Zg=t=>fi(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Sl:null:null;class Sl extends Array{constructor(e){super(e),this.fill(0)}}const Zi=class Zi{constructor(e,r){se(this,"heap");se(this,"length");if(!X(Zi,Ya))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}static create(e){const r=Zg(e);if(!r)return[];ve(Zi,Ya,!0);const i=new Zi(e,r);return ve(Zi,Ya,!1),i}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};Ya=new WeakMap,ke(Zi,Ya,!1);let Md=Zi;const cp=class cp{constructor(e){ke(this,As);ke(this,Su);ke(this,Er);ke(this,jr);ke(this,Es);ke(this,_a);ke(this,$a);ke(this,Ie);ke(this,js);ke(this,$i);ke(this,fr,void 0);ke(this,Rt,void 0);ke(this,pr,void 0);ke(this,hr,void 0);ke(this,Za,void 0);se(this,"ttl");se(this,"ttlResolution");se(this,"ttlAutopurge");se(this,"updateAgeOnGet");se(this,"updateAgeOnHas");se(this,"allowStale");se(this,"noDisposeOnSet");se(this,"noUpdateTTL");se(this,"maxEntrySize");se(this,"sizeCalculation");se(this,"noDeleteOnFetchRejection");se(this,"noDeleteOnStaleGet");se(this,"allowStaleOnFetchAbort");se(this,"allowStaleOnFetchRejection");se(this,"ignoreFetchAbort");ke(this,nt,void 0);ke(this,mr,void 0);ke(this,it,void 0);ke(this,We,void 0);ke(this,Pe,void 0);ke(this,wt,void 0);ke(this,qt,void 0);ke(this,vt,void 0);ke(this,st,void 0);ke(this,vr,void 0);ke(this,ot,void 0);ke(this,gr,void 0);ke(this,br,void 0);ke(this,Wt,void 0);ke(this,yr,void 0);ke(this,xi,void 0);ke(this,Pt,void 0);ke(this,Ki,()=>{});ke(this,ri,()=>{});ke(this,zs,()=>{});ke(this,Vt,()=>!1);ke(this,_i,e=>{});ke(this,Ka,(e,r,i)=>{});ke(this,Os,(e,r,i,a)=>{if(i||a)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});const{max:r=0,ttl:i,ttlResolution:a=1,ttlAutopurge:n,updateAgeOnGet:s,updateAgeOnHas:o,allowStale:u,dispose:l,disposeAfter:c,noDisposeOnSet:d,noUpdateTTL:f,maxSize:g=0,maxEntrySize:S=0,sizeCalculation:h,fetchMethod:y,noDeleteOnFetchRejection:x,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:b,allowStaleOnFetchAbort:p,ignoreFetchAbort:P}=e;if(r!==0&&!fi(r))throw new TypeError("max option must be a nonnegative integer");const v=r?Zg(r):Array;if(!v)throw new Error("invalid max value: "+r);if(ve(this,fr,r),ve(this,Rt,g),this.maxEntrySize=S||X(this,Rt),this.sizeCalculation=h,this.sizeCalculation){if(!X(this,Rt)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(y!==void 0&&typeof y!="function")throw new TypeError("fetchMethod must be a function if specified");if(ve(this,Za,y),ve(this,xi,!!y),ve(this,it,new Map),ve(this,We,new Array(r).fill(void 0)),ve(this,Pe,new Array(r).fill(void 0)),ve(this,wt,new v(r)),ve(this,qt,new v(r)),ve(this,vt,0),ve(this,st,0),ve(this,vr,Md.create(r)),ve(this,nt,0),ve(this,mr,0),typeof l=="function"&&ve(this,pr,l),typeof c=="function"?(ve(this,hr,c),ve(this,ot,[])):(ve(this,hr,void 0),ve(this,ot,void 0)),ve(this,yr,!!X(this,pr)),ve(this,Pt,!!X(this,hr)),this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!x,this.allowStaleOnFetchRejection=!!b,this.allowStaleOnFetchAbort=!!p,this.ignoreFetchAbort=!!P,this.maxEntrySize!==0){if(X(this,Rt)!==0&&!fi(X(this,Rt)))throw new TypeError("maxSize must be a positive integer if specified");if(!fi(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");pe(this,Su,AP).call(this)}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!o,this.ttlResolution=fi(a)||a===0?a:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!fi(this.ttl))throw new TypeError("ttl must be a positive integer if specified");pe(this,As,vp).call(this)}if(X(this,fr)===0&&this.ttl===0&&X(this,Rt)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!X(this,fr)&&!X(this,Rt)){const m="LRU_CACHE_UNBOUNDED";IB(m)&&(Gg.add(m),Qg("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",m,cp))}}static unsafeExposeInternals(e){return{starts:X(e,br),ttls:X(e,Wt),sizes:X(e,gr),keyMap:X(e,it),keyList:X(e,We),valList:X(e,Pe),next:X(e,wt),prev:X(e,qt),get head(){return X(e,vt)},get tail(){return X(e,st)},free:X(e,vr),isBackgroundFetch:r=>{var i;return pe(i=e,Ie,Ve).call(i,r)},backgroundFetch:(r,i,a,n)=>{var s;return pe(s=e,$a,Du).call(s,r,i,a,n)},moveToTail:r=>{var i;return pe(i=e,$i,Is).call(i,r)},indexes:r=>{var i;return pe(i=e,Er,wi).call(i,r)},rindexes:r=>{var i;return pe(i=e,jr,Pi).call(i,r)},isStale:r=>{var i;return X(i=e,Vt).call(i,r)}}}get max(){return X(this,fr)}get maxSize(){return X(this,Rt)}get calculatedSize(){return X(this,mr)}get size(){return X(this,nt)}get fetchMethod(){return X(this,Za)}get dispose(){return X(this,pr)}get disposeAfter(){return X(this,hr)}getRemainingTTL(e){return X(this,it).has(e)?1/0:0}*entries(){for(const e of pe(this,Er,wi).call(this))X(this,Pe)[e]!==void 0&&X(this,We)[e]!==void 0&&!pe(this,Ie,Ve).call(this,X(this,Pe)[e])&&(yield[X(this,We)[e],X(this,Pe)[e]])}*rentries(){for(const e of pe(this,jr,Pi).call(this))X(this,Pe)[e]!==void 0&&X(this,We)[e]!==void 0&&!pe(this,Ie,Ve).call(this,X(this,Pe)[e])&&(yield[X(this,We)[e],X(this,Pe)[e]])}*keys(){for(const e of pe(this,Er,wi).call(this)){const r=X(this,We)[e];r!==void 0&&!pe(this,Ie,Ve).call(this,X(this,Pe)[e])&&(yield r)}}*rkeys(){for(const e of pe(this,jr,Pi).call(this)){const r=X(this,We)[e];r!==void 0&&!pe(this,Ie,Ve).call(this,X(this,Pe)[e])&&(yield r)}}*values(){for(const e of pe(this,Er,wi).call(this))X(this,Pe)[e]!==void 0&&!pe(this,Ie,Ve).call(this,X(this,Pe)[e])&&(yield X(this,Pe)[e])}*rvalues(){for(const e of pe(this,jr,Pi).call(this))X(this,Pe)[e]!==void 0&&!pe(this,Ie,Ve).call(this,X(this,Pe)[e])&&(yield X(this,Pe)[e])}[Symbol.iterator](){return this.entries()}find(e,r={}){for(const i of pe(this,Er,wi).call(this)){const a=X(this,Pe)[i],n=pe(this,Ie,Ve).call(this,a)?a.__staleWhileFetching:a;if(n!==void 0&&e(n,X(this,We)[i],this))return this.get(X(this,We)[i],r)}}forEach(e,r=this){for(const i of pe(this,Er,wi).call(this)){const a=X(this,Pe)[i],n=pe(this,Ie,Ve).call(this,a)?a.__staleWhileFetching:a;n!==void 0&&e.call(r,n,X(this,We)[i],this)}}rforEach(e,r=this){for(const i of pe(this,jr,Pi).call(this)){const a=X(this,Pe)[i],n=pe(this,Ie,Ve).call(this,a)?a.__staleWhileFetching:a;n!==void 0&&e.call(r,n,X(this,We)[i],this)}}purgeStale(){let e=!1;for(const r of pe(this,jr,Pi).call(this,{allowStale:!0}))X(this,Vt).call(this,r)&&(this.delete(X(this,We)[r]),e=!0);return e}info(e){const r=X(this,it).get(e);if(r===void 0)return;const i=X(this,Pe)[r],a=pe(this,Ie,Ve).call(this,i)?i.__staleWhileFetching:i;if(a===void 0)return;const n={value:a};if(X(this,Wt)&&X(this,br)){const s=X(this,Wt)[r],o=X(this,br)[r];if(s&&o){const u=s-(Sa.now()-o);n.ttl=u,n.start=Date.now()}}return X(this,gr)&&(n.size=X(this,gr)[r]),n}dump(){const e=[];for(const r of pe(this,Er,wi).call(this,{allowStale:!0})){const i=X(this,We)[r],a=X(this,Pe)[r],n=pe(this,Ie,Ve).call(this,a)?a.__staleWhileFetching:a;if(n===void 0||i===void 0)continue;const s={value:n};if(X(this,Wt)&&X(this,br)){s.ttl=X(this,Wt)[r];const o=Sa.now()-X(this,br)[r];s.start=Math.floor(Date.now()-o)}X(this,gr)&&(s.size=X(this,gr)[r]),e.unshift([i,s])}return e}load(e){this.clear();for(const[r,i]of e){if(i.start){const a=Date.now()-i.start;i.start=Sa.now()-a}this.set(r,i.value,i)}}set(e,r,i={}){var f,g,S,h,y;if(r===void 0)return this.delete(e),this;const{ttl:a=this.ttl,start:n,noDisposeOnSet:s=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:u}=i;let{noUpdateTTL:l=this.noUpdateTTL}=i;const c=X(this,Os).call(this,e,r,i.size||0,o);if(this.maxEntrySize&&c>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=!0),this.delete(e),this;let d=X(this,nt)===0?void 0:X(this,it).get(e);if(d===void 0)d=X(this,nt)===0?X(this,st):X(this,vr).length!==0?X(this,vr).pop():X(this,nt)===X(this,fr)?pe(this,_a,Mu).call(this,!1):X(this,nt),X(this,We)[d]=e,X(this,Pe)[d]=r,X(this,it).set(e,d),X(this,wt)[X(this,st)]=d,X(this,qt)[d]=X(this,st),ve(this,st,d),Cu(this,nt)._++,X(this,Ka).call(this,d,c,u),u&&(u.set="add"),l=!1;else{pe(this,$i,Is).call(this,d);const x=X(this,Pe)[d];if(r!==x){if(X(this,xi)&&pe(this,Ie,Ve).call(this,x)){x.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:w}=x;w!==void 0&&!s&&(X(this,yr)&&((f=X(this,pr))==null||f.call(this,w,e,"set")),X(this,Pt)&&((g=X(this,ot))==null||g.push([w,e,"set"])))}else s||(X(this,yr)&&((S=X(this,pr))==null||S.call(this,x,e,"set")),X(this,Pt)&&((h=X(this,ot))==null||h.push([x,e,"set"])));if(X(this,_i).call(this,d),X(this,Ka).call(this,d,c,u),X(this,Pe)[d]=r,u){u.set="replace";const w=x&&pe(this,Ie,Ve).call(this,x)?x.__staleWhileFetching:x;w!==void 0&&(u.oldValue=w)}}else u&&(u.set="update")}if(a!==0&&!X(this,Wt)&&pe(this,As,vp).call(this),X(this,Wt)&&(l||X(this,zs).call(this,d,a,n),u&&X(this,ri).call(this,u,d)),!s&&X(this,Pt)&&X(this,ot)){const x=X(this,ot);let w;for(;w=x==null?void 0:x.shift();)(y=X(this,hr))==null||y.call(this,...w)}return this}pop(){var e;try{for(;X(this,nt);){const r=X(this,Pe)[X(this,vt)];if(pe(this,_a,Mu).call(this,!0),pe(this,Ie,Ve).call(this,r)){if(r.__staleWhileFetching)return r.__staleWhileFetching}else if(r!==void 0)return r}}finally{if(X(this,Pt)&&X(this,ot)){const r=X(this,ot);let i;for(;i=r==null?void 0:r.shift();)(e=X(this,hr))==null||e.call(this,...i)}}}has(e,r={}){const{updateAgeOnHas:i=this.updateAgeOnHas,status:a}=r,n=X(this,it).get(e);if(n!==void 0){const s=X(this,Pe)[n];if(pe(this,Ie,Ve).call(this,s)&&s.__staleWhileFetching===void 0)return!1;if(X(this,Vt).call(this,n))a&&(a.has="stale",X(this,ri).call(this,a,n));else return i&&X(this,Ki).call(this,n),a&&(a.has="hit",X(this,ri).call(this,a,n)),!0}else a&&(a.has="miss");return!1}peek(e,r={}){const{allowStale:i=this.allowStale}=r,a=X(this,it).get(e);if(a===void 0||!i&&X(this,Vt).call(this,a))return;const n=X(this,Pe)[a];return pe(this,Ie,Ve).call(this,n)?n.__staleWhileFetching:n}async fetch(e,r={}){const{allowStale:i=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:u=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:g=this.ignoreFetchAbort,allowStaleOnFetchAbort:S=this.allowStaleOnFetchAbort,context:h,forceRefresh:y=!1,status:x,signal:w}=r;if(!X(this,xi))return x&&(x.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:a,noDeleteOnStaleGet:n,status:x});const b={allowStale:i,updateAgeOnGet:a,noDeleteOnStaleGet:n,ttl:s,noDisposeOnSet:o,size:u,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:S,ignoreFetchAbort:g,status:x,signal:w};let p=X(this,it).get(e);if(p===void 0){x&&(x.fetch="miss");const P=pe(this,$a,Du).call(this,e,p,b,h);return P.__returned=P}else{const P=X(this,Pe)[p];if(pe(this,Ie,Ve).call(this,P)){const T=i&&P.__staleWhileFetching!==void 0;return x&&(x.fetch="inflight",T&&(x.returnedStale=!0)),T?P.__staleWhileFetching:P.__returned=P}const v=X(this,Vt).call(this,p);if(!y&&!v)return x&&(x.fetch="hit"),pe(this,$i,Is).call(this,p),a&&X(this,Ki).call(this,p),x&&X(this,ri).call(this,x,p),P;const m=pe(this,$a,Du).call(this,e,p,b,h),D=m.__staleWhileFetching!==void 0&&i;return x&&(x.fetch=v?"stale":"refresh",D&&v&&(x.returnedStale=!0)),D?m.__staleWhileFetching:m.__returned=m}}get(e,r={}){const{allowStale:i=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:s}=r,o=X(this,it).get(e);if(o!==void 0){const u=X(this,Pe)[o],l=pe(this,Ie,Ve).call(this,u);return s&&X(this,ri).call(this,s,o),X(this,Vt).call(this,o)?(s&&(s.get="stale"),l?(s&&i&&u.__staleWhileFetching!==void 0&&(s.returnedStale=!0),i?u.__staleWhileFetching:void 0):(n||this.delete(e),s&&i&&(s.returnedStale=!0),i?u:void 0)):(s&&(s.get="hit"),l?u.__staleWhileFetching:(pe(this,$i,Is).call(this,o),a&&X(this,Ki).call(this,o),u))}else s&&(s.get="miss")}delete(e){var i,a,n,s;let r=!1;if(X(this,nt)!==0){const o=X(this,it).get(e);if(o!==void 0)if(r=!0,X(this,nt)===1)this.clear();else{X(this,_i).call(this,o);const u=X(this,Pe)[o];if(pe(this,Ie,Ve).call(this,u)?u.__abortController.abort(new Error("deleted")):(X(this,yr)||X(this,Pt))&&(X(this,yr)&&((i=X(this,pr))==null||i.call(this,u,e,"delete")),X(this,Pt)&&((a=X(this,ot))==null||a.push([u,e,"delete"]))),X(this,it).delete(e),X(this,We)[o]=void 0,X(this,Pe)[o]=void 0,o===X(this,st))ve(this,st,X(this,qt)[o]);else if(o===X(this,vt))ve(this,vt,X(this,wt)[o]);else{const l=X(this,qt)[o];X(this,wt)[l]=X(this,wt)[o];const c=X(this,wt)[o];X(this,qt)[c]=X(this,qt)[o]}Cu(this,nt)._--,X(this,vr).push(o)}}if(X(this,Pt)&&((n=X(this,ot))!=null&&n.length)){const o=X(this,ot);let u;for(;u=o==null?void 0:o.shift();)(s=X(this,hr))==null||s.call(this,...u)}return r}clear(){var e,r,i;for(const a of pe(this,jr,Pi).call(this,{allowStale:!0})){const n=X(this,Pe)[a];if(pe(this,Ie,Ve).call(this,n))n.__abortController.abort(new Error("deleted"));else{const s=X(this,We)[a];X(this,yr)&&((e=X(this,pr))==null||e.call(this,n,s,"delete")),X(this,Pt)&&((r=X(this,ot))==null||r.push([n,s,"delete"]))}}if(X(this,it).clear(),X(this,Pe).fill(void 0),X(this,We).fill(void 0),X(this,Wt)&&X(this,br)&&(X(this,Wt).fill(0),X(this,br).fill(0)),X(this,gr)&&X(this,gr).fill(0),ve(this,vt,0),ve(this,st,0),X(this,vr).length=0,ve(this,mr,0),ve(this,nt,0),X(this,Pt)&&X(this,ot)){const a=X(this,ot);let n;for(;n=a==null?void 0:a.shift();)(i=X(this,hr))==null||i.call(this,...n)}}};fr=new WeakMap,Rt=new WeakMap,pr=new WeakMap,hr=new WeakMap,Za=new WeakMap,nt=new WeakMap,mr=new WeakMap,it=new WeakMap,We=new WeakMap,Pe=new WeakMap,wt=new WeakMap,qt=new WeakMap,vt=new WeakMap,st=new WeakMap,vr=new WeakMap,ot=new WeakMap,gr=new WeakMap,br=new WeakMap,Wt=new WeakMap,yr=new WeakMap,xi=new WeakMap,Pt=new WeakMap,As=new WeakSet,vp=function(){const e=new Sl(X(this,fr)),r=new Sl(X(this,fr));ve(this,Wt,e),ve(this,br,r),ve(this,zs,(n,s,o=Sa.now())=>{if(r[n]=s!==0?o:0,e[n]=s,s!==0&&this.ttlAutopurge){const u=setTimeout(()=>{X(this,Vt).call(this,n)&&this.delete(X(this,We)[n])},s+1);u.unref&&u.unref()}}),ve(this,Ki,n=>{r[n]=e[n]!==0?Sa.now():0}),ve(this,ri,(n,s)=>{if(e[s]){const o=e[s],u=r[s];if(!o||!u)return;n.ttl=o,n.start=u,n.now=i||a();const l=n.now-u;n.remainingTTL=o-l}});let i=0;const a=()=>{const n=Sa.now();if(this.ttlResolution>0){i=n;const s=setTimeout(()=>i=0,this.ttlResolution);s.unref&&s.unref()}return n};this.getRemainingTTL=n=>{const s=X(this,it).get(n);if(s===void 0)return 0;const o=e[s],u=r[s];if(!o||!u)return 1/0;const l=(i||a())-u;return o-l},ve(this,Vt,n=>{const s=r[n],o=e[n];return!!o&&!!s&&(i||a())-s>o})},Ki=new WeakMap,ri=new WeakMap,zs=new WeakMap,Vt=new WeakMap,Su=new WeakSet,AP=function(){const e=new Sl(X(this,fr));ve(this,mr,0),ve(this,gr,e),ve(this,_i,r=>{ve(this,mr,X(this,mr)-e[r]),e[r]=0}),ve(this,Os,(r,i,a,n)=>{if(pe(this,Ie,Ve).call(this,i))return 0;if(!fi(a))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(a=n(i,r),!fi(a))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return a}),ve(this,Ka,(r,i,a)=>{if(e[r]=i,X(this,Rt)){const n=X(this,Rt)-e[r];for(;X(this,mr)>n;)pe(this,_a,Mu).call(this,!0)}ve(this,mr,X(this,mr)+e[r]),a&&(a.entrySize=i,a.totalCalculatedSize=X(this,mr))})},_i=new WeakMap,Ka=new WeakMap,Os=new WeakMap,Er=new WeakSet,wi=function*({allowStale:e=this.allowStale}={}){if(X(this,nt))for(let r=X(this,st);!(!pe(this,Es,gp).call(this,r)||((e||!X(this,Vt).call(this,r))&&(yield r),r===X(this,vt)));)r=X(this,qt)[r]},jr=new WeakSet,Pi=function*({allowStale:e=this.allowStale}={}){if(X(this,nt))for(let r=X(this,vt);!(!pe(this,Es,gp).call(this,r)||((e||!X(this,Vt).call(this,r))&&(yield r),r===X(this,st)));)r=X(this,wt)[r]},Es=new WeakSet,gp=function(e){return e!==void 0&&X(this,it).get(X(this,We)[e])===e},_a=new WeakSet,Mu=function(e){var n,s;const r=X(this,vt),i=X(this,We)[r],a=X(this,Pe)[r];return X(this,xi)&&pe(this,Ie,Ve).call(this,a)?a.__abortController.abort(new Error("evicted")):(X(this,yr)||X(this,Pt))&&(X(this,yr)&&((n=X(this,pr))==null||n.call(this,a,i,"evict")),X(this,Pt)&&((s=X(this,ot))==null||s.push([a,i,"evict"]))),X(this,_i).call(this,r),e&&(X(this,We)[r]=void 0,X(this,Pe)[r]=void 0,X(this,vr).push(r)),X(this,nt)===1?(ve(this,vt,ve(this,st,0)),X(this,vr).length=0):ve(this,vt,X(this,wt)[r]),X(this,it).delete(i),Cu(this,nt)._--,r},$a=new WeakSet,Du=function(e,r,i,a){const n=r===void 0?void 0:X(this,Pe)[r];if(pe(this,Ie,Ve).call(this,n))return n;const s=new Pl,{signal:o}=i;o==null||o.addEventListener("abort",()=>s.abort(o.reason),{signal:s.signal});const u={signal:s.signal,options:i,context:a},l=(h,y=!1)=>{const{aborted:x}=s.signal,w=i.ignoreFetchAbort&&h!==void 0;if(i.status&&(x&&!y?(i.status.fetchAborted=!0,i.status.fetchError=s.signal.reason,w&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),x&&!w&&!y)return d(s.signal.reason);const b=g;return X(this,Pe)[r]===g&&(h===void 0?b.__staleWhileFetching?X(this,Pe)[r]=b.__staleWhileFetching:this.delete(e):(i.status&&(i.status.fetchUpdated=!0),this.set(e,h,u.options))),h},c=h=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=h),d(h)),d=h=>{const{aborted:y}=s.signal,x=y&&i.allowStaleOnFetchAbort,w=x||i.allowStaleOnFetchRejection,b=w||i.noDeleteOnFetchRejection,p=g;if(X(this,Pe)[r]===g&&(!b||p.__staleWhileFetching===void 0?this.delete(e):x||(X(this,Pe)[r]=p.__staleWhileFetching)),w)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw h},f=(h,y)=>{var w;const x=(w=X(this,Za))==null?void 0:w.call(this,e,n,u);x&&x instanceof Promise&&x.then(b=>h(b===void 0?void 0:b),y),s.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(h(void 0),i.allowStaleOnFetchAbort&&(h=b=>l(b,!0)))})};i.status&&(i.status.fetchDispatched=!0);const g=new Promise(f).then(l,c),S=Object.assign(g,{__abortController:s,__staleWhileFetching:n,__returned:void 0});return r===void 0?(this.set(e,S,{...u.options,status:void 0}),r=X(this,it).get(e)):X(this,Pe)[r]=S,S},Ie=new WeakSet,Ve=function(e){if(!X(this,xi))return!1;const r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof Pl},js=new WeakSet,bp=function(e,r){X(this,qt)[r]=e,X(this,wt)[e]=r},$i=new WeakSet,Is=function(e){e!==X(this,st)&&(e===X(this,vt)?ve(this,vt,X(this,wt)[e]):pe(this,js,bp).call(this,X(this,qt)[e],X(this,wt)[e]),pe(this,js,bp).call(this,X(this,st),e),ve(this,st,e))};let kl=cp;function ur(t){"@babel/helpers - typeof";return ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ur(t)}function LB(t,e){if(ur(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(ur(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Kg(t){var e=LB(t,"string");return ur(e)=="symbol"?e:String(e)}function FB(t,e,r){return e=Kg(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ft(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?Object(arguments[e]):{},i=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&i.push.apply(i,Object.getOwnPropertySymbols(r).filter(function(a){return Object.getOwnPropertyDescriptor(r,a).enumerable})),i.forEach(function(a){FB(t,a,r[a])})}return t}function Xr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _g(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Kg(i.key),i)}}function Jr(t,e,r){return e&&_g(t.prototype,e),r&&_g(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Bt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Un(t,e){if(e&&(ur(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bt(t)}function ka(t){return ka=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ka(t)}function Dd(t,e){return Dd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},Dd(t,e)}function Tl(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dd(t,e)}function Ad(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function BB(t){if(Array.isArray(t))return Ad(t)}function HB(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function $g(t,e){if(t){if(typeof t=="string")return Ad(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ad(t,e)}}function RB(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
284
284
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qB(t){return BB(t)||HB(t)||$g(t)||RB()}var WB={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,r){var i;console&&console[e]&&(i=console)[e].apply(i,qB(r))}},VB=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Xr(this,t),this.init(e,r)}return Jr(t,[{key:"init",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=i.prefix||"i18next:",this.logger=r||WB,this.options=i,this.debug=i.debug}},{key:"setDebug",value:function(r){this.debug=r}},{key:"log",value:function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return this.forward(i,"log","",!0)}},{key:"warn",value:function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return this.forward(i,"warn","",!0)}},{key:"error",value:function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return this.forward(i,"error","")}},{key:"deprecate",value:function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return this.forward(i,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(r,i,a,n){return n&&!this.debug?null:(typeof r[0]=="string"&&(r[0]="".concat(a).concat(this.prefix," ").concat(r[0])),this.logger[i](r))}},{key:"create",value:function(r){return new t(this.logger,Ft({},{prefix:"".concat(this.prefix,":").concat(r,":")},this.options))}}]),t}();const Ur=new VB;var pi=function(){function t(){Xr(this,t),this.observers={}}return Jr(t,[{key:"on",value:function(r,i){var a=this;return r.split(" ").forEach(function(n){a.observers[n]=a.observers[n]||[],a.observers[n].push(i)}),this}},{key:"off",value:function(r,i){var a=this;this.observers[r]&&this.observers[r].forEach(function(){if(!i)delete a.observers[r];else{var n=a.observers[r].indexOf(i);n>-1&&a.observers[r].splice(n,1)}})}},{key:"emit",value:function(r){for(var i=arguments.length,a=new Array(i>1?i-1:0),n=1;n<i;n++)a[n-1]=arguments[n];if(this.observers[r]){var s=[].concat(this.observers[r]);s.forEach(function(u){u.apply(void 0,a)})}if(this.observers["*"]){var o=[].concat(this.observers["*"]);o.forEach(function(u){u.apply(u,[r].concat(a))})}}}]),t}();function Gn(){var t,e,r=new Promise(function(i,a){t=i,e=a});return r.resolve=t,r.reject=e,r}function eb(t){return t==null?"":""+t}function XB(t,e,r){t.forEach(function(i){e[i]&&(r[i]=e[i])})}function zd(t,e,r){function i(o){return o&&o.indexOf("###")>-1?o.replace(/###/g,"."):o}function a(){return!t||typeof t=="string"}for(var n=typeof e!="string"?[].concat(e):e.split(".");n.length>1;){if(a())return{};var s=i(n.shift());!t[s]&&r&&(t[s]=new r),t=t[s]}return a()?{}:{obj:t,k:i(n.shift())}}function tb(t,e,r){var i=zd(t,e,Object),a=i.obj,n=i.k;a[n]=r}function JB(t,e,r,i){var a=zd(t,e,Object),n=a.obj,s=a.k;n[s]=n[s]||[],i&&(n[s]=n[s].concat(r)),i||n[s].push(r)}function Cl(t,e){var r=zd(t,e),i=r.obj,a=r.k;if(i)return i[a]}function rb(t,e,r){for(var i in e)i in t?typeof t[i]=="string"||t[i]instanceof String||typeof e[i]=="string"||e[i]instanceof String?r&&(t[i]=e[i]):rb(t[i],e[i],r):t[i]=e[i];return t}function Ta(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var UB={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function GB(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(e){return UB[e]}):t}var QB=function(t){Tl(e,t);function e(r){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Xr(this,e),i=Un(this,ka(e).call(this)),pi.call(Bt(Bt(i))),i.data=r||{},i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i}return Jr(e,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var a=this.options.ns.indexOf(i);a>-1&&this.options.ns.splice(a,1)}},{key:"getResource",value:function(i,a,n){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=[i,a];return n&&typeof n!="string"&&(u=u.concat(n)),n&&typeof n=="string"&&(u=u.concat(o?n.split(o):n)),i.indexOf(".")>-1&&(u=i.split(".")),Cl(this.data,u)}},{key:"addResource",value:function(i,a,n,s){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var l=[i,a];n&&(l=l.concat(u?n.split(u):n)),i.indexOf(".")>-1&&(l=i.split("."),s=a,a=l[1]),this.addNamespaces(a),tb(this.data,l,s),o.silent||this.emit("added",i,a,n,s)}},{key:"addResources",value:function(i,a,n){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var o in n)(typeof n[o]=="string"||Object.prototype.toString.apply(n[o])==="[object Array]")&&this.addResource(i,a,o,n[o],{silent:!0});s.silent||this.emit("added",i,a,n)}},{key:"addResourceBundle",value:function(i,a,n,s,o){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},l=[i,a];i.indexOf(".")>-1&&(l=i.split("."),s=n,n=a,a=l[1]),this.addNamespaces(a);var c=Cl(this.data,l)||{};s?rb(c,n,o):c=Ft({},c,n),tb(this.data,l,c),u.silent||this.emit("added",i,a,n)}},{key:"removeResourceBundle",value:function(i,a){this.hasResourceBundle(i,a)&&delete this.data[i][a],this.removeNamespaces(a),this.emit("removed",i,a)}},{key:"hasResourceBundle",value:function(i,a){return this.getResource(i,a)!==void 0}},{key:"getResourceBundle",value:function(i,a){return a||(a=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Ft({},{},this.getResource(i,a)):this.getResource(i,a)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"toJSON",value:function(){return this.data}}]),e}(pi);const ib={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,r,i,a,n){var s=this;return e.forEach(function(o){s.processors[o]&&(r=s.processors[o].process(r,i,a,n))}),r}};var ab=function(t){Tl(e,t);function e(r){var i,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Xr(this,e),i=Un(this,ka(e).call(this)),pi.call(Bt(Bt(i))),XB(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat"],r,Bt(Bt(i))),i.options=a,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=Ur.create("translator"),i}return Jr(e,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},n=this.resolve(i,a);return n&&n.res!==void 0}},{key:"extractFromKey",value:function(i,a){var n=a.nsSeparator||this.options.nsSeparator;n===void 0&&(n=":");var s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,o=a.ns||this.options.defaultNS;if(n&&i.indexOf(n)>-1){var u=i.split(n);(n!==s||n===s&&this.options.ns.indexOf(u[0])>-1)&&(o=u.shift()),i=u.join(s)}return typeof o=="string"&&(o=[o]),{key:i,namespaces:o}}},{key:"translate",value:function(i,a){var n=this;if(ur(a)!=="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),a||(a={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,o=this.extractFromKey(i[i.length-1],a),u=o.key,l=o.namespaces,c=l[l.length-1],d=a.lng||this.language,f=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&d.toLowerCase()==="cimode"){if(f){var g=a.nsSeparator||this.options.nsSeparator;return c+g+u}return u}var S=this.resolve(i,a),h=S&&S.res,y=S&&S.usedKey||u,x=S&&S.exactUsedKey||u,w=Object.prototype.toString.apply(h),b=["[object Number]","[object Function]","[object RegExp]"],p=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,P=!this.i18nFormat||this.i18nFormat.handleAsObject,v=typeof h!="string"&&typeof h!="boolean"&&typeof h!="number";if(P&&h&&v&&b.indexOf(w)<0&&!(typeof p=="string"&&w==="[object Array]")){if(!a.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,h,a):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");if(s){var m=w==="[object Array]",k=m?[]:{},D=m?x:y;for(var T in h)if(Object.prototype.hasOwnProperty.call(h,T)){var z="".concat(D).concat(s).concat(T);k[T]=this.translate(z,Ft({},a,{joinArrays:!1,ns:l})),k[T]===z&&(k[T]=h[T])}h=k}}else if(P&&typeof p=="string"&&w==="[object Array]")h=h.join(p),h&&(h=this.extendTranslation(h,i,a));else{var C=!1,A=!1;if(!this.isValidLookup(h)&&a.defaultValue!==void 0){if(C=!0,a.count!==void 0){var I=this.pluralResolver.getSuffix(d,a.count);h=a["defaultValue".concat(I)]}h||(h=a.defaultValue)}this.isValidLookup(h)||(A=!0,h=u);var R=a.defaultValue&&a.defaultValue!==h&&this.options.updateMissing;if(A||C||R){this.logger.log(R?"updateKey":"missingKey",d,c,u,R?a.defaultValue:h);var B=[],J=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&J&&J[0])for(var q=0;q<J.length;q++)B.push(J[q]);else this.options.saveMissingTo==="all"?B=this.languageUtils.toResolveHierarchy(a.lng||this.language):B.push(a.lng||this.language);var E=function(L,V){n.options.missingKeyHandler?n.options.missingKeyHandler(L,c,V,R?a.defaultValue:h,R,a):n.backendConnector&&n.backendConnector.saveMissing&&n.backendConnector.saveMissing(L,c,V,R?a.defaultValue:h,R,a),n.emit("missingKey",L,c,V,h)};if(this.options.saveMissing){var j=a.count!==void 0&&typeof a.count!="string";this.options.saveMissingPlurals&&j?B.forEach(function(N){var L=n.pluralResolver.getPluralFormsOfKey(N,u);L.forEach(function(V){return E([N],V)})}):E(B,u)}}h=this.extendTranslation(h,i,a,S),A&&h===u&&this.options.appendNamespaceToMissingKey&&(h="".concat(c,":").concat(u)),A&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(h))}return h}},{key:"extendTranslation",value:function(i,a,n,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)i=this.i18nFormat.parse(i,n,s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(Ft({},n,{interpolation:Ft({},this.options.interpolation,n.interpolation)}));var u=n.replace&&typeof n.replace!="string"?n.replace:n;this.options.interpolation.defaultVariables&&(u=Ft({},this.options.interpolation.defaultVariables,u)),i=this.interpolator.interpolate(i,u,n.lng||this.language,n),n.nest!==!1&&(i=this.interpolator.nest(i,function(){return o.translate.apply(o,arguments)},n)),n.interpolation&&this.interpolator.reset()}var l=n.postProcess||this.options.postProcess,c=typeof l=="string"?[l]:l;return i!=null&&c&&c.length&&n.applyPostProcessor!==!1&&(i=ib.handle(c,i,a,n,this)),i}},{key:"resolve",value:function(i){var a=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,o,u,l,c;return typeof i=="string"&&(i=[i]),i.forEach(function(d){if(!a.isValidLookup(s)){var f=a.extractFromKey(d,n),g=f.key;o=g;var S=f.namespaces;a.options.fallbackNS&&(S=S.concat(a.options.fallbackNS));var h=n.count!==void 0&&typeof n.count!="string",y=n.context!==void 0&&typeof n.context=="string"&&n.context!=="",x=n.lngs?n.lngs:a.languageUtils.toResolveHierarchy(n.lng||a.language,n.fallbackLng);S.forEach(function(w){a.isValidLookup(s)||(c=w,x.forEach(function(b){if(!a.isValidLookup(s)){l=b;var p=g,P=[p];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(P,g,b,w,n);else{var v;h&&(v=a.pluralResolver.getSuffix(b,n.count)),h&&y&&P.push(p+v),y&&P.push(p+="".concat(a.options.contextSeparator).concat(n.context)),h&&P.push(p+=v)}for(var m;m=P.pop();)a.isValidLookup(s)||(u=m,s=a.getResource(b,w,m,n))}}))})}}),{res:s,usedKey:o,exactUsedKey:u,usedLng:l,usedNS:c}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,a,n){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,a,n,s):this.resourceStore.getResource(i,a,n,s)}}]),e}(pi);function Od(t){return t.charAt(0).toUpperCase()+t.slice(1)}var YB=function(){function t(e){Xr(this,t),this.options=e,this.whitelist=this.options.whitelist||!1,this.logger=Ur.create("languageUtils")}return Jr(t,[{key:"getScriptPartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return null;var i=r.split("-");return i.length===2?null:(i.pop(),this.formatLanguageCode(i.join("-")))}},{key:"getLanguagePartFromCode",value:function(r){if(!r||r.indexOf("-")<0)return r;var i=r.split("-");return this.formatLanguageCode(i[0])}},{key:"formatLanguageCode",value:function(r){if(typeof r=="string"&&r.indexOf("-")>-1){var i=["hans","hant","latn","cyrl","cans","mong","arab"],a=r.split("-");return this.options.lowerCaseLng?a=a.map(function(n){return n.toLowerCase()}):a.length===2?(a[0]=a[0].toLowerCase(),a[1]=a[1].toUpperCase(),i.indexOf(a[1].toLowerCase())>-1&&(a[1]=Od(a[1].toLowerCase()))):a.length===3&&(a[0]=a[0].toLowerCase(),a[1].length===2&&(a[1]=a[1].toUpperCase()),a[0]!=="sgn"&&a[2].length===2&&(a[2]=a[2].toUpperCase()),i.indexOf(a[1].toLowerCase())>-1&&(a[1]=Od(a[1].toLowerCase())),i.indexOf(a[2].toLowerCase())>-1&&(a[2]=Od(a[2].toLowerCase()))),a.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?r.toLowerCase():r}},{key:"isWhitelisted",value:function(r){return(this.options.load==="languageOnly"||this.options.nonExplicitWhitelist)&&(r=this.getLanguagePartFromCode(r)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(r)>-1}},{key:"getFallbackCodes",value:function(r,i){if(!r)return[];if(typeof r=="string"&&(r=[r]),Object.prototype.toString.apply(r)==="[object Array]")return r;if(!i)return r.default||[];var a=r[i];return a||(a=r[this.getScriptPartFromCode(i)]),a||(a=r[this.formatLanguageCode(i)]),a||(a=r.default),a||[]}},{key:"toResolveHierarchy",value:function(r,i){var a=this,n=this.getFallbackCodes(i||this.options.fallbackLng||[],r),s=[],o=function(l){l&&(a.isWhitelisted(l)?s.push(l):a.logger.warn("rejecting non-whitelisted language code: ".concat(l)))};return typeof r=="string"&&r.indexOf("-")>-1?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(r)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(r)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(r))):typeof r=="string"&&o(this.formatLanguageCode(r)),n.forEach(function(u){s.indexOf(u)<0&&o(a.formatLanguageCode(u))}),s}}]),t}(),ZB=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","id","ja","jbo","ka","kk","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he"],nr:[1,2,20,21],fc:22}],KB={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},5:function(e){return e===0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e===0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e===0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e===1?0:e===2?1:(e<0||e>10)&&e%10==0?2:3}};function _B(){var t={};return ZB.forEach(function(e){e.lngs.forEach(function(r){t[r]={numbers:e.nr,plurals:KB[e.fc]}})}),t}var $B=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Xr(this,t),this.languageUtils=e,this.options=r,this.logger=Ur.create("pluralResolver"),this.rules=_B()}return Jr(t,[{key:"addRule",value:function(r,i){this.rules[r]=i}},{key:"getRule",value:function(r){return this.rules[r]||this.rules[this.languageUtils.getLanguagePartFromCode(r)]}},{key:"needsPlural",value:function(r){var i=this.getRule(r);return i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(r,i){var a=this,n=[],s=this.getRule(r);return s&&s.numbers.forEach(function(o){var u=a.getSuffix(r,o);n.push("".concat(i).concat(u))}),n}},{key:"getSuffix",value:function(r,i){var a=this,n=this.getRule(r);if(n){var s=n.noAbs?n.plurals(i):n.plurals(Math.abs(i)),o=n.numbers[s];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));var u=function(){return a.options.prepend&&o.toString()?a.options.prepend+o.toString():o.toString()};return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?"_plural_".concat(o.toString()):u():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?u():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}return this.logger.warn("no plural rule found for: ".concat(r)),""}}]),t}(),eH=function(){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Xr(this,t),this.logger=Ur.create("interpolator"),this.init(e,!0)}return Jr(t,[{key:"init",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;i&&(this.options=r,this.format=r.interpolation&&r.interpolation.format||function(n){return n}),r.interpolation||(r.interpolation={escapeValue:!0});var a=r.interpolation;this.escape=a.escape!==void 0?a.escape:GB,this.escapeValue=a.escapeValue!==void 0?a.escapeValue:!0,this.useRawValueToEscape=a.useRawValueToEscape!==void 0?a.useRawValueToEscape:!1,this.prefix=a.prefix?Ta(a.prefix):a.prefixEscaped||"{{",this.suffix=a.suffix?Ta(a.suffix):a.suffixEscaped||"}}",this.formatSeparator=a.formatSeparator?a.formatSeparator:a.formatSeparator||",",this.unescapePrefix=a.unescapeSuffix?"":a.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":a.unescapeSuffix||"",this.nestingPrefix=a.nestingPrefix?Ta(a.nestingPrefix):a.nestingPrefixEscaped||Ta("$t("),this.nestingSuffix=a.nestingSuffix?Ta(a.nestingSuffix):a.nestingSuffixEscaped||Ta(")"),this.maxReplaces=a.maxReplaces?a.maxReplaces:1e3,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var r="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(r,"g");var i="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(i,"g");var a="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(a,"g")}},{key:"interpolate",value:function(r,i,a,n){var s=this,o,u,l;function c(S){return S.replace(/\$/g,"$$$$")}var d=function(h){if(h.indexOf(s.formatSeparator)<0)return Cl(i,h);var y=h.split(s.formatSeparator),x=y.shift().trim(),w=y.join(s.formatSeparator).trim();return s.format(Cl(i,x),w,a)};this.resetRegExp();var f=n&&n.missingInterpolationHandler||this.options.missingInterpolationHandler;for(l=0;(o=this.regexpUnescape.exec(r))&&(u=d(o[1].trim()),r=r.replace(o[0],u),this.regexpUnescape.lastIndex=0,l++,!(l>=this.maxReplaces)););for(l=0;o=this.regexp.exec(r);){if(u=d(o[1].trim()),u===void 0)if(typeof f=="function"){var g=f(r,o,n);u=typeof g=="string"?g:""}else this.logger.warn("missed to pass in variable ".concat(o[1]," for interpolating ").concat(r)),u="";else typeof u!="string"&&!this.useRawValueToEscape&&(u=eb(u));if(u=this.escapeValue?c(this.escape(u)):c(u),r=r.replace(o[0],u),this.regexp.lastIndex=0,l++,l>=this.maxReplaces)break}return r}},{key:"nest",value:function(r,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n,s,o=Ft({},a);o.applyPostProcessor=!1;function u(l,c){if(l.indexOf(",")<0)return l;var d=l.split(",");l=d.shift();var f=d.join(",");f=this.interpolate(f,o),f=f.replace(/'/g,'"');try{o=JSON.parse(f),c&&(o=Ft({},c,o))}catch(g){this.logger.error("failed parsing options string in nesting for key ".concat(l),g)}return l}for(;n=this.nestingRegexp.exec(r);){if(s=i(u.call(this,n[1].trim(),o),o),s&&n[0]===r&&typeof s!="string")return s;typeof s!="string"&&(s=eb(s)),s||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(r)),s=""),r=r.replace(n[0],s),this.regexp.lastIndex=0}return r}}]),t}();function tH(t){if(Array.isArray(t))return t}function rH(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var i,a,n,s,o=[],u=!0,l=!1;try{if(n=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(i=n.call(r)).done)&&(o.push(i.value),o.length!==e);u=!0);}catch(c){l=!0,a=c}finally{try{if(!u&&r.return!=null&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw a}}return o}}function iH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
285
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nb(t,e){return tH(t)||rH(t,e)||$g(t,e)||iH()}function aH(t,e){for(var r=t.indexOf(e);r!==-1;)t.splice(r,1),r=t.indexOf(e)}var nH=function(t){Tl(e,t);function e(r,i,a){var n,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Xr(this,e),n=Un(this,ka(e).call(this)),pi.call(Bt(Bt(n))),n.backend=r,n.store=i,n.languageUtils=a.languageUtils,n.options=s,n.logger=Ur.create("backendConnector"),n.state={},n.queue=[],n.backend&&n.backend.init&&n.backend.init(a,s.backend,s),n}return Jr(e,[{key:"queueLoad",value:function(i,a,n,s){var o=this,u=[],l=[],c=[],d=[];return i.forEach(function(f){var g=!0;a.forEach(function(S){var h="".concat(f,"|").concat(S);!n.reload&&o.store.hasResourceBundle(f,S)?o.state[h]=2:o.state[h]<0||(o.state[h]===1?l.indexOf(h)<0&&l.push(h):(o.state[h]=1,g=!1,l.indexOf(h)<0&&l.push(h),u.indexOf(h)<0&&u.push(h),d.indexOf(S)<0&&d.push(S)))}),g||c.push(f)}),(u.length||l.length)&&this.queue.push({pending:l,loaded:{},errors:[],callback:s}),{toLoad:u,pending:l,toLoadLanguages:c,toLoadNamespaces:d}}},{key:"loaded",value:function(i,a,n){var s=i.split("|"),o=nb(s,2),u=o[0],l=o[1];a&&this.emit("failedLoading",u,l,a),n&&this.store.addResourceBundle(u,l,n),this.state[i]=a?-1:2;var c={};this.queue.forEach(function(d){JB(d.loaded,[u],l),aH(d.pending,i),a&&d.errors.push(a),d.pending.length===0&&!d.done&&(Object.keys(d.loaded).forEach(function(f){c[f]||(c[f]=[]),d.loaded[f].length&&d.loaded[f].forEach(function(g){c[f].indexOf(g)<0&&c[f].push(g)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(i,a,n){var s=this,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:250,l=arguments.length>5?arguments[5]:void 0;return i.length?this.backend[n](i,a,function(c,d){if(c&&d&&o<5){setTimeout(function(){s.read.call(s,i,a,n,o+1,u*2,l)},u);return}l(c,d)}):l(null,{})}},{key:"prepareLoading",value:function(i,a){var n=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof a=="string"&&(a=[a]);var u=this.queueLoad(i,a,s,o);if(!u.toLoad.length)return u.pending.length||o(),null;u.toLoad.forEach(function(l){n.loadOne(l)})}},{key:"load",value:function(i,a,n){this.prepareLoading(i,a,{},n)}},{key:"reload",value:function(i,a,n){this.prepareLoading(i,a,{reload:!0},n)}},{key:"loadOne",value:function(i){var a=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=i.split("|"),o=nb(s,2),u=o[0],l=o[1];this.read(u,l,"read",null,null,function(c,d){c&&a.logger.warn("".concat(n,"loading namespace ").concat(l," for language ").concat(u," failed"),c),!c&&d&&a.logger.log("".concat(n,"loaded namespace ").concat(l," for language ").concat(u),d),a.loaded(i,c,d)})}},{key:"saveMissing",value:function(i,a,n,s,o){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(i,a,n,s,null,Ft({},u,{isUpdate:o})),!(!i||!i[0])&&this.store.addResource(i[0],a,n,s)}}]),e}(pi);function sH(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var r={};if(ur(e[1])==="object"&&(r=e[1]),typeof e[1]=="string"&&(r.defaultValue=e[1]),typeof e[2]=="string"&&(r.tDescription=e[2]),ur(e[2])==="object"||ur(e[3])==="object"){var i=e[3]||e[2];Object.keys(i).forEach(function(a){r[a]=i[a]})}return r},interpolation:{escapeValue:!0,format:function(e,r,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function sb(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&t.whitelist.indexOf("cimode")<0&&(t.whitelist=t.whitelist.concat(["cimode"])),t}function Ml(){}var oH=function(t){Tl(e,t);function e(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(Xr(this,e),r=Un(this,ka(e).call(this)),pi.call(Bt(Bt(r))),r.options=sb(i),r.services={},r.logger=Ur,r.modules={external:[]},a&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,a),Un(r,Bt(Bt(r)));setTimeout(function(){r.init(i,a)},0)}return r}return Jr(e,[{key:"init",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;typeof a=="function"&&(n=a,a={}),this.options=Ft({},sH(),this.options,sb(a)),this.format=this.options.interpolation.format,n||(n=Ml);function s(f){return f?typeof f=="function"?new f:f:null}if(!this.options.isClone){this.modules.logger?Ur.init(s(this.modules.logger),this.options):Ur.init(null,this.options);var o=new YB(this.options);this.store=new QB(this.options.resources,this.options);var u=this.services;u.logger=Ur,u.resourceStore=this.store,u.languageUtils=o,u.pluralResolver=new $B(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u.interpolator=new eH(this.options),u.backendConnector=new nH(s(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",function(f){for(var g=arguments.length,S=new Array(g>1?g-1:0),h=1;h<g;h++)S[h-1]=arguments[h];i.emit.apply(i,[f].concat(S))}),this.modules.languageDetector&&(u.languageDetector=s(this.modules.languageDetector),u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=s(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new ab(this.services,this.options),this.translator.on("*",function(f){for(var g=arguments.length,S=new Array(g>1?g-1:0),h=1;h<g;h++)S[h-1]=arguments[h];i.emit.apply(i,[f].concat(S))}),this.modules.external.forEach(function(f){f.init&&f.init(i)})}var l=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];l.forEach(function(f){i[f]=function(){var g;return(g=i.store)[f].apply(g,arguments)}});var c=Gn(),d=function(){i.changeLanguage(i.options.lng,function(g,S){i.isInitialized=!0,i.logger.log("initialized",i.options),i.emit("initialized",i.options),c.resolve(S),n(g,S)})};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),c}},{key:"loadResources",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ml;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&this.language.toLowerCase()==="cimode")return a();var n=[],s=function(l){if(l){var c=i.services.languageUtils.toResolveHierarchy(l);c.forEach(function(d){n.indexOf(d)<0&&n.push(d)})}};if(this.language)s(this.language);else{var o=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);o.forEach(function(u){return s(u)})}this.options.preload&&this.options.preload.forEach(function(u){return s(u)}),this.services.backendConnector.load(n,this.options.ns,a)}else a(null)}},{key:"reloadResources",value:function(i,a,n){var s=Gn();return i||(i=this.languages),a||(a=this.options.ns),n||(n=Ml),this.services.backendConnector.reload(i,a,function(o){s.resolve(),n(o)}),s}},{key:"use",value:function(i){return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&ib.addPostProcessor(i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"changeLanguage",value:function(i,a){var n=this,s=Gn();this.emit("languageChanging",i);var o=function(c,d){n.translator.changeLanguage(d),d&&(n.emit("languageChanged",d),n.logger.log("languageChanged",d)),s.resolve(function(){return n.t.apply(n,arguments)}),a&&a(c,function(){return n.t.apply(n,arguments)})},u=function(c){c&&(n.language=c,n.languages=n.services.languageUtils.toResolveHierarchy(c),n.translator.language||n.translator.changeLanguage(c),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(c)),n.loadResources(function(d){o(d,c)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(u):u(i),s}},{key:"getFixedT",value:function(i,a){var n=this,s=function o(u,l){var c=Ft({},l);if(ur(l)!=="object"){for(var d=arguments.length,f=new Array(d>2?d-2:0),g=2;g<d;g++)f[g-2]=arguments[g];c=n.options.overloadTranslationOptionHandler([u,l].concat(f))}return c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,n.t(u,c)};return typeof i=="string"?s.lng=i:s.lngs=i,s.ns=a,s}},{key:"t",value:function(){var i;return this.translator&&(i=this.translator).translate.apply(i,arguments)}},{key:"exists",value:function(){var i;return this.translator&&(i=this.translator).exists.apply(i,arguments)}},{key:"setDefaultNamespace",value:function(i){this.options.defaultNS=i}},{key:"loadNamespaces",value:function(i,a){var n=this,s=Gn();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(o){n.options.ns.indexOf(o)<0&&n.options.ns.push(o)}),this.loadResources(function(o){s.resolve(),a&&a(o)}),s):(a&&a(),Promise.resolve())}},{key:"loadLanguages",value:function(i,a){var n=Gn();typeof i=="string"&&(i=[i]);var s=this.options.preload||[],o=i.filter(function(u){return s.indexOf(u)<0});return o.length?(this.options.preload=s.concat(o),this.loadResources(function(u){n.resolve(),a&&a(u)}),n):(a&&a(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.languages&&this.languages.length>0?this.languages[0]:this.language),!i)return"rtl";var a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"];return a.indexOf(this.services.languageUtils.getLanguagePartFromCode(i))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;return new e(i,a)}},{key:"cloneInstance",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ml,s=Ft({},this.options,a,{isClone:!0}),o=new e(s),u=["store","services","language"];return u.forEach(function(l){o[l]=i[l]}),o.translator=new ab(o.services,o.options),o.translator.on("*",function(l){for(var c=arguments.length,d=new Array(c>1?c-1:0),f=1;f<c;f++)d[f-1]=arguments[f];o.emit.apply(o,[l].concat(d))}),o.init(s,n),o.translator.options=o.options,o}}]),e}(pi);const ze=new oH;ze.changeLanguage.bind(ze),ze.cloneInstance.bind(ze),ze.createInstance.bind(ze),ze.dir.bind(ze),ze.exists.bind(ze),ze.getFixedT.bind(ze),ze.init.bind(ze),ze.loadLanguages.bind(ze),ze.loadNamespaces.bind(ze),ze.loadResources.bind(ze),ze.off.bind(ze),ze.on.bind(ze),ze.setDefaultNamespace.bind(ze),ze.t.bind(ze),ze.use.bind(ze);const Dl={screensCache:[],cachedScreenPromises:[],install(t){t.prototype.$dataProvider=this},apiInstance(){return G.has(window,"ProcessMaker.apiClient")&&!window.ProcessMaker.isStub?window.ProcessMaker.apiClient:this.token()?(Xn.defaults.baseURL=this.baseURL(),Xn.defaults.headers.common={Authorization:`Bearer ${this.token()}`},Xn.defaults.adapter=Ug(Xn.defaults.adapter,{enabledByDefault:window.ProcessMaker.screen.cacheEnabled,cacheFlag:"useCache",defaultCache:new kl({ttl:window.ProcessMaker.screen.cacheTimeout,max:100})}),Xn):G.has(window,"ProcessMaker.apiClient")&&window.ProcessMaker.isStub?window.ProcessMaker.apiClient:{get(){return Promise.resolve({data:{data:[]}})}}},get(...t){return this.apiInstance().get(...t)},post(...t){return this.apiInstance().post(...t)},delete(...t){return this.apiInstance().delete(...t)},token(){return localStorage.getItem("token")},baseURL(){return localStorage.getItem("baseURL")},async getTasks(t){const e=G.get(window,"PM4ConfigOverrides.getTasksEndpoint","/api/1.1/tasks"),r=[],i=t.match(/include=.*,screen,/),a=t.match(/include=.*,nested,/);if(r.push(this.get(e+t.replace(/,screen,|,nested,/g,","))),i){const u=`${(e+t).replace(/\?.+$/,"")}/screen?include=screen${a?",nested":""}`;r.push(this.get(u))}const[n,s]=await Promise.all(r),o=n;return s&&(o.data.screen=s.data),o.data.screen&&o.data.screen.nested&&this.addNestedScreenCache(o.data.screen.nested),o},addNestedScreenCache(t){t.forEach(e=>{e.screen_id&&(e.id=e.screen_id);const r=this.screensCache.findIndex(i=>i.id===e.id);r>-1?this.screensCache.splice(r,1,e):this.screensCache.push(e)})},getScreen(t,e=""){if(!t)return null;const r=this.cachedScreenPromises.find(s=>s.id===t&&s.query===e);if(r)return r.screenPromise;const i=G.get(window,"PM4ConfigOverrides.getScreenEndpoint","/screens"),a=this.screensCache.find(s=>s.id===t);if(a)return Promise.resolve({data:a});const n=new Promise((s,o)=>{this.get(`${i}/${t}${e}`).then(u=>{u.data.nested&&this.addNestedScreenCache(u.data.nested),s(u)}).catch(u=>o(u))});return this.cachedScreenPromises.push({id:t,query:e,screenPromise:n}),n},flushScreenCache(){this.cachedScreenPromises.splice(0,this.cachedScreenPromises.length)},postScript(t,e,r={}){const i=G.get(window,"PM4ConfigOverrides.postScriptEndpoint","/scripts/execute/{id}");return this.post(i.replace("{id}",t)+this.authQueryString(),e,r)},postDataSource(t,e,r){let i;return e?i=`/requests/${e}/data_sources/${t}`:i=`/requests/data_sources/${t}`,i+=this.authQueryString(),this.post(i,r,{timeout:0})},getDataSource(t,e,r=null){if(!window.ProcessMaker.screen.cacheEnabled&&!window.ProcessMaker.screen.cacheTimeout)return this.postDataSource(t,null,e).then(a=>[a,r]);let i=`/requests/data_sources/${t}/resources/${e.config.endpoint}/data`;return i+=this.authQueryString(),this.get(i,{useCache:window.ProcessMaker.screen.cacheEnabled,params:{pmds_config:JSON.stringify(e.config),pmds_data:JSON.stringify(e.data)}}).then(a=>[a,r])},authQueryString(){const t=G.get(window,"PM4ConfigOverrides.authParams",null);let e="";return t&&(e=`?${new URLSearchParams(t).toString()}`),e},deleteFile(t,e=null){let r=`files/${t}`;const i={token:e},a=G.get(window,"_current_task_id",0);return a&&(i.task_id=a),this.delete(r,{params:i})},download(t){return this.apiInstance().get(t,{responseType:"blob"})},getCollections(){return this.get("/collections?per_page=1000").catch(t=>{throw t.response&&t.response.status===404?new Error(ze.t("Collections package not installed")):t})},getCollectionFields(t){return this.get(`/collections/${t}/columns?per_page=1000`).catch(e=>{throw e.response&&e.response.status===404?new Error(ze.t("Collection id not found")):e})},getCollectionRecords(t,e,r=null){var i,a;return e.useCache=(a=(i=window.ProcessMaker)==null?void 0:i.screen)==null?void 0:a.cacheEnabled,this.get(`/collections/${t}/records${this.authQueryString()}`,e).then(n=>{const s=n?n.data:null;if(!s)throw new Error(ze.t("No data returned"));return[s,r]}).catch(n=>{if(n.response&&n.response.status===404)return[{data:[]},r];throw n})}};let Qn=typeof window>"u"?global:window;class Ca{constructor(e,r){se(this,"screen",null);se(this,"firstPage",0);this.element=e,Object.assign(this,r)}async countItems(e){throw e}}class lH extends Ca{async countItems(e){for(const r of this.element)await Ma(r,{screen:this.screen}).countItems(e)}}class uH extends Ca{async countItems(e){for(let r=0,i=this.element.config.length;r<i;r++)await Ma(this.element.config[r].items,{screen:this.element}).countItems(e)}}class cH extends Ca{async countItems(e){e.push(this.element);const r=await this.loadScreen(this.element.config.screen);r&&r[0]&&r[0].items&&await Ma(r[0].items,{screen:this.screen}).countItems(e)}async loadScreen(e){try{if(Qn.nestedScreens||(Qn.nestedScreens={}),Qn.nestedScreens["id_"+e])return Qn.nestedScreens["id_"+e];const r=await Dl.getScreen(e);return Qn.nestedScreens["id_"+e]=r.data.config,r.data.config}catch{return!1}}}class dH extends Ca{async countItems(e){e.push(this.element),await Ma(this.element.items,{screen:this.screen}).countItems(e)}}class fH extends Ca{async countItems(e){await Ma(this.element.items,{screen:this.screen}).countItems(e)}}class pH extends Ca{async countItems(e){e.push(this.element)}}function Ma(t,e){return t instanceof Array?new lH(t,e):t.config instanceof Array?new uH(t,e):t.component==="FormNestedScreen"?new cH(t,e):t.component==="FormMultiColumn"?new fH(t,e):t.component==="FormLoop"?new dH(t,e):new pH(t,e)}let Dr=typeof window>"u"?global:window,Yn=[];class Ri{constructor(e,r){se(this,"screen",null);se(this,"firstPage",0);se(this,"data",{});se(this,"insideLoop",!1);this.element=e,Object.assign(this,r)}async addValidations(e){throw e}isVisible(){if(!(this.element.visibleInDevice===null||this.element.visibleInDevice===void 0?!0:this.element.visibleInDevice))return!1;let r=!0;if(this.element.config.conditionalHide)try{r=!!Mt.evaluate(this.element.config.conditionalHide,this.data)}catch{r=!1}return r}}class hH extends Ri{async addValidations(e){for(const r of this.element)await hi(r,{screen:this.screen,data:this.data,parentVisibilityRule:this.parentVisibilityRule,insideLoop:this.insideLoop}).addValidations(e)}}class mH extends Ri{async addValidations(e){this.element.config[this.firstPage]&&(Yn=[this.firstPage],await hi(this.element.config[this.firstPage].items,{screen:this.element,data:this.data}).addValidations(e),Yn=[])}}class vH extends Ri{async addValidations(e){if(!this.isVisible())return;const r=await this.loadNestedScreen(this.element.config.screen);if(r&&r.config){const i=r.config;let a=this.parentVisibilityRule?this.parentVisibilityRule:this.element.config.conditionalHide;i&&i[0]&&i[0].items&&await hi(i[0].items,{screen:r,data:this.data,parentVisibilityRule:a}).addValidations(e)}}async loadNestedScreen(e){if(!e)return null;if(Dr.nestedScreens||(Dr.nestedScreens={}),Dr.nestedScreens["id_"+e])return{config:Dr.nestedScreens["id_"+e]};const r=await Dl.getScreen(e);return Dr.nestedScreens["id_"+e]=r.data.config,{config:r.data}}async loadScreen(e){if(!e)return null;if(Dr.nestedScreens||(Dr.nestedScreens={}),Dr.nestedScreens["id_"+e])return Dr.nestedScreens["id_"+e];const r=await Dl.getScreen(e);return Dr.nestedScreens["id_"+e]=r.data.config,r.data.config}}class gH extends Ri{async addValidations(e){if(!this.isVisible())return;G.set(e,this.element.config.name,{});const r=G.get(e,this.element.config.name);r.$each={},this.checkForSiblings(e);const i=(G.get(this.data,this.element.config.name)||[{}])[0];await hi(this.element.items,{screen:this.screen,data:{_parent:this.data,...i},parentVisibilityRule:this.element.config.conditionalHide,insideLoop:!0}).addValidations(r.$each)}checkForSiblings(e){const r=[],i=[];if(this.screen.config.forEach(a=>{!a||!a.items||(a.items.filter(n=>{n.component==="FormLoop"&&n.config.name===this.element.config.name&&r.push(n)}),r&&r.forEach(n=>{n.items.filter(s=>{s.config.validation&&s.config.validation.forEach(o=>{const u=this.camelCase(o.value.split(":")[0]),l=ll[u],c={};let d={};d[u]=l,c[s.config.name]=d,G.merge(i,c)})})}))}),Object.keys(i).length!=0){const a=G.get(e,this.element.config.name);a.hasOwnProperty("$each")&&G.merge(a.$each,i),G.set(e[this.element.config.name].$each,a)}}camelCase(e){return e.replace(/_\w/g,r=>r.substr(1,1).toUpperCase())}}class bH extends Ri{async addValidations(e){this.isVisible()&&await hi(this.element.items,{screen:this.screen,data:this.data,parentVisibilityRule:this.element.config.conditionalHide}).addValidations(e)}}class yH extends Ri{async addValidations(e){if(!this.isVisible())return;const r=this.element.config.eventData;let i="Empty Screen";this.screen.config[r]&&this.screen.config[r].name&&(i=this.screen.config[r].name);const a=`${i}-${r}`;Yn.length>0&&!Yn.includes(a)&&this.screen.config[r]&&this.screen.config[r].items&&(Yn.push(a),await hi(this.screen.config[this.element.config.eventData].items,{screen:this.screen,data:this.data}).addValidations(e))}}class xH extends Ri{async addValidations(e){if(!this.isVisible()||this.element.config&&this.element.config.readonly||this.element.config&&this.element.config.disabled||!(this.element.config&&this.element.config.name&&typeof this.element.config.name=="string"&&this.element.config.name.match(/^[a-zA-Z_][0-9a-zA-Z_.]*$/)))return;const r=this.element.config.name,i=this.element.config.validation,a=this.element.config.conditionalHide,n=this.parentVisibilityRule,s=this.insideLoop||!1,o=this.element.config.deviceVisibility?this.element.config.deviceVisibility:{showForDesktop:!0,showForMobile:!0};G.set(e,r,G.get(e,r,{}));const u=G.get(e,r);if(i instanceof Array)i.forEach(l=>{const c=this.camelCase(l.value.split(":")[0]);if(!c)return;let d=ll[c];if(d){if(l.configs instanceof Array){const f=[];l.configs.forEach(g=>{f.push(g.value)}),f.push(r),d=d(...f)}u[c]=function(...f){const g=f[1],S=r.split(".").length-1,h=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(g),S);if(n){const w=s?1:0,b=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(g),S+w);let p=!0;try{p=!!Mt.evaluate(n,b)}catch{p=!1}if(!p)return!0}let y=!0;try{const w=this.$root.$children[0].$refs.renderer.definition.isMobile;y=w&&o.showForMobile||!w&&o.showForDesktop}catch{y=!0}if(!y)return!0;let x=!0;if(a)try{x=!!Mt.evaluate(a,h)}catch{x=!1}return x?d.apply(this,f):!0}}});else if(typeof i=="string"&&i){let l=ll[i];if(!l)return;u[i]=function(...c){const d=c[1],f=r.split(".").length-1,g=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(d),f);if(n){const h=s?1:0,y=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(d),f+h);let x=!0;try{x=!!Mt.evaluate(n,y)}catch{x=!1}if(!x)return!0}let S=!0;if(a)try{S=!!Mt.evaluate(a,g)}catch{S=!1}return S?l.apply(this,c):!0}}this.element.items&&hi(this.element.items,{screen:this.screen,data:this.data}).addValidations(e)}camelCase(e){return e.replace(/_\w/g,r=>r.substr(1,1).toUpperCase())}}function hi(t,e){return t instanceof Array?new hH(t,e):t.config instanceof Array?new mH(t,e):t.component==="FormNestedScreen"?new vH(t,e):t.component==="FormMultiColumn"?new bH(t,e):t.component==="FormLoop"?new gH(t,e):(t.component,t.component==="FormButton"&&t.config.event==="pageNavigate"?new yH(t,e):new xH(t,e))}let Zn;const ob={mixins:cg,props:{value:Object,_parent:null,definition:Object,components:{type:Object,default(){return{}}},showErrors:{type:Boolean,default:!1},testScreenDefinition:{type:Boolean,default:!1}},data(){return{references__:[],debugCmp:null,component:null,alias:{},extensions:[],nodeNameProperty:"component",variables:[],variablesTree:[],initialize:[],ownerDocument:window.document,updatedConfigs:[],building:{show:!1,error:"",component:"",errors:[]}}},methods:{dot2bracket(t){return t.replace(/\.\d/g,e=>`[${e.substr(1)}]`)},submit(t,e=!1,r=null){r&&this.loopContext&&(r.loopContext=this.loopContext),this.$emit("submit",this.value,e,r)},buildComponent(t){window.ProcessMaker&&window.ProcessMaker.EventBus&&window.ProcessMaker.EventBus.$emit("screen-renderer-build-component",this);const e=this.componentDefinition(t);if(!this.testScreenDefinition)return e;const r=this.$root.constructor,i=r.config.warnHandler,a=r.config.errorHandler,n=[];this.building.error="",this.building.component="",this.building.errors=[],this.building.show=!1;let s;try{r.config.warnHandler=u=>{n.push(u)},r.config.errorHandler=u=>{n.push(u)},s=r.component("ScreenRendered",e);const o=new s({propsData:{vdata:{}}});if(o.$parent=this,o.$mount(),n.length>0)throw this.$t("Building error");return this.codigo=e,e}catch(o){return console.error(o),this.building.error=o,this.building.component=e,this.building.errors=n,this.building.show=!0,e||{template:"<div></div>"}}finally{r.config.warnHandler=i,r.config.errorHandler=a}},parse(t,e){const r=this.ownerDocument.createElement("div");return this.loadPages(e,r,t),"<div>"+r.innerHTML+"</div>"},loadPages(t,e,r){const i=t.config;this.variables.splice(0),this.extensions.forEach(a=>a.beforeload instanceof Function&&a.beforeload.bind(this)({pages:i,owner:e,definition:t})),i.forEach((a,n)=>{if(a){const s=this.createComponent("div",{name:a.name,class:"page","v-if":`currentPage__==${n}`,key:`page-${n}`});this.loadItems(a.items,s,r,t,n),e.appendChild(s)}})},escapeVuePropertyName(t){return t.substr(0,1)==="@"?t.replace("@","v-on:"):this.snakeCase(t)},snakeCase(t){return t.replace(/[A-Z]/g,e=>`-${e}`).toLowerCase().replace(/^-/,"")},camelCase(t){return t.replace(/_\w/g,e=>e.substr(1,1).toUpperCase())},updateComponentConfig(t,e){this.updatedConfigs.push({name:t,properties:e})},mergeUpdatedConfig(t,e){let r=this.updatedConfigs.find(i=>i.name===t);if(r){let i=r.properties;for(let a in i)e[a]===void 0&&(e[a]=i[a])}return e},createComponent(t,e){e=this.mergeUpdatedConfig(t,this.setDefaultPropertyValues(e)),t=this.snakeCase(t);const r=this.ownerDocument.createElement(t);for(let i in e){const a=e[i];a!==!1&&a!==null&&a!==void 0&&(i.substr(0,1)===":"||typeof a=="string"&&a.indexOf("{{")===-1?r.setAttribute(this.escapeVuePropertyName(i),a):typeof a=="string"&&a.indexOf("{{")!==-1&&!e.ignoreMustache?r.setAttribute(":"+this.escapeVuePropertyName(i),"mustache("+this.byValue(a)+")"):a!==void 0&&r.setAttribute(":"+this.escapeVuePropertyName(i),this.byRef(a)))}return r},byValue(t){return JSON.stringify(t).replace("{{","{{").replace("}}","}}")},byRef(t){const r=`references__[${this.references__.indexOf(t)>-1?this.references__.indexOf(t):this.references__.length}]`;return this.references__.push(t),r},loadItems(t,e,r,i,a){t.forEach(n=>{const s=n[this.nodeNameProperty],o=this.alias[s]||s,u={...n.config};this.extensions.forEach(d=>d.onloadproperties instanceof Function&&d.onloadproperties.bind(this)({properties:u,element:n,component:e,items:t,nodeName:o,componentName:s,screen:r,definition:i,formIndex:a}));const l=this.createComponent(o,u),c=this.ownerDocument.createElement("div");c.appendChild(l),this.extensions.forEach(d=>d.onloaditems instanceof Function&&d.onloaditems.bind(this)({properties:u,element:n,component:e,items:t,nodeName:o,componentName:s,node:l,wrapper:c,screen:r,definition:i,formIndex:a})),e.appendChild(c)})},setDefaultPropertyValues(t){let e={...t};return(typeof e.ariaLabel>"u"||e.ariaLabel===null||e.ariaLabel==="")&&e.label&&(e.ariaLabel=e.label),e.tabindex&&(e.tabindex=parseInt(e.tabindex)),e},validVariableName(t){return t&&typeof t=="string"&&t.match(/^[a-zA-Z_][0-9a-zA-Z_.]*$/)},isComputedVariable(t,e){var r;return(r=e==null?void 0:e.computed)==null?void 0:r.some(i=>i!=null&&i.byPass?!1:new RegExp(`^${i.property}(\\.|$)`,"i").test(t))},registerVariable(t,e={}){if(t&&t.startsWith("_parent.")||t&&t.includes("._parent.")||!this.validVariableName(t))return;const r=G.get(e,"config",{});this.variables.find(a=>a.name===t)||(this.variables.push({name:t,config:r,element:e}),this.variablesTree.push({name:t,config:r,element:e}))},registerNestedVariable(t,e,r){const i=Zn.getVariablesTree(r);this.variablesTree.push({name:t,prefix:e,config:{},items:i}),Zn.getVariablesTree({config:[]})},getVariablesTree(t){let e;try{e={mixins:[nd],components:{},props:{},computed:{},methods:{},data:{},watch:{},mounted:[]},this.variablesTree=[];const r=this.parse(e,t);return this.extensions.forEach(i=>{i.onparse instanceof Function&&i.onparse.bind(this)({screen:e,template:r,definition:t})}),this.variablesTree}catch(r){return console.error(r),this.variablesTree}},elementCssClass(t){const e=[];return t.config.bgcolor&&e.push(t.config.bgcolor),t.config.color&&e.push(t.config.color),e.join(" ")},componentDefinition(t){let e;this.building.error="",this.building.component="",this.building.errors=[],this.building.show=!1;try{e={mixins:[nd],components:{},props:{},computed:{},methods:{},created:[],data:{},watch:{},mounted:[]};const r=this.parse(e,t);this.extensions.forEach(n=>{n.onparse instanceof Function&&n.onparse.bind(this)({screen:e,template:r,definition:t})}),e.template=r,this.extensions.forEach(n=>{n.onbuild instanceof Function&&n.onbuild.bind(this)({screen:e,definition:t})});const i=["currentPage__"],a=`let value;const data = {};
285
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nb(t,e){return tH(t)||rH(t,e)||$g(t,e)||iH()}function aH(t,e){for(var r=t.indexOf(e);r!==-1;)t.splice(r,1),r=t.indexOf(e)}var nH=function(t){Tl(e,t);function e(r,i,a){var n,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Xr(this,e),n=Un(this,ka(e).call(this)),pi.call(Bt(Bt(n))),n.backend=r,n.store=i,n.languageUtils=a.languageUtils,n.options=s,n.logger=Ur.create("backendConnector"),n.state={},n.queue=[],n.backend&&n.backend.init&&n.backend.init(a,s.backend,s),n}return Jr(e,[{key:"queueLoad",value:function(i,a,n,s){var o=this,u=[],l=[],c=[],d=[];return i.forEach(function(f){var g=!0;a.forEach(function(S){var h="".concat(f,"|").concat(S);!n.reload&&o.store.hasResourceBundle(f,S)?o.state[h]=2:o.state[h]<0||(o.state[h]===1?l.indexOf(h)<0&&l.push(h):(o.state[h]=1,g=!1,l.indexOf(h)<0&&l.push(h),u.indexOf(h)<0&&u.push(h),d.indexOf(S)<0&&d.push(S)))}),g||c.push(f)}),(u.length||l.length)&&this.queue.push({pending:l,loaded:{},errors:[],callback:s}),{toLoad:u,pending:l,toLoadLanguages:c,toLoadNamespaces:d}}},{key:"loaded",value:function(i,a,n){var s=i.split("|"),o=nb(s,2),u=o[0],l=o[1];a&&this.emit("failedLoading",u,l,a),n&&this.store.addResourceBundle(u,l,n),this.state[i]=a?-1:2;var c={};this.queue.forEach(function(d){JB(d.loaded,[u],l),aH(d.pending,i),a&&d.errors.push(a),d.pending.length===0&&!d.done&&(Object.keys(d.loaded).forEach(function(f){c[f]||(c[f]=[]),d.loaded[f].length&&d.loaded[f].forEach(function(g){c[f].indexOf(g)<0&&c[f].push(g)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(i,a,n){var s=this,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:250,l=arguments.length>5?arguments[5]:void 0;return i.length?this.backend[n](i,a,function(c,d){if(c&&d&&o<5){setTimeout(function(){s.read.call(s,i,a,n,o+1,u*2,l)},u);return}l(c,d)}):l(null,{})}},{key:"prepareLoading",value:function(i,a){var n=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof a=="string"&&(a=[a]);var u=this.queueLoad(i,a,s,o);if(!u.toLoad.length)return u.pending.length||o(),null;u.toLoad.forEach(function(l){n.loadOne(l)})}},{key:"load",value:function(i,a,n){this.prepareLoading(i,a,{},n)}},{key:"reload",value:function(i,a,n){this.prepareLoading(i,a,{reload:!0},n)}},{key:"loadOne",value:function(i){var a=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=i.split("|"),o=nb(s,2),u=o[0],l=o[1];this.read(u,l,"read",null,null,function(c,d){c&&a.logger.warn("".concat(n,"loading namespace ").concat(l," for language ").concat(u," failed"),c),!c&&d&&a.logger.log("".concat(n,"loaded namespace ").concat(l," for language ").concat(u),d),a.loaded(i,c,d)})}},{key:"saveMissing",value:function(i,a,n,s,o){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};this.backend&&this.backend.create&&this.backend.create(i,a,n,s,null,Ft({},u,{isUpdate:o})),!(!i||!i[0])&&this.store.addResource(i[0],a,n,s)}}]),e}(pi);function sH(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,whitelist:!1,nonExplicitWhitelist:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:function(){},parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var r={};if(ur(e[1])==="object"&&(r=e[1]),typeof e[1]=="string"&&(r.defaultValue=e[1]),typeof e[2]=="string"&&(r.tDescription=e[2]),ur(e[2])==="object"||ur(e[3])==="object"){var i=e[3]||e[2];Object.keys(i).forEach(function(a){r[a]=i[a]})}return r},interpolation:{escapeValue:!0,format:function(e,r,i){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",maxReplaces:1e3}}}function sb(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.whitelist&&t.whitelist.indexOf("cimode")<0&&(t.whitelist=t.whitelist.concat(["cimode"])),t}function Ml(){}var oH=function(t){Tl(e,t);function e(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(Xr(this,e),r=Un(this,ka(e).call(this)),pi.call(Bt(Bt(r))),r.options=sb(i),r.services={},r.logger=Ur,r.modules={external:[]},a&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,a),Un(r,Bt(Bt(r)));setTimeout(function(){r.init(i,a)},0)}return r}return Jr(e,[{key:"init",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;typeof a=="function"&&(n=a,a={}),this.options=Ft({},sH(),this.options,sb(a)),this.format=this.options.interpolation.format,n||(n=Ml);function s(f){return f?typeof f=="function"?new f:f:null}if(!this.options.isClone){this.modules.logger?Ur.init(s(this.modules.logger),this.options):Ur.init(null,this.options);var o=new YB(this.options);this.store=new QB(this.options.resources,this.options);var u=this.services;u.logger=Ur,u.resourceStore=this.store,u.languageUtils=o,u.pluralResolver=new $B(o,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u.interpolator=new eH(this.options),u.backendConnector=new nH(s(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",function(f){for(var g=arguments.length,S=new Array(g>1?g-1:0),h=1;h<g;h++)S[h-1]=arguments[h];i.emit.apply(i,[f].concat(S))}),this.modules.languageDetector&&(u.languageDetector=s(this.modules.languageDetector),u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=s(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new ab(this.services,this.options),this.translator.on("*",function(f){for(var g=arguments.length,S=new Array(g>1?g-1:0),h=1;h<g;h++)S[h-1]=arguments[h];i.emit.apply(i,[f].concat(S))}),this.modules.external.forEach(function(f){f.init&&f.init(i)})}var l=["getResource","addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle","getDataByLanguage"];l.forEach(function(f){i[f]=function(){var g;return(g=i.store)[f].apply(g,arguments)}});var c=Gn(),d=function(){i.changeLanguage(i.options.lng,function(g,S){i.isInitialized=!0,i.logger.log("initialized",i.options),i.emit("initialized",i.options),c.resolve(S),n(g,S)})};return this.options.resources||!this.options.initImmediate?d():setTimeout(d,0),c}},{key:"loadResources",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ml;if(!this.options.resources||this.options.partialBundledLanguages){if(this.language&&this.language.toLowerCase()==="cimode")return a();var n=[],s=function(l){if(l){var c=i.services.languageUtils.toResolveHierarchy(l);c.forEach(function(d){n.indexOf(d)<0&&n.push(d)})}};if(this.language)s(this.language);else{var o=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);o.forEach(function(u){return s(u)})}this.options.preload&&this.options.preload.forEach(function(u){return s(u)}),this.services.backendConnector.load(n,this.options.ns,a)}else a(null)}},{key:"reloadResources",value:function(i,a,n){var s=Gn();return i||(i=this.languages),a||(a=this.options.ns),n||(n=Ml),this.services.backendConnector.reload(i,a,function(o){s.resolve(),n(o)}),s}},{key:"use",value:function(i){return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&ib.addPostProcessor(i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"changeLanguage",value:function(i,a){var n=this,s=Gn();this.emit("languageChanging",i);var o=function(c,d){n.translator.changeLanguage(d),d&&(n.emit("languageChanged",d),n.logger.log("languageChanged",d)),s.resolve(function(){return n.t.apply(n,arguments)}),a&&a(c,function(){return n.t.apply(n,arguments)})},u=function(c){c&&(n.language=c,n.languages=n.services.languageUtils.toResolveHierarchy(c),n.translator.language||n.translator.changeLanguage(c),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(c)),n.loadResources(function(d){o(d,c)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(u):u(i),s}},{key:"getFixedT",value:function(i,a){var n=this,s=function o(u,l){var c=Ft({},l);if(ur(l)!=="object"){for(var d=arguments.length,f=new Array(d>2?d-2:0),g=2;g<d;g++)f[g-2]=arguments[g];c=n.options.overloadTranslationOptionHandler([u,l].concat(f))}return c.lng=c.lng||o.lng,c.lngs=c.lngs||o.lngs,c.ns=c.ns||o.ns,n.t(u,c)};return typeof i=="string"?s.lng=i:s.lngs=i,s.ns=a,s}},{key:"t",value:function(){var i;return this.translator&&(i=this.translator).translate.apply(i,arguments)}},{key:"exists",value:function(){var i;return this.translator&&(i=this.translator).exists.apply(i,arguments)}},{key:"setDefaultNamespace",value:function(i){this.options.defaultNS=i}},{key:"loadNamespaces",value:function(i,a){var n=this,s=Gn();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(o){n.options.ns.indexOf(o)<0&&n.options.ns.push(o)}),this.loadResources(function(o){s.resolve(),a&&a(o)}),s):(a&&a(),Promise.resolve())}},{key:"loadLanguages",value:function(i,a){var n=Gn();typeof i=="string"&&(i=[i]);var s=this.options.preload||[],o=i.filter(function(u){return s.indexOf(u)<0});return o.length?(this.options.preload=s.concat(o),this.loadResources(function(u){n.resolve(),a&&a(u)}),n):(a&&a(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.languages&&this.languages.length>0?this.languages[0]:this.language),!i)return"rtl";var a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"];return a.indexOf(this.services.languageUtils.getLanguagePartFromCode(i))>=0?"rtl":"ltr"}},{key:"createInstance",value:function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;return new e(i,a)}},{key:"cloneInstance",value:function(){var i=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ml,s=Ft({},this.options,a,{isClone:!0}),o=new e(s),u=["store","services","language"];return u.forEach(function(l){o[l]=i[l]}),o.translator=new ab(o.services,o.options),o.translator.on("*",function(l){for(var c=arguments.length,d=new Array(c>1?c-1:0),f=1;f<c;f++)d[f-1]=arguments[f];o.emit.apply(o,[l].concat(d))}),o.init(s,n),o.translator.options=o.options,o}}]),e}(pi);const ze=new oH;ze.changeLanguage.bind(ze),ze.cloneInstance.bind(ze),ze.createInstance.bind(ze),ze.dir.bind(ze),ze.exists.bind(ze),ze.getFixedT.bind(ze),ze.init.bind(ze),ze.loadLanguages.bind(ze),ze.loadNamespaces.bind(ze),ze.loadResources.bind(ze),ze.off.bind(ze),ze.on.bind(ze),ze.setDefaultNamespace.bind(ze),ze.t.bind(ze),ze.use.bind(ze);const Dl={screensCache:[],cachedScreenPromises:[],install(t){t.prototype.$dataProvider=this},apiInstance(){return G.has(window,"ProcessMaker.apiClient")&&!window.ProcessMaker.isStub?window.ProcessMaker.apiClient:this.token()?(Xn.defaults.baseURL=this.baseURL(),Xn.defaults.headers.common={Authorization:`Bearer ${this.token()}`},Xn.defaults.adapter=Ug(Xn.defaults.adapter,{enabledByDefault:window.ProcessMaker.screen.cacheEnabled,cacheFlag:"useCache",defaultCache:new kl({ttl:window.ProcessMaker.screen.cacheTimeout,max:100})}),Xn):G.has(window,"ProcessMaker.apiClient")&&window.ProcessMaker.isStub?window.ProcessMaker.apiClient:{get(){return Promise.resolve({data:{data:[]}})}}},get(...t){return this.apiInstance().get(...t)},post(...t){return this.apiInstance().post(...t)},delete(...t){return this.apiInstance().delete(...t)},token(){return localStorage.getItem("token")},baseURL(){return localStorage.getItem("baseURL")},async getTasks(t){const e=G.get(window,"PM4ConfigOverrides.getTasksEndpoint","/api/1.1/tasks"),r=[],i=t.match(/include=.*,screen,/),a=t.match(/include=.*,nested,/),n=t.match(/screen_version=([^&]+)/),s=n?n[1]:null;if(r.push(this.get(e+t.replace(/,screen,|,nested,/g,","))),i){let c=`${(e+t).replace(/\?.+$/,"")}/screen?include=screen${a?",nested":""}`;s&&(c+=`&screen_version=${s}`),r.push(this.get(c))}const[o,u]=await Promise.all(r),l=o;return u&&(l.data.screen=u.data),l.data.screen&&l.data.screen.nested&&this.addNestedScreenCache(l.data.screen.nested),l},addNestedScreenCache(t){t.forEach(e=>{e.screen_id&&(e.id=e.screen_id);const r=this.screensCache.findIndex(i=>i.id===e.id);r>-1?this.screensCache.splice(r,1,e):this.screensCache.push(e)})},getScreen(t,e=""){if(!t)return null;const r=this.cachedScreenPromises.find(s=>s.id===t&&s.query===e);if(r)return r.screenPromise;const i=G.get(window,"PM4ConfigOverrides.getScreenEndpoint","/screens"),a=this.screensCache.find(s=>s.id===t);if(a)return Promise.resolve({data:a});const n=new Promise((s,o)=>{this.get(`${i}/${t}${e}`).then(u=>{u.data.nested&&this.addNestedScreenCache(u.data.nested),s(u)}).catch(u=>o(u))});return this.cachedScreenPromises.push({id:t,query:e,screenPromise:n}),n},flushScreenCache(){this.cachedScreenPromises.splice(0,this.cachedScreenPromises.length)},postScript(t,e,r={}){const i=G.get(window,"PM4ConfigOverrides.postScriptEndpoint","/scripts/execute/{id}");return this.post(i.replace("{id}",t)+this.authQueryString(),e,r)},postDataSource(t,e,r){let i;return e?i=`/requests/${e}/data_sources/${t}`:i=`/requests/data_sources/${t}`,i+=this.authQueryString(),this.post(i,r,{timeout:0})},getDataSource(t,e,r=null){if(!window.ProcessMaker.screen.cacheEnabled&&!window.ProcessMaker.screen.cacheTimeout)return this.postDataSource(t,null,e).then(a=>[a,r]);let i=`/requests/data_sources/${t}/resources/${e.config.endpoint}/data`;return i+=this.authQueryString(),this.get(i,{useCache:window.ProcessMaker.screen.cacheEnabled,params:{pmds_config:JSON.stringify(e.config),pmds_data:JSON.stringify(e.data)}}).then(a=>[a,r])},authQueryString(){const t=G.get(window,"PM4ConfigOverrides.authParams",null);let e="";return t&&(e=`?${new URLSearchParams(t).toString()}`),e},deleteFile(t,e=null){let r=`files/${t}`;const i={token:e},a=G.get(window,"_current_task_id",0);return a&&(i.task_id=a),this.delete(r,{params:i})},download(t){return this.apiInstance().get(t,{responseType:"blob"})},getCollections(){return this.get("/collections?per_page=1000").catch(t=>{throw t.response&&t.response.status===404?new Error(ze.t("Collections package not installed")):t})},getCollectionFields(t){return this.get(`/collections/${t}/columns?per_page=1000`).catch(e=>{throw e.response&&e.response.status===404?new Error(ze.t("Collection id not found")):e})},getCollectionRecords(t,e,r=null){var i,a;return e.useCache=(a=(i=window.ProcessMaker)==null?void 0:i.screen)==null?void 0:a.cacheEnabled,this.get(`/collections/${t}/records${this.authQueryString()}`,e).then(n=>{const s=n?n.data:null;if(!s)throw new Error(ze.t("No data returned"));return[s,r]}).catch(n=>{if(n.response&&n.response.status===404)return[{data:[]},r];throw n})}};let Qn=typeof window>"u"?global:window;class Ca{constructor(e,r){se(this,"screen",null);se(this,"firstPage",0);this.element=e,Object.assign(this,r)}async countItems(e){throw e}}class lH extends Ca{async countItems(e){for(const r of this.element)await Ma(r,{screen:this.screen}).countItems(e)}}class uH extends Ca{async countItems(e){for(let r=0,i=this.element.config.length;r<i;r++)await Ma(this.element.config[r].items,{screen:this.element}).countItems(e)}}class cH extends Ca{async countItems(e){e.push(this.element);const r=await this.loadScreen(this.element.config.screen);r&&r[0]&&r[0].items&&await Ma(r[0].items,{screen:this.screen}).countItems(e)}async loadScreen(e){try{if(Qn.nestedScreens||(Qn.nestedScreens={}),Qn.nestedScreens["id_"+e])return Qn.nestedScreens["id_"+e];const r=await Dl.getScreen(e);return Qn.nestedScreens["id_"+e]=r.data.config,r.data.config}catch{return!1}}}class dH extends Ca{async countItems(e){e.push(this.element),await Ma(this.element.items,{screen:this.screen}).countItems(e)}}class fH extends Ca{async countItems(e){await Ma(this.element.items,{screen:this.screen}).countItems(e)}}class pH extends Ca{async countItems(e){e.push(this.element)}}function Ma(t,e){return t instanceof Array?new lH(t,e):t.config instanceof Array?new uH(t,e):t.component==="FormNestedScreen"?new cH(t,e):t.component==="FormMultiColumn"?new fH(t,e):t.component==="FormLoop"?new dH(t,e):new pH(t,e)}let Dr=typeof window>"u"?global:window,Yn=[];class Ri{constructor(e,r){se(this,"screen",null);se(this,"firstPage",0);se(this,"data",{});se(this,"insideLoop",!1);this.element=e,Object.assign(this,r)}async addValidations(e){throw e}isVisible(){if(!(this.element.visibleInDevice===null||this.element.visibleInDevice===void 0?!0:this.element.visibleInDevice))return!1;let r=!0;if(this.element.config.conditionalHide)try{r=!!Mt.evaluate(this.element.config.conditionalHide,this.data)}catch{r=!1}return r}}class hH extends Ri{async addValidations(e){for(const r of this.element)await hi(r,{screen:this.screen,data:this.data,parentVisibilityRule:this.parentVisibilityRule,insideLoop:this.insideLoop}).addValidations(e)}}class mH extends Ri{async addValidations(e){this.element.config[this.firstPage]&&(Yn=[this.firstPage],await hi(this.element.config[this.firstPage].items,{screen:this.element,data:this.data}).addValidations(e),Yn=[])}}class vH extends Ri{async addValidations(e){if(!this.isVisible())return;const r=await this.loadNestedScreen(this.element.config.screen);if(r&&r.config){const i=r.config;let a=this.parentVisibilityRule?this.parentVisibilityRule:this.element.config.conditionalHide;i&&i[0]&&i[0].items&&await hi(i[0].items,{screen:r,data:this.data,parentVisibilityRule:a}).addValidations(e)}}async loadNestedScreen(e){if(!e)return null;if(Dr.nestedScreens||(Dr.nestedScreens={}),Dr.nestedScreens["id_"+e])return{config:Dr.nestedScreens["id_"+e]};const r=await Dl.getScreen(e);return Dr.nestedScreens["id_"+e]=r.data.config,{config:r.data}}async loadScreen(e){if(!e)return null;if(Dr.nestedScreens||(Dr.nestedScreens={}),Dr.nestedScreens["id_"+e])return Dr.nestedScreens["id_"+e];const r=await Dl.getScreen(e);return Dr.nestedScreens["id_"+e]=r.data.config,r.data.config}}class gH extends Ri{async addValidations(e){if(!this.isVisible())return;G.set(e,this.element.config.name,{});const r=G.get(e,this.element.config.name);r.$each={},this.checkForSiblings(e);const i=(G.get(this.data,this.element.config.name)||[{}])[0];await hi(this.element.items,{screen:this.screen,data:{_parent:this.data,...i},parentVisibilityRule:this.element.config.conditionalHide,insideLoop:!0}).addValidations(r.$each)}checkForSiblings(e){const r=[],i=[];if(this.screen.config.forEach(a=>{!a||!a.items||(a.items.filter(n=>{n.component==="FormLoop"&&n.config.name===this.element.config.name&&r.push(n)}),r&&r.forEach(n=>{n.items.filter(s=>{s.config.validation&&s.config.validation.forEach(o=>{const u=this.camelCase(o.value.split(":")[0]),l=ll[u],c={};let d={};d[u]=l,c[s.config.name]=d,G.merge(i,c)})})}))}),Object.keys(i).length!=0){const a=G.get(e,this.element.config.name);a.hasOwnProperty("$each")&&G.merge(a.$each,i),G.set(e[this.element.config.name].$each,a)}}camelCase(e){return e.replace(/_\w/g,r=>r.substr(1,1).toUpperCase())}}class bH extends Ri{async addValidations(e){this.isVisible()&&await hi(this.element.items,{screen:this.screen,data:this.data,parentVisibilityRule:this.element.config.conditionalHide}).addValidations(e)}}class yH extends Ri{async addValidations(e){if(!this.isVisible())return;const r=this.element.config.eventData;let i="Empty Screen";this.screen.config[r]&&this.screen.config[r].name&&(i=this.screen.config[r].name);const a=`${i}-${r}`;Yn.length>0&&!Yn.includes(a)&&this.screen.config[r]&&this.screen.config[r].items&&(Yn.push(a),await hi(this.screen.config[this.element.config.eventData].items,{screen:this.screen,data:this.data}).addValidations(e))}}class xH extends Ri{async addValidations(e){if(!this.isVisible()||this.element.config&&this.element.config.readonly||this.element.config&&this.element.config.disabled||!(this.element.config&&this.element.config.name&&typeof this.element.config.name=="string"&&this.element.config.name.match(/^[a-zA-Z_][0-9a-zA-Z_.]*$/)))return;const r=this.element.config.name,i=this.element.config.validation,a=this.element.config.conditionalHide,n=this.parentVisibilityRule,s=this.insideLoop||!1,o=this.element.config.deviceVisibility?this.element.config.deviceVisibility:{showForDesktop:!0,showForMobile:!0};G.set(e,r,G.get(e,r,{}));const u=G.get(e,r);if(i instanceof Array)i.forEach(l=>{const c=this.camelCase(l.value.split(":")[0]);if(!c)return;let d=ll[c];if(d){if(l.configs instanceof Array){const f=[];l.configs.forEach(g=>{f.push(g.value)}),f.push(r),d=d(...f)}u[c]=function(...f){const g=f[1],S=r.split(".").length-1,h=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(g),S);if(n){const w=s?1:0,b=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(g),S+w);let p=!0;try{p=!!Mt.evaluate(n,b)}catch{p=!1}if(!p)return!0}let y=!0;try{const w=this.$root.$children[0].$refs.renderer.definition.isMobile;y=w&&o.showForMobile||!w&&o.showForDesktop}catch{y=!0}if(!y)return!0;let x=!0;if(a)try{x=!!Mt.evaluate(a,h)}catch{x=!1}return x?d.apply(this,f):!0}}});else if(typeof i=="string"&&i){let l=ll[i];if(!l)return;u[i]=function(...c){const d=c[1],f=r.split(".").length-1,g=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(d),f);if(n){const h=s?1:0,y=this.getDataAccordingToFieldLevel(this.getRootScreen().addReferenceToParents(d),f+h);let x=!0;try{x=!!Mt.evaluate(n,y)}catch{x=!1}if(!x)return!0}let S=!0;if(a)try{S=!!Mt.evaluate(a,g)}catch{S=!1}return S?l.apply(this,c):!0}}this.element.items&&hi(this.element.items,{screen:this.screen,data:this.data}).addValidations(e)}camelCase(e){return e.replace(/_\w/g,r=>r.substr(1,1).toUpperCase())}}function hi(t,e){return t instanceof Array?new hH(t,e):t.config instanceof Array?new mH(t,e):t.component==="FormNestedScreen"?new vH(t,e):t.component==="FormMultiColumn"?new bH(t,e):t.component==="FormLoop"?new gH(t,e):(t.component,t.component==="FormButton"&&t.config.event==="pageNavigate"?new yH(t,e):new xH(t,e))}let Zn;const ob={mixins:cg,props:{value:Object,_parent:null,definition:Object,components:{type:Object,default(){return{}}},showErrors:{type:Boolean,default:!1},testScreenDefinition:{type:Boolean,default:!1}},data(){return{references__:[],debugCmp:null,component:null,alias:{},extensions:[],nodeNameProperty:"component",variables:[],variablesTree:[],initialize:[],ownerDocument:window.document,updatedConfigs:[],building:{show:!1,error:"",component:"",errors:[]}}},methods:{dot2bracket(t){return t.replace(/\.\d/g,e=>`[${e.substr(1)}]`)},submit(t,e=!1,r=null){r&&this.loopContext&&(r.loopContext=this.loopContext),this.$emit("submit",this.value,e,r)},buildComponent(t){window.ProcessMaker&&window.ProcessMaker.EventBus&&window.ProcessMaker.EventBus.$emit("screen-renderer-build-component",this);const e=this.componentDefinition(t);if(!this.testScreenDefinition)return e;const r=this.$root.constructor,i=r.config.warnHandler,a=r.config.errorHandler,n=[];this.building.error="",this.building.component="",this.building.errors=[],this.building.show=!1;let s;try{r.config.warnHandler=u=>{n.push(u)},r.config.errorHandler=u=>{n.push(u)},s=r.component("ScreenRendered",e);const o=new s({propsData:{vdata:{}}});if(o.$parent=this,o.$mount(),n.length>0)throw this.$t("Building error");return this.codigo=e,e}catch(o){return console.error(o),this.building.error=o,this.building.component=e,this.building.errors=n,this.building.show=!0,e||{template:"<div></div>"}}finally{r.config.warnHandler=i,r.config.errorHandler=a}},parse(t,e){const r=this.ownerDocument.createElement("div");return this.loadPages(e,r,t),"<div>"+r.innerHTML+"</div>"},loadPages(t,e,r){const i=t.config;this.variables.splice(0),this.extensions.forEach(a=>a.beforeload instanceof Function&&a.beforeload.bind(this)({pages:i,owner:e,definition:t})),i.forEach((a,n)=>{if(a){const s=this.createComponent("div",{name:a.name,class:"page","v-if":`currentPage__==${n}`,key:`page-${n}`});this.loadItems(a.items,s,r,t,n),e.appendChild(s)}})},escapeVuePropertyName(t){return t.substr(0,1)==="@"?t.replace("@","v-on:"):this.snakeCase(t)},snakeCase(t){return t.replace(/[A-Z]/g,e=>`-${e}`).toLowerCase().replace(/^-/,"")},camelCase(t){return t.replace(/_\w/g,e=>e.substr(1,1).toUpperCase())},updateComponentConfig(t,e){this.updatedConfigs.push({name:t,properties:e})},mergeUpdatedConfig(t,e){let r=this.updatedConfigs.find(i=>i.name===t);if(r){let i=r.properties;for(let a in i)e[a]===void 0&&(e[a]=i[a])}return e},createComponent(t,e){e=this.mergeUpdatedConfig(t,this.setDefaultPropertyValues(e)),t=this.snakeCase(t);const r=this.ownerDocument.createElement(t);for(let i in e){const a=e[i];a!==!1&&a!==null&&a!==void 0&&(i.substr(0,1)===":"||typeof a=="string"&&a.indexOf("{{")===-1?r.setAttribute(this.escapeVuePropertyName(i),a):typeof a=="string"&&a.indexOf("{{")!==-1&&!e.ignoreMustache?r.setAttribute(":"+this.escapeVuePropertyName(i),"mustache("+this.byValue(a)+")"):a!==void 0&&r.setAttribute(":"+this.escapeVuePropertyName(i),this.byRef(a)))}return r},byValue(t){return JSON.stringify(t).replace("{{","{{").replace("}}","}}")},byRef(t){const r=`references__[${this.references__.indexOf(t)>-1?this.references__.indexOf(t):this.references__.length}]`;return this.references__.push(t),r},loadItems(t,e,r,i,a){t.forEach(n=>{const s=n[this.nodeNameProperty],o=this.alias[s]||s,u={...n.config};this.extensions.forEach(d=>d.onloadproperties instanceof Function&&d.onloadproperties.bind(this)({properties:u,element:n,component:e,items:t,nodeName:o,componentName:s,screen:r,definition:i,formIndex:a}));const l=this.createComponent(o,u),c=this.ownerDocument.createElement("div");c.appendChild(l),this.extensions.forEach(d=>d.onloaditems instanceof Function&&d.onloaditems.bind(this)({properties:u,element:n,component:e,items:t,nodeName:o,componentName:s,node:l,wrapper:c,screen:r,definition:i,formIndex:a})),e.appendChild(c)})},setDefaultPropertyValues(t){let e={...t};return(typeof e.ariaLabel>"u"||e.ariaLabel===null||e.ariaLabel==="")&&e.label&&(e.ariaLabel=e.label),e.tabindex&&(e.tabindex=parseInt(e.tabindex)),e},validVariableName(t){return t&&typeof t=="string"&&t.match(/^[a-zA-Z_][0-9a-zA-Z_.]*$/)},isComputedVariable(t,e){var r;return(r=e==null?void 0:e.computed)==null?void 0:r.some(i=>i!=null&&i.byPass?!1:new RegExp(`^${i.property}(\\.|$)`,"i").test(t))},registerVariable(t,e={}){if(t&&t.startsWith("_parent.")||t&&t.includes("._parent.")||!this.validVariableName(t))return;const r=G.get(e,"config",{});this.variables.find(a=>a.name===t)||(this.variables.push({name:t,config:r,element:e}),this.variablesTree.push({name:t,config:r,element:e}))},registerNestedVariable(t,e,r){const i=Zn.getVariablesTree(r);this.variablesTree.push({name:t,prefix:e,config:{},items:i}),Zn.getVariablesTree({config:[]})},getVariablesTree(t){let e;try{e={mixins:[nd],components:{},props:{},computed:{},methods:{},data:{},watch:{},mounted:[]},this.variablesTree=[];const r=this.parse(e,t);return this.extensions.forEach(i=>{i.onparse instanceof Function&&i.onparse.bind(this)({screen:e,template:r,definition:t})}),this.variablesTree}catch(r){return console.error(r),this.variablesTree}},elementCssClass(t){const e=[];return t.config.bgcolor&&e.push(t.config.bgcolor),t.config.color&&e.push(t.config.color),e.join(" ")},componentDefinition(t){let e;this.building.error="",this.building.component="",this.building.errors=[],this.building.show=!1;try{e={mixins:[nd],components:{},props:{},computed:{},methods:{},created:[],data:{},watch:{},mounted:[]};const r=this.parse(e,t);this.extensions.forEach(n=>{n.onparse instanceof Function&&n.onparse.bind(this)({screen:e,template:r,definition:t})}),e.template=r,this.extensions.forEach(n=>{n.onbuild instanceof Function&&n.onbuild.bind(this)({screen:e,definition:t})});const i=["currentPage__"],a=`let value;const data = {};
286
286
  ${Object.keys(e.data).map(n=>{const{code:s,variable:o}=e.data[n];return`value = ${s};
287
287
  data.${this.safeDotName(n)} = value;
288
288
  ${!o||i.includes(o)||o.endsWith("__")?"":`this.setValue(${JSON.stringify(o)}, value, this.vdata);`}`}).join(`
@@ -378,5 +378,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
378
378
  content: $t(element.popoverContent),
379
379
  customClass: 'custom-popover',
380
380
  boundaryPadding: 16
381
- }`,modifiers:{hover:!0,right:!0}}],key:o,staticClass:"gray-text",attrs:{boundary:"viewport","data-cy":`controls-${s.component}`}},[s.config&&s.config.icon?r("i",{class:s.config.icon}):e._e(),r("span",{staticClass:"svg-icon",staticStyle:{width:"12px",height:"12px"},domProps:{innerHTML:e._s(s.config.svg)}}),e._v(" "+e._s(e.$t(s.label))+" ")])}),1):e._e()],1)],1)]})],2)],1)],1),r("b-col",{ref:"screen-container",staticClass:"overflow-auto mh-100 p-0 d-flex flex-column position-relative",attrs:{id:"screen-container"}},[r("tabs-bar",{ref:"tabsBar",attrs:{pages:e.config,"is-multi-page":e.showToolbar},on:{"tab-opened":function(i){e.currentPage=i}},scopedSlots:e._u([{key:"tabs-start",fn:function(){return[e.showToolbar?r("pages-dropdown",{attrs:{data:e.sortedPages},on:{addPage:function(i){return e.$bvModal.show("addPageModal")},clickPage:e.onClick,seeAllPages:function(i){return e.$bvModal.show("openSortable")}}}):e._e()]},proxy:!0},{key:"default",fn:function({currentPage:i}){return[e.isCurrentPageEmpty(i)?r("div",{staticClass:"d-flex justify-content-center align-items-center drag-placeholder text-center position-absolute rounded mt-4 flex-column",attrs:{"data-cy":"screen-drop-zone"}},[r("svg",{attrs:{width:"81",height:"107",viewBox:"0 0 81 107",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[r("path",{attrs:{d:"M47.125 28.6562V0.5H5.71875C2.96523 0.5 0.75 2.71523 0.75 5.46875V101.531C0.75 104.285 2.96523 106.5 5.71875 106.5H75.2812C78.0348 106.5 80.25 104.285 80.25 101.531V33.625H52.0938C49.3609 33.625 47.125 31.3891 47.125 28.6562ZM60.375 77.5156C60.375 78.882 59.257 80 57.8906 80H23.1094C21.743 80 20.625 78.882 20.625 77.5156V75.8594C20.625 74.493 21.743 73.375 23.1094 73.375H57.8906C59.257 73.375 60.375 74.493 60.375 75.8594V77.5156ZM60.375 64.2656C60.375 65.632 59.257 66.75 57.8906 66.75H23.1094C21.743 66.75 20.625 65.632 20.625 64.2656V62.6094C20.625 61.243 21.743 60.125 23.1094 60.125H57.8906C59.257 60.125 60.375 61.243 60.375 62.6094V64.2656ZM60.375 49.3594V51.0156C60.375 52.382 59.257 53.5 57.8906 53.5H23.1094C21.743 53.5 20.625 52.382 20.625 51.0156V49.3594C20.625 47.993 21.743 46.875 23.1094 46.875H57.8906C59.257 46.875 60.375 47.993 60.375 49.3594ZM80.25 25.7371V27H53.75V0.5H55.0129C56.3379 0.5 57.6008 1.01758 58.5324 1.94922L78.8008 22.2383C79.7324 23.1699 80.25 24.4328 80.25 25.7371Z",fill:"#699CFF"}})]),r("h3",[e._v(e._s(e.$t("Place your controls here.")))]),r("p",[e._v(" "+e._s(e.$t("To begin creating a screen, drag and drop items from the Controls Menu on the left."))+" ")])]):e._e(),e.renderControls?r("draggable",e._b({key:e.editorContentKey,staticClass:"h-100",attrs:{"data-cy":"editor-content","ghost-class":"form-control-ghost",value:e.config[i].items},on:{input:e.updateConfig}},"draggable",{group:{name:"controls"},swapThreshold:.5},!1),e._l(e.config[i].items,function(a,n){return r("div",{key:n,staticClass:"control-item mt-4 mb-4",class:{selected:e.selected===a,hasError:e.hasError(a)},attrs:{selector:a.config.customCssSelector},on:{click:function(s){return e.inspect(a)}}},[a.container?r("div",{staticClass:"card container-lement",class:{"ai-section-card":e.isAiSection(a)},attrs:{"data-cy":"screen-element-container"},on:{click:function(s){return e.inspect(a)}}},[e.selected===a?r("div",{staticClass:"card-header form-element-header d-flex align-items-center",class:{pulse:e.isAiSection(a)&&e.aiPreview(a)}},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),a.config.icon?r("i",{staticClass:"mr-2 ml-1",class:a.config.icon}):e._e(),e._v(" "+e._s(a.config.name||a.label||e.$t("Field Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(a)&&e.aiPreview(a)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{"data-test":"apply-ai-btn",title:e.$t("Apply Changes")},on:{click:function(s){return e.applyAiChanges(a)}}},[e._v(" "+e._s(e.$t("Apply Changes"))+" ")]):e._e(),e.isAiSection(a)&&e.aiPreview(a)?e._e():r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{"data-test":"copy-control-btn",title:e.$t("Copy Control")},on:{click:function(s){return e.duplicateItem(n)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"data-test":"delete-control-btn",title:e.$t("Delete Control")},on:{click:function(s){return e.deleteItem(n)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(a["editor-component"],{tag:"component",staticClass:"card-body",class:e.elementCssClass(a),attrs:{"validation-errors":e.validationErrors,selected:e.selected,config:a.config,"ai-element":a},on:{inspect:e.inspect,"update-state":e.updateState},model:{value:a.items,callback:function(s){e.$set(a,"items",s)},expression:"element.items"}})],1):r("div",{staticClass:"card",attrs:{"data-cy":"screen-element-container"}},[e.selected===a?r("div",{staticClass:"card-header form-element-header d-flex align-items-center"},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),a.config.icon?r("i",{staticClass:"mr-2 ml-1",class:a.config.icon}):e._e(),e._v(" "+e._s(a.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(s){return e.duplicateItem(n)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{title:e.$t("Delete Control")},on:{click:function(s){return e.deleteItem(n)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(a["editor-component"],e._b({tag:"component",staticClass:"card-body m-0 pb-4 pt-4",class:[e.elementCssClass(a),{"prevent-interaction":!a.config.interactive}],attrs:{tabindex:a.config.interactive?0:-1},on:{input:function(s){a.config.interactive&&(a.config.content=s)}},nativeOn:{focusout:function(s){return e.updateState.apply(null,arguments)}}},"component",a.config,!1))],1)])}),0):e._e(),e.isCurrentPageEmpty(i)?e._e():r("div",{attrs:{"data-cy":"screen-drop-zone"}},[e._v("   ")])]}}])})],1),e.renderControls?r("b-col",{staticClass:"overflow-hidden h-100 p-0 inspector-column"},[r("b-card",{staticClass:"p-0 h-100 border-top-0 border-bottom-0 border-right-0 rounded-0",attrs:{"no-body":""}},[r("b-card-body",{staticClass:"p-0 h-100 overflow-auto"},[e._l(e.accordions,function(i){return[e.getInspectorFields(i)&&e.getInspectorFields(i).length>0?r("b-button",{key:`${e.accordionName(i)}-button`,staticClass:"text-left card-header d-flex align-items-center w-100 outline-0 text-capitalize shadow-none",attrs:{variant:"outline","data-cy":`accordion-${e.accordionName(i).replace(" ","")}`,"accordion-name":`accordion-${e.accordionName(i).replace(" ","")}`,"is-open":i.open?"1":"0"},on:{click:function(a){return e.toggleAccordion(i)}}},[r("i",{staticClass:"fas fa-cog mr-2"}),e._v(" "+e._s(e.$t(e.accordionName(i)))+" "),r("i",{staticClass:"fas fa-angle-down ml-auto",class:{"fas fa-angle-right":!i.open}})]):e._e(),r("b-collapse",{key:`${e.accordionName(i)}-collapse`,attrs:{id:e.accordionName(i)},model:{value:i.open,callback:function(a){e.$set(i,"open",a)},expression:"accordion.open"}},e._l(e.getInspectorFields(i),function(a,n){return r(a.type,e._b({key:n,tag:"component",staticClass:"border-bottom m-0 p-4",attrs:{"data-cy":"inspector-"+(a.field||a.config.name),"field-name":a.field,"field-accordion":`accordion-${e.accordionName(i).replace(" ","")}`,builder:e.builder,"form-config":e.config,"screen-type":e.screenType,"current-page":e.currentPage,"selected-control":e.selected},on:{"update-state":e.updateState,setName:function(s){e.inspection.config.name=s}},nativeOn:{focusout:function(s){return e.updateState.apply(null,arguments)}},model:{value:e.inspection.config[a.field],callback:function(s){e.$set(e.inspection.config,a.field,s)},expression:"inspection.config[item.field]"}},"component",a.config,!1))}),1)]})],2)],1)],1):e._e(),r("b-modal",{ref:"openSortable",attrs:{id:"openSortable","header-close-content":"&times;",role:"dialog",size:"lg",title:e.$t("Edit Pages"),"ok-title":e.$t("DONE"),"ok-only":"","ok-variant":"secondary","header-class":"modal-header-custom"},scopedSlots:e._u([{key:"modal-title",fn:function(){return[r("h5",{staticClass:"modal-title"},[e._v(e._s(e.$t("Edit Pages")))]),r("span",{staticClass:"modal-subtitle"},[e._v(e._s(e.$t("Change pages order and name")))])]},proxy:!0},{key:"modal-header-close",fn:function({close:i}){return[r("button",{staticClass:"close",attrs:{type:"button","aria-label":"Close"}},[e._v("×")])]}}])},[r("Sortable",{attrs:{fields:e.fields,items:e.config,"search-properties":e.searchProperties},on:{"item-edit":()=>{},"item-delete":e.confirmDelete,"add-page":function(i){return e.$bvModal.show("addPageModal")}}})],1),r("b-modal",{ref:"addPageModal",attrs:{id:"addPageModal","header-class":"pb-2",size:"lg","ok-title":e.$t("SAVE"),"cancel-title":e.$t("CANCEL"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","header-close-content":"&times;","data-cy":"add-page-modal","ok-disabled":!e.addPageName||!!e.checkPageName(e.addPageName)},on:{ok:e.addPage,show:function(i){e.addPageName="",e.showAddPageValidations=!1}},scopedSlots:e._u([{key:"modal-title",fn:function(){return[r("h5",{staticClass:"modal-title"},[e._v(e._s(e.$t("Create New Page")))]),r("small",{staticClass:"modal-subtitle mb-n2"},[e._v(e._s(e.$t("Create a new page in your screen")))])]},proxy:!0}])},[r("form-input",{ref:"addPageInput",attrs:{name:e.$t("Page Name"),label:e.$t("Page Name")+" *",helper:e.$t("The name of the new page to add"),error:e.checkPageName(e.addPageName),"data-cy":"add-page-name","aria-required":"true"},model:{value:e.addPageName,callback:function(i){e.addPageName=i},expression:"addPageName"}})],1),r("b-modal",{ref:"editPageModal",attrs:{title:e.$t("Edit Page Title"),"ok-title":e.$t("Save"),"cancel-title":e.$t("Cancel"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","header-close-content":"&times;"},on:{ok:e.editPage}},[r("required"),r("form-input",{ref:"editPageInput",attrs:{name:e.$t("Page Name"),label:e.$t("Page Name")+" *",helper:e.$t("The new name of the page"),validation:"required",error:e.checkPageName(e.editPageName),required:"","aria-required":"true"},model:{value:e.editPageName,callback:function(i){e.editPageName=i},expression:"editPageName"}})],1),r("b-modal",{ref:"confirm",attrs:{title:e.$t("Caution!"),"ok-title":e.$t("Delete"),"cancel-title":e.$t("Cancel"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","header-close-content":"&times;"},on:{ok:e.deletePage,cancel:e.hideConfirmModal}},[r("p",[e._v(e._s(e.confirmMessage))]),r("div",{attrs:{slot:"modal-ok"},slot:"modal-ok"},[e._v(e._s(e.$t("Delete")))])])],1)},_Z=[],$Z=oe(ZZ,KZ,_Z,!1,null,"45b59613",null,null);const Gw=$Z.exports,eK=1,tK={name:"FormMultiColumn",mixins:[vn,ub,Nc],props:["value","selected","name","config","transientData","formConfig"],components:{draggable:Di,FormInput:Wi,FormSelectList:ee.FormSelectList,FormTextArea:ee.FormTextArea,FormCheckbox:ee.FormCheckbox,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},data(){return{items:[]}},computed:{model(){return this.$parent.model}},watch:{value:{handler(){this.items=this.value},immediate:!0},items(){this.$emit("input",this.items)}},methods:{classColumn(t){let e=eK;return this.config.options[t]&&this.config.options[t].content&&(e=this.config.options[t].content),`col-sm-${e} ${this.columnVerticalAlign(t)}`},columnVerticalAlign(t){let e="";if(this.items.length>0&&this.items[t].length===1){let r=this.items[0].filter(n=>n.component==="FormText");if(r.length===0)return"";let i=r[0],a=" justify-content-"+(i.config.textAlign==="right"?"end":i.config.textAlign);switch(i.config.verticalAlign){case"top":e="d-flex align-items-start"+a;break;case"middle":e="d-flex align-items-center"+a;break;case"bottom":e="d-flex align-items-end"+a;break}}return e},inspect(t){this.$emit("inspect",t)},submit(){this.$emit("submit")},pageNavigate(t){this.$emit("pageNavigate",t)}}};var rK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group"},[r("div",{staticClass:"row"},e._l(e.items,function(i,a){return r("div",{key:a,staticClass:"column-draggable",class:e.classColumn(a)},[e._l(i.filter(e.shouldElementBeVisible),function(n,s){return[n.container?r(n.component,{key:s,ref:"container",refInFor:!0,tag:"component",class:e.elementCssClass(n),attrs:{transientData:e.transientData,config:n.config,name:n.config.name!==void 0?n.config.name:null,"form-config":e.formConfig},on:{submit:e.submit,pageNavigate:e.pageNavigate},model:{value:n.items,callback:function(o){e.$set(n,"items",o)},expression:"element.items"}}):r("div",{key:s,staticClass:"w-100",attrs:{id:n.config.name?n.config.name:void 0,selector:n.config.customCssSelector}},[r(n.component,e._b({ref:"elements",refInFor:!0,tag:"component",class:e.elementCssClass(n),attrs:{validationData:e.transientData,disabled:n.config.interactive||n.config.disabled,"form-config":e.formConfig},on:{submit:e.submit,pageNavigate:e.pageNavigate},model:{value:e.model[e.getValidPath(n.config.name)],callback:function(o){e.$set(e.model,e.getValidPath(n.config.name),o)},expression:"model[getValidPath(element.config.name)]"}},"component",n.config,!1))],1)]})],2)}),0)])},iK=[],aK=oe(tK,rK,iK,!1,null,null,null,null);const bu=aK.exports,Qw={value:"string",content:"Text"},Yw={value:"int",content:"Integer"},nK={value:"currency",content:"Currency"},sK={value:"password",content:"Password"},oK={value:"percentage",content:"Percentage"},Zw={value:"float",content:"Decimal"},Kw={value:"datetime",content:"Datetime"},_w={value:"date",content:"Date"},lK={value:"boolean",content:"Boolean"},uK=[Qw,Yw,nK,oK,Zw,Kw,_w,sK],cK=[Qw,Yw,Zw];function yu(t){return{type:"FormMultiselect",field:"dataFormat",config:{label:"Data Type",name:"Data Type",helper:"The data type specifies what kind of data is stored in the variable.",validation:"required",options:t}}}function dK(){return{type:op,field:"dataMask",config:{label:"Data Format",name:"Data Format",helper:"The data format for the selected type."}}}const $w=yu(uK),fK=yu(cK),pK=yu([lK]),eP=yu([_w,Kw]),tP=dK(),hK=[{editorComponent:ee.FormHtmlEditor,editorBinding:"FormHtmlEditor",rendererComponent:ee.FormHtmlEditor,rendererBinding:"FormHtmlEditor",control:{popoverContent:"Use a Rich Text Editor to add HTML-formatted",order:1,group:"Content Fields",label:"Rich Text",component:"FormHtmlViewer","editor-component":"FormHtmlEditor","editor-control":"FormHtmlEditor",config:{icon:"fas fa-pencil-ruler",interactive:!0,content:"<p>Rich text editor</p>",renderVarHtml:null},inspector:[{type:"FormTextArea",field:"content",config:{rows:5,label:"Content",helper:"The HTML text to display",value:""}},{type:"FormCheckbox",field:"renderVarHtml",config:{label:"Render HTML from a Variable",helper:"",value:""}}]}},{builderComponent:ee.FormInput,builderBinding:"FormInput",rendererComponent:Wi,rendererBinding:"FormMaskedInput",control:{popoverContent:"Collect a string of text and format it as one of several data types",order:1,group:"Input Fields",label:"Line Input",component:"FormInput","editor-component":"FormInput","editor-control":"FormInput",config:{icon:"far fa-square",label:"New Input",name:"",placeholder:"",validation:"",helper:null,type:"text",dataFormat:"string"},inspector:[Qt,Wr,$w,tP,Hi,Bn,xa,nl,ui,li,Hn]}},{editorComponent:ee.FormTextArea,editorBinding:"FormTextArea",rendererComponent:ee.FormTextArea,rendererBinding:"FormTextArea",control:{popoverContent:"Collect a multi-line string of text, to allow for extensive, richly formatted responses",order:4,group:"Input Fields",label:"Textarea",component:"FormTextArea","editor-component":"FormTextArea","editor-control":"FormTextArea","fa-icon":"fas fa-paragraph",config:{icon:"fas fa-paragraph",label:"New Textarea",placeholder:"",helper:null,rows:2,richtext:!1,currency:{code:"USD",name:"US Dollar",format:"#,###.##",symbol:"$"}},inspector:[Qt,Wr,Bn,xa,{type:"FormCheckbox",field:"richtext",config:{label:"Rich Text",helper:""}},Hi,{type:"FormInput",field:"rows",config:{label:"Rows",helper:"The number of rows to provide for input",validation:"integer"}},nl,ui,li,Hn]}},{editorComponent:ee.FormSelectList,editorBinding:"FormSelectList",rendererComponent:ee.FormSelectList,rendererBinding:"FormSelectList",control:{popoverContent:"Collect options from a list, as radio butttons or dropdowns",order:2,group:"Input Fields",label:"Select List",component:"FormSelectList","editor-component":"FormSelectList","editor-control":"FormSelectList",config:{icon:"fas fa-angle-double-down",label:"New Select List",placeholder:"",validation:"",dataSourceUrl:"",dataSourceEndpoint:"",rootElement:"response",options:{showRenderAs:!0,dataSource:ei.provideData,jsonData:"",pmqlQuery:"",dataName:"response",renderAs:"dropdown",allowMultiSelect:!1,selectedOptions:[],optionsList:[],key:"value",value:"content",valueTypeReturned:"single"},helper:null},inspector:[Qt,Wr,Bn,Hi,xa,{type:"OptionsList",field:"options",config:{}},ui,li,Hn,nl]}},{editorComponent:ee.FormCheckbox,editorBinding:"FormCheckbox",rendererComponent:ee.FormCheckbox,rendererBinding:"FormCheckbox",control:{popoverContent:"Add a checkbox or toggle for true/false responses",order:6,group:"Input Fields",label:"Checkbox",component:"FormCheckbox","editor-component":"FormCheckbox","editor-control":"FormCheckbox",config:{icon:"fas fa-check-square",label:"New Checkbox",helper:null,name:null,initiallyChecked:!1,validation:"",toggle:!1},inspector:[Qt,Wr,xa,Hi,{type:"FormCheckbox",field:"initiallyChecked",config:{label:"Checked by default",helper:"Should the checkbox be checked by default"}},ui,li,ig,ad]}},{editorComponent:ee.FormDatePicker,editorBinding:"FormDatePicker",rendererComponent:ee.FormDatePicker,rendererBinding:"FormDatePicker",control:{popoverContent:"Collect a date or date/time",order:5,group:"Input Fields",label:"Date Picker",component:"FormDatePicker","editor-component":"FormDatePicker","editor-control":"FormDatePicker",config:{icon:"far fa-calendar-alt",label:"New Date Picker",type:"datetime",name:"",placeholder:"",minDate:"",maxDate:""},inspector:[{type:"FormInput",field:"minDate",config:{name:"Minimum Date",label:"Minimum Date",validation:"date_or_mustache"}},{type:"FormInput",field:"maxDate",config:{name:"Maximum Date",label:"Maximum Date",validation:"after_min_date|date_or_mustache"}},Qt,Wr,eP,Hi,Bn,xa,ui,li,ad,Hn]}},{editorComponent:qi,editorBinding:"FormButton",rendererComponent:qi,rendererBinding:"FormButton",control:{popoverContent:"Add special buttons that link between subpages within this Form",order:1,group:"Navigation",label:"Page Navigation",component:"FormButton","editor-component":"FormButton","editor-control":"PageNavigation",config:{icon:"far fa-compass",label:"Page Navigation",variant:"primary",event:"pageNavigate",eventData:null},inspector:[{type:"PageSelect",field:"eventData",config:{label:"Destination Screen",helper:"The destination page to navigate to"}},rg,sl]}},{editorComponent:bu,editorBinding:"FormMultiColumn",rendererComponent:bu,rendererBinding:"FormMultiColumn",control:{popoverContent:"Organize and group your content in columns",order:2,group:"Content Fields",label:"Multicolumn / Table",component:"FormMultiColumn","editor-component":"MultiColumn","editor-control":"MultiColumn",container:!0,items:[[],[]],config:{icon:"fas fa-table",options:[{value:"1",content:"6"},{value:"2",content:"6"}]},inspector:[{type:"ContainerColumns",field:"options",config:{label:"Column Width",validation:"columns-adds-to-12"}},ui,li]}},{editorComponent:ws,editorBinding:"FormLoop",rendererComponent:ws,rendererBinding:"FormLoop",control:{popoverContent:"Add a repeatable section of content",order:5,group:"Content Fields",label:"Loop",component:"FormLoop","editor-component":"Loop","editor-control":"Loop",container:!0,items:[],config:{name:"",icon:"fas fa-redo",settings:{type:"new",varname:"loop",times:"3",add:!1}},inspector:[{type:"LoopInspector",field:"settings",config:{}}]}},{editorComponent:gu,editorBinding:"FormText",rendererComponent:vu,rendererBinding:"FormRecordList",control:{popoverContent:"Format content in a table structure and allow for adding rows",order:4,group:"Content Fields",label:"Record List",component:"FormRecordList","editor-component":"FormText","editor-control":"FormRecordList",config:{name:"",icon:"fas fa-th-list",label:"New Record List",editable:!1,fields:{dataSource:ei.provideData,jsonData:""},form:""},inspector:[Qt,{type:"FormInput",field:"label",config:{label:"List Label",helper:"The label describes this record list"}},{type:"FormCheckbox",field:"editable",config:{label:"Editable?",helper:"Should records be editable/removable and can new records be added"}},{type:"ColumnSetup",field:"fields",config:{label:"Columns",helper:"List of columns to display in the record list"}},{type:"PageSelect",field:"form",config:{label:"Record Form",helper:"The form to use for adding/editing records"}},ui,li]}},{editorComponent:Kn,editorBinding:"FormImage",rendererComponent:Kn,rendererBinding:"FormImage",control:{popoverContent:"Upload an image to your screen",order:3,group:"Content Fields",label:"Image",component:"FormImage","editor-component":"FormImage","editor-control":"FormImage",config:{label:"Image",icon:"fas fa-image",variant:"primary",event:"submit",name:null,value:null,renderImage:!1},inspector:[{type:"FormInput",field:"name",config:{label:"Name",helper:"Image name"}},{type:"ImageUpload",field:"image",config:{label:"Upload",helper:"Upload image"}},{type:"ImageVariable",field:"imageName",config:{label:"Render from a variable name",helper:null}},{type:"FormInput",field:"height",config:{label:"Height",helper:"Image height",type:"number"}},{type:"FormInput",field:"width",config:{label:"Width",helper:"image width",type:"number"}}]}},{editorComponent:yn,editorBinding:"FormAvatar",rendererComponent:yn,rendererBinding:"FormAvatar",control:{popoverContent:"User avatar",order:3,group:"Dashboards",label:"User Avatar",component:"FormAvatar","editor-component":"FormAvatar","editor-control":"FormAvatar",config:{label:"User Avatar",icon:"fas fa-user-circle",variant:"primary",event:"submit",name:null,value:null,renderImage:!1},inspector:[{type:"FormInput",field:"height",config:{label:"Height",helper:"Avatar height",type:"number"}},{type:"FormInput",field:"width",config:{label:"Width",helper:"Avatar width",type:"number"}}]}},{editorComponent:qi,editorBinding:"FormSubmit",rendererComponent:qi,rendererBinding:"FormButton",control:{popoverContent:"Add an action to submit your form or update a field",order:3,group:"Input Fields",label:"Submit Button",component:"FormButton","editor-component":"FormButton","editor-control":"FormSubmit",config:{icon:"fas fa-share-square",label:"New Submit",variant:"primary",event:"submit",loading:!1,loadingLabel:"Loading...",defaultSubmit:!0,name:null,fieldValue:null,tooltip:{}},inspector:[{type:"FormInput",field:"label",config:{label:"Label",helper:"The label describes the button's text"}},{type:"FormInput",field:"name",config:{label:"Variable Name",name:"Variable Name",helper:"A variable name is a symbolic name to reference information.",validation:"regex:/^(?:[A-Za-z])(?:[0-9A-Z_.a-z])*(?<![.])$/|not_in:"+al}},ag,sg,og,ng,{type:"FormInput",field:"fieldValue",config:{label:"Value",helper:"The value being submitted"}},sl]}},{editorComponent:Ps,editorBinding:"FormNestedScreen",rendererComponent:Ps,rendererBinding:"FormNestedScreen",control:{popoverContent:"Add and reuse another Form within this Form",order:6,group:"Content Fields",label:"Nested Screen",component:"FormNestedScreen","editor-component":"FormNestedScreen","editor-control":"FormNestedScreen",config:{label:"Nested Screen",icon:"fas fa-file-invoice",variant:"primary",name:"Nested Screen",value:null},inspector:[{type:"ScreenSelector",field:"screen",config:{label:"Screen",name:"SelectScreen","validate-nested":!1,helper:"Select a screen"}}]}},{rendererComponent:bn,rendererBinding:"FileUpload",builderComponent:bn,builderBinding:"FileUpload",control:{group:"Files",popoverContent:"Collect files uploaded into the Form",order:1,label:"File Upload",component:"FileUpload","editor-component":"FileUpload","editor-control":"FileUpload",config:{label:"New File Upload",icon:"fas fa-file-upload"},inspector:[Qt,{type:"FormInput",field:"label",config:{label:"Label",helper:"The label describes the field's name"}},{type:"MultipleUploadsCheckbox",field:"multipleUpload",config:{label:"Upload multiple files"}},{type:"FormInput",field:"accept",config:{label:"File Accepted",helper:"Common file types: application/msword, image/gif, image/jpeg, application/pdf, application/vnd.ms-powerpoint, application/vnd.ms-excel, text/plain"}},{type:"RequiredCheckbox",field:"validation",config:{label:"Required",helper:"Prevent form from being submitted unless a file is uploaded"}}]}},{rendererComponent:gu,rendererBinding:"FormText",builderComponent:eo,builderBinding:"FileDownload",control:{popoverContent:"Offer a File download",order:2,group:"Files",label:"File Download",component:"FileDownload","editor-component":"FormText","editor-control":"FileDownload",config:{label:"New File Download",icon:"fas fa-file-download"},inspector:[{type:"FormInput",field:"label",config:{label:"Label",helper:"The text to display"}},{type:"FormInput",field:"name",config:{label:"Name",helper:"The name of the Download"}}]}},{rendererComponent:ee.BFormComponent,rendererBinding:"BFormComponent",builderComponent:ee.BFormComponent,builderBinding:"BFormComponent",control:{popoverContent:"Add one of several Bootstrap Vue components",order:1,group:"Advanced",label:"Bootstrap Component",component:"BFormComponent","editor-component":"BFormComponent","editor-control":"BFormComponent",config:{bootstrapComponent:"b-form-tags",bootstrapConfig:"{}",label:"New Bootstrap Component",icon:"fab fa-bootstrap"},inspector:[Qt,Wr,{type:"FormMultiselect",field:"bootstrapComponent",config:{icon:"fas",label:"Bootstrap vue component",validation:"required",options:[{value:"b-embed",content:"Embed"},{value:"b-img",content:"Image"},{value:"b-form-rating",content:"Form Rating"},{value:"b-form-spinbutton",content:"Form Spinbutton"},{value:"b-form-tags",content:"Form Tags"},{value:"b-form-timepicker",content:"Form Timepicker"},{value:"b-table",content:"Table"}]}},{type:"FormTextArea",field:"bootstrapConfig",config:{rows:5,label:"Config",helper:"Properties in JSON format. See https://bootstrap-vue.org/docs/components",value:"{}"}},Hi]}},{rendererComponent:ee.BWrapperComponent,rendererBinding:"BWrapperComponent",builderComponent:ee.BWrapperComponent,builderBinding:"BWrapperComponent",control:{popoverContent:"Wrap an existing subpage within this Form into a Bootstrap Vue component",order:2,group:"Advanced",label:"Bootstrap Wrapper",component:"BWrapperComponent","editor-component":"BWrapperComponent","editor-control":"BWrapperComponent",config:{bootstrapComponent:"b-modal",bootstrapConfig:"{}",label:"New Bootstrap Wrapper",icon:"fab fa-bootstrap",name:"",form:""},inspector:[Qt,Wr,{type:"FormMultiselect",field:"bootstrapComponent",config:{icon:"fas",label:"Bootstrap vue component",validation:"required",options:[{value:"b-alert",content:"Alert"},{value:"b-card",content:"Card"},{value:"b-collapse",content:"Collapse"},{value:"b-jumbotron",content:"Jumbotron"},{value:"b-modal",content:"Modal"}]}},{type:"PageSelect",field:"form",config:{label:"Page",helper:"The page to use inside the component"}},{type:"FormTextArea",field:"bootstrapConfig",config:{rows:5,label:"Config",helper:"Properties in JSON format. See https://bootstrap-vue.org/docs/components",value:"{}"}}]}},{editorComponent:Ss,editorBinding:"FormListTable",rendererComponent:Ss,rendererBinding:"FormListTable",control:{popoverContent:"Create List Table",order:6.5,group:"Dashboards",label:"List Table",component:"FormListTable","editor-component":"FormListTable","editor-control":"FormListTable",config:{label:"List Table",icon:"fas fa-list",variant:"primary"},inspector:[{type:"FormMultiselect",field:"listOption",config:{icon:"fas fa-list",label:"List Table",options:[{value:"My Tasks",content:"My Tasks"},{value:"My Requests",content:"My Cases"},{value:"Start New Request",content:"Start New Case"}]}}]}},{editorComponent:ks,editorBinding:"FormAnalyticsChart",rendererComponent:ks,rendererBinding:"FormAnalyticsChart",control:{popoverContent:"Add a chart from the Analytics Reports",order:6,group:"Dashboards",label:"Analytics Chart",component:"FormAnalyticsChart","editor-component":"FormAnalyticsChart","editor-control":"FormAnalyticsChart",config:{label:"Analytics Chart",icon:"fas fa-chart-area",variant:"primary"},inspector:[{type:"AnalyticsSelector",field:"listChartOption",config:{label:"Chart"}}]}},{editorComponent:Ts,editorBinding:"LinkButton",rendererComponent:Ts,rendererBinding:"LinkButton",control:{popoverContent:"Add a URL where this link should redirect",group:"Content Fields",order:6,label:"Link URL",component:"LinkButton","editor-component":"LinkButton","editor-control":"LinkButton",config:{label:"New Link",icon:"fas fa-link",variant:"primary",event:"link"},inspector:[{type:"FormInput",field:"label",config:{label:"Label",helper:"The label describes the button's text"}},{type:"FormInput",field:"linkUrl",config:{label:"Link URL",helper:"Type here the URL link. Mustache syntax is supported."}},sl]}}],mK="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgxIiBoZWlnaHQ9IjI4MCIgdmlld0JveD0iMCAwIDI4MSAyODAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik04NS4wNTYyIDczLjg4NkM4NS4wNTYyIDczLjg4NiAxMTUuMDggOTYuNjcgMTYwLjcyNCA1NC4wNjhDMjAxLjI2IDE2LjIzNDMgMjM0LjM1OSA3NS45Mjc1IDIzNC41OSAxMDQuNTEzQzIzNC44OSAxNDEuNTQzIDE5NC4wNTQgMTcxLjE3MyAyMTMuODcyIDE5NS40OTVDMjMzLjY5IDIxOS44MTcgMTc0LjU3IDI1OS45ODEgMTQyLjcwOCAyMjUuMjIyQzEwMy4wNzIgMTgxLjk4MyA5Mi4zMzQ1IDIxNy4xMTQgNjkuNzQyNSAyMTcuMTE0QzUzLjUyNzggMjE3LjExNCAyMC4yMzc2IDE3Ni44MjUgNDIuNzE4MSAxNDYuODUxQzYxLjYzNTIgMTIxLjYyOSA1MS4zMTgyIDExMy4yNTggNDYuMzIyIDEwNC41MTNDMzkuMTE0OSA5MS45MDIxIDU2LjIzMDQgNTcuNjcxNSA4NS4wNTYyIDczLjg4NloiIGZpbGw9IiNERUVFRkEiLz4KPHBhdGggZD0iTTIwNS41OTIgMTI0LjIzNUMyMDcuMjA2IDEyNC44MzUgMjA4Ljk2OSAxMjQuODc1IDIxMC42NDcgMTI0LjQ4OUMyMTcuNjc3IDEyMi44NzYgMjQxLjg1IDExOC42MDMgMjM3LjY1IDEzNy4zMzVDMjM2LjczNSAxNDEuMDUx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NTAzIDE2OS41NzEgMTQ2LjYzNyAxNjkuMjUzIDE0Ni44NyAxNjkuMDE0QzE0Ny4xMDMgMTY4Ljc3NSAxNDcuNDE3IDE2OC42MzMgMTQ3Ljc1IDE2OC42MTVWMTY4LjYxNVoiIGZpbGw9IiM1MkE1RUMiLz4KPHBhdGggZD0iTTE1NC4zMjIgMTYzLjMxN0MxNTUuMTc0IDE2Mi42OTEgMTU2LjQ2MyAxNjMuMDQyIDE1Ny4yNDMgMTY0LjExMkwxNzEuMTAzIDE4My4xMUMxNzEuOTMxIDE4NC4yNDUgMTcxLjg2NyAxODUuNzQ0IDE3MC45NjMgMTg2LjQwOEwxNjkuNzAzIDE4Ny4zMzNDMTY4Ljc5OSAxODcuOTk3IDE2Ny40MTggMTg3LjU1OCAxNjYuNjY2IDE4Ni4zNjhMMTU0LjA2NSAxNjYuNDQ0QzE1My4zNTcgMTY1LjMyMyAxNTMuNDcgMTYzLjk0MyAxNTQuMzIyIDE2My4zMTdaIiBmaWxsPSIjNTJBNUVDIi8+Cjwvc3ZnPgo=",Cre="",vK={data(){return{title:"We're Sorry",message:"An error has occurred. Please try again. If the problem persists, please contact your administrator."}}};var gK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"simple-error-message-main"},[e._m(0),r("p",[r("span",{staticClass:"simple-error-message-title"},[e._v(" "+e._s(e.$t(e.title))+" ")])]),r("p",[r("span",{staticClass:"simple-error-message-message"},[e._v(e._s(e.$t(e.message)))])])])},bK=[function(){var t=this,e=t._self._c;return e("p",[e("img",{staticClass:"simple-error-message-icon",attrs:{src:mK}})])}],yK=oe(vK,gK,bK,!1,null,null,null,null);const xK=yK.exports,Mre="",wK={components:{simpleErrorMessage:xK,VueFormRenderer:Ua},props:{initialTaskId:{type:Number,default:null},initialScreenId:{type:Number,default:null},initialRequestId:{type:Number,default:null},initialProcessId:{type:Number,default:null},initialNodeId:{type:String,default:null},userId:{type:Number,default:null},csrfToken:{type:String,default:null},value:{type:Object,default:()=>{}},beforeLoadTask:{type:Function,default:()=>new Promise(t=>{t()})},initialLoopContext:{type:String,default:""},taskPreview:{type:Boolean,default:!1},loading:{type:Number,default:null},alwaysAllowEditing:{type:Boolean,default:!1},disableInterstitial:{type:Boolean,default:!1},waitLoadingListeners:{type:Boolean,default:!1}},data(){return{task:null,taskId:null,request:null,requestId:null,screen:null,screenId:null,renderComponent:"task-screen",processId:null,nodeId:null,disabled:!1,socketListeners:[],requestData:{},hasErrors:!1,refreshScreen:0,redirecting:null,loadingButton:!1,loadingTask:!1,loadingListeners:this.waitLoadingListeners,isSelfService:!1}},watch:{initialScreenId:{handler(){this.screenId=this.initialScreenId}},initialRequestId:{handler(){this.requestId=this.initialRequestId}},initialProcessId:{handler(){this.processId=this.initialProcessId}},initialNodeId:{handler(){this.nodeId=this.initialNodeId}},screenId:{handler(){this.screenId&&this.loadScreen(this.screenId)}},requestId:{handler(){this.requestId?(this.setMetaValue(),this.initSocketListeners()):this.unsubscribeSocketListeners()}},value:{handler(){this.requestData=this.value}},screen:{handler(){if(this.screen&&this.renderComponent!=="ConversationalForm")if(this.screen.type==="CONVERSATIONAL")this.renderComponent="ConversationalForm";else{const t=G.get(this.screen,"_interstitial",!1);let e=G.get(this,"task.component","task-screen");(e===null||t)&&(e="task-screen"),this.renderComponent=e}}}},computed:{shouldAddSubmitButton(){return this.task?this.task.bpmn_tag_name==="manualTask"||!this.task.screen&&this.task.element_type!=="startEvent":!1},showTaskIsCompleted(){return this.task&&this.task.advanceStatus==="completed"&&!this.screen},screenTypeClass(){return this.screen?this.screen.type.toLowerCase()+"-screen":void 0},parentRequest(){return G.get(this.task,"process_request.parent_request_id",null)}},methods:{disableForm(t){if(t instanceof Array)for(let e of t)e.component==="FormButton"&&e.config.event==="submit"?t.splice(t.indexOf(e),1):this.disableForm(e);return t.config!==void 0&&(t.config.disabled=!0),t.items!==void 0&&this.disableForm(t.items),t},showSimpleErrorMessage(){this.renderComponent="simpleErrorMessage"},loadScreen(t){let e="?include=nested";this.requestId&&(e+="&request_id="+this.requestId),this.$dataProvider.getScreen(t,e).then(r=>{this.screen=r.data})},reload(){this.taskId?this.loadTask():this.loadNextAssignedTask()},loadTask(){if(!this.taskId)return;const t=`/${this.taskId}?include=data,user,draft,requestor,processRequest,component,screen,requestData,loopContext,bpmnTagName,interstitial,definition,nested,userRequestPermission,elementDestination`;return window.ProcessMaker&&window.ProcessMaker.packages&&window.ProcessMaker.packages.includes("package-vocabularies")&&(window.ProcessMaker.VocabulariesSchemaUrl=`vocabularies/task_schema/${this.taskId}`),this.beforeLoadTask(this.taskId,this.nodeId).then(()=>{this.$dataProvider.getTasks(t).then(e=>{if(this.task=e.data,this.linkTask(),this.checkTaskStatus(),window.PM4ConfigOverrides&&window.PM4ConfigOverrides.getScreenEndpoint&&window.PM4ConfigOverrides.getScreenEndpoint.includes("tasks/")){const r=window.PM4ConfigOverrides.getScreenEndpoint.split("/");r[1]=this.task.id,window.PM4ConfigOverrides.getScreenEndpoint=r.join("/")}}).catch(()=>{this.hasErrors=!0}).finally(()=>{this.loadingTask=!1})})},linkTask(){this.nodeId=this.task.element_id,this.listenForParentChanges(),this.task.process_request.status==="COMPLETED"&&(this.taskPreview||this.$emit("completed",this.task.process_request.id)),this.taskPreview&&this.task.status==="CLOSED"&&(this.task.interstitial_screen._interstitial=!1,this.alwaysAllowEditing||(this.task.screen.config=this.disableForm(this.task.screen.config)),this.screen=this.task.screen)},prepareTask(){(!this.loadingButton||this.task.status==="ACTIVE")&&(this.resetScreenState(),this.requestData=G.get(this.task,"request_data",{}),this.loopContext=G.get(this.task,"loop_context",""),this.task.draft&&(this.requestData=G.merge({},this.requestData,this.task.draft.data)),this.refreshScreen++),this.$emit("task-updated",this.task),this.task.process_request.status==="ERROR"?(this.hasErrors=!0,this.$emit("error",this.requestId)):this.hasErrors=!1},resetScreenState(){this.loadingButton=!1,this.disabled=!1,this.$refs.renderer&&this.$refs.renderer.$children[0]&&(this.$refs.renderer.$children[0].currentPage=0,this.$refs.renderer.restartValidation())},checkTaskStatus(){this.task.status=="COMPLETED"||this.task.status=="CLOSED"||this.task.status=="TRIGGERED"?this.closeTask():this.screen=this.task.screen,this.prepareTask()},setSelfService(){this.$nextTick(()=>{window.ProcessMaker.isSelfService?this.isSelfService=!0:this.isSelfService=!1})},closeTask(t=null){this.hasErrors&&this.emitError(),this.shouldLoadNextTask()?this.loadNextAssignedTask(t):this.task.allow_interstitial?this.showInterstitial(t):this.taskPreview||this.emitClosedEvent()},shouldLoadNextTask(){return this.task.process_request.status==="COMPLETED"||this.loadingButton},showInterstitial(t){this.task.interstitial_screen._interstitial=!0,this.screen=this.task.interstitial_screen,this.loadNextAssignedTask(t)},emitError(){this.$emit("error",this.requestId)},async emitClosedEvent(){var t;this.$emit("closed",(t=this.task)==null?void 0:t.id,await this.getDestinationUrl())},async getDestinationUrl(){const{elementDestination:t,allow_interstitial:e}=this.task||{};if(!t)return null;if(t.type==="taskSource")try{const a={processRequestId:this.requestId,status:"ACTIVE",userId:this.userId},s=(await this.retryApiCall(()=>this.getTasks(a))).data.data[0];return e&&(s==null?void 0:s.user_id)===this.userId?`/tasks/${s.id}/edit`:this.getSessionRedirectUrl()}catch(a){return console.error("Error in getDestinationUrl:",a),null}const r=t.value;return r?(sessionStorage.setItem("sessionUrlActionBlocker",document.referrer),r):sessionStorage.getItem("elementDestinationURL")||null},getSessionRedirectUrl(){const t=sessionStorage.getItem("sessionUrlSelfService");return t?(sessionStorage.removeItem("sessionUrlSelfService"),t):document.referrer||"/tasks"},loadNextAssignedTask(t=null){if(t||(t=this.requestId),!this.userId)return;const e=window.Cypress?"":`&t=${Date.now()}`,r=`?user_id=${this.userId}&status=ACTIVE&process_request_id=${t}&include_sub_tasks=1${e}`;return this.$dataProvider.getTasks(r).then(i=>{if(i.data.data.length>0){let a=i.data.data[0];if(a.process_request_id!==this.requestId){if(this.redirecting===a.process_request_id)return;this.unsubscribeSocketListeners(),this.redirecting=a.process_request_id,this.$emit("redirect",a.id,!0);return}else this.emitIfTaskCompleted(t);this.taskId=a.id,this.nodeId=a.element_id,this.loadTask()}else this.parentRequest&&["COMPLETED","CLOSED"].includes(this.task.process_request.status)&&this.$emit("completed",this.getAllowedRequestId())})},emitIfTaskCompleted(t){this.task&&this.parentRequest&&t==this.task.process_request_id&&this.task.process_request.status==="COMPLETED"&&this.$emit("completed",this.parentRequest)},classHeaderCard(t){let e="bg-success";switch(t){case"completed":e="bg-secondary";break;case"overdue":e="bg-danger";break}return"card-header text-capitalize text-white "+e},afterSubmit(){this.$emit("after-submit",...arguments)},submit(t=null,e=!1,r=null){var i,a;this.disabled||(this.disabled=!0,t&&this.onUpdate(Object.assign({},this.requestData,t)),e?this.loadingButton=!0:this.loadingButton=!1,this.$emit("submit",this.task,e,r),(i=this.task)!=null&&i.allow_interstitial&&!this.loadingButton&&!this.disableInterstitial&&(this.task.interstitial_screen._interstitial=!0,this.screen=this.task.interstitial_screen),((a=this.task)==null?void 0:a.bpmn_tag_name)==="manualTask"&&(this.checkTaskStatus(),this.reload()))},onUpdate(t){this.$emit("input",t),this.setSelfService()},activityAssigned(){},processCompleted(t=null){let e;this.parentRequest&&(e=this.getAllowedRequestId(),this.$emit("completed",e))},async retryApiCall(t,e=3,r=1e3){for(let i=0;i<e;i++)try{return await t()}catch(a){if(i===e-1)throw a;await new Promise(n=>{setTimeout(n,r)})}},getNextRequest(t,e){return window.ProcessMaker.apiClient.post(`/process_events/${t}?event=${e}`,{})},getTasks(t){const e={user_id:this.userId,process_request_id:t.processRequestId,page:t.page||1,per_page:t.perPage||1,status:t.status},r=new URLSearchParams(e).toString();return this.$dataProvider.getTasks(`?${r}`)},parseJsonSafely(t){try{return JSON.parse(t)}catch(e){return console.error("Invalid JSON string:",e),null}},async processCompletedRedirect(t,e,r){try{if(t.endEventDestination.type!=="anotherProcess"){t!=null&&t.endEventDestination.value?window.location.href=t==null?void 0:t.endEventDestination.value:window.location.href=`/requests/${this.requestId}`;return}const i=this.parseJsonSafely(t.endEventDestination.value),n={processRequestId:(await this.retryApiCall(()=>this.getNextRequest(i.processId,i.startEvent))).data.id,status:"ACTIVE",page:1,perPage:1},o=(await this.retryApiCall(()=>this.getTasks(n))).data.data[0];o&&o.user_id===e?this.redirectToTask(o.id):this.redirectToRequest(r)}catch(i){console.error("Error processing completed redirect:",i),this.$emit("completed",r)}},getAllowedRequestId(){const e=(this.task.user_request_permission||[]).find(i=>i.process_request_id===this.parentRequest);return e&&e.allowed?this.parentRequest:this.requestId},redirectToTask(t){this.$emit("redirect",t)},redirectToRequest(t){window.location.href=`/requests/${t}`},initSocketListeners(){this.addProcessUpdateListener(),this.addRedirectListener(),this.loadingListeners=!1,this.taskId||this.reload()},addProcessUpdateListener(){this.addSocketListener(`updated-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.requestId}`,".ProcessUpdated",t=>this.handleProcessUpdate(t))},handleProcessUpdate(t){t.event==="ACTIVITY_EXCEPTION"&&(this.$emit("error",this.requestId),window.location.href=`/requests/${this.requestId}`)},addRedirectListener(){this.addSocketListener(`redirect-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.requestId}`,".RedirectTo",t=>this.handleRedirect(t))},handleRedirect(t){switch(t.method){case"redirectToTask":this.handleRedirectToTask(t);break;case"processUpdated":this.handleProcessUpdated(t);break;case"processCompletedRedirect":this.processCompletedRedirect(t.params[0],this.userId,this.requestId);break;default:this.handleDefaultRedirect(t)}},async handleRedirectToTask(t){var e;if((e=t==null?void 0:t.params[0])!=null&&e.tokenId){if(this.loadingTask=!0,this.task&&!(this.task.allow_interstitial||this.isSameUser(this.task,t))){window.location.href=await this.getDestinationUrl();return}this.nodeId=t.params[0].nodeId,this.taskId=t.params[0].tokenId,this.reload()}},isSameUser(t,e){var a,n,s;const r=((a=t.user)==null?void 0:a.id)===e.params[0].userId,i=((n=t.elementDestination)==null?void 0:n.type)===null||((s=t.elementDestination)==null?void 0:s.type)==="taskSource";return r&&i},handleProcessUpdated(t){var r,i,a,n;const e=(r=this.task.elementDestination)==null?void 0:r.value;if(e&&((i=t==null?void 0:t.params[0])==null?void 0:i.tokenId)===this.taskId&&((a=t==null?void 0:t.params[0])==null?void 0:a.requestStatus)==="ACTIVE"){window.location.href=e;return}["ACTIVITY_ACTIVATED","ACTIVITY_COMPLETED"].includes(t.event)&&t.elementType==="task"&&((n=this.task.elementDestination)!=null&&n.type||(this.taskId=t.taskId),this.reload()),t.event==="ACTIVITY_EXCEPTION"&&this.$emit("error",this.requestId)},handleDefaultRedirect(t){console.warn("redirect",t),window.location.href=`/requests/${this.requestId}`},existsEventMessage(t,e){return sessionStorage.getItem(t)?!0:(sessionStorage.setItem(t,e),!1)},listenForParentChanges(){this.parentRequest&&this.addSocketListener(`parent-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.parentRequest}`,".ProcessUpdated",t=>{["ACTIVITY_ACTIVATED"].includes(t.event)&&this.closeTask(this.parentRequest),["ACTIVITY_COMPLETED"].includes(t.event)&&this.task.process_request.status==="COMPLETED"&&this.processCompleted(),t.event==="ACTIVITY_EXCEPTION"&&this.$emit("error",this.requestId)})},addSocketListener(t,e,r,i){t in this.socketListeners||(this.socketListeners[t]={channel:e,event:r},window.Echo.private(e).listen(r,a=>{i(a)}))},unsubscribeSocketListeners(){Object.values(this.socketListeners).forEach(t=>{window.Echo.private(t.channel).stopListening(t.event)}),this.socketListeners={}},obtainPayload(t){return new Promise(e=>{window.ProcessMaker.apiClient.get(t).then(r=>{e(r.data)}).catch(()=>{})})},setMetaValue(){const t=document.head.querySelector('meta[name="request-id"]');t&&t.setAttribute("content",this.requestId)},hasUrlActionBlocker(){var e;const t=sessionStorage.getItem("sessionUrlActionBlocker");return t?(sessionStorage.removeItem("sessionUrlActionBlocker"),this.$emit("closed",(e=this.task)==null?void 0:e.id,t),!0):!1}},mounted(){this.screenId=this.initialScreenId,this.taskId=this.initialTaskId,this.requestId=this.initialRequestId,this.processId=this.initialProcessId,this.nodeId=this.initialNodeId,this.requestData=this.value,this.loopContext=this.initialLoopContext,this.loadTask()},destroyed(){this.unsubscribeSocketListeners()}};var PK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"tab-pane active show h-100",attrs:{id:"tab-form",role:"tabpanel","aria-labelledby":"tab-form"}},[e.screen?[r("b-overlay",{attrs:{show:e.disabled||e.isSelfService,id:"overlay-background",variant:e.isSelfService?"white":"transparent",blur:null,cardStyles:"pointer-events: none;pointer-events: none;inset: 1px",rounded:"sm"},scopedSlots:e._u([{key:"overlay",fn:function(){return[r("div",{staticClass:"text-center"},[e.isSelfService?r("p",[e._v("Please claim this task to continue.")]):e._e()])]},proxy:!0}],null,!1,2076353390)},[r("div",{staticClass:"card card-body border-top-0 h-100",class:e.screenTypeClass},[e.renderComponent==="task-screen"?r("div",[r("vue-form-renderer",{key:e.refreshScreen,ref:"renderer",class:{loading:e.loadingTask||e.loadingListeners},attrs:{config:e.screen.config,computed:e.screen.computed,"custom-css":e.screen.custom_css,watchers:e.screen.watchers,"loop-context":e.loopContext},on:{update:e.onUpdate,"after-submit":e.afterSubmit,submit:e.submit},model:{value:e.requestData,callback:function(i){e.requestData=i},expression:"requestData"}})],1):r("div",[r(e.renderComponent,{tag:"component",attrs:{"process-id":e.processId,"instance-id":e.requestId,"token-id":e.taskId,screen:e.screen.config,"csrf-token":e.csrfToken,computed:e.screen.computed,"custom-css":e.screen.custom_css,watchers:e.screen.watchers,data:e.requestData,type:e.screen.type},on:{"after-submit":e.afterSubmit,submit:e.submit}})],1)]),e.shouldAddSubmitButton?r("div",{staticClass:"card-footer"},[r("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(i){return e.submit(null)}}},[e._v(" "+e._s(e.$t("Complete Task"))+" ")])]):e._e()])]:e._e(),e.showTaskIsCompleted?[r("div",{staticClass:"card card-body text-center"},[r("h1",[e._v(" "+e._s(e.$t("Task Completed"))+" "),r("i",{staticClass:"fas fa-clipboard-check"})])])]:e._e()],2)},SK=[],kK=oe(wK,PK,SK,!1,null,"8a63a82f",null,null);const rP=kK.exports,Are="",TK={name:"Loop",components:{draggable:Di,FormInput:ee.FormInput,FormSelectList:ee.FormSelectList,FormCheckbox:ee.FormCheckbox,FormTextArea:ee.FormTextArea,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},mixins:[vn],props:["value","name","config","selected","validationErrors"],data(){return{items:[],cancelledJobs:[]}},watch:{value:{handler(){this.items=this.value},immediate:!0},items(){this.$emit("input",this.items)}},mounted(){!localStorage.getItem("cancelledJobs")||localStorage.getItem("cancelledJobs")==="null"?this.cancelledJobs=[]:this.cancelledJobs=JSON.parse(localStorage.getItem("cancelledJobs")),this.$root.$on("ai-form-generated",(t,e)=>{this.previewAiChanges(t,e)}),this.$root.$on("ai-form-progress-updated",(t,e)=>{this.updateProgress(t,e)})},methods:{hasError(t){return this.validationErrors?this.validationErrors.some(({item:e})=>e===t):!1},inspect(t){this.$emit("inspect",t)},deleteItem(t){this.items.splice(t,1),this.$emit("update-state")},duplicateItem(t){const e=G.cloneDeep(this.items[t]);this.items.push(e),this.$emit("update-state")},isAiSection(t){return t.component==="AiSection"},aiPreview(t){return t.items&&t.items[0]&&t.items[0].length},applyAiChanges(t){this.$root.$emit("apply-ai-changes",t)},previewAiChanges(t,e){this.value.forEach(r=>{r.component==="AiSection"&&e===r.config.aiConfig.nonce&&this.$set(r,"items",JSON.parse(JSON.stringify(t)))})},updateProgress(t,e){this.value.forEach(r=>{if(r.component==="AiSection"&&e===r.config.aiConfig.nonce){if(this.cancelledJobs.some(i=>i===e))return;this.$set(r.config.aiConfig,"progress",t)}})}}};var CK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"column-draggable",attrs:{selector:e.config.customCssSelector}},[r("draggable",{staticStyle:{"min-height":"80px"},attrs:{list:e.items,group:"controls"}},e._l(e.items,function(i,a){return r("div",{key:a,staticClass:"control-item",class:{selected:e.selected===i,hasError:e.hasError(i)},on:{click:function(n){return n.stopPropagation(),e.inspect(i)}}},[i.container?r("div",{on:{click:function(n){return n.stopPropagation(),e.inspect(i)}}},[r("div",{staticClass:"m-2 card border-0",class:{"ai-section-card":e.isAiSection(i)&&e.selected===i}},[e.selected===i?r("div",{staticClass:"card-header form-element-header d-flex align-items-center border rounded",class:{pulse:e.isAiSection(i)}},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),i.config.icon?r("i",{staticClass:"mr-2 ml-1",class:i.config.icon}):e._e(),e._v(" "+e._s(i.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(i)&&e.aiPreview(i)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{title:e.$t("Apply Changes")},on:{click:function(n){return e.applyAiChanges(i)}}},[e._v(" "+e._s(e.$t("Apply Changes"))+" ")]):e._e(),e.isAiSection(i)&&e.aiPreview(i)?e._e():r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(n){return e.duplicateItem(a)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(n){return e.deleteItem(a)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(i["editor-component"],{tag:"component",staticClass:"mb-3 mr-3 ml-3",class:e.elementCssClass(i),attrs:{"validation-errors":e.validationErrors,selected:e.selected,"ai-element":i,config:i.config},on:{inspect:e.inspect,"update-state":function(n){return e.$emit("update-state")}},model:{value:i.items,callback:function(n){e.$set(i,"items",n)},expression:"element.items"}})],1)]):r("div",{attrs:{id:i.config.name?i.config.name:void 0}},[r("div",{staticClass:"m-2",class:{card:e.selected===i}},[e.selected===i?r("div",{staticClass:"card-header form-element-header d-flex align-items-center"},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),i.config.icon?r("i",{staticClass:"mr-2 ml-1",class:i.config.icon}):e._e(),e._v(" "+e._s(i.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(n){return e.duplicateItem(a)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(n){return e.deleteItem(a)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(i["editor-component"],e._b({tag:"component",staticClass:"p-3",class:[e.elementCssClass(i),{"prevent-interaction":!i.config.interactive}],attrs:{tabindex:i.config.interactive?0:-1,config:i.config},on:{input:function(n){i.config.interactive&&(i.config.content=n)}}},"component",i.config,!1))],1)])])}),0)],1)},MK=[],DK=oe(TK,CK,MK,!1,null,"06c4d69f",null,null);const iP=DK.exports,zre="",AK=1,zK={name:"MultiColumn",components:{draggable:Di,FormInput:ee.FormInput,FormSelectList:ee.FormSelectList,FormCheckbox:ee.FormCheckbox,FormTextArea:ee.FormTextArea,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},mixins:[vn],props:["value","name","config","selected","validationErrors"],data(){return{items:[],cancelledJobs:[]}},computed:{classContainer(){return this.items.length>0?"form-group":"column-draggable"}},watch:{value:{handler(){this.items=this.value},immediate:!0},items(){this.$emit("input",this.items)},"config.options":function(t){this.items=t.map((e,r)=>this.items[r]?this.items[r]:[])}},mounted(){!localStorage.getItem("cancelledJobs")||localStorage.getItem("cancelledJobs")==="null"?this.cancelledJobs=[]:this.cancelledJobs=JSON.parse(localStorage.getItem("cancelledJobs")),this.$root.$on("ai-form-generated",(t,e)=>{this.previewAiChanges(t,e)}),this.$root.$on("ai-form-progress-updated",(t,e)=>{this.updateProgress(t,e)})},methods:{hasError(t){return this.validationErrors.some(({item:e})=>e===t)},updateContainerConfig(t,e){this.items[e]=t,this.$emit("update-state")},classColumn(t){let e=AK;return this.config.options[t]&&this.config.options[t].content&&(e=this.config.options[t].content),`col-sm-${e}`},inspect(t){this.$emit("inspect",t)},deleteItem(t,e){this.items[t].splice(e,1),this.$emit("update-state")},duplicateItem(t,e){const r=G.cloneDeep(this.items[t][e]);this.items[t].push(r),this.$emit("update-state")},isAiSection(t){return t.component==="AiSection"},aiPreview(t){return t.items&&t.items[0]&&t.items[0].length},applyAiChanges(t){this.$root.$emit("apply-ai-changes",t)},previewAiChanges(t,e){this.value.forEach(r=>{r.forEach(i=>{i.component==="AiSection"&&e===i.config.aiConfig.nonce&&this.$set(i,"items",JSON.parse(JSON.stringify(t)))})})},updateProgress(t,e){this.value.forEach(r=>{r.forEach(i=>{if(i.component==="AiSection"&&e===i.config.aiConfig.nonce){if(this.cancelledJobs.some(a=>a===e))return;this.$set(i.config.aiConfig,"progress",t)}})})}}};var OK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"mb-1 mt-1 pb-0 pt-0",class:e.classContainer},[r("div",{attrs:{selector:e.config.customCssSelector}},[r("div",{staticClass:"row"},[e._l(e.items,function(i,a){return[r("draggable",{key:a,staticClass:"column-draggable",class:e.classColumn(a),attrs:{value:e.items[a],group:"controls"},on:{input:function(n){return e.updateContainerConfig(n,a)}},model:{value:e.items[a],callback:function(n){e.$set(e.items,a,n)},expression:"items[index]"}},e._l(i,function(n,s){return r("div",{key:s,staticClass:"control-item",class:{selected:e.selected===n,hasError:e.hasError(n)},on:{click:function(o){return o.stopPropagation(),e.inspect(n)}}},[n.container?r("div",{on:{click:function(o){return o.stopPropagation(),e.inspect(n)}}},[r("div",{staticClass:"m-2 card border-0",class:{"ai-section-card":e.isAiSection(n)&&e.selected===n}},[e.selected===n?r("div",{staticClass:"card-header form-element-header d-flex align-items-center border rounded",class:{pulse:e.isAiSection(n)}},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),n.config.icon?r("i",{staticClass:"mr-2 ml-1",class:n.config.icon}):e._e(),e._v(" "+e._s(n.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(n)&&e.aiPreview(n)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{title:e.$t("Apply Changes")},on:{click:function(o){return e.applyAiChanges(n)}}},[e._v(" "+e._s(e.$t("Apply Changes"))+" ")]):e._e(),e.isAiSection(n)&&e.aiPreview(n)?e._e():r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{"aria-label":e.$t("Duplicate")},on:{click:function(o){return e.duplicateItem(a,s)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(o){return e.deleteItem(a,s)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(n["editor-component"],{tag:"component",staticClass:"mb-3 mr-3 ml-3",class:e.elementCssClass(n),attrs:{"validation-errors":e.validationErrors,selected:e.selected,"ai-element":n,config:n.config},on:{inspect:e.inspect,"update-state":function(o){return e.$emit("update-state")}},model:{value:n.items,callback:function(o){e.$set(n,"items",o)},expression:"element.items"}})],1)]):r("div",{attrs:{id:n.config.name?n.config.name:void 0}},[r("div",{staticClass:"m-2",class:{card:e.selected===n}},[e.selected===n?r("div",{staticClass:"card-header form-element-header d-flex align-items-center"},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),n.config.icon?r("i",{staticClass:"mr-2 ml-1",class:n.config.icon}):e._e(),e._v(" "+e._s(n.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(o){return e.duplicateItem(a,s)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(o){return e.deleteItem(a,s)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(n["editor-component"],e._b({tag:"component",staticClass:"p-3",class:[e.elementCssClass(n),{"prevent-interaction":!n.config.interactive}],attrs:{tabindex:n.config.interactive?0:-1,config:n.config},on:{input:function(o){n.config.interactive&&(n.config.content=o)}}},"component",n.config,!1))],1)])])}),0)]})],2)])])},EK=[],jK=oe(zK,OK,EK,!1,null,"eaf6f1c4",null,null);const aP=jK.exports,NK={name:"default-loading-spinner"};var IK=function(){var e=this,r=e._self._c;return r("div",[e._v("Loading Data...")])},LK=[],FK=oe(NK,IK,LK,!1,null,null,null,null);const nP=FK.exports,BK=!0;function xu(t){let e=0;return typeof t!="object"||Object.entries(t).forEach(([r,i])=>{if(i){if(typeof i=="object"&&"$each"in i){e+=xu(i.$each.$iter);return}r!=="$iter"&&typeof i=="object"&&"$invalid"in i&&i.$invalid&&Number.isNaN(Number(r))&&e++,r!=="$iter"&&i&&(e+=xu(i))}}),e}const sP=async(t,e)=>{if(t.length===0)return;const r=ph(t[0]),i=[];t.forEach(n=>{r!==n&&i.push(n.loadValidationRules())}),await Promise.all(i);try{await r.loadValidationRules()}catch(n){console.warn("There was a problem rendering the screen",n)}const a=r.$v;if(a){let n=0,s="";a.$invalid&&(n+=xu(a.vdata),n+=xu(a.schema),s=n===1?"There is a validation error in your form.":"There are {{items}} validation errors in your form.",s=r.$t(s,{items:n})),e("basic",{key:"valid",value:!a.$invalid}),e("basic",{key:"message",value:s})}},HK=async(t,e)=>{t("basic",{key:"valid",value:!e.value}),t("disableSubmit",{key:"disableSubmit",value:e.value})},RK=G.debounce(sP,500),wu=[],qK=(t,e)=>{wu.includes(t)||wu.push(t),RK(wu,e)},oP={namespaced:BK,state:()=>({locked:!1,valid:!0,message:"",mode:"",submitted:!1,showValidationOnLoad:!1,disableSubmit:!1}),getters:{isValidScreen(t){return t.valid},getErrorMessage(t){return t.message},getMode(t){return t.mode},showValidationErrors(t){return t.showValidationOnLoad||t.submitted}},mutations:{basic(t,e){t[e.key]=e.value},setMode(t,e){t.mode=e},disableSubmit(t,e){t.disableSubmit=e.value,t.message=e.message}},actions:{restartValidation(){wu.length=0},validate({commit:t},e){qK(e,t)},async validateNow({commit:t},e){await sP([e],t)},close({commit:t}){t("basic",{key:"valid",value:!0})},hasSubmitted({commit:t},e){t("basic",{key:"submitted",value:e})},showValidationOnLoad({commit:t},e){t("basic",{key:"showValidationOnLoad",value:e})},async disableSubmitOnPhotoVideoUpload({commit:t},e){await HK(t,e)}}},Pu={namespaced:!0,state(){return{stack:[],position:null}},getters:{canUndo(t){return t.position>0},canRedo(t){return t.position<t.stack.length-1},currentState(t,e){const r=t.stack[t.position];return e.nextState&&e.nextState.deletedPage&&(r.currentPage=e.nextState.currentPage),r},nextState(t,e){return e.canRedo?t.stack[t.position+1]:!1}},mutations:{setPosition(t,e){t.position=e},setState(t,e){t.stack.push(e)}},methods:{emitChanges(){window.ProcessMaker.EventBus.$emit("screen-change")}},actions:{pushState({state:t,getters:e,commit:r},i){i.config!==e.currentState&&(r("setState",i),r("setPosition",t.stack.length-1),Pu.methods.emitChanges())},undo({state:t,getters:e,commit:r}){e.canUndo&&(r("setPosition",t.position-1),Pu.methods.emitChanges())},redo({state:t,getters:e,commit:r}){e.canRedo&&(r("setPosition",t.position+1),Pu.methods.emitChanges())}}},Ore="",WK={props:{placeholder:{type:String},value:{type:String}},data(){return{query:""}},watch:{query(t){this.$emit("input",t)}},methods:{runSearch(t){this.$emit("submit",this.query)}},mounted(){this.query=this.value}};var VK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"basic-search"},[r("div",{staticClass:"d-flex"},[r("div",{staticClass:"flex-grow-1"},[r("div",{staticClass:"search-bar-basic d-flex w-100"},[r("div",{staticClass:"search-bar-inputs flex-grow w-100"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.query,expression:"query"}],ref:"search_input",staticClass:"search-bar-manual-input form-control",attrs:{type:"text",placeholder:e.placeholder?e.placeholder:e.$t("Search"),"data-cy":"watchers-table-search"},domProps:{value:e.query},on:{keyup:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")?null:e.runSearch.apply(null,arguments)},input:function(i){i.target.composing||(e.query=i.target.value)}}})]),r("div",{staticClass:"search-bar-actions d-flex flex-shrink"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"btn-search-run",attrs:{variant:"primary",title:e.$t("Search")},on:{click:e.runSearch}},[r("i",{staticClass:"fas fa-search",attrs:{"data-cy":"watchers-table-search-button"}})])],1)])]),r("div",{staticClass:"search-bar-buttons"},[e._t("buttons")],2)])])},XK=[],JK=oe(WK,VK,XK,!1,null,"d660c896",null,null);const lP=JK.exports,uP="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAyMCAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTExLjI2MzIgNy4xMDUyOEgxNk0xNiA3LjEwNTI4TDE0LjAyNjMgOS4wNzg5Nk0xNiA3LjEwNTI4TDE1LjAxMzIgNi4xMTg0M0wxNC4wMjYzIDUuMTMxNTkiIHN0cm9rZT0iIzZBNzg4OCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8cmVjdCB4PSIzLjQ3OTEiIHk9IjAuOSIgd2lkdGg9IjcuNjczNjgiIGhlaWdodD0iMTIuNDEwNSIgcng9IjEuMSIgc3Ryb2tlPSIjNkE3ODg4IiBzdHJva2Utd2lkdGg9IjEuOCIvPgo8cGF0aCBkPSJNMSA2LjIwNTIyQzAuNTAyOTQ0IDYuMjA1MjIgMC4xIDYuNjA4MTcgMC4xIDcuMTA1MjJDMC4xIDcuNjAyMjggMC41MDI5NDQgOC4wMDUyMiAxIDguMDA1MjJMMSA2LjIwNTIyWk0xIDguMDA1MjJMNy4zMTU3OSA4LjAwNTIzTDcuMzE1NzkgNi4yMDUyM0wxIDYuMjA1MjJMMSA4LjAw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AwIDI0LTEwLjc0NSAyNC0yNHYtODBjMC0xMy4yNTUtMTAuNzQ1LTI0LTI0LTI0SDI0Yy0xMy4yNTUgMC0yNCAxMC43NDUtMjQgMjR6TTEyNS4zMzMgMzJIMjRDMTAuNzQ1IDMyIDAgNDIuNzQ1IDAgNTZ2ODBjMCAxMy4yNTUgMTAuNzQ1IDI0IDI0IDI0aDEwMS4zMzNjMTMuMjU1IDAgMjQtMTAuNzQ1IDI0LTI0VjU2YzAtMTMuMjU1LTEwLjc0NS0yNC0yNC0yNHptODAgNDQ4SDQ4OGMxMy4yNTUgMCAyNC0xMC43NDUgMjQtMjR2LTgwYzAtMTMuMjU1LTEwLjc0NS0yNC0yNC0yNEgyMDUuMzMzYy0xMy4yNTUgMC0yNCAxMC43NDUtMjQgMjR2ODBjMCAxMy4yNTUgMTAuNzQ1IDI0IDI0IDI0em0tMjQtNDI0djgwYzAgMTMuMjU1IDEwLjc0NSAyNCAyNCAyNEg0ODhjMTMuMjU1IDAgMjQtMTAuNzQ1IDI0LTI0VjU2YzAtMTMuMjU1LTEwLjc0NS0yNC0yNC0yNEgyMDUuMzMzYy0xMy4yNTUgMC0yNCAxMC43NDUtMjQgMjR6bTI0IDI2NEg0ODhjMTMuMjU1IDAgMjQtMTAuNzQ1IDI0LTI0di04MGMwLTEzLjI1NS0xMC43NDUtMjQtMjQtMjRIMjA1LjMzM2MtMTMuMjU1IDAtMjQgMTAuNzQ1LTI0IDI0djgwYzAgMTMuMjU1IDEwLjc0NSAyNCAyNCAyNHoiPjwvcGF0aD48L3N2Zz4=",Ere="",UK=typeof window>"u"?global:window,GK={components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,MonacoEditor:Si,Sortable:lp},mixins:[lc],props:["value"],data(){return{required:!0,numberItem:0,displayList:!0,ruleDescription:"",ruleFormula:"",rulePropName:"",editorInvalid:!1,existsProperty:!1,current:[],add:{id:0,name:"",property:"",type:"expression",formula:""},css:{tableClass:"table table-hover table-responsive text-break mb-0",loadingClass:"loading",detailRowClass:"vuetable-detail-row",handleIcon:"grey sidebar icon",sortableIcon:"fas fa-sort",ascendingIcon:"fas fa-sort-up",descendingIcon:"fas fa-sort-down",ascendingClass:"ascending",descendingClass:"descending"},fields:[{label:this.$t("Name"),key:"property"},{label:this.$t("Type"),key:"type",cb:t=>{switch(t){case"expression":return"Formula";case"javascript":return"JavaScript";default:return t}}}],monacoOptions:{automaticLayout:!0,lineNumbers:"off",minimap:!1},monacoEditor:null,errors:{},searchProperties:["property","type"]}},computed:{javascriptTypeClass(){const{isJS:t}=this;return{"btn-outline-secondary":t,"text-dark":t,"btn-outline-light":!t,"text-secondary":!t}},expressionTypeClass(){const t=!this.isJS;return{"btn-outline-secondary":t,"text-dark":t,"btn-outline-light":!t,"text-secondary":!t}},isJS(){return this.add.type==="javascript"},modalSize(){return this.displayList?"lg":"xl"}},watch:{value(){this.value.forEach(t=>{this.numberItem++,t.id=this.numberItem,Object.hasOwn(t,"byPass")||(t.byPass=!1)}),this.current=this.value}},created(){Lt.register("exists-property",()=>{let t=!0;return this.current.forEach(e=>{e.property===this.add.property&&e.id!==this.add.id&&(t=!1)}),t},this.$t("Property already exists"))},methods:{switchExpressionType(t){this.add.type=t},show(){this.$refs.modal.show()},emptyForm(){this.add.id=0,this.add.name="",this.add.property="",this.add.type="expression",this.add.formula="",this.editorInvalid=!1,this.existsProperty=!1,this.ruleDescription="",this.ruleFormula="",this.rulePropName=""},displayTableList(){this.emptyForm(),this.displayList=!0},displayFormProperty(){this.emptyForm(),this.displayList=!1},validateData(){this.errors=[];const t={property:"required|exists-property",name:"required",formula:"required"},e={property:this.add.property,name:this.add.name,formula:this.add.formula},r=new Lt(e,t),i=r.passes();this.errors=Object.fromEntries(Object.keys(r.errors.all()).map(a=>[a,r.errors.first(a)])),i?this.saveProperty():this.focusFirstCalculatedPropertiesError()},toggleBypass(t){this.current=this.current.map(e=>e.id===t?{...e,byPass:!e.byPass}:e),this.$emit("input",this.current)},saveProperty(){this.add.id===0?(this.numberItem++,this.current.push({id:this.numberItem,property:this.add.property,name:this.add.name,formula:this.add.formula,type:this.add.type,byPass:!1})):this.current.forEach(t=>{t.id===this.add.id&&(t.name=this.add.name,t.property=this.add.property,t.formula=this.add.formula,t.type=this.add.type)}),this.$emit("input",this.current),this.displayTableList()},editProperty(t){this.add.id=t.id,this.add.name=t.name,this.add.property=t.property,this.add.type=t.type?t.type:"expression",this.add.formula=t.formula,this.displayList=!1},deleteProperty(t){UK.ProcessMaker.confirmModal(this.$t("Are you sure you want to delete the calc ?"),this.$t("If you do, you won’t be able to recover the Calc configuration."),"",()=>{this.remove(t)})},remove(t){this.current=this.current.filter(e=>e.id!==t.id),this.$emit("input",this.current),this.displayTableList()},editorMounted(t){this.monacoEditor=t},getByPassIcon(t){return new URL(Object.assign({"../assets/icons/Bypass.svg":uP,"../assets/icons/ErrorMessage.svg":cP,"../assets/icons/Unbypass.svg":dP,"../assets/icons/angle-double-right-solid.svg":fP,"../assets/icons/calendar-regular.svg":pP,"../assets/icons/caret-square-down-solid.svg":hP,"../assets/icons/check-square-solid.svg":mP,"../assets/icons/columns-solid.svg":vP,"../assets/icons/font-solid.svg":gP,"../assets/icons/list-ul-solid.svg":bP,"../assets/icons/paragraph-solid.svg":yP,"../assets/icons/share-square-solid.svg":xP,"../assets/icons/square-regular.svg":wP,"../assets/icons/th-list-solid.svg":PP})[`../assets/icons/${t.byPass?"Unbypass":"Bypass"}.svg`],self.location).href}}};var QK=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{id:"computed-properties",size:e.modalSize,"content-class":"p-3","header-class":"m-0 p-0 mb-3","body-class":"m-0 p-0","title-class":"m-0","footer-class":"m-0 p-0 border-0","no-close-on-backdrop":"","header-close-content":"&times;","data-cy":"calcs-modal"},on:{hidden:e.displayTableList},scopedSlots:e._u([{key:"modal-title",fn:function(){return[r("h5",{staticClass:"modal-title"},[e._v(e._s(e.$t("Calculated Properties")))]),r("small",{directives:[{name:"show",rawName:"v-show",value:!e.displayList,expression:"!displayList"}],staticClass:"modal-subtitle my-2"},[e._v(" "+e._s(e.$t("Perform mathematical calculations offering quick, convenient, and accurate operations, enhancing user efficiency and usability."))+" ")])]},proxy:!0}])},[e.displayList?[r("Sortable",{staticClass:"mb-3",attrs:{fields:e.fields,items:e.current,"disable-key":"byPass","inline-edit":!1,"data-test-actions":{tableBox:{"data-cy":"calcs-table"},btnNew:{"data-cy":"calcs-add-property"},btnEdit:{"data-cy":"calcs-table-edit"},btnDelete:{"data-cy":"calcs-table-remove"}},searchProperties:e.searchProperties},on:{"item-edit":e.editProperty,"item-delete":e.deleteProperty,"add-page":e.displayFormProperty},scopedSlots:e._u([{key:"options",fn:function({item:i}){return[r("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip",value:{customClass:"bypass-btn-tooltip"},expression:"{ customClass: 'bypass-btn-tooltip' }"}],staticClass:"btn",attrs:{title:i.byPass?e.$t("Unbypass Calc"):e.$t("Bypass Calc"),"data-test":"calcs-bypass"},on:{click:function(a){return e.toggleBypass(i.id)}}},[r("img",{attrs:{src:e.getByPassIcon(i),alt:"Bypass",width:"24"}})]),r("div",{staticClass:"sortable-item-vr"})]}}],null,!1,1100542621)}),r("template",{slot:"modal-footer"},[r("div",{staticClass:"d-flex align-items-end"},[r("button",{staticClass:"btn btn-secondary ml-3 text-uppercase",attrs:{"data-cy":"calcs-button-close"},on:{click:function(i){return e.$refs.modal.hide()}}},[e._v(" "+e._s(e.$t("Done"))+" ")])])])]:[r("b-row",[r("b-col",[r("form-input",{ref:"property",staticClass:"mb-3 calcs-input",attrs:{label:e.$t("Property Name")+" *",name:"property",error:e.errors.property,"data-cy":"calcs-property-name",required:"","aria-required":"true"},model:{value:e.add.property,callback:function(i){e.$set(e.add,"property",i)},expression:"add.property"}})],1),r("b-col",[r("form-text-area",{ref:"name",staticClass:"mb-3 calcs-input",attrs:{label:e.$t("Description")+" *",name:"name",error:e.errors.name,"data-cy":"calcs-property-description",required:"","aria-required":"true"},model:{value:e.add.name,callback:function(i){e.$set(e.add,"name",i)},expression:"add.name"}})],1)],1),r("div",{staticClass:"form-group mb-3",staticStyle:{position:"relative"}},[r("div",{staticClass:"d-flex justify-content-between mb-1"},[r("label",{staticClass:"m-0"},[e._v(e._s(e.$t("Formula")+" *"))]),r("div",[r("a",{staticClass:"btn btn-sm",class:e.expressionTypeClass,attrs:{"data-cy":"calcs-switch-formula"},on:{click:function(i){return e.switchExpressionType("expression")}}},[r("i",{staticClass:"fas fa-square-root-alt"})]),r("a",{staticClass:"btn btn-sm",class:e.javascriptTypeClass,attrs:{"data-cy":"calcs-switch-javascript"},on:{click:function(i){return e.switchExpressionType("javascript")}}},[r("i",{staticClass:"fab fa-js-square fa-lg"})])])]),r("form-text-area",{directives:[{name:"show",rawName:"v-show",value:!e.isJS,expression:"!isJS"}],ref:"formula",staticClass:"calcs-input-formula",attrs:{rows:"5",name:"formula",error:e.errors.formula,"data-cy":"calcs-property-formula",required:"","aria-required":"true"},model:{value:e.add.formula,callback:function(i){e.$set(e.add,"formula",i)},expression:"add.formula"}}),r("div",{directives:[{name:"show",rawName:"v-show",value:e.isJS,expression:"isJS"}],staticClass:"editor-border",class:{"is-invalid":!!e.errors.formula}}),r("monaco-editor",{directives:[{name:"show",rawName:"v-show",value:e.isJS,expression:"isJS"}],staticClass:"editor",attrs:{options:e.monacoOptions,language:"javascript","data-cy":"calcs-property-javascript",required:"","aria-required":"true"},on:{editorDidMount:e.editorMounted},model:{value:e.add.formula,callback:function(i){e.$set(e.add,"formula",i)},expression:"add.formula"}}),e.isJS&&e.errors.formula?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.errors.formula))])]):e._e()],1),r("template",{slot:"modal-footer"},[r("div",{staticClass:"d-flex align-items-end"},[r("button",{staticClass:"btn btn-outline-secondary text-uppercase",attrs:{"data-cy":"calcs-button-cancel"},on:{click:e.displayTableList}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-secondary ml-3 text-uppercase",attrs:{"data-cy":"calcs-button-save"},on:{click:e.validateData}},[e._v(" "+e._s(e.$t("Save"))+" ")])])])]],2)},YK=[],ZK=oe(GK,QK,YK,!1,null,"6d70559c",null,null);const KK=ZK.exports,jre="",_K={props:["value","cssErrors"],components:{MonacoEditor:Si},data(){return{saveValue:"",innerValue:"",monacoOptions:{language:"css",automaticLayout:!0,minimap:{enabled:!1}}}},watch:{innerValue(t){this.$emit("input",t)}},methods:{show(){this.innerValue=this.value,this.saveValue=this.value,this.$refs.modal.show()},close(){this.$refs.modal.hide()},hide(){this.innerValue=this.saveValue,this.$emit("input",this.innerValue)},save(){this.saveValue=this.innerValue,this.$refs.modal.hide()}}};var $K=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{size:"lg",id:"custom-css",title:e.$t("Custom CSS"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","no-close-on-backdrop":"","ok-title":e.$t("Save"),"cancel-title":e.$t("Cancel"),"header-close-content":"&times;"},on:{ok:e.save,cancel:e.close,hide:e.hide}},[r("p",[e._v(e._s(e.$t("You can set CSS Selector names in the inspector. Use them here with [selector='my-selector']")))]),r("div",{staticClass:"editor"},[r("monaco-editor",{staticClass:"monaco",attrs:{options:e.monacoOptions,"data-cy":"monaco-editor"},model:{value:e.innerValue,callback:function(i){e.innerValue=i},expression:"innerValue"}})],1),r("b-alert",{attrs:{show:e.cssErrors!="",variant:"danger"}},[r("pre",[e._v(e._s(e.cssErrors))])]),r("div",{attrs:{slot:"modal-cancel","data-cy":"cancel-button"},slot:"modal-cancel"},[e._v(e._s(e.$t("Cancel")))]),r("div",{attrs:{slot:"modal-ok","data-cy":"save-button"},slot:"modal-ok"},[e._v(e._s(e.$t("Save")))])],1)},e_=[],t_=oe(_K,$K,e_,!1,null,"3824b29b",null,null);const r_=t_.exports,Nre="",i_=typeof window>"u"?global:window,a_={name:"WatchersForm",components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,FormMultiSelect:ee.FormMultiSelect,FormCheckbox:ee.FormCheckbox,MonacoEditor:Si,DataMapping:rp,OutboundConfig:sp,ScreenVariableSelector:kw},mixins:[lc],props:{config:{type:Object,default(){return{name:"",watching:"",script:"",script_id:"",script_key:"",input_data:"{}",script_configuration:"{}",output_variable:"",synchronous:!1,run_onload:!1,show_async_loading:!1}}}},data(){return{scriptConfig:"",endpoint:null,endpoints:[],ruleWatcherName:"",ruleWatcherVariable:"",ruleWatcherScript:"",ruleWatcherOutputVariable:"",required:!0,inputDataInvalid:!1,scriptConfigurationInvalid:!1,scripts:[],script:null,monacoOptions:{automaticLayout:!0,lineNumbers:"on",minimap:{enabled:!1}},endpointError:null,inputDataEditor:null,scriptConfigEditor:null}},computed:{dataSourceLink(){const t=this.selectedDataSourceId(),e=this.endpoint;return t&&e?`/designer/data-sources/${t}/resources/${e}`:""},dataSourceConfigWarning(){const t=this.selectedDataSourceId(),e=this.scripts.find(i=>i.type==="Data Connectors");if(typeof e>"u"||e===null)return"";const r=e.items.find(i=>i.id===`data_source-${t}`);return typeof r>"u"||e===null?"":r.validationStatus.length>0?r.validationStatus:""},isDatasource(){return this.config.script&&this.config.script.id.substr(0,11)==="data_source"},isScript(){return!this.config.script||this.config.script.id.substr(0,6)==="script"},hasInputData(){let t;try{t=JSON.parse(this.config.script_configuration)}catch{return!1}return typeof t.input_data>"u"||t.input_data==null?!1:Object.keys(t.input_data).length===0&&t.input_data.constructor===Object},outputVarLabel(){const t=this.ruleWatcherOutputVariable=="required"?" *":"";return this.$t("Output Variable")+t}},watch:{scriptConfig(t){try{const e=JSON.parse(this.config.script_configuration),r=JSON.parse(t);this.config.script_configuration=JSON.stringify({...e,...r},null," ")}catch{}},endpoint(t){this.setConfig("endpoint",t);const e=this.scriptConfig?JSON.parse(this.scriptConfig):{},r=e.dataMapping||[],i=this.scripts.find(a=>a.items&&a.items.length>0&&a.items[0].id&&a.items[0].id.substr(0,11)==="data_source");if(i&&r.length===0){const a=i.items.find(s=>`data_source-${e.dataSource}`===s.id),n=(a.endpoints&&a.endpoints[t]?a.endpoints[t].dataMapping:[])||[];e.dataMapping=[],n.forEach(s=>{e.dataMapping.push({key:s.key,value:s.value})}),this.scriptConfig=JSON.stringify(e)}},config:{deep:!0,immediate:!0,handler(t){t.input_data||(t.input_data="{}"),t.script_configuration?this.scriptConfig=this.config.script_configuration:t.script_configuration="{}",this.endpoint=this.getConfig().endpoint}},"config.script":{handler(t,e){if(!t)this.config.script_id="",this.config.script_key="",this.config.datasource_script_id="";else if(typeof t=="object"){const r=t.id.split("-"),i=e&&e.id&&e.id.split("-").length>0?e.id.split("-")[0]:"";this.config.script_id=r[1],this.config.script_key=t.key,i!==r[0]&&(this.config.script_configuration="{}"),r[0]==="data_source"&&this.setConfig("dataSource",this.config.script_id),this.config.datasource_script_id=t.dataSourceScriptId}return t}}},methods:{selectedDataSourceId(){let t=null;try{t=JSON.parse(this.scriptConfig).dataSource}catch{t=null}return t},setValidations(){this.ruleWatcherName="required",this.ruleWatcherVariable="required",this.ruleWatcherScript="required",this.hasInputData&&(this.ruleWatcherOutputVariable="required")},getConfig(){try{return JSON.parse(this.config.script_configuration)}catch{return{}}},setConfig(t,e){const r=this.getConfig();JSON.stringify(r[t])!==JSON.stringify(e)&&(r[t]=e,this.config.script_configuration=JSON.stringify(r),this.scriptConfig=this.config.script_configuration)},loadEndpoints(){const t=this.config.script.id.substr(0,11)==="data_source"?this.config.script.id.substr(12):null;this.endpoints.splice(0),t&&window.ProcessMaker&&window.ProcessMaker.apiClient&&window.ProcessMaker.apiClient.get(`/data_sources/${t}`).then(e=>{for(const r in e.data.endpoints)this.endpoints.push(r)})},loadSources(){this.scripts=[],this.$root.$children[0].watchers_config.api.scripts.forEach(t=>{t(this.scripts)})},displayTableList(){this.$emit("display-list")},jsonIsValid(t){try{JSON.parse(this.config[t])}catch{return!1}return!0},isFormValid(){this.isDatasource&&!this.endpoint?this.endpointError=this.$t("Endpoint is required"):this.endpointError=null;for(const t in this.$refs)if(this.$refs[t]&&this.$refs[t].name&&this.$refs[t].validator&&this.$refs[t].validator.errorCount!==0)return!1;return!(!this.config.watching||!this.config.script||this.endpointError||!this.jsonIsValid("input_data")||!this.jsonIsValid("script_configuration"))},validateDataAndSave(){this.setValidations(),this.$nextTick(()=>{if(!this.isFormValid()){i_.ProcessMaker.alert(this.$t("An error occurred. Check the form for errors in red text."),"danger"),this.focusFirstWatcherError();return}this.config.uid||(this.config.uid=G.uniqueId(new Date().getTime()),this.config.byPass=!1),this.save()})},save(){this.$emit("save-form")},inputDataEditorMounted(t){this.inputDataEditor=t},scriptConfigEditorMounted(t){this.scriptConfigEditor=t}}};var n_=function(){var e=this,r=e._self._c;return r("div",[r("div",{staticClass:"accordion",attrs:{id:"watcherAccordion"}},[r("div",{staticClass:"card card-overflow"},[r("div",{staticClass:"card-header p-0"},[r("div",{staticClass:"mb-0"},[r("button",{ref:"watcherConfigButton",staticClass:"p-3 btn btn-link d-flex w-100 text-capitalize text-reset justify-content-between",attrs:{type:"button","data-toggle":"collapse","data-target":"#watcherConfig","data-cy":"watchers-accordion-configuration"}},[e._m(0),e._m(1)])])]),r("div",{staticClass:"collapse show",attrs:{id:"watcherConfig","data-parent":"#watcherAccordion"}},[r("div",{staticClass:"card-body pt-3 px-3 pb-0"},[r("form-input",{ref:"name",attrs:{label:e.$t("Watcher Name")+" *",name:e.$t("Watcher Name"),validation:e.ruleWatcherName,helper:e.$t("A name to describe this Watcher"),"data-cy":"watchers-watcher-name",required:"","aria-required":"true"},model:{value:e.config.name,callback:function(i){e.$set(e.config,"name",i)},expression:"config.name"}}),r("screen-variable-selector",{ref:"watching",attrs:{name:e.$t("Variable to Watch"),label:e.$t("Variable to Watch")+" *",validation:e.ruleWatcherVariable,helper:e.$t("Select the variable to watch on this screen or type any request variable name"),"data-cy":"watchers-watcher-variable"},model:{value:e.config.watching,callback:function(i){e.$set(e.config,"watching",i)},expression:"config.watching"}}),r("form-checkbox",{attrs:{name:e.$t("Run Synchronously"),label:e.$t("Run Synchronously"),toggle:!0,helper:e.$t("Wait for the Watcher to run before accepting more input"),"data-cy":"watchers-watcher-synchronous"},model:{value:e.config.synchronous,callback:function(i){e.$set(e.config,"synchronous",i)},expression:"config.synchronous"}}),r("form-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.config.synchronous,expression:"!config.synchronous"}],attrs:{name:e.$t("Show message while loading remote data"),label:e.$t("Show message while loading remote data"),toggle:!0,"data-cy":"watchers-watcher-show-loading"},model:{value:e.config.show_async_loading,callback:function(i){e.$set(e.config,"show_async_loading",i)},expression:"config.show_async_loading"}}),r("form-checkbox",{attrs:{name:e.$t("Run Watcher on Screen Load"),label:e.$t("Run watcher on Screen Load"),toggle:!0,"data-cy":"watchers-watcher-run-onload"},model:{value:e.config.run_onload,callback:function(i){e.$set(e.config,"run_onload",i)},expression:"config.run_onload"}})],1)])]),r("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[r("div",{staticClass:"card-header p-0"},[r("div",{staticClass:"mb-0"},[r("button",{ref:"watcherSourceButton",staticClass:"p-3 btn btn-link collapsed d-flex w-100 text-capitalize text-reset justify-content-between",attrs:{type:"button","data-toggle":"collapse","data-target":"#watcherSource","data-cy":"watchers-accordion-source"}},[e._m(2),e._m(3)])])]),r("div",{staticClass:"collapse",attrs:{id:"watcherSource","data-parent":"#watcherAccordion"}},[r("div",{staticClass:"card-body pt-3 px-3 pb-0"},[r("form-multi-select",{ref:"script",attrs:{name:e.$t("Source"),label:e.$t("Source")+" *",options:e.scripts,placeholder:e.$t("None"),multiple:!1,"show-labels":!1,searchable:!0,"option-value":"id","option-content":"title","group-values":"items","group-label":"type",validation:e.ruleWatcherScript,helper:e.$t("The source to access when this Watcher runs"),"data-cy":"watchers-watcher-source"},on:{open:e.loadSources},model:{value:e.config.script,callback:function(i){e.$set(e.config,"script",i)},expression:"config.script"}}),e.isScript?r("div",[e.config.script?r("b-alert",{attrs:{show:"",variant:"warning"}},[r("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.$t("Using watchers with Scripts can slow the performance of your screen."))+" ")]):e._e(),r("div",{staticClass:"form-group"},[r("label",[e._v(e._s(e.$t("Input Data")))]),r("div",{staticClass:"form-border",class:{"is-invalid":!e.jsonIsValid("input_data")}},[r("monaco-editor",{ref:"input_data",staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"watchers-watcher-input_data"},on:{editorDidMount:e.inputDataEditorMounted},model:{value:e.config.input_data,callback:function(i){e.$set(e.config,"input_data",i)},expression:"config.input_data"}})],1),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Data to pass to the script (valid JSON object, variables supported)")))]),e.inputDataInvalid?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("The Input Data field is required")))])]):e._e(),e.jsonIsValid("input_data")?e._e():r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("This must be valid JSON")))])])]),r("div",{staticClass:"form-group"},[r("label",[e._v(e._s(e.$t("Script Configuration")))]),r("div",{staticClass:"form-border",class:{"is-invalid":!e.jsonIsValid("script_configuration")}},[r("monaco-editor",{ref:"script_configuration",staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"watchers-watcher-script_configuration"},on:{editorDidMount:e.scriptConfigEditorMounted},model:{value:e.config.script_configuration,callback:function(i){e.$set(e.config,"script_configuration",i)},expression:"config.script_configuration"}})],1),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Configuration data for the script (valid JSON object, variables supported)")))]),e.scriptConfigurationInvalid?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(" "+e._s(e.$t("The Script Configuration field is required"))+" ")])]):e._e(),e.jsonIsValid("script_configuration")?e._e():r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("This must be valid JSON")))])])])],1):e._e(),e.isDatasource?r("div",[r("div",{staticClass:"form-group"},[r("form-multi-select",{ref:"endpoint",attrs:{name:e.$t("Resource"),label:e.$t("Resource"),options:e.endpoints,placeholder:e.$t("Select a resource"),multiple:!1,"show-labels":!1,searchable:!0,"internal-search":!1,helper:e.$t("The Data Connector resource to access when this Watcher runs"),"data-cy":"watchers-watcher-endpoint"},on:{"search-change":e.loadEndpoints,open:function(i){return e.loadEndpoints()}},model:{value:e.endpoint,callback:function(i){e.endpoint=i},expression:"endpoint"}}),e.endpointError?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.endpointError))])]):e._e(),e.dataSourceConfigWarning.length>0?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.dataSourceConfigWarning))])]):e._e(),r("a",{directives:[{name:"show",rawName:"v-show",value:e.dataSourceLink.length>0,expression:"dataSourceLink.length > 0"}],staticClass:"link-primary",attrs:{href:e.dataSourceLink,target:"_blank"}},[e._v(" "+e._s(e.$t("Open Data Connector"))+" "),r("i",{staticClass:"ml-1 fas fa-external-link-alt"})])],1),e.hasInputData?e._e():r("outbound-config",{model:{value:e.scriptConfig,callback:function(i){e.scriptConfig=i},expression:"scriptConfig"}}),e.hasInputData?r("div",{staticClass:"form-group"},[e._m(4),r("div",{staticClass:"row pl-3 mt-1"},[r("label",[e._v(e._s(e.$t("Input Data")))]),r("div",{staticClass:"form-border",class:{"is-invalid":!e.jsonIsValid("input_data")}},[r("monaco-editor",{staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"watchers-watcher-input_data"},model:{value:e.config.input_data,callback:function(i){e.$set(e.config,"input_data",i)},expression:"config.input_data"}})],1),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Data to pass to the Data Connector (valid JSON object, variables supported)")))]),e.inputDataInvalid?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("The Input Data field is required")))])]):e._e(),e.jsonIsValid("input_data")?e._e():r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("This must be valid JSON")))])])])]):e._e()],1):e._e()],1)])]),r("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[r("div",{staticClass:"card-header p-0"},[r("div",{staticClass:"mb-0"},[r("button",{ref:"watcherOutputButton",staticClass:"p-3 btn btn-link collapsed d-flex w-100 text-capitalize text-reset justify-content-between",attrs:{type:"button","data-toggle":"collapse","data-target":"#watcherOutput","data-cy":"watchers-accordion-output"}},[e._m(5),e._m(6)])])]),r("div",{staticClass:"collapse",attrs:{id:"watcherOutput","data-parent":"#watcherAccordion"}},[r("div",{staticClass:"card-body pt-3 px-3 pb-0"},[e.hasInputData||e.isScript?r("form-input",{ref:"propOutputVariableName",attrs:{label:e.outputVarLabel,name:e.$t("Output Variable"),helper:e.$t("The variable that will store the output of the Watcher"),validation:e.ruleWatcherOutputVariable,"data-cy":"watchers-watcher-output_variable",required:e.ruleWatcherOutputVariable=="required","aria-required":e.ruleWatcherOutputVariable=="required"},model:{value:e.config.output_variable,callback:function(i){e.$set(e.config,"output_variable",i)},expression:"config.output_variable"}}):e._e(),e.isDatasource?r("data-mapping",{model:{value:e.scriptConfig,callback:function(i){e.scriptConfig=i},expression:"scriptConfig"}}):e._e()],1)])])]),r("div",{staticClass:"d-flex justify-content-end mt-3"},[r("button",{staticClass:"btn btn-outline-secondary text-uppercase",attrs:{"data-cy":"watchers-button-cancel"},on:{click:function(i){return i.stopPropagation(),e.displayTableList.apply(null,arguments)}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-secondary ml-3 text-uppercase",attrs:{"data-cy":"watchers-button-save"},on:{click:e.validateDataAndSave}},[e._v(" "+e._s(e.$t("Save"))+" ")])])])},s_=[function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-fw fa-cog"}),t._v(" Configuration")])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-angle-down arrow-open mr-2"}),e("i",{staticClass:"fas fa-angle-right arrow-closed mr-2"})])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-fw fa-file-upload"}),t._v(" Source")])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-angle-down arrow-open mr-2"}),e("i",{staticClass:"fas fa-angle-right arrow-closed mr-2"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"row pl-3"},[e("span",{staticClass:"text-danger"},[t._v(" * Deprecation Warning: Recreate the watcher to use the new format. Version 4.2 will not support Input Data as a JSON object. ")])])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-fw fa-file-download"}),t._v(" Output")])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-angle-down arrow-open mr-2"}),e("i",{staticClass:"fas fa-angle-right arrow-closed mr-2"})])}],o_=oe(a_,n_,s_,!1,null,"74e7876e",null,null);const SP=o_.exports,Ire="",l_={components:{BasicSearch:lP,FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,Sortable:lp},props:{value:{type:Array,default(){return[]}}},data(){return{filter:"",css:{tableClass:"table table-hover table-responsive text-break mb-0",loadingClass:"loading",detailRowClass:"vuetable-detail-row",handleIcon:"grey sidebar icon",sortableIcon:"fas fa-sort",ascendingIcon:"fas fa-sort-up",descendingIcon:"fas fa-sort-down",ascendingClass:"ascending",descendingClass:"descending"},fields:[{label:this.$t("Name"),key:"name"},{label:this.$t("Watching Variable"),key:"watching"},{label:this.$t("Output Variable"),key:"output_variable"},{label:this.$t("Source"),key:"script.title"}],searchProperties:["name","output_variable","watching","script.title"]}},methods:{displayFormProperty(){this.$emit("display-form")},editProperty(t){this.$emit("edit-form",t)},deleteProperty(t){this.$emit("delete-form",t)},getByPassIcon(t){return new URL(Object.assign({"../assets/icons/Bypass.svg":uP,"../assets/icons/ErrorMessage.svg":cP,"../assets/icons/Unbypass.svg":dP,"../assets/icons/angle-double-right-solid.svg":fP,"../assets/icons/calendar-regular.svg":pP,"../assets/icons/caret-square-down-solid.svg":hP,"../assets/icons/check-square-solid.svg":mP,"../assets/icons/columns-solid.svg":vP,"../assets/icons/font-solid.svg":gP,"../assets/icons/list-ul-solid.svg":bP,"../assets/icons/paragraph-solid.svg":yP,"../assets/icons/share-square-solid.svg":xP,"../assets/icons/square-regular.svg":wP,"../assets/icons/th-list-solid.svg":PP})[`../assets/icons/${t.byPass?"Unbypass":"Bypass"}.svg`],self.location).href}}};var u_=function(){var e=this,r=e._self._c;return r("Sortable",{attrs:{fields:e.fields,items:e.value,"disable-key":"byPass","inline-edit":!1,"data-test-actions":{tableBox:{"data-cy":"watchers-table"},btnNew:{"data-cy":"watchers-add-watcher"},btnEdit:{"data-cy":"watchers-table-edit"},btnDelete:{"data-cy":"watchers-table-remove"}},searchProperties:e.searchProperties},on:{"item-edit":e.editProperty,"item-delete":e.deleteProperty,"add-page":e.displayFormProperty,ordered:function(i){return e.$emit("ordered",i)}},scopedSlots:e._u([{key:"options",fn:function({item:i}){return[r("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip",value:{customClass:"bypass-btn-tooltip"},expression:"{ customClass: 'bypass-btn-tooltip' }"}],staticClass:"btn",attrs:{title:i.byPass?e.$t("Unbypass Watcher"):e.$t("Bypass Watcher"),"data-test":"watchers-bypass"},on:{click:function(a){return a.preventDefault(),e.$emit("toggle-bypass",i.uid)}}},[r("img",{attrs:{src:e.getByPassIcon(i),alt:"Bypass",width:"24"}})]),r("div",{staticClass:"sortable-item-vr"})]}}])})},c_=[],d_=oe(l_,u_,c_,!1,null,"cfbb5df9",null,null);const kP=d_.exports,Lre="",TP=typeof window>"u"?global:window,f_={components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,MonacoEditor:Si,WatchersList:kP,WatchersForm:SP},props:{value:{type:Array,required:!0}},data(){return{enableList:!0,current:[],add:{uid:"",name:"",variable:"",script_id:"",script_key:"",input_data:"",script_configuration:"",synchronous:!1,byPass:!1}}},computed:{modalSize(){return"xl"}},watch:{value:{handler(t){this.current=this.getValuesWithOutputVarsNames(t)}}},methods:{getValuesWithOutputVarsNames(t){return t.map(r=>{var a,n;const i={...r};if(Object.hasOwn(i,"byPass")||(i.byPass=!1),((n=(a=i==null?void 0:i.script)==null?void 0:a.id)==null?void 0:n.substr(0,11))==="data_source"){const s=JSON.parse(i.script_configuration),o=s!=null&&s.dataMapping?s.dataMapping.map(l=>l.key).join(", "):"",u=50;i.output_variable=o.length>u?`${o.substr(0,u)}...`:o}return i})},toggleBypass(t){this.current=this.current.map(e=>e.uid===t?{...e,byPass:!e.byPass}:e),this.$emit("input",this.current)},show(){this.$refs.modal.show()},displayList(){this.add={},this.enableList=!0},displayForm(){this.add={},this.enableList=!1},save(){let t=this.$t("Watcher Saved"),e=this.current.findIndex(r=>r.uid===this.add.uid);e===-1?this.current.push(this.add):(t=this.$t("Watcher Updated"),this.current[e]=this.add),this.showAlert(t),this.$emit("input",this.current),this.displayList()},edit(t){this.displayForm(),this.$set(this,"add",G.cloneDeep(t))},confirmRemoval(t){TP.ProcessMaker.confirmModal(this.$t("Caution!"),this.$t("Are you sure you want to delete the Watcher?"),"",()=>{this.remove(t)})},remove(t){this.current=this.current.filter(e=>e.uid!==t.uid),this.$emit("input",this.current),this.showAlert(this.$t("Watcher deleted")),this.displayList()},showAlert(t){TP.ProcessMaker.alert(t,"success")}}};var p_=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{size:e.modalSize,id:"watchers-popup","hide-footer":"","header-close-content":"&times;","no-close-on-backdrop":"","data-cy":"watchers-modal"},on:{hidden:e.displayList},scopedSlots:e._u([{key:"modal-title",fn:function(){return[e._v(" "+e._s(e.$t("Watchers"))+" "),r("small",{staticClass:"d-block my-2 modal-subtitle"},[e._v(" "+e._s(e.$t("Manage your active watchers for this screen"))+" ")])]},proxy:!0}])},[e.enableList?[r("watchers-list",{on:{"display-form":e.displayForm,"edit-form":e.edit,"delete-form":e.confirmRemoval,"toggle-bypass":e.toggleBypass,ordered:function(i){return e.$emit("input",i)}},model:{value:e.current,callback:function(i){e.current=i},expression:"current"}}),r("div",{staticClass:"d-flex justify-content-end mt-3 mr-1"},[r("div",{staticClass:"d-flex align-items-end"},[r("button",{staticClass:"btn btn-secondary ml-3 text-uppercase",attrs:{"data-cy":"calcs-button-close"},on:{click:function(i){return e.$refs.modal.hide()}}},[e._v(" "+e._s(e.$t("Done"))+" ")])])])]:[r("required"),r("watchers-form",{attrs:{refs:"form",config:e.add},on:{"display-list":e.displayList,"save-form":e.save}})]],2)},h_=[],m_=oe(f_,p_,h_,!1,null,"d5f54c66",null,null);const v_=m_.exports,Fre="",g_={...Cs,FormMultiColumn:bu};function b_(t){let e=t.$parent;for(;e;){if(e.$options.name==="ScreenContent")return e;e=e.$parent}return null}const y_={install(t){if(t._processMakerVueFormBuilderInstalled)return;t._processMakerVueFormBuilderInstalled=!0,t.component("AddLoopRow",Zu),t.component("FormImage",Kn),t.component("FormAvatar",yn),t.component("FormLoop",ws),t.component("FormMultiColumn",bu),t.component("FormNestedScreen",Ps),t.component("FormRecordList",vu),t.component("Loop",iP),t.component("MultiColumn",aP),t.component("NewFormMultiColumn",Kf),t.component("ScreenRenderer",Pw),t.component("Task",rP),t.component("VueFormBuilder",Gw),t.component("VueFormRenderer",Ua),t.component("DefaultLoadingSpinner",nP),t.use(ee),t.component("FormButton",qi),t.component("FileUpload",bn),t.component("FileDownload",eo),t.component("FormAnalyticsChart",ks),t.component("FormMaskedInput",Wi),t.use(Dl),t.use(Et),t.component("FormListTable",Ss),t.component("LinkButton",Ts);const e=new Et.Store({modules:{globalErrorsModule:oP,undoRedoModule:Pu}});t.mixin({store:e}),t.mixin({methods:{getScreenDataReference(r=null,i=null){return b_(this).getDataReference(r,i)}}})}};function x_(t,e){t.defaults.adapter=Ug(t.defaults.adapter,{enabledByDefault:window.ProcessMaker.screen.cacheEnabled,cacheFlag:"useCache",defaultCache:new kl({ttl:window.ProcessMaker.screen.cacheTimeout,max:100})})}Z.AddLoopRow=Zu,Z.AnalyticsSelector=Rw,Z.BasicSearch=lP,Z.CollectionSelectList=tp,Z.ColorSelect=Cw,Z.ColumnSetup=Mw,Z.ComputedProperties=KK,Z.ContainerColumns=Dw,Z.Currencies=sG,Z.CurrentPageProperty=sc,Z.CustomCSS=r_,Z.DataFormatProperty=tP,Z.DataMapping=rp,Z.DataReference=fh,Z.DataTypeBooleanProperty=pK,Z.DataTypeDateTimeProperty=eP,Z.DataTypeProperty=$w,Z.DataTypeWithoutDateProperty=fK,Z.DefaultLoadingSpinner=nP,Z.DefaultValueEditor=ip,Z.DeviceDetector=mh,Z.DeviceVisibility=id,Z.EditOption=Aw,Z.FileDownload=eo,Z.FileUpload=bn,Z.FormAnalyticsChart=ks,Z.FormAvatar=yn,Z.FormBuilderControls=hK,Z.FormButton=qi,Z.FormImage=Kn,Z.FormInputMasked=Wi,Z.FormListTable=Ss,Z.FormLoop=ws,Z.FormMaskedInput=Wi,Z.FormMultiselect=ap,Z.FormNestedScreen=Ps,Z.FormRecordList=vu,Z.FormRecordListStatic=Sw,Z.FormRequests=ep,Z.FormTasks=$f,Z.FormText=gu,Z.HasColorProperty=vn,Z.ImageUpload=zw,Z.ImageVariable=Ow,Z.InputVariable=np,Z.Json2Vue=ob,Z.LabelSubmitButton=Hw,Z.LabelSubmitButtonProperty=og,Z.LinkButton=Ts,Z.LoadingSubmitButton=Bw,Z.LoadingSubmitButtonProperty=sg,Z.Loop=iP,Z.LoopInspector=Ew,Z.MultiColumn=aP,Z.MultipleUploadsCheckbox=Jw,Z.MustacheHelper=Ga,Z.NewFormMultiColumn=Kf,Z.OptionsList=jw,Z.OutboundConfig=sp,Z.PageSelect=Nw,Z.RequiredCheckbox=Xw,Z.ScreenBase=nd,Z.ScreenRendererError=Yf,Z.ScreenSelector=Iw,Z.SelectDataTypeMask=op,Z.Task=rP,Z.Tooltip=rd,Z.ValidationMsg=ol,Z.ValidationSelect=Fw,Z.VariableNameGenerator=Vw,Z.VisibilityRule=lg,Z.VueFormBuilder=Gw,Z.VueFormRenderer=Ua,Z.WatchersForm=SP,Z.WatchersList=kP,Z.WatchersPopup=v_,Z.WatchersSynchronous=ww,Z.accordions=Ww,Z.bgcolorProperty=li,Z.buttonLabelProperty=rg,Z.buttonTypeEvent=ag,Z.buttonVariantStyleProperty=sl,Z.canOpenJsonFile=$S,Z.colorProperty=ui,Z.computedFields=uh,Z.dataSourceValues=ei,Z.dataSources=Ms,Z.datatable=oc,Z.default=y_,Z.defaultValueProperty=Hn,Z.defaultValues=Y0,Z.deviceVisibilityProperty=Q5,Z.disabledProperty=ad,Z.focusErrors=lc,Z.formTypes=Ds,Z.formWatchers=dA,Z.getValidPath=Nc,Z.globalErrorsModule=oP,Z.globalProperties=QY,Z.helperTextProperty=xa,Z.initializeScreenCache=x_,Z.inspector=qw,Z.javascriptReservedKeywords=al,Z.keyNameProperty=Qt,Z.labelProperty=Wr,Z.multiselectApi=lb,Z.mustacheEvaluation=Ed,Z.placeholderProperty=Bn,Z.readonlyProperty=nl,Z.renderer=g_,Z.shouldElementBeVisible=ub,Z.testing=db,Z.toggleStyleProperty=ig,Z.tooltipProperty=ng,Z.validationRulesProperty=Hi,Z.validators=ll,Z.watchers=ug,Object.defineProperties(Z,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
381
+ }`,modifiers:{hover:!0,right:!0}}],key:o,staticClass:"gray-text",attrs:{boundary:"viewport","data-cy":`controls-${s.component}`}},[s.config&&s.config.icon?r("i",{class:s.config.icon}):e._e(),r("span",{staticClass:"svg-icon",staticStyle:{width:"12px",height:"12px"},domProps:{innerHTML:e._s(s.config.svg)}}),e._v(" "+e._s(e.$t(s.label))+" ")])}),1):e._e()],1)],1)]})],2)],1)],1),r("b-col",{ref:"screen-container",staticClass:"overflow-auto mh-100 p-0 d-flex flex-column position-relative",attrs:{id:"screen-container"}},[r("tabs-bar",{ref:"tabsBar",attrs:{pages:e.config,"is-multi-page":e.showToolbar},on:{"tab-opened":function(i){e.currentPage=i}},scopedSlots:e._u([{key:"tabs-start",fn:function(){return[e.showToolbar?r("pages-dropdown",{attrs:{data:e.sortedPages},on:{addPage:function(i){return e.$bvModal.show("addPageModal")},clickPage:e.onClick,seeAllPages:function(i){return e.$bvModal.show("openSortable")}}}):e._e()]},proxy:!0},{key:"default",fn:function({currentPage:i}){return[e.isCurrentPageEmpty(i)?r("div",{staticClass:"d-flex justify-content-center align-items-center drag-placeholder text-center position-absolute rounded mt-4 flex-column",attrs:{"data-cy":"screen-drop-zone"}},[r("svg",{attrs:{width:"81",height:"107",viewBox:"0 0 81 107",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[r("path",{attrs:{d:"M47.125 28.6562V0.5H5.71875C2.96523 0.5 0.75 2.71523 0.75 5.46875V101.531C0.75 104.285 2.96523 106.5 5.71875 106.5H75.2812C78.0348 106.5 80.25 104.285 80.25 101.531V33.625H52.0938C49.3609 33.625 47.125 31.3891 47.125 28.6562ZM60.375 77.5156C60.375 78.882 59.257 80 57.8906 80H23.1094C21.743 80 20.625 78.882 20.625 77.5156V75.8594C20.625 74.493 21.743 73.375 23.1094 73.375H57.8906C59.257 73.375 60.375 74.493 60.375 75.8594V77.5156ZM60.375 64.2656C60.375 65.632 59.257 66.75 57.8906 66.75H23.1094C21.743 66.75 20.625 65.632 20.625 64.2656V62.6094C20.625 61.243 21.743 60.125 23.1094 60.125H57.8906C59.257 60.125 60.375 61.243 60.375 62.6094V64.2656ZM60.375 49.3594V51.0156C60.375 52.382 59.257 53.5 57.8906 53.5H23.1094C21.743 53.5 20.625 52.382 20.625 51.0156V49.3594C20.625 47.993 21.743 46.875 23.1094 46.875H57.8906C59.257 46.875 60.375 47.993 60.375 49.3594ZM80.25 25.7371V27H53.75V0.5H55.0129C56.3379 0.5 57.6008 1.01758 58.5324 1.94922L78.8008 22.2383C79.7324 23.1699 80.25 24.4328 80.25 25.7371Z",fill:"#699CFF"}})]),r("h3",[e._v(e._s(e.$t("Place your controls here.")))]),r("p",[e._v(" "+e._s(e.$t("To begin creating a screen, drag and drop items from the Controls Menu on the left."))+" ")])]):e._e(),e.renderControls?r("draggable",e._b({key:e.editorContentKey,staticClass:"h-100",attrs:{"data-cy":"editor-content","ghost-class":"form-control-ghost",value:e.config[i].items},on:{input:e.updateConfig}},"draggable",{group:{name:"controls"},swapThreshold:.5},!1),e._l(e.config[i].items,function(a,n){return r("div",{key:n,staticClass:"control-item mt-4 mb-4",class:{selected:e.selected===a,hasError:e.hasError(a)},attrs:{selector:a.config.customCssSelector},on:{click:function(s){return e.inspect(a)}}},[a.container?r("div",{staticClass:"card container-lement",class:{"ai-section-card":e.isAiSection(a)},attrs:{"data-cy":"screen-element-container"},on:{click:function(s){return e.inspect(a)}}},[e.selected===a?r("div",{staticClass:"card-header form-element-header d-flex align-items-center",class:{pulse:e.isAiSection(a)&&e.aiPreview(a)}},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),a.config.icon?r("i",{staticClass:"mr-2 ml-1",class:a.config.icon}):e._e(),e._v(" "+e._s(a.config.name||a.label||e.$t("Field Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(a)&&e.aiPreview(a)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{"data-test":"apply-ai-btn",title:e.$t("Apply Changes")},on:{click:function(s){return e.applyAiChanges(a)}}},[e._v(" "+e._s(e.$t("Apply Changes"))+" ")]):e._e(),e.isAiSection(a)&&e.aiPreview(a)?e._e():r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{"data-test":"copy-control-btn",title:e.$t("Copy Control")},on:{click:function(s){return e.duplicateItem(n)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"data-test":"delete-control-btn",title:e.$t("Delete Control")},on:{click:function(s){return e.deleteItem(n)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(a["editor-component"],{tag:"component",staticClass:"card-body",class:e.elementCssClass(a),attrs:{"validation-errors":e.validationErrors,selected:e.selected,config:a.config,"ai-element":a},on:{inspect:e.inspect,"update-state":e.updateState},model:{value:a.items,callback:function(s){e.$set(a,"items",s)},expression:"element.items"}})],1):r("div",{staticClass:"card",attrs:{"data-cy":"screen-element-container"}},[e.selected===a?r("div",{staticClass:"card-header form-element-header d-flex align-items-center"},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),a.config.icon?r("i",{staticClass:"mr-2 ml-1",class:a.config.icon}):e._e(),e._v(" "+e._s(a.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(s){return e.duplicateItem(n)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{title:e.$t("Delete Control")},on:{click:function(s){return e.deleteItem(n)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(a["editor-component"],e._b({tag:"component",staticClass:"card-body m-0 pb-4 pt-4",class:[e.elementCssClass(a),{"prevent-interaction":!a.config.interactive}],attrs:{tabindex:a.config.interactive?0:-1},on:{input:function(s){a.config.interactive&&(a.config.content=s)}},nativeOn:{focusout:function(s){return e.updateState.apply(null,arguments)}}},"component",a.config,!1))],1)])}),0):e._e(),e.isCurrentPageEmpty(i)?e._e():r("div",{attrs:{"data-cy":"screen-drop-zone"}},[e._v("   ")])]}}])})],1),e.renderControls?r("b-col",{staticClass:"overflow-hidden h-100 p-0 inspector-column"},[r("b-card",{staticClass:"p-0 h-100 border-top-0 border-bottom-0 border-right-0 rounded-0",attrs:{"no-body":""}},[r("b-card-body",{staticClass:"p-0 h-100 overflow-auto"},[e._l(e.accordions,function(i){return[e.getInspectorFields(i)&&e.getInspectorFields(i).length>0?r("b-button",{key:`${e.accordionName(i)}-button`,staticClass:"text-left card-header d-flex align-items-center w-100 outline-0 text-capitalize shadow-none",attrs:{variant:"outline","data-cy":`accordion-${e.accordionName(i).replace(" ","")}`,"accordion-name":`accordion-${e.accordionName(i).replace(" ","")}`,"is-open":i.open?"1":"0"},on:{click:function(a){return e.toggleAccordion(i)}}},[r("i",{staticClass:"fas fa-cog mr-2"}),e._v(" "+e._s(e.$t(e.accordionName(i)))+" "),r("i",{staticClass:"fas fa-angle-down ml-auto",class:{"fas fa-angle-right":!i.open}})]):e._e(),r("b-collapse",{key:`${e.accordionName(i)}-collapse`,attrs:{id:e.accordionName(i)},model:{value:i.open,callback:function(a){e.$set(i,"open",a)},expression:"accordion.open"}},e._l(e.getInspectorFields(i),function(a,n){return r(a.type,e._b({key:n,tag:"component",staticClass:"border-bottom m-0 p-4",attrs:{"data-cy":"inspector-"+(a.field||a.config.name),"field-name":a.field,"field-accordion":`accordion-${e.accordionName(i).replace(" ","")}`,builder:e.builder,"form-config":e.config,"screen-type":e.screenType,"current-page":e.currentPage,"selected-control":e.selected},on:{"update-state":e.updateState,setName:function(s){e.inspection.config.name=s}},nativeOn:{focusout:function(s){return e.updateState.apply(null,arguments)}},model:{value:e.inspection.config[a.field],callback:function(s){e.$set(e.inspection.config,a.field,s)},expression:"inspection.config[item.field]"}},"component",a.config,!1))}),1)]})],2)],1)],1):e._e(),r("b-modal",{ref:"openSortable",attrs:{id:"openSortable","header-close-content":"&times;",role:"dialog",size:"lg",title:e.$t("Edit Pages"),"ok-title":e.$t("DONE"),"ok-only":"","ok-variant":"secondary","header-class":"modal-header-custom"},scopedSlots:e._u([{key:"modal-title",fn:function(){return[r("h5",{staticClass:"modal-title"},[e._v(e._s(e.$t("Edit Pages")))]),r("span",{staticClass:"modal-subtitle"},[e._v(e._s(e.$t("Change pages order and name")))])]},proxy:!0},{key:"modal-header-close",fn:function({close:i}){return[r("button",{staticClass:"close",attrs:{type:"button","aria-label":"Close"}},[e._v("×")])]}}])},[r("Sortable",{attrs:{fields:e.fields,items:e.config,"search-properties":e.searchProperties},on:{"item-edit":()=>{},"item-delete":e.confirmDelete,"add-page":function(i){return e.$bvModal.show("addPageModal")}}})],1),r("b-modal",{ref:"addPageModal",attrs:{id:"addPageModal","header-class":"pb-2",size:"lg","ok-title":e.$t("SAVE"),"cancel-title":e.$t("CANCEL"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","header-close-content":"&times;","data-cy":"add-page-modal","ok-disabled":!e.addPageName||!!e.checkPageName(e.addPageName)},on:{ok:e.addPage,show:function(i){e.addPageName="",e.showAddPageValidations=!1}},scopedSlots:e._u([{key:"modal-title",fn:function(){return[r("h5",{staticClass:"modal-title"},[e._v(e._s(e.$t("Create New Page")))]),r("small",{staticClass:"modal-subtitle mb-n2"},[e._v(e._s(e.$t("Create a new page in your screen")))])]},proxy:!0}])},[r("form-input",{ref:"addPageInput",attrs:{name:e.$t("Page Name"),label:e.$t("Page Name")+" *",helper:e.$t("The name of the new page to add"),error:e.checkPageName(e.addPageName),"data-cy":"add-page-name","aria-required":"true"},model:{value:e.addPageName,callback:function(i){e.addPageName=i},expression:"addPageName"}})],1),r("b-modal",{ref:"editPageModal",attrs:{title:e.$t("Edit Page Title"),"ok-title":e.$t("Save"),"cancel-title":e.$t("Cancel"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","header-close-content":"&times;"},on:{ok:e.editPage}},[r("required"),r("form-input",{ref:"editPageInput",attrs:{name:e.$t("Page Name"),label:e.$t("Page Name")+" *",helper:e.$t("The new name of the page"),validation:"required",error:e.checkPageName(e.editPageName),required:"","aria-required":"true"},model:{value:e.editPageName,callback:function(i){e.editPageName=i},expression:"editPageName"}})],1),r("b-modal",{ref:"confirm",attrs:{title:e.$t("Caution!"),"ok-title":e.$t("Delete"),"cancel-title":e.$t("Cancel"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","header-close-content":"&times;"},on:{ok:e.deletePage,cancel:e.hideConfirmModal}},[r("p",[e._v(e._s(e.confirmMessage))]),r("div",{attrs:{slot:"modal-ok"},slot:"modal-ok"},[e._v(e._s(e.$t("Delete")))])])],1)},_Z=[],$Z=oe(ZZ,KZ,_Z,!1,null,"45b59613",null,null);const Gw=$Z.exports,eK=1,tK={name:"FormMultiColumn",mixins:[vn,ub,Nc],props:["value","selected","name","config","transientData","formConfig"],components:{draggable:Di,FormInput:Wi,FormSelectList:ee.FormSelectList,FormTextArea:ee.FormTextArea,FormCheckbox:ee.FormCheckbox,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},data(){return{items:[]}},computed:{model(){return this.$parent.model}},watch:{value:{handler(){this.items=this.value},immediate:!0},items(){this.$emit("input",this.items)}},methods:{classColumn(t){let e=eK;return this.config.options[t]&&this.config.options[t].content&&(e=this.config.options[t].content),`col-sm-${e} ${this.columnVerticalAlign(t)}`},columnVerticalAlign(t){let e="";if(this.items.length>0&&this.items[t].length===1){let r=this.items[0].filter(n=>n.component==="FormText");if(r.length===0)return"";let i=r[0],a=" justify-content-"+(i.config.textAlign==="right"?"end":i.config.textAlign);switch(i.config.verticalAlign){case"top":e="d-flex align-items-start"+a;break;case"middle":e="d-flex align-items-center"+a;break;case"bottom":e="d-flex align-items-end"+a;break}}return e},inspect(t){this.$emit("inspect",t)},submit(){this.$emit("submit")},pageNavigate(t){this.$emit("pageNavigate",t)}}};var rK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group"},[r("div",{staticClass:"row"},e._l(e.items,function(i,a){return r("div",{key:a,staticClass:"column-draggable",class:e.classColumn(a)},[e._l(i.filter(e.shouldElementBeVisible),function(n,s){return[n.container?r(n.component,{key:s,ref:"container",refInFor:!0,tag:"component",class:e.elementCssClass(n),attrs:{transientData:e.transientData,config:n.config,name:n.config.name!==void 0?n.config.name:null,"form-config":e.formConfig},on:{submit:e.submit,pageNavigate:e.pageNavigate},model:{value:n.items,callback:function(o){e.$set(n,"items",o)},expression:"element.items"}}):r("div",{key:s,staticClass:"w-100",attrs:{id:n.config.name?n.config.name:void 0,selector:n.config.customCssSelector}},[r(n.component,e._b({ref:"elements",refInFor:!0,tag:"component",class:e.elementCssClass(n),attrs:{validationData:e.transientData,disabled:n.config.interactive||n.config.disabled,"form-config":e.formConfig},on:{submit:e.submit,pageNavigate:e.pageNavigate},model:{value:e.model[e.getValidPath(n.config.name)],callback:function(o){e.$set(e.model,e.getValidPath(n.config.name),o)},expression:"model[getValidPath(element.config.name)]"}},"component",n.config,!1))],1)]})],2)}),0)])},iK=[],aK=oe(tK,rK,iK,!1,null,null,null,null);const bu=aK.exports,Qw={value:"string",content:"Text"},Yw={value:"int",content:"Integer"},nK={value:"currency",content:"Currency"},sK={value:"password",content:"Password"},oK={value:"percentage",content:"Percentage"},Zw={value:"float",content:"Decimal"},Kw={value:"datetime",content:"Datetime"},_w={value:"date",content:"Date"},lK={value:"boolean",content:"Boolean"},uK=[Qw,Yw,nK,oK,Zw,Kw,_w,sK],cK=[Qw,Yw,Zw];function yu(t){return{type:"FormMultiselect",field:"dataFormat",config:{label:"Data Type",name:"Data Type",helper:"The data type specifies what kind of data is stored in the variable.",validation:"required",options:t}}}function dK(){return{type:op,field:"dataMask",config:{label:"Data Format",name:"Data Format",helper:"The data format for the selected type."}}}const $w=yu(uK),fK=yu(cK),pK=yu([lK]),eP=yu([_w,Kw]),tP=dK(),hK=[{editorComponent:ee.FormHtmlEditor,editorBinding:"FormHtmlEditor",rendererComponent:ee.FormHtmlEditor,rendererBinding:"FormHtmlEditor",control:{popoverContent:"Use a Rich Text Editor to add HTML-formatted",order:1,group:"Content Fields",label:"Rich Text",component:"FormHtmlViewer","editor-component":"FormHtmlEditor","editor-control":"FormHtmlEditor",config:{icon:"fas fa-pencil-ruler",interactive:!0,content:"<p>Rich text editor</p>",renderVarHtml:null},inspector:[{type:"FormTextArea",field:"content",config:{rows:5,label:"Content",helper:"The HTML text to display",value:""}},{type:"FormCheckbox",field:"renderVarHtml",config:{label:"Render HTML from a Variable",helper:"",value:""}}]}},{builderComponent:ee.FormInput,builderBinding:"FormInput",rendererComponent:Wi,rendererBinding:"FormMaskedInput",control:{popoverContent:"Collect a string of text and format it as one of several data types",order:1,group:"Input Fields",label:"Line Input",component:"FormInput","editor-component":"FormInput","editor-control":"FormInput",config:{icon:"far fa-square",label:"New Input",name:"",placeholder:"",validation:"",helper:null,type:"text",dataFormat:"string"},inspector:[Qt,Wr,$w,tP,Hi,Bn,xa,nl,ui,li,Hn]}},{editorComponent:ee.FormTextArea,editorBinding:"FormTextArea",rendererComponent:ee.FormTextArea,rendererBinding:"FormTextArea",control:{popoverContent:"Collect a multi-line string of text, to allow for extensive, richly formatted responses",order:4,group:"Input Fields",label:"Textarea",component:"FormTextArea","editor-component":"FormTextArea","editor-control":"FormTextArea","fa-icon":"fas fa-paragraph",config:{icon:"fas fa-paragraph",label:"New Textarea",placeholder:"",helper:null,rows:2,richtext:!1,currency:{code:"USD",name:"US Dollar",format:"#,###.##",symbol:"$"}},inspector:[Qt,Wr,Bn,xa,{type:"FormCheckbox",field:"richtext",config:{label:"Rich Text",helper:""}},Hi,{type:"FormInput",field:"rows",config:{label:"Rows",helper:"The number of rows to provide for input",validation:"integer"}},nl,ui,li,Hn]}},{editorComponent:ee.FormSelectList,editorBinding:"FormSelectList",rendererComponent:ee.FormSelectList,rendererBinding:"FormSelectList",control:{popoverContent:"Collect options from a list, as radio butttons or dropdowns",order:2,group:"Input Fields",label:"Select List",component:"FormSelectList","editor-component":"FormSelectList","editor-control":"FormSelectList",config:{icon:"fas fa-angle-double-down",label:"New Select List",placeholder:"",validation:"",dataSourceUrl:"",dataSourceEndpoint:"",rootElement:"response",options:{showRenderAs:!0,dataSource:ei.provideData,jsonData:"",pmqlQuery:"",dataName:"response",renderAs:"dropdown",allowMultiSelect:!1,selectedOptions:[],optionsList:[],key:"value",value:"content",valueTypeReturned:"single"},helper:null},inspector:[Qt,Wr,Bn,Hi,xa,{type:"OptionsList",field:"options",config:{}},ui,li,Hn,nl]}},{editorComponent:ee.FormCheckbox,editorBinding:"FormCheckbox",rendererComponent:ee.FormCheckbox,rendererBinding:"FormCheckbox",control:{popoverContent:"Add a checkbox or toggle for true/false responses",order:6,group:"Input Fields",label:"Checkbox",component:"FormCheckbox","editor-component":"FormCheckbox","editor-control":"FormCheckbox",config:{icon:"fas fa-check-square",label:"New Checkbox",helper:null,name:null,initiallyChecked:!1,validation:"",toggle:!1},inspector:[Qt,Wr,xa,Hi,{type:"FormCheckbox",field:"initiallyChecked",config:{label:"Checked by default",helper:"Should the checkbox be checked by default"}},ui,li,ig,ad]}},{editorComponent:ee.FormDatePicker,editorBinding:"FormDatePicker",rendererComponent:ee.FormDatePicker,rendererBinding:"FormDatePicker",control:{popoverContent:"Collect a date or date/time",order:5,group:"Input Fields",label:"Date Picker",component:"FormDatePicker","editor-component":"FormDatePicker","editor-control":"FormDatePicker",config:{icon:"far fa-calendar-alt",label:"New Date Picker",type:"datetime",name:"",placeholder:"",minDate:"",maxDate:""},inspector:[{type:"FormInput",field:"minDate",config:{name:"Minimum Date",label:"Minimum Date",validation:"date_or_mustache"}},{type:"FormInput",field:"maxDate",config:{name:"Maximum Date",label:"Maximum Date",validation:"after_min_date|date_or_mustache"}},Qt,Wr,eP,Hi,Bn,xa,ui,li,ad,Hn]}},{editorComponent:qi,editorBinding:"FormButton",rendererComponent:qi,rendererBinding:"FormButton",control:{popoverContent:"Add special buttons that link between subpages within this Form",order:1,group:"Navigation",label:"Page Navigation",component:"FormButton","editor-component":"FormButton","editor-control":"PageNavigation",config:{icon:"far fa-compass",label:"Page Navigation",variant:"primary",event:"pageNavigate",eventData:null},inspector:[{type:"PageSelect",field:"eventData",config:{label:"Destination Screen",helper:"The destination page to navigate to"}},rg,sl]}},{editorComponent:bu,editorBinding:"FormMultiColumn",rendererComponent:bu,rendererBinding:"FormMultiColumn",control:{popoverContent:"Organize and group your content in columns",order:2,group:"Content Fields",label:"Multicolumn / Table",component:"FormMultiColumn","editor-component":"MultiColumn","editor-control":"MultiColumn",container:!0,items:[[],[]],config:{icon:"fas fa-table",options:[{value:"1",content:"6"},{value:"2",content:"6"}]},inspector:[{type:"ContainerColumns",field:"options",config:{label:"Column Width",validation:"columns-adds-to-12"}},ui,li]}},{editorComponent:ws,editorBinding:"FormLoop",rendererComponent:ws,rendererBinding:"FormLoop",control:{popoverContent:"Add a repeatable section of content",order:5,group:"Content Fields",label:"Loop",component:"FormLoop","editor-component":"Loop","editor-control":"Loop",container:!0,items:[],config:{name:"",icon:"fas fa-redo",settings:{type:"new",varname:"loop",times:"3",add:!1}},inspector:[{type:"LoopInspector",field:"settings",config:{}}]}},{editorComponent:gu,editorBinding:"FormText",rendererComponent:vu,rendererBinding:"FormRecordList",control:{popoverContent:"Format content in a table structure and allow for adding rows",order:4,group:"Content Fields",label:"Record List",component:"FormRecordList","editor-component":"FormText","editor-control":"FormRecordList",config:{name:"",icon:"fas fa-th-list",label:"New Record List",editable:!1,fields:{dataSource:ei.provideData,jsonData:""},form:""},inspector:[Qt,{type:"FormInput",field:"label",config:{label:"List Label",helper:"The label describes this record list"}},{type:"FormCheckbox",field:"editable",config:{label:"Editable?",helper:"Should records be editable/removable and can new records be added"}},{type:"ColumnSetup",field:"fields",config:{label:"Columns",helper:"List of columns to display in the record list"}},{type:"PageSelect",field:"form",config:{label:"Record Form",helper:"The form to use for adding/editing records"}},ui,li]}},{editorComponent:Kn,editorBinding:"FormImage",rendererComponent:Kn,rendererBinding:"FormImage",control:{popoverContent:"Upload an image to your screen",order:3,group:"Content Fields",label:"Image",component:"FormImage","editor-component":"FormImage","editor-control":"FormImage",config:{label:"Image",icon:"fas fa-image",variant:"primary",event:"submit",name:null,value:null,renderImage:!1},inspector:[{type:"FormInput",field:"name",config:{label:"Name",helper:"Image name"}},{type:"ImageUpload",field:"image",config:{label:"Upload",helper:"Upload image"}},{type:"ImageVariable",field:"imageName",config:{label:"Render from a variable name",helper:null}},{type:"FormInput",field:"height",config:{label:"Height",helper:"Image height",type:"number"}},{type:"FormInput",field:"width",config:{label:"Width",helper:"image width",type:"number"}}]}},{editorComponent:yn,editorBinding:"FormAvatar",rendererComponent:yn,rendererBinding:"FormAvatar",control:{popoverContent:"User avatar",order:3,group:"Dashboards",label:"User Avatar",component:"FormAvatar","editor-component":"FormAvatar","editor-control":"FormAvatar",config:{label:"User Avatar",icon:"fas fa-user-circle",variant:"primary",event:"submit",name:null,value:null,renderImage:!1},inspector:[{type:"FormInput",field:"height",config:{label:"Height",helper:"Avatar height",type:"number"}},{type:"FormInput",field:"width",config:{label:"Width",helper:"Avatar width",type:"number"}}]}},{editorComponent:qi,editorBinding:"FormSubmit",rendererComponent:qi,rendererBinding:"FormButton",control:{popoverContent:"Add an action to submit your form or update a field",order:3,group:"Input Fields",label:"Submit Button",component:"FormButton","editor-component":"FormButton","editor-control":"FormSubmit",config:{icon:"fas fa-share-square",label:"New Submit",variant:"primary",event:"submit",loading:!1,loadingLabel:"Loading...",defaultSubmit:!0,name:null,fieldValue:null,tooltip:{}},inspector:[{type:"FormInput",field:"label",config:{label:"Label",helper:"The label describes the button's text"}},{type:"FormInput",field:"name",config:{label:"Variable Name",name:"Variable Name",helper:"A variable name is a symbolic name to reference information.",validation:"regex:/^(?:[A-Za-z])(?:[0-9A-Z_.a-z])*(?<![.])$/|not_in:"+al}},ag,sg,og,ng,{type:"FormInput",field:"fieldValue",config:{label:"Value",helper:"The value being submitted"}},sl]}},{editorComponent:Ps,editorBinding:"FormNestedScreen",rendererComponent:Ps,rendererBinding:"FormNestedScreen",control:{popoverContent:"Add and reuse another Form within this Form",order:6,group:"Content Fields",label:"Nested Screen",component:"FormNestedScreen","editor-component":"FormNestedScreen","editor-control":"FormNestedScreen",config:{label:"Nested Screen",icon:"fas fa-file-invoice",variant:"primary",name:"Nested Screen",value:null},inspector:[{type:"ScreenSelector",field:"screen",config:{label:"Screen",name:"SelectScreen","validate-nested":!1,helper:"Select a screen"}}]}},{rendererComponent:bn,rendererBinding:"FileUpload",builderComponent:bn,builderBinding:"FileUpload",control:{group:"Files",popoverContent:"Collect files uploaded into the Form",order:1,label:"File Upload",component:"FileUpload","editor-component":"FileUpload","editor-control":"FileUpload",config:{label:"New File Upload",icon:"fas fa-file-upload"},inspector:[Qt,{type:"FormInput",field:"label",config:{label:"Label",helper:"The label describes the field's name"}},{type:"MultipleUploadsCheckbox",field:"multipleUpload",config:{label:"Upload multiple files"}},{type:"FormInput",field:"accept",config:{label:"File Accepted",helper:"Common file types: application/msword, image/gif, image/jpeg, application/pdf, application/vnd.ms-powerpoint, application/vnd.ms-excel, text/plain"}},{type:"RequiredCheckbox",field:"validation",config:{label:"Required",helper:"Prevent form from being submitted unless a file is uploaded"}}]}},{rendererComponent:gu,rendererBinding:"FormText",builderComponent:eo,builderBinding:"FileDownload",control:{popoverContent:"Offer a File download",order:2,group:"Files",label:"File Download",component:"FileDownload","editor-component":"FormText","editor-control":"FileDownload",config:{label:"New File Download",icon:"fas fa-file-download"},inspector:[{type:"FormInput",field:"label",config:{label:"Label",helper:"The text to display"}},{type:"FormInput",field:"name",config:{label:"Name",helper:"The name of the Download"}}]}},{rendererComponent:ee.BFormComponent,rendererBinding:"BFormComponent",builderComponent:ee.BFormComponent,builderBinding:"BFormComponent",control:{popoverContent:"Add one of several Bootstrap Vue components",order:1,group:"Advanced",label:"Bootstrap Component",component:"BFormComponent","editor-component":"BFormComponent","editor-control":"BFormComponent",config:{bootstrapComponent:"b-form-tags",bootstrapConfig:"{}",label:"New Bootstrap Component",icon:"fab fa-bootstrap"},inspector:[Qt,Wr,{type:"FormMultiselect",field:"bootstrapComponent",config:{icon:"fas",label:"Bootstrap vue component",validation:"required",options:[{value:"b-embed",content:"Embed"},{value:"b-img",content:"Image"},{value:"b-form-rating",content:"Form Rating"},{value:"b-form-spinbutton",content:"Form Spinbutton"},{value:"b-form-tags",content:"Form Tags"},{value:"b-form-timepicker",content:"Form Timepicker"},{value:"b-table",content:"Table"}]}},{type:"FormTextArea",field:"bootstrapConfig",config:{rows:5,label:"Config",helper:"Properties in JSON format. See https://bootstrap-vue.org/docs/components",value:"{}"}},Hi]}},{rendererComponent:ee.BWrapperComponent,rendererBinding:"BWrapperComponent",builderComponent:ee.BWrapperComponent,builderBinding:"BWrapperComponent",control:{popoverContent:"Wrap an existing subpage within this Form into a Bootstrap Vue component",order:2,group:"Advanced",label:"Bootstrap Wrapper",component:"BWrapperComponent","editor-component":"BWrapperComponent","editor-control":"BWrapperComponent",config:{bootstrapComponent:"b-modal",bootstrapConfig:"{}",label:"New Bootstrap Wrapper",icon:"fab fa-bootstrap",name:"",form:""},inspector:[Qt,Wr,{type:"FormMultiselect",field:"bootstrapComponent",config:{icon:"fas",label:"Bootstrap vue component",validation:"required",options:[{value:"b-alert",content:"Alert"},{value:"b-card",content:"Card"},{value:"b-collapse",content:"Collapse"},{value:"b-jumbotron",content:"Jumbotron"},{value:"b-modal",content:"Modal"}]}},{type:"PageSelect",field:"form",config:{label:"Page",helper:"The page to use inside the component"}},{type:"FormTextArea",field:"bootstrapConfig",config:{rows:5,label:"Config",helper:"Properties in JSON format. See https://bootstrap-vue.org/docs/components",value:"{}"}}]}},{editorComponent:Ss,editorBinding:"FormListTable",rendererComponent:Ss,rendererBinding:"FormListTable",control:{popoverContent:"Create List Table",order:6.5,group:"Dashboards",label:"List Table",component:"FormListTable","editor-component":"FormListTable","editor-control":"FormListTable",config:{label:"List Table",icon:"fas fa-list",variant:"primary"},inspector:[{type:"FormMultiselect",field:"listOption",config:{icon:"fas fa-list",label:"List Table",options:[{value:"My Tasks",content:"My Tasks"},{value:"My Requests",content:"My Cases"},{value:"Start New Request",content:"Start New Case"}]}}]}},{editorComponent:ks,editorBinding:"FormAnalyticsChart",rendererComponent:ks,rendererBinding:"FormAnalyticsChart",control:{popoverContent:"Add a chart from the Analytics Reports",order:6,group:"Dashboards",label:"Analytics Chart",component:"FormAnalyticsChart","editor-component":"FormAnalyticsChart","editor-control":"FormAnalyticsChart",config:{label:"Analytics Chart",icon:"fas fa-chart-area",variant:"primary"},inspector:[{type:"AnalyticsSelector",field:"listChartOption",config:{label:"Chart"}}]}},{editorComponent:Ts,editorBinding:"LinkButton",rendererComponent:Ts,rendererBinding:"LinkButton",control:{popoverContent:"Add a URL where this link should redirect",group:"Content Fields",order:6,label:"Link URL",component:"LinkButton","editor-component":"LinkButton","editor-control":"LinkButton",config:{label:"New Link",icon:"fas fa-link",variant:"primary",event:"link"},inspector:[{type:"FormInput",field:"label",config:{label:"Label",helper:"The label describes the button's text"}},{type:"FormInput",field:"linkUrl",config:{label:"Link URL",helper:"Type here the URL link. Mustache syntax is supported."}},sl]}}],mK="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgxIiBoZWlnaHQ9IjI4MCIgdmlld0JveD0iMCAwIDI4MSAyODAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik04NS4wNTYyIDczLjg4NkM4NS4wNTYyIDczLjg4NiAxMTUuMDggOTYuNjcgMTYwLjcyNCA1NC4wNjhDMjAxLjI2IDE2LjIzNDMgMjM0LjM1OSA3NS45Mjc1IDIzNC41OSAxMDQuNTEzQzIzNC44OSAxNDEuNTQzIDE5NC4wNTQgMTcxLjE3MyAyMTMuODcyIDE5NS40OTVDMjMzLjY5IDIxOS44MTcgMTc0LjU3IDI1OS45ODEgMTQyLjcwOCAyMjUuMjIyQzEwMy4wNzIgMTgxLjk4MyA5Mi4zMzQ1IDIxNy4xMTQgNjkuNzQyNSAyMTcuMTE0QzUzLjUyNzggMjE3LjExNCAyMC4yMzc2IDE3Ni44MjUgNDIuNzE4MSAxNDYuODUxQzYxLjYzNTIgMTIxLjYyOSA1MS4zMTgyIDExMy4yNTggNDYuMzIyIDEwNC41MTNDMzkuMTE0OSA5MS45MDIxIDU2LjIzMDQgNTcuNjcxNSA4NS4wNTYyIDczLjg4NloiIGZpbGw9IiNERUVFRkEiLz4KPHBhdGggZD0iTTIwNS41OTIgMTI0LjIzNUMyMDcuMjA2IDEyNC44MzUgMjA4Ljk2OSAxMjQuODc1IDIxMC42NDcgMTI0LjQ4OUMyMTcuNjc3IDEyMi44NzYgMjQxLjg1IDExOC42MDMgMjM3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ODIuMjg3TDE0Ni40OTQgMTY5LjkwNUMxNDYuNTAzIDE2OS41NzEgMTQ2LjYzNyAxNjkuMjUzIDE0Ni44NyAxNjkuMDE0QzE0Ny4xMDMgMTY4Ljc3NSAxNDcuNDE3IDE2OC42MzMgMTQ3Ljc1IDE2OC42MTVWMTY4LjYxNVoiIGZpbGw9IiM1MkE1RUMiLz4KPHBhdGggZD0iTTE1NC4zMjIgMTYzLjMxN0MxNTUuMTc0IDE2Mi42OTEgMTU2LjQ2MyAxNjMuMDQyIDE1Ny4yNDMgMTY0LjExMkwxNzEuMTAzIDE4My4xMUMxNzEuOTMxIDE4NC4yNDUgMTcxLjg2NyAxODUuNzQ0IDE3MC45NjMgMTg2LjQwOEwxNjkuNzAzIDE4Ny4zMzNDMTY4Ljc5OSAxODcuOTk3IDE2Ny40MTggMTg3LjU1OCAxNjYuNjY2IDE4Ni4zNjhMMTU0LjA2NSAxNjYuNDQ0QzE1My4zNTcgMTY1LjMyMyAxNTMuNDcgMTYzLjk0MyAxNTQuMzIyIDE2My4zMTdaIiBmaWxsPSIjNTJBNUVDIi8+Cjwvc3ZnPgo=",Cre="",vK={data(){return{title:"We're Sorry",message:"An error has occurred. Please try again. If the problem persists, please contact your administrator."}}};var gK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"simple-error-message-main"},[e._m(0),r("p",[r("span",{staticClass:"simple-error-message-title"},[e._v(" "+e._s(e.$t(e.title))+" ")])]),r("p",[r("span",{staticClass:"simple-error-message-message"},[e._v(e._s(e.$t(e.message)))])])])},bK=[function(){var t=this,e=t._self._c;return e("p",[e("img",{staticClass:"simple-error-message-icon",attrs:{src:mK}})])}],yK=oe(vK,gK,bK,!1,null,null,null,null);const xK=yK.exports,Mre="",wK={components:{simpleErrorMessage:xK,VueFormRenderer:Ua},props:{initialTaskId:{type:Number,default:null},initialScreenId:{type:Number,default:null},initialRequestId:{type:Number,default:null},initialProcessId:{type:Number,default:null},initialNodeId:{type:String,default:null},screenVersion:{type:Number,default:null},userId:{type:Number,default:null},csrfToken:{type:String,default:null},value:{type:Object,default:()=>{}},beforeLoadTask:{type:Function,default:()=>new Promise(t=>{t()})},initialLoopContext:{type:String,default:""},taskPreview:{type:Boolean,default:!1},loading:{type:Number,default:null},alwaysAllowEditing:{type:Boolean,default:!1},disableInterstitial:{type:Boolean,default:!1},waitLoadingListeners:{type:Boolean,default:!1}},data(){return{task:null,taskId:null,request:null,requestId:null,screen:null,screenId:null,renderComponent:"task-screen",processId:null,nodeId:null,disabled:!1,socketListeners:[],requestData:{},hasErrors:!1,refreshScreen:0,redirecting:null,loadingButton:!1,loadingTask:!1,loadingListeners:this.waitLoadingListeners,isSelfService:!1}},watch:{initialScreenId:{handler(){this.screenId=this.initialScreenId}},initialRequestId:{handler(){this.requestId=this.initialRequestId}},initialProcessId:{handler(){this.processId=this.initialProcessId}},initialNodeId:{handler(){this.nodeId=this.initialNodeId}},screenId:{handler(){this.screenId&&this.loadScreen(this.screenId)}},requestId:{handler(){this.requestId?(this.setMetaValue(),this.initSocketListeners()):this.unsubscribeSocketListeners()}},value:{handler(){this.requestData=this.value}},screen:{handler(){if(this.screen&&this.renderComponent!=="ConversationalForm")if(this.screen.type==="CONVERSATIONAL")this.renderComponent="ConversationalForm";else{const t=G.get(this.screen,"_interstitial",!1);let e=G.get(this,"task.component","task-screen");(e===null||t)&&(e="task-screen"),this.renderComponent=e}}}},computed:{shouldAddSubmitButton(){return this.task?this.task.bpmn_tag_name==="manualTask"||!this.task.screen&&this.task.element_type!=="startEvent":!1},showTaskIsCompleted(){return this.task&&this.task.advanceStatus==="completed"&&!this.screen},screenTypeClass(){return this.screen?this.screen.type.toLowerCase()+"-screen":void 0},parentRequest(){return G.get(this.task,"process_request.parent_request_id",null)}},methods:{disableForm(t){if(t instanceof Array)for(let e of t)e.component==="FormButton"&&e.config.event==="submit"?t.splice(t.indexOf(e),1):this.disableForm(e);return t.config!==void 0&&(t.config.disabled=!0),t.items!==void 0&&this.disableForm(t.items),t},showSimpleErrorMessage(){this.renderComponent="simpleErrorMessage"},loadScreen(t){let e="?include=nested";this.requestId&&(e+="&request_id="+this.requestId),this.$dataProvider.getScreen(t,e).then(r=>{this.screen=r.data})},reload(){this.taskId?this.loadTask():this.loadNextAssignedTask()},loadTask(t=!1){if(!this.taskId)return;let e=`/${this.taskId}?include=data,user,draft,requestor,processRequest,component,screen,requestData,loopContext,bpmnTagName,interstitial,definition,nested,userRequestPermission,elementDestination`;return this.screenVersion&&(e+=`&screen_version=${this.screenVersion}`),window.ProcessMaker&&window.ProcessMaker.packages&&window.ProcessMaker.packages.includes("package-vocabularies")&&(window.ProcessMaker.VocabulariesSchemaUrl=`vocabularies/task_schema/${this.taskId}`),this.beforeLoadTask(this.taskId,this.nodeId).then(()=>{this.$dataProvider.getTasks(e).then(r=>{if(this.task=r.data,this.linkTask(t),this.checkTaskStatus(),window.PM4ConfigOverrides&&window.PM4ConfigOverrides.getScreenEndpoint&&window.PM4ConfigOverrides.getScreenEndpoint.includes("tasks/")){const i=window.PM4ConfigOverrides.getScreenEndpoint.split("/");i[1]=this.task.id,window.PM4ConfigOverrides.getScreenEndpoint=i.join("/")}}).catch(()=>{this.hasErrors=!0}).finally(()=>{this.loadingTask=!1})})},linkTask(t){this.nodeId=this.task.element_id,this.listenForParentChanges(),this.task.process_request.status==="COMPLETED"&&(this.taskPreview||(this.$emit("completed",this.task.process_request.id),t&&window.ProcessMaker.apiClient.get(`/requests/${this.requestId}/end-event-destination`).then(e=>{var r,i;if(!((i=(r=e.data)==null?void 0:r.data)!=null&&i.endEventDestination)){window.location.href=`/requests/${this.requestId}`;return}this.processCompletedRedirect(e.data.data,this.userId,this.requestId)}))),this.taskPreview&&this.task.status==="CLOSED"&&(this.task.interstitial_screen._interstitial=!1,this.alwaysAllowEditing||(this.task.screen.config=this.disableForm(this.task.screen.config)),this.screen=this.task.screen)},prepareTask(){(!this.loadingButton||this.task.status==="ACTIVE")&&(this.resetScreenState(),this.requestData=G.get(this.task,"request_data",{}),this.loopContext=G.get(this.task,"loop_context",""),this.task.draft&&(this.requestData=G.merge({},this.requestData,this.task.draft.data)),this.refreshScreen++),this.$emit("task-updated",this.task),this.task.process_request.status==="ERROR"?(this.hasErrors=!0,this.$emit("error",this.requestId)):this.hasErrors=!1},resetScreenState(){this.loadingButton=!1,this.disabled=!1,this.$refs.renderer&&this.$refs.renderer.$children[0]&&(this.$refs.renderer.$children[0].currentPage=0,this.$refs.renderer.restartValidation())},checkTaskStatus(){this.task.status=="COMPLETED"||this.task.status=="CLOSED"||this.task.status=="TRIGGERED"?this.closeTask():this.screen=this.task.screen,this.prepareTask()},setSelfService(){this.$nextTick(()=>{window.ProcessMaker.isSelfService?this.isSelfService=!0:this.isSelfService=!1})},closeTask(t=null){this.hasErrors&&this.emitError(),this.shouldLoadNextTask()?this.loadNextAssignedTask(t):this.task.allow_interstitial?this.showInterstitial(t):this.taskPreview||this.emitClosedEvent()},shouldLoadNextTask(){return this.task.process_request.status==="COMPLETED"||this.loadingButton},showInterstitial(t){this.task.interstitial_screen._interstitial=!0,this.screen=this.task.interstitial_screen,this.loadNextAssignedTask(t)},emitError(){this.$emit("error",this.requestId)},async emitClosedEvent(){var t;this.$emit("closed",(t=this.task)==null?void 0:t.id,await this.getDestinationUrl())},async getDestinationUrl(){const{elementDestination:t,allow_interstitial:e}=this.task||{};if(!t)return null;if(t.type==="taskSource")try{const a={processRequestId:this.requestId,status:"ACTIVE",userId:this.userId},s=(await this.retryApiCall(()=>this.getTasks(a))).data.data[0];return e&&(s==null?void 0:s.user_id)===this.userId?`/tasks/${s.id}/edit`:this.getSessionRedirectUrl()}catch(a){return console.error("Error in getDestinationUrl:",a),null}const r=t.value;return r?(sessionStorage.setItem("sessionUrlActionBlocker",document.referrer),r):sessionStorage.getItem("elementDestinationURL")||null},getSessionRedirectUrl(){const t=sessionStorage.getItem("sessionUrlSelfService");return t?(sessionStorage.removeItem("sessionUrlSelfService"),t):document.referrer||"/tasks"},loadNextAssignedTask(t=null){if(t||(t=this.requestId),!this.userId)return;const e=window.Cypress?"":`&t=${Date.now()}`,r=`?user_id=${this.userId}&status=ACTIVE&process_request_id=${t}&include_sub_tasks=1${e}`;return this.$dataProvider.getTasks(r).then(i=>{if(i.data.data.length>0){let a=i.data.data[0];if(a.process_request_id!==this.requestId){if(this.redirecting===a.process_request_id)return;this.unsubscribeSocketListeners(),this.redirecting=a.process_request_id,this.$emit("redirect",a.id,!0);return}else this.emitIfTaskCompleted(t);this.taskId=a.id,this.nodeId=a.element_id,this.loadTask()}else this.parentRequest&&["COMPLETED","CLOSED"].includes(this.task.process_request.status)&&this.$emit("completed",this.getAllowedRequestId());this.disabled=!1})},emitIfTaskCompleted(t){this.task&&this.parentRequest&&t==this.task.process_request_id&&this.task.process_request.status==="COMPLETED"&&this.$emit("completed",this.parentRequest)},classHeaderCard(t){let e="bg-success";switch(t){case"completed":e="bg-secondary";break;case"overdue":e="bg-danger";break}return"card-header text-capitalize text-white "+e},afterSubmit(){this.$emit("after-submit",...arguments)},submit(t=null,e=!1,r=null){var i,a;this.disabled||(this.disabled=!0,t&&this.onUpdate(Object.assign({},this.requestData,t)),e?this.loadingButton=!0:this.loadingButton=!1,this.$emit("submit",this.task,e,r),(i=this.task)!=null&&i.allow_interstitial&&!this.loadingButton&&!this.disableInterstitial&&(this.task.interstitial_screen._interstitial=!0,this.screen=this.task.interstitial_screen),((a=this.task)==null?void 0:a.bpmn_tag_name)==="manualTask"&&(this.checkTaskStatus(),this.reload()))},onUpdate(t){this.$emit("input",t),this.setSelfService()},activityAssigned(){},processCompleted(t=null){let e;this.parentRequest&&(e=this.getAllowedRequestId(),this.$emit("completed",e))},async retryApiCall(t,e=3,r=1e3){for(let i=0;i<e;i++)try{return await t()}catch(a){if(i===e-1)throw a;await new Promise(n=>{setTimeout(n,r)})}},getNextRequest(t,e){return window.ProcessMaker.apiClient.post(`/process_events/${t}?event=${e}`,{})},getTasks(t){const e={user_id:this.userId,process_request_id:t.processRequestId,page:t.page||1,per_page:t.perPage||1,status:t.status},r=new URLSearchParams(e).toString();return this.$dataProvider.getTasks(`?${r}`)},parseJsonSafely(t){try{return JSON.parse(t)}catch(e){return console.error("Invalid JSON string:",e),null}},async processCompletedRedirect(t,e,r){try{if(t.endEventDestination.type!=="anotherProcess"){t!=null&&t.endEventDestination.value?window.location.href=t==null?void 0:t.endEventDestination.value:window.location.href=`/requests/${this.requestId}`;return}const i=this.parseJsonSafely(t.endEventDestination.value),n={processRequestId:(await this.retryApiCall(()=>this.getNextRequest(i.processId,i.startEvent))).data.id,status:"ACTIVE",page:1,perPage:1},o=(await this.retryApiCall(()=>this.getTasks(n))).data.data[0];o&&o.user_id===e?this.redirectToTask(o.id):this.redirectToRequest(r)}catch(i){console.error("Error processing completed redirect:",i),this.$emit("completed",r)}},getAllowedRequestId(){const e=(this.task.user_request_permission||[]).find(i=>i.process_request_id===this.parentRequest);return e&&e.allowed?this.parentRequest:this.requestId},redirectToTask(t){this.$emit("redirect",t)},redirectToRequest(t){window.location.href=`/requests/${t}`},initSocketListeners(){this.addProcessUpdateListener(),this.addRedirectListener(),this.loadingListeners=!1,this.taskId||this.reload()},addProcessUpdateListener(){this.addSocketListener(`updated-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.requestId}`,".ProcessUpdated",t=>this.handleProcessUpdate(t))},handleProcessUpdate(t){t.event==="ACTIVITY_EXCEPTION"&&(this.$emit("error",this.requestId),window.location.href=`/requests/${this.requestId}`)},addRedirectListener(){this.addSocketListener(`redirect-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.requestId}`,".RedirectTo",t=>this.handleRedirect(t))},handleRedirect(t){switch(t.method){case"redirectToTask":this.handleRedirectToTask(t);break;case"processUpdated":this.handleProcessUpdated(t);break;case"processCompletedRedirect":this.processCompletedRedirect(t.params[0],this.userId,this.requestId);break;default:this.handleDefaultRedirect(t)}},async handleRedirectToTask(t){var e;if((e=t==null?void 0:t.params[0])!=null&&e.tokenId){if(this.loadingTask=!0,this.task&&!(this.task.allow_interstitial||this.isSameUser(this.task,t))){window.location.href=await this.getDestinationUrl();return}this.nodeId=t.params[0].nodeId,this.taskId=t.params[0].tokenId,this.reload()}},isSameUser(t,e){var a,n,s;const r=((a=t.user)==null?void 0:a.id)===e.params[0].userId,i=((n=t.elementDestination)==null?void 0:n.type)===null||((s=t.elementDestination)==null?void 0:s.type)==="taskSource";return r&&i},handleProcessUpdated(t){var r,i,a,n;const e=(r=this.task.elementDestination)==null?void 0:r.value;if(e&&((i=t==null?void 0:t.params[0])==null?void 0:i.tokenId)===this.taskId&&((a=t==null?void 0:t.params[0])==null?void 0:a.requestStatus)==="ACTIVE"){window.location.href=e;return}["ACTIVITY_ACTIVATED","ACTIVITY_COMPLETED"].includes(t.event)&&t.elementType==="task"&&((n=this.task.elementDestination)!=null&&n.type||(this.taskId=t.taskId),this.reload()),t.event==="ACTIVITY_EXCEPTION"&&this.$emit("error",this.requestId)},handleDefaultRedirect(t){console.warn("redirect",t),window.location.href=`/requests/${this.requestId}`},existsEventMessage(t,e){return sessionStorage.getItem(t)?!0:(sessionStorage.setItem(t,e),!1)},listenForParentChanges(){this.parentRequest&&this.addSocketListener(`parent-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.parentRequest}`,".ProcessUpdated",t=>{["ACTIVITY_ACTIVATED"].includes(t.event)&&this.closeTask(this.parentRequest),["ACTIVITY_COMPLETED"].includes(t.event)&&this.task.process_request.status==="COMPLETED"&&this.processCompleted(),t.event==="ACTIVITY_EXCEPTION"&&this.$emit("error",this.requestId)})},addSocketListener(t,e,r,i){t in this.socketListeners||(this.socketListeners[t]={channel:e,event:r},window.Echo.private(e).listen(r,a=>{i(a)}))},unsubscribeSocketListeners(){Object.values(this.socketListeners).forEach(t=>{window.Echo.private(t.channel).stopListening(t.event)}),this.socketListeners={}},obtainPayload(t){return new Promise(e=>{window.ProcessMaker.apiClient.get(t).then(r=>{e(r.data)}).catch(()=>{})})},setMetaValue(){const t=document.head.querySelector('meta[name="request-id"]');t&&t.setAttribute("content",this.requestId)},hasUrlActionBlocker(){var e;const t=sessionStorage.getItem("sessionUrlActionBlocker");return t?(sessionStorage.removeItem("sessionUrlActionBlocker"),this.$emit("closed",(e=this.task)==null?void 0:e.id,t),!0):!1}},mounted(){this.screenId=this.initialScreenId,this.taskId=this.initialTaskId,this.requestId=this.initialRequestId,this.processId=this.initialProcessId,this.nodeId=this.initialNodeId,this.requestData=this.value,this.loopContext=this.initialLoopContext,this.loadTask(!0)},destroyed(){this.unsubscribeSocketListeners()}};var PK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"tab-pane active show h-100",attrs:{id:"tab-form",role:"tabpanel","aria-labelledby":"tab-form"}},[e.screen?[r("b-overlay",{attrs:{show:e.disabled||e.isSelfService,id:"overlay-background",variant:e.isSelfService?"white":"transparent",blur:null,cardStyles:"pointer-events: none;pointer-events: none;inset: 1px",rounded:"sm"},scopedSlots:e._u([{key:"overlay",fn:function(){return[r("div",{staticClass:"text-center"},[e.isSelfService?r("p",[e._v("Please claim this task to continue.")]):e._e()])]},proxy:!0}],null,!1,2076353390)},[r("div",{staticClass:"card card-body border-top-0 h-100",class:e.screenTypeClass},[e.renderComponent==="task-screen"?r("div",[r("vue-form-renderer",{key:e.refreshScreen,ref:"renderer",class:{loading:e.loadingTask||e.loadingListeners},attrs:{config:e.screen.config,computed:e.screen.computed,"custom-css":e.screen.custom_css,watchers:e.screen.watchers,"loop-context":e.loopContext},on:{update:e.onUpdate,"after-submit":e.afterSubmit,submit:e.submit},model:{value:e.requestData,callback:function(i){e.requestData=i},expression:"requestData"}})],1):r("div",[r(e.renderComponent,{tag:"component",attrs:{"process-id":e.processId,"instance-id":e.requestId,"token-id":e.taskId,screen:e.screen.config,"csrf-token":e.csrfToken,computed:e.screen.computed,"custom-css":e.screen.custom_css,watchers:e.screen.watchers,data:e.requestData,type:e.screen.type},on:{"after-submit":e.afterSubmit,submit:e.submit}})],1)]),e.shouldAddSubmitButton?r("div",{staticClass:"card-footer"},[r("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(i){return e.submit(null)}}},[e._v(" "+e._s(e.$t("Complete Task"))+" ")])]):e._e()])]:e._e(),e.showTaskIsCompleted?[r("div",{staticClass:"card card-body text-center"},[r("h1",[e._v(" "+e._s(e.$t("Task Completed"))+" "),r("i",{staticClass:"fas fa-clipboard-check"})])])]:e._e()],2)},SK=[],kK=oe(wK,PK,SK,!1,null,"5348c487",null,null);const rP=kK.exports,Are="",TK={name:"Loop",components:{draggable:Di,FormInput:ee.FormInput,FormSelectList:ee.FormSelectList,FormCheckbox:ee.FormCheckbox,FormTextArea:ee.FormTextArea,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},mixins:[vn],props:["value","name","config","selected","validationErrors"],data(){return{items:[],cancelledJobs:[]}},watch:{value:{handler(){this.items=this.value},immediate:!0},items(){this.$emit("input",this.items)}},mounted(){!localStorage.getItem("cancelledJobs")||localStorage.getItem("cancelledJobs")==="null"?this.cancelledJobs=[]:this.cancelledJobs=JSON.parse(localStorage.getItem("cancelledJobs")),this.$root.$on("ai-form-generated",(t,e)=>{this.previewAiChanges(t,e)}),this.$root.$on("ai-form-progress-updated",(t,e)=>{this.updateProgress(t,e)})},methods:{hasError(t){return this.validationErrors?this.validationErrors.some(({item:e})=>e===t):!1},inspect(t){this.$emit("inspect",t)},deleteItem(t){this.items.splice(t,1),this.$emit("update-state")},duplicateItem(t){const e=G.cloneDeep(this.items[t]);this.items.push(e),this.$emit("update-state")},isAiSection(t){return t.component==="AiSection"},aiPreview(t){return t.items&&t.items[0]&&t.items[0].length},applyAiChanges(t){this.$root.$emit("apply-ai-changes",t)},previewAiChanges(t,e){this.value.forEach(r=>{r.component==="AiSection"&&e===r.config.aiConfig.nonce&&this.$set(r,"items",JSON.parse(JSON.stringify(t)))})},updateProgress(t,e){this.value.forEach(r=>{if(r.component==="AiSection"&&e===r.config.aiConfig.nonce){if(this.cancelledJobs.some(i=>i===e))return;this.$set(r.config.aiConfig,"progress",t)}})}}};var CK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"column-draggable",attrs:{selector:e.config.customCssSelector}},[r("draggable",{staticStyle:{"min-height":"80px"},attrs:{list:e.items,group:"controls"}},e._l(e.items,function(i,a){return r("div",{key:a,staticClass:"control-item",class:{selected:e.selected===i,hasError:e.hasError(i)},on:{click:function(n){return n.stopPropagation(),e.inspect(i)}}},[i.container?r("div",{on:{click:function(n){return n.stopPropagation(),e.inspect(i)}}},[r("div",{staticClass:"m-2 card border-0",class:{"ai-section-card":e.isAiSection(i)&&e.selected===i}},[e.selected===i?r("div",{staticClass:"card-header form-element-header d-flex align-items-center border rounded",class:{pulse:e.isAiSection(i)}},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),i.config.icon?r("i",{staticClass:"mr-2 ml-1",class:i.config.icon}):e._e(),e._v(" "+e._s(i.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(i)&&e.aiPreview(i)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{title:e.$t("Apply Changes")},on:{click:function(n){return e.applyAiChanges(i)}}},[e._v(" "+e._s(e.$t("Apply Changes"))+" ")]):e._e(),e.isAiSection(i)&&e.aiPreview(i)?e._e():r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(n){return e.duplicateItem(a)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(n){return e.deleteItem(a)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(i["editor-component"],{tag:"component",staticClass:"mb-3 mr-3 ml-3",class:e.elementCssClass(i),attrs:{"validation-errors":e.validationErrors,selected:e.selected,"ai-element":i,config:i.config},on:{inspect:e.inspect,"update-state":function(n){return e.$emit("update-state")}},model:{value:i.items,callback:function(n){e.$set(i,"items",n)},expression:"element.items"}})],1)]):r("div",{attrs:{id:i.config.name?i.config.name:void 0}},[r("div",{staticClass:"m-2",class:{card:e.selected===i}},[e.selected===i?r("div",{staticClass:"card-header form-element-header d-flex align-items-center"},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),i.config.icon?r("i",{staticClass:"mr-2 ml-1",class:i.config.icon}):e._e(),e._v(" "+e._s(i.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(n){return e.duplicateItem(a)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(n){return e.deleteItem(a)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(i["editor-component"],e._b({tag:"component",staticClass:"p-3",class:[e.elementCssClass(i),{"prevent-interaction":!i.config.interactive}],attrs:{tabindex:i.config.interactive?0:-1,config:i.config},on:{input:function(n){i.config.interactive&&(i.config.content=n)}}},"component",i.config,!1))],1)])])}),0)],1)},MK=[],DK=oe(TK,CK,MK,!1,null,"06c4d69f",null,null);const iP=DK.exports,zre="",AK=1,zK={name:"MultiColumn",components:{draggable:Di,FormInput:ee.FormInput,FormSelectList:ee.FormSelectList,FormCheckbox:ee.FormCheckbox,FormTextArea:ee.FormTextArea,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},mixins:[vn],props:["value","name","config","selected","validationErrors"],data(){return{items:[],cancelledJobs:[]}},computed:{classContainer(){return this.items.length>0?"form-group":"column-draggable"}},watch:{value:{handler(){this.items=this.value},immediate:!0},items(){this.$emit("input",this.items)},"config.options":function(t){this.items=t.map((e,r)=>this.items[r]?this.items[r]:[])}},mounted(){!localStorage.getItem("cancelledJobs")||localStorage.getItem("cancelledJobs")==="null"?this.cancelledJobs=[]:this.cancelledJobs=JSON.parse(localStorage.getItem("cancelledJobs")),this.$root.$on("ai-form-generated",(t,e)=>{this.previewAiChanges(t,e)}),this.$root.$on("ai-form-progress-updated",(t,e)=>{this.updateProgress(t,e)})},methods:{hasError(t){return this.validationErrors.some(({item:e})=>e===t)},updateContainerConfig(t,e){this.items[e]=t,this.$emit("update-state")},classColumn(t){let e=AK;return this.config.options[t]&&this.config.options[t].content&&(e=this.config.options[t].content),`col-sm-${e}`},inspect(t){this.$emit("inspect",t)},deleteItem(t,e){this.items[t].splice(e,1),this.$emit("update-state")},duplicateItem(t,e){const r=G.cloneDeep(this.items[t][e]);this.items[t].push(r),this.$emit("update-state")},isAiSection(t){return t.component==="AiSection"},aiPreview(t){return t.items&&t.items[0]&&t.items[0].length},applyAiChanges(t){this.$root.$emit("apply-ai-changes",t)},previewAiChanges(t,e){this.value.forEach(r=>{r.forEach(i=>{i.component==="AiSection"&&e===i.config.aiConfig.nonce&&this.$set(i,"items",JSON.parse(JSON.stringify(t)))})})},updateProgress(t,e){this.value.forEach(r=>{r.forEach(i=>{if(i.component==="AiSection"&&e===i.config.aiConfig.nonce){if(this.cancelledJobs.some(a=>a===e))return;this.$set(i.config.aiConfig,"progress",t)}})})}}};var OK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"mb-1 mt-1 pb-0 pt-0",class:e.classContainer},[r("div",{attrs:{selector:e.config.customCssSelector}},[r("div",{staticClass:"row"},[e._l(e.items,function(i,a){return[r("draggable",{key:a,staticClass:"column-draggable",class:e.classColumn(a),attrs:{value:e.items[a],group:"controls"},on:{input:function(n){return e.updateContainerConfig(n,a)}},model:{value:e.items[a],callback:function(n){e.$set(e.items,a,n)},expression:"items[index]"}},e._l(i,function(n,s){return r("div",{key:s,staticClass:"control-item",class:{selected:e.selected===n,hasError:e.hasError(n)},on:{click:function(o){return o.stopPropagation(),e.inspect(n)}}},[n.container?r("div",{on:{click:function(o){return o.stopPropagation(),e.inspect(n)}}},[r("div",{staticClass:"m-2 card border-0",class:{"ai-section-card":e.isAiSection(n)&&e.selected===n}},[e.selected===n?r("div",{staticClass:"card-header form-element-header d-flex align-items-center border rounded",class:{pulse:e.isAiSection(n)}},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),n.config.icon?r("i",{staticClass:"mr-2 ml-1",class:n.config.icon}):e._e(),e._v(" "+e._s(n.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(n)&&e.aiPreview(n)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{title:e.$t("Apply Changes")},on:{click:function(o){return e.applyAiChanges(n)}}},[e._v(" "+e._s(e.$t("Apply Changes"))+" ")]):e._e(),e.isAiSection(n)&&e.aiPreview(n)?e._e():r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{"aria-label":e.$t("Duplicate")},on:{click:function(o){return e.duplicateItem(a,s)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(o){return e.deleteItem(a,s)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(n["editor-component"],{tag:"component",staticClass:"mb-3 mr-3 ml-3",class:e.elementCssClass(n),attrs:{"validation-errors":e.validationErrors,selected:e.selected,"ai-element":n,config:n.config},on:{inspect:e.inspect,"update-state":function(o){return e.$emit("update-state")}},model:{value:n.items,callback:function(o){e.$set(n,"items",o)},expression:"element.items"}})],1)]):r("div",{attrs:{id:n.config.name?n.config.name:void 0}},[r("div",{staticClass:"m-2",class:{card:e.selected===n}},[e.selected===n?r("div",{staticClass:"card-header form-element-header d-flex align-items-center"},[r("i",{staticClass:"fas fa-arrows-alt-v mr-1 text-muted"}),n.config.icon?r("i",{staticClass:"mr-2 ml-1",class:n.config.icon}):e._e(),e._v(" "+e._s(n.config.name||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[r("button",{staticClass:"btn btn-sm btn-secondary mr-2",attrs:{title:e.$t("Copy Control")},on:{click:function(o){return e.duplicateItem(a,s)}}},[r("i",{staticClass:"fas fa-copy text-light"})]),r("button",{staticClass:"btn btn-sm btn-danger",attrs:{"aria-label":e.$t("Delete")},on:{click:function(o){return e.deleteItem(a,s)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(n["editor-component"],e._b({tag:"component",staticClass:"p-3",class:[e.elementCssClass(n),{"prevent-interaction":!n.config.interactive}],attrs:{tabindex:n.config.interactive?0:-1,config:n.config},on:{input:function(o){n.config.interactive&&(n.config.content=o)}}},"component",n.config,!1))],1)])])}),0)]})],2)])])},EK=[],jK=oe(zK,OK,EK,!1,null,"eaf6f1c4",null,null);const aP=jK.exports,NK={name:"default-loading-spinner"};var IK=function(){var e=this,r=e._self._c;return r("div",[e._v("Loading Data...")])},LK=[],FK=oe(NK,IK,LK,!1,null,null,null,null);const nP=FK.exports,BK=!0;function xu(t){let e=0;return typeof t!="object"||Object.entries(t).forEach(([r,i])=>{if(i){if(typeof i=="object"&&"$each"in i){e+=xu(i.$each.$iter);return}r!=="$iter"&&typeof i=="object"&&"$invalid"in i&&i.$invalid&&Number.isNaN(Number(r))&&e++,r!=="$iter"&&i&&(e+=xu(i))}}),e}const sP=async(t,e)=>{if(t.length===0)return;const r=ph(t[0]),i=[];t.forEach(n=>{r!==n&&i.push(n.loadValidationRules())}),await Promise.all(i);try{await r.loadValidationRules()}catch(n){console.warn("There was a problem rendering the screen",n)}const a=r.$v;if(a){let n=0,s="";a.$invalid&&(n+=xu(a.vdata),n+=xu(a.schema),s=n===1?"There is a validation error in your form.":"There are {{items}} validation errors in your form.",s=r.$t(s,{items:n})),e("basic",{key:"valid",value:!a.$invalid}),e("basic",{key:"message",value:s})}},HK=async(t,e)=>{t("basic",{key:"valid",value:!e.value}),t("disableSubmit",{key:"disableSubmit",value:e.value})},RK=G.debounce(sP,500),wu=[],qK=(t,e)=>{wu.includes(t)||wu.push(t),RK(wu,e)},oP={namespaced:BK,state:()=>({locked:!1,valid:!0,message:"",mode:"",submitted:!1,showValidationOnLoad:!1,disableSubmit:!1}),getters:{isValidScreen(t){return t.valid},getErrorMessage(t){return t.message},getMode(t){return t.mode},showValidationErrors(t){return t.showValidationOnLoad||t.submitted}},mutations:{basic(t,e){t[e.key]=e.value},setMode(t,e){t.mode=e},disableSubmit(t,e){t.disableSubmit=e.value,t.message=e.message}},actions:{restartValidation(){wu.length=0},validate({commit:t},e){qK(e,t)},async validateNow({commit:t},e){await sP([e],t)},close({commit:t}){t("basic",{key:"valid",value:!0})},hasSubmitted({commit:t},e){t("basic",{key:"submitted",value:e})},showValidationOnLoad({commit:t},e){t("basic",{key:"showValidationOnLoad",value:e})},async disableSubmitOnPhotoVideoUpload({commit:t},e){await HK(t,e)}}},Pu={namespaced:!0,state(){return{stack:[],position:null}},getters:{canUndo(t){return t.position>0},canRedo(t){return t.position<t.stack.length-1},currentState(t,e){const r=t.stack[t.position];return e.nextState&&e.nextState.deletedPage&&(r.currentPage=e.nextState.currentPage),r},nextState(t,e){return e.canRedo?t.stack[t.position+1]:!1}},mutations:{setPosition(t,e){t.position=e},setState(t,e){t.stack.push(e)}},methods:{emitChanges(){window.ProcessMaker.EventBus.$emit("screen-change")}},actions:{pushState({state:t,getters:e,commit:r},i){i.config!==e.currentState&&(r("setState",i),r("setPosition",t.stack.length-1),Pu.methods.emitChanges())},undo({state:t,getters:e,commit:r}){e.canUndo&&(r("setPosition",t.position-1),Pu.methods.emitChanges())},redo({state:t,getters:e,commit:r}){e.canRedo&&(r("setPosition",t.position+1),Pu.methods.emitChanges())}}},Ore="",WK={props:{placeholder:{type:String},value:{type:String}},data(){return{query:""}},watch:{query(t){this.$emit("input",t)}},methods:{runSearch(t){this.$emit("submit",this.query)}},mounted(){this.query=this.value}};var VK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"basic-search"},[r("div",{staticClass:"d-flex"},[r("div",{staticClass:"flex-grow-1"},[r("div",{staticClass:"search-bar-basic d-flex w-100"},[r("div",{staticClass:"search-bar-inputs flex-grow w-100"},[r("input",{directives:[{name:"model",rawName:"v-model",value:e.query,expression:"query"}],ref:"search_input",staticClass:"search-bar-manual-input form-control",attrs:{type:"text",placeholder:e.placeholder?e.placeholder:e.$t("Search"),"data-cy":"watchers-table-search"},domProps:{value:e.query},on:{keyup:function(i){return!i.type.indexOf("key")&&e._k(i.keyCode,"enter",13,i.key,"Enter")?null:e.runSearch.apply(null,arguments)},input:function(i){i.target.composing||(e.query=i.target.value)}}})]),r("div",{staticClass:"search-bar-actions d-flex flex-shrink"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"btn-search-run",attrs:{variant:"primary",title:e.$t("Search")},on:{click:e.runSearch}},[r("i",{staticClass:"fas fa-search",attrs:{"data-cy":"watchers-table-search-button"}})])],1)])]),r("div",{staticClass:"search-bar-buttons"},[e._t("buttons")],2)])])},XK=[],JK=oe(WK,VK,XK,!1,null,"d660c896",null,null);const lP=JK.exports,uP="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTUiIHZpZXdCb3g9IjAgMCAyMCAxNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTExLjI2MzIgNy4xMDUyOEgxNk0xNiA3LjEwNTI4TDE0LjAyNjMgOS4wNzg5Nk0xNiA3LjEwNTI4TDE1LjAxMzIgNi4xMTg0M0wxNC4wMjYzIDUuMTMxNTkiIHN0cm9rZT0iIzZBNzg4OCIgc3Ryb2tlLXdpZHRoPSIxLjUiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIvPgo8cmVjdCB4PSIzLjQ3OTEiIHk9IjAuOSIgd2lkdGg9IjcuNjczNjgiIGhlaWdodD0iMTIuNDEwNSIgcng9IjEuMSIgc3Ryb2tlPSIjNkE3ODg4IiBzdHJva2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NHoiPjwvcGF0aD48L3N2Zz4=",Ere="",UK=typeof window>"u"?global:window,GK={components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,MonacoEditor:Si,Sortable:lp},mixins:[lc],props:["value"],data(){return{required:!0,numberItem:0,displayList:!0,ruleDescription:"",ruleFormula:"",rulePropName:"",editorInvalid:!1,existsProperty:!1,current:[],add:{id:0,name:"",property:"",type:"expression",formula:""},css:{tableClass:"table table-hover table-responsive text-break mb-0",loadingClass:"loading",detailRowClass:"vuetable-detail-row",handleIcon:"grey sidebar icon",sortableIcon:"fas fa-sort",ascendingIcon:"fas fa-sort-up",descendingIcon:"fas fa-sort-down",ascendingClass:"ascending",descendingClass:"descending"},fields:[{label:this.$t("Name"),key:"property"},{label:this.$t("Type"),key:"type",cb:t=>{switch(t){case"expression":return"Formula";case"javascript":return"JavaScript";default:return t}}}],monacoOptions:{automaticLayout:!0,lineNumbers:"off",minimap:!1},monacoEditor:null,errors:{},searchProperties:["property","type"]}},computed:{javascriptTypeClass(){const{isJS:t}=this;return{"btn-outline-secondary":t,"text-dark":t,"btn-outline-light":!t,"text-secondary":!t}},expressionTypeClass(){const t=!this.isJS;return{"btn-outline-secondary":t,"text-dark":t,"btn-outline-light":!t,"text-secondary":!t}},isJS(){return this.add.type==="javascript"},modalSize(){return this.displayList?"lg":"xl"}},watch:{value(){this.value.forEach(t=>{this.numberItem++,t.id=this.numberItem,Object.hasOwn(t,"byPass")||(t.byPass=!1)}),this.current=this.value}},created(){Lt.register("exists-property",()=>{let t=!0;return this.current.forEach(e=>{e.property===this.add.property&&e.id!==this.add.id&&(t=!1)}),t},this.$t("Property already exists"))},methods:{switchExpressionType(t){this.add.type=t},show(){this.$refs.modal.show()},emptyForm(){this.add.id=0,this.add.name="",this.add.property="",this.add.type="expression",this.add.formula="",this.editorInvalid=!1,this.existsProperty=!1,this.ruleDescription="",this.ruleFormula="",this.rulePropName=""},displayTableList(){this.emptyForm(),this.displayList=!0},displayFormProperty(){this.emptyForm(),this.displayList=!1},validateData(){this.errors=[];const t={property:"required|exists-property",name:"required",formula:"required"},e={property:this.add.property,name:this.add.name,formula:this.add.formula},r=new Lt(e,t),i=r.passes();this.errors=Object.fromEntries(Object.keys(r.errors.all()).map(a=>[a,r.errors.first(a)])),i?this.saveProperty():this.focusFirstCalculatedPropertiesError()},toggleBypass(t){this.current=this.current.map(e=>e.id===t?{...e,byPass:!e.byPass}:e),this.$emit("input",this.current)},saveProperty(){this.add.id===0?(this.numberItem++,this.current.push({id:this.numberItem,property:this.add.property,name:this.add.name,formula:this.add.formula,type:this.add.type,byPass:!1})):this.current.forEach(t=>{t.id===this.add.id&&(t.name=this.add.name,t.property=this.add.property,t.formula=this.add.formula,t.type=this.add.type)}),this.$emit("input",this.current),this.displayTableList()},editProperty(t){this.add.id=t.id,this.add.name=t.name,this.add.property=t.property,this.add.type=t.type?t.type:"expression",this.add.formula=t.formula,this.displayList=!1},deleteProperty(t){UK.ProcessMaker.confirmModal(this.$t("Are you sure you want to delete the calc ?"),this.$t("If you do, you won’t be able to recover the Calc configuration."),"",()=>{this.remove(t)})},remove(t){this.current=this.current.filter(e=>e.id!==t.id),this.$emit("input",this.current),this.displayTableList()},editorMounted(t){this.monacoEditor=t},getByPassIcon(t){return new URL(Object.assign({"../assets/icons/Bypass.svg":uP,"../assets/icons/ErrorMessage.svg":cP,"../assets/icons/Unbypass.svg":dP,"../assets/icons/angle-double-right-solid.svg":fP,"../assets/icons/calendar-regular.svg":pP,"../assets/icons/caret-square-down-solid.svg":hP,"../assets/icons/check-square-solid.svg":mP,"../assets/icons/columns-solid.svg":vP,"../assets/icons/font-solid.svg":gP,"../assets/icons/list-ul-solid.svg":bP,"../assets/icons/paragraph-solid.svg":yP,"../assets/icons/share-square-solid.svg":xP,"../assets/icons/square-regular.svg":wP,"../assets/icons/th-list-solid.svg":PP})[`../assets/icons/${t.byPass?"Unbypass":"Bypass"}.svg`],self.location).href}}};var QK=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{id:"computed-properties",size:e.modalSize,"content-class":"p-3","header-class":"m-0 p-0 mb-3","body-class":"m-0 p-0","title-class":"m-0","footer-class":"m-0 p-0 border-0","no-close-on-backdrop":"","header-close-content":"&times;","data-cy":"calcs-modal"},on:{hidden:e.displayTableList},scopedSlots:e._u([{key:"modal-title",fn:function(){return[r("h5",{staticClass:"modal-title"},[e._v(e._s(e.$t("Calculated Properties")))]),r("small",{directives:[{name:"show",rawName:"v-show",value:!e.displayList,expression:"!displayList"}],staticClass:"modal-subtitle my-2"},[e._v(" "+e._s(e.$t("Perform mathematical calculations offering quick, convenient, and accurate operations, enhancing user efficiency and usability."))+" ")])]},proxy:!0}])},[e.displayList?[r("Sortable",{staticClass:"mb-3",attrs:{fields:e.fields,items:e.current,"disable-key":"byPass","inline-edit":!1,"data-test-actions":{tableBox:{"data-cy":"calcs-table"},btnNew:{"data-cy":"calcs-add-property"},btnEdit:{"data-cy":"calcs-table-edit"},btnDelete:{"data-cy":"calcs-table-remove"}},searchProperties:e.searchProperties},on:{"item-edit":e.editProperty,"item-delete":e.deleteProperty,"add-page":e.displayFormProperty},scopedSlots:e._u([{key:"options",fn:function({item:i}){return[r("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip",value:{customClass:"bypass-btn-tooltip"},expression:"{ customClass: 'bypass-btn-tooltip' }"}],staticClass:"btn",attrs:{title:i.byPass?e.$t("Unbypass Calc"):e.$t("Bypass Calc"),"data-test":"calcs-bypass"},on:{click:function(a){return e.toggleBypass(i.id)}}},[r("img",{attrs:{src:e.getByPassIcon(i),alt:"Bypass",width:"24"}})]),r("div",{staticClass:"sortable-item-vr"})]}}],null,!1,1100542621)}),r("template",{slot:"modal-footer"},[r("div",{staticClass:"d-flex align-items-end"},[r("button",{staticClass:"btn btn-secondary ml-3 text-uppercase",attrs:{"data-cy":"calcs-button-close"},on:{click:function(i){return e.$refs.modal.hide()}}},[e._v(" "+e._s(e.$t("Done"))+" ")])])])]:[r("b-row",[r("b-col",[r("form-input",{ref:"property",staticClass:"mb-3 calcs-input",attrs:{label:e.$t("Property Name")+" *",name:"property",error:e.errors.property,"data-cy":"calcs-property-name",required:"","aria-required":"true"},model:{value:e.add.property,callback:function(i){e.$set(e.add,"property",i)},expression:"add.property"}})],1),r("b-col",[r("form-text-area",{ref:"name",staticClass:"mb-3 calcs-input",attrs:{label:e.$t("Description")+" *",name:"name",error:e.errors.name,"data-cy":"calcs-property-description",required:"","aria-required":"true"},model:{value:e.add.name,callback:function(i){e.$set(e.add,"name",i)},expression:"add.name"}})],1)],1),r("div",{staticClass:"form-group mb-3",staticStyle:{position:"relative"}},[r("div",{staticClass:"d-flex justify-content-between mb-1"},[r("label",{staticClass:"m-0"},[e._v(e._s(e.$t("Formula")+" *"))]),r("div",[r("a",{staticClass:"btn btn-sm",class:e.expressionTypeClass,attrs:{"data-cy":"calcs-switch-formula"},on:{click:function(i){return e.switchExpressionType("expression")}}},[r("i",{staticClass:"fas fa-square-root-alt"})]),r("a",{staticClass:"btn btn-sm",class:e.javascriptTypeClass,attrs:{"data-cy":"calcs-switch-javascript"},on:{click:function(i){return e.switchExpressionType("javascript")}}},[r("i",{staticClass:"fab fa-js-square fa-lg"})])])]),r("form-text-area",{directives:[{name:"show",rawName:"v-show",value:!e.isJS,expression:"!isJS"}],ref:"formula",staticClass:"calcs-input-formula",attrs:{rows:"5",name:"formula",error:e.errors.formula,"data-cy":"calcs-property-formula",required:"","aria-required":"true"},model:{value:e.add.formula,callback:function(i){e.$set(e.add,"formula",i)},expression:"add.formula"}}),r("div",{directives:[{name:"show",rawName:"v-show",value:e.isJS,expression:"isJS"}],staticClass:"editor-border",class:{"is-invalid":!!e.errors.formula}}),r("monaco-editor",{directives:[{name:"show",rawName:"v-show",value:e.isJS,expression:"isJS"}],staticClass:"editor",attrs:{options:e.monacoOptions,language:"javascript","data-cy":"calcs-property-javascript",required:"","aria-required":"true"},on:{editorDidMount:e.editorMounted},model:{value:e.add.formula,callback:function(i){e.$set(e.add,"formula",i)},expression:"add.formula"}}),e.isJS&&e.errors.formula?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.errors.formula))])]):e._e()],1),r("template",{slot:"modal-footer"},[r("div",{staticClass:"d-flex align-items-end"},[r("button",{staticClass:"btn btn-outline-secondary text-uppercase",attrs:{"data-cy":"calcs-button-cancel"},on:{click:e.displayTableList}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-secondary ml-3 text-uppercase",attrs:{"data-cy":"calcs-button-save"},on:{click:e.validateData}},[e._v(" "+e._s(e.$t("Save"))+" ")])])])]],2)},YK=[],ZK=oe(GK,QK,YK,!1,null,"6d70559c",null,null);const KK=ZK.exports,jre="",_K={props:["value","cssErrors"],components:{MonacoEditor:Si},data(){return{saveValue:"",innerValue:"",monacoOptions:{language:"css",automaticLayout:!0,minimap:{enabled:!1}}}},watch:{innerValue(t){this.$emit("input",t)}},methods:{show(){this.innerValue=this.value,this.saveValue=this.value,this.$refs.modal.show()},close(){this.$refs.modal.hide()},hide(){this.innerValue=this.saveValue,this.$emit("input",this.innerValue)},save(){this.saveValue=this.innerValue,this.$refs.modal.hide()}}};var $K=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{size:"lg",id:"custom-css",title:e.$t("Custom CSS"),"cancel-variant":"btn btn-outline-secondary","ok-variant":"btn btn-secondary ml-2","no-close-on-backdrop":"","ok-title":e.$t("Save"),"cancel-title":e.$t("Cancel"),"header-close-content":"&times;"},on:{ok:e.save,cancel:e.close,hide:e.hide}},[r("p",[e._v(e._s(e.$t("You can set CSS Selector names in the inspector. Use them here with [selector='my-selector']")))]),r("div",{staticClass:"editor"},[r("monaco-editor",{staticClass:"monaco",attrs:{options:e.monacoOptions,"data-cy":"monaco-editor"},model:{value:e.innerValue,callback:function(i){e.innerValue=i},expression:"innerValue"}})],1),r("b-alert",{attrs:{show:e.cssErrors!="",variant:"danger"}},[r("pre",[e._v(e._s(e.cssErrors))])]),r("div",{attrs:{slot:"modal-cancel","data-cy":"cancel-button"},slot:"modal-cancel"},[e._v(e._s(e.$t("Cancel")))]),r("div",{attrs:{slot:"modal-ok","data-cy":"save-button"},slot:"modal-ok"},[e._v(e._s(e.$t("Save")))])],1)},e_=[],t_=oe(_K,$K,e_,!1,null,"3824b29b",null,null);const r_=t_.exports,Nre="",i_=typeof window>"u"?global:window,a_={name:"WatchersForm",components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,FormMultiSelect:ee.FormMultiSelect,FormCheckbox:ee.FormCheckbox,MonacoEditor:Si,DataMapping:rp,OutboundConfig:sp,ScreenVariableSelector:kw},mixins:[lc],props:{config:{type:Object,default(){return{name:"",watching:"",script:"",script_id:"",script_key:"",input_data:"{}",script_configuration:"{}",output_variable:"",synchronous:!1,run_onload:!1,show_async_loading:!1}}}},data(){return{scriptConfig:"",endpoint:null,endpoints:[],ruleWatcherName:"",ruleWatcherVariable:"",ruleWatcherScript:"",ruleWatcherOutputVariable:"",required:!0,inputDataInvalid:!1,scriptConfigurationInvalid:!1,scripts:[],script:null,monacoOptions:{automaticLayout:!0,lineNumbers:"on",minimap:{enabled:!1}},endpointError:null,inputDataEditor:null,scriptConfigEditor:null}},computed:{dataSourceLink(){const t=this.selectedDataSourceId(),e=this.endpoint;return t&&e?`/designer/data-sources/${t}/resources/${e}`:""},dataSourceConfigWarning(){const t=this.selectedDataSourceId(),e=this.scripts.find(i=>i.type==="Data Connectors");if(typeof e>"u"||e===null)return"";const r=e.items.find(i=>i.id===`data_source-${t}`);return typeof r>"u"||e===null?"":r.validationStatus.length>0?r.validationStatus:""},isDatasource(){return this.config.script&&this.config.script.id.substr(0,11)==="data_source"},isScript(){return!this.config.script||this.config.script.id.substr(0,6)==="script"},hasInputData(){let t;try{t=JSON.parse(this.config.script_configuration)}catch{return!1}return typeof t.input_data>"u"||t.input_data==null?!1:Object.keys(t.input_data).length===0&&t.input_data.constructor===Object},outputVarLabel(){const t=this.ruleWatcherOutputVariable=="required"?" *":"";return this.$t("Output Variable")+t}},watch:{scriptConfig(t){try{const e=JSON.parse(this.config.script_configuration),r=JSON.parse(t);this.config.script_configuration=JSON.stringify({...e,...r},null," ")}catch{}},endpoint(t){this.setConfig("endpoint",t);const e=this.scriptConfig?JSON.parse(this.scriptConfig):{},r=e.dataMapping||[],i=this.scripts.find(a=>a.items&&a.items.length>0&&a.items[0].id&&a.items[0].id.substr(0,11)==="data_source");if(i&&r.length===0){const a=i.items.find(s=>`data_source-${e.dataSource}`===s.id),n=(a.endpoints&&a.endpoints[t]?a.endpoints[t].dataMapping:[])||[];e.dataMapping=[],n.forEach(s=>{e.dataMapping.push({key:s.key,value:s.value})}),this.scriptConfig=JSON.stringify(e)}},config:{deep:!0,immediate:!0,handler(t){t.input_data||(t.input_data="{}"),t.script_configuration?this.scriptConfig=this.config.script_configuration:t.script_configuration="{}",this.endpoint=this.getConfig().endpoint}},"config.script":{handler(t,e){if(!t)this.config.script_id="",this.config.script_key="",this.config.datasource_script_id="";else if(typeof t=="object"){const r=t.id.split("-"),i=e&&e.id&&e.id.split("-").length>0?e.id.split("-")[0]:"";this.config.script_id=r[1],this.config.script_key=t.key,i!==r[0]&&(this.config.script_configuration="{}"),r[0]==="data_source"&&this.setConfig("dataSource",this.config.script_id),this.config.datasource_script_id=t.dataSourceScriptId}return t}}},methods:{selectedDataSourceId(){let t=null;try{t=JSON.parse(this.scriptConfig).dataSource}catch{t=null}return t},setValidations(){this.ruleWatcherName="required",this.ruleWatcherVariable="required",this.ruleWatcherScript="required",this.hasInputData&&(this.ruleWatcherOutputVariable="required")},getConfig(){try{return JSON.parse(this.config.script_configuration)}catch{return{}}},setConfig(t,e){const r=this.getConfig();JSON.stringify(r[t])!==JSON.stringify(e)&&(r[t]=e,this.config.script_configuration=JSON.stringify(r),this.scriptConfig=this.config.script_configuration)},loadEndpoints(){const t=this.config.script.id.substr(0,11)==="data_source"?this.config.script.id.substr(12):null;this.endpoints.splice(0),t&&window.ProcessMaker&&window.ProcessMaker.apiClient&&window.ProcessMaker.apiClient.get(`/data_sources/${t}`).then(e=>{for(const r in e.data.endpoints)this.endpoints.push(r)})},loadSources(){this.scripts=[],this.$root.$children[0].watchers_config.api.scripts.forEach(t=>{t(this.scripts)})},displayTableList(){this.$emit("display-list")},jsonIsValid(t){try{JSON.parse(this.config[t])}catch{return!1}return!0},isFormValid(){this.isDatasource&&!this.endpoint?this.endpointError=this.$t("Endpoint is required"):this.endpointError=null;for(const t in this.$refs)if(this.$refs[t]&&this.$refs[t].name&&this.$refs[t].validator&&this.$refs[t].validator.errorCount!==0)return!1;return!(!this.config.watching||!this.config.script||this.endpointError||!this.jsonIsValid("input_data")||!this.jsonIsValid("script_configuration"))},validateDataAndSave(){this.setValidations(),this.$nextTick(()=>{if(!this.isFormValid()){i_.ProcessMaker.alert(this.$t("An error occurred. Check the form for errors in red text."),"danger"),this.focusFirstWatcherError();return}this.config.uid||(this.config.uid=G.uniqueId(new Date().getTime()),this.config.byPass=!1),this.save()})},save(){this.$emit("save-form")},inputDataEditorMounted(t){this.inputDataEditor=t},scriptConfigEditorMounted(t){this.scriptConfigEditor=t}}};var n_=function(){var e=this,r=e._self._c;return r("div",[r("div",{staticClass:"accordion",attrs:{id:"watcherAccordion"}},[r("div",{staticClass:"card card-overflow"},[r("div",{staticClass:"card-header p-0"},[r("div",{staticClass:"mb-0"},[r("button",{ref:"watcherConfigButton",staticClass:"p-3 btn btn-link d-flex w-100 text-capitalize text-reset justify-content-between",attrs:{type:"button","data-toggle":"collapse","data-target":"#watcherConfig","data-cy":"watchers-accordion-configuration"}},[e._m(0),e._m(1)])])]),r("div",{staticClass:"collapse show",attrs:{id:"watcherConfig","data-parent":"#watcherAccordion"}},[r("div",{staticClass:"card-body pt-3 px-3 pb-0"},[r("form-input",{ref:"name",attrs:{label:e.$t("Watcher Name")+" *",name:e.$t("Watcher Name"),validation:e.ruleWatcherName,helper:e.$t("A name to describe this Watcher"),"data-cy":"watchers-watcher-name",required:"","aria-required":"true"},model:{value:e.config.name,callback:function(i){e.$set(e.config,"name",i)},expression:"config.name"}}),r("screen-variable-selector",{ref:"watching",attrs:{name:e.$t("Variable to Watch"),label:e.$t("Variable to Watch")+" *",validation:e.ruleWatcherVariable,helper:e.$t("Select the variable to watch on this screen or type any request variable name"),"data-cy":"watchers-watcher-variable"},model:{value:e.config.watching,callback:function(i){e.$set(e.config,"watching",i)},expression:"config.watching"}}),r("form-checkbox",{attrs:{name:e.$t("Run Synchronously"),label:e.$t("Run Synchronously"),toggle:!0,helper:e.$t("Wait for the Watcher to run before accepting more input"),"data-cy":"watchers-watcher-synchronous"},model:{value:e.config.synchronous,callback:function(i){e.$set(e.config,"synchronous",i)},expression:"config.synchronous"}}),r("form-checkbox",{directives:[{name:"show",rawName:"v-show",value:!e.config.synchronous,expression:"!config.synchronous"}],attrs:{name:e.$t("Show message while loading remote data"),label:e.$t("Show message while loading remote data"),toggle:!0,"data-cy":"watchers-watcher-show-loading"},model:{value:e.config.show_async_loading,callback:function(i){e.$set(e.config,"show_async_loading",i)},expression:"config.show_async_loading"}}),r("form-checkbox",{attrs:{name:e.$t("Run Watcher on Screen Load"),label:e.$t("Run watcher on Screen Load"),toggle:!0,"data-cy":"watchers-watcher-run-onload"},model:{value:e.config.run_onload,callback:function(i){e.$set(e.config,"run_onload",i)},expression:"config.run_onload"}})],1)])]),r("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[r("div",{staticClass:"card-header p-0"},[r("div",{staticClass:"mb-0"},[r("button",{ref:"watcherSourceButton",staticClass:"p-3 btn btn-link collapsed d-flex w-100 text-capitalize text-reset justify-content-between",attrs:{type:"button","data-toggle":"collapse","data-target":"#watcherSource","data-cy":"watchers-accordion-source"}},[e._m(2),e._m(3)])])]),r("div",{staticClass:"collapse",attrs:{id:"watcherSource","data-parent":"#watcherAccordion"}},[r("div",{staticClass:"card-body pt-3 px-3 pb-0"},[r("form-multi-select",{ref:"script",attrs:{name:e.$t("Source"),label:e.$t("Source")+" *",options:e.scripts,placeholder:e.$t("None"),multiple:!1,"show-labels":!1,searchable:!0,"option-value":"id","option-content":"title","group-values":"items","group-label":"type",validation:e.ruleWatcherScript,helper:e.$t("The source to access when this Watcher runs"),"data-cy":"watchers-watcher-source"},on:{open:e.loadSources},model:{value:e.config.script,callback:function(i){e.$set(e.config,"script",i)},expression:"config.script"}}),e.isScript?r("div",[e.config.script?r("b-alert",{attrs:{show:"",variant:"warning"}},[r("i",{staticClass:"fas fa-exclamation-triangle"}),e._v(" "+e._s(e.$t("Using watchers with Scripts can slow the performance of your screen."))+" ")]):e._e(),r("div",{staticClass:"form-group"},[r("label",[e._v(e._s(e.$t("Input Data")))]),r("div",{staticClass:"form-border",class:{"is-invalid":!e.jsonIsValid("input_data")}},[r("monaco-editor",{ref:"input_data",staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"watchers-watcher-input_data"},on:{editorDidMount:e.inputDataEditorMounted},model:{value:e.config.input_data,callback:function(i){e.$set(e.config,"input_data",i)},expression:"config.input_data"}})],1),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Data to pass to the script (valid JSON object, variables supported)")))]),e.inputDataInvalid?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("The Input Data field is required")))])]):e._e(),e.jsonIsValid("input_data")?e._e():r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("This must be valid JSON")))])])]),r("div",{staticClass:"form-group"},[r("label",[e._v(e._s(e.$t("Script Configuration")))]),r("div",{staticClass:"form-border",class:{"is-invalid":!e.jsonIsValid("script_configuration")}},[r("monaco-editor",{ref:"script_configuration",staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"watchers-watcher-script_configuration"},on:{editorDidMount:e.scriptConfigEditorMounted},model:{value:e.config.script_configuration,callback:function(i){e.$set(e.config,"script_configuration",i)},expression:"config.script_configuration"}})],1),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Configuration data for the script (valid JSON object, variables supported)")))]),e.scriptConfigurationInvalid?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(" "+e._s(e.$t("The Script Configuration field is required"))+" ")])]):e._e(),e.jsonIsValid("script_configuration")?e._e():r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("This must be valid JSON")))])])])],1):e._e(),e.isDatasource?r("div",[r("div",{staticClass:"form-group"},[r("form-multi-select",{ref:"endpoint",attrs:{name:e.$t("Resource"),label:e.$t("Resource"),options:e.endpoints,placeholder:e.$t("Select a resource"),multiple:!1,"show-labels":!1,searchable:!0,"internal-search":!1,helper:e.$t("The Data Connector resource to access when this Watcher runs"),"data-cy":"watchers-watcher-endpoint"},on:{"search-change":e.loadEndpoints,open:function(i){return e.loadEndpoints()}},model:{value:e.endpoint,callback:function(i){e.endpoint=i},expression:"endpoint"}}),e.endpointError?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.endpointError))])]):e._e(),e.dataSourceConfigWarning.length>0?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.dataSourceConfigWarning))])]):e._e(),r("a",{directives:[{name:"show",rawName:"v-show",value:e.dataSourceLink.length>0,expression:"dataSourceLink.length > 0"}],staticClass:"link-primary",attrs:{href:e.dataSourceLink,target:"_blank"}},[e._v(" "+e._s(e.$t("Open Data Connector"))+" "),r("i",{staticClass:"ml-1 fas fa-external-link-alt"})])],1),e.hasInputData?e._e():r("outbound-config",{model:{value:e.scriptConfig,callback:function(i){e.scriptConfig=i},expression:"scriptConfig"}}),e.hasInputData?r("div",{staticClass:"form-group"},[e._m(4),r("div",{staticClass:"row pl-3 mt-1"},[r("label",[e._v(e._s(e.$t("Input Data")))]),r("div",{staticClass:"form-border",class:{"is-invalid":!e.jsonIsValid("input_data")}},[r("monaco-editor",{staticClass:"editor",attrs:{options:e.monacoOptions,language:"json","data-cy":"watchers-watcher-input_data"},model:{value:e.config.input_data,callback:function(i){e.$set(e.config,"input_data",i)},expression:"config.input_data"}})],1),r("small",{staticClass:"form-text text-muted"},[e._v(e._s(e.$t("Data to pass to the Data Connector (valid JSON object, variables supported)")))]),e.inputDataInvalid?r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("The Input Data field is required")))])]):e._e(),e.jsonIsValid("input_data")?e._e():r("div",{staticClass:"invalid-feedback d-block"},[r("div",[e._v(e._s(e.$t("This must be valid JSON")))])])])]):e._e()],1):e._e()],1)])]),r("div",{staticClass:"card",staticStyle:{overflow:"visible"}},[r("div",{staticClass:"card-header p-0"},[r("div",{staticClass:"mb-0"},[r("button",{ref:"watcherOutputButton",staticClass:"p-3 btn btn-link collapsed d-flex w-100 text-capitalize text-reset justify-content-between",attrs:{type:"button","data-toggle":"collapse","data-target":"#watcherOutput","data-cy":"watchers-accordion-output"}},[e._m(5),e._m(6)])])]),r("div",{staticClass:"collapse",attrs:{id:"watcherOutput","data-parent":"#watcherAccordion"}},[r("div",{staticClass:"card-body pt-3 px-3 pb-0"},[e.hasInputData||e.isScript?r("form-input",{ref:"propOutputVariableName",attrs:{label:e.outputVarLabel,name:e.$t("Output Variable"),helper:e.$t("The variable that will store the output of the Watcher"),validation:e.ruleWatcherOutputVariable,"data-cy":"watchers-watcher-output_variable",required:e.ruleWatcherOutputVariable=="required","aria-required":e.ruleWatcherOutputVariable=="required"},model:{value:e.config.output_variable,callback:function(i){e.$set(e.config,"output_variable",i)},expression:"config.output_variable"}}):e._e(),e.isDatasource?r("data-mapping",{model:{value:e.scriptConfig,callback:function(i){e.scriptConfig=i},expression:"scriptConfig"}}):e._e()],1)])])]),r("div",{staticClass:"d-flex justify-content-end mt-3"},[r("button",{staticClass:"btn btn-outline-secondary text-uppercase",attrs:{"data-cy":"watchers-button-cancel"},on:{click:function(i){return i.stopPropagation(),e.displayTableList.apply(null,arguments)}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-secondary ml-3 text-uppercase",attrs:{"data-cy":"watchers-button-save"},on:{click:e.validateDataAndSave}},[e._v(" "+e._s(e.$t("Save"))+" ")])])])},s_=[function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-fw fa-cog"}),t._v(" Configuration")])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-angle-down arrow-open mr-2"}),e("i",{staticClass:"fas fa-angle-right arrow-closed mr-2"})])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-fw fa-file-upload"}),t._v(" Source")])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-angle-down arrow-open mr-2"}),e("i",{staticClass:"fas fa-angle-right arrow-closed mr-2"})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"row pl-3"},[e("span",{staticClass:"text-danger"},[t._v(" * Deprecation Warning: Recreate the watcher to use the new format. Version 4.2 will not support Input Data as a JSON object. ")])])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-fw fa-file-download"}),t._v(" Output")])},function(){var t=this,e=t._self._c;return e("div",[e("i",{staticClass:"fas fa-angle-down arrow-open mr-2"}),e("i",{staticClass:"fas fa-angle-right arrow-closed mr-2"})])}],o_=oe(a_,n_,s_,!1,null,"74e7876e",null,null);const SP=o_.exports,Ire="",l_={components:{BasicSearch:lP,FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,Sortable:lp},props:{value:{type:Array,default(){return[]}}},data(){return{filter:"",css:{tableClass:"table table-hover table-responsive text-break mb-0",loadingClass:"loading",detailRowClass:"vuetable-detail-row",handleIcon:"grey sidebar icon",sortableIcon:"fas fa-sort",ascendingIcon:"fas fa-sort-up",descendingIcon:"fas fa-sort-down",ascendingClass:"ascending",descendingClass:"descending"},fields:[{label:this.$t("Name"),key:"name"},{label:this.$t("Watching Variable"),key:"watching"},{label:this.$t("Output Variable"),key:"output_variable"},{label:this.$t("Source"),key:"script.title"}],searchProperties:["name","output_variable","watching","script.title"]}},methods:{displayFormProperty(){this.$emit("display-form")},editProperty(t){this.$emit("edit-form",t)},deleteProperty(t){this.$emit("delete-form",t)},getByPassIcon(t){return new URL(Object.assign({"../assets/icons/Bypass.svg":uP,"../assets/icons/ErrorMessage.svg":cP,"../assets/icons/Unbypass.svg":dP,"../assets/icons/angle-double-right-solid.svg":fP,"../assets/icons/calendar-regular.svg":pP,"../assets/icons/caret-square-down-solid.svg":hP,"../assets/icons/check-square-solid.svg":mP,"../assets/icons/columns-solid.svg":vP,"../assets/icons/font-solid.svg":gP,"../assets/icons/list-ul-solid.svg":bP,"../assets/icons/paragraph-solid.svg":yP,"../assets/icons/share-square-solid.svg":xP,"../assets/icons/square-regular.svg":wP,"../assets/icons/th-list-solid.svg":PP})[`../assets/icons/${t.byPass?"Unbypass":"Bypass"}.svg`],self.location).href}}};var u_=function(){var e=this,r=e._self._c;return r("Sortable",{attrs:{fields:e.fields,items:e.value,"disable-key":"byPass","inline-edit":!1,"data-test-actions":{tableBox:{"data-cy":"watchers-table"},btnNew:{"data-cy":"watchers-add-watcher"},btnEdit:{"data-cy":"watchers-table-edit"},btnDelete:{"data-cy":"watchers-table-remove"}},searchProperties:e.searchProperties},on:{"item-edit":e.editProperty,"item-delete":e.deleteProperty,"add-page":e.displayFormProperty,ordered:function(i){return e.$emit("ordered",i)}},scopedSlots:e._u([{key:"options",fn:function({item:i}){return[r("button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip",value:{customClass:"bypass-btn-tooltip"},expression:"{ customClass: 'bypass-btn-tooltip' }"}],staticClass:"btn",attrs:{title:i.byPass?e.$t("Unbypass Watcher"):e.$t("Bypass Watcher"),"data-test":"watchers-bypass"},on:{click:function(a){return a.preventDefault(),e.$emit("toggle-bypass",i.uid)}}},[r("img",{attrs:{src:e.getByPassIcon(i),alt:"Bypass",width:"24"}})]),r("div",{staticClass:"sortable-item-vr"})]}}])})},c_=[],d_=oe(l_,u_,c_,!1,null,"cfbb5df9",null,null);const kP=d_.exports,Lre="",TP=typeof window>"u"?global:window,f_={components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,MonacoEditor:Si,WatchersList:kP,WatchersForm:SP},props:{value:{type:Array,required:!0}},data(){return{enableList:!0,current:[],add:{uid:"",name:"",variable:"",script_id:"",script_key:"",input_data:"",script_configuration:"",synchronous:!1,byPass:!1}}},computed:{modalSize(){return"xl"}},watch:{value:{handler(t){this.current=this.getValuesWithOutputVarsNames(t)}}},methods:{getValuesWithOutputVarsNames(t){return t.map(r=>{var a,n;const i={...r};if(Object.hasOwn(i,"byPass")||(i.byPass=!1),((n=(a=i==null?void 0:i.script)==null?void 0:a.id)==null?void 0:n.substr(0,11))==="data_source"){const s=JSON.parse(i.script_configuration),o=s!=null&&s.dataMapping?s.dataMapping.map(l=>l.key).join(", "):"",u=50;i.output_variable=o.length>u?`${o.substr(0,u)}...`:o}return i})},toggleBypass(t){this.current=this.current.map(e=>e.uid===t?{...e,byPass:!e.byPass}:e),this.$emit("input",this.current)},show(){this.$refs.modal.show()},displayList(){this.add={},this.enableList=!0},displayForm(){this.add={},this.enableList=!1},save(){let t=this.$t("Watcher Saved"),e=this.current.findIndex(r=>r.uid===this.add.uid);e===-1?this.current.push(this.add):(t=this.$t("Watcher Updated"),this.current[e]=this.add),this.showAlert(t),this.$emit("input",this.current),this.displayList()},edit(t){this.displayForm(),this.$set(this,"add",G.cloneDeep(t))},confirmRemoval(t){TP.ProcessMaker.confirmModal(this.$t("Caution!"),this.$t("Are you sure you want to delete the Watcher?"),"",()=>{this.remove(t)})},remove(t){this.current=this.current.filter(e=>e.uid!==t.uid),this.$emit("input",this.current),this.showAlert(this.$t("Watcher deleted")),this.displayList()},showAlert(t){TP.ProcessMaker.alert(t,"success")}}};var p_=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{size:e.modalSize,id:"watchers-popup","hide-footer":"","header-close-content":"&times;","no-close-on-backdrop":"","data-cy":"watchers-modal"},on:{hidden:e.displayList},scopedSlots:e._u([{key:"modal-title",fn:function(){return[e._v(" "+e._s(e.$t("Watchers"))+" "),r("small",{staticClass:"d-block my-2 modal-subtitle"},[e._v(" "+e._s(e.$t("Manage your active watchers for this screen"))+" ")])]},proxy:!0}])},[e.enableList?[r("watchers-list",{on:{"display-form":e.displayForm,"edit-form":e.edit,"delete-form":e.confirmRemoval,"toggle-bypass":e.toggleBypass,ordered:function(i){return e.$emit("input",i)}},model:{value:e.current,callback:function(i){e.current=i},expression:"current"}}),r("div",{staticClass:"d-flex justify-content-end mt-3 mr-1"},[r("div",{staticClass:"d-flex align-items-end"},[r("button",{staticClass:"btn btn-secondary ml-3 text-uppercase",attrs:{"data-cy":"calcs-button-close"},on:{click:function(i){return e.$refs.modal.hide()}}},[e._v(" "+e._s(e.$t("Done"))+" ")])])])]:[r("required"),r("watchers-form",{attrs:{refs:"form",config:e.add},on:{"display-list":e.displayList,"save-form":e.save}})]],2)},h_=[],m_=oe(f_,p_,h_,!1,null,"d5f54c66",null,null);const v_=m_.exports,Fre="",g_={...Cs,FormMultiColumn:bu};function b_(t){let e=t.$parent;for(;e;){if(e.$options.name==="ScreenContent")return e;e=e.$parent}return null}const y_={install(t){if(t._processMakerVueFormBuilderInstalled)return;t._processMakerVueFormBuilderInstalled=!0,t.component("AddLoopRow",Zu),t.component("FormImage",Kn),t.component("FormAvatar",yn),t.component("FormLoop",ws),t.component("FormMultiColumn",bu),t.component("FormNestedScreen",Ps),t.component("FormRecordList",vu),t.component("Loop",iP),t.component("MultiColumn",aP),t.component("NewFormMultiColumn",Kf),t.component("ScreenRenderer",Pw),t.component("Task",rP),t.component("VueFormBuilder",Gw),t.component("VueFormRenderer",Ua),t.component("DefaultLoadingSpinner",nP),t.use(ee),t.component("FormButton",qi),t.component("FileUpload",bn),t.component("FileDownload",eo),t.component("FormAnalyticsChart",ks),t.component("FormMaskedInput",Wi),t.use(Dl),t.use(Et),t.component("FormListTable",Ss),t.component("LinkButton",Ts);const e=new Et.Store({modules:{globalErrorsModule:oP,undoRedoModule:Pu}});t.mixin({store:e}),t.mixin({methods:{getScreenDataReference(r=null,i=null){return b_(this).getDataReference(r,i)}}})}};function x_(t,e){t.defaults.adapter=Ug(t.defaults.adapter,{enabledByDefault:window.ProcessMaker.screen.cacheEnabled,cacheFlag:"useCache",defaultCache:new kl({ttl:window.ProcessMaker.screen.cacheTimeout,max:100})})}Z.AddLoopRow=Zu,Z.AnalyticsSelector=Rw,Z.BasicSearch=lP,Z.CollectionSelectList=tp,Z.ColorSelect=Cw,Z.ColumnSetup=Mw,Z.ComputedProperties=KK,Z.ContainerColumns=Dw,Z.Currencies=sG,Z.CurrentPageProperty=sc,Z.CustomCSS=r_,Z.DataFormatProperty=tP,Z.DataMapping=rp,Z.DataReference=fh,Z.DataTypeBooleanProperty=pK,Z.DataTypeDateTimeProperty=eP,Z.DataTypeProperty=$w,Z.DataTypeWithoutDateProperty=fK,Z.DefaultLoadingSpinner=nP,Z.DefaultValueEditor=ip,Z.DeviceDetector=mh,Z.DeviceVisibility=id,Z.EditOption=Aw,Z.FileDownload=eo,Z.FileUpload=bn,Z.FormAnalyticsChart=ks,Z.FormAvatar=yn,Z.FormBuilderControls=hK,Z.FormButton=qi,Z.FormImage=Kn,Z.FormInputMasked=Wi,Z.FormListTable=Ss,Z.FormLoop=ws,Z.FormMaskedInput=Wi,Z.FormMultiselect=ap,Z.FormNestedScreen=Ps,Z.FormRecordList=vu,Z.FormRecordListStatic=Sw,Z.FormRequests=ep,Z.FormTasks=$f,Z.FormText=gu,Z.HasColorProperty=vn,Z.ImageUpload=zw,Z.ImageVariable=Ow,Z.InputVariable=np,Z.Json2Vue=ob,Z.LabelSubmitButton=Hw,Z.LabelSubmitButtonProperty=og,Z.LinkButton=Ts,Z.LoadingSubmitButton=Bw,Z.LoadingSubmitButtonProperty=sg,Z.Loop=iP,Z.LoopInspector=Ew,Z.MultiColumn=aP,Z.MultipleUploadsCheckbox=Jw,Z.MustacheHelper=Ga,Z.NewFormMultiColumn=Kf,Z.OptionsList=jw,Z.OutboundConfig=sp,Z.PageSelect=Nw,Z.RequiredCheckbox=Xw,Z.ScreenBase=nd,Z.ScreenRendererError=Yf,Z.ScreenSelector=Iw,Z.SelectDataTypeMask=op,Z.Task=rP,Z.Tooltip=rd,Z.ValidationMsg=ol,Z.ValidationSelect=Fw,Z.VariableNameGenerator=Vw,Z.VisibilityRule=lg,Z.VueFormBuilder=Gw,Z.VueFormRenderer=Ua,Z.WatchersForm=SP,Z.WatchersList=kP,Z.WatchersPopup=v_,Z.WatchersSynchronous=ww,Z.accordions=Ww,Z.bgcolorProperty=li,Z.buttonLabelProperty=rg,Z.buttonTypeEvent=ag,Z.buttonVariantStyleProperty=sl,Z.canOpenJsonFile=$S,Z.colorProperty=ui,Z.computedFields=uh,Z.dataSourceValues=ei,Z.dataSources=Ms,Z.datatable=oc,Z.default=y_,Z.defaultValueProperty=Hn,Z.defaultValues=Y0,Z.deviceVisibilityProperty=Q5,Z.disabledProperty=ad,Z.focusErrors=lc,Z.formTypes=Ds,Z.formWatchers=dA,Z.getValidPath=Nc,Z.globalErrorsModule=oP,Z.globalProperties=QY,Z.helperTextProperty=xa,Z.initializeScreenCache=x_,Z.inspector=qw,Z.javascriptReservedKeywords=al,Z.keyNameProperty=Qt,Z.labelProperty=Wr,Z.multiselectApi=lb,Z.mustacheEvaluation=Ed,Z.placeholderProperty=Bn,Z.readonlyProperty=nl,Z.renderer=g_,Z.shouldElementBeVisible=ub,Z.testing=db,Z.toggleStyleProperty=ig,Z.tooltipProperty=ng,Z.validationRulesProperty=Hi,Z.validators=ll,Z.watchers=ug,Object.defineProperties(Z,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
382
382
  //# sourceMappingURL=vue-form-builder.umd.js.map