1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["form-auto-submit.plugin"],{9436:e=>{var t="%[a-f0-9]{2}",r=RegExp("("+t+")|([^%]+?)","gi"),n=RegExp("("+t+")+","gi");e.exports=function(e){if("string"!=typeof e)throw TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},s=n.exec(e);s;){try{t[s[0]]=decodeURIComponent(s[0])}catch(e){var o=function(e){try{return decodeURIComponent(e)}catch(s){for(var t=e.match(r)||[],n=1;n<t.length;n++)t=(e=(function e(t,r){try{return[decodeURIComponent(t.join(""))]}catch(e){}if(1===t.length)return t;r=r||1;var n=t.slice(0,r),s=t.slice(r);return Array.prototype.concat.call([],e(n),e(s))})(t,n).join("")).match(r)||[];return e}}(s[0]);o!==s[0]&&(t[s[0]]=o)}s=n.exec(e)}t["%C2"]="�";for(var i=Object.keys(t),a=0;a<i.length;a++){var c=i[a];e=e.replace(RegExp(c,"g"),t[c])}return e}(e)}}},7728:e=>{e.exports=function(e,t){for(var r={},n=Object.keys(e),s=Array.isArray(t),o=0;o<n.length;o++){var i=n[o],a=e[i];(s?-1!==t.indexOf(i):t(i,a,e))&&(r[i]=a)}return r}},9742:e=>{e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`)},2940:(e,t,r)=>{let n=r(9742),s=r(9436),o=r(1231),i=r(7728),a=e=>null==e,c=Symbol("encodeFragmentIdentifier");function l(e){if("string"!=typeof e||1!==e.length)throw TypeError("arrayFormatSeparator must be single character string")}function u(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function d(e,t){return t.decode?s(e):e}function p(e){let t=e.indexOf("#");return -1!==t&&(e=e.slice(0,t)),e}function h(e){let t=(e=p(e)).indexOf("?");return -1===t?"":e.slice(t+1)}function m(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):t.parseBooleans&&null!==e&&("true"===e.toLowerCase()||"false"===e.toLowerCase())&&(e="true"===e.toLowerCase()),e}function f(e,t){l((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);let r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{if(t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),!t){n[e]=r;return}void 0===n[e]&&(n[e]={}),n[e][t[1]]=r};case"bracket":return(e,r,n)=>{if(t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),!t){n[e]=r;return}if(void 0===n[e]){n[e]=[r];return}n[e]=[].concat(n[e],r)};case"colon-list-separator":return(e,r,n)=>{if(t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),!t){n[e]=r;return}if(void 0===n[e]){n[e]=[r];return}n[e]=[].concat(n[e],r)};case"comma":case"separator":return(t,r,n)=>{let s="string"==typeof r&&r.includes(e.arrayFormatSeparator),o="string"==typeof r&&!s&&d(r,e).includes(e.arrayFormatSeparator);r=o?d(r,e):r;let i=s||o?r.split(e.arrayFormatSeparator).map(t=>d(t,e)):null===r?r:d(r,e);n[t]=i};case"bracket-separator":return(t,r,n)=>{let s=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!s){n[t]=r?d(r,e):r;return}let o=null===r?[]:r.split(e.arrayFormatSeparator).map(t=>d(t,e));if(void 0===n[t]){n[t]=o;return}n[t]=[].concat(n[t],o)};default:return(e,t,r)=>{if(void 0===r[e]){r[e]=t;return}r[e]=[].concat(r[e],t)}}}(t),n=Object.create(null);if("string"!=typeof e||!(e=e.trim().replace(/^[?#&]/,"")))return n;for(let s of e.split("&")){if(""===s)continue;let[e,i]=o(t.decode?s.replace(/\+/g," "):s,"=");i=void 0===i?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?i:d(i,t),r(d(e,t),i,n)}for(let e of Object.keys(n)){let r=n[e];if("object"==typeof r&&null!==r)for(let e of Object.keys(r))r[e]=m(r[e],t);else n[e]=m(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce((e,t)=>{let r=n[t];return r&&"object"==typeof r&&!Array.isArray(r)?e[t]=function e(t){return Array.isArray(t)?t.sort():"object"==typeof t?e(Object.keys(t)).sort((e,t)=>Number(e)-Number(t)).map(e=>t[e]):t}(r):e[t]=r,e},Object.create(null))}t.extract=h,t.parse=f,t.stringify=(e,t)=>{if(!e)return"";l((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);let r=r=>t.skipNull&&a(e[r])||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{let s=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[u(t,e),"[",s,"]"].join("")]:[...r,[u(t,e),"[",u(s,e),"]=",u(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[u(t,e),"[]"].join("")]:[...r,[u(t,e),"[]=",u(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[u(t,e),":list="].join("")]:[...r,[u(t,e),":list=",u(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{let t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,s)=>void 0===s||e.skipNull&&null===s||e.skipEmptyString&&""===s?n:(s=null===s?"":s,0===n.length)?[[u(r,e),t,u(s,e)].join("")]:[[n,u(s,e)].join(e.arrayFormatSeparator)]}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,u(t,e)]:[...r,[u(t,e),"=",u(n,e)].join("")]}}(t),s={};for(let t of Object.keys(e))r(t)||(s[t]=e[t]);let o=Object.keys(s);return!1!==t.sort&&o.sort(t.sort),o.map(r=>{let s=e[r];return void 0===s?"":null===s?u(r,t):Array.isArray(s)?0===s.length&&"bracket-separator"===t.arrayFormat?u(r,t)+"[]":s.reduce(n(r),[]).join("&"):u(r,t)+"="+u(s,t)}).filter(e=>e.length>0).join("&")},t.parseUrl=(e,t)=>
1{t=Object.assign({decode:!0},t);let[r,n]=o(e,"#");return Object.assign({url:r.split("?")[0]||"",query:f(h(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:d(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[c]:!0},r);let n=p(e.url).split("?")[0]||"",s=t.extract(e.url),o=Object.assign(t.parse(s,{sort:!1}),e.query),i=t.stringify(o,r);i&&(i="?".concat(i));let a=function(e){let t="",r=e.indexOf("#");return -1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(a="#".concat(r[c]?u(e.fragmentIdentifier,r):e.fragmentIdentifier)),"".concat(n).concat(i).concat(a)},t.pick=(e,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[c]:!1},n);let{url:s,query:o,fragmentIdentifier:a}=t.parseUrl(e,n);return t.stringifyUrl({url:s,query:i(o,r),fragmentIdentifier:a},n)},t.exclude=(e,r,n)=>{let s=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,s,n)}},1231:e=>{e.exports=(e,t)=>{if(!("string"==typeof e&&"string"==typeof t))throw TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];let r=e.indexOf(t);return -1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},9699:(e,t,r)=>{r.r(t),r.d(t,{default:()=>u});var n=r(9568),s=r(5878),o=r(6471),i=r(3107),a=r(4049),c=r(2940),l=r(9610);class u extends n.Z{init(){if(this.formSubmittedByCaptcha=!1,this._getForm(),!this._form)throw Error("No form found for the plugin: ".concat(this.constructor.name));if(this._client=new i.Z,this.options.useAjax&&!this.options.ajaxContainerSelector)throw Error("[".concat(this.constructor.name,'] The option "ajaxContainerSelector" must be given when using ajax.'));
1if(this.options.changeTriggerSelectors&&!Array.isArray(this.options.changeTriggerSelectors))throw Error("[".concat(this.constructor.name,'] The option "changeTriggerSelectors" must be an array of selector strings.'));this._registerEvents(),this._resumeFocusState()}_getForm(){this.el&&"FORM"===this.el.nodeName?this._form=this.el:this._form=this.el.closest("form")}_registerEvents(){if(this.options.useAjax){let e=this.options.delayChangeEvent?l.Z.debounce(this._onSubmit.bind(this),this.options.delayChangeEvent):this._onSubmit.bind(this);this._form.removeEventListener("change",e),this._form.addEventListener("change",e)}else{let e=this.options.delayChangeEvent?l.Z.debounce(this._onChange.bind(this),this.options.delayChangeEvent):this._onChange.bind(this);this._form.removeEventListener("change",e),this._form.addEventListener("change",e),window.addEventListener("pagehide",()=>{s.Z.remove()})}}_targetMatchesSelector(e){return!!this.options.changeTriggerSelectors.find(t=>e.target.matches(t))}_onChange(e){this._updateRedirectParameters(),(!this.options.changeTriggerSelectors||this._targetMatchesSelector(e))&&(this._saveFocusState(e.target),this._submitNativeForm())}_submitNativeForm(){this.$emitter.publish("beforeChange"),this._form.submit(),s.Z.create()}_onSubmit(e){e.preventDefault(),s.Z.create(),this.$emitter.publish("beforeSubmit"),this._saveFocusState(e.target),this.formSubmittedByCaptcha||this.sendAjaxFormSubmit()}sendAjaxFormSubmit(){let e=o.Z.serialize(this._form),t=a.Z.getAttribute(this._form,"action");this._client.post(t,e,this._onAfterAjaxSubmit.bind(this))}_onAfterAjaxSubmit(e){s.Z.remove(),a.Z.querySelector(document,this.options.ajaxContainerSelector).innerHTML=e,window.PluginManager.initializePlugins(),this.$emitter.publish("onAfterAjaxSubmit")}_updateRedirectParameters(){let e=c.parse(window.location.search),t=o.Z.serialize(this._form);Object.keys(e).filter(e=>!t.has("redirectParameters[".concat(e,"]"))).map(t=>this._createInputForRedirectParameter(t,e[t])).forEach(e=>{this._form.appendChild(e)})}_createInputForRedirectParameter(e,t){let r=document.createElement("input");return r.setAttribute("type","hidden"),r.setAttribute("name","redirectParameters[".concat(e,"]")),r.setAttribute("value",t),r}_saveFocusState(e){if(this.options.autoFocus){if(this.options.useAjax){window.focusHandler.saveFocusState(this.options.focusHandlerKey,'[data-focus-id="'.concat(e.dataset.focusId,'"]'));return}window.focusHandler.saveFocusStatePersistent(this.options.focusHandlerKey,'[data-focus-id="'.concat(e.dataset.focusId,'"]'))}}_resumeFocusState(){if(this.options.autoFocus){if(this.options.useAjax){window.focusHandler.resumeFocusState(this.options.focusHandlerKey);return}window.focusHandler.resumeFocusStatePersistent(this.options.focusHandlerKey)}}}u.options={useAjax:!1,ajaxContainerSelector:!1,changeTriggerSelectors:null,delayChangeEvent:null,autoFocus:!0,focusHandlerKey:"form-auto-submit"}},3107:(e,t,r)=>{r.d(t,{Z:()=>n});class n{get(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",n=this._createPreparedRequest("GET",e,r);return this._sendRequest(n,null,t)}post(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let s=this._createPreparedRequest("POST",e,n);return this._sendRequest(s,t,r)}delete(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let s=this._createPreparedRequest("DELETE",e,n);return this._sendRequest(s,t,r)}patch(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";n=this._getContentType(t,n);let s=this._createPreparedRequest("PATCH",e,n);return this._sendRequest(s,t,r)}
1abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(e){this._errorHandlingInternal=e}_registerOnLoaded(e,t){t&&(!0===this._errorHandlingInternal?(e.addEventListener("load",()=>{t(e.responseText,e)}),e.addEventListener("abort",()=>{console.warn("the request to ".concat(e.responseURL," was aborted"))}),e.addEventListener("error",()=>{console.warn("the request to ".concat(e.responseURL," failed with status ").concat(e.status))}),e.addEventListener("timeout",()=>{console.warn("the request to ".concat(e.responseURL," timed out"))})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,r){return this._registerOnLoaded(e,r),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,r){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),r&&this._request.setRequestHeader("Content-type",r),this._request}constructor(){this._request=null,this._errorHandlingInternal=!1}}},5774:(e,t,r)=>{r.d(t,{ZP:()=>p,ar:()=>c});var n=r(5206),s=r(3266);let o="modal-backdrop",i="modal-backdrop-open",a="no-scroll",c=350,l={ON_CLICK:"backdrop/onclick"};class u{create(e){this._removeExistingBackdrops(),document.body.insertAdjacentHTML("beforeend",this._getTemplate());let t=document.body.lastChild;document.documentElement.classList.add(a),setTimeout(function(){t.classList.add(i),"function"==typeof e&&e()},75),this._dispatchEvents()}remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c,t=this._getBackdrops();s.Z.iterate(t,e=>e.classList.remove(i)),setTimeout(this._removeExistingBackdrops.bind(this),e),document.documentElement.classList.remove(a)}_dispatchEvents(){let e=n.Z.isTouchDevice()?"touchstart":"click";document.addEventListener(e,function(e){e.target.classList.contains(o)&&document.dispatchEvent(new CustomEvent(l.ON_CLICK))})}_getBackdrops(){return document.querySelectorAll(".".concat(o))}_removeExistingBackdrops(){if(!1===this._exists())return;let e=this._getBackdrops();s.Z.iterate(e,e=>e.remove())}_exists(){return document.querySelectorAll(".".concat(o)).length>0}_getTemplate(){return'<div class="'.concat(o,'"></div>')}constructor(){return u.instance||(u.instance=this),u.instance}}let d=Object.freeze(new u);class p{static create(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;d.create(e)}static remove(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:c;d.remove(e)}static SELECTOR_CLASS(){return o}}},6471:(e,t,r)=>{r.d(t,{Z:()=>s});var n=r(3266);class s{static serialize(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if("FORM"!==e.nodeName){if(t)throw Error("The passed element is not a form!");return{}}return new FormData(e)}static serializeJson(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=s.serialize(e,t);if(0===Object.keys(r).length)return{};let o={};return n.Z.iterate(r,(e,t)=>o[t]=e),o}}},2363:(e,t,r)=>{r.d(t,{L:()=>o,Z:()=>i});var n=r(3266);let s="loader",o={BEFORE:"before",AFTER:"after",INNER:"inner"};class i{create(){if(!this.exists()){if(this.position===o.INNER){this.parent.innerHTML=i.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),i.getTemplate())}}remove(){let e=this.parent.querySelectorAll(".".concat(s));n.Z.iterate(e,e=>e.remove())}exists(){return this.parent.querySelectorAll(".".concat(s)).length>0}_getPosition(){return this.position===o.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return'<div class="'.concat(s,'" role="status">\n <span class="').concat("visually-hidden",'">Loading...</span>\n </div>')}static SELECTOR_CLASS(){return s}constructor(e,t=o.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}}},5878:(e,t,r)=>{r.d(t,{Z:()=>a});var n=r(2363),s=r(5774);class o extends n.Z{create(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];!this.exists()&&e&&(s.ZP.create(),document.querySelector(".".concat(s.ZP.SELECTOR_CLASS())).insertAdjacentHTML("beforeend",n.Z.getTemplate()))}remove(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];super.remove(),e&&s.ZP.remove()}constructor(){super(document.body)}}let i=Object.freeze(new o);class a{static create(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];i.create(e)}static remove(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];i.remove(e)}}}}]);
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.