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,EAAA,CALhCD,IAAA,MAAAE,EAAAA,EAAAA,IAAA,oBAAAtB,EAAAA,EAAAA,OAMiBrD,EAAAiB,QAAK,WAAlBvB,EAAAA,EAAAA,IAEQ,SARZ+E,IAAA,EAMyBI,GAAI/E,EAAAqG,QAASvH,MAAM,iBAAkBmB,IAAKC,EAAA6B,UAAAA,EAAAA,EAAAA,IAC1D7B,EAAAiB,OAAK,EAPdV,KAAAoE,EAAAA,EAAAA,IAAA,oBAAAtB,EAAAA,EAAAA,OASeH,EAAApE,SAAM,WAAjBY,EAAAA,EAAAA,IAEM,MAXVY,EAAA,EAUMgF,EAAAA,EAAAA,IAA8BxC,EAAAyC,OAAA,kCAEhC7F,EAAAA,EAAAA,IAEM,MAdV2F,EAAA,EAaMC,EAAAA,EAAAA,IAA8BxC,EAAAyC,OAAA,0B,0FEbpC,UCCA,MAAMwB,EAAS,CAAC,EAKhB,OAFiC,E,SAAA,GAAgBA,EAAQ,CAAC,CAAC,SDJ3D,gCACErH,EAAAA,EAAAA,IAEO,QAFAG,MAAOiD,EAAA1D,KAAKC,EAAE,+BAAD,QACfyD,EAAA1D,KAAKC,EAAE,8BAAD,EAFbM,EAAA,I","sources":["webpack://agra/./app/javascript/mixins/field-with-lock.js","webpack://agra/./app/javascript/components/buttons/lock-button.vue","webpack://agra/./app/javascript/components/buttons/lock-button.vue?bb59","webpack://agra/./app/javascript/components/petition-lockable-input.vue","webpack://agra/./app/javascript/components/petition-lockable-input.vue?f4ab","webpack://agra/./app/javascript/components/inputs/text-input.vue","webpack://agra/./app/javascript/components/inputs/text-input.vue?e1aa","webpack://agra/./node_modules/vue-loader/dist/exportHelper.js","webpack://agra/./app/javascript/components/inputs/validation-errors.vue","webpack://agra/./app/javascript/components/inputs/validation-errors.vue?c863","webpack://agra/./app/javascript/components/petition-lockable-field-layout.vue","webpack://agra/./app/javascript/components/petition-lockable-field-layout.vue?6d0d","webpack://agra/./app/javascript/components/required.vue","webpack://agra/./app/javascript/components/required.vue?43d5"],"sourcesContent":["export default {\n  props: {\n    canChangeLock: {\n      type: Boolean,\n      default: true\n    },\n    initialLocked: {\n      type: Boolean,\n      required: false,\n      default: false\n    },\n    lockUpdatePath: {\n      type: String,\n      required: false\n    },\n    showLock: {\n      type: Boolean,\n      required: true\n    }\n  }\n}\n","<template>\n  <fieldset class=\"field-lock-group\">\n    <label class=\"field-lock-toggle\" :title=\"buttonTitle\" :for=\"fieldId\">\n      <div>\n        <button type=\"button\" class=\"btn btn-link\" :disabled=\"!canChange\" @click=\"toggleLock\">\n          <i :class=\"[lockClass, 'lock']\" />\n        </button>\n      </div>\n    </label>\n  </fieldset>\n</template>\n\n<script>\nexport default {\n  props: {\n    canChange: {\n      type: Boolean,\n      default: true\n    },\n\n    locked: {\n      type: Boolean,\n      required: true\n    },\n\n    fieldId: {\n      type: String,\n      required: false\n    }\n  },\n\n  emits: ['change'],\n\n  computed: {\n    buttonTitle() {\n      return this.locked ? this.i18n.t('helpers.petition.field_locked') : this.i18n.t('helpers.petition.field_unlocked')\n    },\n\n    lockClass() {\n      return this.locked ? 'icon-lock' : 'icon-lock-open'\n    }\n  },\n\n  methods: {\n    toggleLock() {\n      this.$emit('change', !this.locked)\n    }\n  }\n}\n</script>\n\n<style lang=\"scss\" scoped>\n\n.btn-link {\n  padding: 0;\n  border: 0;\n  font-size: 25px;\n  line-height: normal;\n}\n\n.icon-lock {\n  color: red;\n}\n\n</style>\n","import { render } from \"./lock-button.vue?vue&type=template&id=1bf702f5&scoped=true\"\nimport script from \"./lock-button.vue?vue&type=script&lang=js\"\nexport * from \"./lock-button.vue?vue&type=script&lang=js\"\n\nimport \"./lock-button.vue?vue&type=style&index=0&id=1bf702f5&lang=scss&scoped=true\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-1bf702f5\"]])\n\nexport default __exports__","<template>\n  <petition-lockable-field-layout :field-name=\"fieldName\" :label=\"label\" :show-lock=\"showLock\"\n                                  :can-change-lock=\"fieldCanBeLocked\" :initial-locked=\"initialLocked\"\n                                  :input-id=\"inputId\" :required=\"required\"\n                                  :lock-update-path=\"lockUpdatePath\">\n    <template #readonly-field>\n      <text-input :multiline=\"multiline\" :value=\"value\" disabled readonly :validation-errors=\"validationErrors\"\n                  :input-id=\"inputId\" :input-name=\"inputName\" :show-label=\"false\" :rows=\"inputRows\" />\n      <input type=\"hidden\" :name=\"inputName\" :value=\"value\">\n    </template>\n    <template #editable-field>\n      <text-input :multiline=\"multiline\" :value=\"value\" :validation-errors=\"validationErrors\"\n                  :input-id=\"inputId\" :input-name=\"inputName\" :show-label=\"false\" :rows=\"inputRows\"\n                  :max-length=\"maxLength\" @changed=\"updateFieldValue\" />\n    </template>\n  </petition-lockable-field-layout>\n</template>\n\n<script>\nimport FieldWithLock from '@/mixins/field-with-lock'\nimport { Popover } from 'bootstrap'\nimport TextInput from '@/components/inputs/text-input'\nimport snakeCase from 'lodash/snakeCase'\nimport PetitionLockableFieldLayout from '@/components/petition-lockable-field-layout'\n\nexport default {\n  components: { PetitionLockableFieldLayout, TextInput },\n\n  mixins: [FieldWithLock],\n\n  props: {\n    fieldName: {\n      type: String,\n      required: true\n    },\n    helpPopoverContent: {\n      type: String,\n      required: false\n    },\n    hideHelpPopover: {\n      type: Boolean,\n      required: true\n    },\n    initialValue: {\n      type: String,\n      required: false\n    },\n    label: {\n      type: String,\n      required: true\n    },\n    maxLength: {\n      type: Number,\n      required: false\n    },\n    multiline: {\n      type: Boolean,\n      required: false,\n      default: false\n    },\n    required: {\n      type: Boolean,\n      required: false,\n      default: false\n    },\n    validationErrors: {\n      type: Array,\n      default: () => []\n    }\n  },\n\n  data() {\n    return {\n      inputRows: this.multiline ? 6 : 1,\n      value: this.initialValue\n    }\n  },\n\n  computed: {\n    fieldCanBeLocked() {\n      // Not required fields can be locked even if they are empty\n      return this.canChangeLock && (!this.required || this.value?.length > 0)\n    },\n    inputName() {\n      return `petition[${this.fieldName}]`\n    },\n    inputId() {\n      return snakeCase(this.inputName)\n    }\n  },\n\n  mounted() {\n    this.initializePopover()\n  },\n\n  methods: {\n    initializePopover() {\n      if (this.hideHelpPopover || !this.inputId) {\n        return\n      }\n\n      // TODO: DRY with app/javascript/popovers.js (?)\n      const popoverTemplate = '<div class=\"popover\" role=\"tooltip\"><div class=\"popover-arrow\"></div><div class=\"popover-inner\"><div class=\"popover-body\"><p></p></div></div></div>'\n      const inputEl = document.getElementById(this.inputId)\n\n      new Popover(inputEl, {\n        content: this.helpPopoverContent,\n        placement: 'right',\n        html: true,\n        template: popoverTemplate,\n        trigger: 'focus'\n      })\n    },\n\n    updateFieldValue(newValue) {\n      this.value = newValue\n    }\n  }\n}\n</script>\n","import { render } from \"./petition-lockable-input.vue?vue&type=template&id=60599bee\"\nimport script from \"./petition-lockable-input.vue?vue&type=script&lang=js\"\nexport * from \"./petition-lockable-input.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","<template>\n  <div :class=\"['text-field', { 'is-invalid': showValidationError }]\">\n    <label v-if=\"label && showLabel\" :for=\"inputId\" class=\"form-label\">\n      <required v-if=\"required\" />\n      <span v-html=\"label\" />\n    </label>\n    <textarea v-if=\"multiline\" :id=\"inputId\" ref=\"input\" :rows=\"rows\" :disabled=\"disabled\"\n              :minlength=\"minLength\" :maxlength=\"maxLength\" :readonly=\"readonly\"\n              :class=\"['task-editor-text-input form-control', additionalInputClasses, {'is-invalid': showValidationError}]\"\n              :value=\"value\" :name=\"inputName\" @input=\"setText\" @focus=\"$emit('focus')\" @blur=\"$emit('blur')\" />\n    <input v-else :id=\"inputId\" ref=\"input\" :type=\"inputType\" :autocomplete=\"autocomplete\"\n           :disabled=\"disabled\" :readonly=\"readonly\" :minlength=\"minLength\" :maxlength=\"maxLength\"\n           :class=\"['task-editor-text-input form-control', additionalInputClasses, {'is-invalid': showValidationError}]\"\n           :value=\"value\" :name=\"inputName\" :placeholder=\"placeholder\"\n           @input=\"setText\" @focus=\"$emit('focus')\" @blur=\"$emit('blur')\">\n\n    <slot name=\"help-text\">\n      <small v-if=\"helpText\" class=\"form-text text-muted\" v-html=\"helpText\" />\n    </slot>\n\n    <validation-errors v-if=\"showValidationError\" :errors=\"validationErrors\" />\n  </div>\n</template>\n\n<script>\nimport Required from '../required'\nimport ValidationErrors from './validation-errors'\n\nexport default {\n  components: { Required, ValidationErrors },\n\n  props: {\n    value: {\n      type: [String, Number],\n      required: false\n    },\n    multiline: {\n      type: Boolean,\n      required: false,\n      default: false\n    },\n    validationErrors: {\n      type: Array,\n      required: false\n    },\n    additionalInputClasses: {\n      type: String,\n      required: false\n    },\n    autocomplete: {\n      type: String,\n      required: false\n    },\n    disabled: {\n      type: Boolean,\n      required: false,\n      default: false\n    },\n    helpText: {\n      type: String,\n      required: false\n    },\n    inputId: {\n      type: String,\n      required: false\n    },\n    inputName: {\n      type: String,\n      required: false\n    },\n    inputType: {\n      type: String,\n      required: false,\n      default: 'text'\n    },\n    label: {\n      type: String,\n      required: false\n    },\n    maxLength: {\n      type: Number,\n      required: false\n    },\n    minLength: {\n      type: Number,\n      required: false\n    },\n    placeholder: {\n      type: String,\n      required: false\n    },\n    readonly: {\n      type: Boolean,\n      required: false,\n      default: false\n    },\n    required: {\n      type: Boolean,\n      required: false,\n      default: false\n    },\n    rows: {\n      type: Number,\n      required: false,\n      default: 3\n    },\n\n    showLabel: {\n      type: Boolean,\n      required: false,\n      default: true\n    }\n  },\n\n  emits: ['blur', 'changed', 'focus'],\n\n  computed: {\n    showValidationError() {\n      return this.validationErrors && this.validationErrors.length > 0\n    }\n  },\n\n  methods: {\n    focus() {\n      this.$refs.input.focus()\n    },\n\n    setText(e) {\n      this.$emit('changed', e.target.value)\n    }\n  }\n}\n</script>\n","import { render } from \"./text-input.vue?vue&type=template&id=32eb48ed\"\nimport script from \"./text-input.vue?vue&type=script&lang=js\"\nexport * from \"./text-input.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n// runtime helper for setting properties on components\n// in a tree-shakable way\nexports.default = (sfc, props) => {\n    const target = sfc.__vccOpts || sfc;\n    for (const [key, val] of props) {\n        target[key] = val;\n    }\n    return target;\n};\n","<template>\n  <div>\n    <span v-for=\"error in errors\" :key=\"error\" class=\"invalid-feedback d-block normal-text\">{{ error }}</span>\n  </div>\n</template>\n\n<script>\nexport default {\n  props: {\n    errors: {\n      type: Array,\n      required: true\n    }\n  }\n}\n</script>\n\n<style scoped lang=\"scss\">\n\n.normal-text {\n  text-transform: none;\n}\n\n</style>\n","import { render } from \"./validation-errors.vue?vue&type=template&id=102b52e8&scoped=true\"\nimport script from \"./validation-errors.vue?vue&type=script&lang=js\"\nexport * from \"./validation-errors.vue?vue&type=script&lang=js\"\n\nimport \"./validation-errors.vue?vue&type=style&index=0&id=102b52e8&scoped=true&lang=scss\"\n\nimport exportComponent from \"../../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-102b52e8\"]])\n\nexport default __exports__","<template>\n  <div class=\"text\">\n    <lock-button v-if=\"showLock\" :locked=\"locked\" :field-id=\"lockingFieldId\"\n                 :can-change=\"canChangeLock\" @change=\"lockChanged\" />\n\n    <required v-if=\"required\" />\n    <label v-if=\"label\" :id=\"labelId\" class=\"col-form-label\" :for=\"inputId\">\n      {{ label }}\n    </label>\n    <div v-if=\"locked\">\n      <slot name=\"readonly-field\" />\n    </div>\n    <div v-else>\n      <slot name=\"editable-field\" />\n    </div>\n  </div>\n</template>\n\n<script>\nimport ajax from '@/helpers/ajax'\nimport FieldWithLock from '@/mixins/field-with-lock'\nimport LockButton from '@/components/buttons/lock-button'\nimport Required from '@/components/required'\n\nexport default {\n  components: { LockButton, Required },\n\n  mixins: [ FieldWithLock ],\n\n  props: {\n    fieldName: {\n      type: String,\n      required: true\n    },\n    inputId: {\n      type: String,\n      required: false\n    },\n    label: {\n      type: String,\n      required: false\n    },\n    required: {\n      type: Boolean,\n      required: false,\n      default: false\n    }\n  },\n\n  data() {\n    return {\n      locked: this.initialLocked\n    }\n  },\n\n  computed: {\n    labelId() {\n      return `${this.fieldName}-label`\n    },\n    lockingFieldId() {\n      return `${this.inputId}_locked`\n    }\n  },\n\n  methods: {\n    lockChanged(newLockValue) {\n      this.locked = newLockValue\n\n      ajax.put({\n        url: this.lockUpdatePath,\n        data: {\n          lockable_field: `${this.fieldName}_locked`,\n          lock_value: this.locked\n        },\n        errorHandler: () => {\n          this.locked = !this.locked\n        }\n      })\n    }\n  }\n}\n</script>\n","import { render } from \"./petition-lockable-field-layout.vue?vue&type=template&id=18978bf2\"\nimport script from \"./petition-lockable-field-layout.vue?vue&type=script&lang=js\"\nexport * from \"./petition-lockable-field-layout.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","<template>\n  <abbr :title=\"i18n.t('simple_form.required.text')\">\n    {{ i18n.t('simple_form.required.mark') }}\n  </abbr>\n</template>\n","import { render } from \"./required.vue?vue&type=template&id=ebbea57e\"\nconst script = {}\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__"],"names":["props","canChangeLock","type","Boolean","default","initialLocked","required","lockUpdatePath","String","showLock","class","canChange","locked","fieldId","emits","computed","buttonTitle","this","i18n","t","lockClass","methods","toggleLock","$emit","_createElementBlock","_hoisted_1","_createElementVNode","title","$options","for","$props","disabled","onClick","_cache","args","_normalizeClass","_hoisted_3","_hoisted_2","components","PetitionLockableFieldLayout","TextInput","mixins","FieldWithLock","fieldName","helpPopoverContent","hideHelpPopover","initialValue","label","maxLength","Number","multiline","validationErrors","Array","data","inputRows","value","fieldCanBeLocked","length","inputName","inputId","snakeCase","mounted","initializePopover","inputEl","document","getElementById","Popover","content","placement","html","template","trigger","updateFieldValue","newValue","_createBlock","_component_petition_lockable_field_layout","_ctx","_withCtx","_createVNode","_component_text_input","$data","readonly","rows","_createTextVNode","name","onChanged","_","Required","ValidationErrors","additionalInputClasses","autocomplete","helpText","inputType","minLength","placeholder","showLabel","showValidationError","focus","$refs","input","setText","e","target","key","_component_required","_createCommentVNode","innerHTML","id","ref","minlength","maxlength","onInput","onFocus","$event","onBlur","_hoisted_4","_renderSlot","$slots","_hoisted_5","_component_validation_errors","errors","exports","sfc","__vccOpts","val","_Fragment","_renderList","error","LockButton","labelId","lockingFieldId","lockChanged","newLockValue","ajax","put","url","lockable_field","lock_value","errorHandler","_component_lock_button","onChange","script"],"sourceRoot":""}