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S,IAAK,EACnD,C,sBCvDA,IAeI2xB,EAfY,WAId,GAAoB,oBAAT5Y,KACT,OAAOA,KAET,GAAsB,oBAAX9T,OACT,OAAOA,OAET,QAAsB,IAAX0sB,EACT,OAAOA,EAET,MAAM,IAAIppB,MAAM,iCAClB,CACaqpB,GACbJ,EAAOC,QAAUA,EAAUE,EAAO5iB,MAG9B4iB,EAAO5iB,QACT0iB,EAAA,QAAkBE,EAAO5iB,MAAM3D,KAAKumB,IAEtCF,EAAQI,QAAUF,EAAOE,QACzBJ,EAAQK,QAAUH,EAAOG,QACzBL,EAAQM,SAAWJ,EAAOI,Q","sources":["webpack://www-differentdog-com/./node_modules/@emotion/sheet/dist/sheet.browser.esm.js","webpack://www-differentdog-com/./node_modules/@builder.io/react/node_modules/@emotion/cache/dist/cache.browser.esm.js","webpack://www-differentdog-com/./node_modules/@emotion/utils/dist/utils.browser.esm.js","webpack://www-differentdog-com/./node_modules/@emotion/hash/dist/hash.browser.esm.js","webpack://www-differentdog-com/./node_modules/@emotion/serialize/node_modules/@emotion/memoize/dist/memoize.browser.esm.js","webpack://www-differentdog-com/./node_modules/@emotion/serialize/dist/serialize.browser.esm.js","webpack://www-differentdog-com/./node_modules/@builder.io/react/node_modules/@emotion/core/dist/emotion-element-04d85134.browser.esm.js","webpack://www-differentdog-com/./node_modules/@emotion/css/dist/css.browser.esm.js","webpack://www-differentdog-com/./node_modules/@builder.io/react/node_modules/@emotion/core/dist/core.browser.esm.js","webpack://www-differentdog-com/./node_modules/@builder.io/sdk/dist/index.esm.js","webpack://www-differentdog-com/./node_modules/@builder.io/sdk/node_modules/tslib/tslib.es6.js","webpack://www-differentdog-com/./node_modules/@emotion/stylis/dist/stylis.browser.esm.js","webpack://www-differentdog-com/./node_modules/@emotion/unitless/dist/unitless.browser.esm.js","webpack://www-differentdog-com/./node_modules/hash-sum/hash-sum.js","webpack://www-differentdog-com/./node_modules/node-fetch/browser.js"],"sourcesContent":["/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n// $FlowFixMe\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n // $FlowFixMe\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n // $FlowFixMe\n return document.styleSheets[i];\n }\n }\n}\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n tag.appendChild(document.createTextNode(''));\n return tag;\n}\nvar StyleSheet = /*#__PURE__*/\nfunction () {\n function StyleSheet(options) {\n this.isSpeedy = options.speedy === undefined ? process.env.NODE_ENV === 'production' : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.before = null;\n }\n var _proto = StyleSheet.prototype;\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n var _tag = createStyleElement(this);\n var before;\n if (this.tags.length === 0) {\n before = this.before;\n } else {\n before = this.tags[this.tags.length - 1].nextSibling;\n }\n this.container.insertBefore(_tag, before);\n this.tags.push(_tag);\n }\n var tag = this.tags[this.tags.length - 1];\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n try {\n // this is a really hot path\n // we check the second character first because having \"i\"\n // as the second character will happen less often than\n // having \"@\" as the first character\n var isImportRule = rule.charCodeAt(1) === 105 && rule.charCodeAt(0) === 64; // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n\n sheet.insertRule(rule,\n // we need to insert @import rules before anything else\n // otherwise there will be an error\n // technically this means that the @import rules will\n // _usually_(not always since there could be multiple style tags)\n // be the first ones in prod and generally later in dev\n // this shouldn't really matter in the real world though\n // @import is generally only used for font faces from google fonts and etc.\n // so while this could be technically correct then it would be slower and larger\n // for a tiny bit of correctness that won't matter in the real world\n isImportRule ? 0 : sheet.cssRules.length);\n } catch (e) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\"There was a problem inserting the following rule: \\\"\" + rule + \"\\\"\", e);\n }\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n this.ctr++;\n };\n _proto.flush = function flush() {\n // $FlowFixMe\n this.tags.forEach(function (tag) {\n return tag.parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n };\n return StyleSheet;\n}();\nexport { StyleSheet };","import { StyleSheet } from '@emotion/sheet';\nimport Stylis from '@emotion/stylis';\nimport '@emotion/weak-memoize';\n\n// https://github.com/thysultan/stylis.js/tree/master/plugins/rule-sheet\n// inlined to avoid umd wrapper and peerDep warnings/installing stylis\n// since we use stylis after closure compiler\nvar delimiter = '/*|*/';\nvar needle = delimiter + '}';\nfunction toSheet(block) {\n if (block) {\n Sheet.current.insert(block + '}');\n }\n}\nvar Sheet = {\n current: null\n};\nvar ruleSheet = function ruleSheet(context, content, selectors, parents, line, column, length, ns, depth, at) {\n switch (context) {\n // property\n case 1:\n {\n switch (content.charCodeAt(0)) {\n case 64:\n {\n // @import\n Sheet.current.insert(content + ';');\n return '';\n }\n // charcode for l\n\n case 108:\n {\n // charcode for b\n // this ignores label\n if (content.charCodeAt(2) === 98) {\n return '';\n }\n }\n }\n break;\n }\n // selector\n\n case 2:\n {\n if (ns === 0) return content + delimiter;\n break;\n }\n // at-rule\n\n case 3:\n {\n switch (ns) {\n // @font-face, @page\n case 102:\n case 112:\n {\n Sheet.current.insert(selectors[0] + content);\n return '';\n }\n default:\n {\n return content + (at === 0 ? delimiter : '');\n }\n }\n }\n case -2:\n {\n content.split(needle).forEach(toSheet);\n }\n }\n};\nvar createCache = function createCache(options) {\n if (options === undefined) options = {};\n var key = options.key || 'css';\n var stylisOptions;\n if (options.prefix !== undefined) {\n stylisOptions = {\n prefix: options.prefix\n };\n }\n var stylis = new Stylis(stylisOptions);\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe\n if (/[^a-z-]/.test(key)) {\n throw new Error(\"Emotion key must only contain lower case alphabetical characters and - but \\\"\" + key + \"\\\" was passed\");\n }\n }\n var inserted = {}; // $FlowFixMe\n\n var container;\n {\n container = options.container || document.head;\n var nodes = document.querySelectorAll(\"style[data-emotion-\" + key + \"]\");\n Array.prototype.forEach.call(nodes, function (node) {\n var attrib = node.getAttribute(\"data-emotion-\" + key); // $FlowFixMe\n\n attrib.split(' ').forEach(function (id) {\n inserted[id] = true;\n });\n if (node.parentNode !== container) {\n container.appendChild(node);\n }\n });\n }\n var _insert;\n {\n stylis.use(options.stylisPlugins)(ruleSheet);\n _insert = function insert(selector, serialized, sheet, shouldCache) {\n var name = serialized.name;\n Sheet.current = sheet;\n if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {\n var map = serialized.map;\n Sheet.current = {\n insert: function insert(rule) {\n sheet.insert(rule + map);\n }\n };\n }\n stylis(selector, serialized.styles);\n if (shouldCache) {\n cache.inserted[name] = true;\n }\n };\n }\n if (process.env.NODE_ENV !== 'production') {\n // https://esbench.com/bench/5bf7371a4cd7e6009ef61d0a\n var commentStart = /\\/\\*/g;\n var commentEnd = /\\*\\//g;\n stylis.use(function (context, content) {\n switch (context) {\n case -1:\n {\n while (commentStart.test(content)) {\n commentEnd.lastIndex = commentStart.lastIndex;\n if (commentEnd.test(content)) {\n commentStart.lastIndex = commentEnd.lastIndex;\n continue;\n }\n throw new Error('Your styles have an unterminated comment (\"/*\" without corresponding \"*/\").');\n }\n commentStart.lastIndex = 0;\n break;\n }\n }\n });\n stylis.use(function (context, content, selectors) {\n switch (context) {\n case -1:\n {\n var flag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';\n var unsafePseudoClasses = content.match(/(:first|:nth|:nth-last)-child/g);\n if (unsafePseudoClasses && cache.compat !== true) {\n unsafePseudoClasses.forEach(function (unsafePseudoClass) {\n var ignoreRegExp = new RegExp(unsafePseudoClass + \".*\\\\/\\\\* \" + flag + \" \\\\*\\\\/\");\n var ignore = ignoreRegExp.test(content);\n if (unsafePseudoClass && !ignore) {\n console.error(\"The pseudo class \\\"\" + unsafePseudoClass + \"\\\" is potentially unsafe when doing server-side rendering. Try changing it to \\\"\" + unsafePseudoClass.split('-child')[0] + \"-of-type\\\".\");\n }\n });\n }\n break;\n }\n }\n });\n }\n var cache = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n return cache;\n};\nexport default createCache;","var isBrowser = \"object\" !== 'undefined';\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className]);\n } else {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n if (\n // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false ||\n // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false && cache.compat !== undefined) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n do {\n var maybeStyles = cache.insert(\".\" + className, current, cache.sheet, true);\n current = current.next;\n } while (current !== undefined);\n }\n};\nexport { getRegisteredStyles, insertStyles };","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k = /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^= /* k >>> r: */\n k >>> 24;\n h = /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^ /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h = /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n h ^= h >>> 13;\n h = /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\nexport default murmur2;","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\nexport default memoize;","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\nvar ILLEGAL_ESCAPE_SEQUENCE_ERROR = \"You have illegal escape sequence in your template literal, most likely inside content's property value.\\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \\\"content: '\\\\00d7';\\\" should become \\\"content: '\\\\\\\\00d7';\\\".\\nYou can read more about this here:\\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences\";\nvar UNDEFINED_AS_OBJECT_KEY_ERROR = \"You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).\";\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\nvar processStyleName = memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n return value;\n};\nif (process.env.NODE_ENV !== 'production') {\n var contentValuePattern = /(attr|calc|counters?|url)\\(/;\n var contentValues = ['normal', 'none', 'counter', 'open-quote', 'close-quote', 'no-open-quote', 'no-close-quote', 'initial', 'inherit', 'unset'];\n var oldProcessStyleValue = processStyleValue;\n var msPattern = /^-ms-/;\n var hyphenPattern = /-(.)/g;\n var hyphenatedCache = {};\n processStyleValue = function processStyleValue(key, value) {\n if (key === 'content') {\n if (typeof value !== 'string' || contentValues.indexOf(value) === -1 && !contentValuePattern.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '\"' && value.charAt(0) !== \"'\")) {\n console.error(\"You seem to be using a value for 'content' without quotes, try replacing it with `content: '\\\"\" + value + \"\\\"'`\");\n }\n }\n var processed = oldProcessStyleValue(key, value);\n if (processed !== '' && !isCustomProperty(key) && key.indexOf('-') !== -1 && hyphenatedCache[key] === undefined) {\n hyphenatedCache[key] = true;\n console.error(\"Using kebab-case for css properties in objects is not supported. Did you mean \" + key.replace(msPattern, 'ms-').replace(hyphenPattern, function (str, _char) {\n return _char.toUpperCase();\n }) + \"?\");\n }\n return processed;\n };\n}\nvar shouldWarnAboutInterpolatingClassNameFromCss = true;\nfunction handleInterpolation(mergedProps, registered, interpolation, couldBeSelectorInterpolation) {\n if (interpolation == null) {\n return '';\n }\n if (interpolation.__emotion_styles !== undefined) {\n if (process.env.NODE_ENV !== 'production' && interpolation.toString() === 'NO_COMPONENT_SELECTOR') {\n throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');\n }\n return interpolation;\n }\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n case 'object':\n {\n if (interpolation.anim === 1) {\n cursor = {\n name: interpolation.name,\n styles: interpolation.styles,\n next: cursor\n };\n return interpolation.name;\n }\n if (interpolation.styles !== undefined) {\n var next = interpolation.next;\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n var styles = interpolation.styles + \";\";\n if (process.env.NODE_ENV !== 'production' && interpolation.map !== undefined) {\n styles += interpolation.map;\n }\n return styles;\n }\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result, couldBeSelectorInterpolation);\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('Functions that are interpolated in css calls will be stringified.\\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\\n' + 'It can be called directly with props or interpolated in a styled call like this\\n' + \"let SomeComponent = styled('div')`${dynamicStyle}`\");\n }\n break;\n }\n case 'string':\n if (process.env.NODE_ENV !== 'production') {\n var matched = [];\n var replaced = interpolation.replace(animationRegex, function (match, p1, p2) {\n var fakeVarName = \"animation\" + matched.length;\n matched.push(\"const \" + fakeVarName + \" = keyframes`\" + p2.replace(/^@keyframes animation-\\w+/, '') + \"`\");\n return \"${\" + fakeVarName + \"}\";\n });\n if (matched.length) {\n console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\\n\\n' + 'Instead of doing this:\\n\\n' + [].concat(matched, [\"`\" + replaced + \"`\"]).join('\\n') + '\\n\\nYou should wrap it with `css` like this:\\n\\n' + (\"css`\" + replaced + \"`\"));\n }\n }\n break;\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n if (registered == null) {\n return interpolation;\n }\n var cached = registered[interpolation];\n if (process.env.NODE_ENV !== 'production' && couldBeSelectorInterpolation && shouldWarnAboutInterpolatingClassNameFromCss && cached !== undefined) {\n console.error('Interpolating a className from css`` is not recommended and will cause problems with composition.\\n' + 'Interpolating a className from css`` will be completely unsupported in a future major version of Emotion');\n shouldWarnAboutInterpolatingClassNameFromCss = false;\n }\n return cached !== undefined && !couldBeSelectorInterpolation ? cached : interpolation;\n}\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i], false);\n }\n } else {\n for (var _key in obj) {\n var value = obj[_key];\n if (typeof value !== 'object') {\n if (registered != null && registered[value] !== undefined) {\n string += _key + \"{\" + registered[value] + \"}\";\n } else if (isProcessableValue(value)) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value) + \";\";\n }\n } else {\n if (_key === 'NO_COMPONENT_SELECTOR' && process.env.NODE_ENV !== 'production') {\n throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');\n }\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(_key) + \":\" + processStyleValue(_key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value, false);\n switch (_key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(_key) + \":\" + interpolated + \";\";\n break;\n }\n default:\n {\n if (process.env.NODE_ENV !== 'production' && _key === 'undefined') {\n console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);\n }\n string += _key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n return string;\n}\nvar labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*;/g;\nvar sourceMapPattern;\nif (process.env.NODE_ENV !== 'production') {\n sourceMapPattern = /\\/\\*#\\ssourceMappingURL=data:application\\/json;\\S+\\s+\\*\\//;\n} // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\nvar cursor;\nvar serializeStyles = function serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings, false);\n } else {\n if (process.env.NODE_ENV !== 'production' && strings[0] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n styles += strings[0];\n } // we start at 1 since we've already handled the first arg\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i], styles.charCodeAt(styles.length - 1) === 46);\n if (stringMode) {\n if (process.env.NODE_ENV !== 'production' && strings[i] === undefined) {\n console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);\n }\n styles += strings[i];\n }\n }\n var sourceMap;\n if (process.env.NODE_ENV !== 'production') {\n styles = styles.replace(sourceMapPattern, function (match) {\n sourceMap = match;\n return '';\n });\n } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' +\n // $FlowFixMe we know it's not null\n match[1];\n }\n var name = hashString(styles) + identifierName;\n if (process.env.NODE_ENV !== 'production') {\n // $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)\n return {\n name: name,\n styles: styles,\n map: sourceMap,\n next: cursor,\n toString: function toString() {\n return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\";\n }\n };\n }\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n};\nexport { serializeStyles };","import '@babel/runtime/helpers/inheritsLoose';\nimport { createContext, forwardRef, createElement, Fragment } from 'react';\nimport createCache from '@emotion/cache';\nimport { getRegisteredStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar EmotionCacheContext = /*#__PURE__*/createContext(\n// we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? createCache() : null);\nvar ThemeContext = /*#__PURE__*/createContext({});\nvar CacheProvider = EmotionCacheContext.Provider;\nvar withEmotionCache = function withEmotionCache(func) {\n var render = function render(props, ref) {\n return /*#__PURE__*/createElement(EmotionCacheContext.Consumer, null, function (cache) {\n return func(props, cache, ref);\n });\n }; // $FlowFixMe\n\n return /*#__PURE__*/forwardRef(render);\n};\n\n// thus we only need to replace what is a valid character for JS, but not for CSS\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n return identifier.replace(/\\$/g, '-');\n};\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' &&\n // check if there is a css declaration\n props.css.indexOf(':') !== -1) {\n throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/css' like this: css`\" + props.css + \"`\");\n }\n var newProps = {};\n for (var key in props) {\n if (hasOwnProperty.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n newProps[typePropName] = type; // TODO: check if this still works with all of those different JSX functions\n\n if (process.env.NODE_ENV !== 'production') {\n var error = new Error();\n if (error.stack) {\n // chrome\n var match = error.stack.match(/at (?:Object\\.|Module\\.|)(?:jsx|createEmotionProps).*\\n\\s+at (?:Object\\.|)([A-Z][A-Za-z$]+) /);\n if (!match) {\n // safari and firefox\n match = error.stack.match(/.*\\n([A-Z][A-Za-z$]+)@/);\n }\n if (match) {\n newProps[labelPropName] = sanitizeIdentifier(match[1]);\n }\n }\n }\n return newProps;\n};\nvar Noop = function Noop() {\n return null;\n};\nvar render = function render(cache, props, theme, ref) {\n var cssProp = theme === null ? props.css : props.css(theme); // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n var type = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n var serialized = serializeStyles(registeredStyles);\n if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {\n var labelFromStack = props[labelPropName];\n if (labelFromStack) {\n serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);\n }\n }\n var rules = insertStyles(cache, serialized, typeof type === 'string');\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n for (var key in props) {\n if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {\n newProps[key] = props[key];\n }\n }\n newProps.ref = ref;\n newProps.className = className;\n var ele = /*#__PURE__*/createElement(type, newProps);\n var possiblyStyleElement = /*#__PURE__*/createElement(Noop, null);\n return /*#__PURE__*/createElement(Fragment, null, possiblyStyleElement, ele);\n}; // eslint-disable-next-line no-undef\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n if (typeof props.css === 'function') {\n return /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) {\n return render(cache, props, theme, ref);\n });\n }\n return render(cache, props, null, ref);\n});\nif (process.env.NODE_ENV !== 'production') {\n Emotion.displayName = 'EmotionCssPropInternal';\n}\nexport { CacheProvider as C, Emotion as E, ThemeContext as T, createEmotionProps as c, hasOwnProperty as h, withEmotionCache as w };","import { serializeStyles } from '@emotion/serialize';\nfunction css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return serializeStyles(args);\n}\nexport default css;","import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport { createElement, Component, Fragment } from 'react';\nimport '@emotion/cache';\nimport { h as hasOwnProperty, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext } from './emotion-element-04d85134.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, w as withEmotionCache } from './emotion-element-04d85134.browser.esm.js';\nimport { insertStyles, getRegisteredStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { StyleSheet } from '@emotion/sheet';\nimport css from '@emotion/css';\nexport { default as css } from '@emotion/css';\nvar jsx = function jsx(type, props) {\n var args = arguments;\n if (props == null || !hasOwnProperty.call(props, 'css')) {\n // $FlowFixMe\n return createElement.apply(undefined, args);\n }\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n } // $FlowFixMe\n\n return createElement.apply(null, createElementArgArray);\n};\nvar warnedAboutCssPropForGlobal = false;\nvar Global = /* #__PURE__ */withEmotionCache(function (props, cache) {\n if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && (\n // check for className as well since the user is\n // probably using the custom createElement which\n // means it will be turned into a className prop\n // $FlowFixMe I don't really want to add it to the type since it shouldn't be used\n props.className || props.css)) {\n console.error(\"It looks like you're using the css prop on Global, did you mean to use the styles prop instead?\");\n warnedAboutCssPropForGlobal = true;\n }\n var styles = props.styles;\n if (typeof styles === 'function') {\n return /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) {\n var serialized = serializeStyles([styles(theme)]);\n return /*#__PURE__*/createElement(InnerGlobal, {\n serialized: serialized,\n cache: cache\n });\n });\n }\n var serialized = serializeStyles([styles]);\n return /*#__PURE__*/createElement(InnerGlobal, {\n serialized: serialized,\n cache: cache\n });\n});\n\n// maintain place over rerenders.\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\nvar InnerGlobal = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(InnerGlobal, _React$Component);\n function InnerGlobal(props, context, updater) {\n return _React$Component.call(this, props, context, updater) || this;\n }\n var _proto = InnerGlobal.prototype;\n _proto.componentDidMount = function componentDidMount() {\n this.sheet = new StyleSheet({\n key: this.props.cache.key + \"-global\",\n nonce: this.props.cache.sheet.nonce,\n container: this.props.cache.sheet.container\n }); // $FlowFixMe\n\n var node = document.querySelector(\"style[data-emotion-\" + this.props.cache.key + \"=\\\"\" + this.props.serialized.name + \"\\\"]\");\n if (node !== null) {\n this.sheet.tags.push(node);\n }\n if (this.props.cache.sheet.tags.length) {\n this.sheet.before = this.props.cache.sheet.tags[0];\n }\n this.insertStyles();\n };\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n if (prevProps.serialized.name !== this.props.serialized.name) {\n this.insertStyles();\n }\n };\n _proto.insertStyles = function insertStyles$1() {\n if (this.props.serialized.next !== undefined) {\n // insert keyframes\n insertStyles(this.props.cache, this.props.serialized.next, true);\n }\n if (this.sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = this.sheet.tags[this.sheet.tags.length - 1].nextElementSibling;\n this.sheet.before = element;\n this.sheet.flush();\n }\n this.props.cache.insert(\"\", this.props.serialized, this.sheet, false);\n };\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.sheet.flush();\n };\n _proto.render = function render() {\n return null;\n };\n return InnerGlobal;\n}(Component);\nvar keyframes = function keyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name; // $FlowFixMe\n\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n};\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n switch (typeof arg) {\n case 'boolean':\n break;\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n toAdd = '';\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n break;\n }\n default:\n {\n toAdd = arg;\n }\n }\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n return cls;\n};\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n if (registeredStyles.length < 2) {\n return className;\n }\n return rawClassName + css(registeredStyles);\n}\nvar Noop = function Noop() {\n return null;\n};\nvar ClassNames = withEmotionCache(function (props, context) {\n return /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) {\n var hasRendered = false;\n var css = function css() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('css can only be used during render');\n }\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n var serialized = serializeStyles(args, context.registered);\n {\n insertStyles(context, serialized, false);\n }\n return context.key + \"-\" + serialized.name;\n };\n var cx = function cx() {\n if (hasRendered && process.env.NODE_ENV !== 'production') {\n throw new Error('cx can only be used during render');\n }\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return merge(context.registered, css, classnames(args));\n };\n var content = {\n css: css,\n cx: cx,\n theme: theme\n };\n var ele = props.children(content);\n hasRendered = true;\n var possiblyStyleElement = /*#__PURE__*/createElement(Noop, null);\n return /*#__PURE__*/createElement(Fragment, null, possiblyStyleElement, ele);\n });\n});\nexport { ClassNames, Global, jsx as createElement, jsx, keyframes };","import \"core-js/modules/esnext.global-this.js\";\nimport hash from 'hash-sum';\nimport { __assign } from 'tslib';\n(function () {\n if (typeof window === 'undefined' || typeof window.CustomEvent === 'function') return false;\n function CustomEvent(event, params) {\n params = params || {\n bubbles: false,\n cancelable: false,\n detail: null\n };\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n }\n window.CustomEvent = CustomEvent;\n})();\nvar isSafari = typeof window !== 'undefined' && /^((?!chrome|android).)*safari/i.test(window.navigator.userAgent);\n// TODO: queue all of these in a debounceNextTick\nfunction nextTick(fn) {\n // React native\n if (typeof setImmediate === 'function' && typeof window === 'undefined') {\n return setImmediate(fn);\n }\n // TODO: should this be setImmediate instead? Forgot if that is micro or macro task\n // TODO: detect specifically if is server\n // if (typeof process !== 'undefined' && process.nextTick) {\n // console.log('process.nextTick?');\n // process.nextTick(fn);\n // return;\n // }\n // FIXME: fix the real safari issue of this randomly not working\n if (isSafari || typeof MutationObserver === 'undefined') {\n setTimeout(fn);\n return;\n }\n var called = 0;\n var observer = new MutationObserver(function () {\n return fn();\n });\n var element = document.createTextNode('');\n observer.observe(element, {\n characterData: true\n });\n // tslint:disable-next-line\n element.data = String(called = ++called);\n}\nvar PROPERTY_NAME_DENY_LIST = Object.freeze(['__proto__', 'prototype', 'constructor']);\n// TODO: unit tests\nvar QueryString = /** @class */function () {\n function QueryString() {}\n QueryString.parseDeep = function (queryString) {\n var obj = this.parse(queryString);\n return this.deepen(obj);\n };\n QueryString.stringifyDeep = function (obj) {\n var map = this.flatten(obj);\n return this.stringify(map);\n };\n QueryString.parse = function (queryString) {\n var query = {};\n var pairs = (queryString[0] === '?' ? queryString.substr(1) : queryString).split('&');\n for (var i = 0; i < pairs.length; i++) {\n var pair = pairs[i].split('=');\n // TODO: node support?\n try {\n query[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1] || '');\n } catch (error) {\n // Ignore malformed URI components\n }\n }\n return query;\n };\n QueryString.stringify = function (map) {\n var str = '';\n for (var key in map) {\n if (map.hasOwnProperty(key)) {\n var value = map[key];\n if (str) {\n str += '&';\n }\n str += encodeURIComponent(key) + '=' + encodeURIComponent(value);\n }\n }\n return str;\n };\n QueryString.deepen = function (map) {\n // FIXME; Should be type Tree = Record\n // requires a typescript upgrade.\n var output = {};\n for (var k in map) {\n var t = output;\n var parts = k.split('.');\n var key = parts.pop();\n for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {\n var part = parts_1[_i];\n assertAllowedPropertyName(part);\n t = t[part] = t[part] || {};\n }\n t[key] = map[k];\n }\n return output;\n };\n QueryString.flatten = function (obj, _current, _res) {\n if (_res === void 0) {\n _res = {};\n }\n for (var key in obj) {\n var value = obj[key];\n var newKey = _current ? _current + '.' + key : key;\n if (value && typeof value === 'object') {\n this.flatten(value, newKey, _res);\n } else {\n _res[newKey] = value;\n }\n }\n return _res;\n };\n return QueryString;\n}();\nfunction assertAllowedPropertyName(name) {\n if (PROPERTY_NAME_DENY_LIST.indexOf(name) >= 0) throw new Error(\"Property name \\\"\".concat(name, \"\\\" is not allowed\"));\n}\nvar version = \"2.0.4-0\";\nvar Subscription = /** @class */function () {\n function Subscription(listeners, listener) {\n this.listeners = listeners;\n this.listener = listener;\n this.unsubscribed = false;\n this.otherSubscriptions = [];\n }\n Object.defineProperty(Subscription.prototype, \"closed\", {\n get: function get() {\n return this.unsubscribed;\n },\n enumerable: false,\n configurable: true\n });\n Subscription.prototype.add = function (subscription) {\n this.otherSubscriptions.push(subscription);\n };\n Subscription.prototype.unsubscribe = function () {\n if (this.unsubscribed) {\n return;\n }\n if (this.listener && this.listeners) {\n var index = this.listeners.indexOf(this.listener);\n if (index > -1) {\n this.listeners.splice(index, 1);\n }\n }\n this.otherSubscriptions.forEach(function (sub) {\n return sub.unsubscribe();\n });\n this.unsubscribed = true;\n };\n return Subscription;\n}();\n// TODO: follow minimal basic spec: https://github.com/tc39/proposal-observable\nvar BehaviorSubject = /** @class */function () {\n function BehaviorSubject(value) {\n this.value = value;\n this.listeners = [];\n this.errorListeners = [];\n }\n BehaviorSubject.prototype.next = function (value) {\n this.value = value;\n for (var _i = 0, _a = this.listeners; _i < _a.length; _i++) {\n var listener = _a[_i];\n listener(value);\n }\n };\n // TODO: implement this as PIPE instead\n BehaviorSubject.prototype.map = function (fn) {\n var newSubject = new BehaviorSubject(fn(this.value));\n // TODO: on destroy delete these\n this.subscribe(function (val) {\n newSubject.next(fn(val));\n });\n this.catch(function (err) {\n newSubject.error(err);\n });\n return newSubject;\n };\n BehaviorSubject.prototype.catch = function (errorListener) {\n this.errorListeners.push(errorListener);\n return new Subscription(this.errorListeners, errorListener);\n };\n BehaviorSubject.prototype.error = function (error) {\n for (var _i = 0, _a = this.errorListeners; _i < _a.length; _i++) {\n var listener = _a[_i];\n listener(error);\n }\n };\n BehaviorSubject.prototype.subscribe = function (listener, errorListener) {\n this.listeners.push(listener);\n if (errorListener) {\n this.errorListeners.push(errorListener);\n }\n return new Subscription(this.listeners, listener);\n };\n BehaviorSubject.prototype.toPromise = function () {\n var _this = this;\n return new Promise(function (resolve, reject) {\n var subscription = _this.subscribe(function (value) {\n resolve(value);\n subscription.unsubscribe();\n }, function (err) {\n reject(err);\n subscription.unsubscribe();\n });\n });\n };\n BehaviorSubject.prototype.promise = function () {\n return this.toPromise();\n };\n return BehaviorSubject;\n}();\nvar State = {\n Pending: 'Pending',\n Fulfilled: 'Fulfilled',\n Rejected: 'Rejected'\n};\nfunction isFunction(val) {\n return val && typeof val === 'function';\n}\nfunction isObject(val) {\n return val && typeof val === 'object';\n}\nvar TinyPromise = /** @class */function () {\n function TinyPromise(executor) {\n this._state = State.Pending;\n this._handlers = [];\n this._value = null;\n executor(this._resolve.bind(this), this._reject.bind(this));\n }\n TinyPromise.prototype._resolve = function (x) {\n var _this = this;\n if (x instanceof TinyPromise) {\n x.then(this._resolve.bind(this), this._reject.bind(this));\n } else if (isObject(x) || isFunction(x)) {\n var called_1 = false;\n try {\n var thenable = x.then;\n if (isFunction(thenable)) {\n thenable.call(x, function (result) {\n if (!called_1) _this._resolve(result);\n called_1 = true;\n return undefined;\n }, function (error) {\n if (!called_1) _this._reject(error);\n called_1 = true;\n return undefined;\n });\n } else {\n this._fulfill(x);\n }\n } catch (ex) {\n if (!called_1) {\n this._reject(ex);\n }\n }\n } else {\n this._fulfill(x);\n }\n };\n TinyPromise.prototype._fulfill = function (result) {\n var _this = this;\n this._state = State.Fulfilled;\n this._value = result;\n this._handlers.forEach(function (handler) {\n return _this._callHandler(handler);\n });\n };\n TinyPromise.prototype._reject = function (error) {\n var _this = this;\n this._state = State.Rejected;\n this._value = error;\n this._handlers.forEach(function (handler) {\n return _this._callHandler(handler);\n });\n };\n TinyPromise.prototype._isPending = function () {\n return this._state === State.Pending;\n };\n TinyPromise.prototype._isFulfilled = function () {\n return this._state === State.Fulfilled;\n };\n TinyPromise.prototype._isRejected = function () {\n return this._state === State.Rejected;\n };\n TinyPromise.prototype._addHandler = function (onFulfilled, onRejected) {\n this._handlers.push({\n onFulfilled: onFulfilled,\n onRejected: onRejected\n });\n };\n TinyPromise.prototype._callHandler = function (handler) {\n if (this._isFulfilled() && isFunction(handler.onFulfilled)) {\n handler.onFulfilled(this._value);\n } else if (this._isRejected() && isFunction(handler.onRejected)) {\n handler.onRejected(this._value);\n }\n };\n TinyPromise.prototype.then = function (onFulfilled, onRejected) {\n var _this = this;\n switch (this._state) {\n case State.Pending:\n {\n return new TinyPromise(function (resolve, reject) {\n _this._addHandler(function (value) {\n nextTick(function () {\n try {\n if (isFunction(onFulfilled)) {\n resolve(onFulfilled(value));\n } else {\n resolve(value);\n }\n } catch (ex) {\n reject(ex);\n }\n });\n }, function (error) {\n nextTick(function () {\n try {\n if (isFunction(onRejected)) {\n resolve(onRejected(error));\n } else {\n reject(error);\n }\n } catch (ex) {\n reject(ex);\n }\n });\n });\n });\n }\n case State.Fulfilled:\n {\n return new TinyPromise(function (resolve, reject) {\n nextTick(function () {\n try {\n if (isFunction(onFulfilled)) {\n resolve(onFulfilled(_this._value));\n } else {\n resolve(_this._value);\n }\n } catch (ex) {\n reject(ex);\n }\n });\n });\n }\n case State.Rejected:\n {\n return new TinyPromise(function (resolve, reject) {\n nextTick(function () {\n try {\n if (isFunction(onRejected)) {\n resolve(onRejected(_this._value));\n } else {\n reject(_this._value);\n }\n } catch (ex) {\n reject(ex);\n }\n });\n });\n }\n }\n };\n return TinyPromise;\n}();\nvar Promise$1 = typeof Promise !== 'undefined' ? Promise : TinyPromise;\n\n// Webpack workaround to conditionally require certain external modules\n// only on the server and not bundle them on the client\nvar serverOnlyRequire;\ntry {\n // tslint:disable-next-line:no-eval\n serverOnlyRequire = eval('require');\n} catch (err) {\n // all good\n serverOnlyRequire = function serverOnlyRequire() {\n return null;\n };\n}\nvar serverOnlyRequire$1 = serverOnlyRequire;\nfunction promiseResolve(value) {\n return new Promise$1(function (resolve) {\n return resolve(value);\n });\n}\n// Adapted from https://raw.githubusercontent.com/developit/unfetch/master/src/index.mjs\nfunction tinyFetch(url, options) {\n if (options === void 0) {\n options = {};\n }\n return new Promise$1(function (resolve, reject) {\n var request = new XMLHttpRequest();\n request.open(options.method || 'get', url, true);\n if (options.headers) {\n for (var i in options.headers) {\n request.setRequestHeader(i, options.headers[i]);\n }\n }\n request.withCredentials = options.credentials === 'include';\n request.onload = function () {\n resolve(response());\n };\n request.onerror = reject;\n request.send(options.body);\n function response() {\n var _keys = [];\n var all = [];\n var headers = {};\n var header = undefined;\n request.getAllResponseHeaders().replace(/^(.*?):[^\\S\\n]*([\\s\\S]*?)$/gm, function (_match, _key, value) {\n var key = _key;\n _keys.push(key = key.toLowerCase());\n all.push([key, value]);\n header = headers[key];\n headers[key] = header ? \"\".concat(header, \",\").concat(value) : value;\n return '';\n });\n return {\n ok: (request.status / 100 | 0) === 2,\n status: request.status,\n statusText: request.statusText,\n url: request.responseURL,\n clone: response,\n text: function text() {\n return promiseResolve(request.responseText);\n },\n json: function json() {\n return promiseResolve(request.responseText).then(JSON.parse);\n },\n blob: function blob() {\n return promiseResolve(new Blob([request.response]));\n },\n headers: {\n keys: function keys() {\n return _keys;\n },\n entries: function entries() {\n return all;\n },\n get: function get(n) {\n return headers[n.toLowerCase()];\n },\n has: function has(n) {\n return n.toLowerCase() in headers;\n }\n }\n };\n }\n });\n}\nfunction getFetch() {\n // If fetch is defined, in the browser, via polyfill, or in a Cloudflare worker, use it.\n var _fetch = undefined;\n if (globalThis.fetch) {\n _fetch !== null && _fetch !== void 0 ? _fetch : _fetch = globalThis.fetch;\n } else if (typeof window === 'undefined') {\n // If fetch is not defined, in a Node.js environment, use node-fetch.\n try {\n // node-fetch@^3 is ESM only, and will throw error on require.\n _fetch !== null && _fetch !== void 0 ? _fetch : _fetch = serverOnlyRequire$1('node-fetch');\n } catch (e) {\n // If node-fetch is not installed, use tiny-fetch.\n console.warn('node-fetch is not installed. consider polyfilling fetch or installing node-fetch.');\n console.warn(e);\n }\n }\n // Otherwise, use tiny-fetch.\n return _fetch !== null && _fetch !== void 0 ? _fetch : tinyFetch;\n}\nfunction assign(target) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var to = Object(target);\n for (var index = 1; index < arguments.length; index++) {\n var nextSource = arguments[index];\n if (nextSource != null) {\n // Skip over if undefined or null\n for (var nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n return to;\n}\nfunction throttle(func, wait, options) {\n if (options === void 0) {\n options = {};\n }\n var context;\n var args;\n var result;\n var timeout = null;\n var previous = 0;\n var later = function later() {\n previous = options.leading === false ? 0 : Date.now();\n timeout = null;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n };\n return function () {\n var now = Date.now();\n if (!previous && options.leading === false) previous = now;\n var remaining = wait - (now - previous);\n context = this;\n args = arguments;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n result = func.apply(context, args);\n if (!timeout) context = args = null;\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(later, remaining);\n }\n return result;\n };\n}\nvar camelCaseToKebabCase = function camelCaseToKebabCase(str) {\n return str ? str.replace(/([A-Z])/g, function (g) {\n return \"-\".concat(g[0].toLowerCase());\n }) : '';\n};\nvar Animator = /** @class */function () {\n function Animator() {}\n Animator.prototype.bindAnimations = function (animations) {\n for (var _i = 0, animations_1 = animations; _i < animations_1.length; _i++) {\n var animation = animations_1[_i];\n switch (animation.trigger) {\n case 'pageLoad':\n this.triggerAnimation(animation);\n break;\n case 'hover':\n this.bindHoverAnimation(animation);\n break;\n case 'scrollInView':\n this.bindScrollInViewAnimation(animation);\n break;\n }\n }\n };\n Animator.prototype.warnElementNotPresent = function (id) {\n console.warn(\"Cannot animate element: element with ID \".concat(id, \" not found!\"));\n };\n Animator.prototype.augmentAnimation = function (animation, element) {\n var stylesUsed = this.getAllStylesUsed(animation);\n var computedStyle = getComputedStyle(element);\n // const computedStyle = getComputedStyle(element);\n // // FIXME: this will break if original load is in one reponsive size then resize to another hmmm\n // Need to use transform instead of left since left can change on screen sizes\n var firstStyles = animation.steps[0].styles;\n var lastStyles = animation.steps[animation.steps.length - 1].styles;\n var bothStyles = [firstStyles, lastStyles];\n // FIXME: this won't work as expected for augmented animations - may need the editor itself to manage this\n for (var _i = 0, bothStyles_1 = bothStyles; _i < bothStyles_1.length; _i++) {\n var styles = bothStyles_1[_i];\n for (var _a = 0, stylesUsed_1 = stylesUsed; _a < stylesUsed_1.length; _a++) {\n var style = stylesUsed_1[_a];\n if (!(style in styles)) {\n styles[style] = computedStyle[style];\n }\n }\n }\n };\n Animator.prototype.getAllStylesUsed = function (animation) {\n var properties = [];\n for (var _i = 0, _a = animation.steps; _i < _a.length; _i++) {\n var step = _a[_i];\n for (var key in step.styles) {\n if (properties.indexOf(key) === -1) {\n properties.push(key);\n }\n }\n }\n return properties;\n };\n Animator.prototype.triggerAnimation = function (animation) {\n var _this = this;\n // TODO: do for ALL elements\n var elements = Array.prototype.slice.call(document.getElementsByClassName(animation.elementId || animation.id || ''));\n if (!elements.length) {\n this.warnElementNotPresent(animation.elementId || animation.id || '');\n return;\n }\n Array.from(elements).forEach(function (element) {\n _this.augmentAnimation(animation, element);\n // TODO: do this properly, may have other animations of different properties\n // TODO: only override the properties\n // TODO: if there is an entrance and hover animation, the transition duration will get effed\n // element.setAttribute('style', '');\n // const styledUsed = this.getAllStylesUsed(animation);\n element.style.transition = 'none';\n element.style.transitionDelay = '0';\n assign(element.style, animation.steps[0].styles);\n // TODO: queue/batch these timeouts\n // TODO: only include properties explicitly set in the animation\n // using Object.keys(styles)\n setTimeout(function () {\n element.style.transition = \"all \".concat(animation.duration, \"s \").concat(camelCaseToKebabCase(animation.easing));\n if (animation.delay) {\n element.style.transitionDelay = animation.delay + 's';\n }\n assign(element.style, animation.steps[1].styles);\n // TODO: maybe remove/reset transitoin property after animation duration\n // TODO: queue timers\n setTimeout(function () {\n // TODO: what if has other transition (reset back to what it was)\n element.style.transition = '';\n element.style.transitionDelay = '';\n }, (animation.delay || 0) * 1000 + animation.duration * 1000 + 100);\n });\n });\n };\n Animator.prototype.bindHoverAnimation = function (animation) {\n var _this = this;\n // TODO: is it multiple binding when editing...?\n // TODO: unbind on element remove\n // TODO: apply to ALL elements\n var elements = Array.prototype.slice.call(document.getElementsByClassName(animation.elementId || animation.id || ''));\n if (!elements.length) {\n this.warnElementNotPresent(animation.elementId || animation.id || '');\n return;\n }\n Array.from(elements).forEach(function (element) {\n _this.augmentAnimation(animation, element);\n var defaultState = animation.steps[0].styles;\n var hoverState = animation.steps[1].styles;\n function attachDefaultState() {\n assign(element.style, defaultState);\n }\n function attachHoverState() {\n assign(element.style, hoverState);\n }\n attachDefaultState();\n element.addEventListener('mouseenter', attachHoverState);\n element.addEventListener('mouseleave', attachDefaultState);\n // TODO: queue/batch these timeouts\n setTimeout(function () {\n element.style.transition = \"all \".concat(animation.duration, \"s \").concat(camelCaseToKebabCase(animation.easing));\n if (animation.delay) {\n element.style.transitionDelay = animation.delay + 's';\n }\n });\n });\n };\n // TODO: unbind on element remove\n Animator.prototype.bindScrollInViewAnimation = function (animation) {\n var _this = this;\n // TODO: apply to ALL matching elements\n var elements = Array.prototype.slice.call(document.getElementsByClassName(animation.elementId || animation.id || ''));\n if (!elements.length) {\n this.warnElementNotPresent(animation.elementId || animation.id || '');\n return;\n }\n // TODO: if server side rendered and scrolled into view don't animate...\n Array.from(elements).forEach(function (element) {\n _this.augmentAnimation(animation, element);\n var triggered = false;\n var pendingAnimation = false;\n function immediateOnScroll() {\n if (!triggered && isScrolledIntoView(element)) {\n triggered = true;\n pendingAnimation = true;\n setTimeout(function () {\n assign(element.style, animation.steps[1].styles);\n if (!animation.repeat) {\n document.removeEventListener('scroll', onScroll);\n }\n setTimeout(function () {\n pendingAnimation = false;\n if (!animation.repeat) {\n element.style.transition = '';\n element.style.transitionDelay = '';\n }\n }, (animation.duration + (animation.delay || 0)) * 1000 + 100);\n });\n } else if (animation.repeat && triggered && !pendingAnimation && !isScrolledIntoView(element)) {\n // we want to repeat the animation every time the the element is out of view and back again\n triggered = false;\n assign(element.style, animation.steps[0].styles);\n }\n }\n // TODO: roll all of these in one for more efficiency of checking all the rects\n var onScroll = throttle(immediateOnScroll, 200, {\n leading: false\n });\n // TODO: fully in view or partially\n function isScrolledIntoView(elem) {\n var rect = elem.getBoundingClientRect();\n var windowHeight = window.innerHeight;\n var thresholdPercent = (animation.thresholdPercent || 0) / 100;\n var threshold = thresholdPercent * windowHeight;\n // TODO: partial in view? or what if element is larger than screen itself\n return rect.bottom > threshold && rect.top < windowHeight - threshold // Element is peeking top or bottom\n // (rect.top > 0 && rect.bottom < window.innerHeight) || // element fits within the screen and is fully on screen (not hanging off at all)\n // (rect.top < 0 && rect.bottom > window.innerHeight) // element is larger than the screen and hangs over the top and bottom\n ;\n }\n\n var defaultState = animation.steps[0].styles;\n function attachDefaultState() {\n assign(element.style, defaultState);\n }\n attachDefaultState();\n // TODO: queue/batch these timeouts!\n setTimeout(function () {\n element.style.transition = \"all \".concat(animation.duration, \"s \").concat(camelCaseToKebabCase(animation.easing));\n if (animation.delay) {\n element.style.transitionDelay = animation.delay + 's';\n }\n });\n // TODO: one listener for everything\n document.addEventListener('scroll', onScroll, {\n capture: true,\n passive: true\n });\n // Do an initial check\n immediateOnScroll();\n });\n };\n return Animator;\n}();\n\n/**\n * Only gets one level up from hostname\n * wwww.example.com -> example.com\n * www.example.co.uk -> example.co.uk\n */\nfunction getTopLevelDomain(host) {\n var parts = host.split('.');\n if (parts.length > 2) {\n return parts.slice(1).join('.');\n }\n return host;\n}\n\n/**\n * RegExp to match field-content in RFC 7230 sec 3.2\n *\n * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]\n * field-vchar = VCHAR / obs-text\n * obs-text = %x80-FF\n */\nvar fieldContentRegExp = /^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;\nvar Cookies = /** @class */function () {\n function Cookies(request, response) {\n this.request = request;\n this.response = response;\n }\n Cookies.prototype.get = function (name) {\n var header = this.request.headers['cookie'];\n if (!header) {\n return;\n }\n var match = header.match(getPattern(name));\n if (!match) {\n return;\n }\n var value = match[1];\n return value;\n };\n Cookies.prototype.set = function (name, value, opts) {\n var res = this.response;\n var req = this.request;\n var headers = res.getHeader('Set-Cookie') || [];\n // TODO: just make this always true\n var secure = this.secure !== undefined ? !!this.secure : req.protocol === 'https' || req.connection.encrypted;\n var cookie = new Cookie(name, value, opts);\n if (typeof headers === 'string') {\n headers = [headers];\n }\n if (!secure && opts && opts.secure) {\n throw new Error('Cannot send secure cookie over unencrypted connection');\n }\n cookie.secure = secure;\n if (opts && 'secure' in opts) {\n cookie.secure = !!opts.secure;\n }\n cookie.domain = req.headers.host && getTopLevelDomain(req.headers.host);\n pushCookie(headers, cookie);\n var setHeader = res.setHeader;\n setHeader.call(res, 'Set-Cookie', headers);\n return this;\n };\n return Cookies;\n}();\nvar Cookie = /** @class */function () {\n function Cookie(name, value, attrs) {\n this.path = '/';\n this.domain = undefined;\n this.httpOnly = true;\n this.sameSite = false;\n this.secure = false;\n this.overwrite = false;\n this.name = '';\n this.value = '';\n if (!fieldContentRegExp.test(name)) {\n throw new TypeError('argument name is invalid');\n }\n if (value && !fieldContentRegExp.test(value)) {\n throw new TypeError('argument value is invalid');\n }\n if (!value) {\n this.expires = new Date(0);\n }\n this.name = name;\n this.value = value || '';\n if (attrs.expires) {\n this.expires = attrs.expires;\n }\n if (attrs.secure) {\n this.secure = attrs.secure;\n }\n }\n Cookie.prototype.toString = function () {\n return \"\".concat(this.name, \"=\").concat(this.value);\n };\n Cookie.prototype.toHeader = function () {\n var header = this.toString();\n if (this.maxAge) {\n this.expires = new Date(Date.now() + this.maxAge);\n }\n if (this.path) {\n header += \"; path=\".concat(this.path);\n }\n if (this.expires) {\n header += \"; expires=\".concat(this.expires.toUTCString());\n }\n if (this.domain) {\n header += \"; domain=\".concat(this.domain);\n }\n // TODO: samesite=none by default (?)\n header += \"; SameSite=\".concat(this.sameSite === true ? 'strict' : 'None');\n // TODO: On by default\n if (this.secure) {\n header += '; secure';\n }\n if (this.httpOnly) {\n header += '; httponly';\n }\n return header;\n };\n return Cookie;\n}();\nfunction getPattern(name) {\n return new RegExp(\"(?:^|;) *\".concat(name.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&'), \"=([^;]*)\"));\n}\nfunction pushCookie(headers, cookie) {\n if (cookie.overwrite) {\n for (var i = headers.length - 1; i >= 0; i--) {\n if (headers[i].indexOf(\"\".concat(cookie.name, \"=\")) === 0) {\n headers.splice(i, 1);\n }\n }\n }\n headers.push(cookie.toHeader());\n}\nfunction omit(obj) {\n var values = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n values[_i - 1] = arguments[_i];\n }\n var newObject = Object.assign({}, obj);\n for (var _a = 0, values_1 = values; _a < values_1.length; _a++) {\n var key = values_1[_a];\n delete newObject[key];\n }\n return newObject;\n}\n\n/**\n * @credit https://stackoverflow.com/a/2117523\n */\nfunction uuidv4() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = Math.random() * 16 | 0,\n v = c == 'x' ? r : r & 0x3 | 0x8;\n return v.toString(16);\n });\n}\n/**\n * Slightly cleaner and smaller UUIDs\n */\nfunction uuid() {\n return uuidv4().replace(/-/g, '');\n}\nfunction emptyUrl() {\n return {\n query: null,\n port: null,\n auth: null,\n hash: null,\n host: null,\n hostname: null,\n href: null,\n path: null,\n pathname: null,\n protocol: null,\n search: null,\n slashes: null\n };\n}\n// Replacement for `url.parse` using `URL` global object that works with relative paths.\n// Assumptions: this function operates in a NodeJS environment.\nfunction parse(url) {\n var out = emptyUrl();\n var u;\n var pathOnly = url === '' || url[0] === '/';\n if (pathOnly) {\n u = new URL(url, 'http://0.0.0.0/');\n out.href = u.href;\n out.href = out.href.slice(14); // remove 'http://0.0.0.0/'\n } else {\n u = new URL(url);\n out.href = u.href;\n out.port = u.port === '' ? null : u.port;\n out.hash = u.hash === '' ? null : u.hash;\n out.host = u.host;\n out.hostname = u.hostname;\n out.href = u.href;\n out.pathname = u.pathname;\n out.protocol = u.protocol;\n out.slashes = url[u.protocol.length] === '/'; // check if the mimetype is proceeded by a slash\n }\n\n out.search = u.search;\n out.query = u.search.slice(1); // remove '?'\n out.path = \"\".concat(u.pathname).concat(u.search);\n out.pathname = u.pathname;\n return out;\n}\n\n/**\n * Safe conversion to error type. Intended to be used in catch blocks where the\n * value is not guaranteed to be an error.\n *\n * @example\n * try {\n * throw new Error('Something went wrong')\n * }\n * catch (err: unknown) {\n * const error: Error = toError(err)\n * }\n */\nfunction toError(err) {\n if (err instanceof Error) return err;\n return new Error(String(err));\n}\nvar DEFAULT_API_VERSION = 'v3';\nfunction datePlusMinutes(minutes) {\n if (minutes === void 0) {\n minutes = 30;\n }\n return new Date(Date.now() + minutes * 60000);\n}\nvar isPositiveNumber = function isPositiveNumber(thing) {\n return typeof thing === 'number' && !isNaN(thing) && thing >= 0;\n};\nvar isReactNative = typeof navigator === 'object' && navigator.product === 'ReactNative';\nvar validEnvList = ['production', 'qa', 'test', 'development', 'dev', 'cdn-qa', 'cloud', 'fast', 'cdn2', 'cdn-prod'];\nfunction getQueryParam(url, variable) {\n var query = url.split('?')[1] || '';\n var vars = query.split('&');\n for (var i = 0; i < vars.length; i++) {\n var pair = vars[i].split('=');\n if (decodeURIComponent(pair[0]) === variable) {\n return decodeURIComponent(pair[1]);\n }\n }\n return null;\n}\nvar urlParser = {\n parse: function parse(url) {\n var el = document.createElement('a');\n el.href = url;\n var out = {};\n var props = ['username', 'password', 'host', 'hostname', 'port', 'protocol', 'origin', 'pathname', 'search', 'hash'];\n for (var _i = 0, props_1 = props; _i < props_1.length; _i++) {\n var prop = props_1[_i];\n out[prop] = el[prop];\n }\n // IE 11 pathname handling workaround\n // (IE omits preceeding '/', unlike other browsers)\n if ((out.pathname || out.pathname === '') && typeof out.pathname === 'string' && out.pathname.indexOf('/') !== 0) {\n out.pathname = '/' + out.pathname;\n }\n return out;\n }\n};\nvar parse$1 = isReactNative ? function () {\n return emptyUrl();\n} : typeof window === 'object' ? urlParser.parse : parse;\nfunction setCookie(name$$1, value, expires) {\n try {\n var expiresString = '';\n // TODO: need to know if secure server side\n if (expires) {\n expiresString = '; expires=' + expires.toUTCString();\n }\n var secure = isBrowser ? location.protocol === 'https:' : true;\n document.cookie = name$$1 + '=' + (value || '') + expiresString + '; path=/' + \"; domain=\".concat(getTopLevelDomain(location.hostname)) + (secure ? ';secure ; SameSite=None' : '');\n } catch (err) {\n console.warn('Could not set cookie', err);\n }\n}\nfunction getCookie(name$$1) {\n try {\n return decodeURIComponent(document.cookie.replace(new RegExp('(?:(?:^|.*;)\\\\s*' + encodeURIComponent(name$$1).replace(/[\\-\\.\\+\\*]/g, '\\\\$&') + '\\\\s*\\\\=\\\\s*([^;]*).*$)|^.*$'), '$1')) || null;\n } catch (err) {\n console.warn('Could not get cookie', err);\n }\n}\nfunction size(object) {\n return Object.keys(object).length;\n}\nfunction find(target, callback) {\n var list = target;\n // Makes sures is always has an positive integer as length.\n var length = list.length >>> 0;\n var thisArg = arguments[1];\n for (var i = 0; i < length; i++) {\n var element = list[i];\n if (callback.call(thisArg, element, i, list)) {\n return element;\n }\n }\n}\nvar sessionStorageKey = 'builderSessionId';\nvar localStorageKey = 'builderVisitorId';\nvar isBrowser = typeof window !== 'undefined' && !isReactNative;\nvar isIframe = isBrowser && window.top !== window.self;\nfunction BuilderComponent(info) {\n if (info === void 0) {\n info = {};\n }\n return Builder.Component(info);\n}\nvar Builder = /** @class */function () {\n function Builder(apiKey, request, response, forceNewInstance, authToken, apiVersion) {\n if (apiKey === void 0) {\n apiKey = null;\n }\n if (forceNewInstance === void 0) {\n forceNewInstance = false;\n }\n if (authToken === void 0) {\n authToken = null;\n }\n var _this = this;\n this.request = request;\n this.response = response;\n this.eventsQueue = [];\n this.throttledClearEventsQueue = throttle(function () {\n _this.processEventsQueue();\n // Extend the session cookie\n _this.setCookie(sessionStorageKey, _this.sessionId, datePlusMinutes(30));\n }, 5);\n this.env = 'production';\n this.sessionId = this.getSessionId();\n this.targetContent = true;\n this.contentPerRequest = 1;\n // TODO: make array or function\n this.allowCustomFonts = true;\n this.cookies = null;\n // TODO: api options object\n this.cachebust = false;\n this.overrideParams = '';\n this.noCache = false;\n this.preview = false;\n this.apiVersion$ = new BehaviorSubject(undefined);\n this.canTrack$ = new BehaviorSubject(!this.browserTrackingDisabled);\n this.apiKey$ = new BehaviorSubject(null);\n this.authToken$ = new BehaviorSubject(null);\n this.userAttributesChanged = new BehaviorSubject(null);\n this.editingMode$ = new BehaviorSubject(isIframe);\n // TODO: decorator to do this stuff with the get/set (how do with typing too? compiler?)\n this.editingModel$ = new BehaviorSubject(null);\n this.userAgent = typeof navigator === 'object' && navigator.userAgent || '';\n this.trackingHooks = [];\n // Set this to control the userId\n // TODO: allow changing it mid session and updating existing data to be associated\n // e.g. for when a user navigates and then logs in\n this.visitorId = this.getVisitorId();\n this.autoTrack = !Builder.isBrowser ? false : !this.isDevelopmentEnv && !(Builder.isBrowser && location.search.indexOf('builder.preview=') !== -1);\n this.trackingUserAttributes = {};\n this.blockContentLoading = '';\n this.observersByKey = {};\n this.noEditorUpdates = {};\n this.overrides = {};\n this.queryOptions = {};\n this.getContentQueue = null;\n this.priorContentQueue = null;\n this.testCookiePrefix = 'builder.tests';\n this.cookieQueue = [];\n // TODO: use a window variable for this perhaps, e.g. bc webcomponents may be loading builder twice\n // with it's and react (use rollup build to fix)\n if (Builder.isBrowser && !forceNewInstance && Builder.singletonInstance) {\n return Builder.singletonInstance;\n }\n if (this.request && this.response) {\n this.setUserAgent(this.request.headers['user-agent'] || '');\n this.cookies = new Cookies(this.request, this.response);\n }\n if (apiKey) {\n this.apiKey = apiKey;\n }\n if (apiVersion) {\n this.apiVersion = apiVersion;\n }\n if (authToken) {\n this.authToken = authToken;\n }\n if (isBrowser) {\n this.bindMessageListeners();\n if (Builder.isEditing) {\n parent.postMessage({\n type: 'builder.animatorOptions',\n data: {\n options: {\n version: 2\n }\n }\n }, '*');\n }\n // TODO: postmessage to parent the builder info for every package\n // type: 'builder.sdk', data: { name: '@builder.io/react', version: '0.1.23' }\n // (window as any).BUILDER_VERSION = Builder.VERSION;\n // Ensure always one Builder global singleton\n // TODO: some people won't want this, e.g. rakuten\n // Maybe hide this behind symbol or on document, etc\n // if ((window as any).Builder) {\n // Builder.components = (window as any).Builder.components;\n // } else {\n // (window as any).Builder = Builder;\n // }\n }\n\n if (isIframe) {\n this.messageFrameLoaded();\n }\n // TODO: on destroy clear subscription\n this.canTrack$.subscribe(function (value) {\n if (value) {\n if (typeof sessionStorage !== 'undefined') {\n try {\n if (!sessionStorage.getItem(sessionStorageKey)) {\n sessionStorage.setItem(sessionStorageKey, _this.sessionId);\n }\n } catch (err) {\n console.debug('Session storage error', err);\n }\n }\n if (_this.eventsQueue.length) {\n _this.throttledClearEventsQueue();\n }\n if (_this.cookieQueue.length) {\n _this.cookieQueue.forEach(function (item) {\n _this.setCookie(item[0], item[1]);\n });\n _this.cookieQueue.length = 0;\n }\n }\n });\n if (isBrowser) {\n // TODO: defer so subclass constructor runs and injects location service\n this.setTestsFromUrl();\n // TODO: do this on every request send?\n this.getOverridesFromQueryString();\n }\n }\n Builder.register = function (type, info) {\n // TODO: all must have name and can't conflict?\n var typeList = this.registry[type];\n if (!typeList) {\n typeList = this.registry[type] = [];\n }\n typeList.push(info);\n if (Builder.isBrowser) {\n var message = {\n type: 'builder.register',\n data: {\n type: type,\n info: info\n }\n };\n try {\n parent.postMessage(message, '*');\n if (parent !== window) {\n window.postMessage(message, '*');\n }\n } catch (err) {\n console.debug('Could not postmessage', err);\n }\n }\n this.registryChange.next(this.registry);\n };\n Builder.registerEditor = function (info) {\n if (Builder.isBrowser) {\n window.postMessage({\n type: 'builder.registerEditor',\n data: omit(info, 'component')\n }, '*');\n var hostname = location.hostname;\n if (!Builder.isTrustedHost(hostname)) {\n console.error('Builder.registerEditor() called in the wrong environment! You cannot load custom editors from your app, they must be loaded through the Builder.io app itself. Follow the readme here for more details: https://github.com/builderio/builder/tree/master/plugins/cloudinary or contact chat us in our Spectrum community for help: https://spectrum.chat/builder');\n }\n }\n this.editors.push(info);\n };\n Builder.registerPlugin = function (info) {\n this.plugins.push(info);\n };\n Builder.registerAction = function (action) {\n this.actions.push(action);\n };\n Builder.registerTrustedHost = function (host) {\n this.trustedHosts.push(host);\n };\n Builder.isTrustedHost = function (hostname) {\n return this.trustedHosts.findIndex(function (trustedHost) {\n return trustedHost === hostname || hostname.endsWith(\".\".concat(trustedHost));\n }) > -1;\n };\n Builder.runAction = function (action) {\n // TODO\n var actionObject = typeof action === 'string' ? find(this.actions, function (item) {\n return item.name === action;\n }) : action;\n if (!actionObject) {\n throw new Error(\"Action not found: \".concat(action));\n }\n };\n Builder.fields = function (name$$1, fields) {\n var _a;\n (_a = window.parent) === null || _a === void 0 ? void 0 : _a.postMessage({\n type: 'builder.fields',\n data: {\n name: name$$1,\n fields: fields\n }\n }, '*');\n };\n /**\n * @deprecated\n * @hidden\n *\n * Use Builder.register('editor.settings', {}) instead.\n */\n Builder.set = function (settings) {\n Builder.register('editor.settings', settings);\n };\n Builder.import = function (packageName) {\n if (!Builder.isBrowser) {\n // TODO: server side support *maybe*\n console.warn('Builder.import used on the server - this should only be used in the browser');\n return;\n }\n var System = window.System;\n if (!System) {\n console.warn('System.js not available. Please include System.js when using Builder.import');\n return;\n }\n return System.import(\"https://cdn.builder.io/systemjs/\".concat(packageName));\n };\n Object.defineProperty(Builder, \"editingPage\", {\n // useCdnApi = false;\n get: function get() {\n return this._editingPage;\n },\n set: function set(editingPage) {\n this._editingPage = editingPage;\n if (isBrowser && isIframe) {\n if (editingPage) {\n document.body.classList.add('builder-editing-page');\n } else {\n document.body.classList.remove('builder-editing-page');\n }\n }\n },\n enumerable: false,\n configurable: true\n });\n Builder.prepareComponentSpecToSend = function (spec) {\n return __assign(__assign(__assign({}, spec), spec.inputs && {\n inputs: spec.inputs.map(function (input) {\n var _a;\n // TODO: do for nexted fields too\n // TODO: probably just convert all functions, not just\n // TODO: put this in input hooks: { onChange: ..., showIf: ... }\n var keysToConvertFnToString = ['onChange', 'showIf'];\n for (var _i = 0, keysToConvertFnToString_1 = keysToConvertFnToString; _i < keysToConvertFnToString_1.length; _i++) {\n var key = keysToConvertFnToString_1[_i];\n if (input[key] && typeof input[key] === 'function') {\n var fn = input[key];\n input = __assign(__assign({}, input), (_a = {}, _a[key] = \"return (\".concat(fn.toString(), \").apply(this, arguments)\"), _a));\n }\n }\n return input;\n })\n }), {\n hooks: Object.keys(spec.hooks || {}).reduce(function (memo, key) {\n var value = spec.hooks && spec.hooks[key];\n if (!value) {\n return memo;\n }\n if (typeof value === 'string') {\n memo[key] = value;\n } else {\n memo[key] = \"return (\".concat(value.toString(), \").apply(this, arguments)\");\n }\n return memo;\n }, {}),\n class: undefined\n });\n };\n Builder.registerBlock = function (component, options) {\n this.registerComponent(component, options);\n };\n Builder.registerComponent = function (component, options) {\n var _a;\n var spec = __assign(__assign({\n class: component\n }, component.builderOptions), options);\n this.addComponent(spec);\n var editable = options.models && this.singletonInstance.editingModel ? isBrowser && options.models.includes(this.singletonInstance.editingModel) : isBrowser;\n if (editable) {\n var sendSpec = this.prepareComponentSpecToSend(spec);\n (_a = window.parent) === null || _a === void 0 ? void 0 : _a.postMessage({\n type: 'builder.registerComponent',\n data: sendSpec\n }, '*');\n }\n };\n Builder.addComponent = function (component) {\n var current = find(this.components, function (item) {\n return item.name === component.name;\n });\n if (current) {\n // FIXME: why does sometimes we get an extra post without class - probably\n // from postMessage handler wrong in some place\n if (current.class && !component.class) {\n return;\n }\n this.components.splice(this.components.indexOf(current), 1, component);\n } else {\n this.components.push(component);\n }\n };\n // TODO: style guide, etc off this system as well?\n Builder.component = function (info) {\n var _this = this;\n if (info === void 0) {\n info = {};\n }\n return function (component) {\n var _a;\n var spec = __assign(__assign({}, info), {\n class: component\n });\n if (!spec.name) {\n spec.name = component.name;\n }\n _this.addComponent(spec);\n var sendSpec = _this.prepareComponentSpecToSend(spec);\n // TODO: serialize component name and inputs\n if (isBrowser) {\n (_a = window.parent) === null || _a === void 0 ? void 0 : _a.postMessage({\n type: 'builder.registerComponent',\n data: sendSpec\n }, '*');\n }\n return component;\n };\n };\n Object.defineProperty(Builder, \"Component\", {\n get: function get() {\n return this.component;\n },\n enumerable: false,\n configurable: true\n });\n Builder.prototype.processEventsQueue = function () {\n if (!this.eventsQueue.length) {\n return;\n }\n var events = this.eventsQueue;\n this.eventsQueue = [];\n var fullUserAttributes = __assign(__assign({}, Builder.overrideUserAttributes), this.trackingUserAttributes);\n for (var _i = 0, events_1 = events; _i < events_1.length; _i++) {\n var event_1 = events_1[_i];\n if (!event_1.data.metadata) {\n event_1.data.metadata = {};\n }\n if (!event_1.data.metadata.user) {\n event_1.data.metadata.user = {};\n }\n Object.assign(event_1.data.metadata.user, fullUserAttributes, event_1.data.metadata.user);\n }\n // var host = this.host;\n // getFetch()(\"\".concat(host, \"/api/v1/track\"), {\n // method: 'POST',\n // body: JSON.stringify({ events: events }),\n // headers: {\n // 'content-type': 'application/json',\n // },\n // mode: 'cors',\n // }).catch(function () {\n // // Not the end of the world\n // });\n };\n\n Object.defineProperty(Builder.prototype, \"browserTrackingDisabled\", {\n get: function get() {\n return Builder.isBrowser && Boolean(window.builderNoTrack || !navigator.cookieEnabled);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Builder.prototype, \"canTrack\", {\n get: function get() {\n return this.canTrack$.value;\n },\n set: function set(canTrack) {\n if (this.canTrack !== canTrack) {\n this.canTrack$.next(canTrack);\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Builder.prototype, \"apiVersion\", {\n get: function get() {\n return this.apiVersion$.value;\n },\n set: function set(apiVersion) {\n if (this.apiVersion !== apiVersion) {\n this.apiVersion$.next(apiVersion);\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Builder.prototype, \"editingMode\", {\n get: function get() {\n return this.editingMode$.value;\n },\n set: function set(value) {\n if (value !== this.editingMode) {\n this.editingMode$.next(value);\n }\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Builder.prototype, \"editingModel\", {\n get: function get() {\n return this.editingModel$.value;\n },\n set: function set(value) {\n if (value !== this.editingModel) {\n this.editingModel$.next(value);\n }\n },\n enumerable: false,\n configurable: true\n });\n Builder.prototype.findParentElement = function (target, callback, checkElement) {\n if (checkElement === void 0) {\n checkElement = true;\n }\n if (!(target instanceof HTMLElement)) {\n return null;\n }\n var parent = checkElement ? target : target.parentElement;\n do {\n if (!parent) {\n return null;\n }\n var matches = callback(parent);\n if (matches) {\n return parent;\n }\n } while (parent = parent.parentElement);\n return null;\n };\n Builder.prototype.findBuilderParent = function (target) {\n return this.findParentElement(target, function (el) {\n var id = el.getAttribute('builder-id') || el.id;\n return Boolean(id && id.indexOf('builder-') === 0);\n });\n };\n Builder.prototype.setUserAgent = function (userAgent) {\n this.userAgent = userAgent || '';\n };\n /**\n * Set a hook to modify events being tracked from builder, such as impressions and clicks\n *\n * For example, to track the model ID of each event associated with content for querying\n * by mode, you can do\n *\n * builder.setTrackingHook((event, context) => {\n * if (context.content) {\n * event.data.metadata.modelId = context.content.modelId\n * }\n * })\n */\n Builder.prototype.setTrackingHook = function (hook) {\n this.trackingHooks.push(hook);\n };\n Builder.prototype.track = function (eventName, properties, context) {\n if (properties === void 0) {\n properties = {};\n }\n // TODO: queue up track requests and fire them off when canTrack set to true - otherwise may get lots of clicks with no impressions\n if (isIframe || !isBrowser || Builder.isPreviewing) {\n return;\n }\n var apiKey = this.apiKey;\n if (!apiKey) {\n console.error('Builder integration error: Looks like the Builder SDK has not been initialized properly (your API key has not been set). Make sure you are calling `builder.init(\"«YOUR-API-KEY»\");` as early as possible in your application\\'s code.');\n return;\n }\n var eventData = JSON.parse(JSON.stringify({\n type: eventName,\n data: __assign(__assign({}, omit(properties, 'meta')), {\n metadata: __assign(__assign({\n sdkVersion: Builder.VERSION,\n url: location.href\n }, properties.meta), properties.metadata),\n ownerId: apiKey,\n userAttributes: this.getUserAttributes(),\n sessionId: this.sessionId,\n visitorId: this.visitorId\n })\n }));\n for (var _i = 0, _a = this.trackingHooks; _i < _a.length; _i++) {\n var hook = _a[_i];\n var returnValue = hook(eventData, context || {});\n if (returnValue) {\n eventData = returnValue;\n }\n }\n // batch events\n this.eventsQueue.push(eventData);\n if (this.canTrack) {\n this.throttledClearEventsQueue();\n }\n };\n Builder.prototype.getSessionId = function () {\n var _this = this;\n var sessionId = null;\n try {\n if (Builder.isBrowser && typeof sessionStorage !== 'undefined') {\n sessionId = this.getCookie(sessionStorageKey);\n }\n } catch (err) {\n console.debug('Session storage error', err);\n // It's ok\n }\n\n if (!sessionId) {\n sessionId = uuid();\n }\n // Give the app a second to start up and set canTrack to false if needed\n if (Builder.isBrowser) {\n setTimeout(function () {\n try {\n if (_this.canTrack) {\n _this.setCookie(sessionStorageKey, sessionId, datePlusMinutes(30));\n }\n } catch (err) {\n console.debug('Cookie setting error', err);\n }\n });\n }\n return sessionId;\n };\n Builder.prototype.getVisitorId = function () {\n var _this = this;\n if (this.visitorId) {\n return this.visitorId;\n }\n var visitorId = null;\n try {\n if (Builder.isBrowser && typeof localStorage !== 'undefined') {\n // TODO: cookie instead?\n visitorId = localStorage.getItem(localStorageKey);\n }\n } catch (err) {\n console.debug('Local storage error', err);\n // It's ok\n }\n\n if (!visitorId) {\n visitorId = uuid();\n }\n this.visitorId = visitorId;\n // Give the app a second to start up and set canTrack to false if needed\n if (Builder.isBrowser) {\n setTimeout(function () {\n try {\n if (_this.canTrack && typeof localStorage !== 'undefined' && visitorId) {\n localStorage.setItem(localStorageKey, visitorId);\n }\n } catch (err) {\n console.debug('Session storage error', err);\n }\n });\n }\n return visitorId;\n };\n Builder.prototype.trackImpression = function (contentId, variationId, properties, context) {\n if (isIframe || !isBrowser || Builder.isPreviewing) {\n return;\n }\n // TODO: use this.track method\n this.track('impression', {\n contentId: contentId,\n variationId: variationId !== contentId ? variationId : undefined,\n metadata: properties\n }, context);\n };\n Builder.prototype.trackConversion = function (amount, contentId, variationId, customProperties, context) {\n if (isIframe || !isBrowser || Builder.isPreviewing) {\n return;\n }\n var meta = typeof contentId === 'object' ? contentId : customProperties;\n var useContentId = typeof contentId === 'string' ? contentId : undefined;\n this.track('conversion', {\n amount: amount,\n variationId: variationId,\n meta: meta,\n contentId: useContentId\n }, context);\n };\n Object.defineProperty(Builder.prototype, \"isDevelopmentEnv\", {\n // TODO: set this for QA\n get: function get() {\n // Automatic determining of development environment\n return Builder.isIframe || Builder.isBrowser && (location.hostname === 'localhost' || location.port !== '') || this.env !== 'production';\n },\n enumerable: false,\n configurable: true\n });\n Builder.prototype.trackInteraction = function (contentId, variationId, alreadyTrackedOne, event, context) {\n if (alreadyTrackedOne === void 0) {\n alreadyTrackedOne = false;\n }\n if (isIframe || !isBrowser || Builder.isPreviewing) {\n return;\n }\n var target = event && event.target;\n var targetBuilderElement = target && this.findBuilderParent(target);\n function round(num) {\n return Math.round(num * 1000) / 1000;\n }\n var metadata = {};\n if (event) {\n var clientX = event.clientX,\n clientY = event.clientY;\n if (target) {\n var targetRect = target.getBoundingClientRect();\n var xOffset = clientX - targetRect.left;\n var yOffset = clientY - targetRect.top;\n var xRatio = round(xOffset / targetRect.width);\n var yRatio = round(yOffset / targetRect.height);\n metadata.targetOffset = {\n x: xRatio,\n y: yRatio\n };\n }\n if (targetBuilderElement) {\n var targetRect = targetBuilderElement.getBoundingClientRect();\n var xOffset = clientX - targetRect.left;\n var yOffset = clientY - targetRect.top;\n var xRatio = round(xOffset / targetRect.width);\n var yRatio = round(yOffset / targetRect.height);\n metadata.builderTargetOffset = {\n x: xRatio,\n y: yRatio\n };\n }\n }\n var builderId = targetBuilderElement && (targetBuilderElement.getAttribute('builder-id') || targetBuilderElement.id);\n if (builderId && targetBuilderElement) {\n metadata.builderElementIndex = [].slice.call(document.getElementsByClassName(builderId)).indexOf(targetBuilderElement);\n }\n this.track('click', {\n contentId: contentId,\n metadata: metadata,\n variationId: variationId !== contentId ? variationId : undefined,\n unique: !alreadyTrackedOne,\n targetBuilderElement: builderId || undefined\n }, context);\n };\n Builder.prototype.component = function (info) {\n if (info === void 0) {\n info = {};\n }\n return Builder.component(info);\n };\n Object.defineProperty(Builder.prototype, \"apiKey\", {\n get: function get() {\n return this.apiKey$.value;\n },\n set: function set(key) {\n this.apiKey$.next(key);\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Builder.prototype, \"authToken\", {\n get: function get() {\n return this.authToken$.value;\n },\n set: function set(token) {\n this.authToken$.next(token);\n },\n enumerable: false,\n configurable: true\n });\n Builder.prototype.modifySearch = function (search) {\n return search.replace(/(^|&|\\?)(builder_.*?)=/gi, function (_match, group1, group2) {\n return group1 + group2.replace(/_/g, '.') + '=';\n });\n };\n Builder.prototype.setTestsFromUrl = function () {\n var search = this.getLocation().search;\n var params = QueryString.parseDeep(this.modifySearch(search || '').substr(1));\n var tests = params.builder && params.builder.tests;\n if (tests && typeof tests === 'object') {\n for (var key in tests) {\n if (tests.hasOwnProperty(key)) {\n this.setTestCookie(key, tests[key]);\n }\n }\n }\n };\n Builder.prototype.resetOverrides = function () {\n // Ugly - pass down instances per request instead using react context\n // or use builder.get('foo', { req, res }) in react...........\n Builder.overrideUserAttributes = {};\n this.cachebust = false;\n this.noCache = false;\n this.preview = false;\n this.editingModel = null;\n this.overrides = {};\n this.env = 'production';\n this.userAgent = '';\n this.request = undefined;\n this.response = undefined;\n };\n Builder.prototype.getOverridesFromQueryString = function () {\n var location = this.getLocation();\n var params = QueryString.parseDeep(this.modifySearch(location.search || '').substr(1));\n var builder = params.builder;\n if (builder) {\n var userAttributes = builder.userAttributes,\n overrides = builder.overrides,\n env = builder.env,\n host = builder.host,\n api = builder.api,\n cachebust = builder.cachebust,\n noCache = builder.noCache,\n preview = builder.preview,\n editing = builder.editing,\n frameEditing = builder.frameEditing,\n options = builder.options,\n overrideParams = builder.params;\n if (userAttributes) {\n this.setUserAttributes(userAttributes);\n }\n if (options) {\n // picking only locale, includeRefs, and enrich for now\n this.queryOptions = __assign(__assign(__assign({}, options.locale && {\n locale: options.locale\n }), options.includeRefs && {\n includeRefs: options.includeRefs\n }), options.enrich && {\n enrich: options.enrich\n });\n }\n if (overrides) {\n this.overrides = overrides;\n }\n if (validEnvList.indexOf(env || api) > -1) {\n this.env = env || api;\n }\n if (Builder.isEditing) {\n var editingModel = frameEditing || editing || preview;\n if (editingModel && editingModel !== 'true') {\n this.editingModel = editingModel;\n }\n }\n if (cachebust) {\n this.cachebust = true;\n }\n if (noCache) {\n this.noCache = true;\n }\n if (preview) {\n this.preview = true;\n }\n if (params) {\n this.overrideParams = overrideParams;\n }\n }\n };\n Builder.prototype.messageFrameLoaded = function () {\n var _a;\n (_a = window.parent) === null || _a === void 0 ? void 0 : _a.postMessage({\n type: 'builder.loaded',\n data: {\n value: true\n }\n }, '*');\n };\n Builder.prototype.bindMessageListeners = function () {\n var _this = this;\n if (isBrowser) {\n addEventListener('message', function (event) {\n var _a, _b, _c, _d, _e;\n var url = parse$1(event.origin);\n var isRestricted = ['builder.register', 'builder.registerComponent'].indexOf((_a = event.data) === null || _a === void 0 ? void 0 : _a.type) === -1;\n var isTrusted = url.hostname && Builder.isTrustedHost(url.hostname);\n if (isRestricted && !isTrusted) {\n return;\n }\n var data = event.data;\n if (data) {\n switch (data.type) {\n case 'builder.ping':\n {\n (_b = window.parent) === null || _b === void 0 ? void 0 : _b.postMessage({\n type: 'builder.pong',\n data: {}\n }, '*');\n break;\n }\n case 'builder.register':\n {\n // TODO: possibly do this for all...\n if (event.source === window) {\n break;\n }\n var options = data.data;\n if (!options) {\n break;\n }\n var type = options.type,\n info = options.info;\n // TODO: all must have name and can't conflict?\n var typeList = Builder.registry[type];\n if (!typeList) {\n typeList = Builder.registry[type] = [];\n }\n typeList.push(info);\n Builder.registryChange.next(Builder.registry);\n break;\n }\n case 'builder.settingsChange':\n {\n // TODO: possibly do this for all...\n if (event.source === window) {\n break;\n }\n var settings = data.data;\n if (!settings) {\n break;\n }\n Object.assign(Builder.settings, settings);\n Builder.settingsChange.next(Builder.settings);\n break;\n }\n case 'builder.registerEditor':\n {\n // TODO: possibly do this for all...\n if (event.source === window) {\n break;\n }\n var info_1 = data.data;\n if (!info_1) {\n break;\n }\n var hasComponent_1 = !!info_1.component;\n Builder.editors.every(function (thisInfo, index) {\n if (info_1.name === thisInfo.name) {\n if (thisInfo.component && !hasComponent_1) {\n return false;\n } else {\n Builder.editors[index] = thisInfo;\n }\n return false;\n }\n return true;\n });\n break;\n }\n case 'builder.triggerAnimation':\n {\n Builder.animator.triggerAnimation(data.data);\n break;\n }\n case 'builder.contentUpdate':\n var key = data.data.key || data.data.alias || data.data.entry || data.data.modelName;\n var contentData = data.data.data; // hmmm...\n var observer = _this.observersByKey[key];\n if (observer && !_this.noEditorUpdates[key]) {\n observer.next([contentData]);\n }\n break;\n case 'builder.getComponents':\n (_c = window.parent) === null || _c === void 0 ? void 0 : _c.postMessage({\n type: 'builder.components',\n data: Builder.components.map(function (item) {\n return Builder.prepareComponentSpecToSend(item);\n })\n }, '*');\n break;\n case 'builder.editingModel':\n _this.editingModel = data.data.model;\n break;\n case 'builder.registerComponent':\n var componentData = data.data;\n Builder.addComponent(componentData);\n break;\n case 'builder.blockContentLoading':\n if (typeof data.data.model === 'string') {\n _this.blockContentLoading = data.data.model;\n }\n break;\n case 'builder.editingMode':\n var editingMode = data.data;\n if (editingMode) {\n _this.editingMode = true;\n document.body.classList.add('builder-editing');\n } else {\n _this.editingMode = false;\n document.body.classList.remove('builder-editing');\n }\n break;\n case 'builder.editingPageMode':\n var editingPageMode = data.data;\n Builder.editingPage = editingPageMode;\n break;\n case 'builder.overrideUserAttributes':\n var userAttributes = data.data;\n assign(Builder.overrideUserAttributes, userAttributes);\n _this.flushGetContentQueue(true);\n // TODO: refetch too\n break;\n case 'builder.overrideTestGroup':\n var _f = data.data,\n variationId = _f.variationId,\n contentId = _f.contentId;\n if (variationId && contentId) {\n _this.setTestCookie(contentId, variationId);\n _this.flushGetContentQueue(true);\n }\n break;\n case 'builder.evaluate':\n {\n var text = data.data.text;\n var args = data.data.arguments || [];\n var id_1 = data.data.id;\n // tslint:disable-next-line:no-function-constructor-with-string-args\n var fn = new Function(text);\n var result = void 0;\n var error = null;\n try {\n result = fn.apply(_this, args);\n } catch (err) {\n error = toError(err);\n }\n if (error) {\n (_d = window.parent) === null || _d === void 0 ? void 0 : _d.postMessage({\n type: 'builder.evaluateError',\n data: {\n id: id_1,\n error: error.message\n }\n }, '*');\n } else {\n if (result && typeof result.then === 'function') {\n result.then(function (finalResult) {\n var _a;\n (_a = window.parent) === null || _a === void 0 ? void 0 : _a.postMessage({\n type: 'builder.evaluateResult',\n data: {\n id: id_1,\n result: finalResult\n }\n }, '*');\n }).catch(console.error);\n } else {\n (_e = window.parent) === null || _e === void 0 ? void 0 : _e.postMessage({\n type: 'builder.evaluateResult',\n data: {\n result: result,\n id: id_1\n }\n }, '*');\n }\n }\n break;\n }\n }\n }\n });\n }\n };\n Object.defineProperty(Builder.prototype, \"defaultCanTrack\", {\n get: function get() {\n return Boolean(Builder.isBrowser && navigator.userAgent.trim() && !navigator.userAgent.match(/bot|crawler|spider|robot|crawling|prerender|google|baidu|bing|msn|duckduckbot|teoma|slurp|yandex|phantom|headless|selenium|puppeteer/i) && !this.browserTrackingDisabled);\n },\n enumerable: false,\n configurable: true\n });\n Builder.prototype.init = function (apiKey, canTrack, req, res, authToken, apiVersion) {\n if (canTrack === void 0) {\n canTrack = this.defaultCanTrack;\n }\n if (req) {\n this.request = req;\n }\n if (res) {\n this.response = res;\n }\n this.canTrack = canTrack;\n this.apiKey = apiKey;\n if (authToken) {\n this.authToken = authToken;\n }\n if (apiVersion) {\n this.apiVersion = apiVersion;\n }\n return this;\n };\n Object.defineProperty(Builder.prototype, \"previewingModel\", {\n get: function get() {\n var search = this.getLocation().search;\n var params = QueryString.parse((search || '').substr(1));\n return params['builder.preview'];\n },\n enumerable: false,\n configurable: true\n });\n // TODO: allow adding location object as property and/or in constructor\n Builder.prototype.getLocation = function () {\n var _a;\n var parsedLocation = {};\n // in ssr mode\n if (this.request) {\n parsedLocation = parse$1((_a = this.request.url) !== null && _a !== void 0 ? _a : '');\n } else if (typeof location === 'object') {\n // in the browser\n parsedLocation = parse$1(location.href);\n }\n // IE11 bug with parsed path being empty string\n // causes issues with our user targeting\n if (parsedLocation.pathname === '') {\n parsedLocation.pathname = '/';\n }\n return parsedLocation;\n };\n Builder.prototype.getUserAttributes = function (userAgent) {\n if (userAgent === void 0) {\n userAgent = this.userAgent || '';\n }\n var isMobile = {\n Android: function Android() {\n return userAgent.match(/Android/i);\n },\n BlackBerry: function BlackBerry() {\n return userAgent.match(/BlackBerry/i);\n },\n iOS: function iOS() {\n return userAgent.match(/iPhone|iPod/i);\n },\n Opera: function Opera() {\n return userAgent.match(/Opera Mini/i);\n },\n Windows: function Windows() {\n return userAgent.match(/IEMobile/i) || userAgent.match(/WPDesktop/i);\n },\n any: function any() {\n return isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows();\n }\n };\n var isTablet = userAgent.match(/Tablet|iPad/i);\n var url = this.getLocation();\n return __assign({\n urlPath: url.pathname,\n host: url.host || url.hostname,\n // TODO: maybe an option to choose to target off of mobile/tablet/desktop or just mobile/desktop\n device: isTablet ? 'tablet' : isMobile.any() ? 'mobile' : 'desktop'\n }, Builder.overrideUserAttributes);\n };\n Builder.prototype.setUserAttributes = function (options) {\n assign(Builder.overrideUserAttributes, options);\n this.userAttributesChanged.next(options);\n };\n /**\n * Set user attributes just for tracking purposes.\n *\n * Do this so properties exist on event objects for querying insights, but\n * won't affect targeting\n *\n * Use this when you want to track properties but don't need to target off\n * of them to optimize cache efficiency\n */\n Builder.prototype.setTrackingUserAttributes = function (attributes) {\n assign(this.trackingUserAttributes, attributes);\n };\n Builder.prototype.get = function (modelName, options) {\n if (options === void 0) {\n options = {};\n }\n var instance = this;\n if (!Builder.isBrowser) {\n instance = new Builder(options.apiKey || this.apiKey, options.req, options.res, undefined, options.authToken || this.authToken, options.apiVersion || this.apiVersion);\n instance.setUserAttributes(this.getUserAttributes());\n } else {\n // NOTE: All these are when .init is not called and the customer\n // directly calls .get on the singleton instance of Builder\n if (options.apiKey && !this.apiKey) {\n this.apiKey = options.apiKey;\n }\n if (options.authToken && !this.authToken) {\n this.authToken = options.authToken;\n }\n if (options.apiVersion && !this.apiVersion) {\n this.apiVersion = options.apiVersion;\n }\n }\n return instance.queueGetContent(modelName, options).map( /* map( */function (matches) {\n var match = matches && matches[0];\n if (Builder.isStatic) {\n return match;\n }\n var matchData = match && match.data;\n if (!matchData) {\n return null;\n }\n if (typeof matchData.blocksString !== 'undefined') {\n matchData.blocks = JSON.parse(matchData.blocksString);\n delete matchData.blocksString;\n }\n return {\n // TODO: add ab test info here and other high level stuff\n data: matchData,\n id: match.id,\n variationId: match.testVariationId || match.variationId || null,\n testVariationId: match.testVariationId || match.variationId || null,\n testVariationName: match.testVariationName || null,\n lastUpdated: match.lastUpdated || null\n };\n });\n // );\n };\n // TODO: entry id in options\n Builder.prototype.queueGetContent = function (modelName, options) {\n var _this = this;\n if (options === void 0) {\n options = {};\n }\n // TODO: if query do modelName + query\n var key = options.key || options.alias ||\n // TODO: SDKs only pass entry key when given to them, and never when editing...\n // options.entry ||\n // TODO: this is ugly - instead of multiple of same model with different options are sent\n // say requires key/alias. Or if not perhaps make a reliable hash of the options and use that.\n // TODO: store last user state on last request and if user attributes different now\n // give a warning that need to use keys to request new contente\n // (options &&\n // Object.keys(options).filter(key => key !== 'model').length &&\n // JSON.stringify({ model: modelName, ...options, initialContent: undefined })) ||\n modelName;\n var isEditingThisModel = this.editingModel === modelName;\n // TODO: include params in this key........\n var currentObservable = this.observersByKey[key];\n // if (options.query && options.query._id) {\n // this.flushGetContentQueue([options])\n // }\n if (this.apiKey === 'DEMO' && !this.overrides[key] && !options.initialContent) {\n options.initialContent = [];\n }\n var initialContent = options.initialContent;\n // TODO: refresh option in options\n if (currentObservable && (!currentObservable.value || options.cache)) {\n // TODO: test if this ran, otherwise on 404 some observers may never be called...\n if (currentObservable.value) {\n nextTick(function () {\n // TODO: return a new observable and only that one fires subscribers, don't refire for existing ones\n currentObservable.next(currentObservable.value);\n });\n }\n return currentObservable;\n }\n if (isEditingThisModel) {\n if (Builder.isBrowser) {\n parent.postMessage({\n type: 'builder.updateContent',\n data: {\n options: options\n }\n }, '*');\n }\n }\n if (!initialContent /* || isEditingThisModel */) {\n if (!this.getContentQueue) {\n this.getContentQueue = [];\n }\n this.getContentQueue.push(__assign(__assign({}, options), {\n model: modelName,\n key: key\n }));\n if (this.getContentQueue && this.getContentQueue.length >= this.contentPerRequest) {\n var queue_1 = this.getContentQueue.slice();\n this.getContentQueue = [];\n nextTick(function () {\n _this.flushGetContentQueue(false, queue_1);\n });\n } else {\n nextTick(function () {\n _this.flushGetContentQueue();\n });\n }\n }\n var observable = new BehaviorSubject(null);\n this.observersByKey[key] = observable;\n if (options.noEditorUpdates) {\n this.noEditorUpdates[key] = true;\n }\n if (initialContent) {\n nextTick(function () {\n // TODO: need to testModify this I think...?\n observable.next(initialContent);\n });\n }\n return observable;\n };\n // this is needed to satisfy the Angular SDK, which used to rely on the more complex version of `requestUrl`.\n // even though we only use `fetch()` now, we prefer to keep the old behavior and use the `fetch` that comes from\n // the core SDK for consistency\n Builder.prototype.requestUrl = function (url, options) {\n return getFetch()(url, options).then(function (res) {\n return res.json();\n });\n };\n Object.defineProperty(Builder.prototype, \"host\", {\n get: function get() {\n switch (this.env) {\n case 'qa':\n return 'https://qa.builder.io';\n case 'test':\n return 'https://builder-io-test.web.app';\n case 'fast':\n return 'https://fast.builder.io';\n case 'cloud':\n return 'https://cloud.builder.io';\n case 'cdn2':\n return 'https://cdn2.builder.io';\n case 'cdn-qa':\n return 'https://cdn-qa.builder.io';\n case 'development':\n case 'dev':\n return 'http://localhost:5000';\n case 'cdn-prod':\n return 'https://cdn.builder.io';\n default:\n return Builder.overrideHost || 'https://cdn.builder.io';\n }\n },\n enumerable: false,\n configurable: true\n });\n Builder.prototype.flushGetContentQueue = function (usePastQueue, useQueue) {\n var _this = this;\n if (usePastQueue === void 0) {\n usePastQueue = false;\n }\n if (!this.apiKey) {\n throw new Error(\"Fetching content failed, expected apiKey to be defined instead got: \".concat(this.apiKey));\n }\n if (this.apiVersion) {\n if (!['v1', 'v3'].includes(this.apiVersion)) {\n throw new Error(\"Invalid apiVersion: expected 'v1' or 'v3', received '\".concat(this.apiVersion, \"'\"));\n }\n } else {\n this.apiVersion = DEFAULT_API_VERSION;\n }\n if (!usePastQueue && !this.getContentQueue) {\n return;\n }\n var queue = useQueue || (usePastQueue ? this.priorContentQueue : this.getContentQueue) || [];\n // TODO: do this on every request send?\n this.getOverridesFromQueryString();\n var queryParams = __assign(__assign({\n // TODO: way to force a request to be in a separate queue. or just lower queue limit to be 1 by default\n omit: queue[0].omit || 'meta.componentsUsed',\n apiKey: this.apiKey\n }, queue[0].options), this.queryOptions);\n if (queue[0].locale) {\n queryParams.locale = queue[0].locale;\n }\n if (queue[0].fields) {\n queryParams.fields = queue[0].fields;\n }\n if (queue[0].format) {\n queryParams.format = queue[0].format;\n }\n var pageQueryParams = typeof location !== 'undefined' ? QueryString.parseDeep(location.search.substr(1)) : undefined || {};\n var userAttributes =\n // FIXME: HACK: only checks first in queue for user attributes overrides, should check all\n // TODO: merge user attributes provided here with defaults and current user attiributes (?)\n queue && queue[0].userAttributes ? queue[0].userAttributes : this.targetContent ? this.getUserAttributes() : {\n urlPath: this.getLocation().pathname\n };\n var fullUrlQueueItem = queue.find(function (item) {\n return !!item.includeUrl;\n });\n if (fullUrlQueueItem) {\n var location_1 = this.getLocation();\n if (location_1.origin) {\n queryParams.url = \"\".concat(location_1.origin).concat(location_1.pathname).concat(location_1.search);\n }\n }\n var urlQueueItem = useQueue === null || useQueue === void 0 ? void 0 : useQueue.find(function (item) {\n return item.url;\n });\n if (urlQueueItem === null || urlQueueItem === void 0 ? void 0 : urlQueueItem.url) {\n userAttributes.urlPath = urlQueueItem.url.split('?')[0];\n }\n // TODO: merge in the attribute from query string ones\n // TODO: make this an option per component/request\n queryParams.userAttributes = userAttributes;\n if (!usePastQueue && !useQueue) {\n this.priorContentQueue = queue;\n this.getContentQueue = null;\n }\n var cachebust = this.cachebust || isIframe || pageQueryParams.cachebust || pageQueryParams['builder.cachebust'];\n if (cachebust || this.env !== 'production') {\n queryParams.cachebust = true;\n }\n if (Builder.isEditing) {\n queryParams.isEditing = true;\n }\n if (this.noCache || this.env !== 'production') {\n queryParams.noCache = true;\n }\n if (size(this.overrides)) {\n for (var key in this.overrides) {\n if (this.overrides.hasOwnProperty(key)) {\n queryParams[\"overrides.\".concat(key)] = this.overrides[key];\n }\n }\n }\n for (var _i = 0, queue_2 = queue; _i < queue_2.length; _i++) {\n var options = queue_2[_i];\n if (options.format) {\n queryParams.format = options.format;\n }\n // TODO: remove me and make permodel\n if (options.static) {\n queryParams.static = options.static;\n }\n if (options.cachebust) {\n queryParams.cachebust = options.cachebust;\n }\n if (isPositiveNumber(options.cacheSeconds)) {\n queryParams.cacheSeconds = options.cacheSeconds;\n }\n if (isPositiveNumber(options.staleCacheSeconds)) {\n queryParams.staleCacheSeconds = options.staleCacheSeconds;\n }\n var properties = ['prerender', 'extractCss', 'limit', 'offset', 'query', 'preview', 'model', 'entry', 'rev', 'static'];\n for (var _a = 0, properties_1 = properties; _a < properties_1.length; _a++) {\n var key = properties_1[_a];\n var value = options[key];\n if (value !== undefined) {\n queryParams.options = queryParams.options || {};\n queryParams.options[options.key] = queryParams.options[options.key] || {};\n queryParams.options[options.key][key] = JSON.stringify(value);\n }\n }\n }\n if (this.preview) {\n queryParams.preview = 'true';\n }\n var hasParams = Object.keys(queryParams).length > 0;\n // TODO: option to force dev or qa api here\n var host = this.host;\n var keyNames = queue.map(function (item) {\n return encodeURIComponent(item.key);\n }).join(',');\n if (this.overrideParams) {\n var params = omit(QueryString.parse(this.overrideParams), 'apiKey');\n assign(queryParams, params);\n }\n var queryStr = QueryString.stringifyDeep(queryParams);\n var format = queryParams.format;\n var requestOptions = {\n headers: {}\n };\n if (this.authToken) {\n requestOptions.headers = __assign(__assign({}, requestOptions.headers), {\n Authorization: \"Bearer \".concat(this.authToken)\n });\n }\n var fn = format === 'solid' || format === 'react' ? 'codegen' : 'query';\n // NOTE: this is a hack to get around the fact that the codegen endpoint is not yet available in v3\n var apiVersionBasedOnFn = fn === 'query' ? this.apiVersion : 'v1';\n var url = \"\".concat(host, \"/api/\").concat(apiVersionBasedOnFn, \"/\").concat(fn, \"/\").concat(this.apiKey, \"/\").concat(keyNames) + (queryParams && hasParams ? \"?\".concat(queryStr) : '');\n var promise = getFetch()(url, requestOptions).then(function (res) {\n return res.json();\n }).then(function (result) {\n for (var _i = 0, queue_3 = queue; _i < queue_3.length; _i++) {\n var options = queue_3[_i];\n var keyName = options.key;\n if (options.model === _this.blockContentLoading && !options.noEditorUpdates) {\n continue;\n }\n var isEditingThisModel = _this.editingModel === options.model;\n if (isEditingThisModel && Builder.isEditing) {\n parent.postMessage({\n type: 'builder.updateContent',\n data: {\n options: options\n }\n }, '*');\n // return;\n }\n\n var observer = _this.observersByKey[keyName];\n if (!observer) {\n return;\n }\n var data = result[keyName];\n var sorted = data; // sortBy(data, item => item.priority);\n if (data) {\n var testModifiedResults = Builder.isServer ? sorted : _this.processResultsForTests(sorted);\n observer.next(testModifiedResults);\n } else {\n var search = _this.getLocation().search;\n if ((search || '').includes('builder.preview=' + options.model)) {\n var previewData = {\n id: 'preview',\n name: 'Preview',\n data: {}\n };\n observer.next([previewData]);\n }\n observer.next([]);\n }\n }\n }, function (err) {\n for (var _i = 0, queue_4 = queue; _i < queue_4.length; _i++) {\n var options = queue_4[_i];\n var observer = _this.observersByKey[options.key];\n if (!observer) {\n return;\n }\n observer.error(err);\n }\n });\n return promise;\n };\n Builder.prototype.processResultsForTests = function (results) {\n var _this = this;\n var _a;\n var mappedResults = results.map(function (item) {\n if (!item.variations) {\n return item;\n }\n var cookieValue = _this.getTestCookie(item.id);\n var cookieVariation = cookieValue === item.id ? item : item.variations[cookieValue];\n if (cookieVariation) {\n return __assign(__assign({}, item), {\n data: cookieVariation.data,\n variationId: cookieValue,\n testVariationId: cookieValue,\n testVariationName: cookieVariation.name\n });\n }\n if (_this.canTrack && item.variations && size(item.variations)) {\n var n = 0;\n var random = Math.random();\n for (var id in item.variations) {\n var variation = item.variations[id];\n var testRatio = variation.testRatio;\n n += testRatio;\n if (random < n) {\n _this.setTestCookie(item.id, variation.id);\n var variationName = variation.name || (variation.id === item.id ? 'Default variation' : '');\n return __assign(__assign({}, item), {\n data: variation.data,\n variationId: variation.id,\n testVariationId: variation.id,\n variationName: variationName,\n testVariationName: variationName\n });\n }\n }\n _this.setTestCookie(item.id, item.id);\n }\n return __assign(__assign(__assign({}, item), {\n variationId: item.id\n }), item.variations && size(item.variations) && {\n testVariationId: item.id,\n testVariationName: 'Default variation'\n });\n });\n if (isIframe) {\n (_a = window.parent) === null || _a === void 0 ? void 0 : _a.postMessage({\n type: 'builder.contentResults',\n data: {\n results: mappedResults\n }\n }, '*');\n }\n return mappedResults;\n };\n Builder.prototype.getTestCookie = function (contentId) {\n return this.getCookie(\"\".concat(this.testCookiePrefix, \".\").concat(contentId));\n };\n Builder.prototype.setTestCookie = function (contentId, variationId) {\n if (!this.canTrack) {\n this.cookieQueue.push([contentId, variationId]);\n return;\n }\n // 30 days from now\n var future = new Date();\n future.setDate(future.getDate() + 30);\n return this.setCookie(\"\".concat(this.testCookiePrefix, \".\").concat(contentId), variationId, future);\n };\n Builder.prototype.getCookie = function (name$$1) {\n if (this.cookies) {\n return this.cookies.get(name$$1);\n }\n return Builder.isBrowser && getCookie(name$$1);\n };\n Builder.prototype.setCookie = function (name$$1, value, expires) {\n if (this.cookies && !(Builder.isServer && Builder.isStatic)) {\n return this.cookies.set(name$$1, value, {\n expires: expires,\n secure: this.getLocation().protocol === 'https:'\n });\n }\n return Builder.isBrowser && setCookie(name$$1, value, expires);\n };\n Builder.prototype.getContent = function (modelName, options) {\n if (options === void 0) {\n options = {};\n }\n if (!this.apiKey) {\n throw new Error(\"Fetching content from model \".concat(modelName, \" failed, expected apiKey to be defined instead got: \").concat(this.apiKey));\n }\n return this.queueGetContent(modelName, options);\n };\n Builder.prototype.getAll = function (modelName, options) {\n if (options === void 0) {\n options = {};\n }\n var instance = this;\n if (!Builder.isBrowser) {\n instance = new Builder(options.apiKey || this.apiKey, options.req, options.res, false, null, options.apiVersion || this.apiVersion);\n instance.setUserAttributes(this.getUserAttributes());\n } else {\n // NOTE: All these are when .init is not called and the customer\n // directly calls .get on the singleton instance of Builder\n if (options.apiKey && !this.apiKey) {\n this.apiKey = options.apiKey;\n }\n if (options.apiVersion && !this.apiVersion) {\n this.apiVersion = options.apiVersion;\n }\n }\n return instance.getContent(modelName, __assign(__assign({\n limit: 30\n }, options), {\n key: options.key ||\n // Make the key include all options, so we don't reuse cache for the same content fetched\n // with different options\n Builder.isBrowser ? \"\".concat(modelName, \":\").concat(hash(omit(options, 'initialContent', 'req', 'res'))) : undefined\n })).promise();\n };\n /**\n * @hidden\n * @deprecated. This is buggy, and always behind by a version.\n */\n Builder.VERSION = version;\n Builder.components = [];\n /**\n * Makes it so that a/b tests generate code like {@link\n * https://www.builder.io/blog/high-performance-no-code#__next:~:text=Static%20generated%20A%2FB%20testing}\n * instead of the old way where we render only one test group at a time on the\n * server. This is the preferred/better way not and we should ultimately make it\n * the default\n */\n Builder.isStatic = true;\n Builder.animator = new Animator();\n Builder.nextTick = nextTick;\n Builder.throttle = throttle;\n Builder.editors = [];\n Builder.trustedHosts = ['builder.io', 'localhost'];\n Builder.plugins = [];\n Builder.actions = [];\n Builder.registry = {};\n Builder.registryChange = new BehaviorSubject({});\n Builder._editingPage = false;\n Builder.isIframe = isIframe;\n Builder.isBrowser = isBrowser;\n Builder.isReactNative = isReactNative;\n Builder.isServer = !isBrowser && !isReactNative;\n Builder.previewingModel = Builder.isBrowser && getQueryParam(location.href, 'builder.preview');\n Builder.settings = {};\n Builder.settingsChange = new BehaviorSubject({});\n // TODO: this is quick and dirty, do better implementation later. Also can be unreliable\n // if page 301s etc. Use a query param instead? also could have issues with redirects. Injecting var could\n // work but is async...\n Builder.isEditing = Boolean(isIframe && (document.referrer && document.referrer.match(/builder\\.io|localhost:1234/) || location.search.indexOf('builder.frameEditing=') !== -1));\n Builder.isPreviewing = Boolean(isBrowser && (location.search.indexOf('builder.preview=') !== -1 || location.search.indexOf('builder.frameEditing=') !== -1));\n Builder.isReact = false;\n Builder.overrideUserAttributes = {};\n return Builder;\n}();\nvar builder = new Builder(null, undefined, undefined, true);\nBuilder.singletonInstance = builder;\nexport { Builder, BuilderComponent, isBrowser, BehaviorSubject, Subscription, builder };","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\n/* global Reflect, Promise */\n\nvar _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\n };\n return _extendStatics(d, b);\n};\nexport function __extends(d, b) {\n _extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\nvar _assign = function __assign() {\n _assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n };\n return _assign.apply(this, arguments);\n};\nexport { _assign as __assign };\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n}\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length,\n r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,\n d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\nexport function __param(paramIndex, decorator) {\n return function (target, key) {\n decorator(target, key, paramIndex);\n };\n}\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\nexport function __generator(thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n case 7:\n op = _.ops.pop();\n _.trys.pop();\n continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n if (t && _.label < t[2]) {\n _.label = t[2];\n _.ops.push(op);\n break;\n }\n if (t[2]) _.ops.pop();\n _.trys.pop();\n continue;\n }\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n}\nexport function __createBinding(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}\nexport function __exportStar(m, exports) {\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\n}\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator,\n m = s && o[s],\n i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function next() {\n if (o && i >= o.length) o = void 0;\n return {\n value: o && o[i++],\n done: !o\n };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o),\n r,\n ar = [],\n e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n } catch (error) {\n e = {\n error: error\n };\n } finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n } finally {\n if (e) throw e.error;\n }\n }\n return ar;\n}\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));\n return ar;\n}\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];\n return r;\n}\n;\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []),\n i,\n q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i;\n function verb(n) {\n if (g[n]) i[n] = function (v) {\n return new Promise(function (a, b) {\n q.push([n, v, a, b]) > 1 || resume(n, v);\n });\n };\n }\n function resume(n, v) {\n try {\n step(g[n](v));\n } catch (e) {\n settle(q[0][3], e);\n }\n }\n function step(r) {\n r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r);\n }\n function fulfill(value) {\n resume(\"next\", value);\n }\n function reject(value) {\n resume(\"throw\", value);\n }\n function settle(f, v) {\n if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]);\n }\n}\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) {\n throw e;\n }), verb(\"return\"), i[Symbol.iterator] = function () {\n return this;\n }, i;\n function verb(n, f) {\n i[n] = o[n] ? function (v) {\n return (p = !p) ? {\n value: __await(o[n](v)),\n done: n === \"return\"\n } : f ? f(v) : v;\n } : f;\n }\n}\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator],\n i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () {\n return this;\n }, i);\n function verb(n) {\n i[n] = o[n] && function (v) {\n return new Promise(function (resolve, reject) {\n v = o[n](v), settle(resolve, reject, v.done, v.value);\n });\n };\n }\n function settle(resolve, reject, d, v) {\n Promise.resolve(v).then(function (v) {\n resolve({\n value: v,\n done: d\n });\n }, reject);\n }\n}\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) {\n Object.defineProperty(cooked, \"raw\", {\n value: raw\n });\n } else {\n cooked.raw = raw;\n }\n return cooked;\n}\n;\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\n result.default = mod;\n return result;\n}\nexport function __importDefault(mod) {\n return mod && mod.__esModule ? mod : {\n default: mod\n };\n}\nexport function __classPrivateFieldGet(receiver, privateMap) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to get private field on non-instance\");\n }\n return privateMap.get(receiver);\n}\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\n if (!privateMap.has(receiver)) {\n throw new TypeError(\"attempted to set private field on non-instance\");\n }\n privateMap.set(receiver, value);\n return value;\n}","function stylis_min(W) {\n function M(d, c, e, h, a) {\n for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {\n g = e.charCodeAt(l);\n l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);\n if (0 === b + n + v + m) {\n if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {\n switch (g) {\n case 32:\n case 9:\n case 59:\n case 13:\n case 10:\n break;\n default:\n f += e.charAt(l);\n }\n g = 59;\n }\n switch (g) {\n case 123:\n f = f.trim();\n q = f.charCodeAt(0);\n k = 1;\n for (t = ++l; l < B;) {\n switch (g = e.charCodeAt(l)) {\n case 123:\n k++;\n break;\n case 125:\n k--;\n break;\n case 47:\n switch (g = e.charCodeAt(l + 1)) {\n case 42:\n case 47:\n a: {\n for (u = l + 1; u < J; ++u) {\n switch (e.charCodeAt(u)) {\n case 47:\n if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {\n l = u + 1;\n break a;\n }\n break;\n case 10:\n if (47 === g) {\n l = u + 1;\n break a;\n }\n }\n }\n l = u;\n }\n }\n break;\n case 91:\n g++;\n case 40:\n g++;\n case 34:\n case 39:\n for (; l++ < J && e.charCodeAt(l) !== g;) {}\n }\n if (0 === k) break;\n l++;\n }\n k = e.substring(t, l);\n 0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));\n switch (q) {\n case 64:\n 0 < r && (f = f.replace(N, ''));\n g = f.charCodeAt(1);\n switch (g) {\n case 100:\n case 109:\n case 115:\n case 45:\n r = c;\n break;\n default:\n r = O;\n }\n k = M(c, r, k, g, a + 1);\n t = k.length;\n 0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));\n if (0 < t) switch (g) {\n case 115:\n f = f.replace(da, ea);\n case 100:\n case 109:\n case 45:\n k = f + '{' + k + '}';\n break;\n case 107:\n f = f.replace(fa, '$1 $2');\n k = f + '{' + k + '}';\n k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;\n break;\n default:\n k = f + k, 112 === h && (k = (p += k, ''));\n } else k = '';\n break;\n default:\n k = M(c, X(c, f, I), k, h, a + 1);\n }\n F += k;\n k = I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n break;\n case 125:\n case 59:\n f = (0 < r ? f.replace(N, '') : f).trim();\n if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\\x00\\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {\n case 0:\n break;\n case 64:\n if (105 === g || 99 === g) {\n G += f + e.charAt(l);\n break;\n }\n default:\n 58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));\n }\n I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n }\n }\n switch (g) {\n case 13:\n case 10:\n 47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\\x00');\n 0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);\n z = 1;\n D++;\n break;\n case 59:\n case 125:\n if (0 === b + n + v + m) {\n z++;\n break;\n }\n default:\n z++;\n y = e.charAt(l);\n switch (g) {\n case 9:\n case 32:\n if (0 === n + m + b) switch (x) {\n case 44:\n case 58:\n case 9:\n case 32:\n y = '';\n break;\n default:\n 32 !== g && (y = ' ');\n }\n break;\n case 0:\n y = '\\\\0';\n break;\n case 12:\n y = '\\\\f';\n break;\n case 11:\n y = '\\\\v';\n break;\n case 38:\n 0 === n + b + m && (r = I = 1, y = '\\f' + y);\n break;\n case 108:\n if (0 === n + b + m + E && 0 < u) switch (l - u) {\n case 2:\n 112 === x && 58 === e.charCodeAt(l - 3) && (E = x);\n case 8:\n 111 === K && (E = K);\n }\n break;\n case 58:\n 0 === n + b + m && (u = l);\n break;\n case 44:\n 0 === b + v + n + m && (r = 1, y += '\\r');\n break;\n case 34:\n case 39:\n 0 === b && (n = n === g ? 0 : 0 === n ? g : n);\n break;\n case 91:\n 0 === n + b + v && m++;\n break;\n case 93:\n 0 === n + b + v && m--;\n break;\n case 41:\n 0 === n + b + m && v--;\n break;\n case 40:\n if (0 === n + b + m) {\n if (0 === q) switch (2 * x + 3 * K) {\n case 533:\n break;\n default:\n q = 1;\n }\n v++;\n }\n break;\n case 64:\n 0 === b + v + n + m + u + k && (k = 1);\n break;\n case 42:\n case 47:\n if (!(0 < n + m + v)) switch (b) {\n case 0:\n switch (2 * g + 3 * e.charCodeAt(l + 1)) {\n case 235:\n b = 47;\n break;\n case 220:\n t = l, b = 42;\n }\n break;\n case 42:\n 47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);\n }\n }\n 0 === b && (f += y);\n }\n K = x;\n x = g;\n l++;\n }\n t = p.length;\n if (0 < t) {\n r = c;\n if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;\n p = r.join(',') + '{' + p + '}';\n if (0 !== w * E) {\n 2 !== w || L(p, 2) || (E = 0);\n switch (E) {\n case 111:\n p = p.replace(ha, ':-moz-$1') + p;\n break;\n case 112:\n p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;\n }\n E = 0;\n }\n }\n return G + p + F;\n }\n function X(d, c, e) {\n var h = c.trim().split(ia);\n c = h;\n var a = h.length,\n m = d.length;\n switch (m) {\n case 0:\n case 1:\n var b = 0;\n for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {\n c[b] = Z(d, c[b], e).trim();\n }\n break;\n default:\n var v = b = 0;\n for (c = []; b < a; ++b) {\n for (var n = 0; n < m; ++n) {\n c[v++] = Z(d[n] + ' ', h[b], e).trim();\n }\n }\n }\n return c;\n }\n function Z(d, c, e) {\n var h = c.charCodeAt(0);\n 33 > h && (h = (c = c.trim()).charCodeAt(0));\n switch (h) {\n case 38:\n return c.replace(F, '$1' + d.trim());\n case 58:\n return d.trim() + c.replace(F, '$1' + d.trim());\n default:\n if (0 < 1 * e && 0 < c.indexOf('\\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());\n }\n return d + c;\n }\n function P(d, c, e, h) {\n var a = d + ';',\n m = 2 * c + 3 * e + 4 * h;\n if (944 === m) {\n d = a.indexOf(':', 9) + 1;\n var b = a.substring(d, a.length - 1).trim();\n b = a.substring(0, d).trim() + b + ';';\n return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;\n }\n if (0 === w || 2 === w && !L(a, 1)) return a;\n switch (m) {\n case 1015:\n return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;\n case 951:\n return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;\n case 963:\n return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;\n case 1009:\n if (100 !== a.charCodeAt(4)) break;\n case 969:\n case 942:\n return '-webkit-' + a + a;\n case 978:\n return '-webkit-' + a + '-moz-' + a + a;\n case 1019:\n case 983:\n return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a;\n case 883:\n if (45 === a.charCodeAt(8)) return '-webkit-' + a + a;\n if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a;\n break;\n case 932:\n if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {\n case 103:\n return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a;\n case 115:\n return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a;\n case 98:\n return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a;\n }\n return '-webkit-' + a + '-ms-' + a + a;\n case 964:\n return '-webkit-' + a + '-ms-flex-' + a + a;\n case 1023:\n if (99 !== a.charCodeAt(8)) break;\n b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify');\n return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a;\n case 1005:\n return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a;\n case 1e3:\n b = a.substring(13).trim();\n c = b.indexOf('-') + 1;\n switch (b.charCodeAt(0) + b.charCodeAt(c)) {\n case 226:\n b = a.replace(G, 'tb');\n break;\n case 232:\n b = a.replace(G, 'tb-rl');\n break;\n case 220:\n b = a.replace(G, 'lr');\n break;\n default:\n return a;\n }\n return '-webkit-' + a + '-ms-' + b + a;\n case 1017:\n if (-1 === a.indexOf('sticky', 9)) break;\n case 975:\n c = (a = d).length - 10;\n b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim();\n switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {\n case 203:\n if (111 > b.charCodeAt(8)) break;\n case 115:\n a = a.replace(b, '-webkit-' + b) + ';' + a;\n break;\n case 207:\n case 102:\n a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a;\n }\n return a + ';';\n case 938:\n if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {\n case 105:\n return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a;\n case 115:\n return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a;\n default:\n return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a;\n }\n break;\n case 973:\n case 989:\n if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;\n case 931:\n case 953:\n if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a;\n break;\n case 962:\n if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a;\n }\n return a;\n }\n function L(d, c) {\n var e = d.indexOf(1 === c ? ':' : '{'),\n h = d.substring(0, 3 !== c ? e : 10);\n e = d.substring(e + 1, d.length - 1);\n return R(2 !== c ? h : h.replace(na, '$1'), e, c);\n }\n function ea(d, c) {\n var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));\n return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')';\n }\n function H(d, c, e, h, a, m, b, v, n, q) {\n for (var g = 0, x = c, w; g < A; ++g) {\n switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) {\n case void 0:\n case !1:\n case !0:\n case null:\n break;\n default:\n x = w;\n }\n }\n if (x !== c) return x;\n }\n function T(d) {\n switch (d) {\n case void 0:\n case null:\n A = S.length = 0;\n break;\n default:\n if ('function' === typeof d) S[A++] = d;else if ('object' === typeof d) for (var c = 0, e = d.length; c < e; ++c) {\n T(d[c]);\n } else Y = !!d | 0;\n }\n return T;\n }\n function U(d) {\n d = d.prefix;\n void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0);\n return U;\n }\n function B(d, c) {\n var e = d;\n 33 > e.charCodeAt(0) && (e = e.trim());\n V = e;\n e = [V];\n if (0 < A) {\n var h = H(-1, c, e, e, D, z, 0, 0, 0, 0);\n void 0 !== h && 'string' === typeof h && (c = h);\n }\n var a = M(O, e, c, 0, 0);\n 0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h));\n V = '';\n E = 0;\n z = D = 1;\n return a;\n }\n var ca = /^\\0+/g,\n N = /[\\0\\r\\f]/g,\n aa = /: */g,\n ka = /zoo|gra/,\n ma = /([,: ])(transform)/g,\n ia = /,\\r+?/g,\n F = /([\\t\\r\\n ])*\\f?&/g,\n fa = /@(k\\w+)\\s*(\\S*)\\s*/,\n Q = /::(place)/g,\n ha = /:(read-only)/g,\n G = /[svh]\\w+-[tblr]{2}/,\n da = /\\(\\s*(.*)\\s*\\)/g,\n oa = /([\\s\\S]*?);/g,\n ba = /-self|flex-/g,\n na = /[^]*?(:[rp][el]a[\\w-]+)[^]*/,\n la = /stretch|:\\s*\\w+\\-(?:conte|avail)/,\n ja = /([^-])(image-set\\()/,\n z = 1,\n D = 1,\n E = 0,\n w = 1,\n O = [],\n S = [],\n A = 0,\n R = null,\n Y = 0,\n V = '';\n B.use = T;\n B.set = U;\n void 0 !== W && U(W);\n return B;\n}\nexport default stylis_min;","var unitlessKeys = {\n animationIterationCount: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\nexport default unitlessKeys;","'use strict';\n\nfunction pad(hash, len) {\n while (hash.length < len) {\n hash = '0' + hash;\n }\n return hash;\n}\nfunction fold(hash, text) {\n var i;\n var chr;\n var len;\n if (text.length === 0) {\n return hash;\n }\n for (i = 0, len = text.length; i < len; i++) {\n chr = text.charCodeAt(i);\n hash = (hash << 5) - hash + chr;\n hash |= 0;\n }\n return hash < 0 ? hash * -2 : hash;\n}\nfunction foldObject(hash, o, seen) {\n return Object.keys(o).sort().reduce(foldKey, hash);\n function foldKey(hash, key) {\n return foldValue(hash, o[key], key, seen);\n }\n}\nfunction foldValue(input, value, key, seen) {\n var hash = fold(fold(fold(input, key), toString(value)), typeof value);\n if (value === null) {\n return fold(hash, 'null');\n }\n if (value === undefined) {\n return fold(hash, 'undefined');\n }\n if (typeof value === 'object' || typeof value === 'function') {\n if (seen.indexOf(value) !== -1) {\n return fold(hash, '[Circular]' + key);\n }\n seen.push(value);\n var objHash = foldObject(hash, value, seen);\n if (!('valueOf' in value) || typeof value.valueOf !== 'function') {\n return objHash;\n }\n try {\n return fold(objHash, String(value.valueOf()));\n } catch (err) {\n return fold(objHash, '[valueOf exception]' + (err.stack || err.message));\n }\n }\n return fold(hash, value.toString());\n}\nfunction toString(o) {\n return Object.prototype.toString.call(o);\n}\nfunction sum(o) {\n return pad(foldValue(0, o, '', []).toString(16), 8);\n}\nmodule.exports = sum;","\"use strict\";\n\n// ref: https://github.com/tc39/proposal-global\nvar getGlobal = function getGlobal() {\n // the only reliable means to get the global object is\n // `Function('return this')()`\n // However, this causes CSP violations in Chrome apps.\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n throw new Error('unable to locate global object');\n};\nvar global = getGlobal();\nmodule.exports = exports = global.fetch;\n\n// Needed for TypeScript and Webpack.\nif (global.fetch) {\n exports.default = global.fetch.bind(global);\n}\nexports.Headers = global.Headers;\nexports.Request = global.Request;\nexports.Response = global.Response;"],"names":["StyleSheet","options","this","isSpeedy","undefined","speedy","tags","ctr","nonce","key","container","before","_proto","prototype","insert","rule","_tag","tag","document","createElement","setAttribute","appendChild","createTextNode","createStyleElement","length","nextSibling","insertBefore","push","sheet","i","styleSheets","ownerNode","sheetForTag","isImportRule","charCodeAt","insertRule","cssRules","e","flush","forEach","parentNode","removeChild","delimiter","needle","toSheet","block","Sheet","current","ruleSheet","context","content","selectors","parents","line","column","ns","depth","at","split","stylisOptions","prefix","stylis","inserted","head","_insert","nodes","querySelectorAll","Array","call","node","getAttribute","id","use","stylisPlugins","selector","serialized","shouldCache","name","styles","cache","registered","getRegisteredStyles","registeredStyles","classNames","rawClassName","className","isStringTag","next","str","k","h","len","toString","hyphenateRegex","animationRegex","isCustomProperty","property","isProcessableValue","value","processStyleName","fn","arg","styleName","replace","toLowerCase","processStyleValue","match","p1","p2","cursor","handleInterpolation","mergedProps","interpolation","couldBeSelectorInterpolation","__emotion_styles","anim","obj","string","isArray","_key","interpolated","_i","createStringFromObject","previousCursor","result","cached","labelPattern","args","stringMode","strings","raw","lastIndex","identifierName","exec","Object","hasOwnProperty","EmotionCacheContext","createContext","HTMLElement","Provider","func","render","props","ref","Consumer","forwardRef","typePropName","Noop","theme","cssProp","css","type","newProps","ele","possiblyStyleElement","Fragment","Emotion","_len","arguments","jsx","apply","argsLength","createElementArgArray","createEmotionProps","classnames","cls","toAdd","ClassNames","cx","_len2","_key2","merge","children","window","CustomEvent","event","params","bubbles","cancelable","detail","evt","createEvent","initCustomEvent","isSafari","test","navigator","userAgent","nextTick","setImmediate","MutationObserver","setTimeout","called","observer","element","observe","characterData","data","String","PROPERTY_NAME_DENY_LIST","freeze","QueryString","parseDeep","queryString","parse","deepen","stringifyDeep","map","flatten","stringify","query","pairs","substr","pair","decodeURIComponent","error","encodeURIComponent","output","t","parts","pop","parts_1","part","assertAllowedPropertyName","_current","_res","newKey","indexOf","Error","concat","version","Subscription","listeners","listener","unsubscribed","otherSubscriptions","defineProperty","get","enumerable","configurable","add","subscription","unsubscribe","index","splice","sub","BehaviorSubject","errorListeners","_a","newSubject","subscribe","val","catch","err","errorListener","toPromise","_this","Promise","resolve","reject","promise","State","Pending","Fulfilled","Rejected","isFunction","isObject","TinyPromise","executor","_state","_handlers","_value","_resolve","bind","_reject","x","then","called_1","thenable","_fulfill","ex","handler","_callHandler","_isPending","_isFulfilled","_isRejected","_addHandler","onFulfilled","onRejected","Promise$1","serverOnlyRequire","eval","serverOnlyRequire$1","promiseResolve","tinyFetch","url","request","XMLHttpRequest","open","method","headers","setRequestHeader","response","_keys","all","header","getAllResponseHeaders","_match","ok","status","statusText","responseURL","clone","text","responseText","json","JSON","blob","Blob","keys","entries","n","has","withCredentials","credentials","onload","onerror","send","body","getFetch","_fetch","globalThis","fetch","console","warn","assign","target","to","nextSource","nextKey","throttle","wait","timeout","previous","later","leading","Date","now","remaining","clearTimeout","trailing","camelCaseToKebabCase","g","Animator","bindAnimations","animations","animations_1","animation","trigger","triggerAnimation","bindHoverAnimation","bindScrollInViewAnimation","warnElementNotPresent","augmentAnimation","stylesUsed","getAllStylesUsed","computedStyle","getComputedStyle","bothStyles_1","steps","stylesUsed_1","style","properties","step","elements","slice","getElementsByClassName","elementId","from","transition","transitionDelay","duration","easing","delay","defaultState","hoverState","attachDefaultState","addEventListener","triggered","pendingAnimation","immediateOnScroll","isScrolledIntoView","repeat","removeEventListener","onScroll","elem","rect","getBoundingClientRect","windowHeight","innerHeight","threshold","thresholdPercent","bottom","top","capture","passive","getTopLevelDomain","host","join","fieldContentRegExp","Cookies","getPattern","set","opts","res","req","getHeader","secure","protocol","connection","encrypted","cookie","Cookie","domain","pushCookie","setHeader","attrs","path","httpOnly","sameSite","overwrite","TypeError","expires","toHeader","maxAge","toUTCString","RegExp","omit","values","newObject","values_1","uuidv4","c","r","Math","random","uuid","emptyUrl","port","auth","hash","hostname","href","pathname","search","slashes","u","out","URL","toError","DEFAULT_API_VERSION","datePlusMinutes","minutes","isPositiveNumber","thing","isNaN","isReactNative","product","validEnvList","getQueryParam","variable","vars","urlParser","el","props_1","prop","parse$1","setCookie","name$$1","expiresString","isBrowser","location","getCookie","size","object","find","callback","list","thisArg","sessionStorageKey","localStorageKey","isIframe","self","BuilderComponent","info","Builder","Component","apiKey","forceNewInstance","authToken","apiVersion","eventsQueue","throttledClearEventsQueue","processEventsQueue","sessionId","env","getSessionId","targetContent","contentPerRequest","allowCustomFonts","cookies","cachebust","overrideParams","noCache","preview","apiVersion$","canTrack$","browserTrackingDisabled","apiKey$","authToken$","userAttributesChanged","editingMode$","editingModel$","trackingHooks","visitorId","getVisitorId","autoTrack","isDevelopmentEnv","trackingUserAttributes","blockContentLoading","observersByKey","noEditorUpdates","overrides","queryOptions","getContentQueue","priorContentQueue","testCookiePrefix","cookieQueue","singletonInstance","setUserAgent","bindMessageListeners","isEditing","parent","postMessage","messageFrameLoaded","sessionStorage","getItem","setItem","debug","item","setTestsFromUrl","getOverridesFromQueryString","register","typeList","registry","message","registryChange","registerEditor","isTrustedHost","editors","registerPlugin","plugins","registerAction","action","actions","registerTrustedHost","trustedHosts","findIndex","trustedHost","endsWith","runAction","fields","settings","import","packageName","System","_editingPage","editingPage","classList","remove","prepareComponentSpecToSend","spec","inputs","input","keysToConvertFnToString_1","hooks","reduce","memo","class","registerBlock","component","registerComponent","builderOptions","addComponent","models","editingModel","includes","sendSpec","components","events","fullUserAttributes","overrideUserAttributes","events_1","event_1","metadata","user","Boolean","builderNoTrack","cookieEnabled","canTrack","editingMode","findParentElement","checkElement","parentElement","findBuilderParent","setTrackingHook","hook","track","eventName","isPreviewing","eventData","sdkVersion","VERSION","meta","ownerId","userAttributes","getUserAttributes","returnValue","localStorage","trackImpression","contentId","variationId","trackConversion","amount","customProperties","useContentId","trackInteraction","alreadyTrackedOne","targetBuilderElement","clientX","clientY","xOffset","targetRect","left","yOffset","xRatio","round","width","yRatio","height","targetOffset","y","builderTargetOffset","builderId","builderElementIndex","unique","num","token","modifySearch","group1","group2","getLocation","tests","builder","setTestCookie","resetOverrides","api","editing","frameEditing","setUserAttributes","locale","includeRefs","enrich","_b","_c","_d","_e","origin","isRestricted","isTrusted","source","settingsChange","info_1","hasComponent_1","every","thisInfo","animator","alias","entry","modelName","contentData","model","componentData","editingPageMode","flushGetContentQueue","_f","id_1","Function","finalResult","trim","init","defaultCanTrack","parsedLocation","isMobile","Android","BlackBerry","iOS","Opera","Windows","any","isTablet","urlPath","device","setTrackingUserAttributes","attributes","instance","queueGetContent","matches","isStatic","matchData","blocksString","blocks","testVariationId","testVariationName","lastUpdated","isEditingThisModel","currentObservable","initialContent","queue_1","observable","requestUrl","overrideHost","usePastQueue","useQueue","queue","queryParams","format","pageQueryParams","includeUrl","location_1","urlQueueItem","queue_2","static","cacheSeconds","staleCacheSeconds","properties_1","hasParams","keyNames","queryStr","requestOptions","Authorization","apiVersionBasedOnFn","queue_3","keyName","sorted","testModifiedResults","isServer","processResultsForTests","queue_4","results","mappedResults","variations","cookieValue","getTestCookie","cookieVariation","variation","testRatio","variationName","future","setDate","getDate","getContent","getAll","limit","previewingModel","referrer","isReact","_assign","s","p","W","M","d","a","q","C","m","b","v","K","l","I","B","J","f","F","G","N","charAt","substring","ca","O","A","H","X","D","z","da","ea","fa","w","L","P","Y","E","ha","Q","ia","Z","ja","ka","aa","ba","la","ma","R","na","oa","S","U","T","animationIterationCount","borderImageOutset","borderImageSlice","borderImageWidth","boxFlex","boxFlexGroup","boxOrdinalGroup","columnCount","columns","flex","flexGrow","flexPositive","flexShrink","flexNegative","flexOrder","gridRow","gridRowEnd","gridRowSpan","gridRowStart","gridColumn","gridColumnEnd","gridColumnSpan","gridColumnStart","msGridRow","msGridRowSpan","msGridColumn","msGridColumnSpan","fontWeight","lineHeight","opacity","order","orphans","tabSize","widows","zIndex","zoom","WebkitLineClamp","fillOpacity","floodOpacity","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","fold","foldValue","seen","o","objHash","sort","foldObject","valueOf","stack","module","exports","pad","global","getGlobal","Headers","Request","Response"],"sourceRoot":""}