diff --git a/CHANGELOG.md b/CHANGELOG.md index e43a0b42f..9e98f8af3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ All notable changes to this project will be documented in this file. Take a look * Fixed several issues with the EPUB navigator cursor and pointer events. * Fixed the cursor shape on iPadOS when using a physical trackpad or mouse. * Fixed multiple tap events broadcasted while running on macOS. +* [#449](https://github.com/readium/swift-toolkit/issues/449) Fixed misaligned EPUB navigator when it does not span the full screen width. ## [3.2.0] diff --git a/Sources/Navigator/EPUB/Assets/Static/scripts/readium-fixed.js b/Sources/Navigator/EPUB/Assets/Static/scripts/readium-fixed.js index 367f6f439..0288b8eb6 100644 --- a/Sources/Navigator/EPUB/Assets/Static/scripts/readium-fixed.js +++ b/Sources/Navigator/EPUB/Assets/Static/scripts/readium-fixed.js @@ -1,2 +1,2 @@ -(()=>{var t={9116:(t,e)=>{"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],u=o>>>31,c=e[r]|u,s=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=u)|~(s|(f|=n(o)-u)),a=f&s,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,u={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};u.lastRowMask.fill(1<<31),u.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),s=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(m)===y&&(d[h]|=1<0&&v[b]>=r+i;)b-=1;b===a&&v[b]<=r&&(v[b]{"use strict";var n=r(4624),o=r(5096),i=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o(r):r}},5096:(t,e,r)=>{"use strict";var n=r(3520),o=r(4624),i=r(5676),a=r(2824),u=o("%Function.prototype.apply%"),c=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(c,u),l=o("%Object.defineProperty%",!0),f=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(t){l=null}t.exports=function(t){if("function"!=typeof t)throw new a("a function is required");var e=s(n,c,arguments);return i(e,1+f(0,t.length-(arguments.length-1)),!0)};var p=function(){return s(n,u,arguments)};l?l(t.exports,"apply",{value:p}):t.exports.apply=p},2448:(t,e,r)=>{"use strict";var n=r(3268)(),o=r(4624),i=n&&o("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch(t){i=!1}var a=r(6500),u=r(2824),c=r(6168);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new u("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new u("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new u("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new u("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new u("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new u("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===s&&f?f.configurable:!s,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||s))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},2732:(t,e,r)=>{"use strict";var n=r(2812),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,u=r(2448),c=r(3268)(),s=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?u(t,e,r,!0):u(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var u=0;u{"use strict";t.exports=EvalError},1152:t=>{"use strict";t.exports=Error},1932:t=>{"use strict";t.exports=RangeError},5028:t=>{"use strict";t.exports=ReferenceError},6500:t=>{"use strict";t.exports=SyntaxError},2824:t=>{"use strict";t.exports=TypeError},5488:t=>{"use strict";t.exports=URIError},9200:(t,e,r)=>{"use strict";var n=r(4624)("%Object.defineProperty%",!0),o=r(4712)(),i=r(4440),a=o?Symbol.toStringTag:null;t.exports=function(t,e){var r=arguments.length>2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},108:(t,e,r)=>{"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(5988),i=r(648),a=r(1844),u=r(7256);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):u(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||u(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,u="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a{"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},1480:t=>{"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n{"use strict";var n=r(1480);t.exports=Function.prototype.bind||n},2656:t=>{"use strict";var e=function(){return"string"==typeof function(){}.name},r=Object.getOwnPropertyDescriptor;if(r)try{r([],"length")}catch(t){r=null}e.functionsHaveConfigurableNames=function(){if(!e()||!r)return!1;var t=r((function(){}),"name");return!!t&&!!t.configurable};var n=Function.prototype.bind;e.boundFunctionsHaveNames=function(){return e()&&"function"==typeof n&&""!==function(){}.bind().name},t.exports=e},4624:(t,e,r)=>{"use strict";var n,o=r(1152),i=r(7261),a=r(1932),u=r(5028),c=r(6500),s=r(2824),l=r(5488),f=Function,p=function(t){try{return f('"use strict"; return ('+t+").constructor;")()}catch(t){}},y=Object.getOwnPropertyDescriptor;if(y)try{y({},"")}catch(t){y=null}var d=function(){throw new s},h=y?function(){try{return d}catch(t){try{return y(arguments,"callee").get}catch(t){return d}}}():d,g=r(9800)(),m=r(7e3)(),b=Object.getPrototypeOf||(m?function(t){return t.__proto__}:null),v={},w="undefined"!=typeof Uint8Array&&b?b(Uint8Array):n,x={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":u,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":h,"%TypedArray%":w,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(b)try{null.error}catch(t){var S=b(b(t));x["%Error.prototype%"]=S}var E=function t(e){var r;if("%AsyncFunction%"===e)r=p("async function () {}");else if("%GeneratorFunction%"===e)r=p("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=p("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&b&&(r=b(o.prototype))}return x[e]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},O=r(3520),j=r(4440),T=O.call(Function.call,Array.prototype.concat),P=O.call(Function.apply,Array.prototype.splice),R=O.call(Function.call,String.prototype.replace),I=O.call(Function.call,String.prototype.slice),C=O.call(Function.call,RegExp.prototype.exec),N=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,M=/\\(\\)?/g,k=function(t,e){var r,n=t;if(j(A,n)&&(n="%"+(r=A[n])[0]+"%"),j(x,n)){var o=x[n];if(o===v&&(o=E(n)),void 0===o&&!e)throw new s("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new c("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new s('"allowMissing" argument must be a boolean');if(null===C(/^%?[^%]*%?$/,t))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=I(t,0,1),r=I(t,-1);if("%"===e&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return R(t,N,(function(t,e,r,o){n[n.length]=r?R(o,M,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=k("%"+n+"%",e),i=o.name,a=o.value,u=!1,l=o.alias;l&&(n=l[0],P(r,T([0,1],l)));for(var f=1,p=!0;f=r.length){var m=y(a,d);a=(p=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:a[d]}else p=j(a,d),a=a[d];p&&!u&&(x[i]=a)}}return a}},6168:(t,e,r)=>{"use strict";var n=r(4624)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},3268:(t,e,r)=>{"use strict";var n=r(4624)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},7e3:t=>{"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},9800:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(7904);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},7904:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4712:(t,e,r)=>{"use strict";var n=r(7904);t.exports=function(){return n()&&!!Symbol.toStringTag}},4440:(t,e,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(3520);t.exports=i.call(n,o)},7284:(t,e,r)=>{"use strict";var n=r(4440),o=r(3147)(),i=r(2824),a={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`O` is not an object");if("string"!=typeof e)throw new i("`slot` must be a string");if(o.assert(t),!a.has(t,e))throw new i("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`O` is not an object");if("string"!=typeof e)throw new i("`slot` must be a string");var r=o.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`O` is not an object");if("string"!=typeof e)throw new i("`slot` must be a string");var r=o.get(t);return!!r&&n(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`O` is not an object");if("string"!=typeof e)throw new i("`slot` must be a string");var n=o.get(t);n||(n={},o.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(a),t.exports=a},648:t=>{"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},u=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,s="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&u(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(s)return u(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&u(t)}},1844:(t,e,r)=>{"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(4712)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},1476:(t,e,r)=>{"use strict";var n,o,i,a,u=r(668),c=r(4712)();if(c){n=u("Object.prototype.hasOwnProperty"),o=u("RegExp.prototype.exec"),i={};var s=function(){throw i};a={toString:s,valueOf:s},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=s)}var l=u("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},7256:(t,e,r)=>{"use strict";var n=Object.prototype.toString;if(r(9800)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4152:(t,e,r)=>{var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,u="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=u&&c&&"function"==typeof c.get?c.get:null,l=u&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,h=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,T="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,I="function"==typeof Symbol&&"object"==typeof Symbol.iterator,C="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function k(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var $=r(1740),D=$.custom,F=U(D)?D:null;function L(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function B(t){return v.call(String(t),/"/g,""")}function _(t){return!("[object Array]"!==H(t)||C&&"object"==typeof t&&C in t)}function W(t){return!("[object RegExp]"!==H(t)||C&&"object"==typeof t&&C in t)}function U(t){if(I)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!R)return!1;try{return R.call(t),!0}catch(t){}return!1}t.exports=function t(e,n,o,u){var c=n||{};if(G(c,"quoteStyle")&&"single"!==c.quoteStyle&&"double"!==c.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var h=!G(c,"customInspect")||c.customInspect;if("boolean"!=typeof h&&"symbol"!==h)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=c.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return q(e,c);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var S=String(e);return w?k(e,S):S}if("bigint"==typeof e){var j=String(e)+"n";return w?k(e,j):j}var P=void 0===c.depth?5:c.depth;if(void 0===o&&(o=0),o>=P&&P>0&&"object"==typeof e)return _(e)?"[Array]":"[Object]";var D,z=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(c,o);if(void 0===u)u=[];else if(V(u,e)>=0)return"[Circular]";function X(e,r,n){if(r&&(u=O.call(u)).push(r),n){var i={depth:c.depth};return G(c,"quoteStyle")&&(i.quoteStyle=c.quoteStyle),t(e,i,o+1,u)}return t(e,c,o+1,u)}if("function"==typeof e&&!W(e)){var tt=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),et=Z(e,X);return"[Function"+(tt?": "+tt:" (anonymous)")+"]"+(et.length>0?" { "+A.call(et,", ")+" }":"")}if(U(e)){var rt=I?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(e);return"object"!=typeof e||I?rt:K(rt)}if((D=e)&&"object"==typeof D&&("undefined"!=typeof HTMLElement&&D instanceof HTMLElement||"string"==typeof D.nodeName&&"function"==typeof D.getAttribute)){for(var nt="<"+x.call(String(e.nodeName)),ot=e.attributes||[],it=0;it"}if(_(e)){if(0===e.length)return"[]";var at=Z(e,X);return z&&!function(t){for(var e=0;e=0)return!1;return!0}(at)?"["+Q(at,z)+"]":"[ "+A.call(at,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||C&&"object"==typeof t&&C in t)}(e)){var ut=Z(e,X);return"cause"in Error.prototype||!("cause"in e)||N.call(e,"cause")?0===ut.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(ut,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+X(e.cause),ut),", ")+" }"}if("object"==typeof e&&h){if(F&&"function"==typeof e[F]&&$)return $(e,{depth:P-o});if("symbol"!==h&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{s.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var ct=[];return a&&a.call(e,(function(t,r){ct.push(X(r,e,!0)+" => "+X(t,e))})),J("Map",i.call(e),ct,z)}if(function(t){if(!s||!t||"object"!=typeof t)return!1;try{s.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var st=[];return l&&l.call(e,(function(t){st.push(X(t,e))})),J("Set",s.call(e),st,z)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return Y("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return Y("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return Y("WeakRef");if(function(t){return!("[object Number]"!==H(t)||C&&"object"==typeof t&&C in t)}(e))return K(X(Number(e)));if(function(t){if(!t||"object"!=typeof t||!T)return!1;try{return T.call(t),!0}catch(t){}return!1}(e))return K(X(T.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||C&&"object"==typeof t&&C in t)}(e))return K(d.call(e));if(function(t){return!("[object String]"!==H(t)||C&&"object"==typeof t&&C in t)}(e))return K(X(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if(e===r.g)return"{ [object globalThis] }";if(!function(t){return!("[object Date]"!==H(t)||C&&"object"==typeof t&&C in t)}(e)&&!W(e)){var lt=Z(e,X),ft=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,pt=e instanceof Object?"":"null prototype",yt=!ft&&C&&Object(e)===e&&C in e?b.call(H(e),8,-1):pt?"Object":"",dt=(ft||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(yt||pt?"["+A.call(E.call([],yt||[],pt||[]),": ")+"] ":"");return 0===lt.length?dt+"{}":z?dt+"{"+Q(lt,z)+"}":dt+"{ "+A.call(lt,", ")+" }"}return String(e)};var z=Object.prototype.hasOwnProperty||function(t){return t in this};function G(t,e){return z.call(t,e)}function H(t){return h.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return q(b.call(t,0,e.maxStringLength),e)+n}return L(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,X),"single",e)}function X(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function K(t){return"Object("+t+")"}function Y(t){return t+" { ? }"}function J(t,e,r,n){return t+" ("+e+") {"+(n?Q(r,n):A.call(r,", "))+"}"}function Q(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Z(t,e){var r=_(t),n=[];if(r){n.length=t.length;for(var o=0;o{"use strict";var n;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=r(9096),u=Object.prototype.propertyIsEnumerable,c=!u.call({toString:null},"toString"),s=u.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(t){var e=t.constructor;return e&&e.prototype===t},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},y=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!p["$"+t]&&o.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{f(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===i.call(t),n=a(t),u=e&&"[object String]"===i.call(t),p=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var d=s&&r;if(u&&t.length>0&&!o.call(t,0))for(var h=0;h0)for(var g=0;g{"use strict";var n=Array.prototype.slice,o=r(9096),i=Object.keys,a=i?function(t){return i(t)}:r(9560),u=Object.keys;a.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return o(t)?u(n.call(t)):u(t)})}else Object.keys=a;return Object.keys||a},t.exports=a},9096:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},7636:(t,e,r)=>{"use strict";var n=r(6308),o=r(2824),i=Object;t.exports=n((function(){if(null==this||this!==i(this))throw new o("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},2192:(t,e,r)=>{"use strict";var n=r(2732),o=r(5096),i=r(7636),a=r(9296),u=r(736),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:u}),t.exports=c},9296:(t,e,r)=>{"use strict";var n=r(7636),o=r(2732).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},736:(t,e,r)=>{"use strict";var n=r(2732).supportsDescriptors,o=r(9296),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,u=TypeError,c=Object.getPrototypeOf,s=/a/;t.exports=function(){if(!n||!c)throw new u("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(s),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},860:(t,e,r)=>{"use strict";var n=r(668),o=r(1476),i=n("RegExp.prototype.exec"),a=r(2824);t.exports=function(t){if(!o(t))throw new a("`regex` must be a RegExp");return function(e){return null!==i(t,e)}}},5676:(t,e,r)=>{"use strict";var n=r(4624),o=r(2448),i=r(3268)(),a=r(6168),u=r(2824),c=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new u("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||c(e)!==e)throw new u("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,s=!0;if("length"in t&&a){var l=a(t,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(s=!1)}return(n||s||!r)&&(i?o(t,"length",e,!0,!0):o(t,"length",e)),t}},6308:(t,e,r)=>{"use strict";var n=r(2448),o=r(3268)(),i=r(2656).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},3147:(t,e,r)=>{"use strict";var n=r(4624),o=r(668),i=r(4152),a=r(2824),u=n("%WeakMap%",!0),c=n("%Map%",!0),s=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),h=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(u&&n&&("object"==typeof n||"function"==typeof n)){if(t)return s(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=h(t,e);return r&&r.value}(r,n)},has:function(n){if(u&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return d(e,n)}else if(r)return function(t,e){return!!h(t,e)}(r,n);return!1},set:function(n,o){u&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new u),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=h(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},9508:(t,e,r)=>{"use strict";var n=r(1700),o=r(3672),i=r(5552),a=r(3816),u=r(5424),c=r(4656),s=r(668),l=r(9800)(),f=r(2192),p=s("String.prototype.indexOf"),y=r(6288),d=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(u(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=d(t);if(void 0!==i)return n(i,t,[e])}var s=u(e),l=new RegExp(t,"g");return n(d(l),l,[s])}},3732:(t,e,r)=>{"use strict";var n=r(5096),o=r(2732),i=r(9508),a=r(5844),u=r(4148),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:u}),t.exports=c},6288:(t,e,r)=>{"use strict";var n=r(9800)(),o=r(7492);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},5844:(t,e,r)=>{"use strict";var n=r(9508);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},7492:(t,e,r)=>{"use strict";var n=r(5211),o=r(3672),i=r(4e3),a=r(8652),u=r(4784),c=r(5424),s=r(8645),l=r(2192),f=r(6308),p=r(668)("String.prototype.indexOf"),y=RegExp,d="flags"in RegExp.prototype,h=f((function(t){var e=this;if("Object"!==s(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(d&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),h=f.flags,g=f.matcher,m=u(o(e,"lastIndex"));i(g,"lastIndex",m,!0);var b=p(h,"g")>-1,v=p(h,"u")>-1;return n(g,r,b,v)}),"[Symbol.matchAll]",!0);t.exports=h},4148:(t,e,r)=>{"use strict";var n=r(2732),o=r(9800)(),i=r(5844),a=r(6288),u=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),u&&c){var r=c(Symbol,e);r&&!r.configurable||u(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var s=a(),l={};l[e]=s;var f={};f[e]=function(){return RegExp.prototype[e]!==s},n(RegExp.prototype,l,f)}return t}},6936:(t,e,r)=>{"use strict";var n=r(4656),o=r(5424),i=r(668)("String.prototype.replace"),a=/^\s$/.test("᠎"),u=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,u,""),c,"")}},9292:(t,e,r)=>{"use strict";var n=r(5096),o=r(2732),i=r(4656),a=r(6936),u=r(6684),c=r(9788),s=n(u()),l=function(t){return i(t),s(t)};o(l,{getPolyfill:u,implementation:a,shim:c}),t.exports=l},6684:(t,e,r)=>{"use strict";var n=r(6936);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},9788:(t,e,r)=>{"use strict";var n=r(2732),o=r(6684);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},1740:()=>{},1056:(t,e,r)=>{"use strict";var n=r(4624),o=r(8536),i=r(8645),a=r(7724),u=r(9132),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>u)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},1700:(t,e,r)=>{"use strict";var n=r(4624),o=r(668),i=n("%TypeError%"),a=r(1720),u=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return u(t,e,r)}},8536:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(668),i=r(1712),a=r(8444),u=r(8645),c=r(2320),s=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==u(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=s(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var d=l(t,e+1);return a(d)?{"[[CodePoint]]":c(o,d),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},4288:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(8645);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},2672:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(4436),i=r(8924),a=r(3880),u=r(2968),c=r(8800),s=r(8645);t.exports=function(t,e,r){if("Object"!==s(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},5211:(t,e,r)=>{"use strict";var n=r(4624),o=r(9800)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),u=r(1056),c=r(4288),s=r(2672),l=r(3672),f=r(6216),p=r(8972),y=r(4e3),d=r(4784),h=r(5424),g=r(8645),m=r(7284),b=r(9200),v=function(t,e,r,n){if("String"!==g(e))throw new i("`S` must be a string");if("Boolean"!==g(r))throw new i("`global` must be a boolean");if("Boolean"!==g(n))throw new i("`fullUnicode` must be a boolean");m.set(this,"[[IteratingRegExp]]",t),m.set(this,"[[IteratedString]]",e),m.set(this,"[[Global]]",r),m.set(this,"[[Unicode]]",n),m.set(this,"[[Done]]",!1)};a&&(v.prototype=f(a)),s(v.prototype,"next",(function(){var t=this;if("Object"!==g(t))throw new i("receiver must be an object");if(!(t instanceof v&&m.has(t,"[[IteratingRegExp]]")&&m.has(t,"[[IteratedString]]")&&m.has(t,"[[Global]]")&&m.has(t,"[[Unicode]]")&&m.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(m.get(t,"[[Done]]"))return c(void 0,!0);var e=m.get(t,"[[IteratingRegExp]]"),r=m.get(t,"[[IteratedString]]"),n=m.get(t,"[[Global]]"),o=m.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return m.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===h(l(a,"0"))){var s=d(l(e,"lastIndex")),f=u(r,s,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return m.set(t,"[[Done]]",!0),c(a,!1)})),o&&(b(v.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof v.prototype[Symbol.iterator])&&s(v.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new v(t,e,r,n)}},7268:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(320),i=r(4436),a=r(8924),u=r(4936),c=r(3880),s=r(2968),l=r(8800),f=r(5696),p=r(8645);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:u},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:u},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8924:(t,e,r)=>{"use strict";var n=r(3600),o=r(3504),i=r(8645);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},3672:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(4152),i=r(2968),a=r(8645);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},5552:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(3396),i=r(3048),a=r(2968),u=r(4152);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(u(e)+" is not a function: "+u(r));return r}}},3396:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(4152),i=r(2968);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},4936:(t,e,r)=>{"use strict";var n=r(4440),o=r(8645),i=r(3600);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},1720:(t,e,r)=>{"use strict";t.exports=r(704)},3048:(t,e,r)=>{"use strict";t.exports=r(648)},211:(t,e,r)=>{"use strict";var n=r(8600)("%Reflect.construct%",!0),o=r(7268);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3880:(t,e,r)=>{"use strict";var n=r(4440),o=r(8645),i=r(3600);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},2968:t=>{"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},3816:(t,e,r)=>{"use strict";var n=r(4624)("%Symbol.match%",!0),o=r(1476),i=r(6848);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},6216:(t,e,r)=>{"use strict";var n=r(4624),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),u=r(1720),c=r(8645),s=r(4672),l=r(7284),f=r(7e3)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!u(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&s(r,(function(t){l.set(e,t,void 0)})),e}},8972:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(668)("RegExp.prototype.exec"),i=r(1700),a=r(3672),u=r(3048),c=r(8645);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(u(r)){var s=i(r,t,[e]);if(null===s||"Object"===c(s))return s;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},4656:(t,e,r)=>{"use strict";t.exports=r(176)},8800:(t,e,r)=>{"use strict";var n=r(2808);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},4e3:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(2968),i=r(8800),a=r(8645),u=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,u&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!u||i(t[e],r)}catch(t){return!1}}},8652:(t,e,r)=>{"use strict";var n=r(4624),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(211),u=r(8645);t.exports=function(t,e){if("Object"!==u(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==u(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},8772:(t,e,r)=>{"use strict";var n=r(4624),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),u=n("%parseInt%"),c=r(668),s=r(860),l=c("String.prototype.slice"),f=s(/^0b[01]+$/i),p=s(/^0o[0-7]+$/i),y=s(/^[-+]0x[0-9a-f]+$/i),d=s(new i("["+["…","​","￾"].join("")+"]","g")),h=r(9292),g=r(8645);t.exports=function t(e){if("String"!==g(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(u(l(e,2),2));if(p(e))return o(u(l(e,2),8));if(d(e)||y(e))return NaN;var r=h(e);return r!==e?t(r):o(e)}},6848:t=>{"use strict";t.exports=function(t){return!!t}},9424:(t,e,r)=>{"use strict";var n=r(7220),o=r(2592),i=r(2808),a=r(2931);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},4784:(t,e,r)=>{"use strict";var n=r(9132),o=r(9424);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},7220:(t,e,r)=>{"use strict";var n=r(4624),o=n("%TypeError%"),i=n("%Number%"),a=r(2336),u=r(5556),c=r(8772);t.exports=function(t){var e=a(t)?t:u(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},5556:(t,e,r)=>{"use strict";var n=r(108);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},5696:(t,e,r)=>{"use strict";var n=r(4440),o=r(4624)("%TypeError%"),i=r(8645),a=r(6848),u=r(3048);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!u(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!u(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5424:(t,e,r)=>{"use strict";var n=r(4624),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},8645:(t,e,r)=>{"use strict";var n=r(7936);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},2320:(t,e,r)=>{"use strict";var n=r(4624),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(1712),u=r(8444);t.exports=function(t,e){if(!a(t)||!u(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},2312:(t,e,r)=>{"use strict";var n=r(8645),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},2592:(t,e,r)=>{"use strict";var n=r(4624),o=r(2312),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},176:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},7936:t=>{"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},8600:(t,e,r)=>{"use strict";t.exports=r(4624)},4436:(t,e,r)=>{"use strict";var n=r(3268),o=r(4624),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),u=a&&r(704),c=r(668)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,s){if(!i){if(!t(s))return!1;if(!s["[[Configurable]]"]||!s["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!s["[[Enumerable]]"])return!1;var l=s["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in s&&u(n)&&n.length!==s["[[Value]]"]?(n.length=s["[[Value]]"],n.length===s["[[Value]]"]):(i(n,o,r(s)),!0)}},704:(t,e,r)=>{"use strict";var n=r(4624)("%Array%"),o=!n.isArray&&r(668)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},3600:(t,e,r)=>{"use strict";var n=r(4624),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(4440),u=r(7724),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(5092),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&u(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},4672:t=>{"use strict";t.exports=function(t,e){for(var r=0;r{"use strict";t.exports=function(t){if(void 0===t)return t;var e={};return"[[Value]]"in t&&(e.value=t["[[Value]]"]),"[[Writable]]"in t&&(e.writable=!!t["[[Writable]]"]),"[[Get]]"in t&&(e.get=t["[[Get]]"]),"[[Set]]"in t&&(e.set=t["[[Set]]"]),"[[Enumerable]]"in t&&(e.enumerable=!!t["[[Enumerable]]"]),"[[Configurable]]"in t&&(e.configurable=!!t["[[Configurable]]"]),e}},2931:(t,e,r)=>{"use strict";var n=r(2808);t.exports=function(t){return("number"==typeof t||"bigint"==typeof t)&&!n(t)&&t!==1/0&&t!==-1/0}},7724:(t,e,r)=>{"use strict";var n=r(4624),o=n("%Math.abs%"),i=n("%Math.floor%"),a=r(2808),u=r(2931);t.exports=function(t){if("number"!=typeof t||a(t)||!u(t))return!1;var e=o(t);return i(e)===e}},1712:t=>{"use strict";t.exports=function(t){return"number"==typeof t&&t>=55296&&t<=56319}},5092:(t,e,r)=>{"use strict";var n=r(4440);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},2808:t=>{"use strict";t.exports=Number.isNaN||function(t){return t!=t}},2336:t=>{"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},320:(t,e,r)=>{"use strict";var n=r(4624),o=r(4440),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},8444:t=>{"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},9132:t=>{"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=r(9116);function e(e,r,n){let o=0,i=[];for(;-1!==o;)o=e.indexOf(r,o),-1!==o&&(i.push({start:o,end:o+r.length,errors:0}),o+=1);return i.length>0?i:(0,t.c)(e,r,n)}function n(t,r){return 0===r.length||0===t.length?0:1-e(t,r,r.length)[0].errors/r.length}function o(t){switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return t.textContent.length;default:return 0}}function i(t){let e=t.previousSibling,r=0;for(;e;)r+=o(e),e=e.previousSibling;return r}function a(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;no?(a.push({node:u,offset:o-s}),o=r.shift()):(c=i.nextNode(),s+=u.data.length);for(;void 0!==o&&u&&s===o;)a.push({node:u,offset:u.data.length}),o=r.shift();if(void 0!==o)throw new RangeError("Offset exceeds text length");return a}class u{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=i(e),e=e.parentElement;return new u(e,r)}resolve(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return a(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=1===t.direction,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return u.fromPoint(t,e);case Node.ELEMENT_NODE:return new u(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=i(t)+e;return new u(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n2&&void 0!==arguments[2]?arguments[2]:{};this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=c.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new l(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new l(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.toPositionAnchor(t).toRange()}toPositionAnchor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=function(t,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===r.length)return null;const i=Math.min(256,r.length/2),a=e(t,r,i);if(0===a.length)return null;const u=e=>{const i=1-e.errors/r.length,a=o.prefix?n(t.slice(Math.max(0,e.start-o.prefix.length),e.start),o.prefix):1,u=o.suffix?n(t.slice(e.end,e.end+o.suffix.length),o.suffix):1;let c=1;return"number"==typeof o.hint&&(c=1-Math.abs(e.start-o.hint)/t.length),(50*i+20*a+20*u+2*c)/92},c=a.map((t=>({start:t.start,end:t.end,score:u(t)})));return c.sort(((t,e)=>e.score-t.score)),c[0]}(this.root.textContent,this.exact,{...this.context,hint:t.hint});if(!r)throw new Error("Quote not found");return new s(this.root,r.start,r.end)}}var f=r(3732);r.n(f)().shim();const p=!0;function y(){if(!readium.link)return null;const t=readium.link.href;if(!t)return null;const e=function(){const t=window.getSelection();if(!t)return;if(t.isCollapsed)return;const e=t.toString();if(0===e.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const r=1===t.rangeCount?t.getRangeAt(0):function(t,e,r,n){const o=new Range;if(o.setStart(t,e),o.setEnd(r,n),!o.collapsed)return o;d(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const i=new Range;if(i.setStart(r,n),i.setEnd(t,e),!i.collapsed)return d(">>> createOrderedRange RANGE REVERSE OK."),o;d(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!r||r.collapsed)return void d("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const n=document.body.textContent,o=c.fromRange(r).relativeTo(document.body),i=o.start.offset,a=o.end.offset;let u=n.slice(Math.max(0,i-200),i),s=u.search(/\P{L}\p{L}/gu);-1!==s&&(u=u.slice(s+1));let l=n.slice(a,Math.min(n.length,a+200)),f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:e,before:u,after:l}}();return e?{href:t,text:e,rect:function(){try{let t=window.getSelection();if(!t)return;return k(t.getRangeAt(0).getBoundingClientRect())}catch(t){return N(t),null}}()}:null}function d(){p&&I.apply(null,arguments)}window.addEventListener("error",(function(t){webkit.messageHandlers.logError.postMessage({message:t.message,filename:t.filename,line:t.lineno})}),!1),window.addEventListener("load",(function(){new ResizeObserver((()=>{!function(){const t="readium-virtual-page";var e=document.getElementById(t);if(E()||2!=parseInt(window.getComputedStyle(document.documentElement).getPropertyValue("column-count"))){var r;null===(r=e)||void 0===r||r.remove()}else{var n=document.scrollingElement.scrollWidth/window.innerWidth;Math.round(2*n)/2%1>.1&&(e?e.remove():((e=document.createElement("div")).setAttribute("id",t),e.style.breakBefore="column",e.innerHTML="​",document.body.appendChild(e)))}}(),x()})).observe(document.body),window.addEventListener("orientationchange",(function(){S(),function(){if(!E()){var t=j(window.scrollX+1);document.scrollingElement.scrollLeft=t}}()})),S()}),!1);var h,g,m=0,b=0,v=!1,w=0;function x(){readium.isFixedLayout||(b=window.scrollY/document.scrollingElement.scrollHeight,m=Math.abs(window.scrollX/document.scrollingElement.scrollWidth),0!==document.scrollingElement.scrollWidth&&0!==document.scrollingElement.scrollHeight&&(v||window.requestAnimationFrame((function(){var t;t=(E()?b:m).toString(),webkit.messageHandlers.progressionChanged.postMessage(t),v=!1})),v=!0))}function S(){w=0===window.orientation||180==window.orientation?screen.width:screen.height}function E(){return"readium-scroll-on"==document.documentElement.style.getPropertyValue("--USER__view").trim()}function A(t){return E()?document.scrollingElement.scrollTop=t.top+window.scrollY:document.scrollingElement.scrollLeft=j(t.left+window.scrollX),!0}function O(t){var e=window.scrollX,r=window.innerWidth;return document.scrollingElement.scrollLeft=t,Math.abs(e-t)/r>.01}function j(t){var e=t+1;return e-e%w}function T(t){try{let n=t.locations,o=t.text;var e;if(o&&o.highlight)return n&&n.cssSelector&&(e=document.querySelector(n.cssSelector)),e||(e=document.body),new l(e,o.highlight,{prefix:o.before,suffix:o.after}).toRange();if(n){var r=null;if(!r&&n.cssSelector&&(r=document.querySelector(n.cssSelector)),!r&&n.fragments)for(const t of n.fragments)if(r=document.getElementById(t))break;if(r){let t=document.createRange();return t.setStartBefore(r),t.setEndAfter(r),t}}}catch(t){N(t)}return null}function P(t,e){null===e?R(t):document.documentElement.style.setProperty(t,e,"important")}function R(t){document.documentElement.style.removeProperty(t)}function I(){var t=Array.prototype.slice.call(arguments).join(" ");webkit.messageHandlers.log.postMessage(t)}function C(t){N(new Error(t))}function N(t){webkit.messageHandlers.logError.postMessage({message:t.message})}window.addEventListener("scroll",x),document.addEventListener("selectionchange",(50,h=function(){webkit.messageHandlers.selectionChanged.postMessage(y())},function(){var t=this,e=arguments;clearTimeout(g),g=setTimeout((function(){h.apply(t,e),g=null}),50)}));const M=!1;function k(t){let e=$({x:t.left,y:t.top});const r=t.width,n=t.height,o=e.x,i=e.y;return{width:r,height:n,left:o,top:i,right:o+r,bottom:i+n}}function $(t){if(!frameElement)return t;let e=frameElement.getBoundingClientRect();if(!e)return t;let r=window.top.document.documentElement;return{x:t.x+e.x+r.scrollLeft,y:t.y+e.y+r.scrollTop}}function D(t,e){let r=t.getClientRects();const n=[];for(const t of r)n.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const o=W(function(t,e){const r=new Set(t);for(const e of t)if(e.width>1&&e.height>1){for(const n of t)if(e!==n&&r.has(n)&&B(n,e,1)){H("CLIENT RECT: remove contained"),r.delete(e);break}}else H("CLIENT RECT: remove tiny"),r.delete(e);return Array.from(r)}(F(n,1,e)));for(let t=o.length-1;t>=0;t--){const e=o[t];if(!(e.width*e.height>4)){if(!(o.length>1)){H("CLIENT RECT: remove small, but keep otherwise empty!");break}H("CLIENT RECT: remove small"),o.splice(t,1)}}return H(`CLIENT RECT: reduced ${n.length} --\x3e ${o.length}`),o}function F(t,e,r){for(let n=0;nt!==i&&t!==a)),o=L(i,a);return n.push(o),F(n,e,r)}}return t}function L(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function B(t,e,r){return _(t,e.left,e.top,r)&&_(t,e.right,e.top,r)&&_(t,e.left,e.bottom,r)&&_(t,e.right,e.bottom,r)}function _(t,e,r,n){return(t.lefte||G(t.right,e,n))&&(t.topr||G(t.bottom,r,n))}function W(t){for(let e=0;et!==e));return Array.prototype.push.apply(a,r),W(a)}}else H("replaceOverlapingRects rect1 === rect2 ??!")}return t}function U(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function z(t,e,r){return(t.left=0&&G(t.left,e.right,r))&&(e.left=0&&G(e.left,t.right,r))&&(t.top=0&&G(t.top,e.bottom,r))&&(e.top=0&&G(e.top,t.bottom,r))}function G(t,e,r){return Math.abs(t-e)<=r}function H(){M&&I.apply(null,arguments)}var V,q=[],X="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(V||(V={}));var K,Y=function(t){return Object.freeze(t)},J=function(t,e){this.inlineSize=t,this.blockSize=e,Y(this)},Q=function(){function t(t,e,r,n){return this.x=t,this.y=e,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Y(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Z=function(t){return t instanceof SVGElement&&"getBBox"in t},tt=function(t){if(Z(t)){var e=t.getBBox(),r=e.width,n=e.height;return!r&&!n}var o=t,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||t.getClientRects().length)},et=function(t){var e;if(t instanceof Element)return!0;var r=null===(e=null==t?void 0:t.ownerDocument)||void 0===e?void 0:e.defaultView;return!!(r&&t instanceof r.Element)},rt="undefined"!=typeof window?window:{},nt=new WeakMap,ot=/auto|scroll/,it=/^tb|vertical/,at=/msie|trident/i.test(rt.navigator&&rt.navigator.userAgent),ut=function(t){return parseFloat(t||"0")},ct=function(t,e,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=!1),new J((r?e:t)||0,(r?t:e)||0)},st=Y({devicePixelContentBoxSize:ct(),borderBoxSize:ct(),contentBoxSize:ct(),contentRect:new Q(0,0,0,0)}),lt=function(t,e){if(void 0===e&&(e=!1),nt.has(t)&&!e)return nt.get(t);if(tt(t))return nt.set(t,st),st;var r=getComputedStyle(t),n=Z(t)&&t.ownerSVGElement&&t.getBBox(),o=!at&&"border-box"===r.boxSizing,i=it.test(r.writingMode||""),a=!n&&ot.test(r.overflowY||""),u=!n&&ot.test(r.overflowX||""),c=n?0:ut(r.paddingTop),s=n?0:ut(r.paddingRight),l=n?0:ut(r.paddingBottom),f=n?0:ut(r.paddingLeft),p=n?0:ut(r.borderTopWidth),y=n?0:ut(r.borderRightWidth),d=n?0:ut(r.borderBottomWidth),h=f+s,g=c+l,m=(n?0:ut(r.borderLeftWidth))+y,b=p+d,v=u?t.offsetHeight-b-t.clientHeight:0,w=a?t.offsetWidth-m-t.clientWidth:0,x=o?h+m:0,S=o?g+b:0,E=n?n.width:ut(r.width)-x-w,A=n?n.height:ut(r.height)-S-v,O=E+h+w+m,j=A+g+v+b,T=Y({devicePixelContentBoxSize:ct(Math.round(E*devicePixelRatio),Math.round(A*devicePixelRatio),i),borderBoxSize:ct(O,j,i),contentBoxSize:ct(E,A,i),contentRect:new Q(f,c,E,A)});return nt.set(t,T),T},ft=function(t,e,r){var n=lt(t,r),o=n.borderBoxSize,i=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(e){case V.DEVICE_PIXEL_CONTENT_BOX:return a;case V.BORDER_BOX:return o;default:return i}},pt=function(t){var e=lt(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=Y([e.borderBoxSize]),this.contentBoxSize=Y([e.contentBoxSize]),this.devicePixelContentBoxSize=Y([e.devicePixelContentBoxSize])},yt=function(t){if(tt(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},dt=function(){var t=1/0,e=[];q.forEach((function(r){if(0!==r.activeTargets.length){var n=[];r.activeTargets.forEach((function(e){var r=new pt(e.target),o=yt(e.target);n.push(r),e.lastReportedSize=ft(e.target,e.observedBox),ot?e.activeTargets.push(r):e.skippedTargets.push(r))}))}))},gt=[],mt=0,bt={attributes:!0,characterData:!0,childList:!0,subtree:!0},vt=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],wt=function(t){return void 0===t&&(t=0),Date.now()+t},xt=!1,St=function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var e=this;if(void 0===t&&(t=250),!xt){xt=!0;var r,n=wt(t);r=function(){var r=!1;try{r=function(){var t,e=0;for(ht(e);q.some((function(t){return t.activeTargets.length>0}));)e=dt(),ht(e);return q.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:X}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=X),window.dispatchEvent(t)),e>0}()}finally{if(xt=!1,t=n-wt(),!mt)return;r?e.run(1e3):t>0?e.run(t):e.start()}},function(t){if(!K){var e=0,r=document.createTextNode("");new MutationObserver((function(){return gt.splice(0).forEach((function(t){return t()}))})).observe(r,{characterData:!0}),K=function(){r.textContent="".concat(e?e--:e++)}}gt.push(t),K()}((function(){requestAnimationFrame(r)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,bt)};document.body?e():rt.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),vt.forEach((function(e){return rt.addEventListener(e,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),vt.forEach((function(e){return rt.removeEventListener(e,t.listener,!0)})),this.stopped=!0)},t}(),Et=new St,At=function(t){!mt&&t>0&&Et.start(),!(mt+=t)&&Et.stop()},Ot=function(){function t(t,e){this.target=t,this.observedBox=e||V.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=ft(this.target,this.observedBox,!0);return t=this.target,Z(t)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),jt=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},Tt=new WeakMap,Pt=function(t,e){for(var r=0;r=0&&(o&&q.splice(q.indexOf(r),1),r.observationTargets.splice(n,1),At(-1))},t.disconnect=function(t){var e=this,r=Tt.get(t);r.observationTargets.slice().forEach((function(r){return e.unobserve(t,r.target)})),r.activeTargets.splice(0,r.activeTargets.length)},t}(),It=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Rt.connect(this,t)}return t.prototype.observe=function(t,e){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!et(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Rt.observe(this,t,e)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!et(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Rt.unobserve(this,t)},t.prototype.disconnect=function(){Rt.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const Ct=window.ResizeObserver||It;let Nt=new Map,Mt=new Map;var kt=0;function $t(t){if(0===Mt.size)return null;for(const[e,r]of Mt)if(r.isActivable())for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements){let o=r.getBoundingClientRect().toJSON();if(_(o,t.clientX,t.clientY,1))return{group:e,item:n,element:r,rect:o}}return null}function Dt(t){return t&&t instanceof Element}window.addEventListener("load",(function(){const t=document.body;var e={width:0,height:0};new Ct((()=>{e.width===t.clientWidth&&e.height===t.clientHeight||(e={width:t.clientWidth,height:t.clientHeight},Mt.forEach((function(t){t.requestLayout()})))})).observe(t)}),!1);const Ft={NONE:"",DESCENDANT:" ",CHILD:" > "},Lt={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"},Bt="CssSelectorGenerator";function _t(t="unknown problem",...e){console.warn(`${Bt}: ${t}`,...e)}const Wt={selectors:[Lt.id,Lt.class,Lt.tag,Lt.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function Ut(t){return t instanceof RegExp}function zt(t){return["string","function"].includes(typeof t)||Ut(t)}function Gt(t){return Array.isArray(t)?t.filter(zt):[]}function Ht(t){const e=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(t){return t instanceof Node}(t)&&e.includes(t.nodeType)}function Vt(t,e){if(Ht(t))return t.contains(e)||_t("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will nto work as intended."),t;const r=e.getRootNode({composed:!1});return Ht(r)?(r!==document&&_t("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),r):e.ownerDocument.querySelector(":root")}function qt(t){return"number"==typeof t?t:Number.POSITIVE_INFINITY}function Xt(t=[]){const[e=[],...r]=t;return 0===r.length?e:r.reduce(((t,e)=>t.filter((t=>e.includes(t)))),e)}function Kt(t){return[].concat(...t)}function Yt(t){const e=t.map((t=>{if(Ut(t))return e=>t.test(e);if("function"==typeof t)return e=>{const r=t(e);return"boolean"!=typeof r?(_t("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",t),!1):r};if("string"==typeof t){const e=new RegExp("^"+t.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")+"$");return t=>e.test(t)}return _t("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",t),()=>!1}));return t=>e.some((e=>e(t)))}function Jt(t,e,r){const n=Array.from(Vt(r,t[0]).querySelectorAll(e));return n.length===t.length&&t.every((t=>n.includes(t)))}function Qt(t,e){e=null!=e?e:function(t){return t.ownerDocument.querySelector(":root")}(t);const r=[];let n=t;for(;Dt(n)&&n!==e;)r.push(n),n=n.parentElement;return r}function Zt(t,e){return Xt(t.map((t=>Qt(t,e))))}const te=new RegExp(["^$","\\s"].join("|")),ee=new RegExp(["^$"].join("|")),re=[Lt.nthoftype,Lt.tag,Lt.id,Lt.class,Lt.attribute,Lt.nthchild],ne=Yt(["class","id","ng-*"]);function oe({name:t}){return`[${t}]`}function ie({name:t,value:e}){return`[${t}='${e}']`}function ae({nodeName:t,nodeValue:e}){return{name:(r=t,r.replace(/:/g,"\\:")),value:ve(e)};var r}function ue(t){const e=Array.from(t.attributes).filter((e=>function({nodeName:t},e){const r=e.tagName.toLowerCase();return!(["input","option"].includes(r)&&"value"===t||ne(t))}(e,t))).map(ae);return[...e.map(oe),...e.map(ie)]}function ce(t){return(t.getAttribute("class")||"").trim().split(/\s+/).filter((t=>!ee.test(t))).map((t=>`.${ve(t)}`))}function se(t){const e=t.getAttribute("id")||"",r=`#${ve(e)}`,n=t.getRootNode({composed:!1});return!te.test(e)&&Jt([t],r,n)?[r]:[]}function le(t){const e=t.parentNode;if(e){const r=Array.from(e.childNodes).filter(Dt).indexOf(t);if(r>-1)return[`:nth-child(${r+1})`]}return[]}function fe(t){return[ve(t.tagName.toLowerCase())]}function pe(t){const e=[...new Set(Kt(t.map(fe)))];return 0===e.length||e.length>1?[]:[e[0]]}function ye(t){const e=pe([t])[0],r=t.parentElement;if(r){const n=Array.from(r.children).filter((t=>t.tagName.toLowerCase()===e)),o=n.indexOf(t);if(o>-1)return[`${e}:nth-of-type(${o+1})`]}return[]}function de(t=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){return Array.from(function*(t=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){let r=0,n=ge(1);for(;n.length<=t.length&&rt[e]));yield e,n=he(n,t.length-1)}}(t,{maxResults:e}))}function he(t=[],e=0){const r=t.length;if(0===r)return[];const n=[...t];n[r-1]+=1;for(let t=r-1;t>=0;t--)if(n[t]>e){if(0===t)return ge(r+1);n[t-1]++,n[t]=n[t-1]+1}return n[r-1]>e?ge(r+1):n}function ge(t=1){return Array.from(Array(t).keys())}const me=":".charCodeAt(0).toString(16).toUpperCase(),be=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function ve(t=""){var e,r;return null!==(r=null===(e=null===CSS||void 0===CSS?void 0:CSS.escape)||void 0===e?void 0:e.call(CSS,t))&&void 0!==r?r:function(t=""){return t.split("").map((t=>":"===t?`\\${me} `:be.test(t)?`\\${t}`:escape(t).replace(/%/g,"\\"))).join("")}(t)}const we={tag:pe,id:function(t){return 0===t.length||t.length>1?[]:se(t[0])},class:function(t){return Xt(t.map(ce))},attribute:function(t){return Xt(t.map(ue))},nthchild:function(t){return Xt(t.map(le))},nthoftype:function(t){return Xt(t.map(ye))}},xe={tag:fe,id:se,class:ce,attribute:ue,nthchild:le,nthoftype:ye};function Se(t){return t.includes(Lt.tag)||t.includes(Lt.nthoftype)?[...t]:[...t,Lt.tag]}function Ee(t={}){const e=[...re];return t[Lt.tag]&&t[Lt.nthoftype]&&e.splice(e.indexOf(Lt.tag),1),e.map((e=>{return(n=t)[r=e]?n[r].join(""):"";var r,n})).join("")}function Ae(t,e,r="",n){const o=function(t,e){return""===e?t:function(t,e){return[...t.map((t=>e+Ft.DESCENDANT+t)),...t.map((t=>e+Ft.CHILD+t))]}(t,e)}(function(t,e,r){const n=function(t,e){const{blacklist:r,whitelist:n,combineWithinSelector:o,maxCombinations:i}=e,a=Yt(r),u=Yt(n);return function(t){const{selectors:e,includeTag:r}=t,n=[].concat(e);return r&&!n.includes("tag")&&n.push("tag"),n}(e).reduce(((e,r)=>{const n=function(t,e){var r;return(null!==(r=we[e])&&void 0!==r?r:()=>[])(t)}(t,r),c=function(t=[],e,r){return t.filter((t=>r(t)||!e(t)))}(n,a,u),s=function(t=[],e){return t.sort(((t,r)=>{const n=e(t),o=e(r);return n&&!o?-1:!n&&o?1:0}))}(c,u);return e[r]=o?de(s,{maxResults:i}):s.map((t=>[t])),e}),{})}(t,r),o=function(t,e){return function(t){const{selectors:e,combineBetweenSelectors:r,includeTag:n,maxCandidates:o}=t,i=r?de(e,{maxResults:o}):e.map((t=>[t]));return n?i.map(Se):i}(e).map((e=>function(t,e){const r={};return t.forEach((t=>{const n=e[t];n.length>0&&(r[t]=n)})),function(t={}){let e=[];return Object.entries(t).forEach((([t,r])=>{e=r.flatMap((r=>0===e.length?[{[t]:r}]:e.map((e=>Object.assign(Object.assign({},e),{[t]:r})))))})),e}(r).map(Ee)}(e,t))).filter((t=>t.length>0))}(n,r),i=Kt(o);return[...new Set(i)]}(t,n.root,n),r);for(const e of o)if(Jt(t,e,n.root))return e;return null}function Oe(t){return{value:t,include:!1}}function je({selectors:t,operator:e}){let r=[...re];t[Lt.tag]&&t[Lt.nthoftype]&&(r=r.filter((t=>t!==Lt.tag)));let n="";return r.forEach((e=>{(t[e]||[]).forEach((({value:t,include:e})=>{e&&(n+=t)}))})),e+n}function Te(t){return[":root",...Qt(t).reverse().map((t=>{const e=function(t,e,r=Ft.NONE){const n={};return e.forEach((e=>{Reflect.set(n,e,function(t,e){return xe[e](t)}(t,e).map(Oe))})),{element:t,operator:r,selectors:n}}(t,[Lt.nthchild],Ft.CHILD);return e.selectors.nthchild.forEach((t=>{t.include=!0})),e})).map(je)].join("")}function Pe(t,e={}){const r=function(t){(t instanceof NodeList||t instanceof HTMLCollection)&&(t=Array.from(t));const e=(Array.isArray(t)?t:[t]).filter(Dt);return[...new Set(e)]}(t),n=function(t,e={}){const r=Object.assign(Object.assign({},Wt),e);return{selectors:(n=r.selectors,Array.isArray(n)?n.filter((t=>{return e=Lt,r=t,Object.values(e).includes(r);var e,r})):[]),whitelist:Gt(r.whitelist),blacklist:Gt(r.blacklist),root:Vt(r.root,t),combineWithinSelector:!!r.combineWithinSelector,combineBetweenSelectors:!!r.combineBetweenSelectors,includeTag:!!r.includeTag,maxCombinations:qt(r.maxCombinations),maxCandidates:qt(r.maxCandidates)};var n}(r[0],e);let o="",i=n.root;function a(){return function(t,e,r="",n){if(0===t.length)return null;const o=[t.length>1?t:[],...Zt(t,e).map((t=>[t]))];for(const t of o){const e=Ae(t,0,r,n);if(e)return{foundElements:t,selector:e}}return null}(r,i,o,n)}let u=a();for(;u;){const{foundElements:t,selector:e}=u;if(Jt(r,e,n.root))return e;i=t[0],o=e,u=a()}return r.length>1?r.map((t=>Pe(t,n))).join(", "):function(t){return t.map(Te).join(", ")}(r)}function Re(t){return null==t?null:-1!==["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t.outerHTML:t.parentElement?Re(t.parentElement):null}function Ie(t){for(var e=0;e0&&e.top0&&e.left{Be(t)||(_e(t),We("down",t))})),window.addEventListener("keyup",(t=>{Be(t)||(_e(t),We("up",t))})),r.g.readium={scrollToId:function(t){let e=document.getElementById(t);return!!e&&(A(e.getBoundingClientRect()),!0)},scrollToPosition:function(t,e){if(console.log("ScrollToPosition"),t<0||t>1)console.log("InvalidPosition");else if(E()){let e=document.scrollingElement.scrollHeight*t;document.scrollingElement.scrollTop=e}else{let r=document.scrollingElement.scrollWidth*t*("rtl"==e?-1:1);document.scrollingElement.scrollLeft=j(r)}},scrollToLocator:function(t){let e=T(t);return!!e&&function(t){return A(t.getBoundingClientRect())}(e)},scrollLeft:function(t){var e="rtl"==t,r=document.scrollingElement.scrollWidth,n=window.innerWidth,o=window.scrollX-n,i=e?-(r-n):0;return O(Math.max(o,i))},scrollRight:function(t){var e="rtl"==t,r=document.scrollingElement.scrollWidth,n=window.innerWidth,o=window.scrollX+n,i=e?0:r-n;return O(Math.min(o,i))},setCSSProperties:function(t){for(const e in t)P(e,t[e])},setProperty:P,removeProperty:R,registerDecorationTemplates:function(t){var e="";for(const[r,n]of Object.entries(t))Nt.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){let t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}},getDecorations:function(t){var e=Mt.get(t);return e||(e=function(t,e){var r=[],n=0,o=null,i=!1;function a(e){let o=t+"-"+n++,i=T(e.locator);if(!i)return void I("Can't locate DOM range for decoration",e);let a={id:o,decoration:e,range:i};r.push(a),c(a)}function u(t){let e=r.findIndex((e=>e.decoration.id===t));if(-1===e)return;let n=r[e];r.splice(e,1),n.clickableElements=null,n.container&&(n.container.remove(),n.container=null)}function c(r){let n=(o||((o=document.createElement("div")).setAttribute("id",t),o.setAttribute("data-group",e),o.style.setProperty("pointer-events","none"),requestAnimationFrame((function(){null!=o&&document.body.append(o)}))),o),i=Nt.get(r.decoration.style);if(!i)return void C(`Unknown decoration style: ${r.decoration.style}`);let a=document.createElement("div");a.setAttribute("id",r.id),a.setAttribute("data-style",r.decoration.style),a.style.setProperty("pointer-events","none");let u=window.innerWidth,c=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count")),s=u/(c||1),l=document.scrollingElement,f=l.scrollLeft,p=l.scrollTop;function y(t,e,r){if(t.style.position="absolute","wrap"===i.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===i.width){t.style.width=`${u}px`,t.style.height=`${e.height}px`;let r=Math.floor(e.left/u)*u;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}else if("bounds"===i.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+f}px`,t.style.top=`${e.top+p}px`;else if("page"===i.width){t.style.width=`${s}px`,t.style.height=`${e.height}px`;let r=Math.floor(e.left/s)*s;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}}let d,h=r.range.getBoundingClientRect();try{let t=document.createElement("template");t.innerHTML=r.decoration.element.trim(),d=t.content.firstElementChild}catch(t){return void C(`Invalid decoration element "${r.decoration.element}": ${t.message}`)}if("boxes"===i.layout){let t=!0,e=D(r.range,t);e=e.sort(((t,e)=>t.tope.top?1:0));for(let t of e){const e=d.cloneNode(!0);e.style.setProperty("pointer-events","none"),y(e,t,h),a.append(e)}}else if("bounds"===i.layout){const t=d.cloneNode(!0);t.style.setProperty("pointer-events","none"),y(t,h,h),a.append(t)}n.append(a),r.container=a,r.clickableElements=Array.from(a.querySelectorAll("[data-activable='1']")),0===r.clickableElements.length&&(r.clickableElements=Array.from(a.children))}function s(){o&&(o.remove(),o=null)}return{add:a,remove:u,update:function(t){u(t.id),a(t)},clear:function(){s(),r.length=0},items:r,requestLayout:function(){s(),r.forEach((t=>c(t)))},isActivable:function(){return i},setActivable:function(){i=!0}}}("r2-decoration-"+kt++,t),Mt.set(t,e)),e},findFirstVisibleLocator:function(){const t=Ie(document.body);return{href:"#",type:"application/xhtml+xml",locations:{cssSelector:Pe(t)},text:{highlight:t.textContent}}}},window.readium.isFixedLayout=!0,webkit.messageHandlers.spreadLoadStarted.postMessage({})})()})(); +(()=>{var t={9116:(t,e)=>{"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],u=o>>>31,c=e[r]|u,s=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=u)|~(s|(f|=n(o)-u)),a=f&s,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,u={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};u.lastRowMask.fill(1<<31),u.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),s=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(m)===y&&(d[h]|=1<0&&v[b]>=r+i;)b-=1;b===a&&v[b]<=r&&(v[b]{"use strict";var n=r(4624),o=r(5096),i=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o(r):r}},5096:(t,e,r)=>{"use strict";var n=r(3520),o=r(4624),i=r(5676),a=r(2824),u=o("%Function.prototype.apply%"),c=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(c,u),l=o("%Object.defineProperty%",!0),f=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(t){l=null}t.exports=function(t){if("function"!=typeof t)throw new a("a function is required");var e=s(n,c,arguments);return i(e,1+f(0,t.length-(arguments.length-1)),!0)};var p=function(){return s(n,u,arguments)};l?l(t.exports,"apply",{value:p}):t.exports.apply=p},2448:(t,e,r)=>{"use strict";var n=r(3268)(),o=r(4624),i=n&&o("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch(t){i=!1}var a=r(6500),u=r(2824),c=r(6168);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new u("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new u("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new u("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new u("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new u("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new u("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===s&&f?f.configurable:!s,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||s))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},2732:(t,e,r)=>{"use strict";var n=r(2812),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,u=r(2448),c=r(3268)(),s=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?u(t,e,r,!0):u(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var u=0;u{"use strict";t.exports=EvalError},1152:t=>{"use strict";t.exports=Error},1932:t=>{"use strict";t.exports=RangeError},5028:t=>{"use strict";t.exports=ReferenceError},6500:t=>{"use strict";t.exports=SyntaxError},2824:t=>{"use strict";t.exports=TypeError},5488:t=>{"use strict";t.exports=URIError},9200:(t,e,r)=>{"use strict";var n=r(4624)("%Object.defineProperty%",!0),o=r(4712)(),i=r(4440),a=o?Symbol.toStringTag:null;t.exports=function(t,e){var r=arguments.length>2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},108:(t,e,r)=>{"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(5988),i=r(648),a=r(1844),u=r(7256);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):u(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||u(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,u="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a{"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},1480:t=>{"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n{"use strict";var n=r(1480);t.exports=Function.prototype.bind||n},2656:t=>{"use strict";var e=function(){return"string"==typeof function(){}.name},r=Object.getOwnPropertyDescriptor;if(r)try{r([],"length")}catch(t){r=null}e.functionsHaveConfigurableNames=function(){if(!e()||!r)return!1;var t=r((function(){}),"name");return!!t&&!!t.configurable};var n=Function.prototype.bind;e.boundFunctionsHaveNames=function(){return e()&&"function"==typeof n&&""!==function(){}.bind().name},t.exports=e},4624:(t,e,r)=>{"use strict";var n,o=r(1152),i=r(7261),a=r(1932),u=r(5028),c=r(6500),s=r(2824),l=r(5488),f=Function,p=function(t){try{return f('"use strict"; return ('+t+").constructor;")()}catch(t){}},y=Object.getOwnPropertyDescriptor;if(y)try{y({},"")}catch(t){y=null}var d=function(){throw new s},h=y?function(){try{return d}catch(t){try{return y(arguments,"callee").get}catch(t){return d}}}():d,g=r(9800)(),m=r(7e3)(),b=Object.getPrototypeOf||(m?function(t){return t.__proto__}:null),v={},w="undefined"!=typeof Uint8Array&&b?b(Uint8Array):n,x={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":u,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":h,"%TypedArray%":w,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(b)try{null.error}catch(t){var S=b(b(t));x["%Error.prototype%"]=S}var E=function t(e){var r;if("%AsyncFunction%"===e)r=p("async function () {}");else if("%GeneratorFunction%"===e)r=p("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=p("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&b&&(r=b(o.prototype))}return x[e]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},O=r(3520),j=r(4440),T=O.call(Function.call,Array.prototype.concat),P=O.call(Function.apply,Array.prototype.splice),R=O.call(Function.call,String.prototype.replace),C=O.call(Function.call,String.prototype.slice),I=O.call(Function.call,RegExp.prototype.exec),N=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,M=/\\(\\)?/g,k=function(t,e){var r,n=t;if(j(A,n)&&(n="%"+(r=A[n])[0]+"%"),j(x,n)){var o=x[n];if(o===v&&(o=E(n)),void 0===o&&!e)throw new s("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new c("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new s('"allowMissing" argument must be a boolean');if(null===I(/^%?[^%]*%?$/,t))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=C(t,0,1),r=C(t,-1);if("%"===e&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return R(t,N,(function(t,e,r,o){n[n.length]=r?R(o,M,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=k("%"+n+"%",e),i=o.name,a=o.value,u=!1,l=o.alias;l&&(n=l[0],P(r,T([0,1],l)));for(var f=1,p=!0;f=r.length){var m=y(a,d);a=(p=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:a[d]}else p=j(a,d),a=a[d];p&&!u&&(x[i]=a)}}return a}},6168:(t,e,r)=>{"use strict";var n=r(4624)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},3268:(t,e,r)=>{"use strict";var n=r(4624)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},7e3:t=>{"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},9800:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(7904);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},7904:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4712:(t,e,r)=>{"use strict";var n=r(7904);t.exports=function(){return n()&&!!Symbol.toStringTag}},4440:(t,e,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(3520);t.exports=i.call(n,o)},7284:(t,e,r)=>{"use strict";var n=r(4440),o=r(3147)(),i=r(2824),a={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`O` is not an object");if("string"!=typeof e)throw new i("`slot` must be a string");if(o.assert(t),!a.has(t,e))throw new i("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`O` is not an object");if("string"!=typeof e)throw new i("`slot` must be a string");var r=o.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`O` is not an object");if("string"!=typeof e)throw new i("`slot` must be a string");var r=o.get(t);return!!r&&n(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`O` is not an object");if("string"!=typeof e)throw new i("`slot` must be a string");var n=o.get(t);n||(n={},o.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(a),t.exports=a},648:t=>{"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},u=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,s="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&u(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(s)return u(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&u(t)}},1844:(t,e,r)=>{"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(4712)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},1476:(t,e,r)=>{"use strict";var n,o,i,a,u=r(668),c=r(4712)();if(c){n=u("Object.prototype.hasOwnProperty"),o=u("RegExp.prototype.exec"),i={};var s=function(){throw i};a={toString:s,valueOf:s},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=s)}var l=u("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},7256:(t,e,r)=>{"use strict";var n=Object.prototype.toString;if(r(9800)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4152:(t,e,r)=>{var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,u="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=u&&c&&"function"==typeof c.get?c.get:null,l=u&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,h=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,T="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,C="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function k(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var $=r(1740),D=$.custom,F=U(D)?D:null;function L(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function B(t){return v.call(String(t),/"/g,""")}function _(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function W(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){if(C)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!R)return!1;try{return R.call(t),!0}catch(t){}return!1}t.exports=function t(e,n,o,u){var c=n||{};if(G(c,"quoteStyle")&&"single"!==c.quoteStyle&&"double"!==c.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var h=!G(c,"customInspect")||c.customInspect;if("boolean"!=typeof h&&"symbol"!==h)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=c.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return q(e,c);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var S=String(e);return w?k(e,S):S}if("bigint"==typeof e){var j=String(e)+"n";return w?k(e,j):j}var P=void 0===c.depth?5:c.depth;if(void 0===o&&(o=0),o>=P&&P>0&&"object"==typeof e)return _(e)?"[Array]":"[Object]";var D,z=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(c,o);if(void 0===u)u=[];else if(V(u,e)>=0)return"[Circular]";function X(e,r,n){if(r&&(u=O.call(u)).push(r),n){var i={depth:c.depth};return G(c,"quoteStyle")&&(i.quoteStyle=c.quoteStyle),t(e,i,o+1,u)}return t(e,c,o+1,u)}if("function"==typeof e&&!W(e)){var tt=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),et=Z(e,X);return"[Function"+(tt?": "+tt:" (anonymous)")+"]"+(et.length>0?" { "+A.call(et,", ")+" }":"")}if(U(e)){var rt=C?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(e);return"object"!=typeof e||C?rt:K(rt)}if((D=e)&&"object"==typeof D&&("undefined"!=typeof HTMLElement&&D instanceof HTMLElement||"string"==typeof D.nodeName&&"function"==typeof D.getAttribute)){for(var nt="<"+x.call(String(e.nodeName)),ot=e.attributes||[],it=0;it"}if(_(e)){if(0===e.length)return"[]";var at=Z(e,X);return z&&!function(t){for(var e=0;e=0)return!1;return!0}(at)?"["+Q(at,z)+"]":"[ "+A.call(at,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var ut=Z(e,X);return"cause"in Error.prototype||!("cause"in e)||N.call(e,"cause")?0===ut.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(ut,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+X(e.cause),ut),", ")+" }"}if("object"==typeof e&&h){if(F&&"function"==typeof e[F]&&$)return $(e,{depth:P-o});if("symbol"!==h&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{s.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var ct=[];return a&&a.call(e,(function(t,r){ct.push(X(r,e,!0)+" => "+X(t,e))})),J("Map",i.call(e),ct,z)}if(function(t){if(!s||!t||"object"!=typeof t)return!1;try{s.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var st=[];return l&&l.call(e,(function(t){st.push(X(t,e))})),J("Set",s.call(e),st,z)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return Y("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return Y("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return Y("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(X(Number(e)));if(function(t){if(!t||"object"!=typeof t||!T)return!1;try{return T.call(t),!0}catch(t){}return!1}(e))return K(X(T.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(d.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(X(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if(e===r.g)return"{ [object globalThis] }";if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!W(e)){var lt=Z(e,X),ft=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,pt=e instanceof Object?"":"null prototype",yt=!ft&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):pt?"Object":"",dt=(ft||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(yt||pt?"["+A.call(E.call([],yt||[],pt||[]),": ")+"] ":"");return 0===lt.length?dt+"{}":z?dt+"{"+Q(lt,z)+"}":dt+"{ "+A.call(lt,", ")+" }"}return String(e)};var z=Object.prototype.hasOwnProperty||function(t){return t in this};function G(t,e){return z.call(t,e)}function H(t){return h.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return q(b.call(t,0,e.maxStringLength),e)+n}return L(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,X),"single",e)}function X(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function K(t){return"Object("+t+")"}function Y(t){return t+" { ? }"}function J(t,e,r,n){return t+" ("+e+") {"+(n?Q(r,n):A.call(r,", "))+"}"}function Q(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Z(t,e){var r=_(t),n=[];if(r){n.length=t.length;for(var o=0;o{"use strict";var n;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=r(9096),u=Object.prototype.propertyIsEnumerable,c=!u.call({toString:null},"toString"),s=u.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(t){var e=t.constructor;return e&&e.prototype===t},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},y=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!p["$"+t]&&o.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{f(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===i.call(t),n=a(t),u=e&&"[object String]"===i.call(t),p=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var d=s&&r;if(u&&t.length>0&&!o.call(t,0))for(var h=0;h0)for(var g=0;g{"use strict";var n=Array.prototype.slice,o=r(9096),i=Object.keys,a=i?function(t){return i(t)}:r(9560),u=Object.keys;a.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return o(t)?u(n.call(t)):u(t)})}else Object.keys=a;return Object.keys||a},t.exports=a},9096:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},7636:(t,e,r)=>{"use strict";var n=r(6308),o=r(2824),i=Object;t.exports=n((function(){if(null==this||this!==i(this))throw new o("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},2192:(t,e,r)=>{"use strict";var n=r(2732),o=r(5096),i=r(7636),a=r(9296),u=r(736),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:u}),t.exports=c},9296:(t,e,r)=>{"use strict";var n=r(7636),o=r(2732).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},736:(t,e,r)=>{"use strict";var n=r(2732).supportsDescriptors,o=r(9296),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,u=TypeError,c=Object.getPrototypeOf,s=/a/;t.exports=function(){if(!n||!c)throw new u("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(s),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},860:(t,e,r)=>{"use strict";var n=r(668),o=r(1476),i=n("RegExp.prototype.exec"),a=r(2824);t.exports=function(t){if(!o(t))throw new a("`regex` must be a RegExp");return function(e){return null!==i(t,e)}}},5676:(t,e,r)=>{"use strict";var n=r(4624),o=r(2448),i=r(3268)(),a=r(6168),u=r(2824),c=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new u("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||c(e)!==e)throw new u("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,s=!0;if("length"in t&&a){var l=a(t,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(s=!1)}return(n||s||!r)&&(i?o(t,"length",e,!0,!0):o(t,"length",e)),t}},6308:(t,e,r)=>{"use strict";var n=r(2448),o=r(3268)(),i=r(2656).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},3147:(t,e,r)=>{"use strict";var n=r(4624),o=r(668),i=r(4152),a=r(2824),u=n("%WeakMap%",!0),c=n("%Map%",!0),s=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),h=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(u&&n&&("object"==typeof n||"function"==typeof n)){if(t)return s(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=h(t,e);return r&&r.value}(r,n)},has:function(n){if(u&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return d(e,n)}else if(r)return function(t,e){return!!h(t,e)}(r,n);return!1},set:function(n,o){u&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new u),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=h(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},9508:(t,e,r)=>{"use strict";var n=r(1700),o=r(3672),i=r(5552),a=r(3816),u=r(5424),c=r(4656),s=r(668),l=r(9800)(),f=r(2192),p=s("String.prototype.indexOf"),y=r(6288),d=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(u(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=d(t);if(void 0!==i)return n(i,t,[e])}var s=u(e),l=new RegExp(t,"g");return n(d(l),l,[s])}},3732:(t,e,r)=>{"use strict";var n=r(5096),o=r(2732),i=r(9508),a=r(5844),u=r(4148),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:u}),t.exports=c},6288:(t,e,r)=>{"use strict";var n=r(9800)(),o=r(7492);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},5844:(t,e,r)=>{"use strict";var n=r(9508);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},7492:(t,e,r)=>{"use strict";var n=r(5211),o=r(3672),i=r(4e3),a=r(8652),u=r(4784),c=r(5424),s=r(8645),l=r(2192),f=r(6308),p=r(668)("String.prototype.indexOf"),y=RegExp,d="flags"in RegExp.prototype,h=f((function(t){var e=this;if("Object"!==s(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(d&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),h=f.flags,g=f.matcher,m=u(o(e,"lastIndex"));i(g,"lastIndex",m,!0);var b=p(h,"g")>-1,v=p(h,"u")>-1;return n(g,r,b,v)}),"[Symbol.matchAll]",!0);t.exports=h},4148:(t,e,r)=>{"use strict";var n=r(2732),o=r(9800)(),i=r(5844),a=r(6288),u=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),u&&c){var r=c(Symbol,e);r&&!r.configurable||u(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var s=a(),l={};l[e]=s;var f={};f[e]=function(){return RegExp.prototype[e]!==s},n(RegExp.prototype,l,f)}return t}},6936:(t,e,r)=>{"use strict";var n=r(4656),o=r(5424),i=r(668)("String.prototype.replace"),a=/^\s$/.test("᠎"),u=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,u,""),c,"")}},9292:(t,e,r)=>{"use strict";var n=r(5096),o=r(2732),i=r(4656),a=r(6936),u=r(6684),c=r(9788),s=n(u()),l=function(t){return i(t),s(t)};o(l,{getPolyfill:u,implementation:a,shim:c}),t.exports=l},6684:(t,e,r)=>{"use strict";var n=r(6936);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},9788:(t,e,r)=>{"use strict";var n=r(2732),o=r(6684);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},1740:()=>{},1056:(t,e,r)=>{"use strict";var n=r(4624),o=r(8536),i=r(8645),a=r(7724),u=r(9132),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>u)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},1700:(t,e,r)=>{"use strict";var n=r(4624),o=r(668),i=n("%TypeError%"),a=r(1720),u=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return u(t,e,r)}},8536:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(668),i=r(1712),a=r(8444),u=r(8645),c=r(2320),s=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==u(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=s(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var d=l(t,e+1);return a(d)?{"[[CodePoint]]":c(o,d),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},4288:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(8645);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},2672:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(4436),i=r(8924),a=r(3880),u=r(2968),c=r(8800),s=r(8645);t.exports=function(t,e,r){if("Object"!==s(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},5211:(t,e,r)=>{"use strict";var n=r(4624),o=r(9800)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),u=r(1056),c=r(4288),s=r(2672),l=r(3672),f=r(6216),p=r(8972),y=r(4e3),d=r(4784),h=r(5424),g=r(8645),m=r(7284),b=r(9200),v=function(t,e,r,n){if("String"!==g(e))throw new i("`S` must be a string");if("Boolean"!==g(r))throw new i("`global` must be a boolean");if("Boolean"!==g(n))throw new i("`fullUnicode` must be a boolean");m.set(this,"[[IteratingRegExp]]",t),m.set(this,"[[IteratedString]]",e),m.set(this,"[[Global]]",r),m.set(this,"[[Unicode]]",n),m.set(this,"[[Done]]",!1)};a&&(v.prototype=f(a)),s(v.prototype,"next",(function(){var t=this;if("Object"!==g(t))throw new i("receiver must be an object");if(!(t instanceof v&&m.has(t,"[[IteratingRegExp]]")&&m.has(t,"[[IteratedString]]")&&m.has(t,"[[Global]]")&&m.has(t,"[[Unicode]]")&&m.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(m.get(t,"[[Done]]"))return c(void 0,!0);var e=m.get(t,"[[IteratingRegExp]]"),r=m.get(t,"[[IteratedString]]"),n=m.get(t,"[[Global]]"),o=m.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return m.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===h(l(a,"0"))){var s=d(l(e,"lastIndex")),f=u(r,s,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return m.set(t,"[[Done]]",!0),c(a,!1)})),o&&(b(v.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof v.prototype[Symbol.iterator])&&s(v.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new v(t,e,r,n)}},7268:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(320),i=r(4436),a=r(8924),u=r(4936),c=r(3880),s=r(2968),l=r(8800),f=r(5696),p=r(8645);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:u},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:u},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8924:(t,e,r)=>{"use strict";var n=r(3600),o=r(3504),i=r(8645);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},3672:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(4152),i=r(2968),a=r(8645);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},5552:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(3396),i=r(3048),a=r(2968),u=r(4152);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(u(e)+" is not a function: "+u(r));return r}}},3396:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(4152),i=r(2968);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},4936:(t,e,r)=>{"use strict";var n=r(4440),o=r(8645),i=r(3600);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},1720:(t,e,r)=>{"use strict";t.exports=r(704)},3048:(t,e,r)=>{"use strict";t.exports=r(648)},211:(t,e,r)=>{"use strict";var n=r(8600)("%Reflect.construct%",!0),o=r(7268);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3880:(t,e,r)=>{"use strict";var n=r(4440),o=r(8645),i=r(3600);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},2968:t=>{"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},3816:(t,e,r)=>{"use strict";var n=r(4624)("%Symbol.match%",!0),o=r(1476),i=r(6848);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},6216:(t,e,r)=>{"use strict";var n=r(4624),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),u=r(1720),c=r(8645),s=r(4672),l=r(7284),f=r(7e3)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!u(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&s(r,(function(t){l.set(e,t,void 0)})),e}},8972:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(668)("RegExp.prototype.exec"),i=r(1700),a=r(3672),u=r(3048),c=r(8645);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(u(r)){var s=i(r,t,[e]);if(null===s||"Object"===c(s))return s;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},4656:(t,e,r)=>{"use strict";t.exports=r(176)},8800:(t,e,r)=>{"use strict";var n=r(2808);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},4e3:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(2968),i=r(8800),a=r(8645),u=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,u&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!u||i(t[e],r)}catch(t){return!1}}},8652:(t,e,r)=>{"use strict";var n=r(4624),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(211),u=r(8645);t.exports=function(t,e){if("Object"!==u(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==u(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},8772:(t,e,r)=>{"use strict";var n=r(4624),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),u=n("%parseInt%"),c=r(668),s=r(860),l=c("String.prototype.slice"),f=s(/^0b[01]+$/i),p=s(/^0o[0-7]+$/i),y=s(/^[-+]0x[0-9a-f]+$/i),d=s(new i("["+["…","​","￾"].join("")+"]","g")),h=r(9292),g=r(8645);t.exports=function t(e){if("String"!==g(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(u(l(e,2),2));if(p(e))return o(u(l(e,2),8));if(d(e)||y(e))return NaN;var r=h(e);return r!==e?t(r):o(e)}},6848:t=>{"use strict";t.exports=function(t){return!!t}},9424:(t,e,r)=>{"use strict";var n=r(7220),o=r(2592),i=r(2808),a=r(2931);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},4784:(t,e,r)=>{"use strict";var n=r(9132),o=r(9424);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},7220:(t,e,r)=>{"use strict";var n=r(4624),o=n("%TypeError%"),i=n("%Number%"),a=r(2336),u=r(5556),c=r(8772);t.exports=function(t){var e=a(t)?t:u(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},5556:(t,e,r)=>{"use strict";var n=r(108);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},5696:(t,e,r)=>{"use strict";var n=r(4440),o=r(4624)("%TypeError%"),i=r(8645),a=r(6848),u=r(3048);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!u(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!u(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5424:(t,e,r)=>{"use strict";var n=r(4624),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},8645:(t,e,r)=>{"use strict";var n=r(7936);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},2320:(t,e,r)=>{"use strict";var n=r(4624),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(1712),u=r(8444);t.exports=function(t,e){if(!a(t)||!u(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},2312:(t,e,r)=>{"use strict";var n=r(8645),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},2592:(t,e,r)=>{"use strict";var n=r(4624),o=r(2312),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},176:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},7936:t=>{"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},8600:(t,e,r)=>{"use strict";t.exports=r(4624)},4436:(t,e,r)=>{"use strict";var n=r(3268),o=r(4624),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),u=a&&r(704),c=r(668)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,s){if(!i){if(!t(s))return!1;if(!s["[[Configurable]]"]||!s["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!s["[[Enumerable]]"])return!1;var l=s["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in s&&u(n)&&n.length!==s["[[Value]]"]?(n.length=s["[[Value]]"],n.length===s["[[Value]]"]):(i(n,o,r(s)),!0)}},704:(t,e,r)=>{"use strict";var n=r(4624)("%Array%"),o=!n.isArray&&r(668)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},3600:(t,e,r)=>{"use strict";var n=r(4624),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(4440),u=r(7724),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(5092),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&u(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},4672:t=>{"use strict";t.exports=function(t,e){for(var r=0;r{"use strict";t.exports=function(t){if(void 0===t)return t;var e={};return"[[Value]]"in t&&(e.value=t["[[Value]]"]),"[[Writable]]"in t&&(e.writable=!!t["[[Writable]]"]),"[[Get]]"in t&&(e.get=t["[[Get]]"]),"[[Set]]"in t&&(e.set=t["[[Set]]"]),"[[Enumerable]]"in t&&(e.enumerable=!!t["[[Enumerable]]"]),"[[Configurable]]"in t&&(e.configurable=!!t["[[Configurable]]"]),e}},2931:(t,e,r)=>{"use strict";var n=r(2808);t.exports=function(t){return("number"==typeof t||"bigint"==typeof t)&&!n(t)&&t!==1/0&&t!==-1/0}},7724:(t,e,r)=>{"use strict";var n=r(4624),o=n("%Math.abs%"),i=n("%Math.floor%"),a=r(2808),u=r(2931);t.exports=function(t){if("number"!=typeof t||a(t)||!u(t))return!1;var e=o(t);return i(e)===e}},1712:t=>{"use strict";t.exports=function(t){return"number"==typeof t&&t>=55296&&t<=56319}},5092:(t,e,r)=>{"use strict";var n=r(4440);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},2808:t=>{"use strict";t.exports=Number.isNaN||function(t){return t!=t}},2336:t=>{"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},320:(t,e,r)=>{"use strict";var n=r(4624),o=r(4440),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},8444:t=>{"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},9132:t=>{"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=r(9116);function e(e,r,n){let o=0,i=[];for(;-1!==o;)o=e.indexOf(r,o),-1!==o&&(i.push({start:o,end:o+r.length,errors:0}),o+=1);return i.length>0?i:(0,t.c)(e,r,n)}function n(t,r){return 0===r.length||0===t.length?0:1-e(t,r,r.length)[0].errors/r.length}function o(t){switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return t.textContent.length;default:return 0}}function i(t){let e=t.previousSibling,r=0;for(;e;)r+=o(e),e=e.previousSibling;return r}function a(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;no?(a.push({node:u,offset:o-s}),o=r.shift()):(c=i.nextNode(),s+=u.data.length);for(;void 0!==o&&u&&s===o;)a.push({node:u,offset:u.data.length}),o=r.shift();if(void 0!==o)throw new RangeError("Offset exceeds text length");return a}class u{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=i(e),e=e.parentElement;return new u(e,r)}resolve(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return a(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=1===t.direction,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return u.fromPoint(t,e);case Node.ELEMENT_NODE:return new u(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=i(t)+e;return new u(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n2&&void 0!==arguments[2]?arguments[2]:{};this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=c.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new l(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new l(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.toPositionAnchor(t).toRange()}toPositionAnchor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=function(t,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===r.length)return null;const i=Math.min(256,r.length/2),a=e(t,r,i);if(0===a.length)return null;const u=e=>{const i=1-e.errors/r.length,a=o.prefix?n(t.slice(Math.max(0,e.start-o.prefix.length),e.start),o.prefix):1,u=o.suffix?n(t.slice(e.end,e.end+o.suffix.length),o.suffix):1;let c=1;return"number"==typeof o.hint&&(c=1-Math.abs(e.start-o.hint)/t.length),(50*i+20*a+20*u+2*c)/92},c=a.map((t=>({start:t.start,end:t.end,score:u(t)})));return c.sort(((t,e)=>e.score-t.score)),c[0]}(this.root.textContent,this.exact,{...this.context,hint:t.hint});if(!r)throw new Error("Quote not found");return new s(this.root,r.start,r.end)}}var f=r(3732);r.n(f)().shim();const p=!0;function y(){if(!readium.link)return null;const t=readium.link.href;if(!t)return null;const e=function(){const t=window.getSelection();if(!t)return;if(t.isCollapsed)return;const e=t.toString();if(0===e.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const r=1===t.rangeCount?t.getRangeAt(0):function(t,e,r,n){const o=new Range;if(o.setStart(t,e),o.setEnd(r,n),!o.collapsed)return o;d(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const i=new Range;if(i.setStart(r,n),i.setEnd(t,e),!i.collapsed)return d(">>> createOrderedRange RANGE REVERSE OK."),o;d(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!r||r.collapsed)return void d("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const n=document.body.textContent,o=c.fromRange(r).relativeTo(document.body),i=o.start.offset,a=o.end.offset;let u=n.slice(Math.max(0,i-200),i),s=u.search(/\P{L}\p{L}/gu);-1!==s&&(u=u.slice(s+1));let l=n.slice(a,Math.min(n.length,a+200)),f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:e,before:u,after:l}}();return e?{href:t,text:e,rect:function(){try{let t=window.getSelection();if(!t)return;return M(t.getRangeAt(0).getBoundingClientRect())}catch(t){return I(t),null}}()}:null}function d(){p&&R.apply(null,arguments)}window.addEventListener("error",(function(t){webkit.messageHandlers.logError.postMessage({message:t.message,filename:t.filename,line:t.lineno})}),!1),window.addEventListener("load",(function(){var t;new ResizeObserver((()=>{t&&window.cancelAnimationFrame(t),t=window.requestAnimationFrame((function(){w=window.innerWidth,function(){const t="readium-virtual-page";var e=document.getElementById(t);if(S()||2!=parseInt(window.getComputedStyle(document.documentElement).getPropertyValue("column-count"))){var r;null===(r=e)||void 0===r||r.remove()}else{var n=document.scrollingElement.scrollWidth/window.innerWidth;Math.round(2*n)/2%1>.1&&(e?e.remove():((e=document.createElement("div")).setAttribute("id",t),e.style.breakBefore="column",e.innerHTML="​",document.body.appendChild(e)))}}(),function(){if(!S()){var t=O(window.scrollX+1);document.scrollingElement.scrollLeft=t}}(),x()}))})).observe(document.body)}),!1);var h,g,m=0,b=0,v=!1,w=0;function x(){readium.isFixedLayout||(b=window.scrollY/document.scrollingElement.scrollHeight,m=Math.abs(window.scrollX/document.scrollingElement.scrollWidth),0!==document.scrollingElement.scrollWidth&&0!==document.scrollingElement.scrollHeight&&(v||window.requestAnimationFrame((function(){var t;t=(S()?b:m).toString(),webkit.messageHandlers.progressionChanged.postMessage(t),v=!1})),v=!0))}function S(){return"readium-scroll-on"==document.documentElement.style.getPropertyValue("--USER__view").trim()}function E(t){return S()?document.scrollingElement.scrollTop=t.top+window.scrollY:document.scrollingElement.scrollLeft=O(t.left+window.scrollX),!0}function A(t){var e=window.scrollX,r=window.innerWidth;return document.scrollingElement.scrollLeft=t,Math.abs(e-t)/r>.01}function O(t){var e=t+1;return e-e%w}function j(t){try{let n=t.locations,o=t.text;var e;if(o&&o.highlight)return n&&n.cssSelector&&(e=document.querySelector(n.cssSelector)),e||(e=document.body),new l(e,o.highlight,{prefix:o.before,suffix:o.after}).toRange();if(n){var r=null;if(!r&&n.cssSelector&&(r=document.querySelector(n.cssSelector)),!r&&n.fragments)for(const t of n.fragments)if(r=document.getElementById(t))break;if(r){let t=document.createRange();return t.setStartBefore(r),t.setEndAfter(r),t}}}catch(t){I(t)}return null}function T(t,e){null===e?P(t):document.documentElement.style.setProperty(t,e,"important")}function P(t){document.documentElement.style.removeProperty(t)}function R(){var t=Array.prototype.slice.call(arguments).join(" ");webkit.messageHandlers.log.postMessage(t)}function C(t){I(new Error(t))}function I(t){webkit.messageHandlers.logError.postMessage({message:t.message})}window.addEventListener("scroll",x),document.addEventListener("selectionchange",(50,h=function(){webkit.messageHandlers.selectionChanged.postMessage(y())},function(){var t=this,e=arguments;clearTimeout(g),g=setTimeout((function(){h.apply(t,e),g=null}),50)}));const N=!1;function M(t){let e=k({x:t.left,y:t.top});const r=t.width,n=t.height,o=e.x,i=e.y;return{width:r,height:n,left:o,top:i,right:o+r,bottom:i+n}}function k(t){if(!frameElement)return t;let e=frameElement.getBoundingClientRect();if(!e)return t;let r=window.top.document.documentElement;return{x:t.x+e.x+r.scrollLeft,y:t.y+e.y+r.scrollTop}}function $(t,e){let r=t.getClientRects();const n=[];for(const t of r)n.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const o=_(function(t,e){const r=new Set(t);for(const e of t)if(e.width>1&&e.height>1){for(const n of t)if(e!==n&&r.has(n)&&L(n,e,1)){G("CLIENT RECT: remove contained"),r.delete(e);break}}else G("CLIENT RECT: remove tiny"),r.delete(e);return Array.from(r)}(D(n,1,e)));for(let t=o.length-1;t>=0;t--){const e=o[t];if(!(e.width*e.height>4)){if(!(o.length>1)){G("CLIENT RECT: remove small, but keep otherwise empty!");break}G("CLIENT RECT: remove small"),o.splice(t,1)}}return G(`CLIENT RECT: reduced ${n.length} --\x3e ${o.length}`),o}function D(t,e,r){for(let n=0;nt!==i&&t!==a)),o=F(i,a);return n.push(o),D(n,e,r)}}return t}function F(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function L(t,e,r){return B(t,e.left,e.top,r)&&B(t,e.right,e.top,r)&&B(t,e.left,e.bottom,r)&&B(t,e.right,e.bottom,r)}function B(t,e,r,n){return(t.lefte||z(t.right,e,n))&&(t.topr||z(t.bottom,r,n))}function _(t){for(let e=0;et!==e));return Array.prototype.push.apply(a,r),_(a)}}else G("replaceOverlapingRects rect1 === rect2 ??!")}return t}function W(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function U(t,e,r){return(t.left=0&&z(t.left,e.right,r))&&(e.left=0&&z(e.left,t.right,r))&&(t.top=0&&z(t.top,e.bottom,r))&&(e.top=0&&z(e.top,t.bottom,r))}function z(t,e,r){return Math.abs(t-e)<=r}function G(){N&&R.apply(null,arguments)}var H,V=[],q="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(H||(H={}));var X,K=function(t){return Object.freeze(t)},Y=function(t,e){this.inlineSize=t,this.blockSize=e,K(this)},J=function(){function t(t,e,r,n){return this.x=t,this.y=e,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,K(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Q=function(t){return t instanceof SVGElement&&"getBBox"in t},Z=function(t){if(Q(t)){var e=t.getBBox(),r=e.width,n=e.height;return!r&&!n}var o=t,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||t.getClientRects().length)},tt=function(t){var e;if(t instanceof Element)return!0;var r=null===(e=null==t?void 0:t.ownerDocument)||void 0===e?void 0:e.defaultView;return!!(r&&t instanceof r.Element)},et="undefined"!=typeof window?window:{},rt=new WeakMap,nt=/auto|scroll/,ot=/^tb|vertical/,it=/msie|trident/i.test(et.navigator&&et.navigator.userAgent),at=function(t){return parseFloat(t||"0")},ut=function(t,e,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=!1),new Y((r?e:t)||0,(r?t:e)||0)},ct=K({devicePixelContentBoxSize:ut(),borderBoxSize:ut(),contentBoxSize:ut(),contentRect:new J(0,0,0,0)}),st=function(t,e){if(void 0===e&&(e=!1),rt.has(t)&&!e)return rt.get(t);if(Z(t))return rt.set(t,ct),ct;var r=getComputedStyle(t),n=Q(t)&&t.ownerSVGElement&&t.getBBox(),o=!it&&"border-box"===r.boxSizing,i=ot.test(r.writingMode||""),a=!n&&nt.test(r.overflowY||""),u=!n&&nt.test(r.overflowX||""),c=n?0:at(r.paddingTop),s=n?0:at(r.paddingRight),l=n?0:at(r.paddingBottom),f=n?0:at(r.paddingLeft),p=n?0:at(r.borderTopWidth),y=n?0:at(r.borderRightWidth),d=n?0:at(r.borderBottomWidth),h=f+s,g=c+l,m=(n?0:at(r.borderLeftWidth))+y,b=p+d,v=u?t.offsetHeight-b-t.clientHeight:0,w=a?t.offsetWidth-m-t.clientWidth:0,x=o?h+m:0,S=o?g+b:0,E=n?n.width:at(r.width)-x-w,A=n?n.height:at(r.height)-S-v,O=E+h+w+m,j=A+g+v+b,T=K({devicePixelContentBoxSize:ut(Math.round(E*devicePixelRatio),Math.round(A*devicePixelRatio),i),borderBoxSize:ut(O,j,i),contentBoxSize:ut(E,A,i),contentRect:new J(f,c,E,A)});return rt.set(t,T),T},lt=function(t,e,r){var n=st(t,r),o=n.borderBoxSize,i=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(e){case H.DEVICE_PIXEL_CONTENT_BOX:return a;case H.BORDER_BOX:return o;default:return i}},ft=function(t){var e=st(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=K([e.borderBoxSize]),this.contentBoxSize=K([e.contentBoxSize]),this.devicePixelContentBoxSize=K([e.devicePixelContentBoxSize])},pt=function(t){if(Z(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},yt=function(){var t=1/0,e=[];V.forEach((function(r){if(0!==r.activeTargets.length){var n=[];r.activeTargets.forEach((function(e){var r=new ft(e.target),o=pt(e.target);n.push(r),e.lastReportedSize=lt(e.target,e.observedBox),ot?e.activeTargets.push(r):e.skippedTargets.push(r))}))}))},ht=[],gt=0,mt={attributes:!0,characterData:!0,childList:!0,subtree:!0},bt=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],vt=function(t){return void 0===t&&(t=0),Date.now()+t},wt=!1,xt=function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var e=this;if(void 0===t&&(t=250),!wt){wt=!0;var r,n=vt(t);r=function(){var r=!1;try{r=function(){var t,e=0;for(dt(e);V.some((function(t){return t.activeTargets.length>0}));)e=yt(),dt(e);return V.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:q}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=q),window.dispatchEvent(t)),e>0}()}finally{if(wt=!1,t=n-vt(),!gt)return;r?e.run(1e3):t>0?e.run(t):e.start()}},function(t){if(!X){var e=0,r=document.createTextNode("");new MutationObserver((function(){return ht.splice(0).forEach((function(t){return t()}))})).observe(r,{characterData:!0}),X=function(){r.textContent="".concat(e?e--:e++)}}ht.push(t),X()}((function(){requestAnimationFrame(r)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,mt)};document.body?e():et.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),bt.forEach((function(e){return et.addEventListener(e,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),bt.forEach((function(e){return et.removeEventListener(e,t.listener,!0)})),this.stopped=!0)},t}(),St=new xt,Et=function(t){!gt&&t>0&&St.start(),!(gt+=t)&&St.stop()},At=function(){function t(t,e){this.target=t,this.observedBox=e||H.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=lt(this.target,this.observedBox,!0);return t=this.target,Q(t)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),Ot=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},jt=new WeakMap,Tt=function(t,e){for(var r=0;r=0&&(o&&V.splice(V.indexOf(r),1),r.observationTargets.splice(n,1),Et(-1))},t.disconnect=function(t){var e=this,r=jt.get(t);r.observationTargets.slice().forEach((function(r){return e.unobserve(t,r.target)})),r.activeTargets.splice(0,r.activeTargets.length)},t}(),Rt=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Pt.connect(this,t)}return t.prototype.observe=function(t,e){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!tt(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Pt.observe(this,t,e)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!tt(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Pt.unobserve(this,t)},t.prototype.disconnect=function(){Pt.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const Ct=window.ResizeObserver||Rt;let It=new Map,Nt=new Map;var Mt=0;function kt(t){if(0===Nt.size)return null;for(const[e,r]of Nt)if(r.isActivable())for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements){let o=r.getBoundingClientRect().toJSON();if(B(o,t.clientX,t.clientY,1))return{group:e,item:n,element:r,rect:o}}return null}function $t(t){return t&&t instanceof Element}window.addEventListener("load",(function(){const t=document.body;var e={width:0,height:0};new Ct((()=>{e.width===t.clientWidth&&e.height===t.clientHeight||(e={width:t.clientWidth,height:t.clientHeight},Nt.forEach((function(t){t.requestLayout()})))})).observe(t)}),!1);const Dt={NONE:"",DESCENDANT:" ",CHILD:" > "},Ft={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"},Lt="CssSelectorGenerator";function Bt(t="unknown problem",...e){console.warn(`${Lt}: ${t}`,...e)}const _t={selectors:[Ft.id,Ft.class,Ft.tag,Ft.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function Wt(t){return t instanceof RegExp}function Ut(t){return["string","function"].includes(typeof t)||Wt(t)}function zt(t){return Array.isArray(t)?t.filter(Ut):[]}function Gt(t){const e=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(t){return t instanceof Node}(t)&&e.includes(t.nodeType)}function Ht(t,e){if(Gt(t))return t.contains(e)||Bt("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will nto work as intended."),t;const r=e.getRootNode({composed:!1});return Gt(r)?(r!==document&&Bt("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),r):e.ownerDocument.querySelector(":root")}function Vt(t){return"number"==typeof t?t:Number.POSITIVE_INFINITY}function qt(t=[]){const[e=[],...r]=t;return 0===r.length?e:r.reduce(((t,e)=>t.filter((t=>e.includes(t)))),e)}function Xt(t){return[].concat(...t)}function Kt(t){const e=t.map((t=>{if(Wt(t))return e=>t.test(e);if("function"==typeof t)return e=>{const r=t(e);return"boolean"!=typeof r?(Bt("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",t),!1):r};if("string"==typeof t){const e=new RegExp("^"+t.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")+"$");return t=>e.test(t)}return Bt("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",t),()=>!1}));return t=>e.some((e=>e(t)))}function Yt(t,e,r){const n=Array.from(Ht(r,t[0]).querySelectorAll(e));return n.length===t.length&&t.every((t=>n.includes(t)))}function Jt(t,e){e=null!=e?e:function(t){return t.ownerDocument.querySelector(":root")}(t);const r=[];let n=t;for(;$t(n)&&n!==e;)r.push(n),n=n.parentElement;return r}function Qt(t,e){return qt(t.map((t=>Jt(t,e))))}const Zt=new RegExp(["^$","\\s"].join("|")),te=new RegExp(["^$"].join("|")),ee=[Ft.nthoftype,Ft.tag,Ft.id,Ft.class,Ft.attribute,Ft.nthchild],re=Kt(["class","id","ng-*"]);function ne({name:t}){return`[${t}]`}function oe({name:t,value:e}){return`[${t}='${e}']`}function ie({nodeName:t,nodeValue:e}){return{name:(r=t,r.replace(/:/g,"\\:")),value:be(e)};var r}function ae(t){const e=Array.from(t.attributes).filter((e=>function({nodeName:t},e){const r=e.tagName.toLowerCase();return!(["input","option"].includes(r)&&"value"===t||re(t))}(e,t))).map(ie);return[...e.map(ne),...e.map(oe)]}function ue(t){return(t.getAttribute("class")||"").trim().split(/\s+/).filter((t=>!te.test(t))).map((t=>`.${be(t)}`))}function ce(t){const e=t.getAttribute("id")||"",r=`#${be(e)}`,n=t.getRootNode({composed:!1});return!Zt.test(e)&&Yt([t],r,n)?[r]:[]}function se(t){const e=t.parentNode;if(e){const r=Array.from(e.childNodes).filter($t).indexOf(t);if(r>-1)return[`:nth-child(${r+1})`]}return[]}function le(t){return[be(t.tagName.toLowerCase())]}function fe(t){const e=[...new Set(Xt(t.map(le)))];return 0===e.length||e.length>1?[]:[e[0]]}function pe(t){const e=fe([t])[0],r=t.parentElement;if(r){const n=Array.from(r.children).filter((t=>t.tagName.toLowerCase()===e)),o=n.indexOf(t);if(o>-1)return[`${e}:nth-of-type(${o+1})`]}return[]}function ye(t=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){return Array.from(function*(t=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){let r=0,n=he(1);for(;n.length<=t.length&&rt[e]));yield e,n=de(n,t.length-1)}}(t,{maxResults:e}))}function de(t=[],e=0){const r=t.length;if(0===r)return[];const n=[...t];n[r-1]+=1;for(let t=r-1;t>=0;t--)if(n[t]>e){if(0===t)return he(r+1);n[t-1]++,n[t]=n[t-1]+1}return n[r-1]>e?he(r+1):n}function he(t=1){return Array.from(Array(t).keys())}const ge=":".charCodeAt(0).toString(16).toUpperCase(),me=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function be(t=""){var e,r;return null!==(r=null===(e=null===CSS||void 0===CSS?void 0:CSS.escape)||void 0===e?void 0:e.call(CSS,t))&&void 0!==r?r:function(t=""){return t.split("").map((t=>":"===t?`\\${ge} `:me.test(t)?`\\${t}`:escape(t).replace(/%/g,"\\"))).join("")}(t)}const ve={tag:fe,id:function(t){return 0===t.length||t.length>1?[]:ce(t[0])},class:function(t){return qt(t.map(ue))},attribute:function(t){return qt(t.map(ae))},nthchild:function(t){return qt(t.map(se))},nthoftype:function(t){return qt(t.map(pe))}},we={tag:le,id:ce,class:ue,attribute:ae,nthchild:se,nthoftype:pe};function xe(t){return t.includes(Ft.tag)||t.includes(Ft.nthoftype)?[...t]:[...t,Ft.tag]}function Se(t={}){const e=[...ee];return t[Ft.tag]&&t[Ft.nthoftype]&&e.splice(e.indexOf(Ft.tag),1),e.map((e=>{return(n=t)[r=e]?n[r].join(""):"";var r,n})).join("")}function Ee(t,e,r="",n){const o=function(t,e){return""===e?t:function(t,e){return[...t.map((t=>e+Dt.DESCENDANT+t)),...t.map((t=>e+Dt.CHILD+t))]}(t,e)}(function(t,e,r){const n=function(t,e){const{blacklist:r,whitelist:n,combineWithinSelector:o,maxCombinations:i}=e,a=Kt(r),u=Kt(n);return function(t){const{selectors:e,includeTag:r}=t,n=[].concat(e);return r&&!n.includes("tag")&&n.push("tag"),n}(e).reduce(((e,r)=>{const n=function(t,e){var r;return(null!==(r=ve[e])&&void 0!==r?r:()=>[])(t)}(t,r),c=function(t=[],e,r){return t.filter((t=>r(t)||!e(t)))}(n,a,u),s=function(t=[],e){return t.sort(((t,r)=>{const n=e(t),o=e(r);return n&&!o?-1:!n&&o?1:0}))}(c,u);return e[r]=o?ye(s,{maxResults:i}):s.map((t=>[t])),e}),{})}(t,r),o=function(t,e){return function(t){const{selectors:e,combineBetweenSelectors:r,includeTag:n,maxCandidates:o}=t,i=r?ye(e,{maxResults:o}):e.map((t=>[t]));return n?i.map(xe):i}(e).map((e=>function(t,e){const r={};return t.forEach((t=>{const n=e[t];n.length>0&&(r[t]=n)})),function(t={}){let e=[];return Object.entries(t).forEach((([t,r])=>{e=r.flatMap((r=>0===e.length?[{[t]:r}]:e.map((e=>Object.assign(Object.assign({},e),{[t]:r})))))})),e}(r).map(Se)}(e,t))).filter((t=>t.length>0))}(n,r),i=Xt(o);return[...new Set(i)]}(t,n.root,n),r);for(const e of o)if(Yt(t,e,n.root))return e;return null}function Ae(t){return{value:t,include:!1}}function Oe({selectors:t,operator:e}){let r=[...ee];t[Ft.tag]&&t[Ft.nthoftype]&&(r=r.filter((t=>t!==Ft.tag)));let n="";return r.forEach((e=>{(t[e]||[]).forEach((({value:t,include:e})=>{e&&(n+=t)}))})),e+n}function je(t){return[":root",...Jt(t).reverse().map((t=>{const e=function(t,e,r=Dt.NONE){const n={};return e.forEach((e=>{Reflect.set(n,e,function(t,e){return we[e](t)}(t,e).map(Ae))})),{element:t,operator:r,selectors:n}}(t,[Ft.nthchild],Dt.CHILD);return e.selectors.nthchild.forEach((t=>{t.include=!0})),e})).map(Oe)].join("")}function Te(t,e={}){const r=function(t){(t instanceof NodeList||t instanceof HTMLCollection)&&(t=Array.from(t));const e=(Array.isArray(t)?t:[t]).filter($t);return[...new Set(e)]}(t),n=function(t,e={}){const r=Object.assign(Object.assign({},_t),e);return{selectors:(n=r.selectors,Array.isArray(n)?n.filter((t=>{return e=Ft,r=t,Object.values(e).includes(r);var e,r})):[]),whitelist:zt(r.whitelist),blacklist:zt(r.blacklist),root:Ht(r.root,t),combineWithinSelector:!!r.combineWithinSelector,combineBetweenSelectors:!!r.combineBetweenSelectors,includeTag:!!r.includeTag,maxCombinations:Vt(r.maxCombinations),maxCandidates:Vt(r.maxCandidates)};var n}(r[0],e);let o="",i=n.root;function a(){return function(t,e,r="",n){if(0===t.length)return null;const o=[t.length>1?t:[],...Qt(t,e).map((t=>[t]))];for(const t of o){const e=Ee(t,0,r,n);if(e)return{foundElements:t,selector:e}}return null}(r,i,o,n)}let u=a();for(;u;){const{foundElements:t,selector:e}=u;if(Yt(r,e,n.root))return e;i=t[0],o=e,u=a()}return r.length>1?r.map((t=>Te(t,n))).join(", "):function(t){return t.map(je).join(", ")}(r)}function Pe(t){return null==t?null:-1!==["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t.outerHTML:t.parentElement?Pe(t.parentElement):null}function Re(t){for(var e=0;e0&&e.top0&&e.left{Le(t)||(Be(t),_e("down",t))})),window.addEventListener("keyup",(t=>{Le(t)||(Be(t),_e("up",t))})),r.g.readium={scrollToId:function(t){let e=document.getElementById(t);return!!e&&(E(e.getBoundingClientRect()),!0)},scrollToPosition:function(t,e){if(t<0||t>1)console.error(`Expected a valid progression in scrollToPosition, got ${t}`);else if(S()){let e=document.scrollingElement.scrollHeight*t;document.scrollingElement.scrollTop=e}else{let r=document.scrollingElement.scrollWidth*t*("rtl"==e?-1:1);document.scrollingElement.scrollLeft=O(r)}},scrollToLocator:function(t){let e=j(t);return!!e&&function(t){return E(t.getBoundingClientRect())}(e)},scrollLeft:function(t){var e="rtl"==t,r=document.scrollingElement.scrollWidth,n=window.innerWidth,o=window.scrollX-n,i=e?-(r-n):0;return A(Math.max(o,i))},scrollRight:function(t){var e="rtl"==t,r=document.scrollingElement.scrollWidth,n=window.innerWidth,o=window.scrollX+n,i=e?0:r-n;return A(Math.min(o,i))},setCSSProperties:function(t){for(const e in t)T(e,t[e])},setProperty:T,removeProperty:P,registerDecorationTemplates:function(t){var e="";for(const[r,n]of Object.entries(t))It.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){let t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}},getDecorations:function(t){var e=Nt.get(t);return e||(e=function(t,e){var r=[],n=0,o=null,i=!1;function a(e){let o=t+"-"+n++,i=j(e.locator);if(!i)return void R("Can't locate DOM range for decoration",e);let a={id:o,decoration:e,range:i};r.push(a),c(a)}function u(t){let e=r.findIndex((e=>e.decoration.id===t));if(-1===e)return;let n=r[e];r.splice(e,1),n.clickableElements=null,n.container&&(n.container.remove(),n.container=null)}function c(r){let n=(o||((o=document.createElement("div")).setAttribute("id",t),o.setAttribute("data-group",e),o.style.setProperty("pointer-events","none"),requestAnimationFrame((function(){null!=o&&document.body.append(o)}))),o),i=It.get(r.decoration.style);if(!i)return void C(`Unknown decoration style: ${r.decoration.style}`);let a=document.createElement("div");a.setAttribute("id",r.id),a.setAttribute("data-style",r.decoration.style),a.style.setProperty("pointer-events","none");let u=window.innerWidth,c=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count")),s=u/(c||1),l=document.scrollingElement,f=l.scrollLeft,p=l.scrollTop;function y(t,e,r){if(t.style.position="absolute","wrap"===i.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===i.width){t.style.width=`${u}px`,t.style.height=`${e.height}px`;let r=Math.floor(e.left/u)*u;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}else if("bounds"===i.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+f}px`,t.style.top=`${e.top+p}px`;else if("page"===i.width){t.style.width=`${s}px`,t.style.height=`${e.height}px`;let r=Math.floor(e.left/s)*s;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}}let d,h=r.range.getBoundingClientRect();try{let t=document.createElement("template");t.innerHTML=r.decoration.element.trim(),d=t.content.firstElementChild}catch(t){return void C(`Invalid decoration element "${r.decoration.element}": ${t.message}`)}if("boxes"===i.layout){let t=!0,e=$(r.range,t);e=e.sort(((t,e)=>t.tope.top?1:0));for(let t of e){const e=d.cloneNode(!0);e.style.setProperty("pointer-events","none"),y(e,t,h),a.append(e)}}else if("bounds"===i.layout){const t=d.cloneNode(!0);t.style.setProperty("pointer-events","none"),y(t,h,h),a.append(t)}n.append(a),r.container=a,r.clickableElements=Array.from(a.querySelectorAll("[data-activable='1']")),0===r.clickableElements.length&&(r.clickableElements=Array.from(a.children))}function s(){o&&(o.remove(),o=null)}return{add:a,remove:u,update:function(t){u(t.id),a(t)},clear:function(){s(),r.length=0},items:r,requestLayout:function(){s(),r.forEach((t=>c(t)))},isActivable:function(){return i},setActivable:function(){i=!0}}}("r2-decoration-"+Mt++,t),Nt.set(t,e)),e},findFirstVisibleLocator:function(){const t=Re(document.body);return{href:"#",type:"application/xhtml+xml",locations:{cssSelector:Te(t)},text:{highlight:t.textContent}}}},window.readium.isFixedLayout=!0,webkit.messageHandlers.spreadLoadStarted.postMessage({})})()})(); //# sourceMappingURL=readium-fixed.js.map \ No newline at end of file diff --git a/Sources/Navigator/EPUB/Assets/Static/scripts/readium-reflowable.js b/Sources/Navigator/EPUB/Assets/Static/scripts/readium-reflowable.js index d50dd5470..4aeef035d 100644 --- a/Sources/Navigator/EPUB/Assets/Static/scripts/readium-reflowable.js +++ b/Sources/Navigator/EPUB/Assets/Static/scripts/readium-reflowable.js @@ -1,2 +1,2 @@ -(()=>{var t={9116:(t,e)=>{"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],u=o>>>31,c=e[r]|u,s=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=u)|~(s|(f|=n(o)-u)),a=f&s,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,u={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};u.lastRowMask.fill(1<<31),u.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),s=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(m)===y&&(d[h]|=1<0&&v[b]>=r+i;)b-=1;b===a&&v[b]<=r&&(v[b]{"use strict";var n=r(4624),o=r(5096),i=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o(r):r}},5096:(t,e,r)=>{"use strict";var n=r(3520),o=r(4624),i=r(5676),a=r(2824),u=o("%Function.prototype.apply%"),c=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(c,u),l=o("%Object.defineProperty%",!0),f=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(t){l=null}t.exports=function(t){if("function"!=typeof t)throw new a("a function is required");var e=s(n,c,arguments);return i(e,1+f(0,t.length-(arguments.length-1)),!0)};var p=function(){return s(n,u,arguments)};l?l(t.exports,"apply",{value:p}):t.exports.apply=p},2448:(t,e,r)=>{"use strict";var n=r(3268)(),o=r(4624),i=n&&o("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch(t){i=!1}var a=r(6500),u=r(2824),c=r(6168);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new u("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new u("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new u("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new u("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new u("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new u("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===s&&f?f.configurable:!s,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||s))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},2732:(t,e,r)=>{"use strict";var n=r(2812),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,u=r(2448),c=r(3268)(),s=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?u(t,e,r,!0):u(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var u=0;u{"use strict";t.exports=EvalError},1152:t=>{"use strict";t.exports=Error},1932:t=>{"use strict";t.exports=RangeError},5028:t=>{"use strict";t.exports=ReferenceError},6500:t=>{"use strict";t.exports=SyntaxError},2824:t=>{"use strict";t.exports=TypeError},5488:t=>{"use strict";t.exports=URIError},9200:(t,e,r)=>{"use strict";var n=r(4624)("%Object.defineProperty%",!0),o=r(4712)(),i=r(4440),a=o?Symbol.toStringTag:null;t.exports=function(t,e){var r=arguments.length>2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},108:(t,e,r)=>{"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(5988),i=r(648),a=r(1844),u=r(7256);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):u(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||u(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,u="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a{"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},1480:t=>{"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n{"use strict";var n=r(1480);t.exports=Function.prototype.bind||n},2656:t=>{"use strict";var e=function(){return"string"==typeof function(){}.name},r=Object.getOwnPropertyDescriptor;if(r)try{r([],"length")}catch(t){r=null}e.functionsHaveConfigurableNames=function(){if(!e()||!r)return!1;var t=r((function(){}),"name");return!!t&&!!t.configurable};var n=Function.prototype.bind;e.boundFunctionsHaveNames=function(){return e()&&"function"==typeof n&&""!==function(){}.bind().name},t.exports=e},4624:(t,e,r)=>{"use strict";var n,o=r(1152),i=r(7261),a=r(1932),u=r(5028),c=r(6500),s=r(2824),l=r(5488),f=Function,p=function(t){try{return f('"use strict"; return ('+t+").constructor;")()}catch(t){}},y=Object.getOwnPropertyDescriptor;if(y)try{y({},"")}catch(t){y=null}var d=function(){throw new s},h=y?function(){try{return d}catch(t){try{return y(arguments,"callee").get}catch(t){return d}}}():d,g=r(9800)(),m=r(7e3)(),b=Object.getPrototypeOf||(m?function(t){return t.__proto__}:null),v={},w="undefined"!=typeof Uint8Array&&b?b(Uint8Array):n,x={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":u,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":h,"%TypedArray%":w,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(b)try{null.error}catch(t){var S=b(b(t));x["%Error.prototype%"]=S}var E=function t(e){var r;if("%AsyncFunction%"===e)r=p("async function () {}");else if("%GeneratorFunction%"===e)r=p("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=p("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&b&&(r=b(o.prototype))}return x[e]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},O=r(3520),j=r(4440),T=O.call(Function.call,Array.prototype.concat),P=O.call(Function.apply,Array.prototype.splice),R=O.call(Function.call,String.prototype.replace),C=O.call(Function.call,String.prototype.slice),I=O.call(Function.call,RegExp.prototype.exec),N=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,M=/\\(\\)?/g,k=function(t,e){var r,n=t;if(j(A,n)&&(n="%"+(r=A[n])[0]+"%"),j(x,n)){var o=x[n];if(o===v&&(o=E(n)),void 0===o&&!e)throw new s("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new c("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new s('"allowMissing" argument must be a boolean');if(null===I(/^%?[^%]*%?$/,t))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=C(t,0,1),r=C(t,-1);if("%"===e&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return R(t,N,(function(t,e,r,o){n[n.length]=r?R(o,M,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=k("%"+n+"%",e),i=o.name,a=o.value,u=!1,l=o.alias;l&&(n=l[0],P(r,T([0,1],l)));for(var f=1,p=!0;f=r.length){var m=y(a,d);a=(p=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:a[d]}else p=j(a,d),a=a[d];p&&!u&&(x[i]=a)}}return a}},6168:(t,e,r)=>{"use strict";var n=r(4624)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},3268:(t,e,r)=>{"use strict";var n=r(4624)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},7e3:t=>{"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},9800:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(7904);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},7904:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4712:(t,e,r)=>{"use strict";var n=r(7904);t.exports=function(){return n()&&!!Symbol.toStringTag}},4440:(t,e,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(3520);t.exports=i.call(n,o)},7284:(t,e,r)=>{"use strict";var n=r(4440),o=r(3147)(),i=r(2824),a={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`O` is not an object");if("string"!=typeof e)throw new i("`slot` must be a string");if(o.assert(t),!a.has(t,e))throw new i("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`O` is not an object");if("string"!=typeof e)throw new i("`slot` must be a string");var r=o.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`O` is not an object");if("string"!=typeof e)throw new i("`slot` must be a string");var r=o.get(t);return!!r&&n(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`O` is not an object");if("string"!=typeof e)throw new i("`slot` must be a string");var n=o.get(t);n||(n={},o.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(a),t.exports=a},648:t=>{"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},u=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,s="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&u(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(s)return u(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&u(t)}},1844:(t,e,r)=>{"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(4712)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},1476:(t,e,r)=>{"use strict";var n,o,i,a,u=r(668),c=r(4712)();if(c){n=u("Object.prototype.hasOwnProperty"),o=u("RegExp.prototype.exec"),i={};var s=function(){throw i};a={toString:s,valueOf:s},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=s)}var l=u("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},7256:(t,e,r)=>{"use strict";var n=Object.prototype.toString;if(r(9800)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4152:(t,e,r)=>{var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,u="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=u&&c&&"function"==typeof c.get?c.get:null,l=u&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,h=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,T="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,C="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function k(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var $=r(1740),D=$.custom,L=U(D)?D:null;function F(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function B(t){return v.call(String(t),/"/g,""")}function _(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function W(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){if(C)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!R)return!1;try{return R.call(t),!0}catch(t){}return!1}t.exports=function t(e,n,o,u){var c=n||{};if(G(c,"quoteStyle")&&"single"!==c.quoteStyle&&"double"!==c.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var h=!G(c,"customInspect")||c.customInspect;if("boolean"!=typeof h&&"symbol"!==h)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=c.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return q(e,c);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var S=String(e);return w?k(e,S):S}if("bigint"==typeof e){var j=String(e)+"n";return w?k(e,j):j}var P=void 0===c.depth?5:c.depth;if(void 0===o&&(o=0),o>=P&&P>0&&"object"==typeof e)return _(e)?"[Array]":"[Object]";var D,z=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(c,o);if(void 0===u)u=[];else if(V(u,e)>=0)return"[Circular]";function X(e,r,n){if(r&&(u=O.call(u)).push(r),n){var i={depth:c.depth};return G(c,"quoteStyle")&&(i.quoteStyle=c.quoteStyle),t(e,i,o+1,u)}return t(e,c,o+1,u)}if("function"==typeof e&&!W(e)){var tt=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),et=Z(e,X);return"[Function"+(tt?": "+tt:" (anonymous)")+"]"+(et.length>0?" { "+A.call(et,", ")+" }":"")}if(U(e)){var rt=C?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(e);return"object"!=typeof e||C?rt:K(rt)}if((D=e)&&"object"==typeof D&&("undefined"!=typeof HTMLElement&&D instanceof HTMLElement||"string"==typeof D.nodeName&&"function"==typeof D.getAttribute)){for(var nt="<"+x.call(String(e.nodeName)),ot=e.attributes||[],it=0;it"}if(_(e)){if(0===e.length)return"[]";var at=Z(e,X);return z&&!function(t){for(var e=0;e=0)return!1;return!0}(at)?"["+Q(at,z)+"]":"[ "+A.call(at,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var ut=Z(e,X);return"cause"in Error.prototype||!("cause"in e)||N.call(e,"cause")?0===ut.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(ut,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+X(e.cause),ut),", ")+" }"}if("object"==typeof e&&h){if(L&&"function"==typeof e[L]&&$)return $(e,{depth:P-o});if("symbol"!==h&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{s.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var ct=[];return a&&a.call(e,(function(t,r){ct.push(X(r,e,!0)+" => "+X(t,e))})),J("Map",i.call(e),ct,z)}if(function(t){if(!s||!t||"object"!=typeof t)return!1;try{s.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var st=[];return l&&l.call(e,(function(t){st.push(X(t,e))})),J("Set",s.call(e),st,z)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return Y("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return Y("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return Y("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(X(Number(e)));if(function(t){if(!t||"object"!=typeof t||!T)return!1;try{return T.call(t),!0}catch(t){}return!1}(e))return K(X(T.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(d.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(X(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if(e===r.g)return"{ [object globalThis] }";if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!W(e)){var lt=Z(e,X),ft=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,pt=e instanceof Object?"":"null prototype",yt=!ft&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):pt?"Object":"",dt=(ft||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(yt||pt?"["+A.call(E.call([],yt||[],pt||[]),": ")+"] ":"");return 0===lt.length?dt+"{}":z?dt+"{"+Q(lt,z)+"}":dt+"{ "+A.call(lt,", ")+" }"}return String(e)};var z=Object.prototype.hasOwnProperty||function(t){return t in this};function G(t,e){return z.call(t,e)}function H(t){return h.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return q(b.call(t,0,e.maxStringLength),e)+n}return F(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,X),"single",e)}function X(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function K(t){return"Object("+t+")"}function Y(t){return t+" { ? }"}function J(t,e,r,n){return t+" ("+e+") {"+(n?Q(r,n):A.call(r,", "))+"}"}function Q(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Z(t,e){var r=_(t),n=[];if(r){n.length=t.length;for(var o=0;o{"use strict";var n;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=r(9096),u=Object.prototype.propertyIsEnumerable,c=!u.call({toString:null},"toString"),s=u.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(t){var e=t.constructor;return e&&e.prototype===t},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},y=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!p["$"+t]&&o.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{f(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===i.call(t),n=a(t),u=e&&"[object String]"===i.call(t),p=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var d=s&&r;if(u&&t.length>0&&!o.call(t,0))for(var h=0;h0)for(var g=0;g{"use strict";var n=Array.prototype.slice,o=r(9096),i=Object.keys,a=i?function(t){return i(t)}:r(9560),u=Object.keys;a.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return o(t)?u(n.call(t)):u(t)})}else Object.keys=a;return Object.keys||a},t.exports=a},9096:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},7636:(t,e,r)=>{"use strict";var n=r(6308),o=r(2824),i=Object;t.exports=n((function(){if(null==this||this!==i(this))throw new o("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},2192:(t,e,r)=>{"use strict";var n=r(2732),o=r(5096),i=r(7636),a=r(9296),u=r(736),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:u}),t.exports=c},9296:(t,e,r)=>{"use strict";var n=r(7636),o=r(2732).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},736:(t,e,r)=>{"use strict";var n=r(2732).supportsDescriptors,o=r(9296),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,u=TypeError,c=Object.getPrototypeOf,s=/a/;t.exports=function(){if(!n||!c)throw new u("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(s),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},860:(t,e,r)=>{"use strict";var n=r(668),o=r(1476),i=n("RegExp.prototype.exec"),a=r(2824);t.exports=function(t){if(!o(t))throw new a("`regex` must be a RegExp");return function(e){return null!==i(t,e)}}},5676:(t,e,r)=>{"use strict";var n=r(4624),o=r(2448),i=r(3268)(),a=r(6168),u=r(2824),c=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new u("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||c(e)!==e)throw new u("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,s=!0;if("length"in t&&a){var l=a(t,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(s=!1)}return(n||s||!r)&&(i?o(t,"length",e,!0,!0):o(t,"length",e)),t}},6308:(t,e,r)=>{"use strict";var n=r(2448),o=r(3268)(),i=r(2656).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},3147:(t,e,r)=>{"use strict";var n=r(4624),o=r(668),i=r(4152),a=r(2824),u=n("%WeakMap%",!0),c=n("%Map%",!0),s=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),h=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(u&&n&&("object"==typeof n||"function"==typeof n)){if(t)return s(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=h(t,e);return r&&r.value}(r,n)},has:function(n){if(u&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return d(e,n)}else if(r)return function(t,e){return!!h(t,e)}(r,n);return!1},set:function(n,o){u&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new u),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=h(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},9508:(t,e,r)=>{"use strict";var n=r(1700),o=r(3672),i=r(5552),a=r(3816),u=r(5424),c=r(4656),s=r(668),l=r(9800)(),f=r(2192),p=s("String.prototype.indexOf"),y=r(6288),d=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(u(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=d(t);if(void 0!==i)return n(i,t,[e])}var s=u(e),l=new RegExp(t,"g");return n(d(l),l,[s])}},3732:(t,e,r)=>{"use strict";var n=r(5096),o=r(2732),i=r(9508),a=r(5844),u=r(4148),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:u}),t.exports=c},6288:(t,e,r)=>{"use strict";var n=r(9800)(),o=r(7492);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},5844:(t,e,r)=>{"use strict";var n=r(9508);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},7492:(t,e,r)=>{"use strict";var n=r(5211),o=r(3672),i=r(4e3),a=r(8652),u=r(4784),c=r(5424),s=r(8645),l=r(2192),f=r(6308),p=r(668)("String.prototype.indexOf"),y=RegExp,d="flags"in RegExp.prototype,h=f((function(t){var e=this;if("Object"!==s(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(d&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),h=f.flags,g=f.matcher,m=u(o(e,"lastIndex"));i(g,"lastIndex",m,!0);var b=p(h,"g")>-1,v=p(h,"u")>-1;return n(g,r,b,v)}),"[Symbol.matchAll]",!0);t.exports=h},4148:(t,e,r)=>{"use strict";var n=r(2732),o=r(9800)(),i=r(5844),a=r(6288),u=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),u&&c){var r=c(Symbol,e);r&&!r.configurable||u(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var s=a(),l={};l[e]=s;var f={};f[e]=function(){return RegExp.prototype[e]!==s},n(RegExp.prototype,l,f)}return t}},6936:(t,e,r)=>{"use strict";var n=r(4656),o=r(5424),i=r(668)("String.prototype.replace"),a=/^\s$/.test("᠎"),u=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,u,""),c,"")}},9292:(t,e,r)=>{"use strict";var n=r(5096),o=r(2732),i=r(4656),a=r(6936),u=r(6684),c=r(9788),s=n(u()),l=function(t){return i(t),s(t)};o(l,{getPolyfill:u,implementation:a,shim:c}),t.exports=l},6684:(t,e,r)=>{"use strict";var n=r(6936);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},9788:(t,e,r)=>{"use strict";var n=r(2732),o=r(6684);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},1740:()=>{},1056:(t,e,r)=>{"use strict";var n=r(4624),o=r(8536),i=r(8645),a=r(7724),u=r(9132),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>u)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},1700:(t,e,r)=>{"use strict";var n=r(4624),o=r(668),i=n("%TypeError%"),a=r(1720),u=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return u(t,e,r)}},8536:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(668),i=r(1712),a=r(8444),u=r(8645),c=r(2320),s=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==u(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=s(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var d=l(t,e+1);return a(d)?{"[[CodePoint]]":c(o,d),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},4288:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(8645);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},2672:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(4436),i=r(8924),a=r(3880),u=r(2968),c=r(8800),s=r(8645);t.exports=function(t,e,r){if("Object"!==s(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},5211:(t,e,r)=>{"use strict";var n=r(4624),o=r(9800)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),u=r(1056),c=r(4288),s=r(2672),l=r(3672),f=r(6216),p=r(8972),y=r(4e3),d=r(4784),h=r(5424),g=r(8645),m=r(7284),b=r(9200),v=function(t,e,r,n){if("String"!==g(e))throw new i("`S` must be a string");if("Boolean"!==g(r))throw new i("`global` must be a boolean");if("Boolean"!==g(n))throw new i("`fullUnicode` must be a boolean");m.set(this,"[[IteratingRegExp]]",t),m.set(this,"[[IteratedString]]",e),m.set(this,"[[Global]]",r),m.set(this,"[[Unicode]]",n),m.set(this,"[[Done]]",!1)};a&&(v.prototype=f(a)),s(v.prototype,"next",(function(){var t=this;if("Object"!==g(t))throw new i("receiver must be an object");if(!(t instanceof v&&m.has(t,"[[IteratingRegExp]]")&&m.has(t,"[[IteratedString]]")&&m.has(t,"[[Global]]")&&m.has(t,"[[Unicode]]")&&m.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(m.get(t,"[[Done]]"))return c(void 0,!0);var e=m.get(t,"[[IteratingRegExp]]"),r=m.get(t,"[[IteratedString]]"),n=m.get(t,"[[Global]]"),o=m.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return m.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===h(l(a,"0"))){var s=d(l(e,"lastIndex")),f=u(r,s,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return m.set(t,"[[Done]]",!0),c(a,!1)})),o&&(b(v.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof v.prototype[Symbol.iterator])&&s(v.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new v(t,e,r,n)}},7268:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(320),i=r(4436),a=r(8924),u=r(4936),c=r(3880),s=r(2968),l=r(8800),f=r(5696),p=r(8645);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:u},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:u},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8924:(t,e,r)=>{"use strict";var n=r(3600),o=r(3504),i=r(8645);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},3672:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(4152),i=r(2968),a=r(8645);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},5552:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(3396),i=r(3048),a=r(2968),u=r(4152);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(u(e)+" is not a function: "+u(r));return r}}},3396:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(4152),i=r(2968);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},4936:(t,e,r)=>{"use strict";var n=r(4440),o=r(8645),i=r(3600);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},1720:(t,e,r)=>{"use strict";t.exports=r(704)},3048:(t,e,r)=>{"use strict";t.exports=r(648)},211:(t,e,r)=>{"use strict";var n=r(8600)("%Reflect.construct%",!0),o=r(7268);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3880:(t,e,r)=>{"use strict";var n=r(4440),o=r(8645),i=r(3600);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},2968:t=>{"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},3816:(t,e,r)=>{"use strict";var n=r(4624)("%Symbol.match%",!0),o=r(1476),i=r(6848);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},6216:(t,e,r)=>{"use strict";var n=r(4624),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),u=r(1720),c=r(8645),s=r(4672),l=r(7284),f=r(7e3)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!u(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&s(r,(function(t){l.set(e,t,void 0)})),e}},8972:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(668)("RegExp.prototype.exec"),i=r(1700),a=r(3672),u=r(3048),c=r(8645);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(u(r)){var s=i(r,t,[e]);if(null===s||"Object"===c(s))return s;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},4656:(t,e,r)=>{"use strict";t.exports=r(176)},8800:(t,e,r)=>{"use strict";var n=r(2808);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},4e3:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(2968),i=r(8800),a=r(8645),u=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,u&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!u||i(t[e],r)}catch(t){return!1}}},8652:(t,e,r)=>{"use strict";var n=r(4624),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(211),u=r(8645);t.exports=function(t,e){if("Object"!==u(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==u(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},8772:(t,e,r)=>{"use strict";var n=r(4624),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),u=n("%parseInt%"),c=r(668),s=r(860),l=c("String.prototype.slice"),f=s(/^0b[01]+$/i),p=s(/^0o[0-7]+$/i),y=s(/^[-+]0x[0-9a-f]+$/i),d=s(new i("["+["…","​","￾"].join("")+"]","g")),h=r(9292),g=r(8645);t.exports=function t(e){if("String"!==g(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(u(l(e,2),2));if(p(e))return o(u(l(e,2),8));if(d(e)||y(e))return NaN;var r=h(e);return r!==e?t(r):o(e)}},6848:t=>{"use strict";t.exports=function(t){return!!t}},9424:(t,e,r)=>{"use strict";var n=r(7220),o=r(2592),i=r(2808),a=r(2931);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},4784:(t,e,r)=>{"use strict";var n=r(9132),o=r(9424);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},7220:(t,e,r)=>{"use strict";var n=r(4624),o=n("%TypeError%"),i=n("%Number%"),a=r(2336),u=r(5556),c=r(8772);t.exports=function(t){var e=a(t)?t:u(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},5556:(t,e,r)=>{"use strict";var n=r(108);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},5696:(t,e,r)=>{"use strict";var n=r(4440),o=r(4624)("%TypeError%"),i=r(8645),a=r(6848),u=r(3048);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!u(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!u(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5424:(t,e,r)=>{"use strict";var n=r(4624),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},8645:(t,e,r)=>{"use strict";var n=r(7936);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},2320:(t,e,r)=>{"use strict";var n=r(4624),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(1712),u=r(8444);t.exports=function(t,e){if(!a(t)||!u(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},2312:(t,e,r)=>{"use strict";var n=r(8645),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},2592:(t,e,r)=>{"use strict";var n=r(4624),o=r(2312),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},176:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},7936:t=>{"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},8600:(t,e,r)=>{"use strict";t.exports=r(4624)},4436:(t,e,r)=>{"use strict";var n=r(3268),o=r(4624),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),u=a&&r(704),c=r(668)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,s){if(!i){if(!t(s))return!1;if(!s["[[Configurable]]"]||!s["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!s["[[Enumerable]]"])return!1;var l=s["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in s&&u(n)&&n.length!==s["[[Value]]"]?(n.length=s["[[Value]]"],n.length===s["[[Value]]"]):(i(n,o,r(s)),!0)}},704:(t,e,r)=>{"use strict";var n=r(4624)("%Array%"),o=!n.isArray&&r(668)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},3600:(t,e,r)=>{"use strict";var n=r(4624),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(4440),u=r(7724),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(5092),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&u(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},4672:t=>{"use strict";t.exports=function(t,e){for(var r=0;r{"use strict";t.exports=function(t){if(void 0===t)return t;var e={};return"[[Value]]"in t&&(e.value=t["[[Value]]"]),"[[Writable]]"in t&&(e.writable=!!t["[[Writable]]"]),"[[Get]]"in t&&(e.get=t["[[Get]]"]),"[[Set]]"in t&&(e.set=t["[[Set]]"]),"[[Enumerable]]"in t&&(e.enumerable=!!t["[[Enumerable]]"]),"[[Configurable]]"in t&&(e.configurable=!!t["[[Configurable]]"]),e}},2931:(t,e,r)=>{"use strict";var n=r(2808);t.exports=function(t){return("number"==typeof t||"bigint"==typeof t)&&!n(t)&&t!==1/0&&t!==-1/0}},7724:(t,e,r)=>{"use strict";var n=r(4624),o=n("%Math.abs%"),i=n("%Math.floor%"),a=r(2808),u=r(2931);t.exports=function(t){if("number"!=typeof t||a(t)||!u(t))return!1;var e=o(t);return i(e)===e}},1712:t=>{"use strict";t.exports=function(t){return"number"==typeof t&&t>=55296&&t<=56319}},5092:(t,e,r)=>{"use strict";var n=r(4440);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},2808:t=>{"use strict";t.exports=Number.isNaN||function(t){return t!=t}},2336:t=>{"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},320:(t,e,r)=>{"use strict";var n=r(4624),o=r(4440),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},8444:t=>{"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},9132:t=>{"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=r(9116);function e(e,r,n){let o=0,i=[];for(;-1!==o;)o=e.indexOf(r,o),-1!==o&&(i.push({start:o,end:o+r.length,errors:0}),o+=1);return i.length>0?i:(0,t.c)(e,r,n)}function n(t,r){return 0===r.length||0===t.length?0:1-e(t,r,r.length)[0].errors/r.length}function o(t){switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return t.textContent.length;default:return 0}}function i(t){let e=t.previousSibling,r=0;for(;e;)r+=o(e),e=e.previousSibling;return r}function a(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;no?(a.push({node:u,offset:o-s}),o=r.shift()):(c=i.nextNode(),s+=u.data.length);for(;void 0!==o&&u&&s===o;)a.push({node:u,offset:u.data.length}),o=r.shift();if(void 0!==o)throw new RangeError("Offset exceeds text length");return a}class u{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=i(e),e=e.parentElement;return new u(e,r)}resolve(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return a(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=1===t.direction,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return u.fromPoint(t,e);case Node.ELEMENT_NODE:return new u(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=i(t)+e;return new u(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n2&&void 0!==arguments[2]?arguments[2]:{};this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=c.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new l(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new l(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.toPositionAnchor(t).toRange()}toPositionAnchor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=function(t,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===r.length)return null;const i=Math.min(256,r.length/2),a=e(t,r,i);if(0===a.length)return null;const u=e=>{const i=1-e.errors/r.length,a=o.prefix?n(t.slice(Math.max(0,e.start-o.prefix.length),e.start),o.prefix):1,u=o.suffix?n(t.slice(e.end,e.end+o.suffix.length),o.suffix):1;let c=1;return"number"==typeof o.hint&&(c=1-Math.abs(e.start-o.hint)/t.length),(50*i+20*a+20*u+2*c)/92},c=a.map((t=>({start:t.start,end:t.end,score:u(t)})));return c.sort(((t,e)=>e.score-t.score)),c[0]}(this.root.textContent,this.exact,{...this.context,hint:t.hint});if(!r)throw new Error("Quote not found");return new s(this.root,r.start,r.end)}}var f=r(3732);r.n(f)().shim();const p=!0;function y(){if(!readium.link)return null;const t=readium.link.href;if(!t)return null;const e=function(){const t=window.getSelection();if(!t)return;if(t.isCollapsed)return;const e=t.toString();if(0===e.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const r=1===t.rangeCount?t.getRangeAt(0):function(t,e,r,n){const o=new Range;if(o.setStart(t,e),o.setEnd(r,n),!o.collapsed)return o;d(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const i=new Range;if(i.setStart(r,n),i.setEnd(t,e),!i.collapsed)return d(">>> createOrderedRange RANGE REVERSE OK."),o;d(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!r||r.collapsed)return void d("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const n=document.body.textContent,o=c.fromRange(r).relativeTo(document.body),i=o.start.offset,a=o.end.offset;let u=n.slice(Math.max(0,i-200),i),s=u.search(/\P{L}\p{L}/gu);-1!==s&&(u=u.slice(s+1));let l=n.slice(a,Math.min(n.length,a+200)),f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:e,before:u,after:l}}();return e?{href:t,text:e,rect:function(){try{let t=window.getSelection();if(!t)return;return k(t.getRangeAt(0).getBoundingClientRect())}catch(t){return N(t),null}}()}:null}function d(){p&&C.apply(null,arguments)}window.addEventListener("error",(function(t){webkit.messageHandlers.logError.postMessage({message:t.message,filename:t.filename,line:t.lineno})}),!1),window.addEventListener("load",(function(){new ResizeObserver((()=>{!function(){const t="readium-virtual-page";var e=document.getElementById(t);if(E()||2!=parseInt(window.getComputedStyle(document.documentElement).getPropertyValue("column-count"))){var r;null===(r=e)||void 0===r||r.remove()}else{var n=document.scrollingElement.scrollWidth/window.innerWidth;Math.round(2*n)/2%1>.1&&(e?e.remove():((e=document.createElement("div")).setAttribute("id",t),e.style.breakBefore="column",e.innerHTML="​",document.body.appendChild(e)))}}(),x()})).observe(document.body),window.addEventListener("orientationchange",(function(){S(),function(){if(!E()){var t=j(window.scrollX+1);document.scrollingElement.scrollLeft=t}}()})),S()}),!1);var h,g,m=0,b=0,v=!1,w=0;function x(){readium.isFixedLayout||(b=window.scrollY/document.scrollingElement.scrollHeight,m=Math.abs(window.scrollX/document.scrollingElement.scrollWidth),0!==document.scrollingElement.scrollWidth&&0!==document.scrollingElement.scrollHeight&&(v||window.requestAnimationFrame((function(){var t;t=(E()?b:m).toString(),webkit.messageHandlers.progressionChanged.postMessage(t),v=!1})),v=!0))}function S(){w=0===window.orientation||180==window.orientation?screen.width:screen.height}function E(){return"readium-scroll-on"==document.documentElement.style.getPropertyValue("--USER__view").trim()}function A(t){return E()?document.scrollingElement.scrollTop=t.top+window.scrollY:document.scrollingElement.scrollLeft=j(t.left+window.scrollX),!0}function O(t){var e=window.scrollX,r=window.innerWidth;return document.scrollingElement.scrollLeft=t,Math.abs(e-t)/r>.01}function j(t){var e=t+1;return e-e%w}function T(t){try{let n=t.locations,o=t.text;var e;if(o&&o.highlight)return n&&n.cssSelector&&(e=document.querySelector(n.cssSelector)),e||(e=document.body),new l(e,o.highlight,{prefix:o.before,suffix:o.after}).toRange();if(n){var r=null;if(!r&&n.cssSelector&&(r=document.querySelector(n.cssSelector)),!r&&n.fragments)for(const t of n.fragments)if(r=document.getElementById(t))break;if(r){let t=document.createRange();return t.setStartBefore(r),t.setEndAfter(r),t}}}catch(t){N(t)}return null}function P(t,e){null===e?R(t):document.documentElement.style.setProperty(t,e,"important")}function R(t){document.documentElement.style.removeProperty(t)}function C(){var t=Array.prototype.slice.call(arguments).join(" ");webkit.messageHandlers.log.postMessage(t)}function I(t){N(new Error(t))}function N(t){webkit.messageHandlers.logError.postMessage({message:t.message})}window.addEventListener("scroll",x),document.addEventListener("selectionchange",(50,h=function(){webkit.messageHandlers.selectionChanged.postMessage(y())},function(){var t=this,e=arguments;clearTimeout(g),g=setTimeout((function(){h.apply(t,e),g=null}),50)}));const M=!1;function k(t){let e=$({x:t.left,y:t.top});const r=t.width,n=t.height,o=e.x,i=e.y;return{width:r,height:n,left:o,top:i,right:o+r,bottom:i+n}}function $(t){if(!frameElement)return t;let e=frameElement.getBoundingClientRect();if(!e)return t;let r=window.top.document.documentElement;return{x:t.x+e.x+r.scrollLeft,y:t.y+e.y+r.scrollTop}}function D(t,e){let r=t.getClientRects();const n=[];for(const t of r)n.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const o=W(function(t,e){const r=new Set(t);for(const e of t)if(e.width>1&&e.height>1){for(const n of t)if(e!==n&&r.has(n)&&B(n,e,1)){H("CLIENT RECT: remove contained"),r.delete(e);break}}else H("CLIENT RECT: remove tiny"),r.delete(e);return Array.from(r)}(L(n,1,e)));for(let t=o.length-1;t>=0;t--){const e=o[t];if(!(e.width*e.height>4)){if(!(o.length>1)){H("CLIENT RECT: remove small, but keep otherwise empty!");break}H("CLIENT RECT: remove small"),o.splice(t,1)}}return H(`CLIENT RECT: reduced ${n.length} --\x3e ${o.length}`),o}function L(t,e,r){for(let n=0;nt!==i&&t!==a)),o=F(i,a);return n.push(o),L(n,e,r)}}return t}function F(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function B(t,e,r){return _(t,e.left,e.top,r)&&_(t,e.right,e.top,r)&&_(t,e.left,e.bottom,r)&&_(t,e.right,e.bottom,r)}function _(t,e,r,n){return(t.lefte||G(t.right,e,n))&&(t.topr||G(t.bottom,r,n))}function W(t){for(let e=0;et!==e));return Array.prototype.push.apply(a,r),W(a)}}else H("replaceOverlapingRects rect1 === rect2 ??!")}return t}function U(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function z(t,e,r){return(t.left=0&&G(t.left,e.right,r))&&(e.left=0&&G(e.left,t.right,r))&&(t.top=0&&G(t.top,e.bottom,r))&&(e.top=0&&G(e.top,t.bottom,r))}function G(t,e,r){return Math.abs(t-e)<=r}function H(){M&&C.apply(null,arguments)}var V,q=[],X="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(V||(V={}));var K,Y=function(t){return Object.freeze(t)},J=function(t,e){this.inlineSize=t,this.blockSize=e,Y(this)},Q=function(){function t(t,e,r,n){return this.x=t,this.y=e,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Y(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Z=function(t){return t instanceof SVGElement&&"getBBox"in t},tt=function(t){if(Z(t)){var e=t.getBBox(),r=e.width,n=e.height;return!r&&!n}var o=t,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||t.getClientRects().length)},et=function(t){var e;if(t instanceof Element)return!0;var r=null===(e=null==t?void 0:t.ownerDocument)||void 0===e?void 0:e.defaultView;return!!(r&&t instanceof r.Element)},rt="undefined"!=typeof window?window:{},nt=new WeakMap,ot=/auto|scroll/,it=/^tb|vertical/,at=/msie|trident/i.test(rt.navigator&&rt.navigator.userAgent),ut=function(t){return parseFloat(t||"0")},ct=function(t,e,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=!1),new J((r?e:t)||0,(r?t:e)||0)},st=Y({devicePixelContentBoxSize:ct(),borderBoxSize:ct(),contentBoxSize:ct(),contentRect:new Q(0,0,0,0)}),lt=function(t,e){if(void 0===e&&(e=!1),nt.has(t)&&!e)return nt.get(t);if(tt(t))return nt.set(t,st),st;var r=getComputedStyle(t),n=Z(t)&&t.ownerSVGElement&&t.getBBox(),o=!at&&"border-box"===r.boxSizing,i=it.test(r.writingMode||""),a=!n&&ot.test(r.overflowY||""),u=!n&&ot.test(r.overflowX||""),c=n?0:ut(r.paddingTop),s=n?0:ut(r.paddingRight),l=n?0:ut(r.paddingBottom),f=n?0:ut(r.paddingLeft),p=n?0:ut(r.borderTopWidth),y=n?0:ut(r.borderRightWidth),d=n?0:ut(r.borderBottomWidth),h=f+s,g=c+l,m=(n?0:ut(r.borderLeftWidth))+y,b=p+d,v=u?t.offsetHeight-b-t.clientHeight:0,w=a?t.offsetWidth-m-t.clientWidth:0,x=o?h+m:0,S=o?g+b:0,E=n?n.width:ut(r.width)-x-w,A=n?n.height:ut(r.height)-S-v,O=E+h+w+m,j=A+g+v+b,T=Y({devicePixelContentBoxSize:ct(Math.round(E*devicePixelRatio),Math.round(A*devicePixelRatio),i),borderBoxSize:ct(O,j,i),contentBoxSize:ct(E,A,i),contentRect:new Q(f,c,E,A)});return nt.set(t,T),T},ft=function(t,e,r){var n=lt(t,r),o=n.borderBoxSize,i=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(e){case V.DEVICE_PIXEL_CONTENT_BOX:return a;case V.BORDER_BOX:return o;default:return i}},pt=function(t){var e=lt(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=Y([e.borderBoxSize]),this.contentBoxSize=Y([e.contentBoxSize]),this.devicePixelContentBoxSize=Y([e.devicePixelContentBoxSize])},yt=function(t){if(tt(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},dt=function(){var t=1/0,e=[];q.forEach((function(r){if(0!==r.activeTargets.length){var n=[];r.activeTargets.forEach((function(e){var r=new pt(e.target),o=yt(e.target);n.push(r),e.lastReportedSize=ft(e.target,e.observedBox),ot?e.activeTargets.push(r):e.skippedTargets.push(r))}))}))},gt=[],mt=0,bt={attributes:!0,characterData:!0,childList:!0,subtree:!0},vt=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],wt=function(t){return void 0===t&&(t=0),Date.now()+t},xt=!1,St=function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var e=this;if(void 0===t&&(t=250),!xt){xt=!0;var r,n=wt(t);r=function(){var r=!1;try{r=function(){var t,e=0;for(ht(e);q.some((function(t){return t.activeTargets.length>0}));)e=dt(),ht(e);return q.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:X}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=X),window.dispatchEvent(t)),e>0}()}finally{if(xt=!1,t=n-wt(),!mt)return;r?e.run(1e3):t>0?e.run(t):e.start()}},function(t){if(!K){var e=0,r=document.createTextNode("");new MutationObserver((function(){return gt.splice(0).forEach((function(t){return t()}))})).observe(r,{characterData:!0}),K=function(){r.textContent="".concat(e?e--:e++)}}gt.push(t),K()}((function(){requestAnimationFrame(r)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,bt)};document.body?e():rt.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),vt.forEach((function(e){return rt.addEventListener(e,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),vt.forEach((function(e){return rt.removeEventListener(e,t.listener,!0)})),this.stopped=!0)},t}(),Et=new St,At=function(t){!mt&&t>0&&Et.start(),!(mt+=t)&&Et.stop()},Ot=function(){function t(t,e){this.target=t,this.observedBox=e||V.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=ft(this.target,this.observedBox,!0);return t=this.target,Z(t)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),jt=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},Tt=new WeakMap,Pt=function(t,e){for(var r=0;r=0&&(o&&q.splice(q.indexOf(r),1),r.observationTargets.splice(n,1),At(-1))},t.disconnect=function(t){var e=this,r=Tt.get(t);r.observationTargets.slice().forEach((function(r){return e.unobserve(t,r.target)})),r.activeTargets.splice(0,r.activeTargets.length)},t}(),Ct=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Rt.connect(this,t)}return t.prototype.observe=function(t,e){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!et(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Rt.observe(this,t,e)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!et(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Rt.unobserve(this,t)},t.prototype.disconnect=function(){Rt.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const It=window.ResizeObserver||Ct;let Nt=new Map,Mt=new Map;var kt=0;function $t(t){if(0===Mt.size)return null;for(const[e,r]of Mt)if(r.isActivable())for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements){let o=r.getBoundingClientRect().toJSON();if(_(o,t.clientX,t.clientY,1))return{group:e,item:n,element:r,rect:o}}return null}function Dt(t){return t&&t instanceof Element}window.addEventListener("load",(function(){const t=document.body;var e={width:0,height:0};new It((()=>{e.width===t.clientWidth&&e.height===t.clientHeight||(e={width:t.clientWidth,height:t.clientHeight},Mt.forEach((function(t){t.requestLayout()})))})).observe(t)}),!1);const Lt={NONE:"",DESCENDANT:" ",CHILD:" > "},Ft={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"},Bt="CssSelectorGenerator";function _t(t="unknown problem",...e){console.warn(`${Bt}: ${t}`,...e)}const Wt={selectors:[Ft.id,Ft.class,Ft.tag,Ft.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function Ut(t){return t instanceof RegExp}function zt(t){return["string","function"].includes(typeof t)||Ut(t)}function Gt(t){return Array.isArray(t)?t.filter(zt):[]}function Ht(t){const e=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(t){return t instanceof Node}(t)&&e.includes(t.nodeType)}function Vt(t,e){if(Ht(t))return t.contains(e)||_t("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will nto work as intended."),t;const r=e.getRootNode({composed:!1});return Ht(r)?(r!==document&&_t("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),r):e.ownerDocument.querySelector(":root")}function qt(t){return"number"==typeof t?t:Number.POSITIVE_INFINITY}function Xt(t=[]){const[e=[],...r]=t;return 0===r.length?e:r.reduce(((t,e)=>t.filter((t=>e.includes(t)))),e)}function Kt(t){return[].concat(...t)}function Yt(t){const e=t.map((t=>{if(Ut(t))return e=>t.test(e);if("function"==typeof t)return e=>{const r=t(e);return"boolean"!=typeof r?(_t("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",t),!1):r};if("string"==typeof t){const e=new RegExp("^"+t.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")+"$");return t=>e.test(t)}return _t("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",t),()=>!1}));return t=>e.some((e=>e(t)))}function Jt(t,e,r){const n=Array.from(Vt(r,t[0]).querySelectorAll(e));return n.length===t.length&&t.every((t=>n.includes(t)))}function Qt(t,e){e=null!=e?e:function(t){return t.ownerDocument.querySelector(":root")}(t);const r=[];let n=t;for(;Dt(n)&&n!==e;)r.push(n),n=n.parentElement;return r}function Zt(t,e){return Xt(t.map((t=>Qt(t,e))))}const te=new RegExp(["^$","\\s"].join("|")),ee=new RegExp(["^$"].join("|")),re=[Ft.nthoftype,Ft.tag,Ft.id,Ft.class,Ft.attribute,Ft.nthchild],ne=Yt(["class","id","ng-*"]);function oe({name:t}){return`[${t}]`}function ie({name:t,value:e}){return`[${t}='${e}']`}function ae({nodeName:t,nodeValue:e}){return{name:(r=t,r.replace(/:/g,"\\:")),value:ve(e)};var r}function ue(t){const e=Array.from(t.attributes).filter((e=>function({nodeName:t},e){const r=e.tagName.toLowerCase();return!(["input","option"].includes(r)&&"value"===t||ne(t))}(e,t))).map(ae);return[...e.map(oe),...e.map(ie)]}function ce(t){return(t.getAttribute("class")||"").trim().split(/\s+/).filter((t=>!ee.test(t))).map((t=>`.${ve(t)}`))}function se(t){const e=t.getAttribute("id")||"",r=`#${ve(e)}`,n=t.getRootNode({composed:!1});return!te.test(e)&&Jt([t],r,n)?[r]:[]}function le(t){const e=t.parentNode;if(e){const r=Array.from(e.childNodes).filter(Dt).indexOf(t);if(r>-1)return[`:nth-child(${r+1})`]}return[]}function fe(t){return[ve(t.tagName.toLowerCase())]}function pe(t){const e=[...new Set(Kt(t.map(fe)))];return 0===e.length||e.length>1?[]:[e[0]]}function ye(t){const e=pe([t])[0],r=t.parentElement;if(r){const n=Array.from(r.children).filter((t=>t.tagName.toLowerCase()===e)),o=n.indexOf(t);if(o>-1)return[`${e}:nth-of-type(${o+1})`]}return[]}function de(t=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){return Array.from(function*(t=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){let r=0,n=ge(1);for(;n.length<=t.length&&rt[e]));yield e,n=he(n,t.length-1)}}(t,{maxResults:e}))}function he(t=[],e=0){const r=t.length;if(0===r)return[];const n=[...t];n[r-1]+=1;for(let t=r-1;t>=0;t--)if(n[t]>e){if(0===t)return ge(r+1);n[t-1]++,n[t]=n[t-1]+1}return n[r-1]>e?ge(r+1):n}function ge(t=1){return Array.from(Array(t).keys())}const me=":".charCodeAt(0).toString(16).toUpperCase(),be=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function ve(t=""){var e,r;return null!==(r=null===(e=null===CSS||void 0===CSS?void 0:CSS.escape)||void 0===e?void 0:e.call(CSS,t))&&void 0!==r?r:function(t=""){return t.split("").map((t=>":"===t?`\\${me} `:be.test(t)?`\\${t}`:escape(t).replace(/%/g,"\\"))).join("")}(t)}const we={tag:pe,id:function(t){return 0===t.length||t.length>1?[]:se(t[0])},class:function(t){return Xt(t.map(ce))},attribute:function(t){return Xt(t.map(ue))},nthchild:function(t){return Xt(t.map(le))},nthoftype:function(t){return Xt(t.map(ye))}},xe={tag:fe,id:se,class:ce,attribute:ue,nthchild:le,nthoftype:ye};function Se(t){return t.includes(Ft.tag)||t.includes(Ft.nthoftype)?[...t]:[...t,Ft.tag]}function Ee(t={}){const e=[...re];return t[Ft.tag]&&t[Ft.nthoftype]&&e.splice(e.indexOf(Ft.tag),1),e.map((e=>{return(n=t)[r=e]?n[r].join(""):"";var r,n})).join("")}function Ae(t,e,r="",n){const o=function(t,e){return""===e?t:function(t,e){return[...t.map((t=>e+Lt.DESCENDANT+t)),...t.map((t=>e+Lt.CHILD+t))]}(t,e)}(function(t,e,r){const n=function(t,e){const{blacklist:r,whitelist:n,combineWithinSelector:o,maxCombinations:i}=e,a=Yt(r),u=Yt(n);return function(t){const{selectors:e,includeTag:r}=t,n=[].concat(e);return r&&!n.includes("tag")&&n.push("tag"),n}(e).reduce(((e,r)=>{const n=function(t,e){var r;return(null!==(r=we[e])&&void 0!==r?r:()=>[])(t)}(t,r),c=function(t=[],e,r){return t.filter((t=>r(t)||!e(t)))}(n,a,u),s=function(t=[],e){return t.sort(((t,r)=>{const n=e(t),o=e(r);return n&&!o?-1:!n&&o?1:0}))}(c,u);return e[r]=o?de(s,{maxResults:i}):s.map((t=>[t])),e}),{})}(t,r),o=function(t,e){return function(t){const{selectors:e,combineBetweenSelectors:r,includeTag:n,maxCandidates:o}=t,i=r?de(e,{maxResults:o}):e.map((t=>[t]));return n?i.map(Se):i}(e).map((e=>function(t,e){const r={};return t.forEach((t=>{const n=e[t];n.length>0&&(r[t]=n)})),function(t={}){let e=[];return Object.entries(t).forEach((([t,r])=>{e=r.flatMap((r=>0===e.length?[{[t]:r}]:e.map((e=>Object.assign(Object.assign({},e),{[t]:r})))))})),e}(r).map(Ee)}(e,t))).filter((t=>t.length>0))}(n,r),i=Kt(o);return[...new Set(i)]}(t,n.root,n),r);for(const e of o)if(Jt(t,e,n.root))return e;return null}function Oe(t){return{value:t,include:!1}}function je({selectors:t,operator:e}){let r=[...re];t[Ft.tag]&&t[Ft.nthoftype]&&(r=r.filter((t=>t!==Ft.tag)));let n="";return r.forEach((e=>{(t[e]||[]).forEach((({value:t,include:e})=>{e&&(n+=t)}))})),e+n}function Te(t){return[":root",...Qt(t).reverse().map((t=>{const e=function(t,e,r=Lt.NONE){const n={};return e.forEach((e=>{Reflect.set(n,e,function(t,e){return xe[e](t)}(t,e).map(Oe))})),{element:t,operator:r,selectors:n}}(t,[Ft.nthchild],Lt.CHILD);return e.selectors.nthchild.forEach((t=>{t.include=!0})),e})).map(je)].join("")}function Pe(t,e={}){const r=function(t){(t instanceof NodeList||t instanceof HTMLCollection)&&(t=Array.from(t));const e=(Array.isArray(t)?t:[t]).filter(Dt);return[...new Set(e)]}(t),n=function(t,e={}){const r=Object.assign(Object.assign({},Wt),e);return{selectors:(n=r.selectors,Array.isArray(n)?n.filter((t=>{return e=Ft,r=t,Object.values(e).includes(r);var e,r})):[]),whitelist:Gt(r.whitelist),blacklist:Gt(r.blacklist),root:Vt(r.root,t),combineWithinSelector:!!r.combineWithinSelector,combineBetweenSelectors:!!r.combineBetweenSelectors,includeTag:!!r.includeTag,maxCombinations:qt(r.maxCombinations),maxCandidates:qt(r.maxCandidates)};var n}(r[0],e);let o="",i=n.root;function a(){return function(t,e,r="",n){if(0===t.length)return null;const o=[t.length>1?t:[],...Zt(t,e).map((t=>[t]))];for(const t of o){const e=Ae(t,0,r,n);if(e)return{foundElements:t,selector:e}}return null}(r,i,o,n)}let u=a();for(;u;){const{foundElements:t,selector:e}=u;if(Jt(r,e,n.root))return e;i=t[0],o=e,u=a()}return r.length>1?r.map((t=>Pe(t,n))).join(", "):function(t){return t.map(Te).join(", ")}(r)}function Re(t){return null==t?null:-1!==["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t.outerHTML:t.parentElement?Re(t.parentElement):null}function Ce(t){for(var e=0;e0&&e.top0&&e.left{Be(t)||(_e(t),We("down",t))})),window.addEventListener("keyup",(t=>{Be(t)||(_e(t),We("up",t))})),r.g.readium={scrollToId:function(t){let e=document.getElementById(t);return!!e&&(A(e.getBoundingClientRect()),!0)},scrollToPosition:function(t,e){if(console.log("ScrollToPosition"),t<0||t>1)console.log("InvalidPosition");else if(E()){let e=document.scrollingElement.scrollHeight*t;document.scrollingElement.scrollTop=e}else{let r=document.scrollingElement.scrollWidth*t*("rtl"==e?-1:1);document.scrollingElement.scrollLeft=j(r)}},scrollToLocator:function(t){let e=T(t);return!!e&&function(t){return A(t.getBoundingClientRect())}(e)},scrollLeft:function(t){var e="rtl"==t,r=document.scrollingElement.scrollWidth,n=window.innerWidth,o=window.scrollX-n,i=e?-(r-n):0;return O(Math.max(o,i))},scrollRight:function(t){var e="rtl"==t,r=document.scrollingElement.scrollWidth,n=window.innerWidth,o=window.scrollX+n,i=e?0:r-n;return O(Math.min(o,i))},setCSSProperties:function(t){for(const e in t)P(e,t[e])},setProperty:P,removeProperty:R,registerDecorationTemplates:function(t){var e="";for(const[r,n]of Object.entries(t))Nt.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){let t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}},getDecorations:function(t){var e=Mt.get(t);return e||(e=function(t,e){var r=[],n=0,o=null,i=!1;function a(e){let o=t+"-"+n++,i=T(e.locator);if(!i)return void C("Can't locate DOM range for decoration",e);let a={id:o,decoration:e,range:i};r.push(a),c(a)}function u(t){let e=r.findIndex((e=>e.decoration.id===t));if(-1===e)return;let n=r[e];r.splice(e,1),n.clickableElements=null,n.container&&(n.container.remove(),n.container=null)}function c(r){let n=(o||((o=document.createElement("div")).setAttribute("id",t),o.setAttribute("data-group",e),o.style.setProperty("pointer-events","none"),requestAnimationFrame((function(){null!=o&&document.body.append(o)}))),o),i=Nt.get(r.decoration.style);if(!i)return void I(`Unknown decoration style: ${r.decoration.style}`);let a=document.createElement("div");a.setAttribute("id",r.id),a.setAttribute("data-style",r.decoration.style),a.style.setProperty("pointer-events","none");let u=window.innerWidth,c=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count")),s=u/(c||1),l=document.scrollingElement,f=l.scrollLeft,p=l.scrollTop;function y(t,e,r){if(t.style.position="absolute","wrap"===i.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===i.width){t.style.width=`${u}px`,t.style.height=`${e.height}px`;let r=Math.floor(e.left/u)*u;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}else if("bounds"===i.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+f}px`,t.style.top=`${e.top+p}px`;else if("page"===i.width){t.style.width=`${s}px`,t.style.height=`${e.height}px`;let r=Math.floor(e.left/s)*s;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}}let d,h=r.range.getBoundingClientRect();try{let t=document.createElement("template");t.innerHTML=r.decoration.element.trim(),d=t.content.firstElementChild}catch(t){return void I(`Invalid decoration element "${r.decoration.element}": ${t.message}`)}if("boxes"===i.layout){let t=!0,e=D(r.range,t);e=e.sort(((t,e)=>t.tope.top?1:0));for(let t of e){const e=d.cloneNode(!0);e.style.setProperty("pointer-events","none"),y(e,t,h),a.append(e)}}else if("bounds"===i.layout){const t=d.cloneNode(!0);t.style.setProperty("pointer-events","none"),y(t,h,h),a.append(t)}n.append(a),r.container=a,r.clickableElements=Array.from(a.querySelectorAll("[data-activable='1']")),0===r.clickableElements.length&&(r.clickableElements=Array.from(a.children))}function s(){o&&(o.remove(),o=null)}return{add:a,remove:u,update:function(t){u(t.id),a(t)},clear:function(){s(),r.length=0},items:r,requestLayout:function(){s(),r.forEach((t=>c(t)))},isActivable:function(){return i},setActivable:function(){i=!0}}}("r2-decoration-"+kt++,t),Mt.set(t,e)),e},findFirstVisibleLocator:function(){const t=Ce(document.body);return{href:"#",type:"application/xhtml+xml",locations:{cssSelector:Pe(t)},text:{highlight:t.textContent}}}},window.readium.isReflowable=!0,webkit.messageHandlers.spreadLoadStarted.postMessage({}),window.addEventListener("load",(function(){window.requestAnimationFrame((function(){webkit.messageHandlers.spreadLoaded.postMessage({})}));let t=document.createElement("meta");t.setAttribute("name","viewport"),t.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"),document.head.appendChild(t)}))})()})(); +(()=>{var t={9116:(t,e)=>{"use strict";function r(t){return t.split("").reverse().join("")}function n(t){return(t|-t)>>31&1}function o(t,e,r,o){var i=t.P[r],a=t.M[r],u=o>>>31,c=e[r]|u,s=c|a,l=(c&i)+i^i|c,f=a|~(l|i),p=i&l,y=n(f&t.lastRowMask[r])-n(p&t.lastRowMask[r]);return f<<=1,p<<=1,i=(p|=u)|~(s|(f|=n(o)-u)),a=f&s,t.P[r]=i,t.M[r]=a,y}function i(t,e,r){if(0===e.length)return[];r=Math.min(r,e.length);var n=[],i=32,a=Math.ceil(e.length/i)-1,u={P:new Uint32Array(a+1),M:new Uint32Array(a+1),lastRowMask:new Uint32Array(a+1)};u.lastRowMask.fill(1<<31),u.lastRowMask[a]=1<<(e.length-1)%i;for(var c=new Uint32Array(a+1),s=new Map,l=[],f=0;f<256;f++)l.push(c);for(var p=0;p=e.length||e.charCodeAt(m)===y&&(d[h]|=1<0&&v[b]>=r+i;)b-=1;b===a&&v[b]<=r&&(v[b]{"use strict";var n=r(4624),o=r(5096),i=o(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&i(t,".prototype.")>-1?o(r):r}},5096:(t,e,r)=>{"use strict";var n=r(3520),o=r(4624),i=r(5676),a=r(2824),u=o("%Function.prototype.apply%"),c=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||n.call(c,u),l=o("%Object.defineProperty%",!0),f=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(t){l=null}t.exports=function(t){if("function"!=typeof t)throw new a("a function is required");var e=s(n,c,arguments);return i(e,1+f(0,t.length-(arguments.length-1)),!0)};var p=function(){return s(n,u,arguments)};l?l(t.exports,"apply",{value:p}):t.exports.apply=p},2448:(t,e,r)=>{"use strict";var n=r(3268)(),o=r(4624),i=n&&o("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch(t){i=!1}var a=r(6500),u=r(2824),c=r(6168);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new u("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new u("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new u("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new u("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new u("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new u("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,s=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(t,e);if(i)i(t,e,{configurable:null===s&&f?f.configurable:!s,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||s))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},2732:(t,e,r)=>{"use strict";var n=r(2812),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,a=Array.prototype.concat,u=r(2448),c=r(3268)(),s=function(t,e,r,n){if(e in t)if(!0===n){if(t[e]===r)return}else if("function"!=typeof(o=n)||"[object Function]"!==i.call(o)||!n())return;var o;c?u(t,e,r,!0):u(t,e,r)},l=function(t,e){var r=arguments.length>2?arguments[2]:{},i=n(e);o&&(i=a.call(i,Object.getOwnPropertySymbols(e)));for(var u=0;u{"use strict";t.exports=EvalError},1152:t=>{"use strict";t.exports=Error},1932:t=>{"use strict";t.exports=RangeError},5028:t=>{"use strict";t.exports=ReferenceError},6500:t=>{"use strict";t.exports=SyntaxError},2824:t=>{"use strict";t.exports=TypeError},5488:t=>{"use strict";t.exports=URIError},9200:(t,e,r)=>{"use strict";var n=r(4624)("%Object.defineProperty%",!0),o=r(4712)(),i=r(4440),a=o?Symbol.toStringTag:null;t.exports=function(t,e){var r=arguments.length>2&&arguments[2]&&arguments[2].force;!a||!r&&i(t,a)||(n?n(t,a,{configurable:!0,enumerable:!1,value:e,writable:!1}):t[a]=e)}},108:(t,e,r)=>{"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,o=r(5988),i=r(648),a=r(1844),u=r(7256);t.exports=function(t){if(o(t))return t;var e,r="default";if(arguments.length>1&&(arguments[1]===String?r="string":arguments[1]===Number&&(r="number")),n&&(Symbol.toPrimitive?e=function(t,e){var r=t[e];if(null!=r){if(!i(r))throw new TypeError(r+" returned for property "+e+" of object "+t+" is not a function");return r}}(t,Symbol.toPrimitive):u(t)&&(e=Symbol.prototype.valueOf)),void 0!==e){var c=e.call(t,r);if(o(c))return c;throw new TypeError("unable to convert exotic object to primitive")}return"default"===r&&(a(t)||u(t))&&(r="string"),function(t,e){if(null==t)throw new TypeError("Cannot call method on "+t);if("string"!=typeof e||"number"!==e&&"string"!==e)throw new TypeError('hint must be "string" or "number"');var r,n,a,u="string"===e?["toString","valueOf"]:["valueOf","toString"];for(a=0;a{"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},1480:t=>{"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n{"use strict";var n=r(1480);t.exports=Function.prototype.bind||n},2656:t=>{"use strict";var e=function(){return"string"==typeof function(){}.name},r=Object.getOwnPropertyDescriptor;if(r)try{r([],"length")}catch(t){r=null}e.functionsHaveConfigurableNames=function(){if(!e()||!r)return!1;var t=r((function(){}),"name");return!!t&&!!t.configurable};var n=Function.prototype.bind;e.boundFunctionsHaveNames=function(){return e()&&"function"==typeof n&&""!==function(){}.bind().name},t.exports=e},4624:(t,e,r)=>{"use strict";var n,o=r(1152),i=r(7261),a=r(1932),u=r(5028),c=r(6500),s=r(2824),l=r(5488),f=Function,p=function(t){try{return f('"use strict"; return ('+t+").constructor;")()}catch(t){}},y=Object.getOwnPropertyDescriptor;if(y)try{y({},"")}catch(t){y=null}var d=function(){throw new s},h=y?function(){try{return d}catch(t){try{return y(arguments,"callee").get}catch(t){return d}}}():d,g=r(9800)(),m=r(7e3)(),b=Object.getPrototypeOf||(m?function(t){return t.__proto__}:null),v={},w="undefined"!=typeof Uint8Array&&b?b(Uint8Array):n,x={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&b?b([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":v,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&b?b(b([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&g&&b?b((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":u,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&g&&b?b((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&b?b(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":h,"%TypedArray%":w,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(b)try{null.error}catch(t){var S=b(b(t));x["%Error.prototype%"]=S}var E=function t(e){var r;if("%AsyncFunction%"===e)r=p("async function () {}");else if("%GeneratorFunction%"===e)r=p("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=p("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var o=t("%AsyncGenerator%");o&&b&&(r=b(o.prototype))}return x[e]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},O=r(3520),j=r(4440),T=O.call(Function.call,Array.prototype.concat),P=O.call(Function.apply,Array.prototype.splice),R=O.call(Function.call,String.prototype.replace),C=O.call(Function.call,String.prototype.slice),I=O.call(Function.call,RegExp.prototype.exec),N=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,M=/\\(\\)?/g,k=function(t,e){var r,n=t;if(j(A,n)&&(n="%"+(r=A[n])[0]+"%"),j(x,n)){var o=x[n];if(o===v&&(o=E(n)),void 0===o&&!e)throw new s("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new c("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new s('"allowMissing" argument must be a boolean');if(null===I(/^%?[^%]*%?$/,t))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=C(t,0,1),r=C(t,-1);if("%"===e&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return R(t,N,(function(t,e,r,o){n[n.length]=r?R(o,M,"$1"):e||t})),n}(t),n=r.length>0?r[0]:"",o=k("%"+n+"%",e),i=o.name,a=o.value,u=!1,l=o.alias;l&&(n=l[0],P(r,T([0,1],l)));for(var f=1,p=!0;f=r.length){var m=y(a,d);a=(p=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:a[d]}else p=j(a,d),a=a[d];p&&!u&&(x[i]=a)}}return a}},6168:(t,e,r)=>{"use strict";var n=r(4624)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},3268:(t,e,r)=>{"use strict";var n=r(4624)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(t){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=o},7e3:t=>{"use strict";var e={foo:{}},r=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof r)}},9800:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(7904);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},7904:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},4712:(t,e,r)=>{"use strict";var n=r(7904);t.exports=function(){return n()&&!!Symbol.toStringTag}},4440:(t,e,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(3520);t.exports=i.call(n,o)},7284:(t,e,r)=>{"use strict";var n=r(4440),o=r(3147)(),i=r(2824),a={assert:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`O` is not an object");if("string"!=typeof e)throw new i("`slot` must be a string");if(o.assert(t),!a.has(t,e))throw new i("`"+e+"` is not present on `O`")},get:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`O` is not an object");if("string"!=typeof e)throw new i("`slot` must be a string");var r=o.get(t);return r&&r["$"+e]},has:function(t,e){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`O` is not an object");if("string"!=typeof e)throw new i("`slot` must be a string");var r=o.get(t);return!!r&&n(r,"$"+e)},set:function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new i("`O` is not an object");if("string"!=typeof e)throw new i("`slot` must be a string");var n=o.get(t);n||(n={},o.set(t,n)),n["$"+e]=r}};Object.freeze&&Object.freeze(a),t.exports=a},648:t=>{"use strict";var e,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,e)}catch(t){t!==r&&(o=null)}else o=null;var i=/^\s*class\b/,a=function(t){try{var e=n.call(t);return i.test(e)}catch(t){return!1}},u=function(t){try{return!a(t)&&(n.call(t),!0)}catch(t){return!1}},c=Object.prototype.toString,s="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(t){if((l||!t)&&(void 0===t||"object"==typeof t))try{var e=c.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=o?function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{o(t,null,e)}catch(t){if(t!==r)return!1}return!a(t)&&u(t)}:function(t){if(f(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(s)return u(t);if(a(t))return!1;var e=c.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&u(t)}},1844:(t,e,r)=>{"use strict";var n=Date.prototype.getDay,o=Object.prototype.toString,i=r(4712)();t.exports=function(t){return"object"==typeof t&&null!==t&&(i?function(t){try{return n.call(t),!0}catch(t){return!1}}(t):"[object Date]"===o.call(t))}},1476:(t,e,r)=>{"use strict";var n,o,i,a,u=r(668),c=r(4712)();if(c){n=u("Object.prototype.hasOwnProperty"),o=u("RegExp.prototype.exec"),i={};var s=function(){throw i};a={toString:s,valueOf:s},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=s)}var l=u("Object.prototype.toString"),f=Object.getOwnPropertyDescriptor;t.exports=c?function(t){if(!t||"object"!=typeof t)return!1;var e=f(t,"lastIndex");if(!e||!n(e,"value"))return!1;try{o(t,a)}catch(t){return t===i}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===l(t)}},7256:(t,e,r)=>{"use strict";var n=Object.prototype.toString;if(r(9800)()){var o=Symbol.prototype.toString,i=/^Symbol\(.*\)$/;t.exports=function(t){if("symbol"==typeof t)return!0;if("[object Symbol]"!==n.call(t))return!1;try{return function(t){return"symbol"==typeof t.valueOf()&&i.test(o.call(t))}(t)}catch(t){return!1}}}else t.exports=function(t){return!1}},4152:(t,e,r)=>{var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,u="function"==typeof Set&&Set.prototype,c=Object.getOwnPropertyDescriptor&&u?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,s=u&&c&&"function"==typeof c.get?c.get:null,l=u&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,h=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,w=String.prototype.toUpperCase,x=String.prototype.toLowerCase,S=RegExp.prototype.test,E=Array.prototype.concat,A=Array.prototype.join,O=Array.prototype.slice,j=Math.floor,T="function"==typeof BigInt?BigInt.prototype.valueOf:null,P=Object.getOwnPropertySymbols,R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,C="function"==typeof Symbol&&"object"==typeof Symbol.iterator,I="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,M=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function k(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||S.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var n=t<0?-j(-t):j(t);if(n!==t){var o=String(n),i=b.call(e,o.length+1);return v.call(o,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(e,r,"$&_")}var $=r(1740),D=$.custom,F=U(D)?D:null;function L(t,e,r){var n="double"===(r.quoteStyle||e)?'"':"'";return n+t+n}function B(t){return v.call(String(t),/"/g,""")}function _(t){return!("[object Array]"!==H(t)||I&&"object"==typeof t&&I in t)}function W(t){return!("[object RegExp]"!==H(t)||I&&"object"==typeof t&&I in t)}function U(t){if(C)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!R)return!1;try{return R.call(t),!0}catch(t){}return!1}t.exports=function t(e,n,o,u){var c=n||{};if(G(c,"quoteStyle")&&"single"!==c.quoteStyle&&"double"!==c.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(G(c,"maxStringLength")&&("number"==typeof c.maxStringLength?c.maxStringLength<0&&c.maxStringLength!==1/0:null!==c.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var h=!G(c,"customInspect")||c.customInspect;if("boolean"!=typeof h&&"symbol"!==h)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(G(c,"indent")&&null!==c.indent&&"\t"!==c.indent&&!(parseInt(c.indent,10)===c.indent&&c.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(G(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var w=c.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return q(e,c);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var S=String(e);return w?k(e,S):S}if("bigint"==typeof e){var j=String(e)+"n";return w?k(e,j):j}var P=void 0===c.depth?5:c.depth;if(void 0===o&&(o=0),o>=P&&P>0&&"object"==typeof e)return _(e)?"[Array]":"[Object]";var D,z=function(t,e){var r;if("\t"===t.indent)r="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;r=A.call(Array(t.indent+1)," ")}return{base:r,prev:A.call(Array(e+1),r)}}(c,o);if(void 0===u)u=[];else if(V(u,e)>=0)return"[Circular]";function X(e,r,n){if(r&&(u=O.call(u)).push(r),n){var i={depth:c.depth};return G(c,"quoteStyle")&&(i.quoteStyle=c.quoteStyle),t(e,i,o+1,u)}return t(e,c,o+1,u)}if("function"==typeof e&&!W(e)){var tt=function(t){if(t.name)return t.name;var e=m.call(g.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}(e),et=Z(e,X);return"[Function"+(tt?": "+tt:" (anonymous)")+"]"+(et.length>0?" { "+A.call(et,", ")+" }":"")}if(U(e)){var rt=C?v.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(e);return"object"!=typeof e||C?rt:K(rt)}if((D=e)&&"object"==typeof D&&("undefined"!=typeof HTMLElement&&D instanceof HTMLElement||"string"==typeof D.nodeName&&"function"==typeof D.getAttribute)){for(var nt="<"+x.call(String(e.nodeName)),ot=e.attributes||[],it=0;it"}if(_(e)){if(0===e.length)return"[]";var at=Z(e,X);return z&&!function(t){for(var e=0;e=0)return!1;return!0}(at)?"["+Q(at,z)+"]":"[ "+A.call(at,", ")+" ]"}if(function(t){return!("[object Error]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)){var ut=Z(e,X);return"cause"in Error.prototype||!("cause"in e)||N.call(e,"cause")?0===ut.length?"["+String(e)+"]":"{ ["+String(e)+"] "+A.call(ut,", ")+" }":"{ ["+String(e)+"] "+A.call(E.call("[cause]: "+X(e.cause),ut),", ")+" }"}if("object"==typeof e&&h){if(F&&"function"==typeof e[F]&&$)return $(e,{depth:P-o});if("symbol"!==h&&"function"==typeof e.inspect)return e.inspect()}if(function(t){if(!i||!t||"object"!=typeof t)return!1;try{i.call(t);try{s.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var ct=[];return a&&a.call(e,(function(t,r){ct.push(X(r,e,!0)+" => "+X(t,e))})),J("Map",i.call(e),ct,z)}if(function(t){if(!s||!t||"object"!=typeof t)return!1;try{s.call(t);try{i.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){var st=[];return l&&l.call(e,(function(t){st.push(X(t,e))})),J("Set",s.call(e),st,z)}if(function(t){if(!f||!t||"object"!=typeof t)return!1;try{f.call(t,f);try{p.call(t,p)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(e))return Y("WeakMap");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{p.call(t,p);try{f.call(t,f)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(e))return Y("WeakSet");if(function(t){if(!y||!t||"object"!=typeof t)return!1;try{return y.call(t),!0}catch(t){}return!1}(e))return Y("WeakRef");if(function(t){return!("[object Number]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(X(Number(e)));if(function(t){if(!t||"object"!=typeof t||!T)return!1;try{return T.call(t),!0}catch(t){}return!1}(e))return K(X(T.call(e)));if(function(t){return!("[object Boolean]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(d.call(e));if(function(t){return!("[object String]"!==H(t)||I&&"object"==typeof t&&I in t)}(e))return K(X(String(e)));if("undefined"!=typeof window&&e===window)return"{ [object Window] }";if(e===r.g)return"{ [object globalThis] }";if(!function(t){return!("[object Date]"!==H(t)||I&&"object"==typeof t&&I in t)}(e)&&!W(e)){var lt=Z(e,X),ft=M?M(e)===Object.prototype:e instanceof Object||e.constructor===Object,pt=e instanceof Object?"":"null prototype",yt=!ft&&I&&Object(e)===e&&I in e?b.call(H(e),8,-1):pt?"Object":"",dt=(ft||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(yt||pt?"["+A.call(E.call([],yt||[],pt||[]),": ")+"] ":"");return 0===lt.length?dt+"{}":z?dt+"{"+Q(lt,z)+"}":dt+"{ "+A.call(lt,", ")+" }"}return String(e)};var z=Object.prototype.hasOwnProperty||function(t){return t in this};function G(t,e){return z.call(t,e)}function H(t){return h.call(t)}function V(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;re.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return q(b.call(t,0,e.maxStringLength),e)+n}return L(v.call(v.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,X),"single",e)}function X(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+w.call(e.toString(16))}function K(t){return"Object("+t+")"}function Y(t){return t+" { ? }"}function J(t,e,r,n){return t+" ("+e+") {"+(n?Q(r,n):A.call(r,", "))+"}"}function Q(t,e){if(0===t.length)return"";var r="\n"+e.prev+e.base;return r+A.call(t,","+r)+"\n"+e.prev}function Z(t,e){var r=_(t),n=[];if(r){n.length=t.length;for(var o=0;o{"use strict";var n;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=r(9096),u=Object.prototype.propertyIsEnumerable,c=!u.call({toString:null},"toString"),s=u.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(t){var e=t.constructor;return e&&e.prototype===t},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},y=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!p["$"+t]&&o.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{f(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===i.call(t),n=a(t),u=e&&"[object String]"===i.call(t),p=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var d=s&&r;if(u&&t.length>0&&!o.call(t,0))for(var h=0;h0)for(var g=0;g{"use strict";var n=Array.prototype.slice,o=r(9096),i=Object.keys,a=i?function(t){return i(t)}:r(9560),u=Object.keys;a.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return o(t)?u(n.call(t)):u(t)})}else Object.keys=a;return Object.keys||a},t.exports=a},9096:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},7636:(t,e,r)=>{"use strict";var n=r(6308),o=r(2824),i=Object;t.exports=n((function(){if(null==this||this!==i(this))throw new o("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t}),"get flags",!0)},2192:(t,e,r)=>{"use strict";var n=r(2732),o=r(5096),i=r(7636),a=r(9296),u=r(736),c=o(a());n(c,{getPolyfill:a,implementation:i,shim:u}),t.exports=c},9296:(t,e,r)=>{"use strict";var n=r(7636),o=r(2732).supportsDescriptors,i=Object.getOwnPropertyDescriptor;t.exports=function(){if(o&&"gim"===/a/gim.flags){var t=i(RegExp.prototype,"flags");if(t&&"function"==typeof t.get&&"boolean"==typeof RegExp.prototype.dotAll&&"boolean"==typeof RegExp.prototype.hasIndices){var e="",r={};if(Object.defineProperty(r,"hasIndices",{get:function(){e+="d"}}),Object.defineProperty(r,"sticky",{get:function(){e+="y"}}),"dy"===e)return t.get}}return n}},736:(t,e,r)=>{"use strict";var n=r(2732).supportsDescriptors,o=r(9296),i=Object.getOwnPropertyDescriptor,a=Object.defineProperty,u=TypeError,c=Object.getPrototypeOf,s=/a/;t.exports=function(){if(!n||!c)throw new u("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=o(),e=c(s),r=i(e,"flags");return r&&r.get===t||a(e,"flags",{configurable:!0,enumerable:!1,get:t}),t}},860:(t,e,r)=>{"use strict";var n=r(668),o=r(1476),i=n("RegExp.prototype.exec"),a=r(2824);t.exports=function(t){if(!o(t))throw new a("`regex` must be a RegExp");return function(e){return null!==i(t,e)}}},5676:(t,e,r)=>{"use strict";var n=r(4624),o=r(2448),i=r(3268)(),a=r(6168),u=r(2824),c=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new u("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||c(e)!==e)throw new u("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,s=!0;if("length"in t&&a){var l=a(t,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(s=!1)}return(n||s||!r)&&(i?o(t,"length",e,!0,!0):o(t,"length",e)),t}},6308:(t,e,r)=>{"use strict";var n=r(2448),o=r(3268)(),i=r(2656).functionsHaveConfigurableNames(),a=TypeError;t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");return arguments.length>2&&!!arguments[2]&&!i||(o?n(t,"name",e,!0,!0):n(t,"name",e)),t}},3147:(t,e,r)=>{"use strict";var n=r(4624),o=r(668),i=r(4152),a=r(2824),u=n("%WeakMap%",!0),c=n("%Map%",!0),s=o("WeakMap.prototype.get",!0),l=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),y=o("Map.prototype.set",!0),d=o("Map.prototype.has",!0),h=function(t,e){for(var r,n=t;null!==(r=n.next);n=r)if(r.key===e)return n.next=r.next,r.next=t.next,t.next=r,r};t.exports=function(){var t,e,r,n={assert:function(t){if(!n.has(t))throw new a("Side channel does not contain "+i(t))},get:function(n){if(u&&n&&("object"==typeof n||"function"==typeof n)){if(t)return s(t,n)}else if(c){if(e)return p(e,n)}else if(r)return function(t,e){var r=h(t,e);return r&&r.value}(r,n)},has:function(n){if(u&&n&&("object"==typeof n||"function"==typeof n)){if(t)return f(t,n)}else if(c){if(e)return d(e,n)}else if(r)return function(t,e){return!!h(t,e)}(r,n);return!1},set:function(n,o){u&&n&&("object"==typeof n||"function"==typeof n)?(t||(t=new u),l(t,n,o)):c?(e||(e=new c),y(e,n,o)):(r||(r={key:{},next:null}),function(t,e,r){var n=h(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}}(r,n,o))}};return n}},9508:(t,e,r)=>{"use strict";var n=r(1700),o=r(3672),i=r(5552),a=r(3816),u=r(5424),c=r(4656),s=r(668),l=r(9800)(),f=r(2192),p=s("String.prototype.indexOf"),y=r(6288),d=function(t){var e=y();if(l&&"symbol"==typeof Symbol.matchAll){var r=i(t,Symbol.matchAll);return r===RegExp.prototype[Symbol.matchAll]&&r!==e?e:r}if(a(t))return e};t.exports=function(t){var e=c(this);if(null!=t){if(a(t)){var r="flags"in t?o(t,"flags"):f(t);if(c(r),p(u(r),"g")<0)throw new TypeError("matchAll requires a global regular expression")}var i=d(t);if(void 0!==i)return n(i,t,[e])}var s=u(e),l=new RegExp(t,"g");return n(d(l),l,[s])}},3732:(t,e,r)=>{"use strict";var n=r(5096),o=r(2732),i=r(9508),a=r(5844),u=r(4148),c=n(i);o(c,{getPolyfill:a,implementation:i,shim:u}),t.exports=c},6288:(t,e,r)=>{"use strict";var n=r(9800)(),o=r(7492);t.exports=function(){return n&&"symbol"==typeof Symbol.matchAll&&"function"==typeof RegExp.prototype[Symbol.matchAll]?RegExp.prototype[Symbol.matchAll]:o}},5844:(t,e,r)=>{"use strict";var n=r(9508);t.exports=function(){if(String.prototype.matchAll)try{"".matchAll(RegExp.prototype)}catch(t){return String.prototype.matchAll}return n}},7492:(t,e,r)=>{"use strict";var n=r(5211),o=r(3672),i=r(4e3),a=r(8652),u=r(4784),c=r(5424),s=r(8645),l=r(2192),f=r(6308),p=r(668)("String.prototype.indexOf"),y=RegExp,d="flags"in RegExp.prototype,h=f((function(t){var e=this;if("Object"!==s(e))throw new TypeError('"this" value must be an Object');var r=c(t),f=function(t,e){var r="flags"in e?o(e,"flags"):c(l(e));return{flags:r,matcher:new t(d&&"string"==typeof r?e:t===y?e.source:e,r)}}(a(e,y),e),h=f.flags,g=f.matcher,m=u(o(e,"lastIndex"));i(g,"lastIndex",m,!0);var b=p(h,"g")>-1,v=p(h,"u")>-1;return n(g,r,b,v)}),"[Symbol.matchAll]",!0);t.exports=h},4148:(t,e,r)=>{"use strict";var n=r(2732),o=r(9800)(),i=r(5844),a=r(6288),u=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.exports=function(){var t=i();if(n(String.prototype,{matchAll:t},{matchAll:function(){return String.prototype.matchAll!==t}}),o){var e=Symbol.matchAll||(Symbol.for?Symbol.for("Symbol.matchAll"):Symbol("Symbol.matchAll"));if(n(Symbol,{matchAll:e},{matchAll:function(){return Symbol.matchAll!==e}}),u&&c){var r=c(Symbol,e);r&&!r.configurable||u(Symbol,e,{configurable:!1,enumerable:!1,value:e,writable:!1})}var s=a(),l={};l[e]=s;var f={};f[e]=function(){return RegExp.prototype[e]!==s},n(RegExp.prototype,l,f)}return t}},6936:(t,e,r)=>{"use strict";var n=r(4656),o=r(5424),i=r(668)("String.prototype.replace"),a=/^\s$/.test("᠎"),u=a?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,c=a?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;t.exports=function(){var t=o(n(this));return i(i(t,u,""),c,"")}},9292:(t,e,r)=>{"use strict";var n=r(5096),o=r(2732),i=r(4656),a=r(6936),u=r(6684),c=r(9788),s=n(u()),l=function(t){return i(t),s(t)};o(l,{getPolyfill:u,implementation:a,shim:c}),t.exports=l},6684:(t,e,r)=>{"use strict";var n=r(6936);t.exports=function(){return String.prototype.trim&&"​"==="​".trim()&&"᠎"==="᠎".trim()&&"_᠎"==="_᠎".trim()&&"᠎_"==="᠎_".trim()?String.prototype.trim:n}},9788:(t,e,r)=>{"use strict";var n=r(2732),o=r(6684);t.exports=function(){var t=o();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},1740:()=>{},1056:(t,e,r)=>{"use strict";var n=r(4624),o=r(8536),i=r(8645),a=r(7724),u=r(9132),c=n("%TypeError%");t.exports=function(t,e,r){if("String"!==i(t))throw new c("Assertion failed: `S` must be a String");if(!a(e)||e<0||e>u)throw new c("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if("Boolean"!==i(r))throw new c("Assertion failed: `unicode` must be a Boolean");return r?e+1>=t.length?e+1:e+o(t,e)["[[CodeUnitCount]]"]:e+1}},1700:(t,e,r)=>{"use strict";var n=r(4624),o=r(668),i=n("%TypeError%"),a=r(1720),u=n("%Reflect.apply%",!0)||o("Function.prototype.apply");t.exports=function(t,e){var r=arguments.length>2?arguments[2]:[];if(!a(r))throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");return u(t,e,r)}},8536:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(668),i=r(1712),a=r(8444),u=r(8645),c=r(2320),s=o("String.prototype.charAt"),l=o("String.prototype.charCodeAt");t.exports=function(t,e){if("String"!==u(t))throw new n("Assertion failed: `string` must be a String");var r=t.length;if(e<0||e>=r)throw new n("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=l(t,e),f=s(t,e),p=i(o),y=a(o);if(!p&&!y)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||e+1===r)return{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var d=l(t,e+1);return a(d)?{"[[CodePoint]]":c(o,d),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":f,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}},4288:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(8645);t.exports=function(t,e){if("Boolean"!==o(e))throw new n("Assertion failed: Type(done) is not Boolean");return{value:t,done:e}}},2672:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(4436),i=r(8924),a=r(3880),u=r(2968),c=r(8800),s=r(8645);t.exports=function(t,e,r){if("Object"!==s(t))throw new n("Assertion failed: Type(O) is not Object");if(!u(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");return o(a,c,i,t,e,{"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":r,"[[Writable]]":!0})}},5211:(t,e,r)=>{"use strict";var n=r(4624),o=r(9800)(),i=n("%TypeError%"),a=n("%IteratorPrototype%",!0),u=r(1056),c=r(4288),s=r(2672),l=r(3672),f=r(6216),p=r(8972),y=r(4e3),d=r(4784),h=r(5424),g=r(8645),m=r(7284),b=r(9200),v=function(t,e,r,n){if("String"!==g(e))throw new i("`S` must be a string");if("Boolean"!==g(r))throw new i("`global` must be a boolean");if("Boolean"!==g(n))throw new i("`fullUnicode` must be a boolean");m.set(this,"[[IteratingRegExp]]",t),m.set(this,"[[IteratedString]]",e),m.set(this,"[[Global]]",r),m.set(this,"[[Unicode]]",n),m.set(this,"[[Done]]",!1)};a&&(v.prototype=f(a)),s(v.prototype,"next",(function(){var t=this;if("Object"!==g(t))throw new i("receiver must be an object");if(!(t instanceof v&&m.has(t,"[[IteratingRegExp]]")&&m.has(t,"[[IteratedString]]")&&m.has(t,"[[Global]]")&&m.has(t,"[[Unicode]]")&&m.has(t,"[[Done]]")))throw new i('"this" value must be a RegExpStringIterator instance');if(m.get(t,"[[Done]]"))return c(void 0,!0);var e=m.get(t,"[[IteratingRegExp]]"),r=m.get(t,"[[IteratedString]]"),n=m.get(t,"[[Global]]"),o=m.get(t,"[[Unicode]]"),a=p(e,r);if(null===a)return m.set(t,"[[Done]]",!0),c(void 0,!0);if(n){if(""===h(l(a,"0"))){var s=d(l(e,"lastIndex")),f=u(r,s,o);y(e,"lastIndex",f,!0)}return c(a,!1)}return m.set(t,"[[Done]]",!0),c(a,!1)})),o&&(b(v.prototype,"RegExp String Iterator"),Symbol.iterator&&"function"!=typeof v.prototype[Symbol.iterator])&&s(v.prototype,Symbol.iterator,(function(){return this})),t.exports=function(t,e,r,n){return new v(t,e,r,n)}},7268:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(320),i=r(4436),a=r(8924),u=r(4936),c=r(3880),s=r(2968),l=r(8800),f=r(5696),p=r(8645);t.exports=function(t,e,r){if("Object"!==p(t))throw new n("Assertion failed: Type(O) is not Object");if(!s(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var y=o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:u},r)?r:f(r);if(!o({Type:p,IsDataDescriptor:c,IsAccessorDescriptor:u},y))throw new n("Assertion failed: Desc is not a valid Property Descriptor");return i(c,l,a,t,e,y)}},8924:(t,e,r)=>{"use strict";var n=r(3600),o=r(3504),i=r(8645);t.exports=function(t){return void 0!==t&&n(i,"Property Descriptor","Desc",t),o(t)}},3672:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(4152),i=r(2968),a=r(8645);t.exports=function(t,e){if("Object"!==a(t))throw new n("Assertion failed: Type(O) is not Object");if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},5552:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(3396),i=r(3048),a=r(2968),u=r(4152);t.exports=function(t,e){if(!a(e))throw new n("Assertion failed: IsPropertyKey(P) is not true");var r=o(t,e);if(null!=r){if(!i(r))throw new n(u(e)+" is not a function: "+u(r));return r}}},3396:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(4152),i=r(2968);t.exports=function(t,e){if(!i(e))throw new n("Assertion failed: IsPropertyKey(P) is not true, got "+o(e));return t[e]}},4936:(t,e,r)=>{"use strict";var n=r(4440),o=r(8645),i=r(3600);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Get]]")&&!n(t,"[[Set]]")))}},1720:(t,e,r)=>{"use strict";t.exports=r(704)},3048:(t,e,r)=>{"use strict";t.exports=r(648)},211:(t,e,r)=>{"use strict";var n=r(8600)("%Reflect.construct%",!0),o=r(7268);try{o({},"",{"[[Get]]":function(){}})}catch(t){o=null}if(o&&n){var i={},a={};o(a,"length",{"[[Get]]":function(){throw i},"[[Enumerable]]":!0}),t.exports=function(t){try{n(t,a)}catch(t){return t===i}}}else t.exports=function(t){return"function"==typeof t&&!!t.prototype}},3880:(t,e,r)=>{"use strict";var n=r(4440),o=r(8645),i=r(3600);t.exports=function(t){return void 0!==t&&(i(o,"Property Descriptor","Desc",t),!(!n(t,"[[Value]]")&&!n(t,"[[Writable]]")))}},2968:t=>{"use strict";t.exports=function(t){return"string"==typeof t||"symbol"==typeof t}},3816:(t,e,r)=>{"use strict";var n=r(4624)("%Symbol.match%",!0),o=r(1476),i=r(6848);t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(n){var e=t[n];if(void 0!==e)return i(e)}return o(t)}},6216:(t,e,r)=>{"use strict";var n=r(4624),o=n("%Object.create%",!0),i=n("%TypeError%"),a=n("%SyntaxError%"),u=r(1720),c=r(8645),s=r(4672),l=r(7284),f=r(7e3)();t.exports=function(t){if(null!==t&&"Object"!==c(t))throw new i("Assertion failed: `proto` must be null or an object");var e,r=arguments.length<2?[]:arguments[1];if(!u(r))throw new i("Assertion failed: `additionalInternalSlotsList` must be an Array");if(o)e=o(t);else if(f)e={__proto__:t};else{if(null===t)throw new a("native Object.create support is required to create null objects");var n=function(){};n.prototype=t,e=new n}return r.length>0&&s(r,(function(t){l.set(e,t,void 0)})),e}},8972:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(668)("RegExp.prototype.exec"),i=r(1700),a=r(3672),u=r(3048),c=r(8645);t.exports=function(t,e){if("Object"!==c(t))throw new n("Assertion failed: `R` must be an Object");if("String"!==c(e))throw new n("Assertion failed: `S` must be a String");var r=a(t,"exec");if(u(r)){var s=i(r,t,[e]);if(null===s||"Object"===c(s))return s;throw new n('"exec" method must return `null` or an Object')}return o(t,e)}},4656:(t,e,r)=>{"use strict";t.exports=r(176)},8800:(t,e,r)=>{"use strict";var n=r(2808);t.exports=function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)}},4e3:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%"),o=r(2968),i=r(8800),a=r(8645),u=function(){try{return delete[].length,!0}catch(t){return!1}}();t.exports=function(t,e,r,c){if("Object"!==a(t))throw new n("Assertion failed: `O` must be an Object");if(!o(e))throw new n("Assertion failed: `P` must be a Property Key");if("Boolean"!==a(c))throw new n("Assertion failed: `Throw` must be a Boolean");if(c){if(t[e]=r,u&&!i(t[e],r))throw new n("Attempted to assign to readonly property.");return!0}try{return t[e]=r,!u||i(t[e],r)}catch(t){return!1}}},8652:(t,e,r)=>{"use strict";var n=r(4624),o=n("%Symbol.species%",!0),i=n("%TypeError%"),a=r(211),u=r(8645);t.exports=function(t,e){if("Object"!==u(t))throw new i("Assertion failed: Type(O) is not Object");var r=t.constructor;if(void 0===r)return e;if("Object"!==u(r))throw new i("O.constructor is not an Object");var n=o?r[o]:void 0;if(null==n)return e;if(a(n))return n;throw new i("no constructor found")}},8772:(t,e,r)=>{"use strict";var n=r(4624),o=n("%Number%"),i=n("%RegExp%"),a=n("%TypeError%"),u=n("%parseInt%"),c=r(668),s=r(860),l=c("String.prototype.slice"),f=s(/^0b[01]+$/i),p=s(/^0o[0-7]+$/i),y=s(/^[-+]0x[0-9a-f]+$/i),d=s(new i("["+["…","​","￾"].join("")+"]","g")),h=r(9292),g=r(8645);t.exports=function t(e){if("String"!==g(e))throw new a("Assertion failed: `argument` is not a String");if(f(e))return o(u(l(e,2),2));if(p(e))return o(u(l(e,2),8));if(d(e)||y(e))return NaN;var r=h(e);return r!==e?t(r):o(e)}},6848:t=>{"use strict";t.exports=function(t){return!!t}},9424:(t,e,r)=>{"use strict";var n=r(7220),o=r(2592),i=r(2808),a=r(2931);t.exports=function(t){var e=n(t);return i(e)||0===e?0:a(e)?o(e):e}},4784:(t,e,r)=>{"use strict";var n=r(9132),o=r(9424);t.exports=function(t){var e=o(t);return e<=0?0:e>n?n:e}},7220:(t,e,r)=>{"use strict";var n=r(4624),o=n("%TypeError%"),i=n("%Number%"),a=r(2336),u=r(5556),c=r(8772);t.exports=function(t){var e=a(t)?t:u(t,i);if("symbol"==typeof e)throw new o("Cannot convert a Symbol value to a number");if("bigint"==typeof e)throw new o("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof e?c(e):i(e)}},5556:(t,e,r)=>{"use strict";var n=r(108);t.exports=function(t){return arguments.length>1?n(t,arguments[1]):n(t)}},5696:(t,e,r)=>{"use strict";var n=r(4440),o=r(4624)("%TypeError%"),i=r(8645),a=r(6848),u=r(3048);t.exports=function(t){if("Object"!==i(t))throw new o("ToPropertyDescriptor requires an object");var e={};if(n(t,"enumerable")&&(e["[[Enumerable]]"]=a(t.enumerable)),n(t,"configurable")&&(e["[[Configurable]]"]=a(t.configurable)),n(t,"value")&&(e["[[Value]]"]=t.value),n(t,"writable")&&(e["[[Writable]]"]=a(t.writable)),n(t,"get")){var r=t.get;if(void 0!==r&&!u(r))throw new o("getter must be a function");e["[[Get]]"]=r}if(n(t,"set")){var c=t.set;if(void 0!==c&&!u(c))throw new o("setter must be a function");e["[[Set]]"]=c}if((n(e,"[[Get]]")||n(e,"[[Set]]"))&&(n(e,"[[Value]]")||n(e,"[[Writable]]")))throw new o("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}},5424:(t,e,r)=>{"use strict";var n=r(4624),o=n("%String%"),i=n("%TypeError%");t.exports=function(t){if("symbol"==typeof t)throw new i("Cannot convert a Symbol value to a string");return o(t)}},8645:(t,e,r)=>{"use strict";var n=r(7936);t.exports=function(t){return"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":n(t)}},2320:(t,e,r)=>{"use strict";var n=r(4624),o=n("%TypeError%"),i=n("%String.fromCharCode%"),a=r(1712),u=r(8444);t.exports=function(t,e){if(!a(t)||!u(e))throw new o("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return i(t)+i(e)}},2312:(t,e,r)=>{"use strict";var n=r(8645),o=Math.floor;t.exports=function(t){return"BigInt"===n(t)?t:o(t)}},2592:(t,e,r)=>{"use strict";var n=r(4624),o=r(2312),i=n("%TypeError%");t.exports=function(t){if("number"!=typeof t&&"bigint"!=typeof t)throw new i("argument must be a Number or a BigInt");var e=t<0?-o(-t):o(t);return 0===e?0:e}},176:(t,e,r)=>{"use strict";var n=r(4624)("%TypeError%");t.exports=function(t,e){if(null==t)throw new n(e||"Cannot call method on "+t);return t}},7936:t=>{"use strict";t.exports=function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0}},8600:(t,e,r)=>{"use strict";t.exports=r(4624)},4436:(t,e,r)=>{"use strict";var n=r(3268),o=r(4624),i=n()&&o("%Object.defineProperty%",!0),a=n.hasArrayLengthDefineBug(),u=a&&r(704),c=r(668)("Object.prototype.propertyIsEnumerable");t.exports=function(t,e,r,n,o,s){if(!i){if(!t(s))return!1;if(!s["[[Configurable]]"]||!s["[[Writable]]"])return!1;if(o in n&&c(n,o)!==!!s["[[Enumerable]]"])return!1;var l=s["[[Value]]"];return n[o]=l,e(n[o],l)}return a&&"length"===o&&"[[Value]]"in s&&u(n)&&n.length!==s["[[Value]]"]?(n.length=s["[[Value]]"],n.length===s["[[Value]]"]):(i(n,o,r(s)),!0)}},704:(t,e,r)=>{"use strict";var n=r(4624)("%Array%"),o=!n.isArray&&r(668)("Object.prototype.toString");t.exports=n.isArray||function(t){return"[object Array]"===o(t)}},3600:(t,e,r)=>{"use strict";var n=r(4624),o=n("%TypeError%"),i=n("%SyntaxError%"),a=r(4440),u=r(7724),c={"Property Descriptor":function(t){var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};if(!t)return!1;for(var r in t)if(a(t,r)&&!e[r])return!1;var n=a(t,"[[Value]]"),i=a(t,"[[Get]]")||a(t,"[[Set]]");if(n&&i)throw new o("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":r(5092),"Iterator Record":function(t){return a(t,"[[Iterator]]")&&a(t,"[[NextMethod]]")&&a(t,"[[Done]]")},"PromiseCapability Record":function(t){return!!t&&a(t,"[[Resolve]]")&&"function"==typeof t["[[Resolve]]"]&&a(t,"[[Reject]]")&&"function"==typeof t["[[Reject]]"]&&a(t,"[[Promise]]")&&t["[[Promise]]"]&&"function"==typeof t["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(t){return!!t&&a(t,"[[Completion]]")&&a(t,"[[Capability]]")&&c["PromiseCapability Record"](t["[[Capability]]"])},"RegExp Record":function(t){return t&&a(t,"[[IgnoreCase]]")&&"boolean"==typeof t["[[IgnoreCase]]"]&&a(t,"[[Multiline]]")&&"boolean"==typeof t["[[Multiline]]"]&&a(t,"[[DotAll]]")&&"boolean"==typeof t["[[DotAll]]"]&&a(t,"[[Unicode]]")&&"boolean"==typeof t["[[Unicode]]"]&&a(t,"[[CapturingGroupsCount]]")&&"number"==typeof t["[[CapturingGroupsCount]]"]&&u(t["[[CapturingGroupsCount]]"])&&t["[[CapturingGroupsCount]]"]>=0}};t.exports=function(t,e,r,n){var a=c[e];if("function"!=typeof a)throw new i("unknown record type: "+e);if("Object"!==t(n)||!a(n))throw new o(r+" must be a "+e)}},4672:t=>{"use strict";t.exports=function(t,e){for(var r=0;r{"use strict";t.exports=function(t){if(void 0===t)return t;var e={};return"[[Value]]"in t&&(e.value=t["[[Value]]"]),"[[Writable]]"in t&&(e.writable=!!t["[[Writable]]"]),"[[Get]]"in t&&(e.get=t["[[Get]]"]),"[[Set]]"in t&&(e.set=t["[[Set]]"]),"[[Enumerable]]"in t&&(e.enumerable=!!t["[[Enumerable]]"]),"[[Configurable]]"in t&&(e.configurable=!!t["[[Configurable]]"]),e}},2931:(t,e,r)=>{"use strict";var n=r(2808);t.exports=function(t){return("number"==typeof t||"bigint"==typeof t)&&!n(t)&&t!==1/0&&t!==-1/0}},7724:(t,e,r)=>{"use strict";var n=r(4624),o=n("%Math.abs%"),i=n("%Math.floor%"),a=r(2808),u=r(2931);t.exports=function(t){if("number"!=typeof t||a(t)||!u(t))return!1;var e=o(t);return i(e)===e}},1712:t=>{"use strict";t.exports=function(t){return"number"==typeof t&&t>=55296&&t<=56319}},5092:(t,e,r)=>{"use strict";var n=r(4440);t.exports=function(t){return n(t,"[[StartIndex]]")&&n(t,"[[EndIndex]]")&&t["[[StartIndex]]"]>=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}},2808:t=>{"use strict";t.exports=Number.isNaN||function(t){return t!=t}},2336:t=>{"use strict";t.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},320:(t,e,r)=>{"use strict";var n=r(4624),o=r(4440),i=n("%TypeError%");t.exports=function(t,e){if("Object"!==t.Type(e))return!1;var r={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var n in e)if(o(e,n)&&!r[n])return!1;if(t.IsDataDescriptor(e)&&t.IsAccessorDescriptor(e))throw new i("Property Descriptors may not be both accessor and data descriptors");return!0}},8444:t=>{"use strict";t.exports=function(t){return"number"==typeof t&&t>=56320&&t<=57343}},9132:t=>{"use strict";t.exports=Number.MAX_SAFE_INTEGER||9007199254740991}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var i=e[n]={exports:{}};return t[n](i,i.exports,r),i.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=r(9116);function e(e,r,n){let o=0,i=[];for(;-1!==o;)o=e.indexOf(r,o),-1!==o&&(i.push({start:o,end:o+r.length,errors:0}),o+=1);return i.length>0?i:(0,t.c)(e,r,n)}function n(t,r){return 0===r.length||0===t.length?0:1-e(t,r,r.length)[0].errors/r.length}function o(t){switch(t.nodeType){case Node.ELEMENT_NODE:case Node.TEXT_NODE:return t.textContent.length;default:return 0}}function i(t){let e=t.previousSibling,r=0;for(;e;)r+=o(e),e=e.previousSibling;return r}function a(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;no?(a.push({node:u,offset:o-s}),o=r.shift()):(c=i.nextNode(),s+=u.data.length);for(;void 0!==o&&u&&s===o;)a.push({node:u,offset:u.data.length}),o=r.shift();if(void 0!==o)throw new RangeError("Offset exceeds text length");return a}class u{constructor(t,e){if(e<0)throw new Error("Offset is invalid");this.element=t,this.offset=e}relativeTo(t){if(!t.contains(this.element))throw new Error("Parent is not an ancestor of current element");let e=this.element,r=this.offset;for(;e!==t;)r+=i(e),e=e.parentElement;return new u(e,r)}resolve(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};try{return a(this.element,this.offset)[0]}catch(e){if(0===this.offset&&void 0!==t.direction){const r=document.createTreeWalker(this.element.getRootNode(),NodeFilter.SHOW_TEXT);r.currentNode=this.element;const n=1===t.direction,o=n?r.nextNode():r.previousNode();if(!o)throw e;return{node:o,offset:n?0:o.data.length}}throw e}}static fromCharOffset(t,e){switch(t.nodeType){case Node.TEXT_NODE:return u.fromPoint(t,e);case Node.ELEMENT_NODE:return new u(t,e);default:throw new Error("Node is not an element or text node")}}static fromPoint(t,e){switch(t.nodeType){case Node.TEXT_NODE:{if(e<0||e>t.data.length)throw new Error("Text node offset is out of range");if(!t.parentElement)throw new Error("Text node has no parent");const r=i(t)+e;return new u(t.parentElement,r)}case Node.ELEMENT_NODE:{if(e<0||e>t.childNodes.length)throw new Error("Child node offset is out of range");let r=0;for(let n=0;n2&&void 0!==arguments[2]?arguments[2]:{};this.root=t,this.exact=e,this.context=r}static fromRange(t,e){const r=t.textContent,n=c.fromRange(e).relativeTo(t),o=n.start.offset,i=n.end.offset;return new l(t,r.slice(o,i),{prefix:r.slice(Math.max(0,o-32),o),suffix:r.slice(i,Math.min(r.length,i+32))})}static fromSelector(t,e){const{prefix:r,suffix:n}=e;return new l(t,e.exact,{prefix:r,suffix:n})}toSelector(){return{type:"TextQuoteSelector",exact:this.exact,prefix:this.context.prefix,suffix:this.context.suffix}}toRange(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.toPositionAnchor(t).toRange()}toPositionAnchor(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=function(t,r){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0===r.length)return null;const i=Math.min(256,r.length/2),a=e(t,r,i);if(0===a.length)return null;const u=e=>{const i=1-e.errors/r.length,a=o.prefix?n(t.slice(Math.max(0,e.start-o.prefix.length),e.start),o.prefix):1,u=o.suffix?n(t.slice(e.end,e.end+o.suffix.length),o.suffix):1;let c=1;return"number"==typeof o.hint&&(c=1-Math.abs(e.start-o.hint)/t.length),(50*i+20*a+20*u+2*c)/92},c=a.map((t=>({start:t.start,end:t.end,score:u(t)})));return c.sort(((t,e)=>e.score-t.score)),c[0]}(this.root.textContent,this.exact,{...this.context,hint:t.hint});if(!r)throw new Error("Quote not found");return new s(this.root,r.start,r.end)}}var f=r(3732);r.n(f)().shim();const p=!0;function y(){if(!readium.link)return null;const t=readium.link.href;if(!t)return null;const e=function(){const t=window.getSelection();if(!t)return;if(t.isCollapsed)return;const e=t.toString();if(0===e.trim().replace(/\n/g," ").replace(/\s\s+/g," ").length)return;if(!t.anchorNode||!t.focusNode)return;const r=1===t.rangeCount?t.getRangeAt(0):function(t,e,r,n){const o=new Range;if(o.setStart(t,e),o.setEnd(r,n),!o.collapsed)return o;d(">>> createOrderedRange COLLAPSED ... RANGE REVERSE?");const i=new Range;if(i.setStart(r,n),i.setEnd(t,e),!i.collapsed)return d(">>> createOrderedRange RANGE REVERSE OK."),o;d(">>> createOrderedRange RANGE REVERSE ALSO COLLAPSED?!")}(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset);if(!r||r.collapsed)return void d("$$$$$$$$$$$$$$$$$ CANNOT GET NON-COLLAPSED SELECTION RANGE?!");const n=document.body.textContent,o=c.fromRange(r).relativeTo(document.body),i=o.start.offset,a=o.end.offset;let u=n.slice(Math.max(0,i-200),i),s=u.search(/\P{L}\p{L}/gu);-1!==s&&(u=u.slice(s+1));let l=n.slice(a,Math.min(n.length,a+200)),f=Array.from(l.matchAll(/\p{L}\P{L}/gu)).pop();return void 0!==f&&f.index>1&&(l=l.slice(0,f.index+1)),{highlight:e,before:u,after:l}}();return e?{href:t,text:e,rect:function(){try{let t=window.getSelection();if(!t)return;return M(t.getRangeAt(0).getBoundingClientRect())}catch(t){return I(t),null}}()}:null}function d(){p&&R.apply(null,arguments)}window.addEventListener("error",(function(t){webkit.messageHandlers.logError.postMessage({message:t.message,filename:t.filename,line:t.lineno})}),!1),window.addEventListener("load",(function(){var t;new ResizeObserver((()=>{t&&window.cancelAnimationFrame(t),t=window.requestAnimationFrame((function(){w=window.innerWidth,function(){const t="readium-virtual-page";var e=document.getElementById(t);if(S()||2!=parseInt(window.getComputedStyle(document.documentElement).getPropertyValue("column-count"))){var r;null===(r=e)||void 0===r||r.remove()}else{var n=document.scrollingElement.scrollWidth/window.innerWidth;Math.round(2*n)/2%1>.1&&(e?e.remove():((e=document.createElement("div")).setAttribute("id",t),e.style.breakBefore="column",e.innerHTML="​",document.body.appendChild(e)))}}(),function(){if(!S()){var t=O(window.scrollX+1);document.scrollingElement.scrollLeft=t}}(),x()}))})).observe(document.body)}),!1);var h,g,m=0,b=0,v=!1,w=0;function x(){readium.isFixedLayout||(b=window.scrollY/document.scrollingElement.scrollHeight,m=Math.abs(window.scrollX/document.scrollingElement.scrollWidth),0!==document.scrollingElement.scrollWidth&&0!==document.scrollingElement.scrollHeight&&(v||window.requestAnimationFrame((function(){var t;t=(S()?b:m).toString(),webkit.messageHandlers.progressionChanged.postMessage(t),v=!1})),v=!0))}function S(){return"readium-scroll-on"==document.documentElement.style.getPropertyValue("--USER__view").trim()}function E(t){return S()?document.scrollingElement.scrollTop=t.top+window.scrollY:document.scrollingElement.scrollLeft=O(t.left+window.scrollX),!0}function A(t){var e=window.scrollX,r=window.innerWidth;return document.scrollingElement.scrollLeft=t,Math.abs(e-t)/r>.01}function O(t){var e=t+1;return e-e%w}function j(t){try{let n=t.locations,o=t.text;var e;if(o&&o.highlight)return n&&n.cssSelector&&(e=document.querySelector(n.cssSelector)),e||(e=document.body),new l(e,o.highlight,{prefix:o.before,suffix:o.after}).toRange();if(n){var r=null;if(!r&&n.cssSelector&&(r=document.querySelector(n.cssSelector)),!r&&n.fragments)for(const t of n.fragments)if(r=document.getElementById(t))break;if(r){let t=document.createRange();return t.setStartBefore(r),t.setEndAfter(r),t}}}catch(t){I(t)}return null}function T(t,e){null===e?P(t):document.documentElement.style.setProperty(t,e,"important")}function P(t){document.documentElement.style.removeProperty(t)}function R(){var t=Array.prototype.slice.call(arguments).join(" ");webkit.messageHandlers.log.postMessage(t)}function C(t){I(new Error(t))}function I(t){webkit.messageHandlers.logError.postMessage({message:t.message})}window.addEventListener("scroll",x),document.addEventListener("selectionchange",(50,h=function(){webkit.messageHandlers.selectionChanged.postMessage(y())},function(){var t=this,e=arguments;clearTimeout(g),g=setTimeout((function(){h.apply(t,e),g=null}),50)}));const N=!1;function M(t){let e=k({x:t.left,y:t.top});const r=t.width,n=t.height,o=e.x,i=e.y;return{width:r,height:n,left:o,top:i,right:o+r,bottom:i+n}}function k(t){if(!frameElement)return t;let e=frameElement.getBoundingClientRect();if(!e)return t;let r=window.top.document.documentElement;return{x:t.x+e.x+r.scrollLeft,y:t.y+e.y+r.scrollTop}}function $(t,e){let r=t.getClientRects();const n=[];for(const t of r)n.push({bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width});const o=_(function(t,e){const r=new Set(t);for(const e of t)if(e.width>1&&e.height>1){for(const n of t)if(e!==n&&r.has(n)&&L(n,e,1)){G("CLIENT RECT: remove contained"),r.delete(e);break}}else G("CLIENT RECT: remove tiny"),r.delete(e);return Array.from(r)}(D(n,1,e)));for(let t=o.length-1;t>=0;t--){const e=o[t];if(!(e.width*e.height>4)){if(!(o.length>1)){G("CLIENT RECT: remove small, but keep otherwise empty!");break}G("CLIENT RECT: remove small"),o.splice(t,1)}}return G(`CLIENT RECT: reduced ${n.length} --\x3e ${o.length}`),o}function D(t,e,r){for(let n=0;nt!==i&&t!==a)),o=F(i,a);return n.push(o),D(n,e,r)}}return t}function F(t,e){const r=Math.min(t.left,e.left),n=Math.max(t.right,e.right),o=Math.min(t.top,e.top),i=Math.max(t.bottom,e.bottom);return{bottom:i,height:i-o,left:r,right:n,top:o,width:n-r}}function L(t,e,r){return B(t,e.left,e.top,r)&&B(t,e.right,e.top,r)&&B(t,e.left,e.bottom,r)&&B(t,e.right,e.bottom,r)}function B(t,e,r,n){return(t.lefte||z(t.right,e,n))&&(t.topr||z(t.bottom,r,n))}function _(t){for(let e=0;et!==e));return Array.prototype.push.apply(a,r),_(a)}}else G("replaceOverlapingRects rect1 === rect2 ??!")}return t}function W(t,e){const r=function(t,e){const r=Math.max(t.left,e.left),n=Math.min(t.right,e.right),o=Math.max(t.top,e.top),i=Math.min(t.bottom,e.bottom);return{bottom:i,height:Math.max(0,i-o),left:r,right:n,top:o,width:Math.max(0,n-r)}}(e,t);if(0===r.height||0===r.width)return[t];const n=[];{const e={bottom:t.bottom,height:0,left:t.left,right:r.left,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:r.top,height:0,left:r.left,right:r.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.left,right:r.right,top:r.bottom,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}{const e={bottom:t.bottom,height:0,left:r.right,right:t.right,top:t.top,width:0};e.width=e.right-e.left,e.height=e.bottom-e.top,0!==e.height&&0!==e.width&&n.push(e)}return n}function U(t,e,r){return(t.left=0&&z(t.left,e.right,r))&&(e.left=0&&z(e.left,t.right,r))&&(t.top=0&&z(t.top,e.bottom,r))&&(e.top=0&&z(e.top,t.bottom,r))}function z(t,e,r){return Math.abs(t-e)<=r}function G(){N&&R.apply(null,arguments)}var H,V=[],q="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(H||(H={}));var X,K=function(t){return Object.freeze(t)},Y=function(t,e){this.inlineSize=t,this.blockSize=e,K(this)},J=function(){function t(t,e,r,n){return this.x=t,this.y=e,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,K(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),Q=function(t){return t instanceof SVGElement&&"getBBox"in t},Z=function(t){if(Q(t)){var e=t.getBBox(),r=e.width,n=e.height;return!r&&!n}var o=t,i=o.offsetWidth,a=o.offsetHeight;return!(i||a||t.getClientRects().length)},tt=function(t){var e;if(t instanceof Element)return!0;var r=null===(e=null==t?void 0:t.ownerDocument)||void 0===e?void 0:e.defaultView;return!!(r&&t instanceof r.Element)},et="undefined"!=typeof window?window:{},rt=new WeakMap,nt=/auto|scroll/,ot=/^tb|vertical/,it=/msie|trident/i.test(et.navigator&&et.navigator.userAgent),at=function(t){return parseFloat(t||"0")},ut=function(t,e,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=!1),new Y((r?e:t)||0,(r?t:e)||0)},ct=K({devicePixelContentBoxSize:ut(),borderBoxSize:ut(),contentBoxSize:ut(),contentRect:new J(0,0,0,0)}),st=function(t,e){if(void 0===e&&(e=!1),rt.has(t)&&!e)return rt.get(t);if(Z(t))return rt.set(t,ct),ct;var r=getComputedStyle(t),n=Q(t)&&t.ownerSVGElement&&t.getBBox(),o=!it&&"border-box"===r.boxSizing,i=ot.test(r.writingMode||""),a=!n&&nt.test(r.overflowY||""),u=!n&&nt.test(r.overflowX||""),c=n?0:at(r.paddingTop),s=n?0:at(r.paddingRight),l=n?0:at(r.paddingBottom),f=n?0:at(r.paddingLeft),p=n?0:at(r.borderTopWidth),y=n?0:at(r.borderRightWidth),d=n?0:at(r.borderBottomWidth),h=f+s,g=c+l,m=(n?0:at(r.borderLeftWidth))+y,b=p+d,v=u?t.offsetHeight-b-t.clientHeight:0,w=a?t.offsetWidth-m-t.clientWidth:0,x=o?h+m:0,S=o?g+b:0,E=n?n.width:at(r.width)-x-w,A=n?n.height:at(r.height)-S-v,O=E+h+w+m,j=A+g+v+b,T=K({devicePixelContentBoxSize:ut(Math.round(E*devicePixelRatio),Math.round(A*devicePixelRatio),i),borderBoxSize:ut(O,j,i),contentBoxSize:ut(E,A,i),contentRect:new J(f,c,E,A)});return rt.set(t,T),T},lt=function(t,e,r){var n=st(t,r),o=n.borderBoxSize,i=n.contentBoxSize,a=n.devicePixelContentBoxSize;switch(e){case H.DEVICE_PIXEL_CONTENT_BOX:return a;case H.BORDER_BOX:return o;default:return i}},ft=function(t){var e=st(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=K([e.borderBoxSize]),this.contentBoxSize=K([e.contentBoxSize]),this.devicePixelContentBoxSize=K([e.devicePixelContentBoxSize])},pt=function(t){if(Z(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},yt=function(){var t=1/0,e=[];V.forEach((function(r){if(0!==r.activeTargets.length){var n=[];r.activeTargets.forEach((function(e){var r=new ft(e.target),o=pt(e.target);n.push(r),e.lastReportedSize=lt(e.target,e.observedBox),ot?e.activeTargets.push(r):e.skippedTargets.push(r))}))}))},ht=[],gt=0,mt={attributes:!0,characterData:!0,childList:!0,subtree:!0},bt=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],vt=function(t){return void 0===t&&(t=0),Date.now()+t},wt=!1,xt=function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var e=this;if(void 0===t&&(t=250),!wt){wt=!0;var r,n=vt(t);r=function(){var r=!1;try{r=function(){var t,e=0;for(dt(e);V.some((function(t){return t.activeTargets.length>0}));)e=yt(),dt(e);return V.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:q}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=q),window.dispatchEvent(t)),e>0}()}finally{if(wt=!1,t=n-vt(),!gt)return;r?e.run(1e3):t>0?e.run(t):e.start()}},function(t){if(!X){var e=0,r=document.createTextNode("");new MutationObserver((function(){return ht.splice(0).forEach((function(t){return t()}))})).observe(r,{characterData:!0}),X=function(){r.textContent="".concat(e?e--:e++)}}ht.push(t),X()}((function(){requestAnimationFrame(r)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,mt)};document.body?e():et.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),bt.forEach((function(e){return et.addEventListener(e,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),bt.forEach((function(e){return et.removeEventListener(e,t.listener,!0)})),this.stopped=!0)},t}(),St=new xt,Et=function(t){!gt&&t>0&&St.start(),!(gt+=t)&&St.stop()},At=function(){function t(t,e){this.target=t,this.observedBox=e||H.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=lt(this.target,this.observedBox,!0);return t=this.target,Q(t)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),Ot=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},jt=new WeakMap,Tt=function(t,e){for(var r=0;r=0&&(o&&V.splice(V.indexOf(r),1),r.observationTargets.splice(n,1),Et(-1))},t.disconnect=function(t){var e=this,r=jt.get(t);r.observationTargets.slice().forEach((function(r){return e.unobserve(t,r.target)})),r.activeTargets.splice(0,r.activeTargets.length)},t}(),Rt=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Pt.connect(this,t)}return t.prototype.observe=function(t,e){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!tt(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Pt.observe(this,t,e)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!tt(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Pt.unobserve(this,t)},t.prototype.disconnect=function(){Pt.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();const Ct=window.ResizeObserver||Rt;let It=new Map,Nt=new Map;var Mt=0;function kt(t){if(0===Nt.size)return null;for(const[e,r]of Nt)if(r.isActivable())for(const n of r.items.reverse())if(n.clickableElements)for(const r of n.clickableElements){let o=r.getBoundingClientRect().toJSON();if(B(o,t.clientX,t.clientY,1))return{group:e,item:n,element:r,rect:o}}return null}function $t(t){return t&&t instanceof Element}window.addEventListener("load",(function(){const t=document.body;var e={width:0,height:0};new Ct((()=>{e.width===t.clientWidth&&e.height===t.clientHeight||(e={width:t.clientWidth,height:t.clientHeight},Nt.forEach((function(t){t.requestLayout()})))})).observe(t)}),!1);const Dt={NONE:"",DESCENDANT:" ",CHILD:" > "},Ft={id:"id",class:"class",tag:"tag",attribute:"attribute",nthchild:"nthchild",nthoftype:"nthoftype"},Lt="CssSelectorGenerator";function Bt(t="unknown problem",...e){console.warn(`${Lt}: ${t}`,...e)}const _t={selectors:[Ft.id,Ft.class,Ft.tag,Ft.attribute],includeTag:!1,whitelist:[],blacklist:[],combineWithinSelector:!0,combineBetweenSelectors:!0,root:null,maxCombinations:Number.POSITIVE_INFINITY,maxCandidates:Number.POSITIVE_INFINITY};function Wt(t){return t instanceof RegExp}function Ut(t){return["string","function"].includes(typeof t)||Wt(t)}function zt(t){return Array.isArray(t)?t.filter(Ut):[]}function Gt(t){const e=[Node.DOCUMENT_NODE,Node.DOCUMENT_FRAGMENT_NODE,Node.ELEMENT_NODE];return function(t){return t instanceof Node}(t)&&e.includes(t.nodeType)}function Ht(t,e){if(Gt(t))return t.contains(e)||Bt("element root mismatch","Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will nto work as intended."),t;const r=e.getRootNode({composed:!1});return Gt(r)?(r!==document&&Bt("shadow root inferred","You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended."),r):e.ownerDocument.querySelector(":root")}function Vt(t){return"number"==typeof t?t:Number.POSITIVE_INFINITY}function qt(t=[]){const[e=[],...r]=t;return 0===r.length?e:r.reduce(((t,e)=>t.filter((t=>e.includes(t)))),e)}function Xt(t){return[].concat(...t)}function Kt(t){const e=t.map((t=>{if(Wt(t))return e=>t.test(e);if("function"==typeof t)return e=>{const r=t(e);return"boolean"!=typeof r?(Bt("pattern matcher function invalid","Provided pattern matching function does not return boolean. It's result will be ignored.",t),!1):r};if("string"==typeof t){const e=new RegExp("^"+t.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".+")+"$");return t=>e.test(t)}return Bt("pattern matcher invalid","Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.",t),()=>!1}));return t=>e.some((e=>e(t)))}function Yt(t,e,r){const n=Array.from(Ht(r,t[0]).querySelectorAll(e));return n.length===t.length&&t.every((t=>n.includes(t)))}function Jt(t,e){e=null!=e?e:function(t){return t.ownerDocument.querySelector(":root")}(t);const r=[];let n=t;for(;$t(n)&&n!==e;)r.push(n),n=n.parentElement;return r}function Qt(t,e){return qt(t.map((t=>Jt(t,e))))}const Zt=new RegExp(["^$","\\s"].join("|")),te=new RegExp(["^$"].join("|")),ee=[Ft.nthoftype,Ft.tag,Ft.id,Ft.class,Ft.attribute,Ft.nthchild],re=Kt(["class","id","ng-*"]);function ne({name:t}){return`[${t}]`}function oe({name:t,value:e}){return`[${t}='${e}']`}function ie({nodeName:t,nodeValue:e}){return{name:(r=t,r.replace(/:/g,"\\:")),value:be(e)};var r}function ae(t){const e=Array.from(t.attributes).filter((e=>function({nodeName:t},e){const r=e.tagName.toLowerCase();return!(["input","option"].includes(r)&&"value"===t||re(t))}(e,t))).map(ie);return[...e.map(ne),...e.map(oe)]}function ue(t){return(t.getAttribute("class")||"").trim().split(/\s+/).filter((t=>!te.test(t))).map((t=>`.${be(t)}`))}function ce(t){const e=t.getAttribute("id")||"",r=`#${be(e)}`,n=t.getRootNode({composed:!1});return!Zt.test(e)&&Yt([t],r,n)?[r]:[]}function se(t){const e=t.parentNode;if(e){const r=Array.from(e.childNodes).filter($t).indexOf(t);if(r>-1)return[`:nth-child(${r+1})`]}return[]}function le(t){return[be(t.tagName.toLowerCase())]}function fe(t){const e=[...new Set(Xt(t.map(le)))];return 0===e.length||e.length>1?[]:[e[0]]}function pe(t){const e=fe([t])[0],r=t.parentElement;if(r){const n=Array.from(r.children).filter((t=>t.tagName.toLowerCase()===e)),o=n.indexOf(t);if(o>-1)return[`${e}:nth-of-type(${o+1})`]}return[]}function ye(t=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){return Array.from(function*(t=[],{maxResults:e=Number.POSITIVE_INFINITY}={}){let r=0,n=he(1);for(;n.length<=t.length&&rt[e]));yield e,n=de(n,t.length-1)}}(t,{maxResults:e}))}function de(t=[],e=0){const r=t.length;if(0===r)return[];const n=[...t];n[r-1]+=1;for(let t=r-1;t>=0;t--)if(n[t]>e){if(0===t)return he(r+1);n[t-1]++,n[t]=n[t-1]+1}return n[r-1]>e?he(r+1):n}function he(t=1){return Array.from(Array(t).keys())}const ge=":".charCodeAt(0).toString(16).toUpperCase(),me=/[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;function be(t=""){var e,r;return null!==(r=null===(e=null===CSS||void 0===CSS?void 0:CSS.escape)||void 0===e?void 0:e.call(CSS,t))&&void 0!==r?r:function(t=""){return t.split("").map((t=>":"===t?`\\${ge} `:me.test(t)?`\\${t}`:escape(t).replace(/%/g,"\\"))).join("")}(t)}const ve={tag:fe,id:function(t){return 0===t.length||t.length>1?[]:ce(t[0])},class:function(t){return qt(t.map(ue))},attribute:function(t){return qt(t.map(ae))},nthchild:function(t){return qt(t.map(se))},nthoftype:function(t){return qt(t.map(pe))}},we={tag:le,id:ce,class:ue,attribute:ae,nthchild:se,nthoftype:pe};function xe(t){return t.includes(Ft.tag)||t.includes(Ft.nthoftype)?[...t]:[...t,Ft.tag]}function Se(t={}){const e=[...ee];return t[Ft.tag]&&t[Ft.nthoftype]&&e.splice(e.indexOf(Ft.tag),1),e.map((e=>{return(n=t)[r=e]?n[r].join(""):"";var r,n})).join("")}function Ee(t,e,r="",n){const o=function(t,e){return""===e?t:function(t,e){return[...t.map((t=>e+Dt.DESCENDANT+t)),...t.map((t=>e+Dt.CHILD+t))]}(t,e)}(function(t,e,r){const n=function(t,e){const{blacklist:r,whitelist:n,combineWithinSelector:o,maxCombinations:i}=e,a=Kt(r),u=Kt(n);return function(t){const{selectors:e,includeTag:r}=t,n=[].concat(e);return r&&!n.includes("tag")&&n.push("tag"),n}(e).reduce(((e,r)=>{const n=function(t,e){var r;return(null!==(r=ve[e])&&void 0!==r?r:()=>[])(t)}(t,r),c=function(t=[],e,r){return t.filter((t=>r(t)||!e(t)))}(n,a,u),s=function(t=[],e){return t.sort(((t,r)=>{const n=e(t),o=e(r);return n&&!o?-1:!n&&o?1:0}))}(c,u);return e[r]=o?ye(s,{maxResults:i}):s.map((t=>[t])),e}),{})}(t,r),o=function(t,e){return function(t){const{selectors:e,combineBetweenSelectors:r,includeTag:n,maxCandidates:o}=t,i=r?ye(e,{maxResults:o}):e.map((t=>[t]));return n?i.map(xe):i}(e).map((e=>function(t,e){const r={};return t.forEach((t=>{const n=e[t];n.length>0&&(r[t]=n)})),function(t={}){let e=[];return Object.entries(t).forEach((([t,r])=>{e=r.flatMap((r=>0===e.length?[{[t]:r}]:e.map((e=>Object.assign(Object.assign({},e),{[t]:r})))))})),e}(r).map(Se)}(e,t))).filter((t=>t.length>0))}(n,r),i=Xt(o);return[...new Set(i)]}(t,n.root,n),r);for(const e of o)if(Yt(t,e,n.root))return e;return null}function Ae(t){return{value:t,include:!1}}function Oe({selectors:t,operator:e}){let r=[...ee];t[Ft.tag]&&t[Ft.nthoftype]&&(r=r.filter((t=>t!==Ft.tag)));let n="";return r.forEach((e=>{(t[e]||[]).forEach((({value:t,include:e})=>{e&&(n+=t)}))})),e+n}function je(t){return[":root",...Jt(t).reverse().map((t=>{const e=function(t,e,r=Dt.NONE){const n={};return e.forEach((e=>{Reflect.set(n,e,function(t,e){return we[e](t)}(t,e).map(Ae))})),{element:t,operator:r,selectors:n}}(t,[Ft.nthchild],Dt.CHILD);return e.selectors.nthchild.forEach((t=>{t.include=!0})),e})).map(Oe)].join("")}function Te(t,e={}){const r=function(t){(t instanceof NodeList||t instanceof HTMLCollection)&&(t=Array.from(t));const e=(Array.isArray(t)?t:[t]).filter($t);return[...new Set(e)]}(t),n=function(t,e={}){const r=Object.assign(Object.assign({},_t),e);return{selectors:(n=r.selectors,Array.isArray(n)?n.filter((t=>{return e=Ft,r=t,Object.values(e).includes(r);var e,r})):[]),whitelist:zt(r.whitelist),blacklist:zt(r.blacklist),root:Ht(r.root,t),combineWithinSelector:!!r.combineWithinSelector,combineBetweenSelectors:!!r.combineBetweenSelectors,includeTag:!!r.includeTag,maxCombinations:Vt(r.maxCombinations),maxCandidates:Vt(r.maxCandidates)};var n}(r[0],e);let o="",i=n.root;function a(){return function(t,e,r="",n){if(0===t.length)return null;const o=[t.length>1?t:[],...Qt(t,e).map((t=>[t]))];for(const t of o){const e=Ee(t,0,r,n);if(e)return{foundElements:t,selector:e}}return null}(r,i,o,n)}let u=a();for(;u;){const{foundElements:t,selector:e}=u;if(Yt(r,e,n.root))return e;i=t[0],o=e,u=a()}return r.length>1?r.map((t=>Te(t,n))).join(", "):function(t){return t.map(je).join(", ")}(r)}function Pe(t){return null==t?null:-1!==["a","audio","button","canvas","details","input","label","option","select","submit","textarea","video"].indexOf(t.nodeName.toLowerCase())||t.hasAttribute("contenteditable")&&"false"!=t.getAttribute("contenteditable").toLowerCase()?t.outerHTML:t.parentElement?Pe(t.parentElement):null}function Re(t){for(var e=0;e0&&e.top0&&e.left{Le(t)||(Be(t),_e("down",t))})),window.addEventListener("keyup",(t=>{Le(t)||(Be(t),_e("up",t))})),r.g.readium={scrollToId:function(t){let e=document.getElementById(t);return!!e&&(E(e.getBoundingClientRect()),!0)},scrollToPosition:function(t,e){if(t<0||t>1)console.error(`Expected a valid progression in scrollToPosition, got ${t}`);else if(S()){let e=document.scrollingElement.scrollHeight*t;document.scrollingElement.scrollTop=e}else{let r=document.scrollingElement.scrollWidth*t*("rtl"==e?-1:1);document.scrollingElement.scrollLeft=O(r)}},scrollToLocator:function(t){let e=j(t);return!!e&&function(t){return E(t.getBoundingClientRect())}(e)},scrollLeft:function(t){var e="rtl"==t,r=document.scrollingElement.scrollWidth,n=window.innerWidth,o=window.scrollX-n,i=e?-(r-n):0;return A(Math.max(o,i))},scrollRight:function(t){var e="rtl"==t,r=document.scrollingElement.scrollWidth,n=window.innerWidth,o=window.scrollX+n,i=e?0:r-n;return A(Math.min(o,i))},setCSSProperties:function(t){for(const e in t)T(e,t[e])},setProperty:T,removeProperty:P,registerDecorationTemplates:function(t){var e="";for(const[r,n]of Object.entries(t))It.set(r,n),n.stylesheet&&(e+=n.stylesheet+"\n");if(e){let t=document.createElement("style");t.innerHTML=e,document.getElementsByTagName("head")[0].appendChild(t)}},getDecorations:function(t){var e=Nt.get(t);return e||(e=function(t,e){var r=[],n=0,o=null,i=!1;function a(e){let o=t+"-"+n++,i=j(e.locator);if(!i)return void R("Can't locate DOM range for decoration",e);let a={id:o,decoration:e,range:i};r.push(a),c(a)}function u(t){let e=r.findIndex((e=>e.decoration.id===t));if(-1===e)return;let n=r[e];r.splice(e,1),n.clickableElements=null,n.container&&(n.container.remove(),n.container=null)}function c(r){let n=(o||((o=document.createElement("div")).setAttribute("id",t),o.setAttribute("data-group",e),o.style.setProperty("pointer-events","none"),requestAnimationFrame((function(){null!=o&&document.body.append(o)}))),o),i=It.get(r.decoration.style);if(!i)return void C(`Unknown decoration style: ${r.decoration.style}`);let a=document.createElement("div");a.setAttribute("id",r.id),a.setAttribute("data-style",r.decoration.style),a.style.setProperty("pointer-events","none");let u=window.innerWidth,c=parseInt(getComputedStyle(document.documentElement).getPropertyValue("column-count")),s=u/(c||1),l=document.scrollingElement,f=l.scrollLeft,p=l.scrollTop;function y(t,e,r){if(t.style.position="absolute","wrap"===i.width)t.style.width=`${e.width}px`,t.style.height=`${e.height}px`,t.style.left=`${e.left+f}px`,t.style.top=`${e.top+p}px`;else if("viewport"===i.width){t.style.width=`${u}px`,t.style.height=`${e.height}px`;let r=Math.floor(e.left/u)*u;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}else if("bounds"===i.width)t.style.width=`${r.width}px`,t.style.height=`${e.height}px`,t.style.left=`${r.left+f}px`,t.style.top=`${e.top+p}px`;else if("page"===i.width){t.style.width=`${s}px`,t.style.height=`${e.height}px`;let r=Math.floor(e.left/s)*s;t.style.left=`${r+f}px`,t.style.top=`${e.top+p}px`}}let d,h=r.range.getBoundingClientRect();try{let t=document.createElement("template");t.innerHTML=r.decoration.element.trim(),d=t.content.firstElementChild}catch(t){return void C(`Invalid decoration element "${r.decoration.element}": ${t.message}`)}if("boxes"===i.layout){let t=!0,e=$(r.range,t);e=e.sort(((t,e)=>t.tope.top?1:0));for(let t of e){const e=d.cloneNode(!0);e.style.setProperty("pointer-events","none"),y(e,t,h),a.append(e)}}else if("bounds"===i.layout){const t=d.cloneNode(!0);t.style.setProperty("pointer-events","none"),y(t,h,h),a.append(t)}n.append(a),r.container=a,r.clickableElements=Array.from(a.querySelectorAll("[data-activable='1']")),0===r.clickableElements.length&&(r.clickableElements=Array.from(a.children))}function s(){o&&(o.remove(),o=null)}return{add:a,remove:u,update:function(t){u(t.id),a(t)},clear:function(){s(),r.length=0},items:r,requestLayout:function(){s(),r.forEach((t=>c(t)))},isActivable:function(){return i},setActivable:function(){i=!0}}}("r2-decoration-"+Mt++,t),Nt.set(t,e)),e},findFirstVisibleLocator:function(){const t=Re(document.body);return{href:"#",type:"application/xhtml+xml",locations:{cssSelector:Te(t)},text:{highlight:t.textContent}}}},window.readium.isReflowable=!0,webkit.messageHandlers.spreadLoadStarted.postMessage({}),window.addEventListener("load",(function(){window.requestAnimationFrame((function(){webkit.messageHandlers.spreadLoaded.postMessage({})}));let t=document.createElement("meta");t.setAttribute("name","viewport"),t.setAttribute("content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no"),document.head.appendChild(t)}))})()})(); //# sourceMappingURL=readium-reflowable.js.map \ No newline at end of file diff --git a/Sources/Navigator/EPUB/Scripts/src/utils.js b/Sources/Navigator/EPUB/Scripts/src/utils.js index 415a1fe67..f8765cfab 100644 --- a/Sources/Navigator/EPUB/Scripts/src/utils.js +++ b/Sources/Navigator/EPUB/Scripts/src/utils.js @@ -25,22 +25,28 @@ window.addEventListener( window.addEventListener( "load", function () { + var pendingResize; const observer = new ResizeObserver(() => { - appendVirtualColumnIfNeeded(); - onScroll(); - }); - observer.observe(document.body); + if (pendingResize) { + window.cancelAnimationFrame(pendingResize); + } - // on page load - window.addEventListener("orientationchange", function () { - orientationChanged(); - snapCurrentPosition(); + pendingResize = window.requestAnimationFrame(function () { + onViewportWidthChanged(); + onScroll(); + }); }); - orientationChanged(); + observer.observe(document.body); }, false ); +function onViewportWidthChanged() { + viewportWidth = window.innerWidth; + appendVirtualColumnIfNeeded(); + snapCurrentPosition(); +} + /** * Having an odd number of columns when displaying two columns per screen causes snapping and page * turning issues. To fix this, we insert a blank virtual column at the end of the resource. @@ -72,7 +78,7 @@ function appendVirtualColumnIfNeeded() { var last_known_scrollX_position = 0; var last_known_scrollY_position = 0; var ticking = false; -var maxScreenX = 0; +var viewportWidth = 0; // Position in range [0 - 1]. function update(position) { @@ -122,13 +128,6 @@ document.addEventListener( }) ); -function orientationChanged() { - maxScreenX = - window.orientation === 0 || window.orientation == 180 - ? screen.width - : screen.height; -} - export function getColumnCountPerScreen() { return parseInt( window @@ -155,16 +154,16 @@ export function scrollToId(id) { // Position must be in the range [0 - 1], 0-100%. export function scrollToPosition(position, dir) { - console.log("ScrollToPosition"); if (position < 0 || position > 1) { - console.log("InvalidPosition"); + console.error( + `Expected a valid progression in scrollToPosition, got ${position}` + ); return; } if (isScrollModeEnabled()) { let offset = document.scrollingElement.scrollHeight * position; document.scrollingElement.scrollTop = offset; - // window.scrollTo(0, offset); } else { var documentWidth = document.scrollingElement.scrollWidth; var factor = dir == "rtl" ? -1 : 1; @@ -236,7 +235,7 @@ function scrollToOffset(offset) { function snapOffset(offset) { var value = offset + 1; - return value - (value % maxScreenX); + return value - (value % viewportWidth); } function snapCurrentPosition() {