Files
sam-manage/public/build/assets/app-BX8sFXki.js
김보곤 f49c86d81f fix:빌드 파일 커밋 (indigo 색상 safelist 포함)
서버에서 npm build 실행 불가하여 빌드파일 직접 커밋

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:18:15 +09:00

7 lines
109 KiB
JavaScript

function bind(e,t){return function(){return e.apply(t,arguments)}}const{toString}=Object.prototype,{getPrototypeOf}=Object,{iterator,toStringTag}=Symbol,kindOf=(e=>t=>{const n=toString.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=e=>(e=e.toLowerCase(),t=>kindOf(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray}=Array,isUndefined=typeOfTest("undefined");function isBuffer(e){return e!==null&&!isUndefined(e)&&e.constructor!==null&&!isUndefined(e.constructor)&&isFunction$1(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&isArrayBuffer(e.buffer),t}const isString=typeOfTest("string"),isFunction$1=typeOfTest("function"),isNumber=typeOfTest("number"),isObject=e=>e!==null&&typeof e=="object",isBoolean=e=>e===!0||e===!1,isPlainObject=e=>{if(kindOf(e)!=="object")return!1;const t=getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(toStringTag in e)&&!(iterator in e)},isEmptyObject=e=>{if(!isObject(e)||isBuffer(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},isDate=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=e=>isObject(e)&&isFunction$1(e.pipe),isFormData=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||isFunction$1(e.append)&&((t=kindOf(e))==="formdata"||t==="object"&&isFunction$1(e.toString)&&e.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),isArray(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if(isBuffer(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(r=0;r<i;r++)a=o[r],t.call(null,e[a],a,e)}}function findKey(e,t){if(isBuffer(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=e=>!isUndefined(e)&&e!==_global;function merge(){const{caseless:e,skipUndefined:t}=isContextDefined(this)&&this||{},n={},r=(s,o)=>{const i=e&&findKey(n,o)||o;isPlainObject(n[i])&&isPlainObject(s)?n[i]=merge(n[i],s):isPlainObject(s)?n[i]=merge({},s):isArray(s)?n[i]=s.slice():(!t||!isUndefined(s))&&(n[i]=s)};for(let s=0,o=arguments.length;s<o;s++)arguments[s]&&forEach(arguments[s],r);return n}const extend=(e,t,n,{allOwnKeys:r}={})=>(forEach(t,(s,o)=>{n&&isFunction$1(s)?Object.defineProperty(e,o,{value:bind(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,o,{value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),stripBOM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),inherits=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject=(e,t,n,r)=>{let s,o,i;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!r||r(i,e,t))&&!a[i]&&(t[i]=e[i],a[i]=!0);e=n!==!1&&getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},endsWith=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},toArray=e=>{if(!e)return null;if(isArray(e))return e;let t=e.length;if(!isNumber(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},isTypedArray=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(e,t)=>{const r=(e&&e[iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},matchAll=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),hasOwnProperty=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),isRegExp=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};forEach(n,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(r[o]=i||s)}),Object.defineProperties(e,r)},freezeMethods=e=>{reduceDescriptors(e,(t,n)=>{if(isFunction$1(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(isFunction$1(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},toObjectSet=(e,t)=>{const n={},r=s=>{s.forEach(o=>{n[o]=!0})};return isArray(e)?r(e):r(String(e).split(t)),n},noop=()=>{},toFiniteNumber=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function isSpecCompliantForm(e){return!!(e&&isFunction$1(e.append)&&e[toStringTag]==="FormData"&&e[iterator])}const toJSONObject=e=>{const t=new Array(10),n=(r,s)=>{if(isObject(r)){if(t.indexOf(r)>=0)return;if(isBuffer(r))return r;if(!("toJSON"in r)){t[s]=r;const o=isArray(r)?[]:{};return forEach(r,(i,a)=>{const c=n(i,s+1);!isUndefined(c)&&(o[a]=c)}),t[s]=void 0,o}}return r};return n(e,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=e=>e&&(isObject(e)||isFunction$1(e))&&isFunction$1(e.then)&&isFunction$1(e.catch),_setImmediate=((e,t)=>e?setImmediate:t?((n,r)=>(_global.addEventListener("message",({source:s,data:o})=>{s===_global&&o===n&&r.length&&r.shift()()},!1),s=>{r.push(s),_global.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",isFunction$1(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process<"u"&&process.nextTick||_setImmediate,isIterable=e=>e!=null&&isFunction$1(e[iterator]),utils$1={isArray,isArrayBuffer,isBuffer,isFormData,isArrayBufferView,isString,isNumber,isBoolean,isObject,isPlainObject,isEmptyObject,isReadableStream,isRequest,isResponse,isHeaders,isUndefined,isDate,isFile,isBlob,isRegExp,isFunction:isFunction$1,isStream,isURLSearchParams,isTypedArray,isFileList,forEach,merge,extend,trim,stripBOM,inherits,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty,hasOwnProp:hasOwnProperty,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase,noop,toFiniteNumber,findKey,global:_global,isContextDefined,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap,isIterable};let AxiosError$1=class W extends Error{static from(t,n,r,s,o,i){const a=new W(t.message,n||t.code,r,s,o);return a.cause=t,a.name=t.name,i&&Object.assign(a,i),a}constructor(t,n,r,s,o){super(t),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),o&&(this.response=o,this.status=o.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}};AxiosError$1.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";AxiosError$1.ERR_BAD_OPTION="ERR_BAD_OPTION";AxiosError$1.ECONNABORTED="ECONNABORTED";AxiosError$1.ETIMEDOUT="ETIMEDOUT";AxiosError$1.ERR_NETWORK="ERR_NETWORK";AxiosError$1.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";AxiosError$1.ERR_DEPRECATED="ERR_DEPRECATED";AxiosError$1.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";AxiosError$1.ERR_BAD_REQUEST="ERR_BAD_REQUEST";AxiosError$1.ERR_CANCELED="ERR_CANCELED";AxiosError$1.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";AxiosError$1.ERR_INVALID_URL="ERR_INVALID_URL";const httpAdapter=null;function isVisitable(e){return utils$1.isPlainObject(e)||utils$1.isArray(e)}function removeBrackets(e){return utils$1.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,n){return e?e.concat(t).map(function(s,o){return s=removeBrackets(s),!n&&o?"["+s+"]":s}).join(n?".":""):t}function isFlatArray(e){return utils$1.isArray(e)&&!e.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function(t){return/^is[A-Z]/.test(t)});function toFormData$1(e,t,n){if(!utils$1.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=utils$1.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,h){return!utils$1.isUndefined(h[g])});const r=n.metaTokens,s=n.visitor||d,o=n.dots,i=n.indexes,c=(n.Blob||typeof Blob<"u"&&Blob)&&utils$1.isSpecCompliantForm(t);if(!utils$1.isFunction(s))throw new TypeError("visitor must be a function");function l(f){if(f===null)return"";if(utils$1.isDate(f))return f.toISOString();if(utils$1.isBoolean(f))return f.toString();if(!c&&utils$1.isBlob(f))throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(f)||utils$1.isTypedArray(f)?c&&typeof Blob=="function"?new Blob([f]):Buffer.from(f):f}function d(f,g,h){let b=f;if(f&&!h&&typeof f=="object"){if(utils$1.endsWith(g,"{}"))g=r?g:g.slice(0,-2),f=JSON.stringify(f);else if(utils$1.isArray(f)&&isFlatArray(f)||(utils$1.isFileList(f)||utils$1.endsWith(g,"[]"))&&(b=utils$1.toArray(f)))return g=removeBrackets(g),b.forEach(function(p,y){!(utils$1.isUndefined(p)||p===null)&&t.append(i===!0?renderKey([g],y,o):i===null?g:g+"[]",l(p))}),!1}return isVisitable(f)?!0:(t.append(renderKey(h,g,o),l(f)),!1)}const u=[],m=Object.assign(predicates,{defaultVisitor:d,convertValue:l,isVisitable});function E(f,g){if(!utils$1.isUndefined(f)){if(u.indexOf(f)!==-1)throw Error("Circular reference detected in "+g.join("."));u.push(f),utils$1.forEach(f,function(b,x){(!(utils$1.isUndefined(b)||b===null)&&s.call(t,b,utils$1.isString(x)?x.trim():x,g,m))===!0&&E(b,g?g.concat(x):[x])}),u.pop()}}if(!utils$1.isObject(e))throw new TypeError("data must be an object");return E(e),t}function encode$2(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData$1(e,this,t)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(t,n){this._pairs.push([t,n])};prototype.toString=function(t){const n=t?function(r){return t.call(this,r,encode$2)}:encode$2;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function encode$1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function buildURL(e,t,n){if(!t)return e;const r=n&&n.encode||encode$1,s=utils$1.isFunction(n)?{serialize:n}:n,o=s&&s.serialize;let i;if(o?i=o(t,s):i=utils$1.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,s).toString(r),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class InterceptorManager{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){utils$1.forEach(this.handlers,function(r){r!==null&&t(r)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$1={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform={...utils,...platform$1};function toURLEncodedForm(e,t){return toFormData$1(e,new platform.classes.URLSearchParams,{visitor:function(n,r,s,o){return platform.isNode&&utils$1.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)},...t})}function parsePropPath(e){return utils$1.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function arrayToObject(e){const t={},n=Object.keys(e);let r;const s=n.length;let o;for(r=0;r<s;r++)o=n[r],t[o]=e[o];return t}function formDataToJSON(e){function t(n,r,s,o){let i=n[o++];if(i==="__proto__")return!0;const a=Number.isFinite(+i),c=o>=n.length;return i=!i&&utils$1.isArray(s)?s.length:i,c?(utils$1.hasOwnProp(s,i)?s[i]=[s[i],r]:s[i]=r,!a):((!s[i]||!utils$1.isObject(s[i]))&&(s[i]=[]),t(n,r,s[i],o)&&utils$1.isArray(s[i])&&(s[i]=arrayToObject(s[i])),!a)}if(utils$1.isFormData(e)&&utils$1.isFunction(e.entries)){const n={};return utils$1.forEachEntry(e,(r,s)=>{t(parsePropPath(r),s,n,0)}),n}return null}function stringifySafely(e,t,n){if(utils$1.isString(e))try{return(t||JSON.parse)(e),utils$1.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const defaults={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,o=utils$1.isObject(t);if(o&&utils$1.isHTMLForm(t)&&(t=new FormData(t)),utils$1.isFormData(t))return s?JSON.stringify(formDataToJSON(t)):t;if(utils$1.isArrayBuffer(t)||utils$1.isBuffer(t)||utils$1.isStream(t)||utils$1.isFile(t)||utils$1.isBlob(t)||utils$1.isReadableStream(t))return t;if(utils$1.isArrayBufferView(t))return t.buffer;if(utils$1.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(t,this.formSerializer).toString();if((a=utils$1.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return toFormData$1(a?{"files[]":t}:t,c&&new c,this.formSerializer)}}return o||s?(n.setContentType("application/json",!1),stringifySafely(t)):t}],transformResponse:[function(t){const n=this.transitional||defaults.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(utils$1.isResponse(t)||utils$1.isReadableStream(t))return t;if(t&&utils$1.isString(t)&&(r&&!this.responseType||s)){const i=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(a){if(i)throw a.name==="SyntaxError"?AxiosError$1.from(a,AxiosError$1.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform.classes.FormData,Blob:platform.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],e=>{defaults.headers[e]={}});const ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=e=>{const t={};let n,r,s;return e&&e.split(`
`).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||t[n]&&ignoreDuplicateOf[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},$internals=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return e===!1||e==null?e:utils$1.isArray(e)?e.map(normalizeValue):String(e)}function parseTokens(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const isValidHeaderName=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function matchHeaderValue(e,t,n,r,s){if(utils$1.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!utils$1.isString(t)){if(utils$1.isString(r))return t.indexOf(r)!==-1;if(utils$1.isRegExp(r))return r.test(t)}}function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function buildAccessors(e,t){const n=utils$1.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,o,i){return this[r].call(this,t,s,o,i)},configurable:!0})})}let AxiosHeaders$1=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function o(a,c,l){const d=normalizeHeader(c);if(!d)throw new Error("header name must be a non-empty string");const u=utils$1.findKey(s,d);(!u||s[u]===void 0||l===!0||l===void 0&&s[u]!==!1)&&(s[u||c]=normalizeValue(a))}const i=(a,c)=>utils$1.forEach(a,(l,d)=>o(l,d,c));if(utils$1.isPlainObject(t)||t instanceof this.constructor)i(t,n);else if(utils$1.isString(t)&&(t=t.trim())&&!isValidHeaderName(t))i(parseHeaders(t),n);else if(utils$1.isObject(t)&&utils$1.isIterable(t)){let a={},c,l;for(const d of t){if(!utils$1.isArray(d))throw TypeError("Object iterator must return a key-value pair");a[l=d[0]]=(c=a[l])?utils$1.isArray(c)?[...c,d[1]]:[c,d[1]]:d[1]}i(a,n)}else t!=null&&o(n,t,r);return this}get(t,n){if(t=normalizeHeader(t),t){const r=utils$1.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return parseTokens(s);if(utils$1.isFunction(n))return n.call(this,s,r);if(utils$1.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=normalizeHeader(t),t){const r=utils$1.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||matchHeaderValue(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function o(i){if(i=normalizeHeader(i),i){const a=utils$1.findKey(r,i);a&&(!n||matchHeaderValue(r,r[a],a,n))&&(delete r[a],s=!0)}}return utils$1.isArray(t)?t.forEach(o):o(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const o=n[r];(!t||matchHeaderValue(this,this[o],o,t,!0))&&(delete this[o],s=!0)}return s}normalize(t){const n=this,r={};return utils$1.forEach(this,(s,o)=>{const i=utils$1.findKey(r,o);if(i){n[i]=normalizeValue(s),delete n[o];return}const a=t?formatHeader(o):String(o).trim();a!==o&&delete n[o],n[a]=normalizeValue(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return utils$1.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&utils$1.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[$internals]=this[$internals]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=normalizeHeader(i);r[a]||(buildAccessors(s,i),r[a]=!0)}return utils$1.isArray(t)?t.forEach(o):o(t),this}};AxiosHeaders$1.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$1.reduceDescriptors(AxiosHeaders$1.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});utils$1.freezeMethods(AxiosHeaders$1);function transformData(e,t){const n=this||defaults,r=t||n,s=AxiosHeaders$1.from(r.headers);let o=r.data;return utils$1.forEach(e,function(a){o=a.call(n,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function isCancel$1(e){return!!(e&&e.__CANCEL__)}let CanceledError$1=class extends AxiosError$1{constructor(t,n,r){super(t??"canceled",AxiosError$1.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function settle(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new AxiosError$1("Request failed with status code "+n.status,[AxiosError$1.ERR_BAD_REQUEST,AxiosError$1.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function speedometer(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),d=r[o];i||(i=l),n[s]=c,r[s]=l;let u=o,m=0;for(;u!==s;)m+=n[u++],u=u%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),l-i<t)return;const E=d&&l-d;return E?Math.round(m*1e3/E):void 0}}function throttle(e,t){let n=0,r=1e3/t,s,o;const i=(l,d=Date.now())=>{n=d,s=null,o&&(clearTimeout(o),o=null),e(...l)};return[(...l)=>{const d=Date.now(),u=d-n;u>=r?i(l,d):(s=l,o||(o=setTimeout(()=>{o=null,i(s)},r-u)))},()=>s&&i(s)]}const progressEventReducer=(e,t,n=3)=>{let r=0;const s=speedometer(50,250);return throttle(o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,c=i-r,l=s(c),d=i<=a;r=i;const u={loaded:i,total:a,progress:a?i/a:void 0,bytes:c,rate:l||void 0,estimated:l&&a&&d?(a-i)/l:void 0,event:o,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(u)},n)},progressEventDecorator=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},asyncDecorator=e=>(...t)=>utils$1.asap(()=>e(...t)),isURLSameOrigin=platform.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,platform.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(platform.origin),platform.navigator&&/(msie|trident)/i.test(platform.navigator.userAgent)):()=>!0,cookies=platform.hasStandardBrowserEnv?{write(e,t,n,r,s,o,i){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];utils$1.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),utils$1.isString(r)&&a.push(`path=${r}`),utils$1.isString(s)&&a.push(`domain=${s}`),o===!0&&a.push("secure"),utils$1.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function buildFullPath(e,t,n){let r=!isAbsoluteURL(t);return e&&(r||n==!1)?combineURLs(e,t):t}const headersToObject=e=>e instanceof AxiosHeaders$1?{...e}:e;function mergeConfig$1(e,t){t=t||{};const n={};function r(l,d,u,m){return utils$1.isPlainObject(l)&&utils$1.isPlainObject(d)?utils$1.merge.call({caseless:m},l,d):utils$1.isPlainObject(d)?utils$1.merge({},d):utils$1.isArray(d)?d.slice():d}function s(l,d,u,m){if(utils$1.isUndefined(d)){if(!utils$1.isUndefined(l))return r(void 0,l,u,m)}else return r(l,d,u,m)}function o(l,d){if(!utils$1.isUndefined(d))return r(void 0,d)}function i(l,d){if(utils$1.isUndefined(d)){if(!utils$1.isUndefined(l))return r(void 0,l)}else return r(void 0,d)}function a(l,d,u){if(u in t)return r(l,d);if(u in e)return r(void 0,l)}const c={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(l,d,u)=>s(headersToObject(l),headersToObject(d),u,!0)};return utils$1.forEach(Object.keys({...e,...t}),function(d){const u=c[d]||s,m=u(e[d],t[d],d);utils$1.isUndefined(m)&&u!==a||(n[d]=m)}),n}const resolveConfig=e=>{const t=mergeConfig$1({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:a}=t;if(t.headers=i=AxiosHeaders$1.from(i),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),utils$1.isFormData(n)){if(platform.hasStandardBrowserEnv||platform.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(utils$1.isFunction(n.getHeaders)){const c=n.getHeaders(),l=["content-type","content-length"];Object.entries(c).forEach(([d,u])=>{l.includes(d.toLowerCase())&&i.set(d,u)})}}if(platform.hasStandardBrowserEnv&&(r&&utils$1.isFunction(r)&&(r=r(t)),r||r!==!1&&isURLSameOrigin(t.url))){const c=s&&o&&cookies.read(o);c&&i.set(s,c)}return t},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(e){return new Promise(function(n,r){const s=resolveConfig(e);let o=s.data;const i=AxiosHeaders$1.from(s.headers).normalize();let{responseType:a,onUploadProgress:c,onDownloadProgress:l}=s,d,u,m,E,f;function g(){E&&E(),f&&f(),s.cancelToken&&s.cancelToken.unsubscribe(d),s.signal&&s.signal.removeEventListener("abort",d)}let h=new XMLHttpRequest;h.open(s.method.toUpperCase(),s.url,!0),h.timeout=s.timeout;function b(){if(!h)return;const p=AxiosHeaders$1.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),$={data:!a||a==="text"||a==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:p,config:e,request:h};settle(function(A){n(A),g()},function(A){r(A),g()},$),h=null}"onloadend"in h?h.onloadend=b:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(b)},h.onabort=function(){h&&(r(new AxiosError$1("Request aborted",AxiosError$1.ECONNABORTED,e,h)),h=null)},h.onerror=function(y){const $=y&&y.message?y.message:"Network Error",I=new AxiosError$1($,AxiosError$1.ERR_NETWORK,e,h);I.event=y||null,r(I),h=null},h.ontimeout=function(){let y=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const $=s.transitional||transitionalDefaults;s.timeoutErrorMessage&&(y=s.timeoutErrorMessage),r(new AxiosError$1(y,$.clarifyTimeoutError?AxiosError$1.ETIMEDOUT:AxiosError$1.ECONNABORTED,e,h)),h=null},o===void 0&&i.setContentType(null),"setRequestHeader"in h&&utils$1.forEach(i.toJSON(),function(y,$){h.setRequestHeader($,y)}),utils$1.isUndefined(s.withCredentials)||(h.withCredentials=!!s.withCredentials),a&&a!=="json"&&(h.responseType=s.responseType),l&&([m,f]=progressEventReducer(l,!0),h.addEventListener("progress",m)),c&&h.upload&&([u,E]=progressEventReducer(c),h.upload.addEventListener("progress",u),h.upload.addEventListener("loadend",E)),(s.cancelToken||s.signal)&&(d=p=>{h&&(r(!p||p.type?new CanceledError$1(null,e,h):p),h.abort(),h=null)},s.cancelToken&&s.cancelToken.subscribe(d),s.signal&&(s.signal.aborted?d():s.signal.addEventListener("abort",d)));const x=parseProtocol(s.url);if(x&&platform.protocols.indexOf(x)===-1){r(new AxiosError$1("Unsupported protocol "+x+":",AxiosError$1.ERR_BAD_REQUEST,e));return}h.send(o||null)})},composeSignals=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const o=function(l){if(!s){s=!0,a();const d=l instanceof Error?l:this.reason;r.abort(d instanceof AxiosError$1?d:new CanceledError$1(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{i=null,o(new AxiosError$1(`timeout of ${t}ms exceeded`,AxiosError$1.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:c}=r;return c.unsubscribe=()=>utils$1.asap(a),c}},streamChunk=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},readBytes=async function*(e,t){for await(const n of readStream(e))yield*streamChunk(n,t)},readStream=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},trackStream=(e,t,n,r)=>{const s=readBytes(e,t);let o=0,i,a=c=>{i||(i=!0,r&&r(c))};return new ReadableStream({async pull(c){try{const{done:l,value:d}=await s.next();if(l){a(),c.close();return}let u=d.byteLength;if(n){let m=o+=u;n(m)}c.enqueue(new Uint8Array(d))}catch(l){throw a(l),l}},cancel(c){return a(c),s.return()}},{highWaterMark:2})},DEFAULT_CHUNK_SIZE=64*1024,{isFunction}=utils$1,globalFetchAPI=(({Request:e,Response:t})=>({Request:e,Response:t}))(utils$1.global),{ReadableStream:ReadableStream$1,TextEncoder}=utils$1.global,test=(e,...t)=>{try{return!!e(...t)}catch{return!1}},factory=e=>{e=utils$1.merge.call({skipUndefined:!0},globalFetchAPI,e);const{fetch:t,Request:n,Response:r}=e,s=t?isFunction(t):typeof fetch=="function",o=isFunction(n),i=isFunction(r);if(!s)return!1;const a=s&&isFunction(ReadableStream$1),c=s&&(typeof TextEncoder=="function"?(f=>g=>f.encode(g))(new TextEncoder):async f=>new Uint8Array(await new n(f).arrayBuffer())),l=o&&a&&test(()=>{let f=!1;const g=new n(platform.origin,{body:new ReadableStream$1,method:"POST",get duplex(){return f=!0,"half"}}).headers.has("Content-Type");return f&&!g}),d=i&&a&&test(()=>utils$1.isReadableStream(new r("").body)),u={stream:d&&(f=>f.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(f=>{!u[f]&&(u[f]=(g,h)=>{let b=g&&g[f];if(b)return b.call(g);throw new AxiosError$1(`Response type '${f}' is not supported`,AxiosError$1.ERR_NOT_SUPPORT,h)})});const m=async f=>{if(f==null)return 0;if(utils$1.isBlob(f))return f.size;if(utils$1.isSpecCompliantForm(f))return(await new n(platform.origin,{method:"POST",body:f}).arrayBuffer()).byteLength;if(utils$1.isArrayBufferView(f)||utils$1.isArrayBuffer(f))return f.byteLength;if(utils$1.isURLSearchParams(f)&&(f=f+""),utils$1.isString(f))return(await c(f)).byteLength},E=async(f,g)=>{const h=utils$1.toFiniteNumber(f.getContentLength());return h??m(g)};return async f=>{let{url:g,method:h,data:b,signal:x,cancelToken:p,timeout:y,onDownloadProgress:$,onUploadProgress:I,responseType:A,headers:C,withCredentials:v="same-origin",fetchOptions:P}=resolveConfig(f),N=t||fetch;A=A?(A+"").toLowerCase():"text";let H=composeSignals([x,p&&p.toAbortSignal()],y),S=null;const D=H&&H.unsubscribe&&(()=>{H.unsubscribe()});let B;try{if(I&&l&&h!=="get"&&h!=="head"&&(B=await E(C,b))!==0){let O=new n(g,{method:"POST",body:b,duplex:"half"}),R;if(utils$1.isFormData(b)&&(R=O.headers.get("content-type"))&&C.setContentType(R),O.body){const[_,k]=progressEventDecorator(B,progressEventReducer(asyncDecorator(I)));b=trackStream(O.body,DEFAULT_CHUNK_SIZE,_,k)}}utils$1.isString(v)||(v=v?"include":"omit");const F=o&&"credentials"in n.prototype,L={...P,signal:H,method:h.toUpperCase(),headers:C.normalize().toJSON(),body:b,duplex:"half",credentials:F?v:void 0};S=o&&new n(g,L);let U=await(o?N(S,P):N(g,L));const j=d&&(A==="stream"||A==="response");if(d&&($||j&&D)){const O={};["status","statusText","headers"].forEach(V=>{O[V]=U[V]});const R=utils$1.toFiniteNumber(U.headers.get("content-length")),[_,k]=$&&progressEventDecorator(R,progressEventReducer(asyncDecorator($),!0))||[];U=new r(trackStream(U.body,DEFAULT_CHUNK_SIZE,_,()=>{k&&k(),D&&D()}),O)}A=A||"text";let M=await u[utils$1.findKey(u,A)||"text"](U,f);return!j&&D&&D(),await new Promise((O,R)=>{settle(O,R,{data:M,headers:AxiosHeaders$1.from(U.headers),status:U.status,statusText:U.statusText,config:f,request:S})})}catch(F){throw D&&D(),F&&F.name==="TypeError"&&/Load failed|fetch/i.test(F.message)?Object.assign(new AxiosError$1("Network Error",AxiosError$1.ERR_NETWORK,f,S),{cause:F.cause||F}):AxiosError$1.from(F,F&&F.code,f,S)}}},seedCache=new Map,getFetch=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,o=[r,s,n];let i=o.length,a=i,c,l,d=seedCache;for(;a--;)c=o[a],l=d.get(c),l===void 0&&d.set(c,l=a?new Map:factory(t)),d=l;return l};getFetch();const knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:{get:getFetch}};utils$1.forEach(knownAdapters,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const renderReason=e=>`- ${e}`,isResolvedHandle=e=>utils$1.isFunction(e)||e===null||e===!1;function getAdapter$1(e,t){e=utils$1.isArray(e)?e:[e];const{length:n}=e;let r,s;const o={};for(let i=0;i<n;i++){r=e[i];let a;if(s=r,!isResolvedHandle(r)&&(s=knownAdapters[(a=String(r)).toLowerCase()],s===void 0))throw new AxiosError$1(`Unknown adapter '${a}'`);if(s&&(utils$1.isFunction(s)||(s=s.get(t))))break;o[a||"#"+i]=s}if(!s){const i=Object.entries(o).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=n?i.length>1?`since :
`+i.map(renderReason).join(`
`):" "+renderReason(i[0]):"as no adapter specified";throw new AxiosError$1("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const adapters={getAdapter:getAdapter$1,adapters:knownAdapters};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError$1(null,e)}function dispatchRequest(e){return throwIfCancellationRequested(e),e.headers=AxiosHeaders$1.from(e.headers),e.data=transformData.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(e.adapter||defaults.adapter,e)(e).then(function(r){return throwIfCancellationRequested(e),r.data=transformData.call(e,e.transformResponse,r),r.headers=AxiosHeaders$1.from(r.headers),r},function(r){return isCancel$1(r)||(throwIfCancellationRequested(e),r&&r.response&&(r.response.data=transformData.call(e,e.transformResponse,r.response),r.response.headers=AxiosHeaders$1.from(r.response.headers))),Promise.reject(r)})}const VERSION$1="1.13.3",validators$1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{validators$1[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const deprecatedWarnings={};validators$1.transitional=function(t,n,r){function s(o,i){return"[Axios v"+VERSION$1+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(t===!1)throw new AxiosError$1(s(i," has been removed"+(n?" in "+n:"")),AxiosError$1.ERR_DEPRECATED);return n&&!deprecatedWarnings[i]&&(deprecatedWarnings[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,a):!0}};validators$1.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function assertOptions(e,t,n){if(typeof e!="object")throw new AxiosError$1("options must be an object",AxiosError$1.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const o=r[s],i=t[o];if(i){const a=e[o],c=a===void 0||i(a,o,e);if(c!==!0)throw new AxiosError$1("option "+o+" must be "+c,AxiosError$1.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new AxiosError$1("Unknown option "+o,AxiosError$1.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;let Axios$1=class{constructor(t){this.defaults=t||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const o=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=`
`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=mergeConfig$1(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&validator.assertOptions(r,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),s!=null&&(utils$1.isFunction(s)?n.paramsSerializer={serialize:s}:validator.assertOptions(s,{encode:validators.function,serialize:validators.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),validator.assertOptions(n,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&utils$1.merge(o.common,o[n.method]);o&&utils$1.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),n.headers=AxiosHeaders$1.concat(i,o);const a=[];let c=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(c=c&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const l=[];this.interceptors.response.forEach(function(g){l.push(g.fulfilled,g.rejected)});let d,u=0,m;if(!c){const f=[dispatchRequest.bind(this),void 0];f.unshift(...a),f.push(...l),m=f.length,d=Promise.resolve(n);let g=n;for(;u<m;)d=d.then(f[u++]).then(h=>{g=h!==void 0?h:g}).catch(f[u++]).then(()=>g);return d}m=a.length;let E=n;for(;u<m;){const f=a[u++],g=a[u++];try{E=f(E)}catch(h){g.call(this,h);break}}try{d=dispatchRequest.call(this,E)}catch(f){return Promise.reject(f)}for(u=0,m=l.length;u<m;)d=d.then(l[u++]).catch(l[u++]);return d}getUri(t){t=mergeConfig$1(this.defaults,t);const n=buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls);return buildURL(n,t.params,t.paramsSerializer)}};utils$1.forEach(["delete","get","head","options"],function(t){Axios$1.prototype[t]=function(n,r){return this.request(mergeConfig$1(r||{},{method:t,url:n,data:(r||{}).data}))}});utils$1.forEach(["post","put","patch"],function(t){function n(r){return function(o,i,a){return this.request(mergeConfig$1(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:o,data:i}))}}Axios$1.prototype[t]=n(),Axios$1.prototype[t+"Form"]=n(!0)});let CancelToken$1=class z{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(o){n=o});const r=this;this.promise.then(s=>{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](s);r._listeners=null}),this.promise.then=s=>{let o;const i=new Promise(a=>{r.subscribe(a),o=a}).then(s);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,a){r.reason||(r.reason=new CanceledError$1(o,i,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new z(function(s){t=s}),cancel:t}}};function spread$1(e){return function(n){return e.apply(null,n)}}function isAxiosError$1(e){return utils$1.isObject(e)&&e.isAxiosError===!0}const HttpStatusCode$1={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(HttpStatusCode$1).forEach(([e,t])=>{HttpStatusCode$1[t]=e});function createInstance(e){const t=new Axios$1(e),n=bind(Axios$1.prototype.request,t);return utils$1.extend(n,Axios$1.prototype,t,{allOwnKeys:!0}),utils$1.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return createInstance(mergeConfig$1(e,s))},n}const axios=createInstance(defaults);axios.Axios=Axios$1;axios.CanceledError=CanceledError$1;axios.CancelToken=CancelToken$1;axios.isCancel=isCancel$1;axios.VERSION=VERSION$1;axios.toFormData=toFormData$1;axios.AxiosError=AxiosError$1;axios.Cancel=axios.CanceledError;axios.all=function(t){return Promise.all(t)};axios.spread=spread$1;axios.isAxiosError=isAxiosError$1;axios.mergeConfig=mergeConfig$1;axios.AxiosHeaders=AxiosHeaders$1;axios.formToJSON=e=>formDataToJSON(utils$1.isHTMLForm(e)?new FormData(e):e);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode$1;axios.default=axios;const{Axios,AxiosError,CanceledError,isCancel,CancelToken,VERSION,all,Cancel,isAxiosError,spread,toFormData,AxiosHeaders,HttpStatusCode,formToJSON,getAdapter,mergeConfig}=axios;window.axios=axios;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var 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.8"};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 e.slice(-2)=="ms"?t=parseFloat(e.slice(0,-2)):e.slice(-1)=="s"?t=parseFloat(e.slice(0,-1))*1e3:e.slice(-1)=="m"?t=parseFloat(e.slice(0,-1))*1e3*60:t=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){const 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){const r=getAttributeValue(t,n),s=getAttributeValue(t,"hx-disinherit");var o=getAttributeValue(t,"hx-inherit");if(e!==t){if(htmx.config.disableInheritance)return o&&(o==="*"||o.split(" ").indexOf(n)>=0)?r:null;if(s&&(s==="*"||s.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){const n=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i.exec(e);return n?n[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){const t=getDocument().createElement("script");return forEach(e.attributes,function(n){t.setAttribute(n.name,n.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")).forEach(t=>{if(isJavaScriptScriptNode(t)){const n=duplicateScript(t),r=t.parentNode;try{r.insertBefore(n,t)}catch(s){logError(s)}finally{t.remove()}}})}function makeFragment(e){const t=e.replace(/<head(\s[^>]*)?>[\s\S]*?<\/head>/i,""),n=getStartTag(t);let r;if(n==="html"){r=new DocumentFragment;const o=parseHTML(e);takeChildrenFor(r,o.body),r.title=o.title}else if(n==="body"){r=new DocumentFragment;const o=parseHTML(t);takeChildrenFor(r,o.body),r.title=o.title}else{const o=parseHTML('<body><template class="internal-htmx-wrapper">'+t+"</template></body>");r=o.querySelector("template").content,r.title=o.title;var s=r.querySelector("title");s&&s.parentNode===r&&(s.remove(),r.title=s.innerText)}return r&&(htmx.config.allowScriptTags?normalizeScriptTags(r):r.querySelectorAll("script").forEach(o=>o.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){const t="htmx-internal-data";let n=e[t];return n||(n=e[t]={}),n}function toArray(e){const 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){const 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(const n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function parseJSON(e){try{return JSON.parse(e)}catch(t){return logError(t),null}}function canAccessLocalStorage(){const e="htmx:sessionStorageTest";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch{return!1}}function normalizePath(e){const t=new URL(e,"http://x");return t&&(e=t.pathname+t.search),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(n){e(n.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"?e.querySelector(t):find(getDocument(),e)}function findAll(e,t){return typeof e!="string"?e.querySelectorAll(t):findAll(getDocument(),e)}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(n){removeClassFromElement(n,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){const 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);const r=[];{let i=0,a=0;for(let c=0;c<t.length;c++){const l=t[c];if(l===","&&i===0){r.push(t.substring(a,c)),a=c+1;continue}l==="<"?i++:l==="/"&&c<t.length-1&&t[c+1]===">"&&i--}a<t.length&&r.push(t.substring(a))}const s=[],o=[];for(;r.length>0;){const i=normalizeSelector(r.shift());let a;i.indexOf("closest ")===0?a=closest(asElement(e),normalizeSelector(i.slice(8))):i.indexOf("find ")===0?a=find(asParentNode(e),normalizeSelector(i.slice(5))):i==="next"||i==="nextElementSibling"?a=asElement(e).nextElementSibling:i.indexOf("next ")===0?a=scanForwardQuery(e,normalizeSelector(i.slice(5)),!!n):i==="previous"||i==="previousElementSibling"?a=asElement(e).previousElementSibling:i.indexOf("previous ")===0?a=scanBackwardsQuery(e,normalizeSelector(i.slice(9)),!!n):i==="document"?a=document:i==="window"?a=window:i==="body"?a=document.body:i==="root"?a=getRootNode(e,!!n):i==="host"?a=e.getRootNode().host:o.push(i),a&&s.push(a)}if(o.length>0){const i=o.join(","),a=asParentNode(getRootNode(e,!!n));s.push(...toArray(a.querySelectorAll(i)))}return s}var scanForwardQuery=function(e,t,n){const r=asParentNode(getRootNode(e,n)).querySelectorAll(t);for(let s=0;s<r.length;s++){const o=r[s];if(o.compareDocumentPosition(e)===Node.DOCUMENT_POSITION_PRECEDING)return o}},scanBackwardsQuery=function(e,t,n){const r=asParentNode(getRootNode(e,n)).querySelectorAll(t);for(let s=r.length-1;s>=0;s--){const o=r[s];if(o.compareDocumentPosition(e)===Node.DOCUMENT_POSITION_FOLLOWING)return o}};function querySelectorExt(e,t){return typeof e!="string"?querySelectorAllExt(e,t)[0]:querySelectorAllExt(getDocument().body,e)[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(){const o=processEventArgs(e,t,n,r);o.target.addEventListener(o.event,o.listener,o.options)}),isFunction(t)?t:n}function removeEventListenerImpl(e,t,n){return ready(function(){const 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){const n=getClosestAttributeValue(e,t);if(n){if(n==="this")return[findThisElement(e,t)];{const r=querySelectorAllExt(e,n);if(/(^|,)(\s*)inherit(\s*)($|,)/.test(n)){const o=asElement(getClosestMatch(e,function(i){return i!==e&&hasAttribute(asElement(i),t)}));o&&r.push(...findAttributeTargets(o,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(n){return getAttributeValue(asElement(n),t)!=null}))}function getTarget(e){const 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)}),forEach(t.attributes,function(n){shouldSettleAttribute(n.name)&&e.setAttribute(n.name,n.value)})}function isInlineSwap(e,t){const n=getExtensions(t);for(let r=0;r<n.length;r++){const s=n[r];try{if(s.isInlineSwap(e))return!0}catch(o){logError(o)}}return e==="outerHTML"}function oobSwap(e,t,n,r){r=r||getDocument();let s="#"+CSS.escape(getRawAttribute(t,"id")),o="outerHTML";e==="true"||(e.indexOf(":")>0?(o=e.substring(0,e.indexOf(":")),s=e.substring(e.indexOf(":")+1)):o=e),t.removeAttribute("hx-swap-oob"),t.removeAttribute("data-hx-swap-oob");const i=querySelectorAllExt(r,s,!1);return i.length?(forEach(i,function(a){let c;const l=t.cloneNode(!0);c=getDocument().createDocumentFragment(),c.appendChild(l),isInlineSwap(o,a)||(c=asParentNode(l));const d={shouldSwap:!0,target:a,fragment:c};triggerEvent(a,"htmx:oobBeforeSwap",d)&&(a=d.target,d.shouldSwap&&(handlePreservedElements(c),swapWithStyle(o,a,a,c,n),restorePreservedElements()),forEach(n.elts,function(u){triggerEvent(u,"htmx:oobAfterSwap",d)}))}),t.parentNode.removeChild(t)):(t.parentNode.removeChild(t),triggerErrorEvent(getDocument().body,"htmx:oobErrorNoTarget",{content:t})),e}function restorePreservedElements(){const e=find("#--htmx-preserve-pantry--");if(e){for(const t of[...e.children]){const n=find("#"+t.id);n.parentNode.moveBefore(t,n),n.remove()}e.remove()}}function handlePreservedElements(e){forEach(findAll(e,"[hx-preserve], [data-hx-preserve]"),function(t){const n=getAttributeValue(t,"id"),r=getDocument().getElementById(n);if(r!=null)if(t.moveBefore){let s=find("#--htmx-preserve-pantry--");s==null&&(getDocument().body.insertAdjacentHTML("afterend","<div id='--htmx-preserve-pantry--'></div>"),s=find("#--htmx-preserve-pantry--")),s.moveBefore(r,null)}else t.parentNode.replaceChild(r,t)})}function handleAttributes(e,t,n){forEach(t.querySelectorAll("[id]"),function(r){const s=getRawAttribute(r,"id");if(s&&s.length>0){const o=s.replace("'","\\'"),i=r.tagName.replace(":","\\:"),a=asParentNode(e),c=a&&a.querySelector(i+"[id='"+o+"']");if(c&&c!==a){const l=r.cloneNode();cloneAttributes(r,c),n.tasks.push(function(){cloneAttributes(r,l)})}}})}function makeAjaxLoadTask(e){return function(){removeClassFromElement(e,htmx.config.addedClass),processNode(asElement(e)),processFocus(asParentNode(e)),triggerEvent(e,"htmx:load")}}function processFocus(e){const t="[autofocus]",n=asHtmlElement(matches(e,t)?e:e.querySelector(t));n?.focus()}function insertNodesBefore(e,t,n,r){for(handleAttributes(e,n,r);n.childNodes.length>0;){const s=n.firstChild;addClassToElement(asElement(s),htmx.config.addedClass),e.insertBefore(s,t),s.nodeType!==Node.TEXT_NODE&&s.nodeType!==Node.COMMENT_NODE&&r.tasks.push(makeAjaxLoadTask(s))}}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++){const r=e.attributes[n];r.value&&(t=stringHash(r.name,t),t=stringHash(r.value,t))}return t}function deInitOnHandlers(e){const t=getInternalData(e);if(t.onHandlers){for(let n=0;n<t.onHandlers.length;n++){const r=t.onHandlers[n];removeEventListenerImpl(e,r.event,r.listener)}delete t.onHandlers}}function deInitNode(e){const t=getInternalData(e);t.timeout&&clearTimeout(t.timeout),t.listenerInfos&&forEach(t.listenerInfos,function(n){n.on&&removeEventListenerImpl(n.on,n.trigger,n.listener)}),deInitOnHandlers(e),forEach(Object.keys(t),function(n){n!=="firstInitCompleted"&&delete t[n]})}function cleanUpElement(e){triggerEvent(e,"htmx:beforeCleanupElement"),deInitNode(e),forEach(e.children,function(t){cleanUpElement(t)})}function swapOuterHTML(e,t,n){if(e.tagName==="BODY")return swapInnerHTML(e,t,n);let r;const s=e.previousSibling,o=parentElt(e);if(o){for(insertNodesBefore(o,e,t,n),s==null?r=o.firstChild:r=s.nextSibling,n.elts=n.elts.filter(function(i){return i!==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)}function swapAfterEnd(e,t,n){return insertNodesBefore(parentElt(e),e.nextSibling,t,n)}function swapDelete(e){cleanUpElement(e);const t=parentElt(e);if(t)return t.removeChild(e)}function swapInnerHTML(e,t,n){const 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,s){switch(e){case"none":return;case"outerHTML":swapOuterHTML(n,r,s);return;case"afterbegin":swapAfterBegin(n,r,s);return;case"beforebegin":swapBeforeBegin(n,r,s);return;case"beforeend":swapBeforeEnd(n,r,s);return;case"afterend":swapAfterEnd(n,r,s);return;case"delete":swapDelete(n);return;default:var o=getExtensions(t);for(let i=0;i<o.length;i++){const a=o[i];try{const c=a.handleSwap(e,n,r,s);if(c){if(Array.isArray(c))for(let l=0;l<c.length;l++){const d=c[l];d.nodeType!==Node.TEXT_NODE&&d.nodeType!==Node.COMMENT_NODE&&s.tasks.push(makeAjaxLoadTask(d))}return}}catch(c){logError(c)}}e==="innerHTML"?swapInnerHTML(n,r,s):swapWithStyle(htmx.config.defaultSwapStyle,t,n,r,s)}}function findAndSwapOobElements(e,t,n){var r=findAll(e,"[hx-swap-oob], [data-hx-swap-oob]");return forEach(r,function(s){if(htmx.config.allowNestedOobSwaps||s.parentElement===null){const o=getAttributeValue(s,"hx-swap-oob");o!=null&&oobSwap(o,s,t,n)}else s.removeAttribute("hx-swap-oob"),s.removeAttribute("data-hx-swap-oob")}),r.length>0}function swap(e,t,n,r){r||(r={});let s=null,o=null,i=function(){maybeCall(r.beforeSwapCallback),e=resolveTarget(e);const l=r.contextElement?getRootNode(r.contextElement,!1):getDocument(),d=document.activeElement;let u={};u={elt:d,start:d?d.selectionStart:null,end:d?d.selectionEnd:null};const m=makeSettleInfo(e);if(n.swapStyle==="textContent")e.textContent=t;else{let f=makeFragment(t);if(m.title=r.title||f.title,r.historyRequest&&(f=f.querySelector("[hx-history-elt],[data-hx-history-elt]")||f),r.selectOOB){const g=r.selectOOB.split(",");for(let h=0;h<g.length;h++){const b=g[h].split(":",2);let x=b[0].trim();x.indexOf("#")===0&&(x=x.substring(1));const p=b[1]||"true",y=f.querySelector("#"+x);y&&oobSwap(p,y,m,l)}}if(findAndSwapOobElements(f,m,l),forEach(findAll(f,"template"),function(g){g.content&&findAndSwapOobElements(g.content,m,l)&&g.remove()}),r.select){const g=getDocument().createDocumentFragment();forEach(f.querySelectorAll(r.select),function(h){g.appendChild(h)}),f=g}handlePreservedElements(f),swapWithStyle(n.swapStyle,r.contextElement,e,f,m),restorePreservedElements()}if(u.elt&&!bodyContains(u.elt)&&getRawAttribute(u.elt,"id")){const f=document.getElementById(getRawAttribute(u.elt,"id")),g={preventScroll:n.focusScroll!==void 0?!n.focusScroll:!htmx.config.defaultFocusScroll};if(f){if(u.start&&f.setSelectionRange)try{f.setSelectionRange(u.start,u.end)}catch{}f.focus(g)}}e.classList.remove(htmx.config.swappingClass),forEach(m.elts,function(f){f.classList&&f.classList.add(htmx.config.settlingClass),triggerEvent(f,"htmx:afterSwap",r.eventInfo)}),maybeCall(r.afterSwapCallback),n.ignoreTitle||handleTitle(m.title);const E=function(){if(forEach(m.tasks,function(f){f.call()}),forEach(m.elts,function(f){f.classList&&f.classList.remove(htmx.config.settlingClass),triggerEvent(f,"htmx:afterSettle",r.eventInfo)}),r.anchor){const f=asElement(resolveTarget("#"+r.anchor));f&&f.scrollIntoView({block:"start",behavior:"auto"})}updateScrollState(m.elts,n),maybeCall(r.afterSettleCallback),maybeCall(s)};n.settleDelay>0?getWindow().setTimeout(E,n.settleDelay):E()},a=htmx.config.globalViewTransitions;n.hasOwnProperty("transition")&&(a=n.transition);const c=r.contextElement||getDocument();if(a&&triggerEvent(c,"htmx:beforeTransition",r.eventInfo)&&typeof Promise<"u"&&document.startViewTransition){const l=new Promise(function(u,m){s=u,o=m}),d=i;i=function(){document.startViewTransition(function(){return d(),l})}}try{n?.swapDelay&&n.swapDelay>0?getWindow().setTimeout(i,n.swapDelay):i()}catch(l){throw triggerErrorEvent(c,"htmx:swapError",r.eventInfo),maybeCall(o),l}}function handleTriggerHeader(e,t,n){const r=e.getResponseHeader(t);if(r.indexOf("{")===0){const s=parseJSON(r);for(const o in s)if(s.hasOwnProperty(o)){let i=s[o];isRawObject(i)?n=i.target!==void 0?i.target:n:i={value:i},triggerEvent(n,o,i)}}else{const s=r.split(",");for(let o=0;o<s.length;o++)triggerEvent(n,s[o].trim(),[])}}const 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){const t=[];let 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){const s=e.charAt(n);var r=n;for(n++;n<e.length&&e.charAt(n)!==s;)e.charAt(n)==="\\"&&n++,n++;t.push(e.substring(r,n+1))}else{const s=e.charAt(n);t.push(s)}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,s=" return (function("+n+"){ return (",o=null;for(;t.length>0;){const i=t[0];if(i==="]"){if(r--,r===0){o===null&&(s=s+"true"),t.shift(),s+=")})";try{const a=maybeEval(e,function(){return Function(s)()},function(){return!0});return a.source=s,a}catch(a){return triggerErrorEvent(getDocument().body,"htmx:syntax:error",{error:a,source:s}),null}}}else i==="["&&r++;isPossibleRelativeReference(i,o,n)?s+="(("+n+"."+i+") ? ("+n+"."+i+") : (window."+i+"))":s=s+i,o=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){const r=[],s=tokenizeString(t);do{consumeUntil(s,NOT_WHITESPACE);const a=s.length,c=consumeUntil(s,/[,\[\s]/);if(c!=="")if(c==="every"){const l={trigger:"every"};consumeUntil(s,NOT_WHITESPACE),l.pollInterval=parseInterval(consumeUntil(s,/[,\[\s]/)),consumeUntil(s,NOT_WHITESPACE);var o=maybeGenerateConditional(e,s,"event");o&&(l.eventFilter=o),r.push(l)}else{const l={trigger:c};var o=maybeGenerateConditional(e,s,"event");for(o&&(l.eventFilter=o),consumeUntil(s,NOT_WHITESPACE);s.length>0&&s[0]!==",";){const u=s.shift();if(u==="changed")l.changed=!0;else if(u==="once")l.once=!0;else if(u==="consume")l.consume=!0;else if(u==="delay"&&s[0]===":")s.shift(),l.delay=parseInterval(consumeUntil(s,WHITESPACE_OR_COMMA));else if(u==="from"&&s[0]===":"){if(s.shift(),COMBINED_SELECTOR_START.test(s[0]))var i=consumeCSSSelector(s);else{var i=consumeUntil(s,WHITESPACE_OR_COMMA);if(i==="closest"||i==="find"||i==="next"||i==="previous"){s.shift();const E=consumeCSSSelector(s);E.length>0&&(i+=" "+E)}}l.from=i}else u==="target"&&s[0]===":"?(s.shift(),l.target=consumeCSSSelector(s)):u==="throttle"&&s[0]===":"?(s.shift(),l.throttle=parseInterval(consumeUntil(s,WHITESPACE_OR_COMMA))):u==="queue"&&s[0]===":"?(s.shift(),l.queue=consumeUntil(s,WHITESPACE_OR_COMMA)):u==="root"&&s[0]===":"?(s.shift(),l[u]=consumeCSSSelector(s)):u==="threshold"&&s[0]===":"?(s.shift(),l[u]=consumeUntil(s,WHITESPACE_OR_COMMA)):triggerErrorEvent(e,"htmx:syntax:error",{token:s.shift()});consumeUntil(s,NOT_WHITESPACE)}r.push(l)}s.length===a&&triggerErrorEvent(e,"htmx:syntax:error",{token:s.shift()}),consumeUntil(s,NOT_WHITESPACE)}while(s[0]===","&&s.shift());return n&&(n[t]=r),r}function getTriggerSpecs(e){const t=getAttributeValue(e,"hx-trigger");let n=[];if(t){const 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){const 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,s;if(e.tagName==="A")r="get",s=getRawAttribute(e,"href");else{const o=getRawAttribute(e,"method");r=o?o.toLowerCase():"get",s=getRawAttribute(e,"action"),(s==null||s==="")&&(s=location.href),r==="get"&&s.includes("?")&&(s=s.replace(/\?[^#]+/,""))}n.forEach(function(o){addEventListener(e,function(i,a){const c=asElement(i);if(eltIsDisabled(c)){cleanUpElement(c);return}issueAjaxRequest(r,s,c,a)},t,o,!0)})}}function shouldCancel(e,t){if(e.type==="submit"&&t.tagName==="FORM")return!0;if(e.type==="click"){const n=t.closest('input[type="submit"], button');if(n&&n.form&&n.type==="submit")return!0;const r=t.closest("a"),s=/^#.+/;if(r&&r.href&&!s.test(r.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){const r=e.eventFilter;if(r)try{return r.call(t,n)!==!0}catch(s){const o=r.source;return triggerErrorEvent(getDocument().body,"htmx:eventFilter:error",{error:s,source:o}),!0}return!1}function addEventListener(e,t,n,r,s){const o=getInternalData(e);let i;r.from?i=querySelectorAllExt(e,r.from):i=[e],r.changed&&("lastValue"in o||(o.lastValue=new WeakMap),i.forEach(function(a){o.lastValue.has(r)||o.lastValue.set(r,new WeakMap),o.lastValue.get(r).set(a,a.value)})),forEach(i,function(a){const c=function(l){if(!bodyContains(e)){a.removeEventListener(r.trigger,c);return}if(ignoreBoostedAnchorCtrlClick(e,l)||((s||shouldCancel(l,a))&&l.preventDefault(),maybeFilterEvent(r,e,l)))return;const d=getInternalData(l);if(d.triggerSpec=r,d.handledFor==null&&(d.handledFor=[]),d.handledFor.indexOf(e)<0){if(d.handledFor.push(e),r.consume&&l.stopPropagation(),r.target&&l.target&&!matches(asElement(l.target),r.target))return;if(r.once){if(o.triggeredOnce)return;o.triggeredOnce=!0}if(r.changed){const u=l.target,m=u.value,E=o.lastValue.get(r);if(E.has(u)&&E.get(u)===m)return;E.set(u,m)}if(o.delayed&&clearTimeout(o.delayed),o.throttle)return;r.throttle>0?o.throttle||(triggerEvent(e,"htmx:trigger"),t(e,l),o.throttle=getWindow().setTimeout(function(){o.throttle=null},r.throttle)):r.delay>0?o.delayed=getWindow().setTimeout(function(){triggerEvent(e,"htmx:trigger"),t(e,l)},r.delay):(triggerEvent(e,"htmx:trigger"),t(e,l))}};n.listenerInfos==null&&(n.listenerInfos=[]),n.listenerInfos.push({trigger:r.trigger,listener:c,on:a}),a.addEventListener(r.trigger,c)})}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){const s=function(){n.loaded||(n.loaded=!0,triggerEvent(e,"htmx:trigger"),t(e))};r>0?getWindow().setTimeout(s,r):s()}function processVerbs(e,t,n){let r=!1;return forEach(VERBS,function(s){if(hasAttribute(e,"hx-"+s)){const o=getAttributeValue(e,"hx-"+s);r=!0,t.path=o,t.verb=s,n.forEach(function(i){addTriggerHandler(e,i,t,function(a,c){const l=asElement(a);if(eltIsDisabled(l)){cleanUpElement(l);return}issueAjaxRequest(s,o,l,c)})})}}),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"){const s={};t.root&&(s.root=querySelectorExt(e,t.root)),t.threshold&&(s.threshold=parseFloat(t.threshold)),new IntersectionObserver(function(i){for(let a=0;a<i.length;a++)if(i[a].isIntersecting){triggerEvent(e,"intersect");break}},s).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){const t=asElement(e);if(!t)return!1;const n=t.attributes;for(let r=0;r<n.length;r++){const s=n[r].name;if(startsWith(s,"hx-on:")||startsWith(s,"data-hx-on:")||startsWith(s,"hx-on-")||startsWith(s,"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));const n=HX_ON_QUERY.evaluate(e);let r=null;for(;r=n.iterateNext();)t.push(asElement(r))}function findHxOnWildcardElements(e){const t=[];if(e instanceof DocumentFragment)for(const n of e.childNodes)processHXOnRoot(n,t);else processHXOnRoot(e,t);return t}function findElementsToProcess(e){if(e.querySelectorAll){const n=", [hx-boost] a, [data-hx-boost] a, a[hx-boost], a[data-hx-boost]",r=[];for(const o in extensions){const i=extensions[o];if(i.getSelectors){var t=i.getSelectors();t&&r.push(t)}}return e.querySelectorAll(VERB_SELECTOR+n+", form, [type='submit'], [hx-ext], [data-hx-ext], [hx-trigger], [data-hx-trigger]"+r.flat().map(o=>", "+o).join(""))}else return[]}function maybeSetLastButtonClicked(e){const t=getTargetButton(e.target),n=getRelatedFormData(e);n&&(n.lastButtonClicked=t)}function maybeUnsetLastButtonClicked(e){const 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){const t=getTargetButton(e.target);if(!t)return;const 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){const r=getInternalData(e);Array.isArray(r.onHandlers)||(r.onHandlers=[]);let s;const o=function(i){maybeEval(e,function(){eltIsDisabled(e)||(s||(s=new Function("event",n)),s.call(e,i))})};e.addEventListener(t,o),r.onHandlers.push({event:t,listener:o})}function processHxOnWildcard(e){deInitOnHandlers(e);for(let t=0;t<e.attributes.length;t++){const n=e.attributes[t].name,r=e.attributes[t].value;if(startsWith(n,"hx-on")||startsWith(n,"data-hx-on")){const s=n.indexOf("-on")+3,o=n.slice(s,s+1);if(o==="-"||o===":"){let i=n.slice(s+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");const 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(s){addTriggerHandler(e,s,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;const t=getInternalData(e),n=attributeHash(e);return t.initHash!==n?(deInitNode(e),t.initHash=n,!0):!1}function processNode(e){if(e=resolveTarget(e),eltIsDisabled(e)){cleanUpElement(e);return}const t=[];maybeDeInitAndHash(e)&&t.push(e),forEach(findElementsToProcess(e),function(n){if(eltIsDisabled(n)){cleanUpElement(n);return}maybeDeInitAndHash(n)&&t.push(n)}),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(r){try{t(r)}catch(s){logError(s)}})}function logError(e){console.error(e)}function triggerEvent(e,t,n){e=resolveTarget(e),n==null&&(n={}),n.elt=e;const r=makeEvent(t,n);htmx.logger&&!ignoreEventForLogging(t)&&htmx.logger(e,t,n),n.error&&(logError(n.error),triggerEvent(e,"htmx:error",{errorInfo:n}));let s=e.dispatchEvent(r);const o=kebabEventName(t);if(s&&o!==t){const i=makeEvent(o,r.detail);s=s&&e.dispatchEvent(i)}return withExtensions(asElement(e),function(i){s=s&&i.onEvent(t,r)!==!1&&!r.defaultPrevented}),s}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;const n=cleanInnerHtmlForHistory(t),r=getDocument().title,s=window.scrollY;if(htmx.config.historyCacheSize<=0){sessionStorage.removeItem("htmx-history-cache");return}e=normalizePath(e);const o=parseJSON(sessionStorage.getItem("htmx-history-cache"))||[];for(let a=0;a<o.length;a++)if(o[a].url===e){o.splice(a,1);break}const i={url:e,content:n,title:r,scroll:s};for(triggerEvent(getDocument().body,"htmx:historyItemCreated",{item:i,cache:o}),o.push(i);o.length>htmx.config.historyCacheSize;)o.shift();for(;o.length>0;)try{sessionStorage.setItem("htmx-history-cache",JSON.stringify(o));break}catch(a){triggerErrorEvent(getDocument().body,"htmx:historyCacheError",{cause:a,cache:o}),o.shift()}}function getCachedHistory(e){if(!canAccessLocalStorage())return null;e=normalizePath(e);const 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){const t=htmx.config.requestClass,n=e.cloneNode(!0);return forEach(findAll(n,"."+t),function(r){removeClassFromElement(r,t)}),forEach(findAll(n,"[data-disabled-by-htmx]"),function(r){r.removeAttribute("disabled")}),n.innerHTML}function saveCurrentPageToHistory(){const e=getHistoryElement();let t=currentPathForHistory;canAccessLocalStorage()&&(t=sessionStorage.getItem("htmx-current-path-for-history")),t=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(t){t.call(void 0)})}function loadHistoryFromServer(e){const 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=e||location.pathname+location.search;const t=getCachedHistory(e);if(t){const 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==null&&(t=[e]),forEach(t,function(n){const r=getInternalData(n);r.requestCount=(r.requestCount||0)+1,n.classList.add.call(n.classList,htmx.config.requestClass)}),t}function disableElements(e){let t=findAttributeTargets(e,"hx-disabled-elt");return t==null&&(t=[]),forEach(t,function(n){const r=getInternalData(n);r.requestCount=(r.requestCount||0)+1,n.setAttribute("disabled",""),n.setAttribute("data-disabled-by-htmx","")}),t}function removeRequestIndicators(e,t){forEach(e.concat(t),function(n){const r=getInternalData(n);r.requestCount=(r.requestCount||1)-1}),forEach(e,function(n){getInternalData(n).requestCount===0&&n.classList.remove.call(n.classList,htmx.config.requestClass)}),forEach(t,function(n){getInternalData(n).requestCount===0&&(n.removeAttribute("disabled"),n.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){const 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(r){n.append(e,r)}):n.append(e,t))}function removeValueFromFormData(e,t,n){if(e!=null&&t!=null){let r=n.getAll(e);Array.isArray(t)?r=r.filter(s=>t.indexOf(s)<0):r=r.filter(s=>s!==t),n.delete(e),forEach(r,s=>n.append(e,s))}}function getValueFromInput(e){return e instanceof HTMLSelectElement&&e.multiple?toArray(e.querySelectorAll("option:checked")).map(function(t){return t.value}):e instanceof HTMLInputElement&&e.files?toArray(e.files):e.value}function processInputValue(e,t,n,r,s){if(!(r==null||haveSeenNode(e,r))){if(e.push(r),shouldInclude(r)){const o=getRawAttribute(r,"name");addValueToFormData(o,getValueFromInput(r),t),s&&validateElement(r,n)}r instanceof HTMLFormElement&&(forEach(r.elements,function(o){e.indexOf(o)>=0?removeValueFromFormData(o.name,getValueFromInput(o),t):e.push(o),s&&validateElement(o,n)}),new FormData(r).forEach(function(o,i){o instanceof File&&o.name===""||addValueToFormData(i,o,t)}))}}function validateElement(e,t){const 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(const n of t.keys())e.delete(n);return t.forEach(function(n,r){e.append(r,n)}),e}function getInputValues(e,t){const n=[],r=new FormData,s=new FormData,o=[],i=getInternalData(e);i.lastButtonClicked&&!bodyContains(i.lastButtonClicked)&&(i.lastButtonClicked=null);let a=e instanceof HTMLFormElement&&e.noValidate!==!0||getAttributeValue(e,"hx-validate")==="true";if(i.lastButtonClicked&&(a=a&&i.lastButtonClicked.formNoValidate!==!0),t!=="get"&&processInputValue(n,s,o,getRelatedForm(e),a),processInputValue(n,r,o,e,a),i.lastButtonClicked||e.tagName==="BUTTON"||e.tagName==="INPUT"&&getRawAttribute(e,"type")==="submit"){const l=i.lastButtonClicked||e,d=getRawAttribute(l,"name");addValueToFormData(d,l.value,s)}const c=findAttributeTargets(e,"hx-include");return forEach(c,function(l){processInputValue(n,r,o,asElement(l),a),matches(l,"form")||forEach(asParentNode(l).querySelectorAll(INPUT_SELECTOR),function(d){processInputValue(n,r,o,d,a)})}),overrideFormData(r,s),{errors:o,formData:r,values:formDataProxy(r)}}function appendParam(e,t,n){e!==""&&(e+="&"),String(n)==="[object Object]"&&(n=JSON.stringify(n));const r=encodeURIComponent(n);return e+=encodeURIComponent(t)+"="+r,e}function urlEncode(e){e=formDataFromObject(e);let t="";return e.forEach(function(n,r){t=appendParam(t,r,n)}),t}function getHeaders(e,t,n){const 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){const 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(r){r=r.trim(),e.delete(r)}),e;{const r=new FormData;return forEach(n.split(","),function(s){s=s.trim(),e.has(s)&&e.getAll(s).forEach(function(o){r.append(s,o)})}),r}}else return e}function isAnchorLink(e){return!!getRawAttribute(e,"href")&&getRawAttribute(e,"href").indexOf("#")>=0}function getSwapSpecification(e,t){const 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){const i=splitOnWhitespace(n);if(i.length>0)for(let a=0;a<i.length;a++){const c=i[a];if(c.indexOf("swap:")===0)r.swapDelay=parseInterval(c.slice(5));else if(c.indexOf("settle:")===0)r.settleDelay=parseInterval(c.slice(7));else if(c.indexOf("transition:")===0)r.transition=c.slice(11)==="true";else if(c.indexOf("ignoreTitle:")===0)r.ignoreTitle=c.slice(12)==="true";else if(c.indexOf("scroll:")===0){var s=c.slice(7).split(":");const d=s.pop();var o=s.length>0?s.join(":"):null;r.scroll=d,r.scrollTarget=o}else if(c.indexOf("show:")===0){var s=c.slice(5).split(":");const u=s.pop();var o=s.length>0?s.join(":"):null;r.show=u,r.showTarget=o}else if(c.indexOf("focus-scroll:")===0){const l=c.slice(13);r.focusScroll=l=="true"}else a==0?r.swapStyle=c:logError("Unknown modifier in hx-swap: "+c)}}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(s){r==null&&(r=s.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){const n=e[0],r=e[e.length-1];if(t.scroll){var s=null;t.scrollTarget&&(s=asElement(querySelectorExt(n,t.scrollTarget))),t.scroll==="top"&&(n||s)&&(s=s||n,s.scrollTop=0),t.scroll==="bottom"&&(r||s)&&(s=s||r,s.scrollTop=s.scrollHeight),typeof t.scroll=="number"&&getWindow().setTimeout(function(){window.scrollTo(0,t.scroll)},0)}if(t.show){var s=null;if(t.showTarget){let i=t.showTarget;t.showTarget==="window"&&(i="body"),s=asElement(querySelectorExt(n,i))}t.show==="top"&&(n||s)&&(s=s||n,s.scrollIntoView({block:"start",behavior:htmx.config.scrollBehavior})),t.show==="bottom"&&(r||s)&&(s=s||r,s.scrollIntoView({block:"end",behavior:htmx.config.scrollBehavior}))}}function getValuesForElement(e,t,n,r,s){if(r==null&&(r={}),e==null)return r;const o=getAttributeValue(e,t);if(o){let i=o.trim(),a=n;if(i==="unset")return null;i.indexOf("javascript:")===0?(i=i.slice(11),a=!0):i.indexOf("js:")===0&&(i=i.slice(3),a=!0),i.indexOf("{")!==0&&(i="{"+i+"}");let c;a?c=maybeEval(e,function(){return s?Function("event","return ("+i+")").call(e,s):Function("return ("+i+")").call(e)},{}):c=parseJSON(i);for(const l in c)c.hasOwnProperty(l)&&r[l]==null&&(r[l]=c[l])}return getValuesForElement(asElement(parentElt(e)),t,n,r,s)}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{const 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,swapOverride:n.swap,select:n.select,returnPromise:!0,push:n.push,replace:n.replace,selectOOB:n.selectOOB})}}else return issueAjaxRequest(e,t,null,null,{returnPromise:!0})}function hierarchyForElt(e){const t=[];for(;e;)t.push(e),e=e.parentElement;return t}function verifyPath(e,t,n){const r=new URL(t,location.protocol!=="about:"?location.href:window.origin),o=(location.protocol!=="about:"?location.origin:window.origin)===r.origin;return htmx.config.selfRequestsOnly&&!o?!1:triggerEvent(e,"htmx:validateUrl",mergeObjects({url:r,sameHost:o},n))}function formDataFromObject(e){if(e instanceof FormData)return e;const t=new FormData;for(const n in e)e.hasOwnProperty(n)&&(e[n]&&typeof e[n].forEach=="function"?e[n].forEach(function(r){t.append(n,r)}):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(r,s){return typeof s=="number"?r[s]:s==="length"?r.length:s==="push"?function(o){r.push(o),e.append(t,o)}:typeof r[s]=="function"?function(){r[s].apply(r,arguments),e.delete(t),r.forEach(function(o){e.append(t,o)})}:r[s]&&r[s].length===1?r[s][0]:r[s]},set:function(r,s,o){return r[s]=o,e.delete(t),r.forEach(function(i){e.append(t,i)}),!0}})}function formDataProxy(e){return new Proxy(e,{get:function(t,n){if(typeof n=="symbol"){const s=Reflect.get(t,n);return typeof s=="function"?function(){return s.apply(e,arguments)}:s}if(n==="toJSON")return()=>Object.fromEntries(e);if(n in t&&typeof t[n]=="function")return function(){return e[n].apply(e,arguments)};const r=e.getAll(n);if(r.length!==0)return r.length===1?r[0]:formDataArrayProxy(t,n,r)},set:function(t,n,r){return typeof n!="string"?!1:(t.delete(n),r&&typeof r.forEach=="function"?r.forEach(function(s){t.append(n,s)}):typeof r=="object"&&!(r instanceof Blob)?t.append(n,JSON.stringify(r)):t.append(n,r),!0)},deleteProperty:function(t,n){return typeof n=="string"&&t.delete(n),!0},ownKeys:function(t){return Reflect.ownKeys(Object.fromEntries(t))},getOwnPropertyDescriptor:function(t,n){return Reflect.getOwnPropertyDescriptor(Object.fromEntries(t),n)}})}function issueAjaxRequest(e,t,n,r,s,o){let i=null,a=null;if(s=s??{},s.returnPromise&&typeof Promise<"u")var c=new Promise(function(w,T){i=w,a=T});n==null&&(n=getDocument().body);const l=s.handler||handleAjaxResponse,d=s.select||null;if(!bodyContains(n))return maybeCall(i),c;const u=s.targetOverride||asElement(getTarget(n));if(u==null||u==DUMMY_ELT)return triggerErrorEvent(n,"htmx:targetError",{target:getClosestAttributeValue(n,"hx-target")}),maybeCall(a),c;let m=getInternalData(n);const E=m.lastButtonClicked;if(E){const w=getRawAttribute(E,"formaction");w!=null&&(t=w);const T=getRawAttribute(E,"formmethod");if(T!=null)if(VERBS.includes(T.toLowerCase()))e=T;else return maybeCall(i),c}const f=getClosestAttributeValue(n,"hx-confirm");if(o===void 0&&triggerEvent(n,"htmx:confirm",{target:u,elt:n,path:t,verb:e,triggeringEvent:r,etc:s,issueRequest:function(q){return issueAjaxRequest(e,t,n,r,s,!!q)},question:f})===!1)return maybeCall(i),c;let g=n,h=getClosestAttributeValue(n,"hx-sync"),b=null,x=!1;if(h){const w=h.split(":"),T=w[0].trim();if(T==="this"?g=findThisElement(n,"hx-sync"):g=asElement(querySelectorExt(n,T)),h=(w[1]||"drop").trim(),m=getInternalData(g),h==="drop"&&m.xhr&&m.abortable!==!0)return maybeCall(i),c;if(h==="abort"){if(m.xhr)return maybeCall(i),c;x=!0}else h==="replace"?triggerEvent(g,"htmx:abort"):h.indexOf("queue")===0&&(b=(h.split(" ")[1]||"last").trim())}if(m.xhr)if(m.abortable)triggerEvent(g,"htmx:abort");else{if(b==null){if(r){const w=getInternalData(r);w&&w.triggerSpec&&w.triggerSpec.queue&&(b=w.triggerSpec.queue)}b==null&&(b="last")}return m.queuedRequests==null&&(m.queuedRequests=[]),b==="first"&&m.queuedRequests.length===0?m.queuedRequests.push(function(){issueAjaxRequest(e,t,n,r,s)}):b==="all"?m.queuedRequests.push(function(){issueAjaxRequest(e,t,n,r,s)}):b==="last"&&(m.queuedRequests=[],m.queuedRequests.push(function(){issueAjaxRequest(e,t,n,r,s)})),maybeCall(i),c}const p=new XMLHttpRequest;m.xhr=p,m.abortable=x;const y=function(){m.xhr=null,m.abortable=!1,m.queuedRequests!=null&&m.queuedRequests.length>0&&m.queuedRequests.shift()()},$=getClosestAttributeValue(n,"hx-prompt");if($){var I=prompt($);if(I===null||!triggerEvent(n,"htmx:prompt",{prompt:I,target:u}))return maybeCall(i),y(),c}if(f&&!o&&!confirm(f))return maybeCall(i),y(),c;let A=getHeaders(n,u,I);e!=="get"&&!usesFormData(n)&&(A["Content-Type"]="application/x-www-form-urlencoded"),s.headers&&(A=mergeObjects(A,s.headers));const C=getInputValues(n,e);let v=C.errors;const P=C.formData;s.values&&overrideFormData(P,formDataFromObject(s.values));const N=formDataFromObject(getExpressionVars(n,r)),H=overrideFormData(P,N);let S=filterValues(H,n);htmx.config.getCacheBusterParam&&e==="get"&&S.set("org.htmx.cache-buster",getRawAttribute(u,"id")||"true"),(t==null||t==="")&&(t=location.href);const D=getValuesForElement(n,"hx-request"),B=getInternalData(n).boosted;let F=htmx.config.methodsThatUseUrlParams.indexOf(e)>=0;const L={boosted:B,useUrlParams:F,formData:S,parameters:formDataProxy(S),unfilteredFormData:H,unfilteredParameters:formDataProxy(H),headers:A,elt:n,target:u,verb:e,errors:v,withCredentials:s.credentials||D.credentials||htmx.config.withCredentials,timeout:s.timeout||D.timeout||htmx.config.timeout,path:t,triggeringEvent:r};if(!triggerEvent(n,"htmx:configRequest",L))return maybeCall(i),y(),c;if(t=L.path,e=L.verb,A=L.headers,S=formDataFromObject(L.parameters),v=L.errors,F=L.useUrlParams,v&&v.length>0)return triggerEvent(n,"htmx:validation:halted",L),maybeCall(i),y(),c;const U=t.split("#"),j=U[0],M=U[1];let O=t;if(F&&(O=j,!S.keys().next().done&&(O.indexOf("?")<0?O+="?":O+="&",O+=urlEncode(S),M&&(O+="#"+M))),!verifyPath(n,O,L))return triggerErrorEvent(n,"htmx:invalidPath",L),maybeCall(a),y(),c;if(p.open(e.toUpperCase(),O,!0),p.overrideMimeType("text/html"),p.withCredentials=L.withCredentials,p.timeout=L.timeout,!D.noHeaders){for(const w in A)if(A.hasOwnProperty(w)){const T=A[w];safelySetHeaderValue(p,w,T)}}const R={xhr:p,target:u,requestConfig:L,etc:s,boosted:B,select:d,pathInfo:{requestPath:t,finalRequestPath:O,responsePath:null,anchor:M}};if(p.onload=function(){try{const w=hierarchyForElt(n);if(R.pathInfo.responsePath=getPathFromResponse(p),l(n,R),R.keepIndicators!==!0&&removeRequestIndicators(_,k),triggerEvent(n,"htmx:afterRequest",R),triggerEvent(n,"htmx:afterOnLoad",R),!bodyContains(n)){let T=null;for(;w.length>0&&T==null;){const q=w.shift();bodyContains(q)&&(T=q)}T&&(triggerEvent(T,"htmx:afterRequest",R),triggerEvent(T,"htmx:afterOnLoad",R))}maybeCall(i)}catch(w){throw triggerErrorEvent(n,"htmx:onLoadError",mergeObjects({error:w},R)),w}finally{y()}},p.onerror=function(){removeRequestIndicators(_,k),triggerErrorEvent(n,"htmx:afterRequest",R),triggerErrorEvent(n,"htmx:sendError",R),maybeCall(a),y()},p.onabort=function(){removeRequestIndicators(_,k),triggerErrorEvent(n,"htmx:afterRequest",R),triggerErrorEvent(n,"htmx:sendAbort",R),maybeCall(a),y()},p.ontimeout=function(){removeRequestIndicators(_,k),triggerErrorEvent(n,"htmx:afterRequest",R),triggerErrorEvent(n,"htmx:timeout",R),maybeCall(a),y()},!triggerEvent(n,"htmx:beforeRequest",R))return maybeCall(i),y(),c;var _=addRequestIndicatorClasses(n),k=disableElements(n);forEach(["loadstart","loadend","progress","abort"],function(w){forEach([p,p.upload],function(T){T.addEventListener(w,function(q){triggerEvent(n,"htmx:xhr:"+w,{lengthComputable:q.lengthComputable,loaded:q.loaded,total:q.total})})})}),triggerEvent(n,"htmx:beforeSend",R);const V=F?null:encodeParamsForBody(p,n,S);return p.send(V),c}function determineHistoryUpdates(e,t){const n=t.xhr;let r=null,s=null;if(hasHeader(n,/HX-Push:/i)?(r=n.getResponseHeader("HX-Push"),s="push"):hasHeader(n,/HX-Push-Url:/i)?(r=n.getResponseHeader("HX-Push-Url"),s="push"):hasHeader(n,/HX-Replace-Url:/i)&&(r=n.getResponseHeader("HX-Replace-Url"),s="replace"),r)return r==="false"?{}:{type:s,path:r};const o=t.pathInfo.finalRequestPath,i=t.pathInfo.responsePath,a=t.etc.push||getClosestAttributeValue(e,"hx-push-url"),c=t.etc.replace||getClosestAttributeValue(e,"hx-replace-url"),l=getInternalData(e).boosted;let d=null,u=null;return a?(d="push",u=a):c?(d="replace",u=c):l&&(d="push",u=i||o),u?u==="false"?{}:(u==="true"&&(u=i||o),t.pathInfo.anchor&&u.indexOf("#")===-1&&(u=u+"#"+t.pathInfo.anchor),{type:d,path:u}):{}}function codeMatches(e,t){var n=new RegExp(e.code);return n.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){const t=find("title");t?t.textContent=e:window.document.title=e}}function resolveRetarget(e,t){if(t==="this")return e;const n=asElement(querySelectorExt(e,t));if(n==null)throw triggerErrorEvent(e,"htmx:targetError",{target:t}),new Error(`Invalid re-target ${t}`);return n}function handleAjaxResponse(e,t){const n=t.xhr;let r=t.target;const s=t.etc,o=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 x=n.getResponseHeader("HX-Location");var i={};x.indexOf("{")===0&&(i=parseJSON(x),x=i.path,delete i.path),i.push=i.push||"true",ajaxHelper("get",x,i);return}const a=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"),a&&htmx.location.reload();return}if(a){t.keepIndicators=!0,htmx.location.reload();return}const c=determineHistoryUpdates(e,t),l=resolveResponseHandling(n),d=l.swap;let u=!!l.error,m=htmx.config.ignoreTitle||l.ignoreTitle,E=l.select;l.target&&(t.target=resolveRetarget(e,l.target));var f=s.swapOverride;f==null&&l.swapOverride&&(f=l.swapOverride),hasHeader(n,/HX-Retarget:/i)&&(t.target=resolveRetarget(e,n.getResponseHeader("HX-Retarget"))),hasHeader(n,/HX-Reswap:/i)&&(f=n.getResponseHeader("HX-Reswap"));var g=n.response,h=mergeObjects({shouldSwap:d,serverResponse:g,isError:u,ignoreTitle:m,selectOverride:E,swapOverride:f},t);if(!(l.event&&!triggerEvent(r,l.event,h))&&triggerEvent(r,"htmx:beforeSwap",h)){if(r=h.target,g=h.serverResponse,u=h.isError,m=h.ignoreTitle,E=h.selectOverride,f=h.swapOverride,t.target=r,t.failed=u,t.successful=!u,h.shouldSwap){n.status===286&&cancelPolling(e),withExtensions(e,function(y){g=y.transformResponse(g,n,e)}),c.type&&saveCurrentPageToHistory();var b=getSwapSpecification(e,f);b.hasOwnProperty("ignoreTitle")||(b.ignoreTitle=m),r.classList.add(htmx.config.swappingClass),o&&(E=o),hasHeader(n,/HX-Reselect:/i)&&(E=n.getResponseHeader("HX-Reselect"));const x=s.selectOOB||getClosestAttributeValue(e,"hx-select-oob"),p=getClosestAttributeValue(e,"hx-select");swap(r,g,b,{select:E==="unset"?null:E||p,selectOOB:x,eventInfo:t,anchor:t.pathInfo.anchor,contextElement:e,afterSwapCallback:function(){if(hasHeader(n,/HX-Trigger-After-Swap:/i)){let y=e;bodyContains(e)||(y=getDocument().body),handleTriggerHeader(n,"HX-Trigger-After-Swap",y)}},afterSettleCallback:function(){if(hasHeader(n,/HX-Trigger-After-Settle:/i)){let y=e;bodyContains(e)||(y=getDocument().body),handleTriggerHeader(n,"HX-Trigger-After-Settle",y)}},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})))}})}u&&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==null&&(t=[]),e==null)return t;n==null&&(n=[]);const r=getAttributeValue(e,"hx-ext");return r&&forEach(r.split(","),function(s){if(s=s.replace(/ /g,""),s.slice(0,7)=="ignore:"){n.push(s.slice(7));return}if(n.indexOf(s)<0){const o=extensions[s];o&&t.indexOf(o)<0&&t.push(o)}}),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){const e=htmx.config.inlineStyleNonce?` nonce="${htmx.config.inlineStyleNonce}"`:"",t=htmx.config.indicatorClass,n=htmx.config.requestClass;getDocument().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(){const e=getDocument().querySelector('meta[name="htmx-config"]');return e?parseJSON(e.content):null}function mergeMetaConfig(){const e=getMetaConfig();e&&(htmx.config=mergeObjects(htmx.config,e))}return ready(function(){mergeMetaConfig(),insertIndicatorStyles();let e=getDocument().body;processNode(e);const t=getDocument().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");e.addEventListener("htmx:abort",function(r){const s=r.detail.elt||r.target,o=getInternalData(s);o&&o.xhr&&o.xhr.abort()});const n=window.onpopstate?window.onpopstate.bind(window):null;window.onpopstate=function(r){r.state&&r.state.htmx?(restoreHistory(),forEach(t,function(s){triggerEvent(s,"htmx:restored",{document:getDocument(),triggerEvent})})):n&&n(r)},getWindow().setTimeout(function(){triggerEvent(e,"htmx:load",{}),e=null},0)}),htmx})();var ExceptionCode;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(ExceptionCode||(ExceptionCode={}));class CapacitorException extends Error{constructor(t,n,r){super(t),this.message=t,this.code=n,this.data=r}}const getPlatformId=e=>{var t,n;return e?.androidBridge?"android":!((n=(t=e?.webkit)===null||t===void 0?void 0:t.messageHandlers)===null||n===void 0)&&n.bridge?"ios":"web"},createCapacitor=e=>{const t=e.CapacitorCustomPlatform||null,n=e.Capacitor||{},r=n.Plugins=n.Plugins||{},s=()=>t!==null?t.name:getPlatformId(e),o=()=>s()!=="web",i=u=>{const m=l.get(u);return!!(m?.platforms.has(s())||a(u))},a=u=>{var m;return(m=n.PluginHeaders)===null||m===void 0?void 0:m.find(E=>E.name===u)},c=u=>e.console.error(u),l=new Map,d=(u,m={})=>{const E=l.get(u);if(E)return console.warn(`Capacitor plugin "${u}" already registered. Cannot register plugins twice.`),E.proxy;const f=s(),g=a(u);let h;const b=async()=>(!h&&f in m?h=typeof m[f]=="function"?h=await m[f]():h=m[f]:t!==null&&!h&&"web"in m&&(h=typeof m.web=="function"?h=await m.web():h=m.web),h),x=(C,v)=>{var P,N;if(g){const H=g?.methods.find(S=>v===S.name);if(H)return H.rtype==="promise"?S=>n.nativePromise(u,v.toString(),S):(S,D)=>n.nativeCallback(u,v.toString(),S,D);if(C)return(P=C[v])===null||P===void 0?void 0:P.bind(C)}else{if(C)return(N=C[v])===null||N===void 0?void 0:N.bind(C);throw new CapacitorException(`"${u}" plugin is not implemented on ${f}`,ExceptionCode.Unimplemented)}},p=C=>{let v;const P=(...N)=>{const H=b().then(S=>{const D=x(S,C);if(D){const B=D(...N);return v=B?.remove,B}else throw new CapacitorException(`"${u}.${C}()" is not implemented on ${f}`,ExceptionCode.Unimplemented)});return C==="addListener"&&(H.remove=async()=>v()),H};return P.toString=()=>`${C.toString()}() { [capacitor code] }`,Object.defineProperty(P,"name",{value:C,writable:!1,configurable:!1}),P},y=p("addListener"),$=p("removeListener"),I=(C,v)=>{const P=y({eventName:C},v),N=async()=>{const S=await P;$({eventName:C,callbackId:S},v)},H=new Promise(S=>P.then(()=>S({remove:N})));return H.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await N()},H},A=new Proxy({},{get(C,v){switch(v){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return g?I:y;case"removeListener":return $;default:return p(v)}}});return r[u]=A,l.set(u,{name:u,proxy:A,platforms:new Set([...Object.keys(m),...g?[f]:[]])}),A};return n.convertFileSrc||(n.convertFileSrc=u=>u),n.getPlatform=s,n.handleError=c,n.isNativePlatform=o,n.isPluginAvailable=i,n.registerPlugin=d,n.Exception=CapacitorException,n.DEBUG=!!n.DEBUG,n.isLoggingEnabled=!!n.isLoggingEnabled,n},initCapacitorGlobal=e=>e.Capacitor=createCapacitor(e),Capacitor=initCapacitorGlobal(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),registerPlugin=Capacitor.registerPlugin;class WebPlugin{constructor(){this.listeners={},this.retainedEventArguments={},this.windowListeners={}}addListener(t,n){let r=!1;this.listeners[t]||(this.listeners[t]=[],r=!0),this.listeners[t].push(n);const o=this.windowListeners[t];o&&!o.registered&&this.addWindowListener(o),r&&this.sendRetainedArgumentsForEvent(t);const i=async()=>this.removeListener(t,n);return Promise.resolve({remove:i})}async removeAllListeners(){this.listeners={};for(const t in this.windowListeners)this.removeWindowListener(this.windowListeners[t]);this.windowListeners={}}notifyListeners(t,n,r){const s=this.listeners[t];if(!s){if(r){let o=this.retainedEventArguments[t];o||(o=[]),o.push(n),this.retainedEventArguments[t]=o}return}s.forEach(o=>o(n))}hasListeners(t){var n;return!!(!((n=this.listeners[t])===null||n===void 0)&&n.length)}registerWindowListener(t,n){this.windowListeners[n]={registered:!1,windowEventName:t,pluginEventName:n,handler:r=>{this.notifyListeners(n,r)}}}unimplemented(t="not implemented"){return new Capacitor.Exception(t,ExceptionCode.Unimplemented)}unavailable(t="not available"){return new Capacitor.Exception(t,ExceptionCode.Unavailable)}async removeListener(t,n){const r=this.listeners[t];if(!r)return;const s=r.indexOf(n);this.listeners[t].splice(s,1),this.listeners[t].length||this.removeWindowListener(this.windowListeners[t])}addWindowListener(t){window.addEventListener(t.windowEventName,t.handler),t.registered=!0}removeWindowListener(t){t&&(window.removeEventListener(t.windowEventName,t.handler),t.registered=!1)}sendRetainedArgumentsForEvent(t){const n=this.retainedEventArguments[t];n&&(delete this.retainedEventArguments[t],n.forEach(r=>{this.notifyListeners(t,r)}))}}const encode=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),decode=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class CapacitorCookiesPluginWeb extends WebPlugin{async getCookies(){const t=document.cookie,n={};return t.split(";").forEach(r=>{if(r.length<=0)return;let[s,o]=r.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");s=decode(s).trim(),o=decode(o).trim(),n[s]=o}),n}async setCookie(t){try{const n=encode(t.key),r=encode(t.value),s=`; expires=${(t.expires||"").replace("expires=","")}`,o=(t.path||"/").replace("path=",""),i=t.url!=null&&t.url.length>0?`domain=${t.url}`:"";document.cookie=`${n}=${r||""}${s}; path=${o}; ${i};`}catch(n){return Promise.reject(n)}}async deleteCookie(t){try{document.cookie=`${t.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const t=document.cookie.split(";")||[];for(const n of t)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(t){return Promise.reject(t)}}async clearAllCookies(){try{await this.clearCookies()}catch(t){return Promise.reject(t)}}}registerPlugin("CapacitorCookies",{web:()=>new CapacitorCookiesPluginWeb});const readBlobAsBase64=async e=>new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{const s=r.result;t(s.indexOf(",")>=0?s.split(",")[1]:s)},r.onerror=s=>n(s),r.readAsDataURL(e)}),normalizeHttpHeaders=(e={})=>{const t=Object.keys(e);return Object.keys(e).map(s=>s.toLocaleLowerCase()).reduce((s,o,i)=>(s[o]=e[t[i]],s),{})},buildUrlParams=(e,t=!0)=>e?Object.entries(e).reduce((r,s)=>{const[o,i]=s;let a,c;return Array.isArray(i)?(c="",i.forEach(l=>{a=t?encodeURIComponent(l):l,c+=`${o}=${a}&`}),c.slice(0,-1)):(a=t?encodeURIComponent(i):i,c=`${o}=${a}`),`${r}&${c}`},"").substr(1):null,buildRequestInit=(e,t={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},t),s=normalizeHttpHeaders(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(s.includes("application/x-www-form-urlencoded")){const o=new URLSearchParams;for(const[i,a]of Object.entries(e.data||{}))o.set(i,a);n.body=o.toString()}else if(s.includes("multipart/form-data")||e.data instanceof FormData){const o=new FormData;if(e.data instanceof FormData)e.data.forEach((a,c)=>{o.append(c,a)});else for(const a of Object.keys(e.data))o.append(a,e.data[a]);n.body=o;const i=new Headers(n.headers);i.delete("content-type"),n.headers=i}else(s.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class CapacitorHttpPluginWeb extends WebPlugin{async request(t){const n=buildRequestInit(t,t.webFetchExtra),r=buildUrlParams(t.params,t.shouldEncodeUrlParams),s=r?`${t.url}?${r}`:t.url,o=await fetch(s,n),i=o.headers.get("content-type")||"";let{responseType:a="text"}=o.ok?t:{};i.includes("application/json")&&(a="json");let c,l;switch(a){case"arraybuffer":case"blob":l=await o.blob(),c=await readBlobAsBase64(l);break;case"json":c=await o.json();break;default:c=await o.text()}const d={};return o.headers.forEach((u,m)=>{d[m]=u}),{data:c,headers:d,status:o.status,url:o.url}}async get(t){return this.request(Object.assign(Object.assign({},t),{method:"GET"}))}async post(t){return this.request(Object.assign(Object.assign({},t),{method:"POST"}))}async put(t){return this.request(Object.assign(Object.assign({},t),{method:"PUT"}))}async patch(t){return this.request(Object.assign(Object.assign({},t),{method:"PATCH"}))}async delete(t){return this.request(Object.assign(Object.assign({},t),{method:"DELETE"}))}}registerPlugin("CapacitorHttp",{web:()=>new CapacitorHttpPluginWeb});var SystemBarsStyle;(function(e){e.Dark="DARK",e.Light="LIGHT",e.Default="DEFAULT"})(SystemBarsStyle||(SystemBarsStyle={}));var SystemBarType;(function(e){e.StatusBar="StatusBar",e.NavigationBar="NavigationBar"})(SystemBarType||(SystemBarType={}));class SystemBarsPluginWeb extends WebPlugin{async setStyle(){this.unavailable("not available for web")}async setAnimation(){this.unavailable("not available for web")}async show(){this.unavailable("not available for web")}async hide(){this.unavailable("not available for web")}}registerPlugin("SystemBars",{web:()=>new SystemBarsPluginWeb});const PushNotifications=registerPlugin("PushNotifications",{});window.htmx=htmx;Capacitor.isNativePlatform()&&PushNotifications.addListener("pushNotificationReceived",e=>{new Audio("/sounds/push_notification.wav").play().catch(n=>console.log("Audio play failed:",n))});