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X,QAFW,snC,gDCEX,QAFW,gjC,gDCEX,QAFW,inC,gDCEX,QAFW,qf,gDCEX,QAFW,msB,gDCEX,QAFW,uuB,gDCEX,QAFW,ka,gDCEX,QAFW,uN,+CCEX,QAFW,0b,gDCEX,QAFW,oc,gDCEX,QAFW,w5B,gDCEX,QAFW,mJ,gDCEX,QAFW,knC,gDCEX,QAFW,+hB,gDCEX,QAFW,uvB,gDCEX,QAFW,gQ,gDCEX,QAFW,qrB,gDCEX,QAFW,8nB,gDCEX,QAFW,sR,gDCEX,QAFW,sa,gDCEX,QAFW,u1C,gDCEX,QAFW,2uB,gDCEX,QAFW,4+D,gDCEX,QAFW,4V,+CCEX,QAFW,iL,gDCEX,QAFW,wuB,gDCEX,QAFW,yM,gDCEX,QAFW,46C,gDCEX,QAFW,4N,gDCEX,QAFW,4N,gDCEX,QAFW,iiB,gDCEX,QAFW,+T,gDCEX,QAFW,oM,gDCEX,QAFW,q0B,gDCEX,QAFW,kiD,gDCEX,QAFW,sjB,gDCEX,QAFW,6M,gDCEX,QAFW,oK,gDCEX,QAFW,s4C,gDCEX,QAFW,wW,gDCEX,QAFW,yJ,gDCEX,QAFW,6Y,gDCEX,QAFW,4zB,gDCEX,QAFW,4N,gDCEX,QAFW,kU,gDCEX,QAFW,25B,gDCEX,QAFW,iJ,gDCEX,QAFW,6X,gDCEX,QAFW,2N,gDCEX,QAFW,w6F,gDCEX,QAFW,8G,gDCEX,QAFW,2e,gDCEX,QAFW,+Q,+CCEX,QAFW,y6C,+CCEX,QAFW,4U,gDCEX,QAFW,me,wOCDXlG,EAAOupC,QAAUxpC,O","sources":["webpack://flowingly-runner/../Flowingly.Shared.Angular/src/@types/core/contracts/queryModel/workflow/lookupSpecialFields.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/angular-form-gen.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/common/bind-expression.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/common/fg-dropdown-input-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/common/fg-null-form.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/common/fg-number-input-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/common/fg-placeholder-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/common/fg-utils.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/common/jsonify/jsonify.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/common/tabs/tabs-controller.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/common/tabs/tabs-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/common/tabs/tabs-pane-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/drag/angular-drag-queen.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/drag/dq-drag-area.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/drag/dq-drag-track.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/drag/dq-draggable.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/canvas-controller.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/canvas-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/dropzone/dropzone-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/fg-edit-canvas-field-directive.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/properties/options/options-controller.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/properties/options/options-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/properties/properties-directive.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/properties/property-field/common-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/properties/property-field/field-value-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/properties/property-field/property-field-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/properties/tablePropertyController.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/properties/validation/parse-pattern-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/properties/validation/validation-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/properties/validation/validation-message-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/edit-controller.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/edit-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/palette/categories/categories-controller.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/palette/categories/categories-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/palette/palette-controller.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/palette/palette-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/entry.module.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/disable-submit-on-enter-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-approval-comment-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-approval-rule-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-attach-document-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-checkbox-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-controller.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-currency-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-date-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-datetime-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-dropdownlist-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-email-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-fileupload-directive.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-formula-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-image-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-input-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-instruction-directive.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-lookup-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-multiselectlist-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-not-found.directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-number-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-palette-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-password-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-radio-button-list-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-recaptcha-directive.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-selectlist-directive.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-signature.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-submit-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-table-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-tasklist-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-text-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field-textarea-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/tableDefaultController.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/files/attach.document.file.list.readonly.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/files/attach.document.file.list.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/files/attach.document.file.listService.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/files/attach.document.file.upload.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/files/file._module.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/files/file.drag.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/files/file.list.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/files/file.listService.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/files/file.upload.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/files/image.component.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/files/image.file.upload.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/files/image.selector.component.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/files/upload.file.onchange.directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/form-controller.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/form-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/form-fields/form-fields-directive.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/schema/schema-controller.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/schema/schema-directive.ts","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/validation/summary-directive.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/validation/unique-field-name.js","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/common/jsonify/jsonify.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/common/tabs/tabs-pane.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/common/tabs/tabs.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/canvas.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/dropzone/dropzone.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/fg-edit-canvas-field.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/properties/options/options.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/properties/properties.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/properties/property-field/common.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/properties/property-field/field-value.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/properties/property-field/property-field.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/properties/validation/validation-message.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/canvas/field/properties/validation/validation.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/edit.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/palette/categories/categories.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/edit/palette/palette.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/approvalcomment.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/approvalrule.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/attachdocument.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/checkbox.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/currency.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/date.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/datetime.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/dropdownlist.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/email.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/fileupload.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/formula.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/image.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/instruction.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/lookup.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/multiselectlist.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/not-in-cache.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/number.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/password.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/radiobuttonlist.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/recaptcha.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/selectlist.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/signature.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/submit.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/table.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/tasklist.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/text.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/default/textarea.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/approvalcomment.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/approvalrule.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/attachdocument.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/checkbox.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/currency.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/date.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/datetime.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/dropdownlist.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/email.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/fileupload.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/formula.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/image.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/instruction.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/lookup.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/multiselectlist.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/number.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/password.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/radiobuttonlist.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/recaptcha.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/selectlist.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/signature.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/submit.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/table.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/tasklist.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/text.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/field-templates/properties/textarea.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/field.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/field/fieldPalette.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/files/file.confirmDelete.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/files/image.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/files/image.selector.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/form/form-fields/form-fields.ng.html","webpack://flowingly-runner/../Flowingly.Shared.FormGen/src/angular-form-gen/validation/summary.ng.html","webpack://flowingly-runner/external var \"angular\""],"sourcesContent":["export enum LookupSpecialFields {\n  CurrentActorFullName = 'CurrentActorName',\n  CurrentActorEmail = 'CurrentActorEmail',\n  InitiatorFullName = 'Initiator',\n  InitiatorEmail = 'InitiatorEmail'\n}\n","import angular from 'angular';\nconst fg = angular.module('fg');\n\n// add all .html to templateCache\nfg.run([\n  '$templateCache',\n  function ($templateCache) {\n    $templateCache.put(\n      'angular-form-gen/form/form-fields/form-fields.ng.html',\n      require('./form/form-fields/form-fields.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/edit/canvas/field/fg-edit-canvas-field.ng.html',\n      require('./edit/canvas/field/fg-edit-canvas-field.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/form/field/field.ng.html',\n      require('./form/field/field.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/validation/summary.ng.html',\n      require('./validation/summary.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/signature.ng.html',\n      require('./field-templates/default/signature.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/number.ng.html',\n      require('./field-templates/default/number.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/image.ng.html',\n      require('./field-templates/default/image.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/not-in-cache.ng.html',\n      require('./field-templates/default/not-in-cache.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/currency.ng.html',\n      require('./field-templates/default/currency.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/text.ng.html',\n      require('./field-templates/default/text.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/textarea.ng.html',\n      require('./field-templates/default/textarea.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/email.ng.html',\n      require('./field-templates/default/email.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/password.ng.html',\n      require('./field-templates/default/password.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/checkbox.ng.html',\n      require('./field-templates/default/checkbox.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/tasklist.ng.html',\n      require('./field-templates/default/tasklist.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/multiselectlist.ng.html',\n      require('./field-templates/default/multiselectlist.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/selectlist.ng.html',\n      require('./field-templates/default/selectlist.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/radiobuttonlist.ng.html',\n      require('./field-templates/default/radiobuttonlist.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/recaptcha.ng.html',\n      require('./field-templates/default/recaptcha.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/approvalrule.ng.html',\n      require('./field-templates/default/approvalrule.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/approvalcomment.ng.html',\n      require('./field-templates/default/approvalcomment.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/submit.ng.html',\n      require('./field-templates/default/submit.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/instruction.ng.html',\n      require('./field-templates/default/instruction.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/date.ng.html',\n      require('./field-templates/default/date.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/datetime.ng.html',\n      require('./field-templates/default/datetime.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/lookup.ng.html',\n      require('./field-templates/default/lookup.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/formula.ng.html',\n      require('./field-templates/default/formula.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/form/files/image.ng.html',\n      require('./form/files/image.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/common/jsonify/jsonify.ng.html',\n      require('./common/jsonify/jsonify.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/common/tabs/tabs.ng.html',\n      require('./common/tabs/tabs.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/common/tabs/tabs-pane.ng.html',\n      require('./common/tabs/tabs-pane.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/edit/edit.ng.html',\n      require('./edit/edit.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/edit/canvas/canvas.ng.html',\n      require('./edit/canvas/canvas.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/edit/canvas/dropzone/dropzone.ng.html',\n      require('./edit/canvas/dropzone/dropzone.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/edit/canvas/field/properties/properties.ng.html',\n      require('./edit/canvas/field/properties/properties.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/edit/canvas/field/properties/options/options.ng.html',\n      require('./edit/canvas/field/properties/options/options.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/edit/canvas/field/properties/property-field/common.ng.html',\n      require('./edit/canvas/field/properties/property-field/common.ng.html')\n        .default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/edit/canvas/field/properties/property-field/field-value.ng.html',\n      require('./edit/canvas/field/properties/property-field/field-value.ng.html')\n        .default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/edit/canvas/field/properties/property-field/property-field.ng.html',\n      require('./edit/canvas/field/properties/property-field/property-field.ng.html')\n        .default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/edit/canvas/field/properties/validation/validation.ng.html',\n      require('./edit/canvas/field/properties/validation/validation.ng.html')\n        .default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/edit/canvas/field/properties/validation/validation-message.ng.html',\n      require('./edit/canvas/field/properties/validation/validation-message.ng.html')\n        .default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/edit/palette/palette.ng.html',\n      require('./edit/palette/palette.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/edit/palette/categories/categories.ng.html',\n      require('./edit/palette/categories/categories.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/attachdocument.ng.html',\n      require('./field-templates/default/attachdocument.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/dropdownlist.ng.html',\n      require('./field-templates/default/dropdownlist.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/fileupload.ng.html',\n      require('./field-templates/default/fileupload.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/form/field/fieldPalette.ng.html',\n      require('./form/field/fieldPalette.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/default/table.ng.html',\n      require('./field-templates/default/table.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/form/files/image.selector.ng.html',\n      require('./form/files/image.selector.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/form/files/file.confirmDelete.ng.html',\n      require('./form/files/file.confirmDelete.ng.html').default\n    );\n\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/approvalcomment.html',\n      require('./field-templates/properties/approvalcomment.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/approvalrule.ng.html',\n      require('./field-templates/properties/approvalrule.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/attachdocument.ng.html',\n      require('./field-templates/properties/attachdocument.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/checkbox.ng.html',\n      require('./field-templates/properties/checkbox.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/currency.ng.html',\n      require('./field-templates/properties/currency.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/date.ng.html',\n      require('./field-templates/properties/date.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/datetime.ng.html',\n      require('./field-templates/properties/datetime.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/dropdownlist.ng.html',\n      require('./field-templates/properties/dropdownlist.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/email.ng.html',\n      require('./field-templates/properties/email.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/fileupload.ng.html',\n      require('./field-templates/properties/fileupload.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/formula.ng.html',\n      require('./field-templates/properties/formula.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/image.ng.html',\n      require('./field-templates/properties/image.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/instruction.ng.html',\n      require('./field-templates/properties/instruction.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/lookup.ng.html',\n      require('./field-templates/properties/lookup.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/multiselectlist.ng.html',\n      require('./field-templates/properties/multiselectlist.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/number.ng.html',\n      require('./field-templates/properties/number.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/password.ng.html',\n      require('./field-templates/properties/password.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/radiobuttonlist.ng.html',\n      require('./field-templates/properties/radiobuttonlist.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/selectlist.ng.html',\n      require('./field-templates/properties/selectlist.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/signature.ng.html',\n      require('./field-templates/properties/signature.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/submit.ng.html',\n      require('./field-templates/properties/submit.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/table.ng.html',\n      require('./field-templates/properties/table.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/tasklist.ng.html',\n      require('./field-templates/properties/tasklist.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/recaptcha.ng.html',\n      require('./field-templates/properties/recaptcha.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/text.ng.html',\n      require('./field-templates/properties/text.ng.html').default\n    );\n    $templateCache.put(\n      'angular-form-gen/field-templates/properties/textarea.ng.html',\n      require('./field-templates/properties/textarea.ng.html').default\n    );\n  }\n]);\n\n//create a namespaced store\nfg.factory('flowStore', [\n  'store',\n  function (store) {\n    return store.getNamespacedStore('flow');\n  }\n]);\n\n/**\n * Constructor for form-gen Field types.\n * @param {string} type         Indicates the type of field\n * @param {object} properties   [optional] Initial property values\n */\nfg.constant('FgField', function FgField(type, properties) {\n  this.name = this.type = type;\n\n  if (properties) {\n    angular.extend(this, properties);\n  }\n\n  this.displayName =\n    this.displayName ||\n    this.type.charAt(0).toUpperCase() + this.type.substring(1);\n});\n\nfunction fgConfigProvider() {\n  const config = {\n    //If TRUE displays a dummy done button on forms\n    //https://bizflo.atlassian.net/wiki/display/TECH/Angular+Form+Gen\n    showDummyDoneButton: true,\n    enableDebugInfo: false,\n    validation: {\n      messages: {},\n      patterns: {}\n    },\n    fields: {\n      templates: [],\n      categories: {},\n      renderInfo: {}\n    }\n  };\n\n  const templates = config.fields.templates;\n\n  function indexOfTemplate(type) {\n    let idx = templates.length;\n\n    while (idx--) {\n      if (templates[idx].type === type) {\n        break;\n      }\n    }\n\n    return idx;\n  }\n\n  return {\n    debug: function (value) {\n      config.enableDebugInfo = value;\n    },\n    setShowDummyDoneButton: function (value) {\n      config.showDummyDoneButton = value;\n    },\n    fields: {\n      add: function (\n        objectTemplate,\n        categories,\n        templateUrl,\n        propertiesTemplateUrl\n      ) {\n        if (\n          !objectTemplate ||\n          !objectTemplate.type ||\n          !categories ||\n          !categories.length\n        ) {\n          throw new Error(\n            'Need a valid objectTemplate and at least one category'\n          );\n        }\n\n        const idx = indexOfTemplate(objectTemplate.type);\n\n        if (idx !== -1) {\n          templates[idx] = objectTemplate;\n        } else {\n          templates.push(objectTemplate);\n        }\n\n        this.category(objectTemplate.type, categories);\n        this.renderInfo(\n          objectTemplate.type,\n          templateUrl,\n          propertiesTemplateUrl\n        );\n      },\n      remove: function (type) {\n        const idx = indexOfTemplate(type);\n\n        if (idx !== -1) {\n          templates.splice(idx, 1);\n        }\n\n        this.category(type);\n        this.renderInfo(type);\n      },\n      renderInfo: function (fieldType, templateUrl, propertiesTemplateUrl) {\n        config.fields.renderInfo[fieldType] = {\n          templateUrl: templateUrl,\n          propertiesTemplateUrl: propertiesTemplateUrl\n        };\n      },\n      category: function (fieldType, categories) {\n        if (!angular.isArray(categories)) {\n          categories = [categories];\n        }\n\n        /*                    angular.forEach(config.fields.categories, function (category) {\n                        delete category[fieldType];\n                    });*/\n\n        angular.forEach(categories, function (category) {\n          if (config.fields.categories[category] === undefined) {\n            config.fields.categories[category] = {};\n          }\n\n          config.fields.categories[category][fieldType] = true;\n        });\n      }\n    },\n    validation: {\n      message: function (typeOrObject, message) {\n        const messages = config.validation.messages;\n\n        if (angular.isString(typeOrObject)) {\n          if (!message) {\n            throw new Error('No message specified for ' + typeOrObject);\n          }\n\n          messages[typeOrObject] = message;\n        } else {\n          angular.extend(messages, typeOrObject);\n        }\n      },\n      pattern: function (nameOrObject, pattern) {\n        if (angular.isString(nameOrObject)) {\n          config.validation.patterns[name] = pattern;\n        } else {\n          angular.extend(config.validation.patterns, nameOrObject);\n        }\n      }\n    },\n    $get: function () {\n      return config;\n    }\n  };\n}\nfg.provider('fgConfig', fgConfigProvider);\n\nfg.config([\n  'fgConfigProvider',\n  'FgField',\n  function (fgConfigProvider, FgField) {\n    // - - - - - - - - - - - - - - - - - - - - - -\n    // Messages\n    // - - - - - - - - - - - - - - - - - - - - - -\n\n    fgConfigProvider.validation.message({\n      required:\n        'A {{ field.validationTypeName }} value is required for this field.',\n      minlength:\n        'The value does not match the minimum length{{ field.schema && (\" of \" + field.schema.validation.minlength + \" characters\" || \"\")}}.',\n      /*\n       * Originally this is referencing field.schema.validation and not customValidation. Validation is unused\n       * now and customValidation is the one that is being heavily used, so we 're going to follow suite\n       * and usecustomValidation instead of validation.\n       *                                                                           -Cassey\n       */\n      maxlength:\n        'The value exceeds the maximum length{{ field.schema && (\" of \" + field.schema.customValidation.maxLength + \" characters\" || \"\")}}.',\n      pattern:\n        'The value \"{{ field.state.$viewValue }}\" does not match the required format.',\n      unique: 'The value \"{{ field.state.$viewValue }}\" is already in use.',\n      number: 'The value is not a number.',\n      min: 'The value {{ field.schema && (\"should be at least \" + field.schema.validation.min) || field.state.$viewValue + \" is too low\" }}',\n      max: 'The value {{ field.schema && (\"should be less than \" + field.schema.validation.max) || field.state.$viewValue + \" is too high\" }}'\n    });\n\n    // - - - - - - - - - - - - - - - - - - - - - -\n    // Fields\n    // - - - - - - - - - - - - - - - - - - - - - -\n    const approvalField = new FgField('approvalrule', {\n      displayName: 'Approval rule',\n      typeName: 'Approval rule',\n      hideInPalette: true,\n      actionButtons: {\n        hideSettings: true,\n        hideDelete: true\n      },\n      validation: {\n        required: true\n      },\n      options: [\n        {\n          value: '1',\n          text: 'Approve'\n        },\n        {\n          value: '0',\n          text: 'Reject'\n        }\n      ]\n    });\n    const attachDocumentField = new FgField('attachdocument', {\n      displayName: 'Attach Documents',\n      typeName: 'Attach Documents',\n      nolabel: true,\n      validation: {\n        required: false\n      }\n    });\n    const checkboxField = new FgField('checkbox', {\n      displayName: 'Check box',\n      nolabel: true,\n      typeName: 'Check box',\n      validation: {\n        required: false\n      }\n    });\n    const currencyField = new FgField('currency', {\n      displayName: 'Currency',\n      typeName: 'Currency',\n      validation: {\n        maxlength: 15 /* to prevent > Number.MAX_VALUE */,\n        required: true\n      }\n    });\n    const dateField = new FgField('date', {\n      displayName: 'Date',\n      typeName: 'Date',\n      validation: {\n        required: true\n      }\n    });\n    const dateTimeField = new FgField('datetime', {\n      typeName: 'Date Time',\n      displayName: 'Date Time',\n      validation: {\n        required: true,\n        messages: {\n          required: 'A date time value is required for this field'\n        }\n      }\n    });\n    const dropdownListField = new FgField('selectlist', {\n      displayName: 'Dropdown list',\n      typeName: 'Dropdown list',\n      validation: {\n        required: true\n      },\n      options: [\n        {\n          value: '1',\n          text: 'Option 1'\n        },\n        {\n          value: '2',\n          text: 'Option 2'\n        },\n        {\n          value: '3',\n          text: 'Option 3'\n        }\n      ],\n      //default value needs to be emmpty so that our placeholders are used\n      value: '',\n      searchable: true\n    });\n    const dynamicActorsField = new FgField('dynamicactors', {\n      displayName: 'Select who will be assigned to the next step',\n      typeName: 'Dynamic actors',\n      hideInPalette: true,\n      actionButtons: {\n        hideSettings: false,\n        hideDelete: true\n      },\n      validation: {\n        required: true\n      },\n      options: []\n    });\n    const emailField = new FgField('email', {\n      displayName: 'Email',\n      typeName: 'Email',\n      validation: {\n        required: true\n      }\n    });\n    const fileUploadField = new FgField('fileupload', {\n      displayName: 'File upload',\n      typeName: 'File upload',\n      nolabel: true,\n      validation: {\n        required: true\n      }\n    });\n    const formulaField = new FgField('formula', {\n      displayName: 'Formula',\n      typeName: 'Formula',\n      validation: {}\n    });\n    const instructionField = new FgField('instruction', {\n      displayName: 'Instruction',\n      typeName: 'Instruction',\n      nolabel: true,\n      value: 'Enter the instructions to be displayed here.'\n    });\n    const longTextField = new FgField('textarea', {\n      displayName: 'Long text',\n      typeName: 'Long text',\n      validation: {\n        required: true\n      }\n    });\n    const lookupField = new FgField('lookup', {\n      displayName: 'Lookup Field',\n      typeName: 'Lookup',\n      validation: {}\n    });\n    const multiSelectListField = new FgField('multiselectlist', {\n      typeName: 'Multi-selection list',\n      displayName: 'Multi-selection list',\n      validation: {\n        required: true,\n        messages: {\n          required: 'You must select at least 1 item from the list'\n        }\n      },\n      options: [\n        {\n          value: '1',\n          checked: true,\n          text: 'Option 1'\n        },\n        {\n          value: '2',\n          text: 'Option 2'\n        }\n      ]\n    });\n    const numberField = new FgField('number', {\n      displayName: 'Number',\n      typeName: 'Number',\n      validation: {\n        maxlength: 15 /* to prevent > Number.MAX_VALUE */,\n        required: true\n      }\n    });\n    const radioButtonListField = new FgField('radiobuttonlist', {\n      displayName: 'Option list',\n      typeName: 'Option list',\n      validation: {\n        required: true\n      },\n      options: [\n        {\n          value: '1',\n          text: 'Option 1'\n        },\n        {\n          value: '2',\n          text: 'Option 2'\n        },\n        {\n          value: '3',\n          text: 'Option 3'\n        }\n      ]\n    });\n    const recaptchaField = new FgField('recaptcha', {\n      displayName: 'ReCaptcha',\n      nolabel: true,\n      typeName: 'ReCaptcha',\n      disabled: false,\n      disableUniqueName: true,\n      shrunk: true,\n      actionButtons: {\n        hideSettings: true,\n        disableMovebuttons: true\n      },\n      validation: {\n        required: true,\n        messages: {\n          required: 'Complete the reCAPTCHA'\n        }\n      }\n    });\n    const shortTextField = new FgField('text', {\n      displayName: 'Short text',\n      typeName: 'Short text',\n      validation: {\n        required: true\n      }\n    });\n    const signatureField = new FgField('signature', {\n      displayName: 'Signature',\n      typeName: 'signature',\n      nolabel: true,\n      validation: {\n        required: true\n      }\n    });\n    const tableField = new FgField('table', {\n      displayName: 'Table',\n      typeName: 'Table',\n      validation: {\n        required: true\n      }\n    });\n    const taskListField = new FgField('tasklist', {\n      typeName: 'Task list',\n      displayName: 'Task list',\n      validation: {\n        required: true,\n        messages: {\n          required:\n            'You must complete all task list items to complete this form'\n        }\n      },\n      options: [\n        {\n          value: '1',\n          checked: true,\n          text: 'Task 1'\n        },\n        {\n          value: '2',\n          text: 'Task 2'\n        }\n      ]\n    });\n\n    const categories = {\n      'Text input fields': [shortTextField, longTextField, fileUploadField],\n      'Table fields': [tableField],\n      'Select input fields': [\n        dropdownListField,\n        radioButtonListField,\n        approvalField,\n        dynamicActorsField\n      ],\n      'Checkbox fields': [\n        checkboxField,\n        taskListField,\n        multiSelectListField,\n        recaptchaField\n      ],\n      'Other input fields': [\n        signatureField,\n        currencyField,\n        emailField,\n        numberField,\n        dateField,\n        dateTimeField,\n        formulaField\n      ],\n      'Read-only fields': [instructionField, attachDocumentField],\n      'Database fields': [\n        shortTextField,\n        emailField,\n        currencyField,\n        numberField,\n        dropdownListField,\n        lookupField,\n        tableField\n      ]\n    };\n\n    //This effectively sorts the fields we see available in the modeler task designer!\n    //Search keys (so this can be found): fieldType, field.type, templateType, templates, template\n    angular.forEach(categories, function (fields, category) {\n      angular.forEach(fields, function (field) {\n        fgConfigProvider.fields.add(\n          field,\n          category /*, templateUrl, propertiesTemplateUrl */\n        );\n      });\n    });\n\n    // - - - - - - - - - - - - - - - - - - - - - -\n    // Patterns\n    // - - - - - - - - - - - - - - - - - - - - - -\n\n    fgConfigProvider.validation.pattern({\n      None: undefined,\n      Url: '^(https?:\\\\/\\\\/)?([\\\\da-z\\\\.-]+)\\\\.([a-z\\\\.]{2,6})([\\\\/\\\\w \\\\.-]*)*\\\\/?$',\n      Domain: '^([a-z][a-z0-9\\\\-]+(\\\\.|\\\\-*\\\\.))+[a-z]{2,6}$',\n      'IPv4 Address':\n        '^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$',\n      'Email Address':\n        \"/^[a-zA-Z0-9\\\\-_]+([\\\\.'+][a-zA-Z0-9\\\\-_]+)*@[a-z0-9]+(\\\\-[a-z0-9]+)*(\\\\.[a-z0-9]+(\\\\-[a-z0-9]+)*)*\\\\.[a-z]{2,4}$/i\",\n      Integer: '^-{0,1}\\\\d+$',\n      'Positive Integers': '^\\\\d+$',\n      'Negative Integers': '^-\\\\d+$',\n      Number: '^-{0,1}\\\\d*\\\\.{0,1}\\\\d+$',\n      'Positive Number': '^\\\\d*\\\\.{0,1}\\\\d+$',\n      'Negative Number': '^-\\\\d*\\\\.{0,1}\\\\d+$',\n      'Year (1920-2099)': '^(19|20)[\\\\d]{2,2}$',\n      Password:\n        '(?=.*\\\\d)(?=.*[!@#$%^&*\\\\-=()|?.\"\\';:]+)(?![.\\\\n])(?=.*[A-Z])(?=.*[a-z]).*$'\n    });\n  }\n]);\n\nexport type FgConfigProviderType = ReturnType<typeof fgConfigProvider>;\n","angular.module('fg').directive('fgBindExpression', [\n  '$interpolate',\n  function ($interpolate) {\n    function buildWatchExpression(interpolateFn) {\n      var sb = [];\n      var expressions = interpolateFn.expressions;\n      var ii = expressions.length;\n\n      while (ii--) {\n        var expression = expressions[ii];\n\n        if (expression.exp && !expression.exp.match(/^\\s*$/)) {\n          sb.push(expression.exp);\n        }\n      }\n\n      return '[' + sb.join() + ']';\n    }\n\n    return function (scope, element, attr) {\n      var interpolateFn, watchHandle, oldWatchExpr;\n\n      function cleanWatchHandle() {\n        if (watchHandle) watchHandle();\n        watchHandle = undefined;\n      }\n\n      function interpolateExpression() {\n        element.text(interpolateFn(scope));\n      }\n\n      scope.$on('$destroy', function () {\n        cleanWatchHandle();\n      });\n\n      scope.$watch(attr.fgBindExpression, function (value) {\n        if (value !== undefined) {\n          interpolateFn = $interpolate(value);\n\n          element.addClass('ng-binding').data('$binding', interpolateFn);\n\n          var watchExpr = buildWatchExpression(interpolateFn);\n\n          if (oldWatchExpr !== watchExpr) {\n            oldWatchExpr = watchExpr;\n\n            cleanWatchHandle();\n\n            watchHandle = scope.$watchCollection(watchExpr, function () {\n              interpolateExpression();\n            });\n          } else {\n            interpolateExpression();\n          }\n        }\n      });\n    };\n  }\n]);\n","angular.module('fg').directive('fgDropdownInput', [\n  '$compile',\n  '$document',\n  '$timeout',\n  '$parse',\n  'fgUtils',\n  function ($compile, $document, $timeout, $parse, fgUtils) {\n    function createInput($scope, $element, $attrs) {\n      var template =\n        '<div class=\"fg-dropdown-input input-group\">' +\n        '<input type=\"text\" class=\"form-control\"/>' +\n        '<span class=\"input-group-btn\">' +\n        '<button class=\"btn btn-default\" type=\"button\" ng-click=\"dropdownToggle()\">' +\n        '<span class=\"caret\"></span>' +\n        '</button>' +\n        '</span>' +\n        '</div>';\n\n      var $template = angular.element(template);\n      var $input = $template.find('input');\n\n      // Copy the original attributes to the input element\n\n      var attributes = $element.prop('attributes');\n\n      angular.forEach(attributes, function (a) {\n        if (a.name !== 'fg-dropdown-input' && a.name !== 'class') {\n          $input.attr(a.name, a.value);\n        }\n      });\n\n      var $button = $template.find('button');\n      var closeTimeout;\n\n      $scope.dropdownToggle = function () {\n        //      $button[0].focus(); // force focus for chrome\n        $scope.dropdownVisible = !$scope.dropdownVisible;\n      };\n\n      //    $button.on('blur', function () {\n      //      closeTimeout = $timeout(function () {\n      //        $scope.dropdownVisible = false;\n      //      }, 100);\n      //    });\n\n      $scope.$on('$destroy', function () {\n        if (closeTimeout) $timeout.cancel(closeTimeout);\n        closeTimeout = undefined;\n      });\n\n      return $template;\n    }\n\n    function createDropdown($scope, $element, $attrs, ngModelCtrl, $input) {\n      var modelGetter = $parse($attrs.ngModel);\n      var modelSetter = modelGetter.assign;\n\n      var template =\n        '<div class=\"fg-dropdown\" ng-class=\"{ \\'open\\': dropdownVisible }\">' +\n        '<ul ng-if=\"items && items.length\" class=\"dropdown-menu\">' +\n        '<li ng-repeat=\"item in items\" ng-class=\"{ active: item.value === getModelValue() }\">' +\n        '<a href=\"\" ng-click=\"setModelValue(item.value)\">{{ item.text || item.value }}</a>' +\n        '</li>' +\n        '</ul>' +\n        '</div>';\n\n      var $template = angular.element(template);\n\n      $scope.setModelValue = function (value) {\n        $scope.dropdownVisible = false;\n\n        // Convert to a string\n\n        var viewValue = value || '';\n\n        var idx = ngModelCtrl.$formatters.length;\n\n        while (idx--) {\n          var fn = ngModelCtrl.$formatters[idx];\n          var viewValue = fn(viewValue);\n\n          if (viewValue === undefined) {\n            break;\n          }\n        }\n\n        // Parse the viewValue\n\n        idx = ngModelCtrl.$parsers.length;\n        var pv = viewValue;\n\n        while (idx--) {\n          var fn = ngModelCtrl.$parsers[idx];\n          pv = fn(pv);\n\n          if (pv === undefined) {\n            break;\n          }\n        }\n\n        if (pv === undefined) {\n          // Failed to parse.\n          // Set the formatted string in the input, which will retrigger the parsing and display the correct error message.\n\n          ngModelCtrl.$setViewValue(viewValue);\n          ngModelCtrl.$render();\n        } else {\n          modelSetter($scope, value);\n        }\n      };\n\n      $scope.getModelValue = function () {\n        return modelGetter($scope);\n      };\n\n      var input = $input[0];\n\n      $scope.$watch('dropdownVisible', function (value) {\n        if (value) {\n          var rect = input.getBoundingClientRect();\n          var scroll = fgUtils.getScrollOffset();\n\n          $template.css({\n            left: scroll.x + rect.left + 'px',\n            top: scroll.y + rect.top + input.clientHeight + 'px',\n            width: input.clientWidth + 'px'\n          });\n        }\n      });\n\n      $scope.$watchCollection($attrs.fgDropdownInput, function (value) {\n        $scope.items = value;\n      });\n\n      $scope.$on('$destroy', function () {\n        $template.remove();\n      });\n\n      return $template;\n    }\n\n    return {\n      priority: 1000,\n      restrict: 'A',\n      terminal: true,\n      scope: true,\n      compile: function (tElement, tAttrs) {\n        return function link($scope, $element, $attrs, ctrls) {\n          var $input = createInput($scope, $element, $attrs);\n\n          $element.append($input);\n          $compile($input)($scope);\n\n          var $inputText = $input.find('input');\n          var ngModelCtrl = $inputText.controller('ngModel');\n\n          ////////////////////////////////////////\n\n          var $dropdown = createDropdown(\n            $scope,\n            $element,\n            $attrs,\n            ngModelCtrl,\n            $input\n          );\n          var dropdownCompileFn = $compile($dropdown);\n\n          var $body = $document.find('body');\n\n          $body.append($dropdown);\n\n          dropdownCompileFn($scope);\n\n          ////////////////////////////////////////\n        };\n      }\n    };\n  }\n]);\n","/**\n * Created by null on 16/10/14.\n */\nconst fg = angular.module('fg');\nfg.directive('fgNullForm', function () {\n  var nullFormCtrl = {\n    $addControl: angular.noop,\n    $removeControl: angular.noop,\n    $setValidity: angular.noop,\n    $setDirty: angular.noop,\n    $setPristine: angular.noop\n  };\n\n  return {\n    restrict: 'A',\n    require: ['form'],\n    link: function link($scope, $element, $attrs, $ctrls) {\n      var form = $ctrls[0];\n\n      // Locate the parent form\n\n      var parentForm = $element.parent().inheritedData('$formController');\n\n      if (parentForm) {\n        // Unregister this form controller\n\n        parentForm.$removeControl(form);\n      }\n\n      // Nullify the form\n\n      angular.extend(form, nullFormCtrl);\n    }\n  };\n});\n\nfg.directive('fgFormRequiredFilter', function () {\n  return {\n    restrict: 'A',\n    require: ['form'],\n    link: function ($scope, $element, $attrs, $ctrls) {\n      var form = $ctrls[0];\n\n      var $setValidity = form.$setValidity;\n\n      form.$setValidity = function (validationToken, isValid, control) {\n        if (validationToken === 'required') {\n          isValid = true;\n        }\n\n        $setValidity.call(form, validationToken, isValid, control);\n      };\n    }\n  };\n});\n","angular.module('fg').directive('fgInputNumber', function () {\n  return {\n    require: 'ngModel',\n    link: function (scope, element, attr, ctrl) {\n      ctrl.$parsers.push(function (inputValue) {\n        // this next if is necessary for when using ng-required on your input.\n        // In such cases, when a letter is typed first, this parser will be called\n        // again, and the 2nd time, the value will be undefined\n        if (inputValue == undefined) {\n          return '';\n        }\n\n        //dont transform as we want to accept negative and decimals\n        var transformedInput = inputValue; //.replace(/[^0-9]/g, '');\n\n        var value = parseInt(transformedInput);\n        value === NaN ? undefined : value;\n\n        if (transformedInput != inputValue) {\n          ctrl.$setViewValue(transformedInput);\n          ctrl.$render();\n        }\n\n        return value;\n      });\n\n      ctrl.$parsers.push(function (value) {\n        var empty = ctrl.$isEmpty(value);\n        if (empty || /^\\s*(\\-|\\+)?([0-9]+(\\.[0-9]{1,2})?$)\\s*$/.test(value)) {\n          ctrl.$setValidity('number', true);\n          return value === '' ? null : empty ? value : parseFloat(value);\n        } else {\n          ctrl.$setValidity('number', false);\n          return undefined;\n        }\n      });\n\n      ctrl.$formatters.push(function (value) {\n        return ctrl.$isEmpty(value) ? undefined : value.toString();\n      });\n\n      if (attr.min) {\n        var minValidator = function (value) {\n          var min = parseFloat(attr.min);\n          if (!ctrl.$isEmpty(value) && value < min) {\n            ctrl.$setValidity('min', false);\n            return undefined;\n          } else {\n            ctrl.$setValidity('min', true);\n            return value;\n          }\n        };\n\n        ctrl.$parsers.push(minValidator);\n        ctrl.$formatters.push(minValidator);\n      }\n\n      if (attr.max) {\n        var maxValidator = function (value) {\n          var max = parseFloat(attr.max);\n          if (!ctrl.$isEmpty(value) && value > max) {\n            ctrl.$setValidity('max', false);\n            return undefined;\n          } else {\n            ctrl.$setValidity('max', true);\n            return value;\n          }\n        };\n\n        ctrl.$parsers.push(maxValidator);\n        ctrl.$formatters.push(maxValidator);\n      }\n\n      ctrl.$formatters.push(function (value) {\n        if (ctrl.$isEmpty(value) || angular.isNumber(value)) {\n          ctrl.$setValidity('number', true);\n          return value;\n        } else {\n          ctrl.$setValidity('number', false);\n          return undefined;\n        }\n      });\n    }\n  };\n});\n","angular.module('fg').directive('fgPlaceholder', function () {\n  /*\n    This attribute is only required on TEXTAREA elements. \n    Angular in combination with IE doesn't like placeholder=\"{{ myExpression }}\".\n   */\n  return {\n    link: function ($scope, $element, $attrs) {\n      $scope.$watch($attrs.fgPlaceholder, function (value) {\n        $element.attr('placeholder', value);\n      });\n    }\n  };\n});\n","angular.module('fg').factory('fgUtils', [\n  '$templateCache',\n  '$window',\n  'fgConfig',\n  function ($templateCache, $window, fgConfig) {\n    let uniqueCounter = Math.floor(Math.random() * 100000000000 + 1);\n    //(+new Date) % 10000;\n\n    return {\n      getScrollOffset: function () {\n        // the pageYOffset property of the window object is supported in all browsers except\n        // in Internet Explorer before version 9, and always returns the scroll amount regardless of the doctype\n\n        // the scrollY property of the window object is supported by Firefox, Google Chrome and Safari, and always\n        // returns the scroll amount regardless of the doctype\n\n        // if a doctype is specified in the document, the scrollTop property of the html element returns the scroll\n        // amount in Internet Explorer, Firefox and Opera, but always returns zero in Google Chrome and Safari\n\n        // if no doctype is specified in the document, the scrollTop property of the html element always returns zero\n\n        // if no doctype is specified in the document, the scrollTop property of the body element returns the\n        // scroll amount in Internet Explorer, Firefox, Opera, Google Chrome and Safari.\n\n        const offset = {};\n\n        if ($window.pageYOffset !== undefined) {\n          offset.x = $window.pageXOffset;\n          offset.y = $window.pageYOffset;\n        } else {\n          const de = $window.document.documentElement;\n          offset.x = de.scrollLeft;\n          offset.y = de.scrollTop;\n        }\n\n        return offset;\n      },\n      defaultArea: 'default',\n      getRenderInfo: function (field) {\n        //var renderInfo = fg.Field[field.type];\n        let renderInfo = fgConfig.fields.renderInfo[field.type];\n\n        if (!renderInfo) {\n          renderInfo = {};\n          // fg.Field[field.type] = renderInfo;\n          fgConfig.fields.renderInfo[field.type] = renderInfo;\n        }\n\n        if (!renderInfo.templateUrl) {\n          renderInfo.templateUrl = this.getTemplateUrl(field);\n        }\n\n        if (!renderInfo.propertiesTemplateUrl) {\n          renderInfo.propertiesTemplateUrl = this.getTemplateUrl(\n            field,\n            'properties'\n          );\n        }\n\n        return renderInfo;\n      },\n      formatTemplateUrl: function (type, area) {\n        return (\n          'angular-form-gen/field-templates/' +\n          (area || this.defaultArea) +\n          '/' +\n          type +\n          '.ng.html'\n        );\n      },\n      getTemplateUrl: function (field, area) {\n        area = area || this.defaultArea;\n\n        // IE8 fix: Aliases removed\n        // var templateType = fgConfig.fields.aliases[field.type] || field.type;\n        const templateType = field.type;\n        let templateUrl = this.formatTemplateUrl(templateType, area);\n\n        const cached = $templateCache.get(templateUrl);\n\n        if (!cached) {\n          // Url is not in cache -- fallback to default area.\n          // Properties area will never fallback to default area.\n\n          if (area !== 'properties' && area !== this.defaultArea) {\n            templateUrl = this.getTemplateUrl(field, this.defaultArea);\n          } else {\n            return this.formatTemplateUrl('not-in-cache');\n          }\n        }\n\n        return templateUrl;\n      },\n      getUnique: function () {\n        return ++uniqueCounter;\n      },\n      copyField: function (field) {\n        const copy = angular.copy(field);\n        if (!field.disableUniqueName) {\n          copy.name = 'field' + this.getUnique();\n        }\n        return copy;\n      },\n      findElementsByClass: function (root, className, recursive, buffer) {\n        buffer = buffer || [];\n\n        if (root.className === className) {\n          buffer.push(root);\n        }\n\n        if (root.hasChildNodes()) {\n          for (let i = 0; i < root.children.length; i++) {\n            const child = root.children[i];\n            if (child.className === className) {\n              buffer.push(child);\n            }\n            if (recursive) {\n              this.findElementsByClass(child, className, recursive, buffer);\n            }\n          }\n        }\n\n        return buffer;\n      }\n    };\n  }\n]);\n","function fgToJsonReplacer(key, value) {\n  var val = value;\n\n  if (typeof key === 'string' && key.charAt(0) === '$') {\n    val = undefined;\n  }\n  return val;\n}\n\nangular\n  .module('fg')\n  .filter('j$on', function () {\n    return function (input, displayHidden) {\n      if (displayHidden) return JSON.stringify(input || {}, null, '  ');\n\n      //https://github.com/angular/angular.js/commit/c054288c9722875e3595e6e6162193e0fb67a251#diff-1d54c5f722aebc473dbe96f836ddf974R995\n      //return angular.toJson(input || {}, true);\n      return JSON.stringify(input || {}, fgToJsonReplacer, '  ');\n    };\n  })\n  .directive('jsonify', function ($window, $filter) {\n    return {\n      templateUrl: 'angular-form-gen/common/jsonify/jsonify.ng.html',\n      replace: true,\n      scope: {\n        jsonify: '=',\n        displayHidden: '@jsonifyDisplayHidden'\n      },\n      link: function ($scope, $element, $attrs, ctrls) {\n        $scope.expression = $attrs.jsonify;\n\n        $scope.copy = function () {\n          $window.prompt(\n            'Copy to clipboard: Ctrl+C, Enter',\n            $filter('j$on')($scope.jsonify, $scope.displayHidden)\n          );\n        };\n      }\n    };\n  });\n","angular.module('fg').controller('fgTabsController', function () {\n  this.items = [];\n  this.active = null;\n\n  this.add = function (item) {\n    this.items.push(item);\n\n    this.items.sort(function (x, y) {\n      return x.order - y.order;\n    });\n\n    if (!this.active && item.autoActive != false) {\n      this.activate(item);\n    }\n  };\n\n  this.activate = function (item) {\n    if (!item.disabled) {\n      this.active = item;\n    }\n  };\n});\n","angular.module('fg').directive('fgTabs', function () {\n  return {\n    require: ['fgTabs'],\n    restrict: 'EA',\n    transclude: true,\n    controller: 'fgTabsController',\n    templateUrl: 'angular-form-gen/common/tabs/tabs.ng.html',\n    scope: {\n      tabs: '=?fgTabs'\n    },\n    link: function ($scope, $element, $attrs, $ctrls) {\n      $scope.tabs = $ctrls[0];\n    }\n  };\n});\n","angular\n  .module('fg')\n  .directive('fgTabsPane', [\n    'fgTabsPaneLinkFn',\n    function (fgTabsPaneLinkFn) {\n      return {\n        require: ['^fgTabs'],\n        restrict: 'EA',\n        transclude: true,\n        templateUrl: 'angular-form-gen/common/tabs/tabs-pane.ng.html',\n        link: fgTabsPaneLinkFn,\n        scope: true\n      };\n    }\n  ])\n  .factory('fgTabsPaneLinkFn', function () {\n    return function ($scope, $element, $attrs, $ctrls) {\n      $scope.tabs = $ctrls[0];\n\n      $scope.pane = {\n        title: $attrs.fgTabsPane || $attrs.title,\n        order: parseInt($attrs.fgTabsPaneOrder || $attrs.order) || 10,\n        autoActive: !(\n          $attrs.fgTabsPaneAutoActive === 'false' ||\n          $attrs.autoActive === 'false'\n        ),\n        renderAlways:\n          $attrs.fgTabsPaneRenderAlways === 'true' ||\n          $attrs.renderAlways === 'true'\n      };\n\n      $scope.$watch($attrs.disabled, function (value) {\n        $scope.pane.disabled = value;\n      });\n\n      $scope.tabs.add($scope.pane);\n    };\n  });\n","angular.module('dq').factory('dqUtils', [\n  '$window',\n  '$rootScope',\n  function ($window, $rootScope) {\n    var _dragData = null;\n\n    //noinspection FunctionWithInconsistentReturnsJS\n    return {\n      getEvent: function (e) {\n        return e && e.originalEvent ? e.originalEvent : e || $window.event;\n      },\n      stopEvent: function (e) {\n        // e.cancelBubble is supported by IE8 -\n        // this will kill the bubbling process.\n        try {\n          e.cancelBubble = true;\n          e.bubbles = false; // May be readonly\n        } catch (error) {}\n\n        // e.stopPropagation works in modern browsers\n        if (e.stopPropagation) e.stopPropagation();\n        if (e.preventDefault) e.preventDefault();\n\n        return false;\n      },\n      dragData: function (data) {\n        if (data === undefined) {\n          return _dragData;\n        }\n        _dragData = data;\n      },\n      getParentArea: function ($scope) {\n        var area = {};\n        $scope.$emit('dqLocateArea', area);\n        return area.name;\n      },\n      isAreaMatch: function ($scope) {\n        var parentArea = this.getParentArea($scope);\n        var eventArea = _dragData ? _dragData.area : '';\n\n        return parentArea === eventArea;\n      }\n    };\n  }\n]);\n","angular.module('dq').directive('dqDragArea', [\n  'dqUtils',\n  function (dqUtils) {\n    function evalBroadcastEvent($scope, args, areaName, expression) {\n      if (expression && args && args.area === areaName) {\n        $scope.$eval(expression);\n      }\n    }\n\n    return {\n      restrict: 'AEC',\n      link: function ($scope, $element, $attrs) {\n        var areaName = $attrs.dqDragArea || $attrs.dqDragAreaName || '';\n\n        $scope.$on('dqDragBegin', function ($event, args) {\n          evalBroadcastEvent(\n            $scope,\n            args,\n            areaName,\n            $attrs.dqDragProgressBegin\n          );\n        });\n\n        $scope.$on('dqDragEnd', function ($event, args) {\n          evalBroadcastEvent($scope, args, areaName, $attrs.dqDragProgressEnd);\n        });\n\n        $scope.$on('dqLocateArea', function ($event, args) {\n          args.name = areaName;\n          $event.stopPropagation();\n        });\n      }\n    };\n  }\n]);\n","angular\n  .module('dq')\n  .factory('dqDragTrack', [\n    'dqUtils',\n    '$document',\n    function (dqUtils, $document) {\n      // Combines both nq-drag-enter & nq-drag-leave & nq-drag-over\n\n      return function ($scope, $element, $attrs) {\n        // Tracking already set on the element?\n\n        if ($element.data('dqDragTrack') !== true) {\n          var trackingEnabled = false; // Toggled on drag-begin if the area name does not match the target\n          var inbound = false; // Toggle to indicate if the dragging is in or outbound element\n          var element = $element[0];\n          var dropEffect = 'none'; // Drop effect used in the dragover event\n          var doingLeaveDoubleCheck = false; // Toggle that indicates the body has a dragover event to do.\n\n          var $body = $document.find('body');\n\n          function dragLeaveDoubleCheck($e) {\n            var e = dqUtils.getEvent($e);\n\n            // Check if the drag over element is a child of the this element\n\n            var target = e.target || $e.target;\n\n            if (target !== element) {\n              // TODO: we're not really checking if the target element is visually within the $element.\n\n              if (!element.contains(target)) {\n                // Drag over element is out of bounds\n\n                dragLeaveForSure(true);\n              }\n            }\n\n            // We're done with the expensive body call\n\n            $body.off('dragover', dragLeaveDoubleCheck);\n\n            // Notify the local element event callback there's no event listener on the body and the next event\n            // can safely be cancelled.\n\n            doingLeaveDoubleCheck = false;\n\n            e.dataTransfer.dropEffect = dropEffect;\n\n            // Always cancel the dragover -- otherwise the dropEffect is not used.\n\n            return dqUtils.stopEvent($e);\n          }\n\n          function dragLeaveForSure(apply) {\n            return; // We don't care if you drag out of bounds.\n            // Letting this run causes the blue drop-zones to disappear\n            // if you scroll to the bottom of the form designer while dragging a field.\n            inbound = false;\n            var expression = $attrs.dqDragLeave;\n            if (expression) {\n              if (apply) {\n                $scope.$apply(function () {\n                  $scope.$eval(expression);\n                });\n              } else {\n                $scope.$eval(expression);\n              }\n            }\n          }\n\n          $scope.$on('$destroy', function () {\n            // Just to be sure\n            $body.off('dragover', dragLeaveDoubleCheck);\n          });\n\n          $scope.$on('dqDragBegin', function () {\n            // Check if we should track drag movements\n            trackingEnabled = dqUtils.isAreaMatch($scope);\n          });\n\n          $scope.$on('dqDragEnd', function () {\n            if (trackingEnabled) {\n              // Gief cake\n              dragLeaveForSure(false);\n            }\n          });\n\n          $element.on('dragenter', function (e) {\n            if (trackingEnabled && inbound === false) {\n              inbound = true;\n              var expression = $attrs.dqDragEnter;\n              if (expression) {\n                $scope.$apply(function () {\n                  $scope.$eval(expression);\n                });\n              }\n            }\n          });\n\n          $element.on('dragleave', function () {\n            if (trackingEnabled && inbound === true) {\n              // dragleave is a lie -- hovering child elements will cause this event to trigger also.\n              // We fake the cake by tracking the drag ourself.\n\n              // Notify the \"real\" dragover event that he has to play nice with the body and not to\n              // cancel the event chain.\n\n              doingLeaveDoubleCheck = true;\n              $body.on('dragover', dragLeaveDoubleCheck);\n            }\n          });\n\n          //noinspection FunctionWithInconsistentReturnsJS\n          $element.on('dragover', function ($e) {\n            if (trackingEnabled) {\n              var e = dqUtils.getEvent($e);\n\n              var expression = $attrs.dqDragOver;\n              var result;\n\n              if (expression) {\n                $scope.$apply(function () {\n                  result = $scope.$eval(expression);\n                });\n              }\n\n              // The evaluated expression can indicate to cancel the drop\n\n              dropEffect = result === false ? 'none' : 'copy';\n\n              if (!doingLeaveDoubleCheck) {\n                // There's no dragover queued on the body.\n                // The event needs to be terminated here else the dropEffect will\n                // not be applied (and dropping is not allowed).\n\n                e.dataTransfer.dropEffect = dropEffect;\n                return dqUtils.stopEvent($e);\n              }\n            }\n          });\n\n          //noinspection FunctionWithInconsistentReturnsJS\n          $element.on('drop', function ($e) {\n            var e = dqUtils.getEvent($e);\n\n            if (trackingEnabled) {\n              var expression = $attrs.dqDrop;\n\n              if (expression) {\n                $scope.$apply(expression);\n              }\n            }\n\n            return dqUtils.stopEvent($e);\n          });\n\n          // Ensure that we only do all this magic stuff on this element for one time only.\n\n          $element.data('dqDragTrack', true);\n        }\n      };\n    }\n  ])\n  .directive('dqDragEnter', [\n    'dqDragTrack',\n    function (dqDragTrack) {\n      return {\n        link: dqDragTrack\n      };\n    }\n  ])\n  .directive('dqDragLeave', [\n    'dqDragTrack',\n    function (dqDragTrack) {\n      return {\n        link: dqDragTrack\n      };\n    }\n  ])\n  .directive('dqDragOver', [\n    'dqDragTrack',\n    function (dqDragTrack) {\n      return {\n        link: dqDragTrack\n      };\n    }\n  ])\n  .directive('dqDrop', [\n    'dqDragTrack',\n    function (dqDragTrack) {\n      return {\n        link: dqDragTrack\n      };\n    }\n  ]);\n","angular.module('dq').directive('dqDraggable', [\n  'dqUtils',\n  '$rootScope',\n  function (dqUtils, $rootScope) {\n    function evalAndBroadcast(eventName, targetArea, $scope, expression, cb) {\n      $scope.$apply(function () {\n        var data = $scope.$eval(expression);\n\n        var bcData = {\n          area: targetArea,\n          data: data\n        };\n\n        cb(bcData);\n\n        $rootScope.$broadcast(eventName, bcData);\n      });\n    }\n\n    return {\n      restrict: 'AEC',\n      link: function ($scope, $element, $attrs) {\n        var targetArea = $attrs.dqDraggable || $attrs.dqDragTargetArea || '';\n        var disabled = false;\n\n        $scope.$watch($attrs.dqDragDisabled, function (value) {\n          disabled = value;\n          $element.attr('draggable', disabled ? 'false' : 'true');\n        });\n\n        $element\n          .on('selectstart', function (e) {\n            // Pure IE evilness\n\n            if (!disabled && this.dragDrop) {\n              this.dragDrop();\n              e = dqUtils.getEvent(e);\n              return dqUtils.stopEvent(e);\n            }\n          })\n          .on('dragstart', function (e) {\n            e = dqUtils.getEvent(e);\n\n            if (disabled) {\n              return dqUtils.stopEvent(e);\n            }\n\n            var dt = e.dataTransfer;\n            dt.effectAllowed = 'all';\n            dt.setData('Text', 'The cake is a lie!');\n\n            evalAndBroadcast(\n              'dqDragBegin',\n              targetArea,\n              $scope,\n              $attrs.dqDragBegin,\n              function (dragData) {\n                dqUtils.dragData(dragData);\n              }\n            );\n          })\n          .on('dragend', function () {\n            evalAndBroadcast(\n              'dqDragEnd',\n              targetArea,\n              $scope,\n              $attrs.dqDragEnd,\n              function () {\n                dqUtils.dragData(null);\n              }\n            );\n          });\n      }\n    };\n  }\n]);\n","angular.module('fg').controller('fgEditCanvasController', [\n  '$scope',\n  'dqUtils',\n  '$timeout',\n  'pubsubService',\n  'flowinglyConstants',\n  function ($scope, dqUtils, $timeout, pubsubService, flowinglyConstants) {\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    let ctrl = this;\n    const subscriberId = 'fgEditCanvasController';\n    this.recaptchaType = flowinglyConstants.formFieldType.RECAPTCHA;\n    // - - - 8-< - - - - - - - - - - - - - - - - - - - - -\n    // Drag & drop\n    // - - - 8-< - - - - - - - - - - - - - - - - - - - - -\n\n    $scope.$on('dqDragBegin', () => {\n      var dragData = dqUtils.dragData();\n      $scope.draggingFieldIndex = dragData.data.index;\n      $scope.dragging = true;\n      if (dragData.data.field.type === this.recaptchaType) {\n        $scope.allowedDropAreaIndex = $scope.schema.fields.length - 1;\n      }\n      ctrl.minimizeFields();\n    });\n\n    $scope.$on('dqDragEnd', function () {\n      $scope.dragging = false;\n      $scope.allowedDropAreaIndex = undefined;\n      ctrl.maximizeFields();\n    });\n\n    $scope.$on('$destroy', () => {\n      pubsubService.unsubscribeAll(subscriberId);\n    });\n    this.dragBeginCanvasField = function (index, field) {\n      // Delay is set to prevent browser from copying adjusted html as copy image\n\n      $timeout(function () {\n        field.$_isDragging = true;\n      }, 1);\n\n      $timeout(function () {\n        const el = document.getElementById('drag-field-origin-' + index);\n        el.scrollIntoView(true);\n      }, 10);\n\n      return { source: 'canvas', field: field, index: index };\n    };\n\n    this.dragEndCanvasField = function (field) {\n      // IE Fix: ensure this is fired after the drag begin\n\n      $timeout(function () {\n        field.$_isDragging = false;\n      }, 10);\n    };\n\n    //passing index as input to tell that field should be moved to this particular index\n    this.drop = function (movedToIndex) {\n      var dragData = dqUtils.dragData();\n      if (dragData && dragData.data) {\n        var field = dragData.data.field;\n        var source = dragData.data.source;\n        var index = dragData.data.index;\n\n        if (source === 'palette') {\n          this.shrunkFields();\n          $scope.schemaCtrl.addField(field, movedToIndex);\n        } else if (source === 'canvas') {\n          $scope.schemaCtrl.moveField(index, movedToIndex);\n        }\n\n        // IE fix: not calling dragEnd sometimes\n        field.$_isDragging = false;\n        pubsubService.publish('CARD_DESIGNER_DRAG_DROP');\n        $timeout(function () {\n          // dropzone-directive is meant to do this but doesn't always get a drag-end event\n          document\n            .querySelector('.fg-edit-canvas')\n            .querySelectorAll('fg-dropzone.over')\n            .forEach((element) => element.classList.remove('over'));\n          const targetIndex =\n            movedToIndex > index ? --movedToIndex : movedToIndex;\n          const el = document.getElementById('canvas-field-' + targetIndex);\n          el.scrollIntoView(true);\n        }, 200);\n      } else {\n        throw Error('Drop without data');\n      }\n    };\n\n    this.collapseFields = function () {\n      ($scope.schema.fields || []).forEach((field) => {\n        field.displayProperties = false;\n        if (field.type === 'image' && (!field.value || field.disabled)) {\n          field.minimized = true;\n        }\n      });\n    };\n\n    this.minimizeFields = function () {\n      ($scope.schema.fields || []).forEach((field) => {\n        field.minimized = true;\n      });\n    };\n\n    this.maximizeFields = function () {\n      ($scope.schema.fields || []).forEach((field) => {\n        if (\n          field.type !== 'image' ||\n          (field.value && !field.disabled) ||\n          field.displayProperties\n        ) {\n          delete field.minimized;\n        }\n      });\n    };\n\n    this.shrunkFields = function () {\n      ($scope.schema.fields || []).forEach((field) => {\n        field.shrunk = true;\n      });\n    };\n\n    pubsubService.subscribe(\n      'WORKFLOW_DESIGNER_FORM_FIELDS_ADDED',\n      function (event, template) {\n        ctrl.shrunkFields();\n        const index = $scope.schema.fields.find(\n          (x) => x.type === ctrl.recaptchaType\n        )\n          ? $scope.schema.fields.length - 1\n          : undefined;\n        $scope.schemaCtrl.addField(template, index, true);\n      },\n      subscriberId\n    );\n  }\n]);\n","angular.module('fg').directive('fgEditCanvas', function () {\n  return {\n    require: ['^fgEdit', '^fgSchema', '^form'],\n    templateUrl: 'angular-form-gen/edit/canvas/canvas.ng.html',\n    controller: 'fgEditCanvasController as canvasCtrl',\n    link: function ($scope, $element, $attrs, ctrls) {\n      $scope.editCtrl = ctrls[0];\n      $scope.schemaCtrl = ctrls[1];\n      $scope.formCtrl = ctrls[2];\n\n      var ignoreDirty = true;\n\n      $scope.$watchCollection('schema.fields', function () {\n        // Ignore the first call, $watchCollection fires at once without any changes.\n\n        if (!ignoreDirty) {\n          $scope.formCtrl.$setDirty(true);\n        }\n\n        ignoreDirty = false;\n      });\n    }\n  };\n});\n","angular.module('fg').directive('fgDropzone', function () {\n  return {\n    templateUrl: 'angular-form-gen/edit/canvas/dropzone/dropzone.ng.html',\n    link: function ($scope, $element, $attrs, ctrls) {\n      const el = $element[0];\n      el.addEventListener('dragenter', dragEnter);\n      el.addEventListener('dragleave', dragFinished);\n      el.addEventListener('drop', dragFinished);\n      el.addEventListener('dragend', dragFinished);\n\n      function dragEnter(event) {\n        this.classList.add('over');\n      }\n\n      function dragFinished(event) {\n        this.classList.remove('over');\n      }\n\n      $scope.hideDropArea = function hideDropArea() {\n        const dragging = $scope.dragging;\n        const draggingFieldIndex = $scope.draggingFieldIndex;\n        const $index = $scope.$index;\n\n        return (\n          (!dragging && $index === undefined) ||\n          (dragging &&\n            draggingFieldIndex !== undefined &&\n            (draggingFieldIndex === $index ||\n              (draggingFieldIndex === 0 && $index === undefined) ||\n              draggingFieldIndex - 1 === $index)) ||\n          (dragging &&\n            $scope.allowedDropAreaIndex !== undefined &&\n            $scope.allowedDropAreaIndex !== $index)\n        );\n      };\n\n      $scope.showDragArea = function showDragArea() {\n        const dragging = $scope.dragging;\n        const $index = $scope.$index;\n\n        return (\n          dragging &&\n          (!$scope.allowedDropAreaIndex ||\n            $index === $scope.allowedDropAreaIndex)\n        );\n      };\n    }\n  };\n});\n","import angular from 'angular';\nimport { IScope, ITimeoutService } from 'angular';\n\nangular.module('fg').directive('fgEditCanvasField', [\n  '$timeout',\n  'workflowStore',\n  'workflowService',\n  'flowinglyModelUtilityService',\n  'pubsubService',\n  'currencyService',\n  'flowinglyConstants',\n  'APP_CONFIG',\n  function (\n    $timeout,\n    workflowStore,\n    workflowService,\n    flowinglyModelUtilityService,\n    pubsubService,\n    currencyService,\n    flowinglyConstants,\n    APP_CONFIG\n  ) {\n    return {\n      templateUrl:\n        'angular-form-gen/edit/canvas/field/fg-edit-canvas-field.ng.html',\n      controller: [\n        '$scope',\n        '$timeout',\n        'workflowStore',\n        'workflowService',\n        'flowinglyModelUtilityService',\n        'pubsubService',\n        function (\n          $scope: IScope,\n          $timeout: ITimeoutService,\n          workflowStore,\n          workflowService,\n          flowinglyModelUtilityService,\n          pubsubService\n        ) {\n          const FIELD_TYPE = flowinglyConstants.formFieldType;\n          const subscriberId = 'fgEditCanvasField';\n          $scope.FIELD_TYPE = FIELD_TYPE;\n          $scope.nameOfDecisionUsingField = undefined;\n\n          $scope.hasCustomValidationOptions = (function (field) {\n            return (\n              field.type === FIELD_TYPE.NUMBER ||\n              field.type === FIELD_TYPE.CURRENCY ||\n              field.type === FIELD_TYPE.DATE ||\n              field.type === FIELD_TYPE.DATETIME ||\n              field.type === FIELD_TYPE.MULTISELECT_LIST ||\n              field.type === FIELD_TYPE.SHORT_TEXT\n            );\n          })($scope.field);\n\n          $scope.hasCurrencyOptions = $scope.field.type === FIELD_TYPE.CURRENCY;\n\n          $scope.onCustomValidationSwitch = function (isOn) {\n            const validation = $scope.field.customValidation || {};\n\n            switch ($scope.field.type) {\n              case FIELD_TYPE.SHORT_TEXT:\n                if (isOn) {\n                  validation.maxLength = 1;\n                } else {\n                  delete validation.maxLength;\n                }\n                break;\n            }\n\n            $scope.field.customValidation = validation;\n          };\n\n          $scope.$on('$destroy', () => {\n            pubsubService.unsubscribeAll(subscriberId);\n          });\n          $scope.activateCustomValidation = function () {\n            // wrapping it in a timeout because this may be be called from an ng-init\n            $timeout(function () {\n              switch ($scope.field.type) {\n                case 'currency':\n                  $scope.currencies = currencyService\n                    .getCurrencies()\n                    .map(function (c) {\n                      return c.code;\n                    })\n                    .sort();\n                  $scope.hasCustomCurrency = $scope.field.customUnits != null;\n\n                  /**\n                   * Drops the currency from the currency field or selects the first in the list.\n                   */\n                  $scope.toggleCurrency = function toggleCurrency(\n                    hasCustomCurrency\n                  ) {\n                    if (hasCustomCurrency) {\n                      $scope.field.customUnits = $scope.currencies[0];\n                    } else {\n                      $scope.field.customUnits = undefined;\n                    }\n                  };\n                case 'date':\n                case 'datetime':\n                  /*  you cannot use readonly in modeler + formgen for some reason. It disables the picker\n                   *  even after a timeout! The only way Ive found to circumvent this is to bind to the key\n                   *  events and then cancel them!\n                   *\n                   *  I've not done delved deeper into  this, as I have more pressing tickets to attend to.\n                   */\n                  angular\n                    .element(\n                      '#' +\n                        $scope.field.name +\n                        '_custom_validator_operator_value'\n                    )\n                    .on('cut copy paste keypress keydown', function (e) {\n                      e.preventDefault();\n                      e.stopPropagation();\n                    })\n                    .css('pointer-events', 'none');\n                  break;\n              }\n            }, 100);\n          };\n\n          $scope.activateCustomValidation();\n\n          $scope.initialPreviousStep = function () {\n            var nodeDataArray = workflowStore.getNodeDataArray();\n            var linkDataArray = workflowStore.getLinkDataArray();\n            $scope.previousStepsDataSource =\n              flowinglyModelUtilityService.getPreviousNodesDataSourceForDropdown(\n                $scope.nodeKey,\n                nodeDataArray,\n                linkDataArray,\n                null,\n                true\n              );\n            if (\n              $scope.field.type === 'date' ||\n              $scope.field.type === 'datetime'\n            ) {\n              var nodeData = nodeDataArray.find(function (n) {\n                return n.key === $scope.nodeKey;\n              });\n              if (nodeData) {\n                if ($scope.previousStepsDataSource === undefined)\n                  $scope.previousStepsDataSource = [];\n\n                $scope.nodeStepId = nodeData.id;\n                $scope.previousStepsDataSource.push({\n                  Value: nodeData.text,\n                  Key: nodeData.id\n                });\n              }\n            }\n            if ($scope.field.customValidation.valueOption !== 'previousValue') {\n              $scope.field.customValidation.previousStepId = undefined;\n\n              if ($scope.field.customValidation.formFieldId) {\n                var matchField = $scope.previousStepFieldsDataSource.find(\n                  function (f) {\n                    return f.name === $scope.field.customValidation.formFieldId;\n                  }\n                );\n              }\n            }\n\n            if ($scope.previousStepsDataSource) {\n              $timeout(function () {\n                angular\n                  .element(\n                    '#' + $scope.field.name + '_custom_validator_previous_step'\n                  )\n                  .kendoComboBox({\n                    dataSource: $scope.previousStepsDataSource,\n                    dataTextField: 'Value',\n                    dataValueField: 'Key',\n                    value: $scope.field.customValidation.previousStepId,\n                    clearButton: false\n                  });\n\n                if (\n                  !$scope.field.customValidation.previousStepId &&\n                  $scope.field.customValidation.valueOption === 'previousValue'\n                ) {\n                  $scope.field.customValidation.previousStepId =\n                    $scope.previousStepsDataSource[0].Key;\n                }\n\n                $scope.onPreviousStepChange();\n              });\n            }\n          };\n\n          $scope.onPreviousStepChange = function () {\n            if (\n              $scope.field.customValidation &&\n              $scope.field.customValidation.valueOption === 'previousValue' &&\n              $scope.previousStepsDataSource &&\n              $scope.field.customValidation.previousStepId\n            ) {\n              var previousStep = workflowStore.getNodeById(\n                $scope.field.customValidation.previousStepId\n              );\n              $scope.previousStepFieldsDataSource =\n                previousStep.Card.formElements.filter(function (f) {\n                  return (\n                    f.type === $scope.field.type && f.name !== $scope.field.name\n                  );\n                });\n\n              if (\n                $scope.nodeStepId ===\n                $scope.field.customValidation.previousStepId\n              ) {\n                var currentStepFileds = $scope.$parent.schema.fields.filter(\n                  function (f) {\n                    return (\n                      f.type === $scope.field.type &&\n                      f.name !== $scope.field.name\n                    );\n                  }\n                );\n                for (var i = 0; i < currentStepFileds.length; i++) {\n                  var otherField = currentStepFileds[i];\n                  var findField = $scope.previousStepFieldsDataSource.find(\n                    function (f) {\n                      return f.name === otherField.name;\n                    }\n                  );\n                  if (findField) {\n                    findField.displayName = otherField.displayName;\n                  } else {\n                    if ($scope.previousStepFieldsDataSource === undefined)\n                      $scope.previousStepFieldsDataSource = [];\n\n                    $scope.previousStepFieldsDataSource.push({\n                      displayName: otherField.displayName,\n                      name: otherField.name\n                    });\n                  }\n                }\n              }\n              // check if the defaultFormFieldId still exist for newly loaded previous step\n              if (!!$scope.field.customValidation.formFieldId) {\n                var matchField = $scope.previousStepFieldsDataSource.find(\n                  function (f) {\n                    return f.name === $scope.field.customValidation.formFieldId;\n                  }\n                );\n\n                if (!matchField) {\n                  $scope.field.customValidation.formFieldId = undefined;\n                }\n              }\n\n              if ($scope.previousStepFieldsDataSource.length > 0) {\n                angular\n                  .element(\n                    '#' +\n                      $scope.field.name +\n                      '_custom_validator_previous_step_field'\n                  )\n                  .kendoComboBox({\n                    dataSource: $scope.previousStepFieldsDataSource,\n                    dataTextField: 'displayName',\n                    dataValueField: 'name',\n                    value: $scope.field.customValidation.formFieldId,\n                    clearButton: false\n                  });\n\n                if (!$scope.field.customValidation.formFieldId) {\n                  $scope.field.customValidation.formFieldId =\n                    $scope.previousStepFieldsDataSource[0].name;\n                  $scope.onPreviousFieldChange();\n                }\n              }\n            }\n          };\n\n          $scope.onPreviousFieldChange = function () {\n            var matchField = $scope.previousStepFieldsDataSource.find(function (\n              f\n            ) {\n              return f.name === $scope.field.customValidation.formFieldId;\n            });\n\n            if (!matchField) {\n              $scope.field.customValidation.formFieldId = undefined;\n            }\n          };\n\n          $scope.clearPreviousOperationData = function () {\n            if ($scope.field.customValidation.valueOption === 'none') {\n              $scope.field.customValidation.previousStepId = undefined;\n              $scope.field.customValidation.formFieldId = undefined;\n              $scope.field.customValidation.stepCreatedDateOffset = '';\n            } else if (\n              $scope.field.customValidation.valueOption === 'previousValue'\n            ) {\n              $scope.field.customValidation.value = '';\n              $scope.field.customValidation.stepCreatedDateOffset = '';\n              $scope.initialPreviousStep();\n            } else if (\n              $scope.field.customValidation.valueOption === 'createdDate'\n            ) {\n              $scope.field.customValidation.previousStepId = undefined;\n              $scope.field.customValidation.formFieldId = undefined;\n              $scope.field.customValidation.value = '';\n            }\n          };\n\n          pubsubService.subscribe(\n            'WORKFLOW_DESIGNER_FORM_FIELDS_CHANGED',\n            () => {\n              $scope.onPreviousStepChange();\n            },\n            subscriberId\n          );\n\n          $scope.customValidationIsEnabled =\n            [\n              'number',\n              'currency',\n              'date',\n              'datetime',\n              'multiselectlist'\n            ].indexOf($scope.field.type) !== -1;\n          if ($scope.field.displayProperties === undefined) {\n            $scope.field.displayProperties = false;\n          }\n          if ($scope.field.customValidation) {\n            if ($scope.field.customValidation.rule !== undefined)\n              $scope.field.customValidation.rule =\n                $scope.field.customValidation.rule.toString();\n            if (!$scope.field.customValidation.valueOption)\n              $scope.field.customValidation.valueOption = 'none';\n            if ($scope.field.customValidation.valueOption === 'previousValue')\n              $scope.initialPreviousStep();\n          } else {\n            if ($scope.customValidationIsEnabled) {\n              $scope.field.customValidation = {\n                required: false,\n                valueOption: 'none'\n              };\n            }\n          }\n        }\n      ],\n      link: function ($scope, element, attrs) {\n        $scope.toggleSetting = function () {\n          const field = $scope.field;\n          const oldDisplayProperties = field.displayProperties;\n          $timeout(function () {\n            $scope.$parent.$apply(attrs.onSettingClick);\n            field.displayProperties = !oldDisplayProperties;\n            if (field.displayProperties) {\n              field.shrunk = false;\n            }\n            if (field.type === 'image') {\n              field.minimized = field.shrunk =\n                !field.displayProperties &&\n                (field.disabled || field.value == undefined);\n            }\n          });\n        };\n\n        $scope.toggleDisabled = function () {\n          const field = $scope.field;\n          field.disabled = !field.disabled;\n          if (field.type === 'image') {\n            field.minimized =\n              !field.displayProperties &&\n              (field.disabled || field.value == undefined);\n          }\n        };\n\n        $scope.showRequiredToggle = (fieldType) => {\n          const exemptFields = [\n            'Approval rule',\n            'Attach Documents',\n            'Dynamic actors',\n            'Formula',\n            'Image',\n            'Instruction',\n            'Lookup',\n            'Task list'\n          ];\n\n          return !exemptFields.some((x) => x === fieldType);\n        };\n\n        $scope.showExcludeFromCompletedStepsToggle = (fieldType) => {\n          const excludingFields = ['Attach Documents', 'Image', 'Instruction'];\n\n          return excludingFields.some((x) => x === fieldType);\n        };\n\n        $scope.showIncludeInFormToggle = (fieldType) => {\n          const fields = ['Image'];\n          return fields.some((x) => x === fieldType);\n        };\n\n        $scope.showVisibilityToggleInsideConfiguration = () => {\n          return APP_CONFIG.showVisibilityToggleInsideConfiguration;\n        };\n\n        $scope.enableConditionalForms = () => {\n          return APP_CONFIG.enableConditionalForms;\n        };\n\n        $scope.isUsedByDecision = () => {\n          if ($scope.nameOfDecisionUsingField === undefined) {\n            const currentNode = workflowService.getCurrentNode();\n            const allNodes = workflowStore.getNodeDataArray();\n            const decision = allNodes.find((node) => {\n              return (\n                node.category === 'exclusiveGateway' &&\n                node.selectedNodeKey === currentNode.key &&\n                node.gateway?.fieldId === $scope.field.name\n              );\n            });\n            $scope.nameOfDecisionUsingField = decision ? decision.text : '';\n          }\n          return $scope.nameOfDecisionUsingField;\n        };\n\n        $scope.enableHiddenLookupField = () => {\n          return APP_CONFIG.enableHiddenLookupField;\n        };\n      }\n    };\n  }\n]);\n","angular.module('fg').controller('fgPropertyFieldOptionsController', [\n  '$scope',\n  function ($scope) {\n    this.addButtonText =\n      $scope.field.type === 'tasklist' ? 'Add Task' : 'Add Option';\n\n    // Monitor for changes in the options array and ensure a\n    // watch for every option value.\n    // Watchers are deleted when removing options from the array.\n\n    $scope.$watchCollection('field.options', function (options) {\n      if (options) {\n        angular.forEach(options, function (option) {\n          if (!option.$_valueWatchFn) {\n            option.$_valueWatchFn = $scope.$watch(function () {\n              return option.value;\n            }, handleValueChange);\n          }\n        });\n      }\n    });\n\n    function handleValueChange(newValue, oldValue) {\n      // Called by the watch collection\n      // Ensure that when the selected value is changed, this\n      // is synced to the field value.\n\n      if (newValue !== oldValue) {\n        if ($scope.multiple) {\n          $scope.field.value[newValue] = $scope.field.value[oldValue];\n          delete $scope.field.value[oldValue];\n        } else {\n          if (oldValue === $scope.field.value) {\n            $scope.field.value = newValue;\n          }\n        }\n      }\n    }\n\n    function newGuid() {\n      function chunk(s) {\n        var p = (Math.random().toString(16) + '000000000').substr(2, 8);\n        return s ? '-' + p.substr(0, 4) + '-' + p.substr(4, 4) : p;\n      }\n      return chunk() + chunk(true) + chunk(true) + chunk();\n    }\n\n    this.addOption = function () {\n      if (!$scope.field.options) {\n        $scope.field.options = [];\n      }\n\n      var index = $scope.field.options.length - 1;\n      var optIndex;\n\n      if (index === -1) {\n        optIndex = 1;\n      } else {\n        optIndex = +$scope.field.options[index].value + 1;\n      }\n\n      var option = {\n        value: optIndex.toString(),\n        text: 'Option ' + optIndex,\n        id: newGuid()\n      };\n\n      if ($scope.field.type === 'tasklist') {\n        option.text = 'Task ' + optIndex;\n      }\n\n      $scope.field.options.push(option);\n\n      var count = $scope.field.options.length;\n\n      if (!$scope.multiple && count === 1) {\n        $scope.field.value = option.value;\n      }\n    };\n\n    this.removeOption = function (index) {\n      var options = $scope.field.options.splice(index, 1);\n\n      if (options && options.length) {\n        var option = options[0];\n\n        if ($scope.multiple) {\n          if ($scope.field.value[option.value] !== undefined)\n            delete $scope.field.value[option.value];\n        } else {\n          if (\n            option.value === $scope.field.value &&\n            $scope.field.options.length\n          ) {\n            $scope.field.value = $scope.field.options[0].value;\n          }\n\n          option.$_valueWatchFn();\n        }\n      }\n    };\n  }\n]);\n","angular\n  .module('fg')\n  .factory('fgPropertyFieldOptionsLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {\n      $scope.multiple = false;\n\n      $attrs.$observe('fgPropertyFieldOptions', function (value) {\n        if (value === 'multiple') {\n          $scope.multiple = true;\n        }\n      });\n    };\n  })\n  .directive('fgPropertyFieldOptions', [\n    'fgPropertyFieldOptionsLinkFn',\n    function (fgPropertyFieldOptionsLinkFn) {\n      return {\n        scope: true,\n        controller: 'fgPropertyFieldOptionsController as optionsCtrl',\n        templateUrl:\n          'angular-form-gen/edit/canvas/field/properties/options/options.ng.html',\n        link: fgPropertyFieldOptionsLinkFn\n      };\n    }\n  ]);\n","import angular from 'angular';\nimport { SharedAngular } from '../../../../@types/sharedAngular';\n\nangular.module('fg').directive('fgEditCanvasFieldProperties', [\n  'fgUtils',\n  'flowinglyKBService',\n  'fileService',\n  'workflowStore',\n  'flowinglyModelUtilityService',\n  'workflowFieldVariableService',\n  'flowinglyConstants',\n  function (\n    fgUtils,\n    flowinglyKBService,\n    fileService: SharedAngular.FileService,\n    workflowStore,\n    flowinglyModelUtilityService: SharedAngular.FlowinglyModelUtilityService,\n    workflowFieldVariableService,\n    flowinglyConstants: SharedAngular.FlowinglyConstants\n  ) {\n    return {\n      templateUrl:\n        'angular-form-gen/edit/canvas/field/properties/properties.ng.html',\n      scope: {\n        field: '=fgEditCanvasFieldProperties',\n        allFields: '=allFields',\n        nodeKey: '=?',\n        nodeId: '=?'\n      },\n      link: {\n        post: function ($scope) {\n          $scope.$watch('fieldPropertiesForm.$invalid', function (newValue) {\n            $scope.field.$$_invalid = newValue;\n          });\n\n          $scope.field.nodeId = $scope.nodeId;\n\n          if (\n            $scope.field.type === flowinglyConstants.formFieldType.INSTRUCTION\n          ) {\n            fileService\n              .replaceFileIdsWithImages($scope.field.value)\n              .then((result) => {\n                $scope.field.value = result;\n              });\n\n            $scope.$on('kendoWidgetCreated', function (event, widget) {\n              widget.bind('paste', function (e) {\n                if (e.sender && e.html) {\n                  // Remove the data-file-id attribute generated for the image source from the newly inserted image through pasting.\n                  e.html = e.html.replace(/data-file-id=\"[^\"]*\"/g, '');\n                  const newHtml = processPastedContent(e.html);\n                  if (newHtml !== null) {\n                    e.html = newHtml;\n                  }\n                }\n              });\n              //to append third party fonts we need to access iframe->head object inside kendo editor and link font.\n              angular\n                .element(\n                  angular\n                    .element('.k-editable-area .k-content')[0]\n                    .contentDocument.getElementsByTagName('head')\n                )\n                .append(\n                  \"<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,600,700' rel='stylesheet' type='text/css'>\"\n                );\n\n              const styleTag =\n                widget.body.parentNode.getElementsByTagName('style')[0];\n              styleTag.parentNode.removeChild(styleTag);\n              widget.body.style.fontFamily = '\"Open Sans\", sans-serif';\n              widget.body.style.fontSize = '13px';\n              widget.body.style.color = '#35384D';\n\n              // Find all the text editor and bind the execute function.\n              const editorElements = $('[data-text-editor=\"instruction\"]');\n\n              try {\n                editorElements.toArray().forEach((element) => {\n                  const editor = $(element).data('kendoEditor');\n                  if (editor) {\n                    editor.bind('execute', editorExecute);\n                  }\n                });\n              } catch (e) {\n                // Swallow error and prevent code termination.\n              }\n            });\n\n            $scope.allStepVariables = [];\n            $scope.showAddVariableButton = true;\n            constructVariableDropdown();\n\n            $scope.toggleDropDown = function () {\n              $('.variable-all-group').slideToggle(150);\n            };\n\n            $scope.selectVariable = function ($event) {\n              $scope.toggleDropDown();\n              const value = escapeSpecialChar(\n                $($event.currentTarget).data('itemValue')\n              );\n              const editor = $(\n                '.field-settings.visible .custom-email-editor textarea.k-content'\n              ).data('kendoEditor');\n              editor.exec('inserthtml', { value: `${value}` });\n            };\n\n            function constructVariableDropdown() {\n              const nodeDataArray = workflowStore.getNodeDataArray();\n              const currentNode = flowinglyModelUtilityService.getNodeById(\n                nodeDataArray,\n                $scope.nodeId\n              );\n              $scope.showAddVariableButton = !(\n                currentNode.taskType === flowinglyConstants.taskType.PUBLIC_FORM\n              );\n              $scope.allStepVariables =\n                workflowFieldVariableService.getPriorNodesVariables(\n                  $scope.nodeId,\n                  null\n                );\n            }\n\n            function escapeSpecialChar(value) {\n              value = value\n                .replace(/&/g, '&amp;')\n                .replace(/</g, '&lt;')\n                .replace(/>/g, '&gt;')\n                .replace(/ /g, '&nbsp;');\n              return value;\n            }\n\n            $scope.toggleVariableGroup = function ($event) {\n              const groupHeader = $($event.currentTarget);\n              groupHeader.toggleClass('variable-group-collapsed');\n              const dropdown = groupHeader.next('.variable-dropdown');\n              dropdown.slideToggle(150);\n            };\n\n            $scope.options = [\n              'formatting',\n              'bold',\n              'italic',\n              'underline',\n              'fontSize',\n              'strikethrough',\n              'justifyLeft',\n              'justifyCenter',\n              'justifyRight',\n              'justifyFull',\n              'insertUnorderedList',\n              'insertOrderedList',\n              'indent',\n              'outdent',\n              'createLink',\n              'unlink',\n              'foreColor',\n              'backColor',\n              'insertImage',\n              'insertFile',\n              {\n                name: 'insertVideo',\n                tooltip: 'Embed Youtube Video',\n                exec: (e) =>\n                  $scope.$broadcast('EditorYoutubeClicked', {\n                    event: e,\n                    selector: `#${$scope.field.name}-textarea`\n                  })\n              },\n              'viewHtml',\n              'separator',\n              {\n                name: 'customTemplate',\n                template: `<div class=\"add-variable\" ng-show=\"showAddVariableButton\">\n                              <a ng-click=\"toggleDropDown()\"\n                                  class=\"btn\"\n                                  ng-class=\"blue\">Add Variable</a>\n                              <div class=\"variable-all-group\">\n                                  <div class=\"variable-group\">\n                                      <div class=\"variable-group-header variable-group-collapsed\" ng-click=\"toggleVariableGroup($event)\"><span>Flow Attributes</span></div>\n                                      <ul class=\"variable-dropdown\">\n                                          <li ng-click=\"selectVariable($event)\" data-item-value=\"{flow.subject}\"><span>Subject</span></li>\n                                          <li ng-click=\"selectVariable($event)\" data-item-value=\"{flow.initiatorFullName}\"><span>Initiator Full Name</span></li>\n                                          <li ng-click=\"selectVariable($event)\" data-item-value=\"{flow.initiatorEmail}\"><span>Initiator Email</span></li>\n                                          <li ng-click=\"selectVariable($event)\" data-item-value=\"{flow.initiatorManager}\"><span>Initiator Manager</span></li>\n                                          <li ng-click=\"selectVariable($event)\" data-item-value=\"{flow.initiatorPhoneNumber}\"><span>Initiator Phone Number</span></li>\n                                          <li ng-click=\"selectVariable($event)\" data-item-value=\"{flow.status}\"><span>Status</span></li>\n                                          <li ng-click=\"selectVariable($event)\" data-item-value=\"{flow.nextStep}\"><span>Next Step</span></li>\n                                          <li ng-click=\"selectVariable($event)\" data-item-value=\"{flow.dueDate}\"><span>Due Date</span></li>\n                                          <li ng-click=\"selectVariable($event)\" data-item-value=\"{flow.flowModelName}\"><span>Flow Model Name</span></li>\n                                          <li ng-click=\"selectVariable($event)\" data-item-value=\"{flow.flowId}\"><span>Flow ID</span></li>\n                                          <li ng-click=\"selectVariable($event)\" data-item-value=\"{flow.progress}\"><span>Progress</span></li>\n                                          <li ng-click=\"selectVariable($event)\" data-item-value=\"{flow.link}\"><span>Flow Link</span></li>\n                                      </ul>\n                                  </div>\n                                  <div ng-repeat=\"stepVariables in allStepVariables\" class=\"variable-group\">\n                                      <div class=\"variable-group-header variable-group-collapsed\" ng-click=\"toggleVariableGroup($event)\"><span>{{stepVariables.stepName}}</span></div>\n                                      <ul class=\"variable-dropdown\">\n                                          <li ng-repeat=\"fieldName in stepVariables.fieldNames\" ng-click=\"selectVariable($event)\"\n                                              data-item-value=\"{step.{{stepVariables.stepName}}.{{fieldName}}}\">\n                                              <span title='{{fieldName}}'>{{fieldName}}</span>\n                                          </li>\n                                      </ul>\n                                  </div>\n                              </div>\n                          </div>`\n              }\n            ];\n\n            function editorExecute(e) {\n              setTimeout(function () {\n                if (e.name === 'createlink') {\n                  const form = e.command._dialog.element;\n                  const selectors = ['#k-editor-link-target'];\n                  restyleCheckBoxes(form, selectors);\n                }\n              }, 0);\n            }\n\n            function restyleCheckBoxes(form, targetClasses) {\n              // FLOW-6400 -To get checkbox in Insert Hyperlink kendo pop-up to style similar to others in Flowingly,\n              // removing the kendo checkbox default class so that global Flowingly css checkbox style will take effect.\n              targetClasses.forEach((selector) => {\n                const linkTarget = form.find(selector);\n                if (linkTarget) {\n                  linkTarget.removeClass('k-checkbox');\n                }\n              });\n            }\n          } else if ($scope.field.type === 'selectlist') {\n            $scope.onChangeCallback = function () {\n              initializeFieldDataSource();\n            };\n            initializeFieldDataSource();\n          } else if ($scope.field.type === 'lookup') {\n            if (!$scope.field.lookupConfig) {\n              $scope.field.lookupConfig = {\n                dbName: '',\n                displayValue: '',\n                queryValue: '',\n                value: undefined\n              };\n            }\n          } else if ($scope.field.type === 'formula') {\n            flowinglyKBService\n              .getKbLink('properties.' + $scope.field.type)\n              .then(function (data) {\n                $scope.kbLink = data;\n              });\n          } else if ($scope.field.type === 'attachdocument') {\n            //place all attach document properties here\n          }\n\n          $scope.renderInfo = fgUtils.getRenderInfo($scope.field);\n\n          $scope.initializeFieldDataSource = initializeFieldDataSource;\n          function initializeFieldDataSource() {\n            const dsType = $scope.field.dataSource;\n            const isManualType = !dsType || dsType == 'manually';\n\n            $scope.dataSourceOptions = [\n              {\n                value: 'manually',\n                text: 'Populate manually'\n              },\n              {\n                value: 'database',\n                text: 'Database'\n              }\n            ];\n\n            if (isManualType) {\n              $scope.field.dataSource = 'manually';\n              $scope.field.dbDataSource = undefined;\n              $scope.field.hideSearchableToggle = false;\n            } else {\n              $scope.field.searchable = true;\n              $scope.field.hideSearchableToggle = true;\n              if (!$scope.field.dbDataSource) {\n                $scope.field.dbDataSource = {\n                  dbName: '',\n                  displayValue: '',\n                  filters: [{}]\n                };\n              }\n            }\n          }\n\n          function processPastedContent(html) {\n            const parser = new DOMParser();\n            const doc = parser.parseFromString(html, 'text/html');\n            const links = doc.querySelectorAll('a');\n\n            links.forEach((link) => {\n              const url = new URL(link.href, window.location.origin);\n              // Remove the prefix if it matches the current origin and pathname\n              if (\n                url.origin === window.location.origin &&\n                url.pathname.startsWith(window.location.pathname)\n              ) {\n                let newHref = url.href.replace(\n                  window.location.origin + window.location.pathname,\n                  ''\n                );\n\n                newHref = decodeURIComponent(newHref);\n                link.href = newHref;\n              } else {\n                link.href = decodeURIComponent(link.href);\n              }\n            });\n\n            return doc.body.innerHTML;\n          }\n        }\n      }\n    };\n  }\n]);\n","angular.module('fg').directive('fgPropertyFieldCommon', [\n  '$timeout',\n  'workflowStore',\n  'flowinglyModelUtilityService',\n  'pubsubService',\n  function (\n    $timeout,\n    workflowStore,\n    flowinglyModelUtilityService,\n    pubsubService\n  ) {\n    return {\n      restrict: 'AE',\n      templateUrl:\n        'angular-form-gen/edit/canvas/field/properties/property-field/common.ng.html',\n      link: {\n        post: function ($scope, $element, $attrs, ctrls) {\n          $scope.initialPreviousStep = function () {\n            var nodeDataArray = workflowStore.getNodeDataArray();\n            var linkDataArray = workflowStore.getLinkDataArray();\n            $scope.previousStepsDataSource =\n              flowinglyModelUtilityService.getPreviousNodesDataSourceForDropdown(\n                $scope.nodeKey,\n                nodeDataArray,\n                linkDataArray,\n                null,\n                true\n              );\n\n            if ($scope.field.defaultValueOption === 'none') {\n              $scope.field.defaultPreviousStepId = undefined;\n\n              if (\n                $scope.field.defaultFormFieldId &&\n                $scope.previousStepFieldsDataSource\n              ) {\n                const matchField = $scope.previousStepFieldsDataSource.find(\n                  (field) => field.name === $scope.field.defaultFormFieldId\n                );\n\n                if (\n                  matchField &&\n                  matchField.tableSchema === $scope.field.tableSchema\n                ) {\n                  $scope.field.tableSchema =\n                    '[{\"id\":0,\"type\":1,\"placeholder\":\"click to edit\",\"header\":\"header\",\"isRequired\":true}]';\n                }\n              }\n            }\n\n            if ($scope.field.defaultValueOption === 'placeholderText') {\n              $scope.field.defaultPreviousStepId = undefined;\n              $scope.field.defaultFormFieldId = undefined;\n            }\n\n            if ($scope.previousStepsDataSource) {\n              $timeout(function () {\n                const collatedDataSource = $scope.previousStepsDataSource;\n                const previousStepId = $scope.field.defaultPreviousStepId;\n                const prevIsInList = $scope.previousStepsDataSource.some(\n                  (item) => item.Key == previousStepId\n                );\n\n                // if step is not in the list of accessible steps, we manually add it\n                // but mark it as inaccessible.\n                if (!prevIsInList) {\n                  const step = nodeDataArray.find(\n                    (node) => node.id == previousStepId\n                  );\n                  if (step) {\n                    collatedDataSource.push({\n                      Key: step.id,\n                      Value: `${step.text} (inaccessible)`\n                    });\n                  }\n                }\n\n                let stepsWithMatchingFields = [];\n                for (let step of collatedDataSource) {\n                  if (\n                    getFieldsOfTypeFromStep(step.Key, $scope.field.type)\n                      .length > 0\n                  ) {\n                    stepsWithMatchingFields.push(step);\n                  }\n                }\n\n                if (\n                  (!$scope.field.defaultPreviousStepId ||\n                    !stepsWithMatchingFields.some(\n                      (step) => step.Key === $scope.field.defaultPreviousStepId\n                    )) &&\n                  $scope.field.defaultValueOption === 'previousValue'\n                ) {\n                  if (stepsWithMatchingFields.length > 0) {\n                    $scope.field.defaultPreviousStepId =\n                      stepsWithMatchingFields[0].Key;\n                  } else {\n                    $scope.field.defaultPreviousStepId = undefined;\n                  }\n                }\n                if (stepsWithMatchingFields.length > 0) {\n                  angular\n                    .element(`#${$scope.field.name}_previous_step`)\n                    .kendoComboBox({\n                      dataSource: stepsWithMatchingFields,\n                      dataTextField: 'Value',\n                      dataValueField: 'Key',\n                      value: $scope.field.defaultPreviousStepId,\n                      clearButton: false\n                    });\n\n                  $scope.onPreviousStepChange();\n                }\n              });\n            }\n          };\n\n          $scope.onPreviousStepChange = function () {\n            if (\n              $scope.field.defaultValueOption !== 'previousValue' ||\n              !$scope.previousStepsDataSource ||\n              !$scope.field.defaultPreviousStepId\n            ) {\n              return;\n            }\n\n            $scope.previousStepFieldsDataSource = getFieldsOfTypeFromStep(\n              $scope.field.defaultPreviousStepId,\n              $scope.field.type\n            );\n\n            // check if the defaultFormFieldId still exist for newly loaded previous step\n            if (!!$scope.field.defaultFormFieldId) {\n              const isMatchingField = $scope.previousStepFieldsDataSource.some(\n                (field) => field.name === $scope.field.defaultFormFieldId\n              );\n\n              if (!isMatchingField) {\n                $scope.field.defaultFormFieldId = undefined;\n              }\n            }\n\n            if ($scope.previousStepFieldsDataSource.length > 0) {\n              angular\n                .element(`#${$scope.field.name}_previous_step_field`)\n                .kendoComboBox({\n                  dataSource: $scope.previousStepFieldsDataSource,\n                  dataTextField: 'displayName',\n                  dataValueField: 'name',\n                  value: $scope.field.defaultFormFieldId,\n                  clearButton: false\n                });\n\n              if (!$scope.field.defaultFormFieldId) {\n                $scope.field.defaultFormFieldId =\n                  $scope.previousStepFieldsDataSource[0].name;\n                $scope.onPreviousFieldChange();\n              }\n            }\n          };\n\n          function getFieldsOfTypeFromStep(stepId, typeName) {\n            const step = workflowStore.getNodeById(stepId);\n            let allFieldsInStep = angular.copy(step.Card.formElements);\n            let tableFields = allFieldsInStep.filter(\n              (field) => field.typeName === 'Table'\n            );\n            if (tableFields && tableFields.length > 0) {\n              let tableCells =\n                flowinglyModelUtilityService.transformTableCellToField(\n                  flowinglyModelUtilityService.getEligibleCellsInFields(\n                    tableFields\n                  )\n                );\n              allFieldsInStep = allFieldsInStep.concat(tableCells);\n            }\n\n            typeName = typeName.toLowerCase();\n            return allFieldsInStep.filter(\n              (field) => field.type.toLowerCase() === typeName\n            );\n          }\n\n          $scope.onPreviousFieldChange = function () {\n            if ($scope.field.typeName !== 'Table') {\n              return;\n            }\n\n            const matchField = $scope.previousStepFieldsDataSource.find(\n              (field) => field.name === $scope.field.defaultFormFieldId\n            );\n\n            if (!matchField) {\n              $scope.field.defaultFormFieldId = undefined;\n            } else {\n              $scope.field.tableSchema = matchField.tableSchema;\n            }\n          };\n\n          $scope.showPlaceHolder = function () {\n            var visiblePlaceHolder = false;\n            switch ($scope.field.type) {\n              case 'text':\n              case 'currency':\n              case 'email':\n              case 'number':\n                visiblePlaceHolder = true;\n                break;\n              default:\n                visiblePlaceHolder = false;\n            }\n            if (\n              !visiblePlaceHolder &&\n              $scope.field.defaultValueOption === 'placeholderText'\n            ) {\n              $scope.field.defaultValueOption = 'none';\n            }\n            return visiblePlaceHolder;\n          };\n\n          $scope.setplaceholder = function () {\n            if ($scope.field.defaultValueOption === 'none') {\n              $scope.field.placeholder = '';\n\n              $scope.initialPreviousStep();\n            }\n          };\n\n          $scope.$watch($attrs['fgPropertyFieldCommon'], function (value) {\n            $scope.fields = angular.extend($scope.fields, value);\n          });\n\n          $scope.$watch(\n            function () {\n              return $scope.field.displayName;\n            },\n            function (newValue, oldValue) {\n              if (newValue !== oldValue) {\n                pubsubService.publish('FORM_FIELD_NAME_OR_STEP_NAME_CHANGED', {\n                  isFieldChange: true,\n                  fieldId: $scope.field.id,\n                  oldValue: oldValue,\n                  newValue: newValue\n                });\n              }\n            }\n          );\n\n          $scope.fields = {\n            fieldname: false,\n            label: false,\n            displayname: false,\n            placeholder: false,\n            tooltip: false,\n            focus: false,\n            previousfield: false\n          };\n          $scope.field.defaultValueOption =\n            $scope.field.defaultValueOption || 'none';\n          $scope.initialPreviousStep();\n        }\n      }\n    };\n  }\n]);\n","/*\n      The field-value directive will re-render itself when certain validation values are modified.\n      This is needed because angular does not watch or observe the values of certain attributes and allows\n      an invalid initial value to be saved in the form schema.\n\n      Important: the transcluded form field must be name fieldValue!\n\n      <div fg-property-field-value>\n        <input type=\"text\" \n               name=\"fieldValue\" \n               ng-model=\"field.value\" \n               ng-minlength=\"{{ field.validation.minlength }}\"\n               ng-maxlength=\"{{ field.validation.maxlength }}\"\n               ng-pattern=\"\\/{{ field.validation.pattern }}\\/\"/>\n      </div>\n\n      The fg-field-redraw directive will trigger, on model change, the field-value to re-render itself.\n */\n\nangular\n  .module('fg')\n  .directive('fgPropertyFieldValue', [\n    'fgPropertyFieldValueLinkFn',\n    function (fgPropertyFieldValueLinkFn) {\n      return {\n        require: ['^form'],\n        templateUrl:\n          'angular-form-gen/edit/canvas/field/properties/property-field/field-value.ng.html',\n        transclude: true,\n        link: fgPropertyFieldValueLinkFn\n      };\n    }\n  ])\n  .factory('fgPropertyFieldValueLinkFn', [\n    '$parse',\n    function ($parse) {\n      return function ($scope, $element, $attrs, ctrls) {\n        $scope.draw = true;\n        var frmCtrl = ctrls[0];\n        var oldViewValue;\n\n        $scope.$watch('field.$_redraw', function (value) {\n          if (value) {\n            var ngModelCtrl = frmCtrl['fieldValue'];\n\n            if (ngModelCtrl) {\n              oldViewValue = ngModelCtrl.$viewValue;\n            }\n\n            $scope.draw = false;\n            $scope.field.$_redraw = false;\n          } else {\n            $scope.draw = true;\n            $element = $element;\n          }\n        });\n\n        $scope.$watch(\n          function () {\n            return frmCtrl['fieldValue'];\n          },\n          function (ngModelCtrl) {\n            if (ngModelCtrl && oldViewValue) {\n              ngModelCtrl.$setViewValue(oldViewValue);\n              ngModelCtrl.$render();\n              oldViewValue = undefined;\n            }\n          }\n        );\n      };\n    }\n  ])\n  .directive('fgFieldRedraw', function () {\n    return {\n      require: ['ngModel'],\n      link: function ($scope, $element, $attrs, ctrls) {\n        var oldValue = $scope.$eval($attrs.ngModel);\n\n        $scope.$watch($attrs.ngModel, function (value) {\n          if (value != oldValue) {\n            $scope.field.$_redraw = true;\n            oldValue = value;\n          }\n        });\n      }\n    };\n  });\n","angular\n  .module('fg')\n  .directive('fgPropertyField', [\n    'fgPropertyFieldLinkFn',\n    function (fgPropertyFieldLinkFn) {\n      return {\n        restrict: 'AE',\n        templateUrl:\n          'angular-form-gen/edit/canvas/field/properties/property-field/property-field.ng.html',\n        transclude: true,\n        scope: true,\n        link: fgPropertyFieldLinkFn\n      };\n    }\n  ])\n  .factory('fgPropertyFieldLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {\n      $attrs.$observe('fgPropertyField', function (value) {\n        $scope.fieldName = value;\n      });\n\n      $attrs.$observe('fgPropertyFieldLabel', function (value) {\n        if (value) {\n          $scope.fieldLabel = value;\n        }\n      });\n    };\n  });\n","angular.module('fg').controller('tablePropertyController', [\n  '$scope',\n  function ($scope) {\n    var ctrl = this;\n    ctrl.onTableUpdated = onTableUpdated;\n    function onTableUpdated(value) {\n      //here we need to save the table schema such that it can be rendered in the runner\n      //set the fields schema property to the table schema\n      ctrl.field.tableSchema = value;\n\n      //the runner will then save the populated table to the field.value property\n    }\n  }\n]);\n","angular.module('fg').directive('fgParsePattern', function () {\n  return {\n    require: ['ngModel'],\n    link: function ($scope, $element, $attrs, ctrls) {\n      var ngModelCtrl = ctrls[0];\n\n      ngModelCtrl.$parsers.push(validate);\n\n      function validate(value) {\n        try {\n          new RegExp(value);\n        } catch (e) {\n          ngModelCtrl.$setValidity('pattern', false);\n          return undefined;\n        }\n\n        ngModelCtrl.$setValidity('pattern', true);\n        return value;\n      }\n    }\n  };\n});\n","angular\n  .module('fg')\n  .directive('fgPropertyFieldValidation', [\n    'fgPropertyFieldValidationLinkFn',\n    function (fgPropertyFieldValidationLinkFn) {\n      return {\n        restrict: 'A',\n        templateUrl:\n          'angular-form-gen/edit/canvas/field/properties/validation/validation.ng.html',\n        link: fgPropertyFieldValidationLinkFn\n      };\n    }\n  ])\n  .factory('fgPropertyFieldValidationLinkFn', [\n    'fgConfig',\n    function (fgConfig) {\n      var patternOptions = [];\n      var patternConfig = fgConfig.validation.patterns;\n\n      angular.forEach(patternConfig, function (value, text) {\n        patternOptions.push({ value: value, text: text });\n      });\n\n      return function ($scope, $element, $attrs, ctrls) {\n        $scope.patternOptions = patternOptions;\n\n        $scope.field.validation = $scope.field.validation || {};\n        $scope.field.validation.messages =\n          $scope.field.validation.messages || {};\n\n        $scope.fields = {\n          required: false,\n          minlength: false,\n          maxlength: false,\n          pattern: false\n        };\n\n        $scope.$watch($attrs['fgPropertyFieldValidation'], function (value) {\n          $scope.fields = angular.extend($scope.fields, value);\n        });\n      };\n    }\n  ]);\n","angular\n  .module('fg')\n  .directive('fgEditValidationMessage', [\n    'fgEditValidationMessageLinkFn',\n    function (fgEditValidationMessageLinkFn) {\n      return {\n        templateUrl:\n          'angular-form-gen/edit/canvas/field/properties/validation/validation-message.ng.html',\n        link: fgEditValidationMessageLinkFn,\n        scope: true\n      };\n    }\n  ])\n  .factory('fgEditValidationMessageLinkFn', function () {\n    var DEFAULT_TOOLTIP =\n      'Enter a error message here that will be shown if this validation fails. If this field is empty a default message will be used.';\n\n    return function ($scope, $element, $attrs, ctrls) {\n      $attrs.$observe('fgEditValidationMessage', function (value) {\n        $scope.validationType = value;\n      });\n\n      $attrs.$observe('fgEditValidationTooltip', function (value) {\n        value = value || DEFAULT_TOOLTIP;\n        $scope.tooltip = value;\n      });\n    };\n  });\n","angular.module('fg').controller('fgEditController', [\n  '$scope',\n  'fgUtils',\n  '$location',\n  'fgConfig',\n  'pubsubService',\n  '$timeout',\n  'APP_CONFIG',\n  'flowinglyConstants',\n  function (\n    $scope,\n    fgUtils,\n    $location,\n    fgConfig,\n    pubsubService,\n    $timeout,\n    appConfig,\n    flowinglyConstants\n  ) {\n    $scope.templates = angular.copy(fgConfig.fields.templates);\n\n    if (!appConfig.enableFormFieldReCaptcha) {\n      // filter out the recaptcha field from the list in form designer\n      $scope.templates = $scope.templates.filter(\n        (field) => field.type !== flowinglyConstants.formFieldType.RECAPTCHA\n      );\n\n      // to remove the recaptcha field from the canvas designer where the user looks their form\n      var recaptchaField = $scope.schema?.fields?.find((f) => f.type === flowinglyConstants.formFieldType.RECAPTCHA);\n      if (recaptchaField) {\n        recaptchaField.hide = true;\n      }\n    }\n\n    $scope.$watch(function (newValue, oldValue) {\n      var schema = $scope.schemaCtrl.model();\n\n      // to disable the recaptcha field from field when a recaptcha field is present in the form\n      const recaptchaField = $scope.templates.find(\n        (field) => field.type === flowinglyConstants.formFieldType.RECAPTCHA\n      );\n      if (recaptchaField) {\n        recaptchaField.disabled = $scope.schema.fields.some(\n          (field) => field.type === flowinglyConstants.formFieldType.RECAPTCHA\n        );\n      }\n\n      // Seems that this watch is sometimes fired after the scope has been destroyed(?)\n\n      if (schema) {\n        var fields = schema.fields;\n\n        if (fields) {\n          var i = fields.length;\n\n          while (--i >= 0 && !schema.$$_invalid) {\n            schema.$$_invalid = fields[i].$$_invalid;\n\n            fields[i].disabled =\n              (fields[i].type === 'image' && fields[i].disabled) ||\n              fields[i].type === 'fileupload';\n          }\n        }\n      }\n    });\n  }\n]);\n","angular\n  .module('fg')\n  .directive('fgEdit', [\n    'workflowStore',\n    'APP_CONFIG',\n    'flowinglyConstants',\n    function (workflowStore, APP_CONFIG, flowinglyConstants) {\n      return {\n        priority: 100,\n        require: 'fgSchema',\n        restrict: 'AE',\n        scope: {\n          schema: '=?fgSchema',\n          fieldType: '=?fgFieldType',\n          nodeKey: '=?fgNodeKey',\n          nodeId: '=?fgNodeId'\n        },\n        replace: true,\n        controller: 'fgEditController as editCtrl',\n        templateUrl: 'angular-form-gen/edit/edit.ng.html',\n        link: function ($scope, $element, $attrs, schemaCtrl) {\n          if ($scope.schema === undefined) {\n            $scope.schema = {};\n          }\n\n          schemaCtrl.model($scope.schema);\n\n          // Inserts an approval rule element when a task is an Approval Rule\n          // i.e. taskType = 8\n\n          var approvalRuleTemplate = null;\n          var fields = schemaCtrl.model().fields || [];\n          var hasApprovalControl = false;\n\n          angular.forEach(fields, function (field) {\n            if (field.type === 'approvalrule') {\n              hasApprovalControl = true;\n            }\n          });\n\n          if (\n            APP_CONFIG?.allowProcessMap &&\n            APP_CONFIG?.enableModelerFlowModelTypeSelection &&\n            APP_CONFIG?.enableMappingFieldsOnly &&\n            workflowStore?.getFlowModelType() ===\n              flowinglyConstants.flowModelType.PROCESS_MAP\n          ) {\n            $scope.templates = $scope.templates.filter(({ type }) =>\n              [\n                flowinglyConstants.formFieldType.INSTRUCTION,\n                flowinglyConstants.formFieldType.ATTACH_DOCUMENT,\n                flowinglyConstants.formFieldType.CHECKBOX,\n                flowinglyConstants.formFieldType.TASK_LIST\n              ].includes(type)\n            );\n          }\n\n          angular.forEach($scope.templates, function (template) {\n            if (template.type === 'approvalrule') {\n              approvalRuleTemplate = template;\n            }\n          });\n\n          if ($scope.fieldType) {\n            if ($scope.fieldType === 8) {\n              if (!hasApprovalControl && approvalRuleTemplate !== null)\n                schemaCtrl.addField(approvalRuleTemplate);\n            }\n            if ($scope.fieldType === 0) {\n              if (hasApprovalControl && approvalRuleTemplate !== null) {\n                schemaCtrl.removeField(approvalRuleTemplate);\n              }\n            }\n          }\n\n          $scope.schemaCtrl = schemaCtrl;\n        }\n      };\n    }\n  ]);\n","angular.module('fg').controller('fgEditPaletteCategoriesController', [\n  '$scope',\n  'fgConfig',\n  'workflowStore',\n  'APP_CONFIG',\n  'flowinglyConstants',\n  function ($scope, fgConfig, workflowStore, APP_CONFIG, flowinglyConstants) {\n    $scope.categories = fgConfig.fields.categories;\n    $scope.selectedCategory = undefined;\n\n    $scope.setCategory = function (name) {\n      // webpack build name has spaces in both ends so need to trim to get categories filtered correctly\n      const trimmedName = name.trim();\n\n      $scope.categoryName = trimmedName;\n      $scope.category = $scope.categories[trimmedName];\n    };\n\n    $scope.showSelect = function () {\n      const {\n        allowProcessMap,\n        enableModelerFlowModelTypeSelection,\n        enableMappingFieldsOnly\n      } = APP_CONFIG;\n      return !(\n        allowProcessMap &&\n        enableModelerFlowModelTypeSelection &&\n        enableMappingFieldsOnly &&\n        workflowStore.getFlowModelType() ===\n          flowinglyConstants.flowModelType.PROCESS_MAP\n      );\n    };\n\n    if (!$scope.category) {\n      //noinspection LoopStatementThatDoesntLoopJS\n      for (var name in $scope.categories) {\n        //noinspection JSUnfilteredForInLoop\n        $scope.setCategory(name);\n        break;\n      }\n      //make all fields default\n      $scope.setCategory('All field types', null);\n    }\n  }\n]);\n","angular.module('fg').directive('fgEditPaletteCategories', function () {\n  return {\n    templateUrl: 'angular-form-gen/edit/palette/categories/categories.ng.html',\n    require: '^fgEditPalette',\n    scope: {\n      category: '=?'\n    },\n    controller: 'fgEditPaletteCategoriesController'\n  };\n});\n","angular.module('fg').controller('fgEditPaletteController', [\n  '$scope',\n  'pubsubService',\n  function ($scope, pubsubService) {\n    var $ctrl = this;\n    $scope.templateFilter = function (template) {\n      return (\n        (!$scope.selectedCategory || $scope.selectedCategory[template.type]) &&\n        !template.hideInPalette\n      );\n    };\n    $scope.addField = function (template) {\n      if (template.disabled) {\n        return;\n      }\n\n      pubsubService.publish(\n        'WORKFLOW_DESIGNER_FORM_FIELDS_CHANGED',\n        'fgEditPaletteController'\n      );\n      pubsubService.publish('WORKFLOW_DESIGNER_FORM_FIELDS_ADDED', template);\n    };\n  }\n]);\n","angular.module('fg').directive('fgEditPalette', function () {\n  return {\n    require: ['^fgSchema'],\n    templateUrl: 'angular-form-gen/edit/palette/palette.ng.html',\n    controller: 'fgEditPaletteController',\n    link: function ($scope, $element, $attrs, ctrls) {\n      $scope.schemaCtrl = ctrls[0];\n    }\n  };\n});\n","import './form/files/file._module';\n\n/**\n * Declare all modules being created by formGen here\n * fgFiles module is declared in file._module so import it instead\n */\n(function () {\n  'use strict';\n\n  angular.module('dq', []);\n  angular.module('fg', ['dq', 'fgFiles', 'angular-storage', 'ngSanitize']);\n})();\n","angular.module('fg').directive('fgDisableSubmit', [\n  function () {\n    return {\n      restrict: 'A',\n      link: function (scope, element, attrs) {\n        element.bind('keydown keypress', function (event) {\n          var returnKey = 13;\n          var keyCode = event.keyCode ? event.keyCode : event.which;\n          if (keyCode === returnKey) {\n            event.preventDefault();\n          }\n        });\n      }\n    };\n  }\n]);\n","angular\n  .module('fg')\n  .directive('fgFieldApprovalComment', [\n    'fgFieldApprovalCommentLinkFn',\n    function (fgFieldApprovalCommentLinkFn) {\n      return {\n        replace: true,\n        templateUrl:\n          'angular-form-gen/field-templates/default/approvalcomment.ng.html',\n        scope: true,\n        link: fgFieldApprovalCommentLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldApprovalCommentLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {};\n  });\n","angular\n  .module('fg')\n  .directive('fgFieldApprovalRule', [\n    'fgFieldApprovalRuleLinkFn',\n    function (fgFieldApprovalRuleLinkFn) {\n      return {\n        replace: true,\n        templateUrl:\n          'angular-form-gen/field-templates/default/approvalrule.ng.html',\n        scope: true,\n        link: fgFieldApprovalRuleLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldApprovalRuleLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {\n      const approveOptionValue = '1';\n      var commentRequired = function () {\n        return (\n          $scope.form.data[$scope.field.schema.name] !== null &&\n          $scope.form.data[$scope.field.schema.name] !== approveOptionValue\n        );\n      };\n\n      $scope.isCommentRequired = commentRequired();\n\n      $scope.selectOption = function (option) {\n        if (!$scope.field.schema.$recentValue) {\n          $scope.field.schema.$recentValue = option.value;\n          $scope.isCommentRequired =\n            option.value === approveOptionValue ? false : true;\n        } else {\n          if (option.value != $scope.field.schema.$recentValue)\n            $scope.field.schema.$recentValue = option.value;\n          else {\n            $scope.field.schema.$recentValue = null;\n            $scope.form.data[$scope.field.schema.name] = null;\n          }\n        }\n      };\n\n      $scope.$watch(\n        function () {\n          return $scope.form.data[$scope.field.schema.name];\n        },\n        function () {\n          $scope.isCommentRequired = commentRequired();\n        }\n      );\n    };\n  });\n","angular\n  .module('fg')\n  .directive('fgFieldAttachDocument', [\n    'fgFieldAtttachDocumentFn',\n    function (fgFieldAtttachDocumentFn) {\n      return {\n        replace: true,\n        controllerAs: 'ctrl',\n        controller: [\n          '$http',\n          '$q',\n          'sessionService',\n          'fgAttachDocumentFileListService',\n          '$scope',\n          function (\n            $http,\n            $q,\n            sessionService,\n            fgAttachDocumentFileListService,\n            $scope\n          ) {\n            var ctrl = this;\n            ctrl.fgAttachDocumentFileListService =\n              fgAttachDocumentFileListService;\n            ctrl.addFile = addFile;\n            ctrl.getFile = getFile;\n\n            function addFile(file) {\n              ctrl.nodeId = ctrl.form.schema.fields[0].nodeId;\n\n              fgAttachDocumentFileListService.addFile(\n                file,\n                ctrl.fieldId,\n                ctrl.nodeId\n              );\n            }\n\n            function getFile(filepath) {\n              if (!filepath) {\n                return $q.when();\n              }\n\n              //Request file data from server, attaching auth header and token (from Auth0)\n              var requestConfig = {\n                method: 'Get',\n                headers: {\n                  Authorization: 'Bearer ' + sessionService.getToken()\n                },\n                url: filepath,\n                cache: 'true'\n              };\n\n              return $http(requestConfig);\n            }\n          }\n        ],\n        templateUrl:\n          'angular-form-gen/field-templates/default/attachdocument.ng.html',\n        link: fgFieldAtttachDocumentFn\n      };\n    }\n  ])\n  .factory('fgFieldAtttachDocumentFn', [\n    'pubsubService',\n    'APP_CONFIG',\n    'sessionService',\n    'momentService',\n    function (pubsubService, APP_CONFIG, sessionService, momentService) {\n      return function ($scope, $element, $attrs, ctrls) {\n        ctrls.fieldId = $attrs.fileControlId;\n        ctrls.form = $scope.$parent.form;\n        ctrls.user = sessionService.getUser();\n\n        initialiseFile();\n\n        $scope.$watch(function () {\n          return ctrls.form.data && ctrls.form.data[ctrls.fieldId];\n        }, initialiseFile);\n\n        //if there is a file already uploaded against this field, add it to the list\n        function initialiseFile() {\n          if (ctrls.user == undefined) {\n            return; // Public forms are handled by attach.document.file.list.readonly\n          }\n          ctrls.fgAttachDocumentFileListService.clearFiles(ctrls.fieldId);\n          if (ctrls.form.schema && ctrls.form.schema.fields.length > 0) {\n            var field = [];\n\n            for (var _f = 0; _f < ctrls.form.schema.fields.length; _f++) {\n              if (ctrls.form.schema.fields[_f].name == ctrls.fieldId)\n                field = ctrls.form.schema.fields[_f];\n            }\n\n            var files = field.attachDocumentFileIds\n              ? field.attachDocumentFileIds\n              : [];\n\n            for (var f = 0; f < files.length; f++) {\n              var filepath = generateLink(files[f]);\n\n              getFile(filepath, generateDownloadLink(files[f]));\n            }\n          }\n        }\n\n        function getFile(filepath, downloadLink) {\n          //get the file from the server (so we an get filename and size)\n          ctrls.getFile(filepath).then(function (response) {\n            if (!response) {\n              return;\n            }\n\n            var fileData = response.data;\n            var file = {\n              filename: fileData.filename,\n              id: downloadLink.match(/(\\S{8}-\\S{4}-\\S{4}-\\S{4}-\\S{12}$)/)[0],\n              key: ctrls.fieldId,\n              downloadLink: downloadLink,\n              size: fileData.size,\n              uploadedDate: momentService\n                .utc(fileData.uploadedDate)\n                .format('DD/MM/YYYY')\n            };\n            //for it to show up in the control it needs to be added to the file list\n            ctrls.addFile(file);\n            pubsubService.publish('FILEUPLOAD_UPLOAD_COMPLETED');\n          });\n        }\n\n        //same functions in shared.angular for table viewer but of course, we're not using tables here\n        function generateLink(fileId) {\n          return fileId !== undefined\n            ? `${APP_CONFIG.apiBaseUrl}files/${ctrls.user.businessId}/${ctrls.user.id}/${fileId}`\n            : undefined;\n        }\n        function generateDownloadLink(fileId) {\n          return fileId !== undefined\n            ? `${APP_CONFIG.apiBaseUrl}files/download/${fileId}`\n            : undefined;\n        }\n      };\n    }\n  ]);\n","angular\n  .module('fg')\n  .directive('fgFieldCheckbox', [\n    'fgFieldCheckboxLinkFn',\n    function (fgFieldCheckboxLinkFn) {\n      return {\n        replace: true,\n        templateUrl:\n          'angular-form-gen/field-templates/default/checkbox.ng.html',\n        scope: true,\n        link: fgFieldCheckboxLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldCheckboxLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {};\n  });\n","import angular, { INgModelController, IScope } from 'angular';\nimport { SharedAngular } from '../../@types/sharedAngular';\nimport { Services } from '../../@types/services';\nimport IFormField from '@Shared.Angular/@types/core/contracts/queryModel/card/formField';\nimport { IFormModel } from '../form-controller';\nimport { LookupSpecialFields } from '@Shared.Angular/@types/core/contracts/queryModel/workflow/lookupSpecialFields';\n\ninterface IFieldControllerScope extends IScope {\n  form: IFormModel;\n  field: IFieldControllerField;\n  showLogoFields: boolean;\n  deselectIfSelected: (watchField: IFieldControllerField, val) => void;\n  applyFieldConditions: (triggerField, fieldType) => void;\n  triggerFieldConditions: (field) => void;\n  populateNotifyFields: (watchField: IFieldControllerField) => void;\n  setModifiedState: (changedFiled) => void;\n}\n\nangular.module('fg').controller('fgFieldController', [\n  'APP_CONFIG',\n  '$scope',\n  'flowinglyConstants',\n  'fgUtils',\n  'pubsubService',\n  'currencyService',\n  'flowinglyFormulaService',\n  'sessionService',\n  'conditionalFormService',\n  'fieldService',\n  'busyService',\n  function (\n    APP_CONFIG: SharedAngular.APP_CONFIG,\n    $scope: IFieldControllerScope,\n    flowinglyConstants: SharedAngular.FlowinglyConstants,\n    fgUtils: Services.FgUtils,\n    pubsubService: SharedAngular.PubSubService,\n    currencyService: SharedAngular.CurrencyService,\n    flowinglyFormulaService: SharedAngular.FlowinglyFormulaService,\n    sessionService: SharedAngular.SessionService,\n    conditionalFormService: SharedAngular.ConditionalFormService,\n    fieldService: SharedAngular.FieldService,\n    busyService: SharedAngular.BusyService\n  ) {\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    const self = this;\n    let _form: IFormModel;\n    let _field: IFieldControllerField;\n\n    this.init = function (\n      fgFormCtrl,\n      fieldSchema: IFormField,\n      editMode: boolean\n    ) {\n      self.initForm(fgFormCtrl);\n      self.initField(fieldSchema, editMode);\n      self.initDefaultData(fieldSchema, editMode);\n\n      $scope.form = _form;\n      $scope.field = _field;\n      $scope.field.stepId = fgFormCtrl != null ? fgFormCtrl.stepId : '';\n      if (_field.schema.type === flowinglyConstants.formFieldType.IMAGE) {\n        sessionService.getSetting('ShowLogoFields').then((value) => {\n          if (value === undefined) {\n            // Public form anon user can't get the business setting\n            // so we only hide logo if $scope.showLogoFields===false or they will never see it\n            // Flow must be re-published to remove the logo\n            return;\n          }\n          $scope.$applyAsync(() => {\n            $scope.showLogoFields = (value && value.toLowerCase()) === 'true';\n          });\n        });\n      } else if (\n        _field.schema.type === flowinglyConstants.formFieldType.LOOKUP &&\n        (_field.schema.lookupConfig?.value ===\n          LookupSpecialFields.InitiatorEmail ||\n          _field.schema.lookupConfig?.value ===\n            LookupSpecialFields.InitiatorFullName)\n      ) {\n        const matchField = $scope.form._fields?.find(function (sf) {\n          return sf.Name === _field.schema.name;\n        });\n        if (matchField) {\n          setNotifyFieldOptions(\n            _field.schema.name,\n            JSON.parse(matchField.Options),\n            null\n          );\n        }\n      }\n      $scope.$on('$destroy', function () {\n        conditionalFormService.emptyFieldsArray();\n        clearTimeout(self.fieldChangeTimeout);\n      });\n\n      $scope.deselectIfSelected = function (\n        watchField: IFieldControllerField,\n        val\n      ) {\n        if (\n          !watchField.state.$recentValue ||\n          watchField.state.$recentValue != val\n        ) {\n          watchField.state.$recentValue = val;\n        } else {\n          watchField.state.$recentValue = null;\n          $scope.form.data[watchField.name] = null;\n        }\n\n        $scope.populateNotifyFields(watchField);\n      };\n\n      $scope.applyFieldConditions = function (triggerField, fieldType) {\n        if (APP_CONFIG.cfEnableConditionalRules === false) {\n          return;\n        }\n        conditionalFormService.refreshUI(triggerField, _form);\n      };\n\n      $scope.triggerFieldConditions = function (field) {\n        $scope.applyFieldConditions(field, $scope.fieldSchema.type);\n      };\n\n      $scope.populateNotifyFields = function (\n        watchField: IFieldControllerField\n      ) {\n        $scope.applyFieldConditions(watchField, $scope.fieldSchema.type);\n        let watchFieldValue;\n\n        switch ($scope.fieldSchema.type) {\n          case flowinglyConstants.formFieldType.CURRENCY:\n            watchFieldValue = currencyService.parseNumber(\n              $scope.form.data[watchField.name]\n            );\n            break;\n          case flowinglyConstants.formFieldType.LOOKUP: {\n            const configValue = $scope.field.schema?.lookupConfig?.value;\n            // check if the field is already present in the form data (to avoid adding unnecessary fields) and the value is not null\n            if (\n              $scope.form?.data &&\n              watchField.name in $scope.form.data &&\n              !$scope.form?.data[watchField.name] &&\n              (configValue === LookupSpecialFields.CurrentActorEmail ||\n                configValue === LookupSpecialFields.CurrentActorFullName ||\n                configValue === LookupSpecialFields.InitiatorEmail ||\n                configValue === LookupSpecialFields.InitiatorFullName)\n            ) {\n              $scope.form.data[watchField.name] = watchFieldValue =\n                $scope.form._fields?.find(\n                  (x) => x.name == $scope.field.name\n                )?.value;\n            }\n\n            const islookupPreviousFieldType =\n              configValue === LookupSpecialFields.CurrentActorEmail ||\n              configValue === LookupSpecialFields.CurrentActorFullName;\n            if (\n              $scope.field.schema.lookupConfig &&\n              !islookupPreviousFieldType\n            ) {\n              if ($scope.field.schema.lookupConfig.userObject) {\n                if ($scope.field.schema.lookupConfig.userObject.length > 0) {\n                  $scope.form.data[watchField.name] = watchFieldValue =\n                    $scope.field.schema.lookupConfig.userObject\n                      .map(function (uo) {\n                        return uo.text;\n                      })\n                      .join(', ');\n                }\n              } else {\n                $scope.form.data[watchField.name] = '';\n              }\n            } else {\n              watchFieldValue =\n                $scope.form.values && $scope.form.values[watchField.name]\n                  ? $scope.form.values[watchField.name]\n                  : $scope.form.data[watchField.name];\n            }\n            break;\n          }\n          default:\n            watchFieldValue =\n              $scope.form.values && $scope.form.values[watchField.name]\n                ? $scope.form.values[watchField.name]\n                : $scope.form.data[watchField.name];\n            break;\n        }\n        // for manually dropdown, need use text rather than value for query the API\n        if (\n          (!watchField.schema.dataSource ||\n            watchField.schema.dataSource === 'manually') &&\n          watchField.schema.options &&\n          watchField.schema.options.length > 0\n        ) {\n          const matchOption = watchField.schema.options.find(function (o) {\n            return o.value === watchFieldValue;\n          });\n\n          if (matchOption) {\n            watchFieldValue = matchOption.text;\n          }\n        }\n\n        if (\n          watchField.schema.notifyFields &&\n          watchField.schema.notifyFields.length > 0\n        ) {\n          if (!watchFieldValue) {\n            // reset options\n            watchField.schema.notifyFields.forEach(function (f) {\n              setNotifyFieldOptions(f.fieldName, [], f.tableColumnId);\n            });\n            return;\n          }\n          const requestPayload = angular.copy(\n            watchField.schema.notifyFields,\n            []\n          );\n          for (const field of requestPayload) {\n            let watchFieldName = '';\n            if (\n              field.dbDataSource &&\n              field.dbDataSource.filters &&\n              field.dbDataSource.filters.length > 0\n            ) {\n              watchFieldName = field.dbDataSource.filters[0].value;\n              field.dbDataSource.filters[0].value = watchFieldValue.value\n                ? watchFieldValue.value\n                : watchFieldValue;\n            }\n            const matchField = $scope.form.schema.fields.find(function (sf) {\n              return sf.name === field.fieldName;\n            });\n\n            if (matchField) {\n              field.Searchable = matchField.searchable;\n              field.SearchablePageSize =\n                flowinglyConstants.searchableComboPageSize;\n              if (watchFieldName) {\n                const lookupFiled = $scope.form.schema.fields.find(function (\n                  sf\n                ) {\n                  return (\n                    sf.name === watchFieldName &&\n                    sf.type === flowinglyConstants.formFieldType.LOOKUP\n                  );\n                });\n                if (lookupFiled) {\n                  field.previousFieldLookUpConfig = lookupFiled.lookupConfig;\n                }\n              }\n            }\n            field.flowModelId = $scope.fieldSchema.publicForm;\n          }\n\n          const optionsPromise = fieldService\n            .getFieldOptions($scope.fieldSchema.publicForm, requestPayload)\n            .then(function (results) {\n              results.forEach(function (result) {\n                setNotifyFieldOptions(\n                  result.fieldName,\n                  result.options,\n                  result.tableColumnId\n                );\n              });\n            });\n          busyService.addPromise(optionsPromise);\n        }\n        // Update formula values\n        if (typeof $scope.form.schema !== 'undefined') {\n          for (let i = 0; i < $scope.form.schema.fields.length; i++) {\n            const field = $scope.form.schema.fields[i];\n\n            // update formulas in tables\n            if (\n              field.type === flowinglyConstants.formFieldType.TABLE &&\n              field.tableSchema\n            ) {\n              const tableSchema = JSON.parse(field.tableSchema);\n              if (\n                tableSchema.some(\n                  (s) => s.type === flowinglyConstants.tableCellType.FORMULA\n                )\n              ) {\n                const tableDataJson = $scope.form.data[field.name];\n                if (tableDataJson) {\n                  const tableData = JSON.parse(tableDataJson);\n                  for (const cellSchema of tableSchema.filter(\n                    (s) => s.type === flowinglyConstants.tableCellType.FORMULA\n                  )) {\n                    for (const row of tableData.rows) {\n                      // if there is no data in this row then skip the row\n                      if (!row.cells.find((cell) => cell.value !== undefined)) {\n                        continue;\n                      }\n                      const formulaCell = row.cells.find(\n                        (cell) => cell.id === cellSchema.id\n                      );\n                      if (formulaCell) {\n                        const result = flowinglyFormulaService.evaluate(\n                          cellSchema.formulaConfig,\n                          $scope.form.schema,\n                          $scope.form.data,\n                          tableSchema,\n                          row\n                        );\n                        if (result !== formulaCell.value) {\n                          formulaCell.value = result;\n                        }\n                      }\n                    }\n                  }\n                  $scope.form.data[field.name] = JSON.stringify(tableData);\n                }\n              }\n            }\n            // update formulas on form\n            else if (\n              field.type === flowinglyConstants.formFieldType.FORMULA &&\n              field.formulaConfig\n            ) {\n              const result = flowinglyFormulaService.evaluate(\n                field.formulaConfig,\n                $scope.form.schema,\n                $scope.form.data\n              );\n              $scope.form.data[field.name] = result;\n            }\n          }\n        }\n        $scope.$apply();\n      };\n\n      $scope.setModifiedState = function (changedFiled) {\n        changedFiled.state.modified = true;\n      };\n    };\n\n    this.initForm = function (fgFormCtrl) {\n      _form = fgFormCtrl ? fgFormCtrl.model : {};\n      return _form;\n    };\n\n    this.initField = function (fieldSchema: IFormField, editMode: boolean) {\n      _field = {\n        $_id: 'id' + fgUtils.getUnique(),\n        validationTypeName: showDataTypeInValidation(fieldSchema.type)\n          ? fieldSchema.type\n          : '',\n        schema: fieldSchema,\n        isVisible: editMode == true || !fieldSchema.hideByDefault,\n        isHiddenByConditions: false\n      };\n\n      conditionalFormService.storeFieldAddedToUI(_field);\n\n      $scope.$watch('field.schema.name', function (value, oldValue) {\n        self.registerState(value);\n      });\n      $scope.$watch('field.schema.displayName', function (value, oldValue) {\n        if (value !== oldValue)\n          pubsubService.publish('WORKFLOW_DESIGNER_FORM_FIELDS_CHANGED', value);\n      });\n      $scope.$watch(\n        function () {\n          return _form.data[_field.schema.name];\n        },\n        function () {\n          if (self.fieldChangeTimeout) {\n            clearTimeout(self.fieldChangeTimeout);\n          }\n          self.fieldChangeTimeout = setTimeout(\n            () => $scope.populateNotifyFields(_field),\n            500\n          );\n        }\n      );\n\n      return _field;\n    };\n\n    this.initDefaultData = function (\n      fieldSchema: IFormField,\n      editMode: boolean\n    ) {\n      const fieldName = fieldSchema.name;\n\n      _form.data = _form.data || {};\n\n      if (editMode) {\n        $scope.$watch('field.schema.value', function (value) {\n          _form.data[fieldSchema.name] = value;\n        });\n\n        $scope.$watch('field.schema.name', function (value, oldValue) {\n          if (value !== oldValue) {\n            const data = _form.data[oldValue];\n            delete _form.data[oldValue];\n            _form.data[value] = data;\n          }\n        });\n      } else if (\n        _form.data &&\n        _form.data[fieldName] === undefined &&\n        fieldSchema.value !== undefined\n      ) {\n        _form.data[fieldName] = fieldSchema.value;\n      }\n\n      return _form.data;\n    };\n\n    this.getFieldSchema = function () {\n      return _field.schema;\n    };\n\n    this.setFieldState = function (state) {\n      // Called by the field-input directive\n      _field.state = state;\n      self.registerState(_field.schema.name);\n    };\n\n    this.registerState = function (fieldName: string) {\n      // Re-register the ngModelCtrl with the form controller\n      // whenever the name of the field has been modified.\n\n      if (_form.state && _field.state) {\n        _form.state.$removeControl(_field.state);\n        _field.state.$name = fieldName;\n        _form.state.$addControl(_field.state);\n      }\n\n      _field.name = fieldName;\n    };\n\n    this.field = function () {\n      return _field;\n    };\n\n    this.form = function () {\n      return _form;\n    };\n\n    function showDataTypeInValidation(type) {\n      return (\n        type === flowinglyConstants.formFieldType.NUMBER ||\n        type === flowinglyConstants.formFieldType.CURRENCY ||\n        type === flowinglyConstants.formFieldType.EMAIL ||\n        type === flowinglyConstants.formFieldType.DATE\n      );\n    }\n\n    function setNotifyFieldOptions(fieldName, values, tableColumnId) {\n      const matchField = $scope.form.schema.fields.find(function (sf) {\n        return sf.name === fieldName;\n      });\n\n      if (matchField) {\n        if (matchField.type === flowinglyConstants.formFieldType.LOOKUP) {\n          const tempArray = [];\n          let watchVal;\n          matchField.lookupConfig.userObject = [];\n          const lookupValues = [];\n          if (!$scope.form.values) {\n            $scope.form.values = [];\n          }\n\n          for (const v of values) {\n            let val;\n            if (matchField.lookupConfig) {\n              val = v.value;\n\n              matchField.lookupConfig.userObject.push({\n                value: v.value,\n                text: v.text\n              });\n            } else {\n              val = v.text;\n            }\n            lookupValues.push(val);\n            tempArray.push(val);\n            watchVal = tempArray.toString();\n          }\n\n          $scope.form.data[matchField.name] = tempArray.join(', ');\n          $scope.form.values[matchField.name] = JSON.stringify(lookupValues);\n\n          if (matchField.notifyFields !== undefined) {\n            if ($scope.form.values && $scope.form.values[matchField.name]) {\n              watchVal = $scope.form.values[matchField.name];\n            }\n            getLookupNotifyField(matchField, watchVal);\n          }\n        } else {\n          if (\n            matchField.type === flowinglyConstants.formFieldType.TABLE &&\n            tableColumnId !== undefined\n          ) {\n            const tableSchema = JSON.parse(matchField.tableSchema);\n            const matchColumn = tableSchema.find(function (c) {\n              return c.id === tableColumnId;\n            });\n\n            if (matchColumn) {\n              matchColumn.options = values;\n              matchColumn.filteredOptions = angular.copy(matchColumn.options);\n              matchField.tableSchema = JSON.stringify(tableSchema);\n            }\n            matchField.options = matchField.options || [];\n            const columnOptions = matchField.options.find(\n              (options) => options.tableColumnId === tableColumnId\n            );\n            if (columnOptions) {\n              columnOptions.options = values;\n            } else {\n              matchField.options.push({\n                tableColumnId: tableColumnId,\n                options: values\n              });\n            }\n          } else {\n            matchField.options = values;\n            matchField.filteredOptions = angular.copy(matchField.options);\n          }\n        }\n      }\n    }\n\n    function getLookupNotifyField(matchField, watchVal) {\n      const requestPayload = angular.copy(matchField.notifyFields, []);\n\n      for (const field of requestPayload) {\n        let watchFieldName = '';\n        if (\n          field.dbDataSource.filters &&\n          field.dbDataSource.filters.length > 0\n        ) {\n          watchFieldName = field.dbDataSource.filters[0].value;\n          field.dbDataSource.filters[0].value = watchVal;\n        }\n\n        const matchFieldLookup = $scope.form.schema.fields.find(function (sf) {\n          return sf.name === field.fieldName;\n        });\n\n        if (matchFieldLookup) {\n          field.Searchable = matchFieldLookup.searchable;\n          field.SearchablePageSize = flowinglyConstants.searchableComboPageSize;\n          if (watchFieldName) {\n            const lookupFiled = $scope.form.schema.fields.find(function (sf) {\n              return (\n                sf.name === watchFieldName &&\n                sf.type === flowinglyConstants.formFieldType.LOOKUP\n              );\n            });\n\n            if (lookupFiled) {\n              field.previousFieldLookUpConfig = lookupFiled.lookupConfig;\n            }\n          }\n        }\n        field.flowModelId = $scope.fieldSchema.publicForm;\n      }\n      const optionsPromise = fieldService\n        .getFieldOptions($scope.fieldSchema.publicForm, requestPayload)\n        .then(function (results) {\n          results.forEach(function (result) {\n            setNotifyFieldOptions(\n              result.fieldName,\n              result.options,\n              result.tableColumnId\n            );\n          });\n        });\n      busyService.addPromise(optionsPromise);\n    }\n  }\n]);\n\ninterface IFieldControllerField {\n  $_id: string;\n  validationTypeName: unknown;\n  schema: IFormField;\n  state?: INgModelController;\n  isVisible: boolean;\n  isHiddenByConditions: boolean;\n  name?: string;\n}\n","angular\n  .module('fg')\n  .directive('fgFieldCurrency', [\n    'fgFieldCurrencyLinkFn',\n    function (fgFieldCurrencyLinkFn) {\n      return {\n        replace: true,\n        templateUrl:\n          'angular-form-gen/field-templates/default/currency.ng.html',\n        scope: true,\n        link: fgFieldCurrencyLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldCurrencyLinkFn', [\n    'currencyService',\n    function (currencyService) {\n      return function ($scope, $element, $attrs, ctrls) {\n        var form = $scope.form;\n        var field = $scope.field;\n        var schema = field.schema;\n\n        var unit = schema.customUnits;\n        var symbol = '';\n        var format = '$##,#.00;-$##,#.00'; // basic no currency number\n        var customUnits = {};\n\n        if (schema.customUnits) {\n          var temp = currencyService.getCurrencyByCode(schema.customUnits);\n          if (temp) {\n            customUnits = temp;\n\n            // we escape all the characters because some symbols like RSD\n            // uses reserved symbols (the dot for example)\n            symbol = temp.symbol\n              .split('')\n              .map(function (c) {\n                return '\\\\' + c;\n              })\n              .join('');\n            format = symbol + '##,#.00 ' + temp.code;\n            format += ';-' + format; //  see http://dojo.telerik.com/IqujA/4\n          }\n        }\n\n        $scope.options = {\n          format: format,\n          decimals: 2,\n          placeholder: schema.placeholder\n        };\n\n        $scope.$watch(\n          'form.data[field.schema.name]',\n          function (newValue, oldValue, scope) {\n            const v1 = currencyService.parseNumber(newValue);\n            const v2 = currencyService.parseNumber(oldValue);\n            if (v1 != v2 && !isNaN(v1)) {\n              initializeProxyModel();\n              runForceInitializationHackFlow4843(); /// for cases when signalR updates the page state\n            }\n          },\n          true\n        );\n\n        initializeProxyModel();\n        runForceInitializationHackFlow4843(); // for cases where a user refreshes a page or opens the page\n\n        $scope.updateActualModel = updateActualModel;\n\n        /**\n         * This issue is very annoying. So here is the actual issue ordered from it's direct\n         * cause all the way up to Kendo.\n         *\n         * Here we go:\n         *\n         *  1.  For currency, we used a kendo angular wrapped directive named kendo-numeric-text-box\n         *  2.  To display the red line and validation errors we use some sort of homebrew validation\n         *      system named \"custom-input-validation\"\n         *  3.  \"custom-input-validation\" heavily uses angular's ng-required validation system\n         *  4.  The way the kendo-numeric-text-box works is that it generates a dummy element as a proxy\n         *      for the way we input numbers (this is visible when you inspect element)\n         *\n         *      This element can also be accessed via $(select).data('kendoNumericTextBox')._text\n         *\n         * 5.  This proxy element does not get any of the attributes that we defined, not the ng-required stuff\n         *      nor the custom-input-validation. It is not even an angular element, but a raw js element.\n         *      So whatever validation occurs, it looks like the validation isn't working. Except...\n         *\n         *  6.  When you select/focus the actual element, the proxy element is swapped with our initial defined\n         *      element, so suddenly the validations come out. But when the blurr happens, its swapped back\n         *      to the proxy element.\n         *\n         *  7.  Since we don't really have time to investigate this fully, the easiest solution would be to manually\n         *      display the validation-red lines based on  our custom-input-validation. But for that to work\n         *      we have to make sure that the $digest cycle doesnt run. See setTimouet below\n         *\n         *                                                                      - Cassey\n         */\n        $scope.updateKendoGeneratedInput = function (id) {\n          var $state = $scope.form.state[$scope.field.schema.name];\n\n          var $element = $('#' + id);\n          var $inputs = $element.add(\n            $element.data('kendoNumericTextBox')._text\n          );\n\n          /*\n           * This is a very bad solution. I apologize to all the future\n           * devs who have somehow wound up here in this currency directive.\n           *\n           * For here do NOT use the\n           * $timeout, because we want the $digest not to be triggered\n           * since we are attempting to override the mess of behaviors that\n           * we've introduced.\n           *\n           * If we trigger the $digest, it will reinsert the ng-dirty, and\n           * ng-invalid classes again\n           *                                      - Cassey\n           */\n          setTimeout(function () {\n            if ($state.$invalid) {\n              $inputs.addClass('ng-dirty');\n              $inputs.addClass('ng-invalid');\n            } else {\n              $inputs.removeClass('ng-dirty');\n              $inputs.removeClass('ng-invalid');\n            }\n          }, 150);\n        };\n\n        function updateActualModel(proxyValue) {\n          if (customUnits) {\n            var val = currencyService.parseNumber(proxyValue);\n            if (schema.customUnits) {\n              form.data[schema.name] = currencyService.toCurrency(\n                val,\n                schema.customUnits\n              );\n            } else {\n              form.data[schema.name] = val;\n            }\n          }\n          return true; // return true please because currency.ng.html ng-change is an expression\n        }\n\n        function runForceInitializationHackFlow4843() {\n          if (schema.defaultPreviousStepId && form.data[schema.name] != null) {\n            // hack fix for FLOW-4843, the updateActualFlowModel which formats the\n            // currency as the thing to send to the BE isnt called if the field isnt\n            // changed and if they submit directly without modifying it never gets called\n            // so we manually call it once here.\n            updateActualModel(form.data[schema.name]);\n          }\n        }\n\n        function initializeProxyModel() {\n          var value = currencyService.parseNumber(\n            $scope.form.data[schema.name]\n          );\n          if (!isNaN(value)) {\n            $scope.proxyModel = value;\n          }\n        }\n      };\n    }\n  ]);\n","angular\n  .module('fg')\n  .directive('fgFieldDate', [\n    'fgFieldDateLinkFn',\n    function (fgFieldDateLinkFn) {\n      return {\n        replace: true,\n        templateUrl: 'angular-form-gen/field-templates/default/date.ng.html',\n        scope: true,\n        controller: [\n          '$scope',\n          '$timeout',\n          function ($scope, $timeout) {\n            var ctrl = this;\n\n            ctrl.init = function (field, form) {\n              ctrl.field = field;\n              ctrl.form = form;\n              ctrl.options = {\n                placeholder: 'DD/MM/YYYY',\n                format: 'dd/MM/yyyy',\n                parseFormats: ['dd/MM/yyyy']\n              };\n\n              $timeout(function () {\n                getDatePickerElement()\n                  .kendoDatePicker(ctrl.options)\n                  .attr('readonly', true)\n                  .attr('placeholder', ctrl.options.placeholder);\n              });\n            };\n\n            ctrl.showDatePicker = function () {\n              var datePicker = getDatePicker();\n\n              if (datePicker) {\n                datePicker.open();\n              }\n            };\n\n            function getDatePickerElement() {\n              return angular.element('#' + ctrl.field.$_id);\n            }\n\n            function getDatePicker() {\n              return getDatePickerElement().data('kendoDatePicker');\n            }\n          }\n        ],\n        controllerAs: 'ctrl',\n        link: fgFieldDateLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldDateLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {};\n  });\n","angular\n  .module('fg')\n  .directive('fgFieldDatetime', [\n    'fgFieldDatetimeLinkFn',\n    function (fgFieldDatetimeLinkFn) {\n      return {\n        replace: true,\n        templateUrl:\n          'angular-form-gen/field-templates/default/datetime.ng.html',\n        scope: true,\n        controller: [\n          '$scope',\n          '$timeout',\n          function ($scope, $timeout) {\n            var ctrl = this;\n\n            ctrl.init = function (field, form) {\n              ctrl.field = field;\n              ctrl.form = form;\n              ctrl.options = {\n                placeholder: 'DD/MM/YYYY HH:MM:SS AM/PM',\n                format: 'dd/MM/yyyy hh:mm:ss tt',\n                parseFormats: ['dd/MM/yyyy h:mm:ss tt'],\n                timeFormat: 'h:mm tt',\n                interval: 5\n              };\n\n              $timeout(function () {\n                getDatetimePickerElement()\n                  .kendoDateTimePicker(ctrl.options)\n                  .attr('readonly', true)\n                  .attr('placeholder', ctrl.options.placeholder);\n              });\n            };\n\n            ctrl.showDatetimePicker = function () {\n              var datetimePicker = getDatetimePicker();\n\n              if (datetimePicker) {\n                datetimePicker.open();\n              }\n            };\n\n            function getDatetimePickerElement() {\n              return angular.element('#' + ctrl.field.$_id);\n            }\n\n            function getDatetimePicker() {\n              return getDatetimePickerElement().data('kendoDateTimePicker');\n            }\n          }\n        ],\n        controllerAs: 'ctrl',\n        link: fgFieldDatetimeLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldDatetimeLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {};\n  });\n","angular\n  .module('fg')\n  .directive('fgField', [\n    'fgFieldLinkFn',\n    function (fgFieldLinkFn) {\n      return {\n        require: ['^?fgForm', 'fgField'],\n        replace: true,\n        templateUrl: 'angular-form-gen/form/field/field.ng.html',\n        scope: {\n          fieldSchema: '=fgField', // The schema definition of the field\n          tabIndex: '=?fgTabIndex', // Optional tab index -- used in overlay mode to disable focus\n          editMode: '=?fgEditMode', // Indicates edit mode, which will sync the fieldSchema.value\n          // to the form data for WYSIWYG pleasures.\n          noValidationSummary: '=fgNoValidationSummary' // If true hides the validation summary\n        },\n        controller: 'fgFieldController',\n        link: fgFieldLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {\n      var fgFormCtrl = ctrls[0];\n      var fgFieldCtrl = ctrls[1];\n\n      if ($scope.tabIndex === undefined) {\n        $scope.tabIndex = 'auto';\n      }\n\n      //$scope.renderInfo = fgUtils.getRenderInfo($scope.fieldSchema); //TODO can we remove this?\n      if (typeof $scope.fieldSchema.type !== 'undefined')\n        $scope.type = $scope.fieldSchema.type.toLowerCase();\n\n      fgFieldCtrl.init(fgFormCtrl, $scope.fieldSchema, $scope.editMode);\n    };\n  });\n","angular\n  .module('fg')\n  .directive('fgFieldDropdown', function (fgFieldDropdownLinkFn) {\n    return {\n      replace: true,\n      templateUrl:\n        'angular-form-gen/field-templates/default/dropdownlist.ng.html',\n      scope: true,\n      link: fgFieldDropdownLinkFn\n    };\n  })\n  .factory('fgFieldDropdownLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {};\n  });\n","angular\n  .module('fg')\n  .directive('fgFieldEmail', [\n    'fgFieldEmailLinkFn',\n    function (fgFieldEmailLinkFn) {\n      return {\n        replace: true,\n        templateUrl: 'angular-form-gen/field-templates/default/email.ng.html',\n        scope: true,\n        link: fgFieldEmailLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldEmailLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {};\n  });\n","import angular from 'angular';\nimport { FgFileListServiceType } from '../files/file.listService';\n\nangular\n  .module('fg')\n  .directive('fgFieldFileUpload', [\n    'fgFieldFileUploadLinkFn',\n    function (fgFieldFileUploadLinkFn) {\n      //See: https://bizflo.atlassian.net/wiki/spaces/TECH/pages/50987034/Notes+On+File+Upload\n\n      return {\n        replace: true,\n        controllerAs: 'ctrl',\n        controller: [\n          '$http',\n          '$q',\n          'sessionService',\n          'fgFileListService',\n          '$scope',\n          'browserUtilsService',\n          function (\n            $http,\n            $q,\n            sessionService,\n            fgFileListService: FgFileListServiceType,\n            $scope,\n            browserUtilsService\n          ) {\n            // eslint-disable-next-line @typescript-eslint/no-this-alias\n            const ctrl = this;\n            ctrl.showErrorStyles = showErrorStyles;\n            ctrl.fgFileListService = fgFileListService;\n            ctrl.addFile = addFile;\n            ctrl.getFile = getFile;\n            $scope.isMobileApp = browserUtilsService.isCordovaApp();\n\n            function addFile(file) {\n              fgFileListService.addFile(file, ctrl.fieldId, ctrl.stepId);\n            }\n\n            function getFile(filepath, isAuthRequired = true) {\n              if (!filepath) {\n                return $q.when();\n              }\n\n              //Request file data from server, attaching auth header and token (from Auth0)\n              const requestConfig = {\n                method: 'Get',\n                headers: isAuthRequired && {\n                  Authorization: 'Bearer ' + sessionService.getToken()\n                },\n                url: filepath,\n                cache: 'true'\n              };\n\n              return $http(requestConfig);\n            }\n\n            function showErrorStyles() {\n              const fileCount = fgFileListService.getFileListFileCount(\n                ctrl.fieldId,\n                ctrl.stepId\n              );\n\n              return (\n                fileCount == 0 &&\n                fgFileListService.isFileRequired(ctrl.fieldId, ctrl.stepId) &&\n                (fgFileListService.isFileListDirty(ctrl.fieldId, ctrl.stepId) ||\n                  (ctrl.form.state && ctrl.form.state.$submitted))\n              );\n            }\n          }\n        ],\n        templateUrl:\n          'angular-form-gen/field-templates/default/fileupload.ng.html',\n        link: fgFieldFileUploadLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldFileUploadLinkFn', [\n    'pubsubService',\n    function (pubsubService) {\n      return function ($scope, $element, $attrs, ctrls) {\n        ctrls.fieldId = $attrs.fileControlId;\n        ctrls.stepId = $attrs.fileStepId;\n        ctrls.form = $scope.$parent.form;\n\n        initialiseFiles();\n\n        $scope.$watch(function () {\n          return ctrls.form.data && ctrls.form.data[ctrls.fieldId];\n        }, initialiseFiles);\n\n        //if there is a file already uploaded against this step, add it to the list\n        function initialiseFiles() {\n          ctrls.fgFileListService.removeFilesForStepField(\n            ctrls.stepId,\n            ctrls.fieldId\n          );\n          if (ctrls.form.data && ctrls.form.data[ctrls.fieldId]) {\n            const files = ctrls.form.data[ctrls.fieldId];\n\n            for (let f = 0; f < files.length; f++) {\n              const filepath = files[f].filepath;\n              getFile(filepath, files[f].downloadLink, files[f].isAuthRequired);\n            }\n          }\n        }\n\n        function getFile(filepath, downloadLink, isAuthRequired) {\n          //get the file from the server (so we an get filename and size)\n          ctrls.getFile(filepath, isAuthRequired).then(function (response) {\n            if (!response) {\n              return;\n            }\n\n            const fileData = response.data;\n            const file = {\n              filename: fileData.filename,\n              //take the last guid in the string this is the ID\n              id: downloadLink.match(/(\\S{8}-\\S{4}-\\S{4}-\\S{4}-\\S{12}$)/)[0],\n              key: ctrls.fieldId,\n              downloadLink: downloadLink,\n              size: fileData.size\n            };\n            //for it to show up in the control it needs to be added to the file list\n            ctrls.addFile(file);\n            pubsubService.publish('FILEUPLOAD_UPLOAD_COMPLETED');\n          });\n        }\n      };\n    }\n  ]);\n","angular\n  .module('fg')\n  .directive('fgFieldFormula', [\n    'fgFieldFormulaLinkFn',\n    function (fgFieldFormulaLinkFn) {\n      return {\n        replace: true,\n        templateUrl: 'angular-form-gen/field-templates/default/formula.ng.html',\n        scope: true,\n        link: fgFieldFormulaLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldFormulaLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {};\n  });\n","angular.module('fg').directive('fgFieldImage', function () {\n  return {\n    replace: true,\n    templateUrl: 'angular-form-gen/field-templates/default/image.ng.html'\n  };\n});\n","angular\n  .module('fg')\n  .directive('fgFieldInput', [\n    'fgFieldInputLinkFn',\n    function (fgFieldInputLinkFn) {\n      return {\n        require: ['^fgField', 'ngModel'],\n        link: fgFieldInputLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldInputLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {\n      var fgFieldCtrl = ctrls[0];\n      var ngModelCtrl = ctrls[1];\n\n      fgFieldCtrl.setFieldState(ngModelCtrl);\n    };\n  });\n","import { SharedAngular } from '../../@types/sharedAngular';\nimport angular from 'angular';\n\nangular.module('fg').directive('fgFieldInstruction', [\n  function () {\n    return {\n      replace: true,\n      templateUrl:\n        'angular-form-gen/field-templates/default/instruction.ng.html',\n      scope: true,\n      controllerAs: 'ctrl',\n      controller: [\n        '$scope',\n        'pubsubService',\n        'fileService',\n        'validationService',\n        '$sce',\n        '$timeout',\n        function (\n          $scope: angular.IScope,\n          pubsubService: SharedAngular.PubSubService,\n          fileService: SharedAngular.FileService,\n          validationService: SharedAngular.ValidationService,\n          $sce: angular.ISCEService,\n          $timeout: angular.ITimeoutService\n        ) {\n          const ctrl = this;\n\n          ctrl.init = init;\n          ctrl.field = null;\n          ctrl.form = null;\n          ctrl.instructionText = null;\n\n          function init(field, form) {\n            ctrl.field = field;\n            ctrl.form = form;\n            setInstructionText();\n            const subscriberId = 'fgFieldInstruction' + field.name;\n            // Subscribe to the fields updated and refresh binding with the new instruction value.\n            pubsubService.subscribe(\n              'WORKFLOW_FIELDS_UPDATED',\n              function (event, fields) {\n                const instructionField = fields?.find(\n                  (item) => item.Name === $scope.field.schema.name\n                );\n                if (!instructionField) {\n                  return;\n                }\n\n                ctrl.instructionText = validationService.sanitizeString(\n                  $sce.trustAsHtml(instructionField.Instruction)\n                );\n\n                fileService\n                  .replaceFileIdsWithImages(instructionField.Instruction)\n                  .then((result) => {\n                    ctrl.instructionText = validationService.sanitizeString(\n                      $sce.trustAsHtml(result)\n                    );\n                    $timeout(\n                      fileService.addFileDownloadClickEventListener,\n                      300\n                    );\n                  });\n              },\n              subscriberId\n            );\n\n            $scope.$on('$destroy', () => {\n              pubsubService.unsubscribeAll(subscriberId);\n            });\n          }\n\n          function setInstructionText() {\n            let rawValue = null;\n\n            if ($scope.fieldSchema.isNodeFromRunnerProcessMap) {\n              rawValue = $scope.fieldSchema.value;\n            } else {\n              rawValue = ctrl.form.data[$scope.field.schema.name]\n                ? ctrl.form.data[$scope.field.schema.name]\n                : ctrl.field.schema.value;\n            }\n\n            ctrl.instructionText = validationService.sanitizeString(\n              $sce.trustAsHtml(rawValue)\n            );\n\n            fileService.replaceFileIdsWithImages(rawValue).then((result) => {\n              ctrl.instructionText = validationService.sanitizeString(\n                $sce.trustAsHtml(result)\n              );\n              $timeout(fileService.addFileDownloadClickEventListener, 300);\n            });\n          }\n        }\n      ]\n    };\n  }\n]);\n","angular\n  .module('fg')\n  .directive('fgFieldLookup', [\n    'fgFieldLookupLinkFn',\n    function (fgFieldLookupLinkFn) {\n      return {\n        replace: true,\n        templateUrl: 'angular-form-gen/field-templates/default/lookup.ng.html',\n        scope: true,\n        link: fgFieldLookupLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldLookupLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {};\n  });\n","angular\n  .module('fg')\n  .directive('fgFieldMultiselectList', [\n    'fgFieldMultiselectListLinkFn',\n    function (fgFieldMultiselectListLinkFn) {\n      return {\n        replace: true,\n        templateUrl:\n          'angular-form-gen/field-templates/default/multiselectlist.ng.html',\n        scope: true,\n        controllerAs: 'ctrl',\n        controller: [\n          '$scope',\n          function ($scope) {\n            var ctrl = this;\n\n            ctrl.init = init;\n            ctrl.onChange = onChange;\n            ctrl.errorMsg = 'You must select at least 1 item from the list';\n            ctrl.form = {\n              state: {\n                $valid: ctrl.isValid\n              }\n            };\n\n            function init(field, form) {\n              ctrl.field = field;\n              ctrl.form = form;\n\n              var orgFormData = ctrl.form.data[ctrl.field.name];\n\n              ctrl.form.data[ctrl.field.name] = {};\n\n              var tempArray = []; //use a temp array as we don't want to update options whilst looping through it\n\n              if (typeof field.schema.options !== 'undefined') {\n                for (var i = 0; i < field.schema.options.length; i++) {\n                  var opt = field.schema.options[i];\n\n                  tempArray[i] = {\n                    name: field.schema.name + '[' + i + ']',\n                    value: opt.value,\n                    text: opt.text\n                  };\n                  //plus one as when the user checks something, it starts at 1\n                  ctrl.form.data[ctrl.field.name][i + 1] = false;\n                }\n              }\n              field.schema.options = tempArray;\n\n              //if there is any data from the server it will look like this [{\"key\":\"Option 2\",\"value\":\"true\",\"values\":null}]\n              //needs to be converted to this { \"1\": true, \"2\": true } and then applied to the model\n              if (orgFormData !== undefined) {\n                form.data[field.name] = orgFormData;\n                onChange();\n              }\n            }\n\n            function onChange() {\n              var cnt = 0;\n              var chkBox = ctrl.form.data[ctrl.field.schema.name];\n\n              for (var chd in chkBox) {\n                if (chkBox[chd]) {\n                  cnt++;\n                }\n              }\n\n              var requireCustomValidation =\n                ctrl.field.schema.customValidation &&\n                ctrl.field.schema.customValidation.required;\n              var requireValidation;\n\n              if (typeof ctrl.field.schema.validation !== 'undefined')\n                requireValidation =\n                  ctrl.field.schema.validation.required ||\n                  requireCustomValidation;\n              else requireValidation = false;\n\n              if (requireValidation) {\n                if (requireCustomValidation) {\n                  ctrl.errorMsg =\n                    'You must select at least ' +\n                    ctrl.field.schema.customValidation.value +\n                    ' item(s) from the list';\n\n                  if (\n                    ctrl.field.schema.customValidation.errorMessage &&\n                    ctrl.field.schema.customValidation.errorMessage.length > 0\n                  ) {\n                    ctrl.errorMsg =\n                      ctrl.field.schema.customValidation.errorMessage;\n                  }\n                }\n\n                if (!ctrl.field.state) {\n                  ctrl.field.state = {};\n                }\n\n                if (requireCustomValidation && cnt > 0) {\n                  ctrl.field.state.$invalid =\n                    cnt < ctrl.field.schema.customValidation.value;\n                } else {\n                  ctrl.field.state.$invalid =\n                    ctrl.field.schema.validation.required && cnt === 0;\n                }\n              }\n            }\n          }\n        ],\n        link: fgFieldMultiselectListLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldMultiselectListLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {};\n  });\n","angular\n  .module('fg')\n  .directive('fgFieldNotFound', [\n    'fgFieldNotFoundLinkFn',\n    function (fgFieldNotFoundLinkFn) {\n      return {\n        replace: true,\n        templateUrl:\n          'angular-form-gen/field-templates/default/not-in-cache.ng.html',\n        scope: true,\n        link: fgFieldNotFoundLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldNotFoundLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {};\n  });\n","angular\n  .module('fg')\n  .directive('fgFieldNumber', [\n    'fgFieldNumberLinkFn',\n    function (fgFieldNumberLinkFn) {\n      return {\n        replace: true,\n        templateUrl: 'angular-form-gen/field-templates/default/number.ng.html',\n        scope: true,\n        controllerAs: 'ctrl',\n        controller: [\n          '$scope',\n          function ($scope) {\n            const ctrl = this;\n            ctrl.init = init;\n\n            function init() {\n              disableMouseWheelScrollInNumberField();\n            }\n\n            function disableMouseWheelScrollInNumberField() {\n              $('form').on('focus', 'input[type=number]', function (e) {\n                $(this).on('wheel.disableScroll', function (e) {\n                  // Stop the user from using the mouse wheel to change the value of the number field.\n                  e.preventDefault();\n                });\n              });\n\n              $('form').on('blur', 'input[type=number]', function (e) {\n                // Avoid listening for the mouse wheel event on all input number elements\n                // all the time. Otherwise the user cannot scroll the page.\n                $(this).off('wheel.disableScroll');\n              });\n            }\n          }\n        ],\n        link: fgFieldNumberLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldNumberLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {\n      $scope.options = {\n        placeholder: $scope.field.schema.placeholder\n      };\n    };\n  });\n","angular\n  .module('fg')\n  .directive('fgFieldPalette', [\n    'fgFieldPaletteLinkFn',\n    function (fgFieldPaletteLinkFn) {\n      return {\n        require: ['^?fgForm', 'fgFieldPalette'],\n        replace: true,\n        templateUrl: 'angular-form-gen/form/field/fieldPalette.ng.html',\n        scope: {\n          fieldSchema: '=fgFieldPalette', // The schema definition of the field\n          tabIndex: '=?fgTabIndex', // Optional tab index -- used in overlay mode to disable focus\n          editMode: '=?fgEditMode', // Indicates edit mode, which will sync the fieldSchema.value\n          // to the form data for WYSIWYG pleasures.\n          noValidationSummary: '=fgNoValidationSummary' // If true hides the validation summary\n        },\n        controller: 'fgFieldController',\n        link: fgFieldPaletteLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldPaletteLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {\n      var fgFormCtrl = ctrls[0];\n      var fgFieldCtrl = ctrls[1];\n\n      if ($scope.tabIndex === undefined) {\n        $scope.tabIndex = 'auto';\n      }\n\n      //$scope.renderInfo = fgUtils.getRenderInfo($scope.fieldSchema); //TODO can we remove this?\n      $scope.type = $scope.fieldSchema.type.toLowerCase();\n\n      fgFieldCtrl.init(fgFormCtrl, $scope.fieldSchema, $scope.editMode);\n    };\n  });\n","angular\n  .module('fg')\n  .directive('fgFieldPassword', [\n    'fgFieldPasswordLinkFn',\n    function (fgFieldPasswordLinkFn) {\n      return {\n        replace: true,\n        templateUrl:\n          'angular-form-gen/field-templates/default/password.ng.html',\n        scope: true,\n        link: fgFieldPasswordLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldPasswordLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {};\n  });\n","angular\n  .module('fg')\n  .directive('fgFieldRadioButtonList', [\n    'fgFieldRadioButtonListLinkFn',\n    function (fgFieldRadioButtonListLinkFn) {\n      return {\n        replace: true,\n        templateUrl:\n          'angular-form-gen/field-templates/default/radiobuttonlist.ng.html',\n        scope: true,\n        link: fgFieldRadioButtonListLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldRadioButtonListLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {};\n  });\n","import angular from 'angular';\nimport { SharedAngular } from '../../@types/sharedAngular';\nimport { APP_CONFIGType } from '@Shared.Angular/flowingly.services/APP_CONFIG';\n\nangular\n  .module('fg')\n  .directive('fgFieldRecaptcha', [\n    'fgFieldRecaptchaLinkFn',\n    function (fgFieldRecaptchaLinkFn) {\n      return {\n        templateUrl:\n          'angular-form-gen/field-templates/default/recaptcha.ng.html',\n        controller: [\n          '$scope',\n          '$window',\n          'pubsubService',\n          'APP_CONFIG',\n          function (\n            $scope: angular.IScope,\n            $window: angular.IWindowService,\n            pubsubService: SharedAngular.PubSubService,\n            appConfig: APP_CONFIGType\n          ) {\n            var ctrl = this;\n\n            function resetRecaptcha() {\n              $scope.form.data[$scope.field.schema.name] = null;\n              $window.grecaptcha.reset();\n            }\n\n            pubsubService.subscribe('CLEAR_CAPTCHA', function () {\n              resetRecaptcha();\n            });\n\n            ctrl.renderRecaptcha = function () {\n              $window.grecaptcha?.render('recaptcha-container', {\n                sitekey: appConfig.recaptchaSiteKey,\n                callback: () => ctrl.loadRecaptchaResponse(),\n                'expired-callback': () => ctrl.loadExpiredCallback()\n              });\n            };\n\n            ctrl.loadRecaptchaResponse = function () {\n              var recaptchaResponse = $window?.grecaptcha?.getResponse();\n              $scope.form.data[$scope.field.schema.name] = recaptchaResponse;\n            };\n\n            ctrl.loadExpiredCallback = function () {\n              $scope.form.data[$scope.field.schema.name] = null;\n            };\n          }\n        ],\n        controllerAs: 'ctrl',\n        bindToController: true,\n        scope: true,\n        link: fgFieldRecaptchaLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldRecaptchaLinkFn', [\n    function () {\n      return function ($scope, $element, $attrs, ctrl) {\n        ctrl.renderRecaptcha();\n      };\n    }\n  ]);\n","import angular, { ITimeoutService } from 'angular';\nimport { SharedAngular } from '../../@types/sharedAngular';\nimport { IFieldOptionQuery } from '@Shared.Angular/@types/fieldOptions';\n\nangular\n  .module('fg')\n  .directive('fgFieldSelectList', [\n    'fgFieldSelectListLinkFn',\n    function (fgFieldSelectListLinkFn) {\n      return {\n        replace: true,\n        templateUrl:\n          'angular-form-gen/field-templates/default/selectlist.ng.html',\n        scope: true,\n        link: fgFieldSelectListLinkFn,\n        require: ['^?fgForm']\n      };\n    }\n  ])\n  .factory('fgFieldSelectListLinkFn', [\n    '$timeout',\n    'flowinglyConstants',\n    'fieldService',\n    function (\n      $timeout: ITimeoutService,\n      flowinglyConstants: SharedAngular.FlowinglyConstants,\n      fieldService: SharedAngular.FieldService\n    ) {\n      return function ($scope, $element, $attrs, ctrls) {\n        const fgForm = ctrls[0];\n        const currentStepFields = fgForm?.flowFields || [];\n        // There are few flows models which has first option as Please Choose\n        // which should be removed from field as below placeholder is being added for same purpose.\n        if (\n          $scope.field.schema.options &&\n          $scope.field.schema.options.length > 0 &&\n          $scope.field.schema.options[0].text === 'Please Choose' &&\n          $scope.field.schema.options[0].value === ''\n        ) {\n          $scope.field.schema.options.splice(0, 1);\n        }\n\n        //this is placeholder text used in kendo control.\n        $scope.options = {\n          optionLabel: 'Please Choose...',\n          dataBound: disableOuterScrolling,\n          filter: $scope.field.schema.searchable === true ? 'contains' : 'none'\n        };\n\n        $scope.field.schema.filteredOptions = angular.copy(\n          $scope.field.schema.options\n        );\n\n        if ($scope.field.schema.searchable === true) {\n          $timeout(function () {\n            if (\n              $scope.field.schema.filteredOptions.length >\n                flowinglyConstants.searchableComboPageSize &&\n              $scope.form.data[$scope.field.schema.name]\n            ) {\n              $scope.field.schema.filteredOptions =\n                $scope.field.schema.filteredOptions.slice(\n                  0,\n                  flowinglyConstants.searchableComboPageSize\n                );\n            }\n\n            // If the selected value is not present in the initial dropdown list, appends the text and value from fields object.\n            updateFilteredOptions();\n\n            $scope.options.filtering = function (event) {\n              const filter = event.filter;\n              event.preventDefault();\n\n              if ($scope.field.schema.dataSource === 'manually') {\n                if (!filter.value || filter.value === '') {\n                  $scope.field.schema.filteredOptions = angular.copy(\n                    $scope.field.schema.options\n                  );\n                } else {\n                  $scope.field.schema.filteredOptions =\n                    $scope.field.schema.options.filter(function (val) {\n                      return (\n                        val.text\n                          .toLowerCase()\n                          .indexOf(filter.value.toLowerCase()) >= 0\n                      );\n                    });\n                }\n\n                $scope.field.schema.filteredOptions =\n                  $scope.field.schema.filteredOptions.slice(\n                    0,\n                    flowinglyConstants.searchableComboPageSize\n                  );\n\n                $timeout(function () {\n                  this.setDataSource($scope.field.schema.filteredOptions);\n                  this.refresh();\n                });\n              } else {\n                const requestPayload: IFieldOptionQuery = {\n                  fieldName: $scope.field.name,\n                  dbDataSource: angular.copy($scope.field.schema.dbDataSource),\n                  flowModelId: $scope.field.schema.publicForm,\n                  searchable: true,\n                  searchablePageSize:\n                    flowinglyConstants.searchableComboPageSize,\n                  searchTerm: filter.value\n                };\n\n                if (\n                  $scope.field.schema.dbDataSource &&\n                  $scope.field.schema.dbDataSource.filters &&\n                  $scope.field.schema.dbDataSource.filters.length > 0\n                ) {\n                  requestPayload.dbDataSource.filters[0].value =\n                    $scope.form.data[\n                      $scope.field.schema.dbDataSource.filters[0].value\n                    ];\n                }\n\n                fieldService\n                  .getFieldOptions($scope.field.schema.publicForm, [\n                    requestPayload\n                  ])\n                  .then(function (results) {\n                    if (results && results.length > 0) {\n                      $scope.field.schema.options = results[0].options;\n                      $scope.field.schema.filteredOptions = angular.copy(\n                        $scope.field.schema.options\n                      );\n                    }\n                  });\n              }\n            };\n          });\n        }\n\n        function updateFilteredOptions() {\n          const searchValue = $scope.form.data[$scope.field.schema.name];\n          const schemaName = $scope.field.schema.name;\n\n          const field = currentStepFields.find(\n            (field) => field.Name === schemaName\n          );\n\n          const filteredOptionsList = $scope.field.schema.filteredOptions\n            .filter((option) => option.text.includes(searchValue))\n            .slice(0, flowinglyConstants.searchableComboPageSize);\n\n          if (searchValue && field && searchValue === field.Value) {\n            if (filteredOptionsList.length === 0) {\n              // Retain existing options and append the new option\n              $scope.field.schema.filteredOptions = [\n                ...$scope.field.schema.filteredOptions,\n                { value: field.Value, text: field.Text }\n              ];\n            }\n          } else if (filteredOptionsList.length > 1) {\n            $scope.field.schema.filteredOptions = filteredOptionsList;\n          }\n        }\n\n        function disableOuterScrolling(e) {\n          $('.k-list-scroller').on('mousewheel DOMMouseScroll', function (e) {\n            if (e.currentTarget.scrollHeight === e.currentTarget.offsetHeight) {\n              return;\n            }\n\n            let delta = 0;\n            if (e.originalEvent.wheelDelta) {\n              // will work in most cases\n              delta = e.originalEvent.wheelDelta;\n            } else if (e.originalEvent.detail) {\n              // fallback for Firefox\n              delta = -e.originalEvent.detail;\n            }\n            const scrollTop = $(e.currentTarget).scrollTop();\n            if (\n              (delta < 0 &&\n                scrollTop ==\n                  e.currentTarget.scrollHeight -\n                    e.currentTarget.offsetHeight) ||\n              (delta > 0 && scrollTop == 0)\n            ) {\n              e.preventDefault();\n            }\n          });\n        }\n      };\n    }\n  ]);\n","angular.module('fg').directive('fgFieldSignature', [\n  '$timeout',\n  function ($timeout) {\n    //NOTE requires signature-pad depedency to be loaded by the site using this directive\n    //     https://github.com/szimek/signature_pad\n\n    return {\n      replace: true,\n      controllerAs: 'ctrl',\n      controller: [\n        '$scope',\n        function ($scope) {\n          var ctrl = this;\n          ctrl.penColor = 'rgb(0, 0, 0)';\n          ctrl.backgroundColor = 'rgb(255, 255, 255)';\n        }\n      ],\n      templateUrl: 'angular-form-gen/field-templates/default/signature.ng.html',\n      link: function (scope, iElem, $attrs, ctrls) {\n        //create signature pad\n        var canvas = angular.element(\n          iElem[0].querySelector('#signature-pad')\n        )[0];\n        var signaturePad = new SignaturePad(canvas, {\n          backgroundColor: ctrls.backgroundColor,\n          penColor: ctrls.penColor,\n          onEnd: saveSignature\n        });\n\n        scope.$watch(function () {\n          return scope.form.data[scope.field.schema.name];\n        }, updateSignatureData);\n\n        $timeout(function () {\n          //for devices that are smaller than the standard signature size, use the existing canvas size\n          canvas.height = canvas.clientHeight > 125 ? 125 : canvas.clientHeight;\n          canvas.width = canvas.clientWidth > 500 ? 500 : canvas.clientWidth;\n\n          //for some reason the canvas has no height or width on Modeler\n          //update against that\n          canvas.height = canvas.height === 0 ? 125 : canvas.height;\n          canvas.width = canvas.width === 0 ? 500 : canvas.width;\n\n          updateSignatureData();\n\n          //handle X button\n          var button = angular.element(iElem[0].querySelector('#closeButton'));\n          button.on('click', function () {\n            signaturePad.clear();\n            scope.form.data[scope.field.schema.name] = undefined;\n          });\n        }, 500);\n\n        function changeSignatureBgColor(sigPad, bgColor) {\n          // first get the signature drawn by user\n          var currentSignatureData = sigPad.toData();\n          //get temp canvas (this is not shown to user, used to generate data to save only)\n          var tempCanvas = angular.element(\n            iElem[0].querySelector('#signature-pad-temp')\n          )[0];\n          tempCanvas.height =\n            canvas.clientHeight > 125 ? 125 : canvas.clientHeight;\n          tempCanvas.width =\n            canvas.clientWidth > 500 ? 500 : canvas.clientWidth;\n          //create a new sig with specified background, using tempCanvas\n          var sigToSave = new SignaturePad(tempCanvas, {\n            backgroundColor: bgColor,\n            penColor: ctrls.penColor\n          });\n          //add user drawn content to signaturePad\n          sigToSave.fromData(currentSignatureData);\n\n          //return as a url so we can save it\n          return sigToSave.toDataURL();\n        }\n\n        function saveSignature(value) {\n          // we want signature to have a grey background in runner history\n          scope.form.data[scope.field.schema.name] = changeSignatureBgColor(\n            signaturePad,\n            'rgb(249,249,249)'\n          );\n        }\n\n        function updateSignatureData() {\n          if (scope.form.data[scope.field.schema.name] != undefined) {\n            //here we need to restore the previously saved (on blur) signature\n            //saved signature has grey background, so we need to convert back to white before display in sig pad\n\n            //first we need to load the saved sig\n            signaturePad.fromDataURL(scope.form.data[scope.field.schema.name]);\n\n            //then change it's background back to white\n            // var withWhiteBackground = changeSignatureBgColor(signaturePad, 'rgb(255,255,255)');\n            // the method above does not work because (from docs)\n            // NOTE: This method does not populate internal data structure that represents drawn signature. Thus, after using #fromDataURL, #toData won't work properly.\n            // replacing toData and fromData with toDataURL and fromDataURL in changeSignatureBgColor also does not work\n          }\n        }\n      }\n    };\n  }\n]);\n","angular\n  .module('fg')\n  .directive('fgFieldSubmit', [\n    'fgFieldSubmitLinkFn',\n    function (fgFieldSubmitLinkFn) {\n      return {\n        replace: true,\n        templateUrl: 'angular-form-gen/field-templates/default/submit.ng.html',\n        scope: true,\n        link: fgFieldSubmitLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldSubmitLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {};\n  });\n","angular\n  .module('fg')\n  .directive('fgFieldTable', [\n    'fgFieldTableLinkFn',\n    function (fgFieldTableLinkFn) {\n      return {\n        replace: true,\n        templateUrl: 'angular-form-gen/field-templates/default/table.ng.html',\n        scope: true,\n        link: fgFieldTableLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldTableLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {};\n  });\n","angular\n  .module('fg')\n  .directive('fgFieldTaskList', [\n    'fgFieldTaskListLinkFn',\n    function (fgFieldTaskListLinkFn) {\n      return {\n        replace: true,\n        templateUrl:\n          'angular-form-gen/field-templates/default/tasklist.ng.html',\n        scope: true,\n        controllerAs: 'ctrl',\n        controller: [\n          '$scope',\n          function ($scope) {\n            var ctrl = this;\n\n            ctrl.completedItems = 0;\n            ctrl.init = init;\n            ctrl.updateProgress = updateProgress;\n            ctrl.progressTotal = 0;\n            ctrl.options = [];\n            ctrl.field = {\n              state: {\n                $valid: ctrl.isValid\n              }\n            };\n\n            function init(field, form) {\n              ctrl.field = field;\n\n              if (ctrl.field.state === undefined) {\n                ctrl.field.state = {};\n              }\n              ctrl.form = form;\n\n              if (typeof field.schema.options !== 'undefined') {\n                for (var i = 0; i < field.schema.options.length; i++) {\n                  var opt = field.schema.options[i];\n\n                  field.schema.options[i] = {\n                    name: field.schema.name + '[' + i + ']',\n                    value: opt.value,\n                    text: opt.text,\n                    checked: false\n                  };\n                }\n              }\n\n              //if there is any data from the server it will look like this [{\"key\":\"Task 1\",\"value\":\"true\",\"values\":null},{\"key\":\"Task 2\",\"value\":\"true\",\"values\":null}]\n              //needs to be converted to this { \"1\": true, \"2\": true } and then applied to the model\n              var formData = {};\n              if (form.data[field.name] && form.data[field.name].length > 0) {\n                for (var j = 0; j < form.data[field.name].length; j++) {\n                  if (form.data[field.name][j].value == 'true') {\n                    var key = form.data[field.name][j].key;\n\n                    var index = field.schema.options.findIndex(function (opt) {\n                      return opt.text === key;\n                    });\n\n                    if (index >= 0) {\n                      field.schema.options[index].checked = true;\n                      formData[field.schema.options[index].value] = true;\n                    }\n                  }\n                }\n                form.data[field.name] = formData;\n                updateProgress();\n              }\n            }\n\n            function updateProgress() {\n              var cnt = 0;\n              var chkBox = ctrl.form.data[ctrl.field.schema.name];\n\n              for (var chd in chkBox) {\n                if (chkBox[chd]) {\n                  cnt++;\n                }\n              }\n              ctrl.completedItems = cnt;\n              if (typeof ctrl.field.schema.options !== 'undefined')\n                ctrl.progressTotal = Math.round(\n                  (ctrl.completedItems / ctrl.field.schema.options.length) * 100\n                );\n              angular\n                .element('#' + ctrl.field.schema.name + '_progress')\n                .width(ctrl.progressTotal + '%');\n\n              if (\n                ctrl.field.state &&\n                typeof ctrl.field.schema.options !== 'undefined'\n              ) {\n                ctrl.field.state.$invalid = !(\n                  ctrl.completedItems === ctrl.field.schema.options.length ||\n                  !ctrl.field.schema.validation.required\n                );\n              }\n            }\n          }\n        ],\n        link: fgFieldTaskListLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldTaskListLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {\n      $scope.$watch(function () {\n        return ctrls.form.data[ctrls.field.schema.name];\n      }, ctrls.updateProgress);\n    };\n  });\n","angular\n  .module('fg')\n  .directive('fgFieldText', [\n    'fgFieldTextLinkFn',\n    function (fgFieldTextLinkFn) {\n      return {\n        replace: true,\n        templateUrl: 'angular-form-gen/field-templates/default/text.ng.html',\n        scope: true,\n        link: fgFieldTextLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldTextLinkFn', [\n    'lodashService',\n    '$timeout',\n    function (lodashService, $timeout) {\n      return function ($scope, $element, $attrs, ctrls) {\n        $timeout(function () {\n          // we do this because this field is set to either 0 or null when the user\n          // wants it infinite, but ng-maxlength only accepts NULL as infinite.\n          $scope.maxLength =\n            lodashService.get(\n              $scope.field,\n              'schema.customValidation.maxLength'\n            ) || null;\n\n          $scope.form.data[$scope.field.schema.name] = lodashService.unescape(\n            $scope.form.data[$scope.field.schema.name]\n          );\n          /**\n           * This isn't a very efficient way of getting the html length but this fixes 2 problems.\n           *\n           * Problem #1\n           * The element is instantiated later at an unknown time by kendo, so without polling, this would be\n           * the easier way to do it.\n           *\n           * Problem #2\n           * When using ng-maxlength the ngmodel becomes null if you go beyond the maxlength so we cant use\n           * ng-model's length , so instead we have to fetch the raw value ourselves.\n           */\n          $scope.getRemainingCount = function () {\n            return (\n              $scope.field.schema.customValidation.maxLength -\n              $scope.getInputLength()\n            );\n          };\n\n          $scope.validateCharCount = function () {\n            var isValid = $scope.getRemainingCount() >= 0;\n            $scope.form.state.$setValidity('maxlength', isValid);\n          };\n\n          $scope.getInputLength = function () {\n            var $e = $('#' + $scope.field.$_id);\n            if ($e.length) {\n              return $e.val().length;\n            } else {\n              return NaN;\n            }\n          };\n\n          /**\n           * Why not rely on the .has-error class? Because that class appears when the input field\n           * is still $pristine for some odd reason.\n           */\n          $scope.getColor = function () {\n            if ($scope.form.state) {\n              return $scope.form.state[$scope.field.schema.name].$error\n                .maxlength\n                ? 'red'\n                : 'black';\n            } else {\n              return 'black';\n            }\n          };\n        });\n      };\n    }\n  ]);\n","angular\n  .module('fg')\n  .directive('fgFieldTextArea', [\n    'fgFieldTextAreaLinkFn',\n    function (fgFieldTextAreaLinkFn) {\n      return {\n        replace: true,\n        templateUrl:\n          'angular-form-gen/field-templates/default/textarea.ng.html',\n        scope: true,\n        link: fgFieldTextAreaLinkFn\n      };\n    }\n  ])\n  .factory('fgFieldTextAreaLinkFn', [\n    '$timeout',\n    'validationService',\n    'APP_CONFIG',\n    function ($timeout, validationService, appConfig) {\n      return function ($scope, $element, $attrs, ctrls) {\n        var enablePasteCleanUpOption = {\n          css: true,\n          msAllFormatting: true,\n          msConvertLists: true,\n          msTags: true,\n          span: true,\n          keepNewLines: true\n        };\n\n        var disablePasteCleanUpOption = { all: false };\n\n        $scope.pasteCleanUpOption = appConfig.disableXssValidation\n          ? disablePasteCleanUpOption\n          : enablePasteCleanUpOption;\n\n        var validatorOptions = {\n          messages: {\n            url: 'Invalid URL',\n            xss: 'This input does not support HTML',\n            req: 'Required'\n          },\n          rules: {\n            url: function (input) {\n              var regForUrl = new RegExp(\n                /^(h|H)(T|t)(t|T)(P|p)(S|s?):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?/\n              );\n              if (input.is('#k-editor-link-url')) {\n                if (!regForUrl.test(input.val())) {\n                  input.attr('name', 'k-editor-link-url');\n                  return false;\n                }\n              }\n              return true;\n            },\n            xss: function (input) {\n              if (\n                input.is('#k-editor-link-text') ||\n                input.is('#k-editor-link-title')\n              ) {\n                if (validationService.isXssVulnerableString(input.val())) {\n                  input.attr('name', input.attr('id'));\n                  return false;\n                }\n              }\n              return true;\n            },\n            req: function (input) {\n              if (input.is('#k-editor-link-text')) {\n                if (input.val().length < 1) {\n                  input.attr('name', 'k-editor-link-text');\n                  return false;\n                }\n              }\n              return true;\n            }\n          }\n        };\n\n        function editorExecute(e) {\n          setTimeout(function () {\n            if (e.name === 'createlink') {\n              const form = e.command._dialog.element;\n              const selectors = ['#k-editor-link-target'];\n              restyleCheckBoxes(form, selectors);\n              configureCreateLink(e.command);\n            } else if (e.name.startsWith('tablewizard')) {\n              const form = $('.k-widget.k-window.k-state-focused');\n              const selectors = [\n                '#k-editor-selectAllCells',\n                '#k-editor-cells-headers',\n                '#k-editor-wrap-text',\n                '#k-editor-collapse-borders'\n              ];\n              restyleCheckBoxes(form, selectors);\n              configureTableWizard(e.command);\n            }\n          }, 0);\n        }\n\n        function restyleCheckBoxes(form, targetClasses) {\n          // FLOW-6400 -To get checkbox in Insert Hyperlink kendo pop-up to style similar to others in Flowingly,\n          // removing the kendo checkbox default class so that global Flowingly css checkbox style will take effect.\n          targetClasses.forEach((selector) => {\n            const linkTarget = form.find(selector);\n            if (linkTarget) {\n              linkTarget.removeClass('k-checkbox');\n            }\n          });\n        }\n\n        function configureTableWizard(command) {\n          // Otherwise some of the options aren't visible\n          $('#k-table-properties').css('overflow-y', 'scroll');\n          $('#k-cell-properties').css('overflow-y', 'scroll');\n          $('.k-editor-table-wizard-dialog').css('width', '27em');\n\n          // Don't want users setting class and index\n          $('#k-editor-css-class').hide();\n          $('label[for=\"k-editor-css-class\"]').hide();\n\n          $('#k-editor-id').hide();\n          $('label[for=\"k-editor-id\"]').hide();\n\n          $('#k-editor-cell-css-class').hide();\n          $('label[for=\"k-editor-cell-css-class\"]').hide();\n\n          $('#k-editor-cell-id').hide();\n          $('label[for=\"k-editor-cell-id\"]').hide();\n        }\n\n        function configureCreateLink(command) {\n          var form = command._dialog.element;\n          var insertButton = form.find('.k-dialog-insert');\n          form.find(':input[type=\"text\"]').each(function (index, item) {\n            $(item).off();\n            $(item).on('keydown', function (event) {\n              if (event.keyCode === 13) {\n                insertButton.trigger('click');\n              }\n            });\n          });\n\n          //remove original events\n          insertButton.off();\n\n          //initialize Kendo UI validator\n          form.kendoValidator(validatorOptions);\n\n          insertButton.on(\n            'click',\n            $.proxy(function (e) {\n              if (form.data('kendoValidator').validate()) {\n                //if validation pass close the editor command:\n                this._apply(e);\n              } else {\n                e.preventDefault();\n              }\n            }, command)\n          );\n        }\n\n        $timeout(function () {\n          // Find all the text editor and bind the execute function.\n          let editorElements = $('[data-text-editor=\"textarea\"]');\n\n          try {\n            editorElements.toArray().forEach((element) => {\n              let editor = $(element).data('kendoEditor');\n              if (editor) {\n                editor.bind('execute', editorExecute);\n              }\n            });\n          } catch (e) {\n            // Swallow error and prevent code termination.\n          }\n        }, 500);\n      };\n    }\n  ]);\n","import angular, { IScope } from 'angular';\nimport { SharedAngular } from '@Shared.FormGen/@types/sharedAngular';\n\nangular.module('fg').controller('tableDefaultController', [\n  '$scope',\n  'pubsubService',\n  function ($scope: IScope, pubsubService: SharedAngular.PubSubService) {\n    /// The purpose of this controller is to set the parent form valid / invalid in response to the\n    /// changed in the validity of the table.\n    /// The table will be INVALID if one or more required cells have no value    <><><><><.\n\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    const ctrl = this;\n    ctrl.init = init;\n    ctrl.onFormValid = onFormValid;\n    ctrl.onFormInvalid = onFormInvalid;\n\n    function init(form, field) {\n      ctrl.form = form;\n      $scope.form = form;\n      ctrl.field = field;\n    }\n    function onFormValid() {\n      if (ctrl.form && ctrl.form.state) {\n        ctrl.form.state.$invalid = false;\n        ctrl.form.state.$valid = true;\n      }\n      //for some reason setting the flags is not always enough, therefore\n      //raise an event that we can subscribe to in the flow-form-component to enable submit\n      pubsubService.publish('FORM_TABLE_VALID', { field: ctrl.field }, true);\n    }\n    function onFormInvalid() {\n      if (ctrl.form && ctrl.form.state) {\n        ctrl.form.state.$invalid = true;\n        ctrl.form.state.$valid = false;\n      }\n      //for some reason setting the flags is not always enough, therefore\n      //raise an event that we can subscribe to in the flow-form-component to prevent submit\n      pubsubService.publish('FORM_TABLE_INVALID', { field: ctrl.field }, true);\n    }\n  }\n]);\n","angular\n  .module('fg')\n  .directive('fgAttachDocumentFileListReadonly', [\n    fgAttachDocumentFileListReadonly\n  ]);\n\nfunction fgAttachDocumentFileListReadonly() {\n  var directive = {\n    require: ['?^fgForm', 'fgAttachDocumentFileListReadonly'],\n    scope: {\n      fieldId: '<',\n      nodeId: '<',\n      field: '<',\n      form: '='\n    },\n    bindToController: true,\n    controller: [\n      'fgAttachDocumentFileListService',\n      'sessionService',\n      'flowinglyConstants',\n      'fileService',\n      function controller(\n        fgAttachDocumentFileListService,\n        sessionService,\n        flowinglyConstants,\n        fileService\n      ) {\n        var ctrl = this;\n        ctrl.user = sessionService.getUser();\n        ctrl.init = init;\n        ctrl.getAttachDocumentsforModeler = getAttachDocumentsforModeler;\n        ctrl.getAttachDocumentsforRunnerWorkFlows =\n          getAttachDocumentsforRunnerWorkFlows;\n\n        function init(fgFormCtrl) {\n          /*init triggers when:\n                        1. Runner > Workflows > A step with this field\n                        2. Modeler > Clicking a node with this field\n                        3. Modeler > Clicking Design at the right-hand panel for a node with this field\n                        4. Modeler > In Design, adding a new Attach Document field */\n\n          if (fgFormCtrl != null) {\n            fgFormCtrl.stepId =\n              typeof fgFormCtrl.stepId !== 'undefined'\n                ? fgFormCtrl.stepId\n                : null;\n            fgFormCtrl.nodeId = ctrl.nodeId != null ? ctrl.nodeId : null;\n\n            ctrl.fgFormCtrl = fgFormCtrl;\n            ctrl.isPublicForm = fgFormCtrl.isPublic;\n\n            if (fgFormCtrl.isWorkflow) {\n              ctrl.form._fields = fgFormCtrl.flowFields;\n            } else {\n              fgAttachDocumentFileListService.storeForm(fgFormCtrl);\n              fgAttachDocumentFileListService.registerFileControl(\n                this.fieldId,\n                fgFormCtrl.stepId,\n                ctrl.nodeId\n              );\n            }\n          }\n        }\n\n        function getAttachDocumentsforModeler() {\n          return fgAttachDocumentFileListService.getFilesForControl(\n            ctrl.fieldId,\n            ctrl.nodeId\n          );\n        }\n\n        function getAttachDocumentsforRunnerWorkFlows() {\n          let adList = [];\n          let field = null;\n          if (!ctrl.form._fields || ctrl.form._fields.length === 0) {\n            return adList;\n          }\n          // Internal form fields have PascalCase\n          // Public form fields have camelCase ...\n          if (ctrl.form._fields[0].Type !== undefined) {\n            field = ctrl.form._fields.find((f) => {\n              return (\n                f.Type === flowinglyConstants.formFieldType.ATTACH_DOCUMENT &&\n                f.Name == ctrl.fieldId\n              );\n            });\n            if (field) {\n              field.AttachDocumentElements.forEach((element) => {\n                element.DownloadLink = fileService.getDownloadLink(\n                  element.FileId,\n                  ctrl.isPublicForm\n                );\n              });\n\n              adList = field.AttachDocumentElements\n                ? field.AttachDocumentElements\n                : [];\n            }\n          } else if (ctrl.form._fields[0].type !== undefined) {\n            field = ctrl.form._fields.find((f) => {\n              return (\n                f.type ===\n                  flowinglyConstants.formFieldTypeEnum.ATTACH_DOCUMENT &&\n                f.name == ctrl.fieldId\n              );\n            });\n            if (field) {\n              field.attachDocumentElements.forEach((element) => {\n                element.DownloadLink = fileService.getDownloadLink(\n                  element.fileId,\n                  ctrl.isPublicForm\n                );\n              });\n\n              adList = field.attachDocumentElements\n                ? field.attachDocumentElements\n                : [];\n            }\n          }\n          return adList;\n        }\n      }\n    ],\n    controllerAs: 'ctrl',\n    link: function (scope, element, attrs, ctrls) {\n      var fgFormCtrl = ctrls[0];\n      var fgFileListCtrl = ctrls[1];\n\n      fgFileListCtrl.fieldId = fgFileListCtrl.fieldId\n        ? fgFileListCtrl.fieldId\n        : scope.ctrl.field.schema.name;\n      fgFileListCtrl.init(fgFormCtrl);\n    },\n\n    template: [\n      '<div>' +\n        //RUNNER/WORKFLOWS\n        '<ul ng-if=\"ctrl.form.isWorkFlow\" ng-init=\"workflow_ADfiles = ctrl.getAttachDocumentsforRunnerWorkFlows()\">' +\n        '   <li ng-repeat=\"file in workflow_ADfiles | orderBy : \\'filename\\'\">' +\n        '       <a flow-download-link=\"{{::file.DownloadLink}}\" target=\"_blank\" > {{::(file.FileName || file.fileName)}}</a>' +\n        '   </li>' +\n        '</ul>' +\n        //MODELER/RIGHT SIDE PANEL + MODELER/DESIGN DIALOG\n        '<ul ng-if=\"!ctrl.field.schem.isNodeFromRunnerProcessMap && !ctrl.form.isWorkFlow\" ng-init=\"modeler_ADfiles = ctrl.getAttachDocumentsforModeler()\">' +\n        '   <li ng-repeat=\"file in modeler_ADfiles | orderBy : \\'filename\\'\">' +\n        '       <b>{{::file.filename}}</b>' +\n        '   </li>' +\n        '</ul>' +\n        '</div>'\n    ]\n  };\n  return directive;\n}\n","import { IEventFileUploadResult } from '@Shared.Angular/@types/pubSub';\nimport angular from 'angular';\n\nangular\n  .module('fg')\n  .directive('fgAttachDocumentFileList', [fgAttachDocumentFileList]);\n\nfunction fgAttachDocumentFileList() {\n  const directive = {\n    restrict: 'E',\n    require: ['?^fgForm', 'fgAttachDocumentFileList'],\n    scope: {\n      //id of the file upload control associated with this list\n      fieldId: '<',\n      nodeId: '<',\n      form: '='\n    },\n    bindToController: true,\n    controller: [\n      '$rootScope',\n      '$timeout',\n      '$scope',\n      '$q',\n      '$http',\n      '$document',\n      'flowStore',\n      'pubsubService',\n      'lodashService',\n      'notificationService',\n      'ngDialog',\n      'fgAttachDocumentFileListService',\n      function controller(\n        $rootScope,\n        $timeout,\n        $scope,\n        $q,\n        $http,\n        $document,\n        flowStore,\n        pubsubService,\n        lodashService,\n        notificationService,\n        ngDialog,\n        fgAttachDocumentFileListService\n      ) {\n        // eslint-disable-next-line @typescript-eslint/no-this-alias\n        const ctrl = this;\n        ctrl.fgAttachDocumentFileListService = fgAttachDocumentFileListService;\n        ctrl.touched = false;\n        ctrl.init = init;\n        ctrl.getFiles = getFiles;\n        ctrl.removeFile = removeFile;\n        ctrl.removeAll = removeAll;\n        ctrl.cleanup = cleanup;\n        ctrl.showFileRequiredMessage = showFileRequiredMessage;\n        ctrl.files = [];\n\n        // PUBLIC  METHODS  /////////////////////////////////////////////////////////////\n\n        // Get files saved against this node (uses the nodeId passed to the formCtrl to filter)\n        function getFiles() {\n          ctrl.files = fgAttachDocumentFileListService.getFilesForControl(\n            ctrl.fieldId,\n            ctrl.nodeId\n          );\n          return ctrl.files;\n        }\n\n        // clean up all resources when component destroyed\n        function cleanup(fgFormCtrl) {\n          if (fgFormCtrl) {\n            pubsubService.unsubscribeAll('file-list' + ctrl.fieldId);\n          }\n        }\n\n        function init(fgFormCtrl) {\n          if (fgFormCtrl != null) {\n            fgFormCtrl.nodeId = ctrl.nodeId != null ? ctrl.nodeId : null;\n\n            ctrl.fgFormCtrl = fgFormCtrl;\n            //ctrl.flowInstanceId = fgFormCtrl.flowInstanceId;\n            fgAttachDocumentFileListService.storeForm(fgFormCtrl);\n            fgAttachDocumentFileListService.registerFileControl(\n              this.fieldId,\n              fgFormCtrl.stepId,\n              ctrl.nodeId\n            );\n            //validateFileRequired();\n            pubsubService.subscribe(\n              'FILEUPLOAD_UPLOAD_COMPLETED',\n              validateFileRequired,\n              'file-list' + ctrl.fieldId\n            );\n          }\n        }\n\n        function removeAll() {\n          confirmDelete(false).then(function () {\n            lodashService.each(ctrl.files, function (file) {\n              removeFile(file, true);\n            });\n          });\n        }\n\n        function removeFile(file, supressConfirmation: boolean) {\n          confirmDelete(supressConfirmation).then(\n            function () {\n              pubsubService.publish('FILEUPLOAD_REMOVAL_STARTED');\n              //remove file from client first (optimisitic) this prevents the UI trying to upload in progress form files\n              //if the user moves somewhere else whilst delete in progress.\n              fgAttachDocumentFileListService.removeFile(\n                file,\n                ctrl.fieldId,\n                ctrl.nodeId\n              );\n\n              /*\n                                the actual mapping of the file removed will be checked and updated on publish.\n                            */\n\n              //var user = $rootScope.sessionService.getUser();\n              //$http.post($rootScope.APP_CONFIG.apiBaseUrl + 'files/remove/' + user.businessId + '/' + user.id + '/' + file.id + '/' + ctrl.nodeId, {})\n              //    .then(function () {\n              //        pubsubService.publish('FILEUPLOAD_REMOVAL_COMPLETED', fgAttachDocumentFileListService.getFilesForControl(file.key, ctrl.nodeId).length);\n              notificationService.showSuccessToast(file.filename + ' Removed');\n              //        validateFileRequired();\n              //    });\n            },\n            function () {\n              //user cancelled do nothing\n            }\n          );\n        }\n\n        // PRIVATE METHODS  /////////////////////////////////////////////////////////////\n\n        function confirmDelete(supressConfirmation: boolean) {\n          if (flowStore.get('dontShowAgain') != undefined) {\n            supressConfirmation = true;\n          }\n\n          //supress the confirmation if the user clicked removeAll and they have already confirmed delete\n          if (!supressConfirmation) {\n            //todo to reusable service\n            return ngDialog\n              .openConfirm({\n                className: 'attach-document-confim-delete',\n                showClose: false,\n                template:\n                  'angular-form-gen/form/files/file.confirmDelete.ng.html',\n                scope: $scope\n              })\n              .then(\n                function (dontShowAgain) {\n                  setDontShowAgainFlag(dontShowAgain);\n                  return $q.when();\n                },\n                function () {\n                  return $q.reject();\n                }\n              );\n          }\n          return $q.when();\n        }\n\n        function showFileRequiredMessage() {\n          return (\n            fgAttachDocumentFileListService.isFileRequired(\n              ctrl.fieldId,\n              ctrl.nodeId\n            ) &&\n            (fgAttachDocumentFileListService.isFileListDirty(\n              ctrl.fieldId,\n              ctrl.nodeId\n            ) ||\n              (ctrl.form.state && ctrl.form.state.$submitted)) &&\n            fgAttachDocumentFileListService.getFilesForControl(\n              ctrl.fieldId,\n              ctrl.nodeId\n            ).length == 0\n          );\n        }\n\n        function validateFileRequired() {\n          //check to to see if the form is invalid as there are not files uploaded when they are required.\n          //the form may  have  mix of optional and required fields, so we only want to look at the required ones.\n          if (\n            fgAttachDocumentFileListService.isFileRequired(\n              ctrl.fieldId,\n              ctrl.nodeId\n            )\n          ) {\n            const invalid =\n              fgAttachDocumentFileListService.getFilesForControl(\n                ctrl.fieldId,\n                ctrl.nodeId\n              ).length == 0;\n\n            if (invalid) {\n              pubsubService.publish('FILEUPLOAD_FILE_ERROR', {\n                fileControlId: ctrl.fieldId,\n                flowInstanceId: ctrl.flowInstanceId\n              } as IEventFileUploadResult);\n            } else {\n              pubsubService.publish('FILEUPLOAD_FILE_VALID', {\n                fileControlId: ctrl.fieldId,\n                flowInstanceId: ctrl.flowInstanceId\n              } as IEventFileUploadResult);\n            }\n          }\n        }\n\n        function setDontShowAgainFlag(dontShowAgain) {\n          if (dontShowAgain) {\n            flowStore.set('dontShowAgain', true);\n          }\n        }\n      }\n    ],\n    controllerAs: 'ctrl',\n    link: function (scope, element, attrs, ctrls) {\n      const fgFormCtrl = ctrls[0];\n      const fgFileListCtrl = ctrls[1];\n      fgFileListCtrl.init(fgFormCtrl);\n      scope.$on('$destroy', () => {\n        fgFileListCtrl.cleanup(fgFormCtrl);\n      });\n    },\n\n    template: [\n      '<div ng-show=\"ctrl.files.length > 1\" class=\"pt-5\"><a class=\"ml-15 cursor-pointer\" ng-click=\"ctrl.removeAll()\">Remove All</a></div>',\n      '<div><ul class=\"file-list\">',\n      '<li ng-repeat=\"file in ctrl.getFiles() | orderBy : \\'filename\\'\" class=\"clearfix\">',\n      '<a flow-download-link=\"{{::file.downloadLink}}\" target=\"_blank\"> {{::file.filename}}</a><span>({{::file.size}}K)&nbsp;({{::file.uploadedDate}})</span>',\n      '<i ng-click=\"ctrl.removeFile(file)\" class=\"fa-light fa-xmark fa-lg\"></i></li>',\n      '</ul>',\n      '<div class=\"pl-10 pt-5 secondary-text\" ng-show=\"ctrl.files.length === 0\"><em>Drag and Drop your files here or click the Upload button</em></div>',\n      '</div>'\n    ].join('')\n  };\n  return directive;\n}\n","angular\n  .module('fg')\n  .factory('fgAttachDocumentFileListService', [\n    '$q',\n    'lodashService',\n    fgAttachDocumentFileListService\n  ]);\n\nfunction fgAttachDocumentFileListService($q, lodashService) {\n  // A list of all the file controls\n  // These are identified by a combiation of the fileId AND the nodeId\n  // This is because the fileId is unique only within a flow Model NOT across flow instances.\n  var _fileControls = [];\n  var _form = undefined;\n\n  var service = {\n    files: [],\n    addFile: addFile,\n    doesFileControlExist: doesFileControlExist,\n    //getFilesForStep: getFilesForStep,\n    getFilesForControl: getFilesForControl,\n    //getForm: getForm,\n    clearFiles: clearFiles,\n    removeFile: removeFile,\n    //isFileListDirty: isFileListDirty,\n    isFileRequired: isFileRequired,\n    registerFileControl: registerFileControl,\n    //getAnyFileListInvalid: getAnyFileListInvalid,\n    //getFileListFileCount: getFileListFileCount,\n    //getIsThisFileListInvalid: getIsThisFileListInvalid,\n    //removeFileControlsForFlow: removeFileControlsForFlow,\n    removeAllFileControls: removeAllFileControls,\n    //removeFileControlsForFlowStep: removeFileControlsForFlowStep,\n    //setFileListInvalid: setFileListInvalid,\n    storeForm: storeForm\n  };\n\n  return service;\n\n  //////////// Public API Methods\n  function addFile(file, controlId, nodeId) {\n    var fileList = getFileControl(controlId, nodeId);\n\n    if (fileList) {\n      fileList.isDirty = true;\n      //dont add file if it already exists\n      var index = fileList.files.findIndex(function (f) {\n        return f.id === file.id;\n      });\n      if (index < 0) {\n        fileList.files.push(file);\n      }\n    }\n  }\n\n  // CLear all files associated with the provided fieldId\n  function clearFiles(fieldId) {\n    lodashService.forEach(_fileControls, function (control) {\n      lodashService.remove(control.files, function () {});\n    });\n  }\n\n  function doesFileControlExist(controlId, nodeId) {\n    var found = lodashService.find(_fileControls, function (l) {\n      return l.id === controlId && l.nodeId === nodeId;\n    });\n    return found !== undefined;\n  }\n\n  //function getFilesForStep(nodeId) {\n  //    //get all files uploaded as part of this step\n  //    var stepID = getStepId(nodeId);\n  //    var controlsForStep = lodashService.filter(_fileControls, function (f) {\n  //        return f.nodeId == stepID;\n  //    });\n  //    var files = [];\n  //    lodashService.forEach(controlsForStep, function (control) {\n  //        files = files.concat(control.files);\n  //    });\n  //    return files;\n  //}\n\n  function getFilesForControl(controlId, nodeId) {\n    var fileList = getFileControl(controlId, nodeId);\n\n    if (!fileList) return [];\n\n    return fileList.files;\n  }\n\n  //function getForm() {\n  //    return _form;\n  //}\n\n  //function isFileListDirty(controlId, nodeId) {\n  //    var fileList = getFileControl(controlId, nodeId);\n  //    return fileList.isDirty;\n  //}\n\n  function isFileRequired(fileControlId, nodeId) {\n    var fileList = getFileControl(fileControlId, nodeId);\n    return fileList && fileList.isRequired;\n  }\n\n  //function getFileListFileCount(fileControlId, nodeId) {\n  //    var fileList = getFileControl(fileControlId, nodeId);\n  //    return fileList != null ? fileList.files.length : 0;\n  //}\n\n  function registerFileControl(controlId, stepId, nodeId) {\n    var found = lodashService.find(_fileControls, function (fc) {\n      if (stepId)\n        //return fc.id === controlId && fc.flowInstanceId === flowInstanceId && fc.stepId === stepId;\n        return fc.id === controlId && fc.stepId === stepId;\n\n      if (nodeId) return fc.id === controlId && fc.nodeId === nodeId;\n    });\n\n    if (!found) {\n      if (stepId)\n        //_fileControls.push({ id: controlId, nodeId: getStepId(nodeId), flowInstanceId: flowInstanceId, files: [], isDirty: false, isRequired: required });\n        _fileControls.push({\n          id: controlId,\n          stepId: stepId,\n          files: [],\n          isDirty: false\n        });\n\n      if (nodeId)\n        _fileControls.push({\n          id: controlId,\n          nodeId: nodeId,\n          files: [],\n          isDirty: false\n        });\n    }\n  }\n\n  //function getIsThisFileListInvalid(fileControlId, nodeId) {\n  //    var fileList = getFileControl(fileControlId, nodeId);\n  //    return fileList && fileList.isRequired && fileList.isDirty;  //submitted how??\n  //}\n\n  //function getAnyFileListInvalid(flowInstanceId) {\n  //    //why do required fields on their own not work\n  //    var forFlow = lodashService.filter(_fileControls, function (c) {\n  //        return c.flowInstanceId == flowInstanceId;\n  //    });\n\n  //    var invalid = lodashService.some(forFlow, function (f) {\n  //        return f.invalid == true;\n  //    });\n\n  //    return invalid;\n  //}\n\n  //function setFileListInvalid(fileControlId, nodeId, flowInstanceId, invalid) {\n  //    var fileControl = getFileControl(fileControlId, nodeId);\n  //    fileControl.invalid = invalid;\n  //    fileControl.flowInstanceId = flowInstanceId;\n  //}\n\n  //function removeFileControlsForFlow(flowInstanceId) {\n  //    lodashService.remove(_fileControls, function (control) {\n  //        return control.flowInstanceId == flowInstanceId;\n  //    });\n  //}\n\n  function removeAllFileControls() {\n    _fileControls = [];\n  }\n\n  //function removeFileControlsForFlowStep(flowInstanceId, nodeId) {\n  //    lodashService.remove(_fileControls, function (control) {\n  //        return control.flowInstanceId === flowInstanceId && control.nodeId === nodeId;\n  //    });\n  //}\n\n  function removeFile(file, controlId, nodeId) {\n    var fileList = getFileControl(controlId, nodeId);\n    var index = lodashService.findIndex(fileList.files, function (f) {\n      return f.id === file.id;\n    });\n\n    if (index !== -1) {\n      fileList.files.splice(index, 1);\n      fileList.isDirty = true;\n\n      var schema_fileList = lodashService.find(\n        _form.model.schema.fields,\n        function (f) {\n          return f.name == controlId;\n        }\n      );\n\n      var schema_attachDocuments = schema_fileList.attachDocumentFileIds;\n\n      var fileToRemove = lodashService.findIndex(\n        schema_attachDocuments,\n        function (f) {\n          return f == file.id;\n        }\n      );\n\n      if (fileToRemove !== -1) schema_attachDocuments.splice(fileToRemove, 1);\n    }\n\n    return $q.when();\n  }\n\n  function storeForm(form) {\n    _form = form;\n  }\n\n  function getFileControl(controlId, nodeId) {\n    return lodashService.find(_fileControls, function (l) {\n      return l.id === controlId && l.nodeId === nodeId;\n    });\n  }\n}\n","angular\n  .module('fg')\n  .directive('attachDocumentFileUpload', [attachDocumentFileUpload]);\n\nfunction attachDocumentFileUpload() {\n  var directive = {\n    restrict: 'A',\n    require: ['?^fgForm', 'attachDocumentFileUpload'],\n    scope: {\n      onFileUploaded: '&',\n      onChangeValue: '<'\n    },\n    controllerAs: 'ctrl',\n    controller: [\n      '$rootScope',\n      '$scope',\n      '$q',\n      'fgFileListService',\n      'pubsubService',\n      'lodashService',\n      'notificationService',\n      'ngDialog',\n      'fileService',\n      'fgAttachDocumentFileListService',\n      'momentService',\n      function controller(\n        $rootScope,\n        $scope,\n        $q,\n        fgFileListService,\n        pubsubService,\n        lodashService,\n        notificationService,\n        ngDialog,\n        fileService,\n        fgAttachDocumentFileListService,\n        momentService\n      ) {\n        const BATCH_SIZE = 5;\n\n        var ctrl = this;\n        ctrl.fileError = false;\n        ctrl.ngModelCtrl = undefined;\n        ctrl.fieldName = $scope.onChangeValue.name;\n        ctrl.nodeId = $scope.onChangeValue.nodeId;\n        ctrl.onFileChange = onFileChange;\n        ctrl.uploadFiles = uploadFiles;\n\n        function onFileChange(event) {\n          if (event.target.files.length === 0) {\n            return;\n          }\n          pubsubService.publish('FILEUPLOAD_UPLOAD_STARTED');\n          event.stopPropagation();\n          var filesToUpload = event.target.files;\n          uploadFiles(filesToUpload);\n        }\n\n        function uploadFiles(filesToUpload) {\n          uploadFileBatch(\n            Array.prototype.slice.call(filesToUpload),\n            0,\n            BATCH_SIZE\n          );\n        }\n\n        /// PRIVATE METHODS ///////////////////////////////////////////////////////////////////////\n        function uploadFileBatch(files, start, batchSize) {\n          if (!files || batchSize <= 0 || start >= files.length) {\n            return;\n          }\n\n          var batch = files.slice(start, start + batchSize);\n          var promises = batch.map(function (file) {\n            return fileService.uploadAttachDocumentFile(file).then(\n              function (response) {\n                if (response.valid) {\n                  fgAttachDocumentFileListService.addFile(\n                    {\n                      nodeId: ctrl.nodeId,\n                      filename: file.name,\n                      id: response.data,\n                      key: ctrl.fieldName,\n                      downloadLink: createDownloadLink(response.data),\n                      size: Math.floor(file.size / 1000),\n                      uploadedDate: momentService.utc().format('DD/MM/YYYY')\n                    },\n                    ctrl.fieldName,\n                    ctrl.nodeId\n                  );\n\n                  $scope.onChangeValue.attachDocumentFileIds = $scope\n                    .onChangeValue.attachDocumentFileIds\n                    ? $scope.onChangeValue.attachDocumentFileIds\n                    : [];\n                  $scope.onChangeValue.attachDocumentFileIds.push(\n                    response.data\n                  );\n                  pubsubService.publish('FILEUPLOAD_UPLOAD_COMPLETED');\n                  notificationService.showSuccessToast(file.name + ' uploaded');\n                }\n              },\n              function (error) {\n                pubsubService.publish('FILEUPLOAD_UPLOAD_FAILED');\n              }\n            );\n          });\n\n          Promise.all(promises).then(() =>\n            uploadFileBatch(files, start + batchSize, batchSize)\n          );\n        }\n\n        /// PRIVATE METHODS ///////////////////////////////////////////////////////////////////////\n        function createDownloadLink(fileId) {\n          return fileService.getDownloadLink(fileId);\n        }\n      }\n    ]\n  };\n\n  return directive;\n}\n","(function () {\n  'use strict';\n\n  var fgFiles = angular.module('fgFiles', []);\n})();\n","angular.module('fg').directive('fgFileDrag', [fgFileDrag]);\n\nfunction fgFileDrag() {\n  var directive = {\n    restrict: 'A',\n    require: ['?fgFileUpload', '?attachDocumentFileUpload', '?imageFileUpload'],\n\n    link: function (scope, element, attrs, ctrls) {\n      element\n        .on('drag dragstart dragend dragover dragenter dragleave drop', (e) => {\n          e.preventDefault();\n          e.stopPropagation();\n        })\n        .on('dragover dragenter', () => {\n          element.addClass('dragging');\n        })\n        .on('dragleave dragend drop', () => {\n          element.removeClass('dragging');\n        })\n        .on('drop', (e) => {\n          e.target = { files: e.originalEvent.dataTransfer.files };\n          ctrls.forEach((control) => {\n            if (control && control.onFileChange) {\n              control.onFileChange(e);\n            }\n          });\n        });\n    }\n  };\n\n  return directive;\n}\n","/// A directive for displaying a list of uploaded files\nimport angular, {\n  auto,\n  IHttpService,\n  IPromise,\n  IQService,\n  IScope\n} from 'angular';\nimport { SharedAngular } from '@Shared.FormGen/@types/sharedAngular';\nimport { FgFileListServiceType, FileListFile } from './file.listService';\nimport { IEventFileUploadResult } from '@Shared.Angular/@types/pubSub';\n\nangular.module('fgFiles').directive('fgFileList', [fgFileList]);\n\nfunction fgFileList() {\n  const directive = {\n    restrict: 'E',\n    require: ['?^fgForm', 'fgFileList'],\n    scope: {\n      //id of the file upload control associated with this list\n      fieldId: '<',\n      fileUploadRequired: '<',\n      form: '='\n    },\n    bindToController: true,\n    controller: [\n      '$rootScope',\n      '$scope',\n      '$q',\n      '$http',\n      'flowStore',\n      'pubsubService',\n      'notificationService',\n      'ngDialog',\n      'fgFileListService',\n      '$injector',\n      function controller(\n        $rootScope,\n        $scope: IScope,\n        $q: IQService,\n        $http: IHttpService,\n        flowStore,\n        pubsubService: SharedAngular.PubSubService,\n        notificationService: SharedAngular.NotificationService,\n        ngDialog,\n        fgFileListService: FgFileListServiceType,\n        $injector: auto.IInjectorService\n      ) {\n        const subscriberId = `file-list${this.fieldId}`;\n        // eslint-disable-next-line @typescript-eslint/no-this-alias\n        const ctrl = this;\n        if ($injector.has('runnerPublicFormApiService')) {\n          ctrl.runnerPublicFormApiService = $injector.get(\n            'runnerPublicFormApiService'\n          );\n        }\n        ctrl.fgFileListService = fgFileListService;\n        ctrl.touched = false;\n        ctrl.init = init;\n        ctrl.getFiles = getFiles;\n        ctrl.removeFile = removeFile;\n        ctrl.removeAll = removeAll;\n        ctrl.cleanup = cleanup;\n        ctrl.showFileRequiredMessage = showFileRequiredMessage;\n        ctrl.files = [];\n\n        // Get files saved against this step (uses the step ID passed to the formCtrl to filter)\n        function getFiles() {\n          ctrl.files = fgFileListService.getFilesForControl(\n            ctrl.fieldId,\n            ctrl.stepId\n          );\n          return ctrl.files;\n        }\n\n        function cleanup(fgFormCtrl) {\n          if (fgFormCtrl) {\n            pubsubService.unsubscribeAll(subscriberId);\n          }\n        }\n\n        function init(fgFormCtrl) {\n          if (fgFormCtrl != null) {\n            ctrl.fgFormCtrl = fgFormCtrl;\n            ctrl.stepId = fgFormCtrl.stepId;\n            ctrl.flowInstanceId = fgFormCtrl.flowInstanceId;\n            fgFileListService.storeForm(fgFormCtrl);\n            fgFileListService.registerFileControl(\n              this.fieldId,\n              ctrl.stepId,\n              ctrl.flowInstanceId,\n              ctrl.fileUploadRequired\n            );\n            validateFileRequired();\n            pubsubService.subscribe(\n              'FILEUPLOAD_UPLOAD_COMPLETED',\n              validateFileRequired,\n              subscriberId\n            );\n          }\n        }\n\n        function removeAll() {\n          confirmDelete(false).then(() => {\n            for (const file of ctrl.files) {\n              removeFile(file, true);\n            }\n          });\n        }\n\n        function removeFile(file: FileListFile, supressConfirmation: boolean) {\n          confirmDelete(supressConfirmation).then(\n            () => {\n              pubsubService.publish('FILEUPLOAD_REMOVAL_STARTED');\n              //remove file from client first (optimisitic) this prevents the UI trying to upload in progress form files\n              //if the user moves somewhere else whilst delete in progress.\n              fgFileListService.removeFile(file, ctrl.fieldId, ctrl.stepId);\n              //user confirmed delete\n              const user = $rootScope.sessionService.getUser();\n              let deletePromise: IPromise<any>;\n              if (user == undefined) {\n                deletePromise =\n                  ctrl.runnerPublicFormApiService.deleteAnonymousFile(\n                    file.id,\n                    ctrl.stepId\n                  );\n              } else {\n                deletePromise = $http.post(\n                  `${$rootScope.APP_CONFIG.apiBaseUrl}files/remove/${user.businessId}/${user.id}/${file.id}/${ctrl.stepId}`,\n                  {}\n                );\n              }\n              deletePromise.then(() => {\n                pubsubService.publish(\n                  'FILEUPLOAD_REMOVAL_COMPLETED',\n                  fgFileListService.getFilesForControl(file.key, ctrl.stepId)\n                    .length\n                );\n                notificationService.showSuccessToast(\n                  file.filename + ' Removed'\n                );\n                validateFileRequired();\n              });\n            },\n            function () {\n              //user cancelled do nothing\n            }\n          );\n        }\n\n        // PRIVATE METHODS  /////////////////////////////////////////////////////////////\n\n        function confirmDelete(supressConfirmation: boolean) {\n          if (flowStore.get('dontShowAgain') != undefined) {\n            supressConfirmation = true;\n          }\n\n          //supress the confirmation if the user clicked removeAll and they have already confirmed delete\n          if (!supressConfirmation) {\n            //todo to reusable service\n            return ngDialog\n              .openConfirm({\n                className: 'ngdialog-theme-plain',\n                showClose: false,\n                template:\n                  'angular-form-gen/form/files/file.confirmDelete.ng.html',\n                scope: $scope\n              })\n              .then(\n                function (dontShowAgain) {\n                  setDontShowAgainFlag(dontShowAgain);\n                  return $q.when();\n                },\n                function () {\n                  return $q.reject();\n                }\n              );\n          }\n          return $q.when();\n        }\n\n        function showFileRequiredMessage() {\n          return (\n            fgFileListService.isFileRequired(ctrl.fieldId, ctrl.stepId) &&\n            (fgFileListService.isFileListDirty(ctrl.fieldId, ctrl.stepId) ||\n              (ctrl.form.state && ctrl.form.state.$submitted)) &&\n            fgFileListService.getFilesForControl(ctrl.fieldId, ctrl.stepId)\n              .length == 0\n          );\n        }\n\n        function validateFileRequired() {\n          //check to to see if the form is invalid as there are not files uploaded when they are required.\n          //the form may  have  mix of optional and required fields, so we only want to look at the required ones.\n          if (fgFileListService.isFileRequired(ctrl.fieldId, ctrl.stepId)) {\n            const invalid =\n              fgFileListService.getFilesForControl(ctrl.fieldId, ctrl.stepId)\n                .length == 0;\n\n            if (invalid) {\n              pubsubService.publish(\n                'FILEUPLOAD_FILE_ERROR',\n                {\n                  fileControlId: ctrl.fieldId,\n                  flowInstanceId: ctrl.flowInstanceId\n                } as IEventFileUploadResult,\n                true\n              );\n            } else {\n              pubsubService.publish(\n                'FILEUPLOAD_FILE_VALID',\n                {\n                  fileControlId: ctrl.fieldId,\n                  flowInstanceId: ctrl.flowInstanceId\n                } as IEventFileUploadResult,\n                true\n              );\n            }\n          }\n        }\n        function setDontShowAgainFlag(dontShowAgain) {\n          if (dontShowAgain) {\n            flowStore.set('dontShowAgain', true);\n          }\n        }\n      }\n    ],\n    controllerAs: 'ctrl',\n    link: function (scope, element, attrs, ctrls) {\n      const fgFormCtrl = ctrls[0];\n      const fgFileListCtrl = ctrls[1];\n      fgFileListCtrl.init(fgFormCtrl);\n      scope.$on('$destroy', () => {\n        fgFileListCtrl.cleanup(fgFormCtrl);\n      });\n    },\n\n    template: [\n      '<div ng-show=\"ctrl.files.length > 1\" class=\"pt-5\"><a class=\"ml-15 cursor-pointer\" ng-click=\"ctrl.removeAll()\">Remove All</a></div>',\n      '<div><ul class=\"file-list\">',\n      '<div ng-if=\"ctrl.showFileRequiredMessage()\" class=\"error-text\">This is a required field.</div>',\n      '<li ng-repeat=\"file in ctrl.getFiles() | orderBy : \\'filename\\'\" class=\"clearfix\">',\n      '<a flow-download-link=\"{{::file.downloadLink}}\" target=\"_blank\"> {{::file.filename}}</a><span>({{::file.size}}K)</span>',\n      '<i ng-click=\"ctrl.removeFile(file)\" class=\"fa-light fa-xmark fa-lg\"></i></li>',\n      '</ul>',\n      '<div class=\"pl-10 pt-6 secondary-text\" ng-show=\"ctrl.files.length === 0\"><em>Drag and Drop your files here or click the Upload button</em></div>',\n      '</div>'\n    ].join('')\n  };\n  return directive;\n}\n","//\n// A service that maintains a list of uploaded files\n//\nimport angular, { IQService } from 'angular';\nimport { Guid } from '@Shared.Angular/@types/guid';\nimport { SharedAngular } from '../../@types/sharedAngular';\nangular\n  .module('fgFiles')\n  .factory('fgFileListService', [\n    '$q',\n    'lodashService',\n    'guidService',\n    'conditionalFormService',\n    fgFileListService\n  ]);\n\nfunction fgFileListService(\n  $q: IQService,\n  lodashService: Lodash,\n  guidService: SharedAngular.GuidService,\n  conditionalFormService: SharedAngular.ConditionalFormService\n) {\n  // A list of all the file controls\n  // These are identified by a combination of the fieldName AND the stepId\n  // This is because the fieldName is unique only within a Step.\n  const _fileControls: FileControl[] = [];\n  let _form = undefined;\n\n  const service = {\n    files: [],\n    addFile: addFile,\n    doesFileControlExist: doesFileControlExist,\n    getFilesForStep: getFilesForStep,\n    getFilesForControl: getFilesForControl,\n    getForm: getForm,\n    removeFilesForStepField: removeFilesForStepField,\n    removeFile: removeFile,\n    isFileListDirty: isFileListDirty,\n    isFileRequired: isFileRequired,\n    registerFileControl: registerFileControl,\n    areVisibleFileFieldsValid: areVisibleFileFieldsValid,\n    getFileListFileCount: getFileListFileCount,\n    removeFileControlsForFlow: removeFileControlsForFlow,\n    removeAllFileControls: removeAllFileControls,\n    removeFileControlsForFlowStep: removeFileControlsForFlowStep,\n    setFileListInvalid: setFileListInvalid,\n    storeForm: storeForm\n  };\n\n  return service;\n\n  //////////// Public API Methods\n  function addFile(file: FileListFile, fieldName: string, stepId: Guid) {\n    const fileControl = getFileControl(fieldName, stepId);\n    fileControl.isDirty = true;\n\n    if (\n      !fileControl.files.some(\n        (f) => f.id.toLowerCase() === file.id.toLowerCase()\n      )\n    ) {\n      fileControl.files.push(file);\n    }\n  }\n\n  function doesFileControlExist(fieldName: string, stepId: Guid) {\n    const found = lodashService.find(_fileControls, function (l) {\n      return l.fieldName === fieldName && l.stepId === stepId;\n    });\n    return found !== undefined;\n  }\n\n  function getFilesForStep(stepId: Guid) {\n    const stepGuid = getEmptyGuidIfNullOrEmpty(stepId);\n    const controlsForStep = _fileControls.filter(\n      (control) => control.stepId === stepGuid\n    );\n    return controlsForStep.map((control) => {\n      return {\n        fieldName: control.fieldName,\n        files: control.files\n      } as FieldFiles;\n    });\n  }\n\n  function getFilesForControl(fieldName: string, stepId: Guid) {\n    const control = getFileControl(fieldName, stepId);\n    if (!control) {\n      return [];\n    }\n\n    return control.files;\n  }\n\n  function getForm() {\n    return _form;\n  }\n\n  function isFileListDirty(fieldName: string, stepId: Guid) {\n    const fileList = getFileControl(fieldName, stepId);\n    return fileList.isDirty;\n  }\n\n  function isFileRequired(fieldName: string, stepId: Guid) {\n    const fileList = getFileControl(fieldName, stepId);\n    return fileList && fileList.isRequired;\n  }\n\n  function getFileListFileCount(fieldName: string, stepId: Guid) {\n    const fileList = getFileControl(fieldName, stepId);\n    return fileList != null ? fileList.files.length : 0;\n  }\n\n  function registerFileControl(\n    fieldName: string,\n    stepId: Guid,\n    flowInstanceId: Guid,\n    required: boolean\n  ) {\n    const found = _fileControls.some((control) => {\n      return (\n        control.fieldName === fieldName &&\n        control.flowId === flowInstanceId &&\n        control.stepId === stepId\n      );\n    });\n\n    if (!found) {\n      _fileControls.push({\n        fieldName: fieldName,\n        stepId: getEmptyGuidIfNullOrEmpty(stepId),\n        flowId: flowInstanceId,\n        files: [],\n        isDirty: false,\n        isRequired: required,\n        invalid: false\n      });\n    }\n  }\n\n  function areVisibleFileFieldsValid(flowId: Guid) {\n    const fileControlsForFlow = _fileControls.filter(\n      (fileControl) => fileControl.flowId == flowId\n    );\n\n    return !fileControlsForFlow.some((fileControl) => {\n      return (\n        fileControl.invalid == true &&\n        !conditionalFormService.isFieldHidden(fileControl.fieldName) &&\n        !conditionalFormService.isFieldHiddenByConditions(fileControl.fieldName)\n      );\n    });\n  }\n\n  function setFileListInvalid(\n    fieldName: string,\n    stepId: Guid,\n    flowId: Guid,\n    invalid: boolean\n  ) {\n    const fileControl = getFileControl(fieldName, stepId);\n\n    if (fileControl) {\n      fileControl.invalid = invalid;\n      fileControl.flowId = flowId;\n    }\n  }\n\n  function removeAllFileControls() {\n    _fileControls.length = 0;\n  }\n\n  function removeFileControlsForFlow(flowId: Guid) {\n    lodashService.remove(_fileControls, function (control) {\n      return control.flowId == flowId;\n    });\n  }\n\n  function removeFileControlsForFlowStep(flowId: Guid, stepId: Guid) {\n    lodashService.remove(_fileControls, function (control) {\n      return control.flowId === flowId && control.stepId === stepId;\n    });\n  }\n\n  function removeFilesForStepField(stepId: Guid, fieldName: string) {\n    const fileControl = getFileControl(fieldName, stepId);\n    if (fileControl) {\n      fileControl.files.length = 0;\n    }\n  }\n\n  function removeFile(file, fieldName: string, stepId: Guid) {\n    const fileControl = getFileControl(fieldName, stepId);\n    const index = lodashService.findIndex(fileControl.files, function (f) {\n      return f.id === file.id;\n    });\n    if (index !== -1) {\n      fileControl.files.splice(index, 1);\n      fileControl.isDirty = true;\n    }\n\n    return $q.when();\n  }\n\n  function storeForm(form) {\n    _form = form;\n  }\n\n  //////////// Private Methods\n  function getEmptyGuidIfNullOrEmpty(stepId: Guid) {\n    if (stepId == undefined || stepId == '') {\n      //stepId will be undefined if we are uploading a file for a flow not yet started\n      //to save having to pass in empty guid id everywhere, handle this here\n      stepId = guidService.empty();\n    }\n    return stepId;\n  }\n\n  function getFileControl(fieldName: string, stepId: Guid) {\n    const stepGuid = getEmptyGuidIfNullOrEmpty(stepId);\n    return _fileControls.find(\n      (control) =>\n        control.fieldName === fieldName && control.stepId === stepGuid\n    );\n  }\n}\n\nexport type FgFileListServiceType = ReturnType<typeof fgFileListService>;\nexport type FileListFile = {\n  stepId: Guid;\n  filename: string;\n  id: Guid;\n  key: string;\n  downloadLink: string;\n  size: number;\n};\ntype FileControl = {\n  fieldName: string;\n  stepId: Guid;\n  flowId: Guid;\n  files: FileListFile[];\n  isDirty: boolean;\n  isRequired: boolean;\n  invalid: boolean;\n};\nexport type FieldFiles = {\n  fieldName: string;\n  files: FileListFile[];\n};\n","/// A directive for uploading files to the server.\n/// This directives onFileChange method needs to be called by the directive that monitors changes to the select file input (fgOnFileChange)\n\nimport angular, { auto } from 'angular';\nimport { Services } from '../../@types/services';\nimport { SharedAngular } from '../../@types/sharedAngular';\n\n/// ##########################################################################################################\n///\n/// NOTE: THIS DIRECTIVE DOES NOT HAVE A TEMPLATE. fileupload.ng.html is NOT THE TEMPLATE FOR THIS DIRECTIVE!!!\n///\n/// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nangular.module('fgFiles').directive('fgFileUpload', [fgFileUpload]);\n\nfunction fgFileUpload() {\n  const directive = {\n    restrict: 'A',\n    require: ['?^fgForm', 'fgFileUpload'],\n    controllerAs: 'ctrl',\n    controller: [\n      'fgFileListService',\n      'pubsubService',\n      'notificationService',\n      'fileService',\n      'sessionService',\n      '$injector',\n      'guidService',\n      function controller(\n        fgFileListService: Services.FgFileListService,\n        pubsubService: SharedAngular.PubSubService,\n        notificationService: SharedAngular.NotificationService,\n        fileService: SharedAngular.FileService,\n        sessionService: SharedAngular.SessionService,\n        $injector: auto.IInjectorService,\n        guidService: SharedAngular.GuidService\n      ) {\n        const BATCH_SIZE = 5;\n        // eslint-disable-next-line @typescript-eslint/no-this-alias\n        const ctrl = this;\n\n        if ($injector.has('runnerPublicFormService')) {\n          ctrl.runnerPublicFormService = $injector.get(\n            'runnerPublicFormService'\n          );\n        }\n        ctrl.fileError = false;\n        ctrl.fieldName = '';\n        ctrl.init = init;\n        ctrl.onFileChange = onFileChange;\n        ctrl.uploadFiles = uploadFiles;\n        ctrl.user = sessionService.getUser();\n\n        function init(fieldName: string, fgFormCtrl) {\n          ctrl.stepId = fgFormCtrl.stepId;\n          ctrl.fieldName = fieldName;\n          ctrl.formModelId = fgFormCtrl.formModelId;\n          ctrl.isPublicForm = fgFormCtrl.isPublic;\n        }\n\n        function onFileChange(event) {\n          if (event.target.files.length === 0 || ctrl.stepId == '') {\n            // No files or not on a real step (i.e. we are in modeler)\n            return;\n          }\n          pubsubService.publish('FILEUPLOAD_UPLOAD_STARTED');\n          //handle file change notification (from fgOnFileChange)\n          event.stopPropagation();\n          const filesToUpload = event.target.files;\n          ctrl.uploadFiles(filesToUpload);\n        }\n\n        function uploadFiles(filesToUpload) {\n          uploadFileBatch(\n            Array.prototype.slice.call(filesToUpload),\n            0,\n            BATCH_SIZE\n          );\n        }\n\n        function uploadFileBatch(files, start: number, batchSize: number) {\n          if (!files || batchSize <= 0 || start >= files.length) {\n            return;\n          }\n\n          const batch = files.slice(start, start + batchSize);\n          const promises = batch.map((file: File) => {\n            if (ctrl.stepId == undefined || ctrl.stepId == '') {\n              //stepId will be undefined if we are uploading a file for a flow not yet started\n              ctrl.stepId = guidService.empty();\n            }\n\n            let uploadPromise;\n            if (ctrl.user === undefined) {\n              uploadPromise = ctrl.runnerPublicFormService.uploadAnonymousFile(\n                ctrl.formModelId,\n                ctrl.stepId,\n                file,\n                ctrl.fieldName\n              );\n            } else {\n              uploadPromise = fileService.uploadFile(\n                ctrl.stepId,\n                file,\n                ctrl.fieldName\n              );\n            }\n            return uploadPromise.then(\n              (response) => {\n                const fileId = response.data;\n                //add file meta to the list (this will update the list directive)\n                fgFileListService.addFile(\n                  {\n                    //stepId is used to keep track of files associated to this step\n                    stepId: ctrl.stepId,\n                    filename: file.name,\n                    id: response.data,\n                    key: ctrl.fieldName,\n                    downloadLink: fileService.getDownloadLink(\n                      fileId,\n                      ctrl.isPublicForm\n                    ),\n                    size: Math.floor(file.size / 1000)\n                  },\n                  ctrl.fieldName,\n                  ctrl.stepId\n                );\n\n                pubsubService.publish('FILEUPLOAD_UPLOAD_COMPLETED');\n                notificationService.showSuccessToast(file.name + ' uploaded');\n              },\n              function (error) {\n                //file upload failed\n                //clear the file control so that user can upload another file\n\n                pubsubService.publish('FILEUPLOAD_UPLOAD_FAILED');\n              }\n            );\n          });\n\n          Promise.all(promises).then(() =>\n            uploadFileBatch(files, start + batchSize, batchSize)\n          );\n        }\n      }\n    ],\n\n    link: function (scope, element, attrs, ctrls) {\n      const fgFormCtrl = ctrls[0];\n      const fgFileUploadCtrl = ctrls[1];\n      //we need to pass through the name of the field on the form\n      if (fgFormCtrl != null) {\n        fgFileUploadCtrl.init(attrs.fieldName, fgFormCtrl);\n      }\n    }\n  };\n\n  return directive;\n}\n","angular.module('fg').component('fgImage', {\n  bindings: {\n    fileId: '<',\n    alignment: '<'\n  },\n  controller: [\n    '$scope',\n    'fileService',\n    function ($scope, fileService) {\n      let $ctrl = this;\n      let loadedFileId = null;\n\n      this.$onInit = function () {\n        loadImageData();\n      };\n\n      this.$onChanges = function () {\n        loadImageData();\n      };\n\n      function loadImageData() {\n        const fileId = $ctrl.fileId;\n        if (fileId === undefined || fileId === loadedFileId) {\n          return;\n        }\n\n        fileService.getFileById(fileId).then((response) => {\n          if (response.status !== 200) {\n            return;\n          }\n          loadedFileId = fileId;\n          $ctrl.image = {\n            data: response.data.data,\n            mimeType: response.data.mimeType,\n            name: response.data.filename\n          };\n        });\n      }\n    }\n  ],\n  templateUrl: 'angular-form-gen/form/files/image.ng.html'\n});\n","angular.module('fg').directive('imageFileUpload', function () {\n  return {\n    restrict: 'A',\n    require: ['?^fgForm', 'imageFileUpload'],\n    controllerAs: 'ctrl',\n    scope: {\n      field: '<',\n      imageLimit: '<?',\n      imageKey: '<?',\n      onFileUploaded: '<?'\n    },\n    controller: [\n      '$scope',\n      '$element',\n      'pubsubService',\n      'notificationService',\n      'fileService',\n      'guidService',\n      'sessionService',\n      function controller(\n        $scope,\n        $element,\n        pubsubService,\n        notificationService,\n        fileService,\n        guidService,\n        sessionService\n      ) {\n        const BATCH_SIZE = 5;\n\n        let ctrl = this;\n        ctrl.fieldId = $scope.field && $scope.field.id;\n        ctrl.onFileChange = onFileChange;\n        ctrl.uploadFiles = uploadFiles;\n        const maxImageDimensionInPixels = 260;\n\n        this.$onInit = function () {\n          const user = sessionService.getUser();\n          fileService.setUser(user.id, user.businessId);\n\n          const types = ['jpeg', 'jpg', 'jfif', 'bmp', 'png', 'gif'];\n          ctrl.allowedFileTypes = types;\n          ctrl.allowedFileTypesString = types\n            .map((type) => '.' + type)\n            .reduce((previous, current) => previous + ', ' + current);\n          $element.attr('accept', ctrl.allowedFileTypesString);\n        };\n\n        function onFileChange(event) {\n          if (event.target.files.length === 0) {\n            return;\n          }\n\n          pubsubService.publish('IMAGEUPLOAD_UPLOAD_STARTED');\n          event.stopPropagation();\n\n          const files = Array.from(event.target.files); // FileList is not an Array\n          let filesToUpload = files.filter((file) => {\n            const extension = file.name\n              .substring(file.name.lastIndexOf('.') + 1)\n              .toLowerCase();\n            if (ctrl.allowedFileTypes.some((type) => type === extension)) {\n              return true;\n            }\n\n            notificationService.showWarningToast(\n              `${file.name} is not an allowed image type (${ctrl.allowedFileTypesString})`\n            );\n            return false;\n          });\n\n          if ($scope.imageLimit) {\n            filesToUpload = filesToUpload.slice(0, $scope.imageLimit);\n          }\n\n          uploadFiles(filesToUpload);\n        }\n\n        function uploadFiles(filesToUpload) {\n          uploadFileBatch(\n            Array.prototype.slice.call(filesToUpload),\n            0,\n            BATCH_SIZE\n          );\n        }\n\n        /// PRIVATE METHODS //\n        function uploadFileBatch(files, start, batchSize) {\n          if (!files || batchSize <= 0 || start >= files.length) {\n            return;\n          }\n\n          var batch = files.slice(start, start + batchSize);\n          var promises = batch.map(function (file) {\n            fileService\n              .reduceImageFile(\n                file,\n                maxImageDimensionInPixels,\n                maxImageDimensionInPixels\n              )\n              .then(\n                (newFile) => {\n                  return fileService\n                    .uploadFile(\n                      guidService.empty(),\n                      newFile,\n                      $scope.imageKey || 'Logo'\n                    )\n                    .then(\n                      function (response) {\n                        if (response.valid) {\n                          const eventParams = {\n                            fieldId: ctrl.fieldId,\n                            fileId: response.data\n                          };\n\n                          notificationService.showSuccessToast(\n                            file.name + ' uploaded.'\n                          );\n                          pubsubService.publish(\n                            'IMAGEUPLOAD_UPLOAD_COMPLETED',\n                            eventParams\n                          );\n                          $scope.onFileUploaded &&\n                            $scope.onFileUploaded(eventParams.fileId);\n                        }\n                      },\n                      function (error) {\n                        pubsubService.publish('IMAGEUPLOAD_UPLOAD_FAILED');\n                      }\n                    );\n                },\n                (rejected) => {\n                  notificationService.showWarningToast(\n                    file.name + ' is not an accepted image type.'\n                  );\n                }\n              );\n          });\n\n          Promise.all(promises).then(() =>\n            uploadFileBatch(files, start + batchSize, batchSize)\n          );\n        }\n\n        function createDownloadLink(fileId) {\n          return fileService.getDownloadLink(fileId);\n        }\n      }\n    ]\n  };\n});\n","/**\n * @ngdoc directive\n * @name fgImageSelector\n * @description Displays an image field selector for choosing between available business images.\n * @usage\n * ```\n *   <fg-image-selector field=\"field\"></fg-image-selector>\n * ```\n */\nangular.module('fg').component('fgImageSelector', {\n  bindings: {\n    field: '<'\n  },\n  controller: [\n    '$scope',\n    'fileService',\n    'pubsubService',\n    function ($scope, fileService, pubsubService) {\n      let $ctrl = this;\n      const SUBSCRIBER_NAME = 'ImageSelector_' + Date.now();\n\n      this.$onInit = function () {\n        if ($ctrl.field.alignment === undefined) {\n          $ctrl.field.alignment = 'center';\n        }\n        loadImageIds(true);\n        pubsubService.subscribe(\n          'IMAGEUPLOAD_UPLOAD_COMPLETED',\n          (eventName, data) => loadImageIds(data.fieldId !== $ctrl.field.id),\n          SUBSCRIBER_NAME\n        );\n      };\n\n      this.$onDestroy = function () {\n        pubsubService.unsubscribeAll(SUBSCRIBER_NAME);\n      };\n\n      this.changeSelection = function (change) {\n        const images = $ctrl.images;\n        let newIndex = $ctrl.currentImageIndex + change;\n        if (newIndex < 0) {\n          newIndex = images.length - 1;\n        } else if (newIndex >= images.length) {\n          newIndex = 0;\n        }\n        $ctrl.currentImageIndex = newIndex;\n        loadCurrentImageData();\n      };\n\n      function loadImageIds(keepSelection) {\n        fileService.getBusinessImageIds().then((ids) => {\n          $ctrl.errorMessage = null;\n          $ctrl.images = null;\n\n          if (ids === null) {\n            $ctrl.errorMessage =\n              'An error occurred while trying to load existing files, try re-opening the form designer.';\n            return;\n          }\n\n          $ctrl.images = ids.map((id, index) => {\n            return { id: id };\n          });\n\n          const currentSelectionIndex = ids.indexOf($ctrl.field.value);\n          $ctrl.currentImageIndex =\n            keepSelection && currentSelectionIndex > -1\n              ? currentSelectionIndex\n              : 0;\n          loadCurrentImageData();\n        });\n      }\n\n      function loadCurrentImageData() {\n        const image = $ctrl.images[$ctrl.currentImageIndex];\n        if (image === undefined) {\n          return;\n        }\n        if (image.data !== undefined) {\n          $ctrl.selectedImage = image;\n          $ctrl.field.value = image.id;\n          return;\n        }\n\n        fileService.getFileById(image.id).then((response) => {\n          if (response.status === 200) {\n            image.data = response.data.data;\n            image.mimeType = response.data.mimeType;\n            image.name = response.data.filename;\n          }\n          $ctrl.selectedImage = image;\n          $ctrl.field.value = image.id;\n        });\n      }\n    }\n  ],\n  templateUrl: 'angular-form-gen/form/files/image.selector.ng.html'\n});\n","angular.module('fg').directive('uploadFileOnchange', [uploadFileOnchange]);\n\nfunction uploadFileOnchange() {\n  var directive = {\n    restrict: 'A',\n    require: ['?attachDocumentFileUpload', '?fgFileUpload', '?imageFileUpload'],\n    link: function (scope, element, attrs, ctrls) {\n      ctrls.forEach((ctrl) => {\n        if (!ctrl || !ctrl.onFileChange) {\n          return;\n        }\n\n        const onChangeHandler = ctrl.onFileChange;\n        element.bind('change', onChangeHandler);\n\n        element.bind('click', function () {\n          //clear the value so that we can select a file with the same name\n          element[0].value = '';\n        });\n\n        scope.$on('$destroy', function () {\n          element.unbind('change', onChangeHandler);\n        });\n      });\n    }\n  };\n\n  return directive;\n}\n","import angular, { IScope } from 'angular';\nimport IFormattedStepSchema from '@Angular.Runner/interfaces/IFormattedStepSchema';\nimport { SharedAngular } from '@Angular.Runner/@types/sharedAngular';\n\nangular.module('fg').controller('fgFormController', [\n  '$scope',\n  '$parse',\n  'busyService',\n  function ($scope: IScope, $parse, busyService: SharedAngular.BusyService) {\n    this.model = {} as IFormModel;\n    // eslint-disable-next-line @typescript-eslint/no-this-alias\n    const self = this;\n\n    // Called by the directive\n    this.init = function (\n      dataExpression,\n      schema,\n      state,\n      editMode,\n      stepId,\n      flowInstanceId,\n      previousDataExpression,\n      flowFields,\n      isWorkflow,\n      formModelId,\n      isPublic\n    ) {\n      //make the associated step Id available to all form inputs\n      self.stepId = stepId;\n      self.flowInstanceId = flowInstanceId;\n      self.editMode = editMode;\n\n      self.flowFields = flowFields;\n      self.isWorkflow = isWorkflow;\n      self.formModelId = formModelId;\n      self.isPublic = isPublic === 'true';\n\n      const dataGetter = $parse(dataExpression);\n      const dataSetter = dataGetter.assign;\n      busyService.reset();\n      $scope.$watch(dataGetter, function (value) {\n        if (value === undefined) {\n          value = {};\n\n          if (dataSetter) {\n            dataSetter($scope, value);\n          }\n        }\n\n        self.model.data = value;\n      });\n\n      $scope.$watch(\n        function () {\n          return schema.model(); // schema-controller.model()\n        },\n        function (value: IFormattedStepSchema) {\n          if (value === undefined) {\n            schema.model({});\n          } else {\n            self.model.schema = value;\n          }\n        }\n      );\n      const previousDataGetter = $parse(previousDataExpression);\n      const previousDataSetter = previousDataGetter.assign;\n      $scope.$watch(previousDataGetter, function (value) {\n        if (value === undefined) {\n          value = {};\n\n          if (previousDataSetter) {\n            previousDataSetter($scope, value);\n          }\n        }\n\n        self.model.previousCustomValidationData = value;\n      });\n      self.model.state = state;\n\n      return self.model;\n    };\n  }\n]);\n\nexport interface IFormModel {\n  data: unknown;\n  schema: IFormattedStepSchema;\n  previousCustomValidationData: unknown;\n  state: unknown;\n}\n","angular\n  .module('fg')\n  .directive('fgForm', [\n    'fgFormCompileFn',\n    function (fgFormCompileFn) {\n      return {\n        restrict: 'AE',\n        require: ['^?form', 'fgForm', '^fgSchema'],\n        controller: 'fgFormController',\n        scope: true,\n        compile: fgFormCompileFn\n      };\n    }\n  ])\n  .factory('fgFormLinkFn', [\n    'pubsubService',\n    function (pubsubService) {\n      return function link($scope, $element, $attrs, ctrls) {\n        var ngFormCtrl = ctrls[0];\n        var formCtrl = ctrls[1];\n        var schemaCtrl = ctrls[2];\n\n        var editMode = $attrs.fgNoRender === 'true';\n\n        //get the stepId associatd with this form\n        //currently used by the fileupload directive(s)\n        var stepId = $attrs.fgForm;\n\n        //we need to reinitalise when the step id changes\n        $scope.$watch(\n          function () {\n            return $attrs.fgForm;\n          },\n          function (stepId) {\n            var _workflowFields =\n              typeof $attrs.fgFields === 'string'\n                ? JSON.parse($attrs.fgFields)\n                : [];\n            pubsubService.publish('WORKFLOW_FIELDS_UPDATED', _workflowFields);\n            formCtrl.init(\n              $attrs.fgFormData,\n              schemaCtrl,\n              ngFormCtrl,\n              editMode,\n              stepId,\n              flowInstanceId,\n              $attrs.fgFormPreviousCustomValidationData,\n              _workflowFields,\n              $attrs.fgIsWorkflow,\n              $attrs.flowModelId,\n              $attrs.isPublic\n            );\n          }\n        );\n\n        var flowInstanceId = $attrs.fgFormFlowId;\n        var workflowFields =\n          typeof $attrs.fgFields === 'string'\n            ? JSON.parse($attrs.fgFields)\n            : [];\n        var isWorkflow = $attrs.fgIsWorkflow === 'true';\n\n        formCtrl.init(\n          $attrs.fgFormData,\n          schemaCtrl,\n          ngFormCtrl,\n          editMode,\n          stepId,\n          flowInstanceId,\n          $attrs.fgFormPreviousCustomValidationData,\n          workflowFields,\n          isWorkflow,\n          $attrs.flowModelId,\n          $attrs.isPublic\n        );\n      };\n    }\n  ])\n  .factory('fgFormCompileFn', [\n    'fgFormLinkFn',\n    function (fgFormLinkFn) {\n      return function ($element, $attrs) {\n        $element.addClass('fg-form');\n\n        var noRender = $attrs.fgNoRender;\n\n        if (noRender !== 'true') {\n          var renderTemplate = '<div fg-form-fields></div>';\n          $element.append(renderTemplate);\n        }\n\n        return fgFormLinkFn;\n      };\n    }\n  ]);\n","import angular from 'angular';\nimport { IFormModel } from '../form-controller';\n\nangular.module('fg').directive('fgFormFields', [\n  'fgConfig',\n  function (fgConfig) {\n    return {\n      require: ['^?fgForm'],\n      restrict: 'AE',\n      templateUrl: 'angular-form-gen/form/form-fields/form-fields.ng.html',\n      scope: {},\n      link: function ($scope, $element, $attrs, ctrls) {\n        const fgForm = ctrls[0];\n        fgForm.model._fields = fgForm.flowFields; // We \"merge\" these relatively recently added fields to the existing model attribute*/\n        fgForm.model.isWorkFlow = fgForm.isWorkflow;\n\n        $scope.showDummyDoneButton = fgConfig.showDummyDoneButton;\n\n        $scope.$watch(\n          function () {\n            return fgForm.model;\n          },\n          function (value: IFormModel) {\n            $scope.form = value;\n          }\n        );\n      }\n    };\n  }\n]);\n","import angular from 'angular';\nimport IFormattedStepSchema from '@Angular.Runner/interfaces/IFormattedStepSchema';\n\nangular.module('fg').controller('fgSchemaController', [\n  'fgUtils',\n  '$timeout',\n  'pubsubService',\n  'flowinglyConstants',\n  'APP_CONFIG',\n  function (fgUtils, $timeout, pubsubService, flowinglyConstants, appConfig) {\n    let _model: IFormattedStepSchema;\n\n    this.model = function (value: IFormattedStepSchema) {\n      if (value !== undefined) {\n        _model = value;\n\n        if (!angular.isArray(value.fields)) {\n          value.fields = [];\n        }\n        if (appConfig.enableHiddenLookupField) {\n          value.fields.forEach((field) => {\n            if (\n              field.type === flowinglyConstants.formFieldType.LOOKUP &&\n              field.displayInCompletedSteps == null\n            ) {\n              field.displayInCompletedSteps = true;\n            }\n          });\n        }\n      }\n      return _model;\n    };\n\n    this.addField = function (field, index, needScroll) {\n      collapseFields();\n      const copy = fgUtils.copyField(field);\n      copy.displayProperties = true;\n\n      if (field.type === flowinglyConstants.formFieldType.INSTRUCTION) {\n        // default to true, FLOW-2418 Given an instruction text is added to a form, Display Instruction text in completed steps in Runner + Visibility icon will default to on\n        copy.displayInCompletedSteps = true;\n      }\n\n      if (field.type === flowinglyConstants.formFieldType.ATTACH_DOCUMENT) {\n        // FLOW-5012 - default to false\n        copy.displayInCompletedSteps = false;\n      }\n\n      if (\n        field.type === flowinglyConstants.formFieldType.LOOKUP &&\n        appConfig.enableHiddenLookupField\n      ) {\n        copy.displayInCompletedSteps = true;\n      }\n\n      index = index === undefined ? _model.fields.length : index;\n      _model.fields.splice(index, 0, copy);\n      if (needScroll) {\n        $timeout(function () {\n          const newField = angular.element('#' + copy.name);\n          const fieldContainer = angular.element('#fieldContainer');\n\n          // don't scroll if only one field\n          if (newField && fieldContainer && _model.fields.length > 1) {\n            fieldContainer[0].scrollTop =\n              fieldContainer[0].scrollHeight - newField.height() - 120;\n          }\n        });\n      }\n    };\n\n    this.removeField = function (index) {\n      _model.fields.splice(index, 1);\n      pubsubService.publish(\n        'WORKFLOW_DESIGNER_FORM_FIELDS_CHANGED',\n        'fgSchemaController'\n      );\n    };\n\n    this.swapFields = function (fromIndex, toIndex) {\n      const fields = _model.fields;\n      const fieldLength = _model.fields.filter(\n        (x) => x.type !== flowinglyConstants.formFieldType.RECAPTCHA\n      ).length;\n      if (\n        fromIndex < 0 ||\n        fromIndex >= fieldLength ||\n        toIndex < 0 ||\n        toIndex >= fieldLength ||\n        fromIndex === toIndex\n      ) {\n        return;\n      }\n\n      const movingField = fields[fromIndex];\n      fields[fromIndex] = angular.copy(fields[toIndex]);\n      fields[toIndex] = movingField;\n    };\n\n    this.moveField = function (fromIndex, toIndex) {\n      const fields = _model.fields;\n      if (toIndex > fromIndex) {\n        --toIndex;\n      }\n      if (\n        fromIndex < 0 ||\n        fromIndex >= fields.length ||\n        toIndex < 0 ||\n        toIndex >= fields.length ||\n        fromIndex === toIndex\n      ) {\n        return;\n      }\n      const indexChange = toIndex > fromIndex ? 1 : -1;\n      const movingField = fields[fromIndex];\n      for (\n        let currentIndex = fromIndex;\n        currentIndex !== toIndex;\n        currentIndex += indexChange\n      ) {\n        fields[currentIndex] = angular.copy(fields[currentIndex + indexChange]);\n      }\n      fields[toIndex] = movingField;\n    };\n\n    function collapseFields() {\n      (_model.fields || []).forEach((field) => {\n        field.displayProperties = false;\n        if (field.type === 'image' && (!field.value || field.disabled)) {\n          field.minimized = true;\n        }\n      });\n    }\n  }\n]);\n","import angular from 'angular';\nimport IFormattedStepSchema from '@Angular.Runner/interfaces/IFormattedStepSchema';\n\nangular\n  .module('fg')\n  .directive('fgSchema', [\n    'fgSchemaLinkFn',\n    function (fgSchemaLinkFn) {\n      return {\n        require: ['fgSchema'],\n        controller: 'fgSchemaController',\n        link: fgSchemaLinkFn\n      };\n    }\n  ])\n  .factory('fgSchemaLinkFn', function () {\n    return function ($scope, $element, $attrs, ctrls) {\n      const schemaCtrl = ctrls[0];\n\n      $scope.$watch($attrs.fgSchema, function (value: IFormattedStepSchema) {\n        schemaCtrl.model(value);\n      });\n    };\n  });\n","angular\n  .module('fg')\n  .directive('fgValidationSummary', [\n    'fgValidationSummaryLinkFn',\n    function (fgValidationSummaryLinkFn) {\n      return {\n        require: ['^?fgField', '^?form'],\n        templateUrl: 'angular-form-gen/validation/summary.ng.html',\n        scope: {\n          fieldName: '@?fgValidationSummary',\n          validationMessages: '=?fgValidationMessages',\n          type: '=?fgType'\n        },\n        link: fgValidationSummaryLinkFn\n      };\n    }\n  ])\n  .factory('fgValidationSummaryLinkFn', [\n    'fgConfig',\n    function (fgConfig) {\n      return function ($scope, $element, $attrs, ctrls) {\n        var fgFieldCtrl = ctrls[0];\n        var ngFormController = ctrls[1];\n\n        if (fgFieldCtrl) {\n          // Grab the whole field state from the field controller\n          $scope.field = fgFieldCtrl.field();\n          $scope.form = fgFieldCtrl.form();\n        } else if (ngFormController) {\n          $scope.form = {\n            state: ngFormController\n          };\n\n          $scope.$watch('fieldName', function (value) {\n            $scope.field = {\n              name: value,\n              state: ngFormController[value]\n            };\n          });\n        }\n\n        // Whenever the form designer edits a custom message but decides to delete it later a \"\" is leftover.\n        // I don't feel like setting all kinds of watchers so we'll fix that here\n\n        if ($scope.validationMessages) {\n          angular.forEach($scope.validationMessages, function (value, key) {\n            if (!value) {\n              delete $scope.validationMessages[key];\n            }\n          });\n        }\n\n        $scope.messages = angular.extend(\n          {},\n          fgConfig.validation.messages,\n          $scope.validationMessages\n        );\n      };\n    }\n  ]);\n","angular.module('fg').directive('fgUniqueFieldName', function () {\n  var changeTick = 0;\n\n  function validate(ngModelCtrl, schemaCtrl, field) {\n    var schema = schemaCtrl.model();\n    var valid = true;\n    var schemaField;\n\n    if (schema) {\n      var fields = schema.fields;\n\n      for (var i = 0; i < fields.length; i++) {\n        schemaField = fields[i];\n        if (schemaField !== field && field.name === schemaField.name) {\n          valid = false;\n          break;\n        }\n      }\n    }\n\n    ngModelCtrl.$setValidity('unique', valid);\n  }\n\n  return {\n    priority: 100,\n    require: ['ngModel', '^fgSchema'],\n    link: function ($scope, $element, $attrs, ctrls) {\n      var ngModelCtrl = ctrls[0];\n      var schemaCtrl = ctrls[1];\n\n      var field = $scope.field;\n\n      if (!field) {\n        throw Error('No field property on scope');\n      }\n\n      $scope.$watch(\n        function () {\n          return ngModelCtrl.$modelValue;\n        },\n        function () {\n          // Every instance of this directive will increment changeTick\n          // whenever the name of the associated field is modified.\n\n          ++changeTick;\n        }\n      );\n\n      $scope.$watch(\n        function () {\n          return changeTick;\n        },\n        function () {\n          // Every instance of this directive will fire off the validation\n          // whenever the changeTick has been modifed.\n\n          validate(ngModelCtrl, schemaCtrl, field);\n        }\n      );\n    }\n  };\n});\n","// Module\nvar code = \"<div class=\\\"jsonify\\\"> <div class=\\\"btn-toolbar btn-toolbar-right\\\"> <button class=\\\"btn btn-default btn-xs\\\" type=\\\"button\\\" title=\\\"Copy the json data.\\\" ng-click=\\\"copy()\\\"> <span class=\\\"glyphicon glyphicon-transfer\\\"></span> </button> <button class=\\\"btn btn-default btn-xs\\\" type=\\\"button\\\" title=\\\"Display hidden properties.\\\" ng-click=\\\"displayHidden = !displayHidden\\\" ng-class=\\\"{ 'active': displayHidden }\\\"> <span class=\\\"glyphicon glyphicon-eye-open\\\"></span> </button> </div> <pre><code>{{ jsonify | j$on:displayHidden }}</code></pre> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"fg-tabs-pane\\\" ng-show=\\\"tabs.active === pane\\\"> <div ng-if=\\\"tabs.active === pane || pane.renderAlways\\\" ng-transclude></div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"fg-tabs tabbable\\\"> <ul class=\\\"tabs\\\" ng-show=\\\"tabs.items.length > 0\\\"> {{tab}} <li ng-repeat=\\\"tab in tabs.items\\\" class=\\\"tab tab-properties\\\" ng-if=\\\"tab.title != 'Validation'\\\"> <a href=\\\"\\\" ng-click=\\\"tabs.activate(tab)\\\" class=\\\"tab-title\\\" ng-class=\\\"{ active: tab === tabs.active, disabled: tab.disabled }\\\">{{ tab.title }}</a> </li> </ul> <div class=\\\"tab-content pt-0\\\" ng-transclude></div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"fg-edit-canvas\\\" dq-drag-area=\\\"fg-edit-canvas\\\" ng-class=\\\"{ 'fg-edit-canvas-dragging': dragging }\\\"> <fg-dropzone></fg-dropzone> <div ng-repeat=\\\"field in schema.fields\\\" ng-if=\\\"!field.hide\\\"> <div ng-attr-id=\\\"{{'canvas-field-' + $index}}\\\" fg-edit-canvas-field on-setting-click=\\\"canvasCtrl.collapseFields()\\\"></div> <fg-dropzone ng-if=\\\"field.type !== canvasCtrl.recaptchaType\\\"></fg-dropzone> <div id=\\\"drag-field-origin-{{$index}}\\\" class=\\\"drag-field-origin\\\" ng-show=\\\"dragging && draggingFieldIndex === $index\\\"> You're moving '{{field.displayName}}' from here </div> </div> <div ng-if=\\\"!schema.fields || schema.fields.length === 0 || (schema.fields.length === 1 && schema.fields[0].type === 'instruction')\\\"> <div ng-if=\\\"!dragging\\\" class=\\\"fg-edit-canvas-area-empty\\\"> <p class=\\\"flow-text p-10\\\"> <strong>Drag</strong> one of the available <strong>templates</strong> from the <strong>palette</strong> onto this <strong>canvas</strong>. </p> </div> </div> </div> <div> <button class=\\\"right btn\\\" disabled=\\\"disabled\\\">Submit</button> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"fg-edit-canvas-area\\\" ng-class=\\\"{ 'hide': hideDropArea(), 'dragging':showDragArea() }\\\" dq-drop=\\\"canvasCtrl.drop({{$index === undefined ? 0 : $index + 1}})\\\"> Drop here </div> \";\n// Exports\nexport default code;","// Module\nvar code = \" <div id=\\\"{{field.name}}\\\" class=\\\"field-container\\\"> <div class=\\\"fg-field fg-field-{{ field.type }} fg-edit-canvas-field p-10\\\" ng-class=\\\"{ 'error': field.$$_invalid, 'dragging': field.$_isDragging }\\\" dq-draggable=\\\"fg-edit-canvas\\\" dq-drag-disabled=\\\"dragEnabled === undefined || dragEnabled === false\\\" dq-drag-begin=\\\"canvasCtrl.dragBeginCanvasField($index, field)\\\" dq-drag-end=\\\"canvasCtrl.dragEndCanvasField(field)\\\"> <div class=\\\"fg-field-overlay\\\"> <div class=\\\"row p-0 m-0 ml-10 mr-10 flex flex-justify-space-between\\\"> <div class=\\\"dragging-container flex\\\" title=\\\"Drag field to reposition.\\\" ng-mouseenter=\\\"dragEnabled = true\\\" ng-mouseleave=\\\"dragEnabled = false\\\"> <div class=\\\"mt-3 mr-15\\\"> <i class=\\\"fa-light fa-grip-vertical fa-solid fa-xl grey-text\\\"></i> </div> <div class=\\\"action-buttons\\\" ng-class=\\\"{'icon-btn-disabled': field.actionButtons.disableMovebuttons}\\\"> <button class=\\\"btn btn-small transparent black-text pl-4 pr-5 mr-5\\\" type=\\\"button\\\" ng-click=\\\"schemaCtrl.swapFields($index, $index + 1)\\\" title=\\\"Move down\\\"> <i class=\\\"fa-light fa-arrow-down\\\"></i> </button> <button class=\\\"btn btn-small transparent black-text pl-5 pr-4 mr-5\\\" type=\\\"button\\\" ng-click=\\\"schemaCtrl.swapFields($index - 1, $index)\\\" title=\\\"Move up\\\"> <i class=\\\"fa-light fa-arrow-up\\\"></i> </button> </div> <div class=\\\"field-dragging-title hides-unless-visible ml-10 mt-3\\\" ng-class=\\\"{ visible: field.minimized || field.shrunk }\\\"> {{field.displayName}} <span ng-if=\\\"field.hideByDefault\\\" class=\\\"hidden-by-default-indicator\\\">Hidden by default</span> </div> </div> <div class=\\\"action-buttons\\\"> <button class=\\\"btn btn-small transparent black-text pl-10 pr-10\\\" type=\\\"button\\\" ng-click=\\\"field.shrunk = !field.shrunk;field.minimized = false; field.displayProperties = false\\\" ng-attr-title=\\\"{{field.shrunk ? 'Expand field' : 'Minimize field'}}\\\"> <i class=\\\"fa-light\\\" ng-class=\\\"{ 'fa-caret-down': field.shrunk, 'fa-caret-up': !field.shrunk }\\\"></i> </button> <button ng-if=\\\"!field.actionButtons.hideDelete\\\" class=\\\"btn btn-small transparent delete-button black-text lighten-2 pl-10 pr-10 mr-20\\\" type=\\\"button\\\" ng-click=\\\"schemaCtrl.removeField($index)\\\" title=\\\"Remove\\\"> <i class=\\\"fa-light fa-trash-can\\\"></i> </button> <button ng-if=\\\"!field.actionButtons.hideSettings\\\" class=\\\"btn btn-small transparent pl-10 pr-10 mr-5\\\" type=\\\"button\\\" ng-class=\\\"{'active': field.displayProperties, 'settings--expanded': field.displayProperties, 'black-text' : !field.displayProperties, 'white-text': field.displayProperties}\\\" ng-click=\\\"toggleSetting()\\\" title=\\\"Configure this field.\\\"> <i class=\\\"fa-light fa-gear\\\"></i> </button> <button ng-if=\\\"(field.type === 'instruction' || field.type === 'attachdocument' || (field.type === 'lookup' && enableHiddenLookupField())) && !showVisibilityToggleInsideConfiguration()\\\" class=\\\"btn btn-small transparent black-text pl-10 pr-10 mr-5\\\" type=\\\"button\\\" ng-class=\\\"{ 'option-enabled': field.displayInCompletedSteps }\\\" ng-click=\\\"field.displayInCompletedSteps = !field.displayInCompletedSteps\\\" title=\\\"Display field in completed step in Runner.\\\"> <i class=\\\"fa-light\\\" ng-class=\\\"{ 'fa-eye-slash': !field.displayInCompletedSteps, 'fa-eye': field.displayInCompletedSteps }\\\"></i> </button> <button ng-if=\\\"field.type === 'image'\\\" class=\\\"btn btn-small transparent black-text pl-10 pr-10 mr-5\\\" type=\\\"button\\\" ng-class=\\\"{ 'option-enabled': !field.disabled }\\\" ng-click=\\\"field.disabled = !field.disabled; field.minimized = field.shrunk = field.disabled && !field.displayProperties\\\" title=\\\"Display logo.\\\"> <i class=\\\"fa-light\\\" ng-class=\\\"{ 'fa-eye-slash': !!field.disabled, 'fa-eye': !field.disabled }\\\"></i> </button> </div> </div> </div> <div class=\\\"row mt-0 mb-5 mr-5 hides-unless-visible\\\" ng-form fg-form-required-filter ng-class=\\\"{ visible: !field.minimized && !field.shrunk }\\\"> <div fg-field=\\\"field\\\" fg-tab-index=\\\"-1\\\" fg-edit-mode=\\\"true\\\" fg-no-validation-summary=\\\"true\\\"></div> </div> <div class=\\\"field-settings hides-unless-visible\\\" ng-class=\\\"{ visible: (field.displayProperties || field.displayProperties === undefined) && !field.minimized && !field.shrunk }\\\"> <div ng-if=\\\"isUsedByDecision()\\\" class=\\\"mb-10\\\"> <i class=\\\"fa-light fa-triangle-exclamation mb-1\\\"></i> <span>This field is used by Decision \\\"{{nameOfDecisionUsingField}}\\\". Changing it may require you to reconfigure the Decision.</span> </div> <div class=\\\"mb-35 field-settings-header\\\">Configuration</div> <div ng-if=\\\"field.type === 'selectlist' && field.hideSearchableToggle !== true\\\" class=\\\"mb-20 field-settings-general-item\\\"> <span>Searchable List</span> <span class=\\\"pl-20 switch\\\"> <label> <input id=\\\"searchable\\\" type=\\\"checkbox\\\" ng-model=\\\"field.searchable\\\" class=\\\"clickable\\\"/> <span class=\\\"lever\\\"></span> </label> </span> </div> <div ng-if=\\\"enableConditionalForms() || (showVisibilityToggleInsideConfiguration() && (field.type === 'instruction' || field.type === 'attachdocument'))\\\" class=\\\"field-settings-sub-heading\\\"> Visibility </div> <div ng-if=\\\"enableConditionalForms()\\\" class=\\\"mb-20 field-settings-general-item\\\"> <span>Hide field by default</span> <i class=\\\"ml-5 fa-light fa-info-circle action-info\\\" title=\\\"Allows you to control the default visibility of the field before the end user starts filling the form\\\"></i> <span class=\\\"switch\\\"> <label> <input id=\\\"required\\\" type=\\\"checkbox\\\" ng-checked=\\\"field.hideByDefault\\\" ng-click=\\\"field.hideByDefault = !field.hideByDefault\\\" class=\\\"clickable\\\"/> <span class=\\\"lever\\\"></span> </label> </span> </div> <div ng-if=\\\"(field.type === 'instruction' || field.type === 'attachdocument' || (field.type === 'lookup' && enableHiddenLookupField())) && showVisibilityToggleInsideConfiguration()\\\"> <div class=\\\"mb-20 field-settings-general-item\\\"> <span>Hide field in completed step</span> <span class=\\\"ml-5\\\" title=\\\"Allows you to control the visibility of the field in step history\\\"> <i class=\\\"fa-light fa-info-circle\\\"></i> </span> <span class=\\\"pl-20 switch\\\"> <label> <input id=\\\"required\\\" type=\\\"checkbox\\\" ng-checked=\\\"!field.displayInCompletedSteps\\\" ng-click=\\\"field.displayInCompletedSteps = !field.displayInCompletedSteps\\\" class=\\\"clickable\\\"/> <span class=\\\"lever\\\"></span> </label> </span> </div> </div> <div ng-if=\\\"showRequiredToggle(field.typeName)\\\" class=\\\"field-settings-sub-heading\\\"> Validation </div> <div ng-class=\\\"{ field_prop: hasCustomValidationOptions }\\\"> <div ng-if=\\\"showRequiredToggle(field.typeName)\\\"> <div class=\\\"field-settings-general\\\"> <div class=\\\"field-settings-general-item\\\"> <span>Required</span> <span class=\\\"pl-20 switch\\\"> <label> <input id=\\\"required\\\" type=\\\"checkbox\\\" ng-model=\\\"field.validation.required\\\" class=\\\"clickable\\\"/> <span class=\\\"lever\\\"></span> </label> </span> </div> </div> </div> <div ng-if=\\\"showIncludeInFormToggle(field.typeName)\\\"> <div class=\\\"flex\\\"> <div class=\\\"switch\\\"> <label> <input id=\\\"chkDisplayInStepForm\\\" class=\\\"clickable\\\" type=\\\"checkbox\\\" ng-model=\\\"field.disabled\\\" ng-true-value=\\\"false\\\" ng-false-value=\\\"true\\\"/> <span class=\\\"lever\\\"></span> </label> </div> <div class=\\\"pt-6\\\">Display {{field.displayName}}</div> </div> </div> <div class=\\\"fg-field-properties-container\\\" fg-edit-canvas-field-properties=\\\"field\\\" all-fields=\\\"schema.fields\\\" node-key=\\\"nodeKey\\\" node-id=\\\"nodeId\\\"></div> </div> <div class=\\\"field_prop\\\" ng-if=\\\"hasCustomValidationOptions\\\"> <span>Custom Validation</span> <span class=\\\"pl-20 switch\\\"> <label> <input id=\\\"required\\\" type=\\\"checkbox\\\" ng-model=\\\"field.customValidation.required\\\" ng-change=\\\"onCustomValidationSwitch(field.customValidation.required)\\\" class=\\\"clickable\\\"/> <span class=\\\"lever\\\"></span> </label> </span> <div ng-if=\\\"field.customValidation && field.customValidation.required\\\"> <div ng-if=\\\"field.type === 'date' || field.type === 'datetime' || field.type ==='number'||field.type ==='currency'\\\"> <div class=\\\"input-field mt-10\\\"> <label>Validation Rule </label> <select class=\\\"browser-default\\\" ng-model=\\\"field.customValidation.rule\\\" id=\\\"{{field.name}}_custom_validator_operator\\\" ng-required=\\\"field.customValidation.required\\\" style=\\\"width:50%\\\" ng-if=\\\"field.type === 'date' || field.type === 'datetime'\\\"> <option value=\\\"1\\\">After</option> <option value=\\\"-1\\\">Before</option> <option value=\\\"0\\\">Equals</option> </select> <select class=\\\"browser-default\\\" ng-model=\\\"field.customValidation.rule\\\" id=\\\"{{field.name}}_custom_validator_operator\\\" ng-required=\\\"field.customValidation.required\\\" style=\\\"width:50%\\\" ng-if=\\\"field.type ==='number'||field.type ==='currency'\\\"> <option value=\\\"1\\\">Greater than</option> <option value=\\\"-1\\\">Less than</option> <option value=\\\"0\\\">Equals</option> </select> </div> <div class=\\\"p-0 m-0 mt-5\\\"> <input id=\\\"{{ field.name }}_custom_validator_value\\\" type=\\\"radio\\\" value=\\\"none\\\" name=\\\"{{ field.name }}_custom_validator_valueOption\\\" ng-checked=\\\"field.customValidation.valueOption === 'none'\\\" ng-model=\\\"field.customValidation.valueOption\\\" ng-change=\\\"clearPreviousOperationData()\\\"/> <label for=\\\"{{ field.name }}_custom_validator_value\\\">Custom Value</label> <input id=\\\"{{ field.name }}_custom_validator_previousValue\\\" type=\\\"radio\\\" value=\\\"previousValue\\\" name=\\\"{{ field.name }}_custom_validator_valueOption\\\" ng-checked=\\\"field.customValidation.valueOption === 'previousValue'\\\" ng-model=\\\"field.customValidation.valueOption\\\" ng-change=\\\"clearPreviousOperationData()\\\"/> <label for=\\\"{{ field.name }}_custom_validator_previousValue\\\">Previous Field Value</label> <input ng-if=\\\"field.type === 'date'\\\" id=\\\"{{ field.name }}_custom_validator_createdDate\\\" type=\\\"radio\\\" value=\\\"createdDate\\\" name=\\\"{{ field.name }}_custom_validator_valueOption\\\" ng-checked=\\\"field.customValidation.valueOption === 'createdDate'\\\" ng-model=\\\"field.customValidation.valueOption\\\" ng-change=\\\"clearPreviousOperationData()\\\"/> <label ng-if=\\\"field.type === 'date'\\\" for=\\\"{{ field.name }}_custom_validator_createdDate\\\">Step Created Date</label> </div> <div class=\\\"mt-10\\\"> <div ng-if=\\\"field.customValidation.valueOption === 'none'\\\"> <input kendo-date-picker ng-model=\\\"field.customValidation.value\\\" style=\\\"width:50%\\\" id=\\\"{{field.name}}_custom_validator_operator_value\\\" ng-required=\\\"field.customValidation.required\\\" placeholder=\\\"DD/MM/YYYY\\\" k-format=\\\"'dd/MM/yyyy'\\\" ng-if=\\\"field.type === 'date'\\\" ng-init=\\\"activateCustomValidation()\\\"/> <input kendo-date-time-picker ng-model=\\\"field.customValidation.value\\\" style=\\\"width:50%\\\" id=\\\"{{field.name}}_custom_validator_operator_value\\\" required placeholder=\\\"DD/MM/YYYY HH:MM:SS AM/PM\\\" k-format=\\\"'dd/MM/yyyy hh:mm:ss tt'\\\" k-parse-formats=\\\"['dd/MM/yyyy hh:mm:ss tt']\\\" k-time-format=\\\"'h:mm tt'\\\" k-interval=\\\"5\\\" ng-if=\\\"field.type === 'datetime'\\\" ng-init=\\\"activateCustomValidation()\\\"/> <input kendo-numeric-text-box ng-model=\\\"field.customValidation.value\\\" style=\\\"width:50%\\\" id=\\\"{{field.name}}_custom_validator_operator_value\\\" ng-required=\\\"field.customValidation.required\\\" ng-if=\\\"field.type === 'number'\\\"/> <input kendo-numeric-text-box ng-model=\\\"field.customValidation.value\\\" style=\\\"width:50%\\\" id=\\\"{{field.name}}_custom_validator_operator_value\\\" ng-required=\\\"field.customValidation.required\\\" k-options=\\\"{ format: 'c', decimals: 2,min:0 }\\\" ng-if=\\\"field.type === 'currency'\\\"/> </div> <div ng-if=\\\"field.customValidation.valueOption === 'previousValue'\\\"> <div class=\\\"input-field mt-10\\\"> <label class=\\\"select-label\\\">Previous Step</label> <select id=\\\"{{ field.name }}_custom_validator_previous_step\\\" class=\\\"browser-default not-clickable\\\" k-value-primitive=\\\"true\\\" k-data-value-field=\\\"'Key'\\\" k-data-text-field=\\\"'Value'\\\" k-ng-model=\\\"field.defaultPreviousStepId\\\" ng-model=\\\"field.customValidation.previousStepId\\\" style=\\\"width:50%\\\" ng-change=\\\"onPreviousStepChange()\\\"></select> </div> <div class=\\\"input-field mt-10 mb-10\\\"> <label class=\\\"select-label\\\">Form Field</label> <select id=\\\"{{ field.name }}_custom_validator_previous_step_field\\\" class=\\\"browser-default not-clickable\\\" k-value-primitive=\\\"true\\\" k-data-value-field=\\\"'name'\\\" k-data-text-field=\\\"'displayName'\\\" k-ng-model=\\\"field.defaultFormFieldId\\\" ng-model=\\\"field.customValidation.formFieldId\\\" ng-change=\\\"onPreviousFieldChange()\\\" style=\\\"width:50%\\\"></select> </div> </div> <div ng-if=\\\"field.customValidation.valueOption === 'createdDate'\\\"> <input kendo-numeric-text-box ng-model=\\\"field.customValidation.stepCreatedDateOffset\\\" style=\\\"width:50%\\\" id=\\\"{{field.name}}_custom_validator_created_date\\\" ng-required=\\\"field.customValidation.required\\\" k-options=\\\"{ format: 'n0'}\\\"/> </div> </div> <div class=\\\"input-field mt-10\\\"> <label>Error Message <span class=\\\"optional\\\"></span> </label> <input type=\\\"text\\\" ng-model=\\\"field.customValidation.errorMessage\\\"/> </div> </div> <div ng-if=\\\"field.type ==='multiselectlist'\\\"> <div class=\\\"mt-10\\\"> <label> How many options must be checked </label> <input kendo-numeric-text-box ng-model=\\\"field.customValidation.value\\\" style=\\\"width:50%\\\" id=\\\"{{field.name}}_custom_validator_operator_value\\\" ng-required=\\\"field.customValidation.required\\\" k-options=\\\"{ format: 'n0',min:1, max:field.options.length }\\\" k-rebind=\\\"field.options.length\\\"/> </div> <div class=\\\"mt-10\\\"> <label>Error Message <span class=\\\"optional\\\"></span></label> <input type=\\\"text\\\" ng-model=\\\"field.customValidation.errorMessage\\\"/> </div> </div> <div ng-if=\\\"field.type === FIELD_TYPE.SHORT_TEXT\\\"> <div class=\\\"mt-10\\\"> <label><b>Maximum Length</b></label> </div> <div class=\\\"mt-10\\\"> Limit short text input to <input kendo-numeric-text-box k-ng-model=\\\"field.customValidation.maxLength\\\" k-options=\\\"{ format: 'n0', min:1, decimals:0}\\\" style=\\\"width:16%\\\" id=\\\"{{field.name}}_custom_validator_maxlength_value\\\"/> characters </div> </div> </div> </div> <div class=\\\"currency_prop\\\" ng-if=\\\"hasCurrencyOptions\\\"> <span>Currency</span> <span class=\\\"switch pl-20\\\"> <label> <input type=\\\"checkbox\\\" ng-change=\\\"toggleCurrency(hasCustomCurrency)\\\" ng-model=\\\"hasCustomCurrency\\\" class=\\\"clickable\\\"/> <span class=\\\"lever\\\"></span> </label> </span> <div class=\\\"currency_prop_container input-field\\\" ng-if=\\\"hasCustomCurrency\\\"> <label class=\\\"mt-10\\\">Currency code</label> <kendo-dropdownlist k-ng-model=\\\"field.customUnits\\\" k-data-source=\\\"currencies\\\" k-value-primitive=\\\"true\\\"> </kendo-dropdownlist> </div> </div> </div> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div ng-if=\\\"!field.options || field.options.length === 0\\\" ng-click=\\\"optionsCtrl.addOption()\\\" class=\\\"alert alert-info\\\"> <h2>No options defined</h2> <p class=\\\"lead\\\">Click here to add a new option definition to this field.</p> </div> <table ng-if=\\\"field.options.length > 0\\\" class=\\\"table table-no-border\\\"> <thead> <tr> <th class=\\\"row-title\\\">Options:</th> <th class=\\\"table-field-options-button\\\"></th> </tr> </thead> <tbody> <tr ng-form=\\\"fieldOptionForm\\\" ng-repeat=\\\"option in field.options\\\" ng-class=\\\"{ 'error': fieldOptionForm.$invalid }\\\"> <td> <input type=\\\"text\\\" ng-model=\\\"option.text\\\" class=\\\"form-control\\\" flowingly-xss-validation/> <p ng-if=\\\"fieldOptionForm && fieldOptionForm.$error.xssValidate\\\" class=\\\"has-error\\\"> This input does not support HTML. </p> </td> <td class=\\\"right-align\\\"> <a href=\\\"\\\" class=\\\"btn btn-small grey pl-10 pr-10\\\" ng-click=\\\"optionsCtrl.removeOption($index)\\\" title=\\\"Remove this option from the list\\\"><i class=\\\"fa-light fa-trash-can\\\"></i></a> </td> </tr> </tbody> </table> <div class=\\\"field-options-add right-align\\\"> <a ng-if=\\\"field.options.length > 0\\\" href=\\\"\\\" class=\\\"btn pl-10 pr-10 mb-10\\\" ng-click=\\\"optionsCtrl.addOption()\\\"> {{ ::optionsCtrl.addButtonText }} </a> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"fg-field-properties\\\"> <div novalidate ng-form=\\\"fieldPropertiesForm\\\"> <div ng-include=\\\"renderInfo.propertiesTemplateUrl\\\"></div> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \" <div ng-if=\\\"fields.displayname\\\"> <div> <div fg-property-field=\\\"displayName\\\" fg-property-field-label=\\\"Display name\\\"> <div ng-if=\\\"field.type === 'instruction'\\\" class=\\\"d-flex align-items-center\\\"> <span>Display Name</span> <span class=\\\"pl-20 switch\\\"> <label> <input type=\\\"checkbox\\\" ng-model=\\\"field.showDisplayName\\\"/> <span class=\\\"lever\\\"></span> </label> </span> </div> <div ng-if=\\\"field.type !== 'instruction' || field.showDisplayName\\\"> <input type=\\\"text\\\" class=\\\"form-control\\\" name=\\\"displayName\\\" ng-model=\\\"field.displayName\\\" required flowingly-xss-validation illegal-character-strip illegal-characters=\\\"{}\\\" ng-model-options=\\\"{ updateOn: 'blur', debounce: { 'default': 500, 'blur': 0 } }\\\"/> </div> </div> </div> </div> <div ng-if=\\\"fields.label\\\"> <div fg-property-field=\\\"label\\\" fg-property-field-label=\\\"Label\\\"> <input type=\\\"text\\\" class=\\\"form-control\\\" name=\\\"label\\\" ng-model=\\\"field.label\\\" flowingly-xss-validation/> </div> </div> <div ng-if=\\\"fields.placeholder || fields.previousfield\\\"> <div>Default Value</div> <div class=\\\"p-0 m-0 mt-5\\\"> <input id=\\\"{{ field.name }}_none\\\" type=\\\"radio\\\" value=\\\"none\\\" ng-model=\\\"field.defaultValueOption\\\" ng-change=\\\"setplaceholder()\\\"/> <label for=\\\"{{ field.name }}_none\\\">None</label> <input id=\\\"{{ field.name }}_placeholderText\\\" type=\\\"radio\\\" value=\\\"placeholderText\\\" ng-show=\\\"showPlaceHolder()\\\" ng-model=\\\"field.defaultValueOption\\\" ng-change=\\\"initialPreviousStep()\\\"/> <label for=\\\"{{ field.name }}_placeholderText\\\" ng-show=\\\"showPlaceHolder()\\\">Placeholder text</label> <input id=\\\"{{ field.name }}_previousValue\\\" type=\\\"radio\\\" value=\\\"previousValue\\\" ng-model=\\\"field.defaultValueOption\\\" ng-change=\\\"initialPreviousStep()\\\"/> <label for=\\\"{{ field.name }}_previousValue\\\">Previous value</label> <input id=\\\"{{ field.name }}_auto-populate\\\" type=\\\"radio\\\" value=\\\"autoPopulate\\\" ng-model=\\\"field.defaultValueOption\\\" ng-if=\\\"field.type === 'date' || field.type==='datetime'\\\"/> <label for=\\\"{{ field.name }}_auto-populate\\\" ng-if=\\\"field.type === 'date' || field.type==='datetime'\\\">Auto-populate date at Run Time </label> </div> <div ng-show=\\\"field.defaultValueOption === 'placeholderText' && field.typeName !== 'Table'\\\" fg-property-field=\\\"fieldPlaceholder\\\" fg-property-field-label=\\\"Placeholder text\\\" class=\\\"mt-10\\\"> <input type=\\\"text\\\" class=\\\"form-control\\\" name=\\\"fieldPlaceholder\\\" ng-model=\\\"field.placeholder\\\" flowingly-xss-validation/> </div> <div ng-show=\\\"field.defaultValueOption === 'previousValue'\\\"> <div class=\\\"input-field mt-10\\\"> <label class=\\\"select-label\\\">Previous Step</label> <select id=\\\"{{ field.name }}_previous_step\\\" class=\\\"browser-default not-clickable\\\" k-value-primitive=\\\"true\\\" k-data-value-field=\\\"'Key'\\\" k-data-text-field=\\\"'Value'\\\" k-ng-model=\\\"field.defaultPreviousStepId\\\" ng-model=\\\"field.defaultPreviousStepId\\\" style=\\\"width:50%\\\" ng-change=\\\"onPreviousStepChange()\\\"></select> </div> <div class=\\\"input-field mt-10 mb-10\\\"> <label class=\\\"select-label\\\">Form Field</label> <select id=\\\"{{ field.name }}_previous_step_field\\\" class=\\\"browser-default not-clickable\\\" k-value-primitive=\\\"true\\\" k-data-value-field=\\\"'name'\\\" k-data-text-field=\\\"'displayName'\\\" k-ng-model=\\\"field.defaultFormFieldId\\\" ng-model=\\\"field.defaultFormFieldId\\\" ng-change=\\\"onPreviousFieldChange()\\\" style=\\\"width:50%\\\"></select> </div> </div> </div> <div ng-if=\\\"fields.tooltip\\\"> <div fg-property-field=\\\"fieldTooltip\\\" fg-property-field-label=\\\"Tooltip\\\"> <input type=\\\"text\\\" class=\\\"form-control\\\" name=\\\"fieldTooltip\\\" ng-model=\\\"field.tooltip\\\" flowingly-xss-validation/> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div ng-if=\\\"field.type.toLowerCase() === 'instruction' && draw\\\"> <div fg-property-field=\\\"fieldValue\\\" fg-property-field-label=\\\"Instruction text\\\"> <div ng-transclude></div> </div> </div> <div ng-if=\\\"field.type.toLowerCase() === 'attachdocument' || field.type.toLowerCase() === 'image'\\\"> <div fg-property-field=\\\"fieldValue\\\"> <div ng-transclude></div> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"form-group fg-property-field\\\" ng-class=\\\"{ 'has-error': fieldPropertiesForm[fieldName].$invalid }\\\"> <label ng-if=\\\"fieldLabel !== 'Instruction text' && (field.type !== 'instruction'|| fieldLabel!=='Display name')\\\" class=\\\"row-title col-sm-5 col-md-4 control-label\\\"> {{ fieldLabel }} </label> <div class=\\\"col-sm-7 col-md-8\\\"> <div ng-transclude></div> <div fg-validation-summary=\\\"{{ fieldName }}\\\"></div> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div ng-form=\\\"valMsgForm\\\"> <div fg-property-field=\\\"message\\\" fg-property-field-label=\\\"Message\\\"> <input type=\\\"text\\\" name=\\\"message\\\" title=\\\"{{ tooltip }}\\\" placeholder=\\\"Optional message\\\" ng-model=\\\"field.validation.messages[validationType]\\\" class=\\\"form-control\\\" flowingly-xss-validation/> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \" <div ng-if=\\\"fields.minlength\\\" class=\\\"fg-property-field-validation\\\"> <div fg-property-field=\\\"minlength\\\" fg-property-field-label=\\\"Minimum length\\\"> <input type=\\\"text\\\" fg-field-redraw fg-input-number title=\\\"The minimum length of characters that should be entered.\\\" name=\\\"minlength\\\" ng-model=\\\"field.validation.minlength\\\" class=\\\"form-control\\\" flowingly-xss-validation/> </div> <div ng-if=\\\"field.validation.minlength >= 1\\\"> <div fg-edit-validation-message=\\\"minlength\\\"></div> </div> </div> <div ng-if=\\\"fields.maxlength\\\" class=\\\"fg-property-field-validation\\\"> <div fg-property-field=\\\"maxlength\\\" fg-property-field-label=\\\"Maximum length\\\"> <input type=\\\"text\\\" fg-field-redraw fg-input-number title=\\\"The maximum length of characters that should be entered.\\\" name=\\\"maxlength\\\" ng-model=\\\"field.validation.maxlength\\\" class=\\\"form-control\\\" flowingly-xss-validation/> </div> <div ng-if=\\\"field.validation.maxlength >= 1\\\"> <div fg-edit-validation-message=\\\"maxlength\\\"></div> </div> </div> <div ng-if=\\\"fields.pattern\\\" class=\\\"fg-property-field-validation\\\"> <div fg-property-field=\\\"pattern\\\" fg-property-field-label=\\\"Pattern\\\"> <div fg-dropdown-input=\\\"patternOptions\\\" name=\\\"pattern\\\" title=\\\"The pattern that should match with the input value.\\\" fg-parse-pattern fg-field-redraw ng-model=\\\"field.validation.pattern\\\"></div> </div> <div ng-if=\\\"field.validation.pattern.length > 0\\\"> <div fg-edit-validation-message=\\\"pattern\\\"></div> </div> </div> <div ng-if=\\\"fields.required\\\" class=\\\"fg-property-field-validation\\\"> <div fg-property-field=\\\"required\\\"> <div class=\\\"checkbox\\\"> <label title=\\\"Indicates if a value is required for this field.\\\"> <input type=\\\"checkbox\\\" ng-model=\\\"field.validation.required\\\"/>Required </label> </div> </div> <div ng-if=\\\"field.validation.required\\\"> <div fg-edit-validation-message=\\\"required\\\"></div> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"flex row fg-edit form-group\\\" ng-form=\\\"$fg\\\"> <div class=\\\"form-edit-canvas flex-column col s10\\\"> <div fg-form fg-edit-canvas fg-no-render=\\\"true\\\"></div> </div> <div class=\\\"form-edit-palette flex-column col s2\\\" ng-form=\\\"$palette\\\" fg-null-form> <div fg-form fg-edit-palette fg-no-render=\\\"true\\\"></div> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<select class=\\\"browser-default\\\" ng-model=\\\"selectedCategory\\\" ng-change=\\\"setCategory(selectedCategory)\\\" ng-show=\\\"showSelect()\\\"> <option value=\\\"\\\">All field types</option> <option ng-repeat=\\\"(name, category) in categories\\\">{{ name }}</option> </select> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"fg-edit-palette\\\"> <div fg-edit-palette-categories data-category=\\\"selectedCategory\\\"></div> <div ng-repeat=\\\"template in templates | filter:templateFilter\\\" class=\\\"fg-field mt-10\\\" dq-draggable=\\\"fg-edit-canvas\\\" dq-drag-begin=\\\"{ source: 'palette', field: template }\\\" dq-drag-disabled=\\\"template.disabled\\\"> <div class=\\\"fg-field-overlay\\\" ng-class=\\\"{'palette-disabled': template.disabled}\\\"> <div class=\\\"row p-0 m-0 ml-10 valign-wrapper\\\"> <div class=\\\"col s-6 m-0 valign palette-text\\\"> <div fg-field-palette=\\\"template\\\" fg-tab-index=\\\"-1\\\" fg-no-validation-summary=\\\"true\\\" fg-edit-mode=\\\"true\\\"></div> </div> <div class=\\\"col s-6 p-10 valign fg-field-icon\\\"> <button class=\\\"btn btn-small green lighten-2\\\" type=\\\"button\\\" ng-click=\\\"addField(template)\\\" title=\\\"Add this field.\\\"> <i class=\\\"fa-light fa-plus\\\"></i> </button> </div> </div> </div> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<span></span> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"pb-20\\\"> <div class=\\\"p-0\\\"> <label class=\\\"select-label row-title\\\" for=\\\"{{ field.$_id }}\\\">{{field.schema.displayName}}</label> <p ng-repeat=\\\"option in field.schema.options\\\" ng-if=\\\"option.enabled !== false\\\"> <input class=\\\"not-clickable\\\" id=\\\"{{ field.$_id }}-{{ $index + 1}}\\\" fg-field-input type=\\\"radio\\\" name=\\\"{{ field.schema.name }}\\\" tabindex=\\\"{{ tabIndex }}\\\" value=\\\"{{ option.value }}\\\" ng-required=\\\"field.schema.validation.required\\\" ng-click=\\\"selectOption(option)\\\" ng-model=\\\"form.data[field.schema.name]\\\"/> <label class=\\\"not-clickable\\\" for=\\\"{{ field.$_id }}-{{ $index + 1}}\\\">{{option.text || option.value}}</label> </p> </div> <div class=\\\"p-0\\\" ng-form=\\\"approveCommentForm\\\"> <p class=\\\"pt-40\\\"> <label class=\\\"select-label row-title\\\" flow-optional-comment=\\\"isCommentRequired\\\"> Comment </label> <textarea class=\\\"form-control not-clickable text-area\\\" name=\\\"approvalComments\\\" fg-field-input ng-model=\\\"form.data['ApproveCommentField']\\\" id=\\\"{{ field.$_id }}-comment\\\" title=\\\"{{ field.schema.tooltip }}\\\" tabindex=\\\"{{ tabIndex }}\\\" ng-required=\\\"isCommentRequired\\\" ng-attr-placeholder=\\\"{{ isCommentRequired == false ? 'Provide an optional comment' : 'You must provide an explanation for rejecting this flow' }}\\\" flowingly-xss-validation></textarea> <span class=\\\"error-msg\\\" ng-show=\\\"approveCommentForm.approvalComments.$error.xssValidate\\\">This input does not support HTML.</span> </p> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div> <fg-attach-document-file-list-readonly field-id=\\\"field.name\\\" node-id=\\\"field.schema.nodeId\\\" form=\\\"form\\\" field=\\\"field\\\"> </fg-attach-document-file-list-readonly> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"fg-checkbox input-field\\\"> <label>{{ field.schema.displayName }}</label> <input class=\\\"not-clickable\\\" fg-field-input id=\\\"{{ field.$_id }}\\\" type=\\\"checkbox\\\" tabindex=\\\"{{ tabIndex }}\\\" ng-model=\\\"form.data[field.schema.name]\\\" ng-init=\\\"form.data[field.schema.name] = (form.data[field.schema.name] == true ) ? true : (field.schema.validation.required == false) ? false : undefined\\\" ng-required=\\\"field.schema.validation.required\\\"/> <label class=\\\"not-clickable fg-checkbox-tick\\\" for=\\\"{{ field.$_id }}\\\"> {{ field.schema.label }} <flow-optional-text is-required=\\\"field.schema.validation.required\\\"></flow-optional-text> </label> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"input-field\\\"> <label for=\\\"{{ field.$_id }}\\\" class=\\\"not-clickable\\\"> {{field.schema.displayName}} <flow-optional-text is-required=\\\"field.schema.validation.required\\\"></flow-optional-text> </label> <input kendo-numeric-text-box class=\\\"not-clickable\\\" id=\\\"{{:: field.$_id }}\\\" fg-disable-submit k-options=\\\"options\\\" fg-field-input title=\\\"{{ field.schema.tooltip }}\\\" tabindex=\\\"{{ tabIndex }}\\\" data-ng-model=\\\"proxyModel\\\" ng-minlength=\\\"{{ field.schema.validation.minlength }}\\\" ng-maxlength=\\\"{{ field.schema.validation.maxlength }}\\\" ng-disabled=\\\"isDisabled(field.schema)\\\" ng-pattern=\\\"field.schema.validation.pattern\\\" style=\\\"width:100%;top:10px\\\" ng-change=\\\"updateActualModel(proxyModel); setModifiedState(field); updateKendoGeneratedInput(field.$_id);\\\" field-type=\\\"{{field.schema.type}}\\\" ng-required=\\\"field.schema.validation.required\\\" custom-input-validation-previous-data=\\\"{{form.previousCustomValidationData}}\\\" custom-input-validation=\\\"{{field.schema.customValidation}}\\\"/> <span id=\\\"{{ field.$_id }}_error\\\" ng-show=\\\"field.state.$error.customInputValidate &&(form.state.$submitted || field.state.modified)\\\" style=\\\"color:red\\\"></span> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"input-field fg-date\\\" ng-init=\\\"ctrl.init(field, form)\\\"> <label class=\\\"not-clickable relative\\\"> {{field.schema.displayName}} <flow-optional-text is-required=\\\"field.schema.validation.required\\\"></flow-optional-text> </label> <div class=\\\"pt-15 datePicker kendo-editor-disabled-parent\\\"> <div class=\\\"kendo-editor-disabled\\\"></div> <span ng-click=\\\"ctrl.showDatePicker()\\\"> <input class=\\\"form-control not-clickable\\\" fg-field-input fg-disable-submit ng-model=\\\"form.data[field.schema.name]\\\" k-ng-model=\\\"ctrl.dateObject\\\" k-options=\\\"ctrl.options\\\" id=\\\"{{ field.$_id }}\\\" tabindex=\\\"{{ tabIndex }}\\\" ng-required=\\\"field.schema.validation.required\\\" ng-change=\\\"setModifiedState(field)\\\" field-type=\\\"{{field.schema.type}}\\\" custom-input-validation=\\\"{{field.schema.customValidation}}\\\" custom-input-validation-previous-data=\\\"{{form.previousCustomValidationData}}\\\" custom-form-data=\\\"{{form.data}}\\\"/> </span> <br/> <span id=\\\"{{ field.$_id }}_error\\\" ng-show=\\\"field.state.$error.customInputValidate &&(form.state.$submitted || field.state.modified)\\\" style=\\\"color:red\\\"></span> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"input-field fg-date-time\\\" ng-init=\\\"ctrl.init(field, form)\\\"> <label class=\\\"not-clickable relative\\\"> {{field.schema.displayName}} <flow-optional-text is-required=\\\"field.schema.validation.required\\\"></flow-optional-text> </label> <div class=\\\"pt-15 datetimePicker kendo-editor-disabled-parent\\\"> <div class=\\\"kendo-editor-disabled\\\"></div> <input class=\\\"form-control\\\" fg-field-input fg-disable-submit ng-model=\\\"form.data[field.schema.name]\\\" k-ng-model=\\\"ctrl.dateObject\\\" k-options=\\\"ctrl.options\\\" id=\\\"{{ field.$_id }}\\\" tabindex=\\\"{{ tabIndex }}\\\" ng-required=\\\"field.schema.validation.required\\\" ng-change=\\\"setModifiedState(field)\\\" ng-pattern=\\\"/^([0-2]?[0-9]|3[0-1])\\\\/(0?[0-9]|1[0-2])\\\\/[0-9]{4} (0?[0-9]|1[0-2]):[0-5]?[0-9]:[0-5]?[0-9] [pa][m]$/i\\\" custom-input-validation=\\\"{{field.schema.customValidation}}\\\" field-type=\\\"{{field.schema.type}}\\\" custom-input-validation-previous-data=\\\"{{form.previousCustomValidationData}}\\\" custom-form-data=\\\"{{form.data}}\\\"/> <br/> <span id=\\\"{{ field.$_id }}_error\\\" ng-show=\\\"field.state.$error.customInputValidate &&(form.state.$submitted || field.state.modified)\\\" style=\\\"color:red\\\"></span> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"not-clickable\\\" fg-field-input fg-dropdown-input=\\\"field.schema.options\\\" title=\\\"{{ field.schema.tooltip }}\\\" id=\\\"{{ field.$_id }}\\\" ng-model=\\\"form.data[field.schema.name]\\\" ng-required=\\\"field.schema.validation.required\\\" tabindex=\\\"{{ tabIndex }}\\\" placeholder=\\\"{{ field.schema.placeholder }}\\\" ng-minlength=\\\"{{ field.schema.validation.minlength }}\\\" ng-maxlength=\\\"{{ field.schema.validation.maxlength }}\\\" ng-pattern=\\\"field.schema.validation.pattern\\\" ng-disabled=\\\"isDisabled(field.schema)\\\"></div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"input-field\\\"> <label for=\\\"{{ field.$_id }}\\\" class=\\\"not-clickable\\\"> {{field.schema.displayName}} <flow-optional-text is-required=\\\"field.schema.validation.required\\\"></flow-optional-text> </label> <input class=\\\"not-clickable mt-10\\\" kendo-masked-text-box fg-field-input fg-disable-submit type=\\\"email\\\" id=\\\"{{ field.$_id }}\\\" title=\\\"{{ field.schema.tooltip }}\\\" tabindex=\\\"{{ tabIndex }}\\\" ng-model=\\\"form.data[field.schema.name]\\\" ng-required=\\\"field.schema.validation.required\\\" ng-disabled=\\\"isDisabled(field.schema)\\\" ng-pattern=\\\"/^[a-zA-Z0-9\\\\-_]+([\\\\.\\\\'+][a-zA-Z0-9\\\\-_]+)*@[a-z0-9]+(\\\\-[a-z0-9]+)*(\\\\.[a-z0-9]+(\\\\-[a-z0-9]+)*)*\\\\.[a-z]{2,24}$/i\\\" placeholder=\\\"{{ field.schema.placeholder }}\\\"/> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div> <div class=\\\"file-upload-field clearfix\\\" ng-class=\\\"{'file-list-invalid' : ctrl.showErrorStyles()}\\\" fg-file-upload fg-file-drag field-name=\\\"{{field.schema.name}}\\\"> <div class=\\\"file-upload-field-left-panel\\\"> <fg-file-list field-id=\\\"field.schema.name\\\" file-upload-required=\\\"field.schema.validation.required\\\" form=\\\"form\\\"> </fg-file-list> </div> <div class=\\\"file-upload-field-right-panel\\\"> <label class=\\\"not-clickable btn fileUpload\\\" for=\\\"{{ field.$_id }}\\\"> Upload File <input class=\\\"not-clickable\\\" fg-field-input id=\\\"{{ field.$_id }}\\\" type=\\\"file\\\" multiple=\\\"multiple\\\" field-name=\\\"{{ field.schema.name }}\\\" ng-model=\\\"form.data[field.schema.name]\\\" fg-file-upload upload-file-onchange tabindex=\\\"{{ tabIndex }}\\\"/> </label> </div> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"input-field\\\"> <label for=\\\"{{ field.$_id }}\\\" class=\\\"not-clickable\\\"> {{field.schema.displayName}} </label> <input kendo-masked-text-box fg-field-input fg-disable-submit type=\\\"text\\\" class=\\\"not-clickable mt-10\\\" id=\\\"{{ field.$_id }}\\\" title=\\\"{{ field.schema.tooltip }}\\\" tabindex=\\\"{{ tabIndex }}\\\" placeholder=\\\"{{ field.schema.placeholder }}\\\" ng-model=\\\"form.data[field.schema.name]\\\" disabled=\\\"disabled\\\"/> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"input-field\\\" ng-hide=\\\"showLogoFields === false || field.schema.displayProperties || field.schema.disabled\\\"> <fg-image file-id=\\\"field.schema.value\\\" alignment=\\\"field.schema.alignment\\\"></fg-image> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div> <div ng-if=\\\"fieldSchema.showDisplayName\\\" class=\\\"input-field\\\"> <label for=\\\"{{ field.$_id }}\\\" class=\\\"not-clickable\\\"> {{ fieldSchema.displayName }} </label> </div> <div class=\\\"instruction-field-wrapper\\\"> <div ng-init=\\\"ctrl.init(field, form)\\\" class=\\\"instruction-field\\\" id=\\\"{{ field.$_id }}\\\" tabindex=\\\"{{ tabIndex }}\\\"> <div class=\\\"p-0 of-h\\\" style=\\\"word-wrap:break-word\\\" data-ng-bind-html=\\\"ctrl.instructionText\\\"></div> </div> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"input-field\\\"> <label for=\\\"{{ field.$_id }}\\\" class=\\\"not-clickable\\\"> {{field.schema.displayName}}<span class=\\\"lookup-field\\\"></span> </label> <input kendo-masked-text-box fg-field-input fg-disable-submit type=\\\"text\\\" class=\\\"not-clickable mt-10\\\" id=\\\"{{ field.$_id }}\\\" title=\\\"{{ field.schema.tooltip }}\\\" tabindex=\\\"{{ tabIndex }}\\\" placeholder=\\\"{{ field.schema.placeholder }}\\\" ng-model=\\\"form.data[field.schema.name]\\\" disabled=\\\"disabled\\\"/> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div ng-init=\\\"ctrl.init(field, form)\\\" class=\\\"input-field fg-multi-select\\\"> <label class=\\\"select-label mt-10\\\"> {{field.schema.displayName}} <flow-optional-text is-required=\\\"field.schema.validation.required\\\"></flow-optional-text> </label> <div class=\\\"checkbox not-clickable\\\" ng-repeat=\\\"option in field.schema.options\\\"> <p> <input type=\\\"checkbox\\\" class=\\\"filled-in not-clickable\\\" fg-field-input ng-click=\\\"ctrl.onChange()\\\" tabindex=\\\"{{ tabIndex }}\\\" name=\\\"{{ field.schema.name}}[{{$index}}]\\\" value=\\\"{{ option.value }}\\\" id=\\\"{{ field.schema.name}}[{{$index}}]\\\" ng-model=\\\"form.data[field.schema.name][option.value]\\\" ng-change=\\\"triggerFieldConditions(field)\\\"/> <label class=\\\"not-clickable\\\" for=\\\"{{ field.schema.name}}[{{$index}}]\\\">{{option.text || option.value}}</label> </p> </div> <div class=\\\"row\\\"> <ul class=\\\"fg-validation-summary help-block\\\"> <li ng-if=\\\"ctrl.field.state.$invalid\\\">{{ctrl.errorMsg}}</li> </ul> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"fg-field-not-in-cache alert alert-error\\\"> <p>No template registered in cache for field type \\\"{{ field.type }}\\\".</p> {{field}} </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div ng-init=\\\"ctrl.init()\\\" class=\\\"input-field\\\"> <label class=\\\"not-clickable\\\"> {{field.schema.displayName}} <flow-optional-text is-required=\\\"field.schema.validation.required\\\"></flow-optional-text> </label> <div> <input class=\\\"not-clickable\\\" fg-disable-submit k-options=\\\"options\\\" fg-field-input ng-pattern=\\\"/^(\\\\-?[0-9]*\\\\.?[0-9]*)$/\\\" type=\\\"number\\\" id=\\\"{{\\n    field.$_id }}\\\" title=\\\"{{ field.schema.tooltip }}\\\" tabindex=\\\"{{ tabIndex }}\\\" ng-model=\\\"form.data[field.schema.name]\\\" ng-minlength=\\\"{{\\n    field.schema.validation.minlength }}\\\" ng-maxlength=\\\"{{\\n    field.schema.validation.maxlength }}\\\" ng-change=\\\"setModifiedState(field)\\\" ng-disabled=\\\"isDisabled(field.schema)\\\" ng-required=\\\"field.schema.validation.required\\\" style=\\\"width:100%;top:10px\\\" custom-input-validation=\\\"{{field.schema.customValidation}}\\\" field-type=\\\"{{field.schema.type}}\\\" custom-input-validation-previous-data=\\\"{{form.previousCustomValidationData}}\\\" placeholder=\\\"{{ field.schema.placeholder }}\\\"> <span id=\\\"{{ field.$_id }}_error\\\" ng-show=\\\"field.state.$error.customInputValidate&&(form.state.$submitted || field.state.modified)\\\" style=\\\"color:red\\\"></span> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"input-field\\\"> <input class=\\\"not-clickable\\\" fg-field-input type=\\\"password\\\" id=\\\"{{ field.$_id }}\\\" title=\\\"{{ field.schema.tooltip }}\\\" tabindex=\\\"{{ tabIndex }}\\\" ng-model=\\\"form.data[field.schema.name]\\\" ng-required=\\\"field.schema.validation.required\\\" ng-disabled=\\\"isDisabled(field.schema)\\\" placeholder=\\\"{{ field.schema.placeholder }}\\\"/> <label for=\\\"{{ field.$_id }}\\\" class=\\\"not-clickable field-label\\\"> {{field.schema.displayName}} <flow-optional-text is-required=\\\"field.schema.validation.required\\\"></flow-optional-text> </label> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"row fg-radio-button-list input-field mt-10\\\"> <label class=\\\"select-label\\\" for=\\\"{{ field.$_id }}\\\"> {{field.schema.displayName}} <flow-optional-text is-required=\\\"field.schema.validation.required\\\"></flow-optional-text> </label> <p ng-repeat=\\\"option in field.schema.options\\\" class=\\\"p-0 m-0 mt-5\\\"> <input class=\\\"not-clickable\\\" id=\\\"{{ field.schema.name }}-{{ $index + 1}}\\\" fg-field-input type=\\\"radio\\\" name=\\\"{{ field.schema.name }}\\\" tabindex=\\\"{{ tabIndex }}\\\" value=\\\"{{ option.value }}\\\" ng-required=\\\"field.schema.validation.required\\\" ng-model=\\\"form.data[field.schema.name]\\\" ng-click=\\\"deselectIfSelected(field, option.value)\\\"/> <label class=\\\"not-clickable\\\" for=\\\"{{ field.schema.name }}-{{ $index + 1}}\\\">{{option.text || option.value}}</label> </p> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"input-field\\\"> <div class=\\\"recaptcha-field-wrapper\\\" class=\\\"col s12 l12\\\"> <div id=\\\"recaptcha-container\\\"></div> <input type=\\\"hidden\\\" id=\\\"{{ field.$_id }}\\\" ng-required=\\\"true\\\" ng-model=\\\"form.data[field.schema.name]\\\" fg-field-input/> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"input-field mt-10\\\"> <label class=\\\"select-label\\\" for=\\\"{{ field.$_id }}\\\"> {{field.schema.displayName}} <flow-optional-text is-required=\\\"field.schema.validation.required\\\"></flow-optional-text> </label> <select kendo-drop-down-list class=\\\"browser-default not-clickable\\\" fg-field-input id=\\\"{{ field.$_id }}\\\" k-options=\\\"options\\\" k-value-primitive=\\\"true\\\" k-data-source=\\\"field.schema.filteredOptions\\\" k-data-value-field=\\\"'value'\\\" k-data-text-field=\\\"'text'\\\" title=\\\"{{ field.schema.tooltip }}\\\" k-ng-model=\\\"form.data[field.schema.name]\\\" ng-model=\\\"form.data[field.schema.name]\\\" ng-required=\\\"field.schema.validation.required\\\" tabindex=\\\"{{ tabIndex }}\\\" style=\\\"width:100%\\\"></select> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"fg-signature-pad\\\"> <div class=\\\"not-clickable input-field mb-10\\\"> <label>{{field.schema.displayName}}</label> <flow-optional-text is-required=\\\"field.schema.validation.required\\\"></flow-optional-text> </div> <div class=\\\"canvas-container\\\"> <canvas id=\\\"signature-pad\\\" class=\\\"signature-pad\\\"></canvas> <i id=\\\"closeButton\\\" class=\\\"clear-button fa-light fa-xmark\\\"></i> <div class=\\\"instruction\\\">Sign Above</div> <input fg-field-input ng-model=\\\"form.data[field.schema.name]\\\" ng-required=\\\"field.schema.validation.required\\\" style=\\\"display:none\\\"/> </div> <canvas id=\\\"signature-pad-temp\\\" style=\\\"visibility:hidden;height:0\\\"></canvas> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<button fg-field-input class=\\\"hide-runner not-clickable waves-effect waves-light btn green\\\" id=\\\"{{ field.$_id }}\\\" type=\\\"submit\\\" tabindex=\\\"{{ tabIndex }}\\\" ng-model=\\\"form.data[field.schema.name]\\\"> {{ field.schema.displayName }} <i class=\\\"fa-light fa-paper-plane\\\"></i> </button> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"hide-modeler\\\" ng-controller=\\\"tableDefaultController as ctrl\\\" ng-init=\\\"ctrl.init(form,field)\\\"> <flow-table-runner form=\\\"form\\\" field=\\\"field\\\" table-title=\\\"field.schema.displayName\\\" table-schema=\\\"field.schema.tableSchema\\\" form-data=\\\"form.data[field.schema.name]\\\" is-required=\\\"field.schema.validation.required\\\" on-form-invalid=\\\"ctrl.onFormInvalid()\\\" on-form-valid=\\\"ctrl.onFormValid()\\\"></flow-table-runner> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div ng-init=\\\"ctrl.init(field, form)\\\" class=\\\"input-field\\\"> <label class=\\\"select-label mt-10\\\"> {{field.schema.displayName}} <flow-optional-text is-required=\\\"field.schema.validation.required\\\"></flow-optional-text> </label> <div class=\\\"checkbox not-clickable\\\" ng-repeat=\\\"option in field.schema.options\\\"> <p> <input type=\\\"checkbox\\\" class=\\\"filled-in not-clickable\\\" fg-field-input ng-click=\\\"ctrl.updateProgress()\\\" tabindex=\\\"{{ tabIndex }}\\\" name=\\\"{{ field.schema.name}}[{{$index}}]\\\" value=\\\"{{ option.value }}\\\" id=\\\"{{ field.schema.name}}[{{$index}}]\\\" ng-model=\\\"form.data[field.schema.name][option.value]\\\" ng-change=\\\"triggerFieldConditions(field)\\\"/> <label class=\\\"not-clickable\\\" for=\\\"{{ field.schema.name}}[{{$index}}]\\\">{{option.text || option.value}}</label> </p> </div> <div class=\\\"row mb-10\\\" ng-show=\\\"field.schema.validation.required\\\"> <div class=\\\"progress small\\\"> <div id=\\\"{{ field.schema.name}}_progress\\\" class=\\\"white-text\\\"></div> </div> <div> <strong>{{ctrl.completedItems}}</strong> out of <strong>{{field.schema.options.length}}</strong> items complete - {{ ctrl.progressTotal }}% </div> </div> <div class=\\\"row\\\"> <ul class=\\\"fg-validation-summary help-block\\\" ng-if=\\\"ctrl.field.state.$invalid && (ctrl.field.state.$$parentForm.$dirty||ctrl.field.state.$$parentForm.$submitted)\\\"> <li>You must complete all task list items to complete this form</li> </ul> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"input-field\\\"> <label for=\\\"{{ field.$_id }}\\\" class=\\\"not-clickable\\\"> {{field.schema.displayName}} <flow-optional-text is-required=\\\"field.schema.validation.required\\\"></flow-optional-text> </label> <input kendo-masked-text-box fg-field-input fg-disable-submit type=\\\"text\\\" class=\\\"not-clickable mt-10\\\" id=\\\"{{ field.$_id }}\\\" title=\\\"{{ field.schema.tooltip }}\\\" tabindex=\\\"{{ tabIndex }}\\\" placeholder=\\\"{{ field.schema.placeholder }}\\\" ng-model=\\\"form.data[field.schema.name]\\\" ng-required=\\\"field.schema.validation.required\\\" flowingly-xss-validation ng-maxlength=\\\"maxLength\\\" ng-trim=\\\"false\\\"/> <div ng-if=\\\"field.schema.customValidation.maxLength > 0\\\" ng-style='{\\\"color\\\":getColor()}'> Characters remaining: {{ getRemainingCount() }} </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"input-field\\\"> <label class=\\\"not-clickable\\\"> {{field.schema.displayName}} <flow-optional-text is-required=\\\"field.schema.validation.required\\\"></flow-optional-text> </label> <div class=\\\"pt-15 kendo-editor-disabled-parent\\\"> <div class=\\\"kendo-editor-disabled\\\"></div> <textarea kendo-editor k-encoded=\\\"false\\\" class=\\\"form-control not-clickable materialize-textarea text-area\\\" data-text-editor=\\\"textarea\\\" fg-field-input fg-placeholder=\\\"field.schema.placeholder\\\" ng-model=\\\"form.data[field.schema.name]\\\" k-ng-model=\\\"form.data[field.schema.name]\\\" k-value-primitive=\\\"false\\\" k-paste-cleanup=\\\"pasteCleanUpOption\\\" id=\\\"{{ field.$_id }}\\\" k-tools=\\\"[\\n                        'formatting',\\n                        'bold',\\n                        'italic',\\n                        'underline',\\n                        'strikethrough',\\n                        'justifyLeft',\\n                        'justifyCenter',\\n                        'justifyRight',\\n                        'insertUnorderedList',\\n                        'insertOrderedList',\\n                        'indent',\\n                        'outdent',\\n                        'createLink',\\n                        'unlink',\\n                        'createTable',\\n                        'tableWizard',\\n                        'addRowAbove',\\n                        'addRowBelow',\\n                        'addColumnLeft',\\n                        'addColumnRight',\\n                        'deleteRow',\\n                        'deleteColumn',\\n                        'mergeCellsHorizontally',\\n                        'mergeCellsVertically',\\n                        'splitCellHorizontally',\\n                        'splitCellVertically',\\n                        'tableAlignLeft',\\n                        'tableAlignCenter',\\n                        'tableAlignRight'\\n                  ]\\\" flowingly-xss-validation tabindex=\\\"{{ tabIndex }}\\\" ng-required=\\\"field.schema.validation.required\\\"></textarea> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, placeholder: true, tooltip: false }\\\"></div> <div fg-property-field-value> <textarea name=\\\"fieldValue\\\" class=\\\"materialize-textarea\\\" ng-model=\\\"field.value\\\"></textarea> </div> <div class=\\\"properties-validation\\\"> <div fg-property-field-validation=\\\"{ required: true}\\\"></div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, tooltip: false }\\\"></div> <div class=\\\"properties-validation\\\"> <div fg-property-field-options></div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: false, displayname: true, tooltip: false }\\\"></div> <div fg-property-field-value> <div class=\\\"file-upload-field clearfix\\\" fg-file-drag attach-document-file-upload on-change-value=\\\"field\\\"> <div class=\\\"file-upload-field-left-panel\\\"> <fg-attach-document-file-list field-id=\\\"field.name\\\" node-id=\\\"nodeId\\\" form=\\\"form\\\"></fg-attach-document-file-list> </div> <div class=\\\"file-upload-field-right-panel\\\"> <label class=\\\"btn fileUpload\\\" for=\\\"{{ field.name + '_config' }}\\\"> Upload File <input type=\\\"file\\\" multiple=\\\"multiple\\\" id=\\\"{{field.name + '_config'}}\\\" attach-document-file-upload upload-file-onchange on-file-uploaded=\\\"$ctrl.onFileUploaded(file)\\\" on-change-value=\\\"field\\\"/> </label> </div> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, placeholder: true, tooltip: false, label: true }\\\"></div> <div fg-property-field=\\\"fieldValue\\\"> <div class=\\\"checkbox\\\"></div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, placeholder: true, tooltip: false }\\\"></div> <div fg-property-field-value> <input fg-input-currency ng-currency currency-symbol=\\\"$\\\" class=\\\"\\\" type=\\\"text\\\" name=\\\"fieldValue\\\" ng-model=\\\"field.value\\\" min=\\\"{{ field.validation.min }}\\\" max=\\\"{{ field.validation.max }}\\\" ng-minlength=\\\"{{ field.validation.minlength }}\\\" ng-maxlength=\\\"{{ field.validation.maxlength }}\\\" ng-pattern=\\\"field.validation.pattern\\\" flowingly-xss-validation/> </div> <div class=\\\"properties-validation\\\"> <div class=\\\"fg-property-field-validation\\\"> <div fg-property-field=\\\"min\\\" fg-property-field-label=\\\"Minimum value\\\"> <input fg-input-currency fg-field-redraw class=\\\"\\\" type=\\\"text\\\" name=\\\"min\\\" title=\\\"The minimum value that should be entered\\\" ng-model=\\\"field.validation.min\\\" flowingly-xss-validation/> </div> <div ng-if=\\\"field.validation.min >= 0\\\"> <div fg-edit-validation-message=\\\"min\\\"></div> </div> </div> <div class=\\\"fg-property-field-validation\\\"> <div fg-property-field=\\\"max\\\" fg-property-field-label=\\\"Maximum value\\\"> <input fg-input-currency fg-field-redraw class=\\\"\\\" type=\\\"text\\\" name=\\\"max\\\" title=\\\"The maximum value that should be entered\\\" ng-model=\\\"field.validation.max\\\" flowingly-xss-validation/> </div> <div ng-if=\\\"field.validation.max >= 0\\\"> <div fg-edit-validation-message=\\\"max\\\"></div> </div> </div> <div fg-property-field-validation=\\\"{ required: true, minlength: true, maxlength: true, pattern: true }\\\"></div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, placeholder: true, tooltip: false }\\\"></div> <div class=\\\"properties-validation\\\"> <div fg-property-field-validation=\\\"{ required: false}\\\"></div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, placeholder: true, tooltip: false }\\\"></div> <div class=\\\"properties-validation\\\"> <div fg-property-field-validation=\\\"{ required: false}\\\"></div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, placeholder: true, tooltip: false }\\\"></div> <div fg-property-field-value> <div fg-field-input fg-dropdown-input=\\\"field.options\\\" ng-model=\\\"field.value\\\" ng-minlength=\\\"{{ field.schema.validation.minlength }}\\\" ng-maxlength=\\\"{{ field.schema.validation.maxlength }}\\\" ng-pattern=\\\"field.schema.validation.pattern\\\"></div> </div> <div class=\\\"properties-validation\\\"> <div fg-property-field-validation=\\\"{ required: true, minlength: true, maxlength: true, pattern: true }\\\"></div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, placeholder: true, tooltip: false}\\\"></div> <div fg-property-field-value> <input type=\\\"email\\\" name=\\\"fieldValue\\\" ng-model=\\\"field.value\\\"/> </div> <div class=\\\"properties-validation\\\"> <div fg-property-field-validation=\\\"{ required: true }\\\"></div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true,  displayname: true, tooltip: false }\\\"></div> <div fg-property-field-value> <input type=\\\"file\\\" name=\\\"fieldValue\\\" ng-model=\\\"field.value\\\"/> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"row\\\"> <div class=\\\"col s6 formula-config-left\\\"> <div fg-property-field-common=\\\"{ fieldname: true, displayname: true, tooltip: false }\\\"></div> <formula-config field=\\\"field\\\" all-fields=\\\"allFields\\\"></formula-config> </div> <div class=\\\"col s6 formula-config-right\\\"> <p class=\\\"field-settings-header\\\">How to?</p> <p> Formula fields can be used to calculate a number or concatenate text based on the input from other form fields in this step. <a href=\\\"{{kbLink}}\\\" ng-if=\\\"kbLink !== undefined\\\" target=\\\"_blank\\\">Learn more</a> </p> <p> The following operations can be used </p><div>= Equals (Required at the start of expression)</div> <div>+ Addition (Concatenates text values)</div> <div>- Subtraction</div> <div>/ Division</div> <div>* Multiplication</div> <p></p> <p> Example </p><div>=Quantity * Price</div> <p></p> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: false, displayname: false, tooltip: false }\\\"></div> <div fg-property-field-value> <fg-image-selector field=\\\"field\\\"></fg-image-selector> <div class=\\\"file-upload-field clearfix\\\" fg-file-drag image-file-upload field=\\\"field\\\"> <div class=\\\"pl-10 pt-12 secondary-text\\\"> <em>Drag and Drop your images here or click the Upload button. Uploaded logos are visible to all users in your business!</em> </div> <label class=\\\"btn fileUpload\\\" for=\\\"{{field.name + '_config'}}\\\"> Upload File <input type=\\\"file\\\" multiple=\\\"multiple\\\" id=\\\"{{field.name + '_config'}}\\\" image-file-upload field=\\\"field\\\" upload-file-onchange on-file-uploaded=\\\"$ctrl.onFileUploaded(file)\\\" on-change-value=\\\"field\\\"/> </label> </div> <div ng-show=\\\"field.value\\\"> <div class=\\\"row-title\\\">Alignment</div> <div class=\\\"flex\\\"> <div title=\\\"Align left\\\" class=\\\"mr-5 pl-10 pr-10 btn btn-small\\\" ng-click=\\\"field.alignment = 'left'\\\" ng-class=\\\"field.alignment === 'left' ? 'blue white-text' : 'transparent black-text'\\\"> <i class=\\\"fa-light fa-align-left\\\"></i> </div> <div title=\\\"Align center\\\" class=\\\"mr-5 pl-10 pr-10 btn btn-small\\\" ng-click=\\\"field.alignment = 'center'\\\" ng-class=\\\"field.alignment === 'center' ? 'blue white-text' : 'transparent black-text'\\\"> <i class=\\\"fa-light fa-align-center\\\"></i> </div> <div title=\\\"Align right\\\" class=\\\"mr-5 pl-10 pr-10 btn btn-small\\\" ng-click=\\\"field.alignment = 'right'\\\" ng-class=\\\"field.alignment === 'right' ? 'blue white-text' : 'transparent black-text'\\\"> <i class=\\\"fa-light fa-align-right\\\"></i> </div> </div> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: false, displayname: true, placeholder: false, tooltip: false }\\\"></div> <div fg-property-field-value> <div class=\\\"mt-20 mb-10\\\">Enter Instruction text</div> <div class=\\\"custom-email-editor instruction-field-editor-ribbon\\\"> <textarea kendo-editor name=\\\"fieldValue\\\" rows=\\\"4\\\" class=\\\"form-control not-clickable materialize-textarea text-area\\\" k-tools=\\\"options\\\" k-ng-model=\\\"field.value\\\" data-text-editor=\\\"instruction\\\" id=\\\"{{field.name}}-textarea\\\">\\n    </textarea> </div> <editor-youtube-dialog></editor-youtube-dialog> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, tooltip: false }\\\"></div> <lookup-config field=\\\"field\\\" all-fields=\\\"allFields\\\" add-look-up-current-actor-option=\\\"true\\\"></lookup-config> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, placeholder: true, tooltip: false }\\\"></div> <div fg-property-field-options=\\\"multiple\\\"></div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, placeholder: true, tooltip: false }\\\"></div> <div fg-property-field-value> <input fg-input-number class=\\\"\\\" type=\\\"text\\\" name=\\\"fieldValue\\\" ng-model=\\\"field.value\\\" min=\\\"{{ field.validation.min }}\\\" max=\\\"{{ field.validation.max }}\\\" ng-minlength=\\\"{{ field.validation.minlength }}\\\" ng-maxlength=\\\"{{ field.validation.maxlength }}\\\" ng-pattern=\\\"field.validation.pattern\\\" flowingly-xss-validation/> </div> <div class=\\\"properties-validation\\\"> <div class=\\\"fg-property-field-validation\\\"> <div fg-property-field=\\\"min\\\" fg-property-field-label=\\\"Minimum value\\\"> <input fg-input-number fg-field-redraw class=\\\"\\\" type=\\\"text\\\" name=\\\"min\\\" title=\\\"The minimum value that should be entered\\\" ng-model=\\\"field.validation.min\\\" flowingly-xss-validation/> </div> <div ng-if=\\\"field.validation.min >= 0\\\"> <div fg-edit-validation-message=\\\"min\\\"></div> </div> </div> <div class=\\\"fg-property-field-validation\\\"> <div fg-property-field=\\\"max\\\" fg-property-field-label=\\\"Maximum value\\\"> <input fg-input-number fg-field-redraw class=\\\"\\\" type=\\\"text\\\" name=\\\"max\\\" title=\\\"The maximum value that should be entered\\\" ng-model=\\\"field.validation.max\\\" flowingly-xss-validation/> </div> <div ng-if=\\\"field.validation.max >= 0\\\"> <div fg-edit-validation-message=\\\"max\\\"></div> </div> </div> <div fg-property-field-validation=\\\"{ required: true, minlength: true, maxlength: true, pattern: true }\\\"></div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, placeholder: true, tooltip: false }\\\"></div> <div fg-property-field-value> <input fg-input-number class=\\\"form-control\\\" type=\\\"password\\\" name=\\\"fieldValue\\\" ng-model=\\\"field.value\\\"/> </div> <div class=\\\"properties-validation\\\"> <div fg-property-field-validation=\\\"{ required: true }\\\"></div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, placeholder: true, tooltip: false }\\\"></div> <div fg-property-field-options></div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: false, placeholder: false, tooltip: false, label: false }\\\"></div> <div fg-property-field-value> <input type=\\\"text\\\" class=\\\"\\\" name=\\\"fieldValue\\\" ng-model=\\\"field.value\\\"/> </div> <div class=\\\"properties-validation\\\"> <div fg-property-field-validation=\\\"{ required: false, minlength: false, maxlength: false, pattern: false }\\\"></div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, placeholder: true, tooltip: false }\\\"></div> <div> <label class=\\\"select-label row-title\\\" for=\\\"{{ field.$_id + '_dataSource' }}\\\"> Data Source </label> <select kendo-drop-down-list class=\\\"browser-default not-clickable\\\" id=\\\"{{ field.$_id + '_dataSource' }}\\\" k-options=\\\"dataSourceOptions\\\" k-value-primitive=\\\"true\\\" k-data-source=\\\"dataSourceOptions\\\" k-data-value-field=\\\"'value'\\\" k-data-text-field=\\\"'text'\\\" k-ng-model=\\\"field.dataSource\\\" ng-model=\\\"field.dataSource\\\" ng-change=\\\"onChangeCallback()\\\" ng-required=\\\"true\\\" style=\\\"width:50%\\\"></select> </div> <customdatabase-config ng-if=\\\"field.dataSource === 'database'\\\" field=\\\"field\\\" all-fields=\\\"allFields\\\"></customdatabase-config> <div ng-if=\\\"field.dataSource === 'manually'\\\" fg-property-field-options></div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, placeholder: false, tooltip: false }\\\"></div> <div class=\\\"properties-validation\\\"> <div fg-property-field-validation=\\\"{ required: true}\\\"></div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, tooltip: false }\\\"></div> <div fg-property-field=\\\"fieldValue\\\"> <button type=\\\"submit\\\" name=\\\"fieldValue\\\" ng-model=\\\"field.value\\\" class=\\\"waves-effect waves-light btn\\\"> {{ field.schema.displayName }} <i class=\\\"fa-light fa-paper-plane\\\"></i> </button> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div id=\\\"tableBuilder\\\" ng-controller=\\\"tablePropertyController as ctrl\\\" ng-init=\\\"ctrl.field = field\\\" ng-form=\\\"tableBuilderForm\\\"> <div><label for=\\\"tableName\\\" class=\\\"row-title\\\">Table Name</label></div> <input ng-model=\\\"field.displayName\\\" illegal-character-strip illegal-characters=\\\"{}\\\" type=\\\"text\\\" id=\\\"tableName\\\" name=\\\"tableName\\\" flowingly-xss-validation/> <p class=\\\"has-error\\\" ng-show=\\\"tableBuilderForm.tableName.$error.xssValidate\\\"> This input does not support HTML. </p> <div fg-property-field-common=\\\"{ fieldname: false, displayname: false, placeholder: false, tooltip: false, previousfield: true }\\\"></div> <flow-table-builder class=\\\"hide-in-runner\\\" ng-show=\\\"ctrl.field.defaultValueOption !== 'previousValue'\\\" on-table-updated=\\\"ctrl.onTableUpdated(table)\\\" table-schema=\\\"ctrl.field.tableSchema\\\" table-name=\\\"ctrl.field.displayName\\\" table-field-name=\\\"ctrl.field.name\\\" all-fields=\\\"allFields\\\"> </flow-table-builder> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, tooltip: false }\\\"></div> <div fg-property-field-options=\\\"multiple\\\"></div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, placeholder: true, tooltip: false }\\\"></div> <div fg-property-field-value> <input type=\\\"text\\\" class=\\\"\\\" name=\\\"fieldValue\\\" ng-model=\\\"field.value\\\"/> </div> <div class=\\\"properties-validation\\\"> <div fg-property-field-validation=\\\"{ required: false, minlength: false, maxlength: false, pattern: false }\\\"></div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div fg-property-field-common=\\\"{ fieldname: true, displayname: true, placeholder: true, tooltip: false }\\\"></div> <div class=\\\"properties-validation\\\"> <div fg-property-field-validation=\\\"{ required: true}\\\"></div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"fg-field-inner\\\" ng-class=\\\"{ 'fg-field-required': fieldSchema.validation.required, 'has-error': form.state[field.name].$invalid }\\\"> <div class=\\\"col s12 l12\\\" input-field ng-if=\\\"field.isVisible && type !=='fileupload' && type !== 'table' && type !== 'attachdocument'\\\"> <div ng-if=\\\"field.isVisible\\\" ng-switch=\\\"type\\\"> <div ng-switch-when=\\\"number\\\"><fg-field-number/></div> <div ng-switch-when=\\\"currency\\\"><fg-field-currency/></div> <div ng-switch-when=\\\"text\\\"><fg-field-text/></div> <div ng-switch-when=\\\"textarea\\\"><fg-field-text-area/></div> <div ng-switch-when=\\\"email\\\"><fg-field-email/></div> <div ng-switch-when=\\\"password\\\"><fg-field-password/></div> <div ng-switch-when=\\\"checkbox\\\"><fg-field-checkbox/></div> <div ng-switch-when=\\\"tasklist\\\"><fg-field-task-list/></div> <div ng-switch-when=\\\"multiselectlist\\\"><fg-field-multiselect-list/></div> <div ng-switch-when=\\\"selectlist\\\"><fg-field-select-list/></div> <div ng-switch-when=\\\"radiobuttonlist\\\"><fg-field-radio-button-list/></div> <div ng-switch-when=\\\"approvalrule\\\"><fg-field-approval-rule/></div> <div ng-switch-when=\\\"approvalcomment\\\"><fg-field-approval-comment/></div> <div ng-switch-when=\\\"submit\\\"><fg-field-submit/></div> <div ng-switch-when=\\\"instruction\\\"><fg-field-instruction/></div> <div ng-switch-when=\\\"date\\\"><fg-field-date/></div> <div ng-switch-when=\\\"datetime\\\"><fg-field-datetime/></div> <div ng-switch-when=\\\"signature\\\"><fg-field-signature/></div> <div ng-switch-when=\\\"dynamicactors\\\"><fg-field-dynamic-actors/></div> <div ng-switch-when=\\\"lookup\\\"><fg-field-lookup/></div> <div ng-switch-when=\\\"formula\\\"><fg-field-formula/></div> <div ng-switch-when=\\\"image\\\"><fg-field-image/></div> <div ng-switch-when=\\\"recaptcha\\\"><fg-field-recaptcha/></div> <div ng-switch-default><fg-field-not-found/></div> </div> <div ng-if=\\\"field.isVisible\\\" fg-validation-summary fg-validation-messages=\\\"fieldSchema.validation.messages\\\" fg-type=\\\"type\\\"></div> </div> <div class=\\\"col s12 l12\\\" ng-if=\\\"type === 'table' && field.isVisible\\\"> <fg-field-table/> </div> <div class=\\\"col s12 l12\\\" ng-if=\\\"type==='fileupload' && field.isVisible\\\"> <div class=\\\"input-field\\\"> <label class=\\\"not-clickable\\\"> {{ fieldSchema.displayName }} <flow-optional-text is-required=\\\"field.schema.validation.required\\\"></flow-optional-text> </label> </div> <div class=\\\"red-text mb-7 dl-not-supported\\\" ng-if=\\\"isMobileApp\\\"> <div><i class=\\\"fa-light fa-sm fa-triangle-exclamation\\\"></i></div> <i>&nbsp;downloading attachments not supported on this device</i> </div> <div fg-field-file-upload file-control-id=\\\"{{field.schema.name}}\\\" file-step-id=\\\"{{field.stepId}}\\\"></div> <div fg-validation-summary fg-validation-messages=\\\"fieldSchema.validation.messages\\\"></div> </div> <div class=\\\"col s12 l12 input-field\\\" ng-if=\\\"type==='attachdocument' && field.isVisible\\\"> <label for=\\\"{{ field.$_id }}\\\" class=\\\"not-clickable\\\"> {{ fieldSchema.displayName }} </label> <div fg-field-attach-document file-control-id=\\\"{{field.schema.name}}\\\" class=\\\"fg-field-attach-document\\\"></div> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"fg-field-inner\\\"> <div class=\\\"col s12 l12\\\"> <p>{{:: fieldSchema.displayName }}</p> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"card m-0 p-0 no-box-shadow\\\"> <div class=\\\"title\\\"> <h4>Are you sure?</h4> <input id=\\\"dontShowMe1\\\" type=\\\"checkbox\\\" ng-model=\\\"dontShowAgain\\\"/> <label for=\\\"dontShowMe1\\\">Dont Show Me Again</label> </div> <div class=\\\"content\\\"> <div class=\\\"row mt-30\\\"> <button class=\\\"btn small green\\\" ng-click=\\\"confirm(dontShowAgain)\\\"> Confirm Deletion </button> <button class=\\\"waves-effect waves-light btn blue-grey lighten-2 small\\\" ng-click=\\\"closeThisDialog()\\\"> Cancel </button> </div> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"flex\\\" ng-style=\\\"{'justify-content': ($ctrl.alignment === 'left' ? 'flex-start' : ($ctrl.alignment === 'right' ? 'flex-end' : 'center')) }\\\"> <img ng-src=\\\"data:{{$ctrl.image.mimeType}};base64, {{$ctrl.image.data}}\\\" alt=\\\"{{$ctrl.image.name}}\\\"/> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div> <div ng-if=\\\"$ctrl.errorMessage\\\" class=\\\"image-selection-info\\\"> <h5>{{$ctrl.errorMessage}}</h5> </div> <div ng-if=\\\"$ctrl.images\\\"> <div ng-if=\\\"$ctrl.images.length === 0\\\" class=\\\"image-selection-info\\\"> <div class=\\\"image-selection-no-images\\\"> <i class=\\\"fa-light fa-circle-info fa-lg\\\"></i> <span>No images available to choose from, begin by uploading one.</span> </div> </div> <div ng-if=\\\"$ctrl.images.length > 0 && $ctrl.selectedImage !== undefined\\\"> <div class=\\\"image-selection-info\\\"> <div> Choose a logo: {{$ctrl.currentImageIndex + 1}} of {{$ctrl.images.length}} </div> </div> <div class=\\\"image-selection-container\\\"> <div ng-click=\\\"$ctrl.changeSelection(-1)\\\" ng-if=\\\"$ctrl.images.length > 1\\\" class=\\\"image-selection-modifier\\\" title=\\\"Previous image\\\"> <i class=\\\"fa-light fa-chevron-left fa-2xl\\\"></i> </div> <div class=\\\"image-selection-wrapper\\\"> <div class=\\\"image-selection\\\" ng-style=\\\"{'justify-content': $ctrl.field.alignment === 'left' ? 'flex-start' : ($ctrl.field.alignment === 'right' ? 'flex-end' : 'center')}\\\"> <div> <img ng-src=\\\"data:{{$ctrl.selectedImage.mimeType}};base64, {{$ctrl.selectedImage.data}}\\\" alt=\\\"Selected Logo\\\"/> <div class=\\\"image-selection-caption\\\"> <div>Selected Logo</div> </div> </div> </div> </div> <div ng-click=\\\"$ctrl.changeSelection(+1)\\\" ng-if=\\\"$ctrl.images.length > 1\\\" class=\\\"image-selection-modifier\\\" title=\\\"Next image\\\"> <i class=\\\"fa-light fa-chevron-right fa-2xl\\\"></i> </div> </div> </div> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div class=\\\"fg-form-fields\\\"> <div class=\\\"no-border\\\"> <div class=\\\"modeler-preview\\\" ng-repeat=\\\"field in form.schema.fields track by field.id\\\"> <div fg-field=\\\"field\\\" class=\\\"form-field-wrapper clearfix\\\"></div> </div> <div ng-if=\\\"showDummyDoneButton\\\"> <button class=\\\"right btn\\\" disabled=\\\"disabled\\\">Submit</button> </div> </div> </div> \";\n// Exports\nexport default code;","// Module\nvar code = \"<div> <ul class=\\\"fg-validation-summary help-block unstyled\\\" ng-if=\\\"field.state.$invalid && (field.state.$dirty || form.state.$submitted)\\\" ng-class=\\\"{'mt-25': (type == 'checkbox' || type =='radiobuttonlist')}\\\"> <li ng-repeat=\\\"(key, error) in field.state.$error\\\" ng-if=\\\"error\\\" fg-bind-expression=\\\"messages[key]\\\"></li> <li ng-if=\\\"field.state && field.state.$error.xssValidate\\\"> This input does not support {{type === 'textarea' ? 'harmful ' : ''}}HTML. </li> </ul> </div> \";\n// Exports\nexport default code;","module.exports = angular;"],"names":["LookupSpecialFields","fg","angular","module","fgConfigProvider","config","showDummyDoneButton","enableDebugInfo","validation","messages","patterns","fields","templates","categories","renderInfo","indexOfTemplate","type","idx","length","debug","value","setShowDummyDoneButton","add","objectTemplate","templateUrl","propertiesTemplateUrl","Error","push","this","category","remove","splice","fieldType","isArray","forEach","undefined","message","typeOrObject","isString","extend","pattern","nameOrObject","name","$get","run","$templateCache","put","require","factory","store","getNamespacedStore","constant","properties","displayName","charAt","toUpperCase","substring","provider","FgField","required","minlength","maxlength","unique","number","min","max","approvalField","typeName","hideInPalette","actionButtons","hideSettings","hideDelete","options","text","attachDocumentField","nolabel","checkboxField","currencyField","dateField","dateTimeField","dropdownListField","searchable","dynamicActorsField","emailField","fileUploadField","formulaField","instructionField","longTextField","lookupField","multiSelectListField","checked","numberField","radioButtonListField","recaptchaField","disabled","disableUniqueName","shrunk","disableMovebuttons","shortTextField","signatureField","tableField","field","None","Url","Domain","Integer","Number","Password","directive","$interpolate","buildWatchExpression","interpolateFn","sb","expressions","ii","expression","exp","match","join","scope","element","attr","watchHandle","oldWatchExpr","cleanWatchHandle","interpolateExpression","$on","$watch","fgBindExpression","addClass","data","watchExpr","$watchCollection","$compile","$document","$timeout","$parse","fgUtils","createInput","$scope","$element","$attrs","closeTimeout","template","$template","$input","find","attributes","prop","a","dropdownToggle","dropdownVisible","cancel","createDropdown","ngModelCtrl","modelGetter","ngModel","modelSetter","assign","setModelValue","viewValue","$formatters","fn","$parsers","pv","$setViewValue","$render","getModelValue","input","rect","getBoundingClientRect","scroll","getScrollOffset","css","left","x","top","y","clientHeight","width","clientWidth","fgDropdownInput","items","priority","restrict","terminal","compile","tElement","tAttrs","ctrls","append","$dropdown","controller","dropdownCompileFn","nullFormCtrl","$addControl","noop","$removeControl","$setValidity","$setDirty","$setPristine","link","$ctrls","form","parentForm","parent","inheritedData","validationToken","isValid","control","call","ctrl","inputValue","transformedInput","parseInt","empty","$isEmpty","test","parseFloat","toString","minValidator","maxValidator","isNumber","fgPlaceholder","$window","fgConfig","uniqueCounter","Math","floor","random","offset","pageYOffset","pageXOffset","de","document","documentElement","scrollLeft","scrollTop","defaultArea","getRenderInfo","getTemplateUrl","formatTemplateUrl","area","templateType","get","getUnique","copyField","copy","findElementsByClass","root","className","recursive","buffer","hasChildNodes","i","children","child","fgToJsonReplacer","key","val","filter","displayHidden","JSON","stringify","$filter","replace","jsonify","prompt","active","item","sort","order","autoActive","activate","transclude","tabs","fgTabsPaneLinkFn","pane","title","fgTabsPane","fgTabsPaneOrder","fgTabsPaneAutoActive","renderAlways","fgTabsPaneRenderAlways","$rootScope","_dragData","getEvent","e","originalEvent","event","stopEvent","cancelBubble","bubbles","error","stopPropagation","preventDefault","dragData","getParentArea","$emit","isAreaMatch","dqUtils","evalBroadcastEvent","args","areaName","$eval","dqDragArea","dqDragAreaName","$event","dqDragProgressBegin","dqDragProgressEnd","trackingEnabled","inbound","dropEffect","doingLeaveDoubleCheck","$body","dragLeaveDoubleCheck","$e","target","contains","dragLeaveForSure","off","dataTransfer","apply","on","dqDragEnter","$apply","result","dqDragOver","dqDrop","dqDragTrack","evalAndBroadcast","eventName","targetArea","cb","bcData","$broadcast","dqDraggable","dqDragTargetArea","dqDragDisabled","dragDrop","dt","effectAllowed","setData","dqDragBegin","dqDragEnd","pubsubService","flowinglyConstants","subscriberId","recaptchaType","formFieldType","RECAPTCHA","draggingFieldIndex","index","dragging","allowedDropAreaIndex","schema","minimizeFields","maximizeFields","unsubscribeAll","dragBeginCanvasField","$_isDragging","getElementById","scrollIntoView","source","dragEndCanvasField","drop","movedToIndex","shrunkFields","schemaCtrl","addField","moveField","publish","querySelector","querySelectorAll","classList","targetIndex","collapseFields","displayProperties","minimized","subscribe","editCtrl","formCtrl","ignoreDirty","el","dragEnter","dragFinished","addEventListener","hideDropArea","$index","showDragArea","workflowStore","workflowService","flowinglyModelUtilityService","currencyService","APP_CONFIG","FIELD_TYPE","nameOfDecisionUsingField","hasCustomValidationOptions","NUMBER","CURRENCY","DATE","DATETIME","MULTISELECT_LIST","SHORT_TEXT","hasCurrencyOptions","onCustomValidationSwitch","isOn","customValidation","maxLength","activateCustomValidation","currencies","getCurrencies","map","c","code","hasCustomCurrency","customUnits","toggleCurrency","initialPreviousStep","nodeDataArray","getNodeDataArray","linkDataArray","getLinkDataArray","previousStepsDataSource","getPreviousNodesDataSourceForDropdown","nodeKey","nodeData","n","nodeStepId","id","Value","Key","valueOption","previousStepId","formFieldId","previousStepFieldsDataSource","f","kendoComboBox","dataSource","dataTextField","dataValueField","clearButton","onPreviousStepChange","previousStep","getNodeById","Card","formElements","currentStepFileds","$parent","otherField","findField","onPreviousFieldChange","clearPreviousOperationData","stepCreatedDateOffset","customValidationIsEnabled","indexOf","rule","attrs","toggleSetting","oldDisplayProperties","onSettingClick","toggleDisabled","showRequiredToggle","some","showExcludeFromCompletedStepsToggle","showIncludeInFormToggle","showVisibilityToggleInsideConfiguration","enableConditionalForms","isUsedByDecision","currentNode","getCurrentNode","decision","node","selectedNodeKey","gateway","fieldId","enableHiddenLookupField","handleValueChange","newValue","oldValue","multiple","newGuid","chunk","s","p","substr","addButtonText","option","$_valueWatchFn","addOption","optIndex","count","removeOption","$observe","fgPropertyFieldOptionsLinkFn","flowinglyKBService","fileService","workflowFieldVariableService","allFields","nodeId","post","$$_invalid","INSTRUCTION","constructVariableDropdown","showAddVariableButton","taskType","PUBLIC_FORM","allStepVariables","getPriorNodesVariables","escapeSpecialChar","editorExecute","setTimeout","restyleCheckBoxes","command","_dialog","targetClasses","selector","linkTarget","removeClass","replaceFileIdsWithImages","then","widget","bind","sender","html","newHtml","processPastedContent","contentDocument","getElementsByTagName","styleTag","body","parentNode","removeChild","style","fontFamily","fontSize","color","editorElements","$","toArray","editor","toggleDropDown","slideToggle","selectVariable","currentTarget","exec","toggleVariableGroup","groupHeader","toggleClass","next","tooltip","onChangeCallback","initializeFieldDataSource","lookupConfig","dbName","displayValue","queryValue","getKbLink","kbLink","dsType","isManualType","dataSourceOptions","dbDataSource","hideSearchableToggle","filters","doc","DOMParser","parseFromString","url","URL","href","window","location","origin","pathname","startsWith","newHref","decodeURIComponent","innerHTML","getFieldsOfTypeFromStep","stepId","step","allFieldsInStep","tableFields","tableCells","transformTableCellToField","getEligibleCellsInFields","concat","toLowerCase","defaultValueOption","defaultPreviousStepId","defaultFormFieldId","matchField","tableSchema","collatedDataSource","stepsWithMatchingFields","showPlaceHolder","visiblePlaceHolder","setplaceholder","placeholder","isFieldChange","fieldname","label","displayname","focus","previousfield","fgPropertyFieldValueLinkFn","draw","oldViewValue","frmCtrl","$viewValue","$_redraw","fgPropertyFieldLinkFn","fieldName","fieldLabel","onTableUpdated","validate","RegExp","fgPropertyFieldValidationLinkFn","patternOptions","patternConfig","fgEditValidationMessageLinkFn","DEFAULT_TOOLTIP","validationType","$location","appConfig","enableFormFieldReCaptcha","hide","model","approvalRuleTemplate","hasApprovalControl","allowProcessMap","enableModelerFlowModelTypeSelection","enableMappingFieldsOnly","getFlowModelType","flowModelType","PROCESS_MAP","ATTACH_DOCUMENT","CHECKBOX","TASK_LIST","includes","removeField","selectedCategory","setCategory","trimmedName","trim","categoryName","showSelect","templateFilter","returnKey","keyCode","which","fgFieldApprovalCommentLinkFn","fgFieldApprovalRuleLinkFn","approveOptionValue","commentRequired","isCommentRequired","selectOption","$recentValue","fgFieldAtttachDocumentFn","controllerAs","$http","$q","sessionService","fgAttachDocumentFileListService","addFile","file","getFile","filepath","when","requestConfig","method","headers","Authorization","getToken","cache","momentService","initialiseFile","user","clearFiles","_f","files","attachDocumentFileIds","generateLink","generateDownloadLink","downloadLink","response","fileData","filename","size","uploadedDate","utc","format","fileId","apiBaseUrl","businessId","fileControlId","getUser","fgFieldCheckboxLinkFn","flowinglyFormulaService","conditionalFormService","fieldService","busyService","self","_form","_field","showDataTypeInValidation","EMAIL","setNotifyFieldOptions","values","tableColumnId","sf","LOOKUP","tempArray","watchVal","userObject","lookupValues","v","notifyFields","getLookupNotifyField","TABLE","parse","matchColumn","filteredOptions","columnOptions","requestPayload","watchFieldName","matchFieldLookup","Searchable","SearchablePageSize","searchableComboPageSize","lookupFiled","previousFieldLookUpConfig","flowModelId","fieldSchema","publicForm","optionsPromise","getFieldOptions","results","addPromise","init","fgFormCtrl","editMode","initForm","initField","initDefaultData","IMAGE","getSetting","$applyAsync","showLogoFields","InitiatorEmail","InitiatorFullName","_fields","Name","Options","emptyFieldsArray","clearTimeout","fieldChangeTimeout","deselectIfSelected","watchField","state","populateNotifyFields","applyFieldConditions","triggerField","cfEnableConditionalRules","refreshUI","triggerFieldConditions","watchFieldValue","parseNumber","configValue","CurrentActorEmail","CurrentActorFullName","islookupPreviousFieldType","uo","matchOption","o","tableCellType","FORMULA","tableDataJson","tableData","cellSchema","row","rows","cells","cell","formulaCell","evaluate","formulaConfig","setModifiedState","changedFiled","modified","$_id","validationTypeName","isVisible","hideByDefault","isHiddenByConditions","storeFieldAddedToUI","registerState","getFieldSchema","setFieldState","$name","fgFieldCurrencyLinkFn","temp","getCurrencyByCode","symbol","split","updateActualModel","proxyValue","toCurrency","runForceInitializationHackFlow4843","initializeProxyModel","isNaN","proxyModel","decimals","v1","updateKendoGeneratedInput","$state","$inputs","_text","$invalid","fgFieldDateLinkFn","getDatePickerElement","getDatePicker","parseFormats","kendoDatePicker","showDatePicker","datePicker","open","fgFieldDatetimeLinkFn","getDatetimePickerElement","getDatetimePicker","timeFormat","interval","kendoDateTimePicker","showDatetimePicker","datetimePicker","fgFieldLinkFn","tabIndex","noValidationSummary","fgFieldCtrl","fgFieldDropdownLinkFn","fgFieldEmailLinkFn","fgFieldFileUploadLinkFn","fgFileListService","browserUtilsService","isAuthRequired","showErrorStyles","getFileListFileCount","isFileRequired","isFileListDirty","$submitted","isMobileApp","isCordovaApp","initialiseFiles","removeFilesForStepField","fileStepId","fgFieldFormulaLinkFn","fgFieldInputLinkFn","validationService","$sce","setInstructionText","instructionText","sanitizeString","trustAsHtml","Instruction","addFileDownloadClickEventListener","rawValue","isNodeFromRunnerProcessMap","fgFieldLookupLinkFn","fgFieldMultiselectListLinkFn","orgFormData","opt","onChange","cnt","chkBox","chd","requireCustomValidation","errorMsg","errorMessage","$valid","fgFieldNotFoundLinkFn","fgFieldNumberLinkFn","disableMouseWheelScrollInNumberField","fgFieldPaletteLinkFn","fgFieldPasswordLinkFn","fgFieldRadioButtonListLinkFn","fgFieldRecaptchaLinkFn","resetRecaptcha","grecaptcha","reset","renderRecaptcha","render","sitekey","recaptchaSiteKey","callback","loadRecaptchaResponse","loadExpiredCallback","recaptchaResponse","getResponse","bindToController","fgFieldSelectListLinkFn","fgForm","currentStepFields","flowFields","updateFilteredOptions","searchValue","schemaName","filteredOptionsList","slice","Text","disableOuterScrolling","scrollHeight","offsetHeight","delta","wheelDelta","detail","optionLabel","dataBound","filtering","setDataSource","refresh","searchablePageSize","searchTerm","penColor","backgroundColor","iElem","canvas","signaturePad","SignaturePad","onEnd","saveSignature","changeSignatureBgColor","sigPad","bgColor","currentSignatureData","toData","tempCanvas","height","sigToSave","fromData","toDataURL","updateSignatureData","fromDataURL","clear","fgFieldSubmitLinkFn","fgFieldTableLinkFn","fgFieldTaskListLinkFn","formData","j","findIndex","updateProgress","completedItems","progressTotal","round","fgFieldTextLinkFn","lodashService","unescape","getRemainingCount","getInputLength","validateCharCount","NaN","getColor","$error","fgFieldTextAreaLinkFn","enablePasteCleanUpOption","msAllFormatting","msConvertLists","msTags","span","keepNewLines","disablePasteCleanUpOption","all","pasteCleanUpOption","disableXssValidation","validatorOptions","xss","req","rules","regForUrl","is","isXssVulnerableString","configureCreateLink","configureTableWizard","insertButton","each","trigger","kendoValidator","proxy","_apply","onFormValid","onFormInvalid","fgAttachDocumentFileListReadonly","isPublicForm","isPublic","isWorkflow","storeForm","registerFileControl","getAttachDocumentsforModeler","getFilesForControl","getAttachDocumentsforRunnerWorkFlows","adList","Type","AttachDocumentElements","DownloadLink","getDownloadLink","FileId","formFieldTypeEnum","attachDocumentElements","fgFileListCtrl","fgAttachDocumentFileList","flowStore","notificationService","ngDialog","getFiles","cleanup","validateFileRequired","removeAll","confirmDelete","removeFile","supressConfirmation","showSuccessToast","openConfirm","showClose","dontShowAgain","setDontShowAgainFlag","reject","showFileRequiredMessage","flowInstanceId","set","touched","_fileControls","doesFileControlExist","removeAllFileControls","controlId","fileList","getFileControl","isDirty","l","isRequired","fc","schema_attachDocuments","fileToRemove","attachDocumentFileUpload","onFileUploaded","onChangeValue","BATCH_SIZE","onFileChange","uploadFiles","filesToUpload","uploadFileBatch","Array","prototype","start","batchSize","promises","uploadAttachDocumentFile","valid","createDownloadLink","Promise","fileError","fgFileDrag","fgFileList","fileUploadRequired","$injector","deletePromise","runnerPublicFormApiService","deleteAnonymousFile","has","guidService","getFilesForStep","getForm","areVisibleFileFieldsValid","removeFileControlsForFlow","removeFileControlsForFlowStep","setFileListInvalid","fileControl","stepGuid","getEmptyGuidIfNullOrEmpty","flowId","invalid","isFieldHidden","isFieldHiddenByConditions","fgFileUpload","formModelId","uploadPromise","runnerPublicFormService","uploadAnonymousFile","uploadFile","fgFileUploadCtrl","component","bindings","alignment","$ctrl","loadedFileId","loadImageData","getFileById","status","image","mimeType","$onInit","$onChanges","imageLimit","imageKey","maxImageDimensionInPixels","from","extension","lastIndexOf","allowedFileTypes","showWarningToast","allowedFileTypesString","reduceImageFile","newFile","eventParams","rejected","setUser","types","reduce","previous","current","SUBSCRIBER_NAME","Date","now","loadImageIds","keepSelection","getBusinessImageIds","ids","images","currentSelectionIndex","currentImageIndex","loadCurrentImageData","selectedImage","$onDestroy","changeSelection","change","newIndex","uploadFileOnchange","onChangeHandler","unbind","dataExpression","previousDataExpression","dataGetter","dataSetter","previousDataGetter","previousDataSetter","previousCustomValidationData","fgFormCompileFn","ngFormCtrl","fgNoRender","_workflowFields","fgFields","fgFormData","fgFormPreviousCustomValidationData","fgIsWorkflow","fgFormFlowId","workflowFields","fgFormLinkFn","renderTemplate","isWorkFlow","_model","displayInCompletedSteps","needScroll","newField","fieldContainer","swapFields","fromIndex","toIndex","fieldLength","movingField","indexChange","currentIndex","fgSchemaLinkFn","fgSchema","fgValidationSummaryLinkFn","validationMessages","ngFormController","changeTick","schemaField","$modelValue","exports"],"sourceRoot":""}