diff --git a/src/Laravel/src/Buttons/QueryTagButton.php b/src/Laravel/src/Buttons/QueryTagButton.php index 664746d5b..ac1c563d9 100644 --- a/src/Laravel/src/Buttons/QueryTagButton.php +++ b/src/Laravel/src/Buttons/QueryTagButton.php @@ -22,7 +22,7 @@ public static function for(CrudResource $resource, QueryTag $tag): ActionButtonC ->icon($tag->getIconValue(), $tag->isCustomIcon(), $tag->getIconPath()) ->canSee(static fn (mixed $data): bool => $tag->isSee()) ->class('js-query-tag-button') - ->xDataMethod('asyncLink', 'btn-primary', $resource->getListEventName()) + ->xDataMethod('queryTag', 'btn-primary', $resource->getListEventName()) ->when( $tag->isActive(), static fn (ActionButtonContract $btn): ActionButtonContract => $btn @@ -35,7 +35,7 @@ public static function for(CrudResource $resource, QueryTag $tag): ActionButtonC $resource->isAsync(), static fn (ActionButtonContract $btn): ActionButtonContract => $btn ->onClick( - static fn ($action): string => "queryTagRequest(`{$tag->getUri()}`)", + static fn ($action): string => "request(`{$tag->getUri()}`)", 'prevent' ) ) diff --git a/src/Laravel/src/Components/Fragment.php b/src/Laravel/src/Components/Fragment.php index 146acf778..d246a7d3d 100644 --- a/src/Laravel/src/Components/Fragment.php +++ b/src/Laravel/src/Components/Fragment.php @@ -17,9 +17,6 @@ use MoonShine\UI\Traits\HasAsync; use Throwable; -/** - * @method static static make(iterable $components = []) - */ class Fragment extends AbstractWithComponents implements HasAsyncContract { use HasAsync; @@ -65,6 +62,13 @@ public function updateWith( ); } + public function withQueryParams(): static + { + return $this->customAttributes( + AlpineJs::asyncWithQueryParamsAttributes() + ); + } + /** * @param array $selectors */ diff --git a/src/Laravel/src/Fields/Relationships/BelongsToMany.php b/src/Laravel/src/Fields/Relationships/BelongsToMany.php index 84da4966a..89ecad934 100644 --- a/src/Laravel/src/Fields/Relationships/BelongsToMany.php +++ b/src/Laravel/src/Fields/Relationships/BelongsToMany.php @@ -146,6 +146,11 @@ public function withCheckAll(): static ->onClick(static fn (): string => 'checkAll', 'prevent') ->primary() ->icon('check'), + + ActionButton::make('') + ->onClick(static fn (): string => 'uncheckAll', 'prevent') + ->error() + ->icon('x-mark'), ]); } diff --git a/src/Support/src/AlpineJs.php b/src/Support/src/AlpineJs.php index 0203c092b..00c4c9ff0 100644 --- a/src/Support/src/AlpineJs.php +++ b/src/Support/src/AlpineJs.php @@ -86,14 +86,21 @@ public static function asyncSelectorsParamsAttributes(array $selectors): array ]); } - public static function requestWithFieldValue( + public static function asyncWithQueryParamsAttributes(): array + { + return [ + 'data-async-with-query-params' => true + ]; + } + + public static function onChangeSaveField( string $url, string $column, string $value = '', array $additionally = [] ): array { return [ - '@change' => "requestWithFieldValue(`$url`, `$column`, $value);" + '@change' => "saveField(`$url`, `$column`, $value);" . implode(';', array_filter($additionally)), ]; } diff --git a/src/UI/dist/assets/app.js b/src/UI/dist/assets/app.js index f73dfed70..134f2e8ff 100644 --- a/src/UI/dist/assets/app.js +++ b/src/UI/dist/assets/app.js @@ -1,18 +1,18 @@ -(()=>{function _a(e,t){return function(){return e.apply(t,arguments)}}const{toString:Vc}=Object.prototype,{getPrototypeOf:Co}=Object,si=(e=>t=>{const n=Vc.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ct=e=>(e=e.toLowerCase(),t=>si(t)===e),ai=e=>t=>typeof t===e,{isArray:Nn}=Array,cr=ai("undefined");function Yc(e){return e!==null&&!cr(e)&&e.constructor!==null&&!cr(e.constructor)&&ze(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ea=ct("ArrayBuffer");function zc(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ea(e.buffer),t}const Gc=ai("string"),ze=ai("function"),wa=ai("number"),li=e=>e!==null&&typeof e=="object",Xc=e=>e===!0||e===!1,jr=e=>{if(si(e)!=="object")return!1;const t=Co(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Jc=ct("Date"),Qc=ct("File"),Zc=ct("Blob"),eu=ct("FileList"),tu=e=>li(e)&&ze(e.pipe),nu=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||ze(e.append)&&((t=si(e))==="formdata"||t==="object"&&ze(e.toString)&&e.toString()==="[object FormData]"))},ru=ct("URLSearchParams"),[iu,ou,su,au]=["ReadableStream","Request","Response","Headers"].map(ct),lu=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function hr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Nn(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Qt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Oa=e=>!cr(e)&&e!==Qt;function Vi(){const{caseless:e}=Oa(this)&&this||{},t={},n=(r,i)=>{const o=e&&Sa(t,i)||i;jr(t[o])&&jr(r)?t[o]=Vi(t[o],r):jr(r)?t[o]=Vi({},r):Nn(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(hr(t,(i,o)=>{n&&ze(i)?e[o]=_a(i,n):e[o]=i},{allOwnKeys:r}),e),uu=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),fu=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},du=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&Co(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},hu=(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},pu=e=>{if(!e)return null;if(Nn(e))return e;let t=e.length;if(!wa(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},mu=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Co(Uint8Array)),vu=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},gu=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},yu=ct("HTMLFormElement"),bu=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),ps=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),_u=ct("RegExp"),Aa=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};hr(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},Eu=e=>{Aa(e,(t,n)=>{if(ze(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(ze(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+"'")})}})},wu=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Nn(e)?r(e):r(String(e).split(t)),n},Su=()=>{},Ou=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Ai="abcdefghijklmnopqrstuvwxyz",ms="0123456789",Ta={DIGIT:ms,ALPHA:Ai,ALPHA_DIGIT:Ai+Ai.toUpperCase()+ms},Au=(e=16,t=Ta.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Tu(e){return!!(e&&ze(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Cu=e=>{const t=new Array(10),n=(r,i)=>{if(li(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Nn(r)?[]:{};return hr(r,(a,s)=>{const l=n(a,i+1);!cr(l)&&(o[s]=l)}),t[i]=void 0,o}}return r};return n(e,0)},xu=ct("AsyncFunction"),Iu=e=>e&&(li(e)||ze(e))&&ze(e.then)&&ze(e.catch),Ca=((e,t)=>e?setImmediate:t?((n,r)=>(Qt.addEventListener("message",({source:i,data:o})=>{i===Qt&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Qt.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",ze(Qt.postMessage)),Lu=typeof queueMicrotask<"u"?queueMicrotask.bind(Qt):typeof process<"u"&&process.nextTick||Ca,P={isArray:Nn,isArrayBuffer:Ea,isBuffer:Yc,isFormData:nu,isArrayBufferView:zc,isString:Gc,isNumber:wa,isBoolean:Xc,isObject:li,isPlainObject:jr,isReadableStream:iu,isRequest:ou,isResponse:su,isHeaders:au,isUndefined:cr,isDate:Jc,isFile:Qc,isBlob:Zc,isRegExp:_u,isFunction:ze,isStream:tu,isURLSearchParams:ru,isTypedArray:mu,isFileList:eu,forEach:hr,merge:Vi,extend:cu,trim:lu,stripBOM:uu,inherits:fu,toFlatObject:du,kindOf:si,kindOfTest:ct,endsWith:hu,toArray:pu,forEachEntry:vu,matchAll:gu,isHTMLForm:yu,hasOwnProperty:ps,hasOwnProp:ps,reduceDescriptors:Aa,freezeMethods:Eu,toObjectSet:wu,toCamelCase:bu,noop:Su,toFiniteNumber:Ou,findKey:Sa,global:Qt,isContextDefined:Oa,ALPHABET:Ta,generateString:Au,isSpecCompliantForm:Tu,toJSONObject:Cu,isAsyncFn:xu,isThenable:Iu,setImmediate:Ca,asap:Lu};function se(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}P.inherits(se,Error,{toJSON:function(){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:P.toJSONObject(this.config),code:this.code,status:this.status}}});const xa=se.prototype,Ia={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ia[e]={value:e}});Object.defineProperties(se,Ia);Object.defineProperty(xa,"isAxiosError",{value:!0});se.from=(e,t,n,r,i,o)=>{const a=Object.create(xa);return P.toFlatObject(e,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),se.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const Pu=null;function Yi(e){return P.isPlainObject(e)||P.isArray(e)}function La(e){return P.endsWith(e,"[]")?e.slice(0,-2):e}function vs(e,t,n){return e?e.concat(t).map(function(i,o){return i=La(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function Du(e){return P.isArray(e)&&!e.some(Yi)}const Ru=P.toFlatObject(P,{},null,function(t){return/^is[A-Z]/.test(t)});function ci(e,t,n){if(!P.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=P.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,b){return!P.isUndefined(b[g])});const r=n.metaTokens,i=n.visitor||u,o=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&P.isSpecCompliantForm(t);if(!P.isFunction(i))throw new TypeError("visitor must be a function");function c(v){if(v===null)return"";if(P.isDate(v))return v.toISOString();if(!l&&P.isBlob(v))throw new se("Blob is not supported. Use a Buffer instead.");return P.isArrayBuffer(v)||P.isTypedArray(v)?l&&typeof Blob=="function"?new Blob([v]):Buffer.from(v):v}function u(v,g,b){let O=v;if(v&&!b&&typeof v=="object"){if(P.endsWith(g,"{}"))g=r?g:g.slice(0,-2),v=JSON.stringify(v);else if(P.isArray(v)&&Du(v)||(P.isFileList(v)||P.endsWith(g,"[]"))&&(O=P.toArray(v)))return g=La(g),O.forEach(function(x,_){!(P.isUndefined(x)||x===null)&&t.append(a===!0?vs([g],_,o):a===null?g:g+"[]",c(x))}),!1}return Yi(v)?!0:(t.append(vs(b,g,o),c(v)),!1)}const f=[],h=Object.assign(Ru,{defaultVisitor:u,convertValue:c,isVisitable:Yi});function p(v,g){if(!P.isUndefined(v)){if(f.indexOf(v)!==-1)throw Error("Circular reference detected in "+g.join("."));f.push(v),P.forEach(v,function(O,w){(!(P.isUndefined(O)||O===null)&&i.call(t,O,P.isString(w)?w.trim():w,g,h))===!0&&p(O,g?g.concat(w):[w])}),f.pop()}}if(!P.isObject(e))throw new TypeError("data must be an object");return p(e),t}function gs(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function xo(e,t){this._pairs=[],e&&ci(e,this,t)}const Pa=xo.prototype;Pa.append=function(t,n){this._pairs.push([t,n])};Pa.toString=function(t){const n=t?function(r){return t.call(this,r,gs)}:gs;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Mu(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Da(e,t,n){if(!t)return e;const r=n&&n.encode||Mu,i=n&&n.serialize;let o;if(i?o=i(t,n):o=P.isURLSearchParams(t)?t.toString():new xo(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class ys{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){P.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ra={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Nu=typeof URLSearchParams<"u"?URLSearchParams:xo,$u=typeof FormData<"u"?FormData:null,ju=typeof Blob<"u"?Blob:null,Fu={isBrowser:!0,classes:{URLSearchParams:Nu,FormData:$u,Blob:ju},protocols:["http","https","file","blob","url","data"]},Io=typeof window<"u"&&typeof document<"u",zi=typeof navigator=="object"&&navigator||void 0,ku=Io&&(!zi||["ReactNative","NativeScript","NS"].indexOf(zi.product)<0),Bu=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Hu=Io&&window.location.href||"http://localhost",Uu=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Io,hasStandardBrowserEnv:ku,hasStandardBrowserWebWorkerEnv:Bu,navigator:zi,origin:Hu},Symbol.toStringTag,{value:"Module"})),Ue={...Uu,...Fu};function qu(e,t){return ci(e,new Ue.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Ue.isNode&&P.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Wu(e){return P.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ku(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return a=!a&&P.isArray(i)?i.length:a,l?(P.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!P.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&P.isArray(i[a])&&(i[a]=Ku(i[a])),!s)}if(P.isFormData(e)&&P.isFunction(e.entries)){const n={};return P.forEachEntry(e,(r,i)=>{t(Wu(r),i,n,0)}),n}return null}function Vu(e,t,n){if(P.isString(e))try{return(t||JSON.parse)(e),P.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const pr={transitional:Ra,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=P.isObject(t);if(o&&P.isHTMLForm(t)&&(t=new FormData(t)),P.isFormData(t))return i?JSON.stringify(Ma(t)):t;if(P.isArrayBuffer(t)||P.isBuffer(t)||P.isStream(t)||P.isFile(t)||P.isBlob(t)||P.isReadableStream(t))return t;if(P.isArrayBufferView(t))return t.buffer;if(P.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return qu(t,this.formSerializer).toString();if((s=P.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ci(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Vu(t)):t}],transformResponse:[function(t){const n=this.transitional||pr.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(P.isResponse(t)||P.isReadableStream(t))return t;if(t&&P.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?se.from(s,se.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ue.classes.FormData,Blob:Ue.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};P.forEach(["delete","get","head","post","put","patch"],e=>{pr.headers[e]={}});const Yu=P.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"]),zu=e=>{const t={};let n,r,i;return e&&e.split(` -`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&Yu[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},bs=Symbol("internals");function qn(e){return e&&String(e).trim().toLowerCase()}function Fr(e){return e===!1||e==null?e:P.isArray(e)?e.map(Fr):String(e)}function Gu(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 Xu=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ti(e,t,n,r,i){if(P.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!P.isString(t)){if(P.isString(r))return t.indexOf(r)!==-1;if(P.isRegExp(r))return r.test(t)}}function Ju(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Qu(e,t){const n=P.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}let qe=class{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(s,l,c){const u=qn(l);if(!u)throw new Error("header name must be a non-empty string");const f=P.findKey(i,u);(!f||i[f]===void 0||c===!0||c===void 0&&i[f]!==!1)&&(i[f||l]=Fr(s))}const a=(s,l)=>P.forEach(s,(c,u)=>o(c,u,l));if(P.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(P.isString(t)&&(t=t.trim())&&!Xu(t))a(zu(t),n);else if(P.isHeaders(t))for(const[s,l]of t.entries())o(l,s,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=qn(t),t){const r=P.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Gu(i);if(P.isFunction(n))return n.call(this,i,r);if(P.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=qn(t),t){const r=P.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Ti(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=qn(a),a){const s=P.findKey(r,a);s&&(!n||Ti(r,r[s],s,n))&&(delete r[s],i=!0)}}return P.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||Ti(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return P.forEach(this,(i,o)=>{const a=P.findKey(r,o);if(a){n[a]=Fr(i),delete n[o];return}const s=t?Ju(o):String(o).trim();s!==o&&delete n[o],n[s]=Fr(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return P.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&P.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(` -`)}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(i=>r.set(i)),r}static accessor(t){const r=(this[bs]=this[bs]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=qn(a);r[s]||(Qu(i,a),r[s]=!0)}return P.isArray(t)?t.forEach(o):o(t),this}};qe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);P.reduceDescriptors(qe.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});P.freezeMethods(qe);function Ci(e,t){const n=this||pr,r=t||n,i=qe.from(r.headers);let o=r.data;return P.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Na(e){return!!(e&&e.__CANCEL__)}function $n(e,t,n){se.call(this,e??"canceled",se.ERR_CANCELED,t,n),this.name="CanceledError"}P.inherits($n,se,{__CANCEL__:!0});function $a(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new se("Request failed with status code "+n.status,[se.ERR_BAD_REQUEST,se.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Zu(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ef(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[o];a||(a=c),n[i]=l,r[i]=c;let f=o,h=0;for(;f!==i;)h+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),c-a{n=u,i=null,o&&(clearTimeout(o),o=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),f=u-n;f>=r?a(c,u):(i=c,o||(o=setTimeout(()=>{o=null,a(i)},r-f)))},()=>i&&a(i)]}const Yr=(e,t,n=3)=>{let r=0;const i=ef(50,250);return tf(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,l=a-r,c=i(l),u=a<=s;r=a;const f={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:c||void 0,estimated:c&&s&&u?(s-a)/c:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},_s=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Es=e=>(...t)=>P.asap(()=>e(...t)),nf=Ue.hasStandardBrowserEnv?function(){const t=Ue.navigator&&/(msie|trident)/i.test(Ue.navigator.userAgent),n=document.createElement("a");let r;function i(o){let a=o;return t&&(n.setAttribute("href",a),a=n.href),n.setAttribute("href",a),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(a){const s=P.isString(a)?i(a):a;return s.protocol===r.protocol&&s.host===r.host}}():function(){return function(){return!0}}(),rf=Ue.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];P.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),P.isString(r)&&a.push("path="+r),P.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function of(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function sf(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ja(e,t){return e&&!of(t)?sf(e,t):t}const ws=e=>e instanceof qe?{...e}:e;function an(e,t){t=t||{};const n={};function r(c,u,f){return P.isPlainObject(c)&&P.isPlainObject(u)?P.merge.call({caseless:f},c,u):P.isPlainObject(u)?P.merge({},u):P.isArray(u)?u.slice():u}function i(c,u,f){if(P.isUndefined(u)){if(!P.isUndefined(c))return r(void 0,c,f)}else return r(c,u,f)}function o(c,u){if(!P.isUndefined(u))return r(void 0,u)}function a(c,u){if(P.isUndefined(u)){if(!P.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function s(c,u,f){if(f in t)return r(c,u);if(f in e)return r(void 0,c)}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(c,u)=>i(ws(c),ws(u),!0)};return P.forEach(Object.keys(Object.assign({},e,t)),function(u){const f=l[u]||i,h=f(e[u],t[u],u);P.isUndefined(h)&&f!==s||(n[u]=h)}),n}const Fa=e=>{const t=an({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;t.headers=a=qe.from(a),t.url=Da(ja(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(P.isFormData(n)){if(Ue.hasStandardBrowserEnv||Ue.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[c,...u]=l?l.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([c||"multipart/form-data",...u].join("; "))}}if(Ue.hasStandardBrowserEnv&&(r&&P.isFunction(r)&&(r=r(t)),r||r!==!1&&nf(t.url))){const c=i&&o&&rf.read(o);c&&a.set(i,c)}return t},af=typeof XMLHttpRequest<"u",lf=af&&function(e){return new Promise(function(n,r){const i=Fa(e);let o=i.data;const a=qe.from(i.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:c}=i,u,f,h,p,v;function g(){p&&p(),v&&v(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function O(){if(!b)return;const x=qe.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),U={data:!s||s==="text"||s==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:x,config:e,request:b};$a(function(Y){n(Y),g()},function(Y){r(Y),g()},U),b=null}"onloadend"in b?b.onloadend=O:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(O)},b.onabort=function(){b&&(r(new se("Request aborted",se.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new se("Network Error",se.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let _=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const U=i.transitional||Ra;i.timeoutErrorMessage&&(_=i.timeoutErrorMessage),r(new se(_,U.clarifyTimeoutError?se.ETIMEDOUT:se.ECONNABORTED,e,b)),b=null},o===void 0&&a.setContentType(null),"setRequestHeader"in b&&P.forEach(a.toJSON(),function(_,U){b.setRequestHeader(U,_)}),P.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),s&&s!=="json"&&(b.responseType=i.responseType),c&&([h,v]=Yr(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([f,p]=Yr(l),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(u=x=>{b&&(r(!x||x.type?new $n(null,e,b):x),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const w=Zu(i.url);if(w&&Ue.protocols.indexOf(w)===-1){r(new se("Unsupported protocol "+w+":",se.ERR_BAD_REQUEST,e));return}b.send(o||null)})},cf=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(c){if(!i){i=!0,s();const u=c instanceof Error?c:this.reason;r.abort(u instanceof se?u:new $n(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,o(new se(`timeout ${t} of ms exceeded`,se.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:l}=r;return l.unsubscribe=()=>P.asap(s),l}},uf=function*(e,t){let n=e.byteLength;if(!t||n{const i=ff(e,t);let o=0,a,s=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await i.next();if(c){s(),l.close();return}let f=u.byteLength;if(n){let h=o+=f;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw s(c),c}},cancel(l){return s(l),i.return()}},{highWaterMark:2})},ui=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ka=ui&&typeof ReadableStream=="function",hf=ui&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Ba=(e,...t)=>{try{return!!e(...t)}catch{return!1}},pf=ka&&Ba(()=>{let e=!1;const t=new Request(Ue.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Os=64*1024,Gi=ka&&Ba(()=>P.isReadableStream(new Response("").body)),zr={stream:Gi&&(e=>e.body)};ui&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!zr[t]&&(zr[t]=P.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new se(`Response type '${t}' is not supported`,se.ERR_NOT_SUPPORT,r)})})})(new Response);const mf=async e=>{if(e==null)return 0;if(P.isBlob(e))return e.size;if(P.isSpecCompliantForm(e))return(await new Request(Ue.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(P.isArrayBufferView(e)||P.isArrayBuffer(e))return e.byteLength;if(P.isURLSearchParams(e)&&(e=e+""),P.isString(e))return(await hf(e)).byteLength},vf=async(e,t)=>{const n=P.toFiniteNumber(e.getContentLength());return n??mf(t)},gf=ui&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:c,headers:u,withCredentials:f="same-origin",fetchOptions:h}=Fa(e);c=c?(c+"").toLowerCase():"text";let p=cf([i,o&&o.toAbortSignal()],a),v;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let b;try{if(l&&pf&&n!=="get"&&n!=="head"&&(b=await vf(u,r))!==0){let U=new Request(t,{method:"POST",body:r,duplex:"half"}),N;if(P.isFormData(r)&&(N=U.headers.get("content-type"))&&u.setContentType(N),U.body){const[Y,C]=_s(b,Yr(Es(l)));r=Ss(U.body,Os,Y,C)}}P.isString(f)||(f=f?"include":"omit");const O="credentials"in Request.prototype;v=new Request(t,{...h,signal:p,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:O?f:void 0});let w=await fetch(v);const x=Gi&&(c==="stream"||c==="response");if(Gi&&(s||x&&g)){const U={};["status","statusText","headers"].forEach(R=>{U[R]=w[R]});const N=P.toFiniteNumber(w.headers.get("content-length")),[Y,C]=s&&_s(N,Yr(Es(s),!0))||[];w=new Response(Ss(w.body,Os,Y,()=>{C&&C(),g&&g()}),U)}c=c||"text";let _=await zr[P.findKey(zr,c)||"text"](w,e);return!x&&g&&g(),await new Promise((U,N)=>{$a(U,N,{data:_,headers:qe.from(w.headers),status:w.status,statusText:w.statusText,config:e,request:v})})}catch(O){throw g&&g(),O&&O.name==="TypeError"&&/fetch/i.test(O.message)?Object.assign(new se("Network Error",se.ERR_NETWORK,e,v),{cause:O.cause||O}):se.from(O,O&&O.code,e,v)}}),Xi={http:Pu,xhr:lf,fetch:gf};P.forEach(Xi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const As=e=>`- ${e}`,yf=e=>P.isFunction(e)||e===null||e===!1,Ha={getAdapter:e=>{e=P.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since : -`+o.map(As).join(` -`):" "+As(o[0]):"as no adapter specified";throw new se("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:Xi};function xi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $n(null,e)}function Ts(e){return xi(e),e.headers=qe.from(e.headers),e.data=Ci.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ha.getAdapter(e.adapter||pr.adapter)(e).then(function(r){return xi(e),r.data=Ci.call(e,e.transformResponse,r),r.headers=qe.from(r.headers),r},function(r){return Na(r)||(xi(e),r&&r.response&&(r.response.data=Ci.call(e,e.transformResponse,r.response),r.response.headers=qe.from(r.response.headers))),Promise.reject(r)})}const Ua="1.7.7",Lo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Lo[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Cs={};Lo.transitional=function(t,n,r){function i(o,a){return"[Axios v"+Ua+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new se(i(a," has been removed"+(n?" in "+n:"")),se.ERR_DEPRECATED);return n&&!Cs[a]&&(Cs[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}};function bf(e,t,n){if(typeof e!="object")throw new se("options must be an object",se.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const s=e[o],l=s===void 0||a(s,o,e);if(l!==!0)throw new se("option "+o+" must be "+l,se.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new se("Unknown option "+o,se.ERR_BAD_OPTION)}}const Ji={assertOptions:bf,validators:Lo},Dt=Ji.validators;let en=class{constructor(t){this.defaults=t,this.interceptors={request:new ys,response:new ys}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const o=i.stack?i.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=an(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Ji.assertOptions(r,{silentJSONParsing:Dt.transitional(Dt.boolean),forcedJSONParsing:Dt.transitional(Dt.boolean),clarifyTimeoutError:Dt.transitional(Dt.boolean)},!1),i!=null&&(P.isFunction(i)?n.paramsSerializer={serialize:i}:Ji.assertOptions(i,{encode:Dt.function,serialize:Dt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&P.merge(o.common,o[n.method]);o&&P.forEach(["delete","get","head","post","put","patch","common"],v=>{delete o[v]}),n.headers=qe.concat(a,o);const s=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,s.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let u,f=0,h;if(!l){const v=[Ts.bind(this),void 0];for(v.unshift.apply(v,s),v.push.apply(v,c),h=v.length,u=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new $n(o,a,s),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 qa(function(i){t=i}),cancel:t}}};function Ef(e){return function(n){return e.apply(null,n)}}function wf(e){return P.isObject(e)&&e.isAxiosError===!0}const Qi={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};Object.entries(Qi).forEach(([e,t])=>{Qi[t]=e});function Wa(e){const t=new en(e),n=_a(en.prototype.request,t);return P.extend(n,en.prototype,t,{allOwnKeys:!0}),P.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Wa(an(e,i))},n}const Ae=Wa(pr);Ae.Axios=en;Ae.CanceledError=$n;Ae.CancelToken=_f;Ae.isCancel=Na;Ae.VERSION=Ua;Ae.toFormData=ci;Ae.AxiosError=se;Ae.Cancel=Ae.CanceledError;Ae.all=function(t){return Promise.all(t)};Ae.spread=Ef;Ae.isAxiosError=wf;Ae.mergeConfig=an;Ae.AxiosHeaders=qe;Ae.formToJSON=e=>Ma(P.isHTMLForm(e)?new FormData(e):e);Ae.getAdapter=Ha.getAdapter;Ae.HttpStatusCode=Qi;Ae.default=Ae;const{Axios:Av,AxiosError:Tv,CanceledError:Cv,isCancel:xv,CancelToken:Iv,VERSION:Lv,all:Pv,Cancel:Dv,isAxiosError:Rv,spread:Mv,toFormData:Nv,AxiosHeaders:$v,HttpStatusCode:jv,formToJSON:Ka,getAdapter:Fv,mergeConfig:kv}=Ae;window.axios=Ae;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";CSS.supports("selector(:has(*))")||document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelector(".layout-wrapper");e&&e.querySelector(":scope > .layout-menu")&&e.classList.add("layout-wrapper--sidebar"),e&&e.querySelector(":scope > .layout-menu-horizontal")&&e.classList.add("layout-wrapper--top-menu"),e&&e.querySelector(":scope > .layout-menu-mobile")&&e.classList.add("layout-wrapper--mobilebar")});var Zi=!1,eo=!1,tn=[],to=-1;function Sf(e){Of(e)}function Of(e){tn.includes(e)||tn.push(e),Af()}function Va(e){let t=tn.indexOf(e);t!==-1&&t>to&&tn.splice(t,1)}function Af(){!eo&&!Zi&&(Zi=!0,queueMicrotask(Tf))}function Tf(){Zi=!1,eo=!0;for(let e=0;ee.effect(t,{scheduler:n=>{no?Sf(n):n()}}),Ya=e.raw}function xs(e){Fn=e}function If(e){let t=()=>{};return[r=>{let i=Fn(r);return e._x_effects||(e._x_effects=new Set,e._x_runEffects=()=>{e._x_effects.forEach(o=>o())}),e._x_effects.add(i),t=()=>{i!==void 0&&(e._x_effects.delete(i),mr(i))},i},()=>{t()}]}function Qn(e,t,n={}){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:!0}))}function jt(e,t){if(typeof ShadowRoot=="function"&&e instanceof ShadowRoot){Array.from(e.children).forEach(i=>jt(i,t));return}let n=!1;if(t(e,()=>n=!0),n)return;let r=e.firstElementChild;for(;r;)jt(r,t),r=r.nextElementSibling}function St(e,...t){console.warn(`Alpine Warning: ${e}`,...t)}var Is=!1;function Lf(){Is&&St("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),Is=!0,document.body||St("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's `