;\n readonly submitting: boolean;\n};\n","import React from 'react';\nimport styled from 'styled-components';\n\nimport { AccountDetails } from './components/account-details';\nimport { DefaultHeader } from './components/default-header';\nimport { SiteSelectorForm } from './components/site-selector-form';\n\nimport { fontFamily } from '@atlaskit/theme';\n\nexport type SiteSelectorViewProps = {\n readonly userName: string;\n readonly userEmail: string;\n readonly sites: string[];\n\n readonly header?: React.ReactNode;\n\n readonly onNewSiteSelected: () => void;\n readonly onSiteSelected: (site: string) => void;\n readonly onSiteChanged: () => void;\n readonly onSwitchAccountClick: () => void;\n readonly onCancelClick: () => void;\n\n readonly avatarSrc?: string;\n readonly fullScreenView?: boolean;\n};\n\nexport function SiteSelectorView({\n userName,\n userEmail,\n sites,\n avatarSrc,\n header,\n onNewSiteSelected,\n onSiteSelected,\n onSwitchAccountClick,\n onCancelClick,\n onSiteChanged,\n fullScreenView\n}: SiteSelectorViewProps) {\n return (\n \n {header !== undefined ? header : }\n \n \n \n \n \n \n \n );\n}\n\nconst RootContainer = styled.div`\n font-family: ${fontFamily};\n`;\n\nconst Header = styled.div`\n font-family: Charlie Text, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto,\n Noto Sans, Ubuntu, Droid Sans, Helvetica Neue, sans-serif;\n`;\n\nconst AvatarContainer = styled.div`\n margin: 20px 0px;\n`;\n\nconst SitesContainer = styled.div``;\n","import React from 'react';\nconst { Consumer, Provider } = React.createContext({\n isOpen: true,\n onExited: () => { },\n});\n// checks if children exist and are truthy\nconst hasChildren = (children) => React.Children.count(children) > 0 &&\n React.Children.map(children, child => !!child).filter(Boolean).length > 0;\nclass Transition extends React.Component {\n constructor() {\n super(...arguments);\n this.state = {\n currentChildren: undefined,\n };\n this.onExited = () => {\n this.setState({\n currentChildren: this.props.children,\n });\n };\n }\n static getDerivedStateFromProps(props, state) {\n const { currentChildren: previousChildren } = state;\n const exiting = hasChildren(previousChildren) && !hasChildren(props.children);\n return {\n currentChildren: exiting ? previousChildren : props.children,\n };\n }\n render() {\n return (React.createElement(Provider, { value: {\n onExited: this.onExited,\n isOpen: hasChildren(this.props.children),\n } }, this.state.currentChildren));\n }\n}\nexport const ModalTransitionConsumer = Consumer;\nexport default Transition;\n//# sourceMappingURL=ModalTransition.js.map","export const PORTAL_MOUNT_EVENT = 'akPortalMount';\nexport const PORTAL_UNMOUNT_EVENT = 'akPortalUnmount';\n//# sourceMappingURL=constants.js.map","import React from 'react';\nimport { canUseDOM } from 'exenv';\nimport ReactDOM from 'react-dom';\nimport invariant from 'tiny-invariant';\nimport { layers } from '@atlaskit/theme';\nimport { PORTAL_MOUNT_EVENT, PORTAL_UNMOUNT_EVENT } from '../constants';\nconst createContainer = (zIndex) => {\n const container = document.createElement('div');\n container.setAttribute('class', 'atlaskit-portal');\n container.setAttribute('style', `z-index: ${zIndex};`);\n return container;\n};\nconst getBody = () => {\n invariant(document && document.body, 'cannot find document.body');\n return document.body;\n};\n/**\n * Reverses the name: zIndex object so we can quickly access it using the zIndex value as the key.\n */\nconst zIndexToName = Object.keys(layers).reduce((acc, name) => {\n const layerName = name;\n const value = layers[layerName]();\n acc[value] = layerName;\n return acc;\n}, {});\nconst getLayerName = (zIndex) => {\n return Object.prototype.hasOwnProperty.call(zIndexToName, zIndex)\n ? zIndexToName[zIndex]\n : null;\n};\nconst getEvent = (eventName, zIndex) => {\n const detail = {\n layer: getLayerName(Number(zIndex)),\n zIndex,\n };\n // In ie11 the CustomEvent object exists, but it cannot be used as a constructor\n if (typeof CustomEvent === 'function') {\n return new CustomEvent(eventName, {\n detail,\n });\n }\n // CustomEvent constructor API not supported (ie11)\n // Using `new Event` or `new CustomEvent` does not work in ie11\n const event = document.createEvent('CustomEvent');\n const params = {\n bubbles: true,\n cancellable: true,\n detail,\n };\n event.initCustomEvent(eventName, params.bubbles, params.cancellable, params.detail);\n return event;\n};\nconst firePortalEvent = (eventName, zIndex) => {\n const event = getEvent(eventName, zIndex);\n window.dispatchEvent(event);\n};\nconst getPortalParent = () => {\n const parentElement = document.querySelector('body > .atlaskit-portal-container');\n if (!parentElement) {\n const parent = document.createElement('div');\n parent.setAttribute('class', 'atlaskit-portal-container');\n parent.setAttribute('style', `display: flex;`);\n getBody().appendChild(parent);\n return parent;\n }\n return parentElement;\n};\n// This is a generic component does two things:\n// 1. Portals it's children using React.createPortal\n// 2. Creates the DOM node container for the portal based on props\n// 3. Ensures DOM the container creates it's own stacking context\nclass Portal extends React.Component {\n constructor() {\n super(...arguments);\n this.state = {\n container: canUseDOM ? createContainer(this.props.zIndex) : undefined,\n portalIsMounted: false,\n };\n }\n componentDidUpdate(prevProps, prevState) {\n const { container } = this.state;\n const { zIndex } = this.props;\n if (container && prevProps.zIndex !== zIndex) {\n const newContainer = createContainer(zIndex);\n getPortalParent().replaceChild(container, newContainer);\n // eslint-disable-next-line react/no-did-update-set-state\n this.setState({ container: newContainer });\n }\n else if (!prevState.container && container) {\n // SSR path\n getPortalParent().appendChild(container);\n }\n }\n componentDidMount() {\n const { container } = this.state;\n const { zIndex } = this.props;\n if (container) {\n getPortalParent().appendChild(container);\n }\n else {\n // SSR path\n const newContainer = createContainer(zIndex);\n // eslint-disable-next-line react/no-did-mount-set-state\n this.setState({ container: newContainer });\n }\n // eslint-disable-next-line react/no-did-mount-set-state\n this.setState({\n portalIsMounted: true,\n });\n firePortalEvent(PORTAL_MOUNT_EVENT, Number(zIndex));\n }\n componentWillUnmount() {\n const { container } = this.state;\n const { zIndex } = this.props;\n if (container) {\n getPortalParent().removeChild(container);\n // clean up parent element if there are no more portals\n const portals = !!document.querySelector('body > .atlaskit-portal-container > .atlaskit-portal');\n if (!portals) {\n getBody().removeChild(getPortalParent());\n }\n }\n firePortalEvent(PORTAL_UNMOUNT_EVENT, Number(zIndex));\n }\n render() {\n const { container, portalIsMounted } = this.state;\n return container && portalIsMounted\n ? ReactDOM.createPortal(this.props.children, container)\n : null;\n }\n}\nPortal.defaultProps = {\n zIndex: 0,\n};\nexport default Portal;\n//# sourceMappingURL=Portal.js.map","/******************************************************************************\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***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\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 () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n","import { __extends } from \"tslib\";\nimport * as React from 'react';\nimport { counter, getId, getPrefix } from \"./context\";\n// --------------------------------------------\nvar prefixId = function (id, prefix, name) {\n var uid = (prefix + id);\n return String(name ? name(uid) : uid);\n};\n/**\n * @deprecated\n * UID in form of renderProps (not SSR friendly)\n * @see https://github.com/thearnica/react-uid#react-components\n * @example\n * // get UID to connect label to input\n * \n * {(id)} => \n *\n * // get uid to generate uid for a keys in a list\n * \n * {(, uid)} => items.map(item => )}\n * \n */\nvar UID = /** @class */ (function (_super) {\n __extends(UID, _super);\n function UID() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.state = {\n quartz: _this.props.idSource || counter,\n prefix: getPrefix(_this.props.idSource),\n id: getId(_this.props.idSource || counter)\n };\n _this.uid = function (item) { return prefixId(_this.state.id + '-' + _this.state.quartz.uid(item), _this.state.prefix, _this.props.name); };\n return _this;\n }\n UID.prototype.render = function () {\n var _a = this.props, children = _a.children, name = _a.name;\n var _b = this.state, id = _b.id, prefix = _b.prefix;\n return children(prefixId(id, prefix, name), this.uid);\n };\n return UID;\n}(React.Component));\nexport { UID };\n","import * as React from 'react';\nimport { createSource, source } from \"./context\";\nimport { UID } from \"./UIDComponent\";\n/**\n * UID isolation component, required for SSR and testing.\n * Wrap your application with it to guarantee UID consistency between SSR and CSR.\n * @param {String} [prefix] - prefix for all generated ids\n * @example\n * \n * \n * \n * @see https://github.com/thearnica/react-uid#server-side-friendly-uid\n */\nexport var UIDReset = function (_a) {\n var children = _a.children, _b = _a.prefix, prefix = _b === void 0 ? '' : _b;\n return (React.createElement(source.Provider, { value: createSource(prefix) }, children));\n};\n/**\n * Creates a sub-ids for nested components, isolating from inside a branch.\n * Useful for self-contained elements or code splitting\n * @see https://github.com/thearnica/react-uid#code-splitting\n */\nexport var UIDFork = function (_a) {\n var children = _a.children, _b = _a.prefix, prefix = _b === void 0 ? '' : _b;\n return (React.createElement(UIDConsumer, null, function (id) { return (React.createElement(source.Provider, { value: createSource(id + '-' + prefix) }, children)); }));\n};\n/**\n * UID in form of renderProps. Supports nesting and SSR. Prefer {@link useUID} hook version if possible.\n * @see https://github.com/thearnica/react-uid#server-side-friendly-uid\n * @see https://github.com/thearnica/react-uid#react-components\n * @example\n * // get UID to connect label to input\n * \n * {(id)} => \n *\n * // get uid to generate uid for a keys in a list\n * \n * {(, uid)} => items.map(item => )}\n * \n *\n * @see {@link useUID} - a hook version of this component\n * @see {@link UID} - not SSR compatible version\n */\nexport var UIDConsumer = function (_a) {\n var name = _a.name, children = _a.children;\n return (React.createElement(source.Consumer, null, function (value) { return (React.createElement(UID, { name: name, idSource: value, children: children })); }));\n};\n","import styled from 'styled-components';\nimport { DN90A, N100A } from '@atlaskit/theme/colors';\nimport { themed } from '@atlaskit/theme/components';\nimport { layers } from '@atlaskit/theme/constants';\nconst backgroundColor = themed({ light: N100A, dark: DN90A });\nexport const opacity = (p) => (p.isTinted ? 1 : 0);\nexport const pointerEvents = (p) => p.canClickThrough ? 'none' : 'initial';\nexport default styled.div `\n background: ${backgroundColor};\n bottom: 0;\n left: 0;\n opacity: ${opacity};\n pointer-events: ${pointerEvents};\n position: fixed;\n right: 0;\n top: 0;\n transition: opacity 220ms;\n z-index: ${layers.blanket};\n`;\n//# sourceMappingURL=styled.js.map","import React from 'react';\nimport { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents, } from '@atlaskit/analytics-next';\nimport Div from './styled';\nimport { name as packageName, version as packageVersion } from './version.json';\nclass Blanket extends React.Component {\n render() {\n const { canClickThrough, isTinted, onBlanketClicked } = this.props;\n const onClick = canClickThrough ? undefined : onBlanketClicked;\n const containerProps = { canClickThrough, isTinted, onClick };\n return React.createElement(Div, Object.assign({}, containerProps));\n }\n}\nBlanket.defaultProps = {\n canClickThrough: false,\n isTinted: false,\n onBlanketClicked: () => { },\n};\nexport { Blanket as BlanketWithoutAnalytics };\nconst createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');\nexport default withAnalyticsContext({\n componentName: 'blanket',\n packageName,\n packageVersion,\n})(withAnalyticsEvents({\n onBlanketClicked: createAndFireEventOnAtlaskit({\n action: 'clicked',\n actionSubject: 'blanket',\n attributes: {\n componentName: 'blanket',\n packageName,\n packageVersion,\n },\n }),\n})(Blanket));\n//# sourceMappingURL=Blanket.js.map","// eslint-disable-next-line import/prefer-default-export\nexport const WIDTH_ENUM = {\n values: ['small', 'medium', 'large', 'x-large'],\n widths: {\n small: 400,\n medium: 600,\n large: 800,\n 'x-large': 968,\n },\n defaultValue: 'medium',\n};\nexport const gutter = 60;\n//# sourceMappingURL=shared-variables.js.map","import styled from '@emotion/styled-base';\n\nvar tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG\n'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\nvar newStyled = styled.bind();\ntags.forEach(function (tagName) {\n newStyled[tagName] = newStyled(tagName);\n});\n\nexport default newStyled;\n","/* Used to adjust flex parent height to account for the subtraction in children below */\nexport const IEMaxHeightCalcPx = 1;\n/* A bug exists in IE where flex column children overflow the height of their parents.\n * The workaround is to set a pixel max-height on the flex children.\n * For more information see https://github.com/philipwalton/flexbugs/issues/216\n */\nexport const flexMaxHeightIEFix = `\n max-height: 100%;\n @media only screen and (-ms-high-contrast:active), (-ms-high-contrast:none) {\n max-height: calc(100% - ${IEMaxHeightCalcPx}px);\n }\n`;\n//# sourceMappingURL=flex-max-height-ie-fix.js.map","import { css } from '@emotion/core';\nimport styled from '@emotion/styled';\nimport { DN50, N0, N30A, N60A, text } from '@atlaskit/theme/colors';\nimport { themed } from '@atlaskit/theme/components';\nimport { borderRadius, layers } from '@atlaskit/theme/constants';\nimport { gutter, WIDTH_ENUM } from '../shared-variables';\nimport { flexMaxHeightIEFix, IEMaxHeightCalcPx, } from '../utils/flex-max-height-ie-fix';\nconst boxShadow = ({ isChromeless }) => isChromeless\n ? 'none'\n : `\n 0 0 0 1px ${N30A}, 0 2px 1px ${N30A},\n 0 0 20px -6px ${N60A}\n `;\nconst dialogBgColor = ({ isChromeless }) => {\n return isChromeless ? 'transparent' : themed({ light: N0, dark: DN50 })();\n};\nconst maxDimensions = `calc(100% - ${gutter * 2}px)`;\nconst maxHeightDimensions = `calc(100% - ${gutter * 2 - IEMaxHeightCalcPx}px)`;\nexport const dialogWidth = ({ widthName, widthValue }) => {\n if (typeof widthValue === 'number') {\n return `${widthValue}px`;\n }\n return widthName ? `${WIDTH_ENUM.widths[widthName]}px` : widthValue || 'auto';\n};\nexport const dialogHeight = ({ heightValue, }) => {\n if (typeof heightValue === 'number') {\n return `${heightValue}px`;\n }\n return heightValue || 'auto';\n};\nexport const FillScreen = styled.div `\n height: 100vh;\n left: 0;\n overflow-y: auto;\n position: absolute;\n top: ${(props) => props.scrollDistance}px;\n width: 100%;\n z-index: ${layers.modal};\n -webkit-overflow-scrolling: touch;\n`;\nconst positionBaseStyles = (props) => css `\n display: flex;\n flex-direction: column;\n height: ${maxHeightDimensions};\n left: 0;\n right: 0;\n margin-left: auto;\n margin-right: auto;\n max-width: ${maxDimensions};\n top: ${gutter}px;\n width: ${dialogWidth(props)};\n z-index: ${layers.modal()};\n pointer-events: none;\n`;\nconst positionBaseResponsiveStyles = css `\n height: 100%;\n left: 0;\n position: fixed;\n top: 0;\n max-width: 100%;\n width: 100%;\n`;\nexport const PositionerAbsolute = styled.div `\n ${positionBaseStyles};\n position: absolute;\n\n @media (min-width: 320px) and (max-width: 480px) {\n ${positionBaseResponsiveStyles};\n }\n`;\nexport const PositionerRelative = styled.div `\n margin: ${gutter}px auto;\n position: relative;\n width: ${dialogWidth};\n z-index: ${layers.modal};\n pointer-events: none;\n\n @media (min-width: 320px) and (max-width: 480px) {\n ${positionBaseResponsiveStyles};\n margin: 0;\n }\n`;\nexport const PositionerFixed = styled.div `\n ${positionBaseStyles};\n position: fixed;\n\n @media (min-width: 320px) and (max-width: 480px) {\n ${positionBaseResponsiveStyles};\n }\n`;\nexport const Dialog = styled.div `\n ${(props) => props.isChromeless\n ? null\n : `\n background-color: ${dialogBgColor(props)};\n border-radius: ${borderRadius()}px;\n box-shadow: ${boxShadow(props)};\n `}\n color: ${text};\n display: flex;\n flex-direction: column;\n height: ${(props) => dialogHeight({ heightValue: props.heightValue })};\n ${flexMaxHeightIEFix};\n outline: 0;\n pointer-events: auto;\n\n @media (min-width: 320px) and (max-width: 480px) {\n height: 100%;\n max-height: 100%;\n border-radius: 0;\n }\n`;\nPositionerAbsolute.displayName = 'PositionerAbsolute';\nDialog.displayName = 'Dialog';\nFillScreen.displayName = 'FillScreen';\nPositionerRelative.displayName = 'PositionerRelative';\nPositionerFixed.displayName = 'PositionerFixed';\n//# sourceMappingURL=Modal.js.map","export default {\n disabled: false\n};","import React from 'react';\nexport default React.createContext(null);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {state => (\n * \n * I'm a fade Transition!\n *
\n * )}\n * \n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * \n * \n * {state => (\n * // ...\n * )}\n * \n * \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","import React from 'react';\nimport { Transition } from 'react-transition-group';\nconst duration = 500;\nconst easing = 'cubic-bezier(0.23, 1, 0.32, 1)'; // easeOutQuint\nconst verticalOffset = 16;\nexport const Animation = ({ in: hasEntered, stackIndex = 0, onExited, onEntered, children, }) => (React.createElement(Transition, { in: hasEntered, timeout: { enter: 0, exit: duration }, onExited: onExited, onEntered: onEntered, appear: true }, (unadjustedStatus) => {\n // when we first render, we want to finish the 'entering' state render\n // then jump to the 'entered' state as quick as possible.\n const adjustedStatus = hasEntered && unadjustedStatus === 'exited'\n ? 'entering'\n : unadjustedStatus;\n // Fade styles\n const fadeBaseStyles = {\n transition: `opacity ${duration / 2}ms`,\n opacity: 1,\n };\n const fadeTransitionStyles = {\n entering: {\n opacity: 0,\n },\n entered: {},\n exiting: {\n opacity: 0,\n },\n exited: {},\n };\n // Slide styles\n const slideBaseStyles = {\n transition: `transform ${duration}ms ${easing}`,\n transform: `translate3d(0, ${verticalOffset * 2}px, 0)`,\n };\n const slideTransitionStyles = {\n entering: {},\n entered: {\n transform: stackIndex > 0\n ? `translate3d(0, ${stackIndex * (verticalOffset / 2)}px, 0)`\n : null,\n },\n exiting: {\n transform: `translate3d(0, -${verticalOffset * 2}px, 0)`,\n },\n exited: {},\n };\n return children({\n fade: { ...fadeBaseStyles, ...fadeTransitionStyles[adjustedStatus] },\n slide: { ...slideBaseStyles, ...slideTransitionStyles[adjustedStatus] },\n });\n}));\n//# sourceMappingURL=Animation.js.map","// If a generic is used here, props can be inferred never and passed up (even with defaults)\nexport function add(fn, addend) {\n return (props) => fn(props) + addend;\n}\nexport function subtract(fn, subtrahend) {\n return (props) => fn(props) - subtrahend;\n}\nexport function multiply(fn, factor) {\n return (props) => fn(props) * factor;\n}\nexport function divide(fn, divisor) {\n return (props) => fn(props) / divisor;\n}\n//# sourceMappingURL=math.js.map","import { css } from '@emotion/core';\nimport styled from '@emotion/styled';\nimport { DN30, N30, N800, R400, Y400 } from '@atlaskit/theme/colors';\nimport { themed } from '@atlaskit/theme/components';\nimport { gridSize } from '@atlaskit/theme/constants';\nimport { divide } from '@atlaskit/theme/math';\nimport { flexMaxHeightIEFix } from '../utils/flex-max-height-ie-fix';\n// Constants\n// ==============================\nconst modalPadding = gridSize() * 3;\nconst keylineColor = themed({ light: N30, dark: DN30 });\nexport const keylineHeight = 2;\n// Wrapper\n// ==============================\nexport const wrapperStyles = css `\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n ${flexMaxHeightIEFix};\n`;\nexport const Header = styled.header `\n align-items: center;\n display: flex;\n flex: 0 0 auto;\n justify-content: space-between;\n transition: box-shadow 200ms;\n z-index: 1;\n padding: ${modalPadding}px ${modalPadding}px ${modalPadding - keylineHeight}px\n ${modalPadding}px;\n box-shadow: ${props => props.showKeyline\n ? `0 ${keylineHeight}px 0 0 ${keylineColor(props)}`\n : 'none'};\n`;\nexport const Title = styled.h4 `\n align-items: center;\n display: flex;\n font-size: 20px;\n font-style: inherit;\n font-weight: 500;\n letter-spacing: -0.008em;\n line-height: 1;\n margin: 0;\n min-width: 0;\n`;\nexport const TitleText = styled.span `\n flex: 1 1 auto;\n min-width: 0;\n word-wrap: break-word;\n width: 100%;\n ${props => !props.isHeadingMultiline &&\n `\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n `};\n`;\nconst iconColor = {\n danger: R400,\n warning: Y400,\n};\nexport const titleIconWrapperStyles = (appearance) => css `\n color: ${iconColor[appearance]};\n margin-right: ${gridSize()}px;\n flex: 0 0 auto;\n`;\n// Body\n// ==============================\n/**\n Adding the padding here avoids cropping box shadow on first/last\n children. The combined vertical spacing is maintained by subtracting the\n keyline height from header and footer.\n*/\nexport const bodyStyles = (shouldScroll) => css `\n flex: 1 1 auto;\n ${shouldScroll\n ? `\n overflow-y: auto;\n overflow-x: hidden;\n padding: ${keylineHeight}px ${modalPadding}px;\n `\n : `\n padding: 0 ${modalPadding}px;\n `}\n\n @media (min-width: 320px) and (max-width: 480px) {\n overflow-y: auto;\n height: 100%;\n }\n &:focus {\n outline-offset: -1px;\n outline-style: dotted;\n outline-color: ${N800};\n outline-width: thin;\n }\n`;\nexport const Body = styled.div `\n ${props => bodyStyles(props.shouldScroll)}\n`;\nexport const Footer = styled.footer `\n align-items: center;\n display: flex;\n flex: 0 0 auto;\n justify-content: space-between;\n transition: box-shadow 200ms;\n z-index: 1;\n padding: ${modalPadding - keylineHeight}px ${modalPadding}px ${modalPadding}px\n ${modalPadding}px;\n box-shadow: ${props => props.showKeyline\n ? `0 -${keylineHeight}px 0 0 ${keylineColor(props)}`\n : 'none'};\n`;\nexport const Actions = styled.div `\n display: inline-flex;\n margin: 0 -${divide(gridSize, 2)}px;\n`;\nexport const ActionItem = styled.div `\n flex: 1 0 auto;\n margin: 0 ${divide(gridSize, 2)}px;\n`;\n//# sourceMappingURL=Content.js.map","import React from 'react';\nimport Button from '@atlaskit/button';\nimport { ActionItem, Actions, Footer } from '../styled/Content';\nconst JustifyShim = (props) => React.createElement(\"span\", Object.assign({}, props));\nexport default class ModalFooter extends React.Component {\n render() {\n const { actions, appearance, component, onClose, showKeyline } = this.props;\n const warning = 'You can provide `component` OR `actions`, not both.';\n if (!component && !actions)\n return null;\n if (component && actions) {\n console.warn(warning); // eslint-disable-line no-console\n return null;\n }\n if (component) {\n return React.createElement(component, {\n appearance,\n onClose,\n showKeyline,\n });\n }\n return (React.createElement(Footer, { showKeyline: showKeyline },\n React.createElement(JustifyShim, null),\n React.createElement(Actions, null, actions\n ? actions.map(({ text, ...rest }, index) => {\n const variant = index !== 0 ? 'subtle' : appearance || 'primary';\n return (\n // Index used as text can be a ReactNode\n React.createElement(ActionItem, { key: index },\n React.createElement(Button, Object.assign({ appearance: variant }, rest), text)));\n })\n : null)));\n }\n}\n//# sourceMappingURL=Footer.js.map","/** @jsx jsx */\nimport React from 'react';\nimport { jsx } from '@emotion/core';\nimport ErrorIcon from '@atlaskit/icon/glyph/error';\nimport WarningIcon from '@atlaskit/icon/glyph/warning';\nimport { Header, Title, titleIconWrapperStyles, TitleText, } from '../styled/Content';\nconst TitleIcon = ({ appearance }) => {\n if (!appearance)\n return null;\n const Icon = appearance === 'danger' ? ErrorIcon : WarningIcon;\n return (jsx(\"span\", { css: titleIconWrapperStyles(appearance) },\n jsx(Icon, { label: `${appearance} icon` })));\n};\nexport default class ModalHeader extends React.Component {\n render() {\n const { id, appearance, component, heading, onClose, showKeyline, isHeadingMultiline, testId, } = this.props;\n const warning = 'You can provide `component` OR `heading`, not both.';\n if (!component && !heading)\n return null;\n if (component && heading) {\n console.warn(warning); // eslint-disable-line no-console\n return null;\n }\n if (component) {\n return React.createElement(component, {\n id,\n testId,\n appearance,\n onClose,\n showKeyline,\n isHeadingMultiline,\n });\n }\n return (jsx(Header, { showKeyline: showKeyline },\n jsx(Title, null,\n jsx(TitleIcon, { appearance: appearance }),\n jsx(TitleText, { isHeadingMultiline: isHeadingMultiline, id: id, \"data-testid\": testId && `${testId}-heading` }, heading))));\n }\n}\nModalHeader.defaultProps = {\n isHeadingMultiline: true,\n};\n//# sourceMappingURL=Header.js.map","/** @jsx jsx */\nimport React from 'react';\nimport { jsx } from '@emotion/core';\nimport rafSchedule from 'raf-schd';\nimport ScrollLock from 'react-scrolllock';\nimport { bodyStyles, Body as DefaultBody, keylineHeight, wrapperStyles, } from '../styled/Content';\nimport Footer from './Footer';\nimport Header from './Header';\nfunction getInitialState() {\n return {\n showFooterKeyline: false,\n showHeaderKeyline: false,\n showContentFocus: false,\n tabbableElements: [],\n };\n}\nexport default class Content extends React.Component {\n constructor() {\n super(...arguments);\n this.escapeIsHeldDown = false;\n this._isMounted = false;\n this.scrollContainer = null;\n this.state = getInitialState();\n this.determineKeylines = rafSchedule(() => {\n if (!this.scrollContainer)\n return;\n const { scrollTop, scrollHeight, clientHeight } = this.scrollContainer;\n const scrollableDistance = scrollHeight - clientHeight;\n const showHeaderKeyline = scrollTop > keylineHeight;\n const showFooterKeyline = scrollTop <= scrollableDistance - keylineHeight;\n const showContentFocus = scrollHeight > clientHeight;\n this.setState({\n showHeaderKeyline,\n showFooterKeyline,\n showContentFocus,\n });\n });\n this.getScrollContainer = (ref) => {\n if (!ref)\n return;\n this.scrollContainer = ref;\n };\n this.handleKeyUp = () => {\n this.escapeIsHeldDown = false;\n };\n this.handleKeyDown = (event) => {\n const { onClose, shouldCloseOnEscapePress, stackIndex = 0 } = this.props;\n // avoid consumers accidentally closing multiple modals if they hold escape.\n if (this.escapeIsHeldDown)\n return;\n if (event.key === 'Escape' || event.key === 'Esc')\n this.escapeIsHeldDown = true;\n // only the foremost modal should be interactive.\n if (!this._isMounted || stackIndex > 0)\n return;\n switch (event.key) {\n case 'Esc':\n case 'Escape':\n if (shouldCloseOnEscapePress)\n onClose(event);\n break;\n default:\n }\n };\n this.handleStackChange = (stackIndex) => {\n const { onStackChange } = this.props;\n if (onStackChange)\n onStackChange(stackIndex);\n };\n }\n componentDidMount() {\n this._isMounted = true;\n document.addEventListener('keydown', this.handleKeyDown, false);\n document.addEventListener('keyup', this.handleKeyUp, false);\n if (this.scrollContainer) {\n const capturedScrollContainer = this.scrollContainer;\n window.addEventListener('resize', this.determineKeylines, false);\n capturedScrollContainer.addEventListener('scroll', this.determineKeylines, false);\n this.determineKeylines();\n }\n /* eslint-disable no-console */\n // Check for deprecated props\n if (this.props.header)\n console.warn(\"@atlaskit/modal-dialog: Deprecation warning - Use of the header prop in ModalDialog is deprecated. Please compose your ModalDialog using the 'components' prop instead\");\n if (this.props.footer)\n console.warn(\"@atlaskit/modal-dialog: Deprecation warning - Use of the footer prop in ModalDialog is deprecated. Please compose your ModalDialog using the 'components' prop instead\");\n if (this.props.body)\n console.warn(\"@atlaskit/modal-dialog: Deprecation warning - Use of the body prop in ModalDialog is deprecated. Please compose your ModalDialog using the 'components' prop instead\");\n // Check that custom body components have used ForwardRef to attach to a DOM element\n if (this.props.components.Body) {\n if (!(this.scrollContainer instanceof HTMLElement)) {\n console.warn('@atlaskit/modal-dialog: Warning - Ref must attach to a DOM element; check you are using forwardRef and attaching the ref to an appropriate element. Check the examples for more details.');\n }\n }\n /* eslint-enable no-console */\n }\n UNSAFE_componentWillReceiveProps(nextProps) {\n const { stackIndex } = this.props;\n // update focus scope and let consumer know when stack index has changed\n if (nextProps.stackIndex && nextProps.stackIndex !== stackIndex) {\n this.handleStackChange(nextProps.stackIndex);\n }\n }\n componentWillUnmount() {\n this._isMounted = false;\n document.removeEventListener('keydown', this.handleKeyDown, false);\n document.removeEventListener('keyup', this.handleKeyUp, false);\n if (this.scrollContainer) {\n const capturedScrollContainer = this.scrollContainer;\n window.removeEventListener('resize', this.determineKeylines, false);\n capturedScrollContainer.removeEventListener('scroll', this.determineKeylines, false);\n }\n }\n render() {\n const { actions, appearance, body: DeprecatedBody, children, components, footer, header, heading, isChromeless, isHeadingMultiline, onClose, shouldScroll, testId, headingId, } = this.props;\n const { showFooterKeyline, showHeaderKeyline, showContentFocus, } = this.state;\n const { Container = 'div', Body: CustomBody } = components;\n const Body = CustomBody || DeprecatedBody || DefaultBody;\n return (jsx(Container, { css: wrapperStyles, \"data-testid\": testId },\n isChromeless ? (children) : (jsx(React.Fragment, null,\n jsx(Header, { id: headingId, appearance: appearance, component: components.Header ? components.Header : header, heading: heading, onClose: onClose, isHeadingMultiline: isHeadingMultiline, showKeyline: showHeaderKeyline, testId: testId }),\n jsx(Body, Object.assign({ tabIndex: showContentFocus ? 0 : undefined, css: bodyStyles(shouldScroll) }, (!Body.hasOwnProperty('styledComponentId')\n ? { ref: this.getScrollContainer }\n : { innerRef: this.getScrollContainer })), children),\n jsx(Footer, { actions: actions, appearance: appearance, component: components.Footer ? components.Footer : footer, onClose: onClose, showKeyline: showFooterKeyline }))),\n jsx(ScrollLock, null)));\n }\n}\nContent.defaultProps = {\n autoFocus: false,\n components: {},\n isChromeless: false,\n stackIndex: 0,\n isHeadingMultiline: true,\n};\n//# sourceMappingURL=Content.js.map","import React from 'react';\nimport ReactFocusLock from 'react-focus-lock';\nimport invariant from 'tiny-invariant';\n// Thin wrapper over react-focus-lock. This wrapper only exists to ensure API compatibility.\n// This component should be deleted during https://ecosystem.atlassian.net/browse/AK-5658\nexport default class FocusLock extends React.Component {\n componentDidMount() {\n const { isEnabled, autoFocus } = this.props;\n if (process.env.NODE_ENV !== 'production') {\n invariant(typeof autoFocus === 'boolean', '@atlaskit/modal-dialog: Passing a function as autoFocus is deprecated. Instead call focus on the element ref or use the autofocus property.');\n }\n if (typeof autoFocus === 'function' && isEnabled) {\n const elem = autoFocus();\n if (elem && elem.focus) {\n elem.focus();\n }\n }\n }\n render() {\n const { isEnabled, autoFocus, shouldReturnFocus } = this.props;\n return (React.createElement(ReactFocusLock, { disabled: !isEnabled, autoFocus: !!autoFocus, returnFocus: shouldReturnFocus }, this.props.children));\n }\n}\nFocusLock.defaultProps = {\n autoFocus: true,\n isEnabled: true,\n shouldReturnFocus: true,\n};\n//# sourceMappingURL=FocusLock.js.map","import React from 'react';\nimport { PositionerAbsolute, PositionerFixed, PositionerRelative, } from '../styled/Modal';\nconst Positioner = function Positioner({ scrollBehavior, ...props }) {\n // default 'inside'\n let PositionComponent = PositionerAbsolute;\n if (scrollBehavior === 'outside') {\n PositionComponent = PositionerRelative;\n }\n else if (scrollBehavior === 'inside-wide') {\n PositionComponent = PositionerFixed;\n }\n return React.createElement(PositionComponent, Object.assign({}, props));\n};\nexport default Positioner;\n//# sourceMappingURL=Positioner.js.map","import React from 'react';\nimport { canUseDOM } from 'exenv';\nimport { UIDConsumer, UIDReset } from 'react-uid';\nimport { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents, } from '@atlaskit/analytics-next';\nimport Blanket from '@atlaskit/blanket';\nimport { WIDTH_ENUM } from '../shared-variables';\nimport { Dialog, FillScreen as StyledFillScreen } from '../styled/Modal';\nimport { name as packageName, version as packageVersion, } from '../version.json';\nimport { Animation } from './Animation';\nimport Content from './Content';\nimport FocusLock from './FocusLock';\nimport Positioner from './Positioner';\nfunction getScrollDistance() {\n return (window.pageYOffset ||\n (document.documentElement && document.documentElement.scrollTop) ||\n (document.body && document.body.scrollTop) ||\n 0);\n}\nclass Modal extends React.Component {\n constructor() {\n super(...arguments);\n this.state = {\n dialogNode: null,\n scrollDistance: canUseDOM ? getScrollDistance() : 0,\n isExiting: false,\n };\n /* Prevent window from being scrolled programatically so that the modal is positioned correctly\n * and to prevent scrollIntoView from scrolling the window.\n */\n this.handleWindowScroll = () => {\n if (getScrollDistance() !== this.state.scrollDistance) {\n window.scrollTo(window.pageXOffset, this.state.scrollDistance);\n }\n };\n this.handleOverlayClick = (e) => {\n if (this.props.shouldCloseOnOverlayClick) {\n this.props.onClose(e);\n }\n };\n }\n componentDidMount() {\n const scrollDistance = getScrollDistance();\n if (getScrollDistance() !== this.state.scrollDistance) {\n // eslint-disable-next-line react/no-did-mount-set-state\n this.setState({ scrollDistance });\n }\n window.addEventListener('scroll', this.handleWindowScroll);\n }\n componentWillUnmount() {\n window.removeEventListener('scroll', this.handleWindowScroll);\n }\n render() {\n const { actions, appearance, autoFocus, body, children, components, footer, header, height, isChromeless, isHeadingMultiline, isOpen, onClose, onCloseComplete, onOpenComplete, onStackChange, shouldCloseOnEscapePress, stackIndex, heading, width, scrollBehavior, testId, } = this.props;\n const { scrollDistance } = this.state;\n const isBackground = stackIndex != null && stackIndex > 0;\n // If a custom width (number or percentage) is supplied, set inline style\n // otherwise allow styled component to consume as named prop\n const widthName = width\n ? WIDTH_ENUM.values.indexOf(width.toString()) !== -1\n ? width\n : undefined\n : undefined;\n const widthValue = widthName ? undefined : width;\n return (React.createElement(Animation, { in: isOpen, onExited: onCloseComplete, onEntered: onOpenComplete, stackIndex: stackIndex }, ({ fade, slide }) => (React.createElement(StyledFillScreen, { style: fade, \"aria-hidden\": isBackground, scrollDistance: scrollDistance },\n React.createElement(FocusLock, { isEnabled: stackIndex === 0 && isOpen, autoFocus: autoFocus },\n React.createElement(Blanket, { isTinted: true, onBlanketClicked: this.handleOverlayClick }),\n React.createElement(Positioner, { style: slide, scrollBehavior: scrollBehavior, widthName: widthName, widthValue: widthValue },\n React.createElement(UIDReset, null,\n React.createElement(UIDConsumer, null, (id, _) => (React.createElement(Dialog, { heightValue: height, isChromeless: isChromeless, role: \"dialog\", \"aria-labelledby\": `dialog-heading-${id}`, \"data-testid\": testId, tabIndex: -1 },\n React.createElement(Content, { actions: actions, appearance: appearance, components: components, footer: footer, heading: heading, headingId: `dialog-heading-${id}`, testId: testId && `${testId}-dialog-content`, isHeadingMultiline: isHeadingMultiline, header: header, onClose: onClose, shouldScroll: scrollBehavior === 'inside' ||\n scrollBehavior === 'inside-wide', shouldCloseOnEscapePress: shouldCloseOnEscapePress, onStackChange: onStackChange, isChromeless: isChromeless, stackIndex: stackIndex, body: body }, children)))))))))));\n }\n}\nModal.defaultProps = {\n autoFocus: true,\n scrollBehavior: 'inside',\n shouldCloseOnEscapePress: true,\n shouldCloseOnOverlayClick: true,\n isChromeless: false,\n isOpen: true,\n stackIndex: 0,\n width: 'medium',\n isHeadingMultiline: true,\n onClose: () => { },\n};\nconst createAndFireEventOnAtlaskit = createAndFireEvent('atlaskit');\nexport const ModalDialogWithoutAnalytics = Modal;\nexport default withAnalyticsContext({\n componentName: 'modalDialog',\n packageName,\n packageVersion,\n})(withAnalyticsEvents({\n onClose: createAndFireEventOnAtlaskit({\n action: 'closed',\n actionSubject: 'modalDialog',\n attributes: {\n componentName: 'modalDialog',\n packageName,\n packageVersion,\n },\n }),\n})(Modal));\n//# sourceMappingURL=Modal.js.map","import React from 'react';\n// This is the source of truth for open modals\nlet stackConsumers = [];\n// This component provides the position of a modal dialog in the list of all open dialogs.\n// The key behaviours are:\n// - When a modal renders for the first time it takes the first stack position\n// - When a modal mounts, all other modals have to adjust their position\n// - When a modal unmounts, all other modals have to adjust their position\nclass StackConsumer extends React.Component {\n constructor() {\n super(...arguments);\n this.state = {\n stackIndex: 0,\n };\n this.update = () => {\n const stackIndex = stackConsumers.indexOf(this.update);\n if (this.state.stackIndex !== stackIndex) {\n this.setState({ stackIndex });\n }\n };\n }\n componentDidMount() {\n stackConsumers.forEach(updateFn => updateFn());\n }\n componentWillUnmount() {\n // This check will pass if the pattern has not been\n // implemented correctly. In this case, will still need to make sure we remove ourselves\n // from the stack list.\n if (stackConsumers.indexOf(this.update) !== -1) {\n stackConsumers = stackConsumers.filter(stack => stack !== this.update);\n stackConsumers.forEach(updateFn => updateFn());\n }\n }\n componentDidUpdate(prevProps) {\n if (prevProps.isOpen && !this.props.isOpen) {\n stackConsumers = stackConsumers.filter(stack => stack !== this.update);\n stackConsumers.forEach(updateFn => updateFn());\n }\n }\n render() {\n if (stackConsumers.indexOf(this.update) === -1) {\n // add this instance to stack consumer list\n stackConsumers = [this.update, ...stackConsumers];\n }\n return this.props.children(this.state.stackIndex);\n }\n}\nexport default StackConsumer;\n//# sourceMappingURL=StackConsumer.js.map","import React from 'react';\nimport Portal from '@atlaskit/portal';\nimport { layers } from '@atlaskit/theme/constants';\nimport Modal from './Modal';\nimport { ModalTransitionConsumer } from './ModalTransition';\nimport StackConsumer from './StackConsumer';\nclass ModalWrapper extends React.Component {\n constructor() {\n super(...arguments);\n this.onModalClosed = (onExited) => (e) => {\n if (onExited) {\n onExited();\n }\n if (this.props.onCloseComplete) {\n this.props.onCloseComplete(e);\n }\n };\n }\n render() {\n return (React.createElement(ModalTransitionConsumer, null, ({ isOpen, onExited }) => (React.createElement(Portal, { zIndex: layers.modal() },\n React.createElement(StackConsumer, { isOpen: isOpen }, naturalStackIndex => (React.createElement(Modal, Object.assign({}, this.props, { isOpen: isOpen, stackIndex: this.props.stackIndex || naturalStackIndex, onCloseComplete: this.onModalClosed(onExited) }), this.props.children)))))));\n }\n}\nModalWrapper.defaultProps = {\n autoFocus: true,\n scrollBehavior: 'inside',\n shouldCloseOnEscapePress: true,\n shouldCloseOnOverlayClick: true,\n isChromeless: false,\n width: 'medium',\n isHeadingMultiline: true,\n onClose: () => { },\n};\nexport default ModalWrapper;\n//# sourceMappingURL=ModalWrapper.js.map","import React, { Component } from 'react';\nimport styled from 'styled-components';\n\nimport { messages } from './messages';\nimport { SiteSelectorView } from './site-selector-view';\n\nimport ModalDialog, { ModalTransition } from '@atlaskit/modal-dialog';\n\nexport type SiteSelectorModalProps = {\n readonly isOpen: boolean;\n\n readonly userName: string;\n readonly userEmail: string;\n readonly avatarSrc?: string;\n\n readonly sites: string[];\n\n readonly header?: React.ReactNode;\n\n readonly onNewSiteSelected: () => void;\n readonly onSiteSelected: (site: string) => void;\n readonly onSiteChanged?: () => void;\n readonly onSwitchAccountClick: () => void;\n readonly onModalClose?: () => void;\n};\n\nexport class SiteSelectorModal extends Component {\n static messages = messages;\n\n static defaultProps = {\n // Default onModalClose and onSiteChanged handler doesn't need to do anything\n // tslint:disable-next-line:no-empty\n onModalClose: () => {},\n // tslint:disable-next-line:no-empty\n onSiteChanged: () => {}\n };\n\n onClose = () => {\n this.props.onModalClose!();\n };\n\n render() {\n const {\n userName,\n userEmail,\n avatarSrc,\n isOpen,\n header,\n sites,\n onNewSiteSelected,\n onSiteSelected,\n onSwitchAccountClick,\n onSiteChanged\n } = this.props;\n\n return (\n \n {isOpen && (\n \n \n \n \n \n )}\n \n );\n }\n}\n\nconst Container = styled.div`\n margin: 22px 0px;\n`;\n","var arraySlice = require('../internals/array-slice-simple');\n\nvar floor = Math.floor;\n\nvar mergeSort = function (array, comparefn) {\n var length = array.length;\n var middle = floor(length / 2);\n return length < 8 ? insertionSort(array, comparefn) : merge(\n array,\n mergeSort(arraySlice(array, 0, middle), comparefn),\n mergeSort(arraySlice(array, middle), comparefn),\n comparefn\n );\n};\n\nvar insertionSort = function (array, comparefn) {\n var length = array.length;\n var i = 1;\n var element, j;\n\n while (i < length) {\n j = i;\n element = array[i];\n while (j && comparefn(array[j - 1], element) > 0) {\n array[j] = array[--j];\n }\n if (j !== i++) array[j] = element;\n } return array;\n};\n\nvar merge = function (array, left, right, comparefn) {\n var llength = left.length;\n var rlength = right.length;\n var lindex = 0;\n var rindex = 0;\n\n while (lindex < llength || rindex < rlength) {\n array[lindex + rindex] = (lindex < llength && rindex < rlength)\n ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]\n : lindex < llength ? left[lindex++] : right[rindex++];\n } return array;\n};\n\nmodule.exports = mergeSort;\n","var defineBuiltIn = require('../internals/define-built-in');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) defineBuiltIn(target, key, src[key], options);\n return target;\n};\n","var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line unicorn/relative-url-style -- required for testing\n var url = new URL('b?a=1&b=2&c=3', 'http://a');\n var searchParams = url.searchParams;\n var result = '';\n url.pathname = 'c%20d';\n searchParams.forEach(function (value, key) {\n searchParams['delete']('b');\n result += key + value;\n });\n return (IS_PURE && !url.toJSON)\n || !searchParams.sort\n || url.href !== 'http://a/c%20d?a=1&c=3'\n || searchParams.get('c') !== '3'\n || String(new URLSearchParams('?a=1')) !== 'a=1'\n || !searchParams[ITERATOR]\n // throws in Edge\n || new URL('https://a@b').username !== 'a'\n || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'\n // not punycoded in Edge\n || new URL('http://тест').host !== 'xn--e1aybc'\n // not escaped in Chrome 62-\n || new URL('http://a#б').hash !== '#%D0%B1'\n // fails in Chrome 66-\n || result !== 'a1c3'\n // throws in Safari\n || new URL('http://x', undefined).host !== 'x';\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar notARegExp = require('../internals/not-a-regexp');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar toString = require('../internals/to-string');\nvar correctIsRegExpLogic = require('../internals/correct-is-regexp-logic');\n\nvar stringIndexOf = uncurryThis(''.indexOf);\n\n// `String.prototype.includes` method\n// https://tc39.es/ecma262/#sec-string.prototype.includes\n$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~stringIndexOf(\n toString(requireObjectCoercible(this)),\n toString(notARegExp(searchString)),\n arguments.length > 1 ? arguments[1] : undefined\n );\n }\n});\n","'use strict';\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\nrequire('../modules/es.array.iterator');\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar call = require('../internals/function-call');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar DESCRIPTORS = require('../internals/descriptors');\nvar USE_NATIVE_URL = require('../internals/native-url');\nvar defineBuiltIn = require('../internals/define-built-in');\nvar defineBuiltIns = require('../internals/define-built-ins');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar InternalStateModule = require('../internals/internal-state');\nvar anInstance = require('../internals/an-instance');\nvar isCallable = require('../internals/is-callable');\nvar hasOwn = require('../internals/has-own-property');\nvar bind = require('../internals/function-bind-context');\nvar classof = require('../internals/classof');\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar $toString = require('../internals/to-string');\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar getIterator = require('../internals/get-iterator');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar validateArgumentsLength = require('../internals/validate-arguments-length');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar arraySort = require('../internals/array-sort');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar URL_SEARCH_PARAMS = 'URLSearchParams';\nvar URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);\nvar getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Avoid NodeJS experimental warning\nvar safeGetBuiltIn = function (name) {\n if (!DESCRIPTORS) return global[name];\n var descriptor = getOwnPropertyDescriptor(global, name);\n return descriptor && descriptor.value;\n};\n\nvar nativeFetch = safeGetBuiltIn('fetch');\nvar NativeRequest = safeGetBuiltIn('Request');\nvar Headers = safeGetBuiltIn('Headers');\nvar RequestPrototype = NativeRequest && NativeRequest.prototype;\nvar HeadersPrototype = Headers && Headers.prototype;\nvar RegExp = global.RegExp;\nvar TypeError = global.TypeError;\nvar decodeURIComponent = global.decodeURIComponent;\nvar encodeURIComponent = global.encodeURIComponent;\nvar charAt = uncurryThis(''.charAt);\nvar join = uncurryThis([].join);\nvar push = uncurryThis([].push);\nvar replace = uncurryThis(''.replace);\nvar shift = uncurryThis([].shift);\nvar splice = uncurryThis([].splice);\nvar split = uncurryThis(''.split);\nvar stringSlice = uncurryThis(''.slice);\n\nvar plus = /\\+/g;\nvar sequences = Array(4);\n\nvar percentSequence = function (bytes) {\n return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\\\da-f]{2}){' + bytes + '})', 'gi'));\n};\n\nvar percentDecode = function (sequence) {\n try {\n return decodeURIComponent(sequence);\n } catch (error) {\n return sequence;\n }\n};\n\nvar deserialize = function (it) {\n var result = replace(it, plus, ' ');\n var bytes = 4;\n try {\n return decodeURIComponent(result);\n } catch (error) {\n while (bytes) {\n result = replace(result, percentSequence(bytes--), percentDecode);\n }\n return result;\n }\n};\n\nvar find = /[!'()~]|%20/g;\n\nvar replacements = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+'\n};\n\nvar replacer = function (match) {\n return replacements[match];\n};\n\nvar serialize = function (it) {\n return replace(encodeURIComponent(it), find, replacer);\n};\n\nvar URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {\n setInternalState(this, {\n type: URL_SEARCH_PARAMS_ITERATOR,\n iterator: getIterator(getInternalParamsState(params).entries),\n kind: kind\n });\n}, 'Iterator', function next() {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var step = state.iterator.next();\n var entry = step.value;\n if (!step.done) {\n step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];\n } return step;\n}, true);\n\nvar URLSearchParamsState = function (init) {\n this.entries = [];\n this.url = null;\n\n if (init !== undefined) {\n if (isObject(init)) this.parseObject(init);\n else this.parseQuery(typeof init == 'string' ? charAt(init, 0) === '?' ? stringSlice(init, 1) : init : $toString(init));\n }\n};\n\nURLSearchParamsState.prototype = {\n type: URL_SEARCH_PARAMS,\n bindURL: function (url) {\n this.url = url;\n this.update();\n },\n parseObject: function (object) {\n var iteratorMethod = getIteratorMethod(object);\n var iterator, next, step, entryIterator, entryNext, first, second;\n\n if (iteratorMethod) {\n iterator = getIterator(object, iteratorMethod);\n next = iterator.next;\n while (!(step = call(next, iterator)).done) {\n entryIterator = getIterator(anObject(step.value));\n entryNext = entryIterator.next;\n if (\n (first = call(entryNext, entryIterator)).done ||\n (second = call(entryNext, entryIterator)).done ||\n !call(entryNext, entryIterator).done\n ) throw TypeError('Expected sequence with length 2');\n push(this.entries, { key: $toString(first.value), value: $toString(second.value) });\n }\n } else for (var key in object) if (hasOwn(object, key)) {\n push(this.entries, { key: key, value: $toString(object[key]) });\n }\n },\n parseQuery: function (query) {\n if (query) {\n var attributes = split(query, '&');\n var index = 0;\n var attribute, entry;\n while (index < attributes.length) {\n attribute = attributes[index++];\n if (attribute.length) {\n entry = split(attribute, '=');\n push(this.entries, {\n key: deserialize(shift(entry)),\n value: deserialize(join(entry, '='))\n });\n }\n }\n }\n },\n serialize: function () {\n var entries = this.entries;\n var result = [];\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n push(result, serialize(entry.key) + '=' + serialize(entry.value));\n } return join(result, '&');\n },\n update: function () {\n this.entries.length = 0;\n this.parseQuery(this.url.query);\n },\n updateURL: function () {\n if (this.url) this.url.update();\n }\n};\n\n// `URLSearchParams` constructor\n// https://url.spec.whatwg.org/#interface-urlsearchparams\nvar URLSearchParamsConstructor = function URLSearchParams(/* init */) {\n anInstance(this, URLSearchParamsPrototype);\n var init = arguments.length > 0 ? arguments[0] : undefined;\n setInternalState(this, new URLSearchParamsState(init));\n};\n\nvar URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;\n\ndefineBuiltIns(URLSearchParamsPrototype, {\n // `URLSearchParams.prototype.append` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-append\n append: function append(name, value) {\n validateArgumentsLength(arguments.length, 2);\n var state = getInternalParamsState(this);\n push(state.entries, { key: $toString(name), value: $toString(value) });\n state.updateURL();\n },\n // `URLSearchParams.prototype.delete` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-delete\n 'delete': function (name) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var key = $toString(name);\n var index = 0;\n while (index < entries.length) {\n if (entries[index].key === key) splice(entries, index, 1);\n else index++;\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.get` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-get\n get: function get(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) return entries[index].value;\n }\n return null;\n },\n // `URLSearchParams.prototype.getAll` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-getall\n getAll: function getAll(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var result = [];\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) push(result, entries[index].value);\n }\n return result;\n },\n // `URLSearchParams.prototype.has` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-has\n has: function has(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var index = 0;\n while (index < entries.length) {\n if (entries[index++].key === key) return true;\n }\n return false;\n },\n // `URLSearchParams.prototype.set` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-set\n set: function set(name, value) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var found = false;\n var key = $toString(name);\n var val = $toString(value);\n var index = 0;\n var entry;\n for (; index < entries.length; index++) {\n entry = entries[index];\n if (entry.key === key) {\n if (found) splice(entries, index--, 1);\n else {\n found = true;\n entry.value = val;\n }\n }\n }\n if (!found) push(entries, { key: key, value: val });\n state.updateURL();\n },\n // `URLSearchParams.prototype.sort` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-sort\n sort: function sort() {\n var state = getInternalParamsState(this);\n arraySort(state.entries, function (a, b) {\n return a.key > b.key ? 1 : -1;\n });\n state.updateURL();\n },\n // `URLSearchParams.prototype.forEach` method\n forEach: function forEach(callback /* , thisArg */) {\n var entries = getInternalParamsState(this).entries;\n var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined);\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n boundFunction(entry.value, entry.key, this);\n }\n },\n // `URLSearchParams.prototype.keys` method\n keys: function keys() {\n return new URLSearchParamsIterator(this, 'keys');\n },\n // `URLSearchParams.prototype.values` method\n values: function values() {\n return new URLSearchParamsIterator(this, 'values');\n },\n // `URLSearchParams.prototype.entries` method\n entries: function entries() {\n return new URLSearchParamsIterator(this, 'entries');\n }\n}, { enumerable: true });\n\n// `URLSearchParams.prototype[@@iterator]` method\ndefineBuiltIn(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries, { name: 'entries' });\n\n// `URLSearchParams.prototype.toString` method\n// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior\ndefineBuiltIn(URLSearchParamsPrototype, 'toString', function toString() {\n return getInternalParamsState(this).serialize();\n}, { enumerable: true });\n\nsetToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n\n$({ global: true, constructor: true, forced: !USE_NATIVE_URL }, {\n URLSearchParams: URLSearchParamsConstructor\n});\n\n// Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams`\nif (!USE_NATIVE_URL && isCallable(Headers)) {\n var headersHas = uncurryThis(HeadersPrototype.has);\n var headersSet = uncurryThis(HeadersPrototype.set);\n\n var wrapRequestOptions = function (init) {\n if (isObject(init)) {\n var body = init.body;\n var headers;\n if (classof(body) === URL_SEARCH_PARAMS) {\n headers = init.headers ? new Headers(init.headers) : new Headers();\n if (!headersHas(headers, 'content-type')) {\n headersSet(headers, 'content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n return create(init, {\n body: createPropertyDescriptor(0, $toString(body)),\n headers: createPropertyDescriptor(0, headers)\n });\n }\n } return init;\n };\n\n if (isCallable(nativeFetch)) {\n $({ global: true, enumerable: true, dontCallGetSet: true, forced: true }, {\n fetch: function fetch(input /* , init */) {\n return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n }\n });\n }\n\n if (isCallable(NativeRequest)) {\n var RequestConstructor = function Request(input /* , init */) {\n anInstance(this, RequestPrototype);\n return new NativeRequest(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n };\n\n RequestPrototype.constructor = RequestConstructor;\n RequestConstructor.prototype = RequestPrototype;\n\n $({ global: true, constructor: true, dontCallGetSet: true, forced: true }, {\n Request: RequestConstructor\n });\n }\n}\n\nmodule.exports = {\n URLSearchParams: URLSearchParamsConstructor,\n getState: getInternalParamsState\n};\n","// TODO: Remove this module from `core-js@4` since it's replaced to module below\nrequire('../modules/web.url-search-params.constructor');\n","import * as React from 'react';\nimport { generateUID } from \"./uid\";\nexport var createSource = function (prefix) {\n if (prefix === void 0) { prefix = ''; }\n return ({\n value: 1,\n prefix: prefix,\n uid: generateUID()\n });\n};\nexport var counter = createSource();\nexport var source = React.createContext(createSource());\nexport var getId = function (source) { return source.value++; };\nexport var getPrefix = function (source) { return source ? source.prefix : ''; };\n"],"names":["Object","defineProperty","exports","value","templateObject_1","tslib_1","react_1","__importDefault","styled_components_1","uuid_1","colors_1","constants_1","getSize","_a","size","sizes","IconWrapper","default","span","__makeTemplateObject","p","primaryColor","secondaryColor","background","props","svgStr","id","Glyph","glyph","dangerouslySetGlyph","testId","label","glyphProps","dangerouslySetInnerHTML","__html","replace","children","createElement","role","__assign","undefined","small","medium","large","xlarge","sizeMap","_react","_interopRequireDefault","_Icon","obj","__esModule","_extends","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","ErrorIcon","displayName","_default","RadioIcon","ShortcutIcon","WarningIcon","R50","R75","R100","R200","R300","R400","R500","Y50","Y75","Y100","Y200","Y300","Y400","Y500","G50","G75","G100","G200","G300","G400","G500","B50","B75","B100","B200","B300","B400","B500","P50","P75","P100","P200","P300","P400","P500","T50","T75","T100","T200","T300","T400","T500","N0","N10","N20","N30","N40","N50","N60","N70","N80","N90","N100","N200","N300","N400","N500","N600","N700","N800","N900","N10A","N20A","N30A","N40A","N50A","N60A","N70A","N80A","N90A","N100A","N200A","N300A","N400A","N500A","N600A","N700A","N800A","DN900","DN800","DN700","DN600","DN500","DN400","DN300","DN200","DN100","DN90","DN80","DN70","DN60","DN50","DN40","DN30","DN20","DN10","DN0","DN800A","DN700A","DN600A","DN500A","DN400A","DN300A","DN200A","DN100A","DN90A","DN80A","DN70A","DN60A","DN50A","DN40A","DN30A","DN20A","DN10A","light","dark","backgroundActive","backgroundHover","backgroundOnLayer","text","textHover","textActive","subtleText","placeholderText","heading","subtleHeading","codeBlock","link","linkHover","linkActive","linkOutline","primary","blue","teal","purple","red","yellow","green","skeleton","THEME_MODES","getTheme","theme","__ATLASKIT_THEME__","includes","mode","themed","modesOrVariant","variantModes","variantProp","variants","modes","messages","defineMessages","atlassianLogoLabel","defaultMessage","cancel","createPage","selectASite","startASite","switchAccount","focusBorderColor","textColors","subtleTextColors","getBackgroundColor","backgroundColor","href","isActive","isHover","isSelected","onClick","isInteractive","themedBackgroundColor","templateObject_2","templateObject_3","templateObject_4","templateObject_5","templateObject_6","truncateText","truncate","css","Content","PrimaryText","SecondaryText","isDisabled","isFocus","borderColor","cursor","opacity","outline","pointerEvents","ThemeItem","AvatarItem","_super","_this","blur","node","focus","guardedClick","event","item","__spread","setNode","ref","__extends","render","avatar","enableTextTruncate","primaryText","secondaryText","enhancedProps","getProps","StyledComponent","getStyledAvatarItem","Provider","Consumer","tokens","innerRef","cloneElement","defaultProps","Component","withPseudoState","gridSize","fontFamily","card","dialog","navigation","layer","blanket","modal","flag","spotlight","tooltip","AccountDetails","userName","userEmail","avatarSrc","React","Avatar","src","component","className","Initials","split","reduce","result","part","toUpperCase","styled","colors","DefaultHeader","AtlassianLogo","textColor","iconColor","iconGradientStart","iconGradientStop","FormattedMessage","formFooterWrapperStyles","display","marginTop","justifyContent","justifyContentStyles","FormFooter","align","jsx","SiteSelectorFormFooter","canSubmit","onSwitchAccountClick","onCancelClick","fullScreenView","ActionsContainer","LeftActionsContainer","Button","appearance","type","spacing","RightActionsContainer","PrimaryContainer","iconAfter","FormContext","createContext","IsDisabledContext","Form","formRef","useRef","onSubmitRef","onSubmit","current","form","useState","finalForm","args","destroyOnUnregister","initialValues","mutators","setDefaultValue","name","defaultValue","state","formState","values","Array","from","querySelectorAll","setState","dirty","submitting","useEffect","unsubscribe","subscribe","registerField","useCallback","subscriber","subscription","config","pauseValidation","resumeValidation","formProps","e","preventDefault","submit","onKeyDown","ctrlKey","metaKey","submitButton","querySelector","click","reset","disabled","getState","getValues","setFieldValue","change","labelStyles","marginBottom","lightH200Styles","darkH200Styles","htmlFor","fieldWrapperStyles","requiredIndicatorStyles","paddingLeft","color","FieldId","usePreviousRef","Field","useContext","fieldProps","onChange","onBlur","onFocus","error","valid","meta","dirtySinceLastSubmit","touched","validating","submitFailed","submitError","latestPropsRef","latestStateRef","hasDefaultValueChanged","previousValue","currentValue","isArray","JSON","stringify","fieldStateToMeta","unregister","fieldState","modifiedDirtySinceLastSubmit","modifiedSubmitFailed","modifiedError","validate","modifiedValid","eventOrValue","transform","Boolean","currentTarget","checked","getTransform","getValidator","supplied","fieldId","useMemo","uid","extendedFieldProps","isInvalid","isRequired","channel","payload","createAnalyticsEvent","consumerEvent","clonedEvent","clone","fire","ContextTypes","getAtlaskitAnalyticsContext","getAtlaskitAnalyticsEventHandlers","AnalyticsContext","getChildContext","getAnalyticsContext","data","context","ancestorData","getAnalyticsEventHandlers","Children","contextTypes","childContextTypes","defaultData","WrappedComponent","WithAnalyticsContext","analyticsContext","rest","__rest","analyticsData","UIAnalyticsEvent","hasFired","console","warn","handlers","parse","forEach","handler","update","updater","AnalyticsEvent","AnalyticsContextConsumer","originalEventProps","patchedEventProps","updatePatchedEventProps","changedPropCallbacks","keys","createEventMap","filter","mapCreateEventsToProps","changedPropNames","modified","propCallbackName","eventCreator","providedCallback","_i","analyticsEvent","wrappedComponentProps","WithAnalyticsEvents","disabledColor","focusBorder","invalidBorder","activeBorder","checkedBorder","border","isHovered","LabelText","isChecked","isFocused","RadioInputWrapper","HiddenInput","Radio","constructor","super","isMouseDown","onMouseLeave","onMouseEnter","onMouseUp","onMouseDown","ariaLabel","onInvalid","required","createAndFireEventOnAtlaskit","createAndFireEvent","componentName","packageName","packageVersion","action","actionSubject","attributes","RadioGroup","getProp","buildOptions","options","map","optionProps","index","Fragment","SiteSelectorRadioGroup","getRadioOptions","sites","fieldName","radioOptions","site","hostname","URL","push","onValueChange","onSiteChanged","newSiteSelected","getAttribute","selectedSite","SiteSelectorForm","handleFormSubmit","onNewSiteSelected","onSiteSelected","renderFormContents","SiteSelectorView","header","RootContainer","Header","AvatarContainer","SitesContainer","isOpen","onExited","hasChildren","child","Transition","currentChildren","static","previousChildren","ModalTransitionConsumer","createContainer","zIndex","container","document","setAttribute","getBody","body","zIndexToName","acc","layerName","getLayerName","firePortalEvent","eventName","detail","Number","CustomEvent","createEvent","params","bubbles","cancellable","initCustomEvent","getEvent","window","dispatchEvent","getPortalParent","parentElement","parent","appendChild","Portal","canUseDOM","portalIsMounted","componentDidUpdate","prevProps","prevState","newContainer","replaceChild","componentDidMount","componentWillUnmount","removeChild","extendStatics","d","b","setPrototypeOf","__proto__","create","prefixId","prefix","String","UID","quartz","idSource","TypeError","__","_b","UIDReset","UIDConsumer","isTinted","canClickThrough","Blanket","onBlanketClicked","containerProps","WIDTH_ENUM","widths","newStyled","tagName","flexMaxHeightIEFix","dialogWidth","widthName","widthValue","FillScreen","scrollDistance","positionBaseStyles","positionBaseResponsiveStyles","PositionerAbsolute","PositionerRelative","PositionerFixed","Dialog","isChromeless","dialogBgColor","boxShadow","heightValue","dialogHeight","UNMOUNTED","EXITED","ENTERING","ENTERED","EXITING","_React$Component","initialStatus","appear","isMounting","enter","appearStatus","in","unmountOnExit","mountOnEnter","status","nextCallback","getDerivedStateFromProps","_ref","_proto","updateStatus","nextStatus","cancelNextCallback","getTimeouts","exit","timeout","mounting","performEnter","performExit","_this2","appearing","_ref2","nodeRef","maybeNode","maybeAppearing","timeouts","enterTimeout","onEnter","safeSetState","onEntering","onTransitionEnd","onEntered","_this3","onExit","onExiting","nextState","callback","setNextCallback","_this4","active","doesNotHaveTimeoutOrListener","addEndListener","_ref3","maybeNextCallback","setTimeout","_this$props","childProps","TransitionGroupContext","noop","contextType","propTypes","Animation","hasEntered","stackIndex","unadjustedStatus","adjustedStatus","fade","transition","entering","entered","exiting","exited","slide","divide","fn","divisor","modalPadding","keylineColor","wrapperStyles","showKeyline","Title","TitleText","isHeadingMultiline","danger","warning","titleIconWrapperStyles","bodyStyles","shouldScroll","Footer","Actions","ActionItem","JustifyShim","ModalFooter","actions","onClose","variant","TitleIcon","Icon","ModalHeader","escapeIsHeldDown","_isMounted","scrollContainer","showFooterKeyline","showHeaderKeyline","showContentFocus","tabbableElements","determineKeylines","scrollTop","scrollHeight","clientHeight","getScrollContainer","handleKeyUp","handleKeyDown","shouldCloseOnEscapePress","handleStackChange","onStackChange","addEventListener","capturedScrollContainer","footer","components","Body","HTMLElement","UNSAFE_componentWillReceiveProps","nextProps","removeEventListener","DeprecatedBody","headingId","Container","CustomBody","tabIndex","autoFocus","FocusLock","isEnabled","elem","shouldReturnFocus","returnFocus","scrollBehavior","PositionComponent","getScrollDistance","pageYOffset","documentElement","Modal","dialogNode","isExiting","handleWindowScroll","scrollTo","pageXOffset","handleOverlayClick","shouldCloseOnOverlayClick","height","onCloseComplete","onOpenComplete","width","isBackground","indexOf","toString","style","_","stackConsumers","StackConsumer","updateFn","stack","ModalWrapper","onModalClosed","naturalStackIndex","SiteSelectorModal","onModalClose","ModalTransition","ModalDialog","arraySlice","floor","Math","mergeSort","array","comparefn","middle","insertionSort","merge","element","j","left","right","llength","rlength","lindex","rindex","module","defineBuiltIn","fails","wellKnownSymbol","IS_PURE","ITERATOR","url","searchParams","pathname","toJSON","sort","get","URLSearchParams","username","host","hash","$","uncurryThis","notARegExp","requireObjectCoercible","correctIsRegExpLogic","stringIndexOf","proto","forced","searchString","global","DESCRIPTORS","USE_NATIVE_URL","defineBuiltIns","setToStringTag","createIteratorConstructor","InternalStateModule","anInstance","isCallable","hasOwn","bind","classof","anObject","isObject","$toString","createPropertyDescriptor","getIterator","getIteratorMethod","validateArgumentsLength","arraySort","URL_SEARCH_PARAMS","URL_SEARCH_PARAMS_ITERATOR","setInternalState","set","getInternalParamsState","getterFor","getInternalIteratorState","getOwnPropertyDescriptor","safeGetBuiltIn","descriptor","nativeFetch","NativeRequest","Headers","RequestPrototype","HeadersPrototype","RegExp","decodeURIComponent","encodeURIComponent","charAt","join","shift","splice","stringSlice","slice","plus","sequences","percentSequence","bytes","percentDecode","sequence","deserialize","it","find","replacements","replacer","match","serialize","URLSearchParamsIterator","kind","iterator","entries","step","next","entry","done","URLSearchParamsState","init","parseObject","parseQuery","bindURL","object","entryIterator","entryNext","first","second","iteratorMethod","query","attribute","updateURL","URLSearchParamsConstructor","URLSearchParamsPrototype","append","getAll","has","found","val","a","boundFunction","enumerable","headersHas","headersSet","wrapRequestOptions","headers","dontCallGetSet","fetch","input","RequestConstructor","Request","createSource","counter","getId","getPrefix"],"sourceRoot":""}