typeson-registry 3.0.0 → 4.0.0

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.
Files changed (78) hide show
  1. package/dist/index.js +2 -2
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.min.js +1 -1
  4. package/dist/index.min.js.map +1 -1
  5. package/dist/index.umd.js +951 -793
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/index.umd.min.js +1 -1
  8. package/dist/index.umd.min.js.map +1 -1
  9. package/dist/presets/array-nonindex-keys.umd.js.map +1 -1
  10. package/dist/presets/builtin.umd.js +1 -1
  11. package/dist/presets/builtin.umd.js.map +1 -1
  12. package/dist/presets/postmessage.umd.js +1 -1
  13. package/dist/presets/postmessage.umd.js.map +1 -1
  14. package/dist/presets/socketio.umd.js +1 -1
  15. package/dist/presets/socketio.umd.js.map +1 -1
  16. package/dist/presets/sparse-undefined.umd.js.map +1 -1
  17. package/dist/presets/special-numbers.umd.js.map +1 -1
  18. package/dist/presets/structured-cloning-throwing.umd.js +1 -1
  19. package/dist/presets/structured-cloning-throwing.umd.js.map +1 -1
  20. package/dist/presets/structured-cloning.umd.js +1 -1
  21. package/dist/presets/structured-cloning.umd.js.map +1 -1
  22. package/dist/presets/undef.umd.js +1 -1
  23. package/dist/presets/undef.umd.js.map +1 -1
  24. package/dist/presets/universal.umd.js +1 -1
  25. package/dist/presets/universal.umd.js.map +1 -1
  26. package/dist/types/arraybuffer.umd.js +1 -1
  27. package/dist/types/arraybuffer.umd.js.map +1 -1
  28. package/dist/types/bigint-object.umd.js +1 -1
  29. package/dist/types/bigint-object.umd.js.map +1 -1
  30. package/dist/types/bigint.umd.js.map +1 -1
  31. package/dist/types/blob.umd.js +1 -1
  32. package/dist/types/blob.umd.js.map +1 -1
  33. package/dist/types/cloneable.umd.js.map +1 -1
  34. package/dist/types/cryptokey.umd.js +1 -1
  35. package/dist/types/cryptokey.umd.js.map +1 -1
  36. package/dist/types/dataview.umd.js +1 -1
  37. package/dist/types/dataview.umd.js.map +1 -1
  38. package/dist/types/date.umd.js +1 -1
  39. package/dist/types/date.umd.js.map +1 -1
  40. package/dist/types/error.umd.js +1 -1
  41. package/dist/types/error.umd.js.map +1 -1
  42. package/dist/types/errors.umd.js +1 -1
  43. package/dist/types/errors.umd.js.map +1 -1
  44. package/dist/types/file.umd.js +1 -1
  45. package/dist/types/file.umd.js.map +1 -1
  46. package/dist/types/filelist.umd.js +1 -1
  47. package/dist/types/filelist.umd.js.map +1 -1
  48. package/dist/types/imagebitmap.umd.js +1 -1
  49. package/dist/types/imagebitmap.umd.js.map +1 -1
  50. package/dist/types/imagedata.umd.js +1 -1
  51. package/dist/types/imagedata.umd.js.map +1 -1
  52. package/dist/types/infinity.umd.js.map +1 -1
  53. package/dist/types/intl-types.umd.js +1 -1
  54. package/dist/types/intl-types.umd.js.map +1 -1
  55. package/dist/types/map.umd.js +1 -1
  56. package/dist/types/map.umd.js.map +1 -1
  57. package/dist/types/nan.umd.js.map +1 -1
  58. package/dist/types/negative-infinity.umd.js.map +1 -1
  59. package/dist/types/nonbuiltin-ignore.umd.js +1 -1
  60. package/dist/types/nonbuiltin-ignore.umd.js.map +1 -1
  61. package/dist/types/primitive-objects.umd.js +1 -1
  62. package/dist/types/primitive-objects.umd.js.map +1 -1
  63. package/dist/types/regexp.umd.js +1 -1
  64. package/dist/types/regexp.umd.js.map +1 -1
  65. package/dist/types/resurrectable.umd.js.map +1 -1
  66. package/dist/types/set.umd.js +1 -1
  67. package/dist/types/set.umd.js.map +1 -1
  68. package/dist/types/typed-arrays-socketio.umd.js +1 -1
  69. package/dist/types/typed-arrays-socketio.umd.js.map +1 -1
  70. package/dist/types/typed-arrays.umd.js +1 -1
  71. package/dist/types/typed-arrays.umd.js.map +1 -1
  72. package/dist/types/undef.umd.js +1 -1
  73. package/dist/types/undef.umd.js.map +1 -1
  74. package/dist/types/user-object.umd.js +1 -1
  75. package/dist/types/user-object.umd.js.map +1 -1
  76. package/package.json +29 -30
  77. package/polyfills/createObjectURL.umd.js +1 -1
  78. package/polyfills/createObjectURL.umd.js.map +1 -1
@@ -1,2 +1,2 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).createObjectURL={})}(this,(function(e){"use strict";function getAugmentedNamespace(e){var t=e.default;if("function"==typeof t){var a=function(){return t.apply(this,arguments)};a.prototype=t.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),a}var t={},r={};function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _AwaitValue(e){this.wrapped=e}function _AsyncGenerator(e){var t,r;function resume(t,r){try{var n=e[t](r),i=n.value,o=i instanceof _AwaitValue;Promise.resolve(o?i.wrapped:i).then((function(e){o?resume("return"===t?"return":"next",e):settle(n.done?"return":"normal",e)}),(function(e){resume("throw",e)}))}catch(e){settle("throw",e)}}function settle(e,n){switch(e){case"return":t.resolve({value:n,done:!0});break;case"throw":t.reject(n);break;default:t.resolve({value:n,done:!1})}(t=t.next)?resume(t.key,t.arg):r=null}this._invoke=function send(e,n){return new Promise((function(i,o){var s={key:e,arg:n,resolve:i,reject:o,next:null};r?r=r.next=s:(t=r=s,resume(e,n))}))},"function"!=typeof e.return&&(this.return=void 0)}function _wrapAsyncGenerator(e){return function(){return new _AsyncGenerator(e.apply(this,arguments))}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,o=[],s=!0,l=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);s=!0);}catch(e){l=!0,i=e}finally{try{s||null==r.return||r.return()}finally{if(l)throw i}}return o}(e,t)||_unsupportedIterableToArray(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_unsupportedIterableToArray(e)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,F=function(){};return{s:F,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}_AsyncGenerator.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},_AsyncGenerator.prototype.next=function(e){return this._invoke("next",e)},_AsyncGenerator.prototype.throw=function(e){return this._invoke("throw",e)},_AsyncGenerator.prototype.return=function(e){return this._invoke("return",e)};var n=require("webidl-conversions"),i=require("./utils.js"),o=i.implSymbol,s=i.ctorRegistrySymbol;function makeWrapper$1(e,t){var r;return void 0!==t&&(r=t.prototype),i.isObject(r)||(r=e[s].URL.prototype),Object.create(r)}e.is=function(e){return i.isObject(e)&&i.hasOwn(e,o)&&e[o]instanceof u.implementation},e.isImpl=function(e){return i.isObject(e)&&e instanceof u.implementation},e.convert=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.context,s=void 0===o?"The provided value":o;if(e.is(r))return i.implForWrapper(r);throw new t.TypeError("".concat(s," is not of type 'URL'."))},e.create=function(t,r,n){var i=makeWrapper$1(t);return e.setup(i,t,r,n)},e.createImpl=function(t,r,n){var o=e.create(t,r,n);return i.implForWrapper(o)},e._internalSetup=function(e,t){},e.setup=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s.wrapper=t,e._internalSetup(t,r),Object.defineProperty(t,o,{value:new u.implementation(r,n,s),configurable:!0}),t[o][i.wrapperSymbol]=t,u.init&&u.init(t[o]),t},e.new=function(t,r){var n=makeWrapper$1(t,r);return e._internalSetup(n,t),Object.defineProperty(n,o,{value:Object.create(u.implementation.prototype),configurable:!0}),n[o][i.wrapperSymbol]=n,u.init&&u.init(n[o]),n[o]};var l=new Set(["Window","Worker"]);e.install=function(t,r){if(r.some((function(e){return l.has(e)}))){var s=i.initCtorRegistry(t),u=function(){function URL(r){if(_classCallCheck(this,URL),arguments.length<1)throw new t.TypeError("Failed to construct 'URL': 1 argument required, but only ".concat(arguments.length," present."));var i=[],o=arguments[0];o=n.USVString(o,{context:"Failed to construct 'URL': parameter 1",globals:t}),i.push(o);var s=arguments[1];return void 0!==s&&(s=n.USVString(s,{context:"Failed to construct 'URL': parameter 2",globals:t})),i.push(s),e.setup(Object.create((this instanceof URL?this.constructor:void 0).prototype),t,i)}return _createClass(URL,[{key:"toJSON",value:function toJSON(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'toJSON' called on an object that is not a valid instance of URL.");return r[o].toJSON()}},{key:"href",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get href' called on an object that is not a valid instance of URL.");return r[o].href},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set href' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'href' property on 'URL': The provided value",globals:t}),i[o].href=r}},{key:"toString",value:function toString(){if(!e.is(this))throw new t.TypeError("'toString' called on an object that is not a valid instance of URL.");return this[o].href}},{key:"origin",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get origin' called on an object that is not a valid instance of URL.");return r[o].origin}},{key:"protocol",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get protocol' called on an object that is not a valid instance of URL.");return r[o].protocol},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set protocol' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'protocol' property on 'URL': The provided value",globals:t}),i[o].protocol=r}},{key:"username",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get username' called on an object that is not a valid instance of URL.");return r[o].username},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set username' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'username' property on 'URL': The provided value",globals:t}),i[o].username=r}},{key:"password",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get password' called on an object that is not a valid instance of URL.");return r[o].password},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set password' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'password' property on 'URL': The provided value",globals:t}),i[o].password=r}},{key:"host",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get host' called on an object that is not a valid instance of URL.");return r[o].host},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set host' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'host' property on 'URL': The provided value",globals:t}),i[o].host=r}},{key:"hostname",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get hostname' called on an object that is not a valid instance of URL.");return r[o].hostname},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set hostname' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'hostname' property on 'URL': The provided value",globals:t}),i[o].hostname=r}},{key:"port",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get port' called on an object that is not a valid instance of URL.");return r[o].port},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set port' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'port' property on 'URL': The provided value",globals:t}),i[o].port=r}},{key:"pathname",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get pathname' called on an object that is not a valid instance of URL.");return r[o].pathname},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set pathname' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'pathname' property on 'URL': The provided value",globals:t}),i[o].pathname=r}},{key:"search",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get search' called on an object that is not a valid instance of URL.");return r[o].search},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set search' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'search' property on 'URL': The provided value",globals:t}),i[o].search=r}},{key:"searchParams",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get searchParams' called on an object that is not a valid instance of URL.");return i.getSameObject(this,"searchParams",(function(){return i.tryWrapperForImpl(r[o].searchParams)}))}},{key:"hash",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get hash' called on an object that is not a valid instance of URL.");return r[o].hash},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set hash' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'hash' property on 'URL': The provided value",globals:t}),i[o].hash=r}}]),URL}();Object.defineProperties(u.prototype,_defineProperty({toJSON:{enumerable:!0},href:{enumerable:!0},toString:{enumerable:!0},origin:{enumerable:!0},protocol:{enumerable:!0},username:{enumerable:!0},password:{enumerable:!0},host:{enumerable:!0},hostname:{enumerable:!0},port:{enumerable:!0},pathname:{enumerable:!0},search:{enumerable:!0},searchParams:{enumerable:!0},hash:{enumerable:!0}},Symbol.toStringTag,{value:"URL",configurable:!0})),s.URL=u,Object.defineProperty(t,"URL",{configurable:!0,writable:!0,value:u}),r.includes("Window")&&Object.defineProperty(t,"webkitURL",{configurable:!0,writable:!0,value:u})}};var u=require("./URL-impl.js"),h=getAugmentedNamespace(Object.freeze({__proto__:null})),c=require("webidl-conversions"),f=require("./utils.js"),d=require("./Function.js"),y=f.newObjectInRealm,m=f.implSymbol,b=f.ctorRegistrySymbol,v="URLSearchParams";function makeWrapper(e,t){var r;return void 0!==t&&(r=t.prototype),f.isObject(r)||(r=e[b].URLSearchParams.prototype),Object.create(r)}e.is=function(e){return f.isObject(e)&&f.hasOwn(e,m)&&e[m]instanceof S.implementation},e.isImpl=function(e){return f.isObject(e)&&e instanceof S.implementation},e.convert=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.context,o=void 0===i?"The provided value":i;if(e.is(r))return f.implForWrapper(r);throw new t.TypeError("".concat(o," is not of type 'URLSearchParams'."))},e.createDefaultIterator=function(e,t,r){var n=e[b]["URLSearchParams Iterator"],i=Object.create(n);return Object.defineProperty(i,f.iterInternalSymbol,{value:{target:t,kind:r,index:0},configurable:!0}),i},e.create=function(t,r,n){var i=makeWrapper(t);return e.setup(i,t,r,n)},e.createImpl=function(t,r,n){var i=e.create(t,r,n);return f.implForWrapper(i)},e._internalSetup=function(e,t){},e.setup=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return i.wrapper=t,e._internalSetup(t,r),Object.defineProperty(t,m,{value:new S.implementation(r,n,i),configurable:!0}),t[m][f.wrapperSymbol]=t,S.init&&S.init(t[m]),t},e.new=function(t,r){var n=makeWrapper(t,r);return e._internalSetup(n,t),Object.defineProperty(n,m,{value:Object.create(S.implementation.prototype),configurable:!0}),n[m][f.wrapperSymbol]=n,S.init&&S.init(n[m]),n[m]};var g=new Set(["Window","Worker"]);e.install=function(t,r){var n;if(r.some((function(e){return g.has(e)}))){var i=f.initCtorRegistry(t),o=function(){function URLSearchParams(){_classCallCheck(this,URLSearchParams);var r=[],n=arguments[0];if(void 0!==n)if(f.isObject(n))if(void 0!==n[Symbol.iterator]){if(!f.isObject(n))throw new t.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence is not an iterable object.");var i,o=[],s=n,l=_createForOfIteratorHelper(s);try{for(l.s();!(i=l.n()).done;){var u=i.value;if(!f.isObject(u))throw new t.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element is not an iterable object.");var h,d=[],y=u,m=_createForOfIteratorHelper(y);try{for(m.s();!(h=m.n()).done;){var b=h.value;b=c.USVString(b,{context:"Failed to construct 'URLSearchParams': parameter 1 sequence's element's element",globals:t}),d.push(b)}}catch(e){m.e(e)}finally{m.f()}u=d,o.push(u)}}catch(e){l.e(e)}finally{l.f()}n=o}else{if(!f.isObject(n))throw new t.TypeError("Failed to construct 'URLSearchParams': parameter 1 record is not an object.");var v,g=Object.create(null),S=_createForOfIteratorHelper(Reflect.ownKeys(n));try{for(S.s();!(v=S.n()).done;){var w=v.value,P=Object.getOwnPropertyDescriptor(n,w);if(P&&P.enumerable){var U=w;U=c.USVString(U,{context:"Failed to construct 'URLSearchParams': parameter 1 record's key",globals:t});var R=n[w];R=c.USVString(R,{context:"Failed to construct 'URLSearchParams': parameter 1 record's value",globals:t}),g[U]=R}}}catch(e){S.e(e)}finally{S.f()}n=g}else n=c.USVString(n,{context:"Failed to construct 'URLSearchParams': parameter 1",globals:t});else n="";return r.push(n),e.setup(Object.create((this instanceof URLSearchParams?this.constructor:void 0).prototype),t,r)}return _createClass(URLSearchParams,[{key:"append",value:function append(r,n){var i,o=null!=this?this:t;if(!e.is(o))throw new t.TypeError("'append' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<2)throw new t.TypeError("Failed to execute 'append' on 'URLSearchParams': 2 arguments required, but only ".concat(arguments.length," present."));var s=[],l=arguments[0];l=c.USVString(l,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 1",globals:t}),s.push(l);var u=arguments[1];return u=c.USVString(u,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 2",globals:t}),s.push(u),f.tryWrapperForImpl((i=o[m]).append.apply(i,s))}},{key:"delete",value:function _delete(r){var n,i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'delete' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError("Failed to execute 'delete' on 'URLSearchParams': 1 argument required, but only ".concat(arguments.length," present."));var o=[],s=arguments[0];return s=c.USVString(s,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 1",globals:t}),o.push(s),f.tryWrapperForImpl((n=i[m]).delete.apply(n,o))}},{key:"get",value:function get(r){var n,i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'get' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError("Failed to execute 'get' on 'URLSearchParams': 1 argument required, but only ".concat(arguments.length," present."));var o=[],s=arguments[0];return s=c.USVString(s,{context:"Failed to execute 'get' on 'URLSearchParams': parameter 1",globals:t}),o.push(s),(n=i[m]).get.apply(n,o)}},{key:"getAll",value:function getAll(r){var n,i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'getAll' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError("Failed to execute 'getAll' on 'URLSearchParams': 1 argument required, but only ".concat(arguments.length," present."));var o=[],s=arguments[0];return s=c.USVString(s,{context:"Failed to execute 'getAll' on 'URLSearchParams': parameter 1",globals:t}),o.push(s),f.tryWrapperForImpl((n=i[m]).getAll.apply(n,o))}},{key:"has",value:function has(r){var n,i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'has' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError("Failed to execute 'has' on 'URLSearchParams': 1 argument required, but only ".concat(arguments.length," present."));var o=[],s=arguments[0];return s=c.USVString(s,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 1",globals:t}),o.push(s),(n=i[m]).has.apply(n,o)}},{key:"set",value:function set(r,n){var i,o=null!=this?this:t;if(!e.is(o))throw new t.TypeError("'set' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<2)throw new t.TypeError("Failed to execute 'set' on 'URLSearchParams': 2 arguments required, but only ".concat(arguments.length," present."));var s=[],l=arguments[0];l=c.USVString(l,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 1",globals:t}),s.push(l);var u=arguments[1];return u=c.USVString(u,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 2",globals:t}),s.push(u),f.tryWrapperForImpl((i=o[m]).set.apply(i,s))}},{key:"sort",value:function sort(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'sort' called on an object that is not a valid instance of URLSearchParams.");return f.tryWrapperForImpl(r[m].sort())}},{key:"toString",value:function toString(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'toString' called on an object that is not a valid instance of URLSearchParams.");return r[m].toString()}},{key:"keys",value:function keys(){if(!e.is(this))throw new t.TypeError("'keys' called on an object that is not a valid instance of URLSearchParams.");return e.createDefaultIterator(t,this,"key")}},{key:"values",value:function values(){if(!e.is(this))throw new t.TypeError("'values' called on an object that is not a valid instance of URLSearchParams.");return e.createDefaultIterator(t,this,"value")}},{key:"entries",value:function entries(){if(!e.is(this))throw new t.TypeError("'entries' called on an object that is not a valid instance of URLSearchParams.");return e.createDefaultIterator(t,this,"key+value")}},{key:"forEach",value:function forEach(r){if(!e.is(this))throw new t.TypeError("'forEach' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError("Failed to execute 'forEach' on 'iterable': 1 argument required, but only 0 present.");r=d.convert(t,r,{context:"Failed to execute 'forEach' on 'iterable': The callback provided as parameter 1"});for(var n=arguments[1],i=Array.from(this[m]),o=0;o<i.length;){var s=i[o].map(f.tryWrapperForImpl),l=_slicedToArray(s,2),u=l[0],h=l[1];r.call(n,h,u,this),i=Array.from(this[m]),o++}}}]),URLSearchParams}();Object.defineProperties(o.prototype,(_defineProperty(n={append:{enumerable:!0},delete:{enumerable:!0},get:{enumerable:!0},getAll:{enumerable:!0},has:{enumerable:!0},set:{enumerable:!0},sort:{enumerable:!0},toString:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0},forEach:{enumerable:!0}},Symbol.toStringTag,{value:"URLSearchParams",configurable:!0}),_defineProperty(n,Symbol.iterator,{value:o.prototype.entries,configurable:!0,writable:!0}),n)),i[v]=o,i["URLSearchParams Iterator"]=Object.create(i["%IteratorPrototype%"],_defineProperty({},Symbol.toStringTag,{configurable:!0,value:"URLSearchParams Iterator"})),f.define(i["URLSearchParams Iterator"],{next:function next(){var e=this&&this[f.iterInternalSymbol];if(!e)throw new t.TypeError("next() called on a value that is not a URLSearchParams iterator object");var r=e.target,n=e.kind,i=e.index,o=Array.from(r[m]);if(i>=o.length)return y(t,{value:void 0,done:!0});var s=o[i];return e.index=i+1,y(t,f.iteratorResult(s.map(f.tryWrapperForImpl),n))}}),Object.defineProperty(t,v,{configurable:!0,writable:!0,value:o})}};var S=require("./URLSearchParams-impl.js"),w=h,P=getAugmentedNamespace(Object.freeze({__proto__:null}));r.URL=w,r.URLSearchParams=P;var U=require("tr46"),R=require("./infra"),L=require("./encoding").utf8DecodeWithoutBOM,O=require("./percent-encoding"),x=O.percentDecodeString,E=O.utf8PercentEncodeCodePoint,I=O.utf8PercentEncodeString,j=O.isC0ControlPercentEncode,A=O.isFragmentPercentEncode,T=O.isQueryPercentEncode,$=O.isSpecialQueryPercentEncode,_=O.isPathPercentEncode,C=O.isUserinfoPercentEncode;function p$1(e){return e.codePointAt(0)}var k={ftp:21,file:null,http:80,https:443,ws:80,wss:443},q=Symbol("failure");function countSymbols(e){return _toConsumableArray(e).length}function at(e,t){var r=e[t];return isNaN(r)?void 0:String.fromCodePoint(r)}function isSingleDot(e){return"."===e||"%2e"===e.toLowerCase()}function isWindowsDriveLetterString(e){return 2===e.length&&R.isASCIIAlpha(e.codePointAt(0))&&(":"===e[1]||"|"===e[1])}function containsForbiddenHostCodePoint(e){return-1!==e.search(/\0|\t|\n|\r| |#|%|\/|:|<|>|\?|@|\[|\\|\]|\^|\|/)}function isSpecialScheme(e){return void 0!==k[e]}function isSpecial(e){return isSpecialScheme(e.scheme)}function isNotSpecial(e){return!isSpecialScheme(e.scheme)}function defaultPort(e){return k[e]}function parseIPv4Number(e){if(""===e)return q;var t=10;if(e.length>=2&&"0"===e.charAt(0)&&"x"===e.charAt(1).toLowerCase()?(e=e.substring(2),t=16):e.length>=2&&"0"===e.charAt(0)&&(e=e.substring(1),t=8),""===e)return 0;var r=/(?:(?![0-7])[\s\S])/;return 10===t&&(r=/(?:(?![0-9])[\s\S])/),16===t&&(r=/(?:(?![0-9A-Fa-f])[\s\S])/),r.test(e)?q:parseInt(e,t)}function parseIPv4(e){var t=e.split(".");if(""===t[t.length-1]&&t.length>1&&t.pop(),t.length>4)return q;var r,n=[],i=_createForOfIteratorHelper(t);try{for(i.s();!(r=i.n()).done;){var o=parseIPv4Number(r.value);if(o===q)return q;n.push(o)}}catch(e){i.e(e)}finally{i.f()}for(var s=0;s<n.length-1;++s)if(n[s]>255)return q;if(n[n.length-1]>=Math.pow(256,5-n.length))return q;for(var l=n.pop(),u=0,h=0,c=n;h<c.length;h++){l+=c[h]*Math.pow(256,3-u),++u}return l}function parseIPv6(e){var t=[0,0,0,0,0,0,0,0],r=0,n=null,i=0;if((e=Array.from(e,(function(e){return e.codePointAt(0)})))[i]===p$1(":")){if(e[i+1]!==p$1(":"))return q;i+=2,n=++r}for(;i<e.length;){if(8===r)return q;if(e[i]!==p$1(":")){for(var o=0,s=0;s<4&&R.isASCIIHex(e[i]);)o=16*o+parseInt(at(e,i),16),++i,++s;if(e[i]===p$1(".")){if(0===s)return q;if(i-=s,r>6)return q;for(var l=0;void 0!==e[i];){var u=null;if(l>0){if(!(e[i]===p$1(".")&&l<4))return q;++i}if(!R.isASCIIDigit(e[i]))return q;for(;R.isASCIIDigit(e[i]);){var h=parseInt(at(e,i));if(null===u)u=h;else{if(0===u)return q;u=10*u+h}if(u>255)return q;++i}t[r]=256*t[r]+u,2!==++l&&4!==l||++r}if(4!==l)return q;break}if(e[i]===p$1(":")){if(void 0===e[++i])return q}else if(void 0!==e[i])return q;t[r]=o,++r}else{if(null!==n)return q;++i,n=++r}}if(null!==n){var c=r-n;for(r=7;0!==r&&c>0;){var f=t[n+c-1];t[n+c-1]=t[r],t[r]=f,--r,--c}}else if(null===n&&8!==r)return q;return t}function parseHost(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("["===e[0])return"]"!==e[e.length-1]?q:parseIPv6(e.substring(1,e.length-1));if(t)return parseOpaqueHost(e);var r=L(x(e)),n=domainToASCII(r);return n===q||containsForbiddenHostCodePoint(n)?q:endsInANumber(n)?parseIPv4(n):n}function endsInANumber(e){var t=e.split(".");if(""===t[t.length-1]){if(1===t.length)return!1;t.pop()}var r=t[t.length-1];return parseIPv4Number(r)!==q||!!/^[0-9]+$/.test(r)}function parseOpaqueHost(e){return function containsForbiddenHostCodePointExcludingPercent(e){return-1!==e.search(/\0|\t|\n|\r| |#|\/|:|<|>|\?|@|\[|\\|\]|\^|\|/)}(e)?q:I(e,j)}function serializeHost(e){return"number"==typeof e?function serializeIPv4(e){for(var t="",r=e,n=1;n<=4;++n)t=String(r%256)+t,4!==n&&(t=".".concat(t)),r=Math.floor(r/256);return t}(e):e instanceof Array?"[".concat(function serializeIPv6(e){for(var t="",r=function findLongestZeroSequence(e){for(var t=null,r=1,n=null,i=0,o=0;o<e.length;++o)0!==e[o]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r?n:t}(e),n=!1,i=0;i<=7;++i)n&&0===e[i]||(n&&(n=!1),r!==i?(t+=e[i].toString(16),7!==i&&(t+=":")):(t+=0===i?"::":":",n=!0));return t}(e),"]"):e}function domainToASCII(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=U.toASCII(e,{checkBidi:!0,checkHyphens:!1,checkJoiners:!0,useSTD3ASCIIRules:t,verifyDNSLength:t});return null===r||""===r?q:r}function shortenPath(e){var t=e.path;0!==t.length&&("file"===e.scheme&&1===t.length&&function isNormalizedWindowsDriveLetter(e){return/^[A-Za-z]:$/.test(e)}(t[0])||t.pop())}function includesCredentials(e){return""!==e.username||""!==e.password}function hasAnOpaquePath(e){return"string"==typeof e.path}function URLStateMachine(e,t,r,n,i){if(this.pointer=0,this.input=e,this.base=t||null,this.encodingOverride=r||"utf-8",this.stateOverride=i,this.url=n,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null};var o=function trimControlChars(e){return e.replace(/^[\0- ]+|[\0- ]+$/g,"")}(this.input);o!==this.input&&(this.parseError=!0),this.input=o}var s=function trimTabAndNewline(e){return e.replace(/\t|\n|\r/g,"")}(this.input);for(s!==this.input&&(this.parseError=!0),this.input=s,this.state=i||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=Array.from(this.input,(function(e){return e.codePointAt(0)}));this.pointer<=this.input.length;++this.pointer){var l=this.input[this.pointer],u=isNaN(l)?void 0:String.fromCodePoint(l),h=this["parse ".concat(this.state)](l,u);if(!h)break;if(h===q){this.failure=!0;break}}}URLStateMachine.prototype["parse scheme start"]=function parseSchemeStart(e,t){if(R.isASCIIAlpha(e))this.buffer+=t.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,q;this.state="no scheme",--this.pointer}return!0},URLStateMachine.prototype["parse scheme"]=function parseScheme(e,t){if(R.isASCIIAlphanumeric(e)||e===p$1("+")||e===p$1("-")||e===p$1("."))this.buffer+=t.toLowerCase();else if(e===p$1(":")){if(this.stateOverride){if(isSpecial(this.url)&&!isSpecialScheme(this.buffer))return!1;if(!isSpecial(this.url)&&isSpecialScheme(this.buffer))return!1;if((includesCredentials(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&""===this.url.host)return!1}if(this.url.scheme=this.buffer,this.stateOverride)return this.url.port===defaultPort(this.url.scheme)&&(this.url.port=null),!1;this.buffer="","file"===this.url.scheme?(this.input[this.pointer+1]===p$1("/")&&this.input[this.pointer+2]===p$1("/")||(this.parseError=!0),this.state="file"):isSpecial(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":isSpecial(this.url)?this.state="special authority slashes":this.input[this.pointer+1]===p$1("/")?(this.state="path or authority",++this.pointer):(this.url.path="",this.state="opaque path")}else{if(this.stateOverride)return this.parseError=!0,q;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},URLStateMachine.prototype["parse no scheme"]=function parseNoScheme(e){return null===this.base||hasAnOpaquePath(this.base)&&e!==p$1("#")?q:(hasAnOpaquePath(this.base)&&e===p$1("#")?(this.url.scheme=this.base.scheme,this.url.path=this.base.path,this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):"file"===this.base.scheme?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},URLStateMachine.prototype["parse special relative or authority"]=function parseSpecialRelativeOrAuthority(e){return e===p$1("/")&&this.input[this.pointer+1]===p$1("/")?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},URLStateMachine.prototype["parse path or authority"]=function parsePathOrAuthority(e){return e===p$1("/")?this.state="authority":(this.state="path",--this.pointer),!0},URLStateMachine.prototype["parse relative"]=function parseRelative(e){return this.url.scheme=this.base.scheme,e===p$1("/")?this.state="relative slash":isSpecial(this.url)&&e===p$1("\\")?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,e===p$1("?")?(this.url.query="",this.state="query"):e===p$1("#")?(this.url.fragment="",this.state="fragment"):isNaN(e)||(this.url.query=null,this.url.path.pop(),this.state="path",--this.pointer)),!0},URLStateMachine.prototype["parse relative slash"]=function parseRelativeSlash(e){return!isSpecial(this.url)||e!==p$1("/")&&e!==p$1("\\")?e===p$1("/")?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(e===p$1("\\")&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},URLStateMachine.prototype["parse special authority slashes"]=function parseSpecialAuthoritySlashes(e){return e===p$1("/")&&this.input[this.pointer+1]===p$1("/")?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},URLStateMachine.prototype["parse special authority ignore slashes"]=function parseSpecialAuthorityIgnoreSlashes(e){return e!==p$1("/")&&e!==p$1("\\")?(this.state="authority",--this.pointer):this.parseError=!0,!0},URLStateMachine.prototype["parse authority"]=function parseAuthority(e,t){if(e===p$1("@")){this.parseError=!0,this.atFlag&&(this.buffer="%40".concat(this.buffer)),this.atFlag=!0;for(var r=countSymbols(this.buffer),n=0;n<r;++n){var i=this.buffer.codePointAt(n);if(i!==p$1(":")||this.passwordTokenSeenFlag){var o=E(i,C);this.passwordTokenSeenFlag?this.url.password+=o:this.url.username+=o}else this.passwordTokenSeenFlag=!0}this.buffer=""}else if(isNaN(e)||e===p$1("/")||e===p$1("?")||e===p$1("#")||isSpecial(this.url)&&e===p$1("\\")){if(this.atFlag&&""===this.buffer)return this.parseError=!0,q;this.pointer-=countSymbols(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=t;return!0},URLStateMachine.prototype["parse hostname"]=URLStateMachine.prototype["parse host"]=function parseHostName(e,t){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(e!==p$1(":")||this.arrFlag)if(isNaN(e)||e===p$1("/")||e===p$1("?")||e===p$1("#")||isSpecial(this.url)&&e===p$1("\\")){if(--this.pointer,isSpecial(this.url)&&""===this.buffer)return this.parseError=!0,q;if(this.stateOverride&&""===this.buffer&&(includesCredentials(this.url)||null!==this.url.port))return this.parseError=!0,!1;var r=parseHost(this.buffer,isNotSpecial(this.url));if(r===q)return q;if(this.url.host=r,this.buffer="",this.state="path start",this.stateOverride)return!1}else e===p$1("[")?this.arrFlag=!0:e===p$1("]")&&(this.arrFlag=!1),this.buffer+=t;else{if(""===this.buffer)return this.parseError=!0,q;if("hostname"===this.stateOverride)return!1;var n=parseHost(this.buffer,isNotSpecial(this.url));if(n===q)return q;this.url.host=n,this.buffer="",this.state="port"}return!0},URLStateMachine.prototype["parse port"]=function parsePort(e,t){if(R.isASCIIDigit(e))this.buffer+=t;else{if(!(isNaN(e)||e===p$1("/")||e===p$1("?")||e===p$1("#")||isSpecial(this.url)&&e===p$1("\\")||this.stateOverride))return this.parseError=!0,q;if(""!==this.buffer){var r=parseInt(this.buffer);if(r>Math.pow(2,16)-1)return this.parseError=!0,q;this.url.port=r===defaultPort(this.url.scheme)?null:r,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}return!0};var N=new Set([p$1("/"),p$1("\\"),p$1("?"),p$1("#")]);function startsWithWindowsDriveLetter(e,t){var r=e.length-t;return r>=2&&function isWindowsDriveLetterCodePoints(e,t){return R.isASCIIAlpha(e)&&(t===p$1(":")||t===p$1("|"))}(e[t],e[t+1])&&(2===r||N.has(e[t+2]))}function serializePath(e){if(hasAnOpaquePath(e))return e.path;var t,r="",n=_createForOfIteratorHelper(e.path);try{for(n.s();!(t=n.n()).done;){var i=t.value;r+="/".concat(i)}}catch(e){n.e(e)}finally{n.f()}return r}URLStateMachine.prototype["parse file"]=function parseFile(e){return this.url.scheme="file",this.url.host="",e===p$1("/")||e===p$1("\\")?(e===p$1("\\")&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,e===p$1("?")?(this.url.query="",this.state="query"):e===p$1("#")?(this.url.fragment="",this.state="fragment"):isNaN(e)||(this.url.query=null,startsWithWindowsDriveLetter(this.input,this.pointer)?(this.parseError=!0,this.url.path=[]):shortenPath(this.url),this.state="path",--this.pointer)):(this.state="path",--this.pointer),!0},URLStateMachine.prototype["parse file slash"]=function parseFileSlash(e){return e===p$1("/")||e===p$1("\\")?(e===p$1("\\")&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(!startsWithWindowsDriveLetter(this.input,this.pointer)&&function isNormalizedWindowsDriveLetterString(e){return 2===e.length&&R.isASCIIAlpha(e.codePointAt(0))&&":"===e[1]}(this.base.path[0])&&this.url.path.push(this.base.path[0]),this.url.host=this.base.host),this.state="path",--this.pointer),!0},URLStateMachine.prototype["parse file host"]=function parseFileHost(e,t){if(isNaN(e)||e===p$1("/")||e===p$1("\\")||e===p$1("?")||e===p$1("#"))if(--this.pointer,!this.stateOverride&&isWindowsDriveLetterString(this.buffer))this.parseError=!0,this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{var r=parseHost(this.buffer,isNotSpecial(this.url));if(r===q)return q;if("localhost"===r&&(r=""),this.url.host=r,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=t;return!0},URLStateMachine.prototype["parse path start"]=function parsePathStart(e){return isSpecial(this.url)?(e===p$1("\\")&&(this.parseError=!0),this.state="path",e!==p$1("/")&&e!==p$1("\\")&&--this.pointer):this.stateOverride||e!==p$1("?")?this.stateOverride||e!==p$1("#")?void 0!==e?(this.state="path",e!==p$1("/")&&--this.pointer):this.stateOverride&&null===this.url.host&&this.url.path.push(""):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},URLStateMachine.prototype["parse path"]=function parsePath(e){return isNaN(e)||e===p$1("/")||isSpecial(this.url)&&e===p$1("\\")||!this.stateOverride&&(e===p$1("?")||e===p$1("#"))?(isSpecial(this.url)&&e===p$1("\\")&&(this.parseError=!0),!function isDoubleDot(e){return".."===(e=e.toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e}(this.buffer)?!isSingleDot(this.buffer)||e===p$1("/")||isSpecial(this.url)&&e===p$1("\\")?isSingleDot(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&isWindowsDriveLetterString(this.buffer)&&(this.buffer="".concat(this.buffer[0],":")),this.url.path.push(this.buffer)):this.url.path.push(""):(shortenPath(this.url),e===p$1("/")||isSpecial(this.url)&&e===p$1("\\")||this.url.path.push("")),this.buffer="",e===p$1("?")&&(this.url.query="",this.state="query"),e===p$1("#")&&(this.url.fragment="",this.state="fragment")):(e!==p$1("%")||R.isASCIIHex(this.input[this.pointer+1])&&R.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=E(e,_)),!0},URLStateMachine.prototype["parse opaque path"]=function parseOpaquePath(e){return e===p$1("?")?(this.url.query="",this.state="query"):e===p$1("#")?(this.url.fragment="",this.state="fragment"):(isNaN(e)||e===p$1("%")||(this.parseError=!0),e!==p$1("%")||R.isASCIIHex(this.input[this.pointer+1])&&R.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),isNaN(e)||(this.url.path+=E(e,j))),!0},URLStateMachine.prototype["parse query"]=function parseQuery(e,t){if(isSpecial(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8"),!this.stateOverride&&e===p$1("#")||isNaN(e)){var r=isSpecial(this.url)?$:T;this.url.query+=I(this.buffer,r),this.buffer="",e===p$1("#")&&(this.url.fragment="",this.state="fragment")}else isNaN(e)||(e!==p$1("%")||R.isASCIIHex(this.input[this.pointer+1])&&R.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=t);return!0},URLStateMachine.prototype["parse fragment"]=function parseFragment(e){return isNaN(e)||(e!==p$1("%")||R.isASCIIHex(this.input[this.pointer+1])&&R.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=E(e,A)),!0},module.exports.serializeURL=function serializeURL(e,t){var r="".concat(e.scheme,":");return null!==e.host&&(r+="//",""===e.username&&""===e.password||(r+=e.username,""!==e.password&&(r+=":".concat(e.password)),r+="@"),r+=serializeHost(e.host),null!==e.port&&(r+=":".concat(e.port))),null===e.host&&!hasAnOpaquePath(e)&&e.path.length>1&&""===e.path[0]&&(r+="/."),r+=serializePath(e),null!==e.query&&(r+="?".concat(e.query)),t||null===e.fragment||(r+="#".concat(e.fragment)),r},module.exports.serializePath=serializePath,module.exports.serializeURLOrigin=function(e){switch(e.scheme){case"blob":try{return module.exports.serializeURLOrigin(module.exports.parseURL(serializePath(e)))}catch(e){return"null"}case"ftp":case"http":case"https":case"ws":case"wss":return function serializeOrigin(e){var t="".concat(e.scheme,"://");return t+=serializeHost(e.host),null!==e.port&&(t+=":".concat(e.port)),t}({scheme:e.scheme,host:e.host,port:e.port});default:return"null"}},module.exports.basicURLParse=function(e,t){void 0===t&&(t={});var r=new URLStateMachine(e,t.baseURL,t.encodingOverride,t.url,t.stateOverride);return r.failure?null:r.url},module.exports.setTheUsername=function(e,t){e.username=I(t,C)},module.exports.setThePassword=function(e,t){e.password=I(t,C)},module.exports.serializeHost=serializeHost,module.exports.cannotHaveAUsernamePasswordPort=function cannotHaveAUsernamePasswordPort(e){return null===e.host||""===e.host||hasAnOpaquePath(e)||"file"===e.scheme},module.exports.hasAnOpaquePath=hasAnOpaquePath,module.exports.serializeInteger=function(e){return String(e)},module.exports.parseURL=function(e,t){return void 0===t&&(t={}),module.exports.basicURLParse(e,{baseURL:t.baseURL,encodingOverride:t.encodingOverride})};var H=getAugmentedNamespace(Object.freeze({__proto__:null})),W=require("./infra").isASCIIHex,D=require("./encoding").utf8Encode;function p(e){return e.codePointAt(0)}function percentDecodeBytes(e){for(var t=new Uint8Array(e.byteLength),r=0,n=0;n<e.byteLength;++n){var i=e[n];if(37!==i)t[r++]=i;else if(37!==i||W(e[n+1])&&W(e[n+2])){var o=parseInt(String.fromCodePoint(e[n+1],e[n+2]),16);t[r++]=o,n+=2}else t[r++]=i}return t.slice(0,r)}function isC0ControlPercentEncode(e){return e<=31||e>126}var M=new Set([p(" "),p('"'),p("<"),p(">"),p("`")]);var z=new Set([p(" "),p('"'),p("#"),p("<"),p(">")]);function isQueryPercentEncode(e){return isC0ControlPercentEncode(e)||z.has(e)}var V=new Set([p("?"),p("`"),p("{"),p("}")]);function isPathPercentEncode(e){return isQueryPercentEncode(e)||V.has(e)}var B=new Set([p("/"),p(":"),p(";"),p("="),p("@"),p("["),p("\\"),p("]"),p("^"),p("|")]);function isUserinfoPercentEncode(e){return isPathPercentEncode(e)||B.has(e)}var G=new Set([p("$"),p("%"),p("&"),p("+"),p(",")]);var Q=new Set([p("!"),p("'"),p("("),p(")"),p("~")]);function utf8PercentEncodeCodePointInternal(e,t){var r,n,i="",o=_createForOfIteratorHelper(D(e));try{for(o.s();!(r=o.n()).done;){var s=r.value;t(s)?i+=(n=void 0,1===(n=s.toString(16).toUpperCase()).length&&(n="0".concat(n)),"%".concat(n)):i+=String.fromCharCode(s)}}catch(e){o.e(e)}finally{o.f()}return i}module.exports={isC0ControlPercentEncode:isC0ControlPercentEncode,isFragmentPercentEncode:function isFragmentPercentEncode(e){return isC0ControlPercentEncode(e)||M.has(e)},isQueryPercentEncode:isQueryPercentEncode,isSpecialQueryPercentEncode:function isSpecialQueryPercentEncode(e){return isQueryPercentEncode(e)||e===p("'")},isPathPercentEncode:isPathPercentEncode,isUserinfoPercentEncode:isUserinfoPercentEncode,isURLEncodedPercentEncode:function isURLEncodedPercentEncode(e){return function isComponentPercentEncode(e){return isUserinfoPercentEncode(e)||G.has(e)}(e)||Q.has(e)},percentDecodeString:function percentDecodeString(e){return percentDecodeBytes(D(e))},percentDecodeBytes:percentDecodeBytes,utf8PercentEncodeString:function utf8PercentEncodeString(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i="",o=_createForOfIteratorHelper(e);try{for(o.s();!(r=o.n()).done;){var s=r.value;i+=n&&" "===s?"+":utf8PercentEncodeCodePointInternal(s,t)}}catch(e){o.e(e)}finally{o.f()}return i},utf8PercentEncodeCodePoint:function utf8PercentEncodeCodePoint(e,t){return utf8PercentEncodeCodePointInternal(String.fromCodePoint(e),t)}};var J=getAugmentedNamespace(Object.freeze({__proto__:null})),X=r,K=X.URL,Z=X.URLSearchParams,Y=H,ee=J,te={Array:Array,Object:Object,Promise:Promise,String:String,TypeError:TypeError};K.install(te,["Window"]),Z.install(te,["Window"]),t.URL=te.URL,t.URLSearchParams=te.URLSearchParams,t.parseURL=Y.parseURL,t.basicURLParse=Y.basicURLParse,t.serializeURL=Y.serializeURL,t.serializePath=Y.serializePath,t.serializeHost=Y.serializeHost,t.serializeInteger=Y.serializeInteger,t.serializeURLOrigin=Y.serializeURLOrigin,t.setTheUsername=Y.setTheUsername,t.setThePassword=Y.setThePassword,t.cannotHaveAUsernamePasswordPort=Y.cannotHaveAUsernamePasswordPort,t.hasAnOpaquePath=Y.hasAnOpaquePath,t.percentDecodeString=ee.percentDecodeString,t.percentDecodeBytes=ee.percentDecodeBytes;var re=Function.prototype.call.bind(Object.prototype.hasOwnProperty);var ne=Symbol("wrapper"),ie=Symbol("impl"),ae=Symbol("SameObject caches"),oe=Symbol.for("[webidl2js] constructor registry"),se=Object.getPrototypeOf(Object.getPrototypeOf(_wrapAsyncGenerator(regeneratorRuntime.mark((function _callee(){return regeneratorRuntime.wrap((function _callee$(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),_callee)})))).prototype);function initCtorRegistry(e){if(re(e,oe))return e[oe];var t=Object.create(null);t["%Object.prototype%"]=e.Object.prototype,t["%IteratorPrototype%"]=Object.getPrototypeOf(Object.getPrototypeOf((new e.Array)[Symbol.iterator]()));try{t["%AsyncIteratorPrototype%"]=Object.getPrototypeOf(Object.getPrototypeOf(e.eval("(async function* () {})").prototype))}catch(e){t["%AsyncIteratorPrototype%"]=se}return e[oe]=t,t}function wrapperForImpl(e){return e?e[ne]:null}function implForWrapper$1(e){return e?e[ie]:null}var le=Symbol("internal");var ue=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get;var pe=Symbol("supports property index"),he=Symbol("supported property indices"),ce=Symbol("supports property name"),fe=Symbol("supported property names"),de=Symbol("indexed property get"),ye=Symbol("indexed property set new"),me=Symbol("indexed property set existing"),be=Symbol("named property get"),ve=Symbol("named property set new"),ge=Symbol("named property set existing"),Se=Symbol("named property delete"),we=Symbol("async iterator get the next iteration result"),Pe=Symbol("async iterator return steps"),Ue=Symbol("async iterator initialization steps"),Re=Symbol("async iterator end of iteration");module.exports=e={isObject:function isObject(e){return"object"===_typeof(e)&&null!==e||"function"==typeof e},hasOwn:re,define:function define(e,t){var r,n=_createForOfIteratorHelper(Reflect.ownKeys(t));try{for(n.s();!(r=n.n()).done;){var i=r.value,o=Reflect.getOwnPropertyDescriptor(t,i);if(o&&!Reflect.defineProperty(e,i,o))throw new TypeError("Cannot redefine property: ".concat(String(i)))}}catch(e){n.e(e)}finally{n.f()}},newObjectInRealm:function newObjectInRealm(e,t){var r=initCtorRegistry(e);return Object.defineProperties(Object.create(r["%Object.prototype%"]),Object.getOwnPropertyDescriptors(t))},wrapperSymbol:ne,implSymbol:ie,getSameObject:function getSameObject(e,t,r){return e[ae]||(e[ae]=Object.create(null)),t in e[ae]||(e[ae][t]=r()),e[ae][t]},ctorRegistrySymbol:oe,initCtorRegistry:initCtorRegistry,wrapperForImpl:wrapperForImpl,implForWrapper:implForWrapper$1,tryWrapperForImpl:function tryWrapperForImpl(e){var t=wrapperForImpl(e);return t||e},tryImplForWrapper:function tryImplForWrapper(e){var t=implForWrapper$1(e);return t||e},iterInternalSymbol:le,isArrayBuffer:function isArrayBuffer(e){try{return ue.call(e),!0}catch(e){return!1}},isArrayIndexPropName:function isArrayIndexPropName(e){if("string"!=typeof e)return!1;var t=e>>>0;return t!==Math.pow(2,32)-1&&e==="".concat(t)},supportsPropertyIndex:pe,supportedPropertyIndices:he,supportsPropertyName:ce,supportedPropertyNames:fe,indexedGet:de,indexedSetNew:ye,indexedSetExisting:me,namedGet:be,namedSetNew:ve,namedSetExisting:ge,namedDelete:Se,asyncIteratorNext:we,asyncIteratorReturn:Pe,asyncIteratorInit:Ue,asyncIteratorEOI:Re,iteratorResult:function iteratorResult(e,t){var r,n=_slicedToArray(e,2),i=n[0],o=n[1];switch(t){case"key":r=i;break;case"value":r=o;break;case"key+value":r=[i,o]}return{value:r,done:!1}}};var Le=t.serializeURLOrigin,Oe=t.parseURL,xe={},Ee=void 0;e.createObjectURL=function createObjectURL(e){var t="blob:"+Le(Oe(location.href))+"/"+function generateUUID(){var e=Date.now()+("undefined"!=typeof performance&&"function"==typeof performance.now?performance.now():0);return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var r=Math.trunc((e+16*Math.random())%16);return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)}))}();return xe[t]=e,t},e.revokeObjectURL=function revokeObjectURL(e){delete xe[e]},e.xmlHttpRequestOverrideMimeType=function xmlHttpRequestOverrideMimeType(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.polyfillDataURLs,r=XMLHttpRequest.prototype.open,n=XMLHttpRequest.prototype.overrideMimeType;return function(e){"text/plain; charset=x-user-defined"===e&&(this.open=function(e,n,i){if(n.startsWith("blob:")){var o=xe[n];if(!o)return void(this.send=function(){throw new DOMException("Failed to execute 'send' on 'XMLHttpRequest': Failed to "+"load '".concat(n,"'"),"NetworkError")});var s="text/plain",l=Ee(o)._buffer.toString("binary");if(t)return this.status=200,this.send=function(){},this.responseType=s,void(this.responseText=l);n="data:text/plain,"+encodeURIComponent(l)}return r.call(this,e,n,i)});for(var i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];return n&&n.call.apply(n,[this,e].concat(o))}},Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).createObjectURL={})}(this,(function(e){"use strict";function getAugmentedNamespace(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function a(){if(this instanceof a){var e=[null];e.push.apply(e,arguments);var r=Function.bind.apply(t,e);return new r}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var t={},r={};function _AsyncGenerator(e){var t,r;function resume(t,r){try{var n=e[t](r),i=n.value,o=i instanceof _OverloadYield;Promise.resolve(o?i.v:i).then((function(r){if(o){var s="return"===t?"return":"next";if(!i.k||r.done)return resume(s,r);r=e[s](r).value}settle(n.done?"return":"normal",r)}),(function(e){resume("throw",e)}))}catch(e){settle("throw",e)}}function settle(e,n){switch(e){case"return":t.resolve({value:n,done:!0});break;case"throw":t.reject(n);break;default:t.resolve({value:n,done:!1})}(t=t.next)?resume(t.key,t.arg):r=null}this._invoke=function(e,n){return new Promise((function(i,o){var s={key:e,arg:n,resolve:i,reject:o,next:null};r?r=r.next=s:(t=r=s,resume(e,n))}))},"function"!=typeof e.return&&(this.return=void 0)}function _OverloadYield(e,t){this.v=e,this.k=t}function _regeneratorRuntime(){_regeneratorRuntime=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function define(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{define({},"")}catch(e){define=function(e,t,r){return e[t]=r}}function wrap(e,t,r,i){var o=t&&t.prototype instanceof Generator?t:Generator,s=Object.create(o.prototype),l=new Context(i||[]);return n(s,"_invoke",{value:makeInvokeMethod(e,r,l)}),s}function tryCatch(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}e.wrap=wrap;var u={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var c={};define(c,o,(function(){return this}));var h=Object.getPrototypeOf,f=h&&h(h(values([])));f&&f!==t&&r.call(f,o)&&(c=f);var d=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function defineIteratorMethods(e){["next","throw","return"].forEach((function(t){define(e,t,(function(e){return this._invoke(t,e)}))}))}function AsyncIterator(e,t){function invoke(n,i,o,s){var l=tryCatch(e[n],e,i);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==typeof c&&r.call(c,"__await")?t.resolve(c.__await).then((function(e){invoke("next",e,o,s)}),(function(e){invoke("throw",e,o,s)})):t.resolve(c).then((function(e){u.value=e,o(u)}),(function(e){return invoke("throw",e,o,s)}))}s(l.arg)}var i;n(this,"_invoke",{value:function(e,r){function callInvokeWithMethodAndArg(){return new t((function(t,n){invoke(e,r,t,n)}))}return i=i?i.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg()}})}function makeInvokeMethod(e,t,r){var n="suspendedStart";return function(i,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===i)throw o;return doneResult()}for(r.method=i,r.arg=o;;){var s=r.delegate;if(s){var l=maybeInvokeDelegate(s,r);if(l){if(l===u)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=tryCatch(e,t,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function maybeInvokeDelegate(e,t){var r=t.method,n=e.iterator[r];if(void 0===n)return t.delegate=null,"throw"===r&&e.iterator.return&&(t.method="return",t.arg=void 0,maybeInvokeDelegate(e,t),"throw"===t.method)||"return"!==r&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),u;var i=tryCatch(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,u;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function pushTryEntry(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function resetTryEntry(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function Context(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(pushTryEntry,this),this.reset(!0)}function values(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function next(){for(;++n<e.length;)if(r.call(e,n))return next.value=e[n],next.done=!1,next;return next.value=void 0,next.done=!0,next};return i.next=i}}return{next:doneResult}}function doneResult(){return{value:void 0,done:!0}}return GeneratorFunction.prototype=GeneratorFunctionPrototype,n(d,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),n(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===GeneratorFunction||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,define(e,l,"GeneratorFunction")),e.prototype=Object.create(d),e},e.awrap=function(e){return{__await:e}},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,s,(function(){return this})),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,i,o){void 0===o&&(o=Promise);var s=new AsyncIterator(wrap(t,r,n,i),o);return e.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},defineIteratorMethods(d),define(d,l,"Generator"),define(d,o,(function(){return this})),define(d,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function next(){for(;r.length;){var e=r.pop();if(e in t)return next.value=e,next.done=!1,next}return next.done=!0,next}},e.values=values,Context.prototype={constructor:Context,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(resetTryEntry),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function handle(r,n){return o.type="throw",o.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var s=r.call(i,"catchLoc"),l=r.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;resetTryEntry(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:values(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),u}},e}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _wrapAsyncGenerator(e){return function(){return new _AsyncGenerator(e.apply(this,arguments))}}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _slicedToArray(e,t){return function _arrayWithHoles(e){if(Array.isArray(e))return e}(e)||function _iterableToArrayLimit(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,s,l=[],u=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=o.call(r)).done)&&(l.push(n.value),l.length!==t);u=!0);}catch(e){c=!0,i=e}finally{try{if(!u&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return l}}(e,t)||_unsupportedIterableToArray(e,t)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||_unsupportedIterableToArray(e)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,F=function(){};return{s:F,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:F}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw i}}}}function _toPropertyKey(e){var t=function _toPrimitive(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}_AsyncGenerator.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},_AsyncGenerator.prototype.next=function(e){return this._invoke("next",e)},_AsyncGenerator.prototype.throw=function(e){return this._invoke("throw",e)},_AsyncGenerator.prototype.return=function(e){return this._invoke("return",e)};var n=require("webidl-conversions"),i=require("./utils.js"),o=i.implSymbol,s=i.ctorRegistrySymbol;function makeWrapper$1(e,t){var r;return void 0!==t&&(r=t.prototype),i.isObject(r)||(r=e[s].URL.prototype),Object.create(r)}e.is=function(e){return i.isObject(e)&&i.hasOwn(e,o)&&e[o]instanceof u.implementation},e.isImpl=function(e){return i.isObject(e)&&e instanceof u.implementation},e.convert=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.context,s=void 0===o?"The provided value":o;if(e.is(r))return i.implForWrapper(r);throw new t.TypeError("".concat(s," is not of type 'URL'."))},e.create=function(t,r,n){var i=makeWrapper$1(t);return e.setup(i,t,r,n)},e.createImpl=function(t,r,n){var o=e.create(t,r,n);return i.implForWrapper(o)},e._internalSetup=function(e,t){},e.setup=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return s.wrapper=t,e._internalSetup(t,r),Object.defineProperty(t,o,{value:new u.implementation(r,n,s),configurable:!0}),t[o][i.wrapperSymbol]=t,u.init&&u.init(t[o]),t},e.new=function(t,r){var n=makeWrapper$1(t,r);return e._internalSetup(n,t),Object.defineProperty(n,o,{value:Object.create(u.implementation.prototype),configurable:!0}),n[o][i.wrapperSymbol]=n,u.init&&u.init(n[o]),n[o]};var l=new Set(["Window","Worker"]);e.install=function(t,r){if(r.some((function(e){return l.has(e)}))){var s=i.initCtorRegistry(t),u=function(){function URL(r){if(_classCallCheck(this,URL),arguments.length<1)throw new t.TypeError("Failed to construct 'URL': 1 argument required, but only ".concat(arguments.length," present."));var i=[],o=arguments[0];o=n.USVString(o,{context:"Failed to construct 'URL': parameter 1",globals:t}),i.push(o);var s=arguments[1];return void 0!==s&&(s=n.USVString(s,{context:"Failed to construct 'URL': parameter 2",globals:t})),i.push(s),e.setup(Object.create((this instanceof URL?this.constructor:void 0).prototype),t,i)}return _createClass(URL,[{key:"toJSON",value:function toJSON(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'toJSON' called on an object that is not a valid instance of URL.");return r[o].toJSON()}},{key:"href",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get href' called on an object that is not a valid instance of URL.");return r[o].href},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set href' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'href' property on 'URL': The provided value",globals:t}),i[o].href=r}},{key:"toString",value:function toString(){if(!e.is(this))throw new t.TypeError("'toString' called on an object that is not a valid instance of URL.");return this[o].href}},{key:"origin",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get origin' called on an object that is not a valid instance of URL.");return r[o].origin}},{key:"protocol",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get protocol' called on an object that is not a valid instance of URL.");return r[o].protocol},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set protocol' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'protocol' property on 'URL': The provided value",globals:t}),i[o].protocol=r}},{key:"username",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get username' called on an object that is not a valid instance of URL.");return r[o].username},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set username' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'username' property on 'URL': The provided value",globals:t}),i[o].username=r}},{key:"password",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get password' called on an object that is not a valid instance of URL.");return r[o].password},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set password' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'password' property on 'URL': The provided value",globals:t}),i[o].password=r}},{key:"host",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get host' called on an object that is not a valid instance of URL.");return r[o].host},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set host' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'host' property on 'URL': The provided value",globals:t}),i[o].host=r}},{key:"hostname",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get hostname' called on an object that is not a valid instance of URL.");return r[o].hostname},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set hostname' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'hostname' property on 'URL': The provided value",globals:t}),i[o].hostname=r}},{key:"port",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get port' called on an object that is not a valid instance of URL.");return r[o].port},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set port' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'port' property on 'URL': The provided value",globals:t}),i[o].port=r}},{key:"pathname",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get pathname' called on an object that is not a valid instance of URL.");return r[o].pathname},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set pathname' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'pathname' property on 'URL': The provided value",globals:t}),i[o].pathname=r}},{key:"search",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get search' called on an object that is not a valid instance of URL.");return r[o].search},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set search' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'search' property on 'URL': The provided value",globals:t}),i[o].search=r}},{key:"searchParams",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get searchParams' called on an object that is not a valid instance of URL.");return i.getSameObject(this,"searchParams",(function(){return i.tryWrapperForImpl(r[o].searchParams)}))}},{key:"hash",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get hash' called on an object that is not a valid instance of URL.");return r[o].hash},set:function set(r){var i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'set hash' called on an object that is not a valid instance of URL.");r=n.USVString(r,{context:"Failed to set the 'hash' property on 'URL': The provided value",globals:t}),i[o].hash=r}}]),URL}();Object.defineProperties(u.prototype,_defineProperty({toJSON:{enumerable:!0},href:{enumerable:!0},toString:{enumerable:!0},origin:{enumerable:!0},protocol:{enumerable:!0},username:{enumerable:!0},password:{enumerable:!0},host:{enumerable:!0},hostname:{enumerable:!0},port:{enumerable:!0},pathname:{enumerable:!0},search:{enumerable:!0},searchParams:{enumerable:!0},hash:{enumerable:!0}},Symbol.toStringTag,{value:"URL",configurable:!0})),s.URL=u,Object.defineProperty(t,"URL",{configurable:!0,writable:!0,value:u}),r.includes("Window")&&Object.defineProperty(t,"webkitURL",{configurable:!0,writable:!0,value:u})}};var u=require("./URL-impl.js"),c=getAugmentedNamespace(Object.freeze({__proto__:null})),h=require("webidl-conversions"),f=require("./utils.js"),d=require("./Function.js"),y=f.newObjectInRealm,v=f.implSymbol,m=f.ctorRegistrySymbol,b="URLSearchParams";function makeWrapper(e,t){var r;return void 0!==t&&(r=t.prototype),f.isObject(r)||(r=e[m].URLSearchParams.prototype),Object.create(r)}e.is=function(e){return f.isObject(e)&&f.hasOwn(e,v)&&e[v]instanceof S.implementation},e.isImpl=function(e){return f.isObject(e)&&e instanceof S.implementation},e.convert=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.context,o=void 0===i?"The provided value":i;if(e.is(r))return f.implForWrapper(r);throw new t.TypeError("".concat(o," is not of type 'URLSearchParams'."))},e.createDefaultIterator=function(e,t,r){var n=e[m]["URLSearchParams Iterator"],i=Object.create(n);return Object.defineProperty(i,f.iterInternalSymbol,{value:{target:t,kind:r,index:0},configurable:!0}),i},e.create=function(t,r,n){var i=makeWrapper(t);return e.setup(i,t,r,n)},e.createImpl=function(t,r,n){var i=e.create(t,r,n);return f.implForWrapper(i)},e._internalSetup=function(e,t){},e.setup=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return i.wrapper=t,e._internalSetup(t,r),Object.defineProperty(t,v,{value:new S.implementation(r,n,i),configurable:!0}),t[v][f.wrapperSymbol]=t,S.init&&S.init(t[v]),t},e.new=function(t,r){var n=makeWrapper(t,r);return e._internalSetup(n,t),Object.defineProperty(n,v,{value:Object.create(S.implementation.prototype),configurable:!0}),n[v][f.wrapperSymbol]=n,S.init&&S.init(n[v]),n[v]};var g=new Set(["Window","Worker"]);e.install=function(t,r){var n;if(r.some((function(e){return g.has(e)}))){var i=f.initCtorRegistry(t),o=function(){function URLSearchParams(){_classCallCheck(this,URLSearchParams);var r=[],n=arguments[0];if(void 0!==n)if(f.isObject(n))if(void 0!==n[Symbol.iterator]){if(!f.isObject(n))throw new t.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence is not an iterable object.");var i,o=[],s=n,l=_createForOfIteratorHelper(s);try{for(l.s();!(i=l.n()).done;){var u=i.value;if(!f.isObject(u))throw new t.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element is not an iterable object.");var c,d=[],y=u,v=_createForOfIteratorHelper(y);try{for(v.s();!(c=v.n()).done;){var m=c.value;m=h.USVString(m,{context:"Failed to construct 'URLSearchParams': parameter 1 sequence's element's element",globals:t}),d.push(m)}}catch(e){v.e(e)}finally{v.f()}u=d,o.push(u)}}catch(e){l.e(e)}finally{l.f()}n=o}else{if(!f.isObject(n))throw new t.TypeError("Failed to construct 'URLSearchParams': parameter 1 record is not an object.");var b,g=Object.create(null),S=_createForOfIteratorHelper(Reflect.ownKeys(n));try{for(S.s();!(b=S.n()).done;){var w=b.value,P=Object.getOwnPropertyDescriptor(n,w);if(P&&P.enumerable){var L=w;L=h.USVString(L,{context:"Failed to construct 'URLSearchParams': parameter 1 record's key",globals:t});var U=n[w];U=h.USVString(U,{context:"Failed to construct 'URLSearchParams': parameter 1 record's value",globals:t}),g[L]=U}}}catch(e){S.e(e)}finally{S.f()}n=g}else n=h.USVString(n,{context:"Failed to construct 'URLSearchParams': parameter 1",globals:t});else n="";return r.push(n),e.setup(Object.create((this instanceof URLSearchParams?this.constructor:void 0).prototype),t,r)}return _createClass(URLSearchParams,[{key:"append",value:function append(r,n){var i,o=null!=this?this:t;if(!e.is(o))throw new t.TypeError("'append' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<2)throw new t.TypeError("Failed to execute 'append' on 'URLSearchParams': 2 arguments required, but only ".concat(arguments.length," present."));var s=[],l=arguments[0];l=h.USVString(l,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 1",globals:t}),s.push(l);var u=arguments[1];return u=h.USVString(u,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 2",globals:t}),s.push(u),f.tryWrapperForImpl((i=o[v]).append.apply(i,s))}},{key:"delete",value:function _delete(r){var n,i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'delete' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError("Failed to execute 'delete' on 'URLSearchParams': 1 argument required, but only ".concat(arguments.length," present."));var o=[],s=arguments[0];return s=h.USVString(s,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 1",globals:t}),o.push(s),f.tryWrapperForImpl((n=i[v]).delete.apply(n,o))}},{key:"get",value:function get(r){var n,i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'get' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError("Failed to execute 'get' on 'URLSearchParams': 1 argument required, but only ".concat(arguments.length," present."));var o=[],s=arguments[0];return s=h.USVString(s,{context:"Failed to execute 'get' on 'URLSearchParams': parameter 1",globals:t}),o.push(s),(n=i[v]).get.apply(n,o)}},{key:"getAll",value:function getAll(r){var n,i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'getAll' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError("Failed to execute 'getAll' on 'URLSearchParams': 1 argument required, but only ".concat(arguments.length," present."));var o=[],s=arguments[0];return s=h.USVString(s,{context:"Failed to execute 'getAll' on 'URLSearchParams': parameter 1",globals:t}),o.push(s),f.tryWrapperForImpl((n=i[v]).getAll.apply(n,o))}},{key:"has",value:function has(r){var n,i=null!=this?this:t;if(!e.is(i))throw new t.TypeError("'has' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError("Failed to execute 'has' on 'URLSearchParams': 1 argument required, but only ".concat(arguments.length," present."));var o=[],s=arguments[0];return s=h.USVString(s,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 1",globals:t}),o.push(s),(n=i[v]).has.apply(n,o)}},{key:"set",value:function set(r,n){var i,o=null!=this?this:t;if(!e.is(o))throw new t.TypeError("'set' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<2)throw new t.TypeError("Failed to execute 'set' on 'URLSearchParams': 2 arguments required, but only ".concat(arguments.length," present."));var s=[],l=arguments[0];l=h.USVString(l,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 1",globals:t}),s.push(l);var u=arguments[1];return u=h.USVString(u,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 2",globals:t}),s.push(u),f.tryWrapperForImpl((i=o[v]).set.apply(i,s))}},{key:"sort",value:function sort(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'sort' called on an object that is not a valid instance of URLSearchParams.");return f.tryWrapperForImpl(r[v].sort())}},{key:"toString",value:function toString(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'toString' called on an object that is not a valid instance of URLSearchParams.");return r[v].toString()}},{key:"keys",value:function keys(){if(!e.is(this))throw new t.TypeError("'keys' called on an object that is not a valid instance of URLSearchParams.");return e.createDefaultIterator(t,this,"key")}},{key:"values",value:function values(){if(!e.is(this))throw new t.TypeError("'values' called on an object that is not a valid instance of URLSearchParams.");return e.createDefaultIterator(t,this,"value")}},{key:"entries",value:function entries(){if(!e.is(this))throw new t.TypeError("'entries' called on an object that is not a valid instance of URLSearchParams.");return e.createDefaultIterator(t,this,"key+value")}},{key:"forEach",value:function forEach(r){if(!e.is(this))throw new t.TypeError("'forEach' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new t.TypeError("Failed to execute 'forEach' on 'iterable': 1 argument required, but only 0 present.");r=d.convert(t,r,{context:"Failed to execute 'forEach' on 'iterable': The callback provided as parameter 1"});for(var n=arguments[1],i=Array.from(this[v]),o=0;o<i.length;){var s=i[o].map(f.tryWrapperForImpl),l=_slicedToArray(s,2),u=l[0],c=l[1];r.call(n,c,u,this),i=Array.from(this[v]),o++}}}]),URLSearchParams}();Object.defineProperties(o.prototype,(_defineProperty(n={append:{enumerable:!0},delete:{enumerable:!0},get:{enumerable:!0},getAll:{enumerable:!0},has:{enumerable:!0},set:{enumerable:!0},sort:{enumerable:!0},toString:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0},forEach:{enumerable:!0}},Symbol.toStringTag,{value:"URLSearchParams",configurable:!0}),_defineProperty(n,Symbol.iterator,{value:o.prototype.entries,configurable:!0,writable:!0}),n)),i[b]=o,i["URLSearchParams Iterator"]=Object.create(i["%IteratorPrototype%"],_defineProperty({},Symbol.toStringTag,{configurable:!0,value:"URLSearchParams Iterator"})),f.define(i["URLSearchParams Iterator"],{next:function next(){var e=this&&this[f.iterInternalSymbol];if(!e)throw new t.TypeError("next() called on a value that is not a URLSearchParams iterator object");var r=e.target,n=e.kind,i=e.index,o=Array.from(r[v]);if(i>=o.length)return y(t,{value:void 0,done:!0});var s=o[i];return e.index=i+1,y(t,f.iteratorResult(s.map(f.tryWrapperForImpl),n))}}),Object.defineProperty(t,b,{configurable:!0,writable:!0,value:o})}};var S=require("./URLSearchParams-impl.js"),w=c,P=getAugmentedNamespace(Object.freeze({__proto__:null}));r.URL=w,r.URLSearchParams=P;var L=require("tr46"),U=require("./infra"),R=require("./encoding").utf8DecodeWithoutBOM,x=require("./percent-encoding"),O=x.percentDecodeString,E=x.utf8PercentEncodeCodePoint,I=x.utf8PercentEncodeString,j=x.isC0ControlPercentEncode,A=x.isFragmentPercentEncode,T=x.isQueryPercentEncode,_=x.isSpecialQueryPercentEncode,k=x.isPathPercentEncode,$=x.isUserinfoPercentEncode;function p$1(e){return e.codePointAt(0)}var C={ftp:21,file:null,http:80,https:443,ws:80,wss:443},N=Symbol("failure");function countSymbols(e){return _toConsumableArray(e).length}function at(e,t){var r=e[t];return isNaN(r)?void 0:String.fromCodePoint(r)}function isSingleDot(e){return"."===e||"%2e"===e.toLowerCase()}function isWindowsDriveLetterString(e){return 2===e.length&&U.isASCIIAlpha(e.codePointAt(0))&&(":"===e[1]||"|"===e[1])}function containsForbiddenHostCodePoint(e){return-1!==e.search(/\0|\t|\n|\r| |#|%|\/|:|<|>|\?|@|\[|\\|\]|\^|\|/)}function isSpecialScheme(e){return void 0!==C[e]}function isSpecial(e){return isSpecialScheme(e.scheme)}function isNotSpecial(e){return!isSpecialScheme(e.scheme)}function defaultPort(e){return C[e]}function parseIPv4Number(e){if(""===e)return N;var t=10;if(e.length>=2&&"0"===e.charAt(0)&&"x"===e.charAt(1).toLowerCase()?(e=e.substring(2),t=16):e.length>=2&&"0"===e.charAt(0)&&(e=e.substring(1),t=8),""===e)return 0;var r=/(?:(?![0-7])[\s\S])/;return 10===t&&(r=/(?:(?![0-9])[\s\S])/),16===t&&(r=/(?:(?![0-9A-Fa-f])[\s\S])/),r.test(e)?N:parseInt(e,t)}function parseIPv4(e){var t=e.split(".");if(""===t[t.length-1]&&t.length>1&&t.pop(),t.length>4)return N;var r,n=[],i=_createForOfIteratorHelper(t);try{for(i.s();!(r=i.n()).done;){var o=parseIPv4Number(r.value);if(o===N)return N;n.push(o)}}catch(e){i.e(e)}finally{i.f()}for(var s=0;s<n.length-1;++s)if(n[s]>255)return N;if(n[n.length-1]>=Math.pow(256,5-n.length))return N;for(var l=n.pop(),u=0,c=0,h=n;c<h.length;c++){l+=h[c]*Math.pow(256,3-u),++u}return l}function parseIPv6(e){var t=[0,0,0,0,0,0,0,0],r=0,n=null,i=0;if((e=Array.from(e,(function(e){return e.codePointAt(0)})))[i]===p$1(":")){if(e[i+1]!==p$1(":"))return N;i+=2,n=++r}for(;i<e.length;){if(8===r)return N;if(e[i]!==p$1(":")){for(var o=0,s=0;s<4&&U.isASCIIHex(e[i]);)o=16*o+parseInt(at(e,i),16),++i,++s;if(e[i]===p$1(".")){if(0===s)return N;if(i-=s,r>6)return N;for(var l=0;void 0!==e[i];){var u=null;if(l>0){if(!(e[i]===p$1(".")&&l<4))return N;++i}if(!U.isASCIIDigit(e[i]))return N;for(;U.isASCIIDigit(e[i]);){var c=parseInt(at(e,i));if(null===u)u=c;else{if(0===u)return N;u=10*u+c}if(u>255)return N;++i}t[r]=256*t[r]+u,2!==++l&&4!==l||++r}if(4!==l)return N;break}if(e[i]===p$1(":")){if(void 0===e[++i])return N}else if(void 0!==e[i])return N;t[r]=o,++r}else{if(null!==n)return N;++i,n=++r}}if(null!==n){var h=r-n;for(r=7;0!==r&&h>0;){var f=t[n+h-1];t[n+h-1]=t[r],t[r]=f,--r,--h}}else if(null===n&&8!==r)return N;return t}function parseHost(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if("["===e[0])return"]"!==e[e.length-1]?N:parseIPv6(e.substring(1,e.length-1));if(t)return parseOpaqueHost(e);var r=R(O(e)),n=domainToASCII(r);return n===N||containsForbiddenHostCodePoint(n)?N:endsInANumber(n)?parseIPv4(n):n}function endsInANumber(e){var t=e.split(".");if(""===t[t.length-1]){if(1===t.length)return!1;t.pop()}var r=t[t.length-1];return parseIPv4Number(r)!==N||!!/^[0-9]+$/.test(r)}function parseOpaqueHost(e){return function containsForbiddenHostCodePointExcludingPercent(e){return-1!==e.search(/\0|\t|\n|\r| |#|\/|:|<|>|\?|@|\[|\\|\]|\^|\|/)}(e)?N:I(e,j)}function serializeHost(e){return"number"==typeof e?function serializeIPv4(e){for(var t="",r=e,n=1;n<=4;++n)t=String(r%256)+t,4!==n&&(t=".".concat(t)),r=Math.floor(r/256);return t}(e):e instanceof Array?"[".concat(function serializeIPv6(e){for(var t="",r=function findLongestZeroSequence(e){for(var t=null,r=1,n=null,i=0,o=0;o<e.length;++o)0!==e[o]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=o),++i);return i>r?n:t}(e),n=!1,i=0;i<=7;++i)n&&0===e[i]||(n&&(n=!1),r!==i?(t+=e[i].toString(16),7!==i&&(t+=":")):(t+=0===i?"::":":",n=!0));return t}(e),"]"):e}function domainToASCII(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=L.toASCII(e,{checkBidi:!0,checkHyphens:!1,checkJoiners:!0,useSTD3ASCIIRules:t,verifyDNSLength:t});return null===r||""===r?N:r}function shortenPath(e){var t=e.path;0!==t.length&&("file"===e.scheme&&1===t.length&&function isNormalizedWindowsDriveLetter(e){return/^[A-Za-z]:$/.test(e)}(t[0])||t.pop())}function includesCredentials(e){return""!==e.username||""!==e.password}function hasAnOpaquePath(e){return"string"==typeof e.path}function URLStateMachine(e,t,r,n,i){if(this.pointer=0,this.input=e,this.base=t||null,this.encodingOverride=r||"utf-8",this.stateOverride=i,this.url=n,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null};var o=function trimControlChars(e){return e.replace(/^[\0- ]+|[\0- ]+$/g,"")}(this.input);o!==this.input&&(this.parseError=!0),this.input=o}var s=function trimTabAndNewline(e){return e.replace(/\t|\n|\r/g,"")}(this.input);for(s!==this.input&&(this.parseError=!0),this.input=s,this.state=i||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=Array.from(this.input,(function(e){return e.codePointAt(0)}));this.pointer<=this.input.length;++this.pointer){var l=this.input[this.pointer],u=isNaN(l)?void 0:String.fromCodePoint(l),c=this["parse ".concat(this.state)](l,u);if(!c)break;if(c===N){this.failure=!0;break}}}URLStateMachine.prototype["parse scheme start"]=function parseSchemeStart(e,t){if(U.isASCIIAlpha(e))this.buffer+=t.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return this.parseError=!0,N;this.state="no scheme",--this.pointer}return!0},URLStateMachine.prototype["parse scheme"]=function parseScheme(e,t){if(U.isASCIIAlphanumeric(e)||e===p$1("+")||e===p$1("-")||e===p$1("."))this.buffer+=t.toLowerCase();else if(e===p$1(":")){if(this.stateOverride){if(isSpecial(this.url)&&!isSpecialScheme(this.buffer))return!1;if(!isSpecial(this.url)&&isSpecialScheme(this.buffer))return!1;if((includesCredentials(this.url)||null!==this.url.port)&&"file"===this.buffer)return!1;if("file"===this.url.scheme&&""===this.url.host)return!1}if(this.url.scheme=this.buffer,this.stateOverride)return this.url.port===defaultPort(this.url.scheme)&&(this.url.port=null),!1;this.buffer="","file"===this.url.scheme?(this.input[this.pointer+1]===p$1("/")&&this.input[this.pointer+2]===p$1("/")||(this.parseError=!0),this.state="file"):isSpecial(this.url)&&null!==this.base&&this.base.scheme===this.url.scheme?this.state="special relative or authority":isSpecial(this.url)?this.state="special authority slashes":this.input[this.pointer+1]===p$1("/")?(this.state="path or authority",++this.pointer):(this.url.path="",this.state="opaque path")}else{if(this.stateOverride)return this.parseError=!0,N;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},URLStateMachine.prototype["parse no scheme"]=function parseNoScheme(e){return null===this.base||hasAnOpaquePath(this.base)&&e!==p$1("#")?N:(hasAnOpaquePath(this.base)&&e===p$1("#")?(this.url.scheme=this.base.scheme,this.url.path=this.base.path,this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):"file"===this.base.scheme?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},URLStateMachine.prototype["parse special relative or authority"]=function parseSpecialRelativeOrAuthority(e){return e===p$1("/")&&this.input[this.pointer+1]===p$1("/")?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},URLStateMachine.prototype["parse path or authority"]=function parsePathOrAuthority(e){return e===p$1("/")?this.state="authority":(this.state="path",--this.pointer),!0},URLStateMachine.prototype["parse relative"]=function parseRelative(e){return this.url.scheme=this.base.scheme,e===p$1("/")?this.state="relative slash":isSpecial(this.url)&&e===p$1("\\")?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,e===p$1("?")?(this.url.query="",this.state="query"):e===p$1("#")?(this.url.fragment="",this.state="fragment"):isNaN(e)||(this.url.query=null,this.url.path.pop(),this.state="path",--this.pointer)),!0},URLStateMachine.prototype["parse relative slash"]=function parseRelativeSlash(e){return!isSpecial(this.url)||e!==p$1("/")&&e!==p$1("\\")?e===p$1("/")?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer):(e===p$1("\\")&&(this.parseError=!0),this.state="special authority ignore slashes"),!0},URLStateMachine.prototype["parse special authority slashes"]=function parseSpecialAuthoritySlashes(e){return e===p$1("/")&&this.input[this.pointer+1]===p$1("/")?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},URLStateMachine.prototype["parse special authority ignore slashes"]=function parseSpecialAuthorityIgnoreSlashes(e){return e!==p$1("/")&&e!==p$1("\\")?(this.state="authority",--this.pointer):this.parseError=!0,!0},URLStateMachine.prototype["parse authority"]=function parseAuthority(e,t){if(e===p$1("@")){this.parseError=!0,this.atFlag&&(this.buffer="%40".concat(this.buffer)),this.atFlag=!0;for(var r=countSymbols(this.buffer),n=0;n<r;++n){var i=this.buffer.codePointAt(n);if(i!==p$1(":")||this.passwordTokenSeenFlag){var o=E(i,$);this.passwordTokenSeenFlag?this.url.password+=o:this.url.username+=o}else this.passwordTokenSeenFlag=!0}this.buffer=""}else if(isNaN(e)||e===p$1("/")||e===p$1("?")||e===p$1("#")||isSpecial(this.url)&&e===p$1("\\")){if(this.atFlag&&""===this.buffer)return this.parseError=!0,N;this.pointer-=countSymbols(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=t;return!0},URLStateMachine.prototype["parse hostname"]=URLStateMachine.prototype["parse host"]=function parseHostName(e,t){if(this.stateOverride&&"file"===this.url.scheme)--this.pointer,this.state="file host";else if(e!==p$1(":")||this.arrFlag)if(isNaN(e)||e===p$1("/")||e===p$1("?")||e===p$1("#")||isSpecial(this.url)&&e===p$1("\\")){if(--this.pointer,isSpecial(this.url)&&""===this.buffer)return this.parseError=!0,N;if(this.stateOverride&&""===this.buffer&&(includesCredentials(this.url)||null!==this.url.port))return this.parseError=!0,!1;var r=parseHost(this.buffer,isNotSpecial(this.url));if(r===N)return N;if(this.url.host=r,this.buffer="",this.state="path start",this.stateOverride)return!1}else e===p$1("[")?this.arrFlag=!0:e===p$1("]")&&(this.arrFlag=!1),this.buffer+=t;else{if(""===this.buffer)return this.parseError=!0,N;if("hostname"===this.stateOverride)return!1;var n=parseHost(this.buffer,isNotSpecial(this.url));if(n===N)return N;this.url.host=n,this.buffer="",this.state="port"}return!0},URLStateMachine.prototype["parse port"]=function parsePort(e,t){if(U.isASCIIDigit(e))this.buffer+=t;else{if(!(isNaN(e)||e===p$1("/")||e===p$1("?")||e===p$1("#")||isSpecial(this.url)&&e===p$1("\\")||this.stateOverride))return this.parseError=!0,N;if(""!==this.buffer){var r=parseInt(this.buffer);if(r>Math.pow(2,16)-1)return this.parseError=!0,N;this.url.port=r===defaultPort(this.url.scheme)?null:r,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}return!0};var q=new Set([p$1("/"),p$1("\\"),p$1("?"),p$1("#")]);function startsWithWindowsDriveLetter(e,t){var r=e.length-t;return r>=2&&function isWindowsDriveLetterCodePoints(e,t){return U.isASCIIAlpha(e)&&(t===p$1(":")||t===p$1("|"))}(e[t],e[t+1])&&(2===r||q.has(e[t+2]))}function serializePath(e){if(hasAnOpaquePath(e))return e.path;var t,r="",n=_createForOfIteratorHelper(e.path);try{for(n.s();!(t=n.n()).done;){var i=t.value;r+="/".concat(i)}}catch(e){n.e(e)}finally{n.f()}return r}URLStateMachine.prototype["parse file"]=function parseFile(e){return this.url.scheme="file",this.url.host="",e===p$1("/")||e===p$1("\\")?(e===p$1("\\")&&(this.parseError=!0),this.state="file slash"):null!==this.base&&"file"===this.base.scheme?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,e===p$1("?")?(this.url.query="",this.state="query"):e===p$1("#")?(this.url.fragment="",this.state="fragment"):isNaN(e)||(this.url.query=null,startsWithWindowsDriveLetter(this.input,this.pointer)?(this.parseError=!0,this.url.path=[]):shortenPath(this.url),this.state="path",--this.pointer)):(this.state="path",--this.pointer),!0},URLStateMachine.prototype["parse file slash"]=function parseFileSlash(e){return e===p$1("/")||e===p$1("\\")?(e===p$1("\\")&&(this.parseError=!0),this.state="file host"):(null!==this.base&&"file"===this.base.scheme&&(!startsWithWindowsDriveLetter(this.input,this.pointer)&&function isNormalizedWindowsDriveLetterString(e){return 2===e.length&&U.isASCIIAlpha(e.codePointAt(0))&&":"===e[1]}(this.base.path[0])&&this.url.path.push(this.base.path[0]),this.url.host=this.base.host),this.state="path",--this.pointer),!0},URLStateMachine.prototype["parse file host"]=function parseFileHost(e,t){if(isNaN(e)||e===p$1("/")||e===p$1("\\")||e===p$1("?")||e===p$1("#"))if(--this.pointer,!this.stateOverride&&isWindowsDriveLetterString(this.buffer))this.parseError=!0,this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{var r=parseHost(this.buffer,isNotSpecial(this.url));if(r===N)return N;if("localhost"===r&&(r=""),this.url.host=r,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=t;return!0},URLStateMachine.prototype["parse path start"]=function parsePathStart(e){return isSpecial(this.url)?(e===p$1("\\")&&(this.parseError=!0),this.state="path",e!==p$1("/")&&e!==p$1("\\")&&--this.pointer):this.stateOverride||e!==p$1("?")?this.stateOverride||e!==p$1("#")?void 0!==e?(this.state="path",e!==p$1("/")&&--this.pointer):this.stateOverride&&null===this.url.host&&this.url.path.push(""):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query"),!0},URLStateMachine.prototype["parse path"]=function parsePath(e){return isNaN(e)||e===p$1("/")||isSpecial(this.url)&&e===p$1("\\")||!this.stateOverride&&(e===p$1("?")||e===p$1("#"))?(isSpecial(this.url)&&e===p$1("\\")&&(this.parseError=!0),!function isDoubleDot(e){return".."===(e=e.toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e}(this.buffer)?!isSingleDot(this.buffer)||e===p$1("/")||isSpecial(this.url)&&e===p$1("\\")?isSingleDot(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&isWindowsDriveLetterString(this.buffer)&&(this.buffer="".concat(this.buffer[0],":")),this.url.path.push(this.buffer)):this.url.path.push(""):(shortenPath(this.url),e===p$1("/")||isSpecial(this.url)&&e===p$1("\\")||this.url.path.push("")),this.buffer="",e===p$1("?")&&(this.url.query="",this.state="query"),e===p$1("#")&&(this.url.fragment="",this.state="fragment")):(e!==p$1("%")||U.isASCIIHex(this.input[this.pointer+1])&&U.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=E(e,k)),!0},URLStateMachine.prototype["parse opaque path"]=function parseOpaquePath(e){return e===p$1("?")?(this.url.query="",this.state="query"):e===p$1("#")?(this.url.fragment="",this.state="fragment"):(isNaN(e)||e===p$1("%")||(this.parseError=!0),e!==p$1("%")||U.isASCIIHex(this.input[this.pointer+1])&&U.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),isNaN(e)||(this.url.path+=E(e,j))),!0},URLStateMachine.prototype["parse query"]=function parseQuery(e,t){if(isSpecial(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encodingOverride="utf-8"),!this.stateOverride&&e===p$1("#")||isNaN(e)){var r=isSpecial(this.url)?_:T;this.url.query+=I(this.buffer,r),this.buffer="",e===p$1("#")&&(this.url.fragment="",this.state="fragment")}else isNaN(e)||(e!==p$1("%")||U.isASCIIHex(this.input[this.pointer+1])&&U.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),this.buffer+=t);return!0},URLStateMachine.prototype["parse fragment"]=function parseFragment(e){return isNaN(e)||(e!==p$1("%")||U.isASCIIHex(this.input[this.pointer+1])&&U.isASCIIHex(this.input[this.pointer+2])||(this.parseError=!0),this.url.fragment+=E(e,A)),!0},module.exports.serializeURL=function serializeURL(e,t){var r="".concat(e.scheme,":");return null!==e.host&&(r+="//",""===e.username&&""===e.password||(r+=e.username,""!==e.password&&(r+=":".concat(e.password)),r+="@"),r+=serializeHost(e.host),null!==e.port&&(r+=":".concat(e.port))),null===e.host&&!hasAnOpaquePath(e)&&e.path.length>1&&""===e.path[0]&&(r+="/."),r+=serializePath(e),null!==e.query&&(r+="?".concat(e.query)),t||null===e.fragment||(r+="#".concat(e.fragment)),r},module.exports.serializePath=serializePath,module.exports.serializeURLOrigin=function(e){switch(e.scheme){case"blob":try{return module.exports.serializeURLOrigin(module.exports.parseURL(serializePath(e)))}catch(e){return"null"}case"ftp":case"http":case"https":case"ws":case"wss":return function serializeOrigin(e){var t="".concat(e.scheme,"://");return t+=serializeHost(e.host),null!==e.port&&(t+=":".concat(e.port)),t}({scheme:e.scheme,host:e.host,port:e.port});default:return"null"}},module.exports.basicURLParse=function(e,t){void 0===t&&(t={});var r=new URLStateMachine(e,t.baseURL,t.encodingOverride,t.url,t.stateOverride);return r.failure?null:r.url},module.exports.setTheUsername=function(e,t){e.username=I(t,$)},module.exports.setThePassword=function(e,t){e.password=I(t,$)},module.exports.serializeHost=serializeHost,module.exports.cannotHaveAUsernamePasswordPort=function cannotHaveAUsernamePasswordPort(e){return null===e.host||""===e.host||hasAnOpaquePath(e)||"file"===e.scheme},module.exports.hasAnOpaquePath=hasAnOpaquePath,module.exports.serializeInteger=function(e){return String(e)},module.exports.parseURL=function(e,t){return void 0===t&&(t={}),module.exports.basicURLParse(e,{baseURL:t.baseURL,encodingOverride:t.encodingOverride})};var W=getAugmentedNamespace(Object.freeze({__proto__:null})),M=require("./infra").isASCIIHex,H=require("./encoding").utf8Encode;function p(e){return e.codePointAt(0)}function percentDecodeBytes(e){for(var t=new Uint8Array(e.byteLength),r=0,n=0;n<e.byteLength;++n){var i=e[n];if(37!==i)t[r++]=i;else if(37!==i||M(e[n+1])&&M(e[n+2])){var o=parseInt(String.fromCodePoint(e[n+1],e[n+2]),16);t[r++]=o,n+=2}else t[r++]=i}return t.slice(0,r)}function isC0ControlPercentEncode(e){return e<=31||e>126}var D=new Set([p(" "),p('"'),p("<"),p(">"),p("`")]);var z=new Set([p(" "),p('"'),p("#"),p("<"),p(">")]);function isQueryPercentEncode(e){return isC0ControlPercentEncode(e)||z.has(e)}var G=new Set([p("?"),p("`"),p("{"),p("}")]);function isPathPercentEncode(e){return isQueryPercentEncode(e)||G.has(e)}var V=new Set([p("/"),p(":"),p(";"),p("="),p("@"),p("["),p("\\"),p("]"),p("^"),p("|")]);function isUserinfoPercentEncode(e){return isPathPercentEncode(e)||V.has(e)}var B=new Set([p("$"),p("%"),p("&"),p("+"),p(",")]);var Q=new Set([p("!"),p("'"),p("("),p(")"),p("~")]);function utf8PercentEncodeCodePointInternal(e,t){var r,n,i="",o=_createForOfIteratorHelper(H(e));try{for(o.s();!(r=o.n()).done;){var s=r.value;t(s)?i+=(n=void 0,1===(n=s.toString(16).toUpperCase()).length&&(n="0".concat(n)),"%".concat(n)):i+=String.fromCharCode(s)}}catch(e){o.e(e)}finally{o.f()}return i}module.exports={isC0ControlPercentEncode:isC0ControlPercentEncode,isFragmentPercentEncode:function isFragmentPercentEncode(e){return isC0ControlPercentEncode(e)||D.has(e)},isQueryPercentEncode:isQueryPercentEncode,isSpecialQueryPercentEncode:function isSpecialQueryPercentEncode(e){return isQueryPercentEncode(e)||e===p("'")},isPathPercentEncode:isPathPercentEncode,isUserinfoPercentEncode:isUserinfoPercentEncode,isURLEncodedPercentEncode:function isURLEncodedPercentEncode(e){return function isComponentPercentEncode(e){return isUserinfoPercentEncode(e)||B.has(e)}(e)||Q.has(e)},percentDecodeString:function percentDecodeString(e){return percentDecodeBytes(H(e))},percentDecodeBytes:percentDecodeBytes,utf8PercentEncodeString:function utf8PercentEncodeString(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i="",o=_createForOfIteratorHelper(e);try{for(o.s();!(r=o.n()).done;){var s=r.value;i+=n&&" "===s?"+":utf8PercentEncodeCodePointInternal(s,t)}}catch(e){o.e(e)}finally{o.f()}return i},utf8PercentEncodeCodePoint:function utf8PercentEncodeCodePoint(e,t){return utf8PercentEncodeCodePointInternal(String.fromCodePoint(e),t)}};var J=getAugmentedNamespace(Object.freeze({__proto__:null})),K=r,Y=K.URL,X=K.URLSearchParams,Z=W,ee=J,te={Array:Array,Object:Object,Promise:Promise,String:String,TypeError:TypeError};Y.install(te,["Window"]),X.install(te,["Window"]),t.URL=te.URL,t.URLSearchParams=te.URLSearchParams,t.parseURL=Z.parseURL,t.basicURLParse=Z.basicURLParse,t.serializeURL=Z.serializeURL,t.serializePath=Z.serializePath,t.serializeHost=Z.serializeHost,t.serializeInteger=Z.serializeInteger,t.serializeURLOrigin=Z.serializeURLOrigin,t.setTheUsername=Z.setTheUsername,t.setThePassword=Z.setThePassword,t.cannotHaveAUsernamePasswordPort=Z.cannotHaveAUsernamePasswordPort,t.hasAnOpaquePath=Z.hasAnOpaquePath,t.percentDecodeString=ee.percentDecodeString,t.percentDecodeBytes=ee.percentDecodeBytes;var re=Function.prototype.call.bind(Object.prototype.hasOwnProperty);var ne=Symbol("wrapper"),ie=Symbol("impl"),ae=Symbol("SameObject caches"),oe=Symbol.for("[webidl2js] constructor registry"),se=Object.getPrototypeOf(Object.getPrototypeOf(_wrapAsyncGenerator(_regeneratorRuntime().mark((function _callee(){return _regeneratorRuntime().wrap((function _callee$(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),_callee)})))).prototype);function initCtorRegistry(e){if(re(e,oe))return e[oe];var t=Object.create(null);t["%Object.prototype%"]=e.Object.prototype,t["%IteratorPrototype%"]=Object.getPrototypeOf(Object.getPrototypeOf((new e.Array)[Symbol.iterator]()));try{t["%AsyncIteratorPrototype%"]=Object.getPrototypeOf(Object.getPrototypeOf(e.eval("(async function* () {})").prototype))}catch(e){t["%AsyncIteratorPrototype%"]=se}return e[oe]=t,t}function wrapperForImpl(e){return e?e[ne]:null}function implForWrapper$1(e){return e?e[ie]:null}var le=Symbol("internal");var ue=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get;var ce=Symbol("supports property index"),he=Symbol("supported property indices"),pe=Symbol("supports property name"),fe=Symbol("supported property names"),de=Symbol("indexed property get"),ye=Symbol("indexed property set new"),ve=Symbol("indexed property set existing"),me=Symbol("named property get"),be=Symbol("named property set new"),ge=Symbol("named property set existing"),Se=Symbol("named property delete"),we=Symbol("async iterator get the next iteration result"),Pe=Symbol("async iterator return steps"),Le=Symbol("async iterator initialization steps"),Ue=Symbol("async iterator end of iteration");module.exports=e={isObject:function isObject(e){return"object"===_typeof(e)&&null!==e||"function"==typeof e},hasOwn:re,define:function define(e,t){var r,n=_createForOfIteratorHelper(Reflect.ownKeys(t));try{for(n.s();!(r=n.n()).done;){var i=r.value,o=Reflect.getOwnPropertyDescriptor(t,i);if(o&&!Reflect.defineProperty(e,i,o))throw new TypeError("Cannot redefine property: ".concat(String(i)))}}catch(e){n.e(e)}finally{n.f()}},newObjectInRealm:function newObjectInRealm(e,t){var r=initCtorRegistry(e);return Object.defineProperties(Object.create(r["%Object.prototype%"]),Object.getOwnPropertyDescriptors(t))},wrapperSymbol:ne,implSymbol:ie,getSameObject:function getSameObject(e,t,r){return e[ae]||(e[ae]=Object.create(null)),t in e[ae]||(e[ae][t]=r()),e[ae][t]},ctorRegistrySymbol:oe,initCtorRegistry:initCtorRegistry,wrapperForImpl:wrapperForImpl,implForWrapper:implForWrapper$1,tryWrapperForImpl:function tryWrapperForImpl(e){var t=wrapperForImpl(e);return t||e},tryImplForWrapper:function tryImplForWrapper(e){var t=implForWrapper$1(e);return t||e},iterInternalSymbol:le,isArrayBuffer:function isArrayBuffer(e){try{return ue.call(e),!0}catch(e){return!1}},isArrayIndexPropName:function isArrayIndexPropName(e){if("string"!=typeof e)return!1;var t=e>>>0;return t!==Math.pow(2,32)-1&&e==="".concat(t)},supportsPropertyIndex:ce,supportedPropertyIndices:he,supportsPropertyName:pe,supportedPropertyNames:fe,indexedGet:de,indexedSetNew:ye,indexedSetExisting:ve,namedGet:me,namedSetNew:be,namedSetExisting:ge,namedDelete:Se,asyncIteratorNext:we,asyncIteratorReturn:Pe,asyncIteratorInit:Le,asyncIteratorEOI:Ue,iteratorResult:function iteratorResult(e,t){var r,n=_slicedToArray(e,2),i=n[0],o=n[1];switch(t){case"key":r=i;break;case"value":r=o;break;case"key+value":r=[i,o]}return{value:r,done:!1}}};var Re=t.serializeURLOrigin,xe=t.parseURL,Oe={},Ee=void 0;e.createObjectURL=function createObjectURL(e){var t="blob:"+Re(xe(location.href))+"/"+function generateUUID(){var e=Date.now()+("undefined"!=typeof performance&&"function"==typeof performance.now?performance.now():0);return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var r=Math.trunc((e+16*Math.random())%16);return e=Math.floor(e/16),("x"===t?r:3&r|8).toString(16)}))}();return Oe[t]=e,t},e.revokeObjectURL=function revokeObjectURL(e){delete Oe[e]},e.xmlHttpRequestOverrideMimeType=function xmlHttpRequestOverrideMimeType(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.polyfillDataURLs,r=XMLHttpRequest.prototype.open,n=XMLHttpRequest.prototype.overrideMimeType;return function(e){"text/plain; charset=x-user-defined"===e&&(this.open=function(e,n,i){if(n.startsWith("blob:")){var o=Oe[n];if(!o)return void(this.send=function(){throw new DOMException("Failed to execute 'send' on 'XMLHttpRequest': Failed to "+"load '".concat(n,"'"),"NetworkError")});var s="text/plain",l=Ee(o)._buffer.toString("binary");if(t)return this.status=200,this.send=function(){},this.responseType=s,void(this.responseText=l);n="data:"+s+","+encodeURIComponent(l)}return r.call(this,e,n,i)});for(var i=arguments.length,o=new Array(i>1?i-1:0),s=1;s<i;s++)o[s-1]=arguments[s];return n&&n.call.apply(n,[this,e].concat(o))}}}));
2
2
  //# sourceMappingURL=createObjectURL.umd.js.map