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AIR,GACnB8E,GAAMA,EAAK1I,OAAOyI,EACxB,EAoBEX,QAVF,SAAiBvF,EAAQqB,GACvB,MAAM8E,EAAOJ,EAAMlE,IAAIR,GAClB8E,IACLA,EAAKZ,UACLQ,EAAMM,OAAOhF,GACf,IAeA,SAASiF,IAGP,OAAOxE,EAFUtI,UAAUC,OAAS,QAAsB2B,IAAjB5B,UAAU,GAAmBA,UAAU,GAAK,CAAC,EAxjBxF,SAAuBF,GAAU,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAAS,MAAQF,UAAUD,GAAKC,UAAUD,GAAK,CAAC,EAAGA,EAAI,EAAIyE,EAAQ5E,OAAOM,IAAS,GAAImL,SAAQ,SAAUlL,GAAOgF,EAAgBrF,EAAQK,EAAKD,EAAOC,GAAO,IAAKP,OAAOmN,0BAA4BnN,OAAOoN,iBAAiBlN,EAAQF,OAAOmN,0BAA0B7M,IAAWsE,EAAQ5E,OAAOM,IAASmL,SAAQ,SAAUlL,GAAOP,OAAOsG,eAAepG,EAAQK,EAAKP,OAAOoF,yBAAyB9E,EAAQC,GAAO,GAAI,CAAE,OAAOL,CAAQ,CA0jB7dmN,CAAc,CACtCvB,QAASe,GAFGzM,UAAUC,OAAS,QAAsB2B,IAAjB5B,UAAU,GAAmBA,UAAU,GAAK,CAAC,GAIrF,C","sources":["webpack://uk-b2c/./node_modules/@bugsnag/plugin-react/dist/bugsnag-react.js","webpack://uk-b2c/./node_modules/remount/dist/remount.js"],"sourcesContent":["(function (f) {\n if (typeof exports === \"object\" && typeof module !== \"undefined\") {\n module.exports = f();\n } else if (typeof define === \"function\" && define.amd) {\n define([], f);\n } else {\n var g;\n if (typeof window !== \"undefined\") {\n g = window;\n } else if (typeof global !== \"undefined\") {\n g = global;\n } else if (typeof self !== \"undefined\") {\n g = self;\n } else {\n g = this;\n }\n g.BugsnagPluginReact = f();\n }\n})(function () {\n var define, module, exports;\n var _$src_1 = {};\n function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n }\n function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n }\n function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n _setPrototypeOf(subClass, superClass);\n }\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n }\n _$src_1 = /*#__PURE__*/function () {\n function BugsnagPluginReact() {\n // Fetch React from the window object, if it exists\n var globalReact = typeof window !== 'undefined' && window.React;\n this.name = 'react';\n this.lazy = arguments.length === 0 && !globalReact;\n if (!this.lazy) {\n this.React = (arguments.length <= 0 ? undefined : arguments[0]) || globalReact;\n if (!this.React) throw new Error('@bugsnag/plugin-react reference to `React` was undefined');\n }\n }\n var _proto = BugsnagPluginReact.prototype;\n _proto.load = function load(client) {\n if (!this.lazy) {\n var ErrorBoundary = createClass(this.React, client);\n ErrorBoundary.createErrorBoundary = function () {\n return ErrorBoundary;\n };\n return ErrorBoundary;\n }\n var BugsnagPluginReactLazyInitializer = function () {\n throw new Error(\"@bugsnag/plugin-react was used incorrectly. Valid usage is as follows:\\nPass React to the plugin constructor\\n\\n `Bugsnag.start({ plugins: [new BugsnagPluginReact(React)] })`\\nand then call `const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary()`\\n\\nOr if React is not available until after Bugsnag has started,\\nconstruct the plugin with no arguments\\n `Bugsnag.start({ plugins: [new BugsnagPluginReact()] })`,\\nthen pass in React when available to construct your error boundary\\n `const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary(React)`\");\n };\n BugsnagPluginReactLazyInitializer.createErrorBoundary = function (React) {\n if (!React) throw new Error('@bugsnag/plugin-react reference to `React` was undefined');\n return createClass(React, client);\n };\n return BugsnagPluginReactLazyInitializer;\n };\n return BugsnagPluginReact;\n }();\n var formatComponentStack = function (str) {\n var lines = str.split(/\\s*\\n\\s*/g);\n var ret = '';\n for (var line = 0, len = lines.length; line < len; line++) {\n if (lines[line].length) ret += \"\" + (ret.length ? '\\n' : '') + lines[line];\n }\n return ret;\n };\n var createClass = function (React, client) {\n return /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(ErrorBoundary, _React$Component);\n function ErrorBoundary(props) {\n var _this;\n _this = _React$Component.call(this, props) || this;\n _this.state = {\n error: null,\n info: null\n };\n _this.handleClearError = _this.handleClearError.bind(_assertThisInitialized(_this));\n return _this;\n }\n var _proto2 = ErrorBoundary.prototype;\n _proto2.handleClearError = function handleClearError() {\n this.setState({\n error: null,\n info: null\n });\n };\n _proto2.componentDidCatch = function componentDidCatch(error, info) {\n var onError = this.props.onError;\n var handledState = {\n severity: 'error',\n unhandled: true,\n severityReason: {\n type: 'unhandledException'\n }\n };\n var event = client.Event.create(error, true, handledState, 1);\n if (info && info.componentStack) info.componentStack = formatComponentStack(info.componentStack);\n event.addMetadata('react', info);\n client._notify(event, onError);\n this.setState({\n error: error,\n info: info\n });\n };\n _proto2.render = function render() {\n var error = this.state.error;\n if (error) {\n var FallbackComponent = this.props.FallbackComponent;\n if (FallbackComponent) return React.createElement(FallbackComponent, _extends({}, this.state, {\n clearError: this.handleClearError\n }));\n return null;\n }\n return this.props.children;\n };\n return ErrorBoundary;\n }(React.Component);\n };\n _$src_1.formatComponentStack = formatComponentStack;\n _$src_1[\"default\"] = _$src_1;\n return _$src_1;\n});","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return typeof key === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (typeof input !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (typeof res !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom/client';\n\n/* global HTMLElement */\n\n/*\n * Adapted from https://cdn.jsdelivr.net/npm/@webcomponents/webcomponentsjs@2.0.4/custom-elements-es5-adapter.js\n * Rolling this in so we don't need another polyfill.\n */\n\nfunction inject() {\n if (window.HTMLElement && window.HTMLElement._babelES5Adapter || void 0 === window.Reflect || void 0 === window.customElements || window.customElements.hasOwnProperty('polyfillWrapFlushCallback')) {\n return;\n }\n const a = HTMLElement;\n window.HTMLElement = function () {\n return Reflect.construct(a, [], this.constructor);\n };\n HTMLElement.prototype = a.prototype;\n HTMLElement.prototype.constructor = HTMLElement;\n Object.setPrototypeOf(HTMLElement, a);\n HTMLElement._babelES5Adapter = true;\n}\n\n// @ts-check\n\n/**\n * The name of this strategy.\n * @type string\n */\n\nconst name$1 = 'CustomElements';\n\n/**\n * Registers a custom element.\n *\n * This creates a custom element (ie, a subclass of `window.HTMLElement`) and\n * registers it (ie, `window.customElements.define`).\n *\n * Events will be triggered when something interesting happens.\n *\n * @example\n * defineElement(\n * { component: Tooltip },\n * 'x-tooltip',\n * { onUpdate, onUnmount }\n * )\n *\n * @private\n * @param {ElementSpec} elSpec\n * @param {string} elName\n * @param {ElementEvents} events\n */\n\nfunction defineElement$1(elSpec, elName, events) {\n const onUpdate = events.onUpdate,\n onUnmount = events.onUnmount,\n onMount = events.onMount;\n inject();\n const attributes = elSpec.attributes || [];\n class ComponentElement extends HTMLElement {\n static get observedAttributes() {\n return ['props-json', ...attributes];\n }\n connectedCallback() {\n this._mountPoint = createMountPoint(this, elSpec);\n onMount(this, this._mountPoint);\n }\n disconnectedCallback() {\n if (!this._mountPoint) {\n return;\n }\n onUnmount(this, this._mountPoint);\n }\n attributeChangedCallback() {\n if (!this._mountPoint) {\n return;\n }\n onUpdate(this, this._mountPoint);\n }\n }\n\n // Supress warning when quiet mode is on\n if (elSpec.quiet && window.customElements.get(elName)) {\n return;\n }\n window.customElements.define(elName, ComponentElement);\n}\nfunction isSupported$1() {\n return !!(window.customElements && window.customElements.define);\n}\n\n/**\n * Creates a `` element that serves as the mounting point for React\n * components. If `shadow: true` is requested, it'll attach a shadow node.\n *\n * @private\n * @param {HTMLElement} element\n * @param {ElementSpec} elSpec\n */\n\nfunction createMountPoint(element, elSpec) {\n const shadow = elSpec.shadow;\n if (shadow && element.attachShadow) {\n const mountPoint = document.createElement('span');\n element.attachShadow({\n mode: 'open'\n }).appendChild(mountPoint);\n return mountPoint;\n } else {\n return element;\n }\n}\n\n/**\n * Check if Shadow DOM is supported.\n */\n\nfunction supportsShadow$1() {\n return !!(document && document.body && document.body.attachShadow);\n}\nvar CustomElementsStrategy = /*#__PURE__*/Object.freeze({\n __proto__: null,\n name: name$1,\n defineElement: defineElement$1,\n isSupported: isSupported$1,\n supportsShadow: supportsShadow$1\n});\n\n// @ts-check\n\n/**\n * Some implementations of MutationObserver don't have .forEach,\n * so we need our own `forEach` shim. This is usually the case with\n * polyfilled environments.\n *\n * @type { import('./types').Each }\n */\n\nfunction each( /** @type any */list, /** @type any */fn) {\n for (let i = 0, len = list.length; i < len; i++) {\n fn(list[i]);\n }\n}\n\n// @ts-check\n\n/**\n * The name of this strategy.\n * @type string\n */\n\nconst name = 'MutationObserver';\n\n/**\n * List of observers tags.\n * @type ObserverList\n */\n\nconst observers = {};\nfunction isSupported() {\n return 'MutationObserver' in window;\n}\n\n/**\n * Defines a custom element.\n *\n * @example\n * defineElement(\n * { component: MyComponent },\n * 'my-div',\n * {\n * onMount: () => {},\n * onUpdate: () => {},\n * onUnmount: () => {},\n * }\n * )\n *\n * @private\n * @param {ElementSpec} elSpec\n * @param {string} elName\n * @param {ElementEvents} events\n */\n\nfunction defineElement(elSpec, elName, events) {\n elName = elName.toLowerCase();\n\n // Maintain parity with what would happen in Custom Elements mode\n if (!isValidName(elName)) {\n if (elSpec.quiet) {\n return;\n }\n throw new Error(`Remount: \"${elName}\" is not a valid custom element elName`);\n }\n if (observers[elName]) {\n if (elSpec.quiet) {\n return;\n }\n throw new Error(`Remount: \"${elName}\" is already registered`);\n }\n const observer = new MutationObserver( /** @type MutationCallback */mutations => {\n each(mutations, ( /** @type MutationRecord */mutation) => {\n each(mutation.addedNodes, ( /** @type Node */node) => {\n if (isElement(node)) {\n checkForMount(node, elName, events);\n }\n });\n });\n });\n observer.observe(document.body, {\n childList: true,\n subtree: true\n });\n observers[elName] = /* true */observer;\n function mountElementsInDOM() {\n const nodes = document.getElementsByTagName(elName);\n each(nodes, ( /** @type HTMLElement */node) => checkForMount(node, elName, events));\n }\n if (document.readyState === 'complete' || document.readyState === 'interactive') {\n mountElementsInDOM();\n } else {\n window.addEventListener('DOMContentLoaded', mountElementsInDOM);\n }\n}\n\n/**\n * Checks if this new element should fire an `onUpdate` hook.\n * Recurses down to its descendant nodes.\n *\n * @param {HTMLElement} node\n * @param {string} elName\n * @param {ElementEvents} events\n */\n\nfunction checkForMount(node, elName, events) {\n if (node.nodeName.toLowerCase() === elName) {\n // It's a match!\n events.onMount(node, node);\n observeForUpdates(node, events);\n observeForRemoval(node, events);\n } else if (node.children && node.children.length) {\n // Recurse down into the other additions\n each(node.children, ( /** @type HTMLElement */subnode) => {\n if (isElement(subnode)) {\n checkForMount(subnode, elName, events);\n }\n });\n }\n}\n\n/**\n * Observes for any changes in attributes.\n *\n * @param {Element} node\n * @param {ElementEvents} events\n */\n\nfunction observeForUpdates(node, events) {\n const onUpdate = events.onUpdate;\n const observer = new MutationObserver( /** @type MutationCallback */mutations => {\n each(mutations, ( /** @type MutationRecord */mutation) => {\n const targetNode = mutation.target;\n if (isElement(targetNode)) {\n onUpdate(targetNode, targetNode);\n }\n });\n });\n observer.observe(node, {\n attributes: true\n });\n}\n\n/**\n * Observes a node's parent to wait until the node is removed\n * @param {HTMLElement} node\n * @param {ElementEvents} events\n */\n\nfunction observeForRemoval(node, events) {\n const onUnmount = events.onUnmount;\n const parent = node.parentNode;\n\n // Not sure when this can happen, but let's add this for type safety\n if (!parent) {\n return;\n }\n const observer = new MutationObserver( /** @type MutationCallback */mutations => {\n each(mutations, ( /** @type MutationRecord */mutation) => {\n each(mutation.removedNodes, ( /** @type Node */subnode) => {\n if (node !== subnode) {\n return;\n }\n if (isElement(node)) {\n // @ts-ignore TypeScript expects 0 arguments...?\n observer.disconnect(parent);\n onUnmount(node, node);\n }\n });\n });\n });\n observer.observe(parent, {\n childList: true,\n subtree: true\n });\n}\n\n/**\n * Validate a custom tag.\n *\n * Since Remount can work with either Custom Elements or MutationObserver API's,\n * it'd be wise if we rejected element names that won't work in Custom Elements\n * mode (even if we're using MutationObserver mode).\n *\n * @param {string} elName\n * @returns {boolean}\n *\n * @example\n * isValidName('div') // => false\n * isValidName('my-div') // => true\n * isValidName('123-456') // => false\n * isValidName('my-123') // => true\n *\n * @private\n */\n\nfunction isValidName(elName) {\n return !!(elName.indexOf('-') !== -1 && elName.match(/^[a-z][a-z0-9-]*$/));\n}\n\n/**\n * Shadow DOM is not supported with the Mutation Observer strategy.\n */\n\nfunction supportsShadow() {\n return false;\n}\n\n/**\n * Checks if a given Node is an HTMLElement.\n *\n * It's possible that a mutation's `addedNodes` return something that isn't an\n * HTMLElement.\n *\n * @param {any} node\n * @returns {node is HTMLElement}\n */\n\nfunction isElement(node) {\n if (node) {\n return true;\n }\n return false;\n}\nvar MutationObserverStrategy = /*#__PURE__*/Object.freeze({\n __proto__: null,\n name: name,\n observers: observers,\n isSupported: isSupported,\n defineElement: defineElement,\n supportsShadow: supportsShadow\n});\n\n// @ts-check\n\n/**\n * Cache of the strategy determined by `getStrategy()`.\n * @type {Strategy | null | undefined}\n */\n\nlet cachedStrategy;\n\n/**\n * Detect what API can be used.\n *\n * @example\n * Remount.getStrategy().name\n */\n\nfunction getStrategy() {\n if (cachedStrategy) {\n return cachedStrategy;\n }\n const StrategyUsed = [CustomElementsStrategy, MutationObserverStrategy].find(strategy => !!strategy.isSupported());\n if (!StrategyUsed) {\n console.warn(\"Remount: This browser doesn't support the \" + 'MutationObserver API or the Custom Elements API. Including ' + 'polyfills might fix this. Remount elements will not work. ' + 'https://github.com/rstacruz/remount');\n }\n cachedStrategy = StrategyUsed;\n return StrategyUsed;\n}\n\n/**\n * Registers custom elements and links them to React components.\n * @param {ElementMap} components\n * @param {Defaults=} defaults\n *\n * @example\n * define({ 'x-tooltip': Tooltip })\n *\n * @example\n * define(\n * { 'x-tooltip': Tooltip },\n * { attributes: ['title', 'body'] }\n * )\n */\n\nfunction define(components, defaults) {\n const Strategy = getStrategy();\n if (!Strategy) {\n return;\n }\n Object.keys(components).forEach(( /** @type string */name) => {\n // Construct the specs for the element.\n // (eg, { component: Tooltip, attributes: ['title'] })\n /** @type ElementSpec */\n const elSpec = Object.assign({}, defaults, toElementSpec(components[name]));\n\n /** @type Adapter | null | undefined */\n const adapter = elSpec.adapter;\n if (!adapter) throw new Error('No suitable adapter found');\n\n // Define a custom element.\n Strategy.defineElement(elSpec, name, {\n onMount(element, mountPoint) {\n const props = getProps(element, elSpec.attributes);\n if (elSpec.shadow && elSpec.retarget) {\n adapter.mount(elSpec, mountPoint, props, element);\n } else {\n adapter.mount(elSpec, mountPoint, props, null);\n }\n },\n onUpdate(element, mountPoint) {\n const props = getProps(element, elSpec.attributes);\n adapter.update(elSpec, mountPoint, props, null);\n },\n onUnmount(element, mountPoint) {\n adapter.unmount(elSpec, mountPoint);\n }\n });\n });\n}\n\n/**\n * Coerces something into an `ElementSpec` type.\n *\n * @param {ElementSpec | Component} thing\n * @returns {ElementSpec}\n * @private\n *\n * @example\n * toElementSpec(Tooltip)\n * // => { component: Tooltip }\n *\n * toElementSpec({ component: Tooltip })\n * // => { component: Tooltip }\n */\n\nfunction toElementSpec(thing) {\n if (isElementSpec(thing)) {\n return thing;\n }\n return {\n component: thing\n };\n}\n\n/**\n * Checks if a given `spec` is an ElementSpec.\n *\n * @param {any} spec\n * @returns {spec is ElementSpec}\n */\n\nfunction isElementSpec(spec) {\n return typeof spec === 'object' && spec.component;\n}\n\n/**\n * Returns properties for a given HTML element.\n *\n * @private\n * @param {HTMLElement} element\n * @param {string[] | null | undefined} attributes\n *\n * @example\n * getProps(div, ['name'])\n * // => { name: 'Romeo' }\n */\n\nfunction getProps(element, attributes) {\n const rawJson = element.getAttribute('props-json');\n if (rawJson) {\n return JSON.parse(rawJson);\n }\n const names = attributes || [];\n return names.reduce(( /** @type PropertyMap */result, /** @type string */attribute) => {\n result[attribute] = element.getAttribute(attribute);\n return result;\n }, {});\n}\n\n// @ts-check\n\n/** @type {Map} */\nconst roots = new Map();\n\n/**\n * @param {ElementSpec} elSpec\n * @param {HTMLElement} mountPoint\n * @param {object} props\n * @param {HTMLElement | null} element\n */\n\nfunction mount(elSpec, mountPoint, props, element) {\n const reactElement = /*#__PURE__*/React.createElement(elSpec.component, props);\n const root = ReactDOM.createRoot(mountPoint);\n roots.set(mountPoint, root);\n root.render(reactElement);\n}\n\n/**\n * Updates a custom element by calling `ReactDOM.render()`.\n * @private\n *\n * @param {ElementSpec} elSpec\n * @param {HTMLElement} mountPoint\n * @param {object} props\n * @param {HTMLElement | null} element\n */\n\nfunction update(elSpec, mountPoint, props, element) {\n const reactElement = /*#__PURE__*/React.createElement(elSpec.component, props);\n const root = roots.get(mountPoint);\n if (root) root.render(reactElement);\n}\n\n/**\n * Unmounts a component.\n * @private\n *\n * @param {ElementSpec} elSpec\n * @param {HTMLElement} mountPoint\n */\n\nfunction unmount(elSpec, mountPoint) {\n const root = roots.get(mountPoint);\n if (!root) return;\n root.unmount();\n roots.delete(mountPoint);\n}\nvar ReactAdapter = /*#__PURE__*/Object.freeze({\n __proto__: null,\n mount: mount,\n update: update,\n unmount: unmount\n});\n\n/** @typedef { import('./types').ElementMap } ElementMap */\n\n/**\n * @param {ElementMap} components\n * @param {Defaults=} defaults\n */\n\nfunction defineReact() {\n let components = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return define(components, _objectSpread({\n adapter: ReactAdapter\n }, options));\n}\nexport { defineReact as define, getStrategy };"],"names":["module","exports","_$src_1","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_assertThisInitialized","self","ReferenceError","_inheritsLoose","subClass","superClass","create","constructor","_setPrototypeOf","o","p","setPrototypeOf","__proto__","BugsnagPluginReact","globalReact","window","React","name","lazy","undefined","Error","load","client","ErrorBoundary","createClass","createErrorBoundary","BugsnagPluginReactLazyInitializer","formatComponentStack","str","lines","split","ret","line","len","_React$Component","props","_this","state","error","info","handleClearError","bind","_proto2","setState","componentDidCatch","onError","handledState","severity","unhandled","severityReason","type","event","Event","componentStack","addMetadata","_notify","render","FallbackComponent","createElement","clearError","children","Component","f","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","_defineProperty","obj","value","arg","input","hint","prim","Symbol","toPrimitive","res","TypeError","String","Number","_toPrimitive","_toPropertyKey","defineProperty","configurable","writable","CustomElementsStrategy","freeze","defineElement","elSpec","elName","events","onUpdate","onUnmount","onMount","HTMLElement","_babelES5Adapter","Reflect","customElements","a","construct","inject","attributes","ComponentElement","observedAttributes","connectedCallback","_mountPoint","element","shadow","attachShadow","mountPoint","document","mode","appendChild","createMountPoint","disconnectedCallback","attributeChangedCallback","quiet","get","define","isSupported","supportsShadow","body","each","list","fn","observers","checkForMount","node","nodeName","toLowerCase","MutationObserver","mutations","mutation","targetNode","isElement","observe","observeForUpdates","parent","parentNode","observer","removedNodes","subnode","disconnect","childList","subtree","observeForRemoval","MutationObserverStrategy","indexOf","match","isValidName","addedNodes","mountElementsInDOM","getElementsByTagName","readyState","addEventListener","cachedStrategy","components","defaults","Strategy","StrategyUsed","find","strategy","console","warn","getStrategy","forEach","thing","spec","component","toElementSpec","adapter","getProps","retarget","mount","update","unmount","rawJson","getAttribute","JSON","parse","reduce","result","attribute","roots","Map","ReactAdapter","reactElement","root","set","delete","defineReact","getOwnPropertyDescriptors","defineProperties","_objectSpread"],"sourceRoot":""}