Files
budget_analyser/node_modules/@inertiajs/inertia/dist/index.umd.js
TiclemFR 076ec32c3b 🔧
2023-12-29 17:47:40 +01:00

3 lines
64 KiB
JavaScript

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Inertia={})}(this,function(e){function t(){return(t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var r={modal:null,listener:null,show:function(e){var t=this;"object"==typeof e&&(e="All Inertia requests must receive a valid Inertia response, however a plain JSON response was received.<hr>"+JSON.stringify(e));var r=document.createElement("html");r.innerHTML=e,r.querySelectorAll("a").forEach(function(e){return e.setAttribute("target","_top")}),this.modal=document.createElement("div"),this.modal.style.position="fixed",this.modal.style.width="100vw",this.modal.style.height="100vh",this.modal.style.padding="50px",this.modal.style.boxSizing="border-box",this.modal.style.backgroundColor="rgba(0, 0, 0, .6)",this.modal.style.zIndex=2e5,this.modal.addEventListener("click",function(){return t.hide()});var n=document.createElement("iframe");if(n.style.backgroundColor="white",n.style.borderRadius="5px",n.style.width="100%",n.style.height="100%",this.modal.appendChild(n),document.body.prepend(this.modal),document.body.style.overflow="hidden",!n.contentWindow)throw new Error("iframe not yet ready.");n.contentWindow.document.open(),n.contentWindow.document.write(r.outerHTML),n.contentWindow.document.close(),this.listener=this.hideOnEscape.bind(this),document.addEventListener("keydown",this.listener)},hide:function(){this.modal.outerHTML="",this.modal=null,document.body.style.overflow="visible",document.removeEventListener("keydown",this.listener)},hideOnEscape:function(e){27===e.keyCode&&this.hide()}};function n(e,t){var r;return function(){var n=arguments,o=this;clearTimeout(r),r=setTimeout(function(){return e.apply(o,[].slice.call(n))},t)}}function o(e,t,r){for(var n in void 0===t&&(t=new FormData),void 0===r&&(r=null),e=e||{})Object.prototype.hasOwnProperty.call(e,n)&&a(t,i(r,n),e[n]);return t}function i(e,t){return e?e+"["+t+"]":t}function a(e,t,r){return Array.isArray(r)?Array.from(r.keys()).forEach(function(n){return a(e,i(t,n.toString()),r[n])}):r instanceof Date?e.append(t,r.toISOString()):r instanceof File?e.append(t,r,r.name):r instanceof Blob?e.append(t,r):"boolean"==typeof r?e.append(t,r?"1":"0"):"string"==typeof r?e.append(t,r):"number"==typeof r?e.append(t,""+r):null==r?e.append(t,""):void o(r,e,t)}var s=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},c=Object.prototype.toString;function l(e){return"[object Array]"===c.call(e)}function u(e){return void 0===e}function p(e){return null!==e&&"object"==typeof e}function f(e){if("[object Object]"!==c.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function d(e){return"[object Function]"===c.call(e)}function y(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),l(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var h={isArray:l,isArrayBuffer:function(e){return"[object ArrayBuffer]"===c.call(e)},isBuffer:function(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"undefined"!=typeof FormData&&e instanceof FormData},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&e.buffer instanceof ArrayBuffer},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:p,isPlainObject:f,isUndefined:u,isDate:function(e){return"[object Date]"===c.call(e)},isFile:function(e){return"[object File]"===c.call(e)},isBlob:function(e){return"[object Blob]"===c.call(e)},isFunction:d,isStream:function(e){return p(e)&&d(e.pipe)},isURLSearchParams:function(e){return"undefined"!=typeof URLSearchParams&&e instanceof URLSearchParams},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:y,merge:function e(){var t={};function r(r,n){t[n]=f(t[n])&&f(r)?e(t[n],r):f(r)?e({},r):l(r)?r.slice():r}for(var n=0,o=arguments.length;n<o;n++)y(arguments[n],r);return t},extend:function(e,t,r){return y(t,function(t,n){e[n]=r&&"function"==typeof t?s(t,r):t}),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}};function m(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var v=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(h.isURLSearchParams(t))n=t.toString();else{var o=[];h.forEach(t,function(e,t){null!=e&&(h.isArray(e)?t+="[]":e=[e],h.forEach(e,function(e){h.isDate(e)?e=e.toISOString():h.isObject(e)&&(e=JSON.stringify(e)),o.push(m(t)+"="+m(e))}))}),n=o.join("&")}if(n){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e};function g(){this.handlers=[]}g.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},g.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},g.prototype.forEach=function(e){h.forEach(this.handlers,function(t){null!==t&&e(t)})};var b=g,S=function(e,t){h.forEach(e,function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])})},w=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.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:this.config,code:this.code}},e},j=function(e,t,r,n,o){var i=new Error(e);return w(i,t,r,n,o)},O=h.isStandardBrowserEnv()?{write:function(e,t,r,n,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),h.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),h.isString(n)&&a.push("path="+n),h.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},E=["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"],A=h.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=h.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0},P={"Content-Type":"application/x-www-form-urlencoded"};function x(e,t){!h.isUndefined(e)&&h.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var k,R={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(k=function(e){return new Promise(function(t,r){var n=e.data,o=e.headers,i=e.responseType;h.isFormData(n)&&delete o["Content-Type"];var a=new XMLHttpRequest;if(e.auth){var s=e.auth.username||"",c=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(s+":"+c)}var l,u,p=(u=e.url,(l=e.baseURL)&&!/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(u)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(l,u):u);function f(){if(a){var n,o,s,c,l,u="getAllResponseHeaders"in a?(n=a.getAllResponseHeaders(),l={},n?(h.forEach(n.split("\n"),function(e){if(c=e.indexOf(":"),o=h.trim(e.substr(0,c)).toLowerCase(),s=h.trim(e.substr(c+1)),o){if(l[o]&&E.indexOf(o)>=0)return;l[o]="set-cookie"===o?(l[o]?l[o]:[]).concat([s]):l[o]?l[o]+", "+s:s}}),l):l):null;!function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(j("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)}(t,r,{data:i&&"text"!==i&&"json"!==i?a.response:a.responseText,status:a.status,statusText:a.statusText,headers:u,config:e,request:a}),a=null}}if(a.open(e.method.toUpperCase(),v(p,e.params,e.paramsSerializer),!0),a.timeout=e.timeout,"onloadend"in a?a.onloadend=f:a.onreadystatechange=function(){a&&4===a.readyState&&(0!==a.status||a.responseURL&&0===a.responseURL.indexOf("file:"))&&setTimeout(f)},a.onabort=function(){a&&(r(j("Request aborted",e,"ECONNABORTED",a)),a=null)},a.onerror=function(){r(j("Network Error",e,null,a)),a=null},a.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(j(t,e,e.transitional&&e.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",a)),a=null},h.isStandardBrowserEnv()){var d=(e.withCredentials||A(p))&&e.xsrfCookieName?O.read(e.xsrfCookieName):void 0;d&&(o[e.xsrfHeaderName]=d)}"setRequestHeader"in a&&h.forEach(o,function(e,t){void 0===n&&"content-type"===t.toLowerCase()?delete o[t]:a.setRequestHeader(t,e)}),h.isUndefined(e.withCredentials)||(a.withCredentials=!!e.withCredentials),i&&"json"!==i&&(a.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&a.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&a.upload&&a.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){a&&(a.abort(),r(e),a=null)}),n||(n=null),a.send(n)})}),k),transformRequest:[function(e,t){return S(t,"Accept"),S(t,"Content-Type"),h.isFormData(e)||h.isArrayBuffer(e)||h.isBuffer(e)||h.isStream(e)||h.isFile(e)||h.isBlob(e)?e:h.isArrayBufferView(e)?e.buffer:h.isURLSearchParams(e)?(x(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):h.isObject(e)||t&&"application/json"===t["Content-Type"]?(x(t,"application/json"),function(e,t,r){if(h.isString(e))try{return(0,JSON.parse)(e),h.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional,r=!(t&&t.silentJSONParsing)&&"json"===this.responseType;if(r||t&&t.forcedJSONParsing&&h.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw w(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};h.forEach(["delete","get","head"],function(e){R.headers[e]={}}),h.forEach(["post","put","patch"],function(e){R.headers[e]=h.merge(P)});var T=R,I=function(e,t,r){var n=this||T;return h.forEach(r,function(r){e=r.call(n,e,t)}),e},N=function(e){return!(!e||!e.__CANCEL__)};function C(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var F=function(e){return C(e),e.headers=e.headers||{},e.data=I.call(e,e.data,e.headers,e.transformRequest),e.headers=h.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),h.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||T.adapter)(e).then(function(t){return C(e),t.data=I.call(e,t.data,t.headers,e.transformResponse),t},function(t){return N(t)||(C(e),t&&t.response&&(t.response.data=I.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})},M=function(e,t){t=t||{};var r={},n=["url","method","data"],o=["headers","auth","proxy","params"],i=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],a=["validateStatus"];function s(e,t){return h.isPlainObject(e)&&h.isPlainObject(t)?h.merge(e,t):h.isPlainObject(t)?h.merge({},t):h.isArray(t)?t.slice():t}function c(n){h.isUndefined(t[n])?h.isUndefined(e[n])||(r[n]=s(void 0,e[n])):r[n]=s(e[n],t[n])}h.forEach(n,function(e){h.isUndefined(t[e])||(r[e]=s(void 0,t[e]))}),h.forEach(o,c),h.forEach(i,function(n){h.isUndefined(t[n])?h.isUndefined(e[n])||(r[n]=s(void 0,e[n])):r[n]=s(void 0,t[n])}),h.forEach(a,function(n){n in t?r[n]=s(e[n],t[n]):n in e&&(r[n]=s(void 0,e[n]))});var l=n.concat(o).concat(i).concat(a),u=Object.keys(e).concat(Object.keys(t)).filter(function(e){return-1===l.indexOf(e)});return h.forEach(u,c),r},L="Promise based HTTP client for the browser and node.js",D={test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},U={type:"git",url:"https://github.com/axios/axios.git"},B=["xhr","http","ajax","promise","node"],V={url:"https://github.com/axios/axios/issues"},_={coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},W={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},q="dist/axios.min.js",H={"follow-redirects":"^1.14.0"},G=[{path:"./dist/axios.min.js",threshold:"5kB"}];function z(e){return e&&e.default||e}var J=z({__proto__:null,name:"axios",version:"0.21.4",description:L,main:"index.js",scripts:D,repository:U,keywords:B,author:"Matt Zabriskie",license:"MIT",bugs:V,homepage:"https://axios-http.com",devDependencies:_,browser:W,jsdelivr:"dist/axios.min.js",unpkg:q,typings:"./index.d.ts",dependencies:H,bundlesize:G,default:{name:"axios",version:"0.21.4",description:L,main:"index.js",scripts:D,repository:U,keywords:B,author:"Matt Zabriskie",license:"MIT",bugs:V,homepage:"https://axios-http.com",devDependencies:_,browser:W,jsdelivr:"dist/axios.min.js",unpkg:q,typings:"./index.d.ts",dependencies:H,bundlesize:G}}),$={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){$[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});var Q={},X=J.version.split(".");function K(e,t){for(var r=t?t.split("."):X,n=e.split("."),o=0;o<3;o++){if(r[o]>n[o])return!0;if(r[o]<n[o])return!1}return!1}$.transitional=function(e,t,r){var n=t&&K(t);function o(e,t){return"[Axios v"+J.version+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,i,a){if(!1===e)throw new Error(o(i," has been removed in "+t));return n&&!Q[i]&&(Q[i]=!0,console.warn(o(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,a)}};var Z={isOlderVersion:K,assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var s=e[i],c=void 0===s||a(s,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:$},Y=Z.validators;function ee(e){this.defaults=e,this.interceptors={request:new b,response:new b}}ee.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=M(this.defaults,e)).method=e.method?e.method.toLowerCase():this.defaults.method?this.defaults.method.toLowerCase():"get";var t=e.transitional;void 0!==t&&Z.assertOptions(t,{silentJSONParsing:Y.transitional(Y.boolean,"1.0.0"),forcedJSONParsing:Y.transitional(Y.boolean,"1.0.0"),clarifyTimeoutError:Y.transitional(Y.boolean,"1.0.0")},!1);var r=[],n=!0;this.interceptors.request.forEach(function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(n=n&&t.synchronous,r.unshift(t.fulfilled,t.rejected))});var o,i=[];if(this.interceptors.response.forEach(function(e){i.push(e.fulfilled,e.rejected)}),!n){var a=[F,void 0];for(Array.prototype.unshift.apply(a,r),a=a.concat(i),o=Promise.resolve(e);a.length;)o=o.then(a.shift(),a.shift());return o}for(var s=e;r.length;){var c=r.shift(),l=r.shift();try{s=c(s)}catch(e){l(e);break}}try{o=F(s)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},ee.prototype.getUri=function(e){return e=M(this.defaults,e),v(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},h.forEach(["delete","get","head","options"],function(e){ee.prototype[e]=function(t,r){return this.request(M(r||{},{method:e,url:t,data:(r||{}).data}))}}),h.forEach(["post","put","patch"],function(e){ee.prototype[e]=function(t,r,n){return this.request(M(n||{},{method:e,url:t,data:r}))}});var te=ee;function re(e){this.message=e}re.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},re.prototype.__CANCEL__=!0;var ne=re;function oe(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var r=this;e(function(e){r.reason||(r.reason=new ne(e),t(r.reason))})}oe.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},oe.source=function(){var e;return{token:new oe(function(t){e=t}),cancel:e}};var ie=oe;function ae(e){var t=new te(e),r=s(te.prototype.request,t);return h.extend(r,te.prototype,t),h.extend(r,t),r}var se=ae(T);se.Axios=te,se.create=function(e){return ae(M(se.defaults,e))},se.Cancel=ne,se.CancelToken=ie,se.isCancel=N,se.all=function(e){return Promise.all(e)},se.spread=function(e){return function(t){return e.apply(null,t)}},se.isAxiosError=function(e){return"object"==typeof e&&!0===e.isAxiosError};var ce=se;ce.default=se;var le=ce,ue="undefined"!=typeof Symbol&&Symbol,pe="Function.prototype.bind called on incompatible ",fe=Array.prototype.slice,de=Object.prototype.toString,ye=Function.prototype.bind||function(e){var t=this;if("function"!=typeof t||"[object Function]"!==de.call(t))throw new TypeError(pe+t);for(var r,n=fe.call(arguments,1),o=function(){if(this instanceof r){var o=t.apply(this,n.concat(fe.call(arguments)));return Object(o)===o?o:this}return t.apply(e,n.concat(fe.call(arguments)))},i=Math.max(0,t.length-n.length),a=[],s=0;s<i;s++)a.push("$"+s);if(r=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var c=function(){};c.prototype=t.prototype,r.prototype=new c,c.prototype=null}return r},he=ye.call(Function.call,Object.prototype.hasOwnProperty),me=SyntaxError,ve=Function,ge=TypeError,be=function(e){try{return ve('"use strict"; return ('+e+").constructor;")()}catch(e){}},Se=Object.getOwnPropertyDescriptor;if(Se)try{Se({},"")}catch(e){Se=null}var we=function(){throw new ge},je=Se?function(){try{return we}catch(e){try{return Se(arguments,"callee").get}catch(e){return we}}}():we,Oe="function"==typeof ue&&"function"==typeof Symbol&&"symbol"==typeof ue("foo")&&"symbol"==typeof Symbol("bar")&&function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}(),Ee=Object.getPrototypeOf||function(e){return e.__proto__},Ae={},Pe="undefined"==typeof Uint8Array?void 0:Ee(Uint8Array),xe={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":Oe?Ee([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":Ae,"%AsyncGenerator%":Ae,"%AsyncGeneratorFunction%":Ae,"%AsyncIteratorPrototype%":Ae,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":ve,"%GeneratorFunction%":Ae,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Oe?Ee(Ee([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&Oe?Ee((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&Oe?Ee((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Oe?Ee(""[Symbol.iterator]()):void 0,"%Symbol%":Oe?Symbol:void 0,"%SyntaxError%":me,"%ThrowTypeError%":je,"%TypedArray%":Pe,"%TypeError%":ge,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},ke={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Re=ye.call(Function.call,Array.prototype.concat),Te=ye.call(Function.apply,Array.prototype.splice),Ie=ye.call(Function.call,String.prototype.replace),Ne=ye.call(Function.call,String.prototype.slice),Ce=ye.call(Function.call,RegExp.prototype.exec),Fe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Me=/\\(\\)?/g,Le=function(e){var t=Ne(e,0,1),r=Ne(e,-1);if("%"===t&&"%"!==r)throw new me("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new me("invalid intrinsic syntax, expected opening `%`");var n=[];return Ie(e,Fe,function(e,t,r,o){n[n.length]=r?Ie(o,Me,"$1"):t||e}),n},De=function(e,t){var r,n=e;if(he(ke,n)&&(n="%"+(r=ke[n])[0]+"%"),he(xe,n)){var o=xe[n];if(o===Ae&&(o=function e(t){var r;if("%AsyncFunction%"===t)r=be("async function () {}");else if("%GeneratorFunction%"===t)r=be("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=be("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(r=Ee(o.prototype))}return xe[t]=r,r}(n)),void 0===o&&!t)throw new ge("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new me("intrinsic "+e+" does not exist!")},Ue=function(e,t){if("string"!=typeof e||0===e.length)throw new ge("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new ge('"allowMissing" argument must be a boolean');if(null===Ce(/^%?[^%]*%?$/g,e))throw new me("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=Le(e),n=r.length>0?r[0]:"",o=De("%"+n+"%",t),i=o.name,a=o.value,s=!1,c=o.alias;c&&(n=c[0],Te(r,Re([0,1],c)));for(var l=1,u=!0;l<r.length;l+=1){var p=r[l],f=Ne(p,0,1),d=Ne(p,-1);if(('"'===f||"'"===f||"`"===f||'"'===d||"'"===d||"`"===d)&&f!==d)throw new me("property names with quotes must have matching quotes");if("constructor"!==p&&u||(s=!0),he(xe,i="%"+(n+="."+p)+"%"))a=xe[i];else if(null!=a){if(!(p in a)){if(!t)throw new ge("base intrinsic for "+e+" exists, but the property is not available.");return}if(Se&&l+1>=r.length){var y=Se(a,p);a=(u=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:a[p]}else u=he(a,p),a=a[p];u&&!s&&(xe[i]=a)}}return a},Be=function(e,t,r){return function(e){var t=Ue("%Function.prototype.apply%"),r=Ue("%Function.prototype.call%"),n=Ue("%Reflect.apply%",!0)||ye.call(r,t),o=Ue("%Object.getOwnPropertyDescriptor%",!0),i=Ue("%Object.defineProperty%",!0),a=Ue("%Math.max%");if(i)try{i({},"a",{value:1})}catch(e){i=null}e.exports=function(e){var t=n(ye,r,arguments);if(o&&i){var s=o(t,"length");s.configurable&&i(t,"length",{value:1+a(0,e.length-(arguments.length-1))})}return t};var s=function(){return n(ye,t,arguments)};i?i(e.exports,"apply",{value:s}):e.exports.apply=s}(r={path:void 0,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}()}}),r.exports}(),Ve=Be(Ue("String.prototype.indexOf")),_e=function(e,t){var r=Ue(e,!!t);return"function"==typeof r&&Ve(e,".prototype.")>-1?Be(r):r},We=z({__proto__:null,default:{}}),qe="function"==typeof Map&&Map.prototype,He=Object.getOwnPropertyDescriptor&&qe?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ge=qe&&He&&"function"==typeof He.get?He.get:null,ze=qe&&Map.prototype.forEach,Je="function"==typeof Set&&Set.prototype,$e=Object.getOwnPropertyDescriptor&&Je?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Qe=Je&&$e&&"function"==typeof $e.get?$e.get:null,Xe=Je&&Set.prototype.forEach,Ke="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,Ze="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Ye="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,et=Boolean.prototype.valueOf,tt=Object.prototype.toString,rt=Function.prototype.toString,nt=String.prototype.match,ot=String.prototype.slice,it=String.prototype.replace,at=String.prototype.toUpperCase,st=String.prototype.toLowerCase,ct=RegExp.prototype.test,lt=Array.prototype.concat,ut=Array.prototype.join,pt=Array.prototype.slice,ft=Math.floor,dt="function"==typeof BigInt?BigInt.prototype.valueOf:null,yt=Object.getOwnPropertySymbols,ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,mt="function"==typeof Symbol&&"object"==typeof Symbol.iterator,vt="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol,1)?Symbol.toStringTag:null,gt=Object.prototype.propertyIsEnumerable,bt=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function St(e,t){if(Infinity===e||-Infinity===e||e!=e||e&&e>-1e3&&e<1e3||ct.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-ft(-e):ft(e);if(n!==e){var o=String(n),i=ot.call(t,o.length+1);return it.call(o,r,"$&_")+"."+it.call(it.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return it.call(t,r,"$&_")}var wt=We.custom,jt=xt(wt)?wt:null;function Ot(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function Et(e){return it.call(String(e),/"/g,"&quot;")}function At(e){return!("[object Array]"!==Tt(e)||vt&&"object"==typeof e&&vt in e)}function Pt(e){return!("[object RegExp]"!==Tt(e)||vt&&"object"==typeof e&&vt in e)}function xt(e){if(mt)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!ht)return!1;try{return ht.call(e),!0}catch(e){}return!1}var kt=Object.prototype.hasOwnProperty||function(e){return e in this};function Rt(e,t){return kt.call(e,t)}function Tt(e){return tt.call(e)}function It(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function Nt(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+at.call(t.toString(16))}function Ct(e){return"Object("+e+")"}function Ft(e){return e+" { ? }"}function Mt(e,t,r,n){return e+" ("+t+") {"+(n?Lt(r,n):ut.call(r,", "))+"}"}function Lt(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+ut.call(e,","+r)+"\n"+t.prev}function Dt(e,t){var r=At(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=Rt(e,o)?t(e[o],e):""}var i,a="function"==typeof yt?yt(e):[];if(mt){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var c in e)Rt(e,c)&&(r&&String(Number(c))===c&&c<e.length||mt&&i["$"+c]instanceof Symbol||(ct.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof yt)for(var l=0;l<a.length;l++)gt.call(e,a[l])&&n.push("["+t(a[l])+"]: "+t(e[a[l]],e));return n}var Ut=Ue("%TypeError%"),Bt=Ue("%WeakMap%",!0),Vt=Ue("%Map%",!0),_t=_e("WeakMap.prototype.get",!0),Wt=_e("WeakMap.prototype.set",!0),qt=_e("WeakMap.prototype.has",!0),Ht=_e("Map.prototype.get",!0),Gt=_e("Map.prototype.set",!0),zt=_e("Map.prototype.has",!0),Jt=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},$t=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new Ut("Side channel does not contain "+function e(t,r,n,o){var i=r||{};if(Rt(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Rt(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&Infinity!==i.maxStringLength:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!Rt(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Rt(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Rt(i,"numericSeparator")&&"boolean"!=typeof i.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function e(t,r){if(t.length>r.maxStringLength){var n=t.length-r.maxStringLength,o="... "+n+" more character"+(n>1?"s":"");return e(ot.call(t,0,r.maxStringLength),r)+o}return Ot(it.call(it.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Nt),"single",r)}(t,i);if("number"==typeof t){if(0===t)return Infinity/t>0?"0":"-0";var c=String(t);return s?St(t,c):c}if("bigint"==typeof t){var l=String(t)+"n";return s?St(t,l):l}var u=void 0===i.depth?5:i.depth;if(void 0===n&&(n=0),n>=u&&u>0&&"object"==typeof t)return At(t)?"[Array]":"[Object]";var p,f=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=ut.call(Array(e.indent+1)," ")}return{base:r,prev:ut.call(Array(t+1),r)}}(i,n);if(void 0===o)o=[];else if(It(o,t)>=0)return"[Circular]";function d(t,r,a){if(r&&(o=pt.call(o)).push(r),a){var s={depth:i.depth};return Rt(i,"quoteStyle")&&(s.quoteStyle=i.quoteStyle),e(t,s,n+1,o)}return e(t,i,n+1,o)}if("function"==typeof t&&!Pt(t)){var y=function(e){if(e.name)return e.name;var t=nt.call(rt.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),h=Dt(t,d);return"[Function"+(y?": "+y:" (anonymous)")+"]"+(h.length>0?" { "+ut.call(h,", ")+" }":"")}if(xt(t)){var m=mt?it.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):ht.call(t);return"object"!=typeof t||mt?m:Ct(m)}if((p=t)&&"object"==typeof p&&("undefined"!=typeof HTMLElement&&p instanceof HTMLElement||"string"==typeof p.nodeName&&"function"==typeof p.getAttribute)){for(var v="<"+st.call(String(t.nodeName)),g=t.attributes||[],b=0;b<g.length;b++)v+=" "+g[b].name+"="+Ot(Et(g[b].value),"double",i);return v+=">",t.childNodes&&t.childNodes.length&&(v+="..."),v+"</"+st.call(String(t.nodeName))+">"}if(At(t)){if(0===t.length)return"[]";var S=Dt(t,d);return f&&!function(e){for(var t=0;t<e.length;t++)if(It(e[t],"\n")>=0)return!1;return!0}(S)?"["+Lt(S,f)+"]":"[ "+ut.call(S,", ")+" ]"}if(function(e){return!("[object Error]"!==Tt(e)||vt&&"object"==typeof e&&vt in e)}(t)){var w=Dt(t,d);return"cause"in Error.prototype||!("cause"in t)||gt.call(t,"cause")?0===w.length?"["+String(t)+"]":"{ ["+String(t)+"] "+ut.call(w,", ")+" }":"{ ["+String(t)+"] "+ut.call(lt.call("[cause]: "+d(t.cause),w),", ")+" }"}if("object"==typeof t&&a){if(jt&&"function"==typeof t[jt]&&We)return We(t,{depth:u-n});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!Ge||!e||"object"!=typeof e)return!1;try{Ge.call(e);try{Qe.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var j=[];return ze.call(t,function(e,r){j.push(d(r,t,!0)+" => "+d(e,t))}),Mt("Map",Ge.call(t),j,f)}if(function(e){if(!Qe||!e||"object"!=typeof e)return!1;try{Qe.call(e);try{Ge.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var O=[];return Xe.call(t,function(e){O.push(d(e,t))}),Mt("Set",Qe.call(t),O,f)}if(function(e){if(!Ke||!e||"object"!=typeof e)return!1;try{Ke.call(e,Ke);try{Ze.call(e,Ze)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Ft("WeakMap");if(function(e){if(!Ze||!e||"object"!=typeof e)return!1;try{Ze.call(e,Ze);try{Ke.call(e,Ke)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Ft("WeakSet");if(function(e){if(!Ye||!e||"object"!=typeof e)return!1;try{return Ye.call(e),!0}catch(e){}return!1}(t))return Ft("WeakRef");if(function(e){return!("[object Number]"!==Tt(e)||vt&&"object"==typeof e&&vt in e)}(t))return Ct(d(Number(t)));if(function(e){if(!e||"object"!=typeof e||!dt)return!1;try{return dt.call(e),!0}catch(e){}return!1}(t))return Ct(d(dt.call(t)));if(function(e){return!("[object Boolean]"!==Tt(e)||vt&&"object"==typeof e&&vt in e)}(t))return Ct(et.call(t));if(function(e){return!("[object String]"!==Tt(e)||vt&&"object"==typeof e&&vt in e)}(t))return Ct(d(String(t)));if(!function(e){return!("[object Date]"!==Tt(e)||vt&&"object"==typeof e&&vt in e)}(t)&&!Pt(t)){var E=Dt(t,d),A=bt?bt(t)===Object.prototype:t instanceof Object||t.constructor===Object,P=t instanceof Object?"":"null prototype",x=!A&&vt&&Object(t)===t&&vt in t?ot.call(Tt(t),8,-1):P?"Object":"",k=(A||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(x||P?"["+ut.call(lt.call([],x||[],P||[]),": ")+"] ":"");return 0===E.length?k+"{}":f?k+"{"+Lt(E,f)+"}":k+"{ "+ut.call(E,", ")+" }"}return String(t)}(e))},get:function(n){if(Bt&&n&&("object"==typeof n||"function"==typeof n)){if(e)return _t(e,n)}else if(Vt){if(t)return Ht(t,n)}else if(r)return function(e,t){var r=Jt(e,t);return r&&r.value}(r,n)},has:function(n){if(Bt&&n&&("object"==typeof n||"function"==typeof n)){if(e)return qt(e,n)}else if(Vt){if(t)return zt(t,n)}else if(r)return function(e,t){return!!Jt(e,t)}(r,n);return!1},set:function(n,o){Bt&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new Bt),Wt(e,n,o)):Vt?(t||(t=new Vt),Gt(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=Jt(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n},Qt=String.prototype.replace,Xt=/%20/g,Kt={default:"RFC3986",formatters:{RFC1738:function(e){return Qt.call(e,Xt,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:"RFC3986"},Zt=Object.prototype.hasOwnProperty,Yt=Array.isArray,er=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),tr=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},rr={arrayToObject:tr,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],a=Object.keys(i),s=0;s<a.length;++s){var c=a[s],l=i[c];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:i,prop:c}),r.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(Yt(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,n,o){if(0===e.length)return e;var i=e;if("symbol"==typeof e?i=Symbol.prototype.toString.call(e):"string"!=typeof e&&(i=String(e)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var a="",s=0;s<i.length;++s){var c=i.charCodeAt(s);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===Kt.RFC1738&&(40===c||41===c)?a+=i.charAt(s):c<128?a+=er[c]:c<2048?a+=er[192|c>>6]+er[128|63&c]:c<55296||c>=57344?a+=er[224|c>>12]+er[128|c>>6&63]+er[128|63&c]:(c=65536+((1023&c)<<10|1023&i.charCodeAt(s+=1)),a+=er[240|c>>18]+er[128|c>>12&63]+er[128|c>>6&63]+er[128|63&c])}return a},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(Yt(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(Yt(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!Zt.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var o=t;return Yt(t)&&!Yt(r)&&(o=tr(t,n)),Yt(t)&&Yt(r)?(r.forEach(function(r,o){if(Zt.call(t,o)){var i=t[o];i&&"object"==typeof i&&r&&"object"==typeof r?t[o]=e(i,r,n):t.push(r)}else t[o]=r}),t):Object.keys(r).reduce(function(t,o){var i=r[o];return t[o]=Zt.call(t,o)?e(t[o],i,n):i,t},o)}},nr=Object.prototype.hasOwnProperty,or={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},ir=Array.isArray,ar=String.prototype.split,sr=Array.prototype.push,cr=function(e,t){sr.apply(e,ir(t)?t:[t])},lr=Date.prototype.toISOString,ur=Kt.default,pr={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:rr.encode,encodeValuesOnly:!1,format:ur,formatter:Kt.formatters[ur],indices:!1,serializeDate:function(e){return lr.call(e)},skipNulls:!1,strictNullHandling:!1},fr={},dr=function e(t,r,n,o,i,a,s,c,l,u,p,f,d,y,h,m){for(var v,g=t,b=m,S=0,w=!1;void 0!==(b=b.get(fr))&&!w;){var j=b.get(t);if(S+=1,void 0!==j){if(j===S)throw new RangeError("Cyclic object value");w=!0}void 0===b.get(fr)&&(S=0)}if("function"==typeof c?g=c(r,g):g instanceof Date?g=p(g):"comma"===n&&ir(g)&&(g=rr.maybeMap(g,function(e){return e instanceof Date?p(e):e})),null===g){if(i)return s&&!y?s(r,pr.encoder,h,"key",f):r;g=""}if("string"==typeof(v=g)||"number"==typeof v||"boolean"==typeof v||"symbol"==typeof v||"bigint"==typeof v||rr.isBuffer(g)){if(s){var O=y?r:s(r,pr.encoder,h,"key",f);if("comma"===n&&y){for(var E=ar.call(String(g),","),A="",P=0;P<E.length;++P)A+=(0===P?"":",")+d(s(E[P],pr.encoder,h,"value",f));return[d(O)+(o&&ir(g)&&1===E.length?"[]":"")+"="+A]}return[d(O)+"="+d(s(g,pr.encoder,h,"value",f))]}return[d(r)+"="+d(String(g))]}var x,k=[];if(void 0===g)return k;if("comma"===n&&ir(g))x=[{value:g.length>0?g.join(",")||null:void 0}];else if(ir(c))x=c;else{var R=Object.keys(g);x=l?R.sort(l):R}for(var T=o&&ir(g)&&1===g.length?r+"[]":r,I=0;I<x.length;++I){var N=x[I],C="object"==typeof N&&void 0!==N.value?N.value:g[N];if(!a||null!==C){var F=ir(g)?"function"==typeof n?n(T,N):T:T+(u?"."+N:"["+N+"]");m.set(t,S);var M=$t();M.set(fr,m),cr(k,e(C,F,n,o,i,a,s,c,l,u,p,f,d,y,h,M))}}return k},yr=Object.prototype.hasOwnProperty,hr=Array.isArray,mr={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:rr.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},vr=function(e){return e.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},gr=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},br=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(o),s=a?o.slice(0,a.index):o,c=[];if(s){if(!r.plainObjects&&yr.call(Object.prototype,s)&&!r.allowPrototypes)return;c.push(s)}for(var l=0;r.depth>0&&null!==(a=i.exec(o))&&l<r.depth;){if(l+=1,!r.plainObjects&&yr.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(a[1])}return a&&c.push("["+o.slice(a.index)+"]"),function(e,t,r,n){for(var o=n?t:gr(t,r),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(c,10);r.parseArrays||""!==c?!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[])[l]=o:"__proto__"!==c&&(a[c]=o):a={0:o}}o=a}return o}(c,t,r,n)}},Sr=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===wr}(e)}(e)},wr="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function jr(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Pr(Array.isArray(e)?[]:{},e,t):e}function Or(e,t,r){return e.concat(t).map(function(e){return jr(e,r)})}function Er(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return e.propertyIsEnumerable(t)}):[]}(e))}function Ar(e,t){try{return t in e}catch(e){return!1}}function Pr(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||Or,r.isMergeableObject=r.isMergeableObject||Sr,r.cloneUnlessOtherwiseSpecified=jr;var n=Array.isArray(t);return n===Array.isArray(e)?n?r.arrayMerge(e,t,r):function(e,t,r){var n={};return r.isMergeableObject(e)&&Er(e).forEach(function(t){n[t]=jr(e[t],r)}),Er(t).forEach(function(o){(function(e,t){return Ar(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(n[o]=Ar(e,o)&&r.isMergeableObject(t[o])?function(e,t){if(!t.customMerge)return Pr;var r=t.customMerge(e);return"function"==typeof r?r:Pr}(o,r)(e[o],t[o],r):jr(t[o],r))}),n}(e,t,r):jr(t,r)}Pr.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,r){return Pr(e,r,t)},{})};var xr,kr=Pr;function Rr(e){return new URL(e.toString(),window.location.toString())}function Tr(t,r,n,o){void 0===o&&(o="brackets");var i=/^https?:\/\//.test(r.toString()),a=i||r.toString().startsWith("/"),s=!a&&!r.toString().startsWith("#")&&!r.toString().startsWith("?"),c=r.toString().includes("?")||t===e.Method.GET&&Object.keys(n).length,l=r.toString().includes("#"),u=new URL(r.toString(),"http://localhost");return t===e.Method.GET&&Object.keys(n).length&&(u.search=function(e,t){var r,n=e,o=function(e){if(!e)return pr;if(null!=e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||pr.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Kt.default;if(void 0!==e.format){if(!nr.call(Kt.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=Kt.formatters[r],o=pr.filter;return("function"==typeof e.filter||ir(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:pr.addQueryPrefix,allowDots:void 0===e.allowDots?pr.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:pr.charsetSentinel,delimiter:void 0===e.delimiter?pr.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:pr.encode,encoder:"function"==typeof e.encoder?e.encoder:pr.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:pr.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:pr.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:pr.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:pr.strictNullHandling}}(t);"function"==typeof o.filter?n=(0,o.filter)("",n):ir(o.filter)&&(r=o.filter);var i=[];if("object"!=typeof n||null===n)return"";var a=or[t&&t.arrayFormat in or?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices"];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var s="comma"===a&&t&&t.commaRoundTrip;r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var c=$t(),l=0;l<r.length;++l){var u=r[l];o.skipNulls&&null===n[u]||cr(i,dr(n[u],u,a,s,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,c))}var p=i.join(o.delimiter),f=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&(f+="iso-8859-1"===o.charset?"utf8=%26%2310003%3B&":"utf8=%E2%9C%93&"),p.length>0?f+p:""}(kr(function(e,t){var r=function(e){if(!e)return mr;if(null!=e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");return{allowDots:void 0===e.allowDots?mr.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:mr.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:mr.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:mr.arrayLimit,charset:void 0===e.charset?mr.charset:e.charset,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:mr.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:mr.comma,decoder:"function"==typeof e.decoder?e.decoder:mr.decoder,delimiter:"string"==typeof e.delimiter||rr.isRegExp(e.delimiter)?e.delimiter:mr.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:mr.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:mr.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:mr.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:mr.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:mr.strictNullHandling}}({ignoreQueryPrefix:!0});if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function(e,t){var r,n={},o=(t.ignoreQueryPrefix?e.replace(/^\?/,""):e).split(t.delimiter,Infinity===t.parameterLimit?void 0:t.parameterLimit),i=-1,a=t.charset;if(t.charsetSentinel)for(r=0;r<o.length;++r)0===o[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===o[r]?a="utf-8":"utf8=%26%2310003%3B"===o[r]&&(a="iso-8859-1"),i=r,r=o.length);for(r=0;r<o.length;++r)if(r!==i){var s,c,l=o[r],u=l.indexOf("]="),p=-1===u?l.indexOf("="):u+1;-1===p?(s=t.decoder(l,mr.decoder,a,"key"),c=t.strictNullHandling?null:""):(s=t.decoder(l.slice(0,p),mr.decoder,a,"key"),c=rr.maybeMap(gr(l.slice(p+1),t),function(e){return t.decoder(e,mr.decoder,a,"value")})),c&&t.interpretNumericEntities&&"iso-8859-1"===a&&(c=vr(c)),l.indexOf("[]=")>-1&&(c=hr(c)?[c]:c),n[s]=yr.call(n,s)?rr.combine(n[s],c):c}return n}(e,r):e,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),a=0;a<i.length;++a){var s=i[a],c=br(s,n[s],r,"string"==typeof e);o=rr.merge(o,c,r)}return!0===r.allowSparse?o:rr.compact(o)}(u.search),n),{encodeValuesOnly:!0,arrayFormat:o}),n={}),[[i?u.protocol+"//"+u.host:"",a?u.pathname:"",s?u.pathname.substring(1):"",c?u.search:"",l?u.hash:""].join(""),n]}function Ir(e){return(e=new URL(e.href)).hash="",e}function Nr(e,t){return document.dispatchEvent(new CustomEvent("inertia:"+e,t))}(xr=e.Method||(e.Method={})).GET="get",xr.POST="post",xr.PUT="put",xr.PATCH="patch",xr.DELETE="delete";var Cr=function(e){return Nr("finish",{detail:{visit:e}})},Fr=function(e){return Nr("navigate",{detail:{page:e}})},Mr="undefined"==typeof window,Lr=function(){function i(){this.visitId=null}var a=i.prototype;return a.init=function(e){var t=e.resolveComponent,r=e.swapComponent;this.page=e.initialPage,this.resolveComponent=t,this.swapComponent=r,this.isBackForwardVisit()?this.handleBackForwardVisit(this.page):this.isLocationVisit()?this.handleLocationVisit(this.page):this.handleInitialPageVisit(this.page),this.setupEventListeners()},a.handleInitialPageVisit=function(e){this.page.url+=window.location.hash,this.setPage(e,{preserveState:!0}).then(function(){return Fr(e)})},a.setupEventListeners=function(){window.addEventListener("popstate",this.handlePopstateEvent.bind(this)),document.addEventListener("scroll",n(this.handleScrollEvent.bind(this),100),!0)},a.scrollRegions=function(){return document.querySelectorAll("[scroll-region]")},a.handleScrollEvent=function(e){"function"==typeof e.target.hasAttribute&&e.target.hasAttribute("scroll-region")&&this.saveScrollPositions()},a.saveScrollPositions=function(){this.replaceState(t({},this.page,{scrollRegions:Array.from(this.scrollRegions()).map(function(e){return{top:e.scrollTop,left:e.scrollLeft}})}))},a.resetScrollPositions=function(){var e;window.scrollTo(0,0),this.scrollRegions().forEach(function(e){"function"==typeof e.scrollTo?e.scrollTo(0,0):(e.scrollTop=0,e.scrollLeft=0)}),this.saveScrollPositions(),window.location.hash&&(null==(e=document.getElementById(window.location.hash.slice(1)))||e.scrollIntoView())},a.restoreScrollPositions=function(){var e=this;this.page.scrollRegions&&this.scrollRegions().forEach(function(t,r){var n=e.page.scrollRegions[r];n&&("function"==typeof t.scrollTo?t.scrollTo(n.left,n.top):(t.scrollTop=n.top,t.scrollLeft=n.left))})},a.isBackForwardVisit=function(){return window.history.state&&window.performance&&window.performance.getEntriesByType("navigation").length>0&&"back_forward"===window.performance.getEntriesByType("navigation")[0].type},a.handleBackForwardVisit=function(e){var t=this;window.history.state.version=e.version,this.setPage(window.history.state,{preserveScroll:!0,preserveState:!0}).then(function(){t.restoreScrollPositions(),Fr(e)})},a.locationVisit=function(e,t){try{window.sessionStorage.setItem("inertiaLocationVisit",JSON.stringify({preserveScroll:t})),window.location.href=e.href,Ir(window.location).href===Ir(e).href&&window.location.reload()}catch(e){return!1}},a.isLocationVisit=function(){try{return null!==window.sessionStorage.getItem("inertiaLocationVisit")}catch(e){return!1}},a.handleLocationVisit=function(e){var t,r,n,o,i=this,a=JSON.parse(window.sessionStorage.getItem("inertiaLocationVisit")||"");window.sessionStorage.removeItem("inertiaLocationVisit"),e.url+=window.location.hash,e.rememberedState=null!=(t=null==(r=window.history.state)?void 0:r.rememberedState)?t:{},e.scrollRegions=null!=(n=null==(o=window.history.state)?void 0:o.scrollRegions)?n:[],this.setPage(e,{preserveScroll:a.preserveScroll,preserveState:!0}).then(function(){a.preserveScroll&&i.restoreScrollPositions(),Fr(e)})},a.isLocationVisitResponse=function(e){return e&&409===e.status&&e.headers["x-inertia-location"]},a.isInertiaResponse=function(e){return null==e?void 0:e.headers["x-inertia"]},a.createVisitId=function(){return this.visitId={},this.visitId},a.cancelVisit=function(e,t){var r=t.cancelled,n=void 0!==r&&r,o=t.interrupted,i=void 0!==o&&o;!e||e.completed||e.cancelled||e.interrupted||(e.cancelToken.cancel(),e.onCancel(),e.completed=!1,e.cancelled=n,e.interrupted=i,Cr(e),e.onFinish(e))},a.finishVisit=function(e){e.cancelled||e.interrupted||(e.completed=!0,e.cancelled=!1,e.interrupted=!1,Cr(e),e.onFinish(e))},a.resolvePreserveOption=function(e,t){return"function"==typeof e?e(t):"errors"===e?Object.keys(t.props.errors||{}).length>0:e},a.visit=function(n,i){var a=this,s=void 0===i?{}:i,c=s.method,l=void 0===c?e.Method.GET:c,u=s.data,p=void 0===u?{}:u,f=s.replace,d=void 0!==f&&f,y=s.preserveScroll,h=void 0!==y&&y,m=s.preserveState,v=void 0!==m&&m,g=s.only,b=void 0===g?[]:g,S=s.headers,w=void 0===S?{}:S,j=s.errorBag,O=void 0===j?"":j,E=s.forceFormData,A=void 0!==E&&E,P=s.onCancelToken,x=void 0===P?function(){}:P,k=s.onBefore,R=void 0===k?function(){}:k,T=s.onStart,I=void 0===T?function(){}:T,N=s.onProgress,C=void 0===N?function(){}:N,F=s.onFinish,M=void 0===F?function(){}:F,L=s.onCancel,D=void 0===L?function(){}:L,U=s.onSuccess,B=void 0===U?function(){}:U,V=s.onError,_=void 0===V?function(){}:V,W=s.queryStringArrayFormat,q=void 0===W?"brackets":W,H="string"==typeof n?Rr(n):n;if(!function e(t){return t instanceof File||t instanceof Blob||t instanceof FileList&&t.length>0||t instanceof FormData&&Array.from(t.values()).some(function(t){return e(t)})||"object"==typeof t&&null!==t&&Object.values(t).some(function(t){return e(t)})}(p)&&!A||p instanceof FormData||(p=o(p)),!(p instanceof FormData)){var G=Tr(l,H,p,q),z=G[1];H=Rr(G[0]),p=z}var J={url:H,method:l,data:p,replace:d,preserveScroll:h,preserveState:v,only:b,headers:w,errorBag:O,forceFormData:A,queryStringArrayFormat:q,cancelled:!1,completed:!1,interrupted:!1};if(!1!==R(J)&&function(e){return Nr("before",{cancelable:!0,detail:{visit:e}})}(J)){this.activeVisit&&this.cancelVisit(this.activeVisit,{interrupted:!0}),this.saveScrollPositions();var $=this.createVisitId();this.activeVisit=t({},J,{onCancelToken:x,onBefore:R,onStart:I,onProgress:C,onFinish:M,onCancel:D,onSuccess:B,onError:_,queryStringArrayFormat:q,cancelToken:le.CancelToken.source()}),x({cancel:function(){a.activeVisit&&a.cancelVisit(a.activeVisit,{cancelled:!0})}}),function(e){Nr("start",{detail:{visit:e}})}(J),I(J),le({method:l,url:Ir(H).href,data:l===e.Method.GET?{}:p,params:l===e.Method.GET?p:{},cancelToken:this.activeVisit.cancelToken.token,headers:t({},w,{Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0},b.length?{"X-Inertia-Partial-Component":this.page.component,"X-Inertia-Partial-Data":b.join(",")}:{},O&&O.length?{"X-Inertia-Error-Bag":O}:{},this.page.version?{"X-Inertia-Version":this.page.version}:{}),onUploadProgress:function(e){p instanceof FormData&&(e.percentage=Math.round(e.loaded/e.total*100),function(e){Nr("progress",{detail:{progress:e}})}(e),C(e))}}).then(function(e){var r;if(!a.isInertiaResponse(e))return Promise.reject({response:e});var n=e.data;b.length&&n.component===a.page.component&&(n.props=t({},a.page.props,n.props)),h=a.resolvePreserveOption(h,n),(v=a.resolvePreserveOption(v,n))&&null!=(r=window.history.state)&&r.rememberedState&&n.component===a.page.component&&(n.rememberedState=window.history.state.rememberedState);var o=H,i=Rr(n.url);return o.hash&&!i.hash&&Ir(o).href===i.href&&(i.hash=o.hash,n.url=i.href),a.setPage(n,{visitId:$,replace:d,preserveScroll:h,preserveState:v})}).then(function(){var e=a.page.props.errors||{};if(Object.keys(e).length>0){var t=O?e[O]?e[O]:{}:e;return function(e){Nr("error",{detail:{errors:e}})}(t),_(t)}return Nr("success",{detail:{page:a.page}}),B(a.page)}).catch(function(e){if(a.isInertiaResponse(e.response))return a.setPage(e.response.data,{visitId:$});if(a.isLocationVisitResponse(e.response)){var t=Rr(e.response.headers["x-inertia-location"]),n=H;n.hash&&!t.hash&&Ir(n).href===t.href&&(t.hash=n.hash),a.locationVisit(t,!0===h)}else{if(!e.response)return Promise.reject(e);Nr("invalid",{cancelable:!0,detail:{response:e.response}})&&r.show(e.response.data)}}).then(function(){a.activeVisit&&a.finishVisit(a.activeVisit)}).catch(function(e){if(!le.isCancel(e)){var t=Nr("exception",{cancelable:!0,detail:{exception:e}});if(a.activeVisit&&a.finishVisit(a.activeVisit),t)return Promise.reject(e)}})}},a.setPage=function(e,t){var r=this,n=void 0===t?{}:t,o=n.visitId,i=void 0===o?this.createVisitId():o,a=n.replace,s=void 0!==a&&a,c=n.preserveScroll,l=void 0!==c&&c,u=n.preserveState,p=void 0!==u&&u;return Promise.resolve(this.resolveComponent(e.component)).then(function(t){i===r.visitId&&(e.scrollRegions=e.scrollRegions||[],e.rememberedState=e.rememberedState||{},(s=s||Rr(e.url).href===window.location.href)?r.replaceState(e):r.pushState(e),r.swapComponent({component:t,page:e,preserveState:p}).then(function(){l||r.resetScrollPositions(),s||Fr(e)}))})},a.pushState=function(e){this.page=e,window.history.pushState(e,"",e.url)},a.replaceState=function(e){this.page=e,window.history.replaceState(e,"",e.url)},a.handlePopstateEvent=function(e){var r=this;if(null!==e.state){var n=e.state,o=this.createVisitId();Promise.resolve(this.resolveComponent(n.component)).then(function(e){o===r.visitId&&(r.page=n,r.swapComponent({component:e,page:n,preserveState:!1}).then(function(){r.restoreScrollPositions(),Fr(n)}))})}else{var i=Rr(this.page.url);i.hash=window.location.hash,this.replaceState(t({},this.page,{url:i.href})),this.resetScrollPositions()}},a.get=function(r,n,o){return void 0===n&&(n={}),void 0===o&&(o={}),this.visit(r,t({},o,{method:e.Method.GET,data:n}))},a.reload=function(e){return void 0===e&&(e={}),this.visit(window.location.href,t({},e,{preserveScroll:!0,preserveState:!0}))},a.replace=function(e,r){var n;return void 0===r&&(r={}),console.warn("Inertia.replace() has been deprecated and will be removed in a future release. Please use Inertia."+(null!=(n=r.method)?n:"get")+"() instead."),this.visit(e,t({preserveState:!0},r,{replace:!0}))},a.post=function(r,n,o){return void 0===n&&(n={}),void 0===o&&(o={}),this.visit(r,t({preserveState:!0},o,{method:e.Method.POST,data:n}))},a.put=function(r,n,o){return void 0===n&&(n={}),void 0===o&&(o={}),this.visit(r,t({preserveState:!0},o,{method:e.Method.PUT,data:n}))},a.patch=function(r,n,o){return void 0===n&&(n={}),void 0===o&&(o={}),this.visit(r,t({preserveState:!0},o,{method:e.Method.PATCH,data:n}))},a.delete=function(r,n){return void 0===n&&(n={}),this.visit(r,t({preserveState:!0},n,{method:e.Method.DELETE}))},a.remember=function(e,r){var n,o;void 0===r&&(r="default"),Mr||this.replaceState(t({},this.page,{rememberedState:t({},null==(n=this.page)?void 0:n.rememberedState,(o={},o[r]=e,o))}))},a.restore=function(e){var t,r;if(void 0===e&&(e="default"),!Mr)return null==(t=window.history.state)||null==(r=t.rememberedState)?void 0:r[e]},a.on=function(e,t){var r=function(e){var r=t(e);e.cancelable&&!e.defaultPrevented&&!1===r&&e.preventDefault()};return document.addEventListener("inertia:"+e,r),function(){return document.removeEventListener("inertia:"+e,r)}},i}(),Dr={buildDOMElement:function(e){var t=document.createElement("template");t.innerHTML=e;var r=t.content.firstChild;if(!e.startsWith("<script "))return r;var n=document.createElement("script");return n.innerHTML=r.innerHTML,r.getAttributeNames().forEach(function(e){n.setAttribute(e,r.getAttribute(e)||"")}),n},isInertiaManagedElement:function(e){return e.nodeType===Node.ELEMENT_NODE&&null!==e.getAttribute("inertia")},findMatchingElementIndex:function(e,t){var r=e.getAttribute("inertia");return null!==r?t.findIndex(function(e){return e.getAttribute("inertia")===r}):-1},update:n(function(e){var t=this,r=e.map(function(e){return t.buildDOMElement(e)});Array.from(document.head.childNodes).filter(function(e){return t.isInertiaManagedElement(e)}).forEach(function(e){var n=t.findMatchingElementIndex(e,r);if(-1!==n){var o,i=r.splice(n,1)[0];i&&!e.isEqualNode(i)&&(null==e||null==(o=e.parentNode)||o.replaceChild(i,e))}else{var a;null==e||null==(a=e.parentNode)||a.removeChild(e)}}),r.forEach(function(e){return document.head.appendChild(e)})},1)},Ur=new Lr;e.Inertia=Ur,e.createHeadManager=function(e,t,r){var n={},o=0;function i(){var e=Object.values(n).reduce(function(e,t){return e.concat(t)},[]).reduce(function(e,r){if(-1===r.indexOf("<"))return e;if(0===r.indexOf("<title ")){var n=r.match(/(<title [^>]+>)(.*?)(<\/title>)/);return e.title=n?""+n[1]+t(n[2])+n[3]:r,e}var o=r.match(/ inertia="[^"]+"/);return o?e[o[0]]=r:e[Object.keys(e).length]=r,e},{});return Object.values(e)}function a(){e?r(i()):Dr.update(i())}return{createProvider:function(){var e=function(){var e=o+=1;return n[e]=[],e.toString()}();return{update:function(t){return function(e,t){void 0===t&&(t=[]),null!==e&&Object.keys(n).indexOf(e)>-1&&(n[e]=t),a()}(e,t)},disconnect:function(){return function(e){null!==e&&-1!==Object.keys(n).indexOf(e)&&(delete n[e],a())}(e)}}}}},e.hrefToUrl=Rr,e.mergeDataIntoQueryString=Tr,e.shouldIntercept=function(e){var t="a"===e.currentTarget.tagName.toLowerCase();return!(e.target&&null!=e&&e.target.isContentEditable||e.defaultPrevented||t&&e.which>1||t&&e.altKey||t&&e.ctrlKey||t&&e.metaKey||t&&e.shiftKey)},e.urlWithoutHash=Ir});
//# sourceMappingURL=index.umd.js.map