(self.webpackChunkchat=self.webpackChunkchat||[]).push([[566],{4935:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,o="RFC3986";e.exports={default:o,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:o}},2431:(e,t,r)=>{"use strict";var o=r(4748),n=r(9088),i=r(4935);e.exports={formats:i,parse:n,stringify:o}},9088:(e,t,r)=>{"use strict";var o=r(4761),n=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:o.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},c=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},p=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},l=function(e,t,r,o){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,c=r.depth>0&&/(\[[^[\]]*])/.exec(i),l=c?i.slice(0,c.index):i,u=[];if(l){if(!r.plainObjects&&n.call(Object.prototype,l)&&!r.allowPrototypes)return;u.push(l)}for(var s=0;r.depth>0&&null!==(c=a.exec(i))&&s=0;--i){var a,c=e[i];if("[]"===c&&r.parseArrays)a=[].concat(n);else{a=r.plainObjects?Object.create(null):{};var l="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,u=parseInt(l,10);r.parseArrays||""!==l?!isNaN(u)&&c!==l&&String(u)===l&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(a=[])[u]=n:"__proto__"!==l&&(a[l]=n):a={0:n}}n=a}return n}(u,t,r,o)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||o.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var r,l={__proto__:null},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,s=t.parameterLimit===1/0?void 0:t.parameterLimit,f=u.split(t.delimiter,s),y=-1,d=t.charset;if(t.charsetSentinel)for(r=0;r-1&&(h=i(h)?[h]:h),n.call(l,g)?l[g]=o.combine(l[g],h):l[g]=h}return l}(e,r):e,s=r.plainObjects?Object.create(null):{},f=Object.keys(u),y=0;y{"use strict";var o=r(7478),n=r(4761),i=r(4935),a=Object.prototype.hasOwnProperty,c={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},p=Array.isArray,l=Array.prototype.push,u=function(e,t){l.apply(e,p(t)?t:[t])},s=Date.prototype.toISOString,f=i.default,y={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:f,formatter:i.formatters[f],indices:!1,serializeDate:function(e){return s.call(e)},skipNulls:!1,strictNullHandling:!1},d={},g=function e(t,r,i,a,c,l,s,f,g,h,m,b,v,S,j,A){for(var w,P=t,O=A,E=0,x=!1;void 0!==(O=O.get(d))&&!x;){var I=O.get(t);if(E+=1,void 0!==I){if(I===E)throw new RangeError("Cyclic object value");x=!0}void 0===O.get(d)&&(E=0)}if("function"==typeof f?P=f(r,P):P instanceof Date?P=m(P):"comma"===i&&p(P)&&(P=n.maybeMap(P,(function(e){return e instanceof Date?m(e):e}))),null===P){if(c)return s&&!S?s(r,y.encoder,j,"key",b):r;P=""}if("string"==typeof(w=P)||"number"==typeof w||"boolean"==typeof w||"symbol"==typeof w||"bigint"==typeof w||n.isBuffer(P))return s?[v(S?r:s(r,y.encoder,j,"key",b))+"="+v(s(P,y.encoder,j,"value",b))]:[v(r)+"="+v(String(P))];var k,R=[];if(void 0===P)return R;if("comma"===i&&p(P))S&&s&&(P=n.maybeMap(P,s)),k=[{value:P.length>0?P.join(",")||null:void 0}];else if(p(f))k=f;else{var _=Object.keys(P);k=g?_.sort(g):_}for(var D=a&&p(P)&&1===P.length?r+"[]":r,F=0;F0?j+S:""}},4761:(e,t,r)=>{"use strict";var o=r(4935),n=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),c=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},o=0;o1;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var o=[],n=0;n=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||i===o.RFC1738&&(40===u||41===u)?p+=c.charAt(l):u<128?p+=a[u]:u<2048?p+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?p+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(l+=1,u=65536+((1023&u)<<10|1023&c.charCodeAt(l)),p+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return p},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],o=0;o{"use strict";var o=r(210),n=r(5559),i=n(o("String.prototype.indexOf"));e.exports=function(e,t){var r=o(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?n(r):r}},5559:(e,t,r)=>{"use strict";var o=r(8612),n=r(210),i=n("%Function.prototype.apply%"),a=n("%Function.prototype.call%"),c=n("%Reflect.apply%",!0)||o.call(a,i),p=n("%Object.getOwnPropertyDescriptor%",!0),l=n("%Object.defineProperty%",!0),u=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){var t=c(o,a,arguments);return p&&l&&p(t,"length").configurable&&l(t,"length",{value:1+u(0,e.length-(arguments.length-1))}),t};var s=function(){return c(o,i,arguments)};l?l(e.exports,"apply",{value:s}):e.exports.apply=s},7648:e=>{"use strict";var t=Array.prototype.slice,r=Object.prototype.toString;e.exports=function(e){var o=this;if("function"!=typeof o||"[object Function]"!==r.call(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var n,i=t.call(arguments,1),a=Math.max(0,o.length-i.length),c=[],p=0;p{"use strict";var o=r(7648);e.exports=Function.prototype.bind||o},210:(e,t,r)=>{"use strict";var o,n=SyntaxError,i=Function,a=TypeError,c=function(e){try{return i('"use strict"; return ('+e+").constructor;")()}catch(e){}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch(e){p=null}var l=function(){throw new a},u=p?function(){try{return l}catch(e){try{return p(arguments,"callee").get}catch(e){return l}}}():l,s=r(1405)(),f=r(8185)(),y=Object.getPrototypeOf||(f?function(e){return e.__proto__}:null),d={},g="undefined"!=typeof Uint8Array&&y?y(Uint8Array):o,h={"%AggregateError%":"undefined"==typeof AggregateError?o:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?o:ArrayBuffer,"%ArrayIteratorPrototype%":s&&y?y([][Symbol.iterator]()):o,"%AsyncFromSyncIteratorPrototype%":o,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?o:Atomics,"%BigInt%":"undefined"==typeof BigInt?o:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?o:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?o:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?o:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?o:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?o:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?o:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?o:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?o:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?o:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":s&&y?y(y([][Symbol.iterator]())):o,"%JSON%":"object"==typeof JSON?JSON:o,"%Map%":"undefined"==typeof Map?o:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&s&&y?y((new Map)[Symbol.iterator]()):o,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?o:Promise,"%Proxy%":"undefined"==typeof Proxy?o:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?o:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?o:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&s&&y?y((new Set)[Symbol.iterator]()):o,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?o:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":s&&y?y(""[Symbol.iterator]()):o,"%Symbol%":s?Symbol:o,"%SyntaxError%":n,"%ThrowTypeError%":u,"%TypedArray%":g,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?o:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?o:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?o:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?o:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?o:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?o:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?o:WeakSet};if(y)try{null.error}catch(e){var m=y(y(e));h["%Error.prototype%"]=m}var b=function e(t){var r;if("%AsyncFunction%"===t)r=c("async function () {}");else if("%GeneratorFunction%"===t)r=c("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=c("async function* () {}");else if("%AsyncGenerator%"===t){var o=e("%AsyncGeneratorFunction%");o&&(r=o.prototype)}else if("%AsyncIteratorPrototype%"===t){var n=e("%AsyncGenerator%");n&&y&&(r=y(n.prototype))}return h[t]=r,r},v={"%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"]},S=r(8612),j=r(7642),A=S.call(Function.call,Array.prototype.concat),w=S.call(Function.apply,Array.prototype.splice),P=S.call(Function.call,String.prototype.replace),O=S.call(Function.call,String.prototype.slice),E=S.call(Function.call,RegExp.prototype.exec),x=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,I=/\\(\\)?/g,k=function(e,t){var r,o=e;if(j(v,o)&&(o="%"+(r=v[o])[0]+"%"),j(h,o)){var i=h[o];if(i===d&&(i=b(o)),void 0===i&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:o,value:i}}throw new n("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===E(/^%?[^%]*%?$/,e))throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=O(e,0,1),r=O(e,-1);if("%"===t&&"%"!==r)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new n("invalid intrinsic syntax, expected opening `%`");var o=[];return P(e,x,(function(e,t,r,n){o[o.length]=r?P(n,I,"$1"):t||e})),o}(e),o=r.length>0?r[0]:"",i=k("%"+o+"%",t),c=i.name,l=i.value,u=!1,s=i.alias;s&&(o=s[0],w(r,A([0,1],s)));for(var f=1,y=!0;f=r.length){var b=p(l,d);l=(y=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:l[d]}else y=j(l,d),l=l[d];y&&!u&&(h[c]=l)}}return l}},8185:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},1405:(e,t,r)=>{"use strict";var o="undefined"!=typeof Symbol&&Symbol,n=r(5419);e.exports=function(){return"function"==typeof o&&"function"==typeof Symbol&&"symbol"==typeof o("foo")&&"symbol"==typeof Symbol("bar")&&n()}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var n=Object.getOwnPropertyDescriptor(e,t);if(42!==n.value||!0!==n.enumerable)return!1}return!0}},7642:(e,t,r)=>{"use strict";var o=r(8612);e.exports=o.call(Function.call,Object.prototype.hasOwnProperty)},631:(e,t,r)=>{var o="function"==typeof Map&&Map.prototype,n=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=o&&n&&"function"==typeof n.get?n.get:null,a=o&&Map.prototype.forEach,c="function"==typeof Set&&Set.prototype,p=Object.getOwnPropertyDescriptor&&c?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,l=c&&p&&"function"==typeof p.get?p.get:null,u=c&&Set.prototype.forEach,s="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,y="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,d=Boolean.prototype.valueOf,g=Object.prototype.toString,h=Function.prototype.toString,m=String.prototype.match,b=String.prototype.slice,v=String.prototype.replace,S=String.prototype.toUpperCase,j=String.prototype.toLowerCase,A=RegExp.prototype.test,w=Array.prototype.concat,P=Array.prototype.join,O=Array.prototype.slice,E=Math.floor,x="function"==typeof BigInt?BigInt.prototype.valueOf:null,I=Object.getOwnPropertySymbols,k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,R="function"==typeof Symbol&&"object"==typeof Symbol.iterator,_="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,F=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function N(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||A.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var o=e<0?-E(-e):E(e);if(o!==e){var n=String(o),i=b.call(t,n.length+1);return v.call(n,r,"$&_")+"."+v.call(v.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return v.call(t,r,"$&_")}var U=r(4654),M=U.custom,$=W(M)?M:null;function L(e,t,r){var o="double"===(r.quoteStyle||t)?'"':"'";return o+e+o}function T(e){return v.call(String(e),/"/g,""")}function B(e){return!("[object Array]"!==V(e)||_&&"object"==typeof e&&_ in e)}function C(e){return!("[object RegExp]"!==V(e)||_&&"object"==typeof e&&_ in e)}function W(e){if(R)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!k)return!1;try{return k.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,o,n){var c=r||{};if(H(c,"quoteStyle")&&"single"!==c.quoteStyle&&"double"!==c.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(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 p=!H(c,"customInspect")||c.customInspect;if("boolean"!=typeof p&&"symbol"!==p)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(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(H(c,"numericSeparator")&&"boolean"!=typeof c.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g=c.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return Q(t,c);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var S=String(t);return g?N(t,S):S}if("bigint"==typeof t){var A=String(t)+"n";return g?N(t,A):A}var E=void 0===c.depth?5:c.depth;if(void 0===o&&(o=0),o>=E&&E>0&&"object"==typeof t)return B(t)?"[Array]":"[Object]";var I,M=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=P.call(Array(e.indent+1)," ")}return{base:r,prev:P.call(Array(t+1),r)}}(c,o);if(void 0===n)n=[];else if(q(n,t)>=0)return"[Circular]";function G(t,r,i){if(r&&(n=O.call(n)).push(r),i){var a={depth:c.depth};return H(c,"quoteStyle")&&(a.quoteStyle=c.quoteStyle),e(t,a,o+1,n)}return e(t,c,o+1,n)}if("function"==typeof t&&!C(t)){var z=function(e){if(e.name)return e.name;var t=m.call(h.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),ee=Z(t,G);return"[Function"+(z?": "+z:" (anonymous)")+"]"+(ee.length>0?" { "+P.call(ee,", ")+" }":"")}if(W(t)){var te=R?v.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):k.call(t);return"object"!=typeof t||R?te:J(te)}if((I=t)&&"object"==typeof I&&("undefined"!=typeof HTMLElement&&I instanceof HTMLElement||"string"==typeof I.nodeName&&"function"==typeof I.getAttribute)){for(var re="<"+j.call(String(t.nodeName)),oe=t.attributes||[],ne=0;ne"}if(B(t)){if(0===t.length)return"[]";var ie=Z(t,G);return M&&!function(e){for(var t=0;t=0)return!1;return!0}(ie)?"["+K(ie,M)+"]":"[ "+P.call(ie,", ")+" ]"}if(function(e){return!("[object Error]"!==V(e)||_&&"object"==typeof e&&_ in e)}(t)){var ae=Z(t,G);return"cause"in Error.prototype||!("cause"in t)||D.call(t,"cause")?0===ae.length?"["+String(t)+"]":"{ ["+String(t)+"] "+P.call(ae,", ")+" }":"{ ["+String(t)+"] "+P.call(w.call("[cause]: "+G(t.cause),ae),", ")+" }"}if("object"==typeof t&&p){if($&&"function"==typeof t[$]&&U)return U(t,{depth:E-o});if("symbol"!==p&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{l.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var ce=[];return a&&a.call(t,(function(e,r){ce.push(G(r,t,!0)+" => "+G(e,t))})),Y("Map",i.call(t),ce,M)}if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{l.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var pe=[];return u&&u.call(t,(function(e){pe.push(G(e,t))})),Y("Set",l.call(t),pe,M)}if(function(e){if(!s||!e||"object"!=typeof e)return!1;try{s.call(e,s);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return X("WeakMap");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{s.call(e,s)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return X("WeakSet");if(function(e){if(!y||!e||"object"!=typeof e)return!1;try{return y.call(e),!0}catch(e){}return!1}(t))return X("WeakRef");if(function(e){return!("[object Number]"!==V(e)||_&&"object"==typeof e&&_ in e)}(t))return J(G(Number(t)));if(function(e){if(!e||"object"!=typeof e||!x)return!1;try{return x.call(e),!0}catch(e){}return!1}(t))return J(G(x.call(t)));if(function(e){return!("[object Boolean]"!==V(e)||_&&"object"==typeof e&&_ in e)}(t))return J(d.call(t));if(function(e){return!("[object String]"!==V(e)||_&&"object"==typeof e&&_ in e)}(t))return J(G(String(t)));if(!function(e){return!("[object Date]"!==V(e)||_&&"object"==typeof e&&_ in e)}(t)&&!C(t)){var le=Z(t,G),ue=F?F(t)===Object.prototype:t instanceof Object||t.constructor===Object,se=t instanceof Object?"":"null prototype",fe=!ue&&_&&Object(t)===t&&_ in t?b.call(V(t),8,-1):se?"Object":"",ye=(ue||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(fe||se?"["+P.call(w.call([],fe||[],se||[]),": ")+"] ":"");return 0===le.length?ye+"{}":M?ye+"{"+K(le,M)+"}":ye+"{ "+P.call(le,", ")+" }"}return String(t)};var G=Object.prototype.hasOwnProperty||function(e){return e in this};function H(e,t){return G.call(e,t)}function V(e){return g.call(e)}function q(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,o=e.length;rt.maxStringLength){var r=e.length-t.maxStringLength,o="... "+r+" more character"+(r>1?"s":"");return Q(b.call(e,0,t.maxStringLength),t)+o}return L(v.call(v.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,z),"single",t)}function z(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+S.call(t.toString(16))}function J(e){return"Object("+e+")"}function X(e){return e+" { ? }"}function Y(e,t,r,o){return e+" ("+t+") {"+(o?K(r,o):P.call(r,", "))+"}"}function K(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+P.call(e,","+r)+"\n"+t.prev}function Z(e,t){var r=B(e),o=[];if(r){o.length=e.length;for(var n=0;n{"use strict";var o=r(210),n=r(1924),i=r(631),a=o("%TypeError%"),c=o("%WeakMap%",!0),p=o("%Map%",!0),l=n("WeakMap.prototype.get",!0),u=n("WeakMap.prototype.set",!0),s=n("WeakMap.prototype.has",!0),f=n("Map.prototype.get",!0),y=n("Map.prototype.set",!0),d=n("Map.prototype.has",!0),g=function(e,t){for(var r,o=e;null!==(r=o.next);o=r)if(r.key===t)return o.next=r.next,r.next=e.next,e.next=r,r};e.exports=function(){var e,t,r,o={assert:function(e){if(!o.has(e))throw new a("Side channel does not contain "+i(e))},get:function(o){if(c&&o&&("object"==typeof o||"function"==typeof o)){if(e)return l(e,o)}else if(p){if(t)return f(t,o)}else if(r)return function(e,t){var r=g(e,t);return r&&r.value}(r,o)},has:function(o){if(c&&o&&("object"==typeof o||"function"==typeof o)){if(e)return s(e,o)}else if(p){if(t)return d(t,o)}else if(r)return function(e,t){return!!g(e,t)}(r,o);return!1},set:function(o,n){c&&o&&("object"==typeof o||"function"==typeof o)?(e||(e=new c),u(e,o,n)):p?(t||(t=new p),y(t,o,n)):(r||(r={key:{},next:null}),function(e,t,r){var o=g(e,t);o?o.value=r:e.next={key:t,next:e.next,value:r}}(r,o,n))}};return o}},6566:(e,t,r)=>{"use strict";r.r(t),r.d(t,{FetchError:()=>C,GiphyFetch:()=>q,gifPaginator:()=>Q,request:()=>H,serverUrl:()=>T,setServerUrl:()=>B});const o={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let n;const i=new Uint8Array(16);function a(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)}const c=[];for(let e=0;e<256;++e)c.push((e+256).toString(16).slice(1));const p=function(e,t,r){if(o.randomUUID&&!t&&!e)return o.randomUUID();const n=(e=e||{}).random||(e.rng||a)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return(c[e[t+0]]+c[e[t+1]]+c[e[t+2]]+c[e[t+3]]+"-"+c[e[t+4]]+c[e[t+5]]+"-"+c[e[t+6]]+c[e[t+7]]+"-"+c[e[t+8]]+c[e[t+9]]+"-"+c[e[t+10]]+c[e[t+11]]+c[e[t+12]]+c[e[t+13]]+c[e[t+14]]+c[e[t+15]]).toLowerCase()}(n)};Object.defineProperty,Object.defineProperties,Object.getOwnPropertyDescriptors,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var l={ENABLED:"undefined"!=typeof window&&"undefined"!=typeof location&&-1!==location.search.indexOf("giphy-debug"),LEVEL:0,PREFIX:"GiphyJS",debug:(...e)=>{l.ENABLED&&l.LEVEL<=0&&console.debug(l.PREFIX,...e)},info:(...e)=>{l.ENABLED&&l.LEVEL<=1&&console.info(l.PREFIX,...e)},warn:(...e)=>{l.ENABLED&&l.LEVEL<=2&&console.warn(l.PREFIX,...e)},error:(...e)=>{l.ENABLED&&l.LEVEL<=3&&console.error(l.PREFIX,...e)}},u="",s=()=>{if(!u){try{u=sessionStorage.getItem("giphyPingbackId")}catch(e){}if(!u){const e=(new Date).getTime().toString(16);try{u=`${e}${p().replace(/-/g,"")}`.substring(0,16)}catch(e){u=(()=>{let e="";for(let t=0;t<16;t++)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random()));return e})()}try{sessionStorage.setItem("giphyPingbackId",u)}catch(e){}}}return u},f=(new Promise((e=>{"undefined"==typeof Image&&e(!1);const t=new Image;t.onload=()=>{e(!0)},t.onerror=()=>{e(!1)},t.src="data:image/webp;base64,UklGRjoAAABXRUJQVlA4IC4AAACyAgCdASoCAAIALmk0mk0iIiIiIgBoSygABc6WWgAA/veff/0PP8bA//LwYAAA"})),("undefined"!=typeof window?window:global)||{});f._GIPHY_SDK_HEADERS_=f._GIPHY_SDK_HEADERS_||(f.Headers?new f.Headers({"X-GIPHY-SDK-PLATFORM":"web"}):void 0);var y,d,g,h=()=>f._GIPHY_SDK_HEADERS_,m=(e,t)=>{var r;return null==(r=h())?void 0:r.set(e,t)},b=r(2431),v=Object.defineProperty,S=Object.defineProperties,j=Object.getOwnPropertyDescriptors,A=Object.getOwnPropertyNames,w=Object.getOwnPropertySymbols,P=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,E=(e,t,r)=>t in e?v(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x=(e,t)=>{for(var r in t||(t={}))P.call(t,r)&&E(e,r,t[r]);if(w)for(var r of w(t))O.call(t,r)&&E(e,r,t[r]);return e},I=(e,t)=>S(e,j(t)),k=(e=>"undefined"!=typeof require?require:"undefined"!=typeof Proxy?new Proxy(e,{get:(e,t)=>("undefined"!=typeof require?require:e)[t]}):e)((function(e){if("undefined"!=typeof require)return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')})),R=(e,t,r)=>new Promise(((o,n)=>{var i=e=>{try{c(r.next(e))}catch(e){n(e)}},a=e=>{try{c(r.throw(e))}catch(e){n(e)}},c=e=>e.done?o(e.value):Promise.resolve(e.value).then(i,a);c((r=r.apply(e,t)).next())})),_=(y={"package.json"(e,t){t.exports={scripts:{lint:"run -T eslint . --ext .ts,.tsx",clean:"rm -rf ./dist",dev:"parcel public/test.html",docs:"typedoc src/index.ts",build:"run -T tsup src/index.ts --format cjs,esm --dts && run -T publint",prepublish:"npm run clean && npm run build",test:"run -T jest --config ./jestconfig.js","test:watch":"run -T jest --config ./jestconfig.js --watchAll"},name:"@giphy/js-fetch-api",version:"5.1.0",description:"Javascript API to fetch gifs and stickers from the GIPHY API.",homepage:"https://github.com/Giphy/giphy-js/tree/master/packages/fetch-api",main:"dist/index.cjs",types:"dist/index.d.ts",module:"dist/index.js",type:"module",sideEffects:!1,exports:{".":{types:"./dist/index.d.ts",import:"./dist/index.js",require:"./dist/index.cjs"},"./package.json":"./package.json"},files:["dist/","src/**/*"],license:"MIT",publishConfig:{access:"public"},dependencies:{"@giphy/js-types":"*","@giphy/js-util":"*",qs:"^6.9.4"},devDependencies:{"@types/qs":"^6.9.4","jest-fetch-mock":"^3.0.3","parcel-bundler":"latest",typedoc:"^0.20.36","typedoc-thunder-theme":"^0.0.2",typescript:"^5.0.4"}}}},function(){return d||(0,y[A(y)[0]])((d={exports:{}}).exports,d),d.exports}),D=["is_anonymous","is_community","is_featured","is_hidden","is_indexable","is_preserve_size","is_realtime","is_removed","is_sticker","is_dynamic"],F=["suppress_chrome","is_public","is_verified"],N=e=>t=>e[t]=!!e[t],U=e=>"string"==typeof e?e:e.text,M=e=>{const t=x({},e);t.id=String(t.id),t.tags=(t.tags||[]).map(U),D.forEach(N(t)),Object.keys(t.images||{}).forEach((e=>{const r=t.images[e];r.width=parseInt(r.width),r.height=parseInt(r.height)}));const{user:r}=t;if(r){const e=x({},r);F.forEach(N(e)),t.user=e}return t},$=e=>(e.data=M(e.data),e),L=e=>(e.data=e.data.map((e=>M(e))),e),T=(("undefined"!=typeof window?window:global)||{}).GIPHY_API_URL||"https://api.giphy.com/v1/",B=e=>{T=e},C=class extends Error{constructor(e,t,r=0,o=""){super(e),this.url=t,this.status=r,this.statusText=o}},W=e=>e,G={},H=function(e,t={}){const{apiVersion:r=1,noCache:o=!1,normalizer:n=W}=t,i=T.replace(/\/v\d+\/$/,`/v${r}/`);if((()=>{const e=Date.now();Object.keys(G).forEach((t=>{const r=G[t].isError?6e3:6e4;e-G[t].ts>=r&&delete G[t]}))})(),!G[e]||o){const t=`${i}${e}`,r=()=>R(this,null,(function*(){var r;let o;try{const i=yield fetch(t,{method:"get"});if(i.ok){const e=yield i.json();if(null==(r=e.meta)?void 0:r.response_id)return n(e);throw{message:"synthetic response"}}{let r="Error fetching";try{const e=yield i.json();e.message&&(r=e.message)}catch(e){}G[e]&&(G[e].isError=!0),o=new C(`@giphy/js-fetch-api: ${r}`,t,i.status,i.statusText)}}catch(r){o=new C(r.message,t),G[e]&&(G[e].isError=!0)}throw o}));G[e]={request:r(),ts:Date.now()}}return G[e].request},V=e=>e&&e.type?e.type:"gifs",q=class{constructor(e){this.getQS=(e={})=>b.stringify(I(x({},e),{api_key:this.apiKey,pingback_id:s()})),this.apiKey=e}categories(e){return H(`gifs/categories?${this.getQS(e)}`)}gif(e){return H(`gifs/${e}?${this.getQS()}`,{normalizer:$})}gifs(e,t){return Array.isArray(e)?H(`gifs?${this.getQS({ids:e.join(",")})}`,{normalizer:L}):H(`gifs/categories/${e}/${t}?${this.getQS()}`,{normalizer:L})}emoji(e){return H(`emoji?${this.getQS(e)}`,{normalizer:L})}emojiDefaultVariations(e){return H(`emoji?${this.getQS(e)}`,{apiVersion:2,normalizer:L})}emojiVariations(e){return H(`emoji/${e}/variations?${this.getQS()}`,{apiVersion:2,normalizer:L})}animate(e,t={}){const r=this.getQS(I(x({},t),{m:e}));return H(`text/animate?${r}`,{normalizer:L})}search(e,t={}){const r=t.channel?`@${t.channel} ${e}`:e;let o;"text"===t.type&&(o=!0);const n=this.getQS(I(x({rating:"pg-13"},t),{q:r,excludeDynamicResults:o}));return H(`${V(t)}/search?${n}`,{normalizer:L})}subcategories(e,t){return H(`gifs/categories/${e}?${this.getQS(t)}`)}trending(e={}){return H(`${V(e)}/trending?${this.getQS(x({rating:"pg-13"},e))}`,{normalizer:L})}random(e){return H(`${V(e)}/random?${this.getQS(x({rating:"pg-13"},e))}`,{noCache:!0,normalizer:$})}related(e,t={}){const{type:r="gifs"}=t;return H(`${r}/related?${this.getQS(x({gif_id:e,rating:"pg-13"},t))}`,{normalizer:L})}channels(e,t={}){return H(`channels/search?${this.getQS(x({q:e,rating:"pg-13"},t))}`)}},Q=(e,t=[])=>{const r=[...t],o=t.map((e=>e.id));let n=t.length,i=!1;return()=>R(void 0,null,(function*(){if(i)return r;const t=yield e(n),{pagination:a,data:c}=t;return n=a.count+a.offset,i=n===a.total_count,c.forEach((e=>{const{id:t}=e;o.includes(t)||(r.push(e),o.push(t))})),[...r]}))};if(void 0!==k){const{version:e}=_();(null==(g=h())?void 0:g.get("X-GIPHY-SDK-NAME"))||(m("X-GIPHY-SDK-NAME","FetchAPI"),m("X-GIPHY-SDK-VERSION",e))}}}]);