typeson-registry 13.0.1 → 13.2.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 (93) hide show
  1. package/README.md +6 -8
  2. package/dist/index.d.ts +4 -2
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +65 -4
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.js +2 -2
  7. package/dist/index.min.js.map +1 -1
  8. package/dist/index.umd.cjs +220 -124
  9. package/dist/index.umd.cjs.map +1 -1
  10. package/dist/index.umd.min.cjs +2 -2
  11. package/dist/index.umd.min.cjs.map +1 -1
  12. package/dist/polyfills/createObjectURL.d.ts.map +1 -1
  13. package/dist/presets/builtin.umd.cjs +1 -1
  14. package/dist/presets/builtin.umd.cjs.map +1 -1
  15. package/dist/presets/postmessage.umd.cjs +1 -1
  16. package/dist/presets/postmessage.umd.cjs.map +1 -1
  17. package/dist/presets/socketio.umd.cjs +1 -1
  18. package/dist/presets/socketio.umd.cjs.map +1 -1
  19. package/dist/presets/structured-cloning-throwing.umd.cjs +1 -1
  20. package/dist/presets/structured-cloning-throwing.umd.cjs.map +1 -1
  21. package/dist/presets/structured-cloning.d.ts.map +1 -1
  22. package/dist/presets/structured-cloning.umd.cjs +1 -1
  23. package/dist/presets/structured-cloning.umd.cjs.map +1 -1
  24. package/dist/presets/undef.umd.cjs +1 -1
  25. package/dist/presets/undef.umd.cjs.map +1 -1
  26. package/dist/presets/universal.umd.cjs +1 -1
  27. package/dist/presets/universal.umd.cjs.map +1 -1
  28. package/dist/types/arraybuffer.umd.cjs +1 -1
  29. package/dist/types/arraybuffer.umd.cjs.map +1 -1
  30. package/dist/types/audiodata.d.ts +6 -0
  31. package/dist/types/audiodata.d.ts.map +1 -0
  32. package/dist/types/audiodata.umd.cjs +2 -0
  33. package/dist/types/audiodata.umd.cjs.map +1 -0
  34. package/dist/types/bigint-object.umd.cjs +1 -1
  35. package/dist/types/bigint-object.umd.cjs.map +1 -1
  36. package/dist/types/blob.umd.cjs +1 -1
  37. package/dist/types/blob.umd.cjs.map +1 -1
  38. package/dist/types/cryptokey.umd.cjs +1 -1
  39. package/dist/types/cryptokey.umd.cjs.map +1 -1
  40. package/dist/types/dataview.umd.cjs +1 -1
  41. package/dist/types/dataview.umd.cjs.map +1 -1
  42. package/dist/types/date.umd.cjs +1 -1
  43. package/dist/types/date.umd.cjs.map +1 -1
  44. package/dist/types/domexception.umd.cjs +1 -1
  45. package/dist/types/domexception.umd.cjs.map +1 -1
  46. package/dist/types/dommatrix.umd.cjs +1 -1
  47. package/dist/types/dommatrix.umd.cjs.map +1 -1
  48. package/dist/types/dompoint.umd.cjs +1 -1
  49. package/dist/types/dompoint.umd.cjs.map +1 -1
  50. package/dist/types/domquad.umd.cjs +1 -1
  51. package/dist/types/domquad.umd.cjs.map +1 -1
  52. package/dist/types/domrect.umd.cjs +1 -1
  53. package/dist/types/domrect.umd.cjs.map +1 -1
  54. package/dist/types/error.umd.cjs +1 -1
  55. package/dist/types/error.umd.cjs.map +1 -1
  56. package/dist/types/errors.umd.cjs +1 -1
  57. package/dist/types/errors.umd.cjs.map +1 -1
  58. package/dist/types/file.umd.cjs +1 -1
  59. package/dist/types/file.umd.cjs.map +1 -1
  60. package/dist/types/filelist.umd.cjs +1 -1
  61. package/dist/types/filelist.umd.cjs.map +1 -1
  62. package/dist/types/imagebitmap.umd.cjs +1 -1
  63. package/dist/types/imagebitmap.umd.cjs.map +1 -1
  64. package/dist/types/imagedata.umd.cjs +1 -1
  65. package/dist/types/imagedata.umd.cjs.map +1 -1
  66. package/dist/types/intl-types.umd.cjs +1 -1
  67. package/dist/types/intl-types.umd.cjs.map +1 -1
  68. package/dist/types/map.umd.cjs +1 -1
  69. package/dist/types/map.umd.cjs.map +1 -1
  70. package/dist/types/nonbuiltin-ignore.umd.cjs +1 -1
  71. package/dist/types/nonbuiltin-ignore.umd.cjs.map +1 -1
  72. package/dist/types/primitive-objects.umd.cjs +1 -1
  73. package/dist/types/primitive-objects.umd.cjs.map +1 -1
  74. package/dist/types/promise.umd.cjs +1 -1
  75. package/dist/types/promise.umd.cjs.map +1 -1
  76. package/dist/types/regexp.umd.cjs +1 -1
  77. package/dist/types/regexp.umd.cjs.map +1 -1
  78. package/dist/types/set.umd.cjs +1 -1
  79. package/dist/types/set.umd.cjs.map +1 -1
  80. package/dist/types/typed-arrays-socketio.umd.cjs +1 -1
  81. package/dist/types/typed-arrays-socketio.umd.cjs.map +1 -1
  82. package/dist/types/typed-arrays.umd.cjs +1 -1
  83. package/dist/types/typed-arrays.umd.cjs.map +1 -1
  84. package/dist/types/undef.umd.cjs +1 -1
  85. package/dist/types/undef.umd.cjs.map +1 -1
  86. package/dist/types/user-object.umd.cjs +1 -1
  87. package/dist/types/user-object.umd.cjs.map +1 -1
  88. package/package.json +11 -12
  89. package/polyfills/createObjectURL.cjs +3231 -0
  90. package/polyfills/createObjectURL.cjs.map +1 -0
  91. package/polyfills/createObjectURL.js +4 -4
  92. package/polyfills/createObjectURL.umd.cjs +0 -4
  93. package/polyfills/createObjectURL.umd.cjs.map +0 -1
@@ -1,4 +0,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 getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function a(){var e=!1;try{e=this instanceof a}catch(e){}return e?Reflect.construct(t,arguments,this.constructor):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 _OverloadYield(e,t){this.v=e,this.k=t}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _asyncGeneratorDelegate(e){var t={},r=!1;function pump(t,n){return r=!0,n=new Promise(function(r){r(e[t](n))}),{done:!1,value:new _OverloadYield(n,1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return r?(r=!1,e):pump("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(r)throw r=!1,e;return pump("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return r?(r=!1,e):pump("return",e)}),t}function _asyncIterator(e){var t,r,n,s=2;for("undefined"!=typeof Symbol&&(r=Symbol.asyncIterator,n=Symbol.iterator);s--;){if(r&&null!=(t=e[r]))return t.call(e);if(n&&null!=(t=e[n]))return new AsyncFromSyncIterator(t.call(e));r="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function AsyncFromSyncIterator(e){function AsyncFromSyncIteratorContinuation(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return AsyncFromSyncIterator=function(e){this.s=e,this.n=e.next},AsyncFromSyncIterator.prototype={s:null,n:null,next:function(){return AsyncFromSyncIteratorContinuation(this.n.apply(this.s,arguments))},return:function(e){var t=this.s.return;return void 0===t?Promise.resolve({value:e,done:!0}):AsyncFromSyncIteratorContinuation(t.apply(this.s,arguments))},throw:function(e){var t=this.s.return;return void 0===t?Promise.reject(e):AsyncFromSyncIteratorContinuation(t.apply(this.s,arguments))}},new AsyncFromSyncIterator(e)}function asyncGeneratorStep(e,t,r,n,s,u,l){try{var c=e[u](l),h=c.value}catch(e){return void r(e)}c.done?t(h):Promise.resolve(h).then(n,s)}function _asyncToGenerator(e){return function(){var t=this,r=arguments;return new Promise(function(n,s){var u=e.apply(t,r);function _next(e){asyncGeneratorStep(u,n,s,_next,_throw,"next",e)}function _throw(e){asyncGeneratorStep(u,n,s,_next,_throw,"throw",e)}_next(void 0)})}}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 _createForOfIteratorHelper(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_unsupportedIterableToArray(e))||t){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 s,u=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){l=!0,s=e},f:function(){try{u||null==r.return||r.return()}finally{if(l)throw s}}}}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 _regenerator(){
2
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
3
- var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",s=r.toStringTag||"@@toStringTag";function i(r,n,s,l){var c=n&&n.prototype instanceof Generator?n:Generator,h=Object.create(c.prototype);return _regeneratorDefine(h,"_invoke",function(r,n,s){var l,c,h,v=0,y=s||[],g=!1,m={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return l=t,c=0,h=e,m.n=r,u}};function d(r,n){for(c=r,h=n,t=0;!g&&v&&!s&&t<y.length;t++){var s,l=y[t],b=m.p,S=l[2];r>3?(s=S===n)&&(h=l[(c=l[4])?5:(c=3,3)],l[4]=l[5]=e):l[0]<=b&&((s=r<2&&b<l[1])?(c=0,m.v=n,m.n=l[1]):b<S&&(s=r<3||l[0]>n||n>S)&&(l[4]=r,l[5]=n,m.n=S,c=0))}if(s||r>1)return u;throw g=!0,n}return function(s,y,b){if(v>1)throw TypeError("Generator is already running");for(g&&1===y&&d(y,b),c=y,h=b;(t=c<2?e:h)||!g;){l||(c?c<3?(c>1&&(m.n=-1),d(c,h)):m.n=h:m.v=h);try{if(v=2,l){if(c||(s="next"),t=l[s]){if(!(t=t.call(l,h)))throw TypeError("iterator result is not an object");if(!t.done)return t;h=t.value,c<2&&(c=0)}else 1===c&&(t=l.return)&&t.call(l),c<2&&(h=TypeError("The iterator does not provide a '"+s+"' method"),c=1);l=e}else if((t=(g=m.n<0)?h:r.call(n,m))!==u)break}catch(t){l=e,c=1,h=t}finally{v=1}}return{value:t,done:g}}}(r,s,l),!0),h}var u={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var l=[][n]?t(t([][n]())):(_regeneratorDefine(t={},n,function(){return this}),t),c=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(l);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine(e,s,"GeneratorFunction")),e.prototype=Object.create(c),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine(c,"constructor",GeneratorFunctionPrototype),_regeneratorDefine(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine(GeneratorFunctionPrototype,s,"GeneratorFunction"),_regeneratorDefine(c),_regeneratorDefine(c,s,"Generator"),_regeneratorDefine(c,n,function(){return this}),_regeneratorDefine(c,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:i,m:f}})()}function _regeneratorDefine(e,t,r,n){var s=Object.defineProperty;try{s({},"",{})}catch(e){s=0}_regeneratorDefine=function(e,t,r,n){function o(t,r){_regeneratorDefine(e,t,function(e){return this._invoke(t,r,e)})}t?s?s(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(o("next",0),o("throw",1),o("return",2))},_regeneratorDefine(e,t,r,n)}function _regeneratorValues(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}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,s,u,l,c=[],h=!0,v=!1;try{if(u=(r=r.call(e)).next,0===t);else for(;!(h=(n=u.call(r)).done)&&(c.push(n.value),c.length!==t);h=!0);}catch(e){v=!0,s=e}finally{try{if(!h&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(v)throw s}}return c}}(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 _toPropertyKey(e){var t=function _toPrimitive(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);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:t+""}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 _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var r={}.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 _wrapAsyncGenerator(e){return function(){return new AsyncGenerator(e.apply(this,arguments))}}function AsyncGenerator(e){var t,r;function resume(t,r){try{var n=e[t](r),s=n.value,u=s instanceof _OverloadYield;Promise.resolve(u?s.v:s).then(function(r){if(u){var l="return"===t&&s.k?t:"next";if(!s.k||r.done)return resume(l,r);r=e[l](r).value}settle(!!n.done,r)},function(e){resume("throw",e)})}catch(e){settle(2,e)}}function settle(e,n){2===e?t.reject(n):t.resolve({value:n,done:e}),(t=t.next)?resume(t.key,t.arg):r=null}this._invoke=function(e,n){return new Promise(function(s,u){var l={key:e,arg:n,resolve:s,reject:u,next:null};r?r=r.next=l:(t=r=l,resume(e,n))})},"function"!=typeof e.return&&(this.return=void 0)}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"),s=require("./utils.js"),u=s.implSymbol,l=s.ctorRegistrySymbol;function makeWrapper$1(e,t){var r;return void 0!==t&&(r=t.prototype),s.isObject(r)||(r=e[l].URL.prototype),Object.create(r)}e.is=function(e){return s.isObject(e)&&Object.hasOwn(e,u)&&e[u]instanceof h.implementation},e.isImpl=function(e){return s.isObject(e)&&e instanceof h.implementation},e.convert=function(t,r){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).context,u=void 0===n?"The provided value":n;if(e.is(r))return s.implForWrapper(r);throw new t.TypeError("".concat(u," is not of type 'URL'."))},e.create=function(t,r,n){var s=makeWrapper$1(t);return e.setup(s,t,r,n)},e.createImpl=function(t,r,n){var u=e.create(t,r,n);return s.implForWrapper(u)},e._internalSetup=function(e,t){},e.setup=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return l.wrapper=t,e._internalSetup(t,r),Object.defineProperty(t,u,{value:new h.implementation(r,n,l),configurable:!0}),t[u][s.wrapperSymbol]=t,h.init&&h.init(t[u]),t},e.new=function(t,r){var n=makeWrapper$1(t,r);return e._internalSetup(n,t),Object.defineProperty(n,u,{value:Object.create(h.implementation.prototype),configurable:!0}),n[u][s.wrapperSymbol]=n,h.init&&h.init(n[u]),n[u]};var c=new Set(["Window","Worker"]);e.install=function(t,r){if(r.some(function(e){return c.has(e)})){var l=s.initCtorRegistry(t),v=function(){return _createClass(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 s=[],u=arguments[0];u=n.USVString(u,{context:"Failed to construct 'URL': parameter 1",globals:t}),s.push(u);var l=arguments[1];return void 0!==l&&(l=n.USVString(l,{context:"Failed to construct 'URL': parameter 2",globals:t})),s.push(l),e.setup(Object.create((this instanceof URL?this.constructor:void 0).prototype),t,s)},[{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[u].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[u].href},set:function set(r){var s=null!=this?this:t;if(!e.is(s))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}),s[u].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[u].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[u].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[u].protocol},set:function set(r){var s=null!=this?this:t;if(!e.is(s))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}),s[u].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[u].username},set:function set(r){var s=null!=this?this:t;if(!e.is(s))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}),s[u].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[u].password},set:function set(r){var s=null!=this?this:t;if(!e.is(s))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}),s[u].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[u].host},set:function set(r){var s=null!=this?this:t;if(!e.is(s))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}),s[u].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[u].hostname},set:function set(r){var s=null!=this?this:t;if(!e.is(s))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}),s[u].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[u].port},set:function set(r){var s=null!=this?this:t;if(!e.is(s))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}),s[u].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[u].pathname},set:function set(r){var s=null!=this?this:t;if(!e.is(s))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}),s[u].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[u].search},set:function set(r){var s=null!=this?this:t;if(!e.is(s))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}),s[u].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 s.getSameObject(this,"searchParams",function(){return s.tryWrapperForImpl(r[u].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[u].hash},set:function set(r){var s=null!=this?this:t;if(!e.is(s))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}),s[u].hash=r}}],[{key:"parse",value:function parse(e){var r;if(arguments.length<1)throw new t.TypeError("Failed to execute 'parse' on 'URL': 1 argument required, but only ".concat(arguments.length," present."));var u=[],l=arguments[0];l=n.USVString(l,{context:"Failed to execute 'parse' on 'URL': parameter 1",globals:t}),u.push(l);var c=arguments[1];return void 0!==c&&(c=n.USVString(c,{context:"Failed to execute 'parse' on 'URL': parameter 2",globals:t})),u.push(c),s.tryWrapperForImpl((r=h.implementation).parse.apply(r,[t].concat(u)))}},{key:"canParse",value:function canParse(e){var r;if(arguments.length<1)throw new t.TypeError("Failed to execute 'canParse' on 'URL': 1 argument required, but only ".concat(arguments.length," present."));var s=[],u=arguments[0];u=n.USVString(u,{context:"Failed to execute 'canParse' on 'URL': parameter 1",globals:t}),s.push(u);var l=arguments[1];return void 0!==l&&(l=n.USVString(l,{context:"Failed to execute 'canParse' on 'URL': parameter 2",globals:t})),s.push(l),(r=h.implementation).canParse.apply(r,s)}}])}();Object.defineProperties(v.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})),Object.defineProperties(v,{parse:{enumerable:!0},canParse:{enumerable:!0}}),l.URL=v,Object.defineProperty(t,"URL",{configurable:!0,writable:!0,value:v}),r.includes("Window")&&Object.defineProperty(t,"webkitURL",{configurable:!0,writable:!0,value:v})}};var h=require("./URL-impl.js"),v=getAugmentedNamespace(Object.freeze({__proto__:null})),y=require("webidl-conversions"),g=require("./utils.js"),m=require("./Function.js"),b=g.newObjectInRealm,S=g.implSymbol,P=g.ctorRegistrySymbol,w="URLSearchParams";function makeWrapper(e,t){var r;return void 0!==t&&(r=t.prototype),g.isObject(r)||(r=e[P].URLSearchParams.prototype),Object.create(r)}e.is=function(e){return g.isObject(e)&&Object.hasOwn(e,S)&&e[S]instanceof L.implementation},e.isImpl=function(e){return g.isObject(e)&&e instanceof L.implementation},e.convert=function(t,r){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).context,s=void 0===n?"The provided value":n;if(e.is(r))return g.implForWrapper(r);throw new t.TypeError("".concat(s," is not of type 'URLSearchParams'."))},e.createDefaultIterator=function(e,t,r){var n=e[P]["URLSearchParams Iterator"],s=Object.create(n);return Object.defineProperty(s,g.iterInternalSymbol,{value:{target:t,kind:r,index:0},configurable:!0}),s},e.create=function(t,r,n){var s=makeWrapper(t);return e.setup(s,t,r,n)},e.createImpl=function(t,r,n){var s=e.create(t,r,n);return g.implForWrapper(s)},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,S,{value:new L.implementation(r,n,s),configurable:!0}),t[S][g.wrapperSymbol]=t,L.init&&L.init(t[S]),t},e.new=function(t,r){var n=makeWrapper(t,r);return e._internalSetup(n,t),Object.defineProperty(n,S,{value:Object.create(L.implementation.prototype),configurable:!0}),n[S][g.wrapperSymbol]=n,L.init&&L.init(n[S]),n[S]};var U=new Set(["Window","Worker"]);e.install=function(t,r){if(r.some(function(e){return U.has(e)})){var n=g.initCtorRegistry(t),s=function(){return _createClass(function URLSearchParams(){_classCallCheck(this,URLSearchParams);var r=[],n=arguments[0];if(void 0!==n)if(g.isObject(n))if(void 0!==g.getMethod(n,Symbol.iterator,"Failed to construct 'URLSearchParams': parameter 1")){if(!g.isObject(n))throw new t.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence is not an iterable object.");var s,u=[],l=_createForOfIteratorHelper(n);try{for(l.s();!(s=l.n()).done;){var c=s.value;if(!g.isObject(c))throw new t.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element is not an iterable object.");var h,v=[],m=_createForOfIteratorHelper(c);try{for(m.s();!(h=m.n()).done;){var b=h.value;b=y.USVString(b,{context:"Failed to construct 'URLSearchParams': parameter 1 sequence's element's element",globals:t}),v.push(b)}}catch(e){m.e(e)}finally{m.f()}c=v,u.push(c)}}catch(e){l.e(e)}finally{l.f()}n=u}else{if(!g.isObject(n))throw new t.TypeError("Failed to construct 'URLSearchParams': parameter 1 record is not an object.");var S,P=Object.create(null),w=_createForOfIteratorHelper(Reflect.ownKeys(n));try{for(w.s();!(S=w.n()).done;){var U=S.value,R=Object.getOwnPropertyDescriptor(n,U);if(R&&R.enumerable){var L=U;L=y.USVString(L,{context:"Failed to construct 'URLSearchParams': parameter 1 record's key",globals:t});var I=n[U];I=y.USVString(I,{context:"Failed to construct 'URLSearchParams': parameter 1 record's value",globals:t}),P[L]=I}}}catch(e){w.e(e)}finally{w.f()}n=P}else n=y.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)},[{key:"append",value:function append(r,n){var s,u=null!=this?this:t;if(!e.is(u))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 l=[],c=arguments[0];c=y.USVString(c,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 1",globals:t}),l.push(c);var h=arguments[1];return h=y.USVString(h,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 2",globals:t}),l.push(h),g.tryWrapperForImpl((s=u[S]).append.apply(s,l))}},{key:"delete",value:function _delete(r){var n,s=null!=this?this:t;if(!e.is(s))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 u=[],l=arguments[0];l=y.USVString(l,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 1",globals:t}),u.push(l);var c=arguments[1];return void 0!==c&&(c=y.USVString(c,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 2",globals:t})),u.push(c),g.tryWrapperForImpl((n=s[S]).delete.apply(n,u))}},{key:"get",value:function get(r){var n,s=null!=this?this:t;if(!e.is(s))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 u=[],l=arguments[0];return l=y.USVString(l,{context:"Failed to execute 'get' on 'URLSearchParams': parameter 1",globals:t}),u.push(l),(n=s[S]).get.apply(n,u)}},{key:"getAll",value:function getAll(r){var n,s=null!=this?this:t;if(!e.is(s))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 u=[],l=arguments[0];return l=y.USVString(l,{context:"Failed to execute 'getAll' on 'URLSearchParams': parameter 1",globals:t}),u.push(l),g.tryWrapperForImpl((n=s[S]).getAll.apply(n,u))}},{key:"has",value:function has(r){var n,s=null!=this?this:t;if(!e.is(s))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 u=[],l=arguments[0];l=y.USVString(l,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 1",globals:t}),u.push(l);var c=arguments[1];return void 0!==c&&(c=y.USVString(c,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 2",globals:t})),u.push(c),(n=s[S]).has.apply(n,u)}},{key:"set",value:function set(r,n){var s,u=null!=this?this:t;if(!e.is(u))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 l=[],c=arguments[0];c=y.USVString(c,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 1",globals:t}),l.push(c);var h=arguments[1];return h=y.USVString(h,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 2",globals:t}),l.push(h),g.tryWrapperForImpl((s=u[S]).set.apply(s,l))}},{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 g.tryWrapperForImpl(r[S].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[S].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=m.convert(t,r,{context:"Failed to execute 'forEach' on 'iterable': The callback provided as parameter 1"});for(var n=arguments[1],s=Array.from(this[S]),u=0;u<s.length;){var l=_slicedToArray(s[u].map(g.tryWrapperForImpl),2),c=l[0],h=l[1];r.call(n,h,c,this),s=Array.from(this[S]),u++}}},{key:"size",get:function get(){var r=null!=this?this:t;if(!e.is(r))throw new t.TypeError("'get size' called on an object that is not a valid instance of URLSearchParams.");return r[S].size}}])}();Object.defineProperties(s.prototype,_defineProperty(_defineProperty({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},size:{enumerable:!0}},Symbol.toStringTag,{value:"URLSearchParams",configurable:!0}),Symbol.iterator,{value:s.prototype.entries,configurable:!0,writable:!0})),n[w]=s,n["URLSearchParams Iterator"]=Object.create(n["%IteratorPrototype%"],_defineProperty({},Symbol.toStringTag,{configurable:!0,value:"URLSearchParams Iterator"})),g.define(n["URLSearchParams Iterator"],{next:function next(){var e=this&&this[g.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,s=e.index,u=Array.from(r[S]);if(s>=u.length)return b(t,{value:void 0,done:!0});var l=u[s];return e.index=s+1,b(t,g.iteratorResult(l.map(g.tryWrapperForImpl),n))}}),Object.defineProperty(t,w,{configurable:!0,writable:!0,value:s})}};var R,L=require("./URLSearchParams-impl.js"),I=getAugmentedNamespace(Object.freeze({__proto__:null}));require("@exodus/bytes/encoding.js");var A=require("@exodus/bytes/whatwg.js").percentEncodeAfterEncoding,O=require("./infra"),x=require("./encoding").utf8DecodeWithoutBOM,E=require("./url-miscellaneous"),j=E.containsForbiddenHostCodePoint,_=E.containsPercentEncodedByte,C=E.defaultPort,D=E.domainParser,T=E.endsInANumber,V=E.failure,k=E.isInvalidURLCodePoint,q=E.isNormalizedWindowsDriveLetterString,N=E.isSpecialScheme,W=E.isWindowsDriveLetterCodePoints,H=E.isWindowsDriveLetterString,M=E.parseIPv4Number,z=E.p,$=require("./percent-encoding"),G=$.percentDecodeString,B=$.utf8PercentEncodeCodePoint,Q=$.utf8PercentEncodeString,J=$.isC0ControlPercentEncode,K=$.isFragmentPercentEncode,Z=$.extraQueryPercentEncodeChars,X=$.extraSpecialQueryPercentEncodeChars,Y=$.isPathPercentEncode,ee=$.isUserinfoPercentEncode;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 isInvalidPercentEncoding(e,t){return!(e[t]!==z("%")||O.isASCIIHex(e[t+1])&&O.isASCIIHex(e[t+2]))}function isSpecial(e){return N(e.scheme)}function isNotSpecial(e){return!N(e.scheme)}function parseHost(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("["===e[0])return"]"!==e[e.length-1]?(null==t||t.push("IPv6-unclosed"),V):function parseIPv6(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=[0,0,0,0,0,0,0,0],n=0,s=null,u=0;if((e=Array.from(e,function(e){return e.codePointAt(0)}))[u]===z(":")){if(e[u+1]!==z(":"))return null==t||t.push("IPv6-invalid-compression"),V;u+=2,s=++n}for(;u<e.length;){if(8===n)return null==t||t.push("IPv6-too-many-pieces"),V;if(e[u]!==z(":")){for(var l=0,c=0;c<4&&O.isASCIIHex(e[u]);)l=16*l+parseInt(at(e,u),16),++u,++c;if(e[u]===z(".")){if(0===c)return null==t||t.push("IPv4-in-IPv6-invalid-code-point"),V;if(u-=c,n>6)return null==t||t.push("IPv4-in-IPv6-too-many-pieces"),V;for(var h=0;void 0!==e[u];){var v=null;if(h>0){if(!(e[u]===z(".")&&h<4))return null==t||t.push("IPv4-in-IPv6-invalid-code-point"),V;++u}if(!O.isASCIIDigit(e[u]))return null==t||t.push("IPv4-in-IPv6-invalid-code-point"),V;for(;O.isASCIIDigit(e[u]);){var y=parseInt(at(e,u),10);if(null===v)v=y;else{if(0===v)return null==t||t.push("IPv4-in-IPv6-invalid-code-point"),V;v=10*v+y}if(v>255)return null==t||t.push("IPv4-in-IPv6-out-of-range-part"),V;++u}r[n]=256*r[n]+v,2!==++h&&4!==h||++n}if(4!==h)return null==t||t.push("IPv4-in-IPv6-too-few-parts"),V;break}if(e[u]===z(":")){if(void 0===e[++u])return null==t||t.push("IPv6-invalid-code-point"),V}else if(void 0!==e[u])return null==t||t.push("IPv6-invalid-code-point"),V;c>1&&l<Math.pow(16,c-1)&&(null==t||t.push("IPv6-piece-leading-zero")),r[n]=l,++n}else{if(null!==s)return null==t||t.push("IPv6-multiple-compression"),V;++u,s=++n}}if(null!==s){var g=n-s;for(n=7;0!==n&&g>0;){var m=r[s+g-1];r[s+g-1]=r[n],r[n]=m,--n,--g}}else if(null===s&&8!==n)return null==t||t.push("IPv6-too-few-pieces"),V;return r}(e.substring(1,e.length-1),t);if(r)return function parseOpaqueHost(e,t){if(j(e))return null==t||t.push("host-invalid-code-point"),V;return function validateURLUnits(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null!==t){var r=Array.from(e,function(e){return e.codePointAt(0)});r.some(k)&&t.push("invalid-URL-unit"),r.some(function(e,t){return isInvalidPercentEncoding(r,t)})&&t.push("invalid-URL-unit")}}(e,t),Q(e,J)}(e,t);t&&_(e)&&t.push("domain-percent-encoded");var n=x(G(e)),s=D(n,t);return s===V?V:T(s)?(O.isASCIIString(n)||null==t||t.push("IPv4-non-ASCII-input"),function parseIPv4(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.split(".");if(""===r[r.length-1]&&(null==t||t.push("IPv4-empty-part"),r.length>1&&r.pop()),r.length>4)return null==t||t.push("IPv4-too-many-parts"),V;r.length<4&&(null==t||t.push("IPv4-too-few-parts"));var n,s=[],u=_createForOfIteratorHelper(r);try{for(u.s();!(n=u.n()).done;){var l=n.value,c=M(l,t);if(c===V)return null==t||t.push("IPv4-non-numeric-part"),V;s.push(c)}}catch(e){u.e(e)}finally{u.f()}null!==t&&s.some(function(e){return e>255})&&t.push("IPv4-out-of-range-part");for(var h=0;h<s.length-1;++h)if(s[h]>255)return V;if(s[s.length-1]>=Math.pow(256,5-s.length))return V;for(var v=s.pop(),y=0,g=0,m=s;g<m.length;g++)v+=m[g]*Math.pow(256,3-y),++y;return v}(s,t)):s}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 findTheIPv6AddressCompressedPieceIndex(e){for(var t=null,r=1,n=null,s=0,u=0;u<e.length;++u)0!==e[u]?(s>r&&(t=n,r=s),n=null,s=0):(null===n&&(n=u),++s);return s>r?n:t}(e),n=!1,s=0;s<=7;++s)n&&0===e[s]||(n&&(n=!1),r!==s?(t+=e[s].toString(16),7!==s&&(t+=":")):(t+=0===s?"::":":",n=!0));return t}(e),"]"):e}function shortenPath(e){var t=e.path;0!==t.length&&("file"===e.scheme&&1===t.length&&q(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,s){var u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null;if(this.pointer=0,this.input=e,this.base=t||null,this.encoding=r||"utf-8",this.stateOverride=s,this.url=n,this.failure=!1,this.validationErrors=u,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null};var l,c=function trimControlChars(e){for(var t=0,r=e.length;t<r&&!(e.charCodeAt(t)>32);++t);for(;r>t&&!(e.charCodeAt(r-1)>32);--r);return e.substring(t,r)}(this.input);if(c!==this.input)null===(l=this.validationErrors)||void 0===l||l.push("invalid-URL-unit");this.input=c}var h,v=function trimTabAndNewline(e){return e.replace(/\t|\n|\r/g,"")}(this.input);v!==this.input&&(null===(h=this.validationErrors)||void 0===h||h.push("invalid-URL-unit"));for(this.input=v,this.state=s||"scheme start",this.buffer="",this.atSignSeen=!1,this.insideBrackets=!1,this.passwordTokenSeen=!1,this.input=Array.from(this.input,function(e){return e.codePointAt(0)});this.pointer<=this.input.length;++this.pointer){var y=this.input[this.pointer],g=isNaN(y)?void 0:String.fromCodePoint(y),m=this["parse ".concat(this.state)](y,g);if(!m)break;if(m===V){this.failure=!0;break}}}URLStateMachine.prototype.validateURLUnit=function(e){null!==this.validationErrors&&(k(e)&&this.validationErrors.push("invalid-URL-unit"),isInvalidPercentEncoding(this.input,this.pointer)&&this.validationErrors.push("invalid-URL-unit"))},URLStateMachine.prototype["parse scheme start"]=function parseSchemeStart(e,t){if(O.isASCIIAlpha(e))this.buffer+=t.toLowerCase(),this.state="scheme";else{if(this.stateOverride)return V;this.state="no scheme",--this.pointer}return!0},URLStateMachine.prototype["parse scheme"]=function parseScheme(e,t){if(O.isASCIIAlphanumeric(e)||e===z("+")||e===z("-")||e===z("."))this.buffer+=t.toLowerCase();else if(e===z(":")){if(this.stateOverride){if(isSpecial(this.url)&&!N(this.buffer))return!1;if(!isSpecial(this.url)&&N(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===C(this.url.scheme)&&(this.url.port=null),!1;if(this.buffer="","file"===this.url.scheme){var r;if(this.input[this.pointer+1]!==z("/")||this.input[this.pointer+2]!==z("/"))null===(r=this.validationErrors)||void 0===r||r.push("special-scheme-missing-following-solidus");this.state="file"}else 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]===z("/")?(this.state="path or authority",++this.pointer):(this.url.path="",this.state="opaque path")}else{if(this.stateOverride)return V;this.buffer="",this.state="no scheme",this.pointer=-1}return!0},URLStateMachine.prototype["parse no scheme"]=function parseNoScheme(e){var t;return null===this.base||hasAnOpaquePath(this.base)&&e!==z("#")?(null===(t=this.validationErrors)||void 0===t||t.push("missing-scheme-non-relative-URL"),V):(hasAnOpaquePath(this.base)&&e===z("#")?(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){var t;e===z("/")&&this.input[this.pointer+1]===z("/")?(this.state="special authority ignore slashes",++this.pointer):(null===(t=this.validationErrors)||void 0===t||t.push("special-scheme-missing-following-solidus"),this.state="relative",--this.pointer);return!0},URLStateMachine.prototype["parse path or authority"]=function parsePathOrAuthority(e){return e===z("/")?this.state="authority":(this.state="path",--this.pointer),!0},URLStateMachine.prototype["parse relative"]=function parseRelative(e){if(this.url.scheme=this.base.scheme,e===z("/"))this.state="relative slash";else if(isSpecial(this.url)&&e===z("\\")){var t;null===(t=this.validationErrors)||void 0===t||t.push("invalid-reverse-solidus"),this.state="relative slash"}else 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===z("?")?(this.url.query="",this.state="query"):e===z("#")?(this.url.fragment="",this.state="fragment"):isNaN(e)||(this.url.query=null,this.url.path.pop(),this.state="path",--this.pointer);return!0},URLStateMachine.prototype["parse relative slash"]=function parseRelativeSlash(e){if(!isSpecial(this.url)||e!==z("/")&&e!==z("\\"))e===z("/")?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);else{var t;if(e===z("\\"))null===(t=this.validationErrors)||void 0===t||t.push("invalid-reverse-solidus");this.state="special authority ignore slashes"}return!0},URLStateMachine.prototype["parse special authority slashes"]=function parseSpecialAuthoritySlashes(e){var t;e===z("/")&&this.input[this.pointer+1]===z("/")?(this.state="special authority ignore slashes",++this.pointer):(null===(t=this.validationErrors)||void 0===t||t.push("special-scheme-missing-following-solidus"),this.state="special authority ignore slashes",--this.pointer);return!0},URLStateMachine.prototype["parse special authority ignore slashes"]=function parseSpecialAuthorityIgnoreSlashes(e){var t;e!==z("/")&&e!==z("\\")?(this.state="authority",--this.pointer):null===(t=this.validationErrors)||void 0===t||t.push("special-scheme-missing-following-solidus");return!0},URLStateMachine.prototype["parse authority"]=function parseAuthority(e,t){if(e===z("@")){var r;null===(r=this.validationErrors)||void 0===r||r.push("invalid-credentials"),this.atSignSeen&&(this.buffer="%40".concat(this.buffer)),this.atSignSeen=!0;var n,s=_createForOfIteratorHelper(this.buffer);try{for(s.s();!(n=s.n()).done;){var u=n.value.codePointAt(0);if(u!==z(":")||this.passwordTokenSeen){var l=B(u,ee);this.passwordTokenSeen?this.url.password+=l:this.url.username+=l}else this.passwordTokenSeen=!0}}catch(e){s.e(e)}finally{s.f()}this.buffer=""}else if(isNaN(e)||e===z("/")||e===z("?")||e===z("#")||isSpecial(this.url)&&e===z("\\")){var c;if(this.atSignSeen&&""===this.buffer)return null===(c=this.validationErrors)||void 0===c||c.push("host-missing"),V;this.pointer-=function countSymbols(e){return _toConsumableArray(e).length}(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!==z(":")||this.insideBrackets)if(isNaN(e)||e===z("/")||e===z("?")||e===z("#")||isSpecial(this.url)&&e===z("\\")){var r;if(--this.pointer,isSpecial(this.url)&&""===this.buffer)return null===(r=this.validationErrors)||void 0===r||r.push("host-missing"),V;if(this.stateOverride&&""===this.buffer&&(includesCredentials(this.url)||null!==this.url.port))return V;var n=parseHost(this.buffer,this.validationErrors,isNotSpecial(this.url));if(n===V)return V;if(this.url.host=n,this.buffer="",this.state="path start",this.stateOverride)return!1}else e===z("[")?this.insideBrackets=!0:e===z("]")&&(this.insideBrackets=!1),this.buffer+=t;else{var s;if(""===this.buffer)return null===(s=this.validationErrors)||void 0===s||s.push("host-missing"),V;if("hostname"===this.stateOverride)return V;var u=parseHost(this.buffer,this.validationErrors,isNotSpecial(this.url));if(u===V)return V;this.url.host=u,this.buffer="",this.state="port"}return!0},URLStateMachine.prototype["parse port"]=function parsePort(e,t){if(O.isASCIIDigit(e))this.buffer+=t;else{var r;if(!(isNaN(e)||e===z("/")||e===z("?")||e===z("#")||isSpecial(this.url)&&e===z("\\")||this.stateOverride))return null===(r=this.validationErrors)||void 0===r||r.push("port-invalid"),V;if(""!==this.buffer){var n,s=parseInt(this.buffer,10);if(s>Math.pow(2,16)-1)return null===(n=this.validationErrors)||void 0===n||n.push("port-out-of-range"),V;if(this.url.port=s===C(this.url.scheme)?null:s,this.buffer="",this.stateOverride)return!1}if(this.stateOverride)return V;this.state="path start",--this.pointer}return!0};var te=new Set([z("/"),z("\\"),z("?"),z("#")]);function startsWithWindowsDriveLetter(e,t){var r=e.length-t;return r>=2&&W(e[t],e[t+1])&&(2===r||te.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 s=t.value;r+="/".concat(s)}}catch(e){n.e(e)}finally{n.f()}return r}function basicURLParse(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=new URLStateMachine(e,t.baseURL,t.encoding,t.url,t.stateOverride,r);return n.failure?null:n.url}URLStateMachine.prototype["parse file"]=function parseFile(e){if(this.url.scheme="file",this.url.host="",e===z("/")||e===z("\\")){var t;if(e===z("\\"))null===(t=this.validationErrors)||void 0===t||t.push("invalid-reverse-solidus");this.state="file slash"}else if(null!==this.base&&"file"===this.base.scheme){if(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,e===z("?"))this.url.query="",this.state="query";else if(e===z("#"))this.url.fragment="",this.state="fragment";else if(!isNaN(e)){var r;if(this.url.query=null,startsWithWindowsDriveLetter(this.input,this.pointer))null===(r=this.validationErrors)||void 0===r||r.push("file-invalid-Windows-drive-letter"),this.url.path=[];else shortenPath(this.url);this.state="path",--this.pointer}}else this.state="path",--this.pointer;return!0},URLStateMachine.prototype["parse file slash"]=function parseFileSlash(e){if(e===z("/")||e===z("\\")){var t;if(e===z("\\"))null===(t=this.validationErrors)||void 0===t||t.push("invalid-reverse-solidus");this.state="file host"}else null!==this.base&&"file"===this.base.scheme&&(!startsWithWindowsDriveLetter(this.input,this.pointer)&&q(this.base.path[0])&&this.url.path.push(this.base.path[0]),this.url.host=this.base.host),this.state="path",--this.pointer;return!0},URLStateMachine.prototype["parse file host"]=function parseFileHost(e,t){var r;if(isNaN(e)||e===z("/")||e===z("\\")||e===z("?")||e===z("#"))if(--this.pointer,!this.stateOverride&&H(this.buffer))null===(r=this.validationErrors)||void 0===r||r.push("file-invalid-Windows-drive-letter-host"),this.state="path";else if(""===this.buffer){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{var n=parseHost(this.buffer,this.validationErrors,isNotSpecial(this.url));if(n===V)return V;if("localhost"===n&&(n=""),this.url.host=n,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=t;return!0},URLStateMachine.prototype["parse path start"]=function parsePathStart(e){if(isSpecial(this.url)){var t;if(e===z("\\"))null===(t=this.validationErrors)||void 0===t||t.push("invalid-reverse-solidus");this.state="path",e!==z("/")&&e!==z("\\")&&--this.pointer}else this.stateOverride||e!==z("?")?this.stateOverride||e!==z("#")?void 0!==e?(this.state="path",e!==z("/")&&--this.pointer):this.stateOverride&&null===this.url.host&&this.url.path.push(""):(this.url.fragment="",this.state="fragment"):(this.url.query="",this.state="query");return!0},URLStateMachine.prototype["parse path"]=function parsePath(e){if(isNaN(e)||e===z("/")||isSpecial(this.url)&&e===z("\\")||!this.stateOverride&&(e===z("?")||e===z("#"))){var t;if(isSpecial(this.url)&&e===z("\\"))null===(t=this.validationErrors)||void 0===t||t.push("invalid-reverse-solidus");!function isDoubleDot(e){return".."===(e=e.toLowerCase())||"%2e."===e||".%2e"===e||"%2e%2e"===e}(this.buffer)?!isSingleDot(this.buffer)||e===z("/")||isSpecial(this.url)&&e===z("\\")?isSingleDot(this.buffer)||("file"===this.url.scheme&&0===this.url.path.length&&H(this.buffer)&&(this.buffer="".concat(this.buffer[0],":")),this.url.path.push(this.buffer)):this.url.path.push(""):(shortenPath(this.url),e===z("/")||isSpecial(this.url)&&e===z("\\")||this.url.path.push("")),this.buffer="",e===z("?")&&(this.url.query="",this.state="query"),e===z("#")&&(this.url.fragment="",this.state="fragment")}else this.validateURLUnit(e),this.buffer+=B(e,Y);return!0},URLStateMachine.prototype["parse opaque path"]=function parseOpaquePath(e){if(e===z("?"))this.url.query="",this.state="query";else if(e===z("#"))this.url.fragment="",this.state="fragment";else if(e===z(" ")){var t;null===(t=this.validationErrors)||void 0===t||t.push("invalid-URL-unit");var r=this.input[this.pointer+1];r===z("?")||r===z("#")?this.url.path+="%20":this.url.path+=" "}else isNaN(e)||(this.validateURLUnit(e),this.url.path+=B(e,J));return!0},URLStateMachine.prototype["parse query"]=function parseQuery(e,t){if(isSpecial(this.url)&&"ws"!==this.url.scheme&&"wss"!==this.url.scheme||(this.encoding="utf-8"),!this.stateOverride&&e===z("#")||isNaN(e)){var r=isSpecial(this.url)?X:Z;this.url.query+=A(this.encoding,this.buffer,r),this.buffer="",e===z("#")&&(this.url.fragment="",this.state="fragment")}else isNaN(e)||(this.validateURLUnit(e),this.buffer+=t);return!0},URLStateMachine.prototype["parse fragment"]=function parseFragment(e){return isNaN(e)||(this.validateURLUnit(e),this.url.fragment+=B(e,K)),!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":var t=module.exports.parseURL(serializePath(e));return null===t||"http"!==t.scheme&&"https"!==t.scheme?"null":module.exports.serializeURLOrigin(t);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){return basicURLParse(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})},module.exports.setTheUsername=function(e,t){e.username=Q(t,ee)},module.exports.setThePassword=function(e,t){e.password=Q(t,ee)},module.exports.serializeHost=serializeHost,module.exports.cannotHaveAUsernamePasswordPort=function cannotHaveAUsernamePasswordPort(e){return null===e.host||""===e.host||"file"===e.scheme},module.exports.hasAnOpaquePath=hasAnOpaquePath,module.exports.serializeInteger=function(e){return String(e)},module.exports.parseURL=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return module.exports.basicURLParse(e,{baseURL:t.baseURL,encoding:t.encoding})},module.exports.parseURLWithValidationErrors=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];return{url:basicURLParse(e,{baseURL:t.baseURL,encoding:t.encoding},r),validationErrors:r}};var re=getAugmentedNamespace(Object.freeze({__proto__:null})),ne=require("./infra").isASCIIHex,ie=require("./encoding").utf8Encode;function p$1(e){return e.codePointAt(0)}function percentEncode(e){var t=e.toString(16).toUpperCase();return 1===t.length&&(t="0".concat(t)),"%".concat(t)}function percentDecodeBytes(e){for(var t=new Uint8Array(e.byteLength),r=0,n=0;n<e.byteLength;++n){var s=e[n];if(37!==s)t[r++]=s;else if(37!==s||ne(e[n+1])&&ne(e[n+2])){var u=parseInt(String.fromCodePoint(e[n+1],e[n+2]),16);t[r++]=u,n+=2}else t[r++]=s}return t.slice(0,r)}function isC0ControlPercentEncode(e){return e<=31||e>126}var ae=new Set([p$1(" "),p$1('"'),p$1("<"),p$1(">"),p$1("`")]);var oe=new Set([p$1(" "),p$1('"'),p$1("#"),p$1("<"),p$1(">")]),se=String.fromCodePoint.apply(String,_toConsumableArray(_toConsumableArray(oe).sort()));function isQueryPercentEncode(e){return isC0ControlPercentEncode(e)||oe.has(e)}var ue=new Set([].concat(_toConsumableArray(oe),[p$1("'")])),le=String.fromCodePoint.apply(String,_toConsumableArray(_toConsumableArray(ue).sort()));var ce=new Set([p$1("?"),p$1("`"),p$1("{"),p$1("}"),p$1("^")]);function isPathPercentEncode(e){return isQueryPercentEncode(e)||ce.has(e)}var he=new Set([p$1("/"),p$1(":"),p$1(";"),p$1("="),p$1("@"),p$1("["),p$1("\\"),p$1("]"),p$1("|")]);function isUserinfoPercentEncode(e){return isPathPercentEncode(e)||he.has(e)}var pe=new Set([p$1("$"),p$1("%"),p$1("&"),p$1("+"),p$1(",")]);var fe=new Set([p$1("!"),p$1("'"),p$1("("),p$1(")"),p$1("~")]);function utf8PercentEncodeCodePointInternal(e,t){var r,n="",s=_createForOfIteratorHelper(ie(e));try{for(s.s();!(r=s.n()).done;){var u=r.value;t(u)?n+=percentEncode(u):n+=String.fromCharCode(u)}}catch(e){s.e(e)}finally{s.f()}return n}module.exports={isC0ControlPercentEncode:isC0ControlPercentEncode,isFragmentPercentEncode:function isFragmentPercentEncode(e){return isC0ControlPercentEncode(e)||ae.has(e)},isQueryPercentEncode:isQueryPercentEncode,isSpecialQueryPercentEncode:function isSpecialQueryPercentEncode(e){return isC0ControlPercentEncode(e)||ue.has(e)},isPathPercentEncode:isPathPercentEncode,isUserinfoPercentEncode:isUserinfoPercentEncode,isURLEncodedPercentEncode:function isURLEncodedPercentEncode(e){return function isComponentPercentEncode(e){return isUserinfoPercentEncode(e)||pe.has(e)}(e)||fe.has(e)},extraQueryPercentEncodeChars:se,extraSpecialQueryPercentEncodeChars:le,percentDecodeString:function percentDecodeString(e){return percentDecodeBytes(ie(e))},percentDecodeBytes:percentDecodeBytes,utf8PercentEncodeString:function utf8PercentEncodeString(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s="",u=_createForOfIteratorHelper(e);try{for(u.s();!(r=u.n()).done;){var l=r.value;s+=n&&" "===l?"+":utf8PercentEncodeCodePointInternal(l,t)}}catch(e){u.e(e)}finally{u.f()}return s},utf8PercentEncodeCodePoint:function utf8PercentEncodeCodePoint(e,t){return utf8PercentEncodeCodePointInternal(String.fromCodePoint(e),t)}};var de,ve,ye=getAugmentedNamespace(Object.freeze({__proto__:null}));var ge=require("tr46"),me=require("./infra");function p(e){return e.codePointAt(0)}var be=Symbol("failure"),Se={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Pe=new Set([p("!"),p("$"),p("&"),p("'"),p("("),p(")"),p("*"),p("+"),p(","),p("-"),p("."),p("/"),p(":"),p(";"),p("="),p("?"),p("@"),p("_"),p("~")]),we=new Set([0,9,10,13,32,p("#"),p("/"),p(":"),p("<"),p(">"),p("?"),p("@"),p("["),p("\\"),p("]"),p("^"),p("|")]);function isURLCodePoint(e){return me.isASCIIAlphanumeric(e)||Pe.has(e)||e>=160&&e<=1114109&&(e<55296||e>57343)&&!me.isNoncharacter(e)}function domainParserToASCII(e,t){return ge.toASCII(e,{checkHyphens:t,checkBidi:!0,checkJoiners:!0,useSTD3ASCIIRules:t,transitionalProcessing:!1,verifyDNSLength:t,ignoreInvalidPunycode:!1})}function parseIPv4Number(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(""===e)return be;var r=!1,n=10;if(e.length>=2&&"0"===e.charAt(0)&&"x"===e.charAt(1).toLowerCase()?(r=!0,e=e.substring(2),n=16):e.length>=2&&"0"===e.charAt(0)&&(r=!0,e=e.substring(1),n=8),""===e)return null==t||t.push("IPv4-non-decimal-part"),0;var s=/(?:[\0-\/8-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;return 10===n&&(s=/(?:[\0-\/:-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/),16===n&&(s=/(?:[\0-\/:-@G-`g-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/),s.test(e)?be:(r&&(null==t||t.push("IPv4-non-decimal-part")),parseInt(e,n))}function isSpecialScheme(e){return void 0!==Se[e.toLowerCase()]}module.exports={containsForbiddenHostCodePoint:function containsForbiddenHostCodePoint(e){return _toConsumableArray(e).some(function(e){return we.has(e.codePointAt(0))})},containsPercentEncodedByte:function containsPercentEncodedByte(e){return/%[0-9A-Fa-f]{2}/.test(e)},defaultPort:function defaultPort(e){return Se[e.toLowerCase()]},domainParser:function domainParser(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(n||r){var s=domainParserToASCII(e,!0);if(null===s&&(null==r||r.push("domain-to-ASCII")),n)return null===s?be:s}if(me.isASCIIString(e))t=e.toLowerCase();else if(null===(t=domainParserToASCII(e,!1)))return be;return""===t||function containsForbiddenDomainCodePoint(e){return _toConsumableArray(e).some(function(e){var t=e.codePointAt(0);return we.has(t)||t>=0&&t<=31||t===p("%")||127===t})}(t)?be:t},endsInANumber: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!!/^[0-9]+$/.test(r)||parseIPv4Number(r)!==be},failure:be,forbiddenHostCodePoints:we,isInvalidURLCodePoint:function isInvalidURLCodePoint(e){return!isURLCodePoint(e)&&e!==p("%")},isNormalizedWindowsDriveLetterString:function isNormalizedWindowsDriveLetterString(e){return 2===e.length&&me.isASCIIAlpha(e.codePointAt(0))&&":"===e[1]},isPercentEncodedByteAt:function isPercentEncodedByteAt(e,t){return t+2<e.length&&"%"===e[t]&&me.isASCIIHex(e.charCodeAt(t+1))&&me.isASCIIHex(e.charCodeAt(t+2))},parseIPv4Number:parseIPv4Number,isSpecialScheme:isSpecialScheme,isSpecialSchemeExceptFile:function isSpecialSchemeExceptFile(e){return isSpecialScheme(e)&&"file"!==e.toLowerCase()},isURLCodePoint:isURLCodePoint,isWindowsDriveLetterCodePoints:function isWindowsDriveLetterCodePoints(e,t){return me.isASCIIAlpha(e)&&(t===p(":")||t===p("|"))},isWindowsDriveLetterString:function isWindowsDriveLetterString(e){return 2===e.length&&me.isASCIIAlpha(e.codePointAt(0))&&(":"===e[1]||"|"===e[1])},p:p};var Ue,Re,Le,Ie=getAugmentedNamespace(Object.freeze({__proto__:null}));function requireUrlStringValidator(){if(Re)return Ue;Re=1;var e=function requireInfra(){if(ve)return de;function isASCIIDigit(e){return e>=48&&e<=57}function isASCIIAlpha(e){return e>=65&&e<=90||e>=97&&e<=122}return ve=1,de={isASCIIDigit:isASCIIDigit,isASCIIAlpha:isASCIIAlpha,isASCIIAlphanumeric:function isASCIIAlphanumeric(e){return isASCIIAlpha(e)||isASCIIDigit(e)},isASCIIHex:function isASCIIHex(e){return isASCIIDigit(e)||e>=65&&e<=70||e>=97&&e<=102},isASCIIString:function isASCIIString(e){return!/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/.test(e)},isNoncharacter:function isNoncharacter(e){return e>=64976&&e<=65007||!(65534&~e)}}}(),t=Ie,r=t.domainParser,n=t.endsInANumber,s=t.failure,u=t.forbiddenHostCodePoints,l=t.isPercentEncodedByteAt,c=t.isSpecialSchemeExceptFile,h=t.isURLCodePoint,v=t.p,y=re.hasAnOpaquePath,g=new Set([v("/"),v("?")]),m=new Set([v("?")]);function splitOffFragment(e){var t=e.indexOf("#");return-1===t?{beforeFragment:e,fragment:null}:{beforeFragment:e.substring(0,t),fragment:e.substring(t+1)}}function splitOffQuery(e){var t=e.indexOf("?");return-1===t?{beforeQuery:e,query:null}:{beforeQuery:e.substring(0,t),query:e.substring(t+1)}}function isValidSchemeRelativeSpecialURLString(e){if(!e.startsWith("//"))return!1;var t=splitOffPath(e.substring(2)),r=t.authority,n=t.path;return function isValidHostAndPortString(e,t){var r=splitHostAndPort(e);return null!==r&&""!==r.host&&t(r.host)&&(null===r.port||isValidURLPortString(r.port))}(r,isValidHostString)&&(null===n||isValidPathAbsoluteURLString(n))}function isValidSchemeRelativeURLString(e){if(!e.startsWith("//"))return!1;var t=splitOffPath(e.substring(2)),r=t.authority,n=t.path;return function isValidOpaqueHostAndPortString(e){if(""===e)return!0;var t=splitHostAndPort(e);return null!==t&&""!==t.host&&function isValidOpaqueHostString(e){return isValidBracketedIPv6AddressString(e)||""!==e&&isValidURLUnits(e,u)}(t.host)&&(null===t.port||isValidURLPortString(t.port))}(r)&&(null===n||isValidPathAbsoluteURLString(n))}function isValidSchemeRelativeFileURLString(e){if(!e.startsWith("//"))return!1;var t=e.substring(2);return""===t||function isValidHostAndPathAbsoluteURLString(e){var t=splitOffPath(e),r=t.authority,n=t.path;return isValidHostString(r)&&(null===n||isValidPathAbsoluteURLString(n))}(t)||isValidPathAbsoluteURLString(t)}function splitOffPath(e){var t=e.indexOf("/");return-1===t?{authority:e,path:null}:{authority:e.substring(0,t),path:e.substring(t)}}function splitHostAndPort(e){if(e.startsWith("[")){var t=e.indexOf("]");if(-1===t)return null;var r=e.substring(t+1);return""===r||r.startsWith(":")?{host:e.substring(0,t+1),port:""===r?null:r.substring(1)}:null}var n=e.indexOf(":");return-1===n?{host:e,port:null}:{host:e.substring(0,n),port:e.substring(n+1)}}function isValidHostString(e){return function isValidDomainString(e){var t=r(e,null,!0);return t!==s&&!n(t)}(e)||isValidIPv4AddressString(e)||isValidBracketedIPv6AddressString(e)}function isValidIPv4AddressString(e){var t=e.split(".");return 4===t.length&&t.every(isValidIPv4AddressPieceString)}function isValidIPv4AddressPieceString(t){if(""===t||t.length>3)return!1;for(var r=0;r<t.length;++r)if(!e.isASCIIDigit(t.codePointAt(r)))return!1;return!(t.length>1&&"0"===t[0])&&Number(t)<=255}function isValidBracketedIPv6AddressString(e){return e.startsWith("[")&&e.endsWith("]")&&function isValidIPv6AddressString(e){return 8===getIPv6PiecesStringEffectiveLength(e)||8===getIPv6PiecesAndIPv4StringEffectiveLength(e)||function isValidCompressedIPv6AddressString(e){var t=e.indexOf("::");if(-1===t||t!==e.lastIndexOf("::"))return!1;var r=e.substring(0,t),n=e.substring(t+2),u=function getOptionalIPv6PiecesStringEffectiveLength(e){return""===e?0:getIPv6PiecesStringEffectiveLength(e)}(r),l=function getOptionalIPv6PiecesOrPiecesAndIPv4StringEffectiveLength(e){return""===e?0:function getIPv6PiecesOrPiecesAndIPv4StringEffectiveLength(e){if(isValidIPv6PiecesString(e))return getIPv6PiecesStringEffectiveLength(e);if(isValidIPv6PiecesAndIPv4String(e))return getIPv6PiecesAndIPv4StringEffectiveLength(e);return s}(e)}(n);if(u===s||l===s)return!1;return u+l<=7}(e)}(e.substring(1,e.length-1))}function isValidIPv6PiecesAndIPv4String(e){if(isValidIPv4AddressString(e))return!0;var t=e.lastIndexOf(":");return-1!==t&&(isValidIPv6PiecesString(e.substring(0,t))&&isValidIPv4AddressString(e.substring(t+1)))}function getIPv6PiecesAndIPv4StringEffectiveLength(e){if(!isValidIPv6PiecesAndIPv4String(e))return s;var t=e.lastIndexOf(":");return-1===t?2:getIPv6PiecesStringEffectiveLength(e.substring(0,t))+2}function isValidIPv6PiecesString(e){return""!==e&&e.split(":").every(isValidIPv6PieceString)}function getIPv6PiecesStringEffectiveLength(e){return isValidIPv6PiecesString(e)?e.split(":").length:s}function isValidIPv6PieceString(t){if(""===t||t.length>4)return!1;for(var r=0;r<t.length;++r)if(!e.isASCIIHex(t.codePointAt(r)))return!1;return parseInt(t,16)<=65535&&(1===t.length||"0"!==t[0])}function isValidURLPortString(e){return""===e||!!/^[0-9]+$/.test(e)&&Number(e)<=65535}function isValidPathAbsoluteURLString(e){return e.startsWith("/")&&e.substring(1).split("/").every(isValidURLPathSegmentString)}function isValidPathAbsoluteNonAuthorityURLString(e){return isValidPathAbsoluteURLString(e)&&!e.startsWith("//")}function isValidURLPathSegmentString(e){return isValidURLUnits(e,g)}function isValidURLQueryString(e){return isValidURLUnits(e)}function isValidURLFragmentString(e){return isValidURLUnits(e)}function isValidURLUnits(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set,r=0;r<e.length;)if("%"!==e[r]){var n=e.codePointAt(r);if(!h(n)||t.has(n))return!1;r+=n>65535?2:1}else{if(!l(e,r))return!1;r+=3}return!0}return Ue={isValidURLString:function isValidURLString(e){var t,r=null!==(t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).baseURL)&&void 0!==t?t:null;return function isValidAbsoluteURLWithFragmentString(e){var t=splitOffFragment(e),r=t.beforeFragment,n=t.fragment;return(null===n||isValidURLFragmentString(n))&&function isValidAbsoluteURLString(e){var t=splitOffQuery(e),r=t.beforeQuery,n=t.query;if(null!==n&&!isValidURLQueryString(n))return!1;var s=/^([A-Za-z][\+\x2D\.0-9A-Za-z]*):/.exec(r);if(null===s)return!1;var u=s[1].toLowerCase(),l=r.substring(s[0].length);if(c(u))return isValidSchemeRelativeSpecialURLString(l);if("file"===u)return isValidSchemeRelativeFileURLString(l);return isValidSchemeRelativeURLString(l)||isValidPathAbsoluteNonAuthorityURLString(l)||function isValidOpaquePathURLString(e){return(""===e||"/"!==e[0])&&isValidURLUnits(e,m)}(l)}(r)}(e)||null!==r&&function isValidRelativeURLWithFragmentString(e,t){if(y(t))return e.startsWith("#")&&isValidURLFragmentString(e.substring(1));var r=splitOffFragment(e),n=r.beforeFragment,s=r.fragment;return function isValidRelativeURLString(e,t){var r=splitOffQuery(e),n=r.beforeQuery,s=r.query,u=null===s||isValidURLQueryString(s);if(isValidPathAbsoluteNonAuthorityURLString(n))return u;if(function isValidPathRelativeSchemeLessURLString(e){return function isValidPathRelativeURLString(e){return!e.startsWith("/")&&e.split("/").every(isValidURLPathSegmentString)}(e)&&!/^[A-Za-z][\+\x2D\.0-9A-Za-z]*:/.test(e)}(n))return u;if(c(t.scheme))return isValidSchemeRelativeSpecialURLString(n)&&u;if("file"===t.scheme)return isValidSchemeRelativeFileURLString(n)&&u;return isValidSchemeRelativeURLString(n)&&u}(n,t)&&(null===s||isValidURLFragmentString(s))}(e,r)}},Ue}var Ae=function requireWhatwgUrl(){if(Le)return t;Le=1;var e=function requireWebidl2jsWrapper(){if(R)return r;R=1;var e=v,t=I;return r.URL=e,r.URLSearchParams=t,r}(),n=e.URL,s=e.URLSearchParams,u=re,l=ye,c=requireUrlStringValidator(),h={Array:Array,Object:Object,Promise:Promise,String:String,TypeError:TypeError};return n.install(h,["Window"]),s.install(h,["Window"]),t.URL=h.URL,t.URLSearchParams=h.URLSearchParams,t.parseURL=u.parseURL,t.parseURLWithValidationErrors=u.parseURLWithValidationErrors,t.isValidURLString=c.isValidURLString,t.basicURLParse=u.basicURLParse,t.serializeURL=u.serializeURL,t.serializePath=u.serializePath,t.serializeHost=u.serializeHost,t.serializeInteger=u.serializeInteger,t.serializeURLOrigin=u.serializeURLOrigin,t.setTheUsername=u.setTheUsername,t.setThePassword=u.setThePassword,t.cannotHaveAUsernamePasswordPort=u.cannotHaveAUsernamePasswordPort,t.hasAnOpaquePath=u.hasAnOpaquePath,t.percentDecodeString=l.percentDecodeString,t.percentDecodeBytes=l.percentDecodeBytes,t}(),Fe=getDefaultExportFromCjs(Ae);function isObject(e){return"object"===_typeof(e)&&null!==e||"function"==typeof e}var Oe=Function.call.bind(Function.call);var xe=Symbol("wrapper"),Ee=Symbol("impl"),je=Symbol("SameObject caches"),_e=Symbol.for("[webidl2js] constructor registry"),Ce=Object.getPrototypeOf(Object.getPrototypeOf(_wrapAsyncGenerator(_regenerator().m(function _callee(){return _regenerator().w(function(e){for(;;)if(0===e.n)return e.a(2)},_callee)}))).prototype);function initCtorRegistry(e){if(Object.hasOwn(e,_e))return e[_e];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%"]=Ce}return e[_e]=t,t}function wrapperForImpl(e){return e?e[xe]:null}function implForWrapper$1(e){return e?e[Ee]:null}var De=Symbol("internal");var Te=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get;var Ve=Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype,"byteLength").get;function getMethod(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"The provided value",n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError("".concat(r,"'s ").concat(t," property is not a function."));return n}}var ke=Symbol("supports property index"),qe=Symbol("supported property indices"),Ne=Symbol("supports property name"),We=Symbol("supported property names"),He=Symbol("indexed property get"),Me=Symbol("indexed property set new"),ze=Symbol("indexed property set existing"),$e=Symbol("named property get"),Ge=Symbol("named property set new"),Be=Symbol("named property set existing"),Qe=Symbol("named property delete"),Je=Symbol("async iterator get the next iteration result"),Ke=Symbol("async iterator return steps"),Ze=Symbol("async iterator initialization steps"),Xe=Symbol("async iterator end of iteration");module.exports=e={isObject:isObject,define:function define(e,t){var r,n=_createForOfIteratorHelper(Reflect.ownKeys(t));try{for(n.s();!(r=n.n()).done;){var s=r.value,u=Reflect.getOwnPropertyDescriptor(t,s);if(u&&!Reflect.defineProperty(e,s,u))throw new TypeError("Cannot redefine property: ".concat(String(s)))}}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:xe,implSymbol:Ee,getSameObject:function getSameObject(e,t,r){return e[je]||(e[je]=Object.create(null)),t in e[je]||(e[je][t]=r()),e[je][t]},ctorRegistrySymbol:_e,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:De,isArrayBuffer:function isArrayBuffer(e){try{return Te.call(e),!0}catch(e){return!1}},isSharedArrayBuffer:function isSharedArrayBuffer(e){try{return Ve.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)},getMethod:getMethod,convertAsyncSequence:function convertAsyncSequence(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"The provided value";if(!isObject(e))throw new TypeError("".concat(r," is not an object."));var n=getMethod(e,Symbol.asyncIterator,r),s="async";if(void 0===n){if(void 0===(n=getMethod(e,Symbol.iterator,r)))throw new TypeError("".concat(r," is not an async iterable object."));s="sync"}return _defineProperty(_defineProperty({object:e,method:n,type:s},xe,e),Symbol.asyncIterator,function(){return function openAsyncSequence(e,t,r,n){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"The provided value",u=Oe(t,e);if(!isObject(u))throw new TypeError("".concat(s,"'s method must return an object"));"sync"===r&&(u=function createAsyncFromSyncIterator(e){var t=_defineProperty({},Symbol.iterator,function(){return e});return _wrapAsyncGenerator(_regenerator().m(function _callee2(){return _regenerator().w(function(e){for(;;)switch(e.n){case 0:return e.d(_regeneratorValues(_asyncGeneratorDelegate(_asyncIterator(t))),1);case 1:return e.a(2,e.v)}},_callee2)}))()}(u));var l=u.next;return _defineProperty({next:function next(){return _asyncToGenerator(_regenerator().m(function _callee3(){var e,t,r;return _regenerator().w(function(c){for(;;)switch(c.n){case 0:return c.n=1,Oe(l,u);case 1:if(isObject(e=c.v)){c.n=2;break}throw new TypeError("".concat(s,"'s next method must return an object"));case 2:if(t=e.done,r=e.value,!t){c.n=3;break}return c.a(2,{done:!0,value:void 0});case 3:return c.a(2,{done:!1,value:n(r)})}},_callee3)}))()},return:function _return(e){return _asyncToGenerator(_regenerator().m(function _callee4(){var t;return _regenerator().w(function(r){for(;;)switch(r.n){case 0:if(void 0!==(t=getMethod(u,"return",s))){r.n=1;break}return r.a(2,{done:!0,value:void 0});case 1:return r.n=2,Oe(t,u,e);case 2:if(isObject(r.v)){r.n=3;break}throw new TypeError("".concat(s,"'s return method must return an object"));case 3:return r.a(2,{done:!0,value:void 0})}},_callee4)}))()}},Symbol.asyncIterator,function(){return this})}(e,n,s,t,"".concat(r,"'s iterator"))})},supportsPropertyIndex:ke,supportedPropertyIndices:qe,supportsPropertyName:Ne,supportedPropertyNames:We,indexedGet:He,indexedSetNew:Me,indexedSetExisting:ze,namedGet:$e,namedSetNew:Ge,namedSetExisting:Be,namedDelete:Qe,asyncIteratorNext:Je,asyncIteratorReturn:Ke,asyncIteratorInit:Ze,asyncIteratorEOI:Xe,iteratorResult:function iteratorResult(e,t){var r,n=_slicedToArray(e,2),s=n[0],u=n[1];switch(t){case"key":r=s;break;case"value":r=u;break;case"key+value":r=[s,u]}return{value:r,done:!1}},ordinarySetWithOwnDescriptor:function ordinarySetWithOwnDescriptor(e,t,r,n,s){if(void 0===s){var u=Reflect.getPrototypeOf(e);if(null!==u)return Reflect.set(u,t,r,n);s={writable:!0,enumerable:!0,configurable:!0,value:void 0}}if(function isDataDescriptor(e){return Object.hasOwn(e,"value")||Object.hasOwn(e,"writable")}(s)){if(!s.writable)return!1;if(!isObject(n))return!1;var l=Reflect.getOwnPropertyDescriptor(n,t);if(void 0!==l){if(function isAccessorDescriptor(e){return Object.hasOwn(e,"get")||Object.hasOwn(e,"set")}(l))return!1;if(!1===l.writable)return!1;var c={value:r};return Reflect.defineProperty(n,t,c)}return Reflect.defineProperty(n,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}var h=s.set;return void 0!==h&&(Oe(h,n,r),!0)}};var Ye=Fe.serializeURLOrigin,et=Fe.parseURL,tt={},rt=(void 0).implForWrapper;e.createObjectURL=function createObjectURL(e){var t=et(location.href),r="blob:"+(t?Ye(t):"null")+"/"+function generateUUID(){var e=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replaceAll(/[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 tt[r]=e,r},e.revokeObjectURL=function revokeObjectURL(e){delete tt[e]},e.xmlHttpRequestOverrideMimeType=function xmlHttpRequestOverrideMimeType(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).polyfillDataURLs,t=XMLHttpRequest.prototype.open,r=XMLHttpRequest.prototype.overrideMimeType;return function(n){if("text/plain; charset=x-user-defined"!==n){for(var s=arguments.length,u=new Array(s>1?s-1:0),l=1;l<s;l++)u[l-1]=arguments[l];return r&&r.call.apply(r,[this,n].concat(u))}this.open=function(r,n,s){if(n.startsWith("blob:")){var u=tt[n];if(!u)return void(this.send=function(){throw new DOMException("Failed to execute 'send' on 'XMLHttpRequest': Failed to "+"load '".concat(n,"'"),"NetworkError")});var l="text/plain",c=rt(u),h=Buffer.from(c._bytes).toString("binary");if(e)return this.status=200,this.send=function(){},this.responseType=l,void(this.responseText=h);n="data:"+l+","+encodeURIComponent(h)}return t.call(this,r,n,s)}}}});
4
- //# sourceMappingURL=createObjectURL.umd.cjs.map