Files
ambersplace.net/cohost-archive/static/4860.328a8b56d19750b075f1.js

2 lines
19 KiB
JavaScript

(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[4860],{4860:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return N}});var o=n(91625);function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function s(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var a=[],c=a.forEach,u=a.slice;function f(t){return c.call(u.call(arguments,1),(function(e){if(e)for(var n in e)void 0===t[n]&&(t[n]=e[n])})),t}function l(t){return t?"function"==typeof t?new t:t:null}var d=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,t),this.backends=[],this.type="backend",this.init(e,n)}return s(t,[{key:"init",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2?arguments[2]:void 0;this.services=t,this.options=f(n,this.options||{},{handleEmptyResourcesAsFailed:!0}),this.options.backends&&this.options.backends.forEach((function(n,r){e.backends[r]=e.backends[r]||l(n),e.backends[r].init(t,e.options.backendOptions&&e.options.backendOptions[r]||{},o)}))}},{key:"read",value:function(t,e,n){var o=this,r=this.backends.length,i=function n(r,i){if(!(r<0)){var s=o.backends[r];s.save?(s.save(t,e,i),n(r-1,i)):n(r-1,i)}};!function s(a){if(a>=r)return n(new Error("non of the backend loaded data;",!0));var c=a===r-1,u=o.options.handleEmptyResourcesAsFailed&&!c?0:-1,f=o.backends[a];f.read?f.read(t,e,(function(t,e){!t&&e&&Object.keys(e).length>u?(n(null,e,a),i(a-1,e)):s(a+1)})):s(a+1)}(0)}},{key:"create",value:function(t,e,n,o,r,i){this.backends.forEach((function(r){r.create&&r.create(t,e,n,o,null,i)}))}}]),t}();d.type="backend";var h=n(51028);function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}var y=[],b=y.forEach,v=y.slice;function m(t){return b.call(v.call(arguments,1),(function(e){if(e)for(var n in e)void 0===t[n]&&(t[n]=e[n])})),t}function g(){return"function"==typeof XMLHttpRequest||"object"===("undefined"==typeof XMLHttpRequest?"undefined":p(XMLHttpRequest))}var w,O,E,P=n(49597),x=n.t(P,2);function A(t){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A(t)}"function"==typeof fetch&&(w="undefined"!=typeof global&&global.fetch?global.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),g()&&("undefined"!=typeof global&&global.XMLHttpRequest?O=global.XMLHttpRequest:"undefined"!=typeof window&&window.XMLHttpRequest&&(O=window.XMLHttpRequest)),"function"==typeof ActiveXObject&&("undefined"!=typeof global&&global.ActiveXObject?E=global.ActiveXObject:"undefined"!=typeof window&&window.ActiveXObject&&(E=window.ActiveXObject)),w||!x||O||E||(w=P||x),"function"!=typeof w&&(w=void 0);var _=function(t,e){if(e&&"object"===A(e)){var n="";for(var o in e)n+="&"+encodeURIComponent(o)+"="+encodeURIComponent(e[o]);if(!n)return t;t=t+(-1!==t.indexOf("?")?"&":"?")+n.slice(1)}return t},j=function(t,e,n){w(t,e).then((function(t){if(!t.ok)return n(t.statusText||"Error",{status:t.status});t.text().then((function(e){n(null,{status:t.status,data:e})})).catch(n)})).catch(n)},T=!1,k=function(t,e,n,o){return"function"==typeof n&&(o=n,n=void 0),o=o||function(){},w&&0!==e.indexOf("file:")?function(t,e,n,o){t.queryStringParams&&(e=_(e,t.queryStringParams));var r=m({},"function"==typeof t.customHeaders?t.customHeaders():t.customHeaders);n&&(r["Content-Type"]="application/json");var i="function"==typeof t.requestOptions?t.requestOptions(n):t.requestOptions,s=m({method:n?"POST":"GET",body:n?t.stringify(n):void 0,headers:r},T?{}:i);try{j(e,s,o)}catch(t){if(!i||0===Object.keys(i).length||!t.message||t.message.indexOf("not implemented")<0)return o(t);try{Object.keys(i).forEach((function(t){delete s[t]})),j(e,s,o),T=!0}catch(t){o(t)}}}(t,e,n,o):g()||"function"==typeof ActiveXObject?function(t,e,n,o){n&&"object"===A(n)&&(n=_("",n).slice(1)),t.queryStringParams&&(e=_(e,t.queryStringParams));try{var r;(r=O?new O:new E("MSXML2.XMLHTTP.3.0")).open(n?"POST":"GET",e,1),t.crossDomain||r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r.withCredentials=!!t.withCredentials,n&&r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.overrideMimeType&&r.overrideMimeType("application/json");var i=t.customHeaders;if(i="function"==typeof i?i():i)for(var s in i)r.setRequestHeader(s,i[s]);r.onreadystatechange=function(){r.readyState>3&&o(r.status>=400?r.statusText:null,{status:r.status,data:r.responseText})},r.send(n)}catch(t){console&&console.log(t)}}(t,e,n,o):void o(new Error("No fetch and no xhr implementation found!"))};function S(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function R(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}var D=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1,parse:function(t){return JSON.parse(t)},stringify:JSON.stringify,parsePayload:function(t,e,n){return function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}({},e,n||"")},request:k,reloadInterval:"undefined"==typeof window&&36e5,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},q=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};S(this,t),this.services=e,this.options=n,this.allOptions=o,this.type="backend",this.init(e,n,o)}var e,n;return e=t,n=[{key:"init",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=t,this.options=m(n,this.options||{},D()),this.allOptions=o,this.services&&this.options.reloadInterval&&setInterval((function(){return e.reload()}),this.options.reloadInterval)}},{key:"readMulti",value:function(t,e,n){this._readAny(t,t,e,e,n)}},{key:"read",value:function(t,e,n){this._readAny([t],t,[e],e,n)}},{key:"_readAny",value:function(t,e,n,o,r){var i,s=this,a=this.options.loadPath;"function"==typeof this.options.loadPath&&(a=this.options.loadPath(t,n)),(a=function(t){return!!t&&"function"==typeof t.then}(i=a)?i:Promise.resolve(i)).then((function(i){if(!i)return r(null,{});var a=s.services.interpolator.interpolate(i,{lng:t.join("+"),ns:n.join("+")});s.loadUrl(a,r,e,o)}))}},{key:"loadUrl",value:function(t,e,n,o){var r=this;this.options.request(this.options,t,void 0,(function(i,s){if(s&&(s.status>=500&&s.status<600||!s.status))return e("failed loading "+t+"; status code: "+s.status,!0);if(s&&s.status>=400&&s.status<500)return e("failed loading "+t+"; status code: "+s.status,!1);if(!s&&i&&i.message&&i.message.indexOf("Failed to fetch")>-1)return e("failed loading "+t+": "+i.message,!0);if(i)return e(i,!1);var a,c;try{a="string"==typeof s.data?r.options.parse(s.data,n,o):s.data}catch(e){c="failed parsing "+t+" to json"}if(c)return e(c,!1);e(null,a)}))}},{key:"create",value:function(t,e,n,o,r){var i=this;if(this.options.addPath){"string"==typeof t&&(t=[t]);var s=this.options.parsePayload(e,n,o),a=0,c=[],u=[];t.forEach((function(n){var o=i.options.addPath;"function"==typeof i.options.addPath&&(o=i.options.addPath(n,e));var f=i.services.interpolator.interpolate(o,{lng:n,ns:e});i.options.request(i.options,f,s,(function(e,n){a+=1,c.push(e),u.push(n),a===t.length&&r&&r(c,u)}))}))}}},{key:"reload",value:function(){var t=this,e=this.services,n=e.backendConnector,o=e.languageUtils,r=e.logger,i=n.language;if(!i||"cimode"!==i.toLowerCase()){var s=[],a=function(t){o.toResolveHierarchy(t).forEach((function(t){s.indexOf(t)<0&&s.push(t)}))};a(i),this.allOptions.preload&&this.allOptions.preload.forEach((function(t){return a(t)})),s.forEach((function(e){t.allOptions.ns.forEach((function(t){n.read(e,t,"read",null,null,(function(o,i){o&&r.warn("loading namespace ".concat(t," for language ").concat(e," failed"),o),!o&&i&&r.log("loaded namespace ".concat(t," for language ").concat(e),i),n.loaded("".concat(e,"|").concat(t),o,i)}))}))}))}}}],n&&R(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();q.type="backend";var B=q;function L(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function U(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function H(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?U(Object(n),!0).forEach((function(e){L(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):U(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var I=function(){function t(e){r(this,t),this.store=e.store}return s(t,[{key:"setItem",value:function(t,e){if(this.store)try{this.store.setItem(t,e)}catch(t){}}},{key:"getItem",value:function(t,e){if(this.store)try{return this.store.getItem(t,e)}catch(t){}}}]),t}();function M(){return{prefix:"i18next_res_",expirationTime:6048e5,defaultVersion:void 0,versions:{},store:"undefined"!=typeof window?window.localStorage:null}}var C=function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};r(this,t),this.init(e,n),this.type="backend"}return s(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.services=t,this.options=H(H(H({},M()),this.options),e),this.storage=new I(this.options)}},{key:"read",value:function(t,e,n){var o=(new Date).getTime();if(!this.storage.store)return n(null,null);var r=this.storage.getItem("".concat(this.options.prefix).concat(t,"-").concat(e));if(r){r=JSON.parse(r);var i=this.getVersion(t);if(r.i18nStamp&&r.i18nStamp+this.options.expirationTime>o&&i===r.i18nVersion)return delete r.i18nVersion,delete r.i18nStamp,n(null,r)}return n(null,null)}},{key:"save",value:function(t,e,n){if(this.storage.store){n.i18nStamp=(new Date).getTime();var o=this.getVersion(t);o&&(n.i18nVersion=o),this.storage.setItem("".concat(this.options.prefix).concat(t,"-").concat(e),JSON.stringify(n))}}},{key:"getVersion",value:function(t){return this.options.versions[t]||this.options.defaultVersion}}]),t}();C.type="backend";var X=C,F=n(72100);o.ZP.use(d).use(h.Db).init({backend:{backends:[X,B],backendOptions:[{expirationTime:2592e6,defaultVersion:F.O.VERSION},{loadPath:`/rc/locales/{{lng}}/{{ns}}.json?${F.O.VERSION}`}]},lng:"en",fallbackLng:"en",debug:!1,interpolation:{escapeValue:!0},ns:["client","common","server"],react:{useSuspense:!1}}).catch((t=>console.error(t)));var N=o.ZP},14779:function(t,e){var n="undefined"!=typeof self?self:this,o=function(){function t(){this.fetch=!1,this.DOMException=n.DOMException}return t.prototype=n,new t}();!function(t){!function(e){var n="URLSearchParams"in t,o="Symbol"in t&&"iterator"in Symbol,r="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),i="FormData"in t,s="ArrayBuffer"in t;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(t){return t&&a.indexOf(Object.prototype.toString.call(t))>-1};function u(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function f(t){return"string"!=typeof t&&(t=String(t)),t}function l(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return o&&(e[Symbol.iterator]=function(){return e}),e}function d(t){this.map={},t instanceof d?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function h(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function p(t){return new Promise((function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}}))}function y(t){var e=new FileReader,n=p(e);return e.readAsArrayBuffer(t),n}function b(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function v(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:r&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:i&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():s&&r&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=b(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(t)||c(t))?this._bodyArrayBuffer=b(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var t=h(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var t,e,n,o=h(this);if(o)return o;if(this._bodyBlob)return t=this._bodyBlob,n=p(e=new FileReader),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),o=0;o<e.length;o++)n[o]=String.fromCharCode(e[o]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(w)}),this.json=function(){return this.text().then(JSON.parse)},this}d.prototype.append=function(t,e){t=u(t),e=f(e);var n=this.map[t];this.map[t]=n?n+", "+e:e},d.prototype.delete=function(t){delete this.map[u(t)]},d.prototype.get=function(t){return t=u(t),this.has(t)?this.map[t]:null},d.prototype.has=function(t){return this.map.hasOwnProperty(u(t))},d.prototype.set=function(t,e){this.map[u(t)]=f(e)},d.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},d.prototype.keys=function(){var t=[];return this.forEach((function(e,n){t.push(n)})),l(t)},d.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),l(t)},d.prototype.entries=function(){var t=[];return this.forEach((function(e,n){t.push([n,e])})),l(t)},o&&(d.prototype[Symbol.iterator]=d.prototype.entries);var m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function g(t,e){var n,o,r=(e=e||{}).body;if(t instanceof g){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new d(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,r||null==t._bodyInit||(r=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new d(e.headers)),this.method=(o=(n=e.method||this.method||"GET").toUpperCase(),m.indexOf(o)>-1?o:n),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function w(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var n=t.split("="),o=n.shift().replace(/\+/g," "),r=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(r))}})),e}function O(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new d(e.headers),this.url=e.url||"",this._initBody(t)}g.prototype.clone=function(){return new g(this,{body:this._bodyInit})},v.call(g.prototype),v.call(O.prototype),O.prototype.clone=function(){return new O(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},O.error=function(){var t=new O(null,{status:0,statusText:""});return t.type="error",t};var E=[301,302,303,307,308];O.redirect=function(t,e){if(-1===E.indexOf(e))throw new RangeError("Invalid status code");return new O(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var n=Error(t);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function P(t,n){return new Promise((function(o,i){var s=new g(t,n);if(s.signal&&s.signal.aborted)return i(new e.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var t,e,n={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new d,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(t){var n=t.split(":"),o=n.shift().trim();if(o){var r=n.join(":").trim();e.append(o,r)}})),e)};n.url="responseURL"in a?a.responseURL:n.headers.get("X-Request-URL");var r="response"in a?a.response:a.responseText;o(new O(r,n))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.onabort=function(){i(new e.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&r&&(a.responseType="blob"),s.headers.forEach((function(t,e){a.setRequestHeader(e,t)})),s.signal&&(s.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",c)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}P.polyfill=!0,t.fetch||(t.fetch=P,t.Headers=d,t.Request=g,t.Response=O),e.Headers=d,e.Request=g,e.Response=O,e.fetch=P,Object.defineProperty(e,"__esModule",{value:!0})}({})}(o),o.fetch.ponyfill=!0,delete o.fetch.polyfill;var r=o;(e=r.fetch).default=r.fetch,e.fetch=r.fetch,e.Headers=r.Headers,e.Request=r.Request,e.Response=r.Response,t.exports=e},49597:function(t,e,n){var o;if("function"==typeof fetch&&(o=void 0!==n.g&&n.g.fetch?n.g.fetch:"undefined"!=typeof window&&window.fetch?window.fetch:fetch),"undefined"==typeof window||void 0===window.document){var r=o||n(14779);r.default&&(r=r.default),e.default=r,t.exports=e.default}}}]);
//# sourceMappingURL=4860.328a8b56d19750b075f1.js.map