avo 2.44.0 → 2.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of avo might be problematic. Click here for more details.

Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/app/components/avo/index/resource_table_component.html.erb +2 -2
  4. data/app/components/avo/index/resource_table_component.rb +16 -0
  5. data/app/components/avo/paginator_component.html.erb +29 -40
  6. data/app/components/avo/paginator_component.rb +18 -0
  7. data/app/components/avo/views/resource_edit_component.html.erb +6 -4
  8. data/app/controllers/avo/application_controller.rb +0 -1
  9. data/app/controllers/avo/associations_controller.rb +1 -1
  10. data/app/controllers/avo/base_controller.rb +8 -9
  11. data/app/javascript/js/controllers/action_controller.js +2 -2
  12. data/app/views/avo/partials/_flash_alerts.turbo_stream.erb +1 -1
  13. data/config/i18n-tasks.yml +1 -1
  14. data/config/initializers/pagy.rb +2 -0
  15. data/lib/avo/base_action.rb +7 -5
  16. data/lib/avo/base_resource.rb +1 -0
  17. data/lib/avo/concerns/pagination.rb +53 -0
  18. data/lib/avo/version.rb +1 -1
  19. data/lib/generators/avo/templates/locales/avo.ar.yml +5 -5
  20. data/lib/generators/avo/templates/locales/avo.en.yml +2 -0
  21. data/lib/generators/avo/templates/locales/avo.es.yml +126 -0
  22. data/lib/generators/avo/templates/locales/avo.fr.yml +2 -0
  23. data/lib/generators/avo/templates/locales/avo.nb.yml +2 -0
  24. data/lib/generators/avo/templates/locales/avo.nn.yml +2 -0
  25. data/lib/generators/avo/templates/locales/avo.pt-BR.yml +2 -0
  26. data/lib/generators/avo/templates/locales/avo.pt.yml +2 -0
  27. data/lib/generators/avo/templates/locales/avo.ro.yml +2 -0
  28. data/lib/generators/avo/templates/locales/avo.tr.yml +2 -0
  29. data/public/avo-assets/avo.base.js +1 -1
  30. data/public/avo-assets/avo.base.js.map +2 -2
  31. metadata +4 -2
@@ -80,6 +80,7 @@ tr:
80
80
  to_top: Kaydı en üste taşı
81
81
  per_page: Sayfa başına
82
82
  prev_page: Önceki sayfa
83
+ records_selected_from_all_pages_html: Tüm sayfalardan seçilen tüm kayıtlar
83
84
  remove_selection: Seçimi sil
84
85
  reset_filters: Filtreleri sıfırla
85
86
  resource_created: Kayıt oluşturuldu
@@ -117,4 +118,5 @@ tr:
117
118
  zero: daha fazla öğe yok
118
119
  x_records_selected_from_a_total_of_x_html: <span class="font-bold text-gray-700">%{selected}</span> bu sayfada seçilen toplam kayıtlar <span class="font-bold text-gray-700">%{count}</span>
119
120
  x_records_selected_from_all_pages_html: <span class="font-bold text-gray-700">%{count}</span> tüm sayfalardan seçilen kayıtlar
121
+ x_records_selected_from_page_html: <span class="font-bold text-gray-700">%{selected}</span> bu sayfada seçilen kayıtlar
120
122
  you_missed_something_check_form: Bir şeyleri kaçırmış olabilirsiniz. Lütfen formu kontrol edin.
@@ -535,7 +535,7 @@ uniform `+ze+" "+Be+" u_"+Ve+`;
535
535
 
536
536
  %o
537
537
 
538
- %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()}};Uet={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},Het={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}},nle={default:Wet,array:ile,object:ile};dn=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:a=!0,cancelable:l=!0}={}){let h=i?`${i}:${e}`:e,y=new CustomEvent(h,{detail:n,bubbles:a,cancelable:l});return t.dispatchEvent(y),y}};dn.blessings=[Met,Pet,Fet];dn.targets=[];dn.values={}});var RS,Dle,V2,bz,Ole,xz,$2,Ile,Mle,Lle=Je(()=>{Mo();RS=class extends dn{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}};RS.values={dismissAfter:Number,showDelay:Number,removeDelay:Number},RS.classes=["show","hide"];Dle=class extends dn{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)}};Dle.targets=["form","status"];V2=class extends dn{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))}};V2.targets=["menu","button"],V2.values={open:Boolean};bz=class extends dn{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)}};bz.targets=["container"],bz.values={backdropColor:{type:String,default:"rgba(0, 0, 0, 0.8)"},restoreScroll:{type:Boolean,default:!0}};Ole=class extends dn{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}};Ole.targets=["tab","panel"];xz=class extends dn{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)})}};xz.targets=["toggleable"],xz.values={open:Boolean};$2=class extends dn{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")}};$2.targets=["content"];Ile=class extends V2{_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))}};Ile.targets=["menu","overlay"];Mle=class extends dn{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"}};Mle.targets=["preview","color"]});function Vet(r,e){var t=e.attributes,n,i,a,l,h;if(!(e.nodeType===Ple||r.nodeType===Ple)){for(var y=t.length-1;y>=0;y--)n=t[y],i=n.name,a=n.namespaceURI,l=n.value,a?(i=n.localName||i,h=r.getAttributeNS(a,i),h!==l&&(n.prefix==="xmlns"&&(i=n.name),r.setAttributeNS(a,i,l))):(h=r.getAttribute(i),h!==l&&r.setAttribute(i,l));for(var k=r.attributes,E=k.length-1;E>=0;E--)n=k[E],i=n.name,a=n.namespaceURI,a?(i=n.localName||i,e.hasAttributeNS(a,i)||r.removeAttributeNS(a,i)):e.hasAttribute(i)||r.removeAttribute(i)}}function Yet(r){var e=dh.createElement("template");return e.innerHTML=r,e.content.childNodes[0]}function Zet(r){G2||(G2=dh.createRange(),G2.selectNode(dh.body));var e=G2.createContextualFragment(r);return e.childNodes[0]}function Xet(r){var e=dh.createElement("body");return e.innerHTML=r,e.childNodes[0]}function Jet(r){return r=r.trim(),Get?Yet(r):Ket?Zet(r):Xet(r)}function K2(r,e){var t=r.nodeName,n=e.nodeName,i,a;return t===n?!0:(i=t.charCodeAt(0),a=n.charCodeAt(0),i<=90&&a>=97?t===n.toUpperCase():a<=90&&i>=97?n===t.toUpperCase():!1)}function Qet(r,e){return!e||e===$et?dh.createElement(r):dh.createElementNS(e,r)}function ett(r,e){for(var t=r.firstChild;t;){var n=t.nextSibling;e.appendChild(t),t=n}return e}function _z(r,e,t){r[t]!==e[t]&&(r[t]=e[t],r[t]?r.setAttribute(t,""):r.removeAttribute(t))}function Nv(){}function ttt(r){if(r)return r.getAttribute&&r.getAttribute("id")||r.id}function rtt(r){return function(t,n,i){if(i||(i={}),typeof n=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var a=n;n=dh.createElement("html"),n.innerHTML=a}else n=Jet(n);else n.nodeType===Fle&&(n=n.firstElementChild);var l=i.getNodeKey||ttt,h=i.onBeforeNodeAdded||Nv,y=i.onNodeAdded||Nv,k=i.onBeforeElUpdated||Nv,E=i.onElUpdated||Nv,L=i.onBeforeNodeDiscarded||Nv,q=i.onNodeDiscarded||Nv,B=i.onBeforeElChildrenUpdated||Nv,j=i.skipFromChildren||Nv,U=i.addChild||function(re,ae){return re.appendChild(ae)},J=i.childrenOnly===!0,te=Object.create(null),ie=[];function de(re){ie.push(re)}function _(re,ae){if(re.nodeType===FS)for(var De=re.firstChild;De;){var Z=void 0;ae&&(Z=l(De))?de(Z):(q(De),De.firstChild&&_(De,ae)),De=De.nextSibling}}function ye(re,ae,De){L(re)!==!1&&(ae&&ae.removeChild(re),q(re),_(re,De))}function ce(re){if(re.nodeType===FS||re.nodeType===Fle)for(var ae=re.firstChild;ae;){var De=l(ae);De&&(te[De]=ae),ce(ae),ae=ae.nextSibling}}ce(t);function be(re){y(re);for(var ae=re.firstChild;ae;){var De=ae.nextSibling,Z=l(ae);if(Z){var V=te[Z];V&&K2(ae,V)?(ae.parentNode.replaceChild(V,ae),ke(V,ae)):be(ae)}else be(ae);ae=De}}function xe(re,ae,De){for(;ae;){var Z=ae.nextSibling;(De=l(ae))?de(De):ye(ae,re,!0),ae=Z}}function ke(re,ae,De){var Z=l(ae);Z&&delete te[Z],!(!De&&(k(re,ae)===!1||(r(re,ae),E(re),B(re,ae)===!1)))&&(re.nodeName!=="TEXTAREA"?Te(re,ae):Rle.TEXTAREA(re,ae))}function Te(re,ae){var De=j(re),Z=ae.firstChild,V=re.firstChild,Ke,rt,Ye,It,kt;e:for(;Z;){for(It=Z.nextSibling,Ke=l(Z);!De&&V;){if(Ye=V.nextSibling,Z.isSameNode&&Z.isSameNode(V)){Z=It,V=Ye;continue e}rt=l(V);var Vt=V.nodeType,Ft=void 0;if(Vt===Z.nodeType&&(Vt===FS?(Ke?Ke!==rt&&((kt=te[Ke])?Ye===kt?Ft=!1:(re.insertBefore(kt,V),rt?de(rt):ye(V,re,!0),V=kt):Ft=!1):rt&&(Ft=!1),Ft=Ft!==!1&&K2(V,Z),Ft&&ke(V,Z)):(Vt===qle||Vt==Nle)&&(Ft=!0,V.nodeValue!==Z.nodeValue&&(V.nodeValue=Z.nodeValue))),Ft){Z=It,V=Ye;continue e}rt?de(rt):ye(V,re,!0),V=Ye}if(Ke&&(kt=te[Ke])&&K2(kt,Z))U(re,kt),ke(kt,Z);else{var lr=h(Z);lr!==!1&&(lr&&(Z=lr),Z.actualize&&(Z=Z.actualize(re.ownerDocument||dh)),U(re,Z),be(Z))}Z=It,V=Ye}xe(re,V,rt);var ur=Rle[re.nodeName];ur&&ur(re,ae)}var Xe=t,A=Xe.nodeType,P=n.nodeType;if(!J){if(A===FS)P===FS?K2(t,n)||(q(t),Xe=ett(t,Qet(n.nodeName,n.namespaceURI))):Xe=n;else if(A===qle||A===Nle){if(P===A)return Xe.nodeValue!==n.nodeValue&&(Xe.nodeValue=n.nodeValue),Xe;Xe=n}}if(Xe===n)q(t);else{if(n.isSameNode&&n.isSameNode(Xe))return;if(ke(Xe,n,J),ie)for(var $=0,ee=ie.length;$<ee;$++){var X=te[ie[$]];X&&ye(X,X.parentNode,!1)}}return!J&&Xe!==t&&t.parentNode&&(Xe.actualize&&(Xe=Xe.actualize(t.ownerDocument||dh)),t.parentNode.replaceChild(Xe,t)),Xe}}function itt(){let r={childrenOnly:this.hasAttribute("children-only")};this.targetElements.forEach(e=>{ntt(e,r.childrenOnly?this.templateContent:this.templateElement.innerHTML,r)})}function wz(r){return r.replace(/(?:[_-])([a-z0-9])/g,(e,t)=>t.toUpperCase())}function att(r){return r.charAt(0).toUpperCase()+r.slice(1)}function stt(r){return r.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`)}function Y2(r){return r?r.match(/[^\s]+/g)||[]:[]}function Sz(r){try{return JSON.parse(r)}catch{return r}}function Ble(){let r=Y2(this.getAttribute("classes"));r.length>0?this.targetElements.forEach(e=>e.classList.add(...r)):console.warn('[TurboPower] no "classes" provided for Turbo Streams operation "add_css_class"')}function jle(){let r=this.getAttribute("attribute");r?this.targetElements.forEach(e=>e.removeAttribute(r)):console.warn('[TurboPower] no "attribute" provided for Turbo Streams operation "remove_attribute"')}function Ule(){let r=Y2(this.getAttribute("classes"));r.length>0?this.targetElements.forEach(e=>e.classList.remove(...r)):console.warn('[TurboPower] no "classes" provided for Turbo Streams operation "remove_css_class"')}function Hle(){let r=this.getAttribute("attribute"),e=this.getAttribute("value")||"";r?this.targetElements.forEach(t=>t.setAttribute(r,e)):console.warn('[TurboPower] no "attribute" provided for Turbo Streams operation "set_attribute"')}function Wle(){let r=this.getAttribute("attribute"),e=this.getAttribute("value")||"";r?this.targetElements.forEach(t=>t.dataset[wz(r)]=e):console.warn('[TurboPower] no "attribute" provided for Turbo Streams operation "set_dataset_attribute"')}function Vle(){let r=this.getAttribute("name"),e=Sz(this.getAttribute("value")||"");r?this.targetElements.forEach(t=>t[r]=e):console.error('[TurboPower] no "name" provided for Turbo Streams operation "set_property"')}function $le(){let r=this.getAttribute("name"),e=this.getAttribute("value")||"";r?this.targetElements.forEach(t=>t.style[r]=e):console.error('[TurboPower] no "name" provided for Turbo Streams operation "set_style"')}function Gle(){let r=this.getAttribute("styles")||"";this.targetElements.forEach(e=>e.setAttribute("style",r))}function Kle(){let r=this.getAttribute("value")||"";this.targetElements.forEach(e=>e.value=r)}function Yle(){let r=Y2(this.getAttribute("classes"));r.length>0?this.targetElements.forEach(e=>{r.forEach(t=>e.classList.toggle(t))}):console.warn('[TurboPower] no "classes" provided for Turbo Streams operation "toggle_css_class"')}function Zle(r){r.add_css_class=Ble,r.remove_css_class=Ule,r.remove_attribute=jle,r.set_attribute=Hle,r.set_dataset_attribute=Wle,r.set_property=Vle,r.set_style=$le,r.set_styles=Gle,r.set_value=Kle,r.toggle_css_class=Yle}function Xle(){window.location.reload()}function Jle(){this.targetElements.forEach(r=>r.scrollIntoView())}function Qle(){this.targetElements.forEach(r=>r.focus())}function eue(){let r=this.getAttribute("title")||"",e=document.head.querySelector("title");e||(e=document.createElement("title"),document.head.appendChild(e)),e.textContent=r}function tue(r){r.reload=Xle,r.scroll_into_view=Jle,r.set_focus=Qle,r.set_title=eue}function rue(){let r=this.getAttribute("message"),e=this.getAttribute("level")||"log";console[e](r)}function nue(){let r=JSON.parse(this.getAttribute("data")||"[]"),e=JSON.parse(this.getAttribute("columns")||"[]");console.table(r,e)}function iue(r){r.console_log=rue,r.console_table=nue}function oue(){console.warn("[TurboPower] The `invoke` Turbo Stream Action was removed from TurboPower. If you'd like to continue using this action please use the successor library instead. Read more here: https://github.com/hopsoft/turbo_boost-streams")}function aue(r){r.invoke||(r.invoke=oue)}function lue(){let r=this.getAttribute("cookie")||"";document.cookie=r}function uue(){let r=new sue(this);document.cookie=r.build()}function cue(r){r.set_cookie=lue,r.set_cookie_item=uue}function fue(){let r=this.getAttribute("parent");if(r){let e=document.querySelector(r);e?this.targetElements.forEach(t=>e.appendChild(t)):console.error(`[TurboPower] couldn't find parent element using selector "${r}" for Turbo Streams operation "graft"`)}else console.error('[TurboPower] no "parent" selector provided for Turbo Streams operation "graft"')}function hue(){let r=this.templateContent.textContent||"";this.targetElements.forEach(e=>e.innerHTML=r)}function due(){let r=this.getAttribute("position")||"beforebegin",e=this.templateContent.textContent||"";this.targetElements.forEach(t=>t.insertAdjacentHTML(r,e))}function pue(){let r=this.getAttribute("position")||"beforebegin",e=this.getAttribute("text")||"";this.targetElements.forEach(t=>t.insertAdjacentText(r,e))}function mue(){let r=this.templateContent.textContent||"";this.targetElements.forEach(e=>e.outerHTML=r)}function gue(){let r=this.getAttribute("name"),e=this.getAttribute("content")||"";if(r){let t=document.head.querySelector(`meta[name='${r}']`);t||(t=document.createElement("meta"),t.name=r,document.head.appendChild(t)),t.content=e}else console.error('[TurboPower] no "name" provided for Turbo Streams operation "set_meta"')}function vue(){let r=this.getAttribute("text")||"";this.targetElements.forEach(e=>e.textContent=r)}function yue(r){r.graft=fue,r.inner_html=hue,r.insert_adjacent_html=due,r.insert_adjacent_text=pue,r.outer_html=mue,r.text_content=vue,r.set_meta=gue}function bue(){let r=this.getAttribute("name"),e=null;try{e=this.templateContent.textContent}catch{}try{let t=e?JSON.parse(e):{};if(r){let n={bubbles:!0,cancelable:!0,detail:t},i=new CustomEvent(r,n);this.targetElements.forEach(a=>a.dispatchEvent(i))}else console.warn('[TurboPower] no "name" provided for Turbo Streams operation "dispatch_event"')}catch(t){console.error(`[TurboPower] error proccessing provided "detail" in "<template>" ("${e}") for Turbo Streams operation "dispatch_event". Error: "${t.message}"`)}}function xue(r){r.dispatch_event=bue}function _ue(){this.targetElements.forEach(r=>r.reset())}function wue(r){r.reset_form=_ue}function Sue(){let r=this.getAttribute("url"),e=this.getAttribute("state"),t=this.getAttribute("title")||"";window.history.pushState(e,t,r)}function kue(){let r=this.getAttribute("url"),e=this.getAttribute("state"),t=this.getAttribute("title")||"";window.history.replaceState(e,t,r)}function Tue(){window.history.back()}function utt(){window.history.forward()}function Cue(){let r=Number(this.getAttribute("delta"))||0;window.history.go(r)}function Eue(r){r.push_state=Sue,r.replace_state=kue,r.history_back=Tue,r.history_go=Cue}function Aue(){window.Notification?Notification.permission==="granted"?zle(this):Notification.permission!=="denied"&&Notification.requestPermission().then(r=>{r==="granted"&&zle(this)}):alert("This browser does not support desktop notification")}function Due(r){r.notification=Aue}function kz(r){return r==="session"?window.sessionStorage:window.localStorage}function Oue(){let r=this.getAttribute("type");kz(r).clear()}function Iue(){let r=this.getAttribute("key"),e=this.getAttribute("value")||"",t=this.getAttribute("type");r?kz(t).setItem(r,e):console.warn('[TurboPower] no "key" provided for Turbo Streams operation "set_storage_item"')}function Mue(){let r=this.getAttribute("key"),e=this.getAttribute("type");r?kz(e).removeItem(r):console.warn('[TurboPower] no "key" provided for Turbo Streams operation "remove_storage_item"')}function Lue(r){r.clear_storage=Oue,r.set_storage_item=Iue,r.remove_storage_item=Mue}function Pue(){let r=this.getAttribute("url")||"/",e=this.getAttribute("turbo-action")||"advance",t=this.getAttribute("turbo-frame"),n=this.getAttribute("turbo")!=="false",i={action:e};t&&(i.frame=t),n&&window.Turbo?window.Turbo.visit(r,i):ftt.location.assign(r)}function Rue(){window.Turbo.cache.clear()}function Fue(r){r.redirect_to=Pue,r.turbo_clear_cache=Rue}function que(){let r=this.getAttribute("value")||0;window.Turbo.navigator.adapter.progressBar.setValue(Number(r))}function Nue(){window.Turbo.navigator.adapter.progressBar.show()}function zue(){window.Turbo.navigator.adapter.progressBar.hide()}function Bue(r){r.turbo_progress_bar_set_value=que,r.turbo_progress_bar_show=Nue,r.turbo_progress_bar_hide=zue}function jue(){this.targetElements.forEach(r=>r.reload())}function Uue(){let r=this.getAttribute("src");this.targetElements.forEach(e=>e.src=r)}function Hue(r){r.turbo_frame_reload=jue,r.turbo_frame_set_src=Uue}function Wue(r){Zle(r),tue(r),iue(r),aue(r),cue(r),yue(r),xue(r),wue(r),Eue(r),Due(r),Lue(r),Fue(r),Bue(r),Hue(r)}function dtt(r){ott(r),Wue(r)}function ptt(r,e,t){t[r]=e}var Ple,G2,$et,dh,Get,Ket,Rle,FS,Fle,qle,Nle,ntt,ott,ltt,sue,ctt,zle,ftt,htt,Vue,$ue=Je(()=>{Ple=11;$et="http://www.w3.org/1999/xhtml",dh=typeof document>"u"?void 0:document,Get=!!dh&&"content"in dh.createElement("template"),Ket=!!dh&&dh.createRange&&"createContextualFragment"in dh.createRange();Rle={OPTION:function(r,e){var t=r.parentNode;if(t){var n=t.nodeName.toUpperCase();n==="OPTGROUP"&&(t=t.parentNode,n=t&&t.nodeName.toUpperCase()),n==="SELECT"&&!t.hasAttribute("multiple")&&(r.hasAttribute("selected")&&!e.selected&&(r.setAttribute("selected","selected"),r.removeAttribute("selected")),t.selectedIndex=-1)}_z(r,e,"selected")},INPUT:function(r,e){_z(r,e,"checked"),_z(r,e,"disabled"),r.value!==e.value&&(r.value=e.value),e.hasAttribute("value")||r.removeAttribute("value")},TEXTAREA:function(r,e){var t=e.value;r.value!==t&&(r.value=t);var n=r.firstChild;if(n){var i=n.nodeValue;if(i==t||!t&&i==r.placeholder)return;n.nodeValue=t}},SELECT:function(r,e){if(!e.hasAttribute("multiple")){for(var t=-1,n=0,i=r.firstChild,a,l;i;)if(l=i.nodeName&&i.nodeName.toUpperCase(),l==="OPTGROUP")a=i,i=a.firstChild;else{if(l==="OPTION"){if(i.hasAttribute("selected")){t=n;break}n++}i=i.nextSibling,!i&&a&&(i=a.nextSibling,a=null)}r.selectedIndex=t}}},FS=1,Fle=11,qle=3,Nle=8;ntt=rtt(Vet);ott=r=>{r.morph=itt};ltt=Object.freeze({__proto__:null,camelize:wz,capitalize:att,dasherize:stt,tokenize:Y2,typecast:Sz});sue=class{constructor(e){this.ATTRIBUTE_TO_COOKIE_KEY_MAPPING=[["domain","Domain",!1],["path","Path",!1],["expires","Expires",!1],["max-age","Max-Age",!1],["http-only","HttpOnly",!0],["secure","Secure",!0],["same-site","SameSite",!1]],this.streamElement=e}build(){let e=`${this.streamElement.getAttribute("name")}=${this.streamElement.getAttribute("value")}`;return this.ATTRIBUTE_TO_COOKIE_KEY_MAPPING.forEach(([t,n,i])=>{let a=this.streamElement.getAttribute(t);if(a!==null){let l=i?n:`${n}=${a}`;e=`${e}; ${l}`}}),e}};ctt=["dir","lang","badge","body","tag","icon","image","data","vibrate","renotify","require-interaction","actions","silent"],zle=r=>{let e=r.getAttribute("title")||"",t=Array.from(r.attributes).filter(i=>ctt.includes(i.name)).map(i=>[wz(i.name),Sz(i.value)]),n=Object.fromEntries(t);new Notification(e,n)};ftt={get location(){return window.TurboPowerLocation||window.location}};htt=Object.freeze({__proto__:null,add_css_class:Ble,clear_storage:Oue,console_log:rue,console_table:nue,dispatch_event:bue,graft:fue,history_back:Tue,history_forward:utt,history_go:Cue,inner_html:hue,insert_adjacent_html:due,insert_adjacent_text:pue,invoke:oue,notification:Aue,outer_html:mue,push_state:Sue,redirect_to:Pue,register:Wue,registerAttributesActions:Zle,registerBrowserActions:tue,registerDOMActions:yue,registerDebugActions:iue,registerDeprecatedActions:aue,registerDocumentActions:cue,registerEventsActions:xue,registerFormActions:wue,registerHistoryActions:Eue,registerNotificationActions:Due,registerStorageActions:Lue,registerTurboActions:Fue,registerTurboFrameActions:Hue,registerTurboProgressBarActions:Bue,reload:Xle,remove_attribute:jle,remove_css_class:Ule,remove_storage_item:Mue,replace_state:kue,reset_form:_ue,scroll_into_view:Jle,set_attribute:Hle,set_cookie:lue,set_cookie_item:uue,set_dataset_attribute:Wle,set_focus:Qle,set_meta:gue,set_property:Vle,set_storage_item:Iue,set_style:$le,set_styles:Gle,set_title:eue,set_value:Kle,text_content:vue,toggle_css_class:Yle,turbo_clear_cache:Rue,turbo_frame_reload:jue,turbo_frame_set_src:Uue,turbo_progress_bar_hide:zue,turbo_progress_bar_set_value:que,turbo_progress_bar_show:Nue});Vue={initialize:dtt,register:ptt,Actions:htt,Utils:ltt}});var Qi,Gue=Je(()=>{tle();Lle();Mo();$ue();Vue.initialize(Turbo.StreamActions);Qi=PS.start();Qi.debug=window==null?void 0:window.localStorage.getItem("avo.debug");window.Stimulus=Qi;Qi.register("alert",RS);Qi.register("popover",$2)});var Lf,Rx=Je(()=>{Lf=r=>r=="true"});var Z2,Kue=Je(()=>{Mo();Rx();Z2=class extends dn{connect(){this.resourceIdsTarget.value=this.resourceIds,this.selectionOptions.itemSelectAllSelectedAllValue==="true"&&(this.selectedAllQueryTarget.value=this.selectionOptions.itemSelectAllSelectedAllQueryValue),this.noConfirmation?this.formTarget.submit():this.controllerDivTarget.classList.remove("hidden")}get noConfirmation(){return Lf(this.controllerDivTarget.dataset.noConfirmation)}get resourceName(){return this.controllerDivTarget.dataset.resourceName}get resourceIds(){try{return JSON.parse(this.selectionOptions.selectedResources)}catch(r){return[]}}get selectionOptions(){try{return document.querySelector(`[data-selected-resources-name="${this.resourceName}"]`).dataset}catch(r){return[]}}};Qr(Z2,"targets",["controllerDiv","resourceIds","form","selectedAllQuery"])});var qS,Yue=Je(()=>{Mo();qS=class extends dn{constructor(){super(...arguments);Qr(this,"target",{})}get targetIsDisabled(){return this.target.dataset.disabled==="true"}get actionsShowTurboFrame(){return document.querySelector("turbo-frame#actions_show")}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=this;setTimeout(()=>{this.actionsShowTurboFrame.loaded.then(()=>e.enableTarget(e.target))},1)}};Qr(qS,"targets",["resourceAction","standaloneAction"]),Qr(qS,"classes",["enabled","disabled"])});var X2,Zue=Je(()=>{Mo();X2=class extends dn{connect(){this.formTarget.submit()}};Qr(X2,"targets",["form"])});var J2,Xue=Je(()=>{Mo();J2=class extends dn{constructor(){super(...arguments);Qr(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"))}};Qr(J2,"targets",["select","type","loadAssociationLink"])});var Jue=ve((Fx,qx)=>{(function(r){var e=typeof Fx=="object"&&Fx&&!Fx.nodeType&&Fx,t=typeof qx=="object"&&qx&&!qx.nodeType&&qx,n=typeof global=="object"&&global;(n.global===n||n.window===n||n.self===n)&&(r=n);var i,a=2147483647,l=36,h=1,y=26,k=38,E=700,L=72,q=128,B="-",j=/^xn--/,U=/[^\x20-\x7E]/,J=/[\x2E\u3002\uFF0E\uFF61]/g,te={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ie=l-h,de=Math.floor,_=String.fromCharCode,ye;function ce(ae){throw new RangeError(te[ae])}function be(ae,De){for(var Z=ae.length,V=[];Z--;)V[Z]=De(ae[Z]);return V}function xe(ae,De){var Z=ae.split("@"),V="";Z.length>1&&(V=Z[0]+"@",ae=Z[1]),ae=ae.replace(J,".");var Ke=ae.split("."),rt=be(Ke,De).join(".");return V+rt}function ke(ae){for(var De=[],Z=0,V=ae.length,Ke,rt;Z<V;)Ke=ae.charCodeAt(Z++),Ke>=55296&&Ke<=56319&&Z<V?(rt=ae.charCodeAt(Z++),(rt&64512)==56320?De.push(((Ke&1023)<<10)+(rt&1023)+65536):(De.push(Ke),Z--)):De.push(Ke);return De}function Te(ae){return be(ae,function(De){var Z="";return De>65535&&(De-=65536,Z+=_(De>>>10&1023|55296),De=56320|De&1023),Z+=_(De),Z}).join("")}function Xe(ae){return ae-48<10?ae-22:ae-65<26?ae-65:ae-97<26?ae-97:l}function A(ae,De){return ae+22+75*(ae<26)-((De!=0)<<5)}function P(ae,De,Z){var V=0;for(ae=Z?de(ae/E):ae>>1,ae+=de(ae/De);ae>ie*y>>1;V+=l)ae=de(ae/ie);return de(V+(ie+1)*ae/(ae+k))}function $(ae){var De=[],Z=ae.length,V,Ke=0,rt=q,Ye=L,It,kt,Vt,Ft,lr,ur,Dr,Zt,Mt;for(It=ae.lastIndexOf(B),It<0&&(It=0),kt=0;kt<It;++kt)ae.charCodeAt(kt)>=128&&ce("not-basic"),De.push(ae.charCodeAt(kt));for(Vt=It>0?It+1:0;Vt<Z;){for(Ft=Ke,lr=1,ur=l;Vt>=Z&&ce("invalid-input"),Dr=Xe(ae.charCodeAt(Vt++)),(Dr>=l||Dr>de((a-Ke)/lr))&&ce("overflow"),Ke+=Dr*lr,Zt=ur<=Ye?h:ur>=Ye+y?y:ur-Ye,!(Dr<Zt);ur+=l)Mt=l-Zt,lr>de(a/Mt)&&ce("overflow"),lr*=Mt;V=De.length+1,Ye=P(Ke-Ft,V,Ft==0),de(Ke/V)>a-rt&&ce("overflow"),rt+=de(Ke/V),Ke%=V,De.splice(Ke++,0,rt)}return Te(De)}function ee(ae){var De,Z,V,Ke,rt,Ye,It,kt,Vt,Ft,lr,ur=[],Dr,Zt,Mt,At;for(ae=ke(ae),Dr=ae.length,De=q,Z=0,rt=L,Ye=0;Ye<Dr;++Ye)lr=ae[Ye],lr<128&&ur.push(_(lr));for(V=Ke=ur.length,Ke&&ur.push(B);V<Dr;){for(It=a,Ye=0;Ye<Dr;++Ye)lr=ae[Ye],lr>=De&&lr<It&&(It=lr);for(Zt=V+1,It-De>de((a-Z)/Zt)&&ce("overflow"),Z+=(It-De)*Zt,De=It,Ye=0;Ye<Dr;++Ye)if(lr=ae[Ye],lr<De&&++Z>a&&ce("overflow"),lr==De){for(kt=Z,Vt=l;Ft=Vt<=rt?h:Vt>=rt+y?y:Vt-rt,!(kt<Ft);Vt+=l)At=kt-Ft,Mt=l-Ft,ur.push(_(A(Ft+At%Mt,0))),kt=de(At/Mt);ur.push(_(A(kt,0))),rt=P(Z,Zt,V==Ke),Z=0,++V}++Z,++De}return ur.join("")}function X(ae){return xe(ae,function(De){return j.test(De)?$(De.slice(4).toLowerCase()):De})}function re(ae){return xe(ae,function(De){return U.test(De)?"xn--"+ee(De):De})}if(i={version:"1.3.2",ucs2:{decode:ke,encode:Te},decode:$,encode:ee,toASCII:re,toUnicode:X},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return i});else if(e&&t)if(qx.exports==e)t.exports=i;else for(ye in i)i.hasOwnProperty(ye)&&(e[ye]=i[ye]);else r.punycode=i})(Fx)});var ece=ve((Que,Q2)=>{(function(r,e){"use strict";typeof Q2=="object"&&Q2.exports?Q2.exports=e():typeof define=="function"&&define.amd?define(e):r.IPv6=e(r)})(Que,function(r){"use strict";var e=r&&r.IPv6;function t(i){var a=i.toLowerCase(),l=a.split(":"),h=l.length,y=8;l[0]===""&&l[1]===""&&l[2]===""?(l.shift(),l.shift()):l[0]===""&&l[1]===""?l.shift():l[h-1]===""&&l[h-2]===""&&l.pop(),h=l.length,l[h-1].indexOf(".")!==-1&&(y=7);var k;for(k=0;k<h&&l[k]!=="";k++);if(k<y)for(l.splice(k,1,"0000");l.length<y;)l.splice(k,0,"0000");for(var E,L=0;L<y;L++){E=l[L].split("");for(var q=0;q<3&&(E[0]==="0"&&E.length>1);q++)E.splice(0,1);l[L]=E.join("")}var B=-1,j=0,U=0,J=-1,te=!1;for(L=0;L<y;L++)te?l[L]==="0"?U+=1:(te=!1,U>j&&(B=J,j=U)):l[L]==="0"&&(te=!0,J=L,U=1);U>j&&(B=J,j=U),j>1&&l.splice(B,j,""),h=l.length;var ie="";for(l[0]===""&&(ie=":"),L=0;L<h&&(ie+=l[L],L!==h-1);L++)ie+=":";return l[h-1]===""&&(ie+=":"),ie}function n(){return r.IPv6===this&&(r.IPv6=e),this}return{best:t,noConflict:n}})});var rce=ve((tce,eD)=>{(function(r,e){"use strict";typeof eD=="object"&&eD.exports?eD.exports=e():typeof define=="function"&&define.amd?define(e):r.SecondLevelDomains=e(r)})(tce,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 a=n.lastIndexOf(".",i-1);if(a<=0||a>=i-1)return!1;var l=t.list[n.slice(i+1)];return l?l.indexOf(" "+n.slice(a+1,i)+" ")>=0:!1},is:function(n){var i=n.lastIndexOf(".");if(i<=0||i>=n.length-1)return!1;var a=n.lastIndexOf(".",i-1);if(a>=0)return!1;var l=t.list[n.slice(i+1)];return l?l.indexOf(" "+n.slice(0,i)+" ")>=0:!1},get:function(n){var i=n.lastIndexOf(".");if(i<=0||i>=n.length-1)return null;var a=n.lastIndexOf(".",i-1);if(a<=0||a>=i-1)return null;var l=t.list[n.slice(i+1)];return!l||l.indexOf(" "+n.slice(a+1,i)+" ")<0?null:n.slice(a+1)},noConflict:function(){return r.SecondLevelDomains===this&&(r.SecondLevelDomains=e),this}};return t})});var Nx=ve((nce,tD)=>{(function(r,e){"use strict";typeof tD=="object"&&tD.exports?tD.exports=e(Jue(),ece(),rce()):typeof define=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],e):r.URI=e(r.punycode,r.IPv6,r.SecondLevelDomains,r)})(nce,function(r,e,t,n){"use strict";var i=n&&n.URI;function a(A,P){var $=arguments.length>=1,ee=arguments.length>=2;if(!(this instanceof a))return $?ee?new a(A,P):new a(A):new a;if(A===void 0){if($)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?A=location.href+"":A=""}if(A===null&&$)throw new TypeError("null is not a valid argument for URI");return this.href(A),P!==void 0?this.absoluteTo(P):this}function l(A){return/^[0-9]+$/.test(A)}a.version="1.19.11";var h=a.prototype,y=Object.prototype.hasOwnProperty;function k(A){return A.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function E(A){return A===void 0?"Undefined":String(Object.prototype.toString.call(A)).slice(8,-1)}function L(A){return E(A)==="Array"}function q(A,P){var $={},ee,X;if(E(P)==="RegExp")$=null;else if(L(P))for(ee=0,X=P.length;ee<X;ee++)$[P[ee]]=!0;else $[P]=!0;for(ee=0,X=A.length;ee<X;ee++){var re=$&&$[A[ee]]!==void 0||!$&&P.test(A[ee]);re&&(A.splice(ee,1),X--,ee--)}return A}function B(A,P){var $,ee;if(L(P)){for($=0,ee=P.length;$<ee;$++)if(!B(A,P[$]))return!1;return!0}var X=E(P);for($=0,ee=A.length;$<ee;$++)if(X==="RegExp"){if(typeof A[$]=="string"&&A[$].match(P))return!0}else if(A[$]===P)return!0;return!1}function j(A,P){if(!L(A)||!L(P)||A.length!==P.length)return!1;A.sort(),P.sort();for(var $=0,ee=A.length;$<ee;$++)if(A[$]!==P[$])return!1;return!0}function U(A){var P=/^\/+|\/+$/g;return A.replace(P,"")}a._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:a.preventInvalidHostname,duplicateQueryParameters:a.duplicateQueryParameters,escapeQuerySpace:a.escapeQuerySpace}},a.preventInvalidHostname=!1,a.duplicateQueryParameters=!1,a.escapeQuerySpace=!0,a.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,a.idn_expression=/[^a-z0-9\._-]/i,a.punycode_expression=/(xn--)/i,a.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,a.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*$/,a.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,a.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},a.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,a.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},a.hostProtocols=["http","https"],a.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,a.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"},a.getDomAttribute=function(A){if(!(!A||!A.nodeName)){var P=A.nodeName.toLowerCase();if(!(P==="input"&&A.type!=="image"))return a.domAttributes[P]}};function J(A){return escape(A)}function te(A){return encodeURIComponent(A).replace(/[!'()*]/g,J).replace(/\*/g,"%2A")}a.encode=te,a.decode=decodeURIComponent,a.iso8859=function(){a.encode=escape,a.decode=unescape},a.unicode=function(){a.encode=te,a.decode=decodeURIComponent},a.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"}}}},a.encodeQuery=function(A,P){var $=a.encode(A+"");return P===void 0&&(P=a.escapeQuerySpace),P?$.replace(/%20/g,"+"):$},a.decodeQuery=function(A,P){A+="",P===void 0&&(P=a.escapeQuerySpace);try{return a.decode(P?A.replace(/\+/g,"%20"):A)}catch{return A}};var ie={encode:"encode",decode:"decode"},de,_=function(A,P){return function($){try{return a[P]($+"").replace(a.characters[A][P].expression,function(ee){return a.characters[A][P].map[ee]})}catch{return $}}};for(de in ie)a[de+"PathSegment"]=_("pathname",ie[de]),a[de+"UrnPathSegment"]=_("urnpath",ie[de]);var ye=function(A,P,$){return function(ee){var X;$?X=function(Z){return a[P](a[$](Z))}:X=a[P];for(var re=(ee+"").split(A),ae=0,De=re.length;ae<De;ae++)re[ae]=X(re[ae]);return re.join(A)}};a.decodePath=ye("/","decodePathSegment"),a.decodeUrnPath=ye(":","decodeUrnPathSegment"),a.recodePath=ye("/","encodePathSegment","decode"),a.recodeUrnPath=ye(":","encodeUrnPathSegment","decode"),a.encodeReserved=_("reserved","encode"),a.parse=function(A,P){var $;return P||(P={preventInvalidHostname:a.preventInvalidHostname}),A=A.replace(a.leading_whitespace_expression,""),A=A.replace(a.ascii_tab_whitespace,""),$=A.indexOf("#"),$>-1&&(P.fragment=A.substring($+1)||null,A=A.substring(0,$)),$=A.indexOf("?"),$>-1&&(P.query=A.substring($+1)||null,A=A.substring(0,$)),A=A.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),A=A.replace(/^[/\\]{2,}/i,"//"),A.substring(0,2)==="//"?(P.protocol=null,A=A.substring(2),A=a.parseAuthority(A,P)):($=A.indexOf(":"),$>-1&&(P.protocol=A.substring(0,$)||null,P.protocol&&!P.protocol.match(a.protocol_expression)?P.protocol=void 0:A.substring($+1,$+3).replace(/\\/g,"/")==="//"?(A=A.substring($+3),A=a.parseAuthority(A,P)):(A=A.substring($+1),P.urn=!0))),P.path=A,P},a.parseHost=function(A,P){A||(A=""),A=A.replace(/\\/g,"/");var $=A.indexOf("/"),ee,X;if($===-1&&($=A.length),A.charAt(0)==="[")ee=A.indexOf("]"),P.hostname=A.substring(1,ee)||null,P.port=A.substring(ee+2,$)||null,P.port==="/"&&(P.port=null);else{var re=A.indexOf(":"),ae=A.indexOf("/"),De=A.indexOf(":",re+1);De!==-1&&(ae===-1||De<ae)?(P.hostname=A.substring(0,$)||null,P.port=null):(X=A.substring(0,$).split(":"),P.hostname=X[0]||null,P.port=X[1]||null)}return P.hostname&&A.substring($).charAt(0)!=="/"&&($++,A="/"+A),P.preventInvalidHostname&&a.ensureValidHostname(P.hostname,P.protocol),P.port&&a.ensureValidPort(P.port),A.substring($)||"/"},a.parseAuthority=function(A,P){return A=a.parseUserinfo(A,P),a.parseHost(A,P)},a.parseUserinfo=function(A,P){var $=A,ee=A.indexOf("\\");ee!==-1&&(A=A.replace(/\\/g,"/"));var X=A.indexOf("/"),re=A.lastIndexOf("@",X>-1?X:A.length-1),ae;return re>-1&&(X===-1||re<X)?(ae=A.substring(0,re).split(":"),P.username=ae[0]?a.decode(ae[0]):null,ae.shift(),P.password=ae[0]?a.decode(ae.join(":")):null,A=$.substring(re+1)):(P.username=null,P.password=null),A},a.parseQuery=function(A,P){if(!A)return{};if(A=A.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!A)return{};for(var $={},ee=A.split("&"),X=ee.length,re,ae,De,Z=0;Z<X;Z++)re=ee[Z].split("="),ae=a.decodeQuery(re.shift(),P),De=re.length?a.decodeQuery(re.join("="),P):null,ae!=="__proto__"&&(y.call($,ae)?((typeof $[ae]=="string"||$[ae]===null)&&($[ae]=[$[ae]]),$[ae].push(De)):$[ae]=De);return $},a.build=function(A){var P="",$=!1;return A.protocol&&(P+=A.protocol+":"),!A.urn&&(P||A.hostname)&&(P+="//",$=!0),P+=a.buildAuthority(A)||"",typeof A.path=="string"&&(A.path.charAt(0)!=="/"&&$&&(P+="/"),P+=A.path),typeof A.query=="string"&&A.query&&(P+="?"+A.query),typeof A.fragment=="string"&&A.fragment&&(P+="#"+A.fragment),P},a.buildHost=function(A){var P="";if(A.hostname)a.ip6_expression.test(A.hostname)?P+="["+A.hostname+"]":P+=A.hostname;else return"";return A.port&&(P+=":"+A.port),P},a.buildAuthority=function(A){return a.buildUserinfo(A)+a.buildHost(A)},a.buildUserinfo=function(A){var P="";return A.username&&(P+=a.encode(A.username)),A.password&&(P+=":"+a.encode(A.password)),P&&(P+="@"),P},a.buildQuery=function(A,P,$){var ee="",X,re,ae,De;for(re in A)if(re!=="__proto__"&&y.call(A,re))if(L(A[re]))for(X={},ae=0,De=A[re].length;ae<De;ae++)A[re][ae]!==void 0&&X[A[re][ae]+""]===void 0&&(ee+="&"+a.buildQueryParameter(re,A[re][ae],$),P!==!0&&(X[A[re][ae]+""]=!0));else A[re]!==void 0&&(ee+="&"+a.buildQueryParameter(re,A[re],$));return ee.substring(1)},a.buildQueryParameter=function(A,P,$){return a.encodeQuery(A,$)+(P!==null?"="+a.encodeQuery(P,$):"")},a.addQuery=function(A,P,$){if(typeof P=="object")for(var ee in P)y.call(P,ee)&&a.addQuery(A,ee,P[ee]);else if(typeof P=="string"){if(A[P]===void 0){A[P]=$;return}else typeof A[P]=="string"&&(A[P]=[A[P]]);L($)||($=[$]),A[P]=(A[P]||[]).concat($)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},a.setQuery=function(A,P,$){if(typeof P=="object")for(var ee in P)y.call(P,ee)&&a.setQuery(A,ee,P[ee]);else if(typeof P=="string")A[P]=$===void 0?null:$;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},a.removeQuery=function(A,P,$){var ee,X,re;if(L(P))for(ee=0,X=P.length;ee<X;ee++)A[P[ee]]=void 0;else if(E(P)==="RegExp")for(re in A)P.test(re)&&(A[re]=void 0);else if(typeof P=="object")for(re in P)y.call(P,re)&&a.removeQuery(A,re,P[re]);else if(typeof P=="string")$!==void 0?E($)==="RegExp"?!L(A[P])&&$.test(A[P])?A[P]=void 0:A[P]=q(A[P],$):A[P]===String($)&&(!L($)||$.length===1)?A[P]=void 0:L(A[P])&&(A[P]=q(A[P],$)):A[P]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},a.hasQuery=function(A,P,$,ee){switch(E(P)){case"String":break;case"RegExp":for(var X in A)if(y.call(A,X)&&P.test(X)&&($===void 0||a.hasQuery(A,X,$)))return!0;return!1;case"Object":for(var re in P)if(y.call(P,re)&&!a.hasQuery(A,re,P[re]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(E($)){case"Undefined":return P in A;case"Boolean":var ae=Boolean(L(A[P])?A[P].length:A[P]);return $===ae;case"Function":return!!$(A[P],P,A);case"Array":if(!L(A[P]))return!1;var De=ee?B:j;return De(A[P],$);case"RegExp":return L(A[P])?ee?B(A[P],$):!1:Boolean(A[P]&&A[P].match($));case"Number":$=String($);case"String":return L(A[P])?ee?B(A[P],$):!1:A[P]===$;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},a.joinPaths=function(){for(var A=[],P=[],$=0,ee=0;ee<arguments.length;ee++){var X=new a(arguments[ee]);A.push(X);for(var re=X.segment(),ae=0;ae<re.length;ae++)typeof re[ae]=="string"&&P.push(re[ae]),re[ae]&&$++}if(!P.length||!$)return new a("");var De=new a("").segment(P);return(A[0].path()===""||A[0].path().slice(0,1)==="/")&&De.path("/"+De.path()),De.normalize()},a.commonPath=function(A,P){var $=Math.min(A.length,P.length),ee;for(ee=0;ee<$;ee++)if(A.charAt(ee)!==P.charAt(ee)){ee--;break}return ee<1?A.charAt(0)===P.charAt(0)&&A.charAt(0)==="/"?"/":"":((A.charAt(ee)!=="/"||P.charAt(ee)!=="/")&&(ee=A.substring(0,ee).lastIndexOf("/")),A.substring(0,ee+1))},a.withinString=function(A,P,$){$||($={});var ee=$.start||a.findUri.start,X=$.end||a.findUri.end,re=$.trim||a.findUri.trim,ae=$.parens||a.findUri.parens,De=/[a-z0-9-]=["']?$/i;for(ee.lastIndex=0;;){var Z=ee.exec(A);if(!Z)break;var V=Z.index;if($.ignoreHtml){var Ke=A.slice(Math.max(V-3,0),V);if(Ke&&De.test(Ke))continue}for(var rt=V+A.slice(V).search(X),Ye=A.slice(V,rt),It=-1;;){var kt=ae.exec(Ye);if(!kt)break;var Vt=kt.index+kt[0].length;It=Math.max(It,Vt)}if(It>-1?Ye=Ye.slice(0,It)+Ye.slice(It).replace(re,""):Ye=Ye.replace(re,""),!(Ye.length<=Z[0].length)&&!($.ignore&&$.ignore.test(Ye))){rt=V+Ye.length;var Ft=P(Ye,V,rt,A);if(Ft===void 0){ee.lastIndex=rt;continue}Ft=String(Ft),A=A.slice(0,V)+Ft+A.slice(rt),ee.lastIndex=V+Ft.length}}return ee.lastIndex=0,A},a.ensureValidHostname=function(A,P){var $=!!A,ee=!!P,X=!1;if(ee&&(X=B(a.hostProtocols,P)),X&&!$)throw new TypeError("Hostname cannot be empty, if protocol is "+P);if(A&&A.match(a.invalid_hostname_characters)){if(!r)throw new TypeError('Hostname "'+A+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(r.toASCII(A).match(a.invalid_hostname_characters))throw new TypeError('Hostname "'+A+'" contains characters other than [A-Z0-9.-:_]')}},a.ensureValidPort=function(A){if(!!A){var P=Number(A);if(!(l(P)&&P>0&&P<65536))throw new TypeError('Port "'+A+'" is not a valid port')}},a.noConflict=function(A){if(A){var P={URI:this.noConflict()};return n.URITemplate&&typeof n.URITemplate.noConflict=="function"&&(P.URITemplate=n.URITemplate.noConflict()),n.IPv6&&typeof n.IPv6.noConflict=="function"&&(P.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&typeof n.SecondLevelDomains.noConflict=="function"&&(P.SecondLevelDomains=n.SecondLevelDomains.noConflict()),P}else n.URI===this&&(n.URI=i);return this},h.build=function(A){return A===!0?this._deferred_build=!0:(A===void 0||this._deferred_build)&&(this._string=a.build(this._parts),this._deferred_build=!1),this},h.clone=function(){return new a(this)},h.valueOf=h.toString=function(){return this.build(!1)._string};function ce(A){return function(P,$){return P===void 0?this._parts[A]||"":(this._parts[A]=P||null,this.build(!$),this)}}function be(A,P){return function($,ee){return $===void 0?this._parts[A]||"":($!==null&&($=$+"",$.charAt(0)===P&&($=$.substring(1))),this._parts[A]=$,this.build(!ee),this)}}h.protocol=ce("protocol"),h.username=ce("username"),h.password=ce("password"),h.hostname=ce("hostname"),h.port=ce("port"),h.query=be("query","?"),h.fragment=be("fragment","#"),h.search=function(A,P){var $=this.query(A,P);return typeof $=="string"&&$.length?"?"+$:$},h.hash=function(A,P){var $=this.fragment(A,P);return typeof $=="string"&&$.length?"#"+$:$},h.pathname=function(A,P){if(A===void 0||A===!0){var $=this._parts.path||(this._parts.hostname?"/":"");return A?(this._parts.urn?a.decodeUrnPath:a.decodePath)($):$}else return this._parts.urn?this._parts.path=A?a.recodeUrnPath(A):"":this._parts.path=A?a.recodePath(A):"/",this.build(!P),this},h.path=h.pathname,h.href=function(A,P){var $;if(A===void 0)return this.toString();this._string="",this._parts=a._parts();var ee=A instanceof a,X=typeof A=="object"&&(A.hostname||A.path||A.pathname);if(A.nodeName){var re=a.getDomAttribute(A);A=A[re]||"",X=!1}if(!ee&&X&&A.pathname!==void 0&&(A=A.toString()),typeof A=="string"||A instanceof String)this._parts=a.parse(String(A),this._parts);else if(ee||X){var ae=ee?A._parts:A;for($ in ae)$!=="query"&&y.call(this._parts,$)&&(this._parts[$]=ae[$]);ae.query&&this.query(ae.query,!1)}else throw new TypeError("invalid input");return this.build(!P),this},h.is=function(A){var P=!1,$=!1,ee=!1,X=!1,re=!1,ae=!1,De=!1,Z=!this._parts.urn;switch(this._parts.hostname&&(Z=!1,$=a.ip4_expression.test(this._parts.hostname),ee=a.ip6_expression.test(this._parts.hostname),P=$||ee,X=!P,re=X&&t&&t.has(this._parts.hostname),ae=X&&a.idn_expression.test(this._parts.hostname),De=X&&a.punycode_expression.test(this._parts.hostname)),A.toLowerCase()){case"relative":return Z;case"absolute":return!Z;case"domain":case"name":return X;case"sld":return re;case"ip":return P;case"ip4":case"ipv4":case"inet4":return $;case"ip6":case"ipv6":case"inet6":return ee;case"idn":return ae;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return De}return null};var xe=h.protocol,ke=h.port,Te=h.hostname;h.protocol=function(A,P){if(A&&(A=A.replace(/:(\/\/)?$/,""),!A.match(a.protocol_expression)))throw new TypeError('Protocol "'+A+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return xe.call(this,A,P)},h.scheme=h.protocol,h.port=function(A,P){return this._parts.urn?A===void 0?"":this:(A!==void 0&&(A===0&&(A=null),A&&(A+="",A.charAt(0)===":"&&(A=A.substring(1)),a.ensureValidPort(A))),ke.call(this,A,P))},h.hostname=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(A!==void 0){var $={preventInvalidHostname:this._parts.preventInvalidHostname},ee=a.parseHost(A,$);if(ee!=="/")throw new TypeError('Hostname "'+A+'" contains characters other than [A-Z0-9.-]');A=$.hostname,this._parts.preventInvalidHostname&&a.ensureValidHostname(A,this._parts.protocol)}return Te.call(this,A,P)},h.origin=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(A===void 0){var $=this.protocol(),ee=this.authority();return ee?($?$+"://":"")+this.authority():""}else{var X=a(A);return this.protocol(X.protocol()).authority(X.authority()).build(!P),this}},h.host=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(A===void 0)return this._parts.hostname?a.buildHost(this._parts):"";var $=a.parseHost(A,this._parts);if($!=="/")throw new TypeError('Hostname "'+A+'" contains characters other than [A-Z0-9.-]');return this.build(!P),this},h.authority=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(A===void 0)return this._parts.hostname?a.buildAuthority(this._parts):"";var $=a.parseAuthority(A,this._parts);if($!=="/")throw new TypeError('Hostname "'+A+'" contains characters other than [A-Z0-9.-]');return this.build(!P),this},h.userinfo=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(A===void 0){var $=a.buildUserinfo(this._parts);return $&&$.substring(0,$.length-1)}else return A[A.length-1]!=="@"&&(A+="@"),a.parseUserinfo(A,this._parts),this.build(!P),this},h.resource=function(A,P){var $;return A===void 0?this.path()+this.search()+this.hash():($=a.parse(A),this._parts.path=$.path,this._parts.query=$.query,this._parts.fragment=$.fragment,this.build(!P),this)},h.subdomain=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(A===void 0){if(!this._parts.hostname||this.is("IP"))return"";var $=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,$)||""}else{var ee=this._parts.hostname.length-this.domain().length,X=this._parts.hostname.substring(0,ee),re=new RegExp("^"+k(X));if(A&&A.charAt(A.length-1)!=="."&&(A+="."),A.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return A&&a.ensureValidHostname(A,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(re,A),this.build(!P),this}},h.domain=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(typeof A=="boolean"&&(P=A,A=void 0),A===void 0){if(!this._parts.hostname||this.is("IP"))return"";var $=this._parts.hostname.match(/\./g);if($&&$.length<2)return this._parts.hostname;var ee=this._parts.hostname.length-this.tld(P).length-1;return ee=this._parts.hostname.lastIndexOf(".",ee-1)+1,this._parts.hostname.substring(ee)||""}else{if(!A)throw new TypeError("cannot set domain empty");if(A.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(a.ensureValidHostname(A,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=A;else{var X=new RegExp(k(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(X,A)}return this.build(!P),this}},h.tld=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(typeof A=="boolean"&&(P=A,A=void 0),A===void 0){if(!this._parts.hostname||this.is("IP"))return"";var $=this._parts.hostname.lastIndexOf("."),ee=this._parts.hostname.substring($+1);return P!==!0&&t&&t.list[ee.toLowerCase()]&&t.get(this._parts.hostname)||ee}else{var X;if(A)if(A.match(/[^a-zA-Z0-9-]/))if(t&&t.is(A))X=new RegExp(k(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(X,A);else throw new TypeError('TLD "'+A+'" 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");X=new RegExp(k(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(X,A)}else throw new TypeError("cannot set TLD empty");return this.build(!P),this}},h.directory=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(A===void 0||A===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var $=this._parts.path.length-this.filename().length-1,ee=this._parts.path.substring(0,$)||(this._parts.hostname?"/":"");return A?a.decodePath(ee):ee}else{var X=this._parts.path.length-this.filename().length,re=this._parts.path.substring(0,X),ae=new RegExp("^"+k(re));return this.is("relative")||(A||(A="/"),A.charAt(0)!=="/"&&(A="/"+A)),A&&A.charAt(A.length-1)!=="/"&&(A+="/"),A=a.recodePath(A),this._parts.path=this._parts.path.replace(ae,A),this.build(!P),this}},h.filename=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(typeof A!="string"){if(!this._parts.path||this._parts.path==="/")return"";var $=this._parts.path.lastIndexOf("/"),ee=this._parts.path.substring($+1);return A?a.decodePathSegment(ee):ee}else{var X=!1;A.charAt(0)==="/"&&(A=A.substring(1)),A.match(/\.?\//)&&(X=!0);var re=new RegExp(k(this.filename())+"$");return A=a.recodePath(A),this._parts.path=this._parts.path.replace(re,A),X?this.normalizePath(P):this.build(!P),this}},h.suffix=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(A===void 0||A===!0){if(!this._parts.path||this._parts.path==="/")return"";var $=this.filename(),ee=$.lastIndexOf("."),X,re;return ee===-1?"":(X=$.substring(ee+1),re=/^[a-z0-9%]+$/i.test(X)?X:"",A?a.decodePathSegment(re):re)}else{A.charAt(0)==="."&&(A=A.substring(1));var ae=this.suffix(),De;if(ae)A?De=new RegExp(k(ae)+"$"):De=new RegExp(k("."+ae)+"$");else{if(!A)return this;this._parts.path+="."+a.recodePath(A)}return De&&(A=a.recodePath(A),this._parts.path=this._parts.path.replace(De,A)),this.build(!P),this}},h.segment=function(A,P,$){var ee=this._parts.urn?":":"/",X=this.path(),re=X.substring(0,1)==="/",ae=X.split(ee);if(A!==void 0&&typeof A!="number"&&($=P,P=A,A=void 0),A!==void 0&&typeof A!="number")throw new Error('Bad segment "'+A+'", must be 0-based integer');if(re&&ae.shift(),A<0&&(A=Math.max(ae.length+A,0)),P===void 0)return A===void 0?ae:ae[A];if(A===null||ae[A]===void 0)if(L(P)){ae=[];for(var De=0,Z=P.length;De<Z;De++)!P[De].length&&(!ae.length||!ae[ae.length-1].length)||(ae.length&&!ae[ae.length-1].length&&ae.pop(),ae.push(U(P[De])))}else(P||typeof P=="string")&&(P=U(P),ae[ae.length-1]===""?ae[ae.length-1]=P:ae.push(P));else P?ae[A]=U(P):ae.splice(A,1);return re&&ae.unshift(""),this.path(ae.join(ee),$)},h.segmentCoded=function(A,P,$){var ee,X,re;if(typeof A!="number"&&($=P,P=A,A=void 0),P===void 0){if(ee=this.segment(A,P,$),!L(ee))ee=ee!==void 0?a.decode(ee):void 0;else for(X=0,re=ee.length;X<re;X++)ee[X]=a.decode(ee[X]);return ee}if(!L(P))P=typeof P=="string"||P instanceof String?a.encode(P):P;else for(X=0,re=P.length;X<re;X++)P[X]=a.encode(P[X]);return this.segment(A,P,$)};var Xe=h.query;return h.query=function(A,P){if(A===!0)return a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof A=="function"){var $=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace),ee=A.call(this,$);return this._parts.query=a.buildQuery(ee||$,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!P),this}else return A!==void 0&&typeof A!="string"?(this._parts.query=a.buildQuery(A,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!P),this):Xe.call(this,A,P)},h.setQuery=function(A,P,$){var ee=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof A=="string"||A instanceof String)ee[A]=P!==void 0?P:null;else if(typeof A=="object")for(var X in A)y.call(A,X)&&(ee[X]=A[X]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=a.buildQuery(ee,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof A!="string"&&($=P),this.build(!$),this},h.addQuery=function(A,P,$){var ee=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.addQuery(ee,A,P===void 0?null:P),this._parts.query=a.buildQuery(ee,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof A!="string"&&($=P),this.build(!$),this},h.removeQuery=function(A,P,$){var ee=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.removeQuery(ee,A,P),this._parts.query=a.buildQuery(ee,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof A!="string"&&($=P),this.build(!$),this},h.hasQuery=function(A,P,$){var ee=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.hasQuery(ee,A,P,$)},h.setSearch=h.setQuery,h.addSearch=h.addQuery,h.removeSearch=h.removeQuery,h.hasSearch=h.hasQuery,h.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()},h.normalizeProtocol=function(A){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!A)),this},h.normalizeHostname=function(A){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(!A)),this},h.normalizePort=function(A){return typeof this._parts.protocol=="string"&&this._parts.port===a.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!A)),this},h.normalizePath=function(A){var P=this._parts.path;if(!P)return this;if(this._parts.urn)return this._parts.path=a.recodeUrnPath(this._parts.path),this.build(!A),this;if(this._parts.path==="/")return this;P=a.recodePath(P);var $,ee="",X,re;for(P.charAt(0)!=="/"&&($=!0,P="/"+P),(P.slice(-3)==="/.."||P.slice(-2)==="/.")&&(P+="/"),P=P.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),$&&(ee=P.substring(1).match(/^(\.\.\/)+/)||"",ee&&(ee=ee[0]));X=P.search(/\/\.\.(\/|$)/),X!==-1;){if(X===0){P=P.substring(3);continue}re=P.substring(0,X).lastIndexOf("/"),re===-1&&(re=X),P=P.substring(0,re)+P.substring(X+3)}return $&&this.is("relative")&&(P=ee+P.substring(1)),this._parts.path=P,this.build(!A),this},h.normalizePathname=h.normalizePath,h.normalizeQuery=function(A){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(a.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!A)),this},h.normalizeFragment=function(A){return this._parts.fragment||(this._parts.fragment=null,this.build(!A)),this},h.normalizeSearch=h.normalizeQuery,h.normalizeHash=h.normalizeFragment,h.iso8859=function(){var A=a.encode,P=a.decode;a.encode=escape,a.decode=decodeURIComponent;try{this.normalize()}finally{a.encode=A,a.decode=P}return this},h.unicode=function(){var A=a.encode,P=a.decode;a.encode=te,a.decode=unescape;try{this.normalize()}finally{a.encode=A,a.decode=P}return this},h.readable=function(){var A=this.clone();A.username("").password("").normalize();var P="";if(A._parts.protocol&&(P+=A._parts.protocol+"://"),A._parts.hostname&&(A.is("punycode")&&r?(P+=r.toUnicode(A._parts.hostname),A._parts.port&&(P+=":"+A._parts.port)):P+=A.host()),A._parts.hostname&&A._parts.path&&A._parts.path.charAt(0)!=="/"&&(P+="/"),P+=A.path(!0),A._parts.query){for(var $="",ee=0,X=A._parts.query.split("&"),re=X.length;ee<re;ee++){var ae=(X[ee]||"").split("=");$+="&"+a.decodeQuery(ae[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),ae[1]!==void 0&&($+="="+a.decodeQuery(ae[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}P+="?"+$.substring(1)}return P+=a.decodeQuery(A.hash(),!0),P},h.absoluteTo=function(A){var P=this.clone(),$=["protocol","username","password","hostname","port"],ee,X,re;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(A instanceof a||(A=new a(A)),P._parts.protocol||(P._parts.protocol=A._parts.protocol,this._parts.hostname))return P;for(X=0;re=$[X];X++)P._parts[re]=A._parts[re];return P._parts.path?(P._parts.path.substring(-2)===".."&&(P._parts.path+="/"),P.path().charAt(0)!=="/"&&(ee=A.directory(),ee=ee||(A.path().indexOf("/")===0?"/":""),P._parts.path=(ee?ee+"/":"")+P._parts.path,P.normalizePath())):(P._parts.path=A._parts.path,P._parts.query||(P._parts.query=A._parts.query)),P.build(),P},h.relativeTo=function(A){var P=this.clone().normalize(),$,ee,X,re,ae;if(P._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(A=new a(A).normalize(),$=P._parts,ee=A._parts,re=P.path(),ae=A.path(),re.charAt(0)!=="/")throw new Error("URI is already relative");if(ae.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if($.protocol===ee.protocol&&($.protocol=null),$.username!==ee.username||$.password!==ee.password||$.protocol!==null||$.username!==null||$.password!==null)return P.build();if($.hostname===ee.hostname&&$.port===ee.port)$.hostname=null,$.port=null;else return P.build();if(re===ae)return $.path="",P.build();if(X=a.commonPath(re,ae),!X)return P.build();var De=ee.path.substring(X.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return $.path=De+$.path.substring(X.length)||"./",P.build()},h.equals=function(A){var P=this.clone(),$=new a(A),ee={},X={},re={},ae,De,Z;if(P.normalize(),$.normalize(),P.toString()===$.toString())return!0;if(ae=P.query(),De=$.query(),P.query(""),$.query(""),P.toString()!==$.toString()||ae.length!==De.length)return!1;ee=a.parseQuery(ae,this._parts.escapeQuerySpace),X=a.parseQuery(De,this._parts.escapeQuerySpace);for(Z in ee)if(y.call(ee,Z)){if(L(ee[Z])){if(!j(ee[Z],X[Z]))return!1}else if(ee[Z]!==X[Z])return!1;re[Z]=!0}for(Z in X)if(y.call(X,Z)&&!re[Z])return!1;return!0},h.preventInvalidHostname=function(A){return this._parts.preventInvalidHostname=!!A,this},h.duplicateQueryParameters=function(A){return this._parts.duplicateQueryParameters=!!A,this},h.escapeQuerySpace=function(A){return this._parts.escapeQuerySpace=!!A,this},a})});var Tz,Jh,zx=Je(()=>{Mo();Tz=ta(Nx()),Jh=class extends dn{uriParams(){return(0,Tz.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(a=>t[a]!==null).reduce((a,l)=>(a[l]=t[l],a),{}),i;n&&Object.keys(n).length>0&&(i=this.b64EncodeUnicode(JSON.stringify(n))),this.navigateToURLWithFilters(i)}navigateToURLWithFilters(r){let e=new Tz.default(this.urlRedirectTarget.href),t=Cd({},e.query(!0));this.keepFiltersPanelOpenValue&&(t.keep_filters_panel_open=this.keepFiltersPanelOpenValue?1:null),t.page=1,r?t.filters=r:delete t.filters,e.query(t),this.urlRedirectTarget.href=e,this.urlRedirectTarget.click()}};Qr(Jh,"targets",["urlRedirect"]),Qr(Jh,"values",{keepFiltersPanelOpen:Boolean})});var rD,ice=Je(()=>{zx();rD=class extends Jh{getFilterValue(){let r={};return this.optionTargets.forEach(e=>{r[e.value]=e.checked}),r}getFilterClass(){let{filterClass:r}=this.optionTarget.dataset;return r}};Qr(rD,"targets",["option"])});var Os=ve((Cz,Ez)=>{(function(r,e){typeof Cz=="object"&&typeof Ez<"u"?Ez.exports=e():typeof define=="function"&&define.amd?define(e):(r=r||self,r.CodeMirror=e())})(Cz,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),a=/Edge\/(\d+)/.exec(r),l=n||i||a,h=l&&(n?document.documentMode||6:+(a||i)[1]),y=!a&&/WebKit\//.test(r),k=y&&/Qt\/\d+\.\d+/.test(r),E=!a&&/Chrome\//.test(r),L=/Opera\//.test(r),q=/Apple Computer/.test(navigator.vendor),B=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(r),j=/PhantomJS/.test(r),U=q&&(/Mobile\/\w+/.test(r)||navigator.maxTouchPoints>2),J=/Android/.test(r),te=U||J||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(r),ie=U||/Mac/.test(e),de=/\bCrOS\b/.test(r),_=/win/i.test(e),ye=L&&r.match(/Version\/(\d*\.\d*)/);ye&&(ye=Number(ye[1])),ye&&ye>=15&&(L=!1,y=!0);var ce=ie&&(k||L&&(ye==null||ye<12.11)),be=t||l&&h>=9;function xe(f){return new RegExp("(^|\\s)"+f+"(?:$|\\s)\\s*")}var ke=function(f,g){var D=f.className,o=xe(g).exec(D);if(o){var u=D.slice(o.index+o[0].length);f.className=D.slice(0,o.index)+(u?o[1]+u:"")}};function Te(f){for(var g=f.childNodes.length;g>0;--g)f.removeChild(f.firstChild);return f}function Xe(f,g){return Te(f).appendChild(g)}function A(f,g,D,o){var u=document.createElement(f);if(D&&(u.className=D),o&&(u.style.cssText=o),typeof g=="string")u.appendChild(document.createTextNode(g));else if(g)for(var p=0;p<g.length;++p)u.appendChild(g[p]);return u}function P(f,g,D,o){var u=A(f,g,D,o);return u.setAttribute("role","presentation"),u}var $;document.createRange?$=function(f,g,D,o){var u=document.createRange();return u.setEnd(o||f,D),u.setStart(f,g),u}:$=function(f,g,D){var o=document.body.createTextRange();try{o.moveToElementText(f.parentNode)}catch{return o}return o.collapse(!0),o.moveEnd("character",D),o.moveStart("character",g),o};function ee(f,g){if(g.nodeType==3&&(g=g.parentNode),f.contains)return f.contains(g);do if(g.nodeType==11&&(g=g.host),g==f)return!0;while(g=g.parentNode)}function X(){var f;try{f=document.activeElement}catch{f=document.body||null}for(;f&&f.shadowRoot&&f.shadowRoot.activeElement;)f=f.shadowRoot.activeElement;return f}function re(f,g){var D=f.className;xe(g).test(D)||(f.className+=(D?" ":"")+g)}function ae(f,g){for(var D=f.split(" "),o=0;o<D.length;o++)D[o]&&!xe(D[o]).test(g)&&(g+=" "+D[o]);return g}var De=function(f){f.select()};U?De=function(f){f.selectionStart=0,f.selectionEnd=f.value.length}:l&&(De=function(f){try{f.select()}catch{}});function Z(f){var g=Array.prototype.slice.call(arguments,1);return function(){return f.apply(null,g)}}function V(f,g,D){g||(g={});for(var o in f)f.hasOwnProperty(o)&&(D!==!1||!g.hasOwnProperty(o))&&(g[o]=f[o]);return g}function Ke(f,g,D,o,u){g==null&&(g=f.search(/[^\s\u00a0]/),g==-1&&(g=f.length));for(var p=o||0,b=u||0;;){var S=f.indexOf(" ",p);if(S<0||S>=g)return b+(g-p);b+=S-p,b+=D-b%D,p=S+1}}var rt=function(){this.id=null,this.f=null,this.time=0,this.handler=Z(this.onTimeout,this)};rt.prototype.onTimeout=function(f){f.id=0,f.time<=+new Date?f.f():setTimeout(f.handler,f.time-+new Date)},rt.prototype.set=function(f,g){this.f=g;var D=+new Date+f;(!this.id||D<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,f),this.time=D)};function Ye(f,g){for(var D=0;D<f.length;++D)if(f[D]==g)return D;return-1}var It=50,kt={toString:function(){return"CodeMirror.Pass"}},Vt={scroll:!1},Ft={origin:"*mouse"},lr={origin:"+move"};function ur(f,g,D){for(var o=0,u=0;;){var p=f.indexOf(" ",o);p==-1&&(p=f.length);var b=p-o;if(p==f.length||u+b>=g)return o+Math.min(b,g-u);if(u+=p-o,u+=D-u%D,o=p+1,u>=g)return o}}var Dr=[""];function Zt(f){for(;Dr.length<=f;)Dr.push(Mt(Dr)+" ");return Dr[f]}function Mt(f){return f[f.length-1]}function At(f,g){for(var D=[],o=0;o<f.length;o++)D[o]=g(f[o],o);return D}function at(f,g,D){for(var o=0,u=D(g);o<f.length&&D(f[o])<=u;)o++;f.splice(o,0,g)}function he(){}function Oe(f,g){var D;return Object.create?D=Object.create(f):(he.prototype=f,D=new he),g&&V(g,D),D}var We=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ar(f){return/\w/.test(f)||f>"\x80"&&(f.toUpperCase()!=f.toLowerCase()||We.test(f))}function dt(f,g){return g?g.source.indexOf("\\w")>-1&&ar(f)?!0:g.test(f):ar(f)}function Ut(f){for(var g in f)if(f.hasOwnProperty(g)&&f[g])return!1;return!0}var Nt=/[\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 wr(f){return f.charCodeAt(0)>=768&&Nt.test(f)}function Sr(f,g,D){for(;(D<0?g>0:g<f.length)&&wr(f.charAt(g));)g+=D;return g}function Lr(f,g,D){for(var o=g>D?-1:1;;){if(g==D)return g;var u=(g+D)/2,p=o<0?Math.ceil(u):Math.floor(u);if(p==g)return f(p)?g:D;f(p)?D=p:g=p+o}}function Cr(f,g,D,o){if(!f)return o(g,D,"ltr",0);for(var u=!1,p=0;p<f.length;++p){var b=f[p];(b.from<D&&b.to>g||g==D&&b.to==g)&&(o(Math.max(b.from,g),Math.min(b.to,D),b.level==1?"rtl":"ltr",p),u=!0)}u||o(g,D,"ltr")}var et=null;function pt(f,g,D){var o;et=null;for(var u=0;u<f.length;++u){var p=f[u];if(p.from<g&&p.to>g)return u;p.to==g&&(p.from!=p.to&&D=="before"?o=u:et=u),p.from==g&&(p.from!=p.to&&D!="before"?o=u:et=u)}return o??et}var tr=function(){var f="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",g="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function D(N){return N<=247?f.charAt(N):1424<=N&&N<=1524?"R":1536<=N&&N<=1785?g.charAt(N-1536):1774<=N&&N<=2220?"r":8192<=N&&N<=8203?"w":N==8204?"b":"L"}var o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,u=/[stwN]/,p=/[LRr]/,b=/[Lb1n]/,S=/[1n]/;function M(N,G,Q){this.level=N,this.from=G,this.to=Q}return function(N,G){var Q=G=="ltr"?"L":"R";if(N.length==0||G=="ltr"&&!o.test(N))return!1;for(var ue=N.length,Se=[],Re=0;Re<ue;++Re)Se.push(D(N.charCodeAt(Re)));for(var nt=0,it=Q;nt<ue;++nt){var wt=Se[nt];wt=="m"?Se[nt]=it:it=wt}for(var Rt=0,jt=Q;Rt<ue;++Rt){var Qt=Se[Rt];Qt=="1"&&jt=="r"?Se[Rt]="n":p.test(Qt)&&(jt=Qt,Qt=="r"&&(Se[Rt]="R"))}for(var fr=1,ir=Se[0];fr<ue-1;++fr){var br=Se[fr];br=="+"&&ir=="1"&&Se[fr+1]=="1"?Se[fr]="1":br==","&&ir==Se[fr+1]&&(ir=="1"||ir=="n")&&(Se[fr]=ir),ir=br}for(var Kr=0;Kr<ue;++Kr){var en=Se[Kr];if(en==",")Se[Kr]="N";else if(en=="%"){var gn=void 0;for(gn=Kr+1;gn<ue&&Se[gn]=="%";++gn);for(var fi=Kr&&Se[Kr-1]=="!"||gn<ue&&Se[gn]=="1"?"1":"N",Vi=Kr;Vi<gn;++Vi)Se[Vi]=fi;Kr=gn-1}}for(var Kn=0,$i=Q;Kn<ue;++Kn){var Li=Se[Kn];$i=="L"&&Li=="1"?Se[Kn]="L":p.test(Li)&&($i=Li)}for(var En=0;En<ue;++En)if(u.test(Se[En])){var Qn=void 0;for(Qn=En+1;Qn<ue&&u.test(Se[Qn]);++Qn);for(var Ln=(En?Se[En-1]:Q)=="L",Ei=(Qn<ue?Se[Qn]:Q)=="L",Ao=Ln==Ei?Ln?"L":"R":Q,li=En;li<Qn;++li)Se[li]=Ao;En=Qn-1}for(var lo=[],Il,ea=0;ea<ue;)if(b.test(Se[ea])){var vs=ea;for(++ea;ea<ue&&b.test(Se[ea]);++ea);lo.push(new M(0,vs,ea))}else{var ys=ea,Vo=lo.length,kf=G=="rtl"?1:0;for(++ea;ea<ue&&Se[ea]!="L";++ea);for(var da=ys;da<ea;)if(S.test(Se[da])){ys<da&&(lo.splice(Vo,0,new M(1,ys,da)),Vo+=kf);var il=da;for(++da;da<ea&&S.test(Se[da]);++da);lo.splice(Vo,0,new M(2,il,da)),Vo+=kf,ys=da}else++da;ys<ea&&lo.splice(Vo,0,new M(1,ys,ea))}return G=="ltr"&&(lo[0].level==1&&(Il=N.match(/^\s+/))&&(lo[0].from=Il[0].length,lo.unshift(new M(0,0,Il[0].length))),Mt(lo).level==1&&(Il=N.match(/\s+$/))&&(Mt(lo).to-=Il[0].length,lo.push(new M(0,ue-Il[0].length,ue)))),G=="rtl"?lo.reverse():lo}}();function Pr(f,g){var D=f.order;return D==null&&(D=f.order=tr(f.text,g)),D}var gi=[],zr=function(f,g,D){if(f.addEventListener)f.addEventListener(g,D,!1);else if(f.attachEvent)f.attachEvent("on"+g,D);else{var o=f._handlers||(f._handlers={});o[g]=(o[g]||gi).concat(D)}};function un(f,g){return f._handlers&&f._handlers[g]||gi}function Tt(f,g,D){if(f.removeEventListener)f.removeEventListener(g,D,!1);else if(f.detachEvent)f.detachEvent("on"+g,D);else{var o=f._handlers,u=o&&o[g];if(u){var p=Ye(u,D);p>-1&&(o[g]=u.slice(0,p).concat(u.slice(p+1)))}}}function Bt(f,g){var D=un(f,g);if(!!D.length)for(var o=Array.prototype.slice.call(arguments,2),u=0;u<D.length;++u)D[u].apply(null,o)}function Or(f,g,D){return typeof g=="string"&&(g={type:g,preventDefault:function(){this.defaultPrevented=!0}}),Bt(f,D||g.type,f,g),Ze(g)||g.codemirrorIgnore}function tn(f){var g=f._handlers&&f._handlers.cursorActivity;if(!!g)for(var D=f.curOp.cursorActivityHandlers||(f.curOp.cursorActivityHandlers=[]),o=0;o<g.length;++o)Ye(D,g[o])==-1&&D.push(g[o])}function jr(f,g){return un(f,g).length>0}function hn(f){f.prototype.on=function(g,D){zr(this,g,D)},f.prototype.off=function(g,D){Tt(this,g,D)}}function Pn(f){f.preventDefault?f.preventDefault():f.returnValue=!1}function Ui(f){f.stopPropagation?f.stopPropagation():f.cancelBubble=!0}function Ze(f){return f.defaultPrevented!=null?f.defaultPrevented:f.returnValue==!1}function st(f){Pn(f),Ui(f)}function Lt(f){return f.target||f.srcElement}function sr(f){var g=f.which;return g==null&&(f.button&1?g=1:f.button&2?g=3:f.button&4&&(g=2)),ie&&f.ctrlKey&&g==1&&(g=3),g}var Rr=function(){if(l&&h<9)return!1;var f=A("div");return"draggable"in f||"dragDrop"in f}(),gr;function an(f){if(gr==null){var g=A("span","\u200B");Xe(f,A("span",[g,document.createTextNode("x")])),f.firstChild.offsetHeight!=0&&(gr=g.offsetWidth<=1&&g.offsetHeight>2&&!(l&&h<8))}var D=gr?A("span","\u200B"):A("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return D.setAttribute("cm-text",""),D}var Jr;function Nn(f){if(Jr!=null)return Jr;var g=Xe(f,document.createTextNode("A\u062EA")),D=$(g,0,1).getBoundingClientRect(),o=$(g,1,2).getBoundingClientRect();return Te(f),!D||D.left==D.right?!1:Jr=o.right-D.right<3}var zn=`
538
+ %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()}};Uet={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},Het={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}},nle={default:Wet,array:ile,object:ile};dn=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:a=!0,cancelable:l=!0}={}){let h=i?`${i}:${e}`:e,y=new CustomEvent(h,{detail:n,bubbles:a,cancelable:l});return t.dispatchEvent(y),y}};dn.blessings=[Met,Pet,Fet];dn.targets=[];dn.values={}});var RS,Dle,V2,bz,Ole,xz,$2,Ile,Mle,Lle=Je(()=>{Mo();RS=class extends dn{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}};RS.values={dismissAfter:Number,showDelay:Number,removeDelay:Number},RS.classes=["show","hide"];Dle=class extends dn{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)}};Dle.targets=["form","status"];V2=class extends dn{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))}};V2.targets=["menu","button"],V2.values={open:Boolean};bz=class extends dn{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)}};bz.targets=["container"],bz.values={backdropColor:{type:String,default:"rgba(0, 0, 0, 0.8)"},restoreScroll:{type:Boolean,default:!0}};Ole=class extends dn{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}};Ole.targets=["tab","panel"];xz=class extends dn{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)})}};xz.targets=["toggleable"],xz.values={open:Boolean};$2=class extends dn{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")}};$2.targets=["content"];Ile=class extends V2{_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))}};Ile.targets=["menu","overlay"];Mle=class extends dn{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"}};Mle.targets=["preview","color"]});function Vet(r,e){var t=e.attributes,n,i,a,l,h;if(!(e.nodeType===Ple||r.nodeType===Ple)){for(var y=t.length-1;y>=0;y--)n=t[y],i=n.name,a=n.namespaceURI,l=n.value,a?(i=n.localName||i,h=r.getAttributeNS(a,i),h!==l&&(n.prefix==="xmlns"&&(i=n.name),r.setAttributeNS(a,i,l))):(h=r.getAttribute(i),h!==l&&r.setAttribute(i,l));for(var k=r.attributes,E=k.length-1;E>=0;E--)n=k[E],i=n.name,a=n.namespaceURI,a?(i=n.localName||i,e.hasAttributeNS(a,i)||r.removeAttributeNS(a,i)):e.hasAttribute(i)||r.removeAttribute(i)}}function Yet(r){var e=dh.createElement("template");return e.innerHTML=r,e.content.childNodes[0]}function Zet(r){G2||(G2=dh.createRange(),G2.selectNode(dh.body));var e=G2.createContextualFragment(r);return e.childNodes[0]}function Xet(r){var e=dh.createElement("body");return e.innerHTML=r,e.childNodes[0]}function Jet(r){return r=r.trim(),Get?Yet(r):Ket?Zet(r):Xet(r)}function K2(r,e){var t=r.nodeName,n=e.nodeName,i,a;return t===n?!0:(i=t.charCodeAt(0),a=n.charCodeAt(0),i<=90&&a>=97?t===n.toUpperCase():a<=90&&i>=97?n===t.toUpperCase():!1)}function Qet(r,e){return!e||e===$et?dh.createElement(r):dh.createElementNS(e,r)}function ett(r,e){for(var t=r.firstChild;t;){var n=t.nextSibling;e.appendChild(t),t=n}return e}function _z(r,e,t){r[t]!==e[t]&&(r[t]=e[t],r[t]?r.setAttribute(t,""):r.removeAttribute(t))}function Nv(){}function ttt(r){if(r)return r.getAttribute&&r.getAttribute("id")||r.id}function rtt(r){return function(t,n,i){if(i||(i={}),typeof n=="string")if(t.nodeName==="#document"||t.nodeName==="HTML"||t.nodeName==="BODY"){var a=n;n=dh.createElement("html"),n.innerHTML=a}else n=Jet(n);else n.nodeType===Fle&&(n=n.firstElementChild);var l=i.getNodeKey||ttt,h=i.onBeforeNodeAdded||Nv,y=i.onNodeAdded||Nv,k=i.onBeforeElUpdated||Nv,E=i.onElUpdated||Nv,L=i.onBeforeNodeDiscarded||Nv,q=i.onNodeDiscarded||Nv,B=i.onBeforeElChildrenUpdated||Nv,j=i.skipFromChildren||Nv,U=i.addChild||function(re,ae){return re.appendChild(ae)},J=i.childrenOnly===!0,te=Object.create(null),ie=[];function de(re){ie.push(re)}function _(re,ae){if(re.nodeType===FS)for(var De=re.firstChild;De;){var Z=void 0;ae&&(Z=l(De))?de(Z):(q(De),De.firstChild&&_(De,ae)),De=De.nextSibling}}function ye(re,ae,De){L(re)!==!1&&(ae&&ae.removeChild(re),q(re),_(re,De))}function ce(re){if(re.nodeType===FS||re.nodeType===Fle)for(var ae=re.firstChild;ae;){var De=l(ae);De&&(te[De]=ae),ce(ae),ae=ae.nextSibling}}ce(t);function be(re){y(re);for(var ae=re.firstChild;ae;){var De=ae.nextSibling,Z=l(ae);if(Z){var V=te[Z];V&&K2(ae,V)?(ae.parentNode.replaceChild(V,ae),ke(V,ae)):be(ae)}else be(ae);ae=De}}function xe(re,ae,De){for(;ae;){var Z=ae.nextSibling;(De=l(ae))?de(De):ye(ae,re,!0),ae=Z}}function ke(re,ae,De){var Z=l(ae);Z&&delete te[Z],!(!De&&(k(re,ae)===!1||(r(re,ae),E(re),B(re,ae)===!1)))&&(re.nodeName!=="TEXTAREA"?Te(re,ae):Rle.TEXTAREA(re,ae))}function Te(re,ae){var De=j(re),Z=ae.firstChild,V=re.firstChild,Ke,rt,Ye,It,kt;e:for(;Z;){for(It=Z.nextSibling,Ke=l(Z);!De&&V;){if(Ye=V.nextSibling,Z.isSameNode&&Z.isSameNode(V)){Z=It,V=Ye;continue e}rt=l(V);var Vt=V.nodeType,Ft=void 0;if(Vt===Z.nodeType&&(Vt===FS?(Ke?Ke!==rt&&((kt=te[Ke])?Ye===kt?Ft=!1:(re.insertBefore(kt,V),rt?de(rt):ye(V,re,!0),V=kt):Ft=!1):rt&&(Ft=!1),Ft=Ft!==!1&&K2(V,Z),Ft&&ke(V,Z)):(Vt===qle||Vt==Nle)&&(Ft=!0,V.nodeValue!==Z.nodeValue&&(V.nodeValue=Z.nodeValue))),Ft){Z=It,V=Ye;continue e}rt?de(rt):ye(V,re,!0),V=Ye}if(Ke&&(kt=te[Ke])&&K2(kt,Z))U(re,kt),ke(kt,Z);else{var lr=h(Z);lr!==!1&&(lr&&(Z=lr),Z.actualize&&(Z=Z.actualize(re.ownerDocument||dh)),U(re,Z),be(Z))}Z=It,V=Ye}xe(re,V,rt);var ur=Rle[re.nodeName];ur&&ur(re,ae)}var Xe=t,A=Xe.nodeType,P=n.nodeType;if(!J){if(A===FS)P===FS?K2(t,n)||(q(t),Xe=ett(t,Qet(n.nodeName,n.namespaceURI))):Xe=n;else if(A===qle||A===Nle){if(P===A)return Xe.nodeValue!==n.nodeValue&&(Xe.nodeValue=n.nodeValue),Xe;Xe=n}}if(Xe===n)q(t);else{if(n.isSameNode&&n.isSameNode(Xe))return;if(ke(Xe,n,J),ie)for(var $=0,ee=ie.length;$<ee;$++){var X=te[ie[$]];X&&ye(X,X.parentNode,!1)}}return!J&&Xe!==t&&t.parentNode&&(Xe.actualize&&(Xe=Xe.actualize(t.ownerDocument||dh)),t.parentNode.replaceChild(Xe,t)),Xe}}function itt(){let r={childrenOnly:this.hasAttribute("children-only")};this.targetElements.forEach(e=>{ntt(e,r.childrenOnly?this.templateContent:this.templateElement.innerHTML,r)})}function wz(r){return r.replace(/(?:[_-])([a-z0-9])/g,(e,t)=>t.toUpperCase())}function att(r){return r.charAt(0).toUpperCase()+r.slice(1)}function stt(r){return r.replace(/([A-Z])/g,(e,t)=>`-${t.toLowerCase()}`)}function Y2(r){return r?r.match(/[^\s]+/g)||[]:[]}function Sz(r){try{return JSON.parse(r)}catch{return r}}function Ble(){let r=Y2(this.getAttribute("classes"));r.length>0?this.targetElements.forEach(e=>e.classList.add(...r)):console.warn('[TurboPower] no "classes" provided for Turbo Streams operation "add_css_class"')}function jle(){let r=this.getAttribute("attribute");r?this.targetElements.forEach(e=>e.removeAttribute(r)):console.warn('[TurboPower] no "attribute" provided for Turbo Streams operation "remove_attribute"')}function Ule(){let r=Y2(this.getAttribute("classes"));r.length>0?this.targetElements.forEach(e=>e.classList.remove(...r)):console.warn('[TurboPower] no "classes" provided for Turbo Streams operation "remove_css_class"')}function Hle(){let r=this.getAttribute("attribute"),e=this.getAttribute("value")||"";r?this.targetElements.forEach(t=>t.setAttribute(r,e)):console.warn('[TurboPower] no "attribute" provided for Turbo Streams operation "set_attribute"')}function Wle(){let r=this.getAttribute("attribute"),e=this.getAttribute("value")||"";r?this.targetElements.forEach(t=>t.dataset[wz(r)]=e):console.warn('[TurboPower] no "attribute" provided for Turbo Streams operation "set_dataset_attribute"')}function Vle(){let r=this.getAttribute("name"),e=Sz(this.getAttribute("value")||"");r?this.targetElements.forEach(t=>t[r]=e):console.error('[TurboPower] no "name" provided for Turbo Streams operation "set_property"')}function $le(){let r=this.getAttribute("name"),e=this.getAttribute("value")||"";r?this.targetElements.forEach(t=>t.style[r]=e):console.error('[TurboPower] no "name" provided for Turbo Streams operation "set_style"')}function Gle(){let r=this.getAttribute("styles")||"";this.targetElements.forEach(e=>e.setAttribute("style",r))}function Kle(){let r=this.getAttribute("value")||"";this.targetElements.forEach(e=>e.value=r)}function Yle(){let r=Y2(this.getAttribute("classes"));r.length>0?this.targetElements.forEach(e=>{r.forEach(t=>e.classList.toggle(t))}):console.warn('[TurboPower] no "classes" provided for Turbo Streams operation "toggle_css_class"')}function Zle(r){r.add_css_class=Ble,r.remove_css_class=Ule,r.remove_attribute=jle,r.set_attribute=Hle,r.set_dataset_attribute=Wle,r.set_property=Vle,r.set_style=$le,r.set_styles=Gle,r.set_value=Kle,r.toggle_css_class=Yle}function Xle(){window.location.reload()}function Jle(){this.targetElements.forEach(r=>r.scrollIntoView())}function Qle(){this.targetElements.forEach(r=>r.focus())}function eue(){let r=this.getAttribute("title")||"",e=document.head.querySelector("title");e||(e=document.createElement("title"),document.head.appendChild(e)),e.textContent=r}function tue(r){r.reload=Xle,r.scroll_into_view=Jle,r.set_focus=Qle,r.set_title=eue}function rue(){let r=this.getAttribute("message"),e=this.getAttribute("level")||"log";console[e](r)}function nue(){let r=JSON.parse(this.getAttribute("data")||"[]"),e=JSON.parse(this.getAttribute("columns")||"[]");console.table(r,e)}function iue(r){r.console_log=rue,r.console_table=nue}function oue(){console.warn("[TurboPower] The `invoke` Turbo Stream Action was removed from TurboPower. If you'd like to continue using this action please use the successor library instead. Read more here: https://github.com/hopsoft/turbo_boost-streams")}function aue(r){r.invoke||(r.invoke=oue)}function lue(){let r=this.getAttribute("cookie")||"";document.cookie=r}function uue(){let r=new sue(this);document.cookie=r.build()}function cue(r){r.set_cookie=lue,r.set_cookie_item=uue}function fue(){let r=this.getAttribute("parent");if(r){let e=document.querySelector(r);e?this.targetElements.forEach(t=>e.appendChild(t)):console.error(`[TurboPower] couldn't find parent element using selector "${r}" for Turbo Streams operation "graft"`)}else console.error('[TurboPower] no "parent" selector provided for Turbo Streams operation "graft"')}function hue(){let r=this.templateContent.textContent||"";this.targetElements.forEach(e=>e.innerHTML=r)}function due(){let r=this.getAttribute("position")||"beforebegin",e=this.templateContent.textContent||"";this.targetElements.forEach(t=>t.insertAdjacentHTML(r,e))}function pue(){let r=this.getAttribute("position")||"beforebegin",e=this.getAttribute("text")||"";this.targetElements.forEach(t=>t.insertAdjacentText(r,e))}function mue(){let r=this.templateContent.textContent||"";this.targetElements.forEach(e=>e.outerHTML=r)}function gue(){let r=this.getAttribute("name"),e=this.getAttribute("content")||"";if(r){let t=document.head.querySelector(`meta[name='${r}']`);t||(t=document.createElement("meta"),t.name=r,document.head.appendChild(t)),t.content=e}else console.error('[TurboPower] no "name" provided for Turbo Streams operation "set_meta"')}function vue(){let r=this.getAttribute("text")||"";this.targetElements.forEach(e=>e.textContent=r)}function yue(r){r.graft=fue,r.inner_html=hue,r.insert_adjacent_html=due,r.insert_adjacent_text=pue,r.outer_html=mue,r.text_content=vue,r.set_meta=gue}function bue(){let r=this.getAttribute("name"),e=null;try{e=this.templateContent.textContent}catch{}try{let t=e?JSON.parse(e):{};if(r){let n={bubbles:!0,cancelable:!0,detail:t},i=new CustomEvent(r,n);this.targetElements.forEach(a=>a.dispatchEvent(i))}else console.warn('[TurboPower] no "name" provided for Turbo Streams operation "dispatch_event"')}catch(t){console.error(`[TurboPower] error proccessing provided "detail" in "<template>" ("${e}") for Turbo Streams operation "dispatch_event". Error: "${t.message}"`)}}function xue(r){r.dispatch_event=bue}function _ue(){this.targetElements.forEach(r=>r.reset())}function wue(r){r.reset_form=_ue}function Sue(){let r=this.getAttribute("url"),e=this.getAttribute("state"),t=this.getAttribute("title")||"";window.history.pushState(e,t,r)}function kue(){let r=this.getAttribute("url"),e=this.getAttribute("state"),t=this.getAttribute("title")||"";window.history.replaceState(e,t,r)}function Tue(){window.history.back()}function utt(){window.history.forward()}function Cue(){let r=Number(this.getAttribute("delta"))||0;window.history.go(r)}function Eue(r){r.push_state=Sue,r.replace_state=kue,r.history_back=Tue,r.history_go=Cue}function Aue(){window.Notification?Notification.permission==="granted"?zle(this):Notification.permission!=="denied"&&Notification.requestPermission().then(r=>{r==="granted"&&zle(this)}):alert("This browser does not support desktop notification")}function Due(r){r.notification=Aue}function kz(r){return r==="session"?window.sessionStorage:window.localStorage}function Oue(){let r=this.getAttribute("type");kz(r).clear()}function Iue(){let r=this.getAttribute("key"),e=this.getAttribute("value")||"",t=this.getAttribute("type");r?kz(t).setItem(r,e):console.warn('[TurboPower] no "key" provided for Turbo Streams operation "set_storage_item"')}function Mue(){let r=this.getAttribute("key"),e=this.getAttribute("type");r?kz(e).removeItem(r):console.warn('[TurboPower] no "key" provided for Turbo Streams operation "remove_storage_item"')}function Lue(r){r.clear_storage=Oue,r.set_storage_item=Iue,r.remove_storage_item=Mue}function Pue(){let r=this.getAttribute("url")||"/",e=this.getAttribute("turbo-action")||"advance",t=this.getAttribute("turbo-frame"),n=this.getAttribute("turbo")!=="false",i={action:e};t&&(i.frame=t),n&&window.Turbo?window.Turbo.visit(r,i):ftt.location.assign(r)}function Rue(){window.Turbo.cache.clear()}function Fue(r){r.redirect_to=Pue,r.turbo_clear_cache=Rue}function que(){let r=this.getAttribute("value")||0;window.Turbo.navigator.adapter.progressBar.setValue(Number(r))}function Nue(){window.Turbo.navigator.adapter.progressBar.show()}function zue(){window.Turbo.navigator.adapter.progressBar.hide()}function Bue(r){r.turbo_progress_bar_set_value=que,r.turbo_progress_bar_show=Nue,r.turbo_progress_bar_hide=zue}function jue(){this.targetElements.forEach(r=>r.reload())}function Uue(){let r=this.getAttribute("src");this.targetElements.forEach(e=>e.src=r)}function Hue(r){r.turbo_frame_reload=jue,r.turbo_frame_set_src=Uue}function Wue(r){Zle(r),tue(r),iue(r),aue(r),cue(r),yue(r),xue(r),wue(r),Eue(r),Due(r),Lue(r),Fue(r),Bue(r),Hue(r)}function dtt(r){ott(r),Wue(r)}function ptt(r,e,t){t[r]=e}var Ple,G2,$et,dh,Get,Ket,Rle,FS,Fle,qle,Nle,ntt,ott,ltt,sue,ctt,zle,ftt,htt,Vue,$ue=Je(()=>{Ple=11;$et="http://www.w3.org/1999/xhtml",dh=typeof document>"u"?void 0:document,Get=!!dh&&"content"in dh.createElement("template"),Ket=!!dh&&dh.createRange&&"createContextualFragment"in dh.createRange();Rle={OPTION:function(r,e){var t=r.parentNode;if(t){var n=t.nodeName.toUpperCase();n==="OPTGROUP"&&(t=t.parentNode,n=t&&t.nodeName.toUpperCase()),n==="SELECT"&&!t.hasAttribute("multiple")&&(r.hasAttribute("selected")&&!e.selected&&(r.setAttribute("selected","selected"),r.removeAttribute("selected")),t.selectedIndex=-1)}_z(r,e,"selected")},INPUT:function(r,e){_z(r,e,"checked"),_z(r,e,"disabled"),r.value!==e.value&&(r.value=e.value),e.hasAttribute("value")||r.removeAttribute("value")},TEXTAREA:function(r,e){var t=e.value;r.value!==t&&(r.value=t);var n=r.firstChild;if(n){var i=n.nodeValue;if(i==t||!t&&i==r.placeholder)return;n.nodeValue=t}},SELECT:function(r,e){if(!e.hasAttribute("multiple")){for(var t=-1,n=0,i=r.firstChild,a,l;i;)if(l=i.nodeName&&i.nodeName.toUpperCase(),l==="OPTGROUP")a=i,i=a.firstChild;else{if(l==="OPTION"){if(i.hasAttribute("selected")){t=n;break}n++}i=i.nextSibling,!i&&a&&(i=a.nextSibling,a=null)}r.selectedIndex=t}}},FS=1,Fle=11,qle=3,Nle=8;ntt=rtt(Vet);ott=r=>{r.morph=itt};ltt=Object.freeze({__proto__:null,camelize:wz,capitalize:att,dasherize:stt,tokenize:Y2,typecast:Sz});sue=class{constructor(e){this.ATTRIBUTE_TO_COOKIE_KEY_MAPPING=[["domain","Domain",!1],["path","Path",!1],["expires","Expires",!1],["max-age","Max-Age",!1],["http-only","HttpOnly",!0],["secure","Secure",!0],["same-site","SameSite",!1]],this.streamElement=e}build(){let e=`${this.streamElement.getAttribute("name")}=${this.streamElement.getAttribute("value")}`;return this.ATTRIBUTE_TO_COOKIE_KEY_MAPPING.forEach(([t,n,i])=>{let a=this.streamElement.getAttribute(t);if(a!==null){let l=i?n:`${n}=${a}`;e=`${e}; ${l}`}}),e}};ctt=["dir","lang","badge","body","tag","icon","image","data","vibrate","renotify","require-interaction","actions","silent"],zle=r=>{let e=r.getAttribute("title")||"",t=Array.from(r.attributes).filter(i=>ctt.includes(i.name)).map(i=>[wz(i.name),Sz(i.value)]),n=Object.fromEntries(t);new Notification(e,n)};ftt={get location(){return window.TurboPowerLocation||window.location}};htt=Object.freeze({__proto__:null,add_css_class:Ble,clear_storage:Oue,console_log:rue,console_table:nue,dispatch_event:bue,graft:fue,history_back:Tue,history_forward:utt,history_go:Cue,inner_html:hue,insert_adjacent_html:due,insert_adjacent_text:pue,invoke:oue,notification:Aue,outer_html:mue,push_state:Sue,redirect_to:Pue,register:Wue,registerAttributesActions:Zle,registerBrowserActions:tue,registerDOMActions:yue,registerDebugActions:iue,registerDeprecatedActions:aue,registerDocumentActions:cue,registerEventsActions:xue,registerFormActions:wue,registerHistoryActions:Eue,registerNotificationActions:Due,registerStorageActions:Lue,registerTurboActions:Fue,registerTurboFrameActions:Hue,registerTurboProgressBarActions:Bue,reload:Xle,remove_attribute:jle,remove_css_class:Ule,remove_storage_item:Mue,replace_state:kue,reset_form:_ue,scroll_into_view:Jle,set_attribute:Hle,set_cookie:lue,set_cookie_item:uue,set_dataset_attribute:Wle,set_focus:Qle,set_meta:gue,set_property:Vle,set_storage_item:Iue,set_style:$le,set_styles:Gle,set_title:eue,set_value:Kle,text_content:vue,toggle_css_class:Yle,turbo_clear_cache:Rue,turbo_frame_reload:jue,turbo_frame_set_src:Uue,turbo_progress_bar_hide:zue,turbo_progress_bar_set_value:que,turbo_progress_bar_show:Nue});Vue={initialize:dtt,register:ptt,Actions:htt,Utils:ltt}});var Qi,Gue=Je(()=>{tle();Lle();Mo();$ue();Vue.initialize(Turbo.StreamActions);Qi=PS.start();Qi.debug=window==null?void 0:window.localStorage.getItem("avo.debug");window.Stimulus=Qi;Qi.register("alert",RS);Qi.register("popover",$2)});var Lf,Rx=Je(()=>{Lf=r=>r=="true"});var Z2,Kue=Je(()=>{Mo();Rx();Z2=class extends dn{connect(){this.resourceIdsTarget.value=this.resourceIds,this.selectionOptions.itemSelectAllSelectedAllValue==="true"&&(this.selectedAllQueryTarget.value=this.selectionOptions.itemSelectAllSelectedAllQueryValue),this.noConfirmation?this.submitTarget.click():this.controllerDivTarget.classList.remove("hidden")}get noConfirmation(){return Lf(this.controllerDivTarget.dataset.noConfirmation)}get resourceName(){return this.controllerDivTarget.dataset.resourceName}get resourceIds(){try{return JSON.parse(this.selectionOptions.selectedResources)}catch(r){return[]}}get selectionOptions(){try{return document.querySelector(`[data-selected-resources-name="${this.resourceName}"]`).dataset}catch(r){return[]}}};Qr(Z2,"targets",["controllerDiv","resourceIds","submit","selectedAllQuery"])});var qS,Yue=Je(()=>{Mo();qS=class extends dn{constructor(){super(...arguments);Qr(this,"target",{})}get targetIsDisabled(){return this.target.dataset.disabled==="true"}get actionsShowTurboFrame(){return document.querySelector("turbo-frame#actions_show")}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=this;setTimeout(()=>{this.actionsShowTurboFrame.loaded.then(()=>e.enableTarget(e.target))},1)}};Qr(qS,"targets",["resourceAction","standaloneAction"]),Qr(qS,"classes",["enabled","disabled"])});var X2,Zue=Je(()=>{Mo();X2=class extends dn{connect(){this.formTarget.submit()}};Qr(X2,"targets",["form"])});var J2,Xue=Je(()=>{Mo();J2=class extends dn{constructor(){super(...arguments);Qr(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"))}};Qr(J2,"targets",["select","type","loadAssociationLink"])});var Jue=ve((Fx,qx)=>{(function(r){var e=typeof Fx=="object"&&Fx&&!Fx.nodeType&&Fx,t=typeof qx=="object"&&qx&&!qx.nodeType&&qx,n=typeof global=="object"&&global;(n.global===n||n.window===n||n.self===n)&&(r=n);var i,a=2147483647,l=36,h=1,y=26,k=38,E=700,L=72,q=128,B="-",j=/^xn--/,U=/[^\x20-\x7E]/,J=/[\x2E\u3002\uFF0E\uFF61]/g,te={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ie=l-h,de=Math.floor,_=String.fromCharCode,ye;function ce(ae){throw new RangeError(te[ae])}function be(ae,De){for(var Z=ae.length,V=[];Z--;)V[Z]=De(ae[Z]);return V}function xe(ae,De){var Z=ae.split("@"),V="";Z.length>1&&(V=Z[0]+"@",ae=Z[1]),ae=ae.replace(J,".");var Ke=ae.split("."),rt=be(Ke,De).join(".");return V+rt}function ke(ae){for(var De=[],Z=0,V=ae.length,Ke,rt;Z<V;)Ke=ae.charCodeAt(Z++),Ke>=55296&&Ke<=56319&&Z<V?(rt=ae.charCodeAt(Z++),(rt&64512)==56320?De.push(((Ke&1023)<<10)+(rt&1023)+65536):(De.push(Ke),Z--)):De.push(Ke);return De}function Te(ae){return be(ae,function(De){var Z="";return De>65535&&(De-=65536,Z+=_(De>>>10&1023|55296),De=56320|De&1023),Z+=_(De),Z}).join("")}function Xe(ae){return ae-48<10?ae-22:ae-65<26?ae-65:ae-97<26?ae-97:l}function A(ae,De){return ae+22+75*(ae<26)-((De!=0)<<5)}function P(ae,De,Z){var V=0;for(ae=Z?de(ae/E):ae>>1,ae+=de(ae/De);ae>ie*y>>1;V+=l)ae=de(ae/ie);return de(V+(ie+1)*ae/(ae+k))}function $(ae){var De=[],Z=ae.length,V,Ke=0,rt=q,Ye=L,It,kt,Vt,Ft,lr,ur,Dr,Zt,Mt;for(It=ae.lastIndexOf(B),It<0&&(It=0),kt=0;kt<It;++kt)ae.charCodeAt(kt)>=128&&ce("not-basic"),De.push(ae.charCodeAt(kt));for(Vt=It>0?It+1:0;Vt<Z;){for(Ft=Ke,lr=1,ur=l;Vt>=Z&&ce("invalid-input"),Dr=Xe(ae.charCodeAt(Vt++)),(Dr>=l||Dr>de((a-Ke)/lr))&&ce("overflow"),Ke+=Dr*lr,Zt=ur<=Ye?h:ur>=Ye+y?y:ur-Ye,!(Dr<Zt);ur+=l)Mt=l-Zt,lr>de(a/Mt)&&ce("overflow"),lr*=Mt;V=De.length+1,Ye=P(Ke-Ft,V,Ft==0),de(Ke/V)>a-rt&&ce("overflow"),rt+=de(Ke/V),Ke%=V,De.splice(Ke++,0,rt)}return Te(De)}function ee(ae){var De,Z,V,Ke,rt,Ye,It,kt,Vt,Ft,lr,ur=[],Dr,Zt,Mt,At;for(ae=ke(ae),Dr=ae.length,De=q,Z=0,rt=L,Ye=0;Ye<Dr;++Ye)lr=ae[Ye],lr<128&&ur.push(_(lr));for(V=Ke=ur.length,Ke&&ur.push(B);V<Dr;){for(It=a,Ye=0;Ye<Dr;++Ye)lr=ae[Ye],lr>=De&&lr<It&&(It=lr);for(Zt=V+1,It-De>de((a-Z)/Zt)&&ce("overflow"),Z+=(It-De)*Zt,De=It,Ye=0;Ye<Dr;++Ye)if(lr=ae[Ye],lr<De&&++Z>a&&ce("overflow"),lr==De){for(kt=Z,Vt=l;Ft=Vt<=rt?h:Vt>=rt+y?y:Vt-rt,!(kt<Ft);Vt+=l)At=kt-Ft,Mt=l-Ft,ur.push(_(A(Ft+At%Mt,0))),kt=de(At/Mt);ur.push(_(A(kt,0))),rt=P(Z,Zt,V==Ke),Z=0,++V}++Z,++De}return ur.join("")}function X(ae){return xe(ae,function(De){return j.test(De)?$(De.slice(4).toLowerCase()):De})}function re(ae){return xe(ae,function(De){return U.test(De)?"xn--"+ee(De):De})}if(i={version:"1.3.2",ucs2:{decode:ke,encode:Te},decode:$,encode:ee,toASCII:re,toUnicode:X},typeof define=="function"&&typeof define.amd=="object"&&define.amd)define("punycode",function(){return i});else if(e&&t)if(qx.exports==e)t.exports=i;else for(ye in i)i.hasOwnProperty(ye)&&(e[ye]=i[ye]);else r.punycode=i})(Fx)});var ece=ve((Que,Q2)=>{(function(r,e){"use strict";typeof Q2=="object"&&Q2.exports?Q2.exports=e():typeof define=="function"&&define.amd?define(e):r.IPv6=e(r)})(Que,function(r){"use strict";var e=r&&r.IPv6;function t(i){var a=i.toLowerCase(),l=a.split(":"),h=l.length,y=8;l[0]===""&&l[1]===""&&l[2]===""?(l.shift(),l.shift()):l[0]===""&&l[1]===""?l.shift():l[h-1]===""&&l[h-2]===""&&l.pop(),h=l.length,l[h-1].indexOf(".")!==-1&&(y=7);var k;for(k=0;k<h&&l[k]!=="";k++);if(k<y)for(l.splice(k,1,"0000");l.length<y;)l.splice(k,0,"0000");for(var E,L=0;L<y;L++){E=l[L].split("");for(var q=0;q<3&&(E[0]==="0"&&E.length>1);q++)E.splice(0,1);l[L]=E.join("")}var B=-1,j=0,U=0,J=-1,te=!1;for(L=0;L<y;L++)te?l[L]==="0"?U+=1:(te=!1,U>j&&(B=J,j=U)):l[L]==="0"&&(te=!0,J=L,U=1);U>j&&(B=J,j=U),j>1&&l.splice(B,j,""),h=l.length;var ie="";for(l[0]===""&&(ie=":"),L=0;L<h&&(ie+=l[L],L!==h-1);L++)ie+=":";return l[h-1]===""&&(ie+=":"),ie}function n(){return r.IPv6===this&&(r.IPv6=e),this}return{best:t,noConflict:n}})});var rce=ve((tce,eD)=>{(function(r,e){"use strict";typeof eD=="object"&&eD.exports?eD.exports=e():typeof define=="function"&&define.amd?define(e):r.SecondLevelDomains=e(r)})(tce,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 a=n.lastIndexOf(".",i-1);if(a<=0||a>=i-1)return!1;var l=t.list[n.slice(i+1)];return l?l.indexOf(" "+n.slice(a+1,i)+" ")>=0:!1},is:function(n){var i=n.lastIndexOf(".");if(i<=0||i>=n.length-1)return!1;var a=n.lastIndexOf(".",i-1);if(a>=0)return!1;var l=t.list[n.slice(i+1)];return l?l.indexOf(" "+n.slice(0,i)+" ")>=0:!1},get:function(n){var i=n.lastIndexOf(".");if(i<=0||i>=n.length-1)return null;var a=n.lastIndexOf(".",i-1);if(a<=0||a>=i-1)return null;var l=t.list[n.slice(i+1)];return!l||l.indexOf(" "+n.slice(a+1,i)+" ")<0?null:n.slice(a+1)},noConflict:function(){return r.SecondLevelDomains===this&&(r.SecondLevelDomains=e),this}};return t})});var Nx=ve((nce,tD)=>{(function(r,e){"use strict";typeof tD=="object"&&tD.exports?tD.exports=e(Jue(),ece(),rce()):typeof define=="function"&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],e):r.URI=e(r.punycode,r.IPv6,r.SecondLevelDomains,r)})(nce,function(r,e,t,n){"use strict";var i=n&&n.URI;function a(A,P){var $=arguments.length>=1,ee=arguments.length>=2;if(!(this instanceof a))return $?ee?new a(A,P):new a(A):new a;if(A===void 0){if($)throw new TypeError("undefined is not a valid argument for URI");typeof location<"u"?A=location.href+"":A=""}if(A===null&&$)throw new TypeError("null is not a valid argument for URI");return this.href(A),P!==void 0?this.absoluteTo(P):this}function l(A){return/^[0-9]+$/.test(A)}a.version="1.19.11";var h=a.prototype,y=Object.prototype.hasOwnProperty;function k(A){return A.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function E(A){return A===void 0?"Undefined":String(Object.prototype.toString.call(A)).slice(8,-1)}function L(A){return E(A)==="Array"}function q(A,P){var $={},ee,X;if(E(P)==="RegExp")$=null;else if(L(P))for(ee=0,X=P.length;ee<X;ee++)$[P[ee]]=!0;else $[P]=!0;for(ee=0,X=A.length;ee<X;ee++){var re=$&&$[A[ee]]!==void 0||!$&&P.test(A[ee]);re&&(A.splice(ee,1),X--,ee--)}return A}function B(A,P){var $,ee;if(L(P)){for($=0,ee=P.length;$<ee;$++)if(!B(A,P[$]))return!1;return!0}var X=E(P);for($=0,ee=A.length;$<ee;$++)if(X==="RegExp"){if(typeof A[$]=="string"&&A[$].match(P))return!0}else if(A[$]===P)return!0;return!1}function j(A,P){if(!L(A)||!L(P)||A.length!==P.length)return!1;A.sort(),P.sort();for(var $=0,ee=A.length;$<ee;$++)if(A[$]!==P[$])return!1;return!0}function U(A){var P=/^\/+|\/+$/g;return A.replace(P,"")}a._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:a.preventInvalidHostname,duplicateQueryParameters:a.duplicateQueryParameters,escapeQuerySpace:a.escapeQuerySpace}},a.preventInvalidHostname=!1,a.duplicateQueryParameters=!1,a.escapeQuerySpace=!0,a.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,a.idn_expression=/[^a-z0-9\._-]/i,a.punycode_expression=/(xn--)/i,a.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,a.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*$/,a.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,a.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},a.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a.ascii_tab_whitespace=/[\u0009\u000A\u000D]+/g,a.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},a.hostProtocols=["http","https"],a.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,a.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"},a.getDomAttribute=function(A){if(!(!A||!A.nodeName)){var P=A.nodeName.toLowerCase();if(!(P==="input"&&A.type!=="image"))return a.domAttributes[P]}};function J(A){return escape(A)}function te(A){return encodeURIComponent(A).replace(/[!'()*]/g,J).replace(/\*/g,"%2A")}a.encode=te,a.decode=decodeURIComponent,a.iso8859=function(){a.encode=escape,a.decode=unescape},a.unicode=function(){a.encode=te,a.decode=decodeURIComponent},a.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"}}}},a.encodeQuery=function(A,P){var $=a.encode(A+"");return P===void 0&&(P=a.escapeQuerySpace),P?$.replace(/%20/g,"+"):$},a.decodeQuery=function(A,P){A+="",P===void 0&&(P=a.escapeQuerySpace);try{return a.decode(P?A.replace(/\+/g,"%20"):A)}catch{return A}};var ie={encode:"encode",decode:"decode"},de,_=function(A,P){return function($){try{return a[P]($+"").replace(a.characters[A][P].expression,function(ee){return a.characters[A][P].map[ee]})}catch{return $}}};for(de in ie)a[de+"PathSegment"]=_("pathname",ie[de]),a[de+"UrnPathSegment"]=_("urnpath",ie[de]);var ye=function(A,P,$){return function(ee){var X;$?X=function(Z){return a[P](a[$](Z))}:X=a[P];for(var re=(ee+"").split(A),ae=0,De=re.length;ae<De;ae++)re[ae]=X(re[ae]);return re.join(A)}};a.decodePath=ye("/","decodePathSegment"),a.decodeUrnPath=ye(":","decodeUrnPathSegment"),a.recodePath=ye("/","encodePathSegment","decode"),a.recodeUrnPath=ye(":","encodeUrnPathSegment","decode"),a.encodeReserved=_("reserved","encode"),a.parse=function(A,P){var $;return P||(P={preventInvalidHostname:a.preventInvalidHostname}),A=A.replace(a.leading_whitespace_expression,""),A=A.replace(a.ascii_tab_whitespace,""),$=A.indexOf("#"),$>-1&&(P.fragment=A.substring($+1)||null,A=A.substring(0,$)),$=A.indexOf("?"),$>-1&&(P.query=A.substring($+1)||null,A=A.substring(0,$)),A=A.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://"),A=A.replace(/^[/\\]{2,}/i,"//"),A.substring(0,2)==="//"?(P.protocol=null,A=A.substring(2),A=a.parseAuthority(A,P)):($=A.indexOf(":"),$>-1&&(P.protocol=A.substring(0,$)||null,P.protocol&&!P.protocol.match(a.protocol_expression)?P.protocol=void 0:A.substring($+1,$+3).replace(/\\/g,"/")==="//"?(A=A.substring($+3),A=a.parseAuthority(A,P)):(A=A.substring($+1),P.urn=!0))),P.path=A,P},a.parseHost=function(A,P){A||(A=""),A=A.replace(/\\/g,"/");var $=A.indexOf("/"),ee,X;if($===-1&&($=A.length),A.charAt(0)==="[")ee=A.indexOf("]"),P.hostname=A.substring(1,ee)||null,P.port=A.substring(ee+2,$)||null,P.port==="/"&&(P.port=null);else{var re=A.indexOf(":"),ae=A.indexOf("/"),De=A.indexOf(":",re+1);De!==-1&&(ae===-1||De<ae)?(P.hostname=A.substring(0,$)||null,P.port=null):(X=A.substring(0,$).split(":"),P.hostname=X[0]||null,P.port=X[1]||null)}return P.hostname&&A.substring($).charAt(0)!=="/"&&($++,A="/"+A),P.preventInvalidHostname&&a.ensureValidHostname(P.hostname,P.protocol),P.port&&a.ensureValidPort(P.port),A.substring($)||"/"},a.parseAuthority=function(A,P){return A=a.parseUserinfo(A,P),a.parseHost(A,P)},a.parseUserinfo=function(A,P){var $=A,ee=A.indexOf("\\");ee!==-1&&(A=A.replace(/\\/g,"/"));var X=A.indexOf("/"),re=A.lastIndexOf("@",X>-1?X:A.length-1),ae;return re>-1&&(X===-1||re<X)?(ae=A.substring(0,re).split(":"),P.username=ae[0]?a.decode(ae[0]):null,ae.shift(),P.password=ae[0]?a.decode(ae.join(":")):null,A=$.substring(re+1)):(P.username=null,P.password=null),A},a.parseQuery=function(A,P){if(!A)return{};if(A=A.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,""),!A)return{};for(var $={},ee=A.split("&"),X=ee.length,re,ae,De,Z=0;Z<X;Z++)re=ee[Z].split("="),ae=a.decodeQuery(re.shift(),P),De=re.length?a.decodeQuery(re.join("="),P):null,ae!=="__proto__"&&(y.call($,ae)?((typeof $[ae]=="string"||$[ae]===null)&&($[ae]=[$[ae]]),$[ae].push(De)):$[ae]=De);return $},a.build=function(A){var P="",$=!1;return A.protocol&&(P+=A.protocol+":"),!A.urn&&(P||A.hostname)&&(P+="//",$=!0),P+=a.buildAuthority(A)||"",typeof A.path=="string"&&(A.path.charAt(0)!=="/"&&$&&(P+="/"),P+=A.path),typeof A.query=="string"&&A.query&&(P+="?"+A.query),typeof A.fragment=="string"&&A.fragment&&(P+="#"+A.fragment),P},a.buildHost=function(A){var P="";if(A.hostname)a.ip6_expression.test(A.hostname)?P+="["+A.hostname+"]":P+=A.hostname;else return"";return A.port&&(P+=":"+A.port),P},a.buildAuthority=function(A){return a.buildUserinfo(A)+a.buildHost(A)},a.buildUserinfo=function(A){var P="";return A.username&&(P+=a.encode(A.username)),A.password&&(P+=":"+a.encode(A.password)),P&&(P+="@"),P},a.buildQuery=function(A,P,$){var ee="",X,re,ae,De;for(re in A)if(re!=="__proto__"&&y.call(A,re))if(L(A[re]))for(X={},ae=0,De=A[re].length;ae<De;ae++)A[re][ae]!==void 0&&X[A[re][ae]+""]===void 0&&(ee+="&"+a.buildQueryParameter(re,A[re][ae],$),P!==!0&&(X[A[re][ae]+""]=!0));else A[re]!==void 0&&(ee+="&"+a.buildQueryParameter(re,A[re],$));return ee.substring(1)},a.buildQueryParameter=function(A,P,$){return a.encodeQuery(A,$)+(P!==null?"="+a.encodeQuery(P,$):"")},a.addQuery=function(A,P,$){if(typeof P=="object")for(var ee in P)y.call(P,ee)&&a.addQuery(A,ee,P[ee]);else if(typeof P=="string"){if(A[P]===void 0){A[P]=$;return}else typeof A[P]=="string"&&(A[P]=[A[P]]);L($)||($=[$]),A[P]=(A[P]||[]).concat($)}else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")},a.setQuery=function(A,P,$){if(typeof P=="object")for(var ee in P)y.call(P,ee)&&a.setQuery(A,ee,P[ee]);else if(typeof P=="string")A[P]=$===void 0?null:$;else throw new TypeError("URI.setQuery() accepts an object, string as the name parameter")},a.removeQuery=function(A,P,$){var ee,X,re;if(L(P))for(ee=0,X=P.length;ee<X;ee++)A[P[ee]]=void 0;else if(E(P)==="RegExp")for(re in A)P.test(re)&&(A[re]=void 0);else if(typeof P=="object")for(re in P)y.call(P,re)&&a.removeQuery(A,re,P[re]);else if(typeof P=="string")$!==void 0?E($)==="RegExp"?!L(A[P])&&$.test(A[P])?A[P]=void 0:A[P]=q(A[P],$):A[P]===String($)&&(!L($)||$.length===1)?A[P]=void 0:L(A[P])&&(A[P]=q(A[P],$)):A[P]=void 0;else throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter")},a.hasQuery=function(A,P,$,ee){switch(E(P)){case"String":break;case"RegExp":for(var X in A)if(y.call(A,X)&&P.test(X)&&($===void 0||a.hasQuery(A,X,$)))return!0;return!1;case"Object":for(var re in P)if(y.call(P,re)&&!a.hasQuery(A,re,P[re]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(E($)){case"Undefined":return P in A;case"Boolean":var ae=Boolean(L(A[P])?A[P].length:A[P]);return $===ae;case"Function":return!!$(A[P],P,A);case"Array":if(!L(A[P]))return!1;var De=ee?B:j;return De(A[P],$);case"RegExp":return L(A[P])?ee?B(A[P],$):!1:Boolean(A[P]&&A[P].match($));case"Number":$=String($);case"String":return L(A[P])?ee?B(A[P],$):!1:A[P]===$;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},a.joinPaths=function(){for(var A=[],P=[],$=0,ee=0;ee<arguments.length;ee++){var X=new a(arguments[ee]);A.push(X);for(var re=X.segment(),ae=0;ae<re.length;ae++)typeof re[ae]=="string"&&P.push(re[ae]),re[ae]&&$++}if(!P.length||!$)return new a("");var De=new a("").segment(P);return(A[0].path()===""||A[0].path().slice(0,1)==="/")&&De.path("/"+De.path()),De.normalize()},a.commonPath=function(A,P){var $=Math.min(A.length,P.length),ee;for(ee=0;ee<$;ee++)if(A.charAt(ee)!==P.charAt(ee)){ee--;break}return ee<1?A.charAt(0)===P.charAt(0)&&A.charAt(0)==="/"?"/":"":((A.charAt(ee)!=="/"||P.charAt(ee)!=="/")&&(ee=A.substring(0,ee).lastIndexOf("/")),A.substring(0,ee+1))},a.withinString=function(A,P,$){$||($={});var ee=$.start||a.findUri.start,X=$.end||a.findUri.end,re=$.trim||a.findUri.trim,ae=$.parens||a.findUri.parens,De=/[a-z0-9-]=["']?$/i;for(ee.lastIndex=0;;){var Z=ee.exec(A);if(!Z)break;var V=Z.index;if($.ignoreHtml){var Ke=A.slice(Math.max(V-3,0),V);if(Ke&&De.test(Ke))continue}for(var rt=V+A.slice(V).search(X),Ye=A.slice(V,rt),It=-1;;){var kt=ae.exec(Ye);if(!kt)break;var Vt=kt.index+kt[0].length;It=Math.max(It,Vt)}if(It>-1?Ye=Ye.slice(0,It)+Ye.slice(It).replace(re,""):Ye=Ye.replace(re,""),!(Ye.length<=Z[0].length)&&!($.ignore&&$.ignore.test(Ye))){rt=V+Ye.length;var Ft=P(Ye,V,rt,A);if(Ft===void 0){ee.lastIndex=rt;continue}Ft=String(Ft),A=A.slice(0,V)+Ft+A.slice(rt),ee.lastIndex=V+Ft.length}}return ee.lastIndex=0,A},a.ensureValidHostname=function(A,P){var $=!!A,ee=!!P,X=!1;if(ee&&(X=B(a.hostProtocols,P)),X&&!$)throw new TypeError("Hostname cannot be empty, if protocol is "+P);if(A&&A.match(a.invalid_hostname_characters)){if(!r)throw new TypeError('Hostname "'+A+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(r.toASCII(A).match(a.invalid_hostname_characters))throw new TypeError('Hostname "'+A+'" contains characters other than [A-Z0-9.-:_]')}},a.ensureValidPort=function(A){if(!!A){var P=Number(A);if(!(l(P)&&P>0&&P<65536))throw new TypeError('Port "'+A+'" is not a valid port')}},a.noConflict=function(A){if(A){var P={URI:this.noConflict()};return n.URITemplate&&typeof n.URITemplate.noConflict=="function"&&(P.URITemplate=n.URITemplate.noConflict()),n.IPv6&&typeof n.IPv6.noConflict=="function"&&(P.IPv6=n.IPv6.noConflict()),n.SecondLevelDomains&&typeof n.SecondLevelDomains.noConflict=="function"&&(P.SecondLevelDomains=n.SecondLevelDomains.noConflict()),P}else n.URI===this&&(n.URI=i);return this},h.build=function(A){return A===!0?this._deferred_build=!0:(A===void 0||this._deferred_build)&&(this._string=a.build(this._parts),this._deferred_build=!1),this},h.clone=function(){return new a(this)},h.valueOf=h.toString=function(){return this.build(!1)._string};function ce(A){return function(P,$){return P===void 0?this._parts[A]||"":(this._parts[A]=P||null,this.build(!$),this)}}function be(A,P){return function($,ee){return $===void 0?this._parts[A]||"":($!==null&&($=$+"",$.charAt(0)===P&&($=$.substring(1))),this._parts[A]=$,this.build(!ee),this)}}h.protocol=ce("protocol"),h.username=ce("username"),h.password=ce("password"),h.hostname=ce("hostname"),h.port=ce("port"),h.query=be("query","?"),h.fragment=be("fragment","#"),h.search=function(A,P){var $=this.query(A,P);return typeof $=="string"&&$.length?"?"+$:$},h.hash=function(A,P){var $=this.fragment(A,P);return typeof $=="string"&&$.length?"#"+$:$},h.pathname=function(A,P){if(A===void 0||A===!0){var $=this._parts.path||(this._parts.hostname?"/":"");return A?(this._parts.urn?a.decodeUrnPath:a.decodePath)($):$}else return this._parts.urn?this._parts.path=A?a.recodeUrnPath(A):"":this._parts.path=A?a.recodePath(A):"/",this.build(!P),this},h.path=h.pathname,h.href=function(A,P){var $;if(A===void 0)return this.toString();this._string="",this._parts=a._parts();var ee=A instanceof a,X=typeof A=="object"&&(A.hostname||A.path||A.pathname);if(A.nodeName){var re=a.getDomAttribute(A);A=A[re]||"",X=!1}if(!ee&&X&&A.pathname!==void 0&&(A=A.toString()),typeof A=="string"||A instanceof String)this._parts=a.parse(String(A),this._parts);else if(ee||X){var ae=ee?A._parts:A;for($ in ae)$!=="query"&&y.call(this._parts,$)&&(this._parts[$]=ae[$]);ae.query&&this.query(ae.query,!1)}else throw new TypeError("invalid input");return this.build(!P),this},h.is=function(A){var P=!1,$=!1,ee=!1,X=!1,re=!1,ae=!1,De=!1,Z=!this._parts.urn;switch(this._parts.hostname&&(Z=!1,$=a.ip4_expression.test(this._parts.hostname),ee=a.ip6_expression.test(this._parts.hostname),P=$||ee,X=!P,re=X&&t&&t.has(this._parts.hostname),ae=X&&a.idn_expression.test(this._parts.hostname),De=X&&a.punycode_expression.test(this._parts.hostname)),A.toLowerCase()){case"relative":return Z;case"absolute":return!Z;case"domain":case"name":return X;case"sld":return re;case"ip":return P;case"ip4":case"ipv4":case"inet4":return $;case"ip6":case"ipv6":case"inet6":return ee;case"idn":return ae;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return De}return null};var xe=h.protocol,ke=h.port,Te=h.hostname;h.protocol=function(A,P){if(A&&(A=A.replace(/:(\/\/)?$/,""),!A.match(a.protocol_expression)))throw new TypeError('Protocol "'+A+`" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]`);return xe.call(this,A,P)},h.scheme=h.protocol,h.port=function(A,P){return this._parts.urn?A===void 0?"":this:(A!==void 0&&(A===0&&(A=null),A&&(A+="",A.charAt(0)===":"&&(A=A.substring(1)),a.ensureValidPort(A))),ke.call(this,A,P))},h.hostname=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(A!==void 0){var $={preventInvalidHostname:this._parts.preventInvalidHostname},ee=a.parseHost(A,$);if(ee!=="/")throw new TypeError('Hostname "'+A+'" contains characters other than [A-Z0-9.-]');A=$.hostname,this._parts.preventInvalidHostname&&a.ensureValidHostname(A,this._parts.protocol)}return Te.call(this,A,P)},h.origin=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(A===void 0){var $=this.protocol(),ee=this.authority();return ee?($?$+"://":"")+this.authority():""}else{var X=a(A);return this.protocol(X.protocol()).authority(X.authority()).build(!P),this}},h.host=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(A===void 0)return this._parts.hostname?a.buildHost(this._parts):"";var $=a.parseHost(A,this._parts);if($!=="/")throw new TypeError('Hostname "'+A+'" contains characters other than [A-Z0-9.-]');return this.build(!P),this},h.authority=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(A===void 0)return this._parts.hostname?a.buildAuthority(this._parts):"";var $=a.parseAuthority(A,this._parts);if($!=="/")throw new TypeError('Hostname "'+A+'" contains characters other than [A-Z0-9.-]');return this.build(!P),this},h.userinfo=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(A===void 0){var $=a.buildUserinfo(this._parts);return $&&$.substring(0,$.length-1)}else return A[A.length-1]!=="@"&&(A+="@"),a.parseUserinfo(A,this._parts),this.build(!P),this},h.resource=function(A,P){var $;return A===void 0?this.path()+this.search()+this.hash():($=a.parse(A),this._parts.path=$.path,this._parts.query=$.query,this._parts.fragment=$.fragment,this.build(!P),this)},h.subdomain=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(A===void 0){if(!this._parts.hostname||this.is("IP"))return"";var $=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,$)||""}else{var ee=this._parts.hostname.length-this.domain().length,X=this._parts.hostname.substring(0,ee),re=new RegExp("^"+k(X));if(A&&A.charAt(A.length-1)!=="."&&(A+="."),A.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");return A&&a.ensureValidHostname(A,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(re,A),this.build(!P),this}},h.domain=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(typeof A=="boolean"&&(P=A,A=void 0),A===void 0){if(!this._parts.hostname||this.is("IP"))return"";var $=this._parts.hostname.match(/\./g);if($&&$.length<2)return this._parts.hostname;var ee=this._parts.hostname.length-this.tld(P).length-1;return ee=this._parts.hostname.lastIndexOf(".",ee-1)+1,this._parts.hostname.substring(ee)||""}else{if(!A)throw new TypeError("cannot set domain empty");if(A.indexOf(":")!==-1)throw new TypeError("Domains cannot contain colons");if(a.ensureValidHostname(A,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=A;else{var X=new RegExp(k(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(X,A)}return this.build(!P),this}},h.tld=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(typeof A=="boolean"&&(P=A,A=void 0),A===void 0){if(!this._parts.hostname||this.is("IP"))return"";var $=this._parts.hostname.lastIndexOf("."),ee=this._parts.hostname.substring($+1);return P!==!0&&t&&t.list[ee.toLowerCase()]&&t.get(this._parts.hostname)||ee}else{var X;if(A)if(A.match(/[^a-zA-Z0-9-]/))if(t&&t.is(A))X=new RegExp(k(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(X,A);else throw new TypeError('TLD "'+A+'" 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");X=new RegExp(k(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(X,A)}else throw new TypeError("cannot set TLD empty");return this.build(!P),this}},h.directory=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(A===void 0||A===!0){if(!this._parts.path&&!this._parts.hostname)return"";if(this._parts.path==="/")return"/";var $=this._parts.path.length-this.filename().length-1,ee=this._parts.path.substring(0,$)||(this._parts.hostname?"/":"");return A?a.decodePath(ee):ee}else{var X=this._parts.path.length-this.filename().length,re=this._parts.path.substring(0,X),ae=new RegExp("^"+k(re));return this.is("relative")||(A||(A="/"),A.charAt(0)!=="/"&&(A="/"+A)),A&&A.charAt(A.length-1)!=="/"&&(A+="/"),A=a.recodePath(A),this._parts.path=this._parts.path.replace(ae,A),this.build(!P),this}},h.filename=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(typeof A!="string"){if(!this._parts.path||this._parts.path==="/")return"";var $=this._parts.path.lastIndexOf("/"),ee=this._parts.path.substring($+1);return A?a.decodePathSegment(ee):ee}else{var X=!1;A.charAt(0)==="/"&&(A=A.substring(1)),A.match(/\.?\//)&&(X=!0);var re=new RegExp(k(this.filename())+"$");return A=a.recodePath(A),this._parts.path=this._parts.path.replace(re,A),X?this.normalizePath(P):this.build(!P),this}},h.suffix=function(A,P){if(this._parts.urn)return A===void 0?"":this;if(A===void 0||A===!0){if(!this._parts.path||this._parts.path==="/")return"";var $=this.filename(),ee=$.lastIndexOf("."),X,re;return ee===-1?"":(X=$.substring(ee+1),re=/^[a-z0-9%]+$/i.test(X)?X:"",A?a.decodePathSegment(re):re)}else{A.charAt(0)==="."&&(A=A.substring(1));var ae=this.suffix(),De;if(ae)A?De=new RegExp(k(ae)+"$"):De=new RegExp(k("."+ae)+"$");else{if(!A)return this;this._parts.path+="."+a.recodePath(A)}return De&&(A=a.recodePath(A),this._parts.path=this._parts.path.replace(De,A)),this.build(!P),this}},h.segment=function(A,P,$){var ee=this._parts.urn?":":"/",X=this.path(),re=X.substring(0,1)==="/",ae=X.split(ee);if(A!==void 0&&typeof A!="number"&&($=P,P=A,A=void 0),A!==void 0&&typeof A!="number")throw new Error('Bad segment "'+A+'", must be 0-based integer');if(re&&ae.shift(),A<0&&(A=Math.max(ae.length+A,0)),P===void 0)return A===void 0?ae:ae[A];if(A===null||ae[A]===void 0)if(L(P)){ae=[];for(var De=0,Z=P.length;De<Z;De++)!P[De].length&&(!ae.length||!ae[ae.length-1].length)||(ae.length&&!ae[ae.length-1].length&&ae.pop(),ae.push(U(P[De])))}else(P||typeof P=="string")&&(P=U(P),ae[ae.length-1]===""?ae[ae.length-1]=P:ae.push(P));else P?ae[A]=U(P):ae.splice(A,1);return re&&ae.unshift(""),this.path(ae.join(ee),$)},h.segmentCoded=function(A,P,$){var ee,X,re;if(typeof A!="number"&&($=P,P=A,A=void 0),P===void 0){if(ee=this.segment(A,P,$),!L(ee))ee=ee!==void 0?a.decode(ee):void 0;else for(X=0,re=ee.length;X<re;X++)ee[X]=a.decode(ee[X]);return ee}if(!L(P))P=typeof P=="string"||P instanceof String?a.encode(P):P;else for(X=0,re=P.length;X<re;X++)P[X]=a.encode(P[X]);return this.segment(A,P,$)};var Xe=h.query;return h.query=function(A,P){if(A===!0)return a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof A=="function"){var $=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace),ee=A.call(this,$);return this._parts.query=a.buildQuery(ee||$,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!P),this}else return A!==void 0&&typeof A!="string"?(this._parts.query=a.buildQuery(A,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!P),this):Xe.call(this,A,P)},h.setQuery=function(A,P,$){var ee=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof A=="string"||A instanceof String)ee[A]=P!==void 0?P:null;else if(typeof A=="object")for(var X in A)y.call(A,X)&&(ee[X]=A[X]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");return this._parts.query=a.buildQuery(ee,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof A!="string"&&($=P),this.build(!$),this},h.addQuery=function(A,P,$){var ee=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.addQuery(ee,A,P===void 0?null:P),this._parts.query=a.buildQuery(ee,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof A!="string"&&($=P),this.build(!$),this},h.removeQuery=function(A,P,$){var ee=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.removeQuery(ee,A,P),this._parts.query=a.buildQuery(ee,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),typeof A!="string"&&($=P),this.build(!$),this},h.hasQuery=function(A,P,$){var ee=a.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return a.hasQuery(ee,A,P,$)},h.setSearch=h.setQuery,h.addSearch=h.addQuery,h.removeSearch=h.removeQuery,h.hasSearch=h.hasQuery,h.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()},h.normalizeProtocol=function(A){return typeof this._parts.protocol=="string"&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!A)),this},h.normalizeHostname=function(A){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(!A)),this},h.normalizePort=function(A){return typeof this._parts.protocol=="string"&&this._parts.port===a.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!A)),this},h.normalizePath=function(A){var P=this._parts.path;if(!P)return this;if(this._parts.urn)return this._parts.path=a.recodeUrnPath(this._parts.path),this.build(!A),this;if(this._parts.path==="/")return this;P=a.recodePath(P);var $,ee="",X,re;for(P.charAt(0)!=="/"&&($=!0,P="/"+P),(P.slice(-3)==="/.."||P.slice(-2)==="/.")&&(P+="/"),P=P.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),$&&(ee=P.substring(1).match(/^(\.\.\/)+/)||"",ee&&(ee=ee[0]));X=P.search(/\/\.\.(\/|$)/),X!==-1;){if(X===0){P=P.substring(3);continue}re=P.substring(0,X).lastIndexOf("/"),re===-1&&(re=X),P=P.substring(0,re)+P.substring(X+3)}return $&&this.is("relative")&&(P=ee+P.substring(1)),this._parts.path=P,this.build(!A),this},h.normalizePathname=h.normalizePath,h.normalizeQuery=function(A){return typeof this._parts.query=="string"&&(this._parts.query.length?this.query(a.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!A)),this},h.normalizeFragment=function(A){return this._parts.fragment||(this._parts.fragment=null,this.build(!A)),this},h.normalizeSearch=h.normalizeQuery,h.normalizeHash=h.normalizeFragment,h.iso8859=function(){var A=a.encode,P=a.decode;a.encode=escape,a.decode=decodeURIComponent;try{this.normalize()}finally{a.encode=A,a.decode=P}return this},h.unicode=function(){var A=a.encode,P=a.decode;a.encode=te,a.decode=unescape;try{this.normalize()}finally{a.encode=A,a.decode=P}return this},h.readable=function(){var A=this.clone();A.username("").password("").normalize();var P="";if(A._parts.protocol&&(P+=A._parts.protocol+"://"),A._parts.hostname&&(A.is("punycode")&&r?(P+=r.toUnicode(A._parts.hostname),A._parts.port&&(P+=":"+A._parts.port)):P+=A.host()),A._parts.hostname&&A._parts.path&&A._parts.path.charAt(0)!=="/"&&(P+="/"),P+=A.path(!0),A._parts.query){for(var $="",ee=0,X=A._parts.query.split("&"),re=X.length;ee<re;ee++){var ae=(X[ee]||"").split("=");$+="&"+a.decodeQuery(ae[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),ae[1]!==void 0&&($+="="+a.decodeQuery(ae[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}P+="?"+$.substring(1)}return P+=a.decodeQuery(A.hash(),!0),P},h.absoluteTo=function(A){var P=this.clone(),$=["protocol","username","password","hostname","port"],ee,X,re;if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(A instanceof a||(A=new a(A)),P._parts.protocol||(P._parts.protocol=A._parts.protocol,this._parts.hostname))return P;for(X=0;re=$[X];X++)P._parts[re]=A._parts[re];return P._parts.path?(P._parts.path.substring(-2)===".."&&(P._parts.path+="/"),P.path().charAt(0)!=="/"&&(ee=A.directory(),ee=ee||(A.path().indexOf("/")===0?"/":""),P._parts.path=(ee?ee+"/":"")+P._parts.path,P.normalizePath())):(P._parts.path=A._parts.path,P._parts.query||(P._parts.query=A._parts.query)),P.build(),P},h.relativeTo=function(A){var P=this.clone().normalize(),$,ee,X,re,ae;if(P._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(A=new a(A).normalize(),$=P._parts,ee=A._parts,re=P.path(),ae=A.path(),re.charAt(0)!=="/")throw new Error("URI is already relative");if(ae.charAt(0)!=="/")throw new Error("Cannot calculate a URI relative to another relative URI");if($.protocol===ee.protocol&&($.protocol=null),$.username!==ee.username||$.password!==ee.password||$.protocol!==null||$.username!==null||$.password!==null)return P.build();if($.hostname===ee.hostname&&$.port===ee.port)$.hostname=null,$.port=null;else return P.build();if(re===ae)return $.path="",P.build();if(X=a.commonPath(re,ae),!X)return P.build();var De=ee.path.substring(X.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return $.path=De+$.path.substring(X.length)||"./",P.build()},h.equals=function(A){var P=this.clone(),$=new a(A),ee={},X={},re={},ae,De,Z;if(P.normalize(),$.normalize(),P.toString()===$.toString())return!0;if(ae=P.query(),De=$.query(),P.query(""),$.query(""),P.toString()!==$.toString()||ae.length!==De.length)return!1;ee=a.parseQuery(ae,this._parts.escapeQuerySpace),X=a.parseQuery(De,this._parts.escapeQuerySpace);for(Z in ee)if(y.call(ee,Z)){if(L(ee[Z])){if(!j(ee[Z],X[Z]))return!1}else if(ee[Z]!==X[Z])return!1;re[Z]=!0}for(Z in X)if(y.call(X,Z)&&!re[Z])return!1;return!0},h.preventInvalidHostname=function(A){return this._parts.preventInvalidHostname=!!A,this},h.duplicateQueryParameters=function(A){return this._parts.duplicateQueryParameters=!!A,this},h.escapeQuerySpace=function(A){return this._parts.escapeQuerySpace=!!A,this},a})});var Tz,Jh,zx=Je(()=>{Mo();Tz=ta(Nx()),Jh=class extends dn{uriParams(){return(0,Tz.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(a=>t[a]!==null).reduce((a,l)=>(a[l]=t[l],a),{}),i;n&&Object.keys(n).length>0&&(i=this.b64EncodeUnicode(JSON.stringify(n))),this.navigateToURLWithFilters(i)}navigateToURLWithFilters(r){let e=new Tz.default(this.urlRedirectTarget.href),t=Cd({},e.query(!0));this.keepFiltersPanelOpenValue&&(t.keep_filters_panel_open=this.keepFiltersPanelOpenValue?1:null),t.page=1,r?t.filters=r:delete t.filters,e.query(t),this.urlRedirectTarget.href=e,this.urlRedirectTarget.click()}};Qr(Jh,"targets",["urlRedirect"]),Qr(Jh,"values",{keepFiltersPanelOpen:Boolean})});var rD,ice=Je(()=>{zx();rD=class extends Jh{getFilterValue(){let r={};return this.optionTargets.forEach(e=>{r[e.value]=e.checked}),r}getFilterClass(){let{filterClass:r}=this.optionTarget.dataset;return r}};Qr(rD,"targets",["option"])});var Os=ve((Cz,Ez)=>{(function(r,e){typeof Cz=="object"&&typeof Ez<"u"?Ez.exports=e():typeof define=="function"&&define.amd?define(e):(r=r||self,r.CodeMirror=e())})(Cz,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),a=/Edge\/(\d+)/.exec(r),l=n||i||a,h=l&&(n?document.documentMode||6:+(a||i)[1]),y=!a&&/WebKit\//.test(r),k=y&&/Qt\/\d+\.\d+/.test(r),E=!a&&/Chrome\//.test(r),L=/Opera\//.test(r),q=/Apple Computer/.test(navigator.vendor),B=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(r),j=/PhantomJS/.test(r),U=q&&(/Mobile\/\w+/.test(r)||navigator.maxTouchPoints>2),J=/Android/.test(r),te=U||J||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(r),ie=U||/Mac/.test(e),de=/\bCrOS\b/.test(r),_=/win/i.test(e),ye=L&&r.match(/Version\/(\d*\.\d*)/);ye&&(ye=Number(ye[1])),ye&&ye>=15&&(L=!1,y=!0);var ce=ie&&(k||L&&(ye==null||ye<12.11)),be=t||l&&h>=9;function xe(f){return new RegExp("(^|\\s)"+f+"(?:$|\\s)\\s*")}var ke=function(f,g){var D=f.className,o=xe(g).exec(D);if(o){var u=D.slice(o.index+o[0].length);f.className=D.slice(0,o.index)+(u?o[1]+u:"")}};function Te(f){for(var g=f.childNodes.length;g>0;--g)f.removeChild(f.firstChild);return f}function Xe(f,g){return Te(f).appendChild(g)}function A(f,g,D,o){var u=document.createElement(f);if(D&&(u.className=D),o&&(u.style.cssText=o),typeof g=="string")u.appendChild(document.createTextNode(g));else if(g)for(var p=0;p<g.length;++p)u.appendChild(g[p]);return u}function P(f,g,D,o){var u=A(f,g,D,o);return u.setAttribute("role","presentation"),u}var $;document.createRange?$=function(f,g,D,o){var u=document.createRange();return u.setEnd(o||f,D),u.setStart(f,g),u}:$=function(f,g,D){var o=document.body.createTextRange();try{o.moveToElementText(f.parentNode)}catch{return o}return o.collapse(!0),o.moveEnd("character",D),o.moveStart("character",g),o};function ee(f,g){if(g.nodeType==3&&(g=g.parentNode),f.contains)return f.contains(g);do if(g.nodeType==11&&(g=g.host),g==f)return!0;while(g=g.parentNode)}function X(){var f;try{f=document.activeElement}catch{f=document.body||null}for(;f&&f.shadowRoot&&f.shadowRoot.activeElement;)f=f.shadowRoot.activeElement;return f}function re(f,g){var D=f.className;xe(g).test(D)||(f.className+=(D?" ":"")+g)}function ae(f,g){for(var D=f.split(" "),o=0;o<D.length;o++)D[o]&&!xe(D[o]).test(g)&&(g+=" "+D[o]);return g}var De=function(f){f.select()};U?De=function(f){f.selectionStart=0,f.selectionEnd=f.value.length}:l&&(De=function(f){try{f.select()}catch{}});function Z(f){var g=Array.prototype.slice.call(arguments,1);return function(){return f.apply(null,g)}}function V(f,g,D){g||(g={});for(var o in f)f.hasOwnProperty(o)&&(D!==!1||!g.hasOwnProperty(o))&&(g[o]=f[o]);return g}function Ke(f,g,D,o,u){g==null&&(g=f.search(/[^\s\u00a0]/),g==-1&&(g=f.length));for(var p=o||0,b=u||0;;){var S=f.indexOf(" ",p);if(S<0||S>=g)return b+(g-p);b+=S-p,b+=D-b%D,p=S+1}}var rt=function(){this.id=null,this.f=null,this.time=0,this.handler=Z(this.onTimeout,this)};rt.prototype.onTimeout=function(f){f.id=0,f.time<=+new Date?f.f():setTimeout(f.handler,f.time-+new Date)},rt.prototype.set=function(f,g){this.f=g;var D=+new Date+f;(!this.id||D<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,f),this.time=D)};function Ye(f,g){for(var D=0;D<f.length;++D)if(f[D]==g)return D;return-1}var It=50,kt={toString:function(){return"CodeMirror.Pass"}},Vt={scroll:!1},Ft={origin:"*mouse"},lr={origin:"+move"};function ur(f,g,D){for(var o=0,u=0;;){var p=f.indexOf(" ",o);p==-1&&(p=f.length);var b=p-o;if(p==f.length||u+b>=g)return o+Math.min(b,g-u);if(u+=p-o,u+=D-u%D,o=p+1,u>=g)return o}}var Dr=[""];function Zt(f){for(;Dr.length<=f;)Dr.push(Mt(Dr)+" ");return Dr[f]}function Mt(f){return f[f.length-1]}function At(f,g){for(var D=[],o=0;o<f.length;o++)D[o]=g(f[o],o);return D}function at(f,g,D){for(var o=0,u=D(g);o<f.length&&D(f[o])<=u;)o++;f.splice(o,0,g)}function he(){}function Oe(f,g){var D;return Object.create?D=Object.create(f):(he.prototype=f,D=new he),g&&V(g,D),D}var We=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ar(f){return/\w/.test(f)||f>"\x80"&&(f.toUpperCase()!=f.toLowerCase()||We.test(f))}function dt(f,g){return g?g.source.indexOf("\\w")>-1&&ar(f)?!0:g.test(f):ar(f)}function Ut(f){for(var g in f)if(f.hasOwnProperty(g)&&f[g])return!1;return!0}var Nt=/[\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 wr(f){return f.charCodeAt(0)>=768&&Nt.test(f)}function Sr(f,g,D){for(;(D<0?g>0:g<f.length)&&wr(f.charAt(g));)g+=D;return g}function Lr(f,g,D){for(var o=g>D?-1:1;;){if(g==D)return g;var u=(g+D)/2,p=o<0?Math.ceil(u):Math.floor(u);if(p==g)return f(p)?g:D;f(p)?D=p:g=p+o}}function Cr(f,g,D,o){if(!f)return o(g,D,"ltr",0);for(var u=!1,p=0;p<f.length;++p){var b=f[p];(b.from<D&&b.to>g||g==D&&b.to==g)&&(o(Math.max(b.from,g),Math.min(b.to,D),b.level==1?"rtl":"ltr",p),u=!0)}u||o(g,D,"ltr")}var et=null;function pt(f,g,D){var o;et=null;for(var u=0;u<f.length;++u){var p=f[u];if(p.from<g&&p.to>g)return u;p.to==g&&(p.from!=p.to&&D=="before"?o=u:et=u),p.from==g&&(p.from!=p.to&&D!="before"?o=u:et=u)}return o??et}var tr=function(){var f="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",g="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function D(N){return N<=247?f.charAt(N):1424<=N&&N<=1524?"R":1536<=N&&N<=1785?g.charAt(N-1536):1774<=N&&N<=2220?"r":8192<=N&&N<=8203?"w":N==8204?"b":"L"}var o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,u=/[stwN]/,p=/[LRr]/,b=/[Lb1n]/,S=/[1n]/;function M(N,G,Q){this.level=N,this.from=G,this.to=Q}return function(N,G){var Q=G=="ltr"?"L":"R";if(N.length==0||G=="ltr"&&!o.test(N))return!1;for(var ue=N.length,Se=[],Re=0;Re<ue;++Re)Se.push(D(N.charCodeAt(Re)));for(var nt=0,it=Q;nt<ue;++nt){var wt=Se[nt];wt=="m"?Se[nt]=it:it=wt}for(var Rt=0,jt=Q;Rt<ue;++Rt){var Qt=Se[Rt];Qt=="1"&&jt=="r"?Se[Rt]="n":p.test(Qt)&&(jt=Qt,Qt=="r"&&(Se[Rt]="R"))}for(var fr=1,ir=Se[0];fr<ue-1;++fr){var br=Se[fr];br=="+"&&ir=="1"&&Se[fr+1]=="1"?Se[fr]="1":br==","&&ir==Se[fr+1]&&(ir=="1"||ir=="n")&&(Se[fr]=ir),ir=br}for(var Kr=0;Kr<ue;++Kr){var en=Se[Kr];if(en==",")Se[Kr]="N";else if(en=="%"){var gn=void 0;for(gn=Kr+1;gn<ue&&Se[gn]=="%";++gn);for(var fi=Kr&&Se[Kr-1]=="!"||gn<ue&&Se[gn]=="1"?"1":"N",Vi=Kr;Vi<gn;++Vi)Se[Vi]=fi;Kr=gn-1}}for(var Kn=0,$i=Q;Kn<ue;++Kn){var Li=Se[Kn];$i=="L"&&Li=="1"?Se[Kn]="L":p.test(Li)&&($i=Li)}for(var En=0;En<ue;++En)if(u.test(Se[En])){var Qn=void 0;for(Qn=En+1;Qn<ue&&u.test(Se[Qn]);++Qn);for(var Ln=(En?Se[En-1]:Q)=="L",Ei=(Qn<ue?Se[Qn]:Q)=="L",Ao=Ln==Ei?Ln?"L":"R":Q,li=En;li<Qn;++li)Se[li]=Ao;En=Qn-1}for(var lo=[],Il,ea=0;ea<ue;)if(b.test(Se[ea])){var vs=ea;for(++ea;ea<ue&&b.test(Se[ea]);++ea);lo.push(new M(0,vs,ea))}else{var ys=ea,Vo=lo.length,kf=G=="rtl"?1:0;for(++ea;ea<ue&&Se[ea]!="L";++ea);for(var da=ys;da<ea;)if(S.test(Se[da])){ys<da&&(lo.splice(Vo,0,new M(1,ys,da)),Vo+=kf);var il=da;for(++da;da<ea&&S.test(Se[da]);++da);lo.splice(Vo,0,new M(2,il,da)),Vo+=kf,ys=da}else++da;ys<ea&&lo.splice(Vo,0,new M(1,ys,ea))}return G=="ltr"&&(lo[0].level==1&&(Il=N.match(/^\s+/))&&(lo[0].from=Il[0].length,lo.unshift(new M(0,0,Il[0].length))),Mt(lo).level==1&&(Il=N.match(/\s+$/))&&(Mt(lo).to-=Il[0].length,lo.push(new M(0,ue-Il[0].length,ue)))),G=="rtl"?lo.reverse():lo}}();function Pr(f,g){var D=f.order;return D==null&&(D=f.order=tr(f.text,g)),D}var gi=[],zr=function(f,g,D){if(f.addEventListener)f.addEventListener(g,D,!1);else if(f.attachEvent)f.attachEvent("on"+g,D);else{var o=f._handlers||(f._handlers={});o[g]=(o[g]||gi).concat(D)}};function un(f,g){return f._handlers&&f._handlers[g]||gi}function Tt(f,g,D){if(f.removeEventListener)f.removeEventListener(g,D,!1);else if(f.detachEvent)f.detachEvent("on"+g,D);else{var o=f._handlers,u=o&&o[g];if(u){var p=Ye(u,D);p>-1&&(o[g]=u.slice(0,p).concat(u.slice(p+1)))}}}function Bt(f,g){var D=un(f,g);if(!!D.length)for(var o=Array.prototype.slice.call(arguments,2),u=0;u<D.length;++u)D[u].apply(null,o)}function Or(f,g,D){return typeof g=="string"&&(g={type:g,preventDefault:function(){this.defaultPrevented=!0}}),Bt(f,D||g.type,f,g),Ze(g)||g.codemirrorIgnore}function tn(f){var g=f._handlers&&f._handlers.cursorActivity;if(!!g)for(var D=f.curOp.cursorActivityHandlers||(f.curOp.cursorActivityHandlers=[]),o=0;o<g.length;++o)Ye(D,g[o])==-1&&D.push(g[o])}function jr(f,g){return un(f,g).length>0}function hn(f){f.prototype.on=function(g,D){zr(this,g,D)},f.prototype.off=function(g,D){Tt(this,g,D)}}function Pn(f){f.preventDefault?f.preventDefault():f.returnValue=!1}function Ui(f){f.stopPropagation?f.stopPropagation():f.cancelBubble=!0}function Ze(f){return f.defaultPrevented!=null?f.defaultPrevented:f.returnValue==!1}function st(f){Pn(f),Ui(f)}function Lt(f){return f.target||f.srcElement}function sr(f){var g=f.which;return g==null&&(f.button&1?g=1:f.button&2?g=3:f.button&4&&(g=2)),ie&&f.ctrlKey&&g==1&&(g=3),g}var Rr=function(){if(l&&h<9)return!1;var f=A("div");return"draggable"in f||"dragDrop"in f}(),gr;function an(f){if(gr==null){var g=A("span","\u200B");Xe(f,A("span",[g,document.createTextNode("x")])),f.firstChild.offsetHeight!=0&&(gr=g.offsetWidth<=1&&g.offsetHeight>2&&!(l&&h<8))}var D=gr?A("span","\u200B"):A("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return D.setAttribute("cm-text",""),D}var Jr;function Nn(f){if(Jr!=null)return Jr;var g=Xe(f,document.createTextNode("A\u062EA")),D=$(g,0,1).getBoundingClientRect(),o=$(g,1,2).getBoundingClientRect();return Te(f),!D||D.left==D.right?!1:Jr=o.right-D.right<3}var zn=`
539
539
 
540
540
  b`.split(/\n/).length!=3?function(f){for(var g=0,D=[],o=f.length;g<=o;){var u=f.indexOf(`
541
541
  `,g);u==-1&&(u=f.length);var p=f.slice(g,f.charAt(u-1)=="\r"?u-1:u),b=p.indexOf("\r");b!=-1?(D.push(p.slice(0,b)),g+=b+1):(D.push(p),g=u+1)}return D}:function(f){return f.split(/\r\n?|\n/)},ai=window.getSelection?function(f){try{return f.selectionStart!=f.selectionEnd}catch{return!1}}:function(f){var g;try{g=f.ownerDocument.selection.createRange()}catch{}return!g||g.parentElement()!=f?!1:g.compareEndPoints("StartToEnd",g)!=0},xo=function(){var f=A("div");return"oncopy"in f?!0:(f.setAttribute("oncopy","return;"),typeof f.oncopy=="function")}(),wi=null;function Ca(f){if(wi!=null)return wi;var g=Xe(f,A("span","x")),D=g.getBoundingClientRect(),o=$(g,0,1).getBoundingClientRect();return wi=Math.abs(D.left-o.left)>1}var Si={},zo={};function Xa(f,g){arguments.length>2&&(g.dependencies=Array.prototype.slice.call(arguments,2)),Si[f]=g}function di(f,g){zo[f]=g}function we(f){if(typeof f=="string"&&zo.hasOwnProperty(f))f=zo[f];else if(f&&typeof f.name=="string"&&zo.hasOwnProperty(f.name)){var g=zo[f.name];typeof g=="string"&&(g={name:g}),f=Oe(g,f),f.name=g.name}else{if(typeof f=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(f))return we("application/xml");if(typeof f=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(f))return we("application/json")}return typeof f=="string"?{name:f}:f||{name:"null"}}function Ie(f,g){g=we(g);var D=Si[g.name];if(!D)return Ie(f,"text/plain");var o=D(f,g);if(Fe.hasOwnProperty(g.name)){var u=Fe[g.name];for(var p in u)!u.hasOwnProperty(p)||(o.hasOwnProperty(p)&&(o["_"+p]=o[p]),o[p]=u[p])}if(o.name=g.name,g.helperType&&(o.helperType=g.helperType),g.modeProps)for(var b in g.modeProps)o[b]=g.modeProps[b];return o}var Fe={};function Ge(f,g){var D=Fe.hasOwnProperty(f)?Fe[f]:Fe[f]={};V(g,D)}function ot(f,g){if(g===!0)return g;if(f.copyState)return f.copyState(g);var D={};for(var o in g){var u=g[o];u instanceof Array&&(u=u.concat([])),D[o]=u}return D}function bt(f,g){for(var D;f.innerMode&&(D=f.innerMode(g),!(!D||D.mode==f));)g=D.state,f=D.mode;return D||{mode:f,state:g}}function gt(f,g,D){return f.startState?f.startState(g,D):!0}var qe=function(f,g,D){this.pos=this.start=0,this.string=f,this.tabSize=g||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=D};qe.prototype.eol=function(){return this.pos>=this.string.length},qe.prototype.sol=function(){return this.pos==this.lineStart},qe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},qe.prototype.eat=function(f){var g=this.string.charAt(this.pos),D;if(typeof f=="string"?D=g==f:D=g&&(f.test?f.test(g):f(g)),D)return++this.pos,g},qe.prototype.eatWhile=function(f){for(var g=this.pos;this.eat(f););return this.pos>g},qe.prototype.eatSpace=function(){for(var f=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>f},qe.prototype.skipToEnd=function(){this.pos=this.string.length},qe.prototype.skipTo=function(f){var g=this.string.indexOf(f,this.pos);if(g>-1)return this.pos=g,!0},qe.prototype.backUp=function(f){this.pos-=f},qe.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ke(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ke(this.string,this.lineStart,this.tabSize):0)},qe.prototype.indentation=function(){return Ke(this.string,null,this.tabSize)-(this.lineStart?Ke(this.string,this.lineStart,this.tabSize):0)},qe.prototype.match=function(f,g,D){if(typeof f=="string"){var o=function(b){return D?b.toLowerCase():b},u=this.string.substr(this.pos,f.length);if(o(u)==o(f))return g!==!1&&(this.pos+=f.length),!0}else{var p=this.string.slice(this.pos).match(f);return p&&p.index>0?null:(p&&g!==!1&&(this.pos+=p[0].length),p)}},qe.prototype.current=function(){return this.string.slice(this.start,this.pos)},qe.prototype.hideFirstChars=function(f,g){this.lineStart+=f;try{return g()}finally{this.lineStart-=f}},qe.prototype.lookAhead=function(f){var g=this.lineOracle;return g&&g.lookAhead(f)},qe.prototype.baseToken=function(){var f=this.lineOracle;return f&&f.baseToken(this.pos)};function $e(f,g){if(g-=f.first,g<0||g>=f.size)throw new Error("There is no line "+(g+f.first)+" in the document.");for(var D=f;!D.lines;)for(var o=0;;++o){var u=D.children[o],p=u.chunkSize();if(g<p){D=u;break}g-=p}return D.lines[g]}function Dt(f,g,D){var o=[],u=g.line;return f.iter(g.line,D.line+1,function(p){var b=p.text;u==D.line&&(b=b.slice(0,D.ch)),u==g.line&&(b=b.slice(g.ch)),o.push(b),++u}),o}function or(f,g,D){var o=[];return f.iter(g,D,function(u){o.push(u.text)}),o}function zt(f,g){var D=g-f.height;if(D)for(var o=f;o;o=o.parent)o.height+=D}function qt(f){if(f.parent==null)return null;for(var g=f.parent,D=Ye(g.lines,f),o=g.parent;o;g=o,o=o.parent)for(var u=0;o.children[u]!=g;++u)D+=o.children[u].chunkSize();return D+g.first}function dr(f,g){var D=f.first;e:do{for(var o=0;o<f.children.length;++o){var u=f.children[o],p=u.height;if(g<p){f=u;continue e}g-=p,D+=u.chunkSize()}return D}while(!f.lines);for(var b=0;b<f.lines.length;++b){var S=f.lines[b],M=S.height;if(g<M)break;g-=M}return D+b}function Ce(f,g){return g>=f.first&&g<f.first+f.size}function Ue(f,g){return String(f.lineNumberFormatter(g+f.firstLineNumber))}function Pe(f,g,D){if(D===void 0&&(D=null),!(this instanceof Pe))return new Pe(f,g,D);this.line=f,this.ch=g,this.sticky=D}function se(f,g){return f.line-g.line||f.ch-g.ch}function ne(f,g){return f.sticky==g.sticky&&se(f,g)==0}function me(f){return Pe(f.line,f.ch)}function He(f,g){return se(f,g)<0?g:f}function ht(f,g){return se(f,g)<0?f:g}function Wt(f,g){return Math.max(f.first,Math.min(g,f.first+f.size-1))}function nr(f,g){if(g.line<f.first)return Pe(f.first,0);var D=f.first+f.size-1;return g.line>D?Pe(D,$e(f,D).text.length):Ir(g,$e(f,g.line).text.length)}function Ir(f,g){var D=f.ch;return D==null||D>g?Pe(f.line,g):D<0?Pe(f.line,0):f}function Br(f,g){for(var D=[],o=0;o<g.length;o++)D[o]=nr(f,g[o]);return D}var cr=function(f,g){this.state=f,this.lookAhead=g},wn=function(f,g,D,o){this.state=g,this.doc=f,this.line=D,this.maxLookAhead=o||0,this.baseTokens=null,this.baseTokenPos=1};wn.prototype.lookAhead=function(f){var g=this.doc.getLine(this.line+f);return g!=null&&f>this.maxLookAhead&&(this.maxLookAhead=f),g},wn.prototype.baseToken=function(f){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=f;)this.baseTokenPos+=2;var g=this.baseTokens[this.baseTokenPos+1];return{type:g&&g.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-f}},wn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},wn.fromSaved=function(f,g,D){return g instanceof cr?new wn(f,ot(f.mode,g.state),D,g.lookAhead):new wn(f,ot(f.mode,g),D)},wn.prototype.save=function(f){var g=f!==!1?ot(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new cr(g,this.maxLookAhead):g};function An(f,g,D,o){var u=[f.state.modeGen],p={};Na(f,g.text,f.doc.mode,D,function(N,G){return u.push(N,G)},p,o);for(var b=D.state,S=function(N){D.baseTokens=u;var G=f.state.overlays[N],Q=1,ue=0;D.state=!0,Na(f,g.text,G.mode,D,function(Se,Re){for(var nt=Q;ue<Se;){var it=u[Q];it>Se&&u.splice(Q,1,Se,u[Q+1],it),Q+=2,ue=Math.min(Se,it)}if(!!Re)if(G.opaque)u.splice(nt,Q-nt,Se,"overlay "+Re),Q=nt+2;else for(;nt<Q;nt+=2){var wt=u[nt+1];u[nt+1]=(wt?wt+" ":"")+"overlay "+Re}},p),D.state=b,D.baseTokens=null,D.baseTokenPos=1},M=0;M<f.state.overlays.length;++M)S(M);return{styles:u,classes:p.bgClass||p.textClass?p:null}}function rn(f,g,D){if(!g.styles||g.styles[0]!=f.state.modeGen){var o=Xr(f,qt(g)),u=g.text.length>f.options.maxHighlightLength&&ot(f.doc.mode,o.state),p=An(f,g,o);u&&(o.state=u),g.stateAfter=o.save(!u),g.styles=p.styles,p.classes?g.styleClasses=p.classes:g.styleClasses&&(g.styleClasses=null),D===f.doc.highlightFrontier&&(f.doc.modeFrontier=Math.max(f.doc.modeFrontier,++f.doc.highlightFrontier))}return g.styles}function Xr(f,g,D){var o=f.doc,u=f.display;if(!o.mode.startState)return new wn(o,!0,g);var p=au(f,g,D),b=p>o.first&&$e(o,p-1).stateAfter,S=b?wn.fromSaved(o,b,p):new wn(o,gt(o.mode),p);return o.iter(p,g,function(M){Dn(f,M.text,S);var N=S.line;M.stateAfter=N==g-1||N%5==0||N>=u.viewFrom&&N<u.viewTo?S.save():null,S.nextLine()}),D&&(o.modeFrontier=S.line),S}function Dn(f,g,D,o){var u=f.doc.mode,p=new qe(g,f.options.tabSize,D);for(p.start=p.pos=o||0,g==""&&si(u,D.state);!p.eol();)Lo(u,p,D.state),p.start=p.pos}function si(f,g){if(f.blankLine)return f.blankLine(g);if(!!f.innerMode){var D=bt(f,g);if(D.mode.blankLine)return D.mode.blankLine(D.state)}}function Lo(f,g,D,o){for(var u=0;u<10;u++){o&&(o[0]=bt(f,D).mode);var p=f.token(g,D);if(g.pos>g.start)return p}throw new Error("Mode "+f.name+" failed to advance stream.")}var Hs=function(f,g,D){this.start=f.start,this.end=f.pos,this.string=f.current(),this.type=g||null,this.state=D};function Xn(f,g,D,o){var u=f.doc,p=u.mode,b;g=nr(u,g);var S=$e(u,g.line),M=Xr(f,g.line,D),N=new qe(S.text,f.options.tabSize,M),G;for(o&&(G=[]);(o||N.pos<g.ch)&&!N.eol();)N.start=N.pos,b=Lo(p,N,M.state),o&&G.push(new Hs(N,b,ot(u.mode,M.state)));return o?G:new Hs(N,b,M.state)}function ki(f,g){if(f)for(;;){var D=f.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!D)break;f=f.slice(0,D.index)+f.slice(D.index+D[0].length);var o=D[1]?"bgClass":"textClass";g[o]==null?g[o]=D[2]:new RegExp("(?:^|\\s)"+D[2]+"(?:$|\\s)").test(g[o])||(g[o]+=" "+D[2])}return f}function Na(f,g,D,o,u,p,b){var S=D.flattenSpans;S==null&&(S=f.options.flattenSpans);var M=0,N=null,G=new qe(g,f.options.tabSize,o),Q,ue=f.options.addModeClass&&[null];for(g==""&&ki(si(D,o.state),p);!G.eol();){if(G.pos>f.options.maxHighlightLength?(S=!1,b&&Dn(f,g,o,G.pos),G.pos=g.length,Q=null):Q=ki(Lo(D,G,o.state,ue),p),ue){var Se=ue[0].name;Se&&(Q="m-"+(Q?Se+" "+Q:Se))}if(!S||N!=Q){for(;M<G.start;)M=Math.min(G.start,M+5e3),u(M,N);N=Q}G.start=G.pos}for(;M<G.pos;){var Re=Math.min(G.pos,M+5e3);u(Re,N),M=Re}}function au(f,g,D){for(var o,u,p=f.doc,b=D?-1:g-(f.doc.mode.innerMode?1e3:100),S=g;S>b;--S){if(S<=p.first)return p.first;var M=$e(p,S-1),N=M.stateAfter;if(N&&(!D||S+(N instanceof cr?N.lookAhead:0)<=p.modeFrontier))return S;var G=Ke(M.text,null,f.options.tabSize);(u==null||o>G)&&(u=S-1,o=G)}return u}function eo(f,g){if(f.modeFrontier=Math.min(f.modeFrontier,g),!(f.highlightFrontier<g-10)){for(var D=f.first,o=g-1;o>D;o--){var u=$e(f,o).stateAfter;if(u&&(!(u instanceof cr)||o+u.lookAhead<g)){D=o+1;break}}f.highlightFrontier=Math.min(f.highlightFrontier,D)}}var gl=!1,no=!1;function Po(){gl=!0}function Bo(){no=!0}function ni(f,g,D){this.marker=f,this.from=g,this.to=D}function Ja(f,g){if(f)for(var D=0;D<f.length;++D){var o=f[D];if(o.marker==g)return o}}function Qa(f,g){for(var D,o=0;o<f.length;++o)f[o]!=g&&(D||(D=[])).push(f[o]);return D}function kc(f,g){f.markedSpans=f.markedSpans?f.markedSpans.concat([g]):[g],g.marker.attachLine(f)}function aa(f,g,D){var o;if(f)for(var u=0;u<f.length;++u){var p=f[u],b=p.marker,S=p.from==null||(b.inclusiveLeft?p.from<=g:p.from<g);if(S||p.from==g&&b.type=="bookmark"&&(!D||!p.marker.insertLeft)){var M=p.to==null||(b.inclusiveRight?p.to>=g:p.to>g);(o||(o=[])).push(new ni(b,p.from,M?null:p.to))}}return o}function _h(f,g,D){var o;if(f)for(var u=0;u<f.length;++u){var p=f[u],b=p.marker,S=p.to==null||(b.inclusiveRight?p.to>=g:p.to>g);if(S||p.from==g&&b.type=="bookmark"&&(!D||p.marker.insertLeft)){var M=p.from==null||(b.inclusiveLeft?p.from<=g:p.from<g);(o||(o=[])).push(new ni(b,M?null:p.from-g,p.to==null?null:p.to-g))}}return o}function za(f,g){if(g.full)return null;var D=Ce(f,g.from.line)&&$e(f,g.from.line).markedSpans,o=Ce(f,g.to.line)&&$e(f,g.to.line).markedSpans;if(!D&&!o)return null;var u=g.from.ch,p=g.to.ch,b=se(g.from,g.to)==0,S=aa(D,u,b),M=_h(o,p,b),N=g.text.length==1,G=Mt(g.text).length+(N?u:0);if(S)for(var Q=0;Q<S.length;++Q){var ue=S[Q];if(ue.to==null){var Se=Ja(M,ue.marker);Se?N&&(ue.to=Se.to==null?null:Se.to+G):ue.to=u}}if(M)for(var Re=0;Re<M.length;++Re){var nt=M[Re];if(nt.to!=null&&(nt.to+=G),nt.from==null){var it=Ja(S,nt.marker);it||(nt.from=G,N&&(S||(S=[])).push(nt))}else nt.from+=G,N&&(S||(S=[])).push(nt)}S&&(S=Ro(S)),M&&M!=S&&(M=Ro(M));var wt=[S];if(!N){var Rt=g.text.length-2,jt;if(Rt>0&&S)for(var Qt=0;Qt<S.length;++Qt)S[Qt].to==null&&(jt||(jt=[])).push(new ni(S[Qt].marker,null,null));for(var fr=0;fr<Rt;++fr)wt.push(jt);wt.push(M)}return wt}function Ro(f){for(var g=0;g<f.length;++g){var D=f[g];D.from!=null&&D.from==D.to&&D.marker.clearWhenEmpty!==!1&&f.splice(g--,1)}return f.length?f:null}function ws(f,g,D){var o=null;if(f.iter(g.line,D.line+1,function(Se){if(Se.markedSpans)for(var Re=0;Re<Se.markedSpans.length;++Re){var nt=Se.markedSpans[Re].marker;nt.readOnly&&(!o||Ye(o,nt)==-1)&&(o||(o=[])).push(nt)}}),!o)return null;for(var u=[{from:g,to:D}],p=0;p<o.length;++p)for(var b=o[p],S=b.find(0),M=0;M<u.length;++M){var N=u[M];if(!(se(N.to,S.from)<0||se(N.from,S.to)>0)){var G=[M,1],Q=se(N.from,S.from),ue=se(N.to,S.to);(Q<0||!b.inclusiveLeft&&!Q)&&G.push({from:N.from,to:S.from}),(ue>0||!b.inclusiveRight&&!ue)&&G.push({from:S.to,to:N.to}),u.splice.apply(u,G),M+=G.length-3}}return u}function vi(f){var g=f.markedSpans;if(!!g){for(var D=0;D<g.length;++D)g[D].marker.detachLine(f);f.markedSpans=null}}function su(f,g){if(!!g){for(var D=0;D<g.length;++D)g[D].marker.attachLine(f);f.markedSpans=g}}function Ff(f){return f.inclusiveLeft?-1:0}function ff(f){return f.inclusiveRight?1:0}function Ws(f,g){var D=f.lines.length-g.lines.length;if(D!=0)return D;var o=f.find(),u=g.find(),p=se(o.from,u.from)||Ff(f)-Ff(g);if(p)return-p;var b=se(o.to,u.to)||ff(f)-ff(g);return b||g.id-f.id}function yi(f,g){var D=no&&f.markedSpans,o;if(D)for(var u=void 0,p=0;p<D.length;++p)u=D[p],u.marker.collapsed&&(g?u.from:u.to)==null&&(!o||Ws(o,u.marker)<0)&&(o=u.marker);return o}function Di(f){return yi(f,!0)}function nc(f){return yi(f,!1)}function zc(f,g){var D=no&&f.markedSpans,o;if(D)for(var u=0;u<D.length;++u){var p=D[u];p.marker.collapsed&&(p.from==null||p.from<g)&&(p.to==null||p.to>g)&&(!o||Ws(o,p.marker)<0)&&(o=p.marker)}return o}function Lu(f,g,D,o,u){var p=$e(f,g),b=no&&p.markedSpans;if(b)for(var S=0;S<b.length;++S){var M=b[S];if(!!M.marker.collapsed){var N=M.marker.find(0),G=se(N.from,D)||Ff(M.marker)-Ff(u),Q=se(N.to,o)||ff(M.marker)-ff(u);if(!(G>=0&&Q<=0||G<=0&&Q>=0)&&(G<=0&&(M.marker.inclusiveRight&&u.inclusiveLeft?se(N.to,D)>=0:se(N.to,D)>0)||G>=0&&(M.marker.inclusiveRight&&u.inclusiveLeft?se(N.from,o)<=0:se(N.from,o)<0)))return!0}}}function To(f){for(var g;g=Di(f);)f=g.find(-1,!0).line;return f}function qf(f){for(var g;g=nc(f);)f=g.find(1,!0).line;return f}function ic(f){for(var g,D;g=nc(f);)f=g.find(1,!0).line,(D||(D=[])).push(f);return D}function Ss(f,g){var D=$e(f,g),o=To(D);return D==o?g:qt(o)}function wh(f,g){if(g>f.lastLine())return g;var D=$e(f,g),o;if(!Ci(f,D))return g;for(;o=nc(D);)D=o.find(1,!0).line;return qt(D)+1}function Ci(f,g){var D=no&&g.markedSpans;if(D){for(var o=void 0,u=0;u<D.length;++u)if(o=D[u],!!o.marker.collapsed){if(o.from==null)return!0;if(!o.marker.widgetNode&&o.from==0&&o.marker.inclusiveLeft&&vl(f,g,o))return!0}}}function vl(f,g,D){if(D.to==null){var o=D.marker.find(1,!0);return vl(f,o.line,Ja(o.line.markedSpans,D.marker))}if(D.marker.inclusiveRight&&D.to==g.text.length)return!0;for(var u=void 0,p=0;p<g.markedSpans.length;++p)if(u=g.markedSpans[p],u.marker.collapsed&&!u.marker.widgetNode&&u.from==D.to&&(u.to==null||u.to!=D.from)&&(u.marker.inclusiveLeft||D.marker.inclusiveRight)&&vl(f,g,u))return!0}function sa(f){f=To(f);for(var g=0,D=f.parent,o=0;o<D.lines.length;++o){var u=D.lines[o];if(u==f)break;g+=u.height}for(var p=D.parent;p;D=p,p=D.parent)for(var b=0;b<p.children.length;++b){var S=p.children[b];if(S==D)break;g+=S.height}return g}function ds(f){if(f.height==0)return 0;for(var g=f.text.length,D,o=f;D=Di(o);){var u=D.find(0,!0);o=u.from.line,g+=u.from.ch-u.to.ch}for(o=f;D=nc(o);){var p=D.find(0,!0);g-=o.text.length-p.from.ch,o=p.to.line,g+=o.text.length-p.to.ch}return g}function yl(f){var g=f.display,D=f.doc;g.maxLine=$e(D,D.first),g.maxLineLength=ds(g.maxLine),g.maxLineChanged=!0,D.iter(function(o){var u=ds(o);u>g.maxLineLength&&(g.maxLineLength=u,g.maxLine=o)})}var Yi=function(f,g,D){this.text=f,su(this,g),this.height=D?D(this):1};Yi.prototype.lineNo=function(){return qt(this)},hn(Yi);function Bc(f,g,D,o){f.text=g,f.stateAfter&&(f.stateAfter=null),f.styles&&(f.styles=null),f.order!=null&&(f.order=null),vi(f),su(f,D);var u=o?o(f):1;u!=f.height&&zt(f,u)}function ks(f){f.parent=null,vi(f)}var _o={},hf={};function od(f,g){if(!f||/^\s*$/.test(f))return null;var D=g.addModeClass?hf:_o;return D[f]||(D[f]=f.replace(/\S+/g,"cm-$&"))}function $d(f,g){var D=P("span",null,null,y?"padding-right: .1px":null),o={pre:P("pre",[D],"CodeMirror-line"),content:D,col:0,pos:0,cm:f,trailingSpace:!1,splitSpaces:f.getOption("lineWrapping")};g.measure={};for(var u=0;u<=(g.rest?g.rest.length:0);u++){var p=u?g.rest[u-1]:g.line,b=void 0;o.pos=0,o.addToken=ad,Nn(f.display.measure)&&(b=Pr(p,f.doc.direction))&&(o.addToken=Gd(o.addToken,b)),o.map=[];var S=g!=f.display.externalMeasured&&qt(p);Tc(p,o,rn(f,p,S)),p.styleClasses&&(p.styleClasses.bgClass&&(o.bgClass=ae(p.styleClasses.bgClass,o.bgClass||"")),p.styleClasses.textClass&&(o.textClass=ae(p.styleClasses.textClass,o.textClass||""))),o.map.length==0&&o.map.push(0,0,o.content.appendChild(an(f.display.measure))),u==0?(g.measure.map=o.map,g.measure.cache={}):((g.measure.maps||(g.measure.maps=[])).push(o.map),(g.measure.caches||(g.measure.caches=[])).push({}))}if(y){var M=o.content.lastChild;(/\bcm-tab\b/.test(M.className)||M.querySelector&&M.querySelector(".cm-tab"))&&(o.content.className="cm-tab-wrap-hack")}return Bt(f,"renderLine",f,g.line,o.pre),o.pre.className&&(o.textClass=ae(o.pre.className,o.textClass||"")),o}function ql(f){var g=A("span","\u2022","cm-invalidchar");return g.title="\\u"+f.charCodeAt(0).toString(16),g.setAttribute("aria-label",g.title),g}function ad(f,g,D,o,u,p,b){if(!!g){var S=f.splitSpaces?Vs(g,f.trailingSpace):g,M=f.cm.state.specialChars,N=!1,G;if(!M.test(g))f.col+=g.length,G=document.createTextNode(S),f.map.push(f.pos,f.pos+g.length,G),l&&h<9&&(N=!0),f.pos+=g.length;else{G=document.createDocumentFragment();for(var Q=0;;){M.lastIndex=Q;var ue=M.exec(g),Se=ue?ue.index-Q:g.length-Q;if(Se){var Re=document.createTextNode(S.slice(Q,Q+Se));l&&h<9?G.appendChild(A("span",[Re])):G.appendChild(Re),f.map.push(f.pos,f.pos+Se,Re),f.col+=Se,f.pos+=Se}if(!ue)break;Q+=Se+1;var nt=void 0;if(ue[0]==" "){var it=f.cm.options.tabSize,wt=it-f.col%it;nt=G.appendChild(A("span",Zt(wt),"cm-tab")),nt.setAttribute("role","presentation"),nt.setAttribute("cm-text"," "),f.col+=wt}else ue[0]=="\r"||ue[0]==`