From 90e115128b59723766dcf4c9b55f26fd00f2b1d0 Mon Sep 17 00:00:00 2001 From: onexhovia Date: Thu, 19 Dec 2024 12:14:23 +0700 Subject: [PATCH] Remove jquery-form --- assets/js/app.js | 2 -- package-lock.json | 17 ----------------- package.json | 1 - src/Resources/public/app.js | 2 +- 4 files changed, 1 insertion(+), 21 deletions(-) diff --git a/assets/js/app.js b/assets/js/app.js index 6ece504a74..ff0e59e3a9 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -22,8 +22,6 @@ import 'jquery-ui/ui/widget'; import 'jquery-ui/ui/widgets/sortable'; import 'bootstrap'; -import 'jquery-form'; - // Boostrap 3 JavaScript for the X-editable library import 'x-editable/dist/bootstrap3-editable/js/bootstrap-editable'; diff --git a/package-lock.json b/package-lock.json index f79539bd05..fdc5216a78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,6 @@ "bootstrap": "^3.3", "icheck": "^1.0", "jquery": "^3.7.0", - "jquery-form": "^4.3", "jquery-slimscroll": "^1.3", "jquery-ui": "^1.13", "jquery.scrollto": "^2.1", @@ -7867,14 +7866,6 @@ "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.0.tgz", "integrity": "sha512-umpJ0/k8X0MvD1ds0P9SfowREz2LenHsQaxSohMZ5OMNEU2r0tf8pdeEFTHMFxWVxKNyU9rTtK3CWzUCTKJUeQ==" }, - "node_modules/jquery-form": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/jquery-form/-/jquery-form-4.3.0.tgz", - "integrity": "sha512-q3uaVCEWdLOYUCI6dpNdwf/7cJFOsUgdpq6r0taxtGQ5NJSkOzofyWm4jpOuJ5YxdmL1FI5QR+q+HB63HHLGnQ==", - "dependencies": { - "jquery": ">=1.7.2" - } - }, "node_modules/jquery-knob": { "version": "1.2.11", "resolved": "https://registry.npmjs.org/jquery-knob/-/jquery-knob-1.2.11.tgz", @@ -19030,14 +19021,6 @@ "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.0.tgz", "integrity": "sha512-umpJ0/k8X0MvD1ds0P9SfowREz2LenHsQaxSohMZ5OMNEU2r0tf8pdeEFTHMFxWVxKNyU9rTtK3CWzUCTKJUeQ==" }, - "jquery-form": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/jquery-form/-/jquery-form-4.3.0.tgz", - "integrity": "sha512-q3uaVCEWdLOYUCI6dpNdwf/7cJFOsUgdpq6r0taxtGQ5NJSkOzofyWm4jpOuJ5YxdmL1FI5QR+q+HB63HHLGnQ==", - "requires": { - "jquery": ">=1.7.2" - } - }, "jquery-knob": { "version": "1.2.11", "resolved": "https://registry.npmjs.org/jquery-knob/-/jquery-knob-1.2.11.tgz", diff --git a/package.json b/package.json index 57af33b8ff..391c9f18df 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,6 @@ "bootstrap": "^3.3", "icheck": "^1.0", "jquery": "^3.7.0", - "jquery-form": "^4.3", "jquery-slimscroll": "^1.3", "jquery-ui": "^1.13", "jquery.scrollto": "^2.1", diff --git a/src/Resources/public/app.js b/src/Resources/public/app.js index a00bfafe23..a8c6ab4888 100644 --- a/src/Resources/public/app.js +++ b/src/Resources/public/app.js @@ -1 +1 @@ -!function(){var e={163:function(t,e,n){var i={"./filter_controller.js":7793,"./filter_list_controller.js":9312};function o(t){var e=r(t);return n(e)}function r(t){if(!n.o(i,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return i[t]}o.keys=function(){return Object.keys(i)},o.resolve=r,t.exports=o,o.id=163},6599:function(t,e,n){"use strict";n.r(e),n.d(e,{Application:function(){return Q},AttributeObserver:function(){return y},Context:function(){return N},Controller:function(){return st},ElementObserver:function(){return v},IndexedMultimap:function(){return T},Multimap:function(){return _},SelectorObserver:function(){return k},StringMapObserver:function(){return S},TokenListObserver:function(){return D},ValueListObserver:function(){return E},add:function(){return b},defaultSchema:function(){return X},del:function(){return w},fetch:function(){return x},prune:function(){return C}});class i{constructor(t,e,n){this.eventTarget=t,this.eventName=e,this.eventOptions=n,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(t){this.unorderedBindings.add(t)}bindingDisconnected(t){this.unorderedBindings.delete(t)}handleEvent(t){const e=function(t){if("immediatePropagationStopped"in t)return t;{const{stopImmediatePropagation:e}=t;return Object.assign(t,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,e.call(this)}})}}(t);for(const t of this.bindings){if(e.immediatePropagationStopped)break;t.handleEvent(e)}}hasBindings(){return this.unorderedBindings.size>0}get bindings(){return Array.from(this.unorderedBindings).sort(((t,e)=>{const n=t.index,i=e.index;return ni?1:0}))}}class o{constructor(t){this.application=t,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach((t=>t.connect())))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach((t=>t.disconnect())))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce(((t,e)=>t.concat(Array.from(e.values()))),[])}bindingConnected(t){this.fetchEventListenerForBinding(t).bindingConnected(t)}bindingDisconnected(t,e=!1){this.fetchEventListenerForBinding(t).bindingDisconnected(t),e&&this.clearEventListenersForBinding(t)}handleError(t,e,n={}){this.application.handleError(t,`Error ${e}`,n)}clearEventListenersForBinding(t){const e=this.fetchEventListenerForBinding(t);e.hasBindings()||(e.disconnect(),this.removeMappedEventListenerFor(t))}removeMappedEventListenerFor(t){const{eventTarget:e,eventName:n,eventOptions:i}=t,o=this.fetchEventListenerMapForEventTarget(e),r=this.cacheKey(n,i);o.delete(r),0==o.size&&this.eventListenerMaps.delete(e)}fetchEventListenerForBinding(t){const{eventTarget:e,eventName:n,eventOptions:i}=t;return this.fetchEventListener(e,n,i)}fetchEventListener(t,e,n){const i=this.fetchEventListenerMapForEventTarget(t),o=this.cacheKey(e,n);let r=i.get(o);return r||(r=this.createEventListener(t,e,n),i.set(o,r)),r}createEventListener(t,e,n){const o=new i(t,e,n);return this.started&&o.connect(),o}fetchEventListenerMapForEventTarget(t){let e=this.eventListenerMaps.get(t);return e||(e=new Map,this.eventListenerMaps.set(t,e)),e}cacheKey(t,e){const n=[t];return Object.keys(e).sort().forEach((t=>{n.push(`${e[t]?"":"!"}${t}`)})),n.join(":")}}const r={stop({event:t,value:e}){return e&&t.stopPropagation(),!0},prevent({event:t,value:e}){return e&&t.preventDefault(),!0},self({event:t,value:e,element:n}){return!e||n===t.target}},s=/^(?:(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;function a(t){return"window"==t?window:"document"==t?document:void 0}function l(t){return t.replace(/(?:[_-])([a-z0-9])/g,((t,e)=>e.toUpperCase()))}function c(t){return l(t.replace(/--/g,"-").replace(/__/g,"_"))}function u(t){return t.charAt(0).toUpperCase()+t.slice(1)}function h(t){return t.replace(/([A-Z])/g,((t,e)=>`-${e.toLowerCase()}`))}class p{constructor(t,e,n,i){this.element=t,this.index=e,this.eventTarget=n.eventTarget||t,this.eventName=n.eventName||function(t){const e=t.tagName.toLowerCase();if(e in d)return d[e](t)}(t)||f("missing event name"),this.eventOptions=n.eventOptions||{},this.identifier=n.identifier||f("missing identifier"),this.methodName=n.methodName||f("missing method name"),this.keyFilter=n.keyFilter||"",this.schema=i}static forToken(t,e){return new this(t.element,t.index,function(t){const e=t.trim().match(s)||[];let n=e[1],i=e[2];return i&&!["keydown","keyup","keypress"].includes(n)&&(n+=`.${i}`,i=""),{eventTarget:a(e[3]),eventName:n,eventOptions:e[6]?(o=e[6],o.split(":").reduce(((t,e)=>Object.assign(t,{[e.replace(/^!/,"")]:!/^!/.test(e)})),{})):{},identifier:e[4],methodName:e[5],keyFilter:i};var o}(t.content),e)}toString(){const t=this.keyFilter?`.${this.keyFilter}`:"",e=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${t}${e}->${this.identifier}#${this.methodName}`}isFilterTarget(t){if(!this.keyFilter)return!1;const e=this.keyFilter.split("+"),n=["meta","ctrl","alt","shift"],[i,o,r,s]=n.map((t=>e.includes(t)));if(t.metaKey!==i||t.ctrlKey!==o||t.altKey!==r||t.shiftKey!==s)return!0;const a=e.filter((t=>!n.includes(t)))[0];return!!a&&(Object.prototype.hasOwnProperty.call(this.keyMappings,a)||f(`contains unknown key filter: ${this.keyFilter}`),this.keyMappings[a].toLowerCase()!==t.key.toLowerCase())}get params(){const t={},e=new RegExp(`^data-${this.identifier}-(.+)-param$`,"i");for(const{name:n,value:i}of Array.from(this.element.attributes)){const o=n.match(e),r=o&&o[1];r&&(t[l(r)]=m(i))}return t}get eventTargetName(){return(t=this.eventTarget)==window?"window":t==document?"document":void 0;var t}get keyMappings(){return this.schema.keyMappings}}const d={a:()=>"click",button:()=>"click",form:()=>"submit",details:()=>"toggle",input:t=>"submit"==t.getAttribute("type")?"click":"input",select:()=>"change",textarea:()=>"input"};function f(t){throw new Error(t)}function m(t){try{return JSON.parse(t)}catch(e){return t}}class g{constructor(t,e){this.context=t,this.action=e}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(t){this.willBeInvokedByEvent(t)&&this.applyEventModifiers(t)&&this.invokeWithEvent(t)}get eventName(){return this.action.eventName}get method(){const t=this.controller[this.methodName];if("function"==typeof t)return t;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}applyEventModifiers(t){const{element:e}=this.action,{actionDescriptorFilters:n}=this.context.application;let i=!0;for(const[o,r]of Object.entries(this.eventOptions))if(o in n){const s=n[o];i=i&&s({name:o,value:r,event:t,element:e})}return i}invokeWithEvent(t){const{target:e,currentTarget:n}=t;try{const{params:i}=this.action,o=Object.assign(t,{params:i});this.method.call(this.controller,o),this.context.logDebugActivity(this.methodName,{event:t,target:e,currentTarget:n,action:this.methodName})}catch(e){const{identifier:n,controller:i,element:o,index:r}=this,s={identifier:n,controller:i,element:o,index:r,event:t};this.context.handleError(e,`invoking action "${this.action}"`,s)}}willBeInvokedByEvent(t){const e=t.target;return!(t instanceof KeyboardEvent&&this.action.isFilterTarget(t))&&(this.element===e||(e instanceof Element&&this.element.contains(e)?this.scope.containsElement(e):this.scope.containsElement(this.action.element)))}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}}class v{constructor(t,e){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=t,this.started=!1,this.delegate=e,this.elements=new Set,this.mutationObserver=new MutationObserver((t=>this.processMutations(t)))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(t){this.started&&(this.mutationObserver.disconnect(),this.started=!1),t(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started){const t=new Set(this.matchElementsInTree());for(const e of Array.from(this.elements))t.has(e)||this.removeElement(e);for(const e of Array.from(t))this.addElement(e)}}processMutations(t){if(this.started)for(const e of t)this.processMutation(e)}processMutation(t){"attributes"==t.type?this.processAttributeChange(t.target,t.attributeName):"childList"==t.type&&(this.processRemovedNodes(t.removedNodes),this.processAddedNodes(t.addedNodes))}processAttributeChange(t,e){const n=t;this.elements.has(n)?this.delegate.elementAttributeChanged&&this.matchElement(n)?this.delegate.elementAttributeChanged(n,e):this.removeElement(n):this.matchElement(n)&&this.addElement(n)}processRemovedNodes(t){for(const e of Array.from(t)){const t=this.elementFromNode(e);t&&this.processTree(t,this.removeElement)}}processAddedNodes(t){for(const e of Array.from(t)){const t=this.elementFromNode(e);t&&this.elementIsActive(t)&&this.processTree(t,this.addElement)}}matchElement(t){return this.delegate.matchElement(t)}matchElementsInTree(t=this.element){return this.delegate.matchElementsInTree(t)}processTree(t,e){for(const n of this.matchElementsInTree(t))e.call(this,n)}elementFromNode(t){if(t.nodeType==Node.ELEMENT_NODE)return t}elementIsActive(t){return t.isConnected==this.element.isConnected&&this.element.contains(t)}addElement(t){this.elements.has(t)||this.elementIsActive(t)&&(this.elements.add(t),this.delegate.elementMatched&&this.delegate.elementMatched(t))}removeElement(t){this.elements.has(t)&&(this.elements.delete(t),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(t))}}class y{constructor(t,e,n){this.attributeName=e,this.delegate=n,this.elementObserver=new v(t,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(t){this.elementObserver.pause(t)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(t){return t.hasAttribute(this.attributeName)}matchElementsInTree(t){const e=this.matchElement(t)?[t]:[],n=Array.from(t.querySelectorAll(this.selector));return e.concat(n)}elementMatched(t){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(t,this.attributeName)}elementUnmatched(t){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(t,this.attributeName)}elementAttributeChanged(t,e){this.delegate.elementAttributeValueChanged&&this.attributeName==e&&this.delegate.elementAttributeValueChanged(t,e)}}function b(t,e,n){x(t,e).add(n)}function w(t,e,n){x(t,e).delete(n),C(t,e)}function x(t,e){let n=t.get(e);return n||(n=new Set,t.set(e,n)),n}function C(t,e){const n=t.get(e);null!=n&&0==n.size&&t.delete(e)}class _{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce(((t,e)=>t.concat(Array.from(e))),[])}get size(){return Array.from(this.valuesByKey.values()).reduce(((t,e)=>t+e.size),0)}add(t,e){b(this.valuesByKey,t,e)}delete(t,e){w(this.valuesByKey,t,e)}has(t,e){const n=this.valuesByKey.get(t);return null!=n&&n.has(e)}hasKey(t){return this.valuesByKey.has(t)}hasValue(t){return Array.from(this.valuesByKey.values()).some((e=>e.has(t)))}getValuesForKey(t){const e=this.valuesByKey.get(t);return e?Array.from(e):[]}getKeysForValue(t){return Array.from(this.valuesByKey).filter((([e,n])=>n.has(t))).map((([t,e])=>t))}}class T extends _{constructor(){super(),this.keysByValue=new Map}get values(){return Array.from(this.keysByValue.keys())}add(t,e){super.add(t,e),b(this.keysByValue,e,t)}delete(t,e){super.delete(t,e),w(this.keysByValue,e,t)}hasValue(t){return this.keysByValue.has(t)}getKeysForValue(t){const e=this.keysByValue.get(t);return e?Array.from(e):[]}}class k{constructor(t,e,n,i={}){this.selector=e,this.details=i,this.elementObserver=new v(t,this),this.delegate=n,this.matchesByElement=new _}get started(){return this.elementObserver.started}start(){this.elementObserver.start()}pause(t){this.elementObserver.pause(t)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get element(){return this.elementObserver.element}matchElement(t){const e=t.matches(this.selector);return this.delegate.selectorMatchElement?e&&this.delegate.selectorMatchElement(t,this.details):e}matchElementsInTree(t){const e=this.matchElement(t)?[t]:[],n=Array.from(t.querySelectorAll(this.selector)).filter((t=>this.matchElement(t)));return e.concat(n)}elementMatched(t){this.selectorMatched(t)}elementUnmatched(t){this.selectorUnmatched(t)}elementAttributeChanged(t,e){const n=this.matchElement(t),i=this.matchesByElement.has(this.selector,t);!n&&i&&this.selectorUnmatched(t)}selectorMatched(t){this.delegate.selectorMatched&&(this.delegate.selectorMatched(t,this.selector,this.details),this.matchesByElement.add(this.selector,t))}selectorUnmatched(t){this.delegate.selectorUnmatched(t,this.selector,this.details),this.matchesByElement.delete(this.selector,t)}}class S{constructor(t,e){this.element=t,this.delegate=e,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver((t=>this.processMutations(t)))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started)for(const t of this.knownAttributeNames)this.refreshAttribute(t,null)}processMutations(t){if(this.started)for(const e of t)this.processMutation(e)}processMutation(t){const e=t.attributeName;e&&this.refreshAttribute(e,t.oldValue)}refreshAttribute(t,e){const n=this.delegate.getStringMapKeyForAttribute(t);if(null!=n){this.stringMap.has(t)||this.stringMapKeyAdded(n,t);const i=this.element.getAttribute(t);if(this.stringMap.get(t)!=i&&this.stringMapValueChanged(i,n,e),null==i){const e=this.stringMap.get(t);this.stringMap.delete(t),e&&this.stringMapKeyRemoved(n,t,e)}else this.stringMap.set(t,i)}}stringMapKeyAdded(t,e){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(t,e)}stringMapValueChanged(t,e,n){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(t,e,n)}stringMapKeyRemoved(t,e,n){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(t,e,n)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map((t=>t.name))}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}}class D{constructor(t,e,n){this.attributeObserver=new y(t,e,this),this.delegate=n,this.tokensByElement=new _}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(t){this.attributeObserver.pause(t)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(t){this.tokensMatched(this.readTokensForElement(t))}elementAttributeValueChanged(t){const[e,n]=this.refreshTokensForElement(t);this.tokensUnmatched(e),this.tokensMatched(n)}elementUnmatchedAttribute(t){this.tokensUnmatched(this.tokensByElement.getValuesForKey(t))}tokensMatched(t){t.forEach((t=>this.tokenMatched(t)))}tokensUnmatched(t){t.forEach((t=>this.tokenUnmatched(t)))}tokenMatched(t){this.delegate.tokenMatched(t),this.tokensByElement.add(t.element,t)}tokenUnmatched(t){this.delegate.tokenUnmatched(t),this.tokensByElement.delete(t.element,t)}refreshTokensForElement(t){const e=this.tokensByElement.getValuesForKey(t),n=this.readTokensForElement(t),i=function(t,e){const n=Math.max(t.length,e.length);return Array.from({length:n},((n,i)=>[t[i],e[i]]))}(e,n).findIndex((([t,e])=>{return i=e,!((n=t)&&i&&n.index==i.index&&n.content==i.content);var n,i}));return-1==i?[[],[]]:[e.slice(i),n.slice(i)]}readTokensForElement(t){const e=this.attributeName;return function(t,e,n){return t.trim().split(/\s+/).filter((t=>t.length)).map(((t,i)=>({element:e,attributeName:n,content:t,index:i})))}(t.getAttribute(e)||"",t,e)}}class E{constructor(t,e,n){this.tokenListObserver=new D(t,e,this),this.delegate=n,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(t){const{element:e}=t,{value:n}=this.fetchParseResultForToken(t);n&&(this.fetchValuesByTokenForElement(e).set(t,n),this.delegate.elementMatchedValue(e,n))}tokenUnmatched(t){const{element:e}=t,{value:n}=this.fetchParseResultForToken(t);n&&(this.fetchValuesByTokenForElement(e).delete(t),this.delegate.elementUnmatchedValue(e,n))}fetchParseResultForToken(t){let e=this.parseResultsByToken.get(t);return e||(e=this.parseToken(t),this.parseResultsByToken.set(t,e)),e}fetchValuesByTokenForElement(t){let e=this.valuesByTokenByElement.get(t);return e||(e=new Map,this.valuesByTokenByElement.set(t,e)),e}parseToken(t){try{return{value:this.delegate.parseValueForToken(t)}}catch(t){return{error:t}}}}class A{constructor(t,e){this.context=t,this.delegate=e,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new E(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(t){const e=new g(this.context,t);this.bindingsByAction.set(t,e),this.delegate.bindingConnected(e)}disconnectAction(t){const e=this.bindingsByAction.get(t);e&&(this.bindingsByAction.delete(t),this.delegate.bindingDisconnected(e))}disconnectAllActions(){this.bindings.forEach((t=>this.delegate.bindingDisconnected(t,!0))),this.bindingsByAction.clear()}parseValueForToken(t){const e=p.forToken(t,this.schema);if(e.identifier==this.identifier)return e}elementMatchedValue(t,e){this.connectAction(e)}elementUnmatchedValue(t,e){this.disconnectAction(e)}}class ${constructor(t,e){this.context=t,this.receiver=e,this.stringMapObserver=new S(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap}start(){this.stringMapObserver.start(),this.invokeChangedCallbacksForDefaultValues()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(t){if(t in this.valueDescriptorMap)return this.valueDescriptorMap[t].name}stringMapKeyAdded(t,e){const n=this.valueDescriptorMap[e];this.hasValue(t)||this.invokeChangedCallback(t,n.writer(this.receiver[t]),n.writer(n.defaultValue))}stringMapValueChanged(t,e,n){const i=this.valueDescriptorNameMap[e];null!==t&&(null===n&&(n=i.writer(i.defaultValue)),this.invokeChangedCallback(e,t,n))}stringMapKeyRemoved(t,e,n){const i=this.valueDescriptorNameMap[t];this.hasValue(t)?this.invokeChangedCallback(t,i.writer(this.receiver[t]),n):this.invokeChangedCallback(t,i.writer(i.defaultValue),n)}invokeChangedCallbacksForDefaultValues(){for(const{key:t,name:e,defaultValue:n,writer:i}of this.valueDescriptors)null==n||this.controller.data.has(t)||this.invokeChangedCallback(e,i(n),void 0)}invokeChangedCallback(t,e,n){const i=`${t}Changed`,o=this.receiver[i];if("function"==typeof o){const i=this.valueDescriptorNameMap[t];try{const t=i.reader(e);let r=n;n&&(r=i.reader(n)),o.call(this.receiver,t,r)}catch(t){throw t instanceof TypeError&&(t.message=`Stimulus Value "${this.context.identifier}.${i.name}" - ${t.message}`),t}}}get valueDescriptors(){const{valueDescriptorMap:t}=this;return Object.keys(t).map((e=>t[e]))}get valueDescriptorNameMap(){const t={};return Object.keys(this.valueDescriptorMap).forEach((e=>{const n=this.valueDescriptorMap[e];t[n.name]=n})),t}hasValue(t){const e=`has${u(this.valueDescriptorNameMap[t].name)}`;return this.receiver[e]}}class O{constructor(t,e){this.context=t,this.delegate=e,this.targetsByName=new _}start(){this.tokenListObserver||(this.tokenListObserver=new D(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:t,content:e}){this.scope.containsElement(t)&&this.connectTarget(t,e)}tokenUnmatched({element:t,content:e}){this.disconnectTarget(t,e)}connectTarget(t,e){var n;this.targetsByName.has(e,t)||(this.targetsByName.add(e,t),null===(n=this.tokenListObserver)||void 0===n||n.pause((()=>this.delegate.targetConnected(t,e))))}disconnectTarget(t,e){var n;this.targetsByName.has(e,t)&&(this.targetsByName.delete(e,t),null===(n=this.tokenListObserver)||void 0===n||n.pause((()=>this.delegate.targetDisconnected(t,e))))}disconnectAllTargets(){for(const t of this.targetsByName.keys)for(const e of this.targetsByName.getValuesForKey(t))this.disconnectTarget(e,t)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}}function M(t,e){const n=P(t);return Array.from(n.reduce(((t,n)=>(function(t,e){const n=t[e];return Array.isArray(n)?n:[]}(n,e).forEach((e=>t.add(e))),t)),new Set))}function I(t,e){return P(t).reduce(((t,n)=>(t.push(...function(t,e){const n=t[e];return n?Object.keys(n).map((t=>[t,n[t]])):[]}(n,e)),t)),[])}function P(t){const e=[];for(;t;)e.push(t),t=Object.getPrototypeOf(t);return e.reverse()}class j{constructor(t,e){this.context=t,this.delegate=e,this.outletsByName=new _,this.outletElementsByName=new _,this.selectorObserverMap=new Map}start(){0===this.selectorObserverMap.size&&(this.outletDefinitions.forEach((t=>{const e=this.selector(t),n={outletName:t};e&&this.selectorObserverMap.set(t,new k(document.body,e,this,n))})),this.selectorObserverMap.forEach((t=>t.start()))),this.dependentContexts.forEach((t=>t.refresh()))}stop(){this.selectorObserverMap.size>0&&(this.disconnectAllOutlets(),this.selectorObserverMap.forEach((t=>t.stop())),this.selectorObserverMap.clear())}refresh(){this.selectorObserverMap.forEach((t=>t.refresh()))}selectorMatched(t,e,{outletName:n}){const i=this.getOutlet(t,n);i&&this.connectOutlet(i,t,n)}selectorUnmatched(t,e,{outletName:n}){const i=this.getOutletFromMap(t,n);i&&this.disconnectOutlet(i,t,n)}selectorMatchElement(t,{outletName:e}){return this.hasOutlet(t,e)&&t.matches(`[${this.context.application.schema.controllerAttribute}~=${e}]`)}connectOutlet(t,e,n){var i;this.outletElementsByName.has(n,e)||(this.outletsByName.add(n,t),this.outletElementsByName.add(n,e),null===(i=this.selectorObserverMap.get(n))||void 0===i||i.pause((()=>this.delegate.outletConnected(t,e,n))))}disconnectOutlet(t,e,n){var i;this.outletElementsByName.has(n,e)&&(this.outletsByName.delete(n,t),this.outletElementsByName.delete(n,e),null===(i=this.selectorObserverMap.get(n))||void 0===i||i.pause((()=>this.delegate.outletDisconnected(t,e,n))))}disconnectAllOutlets(){for(const t of this.outletElementsByName.keys)for(const e of this.outletElementsByName.getValuesForKey(t))for(const n of this.outletsByName.getValuesForKey(t))this.disconnectOutlet(n,e,t)}selector(t){return this.scope.outlets.getSelectorForOutletName(t)}get outletDependencies(){const t=new _;return this.router.modules.forEach((e=>{M(e.definition.controllerConstructor,"outlets").forEach((n=>t.add(n,e.identifier)))})),t}get outletDefinitions(){return this.outletDependencies.getKeysForValue(this.identifier)}get dependentControllerIdentifiers(){return this.outletDependencies.getValuesForKey(this.identifier)}get dependentContexts(){const t=this.dependentControllerIdentifiers;return this.router.contexts.filter((e=>t.includes(e.identifier)))}hasOutlet(t,e){return!!this.getOutlet(t,e)||!!this.getOutletFromMap(t,e)}getOutlet(t,e){return this.application.getControllerForElementAndIdentifier(t,e)}getOutletFromMap(t,e){return this.outletsByName.getValuesForKey(e).find((e=>e.element===t))}get scope(){return this.context.scope}get identifier(){return this.context.identifier}get application(){return this.context.application}get router(){return this.application.router}}class N{constructor(t,e){this.logDebugActivity=(t,e={})=>{const{identifier:n,controller:i,element:o}=this;e=Object.assign({identifier:n,controller:i,element:o},e),this.application.logDebugActivity(this.identifier,t,e)},this.module=t,this.scope=e,this.controller=new t.controllerConstructor(this),this.bindingObserver=new A(this,this.dispatcher),this.valueObserver=new $(this,this.controller),this.targetObserver=new O(this,this),this.outletObserver=new j(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(t){this.handleError(t,"initializing controller")}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start(),this.outletObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(t){this.handleError(t,"connecting controller")}}refresh(){this.outletObserver.refresh()}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(t){this.handleError(t,"disconnecting controller")}this.outletObserver.stop(),this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(t,e,n={}){const{identifier:i,controller:o,element:r}=this;n=Object.assign({identifier:i,controller:o,element:r},n),this.application.handleError(t,`Error ${e}`,n)}targetConnected(t,e){this.invokeControllerMethod(`${e}TargetConnected`,t)}targetDisconnected(t,e){this.invokeControllerMethod(`${e}TargetDisconnected`,t)}outletConnected(t,e,n){this.invokeControllerMethod(`${c(n)}OutletConnected`,t,e)}outletDisconnected(t,e,n){this.invokeControllerMethod(`${c(n)}OutletDisconnected`,t,e)}invokeControllerMethod(t,...e){const n=this.controller;"function"==typeof n[t]&&n[t](...e)}}function L(t){return function(t,e){const n=R(t),i=function(t,e){return F(e).reduce(((n,i)=>{const o=function(t,e,n){const i=Object.getOwnPropertyDescriptor(t,n);if(!i||!("value"in i)){const t=Object.getOwnPropertyDescriptor(e,n).value;return i&&(t.get=i.get||t.get,t.set=i.set||t.set),t}}(t,e,i);return o&&Object.assign(n,{[i]:o}),n}),{})}(t.prototype,e);return Object.defineProperties(n.prototype,i),n}(t,function(t){const e=M(t,"blessings");return e.reduce(((e,n)=>{const i=n(t);for(const t in i){const n=e[t]||{};e[t]=Object.assign(n,i[t])}return e}),{})}(t))}const F="function"==typeof Object.getOwnPropertySymbols?t=>[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)]:Object.getOwnPropertyNames,R=(()=>{function t(t){function e(){return Reflect.construct(t,arguments,new.target)}return e.prototype=Object.create(t.prototype,{constructor:{value:e}}),Reflect.setPrototypeOf(e,t),e}try{return function(){const e=t((function(){this.a.call(this)}));e.prototype.a=function(){},new e}(),t}catch(t){return t=>class extends t{}}})();class H{constructor(t,e){this.application=t,this.definition=function(t){return{identifier:t.identifier,controllerConstructor:L(t.controllerConstructor)}}(e),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(t){const e=this.fetchContextForScope(t);this.connectedContexts.add(e),e.connect()}disconnectContextForScope(t){const e=this.contextsByScope.get(t);e&&(this.connectedContexts.delete(e),e.disconnect())}fetchContextForScope(t){let e=this.contextsByScope.get(t);return e||(e=new N(this,t),this.contextsByScope.set(t,e)),e}}class U{constructor(t){this.scope=t}has(t){return this.data.has(this.getDataKey(t))}get(t){return this.getAll(t)[0]}getAll(t){const e=this.data.get(this.getDataKey(t))||"";return e.match(/[^\s]+/g)||[]}getAttributeName(t){return this.data.getAttributeNameForKey(this.getDataKey(t))}getDataKey(t){return`${t}-class`}get data(){return this.scope.data}}class W{constructor(t){this.scope=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(t){const e=this.getAttributeNameForKey(t);return this.element.getAttribute(e)}set(t,e){const n=this.getAttributeNameForKey(t);return this.element.setAttribute(n,e),this.get(t)}has(t){const e=this.getAttributeNameForKey(t);return this.element.hasAttribute(e)}delete(t){if(this.has(t)){const e=this.getAttributeNameForKey(t);return this.element.removeAttribute(e),!0}return!1}getAttributeNameForKey(t){return`data-${this.identifier}-${h(t)}`}}class B{constructor(t){this.warnedKeysByObject=new WeakMap,this.logger=t}warn(t,e,n){let i=this.warnedKeysByObject.get(t);i||(i=new Set,this.warnedKeysByObject.set(t,i)),i.has(e)||(i.add(e),this.logger.warn(n,t))}}function q(t,e){return`[${t}~="${e}"]`}class z{constructor(t){this.scope=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(t){return null!=this.find(t)}find(...t){return t.reduce(((t,e)=>t||this.findTarget(e)||this.findLegacyTarget(e)),void 0)}findAll(...t){return t.reduce(((t,e)=>[...t,...this.findAllTargets(e),...this.findAllLegacyTargets(e)]),[])}findTarget(t){const e=this.getSelectorForTargetName(t);return this.scope.findElement(e)}findAllTargets(t){const e=this.getSelectorForTargetName(t);return this.scope.findAllElements(e)}getSelectorForTargetName(t){return q(this.schema.targetAttributeForScope(this.identifier),t)}findLegacyTarget(t){const e=this.getLegacySelectorForTargetName(t);return this.deprecate(this.scope.findElement(e),t)}findAllLegacyTargets(t){const e=this.getLegacySelectorForTargetName(t);return this.scope.findAllElements(e).map((e=>this.deprecate(e,t)))}getLegacySelectorForTargetName(t){const e=`${this.identifier}.${t}`;return q(this.schema.targetAttribute,e)}deprecate(t,e){if(t){const{identifier:n}=this,i=this.schema.targetAttribute,o=this.schema.targetAttributeForScope(n);this.guide.warn(t,`target:${e}`,`Please replace ${i}="${n}.${e}" with ${o}="${e}". The ${i} attribute is deprecated and will be removed in a future version of Stimulus.`)}return t}get guide(){return this.scope.guide}}class V{constructor(t,e){this.scope=t,this.controllerElement=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(t){return null!=this.find(t)}find(...t){return t.reduce(((t,e)=>t||this.findOutlet(e)),void 0)}findAll(...t){return t.reduce(((t,e)=>[...t,...this.findAllOutlets(e)]),[])}getSelectorForOutletName(t){const e=this.schema.outletAttributeForScope(this.identifier,t);return this.controllerElement.getAttribute(e)}findOutlet(t){const e=this.getSelectorForOutletName(t);if(e)return this.findElement(e,t)}findAllOutlets(t){const e=this.getSelectorForOutletName(t);return e?this.findAllElements(e,t):[]}findElement(t,e){return this.scope.queryElements(t).filter((n=>this.matchesElement(n,t,e)))[0]}findAllElements(t,e){return this.scope.queryElements(t).filter((n=>this.matchesElement(n,t,e)))}matchesElement(t,e,n){const i=t.getAttribute(this.scope.schema.controllerAttribute)||"";return t.matches(e)&&i.split(" ").includes(n)}}class Y{constructor(t,e,n,i){this.targets=new z(this),this.classes=new U(this),this.data=new W(this),this.containsElement=t=>t.closest(this.controllerSelector)===this.element,this.schema=t,this.element=e,this.identifier=n,this.guide=new B(i),this.outlets=new V(this.documentScope,e)}findElement(t){return this.element.matches(t)?this.element:this.queryElements(t).find(this.containsElement)}findAllElements(t){return[...this.element.matches(t)?[this.element]:[],...this.queryElements(t).filter(this.containsElement)]}queryElements(t){return Array.from(this.element.querySelectorAll(t))}get controllerSelector(){return q(this.schema.controllerAttribute,this.identifier)}get isDocumentScope(){return this.element===document.documentElement}get documentScope(){return this.isDocumentScope?this:new Y(this.schema,document.documentElement,this.identifier,this.guide.logger)}}class K{constructor(t,e,n){this.element=t,this.schema=e,this.delegate=n,this.valueListObserver=new E(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(t){const{element:e,content:n}=t,i=this.fetchScopesByIdentifierForElement(e);let o=i.get(n);return o||(o=this.delegate.createScopeForElementAndIdentifier(e,n),i.set(n,o)),o}elementMatchedValue(t,e){const n=(this.scopeReferenceCounts.get(e)||0)+1;this.scopeReferenceCounts.set(e,n),1==n&&this.delegate.scopeConnected(e)}elementUnmatchedValue(t,e){const n=this.scopeReferenceCounts.get(e);n&&(this.scopeReferenceCounts.set(e,n-1),1==n&&this.delegate.scopeDisconnected(e))}fetchScopesByIdentifierForElement(t){let e=this.scopesByIdentifierByElement.get(t);return e||(e=new Map,this.scopesByIdentifierByElement.set(t,e)),e}}class G{constructor(t){this.application=t,this.scopeObserver=new K(this.element,this.schema,this),this.scopesByIdentifier=new _,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce(((t,e)=>t.concat(e.contexts)),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(t){this.unloadIdentifier(t.identifier);const e=new H(this.application,t);this.connectModule(e);const n=t.controllerConstructor.afterLoad;n&&n(t.identifier,this.application)}unloadIdentifier(t){const e=this.modulesByIdentifier.get(t);e&&this.disconnectModule(e)}getContextForElementAndIdentifier(t,e){const n=this.modulesByIdentifier.get(e);if(n)return n.contexts.find((e=>e.element==t))}handleError(t,e,n){this.application.handleError(t,e,n)}createScopeForElementAndIdentifier(t,e){return new Y(this.schema,t,e,this.logger)}scopeConnected(t){this.scopesByIdentifier.add(t.identifier,t);const e=this.modulesByIdentifier.get(t.identifier);e&&e.connectContextForScope(t)}scopeDisconnected(t){this.scopesByIdentifier.delete(t.identifier,t);const e=this.modulesByIdentifier.get(t.identifier);e&&e.disconnectContextForScope(t)}connectModule(t){this.modulesByIdentifier.set(t.identifier,t);this.scopesByIdentifier.getValuesForKey(t.identifier).forEach((e=>t.connectContextForScope(e)))}disconnectModule(t){this.modulesByIdentifier.delete(t.identifier);this.scopesByIdentifier.getValuesForKey(t.identifier).forEach((e=>t.disconnectContextForScope(e)))}}const X={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:t=>`data-${t}-target`,outletAttributeForScope:(t,e)=>`data-${t}-${e}-outlet`,keyMappings:Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End"},J("abcdefghijklmnopqrstuvwxyz".split("").map((t=>[t,t])))),J("0123456789".split("").map((t=>[t,t]))))};function J(t){return t.reduce(((t,[e,n])=>Object.assign(Object.assign({},t),{[e]:n})),{})}class Q{constructor(t=document.documentElement,e=X){this.logger=console,this.debug=!1,this.logDebugActivity=(t,e,n={})=>{this.debug&&this.logFormattedMessage(t,e,n)},this.element=t,this.schema=e,this.dispatcher=new o(this),this.router=new G(this),this.actionDescriptorFilters=Object.assign({},r)}static start(t,e){const n=new this(t,e);return n.start(),n}async start(){await new Promise((t=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>t())):t()})),this.logDebugActivity("application","starting"),this.dispatcher.start(),this.router.start(),this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}register(t,e){this.load({identifier:t,controllerConstructor:e})}registerActionOption(t,e){this.actionDescriptorFilters[t]=e}load(t,...e){(Array.isArray(t)?t:[t,...e]).forEach((t=>{t.controllerConstructor.shouldLoad&&this.router.loadDefinition(t)}))}unload(t,...e){(Array.isArray(t)?t:[t,...e]).forEach((t=>this.router.unloadIdentifier(t)))}get controllers(){return this.router.contexts.map((t=>t.controller))}getControllerForElementAndIdentifier(t,e){const n=this.router.getContextForElementAndIdentifier(t,e);return n?n.controller:null}handleError(t,e,n){var i;this.logger.error("%s\n\n%o\n\n%o",e,t,n),null===(i=window.onerror)||void 0===i||i.call(window,e,"",0,0,t)}logFormattedMessage(t,e,n={}){n=Object.assign({application:this},n),this.logger.groupCollapsed(`${t} #${e}`),this.logger.log("details:",Object.assign({},n)),this.logger.groupEnd()}}function Z([t,e],n){return function(t){const e=`${h(t.token)}-value`,n=function(t){const e=function(t){const e=tt(t.typeObject.type);if(!e)return;const n=et(t.typeObject.default);if(e!==n){const i=t.controller?`${t.controller}.${t.token}`:t.token;throw new Error(`The specified default value for the Stimulus Value "${i}" must match the defined type "${e}". The provided default value of "${t.typeObject.default}" is of type "${n}".`)}return e}({controller:t.controller,token:t.token,typeObject:t.typeDefinition}),n=et(t.typeDefinition),i=tt(t.typeDefinition),o=e||n||i;if(o)return o;const r=t.controller?`${t.controller}.${t.typeDefinition}`:t.token;throw new Error(`Unknown value type "${r}" for "${t.token}" value`)}(t);return{type:n,key:e,name:l(e),get defaultValue(){return function(t){const e=tt(t);if(e)return nt[e];const n=t.default;return void 0!==n?n:t}(t.typeDefinition)},get hasCustomDefaultValue(){return void 0!==et(t.typeDefinition)},reader:it[n],writer:ot[n]||ot.default}}({controller:n,token:t,typeDefinition:e})}function tt(t){switch(t){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function et(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}return Array.isArray(t)?"array":"[object Object]"===Object.prototype.toString.call(t)?"object":void 0}const nt={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},it={array(t){const e=JSON.parse(t);if(!Array.isArray(e))throw new TypeError(`expected value of type "array" but instead got value "${t}" of type "${et(e)}"`);return e},boolean(t){return!("0"==t||"false"==String(t).toLowerCase())},number(t){return Number(t)},object(t){const e=JSON.parse(t);if(null===e||"object"!=typeof e||Array.isArray(e))throw new TypeError(`expected value of type "object" but instead got value "${t}" of type "${et(e)}"`);return e},string(t){return t}},ot={default:function(t){return`${t}`},array:rt,object:rt};function rt(t){return JSON.stringify(t)}class st{constructor(t){this.context=t}static get shouldLoad(){return!0}static afterLoad(t,e){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(t,{target:e=this.element,detail:n={},prefix:i=this.identifier,bubbles:o=!0,cancelable:r=!0}={}){const s=new CustomEvent(i?`${i}:${t}`:t,{detail:n,bubbles:o,cancelable:r});return e.dispatchEvent(s),s}}st.blessings=[function(t){return M(t,"classes").reduce(((t,e)=>{return Object.assign(t,{[`${n=e}Class`]:{get(){const{classes:t}=this;if(t.has(n))return t.get(n);{const e=t.getAttributeName(n);throw new Error(`Missing attribute "${e}"`)}}},[`${n}Classes`]:{get(){return this.classes.getAll(n)}},[`has${u(n)}Class`]:{get(){return this.classes.has(n)}}});var n}),{})},function(t){return M(t,"targets").reduce(((t,e)=>{return Object.assign(t,{[`${n=e}Target`]:{get(){const t=this.targets.find(n);if(t)return t;throw new Error(`Missing target element "${n}" for "${this.identifier}" controller`)}},[`${n}Targets`]:{get(){return this.targets.findAll(n)}},[`has${u(n)}Target`]:{get(){return this.targets.has(n)}}});var n}),{})},function(t){const e=I(t,"values"),n={valueDescriptorMap:{get(){return e.reduce(((t,e)=>{const n=Z(e,this.identifier),i=this.data.getAttributeNameForKey(n.key);return Object.assign(t,{[i]:n})}),{})}}};return e.reduce(((t,e)=>Object.assign(t,function(t,e){const n=Z(t,e),{key:i,name:o,reader:r,writer:s}=n;return{[o]:{get(){const t=this.data.get(i);return null!==t?r(t):n.defaultValue},set(t){void 0===t?this.data.delete(i):this.data.set(i,s(t))}},[`has${u(o)}`]:{get(){return this.data.has(i)||n.hasCustomDefaultValue}}}}(e))),n)},function(t){return M(t,"outlets").reduce(((t,e)=>Object.assign(t,function(t){const e=c(t);return{[`${e}Outlet`]:{get(){const e=this.outlets.find(t);if(e){const n=this.application.getControllerForElementAndIdentifier(e,t);if(n)return n;throw new Error(`Missing "data-controller=${t}" attribute on outlet element for "${this.identifier}" controller`)}throw new Error(`Missing outlet element "${t}" for "${this.identifier}" controller`)}},[`${e}Outlets`]:{get(){const e=this.outlets.findAll(t);return e.length>0?e.map((e=>{const n=this.application.getControllerForElementAndIdentifier(e,t);if(n)return n;console.warn(`The provided outlet element is missing the outlet controller "${t}" for "${this.identifier}"`,e)})).filter((t=>t)):[]}},[`${e}OutletElement`]:{get(){const e=this.outlets.find(t);if(e)return e;throw new Error(`Missing outlet element "${t}" for "${this.identifier}" controller`)}},[`${e}OutletElements`]:{get(){return this.outlets.findAll(t)}},[`has${u(e)}Outlet`]:{get(){return this.outlets.has(t)}}}}(e))),{})}],st.targets=[],st.outlets=[],st.values={}},7793:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return s}});var i=n(129),o=n.n(i),r=n(6599);var s=class extends r.Controller{static targets=["form","group","advanced","submitter"];static outlets=["sonata-filter-list"];static values={defaultValues:Object};connect(){const t=void 0!==this.advancedTargets.find((t=>!t.hidden));this.advancedTargets.forEach((e=>{e.hidden=!t}))}prepareSubmit(){const t=o().stringify({filter:this.defaultValuesValue}).split("&").reduce(((t,e)=>{const n=decodeURIComponent(e.split("=")[0]),i=e.split("=")[1];return n.endsWith("[]")?(Object.prototype.hasOwnProperty.call(t,n)||(t[n]=[]),t[n].push(i)):t[n]=i,t}),{});const e=[];if(this.formElements.forEach((n=>{const i=n.multiple?[]:"",o=t[n.name]||i,r=((s=n).options&&s.multiple?s.options.filter((t=>t.selected)).map((t=>t.value)):s.value)||i;var s;if(n.closest("[hidden]"))n.removeAttribute("name");else if(JSON.stringify(o)===JSON.stringify(r))n.removeAttribute("name");else if(n.multiple&&"[]"===JSON.stringify(r)){const t=n.name.substring(0,n.name.length-2),e=document.createElement("input");e.type="hidden",e.name=t,e.value="",this.formTarget.appendChild(e),n.removeAttribute("name")}else e.push(n)})),0===e.length){const t=document.createElement("input");t.type="hidden",t.name="filters",t.value="reset",this.formTarget.appendChild(t)}this.submitterTarget.disabled=!0}toggleAdvanced(){this.advancedTargets.forEach((t=>{t.hidden=!t.hidden}))}toggleFilter(t,e){const n=this.groupTargets.find((e=>t===e.id));n&&(n.hidden=!e,this.element.hidden=!this.visibleGroups.length)}hideFilter(t){let{params:e}=t;this.toggleFilter(e.id,!1),this.sonataFilterListOutlet.disable(e.id)}get visibleGroups(){return this.groupTargets.filter((t=>!t.hidden))}get formElements(){return Array.from(this.formTarget.elements).filter((t=>["select","textarea","input"].includes(t.tagName.toLowerCase()))).filter((t=>t.name.includes("filter")))}}},9312:function(t,e,n){"use strict";n.r(e);var i=n(6599);e.default=class extends i.Controller{static targets=["counter","field"];static outlets=["sonata-filter"];static classes=["active"];connect(){this.updateCounter()}updateCounter(){this.counterTarget.innerHTML=this.enabledFields.length}disable(t){const e=this.fieldTargets.find((e=>t===e.dataset.filter));e&&(e.classList.remove(this.activeClass),this.updateCounter())}toggle(t){const e=t.target,n=e.classList.contains(this.activeClass);e.classList.toggle(this.activeClass,!n),this.sonataFilterOutlet.toggleFilter(e.dataset.filter,!n),this.updateCounter()}get enabledFields(){return this.fieldTargets.filter((t=>t.classList.contains(this.activeClass)))}}},3752:function(t,e,n){var i=n(9755);if(void 0===i)throw new Error("AdminLTE requires jQuery");!function(t){"use strict";function e(e,n){if(this.element=e,this.options=n,this.$overlay=t(n.overlayTemplate),""===n.source)throw new Error("Source url was not defined. Please specify a url in your BoxRefresh source option.");this._setUpListeners(),this.load()}var n="lte.boxrefresh",i={source:"",params:{},trigger:".refresh-btn",content:".box-body",loadInContent:!0,responseType:"",overlayTemplate:'
',onLoadStart:function(){},onLoadDone:function(t){return t}};function o(o){return this.each((function(){var r=t(this),s=r.data(n);if(!s){var a=t.extend({},i,r.data(),"object"==typeof o&&o);r.data(n,s=new e(r,a))}if("string"==typeof s){if(void 0===s[o])throw new Error("No method named "+o);s[o]()}}))}e.prototype.load=function(){this._addOverlay(),this.options.onLoadStart.call(t(this)),t.get(this.options.source,this.options.params,function(e){this.options.loadInContent&&t(this.element).find(this.options.content).html(e),this.options.onLoadDone.call(t(this),e),this._removeOverlay()}.bind(this),""!==this.options.responseType&&this.options.responseType)},e.prototype._setUpListeners=function(){t(this.element).on("click",this.options.trigger,function(t){t&&t.preventDefault(),this.load()}.bind(this))},e.prototype._addOverlay=function(){t(this.element).append(this.$overlay)},e.prototype._removeOverlay=function(){t(this.$overlay).remove()};var r=t.fn.boxRefresh;t.fn.boxRefresh=o,t.fn.boxRefresh.Constructor=e,t.fn.boxRefresh.noConflict=function(){return t.fn.boxRefresh=r,this},t(window).on("load",(function(){t('[data-widget="box-refresh"]').each((function(){o.call(t(this))}))}))}(i),function(t){"use strict";function e(t,e){this.element=t,this.options=e,this._setUpListeners()}var n="lte.boxwidget",i={animationSpeed:500,collapseTrigger:'[data-widget="collapse"]',removeTrigger:'[data-widget="remove"]',collapseIcon:"fa-minus",expandIcon:"fa-plus",removeIcon:"fa-times"},o=".box-header",r=".box-body",s=".box-footer",a=".box-tools",l="collapsed-box";function c(o){return this.each((function(){var r=t(this),s=r.data(n);if(!s){var a=t.extend({},i,r.data(),"object"==typeof o&&o);r.data(n,s=new e(r,a))}if("string"==typeof o){if(void 0===s[o])throw new Error("No method named "+o);s[o]()}}))}e.prototype.toggle=function(){t(this.element).is(".collapsed-box")?this.expand():this.collapse()},e.prototype.expand=function(){var e=t.Event("expanded.boxwidget"),n=t.Event("expanding.boxwidget"),i=this.options.collapseIcon,c=this.options.expandIcon;t(this.element).removeClass(l),t(this.element).children(o+", "+r+", "+s).children(a).find("."+c).removeClass(c).addClass(i),t(this.element).children(r+", "+s).slideDown(this.options.animationSpeed,function(){t(this.element).trigger(e)}.bind(this)).trigger(n)},e.prototype.collapse=function(){var e=t.Event("collapsed.boxwidget"),n=t.Event("collapsing.boxwidget"),i=this.options.collapseIcon,c=this.options.expandIcon;t(this.element).children(o+", "+r+", "+s).children(a).find("."+i).removeClass(i).addClass(c),t(this.element).children(r+", "+s).slideUp(this.options.animationSpeed,function(){t(this.element).addClass(l),t(this.element).trigger(e)}.bind(this)).trigger(n)},e.prototype.remove=function(){var e=t.Event("removed.boxwidget"),n=t.Event("removing.boxwidget");t(this.element).slideUp(this.options.animationSpeed,function(){t(this.element).trigger(e),t(this.element).remove()}.bind(this)).trigger(n)},e.prototype._setUpListeners=function(){var e=this;t(this.element).on("click",this.options.collapseTrigger,(function(n){return n&&n.preventDefault(),e.toggle(t(this)),!1})),t(this.element).on("click",this.options.removeTrigger,(function(n){return n&&n.preventDefault(),e.remove(t(this)),!1}))};var u=t.fn.boxWidget;t.fn.boxWidget=c,t.fn.boxWidget.Constructor=e,t.fn.boxWidget.noConflict=function(){return t.fn.boxWidget=u,this},t(window).on("load",(function(){t(".box").each((function(){c.call(t(this))}))}))}(i),function(t){"use strict";function e(t,e){this.element=t,this.options=e,this.hasBindedResize=!1,this.init()}var n="lte.controlsidebar",i={controlsidebarSlide:!0},o=".control-sidebar",r='[data-toggle="control-sidebar"]',s=".control-sidebar-open",a="control-sidebar-open",l="control-sidebar-hold-transition";function c(o){return this.each((function(){var r=t(this),s=r.data(n);if(!s){var a=t.extend({},i,r.data(),"object"==typeof o&&o);r.data(n,s=new e(r,a))}"string"==typeof o&&s.toggle()}))}e.prototype.init=function(){t(this.element).is(r)||t(this).on("click",this.toggle),this.fix(),t(window).resize(function(){this.fix()}.bind(this))},e.prototype.toggle=function(e){e&&e.preventDefault(),this.fix(),t(o).is(s)||t("body").is(s)?this.collapse():this.expand()},e.prototype.expand=function(){t(o).show(),this.options.controlsidebarSlide?t(o).addClass(a):t("body").addClass(l).addClass(a).delay(50).queue((function(){t("body").removeClass(l),t(this).dequeue()})),t(this.element).trigger(t.Event("expanded.controlsidebar"))},e.prototype.collapse=function(){this.options.controlsidebarSlide?t(o).removeClass(a):t("body").addClass(l).removeClass(a).delay(50).queue((function(){t("body").removeClass(l),t(this).dequeue()})),t(o).fadeOut(),t(this.element).trigger(t.Event("collapsed.controlsidebar"))},e.prototype.fix=function(){t("body").is(".layout-boxed")&&this._fixForBoxed(t(".control-sidebar-bg"))},e.prototype._fixForBoxed=function(e){e.css({position:"absolute",height:t(".wrapper").height()})};var u=t.fn.controlSidebar;t.fn.controlSidebar=c,t.fn.controlSidebar.Constructor=e,t.fn.controlSidebar.noConflict=function(){return t.fn.controlSidebar=u,this},t(document).on("click",r,(function(e){e&&e.preventDefault(),c.call(t(this),"toggle")}))}(i),function(t){"use strict";function e(t){this.element=t}var n="lte.directchat";function i(i){return this.each((function(){var o=t(this),r=o.data(n);r||o.data(n,r=new e(o)),"string"==typeof i&&r.toggle(o)}))}e.prototype.toggle=function(t){t.parents(".direct-chat").first().toggleClass("direct-chat-contacts-open")};var o=t.fn.directChat;t.fn.directChat=i,t.fn.directChat.Constructor=e,t.fn.directChat.noConflict=function(){return t.fn.directChat=o,this},t(document).on("click",'[data-widget="chat-pane-toggle"]',(function(e){e&&e.preventDefault(),i.call(t(this),"toggle")}))}(i),function(t){"use strict";function e(t){this.options=t,this.init()}var n="lte.pushmenu",i={collapseScreenSize:767,expandOnHover:!1,expandTransitionDelay:200},o='[data-toggle="push-menu"]',r=".sidebar-mini",s="sidebar-collapse",a="sidebar-open",l="sidebar-expanded-on-hover",c="expanded.pushMenu",u="collapsed.pushMenu";function h(o){return this.each((function(){var r=t(this),s=r.data(n);if(!s){var a=t.extend({},i,r.data(),"object"==typeof o&&o);r.data(n,s=new e(a))}"toggle"===o&&s.toggle()}))}e.prototype.init=function(){(this.options.expandOnHover||t("body").is(r+".fixed"))&&(this.expandOnHover(),t("body").addClass("sidebar-mini-expand-feature")),t(".content-wrapper").click(function(){t(window).width()<=this.options.collapseScreenSize&&t("body").hasClass(a)&&this.close()}.bind(this)),t(".sidebar-form .form-control").click((function(t){t.stopPropagation()}))},e.prototype.toggle=function(){var e=t(window).width(),n=!t("body").hasClass(s);e<=this.options.collapseScreenSize&&(n=t("body").hasClass(a)),n?this.close():this.open()},e.prototype.open=function(){t(window).width()>this.options.collapseScreenSize?t("body").removeClass(s).trigger(t.Event(c)):t("body").addClass(a).trigger(t.Event(c))},e.prototype.close=function(){t(window).width()>this.options.collapseScreenSize?t("body").addClass(s).trigger(t.Event(u)):t("body").removeClass(a+" "+s).trigger(t.Event(u))},e.prototype.expandOnHover=function(){t(".main-sidebar").hover(function(){t("body").is(r+".sidebar-collapse")&&t(window).width()>this.options.collapseScreenSize&&this.expand()}.bind(this),function(){t("body").is(".sidebar-expanded-on-hover")&&this.collapse()}.bind(this))},e.prototype.expand=function(){setTimeout((function(){t("body").removeClass(s).addClass(l)}),this.options.expandTransitionDelay)},e.prototype.collapse=function(){setTimeout((function(){t("body").removeClass(l).addClass(s)}),this.options.expandTransitionDelay)};var p=t.fn.pushMenu;t.fn.pushMenu=h,t.fn.pushMenu.Constructor=e,t.fn.pushMenu.noConflict=function(){return t.fn.pushMenu=p,this},t(document).on("click",o,(function(e){e.preventDefault(),h.call(t(this),"toggle")})),t(window).on("load",(function(){h.call(t(o))}))}(i),function(t){"use strict";function e(t,e){this.element=t,this.options=e,this._setUpListeners()}var n="lte.todolist",i={onCheck:function(t){return t},onUnCheck:function(t){return t}},o={data:'[data-widget="todo-list"]'};function r(o){return this.each((function(){var r=t(this),s=r.data(n);if(!s){var a=t.extend({},i,r.data(),"object"==typeof o&&o);r.data(n,s=new e(r,a))}if("string"==typeof s){if(void 0===s[o])throw new Error("No method named "+o);s[o]()}}))}e.prototype.toggle=function(t){t.parents(o.li).first().toggleClass("done"),t.prop("checked")?this.check(t):this.unCheck(t)},e.prototype.check=function(t){this.options.onCheck.call(t)},e.prototype.unCheck=function(t){this.options.onUnCheck.call(t)},e.prototype._setUpListeners=function(){var e=this;t(this.element).on("change ifChanged","input:checkbox",(function(){e.toggle(t(this))}))};var s=t.fn.todoList;t.fn.todoList=r,t.fn.todoList.Constructor=e,t.fn.todoList.noConflict=function(){return t.fn.todoList=s,this},t(window).on("load",(function(){t(o.data).each((function(){r.call(t(this))}))}))}(i),function(t){"use strict";function e(e,n){this.element=e,this.options=n,t(this.element).addClass(l),t(o+s,this.element).addClass(a),this._setUpListeners()}var n="lte.tree",i={animationSpeed:500,accordion:!0,followLink:!1,trigger:".treeview a"},o=".treeview",r=".treeview-menu",s=".active",a="menu-open",l="tree";function c(o){return this.each((function(){var r=t(this);if(!r.data(n)){var s=t.extend({},i,r.data(),"object"==typeof o&&o);r.data(n,new e(r,s))}}))}e.prototype.toggle=function(t,e){var n=t.next(r),i=t.parent(),s=i.hasClass(a);i.is(o)&&(this.options.followLink&&"#"!==t.attr("href")||e.preventDefault(),s?this.collapse(n,i):this.expand(n,i))},e.prototype.expand=function(e,n){var i=t.Event("expanded.tree");if(this.options.accordion){var o=n.siblings(".menu-open, .active"),s=o.children(r);this.collapse(s,o)}n.addClass(a),e.stop().slideDown(this.options.animationSpeed,function(){t(this.element).trigger(i),n.height("auto")}.bind(this))},e.prototype.collapse=function(e,n){var i=t.Event("collapsed.tree");n.removeClass(a),e.stop().slideUp(this.options.animationSpeed,function(){t(this.element).trigger(i),n.find(o).removeClass(a).find(r).hide()}.bind(this))},e.prototype._setUpListeners=function(){var e=this;t(this.element).on("click",this.options.trigger,(function(n){e.toggle(t(this),n)}))};var u=t.fn.tree;t.fn.tree=c,t.fn.tree.Constructor=e,t.fn.tree.noConflict=function(){return t.fn.tree=u,this},t(window).on("load",(function(){t('[data-widget="tree"]').each((function(){c.call(t(this))}))}))}(i),function(t){"use strict";function e(t){this.options=t,this.bindedResize=!1,this.activate()}var n="lte.layout",i={slimscroll:!0,resetHeight:!0},o=".wrapper",r=".content-wrapper",s=".main-header",a=".sidebar",l=".sidebar-menu",c="fixed";function u(o){return this.each((function(){var r=t(this),s=r.data(n);if(!s){var a=t.extend({},i,r.data(),"object"==typeof o&&o);r.data(n,s=new e(a))}if("string"==typeof o){if(void 0===s[o])throw new Error("No method named "+o);s[o]()}}))}e.prototype.activate=function(){this.fix(),this.fixSidebar(),t("body").removeClass("hold-transition"),this.options.resetHeight&&t("body, html, "+o).css({height:"auto","min-height":"100%"}),this.bindedResize||(t(window).resize(function(){this.fix(),this.fixSidebar(),t(".main-header .logo, "+a).one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){this.fix(),this.fixSidebar()}.bind(this))}.bind(this)),this.bindedResize=!0),t(l).on("expanded.tree",function(){this.fix(),this.fixSidebar()}.bind(this)),t(l).on("collapsed.tree",function(){this.fix(),this.fixSidebar()}.bind(this))},e.prototype.fix=function(){t(".layout-boxed > "+o).css("overflow","hidden");var e=t(".main-footer").outerHeight()||0,n=t(s).outerHeight()||0,i=n+e,l=t(window).height(),u=t(a).outerHeight()||0;if(t("body").hasClass(c))t(r).css("min-height",l-e);else{var h;h=u+n<=l?(t(r).css("min-height",l-i),l-i):(t(r).css("min-height",u),u);var p=t(".control-sidebar");void 0!==p&&p.height()>h&&t(r).css("min-height",p.height())}},e.prototype.fixSidebar=function(){t("body").hasClass(c)?this.options.slimscroll&&void 0!==t.fn.slimScroll&&0===t(".main-sidebar").find("slimScrollDiv").length&&t(a).slimScroll({height:t(window).height()-t(s).height()+"px"}):void 0!==t.fn.slimScroll&&t(a).slimScroll({destroy:!0}).height("auto")};var h=t.fn.layout;t.fn.layout=u,t.fn.layout.Constuctor=e,t.fn.layout.noConflict=function(){return t.fn.layout=h,this},t(window).on("load",(function(){u.call(t("body"))}))}(i)},4040:function(t,e,n){var i=n(9755);const o={collectionCounters:[],config:null,translations:null,shared_setup(t){o.read_config(),o.log("[core|shared_setup] Register services on",t),o.setup_select2(t),o.setup_icheck(t),o.setup_checkbox_range_selection(t),o.setup_xeditable(t),o.setup_form_tabs_for_errors(t),o.setup_inline_form_errors(t),o.setup_tree_view(t),o.setup_collection_counter(t),o.setup_sticky_elements(t),o.setup_readmore_elements(t),o.setup_form_submit(t)},read_config(){const t=i("[data-sonata-admin]").data("sonata-admin");this.config=t.config,this.translations=t.translations},get_config(t){return null==this.config&&this.read_config(),this.config[t]},get_translations(t){return null==this.translations&&this.read_config(),this.translations[t]},setup_list_modal(t){o.log("[core|setup_list_modal] configure modal on",t),i("div.modal-dialog",t).css({width:"90%",height:"85%",padding:0}),i("div.modal-content",t).css({"border-radius":"0",height:"100%",padding:0}),i(".modal-body",t).css({width:"auto",height:"90%",padding:15,overflow:"auto"}),i(t).trigger("sonata-admin-setup-list-modal")},setup_select2(t){o.get_config("USE_SELECT2")&&(o.log("[core|setup_select2] configure Select2 on",t),i('select:not([data-sonata-select2="false"])',t).each(((t,e)=>{const n=i(e);let r=!1;const s=n.data("popover");let a=null,l=10,c=!1;n.removeClass("form-control"),n.find('option[value=""]').length||n.attr("data-placeholder")&&n.attr("data-placeholder").length||"true"===n.attr("data-sonata-select2-allow-clear")?r=!0:"false"===n.attr("data-sonata-select2-allow-clear")&&(r=!1),"true"===n.attr("data-sonata-select2-allow-tags")&&(c=!0),n.attr("data-sonata-select2-maximumSelectionLength")&&(a=n.attr("data-sonata-select2-maximumSelectionLength")),n.attr("data-sonata-select2-minimumResultsForSearch")&&(l=n.attr("data-sonata-select2-minimumResultsForSearch")),n.select2({width:()=>o.get_select2_width(n),theme:"bootstrap",dropdownAutoWidth:!0,minimumResultsForSearch:l,placeholder:r?" ":"",allowClear:r,maximumSelectionLength:a,tags:c}),void 0!==s&&n.select2("container").popover(s.options)})))},setup_icheck(t){if(o.get_config("USE_ICHECK")){o.log("[core|setup_icheck] configure iCheck on",t);const e=i('input[type="checkbox"]:not(label.btn > input, [data-sonata-icheck="false"]), input[type="radio"]:not(label.btn > input, [data-sonata-icheck="false"])',t);e.iCheck({checkboxClass:"icheckbox_square-blue",radioClass:"iradio_square-blue"}),t===window.document&&setTimeout((()=>{e.iCheck("update")}),0)}},setup_checkbox_range_selection(t){let e;o.log("[core|setup_checkbox_range_selection] configure checkbox range selection on",t);const n=o.get_config("USE_ICHECK");i('tbody input[type="checkbox"], tbody .iCheck-helper',t).on("click",(o=>{let r;if(r=n?i(o.target).prev('input[type="checkbox"]'):i(o.target),r.length){const s=r.closest("tr").index();if(o.shiftKey&&e>=0){const o=i(`tbody input[type="checkbox"]:nth(${s})`,t).prop("checked");i('tbody input[type="checkbox"]',t).each(((t,r)=>{if(t>e&&ts&&t',container:"body",placement:"auto",success(t){const e=i(t);o.setup_xeditable(e),i(this).closest("td").replaceWith(e)},error:t=>"application/json"===t.getResponseHeader("Content-Type")?JSON.parse(t.responseText):t.responseText})},log(){if(!o.get_config("DEBUG"))return;for(var t=arguments.length,e=new Array(t),n=0;n{const r=i(n);let s=-1;r.children().each(((t,n)=>{const o=e.exec(i('[id^="sonata-ba-field-container"]',n).attr("id"));o&&o[1]&&o[1]>s&&(s=parseInt(o[1],10))})),o.collectionCounters[r.attr("id")]=s}))},setup_collection_buttons(t){i(t).on("click",".sonata-collection-add",(t=>{o.stopEvent(t);const e=i(t.target).closest("[data-prototype]");o.collectionCounters[e.attr("id")]+=1;const n=o.collectionCounters[e.attr("id")];let r=e.attr("data-prototype");const s=e.attr("data-prototype-name")||"__name__",a=new RegExp(`${e.attr("id")}_${s}`,"g");r=r.replace(a,`${e.attr("id")}_${n}`);const l=e.attr("id").split("_"),c=new RegExp(`${l[l.length-1]}\\]\\[${s}`,"g");r=r.replace(c,`${l[l.length-1]}][${n}`),i(r).insertBefore(i(t.target).parent()).trigger("sonata-admin-append-form-element"),i(t.target).trigger("sonata-collection-item-added")})),i(t).on("click",".sonata-collection-delete",(t=>{o.stopEvent(t),i(t.target).trigger("sonata-collection-item-deleted"),i(t.target).closest(".sonata-collection-row").remove(),i(document).trigger("sonata-collection-item-deleted-successful")}))},setup_per_page_switcher(t){o.log("[core|setup_per_page_switcher] setup page switcher",t),i("select.per-page").on("change",(t=>{i("input[type=submit]").hide(),window.top.location.href=t.target.options[t.target.selectedIndex].value}))},setup_form_tabs_for_errors(t){o.log("[core|setup_form_tabs_for_errors] setup form tab's errors",t),i("form",t).each(((t,e)=>{o.show_form_first_tab_with_errors(i(e),".sonata-ba-field-error")})),i(t).on("click",'form [type="submit"]',(t=>{o.show_form_first_tab_with_errors(i(t.target).closest("form"),":invalid")})).on("keypress",'form [type="text"]',(t=>{13===t.which&&o.show_form_first_tab_with_errors(i(t.target),":invalid")}))},show_form_first_tab_with_errors(t,e){o.log("[core|show_form_first_tab_with_errors] show first tab with errors",t);let n;t.find(".nav-tabs a").each(((t,o)=>{const r=i(o).attr("href"),s=i(o),a=s.find(".has-errors");i(r).find(e).length>0?(n||(s.tab("show"),n=s),a.removeClass("hide")):a.addClass("hide")}))},setup_inline_form_errors(t){o.log("[core|setup_inline_form_errors] show first tab with errors",t);const e='.sonata-ba-field-inline-table [id$="_delete"][type="checkbox"]';i(e,t).each(((t,e)=>{o.switch_inline_form_errors(i(e))})),i(t).on("change",e,(t=>{o.switch_inline_form_errors(i(t.target))}))},switch_inline_form_errors(t){o.log("[core|switch_inline_form_errors] switch_inline_form_errors",t);const e=t.closest(".sonata-ba-field-inline-table"),n=e.find(".sonata-ba-field-error-messages");t.is(":checked")?(e.find("[required]").removeAttr("required").attr("data-required","required"),n.hide()):(e.find("[data-required]").attr("required","required"),n.show())},setup_tree_view(t){o.log("[core|setup_tree_view] setup tree view",t),i("ul.js-treeview",t).treeView()},get_select2_width(t){const e=/width:(auto|(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc)))/i;let n=t.attr("style");if(void 0!==n){const t=n.split(";");for(let n=0,i=t.length;n=1)return i[1]}}return n=t.css("width"),n.indexOf("%")>0?n:"100%"},setup_sortable_select2(t,e,n){const r=[],s=[],a=[],l=t.val()?t.val().split(","):[];for(let t=0;to.get_select2_width(t),dropdownAutoWidth:!0,data:[...s,...a],multiple:!0,...n};t.select2(c);const u=t.data("select2").$container.find("ul.select2-selection__rendered");u.sortable({containment:"parent",items:"> li[data-select2-id]",update:()=>{const e=u.children("li[data-select2-id]").toArray().map((t=>r[t.title]));t.val(e.join())}}),t.parents("form:first").submit((()=>{let e=t.val().trim();if(""!==e){let n=t.attr("name");e=e.split(","),n=n.substring(0,n.length-1);for(let o=0;o").attr("type","hidden").attr("name","".concat(n+o,"]")).val(e[o]).appendTo(t.parents("form:first"))}t.remove()}))},setup_sticky_elements(t){if(o.get_config("USE_STICKYFORMS")){o.log("[core|setup_sticky_elements] setup sticky elements on",t);const e=i(t).find(".navbar-static-top"),n=i(t).find(".content-wrapper"),r=i(n).find("nav.navbar"),s=i(n).find(".sonata-ba-form-actions");r.length&&new window.Waypoint.Sticky({element:r[0],offset:()=>(o.refreshNavbarStuckClass(e),i(e).outerHeight()),handler:t=>{"up"===t?i(r).width("auto"):i(r).width(i(n).outerWidth()),o.refreshNavbarStuckClass(e)}}),s.length&&new window.Waypoint({element:n[0],offset:"bottom-in-view",handler:t=>{i(".sonata-ba-form form > .row").outerHeight()+i(s).outerHeight()-2{t.length&&Math.round(i(window).scrollTop()+i(window).height())>=i(document).height()&&i(t).removeClass("stuck"),e.length&&0===i(window).scrollTop()&&i(e).removeClass("stuck")}),250)),i("body").on("expanded.pushMenu collapsed.pushMenu",(()=>{setTimeout((()=>{o.handleResize(t,e,n)}),350)})),i(window).on("resize",o.debounce((()=>{o.handleResize(t,e,n)}),250))},handleResize(t,e,n){e.length&&i(e).hasClass("stuck")&&i(e).width(i(n).outerWidth()),t.length&&i(t).hasClass("stuck")&&i(t).width(i(n).outerWidth())},refreshNavbarStuckClass(t){const e=t.outerHeight();let n=document.getElementById("navbar-stuck");null===n&&(n=document.createElement("style"),n.id="navbar-stuck",n.type="text/css",n.dataset.lastOffset=e,n.innerHTML=`body.fixed .content-header .navbar.stuck { top: ${e}px; }`,document.head.appendChild(n)),n.dataset.lastOffset!==e&&(n.dataset.lastOffset=e,n.innerHTML=`body.fixed .content-header .navbar.stuck { top: ${e}px; }`)},debounce(t,e,n){let i;return function(){for(var o=arguments.length,r=new Array(o),s=0;s{i=null,n||t.apply(a,r)}),e),l&&t.apply(a,r)}},setup_readmore_elements(t){o.log("[core|setup_readmore_elements] setup readmore elements on",t),i(t).find(".sonata-readmore").each(((t,e)=>{const n=i(e);n.readmore({collapsedHeight:parseInt(n.data("readmore-height"),10),moreLink:`${n.data("readmore-more")}`,lessLink:`${n.data("readmore-less")}`})}))},handle_top_navbar_height(){i("body.fixed .content-wrapper").css("padding-top",i(".navbar-static-top").outerHeight())},setup_form_submit(t){o.log("[core|setup_form_submit] setup form submit on",t),i(t).find("form").on("submit",(t=>{const e=i(t.target);setTimeout((()=>{e.find("button").prop("disabled",!0)}),1);const n=e.find(".nav-tabs li.active .changer-tab");n.length>0&&e.find('input[name="_tab"]').val(n.attr("aria-controls"))}))},setup_view_tabs_changer(){i(".changer-tab").on("click",(t=>{const e=i(t.target).attr("aria-controls"),n=window.location.search.substring(1),o=decodeURIComponent(n).replace(/"/g,'\\"').replace(/&/g,'","').replace(/=/g,'":"');let r="{}";o.length&&(r=`{"${o}"}`);const s=JSON.parse(r);s._tab=e;const a=`${window.location.origin+window.location.pathname}?${i.param(s,!0)}`;window.history.pushState({path:a},"",a)}))}};window.Admin=o,i((()=>{o.handle_top_navbar_height(),i("html").removeClass("no-js"),o.setup_per_page_switcher(document),o.setup_collection_buttons(document),o.setup_view_tabs_changer(),o.shared_setup(document)})),i(window).on("resize",(()=>{o.handle_top_navbar_height()})),i(document).on("sonata-admin-append-form-element",(t=>{o.setup_select2(t.target),o.setup_icheck(t.target),o.setup_collection_counter(t.target)})),i(window).on("load",(()=>{o.get_config("CONFIRM_EXIT")&&i(".sonata-ba-form form").each(((t,e)=>{i(e).confirmExit()}))}))},2056:function(t,e,n){var i=n(9755);const o={remove_iCheck_in_flashmessage(){i(".read-more-state").iCheck("destroy")},addFlashmessageListener(){document.querySelectorAll(".read-more-state").forEach((t=>{t.addEventListener("change",(e=>{const n=document.querySelector(`label[for="${t.id}"]`),i=n.querySelector(".more"),o=n.querySelector(".less");e.target.checked?(i.classList.add("hide"),o.classList.remove("hide")):(i.classList.remove("hide"),o.classList.add("hide"))}))}))}};i((()=>{o.remove_iCheck_in_flashmessage(),o.addFlashmessageListener()}))},243:function(t,e,n){var i=n(9755);i.fn.confirmExit=function(){return i(this).attr("data-original",i(this).serialize()),i(this).on("submit",(function(){i(this).removeAttr("data-original")})),i(this)},i(window).on("beforeunload",(t=>{const e=t||window.event,n=window.Admin.get_translations("CONFIRM_EXIT");let o=!1;if(i("form[data-original]").each(((t,e)=>{i(e).attr("data-original")!==i(e).serialize()&&(o=!0)})),o)return e&&(e.returnValue=n),n}))},9543:function(t,e,n){var i=n(9755);i((()=>{i(".sidebar-toggle").on("click",(()=>{document.cookie.includes("sonata_sidebar_hide=1")?document.cookie="sonata_sidebar_hide=0;path=/":document.cookie="sonata_sidebar_hide=1;path=/"}))}))},2916:function(t,e,n){var i=n(9755);const o="treeView",r={togglersAttribute:"[data-treeview-toggler]",toggledState:"is-toggled",activeState:"is-active",defaultToggled:"[data-treeview-toggled]",instanceAttribute:"data-treeview-instance"};function s(t,e){this.element=t,this.options=i.extend({},r,e),this.defaults=r,this.name=o,this.init()}s.prototype={init(){this.setElements(),this.setEvents(),this.setAttributes(),this.showActiveElement(),this.showToggledElements()},setElements(){this.$element=i(this.element),this.$togglers=this.$element.find(this.options.togglersAttribute),this.$defaultToggled=this.$element.find(this.options.defaultToggled)},setAttributes(){this.$element.attr(this.options.instanceAttribute,!0)},setEvents(){this.$togglers.on("click",this.toggle.bind(this))},toggle(t){const e=i(t.currentTarget).parent();e.toggleClass(this.options.toggledState),e.next("ul").slideToggle()},showActiveElement(){const t=`[${this.options.instanceAttribute}] ul, [${this.options.instanceAttribute}]`,e=this.$element.find(`.${this.options.activeState}`).parents(t);e.show(),e.prev().addClass(this.options.toggledState)},showToggledElements(){this.$defaultToggled.addClass(this.options.toggledState),this.$defaultToggled.next("ul").show()}},i.fn[o]=function(t){return this.each((function(){i.data(this,`plugin_${o}`)||i.data(this,`plugin_${o}`,new s(this,t))}))}},7915:function(t,e,n){n(8294),n(1309),n(3929),n(4050),n(63),n(9737),n(8852),n(6278),n(6927),n(3497),n(7814),n(5377)},5377:function(t,e,n){!function(t){"use strict";var e=function(n,i){this.options=t.extend({},e.DEFAULTS,i);var o=this.options.target===e.DEFAULTS.target?t(this.options.target):t(document).find(this.options.target);this.$target=o.on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(n),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var i=t(this),o=i.data("bs.affix"),r="object"==typeof n&&n;o||i.data("bs.affix",o=new e(this,r)),"string"==typeof n&&o[n]()}))}e.VERSION="3.4.1",e.RESET="affix affix-top affix-bottom",e.DEFAULTS={offset:0,target:window},e.prototype.getState=function(t,e,n,i){var o=this.$target.scrollTop(),r=this.$element.offset(),s=this.$target.height();if(null!=n&&"top"==this.affixed)return o=t-i&&"bottom"},e.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(e.RESET).addClass("affix");var t=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-t},e.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=this.$element.height(),i=this.options.offset,o=i.top,r=i.bottom,s=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(r=o=i),"function"==typeof o&&(o=i.top(this.$element)),"function"==typeof r&&(r=i.bottom(this.$element));var a=this.getState(s,n,o,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),c=t.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(e.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:s-n-r})}};var i=t.fn.affix;t.fn.affix=n,t.fn.affix.Constructor=e,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",(function(){t('[data-spy="affix"]').each((function(){var e=t(this),i=e.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),n.call(e,i)}))}))}(n(9755))},1309:function(t,e,n){!function(t){"use strict";var e='[data-dismiss="alert"]',n=function(n){t(n).on("click",e,this.close)};n.VERSION="3.4.1",n.TRANSITION_DURATION=150,n.prototype.close=function(e){var i=t(this),o=i.attr("data-target");o||(o=(o=i.attr("href"))&&o.replace(/.*(?=#[^\s]*$)/,"")),o="#"===o?[]:o;var r=t(document).find(o);function s(){r.detach().trigger("closed.bs.alert").remove()}e&&e.preventDefault(),r.length||(r=i.closest(".alert")),r.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(r.removeClass("in"),t.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",s).emulateTransitionEnd(n.TRANSITION_DURATION):s())};var i=t.fn.alert;t.fn.alert=function(e){return this.each((function(){var i=t(this),o=i.data("bs.alert");o||i.data("bs.alert",o=new n(this)),"string"==typeof e&&o[e].call(i)}))},t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=i,this},t(document).on("click.bs.alert.data-api",e,n.prototype.close)}(n(9755))},3929:function(t,e,n){!function(t){"use strict";var e=function(n,i){this.$element=t(n),this.options=t.extend({},e.DEFAULTS,i),this.isLoading=!1};function n(n){return this.each((function(){var i=t(this),o=i.data("bs.button"),r="object"==typeof n&&n;o||i.data("bs.button",o=new e(this,r)),"toggle"==n?o.toggle():n&&o.setState(n)}))}e.VERSION="3.4.1",e.DEFAULTS={loadingText:"loading..."},e.prototype.setState=function(e){var n="disabled",i=this.$element,o=i.is("input")?"val":"html",r=i.data();e+="Text",null==r.resetText&&i.data("resetText",i[o]()),setTimeout(t.proxy((function(){i[o](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n).prop(n,!1))}),this),0)},e.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=n,t.fn.button.Constructor=e,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(e){var i=t(e.target).closest(".btn");n.call(i,"toggle"),t(e.target).is('input[type="radio"], input[type="checkbox"]')||(e.preventDefault(),i.is("input,button")?i.trigger("focus"):i.find("input:visible,button:visible").first().trigger("focus"))})).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',(function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))}))}(n(9755))},4050:function(t,e,n){!function(t){"use strict";var e=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};function n(n){return this.each((function(){var i=t(this),o=i.data("bs.carousel"),r=t.extend({},e.DEFAULTS,i.data(),"object"==typeof n&&n),s="string"==typeof n?n:r.slide;o||i.data("bs.carousel",o=new e(this,r)),"number"==typeof n?o.to(n):s?o[s]():r.interval&&o.pause().cycle()}))}e.VERSION="3.4.1",e.TRANSITION_DURATION=600,e.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},e.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},e.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},e.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},e.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e);if(("prev"==t&&0===n||"next"==t&&n==this.$items.length-1)&&!this.options.wrap)return e;var i=(n+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(i)},e.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",(function(){e.to(t)})):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},e.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},e.prototype.next=function(){if(!this.sliding)return this.slide("next")},e.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},e.prototype.slide=function(n,i){var o=this.$element.find(".item.active"),r=i||this.getItemForDirection(n,o),s=this.interval,a="next"==n?"left":"right",l=this;if(r.hasClass("active"))return this.sliding=!1;var c=r[0],u=t.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,s&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var h=t(this.$indicators.children()[this.getItemIndex(r)]);h&&h.addClass("active")}var p=t.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(r.addClass(n),"object"==typeof r&&r.length&&r[0].offsetWidth,o.addClass(a),r.addClass(a),o.one("bsTransitionEnd",(function(){r.removeClass([n,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout((function(){l.$element.trigger(p)}),0)})).emulateTransitionEnd(e.TRANSITION_DURATION)):(o.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(p)),s&&this.cycle(),this}};var i=t.fn.carousel;t.fn.carousel=n,t.fn.carousel.Constructor=e,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this};var o=function(e){var i=t(this),o=i.attr("href");o&&(o=o.replace(/.*(?=#[^\s]+$)/,""));var r=i.attr("data-target")||o,s=t(document).find(r);if(s.hasClass("carousel")){var a=t.extend({},s.data(),i.data()),l=i.attr("data-slide-to");l&&(a.interval=!1),n.call(s,a),l&&s.data("bs.carousel").to(l),e.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",(function(){t('[data-ride="carousel"]').each((function(){var e=t(this);n.call(e,e.data())}))}))}(n(9755))},63:function(t,e,n){!function(t){"use strict";var e=function(n,i){this.$element=t(n),this.options=t.extend({},e.DEFAULTS,i),this.$trigger=t('[data-toggle="collapse"][href="#'+n.id+'"],[data-toggle="collapse"][data-target="#'+n.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function n(e){var n,i=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(document).find(i)}function i(n){return this.each((function(){var i=t(this),o=i.data("bs.collapse"),r=t.extend({},e.DEFAULTS,i.data(),"object"==typeof n&&n);!o&&r.toggle&&/show|hide/.test(n)&&(r.toggle=!1),o||i.data("bs.collapse",o=new e(this,r)),"string"==typeof n&&o[n]()}))}e.VERSION="3.4.1",e.TRANSITION_DURATION=350,e.DEFAULTS={toggle:!0},e.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},e.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var n,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(n=o.data("bs.collapse"))&&n.transitioning)){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){o&&o.length&&(i.call(o,"hide"),n||o.data("bs.collapse",null));var s=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[s](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[s](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",s].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(e.TRANSITION_DURATION)[s](this.$element[0][l])}}}},e.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var n=t.Event("hide.bs.collapse");if(this.$element.trigger(n),!n.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!t.support.transition)return o.call(this);this.$element[i](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(e.TRANSITION_DURATION)}}},e.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},e.prototype.getParent=function(){return t(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy((function(e,i){var o=t(i);this.addAriaAndCollapsedClass(n(o),o)}),this)).end()},e.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var o=t.fn.collapse;t.fn.collapse=i,t.fn.collapse.Constructor=e,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(e){var o=t(this);o.attr("data-target")||e.preventDefault();var r=n(o),s=r.data("bs.collapse")?"toggle":o.data();i.call(r,s)}))}(n(9755))},9737:function(t,e,n){!function(t){"use strict";var e='[data-toggle="dropdown"]',n=function(e){t(e).on("click.bs.dropdown",this.toggle)};function i(e){var n=e.attr("data-target");n||(n=(n=e.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==n?t(document).find(n):null;return i&&i.length?i:e.parent()}function o(n){n&&3===n.which||(t(".dropdown-backdrop").remove(),t(e).each((function(){var e=t(this),o=i(e),r={relatedTarget:this};o.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(o[0],n.target)||(o.trigger(n=t.Event("hide.bs.dropdown",r)),n.isDefaultPrevented()||(e.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))})))}n.VERSION="3.4.1",n.prototype.toggle=function(e){var n=t(this);if(!n.is(".disabled, :disabled")){var r=i(n),s=r.hasClass("open");if(o(),!s){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",o);var a={relatedTarget:this};if(r.trigger(e=t.Event("show.bs.dropdown",a)),e.isDefaultPrevented())return;n.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},n.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var o=t(this);if(n.preventDefault(),n.stopPropagation(),!o.is(".disabled, :disabled")){var r=i(o),s=r.hasClass("open");if(!s&&27!=n.which||s&&27==n.which)return 27==n.which&&r.find(e).trigger("focus"),o.trigger("click");var a=r.find(".dropdown-menu li:not(.disabled):visible a");if(a.length){var l=a.index(n.target);38==n.which&&l>0&&l--,40==n.which&&ldocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},e.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},e.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth

'}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();if(this.options.html){var i=typeof n;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===i&&(n=this.sanitizeHtml(n))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===i?"html":"append"](n)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(n);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=t.fn.popover;t.fn.popover=function(n){return this.each((function(){var i=t(this),o=i.data("bs.popover"),r="object"==typeof n&&n;!o&&/destroy|hide/.test(n)||(o||i.data("bs.popover",o=new e(this,r)),"string"==typeof n&&o[n]())}))},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(n(9755))},3497:function(t,e,n){!function(t){"use strict";function e(n,i){this.$body=t(document.body),this.$scrollElement=t(n).is(document.body)?t(window):t(n),this.options=t.extend({},e.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each((function(){var i=t(this),o=i.data("bs.scrollspy"),r="object"==typeof n&&n;o||i.data("bs.scrollspy",o=new e(this,r)),"string"==typeof n&&o[n]()}))}e.VERSION="3.4.1",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map((function(){var e=t(this),o=e.data("target")||e.attr("href"),r=/^#./.test(o)&&t(o);return r&&r.length&&r.is(":visible")&&[[r[n]().top+i,o]]||null})).sort((function(t,e){return t[0]-e[0]})).each((function(){e.offsets.push(this[0]),e.targets.push(this[1])}))},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),o=this.offsets,r=this.targets,s=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=i)return s!=(t=r[r.length-1])&&this.activate(t);if(s&&e=o[t]&&(void 0===o[t+1]||e .active"),s=o&&t.support.transition&&(r.length&&r.hasClass("fade")||!!i.find("> .fade").length);function a(){r.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),n.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(n[0].offsetWidth,n.addClass("in")):n.removeClass("fade"),n.parent(".dropdown-menu").length&&n.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}r.length&&s?r.one("bsTransitionEnd",a).emulateTransitionEnd(e.TRANSITION_DURATION):a(),r.removeClass("in")};var i=t.fn.tab;t.fn.tab=n,t.fn.tab.Constructor=e,t.fn.tab.noConflict=function(){return t.fn.tab=i,this};var o=function(e){e.preventDefault(),n.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(n(9755))},6278:function(t,e,n){!function(t){"use strict";var e=["sanitize","whiteList","sanitizeFn"],n=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],i={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},o=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,r=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function s(e,i){var s=e.nodeName.toLowerCase();if(-1!==t.inArray(s,i))return-1===t.inArray(s,n)||Boolean(e.nodeValue.match(o)||e.nodeValue.match(r));for(var a=t(i).filter((function(t,e){return e instanceof RegExp})),l=0,c=a.length;l
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:i},l.prototype.init=function(e,n,i){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(document).find(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),r=o.length;r--;){var s=o[r];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",l="hover"==s?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},l.prototype.getDefaults=function(){return l.DEFAULTS},l.prototype.getOptions=function(n){var i=this.$element.data();for(var o in i)i.hasOwnProperty(o)&&-1!==t.inArray(o,e)&&delete i[o];return(n=t.extend({},this.getDefaults(),i,n)).delay&&"number"==typeof n.delay&&(n.delay={show:n.delay,hide:n.delay}),n.sanitize&&(n.template=a(n.template,n.whiteList,n.sanitizeFn)),n},l.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,(function(t,i){n[t]!=i&&(e[t]=i)})),e},l.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout((function(){"in"==n.hoverState&&n.show()}),n.options.delay.show)}},l.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},l.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout((function(){"out"==n.hoverState&&n.hide()}),n.options.delay.hide)}},l.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var i=this,o=this.tip(),r=this.getUID(this.type);this.setContent(),o.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&o.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,c=a.test(s);c&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(t(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var u=this.getPosition(),h=o[0].offsetWidth,p=o[0].offsetHeight;if(c){var d=s,f=this.getPosition(this.$viewport);s="bottom"==s&&u.bottom+p>f.bottom?"top":"top"==s&&u.top-pf.width?"left":"left"==s&&u.left-hs.top+s.height&&(o.top=s.top+s.height-l)}else{var c=e.left-r,u=e.left+r+n;cs.right&&(o.left=s.left+s.width-u)}return o},l.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},l.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},l.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},l.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},l.prototype.enable=function(){this.enabled=!0},l.prototype.disable=function(){this.enabled=!1},l.prototype.toggleEnabled=function(){this.enabled=!this.enabled},l.prototype.toggle=function(e){var n=this;e&&((n=t(e.currentTarget).data("bs."+this.type))||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},l.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide((function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null}))},l.prototype.sanitizeHtml=function(t){return a(t,this.options.whiteList,this.options.sanitizeFn)};var c=t.fn.tooltip;t.fn.tooltip=function(e){return this.each((function(){var n=t(this),i=n.data("bs.tooltip"),o="object"==typeof e&&e;!i&&/destroy|hide/.test(e)||(i||n.data("bs.tooltip",i=new l(this,o)),"string"==typeof e&&i[e]())}))},t.fn.tooltip.Constructor=l,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=c,this}}(n(9755))},8294:function(t,e,n){!function(t){"use strict";t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",(function(){n=!0}));return setTimeout((function(){n||t(i).trigger(t.support.transition.end)}),e),this},t((function(){t.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})}))}(n(9755))},5730:function(t,e,n){"use strict";var i=n(8612),o=n(1768),r=n(8928),s=n(9770);t.exports=s||i.call(r,o)},3192:function(t,e,n){"use strict";var i=n(8612),o=n(1768),r=n(5730);t.exports=function(){return r(i,o,arguments)}},1768:function(t){"use strict";t.exports=Function.prototype.apply},8928:function(t){"use strict";t.exports=Function.prototype.call},319:function(t,e,n){"use strict";var i=n(8612),o=n(4453),r=n(8928),s=n(5730);t.exports=function(t){if(t.length<1||"function"!=typeof t[0])throw new o("a function is required");return s(i,r,t)}},9770:function(t){"use strict";t.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},1924:function(t,e,n){"use strict";var i=n(210),o=n(5559),r=o(i("String.prototype.indexOf"));t.exports=function(t,e){var n=i(t,!!e);return"function"==typeof n&&r(t,".prototype.")>-1?o(n):n}},5559:function(t,e,n){"use strict";var i=n(7771),o=n(4429),r=n(319),s=n(3192);t.exports=function(t){var e=r(arguments),n=t.length-(arguments.length-1);return i(e,1+(n>0?n:0),!0)},o?o(t.exports,"apply",{value:s}):t.exports.apply=s},2296:function(t,e,n){"use strict";var i=n(4429),o=n(3464),r=n(4453),s=n(7296);t.exports=function(t,e,n){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new r("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new r("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new r("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new r("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new r("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new r("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],h=!!s&&s(t,e);if(i)i(t,e,{configurable:null===c&&h?h.configurable:!c,enumerable:null===a&&h?h.enumerable:!a,value:n,writable:null===l&&h?h.writable:!l});else{if(!u&&(a||l||c))throw new o("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=n}}},9741:function(t,e,n){var i,o;!function(r,s){"use strict";void 0===(o="function"==typeof(i=s)?i.call(e,n,e,t):i)||(t.exports=o)}(window,(function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],n=0;n1&&"boolean"!=typeof e)throw new c('"allowMissing" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,t))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(t){var e=I(t,0,1),n=I(t,-1);if("%"===e&&"%"!==n)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new l("invalid intrinsic syntax, expected opening `%`");var i=[];return M(t,j,(function(t,e,n,o){i[i.length]=n?M(o,N,"$1"):e||t})),i}(t),i=n.length>0?n[0]:"",o=L("%"+i+"%",e),r=o.name,s=o.value,a=!1,u=o.alias;u&&(i=u[0],O(n,$([0,1],u)));for(var h=1,p=!0;h=n.length){var v=d(s,f);s=(p=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:s[f]}else p=A(s,f),s=s[f];p&&!a&&(T[r]=s)}}return s}},6131:function(t,e,n){var i,o;window,void 0===(o="function"==typeof(i=function(){"use strict";function t(t){var e=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(e)&&e}function e(){}var n="undefined"==typeof console?e:function(t){console.error(t)},i=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],o=i.length;function r(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e