PageSourceSearch

https://app.waiverforever.com/app/198.ecabd3e9653f4e67d773.js

js waiverforever.com collected 2026-10-01 13:09:15 UTC 183,336 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"qs3-webapp@61baa86f"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="04462163-6795-459b-93fa-cb7869a90e0b",e._sentryDebugIdIdentifier="sentry-dbid-04462163-6795-459b-93fa-cb7869a90e0b")}catch(e){}}(),(globalThis.webpackChunkqs3_webapp=globalThis.webpackChunkqs3_webapp||[]).push([[198],{1945(e){e.exports='<div class="field-body"> <div class="field-title"> {{field.title_text}} </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.optional, \'unchecked\': !field.optional}"> <input type="checkbox" ng-model="field.optional"/> <span ng-i18next="This is an optional field"></span> </label> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.renew_field, \'unchecked\': !field.renew_field}"> <input type="checkbox" ng-model="field.renew_field"/> <span ng-i18next="This is a renewable field"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'When request to renew a filled form, a renewable field will be cleared and require to be filled again.\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.locked_field, \'unchecked\': !field.locked_field}"> <input type="checkbox" ng-model="field.locked_field"/> <span ng-i18next="Prevent customer editing"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'Customers cannot change value of this field\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.allow_multiple_line, \'unchecked\': !field.allow_multiple_line}"> <input type="checkbox" ng-model="field.allow_multiple_line"/> <span ng-i18next="Allow multiple lines"></span> </label> </div> <div class="default-title"> <div ng-i18next="Default Value: "></div> <span class="default-title-tip" ng-i18next="Default values are fixed inputs until changed, while placeholders are temporary prompts that disappear when typing begins."></span> <input class="form-control" type="text" ng-model="field.default_value" placeholder=""/> </div> <div class="placeholder-title"> <div ng-i18next="Placeholders:"></div> <span class="placeholder-title-tip" ng-i18next="You can change the placeholders in your preferred language."></span> <input class="form-control" type="text" ng-model="field.placeholder"/> </div> </div> '},3218(e){e.exports='<div class="field-body"> <div class="field-title"> {{field.title_text}} </div> <div class="choice-setting-info"> <svg-icon name="\'info\'"></svg-icon> <span ng-i18next="Edit your choices in below. Add a new choice by adding a new line."></span> </div> <div class="ai-generation-button-container" ng-if="!field.is_price"> <button class="ai-generation-button" ng-click="aiGeneration()"> <img src="/app/static/images/templateBuilder/ai-bot-choice.svg" alt="robot-icon"> <span ng-i18next="AI Generation"></span> </button> </div> <div class="choice" ng-if="!field.is_price"> <div ng-show="aiGenerating" id="choice-ai-generating-mask" class="choice-ai-generating-mask"> <wf-loading loading-text="{{generatingText}}"></wf-loading> <button class="wf-button-secondary-small" ng-i18next="Cancel" ng-click="cancel()"></button> </div> <textarea ng-show="!aiGenerating" id="choice-ai-generating-mask-target" class="form-control no-animate" placeholder="Put your options here" ng-model="field.choices" ng-change="onChoicesChange()" cols="30" rows="10" style="resize:none">\n        </textarea> </div> <choice-with-price-list ng-if="field.is_price" choices="field.choice_list" price-list="field.price_list" on-choice-change="onChoiceChange" on-price-change="onPriceChange" on-add="onAdd" on-remove="onRemove" on-move="onMove" currency="payment.currency"> </choice-with-price-list> <div class="choice-setting-info" ng-if="field.is_price"> <svg-icon name="\'info\'"></svg-icon> <span ng-i18next="The currency will be consistent with your selected integrated payment service provider."></span> </div> <div class="wf-checkbox" ng-if="field.is_price"> <label ng-class="{\'checked\': field.show_price_to_customer, \'unchecked\': !field.show_price_to_customer}"> <input type="checkbox" ng-model="field.show_price_to_customer"/> <span ng-i18next="Show price to customer"></span> </label> </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.optional, \'unchecked\': !field.optional}"> <input type="checkbox" ng-model="field.optional"/> <span ng-i18next="This is an optional field"></span> </label> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.renew_field, \'unchecked\': !field.renew_field}"> <input type="checkbox" ng-model="field.renew_field"/>
1 <span ng-i18next="This is a renewable field"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'When request to renew a filled form, a renewable field will be cleared and require to be filled again.\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.locked_field, \'unchecked\': !field.locked_field}"> <input type="checkbox" ng-model="field.locked_field"/> <span ng-i18next="Prevent customer editing"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'Customers cannot change value of this field\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox"> <label uib-tooltip="{{\'Tips: To create a placeholder option for your dropdown menu, you can set your first choice to be empty.\' | i18next}}" tooltip-placement="top" tooltip-append-to-body="true" ng-class="{\'checked\': field.dropdown_style, \'unchecked\': !field.dropdown_style}"> <input type="checkbox" ng-model="field.dropdown_style"/> <span ng-if="!field.is_price" style="border-bottom:1px dotted #000" ng-i18next="Dropdown style (Doesn\'t support other choice)"></span> <span ng-if="field.is_price" style="border-bottom:1px dotted #000" ng-i18next="Dropdown style"></span> </label> </div> <div class="wf-checkbox" ng-if="!field.is_price"> <label ng-class="{\'checked\': field.allow_other_choice, \'unchecked\': !field.allow_other_choice}"> <input type="checkbox" ng-model="field.allow_other_choice"/> <span ng-i18next="Allow user to add other choice"></span> </label> </div> <label class="default-header"> <span ng-i18next="Default Selected: "></span> </label> <div class="toolbar-header"> <div class="wf-checkbox" ng-repeat="choice in field.choice_list track by $index"> <label ng-class="{\'checked\': field.default_value[$index], \'unchecked\': !field.default_value[$index]}" ng-click="defaultSelected($index)"> <input type="checkbox" ng-model="field.default_value[$index]"/> {{field.choice_list[$index]}} <span ng-if="field.show_price_to_customer"> &nbsp;-&nbsp;{{payment.currency | currencySymbol}}{{(field.price_list[$index] / 100).toFixed(2)}} </span> </label> </div> </div> </div> '},4731(e,t,i){angular.module("waiverforeverApp.templateBuilder").directive("checkboxFieldDetails",["WFTemplateHelper",function(e){return{restrict:"AE",scope:{field:"=",isInternal:"<"},template:i(23812),link:function(t,i){t.$watch("field.default_checked",function(i){t.field&&e.resetField(t.field)}),t.$watch("field.locked_field",function(e){e&&t.field.renew_field&&(t.field.renew_field=!1)}),t.$watch("field.renew_field",function(e){e&&t.field.locked_field&&(t.field.locked_field=!1)})}}}])},5264(e,t,i){angular.module("waiverforeverApp.templateBuilder").directive("signatureFieldDetail
1s",[function(){return{restrict:"AE",scope:{field:"=",isInternal:"<"},template:i(10023),link:function(e,t){}}}])},10023(e){e.exports='<div class="field-body"> <div class="field-title"> {{field.title_text}} </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.optional, \'unchecked\': !field.optional}"> <input type="checkbox" ng-model="field.optional"/> <span ng-i18next="This is an optional field"></span> </label> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label class="disabled checked"> <input type="checkbox" ng-model="field.renew_field" disabled="disabled"/> <span ng-i18next="This is a renewable field"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'When request to renew a filled form, a renewable field will be cleared and require to be filled again.\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.type_to_sign, \'unchecked\': !field.type_to_sign}"> <input type="checkbox" ng-model="field.type_to_sign"/> <span ng-i18next="Allow type to generate signature"></span> </label> </div> </div> '},10284(e){e.exports='<div class="template-title-editing" ng-if="editing"> <input type="text" ng-model="template.doc_title" ng-i18next="[placeholder]Template Title" ng-style="{ width: inputWidth }" ng-blur="toggleEditing()" ng-change="handleChanged()" ng-keydown="handleKeyDown($event)"/> </div> <div class="template-title-static" ng-if="!editing"> <span class="template-title-text" title="{{template.doc_title}}">{{template.doc_title}}</span> <span class="edit-toggle" ng-click="toggleEditing()"></span> </div> '},10378(e){e.exports='<div class="field-body"> <div class="field-title"> {{field.title}} </div> <div class="container-counts"> <label class="count-label"> <span class="hint-text" uib-popover="Default number of fields set to display" popover-trigger="\'mouseenter\'" popover-append-to-body="true"> <span ng-i18next="Default:"></span> </span> <wf-number-input ng-model="field.count"></wf-number-input> </label> <label class="count-label"> <span class="hint-text" uib-popover="Maximum number of fields set can be submitted" popover-trigger="\'mouseenter\'" popover-append-to-body="true" ng-i18next="Maximum allowed:"> </span> <wf-number-input ng-model="field.max_count"></wf-number-input> </label> <label class="count-label"> <span class="hint-text" uib-popover="Minimum number of fields set" popover-trigger="\'mouseenter\'" popover-append-to-body="true" ng-i18next="Minimum allowed:"> </span> <wf-number-input ng-model="field.min_count"></wf-number-input> </label> </div> <div class="wf-checkbox container-checkbox"> <label ng-class="{\'checked\': field.fixed, \'unchecked\': !field.fixed}"> <input type="checkbox" ng-model="field.fixed"/> <span ng-i18next="Don\'t allow user to add or remove fields set"></span> </label> </div> </div> '},10855(e){e.exports='<div class="field-body"> <div class="field-title"> {{consent.title}} </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': videoCheckboxEnabled, \'unchecked\': !videoCheckboxEnabled}"> <input type="checkbox" ng-model="videoCheckboxEnabled"/> <span ng-i18next="Make Customers Watch Videos Before Signing"></span> </label> </div> <div class="video-field-body" ng-if="videoCheckboxEnabled"> <div class="field-label" ng-i18next="Youtube Url:"></div> <div class="field-video-group"> <div ng-repeat="video in consent.youtube_link_list track by $index" class="field-video-item"> <input class="form-control" type="text" ng-value="consent.youtube_link_list[$index]" ng-blur="validateVideoUrl($index, $event)" ng-keydown="validateVideoUrl($index, $event)"/> <div class="field-video-remove" ng-click="removeVideo($index)"></div> </div> <div class="field-control" ng-i18next="Add another video" ng-click="addVideo()"></div> </div> </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': consent.checkboxEnabled, \'unchecked\': !consent.checkboxEnabled}"> <input type="checkbox" ng-model="consent.checkboxEnabled"/> <span ng-i18next="Include an opt-in checkbox"></span> </label> </div> </div> '},14449(e){e.exports='<div class="field-body"> <div class="field-title"> {{field.title_text}} </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.optional, \'unchecked\': !field.optional}"> <input type="checkbox" ng-model="field.optional"/> <span ng-i18next="This is an optional field"></span> </label> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.renew_field, \'unchecked\': !field.renew_field}"> <input type="checkbox" ng-model="field.renew_field"/>
1 <span ng-i18next="This is a renewable field"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'When request to renew a filled form, a renewable field will be cleared and require to be filled again.\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.locked_field, \'unchecked\': !field.locked_field}"> <input type="checkbox" ng-model="field.locked_field"/> <span ng-i18next="Prevent customer editing"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'Customers cannot change value of this field\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="select"> <div class="select-title" ng-i18next="Initial Position: "></div> <select class="form-control initial-select" ng-model="field.initial_position"> <option value="0" ng-i18next="Beginning"></option> <option value="1" ng-i18next="Ending"></option> </select> </div> <div class="default-title"> <div ng-i18next="Default Value:"></div> <span class="default-title-tip" ng-i18next="Default values are fixed inputs until changed, while placeholders are temporary prompts that disappear when typing begins."></span> <input class="form-control" type="text" ng-model="field.default_value" placeholder=""/> </div> <div class="placeholder-title"> <div ng-i18next="Placeholders:"></div> <span class="placeholder-title-tip" ng-i18next="You can change the placeholders in your preferred language."></span> <input class="form-control" type="text" ng-model="field.placeholder"/> </div> </div> '},14765(e){e.exports='<div class="field-body"> <div class="field-title"> {{field.title_text}} </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.optional, \'unchecked\': !field.optional}"> <input type="checkbox" ng-model="field.optional"/> <span ng-i18next="This is an optional field"></span> </label> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.renew_field, \'unchecked\': !field.renew_field}"> <input type="checkbox" ng-model="field.renew_field"/> <span ng-i18next="This is a renewable field"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'When request to renew a filled form, a renewable field will be cleared and require to be filled again.\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.locked_field, \'unchecked\': !field.locked_field}"> <input type="checkbox" ng-model="field.locked_field"/> <span ng-i18next="Prevent customer editing"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'Customers cannot change value of this field\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.show_country, \'unchecked\': !field.show_country}"> <input type="checkbox" ng-model="field.show_country"/> <span ng-i18next="Also collect country"></span> </label> </div> <label class="default-header"><span ng-i18next="Default Values:"></span></label> <div class="toolbar-header"> <span class="default-title-tip" ng-i18next="Default values are fixed inputs until changed, while placeholders are temporary prompts that disappear when typing begins."></span> <div class="default-title"> <div><span ng-i18next="Default First Line:"></span></div> <input class="form-control" type="text" ng-model="field.default_first_line" placeholder=""/> </div> <div class="default-title"> <div><span ng-i18next="Default Second Line:"></span></div> <input class="form-control" type="text" ng-model="field.default_second_line" placeholder=""/> </div> <div class="default-title"> <div><span ng-i18next="Default City:"></span></div> <input class="form-control" type="text" ng-model="field.default_city" placeholder=""/> </div> <div class="default-title"> <div><span ng-i18next="Default State / Province:"></span></div> <input class="form-control" type="text" ng-model="field.default_state" placeholder=""/> </div> <div class="default-title"> <div><span ng-i18next="Default Postcode:"></span></div> <input class="form-control" type="text" ng-model="field.default_zipcode" placeholder=""/> </div> <div class="default-title"> <div><span ng-i18next="Default Country:"></span></div> <input class="form-control" type="text" ng-model="field.default_country" placeholder=""/> </div> </div> <label class="placeholder-header"><span ng-i18next="Default Placeholders: "></span></label> <div class="toolbar-header"> <span class="placeholder-title-tip" ng-i18next="You can change the placeholders in your preferred language."></span> <div class="placeholder-title"> <div><span ng-i18next="First Line Placeholder: "></span></div> <input class="form-control" type="text" ng-model="field.placeholder_first_line"/> </div> <div class="placeholder-title"> <div><span ng-i18next="Second Line Placeholder: "></span></div> <input class="form-control" type="text" ng-model="field.placeholder_second_line"/> </div> <div class="placeholder-title"> <div><span ng-i18next="City Placeholder: "></span></div> <input class="form-control" type="text" ng-model="field.placeholder_city"/> </div> <div class="placeholder-title"> <div><span ng-i18next="State / Province Placeholder: "></span></div> <input class="form-control" type="text" ng-model="field.placeholder_state"/> </div> <div class="placeholder-title"> <div><span ng-i18next="Postcode Placeholder: "></span></div> <input class="form-control" type="text" ng-model="field.placeholder_zipcode"/> </div> <div class="placeholder-title"> <div><span ng-i18next="Country Placeholder: "></span></div> <input class="form-control" type="text" ng-model="field.placeholder_country"/> </div> </div> </div> '},15637(e){e.exports='<div class="modal-container"> <h2 class="title" ng-i18next="Generate new content"></h2> <div class="input-container"> <p class="input-info" ng-i18next="Add a description or directly generate with AI"></p> <textarea ng-model="vm.textInput" class="text-input" placeholder="{{vm.placeholderText}}"></textarea> </div> <button ng-click="vm.generate()" class="wf-button generate-button" ng-i18next="Generate"></button> </div> <span class="close-button" ng-click="vm.close()"> <img ng-src="/app/static/images/templateBuilder/modal-close-btn-translucent.svg" alt="Close button"/> </span> '},19921(e){e.exports='<div class="field-body"> <div class="field-title"> {{field.title_text}} </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.optional, \'unchecked\': !field.optional}"> <input type="checkbox" ng-model="field.optional"/> <span ng-i18next="This is an optional field"></span> </label> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.renew_field, \'unchecked\': !field.renew_field}"> <input type="checkbox" ng-model="field.renew_field"/>
1 <span ng-i18next="This is a renewable field"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'When request to renew a filled form, a renewable field will be cleared and require to be filled again.\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.locked_field, \'unchecked\': !field.locked_field}"> <input type="checkbox" ng-model="field.locked_field"/> <span ng-i18next="Prevent customer editing"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'Customers cannot change value of this field\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="select"> <div class="select-title" ng-i18next="Format: "></div> <select class="form-control" ng-model="field.format"> <option value="0">MM/DD/YYYY</option> <option value="1">YYYY/MM/DD</option> <option value="2">DD/MM/YYYY</option> </select> </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.validate_age, \'unchecked\': !field.validate_age}"> <input type="checkbox" ng-model="field.validate_age"/> <span ng-i18next="Validate date of birth"></span> </label> </div> <div ng-if="field.validate_age" class="age-steppers"> <label class="age-label"> <span class="age-text" ng-i18next="Min age:"></span> <wf-number-input ng-model="field.min_age"></wf-number-input> </label> <label class="age-label"> <span class="age-text" ng-i18next="Max age:"></span> <wf-number-input ng-model="field.max_age"></wf-number-input> </label> </div> <div class="date-rule-group"> <div class="date-rule-title"> <span ng-i18next="Default date"></span> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip-html="defaultDateTooltip" tooltip-placement="right"> </i> </div> <div class="btn-group date-rule-modes"> <button type="button" class="btn btn-default" ng-class="{active: field.default_rule_mode === \'specific\'}" ng-click="setRuleMode(\'default\', \'specific\')" ng-i18next="Specific"></button> <button type="button" class="btn btn-default" ng-class="{active: field.default_rule_mode === \'current\'}" ng-click="setRuleMode(\'default\', \'current\')" ng-i18next="Current"></button> <button type="button" class="btn btn-default" ng-class="{active: field.default_rule_mode === \'past\'}" ng-click="setRuleMode(\'default\', \'past\')" ng-i18next="Past"></button> <button type="button" class="btn btn-default" ng-class="{active: field.default_rule_mode === \'future\'}" ng-click="setRuleMode(\'default\', \'future\')" ng-i18next="Future"></button> </div> <div class="initial-date default-date" ng-if="isSpecificMode(\'default\')"> <input disabled="disabled" class="form-control" type="text" ng-value="formatDate(ruleMeta.default.date)"> <button type="button" class="btn btn-default" ng-click="ruleMeta.default.opened = !ruleMeta.default.opened" uib-datepicker-popup ng-model="ruleMeta.default.date" is-open="ruleMeta.default.opened" datepicker-options="ruleDatePickerOptions.default" ng-change="onRuleDateChanged(\'default\')"> <i class="fa fa-calendar" aria-hidden="true"></i> </button> </div> <div class="date-offset-input" ng-if="isOffsetMode(\'default\')"> <input class="form-control" type="number" min="0" step="1" ng-model="field.default_rule_offset_days" ng-change="normalizeOffset(\'default\')"> <span class="date-offset-unit">d</span> </div> </div> <div class="wf-checkbox date-rule-toggle"> <label ng-class="{\'checked\': field.enable_start_rule, \'unchecked\': !field.enable_start_rule}"> <input type="checkbox" ng-model="field.enable_start_rule" ng-change="onRuleEnabledChanged(\'start\')"/> <span ng-i18next="Start date"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip-html="startDateTooltip" tooltip-placement="right"> </i> </div> <div class="date-rule-group" ng-if="field.enable_start_rule"> <div class="btn-group date-rule-modes"> <button type="button" class="btn btn-default" ng-class="{active: field.start_rule_mode === \'specific\'}" ng-click="setRuleMode(\'start\', \'specific\')" ng-i18next="Specific"></button> <button type="button" class="btn btn-default" ng-class="{active: field.start_rule_mode === \'current\'}" ng-click="setRuleMode(\'start\', \'current\')" ng-i18next="Current"></button> <button type="button" class="btn btn-default" ng-class="{active: field.start_rule_mode === \'past\'}" ng-click="setRuleMode(\'start\', \'past\')" ng-i18next="Past"></button> <button type="button" class="btn btn-default" ng-class="{active: field.start_rule_mode === \'future\'}" ng-click="setRuleMode(\'start\', \'future\')" ng-i18next="Future"></button> </div> <div class="initial-date default-date" ng-if="isSpecificMode(\'start\')"> <input disabled="disabled" class="form-control" type="text" ng-value="formatDate(ruleMeta.start.date)"> <button type="button" class="btn btn-default" ng-click="ruleMeta.start.opened = !ruleMeta.start.opened" uib-datepicker-popup ng-model="ruleMeta.start.date" is-open="ruleMeta.start.opened" datepicker-options="ruleDatePickerOptions.start" ng-change="onRuleDateChanged(\'start\')"> <i class="fa fa-calendar" aria-hidden="true"></i> </button> </div> <div class="date-offset-input" ng-if="isOffsetMode(\'start\')"> <input class="form-control" type="number" min="0" step="1" ng-model="field.start_rule_offset_days" ng-change="normalizeOffset(\'start\')"> <span class="date-offset-unit">d</span> </div> </div> <div class="wf-checkbox date-rule-toggle"> <label ng-class="{\'checked\': field.enable_end_rule, \'unchecked\': !field.enable_end_rule}"> <input type="checkbox" ng-model="field.enable_end_rule" ng-change="onRuleEnabledChanged(\'end\')"/> <span ng-i18next="End date"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip-html="endDateTooltip" tooltip-placement="right"> </i> </div> <div class="date-rule-group" ng-if="field.enable_end_rule"> <div class="btn-group date-rule-modes"> <button type="button" class="btn btn-default" ng-class="{active: field.end_rule_mode === \'specific\'}" ng-click="setRuleMode(\'end\', \'specific\')" ng-i18next="Specific"></button> <button type="button" class="btn btn-default" ng-class="{active: field.end_rule_mode === \'current\'}" ng-click="setRuleMode(\'end\', \'current\')" ng-i18next="Current"></button> <button type="button" class="btn btn-default" ng-class="{active: field.end_rule_mode === \'past\'}" ng-click="setRuleMode(\'end\', \'past\')" ng-i18next="Past"></button> <button type="button" class="btn btn-default" ng-class="{active: field.end_rule_mode === \'future\'}" ng-click="setRuleMode(\'end\', \'future\')" ng-i18next="Future"></button> </div> <div class="initial-date default-date" ng-if="isSpecificMode(\'end\')"> <input disabled="disabled" class="form-control" type="text" ng-value="formatDate(ruleMeta.end.date)"> <button type="button" class="btn btn-default" ng-click="ruleMeta.end.opened = !ruleMeta.end.opened" uib-datepicker-popup ng-model="ruleMeta.end.date" is-open="ruleMeta.end.opened" datepicker-options="ruleDatePickerOptions.end" ng-change="onRuleDateChanged(\'end\')"> <i class="fa fa-calendar" aria-hidden="true"></i> </button> </div> <div class="date-offset-input" ng-if="isOffsetMode(\'end\')"> <input class="form-control" type="number" min="0" step="1" ng-model="field.end_rule_offset_days" ng-change="normalizeOffset(\'end\')"> <span class="date-offset-unit">d</span> </div> </div> </div> '},20086(e,t,i){"use strict";function n(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.marketplace||"global",i=e.language||"en";if("china"===t)return"zh_cn";if("global"===t){return{en:"en_us",es:"es"}[i]||"en_us"}return"en_us"}i.d(t,{A:()=>n})},23812(e){e.exports='<div class="field-body"> <div class="field-title"> {{field.title_text}} </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.default_checked, \'unchecked\': !field.default_checked}"> <input type="checkbox" ng-model="field.default_checked"/> <span ng-i18next="Check by default"></span> </label> </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.optional, \'unchecked\': !field.optional}"> <input type="checkbox" ng-model="field.optional"/> <span ng-i18next="This is an optional field"></span> </label> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.renew_field, \'unchecked\': !field.renew_field}"> <input type="checkbox" ng-model="field.renew_field"/>
1 <span ng-i18next="This is a renewable field"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'When request to renew a filled form, a renewable field will be cleared and require to be filled again.\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.locked_field, \'unchecked\': !field.locked_field}"> <input type="checkbox" ng-model="field.locked_field"/> <span ng-i18next="Prevent customer editing"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'Customers cannot change value of this field\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.email_subscription, \'unchecked\': !field.email_subscription}"> <input type="checkbox" ng-model="field.email_subscription"/> <span ng-i18next="Use this as an email opt-in filter"></span> </label> </div> </div> '},24073(e){e.exports='<div class="modal-container"> <h2 class="title" ng-i18next="Write with AI"></h2> <div class="button-row"> <div class="option-button" ng-click="vm.expand()"> <img ng-src="/app/static/images/templateBuilder/ai-expand-original.svg"/> <div class="option-name" ng-i18next="Expand the original content"></div> </div> <div class="option-button" ng-click="vm.replace()"> <img ng-src="/app/static/images/templateBuilder/ai-generate-new.svg"/> <div class="option-name" ng-i18next="Generate new content"></div> </div> </div> </div> <span class="close-button" ng-click="vm.close()"> <img ng-src="/app/static/images/templateBuilder/modal-close-btn-translucent.svg" alt="Close button"/> </span> '},26518(e,t,i){angular.module("waiverforeverApp.templateBuilder").directive("initialFieldDetails",[function(){return{restrict:"AE",scope:{field:"=",isInternal:"<"},template:i(14449),link:function(e,t){e.$watch("field.default_value",function(t){var i=e.field;i&&(i.initial_text=i.default_value?i.default_value.trim():"")}),e.$watch("field.locked_field",function(t){t&&e.field.renew_field&&(e.field.renew_field=!1)}),e.$watch("field.renew_field",function(t){t&&e.field.locked_field&&(e.field.locked_field=!1)})}}}])},29499(e){e.exports='<div class="template-field-edit-view"> <div ng-switch="ngModel.type" class="waiver-field"> <div ng-switch-when="name_field" class="name-field"> <div class="field-title"> <input class="field-title-text-input" ng-model="ngModel.title_text"/> </div> <div class="field-hint hint-ai-generating-mask-target" ng-show="!aiGenerating"> <textarea class="field-hint-text-input" ng-model="ngModel.hint_text" ng-i18next="[placeholder]Hint" maxlength="1000" ng-change="onHintChange()">\n                </textarea> <button class="field-hint-ai-button wf-info clickable" ng-click="generateHint()" uib-popover="{{aiGenerationText}}" popover-trigger="\'mouseenter\'" popover-placement="top-right"> <div class="robot-icon"/> </button> </div> <div ng-show="aiGenerating" class="hint-ai-generating-mask"> <div class="spacer"></div> <wf-loading loading-text="{{generatingText}}"></wf-loading> <button class="ai-generation-cancel wf-button-secondary-small" ng-click="cancel()">Cancel</button> </div> <div class="input-fields placeholder-input" ng-switch="ngModel.format"> <div ng-switch-when="0"> <input type="text" ng-i18next="[placeholder]First Name" ng-model="ngModel.placeholder_first_name"/> <input ng-if="ngModel.show_middle_name" type="text" placeholder="Middle Name" ng-model="ngModel.placeholder_middle_name"/> <input type="text" ng-i18next="[placeholder]Last Name" ng-model="ngModel.placeholder_last_name"/> </div> <div ng-switch-when="1"> <input type="text" ng-i18next="[placeholder]Last Name" ng-model="ngModel.placeholder_last_name"/> <input ng-if="ngModel.show_middle_name" type="text" placeholder="Middle Name" ng-model="ngModel.placeholder_middle_name"/> <input type="text" ng-i18next="[placeholder]First Name" ng-model="ngModel.placeholder_first_name"/> </div> <div ng-switch-when="2"> <input type="text" ng-i18next="[placeholder]Full Name" ng-model="ngModel.placeholder_full_name" class="line-2x"/> </div> <div ng-switch-default> <input type="text" ng-i18next="[placeholder]First Name" ng-model="ngModel.placeholder_first_name"/> <input ng-if="ngModel.show_middle_name" type="text" ng-i18next="[placeholder]Middle Name" ng-model="ngModel.placeholder_middle_name"/> <input type="text" ng-i18next="[placeholder]Last Name" ng-model="ngModel.placeholder_last_name"/> </div> </div> </div> <div ng-switch-when="address_field" class="address-field"> <div class="field-title"> <input class="field-title-text-input" ng-model="ngModel.title_text"/> </div> <div class="field-hint hint-ai-generating-mask-target" ng-show="!aiGenerating"> <textarea class="field-hint-text-input" ng-model="ngModel.hint_text" ng-i18next="[placeholder]Hint" maxlength="1000" ng-change="onHintChange()"></textarea> <button class="field-hint-ai-button wf-info clickable" ng-click="generateHint()" uib-popover="{{aiGenerationText}}" popover-trigger="\'mouseenter\'" popover-placement="top-right"> <div class="robot-icon"/> </button> </div> <div ng-show="aiGenerating" class="hint-ai-generating-mask"> <div class="spacer"></div> <wf-loading loading-text="{{generatingText}}"></wf-loading> <button class="ai-generation-cancel wf-button-secondary-small" ng-click="cancel()">Cancel</button> </div> <div class="input-fields placeholder-input"> <input type="text" class="line-3x" ng-i18next="[placeholder]First Line" ng-model="ngModel.placeholder_first_line"/> <br/> <input type="text" class="line-3x" ng-i18next="[placeholder]Second Line" ng-model="ngModel.placeholder_second_line"/> <br/> <input type="text" ng-i18next="[placeholder]City" ng-model="ngModel.placeholder_city"/> <input type="text" ng-i18next="[placeholder]Province / State" ng-model="ngModel.placeholder_state"/> <input type="text" ng-i18next="[placeholder]Postcode" ng-model="ngModel.placeholder_zipcode"/> <div ng-if="ngModel.show_country"> <input type="text" class="line-3x" ng-i18next="[placeholder]Country" ng-model="ngModel.placeholder_country"/> </div> </div> </div> <div ng-switch-when="email_field" class="email-field"> <div class="field-title"> <input class="field-title-text-input" ng-model="ngModel.title_text"/> </div> <div class="field-hint hint-ai-generating-mask-target" ng-show="!aiGenerating"> <textarea class="field-hint-text-input" ng-model="ngModel.hint_text" ng-i18next="[placeholder]Hint" maxlength="1000" ng-change="onHintChange()"></textarea> <button class="field-hint-ai-button wf-info clickable" ng-click="generateHint()" uib-popover="{{aiGenerationText}}" popover-trigger="\'mouseenter\'" popover-placement="top-right"> <div class="robot-icon"/> </button> </div> <div ng-show="aiGenerating" class="hint-ai-generating-mask"> <div class="spacer"></div> <wf-loading loading-text="{{generatingText}}"></wf-loading> <button class="ai-generation-cancel wf-button-secondary-small" ng-click="cancel()">Cancel</button> </div> <div class="input-fields placeholder-input"> <input type="text" class="line-2x" ng-i18next="[placeholder]Your Email" ng-model="ngModel.placeholder"/> </div> </div> <div ng-switch-when="age_field" class="age-field"> <div class="field-title"> <input class="field-title-text-input" ng-model="ngModel.title_text"/> </div> <div class="field-hint hint-ai-generating-mask-target" ng-show="!aiGenerating"> <textarea class="field-hint-text-input" ng-model="ngModel.hint_text" ng-i18next="[placeholder]Hint" maxlength="1000" ng-change="onHintChange()"></textarea> <button class="field-hint-ai-button wf-info clickable" ng-click="generateHint()" uib-popover="{{aiGenerationText}}" popover-trigger="\'mouseenter\'" popover-placement="top-right"> <div class="robot-icon"/> </button> </div> <div ng-show="aiGenerating" class="hint-ai-generating-mask"> <div class="spacer"></div> <wf-loading loading-text="{{generatingText}}"></wf-loading> <button class="ai-generation-cancel wf-button-secondary-small" ng-click="cancel()">Cancel</button> </div> <div class="input-fields placeholder-input"> <input type="text" ng-i18next="[placeholder]Your Age" ng-model="ngModel.placeholder"/> </div> </div> <div ng-switch-when="phone_field" class="phone-field" ng-class="{\'country-code-enabled\': ngModel.show_country_code}"> <div class="field-title"> <input class="field-title-text-input" ng-model="ngModel.title_text"/> </div> <div class="field-hint hint-ai-generating-mask-target" ng-show="!aiGenerating"> <textarea class="field-hint-text-input" ng-model="ngModel.hint_text" ng-i18next="[placeholder]Hint" maxlength="1000" ng-change="onHintChange()"></textarea> <button class="field-hint-ai-button wf-info clickable" ng-click="generateHint()" uib-popover="{{aiGenerationText}}" popover-trigger="\'mouseenter\'" popover-placement="top-right"> <div class="robot-icon"/> </button> </div> <div ng-show="aiGenerating" class="hint-ai-generating-mask"> <div class="spacer"></div> <wf-loading loading-text="{{generatingText}}"></wf-loading> <button class="ai-generation-cancel wf-button-secondary-small" ng-click="cancel()">Cancel</button> </div> <div class="input-fields placeholder-input"> <input ng-if="!ngModel.validate_phone_number" type="text" class="line-2x" ng-i18next="[placeholder]Phone Number" ng-model="ngModel.placeholder"/> <input ng-if="ngModel.validate_phone_number" type="text" class="line-2x" ng-i18next="[placeholder]Phone Number" ng-model="ngModel.placeholder" country-code="ngModel.country_code"/> <div class="current-country-code" ng-if="ngModel.show_country_code" ng-class="{\'has-dropdown\': ngModel.enable_custom_country_code}"> +{{getCurrentCountryCode()}} </div> </div> </div> <div ng-switch-when="short_answer_field" class="short-answer-field"> <div class="field-title"> <input class="field-title-text-input" ng-model="ngModel.title_text" ng-change="touchField()"/> </div> <div class="field-hint hint-ai-generating-mask-target" ng-show="!aiGenerating"> <textarea class="field-hint-text-input" ng-model="ngModel.hint_text" ng-i18next="[placeholder]Hint" maxlength="1000" ng-change="onHintChange()"></textarea> <button class="field-hint-ai-button wf-info clickable" ng-click="generateHint()" uib-popover="{{aiGenerationText}}" popover-trigger="\'mouseenter\'" popover-placement="top-right"> <div class="robot-icon"/> </button> </div> <div ng-show="aiGenerating" class="hint-ai-generating-mask"> <div class="spacer"></div> <wf-loading loading-text="{{generatingText}}"></wf-loading> <button class="ai-generation-cancel wf-button-secondary-small" ng-click="cancel()">Cancel</button> </div> <div class="input-fields placeholder-input"> <div ng-if="!ngModel.allow_multiple_line"> <span ng-if="ngModel.prefix_text.length > 0">{{ ngModel.prefix_text }}</span> <input type="text" class="line-2x" ng-model="ngModel.placeholder" ng-change="touchField()"/> <span ng-if="ngModel.suffix_text.length > 0">{{ ngModel.suffix_text }}</span> </div> <textarea ng-if="ngModel.allow_multiple_line" class="line-2x" ng-model="ngModel.placeholder" ng-change="touchField()"></textarea> </div> </div> <div ng-switch-when="date_field" class="date-field"> <div class="field-title"> <input class="field-title-text-input" ng-model="ngModel.title_text"/> </div> <div class="field-hint hint-ai-generating-mask-target" ng-show="!aiGenerating"> <textarea class="field-hint-text-input" ng-model="ngModel.hint_text" ng-i18next="[placeholder]Hint" maxlength="1000" ng-change="onHintChange()"></textarea> <button class="field-hint-ai-button wf-info clickable" ng-click="generateHint()" uib-popover="{{aiGenerationText}}" popover-trigger="\'mouseenter\'" popover-placement="top-right"> <div class="robot-icon"/> </button> </div> <div ng-show="aiGenerating" class="hint-ai-generating-mask"> <div class="spacer"></div> <wf-loading loading-text="{{generatingText}}"></wf-loading> <button class="ai-generation-cancel wf-button-secondary-small" ng-click="cancel()">Cancel</button> </div> <div class="input-fields" ng-switch="ngModel.format"> <span ng-switch-when="0"> <input disabled="disabled" type="text" ng-i18next="[placeholder]MM"/> / <input disabled="disabled" type="text" ng-i18next="[placeholder]DD"/> / <input disabled="disabled" type="text" ng-i18next="[placeholder]YYYY"/>
1 </span> <span ng-switch-when="1"> <input disabled="disabled" type="text" ng-i18next="[placeholder]YYYY"/> / <input disabled="disabled" type="text" ng-i18next="[placeholder]MM"/> / <input disabled="disabled" type="text" ng-i18next="[placeholder]DD"/> </span> <span ng-switch-when="2"> <input disabled="disabled" type="text" ng-i18next="[placeholder]DD"/> / <input disabled="disabled" type="text" ng-i18next="[placeholder]MM"/> / <input disabled="disabled" type="text" ng-i18next="[placeholder]YYYY"/> </span> <span ng-switch-default> <input disabled="disabled" type="text" ng-i18next="[placeholder]MM"/> / <input disabled="disabled" type="text" ng-i18next="[placeholder]DD"/> / <input disabled="disabled" type="text" ng-i18next="[placeholder]YYYY"/> </span> <button disabled="disabled" type="button" class="btn btn-default"><i class="fa fa-calendar" aria-hidden="true"></i></button> </div> </div> <div ng-switch-when="html_field" class="html-field"> <html-field-edit-view ng-model="ngModel" template-title-text="templateTitleText"></html-field-edit-view> </div> <div ng-switch-when="checkbox_field" class="checkbox-field"> <input disabled="disabled" type="checkbox" class="field-checkbox-checkbox" ng-model="ngModel.checked" ng-click="$event.stopPropagation();"> <div class="field-checkbox-text"> <input ng-model="ngModel.title_text" ng-change="touchField()"/> </div> <div class="field-hint hint-ai-generating-mask-target" ng-show="!aiGenerating"> <textarea class="field-hint-text-input" ng-model="ngModel.hint_text" ng-i18next="[placeholder]Hint" maxlength="1000" ng-change="onHintChange()"></textarea> <button class="field-hint-ai-button wf-info clickable" ng-click="generateHint()" uib-popover="{{aiGenerationText}}" popover-trigger="\'mouseenter\'" popover-placement="top-right"> <div class="robot-icon"/> </button> </div> <div ng-show="aiGenerating" class="hint-ai-generating-mask"> <div class="spacer"></div> <wf-loading loading-text="{{generatingText}}"></wf-loading> <button class="ai-generation-cancel wf-button-secondary-small" ng-click="cancel()">Cancel</button> </div> </div> <div ng-switch-when="initial_field" class="initial-field"> <div ng-if="ngModel.initial_position == 0" class="initial-input initial-input-left placeholder-input"> <input type="text" ng-i18next="[placeholder]Initials" ng-model="ngModel.placeholder"/> </div> <div class="initial-text"> <textarea ng-model="ngModel.title_text"></textarea> </div> <div ng-if="ngModel.initial_position == 1" class="initial-input initial-input-right placeholder-input"> <input type="text" ng-i18next="[placeholder]Initials" ng-model="ngModel.placeholder"/> </div> <div class="field-hint hint-ai-generating-mask-target" ng-show="!aiGenerating"> <textarea class="field-hint-text-input" ng-model="ngModel.hint_text" ng-i18next="[placeholder]Hint" maxlength="1000" ng-change="onHintChange()"></textarea> <button class="field-hint-ai-button wf-info clickable" ng-click="generateHint()" uib-popover="{{aiGenerationText}}" popover-trigger="\'mouseenter\'" popover-placement="top-right"> <div class="robot-icon"/> </button> </div> <div ng-show="aiGenerating" class="hint-ai-generating-mask"> <div class="spacer"></div> <wf-loading loading-text="{{generatingText}}"></wf-loading> <button class="ai-generation-cancel wf-button-secondary-small" ng-click="cancel()">Cancel</button> </div> </div> <div ng-switch-when="single_choice_field" class="single-choice-field"> <div class="field-title"> <input class="field-title-text-input" ng-model="ngModel.title_text" ng-change="touchField()"/> </div> <div class="field-hint hint-ai-generating-mask-target" ng-show="!aiGenerating"> <textarea class="field-hint-text-input" ng-model="ngModel.hint_text" ng-i18next="[placeholder]Hint" maxlength="1000" ng-change="onHintChange()"></textarea> <button class="field-hint-ai-button wf-info clickable" ng-click="generateHint()" uib-popover="{{aiGenerationText}}" popover-trigger="\'mouseenter\'" popover-placement="top-right"> <div class="robot-icon"/> </button> </div> <div ng-show="aiGenerating" class="hint-ai-generating-mask"> <div class="spacer"></div> <wf-loading loading-text="{{generatingText}}"></wf-loading> <button class="ai-generation-cancel wf-button-secondary-small" ng-click="cancel()">Cancel</button> </div> <div class="choices"> <ul ng-if="!ngModel.dropdown_style" dnd-list="ngModel.choice_list" dnd-drop="drop(index, item)" dnd-allowed-types="dragAllowedTypes" class="single-choice"> <li ng-repeat="choice in ngModel.choice_list track by $index" dnd-draggable="choice" dnd-type="dragType" dnd-effect-allowed="move" dnd-moved="removeField()" dnd-dragstart="dragStart($index)" dnd-dragend="dragEnd(event)" class="other-input"> <dnd-nodrag class="drag-area"> <input disabled="disabled" type="checkbox" class="field-choice-box" ng-model="ngModel.result_list[$index]"> <div class="field-choice-text"> <input ng-disabled="tempMeta.isLoading" ng-model="ngModel.choice_list[$index]" ng-change="choiceChanged();"/> <span class="price-text" ng-if="ngModel.show_price_to_customer">{{payment.currency | currencySymbol}}{{(ngModel.price_list[$index] ? ngModel.price_list[$index] / 100 : 0).toFixed(2)}}</span> </div> <span dnd-handle class="move-button handle">:::</span> </dnd-nodrag> </li> <li class="dndPlaceholder" ng-i18next="Drop Here"></li> </ul> <ul class="single-choice" ng-if="!ngModel.dropdown_style && ngModel.allow_other_
1choice"> <li class="other-input"> <input disabled="disabled" type="checkbox" class="field-choice-box" ng-model="ngModel.result_list[ngModel.result_list.length - 1]"> <div class="input-fields field-choice-text placeholder-input"> <input ng-disabled="tempMeta.isLoading" type="text" ng-i18next="[placeholder]Other..." ng-model="ngModel.placeholder_other_choice" ng-click="$event.stopPropagation();" ng-change="touchField()"/> </div> </li> </ul> <select ng-disabled="!active" ng-if="ngModel.dropdown_style" class="form-control dropdown-style" ng-model="tempMeta.selectedIndex"> <option value="-1" disabled="disabled" ng-i18next="Select your option"></option> <option ng-repeat="choice in ngModel.choice_list track by $index" value="{{$index}}" disabled="disabled">{{ ngModel.choice_list[$index] }}</option> </select> </div> </div> <div ng-switch-when="multiple_choice_field" class="multiple-choice-field"> <div class="field-title"> <input class="field-title-text-input" ng-model="ngModel.title_text" ng-change="touchField()"/> </div> <div class="field-hint hint-ai-generating-mask-target" ng-show="!aiGenerating"> <textarea class="field-hint-text-input" ng-model="ngModel.hint_text" ng-i18next="[placeholder]Hint" maxlength="1000" ng-change="onHintChange()"></textarea> <button class="field-hint-ai-button wf-info clickable" ng-click="generateHint()" uib-popover="{{aiGenerationText}}" popover-trigger="\'mouseenter\'" popover-placement="top-right"> <div class="robot-icon"/> </button> </div> <div ng-show="aiGenerating" class="hint-ai-generating-mask"> <div class="spacer"></div> <wf-loading loading-text="{{generatingText}}"></wf-loading> <button class="ai-generation-cancel wf-button-secondary-small" ng-click="cancel()">Cancel</button> </div> <div class="choices"> <ul class="multiple-choice" dnd-list="ngModel.choice_list" dnd-drop="drop(index, item)" dnd-allowed-types="dragAllowedTypes"> <li class="other-input" ng-repeat="choice in ngModel.choice_list track by $index" dnd-draggable="choice" dnd-type="dragType" dnd-effect-allowed="move" dnd-moved="removeField()" dnd-dragstart="dragStart($index)" dnd-dragend="dragEnd(event)"> <dnd-nodrag class="drag-area"> <input disabled="disabled" type="checkbox" class="field-choice-box" ng-model="ngModel.result_list[$index]" ng-click="$event.stopPropagation();"> <div class="field-choice-text"> <input ng-disabled="tempMeta.isLoading" ng-model="ngModel.choice_list[$index]" ng-change="choiceChanged();"/> <span class="price-text" ng-if="ngModel.show_price_to_customer">{{payment.currency | currencySymbol}}{{ngModel.price_list[$index] ? ngModel.price_list[$index] / 100 : 0 | number:2}}</span> </div> <span dnd-handle class="move-button handle">:::</span> </dnd-nodrag> </li> <li class="dndPlaceholder" ng-i18next="Drop Here"></li> </ul> <ul class="multiple-choice" ng-if="ngModel.allow_other_choice"> <li class="other-input"> <input disabled="disabled" type="checkbox" class="field-choice-box" ng-model="ngModel.result_list[ngModel.result_list.length - 1]"> <div class="input-fields field-choice-text placeholder-input"> <input ng-disabled="tempMeta.isLoading" type="text" ng-i18next="[placeholder]Other..." ng-model="ngModel.placeholder_other_choice" ng-click="$event.stopPropagation();" ng-change="touchField()"/> </div> </li> </ul> </div> </div> <div ng-switch-when="signature_field" class="signature-field"> <div class="field-title"> <input class="field-title-text-input" ng-model="ngModel.title_text"/> </div> <div class="field-hint hint-ai-generating-mask-target" ng-show="!aiGenerating"> <textarea class="field-hint-text-input" ng-model="ngModel.hint_text" ng-i18next="[placeholder]Hint" maxlength="1000" ng-change="onHintChange()"></textarea> <button class="field-hint-ai-button wf-info clickable" ng-click="generateHint()" uib-popover="{{aiGenerationText}}" popover-trigger="\'mouseenter\'" popover-placement="top-right"> <div class="robot-icon"/> </button> </div> <div ng-show="aiGenerating" class="hint-ai-generating-mask"> <div class="spacer"></div> <wf-loading loading-text="{{generatingText}}"></wf-loading> <button class="ai-generation-cancel wf-button-secondary-small" ng-click="cancel()" ng-i18next="Cancel"></button> </div> <div class="signature"> <img ng-if="ngModel.signature_data != \'\'" class="signature-image" ng-src="{{ \'data:image/png;base64,\' + ngModel.signature_data }}"/> <div ng-if="ngModel.signature_data == \'\'" class="signature-placeholder"></div> </div> <div class="input-fields" ng-show="ngModel.type_to_sign"> <input disabled="disabled" class="line-2x" type="text" ng-i18next="[placeholder]You can also type to generate signature"/> </div> </div> <div ng-switch-when="picture_field" class="picture-field"> <div class="field-title"> <input class="field-title-text-input" ng-model="ngModel.title_text"/> </div> <div class="field-hint hint-ai-generating-mask-target" ng-show="!aiGenerating"> <textarea class="field-hint-text-input" ng-model="ngModel.hint_text" ng-i18next="[placeholder]Hint" maxlength="1000" ng-change="onHintChange()"></textarea> <button class="field-hint-ai-button wf-info clickable" ng-click="generateHint()" uib-popover="{{aiGenerationText}}" popover-trigger="\'mouseenter\'" popover-placement="top-right"> <div class="robot-icon"/> </button> </div> <div ng-show="aiGenerating" class="hint-ai-generating-mask"> <div class="spacer"></div> <wf-loading loading-text="{{generatingText}}"></wf-loading> <button class="ai-generation-cancel wf-button-secondary-small" ng-click="cancel()" ng-i18next="Cancel"></button> </div> <div class="picture-field-placeholder"> <img src="/app/static/images/templateBuilder/picture.svg"/> <span ng-i18next="Upload or capture a picture"></span> </div> </div> <div ng-switch-when="separator_field" class="separator-field"> <div class="field-title"> <span class="field-title-text">{{ ngModel.title_text }}</span> </div> </div> <div ng-switch-when="number_field" class="number-field" ng-class="{\'price-field\': ngModel.is_price}"> <div class="field-title"> <input class="field-title-text-input" ng-model="ngModel.title_text"/> </div> <div class="field-hint hint-ai-generating-mask-target" ng-show="!aiGenerating"> <textarea class="field-hint-text-input" ng-model="ngModel.hint_text" ng-i18next="[placeholder]Hint" maxlength="1000" ng-change="onHintChange()"></textarea> <button class="field-hint-ai-button wf-info clickable" ng-click="generateHint()" uib-popover="{{aiGenerationText}}" popover-trigger="\'mouseenter\'" popover-placement="top-right"> <div class="robot-icon"/> </button> </div> <div ng-show="aiGenerating" class="hint-ai-generating-mask"> <div class="spacer"></div> <wf-loading loading-text="{{generatingText}}"></wf-loading> <button class="ai-generation-cancel wf-button-secondary-small" ng-click="cancel()" ng-i18next="Cancel"></button> </div> <div class="input-fields placeholder-input"> <span class="currency-symbol" ng-if="ngModel.is_price && payment.currency">{{payment.currency | currencySymbol}}</span> <input type="text" ng-if="!ngModel.is_price" class="line-2x" ng-i18next="[placeholder]Number" ng-model="ngModel.placeholder"/> <input type="text" ng-if="ngModel.is_price" class="line-2x" ng-i18next="[placeholder]Price" ng-model="ngModel.placeholder"/> </div> </div> </div> </div> '},34146(e,t,i){angular.module("waiverforeverApp.templateBuilder").directive("emailFieldDetail
1s",[function(){return{restrict:"AE",scope:{field:"=",isInternal:"<"},template:i(65937),link:function(e,t){e.$watch("field.default_value",function(t){var i=e.field;i&&(i.email=i.default_value?i.default_value.trim():"")}),e.$watch("field.locked_field",function(t){t&&e.field.renew_field&&(e.field.renew_field=!1)}),e.$watch("field.renew_field",function(t){t&&e.field.locked_field&&(e.field.locked_field=!1)})}}}])},34842(e){e.exports="<div class=\"html-field-edit-view\"> <div class=\"image-field-row\" ng-if=\"field.is_image_field\" ng-class=\"{'full-width-content-bottom': field.position === '0',\n    'full-width-content-top': field.position === '7', 'full-width-content-overlay': field.position === '8',\n    'image-33-content-67': field.position === '1', 'image-50-content-50': field.position === '2', 'image-67-content-33': field.position === '3',\n    'content-33-image-67': field.position === '4', 'content-50-image-50': field.position === '5', 'content-67-image-33': field.position === '6',\n    'top': field.vertical_align === 'top', 'center': field.vertical_align === 'center', 'bottom': field.vertical_align === 'bottom'}\"> <div class=\"image\"> <div ng-if=\"field.image_url\" class=\"image-container\"> <img class=\"field-image\" ng-src=\"{{field.image_url}}\"><br/> </div> </div> <div class=\"image-caption\"> <div ng-if=\"field.is_image_field\" ng-bind-html=\"field.caption_html_string | trust\"></div> </div> </div> <div class=\"row\" ng-if=\"!field.is_image_field\"> <div class=\"feditor\"> <textarea froala=\"froalaOptions\" ng-model=\"field.html_string\" ng-change=\"touchField()\"></textarea> </div> </div> </div> "},36638(e,t,i){var n=i(98609);angular.module("waiverforeverApp.templateBuilder").directive("dateFieldDetail
1s",["WFDateHelper",function(e){return{restrict:"AE",scope:{field:"=",isInternal:"<"},template:i(19921),link:function(t){function i(i){var n=e.parseSpecificDateRule(t.field,i);return n?n.toDate():null}function l(e){t.ruleDatePickerOptions[e].initDate=t.ruleMeta[e].date||new Date}function a(){e.normalizeDateFieldRules(t.field)}function d(){var i=t.field,n=e.resolveDateFieldDefaultMoment(i);n?(i.day=String(n.date()),i.month=String(n.month()+1),i.year=String(n.year())):(i.day="",i.month="",i.year="")}var o;t.field.format=t.field.format||"0",t.field.format+="",t.defaultDateTooltip=[i18next.t("Specific = always the same date you set."),i18next.t("Current = auto-fill today each time the form opens.")].join("<br/>"),t.startDateTooltip=[i18next.t("Start Date: The Earliest date a user can pick."),i18next.t("Specific Date = from that day onward."),i18next.t("Current = Cannot pick days before today."),i18next.t("Past/Future N Days = Only dates within the last/future N days (rolling window).")].join("<br/>"),t.endDateTooltip=[i18next.t("End Date: The latest date a user can pick."),i18next.t("Specific Date = up to and including that day."),i18next.t("Current = Cannot pick days after today."),i18next.t("Past/Future N Days = Only dates within the last/future N days (rolling window).")].join("<br/>"),t.ruleMeta={default:{opened:!1,date:null},start:{opened:!1,date:null},end:{opened:!1,date:null}},t.ruleDatePickerOptions={default:{showWeeks:!1,initDate:new Date},start:{showWeeks:!1,initDate:new Date},end:{showWeeks:!1,initDate:new Date}},t.getFormatString=e.getDateFieldFormatString,t.formatDate=function(e){return e?n(e).format(t.getFormatString(t.field.format)):""},t.isSpecificMode=function(e){return"specific"===t.field[e+"_rule_mode"]},t.isOffsetMode=function(e){var i=t.field[e+"_rule_mode"];return"past"===i||"future"===i},t.setRuleMode=function(i,n){e.dateRuleModes.includes(n)&&(t.field[i+"_rule_mode"]=n,l(i),"default"===i&&(a(),d()))},t.normalizeOffset=function(i){var n=i+"_rule_offset_days";t.field[n]=e.normalizeOffsetDays(t.field[n]),"default"===i&&d()},t.onRuleDateChanged=function(e){!function(e,i){var l=e+"_rule_year",a=e+"_rule_month",d=e+"_rule_day";if(!i)return t.field[l]="",t.field[a]="",void(t.field[d]="");var o=n(i);t.field[l]=String(o.year()),t.field[a]=String(o.month()+1),t.field[d]=String(o.date())}(e,t.ruleMeta[e].date),l(e),"default"===e&&(a(),d())},t.onRuleEnabledChanged=function(i){t.field["enable_"+i+"_rule"]&&(!function(i,n){var l=i+"_rule_mode";e.normalizeDateRuleMode(t.field[l])||(t.field[l]=n)}(i,"specific"),t.normalizeOffset(i),l(i))},o=t.field,e.normalizeDateFieldRules(o),t.ruleMeta.default.date=i("default"),t.ruleMeta.start.date=i("start"),t.ruleMeta.end.date=i("end"),l("default"),l("start"),l("end"),d(),t.$watch("field.locked_field",function(e){e&&t.field.renew_field&&(t.field.renew_field=!1)}),t.$watch("field.renew_field",function(e){e&&t.field.locked_field&&(t.field.locked_field=!1)})}}}])},37528(e,t,i){angular.module("waiverforeverApp.templateBuilder").directive("pictureFieldDetail
1s",[function(){return{restrict:"AE",scope:{field:"=",isInternal:"<"},template:i(69991),link:function(){}}}])},38180(e){e.exports='<div class="field-body"> <div class="field-title"> {{field.title_text}} </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.optional, \'unchecked\': !field.optional}"> <input type="checkbox" ng-model="field.optional"/> <span ng-i18next="This is an optional field"></span> </label> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.renew_field, \'unchecked\': !field.renew_field}"> <input type="checkbox" ng-model="field.renew_field"/> <span ng-i18next="This is a renewable field"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'When request to renew a filled form, a renewable field will be cleared and require to be filled again.\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.locked_field, \'unchecked\': !field.locked_field}"> <input type="checkbox" ng-model="field.locked_field"/> <span ng-i18next="Prevent customer editing"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'Customers cannot change value of this field\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="select" ng-show="!field.is_price"> <div class="select-title" ng-i18next="Type:"></div> <select class="form-control" ng-model="numberType"> <option value="decimal" ng-i18next="Decimal"></option> <option value="integer" ng-i18next="Integer"></option> </select> </div> <div class="select" ng-show="numberType === \'decimal\' && !field.is_price"> <div class="select-title" ng-i18next="Decimal Places:"></div> <select class="form-control" ng-model="field.decimal_places"> <option ng-value="1">1</option> <option ng-value="2">2</option> <option ng-value="3">3</option> <option ng-value="4">4</option> <option ng-value="5">5</option> </select> </div> <div class="number-range" ng-if="!field.locked_field"> <div ng-i18next="Range:"></div> <label class="min-number"> <span ng-i18next="Min:"></span> <div class="number-input-container"> <span class="currency-symbol" ng-if="field.is_price && payment.currency">{{payment.currency | currencySymbol}}</span> <input-number value="minValue" precision="field.decimal_places" max="maxValue" on-change="handleMinValueChange" on-blur="handleMinValueBlur" is-price="field.is_price"> </input-number> </div> </label> <label class="max-number"> <span ng-i18next="Max:"></span> <div class="number-input-container"> <span class="currency-symbol" ng-if="field.is_price && payment.currency">{{payment.currency | currencySymbol}}</span> <input-number value="maxValue" precision="field.decimal_places" min="minValue" on-change="handleMaxValueChange" on-blur="handleMaxValueBlur" is-price="field.is_price"> </input-number> </div> </label> </div> <div class="default-title"> <div ng-if="!field.is_price" ng-i18next="Default Value:"></div> <div ng-if="field.is_price" ng-i18next="Default Amount:"></div> <span class="default-title-tip" ng-i18next="Default values are fixed inputs until changed, while placeholders are temporary prompts that disappear when typing begins."></span> <div class="number-input-container"> <span class="currency-symbol" ng-if="field.is_price && payment.currency">{{payment.currency | currencySymbol}}</span> <input-number value="defaultValue" precision="field.decimal_places" min="minValue" max="maxValue" on-change="handleDefaultValueChange" on-blur="handleDefaultValueBlur" is-price="field.is_price"> </input-number> </div> </div> <div class="placeholder-title"> <div ng-i18next="Placeholders:"></div> <span class="placeholder-title-tip" ng-i18next="You can change the placeholders in your preferred language."></span> <input class="form-control" type="text" ng-model="field.placeholder"/> </div> </div> '},38977(e,t,i){angular.module("waiverforeverApp.templateBuilder").directive("ageFieldDetail
1s",[function(){return{restrict:"AE",scope:{field:"=",isInternal:"<"},template:i(61902),link:function(e,t){e.$watch("field.default_value",function(t){var i=e.field;i&&(i.age=i.default_value?i.default_value.trim():"")}),e.$watch("field.locked_field",function(t){t&&e.field.renew_field&&(e.field.renew_field=!1)}),e.$watch("field.renew_field",function(t){t&&e.field.locked_field&&(e.field.locked_field=!1)})}}}])},40198(e,t,i){"use strict";i.d(t,{X:()=>ie});var n=i(1812),l=i(46958),a=i(33964),d=i(4030),o=i(88358),c=i(62409);angular.module("waiverforeverApp.templateBuilder").directive("templateEditor",["WFTemplateHelper","Confirmation",function(e,t){return{restrict:"AE",scope:{isInternal:"<",isMobileView:"<",template:"=ngModel",selectedField:"=",activeField:"=",selectFieldMethod:"=selectField",setActiveFieldMethod:"=setActiveField",openFieldSettingsMethod:"=openFieldSettings",selectEditConsentMethod:"=selectEditConsent",editConsent:"=",moveFieldMethod:"=moveField",fieldMoved:"=",fieldModified:"=",moveDelaying:"=",control:"=",readOnly:"=",copyFieldMethod:"=copyField",virtualSeparatorField:"=",mappedFields:"=",usedInLogicFields:"=",onDropping:"=onDropping",onDropped:"=onDropped",payment:"="},template:i(69377),link:function(i,l){function a(e,t){event.stopPropagation();var n=i.copyFieldMethod(e),l=t.indexOf(e);l=l<0?0:l+1,t.splice(l,0,n)}i.supportedVersion=d.pX,i.supported=!0,i.containerFieldAllowedTypes=e.containerFieldAllowedTypes,i.allAllowedTypes=i.containerFieldAllowedTypes.concat(["container_field","separator_field"]),i.checkUntouchedFieldTypes=["short_answer_field","html_field","single_choice_field","multiple_choice_field","checkbox_field"],i.dragging=!1,i.fieldUidIndexMap={},i.showVirtualSeparator=function(){return!!i.template.doc_content&&i.template.doc_content.filter(e=>"separator_field"===e.type).length>0},i._initialize=function(){!c.isEmpty(i.template.doc_content)&&e.versionCompare(i.template.version,i.supportedVersion)>0?i.supported=!1:(i.template.doc_picture_list||(i.template.doc_picture_list=[]),i.template.doc_consent||(i.template.doc_consent={}))},i.selectField=function(e,t,n){n.stopPropagation(),i.readOnly||(i.isMobileView?i.setActiveFieldMethod(e,t):i.selectFieldMethod(e,t))},i.openFieldSettings=function(e,t,n){n.stopPropagation(),i.readOnly||i.openFieldSettingsMethod(e,t)},i.enableConsent=function(){i.readOnly||(i.template.doc_consent.enabled=!0,i.selectEditConsentMethod())},i.selectEditConsent=function(){i.readOnly||i.selectEditConsentMethod()},i.moveField=async function(e,t,n,l){if(l.stopPropagation(),!i.readOnly)if(i.usedInLogicFields[t.uid]){await i.confirmMutateFieldWithLogic()&&(i.moveFieldMethod(e,t),i.checkLogic())}else i.moveFieldMethod(e,t)},i.getFieldType=function(t){return e.getFieldTypeName(t)},i.dragStart=function(e){i.dragging=!0},i.dragEnd=function(e){i.dragging=!1},i.removeField=function(e){i.template.doc_content.splice(e,1)},i.handleRemoveField=async function(e,t){t.stopPropagation();try{const t=i.template.doc_content[e];if(i.usedInLogicFields[t.uid]){if(!await i.confirmMutateFieldWithLogic())return;i.removeField(e),i.checkLogic()}else await i.confirmRemoveField(),i.removeField(e);i.fieldModified(t)}catch(e){"cancel"!==e&&n.Cp(e)}},i.removeInnerField=function(e,t){t.fields.splice(e,1)},i.handleRemoveInnerField=async function(e,t,l){l.stopPropagation();try{const n=t.fields[e];if(i.usedInLogicFields[n.uid]){if(!await i.confirmMutateFieldWithLogic())return;i.removeInnerField(e,t),i.checkLogic()}else await i.confirmRemoveField(),i.removeInnerField(e,t)}catch(e){n.Cp(e)}},i.confirmRemoveField=async function(){return await t.confirm({title:i18next.t("Remove Field"),message:i18next.t("Are you sure to remove this field?")})},i.confirmMutateFieldWithLogic=async function(){try{return await t.confirm({title:i18next.t("Logic is set"),message:i18next.t("You have set up a logic for this field. If you change it, you will break the logic.<br>Are you sure to continue changing this field?")}),!0}catch(e){return!1}},i.generateFieldUidIndexMap=function(e,t){e.forEach((e,n)=>{i.fieldUidIndexMap[e.uid]={index:n,containerIndex:t},e.fields&&i.generateFieldUidIndexMap(e.fields,n)})},i.removeInvalidLogicCondition=function(e,t){e.forEach((e,n)=>{e.logic&&e.logic.conditions.length&&(e.logic.conditions=e.logic.conditions.filter(e=>{const l=i.fieldUidIndexMap[e.source.sub_uid||e.source.uid];return!!l&&(l.containerIndex&&t?l.containerIndex<t||l.index<n:l.containerIndex&&!t?l.containerIndex<n:!l.containerIndex&&t?l.index<t:l.index<n)}),0===e.logic.conditions.length&&delete e.logic),e.fields&&i.removeInvalidLogicCondition(e.fields,n)})},i.checkLogic=function(){i.fieldUidIndexMap={},i.generateFieldUidIndexMap(i.template.doc_content),i.removeInvalidLogicCondition(i.template.doc_content)},i.duplicateField=function(e,t){t.stopPropagation(),a(e,i.template.doc_content)},i.duplicateInnerField=function(e,t,i){i.stopPropagation(),a(e,t.fields)},i.drop=function(e,t,n,l){const{srcIndex:a,srcParent:d,dstParent:o,dstParentField:c}=l;if(i.onDropping(),"copy"===e)return r(t);if("move"===e)return d===o?a!==(n=n>a?n-1:n)?r(s()):(i.onDropped(t),!1):r(s());function s(){const[e]=d.splice(a,1);return e}function r(t){return o.splice(n,0,t),i.dropInserted({dropEffect:e,item:t,dstParentField:c,srcIndex:a,dstIndex:n,dstParent:o}),!0}},i.dropInserted=async function(e){let{dropEffect:t,item:n,dstParentField:l,srcIndex:a,dstIndex:d,dstParent:o}=e;if("copy"===t)i.selectFieldMethod(n,l),i.fieldModified(n);else if("move"===t){if(i.usedInLogicFields[n.uid]){if(!await i.confirmMutateFieldWithLogic()){const e=i.template.doc_content,t=c.cloneDeep(e[a]);return e[a]=e[d],void(e[d]=t)}i.checkLogic()}i.fieldMoved(n,l,!1)}i.onDropped(n)},i.$watch("template",function(e,t){e&&i._initialize()}),i.removePicture=function(e){i.template.doc_picture_list.splice(e,1)},i.addPicture=function(){i.template.doc_picture_list.push({title:"Picture Title",optional:!0})},i.anyChildSelected=function(e){return!!e&&(!!i.selectedField&&e.fields.some(e=>e===i.selectedField))}}}}]);i(68355);var s=i(24073),r=i.n(s);class p{constructor(e,t){this.$compile=e,this.$scope=t}loadMask(){const e=this.resolve.editor.$el.get(0),t=this.$compile('<html-field-loading cancel="vm.cancel()"></html-field-loading>')(this.$scope).get(0),i=e.parentElement;return i.appendChild(t),()=>{i.contains(t)&&i.removeChild(t)}}}class u extends p{static get inject(){return["$uibModal","WFApiClient","$compile","$scope","toastr"]}constructor(e,t,i,n,l){super(i,n),this.$uibModal=e,this.WFApiClient=t,this.toastr=l,this.cancel=()=>{}}expand(){const e=this.resolve.editor,t=e.html.get(),i=this.loadMask(),n=this.WFApiClient.post("waiverTemplate/generateTextFieldByAI",{title:this.resolve.title,current_text:t}),l=new Promise(e=>{this.cancel=()=>{(0,o.sendClickEvent)("Builder_ClickAIHtmlCancel"),e()}});Promise.race([l,n]).then(t=>{t&&t.data.result&&(e.selection.setAtEnd(e.$el.get(0)),e.selection.restore(
1),e.html.insert("<br>"),e.html.insert(t.data.success.text),i())}).catch(e=>{this.toastr.error(i18next.t("Failed to generate."))}).finally(()=>{i()}),this.close()}replace(){this.$uibModal.open({animation:!0,component:"htmlFieldGenerateNewContentModal",windowTopClass:"ai-generate-new-modal centered-modal",resolve:{editor:()=>this.resolve.editor,title:()=>this.resolve.title}}),this.close()}close(){this.modalInstance.dismiss()}}u.$inject=["$uibModal","WFApiClient","$compile","$scope","toastr"],angular.module("waiverforeverApp.templateBuilder").component("htmlFieldAIGenerationModal",{bindings:{modalInstance:"<",resolve:"<"},controller:u,template:r(),controllerAs:"vm"});var f=i(15637),g=i.n(f);class m extends p{static get inject(){return["$uibModal","WFApiClient","$compile","$scope","toastr"]}constructor(e,t,i,n,l){super(i,n),this.$uibModal=e,this.WFApiClient=t,this.toastr=l,this.placeholderText=i18next.t("Enter description or request"),this.textInput="",this.cancel=()=>{}}generate(){const e=this.resolve.editor,t=this.loadMask(),i=this.WFApiClient.post("waiverTemplate/generateTextFieldByAI",{title:this.resolve.title,current_text:this.textInput}),n=new Promise(e=>{this.cancel=()=>{(0,o.sendClickEvent)("Builder_ClickAIHtmlCancel"),e()}});Promise.race([n,i]).then(t=>{t&&t.data.result&&(e.html.set(""),e.html.insert(t.data.success.text))}).catch(e=>{this.toastr.error(i18next.t("Failed to generate."))}).finally(()=>{t()}),this.modalInstance.dismiss()}close(){this.$uibModal.open({animation:!0,component:"htmlFieldAIGenerationModal",windowTopClass:"ai-text-modal centered-modal",resolve:{editor:()=>this.resolve.editor,title:()=>this.resolve.title}}),this.modalInstance.dismiss()}}m.$inject=["$uibModal","WFApiClient","$compile","$scope","toastr"],angular.module("waiverforeverApp.templateBuilder").component("htmlFieldGenerateNewContentModal",{bindings:{modalInstance:"<",resolve:"<"},controller:m,template:g(),controllerAs:"vm"});var h=i(45143),v=i.n(h);angular.module("waiverforeverApp.templateBuilder").component("htmlFieldLoading",{bindings:{cancel:"&"},controller:class{},template:v(),controllerAs:"vm"});var b=i(17155);angular.module("waiverforeverApp.templateBuilder").directive("templateFieldEditView",["WFTemplateHelper","WFApiClient","toastr",function(e,t,n){return{restrict:"AE",scope:{ngModel:"=",active:"=",templateTitleText:"<",payment:"="},template:i(29499),link:function(i,l){i.tempMeta={},i.cancellation=()=>{},i.aiGenerationText=i18next.t("Click for AI-Generated Hint"),i.generatingText=i18next.t("Generating..."),i.touchField=function(){i.ngModel.newly_created=!1},i.onHintChange=function(){i.ngModel.hintClickEventSent||((0,o.sendClickEvent)("tb_enterHint","1"),i.ngModel.hintClickEventSent=!0)},i.countryCodes=b.map(e=>({country:e.country,code:e.country_code,isoCode:e.iso_code})),i.getCurrentCountryCode=function(){const e=i.ngModel.country_code;if(e){const t=i.countryCodes.find(t=>t.isoCode===e);return t?t.code:"1"}return"1"},i.generateHint=function(){(0,o.sendClickEvent)("builder_clickAIHint");const a=l[0].querySelector(".hint-ai-generating-mask"),d=l[0].querySelector(".hint-ai-generating-mask-target");i.aiGenerating=!0,a.style.width=d.offsetWidth+"px",a.style.height=d.offsetHeight+"px";const c=new Promise(e=>{i.cancel=()=>{e()}}),s=e.sanitizeField(i.ngModel);s.title=i.ngModel.title_text||"",s.hint=i.ngModel.hint_text||"";const r=t.post("waiverTemplate/generateFieldHintByAI",{field_data:s});return Promise.race([c,r]).then(e=>{e&&e.data.result&&(i.ngModel.hint_text=e.data.success.hint,i.$apply())}).catch(()=>{n.error("Failed to generate hint")}).finally(()=>{i.aiGenerating=!1,i.$apply()})},i.$watch("ngModel.isLoading",function(e){i.tempMeta.isLoading=e}),"single_choice_field"===i.ngModel.type?(i.$watch("ngModel.result_list",function(e){i.tempMeta.selectedIndex=""+i.ngModel.result_list.indexOf(!0)},!0),i.dragType="single_choice_option",i.dragAllowedTypes=["single_choice_option"]):"multiple_choice_field"===i.ngModel.type&&(i.dragType="multiple_choice_option",i.dragAllowedTypes=["multiple_choice_option"]),"single_choice_field"!==i.ngModel.type&&"multiple_choice_field"!==i.ngModel.type||(i.dragging=!1,i.choiceChanged=function(){i.touchField(),i.ngModel.choice_list=(i.ngModel.choice_list||[]).concat(),i.ngModel.choices=(i.ngModel.choice_list||[]).join("\n")},i.removeField=function(){if(i.originIndex>i.targetIndex){const e=(i.ngModel.choice_list||[]).concat();e.splice(i.originIndex+1,1),i.ngModel.choice_list=e}else{const e=(i.ngModel.choice_list||[]).concat();e.splice(i.originIndex,1),i.ngModel.choice_list=e}},i.drop=function(e,t){return i.targetIndex=e,t},i.dragStart=function(e){i.originIndex=e,i.dragging=!0},i.dragEnd=function(e){if(i.ngModel.default_value&&i.ngModel.default_value.length>0){const e=i.ngModel.default_value.concat(),t=e.splice(i.originIndex,1)[0];e.splice(i.targetIndex,0,t),i.ngModel.default_value=e}if(i.ngModel.is_price&&i.ngModel.price_list&&i.ngModel.price_list.length>0){const e=i.ngModel.price_list.concat(),t=e.splice(i.originIndex,1)[0];e.splice(i.targetIndex,0,t),i.ngModel.price_list=e}i.ngModel.choices=(i.ngModel.choice_list||[]).join("\n"),i.dragging=!1})}}}]);var _=i(20086),x=i(62409);angular.module("waiverforeverApp.templateBuilder").directive("htmlFieldEditView",["Upload","EDITOR_OPTIONS","WFApiClient","$uibModal","$rootScope",function(e,t,n,l,a){return{restrict:"AE",scope:{field:"=ngModel",templateTitleText:"<"},template:i(34842),link:{pre:function(e){e.upload={file:null},FroalaEditor.DefineIcon("aiGeneration",{SRC:"/app/static/images/templateBuilder/ai-bot.svg",ALT:"AI Generation",template:"image"}),FroalaEditor.RegisterCommand("aiGeneration",{icon:"aiGeneration",title:i18next.t("Write with AI"),focus:!0,undo:!0,refreshAfterCallback:!0,callback:function(){const t=this;if('<p style="text-align: center;">Some Text</p>'===t.html.get())l.open({animation:!0,component:"htmlFieldGenerateNewContentModal",windowTopClass:"ai-generate-new-modal centered-modal",resolve:{editor:()=>t,title:()=>e.templateTitleText}});else{l.open({animation:!0,component:"htmlFieldAIGenerationModal",windowTopClass:"ai-text-modal centered-modal",resolve:{editor:()=>t,title:()=>e.templateTitleText}})}}});const i=x.cloneDeep(t.templateEditor);i.toolbarButtons.push("insertLink"),i.linkAlwaysBlank=!0,i.toolbarButtons.push("aiGeneration"),i.toolbarInline=!1,i.scrollableContainer="#preview-form",i.language=(0,_.A)(a.currentUser),i.requestHeaders={Authorization:`${n.getAuthHeader()}`},e.froalaOptions=i},post:function(e){e.field.is_image_field&&(e.field.position=e.field.position||"0",e.field.position+=""),e.touchField=function(){e.field.newly_created=!1}
1,e.generateHtmlString=function(){const[t,i]={0:[100,100],1:[33,67],2:[50,50],3:[67,33],4:[67,33],5:[50,50],6:[33,67],7:[100,100],8:[100,100]}[e.field.position];switch(e.field.position){case"0":return`<div>\n                      <div style="width:${t}%; min-width: 180px; margin-bottom: 10px;">\n                        <img src="${e.field.image_url}" style="display:block; max-width: 100%; margin: 0 auto;">\n                      </div>\n                      <div style="width: ${i}%; min-width: 180px; padding: 0 10px;">\n                        ${e.field.caption_html_string}\n                      </div>\n                    </div>\n                  `;case"7":return`<div>\n                      <div style="width: ${i}%; min-width: 180px;">\n                        ${e.field.caption_html_string}\n                      </div>\n                      <div style="width:${t}%; min-width: 180px; padding: 0 10px; margin-top: 10px;">\n                        <img src="${e.field.image_url}" style="display:block; max-width: 100%;margin:0 auto;">\n                      </div>\n                    </div>\n                  `;case"8":const n={top:"top: 0;",center:"top: 50%; transform: translateY(-50%);",bottom:"bottom: 0;"}[e.field.vertical_align];return`<div style="position: relative; overflow: hidden; min-width: 180px;">\n                      <div style="width:${t}%;">\n                        <img src="${e.field.image_url}" style="display:block; max-width: 100%; margin:0 auto;">\n                      </div>\n                      <div style="position: absolute; left: 0; right: 0; ${n} padding: 0 10px;">\n                        ${e.field.caption_html_string}\n                      </div>\n                    </div>\n                  `;case"1":case"2":case"3":case"4":case"5":case"6":return`<div style="min-width: 180px; display: flex; ${{top:"align-items: flex-start;",center:"align-items: center;",bottom:"align-items: flex-end;"}[e.field.vertical_align]} ${e.field.position<=3?"flex-direction: row;":"flex-direction: row-reverse;"}">\n                      <div style="width: ${t}%;">\n                        <img src="${e.field.image_url}" style="display:block; max-width: 100%;">\n                      </div>\n                      <div style="width: ${i}%; padding: 0 10px;">\n                        ${e.field.caption_html_string}\n                      </div>\n                    </div>\n                  `}},e.$watch("field.caption_html_string",function(t,i){t!==i&&null!==t&&e.field.is_image_field&&(e.field.html_string=e.generateHtmlString())}),e.$watch("field.position",function(t,i){t!==i&&null!==t&&e.field.is_image_field&&(e.field.html_string=e.generateHtmlString())}),e.$watch("field.image_url",function(t,i){t!==i&&null!==t&&e.field.is_image_field&&(e.field.html_string=e.generateHtmlString())}),e.$watch("field.vertical_align",function(t,i){t!==i&&null!==t&&e.field.is_image_field&&(e.field.html_string=e.generateHtmlString())})}}}}]);var y=i(79737);const w="https://www.youtube.com/watch?v=QNrdKaEPA04";angular.module("waiverforeverApp.templateBuilder").directive("consentFieldSettingView",["toastr",function(e){return{restrict:"AE",scope:{template:"=ngModel"},template:i(10855),link:function(t,i){t.setConsent=function(e){t.consent=e||{},t.consent.youtube_link_list=t.consent.youtube_link_list?t.consent.youtube_link_list.filter(e=>e):[],t.videoCheckboxEnabled=!!t.consent.youtube_link_list&&t.consent.youtube_link_list.some(e=>e)},t.$watch("template",function(e,i){e&&t.setConsent(e.doc_consent)}),t.setConsent(t.template.doc_consent),t.$watch("videoCheckboxEnabled",function(e,i){e?0===t.consent.youtube_link_list.length&&t.consent.youtube_link_list.push(w):t.consent.youtube_link_list=[]}),t.validateVideoUrl=function(i,n){("blur"===n.type||"keydown"===n.type&&13===n.keyCode)&&setTimeout(()=>{if(!n.currentTarget&&void 0!==t.consent.youtube_link_list[i])return;const l=n.currentTarget.value;(0,y.U)(l)?t.consent.youtube_link_list[i]=l:(e.error(i18next.t("Invalid Youtube URL")),t.consent.youtube_link_list[i]="",n.currentTarget.value="")},15)},t.removeVideo=function(e){t.consent.youtube_link_list.splice(e,1),0===t.consent.youtube_link_list.length&&(t.consent.youtube_link_list=[],t.videoCheckboxEnabled=!1)},t.addVideo=function(){0===t.consent.youtube_link_list.length?t.consent.youtube_link_list.push(w):t.consent.youtube_link_list.push("")}}}}]);var k=i(62409);angular.module("waiverforeverApp.templateBuilder").directive("consentHtmlEditView",["EDITOR_OPTIONS","WFApiClient","$rootScope",function(e,t,n){return{restrict:"AE",scope:{template:"=ngModel",editConsent:"="},template:i(86806),link:{pre:function(i){const l=k.cloneDeep(e.inline);l.toolbarInline=!1,l.toolbarButtons.push("|"),l.toolbarButtons.push("insertLink"),l.language=(0,_.A)(n.currentUser),l.requestHeaders={Authorization:`${t.getAuthHeader()}`},i.froalaOptions=l},post:function(e){e.$watch("template",function(t,i){t&&(e.consent=e.template.doc_consent||{})})}}}}]).filter("ValidYoutubeLink",()=>e=>(0,y.U)(e));i(41850),i(54586),i(38977),i(4731),i(83437),i(36638),i(34146);var T=i(80313),F=i(62409);angular.module("waiverforeverApp.templateBuilder").directive("htmlFieldDetail
1s",["Upload","EDITOR_OPTIONS","Confirmation","WFApiClient","$rootScope",function(e,t,n,l,a){return{restrict:"AE",scope:{field:"=",isInternal:"<"},template:i(85356),link(i){i.uploading=!1;const d=F.cloneDeep(t.templateEditor);d.toolbarInline=!1,d.quickInsertButtons=null,d.language=(0,_.A)(a.currentUser),d.requestHeaders={Authorization:`${l.getAuthHeader()}`},i.froalaOptions=d,i.isAlignmentSelectorShow=()=>!["0","7"].includes(i.field.position),i.field.is_image_field&&(i.field.position=i.field.position||"0",i.field.position+="",i.field.vertical_align=i.field.vertical_align||(i.isAlignmentSelectorShow()?"top":"")),i.upload={file:null},i.upload=function(t){i.uploading=!0,e.upload({url:T.BACKEND_HOST+"/api/v3/upload_image",data:{image:t,scenario:"template_field"},headers:{Authorization:l.getAuthHeader()}}).then(function(e){"success"===e.data.status&&(i.field.image_url=e.data.link),i.uploading=!1},function(e){console.log("Error status: "+e.status),i.uploading=!1,n.confirm({title:"Upload Failed",hideCancel:!0})},function(e){let t=parseInt(100*e.loaded/e.total);console.log(`progress: ${t}% ${e.config.data.image.name}`)})},i.removePicture=function(){i.field.image_url=""},i.layoutList=[{value:"0",img:"layout-full-width-content-bottom.svg"},{value:"7",img:"layout-full-width-content-top.svg"},{value:"8",img:"layout-full-width-content-overlay.svg"},{value:"1",img:"layout-image-33-content-67.svg"},{value:"2",img:"layout-image-50-content-50.svg"},{value:"3",img:"layout-image-67-content-33.svg"},{value:"4",img:"layout-content-33-image-67.svg"},{value:"5",img:"layout-content-50-image-50.svg"},{value:"6",img:"layout-content-67-image-33.svg"}],i.selectLayout=e=>{i.field.position=e,i.isAlignmentSelectorShow()?i.field.vertical_align||(i.field.vertical_align="top"):i.field.vertical_align=""},i.selectAlignment=e=>{i.field.vertical_align=e},i.touchField=function(){i.field.newly_created=!1},i.$watch("upload.file",function(e,t){e!==t&&null!==e&&i.upload(i.upload.file)})}}}]);i(26518);function C(e){if(!e)return!0;return new RegExp("^(\\s*(Default Choice|Second Choice)\\s*)+$","i").test(e)}angular.module("waiverforeverApp.templateBuilder").directive("multipleChoiceFieldDetails",["WFTemplateHelper","WFApiClient","toastr","$timeout",function(e,t,n,l){return{restrict:"AE",scope:{field:"=",isInternal:"<",payment:"="},template:i(78278),link:function(i,a){i.field.choices=i.field.choice_list.join("\n"),i.aiGenerating=!1,i.cancel=()=>{},i.generatingText=i18next.t("Generating..."),i.aiGeneration=function(){(0,o.sendClickEvent)("Builder_ClickAIGenerateMultipleChoice");const e=document.querySelector("#choice-ai-generating-mask-target");!function(){i.aiGenerating=!0,i.field.isLoading=!0;const t=document.querySelector("#choice-ai-generating-mask");t.style.width=e.offsetWidth+"px",t.style.height=e.offsetHeight+"px"}();const l=new Promise(e=>{i.cancel=()=>{(0,o.sendClickEvent)("Builder_ClickAIGenerateChoiceCancel"),e()}}),a=t.post("waiverTemplate/generateMultipleChoiceFieldChoicesByAI",{title:i.field.title_text||"",hint:i.field.hint_text||"",current_options:i.field.choice_list});return Promise.race([l,a]).then(e=>{e&&e.data.result&&e.data.success&&(C(i.field.choices)?i.field.choice_list=e.data.success:i.field.choice_list=(i.field.choice_list||[]).concat(e.data.success),i.field.choices=(i.field.choice_list||[]).join("\n"),i.onChoicesChange())}).catch(e=>{n.error(i18next.t("AI generation failed. Please try again later."))}).finally(()=>{i.aiGenerating=!1,i.field.isLoading=!1,i.$apply()})},i.initDefaults=function(){const e=i.field.choice_list||[];i.field.default_value&&i.field.default_value.length===e.length||(i.field.default_value=e.map(function(){return!1}))},i.onChoicesChange=function(t){i.newly_created=!1,i.field.choice_list=i.field.choices.split("\n"),i.field.default_value=(i.field.choice_list||[]).map(function(){return!1}),e.resetField(i.field)},i.defaultSelected=function(){e.prefillField(i.field)},i.onChoiceChange=function(e,t){const n=(i.field.choice_list||[]).concat();n[e]=t,l(()=>{i.field.choice_list=n},0)},i.onPriceChange=function(e,t){const n=(i.field.price_list||[]).concat();n[e]=t,l(()=>{i.field.price_list=n},0)},i.onAdd=function(){const e=(i.field.choice_list||[]).concat();e.push("");const t=(i.field.price_list||[]).concat();t.push(0);const n=(i.field.default_value||[]).concat();n.push(!1),l(()=>{i.field.choice_list=e,i.field.price_list=t,i.field.default_value=n},0)},i.onRemove=function(e){const t=(i.field.choice_list||[]).concat();t.splice(e,1);const n=(i.field.price_list||[]).concat();n.splice(e,1);const a=(i.field.default_value||[]).concat();a.splice(e,1),l(()=>{i.field.choice_list=t,i.field.price_list=n,i.field.default_value=a},0)},i.onMove=function(e,t){if(e===t)return;const n=(i.field.choice_list||[]).concat(),[a]=n.splice(e,1);n.splice(t,0,a);const d=(i.field.price_list||[]).concat(),[o]=d.splice(e,1);d.splice(t,0,o);const c=(i.field.default_value||[]).concat(),[s]=c.splice(e,1);c.splice(t,0,s),l(()=>{i.field.choice_list=n,i.field.price_list=d,i.field.default_value=c},0)}
1,i.initDefaults(),i.$watch("field.allow_other_choice",function(t){i.field&&e.prefillField(i.field)}),i.$watch("field.default_value",function(t){i.field&&e.prefillField(i.field)}),i.$watch("field.locked_field",function(e){e&&i.field.renew_field&&(i.field.renew_field=!1)}),i.$watch("field.renew_field",function(e){e&&i.field.locked_field&&(i.field.locked_field=!1)})}}}]);i(53849);angular.module("waiverforeverApp.templateBuilder").directive("phoneFieldDetails",[function(){return{restrict:"AE",scope:{field:"=",isInternal:"<"},template:i(89333),link:function(e){e.codes=b,e.$watch("field.default_value",()=>{var t=e.field;t&&(t.phone=t.default_value?t.default_value.trim():"")}),e.$watch("field.show_country_code",e=>{e&&(0,o.sendClickEvent)("tb_checkShowCountryCode","1")}),e.$watch("field.validate_phone_number",e=>{e&&(0,o.sendClickEvent)("tb_checkOnlyAllowValidPhoneNumber","1")}),e.$watch("field.enable_custom_country_code",e=>{e&&(0,o.sendClickEvent)("tb_checkAllowUserToChooseCountryCode","1")}),e.$watch("field.locked_field",function(t){t&&e.field.renew_field&&(e.field.renew_field=!1)}),e.$watch("field.renew_field",function(t){t&&e.field.locked_field&&(e.field.locked_field=!1)})}}}]);i(56598),i(5264),i(37528);angular.module("waiverforeverApp.templateBuilder").directive("singleChoiceFieldDetails",["WFTemplateHelper","WFApiClient","toastr","$timeout",function(e,t,n,l){return{restrict:"AE",scope:{field:"=",isInternal:"<",payment:"="},template:i(3218),link:function(i,a){i.field.choices=i.field.choice_list.join("\n"),i.aiGenerating=!1,i.cancel=()=>{},i.generatingText=i18next.t("Generating..."),i.aiGeneration=function(){(0,o.sendClickEvent)("Builder_ClickAIGenerateSingleChoice");const e=document.querySelector("#choice-ai-generating-mask-target");!function(){i.aiGenerating=!0,i.field.isLoading=!0;const t=document.querySelector("#choice-ai-generating-mask");t.style.width=e.offsetWidth+"px",t.style.height=e.offsetHeight+"px"}();const l=new Promise(e=>{i.cancel=()=>{(0,o.sendClickEvent)("Builder_ClickAIGenerateChoiceCancel"),e()}}),a=t.post("waiverTemplate/generateMultipleChoiceFieldChoicesByAI",{title:i.field.title_text||"",hint:i.field.hint_text||"",current_options:i.field.choice_list});return Promise.race([l,a]).then(e=>{e&&e.data.result&&e.data.success&&(C(i.field.choices)?i.field.choice_list=e.data.success:i.field.choice_list=(i.field.choice_list||[]).concat(e.data.success),i.field.choices=(i.field.choice_list||[]).join("\n"),i.onChoicesChange())}).catch(e=>{n.error(i18next.t("AI generation failed. Please try again later."))}).finally(()=>{i.aiGenerating=!1,i.field.isLoading=!1,i.$apply()})},i.initDefaults=function(){const e=i.field.choice_list||[];i.field.default_value&&i.field.default_value.length===e.length||(i.field.default_value=e.map(function(){return!1}))},i.onChoicesChange=function(t){i.field.newly_created=!1,i.field.choice_list=i.field.choices.split("\n"),i.field.default_value=(i.field.choice_list||[]).map(function(){return!1}),e.resetField(i.field)},i.defaultSelected=function(t){if(i.field.default_value[t])for(var n=0;n<i.field.default_value.length;n++)n!=t&&(i.field.default_value[n]=!1);e.prefillField(i.field)},i.onChoiceChange=function(e,t){const n=(i.field.choice_list||[]).concat();n[e]=t,l(()=>{i.field.choice_list=n},0)},i.onPriceChange=function(e,t){const n=(i.field.price_list||[]).concat();n[e]=t,l(()=>{i.field.price_list=n},0)},i.onAdd=function(){const e=(i.field.choice_list||[]).concat();e.push("");const t=(i.field.price_list||[]).concat();t.push(0);const n=(i.field.default_value||[]).concat();n.push(!1),l(()=>{i.field.choice_list=e,i.field.price_list=t,i.field.default_value=n},0)},i.onRemove=function(e){const t=(i.field.choice_list||[]).concat();t.splice(e,1);const n=(i.field.price_list||[]).concat();n.splice(e,1);const a=(i.field.default_value||[]).concat();a.splice(e,1),l(()=>{i.field.choice_list=t,i.field.price_list=n,i.field.default_value=a},0)},i.onMove=function(e,t){if(e===t)return;const n=(i.field.choice_list||[]).concat(),[a]=n.splice(e,1);n.splice(t,0,a);const d=(i.field.price_list||[]).concat(),[o]=d.splice(e,1);d.splice(t,0,o);const c=(i.field.default_value||[]).concat(),[s]=c.splice(e,1);c.splice(t,0,s),l(()=>{i.field.choice_list=n,i.field.price_list=d,i.field.default_value=c},0)},i.initDefaults(),i.$watch("field.dropdown_style",function(t){i.field&&(t&&i.field.allow_other_
1choice&&(i.field.allow_other_choice=!1),e.prefillField(i.field))}),i.$watch("field.allow_other_choice",function(t){i.field&&(t&&(i.field.dropdown_style=!1),e.prefillField(i.field))}),i.$watch("field.default_value",function(t){i.field&&e.prefillField(i.field)}),i.$watch("field.locked_field",function(e){e&&i.field.renew_field&&(i.field.renew_field=!1)}),i.$watch("field.renew_field",function(e){e&&i.field.locked_field&&(i.field.locked_field=!1)})}}}]);i(91933),i(52523);var M=i(37953),I=i(2736),S=i.n(I),A=i(47617),P=i(55170);const $=e=>{let{showLineItem:t=!0,showSubTotal:i=!0,additionalFees:n=[]}=e;return(0,M.useEffect)(async()=>{const e=await(0,P.K)(SQUARE_APP_ID);(await e.card()).attach("#square-card-container")},[]),M.createElement("div",{className:"payment-summary"},M.createElement("div",{className:"payment-summary-title"},M.createElement("span",null,"Payment")),M.createElement("div",{className:"payment-summary-content"},t&&M.createElement("div",{className:"payment-item"},M.createElement("div",{className:"item-label"},"Line item 1:"),M.createElement("div",{className:"item-value"},"$0.00")),i&&M.createElement("div",{className:"payment-item subtotal"},M.createElement("div",{className:"item-label"},"Subtotal:"),M.createElement("div",{className:"item-value"},"$0.00")),n.length>0&&M.createElement(M.Fragment,null,M.createElement("div",{className:"payment-item additional-fees-header"},M.createElement("div",{className:"item-label"},"Additional Fees:")),n.map((e,t)=>e.label?M.createElement("div",{key:t,className:"payment-item"},M.createElement("div",{className:"item-label"},e.label,":"),M.createElement("div",{className:"item-value"},"$0.00")):null)),M.createElement("hr",{className:"payment-divider"}),M.createElement("div",{className:"payment-item total"},M.createElement("div",{className:"item-label"},"Amount Due:"),M.createElement("div",{className:"item-value"},"$0.00")),M.createElement("div",{className:"credit-card-section",id:"square-card-container"})))};$.propTypes={showLineItem:S().bool,showSubTotal:S().bool,additionalFees:S().arrayOf(S().shape({label:S().string,price:S().string}))};const D=(0,A.react2angular)($,["showLineItem","showSubTotal","additionalFees"]);var E=i(68650),H=i.n(E),q=i(28524),R=i(16005),L=i(50435),N=i(26236),B=i(39536),G=i(63060),O=i(12157),V=i(39457);function U(e){let{children:t}=e;const i=(0,M.useContext)(G.M);return i&&i.dragDropManager?M.createElement(M.Fragment,null,t):M.createElement(O.Q,{backend:V.Ay},t)}var W=i(3720);const Y="fee",z=e=>{let{fee:t,index:i,moveItem:n,handleLabelChange:l,handleFixedChange:a,handleRateChange:d,onRemove:o,currency:c}=e;const[{isDragging:s},r]=(0,N.i)({item:{type:Y,index:i},collect:e=>({isDragging:e.isDragging()})}),[,p]=(0,B.H)({accept:Y,hover(e){e.index!==i&&(n(e.index,i),e.index=i)}});return M.createElement("li",{ref:e=>r(p(e)),className:"additional-fee-item",style:{opacity:s?.5:1}},M.createElement("div",{className:"fee-input-row"},M.createElement("input",{className:"fee-label-input",placeholder:"Label",type:"text",value:t.label||"",onChange:e=>l(i,e.target.value)}),M.createElement("div",{className:"fee-fixed-input-container"},c&&M.createElement("div",{className:"fee-currency-prefix"},(0,W.Q)(c)),M.createElement(q.A,{className:"fee-fixed-input",value:t.fixed,min:0,hideControls:!0,onChange:e=>{a(i,e)},isPrice:!0})),M.createElement(R.A,{className:"fee-rate-input",placeholder:"%",value:t.rate,min:0,max:100,precision:2,formatter:e=>`${e} %`,parser:e=>e.replace("%",""),controls:!1,onChange:e=>d(i,e)}),M.createElement("button",{className:"fee-delete-btn",onClick:()=>o(i)}
1,M.createElement("i",{className:"fa fa-trash"})),M.createElement("i",{className:"fa fa-bars",style:{cursor:"move",marginRight:"8px"}})))};function j(e){let{fees:t=[],onUpdate:i,onAdd:n,onRemove:l,onMove:a,currency:d}=e;const{t:o}=(0,L.Bd)(),c=(e,t)=>{i(e,{label:t})},s=(e,t)=>{i(e,{fixed:t})},r=(e,t)=>{i(e,{rate:t})},p=(e,t)=>{if(e!==t)if("function"!=typeof a)try{i("move",{fromIndex:e,toIndex:t})}catch(e){console.error("Error during item move:",e)}else a(e,t)};return M.createElement("div",null,M.createElement(U,null,M.createElement("ul",{className:"additional-fee-list"},t.map((e,t)=>M.createElement(z,{key:t,fee:e,index:t,moveItem:p,handleLabelChange:c,handleFixedChange:s,handleRateChange:r,onRemove:l,currency:d})))),M.createElement("button",{className:"wf-button-secondary-small add-fee-btn",onClick:n},M.createElement("i",{className:"fa fa-plus"})," ",o("Add Fee")))}z.propTypes={fee:S().shape({label:S().string,fixed:S().number,rate:S().number}).isRequired,index:S().number.isRequired,moveItem:S().func.isRequired,handleLabelChange:S().func.isRequired,handleFixedChange:S().func.isRequired,handleRateChange:S().func.isRequired,onRemove:S().func.isRequired,currency:S().string},j.propTypes={fees:S().arrayOf(S().shape({label:S().string,fixed:S().number,rate:S().number})),onUpdate:S().func.isRequired,onAdd:S().func.isRequired,onRemove:S().func.isRequired,onMove:S().func,currency:S().string};const K=(0,A.react2angular)(j,["fees","onUpdate","onAdd","onRemove","onMove","currency"]);angular.module("waiverforeverApp.templateBuilder").component("additionalFeeList",K);class J{static $inject=["$scope","$timeout","WFApiClient","Confirmation","toastr"];constructor(e,t,i,n,l){this.$scope=e,this.$timeout=t,this.WFApiClient=i,this.Confirmation=n,this.toastr=l,this.addFee=this.addFee.bind(this),this.removeFee=this.removeFee.bind(this),this.updateFee=this.updateFee.bind(this),this.moveFee=this.moveFee.bind(this),this.connect=this.connect.bind(this),this.changeAccount=this.changeAccount.bind(this),this.disconnect=this.disconnect.bind(this),this.isTogglingSquare=!1,this.additionalFeeTooltip=i18next.t("What are Additional Fees?<br><br>You can add extra charges to the total amount using fixed dollar values, percentages, or both.<br><br>- Fixed ($): Adds a specific amount (e.g., 10 means $10).<br>- Percentage (%): Adds a percentage of the subtotal (e.g., 5 means 5% of subtotal).<br>- Both filled: The fee will be the sum of fixed + percentage.<br><br>Example:<br>If subtotal = $400, and you set:<br>  - Tax: 5% → $20<br>  - Processing Fee: $10 + 10% → $50<br>  - → Final total = $470<br><br>Explanation:<br>  - Tax is a percentage-based fee.<br>  - Processing Fee includes a fixed admin cost ($10) and a percentage service charge (10%).")}normalizePayment(){this.payment||(this.payment={});const e=this.payment;e.location=e.location||{},e.settings={show_subtotal:!0,show_line_items:!0,...e.settings||{}},Array.isArray(e.additional_fees)||(e.additional_fees=[])}$onInit(){this.normalizePayment(),!this.payment.currency&&this.squareSettings?.enabled&&this.squareSettings?.locations?.length>0&&this.$timeout(()=>{this.payment.currency=this.squareSettings.locations[0].currency||"USD"},0),this.$scope.$watch(()=>this.payment?.location?.id,e=>{if(!e)return;const t=this.squareSettings?.locations?.find(t=>t.id===e);t&&this.$timeout(()=>{this.payment.location={id:t.id,name:t.name},t.currency&&this.payment.currency!==t.currency&&(this.payment.currency=t.currency)},0)})}connect(){this.isTogglingSquare||(this.isTogglingSquare=!0,window.location.href=this.squareSettings.authorize_uri)}changeAccount(){this.isTogglingSquare||this.Confirmation.confirm({title:i18next.t("Change Square Account"),message:i18next.t("This will disconnect your current Square account and redirect you to connect a new one."),confirm:i18next.t("Change Account"),cancel:i18next.t("Cancel")}).then(()=>{this.isTogglingSquare=!0,this.WFApiClient.post("accountSettings/updateIntegration",{platform:"square",action:"disable"}).then(e=>{e.data.result&&(window.location.href=this.squareSettings.authorize_uri)}).catch(()=>{this.toastr.error(i18next.t("Failed to change account. Please try again."))}).finally(()=>{this.isTogglingSquare=!1})})}disconnect(){this.isTogglingSquare||this.Confirmation.confirm({title:i18next.t("Confirm to disconnect Square?"),message:i18next.t("If confirm, please remember to manually remove any payment fields you've added to your templates. For your security, forms with active payment fields will be temporarily blocked from submissions until those fields are removed."),confirm:i18next.t("Confirm"),cancel:i18next.t("Cancel")}).then(()=>{this.isTogglingSquare=!0,this.WFApiClient.post("accountSettings/updateIntegration",{platform:"square",action:"disable"}).then(e=>{e.data.result&&(this.toastr.success(i18next.t("Successfully disconnected from Square")),this.$scope.$emit("squareDisconnected"))}).catch(()=>{this.toastr.error(i18next.t("Failed to disconnect. Please try again."))}).finally(()=>{this.isTogglingSquare=!1})})}addFee(){const e=this.payment.additional_fees.concat();e.push({label:"",fixed:0,rate:0}),this.$timeout(()=>{this.payment.additional_fees=e},0)}removeFee(e){if(e>=0&&e<this.payment.additional_fees.length){const t=this.payment.additional_fees.concat();t.splice(e,1),this.$timeout(()=>{this.payment.additional_fees=t},0)}}updateFee(e,t){if(e>=0&&e<this.payment.additional_fees.length){const i=this.payment.additional_fees.concat(),n=i[e];Object.assign(n,t),this.$timeout(()=>{this.payment.additional_fees=i},0)}}moveFee(e,t){if(e!==t&&e>=0&&t>=0&&e<this.payment.additional_fees.length&&t<this.payment.additional_fees.length){const i=this.payment.additional_fees.concat(),[n]=i.splice(e,1);i.splice(t,0,n),this.$timeout(()=>{this.payment.additional_fees=i},0)}}}J.$inject=["$scope","$timeout","WFApiClient","Confirmation","toastr"],angular.module("waiverforeverApp.templateBuilder").component("paymentSetting",{bindings:{squareSettings:"<",payment:"="},template:H(),controller:J,controllerAs:"vm"});const Z="choice",Q=e=>{let{choice:t,price:i,index:n,moveItem:l,onChoiceChange:a,onPriceChange:d,onRemove:o,currency:c}=e;const[{isDragging:s},r]=(0,N.i)({item:{type:Z,index:n},collect:e=>({isDragging:e.isDragging()})}),[,p]=(0,B.H)({accept:Z,hover(e){e.index!==n&&(l(e.index,n),e.index=n)}});return M.createElement("div",{className:"choice-list-item",ref:e=>r(p(e)),style:{opacity:s?.5:1}},M.createElement("div",{className:"choice-list-item-choice"},M.createElement("input",{value:t,onChange:e=>a(n,e.target.value)})),M.createElement("div",{className:"choice-list-item-price"},c&&M.createElement("div",{className:"price-currency-prefix"},(0,W.Q)(c)),M.createElement(q.A,{value:i,hideControls:!0,onChange:e=>{d(n,e)},isPrice:!0})),M.createElement("button",{className:"delete-choice-button",onClick:()=>o(n)}
1,M.createElement("i",{className:"fa fa-trash"})),M.createElement("i",{className:"fa fa-bars drag-handle",style:{cursor:"move"}}))};function X(e){let{choices:t,priceList:i,onChoiceChange:n,onPriceChange:l,onAdd:a,onRemove:d,onMove:o,currency:c}=e;const{t:s}=L.Bd?(0,L.Bd)():{t:e=>e},r=(e,t)=>{e!==t&&("function"!=typeof o||o(e,t))};return M.createElement("div",{className:"choice-with-price-list"},M.createElement("div",{className:"choice-list-title"},M.createElement("span",{className:"choice-title"},"Choice"),M.createElement("span",{className:"price-title"},"Price")),M.createElement(U,null,M.createElement("ul",{className:"choice-list"},t.map((e,t)=>M.createElement(Q,{key:t,choice:e,price:i?.[t],index:t,moveItem:r,onChoiceChange:n,onPriceChange:l,onRemove:d,currency:c})))),M.createElement("button",{className:"wf-button-secondary-small add-choice-btn",onClick:a},M.createElement("i",{className:"fa fa-plus"})," ",s("Add Option")))}Q.propTypes={choice:S().string,price:S().number,index:S().number,moveItem:S().func,onChoiceChange:S().func,onPriceChange:S().func,onRemove:S().func,currency:S().string},X.propTypes={choices:S().array,priceList:S().array,onChoiceChange:S().func,onPriceChange:S().func,onAdd:S().func,onRemove:S().func,onMove:S().func,currency:S().string};const ee=(0,A.react2angular)(X,["choices","priceList","onChoiceChange","onPriceChange","onAdd","onRemove","onMove","currency"]);var te=i(62409);angular.module("waiverforeverApp.templateBuilder").component("paymentSummary",D),angular.module("waiverforeverApp.templateBuilder").component("choiceWithPriceList",ee);const ie=angular.module("waiverforeverApp.templateBuilder").controller("TemplateBuilderBaseController",["$scope","$uibModal","$timeout","$state","Confirmation","authenticator","$window","WFTemplateHelper","WFDateHelper","toastr","$rootScope","WFApiClient","$transition$","onboardingTaskManager",function(e,t,c,s,r,p,u,f,g,m,h,v,b,_){e.title=i18next.t("Template Builder"),e.isLoadingTemplate=!1,e.isSavingTemplate=!1,e.isCloningTemplate=!1,e.isDisablingTemplate=!1,e.raw_content={},e.temp_content={},e.has_unsavedChanges=!1,e.fields=[],e.editorVersion=d.pX,e.supported=!0,e.selectedField=null,e.editConsent=!1,e.selectedFieldParent=null,e.waiverEditorControl={},e.currentStep="build",e.isPdfModalShow=!1,e.pdfMappingInfo=null,e.isSavingDraft=!1,e.isDiscardingDraft=!1,e.isPdfMappingEnabled=!1,e.isAttachmentEnabled=!1,e.isAttachmentTipClosed=!1,e.mappedFields={},e.usedInLogicFields={},e.sendGtag=o.sendPoweredBy,e.aiRecordId=null,e.isCnMarket=h.isCnMarket,e.ongoingTask=_.getOngoingTask(),e.onboardingHints={dateField:"add_a_date_field"===e.ongoingTask?.task?.task_id,publishTemplate:"publish_your_template"===e.ongoingTask?.task?.task_id,signWaiver:"test_sign_your_waiver"===e.ongoingTask?.task?.task_id},e.publishBtnClicked=!1,e.enableInternalForm=null,e.isInternal=!1,e.isPaymentSummaryShown=!1,e.isPaymentSettingViewShown=!1,e.squareSettings={},e.payment={},e.non_internal_payment=null,e.non_internal_submit_content=null,e.isMobileView=u.innerWidth<=768,e.isFieldListOpen=!1,e.activeField=null,e.activeFieldParent=null;const x="attachment_tip_closed";function y(e){return e&&"object"==typeof e&&Array.isArray(e.doc_content)}function w(t){const i=angular.copy(t);return i.version||(i.version=e.editorVersion),i}function k(e){return f.resetTemplate(e),f.prefillDefaults(e,{prefillContainerFields:!0}),e}function T(t){return null!=t?.version&&f.versionCompare(String(t.version),e.editorVersion)>0}function F(t,i,n,l){var a=t.splice(i,1)[0];t.splice(n,0,a),e.fieldMoved(a,l,!0)}function C(e){c(function(){var t=angular.element(document.getElementById("preview-form")),i=angular.element(document.getElementById(e));t.scrollToElementAnimated(i,100)},100)}function M(e){return()=>{const t=document.getElementById("preview-form"),i=t.scrollTop;e(),setTimeout(()=>{t.scrollTop=i},0)}}function I(e){if(!e)return!1;const t=document.querySelector(".template-editor"),i=document.querySelector(".field-detail-view");return t&&t.contains(e)||i&&i.contains(e)}function S(e){return("INPUT"===e.nodeName&&"text"===e.type||"TEXTAREA"===e.nodeName)&&I(e)}
1function A(e){return"DIV"===e.nodeName&&e.classList.contains("fr-element")&&I(e)}e.virtualSeparator={},e.undoShortcutTooltip=(0,a.g)(),e.redoShortcutTooltip=(0,a.k)(),e.isOnlineVersion=function(){return e.isInternal?!e.non_internal_raw_content?.is_draft&&!e.has_unsavedChanges&&e.templateInfo?.hasHistoryRev:!e.raw_content?.is_draft&&!e.has_unsavedChanges&&e.templateInfo?.hasHistoryRev},e.showDraftBtn=function(){return!e.isLoadingTemplate&&h.currentUser.context.ADMIN_IMPERSONATING},e.updateMobileViewState=function(){const t=u.innerWidth<=768,i=e.isMobileView;e.isMobileView=t,t||(e.isFieldListOpen=!1),i&&!t&&(e.activeField=null,e.activeFieldParent=null)},e.handleMobileResize=function(){e.$applyAsync(()=>{e.updateMobileViewState()})},e.toggleAddFieldDrawer=function(t){e.isMobileView&&(e.isFieldListOpen="boolean"==typeof t?t:!e.isFieldListOpen)},e.setActiveField=function(t,i){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e.activeField=t,e.activeFieldParent=i,e.isMobileView&&n&&t){const e=i?`field-id-${i.id}-${t.id}`:`field-id-${t.id}`;c(()=>{const t=angular.element(document.getElementById("preview-form")),i=angular.element(document.getElementById(e));t.scrollToElementAnimated(i,100)},100)}}
1,e.openFieldSettings=function(t,i){t&&(e.toggleAddFieldDrawer(!1),e.selectField(t,i))},e.getGuideStepsFlag=function(){return!!l.Ar.getItem("builderPageHideGuideSteps")},e.isGuideStepsHidden=e.getGuideStepsFlag(),e.goToStep=function(t){e.currentStep=t,"build"!==t&&(e.selectedField=null)},e.updateTemplateTitle=function(t){e.temp_content.doc_title=t,e.$apply()},e.$watch("temp_content.doc_title",(t,i)=>{t!==i&&(e.templateInfo.latestTitle=t)}),e.disableTempContentObserver=function(){e.tempObserver&&(e.tempObserver(),e.has_unsavedChanges=!1)},e.watchTempContent=function(){e.disableTempContentObserver(),c(function(){e.tempObserver=e.$watch("temp_content",function(t,i){(e.checkPaymentFieldsInTemplate(t),e.has_unsavedChanges)||angular.toJson(e.preparePayload(t,!1))!==angular.toJson(e.preparePayload(i,!1))&&(e.has_unsavedChanges=!0,e.autoSaveDraft())},!0)},1500)},e.watchPayment=function(){e.$watch("payment",function(t,i){t&&i&&(angular.toJson(t)!==angular.toJson(i)&&(e.has_unsavedChanges=!0,e.autoSaveDraft()))},!0)},e.checkPaymentFieldsInTemplate=function(t){if(!t?.doc_content)return e.isPaymentSummaryShown=!1,!1;const i=t.doc_content.some(e=>"container_field"!==e.type?e.is_price:e.fields?.some(e=>e.is_price));return e.isPaymentSummaryShown=i,e.isPaymentSummaryShown&&!e.payment&&(e.payment=e.getDefaultPayment()),e.isPaymentSummaryShown||(e.payment=null),i},e.$on("$stateChangeStart",function(t){e.has_unsavedChanges&&(confirm(i18next.t("You have unsaved modifications, Are you sure you want to leave?"))||t.preventDefault())}),u.onbeforeunload=function(t){if("app.waiverTemplateRoot.templateBuilder"===s.current.name){if(e.has_unsavedChanges)return i18next.t("You have unsaved modifications, Are you sure you want to leave?");t.preventDefault()}else t.preventDefault()},e.generateId=function(){for(var e="abcdefghiklmnopqrstuvwxyz",t="",i=0;i<12;i++){var n=Math.floor(25*Math.random());t+=e.substring(n,n+1)}return t},e.initFields=function(){e.fields=[],e.specialFields=[],e.personalInfoFields=[],e.basicFields=[],e.paymentFields=[],e.virtualSeparatorField=f.separatorFieldTemplate();var t=f.nameFieldTemplate();t.title_text=i18next.t("name of minor"),t.newly_created=!0;var i=f.nameFieldTemplate();i.title_text=i18next.t("name of guardian"),i.newly_created=!0;var n=f.signatureFieldTemplate();n.title_text=i18next.t("signature of guardian"),n.newly_created=!0;var l=f.containerFieldTemplate();l.fields.push(t),l.fields.push(i),l.fields.push(n),e.personalInfoFields=[{name:"Name",fieldTemplate:f.nameFieldTemplate()},{name:"Address",fieldTemplate:f.addressFieldTemplate()},{name:"Email",fieldTemplate:f.emailFieldTemplate()},{name:"Phone",fieldTemplate:f.phoneFieldTemplate()},{name:"Age",fieldTemplate:f.ageFieldTemplate()},{name:"Signature",fieldTemplate:f.signatureFieldTemplate()}],e.basicFields=[{name:"Date",fieldTemplate:f.dateFieldTemplate()},{name:"Text",fieldTemplate:f.htmlFieldTemplate()},{name:"Image",fieldTemplate:f.htmlFieldWithImageTemplate()},{name:"Take Picture",icon:"picture.svg",tooltip:i18next.t("Let signers upload or capture one picture while filling out this waiver."),fieldTemplate:f.pictureFieldTemplate()},{name:"Checkbox",fieldTemplate:f.checkboxFieldTemplate()},{name:"Number",fieldTemplate:f.numberFieldTemplate()},{name:"Short Answer",fieldTemplate:f.shortAnswerFieldTemplate()},{name:"Single Choice",fieldTemplate:f.singleChoiceFieldTemplate()},{name:"Multiple Choice",fieldTemplate:f.multipleChoiceFieldTemplate()},{name:"Initial",fieldTemplate:f.initialFieldTemplate()}],e.paymentFields=[{name:"Single Choice Pricing",fieldTemplate:f.singleChoicePricingFieldTemplate()},{name:"Multiple Choice Pricing",fieldTemplate:f.multipleChoicePricingFieldTemplate()},{name:"Price",fieldTemplate:f.priceFieldTemplate()}],e.specialFields=[{name:"Container",fieldTemplate:l,tooltip:i18next.t("containerFieldTooltip")},{name:"Separator",fieldTemplate:f.separatorFieldTemplate()}]},e.generateIdForField=function(t){t.id=e.generateId(),"container_field"===t.type&&angular.forEach(t.fields,function(t){t.id=e.generateId()})},e.generateUidForField=function(e){if(e){let t=(new Date).getTime();e.uid="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var i=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?i:3&i|8).toString(16)})}return e},e.copyField=function(t){let i=angular.copy(t);
1if(i.newly_created=!0,e.generateIdForField(i),i=e.generateUidForField(i),f.resetField(i),f.prefillField(i),"separator_field"===i.type){var n=te.filter(e.temp_content.doc_content,function(e){return"separator_field"===e.type}).length+1;i.title_text=i18next.t("Page ")+n}return i},e.addField=function(t,i){var n=e.copyField(t);n.newly_created=!0,e.temp_content.doc_content.push(n),c(function(){e.isMobileView?(e.setActiveField(n,null,!0),e.toggleAddFieldDrawer(!1)):e.selectField(n,null)},100),e.handleFieldAddedOnBoardingTask(t),m.success(i18next.t("{{fieldName}} Field added to your template.",{fieldName:i18next.t(i)})),e.fieldModified(t)},e.duplicateField=function(){var t=e.copyField(e.selectedField),i=e.findFieldParentList(e.selectedField),n=i.indexOf(e.selectedField);n=n<0?0:n+1,i.splice(n,0,t),e.fieldModified(t)},e.findFieldParentList=function(t){var i=e.temp_content.doc_content;return angular.forEach(e.temp_content.doc_content,function(e){e!==t&&"container_field"===e.type&&angular.forEach(e.fields,function(n){n===t&&(i=e.fields)})}),i},e.generateUidIfEmpty=function(t){Array.isArray(t?.doc_content)&&t.doc_content.forEach(t=>{t.uid||e.generateUidForField(t)})},e.updateMappedFields=function(){e.pdfMappingInfo&&(e.mappedFields=e.pdfMappingInfo.rules.rules.reduce((e,t)=>(e[t.source.sub_uid||t.source.uid]=!0,e),{}))},e.updateLogicFields=function(){e.usedInLogicFields={},e.raw_content?.doc_content&&function t(i){if(!i)return;i.forEach(i=>{i.logic&&i.logic.conditions&&i.logic.conditions.forEach(t=>{const i=t.source.sub_uid||t.source.uid;e.usedInLogicFields[i]=!0}),i.fields&&t(i.fields)})}(e.raw_content.doc_content)},e.getTemplate=async function(t){const i=!t&&s.params.generateTemplateByAI&&s.params.aiTemplate;t||(e.isLoadingTemplate=!0,e.raw_content={},e.temp_content={}),e.supported=!0;try{const i=await v.get("waiverTemplate/getTemplateContent");if(i.data.result){const a=i.data.success;e.raw_content=e.isInternal?a.internal_raw_content:a.raw_content;const d=e.isInternal?"internal_raw_content":"raw_content";if(!y(e.raw_content))return n.Cp(new Error("template content missing doc_content"),{tags:{template_content_source:d},extra:{contentType:typeof e.raw_content,docContentType:typeof e.raw_content?.doc_content}}),e.supported=!1,void(t||c(()=>{e.isLoadingTemplate=!1}));try{const t=e.isInternal?"internalTemplateBuilderDraft":"templateBuilderDraft";let i=l.Ar.getItem(t);i&&(i=JSON.parse(i)),i?.account===e.templateId&&(l.Ar.removeItem(t),y(i)&&(e.raw_content=i))}catch(t){n.Cp(t),l.Ar.removeItem(e.isInternal?"internalTemplateBuilderDraft":"templateBuilderDraft")}if(e.raw_content=w(e.raw_content),e.isInternal){if(e.non_internal_raw_content=angular.copy(a.raw_content),e.non_internal_payment=angular.copy(a.payment),e.non_internal_submit_content=null,!T(e.non_internal_raw_content)){const t=w(e.non_internal_raw_content);e.generateUidIfEmpty(t),f.generateGlobalSettingsIfEmpty(t),k(t);let i=e.preparePayload(t);i=e.sanityCheck(i),i.theme&&(i.theme=f.removeThemeProperties(i.theme)),e.non_internal_submit_content=i}}else e.internal_raw_content=a.internal_raw_content;e.pdfMappingInfo=a.pdf_mapping_info,e.isPdfMappingEnabled=a.enable_pdf_mapping,e.isAttachmentEnabled=a.enable_attachment,e.isLogicEnabled=a.enable_logic,e.enableInternalForm=a.enable_internal_form,e.templateInfo.latestTitle=e.raw_content?.doc_title,e.payment=a.payment,e.updateMappedFields(),e.updateLogicFields();const o=angular.copy(e.raw_content);if(e.generateUidIfEmpty(o),f.generateGlobalSettingsIfEmpty(o),e.temp_content=o,e.reCalcSeparators(),f.versionCompare(e.temp_content.version,e.editorVersion)>0)return e.supported=!1,void(t||c(()=>{e.isLoadingTemplate=!1}));k(e.temp_content),e.addHistory(),e.watchTempContent(),c(function(){e.enableHistoryObserver()},1e3)}}catch(e){n.Cp(e)}t||i||c(()=>{e.isLoadingTemplate=!1})},e.getSquareSettings=async function(){try{const t=await v.get("accountSettings/getSettings?fields=square");e.squareSettings=t.data.success.square}catch(e){n.Cp(e)}if(!e.payment&&e.squareSettings.enabled)e.payment=e.getDefaultPayment();else if(e.payment&&e.squareSettings.enabled){const t=e.squareSettings?.locations?.[0];!e.payment.currency&&t?.currency&&(e.payment.currency=t.currency)}e.watchPayment()},e.discardDraft=async function(){if(!e.raw_content.is_draft)return;e.isDiscardingDraft=!0;const l=t.open({animation:!0,backdrop:"static",template:i(99792),controller:"LoadingModalController",size:"sm",windowTopClass:"centered-modal",resolve:{loadingText:()=>
1i18next.t("loading...")}});try{await v.post("waiverTemplate/discardDraft",{document:e.raw_content.doc_key}),await e.getTemplate(!0)}catch(e){n.Cp(e)}e.isDiscardingDraft=!1,l.close()},e.addPicture=function(){e.temp_content.doc_picture_list.push({title:"Picture Title",optional:!0})},e.removePicture=function(t){e.temp_content.doc_picture_list.splice(t,1)},e.removeField=function(){r.confirm({title:i18next.t("Remove Field"),message:i18next.t("Are you sure to remove this field?")}).then(()=>{var t=e.selectedField,i=e.findFieldParentList(t),n=i.findIndex(t=>t.id===e.selectedField.id);i.splice(n,1),e.fieldModified(t),i.length>n?e.selectField(i[n],e.selectedFieldParent):i.length>0?e.selectField(i[i.length-1],e.selectedFieldParent):null!=e.selectedFieldParent?e.selectField(e.selectedFieldParent):(e.selectedField=null,e.selectedFieldParent=null)})},e.preparePayload=function(t){let i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];var n=angular.copy(t);n.version=e.editorVersion;var l=[];return angular.forEach(n.doc_content,function(t,n){if("container_field"===t.type){var a=[];angular.forEach(t.fields,function(t){var n=e.prepareField(t);i&&!n.uid&&(n=e.generateUidForField(n)),a.push(n)}),t.fields=a}var d=e.prepareField(t);d.id=n,i&&!d.uid&&(d=e.generateUidForField(d)),l.push(d)}),n.doc_content=l,n},e.prepareField=function(e){"phone_field"===e.type&&e.validate_phone_number?(!e.country_code||e.country_code.length<=0)&&(e.country_code="US"):"single_choice_field"===e.type||"multiple_choice_field"===e.type?e.allow_other_choice&&e.choice_list.push("Other"):"date_field"===e.type&&g.normalizeDateFieldRules(e);var t=e.type;if("html_field"===e.type&&e.is_image_field&&(t="html_field_with_image"),"number_field"===e.type&&e.is_price&&(t="price_field"),"single_choice_field"===e.type&&e.is_price&&(t="single_choice_pricing_field"),"multiple_choice_field"===e.type&&e.is_price&&(t="multiple_choice_pricing_field"),t in f.fieldTemplateMap){var i=te.keys(f.fieldTemplateMap[t]());return te.pick(e,i)}return e},e.validate=function(){return e.waiverEditorControl.validate()},e.previewTemplate=async function(){var t=e.validateTemplate();if(""!==t)return void r.confirm({title:i18next.t("Incompleted Template"),message:t,hideCancel:!0});try{await e.checkUntouchedField()}catch(e){return}const i=e.preparePayload(e.temp_content);if(e.isLogicEnabled||(i.doc_content=f.removeFieldLogic(i.doc_content)),e.isAttachmentEnabled||(i.doc_picture_list=[]),l.Ar.setItem("waiverViewer",JSON.stringify(i)),e.pdfMappingInfo&&e.isPdfMappingEnabled){const t={rules:e.pdfMappingInfo.rules,pdfKey:e.pdfMappingInfo.pdf_key};l.Ar.setItem("waiverViewerMappingInfo",JSON.stringify(t))}else l.Ar.removeItem("waiverViewerMappingInfo");e.payment&&e.isPaymentSummaryShown?l.Ar.setItem("waiverViewerPayment",JSON.stringify(e.payment)):l.Ar.removeItem("waiverViewerPayment"),window.open(s.href("waiverViewer"),"_blank")},e.validateTemplate=function(){var t="";null!==e.temp_content.doc_title&&e.temp_content.doc_title.length>0||(t+=`<div>${i18next.t("Template title is required.")}</div><br/>`);var i=!0;te.forEach(e.temp_content.doc_picture_list,function(e){null!==e.title&&0!==e.title.length||(i=!1)}),i||(t+=`<div>${i18next.t("Picture title is required for each picture.")}</div><br/>`);var n=te.filter(e.temp_content.doc_content,function(e){return"container_field"===e.type}),l=!0;return te.forEach(n,function(e){if(null!==e.title&&0!==e.title.length||(l=!1,t+=`<div>${i18next.t("Title is required for each container field")}</div><br/>`),e.count>=0&&e.count<=e.max_count&&e.count>=e.min_count&&e.max_count>e.min_count||(l=!1,t+=`<div>${i18next.t("Please make sure max >= count >= min >= 0 for each container field")}</div><br/>`),e.fields.length<=0&&(l=!1,t+=`<div>${i18next.t("fields should not be empty for each container field")}</div><br/>`),!l)return!1;te.forEach(e.fields,function(e,t){e.id=t})}),t},e.checkIfNeedUpdateApp=function(){return new Promise(function(t,i){if(!(f.versionCompare(e.editorVersion,e.temp_content.version)>0))return t(!1);v.get("devices/getDevices").then(function(e){e.data.result&&e.data.success.devices.length>0?t(!0):t(!1)}).catch(function(e){i(e)})})},e.publish=async function(){if(e.isSavingTemplate)return;const n=e.validateTemplate();if(""!==n)return void r.confirm({title:i18next.t("Incompleted Template"),message:n,hideCancel:!0});if(!e.validatePaymentSetting())return Promise.reject();try{await e.checkUntouchedField(),e.isInternal&&await e.checkEmptyInternalForm()}catch(e){return}const l=await e.checkIfNeedUpdateApp();return t.open({animation:!0,template:i(4836),controller:"ConfirmSavingModalController",size:"sm",windowTopClass:"confirm-saving-modal-window",resolve:{message(){var e=`<p>${i18next.t("Please confirm to publish/update this template.")}</p>`;return l&&(e+=`<p>${i18next.t("<b>Attention:</b> You added newly introduced fields or features.<br/>Please make sure you have updated our WaiverForever app to the latest version.")}</p>`),e},hidePdfMappingTip:()=>e.pdfMappingInfo,confirmBtnText:()=>e.templateInfo.hasHistoryRev?i18next.t("Update and Publish"):i18next.t("Publish")}}).result.then(async function(t){"goPdfMapping"===t?(await e.updateTemplate({isDraft:!0}),e.goPdfMapping()):await e.updateTemplate({isDraft:!1})})},e.handleClickSaveBtn=async function(){e.publishBtnClicked=!0;const t=e.isPdfMappingEnabled,i=e.pdfMappingInfo||{}
1,n=!i.rules||!i.rules.rules||!i.rules.rules.length;if(t&&i.pdf_url&&n)s.go("app.waiverTemplateRoot.pdfMapping",{noMapping:!0});else{try{await e.publish()}catch(e){return}await e.getTemplateInfo()}},e.untouchedNewlyCreatedFields=function(){const t=te.flatMap(e.temp_content.doc_content,e=>"container_field"===e.type?e.fields:[e]),i=["short_answer_field","html_field","single_choice_field","multiple_choice_field","checkbox_field"];return t.filter(e=>te.includes(i,e.type)).filter(e=>e.newly_created)},e.showUntouchedFieldConfirmation=async function(e){const t=e>1?i18next.t("There are fields that have not been edited, do you want to save the template?"):i18next.t("There is a field that has not been edited, do you want to save the template?");return await r.confirm({message:t,confirm:i18next.t("Yes, I do"),cancel:i18next.t("No, continue editing")})},e.checkUntouchedField=async function(){const t=e.untouchedNewlyCreatedFields();t.length>0&&await e.showUntouchedFieldConfirmation(t.length)},e.openAIGenerator=function(i){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(0,o.sendClickEvent)("Builder_ClickAI");t.open({animation:!0,windowTopClass:"create-template-modal centered-modal",component:"createTemplateModal",resolve:{templateName:function(){return i||e.temp_content.doc_title},generateImmediately:()=>n,pdfKey:function(){return s.params.pdfKey},paymentInfo:()=>e.payment||{currency:"USD"}}}).result.then(t=>{let{fields:i,title:n,aiRecordId:l}=t;e.temp_content.doc_content=i,e.temp_content.doc_title=n,e.aiRecordId=l,e.updateTemplate({isDraft:!0})})},e.applyAITemplate=function(t){t&&"object"==typeof t&&t.fields?(e.temp_content.doc_content=t.fields,t.title&&(e.temp_content.doc_title=t.title),t.ai_record_id&&(e.aiRecordId=t.ai_record_id),e.updateTemplate({isDraft:!0}).then(()=>{e.getTemplate(!0).then(()=>{c(()=>{e.isLoadingTemplate=!1})}).catch(t=>{console.log("Failed to refresh template after applying AI template:",t),e.isLoadingTemplate=!1})}).catch(t=>{console.log("Failed to update template with AI content:",t),e.isLoadingTemplate=!1})):e.openAIGenerator(t,!0)},e.saveDraft=async function(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e.isSavingDraft||e.isSavingTemplate||!e.has_unsavedChanges)return;e.isSavingDraft=!0;const i=e.validateTemplate();if(""!==i)return r.confirm({title:i18next.t("Incompleted Template"),message:i,hideCancel:!0}),void(e.isSavingDraft=!1);if(!t)try{await this.checkUntouchedField()}catch(t){return void(e.isSavingDraft=!1)}await e.updateTemplate({isDraft:!0}),c(()=>{e.isSavingDraft=!1})},e.autoSaveDraft=te.debounce(()=>{h.currentUser.context.ADMIN_IMPERSONATING||e.saveDraft(!0)},5e3,{maxWait:1e4}),e.checkDupeFieldUid=function(t){const i={},n=function(t){return t.forEach(t=>{i[t.uid]&&e.generateUidForField(t),i[t.uid]=!0,t.fields&&n(t.fields)}),t};return n(t)},e.sanityCheck=function(t){const i=angular.copy(t);return i.doc_content=e.checkDupeFieldUid(i.doc_content),i},e.handleUpdateSuccess=function(t,i){e.has_unsavedChanges=!1,e.raw_content=t,e.updateMappedFields(),e.updateLogicFields(),e.isSaved=!0,c(()=>{if(e.isSaved=!1,!i){const t=angular.copy(e.raw_content);e.temp_content=t,f.resetTemplate(e.temp_content),e.aiRecordId=null,e.watchTempContent(),e.openTemplateSavedModal(),_.completeTask("publish_your_template")}},2e3)},e.handleUpdateError=function(t){const i=e.isInternal?"internalTemplateBuilderDraft":"templateBuilderDraft";l.Ar.setItem(i,JSON.stringify(e.temp_content)),e.has_unsavedChanges=!1,r.confirm({title:i18next.t("Cannot save the changes"),message:i18next.t(t?.data?.code||t?.data?.failed||"please check your network connecting and refresh the page"),hideCancel:!0,backdrop:"static",confirm:i18next.t("Refresh")}).then(()=>{location.reload()})},e.handleUpdateFinally=function(){c(()=>{e.isSavingTemplate=!1})},e.validatePaymentSetting=function(){if(e.checkPaymentFieldsInTemplate(e.temp_content)&&!e.squareSettings.enabled)return e.isPaymentSettingViewShown=!0,r.confirm({title:i18next.t("Incomplete Payment Settings"),message:i18next.t("Please connect square account."),hideCancel:!0,
1confirm:i18next.t("Connect Square Account")}),!1;if(e.payment){if(!e.payment.location?.id)return e.isPaymentSettingViewShown=!0,r.confirm({title:i18next.t("Incomplete Payment Settings"),message:i18next.t("PAYMENT_LOCATION_REQUIRED"),hideCancel:!0,confirm:i18next.t("Edit Payment Settings")}),!1;const t=e.payment.additional_fees?.some(e=>!e.label||""===e.label.trim());if(t)return e.isPaymentSettingViewShown=!0,r.confirm({title:i18next.t("Incomplete Payment Settings"),message:i18next.t("Some additional fees are missing labels. Please provide labels for all additional fees before publishing."),hideCancel:!0,confirm:i18next.t("Edit Payment Settings")}),!1;e.payment.currency||(e.payment.currency="USD")}return!0},e.updateTemplate=function(t){let{isDraft:i,sampleId:n,shareCode:l}=t;if(e.isSavingTemplate)return;let a=e.preparePayload(e.temp_content);a=e.sanityCheck(a),a.is_draft=i,a.theme&&(a.theme=f.removeThemeProperties(a.theme)),c(()=>{e.isSavingTemplate=!0},0);const d={content:a,enable_pdf_mapping:e.isPdfMappingEnabled,enable_attachment:e.isAttachmentEnabled,enable_logic:e.isLogicEnabled,payment:e.payment};if(n&&(d.sample_document_id=n),l&&(d.share_code=l),e.aiRecordId&&(d.ai_record_id=e.aiRecordId),e.isInternal){let t;T(e.non_internal_raw_content)?t=angular.copy(e.non_internal_raw_content):(t=angular.copy(e.non_internal_submit_content),t.doc_title=e.non_internal_raw_content.doc_title),t.is_draft=i;const n={content:t,enable_pdf_mapping:e.isPdfMappingEnabled,enable_attachment:e.isAttachmentEnabled,enable_logic:e.isLogicEnabled,payment:angular.copy(e.non_internal_payment)};return Promise.all([v.post("waiverTemplate/updateInternalDocument",d),v.post("waiverTemplate/updateTemplate",n)]).then(t=>{let[n]=t;n.data.result&&e.handleUpdateSuccess(n.data.success.internal_raw_content,i)}).catch(e.handleUpdateError).finally(e.handleUpdateFinally)}return v.post("waiverTemplate/updateTemplate",d).then(function(t){t.data.result&&e.handleUpdateSuccess(t.data.success.raw_content,i)}).catch(e.handleUpdateError).finally(e.handleUpdateFinally)},e.openTemplateSavedModal=function(){if(h.isTemplateSavedModalOpened)return;h.isTemplateSavedModalOpened=!0;t.open({animation:!0,template:i(3430),controller:"TemplateSavedModalController",resolve:{templateId:function(){return e.templateId},templateTitle:function(){return e.temp_content.doc_title}}}).result.then(()=>{},()=>{h.isTemplateSavedModalOpened=!1})},e.getSaveBtnText=function(){return e.isSavingTemplate?i18next.t("Saving"):e.isMobileView?i18next.t("Publish"):e.templateInfo&&e.templateInfo.hasHistoryRev?i18next.t("Update and Publish"):i18next.t("Publish")},e.discardDraftConfirmation=function(){r.confirm({title:i18next.t("Discard all changes"),windowTopClass:"centered-modal discard-modal",message:i18next.t("Once confirm, current modifications will be discarded,<br />template builder will reset to the online version.")}).then(async()=>{e.selectField(null,null),await e.discardDraft()})},e.moveTimers={},e.moveDelaying=!1,e.fieldMoved=function(t,i,n){var l=i?"field-id-"+i.id+"-"+t.id:"field-id-"+t.id;e.moveTimers[l]&&clearTimeout(e.moveTimers[l]),e.moveTimers[l]=c(function(){t.moved=!1,e.moveDelaying=!1,e.$apply()},1500),t.moved=!0,e.moveDelaying=!0,n&&C(l),"separator_field"===t.type&&c(function(){e.fieldModified(t)},100)},e.fieldModified=function(t){"separator_field"===t.type&&c(function(){e.reCalcSeparators()},100)},e.reCalcSeparators=function(){f.reCalcSeparatorPage(e.temp_content);const t=e.temp_content.doc_content.filter(e=>"separator_field"===e.type).length;e.virtualSeparatorField.title_text=`Page 1 (1/${t+1})`},e.moveField=function(t,i){var n=!1;te.forEach(e.temp_content.doc_content,function(l,a){if(!n&&(i==l&&("up"==t&&0!==a?(F(e.temp_content.doc_content,a,a-1),n=!0):"down"===t&&a!==e.temp_content.doc_content.length-1&&(F(e.temp_content.doc_content,a,a+1),n=!0)),"container_field"===l.type)){var d=l.fields.indexOf(i);if(-1==d)return;"up"==t&&0!==d?(F(l.fields,d,d-1,l),n=!0):"down"===t&&d!==l.fields.length-1&&(F(l.fields,d,d+1,l),n=!0)}})},e.selectEditConsent=function(){e.selectField(null,null),e.editGlobalSettings=!1,e.editConsent=!e.editConsent},e.selectEditGlobal=function(){e.editGlobalSettings=!0},e.disableConsent=function(){e.temp_content.doc_consent.enabled=!1,e.editConsent=!1},e.selectField=function(t,i){t!==e.selectedField&&(e.selectedField=t,e.selectedFieldParent=i,e.setActiveField(t,i,!1),e.isMobileView&&e.toggleAddFieldDrawer(!1),null!==t&&(e.editConsent=!1,e.editGlobalSettings=!1,e.isPaymentSettingViewShown=!1,C(i?"field-id-"+i.id+"-"+t.id:"field-id-"+t.id)))},e.selectPreviousField=function(){var t=e.findFieldParentList(e.selectedField),i=t.indexOf(e.selectedField);if(0===i)e.selectedFieldParent&&e.selectField(e.selectedFieldParent);else if("container_field"===t[i-1].type&&t[i-1].fields.length>0){var n=t[i-1].fields.length-1;e.selectField(t[i-1].fields[n],t[i-1])}else e.selectField(t[i-1],e.selectedFieldParent)},e.selectNextField=function(){var t=e.findFieldParentList(e.selectedField),i=t.indexOf(e.selectedField);if(i===t.length-1)if(e.selectedFieldParent){var n=e.findFieldParentList(e.selectedFieldParent),l=n.indexOf(e.selectedFieldParent);l<n.length-1&&e.selectField(n[l+1])}else"container_field"===e.selectedField.type&&e.selectedField.fields.length>0&&e.selectField(e.selectedField.fields[0],e.selectedField);else"container_field"===e.selectedField.type&&e.selectedField.fields.length>0?e.selectField(e.selectedField.fields[0],e.selectedField):e.selectField(t[i+1],e.selectedFieldParent)},e.getFieldTitle=function(e){var t="";return(t="title_text"in e?e.title_text:"title"in e?e.title:"html_field"===e.type?e.is_image_field?"Image Field":"Text Field":e.type).length>40&&(t=t.substring(0,40)+"..."),t},e.getFieldType=function(e){return f.getFieldTypeName(e)},e.getFieldImage=function(e){if(e&&e.type)return"html_field"===e.type?e.is_image_field?"image":"text":e.type.replace("_field","").replace("_"," ")},e.goPdfMapping=function(){s.go("app.waiverTemplateRoot.pdfMapping")},e.hideGuideSteps=function(){l.Ar.setItem("builderPageHideGuideSteps",!0),c(()=>{e.isGuideStepsHidden=!0},0)},e.openTemplateGallery=function(){t.open({template:i(41662),controller:"TemplateGalleryModalController",windowClass:"template-gallery-modal",backdrop:!1,resolve:{enableAIGeneration:()=>!0,isCreating:()=>!1,getCustomConfirmMsg:()=>t=>{let i;return i=e.pdfMappingInfo?t.hasPdfMapping?i18next.t("Current template content and PDF mapping data will be replaced after choosing this template. Please confirm."):i18next.t("Current template content will be replaced and PDF mapping data will be <strong>removed</strong> after choosing this template. Please confirm."):i18next.t("Current template content will be replaced after choosing this template. Please confirm."),i},openTemplateAIGenerator:()=>()=>{e.openAIGenerator(e.temp_content.doc_title,!1)}}}).result.then(async t=>{await e.updateTemplate({isDraft:!0,sampleId:t.id,shareCode:t.shareCode}),e.getTemplate()})},e.handleRedirect=function(e,t){s.go(t)},e.getAttachmentTipIsClosed=function(){v.get(`accountSettings/adminKeyValue/${x}`).then(t=>{t.data.result&&(e.isAttachmentTipClosed="1"===t.data.success[x])})},e.hideAttachmentTip=function(){e.isAttachmentTipClosed=!0,v.post("accountSettings/adminKeyValue",{key:x,value:"1"})},e.currentHistory=null,e.currentInputHistory=null,e.focusedInput=null,e.focusedRichTextInstance=null,e.richTextHandlerMapping=new Map,e.enableHistoryObserver=function(){e.disableHistoryObserver(),e.historyObserver=e.$watch("temp_content",function(t,i){e.checkPaymentFieldsInTemplate(t);angular.toJson(e.preparePayload(t,!1))!==angular.toJson(e.preparePayload(i,
1!1))&&e.addHistory()},!0)},e.disableHistoryObserver=function(){e.historyObserver&&e.historyObserver()},e.addHistory=function(){const t=angular.copy(e.temp_content);e.clearMovedFromFields(t.doc_content);const i={value:t,prev:null,next:null};e.currentHistory&&(i.prev=e.currentHistory,e.currentHistory.next=i),e.currentHistory=i},e.suppressHistoryObserver=function(t){e.disableHistoryObserver(),t(),e.enableHistoryObserver()},e.undo=M(()=>{e.undoable()&&e.suppressHistoryObserver(()=>{e.currentHistory&&(e.currentHistory=e.currentHistory.prev),e.temp_content=angular.copy(e.currentHistory.value)})}),e.redo=M(()=>{e.redoable()&&e.suppressHistoryObserver(()=>{e.currentHistory&&(e.currentHistory=e.currentHistory.next),e.temp_content=angular.copy(e.currentHistory.value)})}),e.clearMovedFromFields=function(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(function e(t){if(!t)return;t.moved&&(t.moved=!1);t.fields&&t.fields.forEach(e)})},e.undoable=function(){return!(!e.focusedInput&&!e.focusedRichTextInstance||!e.textUndoable())||!!e.currentHistory&&null!==e.currentHistory.prev},e.redoable=function(){return e.focusedInput||e.focusedRichTextInstance?e.textRedoable():!!e.currentHistory&&null!==e.currentHistory.next},e.initTextHistory=function(){e.currentTextHistory=null},e.addTextHistory=function(t){let i={data:t,prev:null,next:null,correspondingHistoryNode:e.currentHistory};e.currentTextHistory&&(i.prev=e.currentTextHistory,e.currentTextHistory.next=i),e.currentTextHistory=i},e.textUndoable=function(){return e.currentTextHistory&&e.currentTextHistory.prev},e.textRedoable=function(){return e.currentTextHistory&&e.currentTextHistory.next},e.restoreTextHistoryData=function(){if(e.focusedRichTextInstance&&e.focusedRichTextInstance.snapshot.restore(e.currentTextHistory.data),e.focusedInput){if(e.focusedInput.value=e.currentTextHistory.data.value,
1null===e.currentTextHistory.data.selectionStart||null===e.currentTextHistory.data.selectionEnd)return;if(0===e.currentTextHistory.data.selectionStart&&0===e.currentTextHistory.data.selectionEnd)return;e.focusedInput.setSelectionRange(e.currentTextHistory.data.selectionStart,e.currentTextHistory.data.selectionEnd),angular.element(e.focusedInput).triggerHandler("change")}},e.textUndo=function(){e.textUndoable()&&(e.currentTextHistory&&(e.currentTextHistory=e.currentTextHistory.prev),e.restoreTextHistoryData())},e.textRedo=function(){e.textRedoable()&&(e.currentTextHistory&&(e.currentTextHistory=e.currentTextHistory.next),e.restoreTextHistoryData())},e.handleRedoClicked=function(){e.focusedInput||e.focusedRichTextInstance?e.textRedo():e.redo()},e.handleUndoClicked=function(){e.focusedInput||e.focusedRichTextInstance?e.textUndoable()?e.textUndo():e.selectField(null,null):(e.selectField(null,null),e.undo())},e.handleKeys=function(t){const i=t.ctrlKey&&t.shiftKey&&"KeyZ"===t.code?"ctrl+shift+Z":t.ctrlKey&&"KeyZ"===t.code?"ctrl+Z":t.metaKey&&t.shiftKey&&"KeyZ"===t.code?"command+shift+Z":t.metaKey&&"KeyZ"===t.code?"command+Z":null;i&&(t.preventDefault(),i===(0,a.k)()&&e.handleRedoClicked(),i===(0,a.g)()&&e.handleUndoClicked(),e.$apply())},e.handleInputChangeDebounced=te.debounce(t=>{e.addHistory(),e.addTextHistory({value:t.target.value,selectionStart:t.target.selectionStart,selectionEnd:t.target.selectionEnd}),e.$apply()},500),e.getRichTextChangeHandler=function(){const t=e.focusedRichTextInstance;return te.debounce(function(){if(t===e.focusedRichTextInstance){const t=e.focusedRichTextInstance;setTimeout(()=>{e.addHistory(),e.addTextHistory(t.snapshot.get()),e.$apply()},15)}})},e.handleFocus=function(t){if((S(t.target)||A(t.target))&&(e.disableHistoryObserver(),e.initTextHistory()),S(t.target)&&(e.focusedInput=t.target,t.target.addEventListener("input",e.handleInputChangeDebounced),e.addTextHistory({value:t.target.value,selectionStart:t.target.selectionStart,selectionEnd:t.target.selectionEnd})),A(t.target)&&(e.focusedRichTextInstance=function(e){return FroalaEditor.INSTANCES.find(t=>t.el===e.target)}(t),e.addTextHistory(e.focusedRichTextInstance.snapshot.get()),e.focusedRichTextInstance&&!e.richTextHandlerMapping.has(e.focusedRichTextInstance))){const t=e.getRichTextChangeHandler();
1e.richTextHandlerMapping.set(e.focusedRichTextInstance,t),e.focusedRichTextInstance.events.on("contentChanged",t)}},e.syncTextHistory=function(){e.suppressHistoryObserver(()=>{e.currentTextHistory&&e.currentTextHistory.correspondingHistoryNode!==e.currentHistory&&(e.currentHistory=e.currentTextHistory.correspondingHistoryNode,e.temp_content=angular.copy(e.currentHistory.value))})},e.handleBlur=function(t){(S(t.target)||A(t.target))&&(e.enableHistoryObserver(),e.syncTextHistory(),e.focusedInput=null,e.focusedRichTextInstance=null,S(t.target)&&t.target.removeEventListener("input",e.handleInputChangeDebounced))},e.handleDropping=function(){e.disableHistoryObserver(),e.disableTempContentObserver()},e.handleDropped=function(t){e.enableHistoryObserver(),e.watchTempContent(),e.addHistory(),e.has_unsavedChanges=!0,e.handleFieldAddedOnBoardingTask(t),e.autoSaveDraft()},e.handleFieldAddedOnBoardingTask=async function(t){"date_field"!==t.type||_.isTaskCompleted("add_a_date_field")||(e.onboardingHints.dateField=!1,await e.updateTemplate({isDraft:!0}),_.completeTask("add_a_date_field"))},e.togglePaymentSettingView=function(){e.selectField(null,null),e.editGlobalSettings=!1,e.isPaymentSettingViewShown=!e.isPaymentSettingViewShown},e.getDefaultPayment=function(){const t=e.squareSettings?.locations?.[0],i={integrator:"square",currency:t?.currency||"USD",location:{id:t?.id,name:t?.name},settings:{show_subtotal:!0,show_line_items:!0},additional_fees:[]};return!t&&e.squareSettings?.enabled&&console.warn("Square locations not loaded yet, deferring payment initialization"),i},e.$on("$destroy",function(){e.autoSaveDraft.cancel(),document.removeEventListener("keydown",e.handleKeys),window.removeEventListener("focus",e.handleFocus),window.removeEventListener("blur",e.handleBlur),window.removeEventListener("resize",e.handleMobileResize)}),c(()=>{document.addEventListener("keydown",e.handleKeys),window.addEventListener("focus",e.handleFocus,!0),window.addEventListener("blur",e.handleBlur,!0),window.addEventListener("resize",e.handleMobileResize),e.updateMobileViewState()},0),e.getTemplate().then(()=>{s.params.generateTemplateByAI&&(e.applyAITemplate(s.params.aiTemplate),s.params.generateTemplateByAI=!1)}),e.$watch("ongoingTask.task",function(t){const i={dateField:!1,publishTemplate:!1,signWaiver:!1},n={add_a_date_field:"dateField",publish_your_template:"publishTemplate",test_sign_your_waiver:"signWaiver"}[t?.task_id];n&&(i[n]=!0),e.onboardingHints=i,"signWaiver"===n&&e.openTemplateSavedModal()},!0),e.$on("squareDisconnected",function(){e.getSquareSettings(),e.isPaymentSettingViewShown=!1}),e.initFields(),e.getAttachmentTipIsClosed(),e.getSquareSettings()}])},41662(e){e.exports='<div class="template-gallery"> <div class="templates"> <button class="template-gallery-close-btn" ng-click="close()"> <svg-icon name="\'close\'" size="16"></svg-icon> </button> <div class="head" id="templateHead"> <h1 ng-i18next="1,000+ Free Professional Waiver Templates"></h1> <div class="description" ng-i18next="[html]<b>WaiverForever</b> offers the largest collection of digital <b>waiver templates</b> for businesses in all industries."></div> </div> <div class="template-header-box"> <div class="pinned template-header-wrapper" ng-class="{ \'normal\': scrollStatus === \'normal\', \'top\': scrollStatus === \'top\' }" ng-style="{ transform: \'translateY(\' + stickyOffset + \'px)\' }"> <div class="template-header"> <div class="template-searcher"> <div class="search-header"> <input ng-model="search.text" class="search-input" type="text" autoComplete="off" ng-i18next="[placeholder]Search by template name"/> <div ng-show="search.text" class="input-suffix-buttons"> <div class="delete-btn" ng-click="clearSearchText()"></div> </div> </div> <div class="category-trigger" ng-click="showDrawer = true"> <span ng-if="selectedTab === \'industries\'" ng-i18next="Industries"></span> <span ng-if="selectedTab === \'types\'" ng-i18next="Types"></span> </div> </div> </div> </div> </div> <wf-loading ng-if="isLoadingTemplates || isCheckingShareCode" loading-text="loading templates..."></wf-loading> <div class="templates-columns" ng-if="!isLoadingTemplates && !isCheckingShareCode"> <div class="column1"> <div class="templates-list-box pinned" ng-class="{ \'normal\': scrollStatus === \'normal\', \'top\': scrollStatus === \'top\' }" ng-style="{ transform: \'translateY(\' + stickyOffset + \'px)\' }"> <div class="tab-box"> <div class="tab-switcher" ng-class="selectedTab === \'industries\' ? \'--active-left\' : \'--active-right\'"> <div class="tab-title" ng-click="selectTabTo(\'industries\')" ng-i18next="Industries"></div> <div class="tab-title" ng-click="selectTabTo(\'types\')" ng-i18next="Types"></div> </div> <ul class="tab-list"> <li class="tab-list-item" ng-repeat="category in allCategories" ng-class="{ \'active\': selectedCategory === category.name }" ng-if="category" ng-key="category" ng-click="handleSelectCategory(category.name, true)">{{category.name}}</li> </ul> <div ng-if="enableAIGeneration" class="ai-container"> <div class="ai-container-title" ng-i18next="Need a custom template?"></div> <div class="ai-container-text" ng-i18next="Use AI to create the exact form template for your use case."></div> <button class="wf-button-secondary template-gallery-ai-button" ng-click="createByAI()" ng-i18next="Make a template with AI"></button> </div> </div> <div id="templatePinnedEnd"></div> </div> </div> <div class="column2"> <div class="template-box" ng-if="sharedTemplate"> <div class="template"> <ul class="template-list"> <li class="template-list-item"> <template-thumbnail template="sharedTemplate" on-select-industry="handleSelectIndustry(industry)" on-select-type="handleSelectType(type)" on-preview="previewTemplate(template)" on-use="useTemplate(template)"/> </li> </ul> </div> </div> <div class="template-box" ng-if="categories.length && !sharedTemplate"> <div ng-repeat="category in categories" ng-key="category.name" class="template"> <h2 class="template-section-title"> {{category.name}} <div class="scrollMark" id="{{category.name | toSlug}}"/> </h2> <ul class="template-list"> <li class="template-list-item" ng-repeat="template in category.templates" ng-key="template.name"> <template-thumbnail template="template" on-select-industry="handleSelectIndustry(industry)" on-select-type="handleSelectType(type)" on-preview="previewTemplate(template)" on-use="useTemplate(template)"/> </li> </ul> </div> </div> <div class="template-box empty" ng-if="!categories.length && !sharedTemplate"> <img class="tip-icon" src="/app/static/images/empty-icon.svg"/> <div ng-i18next="Search result is empty"></div> </div> <div id="templateColumnSlideEnd"></div> </div> </div> <div class="category-drawer-mask" ng-if="showDrawer" ng-click="closeDrawer()"> <div class="category-drawer" ng-click="$event.stopPropagation()">
1 <div class="drawer-content"> <div class="tab-title" ng-i18next="Industries"></div> <ul class="tab-list"> <li class="tab-list-item" ng-repeat="category in allIndustries" ng-class="{ \'active\': selectedCategory === category.name }" ng-key="category.name" ng-click="handleSelectCategory(category.name, true)">{{category.name}}</li> </ul> <div class="tab-title" ng-i18next="Types"></div> <ul class="tab-list"> <li class="tab-list-item" ng-repeat="category in allTypes" ng-class="{ \'active\': selectedCategory === category.name }" ng-key="category.name" ng-click="handleSelectCategory(category.name, true)">{{category.name}}</li> </ul> </div> <div ng-if="enableAIGeneration" class="ai-container"> <div class="ai-container-title" ng-i18next="Need a custom template?"></div> <div class="ai-container-text" ng-i18next="Use AI to create the exact form template for your use case."></div> <button class="wf-button-secondary template-gallery-ai-button" ng-click="createByAI()" ng-i18next="Make a template with AI"></button> </div> </div> </div> </div> </div>'},41850(){angular.module("waiverforeverApp.templateBuilder").directive("fieldDetails",["$compile",function(e){return{restrict:"AE",scope:{field:"=",isInternal:"<",payment:"="},link:function(t,i){let n=t.$new(!1);t.$watch("field",function(l){if(l){n&&(n.$destroy(),i.html("")),n=t.$new(!1);const l=t.field.is_price?' payment="payment"':"",a=`<div class="field-details" ${t.field.type.replace(/_/g,"-")}-details field="field" is-internal="isInternal"${l}></div>`;i.append(e(a)(n))}else n&&(n.$destroy(),i.html(""))})}}}])},45143(e){e.exports='<div class="froala-loading-mask"> <div class="inner-container"> <wf-loading loading-text="Generating..."></wf-loading> <button class="wf-button-secondary-small" ng-i18next="Cancel" ng-click="vm.cancel()"></button> </div> </div> '},52523(e,t,i){angular.module("waiverforeverApp.templateBuilder").directive("numberFieldDetails",[function(){return{restrict:"AE",scope:{field:"=",isInternal:"<",payment:"=?"},template:i(38180),link:function(e,t){e.numberType=0===e.field.decimal_places?"integer":"decimal",e.maxValue=e.field.max_value,e.minValue=e.field.min_value,e.defaultValue=e.field.default_value,e.handleMinValueChange=function(t){e.minValue=t,e.$a
1pply()},e.handleMinValueBlur=function(){e.field.min_value=e.minValue,e.$apply()},e.handleMaxValueChange=function(t){e.maxValue=t,e.$apply()},e.handleMaxValueBlur=function(){e.field.max_value=e.maxValue,e.$apply()},e.handleDefaultValueChange=function(t){e.defaultValue=t,e.$apply()},e.handleDefaultValueBlur=function(){e.field.default_value=e.defaultValue,e.$apply()},e.$watch("numberType",(t,i)=>{i!==t&&(e.field.decimal_places="integer"===t?0:2)}),e.$watch("field.decimal_places",function(t){null==t&&(e.field.decimal_places=e.field.is_price||"integer"===e.numberType?0:2)}),e.$watch("field.locked_field",function(t){t&&e.field.renew_field&&(e.field.renew_field=!1)}),e.$watch("field.renew_field",function(t){t&&e.field.locked_field&&(e.field.locked_field=!1)}),e.$on("$destroy",function(){const t=e.field;t&&(t.decimal_places=Number(t.decimal_places),t.value=t.default_value?Number(t.default_value.toFixed(t.decimal_places)):void 0)})}}}])},53849(e,t,i){angular.module("waiverforeverApp.templateBuilder").directive("nameFieldDetails",["$rootScope",function(e){return{restrict:"AE",scope:{field:"=",isInternal:"<"},template:i(90282),link:function(t){t.field.format=t.field.format||"0",t.field.format+="",t.isCnMarket=e.isCnMarket,t.$watch("field.default_first_name",function(){var e=t.field;e&&(e.first_name=e.default_first_name)}),t.$watch("field.default_middle_name",function(){var e=t.field;e&&(e.middle_name=e.default_middle_name)}),t.$watch("field.default_last_name",function(){var e=t.field;e&&(e.last_name=e.default_last_name)}),t.$watch("field.default_full_name",function(){var e=t.field;e&&(e.full_name=e.default_full_name)}),t.$watch("field.locked_field",function(e){e&&t.field.renew_field&&(t.field.renew_field=!1)}),t.$watch("field.renew_field",function(e){e&&t.field.locked_field&&(t.field.locked_field=!1)})}}}])},54586(e,t,i){angular.module("waiverforeverApp.templateBuilder").directive("addressFieldDetails",[function(){return{restrict:"AE",scope:{field:"=",isInternal:"<"},template:i(14765),link:function(e,t){e.$watch("field.default_first_line",function(t){var i=e.field;i&&(i.first_line=i.default_first_line)}),e.$watch("field.default_second_line",function(t){var i=e.field;i&&(i.second_line=i.default_second_line)}),e.$watch("field.default_city",function(t){var i=e.field;i&&(i.city=i.default_city)}),e.$watch("field.default_state",function(t){var i=e.field;i&&(i.state=i.default_state)}),e.$watch("field.default_zipcode",function(t){var i=e.field;i&&(i.zipcode=i.default_zipcode)}),e.$watch("field.default_country",function(t){var i=e.field;i&&(i.country=i.default_country)}),e.$watch("field.locked_field",function(t){t&&e.field.renew_field&&(e.field.renew_field=!1)}),e.$watch("field.renew_field",function(t){t&&e.field.locked_field&&(e.field.locked_field=!1)})}}}])},55170(e,t,i){"use strict";i.d(t,{K:()=>d});var n=null;function l(e){return null!==n||(n=new Promise((t,i)=>{if("undefined"!=typeof window)if(window.Square)t(window.Square);else try{let n=function(e){return document.querySelector(`script[src="${e}"]`)}(e);n||(n=function(e){let t=document.head||document.body;if(!t)throw new Error("Square.js requires a <body> or <head> element.");let i=document.createElement("script");return i.src=e,t.appendChild(i),i}(e)),n.addEventListener("load",()=>{window.Square?t(window.Square):i(new Error("Square.js failed to load properly."))}),n.addEventListener("error",()=>{i(new Error("Error occurred while loading Square.js"))})}catch(e){i(e)}else t(null)})),n}var a=class e extends Error{constructor(t="The Payment 'applicationId' option is not in the correct format."){super(t),this.name="InvalidApplicationIdError",Object.setPrototypeOf(this,e.prototype)}};function d(e,t,i){return((e,t,i)=>new Promise((n,l)=>{var a=e=>{try{o(i.next(e))}catch(e){l(e)}},d=e=>{try{o(i.throw(e))}catch(e){l(e)}},o=e=>e.done?n(e.value):Promise.resolve(e.value).then(a,d);o((i=i.apply(e,t)).next())}))(this,null,function*(){let n=void 0===(null==i?void 0:i.scriptSrc)?function(e){let t="";if("string"!=typeof e||null===e)throw new a;if(e.startsWith("sq0idp-")&&(t="https://web.squarecdn.com/"),e.startsWith("sandbox-sq0idb-")&&(t="https://sandbox.web.squarecdn.com/"),0===t.length)throw new a;return t+="v1/square.js",t}(e):i.scriptSrc,d=yield l(n);return null===d?null:d.payments(e,t)})}},56598(e,t,i){angular.module("waiverforeverApp.templateBuilder").directive("shortAnswerFieldDetail
1s",[function(){return{restrict:"AE",scope:{field:"=",isInternal:"<"},template:i(1945),link:function(e,t){e.$watch("field.default_value",function(t){var i=e.field;i&&(i.answer=i.default_value?i.default_value.trim():"")}),e.$watch("field.locked_field",function(t){t&&e.field.renew_field&&(e.field.renew_field=!1)}),e.$watch("field.renew_field",function(t){t&&e.field.locked_field&&(e.field.locked_field=!1)})}}}])},61902(e){e.exports='<div class="field-body"> <div class="field-title"> {{field.title_text}} </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.optional, \'unchecked\': !field.optional}"> <input type="checkbox" ng-model="field.optional"/> <span ng-i18next="This is an optional field"></span> </label> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.renew_field, \'unchecked\': !field.renew_field}"> <input type="checkbox" ng-model="field.renew_field"/> <span ng-i18next="This is a renewable field"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'When request to renew a filled form, a renewable field will be cleared and require to be filled again.\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.locked_field, \'unchecked\': !field.locked_field}"> <input type="checkbox" ng-model="field.locked_field"/> <span ng-i18next="Prevent customer editing"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'Customers cannot change value of this field\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="default-title"> <div ng-i18next="Default Value:"></div> <span class="default-title-tip" ng-i18next="Default values are fixed inputs until changed, while placeholders are temporary prompts that disappear when typing begins."></span> <input class="form-control" type="text" ng-model="field.default_value" placeholder=""/> </div> <div class="placeholder-title"> <div ng-i18next="Placeholders:"></div> <span class="placeholder-title-tip" ng-i18next="You can change the placeholders in your preferred language."></span> <input class="form-control" type="text" ng-model="field.placeholder"/> </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.validate_age, \'unchecked\': !field.validate_age}"> <input type="checkbox" ng-model="field.validate_age"/> <span ng-i18next="Validate date of birth"></span> </label> </div> <div ng-if="field.validate_age" class="age-steppers"> <label class="age-label"> <span class="age-text" ng-i18next="Min age:"></span> <wf-number-input ng-model="field.min_age"></wf-number-input> </label> <label class="age-label"> <span class="age-text" ng-i18next="Max age:"></span> <wf-number-input ng-model="field.max_age"></wf-number-input> </label> </div> </div> '},65937(e){e.exports='<div class="field-body"> <div class="field-title"> {{field.title_text}} </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.optional, \'unchecked\': !field.optional}"> <input type="checkbox" ng-model="field.optional"/> <span ng-i18next="This is an optional field"></span> </label> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.renew_field, \'unchecked\': !field.renew_field}"> <input type="checkbox" ng-model="field.renew_field"/> <span ng-i18next="This is a renewable field"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'When request to renew a filled form, a renewable field will be cleared and require to be filled again.\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.locked_field, \'unchecked\': !field.locked_field}"> <input type="checkbox" ng-model="field.locked_field"/> <span ng-i18next="Prevent customer editing"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'Customers cannot change value of this field\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.validate_email_address, \'unchecked\': !field.validate_email_address}"> <input type="checkbox" ng-model="field.validate_email_address"/> <span ng-i18next="Only allow valid email address"></span> </label> </div> <div class="default-title"> <div ng-i18next="Default Value:"> </div> <span class="default-title-tip" ng-i18next="Default values are fixed inputs until changed, while placeholders are temporary prompts that disappear when typing begins."></span> <input class="form-control" type="text" ng-model="field.default_value" placeholder=""/> </div> <div class="placeholder-title"> <div ng-i18next="Placeholders:"> </div> <span class="placeholder-title-tip" ng-i18next="You can change the placeholders in your preferred language."></span> <input class="form-control" type="text" ng-model="field.placeholder"/> </div> </div> '},68355(e,t,i){angular.module("waiverforeverApp.templateBuilder").directive("templateTitle",["WFTemplateHelper",function(e){return{restrict:"AE",scope:{isInternal:"<",template:"=ngModel",updateCallback:"=updateCallback"},template:i(10284),link:function(e,t){e.editing=!1,e.inputWidth=300,e.toggleEditing=function(){e.editing=!e.editing,e.editing&&setTimeout(function(){t.find("input").focus()})},e.handleChanged=function(){var i=t.find("input")[0];i&&e.inputWidth<i.scrollWidth&&(e.inputWidth=i.scrollWidth)},e.handleKeyDown=function(t){13!=t.keyCode&&27!=t.keyCode||e.toggleEditing()},e.$watch("editing",function(t){t&&setTimeout(function(){e.handleChanged(),e.$apply()})})}}}])},68650(e){e.exports='<div class="field-body payment-settings-view"> <div class="field-section-title" ng-i18next="Payment Account:"></div> <div ng-if="vm.squareSettings.enabled" class="connected-account"> <div class="dropdown"> <button class="wf-button dropdown-toggle" type="button" id="dropdownMenu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> <span ng-i18next="Connected"></span> <i class="fa fa-caret-down"></i> </button> <ul class="dropdown-menu" aria-labelledby="dropdownMenu"> <li><a href="#" ng-click="vm.changeAccount()" ng-i18next="Change Account"></a></li> <li><a href="#" ng-click="vm.disconnect()" ng-i18next="Disconnect"></a></li> </ul> </div> </div> <div ng-if="!vm.squareSettings.enabled" class="disconnected-account"> <button class="wf-button" ng-click="vm.connect()" ng-i18next="Connect"></button> </div> <div class="field-section-title" ng-i18next="Business Location:"></div> <div class="select"> <select class="form-control" ng-model="vm.payment.location.id"> <option value="{{location.id}}" ng-repeat="location in (vm.squareSettings.locations || []) track by location.id">{{location.name}}</option> </select> </div> <div class="field-section-title" ng-i18next="Currency:"></div> <div class="select"> <select class="form-control" ng-model="vm.payment.currency" disabled="disabled"> <option value="USD">USD</option> </select> </div> <div class="field-section-title" ng-i18next="Payment Settings:"></div> <div class="wf-checkbox"> <label ng-class="{\'checked\': vm.payment.settings.show_subtotal, \'unchecked\': !vm.payment.settings.show_subtotal}"> <input type="checkbox" ng-model="vm.payment.settings.show_subtotal"/> <span ng-i18next="Show Subtotal"></span> </label> </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': vm.payment.settings.show_line_items, \'unchecked\': !vm.payment.settings.show_line_items}"> <input type="checkbox" ng-model="vm.payment.settings.show_line_items"/> <span ng-i18next="Show Line Items"></span> </label> </div> <div class="field-section-title"> <span ng-i18next="Additional Fee:"></span> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip-html="vm.additionalFeeTooltip" tooltip-placement="left" tooltip-class="additional-fee-tooltip"> </i> </div> <additional-fee-list fees="vm.payment.additional_fees" on-add="vm.addFee" on-remove="vm.removeFee" on-update="vm.updateFee" on-move="vm.moveFee" 
1currency="vm.payment.currency"> </additional-fee-list> </div> '},69377(e){e.exports='<div class="add-consent-screen" ng-if="(!template.doc_consent || !template.doc_consent.enabled) && !isInternal"> <a href="javascript:;" ng-click="enableConsent()" ng-i18next="Add a Consent Screen"></a> <span class="wf-info clickable" uib-popover="{{\'Present a consent screen before collecting any personal data from your customers.\' | i18next}}" popover-trigger="\'mouseenter\'" popover-placement="bottom-center"> <svg-icon name="\'info\'"></svg-icon> </span> </div> <div class="waiver-form consent-field" ng-if="template.doc_consent && template.doc_consent.enabled" ng-class="{\'editing\': editConsent}"> <div class="edit-button" ng-click="selectEditConsent()"> <img ng-src="/app/static/images/templateBuilder/edit-button.svg"/> </div> <div class="waiver-field"> <div class="field-title"> <span class="field-title-text" ng-i18next="Consent Screen"></span> </div> <div class="field-area"> <consent-html-edit-view ng-model="template" edit-consent="editConsent"></consent-html-edit-view> </div> </div> </div> <div class="waiver-form template-editor"> <div ng-if="!supported" class="text-center"> Version {{template.version}} is not supported. </div> <div ng-if="showVirtualSeparator()"> <div class="leading-page"> <span class="leading-page-text">{{virtualSeparatorField.title_text}}</span> </div> </div> <ul ng-if="supported" dnd-list="template.doc_content" dnd-drop="drop(dropEffect, item, index, callback({ dstParent: template.doc_content, dstParentField: null }))" dnd-allowed-types="allAllowedTypes"> <li dnd-draggable="field" dnd-type="field.type" ng-repeat="field in template.doc_content track by field.uid" id="field-id-{{field.id}}" dnd-effect-allowed="move" dnd-dragstart="dragStart(event)" dnd-dragend="dragEnd(event)" dnd-callback="{ srcIndex: $index, srcParent: template.doc_content, dstParent: dstParent, dstParentField: null }"> <div class="field-area" ng-click="selectField(field, null, $event)" ng-class="{\'separator\': field.type===\'separator_field\', \'hovered\': field.moved && (!moveDelaying || field.moved) && !dragging && selectedField !== field, \'hover-ready\': (!moveDelaying || field.moved) && !dragging && selectedField !== field, \'highlighted\': checkUntouchedFieldTypes.includes(field.type) && field.newly_created, \'mobile-active\': isMobileView && activeField === field }"> <div class="field-controls"> <div class="field-type-name">{{getFieldType(field) | i18next}}</div> <button type="button" class="edit-button setting-btn" ng-click="openFieldSettings(field, null, $event)" aria-label="{{\'Settings\' | i18next}}"> <i class="fa fa-cog" aria-hidden="true"></i> </button> <div class="edit-button" ng-click="duplicateField(field, $event)"><img ng-src="/app/static/images/templateBuilder/duplicate-icon.svg"/></div> <div class="edit-button remove-field-btn" ng-click="handleRemoveField($index, $event)"><img ng-src="/app/static/images/templateBuilder/delete-icon.svg"/></div> <div class="edit-button" ng-if="!$first" ng-click="moveField(\'up\', field, template.doc_content, $event)"><img ng-src="/app/static/images/templateBuilder/move-up-button.svg"/></div> <div class="edit-button" ng-if="!$last" ng-click="moveField(\'down\', field, template.doc_content, $event)"><img ng-src="/app/static/images/templateBuilder/move-down-button.svg"/></div> </div> <div ng-switch="field.type"> <div ng-switch-when="container_field" class="container-field-container" dnd-nodrag="anyChildSelected(field)"> <div class="field-container" ng-class="{\'edit-mode\':field==selectedField, \'readonly-mode\': readOnly}"> <div class="field-indicators"> <div class="logic-indicator" ng-if="usedInLogicFields[field.uid]" tooltip-class="indicator-tooltip" uib-tooltip="{{\'This field is used in Logic, once moved or deleted it will break the logic.\' | i18next}}" tooltip-placement="right" tooltip-append-to-body="true"> </div> <div class="pdf-mapping-indicator" ng-if="mappedFields[field.uid]" tooltip-class="indicator-tooltip" uib-tooltip="{{\'This field is mapped in PDF Generation, once deleted it will break the mapping.\' | i18next}}" tooltip-placement="right" tooltip-append-to-body="true"> </div> </div> <div class="template-field-preview-view"> <div class="waiver-field"> <div class="container-field"> <div class="field-title"> <span class="field-title-text">{{ field.title }}</span> </div> </div> </div> </div> <div class="template-field-edit-view" dnd-nodrag-mouseover> <div class="waiver-field"> <div class="container-field"> <div class="field-title"> <input class="field-title-text-input" ng-model="field.title"/> </div> </div> </div> </div> </div> <div class="container-separator"> <div class="tag-container"> <img src="/app/static/images/tag.svg"> <div class="tag-text">1</div> <hr class="tag-line"/>
1 </div> </div> <ul dnd-list="field.fields" dnd-allowed-types="containerFieldAllowedTypes" dnd-drop="drop(dropEffect, item, index, callback({ dstParent: field.fields, dstParentField: field }))"> <li ng-repeat="inner_field in field.fields track by inner_field.uid" id="field-id-{{field.id}}-{{inner_field.id}}" dnd-draggable="inner_field" dnd-type="inner_field.type" dnd-effect-allowed="move" dnd-dragstart="dragStart(event)" dnd-dragend="dragEnd(event)" dnd-callback="{srcIndex: $index, srcParent: field.fields, dstParent: dstParent, dstParentField: dstParentField }"> <div class="field-area" ng-click="selectField(inner_field, field, $event)" ng-class="{\'hovered\': inner_field.moved && (!moveDelaying || inner_field.moved) && !dragging && selectedField !== inner_field, \'hover-ready\': (!moveDelaying || inner_field.moved) && !dragging && selectedField !== inner_field, \'highlighted\': checkUntouchedFieldTypes.includes(inner_field.type) && inner_field.newly_created, \'mobile-active\': isMobileView && activeField === inner_field}"> <div class="field-controls"> <div class="field-type-name">{{getFieldType(inner_field) | i18next}}</div> <button type="button" class="edit-button setting-btn" ng-click="openFieldSettings(inner_field, field, $event)" aria-label="{{\'Settings\' | i18next}}"> <i class="fa fa-cog" aria-hidden="true"></i> </button> <div class="edit-button" ng-click="duplicateInnerField(inner_field, field, $event)"> <img ng-src="/app/static/images/templateBuilder/duplicate-icon.svg"/> </div> <div class="edit-button" ng-click="handleRemoveInnerField($index, field, $event)"> <img ng-src="/app/static/images/templateBuilder/delete-icon.svg"/> </div> <div class="edit-button" ng-click="moveField(\'up\', inner_field, field.fields, $event)"> <img ng-src="/app/static/images/templateBuilder/move-up-button.svg"/> </div> <div class="edit-button" ng-click="moveField(\'down\', inner_field, field.fields, $event)"> <img ng-src="/app/static/images/templateBuilder/move-down-button.svg"/> </div> </div> <div class="field-container" ng-class="{\'edit-mode\':inner_field==selectedField, \'readonly-mode\': readOnly}"> <div class="field-indicators"> <div class="logic-indicator" ng-if="usedInLogicFields[inner_field.uid]" tooltip-class="indicator-tooltip" tooltip-placement="right" tooltip-append-to-body="true" uib-tooltip="{{\'This field is used in Logic, once moved or deleted it will break the logic.\' | i18next}}"> </div> <div class="pdf-mapping-indicator" ng-if="mappedFields[inner_field.uid]" tooltip-class="indicator-tooltip" tooltip-placement="right" tooltip-append-to-body="true" uib-tooltip="{{\'This field is mapped in PDF Generation, once deleted it will break the mapping\' | i18next}}"> </div> </div> <div class="template-field-preview-view"> <waiver-field-form ng-model="inner_field" validation-result="{valid: true, mandatory: true}" read-only="true" global-settings="template.global_settings" payment="payment"> </waiver-field-form> </div> <template-field-edit-view ng-model="inner_field" dnd-nodrag-mouseover active="inner_field==selectedField" template-title-text="template.doc_title" payment="payment"> </template-field-edit-view> </div> </div> </li> <li class="dndPlaceholder" ng-i18next="Drop Into Repeating Section Field"></li> </ul> <div ng-if="!field.fixed" class="container-buttons"> <span class="container-count-text field-title-text"><span ng-i18next="Current count:"></span> 1</span> <button class="container-add-button container-remove-button" ng-disabled="true" ng-i18next="REMOVE"> </button> <button class="container-add-button" ng-disabled="true" ng-i18next="ADD"> </button> </div> </div> <div ng-switch-default class="field-container" ng-class="{\'edit-mode\':field==selectedField, \'readonly-mode\': readOnly}"> <div class="field-indicators"> <div class="logic-indicator" ng-if="usedInLogicFields[field.uid]" tooltip-class="indicator-tooltip" uib-tooltip="{{\'This field is used in Logic, once moved or deleted it will break the logic.\' | i18next}}" tooltip-placement="right" tooltip-append-to-body="true"> </div> <div class="pdf-mapping-indicator" ng-if="mappedFields[field.uid]" tooltip-class="indicator-tooltip" uib-tooltip="{{\'This field is mapped in PDF Generation, once deleted it will break the mapping\' | i18next}}" tooltip-placement="right" tooltip-append-to-body="true"> </div> </div> <div class="template-field-preview-view"> <waiver-field-form ng-model="field" read-only="true" validation-result="{valid: true, mandatory: true}" global-settings="template.global_settings" payment="payment"> </waiver-field-form> </div> <template-field-edit-view ng-model="field" dnd-nodrag-mouseover active="field==selectedField" template-title-text="template.doc_title" payment="payment"> </template-field-edit-view> </div> </div> </div> </li> <li class="dndPlaceholder" ng-i18next="Drop Here"></li> </ul> </div> '},69991(e){e.exports='<div class="field-body"> <div class="field-title"> {{field.title_text}} </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.optional, \'unchecked\': !field.optional}"> <input type="checkbox" ng-model="field.optional"/> <span ng-i18next="This is an optional field"></span> </label> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.renew_field, \'unchecked\': !field.renew_field}"> <input type="checkbox" ng-model="field.renew_field"/>
1 <span ng-i18next="This is a renewable field"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'When request to renew a filled form, a renewable field will be cleared and require to be filled again.\' | i18next}}" tooltip-placement="right"> </i> </div> </div> '},78278(e){e.exports='<div class="field-body"> <div class="field-title"> {{field.title_text}} </div> <div class="choice-setting-info"> <svg-icon name="\'info\'"></svg-icon> <span ng-i18next="Edit your choices in below. Add a new choice by adding a new line."></span> </div> <div class="ai-generation-button-container" ng-if="!field.is_price"> <button class="ai-generation-button" ng-click="aiGeneration()"> <img src="/app/static/images/templateBuilder/ai-bot-choice.svg" alt="robot-icon"/> <span ng-i18next="AI Generation"></span> </button> </div> <div class="choice" ng-if="!field.is_price"> <div ng-show="aiGenerating" id="choice-ai-generating-mask" class="choice-ai-generating-mask"> <wf-loading loading-text="{{generatingText}}"></wf-loading> <button class="wf-button-secondary-small" ng-i18next="Cancel" ng-click="cancel()"></button> </div> <textarea ng-show="!aiGenerating" id="choice-ai-generating-mask-target" class="form-control no-animate" placeholder="Put your options here" ng-model="field.choices" ng-change="onChoicesChange()" cols="30" rows="10" style="resize:none">\n        </textarea> </div> <choice-with-price-list ng-if="field.is_price" choices="field.choice_list" price-list="field.price_list" on-choice-change="onChoiceChange" on-price-change="onPriceChange" on-add="onAdd" on-remove="onRemove" on-move="onMove" currency="payment.currency"> </choice-with-price-list> <div class="choice-setting-info" ng-if="field.is_price"> <svg-icon name="\'info\'"></svg-icon> <span ng-i18next="The currency will be consistent with your selected integrated payment service provider."></span> </div> <div class="wf-checkbox" ng-if="field.is_price"> <label ng-class="{\'checked\': field.show_price_to_customer, \'unchecked\': !field.show_price_to_customer}"> <input type="checkbox" ng-model="field.show_price_to_customer"/> <span ng-i18next="Show price to customer"></span> </label> </div> <div class="wf-checkbox" ng-if="!field.is_price"> <label ng-class="{\'checked\': field.allow_other_choice, \'unchecked\': !field.allow_other_choice}"> <input type="checkbox" ng-model="field.allow_other_choice"/> <span ng-i18next="Allow user to add other choice"></span> </label> </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.optional, \'unchecked\': !field.optional}"> <input type="checkbox" ng-model="field.optional"/> <span ng-i18next="This is an optional field"></span> </label> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.renew_field, \'unchecked\': !field.renew_field}"> <input type="checkbox" ng-model="field.renew_field"/> <span ng-i18next="This is a renewable field"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'When request to renew a filled form, a renewable field will be cleared and require to be filled again.\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.locked_field, \'unchecked\': !field.locked_field}"> <input type="checkbox" ng-model="field.locked_field"/> <span ng-i18next="Prevent customer editing"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'Customers cannot change value of this field\' | i18next}}" tooltip-placement="right"> </i> </div> <label class="default-header"><span ng-i18next="Default Selected:"></span> </label> <div class="toolbar-header"> <div class="wf-checkbox" ng-repeat="choice in field.choice_list track by $index"> <label ng-class="{\'checked\': field.default_value[$index], \'unchecked\': !field.default_value[$index]}" ng-click="defaultSelected()"> <input type="checkbox" ng-model="field.default_value[$index]"/> {{field.choice_list[$index]}} <span ng-if="field.show_price_to_customer"> &nbsp;-&nbsp;{{payment.currency | currencySymbol}}{{(field.price_list[$index] / 100).toFixed(2)}} </span> </label> </div> </div> </div> '},83437(e,t,i){angular.module("waiverforeverApp.templateBuilder").directive("containerFieldDetail
1s",[function(){return{restrict:"AE",scope:{field:"="},template:i(10378),link:function(e,t){}}}])},85356(e){e.exports='<div class="field-body html-field-body"> <div ng-if="field.is_image_field"> <div class="picture-uploader field-section"> <div class="section-title" ng-i18next="Picture: "></div> <div ng-hide="field.image_url || uploading" ngf-select ngf-drop ng-model="upload.file" class="picture-uploader-box" ngf-drag-over-class="\'dragover\'" ngf-pattern="\'image/*\'" ngf-accept="\'image/*\'" ngf-max-size="2MB" ng-i18next="Drop or click to upload"> </div> <div ng-show="uploading" class="uploading"> <img src="/app/static/images/loading.svg"/> </div> <div class="uploaded-picture" ng-if="field.image_url && !uploading"> <img src="{{field.image_url}}"/> <button class="replace-btn" ngf-select ng-model="upload.file" ngf-pattern="\'image/*\'" ngf-accept="\'image/*\'" ngf-max-size="2MB" uib-tooltip="Replace" tooltip-placement="right"> <svg-icon name="\'upload\'" size="12"/> </button> <button class="delete-btn" ng-click="removePicture()" uib-tooltip="Delete" tooltip-placement="right"> <svg-icon name="\'delete_n\'" size="14"></svg-icon> </button> </div> </div> <div class="caption-editor field-section"> <div class="section-title" ng-i18next="Picture description: "></div> <textarea froala="froalaOptions" ng-model="field.caption_html_string" ng-change="touchField()">\n      </textarea> </div> <div class="layout-selector field-section"> <div class="section-title" ng-i18next="Layout: "></div> <ul class="layout-list"> <li ng-repeat="layout in layoutList" ng-class="{selected: field.position === layout.value}" ng-click="selectLayout(layout.value)"> <img ng-src="/app/static/images/templateBuilder/{{layout.img}}" draggable="false"/> </li> </ul> </div> <div class="content-vertical-alignment field-section" ng-if="isAlignmentSelectorShow()"> <div class="section-title" ng-i18next="Content vertical alignment: "></div> <div class="alignment-selector"> <div class="alignment-option" ng-class="{selected: field.vertical_align === \'top\'}" ng-click="selectAlignment(\'top\')" ng-i18next="Top"> </div> <div class="alignment-option" ng-class="{selected: field.vertical_align === \'center\'}" ng-click="selectAlignment(\'center\')" ng-i18next="Center"> </div> <div class="alignment-option" ng-class="{selected: field.vertical_align === \'bottom\'}" ng-click="selectAlignment(\'bottom\')" ng-i18next="Bottom"> </div> </div> </div> </div> </div> '},86806(e){e.exports='<div class="html-field-edit-view" ng-if="editConsent"> <div class="consent-title"> <input class="field-title-text-input" ng-model="consent.title" ng-i18next="[placeholder]Consent Title"/> </div> <div class="consent-content"> <div class="feditor"> <textarea froala="froalaOptions" ng-model="consent.content"></textarea> </div> </div> <youtube-player ng-repeat="video in consent.youtube_link_list track by $index" ng-if="video | ValidYoutubeLink" video-url="{{video}}"></youtube-player> <div class="checkbox-field" ng-if="consent.checkboxEnabled"> <input type="checkbox" class="field-checkbox-checkbox"> <div class="field-checkbox-text"> <input class="field-title-text-input" ng-model="consent.checkboxTxt" ng-i18next="[placeholder]I agree"/> </div> </div> </div> <div class="html-field-view fr-view" ng-if="!editConsent"> <div class="consent-title">{{ consent.title }}</div> <ng-bind-html ng-bind-html="consent.content | trust" class="consent-content"></ng-bind-html> <youtube-player ng-repeat="video in consent.youtube_link_list track by $index" ng-if="video | ValidYoutubeLink" video-url="{{video}}"></youtube-player> <div class="checkbox-field" ng-if="consent.checkboxEnabled"> <input type="checkbox" class="field-checkbox-checkbox"> <div class="field-checkbox-text"> {{consent.checkboxTxt || \'I agree\'}} </div> </div> </div> '},89333(e){e.exports='<div class="field-body"> <div class="field-title"> {{field.title_text}} </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.optional, \'unchecked\': !field.optional}"> <input type="checkbox" ng-model="field.optional"/> <span ng-i18next="This is an optional field"></span> </label> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.renew_field, \'unchecked\': !field.renew_field}"> <input type="checkbox" ng-model="field.renew_field"/>
1 <span ng-i18next="This is a renewable field"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'When request to renew a filled form, a renewable field will be cleared and require to be filled again.\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.locked_field, \'unchecked\': !field.locked_field}"> <input type="checkbox" ng-model="field.locked_field"/> <span ng-i18next="Prevent customer editing"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'Customers cannot change value of this field\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.validate_phone_number, \'unchecked\': !field.validate_phone_number}"> <input type="checkbox" ng-model="field.validate_phone_number"/> <span ng-i18next="Only Allow valid phone number"></span> </label> </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.show_country_code, \'unchecked\': !field.show_country_code}"> <input type="checkbox" ng-model="field.show_country_code"/> <span ng-i18next="Show country code"></span> </label> </div> <div class="wf-checkbox" ng-if="field.show_country_code"> <label ng-class="{\'checked\': field.enable_custom_country_code, \'unchecked\': !field.enable_custom_country_code}"> <input type="checkbox" ng-model="field.enable_custom_country_code"/> <span ng-i18next="Allow users to choose country code"></span> </label> </div> <div class="select" ng-if="field.show_country_code || field.validate_phone_number"> <div class="select-title" ng-i18next="Default Country Code: "></div> <select class="form-control country-code" ng-model="field.country_code"> <option value="US" ng-i18next="Please Choose (Default is US)"></option> <option ng-repeat="code in codes" value="{{code.iso_code}}"> {{ code.iso_code + " (" + code.country + ")"}} +{{code.country_code}} </option> </select> </div> <div class="default-title"> <div ng-i18next="Default Value: "></div> <span class="default-title-tip" ng-i18next="Default values are fixed inputs until changed, while placeholders are temporary prompts that disappear when typing begins."></span> <input class="form-control" type="text" ng-model="field.default_value"/> </div> <div class="placeholder-title"> <div ng-i18next="Placeholders:"></div> <span class="placeholder-title-tip" ng-i18next="You can change the placeholders in your preferred language."></span> <input class="form-control" type="text" ng-model="field.placeholder"/> </div> </div> '},90282(e){e.exports='<div class="field-body"> <div class="field-title"> {{field.title_text}} </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.optional, \'unchecked\': !field.optional}"> <input type="checkbox" ng-model="field.optional"/> <span ng-i18next="This is an optional field"></span> </label> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.renew_field, \'unchecked\': !field.renew_field}"> <input type="checkbox" ng-model="field.renew_field"/> <span ng-i18next="This is a renewable field"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'When request to renew a filled form, a renewable field will be cleared and require to be filled again.\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox" ng-if="!isInternal"> <label ng-class="{\'checked\': field.locked_field, \'unchecked\': !field.locked_field}"> <input type="checkbox" ng-model="field.locked_field"/> <span ng-i18next="Prevent customer editing"></span> </label> <i class="fa fa-question-circle renew-question-circle" aria-hidden="true" uib-tooltip="{{\'Customers cannot change value of this field\' | i18next}}" tooltip-placement="right"> </i> </div> <div class="wf-checkbox"> <label ng-class="{\'checked\': field.show_middle_name, \'unchecked\': !field.show_middle_name}"> <input type="checkbox" ng-model="field.show_middle_name"/> <span ng-i18next="Show Middle name"></span> </label> </div> <div class="select"> <div class="select-title" ng-i18next="Format: "></div> <select class="form-control" ng-model="field.format"> <option value="0" ng-i18next="First name Last name"></option> <option value="1" ng-i18next="Last name First name"></option> <option ng-if="isCnMarket" value="2" ng-i18next="Full name"></option> </select> </div> <label class="default-header"><span ng-i18next="Default Values: "></span></label> <div class="toolbar-header"> <span class="default-title-tip" ng-i18next="Default values are fixed inputs until changed, while placeholders are temporary prompts that disappear when typing begins."></span> <div class="default-title"> <div><span ng-i18next="Default First Name: "></span></div> <input class="form-control" type="text" ng-model="field.default_first_name" placeholder=""/> </div> <div class="default-title"> <div><span ng-i18next="Default Middle Name: "></span></div> <input class="form-control" type="text" ng-model="field.default_middle_name" placeholder=""/> </div> <div class="default-title"> <div><span ng-i18next="Default Last Name: "></span></div> <input class="form-control" type="text" ng-model="field.default_last_name" placeholder=""/> </div> <div class="default-title" ng-if="isCnMarket"> <div><span ng-i18next="Default Full Name: "></span></div> <input class="form-control" type="text" ng-model="field.default_full_name" placeholder=""/> </div> </div> <label class="placeholder-header"><span ng-i18next="Default Placeholders: "></span></label> <div class="toolbar-header"> <span class="placeholder-title-tip" ng-i18next="You can change the placeholders in your preferred language."></span> <div class="placeholder-title"> <div><span ng-i18next="First Name Placeholder: "></span></div> <input class="form-control" type="text" ng-model="field.placeholder_first_name"/> </div> <div class="placeholder-title"> <div><span ng-i18next="Middle Name Placeholder: "></span></div> <input class="form-control" type="text" ng-model="field.placeholder_middle_name"/> </div> <div class="placeholder-title"> <div><span ng-i18next="Last Name Placeholder: "></span></div> <input class="form-control" type="text" ng-model="field.placeholder_last_name"/> </div> <div class="placeholder-title" ng-if="isCnMarket"> <div><span ng-i18next="Full Name Placeholder: "></span></div> <input class="form-control" type="text" ng-model="field.placeholder_full_name"/> </div> </div> </div> '},91933(e,t,i){angular.module("waiverforeverApp.templateBuilder").directive("separatorFieldDetail
1s",[function(){return{restrict:"AE",scope:{field:"="},template:i(98910),link:function(e,t){}}}])},98910(e){e.exports='<div class="field-body"> <div class="field-title"> {{field.title_text}} </div> </div>'},99792(e){e.exports='<div class="wf-loading"> <div class="wf-loading-img"></div> <div class="wf-loading-text">{{loadingText}}</div> </div>'}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.