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AS4C,gBAAgBL,YAAhD,MAAkE+C,EAA+BtF,SAAS4C,gBAAiB,WAAY,YAX9N,KACHM,IACiD,IAA7CA,GAAgDD,GAA+B,CACtF,GACF,CACCI,GAER,CA6HA,SAASiC,EAA+BO,EAAS/D,EAAOgE,GACpD,IAAIC,EAAMF,EAAQ/D,MAAMA,GAExB,OADA+D,EAAQ/D,MAAMA,GAASgE,EAChB,KACHD,EAAQ/D,MAAMA,GAASiE,CAAG,CAElC,CAEA,SAASV,EAA+BvB,EAAQkC,EAAOC,EAAS7C,GAI5D,OADAU,EAAOc,iBAAiBoB,EAAOC,EAAS7C,GACjC,KAEHU,EAAOoC,oBAAoBF,EAAOC,EAAS7C,EAAQ,CAE3D,CACA,SAASuB,EAAqCb,GAC1C,IAAIqC,EAAOnG,SAAS2C,kBAAoB3C,SAAS4C,gBAC7CwD,EAAatC,EACjB,KAAMsC,GAAcA,IAAeD,GAAK,CAEpC,IAAI7C,EAAiB,EAAwB8C,GAC7C,GAAI9C,IAAetD,SAAS4C,iBAAmBU,IAAetD,SAAS0D,MAAQJ,IAAe8C,EAAY,CACtG,IAAIC,EAAgB/C,EAAWgD,wBAAwBC,IACnDC,EAAYJ,EAAWE,wBAAwBC,IAC/CC,EAAYH,EAAgBD,EAAW/D,eAAciB,EAAWmD,WAAaD,EAAYH,EACjG,CACAD,EAAa9C,EAAWZ,aAC5B,CACJ,C","sources":["webpack://react-app/./node_modules/.pnpm/@react-aria+utils@3.28.1_react-dom@19.1.0_react@19.1.0/node_modules/@react-aria/utils/dist/useLayoutEffect.mjs","webpack://react-app/./node_modules/.pnpm/@react-aria+utils@3.28.1_react-dom@19.1.0_react@19.1.0/node_modules/@react-aria/utils/dist/platform.mjs","webpack://react-app/./node_modules/.pnpm/@react-aria+utils@3.28.1_react-dom@19.1.0_react@19.1.0/node_modules/@react-aria/utils/dist/chain.mjs","webpack://react-app/./node_modules/.pnpm/@react-aria+utils@3.28.1_react-dom@19.1.0_react@19.1.0/node_modules/@react-aria/utils/dist/isScrollable.mjs","webpack://react-app/./node_modules/.pnpm/@react-aria+utils@3.28.1_react-dom@19.1.0_react@19.1.0/node_modules/@react-aria/utils/dist/getScrollParent.mjs","webpack://react-app/./node_modules/.pnpm/@react-aria+overlays@3.26.1_react-dom@19.1.0_react@19.1.0/node_modules/@react-aria/overlays/dist/usePreventScroll.mjs"],"sourcesContent":["import $HgANd$react from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== 'undefined' ? (0, $HgANd$react).useLayoutEffect : ()=>{};\n\n\nexport {$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as useLayoutEffect};\n//# sourceMappingURL=useLayoutEffect.module.js.map\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ function $c87311424ea30a05$var$testUserAgent(re) {\n var _window_navigator_userAgentData;\n if (typeof window === 'undefined' || window.navigator == null) return false;\n return ((_window_navigator_userAgentData = window.navigator['userAgentData']) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands.some((brand)=>re.test(brand.brand))) || re.test(window.navigator.userAgent);\n}\nfunction $c87311424ea30a05$var$testPlatform(re) {\n var _window_navigator_userAgentData;\n return typeof window !== 'undefined' && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator['userAgentData']) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false;\n}\nfunction $c87311424ea30a05$var$cached(fn) {\n let res = null;\n return ()=>{\n if (res == null) res = fn();\n return res;\n };\n}\nconst $c87311424ea30a05$export$9ac100e40613ea10 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testPlatform(/^Mac/i);\n});\nconst $c87311424ea30a05$export$186c6964ca17d99 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testPlatform(/^iPhone/i);\n});\nconst $c87311424ea30a05$export$7bef049ce92e4224 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testPlatform(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\n $c87311424ea30a05$export$9ac100e40613ea10() && navigator.maxTouchPoints > 1;\n});\nconst $c87311424ea30a05$export$fedb369cb70207f1 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$export$186c6964ca17d99() || $c87311424ea30a05$export$7bef049ce92e4224();\n});\nconst $c87311424ea30a05$export$e1865c3bedcd822b = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$export$9ac100e40613ea10() || $c87311424ea30a05$export$fedb369cb70207f1();\n});\nconst $c87311424ea30a05$export$78551043582a6a98 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testUserAgent(/AppleWebKit/i) && !$c87311424ea30a05$export$6446a186d09e379e();\n});\nconst $c87311424ea30a05$export$6446a186d09e379e = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testUserAgent(/Chrome/i);\n});\nconst $c87311424ea30a05$export$a11b0059900ceec8 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testUserAgent(/Android/i);\n});\nconst $c87311424ea30a05$export$b7d78993b74f766d = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testUserAgent(/Firefox/i);\n});\n\n\nexport {$c87311424ea30a05$export$9ac100e40613ea10 as isMac, $c87311424ea30a05$export$186c6964ca17d99 as isIPhone, $c87311424ea30a05$export$7bef049ce92e4224 as isIPad, $c87311424ea30a05$export$fedb369cb70207f1 as isIOS, $c87311424ea30a05$export$e1865c3bedcd822b as isAppleDevice, $c87311424ea30a05$export$78551043582a6a98 as isWebKit, $c87311424ea30a05$export$6446a186d09e379e as isChrome, $c87311424ea30a05$export$a11b0059900ceec8 as isAndroid, $c87311424ea30a05$export$b7d78993b74f766d as isFirefox};\n//# sourceMappingURL=platform.module.js.map\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ /**\n * Calls all functions in the order they were chained with the same arguments.\n */ function $ff5963eb1fccf552$export$e08e3b67e392101e(...callbacks) {\n return (...args)=>{\n for (let callback of callbacks)if (typeof callback === 'function') callback(...args);\n };\n}\n\n\nexport {$ff5963eb1fccf552$export$e08e3b67e392101e as chain};\n//# sourceMappingURL=chain.module.js.map\n","/*\n * Copyright 2024 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ function $cc38e7bd3fc7b213$export$2bb74740c4e19def(node, checkForOverflow) {\n if (!node) return false;\n let style = window.getComputedStyle(node);\n let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);\n if (isScrollable && checkForOverflow) isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;\n return isScrollable;\n}\n\n\nexport {$cc38e7bd3fc7b213$export$2bb74740c4e19def as isScrollable};\n//# sourceMappingURL=isScrollable.module.js.map\n","import {isScrollable as $cc38e7bd3fc7b213$export$2bb74740c4e19def} from \"./isScrollable.mjs\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nfunction $62d8ded9296f3872$export$cfa2225e87938781(node, checkForOverflow) {\n let scrollableNode = node;\n if ((0, $cc38e7bd3fc7b213$export$2bb74740c4e19def)(scrollableNode, checkForOverflow)) scrollableNode = scrollableNode.parentElement;\n while(scrollableNode && !(0, $cc38e7bd3fc7b213$export$2bb74740c4e19def)(scrollableNode, checkForOverflow))scrollableNode = scrollableNode.parentElement;\n return scrollableNode || document.scrollingElement || document.documentElement;\n}\n\n\nexport {$62d8ded9296f3872$export$cfa2225e87938781 as getScrollParent};\n//# sourceMappingURL=getScrollParent.module.js.map\n","import {useLayoutEffect as $7mMvr$useLayoutEffect, isIOS as $7mMvr$isIOS, chain as $7mMvr$chain, getScrollParent as $7mMvr$getScrollParent} from \"@react-aria/utils\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $49c51c25361d4cd2$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;\n// HTML input types that do not cause the software keyboard to appear.\nconst $49c51c25361d4cd2$var$nonTextInputTypes = new Set([\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n 'image',\n 'button',\n 'submit',\n 'reset'\n]);\n// The number of active usePreventScroll calls. Used to determine whether to revert back to the original page style/scroll position\nlet $49c51c25361d4cd2$var$preventScrollCount = 0;\nlet $49c51c25361d4cd2$var$restore;\nfunction $49c51c25361d4cd2$export$ee0f7cc6afcd1c18(options = {}) {\n let { isDisabled: isDisabled } = options;\n (0, $7mMvr$useLayoutEffect)(()=>{\n if (isDisabled) return;\n $49c51c25361d4cd2$var$preventScrollCount++;\n if ($49c51c25361d4cd2$var$preventScrollCount === 1) {\n if ((0, $7mMvr$isIOS)()) $49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollMobileSafari();\n else $49c51c25361d4cd2$var$restore = $49c51c25361d4cd2$var$preventScrollStandard();\n }\n return ()=>{\n $49c51c25361d4cd2$var$preventScrollCount--;\n if ($49c51c25361d4cd2$var$preventScrollCount === 0) $49c51c25361d4cd2$var$restore();\n };\n }, [\n isDisabled\n ]);\n}\n// For most browsers, all we need to do is set `overflow: hidden` on the root element, and\n// add some padding to prevent the page from shifting when the scrollbar is hidden.\nfunction $49c51c25361d4cd2$var$preventScrollStandard() {\n return (0, $7mMvr$chain)($49c51c25361d4cd2$var$setStyle(document.documentElement, 'paddingRight', `${window.innerWidth - document.documentElement.clientWidth}px`), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'overflow', 'hidden'));\n}\n// Mobile Safari is a whole different beast. Even with overflow: hidden,\n// it still scrolls the page in many situations:\n//\n// 1. When the bottom toolbar and address bar are collapsed, page scrolling is always allowed.\n// 2. When the keyboard is visible, the viewport does not resize. Instead, the keyboard covers part of\n// it, so it becomes scrollable.\n// 3. When tapping on an input, the page always scrolls so that the input is centered in the visual viewport.\n// This may cause even fixed position elements to scroll off the screen.\n// 4. When using the next/previous buttons in the keyboard to navigate between inputs, the whole page always\n// scrolls, even if the input is inside a nested scrollable element that could be scrolled instead.\n//\n// In order to work around these cases, and prevent scrolling without jankiness, we do a few things:\n//\n// 1. Prevent default on `touchmove` events that are not in a scrollable element. This prevents touch scrolling\n// on the window.\n// 2. Set `overscroll-behavior: contain` on nested scrollable regions so they do not scroll the page when at\n// the top or bottom. Work around a bug where this does not work when the element does not actually overflow\n// by preventing default in a `touchmove` event.\n// 3. Prevent default on `touchend` events on input elements and handle focusing the element ourselves.\n// 4. When focusing an input, apply a transform to trick Safari into thinking the input is at the top\n// of the page, which prevents it from scrolling the page. After the input is focused, scroll the element\n// into view ourselves, without scrolling the whole page.\n// 5. Offset the body by the scroll position using a negative margin and scroll to the top. This should appear the\n// same visually, but makes the actual scroll position always zero. This is required to make all of the\n// above work or Safari will still try to scroll the page when focusing an input.\n// 6. As a last resort, handle window scroll events, and scroll back to the top. This can happen when attempting\n// to navigate to an input with the next/previous buttons that's outside a modal.\nfunction $49c51c25361d4cd2$var$preventScrollMobileSafari() {\n let scrollable;\n let restoreScrollableStyles;\n let onTouchStart = (e)=>{\n // Store the nearest scrollable parent element from the element that the user touched.\n scrollable = (0, $7mMvr$getScrollParent)(e.target, true);\n if (scrollable === document.documentElement && scrollable === document.body) return;\n // Prevent scrolling up when at the top and scrolling down when at the bottom\n // of a nested scrollable area, otherwise mobile Safari will start scrolling\n // the window instead.\n if (scrollable instanceof HTMLElement && window.getComputedStyle(scrollable).overscrollBehavior === 'auto') restoreScrollableStyles = $49c51c25361d4cd2$var$setStyle(scrollable, 'overscrollBehavior', 'contain');\n };\n let onTouchMove = (e)=>{\n // Prevent scrolling the window.\n if (!scrollable || scrollable === document.documentElement || scrollable === document.body) {\n e.preventDefault();\n return;\n }\n // overscroll-behavior should prevent scroll chaining, but currently does not\n // if the element doesn't actually overflow. https://bugs.webkit.org/show_bug.cgi?id=243452\n // This checks that both the width and height do not overflow, otherwise we might\n // block horizontal scrolling too. In that case, adding `touch-action: pan-x` to\n // the element will prevent vertical page scrolling. We can't add that automatically\n // because it must be set before the touchstart event.\n if (scrollable.scrollHeight === scrollable.clientHeight && scrollable.scrollWidth === scrollable.clientWidth) e.preventDefault();\n };\n let onTouchEnd = ()=>{\n if (restoreScrollableStyles) restoreScrollableStyles();\n };\n let onFocus = (e)=>{\n let target = e.target;\n if ($49c51c25361d4cd2$var$willOpenKeyboard(target)) {\n setupStyles();\n // Apply a transform to trick Safari into thinking the input is at the top of the page\n // so it doesn't try to scroll it into view.\n target.style.transform = 'translateY(-2000px)';\n requestAnimationFrame(()=>{\n target.style.transform = '';\n // This will have prevented the browser from scrolling the focused element into view,\n // so we need to do this ourselves in a way that doesn't cause the whole page to scroll.\n if ($49c51c25361d4cd2$var$visualViewport) {\n if ($49c51c25361d4cd2$var$visualViewport.height < window.innerHeight) // If the keyboard is already visible, do this after one additional frame\n // to wait for the transform to be removed.\n requestAnimationFrame(()=>{\n $49c51c25361d4cd2$var$scrollIntoView(target);\n });\n else // Otherwise, wait for the visual viewport to resize before scrolling so we can\n // measure the correct position to scroll to.\n $49c51c25361d4cd2$var$visualViewport.addEventListener('resize', ()=>$49c51c25361d4cd2$var$scrollIntoView(target), {\n once: true\n });\n }\n });\n }\n };\n let restoreStyles = null;\n let setupStyles = ()=>{\n if (restoreStyles) return;\n let onWindowScroll = ()=>{\n // Last resort. If the window scrolled, scroll it back to the top.\n // It should always be at the top because the body will have a negative margin (see below).\n window.scrollTo(0, 0);\n };\n // Record the original scroll position so we can restore it.\n // Then apply a negative margin to the body to offset it by the scroll position. This will\n // enable us to scroll the window to the top, which is required for the rest of this to work.\n let scrollX = window.pageXOffset;\n let scrollY = window.pageYOffset;\n restoreStyles = (0, $7mMvr$chain)($49c51c25361d4cd2$var$addEvent(window, 'scroll', onWindowScroll), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'paddingRight', `${window.innerWidth - document.documentElement.clientWidth}px`), $49c51c25361d4cd2$var$setStyle(document.documentElement, 'overflow', 'hidden'), $49c51c25361d4cd2$var$setStyle(document.body, 'marginTop', `-${scrollY}px`), ()=>{\n window.scrollTo(scrollX, scrollY);\n });\n // Scroll to the top. The negative margin on the body will make this appear the same.\n window.scrollTo(0, 0);\n };\n let removeEvents = (0, $7mMvr$chain)($49c51c25361d4cd2$var$addEvent(document, 'touchstart', onTouchStart, {\n passive: false,\n capture: true\n }), $49c51c25361d4cd2$var$addEvent(document, 'touchmove', onTouchMove, {\n passive: false,\n capture: true\n }), $49c51c25361d4cd2$var$addEvent(document, 'touchend', onTouchEnd, {\n passive: false,\n capture: true\n }), $49c51c25361d4cd2$var$addEvent(document, 'focus', onFocus, true));\n return ()=>{\n // Restore styles and scroll the page back to where it was.\n restoreScrollableStyles === null || restoreScrollableStyles === void 0 ? void 0 : restoreScrollableStyles();\n restoreStyles === null || restoreStyles === void 0 ? void 0 : restoreStyles();\n removeEvents();\n };\n}\n// Sets a CSS property on an element, and returns a function to revert it to the previous value.\nfunction $49c51c25361d4cd2$var$setStyle(element, style, value) {\n let cur = element.style[style];\n element.style[style] = value;\n return ()=>{\n element.style[style] = cur;\n };\n}\n// Adds an event listener to an element, and returns a function to remove it.\nfunction $49c51c25361d4cd2$var$addEvent(target, event, handler, options) {\n // internal function, so it's ok to ignore the difficult to fix type error\n // @ts-ignore\n target.addEventListener(event, handler, options);\n return ()=>{\n // @ts-ignore\n target.removeEventListener(event, handler, options);\n };\n}\nfunction $49c51c25361d4cd2$var$scrollIntoView(target) {\n let root = document.scrollingElement || document.documentElement;\n let nextTarget = target;\n while(nextTarget && nextTarget !== root){\n // Find the parent scrollable element and adjust the scroll position if the target is not already in view.\n let scrollable = (0, $7mMvr$getScrollParent)(nextTarget);\n if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !== nextTarget) {\n let scrollableTop = scrollable.getBoundingClientRect().top;\n let targetTop = nextTarget.getBoundingClientRect().top;\n if (targetTop > scrollableTop + nextTarget.clientHeight) scrollable.scrollTop += targetTop - scrollableTop;\n }\n nextTarget = scrollable.parentElement;\n }\n}\nfunction $49c51c25361d4cd2$var$willOpenKeyboard(target) {\n return target instanceof HTMLInputElement && !$49c51c25361d4cd2$var$nonTextInputTypes.has(target.type) || target instanceof HTMLTextAreaElement || target instanceof HTMLElement && target.isContentEditable;\n}\n\n\nexport {$49c51c25361d4cd2$export$ee0f7cc6afcd1c18 as usePreventScroll};\n//# sourceMappingURL=usePreventScroll.module.js.map\n"],"names":["$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c","document","useLayoutEffect","$c87311424ea30a05$var$testUserAgent","re","_window_navigator_userAgentData","window","navigator","brands","some","brand","test","userAgent","$c87311424ea30a05$var$testPlatform","platform","$c87311424ea30a05$var$cached","fn","res","$c87311424ea30a05$export$9ac100e40613ea10","$c87311424ea30a05$export$186c6964ca17d99","$c87311424ea30a05$export$7bef049ce92e4224","maxTouchPoints","$c87311424ea30a05$export$fedb369cb70207f1","$c87311424ea30a05$export$6446a186d09e379e","$ff5963eb1fccf552$export$e08e3b67e392101e","callbacks","args","callback","$cc38e7bd3fc7b213$export$2bb74740c4e19def","node","checkForOverflow","style","getComputedStyle","isScrollable","overflow","overflowX","overflowY","scrollHeight","clientHeight","scrollWidth","clientWidth","$62d8ded9296f3872$export$cfa2225e87938781","scrollableNode","parentElement","scrollingElement","documentElement","$49c51c25361d4cd2$var$visualViewport","visualViewport","$49c51c25361d4cd2$var$nonTextInputTypes","Set","$49c51c25361d4cd2$var$restore","$49c51c25361d4cd2$var$preventScrollCount","$49c51c25361d4cd2$export$ee0f7cc6afcd1c18","options","isDisabled","scrollable","restoreScrollableStyles","onTouchMove","e","body","preventDefault","onTouchEnd","onFocus","target","HTMLInputElement","has","type","HTMLTextAreaElement","HTMLElement","isContentEditable","$49c51c25361d4cd2$var$willOpenKeyboard","setupStyles","transform","requestAnimationFrame","height","innerHeight","$49c51c25361d4cd2$var$scrollIntoView","addEventListener","once","restoreStyles","onWindowScroll","scrollTo","scrollX","pageXOffset","scrollY","pageYOffset","$49c51c25361d4cd2$var$addEvent","$49c51c25361d4cd2$var$setStyle","innerWidth","removeEvents","overscrollBehavior","passive","capture","$49c51c25361d4cd2$var$preventScrollMobileSafari","element","value","cur","event","handler","removeEventListener","root","nextTarget","scrollableTop","getBoundingClientRect","top","targetTop","scrollTop"],"sourceRoot":""}