avo 2.3.0 → 2.3.1.pre.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of avo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/Gemfile.lock +5 -1
- data/app/assets/builds/avo.css +8827 -0
- data/app/assets/builds/avo.js +423 -0
- data/app/assets/builds/avo.js.map +7 -0
- data/app/controllers/avo/base_controller.rb +14 -9
- data/app/javascript/js/controllers/filter_controller.js +11 -1
- data/app/javascript/js/controllers/multiple_select_filter_controller.js +3 -1
- data/app/javascript/js/controllers/select_filter_controller.js +1 -1
- data/app/views/avo/base/_boolean_filter.html.erb +1 -14
- data/app/views/avo/base/_multiple_select_filter.html.erb +2 -13
- data/app/views/avo/base/_select_filter.html.erb +1 -9
- data/app/views/avo/base/_text_filter.html.erb +2 -10
- data/lib/avo/filters/base_filter.rb +17 -2
- data/lib/avo/filters/boolean_filter.rb +12 -0
- data/lib/avo/filters/multiple_select_filter.rb +15 -0
- data/lib/avo/filters/text_filter.rb +4 -0
- data/lib/avo/version.rb +1 -1
- data/public/avo-assets/avo.js +3 -3
- data/public/avo-assets/avo.js.map +2 -2
- metadata +7 -4
data/public/avo-assets/avo.js
CHANGED
@@ -39,7 +39,7 @@ chart.draw(data, `+JSON.stringify(Se)+");"),R.chart=new this.library.visualizati
|
|
39
39
|
|
40
40
|
%o
|
41
41
|
|
42
|
-
%o`,t,e,n),(i=window.onerror)===null||i===void 0||i.call(window,t,"",0,0,e)}logFormattedMessage(e,t,n={}){n=Object.assign({application:this},n),this.logger.groupCollapsed(`${e} #${t}`),this.logger.log("details:",Object.assign({},n)),this.logger.groupEnd()}};Y5e={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},K5e={array(r){let e=JSON.parse(r);if(!Array.isArray(e))throw new TypeError("Expected array");return e},boolean(r){return!(r=="0"||r=="false")},number(r){return Number(r)},object(r){let e=JSON.parse(r);if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError("Expected object");return e},string(r){return r}},$Q={default:G5e,array:YQ,object:YQ};ht=class{constructor(e){this.context=e}static get shouldLoad(){return!0}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 classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:t=this.element,detail:n={},prefix:i=this.identifier,bubbles:o=!0,cancelable:a=!0}={}){let s=i?`${i}:${e}`:e,u=new CustomEvent(s,{detail:n,bubbles:o,cancelable:a});return t.dispatchEvent(u),u}};ht.blessings=[F5e,B5e,z5e];ht.targets=[];ht.values={}});var ig,yZ,Ax,QO,bZ,ZO,Tx,xZ,wZ,_Z=te(()=>{gr();ig=class extends ht{initialize(){this.hide()}connect(){setTimeout(()=>{this.show()},this.showAfter),this.hasDismissAfterValue&&setTimeout(()=>{this.close()},this.dismissAfterValue)}close(){this.hide(),setTimeout(()=>{this.element.remove()},this.removeAfter)}show(){this.element.classList.add(...this.showClasses),this.element.classList.remove(...this.hideClasses)}hide(){this.element.classList.add(...this.hideClasses),this.element.classList.remove(...this.showClasses)}get removeAfter(){return this.hasRemoveDelayValue?this.removeDelayValue:1100}get showAfter(){return this.hasShowDelayValue?this.showDelayValue:200}};ig.values={dismissAfter:Number,showDelay:Number,removeDelay:Number},ig.classes=["show","hide"];yZ=class extends ht{connect(){this.timeout=null,this.duration=this.data.get("duration")||1e3}save(){clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.statusTarget.textContent="Saving...",Rails.fire(this.formTarget,"submit")},this.duration)}success(){this.setStatus("Saved!")}error(){this.setStatus("Unable to save!")}setStatus(e){this.statusTarget.textContent=e,this.timeout=setTimeout(()=>{this.statusTarget.textContent=""},2e3)}};yZ.targets=["form","status"];Ax=class extends ht{constructor(...e){super(...e),this._onMenuButtonKeydown=t=>{switch(t.keyCode){case 13:case 32:t.preventDefault(),this.toggle()}}}connect(){this.toggleClass=this.data.get("class")||"hidden",this.visibleClass=this.data.get("visibleClass")||null,this.invisibleClass=this.data.get("invisibleClass")||null,this.activeClass=this.data.get("activeClass")||null,this.enteringClass=this.data.get("enteringClass")||null,this.leavingClass=this.data.get("leavingClass")||null,this.hasButtonTarget&&this.buttonTarget.addEventListener("keydown",this._onMenuButtonKeydown),this.element.setAttribute("aria-haspopup","true")}disconnect(){this.hasButtonTarget&&this.buttonTarget.removeEventListener("keydown",this._onMenuButtonKeydown)}toggle(){this.openValue=!this.openValue}openValueChanged(){this.openValue?this._show():this._hide()}_show(e){setTimeout((()=>{this.menuTarget.classList.remove(this.toggleClass),this.element.setAttribute("aria-expanded","true"),this._enteringClassList[0].forEach((t=>{this.menuTarget.classList.add(t)}).bind(this)),this._activeClassList[0].forEach(t=>{this.activeTarget.classList.add(t)}),this._invisibleClassList[0].forEach(t=>this.menuTarget.classList.remove(t)),this._visibleClassList[0].forEach(t=>{this.menuTarget.classList.add(t)}),setTimeout((()=>{this._enteringClassList[0].forEach(t=>this.menuTarget.classList.remove(t))}).bind(this),this.enterTimeout[0]),typeof e=="function"&&e()}).bind(this))}_hide(e){setTimeout((()=>{this.element.setAttribute("aria-expanded","false"),this._invisibleClassList[0].forEach(t=>this.menuTarget.classList.add(t)),this._visibleClassList[0].forEach(t=>this.menuTarget.classList.remove(t)),this._activeClassList[0].forEach(t=>this.activeTarget.classList.remove(t)),this._leavingClassList[0].forEach(t=>this.menuTarget.classList.add(t)),setTimeout((()=>{this._leavingClassList[0].forEach(t=>this.menuTarget.classList.remove(t)),typeof e=="function"&&e(),this.menuTarget.classList.add(this.toggleClass)}).bind(this),this.leaveTimeout[0])}).bind(this))}show(){this.openValue=!0}hide(e){this.element.contains(e.target)===!1&&this.openValue&&(this.openValue=!1)}get activeTarget(){return this.data.has("activeTarget")?document.querySelector(this.data.get("activeTarget")):this.element}get _activeClassList(){return this.activeClass?this.activeClass.split(",").map(e=>e.split(" ")):[[],[]]}get _visibleClassList(){return this.visibleClass?this.visibleClass.split(",").map(e=>e.split(" ")):[[],[]]}get _invisibleClassList(){return this.invisibleClass?this.invisibleClass.split(",").map(e=>e.split(" ")):[[],[]]}get _enteringClassList(){return this.enteringClass?this.enteringClass.split(",").map(e=>e.split(" ")):[[],[]]}get _leavingClassList(){return this.leavingClass?this.leavingClass.split(",").map(e=>e.split(" ")):[[],[]]}get enterTimeout(){return(this.data.get("enterTimeout")||"0,0").split(",").map(e=>parseInt(e))}get leaveTimeout(){return(this.data.get("leaveTimeout")||"0,0").split(",").map(e=>parseInt(e))}};Ax.targets=["menu","button"],Ax.values={open:Boolean};QO=class extends ht{connect(){this.toggleClass=this.data.get("class")||"hidden",this.backgroundId=this.data.get("backgroundId")||"modal-background",this.backgroundHtml=this.data.get("backgroundHtml")||this._backgroundHTML(),this.allowBackgroundClose=(this.data.get("allowBackgroundClose")||"true")==="true",this.preventDefaultActionOpening=(this.data.get("preventDefaultActionOpening")||"true")==="true",this.preventDefaultActionClosing=(this.data.get("preventDefaultActionClosing")||"true")==="true"}disconnect(){this.close()}open(e){this.preventDefaultActionOpening&&e.preventDefault(),e.target.blur&&e.target.blur(),this.lockScroll(),this.containerTarget.classList.remove(this.toggleClass),this.data.get("disable-backdrop")||(document.body.insertAdjacentHTML("beforeend",this.backgroundHtml),this.background=document.querySelector(`#${this.backgroundId}`))}close(e){e&&this.preventDefaultActionClosing&&e.preventDefault(),this.unlockScroll(),this.containerTarget.classList.add(this.toggleClass),this.background&&this.background.remove()}closeBackground(e){this.allowBackgroundClose&&e.target===this.containerTarget&&this.close(e)}closeWithKeyboard(e){e.keyCode!==27||this.containerTarget.classList.contains(this.toggleClass)||this.close(e)}_backgroundHTML(){return`<div id="${this.backgroundId}" class="fixed top-0 left-0 w-full h-full" style="background-color: ${this.backdropColorValue}; z-index: 9998;"></div>`}lockScroll(){let e=window.innerWidth-document.documentElement.clientWidth;document.body.style.paddingRight=`${e}px`,this.saveScrollPosition(),document.body.classList.add("fixed","inset-x-0","overflow-hidden"),document.body.style.top=`-${this.scrollPosition}px`}unlockScroll(){document.body.style.paddingRight=null,document.body.classList.remove("fixed","inset-x-0","overflow-hidden"),this.restoreScrollValue&&this.restoreScrollPosition(),document.body.style.top=null}saveScrollPosition(){this.scrollPosition=window.pageYOffset||document.body.scrollTop}restoreScrollPosition(){this.scrollPosition!==void 0&&(document.documentElement.scrollTop=this.scrollPosition)}};QO.targets=["container"],QO.values={backdropColor:{type:String,default:"rgba(0, 0, 0, 0.8)"},restoreScroll:{type:Boolean,default:!0}};bZ=class extends ht{connect(){this.activeTabClasses=(this.data.get("activeTab")||"active").split(" "),this.inactiveTabClasses=(this.data.get("inactiveTab")||"inactive").split(" "),this.anchor&&(this.index=this.tabTargets.findIndex(e=>e.id===this.anchor)),this.showTab()}change(e){e.preventDefault(),this.index=e.currentTarget.dataset.index?e.currentTarget.dataset.index:e.currentTarget.dataset.id?this.tabTargets.findIndex(t=>t.id==e.currentTarget.dataset.id):this.tabTargets.indexOf(e.currentTarget),window.dispatchEvent(new CustomEvent("tsc:tab-change"))}showTab(){this.tabTargets.forEach((e,t)=>{let n=this.panelTargets[t];t===this.index?(n.classList.remove("hidden"),e.classList.remove(...this.inactiveTabClasses),e.classList.add(...this.activeTabClasses),e.id&&(location.hash=e.id)):(n.classList.add("hidden"),e.classList.remove(...this.activeTabClasses),e.classList.add(...this.inactiveTabClasses))})}get index(){return parseInt(this.data.get("index")||0)}set index(e){this.data.set("index",e>=0?e:0),this.showTab()}get anchor(){return document.URL.split("#").length>1?document.URL.split("#")[1]:null}};bZ.targets=["tab","panel"];ZO=class extends ht{connect(){this.toggleClass=this.data.get("class")||"hidden"}toggle(e){e.preventDefault(),this.openValue=!this.openValue}hide(e){e.preventDefault(),this.openValue=!1}show(e){e.preventDefault(),this.openValue=!0}openValueChanged(){this.toggleClass&&this.toggleableTargets.forEach(e=>{e.classList.toggle(this.toggleClass)})}};ZO.targets=["toggleable"],ZO.values={open:Boolean};Tx=class extends ht{initialize(){this.contentTarget.setAttribute("style",`transform:translate(${this.data.get("translateX")}, ${this.data.get("translateY")});`)}mouseOver(){this.contentTarget.classList.remove("hidden")}mouseOut(){this.contentTarget.classList.add("hidden")}};Tx.targets=["content"];xZ=class extends Ax{_show(){this.overlayTarget.classList.remove(this.toggleClass),super._show((()=>{this._activeClassList[1].forEach(e=>this.overlayTarget.classList.add(e)),this._invisibleClassList[1].forEach(e=>this.overlayTarget.classList.remove(e)),this._visibleClassList[1].forEach(e=>this.overlayTarget.classList.add(e)),setTimeout((()=>{this._enteringClassList[1].forEach(e=>this.overlayTarget.classList.remove(e))}).bind(this),this.enterTimeout[1])}).bind(this))}_hide(){this._leavingClassList[1].forEach(e=>this.overlayTarget.classList.add(e)),super._hide((()=>{setTimeout((()=>{this._visibleClassList[1].forEach(e=>this.overlayTarget.classList.remove(e)),this._invisibleClassList[1].forEach(e=>this.overlayTarget.classList.add(e)),this._activeClassList[1].forEach(e=>this.overlayTarget.classList.remove(e)),this._leavingClassList[1].forEach(e=>this.overlayTarget.classList.remove(e)),this.overlayTarget.classList.add(this.toggleClass)}).bind(this),this.leaveTimeout[1])}).bind(this))}};xZ.targets=["menu","overlay"];wZ=class extends ht{connect(){this.styleProperty=this.data.get("style")||"backgroundColor"}update(){this.preview=this.color}set preview(e){this.previewTarget.style[this.styleProperty]=e;let t=this._getContrastYIQ(e);this.styleProperty==="color"?this.previewTarget.style.backgroundColor=t:this.previewTarget.style.color=t}get color(){return this.colorTarget.value}_getContrastYIQ(e){return e=e.replace("#",""),(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=128?"#000":"#fff"}};wZ.targets=["preview","color"]});var Gt,SZ=te(()=>{_Z();gr();Gt=ng.start();Gt.debug=!1;window.Stimulus=Gt;Gt.register("alert",ig);Gt.register("popover",Tx)});var Kn,gd=te(()=>{Kn=r=>r=="true"});var Dx,kZ=te(()=>{gr();gd();Dx=class extends ht{connect(){this.resourceIdsTarget.value=this.resourceIds,this.noConfirmation?this.formTarget.submit():this.controllerDivTarget.classList.remove("hidden")}get noConfirmation(){return Kn(this.controllerDivTarget.dataset.noConfirmation)}get resourceName(){return this.controllerDivTarget.dataset.resourceName}get resourceIds(){try{return JSON.parse(document.querySelector(`[data-selected-resources-name="${this.resourceName}"]`).dataset.selectedResources)}catch(r){return[]}}};ct(Dx,"targets",["controllerDiv","resourceIds","form"])});var EZ,JO=te(()=>{EZ=function(){function r(e,t){var n=this;this.element=e,this.started=!1,this.delegate=t,this.elements=new Set,this.mutationObserver=new MutationObserver(function(i){return n.processMutations(i)})}return r.prototype.start=function(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,childList:!0,subtree:!0}),this.refresh())},r.prototype.stop=function(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)},r.prototype.refresh=function(){if(this.started){for(var e=new Set(this.matchElementsInTree()),t=0,n=Array.from(this.elements);t<n.length;t++){var i=n[t];e.has(i)||this.removeElement(i)}for(var o=0,a=Array.from(e);o<a.length;o++){var i=a[o];this.addElement(i)}}},r.prototype.processMutations=function(e){if(this.started)for(var t=0,n=e;t<n.length;t++){var i=n[t];this.processMutation(i)}},r.prototype.processMutation=function(e){e.type=="attributes"?this.processAttributeChange(e.target,e.attributeName):e.type=="childList"&&(this.processRemovedNodes(e.removedNodes),this.processAddedNodes(e.addedNodes))},r.prototype.processAttributeChange=function(e,t){var n=e;this.elements.has(n)?this.delegate.elementAttributeChanged&&this.matchElement(n)?this.delegate.elementAttributeChanged(n,t):this.removeElement(n):this.matchElement(n)&&this.addElement(n)},r.prototype.processRemovedNodes=function(e){for(var t=0,n=Array.from(e);t<n.length;t++){var i=n[t],o=this.elementFromNode(i);o&&this.processTree(o,this.removeElement)}},r.prototype.processAddedNodes=function(e){for(var t=0,n=Array.from(e);t<n.length;t++){var i=n[t],o=this.elementFromNode(i);o&&this.elementIsActive(o)&&this.processTree(o,this.addElement)}},r.prototype.matchElement=function(e){return this.delegate.matchElement(e)},r.prototype.matchElementsInTree=function(e){return e===void 0&&(e=this.element),this.delegate.matchElementsInTree(e)},r.prototype.processTree=function(e,t){for(var n=0,i=this.matchElementsInTree(e);n<i.length;n++){var o=i[n];t.call(this,o)}},r.prototype.elementFromNode=function(e){if(e.nodeType==Node.ELEMENT_NODE)return e},r.prototype.elementIsActive=function(e){return e.isConnected!=this.element.isConnected?!1:this.element.contains(e)},r.prototype.addElement=function(e){this.elements.has(e)||this.elementIsActive(e)&&(this.elements.add(e),this.delegate.elementMatched&&this.delegate.elementMatched(e))},r.prototype.removeElement=function(e){this.elements.has(e)&&(this.elements.delete(e),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e))},r}()});var Ox,eM=te(()=>{JO();Ox=function(){function r(e,t,n){this.attributeName=t,this.delegate=n,this.elementObserver=new EZ(e,this)}return Object.defineProperty(r.prototype,"element",{get:function(){return this.elementObserver.element},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"selector",{get:function(){return"["+this.attributeName+"]"},enumerable:!1,configurable:!0}),r.prototype.start=function(){this.elementObserver.start()},r.prototype.stop=function(){this.elementObserver.stop()},r.prototype.refresh=function(){this.elementObserver.refresh()},Object.defineProperty(r.prototype,"started",{get:function(){return this.elementObserver.started},enumerable:!1,configurable:!0}),r.prototype.matchElement=function(e){return e.hasAttribute(this.attributeName)},r.prototype.matchElementsInTree=function(e){var t=this.matchElement(e)?[e]:[],n=Array.from(e.querySelectorAll(this.selector));return t.concat(n)},r.prototype.elementMatched=function(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)},r.prototype.elementUnmatched=function(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)},r.prototype.elementAttributeChanged=function(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)},r}()});var Rmt,CZ=te(()=>{Rmt=function(){function r(e,t){var n=this;this.element=e,this.delegate=t,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver(function(i){return n.processMutations(i)})}return r.prototype.start=function(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0}),this.refresh())},r.prototype.stop=function(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)},r.prototype.refresh=function(){if(this.started)for(var e=0,t=this.knownAttributeNames;e<t.length;e++){var n=t[e];this.refreshAttribute(n)}},r.prototype.processMutations=function(e){if(this.started)for(var t=0,n=e;t<n.length;t++){var i=n[t];this.processMutation(i)}},r.prototype.processMutation=function(e){var t=e.attributeName;t&&this.refreshAttribute(t)},r.prototype.refreshAttribute=function(e){var t=this.delegate.getStringMapKeyForAttribute(e);if(t!=null){this.stringMap.has(e)||this.stringMapKeyAdded(t,e);var n=this.element.getAttribute(e);this.stringMap.get(e)!=n&&this.stringMapValueChanged(n,t),n==null?(this.stringMap.delete(e),this.stringMapKeyRemoved(t,e)):this.stringMap.set(e,n)}},r.prototype.stringMapKeyAdded=function(e,t){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,t)},r.prototype.stringMapValueChanged=function(e,t){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,t)},r.prototype.stringMapKeyRemoved=function(e,t){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,t)},Object.defineProperty(r.prototype,"knownAttributeNames",{get:function(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"currentAttributeNames",{get:function(){return Array.from(this.element.attributes).map(function(e){return e.name})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"recordedAttributeNames",{get:function(){return Array.from(this.stringMap.keys())},enumerable:!1,configurable:!0}),r}()});function Mx(r,e,t){AZ(r,e).add(t)}function Ix(r,e,t){AZ(r,e).delete(t),X5e(r,e)}function AZ(r,e){var t=r.get(e);return t||(t=new Set,r.set(e,t)),t}function X5e(r,e){var t=r.get(e);t!=null&&t.size==0&&r.delete(e)}var Px=te(()=>{});var Lx,tM=te(()=>{Px();Lx=function(){function r(){this.valuesByKey=new Map}return Object.defineProperty(r.prototype,"values",{get:function(){var e=Array.from(this.valuesByKey.values());return e.reduce(function(t,n){return t.concat(Array.from(n))},[])},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"size",{get:function(){var e=Array.from(this.valuesByKey.values());return e.reduce(function(t,n){return t+n.size},0)},enumerable:!1,configurable:!0}),r.prototype.add=function(e,t){Mx(this.valuesByKey,e,t)},r.prototype.delete=function(e,t){Ix(this.valuesByKey,e,t)},r.prototype.has=function(e,t){var n=this.valuesByKey.get(e);return n!=null&&n.has(t)},r.prototype.hasKey=function(e){return this.valuesByKey.has(e)},r.prototype.hasValue=function(e){var t=Array.from(this.valuesByKey.values());return t.some(function(n){return n.has(e)})},r.prototype.getValuesForKey=function(e){var t=this.valuesByKey.get(e);return t?Array.from(t):[]},r.prototype.getKeysForValue=function(e){return Array.from(this.valuesByKey).filter(function(t){var n=t[0],i=t[1];return i.has(e)}).map(function(t){var n=t[0],i=t[1];return n})},r}()});var Q5e,Wmt,TZ=te(()=>{tM();Px();Q5e=function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])},r(e,t)};return function(e,t){r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Wmt=function(r){Q5e(e,r);function e(){var t=r.call(this)||this;return t.keysByValue=new Map,t}return Object.defineProperty(e.prototype,"values",{get:function(){return Array.from(this.keysByValue.keys())},enumerable:!1,configurable:!0}),e.prototype.add=function(t,n){r.prototype.add.call(this,t,n),Mx(this.keysByValue,n,t)},e.prototype.delete=function(t,n){r.prototype.delete.call(this,t,n),Ix(this.keysByValue,n,t)},e.prototype.hasValue=function(t){return this.keysByValue.has(t)},e.prototype.getKeysForValue=function(t){var n=this.keysByValue.get(t);return n?Array.from(n):[]},e}(Lx)});var DZ=te(()=>{TZ();tM();Px()});function Z5e(r,e,t){return r.trim().split(/\s+/).filter(function(n){return n.length}).map(function(n,i){return{element:e,attributeName:t,content:n,index:i}})}function J5e(r,e){var t=Math.max(r.length,e.length);return Array.from({length:t},function(n,i){return[r[i],e[i]]})}function e4e(r,e){return r&&e&&r.index==e.index&&r.content==e.content}var OZ,rM=te(()=>{eM();DZ();OZ=function(){function r(e,t,n){this.attributeObserver=new Ox(e,t,this),this.delegate=n,this.tokensByElement=new Lx}return Object.defineProperty(r.prototype,"started",{get:function(){return this.attributeObserver.started},enumerable:!1,configurable:!0}),r.prototype.start=function(){this.attributeObserver.start()},r.prototype.stop=function(){this.attributeObserver.stop()},r.prototype.refresh=function(){this.attributeObserver.refresh()},Object.defineProperty(r.prototype,"element",{get:function(){return this.attributeObserver.element},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"attributeName",{get:function(){return this.attributeObserver.attributeName},enumerable:!1,configurable:!0}),r.prototype.elementMatchedAttribute=function(e){this.tokensMatched(this.readTokensForElement(e))},r.prototype.elementAttributeValueChanged=function(e){var t=this.refreshTokensForElement(e),n=t[0],i=t[1];this.tokensUnmatched(n),this.tokensMatched(i)},r.prototype.elementUnmatchedAttribute=function(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))},r.prototype.tokensMatched=function(e){var t=this;e.forEach(function(n){return t.tokenMatched(n)})},r.prototype.tokensUnmatched=function(e){var t=this;e.forEach(function(n){return t.tokenUnmatched(n)})},r.prototype.tokenMatched=function(e){this.delegate.tokenMatched(e),this.tokensByElement.add(e.element,e)},r.prototype.tokenUnmatched=function(e){this.delegate.tokenUnmatched(e),this.tokensByElement.delete(e.element,e)},r.prototype.refreshTokensForElement=function(e){var t=this.tokensByElement.getValuesForKey(e),n=this.readTokensForElement(e),i=J5e(t,n).findIndex(function(o){var a=o[0],s=o[1];return!e4e(a,s)});return i==-1?[[],[]]:[t.slice(i),n.slice(i)]},r.prototype.readTokensForElement=function(e){var t=this.attributeName,n=e.getAttribute(t)||"";return Z5e(n,e,t)},r}()});var Jmt,MZ=te(()=>{rM();Jmt=function(){function r(e,t,n){this.tokenListObserver=new OZ(e,t,this),this.delegate=n,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}return Object.defineProperty(r.prototype,"started",{get:function(){return this.tokenListObserver.started},enumerable:!1,configurable:!0}),r.prototype.start=function(){this.tokenListObserver.start()},r.prototype.stop=function(){this.tokenListObserver.stop()},r.prototype.refresh=function(){this.tokenListObserver.refresh()},Object.defineProperty(r.prototype,"element",{get:function(){return this.tokenListObserver.element},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"attributeName",{get:function(){return this.tokenListObserver.attributeName},enumerable:!1,configurable:!0}),r.prototype.tokenMatched=function(e){var t=e.element,n=this.fetchParseResultForToken(e).value;n&&(this.fetchValuesByTokenForElement(t).set(e,n),this.delegate.elementMatchedValue(t,n))},r.prototype.tokenUnmatched=function(e){var t=e.element,n=this.fetchParseResultForToken(e).value;n&&(this.fetchValuesByTokenForElement(t).delete(e),this.delegate.elementUnmatchedValue(t,n))},r.prototype.fetchParseResultForToken=function(e){var t=this.parseResultsByToken.get(e);return t||(t=this.parseToken(e),this.parseResultsByToken.set(e,t)),t},r.prototype.fetchValuesByTokenForElement=function(e){var t=this.valuesByTokenByElement.get(e);return t||(t=new Map,this.valuesByTokenByElement.set(e,t)),t},r.prototype.parseToken=function(e){try{var t=this.delegate.parseValueForToken(e);return{value:t}}catch(n){return{error:n}}},r}()});var IZ=te(()=>{eM();JO();CZ();rM();MZ()});var og,PZ=te(()=>{IZ();gr();og=class extends ht{constructor(){super(...arguments);ct(this,"target",{})}get targetIsDisabled(){return this.target.dataset.disabled==="true"}enableTarget(){this.targetIsDisabled&&(this.target.classList.remove(...this.disabledClasses),this.target.classList.add(...this.enabledClasses),this.target.dataset.disabled=!1)}disableTarget(){this.target.classList.remove(...this.enabledClasses),this.target.classList.add(...this.disabledClasses),this.target.dataset.disabled=!0}visitAction(r){if(this.target=r.target,this.targetIsDisabled){r.preventDefault();return}this.disableTarget();let e=new Ox(document.querySelector("turbo-frame#actions_show"),"busy",{elementUnmatchedAttribute:()=>{this.enableTarget(this.target),e&&e.stop()}});e.start()}};ct(og,"targets",["resourceAction","standaloneAction"]),ct(og,"classes",["enabled","disabled"])});var qx,LZ=te(()=>{gr();qx=class extends ht{connect(){window.toastr[this.type](this.message)}get type(){return{info:"info",warning:"warning",success:"success",error:"error",notice:"info",alert:"error"}[this.containerTarget.dataset.alertType]}get message(){return this.containerTarget.innerHTML}};ct(qx,"targets",["container"])});var Rx,qZ=te(()=>{gr();Rx=class extends ht{connect(){this.formTarget.submit()}};ct(Rx,"targets",["form"])});var Fx,RZ=te(()=>{gr();Fx=class extends ht{constructor(){super(...arguments);ct(this,"defaults",{})}get selectedType(){return this.selectTarget.value}get isSearchable(){return this.context.scope.element.dataset.searchable==="true"}get association(){return this.context.scope.element.dataset.association}get associationClass(){return this.context.scope.element.dataset.associationClass}connect(){this.copyValidNames(),this.changeType()}changeType(){this.hideAllTypes(),this.showType(this.selectTarget.value)}hideAllTypes(){this.typeTargets.forEach(r=>{r.classList.add("hidden"),this.invalidateTarget(r)})}copyValidNames(){this.typeTargets.forEach(r=>{let{type:e}=r.dataset;if(this.isSearchable){let t=r.querySelector('input[type="text"]');t&&this.nameToValidName(t);let n=r.querySelector('input[type="hidden"]');n&&this.nameToValidName(n)}else{let t=r.querySelector("select");t&&this.nameToValidName(t);let n=r.querySelector('input[type="hidden"]');n&&this.nameToValidName(n),this.selectedType!==e&&(t.selectedIndex=0)}})}showType(r){let e=this.typeTargets.find(t=>t.dataset.type===r);e&&(e.classList.remove("hidden"),this.validateTarget(e))}validateTarget(r){if(this.isSearchable){let e=r.querySelector('input[type="text"]'),t=r.querySelector('input[type="hidden"]');this.validNameToName(e),this.validNameToName(t)}else{let e=r.querySelector("select"),t=r.querySelector('input[type="hidden"]');this.validNameToName(e),t&&this.validNameToName(t)}}invalidateTarget(r){if(this.isSearchable)try{r.querySelector('input[type="text"]').setAttribute("name",""),r.querySelector('input[type="hidden"]').setAttribute("name","")}catch(e){}else if(r)try{r.querySelector("select").setAttribute("name",""),r.querySelector('input[type="hidden"]').setAttribute("name","")}catch(e){}}validNameToName(r){r.setAttribute("name",r.getAttribute("valid-name"))}nameToValidName(r){r.setAttribute("valid-name",r.getAttribute("name"))}};ct(Fx,"targets",["select","type","loadAssociationLink"])});var FZ=V((vd,yd)=>{(function(r){var e=typeof vd=="object"&&vd&&!vd.nodeType&&vd,t=typeof yd=="object"&&yd&&!yd.nodeType&&yd,n=typeof global=="object"&&global;(n.global===n||n.window===n||n.self===n)&&(r=n);var i,o=2147483647,a=36,s=1,u=26,f=38,c=700,h=72,p=128,m="-",y=/^xn--/,b=/[^\x20-\x7E]/,k=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=a-s,E=Math.floor,C=String.fromCharCode,D;function T($){throw new RangeError(x[$])}function I($,ee){for(var U=$.length,H=[];U--;)H[U]=ee($[U]);return H}function q($,ee){var U=$.split("@"),H="";U.length>1&&(H=U[0]+"@",$=U[1]),$=$.replace(k,".");var he=$.split("."),me=I(he,ee).join(".");return H+me}function z($){for(var ee=[],U=0,H=$.length,he,me;U<H;)he=$.charCodeAt(U++),he>=55296&&he<=56319&&U<H?(me=$.charCodeAt(U++),(me&64512)==56320?ee.push(((he&1023)<<10)+(me&1023)+65536):(ee.push(he),U--)):ee.push(he);return ee}function Y($){return I($,function(ee){var U="";return ee>65535&&(ee-=65536,U+=C(ee>>>10&1023|55296),ee=56320|ee&1023),U+=C(ee),U}).join("")}function X($){return $-48<10?$-22:$-65<26?$-65:$-97<26?$-97:a}function _($,ee){return $+22+75*($<26)-((ee!=0)<<5)}function O($,ee,U){var H=0;for($=U?E($/c):$>>1,$+=E($/ee);$>S*u>>1;H+=a)$=E($/S);return E(H+(S+1)*$/($+f))}function M($){var ee=[],U=$.length,H,he=0,me=p,pe=h,Ae,Ee,We,Te,je,at,st,Le,we;for(Ae=$.lastIndexOf(m),Ae<0&&(Ae=0),Ee=0;Ee<Ae;++Ee)$.charCodeAt(Ee)>=128&&T("not-basic"),ee.push($.charCodeAt(Ee));for(We=Ae>0?Ae+1:0;We<U;){for(Te=he,je=1,at=a;We>=U&&T("invalid-input"),st=X($.charCodeAt(We++)),(st>=a||st>E((o-he)/je))&&T("overflow"),he+=st*je,Le=at<=pe?s:at>=pe+u?u:at-pe,!(st<Le);at+=a)we=a-Le,je>E(o/we)&&T("overflow"),je*=we;H=ee.length+1,pe=O(he-Te,H,Te==0),E(he/H)>o-me&&T("overflow"),me+=E(he/H),he%=H,ee.splice(he++,0,me)}return Y(ee)}function j($){var ee,U,H,he,me,pe,Ae,Ee,We,Te,je,at=[],st,Le,we,xe;for($=z($),st=$.length,ee=p,U=0,me=h,pe=0;pe<st;++pe)je=$[pe],je<128&&at.push(C(je));for(H=he=at.length,he&&at.push(m);H<st;){for(Ae=o,pe=0;pe<st;++pe)je=$[pe],je>=ee&&je<Ae&&(Ae=je);for(Le=H+1,Ae-ee>E((o-U)/Le)&&T("overflow"),U+=(Ae-ee)*Le,ee=Ae,pe=0;pe<st;++pe)if(je=$[pe],je<ee&&++U>o&&T("overflow"),je==ee){for(Ee=U,We=a;Te=We<=me?s:We>=me+u?u:We-me,!(Ee<Te);We+=a)xe=Ee-Te,we=a-Te,at.push(C(_(Te+xe%we,0))),Ee=E(xe/we);at.push(C(_(Ee,0))),me=O(U,Le,H==he),U=0,++H}++U,++ee}return at.join("")}function P($){return q($,function(ee){return y.test(ee)?M(ee.slice(4).toLowerCase()):ee})}function F($){return q($,function(ee){return b.test(ee)?"xn--"+j(ee):ee})}if(i={version:"1.3.2",ucs2:{decode:z,encode:Y},decode:M,encode:j,toASCII:F,toUnicode:P},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return i});else if(e&&t)if(yd.exports==e)t.exports=i;else for(D in i)i.hasOwnProperty(D)&&(e[D]=i[D]);else r.punycode=i})(vd)});var BZ=V((NZ,Nx)=>{(function(r,e){"use strict";typeof Nx=="object"&&Nx.exports?Nx.exports=e():typeof define=="function"&&define.amd?define(e):r.IPv6=e(r)})(NZ,function(r){"use strict";var e=r&&r.IPv6;function t(i){var o=i.toLowerCase(),a=o.split(":"),s=a.length,u=8;a[0]===""&&a[1]===""&&a[2]===""?(a.shift(),a.shift()):a[0]===""&&a[1]===""?a.shift():a[s-1]===""&&a[s-2]===""&&a.pop(),s=a.length,a[s-1].indexOf(".")!==-1&&(u=7);var f;for(f=0;f<s&&a[f]!=="";f++);if(f<u)for(a.splice(f,1,"0000");a.length<u;)a.splice(f,0,"0000");for(var c,h=0;h<u;h++){c=a[h].split("");for(var p=0;p<3&&(c[0]==="0"&&c.length>1);p++)c.splice(0,1);a[h]=c.join("")}var m=-1,y=0,b=0,k=-1,x=!1;for(h=0;h<u;h++)x?a[h]==="0"?b+=1:(x=!1,b>y&&(m=k,y=b)):a[h]==="0"&&(x=!0,k=h,b=1);b>y&&(m=k,y=b),y>1&&a.splice(m,y,""),s=a.length;var S="";for(a[0]===""&&(S=":"),h=0;h<s&&(S+=a[h],h!==s-1);h++)S+=":";return a[s-1]===""&&(S+=":"),S}function n(){return r.IPv6===this&&(r.IPv6=e),this}return{best:t,noConflict:n}})});var zZ=V((jZ,Bx)=>{(function(r,e){"use strict";typeof Bx=="object"&&Bx.exports?Bx.exports=e():typeof define=="function"&&define.amd?define(e):r.SecondLevelDomains=e(r)})(jZ,function(r){"use strict";var e=r&&r.SecondLevelDomains,t={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(n){var i=n.lastIndexOf(".");if(i<=0||i>=n.length-1)return!1;var o=n.lastIndexOf(".",i-1);if(o<=0||o>=i-1)return!1;var a=t.list[n.slice(i+1)];return a?a.indexOf(" "+n.slice(o+1,i)+" ")>=0:!1},is:function(n){var i=n.lastIndexOf(".");if(i<=0||i>=n.length-1)return!1;var o=n.lastIndexOf(".",i-1);if(o>=0)return!1;var a=t.list[n.slice(i+1)];return a?a.indexOf(" "+n.slice(0,i)+" ")>=0:!1},get:function(n){var i=n.lastIndexOf(".");if(i<=0||i>=n.length-1)return null;var o=n.lastIndexOf(".",i-1);if(o<=0||o>=i-1)return null;var a=t.list[n.slice(i+1)];return!a||a.indexOf(" "+n.slice(o+1,i)+" ")<0?null:n.slice(o+1)},noConflict:function(){return r.SecondLevelDomains===this&&(r.SecondLevelDomains=e),this}};return t})});var zx=V((HZ,jx)=>{(function(r,e){"use strict";typeof jx=="object"&&jx.exports?jx.exports=e(FZ(),BZ(),zZ()):typeof define=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],e):r.URI=e(r.punycode,r.IPv6,r.SecondLevelDomains,r)})(HZ,function(r,e,t,n){"use strict";var i=n&&n.URI;function o(_,O){var M=arguments.length>=1,j=arguments.length>=2;if(!(this instanceof o))return M?j?new o(_,O):new o(_):new o;if(_===void 0){if(M)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?_=location.href+"":_=""}if(_===null&&M)throw new TypeError("null is not a valid argument for URI");return this.href(_),O!==void 0?this.absoluteTo(O):this}function a(_){return/^[0-9]+$/.test(_)}o.version="1.19.11";var s=o.prototype,u=Object.prototype.hasOwnProperty;function f(_){return _.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function c(_){return _===void 0?"Undefined":String(Object.prototype.toString.call(_)).slice(8,-1)}function h(_){return c(_)==="Array"}function p(_,O){var M={},j,P;if(c(O)==="RegExp")M=null;else if(h(O))for(j=0,P=O.length;j<P;j++)M[O[j]]=!0;else M[O]=!0;for(j=0,P=_.length;j<P;j++){var F=M&&M[_[j]]!==void 0||!M&&O.test(_[j]);F&&(_.splice(j,1),P--,j--)}return _}function m(_,O){var M,j;if(h(O)){for(M=0,j=O.length;M<j;M++)if(!m(_,O[M]))return!1;return!0}var P=c(O);for(M=0,j=_.length;M<j;M++)if(P==="RegExp"){if(typeof _[M]=="string"&&_[M].match(O))return!0}else if(_[M]===O)return!0;return!1}function y(_,O){if(!h(_)||!h(O)||_.length!==O.length)return!1;_.sort(),O.sort();for(var M=0,j=_.length;M<j;M++)if(_[M]!==O[M])return!1;return!0}function b(_){var O=/^\/+|\/+$/g;return _.replace(O,"")}o._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:o.preventInvalidHostname,duplicateQueryParameters:o.duplicateQueryParameters,escapeQuerySpace:o.escapeQuerySpace}},o.preventInvalidHostname=!1,o.duplicateQueryParameters=!1,o.escapeQuerySpace=!0,o.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,o.idn_expression=/[^a-z0-9\._-]/i,o.punycode_expression=/(xn--)/i,o.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,o.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,o.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,o.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},o.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,o.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},o.hostProtocols=["http","https"],o.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,o.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},o.getDomAttribute=function(_){if(!(!_||!_.nodeName)){var O=_.nodeName.toLowerCase();if(!(O==="input"&&_.type!=="image"))return o.domAttributes[O]}};function k(_){return escape(_)}function x(_){return encodeURIComponent(_).replace(/[!'()*]/g,k).replace(/\*/g,"%2A")}o.encode=x,o.decode=decodeURIComponent,o.iso8859=function(){o.encode=escape,o.decode=unescape},o.unicode=function(){o.encode=x,o.decode=decodeURIComponent},o.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},o.encodeQuery=function(_,O){var M=o.encode(_+"");return O===void 0&&(O=o.escapeQuerySpace),O?M.replace(/%20/g,"+"):M},o.decodeQuery=function(_,O){_+="",O===void 0&&(O=o.escapeQuerySpace);try{return o.decode(O?_.replace(/\+/g,"%20"):_)}catch{return _}};var S={encode:"encode",decode:"decode"},E,C=function(_,O){return function(M){try{return o[O](M+"").replace(o.characters[_][O].expression,function(j){return o.characters[_][O].map[j]})}catch{return M}}};for(E in S)o[E+"PathSegment"]=C("pathname",S[E]),o[E+"UrnPathSegment"]=C("urnpath",S[E]);var D=function(_,O,M){return function(j){var P;M?P=function(U){return o[O](o[M](U))}:P=o[O];for(var F=(j+"").split(_),$=0,ee=F.length;$<ee;$++)F[$]=P(F[$]);return F.join(_)}};o.decodePath=D("/","decodePathSegment"),o.decodeUrnPath=D(":","decodeUrnPathSegment"),o.recodePath=D("/","encodePathSegment","decode"),o.recodeUrnPath=D(":","encodeUrnPathSegment","decode"),o.encodeReserved=C("reserved","encode"),o.parse=function(_,O){var M;return O||(O={preventInvalidHostname:o.preventInvalidHostname}),_=_.replace(o.leading_whitespace_expression,""),_=_.replace(o.ascii_tab_whitespace,""),M=_.indexOf("#"),M>-1&&(O.fragment=_.substring(M+1)||null,_=_.substring(0,M)),M=_.indexOf("?"),M>-1&&(O.query=_.substring(M+1)||null,_=_.substring(0,M)),_=_.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),_=_.replace(/^[/\\]{2,}/i,"//"),_.substring(0,2)==="//"?(O.protocol=null,_=_.substring(2),_=o.parseAuthority(_,O)):(M=_.indexOf(":"),M>-1&&(O.protocol=_.substring(0,M)||null,O.protocol&&!O.protocol.match(o.protocol_expression)?O.protocol=void 0:_.substring(M+1,M+3).replace(/\\/g,"/")==="//"?(_=_.substring(M+3),_=o.parseAuthority(_,O)):(_=_.substring(M+1),O.urn=!0))),O.path=_,O},o.parseHost=function(_,O){_||(_=""),_=_.replace(/\\/g,"/");var M=_.indexOf("/"),j,P;if(M===-1&&(M=_.length),_.charAt(0)==="[")j=_.indexOf("]"),O.hostname=_.substring(1,j)||null,O.port=_.substring(j+2,M)||null,O.port==="/"&&(O.port=null);else{var F=_.indexOf(":"),$=_.indexOf("/"),ee=_.indexOf(":",F+1);ee!==-1&&($===-1||ee<$)?(O.hostname=_.substring(0,M)||null,O.port=null):(P=_.substring(0,M).split(":"),O.hostname=P[0]||null,O.port=P[1]||null)}return O.hostname&&_.substring(M).charAt(0)!=="/"&&(M++,_="/"+_),O.preventInvalidHostname&&o.ensureValidHostname(O.hostname,O.protocol),O.port&&o.ensureValidPort(O.port),_.substring(M)||"/"},o.parseAuthority=function(_,O){return _=o.parseUserinfo(_,O),o.parseHost(_,O)},o.parseUserinfo=function(_,O){var M=_,j=_.indexOf("\\");j!==-1&&(_=_.replace(/\\/g,"/"));var P=_.indexOf("/"),F=_.lastIndexOf("@",P>-1?P:_.length-1),$;return F>-1&&(P===-1||F<P)?($=_.substring(0,F).split(":"),O.username=$[0]?o.decode($[0]):null,$.shift(),O.password=$[0]?o.decode($.join(":")):null,_=M.substring(F+1)):(O.username=null,O.password=null),_},o.parseQuery=function(_,O){if(!_)return{};if(_=_.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!_)return{};for(var M={},j=_.split("&"),P=j.length,F,$,ee,U=0;U<P;U++)F=j[U].split("="),$=o.decodeQuery(F.shift(),O),ee=F.length?o.decodeQuery(F.join("="),O):null,$!=="__proto__"&&(u.call(M,$)?((typeof M[$]=="string"||M[$]===null)&&(M[$]=[M[$]]),M[$].push(ee)):M[$]=ee);return M},o.build=function(_){var O="",M=!1;return _.protocol&&(O+=_.protocol+":"),!_.urn&&(O||_.hostname)&&(O+="//",M=!0),O+=o.buildAuthority(_)||"",typeof _.path=="string"&&(_.path.charAt(0)!=="/"&&M&&(O+="/"),O+=_.path),typeof _.query=="string"&&_.query&&(O+="?"+_.query),typeof _.fragment=="string"&&_.fragment&&(O+="#"+_.fragment),O},o.buildHost=function(_){var O="";if(_.hostname)o.ip6_expression.test(_.hostname)?O+="["+_.hostname+"]":O+=_.hostname;else return"";return _.port&&(O+=":"+_.port),O},o.buildAuthority=function(_){return o.buildUserinfo(_)+o.buildHost(_)},o.buildUserinfo=function(_){var O="";return _.username&&(O+=o.encode(_.username)),_.password&&(O+=":"+o.encode(_.password)),O&&(O+="@"),O},o.buildQuery=function(_,O,M){var j="",P,F,$,ee;for(F in _)if(F!=="__proto__"&&u.call(_,F))if(h(_[F]))for(P={},$=0,ee=_[F].length;$<ee;$++)_[F][$]!==void 0&&P[_[F][$]+""]===void 0&&(j+="&"+o.buildQueryParameter(F,_[F][$],M),O!==!0&&(P[_[F][$]+""]=!0));else _[F]!==void 0&&(j+="&"+o.buildQueryParameter(F,_[F],M));return j.substring(1)},o.buildQueryParameter=function(_,O,M){return o.encodeQuery(_,M)+(O!==null?"="+o.encodeQuery(O,M):"")},o.addQuery=function(_,O,M){if(typeof O=="object")for(var j in O)u.call(O,j)&&o.addQuery(_,j,O[j]);else if(typeof O=="string"){if(_[O]===void 0){_[O]=M;return}else typeof _[O]=="string"&&(_[O]=[_[O]]);h(M)||(M=[M]),_[O]=(_[O]||[]).concat(M)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},o.setQuery=function(_,O,M){if(typeof O=="object")for(var j in O)u.call(O,j)&&o.setQuery(_,j,O[j]);else if(typeof O=="string")_[O]=M===void 0?null:M;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},o.removeQuery=function(_,O,M){var j,P,F;if(h(O))for(j=0,P=O.length;j<P;j++)_[O[j]]=void 0;else if(c(O)==="RegExp")for(F in _)O.test(F)&&(_[F]=void 0);else if(typeof O=="object")for(F in O)u.call(O,F)&&o.removeQuery(_,F,O[F]);else if(typeof O=="string")M!==void 0?c(M)==="RegExp"?!h(_[O])&&M.test(_[O])?_[O]=void 0:_[O]=p(_[O],M):_[O]===String(M)&&(!h(M)||M.length===1)?_[O]=void 0:h(_[O])&&(_[O]=p(_[O],M)):_[O]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},o.hasQuery=function(_,O,M,j){switch(c(O)){case"String":break;case"RegExp":for(var P in _)if(u.call(_,P)&&O.test(P)&&(M===void 0||o.hasQuery(_,P,M)))return!0;return!1;case"Object":for(var F in O)if(u.call(O,F)&&!o.hasQuery(_,F,O[F]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(c(M)){case"Undefined":return O in _;case"Boolean":var $=Boolean(h(_[O])?_[O].length:_[O]);return M===$;case"Function":return!!M(_[O],O,_);case"Array":if(!h(_[O]))return!1;var ee=j?m:y;return ee(_[O],M);case"RegExp":return h(_[O])?j?m(_[O],M):!1:Boolean(_[O]&&_[O].match(M));case"Number":M=String(M);case"String":return h(_[O])?j?m(_[O],M):!1:_[O]===M;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},o.joinPaths=function(){for(var _=[],O=[],M=0,j=0;j<arguments.length;j++){var P=new o(arguments[j]);_.push(P);for(var F=P.segment(),$=0;$<F.length;$++)typeof F[$]=="string"&&O.push(F[$]),F[$]&&M++}if(!O.length||!M)return new o("");var ee=new o("").segment(O);return(_[0].path()===""||_[0].path().slice(0,1)==="/")&&ee.path("/"+ee.path()),ee.normalize()},o.commonPath=function(_,O){var M=Math.min(_.length,O.length),j;for(j=0;j<M;j++)if(_.charAt(j)!==O.charAt(j)){j--;break}return j<1?_.charAt(0)===O.charAt(0)&&_.charAt(0)==="/"?"/":"":((_.charAt(j)!=="/"||O.charAt(j)!=="/")&&(j=_.substring(0,j).lastIndexOf("/")),_.substring(0,j+1))},o.withinString=function(_,O,M){M||(M={});var j=M.start||o.findUri.start,P=M.end||o.findUri.end,F=M.trim||o.findUri.trim,$=M.parens||o.findUri.parens,ee=/[a-z0-9-]=["']?$/i;for(j.lastIndex=0;;){var U=j.exec(_);if(!U)break;var H=U.index;if(M.ignoreHtml){var he=_.slice(Math.max(H-3,0),H);if(he&&ee.test(he))continue}for(var me=H+_.slice(H).search(P),pe=_.slice(H,me),Ae=-1;;){var Ee=$.exec(pe);if(!Ee)break;var We=Ee.index+Ee[0].length;Ae=Math.max(Ae,We)}if(Ae>-1?pe=pe.slice(0,Ae)+pe.slice(Ae).replace(F,""):pe=pe.replace(F,""),!(pe.length<=U[0].length)&&!(M.ignore&&M.ignore.test(pe))){me=H+pe.length;var Te=O(pe,H,me,_);if(Te===void 0){j.lastIndex=me;continue}Te=String(Te),_=_.slice(0,H)+Te+_.slice(me),j.lastIndex=H+Te.length}}return j.lastIndex=0,_},o.ensureValidHostname=function(_,O){var M=!!_,j=!!O,P=!1;if(j&&(P=m(o.hostProtocols,O)),P&&!M)throw new TypeError("Hostname cannot be empty, if protocol is "+O);if(_&&_.match(o.invalid_hostname_characters)){if(!r)throw new TypeError('Hostname "'+_+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(r.toASCII(_).match(o.invalid_hostname_characters))throw new TypeError('Hostname "'+_+'" contains characters other than [A-Z0-9.-:_]')}},o.ensureValidPort=function(_){if(!!_){var O=Number(_);if(!(a(O)&&O>0&&O<65536))throw new TypeError('Port "'+_+'" is not a valid port')}},o.noConflict=function(_){if(_){var O={URI:this.noConflict()};return n.URITemplate&&typeof n.URITemplate.noConflict=="function"&&(O.URITemplate=n.URITemplate.noConflict()),n.IPv6&&typeof n.IPv6.noConflict=="function"&&(O.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&typeof n.SecondLevelDomains.noConflict=="function"&&(O.SecondLevelDomains=n.SecondLevelDomains.noConflict()),O}else n.URI===this&&(n.URI=i);return this},s.build=function(_){return _===!0?this._deferred_build=!0:(_===void 0||this._deferred_build)&&(this._string=o.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new o(this)},s.valueOf=s.toString=function(){return this.build(!1)._string};function T(_){return function(O,M){return O===void 0?this._parts[_]||"":(this._parts[_]=O||null,this.build(!M),this)}}function I(_,O){return function(M,j){return M===void 0?this._parts[_]||"":(M!==null&&(M=M+"",M.charAt(0)===O&&(M=M.substring(1))),this._parts[_]=M,this.build(!j),this)}}s.protocol=T("protocol"),s.username=T("username"),s.password=T("password"),s.hostname=T("hostname"),s.port=T("port"),s.query=I("query","?"),s.fragment=I("fragment","#"),s.search=function(_,O){var M=this.query(_,O);return typeof M=="string"&&M.length?"?"+M:M},s.hash=function(_,O){var M=this.fragment(_,O);return typeof M=="string"&&M.length?"#"+M:M},s.pathname=function(_,O){if(_===void 0||_===!0){var M=this._parts.path||(this._parts.hostname?"/":"");return _?(this._parts.urn?o.decodeUrnPath:o.decodePath)(M):M}else return this._parts.urn?this._parts.path=_?o.recodeUrnPath(_):"":this._parts.path=_?o.recodePath(_):"/",this.build(!O),this},s.path=s.pathname,s.href=function(_,O){var M;if(_===void 0)return this.toString();this._string="",this._parts=o._parts();var j=_ instanceof o,P=typeof _=="object"&&(_.hostname||_.path||_.pathname);if(_.nodeName){var F=o.getDomAttribute(_);_=_[F]||"",P=!1}if(!j&&P&&_.pathname!==void 0&&(_=_.toString()),typeof _=="string"||_ instanceof String)this._parts=o.parse(String(_),this._parts);else if(j||P){var $=j?_._parts:_;for(M in $)M!=="query"&&u.call(this._parts,M)&&(this._parts[M]=$[M]);$.query&&this.query($.query,!1)}else throw new TypeError("invalid input");return this.build(!O),this},s.is=function(_){var O=!1,M=!1,j=!1,P=!1,F=!1,$=!1,ee=!1,U=!this._parts.urn;switch(this._parts.hostname&&(U=!1,M=o.ip4_expression.test(this._parts.hostname),j=o.ip6_expression.test(this._parts.hostname),O=M||j,P=!O,F=P&&t&&t.has(this._parts.hostname),$=P&&o.idn_expression.test(this._parts.hostname),ee=P&&o.punycode_expression.test(this._parts.hostname)),_.toLowerCase()){case"relative":return U;case"absolute":return!U;case"domain":case"name":return P;case"sld":return F;case"ip":return O;case"ip4":case"ipv4":case"inet4":return M;case"ip6":case"ipv6":case"inet6":return j;case"idn":return $;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return ee}return null};var q=s.protocol,z=s.port,Y=s.hostname;s.protocol=function(_,O){if(_&&(_=_.replace(/:(\/\/)?$/,""),!_.match(o.protocol_expression)))throw new TypeError('Protocol "'+_+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return q.call(this,_,O)},s.scheme=s.protocol,s.port=function(_,O){return this._parts.urn?_===void 0?"":this:(_!==void 0&&(_===0&&(_=null),_&&(_+="",_.charAt(0)===":"&&(_=_.substring(1)),o.ensureValidPort(_))),z.call(this,_,O))},s.hostname=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(_!==void 0){var M={preventInvalidHostname:this._parts.preventInvalidHostname},j=o.parseHost(_,M);if(j!=="/")throw new TypeError('Hostname "'+_+'" contains characters other than [A-Z0-9.-]');_=M.hostname,this._parts.preventInvalidHostname&&o.ensureValidHostname(_,this._parts.protocol)}return Y.call(this,_,O)},s.origin=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(_===void 0){var M=this.protocol(),j=this.authority();return j?(M?M+"://":"")+this.authority():""}else{var P=o(_);return this.protocol(P.protocol()).authority(P.authority()).build(!O),this}},s.host=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(_===void 0)return this._parts.hostname?o.buildHost(this._parts):"";var M=o.parseHost(_,this._parts);if(M!=="/")throw new TypeError('Hostname "'+_+'" contains characters other than [A-Z0-9.-]');return this.build(!O),this},s.authority=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(_===void 0)return this._parts.hostname?o.buildAuthority(this._parts):"";var M=o.parseAuthority(_,this._parts);if(M!=="/")throw new TypeError('Hostname "'+_+'" contains characters other than [A-Z0-9.-]');return this.build(!O),this},s.userinfo=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(_===void 0){var M=o.buildUserinfo(this._parts);return M&&M.substring(0,M.length-1)}else return _[_.length-1]!=="@"&&(_+="@"),o.parseUserinfo(_,this._parts),this.build(!O),this},s.resource=function(_,O){var M;return _===void 0?this.path()+this.search()+this.hash():(M=o.parse(_),this._parts.path=M.path,this._parts.query=M.query,this._parts.fragment=M.fragment,this.build(!O),this)},s.subdomain=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(_===void 0){if(!this._parts.hostname||this.is("IP"))return"";var M=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,M)||""}else{var j=this._parts.hostname.length-this.domain().length,P=this._parts.hostname.substring(0,j),F=new RegExp("^"+f(P));if(_&&_.charAt(_.length-1)!=="."&&(_+="."),_.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return _&&o.ensureValidHostname(_,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(F,_),this.build(!O),this}},s.domain=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(typeof _=="boolean"&&(O=_,_=void 0),_===void 0){if(!this._parts.hostname||this.is("IP"))return"";var M=this._parts.hostname.match(/\./g);if(M&&M.length<2)return this._parts.hostname;var j=this._parts.hostname.length-this.tld(O).length-1;return j=this._parts.hostname.lastIndexOf(".",j-1)+1,this._parts.hostname.substring(j)||""}else{if(!_)throw new TypeError("cannot set domain empty");if(_.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(o.ensureValidHostname(_,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=_;else{var P=new RegExp(f(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(P,_)}return this.build(!O),this}},s.tld=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(typeof _=="boolean"&&(O=_,_=void 0),_===void 0){if(!this._parts.hostname||this.is("IP"))return"";var M=this._parts.hostname.lastIndexOf("."),j=this._parts.hostname.substring(M+1);return O!==!0&&t&&t.list[j.toLowerCase()]&&t.get(this._parts.hostname)||j}else{var P;if(_)if(_.match(/[^a-zA-Z0-9-]/))if(t&&t.is(_))P=new RegExp(f(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(P,_);else throw new TypeError('TLD "'+_+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");P=new RegExp(f(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(P,_)}else throw new TypeError("cannot set TLD empty");return this.build(!O),this}},s.directory=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(_===void 0||_===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var M=this._parts.path.length-this.filename().length-1,j=this._parts.path.substring(0,M)||(this._parts.hostname?"/":"");return _?o.decodePath(j):j}else{var P=this._parts.path.length-this.filename().length,F=this._parts.path.substring(0,P),$=new RegExp("^"+f(F));return this.is("relative")||(_||(_="/"),_.charAt(0)!=="/"&&(_="/"+_)),_&&_.charAt(_.length-1)!=="/"&&(_+="/"),_=o.recodePath(_),this._parts.path=this._parts.path.replace($,_),this.build(!O),this}},s.filename=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(typeof _!="string"){if(!this._parts.path||this._parts.path==="/")return"";var M=this._parts.path.lastIndexOf("/"),j=this._parts.path.substring(M+1);return _?o.decodePathSegment(j):j}else{var P=!1;_.charAt(0)==="/"&&(_=_.substring(1)),_.match(/\.?\//)&&(P=!0);var F=new RegExp(f(this.filename())+"$");return _=o.recodePath(_),this._parts.path=this._parts.path.replace(F,_),P?this.normalizePath(O):this.build(!O),this}},s.suffix=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(_===void 0||_===!0){if(!this._parts.path||this._parts.path==="/")return"";var M=this.filename(),j=M.lastIndexOf("."),P,F;return j===-1?"":(P=M.substring(j+1),F=/^[a-z0-9%]+$/i.test(P)?P:"",_?o.decodePathSegment(F):F)}else{_.charAt(0)==="."&&(_=_.substring(1));var $=this.suffix(),ee;if($)_?ee=new RegExp(f($)+"$"):ee=new RegExp(f("."+$)+"$");else{if(!_)return this;this._parts.path+="."+o.recodePath(_)}return ee&&(_=o.recodePath(_),this._parts.path=this._parts.path.replace(ee,_)),this.build(!O),this}},s.segment=function(_,O,M){var j=this._parts.urn?":":"/",P=this.path(),F=P.substring(0,1)==="/",$=P.split(j);if(_!==void 0&&typeof _!="number"&&(M=O,O=_,_=void 0),_!==void 0&&typeof _!="number")throw new Error('Bad segment "'+_+'", must be 0-based integer');if(F&&$.shift(),_<0&&(_=Math.max($.length+_,0)),O===void 0)return _===void 0?$:$[_];if(_===null||$[_]===void 0)if(h(O)){$=[];for(var ee=0,U=O.length;ee<U;ee++)!O[ee].length&&(!$.length||!$[$.length-1].length)||($.length&&!$[$.length-1].length&&$.pop(),$.push(b(O[ee])))}else(O||typeof O=="string")&&(O=b(O),$[$.length-1]===""?$[$.length-1]=O:$.push(O));else O?$[_]=b(O):$.splice(_,1);return F&&$.unshift(""),this.path($.join(j),M)},s.segmentCoded=function(_,O,M){var j,P,F;if(typeof _!="number"&&(M=O,O=_,_=void 0),O===void 0){if(j=this.segment(_,O,M),!h(j))j=j!==void 0?o.decode(j):void 0;else for(P=0,F=j.length;P<F;P++)j[P]=o.decode(j[P]);return j}if(!h(O))O=typeof O=="string"||O instanceof String?o.encode(O):O;else for(P=0,F=O.length;P<F;P++)O[P]=o.encode(O[P]);return this.segment(_,O,M)};var X=s.query;return s.query=function(_,O){if(_===!0)return o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof _=="function"){var M=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace),j=_.call(this,M);return this._parts.query=o.buildQuery(j||M,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!O),this}else return _!==void 0&&typeof _!="string"?(this._parts.query=o.buildQuery(_,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!O),this):X.call(this,_,O)},s.setQuery=function(_,O,M){var j=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof _=="string"||_ instanceof String)j[_]=O!==void 0?O:null;else if(typeof _=="object")for(var P in _)u.call(_,P)&&(j[P]=_[P]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=o.buildQuery(j,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof _!="string"&&(M=O),this.build(!M),this},s.addQuery=function(_,O,M){var j=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.addQuery(j,_,O===void 0?null:O),this._parts.query=o.buildQuery(j,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof _!="string"&&(M=O),this.build(!M),this},s.removeQuery=function(_,O,M){var j=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.removeQuery(j,_,O),this._parts.query=o.buildQuery(j,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof _!="string"&&(M=O),this.build(!M),this},s.hasQuery=function(_,O,M){var j=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.hasQuery(j,_,O,M)},s.setSearch=s.setQuery,s.addSearch=s.addQuery,s.removeSearch=s.removeQuery,s.hasSearch=s.hasQuery,s.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},s.normalizeProtocol=function(_){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!_)),this},s.normalizeHostname=function(_){return this._parts.hostname&&(this.is("IDN")&&r?this._parts.hostname=r.toASCII(this._parts.hostname):this.is("IPv6")&&e&&(this._parts.hostname=e.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!_)),this},s.normalizePort=function(_){return typeof this._parts.protocol=="string"&&this._parts.port===o.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!_)),this},s.normalizePath=function(_){var O=this._parts.path;if(!O)return this;if(this._parts.urn)return this._parts.path=o.recodeUrnPath(this._parts.path),this.build(!_),this;if(this._parts.path==="/")return this;O=o.recodePath(O);var M,j="",P,F;for(O.charAt(0)!=="/"&&(M=!0,O="/"+O),(O.slice(-3)==="/.."||O.slice(-2)==="/.")&&(O+="/"),O=O.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),M&&(j=O.substring(1).match(/^(\.\.\/)+/)||"",j&&(j=j[0]));P=O.search(/\/\.\.(\/|$)/),P!==-1;){if(P===0){O=O.substring(3);continue}F=O.substring(0,P).lastIndexOf("/"),F===-1&&(F=P),O=O.substring(0,F)+O.substring(P+3)}return M&&this.is("relative")&&(O=j+O.substring(1)),this._parts.path=O,this.build(!_),this},s.normalizePathname=s.normalizePath,s.normalizeQuery=function(_){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(o.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!_)),this},s.normalizeFragment=function(_){return this._parts.fragment||(this._parts.fragment=null,this.build(!_)),this},s.normalizeSearch=s.normalizeQuery,s.normalizeHash=s.normalizeFragment,s.iso8859=function(){var _=o.encode,O=o.decode;o.encode=escape,o.decode=decodeURIComponent;try{this.normalize()}finally{o.encode=_,o.decode=O}return this},s.unicode=function(){var _=o.encode,O=o.decode;o.encode=x,o.decode=unescape;try{this.normalize()}finally{o.encode=_,o.decode=O}return this},s.readable=function(){var _=this.clone();_.username("").password("").normalize();var O="";if(_._parts.protocol&&(O+=_._parts.protocol+"://"),_._parts.hostname&&(_.is("punycode")&&r?(O+=r.toUnicode(_._parts.hostname),_._parts.port&&(O+=":"+_._parts.port)):O+=_.host()),_._parts.hostname&&_._parts.path&&_._parts.path.charAt(0)!=="/"&&(O+="/"),O+=_.path(!0),_._parts.query){for(var M="",j=0,P=_._parts.query.split("&"),F=P.length;j<F;j++){var $=(P[j]||"").split("=");M+="&"+o.decodeQuery($[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),$[1]!==void 0&&(M+="="+o.decodeQuery($[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}O+="?"+M.substring(1)}return O+=o.decodeQuery(_.hash(),!0),O},s.absoluteTo=function(_){var O=this.clone(),M=["protocol","username","password","hostname","port"],j,P,F;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(_ instanceof o||(_=new o(_)),O._parts.protocol||(O._parts.protocol=_._parts.protocol,this._parts.hostname))return O;for(P=0;F=M[P];P++)O._parts[F]=_._parts[F];return O._parts.path?(O._parts.path.substring(-2)===".."&&(O._parts.path+="/"),O.path().charAt(0)!=="/"&&(j=_.directory(),j=j||(_.path().indexOf("/")===0?"/":""),O._parts.path=(j?j+"/":"")+O._parts.path,O.normalizePath())):(O._parts.path=_._parts.path,O._parts.query||(O._parts.query=_._parts.query)),O.build(),O},s.relativeTo=function(_){var O=this.clone().normalize(),M,j,P,F,$;if(O._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(_=new o(_).normalize(),M=O._parts,j=_._parts,F=O.path(),$=_.path(),F.charAt(0)!=="/")throw new Error("URI is already relative");if($.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if(M.protocol===j.protocol&&(M.protocol=null),M.username!==j.username||M.password!==j.password||M.protocol!==null||M.username!==null||M.password!==null)return O.build();if(M.hostname===j.hostname&&M.port===j.port)M.hostname=null,M.port=null;else return O.build();if(F===$)return M.path="",O.build();if(P=o.commonPath(F,$),!P)return O.build();var ee=j.path.substring(P.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return M.path=ee+M.path.substring(P.length)||"./",O.build()},s.equals=function(_){var O=this.clone(),M=new o(_),j={},P={},F={},$,ee,U;if(O.normalize(),M.normalize(),O.toString()===M.toString())return!0;if($=O.query(),ee=M.query(),O.query(""),M.query(""),O.toString()!==M.toString()||$.length!==ee.length)return!1;j=o.parseQuery($,this._parts.escapeQuerySpace),P=o.parseQuery(ee,this._parts.escapeQuerySpace);for(U in j)if(u.call(j,U)){if(h(j[U])){if(!y(j[U],P[U]))return!1}else if(j[U]!==P[U])return!1;F[U]=!0}for(U in P)if(u.call(P,U)&&!F[U])return!1;return!0},s.preventInvalidHostname=function(_){return this._parts.preventInvalidHostname=!!_,this},s.duplicateQueryParameters=function(_){return this._parts.duplicateQueryParameters=!!_,this},s.escapeQuerySpace=function(_){return this._parts.escapeQuerySpace=!!_,this},o})});var nM,go,bd=te(()=>{gr();nM=pr(zx()),go=class extends ht{uriParams(){return(0,nM.default)(window.location.toString()).query(!0)}viaResourceName(){return this.uriParams().via_resource_name}uriParam(r){return this.viaResourceName()?`${this.viaResourceName}_${r}`:r}b64EncodeUnicode(r){return btoa(encodeURIComponent(r).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(`0x${t}`)))}b64DecodeUnicode(r){return decodeURIComponent(atob(r).split("").map(e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""))}changeFilter(){let r=this.getFilterValue(),e=this.getFilterClass(),t=this.uriParams()[this.uriParam("filters")];t?t=JSON.parse(this.b64DecodeUnicode(t)):t={},t[e]=r;let n=Object.keys(t).filter(s=>t[s]!=="").reduce((s,u)=>(s[u]=t[u],s),{}),i;n&&Object.keys(n).length>0&&(i=this.b64EncodeUnicode(JSON.stringify(n)));let o=new nM.default(this.urlRedirectTarget.href),a=Fs({},o.query(!0));i?a.filters=i:delete a.filters,o.query(a),this.urlRedirectTarget.href=o,this.urlRedirectTarget.click()}};ct(go,"targets",["urlRedirect"])});var Hx,WZ=te(()=>{bd();Hx=class extends go{getFilterValue(){let r={};return this.optionTargets.forEach(e=>{r[e.value]=e.checked}),r}getFilterClass(){let{filterClass:r}=this.optionTarget.dataset;return r}};ct(Hx,"targets",["option"])});var tr=V((iM,oM)=>{(function(r,e){typeof iM=="object"&&typeof oM<"u"?oM.exports=e():typeof define=="function"&&define.amd?define(e):(r=r||self,r.CodeMirror=e())})(iM,function(){"use strict";var r=navigator.userAgent,e=navigator.platform,t=/gecko\/\d/i.test(r),n=/MSIE \d/.test(r),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(r),o=/Edge\/(\d+)/.exec(r),a=n||i||o,s=a&&(n?document.documentMode||6:+(o||i)[1]),u=!o&&/WebKit\//.test(r),f=u&&/Qt\/\d+\.\d+/.test(r),c=!o&&/Chrome\//.test(r),h=/Opera\//.test(r),p=/Apple Computer/.test(navigator.vendor),m=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(r),y=/PhantomJS/.test(r),b=p&&(/Mobile\/\w+/.test(r)||navigator.maxTouchPoints>2),k=/Android/.test(r),x=b||k||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(r),S=b||/Mac/.test(e),E=/\bCrOS\b/.test(r),C=/win/i.test(e),D=h&&r.match(/Version\/(\d*\.\d*)/);D&&(D=Number(D[1])),D&&D>=15&&(h=!1,u=!0);var T=S&&(f||h&&(D==null||D<12.11)),I=t||a&&s>=9;function q(l){return new RegExp("(^|\\s)"+l+"(?:$|\\s)\\s*")}var z=function(l,d){var v=l.className,g=q(d).exec(v);if(g){var w=v.slice(g.index+g[0].length);l.className=v.slice(0,g.index)+(w?g[1]+w:"")}};function Y(l){for(var d=l.childNodes.length;d>0;--d)l.removeChild(l.firstChild);return l}function X(l,d){return Y(l).appendChild(d)}function _(l,d,v,g){var w=document.createElement(l);if(v&&(w.className=v),g&&(w.style.cssText=g),typeof d=="string")w.appendChild(document.createTextNode(d));else if(d)for(var A=0;A<d.length;++A)w.appendChild(d[A]);return w}function O(l,d,v,g){var w=_(l,d,v,g);return w.setAttribute("role","presentation"),w}var M;document.createRange?M=function(l,d,v,g){var w=document.createRange();return w.setEnd(g||l,v),w.setStart(l,d),w}:M=function(l,d,v){var g=document.body.createTextRange();try{g.moveToElementText(l.parentNode)}catch{return g}return g.collapse(!0),g.moveEnd("character",v),g.moveStart("character",d),g};function j(l,d){if(d.nodeType==3&&(d=d.parentNode),l.contains)return l.contains(d);do if(d.nodeType==11&&(d=d.host),d==l)return!0;while(d=d.parentNode)}function P(){var l;try{l=document.activeElement}catch{l=document.body||null}for(;l&&l.shadowRoot&&l.shadowRoot.activeElement;)l=l.shadowRoot.activeElement;return l}function F(l,d){var v=l.className;q(d).test(v)||(l.className+=(v?" ":"")+d)}function $(l,d){for(var v=l.split(" "),g=0;g<v.length;g++)v[g]&&!q(v[g]).test(d)&&(d+=" "+v[g]);return d}var ee=function(l){l.select()};b?ee=function(l){l.selectionStart=0,l.selectionEnd=l.value.length}:a&&(ee=function(l){try{l.select()}catch{}});function U(l){var d=Array.prototype.slice.call(arguments,1);return function(){return l.apply(null,d)}}function H(l,d,v){d||(d={});for(var g in l)l.hasOwnProperty(g)&&(v!==!1||!d.hasOwnProperty(g))&&(d[g]=l[g]);return d}function he(l,d,v,g,w){d==null&&(d=l.search(/[^\s\u00a0]/),d==-1&&(d=l.length));for(var A=g||0,L=w||0;;){var B=l.indexOf(" ",A);if(B<0||B>=d)return L+(d-A);L+=B-A,L+=v-L%v,A=B+1}}var me=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};me.prototype.onTimeout=function(l){l.id=0,l.time<=+new Date?l.f():setTimeout(l.handler,l.time-+new Date)},me.prototype.set=function(l,d){this.f=d;var v=+new Date+l;(!this.id||v<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,l),this.time=v)};function pe(l,d){for(var v=0;v<l.length;++v)if(l[v]==d)return v;return-1}var Ae=50,Ee={toString:function(){return"CodeMirror.Pass"}},We={scroll:!1},Te={origin:"*mouse"},je={origin:"+move"};function at(l,d,v){for(var g=0,w=0;;){var A=l.indexOf(" ",g);A==-1&&(A=l.length);var L=A-g;if(A==l.length||w+L>=d)return g+Math.min(L,d-w);if(w+=A-g,w+=v-w%v,g=A+1,w>=d)return g}}var st=[""];function Le(l){for(;st.length<=l;)st.push(we(st)+" ");return st[l]}function we(l){return l[l.length-1]}function xe(l,d){for(var v=[],g=0;g<l.length;g++)v[g]=d(l[g],g);return v}function le(l,d,v){for(var g=0,w=v(d);g<l.length&&v(l[g])<=w;)g++;l.splice(g,0,d)}function K(){}function Q(l,d){var v;return Object.create?v=Object.create(l):(K.prototype=l,v=new K),d&&H(d,v),v}var ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function lt(l){return/\w/.test(l)||l>"\x80"&&(l.toUpperCase()!=l.toLowerCase()||ie.test(l))}function ge(l,d){return d?d.source.indexOf("\\w")>-1&<(l)?!0:d.test(l):lt(l)}function Pe(l){for(var d in l)if(l.hasOwnProperty(d)&&l[d])return!1;return!0}var Ce=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function gt(l){return l.charCodeAt(0)>=768&&Ce.test(l)}function $e(l,d,v){for(;(v<0?d>0:d<l.length)&>(l.charAt(d));)d+=v;return d}function et(l,d,v){for(var g=d>v?-1:1;;){if(d==v)return d;var w=(d+v)/2,A=g<0?Math.ceil(w):Math.floor(w);if(A==d)return l(A)?d:v;l(A)?v=A:d=A+g}}function Ge(l,d,v,g){if(!l)return g(d,v,"ltr",0);for(var w=!1,A=0;A<l.length;++A){var L=l[A];(L.from<v&&L.to>d||d==v&&L.to==d)&&(g(Math.max(L.from,d),Math.min(L.to,v),L.level==1?"rtl":"ltr",A),w=!0)}w||g(d,v,"ltr")}var ce=null;function de(l,d,v){var g;ce=null;for(var w=0;w<l.length;++w){var A=l[w];if(A.from<d&&A.to>d)return w;A.to==d&&(A.from!=A.to&&v=="before"?g=w:ce=w),A.from==d&&(A.from!=A.to&&v!="before"?g=w:ce=w)}return g??ce}var Me=function(){var l="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",d="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function v(G){return G<=247?l.charAt(G):1424<=G&&G<=1524?"R":1536<=G&&G<=1785?d.charAt(G-1536):1774<=G&&G<=2220?"r":8192<=G&&G<=8203?"w":G==8204?"b":"L"}var g=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,w=/[stwN]/,A=/[LRr]/,L=/[Lb1n]/,B=/[1n]/;function W(G,ne,ae){this.level=G,this.from=ne,this.to=ae}return function(G,ne){var ae=ne=="ltr"?"L":"R";if(G.length==0||ne=="ltr"&&!g.test(G))return!1;for(var be=G.length,ve=[],De=0;De<be;++De)ve.push(v(G.charCodeAt(De)));for(var Re=0,He=ae;Re<be;++Re){var Ye=ve[Re];Ye=="m"?ve[Re]=He:He=Ye}for(var Je=0,Ke=ae;Je<be;++Je){var ot=ve[Je];ot=="1"&&Ke=="r"?ve[Je]="n":A.test(ot)&&(Ke=ot,ot=="r"&&(ve[Je]="R"))}for(var bt=1,pt=ve[0];bt<be-1;++bt){var Pt=ve[bt];Pt=="+"&&pt=="1"&&ve[bt+1]=="1"?ve[bt]="1":Pt==","&&pt==ve[bt+1]&&(pt=="1"||pt=="n")&&(ve[bt]=pt),pt=Pt}for(var hr=0;hr<be;++hr){var cn=ve[hr];if(cn==",")ve[hr]="N";else if(cn=="%"){var Or=void 0;for(Or=hr+1;Or<be&&ve[Or]=="%";++Or);for(var gi=hr&&ve[hr-1]=="!"||Or<be&&ve[Or]=="1"?"1":"N",ti=hr;ti<Or;++ti)ve[ti]=gi;hr=Or-1}}for(var $r=0,ri=ae;$r<be;++$r){var xn=ve[$r];ri=="L"&&xn=="1"?ve[$r]="L":A.test(xn)&&(ri=xn)}for(var Zr=0;Zr<be;++Zr)if(w.test(ve[Zr])){var Yr=void 0;for(Yr=Zr+1;Yr<be&&w.test(ve[Yr]);++Yr);for(var Lr=(Zr?ve[Zr-1]:ae)=="L",ni=(Yr<be?ve[Yr]:ae)=="L",Dc=Lr==ni?Lr?"L":"R":ae,Rs=Zr;Rs<Yr;++Rs)ve[Rs]=Dc;Zr=Yr-1}for(var On=[],Qo,fn=0;fn<be;)if(L.test(ve[fn])){var vS=fn;for(++fn;fn<be&&L.test(ve[fn]);++fn);On.push(new W(0,vS,fn))}else{var Na=fn,Vl=On.length,$l=ne=="rtl"?1:0;for(++fn;fn<be&&ve[fn]!="L";++fn);for(var Hn=Na;Hn<fn;)if(B.test(ve[Hn])){Na<Hn&&(On.splice(Vl,0,new W(1,Na,Hn)),Vl+=$l);var Oc=Hn;for(++Hn;Hn<fn&&B.test(ve[Hn]);++Hn);On.splice(Vl,0,new W(2,Oc,Hn)),Vl+=$l,Na=Hn}else++Hn;Na<fn&&On.splice(Vl,0,new W(1,Na,fn))}return ne=="ltr"&&(On[0].level==1&&(Qo=G.match(/^\s+/))&&(On[0].from=Qo[0].length,On.unshift(new W(0,0,Qo[0].length))),we(On).level==1&&(Qo=G.match(/\s+$/))&&(we(On).to-=Qo[0].length,On.push(new W(0,be-Qo[0].length,be)))),ne=="rtl"?On.reverse():On}}();function nt(l,d){var v=l.order;return v==null&&(v=l.order=Me(l.text,d)),v}var wr=[],tt=function(l,d,v){if(l.addEventListener)l.addEventListener(d,v,!1);else if(l.attachEvent)l.attachEvent("on"+d,v);else{var g=l._handlers||(l._handlers={});g[d]=(g[d]||wr).concat(v)}};function qt(l,d){return l._handlers&&l._handlers[d]||wr}function _e(l,d,v){if(l.removeEventListener)l.removeEventListener(d,v,!1);else if(l.detachEvent)l.detachEvent("on"+d,v);else{var g=l._handlers,w=g&&g[d];if(w){var A=pe(w,v);A>-1&&(g[d]=w.slice(0,A).concat(w.slice(A+1)))}}}function Be(l,d){var v=qt(l,d);if(!!v.length)for(var g=Array.prototype.slice.call(arguments,2),w=0;w<v.length;++w)v[w].apply(null,g)}function Xe(l,d,v){return typeof d=="string"&&(d={type:d,preventDefault:function(){this.defaultPrevented=!0}}),Be(l,v||d.type,l,d),re(d)||d.codemirrorIgnore}function Ot(l){var d=l._handlers&&l._handlers.cursorActivity;if(!!d)for(var v=l.curOp.cursorActivityHandlers||(l.curOp.cursorActivityHandlers=[]),g=0;g<d.length;++g)pe(v,d[g])==-1&&v.push(d[g])}function xt(l,d){return qt(l,d).length>0}function It(l){l.prototype.on=function(d,v){tt(this,d,v)},l.prototype.off=function(d,v){_e(this,d,v)}}function Ft(l){l.preventDefault?l.preventDefault():l.returnValue=!1}function an(l){l.stopPropagation?l.stopPropagation():l.cancelBubble=!0}function re(l){return l.defaultPrevented!=null?l.defaultPrevented:l.returnValue==!1}function oe(l){Ft(l),an(l)}function ye(l){return l.target||l.srcElement}function Oe(l){var d=l.which;return d==null&&(l.button&1?d=1:l.button&2?d=3:l.button&4&&(d=2)),S&&l.ctrlKey&&d==1&&(d=3),d}var Ve=function(){if(a&&s<9)return!1;var l=_("div");return"draggable"in l||"dragDrop"in l}(),Fe;function ut(l){if(Fe==null){var d=_("span","\u200B");X(l,_("span",[d,document.createTextNode("x")])),l.firstChild.offsetHeight!=0&&(Fe=d.offsetWidth<=1&&d.offsetHeight>2&&!(a&&s<8))}var v=Fe?_("span","\u200B"):_("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return v.setAttribute("cm-text",""),v}var it;function Tt(l){if(it!=null)return it;var d=X(l,document.createTextNode("A\u062EA")),v=M(d,0,1).getBoundingClientRect(),g=M(d,1,2).getBoundingClientRect();return Y(l),!v||v.left==v.right?!1:it=g.right-v.right<3}var Dt=`
|
42
|
+
%o`,t,e,n),(i=window.onerror)===null||i===void 0||i.call(window,t,"",0,0,e)}logFormattedMessage(e,t,n={}){n=Object.assign({application:this},n),this.logger.groupCollapsed(`${e} #${t}`),this.logger.log("details:",Object.assign({},n)),this.logger.groupEnd()}};Y5e={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},K5e={array(r){let e=JSON.parse(r);if(!Array.isArray(e))throw new TypeError("Expected array");return e},boolean(r){return!(r=="0"||r=="false")},number(r){return Number(r)},object(r){let e=JSON.parse(r);if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError("Expected object");return e},string(r){return r}},$Q={default:G5e,array:YQ,object:YQ};ht=class{constructor(e){this.context=e}static get shouldLoad(){return!0}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 classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(e,{target:t=this.element,detail:n={},prefix:i=this.identifier,bubbles:o=!0,cancelable:a=!0}={}){let s=i?`${i}:${e}`:e,u=new CustomEvent(s,{detail:n,bubbles:o,cancelable:a});return t.dispatchEvent(u),u}};ht.blessings=[F5e,B5e,z5e];ht.targets=[];ht.values={}});var ig,yZ,Ax,QO,bZ,ZO,Tx,xZ,wZ,_Z=te(()=>{gr();ig=class extends ht{initialize(){this.hide()}connect(){setTimeout(()=>{this.show()},this.showAfter),this.hasDismissAfterValue&&setTimeout(()=>{this.close()},this.dismissAfterValue)}close(){this.hide(),setTimeout(()=>{this.element.remove()},this.removeAfter)}show(){this.element.classList.add(...this.showClasses),this.element.classList.remove(...this.hideClasses)}hide(){this.element.classList.add(...this.hideClasses),this.element.classList.remove(...this.showClasses)}get removeAfter(){return this.hasRemoveDelayValue?this.removeDelayValue:1100}get showAfter(){return this.hasShowDelayValue?this.showDelayValue:200}};ig.values={dismissAfter:Number,showDelay:Number,removeDelay:Number},ig.classes=["show","hide"];yZ=class extends ht{connect(){this.timeout=null,this.duration=this.data.get("duration")||1e3}save(){clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.statusTarget.textContent="Saving...",Rails.fire(this.formTarget,"submit")},this.duration)}success(){this.setStatus("Saved!")}error(){this.setStatus("Unable to save!")}setStatus(e){this.statusTarget.textContent=e,this.timeout=setTimeout(()=>{this.statusTarget.textContent=""},2e3)}};yZ.targets=["form","status"];Ax=class extends ht{constructor(...e){super(...e),this._onMenuButtonKeydown=t=>{switch(t.keyCode){case 13:case 32:t.preventDefault(),this.toggle()}}}connect(){this.toggleClass=this.data.get("class")||"hidden",this.visibleClass=this.data.get("visibleClass")||null,this.invisibleClass=this.data.get("invisibleClass")||null,this.activeClass=this.data.get("activeClass")||null,this.enteringClass=this.data.get("enteringClass")||null,this.leavingClass=this.data.get("leavingClass")||null,this.hasButtonTarget&&this.buttonTarget.addEventListener("keydown",this._onMenuButtonKeydown),this.element.setAttribute("aria-haspopup","true")}disconnect(){this.hasButtonTarget&&this.buttonTarget.removeEventListener("keydown",this._onMenuButtonKeydown)}toggle(){this.openValue=!this.openValue}openValueChanged(){this.openValue?this._show():this._hide()}_show(e){setTimeout((()=>{this.menuTarget.classList.remove(this.toggleClass),this.element.setAttribute("aria-expanded","true"),this._enteringClassList[0].forEach((t=>{this.menuTarget.classList.add(t)}).bind(this)),this._activeClassList[0].forEach(t=>{this.activeTarget.classList.add(t)}),this._invisibleClassList[0].forEach(t=>this.menuTarget.classList.remove(t)),this._visibleClassList[0].forEach(t=>{this.menuTarget.classList.add(t)}),setTimeout((()=>{this._enteringClassList[0].forEach(t=>this.menuTarget.classList.remove(t))}).bind(this),this.enterTimeout[0]),typeof e=="function"&&e()}).bind(this))}_hide(e){setTimeout((()=>{this.element.setAttribute("aria-expanded","false"),this._invisibleClassList[0].forEach(t=>this.menuTarget.classList.add(t)),this._visibleClassList[0].forEach(t=>this.menuTarget.classList.remove(t)),this._activeClassList[0].forEach(t=>this.activeTarget.classList.remove(t)),this._leavingClassList[0].forEach(t=>this.menuTarget.classList.add(t)),setTimeout((()=>{this._leavingClassList[0].forEach(t=>this.menuTarget.classList.remove(t)),typeof e=="function"&&e(),this.menuTarget.classList.add(this.toggleClass)}).bind(this),this.leaveTimeout[0])}).bind(this))}show(){this.openValue=!0}hide(e){this.element.contains(e.target)===!1&&this.openValue&&(this.openValue=!1)}get activeTarget(){return this.data.has("activeTarget")?document.querySelector(this.data.get("activeTarget")):this.element}get _activeClassList(){return this.activeClass?this.activeClass.split(",").map(e=>e.split(" ")):[[],[]]}get _visibleClassList(){return this.visibleClass?this.visibleClass.split(",").map(e=>e.split(" ")):[[],[]]}get _invisibleClassList(){return this.invisibleClass?this.invisibleClass.split(",").map(e=>e.split(" ")):[[],[]]}get _enteringClassList(){return this.enteringClass?this.enteringClass.split(",").map(e=>e.split(" ")):[[],[]]}get _leavingClassList(){return this.leavingClass?this.leavingClass.split(",").map(e=>e.split(" ")):[[],[]]}get enterTimeout(){return(this.data.get("enterTimeout")||"0,0").split(",").map(e=>parseInt(e))}get leaveTimeout(){return(this.data.get("leaveTimeout")||"0,0").split(",").map(e=>parseInt(e))}};Ax.targets=["menu","button"],Ax.values={open:Boolean};QO=class extends ht{connect(){this.toggleClass=this.data.get("class")||"hidden",this.backgroundId=this.data.get("backgroundId")||"modal-background",this.backgroundHtml=this.data.get("backgroundHtml")||this._backgroundHTML(),this.allowBackgroundClose=(this.data.get("allowBackgroundClose")||"true")==="true",this.preventDefaultActionOpening=(this.data.get("preventDefaultActionOpening")||"true")==="true",this.preventDefaultActionClosing=(this.data.get("preventDefaultActionClosing")||"true")==="true"}disconnect(){this.close()}open(e){this.preventDefaultActionOpening&&e.preventDefault(),e.target.blur&&e.target.blur(),this.lockScroll(),this.containerTarget.classList.remove(this.toggleClass),this.data.get("disable-backdrop")||(document.body.insertAdjacentHTML("beforeend",this.backgroundHtml),this.background=document.querySelector(`#${this.backgroundId}`))}close(e){e&&this.preventDefaultActionClosing&&e.preventDefault(),this.unlockScroll(),this.containerTarget.classList.add(this.toggleClass),this.background&&this.background.remove()}closeBackground(e){this.allowBackgroundClose&&e.target===this.containerTarget&&this.close(e)}closeWithKeyboard(e){e.keyCode!==27||this.containerTarget.classList.contains(this.toggleClass)||this.close(e)}_backgroundHTML(){return`<div id="${this.backgroundId}" class="fixed top-0 left-0 w-full h-full" style="background-color: ${this.backdropColorValue}; z-index: 9998;"></div>`}lockScroll(){let e=window.innerWidth-document.documentElement.clientWidth;document.body.style.paddingRight=`${e}px`,this.saveScrollPosition(),document.body.classList.add("fixed","inset-x-0","overflow-hidden"),document.body.style.top=`-${this.scrollPosition}px`}unlockScroll(){document.body.style.paddingRight=null,document.body.classList.remove("fixed","inset-x-0","overflow-hidden"),this.restoreScrollValue&&this.restoreScrollPosition(),document.body.style.top=null}saveScrollPosition(){this.scrollPosition=window.pageYOffset||document.body.scrollTop}restoreScrollPosition(){this.scrollPosition!==void 0&&(document.documentElement.scrollTop=this.scrollPosition)}};QO.targets=["container"],QO.values={backdropColor:{type:String,default:"rgba(0, 0, 0, 0.8)"},restoreScroll:{type:Boolean,default:!0}};bZ=class extends ht{connect(){this.activeTabClasses=(this.data.get("activeTab")||"active").split(" "),this.inactiveTabClasses=(this.data.get("inactiveTab")||"inactive").split(" "),this.anchor&&(this.index=this.tabTargets.findIndex(e=>e.id===this.anchor)),this.showTab()}change(e){e.preventDefault(),this.index=e.currentTarget.dataset.index?e.currentTarget.dataset.index:e.currentTarget.dataset.id?this.tabTargets.findIndex(t=>t.id==e.currentTarget.dataset.id):this.tabTargets.indexOf(e.currentTarget),window.dispatchEvent(new CustomEvent("tsc:tab-change"))}showTab(){this.tabTargets.forEach((e,t)=>{let n=this.panelTargets[t];t===this.index?(n.classList.remove("hidden"),e.classList.remove(...this.inactiveTabClasses),e.classList.add(...this.activeTabClasses),e.id&&(location.hash=e.id)):(n.classList.add("hidden"),e.classList.remove(...this.activeTabClasses),e.classList.add(...this.inactiveTabClasses))})}get index(){return parseInt(this.data.get("index")||0)}set index(e){this.data.set("index",e>=0?e:0),this.showTab()}get anchor(){return document.URL.split("#").length>1?document.URL.split("#")[1]:null}};bZ.targets=["tab","panel"];ZO=class extends ht{connect(){this.toggleClass=this.data.get("class")||"hidden"}toggle(e){e.preventDefault(),this.openValue=!this.openValue}hide(e){e.preventDefault(),this.openValue=!1}show(e){e.preventDefault(),this.openValue=!0}openValueChanged(){this.toggleClass&&this.toggleableTargets.forEach(e=>{e.classList.toggle(this.toggleClass)})}};ZO.targets=["toggleable"],ZO.values={open:Boolean};Tx=class extends ht{initialize(){this.contentTarget.setAttribute("style",`transform:translate(${this.data.get("translateX")}, ${this.data.get("translateY")});`)}mouseOver(){this.contentTarget.classList.remove("hidden")}mouseOut(){this.contentTarget.classList.add("hidden")}};Tx.targets=["content"];xZ=class extends Ax{_show(){this.overlayTarget.classList.remove(this.toggleClass),super._show((()=>{this._activeClassList[1].forEach(e=>this.overlayTarget.classList.add(e)),this._invisibleClassList[1].forEach(e=>this.overlayTarget.classList.remove(e)),this._visibleClassList[1].forEach(e=>this.overlayTarget.classList.add(e)),setTimeout((()=>{this._enteringClassList[1].forEach(e=>this.overlayTarget.classList.remove(e))}).bind(this),this.enterTimeout[1])}).bind(this))}_hide(){this._leavingClassList[1].forEach(e=>this.overlayTarget.classList.add(e)),super._hide((()=>{setTimeout((()=>{this._visibleClassList[1].forEach(e=>this.overlayTarget.classList.remove(e)),this._invisibleClassList[1].forEach(e=>this.overlayTarget.classList.add(e)),this._activeClassList[1].forEach(e=>this.overlayTarget.classList.remove(e)),this._leavingClassList[1].forEach(e=>this.overlayTarget.classList.remove(e)),this.overlayTarget.classList.add(this.toggleClass)}).bind(this),this.leaveTimeout[1])}).bind(this))}};xZ.targets=["menu","overlay"];wZ=class extends ht{connect(){this.styleProperty=this.data.get("style")||"backgroundColor"}update(){this.preview=this.color}set preview(e){this.previewTarget.style[this.styleProperty]=e;let t=this._getContrastYIQ(e);this.styleProperty==="color"?this.previewTarget.style.backgroundColor=t:this.previewTarget.style.color=t}get color(){return this.colorTarget.value}_getContrastYIQ(e){return e=e.replace("#",""),(299*parseInt(e.substr(0,2),16)+587*parseInt(e.substr(2,2),16)+114*parseInt(e.substr(4,2),16))/1e3>=128?"#000":"#fff"}};wZ.targets=["preview","color"]});var Gt,SZ=te(()=>{_Z();gr();Gt=ng.start();Gt.debug=!1;window.Stimulus=Gt;Gt.register("alert",ig);Gt.register("popover",Tx)});var Kn,gd=te(()=>{Kn=r=>r=="true"});var Dx,kZ=te(()=>{gr();gd();Dx=class extends ht{connect(){this.resourceIdsTarget.value=this.resourceIds,this.noConfirmation?this.formTarget.submit():this.controllerDivTarget.classList.remove("hidden")}get noConfirmation(){return Kn(this.controllerDivTarget.dataset.noConfirmation)}get resourceName(){return this.controllerDivTarget.dataset.resourceName}get resourceIds(){try{return JSON.parse(document.querySelector(`[data-selected-resources-name="${this.resourceName}"]`).dataset.selectedResources)}catch(r){return[]}}};ct(Dx,"targets",["controllerDiv","resourceIds","form"])});var EZ,JO=te(()=>{EZ=function(){function r(e,t){var n=this;this.element=e,this.started=!1,this.delegate=t,this.elements=new Set,this.mutationObserver=new MutationObserver(function(i){return n.processMutations(i)})}return r.prototype.start=function(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,childList:!0,subtree:!0}),this.refresh())},r.prototype.stop=function(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)},r.prototype.refresh=function(){if(this.started){for(var e=new Set(this.matchElementsInTree()),t=0,n=Array.from(this.elements);t<n.length;t++){var i=n[t];e.has(i)||this.removeElement(i)}for(var o=0,a=Array.from(e);o<a.length;o++){var i=a[o];this.addElement(i)}}},r.prototype.processMutations=function(e){if(this.started)for(var t=0,n=e;t<n.length;t++){var i=n[t];this.processMutation(i)}},r.prototype.processMutation=function(e){e.type=="attributes"?this.processAttributeChange(e.target,e.attributeName):e.type=="childList"&&(this.processRemovedNodes(e.removedNodes),this.processAddedNodes(e.addedNodes))},r.prototype.processAttributeChange=function(e,t){var n=e;this.elements.has(n)?this.delegate.elementAttributeChanged&&this.matchElement(n)?this.delegate.elementAttributeChanged(n,t):this.removeElement(n):this.matchElement(n)&&this.addElement(n)},r.prototype.processRemovedNodes=function(e){for(var t=0,n=Array.from(e);t<n.length;t++){var i=n[t],o=this.elementFromNode(i);o&&this.processTree(o,this.removeElement)}},r.prototype.processAddedNodes=function(e){for(var t=0,n=Array.from(e);t<n.length;t++){var i=n[t],o=this.elementFromNode(i);o&&this.elementIsActive(o)&&this.processTree(o,this.addElement)}},r.prototype.matchElement=function(e){return this.delegate.matchElement(e)},r.prototype.matchElementsInTree=function(e){return e===void 0&&(e=this.element),this.delegate.matchElementsInTree(e)},r.prototype.processTree=function(e,t){for(var n=0,i=this.matchElementsInTree(e);n<i.length;n++){var o=i[n];t.call(this,o)}},r.prototype.elementFromNode=function(e){if(e.nodeType==Node.ELEMENT_NODE)return e},r.prototype.elementIsActive=function(e){return e.isConnected!=this.element.isConnected?!1:this.element.contains(e)},r.prototype.addElement=function(e){this.elements.has(e)||this.elementIsActive(e)&&(this.elements.add(e),this.delegate.elementMatched&&this.delegate.elementMatched(e))},r.prototype.removeElement=function(e){this.elements.has(e)&&(this.elements.delete(e),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(e))},r}()});var Ox,eM=te(()=>{JO();Ox=function(){function r(e,t,n){this.attributeName=t,this.delegate=n,this.elementObserver=new EZ(e,this)}return Object.defineProperty(r.prototype,"element",{get:function(){return this.elementObserver.element},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"selector",{get:function(){return"["+this.attributeName+"]"},enumerable:!1,configurable:!0}),r.prototype.start=function(){this.elementObserver.start()},r.prototype.stop=function(){this.elementObserver.stop()},r.prototype.refresh=function(){this.elementObserver.refresh()},Object.defineProperty(r.prototype,"started",{get:function(){return this.elementObserver.started},enumerable:!1,configurable:!0}),r.prototype.matchElement=function(e){return e.hasAttribute(this.attributeName)},r.prototype.matchElementsInTree=function(e){var t=this.matchElement(e)?[e]:[],n=Array.from(e.querySelectorAll(this.selector));return t.concat(n)},r.prototype.elementMatched=function(e){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(e,this.attributeName)},r.prototype.elementUnmatched=function(e){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(e,this.attributeName)},r.prototype.elementAttributeChanged=function(e,t){this.delegate.elementAttributeValueChanged&&this.attributeName==t&&this.delegate.elementAttributeValueChanged(e,t)},r}()});var Rmt,CZ=te(()=>{Rmt=function(){function r(e,t){var n=this;this.element=e,this.delegate=t,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver(function(i){return n.processMutations(i)})}return r.prototype.start=function(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0}),this.refresh())},r.prototype.stop=function(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)},r.prototype.refresh=function(){if(this.started)for(var e=0,t=this.knownAttributeNames;e<t.length;e++){var n=t[e];this.refreshAttribute(n)}},r.prototype.processMutations=function(e){if(this.started)for(var t=0,n=e;t<n.length;t++){var i=n[t];this.processMutation(i)}},r.prototype.processMutation=function(e){var t=e.attributeName;t&&this.refreshAttribute(t)},r.prototype.refreshAttribute=function(e){var t=this.delegate.getStringMapKeyForAttribute(e);if(t!=null){this.stringMap.has(e)||this.stringMapKeyAdded(t,e);var n=this.element.getAttribute(e);this.stringMap.get(e)!=n&&this.stringMapValueChanged(n,t),n==null?(this.stringMap.delete(e),this.stringMapKeyRemoved(t,e)):this.stringMap.set(e,n)}},r.prototype.stringMapKeyAdded=function(e,t){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(e,t)},r.prototype.stringMapValueChanged=function(e,t){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(e,t)},r.prototype.stringMapKeyRemoved=function(e,t){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(e,t)},Object.defineProperty(r.prototype,"knownAttributeNames",{get:function(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"currentAttributeNames",{get:function(){return Array.from(this.element.attributes).map(function(e){return e.name})},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"recordedAttributeNames",{get:function(){return Array.from(this.stringMap.keys())},enumerable:!1,configurable:!0}),r}()});function Mx(r,e,t){AZ(r,e).add(t)}function Ix(r,e,t){AZ(r,e).delete(t),X5e(r,e)}function AZ(r,e){var t=r.get(e);return t||(t=new Set,r.set(e,t)),t}function X5e(r,e){var t=r.get(e);t!=null&&t.size==0&&r.delete(e)}var Px=te(()=>{});var Lx,tM=te(()=>{Px();Lx=function(){function r(){this.valuesByKey=new Map}return Object.defineProperty(r.prototype,"values",{get:function(){var e=Array.from(this.valuesByKey.values());return e.reduce(function(t,n){return t.concat(Array.from(n))},[])},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"size",{get:function(){var e=Array.from(this.valuesByKey.values());return e.reduce(function(t,n){return t+n.size},0)},enumerable:!1,configurable:!0}),r.prototype.add=function(e,t){Mx(this.valuesByKey,e,t)},r.prototype.delete=function(e,t){Ix(this.valuesByKey,e,t)},r.prototype.has=function(e,t){var n=this.valuesByKey.get(e);return n!=null&&n.has(t)},r.prototype.hasKey=function(e){return this.valuesByKey.has(e)},r.prototype.hasValue=function(e){var t=Array.from(this.valuesByKey.values());return t.some(function(n){return n.has(e)})},r.prototype.getValuesForKey=function(e){var t=this.valuesByKey.get(e);return t?Array.from(t):[]},r.prototype.getKeysForValue=function(e){return Array.from(this.valuesByKey).filter(function(t){var n=t[0],i=t[1];return i.has(e)}).map(function(t){var n=t[0],i=t[1];return n})},r}()});var Q5e,Wmt,TZ=te(()=>{tM();Px();Q5e=function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)i.hasOwnProperty(o)&&(n[o]=i[o])},r(e,t)};return function(e,t){r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),Wmt=function(r){Q5e(e,r);function e(){var t=r.call(this)||this;return t.keysByValue=new Map,t}return Object.defineProperty(e.prototype,"values",{get:function(){return Array.from(this.keysByValue.keys())},enumerable:!1,configurable:!0}),e.prototype.add=function(t,n){r.prototype.add.call(this,t,n),Mx(this.keysByValue,n,t)},e.prototype.delete=function(t,n){r.prototype.delete.call(this,t,n),Ix(this.keysByValue,n,t)},e.prototype.hasValue=function(t){return this.keysByValue.has(t)},e.prototype.getKeysForValue=function(t){var n=this.keysByValue.get(t);return n?Array.from(n):[]},e}(Lx)});var DZ=te(()=>{TZ();tM();Px()});function Z5e(r,e,t){return r.trim().split(/\s+/).filter(function(n){return n.length}).map(function(n,i){return{element:e,attributeName:t,content:n,index:i}})}function J5e(r,e){var t=Math.max(r.length,e.length);return Array.from({length:t},function(n,i){return[r[i],e[i]]})}function e4e(r,e){return r&&e&&r.index==e.index&&r.content==e.content}var OZ,rM=te(()=>{eM();DZ();OZ=function(){function r(e,t,n){this.attributeObserver=new Ox(e,t,this),this.delegate=n,this.tokensByElement=new Lx}return Object.defineProperty(r.prototype,"started",{get:function(){return this.attributeObserver.started},enumerable:!1,configurable:!0}),r.prototype.start=function(){this.attributeObserver.start()},r.prototype.stop=function(){this.attributeObserver.stop()},r.prototype.refresh=function(){this.attributeObserver.refresh()},Object.defineProperty(r.prototype,"element",{get:function(){return this.attributeObserver.element},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"attributeName",{get:function(){return this.attributeObserver.attributeName},enumerable:!1,configurable:!0}),r.prototype.elementMatchedAttribute=function(e){this.tokensMatched(this.readTokensForElement(e))},r.prototype.elementAttributeValueChanged=function(e){var t=this.refreshTokensForElement(e),n=t[0],i=t[1];this.tokensUnmatched(n),this.tokensMatched(i)},r.prototype.elementUnmatchedAttribute=function(e){this.tokensUnmatched(this.tokensByElement.getValuesForKey(e))},r.prototype.tokensMatched=function(e){var t=this;e.forEach(function(n){return t.tokenMatched(n)})},r.prototype.tokensUnmatched=function(e){var t=this;e.forEach(function(n){return t.tokenUnmatched(n)})},r.prototype.tokenMatched=function(e){this.delegate.tokenMatched(e),this.tokensByElement.add(e.element,e)},r.prototype.tokenUnmatched=function(e){this.delegate.tokenUnmatched(e),this.tokensByElement.delete(e.element,e)},r.prototype.refreshTokensForElement=function(e){var t=this.tokensByElement.getValuesForKey(e),n=this.readTokensForElement(e),i=J5e(t,n).findIndex(function(o){var a=o[0],s=o[1];return!e4e(a,s)});return i==-1?[[],[]]:[t.slice(i),n.slice(i)]},r.prototype.readTokensForElement=function(e){var t=this.attributeName,n=e.getAttribute(t)||"";return Z5e(n,e,t)},r}()});var Jmt,MZ=te(()=>{rM();Jmt=function(){function r(e,t,n){this.tokenListObserver=new OZ(e,t,this),this.delegate=n,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}return Object.defineProperty(r.prototype,"started",{get:function(){return this.tokenListObserver.started},enumerable:!1,configurable:!0}),r.prototype.start=function(){this.tokenListObserver.start()},r.prototype.stop=function(){this.tokenListObserver.stop()},r.prototype.refresh=function(){this.tokenListObserver.refresh()},Object.defineProperty(r.prototype,"element",{get:function(){return this.tokenListObserver.element},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"attributeName",{get:function(){return this.tokenListObserver.attributeName},enumerable:!1,configurable:!0}),r.prototype.tokenMatched=function(e){var t=e.element,n=this.fetchParseResultForToken(e).value;n&&(this.fetchValuesByTokenForElement(t).set(e,n),this.delegate.elementMatchedValue(t,n))},r.prototype.tokenUnmatched=function(e){var t=e.element,n=this.fetchParseResultForToken(e).value;n&&(this.fetchValuesByTokenForElement(t).delete(e),this.delegate.elementUnmatchedValue(t,n))},r.prototype.fetchParseResultForToken=function(e){var t=this.parseResultsByToken.get(e);return t||(t=this.parseToken(e),this.parseResultsByToken.set(e,t)),t},r.prototype.fetchValuesByTokenForElement=function(e){var t=this.valuesByTokenByElement.get(e);return t||(t=new Map,this.valuesByTokenByElement.set(e,t)),t},r.prototype.parseToken=function(e){try{var t=this.delegate.parseValueForToken(e);return{value:t}}catch(n){return{error:n}}},r}()});var IZ=te(()=>{eM();JO();CZ();rM();MZ()});var og,PZ=te(()=>{IZ();gr();og=class extends ht{constructor(){super(...arguments);ct(this,"target",{})}get targetIsDisabled(){return this.target.dataset.disabled==="true"}enableTarget(){this.targetIsDisabled&&(this.target.classList.remove(...this.disabledClasses),this.target.classList.add(...this.enabledClasses),this.target.dataset.disabled=!1)}disableTarget(){this.target.classList.remove(...this.enabledClasses),this.target.classList.add(...this.disabledClasses),this.target.dataset.disabled=!0}visitAction(r){if(this.target=r.target,this.targetIsDisabled){r.preventDefault();return}this.disableTarget();let e=new Ox(document.querySelector("turbo-frame#actions_show"),"busy",{elementUnmatchedAttribute:()=>{this.enableTarget(this.target),e&&e.stop()}});e.start()}};ct(og,"targets",["resourceAction","standaloneAction"]),ct(og,"classes",["enabled","disabled"])});var qx,LZ=te(()=>{gr();qx=class extends ht{connect(){window.toastr[this.type](this.message)}get type(){return{info:"info",warning:"warning",success:"success",error:"error",notice:"info",alert:"error"}[this.containerTarget.dataset.alertType]}get message(){return this.containerTarget.innerHTML}};ct(qx,"targets",["container"])});var Rx,qZ=te(()=>{gr();Rx=class extends ht{connect(){this.formTarget.submit()}};ct(Rx,"targets",["form"])});var Fx,RZ=te(()=>{gr();Fx=class extends ht{constructor(){super(...arguments);ct(this,"defaults",{})}get selectedType(){return this.selectTarget.value}get isSearchable(){return this.context.scope.element.dataset.searchable==="true"}get association(){return this.context.scope.element.dataset.association}get associationClass(){return this.context.scope.element.dataset.associationClass}connect(){this.copyValidNames(),this.changeType()}changeType(){this.hideAllTypes(),this.showType(this.selectTarget.value)}hideAllTypes(){this.typeTargets.forEach(r=>{r.classList.add("hidden"),this.invalidateTarget(r)})}copyValidNames(){this.typeTargets.forEach(r=>{let{type:e}=r.dataset;if(this.isSearchable){let t=r.querySelector('input[type="text"]');t&&this.nameToValidName(t);let n=r.querySelector('input[type="hidden"]');n&&this.nameToValidName(n)}else{let t=r.querySelector("select");t&&this.nameToValidName(t);let n=r.querySelector('input[type="hidden"]');n&&this.nameToValidName(n),this.selectedType!==e&&(t.selectedIndex=0)}})}showType(r){let e=this.typeTargets.find(t=>t.dataset.type===r);e&&(e.classList.remove("hidden"),this.validateTarget(e))}validateTarget(r){if(this.isSearchable){let e=r.querySelector('input[type="text"]'),t=r.querySelector('input[type="hidden"]');this.validNameToName(e),this.validNameToName(t)}else{let e=r.querySelector("select"),t=r.querySelector('input[type="hidden"]');this.validNameToName(e),t&&this.validNameToName(t)}}invalidateTarget(r){if(this.isSearchable)try{r.querySelector('input[type="text"]').setAttribute("name",""),r.querySelector('input[type="hidden"]').setAttribute("name","")}catch(e){}else if(r)try{r.querySelector("select").setAttribute("name",""),r.querySelector('input[type="hidden"]').setAttribute("name","")}catch(e){}}validNameToName(r){r.setAttribute("name",r.getAttribute("valid-name"))}nameToValidName(r){r.setAttribute("valid-name",r.getAttribute("name"))}};ct(Fx,"targets",["select","type","loadAssociationLink"])});var FZ=V((vd,yd)=>{(function(r){var e=typeof vd=="object"&&vd&&!vd.nodeType&&vd,t=typeof yd=="object"&&yd&&!yd.nodeType&&yd,n=typeof global=="object"&&global;(n.global===n||n.window===n||n.self===n)&&(r=n);var i,o=2147483647,a=36,s=1,u=26,f=38,c=700,h=72,p=128,m="-",y=/^xn--/,b=/[^\x20-\x7E]/,k=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=a-s,E=Math.floor,C=String.fromCharCode,D;function T($){throw new RangeError(x[$])}function I($,ee){for(var U=$.length,H=[];U--;)H[U]=ee($[U]);return H}function q($,ee){var U=$.split("@"),H="";U.length>1&&(H=U[0]+"@",$=U[1]),$=$.replace(k,".");var he=$.split("."),me=I(he,ee).join(".");return H+me}function z($){for(var ee=[],U=0,H=$.length,he,me;U<H;)he=$.charCodeAt(U++),he>=55296&&he<=56319&&U<H?(me=$.charCodeAt(U++),(me&64512)==56320?ee.push(((he&1023)<<10)+(me&1023)+65536):(ee.push(he),U--)):ee.push(he);return ee}function Y($){return I($,function(ee){var U="";return ee>65535&&(ee-=65536,U+=C(ee>>>10&1023|55296),ee=56320|ee&1023),U+=C(ee),U}).join("")}function X($){return $-48<10?$-22:$-65<26?$-65:$-97<26?$-97:a}function _($,ee){return $+22+75*($<26)-((ee!=0)<<5)}function O($,ee,U){var H=0;for($=U?E($/c):$>>1,$+=E($/ee);$>S*u>>1;H+=a)$=E($/S);return E(H+(S+1)*$/($+f))}function M($){var ee=[],U=$.length,H,he=0,me=p,pe=h,Ae,Ee,We,Te,je,at,st,Le,we;for(Ae=$.lastIndexOf(m),Ae<0&&(Ae=0),Ee=0;Ee<Ae;++Ee)$.charCodeAt(Ee)>=128&&T("not-basic"),ee.push($.charCodeAt(Ee));for(We=Ae>0?Ae+1:0;We<U;){for(Te=he,je=1,at=a;We>=U&&T("invalid-input"),st=X($.charCodeAt(We++)),(st>=a||st>E((o-he)/je))&&T("overflow"),he+=st*je,Le=at<=pe?s:at>=pe+u?u:at-pe,!(st<Le);at+=a)we=a-Le,je>E(o/we)&&T("overflow"),je*=we;H=ee.length+1,pe=O(he-Te,H,Te==0),E(he/H)>o-me&&T("overflow"),me+=E(he/H),he%=H,ee.splice(he++,0,me)}return Y(ee)}function j($){var ee,U,H,he,me,pe,Ae,Ee,We,Te,je,at=[],st,Le,we,xe;for($=z($),st=$.length,ee=p,U=0,me=h,pe=0;pe<st;++pe)je=$[pe],je<128&&at.push(C(je));for(H=he=at.length,he&&at.push(m);H<st;){for(Ae=o,pe=0;pe<st;++pe)je=$[pe],je>=ee&&je<Ae&&(Ae=je);for(Le=H+1,Ae-ee>E((o-U)/Le)&&T("overflow"),U+=(Ae-ee)*Le,ee=Ae,pe=0;pe<st;++pe)if(je=$[pe],je<ee&&++U>o&&T("overflow"),je==ee){for(Ee=U,We=a;Te=We<=me?s:We>=me+u?u:We-me,!(Ee<Te);We+=a)xe=Ee-Te,we=a-Te,at.push(C(_(Te+xe%we,0))),Ee=E(xe/we);at.push(C(_(Ee,0))),me=O(U,Le,H==he),U=0,++H}++U,++ee}return at.join("")}function P($){return q($,function(ee){return y.test(ee)?M(ee.slice(4).toLowerCase()):ee})}function F($){return q($,function(ee){return b.test(ee)?"xn--"+j(ee):ee})}if(i={version:"1.3.2",ucs2:{decode:z,encode:Y},decode:M,encode:j,toASCII:F,toUnicode:P},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return i});else if(e&&t)if(yd.exports==e)t.exports=i;else for(D in i)i.hasOwnProperty(D)&&(e[D]=i[D]);else r.punycode=i})(vd)});var BZ=V((NZ,Nx)=>{(function(r,e){"use strict";typeof Nx=="object"&&Nx.exports?Nx.exports=e():typeof define=="function"&&define.amd?define(e):r.IPv6=e(r)})(NZ,function(r){"use strict";var e=r&&r.IPv6;function t(i){var o=i.toLowerCase(),a=o.split(":"),s=a.length,u=8;a[0]===""&&a[1]===""&&a[2]===""?(a.shift(),a.shift()):a[0]===""&&a[1]===""?a.shift():a[s-1]===""&&a[s-2]===""&&a.pop(),s=a.length,a[s-1].indexOf(".")!==-1&&(u=7);var f;for(f=0;f<s&&a[f]!=="";f++);if(f<u)for(a.splice(f,1,"0000");a.length<u;)a.splice(f,0,"0000");for(var c,h=0;h<u;h++){c=a[h].split("");for(var p=0;p<3&&(c[0]==="0"&&c.length>1);p++)c.splice(0,1);a[h]=c.join("")}var m=-1,y=0,b=0,k=-1,x=!1;for(h=0;h<u;h++)x?a[h]==="0"?b+=1:(x=!1,b>y&&(m=k,y=b)):a[h]==="0"&&(x=!0,k=h,b=1);b>y&&(m=k,y=b),y>1&&a.splice(m,y,""),s=a.length;var S="";for(a[0]===""&&(S=":"),h=0;h<s&&(S+=a[h],h!==s-1);h++)S+=":";return a[s-1]===""&&(S+=":"),S}function n(){return r.IPv6===this&&(r.IPv6=e),this}return{best:t,noConflict:n}})});var zZ=V((jZ,Bx)=>{(function(r,e){"use strict";typeof Bx=="object"&&Bx.exports?Bx.exports=e():typeof define=="function"&&define.amd?define(e):r.SecondLevelDomains=e(r)})(jZ,function(r){"use strict";var e=r&&r.SecondLevelDomains,t={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(n){var i=n.lastIndexOf(".");if(i<=0||i>=n.length-1)return!1;var o=n.lastIndexOf(".",i-1);if(o<=0||o>=i-1)return!1;var a=t.list[n.slice(i+1)];return a?a.indexOf(" "+n.slice(o+1,i)+" ")>=0:!1},is:function(n){var i=n.lastIndexOf(".");if(i<=0||i>=n.length-1)return!1;var o=n.lastIndexOf(".",i-1);if(o>=0)return!1;var a=t.list[n.slice(i+1)];return a?a.indexOf(" "+n.slice(0,i)+" ")>=0:!1},get:function(n){var i=n.lastIndexOf(".");if(i<=0||i>=n.length-1)return null;var o=n.lastIndexOf(".",i-1);if(o<=0||o>=i-1)return null;var a=t.list[n.slice(i+1)];return!a||a.indexOf(" "+n.slice(o+1,i)+" ")<0?null:n.slice(o+1)},noConflict:function(){return r.SecondLevelDomains===this&&(r.SecondLevelDomains=e),this}};return t})});var zx=V((HZ,jx)=>{(function(r,e){"use strict";typeof jx=="object"&&jx.exports?jx.exports=e(FZ(),BZ(),zZ()):typeof define=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],e):r.URI=e(r.punycode,r.IPv6,r.SecondLevelDomains,r)})(HZ,function(r,e,t,n){"use strict";var i=n&&n.URI;function o(_,O){var M=arguments.length>=1,j=arguments.length>=2;if(!(this instanceof o))return M?j?new o(_,O):new o(_):new o;if(_===void 0){if(M)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?_=location.href+"":_=""}if(_===null&&M)throw new TypeError("null is not a valid argument for URI");return this.href(_),O!==void 0?this.absoluteTo(O):this}function a(_){return/^[0-9]+$/.test(_)}o.version="1.19.11";var s=o.prototype,u=Object.prototype.hasOwnProperty;function f(_){return _.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function c(_){return _===void 0?"Undefined":String(Object.prototype.toString.call(_)).slice(8,-1)}function h(_){return c(_)==="Array"}function p(_,O){var M={},j,P;if(c(O)==="RegExp")M=null;else if(h(O))for(j=0,P=O.length;j<P;j++)M[O[j]]=!0;else M[O]=!0;for(j=0,P=_.length;j<P;j++){var F=M&&M[_[j]]!==void 0||!M&&O.test(_[j]);F&&(_.splice(j,1),P--,j--)}return _}function m(_,O){var M,j;if(h(O)){for(M=0,j=O.length;M<j;M++)if(!m(_,O[M]))return!1;return!0}var P=c(O);for(M=0,j=_.length;M<j;M++)if(P==="RegExp"){if(typeof _[M]=="string"&&_[M].match(O))return!0}else if(_[M]===O)return!0;return!1}function y(_,O){if(!h(_)||!h(O)||_.length!==O.length)return!1;_.sort(),O.sort();for(var M=0,j=_.length;M<j;M++)if(_[M]!==O[M])return!1;return!0}function b(_){var O=/^\/+|\/+$/g;return _.replace(O,"")}o._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:o.preventInvalidHostname,duplicateQueryParameters:o.duplicateQueryParameters,escapeQuerySpace:o.escapeQuerySpace}},o.preventInvalidHostname=!1,o.duplicateQueryParameters=!1,o.escapeQuerySpace=!0,o.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,o.idn_expression=/[^a-z0-9\._-]/i,o.punycode_expression=/(xn--)/i,o.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,o.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,o.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/ig,o.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},o.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,o.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},o.hostProtocols=["http","https"],o.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,o.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},o.getDomAttribute=function(_){if(!(!_||!_.nodeName)){var O=_.nodeName.toLowerCase();if(!(O==="input"&&_.type!=="image"))return o.domAttributes[O]}};function k(_){return escape(_)}function x(_){return encodeURIComponent(_).replace(/[!'()*]/g,k).replace(/\*/g,"%2A")}o.encode=x,o.decode=decodeURIComponent,o.iso8859=function(){o.encode=escape,o.decode=unescape},o.unicode=function(){o.encode=x,o.decode=decodeURIComponent},o.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/ig,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},o.encodeQuery=function(_,O){var M=o.encode(_+"");return O===void 0&&(O=o.escapeQuerySpace),O?M.replace(/%20/g,"+"):M},o.decodeQuery=function(_,O){_+="",O===void 0&&(O=o.escapeQuerySpace);try{return o.decode(O?_.replace(/\+/g,"%20"):_)}catch{return _}};var S={encode:"encode",decode:"decode"},E,C=function(_,O){return function(M){try{return o[O](M+"").replace(o.characters[_][O].expression,function(j){return o.characters[_][O].map[j]})}catch{return M}}};for(E in S)o[E+"PathSegment"]=C("pathname",S[E]),o[E+"UrnPathSegment"]=C("urnpath",S[E]);var D=function(_,O,M){return function(j){var P;M?P=function(U){return o[O](o[M](U))}:P=o[O];for(var F=(j+"").split(_),$=0,ee=F.length;$<ee;$++)F[$]=P(F[$]);return F.join(_)}};o.decodePath=D("/","decodePathSegment"),o.decodeUrnPath=D(":","decodeUrnPathSegment"),o.recodePath=D("/","encodePathSegment","decode"),o.recodeUrnPath=D(":","encodeUrnPathSegment","decode"),o.encodeReserved=C("reserved","encode"),o.parse=function(_,O){var M;return O||(O={preventInvalidHostname:o.preventInvalidHostname}),_=_.replace(o.leading_whitespace_expression,""),_=_.replace(o.ascii_tab_whitespace,""),M=_.indexOf("#"),M>-1&&(O.fragment=_.substring(M+1)||null,_=_.substring(0,M)),M=_.indexOf("?"),M>-1&&(O.query=_.substring(M+1)||null,_=_.substring(0,M)),_=_.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),_=_.replace(/^[/\\]{2,}/i,"//"),_.substring(0,2)==="//"?(O.protocol=null,_=_.substring(2),_=o.parseAuthority(_,O)):(M=_.indexOf(":"),M>-1&&(O.protocol=_.substring(0,M)||null,O.protocol&&!O.protocol.match(o.protocol_expression)?O.protocol=void 0:_.substring(M+1,M+3).replace(/\\/g,"/")==="//"?(_=_.substring(M+3),_=o.parseAuthority(_,O)):(_=_.substring(M+1),O.urn=!0))),O.path=_,O},o.parseHost=function(_,O){_||(_=""),_=_.replace(/\\/g,"/");var M=_.indexOf("/"),j,P;if(M===-1&&(M=_.length),_.charAt(0)==="[")j=_.indexOf("]"),O.hostname=_.substring(1,j)||null,O.port=_.substring(j+2,M)||null,O.port==="/"&&(O.port=null);else{var F=_.indexOf(":"),$=_.indexOf("/"),ee=_.indexOf(":",F+1);ee!==-1&&($===-1||ee<$)?(O.hostname=_.substring(0,M)||null,O.port=null):(P=_.substring(0,M).split(":"),O.hostname=P[0]||null,O.port=P[1]||null)}return O.hostname&&_.substring(M).charAt(0)!=="/"&&(M++,_="/"+_),O.preventInvalidHostname&&o.ensureValidHostname(O.hostname,O.protocol),O.port&&o.ensureValidPort(O.port),_.substring(M)||"/"},o.parseAuthority=function(_,O){return _=o.parseUserinfo(_,O),o.parseHost(_,O)},o.parseUserinfo=function(_,O){var M=_,j=_.indexOf("\\");j!==-1&&(_=_.replace(/\\/g,"/"));var P=_.indexOf("/"),F=_.lastIndexOf("@",P>-1?P:_.length-1),$;return F>-1&&(P===-1||F<P)?($=_.substring(0,F).split(":"),O.username=$[0]?o.decode($[0]):null,$.shift(),O.password=$[0]?o.decode($.join(":")):null,_=M.substring(F+1)):(O.username=null,O.password=null),_},o.parseQuery=function(_,O){if(!_)return{};if(_=_.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!_)return{};for(var M={},j=_.split("&"),P=j.length,F,$,ee,U=0;U<P;U++)F=j[U].split("="),$=o.decodeQuery(F.shift(),O),ee=F.length?o.decodeQuery(F.join("="),O):null,$!=="__proto__"&&(u.call(M,$)?((typeof M[$]=="string"||M[$]===null)&&(M[$]=[M[$]]),M[$].push(ee)):M[$]=ee);return M},o.build=function(_){var O="",M=!1;return _.protocol&&(O+=_.protocol+":"),!_.urn&&(O||_.hostname)&&(O+="//",M=!0),O+=o.buildAuthority(_)||"",typeof _.path=="string"&&(_.path.charAt(0)!=="/"&&M&&(O+="/"),O+=_.path),typeof _.query=="string"&&_.query&&(O+="?"+_.query),typeof _.fragment=="string"&&_.fragment&&(O+="#"+_.fragment),O},o.buildHost=function(_){var O="";if(_.hostname)o.ip6_expression.test(_.hostname)?O+="["+_.hostname+"]":O+=_.hostname;else return"";return _.port&&(O+=":"+_.port),O},o.buildAuthority=function(_){return o.buildUserinfo(_)+o.buildHost(_)},o.buildUserinfo=function(_){var O="";return _.username&&(O+=o.encode(_.username)),_.password&&(O+=":"+o.encode(_.password)),O&&(O+="@"),O},o.buildQuery=function(_,O,M){var j="",P,F,$,ee;for(F in _)if(F!=="__proto__"&&u.call(_,F))if(h(_[F]))for(P={},$=0,ee=_[F].length;$<ee;$++)_[F][$]!==void 0&&P[_[F][$]+""]===void 0&&(j+="&"+o.buildQueryParameter(F,_[F][$],M),O!==!0&&(P[_[F][$]+""]=!0));else _[F]!==void 0&&(j+="&"+o.buildQueryParameter(F,_[F],M));return j.substring(1)},o.buildQueryParameter=function(_,O,M){return o.encodeQuery(_,M)+(O!==null?"="+o.encodeQuery(O,M):"")},o.addQuery=function(_,O,M){if(typeof O=="object")for(var j in O)u.call(O,j)&&o.addQuery(_,j,O[j]);else if(typeof O=="string"){if(_[O]===void 0){_[O]=M;return}else typeof _[O]=="string"&&(_[O]=[_[O]]);h(M)||(M=[M]),_[O]=(_[O]||[]).concat(M)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},o.setQuery=function(_,O,M){if(typeof O=="object")for(var j in O)u.call(O,j)&&o.setQuery(_,j,O[j]);else if(typeof O=="string")_[O]=M===void 0?null:M;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},o.removeQuery=function(_,O,M){var j,P,F;if(h(O))for(j=0,P=O.length;j<P;j++)_[O[j]]=void 0;else if(c(O)==="RegExp")for(F in _)O.test(F)&&(_[F]=void 0);else if(typeof O=="object")for(F in O)u.call(O,F)&&o.removeQuery(_,F,O[F]);else if(typeof O=="string")M!==void 0?c(M)==="RegExp"?!h(_[O])&&M.test(_[O])?_[O]=void 0:_[O]=p(_[O],M):_[O]===String(M)&&(!h(M)||M.length===1)?_[O]=void 0:h(_[O])&&(_[O]=p(_[O],M)):_[O]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},o.hasQuery=function(_,O,M,j){switch(c(O)){case"String":break;case"RegExp":for(var P in _)if(u.call(_,P)&&O.test(P)&&(M===void 0||o.hasQuery(_,P,M)))return!0;return!1;case"Object":for(var F in O)if(u.call(O,F)&&!o.hasQuery(_,F,O[F]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(c(M)){case"Undefined":return O in _;case"Boolean":var $=Boolean(h(_[O])?_[O].length:_[O]);return M===$;case"Function":return!!M(_[O],O,_);case"Array":if(!h(_[O]))return!1;var ee=j?m:y;return ee(_[O],M);case"RegExp":return h(_[O])?j?m(_[O],M):!1:Boolean(_[O]&&_[O].match(M));case"Number":M=String(M);case"String":return h(_[O])?j?m(_[O],M):!1:_[O]===M;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},o.joinPaths=function(){for(var _=[],O=[],M=0,j=0;j<arguments.length;j++){var P=new o(arguments[j]);_.push(P);for(var F=P.segment(),$=0;$<F.length;$++)typeof F[$]=="string"&&O.push(F[$]),F[$]&&M++}if(!O.length||!M)return new o("");var ee=new o("").segment(O);return(_[0].path()===""||_[0].path().slice(0,1)==="/")&&ee.path("/"+ee.path()),ee.normalize()},o.commonPath=function(_,O){var M=Math.min(_.length,O.length),j;for(j=0;j<M;j++)if(_.charAt(j)!==O.charAt(j)){j--;break}return j<1?_.charAt(0)===O.charAt(0)&&_.charAt(0)==="/"?"/":"":((_.charAt(j)!=="/"||O.charAt(j)!=="/")&&(j=_.substring(0,j).lastIndexOf("/")),_.substring(0,j+1))},o.withinString=function(_,O,M){M||(M={});var j=M.start||o.findUri.start,P=M.end||o.findUri.end,F=M.trim||o.findUri.trim,$=M.parens||o.findUri.parens,ee=/[a-z0-9-]=["']?$/i;for(j.lastIndex=0;;){var U=j.exec(_);if(!U)break;var H=U.index;if(M.ignoreHtml){var he=_.slice(Math.max(H-3,0),H);if(he&&ee.test(he))continue}for(var me=H+_.slice(H).search(P),pe=_.slice(H,me),Ae=-1;;){var Ee=$.exec(pe);if(!Ee)break;var We=Ee.index+Ee[0].length;Ae=Math.max(Ae,We)}if(Ae>-1?pe=pe.slice(0,Ae)+pe.slice(Ae).replace(F,""):pe=pe.replace(F,""),!(pe.length<=U[0].length)&&!(M.ignore&&M.ignore.test(pe))){me=H+pe.length;var Te=O(pe,H,me,_);if(Te===void 0){j.lastIndex=me;continue}Te=String(Te),_=_.slice(0,H)+Te+_.slice(me),j.lastIndex=H+Te.length}}return j.lastIndex=0,_},o.ensureValidHostname=function(_,O){var M=!!_,j=!!O,P=!1;if(j&&(P=m(o.hostProtocols,O)),P&&!M)throw new TypeError("Hostname cannot be empty, if protocol is "+O);if(_&&_.match(o.invalid_hostname_characters)){if(!r)throw new TypeError('Hostname "'+_+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(r.toASCII(_).match(o.invalid_hostname_characters))throw new TypeError('Hostname "'+_+'" contains characters other than [A-Z0-9.-:_]')}},o.ensureValidPort=function(_){if(!!_){var O=Number(_);if(!(a(O)&&O>0&&O<65536))throw new TypeError('Port "'+_+'" is not a valid port')}},o.noConflict=function(_){if(_){var O={URI:this.noConflict()};return n.URITemplate&&typeof n.URITemplate.noConflict=="function"&&(O.URITemplate=n.URITemplate.noConflict()),n.IPv6&&typeof n.IPv6.noConflict=="function"&&(O.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&typeof n.SecondLevelDomains.noConflict=="function"&&(O.SecondLevelDomains=n.SecondLevelDomains.noConflict()),O}else n.URI===this&&(n.URI=i);return this},s.build=function(_){return _===!0?this._deferred_build=!0:(_===void 0||this._deferred_build)&&(this._string=o.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new o(this)},s.valueOf=s.toString=function(){return this.build(!1)._string};function T(_){return function(O,M){return O===void 0?this._parts[_]||"":(this._parts[_]=O||null,this.build(!M),this)}}function I(_,O){return function(M,j){return M===void 0?this._parts[_]||"":(M!==null&&(M=M+"",M.charAt(0)===O&&(M=M.substring(1))),this._parts[_]=M,this.build(!j),this)}}s.protocol=T("protocol"),s.username=T("username"),s.password=T("password"),s.hostname=T("hostname"),s.port=T("port"),s.query=I("query","?"),s.fragment=I("fragment","#"),s.search=function(_,O){var M=this.query(_,O);return typeof M=="string"&&M.length?"?"+M:M},s.hash=function(_,O){var M=this.fragment(_,O);return typeof M=="string"&&M.length?"#"+M:M},s.pathname=function(_,O){if(_===void 0||_===!0){var M=this._parts.path||(this._parts.hostname?"/":"");return _?(this._parts.urn?o.decodeUrnPath:o.decodePath)(M):M}else return this._parts.urn?this._parts.path=_?o.recodeUrnPath(_):"":this._parts.path=_?o.recodePath(_):"/",this.build(!O),this},s.path=s.pathname,s.href=function(_,O){var M;if(_===void 0)return this.toString();this._string="",this._parts=o._parts();var j=_ instanceof o,P=typeof _=="object"&&(_.hostname||_.path||_.pathname);if(_.nodeName){var F=o.getDomAttribute(_);_=_[F]||"",P=!1}if(!j&&P&&_.pathname!==void 0&&(_=_.toString()),typeof _=="string"||_ instanceof String)this._parts=o.parse(String(_),this._parts);else if(j||P){var $=j?_._parts:_;for(M in $)M!=="query"&&u.call(this._parts,M)&&(this._parts[M]=$[M]);$.query&&this.query($.query,!1)}else throw new TypeError("invalid input");return this.build(!O),this},s.is=function(_){var O=!1,M=!1,j=!1,P=!1,F=!1,$=!1,ee=!1,U=!this._parts.urn;switch(this._parts.hostname&&(U=!1,M=o.ip4_expression.test(this._parts.hostname),j=o.ip6_expression.test(this._parts.hostname),O=M||j,P=!O,F=P&&t&&t.has(this._parts.hostname),$=P&&o.idn_expression.test(this._parts.hostname),ee=P&&o.punycode_expression.test(this._parts.hostname)),_.toLowerCase()){case"relative":return U;case"absolute":return!U;case"domain":case"name":return P;case"sld":return F;case"ip":return O;case"ip4":case"ipv4":case"inet4":return M;case"ip6":case"ipv6":case"inet6":return j;case"idn":return $;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return ee}return null};var q=s.protocol,z=s.port,Y=s.hostname;s.protocol=function(_,O){if(_&&(_=_.replace(/:(\/\/)?$/,""),!_.match(o.protocol_expression)))throw new TypeError('Protocol "'+_+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return q.call(this,_,O)},s.scheme=s.protocol,s.port=function(_,O){return this._parts.urn?_===void 0?"":this:(_!==void 0&&(_===0&&(_=null),_&&(_+="",_.charAt(0)===":"&&(_=_.substring(1)),o.ensureValidPort(_))),z.call(this,_,O))},s.hostname=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(_!==void 0){var M={preventInvalidHostname:this._parts.preventInvalidHostname},j=o.parseHost(_,M);if(j!=="/")throw new TypeError('Hostname "'+_+'" contains characters other than [A-Z0-9.-]');_=M.hostname,this._parts.preventInvalidHostname&&o.ensureValidHostname(_,this._parts.protocol)}return Y.call(this,_,O)},s.origin=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(_===void 0){var M=this.protocol(),j=this.authority();return j?(M?M+"://":"")+this.authority():""}else{var P=o(_);return this.protocol(P.protocol()).authority(P.authority()).build(!O),this}},s.host=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(_===void 0)return this._parts.hostname?o.buildHost(this._parts):"";var M=o.parseHost(_,this._parts);if(M!=="/")throw new TypeError('Hostname "'+_+'" contains characters other than [A-Z0-9.-]');return this.build(!O),this},s.authority=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(_===void 0)return this._parts.hostname?o.buildAuthority(this._parts):"";var M=o.parseAuthority(_,this._parts);if(M!=="/")throw new TypeError('Hostname "'+_+'" contains characters other than [A-Z0-9.-]');return this.build(!O),this},s.userinfo=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(_===void 0){var M=o.buildUserinfo(this._parts);return M&&M.substring(0,M.length-1)}else return _[_.length-1]!=="@"&&(_+="@"),o.parseUserinfo(_,this._parts),this.build(!O),this},s.resource=function(_,O){var M;return _===void 0?this.path()+this.search()+this.hash():(M=o.parse(_),this._parts.path=M.path,this._parts.query=M.query,this._parts.fragment=M.fragment,this.build(!O),this)},s.subdomain=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(_===void 0){if(!this._parts.hostname||this.is("IP"))return"";var M=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,M)||""}else{var j=this._parts.hostname.length-this.domain().length,P=this._parts.hostname.substring(0,j),F=new RegExp("^"+f(P));if(_&&_.charAt(_.length-1)!=="."&&(_+="."),_.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return _&&o.ensureValidHostname(_,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(F,_),this.build(!O),this}},s.domain=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(typeof _=="boolean"&&(O=_,_=void 0),_===void 0){if(!this._parts.hostname||this.is("IP"))return"";var M=this._parts.hostname.match(/\./g);if(M&&M.length<2)return this._parts.hostname;var j=this._parts.hostname.length-this.tld(O).length-1;return j=this._parts.hostname.lastIndexOf(".",j-1)+1,this._parts.hostname.substring(j)||""}else{if(!_)throw new TypeError("cannot set domain empty");if(_.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(o.ensureValidHostname(_,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=_;else{var P=new RegExp(f(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(P,_)}return this.build(!O),this}},s.tld=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(typeof _=="boolean"&&(O=_,_=void 0),_===void 0){if(!this._parts.hostname||this.is("IP"))return"";var M=this._parts.hostname.lastIndexOf("."),j=this._parts.hostname.substring(M+1);return O!==!0&&t&&t.list[j.toLowerCase()]&&t.get(this._parts.hostname)||j}else{var P;if(_)if(_.match(/[^a-zA-Z0-9-]/))if(t&&t.is(_))P=new RegExp(f(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(P,_);else throw new TypeError('TLD "'+_+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");P=new RegExp(f(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(P,_)}else throw new TypeError("cannot set TLD empty");return this.build(!O),this}},s.directory=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(_===void 0||_===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var M=this._parts.path.length-this.filename().length-1,j=this._parts.path.substring(0,M)||(this._parts.hostname?"/":"");return _?o.decodePath(j):j}else{var P=this._parts.path.length-this.filename().length,F=this._parts.path.substring(0,P),$=new RegExp("^"+f(F));return this.is("relative")||(_||(_="/"),_.charAt(0)!=="/"&&(_="/"+_)),_&&_.charAt(_.length-1)!=="/"&&(_+="/"),_=o.recodePath(_),this._parts.path=this._parts.path.replace($,_),this.build(!O),this}},s.filename=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(typeof _!="string"){if(!this._parts.path||this._parts.path==="/")return"";var M=this._parts.path.lastIndexOf("/"),j=this._parts.path.substring(M+1);return _?o.decodePathSegment(j):j}else{var P=!1;_.charAt(0)==="/"&&(_=_.substring(1)),_.match(/\.?\//)&&(P=!0);var F=new RegExp(f(this.filename())+"$");return _=o.recodePath(_),this._parts.path=this._parts.path.replace(F,_),P?this.normalizePath(O):this.build(!O),this}},s.suffix=function(_,O){if(this._parts.urn)return _===void 0?"":this;if(_===void 0||_===!0){if(!this._parts.path||this._parts.path==="/")return"";var M=this.filename(),j=M.lastIndexOf("."),P,F;return j===-1?"":(P=M.substring(j+1),F=/^[a-z0-9%]+$/i.test(P)?P:"",_?o.decodePathSegment(F):F)}else{_.charAt(0)==="."&&(_=_.substring(1));var $=this.suffix(),ee;if($)_?ee=new RegExp(f($)+"$"):ee=new RegExp(f("."+$)+"$");else{if(!_)return this;this._parts.path+="."+o.recodePath(_)}return ee&&(_=o.recodePath(_),this._parts.path=this._parts.path.replace(ee,_)),this.build(!O),this}},s.segment=function(_,O,M){var j=this._parts.urn?":":"/",P=this.path(),F=P.substring(0,1)==="/",$=P.split(j);if(_!==void 0&&typeof _!="number"&&(M=O,O=_,_=void 0),_!==void 0&&typeof _!="number")throw new Error('Bad segment "'+_+'", must be 0-based integer');if(F&&$.shift(),_<0&&(_=Math.max($.length+_,0)),O===void 0)return _===void 0?$:$[_];if(_===null||$[_]===void 0)if(h(O)){$=[];for(var ee=0,U=O.length;ee<U;ee++)!O[ee].length&&(!$.length||!$[$.length-1].length)||($.length&&!$[$.length-1].length&&$.pop(),$.push(b(O[ee])))}else(O||typeof O=="string")&&(O=b(O),$[$.length-1]===""?$[$.length-1]=O:$.push(O));else O?$[_]=b(O):$.splice(_,1);return F&&$.unshift(""),this.path($.join(j),M)},s.segmentCoded=function(_,O,M){var j,P,F;if(typeof _!="number"&&(M=O,O=_,_=void 0),O===void 0){if(j=this.segment(_,O,M),!h(j))j=j!==void 0?o.decode(j):void 0;else for(P=0,F=j.length;P<F;P++)j[P]=o.decode(j[P]);return j}if(!h(O))O=typeof O=="string"||O instanceof String?o.encode(O):O;else for(P=0,F=O.length;P<F;P++)O[P]=o.encode(O[P]);return this.segment(_,O,M)};var X=s.query;return s.query=function(_,O){if(_===!0)return o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof _=="function"){var M=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace),j=_.call(this,M);return this._parts.query=o.buildQuery(j||M,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!O),this}else return _!==void 0&&typeof _!="string"?(this._parts.query=o.buildQuery(_,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!O),this):X.call(this,_,O)},s.setQuery=function(_,O,M){var j=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof _=="string"||_ instanceof String)j[_]=O!==void 0?O:null;else if(typeof _=="object")for(var P in _)u.call(_,P)&&(j[P]=_[P]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=o.buildQuery(j,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof _!="string"&&(M=O),this.build(!M),this},s.addQuery=function(_,O,M){var j=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.addQuery(j,_,O===void 0?null:O),this._parts.query=o.buildQuery(j,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof _!="string"&&(M=O),this.build(!M),this},s.removeQuery=function(_,O,M){var j=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.removeQuery(j,_,O),this._parts.query=o.buildQuery(j,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof _!="string"&&(M=O),this.build(!M),this},s.hasQuery=function(_,O,M){var j=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.hasQuery(j,_,O,M)},s.setSearch=s.setQuery,s.addSearch=s.addQuery,s.removeSearch=s.removeQuery,s.hasSearch=s.hasQuery,s.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},s.normalizeProtocol=function(_){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!_)),this},s.normalizeHostname=function(_){return this._parts.hostname&&(this.is("IDN")&&r?this._parts.hostname=r.toASCII(this._parts.hostname):this.is("IPv6")&&e&&(this._parts.hostname=e.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!_)),this},s.normalizePort=function(_){return typeof this._parts.protocol=="string"&&this._parts.port===o.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!_)),this},s.normalizePath=function(_){var O=this._parts.path;if(!O)return this;if(this._parts.urn)return this._parts.path=o.recodeUrnPath(this._parts.path),this.build(!_),this;if(this._parts.path==="/")return this;O=o.recodePath(O);var M,j="",P,F;for(O.charAt(0)!=="/"&&(M=!0,O="/"+O),(O.slice(-3)==="/.."||O.slice(-2)==="/.")&&(O+="/"),O=O.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),M&&(j=O.substring(1).match(/^(\.\.\/)+/)||"",j&&(j=j[0]));P=O.search(/\/\.\.(\/|$)/),P!==-1;){if(P===0){O=O.substring(3);continue}F=O.substring(0,P).lastIndexOf("/"),F===-1&&(F=P),O=O.substring(0,F)+O.substring(P+3)}return M&&this.is("relative")&&(O=j+O.substring(1)),this._parts.path=O,this.build(!_),this},s.normalizePathname=s.normalizePath,s.normalizeQuery=function(_){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(o.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!_)),this},s.normalizeFragment=function(_){return this._parts.fragment||(this._parts.fragment=null,this.build(!_)),this},s.normalizeSearch=s.normalizeQuery,s.normalizeHash=s.normalizeFragment,s.iso8859=function(){var _=o.encode,O=o.decode;o.encode=escape,o.decode=decodeURIComponent;try{this.normalize()}finally{o.encode=_,o.decode=O}return this},s.unicode=function(){var _=o.encode,O=o.decode;o.encode=x,o.decode=unescape;try{this.normalize()}finally{o.encode=_,o.decode=O}return this},s.readable=function(){var _=this.clone();_.username("").password("").normalize();var O="";if(_._parts.protocol&&(O+=_._parts.protocol+"://"),_._parts.hostname&&(_.is("punycode")&&r?(O+=r.toUnicode(_._parts.hostname),_._parts.port&&(O+=":"+_._parts.port)):O+=_.host()),_._parts.hostname&&_._parts.path&&_._parts.path.charAt(0)!=="/"&&(O+="/"),O+=_.path(!0),_._parts.query){for(var M="",j=0,P=_._parts.query.split("&"),F=P.length;j<F;j++){var $=(P[j]||"").split("=");M+="&"+o.decodeQuery($[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),$[1]!==void 0&&(M+="="+o.decodeQuery($[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}O+="?"+M.substring(1)}return O+=o.decodeQuery(_.hash(),!0),O},s.absoluteTo=function(_){var O=this.clone(),M=["protocol","username","password","hostname","port"],j,P,F;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(_ instanceof o||(_=new o(_)),O._parts.protocol||(O._parts.protocol=_._parts.protocol,this._parts.hostname))return O;for(P=0;F=M[P];P++)O._parts[F]=_._parts[F];return O._parts.path?(O._parts.path.substring(-2)===".."&&(O._parts.path+="/"),O.path().charAt(0)!=="/"&&(j=_.directory(),j=j||(_.path().indexOf("/")===0?"/":""),O._parts.path=(j?j+"/":"")+O._parts.path,O.normalizePath())):(O._parts.path=_._parts.path,O._parts.query||(O._parts.query=_._parts.query)),O.build(),O},s.relativeTo=function(_){var O=this.clone().normalize(),M,j,P,F,$;if(O._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(_=new o(_).normalize(),M=O._parts,j=_._parts,F=O.path(),$=_.path(),F.charAt(0)!=="/")throw new Error("URI is already relative");if($.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if(M.protocol===j.protocol&&(M.protocol=null),M.username!==j.username||M.password!==j.password||M.protocol!==null||M.username!==null||M.password!==null)return O.build();if(M.hostname===j.hostname&&M.port===j.port)M.hostname=null,M.port=null;else return O.build();if(F===$)return M.path="",O.build();if(P=o.commonPath(F,$),!P)return O.build();var ee=j.path.substring(P.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return M.path=ee+M.path.substring(P.length)||"./",O.build()},s.equals=function(_){var O=this.clone(),M=new o(_),j={},P={},F={},$,ee,U;if(O.normalize(),M.normalize(),O.toString()===M.toString())return!0;if($=O.query(),ee=M.query(),O.query(""),M.query(""),O.toString()!==M.toString()||$.length!==ee.length)return!1;j=o.parseQuery($,this._parts.escapeQuerySpace),P=o.parseQuery(ee,this._parts.escapeQuerySpace);for(U in j)if(u.call(j,U)){if(h(j[U])){if(!y(j[U],P[U]))return!1}else if(j[U]!==P[U])return!1;F[U]=!0}for(U in P)if(u.call(P,U)&&!F[U])return!1;return!0},s.preventInvalidHostname=function(_){return this._parts.preventInvalidHostname=!!_,this},s.duplicateQueryParameters=function(_){return this._parts.duplicateQueryParameters=!!_,this},s.escapeQuerySpace=function(_){return this._parts.escapeQuerySpace=!!_,this},o})});var nM,go,bd=te(()=>{gr();nM=pr(zx()),go=class extends ht{uriParams(){return(0,nM.default)(window.location.toString()).query(!0)}viaResourceName(){return this.uriParams().via_resource_name}uriParam(r){return this.viaResourceName()?`${this.viaResourceName}_${r}`:r}b64EncodeUnicode(r){return btoa(encodeURIComponent(r).replace(/%([0-9A-F]{2})/g,(e,t)=>String.fromCharCode(`0x${t}`)))}b64DecodeUnicode(r){return decodeURIComponent(atob(r).split("").map(e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""))}changeFilter(){let r=this.getFilterValue(),e=this.getFilterClass(),t=this.uriParams()[this.uriParam("filters")];t?t=JSON.parse(this.b64DecodeUnicode(t)):t={},t[e]=r;let n=Object.keys(t).filter(o=>t[o]!==null).reduce((o,a)=>(o[a]=t[a],o),{}),i;n&&Object.keys(n).length>0&&(i=this.b64EncodeUnicode(JSON.stringify(n))),this.navigateToURLWithFilters(i)}navigateToURLWithFilters(r){let e=new nM.default(this.urlRedirectTarget.href),t=Fs({},e.query(!0));r?t.filters=r:delete t.filters,e.query(t),this.urlRedirectTarget.href=e,this.urlRedirectTarget.click()}};ct(go,"targets",["urlRedirect"])});var Hx,WZ=te(()=>{bd();Hx=class extends go{getFilterValue(){let r={};return this.optionTargets.forEach(e=>{r[e.value]=e.checked}),r}getFilterClass(){let{filterClass:r}=this.optionTarget.dataset;return r}};ct(Hx,"targets",["option"])});var tr=V((iM,oM)=>{(function(r,e){typeof iM=="object"&&typeof oM<"u"?oM.exports=e():typeof define=="function"&&define.amd?define(e):(r=r||self,r.CodeMirror=e())})(iM,function(){"use strict";var r=navigator.userAgent,e=navigator.platform,t=/gecko\/\d/i.test(r),n=/MSIE \d/.test(r),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(r),o=/Edge\/(\d+)/.exec(r),a=n||i||o,s=a&&(n?document.documentMode||6:+(o||i)[1]),u=!o&&/WebKit\//.test(r),f=u&&/Qt\/\d+\.\d+/.test(r),c=!o&&/Chrome\//.test(r),h=/Opera\//.test(r),p=/Apple Computer/.test(navigator.vendor),m=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(r),y=/PhantomJS/.test(r),b=p&&(/Mobile\/\w+/.test(r)||navigator.maxTouchPoints>2),k=/Android/.test(r),x=b||k||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(r),S=b||/Mac/.test(e),E=/\bCrOS\b/.test(r),C=/win/i.test(e),D=h&&r.match(/Version\/(\d*\.\d*)/);D&&(D=Number(D[1])),D&&D>=15&&(h=!1,u=!0);var T=S&&(f||h&&(D==null||D<12.11)),I=t||a&&s>=9;function q(l){return new RegExp("(^|\\s)"+l+"(?:$|\\s)\\s*")}var z=function(l,d){var v=l.className,g=q(d).exec(v);if(g){var w=v.slice(g.index+g[0].length);l.className=v.slice(0,g.index)+(w?g[1]+w:"")}};function Y(l){for(var d=l.childNodes.length;d>0;--d)l.removeChild(l.firstChild);return l}function X(l,d){return Y(l).appendChild(d)}function _(l,d,v,g){var w=document.createElement(l);if(v&&(w.className=v),g&&(w.style.cssText=g),typeof d=="string")w.appendChild(document.createTextNode(d));else if(d)for(var A=0;A<d.length;++A)w.appendChild(d[A]);return w}function O(l,d,v,g){var w=_(l,d,v,g);return w.setAttribute("role","presentation"),w}var M;document.createRange?M=function(l,d,v,g){var w=document.createRange();return w.setEnd(g||l,v),w.setStart(l,d),w}:M=function(l,d,v){var g=document.body.createTextRange();try{g.moveToElementText(l.parentNode)}catch{return g}return g.collapse(!0),g.moveEnd("character",v),g.moveStart("character",d),g};function j(l,d){if(d.nodeType==3&&(d=d.parentNode),l.contains)return l.contains(d);do if(d.nodeType==11&&(d=d.host),d==l)return!0;while(d=d.parentNode)}function P(){var l;try{l=document.activeElement}catch{l=document.body||null}for(;l&&l.shadowRoot&&l.shadowRoot.activeElement;)l=l.shadowRoot.activeElement;return l}function F(l,d){var v=l.className;q(d).test(v)||(l.className+=(v?" ":"")+d)}function $(l,d){for(var v=l.split(" "),g=0;g<v.length;g++)v[g]&&!q(v[g]).test(d)&&(d+=" "+v[g]);return d}var ee=function(l){l.select()};b?ee=function(l){l.selectionStart=0,l.selectionEnd=l.value.length}:a&&(ee=function(l){try{l.select()}catch{}});function U(l){var d=Array.prototype.slice.call(arguments,1);return function(){return l.apply(null,d)}}function H(l,d,v){d||(d={});for(var g in l)l.hasOwnProperty(g)&&(v!==!1||!d.hasOwnProperty(g))&&(d[g]=l[g]);return d}function he(l,d,v,g,w){d==null&&(d=l.search(/[^\s\u00a0]/),d==-1&&(d=l.length));for(var A=g||0,L=w||0;;){var B=l.indexOf(" ",A);if(B<0||B>=d)return L+(d-A);L+=B-A,L+=v-L%v,A=B+1}}var me=function(){this.id=null,this.f=null,this.time=0,this.handler=U(this.onTimeout,this)};me.prototype.onTimeout=function(l){l.id=0,l.time<=+new Date?l.f():setTimeout(l.handler,l.time-+new Date)},me.prototype.set=function(l,d){this.f=d;var v=+new Date+l;(!this.id||v<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,l),this.time=v)};function pe(l,d){for(var v=0;v<l.length;++v)if(l[v]==d)return v;return-1}var Ae=50,Ee={toString:function(){return"CodeMirror.Pass"}},We={scroll:!1},Te={origin:"*mouse"},je={origin:"+move"};function at(l,d,v){for(var g=0,w=0;;){var A=l.indexOf(" ",g);A==-1&&(A=l.length);var L=A-g;if(A==l.length||w+L>=d)return g+Math.min(L,d-w);if(w+=A-g,w+=v-w%v,g=A+1,w>=d)return g}}var st=[""];function Le(l){for(;st.length<=l;)st.push(we(st)+" ");return st[l]}function we(l){return l[l.length-1]}function xe(l,d){for(var v=[],g=0;g<l.length;g++)v[g]=d(l[g],g);return v}function le(l,d,v){for(var g=0,w=v(d);g<l.length&&v(l[g])<=w;)g++;l.splice(g,0,d)}function K(){}function Q(l,d){var v;return Object.create?v=Object.create(l):(K.prototype=l,v=new K),d&&H(d,v),v}var ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function lt(l){return/\w/.test(l)||l>"\x80"&&(l.toUpperCase()!=l.toLowerCase()||ie.test(l))}function ge(l,d){return d?d.source.indexOf("\\w")>-1&<(l)?!0:d.test(l):lt(l)}function Pe(l){for(var d in l)if(l.hasOwnProperty(d)&&l[d])return!1;return!0}var Ce=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function gt(l){return l.charCodeAt(0)>=768&&Ce.test(l)}function $e(l,d,v){for(;(v<0?d>0:d<l.length)&>(l.charAt(d));)d+=v;return d}function et(l,d,v){for(var g=d>v?-1:1;;){if(d==v)return d;var w=(d+v)/2,A=g<0?Math.ceil(w):Math.floor(w);if(A==d)return l(A)?d:v;l(A)?v=A:d=A+g}}function Ge(l,d,v,g){if(!l)return g(d,v,"ltr",0);for(var w=!1,A=0;A<l.length;++A){var L=l[A];(L.from<v&&L.to>d||d==v&&L.to==d)&&(g(Math.max(L.from,d),Math.min(L.to,v),L.level==1?"rtl":"ltr",A),w=!0)}w||g(d,v,"ltr")}var ce=null;function de(l,d,v){var g;ce=null;for(var w=0;w<l.length;++w){var A=l[w];if(A.from<d&&A.to>d)return w;A.to==d&&(A.from!=A.to&&v=="before"?g=w:ce=w),A.from==d&&(A.from!=A.to&&v!="before"?g=w:ce=w)}return g??ce}var Me=function(){var l="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",d="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function v(G){return G<=247?l.charAt(G):1424<=G&&G<=1524?"R":1536<=G&&G<=1785?d.charAt(G-1536):1774<=G&&G<=2220?"r":8192<=G&&G<=8203?"w":G==8204?"b":"L"}var g=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,w=/[stwN]/,A=/[LRr]/,L=/[Lb1n]/,B=/[1n]/;function W(G,ne,ae){this.level=G,this.from=ne,this.to=ae}return function(G,ne){var ae=ne=="ltr"?"L":"R";if(G.length==0||ne=="ltr"&&!g.test(G))return!1;for(var be=G.length,ve=[],De=0;De<be;++De)ve.push(v(G.charCodeAt(De)));for(var Re=0,He=ae;Re<be;++Re){var Ye=ve[Re];Ye=="m"?ve[Re]=He:He=Ye}for(var Je=0,Ke=ae;Je<be;++Je){var ot=ve[Je];ot=="1"&&Ke=="r"?ve[Je]="n":A.test(ot)&&(Ke=ot,ot=="r"&&(ve[Je]="R"))}for(var bt=1,pt=ve[0];bt<be-1;++bt){var Pt=ve[bt];Pt=="+"&&pt=="1"&&ve[bt+1]=="1"?ve[bt]="1":Pt==","&&pt==ve[bt+1]&&(pt=="1"||pt=="n")&&(ve[bt]=pt),pt=Pt}for(var hr=0;hr<be;++hr){var cn=ve[hr];if(cn==",")ve[hr]="N";else if(cn=="%"){var Or=void 0;for(Or=hr+1;Or<be&&ve[Or]=="%";++Or);for(var gi=hr&&ve[hr-1]=="!"||Or<be&&ve[Or]=="1"?"1":"N",ti=hr;ti<Or;++ti)ve[ti]=gi;hr=Or-1}}for(var $r=0,ri=ae;$r<be;++$r){var xn=ve[$r];ri=="L"&&xn=="1"?ve[$r]="L":A.test(xn)&&(ri=xn)}for(var Zr=0;Zr<be;++Zr)if(w.test(ve[Zr])){var Yr=void 0;for(Yr=Zr+1;Yr<be&&w.test(ve[Yr]);++Yr);for(var Lr=(Zr?ve[Zr-1]:ae)=="L",ni=(Yr<be?ve[Yr]:ae)=="L",Dc=Lr==ni?Lr?"L":"R":ae,Rs=Zr;Rs<Yr;++Rs)ve[Rs]=Dc;Zr=Yr-1}for(var On=[],Qo,fn=0;fn<be;)if(L.test(ve[fn])){var vS=fn;for(++fn;fn<be&&L.test(ve[fn]);++fn);On.push(new W(0,vS,fn))}else{var Na=fn,Vl=On.length,$l=ne=="rtl"?1:0;for(++fn;fn<be&&ve[fn]!="L";++fn);for(var Hn=Na;Hn<fn;)if(B.test(ve[Hn])){Na<Hn&&(On.splice(Vl,0,new W(1,Na,Hn)),Vl+=$l);var Oc=Hn;for(++Hn;Hn<fn&&B.test(ve[Hn]);++Hn);On.splice(Vl,0,new W(2,Oc,Hn)),Vl+=$l,Na=Hn}else++Hn;Na<fn&&On.splice(Vl,0,new W(1,Na,fn))}return ne=="ltr"&&(On[0].level==1&&(Qo=G.match(/^\s+/))&&(On[0].from=Qo[0].length,On.unshift(new W(0,0,Qo[0].length))),we(On).level==1&&(Qo=G.match(/\s+$/))&&(we(On).to-=Qo[0].length,On.push(new W(0,be-Qo[0].length,be)))),ne=="rtl"?On.reverse():On}}();function nt(l,d){var v=l.order;return v==null&&(v=l.order=Me(l.text,d)),v}var wr=[],tt=function(l,d,v){if(l.addEventListener)l.addEventListener(d,v,!1);else if(l.attachEvent)l.attachEvent("on"+d,v);else{var g=l._handlers||(l._handlers={});g[d]=(g[d]||wr).concat(v)}};function qt(l,d){return l._handlers&&l._handlers[d]||wr}function _e(l,d,v){if(l.removeEventListener)l.removeEventListener(d,v,!1);else if(l.detachEvent)l.detachEvent("on"+d,v);else{var g=l._handlers,w=g&&g[d];if(w){var A=pe(w,v);A>-1&&(g[d]=w.slice(0,A).concat(w.slice(A+1)))}}}function Be(l,d){var v=qt(l,d);if(!!v.length)for(var g=Array.prototype.slice.call(arguments,2),w=0;w<v.length;++w)v[w].apply(null,g)}function Xe(l,d,v){return typeof d=="string"&&(d={type:d,preventDefault:function(){this.defaultPrevented=!0}}),Be(l,v||d.type,l,d),re(d)||d.codemirrorIgnore}function Ot(l){var d=l._handlers&&l._handlers.cursorActivity;if(!!d)for(var v=l.curOp.cursorActivityHandlers||(l.curOp.cursorActivityHandlers=[]),g=0;g<d.length;++g)pe(v,d[g])==-1&&v.push(d[g])}function xt(l,d){return qt(l,d).length>0}function It(l){l.prototype.on=function(d,v){tt(this,d,v)},l.prototype.off=function(d,v){_e(this,d,v)}}function Ft(l){l.preventDefault?l.preventDefault():l.returnValue=!1}function an(l){l.stopPropagation?l.stopPropagation():l.cancelBubble=!0}function re(l){return l.defaultPrevented!=null?l.defaultPrevented:l.returnValue==!1}function oe(l){Ft(l),an(l)}function ye(l){return l.target||l.srcElement}function Oe(l){var d=l.which;return d==null&&(l.button&1?d=1:l.button&2?d=3:l.button&4&&(d=2)),S&&l.ctrlKey&&d==1&&(d=3),d}var Ve=function(){if(a&&s<9)return!1;var l=_("div");return"draggable"in l||"dragDrop"in l}(),Fe;function ut(l){if(Fe==null){var d=_("span","\u200B");X(l,_("span",[d,document.createTextNode("x")])),l.firstChild.offsetHeight!=0&&(Fe=d.offsetWidth<=1&&d.offsetHeight>2&&!(a&&s<8))}var v=Fe?_("span","\u200B"):_("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return v.setAttribute("cm-text",""),v}var it;function Tt(l){if(it!=null)return it;var d=X(l,document.createTextNode("A\u062EA")),v=M(d,0,1).getBoundingClientRect(),g=M(d,1,2).getBoundingClientRect();return Y(l),!v||v.left==v.right?!1:it=g.right-v.right<3}var Dt=`
|
43
43
|
|
44
44
|
b`.split(/\n/).length!=3?function(l){for(var d=0,v=[],g=l.length;d<=g;){var w=l.indexOf(`
|
45
45
|
`,d);w==-1&&(w=l.length);var A=l.slice(d,l.charAt(w-1)=="\r"?w-1:w),L=A.indexOf("\r");L!=-1?(v.push(A.slice(0,L)),d+=L+1):(v.push(A),d=w+1)}return v}:function(l){return l.split(/\r\n?|\n/)},zt=window.getSelection?function(l){try{return l.selectionStart!=l.selectionEnd}catch{return!1}}:function(l){var d;try{d=l.ownerDocument.selection.createRange()}catch{}return!d||d.parentElement()!=l?!1:d.compareEndPoints("StartToEnd",d)!=0},_r=function(){var l=_("div");return"oncopy"in l?!0:(l.setAttribute("oncopy","return;"),typeof l.oncopy=="function")}(),ur=null;function Pi(l){if(ur!=null)return ur;var d=X(l,_("span","x")),v=d.getBoundingClientRect(),g=M(d,0,1).getBoundingClientRect();return ur=Math.abs(v.left-g.left)>1}var cr={},yn={};function Zn(l,d){arguments.length>2&&(d.dependencies=Array.prototype.slice.call(arguments,2)),cr[l]=d}function Fn(l,d){yn[l]=d}function Tr(l){if(typeof l=="string"&&yn.hasOwnProperty(l))l=yn[l];else if(l&&typeof l.name=="string"&&yn.hasOwnProperty(l.name)){var d=yn[l.name];typeof d=="string"&&(d={name:d}),l=Q(d,l),l.name=d.name}else{if(typeof l=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(l))return Tr("application/xml");if(typeof l=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(l))return Tr("application/json")}return typeof l=="string"?{name:l}:l||{name:"null"}}function Xi(l,d){d=Tr(d);var v=cr[d.name];if(!v)return Xi(l,"text/plain");var g=v(l,d);if(Nn.hasOwnProperty(d.name)){var w=Nn[d.name];for(var A in w)!w.hasOwnProperty(A)||(g.hasOwnProperty(A)&&(g["_"+A]=g[A]),g[A]=w[A])}if(g.name=d.name,d.helperType&&(g.helperType=d.helperType),d.modeProps)for(var L in d.modeProps)g[L]=d.modeProps[L];return g}var Nn={};function _s(l,d){var v=Nn.hasOwnProperty(l)?Nn[l]:Nn[l]={};H(d,v)}function Li(l,d){if(d===!0)return d;if(l.copyState)return l.copyState(d);var v={};for(var g in d){var w=d[g];w instanceof Array&&(w=w.concat([])),v[g]=w}return v}function Qi(l,d){for(var v;l.innerMode&&(v=l.innerMode(d),!(!v||v.mode==l));)d=v.state,l=v.mode;return v||{mode:l,state:d}}function Xt(l,d,v){return l.startState?l.startState(d,v):!0}var Sr=function(l,d,v){this.pos=this.start=0,this.string=l,this.tabSize=d||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=v};Sr.prototype.eol=function(){return this.pos>=this.string.length},Sr.prototype.sol=function(){return this.pos==this.lineStart},Sr.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Sr.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Sr.prototype.eat=function(l){var d=this.string.charAt(this.pos),v;if(typeof l=="string"?v=d==l:v=d&&(l.test?l.test(d):l(d)),v)return++this.pos,d},Sr.prototype.eatWhile=function(l){for(var d=this.pos;this.eat(l););return this.pos>d},Sr.prototype.eatSpace=function(){for(var l=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>l},Sr.prototype.skipToEnd=function(){this.pos=this.string.length},Sr.prototype.skipTo=function(l){var d=this.string.indexOf(l,this.pos);if(d>-1)return this.pos=d,!0},Sr.prototype.backUp=function(l){this.pos-=l},Sr.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=he(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?he(this.string,this.lineStart,this.tabSize):0)},Sr.prototype.indentation=function(){return he(this.string,null,this.tabSize)-(this.lineStart?he(this.string,this.lineStart,this.tabSize):0)},Sr.prototype.match=function(l,d,v){if(typeof l=="string"){var g=function(L){return v?L.toLowerCase():L},w=this.string.substr(this.pos,l.length);if(g(w)==g(l))return d!==!1&&(this.pos+=l.length),!0}else{var A=this.string.slice(this.pos).match(l);return A&&A.index>0?null:(A&&d!==!1&&(this.pos+=A[0].length),A)}},Sr.prototype.current=function(){return this.string.slice(this.start,this.pos)},Sr.prototype.hideFirstChars=function(l,d){this.lineStart+=l;try{return d()}finally{this.lineStart-=l}},Sr.prototype.lookAhead=function(l){var d=this.lineOracle;return d&&d.lookAhead(l)},Sr.prototype.baseToken=function(){var l=this.lineOracle;return l&&l.baseToken(this.pos)};function ft(l,d){if(d-=l.first,d<0||d>=l.size)throw new Error("There is no line "+(d+l.first)+" in the document.");for(var v=l;!v.lines;)for(var g=0;;++g){var w=v.children[g],A=w.chunkSize();if(d<A){v=w;break}d-=A}return v.lines[d]}function _o(l,d,v){var g=[],w=d.line;return l.iter(d.line,v.line+1,function(A){var L=A.text;w==v.line&&(L=L.slice(0,v.ch)),w==d.line&&(L=L.slice(d.ch)),g.push(L),++w}),g}function Ss(l,d,v){var g=[];return l.iter(d,v,function(w){g.push(w.text)}),g}function di(l,d){var v=d-l.height;if(v)for(var g=l;g;g=g.parent)g.height+=v}function $t(l){if(l.parent==null)return null;for(var d=l.parent,v=pe(d.lines,l),g=d.parent;g;d=g,g=g.parent)for(var w=0;g.children[w]!=d;++w)v+=g.children[w].chunkSize();return v+d.first}function Zi(l,d){var v=l.first;e:do{for(var g=0;g<l.children.length;++g){var w=l.children[g],A=w.height;if(d<A){l=w;continue e}d-=A,v+=w.chunkSize()}return v}while(!l.lines);for(var L=0;L<l.lines.length;++L){var B=l.lines[L],W=B.height;if(d<W)break;d-=W}return v+L}function Z(l,d){return d>=l.first&&d<l.first+l.size}function ue(l,d){return String(l.lineNumberFormatter(d+l.firstLineNumber))}function fe(l,d,v){if(v===void 0&&(v=null),!(this instanceof fe))return new fe(l,d,v);this.line=l,this.ch=d,this.sticky=v}function N(l,d){return l.line-d.line||l.ch-d.ch}function R(l,d){return l.sticky==d.sticky&&N(l,d)==0}function J(l){return fe(l.line,l.ch)}function se(l,d){return N(l,d)<0?d:l}function Se(l,d){return N(l,d)<0?l:d}function Ie(l,d){return Math.max(l.first,Math.min(d,l.first+l.size-1))}function Ne(l,d){if(d.line<l.first)return fe(l.first,0);var v=l.first+l.size-1;return d.line>v?fe(v,ft(l,v).text.length):wt(d,ft(l,d.line).text.length)}function wt(l,d){var v=l.ch;return v==null||v>d?fe(l.line,d):v<0?fe(l.line,0):l}function _t(l,d){for(var v=[],g=0;g<d.length;g++)v[g]=Ne(l,d[g]);return v}var Et=function(l,d){this.state=l,this.lookAhead=d},Ct=function(l,d,v,g){this.state=d,this.doc=l,this.line=v,this.maxLookAhead=g||0,this.baseTokens=null,this.baseTokenPos=1};Ct.prototype.lookAhead=function(l){var d=this.doc.getLine(this.line+l);return d!=null&&l>this.maxLookAhead&&(this.maxLookAhead=l),d},Ct.prototype.baseToken=function(l){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=l;)this.baseTokenPos+=2;var d=this.baseTokens[this.baseTokenPos+1];return{type:d&&d.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-l}},Ct.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Ct.fromSaved=function(l,d,v){return d instanceof Et?new Ct(l,Li(l.mode,d.state),v,d.lookAhead):new Ct(l,Li(l.mode,d),v)},Ct.prototype.save=function(l){var d=l!==!1?Li(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Et(d,this.maxLookAhead):d};function Dr(l,d,v,g){var w=[l.state.modeGen],A={};jn(l,d.text,l.doc.mode,v,function(G,ne){return w.push(G,ne)},A,g);for(var L=v.state,B=function(G){v.baseTokens=w;var ne=l.state.overlays[G],ae=1,be=0;v.state=!0,jn(l,d.text,ne.mode,v,function(ve,De){for(var Re=ae;be<ve;){var He=w[ae];He>ve&&w.splice(ae,1,ve,w[ae+1],He),ae+=2,be=Math.min(ve,He)}if(!!De)if(ne.opaque)w.splice(Re,ae-Re,ve,"overlay "+De),ae=Re+2;else for(;Re<ae;Re+=2){var Ye=w[Re+1];w[Re+1]=(Ye?Ye+" ":"")+"overlay "+De}},A),v.state=L,v.baseTokens=null,v.baseTokenPos=1},W=0;W<l.state.overlays.length;++W)B(W);return{styles:w,classes:A.bgClass||A.textClass?A:null}}function kt(l,d,v){if(!d.styles||d.styles[0]!=l.state.modeGen){var g=Rt(l,$t(d)),w=d.text.length>l.options.maxHighlightLength&&Li(l.doc.mode,g.state),A=Dr(l,d,g);w&&(g.state=w),d.stateAfter=g.save(!w),d.styles=A.styles,A.classes?d.styleClasses=A.classes:d.styleClasses&&(d.styleClasses=null),v===l.doc.highlightFrontier&&(l.doc.modeFrontier=Math.max(l.doc.modeFrontier,++l.doc.highlightFrontier))}return d.styles}function Rt(l,d,v){var g=l.doc,w=l.display;if(!g.mode.startState)return new Ct(g,!0,d);var A=ac(l,d,v),L=A>g.first&&ft(g,A-1).stateAfter,B=L?Ct.fromSaved(g,L,A):new Ct(g,Xt(g.mode),A);return g.iter(A,d,function(W){hi(l,W.text,B);var G=B.line;W.stateAfter=G==d-1||G%5==0||G>=w.viewFrom&&G<w.viewTo?B.save():null,B.nextLine()}),v&&(g.modeFrontier=B.line),B}function hi(l,d,v,g){var w=l.doc.mode,A=new Sr(d,l.options.tabSize,v);for(A.start=A.pos=g||0,d==""&&oc(w,v.state);!A.eol();)Pl(w,A,v.state),A.start=A.pos}function oc(l,d){if(l.blankLine)return l.blankLine(d);if(!!l.innerMode){var v=Qi(l,d);if(v.mode.blankLine)return v.mode.blankLine(v.state)}}function Pl(l,d,v,g){for(var w=0;w<10;w++){g&&(g[0]=Qi(l,v).mode);var A=l.token(d,v);if(d.pos>d.start)return A}throw new Error("Mode "+l.name+" failed to advance stream.")}var Ll=function(l,d,v){this.start=l.start,this.end=l.pos,this.string=l.current(),this.type=d||null,this.state=v};function Pr(l,d,v,g){var w=l.doc,A=w.mode,L;d=Ne(w,d);var B=ft(w,d.line),W=Rt(l,d.line,v),G=new Sr(B.text,l.options.tabSize,W),ne;for(g&&(ne=[]);(g||G.pos<d.ch)&&!G.eol();)G.start=G.pos,L=Pl(A,G,W.state),g&&ne.push(new Ll(G,L,Li(w.mode,W.state)));return g?ne:new Ll(G,L,W.state)}function Bn(l,d){if(l)for(;;){var v=l.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!v)break;l=l.slice(0,v.index)+l.slice(v.index+v[0].length);var g=v[1]?"bgClass":"textClass";d[g]==null?d[g]=v[2]:new RegExp("(?:^|\\s)"+v[2]+"(?:$|\\s)").test(d[g])||(d[g]+=" "+v[2])}return l}function jn(l,d,v,g,w,A,L){var B=v.flattenSpans;B==null&&(B=l.options.flattenSpans);var W=0,G=null,ne=new Sr(d,l.options.tabSize,g),ae,be=l.options.addModeClass&&[null];for(d==""&&Bn(oc(v,g.state),A);!ne.eol();){if(ne.pos>l.options.maxHighlightLength?(B=!1,L&&hi(l,d,g,ne.pos),ne.pos=d.length,ae=null):ae=Bn(Pl(v,ne,g.state,be),A),be){var ve=be[0].name;ve&&(ae="m-"+(ae?ve+" "+ae:ve))}if(!B||G!=ae){for(;W<ne.start;)W=Math.min(ne.start,W+5e3),w(W,G);G=ae}ne.start=ne.pos}for(;W<ne.pos;){var De=Math.min(ne.pos,W+5e3);w(De,G),W=De}}function ac(l,d,v){for(var g,w,A=l.doc,L=v?-1:d-(l.doc.mode.innerMode?1e3:100),B=d;B>L;--B){if(B<=A.first)return A.first;var W=ft(A,B-1),G=W.stateAfter;if(G&&(!v||B+(G instanceof Et?G.lookAhead:0)<=A.modeFrontier))return B;var ne=he(W.text,null,l.options.tabSize);(w==null||g>ne)&&(w=B-1,g=ne)}return w}function ks(l,d){if(l.modeFrontier=Math.min(l.modeFrontier,d),!(l.highlightFrontier<d-10)){for(var v=l.first,g=d-1;g>v;g--){var w=ft(l,g).stateAfter;if(w&&(!(w instanceof Et)||g+w.lookAhead<d)){v=g+1;break}}l.highlightFrontier=Math.min(l.highlightFrontier,v)}}var Es=!1,pi=!1;function ql(){Es=!0}function Ji(){pi=!0}function Ma(l,d,v){this.marker=l,this.from=d,this.to=v}function Ia(l,d){if(l)for(var v=0;v<l.length;++v){var g=l[v];if(g.marker==d)return g}}function Rl(l,d){for(var v,g=0;g<l.length;++g)l[g]!=d&&(v||(v=[])).push(l[g]);return v}function Pg(l,d){l.markedSpans=l.markedSpans?l.markedSpans.concat([d]):[d],d.marker.attachLine(l)}function Cs(l,d,v){var g;if(l)for(var w=0;w<l.length;++w){var A=l[w],L=A.marker,B=A.from==null||(L.inclusiveLeft?A.from<=d:A.from<d);if(B||A.from==d&&L.type=="bookmark"&&(!v||!A.marker.insertLeft)){var W=A.to==null||(L.inclusiveRight?A.to>=d:A.to>d);(g||(g=[])).push(new Ma(L,A.from,W?null:A.to))}}return g}function Hd(l,d,v){var g;if(l)for(var w=0;w<l.length;++w){var A=l[w],L=A.marker,B=A.to==null||(L.inclusiveRight?A.to>=d:A.to>d);if(B||A.from==d&&L.type=="bookmark"&&(!v||A.marker.insertLeft)){var W=A.from==null||(L.inclusiveLeft?A.from<=d:A.from<d);(g||(g=[])).push(new Ma(L,W?null:A.from-d,A.to==null?null:A.to-d))}}return g}function eo(l,d){if(d.full)return null;var v=Z(l,d.from.line)&&ft(l,d.from.line).markedSpans,g=Z(l,d.to.line)&&ft(l,d.to.line).markedSpans;if(!v&&!g)return null;var w=d.from.ch,A=d.to.ch,L=N(d.from,d.to)==0,B=Cs(v,w,L),W=Hd(g,A,L),G=d.text.length==1,ne=we(d.text).length+(G?w:0);if(B)for(var ae=0;ae<B.length;++ae){var be=B[ae];if(be.to==null){var ve=Ia(W,be.marker);ve?G&&(be.to=ve.to==null?null:ve.to+ne):be.to=w}}if(W)for(var De=0;De<W.length;++De){var Re=W[De];if(Re.to!=null&&(Re.to+=ne),Re.from==null){var He=Ia(B,Re.marker);He||(Re.from=ne,G&&(B||(B=[])).push(Re))}else Re.from+=ne,G&&(B||(B=[])).push(Re)}B&&(B=Pa(B)),W&&W!=B&&(W=Pa(W));var Ye=[B];if(!G){var Je=d.text.length-2,Ke;if(Je>0&&B)for(var ot=0;ot<B.length;++ot)B[ot].to==null&&(Ke||(Ke=[])).push(new Ma(B[ot].marker,null,null));for(var bt=0;bt<Je;++bt)Ye.push(Ke);Ye.push(W)}return Ye}function Pa(l){for(var d=0;d<l.length;++d){var v=l[d];v.from!=null&&v.from==v.to&&v.marker.clearWhenEmpty!==!1&&l.splice(d--,1)}return l.length?l:null}function sc(l,d,v){var g=null;if(l.iter(d.line,v.line+1,function(ve){if(ve.markedSpans)for(var De=0;De<ve.markedSpans.length;++De){var Re=ve.markedSpans[De].marker;Re.readOnly&&(!g||pe(g,Re)==-1)&&(g||(g=[])).push(Re)}}),!g)return null;for(var w=[{from:d,to:v}],A=0;A<g.length;++A)for(var L=g[A],B=L.find(0),W=0;W<w.length;++W){var G=w[W];if(!(N(G.to,B.from)<0||N(G.from,B.to)>0)){var ne=[W,1],ae=N(G.from,B.from),be=N(G.to,B.to);(ae<0||!L.inclusiveLeft&&!ae)&&ne.push({from:G.from,to:B.from}),(be>0||!L.inclusiveRight&&!be)&&ne.push({from:B.to,to:G.to}),w.splice.apply(w,ne),W+=ne.length-3}}return w}function Vr(l){var d=l.markedSpans;if(!!d){for(var v=0;v<d.length;++v)d[v].marker.detachLine(l);l.markedSpans=null}}function Wd(l,d){if(!!d){for(var v=0;v<d.length;++v)d[v].marker.attachLine(l);l.markedSpans=d}}function lc(l){return l.inclusiveLeft?-1:0}function uc(l){return l.inclusiveRight?1:0}function to(l,d){var v=l.lines.length-d.lines.length;if(v!=0)return v;var g=l.find(),w=d.find(),A=N(g.from,w.from)||lc(l)-lc(d);if(A)return-A;var L=N(g.to,w.to)||uc(l)-uc(d);return L||d.id-l.id}function So(l,d){var v=pi&&l.markedSpans,g;if(v)for(var w=void 0,A=0;A<v.length;++A)w=v[A],w.marker.collapsed&&(d?w.from:w.to)==null&&(!g||to(g,w.marker)<0)&&(g=w.marker);return g}function cc(l){return So(l,!0)}function As(l){return So(l,!1)}function fc(l,d){var v=pi&&l.markedSpans,g;if(v)for(var w=0;w<v.length;++w){var A=v[w];A.marker.collapsed&&(A.from==null||A.from<d)&&(A.to==null||A.to>d)&&(!g||to(g,A.marker)<0)&&(g=A.marker)}return g}function La(l,d,v,g,w){var A=ft(l,d),L=pi&&A.markedSpans;if(L)for(var B=0;B<L.length;++B){var W=L[B];if(!!W.marker.collapsed){var G=W.marker.find(0),ne=N(G.from,v)||lc(W.marker)-lc(w),ae=N(G.to,g)||uc(W.marker)-uc(w);if(!(ne>=0&&ae<=0||ne<=0&&ae>=0)&&(ne<=0&&(W.marker.inclusiveRight&&w.inclusiveLeft?N(G.to,v)>=0:N(G.to,v)>0)||ne>=0&&(W.marker.inclusiveRight&&w.inclusiveLeft?N(G.from,g)<=0:N(G.from,g)<0)))return!0}}}function sn(l){for(var d;d=cc(l);)l=d.find(-1,!0).line;return l}function Lg(l){for(var d;d=As(l);)l=d.find(1,!0).line;return l}function Ud(l){for(var d,v;d=As(l);)l=d.find(1,!0).line,(v||(v=[])).push(l);return v}function Vd(l,d){var v=ft(l,d),g=sn(v);return v==g?d:$t(g)}function JI(l,d){if(d>l.lastLine())return d;var v=ft(l,d),g;if(!Ts(l,v))return d;for(;g=As(v);)v=g.find(1,!0).line;return $t(v)+1}function Ts(l,d){var v=pi&&d.markedSpans;if(v){for(var g=void 0,w=0;w<v.length;++w)if(g=v[w],!!g.marker.collapsed){if(g.from==null)return!0;if(!g.marker.widgetNode&&g.from==0&&g.marker.inclusiveLeft&&I_(l,d,g))return!0}}}function I_(l,d,v){if(v.to==null){var g=v.marker.find(1,!0);return I_(l,g.line,Ia(g.line.markedSpans,v.marker))}if(v.marker.inclusiveRight&&v.to==d.text.length)return!0;for(var w=void 0,A=0;A<d.markedSpans.length;++A)if(w=d.markedSpans[A],w.marker.collapsed&&!w.marker.widgetNode&&w.from==v.to&&(w.to==null||w.to!=v.from)&&(w.marker.inclusiveLeft||v.marker.inclusiveRight)&&I_(l,d,w))return!0}function qa(l){l=sn(l);for(var d=0,v=l.parent,g=0;g<v.lines.length;++g){var w=v.lines[g];if(w==l)break;d+=w.height}for(var A=v.parent;A;v=A,A=v.parent)for(var L=0;L<A.children.length;++L){var B=A.children[L];if(B==v)break;d+=B.height}return d}function qg(l){if(l.height==0)return 0;for(var d=l.text.length,v,g=l;v=cc(g);){var w=v.find(0,!0);g=w.from.line,d+=w.from.ch-w.to.ch}for(g=l;v=As(g);){var A=v.find(0,!0);d-=g.text.length-A.from.ch,g=A.to.line,d+=g.text.length-A.to.ch}return d}function P_(l){var d=l.display,v=l.doc;d.maxLine=ft(v,v.first),d.maxLineLength=qg(d.maxLine),d.maxLineChanged=!0,v.iter(function(g){var w=qg(g);w>d.maxLineLength&&(d.maxLineLength=w,d.maxLine=g)})}var dc=function(l,d,v){this.text=l,Wd(this,d),this.height=v?v(this):1};dc.prototype.lineNo=function(){return $t(this)},It(dc);function sae(l,d,v,g){l.text=d,l.stateAfter&&(l.stateAfter=null),l.styles&&(l.styles=null),l.order!=null&&(l.order=null),Vr(l),Wd(l,v);var w=g?g(l):1;w!=l.height&&di(l,w)}function lae(l){l.parent=null,Vr(l)}var uae={},cae={};function eP(l,d){if(!l||/^\s*$/.test(l))return null;var v=d.addModeClass?cae:uae;return v[l]||(v[l]=l.replace(/\S+/g,"cm-$&"))}function tP(l,d){var v=O("span",null,null,u?"padding-right: .1px":null),g={pre:O("pre",[v],"CodeMirror-line"),content:v,col:0,pos:0,cm:l,trailingSpace:!1,splitSpaces:l.getOption("lineWrapping")};d.measure={};for(var w=0;w<=(d.rest?d.rest.length:0);w++){var A=w?d.rest[w-1]:d.line,L=void 0;g.pos=0,g.addToken=dae,Tt(l.display.measure)&&(L=nt(A,l.doc.direction))&&(g.addToken=pae(g.addToken,L)),g.map=[];var B=d!=l.display.externalMeasured&&$t(A);mae(A,g,kt(l,A,B)),A.styleClasses&&(A.styleClasses.bgClass&&(g.bgClass=$(A.styleClasses.bgClass,g.bgClass||"")),A.styleClasses.textClass&&(g.textClass=$(A.styleClasses.textClass,g.textClass||""))),g.map.length==0&&g.map.push(0,0,g.content.appendChild(ut(l.display.measure))),w==0?(d.measure.map=g.map,d.measure.cache={}):((d.measure.maps||(d.measure.maps=[])).push(g.map),(d.measure.caches||(d.measure.caches=[])).push({}))}if(u){var W=g.content.lastChild;(/\bcm-tab\b/.test(W.className)||W.querySelector&&W.querySelector(".cm-tab"))&&(g.content.className="cm-tab-wrap-hack")}return Be(l,"renderLine",l,d.line,g.pre),g.pre.className&&(g.textClass=$(g.pre.className,g.textClass||"")),g}function fae(l){var d=_("span","\u2022","cm-invalidchar");return d.title="\\u"+l.charCodeAt(0).toString(16),d.setAttribute("aria-label",d.title),d}function dae(l,d,v,g,w,A,L){if(!!d){var B=l.splitSpaces?hae(d,l.trailingSpace):d,W=l.cm.state.specialChars,G=!1,ne;if(!W.test(d))l.col+=d.length,ne=document.createTextNode(B),l.map.push(l.pos,l.pos+d.length,ne),a&&s<9&&(G=!0),l.pos+=d.length;else{ne=document.createDocumentFragment();for(var ae=0;;){W.lastIndex=ae;var be=W.exec(d),ve=be?be.index-ae:d.length-ae;if(ve){var De=document.createTextNode(B.slice(ae,ae+ve));a&&s<9?ne.appendChild(_("span",[De])):ne.appendChild(De),l.map.push(l.pos,l.pos+ve,De),l.col+=ve,l.pos+=ve}if(!be)break;ae+=ve+1;var Re=void 0;if(be[0]==" "){var He=l.cm.options.tabSize,Ye=He-l.col%He;Re=ne.appendChild(_("span",Le(Ye),"cm-tab")),Re.setAttribute("role","presentation"),Re.setAttribute("cm-text"," "),l.col+=Ye}else be[0]=="\r"||be[0]==`
|
@@ -91,7 +91,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
91
91
|
/>`}setOptions(){let r;try{r=JSON.parse(this.controllerTarget.dataset.options)}catch(e){r={}}this.options=Mc(Fs({},r),{inputClasses:this.controllerTarget.dataset.inputClasses,editable:Kn(this.controllerTarget.dataset.editable)})}};ct(bw,"targets",["input","controller","rows"])});var oI,_te=te(()=>{gr();oI=class extends ht{constructor(){super(...arguments);ct(this,"spinnerMarkup",`<div class="button-spinner">
|
92
92
|
<div class="double-bounce1"></div>
|
93
93
|
<div class="double-bounce2"></div>
|
94
|
-
</div>`);ct(this,"confirmed",!1)}connect(){this.context.scope.element.addEventListener("click",r=>{this.confirmationMessage?this.confirmed||(r.preventDefault(),window.confirm(this.confirmationMessage)&&this.applyLoader()):this.applyLoader()})}get button(){return this.context.scope.element}get confirmationMessage(){return this.context.scope.element.getAttribute("data-avo-confirm")}applyLoader(){let{button:r}=this;r.style.width=`${r.getBoundingClientRect().width}px`,r.style.height=`${r.getBoundingClientRect().height}px`,r.innerHTML=this.spinnerMarkup,r.classList.add("justify-center"),setTimeout(()=>{this.markConfirmed(),r.click(),r.setAttribute("disabled","disabled")},1)}markConfirmed(){this.confirmed=!0}markUnconfirmed(){this.confirmed=!1}}});var xw,Ste=te(()=>{gr();xw=class extends ht{constructor(){super(...arguments);ct(this,"collapsed",!0)}get key(){return this.selfTarget.getAttribute("data-menu-key-param")}get defaultState(){return this.selfTarget.getAttribute("data-menu-default-collapsed-state")}get userState(){return window.localStorage.getItem(this.key)}set userState(r){window.localStorage.setItem(this.key,r)}get initiallyCollapsed(){return this.userState==="collapsed"||this.defaultState==="collapsed"?!0:(this.userState==="expanded"||this.defaultState==="expanded",!1)}connect(){this.initiallyCollapsed?(this.collapsed=!0,this.markCollapsed()):(this.collapsed=!1,this.markExpanded())}triggerCollapse(){this.collapsed=!this.collapsed,this.userState=this.collapsed?"collapsed":"expanded",this.updateDom()}updateDom(){this.collapsed?this.markCollapsed():this.markExpanded()}markCollapsed(){this.svgTarget.classList.add("rotate-90"),this.itemsTarget.classList.add("hidden")}markExpanded(){this.svgTarget.classList.remove("rotate-90"),this.itemsTarget.classList.remove("hidden")}};ct(xw,"targets",["svg","items","self"])});var ww,kte=te(()=>{gr();ww=class extends ht{toggleSidebar(){this.sidebarTarget.classList.toggle("hidden")}};ct(ww,"targets",["sidebar"])});var _w,Ete=te(()=>{gr();_w=class extends ht{close(){this.modalTarget.remove(),document.dispatchEvent(new Event("actions-modal:close"))}delayedClose(){let r=this;setTimeout(()=>{r.modalTarget.remove(),document.dispatchEvent(new Event("actions-modal:close"))},500)}};ct(_w,"targets",["modal"])});var Sw,Cte=te(()=>{bd();Sw=class extends go{getFilterValue(){
|
94
|
+
</div>`);ct(this,"confirmed",!1)}connect(){this.context.scope.element.addEventListener("click",r=>{this.confirmationMessage?this.confirmed||(r.preventDefault(),window.confirm(this.confirmationMessage)&&this.applyLoader()):this.applyLoader()})}get button(){return this.context.scope.element}get confirmationMessage(){return this.context.scope.element.getAttribute("data-avo-confirm")}applyLoader(){let{button:r}=this;r.style.width=`${r.getBoundingClientRect().width}px`,r.style.height=`${r.getBoundingClientRect().height}px`,r.innerHTML=this.spinnerMarkup,r.classList.add("justify-center"),setTimeout(()=>{this.markConfirmed(),r.click(),r.setAttribute("disabled","disabled")},1)}markConfirmed(){this.confirmed=!0}markUnconfirmed(){this.confirmed=!1}}});var xw,Ste=te(()=>{gr();xw=class extends ht{constructor(){super(...arguments);ct(this,"collapsed",!0)}get key(){return this.selfTarget.getAttribute("data-menu-key-param")}get defaultState(){return this.selfTarget.getAttribute("data-menu-default-collapsed-state")}get userState(){return window.localStorage.getItem(this.key)}set userState(r){window.localStorage.setItem(this.key,r)}get initiallyCollapsed(){return this.userState==="collapsed"||this.defaultState==="collapsed"?!0:(this.userState==="expanded"||this.defaultState==="expanded",!1)}connect(){this.initiallyCollapsed?(this.collapsed=!0,this.markCollapsed()):(this.collapsed=!1,this.markExpanded())}triggerCollapse(){this.collapsed=!this.collapsed,this.userState=this.collapsed?"collapsed":"expanded",this.updateDom()}updateDom(){this.collapsed?this.markCollapsed():this.markExpanded()}markCollapsed(){this.svgTarget.classList.add("rotate-90"),this.itemsTarget.classList.add("hidden")}markExpanded(){this.svgTarget.classList.remove("rotate-90"),this.itemsTarget.classList.remove("hidden")}};ct(xw,"targets",["svg","items","self"])});var ww,kte=te(()=>{gr();ww=class extends ht{toggleSidebar(){this.sidebarTarget.classList.toggle("hidden")}};ct(ww,"targets",["sidebar"])});var _w,Ete=te(()=>{gr();_w=class extends ht{close(){this.modalTarget.remove(),document.dispatchEvent(new Event("actions-modal:close"))}delayedClose(){let r=this;setTimeout(()=>{r.modalTarget.remove(),document.dispatchEvent(new Event("actions-modal:close"))},500)}};ct(_w,"targets",["modal"])});var Sw,Cte=te(()=>{bd();Sw=class extends go{getFilterValue(){let r=Array.from(this.selectorTarget.selectedOptions).map(({value:e})=>e);return r.length===0?null:r}getFilterClass(){let{filterClass:r}=this.selectorTarget.dataset;return r}};ct(Sw,"targets",["selector"])});var kw,Ate=te(()=>{gr();kw=class extends ht{get turboFrame(){return this.selectorTarget.dataset.turboFrame}reload(){document.querySelector(`[data-per-page-option="${this.selectorTarget.value}"][data-turbo-frame="${this.turboFrame}"]`).click()}};ct(kw,"targets",["selector"])});function wg(r){return{current:r}}var Tte=te(()=>{});function aI(r,e){var t=void 0;return function(){for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];t&&clearTimeout(t),t=setTimeout(function(){return r.apply(void 0,i)},e)}}var Dte=te(()=>{});function Ew(){return"autocomplete-".concat(o9e++)}var o9e,Ote=te(()=>{o9e=0});function Pd(r,e){return e.reduce(function(t,n){return t&&t[n]},r)}var Mte=te(()=>{});function Al(r){return r.collections.length===0?0:r.collections.reduce(function(e,t){return e+t.items.length},0)}var Ite=te(()=>{});var Pte=te(()=>{});var Lte=te(()=>{});var qte=te(()=>{});var Rte=te(()=>{});var Xu=te(()=>{Tte();Dte();Ote();Mte();Ite();Pte();Lte();qte();Rte()});function Fte(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function a9e(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Fte(Object(t),!0).forEach(function(n){s9e(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Fte(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function s9e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Nte(r,e,t){var n=e.initialState;return{getState:function(){return n},dispatch:function(o,a){var s=a9e({},n);n=r(n,{type:o,props:e,payload:a}),t({state:n,prevState:s})}}}var Bte=te(()=>{});var jte=te(()=>{});function Ld(r){return r.reduce(function(e,t){return e.concat(t)},[])}var zte=te(()=>{});function sI(r,e,t,n){if(r<0&&(e===null||n!==null&&e===0))return t+r;var i=(e===null?-1:e)+r;return i<=-1||i>=t?n===null?null:0:i}var Hte=te(()=>{});var Wte,lI=te(()=>{Wte=function(){}});function Ute(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function l9e(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ute(Object(t),!0).forEach(function(n){u9e(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Ute(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function u9e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Cw(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Cw=function(t){return typeof t}:Cw=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cw(r)}function Vte(r,e){var t=[];return Promise.resolve(r(e)).then(function(n){return Array.isArray(n),"The `getSources` function must return an array of sources but returned type ".concat(JSON.stringify(Cw(n)),`:
|
95
95
|
|
96
96
|
`).concat(JSON.stringify(n,null,2)),Promise.all(n.filter(function(i){return Boolean(i)}).map(function(i){if(i.sourceId,t.includes(i.sourceId))throw new Error("[Autocomplete] The `sourceId` ".concat(JSON.stringify(i.sourceId)," is not unique."));t.push(i.sourceId);var o=l9e({getItemInputValue:function(s){var u=s.state;return u.query},getItemUrl:function(){},onSelect:function(s){var u=s.setIsOpen;u(!1)},onActive:Wte},i);return Promise.resolve(o)}))})}var $te=te(()=>{lI()});function c9e(r){var e=r.collections.map(function(n){return n.items.length}).reduce(function(n,i,o){var a=n[o-1]||0,s=a+i;return n.push(s),n},[]),t=e.reduce(function(n,i){return i<=r.activeItemId?n+1:n},0);return r.collections[t]}function f9e(r){for(var e=r.state,t=r.collection,n=!1,i=0,o=0;n===!1;){var a=e.collections[i];if(a===t){n=!0;break}o+=a.items.length,i++}return e.activeItemId-o}function Oa(r){var e=c9e(r);if(!e)return null;var t=e.items[f9e({state:r,collection:e})],n=e.source,i=n.getItemInputValue({item:t,state:r}),o=n.getItemUrl({item:t,state:r});return{item:t,itemInputValue:i,itemUrl:o,source:n}}var Yte=te(()=>{});function uI(r,e){return r===e||r.contains(e)}var Kte=te(()=>{});function Gte(r){return{results:r,hits:r.map(function(e){return e.hits}).filter(Boolean),facetHits:r.map(function(e){var t;return(t=e.facetHits)===null||t===void 0?void 0:t.map(function(n){return{label:n.value,count:n.count,_highlightResult:{label:{value:n.highlighted}}}})}).filter(Boolean)}}var Xte=te(()=>{});var ws=te(()=>{jte();zte();Hte();$te();Yte();Kte();Xte();lI()});function Qte(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Aw(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Qte(Object(t),!0).forEach(function(n){d9e(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Qte(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function d9e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Zte(r){var e=r.store,t=function(f){e.dispatch("setActiveItemId",f)},n=function(f){e.dispatch("setQuery",f)},i=function(f){var c=0,h=f.map(function(p){return Aw(Aw({},p),{},{items:Ld(p.items).map(function(m){return Aw(Aw({},m),{},{__autocomplete_id:c++})})})});e.dispatch("setCollections",h)},o=function(f){e.dispatch("setIsOpen",f)},a=function(f){e.dispatch("setStatus",f)},s=function(f){e.dispatch("setContext",f)};return{setActiveItemId:t,setQuery:n,setCollections:i,setIsOpen:o,setStatus:a,setContext:s}}var Jte=te(()=>{ws()});function h9e(r){return v9e(r)||g9e(r)||m9e(r)||p9e()}function p9e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
97
97
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m9e(r,e){if(!!r){if(typeof r=="string")return cI(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return cI(r,e)}}function g9e(r){if(typeof Symbol<"u"&&Symbol.iterator in Object(r))return Array.from(r)}function v9e(r){if(Array.isArray(r))return cI(r)}function cI(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function ere(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function qd(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ere(Object(t),!0).forEach(function(n){y9e(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ere(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function y9e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function tre(r,e){var t,n=typeof window<"u"?window:{},i=r.plugins||[];return qd(qd({debug:!1,openOnFocus:!1,placeholder:"",autoFocus:!1,defaultActiveItemId:null,stallThreshold:300,environment:n,shouldPanelOpen:function(a){var s=a.state;return Al(s)>0}},r),{},{id:(t=r.id)!==null&&t!==void 0?t:Ew(),plugins:i,initialState:qd({activeItemId:null,query:"",completion:null,collections:[],isOpen:!1,status:"idle",context:{}},r.initialState),onStateChange:function(a){var s;(s=r.onStateChange)===null||s===void 0||s.call(r,a),i.forEach(function(u){var f;return(f=u.onStateChange)===null||f===void 0?void 0:f.call(u,a)})},onSubmit:function(a){var s;(s=r.onSubmit)===null||s===void 0||s.call(r,a),i.forEach(function(u){var f;return(f=u.onSubmit)===null||f===void 0?void 0:f.call(u,a)})},onReset:function(a){var s;(s=r.onReset)===null||s===void 0||s.call(r,a),i.forEach(function(u){var f;return(f=u.onReset)===null||f===void 0?void 0:f.call(u,a)})},getSources:function(a){return Promise.all([].concat(h9e(i.map(function(s){return s.getSources})),[r.getSources]).filter(Boolean).map(function(s){return Vte(s,a)})).then(function(s){return Ld(s)}).then(function(s){return s.map(function(u){return qd(qd({},u),{},{onSelect:function(c){u.onSelect(c),e.forEach(function(h){var p;return(p=h.onSelect)===null||p===void 0?void 0:p.call(h,c)})},onActive:function(c){u.onActive(c),e.forEach(function(h){var p;return(p=h.onActive)===null||p===void 0?void 0:p.call(h,c)})}})})})},navigator:qd({navigate:function(a){var s=a.itemUrl;n.location.assign(s)},navigateNewTab:function(a){var s=a.itemUrl,u=n.open(s,"_blank","noopener");u?.focus()},navigateNewWindow:function(a){var s=a.itemUrl;n.open(s,"_blank","noopener")}},r.navigator)})}var fI=te(()=>{Xu();ws()});function Dw(r){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Dw=function(t){return typeof t}:Dw=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dw(r)}function b9e(r){return S9e(r)||_9e(r)||w9e(r)||x9e()}function x9e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
@@ -123,7 +123,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
123
123
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function P8e(r,e){if(!!r){if(typeof r=="string")return RI(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return RI(r,e)}}function L8e(r){if(typeof Symbol<"u"&&Symbol.iterator in Object(r))return Array.from(r)}function q8e(r){if(Array.isArray(r))return RI(r)}function RI(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function $ne(r){var e=r.createElement,t=r.Fragment;return function(i){var o=i.hit,a=i.attribute,s=i.tagName,u=s===void 0?"mark":s;return e.apply(void 0,[t,{}].concat(M8e(jw({hit:o,attribute:a}).map(function(f,c){return f.isHighlighted?e(u,{key:c},f.value):f.value}))))}}var Yne=te(()=>{Bd()});function R8e(r){return j8e(r)||B8e(r)||N8e(r)||F8e()}function F8e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
124
124
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function N8e(r,e){if(!!r){if(typeof r=="string")return FI(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return FI(r,e)}}function B8e(r){if(typeof Symbol<"u"&&Symbol.iterator in Object(r))return Array.from(r)}function j8e(r){if(Array.isArray(r))return FI(r)}function FI(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function Kne(r){var e=r.createElement,t=r.Fragment;return function(i){var o=i.hit,a=i.attribute,s=i.tagName,u=s===void 0?"mark":s;return e.apply(void 0,[t,{}].concat(R8e(Dne({hit:o,attribute:a}).map(function(f,c){return f.isHighlighted?e(u,{key:c},f.value):f.value}))))}}var Gne=te(()=>{Bd()});function z8e(r){return V8e(r)||U8e(r)||W8e(r)||H8e()}function H8e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
125
125
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function W8e(r,e){if(!!r){if(typeof r=="string")return NI(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return NI(r,e)}}function U8e(r){if(typeof Symbol<"u"&&Symbol.iterator in Object(r))return Array.from(r)}function V8e(r){if(Array.isArray(r))return NI(r)}function NI(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function Xne(r){var e=r.createElement,t=r.Fragment;return function(i){var o=i.hit,a=i.attribute,s=i.tagName,u=s===void 0?"mark":s;return e.apply(void 0,[t,{}].concat(z8e(Mne({hit:o,attribute:a}).map(function(f,c){return f.isHighlighted?e(u,{key:c},f.value):f.value}))))}}var Qne=te(()=>{Bd()});function $8e(r){return X8e(r)||G8e(r)||K8e(r)||Y8e()}function Y8e(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
126
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K8e(r,e){if(!!r){if(typeof r=="string")return BI(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return BI(r,e)}}function G8e(r){if(typeof Symbol<"u"&&Symbol.iterator in Object(r))return Array.from(r)}function X8e(r){if(Array.isArray(r))return BI(r)}function BI(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function Zne(r){var e=r.createElement,t=r.Fragment;return function(i){var o=i.hit,a=i.attribute,s=i.tagName,u=s===void 0?"mark":s;return e.apply(void 0,[t,{}].concat($8e(Ww({hit:o,attribute:a}).map(function(f,c){return f.isHighlighted?e(u,{key:c},f.value):f.value}))))}}var Jne=te(()=>{Bd()});var eie=te(()=>{Yne();Gne();Qne();Jne()});function tie(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function $w(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?tie(Object(t),!0).forEach(function(n){Q8e(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):tie(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Q8e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Z8e(r,e){if(r==null)return{};var t=J8e(r,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(r,n)||(t[n]=r[n]))}return t}function J8e(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function rie(r){var e,t=r.classNames,n=r.container,i=r.getEnvironmentProps,o=r.getFormProps,a=r.getInputProps,s=r.getItemProps,u=r.getLabelProps,f=r.getListProps,c=r.getPanelProps,h=r.getRootProps,p=r.panelContainer,m=r.panelPlacement,y=r.render,b=r.renderNoResults,k=r.renderer,x=r.detachedMediaQuery,S=r.components,E=Z8e(r,["classNames","container","getEnvironmentProps","getFormProps","getInputProps","getItemProps","getLabelProps","getListProps","getPanelProps","getRootProps","panelContainer","panelPlacement","render","renderNoResults","renderer","detachedMediaQuery","components"]),C=pI(n);C.tagName;var D=typeof window<"u"?window:{},T=k??r$e,I={Highlight:$ne(T),ReverseHighlight:Kne(T),ReverseSnippet:Xne(T),Snippet:Zne(T)};return{renderer:{classNames:Nre(e$e,t??{}),container:C,getEnvironmentProps:i??function(q){var z=q.props;return z},getFormProps:o??function(q){var z=q.props;return z},getInputProps:a??function(q){var z=q.props;return z},getItemProps:s??function(q){var z=q.props;return z},getLabelProps:u??function(q){var z=q.props;return z},getListProps:f??function(q){var z=q.props;return z},getPanelProps:c??function(q){var z=q.props;return z},getRootProps:h??function(q){var z=q.props;return z},panelContainer:p?pI(p):document.body,panelPlacement:m??"input-wrapper-width",render:y??t$e,renderNoResults:b,renderer:T,detachedMediaQuery:x??getComputedStyle(D.document.documentElement).getPropertyValue("--aa-detached-media-query"),components:$w($w({},I),S)},core:$w($w({},E),{},{id:(e=E.id)!==null&&e!==void 0?e:Ew(),environment:D})}}var e$e,t$e,r$e,nie=te(()=>{Xu();Sne();eie();Fd();e$e={clearButton:"aa-ClearButton",detachedCancelButton:"aa-DetachedCancelButton",detachedContainer:"aa-DetachedContainer",detachedFormContainer:"aa-DetachedFormContainer",detachedOverlay:"aa-DetachedOverlay",detachedSearchButton:"aa-DetachedSearchButton",detachedSearchButtonIcon:"aa-DetachedSearchButtonIcon",detachedSearchButtonPlaceholder:"aa-DetachedSearchButtonPlaceholder",form:"aa-Form",input:"aa-Input",inputWrapper:"aa-InputWrapper",inputWrapperPrefix:"aa-InputWrapperPrefix",inputWrapperSuffix:"aa-InputWrapperSuffix",item:"aa-Item",label:"aa-Label",list:"aa-List",loadingIndicator:"aa-LoadingIndicator",panel:"aa-Panel",panelLayout:"aa-PanelLayout",root:"aa-Autocomplete",source:"aa-Source",sourceFooter:"aa-SourceFooter",sourceHeader:"aa-SourceHeader",sourceNoResults:"aa-SourceNoResults",submitButton:"aa-SubmitButton"},t$e=function(e,t){var n=e.children;_ne(n,t)},r$e={createElement:SI,Fragment:Nd}});function iie(r){var e=r.panelPlacement,t=r.container,n=r.form,i=r.environment,o=t.getBoundingClientRect(),a=o.top+o.height;switch(e){case"start":return{top:a,left:o.left};case"end":return{top:a,right:i.document.documentElement.clientWidth-(o.left+o.width)};case"full-width":return{top:a,left:0,right:0,width:"unset",maxWidth:"unset"};case"input-wrapper-width":{var s=n.getBoundingClientRect();return{top:a,left:s.left,right:i.document.documentElement.clientWidth-(s.left+s.width),width:"unset",maxWidth:"unset"}}default:throw new Error("[Autocomplete] The `panelPlacement` value ".concat(JSON.stringify(e)," is not valid."))}}var oie=te(()=>{});function Yw(){return Yw=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Yw.apply(this,arguments)}function aie(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Kw(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?aie(Object(t),!0).forEach(function(n){n$e(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):aie(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function n$e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function sie(r){var e=r.autocomplete,t=r.autocompleteScopeApi,n=r.dom,i=r.propGetters,o=r.state;vI(n.root,i.getRootProps(Kw({state:o,props:e.getRootProps({})},t))),vI(n.input,i.getInputProps(Kw({state:o,props:e.getInputProps({inputElement:n.input}),inputElement:n.input},t))),wo(n.label,{hidden:o.status==="stalled"}),wo(n.loadingIndicator,{hidden:o.status!=="stalled"}),wo(n.clearButton,{hidden:!o.query})}function lie(r,e){var t=e.autocomplete,n=e.autocompleteScopeApi,i=e.classNames,o=e.createElement,a=e.dom,s=e.Fragment,u=e.panelContainer,f=e.propGetters,c=e.state,h=e.components;if(!c.isOpen){u.contains(a.panel)&&u.removeChild(a.panel);return}!u.contains(a.panel)&&c.status!=="loading"&&u.appendChild(a.panel),a.panel.classList.toggle("aa-Panel--stalled",c.status==="stalled");var p=c.collections.map(function(b,k){var x=b.source,S=b.items;return o("section",{key:k,className:i.source,"data-autocomplete-source-id":x.sourceId},x.templates.header&&o("div",{className:i.sourceHeader},x.templates.header({components:h,createElement:o,Fragment:s,items:S,source:x,state:c})),S.length===0&&x.templates.noResults&&c.query?o("div",{className:i.sourceNoResults},x.templates.noResults({components:h,createElement:o,Fragment:s,source:x,state:c})):o("ul",Yw({className:i.list},f.getListProps(Kw({state:c,props:t.getListProps({})},n))),S.map(function(E){var C=t.getItemProps({item:E,source:x});return o("li",Yw({key:C.id,className:i.item},f.getItemProps(Kw({state:c,props:C},n))),x.templates.item({components:h,createElement:o,Fragment:s,item:E,state:c}))})),x.templates.footer&&o("div",{className:i.sourceFooter},x.templates.footer({components:h,createElement:o,Fragment:s,items:S,source:x,state:c})))}),m=o(s,null,o("div",{className:"aa-PanelLayout aa-Panel--scrollable"},p),o("div",{className:"aa-GradientBottom"})),y=p.reduce(function(b,k){return b[k.props["data-autocomplete-source-id"]]=k,b},{});r({children:m,state:c,sections:p,elements:y,createElement:o,Fragment:s,components:h},a.panel)}var uie=te(()=>{Fd()});function cie(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Zu(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?cie(Object(t),!0).forEach(function(n){fie(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):cie(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function fie(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function die(r){var e=ine(),t=e.runEffect,n=e.cleanupEffects,i=e.runEffects,o=ane(),a=o.reactive,s=o.runReactives,u=wg(!1),f=wg(r),c=wg(void 0),h=a(function(){return rie(f.current)}),p=a(function(){return h.value.core.environment.matchMedia(h.value.renderer.detachedMediaQuery).matches}),m=a(function(){return xre(Zu(Zu({},h.value.core),{},{onStateChange:function(I){var q,z,Y;u.current=I.state.collections.some(function(X){return X.source.templates.noResults}),(q=c.current)===null||q===void 0||q.call(c,I),(z=(Y=h.value.core).onStateChange)===null||z===void 0||z.call(Y,I)},shouldPanelOpen:f.current.shouldPanelOpen||function(T){var I=T.state,q=Al(I)>0;if(!h.value.core.openOnFocus&&!I.query)return q;var z=Boolean(u.current||h.value.renderer.renderNoResults);return!q&&z||q}}))}),y=wg(Zu({collections:[],completion:null,context:{},isOpen:!1,query:"",activeItemId:null,status:"idle"},h.value.core.initialState)),b={getEnvironmentProps:h.value.renderer.getEnvironmentProps,getFormProps:h.value.renderer.getFormProps,getInputProps:h.value.renderer.getInputProps,getItemProps:h.value.renderer.getItemProps,getLabelProps:h.value.renderer.getLabelProps,getListProps:h.value.renderer.getListProps,getPanelProps:h.value.renderer.getPanelProps,getRootProps:h.value.renderer.getRootProps},k={setActiveItemId:m.value.setActiveItemId,setQuery:m.value.setQuery,setCollections:m.value.setCollections,setIsOpen:m.value.setIsOpen,setStatus:m.value.setStatus,setContext:m.value.setContext,refresh:m.value.refresh},x=a(function(){return rne({autocomplete:m.value,autocompleteScopeApi:k,classNames:h.value.renderer.classNames,isDetached:p.value,placeholder:h.value.core.placeholder,propGetters:b,state:y.current})});function S(){wo(x.value.panel,{style:p.value?{}:iie({panelPlacement:h.value.renderer.panelPlacement,container:x.value.root,form:x.value.form,environment:h.value.core.environment})})}function E(T){y.current=T;var I={autocomplete:m.value,autocompleteScopeApi:k,classNames:h.value.renderer.classNames,components:h.value.renderer.components,container:h.value.renderer.container,createElement:h.value.renderer.renderer.createElement,dom:x.value,Fragment:h.value.renderer.renderer.Fragment,panelContainer:p.value?x.value.detachedContainer:h.value.renderer.panelContainer,propGetters:b,state:y.current},q=!Al(T)&&!u.current&&h.value.renderer.renderNoResults||h.value.renderer.render;sie(I),lie(q,I)}t(function(){var T=m.value.getEnvironmentProps({formElement:x.value.form,panelElement:x.value.panel,inputElement:x.value.input});return wo(h.value.core.environment,T),function(){wo(h.value.core.environment,Object.keys(T).reduce(function(I,q){return Zu(Zu({},I),{},fie({},q,void 0))},{}))}}),t(function(){var T=p.value?h.value.core.environment.document.body:h.value.renderer.panelContainer,I=p.value?x.value.detachedOverlay:x.value.panel;return p.value&&y.current.isOpen&&x.value.openDetachedOverlay(),E(y.current),function(){T.contains(I)&&T.removeChild(I)}}),t(function(){var T=h.value.renderer.container;return T.appendChild(x.value.root),function(){T.removeChild(x.value.root)}}),t(function(){var T=aI(function(I){var q=I.state;E(q)},0);return c.current=function(I){var q=I.state,z=I.prevState;if(q.isOpen&&!z.isOpen&&S(),q.query!==z.query){var Y=document.querySelectorAll(".aa-Panel--scrollable");Y.forEach(function(X){X.scrollTop!==0&&(X.scrollTop=0)})}T({state:q})},function(){c.current=void 0}}),t(function(){var T=aI(function(){var I=p.value;p.value=h.value.core.environment.matchMedia(h.value.renderer.detachedMediaQuery).matches,I!==p.value?D({}):requestAnimationFrame(S)},20);return h.value.core.environment.addEventListener("resize",T),function(){h.value.core.environment.removeEventListener("resize",T)}}),t(function(){if(!p.value)return function(){};function T(z){x.value.detachedContainer.classList.toggle("aa-DetachedContainer--modal",z)}function I(z){T(z.matches)}var q=h.value.core.environment.matchMedia(getComputedStyle(h.value.core.environment.document.documentElement).getPropertyValue("--aa-detached-modal-media-query"));return T(q.matches),q.addEventListener("change",I),function(){q.removeEventListener("change",I)}}),t(function(){return requestAnimationFrame(S),function(){}});function C(){n()}function D(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n(),f.current=gI(h.value.renderer,h.value.core,{initialState:y.current},T),s(),i(),m.value.refresh().then(function(){E(y.current)})}return Zu(Zu({},k),{},{update:D,destroy:C})}var hie=te(()=>{Rre();Xu();nne();one();sne();nie();oie();uie();Fd()});var pie,mie=te(()=>{pie="1.0.0-alpha.46"});function gie(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function vie(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?gie(Object(t),!0).forEach(function(n){i$e(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):gie(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function i$e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var yie,bie=te(()=>{Bd();mie();yie=Uw(function(r){return Vw(vie(vie({},r),{},{userAgents:[{segment:"autocomplete-js",version:pie}]}))})});var xie=te(()=>{});var Oxt,wie=te(()=>{bie();Oxt=yie({transformResponse:function(e){return e.hits}})});var _ie=te(()=>{xie();wie()});var Sie=te(()=>{});var kie=te(()=>{});var Eie=te(()=>{});var Cie=te(()=>{});var Aie=te(()=>{});var Tie=te(()=>{});var Die=te(()=>{});var Oie=te(()=>{});var Mie=te(()=>{});var Iie=te(()=>{});var Pie=te(()=>{});var Lie=te(()=>{});var qie=te(()=>{});var Rie=te(()=>{Sie();kie();Eie();Cie();Aie();Tie();Die();Oie();Mie();Iie();Pie();Lie();qie()});var Fie=te(()=>{hie();_ie();Rie()});var Nie,Bie=te(()=>{Nie=(r,e)=>{let t;return(...n)=>(t&&clearTimeout(t),new Promise(i=>{t=setTimeout(()=>i(r(...n)),e)}))}});var jie,zie,Gw,Hie=te(()=>{jie=pr(dT());gr();IT();Fie();zie=pr(zx());Bie();Gw=class extends ht{constructor(){super(...arguments);ct(this,"debouncedFetch",Nie(fetch,this.searchDebounce))}get dataset(){return this.autocompleteTarget.dataset}get searchDebounce(){return window.Avo.configuration.search_debounce}get translationKeys(){let r;try{r=JSON.parse(this.dataset.translationKeys)}catch(e){r={}}return r}get isBelongsToSearch(){return this.dataset.viaAssociation==="belongs_to"}get isGlobalSearch(){return this.dataset.searchResource==="global"}searchUrl(r){let e=(0,zie.default)(),t={q:r},n=[window.Avo.configuration.root_path,"avo_api",this.dataset.searchResource,"search"];return this.isGlobalSearch&&(n=[window.Avo.configuration.root_path,"avo_api","search"]),this.isBelongsToSearch&&(t=Mc(Fs({},t),{via_association:this.dataset.viaAssociation})),e.segment(n).search(t).toString()}handleOnSelect({item:r}){this.isBelongsToSearch?(this.hiddenIdTarget.setAttribute("value",r._id),this.buttonTarget.setAttribute("value",r._label),document.querySelector(".aa-DetachedOverlay").remove(),this.hasClearButtonTarget&&this.clearButtonTarget.classList.remove("hidden")):Su.visit(r._url,{action:"advance"}),document.body.classList.remove("aa-Detached")}addSource(r,e){let t=this;return{sourceId:r,getItems:()=>e.results,onSelect:t.handleOnSelect.bind(t),templates:{header(){return`${e.header.toUpperCase()} ${e.help}`},item({item:n,createElement:i}){let o=[];if(n._avatar){let s;switch(n._avatar_type){default:case"circle":s="rounded-full";break;case"rounded":s="rounded";break}o.push(i("img",{src:n._avatar,alt:n._label,class:`flex-shrink-0 w-8 h-8 my-[2px] inline mr-2 ${s}`}))}let a=[n._label];return n._description&&a.push(i("div",{class:"aa-ItemDescription"},n._description)),o.push(i("div",null,a)),i("div",{class:"flex"},o)},noResults(){return t.translationKeys.no_item_found.replace("%{item}",r)}}}}showSearchPanel(){this.autocompleteTarget.querySelector("button").click()}clearValue(){this.clearValueTargets.map(r=>r.setAttribute("value","")),this.clearButtonTarget.classList.add("hidden")}connect(){let r=this;this.buttonTarget.onclick=()=>this.showSearchPanel(),this.clearValueTargets.forEach(e=>{e.getAttribute("value")&&this.hasClearButtonTarget&&this.clearButtonTarget.classList.remove("hidden")}),this.isGlobalSearch&&jie.bind(["command+k","ctrl+k"],()=>this.showSearchPanel()),die({container:this.autocompleteTarget,placeholder:this.translationKeys.placeholder,translations:{detachedCancelButtonText:this.translationKeys.cancel_button},openOnFocus:!0,detachedMediaQuery:"",getSources:({query:e})=>{document.body.classList.add("search-loading");let t=r.searchUrl(e);return r.debouncedFetch(t).then(n=>(document.body.classList.remove("search-loading"),n.json())).then(n=>Object.keys(n).map(i=>r.addSource(i,n[i])))}}),this.buttonTarget.dataset.shouldBeDisabled!=="true"&&this.buttonTarget.removeAttribute("disabled")}};ct(Gw,"targets",["autocomplete","button","hiddenId","visibleLabel","clearValue","clearButton"])});var Wie,Xw,Uie=te(()=>{gr();Wie=pr(zx()),Xw=class extends ht{get parentTurboFrame(){return this.context.scope.element.closest("turbo-frame")}onChange(r){if(!this.parentTurboFrame.src)return;let e=new Wie.default(this.parentTurboFrame.src);e.search(Mc(Fs({},e.query(!0)),{range:r.currentTarget.value})),this.parentTurboFrame.src=e.toString(),this.parentTurboFrame.reload()}};ct(Xw,"targets",["select"])});var Qw,Vie=te(()=>{bd();Qw=class extends go{getFilterValue(){return this.selectorTarget.value}getFilterClass(){let{filterClass:r}=this.selectorTarget.dataset;return r}};ct(Qw,"targets",["selector"])});var Kie=V(($ie,Yie)=>{(function(r){typeof $ie=="object"&&typeof Yie=="object"?r(tr()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)})(function(r){"use strict";var e=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,n=/[*+-]\s/;r.commands.newlineAndIndentContinueMarkdownList=function(o){if(o.getOption("disableInput"))return r.Pass;for(var a=o.listSelections(),s=[],u=0;u<a.length;u++){var f=a[u].head,c=o.getStateAfter(f.line),h=r.innerMode(o.getMode(),c);if(h.mode.name!=="markdown"){o.execCommand("newlineAndIndent");return}else c=h.state;var p=c.list!==!1,m=c.quote!==0,y=o.getLine(f.line),b=e.exec(y),k=/^\s*$/.test(y.slice(0,f.ch));if(!a[u].empty()||!p&&!m||!b||k){o.execCommand("newlineAndIndent");return}if(t.test(y)){var x=m&&/>\s*$/.test(y),S=!/>\s*$/.test(y);(x||S)&&o.replaceRange("",{line:f.line,ch:0},{line:f.line,ch:f.ch+1}),s[u]=`
|
126
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function K8e(r,e){if(!!r){if(typeof r=="string")return BI(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return BI(r,e)}}function G8e(r){if(typeof Symbol<"u"&&Symbol.iterator in Object(r))return Array.from(r)}function X8e(r){if(Array.isArray(r))return BI(r)}function BI(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function Zne(r){var e=r.createElement,t=r.Fragment;return function(i){var o=i.hit,a=i.attribute,s=i.tagName,u=s===void 0?"mark":s;return e.apply(void 0,[t,{}].concat($8e(Ww({hit:o,attribute:a}).map(function(f,c){return f.isHighlighted?e(u,{key:c},f.value):f.value}))))}}var Jne=te(()=>{Bd()});var eie=te(()=>{Yne();Gne();Qne();Jne()});function tie(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function $w(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?tie(Object(t),!0).forEach(function(n){Q8e(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):tie(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function Q8e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Z8e(r,e){if(r==null)return{};var t=J8e(r,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&(!Object.prototype.propertyIsEnumerable.call(r,n)||(t[n]=r[n]))}return t}function J8e(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function rie(r){var e,t=r.classNames,n=r.container,i=r.getEnvironmentProps,o=r.getFormProps,a=r.getInputProps,s=r.getItemProps,u=r.getLabelProps,f=r.getListProps,c=r.getPanelProps,h=r.getRootProps,p=r.panelContainer,m=r.panelPlacement,y=r.render,b=r.renderNoResults,k=r.renderer,x=r.detachedMediaQuery,S=r.components,E=Z8e(r,["classNames","container","getEnvironmentProps","getFormProps","getInputProps","getItemProps","getLabelProps","getListProps","getPanelProps","getRootProps","panelContainer","panelPlacement","render","renderNoResults","renderer","detachedMediaQuery","components"]),C=pI(n);C.tagName;var D=typeof window<"u"?window:{},T=k??r$e,I={Highlight:$ne(T),ReverseHighlight:Kne(T),ReverseSnippet:Xne(T),Snippet:Zne(T)};return{renderer:{classNames:Nre(e$e,t??{}),container:C,getEnvironmentProps:i??function(q){var z=q.props;return z},getFormProps:o??function(q){var z=q.props;return z},getInputProps:a??function(q){var z=q.props;return z},getItemProps:s??function(q){var z=q.props;return z},getLabelProps:u??function(q){var z=q.props;return z},getListProps:f??function(q){var z=q.props;return z},getPanelProps:c??function(q){var z=q.props;return z},getRootProps:h??function(q){var z=q.props;return z},panelContainer:p?pI(p):document.body,panelPlacement:m??"input-wrapper-width",render:y??t$e,renderNoResults:b,renderer:T,detachedMediaQuery:x??getComputedStyle(D.document.documentElement).getPropertyValue("--aa-detached-media-query"),components:$w($w({},I),S)},core:$w($w({},E),{},{id:(e=E.id)!==null&&e!==void 0?e:Ew(),environment:D})}}var e$e,t$e,r$e,nie=te(()=>{Xu();Sne();eie();Fd();e$e={clearButton:"aa-ClearButton",detachedCancelButton:"aa-DetachedCancelButton",detachedContainer:"aa-DetachedContainer",detachedFormContainer:"aa-DetachedFormContainer",detachedOverlay:"aa-DetachedOverlay",detachedSearchButton:"aa-DetachedSearchButton",detachedSearchButtonIcon:"aa-DetachedSearchButtonIcon",detachedSearchButtonPlaceholder:"aa-DetachedSearchButtonPlaceholder",form:"aa-Form",input:"aa-Input",inputWrapper:"aa-InputWrapper",inputWrapperPrefix:"aa-InputWrapperPrefix",inputWrapperSuffix:"aa-InputWrapperSuffix",item:"aa-Item",label:"aa-Label",list:"aa-List",loadingIndicator:"aa-LoadingIndicator",panel:"aa-Panel",panelLayout:"aa-PanelLayout",root:"aa-Autocomplete",source:"aa-Source",sourceFooter:"aa-SourceFooter",sourceHeader:"aa-SourceHeader",sourceNoResults:"aa-SourceNoResults",submitButton:"aa-SubmitButton"},t$e=function(e,t){var n=e.children;_ne(n,t)},r$e={createElement:SI,Fragment:Nd}});function iie(r){var e=r.panelPlacement,t=r.container,n=r.form,i=r.environment,o=t.getBoundingClientRect(),a=o.top+o.height;switch(e){case"start":return{top:a,left:o.left};case"end":return{top:a,right:i.document.documentElement.clientWidth-(o.left+o.width)};case"full-width":return{top:a,left:0,right:0,width:"unset",maxWidth:"unset"};case"input-wrapper-width":{var s=n.getBoundingClientRect();return{top:a,left:s.left,right:i.document.documentElement.clientWidth-(s.left+s.width),width:"unset",maxWidth:"unset"}}default:throw new Error("[Autocomplete] The `panelPlacement` value ".concat(JSON.stringify(e)," is not valid."))}}var oie=te(()=>{});function Yw(){return Yw=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Yw.apply(this,arguments)}function aie(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Kw(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?aie(Object(t),!0).forEach(function(n){n$e(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):aie(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function n$e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function sie(r){var e=r.autocomplete,t=r.autocompleteScopeApi,n=r.dom,i=r.propGetters,o=r.state;vI(n.root,i.getRootProps(Kw({state:o,props:e.getRootProps({})},t))),vI(n.input,i.getInputProps(Kw({state:o,props:e.getInputProps({inputElement:n.input}),inputElement:n.input},t))),wo(n.label,{hidden:o.status==="stalled"}),wo(n.loadingIndicator,{hidden:o.status!=="stalled"}),wo(n.clearButton,{hidden:!o.query})}function lie(r,e){var t=e.autocomplete,n=e.autocompleteScopeApi,i=e.classNames,o=e.createElement,a=e.dom,s=e.Fragment,u=e.panelContainer,f=e.propGetters,c=e.state,h=e.components;if(!c.isOpen){u.contains(a.panel)&&u.removeChild(a.panel);return}!u.contains(a.panel)&&c.status!=="loading"&&u.appendChild(a.panel),a.panel.classList.toggle("aa-Panel--stalled",c.status==="stalled");var p=c.collections.map(function(b,k){var x=b.source,S=b.items;return o("section",{key:k,className:i.source,"data-autocomplete-source-id":x.sourceId},x.templates.header&&o("div",{className:i.sourceHeader},x.templates.header({components:h,createElement:o,Fragment:s,items:S,source:x,state:c})),S.length===0&&x.templates.noResults&&c.query?o("div",{className:i.sourceNoResults},x.templates.noResults({components:h,createElement:o,Fragment:s,source:x,state:c})):o("ul",Yw({className:i.list},f.getListProps(Kw({state:c,props:t.getListProps({})},n))),S.map(function(E){var C=t.getItemProps({item:E,source:x});return o("li",Yw({key:C.id,className:i.item},f.getItemProps(Kw({state:c,props:C},n))),x.templates.item({components:h,createElement:o,Fragment:s,item:E,state:c}))})),x.templates.footer&&o("div",{className:i.sourceFooter},x.templates.footer({components:h,createElement:o,Fragment:s,items:S,source:x,state:c})))}),m=o(s,null,o("div",{className:"aa-PanelLayout aa-Panel--scrollable"},p),o("div",{className:"aa-GradientBottom"})),y=p.reduce(function(b,k){return b[k.props["data-autocomplete-source-id"]]=k,b},{});r({children:m,state:c,sections:p,elements:y,createElement:o,Fragment:s,components:h},a.panel)}var uie=te(()=>{Fd()});function cie(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Zu(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?cie(Object(t),!0).forEach(function(n){fie(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):cie(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function fie(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function die(r){var e=ine(),t=e.runEffect,n=e.cleanupEffects,i=e.runEffects,o=ane(),a=o.reactive,s=o.runReactives,u=wg(!1),f=wg(r),c=wg(void 0),h=a(function(){return rie(f.current)}),p=a(function(){return h.value.core.environment.matchMedia(h.value.renderer.detachedMediaQuery).matches}),m=a(function(){return xre(Zu(Zu({},h.value.core),{},{onStateChange:function(I){var q,z,Y;u.current=I.state.collections.some(function(X){return X.source.templates.noResults}),(q=c.current)===null||q===void 0||q.call(c,I),(z=(Y=h.value.core).onStateChange)===null||z===void 0||z.call(Y,I)},shouldPanelOpen:f.current.shouldPanelOpen||function(T){var I=T.state,q=Al(I)>0;if(!h.value.core.openOnFocus&&!I.query)return q;var z=Boolean(u.current||h.value.renderer.renderNoResults);return!q&&z||q}}))}),y=wg(Zu({collections:[],completion:null,context:{},isOpen:!1,query:"",activeItemId:null,status:"idle"},h.value.core.initialState)),b={getEnvironmentProps:h.value.renderer.getEnvironmentProps,getFormProps:h.value.renderer.getFormProps,getInputProps:h.value.renderer.getInputProps,getItemProps:h.value.renderer.getItemProps,getLabelProps:h.value.renderer.getLabelProps,getListProps:h.value.renderer.getListProps,getPanelProps:h.value.renderer.getPanelProps,getRootProps:h.value.renderer.getRootProps},k={setActiveItemId:m.value.setActiveItemId,setQuery:m.value.setQuery,setCollections:m.value.setCollections,setIsOpen:m.value.setIsOpen,setStatus:m.value.setStatus,setContext:m.value.setContext,refresh:m.value.refresh},x=a(function(){return rne({autocomplete:m.value,autocompleteScopeApi:k,classNames:h.value.renderer.classNames,isDetached:p.value,placeholder:h.value.core.placeholder,propGetters:b,state:y.current})});function S(){wo(x.value.panel,{style:p.value?{}:iie({panelPlacement:h.value.renderer.panelPlacement,container:x.value.root,form:x.value.form,environment:h.value.core.environment})})}function E(T){y.current=T;var I={autocomplete:m.value,autocompleteScopeApi:k,classNames:h.value.renderer.classNames,components:h.value.renderer.components,container:h.value.renderer.container,createElement:h.value.renderer.renderer.createElement,dom:x.value,Fragment:h.value.renderer.renderer.Fragment,panelContainer:p.value?x.value.detachedContainer:h.value.renderer.panelContainer,propGetters:b,state:y.current},q=!Al(T)&&!u.current&&h.value.renderer.renderNoResults||h.value.renderer.render;sie(I),lie(q,I)}t(function(){var T=m.value.getEnvironmentProps({formElement:x.value.form,panelElement:x.value.panel,inputElement:x.value.input});return wo(h.value.core.environment,T),function(){wo(h.value.core.environment,Object.keys(T).reduce(function(I,q){return Zu(Zu({},I),{},fie({},q,void 0))},{}))}}),t(function(){var T=p.value?h.value.core.environment.document.body:h.value.renderer.panelContainer,I=p.value?x.value.detachedOverlay:x.value.panel;return p.value&&y.current.isOpen&&x.value.openDetachedOverlay(),E(y.current),function(){T.contains(I)&&T.removeChild(I)}}),t(function(){var T=h.value.renderer.container;return T.appendChild(x.value.root),function(){T.removeChild(x.value.root)}}),t(function(){var T=aI(function(I){var q=I.state;E(q)},0);return c.current=function(I){var q=I.state,z=I.prevState;if(q.isOpen&&!z.isOpen&&S(),q.query!==z.query){var Y=document.querySelectorAll(".aa-Panel--scrollable");Y.forEach(function(X){X.scrollTop!==0&&(X.scrollTop=0)})}T({state:q})},function(){c.current=void 0}}),t(function(){var T=aI(function(){var I=p.value;p.value=h.value.core.environment.matchMedia(h.value.renderer.detachedMediaQuery).matches,I!==p.value?D({}):requestAnimationFrame(S)},20);return h.value.core.environment.addEventListener("resize",T),function(){h.value.core.environment.removeEventListener("resize",T)}}),t(function(){if(!p.value)return function(){};function T(z){x.value.detachedContainer.classList.toggle("aa-DetachedContainer--modal",z)}function I(z){T(z.matches)}var q=h.value.core.environment.matchMedia(getComputedStyle(h.value.core.environment.document.documentElement).getPropertyValue("--aa-detached-modal-media-query"));return T(q.matches),q.addEventListener("change",I),function(){q.removeEventListener("change",I)}}),t(function(){return requestAnimationFrame(S),function(){}});function C(){n()}function D(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n(),f.current=gI(h.value.renderer,h.value.core,{initialState:y.current},T),s(),i(),m.value.refresh().then(function(){E(y.current)})}return Zu(Zu({},k),{},{update:D,destroy:C})}var hie=te(()=>{Rre();Xu();nne();one();sne();nie();oie();uie();Fd()});var pie,mie=te(()=>{pie="1.0.0-alpha.46"});function gie(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function vie(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?gie(Object(t),!0).forEach(function(n){i$e(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):gie(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function i$e(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var yie,bie=te(()=>{Bd();mie();yie=Uw(function(r){return Vw(vie(vie({},r),{},{userAgents:[{segment:"autocomplete-js",version:pie}]}))})});var xie=te(()=>{});var Oxt,wie=te(()=>{bie();Oxt=yie({transformResponse:function(e){return e.hits}})});var _ie=te(()=>{xie();wie()});var Sie=te(()=>{});var kie=te(()=>{});var Eie=te(()=>{});var Cie=te(()=>{});var Aie=te(()=>{});var Tie=te(()=>{});var Die=te(()=>{});var Oie=te(()=>{});var Mie=te(()=>{});var Iie=te(()=>{});var Pie=te(()=>{});var Lie=te(()=>{});var qie=te(()=>{});var Rie=te(()=>{Sie();kie();Eie();Cie();Aie();Tie();Die();Oie();Mie();Iie();Pie();Lie();qie()});var Fie=te(()=>{hie();_ie();Rie()});var Nie,Bie=te(()=>{Nie=(r,e)=>{let t;return(...n)=>(t&&clearTimeout(t),new Promise(i=>{t=setTimeout(()=>i(r(...n)),e)}))}});var jie,zie,Gw,Hie=te(()=>{jie=pr(dT());gr();IT();Fie();zie=pr(zx());Bie();Gw=class extends ht{constructor(){super(...arguments);ct(this,"debouncedFetch",Nie(fetch,this.searchDebounce))}get dataset(){return this.autocompleteTarget.dataset}get searchDebounce(){return window.Avo.configuration.search_debounce}get translationKeys(){let r;try{r=JSON.parse(this.dataset.translationKeys)}catch(e){r={}}return r}get isBelongsToSearch(){return this.dataset.viaAssociation==="belongs_to"}get isGlobalSearch(){return this.dataset.searchResource==="global"}searchUrl(r){let e=(0,zie.default)(),t={q:r},n=[window.Avo.configuration.root_path,"avo_api",this.dataset.searchResource,"search"];return this.isGlobalSearch&&(n=[window.Avo.configuration.root_path,"avo_api","search"]),this.isBelongsToSearch&&(t=Mc(Fs({},t),{via_association:this.dataset.viaAssociation})),e.segment(n).search(t).toString()}handleOnSelect({item:r}){this.isBelongsToSearch?(this.hiddenIdTarget.setAttribute("value",r._id),this.buttonTarget.setAttribute("value",r._label),document.querySelector(".aa-DetachedOverlay").remove(),this.hasClearButtonTarget&&this.clearButtonTarget.classList.remove("hidden")):Su.visit(r._url,{action:"advance"}),document.body.classList.remove("aa-Detached")}addSource(r,e){let t=this;return{sourceId:r,getItems:()=>e.results,onSelect:t.handleOnSelect.bind(t),templates:{header(){return`${e.header.toUpperCase()} ${e.help}`},item({item:n,createElement:i}){let o=[];if(n._avatar){let s;switch(n._avatar_type){default:case"circle":s="rounded-full";break;case"rounded":s="rounded";break}o.push(i("img",{src:n._avatar,alt:n._label,class:`flex-shrink-0 w-8 h-8 my-[2px] inline mr-2 ${s}`}))}let a=[n._label];return n._description&&a.push(i("div",{class:"aa-ItemDescription"},n._description)),o.push(i("div",null,a)),i("div",{class:"flex"},o)},noResults(){return t.translationKeys.no_item_found.replace("%{item}",r)}}}}showSearchPanel(){this.autocompleteTarget.querySelector("button").click()}clearValue(){this.clearValueTargets.map(r=>r.setAttribute("value","")),this.clearButtonTarget.classList.add("hidden")}connect(){let r=this;this.buttonTarget.onclick=()=>this.showSearchPanel(),this.clearValueTargets.forEach(e=>{e.getAttribute("value")&&this.hasClearButtonTarget&&this.clearButtonTarget.classList.remove("hidden")}),this.isGlobalSearch&&jie.bind(["command+k","ctrl+k"],()=>this.showSearchPanel()),die({container:this.autocompleteTarget,placeholder:this.translationKeys.placeholder,translations:{detachedCancelButtonText:this.translationKeys.cancel_button},openOnFocus:!0,detachedMediaQuery:"",getSources:({query:e})=>{document.body.classList.add("search-loading");let t=r.searchUrl(e);return r.debouncedFetch(t).then(n=>(document.body.classList.remove("search-loading"),n.json())).then(n=>Object.keys(n).map(i=>r.addSource(i,n[i])))}}),this.buttonTarget.dataset.shouldBeDisabled!=="true"&&this.buttonTarget.removeAttribute("disabled")}};ct(Gw,"targets",["autocomplete","button","hiddenId","visibleLabel","clearValue","clearButton"])});var Wie,Xw,Uie=te(()=>{gr();Wie=pr(zx()),Xw=class extends ht{get parentTurboFrame(){return this.context.scope.element.closest("turbo-frame")}onChange(r){if(!this.parentTurboFrame.src)return;let e=new Wie.default(this.parentTurboFrame.src);e.search(Mc(Fs({},e.query(!0)),{range:r.currentTarget.value})),this.parentTurboFrame.src=e.toString(),this.parentTurboFrame.reload()}};ct(Xw,"targets",["select"])});var Qw,Vie=te(()=>{bd();Qw=class extends go{getFilterValue(){return this.selectorTarget.value===""?null:this.selectorTarget.value}getFilterClass(){let{filterClass:r}=this.selectorTarget.dataset;return r}};ct(Qw,"targets",["selector"])});var Kie=V(($ie,Yie)=>{(function(r){typeof $ie=="object"&&typeof Yie=="object"?r(tr()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)})(function(r){"use strict";var e=/^(\s*)(>[> ]*|[*+-] \[[x ]\]\s|[*+-]\s|(\d+)([.)]))(\s*)/,t=/^(\s*)(>[> ]*|[*+-] \[[x ]\]|[*+-]|(\d+)[.)])(\s*)$/,n=/[*+-]\s/;r.commands.newlineAndIndentContinueMarkdownList=function(o){if(o.getOption("disableInput"))return r.Pass;for(var a=o.listSelections(),s=[],u=0;u<a.length;u++){var f=a[u].head,c=o.getStateAfter(f.line),h=r.innerMode(o.getMode(),c);if(h.mode.name!=="markdown"){o.execCommand("newlineAndIndent");return}else c=h.state;var p=c.list!==!1,m=c.quote!==0,y=o.getLine(f.line),b=e.exec(y),k=/^\s*$/.test(y.slice(0,f.ch));if(!a[u].empty()||!p&&!m||!b||k){o.execCommand("newlineAndIndent");return}if(t.test(y)){var x=m&&/>\s*$/.test(y),S=!/>\s*$/.test(y);(x||S)&&o.replaceRange("",{line:f.line,ch:0},{line:f.line,ch:f.ch+1}),s[u]=`
|
127
127
|
`}else{var E=b[1],C=b[5],D=!(n.test(b[2])||b[2].indexOf(">")>=0),T=D?parseInt(b[3],10)+1+b[4]:b[2].replace("x"," ");s[u]=`
|
128
128
|
`+E+T+C,D&&i(o,f)}}o.replaceSelections(s)};function i(o,a){var s=a.line,u=0,f=0,c=e.exec(o.getLine(s)),h=c[1];do{u+=1;var p=s+u,m=o.getLine(p),y=e.exec(m);if(y){var b=y[1],k=parseInt(c[3],10)+u-f,x=parseInt(y[3],10),S=x;if(h===b&&!isNaN(x))k===x&&(S=x+1),k>x&&(S=k+1),o.replaceRange(m.replace(e,b+S+y[4]+y[5]),{line:p,ch:0},{line:p,ch:m.length});else{if(h.length>b.length||h.length<b.length&&u===1)return;f+=1}}}while(y)}})});var Xie=V(()=>{var Gie=tr();Gie.commands.tabAndIndentMarkdownList=function(r){var e=r.listSelections(),t=e[0].head,n=r.getStateAfter(t.line),i=n.list!==!1;if(i){r.execCommand("indentMore");return}if(r.options.indentWithTabs)r.execCommand("insertTab");else{var o=Array(r.options.tabSize+1).join(" ");r.replaceSelection(o)}};Gie.commands.shiftTabAndUnindentMarkdownList=function(r){var e=r.listSelections(),t=e[0].head,n=r.getStateAfter(t.line),i=n.list!==!1;if(i){r.execCommand("indentLess");return}if(r.options.indentWithTabs)r.execCommand("insertTab");else{var o=Array(r.options.tabSize+1).join(" ");r.replaceSelection(o)}}});var Jie=V((Qie,Zie)=>{(function(r){typeof Qie=="object"&&typeof Zie=="object"?r(tr()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)})(function(r){"use strict";r.defineOption("fullScreen",!1,function(n,i,o){o==r.Init&&(o=!1),!o!=!i&&(i?e(n):t(n))});function e(n){var i=n.getWrapperElement();n.state.fullScreenRestore={scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,width:i.style.width,height:i.style.height},i.style.width="",i.style.height="auto",i.className+=" CodeMirror-fullscreen",document.documentElement.style.overflow="hidden",n.refresh()}function t(n){var i=n.getWrapperElement();i.className=i.className.replace(/\s*CodeMirror-fullscreen\b/,""),document.documentElement.style.overflow="";var o=n.state.fullScreenRestore;i.style.width=o.width,i.style.height=o.height,window.scrollTo(o.scrollLeft,o.scrollTop),n.refresh()}})});var roe=V((eoe,toe)=>{(function(r){typeof eoe=="object"&&typeof toe=="object"?r(tr()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)})(function(r){r.defineOption("placeholder","",function(s,u,f){var c=f&&f!=r.Init;if(u&&!c)s.on("blur",i),s.on("change",o),s.on("swapDoc",o),r.on(s.getInputField(),"compositionupdate",s.state.placeholderCompose=function(){n(s)}),o(s);else if(!u&&c){s.off("blur",i),s.off("change",o),s.off("swapDoc",o),r.off(s.getInputField(),"compositionupdate",s.state.placeholderCompose),e(s);var h=s.getWrapperElement();h.className=h.className.replace(" CodeMirror-empty","")}u&&!s.hasFocus()&&i(s)});function e(s){s.state.placeholder&&(s.state.placeholder.parentNode.removeChild(s.state.placeholder),s.state.placeholder=null)}function t(s){e(s);var u=s.state.placeholder=document.createElement("pre");u.style.cssText="height: 0; overflow: visible",u.style.direction=s.getOption("direction"),u.className="CodeMirror-placeholder CodeMirror-line-like";var f=s.getOption("placeholder");typeof f=="string"&&(f=document.createTextNode(f)),u.appendChild(f),s.display.lineSpace.insertBefore(u,s.display.lineSpace.firstChild)}function n(s){setTimeout(function(){var u=!1;if(s.lineCount()==1){var f=s.getInputField();u=f.nodeName=="TEXTAREA"?!s.getLine(0).length:!/[^\u200b]/.test(f.querySelector(".CodeMirror-line").textContent)}u?t(s):e(s)},20)}function i(s){a(s)&&t(s)}function o(s){var u=s.getWrapperElement(),f=a(s);u.className=u.className.replace(" CodeMirror-empty","")+(f?" CodeMirror-empty":""),f?t(s):e(s)}function a(s){return s.lineCount()===1&&s.getLine(0)===""}})});var ooe=V((noe,ioe)=>{(function(r){typeof noe=="object"&&typeof ioe=="object"?r(tr()):typeof define=="function"&&define.amd?define(["../../lib/codemirror"],r):r(CodeMirror)})(function(r){"use strict";r.defineOption("styleSelectedText",!1,function(c,h,p){var m=p&&p!=r.Init;h&&!m?(c.state.markedSelection=[],c.state.markedSelectionStyle=typeof h=="string"?h:"CodeMirror-selectedtext",u(c),c.on("cursorActivity",e),c.on("change",t)):!h&&m&&(c.off("cursorActivity",e),c.off("change",t),s(c),c.state.markedSelection=c.state.markedSelectionStyle=null)});function e(c){c.state.markedSelection&&c.operation(function(){f(c)})}function t(c){c.state.markedSelection&&c.state.markedSelection.length&&c.operation(function(){s(c)})}var n=8,i=r.Pos,o=r.cmpPos;function a(c,h,p,m){if(o(h,p)!=0)for(var y=c.state.markedSelection,b=c.state.markedSelectionStyle,k=h.line;;){var x=k==h.line?h:i(k,0),S=k+n,E=S>=p.line,C=E?p:i(S,0),D=c.markText(x,C,{className:b});if(m==null?y.push(D):y.splice(m++,0,D),E)break;k=S}}function s(c){for(var h=c.state.markedSelection,p=0;p<h.length;++p)h[p].clear();h.length=0}function u(c){s(c);for(var h=c.listSelections(),p=0;p<h.length;p++)a(c,h[p].from(),h[p].to())}function f(c){if(!c.somethingSelected())return s(c);if(c.listSelections().length>1)return u(c);var h=c.getCursor("start"),p=c.getCursor("end"),m=c.state.markedSelection;if(!m.length)return a(c,h,p);var y=m[0].find(),b=m[m.length-1].find();if(!y||!b||p.line-h.line<=n||o(h,b.to)>=0||o(p,y.from)<=0)return u(c);for(;o(h,y.from)>0;)m.shift().clear(),y=m[0].find();for(o(h,y.from)<0&&(y.to.line-h.line<n?(m.shift().clear(),a(c,h,y.to,0)):a(c,h,y.from,0));o(p,b.to)<0;)m.pop().clear(),b=m[m.length-1].find();o(p,b.to)>0&&(p.line-b.from.line<n?(m.pop().clear(),a(c,b.from,p)):a(c,b.to,p))}})});var loe=V((aoe,soe)=>{(function(r){typeof aoe=="object"&&typeof soe=="object"?r(tr(),Ux(),Vx()):typeof define=="function"&&define.amd?define(["../../lib/codemirror","../markdown/markdown","../../addon/mode/overlay"],r):r(CodeMirror)})(function(r){"use strict";var e=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;r.defineMode("gfm",function(t,n){var i=0;function o(f){return f.code=!1,null}var a={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(f){return{code:f.code,codeBlock:f.codeBlock,ateSpace:f.ateSpace}},token:function(f,c){if(c.combineTokens=null,c.codeBlock)return f.match(/^```+/)?(c.codeBlock=!1,null):(f.skipToEnd(),null);if(f.sol()&&(c.code=!1),f.sol()&&f.match(/^```+/))return f.skipToEnd(),c.codeBlock=!0,null;if(f.peek()==="`"){f.next();var h=f.pos;f.eatWhile("`");var p=1+f.pos-h;return c.code?p===i&&(c.code=!1):(i=p,c.code=!0),null}else if(c.code)return f.next(),null;if(f.eatSpace())return c.ateSpace=!0,null;if((f.sol()||c.ateSpace)&&(c.ateSpace=!1,n.gitHubSpice!==!1)){if(f.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/))return c.combineTokens=!0,"link";if(f.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/))return c.combineTokens=!0,"link"}return f.match(e)&&f.string.slice(f.start-2,f.start)!="]("&&(f.start==0||/\W/.test(f.string.charAt(f.start-1)))?(c.combineTokens=!0,"link"):(f.next(),null)},blankLine:o},s={taskLists:!0,strikethrough:!0,emoji:!0};for(var u in n)s[u]=n[u];return s.name="markdown",r.overlayMode(r.getMode(t,s),a)},"markdown"),r.defineMIME("text/x-gfm","gfm")})});var uoe=V(()=>{});var coe=V((mwt,zI)=>{var jI;(function(){"use strict";jI=function(r,e,t,n){n=n||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=n.flags||{},this.memoized={},this.loaded=!1;var i=this,o,a,s,u,f;r&&(i.dictionary=r,e&&t?m():typeof window<"u"&&"chrome"in window&&"extension"in window.chrome&&"getURL"in window.chrome.extension?(n.dictionaryPath?o=n.dictionaryPath:o="typo/dictionaries",e||c(chrome.extension.getURL(o+"/"+r+"/"+r+".aff"),h),t||c(chrome.extension.getURL(o+"/"+r+"/"+r+".dic"),p)):(n.dictionaryPath?o=n.dictionaryPath:typeof __dirname<"u"?o=__dirname+"/dictionaries":o="./dictionaries",e||c(o+"/"+r+"/"+r+".aff",h),t||c(o+"/"+r+"/"+r+".dic",p)));function c(y,b){var k=i._readFile(y,null,n.asyncLoad);n.asyncLoad?k.then(function(x){b(x)}):b(k)}function h(y){e=y,t&&m()}function p(y){t=y,e&&m()}function m(){for(i.rules=i._parseAFF(e),i.compoundRuleCodes={},a=0,u=i.compoundRules.length;a<u;a++){var y=i.compoundRules[a];for(s=0,f=y.length;s<f;s++)i.compoundRuleCodes[y[s]]=[]}"ONLYINCOMPOUND"in i.flags&&(i.compoundRuleCodes[i.flags.ONLYINCOMPOUND]=[]),i.dictionaryTable=i._parseDIC(t);for(a in i.compoundRuleCodes)i.compoundRuleCodes[a].length===0&&delete i.compoundRuleCodes[a];for(a=0,u=i.compoundRules.length;a<u;a++){var b=i.compoundRules[a],k="";for(s=0,f=b.length;s<f;s++){var x=b[s];x in i.compoundRuleCodes?k+="("+i.compoundRuleCodes[x].join("|")+")":k+=x}i.compoundRules[a]=new RegExp(k,"i")}i.loaded=!0,n.asyncLoad&&n.loadedCallback&&n.loadedCallback(i)}return this},jI.prototype={load:function(r){for(var e in r)r.hasOwnProperty(e)&&(this[e]=r[e]);return this},_readFile:function(r,e,t){if(e=e||"utf8",typeof XMLHttpRequest<"u"){var n,i=new XMLHttpRequest;return i.open("GET",r,t),t&&(n=new Promise(function(a,s){i.onload=function(){i.status===200?a(i.responseText):s(i.statusText)},i.onerror=function(){s(i.statusText)}})),i.overrideMimeType&&i.overrideMimeType("text/plain; charset="+e),i.send(null),t?n:i.responseText}else if(typeof jL<"u"){var o=uoe();try{if(o.existsSync(r))return o.readFileSync(r,e);console.log("Path "+r+" does not exist.")}catch(a){return console.log(a),""}}},_parseAFF:function(r){var e={},t,n,i,o,a,s,u,f;r=this._removeAffixComments(r);var c=r.split(/\r?\n/);for(a=0,u=c.length;a<u;a++){t=c[a];var h=t.split(/\s+/),p=h[0];if(p=="PFX"||p=="SFX"){var m=h[1],y=h[2];i=parseInt(h[3],10);var b=[];for(s=a+1,f=a+1+i;s<f;s++){n=c[s],o=n.split(/\s+/);var k=o[2],x=o[3].split("/"),S=x[0];S==="0"&&(S="");var E=this.parseRuleCodes(x[1]),C=o[4],D={};D.add=S,E.length>0&&(D.continuationClasses=E),C!=="."&&(p==="SFX"?D.match=new RegExp(C+"$"):D.match=new RegExp("^"+C)),k!="0"&&(p==="SFX"?D.remove=new RegExp(k+"$"):D.remove=k),b.push(D)}e[m]={type:p,combineable:y=="Y",entries:b},a+=i}else if(p==="COMPOUNDRULE"){for(i=parseInt(h[1],10),s=a+1,f=a+1+i;s<f;s++)t=c[s],o=t.split(/\s+/),this.compoundRules.push(o[1]);a+=i}else p==="REP"?(o=t.split(/\s+/),o.length===3&&this.replacementTable.push([o[1],o[2]])):this.flags[p]=h[1]}return e},_removeAffixComments:function(r){return r=r.replace(/^\s*#.*$/mg,""),r=r.replace(/^\s\s*/m,"").replace(/\s\s*$/m,""),r=r.replace(/\n{2,}/g,`
|
129
129
|
`),r=r.replace(/^\s\s*/,"").replace(/\s\s*$/,""),r},_parseDIC:function(r){r=this._removeDicComments(r);var e=r.split(/\r?\n/),t={};function n(z,Y){t.hasOwnProperty(z)||(t[z]=null),Y.length>0&&(t[z]===null&&(t[z]=[]),t[z].push(Y))}for(var i=1,o=e.length;i<o;i++){var a=e[i];if(!!a){var s=a.split("/",2),u=s[0];if(s.length>1){var f=this.parseRuleCodes(s[1]);(!("NEEDAFFIX"in this.flags)||f.indexOf(this.flags.NEEDAFFIX)==-1)&&n(u,f);for(var c=0,h=f.length;c<h;c++){var p=f[c],m=this.rules[p];if(m)for(var y=this._applyRule(u,m),b=0,k=y.length;b<k;b++){var x=y[b];if(n(x,[]),m.combineable)for(var S=c+1;S<h;S++){var E=f[S],C=this.rules[E];if(C&&C.combineable&&m.type!=C.type)for(var D=this._applyRule(x,C),T=0,I=D.length;T<I;T++){var q=D[T];n(q,[])}}}p in this.compoundRuleCodes&&this.compoundRuleCodes[p].push(u)}}else n(u.trim(),[])}}return t},_removeDicComments:function(r){return r=r.replace(/^\t.*$/mg,""),r},parseRuleCodes:function(r){if(r)if("FLAG"in this.flags){if(this.flags.FLAG==="long"){for(var e=[],t=0,n=r.length;t<n;t+=2)e.push(r.substr(t,2));return e}else if(this.flags.FLAG==="num")return r.split(",")}else return r.split("");else return[]},_applyRule:function(r,e){for(var t=e.entries,n=[],i=0,o=t.length;i<o;i++){var a=t[i];if(!a.match||r.match(a.match)){var s=r;if(a.remove&&(s=s.replace(a.remove,"")),e.type==="SFX"?s=s+a.add:s=a.add+s,n.push(s),"continuationClasses"in a)for(var u=0,f=a.continuationClasses.length;u<f;u++){var c=this.rules[a.continuationClasses[u]];c&&(n=n.concat(this._applyRule(s,c)))}}}return n},check:function(r){if(!this.loaded)throw"Dictionary not loaded.";var e=r.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(e))return!0;if(e.toUpperCase()===e){var t=e[0]+e.substring(1).toLowerCase();if(this.hasFlag(t,"KEEPCASE"))return!1;if(this.checkExact(t)||this.checkExact(e.toLowerCase()))return!0}var n=e[0].toLowerCase()+e.substring(1);if(n!==e){if(this.hasFlag(n,"KEEPCASE"))return!1;if(this.checkExact(n))return!0}return!1},checkExact:function(r){if(!this.loaded)throw"Dictionary not loaded.";var e=this.dictionaryTable[r],t,n;if(typeof e>"u"){if("COMPOUNDMIN"in this.flags&&r.length>=this.flags.COMPOUNDMIN){for(t=0,n=this.compoundRules.length;t<n;t++)if(r.match(this.compoundRules[t]))return!0}}else{if(e===null)return!0;if(typeof e=="object"){for(t=0,n=e.length;t<n;t++)if(!this.hasFlag(r,"ONLYINCOMPOUND",e[t]))return!0}}return!1},hasFlag:function(r,e,t){if(!this.loaded)throw"Dictionary not loaded.";return!!(e in this.flags&&(typeof t>"u"&&(t=Array.prototype.concat.apply([],this.dictionaryTable[r])),t&&t.indexOf(this.flags[e])!==-1))},alphabet:"",suggest:function(r,e){if(!this.loaded)throw"Dictionary not loaded.";if(e=e||5,this.memoized.hasOwnProperty(r)){var t=this.memoized[r].limit;if(e<=t||this.memoized[r].suggestions.length<t)return this.memoized[r].suggestions.slice(0,e)}if(this.check(r))return[];for(var n=0,i=this.replacementTable.length;n<i;n++){var o=this.replacementTable[n];if(r.indexOf(o[0])!==-1){var a=r.replace(o[0],o[1]);if(this.check(a))return[a]}}var s=this;s.alphabet="abcdefghijklmnopqrstuvwxyz";function u(c,h){var p={},m,y,b,k,x,S,E=s.alphabet.length;if(typeof c=="string"){var C=c;c={},c[C]=!0}for(var C in c)for(m=0,k=C.length+1;m<k;m++){var D=[C.substring(0,m),C.substring(m)];if(D[1]&&(S=D[0]+D[1].substring(1),(!h||s.check(S))&&(S in p?p[S]+=1:p[S]=1)),D[1].length>1&&D[1][1]!==D[1][0]&&(S=D[0]+D[1][1]+D[1][0]+D[1].substring(2),(!h||s.check(S))&&(S in p?p[S]+=1:p[S]=1)),D[1]){var T=D[1].substring(0,1).toUpperCase()===D[1].substring(0,1)?"uppercase":"lowercase";for(y=0;y<E;y++){var I=s.alphabet[y];T==="uppercase"&&(I=I.toUpperCase()),I!=D[1].substring(0,1)&&(S=D[0]+I+D[1].substring(1),(!h||s.check(S))&&(S in p?p[S]+=1:p[S]=1))}}if(D[1])for(y=0;y<E;y++){var T=D[0].substring(-1).toUpperCase()===D[0].substring(-1)&&D[1].substring(0,1).toUpperCase()===D[1].substring(0,1)?"uppercase":"lowercase",I=s.alphabet[y];T==="uppercase"&&(I=I.toUpperCase()),S=D[0]+I+D[1],(!h||s.check(S))&&(S in p?p[S]+=1:p[S]=1)}}return p}function f(c){var h=u(c),p=u(h,!0),m=p;for(var y in h)!s.check(y)||(y in m?m[y]+=h[y]:m[y]=h[y]);var b,k,x=[];for(b in m)m.hasOwnProperty(b)&&x.push([b,m[b]]);function S(T,I){var q=T[1],z=I[1];return q<z?-1:q>z?1:I[0].localeCompare(T[0])}x.sort(S).reverse();var E=[],C="lowercase";c.toUpperCase()===c?C="uppercase":c.substr(0,1).toUpperCase()+c.substr(1).toLowerCase()===c&&(C="capitalized");var D=e;for(b=0;b<Math.min(D,x.length);b++)C==="uppercase"?x[b][0]=x[b][0].toUpperCase():C==="capitalized"&&(x[b][0]=x[b][0].substr(0,1).toUpperCase()+x[b][0].substr(1)),!s.hasFlag(x[b][0],"NOSUGGEST")&&E.indexOf(x[b][0])==-1?E.push(x[b][0]):D++;return E}return this.memoized[r]={suggestions:f(r),limit:e},this.memoized[r].suggestions}}})();typeof zI<"u"&&(zI.exports=jI)});var hoe=V((gwt,doe)=>{"use strict";var foe=coe();function Cr(r){if(r=r||{},typeof r.codeMirrorInstance!="function"||typeof r.codeMirrorInstance.defineMode!="function"){console.log("CodeMirror Spell Checker: You must provide an instance of CodeMirror via the option `codeMirrorInstance`");return}String.prototype.includes||(String.prototype.includes=function(){"use strict";return String.prototype.indexOf.apply(this,arguments)!==-1}),r.codeMirrorInstance.defineMode("spell-checker",function(e){if(!Cr.aff_loading){Cr.aff_loading=!0;var t=new XMLHttpRequest;t.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.aff",!0),t.onload=function(){t.readyState===4&&t.status===200&&(Cr.aff_data=t.responseText,Cr.num_loaded++,Cr.num_loaded==2&&(Cr.typo=new foe("en_US",Cr.aff_data,Cr.dic_data,{platform:"any"})))},t.send(null)}if(!Cr.dic_loading){Cr.dic_loading=!0;var n=new XMLHttpRequest;n.open("GET","https://cdn.jsdelivr.net/codemirror.spell-checker/latest/en_US.dic",!0),n.onload=function(){n.readyState===4&&n.status===200&&(Cr.dic_data=n.responseText,Cr.num_loaded++,Cr.num_loaded==2&&(Cr.typo=new foe("en_US",Cr.aff_data,Cr.dic_data,{platform:"any"})))},n.send(null)}var i='!"#$%&()*+,-./:;<=>?@[\\]^_`{|}~ ',o={token:function(s){var u=s.peek(),f="";if(i.includes(u))return s.next(),null;for(;(u=s.peek())!=null&&!i.includes(u);)f+=u,s.next();return Cr.typo&&!Cr.typo.check(f)?"spell-error":null}},a=r.codeMirrorInstance.getMode(e,e.backdrop||"text/plain");return r.codeMirrorInstance.overlayMode(a,o,!0)})}Cr.num_loaded=0;Cr.aff_loading=!1;Cr.dic_loading=!1;Cr.aff_data="";Cr.dic_data="";Cr.typo;doe.exports=Cr});var koe=V(Ar=>{"use strict";Object.defineProperty(Ar,"__esModule",{value:!0});function poe(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,n.key,n)}}function o$e(r,e,t){return e&&poe(r.prototype,e),t&&poe(r,t),Object.defineProperty(r,"prototype",{writable:!1}),r}function a$e(r,e){if(!!r){if(typeof r=="string")return moe(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);if(t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set")return Array.from(r);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return moe(r,e)}}function moe(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function Ag(r,e){var t=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=a$e(r))||e&&r&&typeof r.length=="number"){t&&(r=t);var n=0;return function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|