@processmaker/screen-builder 2.85.4 → 2.85.6

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.
@@ -341,5 +341,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
341
341
  content: $t(element.popoverContent),
342
342
  customClass: 'custom-popover',
343
343
  boundaryPadding: 16
344
- }`,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},on:{"tab-opened":function(a){e.currentPage=a}},scopedSlots:e._u([{key:"tabs-start",fn:function(){return[e.showToolbar?r("pages-dropdown",{attrs:{data:e.sortedPages},on:{addPage:function(a){return e.$bvModal.show("addPageModal")},clickPage:e.onClick,seeAllPages:function(a){return e.$bvModal.show("openSortable")}}}):e._e()]},proxy:!0},{key:"default",fn:function({currentPage:a}){return[e.isCurrentPageEmpty(a)?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[a].items},on:{input:e.updateConfig}},"draggable",{group:{name:"controls"},swapThreshold:.5},!1),e._l(e.config[a].items,function(i,n){return r("div",{key:n,staticClass:"control-item mt-4 mb-4",class:{selected:e.selected===i,hasError:e.hasError(i)},attrs:{selector:i.config.customCssSelector},on:{click:function(s){return e.inspect(i)}}},[i.container?r("div",{staticClass:"card container-lement",class:{"ai-section-card":e.isAiSection(i)},attrs:{"data-cy":"screen-element-container"},on:{click:function(s){return e.inspect(i)}}},[e.selected===i?r("div",{staticClass:"card-header form-element-header d-flex align-items-center",class:{pulse:e.isAiSection(i)&&e.aiPreview(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||i.label||e.$t("Field Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(i)&&e.aiPreview(i)?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(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:{"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(i["editor-component"],{tag:"component",staticClass:"card-body",class:e.elementCssClass(i),attrs:{"validation-errors":e.validationErrors,selected:e.selected,config:i.config,"ai-element":i},on:{inspect:e.inspect,"update-state":e.updateState},model:{value:i.items,callback:function(s){e.$set(i,"items",s)},expression:"element.items"}})],1):r("div",{staticClass:"card",attrs:{"data-cy":"screen-element-container"}},[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(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(i["editor-component"],e._b({tag:"component",staticClass:"card-body m-0 pb-4 pt-4",class:[e.elementCssClass(i),{"prevent-interaction":!i.config.interactive}],attrs:{tabindex:i.config.interactive?0:-1},on:{input:function(s){i.config.interactive&&(i.config.content=s)}},nativeOn:{focusout:function(s){return e.updateState.apply(null,arguments)}}},"component",i.config,!1))],1)])}),0):e._e(),e.isCurrentPageEmpty(a)?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(a){return[e.getInspectorFields(a)&&e.getInspectorFields(a).length>0?r("b-button",{key:`${e.accordionName(a)}-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(a).replace(" ","")}`,"accordion-name":`accordion-${e.accordionName(a).replace(" ","")}`,"is-open":a.open?"1":"0"},on:{click:function(i){return e.toggleAccordion(a)}}},[r("i",{staticClass:"fas fa-cog mr-2"}),e._v(" "+e._s(e.$t(e.accordionName(a)))+" "),r("i",{staticClass:"fas fa-angle-down ml-auto",class:{"fas fa-angle-right":!a.open}})]):e._e(),r("b-collapse",{key:`${e.accordionName(a)}-collapse`,attrs:{id:e.accordionName(a)},model:{value:a.open,callback:function(i){e.$set(a,"open",i)},expression:"accordion.open"}},e._l(e.getInspectorFields(a),function(i,n){return r(i.type,e._b({key:n,tag:"component",staticClass:"border-bottom m-0 p-4",attrs:{"data-cy":"inspector-"+(i.field||i.config.name),"field-name":i.field,"field-accordion":`accordion-${e.accordionName(a).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[i.field],callback:function(s){e.$set(e.inspection.config,i.field,s)},expression:"inspection.config[item.field]"}},"component",i.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:a}){return[r("button",{staticClass:"close",attrs:{type:"button","aria-label":"Close"},on:{click:function(i){return a()}}},[e._v("×")])]}}])},[r("Sortable",{attrs:{items:e.config,"filter-key":"name"},on:{"item-edit":()=>{},"item-delete":e.confirmDelete,"add-page":function(a){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(a){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(a){e.addPageName=a},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(a){e.editPageName=a},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)},MK=[],$K=oe(OK,EK,MK,!1,null,"fdf4961e",null,null);const Vx=$K.exports,PK=1,DK={name:"FormMultiColumn",mixins:[gn,sb,$c],props:["value","selected","name","config","transientData","formConfig"],components:{draggable:Oa,FormInput:Ba,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=PK;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 a=r[0],i=" justify-content-"+(a.config.textAlign==="right"?"end":a.config.textAlign);switch(a.config.verticalAlign){case"top":e="d-flex align-items-start"+i;break;case"middle":e="d-flex align-items-center"+i;break;case"bottom":e="d-flex align-items-end"+i;break}}return e},inspect(t){this.$emit("inspect",t)},submit(){this.$emit("submit")},pageNavigate(t){this.$emit("pageNavigate",t)}}};var IK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group"},[r("div",{staticClass:"row"},e._l(e.items,function(a,i){return r("div",{key:i,staticClass:"column-draggable",class:e.classColumn(i)},[e._l(a.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)])},zK=[],LK=oe(DK,IK,zK,!1,null,null,null,null);const mu=LK.exports,Ux={value:"string",content:"Text"},Gx={value:"int",content:"Integer"},jK={value:"currency",content:"Currency"},NK={value:"password",content:"Password"},RK={value:"percentage",content:"Percentage"},Hx={value:"float",content:"Decimal"},Yx={value:"datetime",content:"Datetime"},Qx={value:"date",content:"Date"},FK={value:"boolean",content:"Boolean"},qK=[Ux,Gx,jK,RK,Hx,Yx,Qx,NK],BK=[Ux,Gx,Hx];function gu(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 WK(){return{type:nf,field:"dataMask",config:{label:"Data Format",name:"Data Format",helper:"The data format for the selected type."}}}const Kx=gu(qK),VK=gu(BK),UK=gu([FK]),Jx=gu([Qx,Yx]),Zx=WK(),GK=[{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:Ba,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:[Yt,Br,Kx,Zx,Ra,Nn,Si,al,ua,la,Rn]}},{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:[Yt,Br,Nn,Si,{type:"FormCheckbox",field:"richtext",config:{label:"Rich Text",helper:""}},Ra,{type:"FormInput",field:"rows",config:{label:"Rows",helper:"The number of rows to provide for input",validation:"integer"}},al,ua,la,Rn]}},{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:ea.provideData,jsonData:"",pmqlQuery:"",dataName:"response",renderAs:"dropdown",allowMultiSelect:!1,selectedOptions:[],optionsList:[],key:"value",value:"content",valueTypeReturned:"single"},helper:null},inspector:[Yt,Br,Nn,Ra,Si,{type:"OptionsList",field:"options",config:{}},ua,la,Rn,al]}},{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:[Yt,Br,Si,Ra,{type:"FormCheckbox",field:"initiallyChecked",config:{label:"Checked by default",helper:"Should the checkbox be checked by default"}},ua,la,ev,td]}},{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"}},Yt,Br,Jx,Ra,Nn,Si,ua,la,td,Rn]}},{editorComponent:qa,editorBinding:"FormButton",rendererComponent:qa,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"}},Xg,rd]}},{editorComponent:mu,editorBinding:"FormMultiColumn",rendererComponent:mu,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"}},ua,la]}},{editorComponent:xs,editorBinding:"FormLoop",rendererComponent:xs,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:hu,editorBinding:"FormText",rendererComponent:fu,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:ea.provideData,jsonData:""},form:""},inspector:[Yt,{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"}},ua,la]}},{editorComponent:Jn,editorBinding:"FormImage",rendererComponent:Jn,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:qa,editorBinding:"FormSubmit",rendererComponent:qa,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:"+rl}},tv,av,iv,rv,{type:"FormInput",field:"fieldValue",config:{label:"Value",helper:"The value being submitted"}},rd]}},{editorComponent:ks,editorBinding:"FormNestedScreen",rendererComponent:ks,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:[Yt,{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:hu,rendererBinding:"FormText",builderComponent:Xs,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:[Yt,Br,{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:"{}"}},Ra]}},{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:[Yt,Br,{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:_s,editorBinding:"FormListTable",rendererComponent:_s,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 Requests"},{value:"Start New Request",content:"Start New Request"}]}}]}},{editorComponent:ws,editorBinding:"FormAnalyticsChart",rendererComponent:ws,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"}}]}}],HK="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgxIiBoZWlnaHQ9IjI4MCIgdmlld0JveD0iMCAwIDI4MSAyODAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik04NS4wNTYyIDczLjg4NkM4NS4wNTYyIDczLjg4NiAxMTUuMDggOTYuNjcgMTYwLjcyNCA1NC4wNjhDMjAxLjI2IDE2LjIzNDMgMjM0LjM1OSA3NS45Mjc1IDIzNC41OSAxMDQuNTEzQzIzNC44OSAxNDEuNTQzIDE5NC4wNTQgMTcxLjE3MyAyMTMuODcyIDE5NS40OTVDMjMzLjY5IDIxOS44MTcgMTc0LjU3IDI1OS45ODEgMTQyLjcwOCAyMjUuMjIyQzEwMy4wNzIgMTgxLjk4MyA5Mi4zMzQ1IDIxNy4xMTQgNjkuNzQyNSAyMTcuMTE0QzUz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g2IDE0OS4yNTMgMTgzLjEyMkMxNDkuMDE4IDE4My4zODUgMTQ4LjY4OCAxODMuNTQzIDE0OC4zMzcgMTgzLjU2MkwxNDcuMzM1IDE4My41OTdDMTQ3LjE2MyAxODMuNjAxIDE0Ni45OTMgMTgzLjU3IDE0Ni44MzQgMTgzLjUwNUMxNDYuNjc1IDE4My40NCAxNDYuNTMyIDE4My4zNDMgMTQ2LjQxMiAxODMuMjJDMTQ2LjI5MyAxODMuMDk3IDE0Ni4yIDE4Mi45NTEgMTQ2LjE0IDE4Mi43OUMxNDYuMDggMTgyLjYyOSAxNDYuMDU1IDE4Mi40NTggMTQ2LjA2NCAxODIuMjg3TDE0Ni40OTQgMTY5LjkwNUMxNDYuNTAzIDE2OS41NzEgMTQ2LjYzNyAxNjkuMjUzIDE0Ni44NyAxNjkuMDE0QzE0Ny4xMDMgMTY4Ljc3NSAxNDcuNDE3IDE2OC42MzMgMTQ3Ljc1IDE2OC42MTVWMTY4LjYxNVoiIGZpbGw9IiM1MkE1RUMiLz4KPHBhdGggZD0iTTE1NC4zMjIgMTYzLjMxN0MxNTUuMTc0IDE2Mi42OTEgMTU2LjQ2MyAxNjMuMDQyIDE1Ny4yNDMgMTY0LjExMkwxNzEuMTAzIDE4My4xMUMxNzEuOTMxIDE4NC4yNDUgMTcxLjg2NyAxODUuNzQ0IDE3MC45NjMgMTg2LjQwOEwxNjkuNzAzIDE4Ny4zMzNDMTY4Ljc5OSAxODcuOTk3IDE2Ny40MTggMTg3LjU1OCAxNjYuNjY2IDE4Ni4zNjhMMTU0LjA2NSAxNjYuNDQ0QzE1My4zNTcgMTY1LjMyMyAxNTMuNDcgMTYzLjk0MyAxNTQuMzIyIDE2My4zMTdaIiBmaWxsPSIjNTJBNUVDIi8+Cjwvc3ZnPgo=",Zte="",YK={data(){return{title:"We're Sorry",message:"An error has occurred. Please try again. If the problem persists, please contact your administrator."}}};var QK=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)))])])])},KK=[function(){var t=this,e=t._self._c;return e("p",[e("img",{staticClass:"simple-error-message-icon",attrs:{src:HK}})])}],JK=oe(YK,QK,KK,!1,null,null,null,null);const ZK={components:{simpleErrorMessage:JK.exports,VueFormRenderer:Gi},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}},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}},watch:{initialScreenId:{handler(){this.screenId=this.initialScreenId}},initialTaskId:{handler(){this.taskId=this.initialTaskId}},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)}},taskId:{handler(){this.taskId&&(!this.task||this.task.id!==this.taskId)&&this.loadTask()}},requestId:{handler(){this.requestId?(this.setMetaValue(),this.initSocketListeners()):this.unsubscribeSocketListeners()}},task:{handler(){this.screen||(this.screen=this.task&&this.task.interstitial_screen),this.taskId=this.task.id,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)}},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=H.get(this.screen,"_interstitial",!1);let e=H.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 H.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(){const t=`/${this.taskId}?include=data,user,draft,requestor,processRequest,component,screen,requestData,loopContext,bpmnTagName,interstitial,definition,nested,userRequestPermission`;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.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})})},prepareTask(){(!this.loadingButton||this.task.status==="ACTIVE")&&(this.resetScreenState(),this.requestData=H.get(this.task,"request_data",{}),this.loopContext=H.get(this.task,"loop_context",""),this.task.draft&&(this.requestData=H.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()},disableForSelfService(){this.$nextTick(()=>{window.ProcessMaker.isSelfService?this.disabled=!0:this.disabled=!1})},closeTask(t=null){if(this.hasErrors){this.$emit("error",this.requestId);return}this.task.process_request.status==="COMPLETED"?this.loadNextAssignedTask(t):this.loadingButton?this.loadNextAssignedTask(t):this.task.allow_interstitial?(this.task.interstitial_screen._interstitial=!0,this.screen=this.task.interstitial_screen,this.loadNextAssignedTask(t)):this.taskPreview||this.$emit("closed",this.task.id)},loadNextAssignedTask(t=null){t||(t=this.requestId);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(a=>{if(a.data.data.length>0){let i=a.data.data[0];if(i.process_request_id!==this.requestId){if(this.redirecting===i.process_request_id)return;this.unsubscribeSocketListeners(),this.redirecting=i.process_request_id,this.$emit("redirect",i.id,!0);return}else this.emitIfTaskCompleted(t);this.taskId=i.id,this.nodeId=i.element_id}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},submit(t=null,e=!1,r=null){var 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),(a=this.task)!=null&&a.allow_interstitial&&!this.loadingButton&&!this.disableInterstitial&&(this.task.interstitial_screen._interstitial=!0,this.screen=this.task.interstitial_screen))},onUpdate(t){this.$emit("input",t),this.disableForSelfService()},activityAssigned(){},processCompleted(){let t;this.parentRequest&&(t=this.getAllowedRequestId(),this.$emit("completed",t)),t!==this.requestId&&this.$emit("completed",this.requestId)},getAllowedRequestId(){const e=(this.task.user_request_permission||[]).find(a=>a.process_request_id===this.parentRequest);return e&&e.allowed?this.parentRequest:this.requestId},processUpdated:H.debounce(function(t){t.event==="ACTIVITY_ACTIVATED"&&this.reload(),t.event==="ACTIVITY_EXCEPTION"&&this.$emit("error",this.requestId)},300),initSocketListeners(){this.addSocketListener(`completed-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.requestId}`,".ProcessCompleted",t=>{this.processCompleted(t)}),this.addSocketListener(`updated-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.requestId}`,".ProcessUpdated",t=>{this.processUpdated(t)}),this.taskId||this.reload()},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.existsEventMessage(`${t.event}-${this.userId}-${this.taskId}`)&&this.closeTask(this.parentRequest),["ACTIVITY_COMPLETED"].includes(t.event)&&!this.existsEventMessage(`${t.event}-${this.userId}-${this.taskId}`)&&this.task.process_request.status==="COMPLETED"&&this.processCompleted(),t.event==="ACTIVITY_EXCEPTION"&&this.$emit("error",this.requestId)})},addSocketListener(t,e,r,a){t in this.socketListeners||(this.socketListeners[t]={channel:e,event:r},window.Echo.private(e).listen(r,i=>{a(i)}))},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)}},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},destroyed(){this.unsubscribeSocketListeners()}};var XK=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,id:"overlay-background",variant:"white",cardStyles:"pointer-events: none;pointer-events: none;inset: 1px",rounded:"sm"},scopedSlots:e._u([{key:"overlay",fn:function(){return[r("div",{staticClass:"text-center"},[r("p",[e._v("Please claim this task to continue.")])])]},proxy:!0}],null,!1,2499821482)},[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",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,submit:e.submit},model:{value:e.requestData,callback:function(a){e.requestData=a},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:{submit:e.submit}})],1)]),e.shouldAddSubmitButton?r("div",{staticClass:"card-footer"},[r("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(a){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)},eJ=[],tJ=oe(ZK,XK,eJ,!1,null,null,null,null);const Xx=tJ.exports,tre="",rJ={name:"Loop",components:{draggable:Oa,FormInput:ee.FormInput,FormSelectList:ee.FormSelectList,FormCheckbox:ee.FormCheckbox,FormTextArea:ee.FormTextArea,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},mixins:[gn],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=H.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(a=>a===e))return;this.$set(r.config.aiConfig,"progress",t)}})}}};var aJ=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(a,i){return r("div",{key:i,staticClass:"control-item",class:{selected:e.selected===a,hasError:e.hasError(a)},on:{click:function(n){return n.stopPropagation(),e.inspect(a)}}},[a.container?r("div",{on:{click:function(n){return n.stopPropagation(),e.inspect(a)}}},[r("div",{staticClass:"m-2 card border-0",class:{"ai-section-card":e.isAiSection(a)&&e.selected===a}},[e.selected===a?r("div",{staticClass:"card-header form-element-header d-flex align-items-center border rounded",class:{pulse:e.isAiSection(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||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(a)&&e.aiPreview(a)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{title:e.$t("Apply Changes")},on:{click:function(n){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:{title:e.$t("Copy Control")},on:{click:function(n){return e.duplicateItem(i)}}},[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(i)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(a["editor-component"],{tag:"component",staticClass:"mb-3 mr-3 ml-3",class:e.elementCssClass(a),attrs:{"validation-errors":e.validationErrors,selected:e.selected,"ai-element":a,config:a.config},on:{inspect:e.inspect,"update-state":function(n){return e.$emit("update-state")}},model:{value:a.items,callback:function(n){e.$set(a,"items",n)},expression:"element.items"}})],1)]):r("div",{attrs:{id:a.config.name?a.config.name:void 0}},[r("div",{staticClass:"m-2",class:{card:e.selected===a}},[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(n){return e.duplicateItem(i)}}},[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(i)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(a["editor-component"],e._b({tag:"component",staticClass:"p-3",class:[e.elementCssClass(a),{"prevent-interaction":!a.config.interactive}],attrs:{tabindex:a.config.interactive?0:-1,config:a.config},on:{input:function(n){a.config.interactive&&(a.config.content=n)}}},"component",a.config,!1))],1)])])}),0)],1)},iJ=[],nJ=oe(rJ,aJ,iJ,!1,null,"06c4d69f",null,null);const ek=nJ.exports,rre="",sJ=1,oJ={name:"MultiColumn",components:{draggable:Oa,FormInput:ee.FormInput,FormSelectList:ee.FormSelectList,FormCheckbox:ee.FormCheckbox,FormTextArea:ee.FormTextArea,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},mixins:[gn],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=sJ;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=H.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(a=>{a.component==="AiSection"&&e===a.config.aiConfig.nonce&&this.$set(a,"items",JSON.parse(JSON.stringify(t)))})})},updateProgress(t,e){this.value.forEach(r=>{r.forEach(a=>{if(a.component==="AiSection"&&e===a.config.aiConfig.nonce){if(this.cancelledJobs.some(i=>i===e))return;this.$set(a.config.aiConfig,"progress",t)}})})}}};var lJ=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(a,i){return[r("draggable",{key:i,staticClass:"column-draggable",class:e.classColumn(i),attrs:{value:e.items[i],group:"controls"},on:{input:function(n){return e.updateContainerConfig(n,i)}},model:{value:e.items[i],callback:function(n){e.$set(e.items,i,n)},expression:"items[index]"}},e._l(a,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(i,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(i,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(i,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(i,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)])])},uJ=[],cJ=oe(oJ,lJ,uJ,!1,null,"eaf6f1c4",null,null);const tk=cJ.exports,dJ={name:"default-loading-spinner"};var pJ=function(){var e=this,r=e._self._c;return r("div",[e._v("Loading Data...")])},fJ=[],hJ=oe(dJ,pJ,fJ,!1,null,null,null,null);const rk=hJ.exports,mJ=!0;function vu(t){let e=0;return typeof t!="object"||Object.entries(t).forEach(([r,a])=>{if(a){if(typeof a=="object"&&"$each"in a){e+=vu(a.$each.$iter);return}r!=="$iter"&&typeof a=="object"&&"$invalid"in a&&a.$invalid&&Number.isNaN(Number(r))&&e++,r!=="$iter"&&a&&(e+=vu(a))}}),e}const ak=async(t,e)=>{if(t.length===0)return;const r=ch(t[0]),a=[];t.forEach(n=>{r!==n&&a.push(n.loadValidationRules())}),await Promise.all(a);try{await r.loadValidationRules()}catch(n){console.warn("There was a problem rendering the screen",n)}const i=r.$v;if(i){let n=0,s="";i.$invalid&&(n+=vu(i.vdata),n+=vu(i.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:!i.$invalid}),e("basic",{key:"message",value:s})}},gJ=async(t,e)=>{t("basic",{key:"valid",value:!e.value}),t("disableSubmit",{key:"disableSubmit",value:e.value})},vJ=H.debounce(ak,500),bu=[],bJ=(t,e)=>{bu.includes(t)||bu.push(t),vJ(bu,e)},ik={namespaced:mJ,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(){bu.length=0},validate({commit:t},e){bJ(e,t)},async validateNow({commit:t},e){await ak([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 gJ(t,e)}}},yu={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},a){a.config!==e.currentState&&(r("setState",a),r("setPosition",t.stack.length-1),yu.methods.emitChanges())},undo({state:t,getters:e,commit:r}){e.canUndo&&(r("setPosition",t.position-1),yu.methods.emitChanges())},redo({state:t,getters:e,commit:r}){e.canRedo&&(r("setPosition",t.position+1),yu.methods.emitChanges())}}},are="",yJ={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 SJ=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(a){return!a.type.indexOf("key")&&e._k(a.keyCode,"enter",13,a.key,"Enter")?null:e.runSearch.apply(null,arguments)},input:function(a){a.target.composing||(e.query=a.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)])])},xJ=[],kJ=oe(yJ,SJ,xJ,!1,null,"d660c896",null,null);const nk=kJ.exports,ire="",_J={components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,MonacoEditor:_a},mixins:[nc],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("Property Name"),key:"property"},{label:this.$t("Description"),key:"name"},{key:"__actions",label:"",class:"text-right"}],monacoOptions:{automaticLayout:!0,lineNumbers:"off",minimap:!1},monacoEditor:null,errors:{}}},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"}},watch:{value(){this.value.forEach(t=>{this.numberItem++,t.id=this.numberItem}),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),a=r.passes();this.errors=Object.fromEntries(Object.keys(r.errors.all()).map(i=>[i,r.errors.first(i)])),a?this.saveProperty():this.focusFirstCalculatedPropertiesError()},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})):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){this.current=this.current.filter(e=>e.id!==t.id),this.$emit("input",this.current),this.displayTableList()},editorMounted(t){this.monacoEditor=t}}};var wJ=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{id:"computed-properties",size:"lg",title:e.$t("Calculated Properties"),"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","no-close-on-backdrop":"","header-close-content":"&times;","data-cy":"calcs-modal"},on:{hidden:e.displayTableList}},[e.displayList?[r("div",{staticClass:"d-flex align-items-end flex-column mb-3"},[r("button",{staticClass:"btn btn-secondary",attrs:{type:"button","data-cy":"calcs-add-property"},on:{click:function(a){return a.stopPropagation(),e.displayFormProperty.apply(null,arguments)}}},[r("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.$t("Property"))+" ")])]),r("div",{staticClass:"card card-body table-card"},[r("b-table",{attrs:{css:e.css,fields:e.fields,items:e.current,"empty-text":e.$t("No Data Available"),"data-cy":"calcs-table"},scopedSlots:e._u([{key:"cell(__actions)",fn:function({item:a}){return[r("div",{staticClass:"actions"},[r("div",{staticClass:"popout"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Edit"),"data-cy":"calcs-table-edit"},on:{click:function(i){return e.editProperty(a)}}},[r("i",{staticClass:"fas fa-edit fa-lg fa-fw"})]),r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Delete"),"data-cy":"calcs-table-remove"},on:{click:function(i){return e.deleteProperty(a)}}},[r("i",{staticClass:"fas fa-trash-alt fa-lg fa-fw"})])],1)])]}}],null,!1,3545130899)})],1),r("template",{slot:"modal-footer"},[r("span")])]:[r("required"),r("form-input",{ref:"property",staticClass:"mb-3",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(a){e.$set(e.add,"property",a)},expression:"add.property"}}),r("form-text-area",{ref:"name",staticClass:"mb-3",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(a){e.$set(e.add,"name",a)},expression:"add.name"}}),r("div",{staticClass:"form-group mb-3",staticStyle:{position:"relative"}},[r("label",{directives:[{name:"show",rawName:"v-show",value:e.isJS,expression:"isJS"}]},[e._v(e._s(e.$t("Formula")+" *"))]),r("div",{staticClass:"float-right"},[r("a",{staticClass:"btn btn-sm",class:e.expressionTypeClass,attrs:{"data-cy":"calcs-switch-formula"},on:{click:function(a){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(a){return e.switchExpressionType("javascript")}}},[r("i",{staticClass:"fab fa-js-square"})])]),r("form-text-area",{directives:[{name:"show",rawName:"v-show",value:!e.isJS,expression:"!isJS"}],ref:"formula",attrs:{rows:"5",label:e.$t("Formula")+" *",name:"formula",error:e.errors.formula,"data-cy":"calcs-property-formula",required:"","aria-required":"true"},model:{value:e.add.formula,callback:function(a){e.$set(e.add,"formula",a)},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(a){e.$set(e.add,"formula",a)},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",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",attrs:{"data-cy":"calcs-button-save"},on:{click:e.validateData}},[e._v(" "+e._s(e.$t("Save"))+" ")])])])]],2)},CJ=[],TJ=oe(_J,wJ,CJ,!1,null,"5efce491",null,null);const AJ=TJ.exports,nre="",OJ={props:["value","cssErrors"],components:{MonacoEditor:_a},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 EJ=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(a){e.innerValue=a},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)},MJ=[],$J=oe(OJ,EJ,MJ,!1,null,"3824b29b",null,null);const PJ=$J.exports,sre="",DJ=typeof window>"u"?global:window,IJ={name:"WatchersForm",components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,FormMultiSelect:ee.FormMultiSelect,FormCheckbox:ee.FormCheckbox,MonacoEditor:_a,DataMapping:Xp,OutboundConfig:af,ScreenVariableSelector:xx},mixins:[nc],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(a=>a.type==="Data Connectors");if(typeof e>"u"||e===null)return"";const r=e.items.find(a=>a.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||[],a=this.scripts.find(i=>i.items&&i.items.length>0&&i.items[0].id&&i.items[0].id.substr(0,11)==="data_source");if(a&&r.length===0){const i=a.items.find(s=>`data_source-${e.dataSource}`===s.id),n=(i.endpoints&&i.endpoints[t]?i.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("-"),a=e&&e.id&&e.id.split("-").length>0?e.id.split("-")[0]:"";this.config.script_id=r[1],this.config.script_key=t.key,a!==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()){DJ.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=H.uniqueId(new Date().getTime())),this.save()})},save(){this.$emit("save-form")},inputDataEditorMounted(t){this.inputDataEditor=t},scriptConfigEditorMounted(t){this.scriptConfigEditor=t}}};var zJ=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(a){e.$set(e.config,"name",a)},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(a){e.$set(e.config,"watching",a)},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(a){e.$set(e.config,"synchronous",a)},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(a){e.$set(e.config,"show_async_loading",a)},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(a){e.$set(e.config,"run_onload",a)},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(a){e.$set(e.config,"script",a)},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(a){e.$set(e.config,"input_data",a)},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(a){e.$set(e.config,"script_configuration",a)},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(a){return e.loadEndpoints()}},model:{value:e.endpoint,callback:function(a){e.endpoint=a},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(a){e.scriptConfig=a},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(a){e.$set(e.config,"input_data",a)},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(a){e.$set(e.config,"output_variable",a)},expression:"config.output_variable"}}):e._e(),e.isDatasource?r("data-mapping",{model:{value:e.scriptConfig,callback:function(a){e.scriptConfig=a},expression:"scriptConfig"}}):e._e()],1)])])]),r("div",{staticClass:"d-flex justify-content-end mt-3"},[r("button",{staticClass:"btn btn-outline-secondary",attrs:{"data-cy":"watchers-button-cancel"},on:{click:function(a){return a.stopPropagation(),e.displayTableList.apply(null,arguments)}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-secondary ml-3",attrs:{"data-cy":"watchers-button-save"},on:{click:e.validateDataAndSave}},[e._v(" "+e._s(e.$t("Save"))+" ")])])])},LJ=[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"})])}],jJ=oe(IJ,zJ,LJ,!1,null,"60e1dcd1",null,null);const sk=jJ.exports,ore="",NJ={components:{BasicSearch:nk,FormInput:ee.FormInput,FormTextArea:ee.FormTextArea},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",tdClass:"break-word"},{label:this.$t("Watching Variable"),key:"watching"},{label:this.$t("Output Variable"),key:"output_variable",tdClass:"break-word"},{label:this.$t("Source"),key:"script.title"},{key:"actions",label:""}]}},computed:{filtered(){const t=this.getValuesWithOutputVarsNames(this.value);if(!this.filter)return t;const e=[];return t.forEach(r=>{Object.keys(r).find(a=>typeof r[a]=="string"?r[a].indexOf(this.filter)>=0:!1)&&e.push(r)}),e}},methods:{search(){},displayFormProperty(){this.$emit("display-form")},editProperty(t){this.$emit("edit-form",t)},deleteProperty(t){this.$emit("delete-form",t)},getValuesWithOutputVarsNames(t){return t.map(r=>{let a=Object.assign({},r);if(a.script&&a.script.id&&a.script.id.substr(0,11)==="data_source"){let i=JSON.parse(a.script_configuration),n=i&&i.dataMapping?i.dataMapping.map(o=>o.key).join(", "):"";const s=50;a.output_variable=n.length>s?n.substr(0,s)+"...":n}return a})}}};var RJ=function(){var e=this,r=e._self._c;return r("div",[r("b-row",{staticClass:"mb-3"},[r("b-col",[r("basic-search",{on:{submit:e.search},model:{value:e.filter,callback:function(a){e.filter=a},expression:"filter"}},[r("template",{slot:"buttons"},[r("b-btn",{staticClass:"text-nowrap",attrs:{variant:"secondary","data-cy":"watchers-add-watcher"},on:{click:function(a){return a.stopPropagation(),e.displayFormProperty.apply(null,arguments)}}},[r("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.$t("Watcher"))+" ")])],1)],2)],1)],1),r("div",{staticClass:"card card-body table-card watchers-list"},[r("b-table",{attrs:{items:e.filtered,fields:e.fields,"empty-text":e.$t("No Data Available"),"data-cy":"watchers-table","sort-icon-left":""},scopedSlots:e._u([{key:"cell(actions)",fn:function({item:a}){return[r("div",{staticClass:"actions"},[r("div",{staticClass:"popout"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Edit"),"data-cy":"watchers-table-edit"},on:{click:function(i){return e.editProperty(a)}}},[r("i",{staticClass:"fas fa-edit fa-lg fa-fw"})]),r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Delete"),"data-cy":"watchers-table-remove"},on:{click:function(i){return e.deleteProperty(a)}}},[r("i",{staticClass:"fas fa-trash-alt fa-lg fa-fw"})])],1)])]}}])})],1),r("template",{slot:"modal-footer"},[r("span")])],2)},FJ=[],qJ=oe(NJ,RJ,FJ,!1,null,null,null,null);const ok=qJ.exports,lk=typeof window>"u"?global:window,BJ={components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,MonacoEditor:_a,WatchersList:ok,WatchersForm:sk},props:["value"],data(){return{enableList:!0,current:[],add:{uid:"",name:"",variable:"",script_id:"",script_key:"",input_data:"",script_configuration:"",synchronous:!1}}},watch:{value:{handler(t){this.current=t}}},computed:{},methods:{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",H.cloneDeep(t))},confirmRemoval(t){lk.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){lk.ProcessMaker.alert(t,"success")}}};var WJ=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{size:"lg",id:"watchers-popup",title:e.$t("Watchers"),"hide-footer":"","header-close-content":"&times;","no-close-on-backdrop":"","data-cy":"watchers-modal"},on:{hidden:e.displayList}},[e.enableList?[r("watchers-list",{on:{"display-form":e.displayForm,"edit-form":e.edit,"delete-form":e.confirmRemoval},model:{value:e.current,callback:function(a){e.current=a},expression:"current"}})]:[r("required"),r("watchers-form",{attrs:{refs:"form",config:e.add},on:{"display-list":e.displayList,"save-form":e.save}})]],2)},VJ=[],UJ=oe(BJ,WJ,VJ,!1,null,null,null,null);const GJ=UJ.exports,lre="",HJ={...Cs,FormMultiColumn:mu};function YJ(t){let e=t.$parent;for(;e;){if(e.$options.name==="ScreenContent")return e;e=e.$parent}return null}const QJ={install(t){if(t._processMakerVueFormBuilderInstalled)return;t._processMakerVueFormBuilderInstalled=!0,t.component("AddLoopRow",Hu),t.component("FormImage",Jn),t.component("FormAvatar",yn),t.component("FormLoop",xs),t.component("FormMultiColumn",mu),t.component("FormNestedScreen",ks),t.component("FormRecordList",fu),t.component("Loop",ek),t.component("MultiColumn",tk),t.component("NewFormMultiColumn",Yp),t.component("ScreenRenderer",yx),t.component("Task",Xx),t.component("VueFormBuilder",Vx),t.component("VueFormRenderer",Gi),t.component("DefaultLoadingSpinner",rk),t.use(ee),t.component("FormButton",qa),t.component("FileUpload",bn),t.component("FileDownload",Xs),t.component("FormAnalyticsChart",ws),t.component("FormMaskedInput",Ba),t.use(Cl),t.use(Pt),t.component("FormListTable",_s);const e=new Pt.Store({modules:{globalErrorsModule:ik,undoRedoModule:yu}});t.mixin({store:e}),t.mixin({methods:{getScreenDataReference(r=null,a=null){return YJ(this).getDataReference(r,a)}}})}};function KJ(t,e){t.defaults.adapter=Wv(t.defaults.adapter,{enabledByDefault:window.ProcessMaker.screen.cacheEnabled,cacheFlag:"useCache",defaultCache:new xl({ttl:window.ProcessMaker.screen.cacheTimeout,max:100})})}K.AddLoopRow=Hu,K.AnalyticsSelector=jx,K.BasicSearch=nk,K.CollectionSelectList=Zp,K.ColorSelect=_x,K.ColumnSetup=wx,K.ComputedProperties=AJ,K.ContainerColumns=Cx,K.Currencies=WH,K.CurrentPageProperty=ac,K.CustomCSS=PJ,K.DataFormatProperty=Zx,K.DataMapping=Xp,K.DataReference=uh,K.DataTypeBooleanProperty=UK,K.DataTypeDateTimeProperty=Jx,K.DataTypeProperty=Kx,K.DataTypeWithoutDateProperty=VK,K.DefaultLoadingSpinner=rk,K.DefaultValueEditor=ef,K.DeviceDetector=ph,K.DeviceVisibility=ed,K.EditOption=Tx,K.FileDownload=Xs,K.FileUpload=bn,K.FormAnalyticsChart=ws,K.FormAvatar=yn,K.FormBuilderControls=GK,K.FormButton=qa,K.FormImage=Jn,K.FormInputMasked=Ba,K.FormListTable=_s,K.FormLoop=xs,K.FormMaskedInput=Ba,K.FormMultiselect=tf,K.FormNestedScreen=ks,K.FormRecordList=fu,K.FormRecordListStatic=Sx,K.FormRequests=Jp,K.FormTasks=Kp,K.FormText=hu,K.HasColorProperty=gn,K.ImageUpload=Ax,K.ImageVariable=Ox,K.InputVariable=rf,K.Json2Vue=ib,K.LabelSubmitButton=Lx,K.LabelSubmitButtonProperty=iv,K.LoadingSubmitButton=zx,K.LoadingSubmitButtonProperty=av,K.Loop=ek,K.LoopInspector=Ex,K.MultiColumn=tk,K.MultipleUploadsCheckbox=Bx,K.MustacheHelper=Hi,K.NewFormMultiColumn=Yp,K.OptionsList=Mx,K.OutboundConfig=af,K.PageSelect=$x,K.RequiredCheckbox=qx,K.ScreenBase=ad,K.ScreenRendererError=Gp,K.ScreenSelector=Px,K.SelectDataTypeMask=nf,K.Task=Xx,K.Tooltip=Xc,K.ValidationMsg=il,K.ValidationSelect=Ix,K.VariableNameGenerator=Fx,K.VisibilityRule=nv,K.VueFormBuilder=Vx,K.VueFormRenderer=Gi,K.WatchersForm=sk,K.WatchersList=ok,K.WatchersPopup=GJ,K.WatchersSynchronous=bx,K.accordions=Rx,K.bgcolorProperty=la,K.buttonLabelProperty=Xg,K.buttonTypeEvent=tv,K.buttonVariantStyleProperty=rd,K.canOpenJsonFile=L_,K.colorProperty=ua,K.computedFields=sh,K.dataSourceValues=ea,K.dataSources=Ts,K.datatable=ic,K.default=QJ,K.defaultValueProperty=Rn,K.defaultValues=Pw,K.deviceVisibilityProperty=$q,K.disabledProperty=td,K.focusErrors=nc,K.formTypes=As,K.formWatchers=YE,K.getValidPath=$c,K.globalErrorsModule=ik,K.globalProperties=CQ,K.helperTextProperty=Si,K.initializeScreenCache=KJ,K.inspector=Nx,K.javascriptReservedKeywords=rl,K.keyNameProperty=Yt,K.labelProperty=Br,K.multiselectApi=nb,K.mustacheEvaluation=Md,K.placeholderProperty=Nn,K.readonlyProperty=al,K.renderer=HJ,K.shouldElementBeVisible=sb,K.testing=lb,K.toggleStyleProperty=ev,K.tooltipProperty=rv,K.validationRulesProperty=Ra,K.validators=nl,K.watchers=sv,Object.defineProperties(K,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
344
+ }`,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},on:{"tab-opened":function(a){e.currentPage=a}},scopedSlots:e._u([{key:"tabs-start",fn:function(){return[e.showToolbar?r("pages-dropdown",{attrs:{data:e.sortedPages},on:{addPage:function(a){return e.$bvModal.show("addPageModal")},clickPage:e.onClick,seeAllPages:function(a){return e.$bvModal.show("openSortable")}}}):e._e()]},proxy:!0},{key:"default",fn:function({currentPage:a}){return[e.isCurrentPageEmpty(a)?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[a].items},on:{input:e.updateConfig}},"draggable",{group:{name:"controls"},swapThreshold:.5},!1),e._l(e.config[a].items,function(i,n){return r("div",{key:n,staticClass:"control-item mt-4 mb-4",class:{selected:e.selected===i,hasError:e.hasError(i)},attrs:{selector:i.config.customCssSelector},on:{click:function(s){return e.inspect(i)}}},[i.container?r("div",{staticClass:"card container-lement",class:{"ai-section-card":e.isAiSection(i)},attrs:{"data-cy":"screen-element-container"},on:{click:function(s){return e.inspect(i)}}},[e.selected===i?r("div",{staticClass:"card-header form-element-header d-flex align-items-center",class:{pulse:e.isAiSection(i)&&e.aiPreview(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||i.label||e.$t("Field Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(i)&&e.aiPreview(i)?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(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:{"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(i["editor-component"],{tag:"component",staticClass:"card-body",class:e.elementCssClass(i),attrs:{"validation-errors":e.validationErrors,selected:e.selected,config:i.config,"ai-element":i},on:{inspect:e.inspect,"update-state":e.updateState},model:{value:i.items,callback:function(s){e.$set(i,"items",s)},expression:"element.items"}})],1):r("div",{staticClass:"card",attrs:{"data-cy":"screen-element-container"}},[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(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(i["editor-component"],e._b({tag:"component",staticClass:"card-body m-0 pb-4 pt-4",class:[e.elementCssClass(i),{"prevent-interaction":!i.config.interactive}],attrs:{tabindex:i.config.interactive?0:-1},on:{input:function(s){i.config.interactive&&(i.config.content=s)}},nativeOn:{focusout:function(s){return e.updateState.apply(null,arguments)}}},"component",i.config,!1))],1)])}),0):e._e(),e.isCurrentPageEmpty(a)?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(a){return[e.getInspectorFields(a)&&e.getInspectorFields(a).length>0?r("b-button",{key:`${e.accordionName(a)}-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(a).replace(" ","")}`,"accordion-name":`accordion-${e.accordionName(a).replace(" ","")}`,"is-open":a.open?"1":"0"},on:{click:function(i){return e.toggleAccordion(a)}}},[r("i",{staticClass:"fas fa-cog mr-2"}),e._v(" "+e._s(e.$t(e.accordionName(a)))+" "),r("i",{staticClass:"fas fa-angle-down ml-auto",class:{"fas fa-angle-right":!a.open}})]):e._e(),r("b-collapse",{key:`${e.accordionName(a)}-collapse`,attrs:{id:e.accordionName(a)},model:{value:a.open,callback:function(i){e.$set(a,"open",i)},expression:"accordion.open"}},e._l(e.getInspectorFields(a),function(i,n){return r(i.type,e._b({key:n,tag:"component",staticClass:"border-bottom m-0 p-4",attrs:{"data-cy":"inspector-"+(i.field||i.config.name),"field-name":i.field,"field-accordion":`accordion-${e.accordionName(a).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[i.field],callback:function(s){e.$set(e.inspection.config,i.field,s)},expression:"inspection.config[item.field]"}},"component",i.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:a}){return[r("button",{staticClass:"close",attrs:{type:"button","aria-label":"Close"},on:{click:function(i){return a()}}},[e._v("×")])]}}])},[r("Sortable",{attrs:{items:e.config,"filter-key":"name"},on:{"item-edit":()=>{},"item-delete":e.confirmDelete,"add-page":function(a){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(a){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(a){e.addPageName=a},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(a){e.editPageName=a},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)},MK=[],$K=oe(OK,EK,MK,!1,null,"18839616",null,null);const Vx=$K.exports,PK=1,DK={name:"FormMultiColumn",mixins:[gn,sb,$c],props:["value","selected","name","config","transientData","formConfig"],components:{draggable:Oa,FormInput:Ba,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=PK;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 a=r[0],i=" justify-content-"+(a.config.textAlign==="right"?"end":a.config.textAlign);switch(a.config.verticalAlign){case"top":e="d-flex align-items-start"+i;break;case"middle":e="d-flex align-items-center"+i;break;case"bottom":e="d-flex align-items-end"+i;break}}return e},inspect(t){this.$emit("inspect",t)},submit(){this.$emit("submit")},pageNavigate(t){this.$emit("pageNavigate",t)}}};var IK=function(){var e=this,r=e._self._c;return r("div",{staticClass:"form-group"},[r("div",{staticClass:"row"},e._l(e.items,function(a,i){return r("div",{key:i,staticClass:"column-draggable",class:e.classColumn(i)},[e._l(a.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)])},zK=[],LK=oe(DK,IK,zK,!1,null,null,null,null);const mu=LK.exports,Ux={value:"string",content:"Text"},Gx={value:"int",content:"Integer"},jK={value:"currency",content:"Currency"},NK={value:"password",content:"Password"},RK={value:"percentage",content:"Percentage"},Hx={value:"float",content:"Decimal"},Yx={value:"datetime",content:"Datetime"},Qx={value:"date",content:"Date"},FK={value:"boolean",content:"Boolean"},qK=[Ux,Gx,jK,RK,Hx,Yx,Qx,NK],BK=[Ux,Gx,Hx];function gu(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 WK(){return{type:nf,field:"dataMask",config:{label:"Data Format",name:"Data Format",helper:"The data format for the selected type."}}}const Kx=gu(qK),VK=gu(BK),UK=gu([FK]),Jx=gu([Qx,Yx]),Zx=WK(),GK=[{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:Ba,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:[Yt,Br,Kx,Zx,Ra,Nn,Si,al,ua,la,Rn]}},{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:[Yt,Br,Nn,Si,{type:"FormCheckbox",field:"richtext",config:{label:"Rich Text",helper:""}},Ra,{type:"FormInput",field:"rows",config:{label:"Rows",helper:"The number of rows to provide for input",validation:"integer"}},al,ua,la,Rn]}},{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:ea.provideData,jsonData:"",pmqlQuery:"",dataName:"response",renderAs:"dropdown",allowMultiSelect:!1,selectedOptions:[],optionsList:[],key:"value",value:"content",valueTypeReturned:"single"},helper:null},inspector:[Yt,Br,Nn,Ra,Si,{type:"OptionsList",field:"options",config:{}},ua,la,Rn,al]}},{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:[Yt,Br,Si,Ra,{type:"FormCheckbox",field:"initiallyChecked",config:{label:"Checked by default",helper:"Should the checkbox be checked by default"}},ua,la,ev,td]}},{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"}},Yt,Br,Jx,Ra,Nn,Si,ua,la,td,Rn]}},{editorComponent:qa,editorBinding:"FormButton",rendererComponent:qa,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"}},Xg,rd]}},{editorComponent:mu,editorBinding:"FormMultiColumn",rendererComponent:mu,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"}},ua,la]}},{editorComponent:xs,editorBinding:"FormLoop",rendererComponent:xs,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:hu,editorBinding:"FormText",rendererComponent:fu,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:ea.provideData,jsonData:""},form:""},inspector:[Yt,{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"}},ua,la]}},{editorComponent:Jn,editorBinding:"FormImage",rendererComponent:Jn,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:qa,editorBinding:"FormSubmit",rendererComponent:qa,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:"+rl}},tv,av,iv,rv,{type:"FormInput",field:"fieldValue",config:{label:"Value",helper:"The value being submitted"}},rd]}},{editorComponent:ks,editorBinding:"FormNestedScreen",rendererComponent:ks,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:[Yt,{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:hu,rendererBinding:"FormText",builderComponent:Xs,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:[Yt,Br,{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:"{}"}},Ra]}},{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:[Yt,Br,{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:_s,editorBinding:"FormListTable",rendererComponent:_s,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 Requests"},{value:"Start New Request",content:"Start New Request"}]}}]}},{editorComponent:ws,editorBinding:"FormAnalyticsChart",rendererComponent:ws,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"}}]}}],HK="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgxIiBoZWlnaHQ9IjI4MCIgdmlld0JveD0iMCAwIDI4MSAyODAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik04NS4wNTYyIDczLjg4NkM4NS4wNTYyIDczLjg4NiAxMTUuMDggOTYuNjcgMTYwLjcyNCA1NC4wNjhDMjAxLjI2IDE2LjIzNDMgMjM0LjM1OSA3NS45Mjc1IDIzNC41OSAxMDQuNTEzQzIzNC44OSAxNDEuNTQzIDE5NC4wNTQgMTcxLjE3MyAyMTMuODcyIDE5NS40OTVDMjMzLjY5IDIxOS44MTcgMTc0LjU3IDI1OS45ODEgMTQyLjcwOCAyMjUuMjIyQzEwMy4wNzIgMTgxLjk4MyA5Mi4zMzQ1IDIxNy4xMTQgNjkuNzQyNSAyMTcuMTE0QzUzLjUyNzggMjE3LjExNCAyMC4yMzc2IDE3Ni44MjUgNDIuNzE4MSAxNDYuODUxQzYxLjYzNTIgMTIxLjYyOSA1MS4zMTgyIDExMy4yNTggNDYuMzIyIDE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3LjE2MyAxODMuNjAxIDE0Ni45OTMgMTgzLjU3IDE0Ni44MzQgMTgzLjUwNUMxNDYuNjc1IDE4My40NCAxNDYuNTMyIDE4My4zNDMgMTQ2LjQxMiAxODMuMjJDMTQ2LjI5MyAxODMuMDk3IDE0Ni4yIDE4Mi45NTEgMTQ2LjE0IDE4Mi43OUMxNDYuMDggMTgyLjYyOSAxNDYuMDU1IDE4Mi40NTggMTQ2LjA2NCAxODIuMjg3TDE0Ni40OTQgMTY5LjkwNUMxNDYuNTAzIDE2OS41NzEgMTQ2LjYzNyAxNjkuMjUzIDE0Ni44NyAxNjkuMDE0QzE0Ny4xMDMgMTY4Ljc3NSAxNDcuNDE3IDE2OC42MzMgMTQ3Ljc1IDE2OC42MTVWMTY4LjYxNVoiIGZpbGw9IiM1MkE1RUMiLz4KPHBhdGggZD0iTTE1NC4zMjIgMTYzLjMxN0MxNTUuMTc0IDE2Mi42OTEgMTU2LjQ2MyAxNjMuMDQyIDE1Ny4yNDMgMTY0LjExMkwxNzEuMTAzIDE4My4xMUMxNzEuOTMxIDE4NC4yNDUgMTcxLjg2NyAxODUuNzQ0IDE3MC45NjMgMTg2LjQwOEwxNjkuNzAzIDE4Ny4zMzNDMTY4Ljc5OSAxODcuOTk3IDE2Ny40MTggMTg3LjU1OCAxNjYuNjY2IDE4Ni4zNjhMMTU0LjA2NSAxNjYuNDQ0QzE1My4zNTcgMTY1LjMyMyAxNTMuNDcgMTYzLjk0MyAxNTQuMzIyIDE2My4zMTdaIiBmaWxsPSIjNTJBNUVDIi8+Cjwvc3ZnPgo=",Zte="",YK={data(){return{title:"We're Sorry",message:"An error has occurred. Please try again. If the problem persists, please contact your administrator."}}};var QK=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)))])])])},KK=[function(){var t=this,e=t._self._c;return e("p",[e("img",{staticClass:"simple-error-message-icon",attrs:{src:HK}})])}],JK=oe(YK,QK,KK,!1,null,null,null,null);const ZK={components:{simpleErrorMessage:JK.exports,VueFormRenderer:Gi},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}},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}},watch:{initialScreenId:{handler(){this.screenId=this.initialScreenId}},initialTaskId:{handler(){this.taskId=this.initialTaskId}},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)}},taskId:{handler(){this.taskId&&(!this.task||this.task.id!==this.taskId)&&this.loadTask()}},requestId:{handler(){this.requestId?(this.setMetaValue(),this.initSocketListeners()):this.unsubscribeSocketListeners()}},task:{handler(){this.screen||(this.screen=this.task&&this.task.interstitial_screen),this.taskId=this.task.id,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)}},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=H.get(this.screen,"_interstitial",!1);let e=H.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 H.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(){const t=`/${this.taskId}?include=data,user,draft,requestor,processRequest,component,screen,requestData,loopContext,bpmnTagName,interstitial,definition,nested,userRequestPermission`;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.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})})},prepareTask(){(!this.loadingButton||this.task.status==="ACTIVE")&&(this.resetScreenState(),this.requestData=H.get(this.task,"request_data",{}),this.loopContext=H.get(this.task,"loop_context",""),this.task.draft&&(this.requestData=H.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()},disableForSelfService(){this.$nextTick(()=>{window.ProcessMaker.isSelfService?this.disabled=!0:this.disabled=!1})},closeTask(t=null){if(this.hasErrors){this.$emit("error",this.requestId);return}this.task.process_request.status==="COMPLETED"?this.loadNextAssignedTask(t):this.loadingButton?this.loadNextAssignedTask(t):this.task.allow_interstitial?(this.task.interstitial_screen._interstitial=!0,this.screen=this.task.interstitial_screen,this.loadNextAssignedTask(t)):this.taskPreview||this.$emit("closed",this.task.id)},loadNextAssignedTask(t=null){t||(t=this.requestId);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(a=>{if(a.data.data.length>0){let i=a.data.data[0];if(i.process_request_id!==this.requestId){if(this.redirecting===i.process_request_id)return;this.unsubscribeSocketListeners(),this.redirecting=i.process_request_id,this.$emit("redirect",i.id,!0);return}else this.emitIfTaskCompleted(t);this.taskId=i.id,this.nodeId=i.element_id}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},submit(t=null,e=!1,r=null){var 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),(a=this.task)!=null&&a.allow_interstitial&&!this.loadingButton&&!this.disableInterstitial&&(this.task.interstitial_screen._interstitial=!0,this.screen=this.task.interstitial_screen))},onUpdate(t){this.$emit("input",t),this.disableForSelfService()},activityAssigned(){},processCompleted(){let t;this.parentRequest&&(t=this.getAllowedRequestId(),this.$emit("completed",t)),t!==this.requestId&&this.$emit("completed",this.requestId)},getAllowedRequestId(){const e=(this.task.user_request_permission||[]).find(a=>a.process_request_id===this.parentRequest);return e&&e.allowed?this.parentRequest:this.requestId},processUpdated:H.debounce(function(t){t.event==="ACTIVITY_ACTIVATED"&&this.reload(),t.event==="ACTIVITY_EXCEPTION"&&this.$emit("error",this.requestId)},300),initSocketListeners(){this.addSocketListener(`completed-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.requestId}`,".ProcessCompleted",t=>{this.processCompleted(t)}),this.addSocketListener(`updated-${this.requestId}`,`ProcessMaker.Models.ProcessRequest.${this.requestId}`,".ProcessUpdated",t=>{this.processUpdated(t)}),this.taskId||this.reload()},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.existsEventMessage(`${t.event}-${this.userId}-${this.taskId}`)&&this.closeTask(this.parentRequest),["ACTIVITY_COMPLETED"].includes(t.event)&&!this.existsEventMessage(`${t.event}-${this.userId}-${this.taskId}`)&&this.task.process_request.status==="COMPLETED"&&this.processCompleted(),t.event==="ACTIVITY_EXCEPTION"&&this.$emit("error",this.requestId)})},addSocketListener(t,e,r,a){t in this.socketListeners||(this.socketListeners[t]={channel:e,event:r},window.Echo.private(e).listen(r,i=>{a(i)}))},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)}},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},destroyed(){this.unsubscribeSocketListeners()}};var XK=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,id:"overlay-background",variant:"white",cardStyles:"pointer-events: none;pointer-events: none;inset: 1px",rounded:"sm"},scopedSlots:e._u([{key:"overlay",fn:function(){return[r("div",{staticClass:"text-center"},[r("p",[e._v("Please claim this task to continue.")])])]},proxy:!0}],null,!1,2499821482)},[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",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,submit:e.submit},model:{value:e.requestData,callback:function(a){e.requestData=a},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:{submit:e.submit}})],1)]),e.shouldAddSubmitButton?r("div",{staticClass:"card-footer"},[r("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(a){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)},eJ=[],tJ=oe(ZK,XK,eJ,!1,null,null,null,null);const Xx=tJ.exports,tre="",rJ={name:"Loop",components:{draggable:Oa,FormInput:ee.FormInput,FormSelectList:ee.FormSelectList,FormCheckbox:ee.FormCheckbox,FormTextArea:ee.FormTextArea,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},mixins:[gn],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=H.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(a=>a===e))return;this.$set(r.config.aiConfig,"progress",t)}})}}};var aJ=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(a,i){return r("div",{key:i,staticClass:"control-item",class:{selected:e.selected===a,hasError:e.hasError(a)},on:{click:function(n){return n.stopPropagation(),e.inspect(a)}}},[a.container?r("div",{on:{click:function(n){return n.stopPropagation(),e.inspect(a)}}},[r("div",{staticClass:"m-2 card border-0",class:{"ai-section-card":e.isAiSection(a)&&e.selected===a}},[e.selected===a?r("div",{staticClass:"card-header form-element-header d-flex align-items-center border rounded",class:{pulse:e.isAiSection(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||e.$t("Variable Name"))+" "),r("div",{staticClass:"ml-auto"},[e.isAiSection(a)&&e.aiPreview(a)?r("button",{staticClass:"btn btn-sm btn-primary mr-2",attrs:{title:e.$t("Apply Changes")},on:{click:function(n){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:{title:e.$t("Copy Control")},on:{click:function(n){return e.duplicateItem(i)}}},[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(i)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(a["editor-component"],{tag:"component",staticClass:"mb-3 mr-3 ml-3",class:e.elementCssClass(a),attrs:{"validation-errors":e.validationErrors,selected:e.selected,"ai-element":a,config:a.config},on:{inspect:e.inspect,"update-state":function(n){return e.$emit("update-state")}},model:{value:a.items,callback:function(n){e.$set(a,"items",n)},expression:"element.items"}})],1)]):r("div",{attrs:{id:a.config.name?a.config.name:void 0}},[r("div",{staticClass:"m-2",class:{card:e.selected===a}},[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(n){return e.duplicateItem(i)}}},[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(i)}}},[r("i",{staticClass:"far fa-trash-alt text-light"})])])]):e._e(),r(a["editor-component"],e._b({tag:"component",staticClass:"p-3",class:[e.elementCssClass(a),{"prevent-interaction":!a.config.interactive}],attrs:{tabindex:a.config.interactive?0:-1,config:a.config},on:{input:function(n){a.config.interactive&&(a.config.content=n)}}},"component",a.config,!1))],1)])])}),0)],1)},iJ=[],nJ=oe(rJ,aJ,iJ,!1,null,"06c4d69f",null,null);const ek=nJ.exports,rre="",sJ=1,oJ={name:"MultiColumn",components:{draggable:Oa,FormInput:ee.FormInput,FormSelectList:ee.FormSelectList,FormCheckbox:ee.FormCheckbox,FormTextArea:ee.FormTextArea,FormDatePicker:ee.FormDatePicker,FormHtmlEditor:ee.FormHtmlEditor,FormHtmlViewer:ee.FormHtmlViewer,...Cs},mixins:[gn],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=sJ;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=H.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(a=>{a.component==="AiSection"&&e===a.config.aiConfig.nonce&&this.$set(a,"items",JSON.parse(JSON.stringify(t)))})})},updateProgress(t,e){this.value.forEach(r=>{r.forEach(a=>{if(a.component==="AiSection"&&e===a.config.aiConfig.nonce){if(this.cancelledJobs.some(i=>i===e))return;this.$set(a.config.aiConfig,"progress",t)}})})}}};var lJ=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(a,i){return[r("draggable",{key:i,staticClass:"column-draggable",class:e.classColumn(i),attrs:{value:e.items[i],group:"controls"},on:{input:function(n){return e.updateContainerConfig(n,i)}},model:{value:e.items[i],callback:function(n){e.$set(e.items,i,n)},expression:"items[index]"}},e._l(a,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(i,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(i,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(i,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(i,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)])])},uJ=[],cJ=oe(oJ,lJ,uJ,!1,null,"eaf6f1c4",null,null);const tk=cJ.exports,dJ={name:"default-loading-spinner"};var pJ=function(){var e=this,r=e._self._c;return r("div",[e._v("Loading Data...")])},fJ=[],hJ=oe(dJ,pJ,fJ,!1,null,null,null,null);const rk=hJ.exports,mJ=!0;function vu(t){let e=0;return typeof t!="object"||Object.entries(t).forEach(([r,a])=>{if(a){if(typeof a=="object"&&"$each"in a){e+=vu(a.$each.$iter);return}r!=="$iter"&&typeof a=="object"&&"$invalid"in a&&a.$invalid&&Number.isNaN(Number(r))&&e++,r!=="$iter"&&a&&(e+=vu(a))}}),e}const ak=async(t,e)=>{if(t.length===0)return;const r=ch(t[0]),a=[];t.forEach(n=>{r!==n&&a.push(n.loadValidationRules())}),await Promise.all(a);try{await r.loadValidationRules()}catch(n){console.warn("There was a problem rendering the screen",n)}const i=r.$v;if(i){let n=0,s="";i.$invalid&&(n+=vu(i.vdata),n+=vu(i.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:!i.$invalid}),e("basic",{key:"message",value:s})}},gJ=async(t,e)=>{t("basic",{key:"valid",value:!e.value}),t("disableSubmit",{key:"disableSubmit",value:e.value})},vJ=H.debounce(ak,500),bu=[],bJ=(t,e)=>{bu.includes(t)||bu.push(t),vJ(bu,e)},ik={namespaced:mJ,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(){bu.length=0},validate({commit:t},e){bJ(e,t)},async validateNow({commit:t},e){await ak([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 gJ(t,e)}}},yu={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},a){a.config!==e.currentState&&(r("setState",a),r("setPosition",t.stack.length-1),yu.methods.emitChanges())},undo({state:t,getters:e,commit:r}){e.canUndo&&(r("setPosition",t.position-1),yu.methods.emitChanges())},redo({state:t,getters:e,commit:r}){e.canRedo&&(r("setPosition",t.position+1),yu.methods.emitChanges())}}},are="",yJ={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 SJ=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(a){return!a.type.indexOf("key")&&e._k(a.keyCode,"enter",13,a.key,"Enter")?null:e.runSearch.apply(null,arguments)},input:function(a){a.target.composing||(e.query=a.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)])])},xJ=[],kJ=oe(yJ,SJ,xJ,!1,null,"d660c896",null,null);const nk=kJ.exports,ire="",_J={components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,MonacoEditor:_a},mixins:[nc],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("Property Name"),key:"property"},{label:this.$t("Description"),key:"name"},{key:"__actions",label:"",class:"text-right"}],monacoOptions:{automaticLayout:!0,lineNumbers:"off",minimap:!1},monacoEditor:null,errors:{}}},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"}},watch:{value(){this.value.forEach(t=>{this.numberItem++,t.id=this.numberItem}),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),a=r.passes();this.errors=Object.fromEntries(Object.keys(r.errors.all()).map(i=>[i,r.errors.first(i)])),a?this.saveProperty():this.focusFirstCalculatedPropertiesError()},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})):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){this.current=this.current.filter(e=>e.id!==t.id),this.$emit("input",this.current),this.displayTableList()},editorMounted(t){this.monacoEditor=t}}};var wJ=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{id:"computed-properties",size:"lg",title:e.$t("Calculated Properties"),"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","no-close-on-backdrop":"","header-close-content":"&times;","data-cy":"calcs-modal"},on:{hidden:e.displayTableList}},[e.displayList?[r("div",{staticClass:"d-flex align-items-end flex-column mb-3"},[r("button",{staticClass:"btn btn-secondary",attrs:{type:"button","data-cy":"calcs-add-property"},on:{click:function(a){return a.stopPropagation(),e.displayFormProperty.apply(null,arguments)}}},[r("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.$t("Property"))+" ")])]),r("div",{staticClass:"card card-body table-card"},[r("b-table",{attrs:{css:e.css,fields:e.fields,items:e.current,"empty-text":e.$t("No Data Available"),"data-cy":"calcs-table"},scopedSlots:e._u([{key:"cell(__actions)",fn:function({item:a}){return[r("div",{staticClass:"actions"},[r("div",{staticClass:"popout"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Edit"),"data-cy":"calcs-table-edit"},on:{click:function(i){return e.editProperty(a)}}},[r("i",{staticClass:"fas fa-edit fa-lg fa-fw"})]),r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Delete"),"data-cy":"calcs-table-remove"},on:{click:function(i){return e.deleteProperty(a)}}},[r("i",{staticClass:"fas fa-trash-alt fa-lg fa-fw"})])],1)])]}}],null,!1,3545130899)})],1),r("template",{slot:"modal-footer"},[r("span")])]:[r("required"),r("form-input",{ref:"property",staticClass:"mb-3",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(a){e.$set(e.add,"property",a)},expression:"add.property"}}),r("form-text-area",{ref:"name",staticClass:"mb-3",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(a){e.$set(e.add,"name",a)},expression:"add.name"}}),r("div",{staticClass:"form-group mb-3",staticStyle:{position:"relative"}},[r("label",{directives:[{name:"show",rawName:"v-show",value:e.isJS,expression:"isJS"}]},[e._v(e._s(e.$t("Formula")+" *"))]),r("div",{staticClass:"float-right"},[r("a",{staticClass:"btn btn-sm",class:e.expressionTypeClass,attrs:{"data-cy":"calcs-switch-formula"},on:{click:function(a){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(a){return e.switchExpressionType("javascript")}}},[r("i",{staticClass:"fab fa-js-square"})])]),r("form-text-area",{directives:[{name:"show",rawName:"v-show",value:!e.isJS,expression:"!isJS"}],ref:"formula",attrs:{rows:"5",label:e.$t("Formula")+" *",name:"formula",error:e.errors.formula,"data-cy":"calcs-property-formula",required:"","aria-required":"true"},model:{value:e.add.formula,callback:function(a){e.$set(e.add,"formula",a)},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(a){e.$set(e.add,"formula",a)},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",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",attrs:{"data-cy":"calcs-button-save"},on:{click:e.validateData}},[e._v(" "+e._s(e.$t("Save"))+" ")])])])]],2)},CJ=[],TJ=oe(_J,wJ,CJ,!1,null,"5efce491",null,null);const AJ=TJ.exports,nre="",OJ={props:["value","cssErrors"],components:{MonacoEditor:_a},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 EJ=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(a){e.innerValue=a},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)},MJ=[],$J=oe(OJ,EJ,MJ,!1,null,"3824b29b",null,null);const PJ=$J.exports,sre="",DJ=typeof window>"u"?global:window,IJ={name:"WatchersForm",components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,FormMultiSelect:ee.FormMultiSelect,FormCheckbox:ee.FormCheckbox,MonacoEditor:_a,DataMapping:Xp,OutboundConfig:af,ScreenVariableSelector:xx},mixins:[nc],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(a=>a.type==="Data Connectors");if(typeof e>"u"||e===null)return"";const r=e.items.find(a=>a.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||[],a=this.scripts.find(i=>i.items&&i.items.length>0&&i.items[0].id&&i.items[0].id.substr(0,11)==="data_source");if(a&&r.length===0){const i=a.items.find(s=>`data_source-${e.dataSource}`===s.id),n=(i.endpoints&&i.endpoints[t]?i.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("-"),a=e&&e.id&&e.id.split("-").length>0?e.id.split("-")[0]:"";this.config.script_id=r[1],this.config.script_key=t.key,a!==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()){DJ.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=H.uniqueId(new Date().getTime())),this.save()})},save(){this.$emit("save-form")},inputDataEditorMounted(t){this.inputDataEditor=t},scriptConfigEditorMounted(t){this.scriptConfigEditor=t}}};var zJ=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(a){e.$set(e.config,"name",a)},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(a){e.$set(e.config,"watching",a)},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(a){e.$set(e.config,"synchronous",a)},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(a){e.$set(e.config,"show_async_loading",a)},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(a){e.$set(e.config,"run_onload",a)},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(a){e.$set(e.config,"script",a)},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(a){e.$set(e.config,"input_data",a)},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(a){e.$set(e.config,"script_configuration",a)},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(a){return e.loadEndpoints()}},model:{value:e.endpoint,callback:function(a){e.endpoint=a},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(a){e.scriptConfig=a},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(a){e.$set(e.config,"input_data",a)},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(a){e.$set(e.config,"output_variable",a)},expression:"config.output_variable"}}):e._e(),e.isDatasource?r("data-mapping",{model:{value:e.scriptConfig,callback:function(a){e.scriptConfig=a},expression:"scriptConfig"}}):e._e()],1)])])]),r("div",{staticClass:"d-flex justify-content-end mt-3"},[r("button",{staticClass:"btn btn-outline-secondary",attrs:{"data-cy":"watchers-button-cancel"},on:{click:function(a){return a.stopPropagation(),e.displayTableList.apply(null,arguments)}}},[e._v(" "+e._s(e.$t("Cancel"))+" ")]),r("button",{staticClass:"btn btn-secondary ml-3",attrs:{"data-cy":"watchers-button-save"},on:{click:e.validateDataAndSave}},[e._v(" "+e._s(e.$t("Save"))+" ")])])])},LJ=[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"})])}],jJ=oe(IJ,zJ,LJ,!1,null,"60e1dcd1",null,null);const sk=jJ.exports,ore="",NJ={components:{BasicSearch:nk,FormInput:ee.FormInput,FormTextArea:ee.FormTextArea},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",tdClass:"break-word"},{label:this.$t("Watching Variable"),key:"watching"},{label:this.$t("Output Variable"),key:"output_variable",tdClass:"break-word"},{label:this.$t("Source"),key:"script.title"},{key:"actions",label:""}]}},computed:{filtered(){const t=this.getValuesWithOutputVarsNames(this.value);if(!this.filter)return t;const e=[];return t.forEach(r=>{Object.keys(r).find(a=>typeof r[a]=="string"?r[a].indexOf(this.filter)>=0:!1)&&e.push(r)}),e}},methods:{search(){},displayFormProperty(){this.$emit("display-form")},editProperty(t){this.$emit("edit-form",t)},deleteProperty(t){this.$emit("delete-form",t)},getValuesWithOutputVarsNames(t){return t.map(r=>{let a=Object.assign({},r);if(a.script&&a.script.id&&a.script.id.substr(0,11)==="data_source"){let i=JSON.parse(a.script_configuration),n=i&&i.dataMapping?i.dataMapping.map(o=>o.key).join(", "):"";const s=50;a.output_variable=n.length>s?n.substr(0,s)+"...":n}return a})}}};var RJ=function(){var e=this,r=e._self._c;return r("div",[r("b-row",{staticClass:"mb-3"},[r("b-col",[r("basic-search",{on:{submit:e.search},model:{value:e.filter,callback:function(a){e.filter=a},expression:"filter"}},[r("template",{slot:"buttons"},[r("b-btn",{staticClass:"text-nowrap",attrs:{variant:"secondary","data-cy":"watchers-add-watcher"},on:{click:function(a){return a.stopPropagation(),e.displayFormProperty.apply(null,arguments)}}},[r("i",{staticClass:"fas fa-plus"}),e._v(" "+e._s(e.$t("Watcher"))+" ")])],1)],2)],1)],1),r("div",{staticClass:"card card-body table-card watchers-list"},[r("b-table",{attrs:{items:e.filtered,fields:e.fields,"empty-text":e.$t("No Data Available"),"data-cy":"watchers-table","sort-icon-left":""},scopedSlots:e._u([{key:"cell(actions)",fn:function({item:a}){return[r("div",{staticClass:"actions"},[r("div",{staticClass:"popout"},[r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Edit"),"data-cy":"watchers-table-edit"},on:{click:function(i){return e.editProperty(a)}}},[r("i",{staticClass:"fas fa-edit fa-lg fa-fw"})]),r("b-btn",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{variant:"link",title:e.$t("Delete"),"data-cy":"watchers-table-remove"},on:{click:function(i){return e.deleteProperty(a)}}},[r("i",{staticClass:"fas fa-trash-alt fa-lg fa-fw"})])],1)])]}}])})],1),r("template",{slot:"modal-footer"},[r("span")])],2)},FJ=[],qJ=oe(NJ,RJ,FJ,!1,null,null,null,null);const ok=qJ.exports,lk=typeof window>"u"?global:window,BJ={components:{FormInput:ee.FormInput,FormTextArea:ee.FormTextArea,MonacoEditor:_a,WatchersList:ok,WatchersForm:sk},props:["value"],data(){return{enableList:!0,current:[],add:{uid:"",name:"",variable:"",script_id:"",script_key:"",input_data:"",script_configuration:"",synchronous:!1}}},watch:{value:{handler(t){this.current=t}}},computed:{},methods:{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",H.cloneDeep(t))},confirmRemoval(t){lk.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){lk.ProcessMaker.alert(t,"success")}}};var WJ=function(){var e=this,r=e._self._c;return r("b-modal",{ref:"modal",attrs:{size:"lg",id:"watchers-popup",title:e.$t("Watchers"),"hide-footer":"","header-close-content":"&times;","no-close-on-backdrop":"","data-cy":"watchers-modal"},on:{hidden:e.displayList}},[e.enableList?[r("watchers-list",{on:{"display-form":e.displayForm,"edit-form":e.edit,"delete-form":e.confirmRemoval},model:{value:e.current,callback:function(a){e.current=a},expression:"current"}})]:[r("required"),r("watchers-form",{attrs:{refs:"form",config:e.add},on:{"display-list":e.displayList,"save-form":e.save}})]],2)},VJ=[],UJ=oe(BJ,WJ,VJ,!1,null,null,null,null);const GJ=UJ.exports,lre="",HJ={...Cs,FormMultiColumn:mu};function YJ(t){let e=t.$parent;for(;e;){if(e.$options.name==="ScreenContent")return e;e=e.$parent}return null}const QJ={install(t){if(t._processMakerVueFormBuilderInstalled)return;t._processMakerVueFormBuilderInstalled=!0,t.component("AddLoopRow",Hu),t.component("FormImage",Jn),t.component("FormAvatar",yn),t.component("FormLoop",xs),t.component("FormMultiColumn",mu),t.component("FormNestedScreen",ks),t.component("FormRecordList",fu),t.component("Loop",ek),t.component("MultiColumn",tk),t.component("NewFormMultiColumn",Yp),t.component("ScreenRenderer",yx),t.component("Task",Xx),t.component("VueFormBuilder",Vx),t.component("VueFormRenderer",Gi),t.component("DefaultLoadingSpinner",rk),t.use(ee),t.component("FormButton",qa),t.component("FileUpload",bn),t.component("FileDownload",Xs),t.component("FormAnalyticsChart",ws),t.component("FormMaskedInput",Ba),t.use(Cl),t.use(Pt),t.component("FormListTable",_s);const e=new Pt.Store({modules:{globalErrorsModule:ik,undoRedoModule:yu}});t.mixin({store:e}),t.mixin({methods:{getScreenDataReference(r=null,a=null){return YJ(this).getDataReference(r,a)}}})}};function KJ(t,e){t.defaults.adapter=Wv(t.defaults.adapter,{enabledByDefault:window.ProcessMaker.screen.cacheEnabled,cacheFlag:"useCache",defaultCache:new xl({ttl:window.ProcessMaker.screen.cacheTimeout,max:100})})}K.AddLoopRow=Hu,K.AnalyticsSelector=jx,K.BasicSearch=nk,K.CollectionSelectList=Zp,K.ColorSelect=_x,K.ColumnSetup=wx,K.ComputedProperties=AJ,K.ContainerColumns=Cx,K.Currencies=WH,K.CurrentPageProperty=ac,K.CustomCSS=PJ,K.DataFormatProperty=Zx,K.DataMapping=Xp,K.DataReference=uh,K.DataTypeBooleanProperty=UK,K.DataTypeDateTimeProperty=Jx,K.DataTypeProperty=Kx,K.DataTypeWithoutDateProperty=VK,K.DefaultLoadingSpinner=rk,K.DefaultValueEditor=ef,K.DeviceDetector=ph,K.DeviceVisibility=ed,K.EditOption=Tx,K.FileDownload=Xs,K.FileUpload=bn,K.FormAnalyticsChart=ws,K.FormAvatar=yn,K.FormBuilderControls=GK,K.FormButton=qa,K.FormImage=Jn,K.FormInputMasked=Ba,K.FormListTable=_s,K.FormLoop=xs,K.FormMaskedInput=Ba,K.FormMultiselect=tf,K.FormNestedScreen=ks,K.FormRecordList=fu,K.FormRecordListStatic=Sx,K.FormRequests=Jp,K.FormTasks=Kp,K.FormText=hu,K.HasColorProperty=gn,K.ImageUpload=Ax,K.ImageVariable=Ox,K.InputVariable=rf,K.Json2Vue=ib,K.LabelSubmitButton=Lx,K.LabelSubmitButtonProperty=iv,K.LoadingSubmitButton=zx,K.LoadingSubmitButtonProperty=av,K.Loop=ek,K.LoopInspector=Ex,K.MultiColumn=tk,K.MultipleUploadsCheckbox=Bx,K.MustacheHelper=Hi,K.NewFormMultiColumn=Yp,K.OptionsList=Mx,K.OutboundConfig=af,K.PageSelect=$x,K.RequiredCheckbox=qx,K.ScreenBase=ad,K.ScreenRendererError=Gp,K.ScreenSelector=Px,K.SelectDataTypeMask=nf,K.Task=Xx,K.Tooltip=Xc,K.ValidationMsg=il,K.ValidationSelect=Ix,K.VariableNameGenerator=Fx,K.VisibilityRule=nv,K.VueFormBuilder=Vx,K.VueFormRenderer=Gi,K.WatchersForm=sk,K.WatchersList=ok,K.WatchersPopup=GJ,K.WatchersSynchronous=bx,K.accordions=Rx,K.bgcolorProperty=la,K.buttonLabelProperty=Xg,K.buttonTypeEvent=tv,K.buttonVariantStyleProperty=rd,K.canOpenJsonFile=L_,K.colorProperty=ua,K.computedFields=sh,K.dataSourceValues=ea,K.dataSources=Ts,K.datatable=ic,K.default=QJ,K.defaultValueProperty=Rn,K.defaultValues=Pw,K.deviceVisibilityProperty=$q,K.disabledProperty=td,K.focusErrors=nc,K.formTypes=As,K.formWatchers=YE,K.getValidPath=$c,K.globalErrorsModule=ik,K.globalProperties=CQ,K.helperTextProperty=Si,K.initializeScreenCache=KJ,K.inspector=Nx,K.javascriptReservedKeywords=rl,K.keyNameProperty=Yt,K.labelProperty=Br,K.multiselectApi=nb,K.mustacheEvaluation=Md,K.placeholderProperty=Nn,K.readonlyProperty=al,K.renderer=HJ,K.shouldElementBeVisible=sb,K.testing=lb,K.toggleStyleProperty=ev,K.tooltipProperty=rv,K.validationRulesProperty=Ra,K.validators=nl,K.watchers=sv,Object.defineProperties(K,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
345
345
  //# sourceMappingURL=vue-form-builder.umd.js.map