msw 0.39.2 → 0.40.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/iife/index.js CHANGED
@@ -4,7 +4,7 @@ var MockServiceWorker=function(e){"use strict";var t={100:"Continue",101:"Switch
4
4
  * Copyright(c) 2012-2014 Roman Shtylman
5
5
  * Copyright(c) 2015 Douglas Christopher Wilson
6
6
  * MIT Licensed
7
- */k.flattenHeadersObject=function(e){return D.reduceHeadersObject(e,(function(e,t,r){return e[t]=[].concat(r).join("; "),e}),{})},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.flattenHeadersObject=e.flattenHeadersList=e.reduceHeadersObject=e.objectToHeaders=e.listToHeaders=e.stringToHeaders=e.headersToObject=e.headersToList=e.headersToString=e.Headers=void 0;var t=i;Object.defineProperty(e,"Headers",{enumerable:!0,get:function(){return t.default}});var r=m;Object.defineProperty(e,"headersToString",{enumerable:!0,get:function(){return r.headersToString}});var n=v;Object.defineProperty(e,"headersToList",{enumerable:!0,get:function(){return n.headersToList}});var o=E;Object.defineProperty(e,"headersToObject",{enumerable:!0,get:function(){return o.headersToObject}});var s=w;Object.defineProperty(e,"stringToHeaders",{enumerable:!0,get:function(){return s.stringToHeaders}});var a=T;Object.defineProperty(e,"listToHeaders",{enumerable:!0,get:function(){return a.listToHeaders}});var c=O;Object.defineProperty(e,"objectToHeaders",{enumerable:!0,get:function(){return c.objectToHeaders}});var u=C;Object.defineProperty(e,"reduceHeadersObject",{enumerable:!0,get:function(){return u.reduceHeadersObject}});var l=A;Object.defineProperty(e,"flattenHeadersList",{enumerable:!0,get:function(){return l.flattenHeadersList}});var d=k;Object.defineProperty(e,"flattenHeadersObject",{enumerable:!0,get:function(){return d.flattenHeadersObject}})}(o);var P=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},n=t||{},o=e.split(";"),i=n.decode||F,s=0;s<o.length;s++){var a=o[s],c=a.indexOf("=");if(!(c<0)){var u=a.substring(0,c).trim();if(null==r[u]){var l=a.substring(c+1,a.length).trim();'"'===l[0]&&(l=l.slice(1,-1)),r[u]=q(l,i)}}}return r},M=function(e,t,r){var n=r||{},o=n.encode||j;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!U.test(e))throw new TypeError("argument name is invalid");var i=o(t);if(i&&!U.test(i))throw new TypeError("argument val is invalid");var s=e+"="+i;if(null!=n.maxAge){var a=n.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(n.domain){if(!U.test(n.domain))throw new TypeError("option domain is invalid");s+="; Domain="+n.domain}if(n.path){if(!U.test(n.path))throw new TypeError("option path is invalid");s+="; Path="+n.path}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires="+n.expires.toUTCString()}n.httpOnly&&(s+="; HttpOnly");n.secure&&(s+="; Secure");if(n.sameSite){switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},F=decodeURIComponent,j=encodeURIComponent,U=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function q(e,t){try{return t(e)}catch(t){return e}}const H=(e,t,r)=>n=>{const o=M(e,t,r);return n.headers.set("Set-Cookie",o),"undefined"!=typeof document&&(document.cookie=o),n},$=e=>t=>(t.body=e,t);function B(e){try{return JSON.parse(e)}catch(e){return}}function V(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)}function G(e,t){return Object.entries(t).reduce(((e,[t,r])=>{const n=e[t];return Array.isArray(n)&&Array.isArray(r)?(e[t]=n.concat(r),e):V(n)&&V(r)?(e[t]=G(n,r),e):(e[t]=r,e)}),Object.assign({},e))}const K=e=>t=>(t.headers.set("Content-Type","application/json"),t.body=JSON.stringify(e),t),X=e=>t=>{const r=G(B(t.body)||{},{data:e});return K(r)(t)},Y=e=>t=>{const r=G(B(t.body)||{},{extensions:e});return K(r)(t)};var W={exports:{}};!function(e,t){!function(e){function t(){return"undefined"!=typeof navigator&&"ReactNative"===navigator.product||!("undefined"==typeof process||!process.versions||!process.versions.node)}e.isNodeProcess=t,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,W.exports);const z=2147483647,J=()=>W.exports.isNodeProcess()?5:Math.floor(300*Math.random()+100),Q=e=>t=>{let r;if("string"==typeof e)switch(e){case"infinite":r=z;break;case"real":r=J();break;default:throw new Error(`Failed to delay a response: unknown delay mode "${e}". Please make sure you provide one of the supported modes ("real", "infinite") or a number to "ctx.delay".`)}else if(void 0===e)r=J();else{if(e>z)throw new Error(`Failed to delay a response: provided delay duration (${e}) exceeds the maximum allowed duration for "setTimeout" (2147483647). This will cause the response to be returned immediately. Please use a number within the allowed range to delay the response by exact duration, or consider the "infinite" delay mode to delay the response indefinitely.`);r=e}return t.delay=r,t},Z=e=>t=>{if(null==e)return t;const r=G(B(t.body)||{},{errors:e});return K(r)(t)},ee=W.exports.isNodeProcess()?require("node-fetch"):window.fetch,te=e=>{const t=new o.Headers(e.headers);return t.set("x-msw-bypass","true"),Object.assign(Object.assign({},e),{headers:t.all()})},re=(e,t={})=>{if("string"==typeof e)return ee(e,te(t));const r=(e=>{const{body:t,method:r}=e,n=Object.assign(Object.assign({},e),{body:void 0});return["GET","HEAD"].includes(r)||(n.body="object"==typeof t||"number"==typeof t||"boolean"==typeof t?JSON.stringify(t):t),n})(e),n=te(r);return ee(e.url.href,n)},ne=e=>t=>(t.headers.set("Content-Type","text/plain"),t.body=e,t),oe=e=>t=>(t.headers.set("Content-Type","text/xml"),t.body=e,t);var ie,se=Object.freeze({__proto__:null,status:r,set:L,cookie:H,body:$,data:X,extensions:Y,delay:Q,errors:Z,fetch:re,json:K,text:ne,xml:oe}),ae={},ce={},ue={exports:{}},le="object"==typeof Reflect?Reflect:null,de=le&&"function"==typeof le.apply?le.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};ie=le&&"function"==typeof le.ownKeys?le.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var pe=Number.isNaN||function(e){return e!=e};function he(){he.init.call(this)}ue.exports=he,ue.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}Te(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&Te(e,"error",t,r)}(e,o,{once:!0})}))},he.EventEmitter=he,he.prototype._events=void 0,he.prototype._eventsCount=0,he.prototype._maxListeners=void 0;var fe=10;function me(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function ve(e){return void 0===e._maxListeners?he.defaultMaxListeners:e._maxListeners}function ye(e,t,r,n){var o,i,s,a;if(me(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=ve(e))>0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function ge(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Ee(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=ge.bind(n);return o.listener=r,n.wrapFn=o,o}function be(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):Ne(o,o.length)}function we(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function Ne(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function Te(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}Object.defineProperty(he,"defaultMaxListeners",{enumerable:!0,get:function(){return fe},set:function(e){if("number"!=typeof e||e<0||pe(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");fe=e}}),he.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},he.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||pe(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},he.prototype.getMaxListeners=function(){return ve(this)},he.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var a=o[e];if(void 0===a)return!1;if("function"==typeof a)de(a,this,t);else{var c=a.length,u=Ne(a,c);for(r=0;r<c;++r)de(u[r],this,t)}return!0},he.prototype.addListener=function(e,t){return ye(this,e,t,!1)},he.prototype.on=he.prototype.addListener,he.prototype.prependListener=function(e,t){return ye(this,e,t,!0)},he.prototype.once=function(e,t){return me(t),this.on(e,Ee(this,e,t)),this},he.prototype.prependOnceListener=function(e,t){return me(t),this.prependListener(e,Ee(this,e,t)),this},he.prototype.removeListener=function(e,t){var r,n,o,i,s;if(me(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},he.prototype.off=he.prototype.removeListener,he.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},he.prototype.listeners=function(e){return be(this,e,!0)},he.prototype.rawListeners=function(e){return be(this,e,!1)},he.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):we.call(e,t)},he.prototype.listenerCount=we,he.prototype.eventNames=function(){return this._eventsCount>0?ie(this._events):[]};var xe,_e=n&&n.__extends||(xe=function(e,t){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}xe(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Oe=n&&n.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)n[o]=i[s];return n};ce.__esModule=!0,ce.StrictEventEmitter=void 0;var Ce=function(e){function t(){return e.call(this)||this}return _e(t,e),t.prototype.on=function(t,r){return e.prototype.on.call(this,t.toString(),r)},t.prototype.once=function(t,r){return e.prototype.on.call(this,t.toString(),r)},t.prototype.off=function(t,r){return e.prototype.off.call(this,t.toString(),r)},t.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return e.prototype.emit.apply(this,Oe([t.toString()],r))},t.prototype.addListener=function(t,r){return e.prototype.addListener.call(this,t.toString(),r)},t.prototype.removeListener=function(t,r){return e.prototype.removeListener.call(this,t.toString(),r)},t}(ue.exports.EventEmitter);function Se(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}ce.StrictEventEmitter=Ce,function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]});e.__esModule=!0,e.StrictEventEmitter=void 0,t(e,ce,"StrictEventEmitter")}(ae);var Ie={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.until=async e=>{try{return[null,await e().catch((e=>{throw e}))]}catch(e){return[e,null]}},Object.defineProperty(Ie,"__esModule",{value:!0});var Re=Ae,ke=Ie.until=Re.until;const De=(e,t,r)=>[e.active,e.installing,e.waiting].filter(Boolean).find((e=>r(e.scriptURL,t)))||null;var Le={},Pe={},Me={};Object.defineProperty(Me,"__esModule",{value:!0}),Me.format=void 0;var Fe=/(%?)(%([sdjo]))/g;function je(e,t){switch(t){case"s":return e;case"d":case"i":return Number(e);case"j":return JSON.stringify(e);case"o":if("string"==typeof e)return e;var r=JSON.stringify(e);return"{}"===r||"[]"===r||/^\[object .+?\]$/.test(r)?e:r}}Me.format=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(0===t.length)return e;var n=0,o=e.replace(Fe,(function(e,r,o,i){var s=je(t[n],i);return r?e:(n++,s)}));return n<t.length&&(o+=" "+t.slice(n).join(" ")),o=o.replace(/%{2,2}/g,"%")};var Ue=n&&n.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),qe=n&&n.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.invariant=Pe.InvariantError=void 0;var He=Me,$e=function(e){function t(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=e.call(this,t)||this;if(o.name="Invariant Violation",o.message=He.format.apply(void 0,qe([t],r)),o.stack){var i=o.stack.split("\n");i.splice(1,2),o.stack=i.join("\n")}return o}return Ue(t,e),t}(Error);Pe.InvariantError=$e,Pe.invariant=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(!e)throw new($e.bind.apply($e,qe([void 0,t],r)))},function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=n&&n.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(Pe,e),r(Me,e)}(Le);function Be(e,...t){return`[MSW] ${Le.format(e,...t)}`}const Ve={formatMessage:Be,warn:function(e,...t){console.warn(Be(e,...t))},error:function(e,...t){console.error(Be(e,...t))}},Ge=(e,t={},r)=>Se(void 0,void 0,void 0,(function*(){const n=new URL(e,location.origin).href;const o=yield navigator.serviceWorker.getRegistrations().then((e=>e.filter((e=>De(e,n,r)))));!navigator.serviceWorker.controller&&o.length>0&&location.reload();const[i]=o;if(i)return i.update().then((()=>[De(i,n,r),i]));const[s,a]=yield ke((()=>Se(void 0,void 0,void 0,(function*(){const o=yield navigator.serviceWorker.register(e,t);return[De(o,n,r),o]}))));if(s){if(s.message.includes("(404)")){const e=new URL((null==t?void 0:t.scope)||"/",location.href);throw new Error(Ve.formatMessage(`Failed to register a Service Worker for scope ('${e.href}') with script ('${n}'): Service Worker script does not exist at the given path.\n\nDid you forget to run "npx msw init <PUBLIC_DIR>"?\n\nLearn more about creating the Service Worker script: https://mswjs.io/docs/cli/init`))}throw new Error(Ve.formatMessage("Failed to register the Service Worker:\n\n%s",s.message))}return a}));function Ke(e={}){if(e.quiet)return;const t=e.message||"Mocking enabled.";console.groupCollapsed(`%c${Ve.formatMessage(t)}`,"color:orangered;font-weight:bold;"),console.log("%cDocumentation: %chttps://mswjs.io/docs","font-weight:bold","font-weight:normal"),console.log("Found an issue? https://github.com/mswjs/msw/issues"),console.groupEnd()}class Xe extends Error{constructor(e){super(e),this.name="NetworkError"}}var Ye={},We={},ze={exports:{}},Je={decodeValues:!0,map:!1,silent:!1};function Qe(e){return"string"==typeof e&&!!e.trim()}function Ze(e,t){var r=e.split(";").filter(Qe),n=r.shift().split("="),o=n.shift(),i=n.join("=");t=t?Object.assign({},Je,t):Je;try{i=t.decodeValues?decodeURIComponent(i):i}catch(e){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+i+"'. Set options.decodeValues to false to disable this feature.",e)}var s={name:o,value:i};return r.forEach((function(e){var t=e.split("="),r=t.shift().trimLeft().toLowerCase(),n=t.join("=");"expires"===r?s.expires=new Date(n):"max-age"===r?s.maxAge=parseInt(n,10):"secure"===r?s.secure=!0:"httponly"===r?s.httpOnly=!0:"samesite"===r?s.sameSite=n:s[r]=n})),s}function et(e,t){if(t=t?Object.assign({},Je,t):Je,!e)return t.map?{}:[];if(e.headers&&e.headers["set-cookie"])e=e.headers["set-cookie"];else if(e.headers){var r=e.headers[Object.keys(e.headers).find((function(e){return"set-cookie"===e.toLowerCase()}))];r||!e.headers.cookie||t.silent||console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=r}if(Array.isArray(e)||(e=[e]),(t=t?Object.assign({},Je,t):Je).map){return e.filter(Qe).reduce((function(e,r){var n=Ze(r,t);return e[n.name]=n,e}),{})}return e.filter(Qe).map((function(e){return Ze(e,t)}))}function tt(){return P(document.cookie)}function rt(e){var t;const r=e.headers.get("cookie");Ye.store.hydrate();const n=Array.from(null===(t=Ye.store.get(Object.assign(Object.assign({},e),{url:e.url.toString()})))||void 0===t?void 0:t.entries()).reduce(((e,[t,{value:r}])=>Object.assign(e,{[t.trim()]:r})),{}),o=function(e){if("undefined"==typeof document||"undefined"==typeof location)return{};switch(e.credentials){case"same-origin":return location.origin===e.url.origin?tt():{};case"include":return tt();default:return{}}}(e),i=Object.assign(Object.assign({},o),n);for(const[t,r]of Object.entries(i))e.headers.append("cookie",`${t}=${r}`);const s=r?P(r):{};e.cookies=Object.assign(Object.assign(Object.assign({},e.cookies),i),s)}function nt(e){var t,r;const n=o.stringToHeaders(e),i=n.get("content-type")||"text/plain",s=n.get("content-disposition");if(!s)throw new Error('"Content-Disposition" header is required.');const a=s.split(";").reduce(((e,t)=>{const[r,...n]=t.trim().split("=");return e[r]=n.join("="),e}),{});return{name:null===(t=a.name)||void 0===t?void 0:t.slice(1,-1),filename:null===(r=a.filename)||void 0===r?void 0:r.slice(1,-1),contentType:i}}function ot(e,t){var r;if(!e)return e;const n=(null===(r=null==t?void 0:t.get("content-type"))||void 0===r?void 0:r.toLowerCase())||"";if(n.startsWith("multipart/form-data")&&"object"!=typeof e)return function(e,t){const r=null==t?void 0:t.get("content-type");if(!r)return;const[,...n]=r.split(/; */),o=n.filter((e=>e.startsWith("boundary="))).map((e=>e.replace(/^boundary=/,"")))[0];if(!o)return;const i=new RegExp(`--+${o}`),s=e.split(i).filter((e=>e.startsWith("\r\n")&&e.endsWith("\r\n"))).map((e=>e.trimStart().replace(/\r\n$/,"")));if(!s.length)return;const a={};try{for(const e of s){const[t,...r]=e.split("\r\n\r\n"),n=r.join("\r\n\r\n"),{contentType:o,filename:i,name:s}=nt(t),c=void 0===i?n:new File([n],i,{type:o}),u=a[s];void 0===u?a[s]=c:Array.isArray(u)?a[s]=[...u,c]:a[s]=[u,c]}return a}catch(e){return}}(e.toString(),t)||e;return n.includes("json")&&"object"!=typeof e&&B(e.toString())||e}function it(e,t){return e.toLowerCase()===t.toLowerCase()}function st(e){if(!e.method||!it(e.method,"GET")||""!==e.body)return e.body}ze.exports=et,ze.exports.parse=et,ze.exports.parseString=Ze,ze.exports.splitCookiesString=function(e){if(Array.isArray(e))return e;if("string"!=typeof e)return[];var t,r,n,o,i,s=[],a=0;function c(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,i=!1;c();)if(","===(r=e.charAt(a))){for(n=a,a+=1,c(),o=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(i=!0,a=o,s.push(e.substring(t,n)),t=a):a=n+1}else a+=1;(!i||a>=e.length)&&s.push(e.substring(t,e.length))}return s},function(e){var t=n&&n.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};Object.defineProperty(e,"__esModule",{value:!0}),e.store=e.PERSISTENCY_KEY=void 0;const r=ze.exports;function o(){try{return null!=localStorage&&(localStorage.setItem("test","test"),localStorage.getItem("test"),!0)}catch(e){return!1}}e.PERSISTENCY_KEY="MSW_COOKIE_STORE";e.store=new class{constructor(){this.store=new Map}add(e,n){if("omit"===e.credentials)return;const o=new URL(e.url),i=n.headers.get("set-cookie");if(!i)return;const s=Date.now(),a=r.parse(i).map((e=>{var{maxAge:r}=e,n=t(e,["maxAge"]);return Object.assign(Object.assign({},n),{expires:void 0===r?n.expires:new Date(s+1e3*r),maxAge:r})})),c=this.store.get(o.origin)||new Map;a.forEach((e=>{this.store.set(o.origin,c.set(e.name,e))}))}get(e){this.deleteExpiredCookies();const t=new URL(e.url),n=this.store.get(t.origin)||new Map;switch(e.credentials){case"include":return r.parse(document.cookie).forEach((e=>{n.set(e.name,e)})),n;case"same-origin":return n;default:return new Map}}getAll(){return this.deleteExpiredCookies(),this.store}deleteAll(e){const t=new URL(e.url);this.store.delete(t.origin)}clear(){this.store.clear()}hydrate(){if(!o())return;const r=localStorage.getItem(e.PERSISTENCY_KEY);if(r)try{JSON.parse(r).forEach((([e,r])=>{this.store.set(e,new Map(r.map((e=>{var[r,n]=e,{expires:o}=n,i=t(n,["expires"]);return[r,void 0===o?i:Object.assign(Object.assign({},i),{expires:new Date(o)})]}))))}))}catch(t){console.warn(`\n[virtual-cookie] Failed to parse a stored cookie from the localStorage (key "${e.PERSISTENCY_KEY}").\n\nStored value:\n${localStorage.getItem(e.PERSISTENCY_KEY)}\n\nThrown exception:\n${t}\n\nInvalid value has been removed from localStorage to prevent subsequent failed parsing attempts.`),localStorage.removeItem(e.PERSISTENCY_KEY)}}persist(){if(!o())return;const t=Array.from(this.store.entries()).map((([e,t])=>[e,Array.from(t.entries())]));localStorage.setItem(e.PERSISTENCY_KEY,JSON.stringify(t))}deleteExpiredCookies(){const e=Date.now();this.store.forEach(((t,r)=>{t.forEach((({expires:r,name:n})=>{void 0!==r&&r.getTime()<=e&&t.delete(n)})),0===t.size&&this.store.delete(r)}))}}}(We),function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=n&&n.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(We,e)}(Ye);var at=function(){function e(e,t,r,n,o){return e<t||r<t?e>r?r+1:e+1:n===o?t:t+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var o=t.length,i=r.length;o>0&&t.charCodeAt(o-1)===r.charCodeAt(i-1);)o--,i--;for(var s=0;s<o&&t.charCodeAt(s)===r.charCodeAt(s);)s++;if(i-=s,0===(o-=s)||i<3)return i;var a,c,u,l,d,p,h,f,m,v,y,g,E=0,b=[];for(a=0;a<o;a++)b.push(a+1),b.push(t.charCodeAt(s+a));for(var w=b.length-1;E<i-3;)for(m=r.charCodeAt(s+(c=E)),v=r.charCodeAt(s+(u=E+1)),y=r.charCodeAt(s+(l=E+2)),g=r.charCodeAt(s+(d=E+3)),p=E+=4,a=0;a<w;a+=2)c=e(h=b[a],c,u,m,f=b[a+1]),u=e(c,u,l,v,f),l=e(u,l,d,y,f),p=e(l,d,p,g,f),b[a]=p,d=l,l=u,u=c,c=h;for(;E<i;)for(m=r.charCodeAt(s+(c=E)),p=++E,a=0;a<w;a+=2)h=b[a],b[a]=p=e(h,c,p,m,b[a+1]),c=h;return p}}();function ct(e,t){if(!Boolean(e))throw new Error(t)}function ut(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}const lt=/\r\n|[\n\r]/g;function dt(e,t){let r=0,n=1;for(const o of e.body.matchAll(lt)){if("number"==typeof o.index||ut(!1),o.index>=t)break;r=o.index+o[0].length,n+=1}return{line:n,column:t+1-r}}function pt(e){return ht(e.source,dt(e.source,e.start))}function ht(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,o=t.line-1,i=e.locationOffset.line-1,s=t.line+i,a=1===t.line?r:0,c=t.column+a,u=`${e.name}:${s}:${c}\n`,l=n.split(/\r\n|[\n\r]/g),d=l[o];if(d.length>120){const e=Math.floor(c/80),t=c%80,r=[];for(let e=0;e<d.length;e+=80)r.push(d.slice(e,e+80));return u+ft([[`${s} |`,r[0]],...r.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",r[e+1]]])}return u+ft([[s-1+" |",l[o-1]],[`${s} |`,d],["|","^".padStart(c)],[`${s+1} |`,l[o+1]]])}function ft(e){const t=e.filter((([e,t])=>void 0!==t)),r=Math.max(...t.map((([e])=>e.length)));return t.map((([e,t])=>e.padStart(r)+(t?" "+t:""))).join("\n")}class mt extends Error{constructor(e,...t){var r,n,o;const{nodes:i,source:s,positions:a,path:c,originalError:u,extensions:l}=function(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=c?c:void 0,this.originalError=null!=u?u:void 0,this.nodes=vt(Array.isArray(i)?i:i?[i]:void 0);const d=vt(null===(r=this.nodes)||void 0===r?void 0:r.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=s?s:null==d||null===(n=d[0])||void 0===n?void 0:n.source,this.positions=null!=a?a:null==d?void 0:d.map((e=>e.start)),this.locations=a&&s?a.map((e=>dt(s,e))):null==d?void 0:d.map((e=>dt(e.source,e.start)));const p="object"==typeof(h=null==u?void 0:u.extensions)&&null!==h?null==u?void 0:u.extensions:void 0;var h;this.extensions=null!==(o=null!=l?l:p)&&void 0!==o?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=u&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,mt):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const t of this.nodes)t.loc&&(e+="\n\n"+pt(t.loc));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+ht(this.source,t);return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function vt(e){return void 0===e||0===e.length?void 0:e}function yt(e,t,r){return new mt(`Syntax Error: ${r}`,void 0,e,[t])}class gt{constructor(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Et{constructor(e,t,r,n,o,i){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=o,this.value=i,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}let bt,wt,Nt,Tt;function xt(e){return e>=48&&e<=57}function _t(e){return e>=97&&e<=122||e>=65&&e<=90}function Ot(e){return _t(e)||95===e}function Ct(e){return _t(e)||xt(e)||95===e}function St(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,o=-1;for(let t=0;t<e.length;++t){var i;const s=e[t],a=It(s);a!==s.length&&(n=null!==(i=n)&&void 0!==i?i:t,o=t,0!==t&&a<r&&(r=a))}return e.map(((e,t)=>0===t?e:e.slice(r))).slice(null!==(t=n)&&void 0!==t?t:0,o+1)}function It(e){let t=0;for(;t<e.length&&(9===(r=e.charCodeAt(t))||32===r);)++t;var r;return t}!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(bt||(bt={})),function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(wt||(wt={})),function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"}(Nt||(Nt={})),function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"}(Tt||(Tt={}));class At{constructor(e){const t=new Et(Tt.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){this.lastToken=this.token;return this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==Tt.EOF)do{if(e.next)e=e.next;else{const t=Ft(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===Tt.COMMENT);return e}}function Rt(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function kt(e,t){return Dt(e.charCodeAt(t))&&Lt(e.charCodeAt(t+1))}function Dt(e){return e>=55296&&e<=56319}function Lt(e){return e>=56320&&e<=57343}function Pt(e,t){const r=e.source.body.codePointAt(t);if(void 0===r)return Tt.EOF;if(r>=32&&r<=126){const e=String.fromCodePoint(r);return'"'===e?"'\"'":`"${e}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function Mt(e,t,r,n,o){const i=e.line,s=1+r-e.lineStart;return new Et(t,r,n,i,s,o)}function Ft(e,t){const r=e.source.body,n=r.length;let o=t;for(;o<n;){const t=r.charCodeAt(o);switch(t){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++e.line,e.lineStart=o;continue;case 13:10===r.charCodeAt(o+1)?o+=2:++o,++e.line,e.lineStart=o;continue;case 35:return jt(e,o);case 33:return Mt(e,Tt.BANG,o,o+1);case 36:return Mt(e,Tt.DOLLAR,o,o+1);case 38:return Mt(e,Tt.AMP,o,o+1);case 40:return Mt(e,Tt.PAREN_L,o,o+1);case 41:return Mt(e,Tt.PAREN_R,o,o+1);case 46:if(46===r.charCodeAt(o+1)&&46===r.charCodeAt(o+2))return Mt(e,Tt.SPREAD,o,o+3);break;case 58:return Mt(e,Tt.COLON,o,o+1);case 61:return Mt(e,Tt.EQUALS,o,o+1);case 64:return Mt(e,Tt.AT,o,o+1);case 91:return Mt(e,Tt.BRACKET_L,o,o+1);case 93:return Mt(e,Tt.BRACKET_R,o,o+1);case 123:return Mt(e,Tt.BRACE_L,o,o+1);case 124:return Mt(e,Tt.PIPE,o,o+1);case 125:return Mt(e,Tt.BRACE_R,o,o+1);case 34:return 34===r.charCodeAt(o+1)&&34===r.charCodeAt(o+2)?Xt(e,o):Ht(e,o)}if(xt(t)||45===t)return Ut(e,o,t);if(Ot(t))return Yt(e,o);throw yt(e.source,o,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":Rt(t)||kt(r,o)?`Unexpected character: ${Pt(e,o)}.`:`Invalid character: ${Pt(e,o)}.`)}return Mt(e,Tt.EOF,n,n)}function jt(e,t){const r=e.source.body,n=r.length;let o=t+1;for(;o<n;){const e=r.charCodeAt(o);if(10===e||13===e)break;if(Rt(e))++o;else{if(!kt(r,o))break;o+=2}}return Mt(e,Tt.COMMENT,t,o,r.slice(t+1,o))}function Ut(e,t,r){const n=e.source.body;let o=t,i=r,s=!1;if(45===i&&(i=n.charCodeAt(++o)),48===i){if(i=n.charCodeAt(++o),xt(i))throw yt(e.source,o,`Invalid number, unexpected digit after 0: ${Pt(e,o)}.`)}else o=qt(e,o,i),i=n.charCodeAt(o);if(46===i&&(s=!0,i=n.charCodeAt(++o),o=qt(e,o,i),i=n.charCodeAt(o)),69!==i&&101!==i||(s=!0,i=n.charCodeAt(++o),43!==i&&45!==i||(i=n.charCodeAt(++o)),o=qt(e,o,i),i=n.charCodeAt(o)),46===i||Ot(i))throw yt(e.source,o,`Invalid number, expected digit but got: ${Pt(e,o)}.`);return Mt(e,s?Tt.FLOAT:Tt.INT,t,o,n.slice(t,o))}function qt(e,t,r){if(!xt(r))throw yt(e.source,t,`Invalid number, expected digit but got: ${Pt(e,t)}.`);const n=e.source.body;let o=t+1;for(;xt(n.charCodeAt(o));)++o;return o}function Ht(e,t){const r=e.source.body,n=r.length;let o=t+1,i=o,s="";for(;o<n;){const n=r.charCodeAt(o);if(34===n)return s+=r.slice(i,o),Mt(e,Tt.STRING,t,o+1,s);if(92!==n){if(10===n||13===n)break;if(Rt(n))++o;else{if(!kt(r,o))throw yt(e.source,o,`Invalid character within String: ${Pt(e,o)}.`);o+=2}}else{s+=r.slice(i,o);const t=117===r.charCodeAt(o+1)?123===r.charCodeAt(o+2)?$t(e,o):Bt(e,o):Kt(e,o);s+=t.value,o+=t.size,i=o}}throw yt(e.source,o,"Unterminated string.")}function $t(e,t){const r=e.source.body;let n=0,o=3;for(;o<12;){const e=r.charCodeAt(t+o++);if(125===e){if(o<5||!Rt(n))break;return{value:String.fromCodePoint(n),size:o}}if(n=n<<4|Gt(e),n<0)break}throw yt(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+o)}".`)}function Bt(e,t){const r=e.source.body,n=Vt(r,t+2);if(Rt(n))return{value:String.fromCodePoint(n),size:6};if(Dt(n)&&92===r.charCodeAt(t+6)&&117===r.charCodeAt(t+7)){const e=Vt(r,t+8);if(Lt(e))return{value:String.fromCodePoint(n,e),size:12}}throw yt(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function Vt(e,t){return Gt(e.charCodeAt(t))<<12|Gt(e.charCodeAt(t+1))<<8|Gt(e.charCodeAt(t+2))<<4|Gt(e.charCodeAt(t+3))}function Gt(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Kt(e,t){const r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw yt(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function Xt(e,t){const r=e.source.body,n=r.length;let o=e.lineStart,i=t+3,s=i,a="";const c=[];for(;i<n;){const n=r.charCodeAt(i);if(34===n&&34===r.charCodeAt(i+1)&&34===r.charCodeAt(i+2)){a+=r.slice(s,i),c.push(a);const n=Mt(e,Tt.BLOCK_STRING,t,i+3,St(c).join("\n"));return e.line+=c.length-1,e.lineStart=o,n}if(92!==n||34!==r.charCodeAt(i+1)||34!==r.charCodeAt(i+2)||34!==r.charCodeAt(i+3))if(10!==n&&13!==n)if(Rt(n))++i;else{if(!kt(r,i))throw yt(e.source,i,`Invalid character within String: ${Pt(e,i)}.`);i+=2}else a+=r.slice(s,i),c.push(a),13===n&&10===r.charCodeAt(i+1)?i+=2:++i,a="",s=i,o=i;else a+=r.slice(s,i),s=i+1,i+=4}throw yt(e.source,i,"Unterminated string.")}function Yt(e,t){const r=e.source.body,n=r.length;let o=t+1;for(;o<n;){if(!Ct(r.charCodeAt(o)))break;++o}return Mt(e,Tt.NAME,t,o,r.slice(t,o))}function Wt(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:Wt(t,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const r=Math.min(10,e.length),n=e.length-r,o=[];for(let n=0;n<r;++n)o.push(Wt(e[n],t));1===n?o.push("... 1 more item"):n>1&&o.push(`... ${n} more items`);return"["+o.join(", ")+"]"}(e,r);return function(e,t){const r=Object.entries(e);if(0===r.length)return"{}";if(t.length>2)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";return"{ "+r.map((([e,r])=>e+": "+Wt(r,t))).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}class zt{constructor(e,t="GraphQL request",r={line:1,column:1}){var n;"string"==typeof e||ct(!1,`Body must be a string. Received: ${n=e,Wt(n,[])}.`),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||ct(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||ct(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}class Jt{constructor(e,t){const r=function(e){return e instanceof zt}(e)?e:new zt(e);this._lexer=new At(r),this._options=t}parseName(){const e=this.expectToken(Tt.NAME);return this.node(e,{kind:Nt.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:Nt.DOCUMENT,definitions:this.many(Tt.SOF,this.parseDefinition,Tt.EOF)})}parseDefinition(){if(this.peek(Tt.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===Tt.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw yt(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(Tt.BRACE_L))return this.node(e,{kind:Nt.OPERATION_DEFINITION,operation:bt.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let r;return this.peek(Tt.NAME)&&(r=this.parseName()),this.node(e,{kind:Nt.OPERATION_DEFINITION,operation:t,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(Tt.NAME);switch(e.value){case"query":return bt.QUERY;case"mutation":return bt.MUTATION;case"subscription":return bt.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Tt.PAREN_L,this.parseVariableDefinition,Tt.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Nt.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Tt.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Tt.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(Tt.DOLLAR),this.node(e,{kind:Nt.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Nt.SELECTION_SET,selections:this.many(Tt.BRACE_L,this.parseSelection,Tt.BRACE_R)})}parseSelection(){return this.peek(Tt.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let r,n;return this.expectOptionalToken(Tt.COLON)?(r=t,n=this.parseName()):n=t,this.node(e,{kind:Nt.FIELD,alias:r,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Tt.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Tt.PAREN_L,t,Tt.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,r=this.parseName();return this.expectToken(Tt.COLON),this.node(t,{kind:Nt.ARGUMENT,name:r,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(Tt.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(Tt.NAME)?this.node(e,{kind:Nt.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:Nt.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){var e;const t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacyFragmentVariables)?this.node(t,{kind:Nt.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:Nt.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case Tt.BRACKET_L:return this.parseList(e);case Tt.BRACE_L:return this.parseObject(e);case Tt.INT:return this._lexer.advance(),this.node(t,{kind:Nt.INT,value:t.value});case Tt.FLOAT:return this._lexer.advance(),this.node(t,{kind:Nt.FLOAT,value:t.value});case Tt.STRING:case Tt.BLOCK_STRING:return this.parseStringLiteral();case Tt.NAME:switch(this._lexer.advance(),t.value){case"true":return this.node(t,{kind:Nt.BOOLEAN,value:!0});case"false":return this.node(t,{kind:Nt.BOOLEAN,value:!1});case"null":return this.node(t,{kind:Nt.NULL});default:return this.node(t,{kind:Nt.ENUM,value:t.value})}case Tt.DOLLAR:if(e){if(this.expectToken(Tt.DOLLAR),this._lexer.token.kind===Tt.NAME){const e=this._lexer.token.value;throw yt(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this._lexer.advance(),this.node(e,{kind:Nt.STRING,value:e.value,block:e.kind===Tt.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:Nt.LIST,values:this.any(Tt.BRACKET_L,(()=>this.parseValueLiteral(e)),Tt.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:Nt.OBJECT,fields:this.any(Tt.BRACE_L,(()=>this.parseObjectField(e)),Tt.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,r=this.parseName();return this.expectToken(Tt.COLON),this.node(t,{kind:Nt.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(Tt.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(Tt.AT),this.node(t,{kind:Nt.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(Tt.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(Tt.BRACKET_R),t=this.node(e,{kind:Nt.LIST_TYPE,type:r})}else t=this.parseNamedType();return this.expectOptionalToken(Tt.BANG)?this.node(e,{kind:Nt.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:Nt.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Tt.STRING)||this.peek(Tt.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.many(Tt.BRACE_L,this.parseOperationTypeDefinition,Tt.BRACE_R);return this.node(e,{kind:Nt.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(Tt.COLON);const r=this.parseNamedType();return this.node(e,{kind:Nt.OPERATION_TYPE_DEFINITION,operation:t,type:r})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();return this.node(e,{kind:Nt.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),i=this.parseFieldsDefinition();return this.node(e,{kind:Nt.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:o,fields:i})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Tt.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Tt.BRACE_L,this.parseFieldDefinition,Tt.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(Tt.COLON);const o=this.parseTypeReference(),i=this.parseConstDirectives();return this.node(e,{kind:Nt.FIELD_DEFINITION,description:t,name:r,arguments:n,type:o,directives:i})}parseArgumentDefs(){return this.optionalMany(Tt.PAREN_L,this.parseInputValueDef,Tt.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(Tt.COLON);const n=this.parseTypeReference();let o;this.expectOptionalToken(Tt.EQUALS)&&(o=this.parseConstValueLiteral());const i=this.parseConstDirectives();return this.node(e,{kind:Nt.INPUT_VALUE_DEFINITION,description:t,name:r,type:n,defaultValue:o,directives:i})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),i=this.parseFieldsDefinition();return this.node(e,{kind:Nt.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:o,fields:i})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(e,{kind:Nt.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(Tt.EQUALS)?this.delimitedMany(Tt.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(e,{kind:Nt.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:o})}parseEnumValuesDefinition(){return this.optionalMany(Tt.BRACE_L,this.parseEnumValueDefinition,Tt.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(e,{kind:Nt.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw yt(this._lexer.source,this._lexer.token.start,`${Qt(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(e,{kind:Nt.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(Tt.BRACE_L,this.parseInputValueDef,Tt.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===Tt.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),r=this.optionalMany(Tt.BRACE_L,this.parseOperationTypeDefinition,Tt.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Nt.SCHEMA_EXTENSION,directives:t,operationTypes:r})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),r=this.parseConstDirectives();if(0===r.length)throw this.unexpected();return this.node(e,{kind:Nt.SCALAR_TYPE_EXTENSION,name:t,directives:r})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===o.length)throw this.unexpected();return this.node(e,{kind:Nt.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:o})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===o.length)throw this.unexpected();return this.node(e,{kind:Nt.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:o})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:Nt.UNION_TYPE_EXTENSION,name:t,directives:r,types:n})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:Nt.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:Nt.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Tt.AT);const r=this.parseName(),n=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const i=this.parseDirectiveLocations();return this.node(e,{kind:Nt.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:o,locations:i})}parseDirectiveLocations(){return this.delimitedMany(Tt.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(wt,t.value))return t;throw this.unexpected(e)}node(e,t){var r;return!0!==(null===(r=this._options)||void 0===r?void 0:r.noLocation)&&(t.loc=new gt(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw yt(this._lexer.source,t.start,`Expected ${Zt(e)}, found ${Qt(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this._lexer.advance(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==Tt.NAME||t.value!==e)throw yt(this._lexer.source,t.start,`Expected "${e}", found ${Qt(t)}.`);this._lexer.advance()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===Tt.NAME&&t.value===e&&(this._lexer.advance(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return yt(this._lexer.source,t.start,`Unexpected ${Qt(t)}.`)}any(e,t,r){this.expectToken(e);const n=[];for(;!this.expectOptionalToken(r);)n.push(t.call(this));return n}optionalMany(e,t,r){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(r));return e}return[]}many(e,t,r){this.expectToken(e);const n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}delimitedMany(e,t){this.expectOptionalToken(e);const r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r}}function Qt(e){const t=e.value;return Zt(e.kind)+(null!=t?` "${t}"`:"")}function Zt(e){return function(e){return e===Tt.BANG||e===Tt.DOLLAR||e===Tt.AMP||e===Tt.PAREN_L||e===Tt.PAREN_R||e===Tt.SPREAD||e===Tt.COLON||e===Tt.EQUALS||e===Tt.AT||e===Tt.BRACKET_L||e===Tt.BRACKET_R||e===Tt.BRACE_L||e===Tt.PIPE||e===Tt.BRACE_R}(e)?`"${e}"`:e}const er=e=>e.referrer.startsWith(e.url.origin)?e.url.pathname:new URL(e.url.pathname,`${e.url.protocol}//${e.url.host}`).href;function tr(e){var t;const r=e.definitions.find((e=>"OperationDefinition"===e.kind));return{operationType:null==r?void 0:r.operation,operationName:null===(t=null==r?void 0:r.name)||void 0===t?void 0:t.value}}function rr(e){try{return tr(new Jt(e,t).parseDocument())}catch(e){return e}var t}function nr(e){var t,r;switch(e.method){case"GET":return{query:e.url.searchParams.get("query"),variables:B(e.url.searchParams.get("variables")||"")};case"POST":if(null===(t=e.body)||void 0===t?void 0:t.query){const{query:t,variables:r}=e.body;return{query:t,variables:r}}if(null===(r=e.body)||void 0===r?void 0:r.operations){const t=e.body,{operations:r,map:n}=t,o=
7
+ */k.flattenHeadersObject=function(e){return D.reduceHeadersObject(e,(function(e,t,r){return e[t]=[].concat(r).join("; "),e}),{})},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.flattenHeadersObject=e.flattenHeadersList=e.reduceHeadersObject=e.objectToHeaders=e.listToHeaders=e.stringToHeaders=e.headersToObject=e.headersToList=e.headersToString=e.Headers=void 0;var t=i;Object.defineProperty(e,"Headers",{enumerable:!0,get:function(){return t.default}});var r=m;Object.defineProperty(e,"headersToString",{enumerable:!0,get:function(){return r.headersToString}});var n=v;Object.defineProperty(e,"headersToList",{enumerable:!0,get:function(){return n.headersToList}});var o=E;Object.defineProperty(e,"headersToObject",{enumerable:!0,get:function(){return o.headersToObject}});var s=w;Object.defineProperty(e,"stringToHeaders",{enumerable:!0,get:function(){return s.stringToHeaders}});var a=T;Object.defineProperty(e,"listToHeaders",{enumerable:!0,get:function(){return a.listToHeaders}});var c=O;Object.defineProperty(e,"objectToHeaders",{enumerable:!0,get:function(){return c.objectToHeaders}});var u=C;Object.defineProperty(e,"reduceHeadersObject",{enumerable:!0,get:function(){return u.reduceHeadersObject}});var l=A;Object.defineProperty(e,"flattenHeadersList",{enumerable:!0,get:function(){return l.flattenHeadersList}});var d=k;Object.defineProperty(e,"flattenHeadersObject",{enumerable:!0,get:function(){return d.flattenHeadersObject}})}(o);var P=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var r={},n=t||{},o=e.split(";"),i=n.decode||F,s=0;s<o.length;s++){var a=o[s],c=a.indexOf("=");if(!(c<0)){var u=a.substring(0,c).trim();if(null==r[u]){var l=a.substring(c+1,a.length).trim();'"'===l[0]&&(l=l.slice(1,-1)),r[u]=q(l,i)}}}return r},M=function(e,t,r){var n=r||{},o=n.encode||j;if("function"!=typeof o)throw new TypeError("option encode is invalid");if(!U.test(e))throw new TypeError("argument name is invalid");var i=o(t);if(i&&!U.test(i))throw new TypeError("argument val is invalid");var s=e+"="+i;if(null!=n.maxAge){var a=n.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");s+="; Max-Age="+Math.floor(a)}if(n.domain){if(!U.test(n.domain))throw new TypeError("option domain is invalid");s+="; Domain="+n.domain}if(n.path){if(!U.test(n.path))throw new TypeError("option path is invalid");s+="; Path="+n.path}if(n.expires){if("function"!=typeof n.expires.toUTCString)throw new TypeError("option expires is invalid");s+="; Expires="+n.expires.toUTCString()}n.httpOnly&&(s+="; HttpOnly");n.secure&&(s+="; Secure");if(n.sameSite){switch("string"==typeof n.sameSite?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},F=decodeURIComponent,j=encodeURIComponent,U=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function q(e,t){try{return t(e)}catch(t){return e}}const H=(e,t,r)=>n=>{const o=M(e,t,r);return n.headers.set("Set-Cookie",o),"undefined"!=typeof document&&(document.cookie=o),n},$=e=>t=>(t.body=e,t);function B(e){try{return JSON.parse(e)}catch(e){return}}function V(e){return null!=e&&"object"==typeof e&&!Array.isArray(e)}function G(e,t){return Object.entries(t).reduce(((e,[t,r])=>{const n=e[t];return Array.isArray(n)&&Array.isArray(r)?(e[t]=n.concat(r),e):V(n)&&V(r)?(e[t]=G(n,r),e):(e[t]=r,e)}),Object.assign({},e))}const K=e=>t=>(t.headers.set("Content-Type","application/json"),t.body=JSON.stringify(e),t),X=e=>t=>{const r=G(B(t.body)||{},{data:e});return K(r)(t)},W=e=>t=>{const r=G(B(t.body)||{},{extensions:e});return K(r)(t)};var Y={exports:{}};!function(e,t){!function(e){function t(){return"undefined"!=typeof navigator&&"ReactNative"===navigator.product||!("undefined"==typeof process||!process.versions||!process.versions.node)}e.isNodeProcess=t,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,Y.exports);const z=2147483647,J=()=>Y.exports.isNodeProcess()?5:Math.floor(300*Math.random()+100),Q=e=>t=>{let r;if("string"==typeof e)switch(e){case"infinite":r=z;break;case"real":r=J();break;default:throw new Error(`Failed to delay a response: unknown delay mode "${e}". Please make sure you provide one of the supported modes ("real", "infinite") or a number to "ctx.delay".`)}else if(void 0===e)r=J();else{if(e>z)throw new Error(`Failed to delay a response: provided delay duration (${e}) exceeds the maximum allowed duration for "setTimeout" (2147483647). This will cause the response to be returned immediately. Please use a number within the allowed range to delay the response by exact duration, or consider the "infinite" delay mode to delay the response indefinitely.`);r=e}return t.delay=r,t},Z=e=>t=>{if(null==e)return t;const r=G(B(t.body)||{},{errors:e});return K(r)(t)},ee=Y.exports.isNodeProcess()?require("node-fetch"):window.fetch,te=e=>{const t=new o.Headers(e.headers);return t.set("x-msw-bypass","true"),Object.assign(Object.assign({},e),{headers:t.all()})},re=(e,t={})=>{if("string"==typeof e)return ee(e,te(t));const r=(e=>{const{body:t,method:r}=e,n=Object.assign(Object.assign({},e),{body:void 0});return["GET","HEAD"].includes(r)||(n.body="object"==typeof t||"number"==typeof t||"boolean"==typeof t?JSON.stringify(t):t),n})(e),n=te(r);return ee(e.url.href,n)},ne=e=>t=>(t.headers.set("Content-Type","text/plain"),t.body=e,t),oe=e=>t=>(t.headers.set("Content-Type","text/xml"),t.body=e,t);var ie,se=Object.freeze({__proto__:null,status:r,set:L,cookie:H,body:$,data:X,extensions:W,delay:Q,errors:Z,fetch:re,json:K,text:ne,xml:oe}),ae={},ce={},ue={exports:{}},le="object"==typeof Reflect?Reflect:null,de=le&&"function"==typeof le.apply?le.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};ie=le&&"function"==typeof le.ownKeys?le.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var pe=Number.isNaN||function(e){return e!=e};function he(){he.init.call(this)}ue.exports=he,ue.exports.once=function(e,t){return new Promise((function(r,n){function o(r){e.removeListener(t,i),n(r)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),r([].slice.call(arguments))}Te(e,t,i,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&Te(e,"error",t,r)}(e,o,{once:!0})}))},he.EventEmitter=he,he.prototype._events=void 0,he.prototype._eventsCount=0,he.prototype._maxListeners=void 0;var fe=10;function me(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function ve(e){return void 0===e._maxListeners?he.defaultMaxListeners:e._maxListeners}function ye(e,t,r,n){var o,i,s,a;if(me(r),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]),void 0===s)s=i[t]=r,++e._eventsCount;else if("function"==typeof s?s=i[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(o=ve(e))>0&&s.length>o&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,a=c,console&&console.warn&&console.warn(a)}return e}function ge(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Ee(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},o=ge.bind(n);return o.listener=r,n.wrapFn=o,o}function be(e,t,r){var n=e._events;if(void 0===n)return[];var o=n[t];return void 0===o?[]:"function"==typeof o?r?[o.listener||o]:[o]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(o):Ne(o,o.length)}function we(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function Ne(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function Te(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){n.once&&e.removeEventListener(t,o),r(i)}))}}Object.defineProperty(he,"defaultMaxListeners",{enumerable:!0,get:function(){return fe},set:function(e){if("number"!=typeof e||e<0||pe(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");fe=e}}),he.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},he.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||pe(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},he.prototype.getMaxListeners=function(){return ve(this)},he.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,o=this._events;if(void 0!==o)n=n&&void 0===o.error;else if(!n)return!1;if(n){var i;if(t.length>0&&(i=t[0]),i instanceof Error)throw i;var s=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw s.context=i,s}var a=o[e];if(void 0===a)return!1;if("function"==typeof a)de(a,this,t);else{var c=a.length,u=Ne(a,c);for(r=0;r<c;++r)de(u[r],this,t)}return!0},he.prototype.addListener=function(e,t){return ye(this,e,t,!1)},he.prototype.on=he.prototype.addListener,he.prototype.prependListener=function(e,t){return ye(this,e,t,!0)},he.prototype.once=function(e,t){return me(t),this.on(e,Ee(this,e,t)),this},he.prototype.prependOnceListener=function(e,t){return me(t),this.prependListener(e,Ee(this,e,t)),this},he.prototype.removeListener=function(e,t){var r,n,o,i,s;if(me(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(o=-1,i=r.length-1;i>=0;i--)if(r[i]===t||r[i].listener===t){s=r[i].listener,o=i;break}if(o<0)return this;0===o?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,o),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},he.prototype.off=he.prototype.removeListener,he.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var o,i=Object.keys(r);for(n=0;n<i.length;++n)"removeListener"!==(o=i[n])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},he.prototype.listeners=function(e){return be(this,e,!0)},he.prototype.rawListeners=function(e){return be(this,e,!1)},he.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):we.call(e,t)},he.prototype.listenerCount=we,he.prototype.eventNames=function(){return this._eventsCount>0?ie(this._events):[]};var xe,_e=n&&n.__extends||(xe=function(e,t){return(xe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}xe(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),Oe=n&&n.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)n[o]=i[s];return n};ce.__esModule=!0,ce.StrictEventEmitter=void 0;var Ce=function(e){function t(){return e.call(this)||this}return _e(t,e),t.prototype.on=function(t,r){return e.prototype.on.call(this,t.toString(),r)},t.prototype.once=function(t,r){return e.prototype.on.call(this,t.toString(),r)},t.prototype.off=function(t,r){return e.prototype.off.call(this,t.toString(),r)},t.prototype.emit=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return e.prototype.emit.apply(this,Oe([t.toString()],r))},t.prototype.addListener=function(t,r){return e.prototype.addListener.call(this,t.toString(),r)},t.prototype.removeListener=function(t,r){return e.prototype.removeListener.call(this,t.toString(),r)},t}(ue.exports.EventEmitter);function Se(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}ce.StrictEventEmitter=Ce,function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]});e.__esModule=!0,e.StrictEventEmitter=void 0,t(e,ce,"StrictEventEmitter")}(ae);var Ie={},Ae={};Object.defineProperty(Ae,"__esModule",{value:!0}),Ae.until=async e=>{try{return[null,await e().catch((e=>{throw e}))]}catch(e){return[e,null]}},Object.defineProperty(Ie,"__esModule",{value:!0});var Re=Ae,ke=Ie.until=Re.until;const De=(e,t,r)=>[e.active,e.installing,e.waiting].filter(Boolean).find((e=>r(e.scriptURL,t)))||null;var Le={},Pe={},Me={};Object.defineProperty(Me,"__esModule",{value:!0}),Me.format=void 0;var Fe=/(%?)(%([sdjo]))/g;function je(e,t){switch(t){case"s":return e;case"d":case"i":return Number(e);case"j":return JSON.stringify(e);case"o":if("string"==typeof e)return e;var r=JSON.stringify(e);return"{}"===r||"[]"===r||/^\[object .+?\]$/.test(r)?e:r}}Me.format=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(0===t.length)return e;var n=0,o=e.replace(Fe,(function(e,r,o,i){var s=je(t[n],i);return r?e:(n++,s)}));return n<t.length&&(o+=" "+t.slice(n).join(" ")),o=o.replace(/%{2,2}/g,"%")};var Ue=n&&n.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),qe=n&&n.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.invariant=Pe.InvariantError=void 0;var He=Me,$e=function(e){function t(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=e.call(this,t)||this;if(o.name="Invariant Violation",o.message=He.format.apply(void 0,qe([t],r)),o.stack){var i=o.stack.split("\n");i.splice(1,2),o.stack=i.join("\n")}return o}return Ue(t,e),t}(Error);Pe.InvariantError=$e,Pe.invariant=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];if(!e)throw new($e.bind.apply($e,qe([void 0,t],r)))},function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=n&&n.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(Pe,e),r(Me,e)}(Le);function Be(e,...t){return`[MSW] ${Le.format(e,...t)}`}const Ve={formatMessage:Be,warn:function(e,...t){console.warn(Be(e,...t))},error:function(e,...t){console.error(Be(e,...t))}},Ge=(e,t={},r)=>Se(void 0,void 0,void 0,(function*(){const n=new URL(e,location.origin).href;const o=yield navigator.serviceWorker.getRegistrations().then((e=>e.filter((e=>De(e,n,r)))));!navigator.serviceWorker.controller&&o.length>0&&location.reload();const[i]=o;if(i)return i.update().then((()=>[De(i,n,r),i]));const[s,a]=yield ke((()=>Se(void 0,void 0,void 0,(function*(){const o=yield navigator.serviceWorker.register(e,t);return[De(o,n,r),o]}))));if(s){if(s.message.includes("(404)")){const e=new URL((null==t?void 0:t.scope)||"/",location.href);throw new Error(Ve.formatMessage(`Failed to register a Service Worker for scope ('${e.href}') with script ('${n}'): Service Worker script does not exist at the given path.\n\nDid you forget to run "npx msw init <PUBLIC_DIR>"?\n\nLearn more about creating the Service Worker script: https://mswjs.io/docs/cli/init`))}throw new Error(Ve.formatMessage("Failed to register the Service Worker:\n\n%s",s.message))}return a}));function Ke(e={}){if(e.quiet)return;const t=e.message||"Mocking enabled.";console.groupCollapsed(`%c${Ve.formatMessage(t)}`,"color:orangered;font-weight:bold;"),console.log("%cDocumentation: %chttps://mswjs.io/docs","font-weight:bold","font-weight:normal"),console.log("Found an issue? https://github.com/mswjs/msw/issues"),e.workerUrl&&console.log("Worker script URL:",e.workerUrl),e.workerScope&&console.log("Worker scope:",e.workerScope),console.groupEnd()}class Xe extends Error{constructor(e){super(e),this.name="NetworkError"}}function We(...e){return(...t)=>e.reduceRight(((e,t)=>e instanceof Promise?Promise.resolve(e).then(t):t(e)),t[0])}const Ye={status:200,statusText:"OK",body:null,delay:0,once:!1,passthrough:!1},ze=[];function Je(e,t=ze){return(...r)=>Se(this,void 0,void 0,(function*(){const n=Object.assign({},Ye,{headers:new o.Headers({"x-powered-by":"msw"})},e),i=[...t,...r].filter(Boolean);return i.length>0?We(...i)(n):n}))}const Qe=Object.assign(Je(),{once:Je({once:!0}),networkError(e){throw new Xe(e)}}),Ze=/(node_modules)?[\/\\]lib[\/\\](umd|esm|iief|cjs)[\/\\]|^[^\/\\]*$/;const et={status:r,set:L,delay:Q,fetch:re};class tt{constructor(e){this.shouldSkip=!1,this.ctx=e.ctx||et,this.resolver=e.resolver;const t=function(e){const t=e.stack;if(!t)return;const r=t.split("\n").slice(1).find((e=>!Ze.test(e)));if(!r)return;return r.replace(/\s*at [^()]*\(([^)]+)\)/,"$1").replace(/^@/,"")}(new Error);this.info=Object.assign(Object.assign({},e.info),{callFrame:t})}parse(e,t){return null}test(e,t){return this.predicate(e,this.parse(e,t),t)}getPublicRequest(e,t){return e}markAsSkipped(e=!0){this.shouldSkip=e}run(e,t){return Se(this,void 0,void 0,(function*(){if(this.shouldSkip)return null;const r=this.parse(e,t);if(!this.predicate(e,r,t))return null;const n=this.getPublicRequest(e,r),o=this.wrapResolver(this.resolver),i=yield o(n,Qe,this.ctx);return this.createExecutionResult(r,n,i)}))}wrapResolver(e){return(t,r,n)=>Se(this,void 0,void 0,(function*(){const o=this.resolverGenerator||(yield e(t,r,n));if((i=o)&&"function"==typeof i[Symbol.iterator]){const{value:e,done:t}=o[Symbol.iterator]().next(),r=yield e;return!r&&t?this.resolverGeneratorResult:(this.resolverGenerator||(this.resolverGenerator=o),this.resolverGeneratorResult=r,r)}var i;return o}))}createExecutionResult(e,t,r){return{handler:this,parsedResult:e||null,request:t,response:r||null}}}function rt(){return{status:101,statusText:"Continue",headers:new o.Headers,body:null,passthrough:!0,once:!1}}var nt={},ot={},it={exports:{}},st={decodeValues:!0,map:!1,silent:!1};function at(e){return"string"==typeof e&&!!e.trim()}function ct(e,t){var r=e.split(";").filter(at),n=r.shift().split("="),o=n.shift(),i=n.join("=");t=t?Object.assign({},st,t):st;try{i=t.decodeValues?decodeURIComponent(i):i}catch(e){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+i+"'. Set options.decodeValues to false to disable this feature.",e)}var s={name:o,value:i};return r.forEach((function(e){var t=e.split("="),r=t.shift().trimLeft().toLowerCase(),n=t.join("=");"expires"===r?s.expires=new Date(n):"max-age"===r?s.maxAge=parseInt(n,10):"secure"===r?s.secure=!0:"httponly"===r?s.httpOnly=!0:"samesite"===r?s.sameSite=n:s[r]=n})),s}function ut(e,t){if(t=t?Object.assign({},st,t):st,!e)return t.map?{}:[];if(e.headers&&e.headers["set-cookie"])e=e.headers["set-cookie"];else if(e.headers){var r=e.headers[Object.keys(e.headers).find((function(e){return"set-cookie"===e.toLowerCase()}))];r||!e.headers.cookie||t.silent||console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),e=r}if(Array.isArray(e)||(e=[e]),(t=t?Object.assign({},st,t):st).map){return e.filter(at).reduce((function(e,r){var n=ct(r,t);return e[n.name]=n,e}),{})}return e.filter(at).map((function(e){return ct(e,t)}))}function lt(){return P(document.cookie)}function dt(e){var t;const r=e.headers.get("cookie");nt.store.hydrate();const n=Array.from(null===(t=nt.store.get(Object.assign(Object.assign({},e),{url:e.url.toString()})))||void 0===t?void 0:t.entries()).reduce(((e,[t,{value:r}])=>Object.assign(e,{[t.trim()]:r})),{}),o=function(e){if("undefined"==typeof document||"undefined"==typeof location)return{};switch(e.credentials){case"same-origin":return location.origin===e.url.origin?lt():{};case"include":return lt();default:return{}}}(e),i=Object.assign(Object.assign({},o),n);for(const[t,r]of Object.entries(i))e.headers.append("cookie",`${t}=${r}`);const s=r?P(r):{};e.cookies=Object.assign(Object.assign(Object.assign({},e.cookies),i),s)}function pt(e){var t,r;const n=o.stringToHeaders(e),i=n.get("content-type")||"text/plain",s=n.get("content-disposition");if(!s)throw new Error('"Content-Disposition" header is required.');const a=s.split(";").reduce(((e,t)=>{const[r,...n]=t.trim().split("=");return e[r]=n.join("="),e}),{});return{name:null===(t=a.name)||void 0===t?void 0:t.slice(1,-1),filename:null===(r=a.filename)||void 0===r?void 0:r.slice(1,-1),contentType:i}}function ht(e,t){var r;if(!e)return e;const n=(null===(r=null==t?void 0:t.get("content-type"))||void 0===r?void 0:r.toLowerCase())||"";if(n.startsWith("multipart/form-data")&&"object"!=typeof e)return function(e,t){const r=null==t?void 0:t.get("content-type");if(!r)return;const[,...n]=r.split(/; */),o=n.filter((e=>e.startsWith("boundary="))).map((e=>e.replace(/^boundary=/,"")))[0];if(!o)return;const i=new RegExp(`--+${o}`),s=e.split(i).filter((e=>e.startsWith("\r\n")&&e.endsWith("\r\n"))).map((e=>e.trimStart().replace(/\r\n$/,"")));if(!s.length)return;const a={};try{for(const e of s){const[t,...r]=e.split("\r\n\r\n"),n=r.join("\r\n\r\n"),{contentType:o,filename:i,name:s}=pt(t),c=void 0===i?n:new File([n],i,{type:o}),u=a[s];void 0===u?a[s]=c:Array.isArray(u)?a[s]=[...u,c]:a[s]=[u,c]}return a}catch(e){return}}(e.toString(),t)||e;return n.includes("json")&&"object"!=typeof e&&B(e.toString())||e}function ft(e,t){return e.toLowerCase()===t.toLowerCase()}function mt(e){if(!e.method||!ft(e.method,"GET")||""!==e.body)return e.body}it.exports=ut,it.exports.parse=ut,it.exports.parseString=ct,it.exports.splitCookiesString=function(e){if(Array.isArray(e))return e;if("string"!=typeof e)return[];var t,r,n,o,i,s=[],a=0;function c(){for(;a<e.length&&/\s/.test(e.charAt(a));)a+=1;return a<e.length}for(;a<e.length;){for(t=a,i=!1;c();)if(","===(r=e.charAt(a))){for(n=a,a+=1,c(),o=a;a<e.length&&"="!==(r=e.charAt(a))&&";"!==r&&","!==r;)a+=1;a<e.length&&"="===e.charAt(a)?(i=!0,a=o,s.push(e.substring(t,n)),t=a):a=n+1}else a+=1;(!i||a>=e.length)&&s.push(e.substring(t,e.length))}return s},function(e){var t=n&&n.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};Object.defineProperty(e,"__esModule",{value:!0}),e.store=e.PERSISTENCY_KEY=void 0;const r=it.exports;function o(){try{return null!=localStorage&&(localStorage.setItem("test","test"),localStorage.getItem("test"),!0)}catch(e){return!1}}e.PERSISTENCY_KEY="MSW_COOKIE_STORE";e.store=new class{constructor(){this.store=new Map}add(e,n){if("omit"===e.credentials)return;const o=new URL(e.url),i=n.headers.get("set-cookie");if(!i)return;const s=Date.now(),a=r.parse(i).map((e=>{var{maxAge:r}=e,n=t(e,["maxAge"]);return Object.assign(Object.assign({},n),{expires:void 0===r?n.expires:new Date(s+1e3*r),maxAge:r})})),c=this.store.get(o.origin)||new Map;a.forEach((e=>{this.store.set(o.origin,c.set(e.name,e))}))}get(e){this.deleteExpiredCookies();const t=new URL(e.url),n=this.store.get(t.origin)||new Map;switch(e.credentials){case"include":return r.parse(document.cookie).forEach((e=>{n.set(e.name,e)})),n;case"same-origin":return n;default:return new Map}}getAll(){return this.deleteExpiredCookies(),this.store}deleteAll(e){const t=new URL(e.url);this.store.delete(t.origin)}clear(){this.store.clear()}hydrate(){if(!o())return;const r=localStorage.getItem(e.PERSISTENCY_KEY);if(r)try{JSON.parse(r).forEach((([e,r])=>{this.store.set(e,new Map(r.map((e=>{var[r,n]=e,{expires:o}=n,i=t(n,["expires"]);return[r,void 0===o?i:Object.assign(Object.assign({},i),{expires:new Date(o)})]}))))}))}catch(t){console.warn(`\n[virtual-cookie] Failed to parse a stored cookie from the localStorage (key "${e.PERSISTENCY_KEY}").\n\nStored value:\n${localStorage.getItem(e.PERSISTENCY_KEY)}\n\nThrown exception:\n${t}\n\nInvalid value has been removed from localStorage to prevent subsequent failed parsing attempts.`),localStorage.removeItem(e.PERSISTENCY_KEY)}}persist(){if(!o())return;const t=Array.from(this.store.entries()).map((([e,t])=>[e,Array.from(t.entries())]));localStorage.setItem(e.PERSISTENCY_KEY,JSON.stringify(t))}deleteExpiredCookies(){const e=Date.now();this.store.forEach(((t,r)=>{t.forEach((({expires:r,name:n})=>{void 0!==r&&r.getTime()<=e&&t.delete(n)})),0===t.size&&this.store.delete(r)}))}}}(ot),function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=n&&n.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(ot,e)}(nt);var vt=function(){function e(e,t,r,n,o){return e<t||r<t?e>r?r+1:e+1:n===o?t:t+1}return function(t,r){if(t===r)return 0;if(t.length>r.length){var n=t;t=r,r=n}for(var o=t.length,i=r.length;o>0&&t.charCodeAt(o-1)===r.charCodeAt(i-1);)o--,i--;for(var s=0;s<o&&t.charCodeAt(s)===r.charCodeAt(s);)s++;if(i-=s,0===(o-=s)||i<3)return i;var a,c,u,l,d,p,h,f,m,v,y,g,E=0,b=[];for(a=0;a<o;a++)b.push(a+1),b.push(t.charCodeAt(s+a));for(var w=b.length-1;E<i-3;)for(m=r.charCodeAt(s+(c=E)),v=r.charCodeAt(s+(u=E+1)),y=r.charCodeAt(s+(l=E+2)),g=r.charCodeAt(s+(d=E+3)),p=E+=4,a=0;a<w;a+=2)c=e(h=b[a],c,u,m,f=b[a+1]),u=e(c,u,l,v,f),l=e(u,l,d,y,f),p=e(l,d,p,g,f),b[a]=p,d=l,l=u,u=c,c=h;for(;E<i;)for(m=r.charCodeAt(s+(c=E)),p=++E,a=0;a<w;a+=2)h=b[a],b[a]=p=e(h,c,p,m,b[a+1]),c=h;return p}}();function yt(e,t){if(!Boolean(e))throw new Error(t)}function gt(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}const Et=/\r\n|[\n\r]/g;function bt(e,t){let r=0,n=1;for(const o of e.body.matchAll(Et)){if("number"==typeof o.index||gt(!1),o.index>=t)break;r=o.index+o[0].length,n+=1}return{line:n,column:t+1-r}}function wt(e){return Nt(e.source,bt(e.source,e.start))}function Nt(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,o=t.line-1,i=e.locationOffset.line-1,s=t.line+i,a=1===t.line?r:0,c=t.column+a,u=`${e.name}:${s}:${c}\n`,l=n.split(/\r\n|[\n\r]/g),d=l[o];if(d.length>120){const e=Math.floor(c/80),t=c%80,r=[];for(let e=0;e<d.length;e+=80)r.push(d.slice(e,e+80));return u+Tt([[`${s} |`,r[0]],...r.slice(1,e+1).map((e=>["|",e])),["|","^".padStart(t)],["|",r[e+1]]])}return u+Tt([[s-1+" |",l[o-1]],[`${s} |`,d],["|","^".padStart(c)],[`${s+1} |`,l[o+1]]])}function Tt(e){const t=e.filter((([e,t])=>void 0!==t)),r=Math.max(...t.map((([e])=>e.length)));return t.map((([e,t])=>e.padStart(r)+(t?" "+t:""))).join("\n")}class xt extends Error{constructor(e,...t){var r,n,o;const{nodes:i,source:s,positions:a,path:c,originalError:u,extensions:l}=function(e){const t=e[0];return null==t||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}(t);super(e),this.name="GraphQLError",this.path=null!=c?c:void 0,this.originalError=null!=u?u:void 0,this.nodes=_t(Array.isArray(i)?i:i?[i]:void 0);const d=_t(null===(r=this.nodes)||void 0===r?void 0:r.map((e=>e.loc)).filter((e=>null!=e)));this.source=null!=s?s:null==d||null===(n=d[0])||void 0===n?void 0:n.source,this.positions=null!=a?a:null==d?void 0:d.map((e=>e.start)),this.locations=a&&s?a.map((e=>bt(s,e))):null==d?void 0:d.map((e=>bt(e.source,e.start)));const p="object"==typeof(h=null==u?void 0:u.extensions)&&null!==h?null==u?void 0:u.extensions:void 0;var h;this.extensions=null!==(o=null!=l?l:p)&&void 0!==o?o:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=u&&u.stack?Object.defineProperty(this,"stack",{value:u.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,xt):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const t of this.nodes)t.loc&&(e+="\n\n"+wt(t.loc));else if(this.source&&this.locations)for(const t of this.locations)e+="\n\n"+Nt(this.source,t);return e}toJSON(){const e={message:this.message};return null!=this.locations&&(e.locations=this.locations),null!=this.path&&(e.path=this.path),null!=this.extensions&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function _t(e){return void 0===e||0===e.length?void 0:e}function Ot(e,t,r){return new xt(`Syntax Error: ${r}`,void 0,e,[t])}class Ct{constructor(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class St{constructor(e,t,r,n,o,i){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=o,this.value=i,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}let It,At,Rt,kt;function Dt(e){return e>=48&&e<=57}function Lt(e){return e>=97&&e<=122||e>=65&&e<=90}function Pt(e){return Lt(e)||95===e}function Mt(e){return Lt(e)||Dt(e)||95===e}function Ft(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,o=-1;for(let t=0;t<e.length;++t){var i;const s=e[t],a=jt(s);a!==s.length&&(n=null!==(i=n)&&void 0!==i?i:t,o=t,0!==t&&a<r&&(r=a))}return e.map(((e,t)=>0===t?e:e.slice(r))).slice(null!==(t=n)&&void 0!==t?t:0,o+1)}function jt(e){let t=0;for(;t<e.length&&(9===(r=e.charCodeAt(t))||32===r);)++t;var r;return t}!function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"}(It||(It={})),function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"}(At||(At={})),function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"}(Rt||(Rt={})),function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"}(kt||(kt={}));class Ut{constructor(e){const t=new St(kt.SOF,0,0,0,0);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){this.lastToken=this.token;return this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==kt.EOF)do{if(e.next)e=e.next;else{const t=Kt(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===kt.COMMENT);return e}}function qt(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Ht(e,t){return $t(e.charCodeAt(t))&&Bt(e.charCodeAt(t+1))}function $t(e){return e>=55296&&e<=56319}function Bt(e){return e>=56320&&e<=57343}function Vt(e,t){const r=e.source.body.codePointAt(t);if(void 0===r)return kt.EOF;if(r>=32&&r<=126){const e=String.fromCodePoint(r);return'"'===e?"'\"'":`"${e}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function Gt(e,t,r,n,o){const i=e.line,s=1+r-e.lineStart;return new St(t,r,n,i,s,o)}function Kt(e,t){const r=e.source.body,n=r.length;let o=t;for(;o<n;){const t=r.charCodeAt(o);switch(t){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++e.line,e.lineStart=o;continue;case 13:10===r.charCodeAt(o+1)?o+=2:++o,++e.line,e.lineStart=o;continue;case 35:return Xt(e,o);case 33:return Gt(e,kt.BANG,o,o+1);case 36:return Gt(e,kt.DOLLAR,o,o+1);case 38:return Gt(e,kt.AMP,o,o+1);case 40:return Gt(e,kt.PAREN_L,o,o+1);case 41:return Gt(e,kt.PAREN_R,o,o+1);case 46:if(46===r.charCodeAt(o+1)&&46===r.charCodeAt(o+2))return Gt(e,kt.SPREAD,o,o+3);break;case 58:return Gt(e,kt.COLON,o,o+1);case 61:return Gt(e,kt.EQUALS,o,o+1);case 64:return Gt(e,kt.AT,o,o+1);case 91:return Gt(e,kt.BRACKET_L,o,o+1);case 93:return Gt(e,kt.BRACKET_R,o,o+1);case 123:return Gt(e,kt.BRACE_L,o,o+1);case 124:return Gt(e,kt.PIPE,o,o+1);case 125:return Gt(e,kt.BRACE_R,o,o+1);case 34:return 34===r.charCodeAt(o+1)&&34===r.charCodeAt(o+2)?rr(e,o):zt(e,o)}if(Dt(t)||45===t)return Wt(e,o,t);if(Pt(t))return nr(e,o);throw Ot(e.source,o,39===t?"Unexpected single quote character ('), did you mean to use a double quote (\")?":qt(t)||Ht(r,o)?`Unexpected character: ${Vt(e,o)}.`:`Invalid character: ${Vt(e,o)}.`)}return Gt(e,kt.EOF,n,n)}function Xt(e,t){const r=e.source.body,n=r.length;let o=t+1;for(;o<n;){const e=r.charCodeAt(o);if(10===e||13===e)break;if(qt(e))++o;else{if(!Ht(r,o))break;o+=2}}return Gt(e,kt.COMMENT,t,o,r.slice(t+1,o))}function Wt(e,t,r){const n=e.source.body;let o=t,i=r,s=!1;if(45===i&&(i=n.charCodeAt(++o)),48===i){if(i=n.charCodeAt(++o),Dt(i))throw Ot(e.source,o,`Invalid number, unexpected digit after 0: ${Vt(e,o)}.`)}else o=Yt(e,o,i),i=n.charCodeAt(o);if(46===i&&(s=!0,i=n.charCodeAt(++o),o=Yt(e,o,i),i=n.charCodeAt(o)),69!==i&&101!==i||(s=!0,i=n.charCodeAt(++o),43!==i&&45!==i||(i=n.charCodeAt(++o)),o=Yt(e,o,i),i=n.charCodeAt(o)),46===i||Pt(i))throw Ot(e.source,o,`Invalid number, expected digit but got: ${Vt(e,o)}.`);return Gt(e,s?kt.FLOAT:kt.INT,t,o,n.slice(t,o))}function Yt(e,t,r){if(!Dt(r))throw Ot(e.source,t,`Invalid number, expected digit but got: ${Vt(e,t)}.`);const n=e.source.body;let o=t+1;for(;Dt(n.charCodeAt(o));)++o;return o}function zt(e,t){const r=e.source.body,n=r.length;let o=t+1,i=o,s="";for(;o<n;){const n=r.charCodeAt(o);if(34===n)return s+=r.slice(i,o),Gt(e,kt.STRING,t,o+1,s);if(92!==n){if(10===n||13===n)break;if(qt(n))++o;else{if(!Ht(r,o))throw Ot(e.source,o,`Invalid character within String: ${Vt(e,o)}.`);o+=2}}else{s+=r.slice(i,o);const t=117===r.charCodeAt(o+1)?123===r.charCodeAt(o+2)?Jt(e,o):Qt(e,o):tr(e,o);s+=t.value,o+=t.size,i=o}}throw Ot(e.source,o,"Unterminated string.")}function Jt(e,t){const r=e.source.body;let n=0,o=3;for(;o<12;){const e=r.charCodeAt(t+o++);if(125===e){if(o<5||!qt(n))break;return{value:String.fromCodePoint(n),size:o}}if(n=n<<4|er(e),n<0)break}throw Ot(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+o)}".`)}function Qt(e,t){const r=e.source.body,n=Zt(r,t+2);if(qt(n))return{value:String.fromCodePoint(n),size:6};if($t(n)&&92===r.charCodeAt(t+6)&&117===r.charCodeAt(t+7)){const e=Zt(r,t+8);if(Bt(e))return{value:String.fromCodePoint(n,e),size:12}}throw Ot(e.source,t,`Invalid Unicode escape sequence: "${r.slice(t,t+6)}".`)}function Zt(e,t){return er(e.charCodeAt(t))<<12|er(e.charCodeAt(t+1))<<8|er(e.charCodeAt(t+2))<<4|er(e.charCodeAt(t+3))}function er(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function tr(e,t){const r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw Ot(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function rr(e,t){const r=e.source.body,n=r.length;let o=e.lineStart,i=t+3,s=i,a="";const c=[];for(;i<n;){const n=r.charCodeAt(i);if(34===n&&34===r.charCodeAt(i+1)&&34===r.charCodeAt(i+2)){a+=r.slice(s,i),c.push(a);const n=Gt(e,kt.BLOCK_STRING,t,i+3,Ft(c).join("\n"));return e.line+=c.length-1,e.lineStart=o,n}if(92!==n||34!==r.charCodeAt(i+1)||34!==r.charCodeAt(i+2)||34!==r.charCodeAt(i+3))if(10!==n&&13!==n)if(qt(n))++i;else{if(!Ht(r,i))throw Ot(e.source,i,`Invalid character within String: ${Vt(e,i)}.`);i+=2}else a+=r.slice(s,i),c.push(a),13===n&&10===r.charCodeAt(i+1)?i+=2:++i,a="",s=i,o=i;else a+=r.slice(s,i),s=i+1,i+=4}throw Ot(e.source,i,"Unterminated string.")}function nr(e,t){const r=e.source.body,n=r.length;let o=t+1;for(;o<n;){if(!Mt(r.charCodeAt(o)))break;++o}return Gt(e,kt.NAME,t,o,r.slice(t,o))}function or(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return function(e,t){if(null===e)return"null";if(t.includes(e))return"[Circular]";const r=[...t,e];if(function(e){return"function"==typeof e.toJSON}(e)){const t=e.toJSON();if(t!==e)return"string"==typeof t?t:or(t,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";const r=Math.min(10,e.length),n=e.length-r,o=[];for(let n=0;n<r;++n)o.push(or(e[n],t));1===n?o.push("... 1 more item"):n>1&&o.push(`... ${n} more items`);return"["+o.join(", ")+"]"}(e,r);return function(e,t){const r=Object.entries(e);if(0===r.length)return"{}";if(t.length>2)return"["+function(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){const t=e.constructor.name;if("string"==typeof t&&""!==t)return t}return t}(e)+"]";return"{ "+r.map((([e,r])=>e+": "+or(r,t))).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}class ir{constructor(e,t="GraphQL request",r={line:1,column:1}){var n;"string"==typeof e||yt(!1,`Body must be a string. Received: ${n=e,or(n,[])}.`),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||yt(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||yt(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}class sr{constructor(e,t){const r=function(e){return e instanceof ir}(e)?e:new ir(e);this._lexer=new Ut(r),this._options=t}parseName(){const e=this.expectToken(kt.NAME);return this.node(e,{kind:Rt.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:Rt.DOCUMENT,definitions:this.many(kt.SOF,this.parseDefinition,kt.EOF)})}parseDefinition(){if(this.peek(kt.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===kt.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw Ot(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(kt.BRACE_L))return this.node(e,{kind:Rt.OPERATION_DEFINITION,operation:It.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const t=this.parseOperationType();let r;return this.peek(kt.NAME)&&(r=this.parseName()),this.node(e,{kind:Rt.OPERATION_DEFINITION,operation:t,name:r,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(kt.NAME);switch(e.value){case"query":return It.QUERY;case"mutation":return It.MUTATION;case"subscription":return It.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(kt.PAREN_L,this.parseVariableDefinition,kt.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Rt.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(kt.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(kt.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(kt.DOLLAR),this.node(e,{kind:Rt.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Rt.SELECTION_SET,selections:this.many(kt.BRACE_L,this.parseSelection,kt.BRACE_R)})}parseSelection(){return this.peek(kt.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,t=this.parseName();let r,n;return this.expectOptionalToken(kt.COLON)?(r=t,n=this.parseName()):n=t,this.node(e,{kind:Rt.FIELD,alias:r,name:n,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(kt.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(kt.PAREN_L,t,kt.PAREN_R)}parseArgument(e=!1){const t=this._lexer.token,r=this.parseName();return this.expectToken(kt.COLON),this.node(t,{kind:Rt.ARGUMENT,name:r,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(kt.SPREAD);const t=this.expectOptionalKeyword("on");return!t&&this.peek(kt.NAME)?this.node(e,{kind:Rt.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:Rt.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){var e;const t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacyFragmentVariables)?this.node(t,{kind:Rt.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:Rt.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}parseValueLiteral(e){const t=this._lexer.token;switch(t.kind){case kt.BRACKET_L:return this.parseList(e);case kt.BRACE_L:return this.parseObject(e);case kt.INT:return this._lexer.advance(),this.node(t,{kind:Rt.INT,value:t.value});case kt.FLOAT:return this._lexer.advance(),this.node(t,{kind:Rt.FLOAT,value:t.value});case kt.STRING:case kt.BLOCK_STRING:return this.parseStringLiteral();case kt.NAME:switch(this._lexer.advance(),t.value){case"true":return this.node(t,{kind:Rt.BOOLEAN,value:!0});case"false":return this.node(t,{kind:Rt.BOOLEAN,value:!1});case"null":return this.node(t,{kind:Rt.NULL});default:return this.node(t,{kind:Rt.ENUM,value:t.value})}case kt.DOLLAR:if(e){if(this.expectToken(kt.DOLLAR),this._lexer.token.kind===kt.NAME){const e=this._lexer.token.value;throw Ot(this._lexer.source,t.start,`Unexpected variable "$${e}" in constant value.`)}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this._lexer.advance(),this.node(e,{kind:Rt.STRING,value:e.value,block:e.kind===kt.BLOCK_STRING})}parseList(e){return this.node(this._lexer.token,{kind:Rt.LIST,values:this.any(kt.BRACKET_L,(()=>this.parseValueLiteral(e)),kt.BRACKET_R)})}parseObject(e){return this.node(this._lexer.token,{kind:Rt.OBJECT,fields:this.any(kt.BRACE_L,(()=>this.parseObjectField(e)),kt.BRACE_R)})}parseObjectField(e){const t=this._lexer.token,r=this.parseName();return this.expectToken(kt.COLON),this.node(t,{kind:Rt.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e)})}parseDirectives(e){const t=[];for(;this.peek(kt.AT);)t.push(this.parseDirective(e));return t}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const t=this._lexer.token;return this.expectToken(kt.AT),this.node(t,{kind:Rt.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let t;if(this.expectOptionalToken(kt.BRACKET_L)){const r=this.parseTypeReference();this.expectToken(kt.BRACKET_R),t=this.node(e,{kind:Rt.LIST_TYPE,type:r})}else t=this.parseNamedType();return this.expectOptionalToken(kt.BANG)?this.node(e,{kind:Rt.NON_NULL_TYPE,type:t}):t}parseNamedType(){return this.node(this._lexer.token,{kind:Rt.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(kt.STRING)||this.peek(kt.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.many(kt.BRACE_L,this.parseOperationTypeDefinition,kt.BRACE_R);return this.node(e,{kind:Rt.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n})}parseOperationTypeDefinition(){const e=this._lexer.token,t=this.parseOperationType();this.expectToken(kt.COLON);const r=this.parseNamedType();return this.node(e,{kind:Rt.OPERATION_TYPE_DEFINITION,operation:t,type:r})}parseScalarTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();return this.node(e,{kind:Rt.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n})}parseObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),i=this.parseFieldsDefinition();return this.node(e,{kind:Rt.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:o,fields:i})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(kt.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(kt.BRACE_L,this.parseFieldDefinition,kt.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(kt.COLON);const o=this.parseTypeReference(),i=this.parseConstDirectives();return this.node(e,{kind:Rt.FIELD_DEFINITION,description:t,name:r,arguments:n,type:o,directives:i})}parseArgumentDefs(){return this.optionalMany(kt.PAREN_L,this.parseInputValueDef,kt.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(kt.COLON);const n=this.parseTypeReference();let o;this.expectOptionalToken(kt.EQUALS)&&(o=this.parseConstValueLiteral());const i=this.parseConstDirectives();return this.node(e,{kind:Rt.INPUT_VALUE_DEFINITION,description:t,name:r,type:n,defaultValue:o,directives:i})}parseInterfaceTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),i=this.parseFieldsDefinition();return this.node(e,{kind:Rt.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:o,fields:i})}parseUnionTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(e,{kind:Rt.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:o})}parseUnionMemberTypes(){return this.expectOptionalToken(kt.EQUALS)?this.delimitedMany(kt.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(e,{kind:Rt.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:o})}parseEnumValuesDefinition(){return this.optionalMany(kt.BRACE_L,this.parseEnumValueDefinition,kt.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,t=this.parseDescription(),r=this.parseEnumValueName(),n=this.parseConstDirectives();return this.node(e,{kind:Rt.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n})}parseEnumValueName(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw Ot(this._lexer.source,this._lexer.token.start,`${ar(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(e,{kind:Rt.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:o})}parseInputFieldsDefinition(){return this.optionalMany(kt.BRACE_L,this.parseInputValueDef,kt.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===kt.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const t=this.parseConstDirectives(),r=this.optionalMany(kt.BRACE_L,this.parseOperationTypeDefinition,kt.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:Rt.SCHEMA_EXTENSION,directives:t,operationTypes:r})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const t=this.parseName(),r=this.parseConstDirectives();if(0===r.length)throw this.unexpected();return this.node(e,{kind:Rt.SCALAR_TYPE_EXTENSION,name:t,directives:r})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===o.length)throw this.unexpected();return this.node(e,{kind:Rt.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:o})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===o.length)throw this.unexpected();return this.node(e,{kind:Rt.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:o})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:Rt.UNION_TYPE_EXTENSION,name:t,directives:r,types:n})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:Rt.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const t=this.parseName(),r=this.parseConstDirectives(),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:Rt.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n})}parseDirectiveDefinition(){const e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(kt.AT);const r=this.parseName(),n=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const i=this.parseDirectiveLocations();return this.node(e,{kind:Rt.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:o,locations:i})}parseDirectiveLocations(){return this.delimitedMany(kt.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(At,t.value))return t;throw this.unexpected(e)}node(e,t){var r;return!0!==(null===(r=this._options)||void 0===r?void 0:r.noLocation)&&(t.loc=new Ct(e,this._lexer.lastToken,this._lexer.source)),t}peek(e){return this._lexer.token.kind===e}expectToken(e){const t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw Ot(this._lexer.source,t.start,`Expected ${cr(e)}, found ${ar(t)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e&&(this._lexer.advance(),!0)}expectKeyword(e){const t=this._lexer.token;if(t.kind!==kt.NAME||t.value!==e)throw Ot(this._lexer.source,t.start,`Expected "${e}", found ${ar(t)}.`);this._lexer.advance()}expectOptionalKeyword(e){const t=this._lexer.token;return t.kind===kt.NAME&&t.value===e&&(this._lexer.advance(),!0)}unexpected(e){const t=null!=e?e:this._lexer.token;return Ot(this._lexer.source,t.start,`Unexpected ${ar(t)}.`)}any(e,t,r){this.expectToken(e);const n=[];for(;!this.expectOptionalToken(r);)n.push(t.call(this));return n}optionalMany(e,t,r){if(this.expectOptionalToken(e)){const e=[];do{e.push(t.call(this))}while(!this.expectOptionalToken(r));return e}return[]}many(e,t,r){this.expectToken(e);const n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}delimitedMany(e,t){this.expectOptionalToken(e);const r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r}}function ar(e){const t=e.value;return cr(e.kind)+(null!=t?` "${t}"`:"")}function cr(e){return function(e){return e===kt.BANG||e===kt.DOLLAR||e===kt.AMP||e===kt.PAREN_L||e===kt.PAREN_R||e===kt.SPREAD||e===kt.COLON||e===kt.EQUALS||e===kt.AT||e===kt.BRACKET_L||e===kt.BRACKET_R||e===kt.BRACE_L||e===kt.PIPE||e===kt.BRACE_R}(e)?`"${e}"`:e}const ur=e=>e.referrer.startsWith(e.url.origin)?e.url.pathname:new URL(e.url.pathname,`${e.url.protocol}//${e.url.host}`).href;function lr(e){var t;const r=e.definitions.find((e=>"OperationDefinition"===e.kind));return{operationType:null==r?void 0:r.operation,operationName:null===(t=null==r?void 0:r.name)||void 0===t?void 0:t.value}}function dr(e){try{return lr(new sr(e,t).parseDocument())}catch(e){return e}var t}function pr(e){var t,r;switch(e.method){case"GET":return{query:e.url.searchParams.get("query"),variables:B(e.url.searchParams.get("variables")||"")};case"POST":if(null===(t=e.body)||void 0===t?void 0:t.query){const{query:t,variables:r}=e.body;return{query:t,variables:r}}if(null===(r=e.body)||void 0===r?void 0:r.operations){const t=e.body,{operations:r,map:n}=t,o=
8
8
  /*! *****************************************************************************
9
9
  Copyright (c) Microsoft Corporation.
10
10
 
@@ -19,4 +19,4 @@ var MockServiceWorker=function(e){"use strict";var t={100:"Continue",101:"Switch
19
19
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20
20
  PERFORMANCE OF THIS SOFTWARE.
21
21
  ***************************************************************************** */
22
- function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(t,["operations","map"]),i=B(r)||{};if(!i.query)return null;const s=B(n||"")||{},a=i.variables?function(e,t,r){const n={variables:e};for(const[e,o]of Object.entries(t)){if(!(e in r))throw new Error(`Given files do not have a key '${e}' .`);for(const t of o){const[o,...i]=t.split(".").reverse(),s=i.reverse();let a=n;for(const e of s){if(!(e in a))throw new Error(`Property '${s}' is not in operations.`);a=a[e]}a[o]=r[e]}}return n.variables}(i.variables,s,o):{};return{query:i.query,variables:a}}default:return null}}function or(e){const t=nr(e);if(!t||!t.query)return;const{query:r,variables:n}=t,o=rr(r);if(o instanceof Error){const t=er(e);throw new Error(Ve.formatMessage('Failed to intercept a GraphQL request to "%s %s": cannot parse query. See the error message from the parser below.\n\n%s',e.method,t,o.message))}return{operationType:o.operationType,operationName:o.operationName,variables:n}}var ir;function sr(e){return e<300?ir.Success:e<400?ir.Warning:ir.Danger}function ar(){const e=new Date;return[e.getHours(),e.getMinutes(),e.getSeconds()].map(String).map((e=>e.slice(0,2))).map((e=>e.padStart(2,"0"))).join(":")}function cr(e){return Object.assign(Object.assign({},e),{headers:e.headers.all()})}function ur(e){const t=o.objectToHeaders(e.headers);return Object.assign(Object.assign({},e),{body:ot(e.body,t)})}function lr(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var o=1,i="";if("?"===e[a=r+1])throw new TypeError('Pattern cannot start with "?" at '+a);for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0==--o){a++;break}}else if("("===e[a]&&(o++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at "+a);i+=e[a++]}else i+=e[a++]+e[a++];if(o)throw new TypeError("Unbalanced pattern at "+r);if(!i)throw new TypeError("Missing pattern at "+r);t.push({type:"PATTERN",index:r,value:i}),r=a}else{for(var s="",a=r+1;a<e.length;){var c=e.charCodeAt(a);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;s+=e[a++]}if(!s)throw new TypeError("Missing parameter name at "+r);t.push({type:"NAME",index:r,value:s}),r=a}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,o=void 0===n?"./":n,i="[^"+pr(t.delimiter||"/#?")+"]+?",s=[],a=0,c=0,u="",l=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},d=function(e){var t=l(e);if(void 0!==t)return t;var n=r[c],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},p=function(){for(var e,t="";e=l("CHAR")||l("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var h=l("CHAR"),f=l("NAME"),m=l("PATTERN");if(f||m){var v=h||"";-1===o.indexOf(v)&&(u+=v,v=""),u&&(s.push(u),u=""),s.push({name:f||a++,prefix:v,suffix:"",pattern:m||i,modifier:l("MODIFIER")||""})}else{var y=h||l("ESCAPED_CHAR");if(y)u+=y;else if(u&&(s.push(u),u=""),l("OPEN")){v=p();var g=l("NAME")||"",E=l("PATTERN")||"",b=p();d("CLOSE"),s.push({name:g||(E?a++:""),pattern:g&&!E?i:E,prefix:v,suffix:b,modifier:l("MODIFIER")||""})}else d("END")}}return s}function dr(e,t){var r=[];return function(e,t,r){void 0===r&&(r={});var n=r.decode,o=void 0===n?function(e){return e}:n;return function(r){var n=e.exec(r);if(!n)return!1;for(var i=n[0],s=n.index,a=Object.create(null),c=function(e){if(void 0===n[e])return"continue";var r=t[e-1];"*"===r.modifier||"+"===r.modifier?a[r.name]=n[e].split(r.prefix+r.suffix).map((function(e){return o(e,r)})):a[r.name]=o(n[e],r)},u=1;u<n.length;u++)c(u);return{path:i,index:s,params:a}}}(mr(e,r,t),r,t)}function pr(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function hr(e){return e&&e.sensitive?"":"i"}function fr(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,o=void 0!==n&&n,i=r.start,s=void 0===i||i,a=r.end,c=void 0===a||a,u=r.encode,l=void 0===u?function(e){return e}:u,d="["+pr(r.endsWith||"")+"]|$",p="["+pr(r.delimiter||"/#?")+"]",h=s?"^":"",f=0,m=e;f<m.length;f++){var v=m[f];if("string"==typeof v)h+=pr(l(v));else{var y=pr(l(v.prefix)),g=pr(l(v.suffix));if(v.pattern)if(t&&t.push(v),y||g)if("+"===v.modifier||"*"===v.modifier){var E="*"===v.modifier?"?":"";h+="(?:"+y+"((?:"+v.pattern+")(?:"+g+y+"(?:"+v.pattern+"))*)"+g+")"+E}else h+="(?:"+y+"("+v.pattern+")"+g+")"+v.modifier;else h+="("+v.pattern+")"+v.modifier;else h+="(?:"+y+g+")"+v.modifier}}if(c)o||(h+=p+"?"),h+=r.endsWith?"(?="+d+")":"$";else{var b=e[e.length-1],w="string"==typeof b?p.indexOf(b[b.length-1])>-1:void 0===b;o||(h+="(?:"+p+"(?="+d+"))?"),w||(h+="(?="+p+"|"+d+")")}return new RegExp(h,hr(r))}(lr(e,r),t,r)}function mr(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,o=r.exec(e.source);o;)t.push({name:o[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),o=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return mr(e,t,r).source}));return new RegExp("(?:"+n.join("|")+")",hr(r))}(e,t,r):fr(e,t,r)}!function(e){e.Success="#69AB32",e.Warning="#F0BB4B",e.Danger="#E95F5D"}(ir||(ir={}));var vr={};Object.defineProperty(vr,"__esModule",{value:!0});var yr=vr.getCleanUrl=void 0;yr=vr.getCleanUrl=function(e,t){return void 0===t&&(t=!0),[t&&e.origin,e.pathname].filter(Boolean).join("")};const gr=/[\?|#].*$/g;function Er(e){return e.replace(gr,"")}function br(e,t){if(e instanceof RegExp)return e;return Er(function(e,t){if(/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e))return e;if(e.startsWith("*"))return e;const r=t||"undefined"!=typeof document&&document.baseURI;return r?decodeURI(new URL(encodeURI(e),r).href):e}(e,t))}function wr(e,t,r){const n=br(t,r),o="string"==typeof n?function(e){return e.replace(/([:a-zA-Z_-]*)(\*{1,2})+/g,((e,t,r)=>{const n="(.*)";return t?t.startsWith(":")?`${t}${r}`:`${t}(.*)`:n})).replace(/([^\/])(:)(?=\d+)/,"$1\\$2").replace(/^([^\/]+)(:)(?=\/\/)/,"$1\\$2")}(n):n,i=yr(e),s=dr(o,{decode:decodeURIComponent})(i);return{matches:!1!==s,params:s&&s.params||{}}}function Nr(...e){return(...t)=>e.reduceRight(((e,t)=>e instanceof Promise?Promise.resolve(e).then(t):t(e)),t[0])}const Tr={status:200,statusText:"OK",body:null,delay:0,once:!1},xr=[];function _r(e,t=xr){return(...r)=>Se(this,void 0,void 0,(function*(){const n=Object.assign({},Tr,{headers:new o.Headers({"x-powered-by":"msw"})},e),i=[...t,...r].filter(Boolean);return i.length>0?Nr(...i)(n):n}))}const Or=Object.assign(_r(),{once:_r({once:!0}),networkError(e){throw new Xe(e)}}),Cr=/(node_modules)?[\/\\]lib[\/\\](umd|esm|iief|cjs)[\/\\]|^[^\/\\]*$/;const Sr={status:r,set:L,delay:Q,fetch:re};class Ir{constructor(e){this.shouldSkip=!1,this.ctx=e.ctx||Sr,this.resolver=e.resolver;const t=function(e){const t=e.stack;if(!t)return;const r=t.split("\n").slice(1).find((e=>!Cr.test(e)));if(!r)return;return r.replace(/\s*at [^()]*\(([^)]+)\)/,"$1").replace(/^@/,"")}(new Error);this.info=Object.assign(Object.assign({},e.info),{callFrame:t})}parse(e,t){return null}test(e,t){return this.predicate(e,this.parse(e,t),t)}getPublicRequest(e,t){return e}markAsSkipped(e=!0){this.shouldSkip=e}run(e,t){return Se(this,void 0,void 0,(function*(){if(this.shouldSkip)return null;const r=this.parse(e,t);if(!this.predicate(e,r,t))return null;const n=this.getPublicRequest(e,r),o=this.wrapResolver(this.resolver),i=yield o(n,Or,this.ctx);return this.createExecutionResult(r,n,i)}))}wrapResolver(e){return(t,r,n)=>Se(this,void 0,void 0,(function*(){const o=this.resolverGenerator||(yield e(t,r,n));if((i=o)&&"function"==typeof i[Symbol.iterator]){const{value:e,done:t}=o[Symbol.iterator]().next(),r=yield e;return!r&&t?this.resolverGeneratorResult:(this.resolverGenerator||(this.resolverGenerator=o),this.resolverGeneratorResult=r,r)}var i;return o}))}createExecutionResult(e,t,r){return{handler:this,parsedResult:e||null,request:t,response:r||null}}}var Ar;e.RESTMethods=void 0,(Ar=e.RESTMethods||(e.RESTMethods={})).HEAD="HEAD",Ar.GET="GET",Ar.POST="POST",Ar.PUT="PUT",Ar.PATCH="PATCH",Ar.OPTIONS="OPTIONS",Ar.DELETE="DELETE";const Rr={set:L,status:r,cookie:H,body:$,text:ne,json:K,xml:oe,delay:Q,fetch:re};class kr extends Ir{constructor(e,t,r){super({info:{header:`${e} ${t}`,path:t,method:e},ctx:Rr,resolver:r}),this.checkRedundantQueryParameters()}checkRedundantQueryParameters(){const{method:e,path:t}=this.info;if(t instanceof RegExp)return;if(Er(t)===t)return;(function(e){return new URL(`/${e}`,"http://localhost").searchParams})(t).forEach(((e,t)=>{})),Ve.warn(`Found a redundant usage of query parameters in the request handler URL for "${e} ${t}". Please match against a path instead and access query parameters in the response resolver function using "req.url.searchParams".`)}parse(e,t){return wr(e.url,this.info.path,null==t?void 0:t.baseUrl)}getPublicRequest(e,t){return Object.assign(Object.assign({},e),{params:t.params||{}})}predicate(e,t){return(this.info.method instanceof RegExp?this.info.method.test(e.method):it(this.info.method,e.method))&&t.matches}log(e,t){const r=er(e),n=cr(e),o=ur(t),i=sr(t.status);console.groupCollapsed(Ve.formatMessage("%s %s %s (%c%s%c)"),ar(),e.method,r,`color:${i}`,`${t.status} ${t.statusText}`,"color:inherit"),console.log("Request",n),console.log("Handler:",{mask:this.info.path,resolver:this.resolver}),console.log("Response",o),console.groupEnd()}}function Dr(e,t){try{return e()}catch(e){null==t||t(e)}}const Lr={set:L,status:r,delay:Q,fetch:re,data:X,extensions:Y,errors:Z,cookie:H};class Pr extends Ir{constructor(e,t,r,n){let o=t;if(null!=(i=t)&&"object"==typeof i&&"kind"in i&&"definitions"in i){const r=tr(t);if(r.operationType!==e)throw new Error(`Failed to create a GraphQL handler: provided a DocumentNode with a mismatched operation type (expected "${e}", but got "${r.operationType}").`);if(!r.operationName)throw new Error("Failed to create a GraphQL handler: provided a DocumentNode with no operation name.");o=r.operationName}var i;super({info:{header:"all"===e?`${e} (origin: ${r.toString()})`:`${e} ${o} (origin: ${r.toString()})`,operationType:e,operationName:o},ctx:Lr,resolver:n}),this.endpoint=r}parse(e){return Dr((()=>or(e)),(e=>console.error(e.message)))}getPublicRequest(e,t){return Object.assign(Object.assign({},e),{variables:(null==t?void 0:t.variables)||{}})}predicate(e,t){if(!t)return!1;if(!t.operationName&&"all"!==this.info.operationType){const t=er(e);return Ve.warn(`Failed to intercept a GraphQL request at "${e.method} ${t}": anonymous GraphQL operations are not supported.\n\nConsider naming this operation or using "graphql.operation" request handler to intercept GraphQL requests regardless of their operation name/type. Read more: https://mswjs.io/docs/api/graphql/operation `),!1}const r=wr(e.url,this.endpoint),n="all"===this.info.operationType||t.operationType===this.info.operationType,o=this.info.operationName instanceof RegExp?this.info.operationName.test(t.operationName||""):t.operationName===this.info.operationName;return r.matches&&n&&o}log(e,t,r,n){const o=cr(e),i=ur(t),s=sr(t.status),a=(null==n?void 0:n.operationName)?`${null==n?void 0:n.operationType} ${null==n?void 0:n.operationName}`:`anonymous ${null==n?void 0:n.operationType}`;console.groupCollapsed(Ve.formatMessage("%s %s (%c%s%c)"),ar(),`${a}`,`color:${s}`,`${t.status} ${t.statusText}`,"color:inherit"),console.log("Request:",o),console.log("Handler:",this),console.log("Response:",i),console.groupEnd()}}function Mr(e,t,r="warn"){const n=Dr((()=>or(e)));function o(){const r=function(e){return e.reduce(((e,t)=>(t instanceof kr&&e.rest.push(t),t instanceof Pr&&e.graphql.push(t),e)),{rest:[],graphql:[]})}(t),o=n?r.graphql:r.rest,i=function(e,t,r){return t.reduce(((t,n)=>{const o=r(e,n);return t.concat([[o,n]])}),[]).sort((([e],[t])=>e-t)).filter((([e])=>e<=3)).slice(0,4).map((([,e])=>e))}(e,o,n?(s=n,(e,t)=>{if(void 0===s.operationName)return 1/0;const{operationType:r,operationName:n}=t.info;if("string"!=typeof n)return 1/0;const o=s.operationType===r?.5:0;return at(s.operationName,n)-o}):(e,t)=>{const{path:r,method:n}=t.info;if(r instanceof RegExp||n instanceof RegExp)return 1/0;const o=it(e.method,n)?.5:0,i=er(e);return at(i,r)-o});var s;return i.length>0?function(e){return e.length>1?`Did you mean to request one of the following resources instead?\n\n${e.map((e=>` • ${e.info.header}`)).join("\n")}`:`Did you mean to request "${e[0].info.header}" instead?`}(i):""}function i(t){const r=function(){const t=er(e);return["captured a request without a matching request handler:"," • "+(n?`${n.operationType} ${n.operationName} (${e.method} ${t})`:`${e.method} ${t}`),o(),"If you still wish to intercept this unhandled request, please create a request handler for it.\nRead more: https://mswjs.io/docs/getting-started/mocks"].filter(Boolean).join("\n\n")}();switch(t){case"error":throw Ve.error("Error: %s",r),new Error(Ve.formatMessage('Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'));case"warn":Ve.warn("Warning: %s",r);break;case"bypass":break;default:throw new Error(Ve.formatMessage('Failed to react to an unhandled request: unknown strategy "%s". Please provide one of the supported strategies ("bypass", "warn", "error") or a custom callback function as the value of the "onUnhandledRequest" option.',t))}}"function"!=typeof r?i(r):r(e,{warning:i.bind(null,"warn"),error:i.bind(null,"error")})}function Fr(e,t,r,n,o){var i,s,a;return Se(this,void 0,void 0,(function*(){if(n.emit("request:start",e),"true"===e.headers.get("x-msw-bypass"))return n.emit("request:end",e),void(null===(i=null==o?void 0:o.onBypassResponse)||void 0===i||i.call(o,e));const c=yield((e,t,r)=>Se(void 0,void 0,void 0,(function*(){const n=t.filter((t=>t.test(e,r)));if(0===n.length)return{handler:void 0,response:void 0};const o=yield n.reduce(((t,n)=>Se(void 0,void 0,void 0,(function*(){const o=yield t;if(null==o?void 0:o.response)return t;const i=yield n.run(e,r);return null===i||i.handler.shouldSkip?null:i.response?(i.response.once&&n.markAsSkipped(!0),i):{request:i.request,handler:i.handler,response:void 0,parsedResult:i.parsedResult}}))),Promise.resolve(null));return o?{handler:o.handler,publicRequest:o.request,parsedRequest:o.parsedResult,response:o.response}:{handler:void 0,response:void 0}})))(e,t,null==o?void 0:o.resolutionContext),{handler:u,response:l}=c;return u?l?(function(e,t){Ye.store.add(Object.assign(Object.assign({},e),{url:e.url.toString()}),t),Ye.store.persist()}(e,l),n.emit("request:match",e),new Promise((t=>{var r,i,s;const a=c,u=(null===(r=null==o?void 0:o.transformResponse)||void 0===r?void 0:r.call(o,l))||l;null===(i=null==o?void 0:o.onMockedResponse)||void 0===i||i.call(o,u,a),setTimeout((()=>{var r;null===(r=null==o?void 0:o.onMockedResponseSent)||void 0===r||r.call(o,u,a),n.emit("request:end",e),t(u)}),null!==(s=l.delay)&&void 0!==s?s:0)}))):(Ve.warn("Expected response resolver to return a mocked response Object, but got %s. The original response is going to be used instead.\n\n • %s\n %s",l,u.info.header,u.info.callFrame),n.emit("request:end",e),void(null===(a=null==o?void 0:o.onBypassResponse)||void 0===a||a.call(o,e))):(Mr(e,t,r.onUnhandledRequest),n.emit("request:unhandled",e),n.emit("request:end",e),void(null===(s=null==o?void 0:o.onBypassResponse)||void 0===s||s.call(o,e)))}))}const jr=(e,t)=>(r,n)=>Se(void 0,void 0,void 0,(function*(){const i=(e=>{const t=e.ports[0];return{send(e){t&&t.postMessage(e)}}})(r);try{const r=function(e){const t={id:e.id,cache:e.cache,credentials:e.credentials,method:e.method,url:new URL(e.url),referrer:e.referrer,referrerPolicy:e.referrerPolicy,redirect:e.redirect,mode:e.mode,params:{},cookies:{},integrity:e.integrity,keepalive:e.keepalive,destination:e.destination,body:st(e),bodyUsed:e.bodyUsed,headers:new o.Headers(e.headers)};return rt(t),t.body=ot(t.body,t.headers),t}(n.payload);yield Fr(r,e.requestHandlers,t,e.emitter,{transformResponse:e=>Object.assign(Object.assign({},e),{headers:e.headers.all()}),onBypassResponse:()=>i.send({type:"MOCK_NOT_FOUND"}),onMockedResponse(e){i.send({type:"MOCK_SUCCESS",payload:e})},onMockedResponseSent(e,{handler:r,publicRequest:n,parsedRequest:o}){t.quiet||r.log(n,e,r,o)}})}catch(e){if(e instanceof Xe)return i.send({type:"NETWORK_ERROR",payload:{name:e.name,message:e.message}});i.send({type:"INTERNAL_ERROR",payload:{status:500,body:JSON.stringify({errorType:e.constructor.name,message:e.message,location:e.stack})}})}}));const Ur=e=>function(t,r){const n=(()=>Se(this,void 0,void 0,(function*(){e.events.removeAllListeners(),e.workerChannel.on("REQUEST",jr(e,t)),e.workerChannel.on("RESPONSE",function(e){return(t,r)=>{var n;const{payload:o}=r;if(null===(n=o.type)||void 0===n?void 0:n.includes("opaque"))return;const i=new Response(o.body||null,o);"msw"===i.headers.get("x-powered-by")?e.emitter.emit("response:mocked",i,o.requestId):e.emitter.emit("response:bypass",i,o.requestId)}}(e));const n=yield Ge(t.serviceWorker.url,t.serviceWorker.options,t.findWorker),[o,i]=n;if(!o){const e=(null==r?void 0:r.findWorker)?Ve.formatMessage('Failed to locate the Service Worker registration using a custom "findWorker" predicate.\n\nPlease ensure that the custom predicate properly locates the Service Worker registration at "%s".\nMore details: https://mswjs.io/docs/api/setup-worker/start#findworker\n',t.serviceWorker.url):Ve.formatMessage('Failed to locate the Service Worker registration.\n\nThis most likely means that the worker script URL "%s" cannot resolve against the actual public hostname (%s). This may happen if your application runs behind a proxy, or has a dynamic hostname.\n\nPlease consider using a custom "serviceWorker.url" option to point to the actual worker script location, or a custom "findWorker" option to resolve the Service Worker registration manually. More details: https://mswjs.io/docs/api/setup-worker/start',t.serviceWorker.url,location.host);throw new Error(e)}e.worker=o,e.registration=i,e.events.addListener(window,"beforeunload",(()=>{"redundant"!==o.state&&e.workerChannel.send("CLIENT_CLOSED"),window.clearInterval(e.keepAliveInterval)}));const[s]=yield ke((()=>function(e,t){return Se(this,void 0,void 0,(function*(){e.workerChannel.send("INTEGRITY_CHECK_REQUEST");const{payload:r}=yield e.events.once("INTEGRITY_CHECK_RESPONSE");if("02f4ad4a2797f85668baf196e553d929"!==r)throw new Error(`Currently active Service Worker (${r}) is behind the latest published one (02f4ad4a2797f85668baf196e553d929).`);return t}))}(e,o)));return s&&Ve.error(`Detected outdated Service Worker: ${s.message}\n\nThe mocking is still enabled, but it's highly recommended that you update your Service Worker by running:\n\n$ npx msw init <PUBLIC_DIR>\n\nThis is necessary to ensure that the Service Worker is in sync with the library to guarantee its stability.\nIf this message still persists after updating, please report an issue: https://github.com/open-draft/msw/issues `),e.keepAliveInterval=window.setInterval((()=>e.workerChannel.send("KEEPALIVE_REQUEST")),5e3),function(e,t){(null==t?void 0:t.quiet)||location.href.startsWith(e.scope)||Ve.warn(`Cannot intercept requests on this page because it's outside of the worker's scope ("${e.scope}"). If you wish to mock API requests on this page, you must resolve this scope issue.\n\n- (Recommended) Register the worker at the root level ("/") of your application.\n- Set the "Service-Worker-Allowed" response header to allow out-of-scope workers.`)}(i,e.startOptions),i})))().then((r=>Se(this,void 0,void 0,(function*(){const n=r.installing||r.waiting;return n&&(yield new Promise((e=>{n.addEventListener("statechange",(()=>{if("activated"===n.state)return e()}))}))),yield function(e,t){return Se(this,void 0,void 0,(function*(){return e.workerChannel.send("MOCK_ACTIVATE"),e.events.once("MOCKING_ENABLED").then((()=>{Ke({quiet:t.quiet})}))}))}(e,t).catch((e=>{throw new Error(`Failed to enable mocking: ${null==e?void 0:e.message}`)})),r}))));return t.waitUntilReady&&function(e){const t=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(...r){ke((()=>e)).then((()=>{window.XMLHttpRequest.prototype.send=t,this.send(...r)}))};const r=window.fetch;window.fetch=(...t)=>Se(this,void 0,void 0,(function*(){return yield ke((()=>e)),window.fetch=r,window.fetch(...t)}))}(n),n};function qr(e={}){e.quiet||console.log(`%c${Ve.formatMessage("Mocking disabled.")}`,"color:orangered;font-weight:bold;")}const Hr={serviceWorker:{url:"/mockServiceWorker.js",options:null},quiet:!1,waitUntilReady:!0,onUnhandledRequest:"warn",findWorker:(e,t)=>e===t};function $r(e,t){return r=>(t.startOptions=function(e){return G(Hr,e||{})}(r),e(t.startOptions,r||{}))}var Br={},Vr={};Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.createInterceptor=void 0;var Gr=ae;Vr.createInterceptor=function(e){var t=new Gr.StrictEventEmitter,r=[];return{apply:function(){r=e.modules.map((function(r){return r(t,e.resolver)}))},on:function(e,r){t.addListener(e,r)},restore:function(){if(t.removeAllListeners(),0===r.length)throw new Error('Failed to restore patched modules: no patches found. Did you forget to run ".apply()"?');r.forEach((function(e){return e()}))}}};var Kr={},Xr={};Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.toIsoResponse=void 0;var Yr=o;Xr.toIsoResponse=function(e){return{status:e.status||200,statusText:e.statusText||"OK",headers:Yr.objectToHeaders(e.headers||{}),body:e.body}};var Wr=n&&n.__assign||function(){return(Wr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},zr=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},Jr=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},Qr=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.createRemoteResolver=Kr.createRemoteInterceptor=void 0;var Zr=o,en=Le,tn=ae,rn=Vr,nn=Xr;function on(e,t){switch(e){case"url":return new URL(t);case"headers":return new Zr.Headers(t);default:return t}}Kr.createRemoteInterceptor=function(e){if(en.invariant(process.connected,"Failed to create a remote interceptor: the current process (%s) does not have a parent. Please make sure you're spawning this process as a child process in order to use remote request interception.",process.pid),void 0===process.send)throw new Error("Failed to create a remote interceptor: the current process ("+process.pid+") does not have the IPC enabled. Please make sure you're spawning this process with the \"ipc\" stdio value set:\n\nspawn('node', ['module.js'], { stdio: ['ipc'] })");var t,r=rn.createInterceptor(Wr(Wr({},e),{resolver:function(e){var r,n=JSON.stringify(e);return null===(r=process.send)||void 0===r||r.call(process,"request:"+n),new Promise((function(r){t=function(t){if("string"==typeof t&&t.startsWith("response:"+e.id)){var n=Qr(t.match(/^response:.+?:(.+)$/)||[],2)[1];if(!n)return r();var o=JSON.parse(n);return r(o)}},process.addListener("message",t)}))}}));return Wr(Wr({},r),{restore:function(){r.restore(),process.removeListener("message",t)}})},Kr.createRemoteResolver=function(e){var t=this,r=new tn.StrictEventEmitter,n=function(n){return zr(t,void 0,void 0,(function(){var t,o,i,s,a;return Jr(this,(function(c){switch(c.label){case 0:return"string"!=typeof n?[2]:n.startsWith("request:")?(t=Qr(n.match(/^request:(.+)$/)||[],2),(o=t[1])?(i=JSON.parse(o,on),r.emit("request",i),[4,e.resolver(i,void 0)]):[2]):[3,2];case 1:s=c.sent(),a=JSON.stringify(s),e.process.send("response:"+i.id+":"+a,(function(e){e||s&&r.emit("response",i,nn.toIsoResponse(s))})),c.label=2;case 2:return[2]}}))}))},o=function(){e.process.removeListener("message",n)};return e.process.addListener("message",n),e.process.addListener("disconnect",o),e.process.addListener("error",o),e.process.addListener("exit",o),{on:function(e,t){r.addListener(e,t)}}},function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=n&&n.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.getCleanUrl=void 0,r(Vr,e),r(Kr,e);var o=vr;Object.defineProperty(e,"getCleanUrl",{enumerable:!0,get:function(){return o.getCleanUrl}})}(Br);var sn={},an={};Object.defineProperty(an,"__esModule",{value:!0}),an.uuidv4=void 0,an.uuidv4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))};var cn={exports:{}},un=1e3,ln=60*un,dn=60*ln,pn=24*dn,hn=7*pn,fn=365.25*pn,mn=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*fn;case"weeks":case"week":case"w":return r*hn;case"days":case"day":case"d":return r*pn;case"hours":case"hour":case"hrs":case"hr":case"h":return r*dn;case"minutes":case"minute":case"mins":case"min":case"m":return r*ln;case"seconds":case"second":case"secs":case"sec":case"s":return r*un;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=pn)return vn(e,t,pn,"day");if(t>=dn)return vn(e,t,dn,"hour");if(t>=ln)return vn(e,t,ln,"minute");if(t>=un)return vn(e,t,un,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=pn)return Math.round(e/pn)+"d";if(t>=dn)return Math.round(e/dn)+"h";if(t>=ln)return Math.round(e/ln)+"m";if(t>=un)return Math.round(e/un)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function vn(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}var yn=function(e){function t(e){let n,o,i,s=null;function a(...e){if(!a.enabled)return;const r=a,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];n=i.call(r,t),e.splice(s,1),s--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=mn,t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t};!function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=yn(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(cn,cn.exports);var gn=n&&n.__assign||function(){return(gn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},En=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},bn=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(sn,"__esModule",{value:!0});var wn=sn.interceptFetch=void 0,Nn=o,Tn=Xr,xn=an,_n=cn.exports("fetch");function On(e){return En(this,void 0,void 0,(function(){var t;return bn(this,(function(r){switch(r.label){case 0:return t={status:e.status,statusText:e.statusText,headers:Nn.objectToHeaders(Nn.headersToObject(e.headers))},[4,e.text()];case 1:return[2,(t.body=r.sent(),t)]}}))}))}wn=sn.interceptFetch=function(e,t){var r=window.fetch;return _n('replacing "window.fetch"...'),window.fetch=function(n,o){return En(void 0,void 0,void 0,(function(){var i,s,a,c,u,l,d;return bn(this,(function(p){switch(p.label){case 0:return i=new Request(n,o),s="string"==typeof n?n:n.url,a=i.method,_n("[%s] %s",a,s),d={id:xn.uuidv4(),url:new URL(s,location.origin),method:a,headers:new Nn.Headers(i.headers),credentials:i.credentials},[4,i.clone().text()];case 1:return d.body=p.sent(),_n("isomorphic request",c=d),e.emit("request",c),_n("awaiting for the mocked response..."),[4,t(c,i)];case 2:return u=p.sent(),_n("mocked response",u),u?(l=Tn.toIsoResponse(u),_n("derived isomorphic response",l),e.emit("response",c,l),[2,new Response(u.body,gn(gn({},l),{headers:Nn.flattenHeadersObject(u.headers||{})}))]):(_n("no mocked response found, bypassing..."),[2,r(i).then((function(t){return En(void 0,void 0,void 0,(function(){var r,n,o,i;return bn(this,(function(s){switch(s.label){case 0:return r=t.clone(),_n("original fetch performed",r),o=(n=e).emit,i=["response",c],[4,On(r)];case 1:return o.apply(n,i.concat([s.sent()])),[2,t]}}))}))}))])}}))}))},function(){_n("restoring modules..."),window.fetch=r}};var Cn={},Sn={},In={},An={},Rn={};function kn(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var Dn=kn({HTML:"text/html",isHTML:function(e){return e===Dn.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Ln=kn({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===Ln.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});Rn.freeze=kn,Rn.MIME_TYPE=Dn,Rn.NAMESPACE=Ln;var Pn=Rn.NAMESPACE;function Mn(e){return""!==e}function Fn(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function jn(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(Mn):[]}(e);return Object.keys(t.reduce(Fn,{}))}function Un(e,t){for(var r in e)t[r]=e[r]}function qn(e,t){var r=e.prototype;if(!(r instanceof t)){function n(){}n.prototype=t.prototype,Un(r,n=new n),e.prototype=r=n}r.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),r.constructor=e)}var Hn={},$n=Hn.ELEMENT_NODE=1,Bn=Hn.ATTRIBUTE_NODE=2,Vn=Hn.TEXT_NODE=3,Gn=Hn.CDATA_SECTION_NODE=4,Kn=Hn.ENTITY_REFERENCE_NODE=5,Xn=Hn.ENTITY_NODE=6,Yn=Hn.PROCESSING_INSTRUCTION_NODE=7,Wn=Hn.COMMENT_NODE=8,zn=Hn.DOCUMENT_NODE=9,Jn=Hn.DOCUMENT_TYPE_NODE=10,Qn=Hn.DOCUMENT_FRAGMENT_NODE=11,Zn=Hn.NOTATION_NODE=12,eo={},to={};eo.INDEX_SIZE_ERR=(to[1]="Index size error",1),eo.DOMSTRING_SIZE_ERR=(to[2]="DOMString size error",2);var ro=eo.HIERARCHY_REQUEST_ERR=(to[3]="Hierarchy request error",3);eo.WRONG_DOCUMENT_ERR=(to[4]="Wrong document",4),eo.INVALID_CHARACTER_ERR=(to[5]="Invalid character",5),eo.NO_DATA_ALLOWED_ERR=(to[6]="No data allowed",6),eo.NO_MODIFICATION_ALLOWED_ERR=(to[7]="No modification allowed",7);var no=eo.NOT_FOUND_ERR=(to[8]="Not found",8);eo.NOT_SUPPORTED_ERR=(to[9]="Not supported",9);var oo=eo.INUSE_ATTRIBUTE_ERR=(to[10]="Attribute in use",10);function io(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,to[e]),this.message=to[e],Error.captureStackTrace&&Error.captureStackTrace(this,io);return r.code=e,t&&(this.message=this.message+": "+t),r}function so(){}function ao(e,t){this._node=e,this._refresh=t,co(this)}function co(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);$o(e,"length",r.length),Un(r,e),e._inc=t}}function uo(){}function lo(e,t){for(var r=e.length;r--;)if(e[r]===t)return r}function po(e,t,r,n){if(n?t[lo(t,n)]=r:t[t.length++]=r,e){r.ownerElement=e;var o=e.ownerDocument;o&&(n&&Eo(o,e,n),function(e,t,r){e&&e._inc++,r.namespaceURI===Pn.XMLNS&&(t._nsMap[r.prefix?r.localName:""]=r.value)}(o,e,r))}}function ho(e,t,r){var n=lo(t,r);if(!(n>=0))throw io(no,new Error(e.tagName+"@"+r));for(var o=t.length-1;n<o;)t[n]=t[++n];if(t.length=o,e){var i=e.ownerDocument;i&&(Eo(i,e,r),r.ownerElement=null)}}function fo(){}function mo(){}function vo(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function yo(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(yo(e,t))return!0}while(e=e.nextSibling)}function go(){}function Eo(e,t,r,n){e&&e._inc++,r.namespaceURI===Pn.XMLNS&&delete t._nsMap[r.prefix?r.localName:""]}function bo(e,t,r){if(e&&e._inc){e._inc++;var n=t.childNodes;if(r)n[n.length++]=r;else{for(var o=t.firstChild,i=0;o;)n[i++]=o,o=o.nextSibling;n.length=i}}}function wo(e,t){var r=t.previousSibling,n=t.nextSibling;return r?r.nextSibling=n:e.firstChild=n,n?n.previousSibling=r:e.lastChild=r,bo(e.ownerDocument,e),t}function No(e,t,r){var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Qn){var o=t.firstChild;if(null==o)return t;var i=t.lastChild}else o=i=t;var s=r?r.previousSibling:e.lastChild;o.previousSibling=s,i.nextSibling=r,s?s.nextSibling=o:e.firstChild=o,null==r?e.lastChild=i:r.previousSibling=i;do{o.parentNode=e}while(o!==i&&(o=o.nextSibling));return bo(e.ownerDocument||e,e),t.nodeType==Qn&&(t.firstChild=t.lastChild=null),t}function To(){this._nsMap={}}function xo(){}function _o(){}function Oo(){}function Co(){}function So(){}function Io(){}function Ao(){}function Ro(){}function ko(){}function Do(){}function Lo(){}function Po(){}function Mo(e,t){var r=[],n=9==this.nodeType&&this.documentElement||this,o=n.prefix,i=n.namespaceURI;if(i&&null==o&&null==(o=n.lookupPrefix(i)))var s=[{namespace:i,prefix:null}];return Uo(this,r,e,t,s),r.join("")}function Fo(e,t,r){var n=e.prefix||"",o=e.namespaceURI;if(!o)return!1;if("xml"===n&&o===Pn.XML||o===Pn.XMLNS)return!1;for(var i=r.length;i--;){var s=r[i];if(s.prefix===n)return s.namespace!==o}return!0}function jo(e,t,r){e.push(" ",t,'="',r.replace(/[<&"]/g,vo),'"')}function Uo(e,t,r,n,o){if(o||(o=[]),n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case $n:var i=e.attributes,s=i.length,a=e.firstChild,c=e.tagName,u=c;if(!(r=Pn.isHTML(e.namespaceURI)||r)&&!e.prefix&&e.namespaceURI){for(var l,d=0;d<i.length;d++)if("xmlns"===i.item(d).name){l=i.item(d).value;break}if(!l)for(var p=o.length-1;p>=0;p--){if(""===(h=o[p]).prefix&&h.namespace===e.namespaceURI){l=h.namespace;break}}if(l!==e.namespaceURI)for(p=o.length-1;p>=0;p--){var h;if((h=o[p]).namespace===e.namespaceURI){h.prefix&&(u=h.prefix+":"+c);break}}}t.push("<",u);for(var f=0;f<s;f++){"xmlns"==(m=i.item(f)).prefix?o.push({prefix:m.localName,namespace:m.value}):"xmlns"==m.nodeName&&o.push({prefix:"",namespace:m.value})}for(f=0;f<s;f++){var m,v,y;if(Fo(m=i.item(f),0,o))jo(t,(v=m.prefix||"")?"xmlns:"+v:"xmlns",y=m.namespaceURI),o.push({prefix:v,namespace:y});Uo(m,t,r,n,o)}if(c===u&&Fo(e,0,o))jo(t,(v=e.prefix||"")?"xmlns:"+v:"xmlns",y=e.namespaceURI),o.push({prefix:v,namespace:y});if(a||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),r&&/^script$/i.test(c))for(;a;)a.data?t.push(a.data):Uo(a,t,r,n,o.slice()),a=a.nextSibling;else for(;a;)Uo(a,t,r,n,o.slice()),a=a.nextSibling;t.push("</",u,">")}else t.push("/>");return;case zn:case Qn:for(a=e.firstChild;a;)Uo(a,t,r,n,o.slice()),a=a.nextSibling;return;case Bn:return jo(t,e.name,e.value);case Vn:return t.push(e.data.replace(/[<&]/g,vo).replace(/]]>/g,"]]&gt;"));case Gn:return t.push("<![CDATA[",e.data,"]]>");case Wn:return t.push("\x3c!--",e.data,"--\x3e");case Jn:var g=e.publicId,E=e.systemId;if(t.push("<!DOCTYPE ",e.name),g)t.push(" PUBLIC ",g),E&&"."!=E&&t.push(" ",E),t.push(">");else if(E&&"."!=E)t.push(" SYSTEM ",E,">");else{var b=e.internalSubset;b&&t.push(" [",b,"]"),t.push(">")}return;case Yn:return t.push("<?",e.target," ",e.data,"?>");case Kn:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function qo(e,t,r){var n;switch(t.nodeType){case $n:(n=t.cloneNode(!1)).ownerDocument=e;case Qn:break;case Bn:r=!0}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,r)for(var o=t.firstChild;o;)n.appendChild(qo(e,o,r)),o=o.nextSibling;return n}function Ho(e,t,r){var n=new t.constructor;for(var o in t){var i=t[o];"object"!=typeof i&&i!=n[o]&&(n[o]=i)}switch(t.childNodes&&(n.childNodes=new so),n.ownerDocument=e,n.nodeType){case $n:var s=t.attributes,a=n.attributes=new uo,c=s.length;a._ownerElement=n;for(var u=0;u<c;u++)n.setAttributeNode(Ho(e,s.item(u),!0));break;case Bn:r=!0}if(r)for(var l=t.firstChild;l;)n.appendChild(Ho(e,l,r)),l=l.nextSibling;return n}function $o(e,t,r){e[t]=r}eo.INVALID_STATE_ERR=(to[11]="Invalid state",11),eo.SYNTAX_ERR=(to[12]="Syntax error",12),eo.INVALID_MODIFICATION_ERR=(to[13]="Invalid modification",13),eo.NAMESPACE_ERR=(to[14]="Invalid namespace",14),eo.INVALID_ACCESS_ERR=(to[15]="Invalid access",15),io.prototype=Error.prototype,Un(eo,io),so.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var r=[],n=0;n<this.length;n++)Uo(this[n],r,e,t);return r.join("")}},ao.prototype.item=function(e){return co(this),this[e]},qn(ao,so),uo.prototype={length:0,item:so.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var r=this[t];if(r.nodeName==e)return r}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new io(oo);var r=this.getNamedItem(e.nodeName);return po(this._ownerElement,this,e,r),r},setNamedItemNS:function(e){var t,r=e.ownerElement;if(r&&r!=this._ownerElement)throw new io(oo);return t=this.getNamedItemNS(e.namespaceURI,e.localName),po(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return ho(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var r=this.getNamedItemNS(e,t);return ho(this._ownerElement,this,r),r},getNamedItemNS:function(e,t){for(var r=this.length;r--;){var n=this[r];if(n.localName==t&&n.namespaceURI==e)return n}return null}},fo.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,r){var n=new go;if(n.implementation=this,n.childNodes=new so,n.doctype=r||null,r&&n.appendChild(r),t){var o=n.createElementNS(e,t);n.appendChild(o)}return n},createDocumentType:function(e,t,r){var n=new Io;return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=r||"",n}},mo.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return No(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return wo(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return Ho(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Vn&&e.nodeType==Vn?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r)for(var n in r)if(r[n]==e)return n;t=t.nodeType==Bn?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&e in r)return r[e];t=t.nodeType==Bn?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Un(Hn,mo),Un(Hn,mo.prototype),go.prototype={nodeName:"#document",nodeType:zn,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Qn){for(var r=e.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,t),r=n}return e}return null==this.documentElement&&e.nodeType==$n&&(this.documentElement=e),No(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),wo(this,e)},importNode:function(e,t){return qo(this,e,t)},getElementById:function(e){var t=null;return yo(this.documentElement,(function(r){if(r.nodeType==$n&&r.getAttribute("id")==e)return t=r,!0})),t},getElementsByClassName:function(e){var t=jn(e);return new ao(this,(function(r){var n=[];return t.length>0&&yo(r.documentElement,(function(o){if(o!==r&&o.nodeType===$n){var i=o.getAttribute("class");if(i){var s=e===i;if(!s){var a=jn(i);s=t.every((c=a,function(e){return c&&-1!==c.indexOf(e)}))}s&&n.push(o)}}var c})),n}))},createElement:function(e){var t=new To;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new so,(t.attributes=new uo)._ownerElement=t,t},createDocumentFragment:function(){var e=new Do;return e.ownerDocument=this,e.childNodes=new so,e},createTextNode:function(e){var t=new Oo;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Co;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new So;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new Lo;return r.ownerDocument=this,r.tagName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){var t=new xo;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new ko;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var r=new To,n=t.split(":"),o=r.attributes=new uo;return r.childNodes=new so,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=e,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,o._ownerElement=r,r},createAttributeNS:function(e,t){var r=new xo,n=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=e,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,r}},qn(go,mo),To.prototype={nodeType:$n,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var r=this.ownerDocument.createAttribute(e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Qn?this.insertBefore(e,null):function(e,t){var r=t.parentNode;if(r){var n=e.lastChild;r.removeChild(t),n=e.lastChild}return n=e.lastChild,t.parentNode=e,t.previousSibling=n,t.nextSibling=null,n?n.nextSibling=t:e.firstChild=t,e.lastChild=t,bo(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r&&r.value||""},setAttributeNS:function(e,t,r){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new ao(this,(function(t){var r=[];return yo(t,(function(n){n===t||n.nodeType!=$n||"*"!==e&&n.tagName!=e||r.push(n)})),r}))},getElementsByTagNameNS:function(e,t){return new ao(this,(function(r){var n=[];return yo(r,(function(o){o===r||o.nodeType!==$n||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||n.push(o)})),n}))}},go.prototype.getElementsByTagName=To.prototype.getElementsByTagName,go.prototype.getElementsByTagNameNS=To.prototype.getElementsByTagNameNS,qn(To,mo),xo.prototype.nodeType=Bn,qn(xo,mo),_o.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(to[ro])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){r=this.data.substring(0,e)+r+this.data.substring(e+t),this.nodeValue=this.data=r,this.length=r.length}},qn(_o,mo),Oo.prototype={nodeName:"#text",nodeType:Vn,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},qn(Oo,_o),Co.prototype={nodeName:"#comment",nodeType:Wn},qn(Co,_o),So.prototype={nodeName:"#cdata-section",nodeType:Gn},qn(So,_o),Io.prototype.nodeType=Jn,qn(Io,mo),Ao.prototype.nodeType=Zn,qn(Ao,mo),Ro.prototype.nodeType=Xn,qn(Ro,mo),ko.prototype.nodeType=Kn,qn(ko,mo),Do.prototype.nodeName="#document-fragment",Do.prototype.nodeType=Qn,qn(Do,mo),Lo.prototype.nodeType=Yn,qn(Lo,mo),Po.prototype.serializeToString=function(e,t,r){return Mo.call(e,t,r)},mo.prototype.toString=Mo;try{if(Object.defineProperty){function Bo(e){switch(e.nodeType){case $n:case Qn:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(Bo(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(ao.prototype,"length",{get:function(){return co(this),this.$$length}}),Object.defineProperty(mo.prototype,"textContent",{get:function(){return Bo(this)},set:function(e){switch(this.nodeType){case $n:case Qn:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),$o=function(e,t,r){e["$$"+t]=r}}}catch(e){}An.DocumentType=Io,An.DOMException=io,An.DOMImplementation=fo,An.Element=To,An.Node=mo,An.NodeList=so,An.XMLSerializer=Po;var Vo={},Go={};!function(e){var t=Rn.freeze;e.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=t({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),e.entityMap=e.HTML_ENTITIES}(Go);var Ko={},Xo=Rn.NAMESPACE,Yo=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Wo=new RegExp("[\\-\\.0-9"+Yo.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),zo=new RegExp("^"+Yo.source+Wo.source+"*(?::"+Yo.source+Wo.source+"*)?$");function Jo(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,Jo)}function Qo(){}function Zo(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function ei(e,t,r,n,o,i){function s(e,t,n){r.attributeNames.hasOwnProperty(e)&&i.fatalError("Attribute "+e+" redefined"),r.addValue(e,t,n)}for(var a,c=++t,u=0;;){var l=e.charAt(c);switch(l){case"=":if(1===u)a=e.slice(t,c),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(i.warning('attribute value must after "="'),a=e.slice(t,c)),t=c+1,!((c=e.indexOf(l,t))>0))throw new Error("attribute value no end '"+l+"' match");s(a,d=e.slice(t,c).replace(/&#?\w+;/g,o),t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');s(a,d=e.slice(t,c).replace(/&#?\w+;/g,o),t),i.warning('attribute "'+a+'" missed start quot('+l+")!!"),t=c+1,u=5}break;case"/":switch(u){case 0:r.setTagName(e.slice(t,c));case 5:case 6:case 7:u=7,r.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),0==u&&r.setTagName(e.slice(t,c)),c;case">":switch(u){case 0:r.setTagName(e.slice(t,c));case 5:case 6:case 7:break;case 4:case 1:"/"===(d=e.slice(t,c)).slice(-1)&&(r.closed=!0,d=d.slice(0,-1));case 2:2===u&&(d=a),4==u?(i.warning('attribute "'+d+'" missed quot(")!'),s(a,d.replace(/&#?\w+;/g,o),t)):(Xo.isHTML(n[""])&&d.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+d+'" missed value!! "'+d+'" instead!!'),s(d,d,t));break;case 3:throw new Error("attribute value missed!!")}return c;case"€":l=" ";default:if(l<=" ")switch(u){case 0:r.setTagName(e.slice(t,c)),u=6;break;case 1:a=e.slice(t,c),u=2;break;case 4:var d=e.slice(t,c).replace(/&#?\w+;/g,o);i.warning('attribute "'+d+'" missed quot(")!!'),s(a,d,t);case 5:u=6}else switch(u){case 2:r.tagName,Xo.isHTML(n[""])&&a.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),s(a,a,t),t=c,u=1;break;case 5:i.warning('attribute space is required"'+a+'"!!');case 6:u=1,t=c;break;case 3:u=4,t=c;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function ti(e,t,r){for(var n=e.tagName,o=null,i=e.length;i--;){var s=e[i],a=s.qName,c=s.value;if((p=a.indexOf(":"))>0)var u=s.prefix=a.slice(0,p),l=a.slice(p+1),d="xmlns"===u&&l;else l=a,u=null,d="xmlns"===a&&"";s.localName=l,!1!==d&&(null==o&&(o={},oi(r,r={})),r[d]=o[d]=c,s.uri=Xo.XMLNS,t.startPrefixMapping(d,c))}for(i=e.length;i--;){(u=(s=e[i]).prefix)&&("xml"===u&&(s.uri=Xo.XML),"xmlns"!==u&&(s.uri=r[u||""]))}var p;(p=n.indexOf(":"))>0?(u=e.prefix=n.slice(0,p),l=e.localName=n.slice(p+1)):(u=null,l=e.localName=n);var h=e.uri=r[u||""];if(t.startElement(h,l,n,e),!e.closed)return e.currentNSMap=r,e.localNSMap=o,!0;if(t.endElement(h,l,n),o)for(u in o)t.endPrefixMapping(u)}function ri(e,t,r,n,o){if(/^(?:script|textarea)$/i.test(r)){var i=e.indexOf("</"+r+">",t),s=e.substring(t+1,i);if(/[&<]/.test(s))return/^script$/i.test(r)?(o.characters(s,0,s.length),i):(s=s.replace(/&#?\w+;/g,n),o.characters(s,0,s.length),i)}return t+1}function ni(e,t,r,n){var o=n[r];return null==o&&((o=e.lastIndexOf("</"+r+">"))<t&&(o=e.lastIndexOf("</"+r)),n[r]=o),o<t}function oi(e,t){for(var r in e)t[r]=e[r]}function ii(e,t,r,n){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(o=e.indexOf("--\x3e",t+4))>t?(r.comment(e,t+4,o-t-4),o+3):(n.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var o=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,o-t-9),r.endCDATA(),o+3}var i=function(e,t){var r,n=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;o.lastIndex=t,o.exec(e);for(;r=o.exec(e);)if(n.push(r),r[1])return n}(e,t),s=i.length;if(s>1&&/!doctype/i.test(i[0][0])){var a=i[1][0],c=!1,u=!1;s>3&&(/^public$/i.test(i[2][0])?(c=i[3][0],u=s>4&&i[4][0]):/^system$/i.test(i[2][0])&&(u=i[3][0]));var l=i[s-1];return r.startDTD(a,c,u),r.endDTD(),l.index+l[0].length}}return-1}function si(e,t,r){var n=e.indexOf("?>",t);if(n){var o=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return o?(o[0].length,r.processingInstruction(o[1],o[2]),n+2):-1}return-1}function ai(){this.attributeNames={}}Jo.prototype=new Error,Jo.prototype.name=Jo.name,Qo.prototype={parse:function(e,t,r){var n=this.domBuilder;n.startDocument(),oi(t,t={}),function(e,t,r,n,o){function i(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}function s(e){var t=e.slice(1,-1);return t in r?r[t]:"#"===t.charAt(0)?i(parseInt(t.substr(1).replace("x","0x"))):(o.error("entity not found:"+e),e)}function a(t){if(t>m){var r=e.substring(m,t).replace(/&#?\w+;/g,s);p&&c(m),n.characters(r,0,t-m),m=t}}function c(t,r){for(;t>=l&&(r=d.exec(e));)u=r.index,l=u+r[0].length,p.lineNumber++;p.columnNumber=t-u+1}var u=0,l=0,d=/.*(?:\r\n?|\n)|.*$/g,p=n.locator,h=[{currentNSMap:t}],f={},m=0;for(;;){try{var v=e.indexOf("<",m);if(v<0){if(!e.substr(m).match(/^\s*$/)){var y=n.doc,g=y.createTextNode(e.substr(m));y.appendChild(g),n.currentElement=g}return}switch(v>m&&a(v),e.charAt(v+1)){case"/":var E=e.indexOf(">",v+3),b=e.substring(v+2,E).replace(/[ \t\n\r]+$/g,""),w=h.pop();E<0?(b=e.substring(v+2).replace(/[\s<].*/,""),o.error("end tag name: "+b+" is not complete:"+w.tagName),E=v+1+b.length):b.match(/\s</)&&(b=b.replace(/[\s<].*/,""),o.error("end tag name: "+b+" maybe not complete"),E=v+1+b.length);var N=w.localNSMap,T=w.tagName==b;if(T||w.tagName&&w.tagName.toLowerCase()==b.toLowerCase()){if(n.endElement(w.uri,w.localName,b),N)for(var x in N)n.endPrefixMapping(x);T||o.fatalError("end tag name: "+b+" is not match the current start tagName:"+w.tagName)}else h.push(w);E++;break;case"?":p&&c(v),E=si(e,v,n);break;case"!":p&&c(v),E=ii(e,v,n,o);break;default:p&&c(v);var _=new ai,O=h[h.length-1].currentNSMap,C=(E=ei(e,v,_,O,s,o),_.length);if(!_.closed&&ni(e,E,_.tagName,f)&&(_.closed=!0,r.nbsp||o.warning("unclosed xml attribute")),p&&C){for(var S=Zo(p,{}),I=0;I<C;I++){var A=_[I];c(A.offset),A.locator=Zo(p,{})}n.locator=S,ti(_,n,O)&&h.push(_),n.locator=p}else ti(_,n,O)&&h.push(_);Xo.isHTML(_.uri)&&!_.closed?E=ri(e,E,_.tagName,s,n):E++}}catch(e){if(e instanceof Jo)throw e;o.error("element parse error: "+e),E=-1}E>m?m=E:a(Math.max(v,m)+1)}}(e,t,r,n,this.errorHandler),n.endDocument()}},ai.prototype={setTagName:function(e){if(!zo.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,r){if(!zo.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Ko.XMLReader=Qo,Ko.ParseError=Jo;var ci=Rn,ui=An,li=Go,di=Ko,pi=ui.DOMImplementation,hi=ci.NAMESPACE,fi=di.ParseError,mi=di.XMLReader;function vi(e){this.options=e||{locator:{}}}function yi(){this.cdata=!1}function gi(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function Ei(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function bi(e,t,r){return"string"==typeof e?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}function wi(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}vi.prototype.parseFromString=function(e,t){var r=this.options,n=new mi,o=r.domBuilder||new yi,i=r.errorHandler,s=r.locator,a=r.xmlns||{},c=/\/x?html?$/.test(t),u=c?li.HTML_ENTITIES:li.XML_ENTITIES;return s&&o.setDocumentLocator(s),n.errorHandler=function(e,t,r){if(!e){if(t instanceof yi)return t;e=t}var n={},o=e instanceof Function;function i(t){var i=e[t];!i&&o&&(i=2==e.length?function(r){e(t,r)}:e),n[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+Ei(r))}||function(){}}return r=r||{},i("warning"),i("error"),i("fatalError"),n}(i,o,s),n.domBuilder=r.domBuilder||o,c&&(a[""]=hi.HTML),a.xml=a.xml||hi.XML,e&&"string"==typeof e?n.parse(e,a,u):n.errorHandler.error("invalid doc source"),o.doc},yi.prototype={startDocument:function(){this.doc=(new pi).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,r,n){var o=this.doc,i=o.createElementNS(e,r||t),s=n.length;wi(this,i),this.currentElement=i,this.locator&&gi(this.locator,i);for(var a=0;a<s;a++){e=n.getURI(a);var c=n.getValue(a),u=(r=n.getQName(a),o.createAttributeNS(e,r));this.locator&&gi(n.getLocator(a),u),u.value=u.nodeValue=c,i.setAttributeNode(u)}},endElement:function(e,t,r){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var r=this.doc.createProcessingInstruction(e,t);this.locator&&gi(this.locator,r),wi(this,r)},ignorableWhitespace:function(e,t,r){},characters:function(e,t,r){if(e=bi.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&gi(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,r){e=bi.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&gi(this.locator,n),wi(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,r){var n=this.doc.implementation;if(n&&n.createDocumentType){var o=n.createDocumentType(e,t,r);this.locator&&gi(this.locator,o),wi(this,o),this.doc.doctype=o}},warning:function(e){console.warn("[xmldom warning]\t"+e,Ei(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,Ei(this.locator))},fatalError:function(e){throw new fi(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){yi.prototype[e]=function(){return null}})),Vo.__DOMHandler=yi,Vo.DOMParser=vi,Vo.DOMImplementation=ui.DOMImplementation,Vo.XMLSerializer=ui.XMLSerializer;var Ni=An;In.DOMImplementation=Ni.DOMImplementation,In.XMLSerializer=Ni.XMLSerializer,In.DOMParser=Vo.DOMParser;var Ti={};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.parseJson=void 0,Ti.parseJson=function(e){try{return JSON.parse(e)}catch(e){return null}};var xi={};Object.defineProperty(xi,"__esModule",{value:!0}),xi.bufferFrom=void 0,xi.bufferFrom=function(e){var t=encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)})),r=new Uint8Array(t.length);return Array.prototype.forEach.call(t,(function(e,t){r[t]=e.charCodeAt(0)})),r};var _i={},Oi={};Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.EventPolyfill=void 0;var Ci=function(){function e(e,t){this.AT_TARGET=0,this.BUBBLING_PHASE=0,this.CAPTURING_PHASE=0,this.NONE=0,this.type="",this.srcElement=null,this.currentTarget=null,this.eventPhase=0,this.isTrusted=!0,this.composed=!1,this.cancelable=!0,this.defaultPrevented=!1,this.bubbles=!0,this.lengthComputable=!0,this.loaded=0,this.total=0,this.cancelBubble=!1,this.returnValue=!0,this.type=e,this.target=(null==t?void 0:t.target)||null,this.currentTarget=(null==t?void 0:t.currentTarget)||null,this.timeStamp=Date.now()}return e.prototype.composedPath=function(){return[]},e.prototype.initEvent=function(e,t,r){this.type=e,this.bubbles=!!t,this.cancelable=!!r},e.prototype.preventDefault=function(){this.defaultPrevented=!0},e.prototype.stopPropagation=function(){},e.prototype.stopImmediatePropagation=function(){},e}();Oi.EventPolyfill=Ci;var Si={},Ii=n&&n.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Si,"__esModule",{value:!0}),Si.ProgressEventPolyfill=void 0;var Ai=function(e){function t(t,r){var n=e.call(this,t)||this;return n.lengthComputable=(null==r?void 0:r.lengthComputable)||!1,n.composed=(null==r?void 0:r.composed)||!1,n.loaded=(null==r?void 0:r.loaded)||0,n.total=(null==r?void 0:r.total)||0,n}return Ii(t,e),t}(Oi.EventPolyfill);Si.ProgressEventPolyfill=Ai,Object.defineProperty(_i,"__esModule",{value:!0}),_i.createEvent=void 0;var Ri=Oi,ki=Si,Di="undefined"!=typeof ProgressEvent;_i.createEvent=function(e,t,r){var n=Di?ProgressEvent:ki.ProgressEventPolyfill;return["error","progress","loadstart","loadend","load","timeout","abort"].includes(t)?new n(t,{lengthComputable:!0,loaded:(null==r?void 0:r.loaded)||0,total:(null==r?void 0:r.total)||0}):new Ri.EventPolyfill(t,{target:e,currentTarget:e})};var Li=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},Pi=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},Mi=n&&n.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Fi=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.createXMLHttpRequestOverride=void 0;var ji=Ie,Ui=o,qi=In,Hi=Ti,$i=Xr,Bi=an,Vi=xi,Gi=_i,Ki=cn.exports;Sn.createXMLHttpRequestOverride=function(e){var t,r=e.pureXMLHttpRequest,n=e.observer,o=e.resolver,i=Ki("XHR");return(t=function(){function e(){this._events=[],this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.onreadystatechange=null,this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.ontimeout=null,this.url="",this.method="GET",this.readyState=this.UNSENT,this.withCredentials=!1,this.status=200,this.statusText="OK",this.data="",this.response="",this.responseType="text",this.responseText="",this.responseXML=null,this.responseURL="",this.upload={},this.timeout=0,this._requestHeaders=new Ui.Headers,this._responseHeaders=new Ui.Headers}return e.prototype.setReadyState=function(e){e!==this.readyState&&(i("readyState change %d -> %d",this.readyState,e),this.readyState=e,e!==this.UNSENT&&(i("triggerring readystate change..."),this.trigger("readystatechange")))},e.prototype.trigger=function(e,t){var r,n;i('trigger "%s" (%d)',e,this.readyState),i('resolve listener for event "%s"',e);var o=this["on"+e];null==o||o.call(this,Gi.createEvent(this,e,t));try{for(var s=Mi(this._events),a=s.next();!a.done;a=s.next()){var c=a.value;c.name===e&&(i('calling mock event listener "%s" (%d)',e,this.readyState),c.listener.call(this,Gi.createEvent(this,e,t)))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return this},e.prototype.reset=function(){i("reset"),this.setReadyState(this.UNSENT),this.status=200,this.statusText="OK",this.data="",this.response=null,this.responseText=null,this.responseXML=null,this._requestHeaders=new Ui.Headers,this._responseHeaders=new Ui.Headers},e.prototype.open=function(e,t,r,n,o){return void 0===r&&(r=!0),Li(this,void 0,void 0,(function(){return Pi(this,(function(s){return(i=Ki("XHR "+e+" "+t))("open",{method:e,url:t,async:r,user:n,password:o}),this.reset(),this.setReadyState(this.OPENED),void 0===t?(this.url=e,this.method="GET"):(this.url=t,this.method=e,this.async=r,this.user=n,this.password=o),[2]}))}))},e.prototype.send=function(e){var t,s=this;i("send %s %s",this.method,this.url),this.data=e||"";try{t=new URL(this.url)}catch(e){t=new URL(this.url,window.location.href)}i("request headers",this._requestHeaders);var a={id:Bi.uuidv4(),url:t,method:this.method,headers:this._requestHeaders,credentials:this.withCredentials?"include":"omit",body:this.data};n.emit("request",a),i("awaiting mocked response..."),Promise.resolve(ji.until((function(){return Li(s,void 0,void 0,(function(){return Pi(this,(function(e){return[2,o(a,this)]}))}))}))).then((function(e){var t,o=Fi(e,2),c=o[0],u=o[1];if(c)return i("middleware function threw an exception!",c),s.trigger("error"),void s.abort();if(u){if(i("received mocked response",u),s.trigger("loadstart"),s.status=u.status||200,s.statusText=u.statusText||"OK",s._responseHeaders=u.headers?Ui.objectToHeaders(u.headers):new Ui.Headers,i("set response status",s.status,s.statusText),i("set response headers",s._responseHeaders),s.setReadyState(s.HEADERS_RECEIVED),i("response type",s.responseType),s.response=s.getResponseBody(u.body),s.responseText=u.body||"",s.responseXML=s.getResponseXML(),i("set response body",s.response),u.body&&s.response){s.setReadyState(s.LOADING);var l=Vi.bufferFrom(u.body);s.trigger("progress",{loaded:l.length,total:l.length})}s.setReadyState(s.DONE),s.trigger("load"),s.trigger("loadend"),n.emit("response",a,$i.toIsoResponse(u))}else{i("no mocked response received!");var d=new r;i("opening an original request %s %s",s.method,s.url),d.open(s.method,s.url,null===(t=s.async)||void 0===t||t,s.user,s.password),d.addEventListener("load",(function(){i('original "onload"'),s.status=d.status,s.statusText=d.statusText,s.responseURL=d.responseURL,s.responseType=d.responseType,s.response=d.response,s.responseText=d.responseText,s.responseXML=d.responseXML,i("set mock request readyState to DONE"),s.setReadyState(s.DONE),i("received original response",s.status,s.statusText),i("original response body:",s.response);var e=d.getAllResponseHeaders();i("original response headers:\n",e),s._responseHeaders=Ui.stringToHeaders(e),i("original response headers (normalized)",s._responseHeaders),i("original response finished"),n.emit("response",a,{status:d.status,statusText:d.statusText,headers:s._responseHeaders,body:d.response})})),s.propagateCallbacks(d),s.propagateListeners(d),s.propagateHeaders(d,s._requestHeaders),s.async&&(d.timeout=s.timeout),i("send",s.data),d.send(s.data)}}))},e.prototype.abort=function(){i("abort"),this.readyState>this.UNSENT&&this.readyState<this.DONE&&(this.setReadyState(this.UNSENT),this.trigger("abort"))},e.prototype.dispatchEvent=function(){return!1},e.prototype.setRequestHeader=function(e,t){i('set request header "%s" to "%s"',e,t),this._requestHeaders.append(e,t)},e.prototype.getResponseHeader=function(e){if(i('get response header "%s"',e),this.readyState<this.HEADERS_RECEIVED)return i("cannot return a header: headers not received (state: %s)",this.readyState),null;var t=this._responseHeaders.get(e);return i('resolved response header "%s" to "%s"',e,t,this._responseHeaders),t},e.prototype.getAllResponseHeaders=function(){return i("get all response headers"),this.readyState<this.HEADERS_RECEIVED?(i("cannot return headers: headers not received (state: %s)",this.readyState),""):Ui.headersToString(this._responseHeaders)},e.prototype.addEventListener=function(e,t){i("addEventListener",e,t),this._events.push({name:e,listener:t})},e.prototype.removeEventListener=function(e,t){i("removeEventListener",e,t),this._events=this._events.filter((function(r){return r.name!==e&&r.listener!==t}))},e.prototype.overrideMimeType=function(){},e.prototype.getResponseBody=function(e){var t=null!=e?e:"";switch(i("coerced response body to",t),this.responseType){case"json":return i("resolving response body as JSON"),Hi.parseJson(t);case"blob":var r=this.getResponseHeader("content-type")||"text/plain";return i("resolving response body as Blob",{type:r}),new Blob([t],{type:r});case"arraybuffer":return i("resolving response body as ArrayBuffer"),Vi.bufferFrom(t);default:return t}},e.prototype.getResponseXML=function(){var e=this.getResponseHeader("Content-Type");return"application/xml"===e||"text/xml"===e?(new qi.DOMParser).parseFromString(this.responseText,e):null},e.prototype.propagateCallbacks=function(e){e.onabort=this.abort,e.onerror=this.onerror,e.ontimeout=this.ontimeout,e.onload=this.onload,e.onloadstart=this.onloadstart,e.onloadend=this.onloadend,e.onprogress=this.onprogress,e.onreadystatechange=this.onreadystatechange},e.prototype.propagateListeners=function(e){i("propagating request listeners (%d) to the original request",this._events.length,this._events),this._events.forEach((function(t){var r=t.name,n=t.listener;e.addEventListener(r,n)}))},e.prototype.propagateHeaders=function(e,t){i("propagating request headers to the original request",t),Object.entries(t.raw()).forEach((function(t){var r=Fi(t,2),n=r[0],o=r[1];i('setting "%s" (%s) header on the original request',n,o),e.setRequestHeader(n,o)}))},e}()).UNSENT=0,t.OPENED=1,t.HEADERS_RECEIVED=2,t.LOADING=3,t.DONE=4,t},Object.defineProperty(Cn,"__esModule",{value:!0});var Xi=Cn.interceptXMLHttpRequest=void 0,Yi=Sn,Wi=cn.exports("XHR"),zi="undefined"==typeof window?void 0:window.XMLHttpRequest;function Ji(e){const t={id:e.id,url:e.url,method:e.method,body:ot(e.body,e.headers),credentials:e.credentials||"same-origin",headers:e.headers,cookies:{},redirect:"manual",referrer:"",keepalive:!1,cache:"default",mode:"cors",referrerPolicy:"no-referrer",integrity:"",destination:"document",bodyUsed:!1};return rt(t),t}function Qi(e){return function(t){return Se(this,void 0,void 0,(function*(){e.fallbackInterceptor=function(e,t){const r=Br.createInterceptor({modules:[wn,Xi],resolver(r){return Se(this,void 0,void 0,(function*(){return Fr(Ji(r),e.requestHandlers,t,e.emitter,{transformResponse:e=>({status:e.status,statusText:e.statusText,headers:e.headers.all(),body:e.body}),onMockedResponseSent(e,{handler:r,publicRequest:n,parsedRequest:o}){t.quiet||r.log(n,e,r,o)}})}))}});return r.apply(),r}(e,t),Ke({message:"Mocking enabled (fallback mode).",quiet:t.quiet})}))}}Xi=Cn.interceptXMLHttpRequest=function(e,t){if(zi){Wi('patching "XMLHttpRequest" module...');var r=Yi.createXMLHttpRequestOverride({pureXMLHttpRequest:zi,observer:e,resolver:t});window.XMLHttpRequest=r}return function(){zi&&(Wi("restoring modules..."),window.XMLHttpRequest=zi)}};let Zi=[];function es(e){return(t,r)=>new kr(e,t,r)}const ts={all:es(/.+/),head:es(e.RESTMethods.HEAD),get:es(e.RESTMethods.GET),post:es(e.RESTMethods.POST),put:es(e.RESTMethods.PUT),delete:es(e.RESTMethods.DELETE),patch:es(e.RESTMethods.PATCH),options:es(e.RESTMethods.OPTIONS)};function rs(e,t){return(r,n)=>new Pr(e,r,t,n)}function ns(e){return t=>new Pr("all",new RegExp(".*"),e,t)}const os={operation:ns("*"),query:rs(bt.QUERY,"*"),mutation:rs(bt.MUTATION,"*")};const is=Object.assign(Object.assign({},os),{link:function(e){return{operation:ns(e),query:rs(bt.QUERY,e),mutation:rs(bt.MUTATION,e)}}});return e.GraphQLHandler=Pr,e.RequestHandler=Ir,e.RestHandler=kr,e.cleanUrl=Er,e.compose=Nr,e.context=se,e.createResponseComposition=_r,e.defaultContext=Sr,e.defaultResponse=Tr,e.graphql=is,e.graphqlContext=Lr,e.handleRequest=Fr,e.matchRequestUrl=wr,e.parseIsomorphicRequest=Ji,e.response=Or,e.rest=ts,e.restContext=Rr,e.setupWorker=function(...e){if(e.forEach((e=>{if(Array.isArray(e))throw new Error(Ve.formatMessage('Failed to call "setupWorker" given an Array of request handlers (setupWorker([a, b])), expected to receive each handler individually: setupWorker(a, b).'))})),W.exports.isNodeProcess())throw new Error(Ve.formatMessage("Failed to execute `setupWorker` in a non-browser environment. Consider using `setupServer` for Node.js environment instead."));const t=new ae.StrictEventEmitter,r=new ae.StrictEventEmitter;!function(e,t){const r=e.emit;r._isPiped||(e.emit=function(e,...n){return t.emit(e,...n),r.call(this,e,...n)},e.emit._isPiped=!0)}(t,r);const n={startOptions:void 0,worker:null,registration:null,requestHandlers:[...e],emitter:t,workerChannel:{on(e,t){n.events.addListener(navigator.serviceWorker,"message",(r=>{if(r.source!==n.worker)return;const o=B(r.data);o&&o.type===e&&t(r,o)}))},send(e){var t;null===(t=n.worker)||void 0===t||t.postMessage(e)}},events:{addListener:(e,t,r)=>(e.addEventListener(t,r),Zi.push({eventType:t,target:e,callback:r}),()=>{e.removeEventListener(t,r)}),removeAllListeners(){for(const{target:e,eventType:t,callback:r}of Zi)e.removeEventListener(t,r);Zi=[]},once(e){const t=[];return new Promise(((r,o)=>{t.push(n.events.addListener(navigator.serviceWorker,"message",(t=>{try{const n=JSON.parse(t.data);n.type===e&&r(n)}catch(e){o(e)}})),n.events.addListener(navigator.serviceWorker,"messageerror",o))})).finally((()=>{t.forEach((e=>e()))}))}},useFallbackMode:!("serviceWorker"in navigator)||"file:"===location.protocol},o=n.useFallbackMode?Qi(n):Ur(n),i=n.useFallbackMode?function(e){return function(){var t,r;null===(t=e.fallbackInterceptor)||void 0===t||t.restore(),qr({quiet:null===(r=e.startOptions)||void 0===r?void 0:r.quiet})}}(n):(e=>function(){var t;e.workerChannel.send("MOCK_DEACTIVATE"),window.clearInterval(e.keepAliveInterval),qr({quiet:null===(t=e.startOptions)||void 0===t?void 0:t.quiet})})(n);return{start:$r(o,n),stop(){n.events.removeAllListeners(),n.emitter.removeAllListeners(),r.removeAllListeners(),i()},use(...e){!function(e,...t){e.unshift(...t)}(n.requestHandlers,...e)},restoreHandlers(){n.requestHandlers.forEach((e=>{e.markAsSkipped(!1)}))},resetHandlers(...t){n.requestHandlers=function(e,...t){return t.length>0?[...t]:[...e]}(e,...t)},printHandlers(){n.requestHandlers.forEach((e=>{const{header:t,callFrame:r}=e.info,n=e.info.hasOwnProperty("operationType")?"[graphql]":"[rest]";console.groupCollapsed(`${n} ${t}`),r&&console.log(`Declaration: ${r}`),console.log("Handler:",e),e instanceof kr&&console.log("Match:",`https://mswjs.io/repl?path=${e.info.path}`),console.groupEnd()}))},events:{on:(...e)=>r.on(...e),removeListener:(...e)=>r.removeListener(...e),removeAllListeners:(...e)=>r.removeAllListeners(...e)}}},e}({});
22
+ function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(t,["operations","map"]),i=B(r)||{};if(!i.query)return null;const s=B(n||"")||{},a=i.variables?function(e,t,r){const n={variables:e};for(const[e,o]of Object.entries(t)){if(!(e in r))throw new Error(`Given files do not have a key '${e}' .`);for(const t of o){const[o,...i]=t.split(".").reverse(),s=i.reverse();let a=n;for(const e of s){if(!(e in a))throw new Error(`Property '${s}' is not in operations.`);a=a[e]}a[o]=r[e]}}return n.variables}(i.variables,s,o):{};return{query:i.query,variables:a}}default:return null}}function hr(e){const t=pr(e);if(!t||!t.query)return;const{query:r,variables:n}=t,o=dr(r);if(o instanceof Error){const t=ur(e);throw new Error(Ve.formatMessage('Failed to intercept a GraphQL request to "%s %s": cannot parse query. See the error message from the parser below.\n\n%s',e.method,t,o.message))}return{operationType:o.operationType,operationName:o.operationName,variables:n}}var fr;function mr(e){return e<300?fr.Success:e<400?fr.Warning:fr.Danger}function vr(){const e=new Date;return[e.getHours(),e.getMinutes(),e.getSeconds()].map(String).map((e=>e.slice(0,2))).map((e=>e.padStart(2,"0"))).join(":")}function yr(e){return Object.assign(Object.assign({},e),{headers:e.headers.all()})}function gr(e){const t=o.objectToHeaders(e.headers);return Object.assign(Object.assign({},e),{body:ht(e.body,t)})}function Er(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var o=1,i="";if("?"===e[a=r+1])throw new TypeError('Pattern cannot start with "?" at '+a);for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0==--o){a++;break}}else if("("===e[a]&&(o++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at "+a);i+=e[a++]}else i+=e[a++]+e[a++];if(o)throw new TypeError("Unbalanced pattern at "+r);if(!i)throw new TypeError("Missing pattern at "+r);t.push({type:"PATTERN",index:r,value:i}),r=a}else{for(var s="",a=r+1;a<e.length;){var c=e.charCodeAt(a);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;s+=e[a++]}if(!s)throw new TypeError("Missing parameter name at "+r);t.push({type:"NAME",index:r,value:s}),r=a}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,o=void 0===n?"./":n,i="[^"+wr(t.delimiter||"/#?")+"]+?",s=[],a=0,c=0,u="",l=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},d=function(e){var t=l(e);if(void 0!==t)return t;var n=r[c],o=n.type,i=n.index;throw new TypeError("Unexpected "+o+" at "+i+", expected "+e)},p=function(){for(var e,t="";e=l("CHAR")||l("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var h=l("CHAR"),f=l("NAME"),m=l("PATTERN");if(f||m){var v=h||"";-1===o.indexOf(v)&&(u+=v,v=""),u&&(s.push(u),u=""),s.push({name:f||a++,prefix:v,suffix:"",pattern:m||i,modifier:l("MODIFIER")||""})}else{var y=h||l("ESCAPED_CHAR");if(y)u+=y;else if(u&&(s.push(u),u=""),l("OPEN")){v=p();var g=l("NAME")||"",E=l("PATTERN")||"",b=p();d("CLOSE"),s.push({name:g||(E?a++:""),pattern:g&&!E?i:E,prefix:v,suffix:b,modifier:l("MODIFIER")||""})}else d("END")}}return s}function br(e,t){var r=[];return function(e,t,r){void 0===r&&(r={});var n=r.decode,o=void 0===n?function(e){return e}:n;return function(r){var n=e.exec(r);if(!n)return!1;for(var i=n[0],s=n.index,a=Object.create(null),c=function(e){if(void 0===n[e])return"continue";var r=t[e-1];"*"===r.modifier||"+"===r.modifier?a[r.name]=n[e].split(r.prefix+r.suffix).map((function(e){return o(e,r)})):a[r.name]=o(n[e],r)},u=1;u<n.length;u++)c(u);return{path:i,index:s,params:a}}}(xr(e,r,t),r,t)}function wr(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Nr(e){return e&&e.sensitive?"":"i"}function Tr(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,o=void 0!==n&&n,i=r.start,s=void 0===i||i,a=r.end,c=void 0===a||a,u=r.encode,l=void 0===u?function(e){return e}:u,d="["+wr(r.endsWith||"")+"]|$",p="["+wr(r.delimiter||"/#?")+"]",h=s?"^":"",f=0,m=e;f<m.length;f++){var v=m[f];if("string"==typeof v)h+=wr(l(v));else{var y=wr(l(v.prefix)),g=wr(l(v.suffix));if(v.pattern)if(t&&t.push(v),y||g)if("+"===v.modifier||"*"===v.modifier){var E="*"===v.modifier?"?":"";h+="(?:"+y+"((?:"+v.pattern+")(?:"+g+y+"(?:"+v.pattern+"))*)"+g+")"+E}else h+="(?:"+y+"("+v.pattern+")"+g+")"+v.modifier;else h+="("+v.pattern+")"+v.modifier;else h+="(?:"+y+g+")"+v.modifier}}if(c)o||(h+=p+"?"),h+=r.endsWith?"(?="+d+")":"$";else{var b=e[e.length-1],w="string"==typeof b?p.indexOf(b[b.length-1])>-1:void 0===b;o||(h+="(?:"+p+"(?="+d+"))?"),w||(h+="(?="+p+"|"+d+")")}return new RegExp(h,Nr(r))}(Er(e,r),t,r)}function xr(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,o=r.exec(e.source);o;)t.push({name:o[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),o=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return xr(e,t,r).source}));return new RegExp("(?:"+n.join("|")+")",Nr(r))}(e,t,r):Tr(e,t,r)}!function(e){e.Success="#69AB32",e.Warning="#F0BB4B",e.Danger="#E95F5D"}(fr||(fr={}));var _r={};Object.defineProperty(_r,"__esModule",{value:!0});var Or=_r.getCleanUrl=void 0;Or=_r.getCleanUrl=function(e,t){return void 0===t&&(t=!0),[t&&e.origin,e.pathname].filter(Boolean).join("")};const Cr=/[\?|#].*$/g;function Sr(e){return e.replace(Cr,"")}function Ir(e,t){if(e instanceof RegExp)return e;return Sr(function(e,t){if(/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e))return e;if(e.startsWith("*"))return e;const r=t||"undefined"!=typeof document&&document.baseURI;return r?decodeURI(new URL(encodeURI(e),r).href):e}(e,t))}function Ar(e,t,r){const n=Ir(t,r),o="string"==typeof n?function(e){return e.replace(/([:a-zA-Z_-]*)(\*{1,2})+/g,((e,t,r)=>{const n="(.*)";return t?t.startsWith(":")?`${t}${r}`:`${t}(.*)`:n})).replace(/([^\/])(:)(?=\d+)/,"$1\\$2").replace(/^([^\/]+)(:)(?=\/\/)/,"$1\\$2")}(n):n,i=Or(e),s=br(o,{decode:decodeURIComponent})(i);return{matches:!1!==s,params:s&&s.params||{}}}var Rr;e.RESTMethods=void 0,(Rr=e.RESTMethods||(e.RESTMethods={})).HEAD="HEAD",Rr.GET="GET",Rr.POST="POST",Rr.PUT="PUT",Rr.PATCH="PATCH",Rr.OPTIONS="OPTIONS",Rr.DELETE="DELETE";const kr=Object.assign(Object.assign({},et),{cookie:H,body:$,text:ne,json:K,xml:oe});class Dr extends tt{constructor(e,t,r){super({info:{header:`${e} ${t}`,path:t,method:e},ctx:kr,resolver:r}),this.checkRedundantQueryParameters()}checkRedundantQueryParameters(){const{method:e,path:t}=this.info;if(t instanceof RegExp)return;if(Sr(t)===t)return;(function(e){return new URL(`/${e}`,"http://localhost").searchParams})(t).forEach(((e,t)=>{})),Ve.warn(`Found a redundant usage of query parameters in the request handler URL for "${e} ${t}". Please match against a path instead and access query parameters in the response resolver function using "req.url.searchParams".`)}parse(e,t){return Ar(e.url,this.info.path,null==t?void 0:t.baseUrl)}getPublicRequest(e,t){return Object.assign(Object.assign({},e),{params:t.params||{}})}predicate(e,t){return(this.info.method instanceof RegExp?this.info.method.test(e.method):ft(this.info.method,e.method))&&t.matches}log(e,t){const r=ur(e),n=yr(e),o=gr(t),i=mr(t.status);console.groupCollapsed(Ve.formatMessage("%s %s %s (%c%s%c)"),vr(),e.method,r,`color:${i}`,`${t.status} ${t.statusText}`,"color:inherit"),console.log("Request",n),console.log("Handler:",{mask:this.info.path,resolver:this.resolver}),console.log("Response",o),console.groupEnd()}}function Lr(e,t){try{return e()}catch(e){null==t||t(e)}}const Pr=Object.assign(Object.assign({},et),{data:X,extensions:W,errors:Z,cookie:H});class Mr extends tt{constructor(e,t,r,n){let o=t;if(null!=(i=t)&&"object"==typeof i&&"kind"in i&&"definitions"in i){const r=lr(t);if(r.operationType!==e)throw new Error(`Failed to create a GraphQL handler: provided a DocumentNode with a mismatched operation type (expected "${e}", but got "${r.operationType}").`);if(!r.operationName)throw new Error("Failed to create a GraphQL handler: provided a DocumentNode with no operation name.");o=r.operationName}var i;super({info:{header:"all"===e?`${e} (origin: ${r.toString()})`:`${e} ${o} (origin: ${r.toString()})`,operationType:e,operationName:o},ctx:Pr,resolver:n}),this.endpoint=r}parse(e){return Lr((()=>hr(e)),(e=>console.error(e.message)))}getPublicRequest(e,t){return Object.assign(Object.assign({},e),{variables:(null==t?void 0:t.variables)||{}})}predicate(e,t){if(!t)return!1;if(!t.operationName&&"all"!==this.info.operationType){const t=ur(e);return Ve.warn(`Failed to intercept a GraphQL request at "${e.method} ${t}": anonymous GraphQL operations are not supported.\n\nConsider naming this operation or using "graphql.operation" request handler to intercept GraphQL requests regardless of their operation name/type. Read more: https://mswjs.io/docs/api/graphql/operation `),!1}const r=Ar(e.url,this.endpoint),n="all"===this.info.operationType||t.operationType===this.info.operationType,o=this.info.operationName instanceof RegExp?this.info.operationName.test(t.operationName||""):t.operationName===this.info.operationName;return r.matches&&n&&o}log(e,t,r,n){const o=yr(e),i=gr(t),s=mr(t.status),a=(null==n?void 0:n.operationName)?`${null==n?void 0:n.operationType} ${null==n?void 0:n.operationName}`:`anonymous ${null==n?void 0:n.operationType}`;console.groupCollapsed(Ve.formatMessage("%s %s (%c%s%c)"),vr(),`${a}`,`color:${s}`,`${t.status} ${t.statusText}`,"color:inherit"),console.log("Request:",o),console.log("Handler:",this),console.log("Response:",i),console.groupEnd()}}function Fr(e,t,r="warn"){const n=Lr((()=>hr(e)));function o(){const r=function(e){return e.reduce(((e,t)=>(t instanceof Dr&&e.rest.push(t),t instanceof Mr&&e.graphql.push(t),e)),{rest:[],graphql:[]})}(t),o=n?r.graphql:r.rest,i=function(e,t,r){return t.reduce(((t,n)=>{const o=r(e,n);return t.concat([[o,n]])}),[]).sort((([e],[t])=>e-t)).filter((([e])=>e<=3)).slice(0,4).map((([,e])=>e))}(e,o,n?(s=n,(e,t)=>{if(void 0===s.operationName)return 1/0;const{operationType:r,operationName:n}=t.info;if("string"!=typeof n)return 1/0;const o=s.operationType===r?.5:0;return vt(s.operationName,n)-o}):(e,t)=>{const{path:r,method:n}=t.info;if(r instanceof RegExp||n instanceof RegExp)return 1/0;const o=ft(e.method,n)?.5:0,i=ur(e);return vt(i,r)-o});var s;return i.length>0?function(e){return e.length>1?`Did you mean to request one of the following resources instead?\n\n${e.map((e=>` • ${e.info.header}`)).join("\n")}`:`Did you mean to request "${e[0].info.header}" instead?`}(i):""}function i(t){const r=function(){const t=ur(e);return["captured a request without a matching request handler:"," • "+(n?`${n.operationType} ${n.operationName} (${e.method} ${t})`:`${e.method} ${t}`),o(),"If you still wish to intercept this unhandled request, please create a request handler for it.\nRead more: https://mswjs.io/docs/getting-started/mocks"].filter(Boolean).join("\n\n")}();switch(t){case"error":throw Ve.error("Error: %s",r),new Error(Ve.formatMessage('Cannot bypass a request when using the "error" strategy for the "onUnhandledRequest" option.'));case"warn":Ve.warn("Warning: %s",r);break;case"bypass":break;default:throw new Error(Ve.formatMessage('Failed to react to an unhandled request: unknown strategy "%s". Please provide one of the supported strategies ("bypass", "warn", "error") or a custom callback function as the value of the "onUnhandledRequest" option.',t))}}"function"!=typeof r?i(r):r(e,{warning:i.bind(null,"warn"),error:i.bind(null,"error")})}function jr(e,t,r,n,o){var i,s,a,c;return Se(this,void 0,void 0,(function*(){if(n.emit("request:start",e),"true"===e.headers.get("x-msw-bypass"))return n.emit("request:end",e),void(null===(i=null==o?void 0:o.onPassthroughResponse)||void 0===i||i.call(o,e));const[u,l]=yield ke((()=>((e,t,r)=>Se(void 0,void 0,void 0,(function*(){const n=t.filter((t=>t.test(e,r)));if(0===n.length)return{handler:void 0,response:void 0};const o=yield n.reduce(((t,n)=>Se(void 0,void 0,void 0,(function*(){const o=yield t;if(null==o?void 0:o.response)return t;const i=yield n.run(e,r);return null===i||i.handler.shouldSkip?null:i.response?(i.response.once&&n.markAsSkipped(!0),i):{request:i.request,handler:i.handler,response:void 0,parsedResult:i.parsedResult}}))),Promise.resolve(null));return o?{handler:o.handler,publicRequest:o.request,parsedRequest:o.parsedResult,response:o.response}:{handler:void 0,response:void 0}})))(e,t,null==o?void 0:o.resolutionContext)));if(u)throw n.emit("unhandledException",u,e),u;const{handler:d,response:p}=l;return d?p?p.passthrough?(n.emit("request:end",e),void(null===(c=null==o?void 0:o.onPassthroughResponse)||void 0===c||c.call(o,e))):(function(e,t){nt.store.add(Object.assign(Object.assign({},e),{url:e.url.toString()}),t),nt.store.persist()}(e,p),n.emit("request:match",e),new Promise((t=>{var r,i,s;const a=l,c=(null===(r=null==o?void 0:o.transformResponse)||void 0===r?void 0:r.call(o,p))||p;null===(i=null==o?void 0:o.onMockedResponse)||void 0===i||i.call(o,c,a),setTimeout((()=>{var r;null===(r=null==o?void 0:o.onMockedResponseSent)||void 0===r||r.call(o,c,a),n.emit("request:end",e),t(c)}),null!==(s=p.delay)&&void 0!==s?s:0)}))):(Ve.warn("Expected response resolver to return a mocked response Object, but got %s. The original response is going to be used instead.\n\n • %s\n %s",p,d.info.header,d.info.callFrame),n.emit("request:end",e),void(null===(a=null==o?void 0:o.onPassthroughResponse)||void 0===a||a.call(o,e))):(Fr(e,t,r.onUnhandledRequest),n.emit("request:unhandled",e),n.emit("request:end",e),void(null===(s=null==o?void 0:o.onPassthroughResponse)||void 0===s||s.call(o,e)))}))}const Ur=(e,t)=>(r,n)=>Se(void 0,void 0,void 0,(function*(){const i=(e=>{const t=e.ports[0];return{send(e){t&&t.postMessage(e)}}})(r);try{const r=function(e){const t={id:e.id,cache:e.cache,credentials:e.credentials,method:e.method,url:new URL(e.url),referrer:e.referrer,referrerPolicy:e.referrerPolicy,redirect:e.redirect,mode:e.mode,params:{},cookies:{},integrity:e.integrity,keepalive:e.keepalive,destination:e.destination,body:mt(e),bodyUsed:e.bodyUsed,headers:new o.Headers(e.headers),passthrough:rt};return dt(t),t.body=ht(t.body,t.headers),t}(n.payload);yield jr(r,e.requestHandlers,t,e.emitter,{transformResponse:e=>Object.assign(Object.assign({},e),{headers:e.headers.all()}),onPassthroughResponse:()=>i.send({type:"MOCK_NOT_FOUND"}),onMockedResponse(e){i.send({type:"MOCK_SUCCESS",payload:e})},onMockedResponseSent(e,{handler:r,publicRequest:n,parsedRequest:o}){t.quiet||r.log(n,e,r,o)}})}catch(e){if(e instanceof Xe)return i.send({type:"NETWORK_ERROR",payload:{name:e.name,message:e.message}});e instanceof Error&&i.send({type:"INTERNAL_ERROR",payload:{status:500,body:JSON.stringify({errorType:e.constructor.name,message:e.message,location:e.stack})}})}}));const qr=e=>function(t,r){const n=(()=>Se(this,void 0,void 0,(function*(){e.events.removeAllListeners(),e.workerChannel.on("REQUEST",Ur(e,t)),e.workerChannel.on("RESPONSE",function(e){return(t,r)=>{var n;const{payload:o}=r;if(null===(n=o.type)||void 0===n?void 0:n.includes("opaque"))return;const i=new Response(o.body||null,o);"msw"===i.headers.get("x-powered-by")?e.emitter.emit("response:mocked",i,o.requestId):e.emitter.emit("response:bypass",i,o.requestId)}}(e));const n=yield Ge(t.serviceWorker.url,t.serviceWorker.options,t.findWorker),[o,i]=n;if(!o){const e=(null==r?void 0:r.findWorker)?Ve.formatMessage('Failed to locate the Service Worker registration using a custom "findWorker" predicate.\n\nPlease ensure that the custom predicate properly locates the Service Worker registration at "%s".\nMore details: https://mswjs.io/docs/api/setup-worker/start#findworker\n',t.serviceWorker.url):Ve.formatMessage('Failed to locate the Service Worker registration.\n\nThis most likely means that the worker script URL "%s" cannot resolve against the actual public hostname (%s). This may happen if your application runs behind a proxy, or has a dynamic hostname.\n\nPlease consider using a custom "serviceWorker.url" option to point to the actual worker script location, or a custom "findWorker" option to resolve the Service Worker registration manually. More details: https://mswjs.io/docs/api/setup-worker/start',t.serviceWorker.url,location.host);throw new Error(e)}e.worker=o,e.registration=i,e.events.addListener(window,"beforeunload",(()=>{"redundant"!==o.state&&e.workerChannel.send("CLIENT_CLOSED"),window.clearInterval(e.keepAliveInterval)}));const[s]=yield ke((()=>function(e,t){return Se(this,void 0,void 0,(function*(){e.workerChannel.send("INTEGRITY_CHECK_REQUEST");const{payload:r}=yield e.events.once("INTEGRITY_CHECK_RESPONSE");if("02f4ad4a2797f85668baf196e553d929"!==r)throw new Error(`Currently active Service Worker (${r}) is behind the latest published one (02f4ad4a2797f85668baf196e553d929).`);return t}))}(e,o)));return s&&Ve.error(`Detected outdated Service Worker: ${s.message}\n\nThe mocking is still enabled, but it's highly recommended that you update your Service Worker by running:\n\n$ npx msw init <PUBLIC_DIR>\n\nThis is necessary to ensure that the Service Worker is in sync with the library to guarantee its stability.\nIf this message still persists after updating, please report an issue: https://github.com/open-draft/msw/issues `),e.keepAliveInterval=window.setInterval((()=>e.workerChannel.send("KEEPALIVE_REQUEST")),5e3),function(e,t){(null==t?void 0:t.quiet)||location.href.startsWith(e.scope)||Ve.warn(`Cannot intercept requests on this page because it's outside of the worker's scope ("${e.scope}"). If you wish to mock API requests on this page, you must resolve this scope issue.\n\n- (Recommended) Register the worker at the root level ("/") of your application.\n- Set the "Service-Worker-Allowed" response header to allow out-of-scope workers.`)}(i,e.startOptions),i})))().then((r=>Se(this,void 0,void 0,(function*(){const n=r.installing||r.waiting;return n&&(yield new Promise((e=>{n.addEventListener("statechange",(()=>{if("activated"===n.state)return e()}))}))),yield function(e,t){var r,n;return Se(this,void 0,void 0,(function*(){e.workerChannel.send("MOCK_ACTIVATE"),yield e.events.once("MOCKING_ENABLED"),e.isMockingEnabled?Ve.warn('Found a redundant "worker.start()" call. Note that starting the worker while mocking is already enabled will have no effect. Consider removing this "worker.start()" call.'):(e.isMockingEnabled=!0,Ke({quiet:t.quiet,workerScope:null===(r=e.registration)||void 0===r?void 0:r.scope,workerUrl:null===(n=e.worker)||void 0===n?void 0:n.scriptURL}))}))}(e,t).catch((e=>{throw new Error(`Failed to enable mocking: ${null==e?void 0:e.message}`)})),r}))));return t.waitUntilReady&&function(e){const t=window.XMLHttpRequest.prototype.send;window.XMLHttpRequest.prototype.send=function(...r){ke((()=>e)).then((()=>{window.XMLHttpRequest.prototype.send=t,this.send(...r)}))};const r=window.fetch;window.fetch=(...t)=>Se(this,void 0,void 0,(function*(){return yield ke((()=>e)),window.fetch=r,window.fetch(...t)}))}(n),n};function Hr(e={}){e.quiet||console.log(`%c${Ve.formatMessage("Mocking disabled.")}`,"color:orangered;font-weight:bold;")}const $r={serviceWorker:{url:"/mockServiceWorker.js",options:null},quiet:!1,waitUntilReady:!0,onUnhandledRequest:"warn",findWorker:(e,t)=>e===t};function Br(e,t){return r=>(t.startOptions=function(e){return G($r,e||{})}(r),e(t.startOptions,r||{}))}var Vr={},Gr={};Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.createInterceptor=void 0;var Kr=ae;Gr.createInterceptor=function(e){var t=new Kr.StrictEventEmitter,r=[];return{apply:function(){r=e.modules.map((function(r){return r(t,e.resolver)}))},on:function(e,r){t.addListener(e,r)},restore:function(){if(t.removeAllListeners(),0===r.length)throw new Error('Failed to restore patched modules: no patches found. Did you forget to run ".apply()"?');r.forEach((function(e){return e()}))}}};var Xr={},Wr={};Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.toIsoResponse=void 0;var Yr=o;Wr.toIsoResponse=function(e){return{status:e.status||200,statusText:e.statusText||"OK",headers:Yr.objectToHeaders(e.headers||{}),body:e.body}};var zr=n&&n.__assign||function(){return(zr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Jr=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},Qr=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},Zr=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.createRemoteResolver=Xr.createRemoteInterceptor=void 0;var en=o,tn=Le,rn=ae,nn=Gr,on=Wr;function sn(e,t){switch(e){case"url":return new URL(t);case"headers":return new en.Headers(t);default:return t}}Xr.createRemoteInterceptor=function(e){if(tn.invariant(process.connected,"Failed to create a remote interceptor: the current process (%s) does not have a parent. Please make sure you're spawning this process as a child process in order to use remote request interception.",process.pid),void 0===process.send)throw new Error("Failed to create a remote interceptor: the current process ("+process.pid+") does not have the IPC enabled. Please make sure you're spawning this process with the \"ipc\" stdio value set:\n\nspawn('node', ['module.js'], { stdio: ['ipc'] })");var t,r=nn.createInterceptor(zr(zr({},e),{resolver:function(e){var r,n=JSON.stringify(e);return null===(r=process.send)||void 0===r||r.call(process,"request:"+n),new Promise((function(r){t=function(t){if("string"==typeof t&&t.startsWith("response:"+e.id)){var n=Zr(t.match(/^response:.+?:(.+)$/)||[],2)[1];if(!n)return r();var o=JSON.parse(n);return r(o)}},process.addListener("message",t)}))}}));return zr(zr({},r),{restore:function(){r.restore(),process.removeListener("message",t)}})},Xr.createRemoteResolver=function(e){var t=this,r=new rn.StrictEventEmitter,n=function(n){return Jr(t,void 0,void 0,(function(){var t,o,i,s,a;return Qr(this,(function(c){switch(c.label){case 0:return"string"!=typeof n?[2]:n.startsWith("request:")?(t=Zr(n.match(/^request:(.+)$/)||[],2),(o=t[1])?(i=JSON.parse(o,sn),r.emit("request",i),[4,e.resolver(i,void 0)]):[2]):[3,2];case 1:s=c.sent(),a=JSON.stringify(s),e.process.send("response:"+i.id+":"+a,(function(e){e||s&&r.emit("response",i,on.toIsoResponse(s))})),c.label=2;case 2:return[2]}}))}))},o=function(){e.process.removeListener("message",n)};return e.process.addListener("message",n),e.process.addListener("disconnect",o),e.process.addListener("error",o),e.process.addListener("exit",o),{on:function(e,t){r.addListener(e,t)}}},function(e){var t=n&&n.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=n&&n.__exportStar||function(e,r){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(r,n)||t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.getCleanUrl=void 0,r(Gr,e),r(Xr,e);var o=_r;Object.defineProperty(e,"getCleanUrl",{enumerable:!0,get:function(){return o.getCleanUrl}})}(Vr);var an={},cn={};Object.defineProperty(cn,"__esModule",{value:!0}),cn.uuidv4=void 0,cn.uuidv4=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))};var un={exports:{}},ln=1e3,dn=60*ln,pn=60*dn,hn=24*pn,fn=7*hn,mn=365.25*hn,vn=function(e,t){t=t||{};var r=typeof e;if("string"===r&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*mn;case"weeks":case"week":case"w":return r*fn;case"days":case"day":case"d":return r*hn;case"hours":case"hour":case"hrs":case"hr":case"h":return r*pn;case"minutes":case"minute":case"mins":case"min":case"m":return r*dn;case"seconds":case"second":case"secs":case"sec":case"s":return r*ln;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===r&&isFinite(e))return t.long?function(e){var t=Math.abs(e);if(t>=hn)return yn(e,t,hn,"day");if(t>=pn)return yn(e,t,pn,"hour");if(t>=dn)return yn(e,t,dn,"minute");if(t>=ln)return yn(e,t,ln,"second");return e+" ms"}(e):function(e){var t=Math.abs(e);if(t>=hn)return Math.round(e/hn)+"d";if(t>=pn)return Math.round(e/pn)+"h";if(t>=dn)return Math.round(e/dn)+"m";if(t>=ln)return Math.round(e/ln)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function yn(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}var gn=function(e){function t(e){let n,o,i,s=null;function a(...e){if(!a.enabled)return;const r=a,o=Number(new Date),i=o-(n||o);r.diff=i,r.prev=n,r.curr=o,n=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,o)=>{if("%%"===n)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];n=i.call(r,t),e.splice(s,1),s--}return n})),t.formatArgs.call(r,e);(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function n(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(n),...t.skips.map(n).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=vn,t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t};!function(e,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=gn(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(un,un.exports);var En=n&&n.__assign||function(){return(En=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},bn=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},wn=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}};Object.defineProperty(an,"__esModule",{value:!0});var Nn=an.interceptFetch=void 0,Tn=o,xn=Wr,_n=cn,On=un.exports("fetch");function Cn(e){return bn(this,void 0,void 0,(function(){var t;return wn(this,(function(r){switch(r.label){case 0:return t={status:e.status,statusText:e.statusText,headers:Tn.objectToHeaders(Tn.headersToObject(e.headers))},[4,e.text()];case 1:return[2,(t.body=r.sent(),t)]}}))}))}Nn=an.interceptFetch=function(e,t){var r=window.fetch;return On('replacing "window.fetch"...'),window.fetch=function(n,o){return bn(void 0,void 0,void 0,(function(){var i,s,a,c,u,l,d;return wn(this,(function(p){switch(p.label){case 0:return i=new Request(n,o),s="string"==typeof n?n:n.url,a=i.method,On("[%s] %s",a,s),d={id:_n.uuidv4(),url:new URL(s,location.origin),method:a,headers:new Tn.Headers(i.headers),credentials:i.credentials},[4,i.clone().text()];case 1:return d.body=p.sent(),On("isomorphic request",c=d),e.emit("request",c),On("awaiting for the mocked response..."),[4,t(c,i)];case 2:return u=p.sent(),On("mocked response",u),u?(l=xn.toIsoResponse(u),On("derived isomorphic response",l),e.emit("response",c,l),[2,new Response(u.body,En(En({},l),{headers:Tn.flattenHeadersObject(u.headers||{})}))]):(On("no mocked response found, bypassing..."),[2,r(i).then((function(t){return bn(void 0,void 0,void 0,(function(){var r,n,o,i;return wn(this,(function(s){switch(s.label){case 0:return r=t.clone(),On("original fetch performed",r),o=(n=e).emit,i=["response",c],[4,Cn(r)];case 1:return o.apply(n,i.concat([s.sent()])),[2,t]}}))}))}))])}}))}))},function(){On("restoring modules..."),window.fetch=r}};var Sn={},In={},An={},Rn={},kn={};function Dn(e,t){return void 0===t&&(t=Object),t&&"function"==typeof t.freeze?t.freeze(e):e}var Ln=Dn({HTML:"text/html",isHTML:function(e){return e===Ln.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Pn=Dn({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(e){return e===Pn.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});kn.freeze=Dn,kn.MIME_TYPE=Ln,kn.NAMESPACE=Pn;var Mn=kn.NAMESPACE;function Fn(e){return""!==e}function jn(e,t){return e.hasOwnProperty(t)||(e[t]=!0),e}function Un(e){if(!e)return[];var t=function(e){return e?e.split(/[\t\n\f\r ]+/).filter(Fn):[]}(e);return Object.keys(t.reduce(jn,{}))}function qn(e,t){for(var r in e)t[r]=e[r]}function Hn(e,t){var r=e.prototype;if(!(r instanceof t)){function n(){}n.prototype=t.prototype,qn(r,n=new n),e.prototype=r=n}r.constructor!=e&&("function"!=typeof e&&console.error("unknown Class:"+e),r.constructor=e)}var $n={},Bn=$n.ELEMENT_NODE=1,Vn=$n.ATTRIBUTE_NODE=2,Gn=$n.TEXT_NODE=3,Kn=$n.CDATA_SECTION_NODE=4,Xn=$n.ENTITY_REFERENCE_NODE=5,Wn=$n.ENTITY_NODE=6,Yn=$n.PROCESSING_INSTRUCTION_NODE=7,zn=$n.COMMENT_NODE=8,Jn=$n.DOCUMENT_NODE=9,Qn=$n.DOCUMENT_TYPE_NODE=10,Zn=$n.DOCUMENT_FRAGMENT_NODE=11,eo=$n.NOTATION_NODE=12,to={},ro={};to.INDEX_SIZE_ERR=(ro[1]="Index size error",1),to.DOMSTRING_SIZE_ERR=(ro[2]="DOMString size error",2);var no=to.HIERARCHY_REQUEST_ERR=(ro[3]="Hierarchy request error",3);to.WRONG_DOCUMENT_ERR=(ro[4]="Wrong document",4),to.INVALID_CHARACTER_ERR=(ro[5]="Invalid character",5),to.NO_DATA_ALLOWED_ERR=(ro[6]="No data allowed",6),to.NO_MODIFICATION_ALLOWED_ERR=(ro[7]="No modification allowed",7);var oo=to.NOT_FOUND_ERR=(ro[8]="Not found",8);to.NOT_SUPPORTED_ERR=(ro[9]="Not supported",9);var io=to.INUSE_ATTRIBUTE_ERR=(ro[10]="Attribute in use",10);function so(e,t){if(t instanceof Error)var r=t;else r=this,Error.call(this,ro[e]),this.message=ro[e],Error.captureStackTrace&&Error.captureStackTrace(this,so);return r.code=e,t&&(this.message=this.message+": "+t),r}function ao(){}function co(e,t){this._node=e,this._refresh=t,uo(this)}function uo(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);Bo(e,"length",r.length),qn(r,e),e._inc=t}}function lo(){}function po(e,t){for(var r=e.length;r--;)if(e[r]===t)return r}function ho(e,t,r,n){if(n?t[po(t,n)]=r:t[t.length++]=r,e){r.ownerElement=e;var o=e.ownerDocument;o&&(n&&bo(o,e,n),function(e,t,r){e&&e._inc++,r.namespaceURI===Mn.XMLNS&&(t._nsMap[r.prefix?r.localName:""]=r.value)}(o,e,r))}}function fo(e,t,r){var n=po(t,r);if(!(n>=0))throw so(oo,new Error(e.tagName+"@"+r));for(var o=t.length-1;n<o;)t[n]=t[++n];if(t.length=o,e){var i=e.ownerDocument;i&&(bo(i,e,r),r.ownerElement=null)}}function mo(){}function vo(){}function yo(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function go(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(go(e,t))return!0}while(e=e.nextSibling)}function Eo(){}function bo(e,t,r,n){e&&e._inc++,r.namespaceURI===Mn.XMLNS&&delete t._nsMap[r.prefix?r.localName:""]}function wo(e,t,r){if(e&&e._inc){e._inc++;var n=t.childNodes;if(r)n[n.length++]=r;else{for(var o=t.firstChild,i=0;o;)n[i++]=o,o=o.nextSibling;n.length=i}}}function No(e,t){var r=t.previousSibling,n=t.nextSibling;return r?r.nextSibling=n:e.firstChild=n,n?n.previousSibling=r:e.lastChild=r,wo(e.ownerDocument,e),t}function To(e,t,r){var n=t.parentNode;if(n&&n.removeChild(t),t.nodeType===Zn){var o=t.firstChild;if(null==o)return t;var i=t.lastChild}else o=i=t;var s=r?r.previousSibling:e.lastChild;o.previousSibling=s,i.nextSibling=r,s?s.nextSibling=o:e.firstChild=o,null==r?e.lastChild=i:r.previousSibling=i;do{o.parentNode=e}while(o!==i&&(o=o.nextSibling));return wo(e.ownerDocument||e,e),t.nodeType==Zn&&(t.firstChild=t.lastChild=null),t}function xo(){this._nsMap={}}function _o(){}function Oo(){}function Co(){}function So(){}function Io(){}function Ao(){}function Ro(){}function ko(){}function Do(){}function Lo(){}function Po(){}function Mo(){}function Fo(e,t){var r=[],n=9==this.nodeType&&this.documentElement||this,o=n.prefix,i=n.namespaceURI;if(i&&null==o&&null==(o=n.lookupPrefix(i)))var s=[{namespace:i,prefix:null}];return qo(this,r,e,t,s),r.join("")}function jo(e,t,r){var n=e.prefix||"",o=e.namespaceURI;if(!o)return!1;if("xml"===n&&o===Mn.XML||o===Mn.XMLNS)return!1;for(var i=r.length;i--;){var s=r[i];if(s.prefix===n)return s.namespace!==o}return!0}function Uo(e,t,r){e.push(" ",t,'="',r.replace(/[<&"]/g,yo),'"')}function qo(e,t,r,n,o){if(o||(o=[]),n){if(!(e=n(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case Bn:var i=e.attributes,s=i.length,a=e.firstChild,c=e.tagName,u=c;if(!(r=Mn.isHTML(e.namespaceURI)||r)&&!e.prefix&&e.namespaceURI){for(var l,d=0;d<i.length;d++)if("xmlns"===i.item(d).name){l=i.item(d).value;break}if(!l)for(var p=o.length-1;p>=0;p--){if(""===(h=o[p]).prefix&&h.namespace===e.namespaceURI){l=h.namespace;break}}if(l!==e.namespaceURI)for(p=o.length-1;p>=0;p--){var h;if((h=o[p]).namespace===e.namespaceURI){h.prefix&&(u=h.prefix+":"+c);break}}}t.push("<",u);for(var f=0;f<s;f++){"xmlns"==(m=i.item(f)).prefix?o.push({prefix:m.localName,namespace:m.value}):"xmlns"==m.nodeName&&o.push({prefix:"",namespace:m.value})}for(f=0;f<s;f++){var m,v,y;if(jo(m=i.item(f),0,o))Uo(t,(v=m.prefix||"")?"xmlns:"+v:"xmlns",y=m.namespaceURI),o.push({prefix:v,namespace:y});qo(m,t,r,n,o)}if(c===u&&jo(e,0,o))Uo(t,(v=e.prefix||"")?"xmlns:"+v:"xmlns",y=e.namespaceURI),o.push({prefix:v,namespace:y});if(a||r&&!/^(?:meta|link|img|br|hr|input)$/i.test(c)){if(t.push(">"),r&&/^script$/i.test(c))for(;a;)a.data?t.push(a.data):qo(a,t,r,n,o.slice()),a=a.nextSibling;else for(;a;)qo(a,t,r,n,o.slice()),a=a.nextSibling;t.push("</",u,">")}else t.push("/>");return;case Jn:case Zn:for(a=e.firstChild;a;)qo(a,t,r,n,o.slice()),a=a.nextSibling;return;case Vn:return Uo(t,e.name,e.value);case Gn:return t.push(e.data.replace(/[<&]/g,yo).replace(/]]>/g,"]]&gt;"));case Kn:return t.push("<![CDATA[",e.data,"]]>");case zn:return t.push("\x3c!--",e.data,"--\x3e");case Qn:var g=e.publicId,E=e.systemId;if(t.push("<!DOCTYPE ",e.name),g)t.push(" PUBLIC ",g),E&&"."!=E&&t.push(" ",E),t.push(">");else if(E&&"."!=E)t.push(" SYSTEM ",E,">");else{var b=e.internalSubset;b&&t.push(" [",b,"]"),t.push(">")}return;case Yn:return t.push("<?",e.target," ",e.data,"?>");case Xn:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function Ho(e,t,r){var n;switch(t.nodeType){case Bn:(n=t.cloneNode(!1)).ownerDocument=e;case Zn:break;case Vn:r=!0}if(n||(n=t.cloneNode(!1)),n.ownerDocument=e,n.parentNode=null,r)for(var o=t.firstChild;o;)n.appendChild(Ho(e,o,r)),o=o.nextSibling;return n}function $o(e,t,r){var n=new t.constructor;for(var o in t){var i=t[o];"object"!=typeof i&&i!=n[o]&&(n[o]=i)}switch(t.childNodes&&(n.childNodes=new ao),n.ownerDocument=e,n.nodeType){case Bn:var s=t.attributes,a=n.attributes=new lo,c=s.length;a._ownerElement=n;for(var u=0;u<c;u++)n.setAttributeNode($o(e,s.item(u),!0));break;case Vn:r=!0}if(r)for(var l=t.firstChild;l;)n.appendChild($o(e,l,r)),l=l.nextSibling;return n}function Bo(e,t,r){e[t]=r}to.INVALID_STATE_ERR=(ro[11]="Invalid state",11),to.SYNTAX_ERR=(ro[12]="Syntax error",12),to.INVALID_MODIFICATION_ERR=(ro[13]="Invalid modification",13),to.NAMESPACE_ERR=(ro[14]="Invalid namespace",14),to.INVALID_ACCESS_ERR=(ro[15]="Invalid access",15),so.prototype=Error.prototype,qn(to,so),ao.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var r=[],n=0;n<this.length;n++)qo(this[n],r,e,t);return r.join("")}},co.prototype.item=function(e){return uo(this),this[e]},Hn(co,ao),lo.prototype={length:0,item:ao.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var r=this[t];if(r.nodeName==e)return r}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new so(io);var r=this.getNamedItem(e.nodeName);return ho(this._ownerElement,this,e,r),r},setNamedItemNS:function(e){var t,r=e.ownerElement;if(r&&r!=this._ownerElement)throw new so(io);return t=this.getNamedItemNS(e.namespaceURI,e.localName),ho(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return fo(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var r=this.getNamedItemNS(e,t);return fo(this._ownerElement,this,r),r},getNamedItemNS:function(e,t){for(var r=this.length;r--;){var n=this[r];if(n.localName==t&&n.namespaceURI==e)return n}return null}},mo.prototype={hasFeature:function(e,t){return!0},createDocument:function(e,t,r){var n=new Eo;if(n.implementation=this,n.childNodes=new ao,n.doctype=r||null,r&&n.appendChild(r),t){var o=n.createElementNS(e,t);n.appendChild(o)}return n},createDocumentType:function(e,t,r){var n=new Ao;return n.name=e,n.nodeName=e,n.publicId=t||"",n.systemId=r||"",n}},vo.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return To(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return No(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return $o(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Gn&&e.nodeType==Gn?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var r=t._nsMap;if(r)for(var n in r)if(r[n]==e)return n;t=t.nodeType==Vn?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var r=t._nsMap;if(r&&e in r)return r[e];t=t.nodeType==Vn?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},qn($n,vo),qn($n,vo.prototype),Eo.prototype={nodeName:"#document",nodeType:Jn,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==Zn){for(var r=e.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,t),r=n}return e}return null==this.documentElement&&e.nodeType==Bn&&(this.documentElement=e),To(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),No(this,e)},importNode:function(e,t){return Ho(this,e,t)},getElementById:function(e){var t=null;return go(this.documentElement,(function(r){if(r.nodeType==Bn&&r.getAttribute("id")==e)return t=r,!0})),t},getElementsByClassName:function(e){var t=Un(e);return new co(this,(function(r){var n=[];return t.length>0&&go(r.documentElement,(function(o){if(o!==r&&o.nodeType===Bn){var i=o.getAttribute("class");if(i){var s=e===i;if(!s){var a=Un(i);s=t.every((c=a,function(e){return c&&-1!==c.indexOf(e)}))}s&&n.push(o)}}var c})),n}))},createElement:function(e){var t=new xo;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.localName=e,t.childNodes=new ao,(t.attributes=new lo)._ownerElement=t,t},createDocumentFragment:function(){var e=new Lo;return e.ownerDocument=this,e.childNodes=new ao,e},createTextNode:function(e){var t=new Co;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new So;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Io;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var r=new Po;return r.ownerDocument=this,r.tagName=r.target=e,r.nodeValue=r.data=t,r},createAttribute:function(e){var t=new _o;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new Do;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var r=new xo,n=t.split(":"),o=r.attributes=new lo;return r.childNodes=new ao,r.ownerDocument=this,r.nodeName=t,r.tagName=t,r.namespaceURI=e,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,o._ownerElement=r,r},createAttributeNS:function(e,t){var r=new _o,n=t.split(":");return r.ownerDocument=this,r.nodeName=t,r.name=t,r.namespaceURI=e,r.specified=!0,2==n.length?(r.prefix=n[0],r.localName=n[1]):r.localName=t,r}},Hn(Eo,vo),xo.prototype={nodeType:Bn,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var r=this.ownerDocument.createAttribute(e);r.value=r.nodeValue=""+t,this.setAttributeNode(r)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===Zn?this.insertBefore(e,null):function(e,t){var r=t.parentNode;if(r){var n=e.lastChild;r.removeChild(t),n=e.lastChild}return n=e.lastChild,t.parentNode=e,t.previousSibling=n,t.nextSibling=null,n?n.nextSibling=t:e.firstChild=t,e.lastChild=t,wo(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);r&&this.removeAttributeNode(r)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var r=this.getAttributeNodeNS(e,t);return r&&r.value||""},setAttributeNS:function(e,t,r){var n=this.ownerDocument.createAttributeNS(e,t);n.value=n.nodeValue=""+r,this.setAttributeNode(n)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new co(this,(function(t){var r=[];return go(t,(function(n){n===t||n.nodeType!=Bn||"*"!==e&&n.tagName!=e||r.push(n)})),r}))},getElementsByTagNameNS:function(e,t){return new co(this,(function(r){var n=[];return go(r,(function(o){o===r||o.nodeType!==Bn||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||n.push(o)})),n}))}},Eo.prototype.getElementsByTagName=xo.prototype.getElementsByTagName,Eo.prototype.getElementsByTagNameNS=xo.prototype.getElementsByTagNameNS,Hn(xo,vo),_o.prototype.nodeType=Vn,Hn(_o,vo),Oo.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ro[no])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,r){r=this.data.substring(0,e)+r+this.data.substring(e+t),this.nodeValue=this.data=r,this.length=r.length}},Hn(Oo,vo),Co.prototype={nodeName:"#text",nodeType:Gn,splitText:function(e){var t=this.data,r=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},Hn(Co,Oo),So.prototype={nodeName:"#comment",nodeType:zn},Hn(So,Oo),Io.prototype={nodeName:"#cdata-section",nodeType:Kn},Hn(Io,Oo),Ao.prototype.nodeType=Qn,Hn(Ao,vo),Ro.prototype.nodeType=eo,Hn(Ro,vo),ko.prototype.nodeType=Wn,Hn(ko,vo),Do.prototype.nodeType=Xn,Hn(Do,vo),Lo.prototype.nodeName="#document-fragment",Lo.prototype.nodeType=Zn,Hn(Lo,vo),Po.prototype.nodeType=Yn,Hn(Po,vo),Mo.prototype.serializeToString=function(e,t,r){return Fo.call(e,t,r)},vo.prototype.toString=Fo;try{if(Object.defineProperty){function Vo(e){switch(e.nodeType){case Bn:case Zn:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(Vo(e)),e=e.nextSibling;return t.join("");default:return e.nodeValue}}Object.defineProperty(co.prototype,"length",{get:function(){return uo(this),this.$$length}}),Object.defineProperty(vo.prototype,"textContent",{get:function(){return Vo(this)},set:function(e){switch(this.nodeType){case Bn:case Zn:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),Bo=function(e,t,r){e["$$"+t]=r}}}catch(e){}Rn.DocumentType=Ao,Rn.DOMException=so,Rn.DOMImplementation=mo,Rn.Element=xo,Rn.Node=vo,Rn.NodeList=ao,Rn.XMLSerializer=Mo;var Go={},Ko={};!function(e){var t=kn.freeze;e.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=t({lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}),e.entityMap=e.HTML_ENTITIES}(Ko);var Xo={},Wo=kn.NAMESPACE,Yo=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,zo=new RegExp("[\\-\\.0-9"+Yo.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Jo=new RegExp("^"+Yo.source+zo.source+"*(?::"+Yo.source+zo.source+"*)?$");function Qo(e,t){this.message=e,this.locator=t,Error.captureStackTrace&&Error.captureStackTrace(this,Qo)}function Zo(){}function ei(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function ti(e,t,r,n,o,i){function s(e,t,n){r.attributeNames.hasOwnProperty(e)&&i.fatalError("Attribute "+e+" redefined"),r.addValue(e,t,n)}for(var a,c=++t,u=0;;){var l=e.charAt(c);switch(l){case"=":if(1===u)a=e.slice(t,c),u=3;else{if(2!==u)throw new Error("attribute equal must after attrName");u=3}break;case"'":case'"':if(3===u||1===u){if(1===u&&(i.warning('attribute value must after "="'),a=e.slice(t,c)),t=c+1,!((c=e.indexOf(l,t))>0))throw new Error("attribute value no end '"+l+"' match");s(a,d=e.slice(t,c).replace(/&#?\w+;/g,o),t-1),u=5}else{if(4!=u)throw new Error('attribute value must after "="');s(a,d=e.slice(t,c).replace(/&#?\w+;/g,o),t),i.warning('attribute "'+a+'" missed start quot('+l+")!!"),t=c+1,u=5}break;case"/":switch(u){case 0:r.setTagName(e.slice(t,c));case 5:case 6:case 7:u=7,r.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),0==u&&r.setTagName(e.slice(t,c)),c;case">":switch(u){case 0:r.setTagName(e.slice(t,c));case 5:case 6:case 7:break;case 4:case 1:"/"===(d=e.slice(t,c)).slice(-1)&&(r.closed=!0,d=d.slice(0,-1));case 2:2===u&&(d=a),4==u?(i.warning('attribute "'+d+'" missed quot(")!'),s(a,d.replace(/&#?\w+;/g,o),t)):(Wo.isHTML(n[""])&&d.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+d+'" missed value!! "'+d+'" instead!!'),s(d,d,t));break;case 3:throw new Error("attribute value missed!!")}return c;case"€":l=" ";default:if(l<=" ")switch(u){case 0:r.setTagName(e.slice(t,c)),u=6;break;case 1:a=e.slice(t,c),u=2;break;case 4:var d=e.slice(t,c).replace(/&#?\w+;/g,o);i.warning('attribute "'+d+'" missed quot(")!!'),s(a,d,t);case 5:u=6}else switch(u){case 2:r.tagName,Wo.isHTML(n[""])&&a.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+a+'" missed value!! "'+a+'" instead2!!'),s(a,a,t),t=c,u=1;break;case 5:i.warning('attribute space is required"'+a+'"!!');case 6:u=1,t=c;break;case 3:u=4,t=c;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function ri(e,t,r){for(var n=e.tagName,o=null,i=e.length;i--;){var s=e[i],a=s.qName,c=s.value;if((p=a.indexOf(":"))>0)var u=s.prefix=a.slice(0,p),l=a.slice(p+1),d="xmlns"===u&&l;else l=a,u=null,d="xmlns"===a&&"";s.localName=l,!1!==d&&(null==o&&(o={},ii(r,r={})),r[d]=o[d]=c,s.uri=Wo.XMLNS,t.startPrefixMapping(d,c))}for(i=e.length;i--;){(u=(s=e[i]).prefix)&&("xml"===u&&(s.uri=Wo.XML),"xmlns"!==u&&(s.uri=r[u||""]))}var p;(p=n.indexOf(":"))>0?(u=e.prefix=n.slice(0,p),l=e.localName=n.slice(p+1)):(u=null,l=e.localName=n);var h=e.uri=r[u||""];if(t.startElement(h,l,n,e),!e.closed)return e.currentNSMap=r,e.localNSMap=o,!0;if(t.endElement(h,l,n),o)for(u in o)t.endPrefixMapping(u)}function ni(e,t,r,n,o){if(/^(?:script|textarea)$/i.test(r)){var i=e.indexOf("</"+r+">",t),s=e.substring(t+1,i);if(/[&<]/.test(s))return/^script$/i.test(r)?(o.characters(s,0,s.length),i):(s=s.replace(/&#?\w+;/g,n),o.characters(s,0,s.length),i)}return t+1}function oi(e,t,r,n){var o=n[r];return null==o&&((o=e.lastIndexOf("</"+r+">"))<t&&(o=e.lastIndexOf("</"+r)),n[r]=o),o<t}function ii(e,t){for(var r in e)t[r]=e[r]}function si(e,t,r,n){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(o=e.indexOf("--\x3e",t+4))>t?(r.comment(e,t+4,o-t-4),o+3):(n.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var o=e.indexOf("]]>",t+9);return r.startCDATA(),r.characters(e,t+9,o-t-9),r.endCDATA(),o+3}var i=function(e,t){var r,n=[],o=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;o.lastIndex=t,o.exec(e);for(;r=o.exec(e);)if(n.push(r),r[1])return n}(e,t),s=i.length;if(s>1&&/!doctype/i.test(i[0][0])){var a=i[1][0],c=!1,u=!1;s>3&&(/^public$/i.test(i[2][0])?(c=i[3][0],u=s>4&&i[4][0]):/^system$/i.test(i[2][0])&&(u=i[3][0]));var l=i[s-1];return r.startDTD(a,c,u),r.endDTD(),l.index+l[0].length}}return-1}function ai(e,t,r){var n=e.indexOf("?>",t);if(n){var o=e.substring(t,n).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);return o?(o[0].length,r.processingInstruction(o[1],o[2]),n+2):-1}return-1}function ci(){this.attributeNames={}}Qo.prototype=new Error,Qo.prototype.name=Qo.name,Zo.prototype={parse:function(e,t,r){var n=this.domBuilder;n.startDocument(),ii(t,t={}),function(e,t,r,n,o){function i(e){if(e>65535){var t=55296+((e-=65536)>>10),r=56320+(1023&e);return String.fromCharCode(t,r)}return String.fromCharCode(e)}function s(e){var t=e.slice(1,-1);return t in r?r[t]:"#"===t.charAt(0)?i(parseInt(t.substr(1).replace("x","0x"))):(o.error("entity not found:"+e),e)}function a(t){if(t>m){var r=e.substring(m,t).replace(/&#?\w+;/g,s);p&&c(m),n.characters(r,0,t-m),m=t}}function c(t,r){for(;t>=l&&(r=d.exec(e));)u=r.index,l=u+r[0].length,p.lineNumber++;p.columnNumber=t-u+1}var u=0,l=0,d=/.*(?:\r\n?|\n)|.*$/g,p=n.locator,h=[{currentNSMap:t}],f={},m=0;for(;;){try{var v=e.indexOf("<",m);if(v<0){if(!e.substr(m).match(/^\s*$/)){var y=n.doc,g=y.createTextNode(e.substr(m));y.appendChild(g),n.currentElement=g}return}switch(v>m&&a(v),e.charAt(v+1)){case"/":var E=e.indexOf(">",v+3),b=e.substring(v+2,E).replace(/[ \t\n\r]+$/g,""),w=h.pop();E<0?(b=e.substring(v+2).replace(/[\s<].*/,""),o.error("end tag name: "+b+" is not complete:"+w.tagName),E=v+1+b.length):b.match(/\s</)&&(b=b.replace(/[\s<].*/,""),o.error("end tag name: "+b+" maybe not complete"),E=v+1+b.length);var N=w.localNSMap,T=w.tagName==b;if(T||w.tagName&&w.tagName.toLowerCase()==b.toLowerCase()){if(n.endElement(w.uri,w.localName,b),N)for(var x in N)n.endPrefixMapping(x);T||o.fatalError("end tag name: "+b+" is not match the current start tagName:"+w.tagName)}else h.push(w);E++;break;case"?":p&&c(v),E=ai(e,v,n);break;case"!":p&&c(v),E=si(e,v,n,o);break;default:p&&c(v);var _=new ci,O=h[h.length-1].currentNSMap,C=(E=ti(e,v,_,O,s,o),_.length);if(!_.closed&&oi(e,E,_.tagName,f)&&(_.closed=!0,r.nbsp||o.warning("unclosed xml attribute")),p&&C){for(var S=ei(p,{}),I=0;I<C;I++){var A=_[I];c(A.offset),A.locator=ei(p,{})}n.locator=S,ri(_,n,O)&&h.push(_),n.locator=p}else ri(_,n,O)&&h.push(_);Wo.isHTML(_.uri)&&!_.closed?E=ni(e,E,_.tagName,s,n):E++}}catch(e){if(e instanceof Qo)throw e;o.error("element parse error: "+e),E=-1}E>m?m=E:a(Math.max(v,m)+1)}}(e,t,r,n,this.errorHandler),n.endDocument()}},ci.prototype={setTagName:function(e){if(!Jo.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},addValue:function(e,t,r){if(!Jo.test(e))throw new Error("invalid attribute:"+e);this.attributeNames[e]=this.length,this[this.length++]={qName:e,value:t,offset:r}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},Xo.XMLReader=Zo,Xo.ParseError=Qo;var ui=kn,li=Rn,di=Ko,pi=Xo,hi=li.DOMImplementation,fi=ui.NAMESPACE,mi=pi.ParseError,vi=pi.XMLReader;function yi(e){this.options=e||{locator:{}}}function gi(){this.cdata=!1}function Ei(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function bi(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function wi(e,t,r){return"string"==typeof e?e.substr(t,r):e.length>=t+r||t?new java.lang.String(e,t,r)+"":e}function Ni(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}yi.prototype.parseFromString=function(e,t){var r=this.options,n=new vi,o=r.domBuilder||new gi,i=r.errorHandler,s=r.locator,a=r.xmlns||{},c=/\/x?html?$/.test(t),u=c?di.HTML_ENTITIES:di.XML_ENTITIES;return s&&o.setDocumentLocator(s),n.errorHandler=function(e,t,r){if(!e){if(t instanceof gi)return t;e=t}var n={},o=e instanceof Function;function i(t){var i=e[t];!i&&o&&(i=2==e.length?function(r){e(t,r)}:e),n[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+bi(r))}||function(){}}return r=r||{},i("warning"),i("error"),i("fatalError"),n}(i,o,s),n.domBuilder=r.domBuilder||o,c&&(a[""]=fi.HTML),a.xml=a.xml||fi.XML,e&&"string"==typeof e?n.parse(e,a,u):n.errorHandler.error("invalid doc source"),o.doc},gi.prototype={startDocument:function(){this.doc=(new hi).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,r,n){var o=this.doc,i=o.createElementNS(e,r||t),s=n.length;Ni(this,i),this.currentElement=i,this.locator&&Ei(this.locator,i);for(var a=0;a<s;a++){e=n.getURI(a);var c=n.getValue(a),u=(r=n.getQName(a),o.createAttributeNS(e,r));this.locator&&Ei(n.getLocator(a),u),u.value=u.nodeValue=c,i.setAttributeNode(u)}},endElement:function(e,t,r){var n=this.currentElement;n.tagName,this.currentElement=n.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var r=this.doc.createProcessingInstruction(e,t);this.locator&&Ei(this.locator,r),Ni(this,r)},ignorableWhitespace:function(e,t,r){},characters:function(e,t,r){if(e=wi.apply(this,arguments)){if(this.cdata)var n=this.doc.createCDATASection(e);else n=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(e)&&this.doc.appendChild(n),this.locator&&Ei(this.locator,n)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,r){e=wi.apply(this,arguments);var n=this.doc.createComment(e);this.locator&&Ei(this.locator,n),Ni(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,r){var n=this.doc.implementation;if(n&&n.createDocumentType){var o=n.createDocumentType(e,t,r);this.locator&&Ei(this.locator,o),Ni(this,o),this.doc.doctype=o}},warning:function(e){console.warn("[xmldom warning]\t"+e,bi(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,bi(this.locator))},fatalError:function(e){throw new mi(e,this.locator)}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){gi.prototype[e]=function(){return null}})),Go.__DOMHandler=gi,Go.DOMParser=yi,Go.DOMImplementation=li.DOMImplementation,Go.XMLSerializer=li.XMLSerializer;var Ti=Rn;An.DOMImplementation=Ti.DOMImplementation,An.XMLSerializer=Ti.XMLSerializer,An.DOMParser=Go.DOMParser;var xi={};Object.defineProperty(xi,"__esModule",{value:!0}),xi.parseJson=void 0,xi.parseJson=function(e){try{return JSON.parse(e)}catch(e){return null}};var _i={};Object.defineProperty(_i,"__esModule",{value:!0}),_i.bufferFrom=void 0,_i.bufferFrom=function(e){var t=encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,t){return String.fromCharCode("0x"+t)})),r=new Uint8Array(t.length);return Array.prototype.forEach.call(t,(function(e,t){r[t]=e.charCodeAt(0)})),r};var Oi={},Ci={};Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.EventPolyfill=void 0;var Si=function(){function e(e,t){this.AT_TARGET=0,this.BUBBLING_PHASE=0,this.CAPTURING_PHASE=0,this.NONE=0,this.type="",this.srcElement=null,this.currentTarget=null,this.eventPhase=0,this.isTrusted=!0,this.composed=!1,this.cancelable=!0,this.defaultPrevented=!1,this.bubbles=!0,this.lengthComputable=!0,this.loaded=0,this.total=0,this.cancelBubble=!1,this.returnValue=!0,this.type=e,this.target=(null==t?void 0:t.target)||null,this.currentTarget=(null==t?void 0:t.currentTarget)||null,this.timeStamp=Date.now()}return e.prototype.composedPath=function(){return[]},e.prototype.initEvent=function(e,t,r){this.type=e,this.bubbles=!!t,this.cancelable=!!r},e.prototype.preventDefault=function(){this.defaultPrevented=!0},e.prototype.stopPropagation=function(){},e.prototype.stopImmediatePropagation=function(){},e}();Ci.EventPolyfill=Si;var Ii={},Ai=n&&n.__extends||function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ii,"__esModule",{value:!0}),Ii.ProgressEventPolyfill=void 0;var Ri=function(e){function t(t,r){var n=e.call(this,t)||this;return n.lengthComputable=(null==r?void 0:r.lengthComputable)||!1,n.composed=(null==r?void 0:r.composed)||!1,n.loaded=(null==r?void 0:r.loaded)||0,n.total=(null==r?void 0:r.total)||0,n}return Ai(t,e),t}(Ci.EventPolyfill);Ii.ProgressEventPolyfill=Ri,Object.defineProperty(Oi,"__esModule",{value:!0}),Oi.createEvent=void 0;var ki=Ci,Di=Ii,Li="undefined"!=typeof ProgressEvent;Oi.createEvent=function(e,t,r){var n=Li?ProgressEvent:Di.ProgressEventPolyfill;return["error","progress","loadstart","loadend","load","timeout","abort"].includes(t)?new n(t,{lengthComputable:!0,loaded:(null==r?void 0:r.loaded)||0,total:(null==r?void 0:r.total)||0}):new ki.EventPolyfill(t,{target:e,currentTarget:e})};var Pi=n&&n.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))},Mi=n&&n.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},Fi=n&&n.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ji=n&&n.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return s};Object.defineProperty(In,"__esModule",{value:!0}),In.createXMLHttpRequestOverride=void 0;var Ui=Ie,qi=o,Hi=An,$i=xi,Bi=Wr,Vi=cn,Gi=_i,Ki=Oi,Xi=un.exports;In.createXMLHttpRequestOverride=function(e){var t,r=e.pureXMLHttpRequest,n=e.observer,o=e.resolver,i=Xi("XHR");return(t=function(){function e(){this._events=[],this.UNSENT=0,this.OPENED=1,this.HEADERS_RECEIVED=2,this.LOADING=3,this.DONE=4,this.onreadystatechange=null,this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.ontimeout=null,this.url="",this.method="GET",this.readyState=this.UNSENT,this.withCredentials=!1,this.status=200,this.statusText="OK",this.data="",this.response="",this.responseType="text",this.responseText="",this.responseXML=null,this.responseURL="",this.upload={},this.timeout=0,this._requestHeaders=new qi.Headers,this._responseHeaders=new qi.Headers}return e.prototype.setReadyState=function(e){e!==this.readyState&&(i("readyState change %d -> %d",this.readyState,e),this.readyState=e,e!==this.UNSENT&&(i("triggerring readystate change..."),this.trigger("readystatechange")))},e.prototype.trigger=function(e,t){var r,n;i('trigger "%s" (%d)',e,this.readyState),i('resolve listener for event "%s"',e);var o=this["on"+e];null==o||o.call(this,Ki.createEvent(this,e,t));try{for(var s=Fi(this._events),a=s.next();!a.done;a=s.next()){var c=a.value;c.name===e&&(i('calling mock event listener "%s" (%d)',e,this.readyState),c.listener.call(this,Ki.createEvent(this,e,t)))}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return this},e.prototype.reset=function(){i("reset"),this.setReadyState(this.UNSENT),this.status=200,this.statusText="OK",this.data="",this.response=null,this.responseText=null,this.responseXML=null,this._requestHeaders=new qi.Headers,this._responseHeaders=new qi.Headers},e.prototype.open=function(e,t,r,n,o){return void 0===r&&(r=!0),Pi(this,void 0,void 0,(function(){return Mi(this,(function(s){return(i=Xi("XHR "+e+" "+t))("open",{method:e,url:t,async:r,user:n,password:o}),this.reset(),this.setReadyState(this.OPENED),void 0===t?(this.url=e,this.method="GET"):(this.url=t,this.method=e,this.async=r,this.user=n,this.password=o),[2]}))}))},e.prototype.send=function(e){var t,s=this;i("send %s %s",this.method,this.url),this.data=e||"";try{t=new URL(this.url)}catch(e){t=new URL(this.url,window.location.href)}i("request headers",this._requestHeaders);var a={id:Vi.uuidv4(),url:t,method:this.method,headers:this._requestHeaders,credentials:this.withCredentials?"include":"omit",body:this.data};n.emit("request",a),i("awaiting mocked response..."),Promise.resolve(Ui.until((function(){return Pi(s,void 0,void 0,(function(){return Mi(this,(function(e){return[2,o(a,this)]}))}))}))).then((function(e){var t,o=ji(e,2),c=o[0],u=o[1];if(c)return i("middleware function threw an exception!",c),s.trigger("error"),void s.abort();if(u){if(i("received mocked response",u),s.trigger("loadstart"),s.status=u.status||200,s.statusText=u.statusText||"OK",s._responseHeaders=u.headers?qi.objectToHeaders(u.headers):new qi.Headers,i("set response status",s.status,s.statusText),i("set response headers",s._responseHeaders),s.setReadyState(s.HEADERS_RECEIVED),i("response type",s.responseType),s.response=s.getResponseBody(u.body),s.responseText=u.body||"",s.responseXML=s.getResponseXML(),i("set response body",s.response),u.body&&s.response){s.setReadyState(s.LOADING);var l=Gi.bufferFrom(u.body);s.trigger("progress",{loaded:l.length,total:l.length})}s.setReadyState(s.DONE),s.trigger("load"),s.trigger("loadend"),n.emit("response",a,Bi.toIsoResponse(u))}else{i("no mocked response received!");var d=new r;i("opening an original request %s %s",s.method,s.url),d.open(s.method,s.url,null===(t=s.async)||void 0===t||t,s.user,s.password),d.addEventListener("load",(function(){i('original "onload"'),s.status=d.status,s.statusText=d.statusText,s.responseURL=d.responseURL,s.responseType=d.responseType,s.response=d.response,s.responseText=d.responseText,s.responseXML=d.responseXML,i("set mock request readyState to DONE"),s.setReadyState(s.DONE),i("received original response",s.status,s.statusText),i("original response body:",s.response);var e=d.getAllResponseHeaders();i("original response headers:\n",e),s._responseHeaders=qi.stringToHeaders(e),i("original response headers (normalized)",s._responseHeaders),i("original response finished"),n.emit("response",a,{status:d.status,statusText:d.statusText,headers:s._responseHeaders,body:d.response})})),s.propagateCallbacks(d),s.propagateListeners(d),s.propagateHeaders(d,s._requestHeaders),s.async&&(d.timeout=s.timeout),i("send",s.data),d.send(s.data)}}))},e.prototype.abort=function(){i("abort"),this.readyState>this.UNSENT&&this.readyState<this.DONE&&(this.setReadyState(this.UNSENT),this.trigger("abort"))},e.prototype.dispatchEvent=function(){return!1},e.prototype.setRequestHeader=function(e,t){i('set request header "%s" to "%s"',e,t),this._requestHeaders.append(e,t)},e.prototype.getResponseHeader=function(e){if(i('get response header "%s"',e),this.readyState<this.HEADERS_RECEIVED)return i("cannot return a header: headers not received (state: %s)",this.readyState),null;var t=this._responseHeaders.get(e);return i('resolved response header "%s" to "%s"',e,t,this._responseHeaders),t},e.prototype.getAllResponseHeaders=function(){return i("get all response headers"),this.readyState<this.HEADERS_RECEIVED?(i("cannot return headers: headers not received (state: %s)",this.readyState),""):qi.headersToString(this._responseHeaders)},e.prototype.addEventListener=function(e,t){i("addEventListener",e,t),this._events.push({name:e,listener:t})},e.prototype.removeEventListener=function(e,t){i("removeEventListener",e,t),this._events=this._events.filter((function(r){return r.name!==e&&r.listener!==t}))},e.prototype.overrideMimeType=function(){},e.prototype.getResponseBody=function(e){var t=null!=e?e:"";switch(i("coerced response body to",t),this.responseType){case"json":return i("resolving response body as JSON"),$i.parseJson(t);case"blob":var r=this.getResponseHeader("content-type")||"text/plain";return i("resolving response body as Blob",{type:r}),new Blob([t],{type:r});case"arraybuffer":return i("resolving response body as ArrayBuffer"),Gi.bufferFrom(t);default:return t}},e.prototype.getResponseXML=function(){var e=this.getResponseHeader("Content-Type");return"application/xml"===e||"text/xml"===e?(new Hi.DOMParser).parseFromString(this.responseText,e):null},e.prototype.propagateCallbacks=function(e){e.onabort=this.abort,e.onerror=this.onerror,e.ontimeout=this.ontimeout,e.onload=this.onload,e.onloadstart=this.onloadstart,e.onloadend=this.onloadend,e.onprogress=this.onprogress,e.onreadystatechange=this.onreadystatechange},e.prototype.propagateListeners=function(e){i("propagating request listeners (%d) to the original request",this._events.length,this._events),this._events.forEach((function(t){var r=t.name,n=t.listener;e.addEventListener(r,n)}))},e.prototype.propagateHeaders=function(e,t){i("propagating request headers to the original request",t),Object.entries(t.raw()).forEach((function(t){var r=ji(t,2),n=r[0],o=r[1];i('setting "%s" (%s) header on the original request',n,o),e.setRequestHeader(n,o)}))},e}()).UNSENT=0,t.OPENED=1,t.HEADERS_RECEIVED=2,t.LOADING=3,t.DONE=4,t},Object.defineProperty(Sn,"__esModule",{value:!0});var Wi=Sn.interceptXMLHttpRequest=void 0,Yi=In,zi=un.exports("XHR"),Ji="undefined"==typeof window?void 0:window.XMLHttpRequest;function Qi(e){const t={id:e.id,url:e.url,method:e.method,body:ht(e.body,e.headers),credentials:e.credentials||"same-origin",headers:e.headers,cookies:{},redirect:"manual",referrer:"",keepalive:!1,cache:"default",mode:"cors",referrerPolicy:"no-referrer",integrity:"",destination:"document",bodyUsed:!1,passthrough:rt};return dt(t),t}function Zi(e){return function(t){return Se(this,void 0,void 0,(function*(){e.fallbackInterceptor=function(e,t){const r=Vr.createInterceptor({modules:[Nn,Wi],resolver(r){return Se(this,void 0,void 0,(function*(){return jr(Qi(r),e.requestHandlers,t,e.emitter,{transformResponse:e=>({status:e.status,statusText:e.statusText,headers:e.headers.all(),body:e.body}),onMockedResponseSent(e,{handler:r,publicRequest:n,parsedRequest:o}){t.quiet||r.log(n,e,r,o)}})}))}});return r.apply(),r}(e,t),Ke({message:"Mocking enabled (fallback mode).",quiet:t.quiet})}))}}Wi=Sn.interceptXMLHttpRequest=function(e,t){if(Ji){zi('patching "XMLHttpRequest" module...');var r=Yi.createXMLHttpRequestOverride({pureXMLHttpRequest:Ji,observer:e,resolver:t});window.XMLHttpRequest=r}return function(){Ji&&(zi("restoring modules..."),window.XMLHttpRequest=Ji)}};let es=[];function ts(e){return(t,r)=>new Dr(e,t,r)}const rs={all:ts(/.+/),head:ts(e.RESTMethods.HEAD),get:ts(e.RESTMethods.GET),post:ts(e.RESTMethods.POST),put:ts(e.RESTMethods.PUT),delete:ts(e.RESTMethods.DELETE),patch:ts(e.RESTMethods.PATCH),options:ts(e.RESTMethods.OPTIONS)};function ns(e,t){return(r,n)=>new Mr(e,r,t,n)}function os(e){return t=>new Mr("all",new RegExp(".*"),e,t)}const is={operation:os("*"),query:ns(It.QUERY,"*"),mutation:ns(It.MUTATION,"*")};const ss=Object.assign(Object.assign({},is),{link:function(e){return{operation:os(e),query:ns(It.QUERY,e),mutation:ns(It.MUTATION,e)}}});return e.GraphQLHandler=Mr,e.RequestHandler=tt,e.RestHandler=Dr,e.cleanUrl=Sr,e.compose=We,e.context=se,e.createResponseComposition=Je,e.defaultContext=et,e.defaultResponse=Ye,e.graphql=ss,e.graphqlContext=Pr,e.handleRequest=jr,e.matchRequestUrl=Ar,e.parseIsomorphicRequest=Qi,e.response=Qe,e.rest=rs,e.restContext=kr,e.setupWorker=function(...e){if(e.forEach((e=>{if(Array.isArray(e))throw new Error(Ve.formatMessage('Failed to call "setupWorker" given an Array of request handlers (setupWorker([a, b])), expected to receive each handler individually: setupWorker(a, b).'))})),Y.exports.isNodeProcess())throw new Error(Ve.formatMessage("Failed to execute `setupWorker` in a non-browser environment. Consider using `setupServer` for Node.js environment instead."));const t=new ae.StrictEventEmitter,r=new ae.StrictEventEmitter;!function(e,t){const r=e.emit;r._isPiped||(e.emit=function(e,...n){return t.emit(e,...n),r.call(this,e,...n)},e.emit._isPiped=!0)}(t,r);const n={isMockingEnabled:!1,startOptions:void 0,worker:null,registration:null,requestHandlers:[...e],emitter:t,workerChannel:{on(e,t){n.events.addListener(navigator.serviceWorker,"message",(r=>{if(r.source!==n.worker)return;const o=B(r.data);o&&o.type===e&&t(r,o)}))},send(e){var t;null===(t=n.worker)||void 0===t||t.postMessage(e)}},events:{addListener:(e,t,r)=>(e.addEventListener(t,r),es.push({eventType:t,target:e,callback:r}),()=>{e.removeEventListener(t,r)}),removeAllListeners(){for(const{target:e,eventType:t,callback:r}of es)e.removeEventListener(t,r);es=[]},once(e){const t=[];return new Promise(((r,o)=>{t.push(n.events.addListener(navigator.serviceWorker,"message",(t=>{try{const n=JSON.parse(t.data);n.type===e&&r(n)}catch(e){o(e)}})),n.events.addListener(navigator.serviceWorker,"messageerror",o))})).finally((()=>{t.forEach((e=>e()))}))}},useFallbackMode:!("serviceWorker"in navigator)||"file:"===location.protocol},o=n.useFallbackMode?Zi(n):qr(n),i=n.useFallbackMode?function(e){return function(){var t,r;null===(t=e.fallbackInterceptor)||void 0===t||t.restore(),Hr({quiet:null===(r=e.startOptions)||void 0===r?void 0:r.quiet})}}(n):(e=>function(){var t;e.isMockingEnabled?(e.workerChannel.send("MOCK_DEACTIVATE"),e.isMockingEnabled=!1,window.clearInterval(e.keepAliveInterval),Hr({quiet:null===(t=e.startOptions)||void 0===t?void 0:t.quiet})):Ve.warn('Found a redundant "worker.stop()" call. Note that stopping the worker while mocking already stopped has no effect. Consider removing this "worker.stop()" call.')})(n);return{start:Br(o,n),stop(){n.events.removeAllListeners(),n.emitter.removeAllListeners(),r.removeAllListeners(),i()},use(...e){!function(e,...t){e.unshift(...t)}(n.requestHandlers,...e)},restoreHandlers(){n.requestHandlers.forEach((e=>{e.markAsSkipped(!1)}))},resetHandlers(...t){n.requestHandlers=function(e,...t){return t.length>0?[...t]:[...e]}(e,...t)},printHandlers(){n.requestHandlers.forEach((e=>{const{header:t,callFrame:r}=e.info,n=e.info.hasOwnProperty("operationType")?"[graphql]":"[rest]";console.groupCollapsed(`${n} ${t}`),r&&console.log(`Declaration: ${r}`),console.log("Handler:",e),e instanceof Dr&&console.log("Match:",`https://mswjs.io/repl?path=${e.info.path}`),console.groupEnd()}))},events:{on:(...e)=>r.on(...e),removeListener:(...e)=>r.removeListener(...e),removeAllListeners:(...e)=>r.removeAllListeners(...e)}}},e}({});