1var htmx=(function(){const htmx={onLoad:null,process:null,on:null,off:null,trigger:null,ajax:null,find:null,findAll:null,closest:null,values:function(e,t){return getInputValues(e,t||`post`).values},remove:null,addClass:null,removeClass:null,toggleClass:null,takeClass:null,swap:null,defineExtension:null,removeExtension:null,logAll:null,logNone:null,logger:null,config:{historyEnabled:!0,historyCacheSize:10,refreshOnHistoryMiss:!1,defaultSwapStyle:`innerHTML`,defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:!0,indicatorClass:`htmx-indicator`,requestClass:`htmx-request`,addedClass:`htmx-added`,settlingClass:`htmx-settling`,swappingClass:`htmx-swapping`,allowEval:!0,allowScriptTags:!0,inlineScriptNonce:``,inlineStyleNonce:``,attributesToSettle:[`class`,`style`,`width`,`height`],withCredentials:!1,timeout:0,wsReconnectDelay:`full-jitter`,wsBinaryType:`blob`,disableSelector:`[hx-disable], [data-hx-disable]`,scrollBehavior:`instant`,defaultFocusScroll:!1,getCacheBusterParam:!1,globalViewTransitions:!1,methodsThatUseUrlParams:[`get`,`delete`],selfRequestsOnly:!0,ignoreTitle:!1,scrollIntoViewOnBoost:!0,triggerSpecsCache:null,disableInheritance:!1,responseHandling:[{code:`204`,swap:!1},{code:`[23]..`,swap:!0},{code:`[45]..`,swap:!1,error:!0}],allowNestedOobSwaps:!0,historyRestoreAsHxRequest:!0,reportValidityOfForms:!1},parseInterval:null,location,_:null,version:`2.0.10`};htmx.onLoad=onLoadHelper,htmx.process=processNode,htmx.on=addEventListenerImpl,htmx.off=removeEventListenerImpl,htmx.trigger=triggerEvent,htmx.ajax=ajaxHelper,htmx.find=find,htmx.findAll=findAll,htmx.closest=closest,htmx.remove=removeElement,htmx.addClass=addClassToElement,htmx.removeClass=removeClassFromElement,htmx.toggleClass=toggleClassOnElement,htmx.takeClass=takeClassForElement,htmx.swap=swap,htmx.defineExtension=defineExtension,htmx.removeExtension=removeExtension,htmx.logAll=logAll,htmx.logNone=logNone,htmx.parseInterval=parseInterval,htmx._=internalEval;const internalAPI={addTriggerHandler,bodyContains,canAccessLocalStorage,findThisElement,filterValues,swap,hasAttribute,getAttributeValue,getClosestAttributeValue,getClosestMatch,getExpressionVars,getHeaders,getInputValues,getInternalData,getSwapSpecification,getTriggerSpecs,getTarget,makeFragment,mergeObjects,makeSettleInfo,oobSwap,querySelectorExt,settleImmediately,shouldCancel,triggerEvent,triggerErrorEvent,withExtensions},VERBS=[`get`,`post`,`put`,`delete`,`patch`],VERB_SELECTOR=VERBS.map(function(e){return`[hx-`+e+`], [data-hx-`+e+`]`}).join(`, `);function parseInterval(e){if(e==null)return;let t=NaN;return t=e.slice(-2)==`ms`?parseFloat(e.slice(0,-2)):e.slice(-1)==`s`?parseFloat(e.slice(0,-1))*1e3:e.slice(-1)==`m`?parseFloat(e.slice(0,-1))*1e3*60:parseFloat(e),isNaN(t)?void 0:t}function getRawAttribute(e,t){return e instanceof Element&&e.getAttribute(t)}function hasAttribute(e,t){return!!e.hasAttribute&&(e.hasAttribute(t)||e.hasAttribute(`data-`+t))}function getAttributeValue(e,t){return getRawAttribute(e,t)||getRawAttribute(e,`data-`+t)}function parentElt(e){let t=e.parentElement;return!t&&e.parentNode instanceof ShadowRoot?e.parentNode:t}function getDocument(){return document}function getRootNode(e,t){return e.getRootNode?e.getRootNode({composed:t}):getDocument()}function getClosestMatch(e,t){for(;e&&!t(e);)e=parentElt(e);return e||null}function getAttributeValueWithDisinheritance(e,t,n){let r=getAttributeValue(t,n),i=getAttributeValue(t,`hx-disinherit`);var a=getAttributeValue(t,`hx-inherit`);if(e!==t){if(htmx.config.disableInheritance)return a&&(a===`*`||a.split(` `).indexOf(n)>=0)?r:null;if(i&&(i===`*`||i.split(` `).indexOf(n)>=0))return`unset`}return r}function getClosestAttributeValue(e,t){let n=null;if(getClosestMatch(e,function(r){return!!(n=getAttributeValueWithDisinheritance(e,asElement(r),t))}),n!==`unset`)return n}function matches(e,t){return e instanceof Element&&e.matches(t)}function getStartTag(e){let t=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i.exec(e);return t?t[1].toLowerCase():``}function parseHTML(e){return`parseHTMLUnsafe`in Document?Document.parseHTMLUnsafe(e):new DOMParser().parseFromString(e,`text/html`)}function takeChildrenFor(e,t){for(;t.childNodes.length>0;)e.append(t.childNodes[0])}function duplicateScript(e){let t=getDocument().createElement(`script`);return forEach(e.attributes,function(e){t.setAttribute(e.name,e.value)}),t.textContent=e.textContent,t.async=!1,htmx.config.inlineScriptNonce&&(t.nonce=htmx.config.inlineScriptNonce),t}function isJavaScriptScriptNode(e){return e.matches(`script`)&&(e.type===`text/javascript`||e.type===`module`||e.type===``)}function normalizeScriptTags(e){Array.from(e.querySelectorAll(`script`)).forEac
1h(e=>{if(isJavaScriptScriptNode(e)){let t=duplicateScript(e),n=e.parentNode;try{n.insertBefore(t,e)}catch(e){logError(e)}finally{e.remove()}}})}function makeFragment(e){let t=e.replace(/<head(\s[^>]*)?>[\s\S]*?<\/head>/i,``),n=getStartTag(t),r;if(n===`html`){r=new DocumentFragment;let t=parseHTML(e);takeChildrenFor(r,t.body),r.title=t.title}else if(n===`body`){r=new DocumentFragment;let e=parseHTML(t);takeChildrenFor(r,e.body),r.title=e.title}else{let e=parseHTML(`<body><template class="internal-htmx-wrapper">`+t+`</template></body>`);r=e.querySelector(`template`).content,r.title=e.title;var i=r.querySelector(`title`);i&&i.parentNode===r&&(i.remove(),r.title=i.innerText)}return r&&(htmx.config.allowScriptTags?normalizeScriptTags(r):r.querySelectorAll(`script`).forEach(e=>e.remove())),r}function maybeCall(e){e&&e()}function isType(e,t){return Object.prototype.toString.call(e)===`[object `+t+`]`}function isFunction(e){return typeof e==`function`}function isRawObject(e){return isType(e,`Object`)}function getInternalData(e){let t=`htmx-internal-data`,n=e[t];return n||=e[t]={},n}function toArray(e){let t=[];if(e)for(let n=0;n<e.length;n++)t.push(e[n]);return t}function forEach(e,t){if(e)for(let n=0;n<e.length;n++)t(e[n])}function isScrolledIntoView(e){let t=e.getBoundingClientRect(),n=t.top,r=t.bottom;return n<window.innerHeight&&r>=0}function bodyContains(e){return e.getRootNode({composed:!0})===document}function splitOnWhitespace(e){return e.trim().split(/\s+/)}function mergeObjects(e,t){for(let n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function parseJSON(e){try{return JSON.parse(e)}catch(e){return logError(e),null}}function canAccessLocalStorage(){let e=`htmx:sessionStorageTest`;try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch{return!1}}function normalizePath(e){try{let t=new URL(e,window.location.href);e=t.pathname+t.search}catch{}return e!=`/`&&(e=e.replace(/\/+$/,``)),e}function internalEval(str){return maybeEval(getDocument().body,function(){return eval(str)})}function onLoadHelper(e){return htmx.on(`htmx:load`,function(t){e(t.detail.elt)})}function logAll(){htmx.logger=function(e,t,n){console&&console.log(t,e,n)}}function logNone(){htmx.logger=null}function find(e,t){return typeof e==`string`?find(getDocument(),e):e.querySelector(t)}function findAll(e,t){return typeof e==`string`?findAll(getDocument(),e):e.querySelectorAll(t)}function getWindow(){return window}function removeElement(e,t){e=resolveTarget(e),t?getWindow().setTimeout(function(){removeElement(e),e=null},t):parentElt(e).removeChild(e)}function asElement(e){return e instanceof Element?e:null}function asHtmlElement(e){return e instanceof HTMLElement?e:null}function asString(e){return typeof e==`string`?e:null}function asParentNode(e){return e instanceof Element||e instanceof Document||e instanceof DocumentFragment?e:null}function addClassToElement(e,t,n){e=asElement(resolveTarget(e)),e&&(n?getWindow().setTimeout(function(){addClassToElement(e,t),e=null},n):e.classList&&e.classList.add(t))}function removeClassFromElement(e,t,n){let r=asElement(resolveTarget(e));r&&(n?getWindow().setTimeout(function(){removeClassFromElement(r,t),r=null},n):r.classList&&(r.classList.remove(t),r.classList.length===0&&r.removeAttribute(`class`)))}function toggleClassOnElement(e,t){e=resolveTarget(e),e.classList.toggle(t)}function takeClassForElement(e,t){e=resolveTarget(e),forEach(e.parentElement.children,function(e){removeClassFromElement(e,t)}),addClassToElement(asElement(e),t)}function closest(e,t){return e=asElement(resolveTarget(e)),e?e.closest(t):null}function startsWith(e,t){return e.substring(0,t.length)===t}function endsWith(e,t){return e.substring(e.length-t.length)===t}function normalizeSelector(e){let t=e.trim();return startsWith(t,`<`)&&endsWith(t,`/>`)?t.substring(1,t.length-2):t}function querySelectorAllExt(e,t,n){if(t.indexOf(`global `)===0)return querySelectorAllExt(e,t.slice(7),!0);e=resolveTarget(e);let r=[];{let e=0,n=0;for(let i=0;i<t.length;i++){let a=t[i];if(a===`,`&&e===0){r.push(t.substring(n,i)),n=i+1;continue}a===`<`?e++:a===`/`&&i<t.length-1&&t[i+1]===`>`&&e--}n<t.length&&r.push(t.substring(n))}let i=[],a=[];for(;r.length>0;){let t=normalizeSelector(r.shift()),o;
1t.indexOf(`closest `)===0?o=closest(asElement(e),normalizeSelector(t.slice(8))):t.indexOf(`find `)===0?o=find(asParentNode(e),normalizeSelector(t.slice(5))):t===`next`||t===`nextElementSibling`?o=asElement(e).nextElementSibling:t.indexOf(`next `)===0?o=scanForwardQuery(e,normalizeSelector(t.slice(5)),!!n):t===`previous`||t===`previousElementSibling`?o=asElement(e).previousElementSibling:t.indexOf(`previous `)===0?o=scanBackwardsQuery(e,normalizeSelector(t.slice(9)),!!n):t===`document`?o=document:t===`window`?o=window:t===`body`?o=document.body:t===`root`?o=getRootNode(e,!!n):t===`host`?o=e.getRootNode().host:a.push(t),o&&i.push(o)}if(a.length>0){let t=a.join(`,`),r=asParentNode(getRootNode(e,!!n));i.push(...toArray(r.querySelectorAll(t)))}return i}var scanForwardQuery=function(e,t,n){let r=asParentNode(getRootNode(e,n)).querySelectorAll(t);for(let t=0;t<r.length;t++){let n=r[t];if(n.compareDocumentPosition(e)===Node.DOCUMENT_POSITION_PRECEDING)return n}},scanBackwardsQuery=function(e,t,n){let r=asParentNode(getRootNode(e,n)).querySelectorAll(t);for(let t=r.length-1;t>=0;t--){let n=r[t];if(n.compareDocumentPosition(e)===Node.DOCUMENT_POSITION_FOLLOWING)return n}};function querySelectorExt(e,t){return typeof e==`string`?querySelectorAllExt(getDocument().body,e)[0]:querySelectorAllExt(e,t)[0]}function resolveTarget(e,t){return typeof e==`string`?find(asParentNode(t)||document,e):e}function processEventArgs(e,t,n,r){return isFunction(t)?{target:getDocument().body,event:asString(e),listener:t,options:n}:{target:resolveTarget(e),event:asString(t),listener:n,options:r}}function addEventListenerImpl(e,t,n,r){return ready(function(){let i=processEventArgs(e,t,n,r);i.target.addEventListener(i.event,i.listener,i.options)}),isFunction(t)?t:n}function removeEventListenerImpl(e,t,n){return ready(function(){let r=processEventArgs(e,t,n);r.target.removeEventListener(r.event,r.listener)}),isFunction(t)?t:n}const DUMMY_ELT=getDocument().createElement(`output`);function findAttributeTargets(e,t){let n=getClosestAttributeValue(e,t);if(n){if(n===`this`)return[findThisElement(e,t)];{let r=querySelectorAllExt(e,n);if(/(^|,)(\s*)inherit(\s*)($|,)/.test(n)){let n=asElement(getClosestMatch(e,function(n){return n!==e&&hasAttribute(asElement(n),t)}));n&&r.push(...findAttributeTargets(n,t))}return r.length===0?(logError(`The selector "`+n+`" on `+t+` returned no matches!`),[DUMMY_ELT]):r}}}function findThisElement(e,t){return asElement(getClosestMatch(e,function(e){return getAttributeValue(asElement(e),t)!=null}))}function getTarget(e){let t=getClosestAttributeValue(e,`hx-target`);return t?t===`this`?findThisElement(e,`hx-target`):querySelectorExt(e,t):getInternalData(e).boosted?getDocument().body:e}function shouldSettleAttribute(e){return htmx.config.attributesToSettle.includes(e)}function cloneAttributes(e,t){forEach(Array.from(e.attributes),function(n){!t.hasAttribute(n.name)&&shouldSettleAttribute(n.name)&&e.removeAttribute(n.name)}
1),forEach(t.attributes,function(t){shouldSettleAttribute(t.name)&&e.setAttribute(t.name,t.value)})}function isInlineSwap(e,t){let n=getExtensions(t);for(let t=0;t<n.length;t++){let r=n[t];try{if(r.isInlineSwap(e))return!0}catch(e){logError(e)}}return e===`outerHTML`}function oobSwap(e,t,n,r){r||=getDocument();let i=`#`+CSS.escape(getRawAttribute(t,`id`)),a=`outerHTML`;e===`true`||(e.indexOf(`:`)>0?(a=e.substring(0,e.indexOf(`:`)),i=e.substring(e.indexOf(`:`)+1)):a=e),t.removeAttribute(`hx-swap-oob`),t.removeAttribute(`data-hx-swap-oob`);let o=querySelectorAllExt(r,i,!1);return o.length?(forEach(o,function(e){let r,i=t.cloneNode(!0);r=getDocument().createDocumentFragment(),r.appendChild(i),isInlineSwap(a,e)||(r=asParentNode(i));let o={shouldSwap:!0,target:e,fragment:r};triggerEvent(e,`htmx:oobBeforeSwap`,o)&&(e=o.target,o.shouldSwap&&(handlePreservedElements(r),swapWithStyle(a,e,e,r,n),restorePreservedElements()),forEach(n.elts,function(e){triggerEvent(e,`htmx:oobAfterSwap`,o)}))}),t.parentNode.removeChild(t)):(t.parentNode.removeChild(t),triggerErrorEvent(getDocument().body,`htmx:oobErrorNoTarget`,{content:t,target:i})),e}function restorePreservedElements(){let e=find(`#--htmx-preserve-pantry--`);if(e){for(let t of[...e.children]){let e=find(`#`+t.id);e.parentNode.moveBefore(t,e),e.remove()}e.remove()}}function handlePreservedElements(e){forEach(findAll(e,`[hx-preserve], [data-hx-preserve]`),function(e){let t=getAttributeValue(e,`id`),n=getDocument().getElementById(t);if(n!=null){if(e.moveBefore){let e=find(`#--htmx-preserve-pantry--`);e??=(getDocument().body.insertAdjacentHTML(`afterend`,`<div id='--htmx-preserve-pantry--'></div>`),find(`#--htmx-preserve-pantry--`)),e.moveBefore(n,null)}else e.parentNode.replaceChild(n,e)}})}function handleAttributes(e,t,n){forEach(t.querySelectorAll(`[id]`),function(t){let r=getRawAttribute(t,`id`);if(r&&r.length>0){let i=asParentNode(e),a=i&&i.querySelector(CSS.escape(t.tagName)+`#`+CSS.escape(r));if(a&&a!==i){let e=t.cloneNode();cloneAttributes(t,a),n.tasks.push(function(){cloneAttributes(t,e)})}}})}function makeAjaxLoadTask(e){return function(){removeClassFromElement(e,htmx.config.addedClass),processNode(asElement(e)),processFocus(asParentNode(e)),triggerEvent(e,`htmx:load`)}}function processFocus(e){let t=`[autofocus]`;asHtmlElement(matches(e,t)?e:e.querySelector(t))?.focus()}function insertNodesBefore(e,t,n,r){for(handleAttributes(e,n,r);n.childNodes.length>0;){let i=n.firstChild;addClassToElement(asElement(i),htmx.config.addedClass),e.insertBefore(i,t),i.nodeType!==Node.TEXT_NODE&&i.nodeType!==Node.COMMENT_NODE&&r.tasks.push(makeAjaxLoadTask(i))}}function stringHash(e,t){let n=0;for(;n<e.length;)t=(t<<5)-t+e.charCodeAt(n++)|0;return t}function attributeHash(e){let t=0;for(let n=0;n<e.attributes.length;n++){let r=e.attributes[n];r.value&&(t=stringHash(r.name,t),t=stringHash(r.value,t))}return t}function deInitOnHandlers(e){let t=getInternalData(e);if(t.onHandlers){for(let n=0;n<t.onHandlers.length;n++){let r=t.onHandlers[n];removeEventListenerImpl(e,r.event,r.listener)}delete t.onHandlers}}function deInitNode(e){let t=getInternalData(e);t.timeout&&clearTimeout(t.timeout),t.listenerInfos&&forEach(t.listenerInfos,function(e){e.on&&removeEventListenerImpl(e.on,e.trigger,e.listener)}),deInitOnHandlers(e),forEach(Object.keys(t),function(e){e!==`firstInitCompleted`&&delete t[e]})}function cleanUpElement(e){triggerEvent(e,`htmx:beforeCleanupElement`),deInitNode(e),forEach(e.children,function(e){cleanUpElement(e)})}function swapOuterHTML(e,t,n){if(e.tagName===`BODY`)return swapInnerHTML(e,t,n);let r,i=e.previousSibling,a=parentElt(e);if(a){for(insertNodesBefore(a,e,t,n),r=i==null?a.firstChild:i.nextSibling,n.elts=n.elts.filter(function(t){return t!==e});r&&r!==e;)r instanceof Element&&n.elts.push(r),r=r.nextSibling;cleanUpElement(e),e.remove()}}function swapAfterBegin(e,t,n){return insertNodesBefore(e,e.firstChild,t,n)}function swapBeforeBegin(e,t,n){return insertNodesBefore(parentElt(e),e,t,n)}function swapBeforeEnd(e,t,n){return insertNodesBefore(e,null,t,n)}
1function swapAfterEnd(e,t,n){return insertNodesBefore(parentElt(e),e.nextSibling,t,n)}function swapDelete(e){cleanUpElement(e);let t=parentElt(e);if(t)return t.removeChild(e)}function swapInnerHTML(e,t,n){let r=e.firstChild;if(insertNodesBefore(e,r,t,n),r){for(;r.nextSibling;)cleanUpElement(r.nextSibling),e.removeChild(r.nextSibling);cleanUpElement(r),e.removeChild(r)}}function swapWithStyle(e,t,n,r,i){switch(e){case`none`:return;case`outerHTML`:swapOuterHTML(n,r,i);return;case`afterbegin`:swapAfterBegin(n,r,i);return;case`beforebegin`:swapBeforeBegin(n,r,i);return;case`beforeend`:swapBeforeEnd(n,r,i);return;case`afterend`:swapAfterEnd(n,r,i);return;case`delete`:swapDelete(n);return;default:var a=getExtensions(t);for(let t=0;t<a.length;t++){let o=a[t];try{let t=o.handleSwap(e,n,r,i);if(t){if(Array.isArray(t))for(let e=0;e<t.length;e++){let n=t[e];n.nodeType!==Node.TEXT_NODE&&n.nodeType!==Node.COMMENT_NODE&&i.tasks.push(makeAjaxLoadTask(n))}return}}catch(e){logError(e)}}e===`innerHTML`?swapInnerHTML(n,r,i):swapWithStyle(htmx.config.defaultSwapStyle,t,n,r,i)}}function findAndSwapOobElements(e,t,n){var r=findAll(e,`[hx-swap-oob], [data-hx-swap-oob]`);return forEach(r,function(e){if(htmx.config.allowNestedOobSwaps||e.parentElement===null){let r=getAttributeValue(e,`hx-swap-oob`);r!=null&&oobSwap(r,e,t,n)}else e.removeAttribute(`hx-swap-oob`),e.removeAttribute(`data-hx-swap-oob`)}),r.length>0}function swap(e,t,n,r){r||={};let i=null,a=null,o=function(){maybeCall(r.beforeSwapCallback),e=resolveTarget(e);let a=r.contextElement?getRootNode(r.contextElement,!1):getDocument(),o=document.activeElement,s={};s={elt:o,start:o?o.selectionStart:null,end:o?o.selectionEnd:null};let c=makeSettleInfo(e);if(n.swapStyle===`textContent`)e.textContent=t;else{let i=makeFragment(t);if(c.title=r.title||i.title,r.historyRequest&&(i=i.querySelector(`[hx-history-elt],[data-hx-history-elt]`)||i),r.selectOOB){let e=r.selectOOB.split(`,`);for(let t=0;t<e.length;t++){let n=e[t].split(`:`,2),r=n[0].trim();r.indexOf(`#`)===0&&(r=r.substring(1));let o=n[1]||`true`,s=i.querySelector(`#`+r);s&&oobSwap(o,s,c,a)}}if(findAndSwapOobElements(i,c,a),forEach(findAll(i,`template`),function(e){e.content&&findAndSwapOobElements(e.content,c,a)&&e.remove()}),r.select){let e=getDocument().createDocumentFragment();forEach(i.querySelectorAll(r.select),function(t){e.appendChild(t)}),i=e}handlePreservedElements(i),swapWithStyle(n.swapStyle,r.contextElement,e,i,c),restorePreservedElements()}if(s.elt&&!bodyContains(s.elt)&&getRawAttribute(s.elt,`id`)){let e=document.getElementById(getRawAttribute(s.elt,`id`)),t={preventScroll:n.focusScroll===void 0?!htmx.config.defaultFocusScroll:!n.focusScroll};if(e){if(s.start&&e.setSelectionRange)try{e.setSelectionRange(s.start,s.end)}catch{}e.focus(t)}}removeClassFromElement(e,htmx.config.swappingClass),forEach(c.elts,function(e){e.classList&&addClassToElement(e,htmx.config.settlingClass),triggerEvent(e,`htmx:afterSwap`,r.eventInfo)}),maybeCall(r.afterSwapCallback),n.ignoreTitle||handleTitle(c.title);let l=function(){if(forEach(c.tasks,function(e){e.call()}),forEach(c.elts,function(e){e.classList&&removeClassFromElement(e,htmx.config.settlingClass),triggerEvent(e,`htmx:afterSettle`,r.eventInfo)}),r.anchor){let e=asElement(resolveTarget(`#`+r.anchor));e&&e.scrollIntoView({block:`start`,behavior:`auto`})}updateScrollState(c.elts,n),maybeCall(r.afterSettleCallback),maybeCall(i)};n.settleDelay>0?getWindow().setTimeout(l,n.settleDelay):l()},s=htmx.config.globalViewTransitions;n.hasOwnProperty(`transition`)&&(s=n.transition);let c=r.contextElement||getDocument();if(s&&triggerEvent(c,`htmx:beforeTransition`,r.eventInfo)&&typeof Promise<`u`&&document.startViewTransition){let e=new Promise(function(e,t){i=e,a=t}),t=o;o=function(){document.startViewTransition(function(){return t(),e})}}try{n?.swapDelay&&n.swapDelay>0?getWindow().setTimeout(o,n.swapDelay):o()}catch(e){throw triggerErrorEvent(c,`htmx:swapError`,r.eventInfo),maybeCall(a),e}}function handleTriggerHeader(e,t,n){let r=e.getResponseHeader(t);if(r.indexOf(`{`)===0){let e=parseJSON(r);for(let t in e)if(e.hasOwnProperty(t)){let r=e[t];isRawObject(r)?n=r.target===void 0?n:r.target:r={value:r},triggerEvent(n,t,r)}}else{let e=r.split(`,`);for(let t=0;t<e.length;t++)triggerEvent(n,e[t].trim(),[])}}const WHITESPACE=/\s/,WHITESPACE_OR_COMMA=/[\s,]/,SYMBOL_START=/[_$a-zA-Z]/,SYMBOL_CONT=/[_$a-zA-Z0-9]/,STRINGISH_START=[`"`,`'`,`/`],NOT_WHITESPACE=/[^\s]/,COMBINED_SELECTOR_START=/[{(]/,COMBINED_SELECTOR_END=/[})]/;function tokenizeString(e){let t=[],n=0;for(;n<e.length;){if(SYMBOL_START.exec(e.charAt(n))){for(var r=n;SYMBOL_CONT.exec(e.charAt(n+1));)n++;t.push(e.substring(r,n+1))}else if(STRINGISH_START.indexOf(e.charAt(n))!==-1){let i=e.charAt(n);var r=n;for(n++;n<e.length&&e.charAt(n)!==i;)e.charAt(n)===`\\`&&n++,n++;t.push(e.substring(r,n+1))}else{let r=e.charAt(n);t.push(r)}n++}return t}function isPossibleRelativeReference(e,t,n){return SYMBOL_START.exec(e.charAt(0))&&e!==`true`&&e!==`false`&&e!==`this`&&e!==n&&t!==`.`}function maybeGenerateConditional(e,t,n){if(t[0]===`[`){t.shift();let r=1,i=` return (function(`+n+`){ return (`,a=null;for(;t.length>0;){let o=t[0];if(o===`]`){if(r--,r===0){a===null&&(i+=`true`),t.shift(),i+=`)})`;try{let t=maybeEval(e,function(){return Function(i)()},function(){return!0});return t.source=i,t}catch(e){return triggerErrorEvent(getDocument().body,`htmx:syntax:error`,{error:e,source:i}),null}}}else o===`[`&&r++;isPossibleRelativeReference(o,a,n)?i+=`((`+n+`.`+o+`) ? (`+n+`.`+o+`) : (window.`+o+`))`:i+=o,a=t.shift()}}}function consumeUntil(e,t){let n=``;for(;e.length>0&&!t.test(e[0]);)n+=e.shift();return n}function consumeCSSSelector(e){let t;return e.length>0&&COMBINED_SELECTOR_START.test(e[0])?(e.shift(),t=consumeUntil(e,COMBINED_SELECTOR_END).trim(),e.shift()):t=consumeUntil(e,WHITESPACE_OR_COMMA),t}const INPUT_SELECTOR=`input, textarea, select`;function parseAndCacheTrigger(e,t,n){let r=[],i=tokenizeString(t);do{consumeUntil(i,NOT_WHITESPACE);let t=i.length,n=consumeUntil(i,/[,\[\s]/);if(n!==``){if(n===`every`){let t={trigger:`every`};consumeUntil(i,NOT_WHITESPACE),t.pollInterval=parseInterval(consumeUntil(i,/[,\[\s]/)),consumeUntil(i,NOT_WHITESPACE);var a=maybeGenerateConditional(e,i,`event`);a&&(t.eventFilter=a),r.push(t)}else{let t={trigger:n};var a=maybeGenerateConditional(e,i,`event`);for(a&&(t.eventFilter=a),consumeUntil(i,NOT_WHITESPACE);i.length>0&&i[0]!==`,`;){let n=i.shift();if(n===`changed`)t.changed=!0;else if(n===`once`)t.once=!0;else if(n===`consume`)t.consume=!0;else if(n===`delay`&&i[0]===`:`)i.shift(),t.delay=parseInterval(consumeUntil(i,WHITESPACE_OR_COMMA));else if(n===`from`&&i[0]===`:`){if(i.shift(),COMBINED_SELECTOR_START.test(i[0]))var o=consumeCSSSelector(i);else{var o=consumeUntil(i,WHITESPACE_OR_COMMA);
1if(o===`closest`||o===`find`||o===`next`||o===`previous`){i.shift();let e=consumeCSSSelector(i);e.length>0&&(o+=` `+e)}}t.from=o}else n===`target`&&i[0]===`:`?(i.shift(),t.target=consumeCSSSelector(i)):n===`throttle`&&i[0]===`:`?(i.shift(),t.throttle=parseInterval(consumeUntil(i,WHITESPACE_OR_COMMA))):n===`queue`&&i[0]===`:`?(i.shift(),t.queue=consumeUntil(i,WHITESPACE_OR_COMMA)):n===`root`&&i[0]===`:`?(i.shift(),t[n]=consumeCSSSelector(i)):n===`threshold`&&i[0]===`:`?(i.shift(),t[n]=consumeUntil(i,WHITESPACE_OR_COMMA)):triggerErrorEvent(e,`htmx:syntax:error`,{token:i.shift()});consumeUntil(i,NOT_WHITESPACE)}r.push(t)}}i.length===t&&triggerErrorEvent(e,`htmx:syntax:error`,{token:i.shift()}),consumeUntil(i,NOT_WHITESPACE)}while(i[0]===`,`&&i.shift());return n&&(n[t]=r),r}function getTriggerSpecs(e){let t=getAttributeValue(e,`hx-trigger`),n=[];if(t){let r=htmx.config.triggerSpecsCache;n=r&&r[t]||parseAndCacheTrigger(e,t,r)}return n.length>0?n:matches(e,`form`)?[{trigger:`submit`}]:matches(e,`input[type="button"], input[type="submit"]`)?[{trigger:`click`}]:matches(e,INPUT_SELECTOR)?[{trigger:`change`}]:[{trigger:`click`}]}function cancelPolling(e){getInternalData(e).cancelled=!0}function processPolling(e,t,n){let r=getInternalData(e);r.timeout=getWindow().setTimeout(function(){bodyContains(e)&&r.cancelled!==!0&&(maybeFilterEvent(n,e,makeEvent(`hx:poll:trigger`,{triggerSpec:n,target:e}))||t(e),processPolling(e,t,n))},n.pollInterval)}function isLocalLink(e){return location.hostname===e.hostname&&getRawAttribute(e,`href`)&&getRawAttribute(e,`href`).indexOf(`#`)!==0}function eltIsDisabled(e){return closest(e,htmx.config.disableSelector)}function boostElement(e,t,n){if(e instanceof HTMLAnchorElement&&isLocalLink(e)&&(e.target===``||e.target===`_self`)||e.tagName===`FORM`&&String(getRawAttribute(e,`method`)).toLowerCase()!==`dialog`){t.boosted=!0;let r,i;if(e.tagName===`A`)r=`get`,i=getRawAttribute(e,`href`);else{let t=getRawAttribute(e,`method`);r=t?t.toLowerCase():`get`,i=getRawAttribute(e,`action`),(i==null||i===``)&&(i=location.href),r===`get`&&i.includes(`?`)&&(i=i.replace(/\?[^#]+/,``))}n.forEach(function(n){addEventListener(e,function(e,t){let n=asElement(e);if(eltIsDisabled(n)){cleanUpElement(n);return}issueAjaxRequest(r,i,n,t)},t,n,!0)})}}function shouldCancel(e,t){if(e.type===`submit`&&t.tagName===`FORM`)return!0;if(e.type===`click`){let e=t.closest(`input[type="submit"], button`);if(e&&e.form&&e.type===`submit`)return!0;let n=t.closest(`a`);if(n&&n.href&&!/^#.+/.test(n.getAttribute(`href`)))return!0}return!1}function ignoreBoostedAnchorCtrlClick(e,t){return getInternalData(e).boosted&&e instanceof HTMLAnchorElement&&t.type===`click`&&(t.ctrlKey||t.metaKey)}function maybeFilterEvent(e,t,n){let r=e.eventFilter;if(r)try{return r.call(t,n)!==!0}catch(e){let t=r.source;return triggerErrorEvent(getDocument().body,`htmx:eventFilter:error`,{error:e,source:t}),!0}return!1}function addEventListener(e,t,n,r,i){let a=getInternalData(e),o;o=r.from?querySelectorAllExt(e,r.from):[e],r.changed&&(`lastValue`in a||(a.lastValue=new WeakMap),o.forEach(function(e){a.lastValue.has(r)||a.lastValue.set(r,new WeakMap),a.lastValue.get(r).set(e,e.value)})),forEach(o,function(o){let s=function(n){if(!bodyContains(e)){o.removeEventListener(r.trigger,s);return}if(ignoreBoostedAnchorCtrlClick(e,n)||((i||shouldCancel(n,o))&&n.preventDefault(),maybeFilterEvent(r,e,n)))return;let c=getInternalData(n);if(c.triggerSpec=r,c.handledFor??=[],c.handledFor.indexOf(e)<0){if(c.handledFor.push(e),r.consume&&n.stopPropagation(),r.target&&n.target&&!matches(asElement(n.target),r.target))return;if(r.once){if(a.triggeredOnce)return;a.triggeredOnce=!0}if(r.changed){let e=n.target,t=e.value,i=a.lastValue.get(r);if(i.has(e)&&i.get(e)===t)return;i.set(e,t)}if(a.delayed&&clearTimeout(a.delayed),a.throttle)return;r.throttle>0?a.throttle||=(triggerEvent(e,`htmx:trigger`),t(e,n),getWindow().setTimeout(function(){a.throttle=null},r.throttle)):r.delay>0?a.delayed=getWindow().setTimeout(function(){triggerEvent(e,`htmx:trigger`),t(e,n)},r.delay):(triggerEvent(e,`htmx:trigger`),t(e,n))}};n.listenerInfos??=[],n.listenerInfos.push({trigger:r.trigger,listener:s,on:o}),o.addEventListener(r.trigger,s)})}let windowIsScrolling=!1,scrollHandler=null;function initScrollHandler(){scrollHandler||(scrollHandler=function(){windowIsScrolling=!0},window.addEventListener(`scroll`,scrollHandler),window.addEventListener(`resize`,scrollHandler),setInterval(function(){windowIsScrolling&&(windowIsScrolling=!1,forEach(getDocument().querySelectorAll(`[hx-trigger*='revealed'],[data-hx-trigger*='revealed']`),function(e){maybeReveal(e)}))},200))}function maybeReveal(e){!hasAttribute(e,`data-hx-revealed`)&&isScrolledIntoView(e)&&(e.setAttribute(`data-hx-revealed`,`true`),getInternalData(e).initHash?triggerEvent(e,`revealed`):e.addEventListener(`htmx:afterProcessNode`,function(){triggerEvent(e,`revealed`)},{once:!0}))}function loadImmediately(e,t,n,r){let i=function(){n.loaded||(n.loaded=!0,triggerEvent(e,`htmx:trigger`),t(e))};r>0?getWindow().setTimeout(i,r):i()}function processVerbs(e,t,n){let r=!1;return forEach(VERBS,function(i){if(hasAttribute(e,`hx-`+i)){let a=getAttributeValue(e,`hx-`+i);
1r=!0,t.path=a,t.verb=i,n.forEach(function(n){addTriggerHandler(e,n,t,function(e,t){let n=asElement(e);if(eltIsDisabled(n)){cleanUpElement(n);return}issueAjaxRequest(i,a,n,t)})})}}),r}function addTriggerHandler(e,t,n,r){if(t.trigger===`revealed`)initScrollHandler(),addEventListener(e,r,n,t),maybeReveal(asElement(e));else if(t.trigger===`intersect`){let i={};t.root&&(i.root=querySelectorExt(e,t.root)),t.threshold&&(i.threshold=parseFloat(t.threshold)),new IntersectionObserver(function(t){for(let n=0;n<t.length;n++)if(t[n].isIntersecting){triggerEvent(e,`intersect`);break}},i).observe(asElement(e)),addEventListener(asElement(e),r,n,t)}else!n.firstInitCompleted&&t.trigger===`load`?maybeFilterEvent(t,e,makeEvent(`load`,{elt:e}))||loadImmediately(asElement(e),r,n,t.delay):t.pollInterval>0?(n.polling=!0,processPolling(asElement(e),r,t)):addEventListener(e,r,n,t)}function shouldProcessHxOn(e){let t=asElement(e);if(!t)return!1;let n=t.attributes;for(let e=0;e<n.length;e++){let t=n[e].name;if(startsWith(t,`hx-on:`)||startsWith(t,`data-hx-on:`)||startsWith(t,`hx-on-`)||startsWith(t,`data-hx-on-`))return!0}return!1}const HX_ON_QUERY=new XPathEvaluator().createExpression(`.//*[@*[ starts-with(name(), "hx-on:") or starts-with(name(), "data-hx-on:") or starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]`);function processHXOnRoot(e,t){shouldProcessHxOn(e)&&t.push(asElement(e));let n=HX_ON_QUERY.evaluate(e),r=null;for(;r=n.iterateNext();)t.push(asElement(r))}function findHxOnWildcardElements(e){let t=[];if(e instanceof DocumentFragment)for(let n of e.childNodes)processHXOnRoot(n,t);else processHXOnRoot(e,t);return t}function findElementsToProcess(e){if(e.querySelectorAll){let n=`, [hx-boost] a, [data-hx-boost] a, a[hx-boost], a[data-hx-boost]`,r=[];for(let e in extensions){let n=extensions[e];if(n.getSelectors){var t=n.getSelectors();t&&r.push(t)}}return e.querySelectorAll(VERB_SELECTOR+`, [hx-boost] a, [data-hx-boost] a, a[hx-boost], a[data-hx-boost], form, [type='submit'], [hx-ext], [data-hx-ext], [hx-trigger], [data-hx-trigger]`+r.flat().map(e=>`, `+e).join(``))}return[]}function maybeSetLastButtonClicked(e){let t=getTargetButton(e.target),n=getRelatedFormData(e);n&&(n.lastButtonClicked=t)}function maybeUnsetLastButtonClicked(e){let t=getRelatedFormData(e);t&&(t.lastButtonClicked=null)}function getTargetButton(e){return closest(asElement(e),`button, input[type='submit']`)}function getRelatedForm(e){return e.form||closest(e,`form`)}function getRelatedFormData(e){let t=getTargetButton(e.target);if(!t)return;let n=getRelatedForm(t);if(n)return getInternalData(n)}function initButtonTracking(e){e.addEventListener(`click`,maybeSetLastButtonClicked),e.addEventListener(`focusin`,maybeSetLastButtonClicked),e.addEventListener(`focusout`,maybeUnsetLastButtonClicked)}function addHxOnEventHandler(e,t,n){let r=getInternalData(e);Array.isArray(r.onHandlers)||(r.onHandlers=[]);let i,a=function(t){maybeEval(e,function(){eltIsDisabled(e)||(i||=Function(`event`,n),i.call(e,t))})};e.addEventListener(t,a),r.onHandlers.push({event:t,listener:a})}function processHxOnWildcard(e){deInitOnHandlers(e);for(let t=0;t<e.attributes.length;t++){let n=e.attributes[t].name,r=e.attributes[t].value;if(startsWith(n,`hx-on`)||startsWith(n,`data-hx-on`)){let t=n.indexOf(`-on`)+3,i=n.slice(t,t+1);if(i===`-`||i===`:`){let i=n.slice(t+1);startsWith(i,`:`)?i=`htmx`+i:startsWith(i,`-`)?i=`htmx:`+i.slice(1):startsWith(i,`htmx-`)&&(i=`htmx:`+i.slice(5)),addHxOnEventHandler(e,i,r)}}}}function initNode(e){triggerEvent(e,`htmx:beforeProcessNode`);let t=getInternalData(e),n=getTriggerSpecs(e);processVerbs(e,t,n)||(getClosestAttributeValue(e,`hx-boost`)===`true`?boostElement(e,t,n):hasAttribute(e,`hx-trigger`)&&n.forEach(function(n){addTriggerHandler(e,n,t,function(){})})),(e.tagName===`FORM`||getRawAttribute(e,`type`)===`submit`&&hasAttribute(e,`form`))&&initButtonTracking(e),t.firstInitCompleted=!0,triggerEvent(e,`htmx:afterProcessNode`)}function maybeDeInitAndHash(e){if(!(e instanceof Element))return!1;let t=getInternalData(e),n=attributeHash(e);return t.initHash!==n&&(deInitNode(e),t.initHash=n,!0)}function processNode(e){if(e=resolveTarget(e),eltIsDisabled(e)){cleanUpElement(e);return}let t=[];maybeDeInitAndHash(e)&&t.push(e),forEach(findElementsToProcess(e),function(e){if(eltIsDisabled(e)){cleanUpElement(e);return}maybeDeInitAndHash(e)&&t.push(e)}
1),forEach(findHxOnWildcardElements(e),processHxOnWildcard),forEach(t,initNode)}function kebabEventName(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase()}function makeEvent(e,t){return new CustomEvent(e,{bubbles:!0,cancelable:!0,composed:!0,detail:t})}function triggerErrorEvent(e,t,n){triggerEvent(e,t,mergeObjects({error:t},n))}function ignoreEventForLogging(e){return e===`htmx:afterProcessNode`}function withExtensions(e,t,n){forEach(getExtensions(e,[],n),function(e){try{t(e)}catch(e){logError(e)}})}function logError(e){console.error(e)}function triggerEvent(e,t,n){e=resolveTarget(e),n??={},n.elt=e;let r=makeEvent(t,n);htmx.logger&&!ignoreEventForLogging(t)&&htmx.logger(e,t,n),n.error&&(logError(n.error+(n.target?`, `+n.target:``)),triggerEvent(e,`htmx:error`,{errorInfo:n}));let i=e.dispatchEvent(r),a=kebabEventName(t);if(i&&a!==t){let t=makeEvent(a,r.detail);i&&=e.dispatchEvent(t)}return withExtensions(asElement(e),function(e){i=i&&e.onEvent(t,r)!==!1&&!r.defaultPrevented}),i}let currentPathForHistory;function setCurrentPathForHistory(e){currentPathForHistory=e,canAccessLocalStorage()&&sessionStorage.setItem(`htmx-current-path-for-history`,e)}setCurrentPathForHistory(location.pathname+location.search);function getHistoryElement(){return getDocument().querySelector(`[hx-history-elt],[data-hx-history-elt]`)||getDocument().body}function saveToHistoryCache(e,t){if(!canAccessLocalStorage())return;let n=cleanInnerHtmlForHistory(t),r=getDocument().title,i=window.scrollY;if(htmx.config.historyCacheSize<=0){sessionStorage.removeItem(`htmx-history-cache`);return}e=normalizePath(e);let a=parseJSON(sessionStorage.getItem(`htmx-history-cache`))||[];for(let t=0;t<a.length;t++)if(a[t].url===e){a.splice(t,1);break}let o={url:e,content:n,title:r,scroll:i};for(triggerEvent(getDocument().body,`htmx:historyItemCreated`,{item:o,cache:a}),a.push(o);a.length>htmx.config.historyCacheSize;)a.shift();for(;a.length>0;)try{sessionStorage.setItem(`htmx-history-cache`,JSON.stringify(a));break}catch(e){triggerErrorEvent(getDocument().body,`htmx:historyCacheError`,{cause:e,cache:a}),a.shift()}}function getCachedHistory(e){if(!canAccessLocalStorage())return null;e=normalizePath(e);let t=parseJSON(sessionStorage.getItem(`htmx-history-cache`))||[];for(let n=0;n<t.length;n++)if(t[n].url===e)return t[n];return null}function cleanInnerHtmlForHistory(e){let t=htmx.config.requestClass,n=e.cloneNode(!0);return forEach(findAll(n,`.`+t),function(e){removeClassFromElement(e,t)}),forEach(findAll(n,`[data-disabled-by-htmx]`),function(e){e.removeAttribute(`disabled`)}),n.innerHTML}function saveCurrentPageToHistory(){let e=getHistoryElement(),t=currentPathForHistory;canAccessLocalStorage()&&(t=sessionStorage.getItem(`htmx-current-path-for-history`)),t||=location.pathname+location.search,getDocument().querySelector(`[hx-history="false" i],[data-hx-history="false" i]`)||(triggerEvent(getDocument().body,`htmx:beforeHistorySave`,{path:t,historyElt:e}),saveToHistoryCache(t,e)),htmx.config.historyEnabled&&history.replaceState({htmx:!0},getDocument().title,location.href)}function pushUrlIntoHistory(e){htmx.config.getCacheBusterParam&&(e=e.replace(/org\.htmx\.cache-buster=[^&]*&?/,``),(endsWith(e,`&`)||endsWith(e,`?`))&&(e=e.slice(0,-1))),htmx.config.historyEnabled&&history.pushState({htmx:!0},``,e),setCurrentPathForHistory(e)}function replaceUrlInHistory(e){htmx.config.historyEnabled&&history.replaceState({htmx:!0},``,e),setCurrentPathForHistory(e)}function settleImmediately(e){forEach(e,function(e){e.call(void 0)})}function loadHistoryFromServer(e){let t=new XMLHttpRequest,n={swapStyle:`innerHTML`,swapDelay:0,settleDelay:0},r={path:e,xhr:t,historyElt:getHistoryElement(),swapSpec:n};t.open(`GET`,e,!0),htmx.config.historyRestoreAsHxRequest&&t.setRequestHeader(`HX-Request`,`true`),t.setRequestHeader(`HX-History-Restore-Request`,`true`),t.setRequestHeader(`HX-Current-URL`,location.href),t.onload=function(){this.status>=200&&this.status<400?(r.response=this.response,triggerEvent(getDocument().body,`htmx:historyCacheMissLoad`,r),swap(r.historyElt,r.response,n,{contextElement:r.historyElt,historyRequest:!0}),setCurrentPathForHistory(r.path),triggerEvent(getDocument().body,`htmx:historyRestore`,{path:e,cacheMiss:!0,serverResponse:r.response})):triggerErrorEvent(getDocument().body,`htmx:historyCacheMissLoadError`,r)},triggerEvent(getDocument().body,`htmx:historyCacheMiss`,r)&&t.send()}function restoreHistory(e){saveCurrentPageToHistory(),e||=location.pathname+location.search;
1let t=getCachedHistory(e);if(t){let n={swapStyle:`innerHTML`,swapDelay:0,settleDelay:0,scroll:t.scroll},r={path:e,item:t,historyElt:getHistoryElement(),swapSpec:n};triggerEvent(getDocument().body,`htmx:historyCacheHit`,r)&&(swap(r.historyElt,t.content,n,{contextElement:r.historyElt,title:t.title}),setCurrentPathForHistory(r.path),triggerEvent(getDocument().body,`htmx:historyRestore`,r))}else htmx.config.refreshOnHistoryMiss?htmx.location.reload(!0):loadHistoryFromServer(e)}function addRequestIndicatorClasses(e){let t=findAttributeTargets(e,`hx-indicator`);return t??=[e],forEach(t,function(e){let t=getInternalData(e);t.requestCount=(t.requestCount||0)+1,addClassToElement(e,htmx.config.requestClass)}),t}function disableElements(e){let t=findAttributeTargets(e,`hx-disabled-elt`);return t??=[],forEach(t,function(e){let t=getInternalData(e);t.requestCount=(t.requestCount||0)+1,e.hasAttribute(`disabled`)||(e.setAttribute(`disabled`,``),e.setAttribute(`data-disabled-by-htmx`,``))}),t}function removeRequestIndicators(e,t){forEach(e.concat(t),function(e){let t=getInternalData(e);t.requestCount=(t.requestCount||1)-1}
1),forEach(e,function(e){getInternalData(e).requestCount===0&&removeClassFromElement(e,htmx.config.requestClass)}),forEach(t,function(e){getInternalData(e).requestCount===0&&e.hasAttribute(`data-disabled-by-htmx`)&&(e.removeAttribute(`disabled`),e.removeAttribute(`data-disabled-by-htmx`))})}function haveSeenNode(e,t){for(let n=0;n<e.length;n++)if(e[n].isSameNode(t))return!0;return!1}function shouldInclude(e){let t=e;return t.name===``||t.name==null||t.disabled||closest(t,`fieldset[disabled]`)||t.type===`button`||t.type===`submit`||t.tagName===`image`||t.tagName===`reset`||t.tagName===`file`?!1:t.type===`checkbox`||t.type===`radio`?t.checked:!0}function addValueToFormData(e,t,n){e!=null&&t!=null&&(Array.isArray(t)?t.forEach(function(t){n.append(e,t)}):n.append(e,t))}function removeValueFromFormData(e,t,n){if(e!=null&&t!=null){let r=n.getAll(e);r=Array.isArray(t)?r.filter(e=>t.indexOf(e)<0):r.filter(e=>e!==t),n.delete(e),forEach(r,t=>n.append(e,t))}}function getValueFromInput(e){return e instanceof HTMLSelectElement&&e.multiple?toArray(e.querySelectorAll(`option:checked`)).map(function(e){return e.value}):e instanceof HTMLInputElement&&e.files?toArray(e.files):e.value}function processInputValue(e,t,n,r,i){r==null||haveSeenNode(e,r)||(e.push(r),shouldInclude(r)&&(addValueToFormData(getRawAttribute(r,`name`),getValueFromInput(r),t),i&&validateElement(r,n)),r instanceof HTMLFormElement&&(forEach(r.elements,function(r){e.indexOf(r)>=0?removeValueFromFormData(r.name,getValueFromInput(r),t):e.push(r),i&&validateElement(r,n)}),new FormData(r).forEach(function(e,n){e instanceof File&&e.name===``||addValueToFormData(n,e,t)})))}function validateElement(e,t){let n=e;n.willValidate&&(triggerEvent(n,`htmx:validation:validate`),n.checkValidity()||(triggerEvent(n,`htmx:validation:failed`,{message:n.validationMessage,validity:n.validity})&&!t.length&&htmx.config.reportValidityOfForms&&n.reportValidity(),t.push({elt:n,message:n.validationMessage,validity:n.validity})))}function overrideFormData(e,t){for(let n of t.keys())e.delete(n);return t.forEach(function(t,n){e.append(n,t)}),e}function getInputValues(e,t){let n=[],r=new FormData,i=new FormData,a=[],o=getInternalData(e);o.lastButtonClicked&&!bodyContains(o.lastButtonClicked)&&(o.lastButtonClicked=null);let s=e instanceof HTMLFormElement&&e.noValidate!==!0||getAttributeValue(e,`hx-validate`)===`true`;if(o.lastButtonClicked&&(s&&=o.lastButtonClicked.formNoValidate!==!0),t!==`get`&&processInputValue(n,i,a,getRelatedForm(e),s),processInputValue(n,r,a,e,s),o.lastButtonClicked||e.tagName===`BUTTON`||e.tagName===`INPUT`&&getRawAttribute(e,`type`)===`submit`){let t=o.lastButtonClicked||e;addValueToFormData(getRawAttribute(t,`name`),t.value,i)}return forEach(findAttributeTargets(e,`hx-include`),function(e){processInputValue(n,r,a,asElement(e),s),matches(e,`form`)||forEach(asParentNode(e).querySelectorAll(INPUT_SELECTOR),function(e){processInputValue(n,r,a,e,s)})}),overrideFormData(r,i),{errors:a,formData:r,values:formDataProxy(r)}}function appendParam(e,t,n){e!==``&&(e+=`&`),String(n)===`[object Object]`&&(n=JSON.stringify(n));let r=encodeURIComponent(n);return e+=encodeURIComponent(t)+`=`+r,e}function urlEncode(e){e=formDataFromObject(e);let t=``;return e.forEach(function(e,n){t=appendParam(t,n,e)}),t}function getHeaders(e,t,n){let r={"HX-Request":`true`,"HX-Trigger":getRawAttribute(e,`id`),"HX-Trigger-Name":getRawAttribute(e,`name`),"HX-Target":getAttributeValue(t,`id`),"HX-Current-URL":location.href};return getValuesForElement(e,`hx-headers`,!1,r),n!==void 0&&(r[`HX-Prompt`]=n),getInternalData(e).boosted&&(r[`HX-Boosted`]=`true`),r}function filterValues(e,t){let n=getClosestAttributeValue(t,`hx-params`);if(n){if(n===`none`)return new FormData;if(n===`*`)return e;if(n.indexOf(`not `)===0)return forEach(n.slice(4).split(`,`),function(t){t=t.trim(),e.delete(t)}),e;{let t=new FormData;return forEach(n.split(`,`),function(n){n=n.trim(),e.has(n)&&e.getAll(n).forEach(function(e){t.append(n,e)})}),t}}return e}function isAnchorLink(e){return!!getRawAttribute(e,`href`)&&getRawAttribute(e,`href`).indexOf(`#`)>=0}function getSwapSpecification(e,t){let n=t||getClosestAttributeValue(e,`hx-swap`),r={swapStyle:getInternalData(e).boosted?`innerHTML`:htmx.config.defaultSwapStyle,swapDelay:htmx.config.defaultSwapDelay,settleDelay:htmx.config.defaultSettleDelay};if(htmx.config.scrollIntoViewOnBoost&&getInternalData(e).boosted&&!isAnchorLink(e)&&(r.show=`top`),n){let e=splitOnWhitespace(n);if(e.length>0)for(let t=0;t<e.length;t++){let n=e[t];if(n.indexOf(`swap:`)===0)r.swapDelay=parseInterval(n.slice(5));else if(n.indexOf(`settle:`)===0)r.settleDelay=parseInterval(n.slice(7));else if(n.indexOf(`transition:`)===0)r.transition=n.slice(11)===`true`;else if(n.indexOf(`ignoreTitle:`)===0)r.ignoreTitle=n.slice(12)===`true`;else if(n.indexOf(`scroll:`)===0){var i=n.slice(7).split(`:`);let e=i.pop();var a=i.length>0?i.join(`:`):null;r.scroll=e,r.scrollTarget=a}else if(n.indexOf(`show:`)===0){var i=n.slice(5).split(`:`);let e=i.pop();var a=i.length>0?i.join(`:`):null;r.show=e,r.showTarget=a}else n.indexOf(`focus-scroll:`)===0?r.focusScroll=n.slice(13)==`true`:t==0?r.swapStyle=n:logError(`Unknown modifier in hx-swap: `+n)}}return r}function usesFormData(e){return getClosestAttributeValue(e,`hx-encoding`)===`multipart/form-data`||matches(e,`form`)&&getRawAttribute(e,`enctype`)===`multipart/form-data`}function encodeParamsForBody(e,t,n){let r=null;return withExtensions(t,function(i){r??=i.encodeParameters(e,n,t)}),r??(usesFormData(t)?overrideFormData(new FormData,formDataFromObject(n)):urlEncode(n))}function makeSettleInfo(e){return{tasks:[],elts:[e]}}function updateScrollState(e,t){let n=e[0],r=e[e.length-1];if(t.scroll){var i=null;t.scrollTarget&&(i=asElement(querySelectorExt(n,t.scrollTarget))),t.scroll===`top`&&(n||i)&&(i||=n,i.scrollTop=0),t.scroll===`bottom`&&(r||i)&&(i||=r,i.scrollTop=i.scrollHeight),typeof t.scroll==`number`&&getWindow().setTimeout(function(){window.scrollTo(0,t.scroll)},0)}if(t.show){var i=null;if(t.showTarget){let e=t.showTarget;t.showTarget===`window`&&(e=`body`),i=asElement(querySelectorExt(n,e))}t.show===`top`&&(n||i)&&(i||=n,i.scrollIntoView({block:`start`,behavior:htmx.config.scrollBehavior})),t.show===`bottom`&&(r||i)&&(i||=r,i.scrollIntoView({block:`end`,behavior:htmx.config.scrollBehavior}))}}function getValuesForElement(e,t,n,r,i){if(r??={},e==null)return r;let a=getAttributeValue(e,t);if(a){let t=a.trim(),o=n;if(t===`unset`)return null;t.indexOf(`javascript:`)===0?(t=t.slice(11),o=!0):t.indexOf(`js:`)===0&&(t=t.
1slice(3),o=!0),t.indexOf(`{`)!==0&&(t=`{`+t+`}`);let s;s=o?maybeEval(e,function(){return i?Function(`event`,`return (`+t+`)`).call(e,i):Function(`return (`+t+`)`).call(e)},{}):parseJSON(t);for(let e in s)s.hasOwnProperty(e)&&(r[e]??(r[e]=s[e]))}return getValuesForElement(asElement(parentElt(e)),t,n,r,i)}function maybeEval(e,t,n){return htmx.config.allowEval?t():(triggerErrorEvent(e,`htmx:evalDisallowedError`),n)}function getHXVarsForElement(e,t,n){return getValuesForElement(e,`hx-vars`,!0,n,t)}function getHXValsForElement(e,t,n){return getValuesForElement(e,`hx-vals`,!1,n,t)}function getExpressionVars(e,t){return mergeObjects(getHXVarsForElement(e,t),getHXValsForElement(e,t))}function safelySetHeaderValue(e,t,n){if(n!==null)try{e.setRequestHeader(t,n)}catch{e.setRequestHeader(t,encodeURIComponent(n)),e.setRequestHeader(t+`-URI-AutoEncoded`,`true`)}}function getPathFromResponse(e){if(e.responseURL)try{let t=new URL(e.responseURL);return t.pathname+t.search}catch{triggerErrorEvent(getDocument().body,`htmx:badResponseUrl`,{url:e.responseURL})}}function hasHeader(e,t){return t.test(e.getAllResponseHeaders())}function ajaxHelper(e,t,n){if(e=e.toLowerCase(),n){if(n instanceof Element||typeof n==`string`)return issueAjaxRequest(e,t,null,null,{targetOverride:resolveTarget(n)||DUMMY_ELT,returnPromise:!0});{let r=resolveTarget(n.target);return(n.target&&!r||n.source&&!r&&!resolveTarget(n.source))&&(r=DUMMY_ELT),issueAjaxRequest(e,t,resolveTarget(n.source),n.event,{handler:n.handler,headers:n.headers,values:n.values,targetOverride:r,
1swapOverride:n.swap,select:n.select,returnPromise:!0,push:n.push,replace:n.replace,selectOOB:n.selectOOB})}}return issueAjaxRequest(e,t,null,null,{returnPromise:!0})}function hierarchyForElt(e){let t=[];for(;e;)t.push(e),e=e.parentElement;return t}function verifyPath(e,t,n){let r=new URL(t,location.protocol===`about:`?window.origin:location.href),i=(location.protocol===`about:`?window.origin:location.origin)===r.origin;return htmx.config.selfRequestsOnly&&!i?!1:triggerEvent(e,`htmx:validateUrl`,mergeObjects({url:r,sameHost:i},n))}function formDataFromObject(e){if(e instanceof FormData)return e;let t=new FormData;for(let n in e)e.hasOwnProperty(n)&&(e[n]&&typeof e[n].forEach==`function`?e[n].forEach(function(e){t.append(n,e)}):typeof e[n]==`object`&&!(e[n]instanceof Blob)?t.append(n,JSON.stringify(e[n])):t.append(n,e[n]));return t}function formDataArrayProxy(e,t,n){return new Proxy(n,{get:function(n,r){return typeof r==`number`?n[r]:r===`length`?n.length:r===`push`?function(r){n.push(r),e.append(t,r)}:typeof n[r]==`function`?function(){n[r].apply(n,arguments),e.delete(t),n.forEach(function(n){e.append(t,n)})}:n[r]&&n[r].length===1?n[r][0]:n[r]},set:function(n,r,i){return n[r]=i,e.delete(t),n.forEach(function(n){e.append(t,n)}),!0}})}function formDataProxy(e){return new Proxy(e,{get:function(t,n){if(typeof n==`symbol`){let r=Reflect.get(t,n);return typeof r==`function`?function(){return r.apply(e,arguments)}:r}if(n===`toJSON`)return()=>Object.fromEntries(e);if(n in t&&typeof t[n]==`function`)return function(){return e[n].apply(e,arguments)};let r=e.getAll(n);if(r.length!==0)return r.length===1?r[0]:formDataArrayProxy(t,n,r)},set:function(e,t,n){return typeof t==`string`&&(e.delete(t),n&&typeof n.forEach==`function`?n.forEach(function(n){e.append(t,n)}):typeof n==`object`&&!(n instanceof Blob)?e.append(t,JSON.stringify(n)):e.append(t,n),!0)},deleteProperty:function(e,t){return typeof t==`string`&&e.delete(t),!0},ownKeys:function(e){return Reflect.ownKeys(Object.fromEntries(e))},getOwnPropertyDescriptor:function(e,t){return Reflect.getOwnPropertyDescriptor(Object.fromEntries(e),t)}})}function issueAjaxRequest(e,t,n,r,i,a){let o=null,s=null;if(i??={},i.returnPromise&&typeof Promise<`u`)var c=new Promise(function(e,t){o=e,s=t});n??=getDocument().body;let l=i.handler||handleAjaxResponse,u=i.select||null;if(!bodyContains(n))return maybeCall(o),c;let d=i.targetOverride||asElement(getTarget(n));if(d==null||d==DUMMY_ELT)return triggerErrorEvent(n,`htmx:targetError`,{target:getClosestAttributeValue(n,`hx-target`)}),maybeCall(s),c;let f=getInternalData(n),p=f.lastButtonClicked;if(p){let n=getRawAttribute(p,`formaction`);n!=null&&(t=n);let r=getRawAttribute(p,`formmethod`);
1if(r!=null){if(VERBS.includes(r.toLowerCase()))e=r;else return maybeCall(o),c}}let m=getClosestAttributeValue(n,`hx-confirm`);if(a===void 0&&triggerEvent(n,`htmx:confirm`,{target:d,elt:n,path:t,verb:e,triggeringEvent:r,etc:i,issueRequest:function(a){return issueAjaxRequest(e,t,n,r,i,!!a)},question:m})===!1)return maybeCall(o),c;let h=n,g=getClosestAttributeValue(n,`hx-sync`),_=null,v=!1;if(g){let e=g.split(`:`),t=e[0].trim();if(h=t===`this`?findThisElement(n,`hx-sync`):asElement(querySelectorExt(n,t)),g=(e[1]||`drop`).trim(),f=getInternalData(h),g===`drop`&&f.xhr&&f.abortable!==!0)return maybeCall(o),c;if(g===`abort`){if(f.xhr)return maybeCall(o),c;v=!0}else g===`replace`?triggerEvent(h,`htmx:abort`):g.indexOf(`queue`)===0&&(_=(g.split(` `)[1]||`last`).trim())}if(f.xhr){if(f.abortable)triggerEvent(h,`htmx:abort`);else{if(_==null){if(r){let e=getInternalData(r);e&&e.triggerSpec&&e.triggerSpec.queue&&(_=e.triggerSpec.queue)}_??=`last`}return f.queuedRequests??(f.queuedRequests=[]),_===`first`&&f.queuedRequests.length===0||_===`all`?f.queuedRequests.push(function(){issueAjaxRequest(e,t,n,r,i)}):_===`last`&&(f.queuedRequests=[],f.queuedRequests.push(function(){issueAjaxRequest(e,t,n,r,i)})),maybeCall(o),c}}let y=new XMLHttpRequest;f.xhr=y,f.abortable=v;let b=function(){f.xhr=null,f.abortable=!1,f.queuedRequests!=null&&f.queuedRequests.length>0&&f.queuedRequests.shift()()},x=getClosestAttributeValue(n,`hx-prompt`);if(x){var S=prompt(x);if(S===null||!triggerEvent(n,`htmx:prompt`,{prompt:S,target:d}))return maybeCall(o),b(),c}if(m&&!a&&!confirm(m))return maybeCall(o),b(),c;let C=getHeaders(n,d,S);e!==`get`&&!usesFormData(n)&&(C[`Content-Type`]=`application/x-www-form-urlencoded`),i.headers&&(C=mergeObjects(C,i.headers));let w=getInputValues(n,e),T=w.errors,E=w.formData;i.values&&overrideFormData(E,formDataFromObject(i.values));let D=overrideFormData(E,formDataFromObject(getExpressionVars(n,r))),O=filterValues(D,n);htmx.config.getCacheBusterParam&&e===`get`&&O.set(`org.htmx.cache-buster`,getRawAttribute(d,`id`)||`true`),(t==null||t===``)&&(t=location.href);let k=getValuesForElement(n,`hx-request`),A=getInternalData(n).boosted,j=htmx.config.methodsThatUseUrlParams.indexOf(e)>=0,M={boosted:A,useUrlParams:j,formData:O,parameters:formDataProxy(O),unfilteredFormData:D,unfilteredParameters:formDataProxy(D),headers:C,elt:n,target:d,verb:e,errors:T,withCredentials:i.credentials||k.credentials||htmx.config.withCredentials,timeout:i.timeout||k.timeout||htmx.config.timeout,path:t,triggeringEvent:r};if(!triggerEvent(n,`htmx:configRequest`,M))return maybeCall(o),b(),c;if(t=M.path,e=M.verb,C=M.headers,O=formDataFromObject(M.parameters),T=M.errors,j=M.useUrlParams,T&&T.length>0)return triggerEvent(n,`htmx:validation:halted`,M),maybeCall(o),b(),c;let N=t.split(`#`),P=N[0],F=N[1],I=t;if(j&&(I=P,O.keys().next().done||(I.indexOf(`?`)<0?I+=`?`:I+=`&`,I+=urlEncode(O),F&&(I+=`#`+F))),!verifyPath(n,I,M))return triggerErrorEvent(n,`htmx:invalidPath`,M),maybeCall(s),b(),c;if(y.open(e.toUpperCase(),I,!0),y.overrideMimeType(`text/html`),y.withCredentials=M.withCredentials,y.timeout=M.timeout,!k.noHeaders){for(let e in C)if(C.hasOwnProperty(e)){let t=C[e];safelySetHeaderValue(y,e,t)}}let L={xhr:y,target:d,requestConfig:M,etc:i,boosted:A,select:u,pathInfo:{requestPath:t,finalRequestPath:I,responsePath:null,anchor:F}};if(y.onload=function(){try{let e=hierarchyForElt(n);if(L.pathInfo.responsePath=getPathFromResponse(y),l(n,L),L.keepIndicators!==!0&&removeRequestIndicators(R,z),triggerEvent(n,`htmx:afterRequest`,L),triggerEvent(n,`htmx:afterOnLoad`,L),!bodyContains(n)){let t=null;for(;e.length>0&&t==null;){let n=e.shift();bodyContains(n)&&(t=n)}t&&(triggerEvent(t,`htmx:afterRequest`,L),triggerEvent(t,`htmx:afterOnLoad`,L))}maybeCall(o)}catch(e){throw triggerErrorEvent(n,`htmx:onLoadError`,mergeObjects({error:e},L)),e}finally{b()}},y.onerror=function(){removeRequestIndicators(R,z),triggerErrorEvent(n,`htmx:afterRequest`,L),triggerErrorEvent(n,`htmx:sendError`,L),maybeCall(s),b()},y.onabort=function(){removeRequestIndicators(R,z),triggerErrorEvent(n,`htmx:afterRequest`,L),triggerErrorEvent(n,`htmx:sendAbort`,L),maybeCall(s),b()},y.ontimeout=function(){removeRequestIndicators(R,z),triggerErrorEvent(n,`htmx:afterRequest`,L),triggerErrorEvent(n,`htmx:timeout`,L),maybeCall(s),b()},!triggerEvent(n,`htmx:beforeRequest`,L))return maybeCall(o),b(),c;var R=addRequestIndicatorClasses(n),z=disableElements(n);forEach([`loadstart`,`loadend`,`progress`,`abort`],function(e){forEach([y,y.upload],function(t){t.addEventListener(e,function(t){triggerEvent(n,`htmx:xhr:`+e,{lengthComputable:t.lengthComputable,loaded:t.loaded,total:t.total})})})}),triggerEvent(n,`htmx:beforeSend`,L);let B=j?null:encodeParamsForBody(y,n,O);return y.send(B),c}function determineHistoryUpdates(e,t){let n=t.xhr,r=null,i=null;if(hasHeader(n,/HX-Push:/i)?(r=n.getResponseHeader(`HX-Push`),i=`push`):hasHeader(n,/HX-Push-Url:/i)?(r=n.getResponseHeader(`HX-Push-Url`),i=`push`):hasHeader(n,/HX-Replace-Url:/i)&&(r=n.getResponseHeader(`HX-Replace-Url`),i=`replace`),r)return r===`false`?{}:{type:i,path:r};let a=t.pathInfo.finalRequestPath,o=t.pathInfo.responsePath,s=t.etc.push||getClosestAttributeValue(e,`hx-push-url`),c=t.etc.replace||getClosestAttributeValue(e,`hx-replace-url`);s===`false`&&(s=null),c===`false`&&(c=null);let l=getInternalData(e).boosted,u=null,d=null;return s?(u=`push`,d=s):c?(u=`replace`,d=c):l&&(u=`push`,d=o||a),d?(d===`true`&&(d=o||a),t.pathInfo.anch
1or&&d.indexOf(`#`)===-1&&(d=d+`#`+t.pathInfo.anchor),{type:u,path:d}):{}}function codeMatches(e,t){return new RegExp(e.code).test(t.toString(10))}function resolveResponseHandling(e){for(var t=0;t<htmx.config.responseHandling.length;t++){var n=htmx.config.responseHandling[t];if(codeMatches(n,e.status))return n}return{swap:!1}}function handleTitle(e){if(e){let t=find(`title`);t?t.textContent=e:window.document.title=e}}function resolveRetarget(e,t){if(t===`this`)return e;let n=asElement(querySelectorExt(e,t));if(n==null)throw triggerErrorEvent(e,`htmx:targetError`,{target:t}),Error(`Invalid re-target ${t}`);return n}function handleAjaxResponse(e,t){let n=t.xhr,r=t.target,i=t.etc,a=t.select;if(!triggerEvent(e,`htmx:beforeOnLoad`,t))return;if(hasHeader(n,/HX-Trigger:/i)&&handleTriggerHeader(n,`HX-Trigger`,e),hasHeader(n,/HX-Location:/i)){let e=n.getResponseHeader(`HX-Location`);var o={};e.indexOf(`{`)===0&&(o=parseJSON(e),e=o.path,delete o.path),o.push=o.push??`true`,ajaxHelper(`get`,e,o);return}let s=hasHeader(n,/HX-Refresh:/i)&&n.getResponseHeader(`HX-Refresh`)===`true`;if(hasHeader(n,/HX-Redirect:/i)){t.keepIndicators=!0,htmx.location.href=n.getResponseHeader(`HX-Redirect`),s&&htmx.location.reload();return}if(s){t.keepIndicators=!0,htmx.location.reload();return}let c=determineHistoryUpdates(e,t),l=resolveResponseHandling(n),u=l.swap,d=!!l.error,f=htmx.config.ignoreTitle||l.ignoreTitle,p=l.select;l.target&&(t.target=resolveRetarget(e,l.target));var m=i.swapOverride;m==null&&l.swapOverride&&(m=l.swapOverride),hasHeader(n,/HX-Retarget:/i)&&(t.target=resolveRetarget(e,n.getResponseHeader(`HX-Retarget`))),hasHeader(n,/HX-Reswap:/i)&&(m=n.getResponseHeader(`HX-Reswap`));var h=n.response,g=mergeObjects({shouldSwap:u,serverResponse:h,isError:d,ignoreTitle:f,selectOverride:p,swapOverride:m},t);if((!l.event||triggerEvent(r,l.event,g))&&triggerEvent(r,`htmx:beforeSwap`,g)){if(r=g.target,h=g.serverResponse,d=g.isError,f=g.ignoreTitle,p=g.selectOverride,m=g.swapOverride,t.target=r,t.failed=d,t.successful=!d,g.shouldSwap){n.status===286&&cancelPolling(e),withExtensions(e,function(t){h=t.transformResponse(h,n,e)}),c.type&&saveCurrentPageToHistory();var _=getSwapSpecification(e,m);_.hasOwnProperty(`ignoreTitle`)||(_.ignoreTitle=f),addClassToElement(r,htmx.config.swappingClass),a&&(p=a),hasHeader(n,/HX-Reselect:/i)&&(p=n.getResponseHeader(`HX-Reselect`));let o=i.selectOOB||getClosestAttributeValue(e,`hx-select-oob`),s=getClosestAttributeValue(e,`hx-select`);swap(r,h,_,{select:p===`unset`?null:p||s,selectOOB:o,eventInfo:t,anchor:t.pathInfo.anchor,contextElement:e,afterSwapCallback:function(){if(hasHeader(n,/HX-Trigger-After-Swap:/i)){let t=e;bodyContains(e)||(t=getDocument().body),handleTriggerHeader(n,`HX-Trigger-After-Swap`,t)}},afterSettleCallback:function(){if(hasHeader(n,/HX-Trigger-After-Settle:/i)){let t=e;bodyContains(e)||(t=getDocument().body),handleTriggerHeader(n,`HX-Trigger-After-Settle`,t)}},beforeSwapCallback:function(){c.type&&(triggerEvent(getDocument().body,`htmx:beforeHistoryUpdate`,mergeObjects({history:c},t)),c.type===`push`?(pushUrlIntoHistory(c.path),triggerEvent(getDocument().body,`htmx:pushedIntoHistory`,{path:c.path})):(replaceUrlInHistory(c.path),triggerEvent(getDocument().body,`htmx:replacedInHistory`,{path:c.path})))}})}d&&triggerErrorEvent(e,`htmx:responseError`,mergeObjects({error:`Response Status Error Code `+n.status+` from `+t.pathInfo.requestPath},t))}}const extensions={};function extensionBase(){return{init:function(e){return null},getSelectors:function(){return null},onEvent:function(e,t){return!0},transformResponse:function(e,t,n){return e},isInlineSwap:function(e){return!1},handleSwap:function(e,t,n,r){return!1},encodeParameters:function(e,t,n){return null}}}function defineExtension(e,t){t.init&&t.init(internalAPI),extensions[e]=mergeObjects(extensionBase(),t)}function removeExtension(e){delete extensions[e]}function getExtensions(e,t,n){if(t??=[],e==null)return t;n??=[];let r=getAttributeValue(e,`hx-ext`);return r&&forEach(r.split(`,`),function(e){if(e=e.replace(/ /g,``),e.slice(0,7)==`ignore:`){n.push(e.slice(7));return}if(n.indexOf(e)<0){let n=extensions[e];n&&t.indexOf(n)<0&&t.push(n)}}),getExtensions(asElement(parentElt(e)),t,n)}var isReady=!1;getDocument().addEventListener(`DOMContentLoaded`,function(){isReady=!0});function ready(e){isReady||getDocument().readyState===`complete`?e():getDocument().addEventListener(`DOMContentLoaded`,e)}function insertIndicatorStyles(){if(htmx.config.includeIndicatorStyles!==!1){let e=htmx.config.inlineStyleNonce?` nonce="${htmx.config.inlineStyleNonce}"`:``,t=htmx.config.indicatorClass,n=htmx.config.requestClass;
1getDocument().head.insertAdjacentHTML(`beforeend`,`<style${e}>.${t}{opacity:0;visibility: hidden} .${n} .${t}, .${n}.${t}{opacity:1;visibility: visible;transition: opacity 200ms ease-in}</style>`)}}function getMetaConfig(){let e=getDocument().querySelector(`meta[name="htmx-config"]`);return e?parseJSON(e.content):null}function mergeMetaConfig(){let e=getMetaConfig();e&&(htmx.config=mergeObjects(htmx.config,e))}return ready(function(){mergeMetaConfig(),insertIndicatorStyles();let e=getDocument().body;processNode(e);let t=getDocument().querySelectorAll(`[hx-trigger='restored'],[data-hx-trigger='restored']`);e.addEventListener(`htmx:abort`,function(e){let t=getInternalData(e.detail.elt||e.target);t&&t.xhr&&t.xhr.abort()});let n=window.onpopstate?window.onpopstate.bind(window):null;window.onpopstate=function(e){e.state&&e.state.htmx?(restoreHistory(),forEach(t,function(e){triggerEvent(e,`htmx:restored`,{document:getDocument(),triggerEvent})})):n&&n(e)},getWindow().setTimeout(function(){triggerEvent(e,`htmx:load`,{}),e=null},0)}),htmx})();export{htmx as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.